/** * Shared multi-selection model for the desktop and Explorer (#211). * * One place owns the OS-standard selection semantics — plain click = select * only, Ctrl/Cmd click = toggle, Shift click = contiguous range from the anchor, * Ctrl+A = all, Shift+Arrow = extend — so both surfaces behave identically and * batch operations (multi-delete, batch drag) have a single source of truth. * * Engine-side: pure state/logic, no styling. Callers pass the *ordered* key list * (whatever order the view shows) so range/extend follow what the user sees. */ export interface ClickModifiers { ctrlKey?: boolean; metaKey?: boolean; shiftKey?: boolean; } export interface MultiSelectApi { /** The set of selected keys. */ selected: Set; /** The last-focused key — drives the sidebar/details pane and the arrow anchor. */ active: string | null; size: number; isSelected: (key: string) => boolean; clear: () => void; /** Replace the selection with a single key (plain click / programmatic). */ selectOnly: (key: string) => void; /** Replace the selection with an explicit set (e.g. box-select), optionally naming the active key. */ setSelection: (keys: Iterable, active?: string | null) => void; /** Select every key in `ordered` (Ctrl+A). */ selectAll: (ordered: string[]) => void; /** Handle a click on `key` with modifiers, given the current ordered view. */ handleItemClick: (key: string, ordered: string[], mods: ClickModifiers) => void; /** Keyboard move to `nextKey`: `extend` (Shift+Arrow) grows the range, else selects only. */ moveActive: (ordered: string[], nextKey: string, extend: boolean) => void; } export declare function useMultiSelect(): MultiSelectApi;