import { Context, ListboxUIState } from './state.ts'; import { Command } from './commands.ts'; import { Value } from './options.ts'; import { Move } from './move.ts'; export type SelectAction = { type: 'select'; } | { type: 'toggle'; } | { type: 'select-from-current'; } | { type: 'select-from-most-recent'; } | { type: 'extend-from-anchor'; anchorIndex: number; }; export type Selection = { action: SelectAction; replaceExisting: boolean; } | null; type ModifierKeys = 'ShiftMod' | 'Shift' | 'Mod' | null; export declare const modifierKeys: (e: KeyboardEvent | MouseEvent) => ModifierKeys; export declare const selectionForMove: (state: ListboxUIState, ctx: Context, move: Move, mods: ModifierKeys) => Selection; export declare const selectionForTrigger: (ctx: Context, mods: ModifierKeys) => Selection; export declare function addRange(baseValues: Value[], ctx: Context, fromIdx: number, toIdx: number): Value[]; export declare function updateAnchoredRange(baseValues: Value[], ctx: Context, anchorIdx: number, targetIdx: number, prevTargetIdx: number): Value[]; export declare function applyAction(state: ListboxUIState, ctx: Context, command: Command): ListboxUIState; export {};