import { FlowBlock, Layout, Measure } from '../../../../../../../layout-engine/contracts/src/index.js';
/**
 * Represents the geometric layout information for a caret position.
 * @property pageIndex - The zero-based page index where the caret is located
 * @property x - The horizontal position in page-local coordinates (pixels)
 * @property y - The vertical position in page-local coordinates (pixels)
 * @property height - The height of the caret in pixels
 */
export type CaretLayoutRect = {
    pageIndex: number;
    x: number;
    y: number;
    height: number;
};
/**
 * Dependencies required for computing caret geometry.
 */
export type ComputeCaretLayoutRectGeometryDeps = {
    layout: Layout | null;
    blocks: FlowBlock[];
    measures: Measure[];
    painterHost: HTMLElement | null;
    viewportHost: HTMLElement;
    visibleHost: HTMLElement;
    zoom: number;
};
/**
 * Computes the visual geometry for a caret at a given ProseMirror position.
 *
 * This function calculates the precise pixel coordinates and dimensions for rendering
 * a caret cursor, accounting for:
 * - Multi-page layouts with stacked pages
 * - List items with markers and first-line indent modes
 * - Table cells (delegates to DOM-based fallback)
 * - Virtualized content where DOM elements may not be mounted
 * - Zoom levels and coordinate transformations
 *
 * @param deps - Dependencies including layout, blocks, measures, and DOM elements
 * @param pos - The ProseMirror position where the caret should be placed
 * @param includeDomFallback - Whether to use DOM measurements as a fallback when available (default: true)
 * @returns Caret layout information or null if the position cannot be resolved
 *
 * @remarks
 * The function uses layout-engine measurements for geometry calculation, but can
 * fall back to DOM-based measurements when `includeDomFallback` is true and the
 * relevant DOM elements are available. This helps correct sub-pixel rendering
 * discrepancies that may occur between layout calculations and actual browser rendering.
 *
 * For table cells, the function always delegates to `computeTableCaretLayoutRectFromDom`
 * as table caret positioning requires complex cell boundary detection.
 */
export declare function computeCaretLayoutRectGeometry({ layout, blocks, measures, painterHost, viewportHost, visibleHost, zoom }: ComputeCaretLayoutRectGeometryDeps, pos: number, includeDomFallback?: boolean): CaretLayoutRect | null;
//# sourceMappingURL=CaretGeometry.d.ts.map