export function isWithin({ client, clientRect }) { return ( // is within horizontal bounds client.x >= clientRect.x && client.x <= clientRect.x + clientRect.width && // is within vertical bounds client.y >= clientRect.y && client.y <= clientRect.y + clientRect.height ); }