@weasel-js/routing 1.11.1 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { ModifierKey, ClaimableGesture, GestureSpec, InputEvent, TargetSpec, IngestItem, BodyTarget, KeyHeldSpec, TargetPredicate, KeySpec, ParsedModifiers, GestureName } from '@weasel-js/gestures';
1
+ import { ModifierKey, ClaimableGesture, GestureSpec, InputEvent, TargetSpec, IngestItem, BodyTarget, BindingOverrideInput, KeyHeldSpec, TargetPredicate, KeySpec, ClickSpec, DoubleClickSpec, DragSpec, ContextMenuSpec, ParsedModifiers, GestureName } from '@weasel-js/gestures';
2
2
  import { FramedBox, View, Point } from '@weasel-js/geom';
3
3
  import { CursorSpec } from '@weasel-js/cursor';
4
4
  import { MenuEntry, Rect, MenuShortcut } from '@weasel-js/menu';
@@ -504,6 +504,11 @@ interface InvocationCtx {
504
504
  /** Per-invocation options the dispatcher reads from a `GestureBinding`'s
505
505
  * `opts` field and passes to `OngoingInvoker.start`. */
506
506
  interface BindingOpts {
507
+ /** The id a binding override names this binding by, `<owner>.<role>`:
508
+ * `undo.key`, `rect.drag`, `nudge.left.big`. Without one it is its owner and
509
+ * its position (`<entry>#<n>`, `<action>@<n>`), which moves when the defaults
510
+ * are reordered, so a binding a host may persist an override for declares one. */
511
+ id?: string;
507
512
  /** Gesture behaviors the action's own invoker runs. Routing carries the
508
513
  * array to the action and never reads an element, so the element type is
509
514
  * open here; `@weasel-js/core` narrows it. */
@@ -696,6 +701,63 @@ interface BindingSource {
696
701
  */
697
702
  declare function actionBindings(action: BindingSource): GestureBinding[];
698
703
 
704
+ /** What a key no open keymap binds does: `'modal'` swallows it and leaves the
705
+ * keymap open; `'cascade'` closes the keymap and dispatches it as if none were. */
706
+ type KeymapUnbound = 'modal' | 'cascade';
707
+ /** What holds a level opened with `{ hold: true }` open: no key releases it, so it closes on Escape. */
708
+ declare const KEYMAP_HOLD = "hold";
709
+ /** One open level of a {@link KeymapStack}. */
710
+ interface OpenKeymap {
711
+ readonly id: string;
712
+ readonly label: string;
713
+ /** The keymap's bindings as declared, for a hint to list. */
714
+ readonly bindings: readonly GestureBinding[];
715
+ /** The gesture id of the leader holding this level open, while it is held,
716
+ * or {@link KEYMAP_HOLD}. */
717
+ readonly heldBy?: string;
718
+ /** Whether input arrived while the leader was held, so its release closes the level. */
719
+ readonly usedWhileHeld: boolean;
720
+ }
721
+ /** What the keymaps made of the raw input in progress: `'taken'` when one of
722
+ * them handled it, `'cascaded'` when it went on past them, `null` before either. */
723
+ type KeymapVerdict = 'taken' | 'cascaded' | null;
724
+ /** The keymaps open on one surface, innermost last; a canvas's `keymaps` dep. */
725
+ interface KeymapStack {
726
+ /** Every open level, outermost first. */
727
+ open(): readonly OpenKeymap[];
728
+ innermost(): OpenKeymap | null;
729
+ /** Open a level. `heldBy` names what holds it open; `bindings` are what a hint lists. */
730
+ push(id: string, label: string, opts?: {
731
+ heldBy?: string;
732
+ bindings?: readonly GestureBinding[];
733
+ }): void;
734
+ /** Mark the levels the last raw input opened as held by `heldBy`: the key
735
+ * that opened them is still down. False when it opened none. */
736
+ holdOpened(heldBy: string): boolean;
737
+ /** The leader `heldBy` came up: close its level, those above it and the
738
+ * tapped ones beneath it if input arrived meanwhile, else leave it open
739
+ * for one more input. */
740
+ release(heldBy: string): void;
741
+ /** Close the innermost level: Escape. */
742
+ closeInnermost(): void;
743
+ /** One of the keymaps took this input, or a pointer gesture went past them.
744
+ * Marks held levels used and closes once-levels down to the innermost held one. */
745
+ inputSeen(): void;
746
+ /** A key no keymap binds was swallowed: held levels count it as input, and nothing closes. */
747
+ swallowed(): void;
748
+ /** This input went on past the keymaps: as `inputSeen`, remembered as a cascade. */
749
+ cascaded(): void;
750
+ /** What the keymaps made of the input in progress. */
751
+ verdict(): KeymapVerdict;
752
+ closeAll(): void;
753
+ /** Run `fn` as one raw input: closes made inside apply when it returns. Nests. */
754
+ batch<T>(fn: () => T): T;
755
+ subscribe(listener: () => void): () => void;
756
+ getVersion(): number;
757
+ }
758
+ /** An empty {@link KeymapStack}. `useGestureDispatcher` makes one per surface. */
759
+ declare function createKeymapStack(): KeymapStack;
760
+
699
761
  /**
700
762
  * Re-exports the pure matcher primitives from `@weasel-js/gestures` and layers
701
763
  * the actions-layer binding-scope / matchBest logic on top.
@@ -1249,9 +1311,10 @@ interface Carried {
1249
1311
  };
1250
1312
  }
1251
1313
  /**
1252
- * Closed enum of reasons an action might report itself as disabled. The
1253
- * consumer (palette, menu, etc.) maps these symbolic values to display
1254
- * strings via its own label map.
1314
+ * The kit's symbolic reasons an action might report itself as disabled. The
1315
+ * consumer (palette, menu, etc.) maps these to display strings via its own
1316
+ * label map. An action may also answer with any other string, which is
1317
+ * display text and shown as is — see {@link ActionUnavailable}.
1255
1318
  */
1256
1319
  declare const ActionDisabledReason: {
1257
1320
  readonly SelectionRequired: "selection-required";
@@ -1262,6 +1325,9 @@ declare const ActionDisabledReason: {
1262
1325
  };
1263
1326
  /** Why an action is unavailable right now. */
1264
1327
  type ActionDisabledReason = (typeof ActionDisabledReason)[keyof typeof ActionDisabledReason];
1328
+ /** What `enabled` answers with when the action cannot run: one of the
1329
+ * symbolic {@link ActionDisabledReason}s, or a sentence to show as it is. */
1330
+ type ActionUnavailable = ActionDisabledReason | (string & {});
1265
1331
  /**
1266
1332
  * What a palette, menu or toolbar renders for an action. No part of this is
1267
1333
  * read during dispatch.
@@ -1334,7 +1400,8 @@ interface ActionDispatch extends BindingSource {
1334
1400
  scope?: 'hotkey';
1335
1401
  /**
1336
1402
  * Optional predicate saying whether the action can run right now. Return
1337
- * `true` when it can, or an `ActionDisabledReason` when it cannot. The
1403
+ * `true` when it can, or an `ActionDisabledReason` or a sentence of display
1404
+ * text when it cannot. The
1338
1405
  * command palette greys out a disabled row, skips it in keyboard nav,
1339
1406
  * ignores clicks, and shows the reason next to the label. The dispatcher
1340
1407
  * skips a disabled action too, on a key as on a pointer, and falls through
@@ -1370,7 +1437,7 @@ interface ActionDispatch extends BindingSource {
1370
1437
  enabled?: (deps?: ActionDeps, at?: {
1371
1438
  x: number;
1372
1439
  y: number;
1373
- }, carried?: Carried) => true | ActionDisabledReason;
1440
+ }, carried?: Carried) => true | ActionUnavailable;
1374
1441
  /**
1375
1442
  * Whether the action reads as held down right now: bold on the selected
1376
1443
  * text, snapping switched on. A toolbar button draws it as pressed.
@@ -1521,6 +1588,8 @@ interface MenuOpenRequest {
1521
1588
  client: Point;
1522
1589
  /** Viewport rect of the button the menu hangs from: placed below it, or above when below does not fit. */
1523
1590
  under?: Rect;
1591
+ /** With `under`: opens above the button when it fits there, below when it does not. The canvas HUD menu host places below only and ignores it. */
1592
+ above?: boolean;
1524
1593
  /** World point, passed to `enabled` and to every item. */
1525
1594
  world?: Point;
1526
1595
  params?: Record<string, unknown>;
@@ -1532,6 +1601,8 @@ interface OpenMenu {
1532
1601
  entries: readonly MenuEntry[];
1533
1602
  client: Point;
1534
1603
  under?: Rect;
1604
+ /** `MenuOpenRequest.above`, carried to the renderer. */
1605
+ above?: boolean;
1535
1606
  world?: Point;
1536
1607
  source: 'pointer' | 'keyboard';
1537
1608
  }
@@ -1769,7 +1840,7 @@ declare function matchActionItem(item: ActionItem, query: string): QueryMatch |
1769
1840
  */
1770
1841
  interface ActionEnabledResult {
1771
1842
  enabled: boolean;
1772
- reason?: ActionDisabledReason;
1843
+ reason?: ActionUnavailable;
1773
1844
  }
1774
1845
  /**
1775
1846
  * Safely evaluate an action's `enabled` predicate. Returns `{enabled: true}`
@@ -1853,6 +1924,29 @@ declare function createDepRegistry(): DepRegistry;
1853
1924
  /** Build the deps bag for an action from its declared `requires`. */
1854
1925
  declare function buildDepsFromRequires(action: Action, depRegistry: DepRegistry): ActionDeps;
1855
1926
 
1927
+ /**
1928
+ * Binding overrides: a host's replacements for bindings it did not write,
1929
+ * keyed by binding id. An override replaces or removes one binding, on an
1930
+ * action or on a contribution alike; adding a key beside the defaults is
1931
+ * `tune`'s job.
1932
+ */
1933
+
1934
+ /** Overrides by binding id: a route string or spec to bind instead, or `null` to unbind. */
1935
+ type BindingOverrides = Readonly<Record<string, BindingOverrideInput>>;
1936
+ /** Overrides read into specs, one per binding id. */
1937
+ type ResolvedBindingOverrides = ReadonlyMap<string, GestureSpec | null>;
1938
+ /** A binding's id: its declared `opts.id`, else its owner and its position
1939
+ * there — `<entry>#<n>` for an entry's binding (`ownerId`), `<action>@<n>` for
1940
+ * an action's own (`ownerId` null), so an entry and an action of one id never
1941
+ * share a derived id. */
1942
+ declare function bindingId(b: GestureBinding, ownerId: string | null, index: number): string;
1943
+ /** Merge override maps into one, a later map winning per id. A route string
1944
+ * that does not parse is skipped with a warning, leaving the binding as it was. */
1945
+ declare function resolveBindingOverrides(maps: readonly BindingOverrides[]): ResolvedBindingOverrides;
1946
+ /** The bindings `ownerId` declares, each under its override, the unbound ones
1947
+ * left out: what dispatch routes by. A `null` owner is an action's own. */
1948
+ declare function overriddenBindings(bindings: readonly GestureBinding[], ownerId: string | null, overrides?: ResolvedBindingOverrides): GestureBinding[];
1949
+
1856
1950
  /** Hotkey-slot trigger key. The slot is engaged while this key is held —
1857
1951
  * hence "hotkey": active as long as the key is hot. Omitted means the tool
1858
1952
  * is not eligible for the hotkey slot.
@@ -1899,6 +1993,12 @@ interface Eligibility {
1899
1993
  claimed?: boolean;
1900
1994
  /** Modality filter, applied wherever it would otherwise be live. */
1901
1995
  capabilities?: CapabilityTag[];
1996
+ /** A keymap: live only while it is the innermost one open, at the hotkey
1997
+ * tier. `unbound` overrides the `gestures.keymapUnbound` kit setting for
1998
+ * this keymap. Open one with a leader (`keymapContribution`). */
1999
+ keymap?: true | {
2000
+ unbound?: KeymapUnbound;
2001
+ };
1902
2002
  }
1903
2003
  /**
1904
2004
  * Where an entry's overlay sits in the layer stack, relative to the
@@ -1996,6 +2096,17 @@ interface DispatcherContext {
1996
2096
  * is, the rest only while it holds them. Absent, every binding is live.
1997
2097
  */
1998
2098
  keyReach?: KeyReach;
2099
+ /** The keymaps open on this surface. Absent: none can open. */
2100
+ keymaps?: KeymapStack;
2101
+ /** Which bindings this pass of an input reaches while a keymap is open:
2102
+ * `'only'` the innermost keymap's, `'none'` everything but it. Absent: both. */
2103
+ keymapPass?: 'only' | 'none';
2104
+ /** What a key no open keymap binds does, unless the keymap says: the
2105
+ * `gestures.keymapUnbound` kit setting. Default `'modal'`. */
2106
+ leaderUnbound?: KeymapUnbound;
2107
+ /** The binding overrides in force, read per input, for contribution bindings;
2108
+ * the registry lays them over actions' own. Absent overrides nothing. */
2109
+ bindingOverrides?: () => ResolvedBindingOverrides;
1999
2110
  /** Where the dispatcher records how it resolved each input. Absent records nothing. */
2000
2111
  trace?: DispatchTrace;
2001
2112
  }
@@ -2300,6 +2411,12 @@ interface ActionsRegistry {
2300
2411
  * passes `given`: every tuning's params, `given` laid over them. What a
2301
2412
  * tool's chrome reads to show what the action it binds will do. */
2302
2413
  paramsOf(id: string, given?: Record<string, unknown>): Record<string, unknown>;
2414
+ /** Replace or remove bindings by id, here and in scopes below. Holders
2415
+ * merge: an inner scope's beats an outer one's, and a later one beats an
2416
+ * earlier one in the same scope. Returns a release. See {@link BindingOverrides}. */
2417
+ overrideBindings(overrides: BindingOverrides): () => void;
2418
+ /** Every override in force from this scope, read into specs. */
2419
+ bindingOverrides(): ResolvedBindingOverrides;
2303
2420
  list(): readonly Action[];
2304
2421
  /** Fire an immediate-invoker action by id. The optional `params` arg is
2305
2422
  * forwarded to `ImmediateInvoker.run` as its second argument — use it for
@@ -2381,8 +2498,8 @@ interface ToolOffhandBindingSpec {
2381
2498
  declare function offhandKeyFor(trigger: HotkeyTrigger): string;
2382
2499
  /** Build the per-tool `BoundGesture` list for the consolidated action's
2383
2500
  * `defaultBinding`. Each entry pairs a `key-held` spec with
2384
- * `opts.params.toolId` so the invoker's `start` can pick out which tool
2385
- * to engage.
2501
+ * `opts.params.toolId`, so the invoker's `start` can pick out which tool
2502
+ * to engage, and is overridden as `tool.offhand.<toolId>`.
2386
2503
  *
2387
2504
  * An offhand tool engages only between gestures. Swapping the tool out
2388
2505
  * mid-drag would cancel the drag, and the key is free for the gesture's own
@@ -2542,6 +2659,7 @@ declare function createLongPressStore(): LongPressStore;
2542
2659
  * The `gestures` kit settings area. Declared here rather than in core because
2543
2660
  * the dispatcher reads it, and routing sits below core.
2544
2661
  */
2662
+
2545
2663
  /** Pointer gesture timings and travel; each falls back to its constant in `@weasel-js/gestures`. */
2546
2664
  interface GestureKitSettings {
2547
2665
  /** Longest gap between the clicks of a double click, in ms. */
@@ -2554,6 +2672,9 @@ interface GestureKitSettings {
2554
2672
  tapPx: number;
2555
2673
  /** Travel that makes a press a drag, in CSS px. */
2556
2674
  dragPx: number;
2675
+ /** What a key an open keymap does not bind does: `'modal'` swallows it,
2676
+ * `'cascade'` closes the keymap and lets it through. */
2677
+ keymapUnbound: KeymapUnbound;
2557
2678
  }
2558
2679
  declare module '@weasel-js/react' {
2559
2680
  interface KitSettings {
@@ -2681,6 +2802,8 @@ interface EligibilityState {
2681
2802
  engagedIds?: ReadonlySet<string>;
2682
2803
  /** Whether the active mode allows these capability tags. Omitted → allow. */
2683
2804
  allows?: (tags: readonly CapabilityTag[]) => boolean;
2805
+ /** The innermost open keymap's id: the one keymap entry that is live. */
2806
+ openKeymap?: string | null;
2684
2807
  }
2685
2808
  /**
2686
2809
  * The scope tier an entry's bindings are live at, or null when none are.
@@ -2696,7 +2819,7 @@ declare function liveScope(id: string, eligibility: Eligibility, state: Eligibil
2696
2819
  * breaks ties by declaration order, so the caller's entry order decides which
2697
2820
  * of two same-specificity bindings in one tier wins.
2698
2821
  */
2699
- declare function scopeBindings(entries: Iterable<Contribution<unknown>>, state: EligibilityState): ScopedBinding[];
2822
+ declare function scopeBindings(entries: Iterable<Contribution<unknown>>, state: EligibilityState, overrides?: ResolvedBindingOverrides): ScopedBinding[];
2700
2823
  /** What decides which entries are live, and in what order they are walked. */
2701
2824
  interface AssemblyInputs {
2702
2825
  focusedId: string | null;
@@ -2705,6 +2828,8 @@ interface AssemblyInputs {
2705
2828
  /** The capability tags the active mode allows. Omitted: no mode system, so
2706
2829
  * every entry is allowed. */
2707
2830
  allowedCapabilities?: ReadonlySet<CapabilityTag>;
2831
+ /** The innermost open keymap's id, if one is open. */
2832
+ openKeymap?: string | null;
2708
2833
  }
2709
2834
  /**
2710
2835
  * The entry set as routing walks it, with the state that tiers it. The
@@ -2773,6 +2898,126 @@ declare function modeShortcutSpec(shortcut: string): KeySpec;
2773
2898
  */
2774
2899
  declare function modeShortcuts(registry: ModeRegistry, handlers: ModeShortcutHandlers): Contribution<never>;
2775
2900
 
2901
+ /**
2902
+ * A keymap and the leader that opens it, from one definition. The keymap is an
2903
+ * entry whose bindings are live only while it is open; the leader is an
2904
+ * action on the hotkey tier, so it outranks what the active tool binds to the
2905
+ * same key, and it opens the keymap mid-gesture as well as between them.
2906
+ */
2907
+
2908
+ /** What {@link keymapContribution} builds a keymap and its leader from. */
2909
+ interface KeymapDef<TOverlay = never> {
2910
+ /** The keymap entry's id. Its leader action is `keymap.<id>`. */
2911
+ id: string;
2912
+ /** What the hint and a shortcut chip call it: `Loupe ▸ 2`. */
2913
+ label: string;
2914
+ /** The keystroke, or keystrokes, that open it. A `key-held` spec is read as
2915
+ * its `key` form: holding the key is what holds the keymap open. */
2916
+ leader: GestureSpec | readonly GestureSpec[];
2917
+ /** The keymap's own bindings. Escape is not one: it always closes the keymap. */
2918
+ bindings: readonly GestureBinding[];
2919
+ /** Actions the bindings name that are not registered elsewhere. */
2920
+ actions?: readonly Action[];
2921
+ /** Overrides the `gestures.keymapUnbound` kit setting for this keymap. */
2922
+ unbound?: KeymapUnbound;
2923
+ /** Drawn while the keymap is open. */
2924
+ overlay?: TOverlay | TOverlay[];
2925
+ overlayPosition?: OverlayPosition;
2926
+ }
2927
+ /** The leader action's id for keymap `id`. */
2928
+ declare const keymapLeaderId: (id: string) => string;
2929
+ /** The binding id of a keymap's leader — what a binding override rebinds it by.
2930
+ * A second leader key is `<id>#1`, and so on. */
2931
+ declare const keymapLeaderBindingId: (id: string, index?: number) => string;
2932
+ /** `[keymap entry, leader entry]`. Triggered without a key, the leader opens
2933
+ * its keymap tapped; `trigger('keymap.<id>', { hold: true })` holds it open
2934
+ * until Escape. Install both, with `<SceneCanvas ambient>`
2935
+ * or `useTools`'s `ambient`; the leader entry carries the actions. */
2936
+ declare function keymapContribution<TOverlay = never>(def: KeymapDef<TOverlay>): Contribution<TOverlay>[];
2937
+
2938
+ /** One row of a keymap's hint: a key chip, or a pointer gesture in words, and what it does. */
2939
+ interface KeymapRow {
2940
+ shortcut?: MenuShortcut;
2941
+ gesture?: string;
2942
+ label: string;
2943
+ }
2944
+ /** An open keymap as a hint shows it: {@link describeKeymap}'s result. */
2945
+ interface KeymapDescription {
2946
+ id: string;
2947
+ label: string;
2948
+ /** Whether a held leader is keeping it open. */
2949
+ held: boolean;
2950
+ rows: readonly KeymapRow[];
2951
+ }
2952
+ /** The rows a hint lists for an open keymap, under the overrides in force. */
2953
+ declare function describeKeymap(level: OpenKeymap, actions: readonly Action[], overrides?: ResolvedBindingOverrides): KeymapDescription;
2954
+ /**
2955
+ * Every key in `def` as a menu chip, by action id, each carrying the path
2956
+ * through its leader (`Loupe ▸ 2`), under `overrides`. A keymap with no key
2957
+ * leader gives its keys no path.
2958
+ */
2959
+ declare function keymapShortcuts(def: KeymapDef, overrides?: ResolvedBindingOverrides): ReadonlyMap<string, readonly MenuShortcut[]>;
2960
+
2961
+ /** Options for {@link captureKey}. */
2962
+ interface CaptureKeyOptions {
2963
+ /** Capture the held form, `key-held`, rather than the keystroke. */
2964
+ held?: boolean;
2965
+ /** Stop listening and resolve `null`. */
2966
+ signal?: AbortSignal;
2967
+ /** Whether Cmd is Mod. Defaults to the detected platform. */
2968
+ apple?: boolean;
2969
+ }
2970
+ /**
2971
+ * The next keystroke on `target` as a key spec: {@link captureGesture} taking
2972
+ * a keystroke alone, and leaving the pointer to the page. A bare modifier is
2973
+ * waited past. Write the result with `keySpecRoute` to persist it as a binding
2974
+ * override.
2975
+ */
2976
+ declare function captureKey(target: EventTarget, opts?: CaptureKeyOptions): Promise<KeySpec | KeyHeldSpec | null>;
2977
+
2978
+ /** A spec kind a binding editor can capture. */
2979
+ type CaptureKind = 'key' | 'key-held' | 'click' | 'doubleClick' | 'drag' | 'contextMenu';
2980
+ /** What `captureGesture` resolves to. */
2981
+ type CapturedSpec = KeySpec | KeyHeldSpec | ClickSpec | DoubleClickSpec | DragSpec | ContextMenuSpec;
2982
+
2983
+ /** The click-and-drag thresholds a capture reads, each defaulting to its constant. */
2984
+ interface CaptureThresholds {
2985
+ dragPx?: number;
2986
+ doubleClickMs?: number;
2987
+ doubleClickPx?: number;
2988
+ }
2989
+
2990
+ /** Options for {@link captureGesture}. */
2991
+ interface CaptureGestureOptions extends CaptureThresholds {
2992
+ /** The kinds to take; input of any other kind is waited past. A keystroke
2993
+ * is taken as `key` when both `key` and `key-held` are listed. Defaults to
2994
+ * `key`, `click`, `doubleClick`, `drag` and `contextMenu`. */
2995
+ kinds?: readonly CaptureKind[];
2996
+ /** Stop listening and resolve `null`. */
2997
+ signal?: AbortSignal;
2998
+ /** Whether Cmd is Mod. Defaults to the detected platform. */
2999
+ apple?: boolean;
3000
+ /** Travel that makes a press a drag, in CSS px: pass the `gestures.dragPx`
3001
+ * kit setting. Defaults to `DRAG_THRESHOLD_PX`. */
3002
+ dragPx?: number;
3003
+ /** The `gestures.doubleClickMs` kit setting. Defaults to `DOUBLE_CLICK_MAX_MS`. */
3004
+ doubleClickMs?: number;
3005
+ /** The `gestures.doubleClickPx` kit setting. Defaults to `DOUBLE_CLICK_MAX_PX`. */
3006
+ doubleClickPx?: number;
3007
+ }
3008
+ /**
3009
+ * The next input on `target` of one of `opts.kinds`, as a gesture spec, for a
3010
+ * binding editor: its modifiers with the platform's primary one as `mod`. A
3011
+ * press is told a click or a drag by the dispatcher's own recognizer, at its
3012
+ * drag threshold; a click is held back for a double click only when both are
3013
+ * asked for. A bare modifier key is waited past. Escape, or an abort, resolves
3014
+ * `null`. What it takes is `preventDefault`ed and stopped, the click a browser
3015
+ * follows a press with included, so nothing else acts on it. The pointer is
3016
+ * left alone when no pointer kind is asked for, and keys other than Escape
3017
+ * when no key kind is.
3018
+ */
3019
+ declare function captureGesture(target: EventTarget, opts?: CaptureGestureOptions): Promise<CapturedSpec | null>;
3020
+
2776
3021
  /**
2777
3022
  * A tool's activation key, as `ToolDef.keybinding` declares it. Captures
2778
3023
  * only the fields meaningful to a tool-select key —
@@ -3079,6 +3324,9 @@ interface ToolScopes {
3079
3324
  * definition). Two gated actions conflict only when some mode lets both
3080
3325
  * rules hold. Default: the kit's `DEFAULT_MODES`. */
3081
3326
  modes?: readonly ActiveMode[];
3327
+ /** Binding overrides in force, applied to the entries' bindings. Actions are
3328
+ * read as given: an `ActionsRegistry`'s `list()` has applied them already. */
3329
+ overrides?: ResolvedBindingOverrides;
3082
3330
  }
3083
3331
  /**
3084
3332
  * Detect reachable route conflicts in an assembled tool set and report each one.
@@ -3348,6 +3596,8 @@ interface DepSchema {
3348
3596
  menuHost?: MenuHost;
3349
3597
  /** The canvas's dispatch trace, for a dep to record a mode switch into. */
3350
3598
  dispatchTrace?: DispatchTrace;
3599
+ /** The keymaps open on the canvas: what a leader opens and a hint reads. */
3600
+ keymaps?: KeymapStack;
3351
3601
  }
3352
3602
  /** Every dep name declared by anything that has merged into {@link DepSchema}. */
3353
3603
  type DepName = keyof DepSchema;
@@ -3395,4 +3645,4 @@ type KernelOverlay = OverlaySchema extends {
3395
3645
  overlay: infer O;
3396
3646
  } ? O : unknown;
3397
3647
 
3398
- export { type Bounds as $, type Action as A, type BoundGesture as B, type Contribution as C, type DepRegistry as D, type ActionPresentation as E, type ActionSettings as F, type ActionSettingsState as G, type ActionShortcut as H, type ActionSource as I, type ActionTuning as J, type KernelOverlay as K, type LongPressOptions as L, type MenuHost as M, type NodeId as N, type OverlayPosition as O, type ActionTunings as P, type ActionsProp as Q, type RuleCtx as R, ScopeNode as S, ToolNode as T, type AnyTool as U, type AssemblyInputs as V, BROWSER_RESERVED_CHORDS as W, type BindingOpts as X, type BindingScope as Y, type BindingSource as Z, type BodyPredicate as _, type DepName as a, type PointerSessionCallbacks as a$, type BuildRuleCtxArgs as a0, COARSE_TARGET_SCALE as a1, type Carried as a2, type Carry as a3, type CarryCallbacks as a4, type CarryPayload as a5, type CarryPointer as a6, type CarryStage as a7, type Condition as a8, type Conflict as a9, type KeyReach as aA, type LongPressState as aB, type LongPressStore as aC, type MatchOutcome as aD, type MatchResult as aE, type MenuHit as aF, type MenuOpenRequest as aG, type MenuSources as aH, type MenuWhen as aI, type ModeShortcutHandlers as aJ, type ModeSwitchLogEntry as aK, type ModifierRole as aL, type ModifierRoles as aM, type ModifierState as aN, NEVER as aO, type OngoingHandle as aP, type OngoingInvoker as aQ, type OngoingOverlay as aR, type OpenMenu as aS, type OverlayRole as aT, type OverlaySchema as aU, type OwnedMenuDef as aV, PREDICATE_TARGET as aW, type PendingLongPress as aX, type PlacedBy as aY, type Point2 as aZ, type PointerSession as a_, type ContributionChrome as aa, type ContributionDeps as ab, type ContributionRouting as ac, DEFAULT_ALLOWED_CAPABILITIES as ad, DEFAULT_DEVICE_PROFILE as ae, type DebugSink as af, type DepListing as ag, type DetectedDeviceFacts as ah, type DeviceProfile as ai, type DispatchRecord as aj, type DispatchRecordInput as ak, type DispatcherContext as al, type DragSample as am, type DroppedCandidate as an, type Eligibility as ao, type EligibilityState as ap, type GestureBinding as aq, type GestureKitSettings as ar, type HandleKind as as, type HitShape as at, type HotkeyTrigger as au, INGEST_STRING_MIMES as av, type ImmediateInvoker as aw, type InvocationCtx as ax, type Invoker as ay, type KeyBinding as az, type DepSource as b, evaluateActive as b$, type PointerSessionCancelReason as b0, type PointerSessionOptions as b1, type RankedCandidate as b2, type RecordCandidate as b3, type RegistryEntry as b4, type ReservedChord as b5, type ResizeAnchor as b6, type ResolveAllOptions as b7, type ResolveOnlyResult as b8, type ResolvedCandidate as b9, actionCursor as bA, actionItemTitle as bB, actionItems as bC, actionSettingsParams as bD, actionShortcuts as bE, actionsTagged as bF, admitIngestMime as bG, assembleEntries as bH, browserReservedChord as bI, buildDepsFromRequires as bJ, buildRouteRegistry as bK, buildRuleCtx as bL, buildToolOffhandBindings as bM, clientToCanvas as bN, clientToCanvasRect as bO, createDepRegistry as bP, createDispatchTrace as bQ, createDispatcher as bR, createLongPressStore as bS, createMenuHost as bT, createTraceRing as bU, defineTool as bV, deleteScratch as bW, describeRule as bX, dlog as bY, dwarn as bZ, evaluate as b_, type RoleKeys as ba, type RoleRebinds as bb, type Rule as bc, type ScopedBinding as bd, type ScratchKey as be, type ScratchStore as bf, type SelectionApi as bg, type Selector as bh, type SpecificityPart as bi, TOOL_OFFHAND_ID as bj, type ToolDef as bk, type ToolEntry as bl, type ToolKeybinding as bm, type ToolModifiers as bn, type ToolOffhandBindingSpec as bo, type ToolPresentation as bp, type ToolScopes as bq, type ToolSet as br, type ToolSlot as bs, type TraceLogEntry as bt, type TraceRing as bu, type TunedBinding as bv, type UiOngoingControl as bw, type ViewportGestureKind as bx, type WalkStep as by, actionBindings as bz, type ActionDeps as c, tuneAction as c$, evaluateEnabled as c0, findConflicts as c1, getScratch as c2, heldKeySpec as c3, historyKey as c4, isAnchor as c5, isAnchorOrControl as c6, isBalanceGrip as c7, isBody as c8, isControlHandle as c9, modeShortcutSpec as cA, modeShortcuts as cB, multiTouchGestureId as cC, offhandKeyFor as cD, openPointerSession as cE, overlaysOf as cF, pickMenu as cG, pointerGestureId as cH, readActionSettings as cI, reportRouteConflicts as cJ, resolveDeviceProfile as cK, resolveMenu as cL, resolveParams as cM, resolveSchemaMenu as cN, roleReader as cO, routesForSpec as cP, ruleCanHoldIn as cQ, rulesExclusive as cR, scopeBindings as cS, scratchKey as cT, setScratch as cU, startCarry as cV, taggedActionItems as cW, targetConsultsAffordance as cX, toolIdsOf as cY, toolSet as cZ, toolSetHas as c_, isCornerWidget as ca, isDebugEnabled as cb, isEmpty as cc, isPathEditPart as cd, isResizeHandle as ce, isRotateHandle as cf, isSegment as cg, isSelectedBody as ch, isTool as ci, isToolSet as cj, isUnselectedBody as ck, itemTypesFromDataTransfer as cl, itemsFromClipboardData as cm, itemsFromDataTransfer as cn, itemsFromFiles as co, keySpecShortcut as cp, keysHeld as cq, liveScope as cr, makeToolOffhandAction as cs, matchActionItem as ct, matchBest as cu, matchSorted as cv, matchSortedWithBarred as cw, matchesKeyBinding as cx, mergeContributions as cy, mergeMenuDefs as cz, type ActionsRegistry as d, validateActionDefaultBinding as d0, validateActionId as d1, withoutTools as d2, ActionDisabledReason as e, type ActionVariant as f, type MenuDef as g, DepNode as h, type Tool as i, ActiveToolContextProvider as j, ActiveToolContextProviderIfRoot as k, type ActiveToolContextProviderProps as l, type ActiveToolContextValue as m, useOptionalActiveToolContext as n, type Dispatcher as o, type AffordanceHit as p, type DispatchTrace as q, type DepSchema as r, ALWAYS as s, type ActionDispatch as t, useActiveToolContext as u, type ActionEnabledResult as v, type ActionEntry as w, type ActionItem as x, type ActionParamSchema as y, type ActionParams as z };
3648
+ export { type BindingScope as $, type Action as A, type BoundGesture as B, type Contribution as C, type DepRegistry as D, type ActionParams as E, type ActionPresentation as F, type ActionSettings as G, type ActionSettingsState as H, type ActionShortcut as I, type ActionSource as J, type KeymapDescription as K, type LongPressOptions as L, type MenuHost as M, type NodeId as N, type OverlayPosition as O, type ActionTuning as P, type ActionTunings as Q, type RuleCtx as R, ScopeNode as S, ToolNode as T, type ActionUnavailable as U, type ActionsProp as V, type AnyTool as W, type AssemblyInputs as X, BROWSER_RESERVED_CHORDS as Y, type BindingOpts as Z, type BindingOverrides as _, type DepName as a, NEVER as a$, type BindingSource as a0, type BodyPredicate as a1, type Bounds as a2, type BuildRuleCtxArgs as a3, COARSE_TARGET_SCALE as a4, type CaptureGestureOptions as a5, type CaptureKeyOptions as a6, type CaptureKind as a7, type CapturedSpec as a8, type Carried as a9, type HitShape as aA, type HotkeyTrigger as aB, INGEST_STRING_MIMES as aC, type ImmediateInvoker as aD, type InvocationCtx as aE, type Invoker as aF, KEYMAP_HOLD as aG, type KeyBinding as aH, type KeyReach as aI, type KeymapDef as aJ, type KeymapRow as aK, type KeymapStack as aL, type KeymapUnbound as aM, type KeymapVerdict as aN, type LongPressState as aO, type LongPressStore as aP, type MatchOutcome as aQ, type MatchResult as aR, type MenuHit as aS, type MenuOpenRequest as aT, type MenuSources as aU, type MenuWhen as aV, type ModeShortcutHandlers as aW, type ModeSwitchLogEntry as aX, type ModifierRole as aY, type ModifierRoles as aZ, type ModifierState as a_, type Carry as aa, type CarryCallbacks as ab, type CarryPayload as ac, type CarryPointer as ad, type CarryStage as ae, type Condition as af, type Conflict as ag, type ContributionChrome as ah, type ContributionDeps as ai, type ContributionRouting as aj, DEFAULT_ALLOWED_CAPABILITIES as ak, DEFAULT_DEVICE_PROFILE as al, type DebugSink as am, type DepListing as an, type DetectedDeviceFacts as ao, type DeviceProfile as ap, type DispatchRecord as aq, type DispatchRecordInput as ar, type DispatcherContext as as, type DragSample as at, type DroppedCandidate as au, type Eligibility as av, type EligibilityState as aw, type GestureBinding as ax, type GestureKitSettings as ay, type HandleKind as az, type DepSource as b, buildRuleCtx as b$, type OngoingHandle as b0, type OngoingInvoker as b1, type OngoingOverlay as b2, type OpenKeymap as b3, type OpenMenu as b4, type OverlayRole as b5, type OverlaySchema as b6, type OwnedMenuDef as b7, PREDICATE_TARGET as b8, type PendingLongPress as b9, type ToolEntry as bA, type ToolKeybinding as bB, type ToolModifiers as bC, type ToolOffhandBindingSpec as bD, type ToolPresentation as bE, type ToolScopes as bF, type ToolSet as bG, type ToolSlot as bH, type TraceLogEntry as bI, type TraceRing as bJ, type TunedBinding as bK, type UiOngoingControl as bL, type ViewportGestureKind as bM, type WalkStep as bN, actionBindings as bO, actionCursor as bP, actionItemTitle as bQ, actionItems as bR, actionSettingsParams as bS, actionShortcuts as bT, actionsTagged as bU, admitIngestMime as bV, assembleEntries as bW, bindingId as bX, browserReservedChord as bY, buildDepsFromRequires as bZ, buildRouteRegistry as b_, type PlacedBy as ba, type Point2 as bb, type PointerSession as bc, type PointerSessionCallbacks as bd, type PointerSessionCancelReason as be, type PointerSessionOptions as bf, type RankedCandidate as bg, type RecordCandidate as bh, type RegistryEntry as bi, type ReservedChord as bj, type ResizeAnchor as bk, type ResolveAllOptions as bl, type ResolveOnlyResult as bm, type ResolvedBindingOverrides as bn, type ResolvedCandidate as bo, type RoleKeys as bp, type RoleRebinds as bq, type Rule as br, type ScopedBinding as bs, type ScratchKey as bt, type ScratchStore as bu, type SelectionApi as bv, type Selector as bw, type SpecificityPart as bx, TOOL_OFFHAND_ID as by, type ToolDef as bz, type ActionDeps as c, offhandKeyFor as c$, buildToolOffhandBindings as c0, captureGesture as c1, captureKey as c2, clientToCanvas as c3, clientToCanvasRect as c4, createDepRegistry as c5, createDispatchTrace as c6, createDispatcher as c7, createKeymapStack as c8, createLongPressStore as c9, isSegment as cA, isSelectedBody as cB, isTool as cC, isToolSet as cD, isUnselectedBody as cE, itemTypesFromDataTransfer as cF, itemsFromClipboardData as cG, itemsFromDataTransfer as cH, itemsFromFiles as cI, keySpecShortcut as cJ, keymapContribution as cK, keymapLeaderBindingId as cL, keymapLeaderId as cM, keymapShortcuts as cN, keysHeld as cO, liveScope as cP, makeToolOffhandAction as cQ, matchActionItem as cR, matchBest as cS, matchSorted as cT, matchSortedWithBarred as cU, matchesKeyBinding as cV, mergeContributions as cW, mergeMenuDefs as cX, modeShortcutSpec as cY, modeShortcuts as cZ, multiTouchGestureId as c_, createMenuHost as ca, createTraceRing as cb, defineTool as cc, deleteScratch as cd, describeKeymap as ce, describeRule as cf, dlog as cg, dwarn as ch, evaluate as ci, evaluateActive as cj, evaluateEnabled as ck, findConflicts as cl, getScratch as cm, heldKeySpec as cn, historyKey as co, isAnchor as cp, isAnchorOrControl as cq, isBalanceGrip as cr, isBody as cs, isControlHandle as ct, isCornerWidget as cu, isDebugEnabled as cv, isEmpty as cw, isPathEditPart as cx, isResizeHandle as cy, isRotateHandle as cz, type ActionsRegistry as d, openPointerSession as d0, overlaysOf as d1, overriddenBindings as d2, pickMenu as d3, pointerGestureId as d4, readActionSettings as d5, reportRouteConflicts as d6, resolveBindingOverrides as d7, resolveDeviceProfile as d8, resolveMenu as d9, resolveParams as da, resolveSchemaMenu as db, roleReader as dc, routesForSpec as dd, ruleCanHoldIn as de, rulesExclusive as df, scopeBindings as dg, scratchKey as dh, setScratch as di, startCarry as dj, taggedActionItems as dk, targetConsultsAffordance as dl, toolIdsOf as dm, toolSet as dn, toolSetHas as dp, tuneAction as dq, validateActionDefaultBinding as dr, validateActionId as ds, withoutTools as dt, ActionDisabledReason as e, type ActionVariant as f, type MenuDef as g, DepNode as h, type KernelOverlay as i, type Tool as j, ActiveToolContextProvider as k, ActiveToolContextProviderIfRoot as l, type ActiveToolContextProviderProps as m, type ActiveToolContextValue as n, useOptionalActiveToolContext as o, type Dispatcher as p, type AffordanceHit as q, type DispatchTrace as r, type DepSchema as s, ALWAYS as t, useActiveToolContext as u, type ActionDispatch as v, type ActionEnabledResult as w, type ActionEntry as x, type ActionItem as y, type ActionParamSchema as z };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { s as ALWAYS, A as Action, c as ActionDeps, e as ActionDisabledReason, e as ActionDisabledReasonValue, t as ActionDispatch, v as ActionEnabledResult, w as ActionEntry, x as ActionItem, y as ActionParamSchema, z as ActionParams, E as ActionPresentation, F as ActionSettings, G as ActionSettingsState, H as ActionShortcut, I as ActionSource, J as ActionTuning, P as ActionTunings, f as ActionVariant, Q as ActionsProp, d as ActionsRegistry, p as AffordanceHit, U as AnyTool, V as AssemblyInputs, W as BROWSER_RESERVED_CHORDS, X as BindingOpts, Y as BindingScope, Z as BindingSource, _ as BodyPredicate, B as BoundGesture, $ as Bounds, a0 as BuildRuleCtxArgs, a1 as COARSE_TARGET_SCALE, a2 as Carried, a3 as Carry, a4 as CarryCallbacks, a5 as CarryPayload, a6 as CarryPointer, a7 as CarryStage, a8 as Condition, a9 as Conflict, C as Contribution, aa as ContributionChrome, ab as ContributionDeps, ac as ContributionRouting, ad as DEFAULT_ALLOWED_CAPABILITIES, ae as DEFAULT_DEVICE_PROFILE, af as DebugSink, ag as DepListing, a as DepName, D as DepRegistry, r as DepSchema, b as DepSource, ah as DetectedDeviceFacts, ai as DeviceProfile, aj as DispatchRecord, ak as DispatchRecordInput, q as DispatchTrace, o as Dispatcher, al as DispatcherContext, am as DragSample, an as DroppedCandidate, ao as Eligibility, ap as EligibilityState, aq as GestureBinding, ar as GestureKitSettings, as as HandleKind, at as HitShape, au as HotkeyTrigger, av as INGEST_STRING_MIMES, aw as ImmediateInvoker, ax as InvocationCtx, ay as Invoker, K as KernelOverlay, az as KeyBinding, aA as KeyReach, L as LongPressOptions, aB as LongPressState, aC as LongPressStore, aD as MatchOutcome, aE as MatchResult, g as MenuDef, aF as MenuHit, M as MenuHost, aG as MenuOpenRequest, aH as MenuSources, aI as MenuWhen, aJ as ModeShortcutHandlers, aK as ModeSwitchLogEntry, aL as ModifierRole, aM as ModifierRoles, aN as ModifierState, aO as NEVER, N as NodeId, aP as OngoingHandle, aQ as OngoingInvoker, aR as OngoingOverlay, aS as OpenMenu, O as OverlayPosition, aT as OverlayRole, aU as OverlaySchema, aV as OwnedMenuDef, aW as PREDICATE_TARGET, aX as PendingLongPress, aY as PlacedBy, aZ as Point2, a_ as PointerSession, a$ as PointerSessionCallbacks, b0 as PointerSessionCancelReason, b1 as PointerSessionOptions, b2 as RankedCandidate, b3 as RecordCandidate, b4 as RegistryEntry, b5 as ReservedChord, b6 as ResizeAnchor, b7 as ResolveAllOptions, b8 as ResolveOnlyResult, b9 as ResolvedCandidate, ba as RoleKeys, bb as RoleRebinds, bc as Rule, R as RuleCtx, bd as ScopedBinding, be as ScratchKey, bf as ScratchStore, bg as SelectionApi, bh as Selector, bi as SpecificityPart, bj as TOOL_OFFHAND_ID, i as Tool, bk as ToolDef, bl as ToolEntry, bm as ToolKeybinding, bn as ToolModifiers, bo as ToolOffhandBindingSpec, bp as ToolPresentation, bq as ToolScopes, br as ToolSet, bs as ToolSlot, bt as TraceLogEntry, bu as TraceRing, bv as TunedBinding, bw as UiOngoingControl, bx as ViewportGestureKind, by as WalkStep, bz as actionBindings, bA as actionCursor, bB as actionItemTitle, bC as actionItems, bD as actionSettingsParams, bE as actionShortcuts, bF as actionsTagged, bG as admitIngestMime, bH as assembleEntries, bI as browserReservedChord, bJ as buildDepsFromRequires, bK as buildRouteRegistry, bL as buildRuleCtx, bM as buildToolOffhandBindings, bN as clientToCanvas, bO as clientToCanvasRect, bP as createDepRegistry, bQ as createDispatchTrace, bR as createDispatcher, bS as createLongPressStore, bT as createMenuHost, bU as createTraceRing, bV as defineTool, bW as deleteScratch, bX as describeRule, bY as dlog, bZ as dwarn, b_ as evaluate, b$ as evaluateActive, c0 as evaluateEnabled, c1 as findConflicts, c2 as getScratch, c3 as heldKeySpec, c4 as historyKey, c5 as isAnchor, c6 as isAnchorOrControl, c7 as isBalanceGrip, c8 as isBody, c9 as isControlHandle, ca as isCornerWidget, cb as isDebugEnabled, cc as isEmpty, cd as isPathEditPart, ce as isResizeHandle, cf as isRotateHandle, cg as isSegment, ch as isSelectedBody, ci as isTool, cj as isToolSet, ck as isUnselectedBody, cl as itemTypesFromDataTransfer, cm as itemsFromClipboardData, cn as itemsFromDataTransfer, co as itemsFromFiles, cp as keySpecShortcut, cq as keysHeld, cr as liveScope, cs as makeToolOffhandAction, ct as matchActionItem, cu as matchBest, cv as matchSorted, cw as matchSortedWithBarred, cx as matchesKeyBinding, cy as mergeContributions, cz as mergeMenuDefs, cA as modeShortcutSpec, cB as modeShortcuts, cC as multiTouchGestureId, cD as offhandKeyFor, cE as openPointerSession, cF as overlaysOf, cG as pickMenu, cH as pointerGestureId, cI as readActionSettings, cJ as reportRouteConflicts, cK as resolveDeviceProfile, cL as resolveMenu, cM as resolveParams, cN as resolveSchemaMenu, cO as roleReader, cP as routesForSpec, cQ as ruleCanHoldIn, cR as rulesExclusive, cS as scopeBindings, cT as scratchKey, cU as setScratch, cV as startCarry, cW as taggedActionItems, cX as targetConsultsAffordance, cY as toolIdsOf, cZ as toolSet, c_ as toolSetHas, c$ as tuneAction, d0 as validateActionDefaultBinding, d1 as validateActionId, d2 as withoutTools } from './index-Cb7ehEks.js';
1
+ export { t as ALWAYS, A as Action, c as ActionDeps, e as ActionDisabledReason, e as ActionDisabledReasonValue, v as ActionDispatch, w as ActionEnabledResult, x as ActionEntry, y as ActionItem, z as ActionParamSchema, E as ActionParams, F as ActionPresentation, G as ActionSettings, H as ActionSettingsState, I as ActionShortcut, J as ActionSource, P as ActionTuning, Q as ActionTunings, U as ActionUnavailable, f as ActionVariant, V as ActionsProp, d as ActionsRegistry, q as AffordanceHit, W as AnyTool, X as AssemblyInputs, Y as BROWSER_RESERVED_CHORDS, Z as BindingOpts, _ as BindingOverrides, $ as BindingScope, a0 as BindingSource, a1 as BodyPredicate, B as BoundGesture, a2 as Bounds, a3 as BuildRuleCtxArgs, a4 as COARSE_TARGET_SCALE, a5 as CaptureGestureOptions, a6 as CaptureKeyOptions, a7 as CaptureKind, a8 as CapturedSpec, a9 as Carried, aa as Carry, ab as CarryCallbacks, ac as CarryPayload, ad as CarryPointer, ae as CarryStage, af as Condition, ag as Conflict, C as Contribution, ah as ContributionChrome, ai as ContributionDeps, aj as ContributionRouting, ak as DEFAULT_ALLOWED_CAPABILITIES, al as DEFAULT_DEVICE_PROFILE, am as DebugSink, an as DepListing, a as DepName, D as DepRegistry, s as DepSchema, b as DepSource, ao as DetectedDeviceFacts, ap as DeviceProfile, aq as DispatchRecord, ar as DispatchRecordInput, r as DispatchTrace, p as Dispatcher, as as DispatcherContext, at as DragSample, au as DroppedCandidate, av as Eligibility, aw as EligibilityState, ax as GestureBinding, ay as GestureKitSettings, az as HandleKind, aA as HitShape, aB as HotkeyTrigger, aC as INGEST_STRING_MIMES, aD as ImmediateInvoker, aE as InvocationCtx, aF as Invoker, aG as KEYMAP_HOLD, i as KernelOverlay, aH as KeyBinding, aI as KeyReach, aJ as KeymapDef, K as KeymapDescription, aK as KeymapRow, aL as KeymapStack, aM as KeymapUnbound, aN as KeymapVerdict, L as LongPressOptions, aO as LongPressState, aP as LongPressStore, aQ as MatchOutcome, aR as MatchResult, g as MenuDef, aS as MenuHit, M as MenuHost, aT as MenuOpenRequest, aU as MenuSources, aV as MenuWhen, aW as ModeShortcutHandlers, aX as ModeSwitchLogEntry, aY as ModifierRole, aZ as ModifierRoles, a_ as ModifierState, a$ as NEVER, N as NodeId, b0 as OngoingHandle, b1 as OngoingInvoker, b2 as OngoingOverlay, b3 as OpenKeymap, b4 as OpenMenu, O as OverlayPosition, b5 as OverlayRole, b6 as OverlaySchema, b7 as OwnedMenuDef, b8 as PREDICATE_TARGET, b9 as PendingLongPress, ba as PlacedBy, bb as Point2, bc as PointerSession, bd as PointerSessionCallbacks, be as PointerSessionCancelReason, bf as PointerSessionOptions, bg as RankedCandidate, bh as RecordCandidate, bi as RegistryEntry, bj as ReservedChord, bk as ResizeAnchor, bl as ResolveAllOptions, bm as ResolveOnlyResult, bn as ResolvedBindingOverrides, bo as ResolvedCandidate, bp as RoleKeys, bq as RoleRebinds, br as Rule, R as RuleCtx, bs as ScopedBinding, bt as ScratchKey, bu as ScratchStore, bv as SelectionApi, bw as Selector, bx as SpecificityPart, by as TOOL_OFFHAND_ID, j as Tool, bz as ToolDef, bA as ToolEntry, bB as ToolKeybinding, bC as ToolModifiers, bD as ToolOffhandBindingSpec, bE as ToolPresentation, bF as ToolScopes, bG as ToolSet, bH as ToolSlot, bI as TraceLogEntry, bJ as TraceRing, bK as TunedBinding, bL as UiOngoingControl, bM as ViewportGestureKind, bN as WalkStep, bO as actionBindings, bP as actionCursor, bQ as actionItemTitle, bR as actionItems, bS as actionSettingsParams, bT as actionShortcuts, bU as actionsTagged, bV as admitIngestMime, bW as assembleEntries, bX as bindingId, bY as browserReservedChord, bZ as buildDepsFromRequires, b_ as buildRouteRegistry, b$ as buildRuleCtx, c0 as buildToolOffhandBindings, c1 as captureGesture, c2 as captureKey, c3 as clientToCanvas, c4 as clientToCanvasRect, c5 as createDepRegistry, c6 as createDispatchTrace, c7 as createDispatcher, c8 as createKeymapStack, c9 as createLongPressStore, ca as createMenuHost, cb as createTraceRing, cc as defineTool, cd as deleteScratch, ce as describeKeymap, cf as describeRule, cg as dlog, ch as dwarn, ci as evaluate, cj as evaluateActive, ck as evaluateEnabled, cl as findConflicts, cm as getScratch, cn as heldKeySpec, co as historyKey, cp as isAnchor, cq as isAnchorOrControl, cr as isBalanceGrip, cs as isBody, ct as isControlHandle, cu as isCornerWidget, cv as isDebugEnabled, cw as isEmpty, cx as isPathEditPart, cy as isResizeHandle, cz as isRotateHandle, cA as isSegment, cB as isSelectedBody, cC as isTool, cD as isToolSet, cE as isUnselectedBody, cF as itemTypesFromDataTransfer, cG as itemsFromClipboardData, cH as itemsFromDataTransfer, cI as itemsFromFiles, cJ as keySpecShortcut, cK as keymapContribution, cL as keymapLeaderBindingId, cM as keymapLeaderId, cN as keymapShortcuts, cO as keysHeld, cP as liveScope, cQ as makeToolOffhandAction, cR as matchActionItem, cS as matchBest, cT as matchSorted, cU as matchSortedWithBarred, cV as matchesKeyBinding, cW as mergeContributions, cX as mergeMenuDefs, cY as modeShortcutSpec, cZ as modeShortcuts, c_ as multiTouchGestureId, c$ as offhandKeyFor, d0 as openPointerSession, d1 as overlaysOf, d2 as overriddenBindings, d3 as pickMenu, d4 as pointerGestureId, d5 as readActionSettings, d6 as reportRouteConflicts, d7 as resolveBindingOverrides, d8 as resolveDeviceProfile, d9 as resolveMenu, da as resolveParams, db as resolveSchemaMenu, dc as roleReader, dd as routesForSpec, de as ruleCanHoldIn, df as rulesExclusive, dg as scopeBindings, dh as scratchKey, di as setScratch, dj as startCarry, dk as taggedActionItems, dl as targetConsultsAffordance, dm as toolIdsOf, dn as toolSet, dp as toolSetHas, dq as tuneAction, dr as validateActionDefaultBinding, ds as validateActionId, dt as withoutTools } from './index-CyBCsdie.js';
2
2
  export { CONTROL_SELECTOR, ChannelRef, DRAG_THRESHOLD_PX, DescribeRouteOptions, GESTURE_DESCRIPTORS, GestureArgSpec, GestureDescriptor, GestureName, IngestItem, InputEvent, LONG_PRESS_MS, ModRequirement, ModifierKey, ParsedModifiers, ParsedRoute, PhaseAtom, PhaseContext, RESERVED_ID_NAMES, RESERVED_ID_PREFIXES, ROUTE_FIELD_DEFINITIONS, ROUTE_TERMS, RouteDescriptionPart, RouteFieldName, RouteTermLabel, activatesFocusedControl, canonicalModifiers, collapseShiftPairs, describeRoute, describeRouteParts, focusedControlOwnsKey, formatPhaseAtom, formatRoute, getGestureDescriptor, isEditableTarget, isInControlWithin, isKnownGestureName, matchKey, matchModifiers, matchPhase, matchSpec, matchTarget, parseRoute, pastDragThreshold, routeGestureForSpecKind, specKindForRouteGesture, specificity } from '@weasel-js/gestures';
3
3
  export { SelectionExtendKey, SelectionMode } from '@weasel-js/select';
4
4
  export { View } from '@weasel-js/geom';