@weasel-js/core 1.0.1 → 1.0.2

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +269 -0
  2. package/dist/{chunk-FVNWK7U3.js → chunk-PI56ORHE.js} +1593 -1316
  3. package/dist/chunk-PI56ORHE.js.map +1 -0
  4. package/dist/{chunk-DCIU3SRK.js → chunk-W2WB4352.js} +79 -151
  5. package/dist/chunk-W2WB4352.js.map +1 -0
  6. package/dist/clipboard.d.ts +1 -1
  7. package/dist/clipboard.js +0 -1
  8. package/dist/clone.d.ts +2 -2
  9. package/dist/clone.js +0 -1
  10. package/dist/{geometry-DVeZ2i-c.d.ts → geometry-CnISZ11w.d.ts} +1 -1
  11. package/dist/{grid-XcFQVS0f.d.ts → grid-CBiLBnyc.d.ts} +2 -2
  12. package/dist/index.d.ts +163 -43
  13. package/dist/index.js +2 -3
  14. package/dist/insert.d.ts +3 -3
  15. package/dist/insert.js +0 -1
  16. package/dist/insert.js.map +1 -1
  17. package/dist/move.d.ts +5 -5
  18. package/dist/move.js +0 -1
  19. package/dist/move.js.map +1 -1
  20. package/dist/{options-wAvCnOZd.d.ts → options-DoOvx50U.d.ts} +1 -1
  21. package/dist/patterns-builtin.js +0 -1
  22. package/dist/{pointSnapToGrid-BuDZWBrL.d.ts → pointSnapToGrid-Bj4r_lEQ.d.ts} +3 -3
  23. package/dist/{index-DPI8DV0A.d.ts → registry-BQL4oyTg.d.ts} +139 -348
  24. package/dist/renderer.d.ts +11 -0
  25. package/dist/renderer.js +2 -3
  26. package/dist/resize.d.ts +5 -5
  27. package/dist/resize.js +0 -1
  28. package/dist/routing.d.ts +104 -5
  29. package/dist/routing.js +1 -2
  30. package/dist/{types-B_-khFM0.d.ts → types-Ch0Goo-j.d.ts} +12 -0
  31. package/dist/{types-BhJJ2OCM.d.ts → types-Ct4n0Z38.d.ts} +1 -1
  32. package/dist/{types-BJ8_cyT7.d.ts → types-Dtxe7jTS.d.ts} +20 -1
  33. package/package.json +6 -6
  34. package/dist/chunk-DCIU3SRK.js.map +0 -1
  35. package/dist/chunk-FVNWK7U3.js.map +0 -1
  36. package/dist/chunk-PZ5AY32C.js +0 -9
  37. package/dist/chunk-PZ5AY32C.js.map +0 -1
@@ -1,19 +1,19 @@
1
1
  import { N as NodeId, R as RectPose, S as Scene } from './types-Kh_osAq9.js';
2
- import { M as ModifierState, A as ActionBehavior, c as ResizeAnchor, R as ResizePose, B as BoundsConstraint, P as PointSnapBehavior } from './types-BhJJ2OCM.js';
2
+ import { M as ModifierState, A as ActionBehavior, c as ResizeAnchor, R as ResizePose, B as BoundsConstraint, P as PointSnapBehavior } from './types-Ct4n0Z38.js';
3
3
  import { V as View } from './view-DSQgxBJB.js';
4
4
  import { CapabilityTag } from '@weasel-js/modes';
5
5
  import * as React from 'react';
6
6
  import { MutableRefObject, ReactNode, ReactElement } from 'react';
7
- import { GestureSpec, IngestItem, InputEvent, ParsedModifiers, GestureName, ChannelRef, DescribeRouteOptions, GESTURE_DESCRIPTORS, GestureArgSpec, GestureDescriptor, ModRequirement, ModifierKey, 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';
8
- import { B as Bounds, P as PoseProjection } from './geometry-DVeZ2i-c.js';
7
+ import { GestureSpec, IngestItem, InputEvent } from '@weasel-js/gestures';
8
+ import { B as Bounds, P as PoseProjection } from './geometry-CnISZ11w.js';
9
9
  import { F as FillStyle, S as Stroke } from './paint-types-CnLIzqq1.js';
10
10
  import { D as DrawCommand } from './DrawCommand-DCmiNkBj.js';
11
11
  import * as react_jsx_runtime from 'react/jsx-runtime';
12
12
  import { P as Path } from './path-B6MMiodD.js';
13
13
  import { Op, History } from '@weasel-js/history';
14
- import { L as LayoutStrategy, I as InsertAdapter } from './types-B_-khFM0.js';
14
+ import { L as LayoutStrategy, I as InsertAdapter } from './types-Ch0Goo-j.js';
15
+ import { D as DebugSink } from './types-Dtxe7jTS.js';
15
16
  import { Mat3 } from '@weasel-js/geom';
16
- import { D as DebugSink } from './types-BJ8_cyT7.js';
17
17
 
18
18
  /**
19
19
  * Read-only state that affordances consult on every render and hit-test
@@ -169,6 +169,13 @@ interface AffordanceRegion<TScratch = unknown> {
169
169
  * pump in `useGestureDispatcher` via `AffordanceHit.cursor`, which
170
170
  * `buildAffordanceAt` fills in from the region the walk landed on. */
171
171
  cursor?: string;
172
+ /** `'exclusive'` bars every binding whose target doesn't consult the
173
+ * affordance. Read only when the affordance is composed into a
174
+ * consumer-registered layer; kit chrome routes through
175
+ * `buildAffordanceAt`, which reports `'shared'`. */
176
+ strength?: 'exclusive' | 'shared';
177
+ /** Which gestures an exclusive claim bars. Omitted bars all of them. */
178
+ claimedKinds?: readonly ClaimableGesture[];
172
179
  /** Drag binding produced when this region is hit. Lazily called so
173
180
  * affordances don't pay binding-construction cost on every paint frame —
174
181
  * state snapshots (e.g., capturing per-leaf poses at click time) belong
@@ -862,7 +869,7 @@ type OngoingOverlay = {
862
869
  * renderer narrows on `shape` and casts the field shape it expects.
863
870
  */
864
871
  kind: 'insertPreview';
865
- shape: 'rect' | 'ellipse' | 'line' | 'polygon' | 'star' | 'pencil';
872
+ shape: 'rect' | 'ellipse' | 'line' | 'polygon' | 'star' | 'pencil' | 'image';
866
873
  bounds: {
867
874
  x: number;
868
875
  y: number;
@@ -926,6 +933,14 @@ interface OngoingHandle {
926
933
  */
927
934
  previewIds?(): Iterable<string> | null;
928
935
  previewPose?(id: string): unknown | null;
936
+ /**
937
+ * Subset of `previewIds()` the ghost layer paints at full opacity. The
938
+ * ghost alpha says "this is in flight under the pointer"; a node the
939
+ * gesture merely displaces — a layout sibling reflowing into its
940
+ * destination slot — is not, and reads better settled. Honored at
941
+ * subtree-root granularity.
942
+ */
943
+ previewOpaqueIds?(): Iterable<string> | null;
929
944
  /**
930
945
  * When `false`, the preview-ghost layer paints the ghost AND the
931
946
  * source node stays visible at its committed pose. Defaults to
@@ -1833,6 +1848,13 @@ type InsertExtras = {
1833
1848
  } | {
1834
1849
  kind: 'text';
1835
1850
  text?: string;
1851
+ } | {
1852
+ kind: 'image';
1853
+ src?: string;
1854
+ opacity?: number;
1855
+ /** Chrome-only: what the in-flight drag paints. Read by the overlay
1856
+ * layer, ignored by the insert dep. */
1857
+ preview?: 'bitmap' | 'outline';
1836
1858
  } | {
1837
1859
  kind: string;
1838
1860
  [extra: string]: unknown;
@@ -2137,6 +2159,14 @@ interface Eligibility {
2137
2159
  /** Modality filter, applied wherever it would otherwise be live. */
2138
2160
  capabilities?: CapabilityTag[];
2139
2161
  }
2162
+ /**
2163
+ * Where an entry's overlay sits in the layer stack, relative to the
2164
+ * selection chrome. `'top'` is the default and renders above everything;
2165
+ * the other two exist for chrome that belongs under the selection handles
2166
+ * (a snap-target highlight, say). With no selection overlay in the stack,
2167
+ * all three collapse to `'top'`.
2168
+ */
2169
+ type OverlayPosition = 'top' | 'before-selection' | 'after-selection';
2140
2170
  /**
2141
2171
  * A registry entry: what it contributes, and when it is eligible. Every role
2142
2172
  * is optional and independent — an entry that only routes input declares only
@@ -2147,12 +2177,112 @@ interface Contribution {
2147
2177
  eligibility: Eligibility;
2148
2178
  bindings?: GestureBinding[];
2149
2179
  actions?: Action[];
2150
- overlay?: RenderLayer<unknown>;
2180
+ /** One layer, or several composed in the given order. */
2181
+ overlay?: RenderLayer<unknown> | RenderLayer<unknown>[];
2182
+ /** Defaults to `'top'`. Applies to every layer in `overlay`. */
2183
+ overlayPosition?: OverlayPosition;
2151
2184
  presentation?: ToolPresentation;
2152
2185
  /** Reflection escape hatch — the authored form, when there was one. */
2153
2186
  def?: unknown;
2154
2187
  }
2155
2188
 
2189
+ /**
2190
+ * Configurable activation-key descriptor for tools that expose their
2191
+ * keybinding to the host (currently Lasso and Eyedropper). Captures
2192
+ * only the fields meaningful to a caller-supplied tool-select key —
2193
+ * dispatcher-internal fields (`skipInEditable`, `enabled`,
2194
+ * `preventDefault`) live on `KeyBinding` in keyHelpers.ts and are
2195
+ * not part of the configurable surface.
2196
+ */
2197
+ interface ToolKeybinding {
2198
+ /** Key or list of keys to match (case-insensitive against `event.key`). */
2199
+ key: string | readonly string[];
2200
+ /** Require Cmd (mac) / Ctrl (others). Default `false`. */
2201
+ mod?: boolean;
2202
+ /** Require Alt. Default `false`. */
2203
+ alt?: boolean;
2204
+ /**
2205
+ * Shift policy. `undefined`/`false` forbids shift, `true` requires
2206
+ * shift, `'optional'` allows either.
2207
+ */
2208
+ shift?: boolean | 'optional';
2209
+ }
2210
+ interface ToolDef<TScratch = void> {
2211
+ id: string;
2212
+ /** Capability tags for modality eligibility. Forwarded onto `Tool.capabilities`. */
2213
+ capabilities?: CapabilityTag[];
2214
+ /**
2215
+ * Actions this tool owns and needs registered while it is in the tools
2216
+ * registry — e.g. polygon's `polygon.adjustSides`, which its own bindings
2217
+ * reference by id.
2218
+ *
2219
+ * Declared here rather than registered by the hook with `useAction`,
2220
+ * because tool hooks run wherever the consumer calls them — for
2221
+ * `<SceneCanvas>` that is ABOVE `<ActionsProviderIfRoot>`, where
2222
+ * `useActionsRegistry()` returns null and `useAction` silently no-ops. The
2223
+ * result was a binding pointing at an action id nothing had registered, so
2224
+ * the gesture fell through to whatever matched next (polygon's
2225
+ * wheel/arrow-key side adjustment did nothing and `nudge.*` moved the
2226
+ * selection instead). `<ToolActionsMounter>` registers these from inside
2227
+ * the provider.
2228
+ */
2229
+ actions?: Action[];
2230
+ /** Hook name as exported from the kit barrel (e.g. `'useHandTool'`).
2231
+ * Set by built-in hooks for inspector / debugging. Consumer-authored
2232
+ * tools may set this to surface their hook name; omitted is fine.
2233
+ * Introspection-only — do not make this load-bearing in production.
2234
+ * Read off the def via `Tool.def` (the reflection escape hatch). */
2235
+ hookName?: string;
2236
+ presentation?: ToolPresentation<TScratch>;
2237
+ /** Optional caller-supplied activation key. Most built-in tools have their
2238
+ * activation key declared in `BUILTIN_SELECT_KEYS` in `useKeybindings.ts`;
2239
+ * this field is for tools that want their activation key to be
2240
+ * configurable by the host (currently Lasso and Eyedropper). The dynamic
2241
+ * loop in `useKeybindings.ts` picks this up and appends a binding entry
2242
+ * to the consolidated `tool.activate` action (with `opts.params.toolId`
2243
+ * set so the invoker knows which tool to switch to). */
2244
+ keybinding?: ToolKeybinding;
2245
+ /** Held-key trigger: this tool engages while the key is down and
2246
+ * disengages on release. Carried onto `Tool.eligibility.offhand`, which
2247
+ * assembly reads to register the consolidated `tool.offhand` action — the
2248
+ * declaration is the wiring, with nothing for the host to do. */
2249
+ hotkey?: HotkeyTrigger;
2250
+ onActivate?: (ctx: ToolCtx<TScratch>) => void;
2251
+ onDeactivate?: (ctx: ToolCtx<TScratch>) => void;
2252
+ cursor?: string | ((ctx: ToolCtx<TScratch>) => string);
2253
+ /** Override the default scratch initializer. Default is `() => null`
2254
+ * cast to `TScratch`, which works for tools whose scratch is fresh
2255
+ * every gesture. Tools that need scratch identity to survive across
2256
+ * gesture boundaries (e.g. the pen tool's multi-click subpath state)
2257
+ * pass a stable-ref-returning thunk here. The factory forwards this
2258
+ * onto the returned `Tool.initScratch`. */
2259
+ initScratch?: () => TScratch;
2260
+ /** Declarative gesture bindings, forwarded onto `Tool.bindings`. The
2261
+ * gesture dispatcher consults these at active scope while this tool is the
2262
+ * active one, and at hotkey scope while it is held. This is the tool's
2263
+ * entire input surface — the `initial` / `engaged` phase tables that used
2264
+ * to sit beside it are gone, along with the second dispatcher that read
2265
+ * them. */
2266
+ bindings?: GestureBinding[];
2267
+ /** Optional overlay layer rendered while the tool occupies any slot
2268
+ * (active, hotkey, or ambient), surfaced on `Tool.overlay`.
2269
+ *
2270
+ * The layer's `draw` closure should read dynamic state through refs or
2271
+ * closures captured in the enclosing render scope, and gate on it there —
2272
+ * `if (!scratch.something) return []` — rather than expecting the kit to
2273
+ * swap layers as the gesture progresses.
2274
+ *
2275
+ * Pass an array to contribute several layers; they render in order. */
2276
+ overlay?: RenderLayer<unknown> | RenderLayer<unknown>[];
2277
+ /** Where `overlay` sits relative to the selection chrome. Defaults to
2278
+ * `'top'`, above everything. */
2279
+ overlayPosition?: OverlayPosition;
2280
+ }
2281
+ /** Viewport-tool spec. Once phase tables went away this stopped differing
2282
+ * from `ToolDef` in any structural way; `defineViewportTool` survives as the
2283
+ * authoring signal that a tool pans/zooms the view rather than the scene. */
2284
+ type ViewportToolDef<TScratch = void> = ToolDef<TScratch>;
2285
+
2156
2286
  /** Modifier-key snapshot at event dispatch time. `space` is included
2157
2287
  * because tools commonly use space as a hotkey-slot trigger and may
2158
2288
  * also want to read it as a flag mid-gesture. */
@@ -2303,7 +2433,7 @@ interface MatchResult {
2303
2433
  * [0] target — how much the spec's target narrows; see `targetRank`.
2304
2434
  * [1] mods — count of required modifier keys (shift/alt/ctrl/meta/mod).
2305
2435
  * `'optional'` does NOT count.
2306
- * [2] phase — 1 if the spec declares a `phase` field, else 0.
2436
+ * [2] phase — how much the spec's `phase` narrows; see `phaseRank`.
2307
2437
  * [3] exact — per-kind tiebreak: 2 for a drop/paste spec with a
2308
2438
  * non-empty `types` MIME filter, else 1.
2309
2439
  *
@@ -2829,343 +2959,4 @@ declare function useActionsRegistry(): ActionsRegistry | null;
2829
2959
  */
2830
2960
  declare function useAction(action: Action): void;
2831
2961
 
2832
- /**
2833
- * Configurable activation-key descriptor for tools that expose their
2834
- * keybinding to the host (currently Lasso and Eyedropper). Captures
2835
- * only the fields meaningful to a caller-supplied tool-select key —
2836
- * dispatcher-internal fields (`skipInEditable`, `enabled`,
2837
- * `preventDefault`) live on `KeyBinding` in keyHelpers.ts and are
2838
- * not part of the configurable surface.
2839
- */
2840
- interface ToolKeybinding {
2841
- /** Key or list of keys to match (case-insensitive against `event.key`). */
2842
- key: string | readonly string[];
2843
- /** Require Cmd (mac) / Ctrl (others). Default `false`. */
2844
- mod?: boolean;
2845
- /** Require Alt. Default `false`. */
2846
- alt?: boolean;
2847
- /**
2848
- * Shift policy. `undefined`/`false` forbids shift, `true` requires
2849
- * shift, `'optional'` allows either.
2850
- */
2851
- shift?: boolean | 'optional';
2852
- }
2853
- interface ToolDef<TScratch = void> {
2854
- id: string;
2855
- /** Capability tags for modality eligibility. Forwarded onto `Tool.capabilities`. */
2856
- capabilities?: CapabilityTag[];
2857
- /**
2858
- * Actions this tool owns and needs registered while it is in the tools
2859
- * registry — e.g. polygon's `polygon.adjustSides`, which its own bindings
2860
- * reference by id.
2861
- *
2862
- * Declared here rather than registered by the hook with `useAction`,
2863
- * because tool hooks run wherever the consumer calls them — for
2864
- * `<SceneCanvas>` that is ABOVE `<ActionsProviderIfRoot>`, where
2865
- * `useActionsRegistry()` returns null and `useAction` silently no-ops. The
2866
- * result was a binding pointing at an action id nothing had registered, so
2867
- * the gesture fell through to whatever matched next (polygon's
2868
- * wheel/arrow-key side adjustment did nothing and `nudge.*` moved the
2869
- * selection instead). `<ToolActionsMounter>` registers these from inside
2870
- * the provider.
2871
- */
2872
- actions?: Action[];
2873
- /** Hook name as exported from the kit barrel (e.g. `'useHandTool'`).
2874
- * Set by built-in hooks for inspector / debugging. Consumer-authored
2875
- * tools may set this to surface their hook name; omitted is fine.
2876
- * Introspection-only — do not make this load-bearing in production.
2877
- * Read off the def via `Tool.def` (the reflection escape hatch). */
2878
- hookName?: string;
2879
- presentation?: ToolPresentation<TScratch>;
2880
- /** Optional caller-supplied activation key. Most built-in tools have their
2881
- * activation key declared in `BUILTIN_SELECT_KEYS` in `useKeybindings.ts`;
2882
- * this field is for tools that want their activation key to be
2883
- * configurable by the host (currently Lasso and Eyedropper). The dynamic
2884
- * loop in `useKeybindings.ts` picks this up and appends a binding entry
2885
- * to the consolidated `tool.activate` action (with `opts.params.toolId`
2886
- * set so the invoker knows which tool to switch to). */
2887
- keybinding?: ToolKeybinding;
2888
- /** Held-key trigger: this tool engages while the key is down and
2889
- * disengages on release. Carried onto `Tool.eligibility.offhand`, which
2890
- * assembly reads to register the consolidated `tool.offhand` action — the
2891
- * declaration is the wiring, with nothing for the host to do. */
2892
- hotkey?: HotkeyTrigger;
2893
- onActivate?: (ctx: ToolCtx<TScratch>) => void;
2894
- onDeactivate?: (ctx: ToolCtx<TScratch>) => void;
2895
- cursor?: string | ((ctx: ToolCtx<TScratch>) => string);
2896
- /** Override the default scratch initializer. Default is `() => null`
2897
- * cast to `TScratch`, which works for tools whose scratch is fresh
2898
- * every gesture. Tools that need scratch identity to survive across
2899
- * gesture boundaries (e.g. the pen tool's multi-click subpath state)
2900
- * pass a stable-ref-returning thunk here. The factory forwards this
2901
- * onto the returned `Tool.initScratch`. */
2902
- initScratch?: () => TScratch;
2903
- /** Declarative gesture bindings, forwarded onto `Tool.bindings`. The
2904
- * gesture dispatcher consults these at active scope while this tool is the
2905
- * active one, and at hotkey scope while it is held. This is the tool's
2906
- * entire input surface — the `initial` / `engaged` phase tables that used
2907
- * to sit beside it are gone, along with the second dispatcher that read
2908
- * them. */
2909
- bindings?: GestureBinding[];
2910
- /** Optional overlay layer rendered while the tool occupies any slot
2911
- * (active, hotkey, or ambient), surfaced on `Tool.overlay`.
2912
- *
2913
- * The layer's `draw` closure should read dynamic state through refs or
2914
- * closures captured in the enclosing render scope, and gate on it there —
2915
- * `if (!scratch.something) return []` — rather than expecting the kit to
2916
- * swap layers as the gesture progresses. */
2917
- overlay?: RenderLayer<unknown>;
2918
- }
2919
- /** Viewport-tool spec. Once phase tables went away this stopped differing
2920
- * from `ToolDef` in any structural way; `defineViewportTool` survives as the
2921
- * authoring signal that a tool pans/zooms the view rather than the scene. */
2922
- type ViewportToolDef<TScratch = void> = ToolDef<TScratch>;
2923
-
2924
- /**
2925
- * Build a `Tool<TScratch>` from a declarative `ToolDef<TScratch>`.
2926
- *
2927
- * This used to be a translator: `ToolDef` carried `initial` / `engaged` phase
2928
- * tables of hit-keyed route handlers, and `defineTool` compiled them into the
2929
- * imperative `pointer` / `drag` / `keyboard` / `wheel` handlers the
2930
- * tool-routing dispatcher called. Both ends of that are gone — tools declare
2931
- * `bindings` and the gesture dispatcher routes them — so what remains is
2932
- * identity plumbing plus the id check and the cursor resolver.
2933
- *
2934
- * It stays a function rather than becoming a spread because the id validation
2935
- * and the `initScratch` / `cursor` defaults are worth applying uniformly, and
2936
- * because `Tool.def` gives reflection a handle on the authored form.
2937
- */
2938
- declare function defineTool<TScratch = void>(def: ToolDef<TScratch>): Tool<TScratch>;
2939
-
2940
- /**
2941
- * Define a tool that acts on the viewport rather than the scene.
2942
- *
2943
- * This used to do real work: `ViewportPhaseDef` was a narrowed `PhaseDef`
2944
- * (no click routes, drag restricted to the function form), and the factory
2945
- * lifted it back to the permissive shape before handing it to `defineTool`.
2946
- * With phase tables gone there is no shape left to narrow — a viewport tool
2947
- * declares `bindings` like any other, pointing at `viewport.*` actions.
2948
- *
2949
- * It survives as an authoring signal. `defineViewportTool` at the top of a
2950
- * hook says "this tool moves the camera, not the drawing", which is worth
2951
- * more than the type gymnastics it replaced.
2952
- */
2953
- declare function defineViewportTool<TScratch = void>(def: ViewportToolDef<TScratch>): Tool<TScratch>;
2954
-
2955
- /**
2956
- * One row in the route registry — a single `GestureBinding` on one tool,
2957
- * flattened into the route grammar's vocabulary so the inspector, the
2958
- * conflict checker, and `describeRoute` can all read the same shape.
2959
- *
2960
- * Multiple rows can share (gesture, arg, target, modifiers) if different tools
2961
- * declare them; consumers walk the list and group client-side.
2962
- */
2963
- interface RegistryEntry {
2964
- toolId: string;
2965
- /** Which phase the binding's `phase` spec restricts it to. `'any'` when it
2966
- * declares none, declares `'*'`, or declares an atom list whose atoms
2967
- * don't agree on one phase — such a binding fires in either phase, and
2968
- * reporting it as `'initial'` made it collide with genuinely-initial
2969
- * bindings in `findConflicts`' bucket key. */
2970
- phase: 'initial' | 'engaged' | 'any';
2971
- /** Structured v3 modifier requirements. Empty object = "no modifiers
2972
- * held" (the strict default). */
2973
- modifiers: ParsedModifiers;
2974
- gesture: GestureName;
2975
- /** Resolved arg value for arg-bearing gestures (wheel direction,
2976
- * key name, multiTouchTap fingers). Undefined for gestures whose
2977
- * descriptor has no `arg`. */
2978
- arg: string | undefined;
2979
- /** Target class for hit-testing gestures. `undefined` when the descriptor
2980
- * has `hasTarget: false` or the spec declares no target;
2981
- * {@link PREDICATE_TARGET} when the spec uses a `kindOf` predicate, which
2982
- * the route grammar has no notation for. */
2983
- target: string | undefined;
2984
- /** The action this binding fires. */
2985
- actionId: string;
2986
- /** The `GestureSpec` this row was flattened from, by reference. Reflection
2987
- * consumers that need something the grammar doesn't capture — the
2988
- * specificity tuple, a `kindOf` predicate identity — read it here rather
2989
- * than re-walking `Tool.bindings`. */
2990
- spec: GestureSpec;
2991
- }
2992
- /**
2993
- * Stand-in target for a `{ kindOf }` predicate spec.
2994
- *
2995
- * The route grammar can name target *classes* (`empty`, `selected-body`,
2996
- * `kind:rect`) but not arbitrary predicates, so three distinct select-tool
2997
- * bindings all render as this one token. Narrowing it would mean giving the
2998
- * grammar a way to describe a function, which is a real design question and
2999
- * not one this reflection layer should answer by inventing syntax.
3000
- */
3001
- declare const PREDICATE_TARGET = "predicate";
3002
- /**
3003
- * Flatten every tool's `bindings` into route-registry rows.
3004
- *
3005
- * This was `buildActionRegistry`, and it walked `ToolDef.initial` /
3006
- * `.engaged` phase tables — the grammar that no longer exists. It was also
3007
- * blind to `Tool.bindings` the entire time the two lived side by side, which
3008
- * is why the inspector under-reported select by more than half. The rename
3009
- * fixes a second thing: it never had anything to do with the Actions
3010
- * Registry, and reading `buildActionRegistry` next to `ActionsRegistry`
3011
- * suggested otherwise.
3012
- */
3013
- declare function buildRouteRegistry(tools: readonly Tool<unknown>[]): RegistryEntry[];
3014
-
3015
- /** Two or more tools declare the same exact (phase, gesture, arg, target,
3016
- * modifiers) tuple — the dispatcher's slot precedence picks one
3017
- * arbitrarily (well, deterministically by slot order, but the author
3018
- * probably didn't intend the duplication). */
3019
- interface Conflict {
3020
- phase: 'initial' | 'engaged' | 'any';
3021
- gesture: GestureName;
3022
- arg: string | undefined;
3023
- target: string | undefined;
3024
- modifiers: ParsedModifiers;
3025
- /** All tool ids that registered the same tuple. At least 2 by
3026
- * construction. Order matches the input tools[] order. */
3027
- toolIds: string[];
3028
- }
3029
- /** Detect exact-tuple overlaps across a tool registration set.
3030
- *
3031
- * Intentionally NOT flagged:
3032
- * - Broad vs. narrow targets (e.g. an untargeted `click` alongside
3033
- * `click` on `empty`) — the dispatcher's specificity ordering resolves
3034
- * those cleanly, and the broad one is usually the intended fallback.
3035
- * - Different modifier requirements on the same target — they fire on
3036
- * different inputs.
3037
- * - A binding whose action declines via `enabled()` so a lower-priority
3038
- * one can take the gesture. Detecting that intent would mean evaluating
3039
- * the action; consumers can suppress known-intentional compositions in
3040
- * their UI layer.
3041
- *
3042
- * - Two `{ kindOf }` predicate targets. The route grammar renders every
3043
- * predicate as the single token {@link PREDICATE_TARGET}, so bucketing on
3044
- * the rendered target alone reported select's `resize` / `rotate` / `move`
3045
- * drags — three genuinely different predicates — as a three-way conflict.
3046
- * Predicate entries bucket by function identity instead, which means two
3047
- * *separately written but equivalent* predicates go unflagged. That's the
3048
- * right way to be wrong here: this check has to be silent when nothing is
3049
- * wrong or nobody will keep it on.
3050
- *
3051
- * Note that two bindings sharing a tuple on the SAME tool are now possible
3052
- * (bindings are an array, where phase tables were objects with unique
3053
- * keys) — so a conflict may name one tool twice.
3054
- *
3055
- * This is the raw same-tuple detector. Feeding it a whole tool *registry*
3056
- * over-reports, because registry tools take turns in the active slot and
3057
- * can't collide with each other — see {@link findScopedConflicts}.
3058
- */
3059
- declare function findConflicts(tools: readonly Tool<unknown>[]): Conflict[];
3060
- /**
3061
- * The tool scopes as the dispatcher sees them — which is what decides whether
3062
- * two same-tuple bindings can actually collide.
3063
- */
3064
- interface ToolScopes {
3065
- /** Tools eligible for the active slot, keyed by id or as a flat list. */
3066
- registry: readonly Tool<unknown>[] | Readonly<Record<string, Tool<unknown>>>;
3067
- /** Always-on tools. Every one of these is live at once. */
3068
- ambient?: readonly Tool<unknown>[];
3069
- /** Registered actions. Their `defaultBinding`s assemble at ambient scope
3070
- * (hotkey scope when `Action.scope` says so), alongside the tools above. */
3071
- actions?: readonly Action[];
3072
- }
3073
- /**
3074
- * Detect the same-tuple overlaps that are *reachable* — the ones where the
3075
- * dispatcher really does fall back on declaration order.
3076
- *
3077
- * `matchSorted` walks scopes in strict priority (hotkey > active > ambient)
3078
- * and only sorts by specificity *within* a scope. So a cross-scope tie isn't
3079
- * a tie at all: an ambient tool losing a tuple to the active tool is the
3080
- * documented design, not an accident. Likewise two registry tools sharing a
3081
- * tuple — `rect` and `ellipse` both binding a bare `drag` — can never both be
3082
- * in the active slot, so they never compete.
3083
- *
3084
- * What's left, and what this reports:
3085
- * - a single tool colliding with **itself** (possible since bindings became
3086
- * an array), which is ambiguous in whichever slot it occupies;
3087
- * - two **ambient** tools, all of which are live simultaneously and are
3088
- * ordered only by registration;
3089
- * - two **hotkey-capable** tools, which can stack.
3090
- *
3091
- * Registered actions join the same two buckets: their `defaultBinding`s
3092
- * assemble at ambient scope (hotkey scope when `Action.scope` says so), so an
3093
- * ambient tool and an action claiming one tuple really do fall back on
3094
- * declaration order.
3095
- */
3096
- declare function findScopedConflicts(scopes: ToolScopes): Conflict[];
3097
- /**
3098
- * Render a conflict as one line of human-readable text.
3099
- *
3100
- * The tuple is printed through {@link formatRoute}, so the message names the
3101
- * collision in the same grammar the author wrote the binding in — modulo the
3102
- * phase slot, which prints as a bare `'&'`-channel atom because the bucket key
3103
- * collapses channel-bearing phase specs (`sel:engaged` and `&:engaged` collide
3104
- * with each other, and the collapse is what made them collide).
3105
- */
3106
- declare function formatConflict(conflict: Conflict): string;
3107
- /**
3108
- * Detect reachable route conflicts in an assembled tool set and report each one.
3109
- *
3110
- * This is the wiring `findConflicts` spent its first life without: the kit
3111
- * could detect the one class of genuine routing ambiguity it has and never
3112
- * looked. Call it once wherever a tool set is assembled (`useTools` does),
3113
- * behind a `process.env.NODE_ENV !== 'production'` guard.
3114
- *
3115
- * **Warn, never throw.** A conflict between a consumer's tool and a kit tool
3116
- * is a design question — sometimes deliberate, since the loser can still take
3117
- * the gesture by declining through `enabled()` — and exploding in a running
3118
- * app is the wrong way to raise it. A conflict between two *kit* tools is
3119
- * always a bug, but the place to fail on that is the kit's own test suite
3120
- * (`canvas/SceneCanvas.routeConflicts.test.tsx`), not a consumer's console.
3121
- *
3122
- * @returns The conflicts found, so callers can dedupe repeat reports.
3123
- */
3124
- declare function reportRouteConflicts(scopes: ToolScopes, warn?: (message: string) => void): Conflict[];
3125
-
3126
- declare const index_ChannelRef: typeof ChannelRef;
3127
- type index_Conflict = Conflict;
3128
- declare const index_DescribeRouteOptions: typeof DescribeRouteOptions;
3129
- declare const index_GESTURE_DESCRIPTORS: typeof GESTURE_DESCRIPTORS;
3130
- declare const index_GestureArgSpec: typeof GestureArgSpec;
3131
- declare const index_GestureDescriptor: typeof GestureDescriptor;
3132
- declare const index_GestureName: typeof GestureName;
3133
- declare const index_ModRequirement: typeof ModRequirement;
3134
- declare const index_ModifierKey: typeof ModifierKey;
3135
- declare const index_PREDICATE_TARGET: typeof PREDICATE_TARGET;
3136
- declare const index_ParsedModifiers: typeof ParsedModifiers;
3137
- declare const index_ParsedRoute: typeof ParsedRoute;
3138
- declare const index_PhaseAtom: typeof PhaseAtom;
3139
- declare const index_RESERVED_ID_NAMES: typeof RESERVED_ID_NAMES;
3140
- declare const index_RESERVED_ID_PREFIXES: typeof RESERVED_ID_PREFIXES;
3141
- declare const index_ROUTE_FIELD_DEFINITIONS: typeof ROUTE_FIELD_DEFINITIONS;
3142
- declare const index_ROUTE_TERMS: typeof ROUTE_TERMS;
3143
- type index_RegistryEntry = RegistryEntry;
3144
- declare const index_RouteDescriptionPart: typeof RouteDescriptionPart;
3145
- declare const index_RouteFieldName: typeof RouteFieldName;
3146
- declare const index_RouteTermLabel: typeof RouteTermLabel;
3147
- type index_ToolDef<TScratch = void> = ToolDef<TScratch>;
3148
- type index_ToolKeybinding = ToolKeybinding;
3149
- type index_ToolScopes = ToolScopes;
3150
- type index_ViewportToolDef<TScratch = void> = ViewportToolDef<TScratch>;
3151
- declare const index_buildRouteRegistry: typeof buildRouteRegistry;
3152
- declare const index_canonicalModifiers: typeof canonicalModifiers;
3153
- declare const index_collapseShiftPairs: typeof collapseShiftPairs;
3154
- declare const index_defineTool: typeof defineTool;
3155
- declare const index_defineViewportTool: typeof defineViewportTool;
3156
- declare const index_describeRoute: typeof describeRoute;
3157
- declare const index_describeRouteParts: typeof describeRouteParts;
3158
- declare const index_findConflicts: typeof findConflicts;
3159
- declare const index_findScopedConflicts: typeof findScopedConflicts;
3160
- declare const index_formatConflict: typeof formatConflict;
3161
- declare const index_formatPhaseAtom: typeof formatPhaseAtom;
3162
- declare const index_formatRoute: typeof formatRoute;
3163
- declare const index_getGestureDescriptor: typeof getGestureDescriptor;
3164
- declare const index_isKnownGestureName: typeof isKnownGestureName;
3165
- declare const index_parseRoute: typeof parseRoute;
3166
- declare const index_reportRouteConflicts: typeof reportRouteConflicts;
3167
- declare namespace index {
3168
- export { index_ChannelRef as ChannelRef, type index_Conflict as Conflict, index_DescribeRouteOptions as DescribeRouteOptions, index_GESTURE_DESCRIPTORS as GESTURE_DESCRIPTORS, index_GestureArgSpec as GestureArgSpec, index_GestureDescriptor as GestureDescriptor, index_GestureName as GestureName, index_ModRequirement as ModRequirement, index_ModifierKey as ModifierKey, index_PREDICATE_TARGET as PREDICATE_TARGET, index_ParsedModifiers as ParsedModifiers, index_ParsedRoute as ParsedRoute, index_PhaseAtom as PhaseAtom, index_RESERVED_ID_NAMES as RESERVED_ID_NAMES, index_RESERVED_ID_PREFIXES as RESERVED_ID_PREFIXES, index_ROUTE_FIELD_DEFINITIONS as ROUTE_FIELD_DEFINITIONS, index_ROUTE_TERMS as ROUTE_TERMS, type index_RegistryEntry as RegistryEntry, index_RouteDescriptionPart as RouteDescriptionPart, index_RouteFieldName as RouteFieldName, index_RouteTermLabel as RouteTermLabel, type index_ToolDef as ToolDef, type index_ToolKeybinding as ToolKeybinding, type index_ToolScopes as ToolScopes, type index_ViewportToolDef as ViewportToolDef, index_buildRouteRegistry as buildRouteRegistry, index_canonicalModifiers as canonicalModifiers, index_collapseShiftPairs as collapseShiftPairs, index_defineTool as defineTool, index_defineViewportTool as defineViewportTool, index_describeRoute as describeRoute, index_describeRouteParts as describeRouteParts, index_findConflicts as findConflicts, index_findScopedConflicts as findScopedConflicts, index_formatConflict as formatConflict, index_formatPhaseAtom as formatPhaseAtom, index_formatRoute as formatRoute, index_getGestureDescriptor as getGestureDescriptor, index_isKnownGestureName as isKnownGestureName, index_parseRoute as parseRoute, index_reportRouteConflicts as reportRouteConflicts };
3169
- }
3170
-
3171
- export { type BoundGesture as $, type Action as A, type BooleansAdapter as B, type Condition as C, type Dims as D, type Eligibility as E, type ActionDeps as F, type GeometryProjection as G, type HotkeyTrigger as H, type InsertExtras as I, ActionDisabledReason as J, type ActionEnabledResult as K, type LayerHit as L, type ActionEntry as M, ActionsProvider as N, ActiveToolContextProvider as O, ActiveToolContextProviderIfRoot as P, type ActiveToolContextProviderProps as Q, type RenderLayer as R, type SliceDep as S, type Tool as T, type UseSelectionOptions as U, type VisibilityRules as V, type ActiveToolContextValue as W, type AreaSelectDep as X, type BindingOpts as Y, type BooleanOp as Z, type BooleanOpResult as _, type DeviceProfile as a, index as a$, type BuildRuleCtxArgs as a0, type ClaimableGesture as a1, type ClipboardDep as a2, type ClipboardIngestCtx as a3, type CustomPaintContext as a4, type DepName as a5, type DepRegistry as a6, DepRegistryProvider as a7, type DispatcherContext as a8, type DragSample as a9, type ResolvedCandidate as aA, type SelectionExtendKey as aB, type SelectionMode as aC, type Selector as aD, type SnapDep as aE, type SvgUnpacker as aF, type TextEditDep as aG, type ToolModifiers as aH, type ToolPresentation as aI, type ToolSlot as aJ, type UiOngoingControl as aK, type ViewApi as aL, applyBooleanOp as aM, buildRuleCtx as aN, clipboardCopyAction as aO, clipboardCutAction as aP, composeRectPose as aQ, composeWorldPose as aR, createDispatcher as aS, decomposeRectPose as aT, describeRule as aU, drawLayers as aV, enterTextEditAction as aW, evaluate as aX, evaluateEnabled as aY, rebaseLocalPose as aZ, registerContentHandler as a_, type EditAnchorsDep as aa, type GestureBinding as ab, IDENTITY_POSE_COMPOSITION as ac, type ImmediateInvoker as ad, type IngestCtx as ae, type IngestionDep as af, type InsertDep as ag, type InvocationCtx as ah, type Invoker as ai, type LassoSelectDep as aj, type LayoutDep as ak, type MatchResult as al, NEVER as am, type NodeAtPointDep as an, type OngoingHandle as ao, type OngoingInvoker as ap, type OngoingOverlay as aq, type Point2 as ar, PointerContextProvider as as, type PointerContextValue as at, type PointerWorldPos as au, type PoseAdapter as av, type PoseComposition as aw, type ResizePolicy as ax, type ResolveAllOptions as ay, type ResolveOnlyResult as az, type DetectedDeviceFacts as b, sliceAction as b0, specificity as b1, translateRectPose as b2, useAction as b3, useActionsRegistry as b4, useActiveToolContext as b5, useDepRegistry as b6, useDepSource as b7, useOptionalActiveToolContext as b8, useOptionalDepRegistry as b9, usePointerContext as ba, useSelection as bb, worldPoseLookup as bc, type Conflict as bd, PREDICATE_TARGET as be, type RegistryEntry as bf, type ToolDef as bg, type ToolScopes as bh, type ViewportToolDef as bi, buildRouteRegistry as bj, defineTool as bk, defineViewportTool as bl, findConflicts as bm, findScopedConflicts as bn, formatConflict as bo, reportRouteConflicts as bp, type Rule as c, type RuleCtx as d, type ChromeCtx as e, type ChromeId as f, type DepSchema as g, type ActionsRegistry as h, type AffordanceHit as i, type Dispatcher as j, type AnyTool as k, type ToolCtx as l, type ToolKeybinding as m, type ChromeState as n, type SelectionApi as o, type ContentHandlerEntry as p, type SvgIngestOptions as q, type ActionsProp as r, type Affordance as s, type AffordanceBinding as t, type AffordanceRegion as u, type CommonAffordanceScratch as v, type BindingScope as w, type Contribution as x, type ScopedBinding as y, ALWAYS as z };
2962
+ export { type BindingOpts as $, type Action as A, type BooleansAdapter as B, type Condition as C, type Dims as D, type Eligibility as E, type ScopedBinding as F, type GeometryProjection as G, type HotkeyTrigger as H, type InsertExtras as I, ALWAYS as J, type ActionDeps as K, type LayerHit as L, ActionDisabledReason as M, type ActionEnabledResult as N, type OverlayPosition as O, type ActionEntry as P, ActionsProvider as Q, type RenderLayer as R, type SliceDep as S, type Tool as T, type UseSelectionOptions as U, type VisibilityRules as V, ActiveToolContextProvider as W, ActiveToolContextProviderIfRoot as X, type ActiveToolContextProviderProps as Y, type ActiveToolContextValue as Z, type AreaSelectDep as _, type DeviceProfile as a, evaluateEnabled as a$, type BooleanOp as a0, type BooleanOpResult as a1, type BoundGesture as a2, type BuildRuleCtxArgs as a3, type ClaimableGesture as a4, type ClipboardDep as a5, type ClipboardIngestCtx as a6, type CustomPaintContext as a7, type DepName as a8, type DepRegistry as a9, type ResizePolicy as aA, type ResolveAllOptions as aB, type ResolveOnlyResult as aC, type ResolvedCandidate as aD, type SelectionExtendKey as aE, type SelectionMode as aF, type Selector as aG, type SnapDep as aH, type SvgUnpacker as aI, type TextEditDep as aJ, type ToolModifiers as aK, type ToolPresentation as aL, type ToolSlot as aM, type UiOngoingControl as aN, type ViewApi as aO, applyBooleanOp as aP, buildRuleCtx as aQ, clipboardCopyAction as aR, clipboardCutAction as aS, composeRectPose as aT, composeWorldPose as aU, createDispatcher as aV, decomposeRectPose as aW, describeRule as aX, drawLayers as aY, enterTextEditAction as aZ, evaluate as a_, DepRegistryProvider as aa, type DispatcherContext as ab, type DragSample as ac, type EditAnchorsDep as ad, type GestureBinding as ae, IDENTITY_POSE_COMPOSITION as af, type ImmediateInvoker as ag, type IngestCtx as ah, type IngestionDep as ai, type InsertDep as aj, type InvocationCtx as ak, type Invoker as al, type LassoSelectDep as am, type LayoutDep as an, type MatchResult as ao, NEVER as ap, type NodeAtPointDep as aq, type OngoingHandle as ar, type OngoingInvoker as as, type OngoingOverlay as at, type Point2 as au, PointerContextProvider as av, type PointerContextValue as aw, type PointerWorldPos as ax, type PoseAdapter as ay, type PoseComposition as az, type DetectedDeviceFacts as b, rebaseLocalPose as b0, registerContentHandler as b1, sliceAction as b2, specificity as b3, translateRectPose as b4, useAction as b5, useActionsRegistry as b6, useActiveToolContext as b7, useDepRegistry as b8, useDepSource as b9, useOptionalActiveToolContext as ba, useOptionalDepRegistry as bb, usePointerContext as bc, useSelection as bd, worldPoseLookup as be, type Rule as c, type RuleCtx as d, type ChromeCtx as e, type ChromeId as f, type DepSchema as g, type ActionsRegistry as h, type AffordanceHit as i, type Dispatcher as j, type ToolDef as k, type ViewportToolDef as l, type AnyTool as m, type ToolCtx as n, type ToolKeybinding as o, type ChromeState as p, type SelectionApi as q, type ContentHandlerEntry as r, type SvgIngestOptions as s, type ActionsProp as t, type Affordance as u, type AffordanceRegion as v, type AffordanceBinding as w, type CommonAffordanceScratch as x, type BindingScope as y, type Contribution as z };
@@ -109,6 +109,8 @@ declare class GLMeshCache {
109
109
  private readonly gl;
110
110
  private readonly aPositionLoc;
111
111
  private readonly map;
112
+ /** Meshes this context has drawn at least once; see `uploadRecurring`. */
113
+ private readonly seen;
112
114
  private readonly finalizer;
113
115
  private readonly pendingDeletes;
114
116
  /** Transient resources allocated this frame; freed at end of render(). */
@@ -123,6 +125,15 @@ declare class GLMeshCache {
123
125
  * and the FinalizationRegistry, so transient meshes never wait on GC.
124
126
  */
125
127
  uploadTransient(mesh: Mesh): GLMeshHandle;
128
+ /**
129
+ * Upload a Mesh that may or may not recur across frames. Its first sight in
130
+ * *this* context takes `uploadTransient`; every later one takes the
131
+ * persistent handle. One transient upload to find out is cheaper than
132
+ * stranding a persistent VAO on a mesh that never returns, whose release
133
+ * would wait on GC. The transient upload does not populate the persistent
134
+ * map, so steady-state reuse begins on the third frame.
135
+ */
136
+ uploadRecurring(mesh: Mesh): GLMeshHandle;
126
137
  /**
127
138
  * Free all transient resources allocated since the last call. Called by
128
139
  * the renderer at the end of each `render()`. Safe under context loss.
package/dist/renderer.js CHANGED
@@ -1,5 +1,5 @@
1
- export { IDENTITY_COLOR_MATRIX, OUTLINE_MIN_SCREEN_PX, ShaderCompileError, WeaselRenderer, buildGradientRamp, canQueryLocalFonts, enableLocalFontOutlines, hasFontOutlines, isCanvasFont, listFontOutlines, mat3, outlineStatus, registerCanvasFont, registerFont, registerFontOutlines, registerProgram, subscribeGlyphReady, tessellate, tessellateStroke, unregisterCanvasFont, unregisterFontOutlines, viewToMat3 } from './chunk-FVNWK7U3.js';
2
- import './chunk-DCIU3SRK.js';
1
+ export { IDENTITY_COLOR_MATRIX, OUTLINE_MIN_SCREEN_PX, ShaderCompileError, WeaselRenderer, buildGradientRamp, canQueryLocalFonts, enableLocalFontOutlines, hasFontOutlines, isCanvasFont, listFontOutlines, mat3, outlineStatus, registerCanvasFont, registerFont, registerFontOutlines, registerProgram, subscribeGlyphReady, tessellate, tessellateStroke, unregisterCanvasFont, unregisterFontOutlines, viewToMat3 } from './chunk-PI56ORHE.js';
2
+ import './chunk-W2WB4352.js';
3
3
  import './chunk-UB6A6L77.js';
4
4
  import './chunk-Z3KNFTTS.js';
5
5
  import './chunk-6SHZHXXR.js';
@@ -8,6 +8,5 @@ import './chunk-UGFFCMQP.js';
8
8
  import './chunk-BHVYVFGV.js';
9
9
  import './chunk-GVCNT7UH.js';
10
10
  export { registerTexture } from './chunk-IO5Z75X4.js';
11
- import './chunk-PZ5AY32C.js';
12
11
  //# sourceMappingURL=renderer.js.map
13
12
  //# sourceMappingURL=renderer.js.map
package/dist/resize.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- export { C as CORNER_ANCHORS, a as CornerAnchor, b as CornerHandle, U as UseResizeOptions, c as cornerPoint, d as cornerResizeHandles, f as fixedCornerOf, h as hitCornerHandle, p as pointSnapToGrid } from './pointSnapToGrid-BuDZWBrL.js';
2
- export { P as PoseProjection, R as RECT_POSE_DESCRIPTOR, a as ROTATED_POSE_DESCRIPTOR } from './geometry-DVeZ2i-c.js';
3
- import { R as ResizePose, B as BoundsConstraint, M as ModifierState } from './types-BhJJ2OCM.js';
1
+ export { C as CORNER_ANCHORS, a as CornerAnchor, b as CornerHandle, U as UseResizeOptions, c as cornerPoint, d as cornerResizeHandles, f as fixedCornerOf, h as hitCornerHandle, p as pointSnapToGrid } from './pointSnapToGrid-Bj4r_lEQ.js';
2
+ export { P as PoseProjection, R as RECT_POSE_DESCRIPTOR, a as ROTATED_POSE_DESCRIPTOR } from './geometry-CnISZ11w.js';
3
+ import { R as ResizePose, B as BoundsConstraint, M as ModifierState } from './types-Ct4n0Z38.js';
4
4
  import { G as Guide } from './types-D2tTKEU0.js';
5
5
  import { V as View } from './view-DSQgxBJB.js';
6
- import './types-BJ8_cyT7.js';
6
+ import './types-Dtxe7jTS.js';
7
7
  import '@weasel-js/history';
8
- import './types-B_-khFM0.js';
8
+ import './types-Ch0Goo-j.js';
9
9
 
10
10
  declare function clampMinSize<TPose extends ResizePose>(args: {
11
11
  minWidth: number;
package/dist/resize.js CHANGED
@@ -1,5 +1,4 @@
1
1
  export { CORNER_ANCHORS, DEFAULT_RESIZE_BEHAVIORS, clampMinSize, cornerPoint, cornerResizeHandles, fixedCornerOf, hitCornerHandle, lockAspectWithModifier, pointSnapToGrid, snapToGrid, snapToGuides } from './chunk-Z3KNFTTS.js';
2
2
  export { RECT_POSE_DESCRIPTOR, ROTATED_POSE_DESCRIPTOR } from './chunk-6SHZHXXR.js';
3
- import './chunk-PZ5AY32C.js';
4
3
  //# sourceMappingURL=resize.js.map
5
4
  //# sourceMappingURL=resize.js.map