@weasel-js/routing 1.11.1 → 1.13.0-rc.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,7 +1,7 @@
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
- import { MenuEntry, Rect, MenuShortcut } from '@weasel-js/menu';
4
+ import { MenuEntry, Rect, MenuSide, MenuShortcut } from '@weasel-js/menu';
5
5
  import { PrefGroup } from '@weasel-js/prefs';
6
6
  import { CapabilityTag, ActiveMode, ModeRegistry } from '@weasel-js/modes';
7
7
  import * as _weasel_js_icons from '@weasel-js/icons';
@@ -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. */
@@ -589,7 +594,9 @@ interface OngoingHandle {
589
594
  * omitted, means "no preview this gesture". An id with no `previewPose`
590
595
  * is shown at its effective pose: an action that publishes its poses to
591
596
  * the scene's pose overrides, as move, resize and rotate do, leaves
592
- * `previewPose` out rather than answering the same pose twice.
597
+ * `previewPose` out rather than answering the same pose twice. `<SceneCanvas>`
598
+ * also shows both answers to the scene as overrides (core's
599
+ * `publishPreviews`), so what derives from a previewed node follows it.
593
600
  */
594
601
  previewIds?(): Iterable<string> | null;
595
602
  previewPose?(id: string): unknown | null;
@@ -696,6 +703,63 @@ interface BindingSource {
696
703
  */
697
704
  declare function actionBindings(action: BindingSource): GestureBinding[];
698
705
 
706
+ /** What a key no open keymap binds does: `'modal'` swallows it and leaves the
707
+ * keymap open; `'cascade'` closes the keymap and dispatches it as if none were. */
708
+ type KeymapUnbound = 'modal' | 'cascade';
709
+ /** What holds a level opened with `{ hold: true }` open: no key releases it, so it closes on Escape. */
710
+ declare const KEYMAP_HOLD = "hold";
711
+ /** One open level of a {@link KeymapStack}. */
712
+ interface OpenKeymap {
713
+ readonly id: string;
714
+ readonly label: string;
715
+ /** The keymap's bindings as declared, for a hint to list. */
716
+ readonly bindings: readonly GestureBinding[];
717
+ /** The gesture id of the leader holding this level open, while it is held,
718
+ * or {@link KEYMAP_HOLD}. */
719
+ readonly heldBy?: string;
720
+ /** Whether input arrived while the leader was held, so its release closes the level. */
721
+ readonly usedWhileHeld: boolean;
722
+ }
723
+ /** What the keymaps made of the raw input in progress: `'taken'` when one of
724
+ * them handled it, `'cascaded'` when it went on past them, `null` before either. */
725
+ type KeymapVerdict = 'taken' | 'cascaded' | null;
726
+ /** The keymaps open on one surface, innermost last; a canvas's `keymaps` dep. */
727
+ interface KeymapStack {
728
+ /** Every open level, outermost first. */
729
+ open(): readonly OpenKeymap[];
730
+ innermost(): OpenKeymap | null;
731
+ /** Open a level. `heldBy` names what holds it open; `bindings` are what a hint lists. */
732
+ push(id: string, label: string, opts?: {
733
+ heldBy?: string;
734
+ bindings?: readonly GestureBinding[];
735
+ }): void;
736
+ /** Mark the levels the last raw input opened as held by `heldBy`: the key
737
+ * that opened them is still down. False when it opened none. */
738
+ holdOpened(heldBy: string): boolean;
739
+ /** The leader `heldBy` came up: close its level, those above it and the
740
+ * tapped ones beneath it if input arrived meanwhile, else leave it open
741
+ * for one more input. */
742
+ release(heldBy: string): void;
743
+ /** Close the innermost level: Escape. */
744
+ closeInnermost(): void;
745
+ /** One of the keymaps took this input, or a pointer gesture went past them.
746
+ * Marks held levels used and closes once-levels down to the innermost held one. */
747
+ inputSeen(): void;
748
+ /** A key no keymap binds was swallowed: held levels count it as input, and nothing closes. */
749
+ swallowed(): void;
750
+ /** This input went on past the keymaps: as `inputSeen`, remembered as a cascade. */
751
+ cascaded(): void;
752
+ /** What the keymaps made of the input in progress. */
753
+ verdict(): KeymapVerdict;
754
+ closeAll(): void;
755
+ /** Run `fn` as one raw input: closes made inside apply when it returns. Nests. */
756
+ batch<T>(fn: () => T): T;
757
+ subscribe(listener: () => void): () => void;
758
+ getVersion(): number;
759
+ }
760
+ /** An empty {@link KeymapStack}. `useGestureDispatcher` makes one per surface. */
761
+ declare function createKeymapStack(): KeymapStack;
762
+
699
763
  /**
700
764
  * Re-exports the pure matcher primitives from `@weasel-js/gestures` and layers
701
765
  * the actions-layer binding-scope / matchBest logic on top.
@@ -1249,9 +1313,10 @@ interface Carried {
1249
1313
  };
1250
1314
  }
1251
1315
  /**
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.
1316
+ * The kit's symbolic reasons an action might report itself as disabled. The
1317
+ * consumer (palette, menu, etc.) maps these to display strings via its own
1318
+ * label map. An action may also answer with any other string, which is
1319
+ * display text and shown as is — see {@link ActionUnavailable}.
1255
1320
  */
1256
1321
  declare const ActionDisabledReason: {
1257
1322
  readonly SelectionRequired: "selection-required";
@@ -1262,6 +1327,9 @@ declare const ActionDisabledReason: {
1262
1327
  };
1263
1328
  /** Why an action is unavailable right now. */
1264
1329
  type ActionDisabledReason = (typeof ActionDisabledReason)[keyof typeof ActionDisabledReason];
1330
+ /** What `enabled` answers with when the action cannot run: one of the
1331
+ * symbolic {@link ActionDisabledReason}s, or a sentence to show as it is. */
1332
+ type ActionUnavailable = ActionDisabledReason | (string & {});
1265
1333
  /**
1266
1334
  * What a palette, menu or toolbar renders for an action. No part of this is
1267
1335
  * read during dispatch.
@@ -1334,7 +1402,8 @@ interface ActionDispatch extends BindingSource {
1334
1402
  scope?: 'hotkey';
1335
1403
  /**
1336
1404
  * Optional predicate saying whether the action can run right now. Return
1337
- * `true` when it can, or an `ActionDisabledReason` when it cannot. The
1405
+ * `true` when it can, or an `ActionDisabledReason` or a sentence of display
1406
+ * text when it cannot. The
1338
1407
  * command palette greys out a disabled row, skips it in keyboard nav,
1339
1408
  * ignores clicks, and shows the reason next to the label. The dispatcher
1340
1409
  * skips a disabled action too, on a key as on a pointer, and falls through
@@ -1370,7 +1439,7 @@ interface ActionDispatch extends BindingSource {
1370
1439
  enabled?: (deps?: ActionDeps, at?: {
1371
1440
  x: number;
1372
1441
  y: number;
1373
- }, carried?: Carried) => true | ActionDisabledReason;
1442
+ }, carried?: Carried) => true | ActionUnavailable;
1374
1443
  /**
1375
1444
  * Whether the action reads as held down right now: bold on the selected
1376
1445
  * text, snapping switched on. A toolbar button draws it as pressed.
@@ -1521,6 +1590,9 @@ interface MenuOpenRequest {
1521
1590
  client: Point;
1522
1591
  /** Viewport rect of the button the menu hangs from: placed below it, or above when below does not fit. */
1523
1592
  under?: Rect;
1593
+ /** With `under`: the side of the button it opens on when it fits there, flipping to the opposite side when it does not.
1594
+ * Default below. The canvas HUD menu host places below only and ignores it. */
1595
+ side?: MenuSide;
1524
1596
  /** World point, passed to `enabled` and to every item. */
1525
1597
  world?: Point;
1526
1598
  params?: Record<string, unknown>;
@@ -1532,6 +1604,8 @@ interface OpenMenu {
1532
1604
  entries: readonly MenuEntry[];
1533
1605
  client: Point;
1534
1606
  under?: Rect;
1607
+ /** `MenuOpenRequest.side`, carried to the renderer. */
1608
+ side?: MenuSide;
1535
1609
  world?: Point;
1536
1610
  source: 'pointer' | 'keyboard';
1537
1611
  }
@@ -1769,7 +1843,7 @@ declare function matchActionItem(item: ActionItem, query: string): QueryMatch |
1769
1843
  */
1770
1844
  interface ActionEnabledResult {
1771
1845
  enabled: boolean;
1772
- reason?: ActionDisabledReason;
1846
+ reason?: ActionUnavailable;
1773
1847
  }
1774
1848
  /**
1775
1849
  * Safely evaluate an action's `enabled` predicate. Returns `{enabled: true}`
@@ -1853,6 +1927,29 @@ declare function createDepRegistry(): DepRegistry;
1853
1927
  /** Build the deps bag for an action from its declared `requires`. */
1854
1928
  declare function buildDepsFromRequires(action: Action, depRegistry: DepRegistry): ActionDeps;
1855
1929
 
1930
+ /**
1931
+ * Binding overrides: a host's replacements for bindings it did not write,
1932
+ * keyed by binding id. An override replaces or removes one binding, on an
1933
+ * action or on a contribution alike; adding a key beside the defaults is
1934
+ * `tune`'s job.
1935
+ */
1936
+
1937
+ /** Overrides by binding id: a route string or spec to bind instead, or `null` to unbind. */
1938
+ type BindingOverrides = Readonly<Record<string, BindingOverrideInput>>;
1939
+ /** Overrides read into specs, one per binding id. */
1940
+ type ResolvedBindingOverrides = ReadonlyMap<string, GestureSpec | null>;
1941
+ /** A binding's id: its declared `opts.id`, else its owner and its position
1942
+ * there — `<entry>#<n>` for an entry's binding (`ownerId`), `<action>@<n>` for
1943
+ * an action's own (`ownerId` null), so an entry and an action of one id never
1944
+ * share a derived id. */
1945
+ declare function bindingId(b: GestureBinding, ownerId: string | null, index: number): string;
1946
+ /** Merge override maps into one, a later map winning per id. A route string
1947
+ * that does not parse is skipped with a warning, leaving the binding as it was. */
1948
+ declare function resolveBindingOverrides(maps: readonly BindingOverrides[]): ResolvedBindingOverrides;
1949
+ /** The bindings `ownerId` declares, each under its override, the unbound ones
1950
+ * left out: what dispatch routes by. A `null` owner is an action's own. */
1951
+ declare function overriddenBindings(bindings: readonly GestureBinding[], ownerId: string | null, overrides?: ResolvedBindingOverrides): GestureBinding[];
1952
+
1856
1953
  /** Hotkey-slot trigger key. The slot is engaged while this key is held —
1857
1954
  * hence "hotkey": active as long as the key is hot. Omitted means the tool
1858
1955
  * is not eligible for the hotkey slot.
@@ -1899,6 +1996,12 @@ interface Eligibility {
1899
1996
  claimed?: boolean;
1900
1997
  /** Modality filter, applied wherever it would otherwise be live. */
1901
1998
  capabilities?: CapabilityTag[];
1999
+ /** A keymap: live only while it is the innermost one open, at the hotkey
2000
+ * tier. `unbound` overrides the `gestures.keymapUnbound` kit setting for
2001
+ * this keymap. Open one with a leader (`keymapContribution`). */
2002
+ keymap?: true | {
2003
+ unbound?: KeymapUnbound;
2004
+ };
1902
2005
  }
1903
2006
  /**
1904
2007
  * Where an entry's overlay sits in the layer stack, relative to the
@@ -1908,9 +2011,9 @@ interface Eligibility {
1908
2011
  * all three collapse to `'top'`.
1909
2012
  */
1910
2013
  type OverlayPosition = 'top' | 'before-selection' | 'after-selection';
1911
- /** Dep sources an entry provides while it is installed, by dep name. */
2014
+ /** Dep sources an entry provides while it is installed, by dep name. A source may read the one it displaces. */
1912
2015
  type ContributionDeps = {
1913
- [K in DepName]?: () => DepSchema[K];
2016
+ [K in DepName]?: DepSource<K>;
1914
2017
  };
1915
2018
  /**
1916
2019
  * What routing reads off an entry: when its bindings are live, which they
@@ -1996,6 +2099,17 @@ interface DispatcherContext {
1996
2099
  * is, the rest only while it holds them. Absent, every binding is live.
1997
2100
  */
1998
2101
  keyReach?: KeyReach;
2102
+ /** The keymaps open on this surface. Absent: none can open. */
2103
+ keymaps?: KeymapStack;
2104
+ /** Which bindings this pass of an input reaches while a keymap is open:
2105
+ * `'only'` the innermost keymap's, `'none'` everything but it. Absent: both. */
2106
+ keymapPass?: 'only' | 'none';
2107
+ /** What a key no open keymap binds does, unless the keymap says: the
2108
+ * `gestures.keymapUnbound` kit setting. Default `'modal'`. */
2109
+ leaderUnbound?: KeymapUnbound;
2110
+ /** The binding overrides in force, read per input, for contribution bindings;
2111
+ * the registry lays them over actions' own. Absent overrides nothing. */
2112
+ bindingOverrides?: () => ResolvedBindingOverrides;
1999
2113
  /** Where the dispatcher records how it resolved each input. Absent records nothing. */
2000
2114
  trace?: DispatchTrace;
2001
2115
  }
@@ -2300,6 +2414,12 @@ interface ActionsRegistry {
2300
2414
  * passes `given`: every tuning's params, `given` laid over them. What a
2301
2415
  * tool's chrome reads to show what the action it binds will do. */
2302
2416
  paramsOf(id: string, given?: Record<string, unknown>): Record<string, unknown>;
2417
+ /** Replace or remove bindings by id, here and in scopes below. Holders
2418
+ * merge: an inner scope's beats an outer one's, and a later one beats an
2419
+ * earlier one in the same scope. Returns a release. See {@link BindingOverrides}. */
2420
+ overrideBindings(overrides: BindingOverrides): () => void;
2421
+ /** Every override in force from this scope, read into specs. */
2422
+ bindingOverrides(): ResolvedBindingOverrides;
2303
2423
  list(): readonly Action[];
2304
2424
  /** Fire an immediate-invoker action by id. The optional `params` arg is
2305
2425
  * forwarded to `ImmediateInvoker.run` as its second argument — use it for
@@ -2366,6 +2486,24 @@ declare function validateActionId(id: string): void;
2366
2486
  * (Tool.bindings) are the right place for '&' atoms. */
2367
2487
  declare function validateActionDefaultBinding(action: Action): void;
2368
2488
 
2489
+ /** What the dispatcher reads straight off an input event. */
2490
+
2491
+ /**
2492
+ * Modifier flags as an immediate invoker sees them, in the kit's
2493
+ * `ModifierState` spelling rather than the DOM's `*Key` one.
2494
+ *
2495
+ * Most actions should still express modifier semantics as separate bindings
2496
+ * with `opts.params` — that is what makes them visible to conflict detection
2497
+ * and the inspector. This is for the cases where the modifier is data rather
2498
+ * than a route.
2499
+ */
2500
+ declare function modifierStateOf(e: {
2501
+ altKey: boolean;
2502
+ ctrlKey: boolean;
2503
+ metaKey: boolean;
2504
+ shiftKey: boolean;
2505
+ }): ModifierState;
2506
+
2369
2507
  /** Canonical id of the consolidated tool-offhand action. One descriptor
2370
2508
  * serves every tool; the matched binding supplies `params.toolId` to select
2371
2509
  * which tool to engage while the key is held. */
@@ -2381,8 +2519,8 @@ interface ToolOffhandBindingSpec {
2381
2519
  declare function offhandKeyFor(trigger: HotkeyTrigger): string;
2382
2520
  /** Build the per-tool `BoundGesture` list for the consolidated action's
2383
2521
  * `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.
2522
+ * `opts.params.toolId`, so the invoker's `start` can pick out which tool
2523
+ * to engage, and is overridden as `tool.offhand.<toolId>`.
2386
2524
  *
2387
2525
  * An offhand tool engages only between gestures. Swapping the tool out
2388
2526
  * mid-drag would cancel the drag, and the key is free for the gesture's own
@@ -2542,6 +2680,7 @@ declare function createLongPressStore(): LongPressStore;
2542
2680
  * The `gestures` kit settings area. Declared here rather than in core because
2543
2681
  * the dispatcher reads it, and routing sits below core.
2544
2682
  */
2683
+
2545
2684
  /** Pointer gesture timings and travel; each falls back to its constant in `@weasel-js/gestures`. */
2546
2685
  interface GestureKitSettings {
2547
2686
  /** Longest gap between the clicks of a double click, in ms. */
@@ -2554,6 +2693,9 @@ interface GestureKitSettings {
2554
2693
  tapPx: number;
2555
2694
  /** Travel that makes a press a drag, in CSS px. */
2556
2695
  dragPx: number;
2696
+ /** What a key an open keymap does not bind does: `'modal'` swallows it,
2697
+ * `'cascade'` closes the keymap and lets it through. */
2698
+ keymapUnbound: KeymapUnbound;
2557
2699
  }
2558
2700
  declare module '@weasel-js/react' {
2559
2701
  interface KitSettings {
@@ -2681,6 +2823,8 @@ interface EligibilityState {
2681
2823
  engagedIds?: ReadonlySet<string>;
2682
2824
  /** Whether the active mode allows these capability tags. Omitted → allow. */
2683
2825
  allows?: (tags: readonly CapabilityTag[]) => boolean;
2826
+ /** The innermost open keymap's id: the one keymap entry that is live. */
2827
+ openKeymap?: string | null;
2684
2828
  }
2685
2829
  /**
2686
2830
  * The scope tier an entry's bindings are live at, or null when none are.
@@ -2696,7 +2840,7 @@ declare function liveScope(id: string, eligibility: Eligibility, state: Eligibil
2696
2840
  * breaks ties by declaration order, so the caller's entry order decides which
2697
2841
  * of two same-specificity bindings in one tier wins.
2698
2842
  */
2699
- declare function scopeBindings(entries: Iterable<Contribution<unknown>>, state: EligibilityState): ScopedBinding[];
2843
+ declare function scopeBindings(entries: Iterable<Contribution<unknown>>, state: EligibilityState, overrides?: ResolvedBindingOverrides): ScopedBinding[];
2700
2844
  /** What decides which entries are live, and in what order they are walked. */
2701
2845
  interface AssemblyInputs {
2702
2846
  focusedId: string | null;
@@ -2705,6 +2849,8 @@ interface AssemblyInputs {
2705
2849
  /** The capability tags the active mode allows. Omitted: no mode system, so
2706
2850
  * every entry is allowed. */
2707
2851
  allowedCapabilities?: ReadonlySet<CapabilityTag>;
2852
+ /** The innermost open keymap's id, if one is open. */
2853
+ openKeymap?: string | null;
2708
2854
  }
2709
2855
  /**
2710
2856
  * The entry set as routing walks it, with the state that tiers it. The
@@ -2773,6 +2919,126 @@ declare function modeShortcutSpec(shortcut: string): KeySpec;
2773
2919
  */
2774
2920
  declare function modeShortcuts(registry: ModeRegistry, handlers: ModeShortcutHandlers): Contribution<never>;
2775
2921
 
2922
+ /**
2923
+ * A keymap and the leader that opens it, from one definition. The keymap is an
2924
+ * entry whose bindings are live only while it is open; the leader is an
2925
+ * action on the hotkey tier, so it outranks what the active tool binds to the
2926
+ * same key, and it opens the keymap mid-gesture as well as between them.
2927
+ */
2928
+
2929
+ /** What {@link keymapContribution} builds a keymap and its leader from. */
2930
+ interface KeymapDef<TOverlay = never> {
2931
+ /** The keymap entry's id. Its leader action is `keymap.<id>`. */
2932
+ id: string;
2933
+ /** What the hint and a shortcut chip call it: `Loupe ▸ 2`. */
2934
+ label: string;
2935
+ /** The keystroke, or keystrokes, that open it. A `key-held` spec is read as
2936
+ * its `key` form: holding the key is what holds the keymap open. */
2937
+ leader: GestureSpec | readonly GestureSpec[];
2938
+ /** The keymap's own bindings. Escape is not one: it always closes the keymap. */
2939
+ bindings: readonly GestureBinding[];
2940
+ /** Actions the bindings name that are not registered elsewhere. */
2941
+ actions?: readonly Action[];
2942
+ /** Overrides the `gestures.keymapUnbound` kit setting for this keymap. */
2943
+ unbound?: KeymapUnbound;
2944
+ /** Drawn while the keymap is open. */
2945
+ overlay?: TOverlay | TOverlay[];
2946
+ overlayPosition?: OverlayPosition;
2947
+ }
2948
+ /** The leader action's id for keymap `id`. */
2949
+ declare const keymapLeaderId: (id: string) => string;
2950
+ /** The binding id of a keymap's leader — what a binding override rebinds it by.
2951
+ * A second leader key is `<id>#1`, and so on. */
2952
+ declare const keymapLeaderBindingId: (id: string, index?: number) => string;
2953
+ /** `[keymap entry, leader entry]`. Triggered without a key, the leader opens
2954
+ * its keymap tapped; `trigger('keymap.<id>', { hold: true })` holds it open
2955
+ * until Escape. Install both, with `<SceneCanvas ambient>`
2956
+ * or `useTools`'s `ambient`; the leader entry carries the actions. */
2957
+ declare function keymapContribution<TOverlay = never>(def: KeymapDef<TOverlay>): Contribution<TOverlay>[];
2958
+
2959
+ /** One row of a keymap's hint: a key chip, or a pointer gesture in words, and what it does. */
2960
+ interface KeymapRow {
2961
+ shortcut?: MenuShortcut;
2962
+ gesture?: string;
2963
+ label: string;
2964
+ }
2965
+ /** An open keymap as a hint shows it: {@link describeKeymap}'s result. */
2966
+ interface KeymapDescription {
2967
+ id: string;
2968
+ label: string;
2969
+ /** Whether a held leader is keeping it open. */
2970
+ held: boolean;
2971
+ rows: readonly KeymapRow[];
2972
+ }
2973
+ /** The rows a hint lists for an open keymap, under the overrides in force. */
2974
+ declare function describeKeymap(level: OpenKeymap, actions: readonly Action[], overrides?: ResolvedBindingOverrides): KeymapDescription;
2975
+ /**
2976
+ * Every key in `def` as a menu chip, by action id, each carrying the path
2977
+ * through its leader (`Loupe ▸ 2`), under `overrides`. A keymap with no key
2978
+ * leader gives its keys no path.
2979
+ */
2980
+ declare function keymapShortcuts(def: KeymapDef, overrides?: ResolvedBindingOverrides): ReadonlyMap<string, readonly MenuShortcut[]>;
2981
+
2982
+ /** Options for {@link captureKey}. */
2983
+ interface CaptureKeyOptions {
2984
+ /** Capture the held form, `key-held`, rather than the keystroke. */
2985
+ held?: boolean;
2986
+ /** Stop listening and resolve `null`. */
2987
+ signal?: AbortSignal;
2988
+ /** Whether Cmd is Mod. Defaults to the detected platform. */
2989
+ apple?: boolean;
2990
+ }
2991
+ /**
2992
+ * The next keystroke on `target` as a key spec: {@link captureGesture} taking
2993
+ * a keystroke alone, and leaving the pointer to the page. A bare modifier is
2994
+ * waited past. Write the result with `keySpecRoute` to persist it as a binding
2995
+ * override.
2996
+ */
2997
+ declare function captureKey(target: EventTarget, opts?: CaptureKeyOptions): Promise<KeySpec | KeyHeldSpec | null>;
2998
+
2999
+ /** A spec kind a binding editor can capture. */
3000
+ type CaptureKind = 'key' | 'key-held' | 'click' | 'doubleClick' | 'drag' | 'contextMenu';
3001
+ /** What `captureGesture` resolves to. */
3002
+ type CapturedSpec = KeySpec | KeyHeldSpec | ClickSpec | DoubleClickSpec | DragSpec | ContextMenuSpec;
3003
+
3004
+ /** The click-and-drag thresholds a capture reads, each defaulting to its constant. */
3005
+ interface CaptureThresholds {
3006
+ dragPx?: number;
3007
+ doubleClickMs?: number;
3008
+ doubleClickPx?: number;
3009
+ }
3010
+
3011
+ /** Options for {@link captureGesture}. */
3012
+ interface CaptureGestureOptions extends CaptureThresholds {
3013
+ /** The kinds to take; input of any other kind is waited past. A keystroke
3014
+ * is taken as `key` when both `key` and `key-held` are listed. Defaults to
3015
+ * `key`, `click`, `doubleClick`, `drag` and `contextMenu`. */
3016
+ kinds?: readonly CaptureKind[];
3017
+ /** Stop listening and resolve `null`. */
3018
+ signal?: AbortSignal;
3019
+ /** Whether Cmd is Mod. Defaults to the detected platform. */
3020
+ apple?: boolean;
3021
+ /** Travel that makes a press a drag, in CSS px: pass the `gestures.dragPx`
3022
+ * kit setting. Defaults to `DRAG_THRESHOLD_PX`. */
3023
+ dragPx?: number;
3024
+ /** The `gestures.doubleClickMs` kit setting. Defaults to `DOUBLE_CLICK_MAX_MS`. */
3025
+ doubleClickMs?: number;
3026
+ /** The `gestures.doubleClickPx` kit setting. Defaults to `DOUBLE_CLICK_MAX_PX`. */
3027
+ doubleClickPx?: number;
3028
+ }
3029
+ /**
3030
+ * The next input on `target` of one of `opts.kinds`, as a gesture spec, for a
3031
+ * binding editor: its modifiers with the platform's primary one as `mod`. A
3032
+ * press is told a click or a drag by the dispatcher's own recognizer, at its
3033
+ * drag threshold; a click is held back for a double click only when both are
3034
+ * asked for. A bare modifier key is waited past. Escape, or an abort, resolves
3035
+ * `null`. What it takes is `preventDefault`ed and stopped, the click a browser
3036
+ * follows a press with included, so nothing else acts on it. The pointer is
3037
+ * left alone when no pointer kind is asked for, and keys other than Escape
3038
+ * when no key kind is.
3039
+ */
3040
+ declare function captureGesture(target: EventTarget, opts?: CaptureGestureOptions): Promise<CapturedSpec | null>;
3041
+
2776
3042
  /**
2777
3043
  * A tool's activation key, as `ToolDef.keybinding` declares it. Captures
2778
3044
  * only the fields meaningful to a tool-select key —
@@ -3079,6 +3345,9 @@ interface ToolScopes {
3079
3345
  * definition). Two gated actions conflict only when some mode lets both
3080
3346
  * rules hold. Default: the kit's `DEFAULT_MODES`. */
3081
3347
  modes?: readonly ActiveMode[];
3348
+ /** Binding overrides in force, applied to the entries' bindings. Actions are
3349
+ * read as given: an `ActionsRegistry`'s `list()` has applied them already. */
3350
+ overrides?: ResolvedBindingOverrides;
3082
3351
  }
3083
3352
  /**
3084
3353
  * Detect reachable route conflicts in an assembled tool set and report each one.
@@ -3348,6 +3617,8 @@ interface DepSchema {
3348
3617
  menuHost?: MenuHost;
3349
3618
  /** The canvas's dispatch trace, for a dep to record a mode switch into. */
3350
3619
  dispatchTrace?: DispatchTrace;
3620
+ /** The keymaps open on the canvas: what a leader opens and a hint reads. */
3621
+ keymaps?: KeymapStack;
3351
3622
  }
3352
3623
  /** Every dep name declared by anything that has merged into {@link DepSchema}. */
3353
3624
  type DepName = keyof DepSchema;
@@ -3395,4 +3666,4 @@ type KernelOverlay = OverlaySchema extends {
3395
3666
  overlay: infer O;
3396
3667
  } ? O : unknown;
3397
3668
 
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 };
3669
+ 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, multiTouchGestureId 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, modifierStateOf 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, offhandKeyFor as d0, openPointerSession as d1, overlaysOf as d2, overriddenBindings as d3, pickMenu as d4, pointerGestureId as d5, readActionSettings as d6, reportRouteConflicts as d7, resolveBindingOverrides as d8, resolveDeviceProfile as d9, resolveMenu as da, resolveParams as db, resolveSchemaMenu as dc, roleReader as dd, routesForSpec as de, ruleCanHoldIn as df, rulesExclusive as dg, scopeBindings as dh, scratchKey as di, setScratch as dj, startCarry as dk, taggedActionItems as dl, targetConsultsAffordance as dm, toolIdsOf as dn, toolSet as dp, toolSetHas as dq, tuneAction as dr, validateActionDefaultBinding as ds, validateActionId as dt, withoutTools as du, 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 modifierStateOf, c$ as multiTouchGestureId, d0 as offhandKeyFor, d1 as openPointerSession, d2 as overlaysOf, d3 as overriddenBindings, d4 as pickMenu, d5 as pointerGestureId, d6 as readActionSettings, d7 as reportRouteConflicts, d8 as resolveBindingOverrides, d9 as resolveDeviceProfile, da as resolveMenu, db as resolveParams, dc as resolveSchemaMenu, dd as roleReader, de as routesForSpec, df as ruleCanHoldIn, dg as rulesExclusive, dh as scopeBindings, di as scratchKey, dj as setScratch, dk as startCarry, dl as taggedActionItems, dm as targetConsultsAffordance, dn as toolIdsOf, dp as toolSet, dq as toolSetHas, dr as tuneAction, ds as validateActionDefaultBinding, dt as validateActionId, du as withoutTools } from './index-HWqV4VxU.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';