@weasel-js/core 1.0.4 → 1.2.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +584 -0
  2. package/dist/{DrawCommand-BbPrSTra.d.ts → DrawCommand-uNkv5TjO.d.ts} +24 -1
  3. package/dist/{chunk-AYGSXNY3.js → chunk-7KYLIC3E.js} +3199 -2245
  4. package/dist/chunk-7KYLIC3E.js.map +1 -0
  5. package/dist/{chunk-JOSUVS6C.js → chunk-ADWOB5K2.js} +2 -2
  6. package/dist/chunk-ADWOB5K2.js.map +1 -0
  7. package/dist/{chunk-J3YC3GVF.js → chunk-CKADTCHK.js} +2 -2
  8. package/dist/chunk-CKADTCHK.js.map +1 -0
  9. package/dist/clipboard.d.ts +2 -2
  10. package/dist/clipboard.js +1 -1
  11. package/dist/clone.d.ts +2 -2
  12. package/dist/{geometry-5X6TrAkX.d.ts → geometry-C56YbnfD.d.ts} +1 -1
  13. package/dist/{grid-sfilv5HP.d.ts → grid-DqOi0Vgi.d.ts} +1 -1
  14. package/dist/index.d.ts +656 -137
  15. package/dist/index.js +3 -3
  16. package/dist/insert.d.ts +3 -3
  17. package/dist/move.d.ts +4 -4
  18. package/dist/{options-CbsIgQci.d.ts → options-C6HYCKP7.d.ts} +1 -1
  19. package/dist/{paint-types-CnLIzqq1.d.ts → paint-types-1fUdZUaH.d.ts} +10 -5
  20. package/dist/patterns-builtin.d.ts +1 -1
  21. package/dist/{pointSnapToGrid-C3wowsQy.d.ts → pointSnapToGrid-BBtn5bus.d.ts} +2 -2
  22. package/dist/{registry-QRg8KiNM.d.ts → registry-l3JX0Z6b.d.ts} +72 -14
  23. package/dist/renderer.d.ts +7 -53
  24. package/dist/renderer.js +3 -3
  25. package/dist/resize.d.ts +4 -4
  26. package/dist/routing.d.ts +7 -7
  27. package/dist/routing.js +1 -1
  28. package/dist/stroke-DaxnQ-u7.d.ts +153 -0
  29. package/dist/{types-ByZxoD6P.d.ts → types-BhrifbZ1.d.ts} +1 -1
  30. package/dist/{types-vqxpCFVp.d.ts → types-C2R2bjxf.d.ts} +8 -0
  31. package/dist/{types-DpQ0cWYC.d.ts → types-DbysOO-2.d.ts} +10 -3
  32. package/package.json +6 -6
  33. package/dist/chunk-AYGSXNY3.js.map +0 -1
  34. package/dist/chunk-J3YC3GVF.js.map +0 -1
  35. package/dist/chunk-JOSUVS6C.js.map +0 -1
  36. package/dist/viewToMat3-CQW_YqDw.d.ts +0 -67
package/dist/index.d.ts CHANGED
@@ -2,40 +2,40 @@ import * as React$1 from 'react';
2
2
  import React__default, { RefObject, ReactNode, Ref, MouseEvent as MouseEvent$1, MutableRefObject } from 'react';
3
3
  import { a as ViewTransform, V as View, Z as ZoomBound, b as ZoomFactor } from './view-DSQgxBJB.js';
4
4
  export { s as screenToWorld, v as viewToTransform, w as worldToScreen } from './view-DSQgxBJB.js';
5
- import { a as UnitValue, b as UnitSystem, U as UseMoveOptions, O as OriginProjection } from './grid-sfilv5HP.js';
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-sfilv5HP.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 DepSchema, S as SliceDep, h as ActionsRegistry, T as Tool, i as AffordanceHit, j as Dispatcher, k as ToolDef, l as ViewportToolDef, m as AnyTool, O as OverlayPosition, n as ToolKeybinding, H as HotkeyTrigger, L as LayerHit, o as ChromeState, p as SelectionApi, I as InsertExtras, G as GeometryProjection, q as ContentHandlerEntry, r as SvgIngestOptions, U as UseSelectionOptions, s as ActionsProp, t as Affordance, u as AffordanceRegion, v as AffordanceBinding, w as CommonAffordanceScratch, B as BooleansAdapter, E as Eligibility, x as BindingScope, y as Contribution, z as ScopedBinding } from './registry-QRg8KiNM.js';
8
- export { F as ALWAYS, J as ActionDeps, K as ActionDisabledReason, M as ActionEnabledResult, N as ActionEntry, P as ActionsProvider, Q as ActiveToolContextProvider, W as ActiveToolContextProviderIfRoot, X as ActiveToolContextProviderProps, Y as ActiveToolContextValue, Z as AreaSelectDep, _ as BindingOpts, $ as BooleanOp, a0 as BooleanOpResult, a1 as BoundGesture, a2 as BuildRuleCtxArgs, a3 as ClaimableGesture, a4 as ClipboardDep, a5 as ClipboardIngestCtx, a6 as CustomPaintContext, a7 as DepName, a8 as DepRegistry, a9 as DepRegistryProvider, aa as DispatcherContext, ab as DragSample, ac as EditAnchorsDep, ad as GestureBinding, ae as IDENTITY_POSE_COMPOSITION, af as ImmediateInvoker, ag as IngestCtx, ah as IngestionDep, ai as InsertDep, aj as InvocationCtx, ak as Invoker, al as LassoSelectDep, am as LayoutDep, an as MatchResult, ao as NEVER, ap as NodeAtPointDep, aq as OngoingHandle, ar as OngoingInvoker, as as OngoingOverlay, at as Point2, au as PointerContextProvider, av as PointerContextValue, aw as PointerWorldPos, ax as PoseAdapter, ay as PoseComposition, az as ResizePolicy, aA as ResolveAllOptions, aB as ResolveOnlyResult, aC as ResolvedCandidate, aD as SelectionExtendKey, aE as SelectionMode, aF as Selector, aG as SnapDep, aH as SvgUnpacker, aI as TextEditDep, aJ as ToolCtx, aK as ToolModifiers, aL as ToolPresentation, aM as ToolSlot, aN as UiOngoingControl, aO as ViewApi, aP as applyBooleanOp, aQ as buildRuleCtx, aR as clipboardCopyAction, aS as clipboardCutAction, aT as composeRectPose, aU as composeWorldPose, aV as createDispatcher, aW as decomposeRectPose, aX as describeRule, aY as drawLayers, aZ as enterTextEditAction, a_ as evaluate, a$ as evaluateEnabled, b0 as rebaseLocalPose, b1 as registerContentHandler, b2 as sliceAction, b3 as specificity, b4 as translateRectPose, b5 as useAction, b6 as useActionsRegistry, b7 as useActiveToolContext, b8 as useDepRegistry, b9 as useDepSource, ba as useOptionalActiveToolContext, bb as useOptionalDepRegistry, bc as usePointerContext, bd as useSelection, be as worldPoseLookup } from './registry-QRg8KiNM.js';
9
- import { S as Stroke, F as FillStyle, a as TextureHandle, T as TilePatternSpec, b as GradientKind, G as GradStop, c as GradientFill } from './paint-types-CnLIzqq1.js';
10
- export { d as GradientUnits, R as Region, e as StrokeAlign, f as alignedStrokeRect } from './paint-types-CnLIzqq1.js';
11
- import { B as Bounds, P as PoseProjection, F as FitViewToBoundsOptions, V as ViewportDims } from './geometry-5X6TrAkX.js';
12
- export { R as RECT_POSE_DESCRIPTOR, a as ROTATED_POSE_DESCRIPTOR, f as fitViewToBounds } from './geometry-5X6TrAkX.js';
13
- import { N as NodeId, S as Scene, a as Node$1, b as SerializedScene, R as RectPose, U as UseSceneOptions, c as SceneRegistry, d as RegisteredOp } from './types-vqxpCFVp.js';
14
- export { A as AddLayerSpec, e as AddNodeSpec, C as ContainerNode, L as LayerRecord, f as LeafNode, g as SerializedNode, h as SystemLayerRecord, i as SystemLayerSpec, j as UserLayerRecord, k as asNodeId } from './types-vqxpCFVp.js';
15
- import { M as ModifierState, R as ResizePose, B as BoundsConstraint, P as PointSnapBehavior, L as LassoSelectBehavior, a as RotatedPose, e as RotateBehavior, S as SnapStrategy, c as ResizeAnchor, b as MoveBehavior, I as InsertBehavior } from './types-ByZxoD6P.js';
16
- 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-ByZxoD6P.js';
17
- import { U as UseResizeOptions } from './pointSnapToGrid-C3wowsQy.js';
18
- 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-C3wowsQy.js';
19
- import { BodyClassification, IngestItem } from '@weasel-js/gestures';
5
+ import { a as UnitValue, b as UnitSystem, U as UseMoveOptions, O as OriginProjection } from './grid-DqOi0Vgi.js';
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-DqOi0Vgi.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 DepSchema, S as SliceDep, h as ActionsRegistry, T as Tool, i as AffordanceHit, j as Dispatcher, k as ToolDef, l as ViewportToolDef, m as AnyTool, O as OverlayPosition, n as ToolKeybinding, H as HotkeyTrigger, L as LayerHit, o as ChromeState, p as SelectionApi, U as UseSelectionOptions, I as InsertExtras, G as GeometryProjection, q as ContentHandlerEntry, r as SvgIngestOptions, s as ActionsProp, t as Affordance, u as AffordanceRegion, v as AffordanceBinding, w as CommonAffordanceScratch, B as BooleansAdapter, E as Eligibility, x as BindingScope, y as Contribution, z as ScopedBinding } from './registry-l3JX0Z6b.js';
8
+ export { F as ALWAYS, J as ActionDeps, K as ActionDisabledReason, M as ActionEnabledResult, N as ActionEntry, P as ActionsProvider, Q as ActiveToolContextProvider, W as ActiveToolContextProviderIfRoot, X as ActiveToolContextProviderProps, Y as ActiveToolContextValue, Z as AreaSelectDep, _ as BindingOpts, $ as BooleanOp, a0 as BooleanOpResult, a1 as BoundGesture, a2 as BuildRuleCtxArgs, a3 as ClaimableGesture, a4 as ClipboardDep, a5 as ClipboardIngestCtx, a6 as CustomPaintContext, a7 as DepName, a8 as DepRegistry, a9 as DepRegistryProvider, aa as DispatcherContext, ab as DragSample, ac as EditAnchorsDep, ad as GestureBinding, ae as IDENTITY_POSE_COMPOSITION, af as ImmediateInvoker, ag as IngestCtx, ah as IngestionDep, ai as InsertDep, aj as InvocationCtx, ak as Invoker, al as LassoSelectDep, am as LayerCommandCache, an as LayoutDep, ao as MatchResult, ap as NEVER, aq as NodeAtPointDep, ar as OngoingHandle, as as OngoingInvoker, at as OngoingOverlay, au as Point2, av as PointerContextProvider, aw as PointerContextValue, ax as PointerWorldPos, ay as PoseAdapter, az as PoseComposition, aA as ResizePolicy, aB as ResolveAllOptions, aC as ResolveOnlyResult, aD as ResolvedCandidate, aE as SelectionExtendKey, aF as SelectionMode, aG as Selector, aH as SnapDep, aI as SvgUnpacker, aJ as TextEditDep, aK as ToolCtx, aL as ToolModifiers, aM as ToolPresentation, aN as ToolSlot, aO as UiOngoingControl, aP as ViewApi, aQ as actionBindings, aR as applyBooleanOp, aS as buildRuleCtx, aT as clipboardCopyAction, aU as clipboardCutAction, aV as composeRectPose, aW as composeWorldPose, aX as createDispatcher, aY as decomposeRectPose, aZ as describeRule, a_ as drawLayers, a$ as drawOneLayer, b0 as enterTextEditAction, b1 as evaluate, b2 as evaluateEnabled, b3 as isLayerVisible, b4 as rebaseLocalPose, b5 as registerContentHandler, b6 as resolveParams, b7 as sliceAction, b8 as specificity, b9 as translateRectPose, ba as useAction, bb as useActionsRegistry, bc as useActiveToolContext, bd as useDepRegistry, be as useDepSource, bf as useOptionalActiveToolContext, bg as useOptionalDepRegistry, bh as usePointerContext, bi as useSelection, bj as worldPoseLookup } from './registry-l3JX0Z6b.js';
9
+ import { S as Stroke, F as FillStyle, a as TextureHandle, T as TilePatternSpec, b as GradientKind, G as GradStop, c as GradientFill } from './paint-types-1fUdZUaH.js';
10
+ export { d as GradientUnits, R as Region, e as StrokeAlign, f as alignedStrokeRect } from './paint-types-1fUdZUaH.js';
11
+ import { B as Bounds, P as PoseProjection, F as FitViewToBoundsOptions, V as ViewportDims } from './geometry-C56YbnfD.js';
12
+ export { R as RECT_POSE_DESCRIPTOR, a as ROTATED_POSE_DESCRIPTOR, f as fitViewToBounds } from './geometry-C56YbnfD.js';
13
+ import { GestureSpec, BodyClassification, IngestItem } from '@weasel-js/gestures';
20
14
  export { ClickSpec, DragSpec, DropSpec, GestureSpec, IngestItem, InputEvent, KeyHeldSpec, KeySpec, ModSpec, MultiTouchSpec, PasteSpec, TargetSpec, WheelSpec } from '@weasel-js/gestures';
21
- import { M as MoveAdapter, A as AreaSelectAdapter, R as RotateAdapter, a as LassoHitMode, b as LassoSelectAdapter, c as ResizeAdapter, d as SceneAdapter, L as LayoutStrategy, e as LayerEnumerableAdapter, I as InsertAdapter, C as ClipboardSnapshot, O as OrderedAdapter, f as LayoutSnap } from './types-DpQ0cWYC.js';
22
- export { g as ContainerBounds, D as DropTarget, h as LayoutChild, i as LayoutContainer, j as LayoutDragged, S as SnapTarget } from './types-DpQ0cWYC.js';
15
+ import { N as NodeId, S as Scene, a as Node$1, b as SerializedScene, R as RectPose, U as UseSceneOptions, c as SceneRegistry, d as RegisteredOp } from './types-C2R2bjxf.js';
16
+ export { A as AddLayerSpec, e as AddNodeSpec, C as ContainerNode, L as LayerRecord, f as LeafNode, g as SerializedNode, h as SystemLayerRecord, i as SystemLayerSpec, j as UserLayerRecord, k as asNodeId } from './types-C2R2bjxf.js';
17
+ import { M as ModifierState, R as ResizePose, B as BoundsConstraint, P as PointSnapBehavior, L as LassoSelectBehavior, a as RotatedPose, e as RotateBehavior, S as SnapStrategy, c as ResizeAnchor, b as MoveBehavior, I as InsertBehavior } from './types-BhrifbZ1.js';
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-BhrifbZ1.js';
19
+ import { U as UseResizeOptions } from './pointSnapToGrid-BBtn5bus.js';
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-BBtn5bus.js';
21
+ import { M as MoveAdapter, A as AreaSelectAdapter, R as RotateAdapter, a as LassoHitMode, b as LassoSelectAdapter, c as ResizeAdapter, d as SceneAdapter, L as LayoutStrategy, e as LayerEnumerableAdapter, I as InsertAdapter, C as ClipboardSnapshot, O as OrderedAdapter, f as LayoutSnap } from './types-DbysOO-2.js';
22
+ export { g as ContainerBounds, D as DropTarget, h as LayoutChild, i as LayoutContainer, j as LayoutDragged, S as SnapTarget } from './types-DbysOO-2.js';
23
23
  import { D as DebugSink, a as DebugConfig, b as DebugSnapshot, c as DebugStrokes, d as DebugTheme } from './types-BHK2dkMu.js';
24
24
  export { e as DebugFeature, f as DebugStroke, H as HandleKind, g as HitShape, R as RecordedBounds, h as RecordedHandle, i as RecordedHitbox, j as RecordedLayer, k as RecordedOrigin, l as RecordedSnap } from './types-BHK2dkMu.js';
25
25
  import { a as PolygonPath, P as Path, b as PathFillRule, R as RectPath } from './path-B6MMiodD.js';
26
26
  export { c as PATH_C, d as PATH_CMD_LENGTHS, e as PATH_L, f as PATH_M, g as PATH_Q, h as PATH_Z } from './path-B6MMiodD.js';
27
27
  import * as react_jsx_runtime from 'react/jsx-runtime';
28
- import { D as DrawCommand, S as ShaderProgramHandle, P as PathDrawCommand, d as StyledRun, R as ResolvedTextStyle, e as TextStyle, f as TextVerticalAlign } from './DrawCommand-BbPrSTra.js';
29
- export { g as DEFAULT_TEXT_STYLE, G as GroupDrawCommand, I as ImageDrawCommand, M as Mat3, h as ResolvedRun, a as ShaderDrawCommand, b as ShaderUniform, T as TextDrawCommand, i as fontString, j as markdownToRuns, k as resolveRuns, l as resolveTextStyle, n as runsToMarkdown, o as runsToPlainText, t as toRuns, v as verticalAlignOffset } from './DrawCommand-BbPrSTra.js';
30
- import { Op, CreateHistoryOptions, History } from '@weasel-js/history';
28
+ import { D as DrawCommand, S as ShaderProgramHandle, P as PathDrawCommand, d as StyledRun, R as ResolvedTextStyle, e as TextStyle, f as TextVerticalAlign, M as Mat3$1 } from './DrawCommand-uNkv5TjO.js';
29
+ export { g as DEFAULT_TEXT_STYLE, G as GroupDrawCommand, I as ImageDrawCommand, h as ResolvedRun, a as ShaderDrawCommand, b as ShaderUniform, T as TextDrawCommand, i as fontString, j as markdownToRuns, m as mat3, k as resolveRuns, l as resolveTextStyle, n as runsToMarkdown, o as runsToPlainText, t as toRuns, v as verticalAlignOffset } from './DrawCommand-uNkv5TjO.js';
30
+ import { Op, HistorySelection, CreateHistoryOptions, History } from '@weasel-js/history';
31
31
  export * from '@weasel-js/history';
32
32
  export { Op } from '@weasel-js/history';
33
+ export { I as ImageMinification, S as SpriteSheet, f as frameRect, r as resolveStrokeWidth, v as viewToMat3 } from './stroke-DaxnQ-u7.js';
33
34
  import { Mat3 } from '@weasel-js/geom';
34
35
  import { G as Guide } from './types-D2tTKEU0.js';
35
- export { U as UseInsertOptions } from './options-CbsIgQci.js';
36
+ export { U as UseInsertOptions } from './options-C6HYCKP7.js';
36
37
  export { UseClipboardOpsOptions, UseClipboardOpsReturn, WEASEL_CLIPBOARD_MIME, WEASEL_CLIPBOARD_MIME_WEB, buildWeaselClipboardText, embedWeaselMetadataInSvg, extractWeaselClipboardFromSvg, parseWeaselClipboardText, sniffWeaselClipboardText, useClipboardOps } from './clipboard.js';
37
38
  export { cloneByAltDrag } from './clone.js';
38
- export { I as ImageMinification, v as viewToMat3 } from './viewToMat3-CQW_YqDw.js';
39
39
  export { FontVariant, LocalFontOutlinesResult, OutlineFontStyle, OutlineSource, OutlineStatus, OutlineVariant, canQueryLocalFonts, enableLocalFontOutlines, hasFontOutlines, isCanvasFont, listFontOutlines, outlineStatus, registerCanvasFont, registerFont, registerFontOutlines, subscribeGlyphReady, unregisterCanvasFont, unregisterFontOutlines } from '@weasel-js/font';
40
40
  import { CapabilityTag } from '@weasel-js/modes';
41
41
 
@@ -189,6 +189,79 @@ interface CellHighlightLayerOpts {
189
189
  /** Build a `RenderLayer` that fills a single grid cell — typically a snap-target preview. */
190
190
  declare function createCellHighlightLayer(opts: CellHighlightLayerOpts): RenderLayer<unknown>;
191
191
 
192
+ /**
193
+ * @experimental
194
+ *
195
+ * A view the resolver can route input to: a camera and the rect it paints
196
+ * into, in canvas CSS-pixel space. A viewport node supplies one of these per
197
+ * frame; so could any other per-view surface.
198
+ */
199
+ interface ResolvableView {
200
+ id: string;
201
+ view: View;
202
+ rect: {
203
+ x: number;
204
+ y: number;
205
+ w: number;
206
+ h: number;
207
+ };
208
+ }
209
+ /**
210
+ * @experimental
211
+ *
212
+ * The view an input event belongs to. `id` is `null` for the root view —
213
+ * the whole canvas, when no viewport contains the point.
214
+ *
215
+ * `origin` is the client-space origin of that view's surface, ready to hand
216
+ * to `clientToWorld` — which is the whole reason this type carries it rather
217
+ * than leaving callers to add the canvas rect and the view rect themselves.
218
+ */
219
+ interface ViewTarget {
220
+ id: string | null;
221
+ view: View;
222
+ origin: {
223
+ left: number;
224
+ top: number;
225
+ };
226
+ }
227
+ /**
228
+ * @experimental
229
+ *
230
+ * Routes client points to views, and holds a captured pointer on the view its
231
+ * gesture started in.
232
+ *
233
+ * Stickiness is the point. A drag that leaves its view's rect — over a
234
+ * neighbouring view, or off the canvas — must keep reporting coordinates in
235
+ * the space it began in, or a marquee crossing a panel edge silently starts
236
+ * measuring against the wrong camera.
237
+ */
238
+ interface ViewResolver {
239
+ /** Resolve and pin `pointerId`. Call on pointerdown. */
240
+ begin(pointerId: number, clientX: number, clientY: number): ViewTarget;
241
+ /**
242
+ * The view for a point. A pinned `pointerId` gets its pinned view, looked
243
+ * up fresh so a rect that moved mid-gesture is honored. Pass `null` for
244
+ * input with no pointer to capture — wheel, hover, keys.
245
+ */
246
+ at(pointerId: number | null, clientX: number, clientY: number): ViewTarget;
247
+ /** Release `pointerId`. Call on pointerup and pointercancel. */
248
+ end(pointerId: number): void;
249
+ /** Release every pin. */
250
+ clear(): void;
251
+ }
252
+ interface CreateViewResolverOpts {
253
+ /** Candidate views in paint order — the last one containing a point wins. */
254
+ views: () => readonly ResolvableView[];
255
+ /** The camera for points no view claims. */
256
+ root: () => View;
257
+ /** Client-space origin of the canvas element. */
258
+ canvasOrigin: () => {
259
+ left: number;
260
+ top: number;
261
+ };
262
+ }
263
+ declare function createViewResolver(opts: CreateViewResolverOpts): ViewResolver;
264
+
192
265
  /**
193
266
  * @experimental
194
267
  *
@@ -202,33 +275,50 @@ declare function createCellHighlightLayer(opts: CellHighlightLayerOpts): RenderL
202
275
  * lenses on the source.
203
276
  *
204
277
  * **Inner view semantics.** The source layers draw as if the inner view
205
- * filled the screen at world-origin (their own `viewToMat3(innerView)` runs
206
- * normally). The viewport then translates the result so that the inner
207
- * view's origin lands at `bounds.x, bounds.y` and clips to `(bounds.w,
208
- * bounds.h)`. Caller chooses `innerView.{x,y,scale}` to control which slice
209
- * of source-world is shown.
278
+ * filled the screen at world-origin each is wrapped in `viewToMat3(view)`
279
+ * by the same `drawOneLayer` the outer canvas uses. The viewport then
280
+ * translates the result so that the inner view's origin lands at `bounds.x,
281
+ * bounds.y` and clips to `(bounds.w, bounds.h)`. Caller chooses
282
+ * `innerView.{x,y,scale}` to control which slice of source-world is shown.
210
283
  *
211
284
  * **Input is re-projected on request, not automatically.** `reproject` maps a
212
285
  * screen point into the inner view's world; a consumer that wants a click
213
- * inside a viewport to mean something calls it from its own handler. The
214
- * dispatcher is untouched, so tools still target the outer view — making
215
- * tools work *inside* a viewport is a larger question (which view a pinch
216
- * zooms, what a drag leaving the rect does) and wants its own design.
286
+ * inside a viewport to mean something calls it from its own handler, or feeds
287
+ * `resolvable` to `createViewResolver` to route a whole pointer stream.
288
+ * `<CanvasView>` is that wiring done for you; build on this directly for a
289
+ * viewport that takes no input, or to route it yourself.
217
290
  *
218
291
  * **Screen-space source layers** (e.g., debug overlays, selection chrome)
219
- * still render to the outer canvas, not into the viewport. To include
220
- * them, wrap them as world-space layers first.
292
+ * draw in the viewport's own CSS-pixel space: their coords are relative to
293
+ * the rect's top-left, and they clip to it, rather than to the outer canvas.
221
294
  */
222
- interface CreateViewportLayerOpts<TData> {
295
+ interface CreateViewportLayerOpts<TData, TSource = TData> {
223
296
  id: string;
224
297
  label: string;
225
298
  /** Layers re-rendered through `view`. Each receives `(data, view, dims)`
226
- * exactly as the outer Canvas would call it. */
227
- source: RenderLayer<TData>[];
228
- /** The inner view. Static for nowa future revision will accept
229
- * `View | (outer: View, dims: Dims) => View` so derivations like
230
- * parallax and node-anchored scroll can compose. */
231
- view: View;
299
+ * exactly as the outer Canvas would call it.
300
+ *
301
+ * Pass a thunk for a stack that is assembled elsewhere it is read fresh
302
+ * on every `draw`, the same way a thunked `view` is. */
303
+ source: readonly RenderLayer<TSource>[] | (() => readonly RenderLayer<TSource>[]);
304
+ /**
305
+ * The `data` the source layers receive, derived from what the outer canvas
306
+ * passed down. Omit and they get the outer canvas's own.
307
+ *
308
+ * A viewport showing the same scene through a second camera wants its own
309
+ * per-view helpers here — selection, chrome state and gesture previews that
310
+ * belong to *this* view rather than the one hosting it.
311
+ */
312
+ data?: (outer: TData) => TSource;
313
+ /**
314
+ * The inner view. Pass a thunk for a camera that moves — it is read fresh
315
+ * on every `draw`, `reproject` and `resolvable`, so those three cannot
316
+ * disagree about where the viewport is looking mid-gesture.
317
+ *
318
+ * The thunk receives the outer view and dims, so a derived camera
319
+ * (parallax, node-anchored scroll) is a function of the one hosting it.
320
+ */
321
+ view: View | ((outer: View, dims: Dims) => View);
232
322
  /** Where on the outer canvas this viewport is painted, in screen-space
233
323
  * CSS pixels. Recomputed every frame so the rect can track an outer
234
324
  * pose, follow a corner, etc. */
@@ -260,9 +350,9 @@ interface ViewportLayer<TData> extends RenderLayer<TData> {
260
350
  * `bounds` is a pure function of those, so this reproduces the exact rect
261
351
  * that was painted rather than a remembered one.
262
352
  *
263
- * This does not touch the dispatcher: tools still receive outer-view
264
- * coords, and a consumer that wants a click inside a viewport to mean
265
- * something calls this from its own handler.
353
+ * This does not touch the dispatcher: a consumer that wants a click inside
354
+ * a viewport to mean something calls this from its own handler, or declares
355
+ * the viewport as a `<CanvasView>` and lets the canvas route to it.
266
356
  */
267
357
  reproject(outer: View, dims: Dims, screen: {
268
358
  x: number;
@@ -271,12 +361,20 @@ interface ViewportLayer<TData> extends RenderLayer<TData> {
271
361
  x: number;
272
362
  y: number;
273
363
  } | null;
364
+ /**
365
+ * This viewport as a routing candidate for {@link createViewResolver} —
366
+ * its inner view and the rect it paints into for the given outer frame.
367
+ *
368
+ * Pass the `outer` view and `dims` the frame was drawn with, for the same
369
+ * reason `reproject` wants them: `bounds` is recomputed, not remembered.
370
+ */
371
+ resolvable(outer: View, dims: Dims): ResolvableView;
274
372
  }
275
373
  /** Build a layer that renders other layers through a second view, inside a
276
374
  * sub-region of the canvas — a minimap, an inset, a magnifier. Its
277
375
  * `reproject` maps screen points back through the inner view so the region
278
376
  * can be interacted with. */
279
- declare function createViewportLayer<TData>(opts: CreateViewportLayerOpts<TData>): ViewportLayer<TData>;
377
+ declare function createViewportLayer<TData, TSource = TData>(opts: CreateViewportLayerOpts<TData, TSource>): ViewportLayer<TData>;
280
378
  /**
281
379
  * @experimental
282
380
  *
@@ -1007,7 +1105,17 @@ interface UseZoomReturn {
1007
1105
  declare function useZoom(opts: UseZoomOptions): UseZoomReturn;
1008
1106
 
1009
1107
  /**
1010
- * Run `computeFitView` once when the viewport first has non-zero size, and
1108
+ * Compute zoom and pan that fit `contentW x contentH` (in content units)
1109
+ * inside `viewportW x viewportH` (in pixels). `padRatio` is the fraction of
1110
+ * each axis to fill (default 0.85 — leaves a uniform 15% margin).
1111
+ */
1112
+ declare function computeFitViewport(viewportW: number, viewportH: number, contentW: number, contentH: number, padRatio?: number): {
1113
+ zoom: number;
1114
+ panX: number;
1115
+ panY: number;
1116
+ };
1117
+ /**
1118
+ * Run `computeFitViewport` once when the viewport first has non-zero size, and
1011
1119
  * apply the result via the supplied setters. Subsequent size changes are
1012
1120
  * ignored — this hook centers exactly once.
1013
1121
  */
@@ -1250,6 +1358,46 @@ interface UseHoverTrackingArgs {
1250
1358
  * the component on every pointer move. */
1251
1359
  declare function useHoverTracking(args: UseHoverTrackingArgs): () => NodeId | null;
1252
1360
 
1361
+ /**
1362
+ * Project an action's keyboard bindings into the shape a shortcut chip
1363
+ * renders from (`formatShortcut` / `formatShortcutParts` in
1364
+ * `@weasel-js/ui`). Palette and menu surfaces show what an action answers
1365
+ * to; the dispatcher reads the specs themselves.
1366
+ */
1367
+
1368
+ /** One keyboard shortcut, flattened for display. Structurally the
1369
+ * `ShortcutInput` weasel-ui formats — kept local so core doesn't depend on
1370
+ * the UI package. */
1371
+ interface ActionShortcut {
1372
+ key: string;
1373
+ mod: boolean;
1374
+ alt: boolean;
1375
+ shift: boolean;
1376
+ }
1377
+ /**
1378
+ * The chip form of a single gesture spec, or `undefined` when the spec has
1379
+ * none.
1380
+ *
1381
+ * Two kinds of collapsing, both because a binding list is written for a
1382
+ * matcher rather than for a reader:
1383
+ *
1384
+ * - A spec's `key` may list spellings of one keycap (`['[', '{']` — the
1385
+ * shifted bracket reports as `'{'`). The first is the shortcut's name.
1386
+ * - A modifier declared `'optional'` matches held or unheld, so it isn't
1387
+ * part of what the user has to press.
1388
+ *
1389
+ * Non-keyboard specs (drag, wheel, click) have no chip form. Neither does a
1390
+ * *required* `ctrl` or `meta` — nothing in the kit declares one, and the
1391
+ * display shape carries only `mod`.
1392
+ */
1393
+ declare function keySpecShortcut(spec: GestureSpec): ActionShortcut | undefined;
1394
+ /**
1395
+ * Every keyboard shortcut an action answers to, in declaration order.
1396
+ * Specs `keySpecShortcut` has no chip for are skipped, and bindings it leaves
1397
+ * identical are emitted once; an action bound only to those returns empty.
1398
+ */
1399
+ declare function actionShortcuts(action: Action): readonly ActionShortcut[];
1400
+
1253
1401
  /**
1254
1402
  * `moveAction` — first `ongoing`-timing Action descriptor.
1255
1403
  *
@@ -1654,9 +1802,10 @@ declare const cloneAction: Action & {
1654
1802
  * variants can be registered as separate descriptors by consumers.
1655
1803
  *
1656
1804
  * ## Inertia
1657
- * Not implemented the descriptor ends cleanly at `onEnd`. The `useHandTool`
1658
- * hook wires inertia via `useDecayLoop`; that remains available for consumers
1659
- * who need it.
1805
+ * Not implemented anywhere on the drag-pan path. `useHandTool` accepts an
1806
+ * `inertia` option and calls `useVelocityTracker` / `useDecayLoop`, but its
1807
+ * memo body ignores all three, so the option is inert — see docs/TODO.md.
1808
+ * `useDecayLoop` itself works and is exported for consumers who wire it up.
1660
1809
  *
1661
1810
  * @see useHandTool — the React hook this descriptor parallels.
1662
1811
  */
@@ -1915,10 +2064,9 @@ declare function useStandardActions(opts: UseStandardActionsOptions): void;
1915
2064
  * this adapter. It carries the scene-backed op-apply methods (`setPose` /
1916
2065
  * `setParent` / `setData` / `setLayer` / `removeNode` / `insertNode` /
1917
2066
  * `setChildOrder`) plus the read-side queries (`getNode` / `getNodes` /
1918
- * `getPose` / `getParent` / `getChildren`). Known exclusions from the op
1919
- * factory roster surfaces the scene doesn't own: `setSelection` (spread
1920
- * `SelectionApi.adapterMethods` over this adapter when selection-carrying
1921
- * ops must replay), `setPath`, and `setText`.
2067
+ * `getPose` / `getParent` / `getChildren` / `getSelection`) and
2068
+ * `setSelection`. Known exclusions from the op factory roster surfaces the
2069
+ * scene doesn't own: `setPath` and `setText`.
1922
2070
  *
1923
2071
  * Lives in `interactions/actions/` (not `canvas/sceneAdapter.ts`) so default
1924
2072
  * actions never import from `canvas/` — that back-edge would create an
@@ -1928,12 +2076,14 @@ declare function useStandardActions(opts: UseStandardActionsOptions): void;
1928
2076
 
1929
2077
  /** Build the adapter the default actions commit through when the consumer
1930
2078
  * supplies no `applyOps` hook of its own — it applies ops straight to the
1931
- * scene. Selection, path and text ops are not covered; those surfaces belong
1932
- * to their own owners. */
2079
+ * scene. Path and text ops are not covered; those surfaces belong to their
2080
+ * own owners. */
1933
2081
  declare function defaultCommitAdapter<TPose>(scene: Scene<unknown, string, TPose>): {
1934
2082
  getNode: (id: string) => Node$1<unknown, string, TPose> | undefined;
1935
2083
  getNodes: () => Node$1<unknown, string, TPose>[];
1936
2084
  getPose: (id: string) => TPose;
2085
+ getSelection: () => string[];
2086
+ setSelection: (ids: string[]) => void;
1937
2087
  getParent: (id: string) => string | null;
1938
2088
  getChildren: (parentId: string | null) => string[];
1939
2089
  setChildOrder: (parentId: string | null, orderedIds: string[]) => void;
@@ -1961,6 +2111,55 @@ declare function useResizePolicy<TPose>(options: UseResizePolicyOptions<TPose>):
1961
2111
  * run against the consumer's geometry. */
1962
2112
  declare function useSliceDep(dep: SliceDep): void;
1963
2113
 
2114
+ /**
2115
+ * Everything about handling an input event that depends on *which view* it
2116
+ * landed in: the dispatcher that runs it, and the three lookups that resolve
2117
+ * a client point against that view's camera.
2118
+ *
2119
+ * @internal One per view. The hook builds the `id: null` one from its flat
2120
+ * options; `views` supplies the rest, and the hook chooses between them per
2121
+ * event, so that it — and its listener set — still mounts exactly once.
2122
+ */
2123
+ interface DispatcherViewTarget {
2124
+ /** `null` is the root view — the whole canvas. Matches `ViewTarget.id`. */
2125
+ id: string | null;
2126
+ dispatcher: Dispatcher;
2127
+ affordanceAt: UseGestureDispatcherOptions['affordanceAt'];
2128
+ classifyTarget: UseGestureDispatcherOptions['classifyTarget'];
2129
+ clientToWorld: UseGestureDispatcherOptions['clientToWorld'];
2130
+ /**
2131
+ * The deps this view answers for itself — its camera, its selection, and
2132
+ * whatever else is per-view rather than per-canvas. Read per event; every
2133
+ * name it does not carry still resolves through the canvas registry.
2134
+ *
2135
+ * This is why a view does not get a `DepRegistryProvider` of its own. The
2136
+ * registry is where a consumer registers *sources*, and one per view would
2137
+ * fragment that: a consumer overriding `insert` would have to know how many
2138
+ * views exist and override each. An overlay keeps one place to register and
2139
+ * one authority per dep, with the view claiming only what is genuinely its.
2140
+ *
2141
+ * Without this a gesture inside a panel pans the whole canvas and selects
2142
+ * into the canvas's selection — correct coordinates alone do not make
2143
+ * routing correct.
2144
+ */
2145
+ deps?: () => Partial<DepSchema>;
2146
+ }
2147
+ /**
2148
+ * The part of `features/viewports`' `ViewResolver` the dispatcher needs: which
2149
+ * view a client point belongs to, pinned to the view a gesture began in.
2150
+ *
2151
+ * @internal Structural on purpose — a `ViewResolver` satisfies it, and the
2152
+ * dispatcher stays free of the viewport module.
2153
+ */
2154
+ interface ViewIdResolver {
2155
+ begin(pointerId: number, clientX: number, clientY: number): {
2156
+ id: string | null;
2157
+ };
2158
+ at(pointerId: number | null, clientX: number, clientY: number): {
2159
+ id: string | null;
2160
+ };
2161
+ end(pointerId: number): void;
2162
+ }
1964
2163
  /** Options for `useGestureDispatcher`: the element to listen on, the actions
1965
2164
  * and tools in play, and the hooks that turn raw DOM events into the world
1966
2165
  * coordinates and hit targets bindings match against. */
@@ -2088,6 +2287,24 @@ interface UseGestureDispatcherOptions {
2088
2287
  * wires this; tests / harnesses without chrome-caps state can omit it.
2089
2288
  */
2090
2289
  getRuleCtx?: () => RuleCtx;
2290
+ /**
2291
+ * Routing for a canvas hosting more than one view: the non-root dispatch
2292
+ * records to choose between, read fresh per event, and the resolver that
2293
+ * chooses. Omit for a single view — then every event runs on the record the
2294
+ * flat options above describe, which is what they are: view zero.
2295
+ *
2296
+ * A resolved id with no live record falls back to the root, so a view that
2297
+ * unmounts mid-gesture degrades instead of dropping the event.
2298
+ *
2299
+ * Keyboard and paste have no coordinates to resolve; they run on the view
2300
+ * the last coordinate-bearing event resolved to.
2301
+ *
2302
+ * @internal
2303
+ */
2304
+ views?: {
2305
+ targets: () => readonly DispatcherViewTarget[];
2306
+ resolver: ViewIdResolver;
2307
+ };
2091
2308
  }
2092
2309
  /**
2093
2310
  * Attach the input pipeline to a canvas: DOM pointer, wheel, keyboard and
@@ -2433,8 +2650,7 @@ interface ToolPrefColor extends ToolPrefBase<'color', string> {
2433
2650
  * app-supplied renderer. Deliberately NOT index-signatured so concrete
2434
2651
  * app interfaces stay assignable. Mirrors weasel-ui's `PrefCustom`.
2435
2652
  */
2436
- interface ToolPrefCustom extends ToolPrefBase<string, unknown> {
2437
- }
2653
+ type ToolPrefCustom = ToolPrefBase<string, unknown>;
2438
2654
  /**
2439
2655
  * A whole `FillStyle`, not a color inside one. Use it wherever the value is
2440
2656
  * the tagged paint union — a solid color, a pattern, a gradient — rather
@@ -2705,12 +2921,29 @@ declare function useHandTool(opts?: UseHandToolOptions): Tool<HandScratch | null
2705
2921
  * factories and hit gating belong on those deps, not on the tool. */
2706
2922
  declare function useTextTool(): Tool<undefined>;
2707
2923
 
2924
+ /** The camera a pinch acts on, and the origin its anchor is measured from. */
2925
+ interface PinchZoomTarget {
2926
+ view: View;
2927
+ setView: (v: View) => void;
2928
+ /** Client-space origin of the surface this camera paints into. */
2929
+ origin: {
2930
+ left: number;
2931
+ top: number;
2932
+ };
2933
+ }
2708
2934
  /** Options for `usePinchZoomTool`: the zoom limits, and whether it is wired
2709
2935
  * at all. */
2710
2936
  interface PinchZoomToolOpts {
2711
2937
  min?: number;
2712
2938
  max?: number;
2713
2939
  enabled?: boolean;
2940
+ /**
2941
+ * Which camera the anchor point belongs to. Return `null` — or omit this —
2942
+ * for the canvas's own. A canvas hosting several views resolves the point
2943
+ * here, so a pinch inside a panel zooms the panel rather than the canvas
2944
+ * underneath it.
2945
+ */
2946
+ resolveTarget?: (clientX: number, clientY: number) => PinchZoomTarget | null;
2714
2947
  }
2715
2948
  /**
2716
2949
  * Two-finger pinch zoom on the canvas. Standalone hook (not a Tool record)
@@ -3147,8 +3380,17 @@ interface CanvasExtensionApi {
3147
3380
  * `strength` carry through from the hit when the layer sets them.
3148
3381
  * A layer's owner binds a `kindOf` predicate on that kind to claim the
3149
3382
  * gesture; see `@weasel-js/hud` for the worked example.
3383
+ *
3384
+ * `frame` names the camera and surface size the point is expressed against.
3385
+ * Omit it for the canvas's own view — the only case until a caller routes
3386
+ * input to a viewport node, where the point is in that node's inner world
3387
+ * and a layer resolving screen-pixel tolerances needs its view and rect
3388
+ * size rather than the canvas's.
3150
3389
  */
3151
- hitTestExtras(worldX: number, worldY: number): {
3390
+ hitTestExtras(worldX: number, worldY: number, frame?: {
3391
+ view: View;
3392
+ dims: Dims;
3393
+ }): {
3152
3394
  layerId: string;
3153
3395
  hit: LayerHit;
3154
3396
  } | null;
@@ -3227,6 +3469,104 @@ interface GestureSource {
3227
3469
  getVersion(): number;
3228
3470
  }
3229
3471
 
3472
+ /**
3473
+ * The half of {@link CanvasHelpers} that belongs to one view — everything
3474
+ * answered by a camera's own tools, gestures and selection. A canvas hosting
3475
+ * several viewports needs one of these per view; the surface half is shared.
3476
+ */
3477
+ interface CanvasViewHelpers<TPose> {
3478
+ /** Pose currently displayed for `id` — drag/resize/rotate overlay if active,
3479
+ * otherwise the committed pose from the adapter. Returns `null` if the id
3480
+ * isn't known. */
3481
+ getEffectivePose(id: string): TPose | null;
3482
+ /** Overlay-aware bounds for `id`. */
3483
+ getEffectiveBounds(id: string): Bounds | null;
3484
+ /**
3485
+ * World-space AABB of everything the in-flight gesture proposes — the
3486
+ * displaced poses of nodes being moved / resized / rotated / cloned, plus
3487
+ * any nascent insert that has no scene node yet. `null` when no gesture is
3488
+ * in flight.
3489
+ *
3490
+ * This reports the *gesture*, not the document: committed content the
3491
+ * gesture isn't touching is excluded, so a consumer that wants the union
3492
+ * with the rest of the scene still walks its own ids through
3493
+ * `getEffectiveBounds`. It exists because every other lookup here is keyed
3494
+ * by node id, which can't answer "where is the shape the user is drawing
3495
+ * right now" — a drag-to-insert has no id until pointer-up.
3496
+ *
3497
+ * Select-only gestures are deliberately excluded: a marquee or lasso has
3498
+ * geometry but proposes no content, and a consumer sizing itself to the
3499
+ * gesture must not grow because the user swept a selection rectangle.
3500
+ *
3501
+ * The result is a plain AABB — never rotated. Rotated parts are folded in
3502
+ * by their rotated extent (a union of several oriented boxes has no single
3503
+ * orientation to report).
3504
+ */
3505
+ getGestureBounds(): Bounds | null;
3506
+ /**
3507
+ * Subscribe to the gesture layer's change signal — the other half of the
3508
+ * `useSyncExternalStore` contract for everything on this object that moves
3509
+ * during a drag (`getEffectivePose`, `getEffectiveBounds`,
3510
+ * `getGestureBounds`). Returns an unsubscribe.
3511
+ *
3512
+ * Fires once per dispatcher pump: gesture start, every pointermove that
3513
+ * reaches an in-flight handle, end, and cancel — plus UI-driven ongoing
3514
+ * actions (a slider bound to an ongoing action pumps the same way). It
3515
+ * fires on the pump, not on a diff: a pump that changed nothing observable
3516
+ * still notifies, so don't hang expensive work directly off the callback.
3517
+ *
3518
+ * It does **not** cover committed scene edits (subscribe to the scene for
3519
+ * those) or previews a consumer's own tool publishes from React state
3520
+ * (that tool re-renders on its own).
3521
+ *
3522
+ * Without a gesture source wired — a bare `<Canvas>` — this is a no-op
3523
+ * subscription that never fires.
3524
+ */
3525
+ subscribeGestures(fn: () => void): () => void;
3526
+ /**
3527
+ * Monotonic counter bumped on exactly the events `subscribeGestures` fires
3528
+ * on. Pair the two for `useSyncExternalStore`:
3529
+ *
3530
+ * ```ts
3531
+ * const gestureVersion = useSyncExternalStore(
3532
+ * useCallback((cb) => helpersRef.current?.subscribeGestures(cb) ?? (() => {}), []),
3533
+ * () => helpersRef.current?.getGestureVersion() ?? 0,
3534
+ * );
3535
+ * ```
3536
+ *
3537
+ * Starts at 0 and only increases. `0` is also what a bare `<Canvas>` with
3538
+ * no gesture source reports, forever.
3539
+ */
3540
+ getGestureVersion(): number;
3541
+ /** Returns the live ChromeState built once per render. Affordances and
3542
+ * custom layers that need overlay-aware selection state (selection ids,
3543
+ * bounds, multi-union AABB, modifier flags) read from this. */
3544
+ getChromeState(): ChromeState;
3545
+ }
3546
+ /**
3547
+ * The half of {@link CanvasHelpers} that belongs to the surface — one GL
3548
+ * context, one debug sink, one chrome-caps resolver, however many views are
3549
+ * drawn on it.
3550
+ */
3551
+ interface CanvasSurfaceHelpers {
3552
+ /** Active debug sink, when `<Canvas debug=...>` is enabled. Layers that
3553
+ * want to participate in `hitboxes`/`bounds`/etc. visualization can
3554
+ * call into this from their `draw` callback. Returns `null` when
3555
+ * debug is off — no-op for production renders. */
3556
+ getDebug(): DebugSink | null;
3557
+ /** Chrome-caps visibility predicate, keyed by chrome id. Returns a
3558
+ * function that affordance/overlay layers can call per-element to
3559
+ * decide whether to draw / hit-test. When the parent didn't supply
3560
+ * a resolver, this returns the universal `() => true`. */
3561
+ getIsVisible(): (id: string) => boolean;
3562
+ }
3563
+ /** Live overlay-aware lookups exposed to custom layers via `helpersRef`.
3564
+ * What a layer receives as its `data` argument, unchanged: the two halves
3565
+ * are split so a per-view set can be built independently of the surface's,
3566
+ * not to make layers ask for one. */
3567
+ interface CanvasHelpers<TPose> extends CanvasViewHelpers<TPose>, CanvasSurfaceHelpers {
3568
+ }
3569
+
3230
3570
  /**
3231
3571
  * Selection overlay primitives — render layers for drawing selection
3232
3572
  * outlines and corner resize handles in world space.
@@ -3351,7 +3691,23 @@ interface SelectionHandlesLayerOpts<TPose> extends SelectionLayerCommon<TPose> {
3351
3691
  };
3352
3692
  }
3353
3693
  /** Options for `createSelectionOverlayLayer`. */
3354
- interface SelectionOverlayLayerOpts<TPose> extends SelectionLayerCommon<TPose> {
3694
+ interface SelectionOverlayLayerOpts<TPose> extends Omit<SelectionLayerCommon<TPose>, 'getSelection' | 'getPose'> {
3695
+ /**
3696
+ * Which ids to draw chrome for. Omit to take them from the `ChromeState` on
3697
+ * the draw envelope, which is what makes one canvas's several views each
3698
+ * outline their own selection — the layer is shared, the envelope is not.
3699
+ *
3700
+ * A multi-selection resolves to the synthetic union id, with the real
3701
+ * members going to the outline pass, exactly as the explicit form does.
3702
+ */
3703
+ getSelection?: () => readonly NodeId[];
3704
+ /**
3705
+ * Resolve an id to the pose to draw chrome around. Omit to take bounds from
3706
+ * the same envelope `getSelection` omitted takes ids from — one cascade,
3707
+ * the one the chrome state was built with, rather than a second one here
3708
+ * that has to agree with it.
3709
+ */
3710
+ getPose?: (id: string) => TPose | null;
3355
3711
  outline?: Stroke & {
3356
3712
  pad?: number;
3357
3713
  };
@@ -3818,86 +4174,26 @@ interface CanvasProps<TNode extends {
3818
4174
  * every chrome element visible (pre-chrome-caps behavior).
3819
4175
  */
3820
4176
  getIsVisible?: () => (id: string) => boolean;
3821
- }
3822
- /** Live overlay-aware lookups exposed to custom layers via `helpersRef`. */
3823
- interface CanvasHelpers<TPose> {
3824
- /** Pose currently displayed for `id` — drag/resize/rotate overlay if active,
3825
- * otherwise the committed pose from the adapter. Returns `null` if the id
3826
- * isn't known. */
3827
- getEffectivePose(id: string): TPose | null;
3828
- /** Overlay-aware bounds for `id`. */
3829
- getEffectiveBounds(id: string): Bounds | null;
3830
- /**
3831
- * World-space AABB of everything the in-flight gesture proposes — the
3832
- * displaced poses of nodes being moved / resized / rotated / cloned, plus
3833
- * any nascent insert that has no scene node yet. `null` when no gesture is
3834
- * in flight.
3835
- *
3836
- * This reports the *gesture*, not the document: committed content the
3837
- * gesture isn't touching is excluded, so a consumer that wants the union
3838
- * with the rest of the scene still walks its own ids through
3839
- * `getEffectiveBounds`. It exists because every other lookup here is keyed
3840
- * by node id, which can't answer "where is the shape the user is drawing
3841
- * right now" — a drag-to-insert has no id until pointer-up.
3842
- *
3843
- * Select-only gestures are deliberately excluded: a marquee or lasso has
3844
- * geometry but proposes no content, and a consumer sizing itself to the
3845
- * gesture must not grow because the user swept a selection rectangle.
3846
- *
3847
- * The result is a plain AABB — never rotated. Rotated parts are folded in
3848
- * by their rotated extent (a union of several oriented boxes has no single
3849
- * orientation to report).
3850
- */
3851
- getGestureBounds(): Bounds | null;
3852
4177
  /**
3853
- * Subscribe to the gesture layer's change signal the other half of the
3854
- * `useSyncExternalStore` contract for everything on this object that moves
3855
- * during a drag (`getEffectivePose`, `getEffectiveBounds`,
3856
- * `getGestureBounds`). Returns an unsubscribe.
4178
+ * Show or hide whole render layers by id. An id absent from the map falls
4179
+ * back to the layer's own `defaultVisible`, and a layer marked `alwaysOn`
4180
+ * ignores the map entirely.
3857
4181
  *
3858
- * Fires once per dispatcher pump: gesture start, every pointermove that
3859
- * reaches an in-flight handle, end, and cancel plus UI-driven ongoing
3860
- * actions (a slider bound to an ongoing action pumps the same way). It
3861
- * fires on the pump, not on a diff: a pump that changed nothing observable
3862
- * still notifies, so don't hang expensive work directly off the callback.
4182
+ * Hiding a layer also stops it claiming pointer events through
4183
+ * `hitTestExtras` a layer nobody can see must not swallow a click.
3863
4184
  *
3864
- * It does **not** cover committed scene edits (subscribe to the scene for
3865
- * those) or previews a consumer's own tool publishes from React state
3866
- * (that tool re-renders on its own).
3867
- *
3868
- * Without a gesture source wired — a bare `<Canvas>` — this is a no-op
3869
- * subscription that never fires.
4185
+ * This is `getIsVisible`'s coarser sibling: that one gates individual
4186
+ * chrome elements *within* a layer, this one gates the layer.
3870
4187
  */
3871
- subscribeGestures(fn: () => void): () => void;
4188
+ layerVisibility?: Record<string, boolean>;
3872
4189
  /**
3873
- * Monotonic counter bumped on exactly the events `subscribeGestures` fires
3874
- * on. Pair the two for `useSyncExternalStore`:
3875
- *
3876
- * ```ts
3877
- * const gestureVersion = useSyncExternalStore(
3878
- * useCallback((cb) => helpersRef.current?.subscribeGestures(cb) ?? (() => {}), []),
3879
- * () => helpersRef.current?.getGestureVersion() ?? 0,
3880
- * );
3881
- * ```
4190
+ * Draw order, by layer id, bottom first. Omit for the order the layers
4191
+ * arrive in.
3882
4192
  *
3883
- * Starts at 0 and only increases. `0` is also what a bare `<Canvas>` with
3884
- * no gesture source reports, forever.
4193
+ * **A listed order is the whole list:** any layer whose id is missing from
4194
+ * it is not drawn. Reordering two layers means naming all of them.
3885
4195
  */
3886
- getGestureVersion(): number;
3887
- /** Returns the live ChromeState built once per render. Affordances and
3888
- * custom layers that need overlay-aware selection state (selection ids,
3889
- * bounds, multi-union AABB, modifier flags) read from this. */
3890
- getChromeState(): ChromeState;
3891
- /** Active debug sink, when `<Canvas debug=...>` is enabled. Layers that
3892
- * want to participate in `hitboxes`/`bounds`/etc. visualization can
3893
- * call into this from their `draw` callback. Returns `null` when
3894
- * debug is off — no-op for production renders. */
3895
- getDebug(): DebugSink | null;
3896
- /** Chrome-caps visibility predicate, keyed by chrome id. Returns a
3897
- * function that affordance/overlay layers can call per-element to
3898
- * decide whether to draw / hit-test. When the parent didn't supply
3899
- * a resolver, this returns the universal `() => true`. */
3900
- getIsVisible(): (id: string) => boolean;
4196
+ layerOrder?: string[];
3901
4197
  }
3902
4198
 
3903
4199
  /** Which of a node's two per-anchor color arrays an override applies to. */
@@ -3924,6 +4220,77 @@ declare class ColorOverrideRegistry {
3924
4220
  version(): number;
3925
4221
  }
3926
4222
 
4223
+ /** One keyframe. `easing` shapes the approach INTO this key from the previous
4224
+ * one, so the first key's easing is never consulted. */
4225
+ interface Keyframe<T> {
4226
+ /** Time within the track's timeline, in ms. */
4227
+ t: number;
4228
+ value: T;
4229
+ easing?: EasingFn;
4230
+ }
4231
+ /** A track sampled as a pure function of the playhead. Scrubbing one is free
4232
+ * and order-independent. */
4233
+ interface SampledTrack<T> {
4234
+ kind: 'sampled';
4235
+ label?: string;
4236
+ /** Sorted ascending by `t`. `sampleTrack` assumes this and does not sort. */
4237
+ keys: Keyframe<T>[];
4238
+ /** Required when T is not `number`; defaults to numeric lerp otherwise. */
4239
+ interpolate?: Interpolate<T>;
4240
+ /** Built once per segment and cached. Takes precedence over `interpolate`. */
4241
+ interpolator?: InterpolatorFactory<T>;
4242
+ onTick: (value: T) => void;
4243
+ }
4244
+ /** A track of edge crossings. Fires only when the playhead advances forward
4245
+ * under playback — never on `seek`. */
4246
+ interface EventTrack {
4247
+ kind: 'event';
4248
+ label?: string;
4249
+ /** Sorted ascending by `t`. */
4250
+ events: {
4251
+ t: number;
4252
+ fire: () => void;
4253
+ }[];
4254
+ }
4255
+ /** A nested timeline, evaluated at `playhead - at`. Children are NOT registered
4256
+ * with the animator separately; the parent evaluates them. */
4257
+ interface TimelineTrack {
4258
+ kind: 'timeline';
4259
+ label?: string;
4260
+ at: number;
4261
+ timeline: NestedTimeline;
4262
+ }
4263
+ type Track = SampledTrack<any> | EventTrack | TimelineTrack;
4264
+ /** What a child timeline may declare. The parent owns playback, so `loop`,
4265
+ * `autoplay`, `onDone` and `cancelKey` have no meaning below the root. */
4266
+ interface NestedTimeline {
4267
+ tracks: Track[];
4268
+ /** Defaults to the largest end time across `tracks`. */
4269
+ duration?: number;
4270
+ }
4271
+ interface TimelineOptions extends NestedTimeline {
4272
+ /** `true` loops forever, `n` loops n additional times. Default false. */
4273
+ loop?: boolean | number;
4274
+ /** Default true. When false the timeline registers but holds at t=0 until resumed. */
4275
+ autoplay?: boolean;
4276
+ onDone?: () => void;
4277
+ cancelKey?: string;
4278
+ }
4279
+ interface TimelineHandle extends AnimationHandle {
4280
+ /** Move the playhead. Never fires event tracks, at any depth. */
4281
+ seek(t: number): void;
4282
+ /** Current playhead in ms. */
4283
+ time(): number;
4284
+ duration(): number;
4285
+ tracks(): readonly Track[];
4286
+ /** Run `fn`, then recompute duration, drop cached interpolators, and notify.
4287
+ * Every mutation must go through this — an edited keyframe otherwise keeps
4288
+ * interpolating toward its old value with no visible error. */
4289
+ edit(fn: () => void): void;
4290
+ /** Notified after each `edit`. Returns an unsubscribe. */
4291
+ subscribe(cb: () => void): () => void;
4292
+ }
4293
+
3927
4294
  /** An easing curve: maps normalized progress `t ∈ [0, 1]` to eased progress.
3928
4295
  * Curves may leave the 0–1 range in the middle (back, elastic) but should
3929
4296
  * pass through 0 at 0 and 1 at 1. */
@@ -4151,6 +4518,12 @@ interface Animator {
4151
4518
  */
4152
4519
  stagger<TItem>(items: readonly TItem[], delay: StaggerDelay): StaggerBuilder<TItem>;
4153
4520
  stagger<TItem>(items: readonly TItem[], delay: StaggerDelay, factory: StaggerFactory<TItem>, opts?: StaggerOptions): AnimationHandle;
4521
+ /**
4522
+ * Keyframe timeline. Registered like any other animation, so its playhead
4523
+ * responds to `pause`, `setTimeScale` and `cancelKey`. Sampled tracks are a
4524
+ * pure function of the playhead; event tracks fire only on forward playback.
4525
+ */
4526
+ timeline(opts: TimelineOptions): TimelineHandle;
4154
4527
  /** Per-node, per-channel color override registry consulted by the renderer's
4155
4528
  * path layer before reading consumer accessors. Used by `tweenVertexColors`,
4156
4529
  * `springVertexColors`, `cycleVertexColors`, `staggerVertexColors`. Cleared
@@ -4410,6 +4783,61 @@ interface UseRotateOptions<TPose> {
4410
4783
  pivot?: 'each' | 'union';
4411
4784
  }
4412
4785
 
4786
+ /** A rect on the surface, in CSS pixels from the canvas top-left. */
4787
+ interface ViewRect {
4788
+ x: number;
4789
+ y: number;
4790
+ w: number;
4791
+ h: number;
4792
+ }
4793
+ /** Props for `<CanvasView>`. @experimental */
4794
+ interface CanvasViewProps {
4795
+ /** Identifies the view to the surface and to input routing. Must be unique
4796
+ * among the views on one canvas. */
4797
+ id: string;
4798
+ /** Where this view paints, recomputed every frame so the rect can track the
4799
+ * outer camera. A plain rect is accepted for a fixed panel. */
4800
+ bounds: ViewRect | ((outer: View, dims: Dims) => ViewRect);
4801
+ /** Camera. Supply this to control it; otherwise the view keeps its own,
4802
+ * seeded from `defaultView`. `onViewChange` fires either way. */
4803
+ view?: View;
4804
+ defaultView?: View;
4805
+ onViewChange?: (v: View) => void;
4806
+ /** Pan limits, applied to every camera change the same way `<Canvas>`
4807
+ * applies its own. */
4808
+ viewBounds?: Bounds;
4809
+ /** Which of the surface's layers this view paints. Defaults to all of them —
4810
+ * the same content through a second camera. */
4811
+ layers?: (surface: readonly RenderLayer<unknown>[]) => readonly RenderLayer<unknown>[];
4812
+ /** Opaque ground painted before the source layers, so the surface does not
4813
+ * show through where the inner camera sees nothing. */
4814
+ background?: string;
4815
+ /** Paint and hit order. Defaults to `Infinity` — after every view the
4816
+ * surface declared as a prop. */
4817
+ order?: number;
4818
+ /** Label for debug overlays. Defaults to the id. */
4819
+ label?: string;
4820
+ /** A selection of this view's own, which actions dispatched inside it read
4821
+ * and write instead of the surface's. Omit both this and
4822
+ * `selectionOptions` and the view shares the surface's selection — the
4823
+ * default, so undo restores one selection rather than N. */
4824
+ selection?: SelectionApi;
4825
+ /** Opts this view into owning a selection, configured thus. Ignored when
4826
+ * `selection` is supplied. */
4827
+ selectionOptions?: UseSelectionOptions;
4828
+ }
4829
+ /**
4830
+ * @experimental
4831
+ *
4832
+ * One view on a shared canvas. Owns a camera, contributes the viewport node
4833
+ * that paints it, and registers the dispatch record that sends gestures inside
4834
+ * its rect to that camera rather than to the canvas's.
4835
+ *
4836
+ * Renders nothing itself — it is a declaration, and the surface does the
4837
+ * drawing. Outside a surface that mounts a view registry it is inert.
4838
+ */
4839
+ declare function CanvasView(props: CanvasViewProps): null;
4840
+
4413
4841
  /**
4414
4842
  * Built-in shape tool ids handled by `useBuiltinShapeTools`. Each maps to a
4415
4843
  * kit tool hook + a default `create` that produces a leaf node compatible
@@ -5153,6 +5581,17 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<No
5153
5581
  * subscriber list stays quiet).
5154
5582
  */
5155
5583
  animator?: Animator;
5584
+ /**
5585
+ * Extra views on this canvas: each is a camera over a rect of the same
5586
+ * surface, drawn through one GL context, with input routed to it. The flat
5587
+ * `view` / `onViewChange` props above stay the canvas's own camera — view
5588
+ * zero — and are unaffected by anything declared here.
5589
+ *
5590
+ * Order is paint and hit order, low to high. Each entry is a
5591
+ * `<CanvasView>`; mounting one as a child is the same declaration, and
5592
+ * children land after every entry here.
5593
+ */
5594
+ views?: readonly CanvasViewProps[];
5156
5595
  /**
5157
5596
  * Children rendered alongside the canvas. Useful for siblings that need
5158
5597
  * the same `<ActionsProvider>` scope (e.g. shortcuts overlays, probes).
@@ -5628,6 +6067,14 @@ declare const SceneViewCanvas: typeof SceneViewCanvasInner;
5628
6067
  * this in tests, in headless rendering, or wherever a scene must outlive a
5629
6068
  * component. Throws if no system layers are declared. */
5630
6069
  declare function createScene<TData, TLayer extends string, TPose = RectPose>(options: UseSceneOptions<TData, TLayer, TPose>): Scene<TData, TLayer, TPose>;
6070
+ /** The scene's selection in the shape `createHistory` wants, for a consumer
6071
+ * building a second History over the same scene (a modality machine, a
6072
+ * journal owner) that should restore selection the way the scene's own
6073
+ * history does. */
6074
+ declare function sceneSelectionStore(scene: {
6075
+ getSelection(): readonly NodeId[];
6076
+ setSelection(ids: readonly NodeId[]): void;
6077
+ }): HistorySelection;
5631
6078
  /** Reconstruct a Scene from a JSON snapshot produced by `scene.toJSON()`.
5632
6079
  * Function fields (e.g., `clipFromPose`) are resolved by string key via the
5633
6080
  * registry passed in `options`. Throws on unknown version, unknown registry
@@ -7380,6 +7827,19 @@ declare function canBringForward(list: string[], ids: string[]): boolean;
7380
7827
  /** Symmetric to `canBringForward` — see that docstring. */
7381
7828
  declare function canSendBackward(list: string[], ids: string[]): boolean;
7382
7829
 
7830
+ interface RestoreEntry {
7831
+ parentId: string | null;
7832
+ before: string[];
7833
+ }
7834
+ /** @internal */
7835
+ interface ReorderArgs {
7836
+ ids: string[];
7837
+ direction: ReorderDirection;
7838
+ label?: string;
7839
+ /** Pre-mutation child order per touched parent. Filled in on first apply;
7840
+ * arrives populated when the op is rebuilt from a snapshot. */
7841
+ prevOrders?: RestoreEntry[];
7842
+ }
7383
7843
  /** Direction of a sibling z-order reorder. */
7384
7844
  type ReorderDirection = 'forward' | 'backward' | 'front' | 'back';
7385
7845
  /**
@@ -7389,11 +7849,7 @@ type ReorderDirection = 'forward' | 'backward' | 'front' | 'back';
7389
7849
  * - `'front'` — move to the top, preserving relative order
7390
7850
  * - `'back'` — move to the bottom, preserving relative order
7391
7851
  */
7392
- declare function createReorderOp(args: {
7393
- ids: string[];
7394
- direction: ReorderDirection;
7395
- label?: string;
7396
- }): Op;
7852
+ declare function createReorderOp(args: ReorderArgs): Op;
7397
7853
  /** @internal */
7398
7854
  interface MoveToIndexArgs {
7399
7855
  ids: string[];
@@ -9660,6 +10116,69 @@ declare function rainbowVertexColors(n: number, opts?: {
9660
10116
  * `to`-target typically needs. */
9661
10117
  declare function solidVertexColors(n: number, r: number, g: number, b: number, a?: number): number[];
9662
10118
 
10119
+ /**
10120
+ * Sample a track at `t`. Pure: no state, no side effects, safe to call for any
10121
+ * `t` in any order — which is what makes scrubbing free.
10122
+ *
10123
+ * `segmentCache` memoizes `interpolator` factories by the index of the segment's
10124
+ * later key. Callers that mutate keys must drop the cache; `createTimeline`
10125
+ * drops it wholesale on `edit`.
10126
+ */
10127
+ declare function sampleTrack<T>(track: SampledTrack<T>, t: number, segmentCache?: Map<number, (u: number) => T>): T | undefined;
10128
+
10129
+ /** A joint's local transform. Deliberately NOT the scene's generic `TPose`:
10130
+ * `TPose` is consumer-defined and may be a bare AABB with no rotation term,
10131
+ * which a joint chain cannot compose through. */
10132
+ interface JointTransform {
10133
+ x: number;
10134
+ y: number;
10135
+ /** Radians. */
10136
+ rotation: number;
10137
+ scaleX: number;
10138
+ scaleY: number;
10139
+ }
10140
+ interface Joint {
10141
+ name: string;
10142
+ /** Parent joint name, or null for a root. */
10143
+ parent: string | null;
10144
+ /** Local transform at rest. */
10145
+ bind: JointTransform;
10146
+ }
10147
+ /** Joints in topological order: every joint appears after its parent. */
10148
+ interface Skeleton {
10149
+ joints: Joint[];
10150
+ }
10151
+ /** Local deltas from the bind pose, keyed by joint name. Absent joints and
10152
+ * absent fields mean "no change from bind". */
10153
+ type Pose = Record<string, Partial<JointTransform>>;
10154
+ declare const IDENTITY_JOINT: JointTransform;
10155
+
10156
+ /**
10157
+ * Weighted blend of poses. Weights are normalized, so `[1, 1]` means an even
10158
+ * mix. A joint absent from a pose contributes its identity delta, and a field
10159
+ * absent from a joint contributes that field's identity — 0 for translation and
10160
+ * rotation, 1 for scale. Blending scale toward 0 for an absent field would
10161
+ * collapse the joint, which is the bug this avoids.
10162
+ *
10163
+ * Rotation blends the short way around the circle, so 0.1 and TAU-0.1 average
10164
+ * to 0 rather than to PI.
10165
+ *
10166
+ * This doubles as the interpolator for a `SampledTrack<Pose>`: interpolating
10167
+ * between two poses at `u` is `blendPoses([a, b], [1 - u, u])`.
10168
+ */
10169
+ declare function blendPoses(poses: Pose[], weights: number[]): Pose;
10170
+
10171
+ /**
10172
+ * Resolve every joint's world transform by walking the skeleton once and
10173
+ * composing each joint onto its already-resolved parent.
10174
+ *
10175
+ * `skeleton.joints` must be in topological order — a joint whose parent has not
10176
+ * been resolved yet throws rather than silently resolving against identity,
10177
+ * because that failure is otherwise invisible until a limb renders in the wrong
10178
+ * place.
10179
+ */
10180
+ declare function resolveSkeleton(skeleton: Skeleton, pose: Pose): Map<string, Mat3$1>;
10181
+
9663
10182
  /** Snap policy that never picks a target — every drop is rejected, which is
9664
10183
  * what a free-form container wants. */
9665
10184
  declare function none<TPose>(): LayoutSnap<TPose>;
@@ -9919,4 +10438,4 @@ interface InsertOverlayStyle {
9919
10438
  lineWidth?: number;
9920
10439
  }
9921
10440
 
9922
- export { ANCHOR_HIT_BASE_PX, Action, 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, type AnimateToBoundsOptions, type AnimationHandle, type Animator, AnyTool, AreaSelectAdapter, type ArrayAdapter, type ArrayAdapterConfig, BUNDLE_TOOLS, BindingScope, BooleansAdapter, Bounds, BoundsConstraint, type BuildChromeCtxArgs, type 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 CellHighlightLayerOpts, ChromeCtx, ChromeId, ChromeState, type ClampBounds, ClipboardSnapshot, type CoalescedCtx, type ColorInterpolate, type ColorOverride, type ColorOverrideFn, 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 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_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_STROKE_COLOR, DEFAULT_VELOCITY_DECAY, DebugConfig, DebugSink, DebugSnapshot, DebugStrokes, DebugTheme, type DecayLoopConfig, type DecayOptions, 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, EASINGS, type EasingFn, type EasingName, Eligibility, type EligibilityState, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, type FillPoseBox, FillStyle, type FitTextPoseOptions, FitViewToBoundsOptions, type FlagKey, type FreeformOptions, GHOST_STROKE, type GateLayerOptions, GeometryProjection, type GestureSource, GradStop, GradientFill, GradientKind, type GridLayerOpts, type GridSlotConfig, Guide, type GuideSnapOptions, type GuidesLayerOpts, HANDLE_BASE_PX, HandIcon, type InertiaConfig as HandToolInertiaConfig, type HandleDragPoint, type HeadlessCanvasLike, HotkeyTrigger, type IconProps, type ImageNodeData, type ImageStatus, type IndicatorStyle, InsertAdapter, InsertBehavior, InsertExtras, type InsertNodeFactory, type InsertOp, type InsertOverlayStyle, type Interpolate, type InterpolatorFactory, IntersectIcon, KIT_SHAPE_KINDS, type LabelOptions, LassoHitMode, LassoIcon, LassoSelectAdapter, LassoSelectBehavior, LayerEnumerableAdapter, LayerHit, type LayerSlotValue, type LayersMap, type LayoutLine, type LayoutResult, LayoutSnap, LayoutStrategy, type LifecycleAnimation, LineIcon, type LinePoint, type LoopFactory, type LoopOptions, MIXED, MOVE_ANCHORS, type MarkdownFontOptions, type MeasureFn, type MeasureTextBoundsOpts, type MeasuredText, MinimapCanvas, type MinimapCanvasProps, type MinimapFit, type Mixed, ModifierState, type MomentumOptions, MoveAdapter, MoveBehavior, type NestedHitOpts, type NestedHitTester, type NodeClientRect, type NodeFill, NodeId, type NodeInk, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type OpenFilePickerOptions, OrderedAdapter, OriginProjection, OverlayPosition, PATH_ANCHOR_CHROME_ID, 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, type PhysicsHandle, type PhysicsOptions, PickHud, type PickHudProps, type PickTopMostHitAdapter, type PinchZoomToolOpts, type PixelRenderPlan, type PointInPathOptions, type PointInTextPoseOpts, PointSnapBehavior, PointerProviderIfRoot, type PointerSample, type PointerStylusState, PolygonIcon, PolygonPath, type PolygonPoint, PoseProjection, type PoseRotation, type PositionedRun, type PressureToWidthOptions, type Pt, RECT_ALIGN_PROJECTION, ROTATION_HANDLE_BASE_PX, type RangeStyle, type RasterImage, type Rect, RectIcon, RectPath, RectPose, type RegisterNodeShapeOptions, RegisteredOp, RenderLayer, type RenderSceneToCanvasArgs, type RenderSceneToPixelsArgs, type ReorderDirection, ResizeAdapter, ResizeAnchor, ResizePose, ResolvedTextStyle, RotateAdapter, RotateBehavior, type RotateGeometry, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, Rule, RuleCtx, type RunStylePatch, SPRING_PRESETS, 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 SelectionHandlesLayerOpts, type SelectionOutlineLayerOpts, type SelectionOverlayLayerOpts, type SelectionOverlaySlotConfig, SerializedScene, type SetFlagResult, type SetPathFields, ShaderProgramHandle, type ShapeCoversPointOptions, type SharedAnchor, type Simulation, type SimulationForce, type SimulationNode, SliceDep, type SnapPattern, type SnapPointOptions, SnapStrategy, type SplitByLineOptions, type SpringOptions, type SpringPoseOptions, type SpringPreset, type SpringPresetName, type SpringVertexColorsOptions, type StaggerBuilder, type StaggerDelay, type StaggerFactory, type StaggerOptions, type StaggerPerItem, type StaggerSpringPoseOptions, type StaggerTweenOptions, type StaggerVertexColorsOptions, type StandardSlotConfig, type StandardSlotName, StarIcon, type StarPoint, type StartEditOptions, Stroke, type StyleKey, StyledRun, type StylusData, SubtractIcon, SvgIngestOptions, type TextEditScreenPose, type TextEditSelection, TextIcon, type TextLineBoxesOpts, type TextPose, type TextRenderer, TextStyle, TextVerticalAlign, TextureHandle, type ThresholdDragHandle, type ThresholdDragOptions, type TileGridOptions, type TilePatternOpts, TilePatternSpec, Tool, type ToolBundle, ToolDef, ToolKeybinding, type ToolPref, type ToolPrefBoolean, type ToolPrefBooleanControl, type ToolPrefColor, type ToolPrefCustom, type ToolPrefEnum, type ToolPrefEnumControl, type ToolPrefGroup, type ToolPrefKind, type ToolPrefLeaf, type ToolPrefNumber, type ToolPrefNumberControl, type ToolPrefNumberUnit, type ToolPrefPaint, type ToolPrefString, type ToolPrefStringControl, type ToolsApi, type TweenLoopOptions, type TweenOptions, type TweenPoseOptions, type TweenVertexColorsOptions, UnionIcon, UnitSystem, UnitValue, UnknownIcon, type UseAlignOptions, type UseAlignReturn, type 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 UseHoverTrackingArgs, type UseImageToolOptions, type UseKeybindingsOptions, type UseLassoSelectOptions, type UseLassoToolOptions, UseMoveOptions, 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, type VertexColorChannel, View, ViewTransform, type ViewportConfig, ViewportDims, type ViewportLayer, ViewportToolDef, type ViewportZoomOptions, VisibilityRules, WeaselProvider, type WheelInput, type WheelState, ZoomBound, type ZoomBounds, type ZoomClampOpts, ZoomFactor, aabbCenter, actionIs, alignDeltaFor, alignInsertBehavior, alignMoveBehavior, alignResizeBehavior, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyOpsTo, applyStyleToRange, areaSelectAction, arrayAdapter, bezierCubic, bezierQuadratic, boundsOfPath, buildChromeCtx, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, caretIndexAt, cellAt, charOffsetToDomPosition, clampView, clearSelectionAction, clientToCanvas, cloneAction, coarsePointer, composeAffordanceLayer, composePath, composeSelectionPose, computeFitView, computeIndicatorCommand, computeWheelAction, cond, constrainTo45, containedThenNearest, countPathAnchors, createCellHighlightLayer, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDeleteOp, createGridLayer, createGuidesLayer, createHistory, createInsertOp, createMarkdownRenderer, createMoveToIndexOp, createNodeProperties, createNodeRouting, createParallaxLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createReorderOp, createReparentOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createTextLayer, createTilePattern, createTransformOp, createViewportLayer, cycleVertexColors, decomposePath, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultVisibilityRules, defineTool, defineViewportTool, deleteScratch, deriveAlignmentGuides, deriveParallaxView, dispatchApplyBatch, dlog, domPositionToCharOffset, domToRuns, dwarn, 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, ellipsePath, enumerateAnchors, fillInPoseFrame, fillToBoundsFrame, findNodeShape, findShapeInk, findShapeSilhouette, fitTextPose, fitToBounds, fitZoom, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, focused, forEachCoalesced, freeform, gateLayer, gesturing, getAlpha01, getImageBitmap, getNodeShapes, getScratch, getStylusData, gradientForBounds, gradientGeometry, guideSnapStrategy, hexToRgba, hitAffordanceRegions, hitAnchor, hitRotationHandle, hovering, hoveringSelected, imageStatus, inferredNodeProperties, inferredNodeRouting, insertAction, isDebugEnabled, isEditableTarget, isPatternSpec, lassoSelectAction, layoutMarkdown, lerpColorArray, lerpOklab, lerpOklch, linePath, linear, liveScope, makeViewportZoomAction, 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, 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, poseRotationOf, pressureToWidth, pxExtent, rainbowVertexColors, rebuildOp, rectCorners, rectPath, registerNodeShape, registerOpFactory, regularPolygonPath, renderLabel, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveColor, resolveDeviceProfile, resolveFillPattern, resolvePatternSpec, resolveVisibility, rgbaToHex, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotatePoint, rotatedRectCorners, rotationDegreesUnit, rotationHandle, roundToCell, runsToDom, sampleGradientStops, scaleDelta, scalePathToBounds, sceneFromJSON, sceneNodeClientRect, sceneToAdapter, scopeBindings, scratchKey, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, setFlagOverRange, setScratch, shapeCoversPoint, snap, snapPoint, solidVertexColors, spiro, splitPathByLine, splitSubpaths, springPose, springVertexColors, srgbU8ToOklab, staggerVertexColors, starPath, startThresholdDrag, styleAtRange, subscribeImageReady, textCommand, textLineBoxes, tileGrid, toHex8, transformPath, translatePath, translatePolygonInPlace, translatePoseViaDescriptor, tweenPose, tweenVertexColors, 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, useHoverTracking, useImageTool, useKeybindings, useLassoTool, useLineTool, usePenTool, usePencilTool, usePinchGesture, usePinchZoomTool, usePointerStylus, usePolygonTool, usePublishSelection, useRectTool, useResizePolicy, useRotateTool, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelectionContext, useSimulation, useSliceDep, useStandardActions, useStarTool, useTextEdit, useTextTool, useTools, useVelocityTracker, useViewAnimation, useViewTween, useZoom, viewportDragPanAction, viewportZoomAction, viewportsAt, when, withAlpha01, withCoord, withGradientKind, withinPxBox, withinPxRadius, worldEditToStorage, zoomAt, zoomAtLeast };
10441
+ 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, type AnimateToBoundsOptions, type AnimationHandle, type Animator, AnyTool, AreaSelectAdapter, type ArrayAdapter, type ArrayAdapterConfig, BUNDLE_TOOLS, BindingScope, BooleansAdapter, Bounds, BoundsConstraint, type BuildChromeCtxArgs, type 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 CellHighlightLayerOpts, ChromeCtx, ChromeId, ChromeState, type ClampBounds, ClipboardSnapshot, type CoalescedCtx, type ColorInterpolate, type ColorOverride, type ColorOverrideFn, 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_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_STROKE_COLOR, DEFAULT_VELOCITY_DECAY, DebugConfig, DebugSink, DebugSnapshot, DebugStrokes, DebugTheme, type DecayLoopConfig, type DecayOptions, 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, EASINGS, type EasingFn, type EasingName, Eligibility, type EligibilityState, EllipseIcon, type EventTrack, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, type FillPoseBox, FillStyle, type FitTextPoseOptions, FitViewToBoundsOptions, type FlagKey, type FreeformOptions, GHOST_STROKE, type GateLayerOptions, GeometryProjection, type GestureSource, GradStop, GradientFill, GradientKind, type GridLayerOpts, type GridSlotConfig, Guide, type GuideSnapOptions, type GuidesLayerOpts, HANDLE_BASE_PX, HandIcon, type InertiaConfig as HandToolInertiaConfig, type HandleDragPoint, type HeadlessCanvasLike, HotkeyTrigger, IDENTITY_JOINT, type IconProps, type ImageNodeData, type ImageStatus, type IndicatorStyle, InsertAdapter, InsertBehavior, InsertExtras, type InsertNodeFactory, type InsertOp, type InsertOverlayStyle, type Interpolate, type InterpolatorFactory, IntersectIcon, type Joint, type JointTransform, KIT_SHAPE_KINDS, type Keyframe, type LabelOptions, LassoHitMode, LassoIcon, LassoSelectAdapter, LassoSelectBehavior, LayerEnumerableAdapter, LayerHit, type LayerSlotValue, type LayersMap, type LayoutLine, type LayoutResult, LayoutSnap, LayoutStrategy, type LifecycleAnimation, LineIcon, type LinePoint, type LoopFactory, type LoopOptions, MIXED, MOVE_ANCHORS, type MarkdownFontOptions, Mat3$1 as Mat3, type MeasureFn, type MeasureTextBoundsOpts, type MeasuredText, MinimapCanvas, type MinimapCanvasProps, type MinimapFit, type Mixed, ModifierState, type MomentumOptions, MoveAdapter, MoveBehavior, type NestedHitOpts, type NestedHitTester, type NestedTimeline, type NodeClientRect, type NodeFill, NodeId, type NodeInk, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type OpenFilePickerOptions, OrderedAdapter, OriginProjection, OverlayPosition, PATH_ANCHOR_CHROME_ID, 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, type PhysicsHandle, type PhysicsOptions, PickHud, type PickHudProps, type PickTopMostHitAdapter, type PinchZoomToolOpts, type PixelRenderPlan, type PointInPathOptions, type PointInTextPoseOpts, PointSnapBehavior, PointerProviderIfRoot, type PointerSample, type PointerStylusState, PolygonIcon, PolygonPath, type PolygonPoint, type Pose, PoseProjection, type PoseRotation, type PositionedRun, type PressureToWidthOptions, type Pt, RECT_ALIGN_PROJECTION, ROTATION_HANDLE_BASE_PX, type RangeStyle, type RasterImage, type Rect, RectIcon, RectPath, RectPose, type RegisterNodeShapeOptions, RegisteredOp, RenderLayer, type RenderSceneToCanvasArgs, type RenderSceneToPixelsArgs, type ReorderDirection, ResizeAdapter, ResizeAnchor, ResizePose, type ResolvableView, ResolvedTextStyle, RotateAdapter, RotateBehavior, type RotateGeometry, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, Rule, RuleCtx, type RunStylePatch, SPRING_PRESETS, type 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 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 SpringOptions, type SpringPoseOptions, type SpringPreset, type SpringPresetName, type SpringVertexColorsOptions, type StaggerBuilder, type StaggerDelay, type StaggerFactory, type StaggerOptions, type StaggerPerItem, type StaggerSpringPoseOptions, type StaggerTweenOptions, type StaggerVertexColorsOptions, type StandardSlotConfig, type StandardSlotName, StarIcon, type StarPoint, type StartEditOptions, Stroke, type StyleKey, StyledRun, type StylusData, SubtractIcon, SvgIngestOptions, type TextEditScreenPose, type TextEditSelection, TextIcon, type TextLineBoxesOpts, type TextPose, type TextRenderer, TextStyle, TextVerticalAlign, TextureHandle, type ThresholdDragHandle, type ThresholdDragOptions, type TileGridOptions, type TilePatternOpts, TilePatternSpec, type TimelineHandle, type TimelineOptions, type TimelineTrack, Tool, type ToolBundle, ToolDef, ToolKeybinding, type ToolPref, type ToolPrefBoolean, type ToolPrefBooleanControl, type ToolPrefColor, type ToolPrefCustom, type ToolPrefEnum, type ToolPrefEnumControl, type ToolPrefGroup, type ToolPrefKind, type ToolPrefLeaf, type ToolPrefNumber, type ToolPrefNumberControl, type ToolPrefNumberUnit, type ToolPrefPaint, type ToolPrefString, type ToolPrefStringControl, type ToolsApi, type Track, type TweenLoopOptions, type TweenOptions, type TweenPoseOptions, type TweenVertexColorsOptions, UnionIcon, UnitSystem, UnitValue, UnknownIcon, type UseAlignOptions, type UseAlignReturn, type 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 UseHoverTrackingArgs, type UseImageToolOptions, type UseKeybindingsOptions, type UseLassoSelectOptions, type UseLassoToolOptions, UseMoveOptions, 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, type VertexColorChannel, View, type ViewRect, type ViewResolver, type ViewTarget, ViewTransform, type ViewportConfig, ViewportDims, type ViewportLayer, ViewportToolDef, type ViewportZoomOptions, VisibilityRules, WeaselProvider, type WheelInput, type WheelState, ZoomBound, type ZoomBounds, type ZoomClampOpts, ZoomFactor, aabbCenter, actionIs, actionShortcuts, alignDeltaFor, alignInsertBehavior, alignMoveBehavior, alignResizeBehavior, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyOpsTo, applyStyleToRange, areaSelectAction, arrayAdapter, 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, createMarkdownRenderer, 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, 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, ellipsePath, enumerateAnchors, fillInPoseFrame, fillToBoundsFrame, findNodeShape, findShapeInk, findShapeSilhouette, fitTextPose, fitToBounds, fitZoom, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, focused, forEachCoalesced, freeform, gateLayer, gesturing, getAlpha01, getImageBitmap, getNodeShapes, getScratch, getStylusData, gradientForBounds, gradientGeometry, guideSnapStrategy, hexToRgba, hitAffordanceRegions, hitAnchor, hitRotationHandle, hovering, hoveringSelected, imageStatus, inferredNodeProperties, inferredNodeRouting, insertAction, isDebugEnabled, isEditableTarget, isPatternSpec, keySpecShortcut, lassoSelectAction, layoutMarkdown, lerpColorArray, lerpOklab, lerpOklch, linePath, linear, liveScope, makeViewportZoomAction, 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, 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, poseRotationOf, pressureToWidth, pxExtent, rainbowVertexColors, rebuildOp, rectCorners, rectPath, registerNodeShape, registerOpFactory, regularPolygonPath, renderLabel, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveColor, resolveDeviceProfile, resolveFillPattern, 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, solidVertexColors, spiro, splitPathByLine, splitSubpaths, springPose, springVertexColors, srgbU8ToOklab, staggerVertexColors, starPath, startThresholdDrag, styleAtRange, subscribeImageReady, textCommand, textLineBoxes, tileGrid, toHex8, transformPath, translatePath, translatePolygonInPlace, translatePoseViaDescriptor, tweenPose, tweenVertexColors, 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, useHoverTracking, useImageTool, useKeybindings, useLassoTool, useLineTool, usePenTool, usePencilTool, usePinchGesture, usePinchZoomTool, usePointerStylus, usePolygonTool, usePublishSelection, useRectTool, useResizePolicy, useRotateTool, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelectionContext, useSimulation, useSliceDep, useStandardActions, useStarTool, useTextEdit, useTextTool, useTools, useVelocityTracker, useViewAnimation, useViewTween, useZoom, viewportDragPanAction, viewportZoomAction, viewportsAt, when, withAlpha01, withCoord, withGradientKind, withinPxBox, withinPxRadius, worldEditToStorage, zoomAt, zoomAtLeast };