import type { ReactElement, ReactNode } from 'react'; import type { NodeId, SelectionNode } from './live.js'; /** The value `useSelection()` returns (API §9). */ export interface Selection { /** Selected ids, insertion-ordered. A deleted node drops out. */ readonly ids: readonly NodeId[]; /** LIVE nodes for `ids`, same order — a deleted node drops out here too. */ readonly nodes: readonly SelectionNode[]; /** Last explicit pick; null when empty or the anchor node is gone. Range math is caller-side. */ readonly anchor: NodeId | null; has(id: NodeId): boolean; set(ids: readonly NodeId[]): void; add(id: NodeId): void; toggle(id: NodeId): void; clear(): void; } export interface SelectionScopeProps { /** Seed selection (deduped); read once at mount. */ initial?: readonly NodeId[]; /** Fires when the selection changes — explicit ops AND liveness drops. Persist here. */ onChange?: (ids: readonly NodeId[]) => void; children: ReactNode; } export declare const SelectionContext: import("react").Context; export declare function SelectionScope(props: SelectionScopeProps): ReactElement; //# sourceMappingURL=scope.context.d.ts.map