@weasel-js/core 1.4.0-pre.0 → 1.4.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.
@@ -484,5 +484,5 @@ function reportRouteConflicts(scopes, warn = (m) => console.warn(m)) {
484
484
  }
485
485
 
486
486
  export { ActionDisabledReason, ActionsProvider, DepRegistryProvider, PREDICATE_TARGET, actionBindings, buildDepsFromRequires, buildRouteRegistry, evaluateEnabled, findConflicts, reportRouteConflicts, routeGestureForSpecKind, routesForSpec, useAction, useActionsRegistry, useDepRegistry, useDepSource, useOptionalDepRegistry };
487
- //# sourceMappingURL=chunk-H6E6KPTU.js.map
488
- //# sourceMappingURL=chunk-H6E6KPTU.js.map
487
+ //# sourceMappingURL=chunk-UTIFY2UU.js.map
488
+ //# sourceMappingURL=chunk-UTIFY2UU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/interactions/actions/depRegistry.tsx","../src/interactions/actions/buildDeps.ts","../src/interactions/actions/registry.tsx","../src/tools/routing/reflection/registry.ts","../src/tools/routing/reflection/conflicts.ts"],"names":["createContext","useRef","useMemo","jsx","useContext","useEffect"],"mappings":";;;;;;AAgCA,IAAM,kBAAA,GAAqB,cAAkC,IAAI,CAAA;AAI1D,SAAS,mBAAA,CAAoB,EAAE,QAAA,EAAS,EAA4B;AACzE,EAAA,MAAM,UAAA,GAAa,MAAA,iBAAO,IAAI,GAAA,EAA2D,CAAA;AAEzF,EAAA,MAAM,QAAA,GAAW,QAAqB,OAAO;AAAA,IAC3C,QAAA,EAAU,CAAoB,IAAA,EAAS,MAAA,KAA+B;AACpE,MAAA,UAAA,CAAW,OAAA,CAAQ,GAAA,CAAI,IAAA,EAAgB,MAAuB,CAAA;AAC9D,MAAA,OAAO,MAAM;AAAE,QAAA,UAAA,CAAW,OAAA,CAAQ,OAAO,IAAc,CAAA;AAAA,MAAG,CAAA;AAAA,IAC5D,CAAA;AAAA,IACA,KAAK,CAAoB,IAAA,KACv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CAAS,KAAA,EAAO,CAAA;AAAA,IACjF,SAAS,QAAA,CAAS,OAAA;AAAA,IAClB,KAAK,QAAA,CAAS,GAAA;AAAA,IACd,QAAQ,QAAA,CAAS,MAAA;AAAA,IACjB,WAAW,QAAA,CAAS;AAAA,GACrB,CAAA;AACD,EAAA,OAAO,GAAG,KAAK,CAAA,oBAAA,EAAkB,SAAS,OAAA,CAAQ,IAAA,CAAK,IAAI,CAAC,CAAA,CAAA;AAC9D;AAmBO,SAAS,oBAAA,CACd,QACA,IAAA,GAAkC,CAAC,MAAM,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,EAC3C;AACZ,EAAA,MAAM,SAAA,GAAY,oBAAoB,MAAM,CAAA;AAC5C,EAAA,KAAA,MAAW,KAAK,SAAA,EAAW;AACzB,IAAA,IAAA;AAAA,MACE,CAAA;AAAA,EAAA,EAC+E,cAAA,CAAe,CAAC,CAAC,CAAA;AAAA,KAClG;AAAA,EACF;AACA,EAAA,OAAO,SAAA;AACT","file":"chunk-UTIFY2UU.js","sourcesContent":["/**\n * Dep registry for registry unification.\n *\n * Holds named \"live source\" thunks. Actions declare `requires: ['selection']`;\n * the dispatcher calls `registry.get('selection')` at invocation time to\n * build a typed Deps bag.\n *\n * `DepSchema` — the map of dep name → value type — is the single source of\n * truth for what `requires`/`register`/`get` accept. Its concrete fields live\n * in `./depSchema` (co-located with the dep value types). It is declared there\n * as a plain `export interface` rather than via a cross-module\n * `declare module './depRegistry'` augmentation: that augmentation does NOT\n * merge once rollup-plugin-dts flattens both files into one `.d.ts` chunk,\n * which silently emptied `DepSchema` for consumers. Consumers still extend it\n * via `declare module '@weasel-js/core'` augmentation.\n */\nimport {\n createContext, useContext, useEffect, useMemo, useRef,\n type ReactNode,\n} from 'react';\nimport type { DepSchema, DepName } from './depSchema';\n\nexport type { DepSchema, DepName };\n\n/** Holds the live sources an action's declared dependencies resolve to.\n * Sources are thunks, read at invocation time, so an action never captures\n * stale state. */\nexport interface DepRegistry {\n register<K extends DepName>(name: K, source: () => DepSchema[K]): () => void;\n get<K extends DepName>(name: K): DepSchema[K] | undefined;\n}\n\nconst DepRegistryContext = createContext<DepRegistry | null>(null);\n\n/** Provides the dep registry for a canvas. `<SceneCanvas>` mounts one; a\n * consumer registering its own dep sources must be inside it. */\nexport function DepRegistryProvider({ children }: { children: ReactNode }) {\n const sourcesRef = useRef(new Map<DepName, () => unknown>() as Map<string, () => unknown>);\n\n const registry = useMemo<DepRegistry>(() => ({\n register: <K extends DepName>(name: K, source: () => DepSchema[K]) => {\n sourcesRef.current.set(name as string, source as () => unknown);\n return () => { sourcesRef.current.delete(name as string); };\n },\n get: <K extends DepName>(name: K) =>\n sourcesRef.current.get(name as string)?.() as DepSchema[K] | undefined,\n }), []);\n\n return <DepRegistryContext.Provider value={registry}>{children}</DepRegistryContext.Provider>;\n}\n\n/** The dep registry in scope. Throws outside a `<DepRegistryProvider>`. */\nexport function useDepRegistry(): DepRegistry {\n const r = useContext(DepRegistryContext);\n if (r === null) {\n throw new Error('useDepRegistry: no DepRegistryProvider in scope. Wrap your tree with <DepRegistryProvider> (typically inside <SceneCanvas>).');\n }\n return r;\n}\n\n/**\n * Like `useDepRegistry`, but returns `null` when no `<DepRegistryProvider>` is\n * in scope instead of throwing. Used by `useStandardActions` to preserve its\n * silent-no-op contract when neither provider is present.\n */\nexport function useOptionalDepRegistry(): DepRegistry | null {\n return useContext(DepRegistryContext);\n}\n\n/** Register a live source for `name` for the lifetime of the calling\n * component. The `source` thunk is called at dispatch time and should\n * return the latest value. */\nexport function useDepSource<K extends DepName>(name: K, source: () => DepSchema[K]) {\n const registry = useDepRegistry();\n const sourceRef = useRef(source);\n sourceRef.current = source;\n useEffect(() => {\n return registry.register(name, () => sourceRef.current());\n }, [name, registry]);\n}\n","/**\n * Shared dep-bag builder — the single implementation behind both the gesture\n * dispatcher's per-invocation `buildDeps` and `ActionsRegistry.trigger`'s\n * `requires` branch. Reads the action's declared `requires`, resolves each\n * name against the `DepRegistry`, and (dev builds only) wraps the bag in a\n * Proxy that warns on undeclared reads.\n */\nimport type { Action } from './registry';\nimport type { DepRegistry } from './depRegistry';\nimport type { ActionDeps } from './invoker';\n\n/** True in dev builds; false in production. Tree-shakes the Proxy out of\n * prod entirely. (Mirrors the dispatcher's own `DEV` const.) */\nconst DEV: boolean = (() => {\n try {\n return Boolean((import.meta as unknown as { env?: { DEV?: boolean } }).env?.DEV);\n } catch {\n return false;\n }\n})();\n\n/** Build the deps bag for an action from its declared `requires`. */\nexport function buildDepsFromRequires(action: Action, depRegistry: DepRegistry): ActionDeps {\n const requires = action.requires ?? [];\n const entries = requires.map((name) => [name, depRegistry.get(name)]);\n const deps = Object.fromEntries(entries) as ActionDeps;\n\n // Dev-only: wrap deps in a Proxy that warns when the invoker reads a\n // key not declared in `requires`. Catches silent-failure-by-typo or\n // forgotten-requires (the #1 bug class in this codebase pre-Phase-14e).\n // Production builds: bypass the Proxy entirely (zero overhead).\n if (DEV) {\n const declared = new Set<string>(requires);\n return new Proxy(deps as Record<string, unknown>, {\n get(target, prop, receiver) {\n if (typeof prop === 'string' && !declared.has(prop) && prop !== 'then') {\n const message =\n `[weasel:dispatcher] action \"${action.id}\" read deps.${prop} but did not declare it in \\`requires\\`. ` +\n `Add \\`requires: [...'${prop}']\\` to the descriptor or the dep will be undefined at runtime.`;\n // Warn first so the console trail survives even when the throw is\n // swallowed by a caller, then throw so the gesture fails visibly\n // instead of silently running without the dep.\n console.warn(message);\n throw new Error(message);\n }\n return Reflect.get(target, prop, receiver);\n },\n }) as ActionDeps;\n }\n return deps;\n}\n","/**\n * @experimental\n * Actions Registry — owns the registered `Action` descriptors and the\n * imperative `trigger` path. Keystrokes reach actions through the gesture\n * dispatcher matching their `defaultBinding`, not through a listener here.\n * Spec: docs/superpowers/specs/2026-05-09-actions-registry-design.md\n */\nimport {\n createContext,\n useContext,\n useEffect,\n useMemo,\n useRef,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport type { GestureSpec, PhaseSpec } from '../gestures/spec';\nimport type { ActionDeps, BindingOpts, Invoker } from './invoker';\nimport type { GestureBinding } from './binding';\nimport { useOptionalDepRegistry, type DepRegistry, type DepName } from './depRegistry';\nimport { buildDepsFromRequires } from './buildDeps';\nimport { RESERVED_ID_NAMES, RESERVED_ID_PREFIXES, type PhaseAtom } from '../../tools/routing/routeGrammar';\nimport type { Dispatcher, UiOngoingControl } from '../dispatcher/dispatcher';\nimport type { CursorSpec } from '@weasel-js/cursor';\nexport type { UiOngoingControl } from '../dispatcher/dispatcher';\n\n/**\n * @experimental\n * A single entry in `Action.defaultBinding[]`. Either a bare `GestureSpec`\n * (no per-binding opts) or an object form that pairs a spec with\n * `BindingOpts` for parametric actions (e.g. `{ params: { axis: 'x' } }`).\n * Use the object form when two bindings for the same action differ only in\n * a runtime parameter — the dispatcher extracts `opts.params` and passes\n * them to `ImmediateInvoker.run` as its second argument.\n */\nexport type BoundGesture = GestureSpec | { spec: GestureSpec; opts: BindingOpts };\n\n/**\n * @experimental\n * Flatten an action's `defaultBinding` into `GestureBinding`s. A bare\n * `GestureSpec` has `kind` at top level; the object form has `spec`.\n */\nexport function actionBindings(action: Action): GestureBinding[] {\n const gs = action.defaultBinding;\n if (!gs) return [];\n const raw: BoundGesture[] = Array.isArray(gs) ? gs : [gs as BoundGesture];\n return raw.map((entry) => {\n const isBoundObj = !('kind' in entry);\n const spec = isBoundObj ? (entry as { spec: GestureSpec }).spec : (entry as GestureSpec);\n const opts = isBoundObj ? (entry as { opts: BindingOpts }).opts : undefined;\n return { spec, actionId: action.id, ...(opts !== undefined ? { opts } : {}) };\n });\n}\n\n/**\n * @experimental\n * Single registered action. v1: one binding per action.\n */\nexport interface Action {\n id: string;\n label: string;\n /** The gesture-spec form of the binding, read by the gesture dispatcher.\n * May be a single `GestureSpec`, a bare `GestureSpec[]` (any-of semantics),\n * or a `BoundGesture[]` where each entry is either a bare `GestureSpec` or\n * `{ spec, opts }` — use the object form for parametric actions where two\n * bindings for the same action differ only by `opts.params` (e.g. `flip`\n * with `axis: 'x'` vs `'y'`). The dispatcher extracts `opts.params` and\n * passes them to `ImmediateInvoker.run` as its second argument. */\n defaultBinding?: GestureSpec | BoundGesture[];\n /** Names of the deps this action's invoker reads (keys of `DepSchema`).\n * The dispatcher (and `trigger`, when `requires` is present) resolves\n * each name against the `DepRegistry` at invocation time and passes the\n * resulting bag to the invoker. Dev builds warn when the invoker reads a\n * dep it didn't declare here — see `buildDepsFromRequires`. */\n requires?: readonly DepName[];\n /** Inline-SVG icon for palette / toolbar surfaces. Mirrors\n * `ToolPresentation.icon` so a generic `<ActionBar>` can render from\n * action metadata the same way `<ToolPalette>` renders from tool\n * metadata. May be a static `ReactNode` or a function (rare; useful\n * for state-aware icons like a \"lock\" toggle). */\n icon?: ReactNode | (() => ReactNode);\n /** Grouping key for palette/menu surfaces. Free-form string; the kit\n * ships defaults for `'align'` (six edges/centers), `'distribute'`\n * (two axes), and recommends `'pathfinder'` for boolean ops. */\n group?: string;\n /** Display override for the keyboard shortcut. When omitted, palette\n * surfaces derive a label from `defaultBinding` via their own\n * formatter. */\n shortcut?: string;\n /** Pluggable invocation strategy. The gesture dispatcher routes matched\n * bindings through `invoker.start` / `invoker.run` depending on timing.\n * All kit-standard descriptors ship one; consumer-supplied actions\n * without an invoker can still register but won't be triggered. */\n invoker?: Invoker;\n /** When set to `'hotkey'`, this action's `defaultBinding` rides the hotkey\n * `BindingScope` instead of the ambient scope — meaning it beats any\n * active-tool binding on the same input shape. Use for tool-switch\n * shortcuts and global held-key triggers. Default: ambient. */\n scope?: 'hotkey';\n /**\n * @experimental\n * Optional predicate the command palette consults when rendering. Return\n * `true` when the action is currently triggerable. Return a reason string\n * (e.g. `'Selection required'`) when disabled — the palette greys out\n * the row, skips it in keyboard nav, ignores clicks, and shows the\n * reason next to the label. Keystroke dispatch (the registered binding)\n * is unaffected; the action's own `run` should self-guard.\n *\n * **Contract:** must be pure (no side effects), fast (< 4ms in dev), and\n * must not throw. If a call throws or exceeds the budget in dev mode,\n * `evaluateEnabled` logs a one-time warning per action id; throws are\n * caught and treated as disabled with reason `'(predicate threw)'`.\n *\n * Snapshot-on-open semantics: the palette evaluates `enabled` once when\n * opened and does NOT re-evaluate on selection changes while open. Live\n * reactive updates are deferred — palette is short-lived.\n *\n * The reason set is a closed enum — to add a new reason, edit\n * `ActionDisabledReason` and the consumer's display map.\n *\n * The optional `deps` argument is the same bag passed to\n * `ImmediateInvoker.run`; callers (`evaluateEnabled` / the ActionBar) may\n * synthesize it from the surrounding `DepRegistry` so predicates can\n * inspect selection / scene / etc. Predicates that don't need deps just\n * ignore the arg.\n */\n enabled?: (deps?: ActionDeps) => true | ActionDisabledReason;\n /**\n * Declarative eligibility rule, evaluated against the current\n * `RuleCtx` by the dispatcher before invoking `start()`. Omitted =\n * always eligible.\n *\n * Accepts either a fluent `Condition` (callable with `.rule`) or a\n * raw `Rule` tree; the dispatcher normalizes via `.rule` unwrap.\n *\n * Prefer `capability:`-based rules (e.g. `{ capability: 'transforms-selection' }`)\n * over `mode:` rules — capability rules survive new modes being added\n * that allow the same capability.\n */\n eligible?:\n | import('../../features/chrome-caps').Rule\n | import('../../features/chrome-caps').Condition;\n /**\n * CSS cursor shown while the pointer hovers a spot where this action\n * would win the drag. The hover-cursor pump (in `useGestureDispatcher`)\n * runs `Dispatcher.resolveOnly` on each idle pointermove — the same\n * match walk a real pointerdown takes — and applies the winning\n * action's `cursor`, so the hint and the actual click target stay in\n * sync by construction. Omitted = no override (the active tool's\n * `Tool.cursor` shows). Affordance hits are resolved earlier in the\n * pump via `AffordanceRegion.cursor` and never reach this field.\n *\n * Static value only. Prediction runs `enabled()` but cannot run the\n * invoker, so an action that matches yet bails at `start()` (empty\n * handle) may still show its cursor — keep `enabled` accurate for\n * actions that declare one.\n */\n cursor?: CursorSpec;\n /**\n * CSS cursor shown while THIS action's ongoing handle is in flight —\n * grabbing while panning, `move` while dragging a selection, `crosshair`\n * while pulling a marquee.\n *\n * Separate from `cursor` because the two answer different questions:\n * `cursor` is a prediction (\"a drag from here would pan\"), this is a state\n * (\"you are panning\"). An action can declare either, both, or neither;\n * with only `cursor` set, the hover hint holds for the duration of the\n * gesture.\n *\n * This is where mid-gesture cursors live now. They used to come from the\n * tool side — `ViewportToolDef.engaged.cursor` for a phase-gated string,\n * or a function-form `Tool.cursor` reading the gesture scratch out of the\n * tool-routing dispatcher. Both belonged to a pipeline whose whole job was\n * being taken over by bindings, and neither could describe a cursor for an\n * action a tool doesn't own.\n */\n activeCursor?: CursorSpec;\n}\n\n/**\n * @experimental\n * Closed enum of reasons an action might report itself as disabled. The\n * consumer (palette, menu, etc.) maps these symbolic values to display\n * strings via its own label map — see `demo/CommandPalette.tsx` for the\n * canonical mapping.\n */\nexport const ActionDisabledReason = {\n SelectionRequired: 'selection-required',\n SceneEmpty: 'scene-empty',\n NotApplicable: 'not-applicable',\n /** Sentinel: the predicate threw. Surfaced by `evaluateEnabled`'s catch. */\n PredicateThrew: 'predicate-threw',\n} as const;\n/** Why an action is unavailable right now. */\nexport type ActionDisabledReason =\n (typeof ActionDisabledReason)[keyof typeof ActionDisabledReason];\n\n/**\n * @experimental\n * Result of evaluating an Action's `enabled` predicate.\n */\nexport interface ActionEnabledResult {\n enabled: boolean;\n reason?: ActionDisabledReason;\n}\n\nconst enabledSlowWarned = new Set<string>();\nconst enabledThrewWarned = new Set<string>();\nconst ENABLED_BUDGET_MS = 4;\n/**\n * @experimental\n * Safely evaluate an action's `enabled` predicate. Returns `{enabled: true}`\n * when no predicate is supplied. Catches throws and treats them as disabled\n * with reason `'(predicate threw)'`. In dev mode, warns once per action id\n * when a single call exceeds 4ms (single frame at 240fps — generous; real\n * predicates should be sub-millisecond).\n */\nexport function evaluateEnabled(\n action: Action,\n deps?: ActionDeps,\n): ActionEnabledResult {\n if (!action.enabled) return { enabled: true };\n const isDev = typeof process !== 'undefined' ? process.env.NODE_ENV !== 'production' : true;\n const now = (typeof performance !== 'undefined' && typeof performance.now === 'function')\n ? () => performance.now()\n : () => Date.now();\n const start = isDev ? now() : 0;\n try {\n const result = action.enabled(deps);\n if (isDev) {\n const elapsed = now() - start;\n if (elapsed > ENABLED_BUDGET_MS && !enabledSlowWarned.has(action.id)) {\n enabledSlowWarned.add(action.id);\n console.warn(\n `weasel actions: enabled() for action \"${action.id}\" took ${elapsed.toFixed(2)}ms ` +\n `(budget ${ENABLED_BUDGET_MS}ms). The predicate must be pure and fast — see Action.enabled JSDoc.`,\n );\n }\n }\n if (result === true) return { enabled: true };\n return { enabled: false, reason: result };\n } catch (e) {\n if (isDev && !enabledThrewWarned.has(action.id)) {\n enabledThrewWarned.add(action.id);\n console.warn(\n `weasel actions: enabled() for action \"${action.id}\" threw; treating as disabled. ` +\n `The predicate must not throw — see Action.enabled JSDoc.`,\n e,\n );\n }\n return { enabled: false, reason: ActionDisabledReason.PredicateThrew };\n }\n}\n\n/** @internal Test helper: reset warn-once dedup so tests can repro-fire warnings. */\nexport function _resetEnabledWarnsForTests(): void {\n enabledSlowWarned.clear();\n enabledThrewWarned.clear();\n}\n\n/**\n * @experimental\n * Partial override or full descriptor passed via `<SceneCanvas actions={...}>`.\n * `null` disables a default at this id.\n */\nexport type ActionEntry = null | Partial<Action> | Action;\n\n/**\n * @experimental\n * Shape of the `actions` prop on `<SceneCanvas>`. `null` disables all defaults.\n */\nexport type ActionsProp = null | Record<string, ActionEntry>;\n\n/**\n * @experimental\n * Imperative API exposed by `useActionsRegistry()`.\n */\nexport interface ActionsRegistry {\n register(action: Action): () => void;\n unregister(id: string): void;\n list(): readonly Action[];\n /** Fire an immediate-invoker action by id. The optional `params` arg is\n * forwarded to `ImmediateInvoker.run` as its second argument — use it for\n * parametric actions (e.g. `trigger('tool.activate', { toolId: 'rect' })`).\n * Ongoing-invoker actions are not reachable from `trigger`. */\n trigger(id: string, params?: Record<string, unknown>): boolean;\n /**\n * Subscribe to registry mutations. The callback fires after any\n * `register`/`unregister` that changes the version. Returns an\n * unsubscribe function. Designed for `useSyncExternalStore`-driven\n * surfaces (e.g. `<ActionBar>` in `@weasel-js/ui`) that need to\n * re-render when the action set changes.\n */\n subscribe(listener: () => void): () => void;\n\n /**\n * Start an ongoing action driven by UI (color picker, opacity slider).\n * Returns a control object with `update(params)` and `end(reason)`.\n *\n * Returns `null` if no dispatcher is wired into this registry, the\n * action is unknown, or its invoker is not ongoing.\n *\n * See `Dispatcher.beginUiOngoing` for full semantics including\n * auto-commit when a prior UI handle for the same action is in flight.\n */\n begin(id: string, params?: Record<string, unknown>): UiOngoingControl | null;\n\n /** Wire a dispatcher into the registry so `begin()` can delegate to it.\n * Returns a release that clears the slot only while this dispatcher still\n * holds it: a canvas displaced by a later one must not take input away from\n * the canvas now on screen. Call with `null` to detach unconditionally. */\n setDispatcher(d: Dispatcher | null): () => void;\n\n /** Wire a `DepRegistry` into the registry so `trigger()` / `begin()` can\n * resolve action deps even when this provider is mounted ABOVE the dep\n * registry (e.g. a consumer's root `<ActionsProvider>` reused by\n * SceneCanvas's `ActionsProviderIfRoot`). Takes precedence over the dep\n * registry read from context at the provider's own level. Call with\n * `null` to detach unconditionally; the returned release clears the slot\n * only while this registry still holds it. */\n setDepRegistry(r: DepRegistry | null): () => void;\n}\n\n// ─── Registration-time validation ─────────────────────────────────────────\n\n/** Validate that `id` is usable as an action id in the route grammar.\n * Rejects ids that start with a reserved sigil (would shadow future\n * grammar extensions) and ids that collide with phase keywords (would\n * parse as the bare-phase shorthand). Mirrors `defineTool`'s tool-id\n * validation. */\nfunction validateActionId(id: string): void {\n if (id.length === 0) {\n throw new Error(`weasel: action id may not be empty`);\n }\n if (RESERVED_ID_PREFIXES.has(id[0]!)) {\n throw new Error(\n `weasel: action id \"${id}\" starts with reserved sigil \"${id[0]}\" ` +\n `(reserved set: ${[...RESERVED_ID_PREFIXES].join(' ')})`,\n );\n }\n if (RESERVED_ID_NAMES.has(id)) {\n throw new Error(\n `weasel: action id \"${id}\" collides with a reserved phase keyword ` +\n `(reserved: ${[...RESERVED_ID_NAMES].join(', ')})`,\n );\n }\n}\n\n/** Reject any '&'-channel phase atom in an Action's defaultBinding —\n * actions have no owning tool, so '&' can't resolve. Tool-side bindings\n * (Tool.bindings) are the right place for '&' atoms. */\nfunction validateActionDefaultBinding(action: Action): void {\n const gs = action.defaultBinding;\n if (!gs) return;\n const entries: BoundGesture[] = Array.isArray(gs) ? gs : [gs as BoundGesture];\n for (const entry of entries) {\n const spec = ('kind' in entry ? entry : entry.spec) as GestureSpec;\n const phase: PhaseSpec | undefined = spec.phase;\n if (phase === undefined) continue;\n const atoms: readonly PhaseAtom[] = Array.isArray(phase)\n ? phase\n : [{ channel: '&', phase: phase }];\n for (const atom of atoms) {\n if (atom.channel === '&') {\n throw new Error(\n `weasel: action \"${action.id}\" defaultBinding uses '&' channel ` +\n `which has no owning tool to resolve to. Use a named tool channel ` +\n `(e.g. '[rect:engaged]') or '*' instead, or move this binding to ` +\n `the tool's own Tool.bindings.`,\n );\n }\n }\n }\n}\n\n/**\n * A second `<SceneCanvas>` claiming one registry leaves the first unable to\n * dispatch anything, and the symptom — a canvas that stops responding — names\n * neither canvas nor the registry they share.\n */\nfunction warnSharedScope(): void {\n if (!IS_DEV) return;\n console.warn(\n 'weasel: a second dispatcher claimed this <ActionsProvider>, so only the ' +\n 'newest <SceneCanvas> under it will respond to input. Give each canvas its ' +\n 'own scope with <WeaselProvider isolate>.',\n );\n}\n\nconst ActionsContext = createContext<ActionsRegistry | null>(null);\n\n/**\n * @experimental\n * Mounts an `ActionsRegistry` for its lifetime. Children call\n * `useActionsRegistry()` or `useAction()` to participate. Mounts no input\n * listener of its own — the gesture dispatcher owns input.\n */\nexport function ActionsProvider({ children }: { children: ReactNode }): ReactElement {\n const actionsRef = useRef<Map<string, Action>>(new Map());\n const versionRef = useRef(0);\n const cachedRef = useRef<readonly Action[]>([]);\n const cachedVerRef = useRef(-1);\n const listenersRef = useRef<Set<() => void>>(new Set());\n\n // Trigger() consults the optional dep registry so actions can be fired\n // imperatively from ActionBar / palette callers — the registered\n // `invoker.run` receives a deps bag built fresh from the registry.\n const depReg = useOptionalDepRegistry();\n const depRegRef = useRef<DepRegistry | null>(depReg);\n depRegRef.current = depReg;\n\n // One warning per registry: the message is about the scope, not about which\n // canvas lost, and a page of canvases would otherwise repeat it per mount.\n const warnedRef = useRef(false);\n\n // Dep registry wired via setDepRegistry — set by SceneCanvas's registrar\n // when this provider sits above the dep-registry scope (consumer root\n // <ActionsProvider>). Preferred over the context read above.\n const wiredDepRegRef = useRef<DepRegistry | null>(null);\n\n // Dispatcher ref — wired from SceneCanvas via setDispatcher so that\n // begin() can delegate to beginUiOngoing.\n const dispatcherRef = useRef<Dispatcher | null>(null);\n\n // The legacy keystroke loop that walked every action's\n // `defaultBinding: KeyBinding` and matched against keydown is gone, along\n // with the per-action consumer hooks (`useEscape`, `useDelete`, ...) that\n // carried their own `useKeybinding` listener. Every kit-standard descriptor\n // now routes through the gesture dispatcher via `defaultBinding`.\n\n const registry = useMemo<ActionsRegistry>(() => {\n const snapshot = (): readonly Action[] => {\n const v = versionRef.current;\n if (cachedVerRef.current === v) return cachedRef.current;\n const out = Object.freeze(Array.from(actionsRef.current.values()));\n cachedRef.current = out;\n cachedVerRef.current = v;\n return out;\n };\n const notify = (): void => {\n for (const l of listenersRef.current) {\n try {\n l();\n } catch (err) {\n console.error('weasel ActionsRegistry: subscriber threw', err);\n }\n }\n };\n return {\n register: (action: Action) => {\n validateActionId(action.id);\n validateActionDefaultBinding(action);\n actionsRef.current.set(action.id, action);\n versionRef.current++;\n notify();\n return () => {\n const cur = actionsRef.current.get(action.id);\n // Only unregister if the current entry is still us (last-writer-wins\n // means a later registrant should not be clobbered by our cleanup).\n if (cur === action) {\n actionsRef.current.delete(action.id);\n versionRef.current++;\n notify();\n }\n };\n },\n unregister: (id: string) => {\n if (actionsRef.current.delete(id)) {\n versionRef.current++;\n notify();\n }\n },\n list: () => snapshot(),\n trigger: (id: string, params?: Record<string, unknown>) => {\n const a = actionsRef.current.get(id);\n if (!a) return false;\n try {\n if (a.invoker && a.invoker.timing === 'immediate') {\n const r = wiredDepRegRef.current ?? depRegRef.current;\n // Prefer the action's declared `requires` (same contract the\n // dispatcher uses — shared `buildDepsFromRequires`, including\n // the dev-mode undeclared-read guard); legacy fixed bag\n // otherwise.\n const deps = !r\n ? {}\n : a.requires\n ? buildDepsFromRequires(a, r)\n : {\n selection: r.get('selection' as DepName),\n scene: r.get('scene' as DepName),\n history: r.get('history' as DepName),\n view: r.get('view' as DepName),\n pointer: r.get('pointer' as DepName),\n activeTool: r.get('activeTool' as DepName),\n booleansAdapter: r.get('booleansAdapter' as DepName),\n };\n a.invoker.run(deps as never, params);\n }\n } catch (err) {\n console.error(`weasel ActionsRegistry: action \"${id}\" threw`, err);\n }\n return true;\n },\n subscribe: (listener: () => void) => {\n listenersRef.current.add(listener);\n return () => {\n listenersRef.current.delete(listener);\n };\n },\n setDispatcher: (d: Dispatcher | null) => {\n if (d && dispatcherRef.current && dispatcherRef.current !== d && !warnedRef.current) {\n warnedRef.current = true;\n warnSharedScope();\n }\n dispatcherRef.current = d;\n return () => { if (dispatcherRef.current === d) dispatcherRef.current = null; };\n },\n setDepRegistry: (r: DepRegistry | null) => {\n wiredDepRegRef.current = r;\n return () => { if (wiredDepRegRef.current === r) wiredDepRegRef.current = null; };\n },\n begin: (id: string, params?: Record<string, unknown>) => {\n const disp = dispatcherRef.current;\n if (!disp) return null;\n const r = wiredDepRegRef.current ?? depRegRef.current;\n const a = actionsRef.current.get(id);\n // Same resolution order as `trigger`: the action's declared `requires`\n // when it has one, the legacy fixed bag otherwise. The fixed bag has no\n // `applyOps`, so the paint actions — which declare it and are the only\n // callers of `begin` — used to fall back to the scene's own history\n // instead of the consumer's.\n const deps = !r\n ? {}\n : a?.requires\n ? buildDepsFromRequires(a, r)\n : {\n selection: r.get('selection' as DepName),\n scene: r.get('scene' as DepName),\n history: r.get('history' as DepName),\n view: r.get('view' as DepName),\n pointer: r.get('pointer' as DepName),\n activeTool: r.get('activeTool' as DepName),\n booleansAdapter: r.get('booleansAdapter' as DepName),\n };\n return disp.beginUiOngoing(id, deps as never, params);\n },\n };\n }, []);\n\n return <ActionsContext.Provider value={registry}>{children}</ActionsContext.Provider>;\n}\n\n/**\n * @experimental\n * Returns the parent `ActionsRegistry`, or `null` when no provider is in scope.\n */\n/**\n * `import.meta.env.DEV` read through a cast — core must not depend on a\n * bundler's ambient augmentation (`vite/client`) to compile. Mirrors the same\n * cast in SceneCanvas.tsx, dispatcher.ts and buildDeps.ts.\n */\nconst IS_DEV: boolean = (() => {\n try {\n return Boolean((import.meta as unknown as { env?: { DEV?: boolean } }).env?.DEV);\n } catch {\n return false;\n }\n})();\n\nexport function useActionsRegistry(): ActionsRegistry | null {\n return useContext(ActionsContext);\n}\n\n/**\n * @experimental\n * Register an `Action` for the lifetime of the calling component. No-op (with\n * a dev-only warning) when no `ActionsProvider` is in scope. Re-registers on\n * `action` reference change (consumers should memoize stable identities to\n * avoid churn).\n */\nexport function useAction(action: Action): void {\n const reg = useActionsRegistry();\n useEffect(() => {\n if (!reg) {\n if (IS_DEV) {\n console.warn(\n `useAction(\"${action.id}\"): no <ActionsProvider> is in scope, so the action was not registered and its bindings will never fire.`,\n );\n }\n return;\n }\n return reg.register(action);\n }, [reg, action]);\n}\n","import type { Tool } from '../../types';\nimport type { GestureSpec, ModSpec, TargetSpec, PhaseSpec } from '@weasel-js/gestures';\nimport type { ParsedModifiers, ModifierKey, PhaseAtom } from '../routeGrammar';\nimport { formatRoute } from '../routeGrammar';\nimport { getGestureDescriptor, isKnownGestureName, type GestureName } from '../gestures';\n\n/**\n * One row in the route registry — a single `GestureBinding` on one tool,\n * flattened into the route grammar's vocabulary so the inspector, the\n * conflict checker, and `describeRoute` can all read the same shape.\n *\n * Multiple rows can share (gesture, arg, target, modifiers) if different tools\n * declare them; consumers walk the list and group client-side.\n */\nexport interface RegistryEntry {\n toolId: string;\n /** Which phase the binding's `phase` spec restricts it to. `'any'` when it\n * declares none, declares `'*'`, or declares an atom list whose atoms\n * don't agree on one phase — such a binding fires in either phase, and\n * reporting it as `'initial'` made it collide with genuinely-initial\n * bindings in `findConflicts`' bucket key. */\n phase: 'initial' | 'engaged' | 'any';\n /** Structured v3 modifier requirements. Empty object = \"no modifiers\n * held\" (the strict default). */\n modifiers: ParsedModifiers;\n gesture: GestureName;\n /** Resolved arg value for arg-bearing gestures (wheel direction,\n * key name, multiTouchTap fingers). Undefined for gestures whose\n * descriptor has no `arg`. */\n arg: string | undefined;\n /** Target class for hit-testing gestures. `undefined` when the descriptor\n * has `hasTarget: false` or the spec declares no target;\n * {@link PREDICATE_TARGET} when the spec uses a `kindOf` predicate, which\n * the route grammar has no notation for. */\n target: string | undefined;\n /** The action this binding fires. */\n actionId: string;\n /** The `GestureSpec` this row was flattened from, by reference. Reflection\n * consumers that need something the grammar doesn't capture — the\n * specificity tuple, a `kindOf` predicate identity — read it here rather\n * than re-walking `Tool.bindings`. */\n spec: GestureSpec;\n}\n\n/**\n * Stand-in target for a `{ kindOf }` predicate spec.\n *\n * The route grammar can name target *classes* (`empty`, `selected-body`,\n * `kind:rect`) but not arbitrary predicates, so three distinct select-tool\n * bindings all render as this one token. Narrowing it would mean giving the\n * grammar a way to describe a function, which is a real design question and\n * not one this reflection layer should answer by inventing syntax.\n */\nexport const PREDICATE_TARGET = 'predicate';\n\n/** `GestureSpec.kind` → route-grammar gesture name. `multiTouch` has no\n * route-grammar gesture (only its tap synthesis does), so specs of that kind\n * are skipped. Read it through {@link routeGestureForSpecKind} — a second\n * copy of this table typechecks while silently disagreeing, which is how\n * drop and paste went missing from the draw inspector. */\nconst SPEC_KIND_TO_GESTURE: Record<GestureSpec['kind'], GestureName | undefined> = {\n key: 'keyDown',\n 'key-held': 'keyHeld',\n wheel: 'wheel',\n click: 'click',\n doubleClick: 'dblTap',\n contextMenu: 'contextMenu',\n longPress: 'longPress',\n drag: 'drag',\n pointerDown: 'pointerDown',\n multiTouch: undefined,\n multiTouchTap: 'multiTouchTap',\n drop: 'drop',\n paste: 'paste',\n};\n\n/**\n * Flatten every tool's `bindings` into route-registry rows.\n *\n * This was `buildActionRegistry`, and it walked `ToolDef.initial` /\n * `.engaged` phase tables — the grammar that no longer exists. It was also\n * blind to `Tool.bindings` the entire time the two lived side by side, which\n * is why the inspector under-reported select by more than half. The rename\n * fixes a second thing: it never had anything to do with the Actions\n * Registry, and reading `buildActionRegistry` next to `ActionsRegistry`\n * suggested otherwise.\n */\nexport function buildRouteRegistry(\n tools: readonly Tool<unknown>[],\n): RegistryEntry[] {\n const out: RegistryEntry[] = [];\n for (const tool of tools) {\n for (const binding of tool.bindings ?? []) {\n const entry = entryFor(tool.id, binding.spec, binding.actionId);\n if (entry) out.push(entry);\n }\n }\n return out;\n}\n\n/** The route-grammar gesture a `GestureSpec.kind` routes as, or `undefined`\n * for kinds the grammar has no name for. */\nexport function routeGestureForSpecKind(\n kind: GestureSpec['kind'],\n): GestureName | undefined {\n const gesture = SPEC_KIND_TO_GESTURE[kind];\n return gesture && isKnownGestureName(gesture) ? gesture : undefined;\n}\n\n/**\n * Every route string one `GestureSpec` declares, in route-grammar notation.\n *\n * One string per arg alternative — a spec bound to `['ArrowUp','ArrowDown']`\n * yields two routes, because each is separately conflictable and separately\n * readable. Returns `[]` for spec kinds the grammar can't name.\n *\n * This is the display counterpart to {@link buildRouteRegistry}: same\n * projection of a spec onto the grammar, rendered as text instead of as a\n * conflict-checkable row.\n */\nexport function routesForSpec(spec: GestureSpec): readonly string[] {\n const gesture = routeGestureForSpecKind(spec.kind);\n if (!gesture) return [];\n const descriptor = getGestureDescriptor(gesture);\n const modifiers = parseModSpec('mods' in spec ? spec.mods : undefined);\n const phases = phaseAtomsForSpec('phase' in spec ? spec.phase : undefined);\n const target = descriptor.hasTarget\n ? routeTargetForSpec('target' in spec ? spec.target : undefined) ?? '*'\n : undefined;\n const args = descriptor.arg\n ? routeArgsForSpec(spec, descriptor.arg.default)\n : [undefined];\n return args.map((arg) => formatRoute({ phases, gesture, arg, target, modifiers }));\n}\n\nfunction entryFor(\n toolId: string,\n spec: GestureSpec,\n actionId: string,\n): RegistryEntry | null {\n const gesture = SPEC_KIND_TO_GESTURE[spec.kind];\n if (!gesture || !isKnownGestureName(gesture)) return null;\n const descriptor = getGestureDescriptor(gesture);\n return {\n toolId,\n actionId,\n gesture,\n phase: phaseOf('phase' in spec ? spec.phase : undefined),\n modifiers: parseModSpec('mods' in spec ? spec.mods : undefined),\n arg: descriptor.arg ? argOf(spec, descriptor.arg.default) : undefined,\n target: descriptor.hasTarget\n ? routeTargetForSpec('target' in spec ? spec.target : undefined)\n : undefined,\n spec,\n };\n}\n\n/** Collapse a `PhaseSpec` to the single phase a binding is restricted to, or\n * `'any'` when it isn't restricted to one.\n *\n * `PhaseAtom.channel` says which channel's phase state the binding reads,\n * not which phase it fires in, so it plays no part in this collapse — only\n * the set of distinct `atom.phase` values matters. */\nfunction phaseOf(phase: PhaseSpec | undefined): 'initial' | 'engaged' | 'any' {\n if (phase === undefined || phase === '*') return 'any';\n if (phase === 'initial' || phase === 'engaged') return phase;\n const distinct = new Set(phase.map((atom) => atom.phase));\n if (distinct.size !== 1) return 'any';\n const only = [...distinct][0];\n return only === 'initial' || only === 'engaged' ? only : 'any';\n}\n\n/** `ModSpec` (per-key tri-state) → `ParsedModifiers`. `false` and absent both\n * mean \"must not be held\", which the parsed form spells as an absent key. */\nfunction parseModSpec(mods: ModSpec | undefined): ParsedModifiers {\n if (!mods) return {};\n const out: ParsedModifiers = {};\n for (const [name, req] of Object.entries(mods)) {\n if (req === true) out[name as ModifierKey] = 'required';\n else if (req === 'optional') out[name as ModifierKey] = 'optional';\n }\n return out;\n}\n\n/** Expand a `PhaseSpec` to the atoms `formatRoute` renders. A spec with no\n * `phase` matches in either phase, which the grammar spells `[*]`. */\nfunction phaseAtomsForSpec(phase: PhaseSpec | undefined): readonly PhaseAtom[] {\n if (phase === undefined) return [{ channel: '&', phase: '*' }];\n if (phase === 'initial' || phase === 'engaged' || phase === '*') {\n return [{ channel: '&', phase }];\n }\n return phase;\n}\n\nfunction routeTargetForSpec(target: TargetSpec | undefined): string | undefined {\n if (target === undefined) return undefined;\n return typeof target === 'string' ? target : PREDICATE_TARGET;\n}\n\n/** Every arg value a spec's route slot can take, one per alternative. Both\n * the registry row and the route string read the arg here. */\nfunction routeArgsForSpec(\n spec: GestureSpec,\n fallback: string | undefined,\n): readonly (string | undefined)[] {\n if ('key' in spec) return Array.isArray(spec.key) ? spec.key : [spec.key];\n if ('fingers' in spec) return [String(spec.fingers)];\n if ('direction' in spec) return [spec.direction ?? fallback];\n if ('types' in spec) return [spec.types?.length ? spec.types.join('|') : fallback];\n return [fallback];\n}\n\nfunction argOf(spec: GestureSpec, fallback: string | undefined): string | undefined {\n const args = routeArgsForSpec(spec, fallback);\n return args.length > 1 ? args.join('|') : args[0];\n}\n\n// Re-export for downstream consumers.\nexport { getGestureDescriptor };\nexport type { GestureName };\n","import type { Tool } from '../../types';\nimport { actionBindings, type Action } from '../../../interactions/actions/registry';\nimport type { ParsedModifiers } from '../routeGrammar';\nimport { canonicalModifiers, formatRoute } from '../routeGrammar';\nimport { buildRouteRegistry, PREDICATE_TARGET, type RegistryEntry, type GestureName } from './registry';\n\n/** Two or more tools declare the same exact (phase, gesture, arg, target,\n * modifiers) tuple — the dispatcher's slot precedence picks one\n * arbitrarily (well, deterministically by slot order, but the author\n * probably didn't intend the duplication). */\nexport interface Conflict {\n phase: 'initial' | 'engaged' | 'any';\n gesture: GestureName;\n arg: string | undefined;\n target: string | undefined;\n modifiers: ParsedModifiers;\n /** All tool ids that registered the same tuple. At least 2 by\n * construction. Order matches the input tools[] order. */\n toolIds: string[];\n}\n\n/** Detect exact-tuple overlaps across a tool registration set.\n *\n * Intentionally NOT flagged:\n * - Broad vs. narrow targets (e.g. an untargeted `click` alongside\n * `click` on `empty`) — the dispatcher's specificity ordering resolves\n * those cleanly, and the broad one is usually the intended fallback.\n * - Different modifier requirements on the same target — they fire on\n * different inputs.\n * - A binding whose action declines via `enabled()` so a lower-priority\n * one can take the gesture. Detecting that intent would mean evaluating\n * the action; consumers can suppress known-intentional compositions in\n * their UI layer.\n *\n * - Two `{ kindOf }` predicate targets. The route grammar renders every\n * predicate as the single token {@link PREDICATE_TARGET}, so bucketing on\n * the rendered target alone reported select's `resize` / `rotate` / `move`\n * drags — three genuinely different predicates — as a three-way conflict.\n * Predicate entries bucket by function identity instead, which means two\n * *separately written but equivalent* predicates go unflagged. That's the\n * right way to be wrong here: this check has to be silent when nothing is\n * wrong or nobody will keep it on.\n *\n * Note that two bindings sharing a tuple on the SAME tool are now possible\n * (bindings are an array, where phase tables were objects with unique\n * keys) — so a conflict may name one tool twice.\n *\n * This is the raw same-tuple detector. Feeding it a whole tool *registry*\n * over-reports, because registry tools take turns in the active slot and\n * can't collide with each other — see {@link findScopedConflicts}.\n */\nexport function findConflicts(\n tools: readonly Tool<unknown>[],\n): Conflict[] {\n const entries = buildRouteRegistry(tools);\n const groups = new Map<string, RegistryEntry[]>();\n for (const entry of entries) {\n const key = `${entry.phase}|${entry.gesture}|${entry.arg ?? ''}|${targetKey(entry)}|${canonicalModifiers(entry.modifiers)}`;\n const bucket = groups.get(key);\n if (bucket) bucket.push(entry);\n else groups.set(key, [entry]);\n }\n const conflicts: Conflict[] = [];\n for (const bucket of groups.values()) {\n if (bucket.length < 2) continue;\n const first = bucket[0];\n conflicts.push({\n phase: first.phase,\n gesture: first.gesture,\n arg: first.arg,\n target: first.target,\n modifiers: first.modifiers,\n toolIds: bucket.map((e) => e.toolId),\n });\n }\n return conflicts;\n}\n\n/** Bucket key for an entry's target slot. Predicate targets all render as\n * the same grammar token, so they're keyed by the predicate's identity —\n * two different functions are two different targets. */\nfunction targetKey(entry: RegistryEntry): string {\n if (entry.target !== PREDICATE_TARGET) return entry.target ?? '';\n const spec = entry.spec as { target?: unknown };\n const pred = spec.target;\n if (typeof pred !== 'object' || pred === null) return PREDICATE_TARGET;\n return `${PREDICATE_TARGET}#${predicateId(pred)}`;\n}\n\nconst PREDICATE_IDS = new WeakMap<object, number>();\nlet nextPredicateId = 0;\n\nfunction predicateId(pred: object): number {\n let id = PREDICATE_IDS.get(pred);\n if (id === undefined) {\n id = nextPredicateId++;\n PREDICATE_IDS.set(pred, id);\n }\n return id;\n}\n\n/**\n * The tool scopes as the dispatcher sees them — which is what decides whether\n * two same-tuple bindings can actually collide.\n */\nexport interface ToolScopes {\n /** Tools eligible for the active slot, keyed by id or as a flat list. */\n registry: readonly Tool<unknown>[] | Readonly<Record<string, Tool<unknown>>>;\n /** Always-on tools. Every one of these is live at once. */\n ambient?: readonly Tool<unknown>[];\n /** Registered actions. Their `defaultBinding`s assemble at ambient scope\n * (hotkey scope when `Action.scope` says so), alongside the tools above. */\n actions?: readonly Action[];\n}\n\n/** An action's `defaultBinding`s in the shape the route registry reads, so a\n * tool-vs-action collision buckets with the tool-vs-tool ones. */\nfunction actionAsTool(action: Action): Tool<unknown> {\n return { id: action.id, eligibility: {}, bindings: actionBindings(action) };\n}\n\n/**\n * Detect the same-tuple overlaps that are *reachable* — the ones where the\n * dispatcher really does fall back on declaration order.\n *\n * `matchSorted` walks scopes in strict priority (hotkey > active > ambient)\n * and only sorts by specificity *within* a scope. So a cross-scope tie isn't\n * a tie at all: an ambient tool losing a tuple to the active tool is the\n * documented design, not an accident. Likewise two registry tools sharing a\n * tuple — `rect` and `ellipse` both binding a bare `drag` — can never both be\n * in the active slot, so they never compete.\n *\n * What's left, and what this reports:\n * - a single tool colliding with **itself** (possible since bindings became\n * an array), which is ambiguous in whichever slot it occupies;\n * - two **ambient** tools, all of which are live simultaneously and are\n * ordered only by registration;\n * - two **hotkey-capable** tools, which can stack.\n *\n * Registered actions join the same two buckets: their `defaultBinding`s\n * assemble at ambient scope (hotkey scope when `Action.scope` says so), so an\n * ambient tool and an action claiming one tuple really do fall back on\n * declaration order.\n */\nexport function findScopedConflicts(scopes: ToolScopes): Conflict[] {\n const registry = Array.isArray(scopes.registry)\n ? (scopes.registry as readonly Tool<unknown>[])\n : Object.values(scopes.registry as Readonly<Record<string, Tool<unknown>>>);\n const actions = scopes.actions ?? [];\n const ambientActions = actions.filter((a) => a.scope !== 'hotkey').map(actionAsTool);\n const hotkeyActions = actions.filter((a) => a.scope === 'hotkey').map(actionAsTool);\n const ambient = [...(scopes.ambient ?? []), ...ambientActions];\n\n const out: Conflict[] = [];\n const seen = new Set<string>();\n const add = (conflicts: readonly Conflict[]): void => {\n for (const c of conflicts) {\n const key = `${c.phase}|${c.gesture}|${c.arg ?? ''}|${c.target ?? ''}`\n + `|${canonicalModifiers(c.modifiers)}|${c.toolIds.join(',')}`;\n if (seen.has(key)) continue;\n seen.add(key);\n out.push(c);\n }\n };\n\n // Self-collisions: every tool, whichever slot it lands in.\n for (const tool of [...registry, ...(scopes.ambient ?? [])]) add(findConflicts([tool]));\n // Ambient tools and ambient-scope actions are all live together.\n if (ambient.length > 1) add(findConflicts(ambient));\n // Hotkey-capable tools can stack on each other. `hotkey` is declared on the\n // authored `ToolDef`, not carried onto the runtime `Tool` — `Tool.def` is\n // the reflection handle for exactly this kind of read, and it's typed\n // `unknown` so consumers cast at the use site.\n const hotkey = [\n ...registry.filter((t) => (t.def as { hotkey?: unknown } | undefined)?.hotkey !== undefined),\n ...hotkeyActions,\n ];\n if (hotkey.length > 1) add(findConflicts(hotkey));\n\n return out;\n}\n\n/**\n * Render a conflict as one line of human-readable text.\n *\n * The tuple is printed through {@link formatRoute}, so the message names the\n * collision in the same grammar the author wrote the binding in — modulo the\n * phase slot, which prints as a bare `'&'`-channel atom because the bucket key\n * collapses channel-bearing phase specs (`sel:engaged` and `&:engaged` collide\n * with each other, and the collapse is what made them collide).\n */\nexport function formatConflict(conflict: Conflict): string {\n const route = formatRoute({\n phases: [{ channel: '&', phase: conflict.phase === 'any' ? '*' : conflict.phase }],\n gesture: conflict.gesture,\n arg: conflict.arg,\n target: conflict.target,\n modifiers: conflict.modifiers,\n });\n return `${route} — declared by ${conflict.toolIds.join(', ')}`;\n}\n\n/**\n * Detect reachable route conflicts in an assembled tool set and report each one.\n *\n * This is the wiring `findConflicts` spent its first life without: the kit\n * could detect the one class of genuine routing ambiguity it has and never\n * looked. Call it once wherever a tool set is assembled (`useTools` does),\n * behind a `process.env.NODE_ENV !== 'production'` guard.\n *\n * **Warn, never throw.** A conflict between a consumer's tool and a kit tool\n * is a design question — sometimes deliberate, since the loser can still take\n * the gesture by declining through `enabled()` — and exploding in a running\n * app is the wrong way to raise it. A conflict between two *kit* tools is\n * always a bug, but the place to fail on that is the kit's own test suite\n * (`canvas/SceneCanvas.routeConflicts.test.tsx`), not a consumer's console.\n *\n * @returns The conflicts found, so callers can dedupe repeat reports.\n */\nexport function reportRouteConflicts(\n scopes: ToolScopes,\n warn: (message: string) => void = (m) => console.warn(m),\n): Conflict[] {\n const conflicts = findScopedConflicts(scopes);\n for (const c of conflicts) {\n warn(\n `[weasel] route conflict: two bindings declare the same (phase, gesture, arg, target, modifiers) tuple `\n + `in the same scope, so declaration order alone decides which one fires.\\n ${formatConflict(c)}`,\n );\n }\n return conflicts;\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -4,8 +4,8 @@ import { a as ViewTransform, V as View, Z as ZoomBound, b as ZoomFactor } from '
4
4
  export { s as screenToWorld, v as viewToTransform, w as worldToScreen } from './view-DSQgxBJB.js';
5
5
  import { a as UnitValue, b as UnitSystem, U as UseMoveOptions, O as OriginProjection } from './grid-nnXU4VjN.js';
6
6
  export { I as IMPERIAL_INCHES, M as METRIC_MM, P as PIXELS, R as RECT_ORIGIN_PROJECTION, c as Unit, f as formatUnit, g as gridSnapStrategy, p as pointToGridCell, r as resolveUnit } from './grid-nnXU4VjN.js';
7
- import { R as RenderLayer, D as Dims, a as DeviceProfile, b as DetectedDeviceFacts, C as Condition, c as Rule, d as RuleCtx, V as VisibilityRules, e as ChromeCtx, f as ChromeId, A as Action, g as ViewAnimationOptions, h as DepSchema, S as SliceDep, i as ActionsRegistry, T as Tool, j as AffordanceHit, k as Dispatcher, l as ToolDef, m as ViewportToolDef, n as AnyTool, O as OverlayPosition, o as ToolKeybinding, H as HotkeyTrigger, L as LayerHit, p as OngoingOverlay, q as ChromeState, r as SelectionApi, U as UseSelectionOptions, I as InsertExtras, B as BuiltinShapeToolId, G as GeometryProjection, s as ContentHandlerEntry, t as SvgIngestOptions, u as ActionsProp, v as Animator, w as Affordance, x as AffordanceRegion, y as AffordanceBinding, z as CommonAffordanceScratch, E as ColorOverrideRegistry, F as BooleansAdapter, J as UseAnimatorOptions, K as SpringPresetName, M as EasingSpec, N as AnimationHandle, P as VertexColorChannel, Q as SampledTrack, W as Eligibility, X as BindingScope, Y as Contribution, Z as ScopedBinding } from './registry-sBLZYWI1.js';
8
- export { _ as ALWAYS, $ as ActionDeps, a0 as ActionDisabledReason, a1 as ActionEnabledResult, a2 as ActionEntry, a3 as ActionsProvider, a4 as ActiveToolContextProvider, a5 as ActiveToolContextProviderIfRoot, a6 as ActiveToolContextProviderProps, a7 as ActiveToolContextValue, a8 as AnimateToBoundsOptions, a9 as AreaSelectDep, aa as BezierEasing, ab as BindingOpts, ac as BooleanOp, ad as BooleanOpResult, ae as BoundGesture, af as BuildRuleCtxArgs, ag as ClaimableGesture, ah as ClipboardDep, ai as ClipboardIngestCtx, aj as ColorOverride, ak as ColorOverrideFn, al as CustomPaintContext, am as DecayOptions, an as DepName, ao as DepRegistry, ap as DepRegistryProvider, aq as DispatcherContext, ar as DragSample, as as EASINGS, at as EasingFn, au as EasingName, av as EditAnchorsDep, aw as EventTrack, ax as GestureBinding, ay as IDENTITY_POSE_COMPOSITION, az as ImmediateInvoker, aA as IngestCtx, aB as IngestionDep, aC as InsertDep, aD as Interpolate, aE as InterpolatorFactory, aF as InvocationCtx, aG as Invoker, aH as KIT_SHAPE_KINDS, aI as Keyframe, aJ as LassoSelectDep, aK as LayerCommandCache, aL as LayoutDep, aM as LoopFactory, aN as LoopOptions, aO as MatchResult, aP as NEVER, aQ as NestedTimeline, aR as NodeAtPointDep, aS as OngoingHandle, aT as OngoingInvoker, aU as PhysicsHandle, aV as PhysicsOptions, aW as Point2, aX as PointerContextProvider, aY as PointerContextValue, aZ as PointerWorldPos, a_ as PoseAdapter, a$ as PoseComposition, b0 as ResizePolicy, b1 as ResolveAllOptions, b2 as ResolveOnlyResult, b3 as ResolvedCandidate, b4 as SPRING_PRESETS, b5 as SelectionExtendKey, b6 as SelectionMode, b7 as Selector, b8 as SnapDep, b9 as SpringOptions, ba as SpringPreset, bb as StaggerBuilder, bc as StaggerDelay, bd as StaggerFactory, be as StaggerOptions, bf as StaggerPerItem, bg as StaggerSpringPoseOptions, bh as StaggerTweenOptions, bi as SvgUnpacker, bj as TextEditDep, bk as TimelineHandle, bl as TimelineOptions, bm as TimelineTrack, bn as ToolCtx, bo as ToolModifiers, bp as ToolPresentation, bq as ToolSlot, br as Track, bs as TweenLoopOptions, bt as TweenOptions, bu as UiOngoingControl, bv as VIEW_ANIMATION_KEY, bw as ViewAnimationApi, bx as ViewApi, by as ViewChannel, bz as actionBindings, bA as applyBooleanOp, bB as buildRuleCtx, bC as clipboardCopyAction, bD as clipboardCutAction, bE as composeRectPose, bF as composeWorldPose, bG as createDispatcher, bH as cubicBezierEasing, bI as decomposeRectPose, bJ as describeRule, bK as drawLayers, bL as drawOneLayer, bM as easeIn, bN as easeInBack, bO as easeInBounce, bP as easeInCirc, bQ as easeInCubic, bR as easeInElastic, bS as easeInExpo, bT as easeInOut, bU as easeInOutBack, bV as easeInOutBounce, bW as easeInOutCirc, bX as easeInOutCubic, bY as easeInOutElastic, bZ as easeInOutExpo, b_ as easeInOutQuad, b$ as easeInOutQuart, c0 as easeInOutQuint, c1 as easeInOutSine, c2 as easeInQuad, c3 as easeInQuart, c4 as easeInQuint, c5 as easeInSine, c6 as easeOut, c7 as easeOutBack, c8 as easeOutBounce, c9 as easeOutCirc, ca as easeOutCubic, cb as easeOutElastic, cc as easeOutExpo, cd as easeOutQuad, ce as easeOutQuart, cf as easeOutQuint, cg as easeOutSine, ch as enterTextEditAction, ci as evaluate, cj as evaluateEnabled, ck as isLayerPainted, cl as isLayerVisible, cm as linear, cn as rebaseLocalPose, co as registerContentHandler, cp as resolveEasing, cq as resolveParams, cr as sliceAction, cs as specificity, ct as translateRectPose, cu as useAction, cv as useActionsRegistry, cw as useActiveToolContext, cx as useDepRegistry, cy as useDepSource, cz as useOptionalActiveToolContext, cA as useOptionalDepRegistry, cB as usePointerContext, cC as useSelection, cD as useViewAnimation, cE as worldPoseLookup } from './registry-sBLZYWI1.js';
7
+ import { R as RenderLayer, D as Dims, a as DeviceProfile, b as DetectedDeviceFacts, C as Condition, c as Rule, d as RuleCtx, V as VisibilityRules, e as ChromeCtx, f as ChromeId, A as Action, g as ViewAnimationOptions, h as DepSchema, S as SliceDep, i as ActionsRegistry, T as Tool, j as AffordanceHit, k as Dispatcher, l as ToolDef, m as ViewportToolDef, n as AnyTool, O as OverlayPosition, o as ToolKeybinding, H as HotkeyTrigger, L as LayerHit, p as OngoingOverlay, q as ChromeState, r as SelectionApi, U as UseSelectionOptions, I as InsertExtras, B as BuiltinShapeToolId, G as GeometryProjection, s as ContentHandlerEntry, t as SvgIngestOptions, u as ActionsProp, v as Animator, w as Affordance, x as AffordanceRegion, y as AffordanceBinding, z as CommonAffordanceScratch, E as ColorOverrideRegistry, F as BooleansAdapter, J as UseAnimatorOptions, K as SpringPresetName, M as EasingSpec, N as AnimationHandle, P as VertexColorChannel, Q as SampledTrack, W as Eligibility, X as BindingScope, Y as Contribution, Z as ScopedBinding } from './registry-CxSEyDka.js';
8
+ export { _ as ALWAYS, $ as ActionDeps, a0 as ActionDisabledReason, a1 as ActionEnabledResult, a2 as ActionEntry, a3 as ActionsProvider, a4 as ActiveToolContextProvider, a5 as ActiveToolContextProviderIfRoot, a6 as ActiveToolContextProviderProps, a7 as ActiveToolContextValue, a8 as AnimateToBoundsOptions, a9 as AreaSelectDep, aa as BezierEasing, ab as BindingOpts, ac as BooleanOp, ad as BooleanOpResult, ae as BoundGesture, af as BuildRuleCtxArgs, ag as ClaimableGesture, ah as ClipboardDep, ai as ClipboardIngestCtx, aj as ColorOverride, ak as ColorOverrideFn, al as CustomPaintContext, am as DecayOptions, an as DepName, ao as DepRegistry, ap as DepRegistryProvider, aq as DispatcherContext, ar as DragSample, as as EASINGS, at as EasingFn, au as EasingName, av as EditAnchorsDep, aw as EventTrack, ax as GestureBinding, ay as IDENTITY_POSE_COMPOSITION, az as ImmediateInvoker, aA as IngestCtx, aB as IngestionDep, aC as InsertDep, aD as Interpolate, aE as InterpolatorFactory, aF as InvocationCtx, aG as Invoker, aH as KIT_SHAPE_KINDS, aI as Keyframe, aJ as LassoSelectDep, aK as LayerCommandCache, aL as LayoutDep, aM as LoopFactory, aN as LoopOptions, aO as MatchResult, aP as NEVER, aQ as NestedTimeline, aR as NodeAtPointDep, aS as OngoingHandle, aT as OngoingInvoker, aU as PhysicsHandle, aV as PhysicsOptions, aW as Point2, aX as PointerContextProvider, aY as PointerContextValue, aZ as PointerWorldPos, a_ as PoseAdapter, a$ as PoseComposition, b0 as ResizePolicy, b1 as ResolveAllOptions, b2 as ResolveOnlyResult, b3 as ResolvedCandidate, b4 as SPRING_PRESETS, b5 as SelectionExtendKey, b6 as SelectionMode, b7 as Selector, b8 as SnapDep, b9 as SpringOptions, ba as SpringPreset, bb as StaggerBuilder, bc as StaggerDelay, bd as StaggerFactory, be as StaggerOptions, bf as StaggerPerItem, bg as StaggerSpringPoseOptions, bh as StaggerTweenOptions, bi as SvgUnpacker, bj as TextEditDep, bk as TimelineHandle, bl as TimelineOptions, bm as TimelineTrack, bn as ToolCtx, bo as ToolModifiers, bp as ToolPresentation, bq as ToolSlot, br as Track, bs as TweenLoopOptions, bt as TweenOptions, bu as UiOngoingControl, bv as VIEW_ANIMATION_KEY, bw as ViewAnimationApi, bx as ViewApi, by as ViewChannel, bz as actionBindings, bA as applyBooleanOp, bB as buildRuleCtx, bC as clipboardCopyAction, bD as clipboardCutAction, bE as composeRectPose, bF as composeWorldPose, bG as createDispatcher, bH as cubicBezierEasing, bI as decomposeRectPose, bJ as describeRule, bK as drawLayers, bL as drawOneLayer, bM as easeIn, bN as easeInBack, bO as easeInBounce, bP as easeInCirc, bQ as easeInCubic, bR as easeInElastic, bS as easeInExpo, bT as easeInOut, bU as easeInOutBack, bV as easeInOutBounce, bW as easeInOutCirc, bX as easeInOutCubic, bY as easeInOutElastic, bZ as easeInOutExpo, b_ as easeInOutQuad, b$ as easeInOutQuart, c0 as easeInOutQuint, c1 as easeInOutSine, c2 as easeInQuad, c3 as easeInQuart, c4 as easeInQuint, c5 as easeInSine, c6 as easeOut, c7 as easeOutBack, c8 as easeOutBounce, c9 as easeOutCirc, ca as easeOutCubic, cb as easeOutElastic, cc as easeOutExpo, cd as easeOutQuad, ce as easeOutQuart, cf as easeOutQuint, cg as easeOutSine, ch as enterTextEditAction, ci as evaluate, cj as evaluateEnabled, ck as isLayerPainted, cl as isLayerVisible, cm as linear, cn as rebaseLocalPose, co as registerContentHandler, cp as resolveEasing, cq as resolveParams, cr as sliceAction, cs as specificity, ct as translateRectPose, cu as useAction, cv as useActionsRegistry, cw as useActiveToolContext, cx as useDepRegistry, cy as useDepSource, cz as useOptionalActiveToolContext, cA as useOptionalDepRegistry, cB as usePointerContext, cC as useSelection, cD as useViewAnimation, cE as worldPoseLookup } from './registry-CxSEyDka.js';
9
9
  import { Stroke, FillStyle, TextureHandle, TilePatternSpec, GradientKind, GradStop, GradientFill, GradientUnits, MarkerKey, MarkerRef } from '@weasel-js/paint';
10
10
  export { FillStyle, GradStop, GradientFill, GradientKind, GradientUnits, KitMarkerKey, MarkerKey, MarkerRef, Region, STROKE_DASH_RATIOS, Stroke, StrokeAlign, StrokeDashStyle, TextureHandle, TilePatternSpec, alignedStrokeRect, dashForStrokeStyle, strokeDashStyleOf } from '@weasel-js/paint';
11
11
  import { R as RectPose, S as Scene, N as NodeId, a as Node$1, b as SerializedScene, U as UseSceneOptions, c as SceneRegistry, d as RegisteredOp } from './types-DIQAisSG.js';
@@ -18,6 +18,8 @@ import { M as ModifierState, R as ResizePose, B as BoundsConstraint, P as PointS
18
18
  export { A as ActionBehavior, f as AreaSelectOverlay, g as BehaviorMoveResult, h as BehaviorResult, C as CloneBehavior, i as CloneLayer, j as ClonePose, G as GestureContext, k as GroupTransform, l as InsertMoveResult, m as InsertOverlay, n as InsertPoint, o as InsertProposed, p as LassoSelectMoveResult, q as LassoSelectOverlay, r as LassoSelectPose, s as LassoSelectProposed, t as PointSnapContext, d as PointSnapFrame, u as PointSnapResult, v as PointerState, w as ResizeMoveResult, x as ResizeOverlay, y as ResizeProposed, z as RotateMoveResult, D as RotateOverlay, E as RotateProposed } from './types-miXHGrZM.js';
19
19
  import { U as UseResizeOptions } from './pointSnapToGrid-Dmthv94u.js';
20
20
  export { C as CORNER_ANCHORS, a as CornerAnchor, e as CornerEdge, b as CornerHandle, c as cornerPoint, d as cornerResizeHandles, h as hitCornerHandle, p as pointSnapToGrid } from './pointSnapToGrid-Dmthv94u.js';
21
+ import { ResolvedCursor, CursorSpec } from '@weasel-js/cursor';
22
+ export { BakeOptions, CursorGlyph, CursorGlyphName, CursorGlyphSpec, CursorSpec, ResolvedCursor, bakeCursor, cursorFor, resolveCursor, resolveCursorTier } from '@weasel-js/cursor';
21
23
  import { M as MoveAdapter, A as AreaSelectAdapter, R as RotateAdapter, b as LassoHitMode, c as LassoSelectAdapter, d as ResizeAdapter, L as LayoutStrategy, e as LayerEnumerableAdapter, I as InsertAdapter, C as ClipboardSnapshot, O as OrderedAdapter, a as SceneAdapter, f as LayoutSnap } from './types-XBcDEp3Y.js';
22
24
  export { g as ContainerBounds, D as DropTarget, h as LayoutChild, i as LayoutContainer, j as LayoutDragged, S as SnapTarget } from './types-XBcDEp3Y.js';
23
25
  import { D as DebugSink, a as DebugConfig, b as DebugSnapshot, c as DebugStrokes, d as DebugTheme } from './types-BHK2dkMu.js';
@@ -2233,6 +2235,52 @@ declare function useResizePolicy<TPose>(options: UseResizePolicyOptions<TPose>):
2233
2235
  * run against the consumer's geometry. */
2234
2236
  declare function useSliceDep(dep: SliceDep): void;
2235
2237
 
2238
+ /**
2239
+ * The painted cursor a surface is currently showing, shared between whoever
2240
+ * decides it and the layer that draws it.
2241
+ *
2242
+ * Two slots rather than one, mirroring the precedence the cursor pipeline
2243
+ * already has: `<Canvas>` writes the active tool's cursor to `base` from
2244
+ * render, and the hover pump writes an affordance's or an action's cursor to
2245
+ * `override` imperatively. The override wins while it is set, and clearing it
2246
+ * restores the base without a React commit — the same reason the pump uses an
2247
+ * inline style for the CSS tier.
2248
+ */
2249
+
2250
+ /** The painted arm of `ResolvedCursor` — what this module stores. */
2251
+ type PaintedCursor = Extract<ResolvedCursor, {
2252
+ kind: 'painted';
2253
+ }>;
2254
+ interface PaintedCursorFrame {
2255
+ readonly cursor: PaintedCursor;
2256
+ /** Pointer position in the layer's own space: canvas-local CSS px. */
2257
+ readonly at: {
2258
+ readonly x: number;
2259
+ readonly y: number;
2260
+ };
2261
+ }
2262
+ interface PaintedCursorState {
2263
+ setBase(cursor: PaintedCursor | null): void;
2264
+ setOverride(cursor: PaintedCursor | null): void;
2265
+ /** Canvas-local CSS px. */
2266
+ setPointer(x: number, y: number): void;
2267
+ /** Pointer left the surface: nothing to draw until it returns. */
2268
+ clearPointer(): void;
2269
+ /**
2270
+ * Whether a painted cursor is set at all, regardless of where the pointer is.
2271
+ *
2272
+ * Lets the pointer path skip measuring the canvas rect on every move in the
2273
+ * overwhelmingly common case where the compositor is drawing the cursor and
2274
+ * nothing here needs its position.
2275
+ */
2276
+ active(): boolean;
2277
+ /** What the layer should draw this frame, or null for none. */
2278
+ current(): PaintedCursorFrame | null;
2279
+ /** Run `fn` whenever the answer to `current()` may have changed. */
2280
+ subscribe(fn: () => void): () => void;
2281
+ }
2282
+ declare function createPaintedCursorState(): PaintedCursorState;
2283
+
2236
2284
  /**
2237
2285
  * Everything about handling an input event that depends on *which view* it
2238
2286
  * landed in: the dispatcher that runs it, and the three lookups that resolve
@@ -2410,6 +2458,16 @@ interface UseGestureDispatcherOptions {
2410
2458
  * that's already the test contract.
2411
2459
  */
2412
2460
  requestRedraw?: () => void;
2461
+ /**
2462
+ * The surface's painted-cursor channel, read live because the canvas handle
2463
+ * it lives on arrives a render after this hook runs.
2464
+ *
2465
+ * Given one, a cursor the CSS tier cannot express — sized in world units, or
2466
+ * past the size the browser drops the image at — is published here and drawn
2467
+ * by the painted-cursor layer instead. Without one, such a cursor resolves to
2468
+ * `none` and the pointer shows nothing.
2469
+ */
2470
+ paintedCursor?: () => PaintedCursorState | undefined;
2413
2471
  /**
2414
2472
  * Thunk returning the live `RuleCtx` for the current frame. When supplied,
2415
2473
  * the dispatcher filters matched candidates by their declared
@@ -3655,6 +3713,16 @@ interface CanvasExtensionApi {
3655
3713
  * content compares this against the version it is about to render and
3656
3714
  * defers a frame when they differ. `0` until the first paint lands. */
3657
3715
  getPaintedVersion(): number;
3716
+ /**
3717
+ * The painted tier's channel for this surface.
3718
+ *
3719
+ * Most cursors are a CSS `url()` string the compositor draws, and nothing
3720
+ * needs this. A cursor that is sized in world units or too big to be a CSS
3721
+ * cursor at all is drawn into the canvas instead, and whoever decides which
3722
+ * cursor is showing publishes it here — the kit's gesture dispatcher does,
3723
+ * and so should an input layer built against a bare `<Canvas>`.
3724
+ */
3725
+ paintedCursor: PaintedCursorState;
3658
3726
  /** Register an externally-owned RenderLayer. The layer participates in the
3659
3727
  * draw stack and, if it implements `hitTest`, in {@link hitTestExtras}. */
3660
3728
  registerLayer(layer: RenderLayer<unknown>): () => void;
@@ -6727,8 +6795,10 @@ interface RotationAffordanceOptions {
6727
6795
  stroke?: Stroke;
6728
6796
  insetPx?: number;
6729
6797
  } | null | false;
6730
- /** Cursor while hovering the ring. Defaults to `'grab'`. */
6731
- cursor?: string;
6798
+ /** Cursor while hovering the ring. Defaults to the `rotate` glyph turned
6799
+ * with the target, falling back to `'grab'` if the browser rejects the
6800
+ * image. */
6801
+ cursor?: CursorSpec;
6732
6802
  }
6733
6803
  /** What a rotation-handle hit hands to the rotate action: what is being
6734
6804
  * rotated, and the world-space pivot it turns around. */
@@ -6791,7 +6861,7 @@ interface PathAnchorAffordanceOptions {
6791
6861
  /** Hit radius (screen-px) for anchor and control points. Default 8. */
6792
6862
  hitRadius?: number;
6793
6863
  /** Cursor while hovering an anchor or control. Defaults to `'pointer'`. */
6794
- cursor?: string;
6864
+ cursor?: CursorSpec;
6795
6865
  }
6796
6866
  /** What an anchor hit hands to the action that follows: which path, which
6797
6867
  * anchor, and whether the grab was on the anchor itself or one of its two
@@ -10661,6 +10731,25 @@ declare function DivideIcon(): react_jsx_runtime.JSX.Element;
10661
10731
  /** Icon for the crop operation: the back shape clipped to the front one. */
10662
10732
  declare function CropIcon(): react_jsx_runtime.JSX.Element;
10663
10733
 
10734
+ /**
10735
+ * The painted tier: draws a cursor glyph into the scene when it is too big,
10736
+ * or too tied to the view, to be a CSS `url()` cursor.
10737
+ *
10738
+ * A layer rather than something each tool draws in its own overlay, because
10739
+ * the alternative is every tool re-wiring the same thing. Riding the layer
10740
+ * system also means anything that reaches the cursor pipeline through a layer
10741
+ * claim — a HUD widget's `cursorAt` — gets the painted tier without knowing
10742
+ * this exists.
10743
+ *
10744
+ * Screen-space: the glyph is chrome at the pointer, not content in the
10745
+ * document, so it must not pan or zoom with the camera. What *does* track the
10746
+ * camera is a world-sized glyph's size, and `view.scale` is read for that.
10747
+ */
10748
+
10749
+ /** Layer id, so a consumer can order or hide it like any other. */
10750
+ declare const PAINTED_CURSOR_LAYER_ID = "painted-cursor";
10751
+ declare function createPaintedCursorLayer(state: PaintedCursorState): RenderLayer<unknown>;
10752
+
10664
10753
  /** What the registry knows at dispatch time. */
10665
10754
  interface EligibilityState {
10666
10755
  focusedId: string | null;
@@ -10706,4 +10795,4 @@ interface InsertOverlayStyle {
10706
10795
  lineWidth?: number;
10707
10796
  }
10708
10797
 
10709
- export { ANCHOR_HIT_BASE_PX, Action, type ActionShortcut, ActionsProp, ActionsProviderIfRoot, ActionsRegistry, Affordance, AffordanceBinding, AffordanceHit, AffordanceRegion, type AffordanceRegionHit, type AlignAdapter, type AlignAnchor, type AlignBounds, type AlignBoundsProjection, type AlignEdge, type AlignMatchResult, type AlignMoveArgs, type AlignmentBehaviorBase, type AnchorHit, type AnchorScratch, type AnchorState, type AnimateOnSetPoseOptions, AnimationHandle, Animator, AnyTool, AreaSelectAdapter, type ArrayAdapter, type ArrayAdapterConfig, ArrowIcon, BUILTIN_MARKERS, BUNDLE_TOOLS, BindingScope, BooleansAdapter, Bounds, BoundsConstraint, type BuildChromeCtxArgs, BuiltinShapeToolId, type BuiltinToolId, type BuiltinToolOptions, COARSE_TARGET_SCALE, CURVE_REPS, type CanvasExtensionApi, type CanvasFocusReturn, type CanvasHelpers, type CanvasProps, type CanvasSelectionMode, type CanvasSize, type CanvasSizeSnapshot, type CanvasSurfaceHelpers, CanvasView, type CanvasViewHelpers, type CanvasViewProps, type CaretIndexAtOpts, type CellHighlightLayerOpts, ChromeCtx, ChromeId, ChromeState, type ClampBounds, ClipboardSnapshot, type CoalescedCtx, type ColorInterpolate, ColorOverrideRegistry, type ColorSpace, CommonAffordanceScratch, type ComposeSelectionPoseOpts, type ComputeFitViewOptions, Condition, ContentHandlerEntry, Contribution, type CornerResizeAffordanceOptions, type CornerResizeScratch, type CreateChildrenLayerOpts, type CreateParallaxLayerOpts, type CreatePathEditingOverlayLayerOptions, type CreatePathLayerOpts, type CreatePenPreviewLayerOptions, type CreateTextLayerOpts, type CreateViewResolverOpts, type CreateViewportLayerOpts, CropIcon, CursorCoordsHud, type CursorCoordsHudProps, type CurveRepKind, type CurveRepresentation, type CustomLayerEntry, type CycleHandle, type CycleVertexColorsOptions, DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_DEVICE_PROFILE, DEFAULT_FILL_COLOR, DEFAULT_FLATTEN_TOLERANCE, DEFAULT_GUIDE_TOLERANCE_PX, DEFAULT_HANDLE_SIZE, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SHAPE_FILL, DEFAULT_STROKE_COLOR, DEFAULT_VELOCITY_DECAY, DebugConfig, DebugSink, DebugSnapshot, DebugStrokes, DebugTheme, type DecayLoopConfig, type DefaultTextData, DepRegistryProviderIfRoot, DepSchema, type DeriveAlignmentGuidesOptions, DetectedDeviceFacts, DeviceProfile, DeviceProfileProvider, type DeviceProfileProviderProps, Dims, type Discriminator, Dispatcher, type DistributeAdapter, type DistributeAxis, type DistributeMode, DivideIcon, type DragGestureController, type DragGestureCtx, type DragGestureEndCtx, type DragGesturePhase, type DragGesturePoint, type DragHandleOptions, type DragPayload, type DragRadialController, type DragRadialCtx, type DragRadialEndCtx, type DragRadialPoint, type DragRadialState, type DragRectBounds, type DragRectController, type DragRectCtx, type DragRectEndCtx, type DragRectPoint, DrawCommand, type DropZoneOptions, EasingSpec, Eligibility, type EligibilityState, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, type FillPoseBox, type FitTextPoseOptions, type FlagKey, type FreeformOptions, GHOST_STROKE, type GateLayerOptions, GeometryProjection, type GesturePreviewSource, type GestureSource, type GridLayerOpts, type GridSlotConfig, Guide, type GuideSnapOptions, type GuidesLayerOpts, HANDLE_BASE_PX, HandIcon, type InertiaConfig as HandToolInertiaConfig, type HandleDragPoint, type HeadlessCanvasLike, type HostAnchorAlign, type HostAnchorInput, type HostAnchorOffset, type HostAnchorStyle, HotkeyTrigger, IDENTITY_JOINT, type IconProps, ImageIcon, type ImageNodeData, type ImageStatus, type IndicatorStyle, InsertAdapter, InsertBehavior, InsertExtras, type InsertNodeFactory, type InsertOp, type InsertOverlayStyle, IntersectIcon, type Joint, type JointTransform, type LabelOptions, LassoHitMode, LassoIcon, LassoSelectAdapter, LassoSelectBehavior, LayerEnumerableAdapter, LayerHit, type LayerSlotValue, type LayersMap, LayoutSnap, LayoutStrategy, type LifecycleAnimation, LineIcon, type LinePoint, MIXED, MOVE_ANCHORS, type MarkerCtx, type MarkerEntry, type MarkerPaint, type MarkerSite, type MarkerSiteRequest, Mat3$1 as Mat3, MinimapCanvas, type MinimapCanvasProps, type MinimapFit, type Mixed, ModifierState, type MomentumOptions, MoveAdapter, MoveBehavior, type NestedHitOpts, type NestedHitTester, type NodeClientRect, NodeId, type NodeInk, type NodeInkCtx, type NodeOverlayFrame, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type NodeSilhouetteCtx, OngoingOverlay, type OpenFilePickerOptions, OrderedAdapter, OriginProjection, type OverlayPoint, OverlayPosition, PATH_ANCHOR_CHROME_ID, type PaintBindContext, type PaintKind, type PaintKindEditorProps, type PaintKindEntry, type PaintProgram, type PanBounds, type ParallaxOpts, Path, type PathAnchor, type PathAnchorAffordanceOptions, PathBuilder, PathDrawCommand, type PathEditingOverlayStyle, PathFillRule, type PathInWorldPose, type PenAnchor, PenIcon, type PenPreviewStyle, type PenScratch, type PenSubpath, PencilIcon, type PencilPoint, PickHud, type PickHudProps, type PickTopMostHitAdapter, type PinchZoomOptions, type PinchZoomToolOpts, type PixelRenderPlan, type PointInPathOptions, type PointInTextPoseOpts, PointSnapBehavior, PointerProviderIfRoot, type PointerSample, type PointerStylusState, PolygonIcon, PolygonPath, type PolygonPoint, type Pose, PoseProjection, type PoseRotation, type PressureToWidthOptions, type Pt, RECT_ALIGN_PROJECTION, ROTATION_HANDLE_BASE_PX, type RangeStyle, type RasterImage, RectIcon, RectPath, RectPose, type RegisterNodeShapeOptions, RegisteredOp, RenderLayer, type RenderSceneToCanvasArgs, type RenderSceneToPixelsArgs, type ReorderDirection, ResizeAdapter, ResizeAnchor, ResizePose, type ResolvableView, RotateAdapter, RotateBehavior, type RotateGeometry, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, Rule, RuleCtx, type RunStylePatch, SampledTrack, type ScalarOrXY, Scene, SceneAdapter, type SceneAdapterSelection, SceneCanvas, type SceneCanvasAdapter, type SceneCanvasApi, type SceneCanvasHit, type SceneCanvasProps, Node$1 as SceneNode, type SceneNodeClientRectOpts, SceneRegistry, type SceneSlotConfig, type SceneToAdapterOptions, SceneViewCanvas, type SceneViewCanvasProps, type SceneViewDrawOne, ScopedBinding, type ScratchKey, type ScratchStore, type SelectAdapter, type SelectFromLassoOptions, SelectIcon, SelectionApi, SelectionContextProvider, SelectionContextProviderIfRoot, type SelectionContextValue, type SelectionHandleStyle, type SelectionHandlesLayerOpts, type SelectionOutlineLayerOpts, type SelectionOverlayLayerOpts, type SelectionOverlaySlotConfig, SerializedScene, type SetFlagResult, type SetPathFields, ShaderProgramHandle, type ShapeCoversPointOptions, type SharedAnchor, type Simulation, type SimulationForce, type SimulationNode, type Skeleton, SliceDep, type SnapPattern, type SnapPointOptions, SnapStrategy, type SplitByLineOptions, type SpringPoseOptions, SpringPresetName, type SpringVertexColorsOptions, type StaggerVertexColorsOptions, type StandardSlotConfig, type StandardSlotName, StarIcon, type StarPoint, type StartEditOptions, type StyleKey, type StylusData, SubtractIcon, SvgIngestOptions, TOOL_PREF_KINDS, type TextEditScreenPose, type TextEditSelection, TextIcon, type ThresholdDragHandle, type ThresholdDragOptions, type TileGridOptions, type TilePatternOpts, Tool, type ToolBundle, ToolDef, ToolKeybinding, type ToolPref, type ToolPrefBoolean, type ToolPrefBooleanControl, type ToolPrefColor, type ToolPrefCustom, type ToolPrefEnum, type ToolPrefEnumControl, type ToolPrefEnumEncoding, type ToolPrefGroup, type ToolPrefKind, type ToolPrefLeaf, type ToolPrefNumber, type ToolPrefNumberControl, type ToolPrefNumberUnit, type ToolPrefObject, type ToolPrefPaint, type ToolPrefString, type ToolPrefStringControl, type ToolsApi, type TweenPoseOptions, type TweenVertexColorsOptions, UnionIcon, UnitSystem, UnitValue, UnknownIcon, type UseAlignOptions, type UseAlignReturn, UseAnimatorOptions, type UseArrayAdapterOptions, type UseBooleansOptions, type UseBooleansReturn, type UseCanvasFocusOptions, type UseDistributeOptions, type UseDistributeReturn, type UseDragGestureOptions, type UseDragRadialOptions, type UseDragRectOptions, type UseEyedropperToolOptions, type UseGestureDispatcherOptions, type UseGridCellHoverOptions, type UseGridCellHoverReturn, type UseGuidesReturn, type UseHandToolOptions, type UseHandleDragOptions, type UseHandleDragReturn, type UseHostAnchorOptions, type UseHoverTrackingArgs, type UseImageToolOptions, type UseKeybindingsOptions, type UseLassoSelectOptions, type UseLassoToolOptions, UseMoveOptions, type UseNodeOverlayFrameOptions, type UsePenToolOptions, type UsePointerStylusOptions, type UsePolygonToolOptions, UseResizeOptions, type UseResizePolicyOptions, type UseRotateOptions, type UseRotateToolOptions, UseSceneOptions, type UseSceneTextEditOptions, type UseSceneTextEditReturn, type UseSceneTrivialOptions, type UseSelectToolOptions, UseSelectionOptions, type UseSimulationOptions, type UseStandardActionsOptions, type UseStarToolOptions, type UseTextEditOptions, type UseTextEditReturn, type UseToolsOptions, type UseZoomOptions, type UseZoomReturn, VERSION, type Vec2, VertexColorChannel, View, ViewAnimationOptions, type ViewRect, type ViewResolver, type ViewTarget, ViewTransform, type ViewportConfig, ViewportDims, type ViewportLayer, ViewportToolDef, type ViewportZoomAnimateOptions, type ViewportZoomOptions, VisibilityRules, type VisibleRaf, type VisibleRafOptions, type VisibleRafTarget, WeaselProvider, type WheelInput, type WheelState, ZoomBound, type ZoomBounds, type ZoomClampOpts, ZoomFactor, _resetMarkersForTests, _resetPaintKindsForTests, aabbCenter, actionIs, actionShortcuts, alignDeltaFor, alignInsertBehavior, alignMoveBehavior, alignResizeBehavior, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyOpsTo, applyStyleToRange, areaSelectAction, arrayAdapter, asPaint, axisAlignedBounds, bezierCubic, bezierQuadratic, blendPoses, boundsOfPath, buildChromeCtx, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, caretIndexAt, cellAt, charOffsetToDomPosition, clampView, clearSelectionAction, clientToCanvas, cloneAction, coarsePointer, composeAffordanceLayer, composePath, composeSelectionPose, computeFitView, computeFitViewport, computeIndicatorCommand, computeWheelAction, cond, constrainTo45, containedThenNearest, countPathAnchors, createCellHighlightLayer, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDeleteOp, createGridLayer, createGuidesLayer, createHistory, createInsertOp, createMoveToIndexOp, createNodeProperties, createNodeRouting, createParallaxLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createReorderOp, createReparentOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createTextLayer, createTilePattern, createTransformOp, createViewResolver, createViewportLayer, cycleVertexColors, decomposePath, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultVisibilityRules, defineTool, defineViewportTool, deleteScratch, deriveAlignmentGuides, deriveParallaxView, dispatchApplyBatch, dlog, domPositionToCharOffset, domToRuns, dwarn, editAnchorsAction, ellipsePath, enumerateAnchors, fillInPoseFrame, fillToBoundsFrame, findNodeShape, findShapeInk, findShapeSilhouette, fitTextPose, fitToBounds, fitZoom, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, focused, forEachCoalesced, freeform, gateLayer, gesturing, getAlpha01, getImageBitmap, getMarker, getNodeShapes, getPaintKind, getScratch, getStylusData, gradientForBounds, gradientGeometry, guideSnapStrategy, hexToRgba, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, imageStatus, inferredNodeProperties, inferredNodeRouting, insertAction, interpolateView, isBuiltinToolPref, isDebugEnabled, isEditableTarget, isGradientFill, isPatternSpec, keySpecShortcut, lassoSelectAction, lerpColorArray, lerpOklab, lerpOklch, linePath, listMarkers, listPaintKinds, liveScope, makePinchZoomAction, makeViewportZoomAction, markerDrawCommands, markerInset, markerKeyOf, markerSites, matchAlignment, matchesKeyBinding, meanScale, mergeAlphaFromPrev, mergeContributions, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nearest, nearestWithin, nestedHitTester, never, nodeHasFlag, none, normalizeHex, not, nurbs, oklabToOklch, oklabToSrgbU8, oklchToOklab, openFilePicker, or, paintAlpha, paintKindOf, paintWithAlpha, paintWithColor, parseColor, parseColorToRgba255, parseDebugFlags, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathDistanceToPoint, pathDivide, pathExclude, pathFromD, pathInPoseFrame, pathInWorld, pathIntersect, pathIntersectsPolygon, pathIntersectsRect, pathOriginProjection, pathPoseDescriptor, pathSubtract, pathToAnchors, pathUnion, pickTopMostHit, pinchZoomAction, planPixelRender, pointInPath, pointInRotatedRect, pointInTextPose, polygonFromPoints, polylineFromPoints, poseRotationOf, pressureToWidth, pxExtent, rainbowVertexColors, rebuildOp, rectCorners, rectPath, registerMarker, registerNodeShape, registerOpFactory, registerPaintKind, registeredOpNames, regularPolygonPath, renderLabel, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveColor, resolveDeviceProfile, resolveFillPattern, resolveMarkerSize, resolvePatternSpec, resolveSkeleton, resolveVisibility, rgbaToHex, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotatePoint, rotatedRectCorners, rotationDegreesUnit, rotationHandle, roundToCell, runsToDom, sampleGradientStops, sampleTrack, scaleDelta, scalePathToBounds, sceneFromJSON, sceneNodeClientRect, sceneSelectionStore, sceneToAdapter, scopeBindings, scratchKey, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, setFlagOverRange, setScratch, shapeCoversPoint, snap, snapPoint, solid, solidVertexColors, spiro, splitPathByLine, splitSubpaths, springPose, springVertexColors, srgbU8ToOklab, staggerVertexColors, starPath, startThresholdDrag, strokeInsets, strokeOf, strokeWith, styleAtRange, subscribeImageReady, textCommand, textCommandFromRuns, tileGrid, toHex8, transformPath, translatePath, translatePolygonInPlace, translatePoseViaDescriptor, trimPolyline, tweenPose, tweenVertexColors, unionAABB, unionBounds, unionBoundsPath, useAlign, useAnimator, useArrayAdapter, useAutoCenter, useBooleans, useBooleansAdapter, useCanvasFocus, useCanvasSize, useDecayLoop, useDeviceProfile, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGestureDispatcher, useGridCellHover, useGuides, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useImageTool, useKeybindings, useLassoTool, useLineTool, useNodeOverlayFrame, usePenTool, usePencilTool, usePinchGesture, usePinchZoomTool, usePointerStylus, usePolygonTool, usePublishSelection, useRectTool, useResizePolicy, useRotateTool, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelectionContext, useSimulation, useSliceDep, useStandardActions, useStarTool, useTextEdit, useTextTool, useTools, useVelocityTracker, useVisibleRaf, useZoom, viewportDragPanAction, viewportZoomAction, viewportsAt, visualBoundsViaDescriptor, when, withAlpha01, withCoord, withGradientKind, withinPxBox, withinPxRadius, worldEditToStorage, zoomAt, zoomAtLeast };
10798
+ export { ANCHOR_HIT_BASE_PX, Action, type ActionShortcut, ActionsProp, ActionsProviderIfRoot, ActionsRegistry, Affordance, AffordanceBinding, AffordanceHit, AffordanceRegion, type AffordanceRegionHit, type AlignAdapter, type AlignAnchor, type AlignBounds, type AlignBoundsProjection, type AlignEdge, type AlignMatchResult, type AlignMoveArgs, type AlignmentBehaviorBase, type AnchorHit, type AnchorScratch, type AnchorState, type AnimateOnSetPoseOptions, AnimationHandle, Animator, AnyTool, AreaSelectAdapter, type ArrayAdapter, type ArrayAdapterConfig, ArrowIcon, BUILTIN_MARKERS, BUNDLE_TOOLS, BindingScope, BooleansAdapter, Bounds, BoundsConstraint, type BuildChromeCtxArgs, BuiltinShapeToolId, type BuiltinToolId, type BuiltinToolOptions, COARSE_TARGET_SCALE, CURVE_REPS, type CanvasExtensionApi, type CanvasFocusReturn, type CanvasHelpers, type CanvasProps, type CanvasSelectionMode, type CanvasSize, type CanvasSizeSnapshot, type CanvasSurfaceHelpers, CanvasView, type CanvasViewHelpers, type CanvasViewProps, type CaretIndexAtOpts, type CellHighlightLayerOpts, ChromeCtx, ChromeId, ChromeState, type ClampBounds, ClipboardSnapshot, type CoalescedCtx, type ColorInterpolate, ColorOverrideRegistry, type ColorSpace, CommonAffordanceScratch, type ComposeSelectionPoseOpts, type ComputeFitViewOptions, Condition, ContentHandlerEntry, Contribution, type CornerResizeAffordanceOptions, type CornerResizeScratch, type CreateChildrenLayerOpts, type CreateParallaxLayerOpts, type CreatePathEditingOverlayLayerOptions, type CreatePathLayerOpts, type CreatePenPreviewLayerOptions, type CreateTextLayerOpts, type CreateViewResolverOpts, type CreateViewportLayerOpts, CropIcon, CursorCoordsHud, type CursorCoordsHudProps, type CurveRepKind, type CurveRepresentation, type CustomLayerEntry, type CycleHandle, type CycleVertexColorsOptions, DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_DEVICE_PROFILE, DEFAULT_FILL_COLOR, DEFAULT_FLATTEN_TOLERANCE, DEFAULT_GUIDE_TOLERANCE_PX, DEFAULT_HANDLE_SIZE, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SHAPE_FILL, DEFAULT_STROKE_COLOR, DEFAULT_VELOCITY_DECAY, DebugConfig, DebugSink, DebugSnapshot, DebugStrokes, DebugTheme, type DecayLoopConfig, type DefaultTextData, DepRegistryProviderIfRoot, DepSchema, type DeriveAlignmentGuidesOptions, DetectedDeviceFacts, DeviceProfile, DeviceProfileProvider, type DeviceProfileProviderProps, Dims, type Discriminator, Dispatcher, type DistributeAdapter, type DistributeAxis, type DistributeMode, DivideIcon, type DragGestureController, type DragGestureCtx, type DragGestureEndCtx, type DragGesturePhase, type DragGesturePoint, type DragHandleOptions, type DragPayload, type DragRadialController, type DragRadialCtx, type DragRadialEndCtx, type DragRadialPoint, type DragRadialState, type DragRectBounds, type DragRectController, type DragRectCtx, type DragRectEndCtx, type DragRectPoint, DrawCommand, type DropZoneOptions, EasingSpec, Eligibility, type EligibilityState, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, type FillPoseBox, type FitTextPoseOptions, type FlagKey, type FreeformOptions, GHOST_STROKE, type GateLayerOptions, GeometryProjection, type GesturePreviewSource, type GestureSource, type GridLayerOpts, type GridSlotConfig, Guide, type GuideSnapOptions, type GuidesLayerOpts, HANDLE_BASE_PX, HandIcon, type InertiaConfig as HandToolInertiaConfig, type HandleDragPoint, type HeadlessCanvasLike, type HostAnchorAlign, type HostAnchorInput, type HostAnchorOffset, type HostAnchorStyle, HotkeyTrigger, IDENTITY_JOINT, type IconProps, ImageIcon, type ImageNodeData, type ImageStatus, type IndicatorStyle, InsertAdapter, InsertBehavior, InsertExtras, type InsertNodeFactory, type InsertOp, type InsertOverlayStyle, IntersectIcon, type Joint, type JointTransform, type LabelOptions, LassoHitMode, LassoIcon, LassoSelectAdapter, LassoSelectBehavior, LayerEnumerableAdapter, LayerHit, type LayerSlotValue, type LayersMap, LayoutSnap, LayoutStrategy, type LifecycleAnimation, LineIcon, type LinePoint, MIXED, MOVE_ANCHORS, type MarkerCtx, type MarkerEntry, type MarkerPaint, type MarkerSite, type MarkerSiteRequest, Mat3$1 as Mat3, MinimapCanvas, type MinimapCanvasProps, type MinimapFit, type Mixed, ModifierState, type MomentumOptions, MoveAdapter, MoveBehavior, type NestedHitOpts, type NestedHitTester, type NodeClientRect, NodeId, type NodeInk, type NodeInkCtx, type NodeOverlayFrame, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type NodeSilhouetteCtx, OngoingOverlay, type OpenFilePickerOptions, OrderedAdapter, OriginProjection, type OverlayPoint, OverlayPosition, PAINTED_CURSOR_LAYER_ID, PATH_ANCHOR_CHROME_ID, type PaintBindContext, type PaintKind, type PaintKindEditorProps, type PaintKindEntry, type PaintProgram, type PaintedCursor, type PaintedCursorFrame, type PaintedCursorState, type PanBounds, type ParallaxOpts, Path, type PathAnchor, type PathAnchorAffordanceOptions, PathBuilder, PathDrawCommand, type PathEditingOverlayStyle, PathFillRule, type PathInWorldPose, type PenAnchor, PenIcon, type PenPreviewStyle, type PenScratch, type PenSubpath, PencilIcon, type PencilPoint, PickHud, type PickHudProps, type PickTopMostHitAdapter, type PinchZoomOptions, type PinchZoomToolOpts, type PixelRenderPlan, type PointInPathOptions, type PointInTextPoseOpts, PointSnapBehavior, PointerProviderIfRoot, type PointerSample, type PointerStylusState, PolygonIcon, PolygonPath, type PolygonPoint, type Pose, PoseProjection, type PoseRotation, type PressureToWidthOptions, type Pt, RECT_ALIGN_PROJECTION, ROTATION_HANDLE_BASE_PX, type RangeStyle, type RasterImage, RectIcon, RectPath, RectPose, type RegisterNodeShapeOptions, RegisteredOp, RenderLayer, type RenderSceneToCanvasArgs, type RenderSceneToPixelsArgs, type ReorderDirection, ResizeAdapter, ResizeAnchor, ResizePose, type ResolvableView, RotateAdapter, RotateBehavior, type RotateGeometry, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, Rule, RuleCtx, type RunStylePatch, SampledTrack, type ScalarOrXY, Scene, SceneAdapter, type SceneAdapterSelection, SceneCanvas, type SceneCanvasAdapter, type SceneCanvasApi, type SceneCanvasHit, type SceneCanvasProps, Node$1 as SceneNode, type SceneNodeClientRectOpts, SceneRegistry, type SceneSlotConfig, type SceneToAdapterOptions, SceneViewCanvas, type SceneViewCanvasProps, type SceneViewDrawOne, ScopedBinding, type ScratchKey, type ScratchStore, type SelectAdapter, type SelectFromLassoOptions, SelectIcon, SelectionApi, SelectionContextProvider, SelectionContextProviderIfRoot, type SelectionContextValue, type SelectionHandleStyle, type SelectionHandlesLayerOpts, type SelectionOutlineLayerOpts, type SelectionOverlayLayerOpts, type SelectionOverlaySlotConfig, SerializedScene, type SetFlagResult, type SetPathFields, ShaderProgramHandle, type ShapeCoversPointOptions, type SharedAnchor, type Simulation, type SimulationForce, type SimulationNode, type Skeleton, SliceDep, type SnapPattern, type SnapPointOptions, SnapStrategy, type SplitByLineOptions, type SpringPoseOptions, SpringPresetName, type SpringVertexColorsOptions, type StaggerVertexColorsOptions, type StandardSlotConfig, type StandardSlotName, StarIcon, type StarPoint, type StartEditOptions, type StyleKey, type StylusData, SubtractIcon, SvgIngestOptions, TOOL_PREF_KINDS, type TextEditScreenPose, type TextEditSelection, TextIcon, type ThresholdDragHandle, type ThresholdDragOptions, type TileGridOptions, type TilePatternOpts, Tool, type ToolBundle, ToolDef, ToolKeybinding, type ToolPref, type ToolPrefBoolean, type ToolPrefBooleanControl, type ToolPrefColor, type ToolPrefCustom, type ToolPrefEnum, type ToolPrefEnumControl, type ToolPrefEnumEncoding, type ToolPrefGroup, type ToolPrefKind, type ToolPrefLeaf, type ToolPrefNumber, type ToolPrefNumberControl, type ToolPrefNumberUnit, type ToolPrefObject, type ToolPrefPaint, type ToolPrefString, type ToolPrefStringControl, type ToolsApi, type TweenPoseOptions, type TweenVertexColorsOptions, UnionIcon, UnitSystem, UnitValue, UnknownIcon, type UseAlignOptions, type UseAlignReturn, UseAnimatorOptions, type UseArrayAdapterOptions, type UseBooleansOptions, type UseBooleansReturn, type UseCanvasFocusOptions, type UseDistributeOptions, type UseDistributeReturn, type UseDragGestureOptions, type UseDragRadialOptions, type UseDragRectOptions, type UseEyedropperToolOptions, type UseGestureDispatcherOptions, type UseGridCellHoverOptions, type UseGridCellHoverReturn, type UseGuidesReturn, type UseHandToolOptions, type UseHandleDragOptions, type UseHandleDragReturn, type UseHostAnchorOptions, type UseHoverTrackingArgs, type UseImageToolOptions, type UseKeybindingsOptions, type UseLassoSelectOptions, type UseLassoToolOptions, UseMoveOptions, type UseNodeOverlayFrameOptions, type UsePenToolOptions, type UsePointerStylusOptions, type UsePolygonToolOptions, UseResizeOptions, type UseResizePolicyOptions, type UseRotateOptions, type UseRotateToolOptions, UseSceneOptions, type UseSceneTextEditOptions, type UseSceneTextEditReturn, type UseSceneTrivialOptions, type UseSelectToolOptions, UseSelectionOptions, type UseSimulationOptions, type UseStandardActionsOptions, type UseStarToolOptions, type UseTextEditOptions, type UseTextEditReturn, type UseToolsOptions, type UseZoomOptions, type UseZoomReturn, VERSION, type Vec2, VertexColorChannel, View, ViewAnimationOptions, type ViewRect, type ViewResolver, type ViewTarget, ViewTransform, type ViewportConfig, ViewportDims, type ViewportLayer, ViewportToolDef, type ViewportZoomAnimateOptions, type ViewportZoomOptions, VisibilityRules, type VisibleRaf, type VisibleRafOptions, type VisibleRafTarget, WeaselProvider, type WheelInput, type WheelState, ZoomBound, type ZoomBounds, type ZoomClampOpts, ZoomFactor, _resetMarkersForTests, _resetPaintKindsForTests, aabbCenter, actionIs, actionShortcuts, alignDeltaFor, alignInsertBehavior, alignMoveBehavior, alignResizeBehavior, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyOpsTo, applyStyleToRange, areaSelectAction, arrayAdapter, asPaint, axisAlignedBounds, bezierCubic, bezierQuadratic, blendPoses, boundsOfPath, buildChromeCtx, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, caretIndexAt, cellAt, charOffsetToDomPosition, clampView, clearSelectionAction, clientToCanvas, cloneAction, coarsePointer, composeAffordanceLayer, composePath, composeSelectionPose, computeFitView, computeFitViewport, computeIndicatorCommand, computeWheelAction, cond, constrainTo45, containedThenNearest, countPathAnchors, createCellHighlightLayer, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDeleteOp, createGridLayer, createGuidesLayer, createHistory, createInsertOp, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createPaintedCursorState, createParallaxLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createReorderOp, createReparentOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createTextLayer, createTilePattern, createTransformOp, createViewResolver, createViewportLayer, cycleVertexColors, decomposePath, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultVisibilityRules, defineTool, defineViewportTool, deleteScratch, deriveAlignmentGuides, deriveParallaxView, dispatchApplyBatch, dlog, domPositionToCharOffset, domToRuns, dwarn, editAnchorsAction, ellipsePath, enumerateAnchors, fillInPoseFrame, fillToBoundsFrame, findNodeShape, findShapeInk, findShapeSilhouette, fitTextPose, fitToBounds, fitZoom, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, focused, forEachCoalesced, freeform, gateLayer, gesturing, getAlpha01, getImageBitmap, getMarker, getNodeShapes, getPaintKind, getScratch, getStylusData, gradientForBounds, gradientGeometry, guideSnapStrategy, hexToRgba, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, imageStatus, inferredNodeProperties, inferredNodeRouting, insertAction, interpolateView, isBuiltinToolPref, isDebugEnabled, isEditableTarget, isGradientFill, isPatternSpec, keySpecShortcut, lassoSelectAction, lerpColorArray, lerpOklab, lerpOklch, linePath, listMarkers, listPaintKinds, liveScope, makePinchZoomAction, makeViewportZoomAction, markerDrawCommands, markerInset, markerKeyOf, markerSites, matchAlignment, matchesKeyBinding, meanScale, mergeAlphaFromPrev, mergeContributions, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nearest, nearestWithin, nestedHitTester, never, nodeHasFlag, none, normalizeHex, not, nurbs, oklabToOklch, oklabToSrgbU8, oklchToOklab, openFilePicker, or, paintAlpha, paintKindOf, paintWithAlpha, paintWithColor, parseColor, parseColorToRgba255, parseDebugFlags, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathDistanceToPoint, pathDivide, pathExclude, pathFromD, pathInPoseFrame, pathInWorld, pathIntersect, pathIntersectsPolygon, pathIntersectsRect, pathOriginProjection, pathPoseDescriptor, pathSubtract, pathToAnchors, pathUnion, pickTopMostHit, pinchZoomAction, planPixelRender, pointInPath, pointInRotatedRect, pointInTextPose, polygonFromPoints, polylineFromPoints, poseRotationOf, pressureToWidth, pxExtent, rainbowVertexColors, rebuildOp, rectCorners, rectPath, registerMarker, registerNodeShape, registerOpFactory, registerPaintKind, registeredOpNames, regularPolygonPath, renderLabel, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveColor, resolveDeviceProfile, resolveFillPattern, resolveMarkerSize, resolvePatternSpec, resolveSkeleton, resolveVisibility, rgbaToHex, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotatePoint, rotatedRectCorners, rotationDegreesUnit, rotationHandle, roundToCell, runsToDom, sampleGradientStops, sampleTrack, scaleDelta, scalePathToBounds, sceneFromJSON, sceneNodeClientRect, sceneSelectionStore, sceneToAdapter, scopeBindings, scratchKey, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, setFlagOverRange, setScratch, shapeCoversPoint, snap, snapPoint, solid, solidVertexColors, spiro, splitPathByLine, splitSubpaths, springPose, springVertexColors, srgbU8ToOklab, staggerVertexColors, starPath, startThresholdDrag, strokeInsets, strokeOf, strokeWith, styleAtRange, subscribeImageReady, textCommand, textCommandFromRuns, tileGrid, toHex8, transformPath, translatePath, translatePolygonInPlace, translatePoseViaDescriptor, trimPolyline, tweenPose, tweenVertexColors, unionAABB, unionBounds, unionBoundsPath, useAlign, useAnimator, useArrayAdapter, useAutoCenter, useBooleans, useBooleansAdapter, useCanvasFocus, useCanvasSize, useDecayLoop, useDeviceProfile, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGestureDispatcher, useGridCellHover, useGuides, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useImageTool, useKeybindings, useLassoTool, useLineTool, useNodeOverlayFrame, usePenTool, usePencilTool, usePinchGesture, usePinchZoomTool, usePointerStylus, usePolygonTool, usePublishSelection, useRectTool, useResizePolicy, useRotateTool, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelectionContext, useSimulation, useSliceDep, useStandardActions, useStarTool, useTextEdit, useTextTool, useTools, useVelocityTracker, useVisibleRaf, useZoom, viewportDragPanAction, viewportZoomAction, viewportsAt, visualBoundsViaDescriptor, when, withAlpha01, withCoord, withGradientKind, withinPxBox, withinPxRadius, worldEditToStorage, zoomAt, zoomAtLeast };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- export { ALWAYS, ANCHOR_HIT_BASE_PX, ActionsProviderIfRoot, ActiveToolContextProvider, ActiveToolContextProviderIfRoot, ArrowIcon, BUILTIN_MARKERS, BUNDLE_TOOLS, COARSE_TARGET_SCALE, CURVE_REPS, CanvasView, ColorOverrideRegistry, CropIcon, CursorCoordsHud, DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_DEVICE_PROFILE, DEFAULT_FILL_COLOR, DEFAULT_HANDLE_SIZE, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SHAPE_FILL, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_STYLE, DEFAULT_VELOCITY_DECAY, DepRegistryProviderIfRoot, DeviceProfileProvider, DivideIcon, EASINGS, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, GHOST_STROKE, HANDLE_BASE_PX, HandIcon, IDENTITY_JOINT, IDENTITY_POSE_COMPOSITION, ImageIcon, IntersectIcon, KIT_SHAPE_KINDS, LassoIcon, LineIcon, MARKDOWN_RUN_GRAMMAR, MIXED, MOVE_ANCHORS, MinimapCanvas, NEVER, PATH_ANCHOR_CHROME_ID, PenIcon, PencilIcon, PickHud, PointerProviderIfRoot, PolygonIcon, RECT_ALIGN_PROJECTION, ROTATION_HANDLE_BASE_PX, RectIcon, SCRIPT_METRICS, SPRING_PRESETS, STROKE_DASH_RATIOS, SceneCanvas, SceneViewCanvas, SelectIcon, SelectionContextProvider, SelectionContextProviderIfRoot, StarIcon, SubtractIcon, TOOL_PREF_KINDS, TextIcon, UnionIcon, UnknownIcon, VERSION, VIEW_ANIMATION_KEY, WeaselProvider, _resetMarkersForTests, _resetPaintKindsForTests, aabbCenter, actionIs, actionShortcuts, alignDeltaFor, alignInsertBehavior, alignMoveBehavior, alignResizeBehavior, alignedStrokeRect, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyBooleanOp, applyStyleToRange, areaSelectAction, arrayAdapter, asNodeId, asPaint, axisAlignedBounds, bezierCubic, bezierQuadratic, blendPoses, buildChromeCtx, buildRuleCtx, buildSceneViewCommands, cachedLayoutRuns, canBringForward, canHover, canQueryLocalFonts2 as canQueryLocalFonts, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, caretIndexAt, cellAt, charOffsetToDomPosition, clampView, clearSelectionAction, clientToCanvas, clipboardCopyAction, clipboardCutAction, cloneAction, coarsePointer, composeAffordanceLayer, composePath, composeRectPose, composeSelectionPose, composeWorldPose, computeFitView, computeFitViewport, computeIndicatorCommand, computeWheelAction, cond, constrainTo45, containedThenNearest, countPathAnchors, createCellHighlightLayer, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDispatcher, createGridLayer, createGuidesLayer, createHistory, createMarkdownRenderer, createMoveToIndexOp, createNodeProperties, createNodeRouting, createParallaxLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createReorderOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetPathOp, createSetTextOp, createTextLayer, createViewResolver, createViewportLayer, cubicBezierEasing, cycleVertexColors, dashForStrokeStyle, decomposePath, decomposeRectPose, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultVisibilityRules, defineTool, defineViewportTool, deriveAlignmentGuides, deriveParallaxView, describeRule, domPositionToCharOffset, domToRuns, drawLayers, drawOneLayer, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, editAnchorsAction, enableLocalFontOutlines2 as enableLocalFontOutlines, enterTextEditAction, enumerateAnchors, evaluate, fillInPoseFrame, fillToBoundsFrame, findNodeShape, findShapeInk, findShapeSilhouette, fitTextPose, fitToBounds, fitViewToBounds, fitZoom, focused, fontString, forEachCoalesced, frameRect, freeform, gateLayer, gesturing, getAlpha01, getImageBitmap, getMarker, getNodeShapes, getPaintKind, getStylusData, gradientForBounds, gradientGeometry, hasFontOutlines2 as hasFontOutlines, hexToRgba, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, imageStatus, inferredNodeProperties, inferredNodeRouting, insertAction, interpolateView, isBuiltinToolPref, isCanvasFont2 as isCanvasFont, isEditableTarget, isGradientFill, isLayerPainted, isLayerVisible, isPatternSpec, keySpecShortcut, lassoSelectAction, layoutMarkdown, layoutRuns, lerpColorArray, lerpOklab, lerpOklch, linear, listFontOutlines2 as listFontOutlines, listMarkers, listPaintKinds, liveScope, makePinchZoomAction, makeViewportZoomAction, markdownToRuns, markerDrawCommands, markerInset, markerKeyOf, markerSites, mat3, matchAlignment, matchesKeyBinding, meanScale, measureText, measureTextBounds, measuredWidth, mergeAlphaFromPrev, mergeContributions, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nearest, nearestWithin, nestedHitTester, never, nodeHasFlag, none, normalizeHex, not, nurbs, oklabToOklch, oklabToSrgbU8, oklchToOklab, openFilePicker, or, outlineStatus2 as outlineStatus, paintAlpha, paintKindOf, paintWithAlpha, paintWithColor, parseColor, parseColorToRgba255, parseDebugFlags, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathDistanceToPoint, pathDivide, pathExclude, pathFromD, pathInPoseFrame, pathInWorld, pathIntersect, pathIntersectsPolygon, pathIntersectsRect, pathOriginProjection, pathSubtract, pathToAnchors, pathUnion, pickTopMostHit, pinchZoomAction, planPixelRender, pointInRotatedRect, pointInTextPose, poseRotationOf, pressureToWidth, rainbowVertexColors, rebaseLocalPose, rectCorners, registerCanvasFont2 as registerCanvasFont, registerContentHandler, registerFont2 as registerFont, registerFontOutlines2 as registerFontOutlines, registerMarker, registerNodeShape, registerPaintKind, renderLabel, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveAlign, resolveColor, resolveDeviceProfile, resolveEasing, resolveFillPattern, resolveMarkerSize, resolveParams, resolvePatternSpec, resolveRuns, resolveSkeleton, resolveStrokeWidth, resolveTextStyle, resolveVisibility, rgbaToHex, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotatePoint, rotatedRectCorners, rotationDegreesUnit, rotationHandle, roundToCell, runsToDom, runsToMarkdown, runsToPlainText, sampleGradientStops, sampleTrack, sceneFromJSON, sceneNodeClientRect, sceneSelectionStore, sceneToAdapter, scopeBindings, screenToWorld, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, setFlagOverRange, shapeCoversPoint, sliceAction, snapPoint, solid, solidVertexColors, specificity, spiro, splitPathByLine, splitSubpaths, springPose, springVertexColors, srgbU8ToOklab, staggerVertexColors, startThresholdDrag, strokeDashStyleOf, strokeInsets, strokeOf, strokeWith, styleAtRange, subscribeGlyphReady2 as subscribeGlyphReady, subscribeImageReady, textCommand, textCommandFromRuns, textLineBoxes, tileGrid, toHex8, toRuns, translatePoseViaDescriptor, translateRectPose, trimPolyline, tweenPose, tweenVertexColors, unionAABB, unionBounds, unionBoundsPath, unregisterCanvasFont2 as unregisterCanvasFont, unregisterFontOutlines2 as unregisterFontOutlines, useActiveToolContext, useAlign, useAnimator, useArrayAdapter, useAutoCenter, useBooleans, useBooleansAdapter, useCanvasFocus, useCanvasSize, useDecayLoop, useDeviceProfile, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGestureDispatcher, useGridCellHover, useGuides, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useImageTool, useKeybindings, useLassoTool, useLineTool, useNodeOverlayFrame, useOptionalActiveToolContext, usePenTool, usePencilTool, usePinchGesture, usePinchZoomTool, usePointerStylus, usePolygonTool, usePublishSelection, useRectTool, useResizePolicy, useRotateTool, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSelectionContext, useSimulation, useSliceDep, useStandardActions, useStarTool, useTextEdit, useTextTool, useTools, useVelocityTracker, useViewAnimation, useVisibleRaf, useZoom, verticalAlignOffset, viewToMat3, viewToTransform, viewportDragPanAction, viewportZoomAction, viewportsAt, visualBoundsViaDescriptor, when, withAlpha01, withCoord, withGradientKind, worldEditToStorage, worldPoseLookup, worldToScreen, zoomAt, zoomAtLeast } from './chunk-IMFXEINV.js';
2
- export { ActionDisabledReason, ActionsProvider, DepRegistryProvider, actionBindings, evaluateEnabled, useAction, useActionsRegistry, useDepRegistry, useDepSource, useOptionalDepRegistry } from './chunk-H6E6KPTU.js';
1
+ export { ALWAYS, ANCHOR_HIT_BASE_PX, ActionsProviderIfRoot, ActiveToolContextProvider, ActiveToolContextProviderIfRoot, ArrowIcon, BUILTIN_MARKERS, BUNDLE_TOOLS, COARSE_TARGET_SCALE, CURVE_REPS, CanvasView, ColorOverrideRegistry, CropIcon, CursorCoordsHud, DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_DEVICE_PROFILE, DEFAULT_FILL_COLOR, DEFAULT_HANDLE_SIZE, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SHAPE_FILL, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_STYLE, DEFAULT_VELOCITY_DECAY, DepRegistryProviderIfRoot, DeviceProfileProvider, DivideIcon, EASINGS, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, GHOST_STROKE, HANDLE_BASE_PX, HandIcon, IDENTITY_JOINT, IDENTITY_POSE_COMPOSITION, ImageIcon, IntersectIcon, KIT_SHAPE_KINDS, LassoIcon, LineIcon, MARKDOWN_RUN_GRAMMAR, MIXED, MOVE_ANCHORS, MinimapCanvas, NEVER, PAINTED_CURSOR_LAYER_ID, PATH_ANCHOR_CHROME_ID, PenIcon, PencilIcon, PickHud, PointerProviderIfRoot, PolygonIcon, RECT_ALIGN_PROJECTION, ROTATION_HANDLE_BASE_PX, RectIcon, SCRIPT_METRICS, SPRING_PRESETS, STROKE_DASH_RATIOS, SceneCanvas, SceneViewCanvas, SelectIcon, SelectionContextProvider, SelectionContextProviderIfRoot, StarIcon, SubtractIcon, TOOL_PREF_KINDS, TextIcon, UnionIcon, UnknownIcon, VERSION, VIEW_ANIMATION_KEY, WeaselProvider, _resetMarkersForTests, _resetPaintKindsForTests, aabbCenter, actionIs, actionShortcuts, alignDeltaFor, alignInsertBehavior, alignMoveBehavior, alignResizeBehavior, alignedStrokeRect, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyBooleanOp, applyStyleToRange, areaSelectAction, arrayAdapter, asNodeId, asPaint, axisAlignedBounds, bakeCursor, bezierCubic, bezierQuadratic, blendPoses, buildChromeCtx, buildRuleCtx, buildSceneViewCommands, cachedLayoutRuns, canBringForward, canHover, canQueryLocalFonts2 as canQueryLocalFonts, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, caretIndexAt, cellAt, charOffsetToDomPosition, clampView, clearSelectionAction, clientToCanvas, clipboardCopyAction, clipboardCutAction, cloneAction, coarsePointer, composeAffordanceLayer, composePath, composeRectPose, composeSelectionPose, composeWorldPose, computeFitView, computeFitViewport, computeIndicatorCommand, computeWheelAction, cond, constrainTo45, containedThenNearest, countPathAnchors, createCellHighlightLayer, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDispatcher, createGridLayer, createGuidesLayer, createHistory, createMarkdownRenderer, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createPaintedCursorState, createParallaxLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createReorderOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetPathOp, createSetTextOp, createTextLayer, createViewResolver, createViewportLayer, cubicBezierEasing, cursorFor, cycleVertexColors, dashForStrokeStyle, decomposePath, decomposeRectPose, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultVisibilityRules, defineTool, defineViewportTool, deriveAlignmentGuides, deriveParallaxView, describeRule, domPositionToCharOffset, domToRuns, drawLayers, drawOneLayer, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, editAnchorsAction, enableLocalFontOutlines2 as enableLocalFontOutlines, enterTextEditAction, enumerateAnchors, evaluate, fillInPoseFrame, fillToBoundsFrame, findNodeShape, findShapeInk, findShapeSilhouette, fitTextPose, fitToBounds, fitViewToBounds, fitZoom, focused, fontString, forEachCoalesced, frameRect, freeform, gateLayer, gesturing, getAlpha01, getImageBitmap, getMarker, getNodeShapes, getPaintKind, getStylusData, gradientForBounds, gradientGeometry, hasFontOutlines2 as hasFontOutlines, hexToRgba, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, imageStatus, inferredNodeProperties, inferredNodeRouting, insertAction, interpolateView, isBuiltinToolPref, isCanvasFont2 as isCanvasFont, isEditableTarget, isGradientFill, isLayerPainted, isLayerVisible, isPatternSpec, keySpecShortcut, lassoSelectAction, layoutMarkdown, layoutRuns, lerpColorArray, lerpOklab, lerpOklch, linear, listFontOutlines2 as listFontOutlines, listMarkers, listPaintKinds, liveScope, makePinchZoomAction, makeViewportZoomAction, markdownToRuns, markerDrawCommands, markerInset, markerKeyOf, markerSites, mat3, matchAlignment, matchesKeyBinding, meanScale, measureText, measureTextBounds, measuredWidth, mergeAlphaFromPrev, mergeContributions, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nearest, nearestWithin, nestedHitTester, never, nodeHasFlag, none, normalizeHex, not, nurbs, oklabToOklch, oklabToSrgbU8, oklchToOklab, openFilePicker, or, outlineStatus2 as outlineStatus, paintAlpha, paintKindOf, paintWithAlpha, paintWithColor, parseColor, parseColorToRgba255, parseDebugFlags, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathDistanceToPoint, pathDivide, pathExclude, pathFromD, pathInPoseFrame, pathInWorld, pathIntersect, pathIntersectsPolygon, pathIntersectsRect, pathOriginProjection, pathSubtract, pathToAnchors, pathUnion, pickTopMostHit, pinchZoomAction, planPixelRender, pointInRotatedRect, pointInTextPose, poseRotationOf, pressureToWidth, rainbowVertexColors, rebaseLocalPose, rectCorners, registerCanvasFont2 as registerCanvasFont, registerContentHandler, registerFont2 as registerFont, registerFontOutlines2 as registerFontOutlines, registerMarker, registerNodeShape, registerPaintKind, renderLabel, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveAlign, resolveColor, resolveCursor, resolveCursorTier, resolveDeviceProfile, resolveEasing, resolveFillPattern, resolveMarkerSize, resolveParams, resolvePatternSpec, resolveRuns, resolveSkeleton, resolveStrokeWidth, resolveTextStyle, resolveVisibility, rgbaToHex, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotatePoint, rotatedRectCorners, rotationDegreesUnit, rotationHandle, roundToCell, runsToDom, runsToMarkdown, runsToPlainText, sampleGradientStops, sampleTrack, sceneFromJSON, sceneNodeClientRect, sceneSelectionStore, sceneToAdapter, scopeBindings, screenToWorld, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, setFlagOverRange, shapeCoversPoint, sliceAction, snapPoint, solid, solidVertexColors, specificity, spiro, splitPathByLine, splitSubpaths, springPose, springVertexColors, srgbU8ToOklab, staggerVertexColors, startThresholdDrag, strokeDashStyleOf, strokeInsets, strokeOf, strokeWith, styleAtRange, subscribeGlyphReady2 as subscribeGlyphReady, subscribeImageReady, textCommand, textCommandFromRuns, textLineBoxes, tileGrid, toHex8, toRuns, translatePoseViaDescriptor, translateRectPose, trimPolyline, tweenPose, tweenVertexColors, unionAABB, unionBounds, unionBoundsPath, unregisterCanvasFont2 as unregisterCanvasFont, unregisterFontOutlines2 as unregisterFontOutlines, useActiveToolContext, useAlign, useAnimator, useArrayAdapter, useAutoCenter, useBooleans, useBooleansAdapter, useCanvasFocus, useCanvasSize, useDecayLoop, useDeviceProfile, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGestureDispatcher, useGridCellHover, useGuides, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useImageTool, useKeybindings, useLassoTool, useLineTool, useNodeOverlayFrame, useOptionalActiveToolContext, usePenTool, usePencilTool, usePinchGesture, usePinchZoomTool, usePointerStylus, usePolygonTool, usePublishSelection, useRectTool, useResizePolicy, useRotateTool, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSelectionContext, useSimulation, useSliceDep, useStandardActions, useStarTool, useTextEdit, useTextTool, useTools, useVelocityTracker, useViewAnimation, useVisibleRaf, useZoom, verticalAlignOffset, viewToMat3, viewToTransform, viewportDragPanAction, viewportZoomAction, viewportsAt, visualBoundsViaDescriptor, when, withAlpha01, withCoord, withGradientKind, worldEditToStorage, worldPoseLookup, worldToScreen, zoomAt, zoomAtLeast } from './chunk-HYJL7OOJ.js';
2
+ export { ActionDisabledReason, ActionsProvider, DepRegistryProvider, actionBindings, evaluateEnabled, useAction, useActionsRegistry, useDepRegistry, useDepSource, useOptionalDepRegistry } from './chunk-UTIFY2UU.js';
3
3
  export { createReparentOp, createTransformOp, deleteScratch, getScratch, scratchKey, setScratch, snap } from './chunk-Y5KS66G7.js';
4
4
  export { CORNER_ANCHORS, cornerPoint, cornerResizeHandles, hitCornerHandle, pointSnapToGrid } from './chunk-BLJNRMKB.js';
5
5
  export { DEFAULT_FLATTEN_TOLERANCE, DEFAULT_GUIDE_TOLERANCE_PX, IMPERIAL_INCHES, METRIC_MM, PATH_C, PATH_CMD_LENGTHS, PATH_L, PATH_M, PATH_Q, PATH_Z, PIXELS, PathBuilder, RECT_ORIGIN_PROJECTION, RECT_POSE_DESCRIPTOR, ROTATED_POSE_DESCRIPTOR, boundsOfPath, ellipsePath, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, formatUnit, gridSnapStrategy, guideSnapStrategy, linePath, pathCommandCoordCount, pathPoseDescriptor, pointInPath, pointToGridCell, polygonFromPoints, polylineFromPoints, pxExtent, rectPath, regularPolygonPath, resolveUnit, scaleDelta, scalePathToBounds, starPath, transformPath, translatePath, translatePolygonInPlace, withinPxBox, withinPxRadius } from './chunk-SBFC6J3C.js';
@@ -8,6 +8,7 @@ import { GestureSpec, IngestItem, InputEvent } from '@weasel-js/gestures';
8
8
  import { D as DrawCommand } from './DrawCommand-b-z1bCT-.js';
9
9
  import { B as Bounds, P as PoseProjection, F as FitViewToBoundsOptions, V as ViewportDims } from './geometry-Dtt_k6Dq.js';
10
10
  import { FillStyle, Stroke } from '@weasel-js/paint';
11
+ import { CursorSpec } from '@weasel-js/cursor';
11
12
  import * as react_jsx_runtime from 'react/jsx-runtime';
12
13
  import { P as Path } from './path-JEV2c5If.js';
13
14
  import { Op, History } from '@weasel-js/history';
@@ -161,10 +162,10 @@ interface AffordanceRegion<TScratch = unknown> {
161
162
  * discriminator; `buildAffordanceAt` falls back to
162
163
  * `<affordanceId>:<regionId>`. */
163
164
  hitKind?: string;
164
- /** CSS cursor to show while hovering this region. Read by the hover-cursor
165
+ /** Cursor to show while hovering this region. Read by the hover-cursor
165
166
  * pump in `useGestureDispatcher` via `AffordanceHit.cursor`, which
166
167
  * `buildAffordanceAt` fills in from the region the walk landed on. */
167
- cursor?: string;
168
+ cursor?: CursorSpec;
168
169
  /** `'exclusive'` bars every binding whose target doesn't consult the
169
170
  * affordance. Read only when the affordance is composed into a
170
171
  * consumer-registered layer; kit chrome routes through
@@ -251,9 +252,9 @@ interface CommonAffordanceScratch {
251
252
  * outright.
252
253
  */
253
254
  interface LayerHit<TScratch = unknown> extends AffordanceBinding<TScratch> {
254
- /** CSS cursor while the pointer is over this hit. Reaches the hover-cursor
255
+ /** Cursor while the pointer is over this hit. Reaches the hover-cursor
255
256
  * pump as `AffordanceHit.cursor`, the same path kit chrome uses. */
256
- cursor?: string;
257
+ cursor?: CursorSpec;
257
258
  /** `'exclusive'` bars every binding whose target doesn't consult the
258
259
  * affordance. Omitted means `'shared'` — today's behavior. Same name and
259
260
  * meaning as `AffordanceHit.strength`, which it becomes. */
@@ -820,11 +821,11 @@ interface AffordanceHit {
820
821
  * Other affordance kinds (rotate-handle, anchor:N, controlIn:N, controlOut:N)
821
822
  * leave this undefined. */
822
823
  anchor?: ResizeAnchor;
823
- /** CSS cursor to show while the pointer hovers this affordance (no
824
+ /** Cursor to show while the pointer hovers this affordance (no
824
825
  * gesture in flight). Consumed by the hover-cursor pump in
825
826
  * `useGestureDispatcher`; unset = the pump falls through to
826
827
  * action-cursor prediction, then to the active tool's cursor. */
827
- cursor?: string;
828
+ cursor?: CursorSpec;
828
829
  /**
829
830
  * Free-form payload from whatever produced the hit, carried through to the
830
831
  * matching action untouched.
@@ -1129,10 +1130,9 @@ interface OngoingHandle {
1129
1130
  * async side-effect; the registry doesn't wait). */
1130
1131
  interface ImmediateInvoker {
1131
1132
  timing: 'immediate';
1132
- /** `params` carries the matched binding's opts.params. When
1133
- * invoked via the legacy `Action.run` bridge or from the command palette
1134
- * with no per-binding context, `params` is undefined; descriptors should
1135
- * default to a sensible variant. */
1133
+ /** `params` carries the matched binding's opts.params. Invoked from the
1134
+ * command palette, or anywhere else with no per-binding context, `params`
1135
+ * is undefined; descriptors should default to a sensible variant. */
1136
1136
  run(deps: ActionDeps, params?: Record<string, unknown>): void;
1137
1137
  }
1138
1138
  /** Phase-machine invocation. `start` opens the phase and returns the handle
@@ -3105,7 +3105,7 @@ interface ToolDef<TScratch = void> {
3105
3105
  hotkey?: HotkeyTrigger;
3106
3106
  onActivate?: (ctx: ToolCtx<TScratch>) => void;
3107
3107
  onDeactivate?: (ctx: ToolCtx<TScratch>) => void;
3108
- cursor?: string | ((ctx: ToolCtx<TScratch>) => string);
3108
+ cursor?: CursorSpec | ((ctx: ToolCtx<TScratch>) => CursorSpec);
3109
3109
  /** Override the default scratch initializer. Default is `() => null`
3110
3110
  * cast to `TScratch`, which works for tools whose scratch is fresh
3111
3111
  * every gesture. Tools that need scratch identity to survive across
@@ -3232,7 +3232,7 @@ interface Tool<TScratch = unknown> extends Contribution {
3232
3232
  * the invoker knows which tool to switch to). */
3233
3233
  keybinding?: ToolKeybinding;
3234
3234
  initScratch?: () => TScratch;
3235
- cursor?: string | ((ctx: ToolCtx<TScratch>) => string);
3235
+ cursor?: CursorSpec | ((ctx: ToolCtx<TScratch>) => CursorSpec);
3236
3236
  onActivate?: (ctx: ToolCtx<TScratch>) => void;
3237
3237
  onDeactivate?: (ctx: ToolCtx<TScratch>) => void;
3238
3238
  /** Returns the in-flight preview pose for `id` if this tool is mid-gesture
@@ -3715,12 +3715,12 @@ interface Action {
3715
3715
  * `Tool.cursor` shows). Affordance hits are resolved earlier in the
3716
3716
  * pump via `AffordanceRegion.cursor` and never reach this field.
3717
3717
  *
3718
- * Static string only. Prediction runs `enabled()` but cannot run the
3718
+ * Static value only. Prediction runs `enabled()` but cannot run the
3719
3719
  * invoker, so an action that matches yet bails at `start()` (empty
3720
3720
  * handle) may still show its cursor — keep `enabled` accurate for
3721
3721
  * actions that declare one.
3722
3722
  */
3723
- cursor?: string;
3723
+ cursor?: CursorSpec;
3724
3724
  /**
3725
3725
  * CSS cursor shown while THIS action's ongoing handle is in flight —
3726
3726
  * grabbing while panning, `move` while dragging a selection, `crosshair`
@@ -3739,7 +3739,7 @@ interface Action {
3739
3739
  * being taken over by bindings, and neither could describe a cursor for an
3740
3740
  * action a tool doesn't own.
3741
3741
  */
3742
- activeCursor?: string;
3742
+ activeCursor?: CursorSpec;
3743
3743
  }
3744
3744
  /**
3745
3745
  * @experimental
package/dist/renderer.js CHANGED
@@ -1,5 +1,5 @@
1
- export { IDENTITY_COLOR_MATRIX, OUTLINE_MIN_SCREEN_PX, ShaderCompileError, WeaselRenderer, buildGradientRamp, canQueryLocalFonts, enableLocalFontOutlines, frameRect, hasFontOutlines, isCanvasFont, listFontOutlines, mat3, outlineStatus, registerCanvasFont, registerFont, registerFontOutlines, registerProgram, subscribeGlyphReady, tessellate, tessellateStroke, unregisterCanvasFont, unregisterFontOutlines, viewToMat3 } from './chunk-IMFXEINV.js';
2
- import './chunk-H6E6KPTU.js';
1
+ export { IDENTITY_COLOR_MATRIX, OUTLINE_MIN_SCREEN_PX, ShaderCompileError, WeaselRenderer, buildGradientRamp, canQueryLocalFonts, enableLocalFontOutlines, frameRect, hasFontOutlines, isCanvasFont, listFontOutlines, mat3, outlineStatus, registerCanvasFont, registerFont, registerFontOutlines, registerProgram, subscribeGlyphReady, tessellate, tessellateStroke, unregisterCanvasFont, unregisterFontOutlines, viewToMat3 } from './chunk-HYJL7OOJ.js';
2
+ import './chunk-UTIFY2UU.js';
3
3
  import './chunk-Y5KS66G7.js';
4
4
  import './chunk-BLJNRMKB.js';
5
5
  import './chunk-SBFC6J3C.js';
package/dist/routing.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ParsedModifiers, GestureName, GestureSpec } from '@weasel-js/gestures';
2
2
  export { ChannelRef, DescribeRouteOptions, GESTURE_DESCRIPTORS, GestureArgSpec, GestureDescriptor, GestureName, ModRequirement, ModifierKey, ParsedModifiers, ParsedRoute, PhaseAtom, RESERVED_ID_NAMES, RESERVED_ID_PREFIXES, ROUTE_FIELD_DEFINITIONS, ROUTE_TERMS, RouteDescriptionPart, RouteFieldName, RouteTermLabel, canonicalModifiers, collapseShiftPairs, describeRoute, describeRouteParts, formatPhaseAtom, formatRoute, getGestureDescriptor, isKnownGestureName, parseRoute } from '@weasel-js/gestures';
3
- import { T as Tool } from './registry-sBLZYWI1.js';
3
+ import { T as Tool } from './registry-CxSEyDka.js';
4
4
  import './types-DIQAisSG.js';
5
5
  import '@weasel-js/history';
6
6
  import './path-JEV2c5If.js';
@@ -13,6 +13,7 @@ import './DrawCommand-b-z1bCT-.js';
13
13
  import '@weasel-js/paint';
14
14
  import '@weasel-js/text';
15
15
  import './geometry-Dtt_k6Dq.js';
16
+ import '@weasel-js/cursor';
16
17
  import 'react/jsx-runtime';
17
18
  import './types-BHK2dkMu.js';
18
19
  import '@weasel-js/geom';