/** A corner/center alignment pair, independent of any specific composable. */ export type GeometryAlign = { horizontal: "left" | "center" | "right"; vertical: "top" | "center" | "bottom"; }; /** A rectangular clipping region (viewport or a scrollable container's rect). */ export type GeometryBounds = { left: number; top: number; right: number; bottom: number; }; export type GeometryCollisionType = "fit" | "flip"; export type GeometryCollision = { horizontal: GeometryCollisionType; vertical: GeometryCollisionType; }; export type ComputeCollisionOffsetInput = { /** The anchor rect (or a zero-size point rect for a click/keyboard activation). */ anchor: DOMRect; /** The popup's own measured size, or `null` before it has been measured. */ popup: DOMRect | null; /** Point on the anchor that the popup is positioned from. */ anchorAlign: GeometryAlign; /** Point on the popup that is placed at the computed anchor point. */ popupAlign: GeometryAlign; /** Clipping bounds checked for overflow; same coordinate space as `anchor`. */ bounds: GeometryBounds; /** Per-axis collision behavior applied when the preferred corner overflows. */ collision: GeometryCollision; }; /** * Computes a popup's top-left corner from an anchor rect and alignment pair, * then applies Kendo-style `fit` or `flip` collision behavior independently * on each axis. Fit shifts the popup within bounds without changing sides; * flip moves it to the anchor's opposite side only when that reduces overflow. * * Returns the preferred position when `popup` is `null`, since collision * behavior cannot be calculated before the popup has been measured. */ export declare const computeCollisionOffset: ({ anchor, popup, anchorAlign, popupAlign, bounds, collision, }: ComputeCollisionOffsetInput) => { left: number; top: number; };