type V2SelectionPoint = { blockId?: unknown; blockOffset?: unknown; }; type V2RangeSnapshotInput = { anchor?: V2SelectionPoint | null; focus?: V2SelectionPoint | null; }; /** * A logical v2 selection snapshot represents a non-empty range when its anchor * and focus point at different block positions. Mirrors the range check the v2 * shell uses when it emits `v2-selection-changed`. */ export declare const isV2RangeSnapshot: (snapshot: V2RangeSnapshotInput | null | undefined) => boolean; /** * Detect a real browser text selection whose endpoints are outside the active * v2 mount. Editable host selections can have no native DOM range, so an * absent range must not count as an outside selection. */ export declare const hasOutsideV2DomRangeSelection: (selection: Selection | null | undefined, root: Node | null | undefined) => boolean; /** * Decide whether the DOM-selection sync pass should keep the affordance driven * by the v2 host's logical selection instead of clearing it. * * In editable modes the host owns pointer text selection, so native DOM ranges * may be absent or stale. In that case the pointerup sync must defer to the * host snapshot rather than clobber the selection the host just published. * Only editable modes use the host snapshot. Viewing mode keeps native DOM * selection, and unknown modes should not preserve stale host state. */ export declare const shouldPreserveHostV2Selection: (documentMode: string | null | undefined, hostSnapshot: V2RangeSnapshotInput | null | undefined) => boolean; /** * A V2 paint can briefly have no DOM anchor while a selected control is being * rebuilt. Keep an already-positioned comment affordance during that gap when * the host still owns a range; otherwise the button unmounts and remounts on * consecutive paint frames, making it blink and intercepting its own click. */ export declare const shouldRetainV2FloatingSelection: (hasHostRange: boolean, selectionPosition: { source?: unknown; } | null | undefined) => boolean; export {};