import { Selection } from 'prosemirror-state';
import { ResolveRangeOutput } from '../../../../../../document-api/src/index.js';
import { Editor } from '../../core/Editor.js';
/**
 * Returns the live ProseMirror selection. No fallback, no preserved selection.
 */
export declare function selectCurrentPmSelection(editor: Editor): Selection;
/**
 * Returns the "effective" PM selection — the one the UI considers actionable.
 *
 * Fallback chain:
 * 1. Live `state.selection` if non-collapsed
 * 2. PM plugin preserved selection (transaction-mapped) if present and non-empty
 * 3. Live `state.selection` (even if collapsed)
 *
 * `editor.options.preservedSelection` and `editor.options.lastSelection` are
 * intentionally excluded — they are unmapped snapshots that drift after
 * document-changing transactions.
 */
export declare function selectEffectivePmSelection(editor: Editor): Selection;
/**
 * Validates a PM selection and extracts absolute positions for range resolution.
 *
 * - `TextSelection` / `AllSelection`: use `selection.from` / `selection.to`
 * - `NodeSelection`: classify first, reject unsupported cases
 * - `CellSelection`: always reject
 */
export declare function extractAbsoluteRange(editor: Editor, selection: Selection): {
    absFrom: number;
    absTo: number;
};
/**
 * Validates a PM selection, extracts positions, and builds a full
 * `ResolveRangeOutput`. This is the shared pipeline used by both
 * snapshot methods and handle resolution.
 */
export declare function resolvePmSelectionToRange(editor: Editor, selection: Selection): ResolveRangeOutput;
/**
 * Resolves the live PM `state.selection` into a `ResolveRangeOutput`.
 *
 * Does NOT consult preserved selection or any fallback — returns exactly what
 * the current PM selection describes.
 *
 * This is a convenience wrapper: captures the current selection and resolves
 * immediately. For deferred flows, use `captureCurrentSelectionHandle` instead.
 */
export declare function resolveCurrentEditorSelectionRange(editor: Editor): ResolveRangeOutput;
/**
 * Resolves the "effective" selection into a `ResolveRangeOutput`.
 *
 * The effective selection is what the UI considers actionable for commands:
 * - a non-collapsed live selection wins
 * - otherwise, the transaction-mapped preserved selection from the
 *   custom-selection PM plugin is used (if present and non-empty)
 * - otherwise, the current (possibly collapsed) live selection is returned
 *
 * This is a convenience wrapper: captures the effective selection and resolves
 * immediately. For deferred flows, use `captureEffectiveSelectionHandle` instead.
 */
export declare function resolveEffectiveEditorSelectionRange(editor: Editor): ResolveRangeOutput;
//# sourceMappingURL=selection-range-resolver.d.ts.map