/** * Utilities for computing a collapsed Range at a given viewport coordinate, * used by the drag-and-drop logic in `RichInputController` to position the * caret and drag indicator at the drop point. * * Tries shadow-root-aware APIs first, then document-level APIs, and finally * a manual text-node binary search for maximum browser coverage (Safari * doesn't expose caret APIs for Shadow DOM). */ /** * Compute a collapsed Range at the character position closest to the given * viewport coordinates within `container`. Tries shadow-root-aware caret * APIs first, then document-level APIs, then a manual walk. * * @param shadowRoot - Shadow root to try shadow-aware caret APIs on. * @param container - The contenteditable element to search within. * @param x - Viewport X coordinate. * @param y - Viewport Y coordinate. * @param ignoreNode - Optional node to skip during the manual walk (e.g. drag caret). */ export declare function getRangeAtPoint(shadowRoot: ShadowRoot | null, container: HTMLElement, x: number, y: number, ignoreNode?: Node | null): Range | null;