import type { Transaction } from '@atlaskit/editor-prosemirror/state';
import { Selection } from '@atlaskit/editor-prosemirror/state';
import type { FlattenedItem } from './flatten-list';
interface ComputeSelectionOffsetsOptions {
    contentStartOffsets: number[];
    docSize: number;
    endIndex: number;
    items: FlattenedItem[];
    originalFrom: number;
    originalTo: number;
    rootListStart: number;
    startIndex: number;
}
interface RestoreSelectionOptions {
    from: number;
    originalSelection: Selection;
    to: number;
    tr: Transaction;
}
/**
 * Compute the new selection offsets after list items have been moved/indented/outdented.
 *
 * Uses the content start offsets computed during fragment rebuild to map each
 * selection endpoint to its new absolute position, accounting for the change
 * in the list structure.
 */
export declare function computeSelectionOffsets({ items, startIndex, endIndex, originalFrom, originalTo, contentStartOffsets, rootListStart, docSize, }: ComputeSelectionOffsetsOptions): {
    from: number;
    to: number;
};
/**
 * Restore the transaction's selection after a list structural change
 * (indent/outdent of list items or task list items).
 *
 * Uses the content start offsets computed during fragment rebuild to
 * map each selection endpoint to its new absolute position.
 *
 * Handles NodeSelection, GapCursorSelection, and TextSelection.
 */
export declare function restoreSelection({ tr, originalSelection, from, to, }: RestoreSelectionOptions): void;
export {};
