/**
 * Determines if a given coordinate is contained within a DOMRect.
 * @param coordinates An x and y coordinate relative to the viewport
 * @param rect A DOMRect
 * @returns true if the given coordinate is contained within the DOMRect, false otherwise.
 */
const isPositionWithinRect = ({ x, y }, rect) => {
    return x >= rect.left && x <= rect.right && y >= rect.top && y <= rect.bottom;
};
export default isPositionWithinRect;
//# sourceMappingURL=isPositionWithinRect.js.map