import { StoryLocator } from '../../../document-api/src/index.js';
import { Editor } from '../editors/v1/core/Editor.js';
import { ViewportPositionHit } from './types.js';
interface HostEditor {
    presentationEditor?: {
        posAtCoords?(coords: {
            clientX: number;
            clientY: number;
        }): {
            pos: number;
            inside: number;
        } | null;
        visibleHost?: HTMLElement;
        getActiveStoryLocator?(): StoryLocator | null;
    } | null;
}
/**
 * Resolve a viewport (x, y) coordinate to the caret position under
 * that point. Returns `null` for points outside the painted host or
 * when no editor is mounted.
 *
 * `hostEditor` is the controller's host editor (where the painted
 * host and the coord-to-position helper live). `routedEditor` is the
 * editor whose PM document the caret belongs to — for clicks inside a
 * header/footer/footnote story while focus is in that surface, the
 * routed editor is the story editor; otherwise it is the host.
 */
export declare function resolvePositionAt(hostEditor: (Editor & HostEditor) | null, routedEditor: Editor | null, x: number, y: number): ViewportPositionHit | null;
export {};
//# sourceMappingURL=position-at.d.ts.map