@weasel-js/core 1.0.1 → 1.0.3

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 (53) hide show
  1. package/CHANGELOG.md +330 -0
  2. package/dist/{DrawCommand-DCmiNkBj.d.ts → DrawCommand-BbPrSTra.d.ts} +24 -0
  3. package/dist/{chunk-Z3KNFTTS.js → chunk-3JYFAQIB.js} +3 -3
  4. package/dist/chunk-3JYFAQIB.js.map +1 -0
  5. package/dist/{chunk-UB6A6L77.js → chunk-3KGMJMOS.js} +3 -3
  6. package/dist/{chunk-UB6A6L77.js.map → chunk-3KGMJMOS.js.map} +1 -1
  7. package/dist/{chunk-IO5Z75X4.js → chunk-HGF5X6MZ.js} +2 -2
  8. package/dist/chunk-HGF5X6MZ.js.map +1 -0
  9. package/dist/{chunk-775XXAHR.js → chunk-JOSUVS6C.js} +2 -2
  10. package/dist/{chunk-775XXAHR.js.map → chunk-JOSUVS6C.js.map} +1 -1
  11. package/dist/{chunk-FVNWK7U3.js → chunk-SMCZRSYB.js} +1677 -1371
  12. package/dist/chunk-SMCZRSYB.js.map +1 -0
  13. package/dist/{chunk-DCIU3SRK.js → chunk-TR3HZN34.js} +79 -151
  14. package/dist/chunk-TR3HZN34.js.map +1 -0
  15. package/dist/{chunk-6SHZHXXR.js → chunk-U45SODC2.js} +2 -2
  16. package/dist/{chunk-6SHZHXXR.js.map → chunk-U45SODC2.js.map} +1 -1
  17. package/dist/clipboard.d.ts +5 -2
  18. package/dist/clipboard.js +1 -2
  19. package/dist/clone.d.ts +2 -2
  20. package/dist/clone.js +0 -1
  21. package/dist/{geometry-DVeZ2i-c.d.ts → geometry-5X6TrAkX.d.ts} +1 -1
  22. package/dist/{grid-XcFQVS0f.d.ts → grid-sfilv5HP.d.ts} +7 -2
  23. package/dist/index.d.ts +695 -49
  24. package/dist/index.js +7 -8
  25. package/dist/insert.d.ts +6 -3
  26. package/dist/insert.js +1 -2
  27. package/dist/insert.js.map +1 -1
  28. package/dist/move.d.ts +26 -5
  29. package/dist/move.js +2 -3
  30. package/dist/move.js.map +1 -1
  31. package/dist/{options-wAvCnOZd.d.ts → options-CbsIgQci.d.ts} +3 -1
  32. package/dist/patterns-builtin.d.ts +8 -0
  33. package/dist/patterns-builtin.js +1 -2
  34. package/dist/{pointSnapToGrid-BuDZWBrL.d.ts → pointSnapToGrid-C3wowsQy.d.ts} +9 -3
  35. package/dist/{index-DPI8DV0A.d.ts → registry-CxnkXbG8.d.ts} +225 -350
  36. package/dist/renderer.d.ts +36 -4
  37. package/dist/renderer.js +7 -8
  38. package/dist/resize.d.ts +12 -5
  39. package/dist/resize.js +2 -3
  40. package/dist/routing.d.ts +106 -7
  41. package/dist/routing.js +1 -2
  42. package/dist/{types-BJ8_cyT7.d.ts → types-BHK2dkMu.d.ts} +43 -1
  43. package/dist/{types-BhJJ2OCM.d.ts → types-ByZxoD6P.d.ts} +1 -1
  44. package/dist/{types-B_-khFM0.d.ts → types-DpQ0cWYC.d.ts} +32 -0
  45. package/dist/{types-Kh_osAq9.d.ts → types-vqxpCFVp.d.ts} +31 -0
  46. package/dist/{viewToMat3-BvaWCN99.d.ts → viewToMat3-CQW_YqDw.d.ts} +1 -1
  47. package/package.json +6 -6
  48. package/dist/chunk-DCIU3SRK.js.map +0 -1
  49. package/dist/chunk-FVNWK7U3.js.map +0 -1
  50. package/dist/chunk-IO5Z75X4.js.map +0 -1
  51. package/dist/chunk-PZ5AY32C.js +0 -9
  52. package/dist/chunk-PZ5AY32C.js.map +0 -1
  53. package/dist/chunk-Z3KNFTTS.js.map +0 -1
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-XcFQVS0f.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-XcFQVS0f.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 AnyTool, l as ToolCtx, m as ToolKeybinding, H as HotkeyTrigger, L as LayerHit, n as ChromeState, o as SelectionApi, I as InsertExtras, G as GeometryProjection, p as ContentHandlerEntry, q as SvgIngestOptions, U as UseSelectionOptions, r as ActionsProp, s as Affordance, t as AffordanceBinding, u as AffordanceRegion, v as CommonAffordanceScratch, B as BooleansAdapter, E as Eligibility, w as BindingScope, x as Contribution, y as ScopedBinding } from './index-DPI8DV0A.js';
8
- export { z as ALWAYS, F as ActionDeps, J as ActionDisabledReason, K as ActionEnabledResult, M as ActionEntry, N as ActionsProvider, O as ActiveToolContextProvider, P as ActiveToolContextProviderIfRoot, Q as ActiveToolContextProviderProps, W as ActiveToolContextValue, X as AreaSelectDep, Y as BindingOpts, Z as BooleanOp, _ as BooleanOpResult, $ as BoundGesture, a0 as BuildRuleCtxArgs, a1 as ClaimableGesture, a2 as ClipboardDep, a3 as ClipboardIngestCtx, a4 as CustomPaintContext, a5 as DepName, a6 as DepRegistry, a7 as DepRegistryProvider, a8 as DispatcherContext, a9 as DragSample, aa as EditAnchorsDep, ab as GestureBinding, ac as IDENTITY_POSE_COMPOSITION, ad as ImmediateInvoker, ae as IngestCtx, af as IngestionDep, ag as InsertDep, ah as InvocationCtx, ai as Invoker, aj as LassoSelectDep, ak as LayoutDep, al as MatchResult, am as NEVER, an as NodeAtPointDep, ao as OngoingHandle, ap as OngoingInvoker, aq as OngoingOverlay, ar as Point2, as as PointerContextProvider, at as PointerContextValue, au as PointerWorldPos, av as PoseAdapter, aw as PoseComposition, ax as ResizePolicy, ay as ResolveAllOptions, az as ResolveOnlyResult, aA as ResolvedCandidate, aB as SelectionExtendKey, aC as SelectionMode, aD as Selector, aE as SnapDep, aF as SvgUnpacker, aG as TextEditDep, aH as ToolModifiers, aI as ToolPresentation, aJ as ToolSlot, aK as UiOngoingControl, aL as ViewApi, aM as applyBooleanOp, aN as buildRuleCtx, aO as clipboardCopyAction, aP as clipboardCutAction, aQ as composeRectPose, aR as composeWorldPose, aS as createDispatcher, aT as decomposeRectPose, aU as describeRule, aV as drawLayers, aW as enterTextEditAction, aX as evaluate, aY as evaluateEnabled, aZ as rebaseLocalPose, a_ as registerContentHandler, a$ as routing, b0 as sliceAction, b1 as specificity, b2 as translateRectPose, b3 as useAction, b4 as useActionsRegistry, b5 as useActiveToolContext, b6 as useDepRegistry, b7 as useDepSource, b8 as useOptionalActiveToolContext, b9 as useOptionalDepRegistry, ba as usePointerContext, bb as useSelection, bc as worldPoseLookup } from './index-DPI8DV0A.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 ToolCtx, o as ToolKeybinding, H as HotkeyTrigger, L as LayerHit, p as ChromeState, q as SelectionApi, I as InsertExtras, G as GeometryProjection, r as ContentHandlerEntry, s as SvgIngestOptions, U as UseSelectionOptions, t as ActionsProp, u as Affordance, v as AffordanceRegion, w as AffordanceBinding, x as CommonAffordanceScratch, B as BooleansAdapter, E as Eligibility, y as BindingScope, z as Contribution, F as ScopedBinding } from './registry-CxnkXbG8.js';
8
+ export { J as ALWAYS, K as ActionDeps, M as ActionDisabledReason, N as ActionEnabledResult, P as ActionEntry, Q as ActionsProvider, W as ActiveToolContextProvider, X as ActiveToolContextProviderIfRoot, Y as ActiveToolContextProviderProps, Z as ActiveToolContextValue, _ as AreaSelectDep, $ as BindingOpts, a0 as BooleanOp, a1 as BooleanOpResult, a2 as BoundGesture, a3 as BuildRuleCtxArgs, a4 as ClaimableGesture, a5 as ClipboardDep, a6 as ClipboardIngestCtx, a7 as CustomPaintContext, a8 as DepName, a9 as DepRegistry, aa as DepRegistryProvider, ab as DispatcherContext, ac as DragSample, ad as EditAnchorsDep, ae as GestureBinding, af as IDENTITY_POSE_COMPOSITION, ag as ImmediateInvoker, ah as IngestCtx, ai as IngestionDep, aj as InsertDep, ak as InvocationCtx, al as Invoker, am as LassoSelectDep, 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 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-CxnkXbG8.js';
9
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
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-DVeZ2i-c.js';
12
- export { R as RECT_POSE_DESCRIPTOR, a as ROTATED_POSE_DESCRIPTOR, f as fitViewToBounds } from './geometry-DVeZ2i-c.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-Kh_osAq9.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-Kh_osAq9.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-BhJJ2OCM.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-BhJJ2OCM.js';
17
- import { U as UseResizeOptions } from './pointSnapToGrid-BuDZWBrL.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-BuDZWBrL.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
19
  import { BodyClassification, IngestItem } from '@weasel-js/gestures';
20
20
  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-B_-khFM0.js';
22
- export { g as ContainerBounds, D as DropTarget, h as LayoutChild, i as LayoutContainer, j as LayoutDragged, S as SnapTarget } from './types-B_-khFM0.js';
23
- import { D as DebugSink, a as DebugConfig, b as DebugSnapshot, c as DebugTheme } from './types-BJ8_cyT7.js';
24
- export { d as DebugFeature, H as HandleKind, e as HitShape, R as RecordedBounds, f as RecordedHandle, g as RecordedHitbox, h as RecordedLayer, i as RecordedOrigin, j as RecordedSnap } from './types-BJ8_cyT7.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-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';
23
+ import { D as DebugSink, a as DebugConfig, b as DebugSnapshot, c as DebugStrokes, d as DebugTheme } from './types-BHK2dkMu.js';
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-DCmiNkBj.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-DCmiNkBj.js';
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
30
  import { Op, CreateHistoryOptions, History } from '@weasel-js/history';
31
31
  export * from '@weasel-js/history';
32
32
  export { Op } from '@weasel-js/history';
33
33
  import { Mat3 } from '@weasel-js/geom';
34
34
  import { G as Guide } from './types-D2tTKEU0.js';
35
- export { U as UseInsertOptions } from './options-wAvCnOZd.js';
35
+ export { U as UseInsertOptions } from './options-CbsIgQci.js';
36
36
  export { UseClipboardOpsOptions, UseClipboardOpsReturn, WEASEL_CLIPBOARD_MIME, WEASEL_CLIPBOARD_MIME_WEB, buildWeaselClipboardText, embedWeaselMetadataInSvg, extractWeaselClipboardFromSvg, parseWeaselClipboardText, sniffWeaselClipboardText, useClipboardOps } from './clipboard.js';
37
37
  export { cloneByAltDrag } from './clone.js';
38
- export { I as ImageMinification, v as viewToMat3 } from './viewToMat3-BvaWCN99.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
 
@@ -208,9 +208,12 @@ declare function createCellHighlightLayer(opts: CellHighlightLayerOpts): RenderL
208
208
  * bounds.h)`. Caller chooses `innerView.{x,y,scale}` to control which slice
209
209
  * of source-world is shown.
210
210
  *
211
- * **Hit-testing is not wired up yet** pointer events still target the
212
- * outer view. A follow-up task adds dispatcher-side re-projection so a
213
- * click inside a viewport translates to inner-world coords.
211
+ * **Input is re-projected on request, not automatically.** `reproject` maps a
212
+ * 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.
214
217
  *
215
218
  * **Screen-space source layers** (e.g., debug overlays, selection chrome)
216
219
  * still render to the outer canvas, not into the viewport. To include
@@ -240,12 +243,67 @@ interface CreateViewportLayerOpts<TData> {
240
243
  * inner view leaves part of the viewport empty. */
241
244
  background?: string;
242
245
  }
243
- declare function createViewportLayer<TData>(opts: CreateViewportLayerOpts<TData>): RenderLayer<TData>;
246
+ /**
247
+ * @experimental
248
+ *
249
+ * A {@link RenderLayer} that also answers where a screen point lands inside
250
+ * its inner view. Returned by {@link createViewportLayer}.
251
+ */
252
+ interface ViewportLayer<TData> extends RenderLayer<TData> {
253
+ /**
254
+ * Map a screen point (CSS px, canvas top-left origin) to a point in the
255
+ * inner view's world space. Returns `null` when the point falls outside
256
+ * the viewport rect; the right and bottom edges are exclusive, so
257
+ * neighbouring viewports never both claim a pixel.
258
+ *
259
+ * Pass the same `outer` view and `dims` the frame was drawn with —
260
+ * `bounds` is a pure function of those, so this reproduces the exact rect
261
+ * that was painted rather than a remembered one.
262
+ *
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.
266
+ */
267
+ reproject(outer: View, dims: Dims, screen: {
268
+ x: number;
269
+ y: number;
270
+ }): {
271
+ x: number;
272
+ y: number;
273
+ } | null;
274
+ }
275
+ /** Build a layer that renders other layers through a second view, inside a
276
+ * sub-region of the canvas — a minimap, an inset, a magnifier. Its
277
+ * `reproject` maps screen points back through the inner view so the region
278
+ * can be interacted with. */
279
+ declare function createViewportLayer<TData>(opts: CreateViewportLayerOpts<TData>): ViewportLayer<TData>;
280
+ /**
281
+ * @experimental
282
+ *
283
+ * Find which of `layers` owns a screen point, and where that point lands in
284
+ * its inner world. Pass the layers in paint order; the last one containing
285
+ * the point wins, since that is the one drawn on top.
286
+ */
287
+ declare function viewportsAt<TData>(layers: readonly ViewportLayer<TData>[], outer: View, dims: Dims, screen: {
288
+ x: number;
289
+ y: number;
290
+ }): {
291
+ layer: ViewportLayer<TData>;
292
+ point: {
293
+ x: number;
294
+ y: number;
295
+ };
296
+ } | null;
244
297
 
298
+ /** One value for both axes, or a separate value per axis. */
245
299
  type ScalarOrXY = number | {
246
300
  x: number;
247
301
  y: number;
248
302
  };
303
+ /** How a parallax plane tracks the camera: `pan` is the fraction of the
304
+ * camera's translation it follows (1 = locked to the scene, 0 = fixed to the
305
+ * screen), `zoom` the same for scale, and `anchor` the world point both are
306
+ * measured from. */
249
307
  interface ParallaxOpts {
250
308
  pan: ScalarOrXY;
251
309
  zoom?: ScalarOrXY;
@@ -267,6 +325,7 @@ interface ParallaxOpts {
267
325
  */
268
326
  declare function deriveParallaxView(outer: View, opts: ParallaxOpts): View;
269
327
 
328
+ /** Options for `createParallaxLayer`. */
270
329
  interface CreateParallaxLayerOpts<TData> extends ParallaxOpts {
271
330
  id: string;
272
331
  label: string;
@@ -315,6 +374,8 @@ interface SimulationForce<TNode extends SimulationNode = SimulationNode> {
315
374
  (alpha: number): void;
316
375
  initialize?(nodes: TNode[], random?: () => number): void;
317
376
  }
377
+ /** Options for `useSimulation`: the nodes to move, the forces acting on them,
378
+ * and the cooling schedule that decides when the simulation settles. */
318
379
  interface UseSimulationOptions<TNode extends SimulationNode> {
319
380
  /** Mutable array of nodes. Kit + forces mutate vx/vy/x/y in place. */
320
381
  nodes: TNode[];
@@ -338,6 +399,16 @@ interface UseSimulationOptions<TNode extends SimulationNode> {
338
399
  requestFrame?: (cb: (t: number) => void) => number;
339
400
  cancelFrame?: (handle: number) => void;
340
401
  }
402
+ /**
403
+ * A running force simulation over a set of nodes.
404
+ *
405
+ * Each tick applies every force and then integrates velocities, scaled by
406
+ * `alpha` — a temperature that decays toward `alphaTarget` so the layout
407
+ * settles instead of jittering forever. Raise `alphaTarget` to reheat it,
408
+ * which is what a drag does.
409
+ *
410
+ * Nodes are mutated in place; the simulation holds the array, not a copy.
411
+ */
341
412
  interface Simulation<TNode extends SimulationNode> {
342
413
  readonly nodes: TNode[];
343
414
  setNodes(nodes: TNode[]): this;
@@ -365,7 +436,10 @@ interface Simulation<TNode extends SimulationNode> {
365
436
  }
366
437
  /** Default alpha decay: such that alpha drops from 1 to alphaMin (0.001) in 300 ticks. */
367
438
  declare const DEFAULT_ALPHA_DECAY: number;
439
+ /** Alpha below which a cooling simulation is considered settled. */
368
440
  declare const DEFAULT_ALPHA_MIN = 0.001;
441
+ /** Fraction of velocity shed each tick — friction. Higher settles sooner and
442
+ * overshoots less. */
369
443
  declare const DEFAULT_VELOCITY_DECAY = 0.4;
370
444
 
371
445
  /**
@@ -506,6 +580,7 @@ interface PointerStylusState extends StylusData {
506
580
  * glass without contact. */
507
581
  hovering: boolean;
508
582
  }
583
+ /** Options for `usePointerStylus`. */
509
584
  interface UsePointerStylusOptions {
510
585
  /** Throttle re-renders to ≈this many state updates per second. The latest
511
586
  * sample is always kept; intermediates are dropped. Default 60. Set to
@@ -672,12 +747,15 @@ interface ThresholdDragHandle {
672
747
  /** Begin a threshold-gated drag from a React PointerDown event; returns a handle exposing live state. */
673
748
  declare function startThresholdDrag(e: React.PointerEvent, opts: ThresholdDragOptions): ThresholdDragHandle;
674
749
 
750
+ /** The world rect a view is not allowed to show outside of. */
675
751
  interface ClampBounds {
676
752
  x: number;
677
753
  y: number;
678
754
  width: number;
679
755
  height: number;
680
756
  }
757
+ /** Canvas dimensions in CSS pixels — needed to know how much world a view
758
+ * actually shows. */
681
759
  interface CanvasSize {
682
760
  width: number;
683
761
  height: number;
@@ -773,6 +851,7 @@ declare const ROTATION_HANDLE_BASE_PX = 24;
773
851
  * force-touch-chrome demos possible without stubbing `matchMedia`.
774
852
  */
775
853
  declare function useDeviceProfile(overrides?: Partial<DeviceProfile>): DeviceProfile;
854
+ /** Props for `<DeviceProfileProvider>`. */
776
855
  interface DeviceProfileProviderProps {
777
856
  /** Partial override folded over detected facts. */
778
857
  value?: Partial<DeviceProfile>;
@@ -944,7 +1023,7 @@ declare function useAutoCenter(width: number, height: number, contentW: number,
944
1023
  */
945
1024
  /**
946
1025
  * @internal — runtime shape consumed by `matchesKeyBinding`. Public tool authors
947
- * should use `ToolKeybinding` from `@weasel-js/core/routing` for declaring
1026
+ * should use `ToolKeybinding` from `@weasel-js/core` for declaring
948
1027
  * configurable activation keys.
949
1028
  */
950
1029
  interface KeyBinding {
@@ -1120,6 +1199,7 @@ declare function resolveVisibility(consumer: VisibilityRules | undefined, ctx: C
1120
1199
  * fixture, or `<SceneCanvas>`.
1121
1200
  */
1122
1201
 
1202
+ /** The pieces of live canvas state a `ChromeCtx` is assembled from. */
1123
1203
  interface BuildChromeCtxArgs {
1124
1204
  focused: boolean;
1125
1205
  selection: readonly NodeId[];
@@ -1132,6 +1212,8 @@ interface BuildChromeCtxArgs {
1132
1212
  hover: NodeId | null;
1133
1213
  view: View;
1134
1214
  }
1215
+ /** Gather the current canvas state into the context that chrome-visibility
1216
+ * rules are evaluated against. Rebuilt per frame. */
1135
1217
  declare function buildChromeCtx(args: BuildChromeCtxArgs): ChromeCtx;
1136
1218
 
1137
1219
  /**
@@ -1149,6 +1231,7 @@ declare function buildChromeCtx(args: BuildChromeCtxArgs): ChromeCtx;
1149
1231
  * during paint, so the hover state is always read fresh.
1150
1232
  */
1151
1233
 
1234
+ /** Options for `useHoverTracking`. */
1152
1235
  interface UseHoverTrackingArgs {
1153
1236
  canvasRef: RefObject<HTMLCanvasElement | null>;
1154
1237
  /** Client → world conversion. Same shape as the dispatcher's. */
@@ -1162,6 +1245,9 @@ interface UseHoverTrackingArgs {
1162
1245
  } | null;
1163
1246
  enabled?: boolean;
1164
1247
  }
1248
+ /** Track which node the pointer is over. Returns a getter rather than state,
1249
+ * so per-frame code can read the current value without the hover re-rendering
1250
+ * the component on every pointer move. */
1165
1251
  declare function useHoverTracking(args: UseHoverTrackingArgs): () => NodeId | null;
1166
1252
 
1167
1253
  /**
@@ -1745,16 +1831,18 @@ declare const lassoSelectAction: Action & {
1745
1831
  };
1746
1832
 
1747
1833
  /**
1748
- * `pinchZoomAction` — ongoing Action descriptor for two-finger pinch zoom.
1834
+ * `pinchZoomAction` — ongoing Action descriptor for two-finger pinch zoom
1835
+ * and pan. The id and label stay `pinchZoom` / `Pinch Zoom`.
1749
1836
  *
1750
1837
  * ## Status: REAL
1751
1838
  *
1752
1839
  * Implements pinch-zoom via the multi-touch pointer stream:
1753
1840
  * - `start`: captures startSpread from `ctx.multiTouch.pinch.startSpread`
1754
1841
  * (or falls back to `ctx.multiTouch.spread`). Records the initial centroid.
1755
- * - `onMove`: computes zoom factor = currentSpread / startSpread; applies
1756
- * `zoomAt(view, centroid, factor)` so the gesture midpoint stays fixed
1757
- * on screen.
1842
+ * - `onMove`: computes zoom factor = currentSpread / startSpread, anchors
1843
+ * `zoomAt` on the previous centroid, then translates by the centroid
1844
+ * delta. Together those pin the world point under the gesture midpoint
1845
+ * as the midpoint moves, so the same gesture zooms and pans.
1758
1846
  * - `onEnd`: no-op — zoom is already applied each frame.
1759
1847
  *
1760
1848
  * ## Dispatcher extensions required
@@ -1838,6 +1926,10 @@ declare function useStandardActions(opts: UseStandardActionsOptions): void;
1838
1926
  * widened to all op-apply methods.
1839
1927
  */
1840
1928
 
1929
+ /** Build the adapter the default actions commit through when the consumer
1930
+ * 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. */
1841
1933
  declare function defaultCommitAdapter<TPose>(scene: Scene<unknown, string, TPose>): {
1842
1934
  getNode: (id: string) => Node$1<unknown, string, TPose> | undefined;
1843
1935
  getNodes: () => Node$1<unknown, string, TPose>[];
@@ -1853,16 +1945,25 @@ declare function defaultCommitAdapter<TPose>(scene: Scene<unknown, string, TPose
1853
1945
  insertNode: (node: Node$1<unknown, string, TPose>, index?: number) => NodeId;
1854
1946
  };
1855
1947
 
1948
+ /** Options for `useResizePolicy`. Each omitted field falls back to the kit
1949
+ * default. */
1856
1950
  interface UseResizePolicyOptions<TPose> {
1857
1951
  constraints?: TPose extends ResizePose ? BoundsConstraint<TPose>[] : never[];
1858
1952
  pointSnap?: TPose extends ResizePose ? PointSnapBehavior<TPose>[] : never[];
1859
1953
  expandIds?: (ids: string[]) => string[];
1860
1954
  projection?: PoseProjection<TPose>;
1861
1955
  }
1956
+ /** Publish how resizing should behave — constraints, point snapping, group
1957
+ * expansion, pose projection — for the resize action to consult. */
1862
1958
  declare function useResizePolicy<TPose>(options: UseResizePolicyOptions<TPose>): void;
1863
1959
 
1960
+ /** Publish how a slice (knife cut) is performed, so the `slice` action can
1961
+ * run against the consumer's geometry. */
1864
1962
  declare function useSliceDep(dep: SliceDep): void;
1865
1963
 
1964
+ /** Options for `useGestureDispatcher`: the element to listen on, the actions
1965
+ * and tools in play, and the hooks that turn raw DOM events into the world
1966
+ * coordinates and hit targets bindings match against. */
1866
1967
  interface UseGestureDispatcherOptions {
1867
1968
  /** Ref to the canvas element. Pointer/wheel/multitouch listeners attach here. */
1868
1969
  canvasRef: RefObject<HTMLCanvasElement | null>;
@@ -1988,6 +2089,15 @@ interface UseGestureDispatcherOptions {
1988
2089
  */
1989
2090
  getRuleCtx?: () => RuleCtx;
1990
2091
  }
2092
+ /**
2093
+ * Attach the input pipeline to a canvas: DOM pointer, wheel, keyboard and
2094
+ * multitouch listeners in, normalized input events out, routed through the
2095
+ * dispatcher to whichever action a binding names.
2096
+ *
2097
+ * Everything it needs beyond its options — the active tool, the dep registry —
2098
+ * comes from context, so it must be mounted inside `<SceneCanvas>`'s
2099
+ * providers.
2100
+ */
1991
2101
  declare function useGestureDispatcher(opts: UseGestureDispatcherOptions): void;
1992
2102
 
1993
2103
  /**
@@ -2031,6 +2141,8 @@ declare function computeWheelAction(state: WheelState, input: WheelInput, bounds
2031
2141
  */
2032
2142
  declare function clientToCanvas(canvas: HTMLCanvasElement, clientX: number, clientY: number): [number, number];
2033
2143
 
2144
+ /** Records recent pointer deltas and reports the current velocity, averaged
2145
+ * over the last 100ms — the throw speed a momentum decay starts from. */
2034
2146
  declare function useVelocityTracker(): {
2035
2147
  record(dx: number, dy: number, t: number): void;
2036
2148
  getVelocity(): {
@@ -2040,12 +2152,15 @@ declare function useVelocityTracker(): {
2040
2152
  reset(): void;
2041
2153
  };
2042
2154
 
2155
+ /** Per-axis limits on a view's position. Any side may be left open. */
2043
2156
  interface PanBounds {
2044
2157
  minX?: number;
2045
2158
  maxX?: number;
2046
2159
  minY?: number;
2047
2160
  maxY?: number;
2048
2161
  }
2162
+ /** How a decay should run: its starting velocity, how fast it slows, and what
2163
+ * happens if it reaches the pan limits. */
2049
2164
  interface DecayLoopConfig {
2050
2165
  velocity: {
2051
2166
  vx: number;
@@ -2071,11 +2186,15 @@ interface DecayLoopConfig {
2071
2186
  onTick: (dx: number, dy: number) => void;
2072
2187
  onEnd?: () => void;
2073
2188
  }
2189
+ /** A rAF loop that coasts a value to a stop under friction, reporting the
2190
+ * per-frame delta. What turns a released pan drag into momentum scrolling. */
2074
2191
  declare function useDecayLoop(): {
2075
2192
  start: (config: DecayLoopConfig) => void;
2076
2193
  cancel: () => void;
2077
2194
  };
2078
2195
 
2196
+ /** Animate the view from where it is to a target view — zoom-to-fit,
2197
+ * zoom-to-selection, and anything else that should glide rather than jump. */
2079
2198
  declare function useViewTween(setView: (v: View) => void): {
2080
2199
  animateTo: (from: View, to: View, opts?: {
2081
2200
  duration?: number;
@@ -2124,6 +2243,39 @@ declare function useViewAnimation(setView: (v: View) => void): {
2124
2243
  cancel: () => void;
2125
2244
  };
2126
2245
 
2246
+ /**
2247
+ * Build a `Tool<TScratch>` from a declarative `ToolDef<TScratch>`.
2248
+ *
2249
+ * This used to be a translator: `ToolDef` carried `initial` / `engaged` phase
2250
+ * tables of hit-keyed route handlers, and `defineTool` compiled them into the
2251
+ * imperative `pointer` / `drag` / `keyboard` / `wheel` handlers the
2252
+ * tool-routing dispatcher called. Both ends of that are gone — tools declare
2253
+ * `bindings` and the gesture dispatcher routes them — so what remains is
2254
+ * identity plumbing plus the id check and the cursor resolver.
2255
+ *
2256
+ * It stays a function rather than becoming a spread because the id validation
2257
+ * and the `initScratch` / `cursor` defaults are worth applying uniformly, and
2258
+ * because `Tool.def` gives reflection a handle on the authored form.
2259
+ */
2260
+ declare function defineTool<TScratch = void>(def: ToolDef<TScratch>): Tool<TScratch>;
2261
+
2262
+ /**
2263
+ * Define a tool that acts on the viewport rather than the scene.
2264
+ *
2265
+ * This used to do real work: `ViewportPhaseDef` was a narrowed `PhaseDef`
2266
+ * (no click routes, drag restricted to the function form), and the factory
2267
+ * lifted it back to the permissive shape before handing it to `defineTool`.
2268
+ * With phase tables gone there is no shape left to narrow — a viewport tool
2269
+ * declares `bindings` like any other, pointing at `viewport.*` actions.
2270
+ *
2271
+ * It survives as an authoring signal. `defineViewportTool` at the top of a
2272
+ * hook says "this tool moves the camera, not the drawing", which is worth
2273
+ * more than the type gymnastics it replaced.
2274
+ */
2275
+ declare function defineViewportTool<TScratch = void>(def: ViewportToolDef<TScratch>): Tool<TScratch>;
2276
+
2277
+ /** Options for `useTools`: which tools exist, which one starts active, and
2278
+ * which run continuously regardless of the active one. */
2127
2279
  interface UseToolsOptions {
2128
2280
  /** Initial active-slot tool id. Must exist in `registry`. */
2129
2281
  active: string;
@@ -2134,6 +2286,8 @@ interface UseToolsOptions {
2134
2286
  /** Always-on tools — listen continuously regardless of active slot. */
2135
2287
  ambient?: AnyTool[];
2136
2288
  }
2289
+ /** The tool registry's runtime surface: which tool is active, which is
2290
+ * temporarily held by a hotkey, and how to change either. */
2137
2291
  interface ToolsApi {
2138
2292
  /** Current active-slot tool id. */
2139
2293
  active: string;
@@ -2154,10 +2308,10 @@ interface ToolsApi {
2154
2308
  /** Returns true if a tool with the given id is in the registry or ambient list. */
2155
2309
  has(id: string): boolean;
2156
2310
  /** All overlay layers from currently-engaged tools (active slot, hotkey
2157
- * slot if engaged, all ambient slot tools). Filters out tools with no
2158
- * `overlay` field. Order: active, then hotkey (if engaged), then
2159
- * ambient (registration order). */
2160
- getActiveOverlays(): RenderLayer<unknown>[];
2311
+ * slot if engaged, all ambient slot tools) that declare `position`.
2312
+ * Filters out tools with no `overlay` field. Order: active, then hotkey
2313
+ * (if engaged), then ambient (registration order). */
2314
+ getActiveOverlays(position?: OverlayPosition): RenderLayer<unknown>[];
2161
2315
  }
2162
2316
  /**
2163
2317
  * Manages the active tool and hotkey slot.
@@ -2178,6 +2332,7 @@ interface ToolsApi {
2178
2332
  */
2179
2333
  declare function useTools(opts: UseToolsOptions): ToolsApi;
2180
2334
 
2335
+ /** Options for `useKeybindings`. */
2181
2336
  interface UseKeybindingsOptions {
2182
2337
  /** Skip all wiring. Useful for touch apps or test isolation. */
2183
2338
  disable?: boolean;
@@ -2196,8 +2351,12 @@ interface UseKeybindingsOptions {
2196
2351
  */
2197
2352
  isToolEligible?: (toolId: string) => boolean;
2198
2353
  }
2354
+ /** Wire the single-key tool-activation shortcuts (V, P, T, …) and Escape to
2355
+ * return to the default tool. Activation is gated on what the active mode
2356
+ * allows, so a key cannot reach a tool the palette greys out. */
2199
2357
  declare function useKeybindings(tools: ToolsApi, options?: UseKeybindingsOptions): void;
2200
2358
 
2359
+ /** The value types a built-in pref leaf can hold. */
2201
2360
  type ToolPrefKind = 'number' | 'boolean' | 'string' | 'enum' | 'color' | 'paint';
2202
2361
  interface ToolPrefBase<K extends string, Value> {
2203
2362
  kind: K;
@@ -2219,9 +2378,13 @@ interface ToolPrefBase<K extends string, Value> {
2219
2378
  * `pose.x` / `pose.y`). Purely presentational. */
2220
2379
  pair?: string;
2221
2380
  }
2381
+ /** How a schema-driven UI should present a number pref. */
2222
2382
  type ToolPrefNumberControl = 'input' | 'slider';
2383
+ /** How a schema-driven UI should present a boolean pref. */
2223
2384
  type ToolPrefBooleanControl = 'checkbox' | 'switch';
2385
+ /** How a schema-driven UI should present a string pref. */
2224
2386
  type ToolPrefStringControl = 'input' | 'textarea';
2387
+ /** How a schema-driven UI should present an enum pref. */
2225
2388
  type ToolPrefEnumControl = 'select' | 'radio';
2226
2389
  /** Display-unit conversion for number leaves whose stored value uses a
2227
2390
  * canonical unit the user shouldn't see (e.g. radians stored, degrees
@@ -2232,6 +2395,8 @@ interface ToolPrefNumberUnit {
2232
2395
  /** Shown after the input, e.g. `'°'`. */
2233
2396
  suffix?: string;
2234
2397
  }
2398
+ /** A numeric pref, optionally bounded and stepped, and optionally stored in a
2399
+ * different unit from the one shown. */
2235
2400
  interface ToolPrefNumber extends ToolPrefBase<'number', number> {
2236
2401
  min?: number;
2237
2402
  max?: number;
@@ -2239,12 +2404,15 @@ interface ToolPrefNumber extends ToolPrefBase<'number', number> {
2239
2404
  control?: ToolPrefNumberControl;
2240
2405
  unit?: ToolPrefNumberUnit;
2241
2406
  }
2407
+ /** An on/off pref. */
2242
2408
  interface ToolPrefBoolean extends ToolPrefBase<'boolean', boolean> {
2243
2409
  control?: ToolPrefBooleanControl;
2244
2410
  }
2411
+ /** A free-text pref. */
2245
2412
  interface ToolPrefString extends ToolPrefBase<'string', string> {
2246
2413
  control?: ToolPrefStringControl;
2247
2414
  }
2415
+ /** A pref with a fixed set of labeled choices. */
2248
2416
  interface ToolPrefEnum<T extends string = string> extends ToolPrefBase<'enum', T> {
2249
2417
  options: readonly {
2250
2418
  value: T;
@@ -2252,6 +2420,8 @@ interface ToolPrefEnum<T extends string = string> extends ToolPrefBase<'enum', T
2252
2420
  }[];
2253
2421
  control?: ToolPrefEnumControl;
2254
2422
  }
2423
+ /** A single color, stored as a hex string. For a value that may also be a
2424
+ * gradient or a pattern, use {@link ToolPrefPaint} instead. */
2255
2425
  interface ToolPrefColor extends ToolPrefBase<'color', string> {
2256
2426
  /** Value is `#rrggbb`, or `#rrggbbaa` when `alpha` is set (UIs then
2257
2427
  * offer an opacity control). */
@@ -2280,6 +2450,8 @@ interface ToolPrefPaint extends ToolPrefBase<'paint', unknown> {
2280
2450
  /** Offer an opacity control alongside the color. */
2281
2451
  alpha?: boolean;
2282
2452
  }
2453
+ /** One built-in pref leaf. `ToolPrefLeaf` widens this to include
2454
+ * app-defined kinds. */
2283
2455
  type ToolPref = ToolPrefNumber | ToolPrefBoolean | ToolPrefString | ToolPrefEnum | ToolPrefColor | ToolPrefPaint;
2284
2456
  /** Built-in or app-defined leaf. */
2285
2457
  type ToolPrefLeaf = ToolPref | ToolPrefCustom;
@@ -2290,6 +2462,8 @@ interface ToolPrefGroup {
2290
2462
  children: Record<string, ToolPrefLeaf | ToolPrefGroup>;
2291
2463
  }
2292
2464
 
2465
+ /** Options for `useSelectTool`: how a point resolves to nodes, how a click
2466
+ * chooses among them, and the appearance of the marquee. */
2293
2467
  interface UseSelectToolOptions<TPose> {
2294
2468
  /** Return ids of all objects whose painted body covers (worldX, worldY).
2295
2469
  * Order doesn't matter — the tool collapses parent/child overlap via
@@ -2383,6 +2557,8 @@ declare function useSelectTool<TNode extends {
2383
2557
  id: string;
2384
2558
  }, TPose>(adapter: SelectAdapter<TNode, TPose>, options: UseSelectToolOptions<TPose>): Tool<null>;
2385
2559
 
2560
+ /** Options for `useRotateTool` — mostly the placement and hit size of the
2561
+ * rotation handle. */
2386
2562
  interface UseRotateToolOptions<TNode extends {
2387
2563
  id: string;
2388
2564
  }, _TPose> {
@@ -2445,21 +2621,29 @@ declare function useRotateTool<TNode extends {
2445
2621
  * 2. **Parent/child collapse.** When `adapter.getParent` is present, drop
2446
2622
  * any id in the hit set that is an ancestor of another id in the hit
2447
2623
  * set. After the collapse, if exactly one id remains, return it.
2448
- * 3. **Tiebreaker.** Return the LAST id in the (collapsed) array. Demos
2449
- * that walk their scene forward (`Object.keys`, `for of items`) return
2450
- * bottom-first by convention; "last" gives the topmost. Demos that
2451
- * already z-sort with topmost first should pass an array of length 1
2452
- * (resolve before calling) this helper doesn't try to detect that.
2453
- *
2454
- * Pure sibling z-order without a parent/child relation is not resolved
2455
- * here yet see "Sibling z-order is unresolved in hit-picking" under
2456
- * Tools & gestures in `docs/TODO.md`. The shape it wants is an optional
2457
- * `getZIndex` / `compareZ` on the adapter below, composing with the
2458
- * parent/child collapse rather than replacing it.
2624
+ * 3. **Sibling z-order.** When the adapter exposes `compareZ` or `getZIndex`,
2625
+ * the survivors of the collapse are ranked by it and the highest wins.
2626
+ * This composes with step 2 rather than replacing it: a child still beats
2627
+ * its own ancestor regardless of what z the two report.
2628
+ * 4. **Tiebreaker.** Return the LAST id in the (collapsed) array. Scenes
2629
+ * walked forward (`renderOrder()`, `Object.keys`, `for of items`) come
2630
+ * back bottom-first by convention, so "last" gives the topmost. A caller
2631
+ * that z-sorts topmost-first and exposes neither z hook should resolve
2632
+ * before calling this helper doesn't try to detect that.
2459
2633
  */
2460
2634
  interface PickTopMostHitAdapter {
2461
2635
  getParent?: (id: string) => string | null;
2462
- }
2636
+ /** Paint depth of `id`; higher draws later, so higher wins a hit. Ids the
2637
+ * adapter doesn't know sort below every id it does. */
2638
+ getZIndex?: (id: string) => number | null | undefined;
2639
+ /** Full ordering, for scenes whose depth isn't a number (a path through a
2640
+ * tree, say). Negative when `a` paints below `b`. Takes precedence over
2641
+ * `getZIndex` when both are present. */
2642
+ compareZ?: (a: string, b: string) => number;
2643
+ }
2644
+ /** Reduce a set of hit ids to the single one a click should act on: drop any
2645
+ * id that is an ancestor of another in the set, then take the topmost of what
2646
+ * remains. */
2463
2647
  declare function pickTopMostHit(ids: readonly string[], adapter: PickTopMostHitAdapter | undefined | null): string | null;
2464
2648
 
2465
2649
  /** Hit-existing gate shared by the drag-insert tool hooks. When the consumer
@@ -2472,6 +2656,8 @@ declare function applyHitExistingGate(ctx: ToolCtx<unknown>, hitExisting: ((p: {
2472
2656
  y: number;
2473
2657
  }) => string | string[] | null) | undefined): boolean;
2474
2658
 
2659
+ /** Momentum settings for the hand tool: how quickly a flung view slows, when
2660
+ * it stops, and what happens at the pan limits. */
2475
2661
  interface InertiaConfig {
2476
2662
  friction?: number;
2477
2663
  minSpeed?: number;
@@ -2480,6 +2666,7 @@ interface InertiaConfig {
2480
2666
  /** View-coordinate limits for boundary clamping. Requires `boundary` to take effect. */
2481
2667
  bounds?: PanBounds;
2482
2668
  }
2669
+ /** Options for `useHandTool`. */
2483
2670
  interface UseHandToolOptions {
2484
2671
  inertia?: false | InertiaConfig;
2485
2672
  /**
@@ -2528,6 +2715,8 @@ declare function useHandTool(opts?: UseHandToolOptions): Tool<HandScratch | null
2528
2715
  * factories and hit gating belong on those deps, not on the tool. */
2529
2716
  declare function useTextTool(): Tool<undefined>;
2530
2717
 
2718
+ /** Options for `usePinchZoomTool`: the zoom limits, and whether it is wired
2719
+ * at all. */
2531
2720
  interface PinchZoomToolOpts {
2532
2721
  min?: number;
2533
2722
  max?: number;
@@ -2563,6 +2752,8 @@ interface PenAnchor$1 {
2563
2752
  * anchor's incoming handle is NOT mirrored from this one. */
2564
2753
  altBroken?: boolean;
2565
2754
  }
2755
+ /** One in-progress subpath of the pen tool: its anchors so far, and whether
2756
+ * the user has closed it. */
2566
2757
  interface PenSubpath {
2567
2758
  anchors: PenAnchor$1[];
2568
2759
  closed: boolean;
@@ -2599,6 +2790,8 @@ interface PenScratch {
2599
2790
  draggingHandleAt: number | null;
2600
2791
  closeHintActive: boolean;
2601
2792
  }
2793
+ /** Options for `usePenTool`: how a finished path becomes a pose, where it is
2794
+ * inserted, and when a closed subpath commits. */
2602
2795
  interface UsePenToolOptions<TPose> {
2603
2796
  /** Wrap a finished PolygonPath in the consumer's pose type. */
2604
2797
  wrapPath: (path: PolygonPath, opts: {
@@ -2693,12 +2886,17 @@ declare function useRectTool(): Tool<null>;
2693
2886
  */
2694
2887
  declare function useEllipseTool(): Tool<null>;
2695
2888
 
2889
+ /** Options for `useImageTool`. */
2696
2890
  interface UseImageToolOptions {
2697
2891
  /** Image source for inserted nodes — a URL, a `blob:` URL, or a
2698
2892
  * `data:image/…;base64,…` URI. Stored verbatim on each new node's
2699
2893
  * `data.image.src`. */
2700
2894
  src: string;
2701
2895
  label?: string;
2896
+ /** What the live drag paints. `'bitmap'` (default) previews the decoded
2897
+ * image inside the drag bounds, falling back to the outline until it
2898
+ * decodes; `'outline'` never draws the image. */
2899
+ preview?: 'bitmap' | 'outline';
2702
2900
  }
2703
2901
  /**
2704
2902
  * Drag-to-insert image tool. A drag-rect commits a leaf node with
@@ -2712,6 +2910,7 @@ interface UseImageToolOptions {
2712
2910
  */
2713
2911
  declare function useImageTool(options: UseImageToolOptions): Tool<null>;
2714
2912
 
2913
+ /** Options for `useEyedropperTool`. */
2715
2914
  interface UseEyedropperToolOptions {
2716
2915
  /** Called when the user picks a color. `null` means "no node was hit
2717
2916
  * with a color" — currently only reachable when `colorOf` returns null
@@ -2742,6 +2941,7 @@ interface UseEyedropperToolOptions {
2742
2941
  */
2743
2942
  declare function useEyedropperTool(opts: UseEyedropperToolOptions): Tool<null>;
2744
2943
 
2944
+ /** An endpoint of a line, in world coordinates. */
2745
2945
  interface LinePoint {
2746
2946
  x: number;
2747
2947
  y: number;
@@ -2767,6 +2967,7 @@ declare function useLineTool(): Tool<null>;
2767
2967
  * Consumers should import from here directly; `lassoSelect.ts`
2768
2968
  * re-exports the same symbol for back-compat. */
2769
2969
 
2970
+ /** Options for the `lasso-select` action. */
2770
2971
  interface UseLassoSelectOptions {
2771
2972
  behaviors?: LassoSelectBehavior[];
2772
2973
  /** When set, overrides any behavior's `defaultTransient`. */
@@ -2782,6 +2983,8 @@ interface UseLassoSelectOptions {
2782
2983
  debug?: DebugSink;
2783
2984
  }
2784
2985
 
2986
+ /** Options for `useLassoTool` — the lasso-select action's options plus the
2987
+ * tool's own hit mode and activation key. */
2785
2988
  interface UseLassoToolOptions extends Pick<UseLassoSelectOptions, 'behaviors' | 'transient' | 'label' | 'onGestureStart' | 'onGestureEnd' | 'minVertexSpacing' | 'debug'> {
2786
2989
  /** Hit mode forwarded to the default `selectFromLasso` behavior when no
2787
2990
  * explicit `behaviors` array is passed. Default 'intersect'. */
@@ -2800,10 +3003,12 @@ interface UseLassoToolOptions extends Pick<UseLassoSelectOptions, 'behaviors' |
2800
3003
  * `lassoSelectAction` (see `src/interactions/actions/defaults/lassoSelect.ts`). */
2801
3004
  declare function useLassoTool(_adapter: LassoSelectAdapter, options?: UseLassoToolOptions): Tool<undefined>;
2802
3005
 
3006
+ /** A point in world coordinates. */
2803
3007
  interface PolygonPoint {
2804
3008
  x: number;
2805
3009
  y: number;
2806
3010
  }
3011
+ /** Options for `usePolygonTool`. */
2807
3012
  interface UsePolygonToolOptions {
2808
3013
  label?: string;
2809
3014
  /** Initial side count. Side count persists across gestures
@@ -2828,10 +3033,12 @@ declare function usePolygonTool<TNode extends {
2828
3033
  id: string;
2829
3034
  }>(options?: UsePolygonToolOptions): Tool<null>;
2830
3035
 
3036
+ /** A point in world coordinates. */
2831
3037
  interface StarPoint {
2832
3038
  x: number;
2833
3039
  y: number;
2834
3040
  }
3041
+ /** Options for `useStarTool`. */
2835
3042
  interface UseStarToolOptions {
2836
3043
  label?: string;
2837
3044
  /** Initial point count. Persists across gestures (Illustrator
@@ -3233,6 +3440,9 @@ interface HierarchicalAdapter<TNode, TPose> {
3233
3440
  * `viewportRegistered` is false and SceneCanvas omits `hand` from the registry.
3234
3441
  */
3235
3442
 
3443
+ /** Which viewport interactions `<SceneCanvas>` wires up — pan inertia, pinch
3444
+ * zoom, wheel pan, wheel and keyboard zoom. Each may be switched off with
3445
+ * `false` or tuned with an options object. */
3236
3446
  interface ViewportConfig {
3237
3447
  inertia?: boolean | {
3238
3448
  friction?: number;
@@ -3320,9 +3530,15 @@ type SelectionOverlaySlotConfig<TPose> = Omit<SelectionOverlayLayerOpts<TPose>,
3320
3530
  type StandardSlotConfig<TNode extends {
3321
3531
  id: string;
3322
3532
  }, TPose> = GridSlotConfig | SceneSlotConfig<TNode, TPose> | SelectionOverlaySlotConfig<TPose>;
3533
+ /** What may fill one of the canvas's named layer slots: a config the canvas
3534
+ * builds the layer from, a pre-built layer, or `null` to leave the slot
3535
+ * empty. */
3323
3536
  type LayerSlotValue<TNode extends {
3324
3537
  id: string;
3325
3538
  }, TPose> = StandardSlotConfig<TNode, TPose> | CustomLayerEntry | null;
3539
+ /** The canvas's render stack, as named slots. The standard slots (grid,
3540
+ * scene, selection overlay, cell highlight) can be configured, replaced with
3541
+ * a layer of your own, or switched off; further keys add custom layers. */
3326
3542
  type LayersMap<TNode extends {
3327
3543
  id: string;
3328
3544
  }, TPose> = {
@@ -3707,6 +3923,7 @@ interface CanvasHelpers<TPose> {
3707
3923
  getIsVisible(): (id: string) => boolean;
3708
3924
  }
3709
3925
 
3926
+ /** Which of a node's two per-anchor color arrays an override applies to. */
3710
3927
  type VertexColorChannel = 'fill' | 'stroke';
3711
3928
  /** Function-form override: receives the consumer-supplied base color
3712
3929
  * array and the current animation timestamp (ms, from the animator's
@@ -3730,7 +3947,12 @@ declare class ColorOverrideRegistry {
3730
3947
  version(): number;
3731
3948
  }
3732
3949
 
3950
+ /** An easing curve: maps normalized progress `t ∈ [0, 1]` to eased progress.
3951
+ * Curves may leave the 0–1 range in the middle (back, elastic) but should
3952
+ * pass through 0 at 0 and 1 at 1. */
3733
3953
  type EasingFn = (t: number) => number;
3954
+ /** Blends two `T` values at eased progress `t`. Called once per frame; see
3955
+ * {@link InterpolatorFactory} when the blend has setup worth hoisting. */
3734
3956
  type Interpolate<T> = (from: T, to: T, t: number) => T;
3735
3957
  /** Factory interpolator: built ONCE at tween start with (from, to), the returned
3736
3958
  * function is called with `t ∈ [0, 1]` each frame. Use for interpolators with
@@ -3738,12 +3960,17 @@ type Interpolate<T> = (from: T, to: T, t: number) => T;
3738
3960
  * shape exactly. For cheap interpolations the per-tick `Interpolate<T>` form is
3739
3961
  * fine; this is the escape hatch when setup-per-tick is wasteful. */
3740
3962
  type InterpolatorFactory<T> = (from: T, to: T) => (t: number) => T;
3963
+ /** A spring's physical parameters. Higher stiffness settles faster, higher
3964
+ * damping overshoots less, higher mass makes both sluggish. */
3741
3965
  interface SpringPreset {
3742
3966
  stiffness: number;
3743
3967
  damping: number;
3744
3968
  mass: number;
3745
3969
  }
3970
+ /** One of the tunings in `SPRING_PRESETS`. */
3746
3971
  type SpringPresetName = 'gentle' | 'wobbly' | 'stiff' | 'slow';
3972
+ /** A running animation. Cancel it, or bend its time — pausing and time-scaling
3973
+ * act on this animation's own virtual clock, independent of the animator's. */
3747
3974
  interface AnimationHandle {
3748
3975
  /** Monotonic id assigned by the animator. */
3749
3976
  id: number;
@@ -3758,6 +3985,9 @@ interface AnimationHandle {
3758
3985
  /** True iff this handle is currently paused. */
3759
3986
  isPaused(): boolean;
3760
3987
  }
3988
+ /** A duration-based animation from `from` to `to` over `ms`, shaped by an
3989
+ * easing curve. Reach for a spring instead when the motion should respond to
3990
+ * where the value already is rather than restart from a fixed duration. */
3761
3991
  interface TweenOptions<T> {
3762
3992
  from: T;
3763
3993
  to: T;
@@ -3776,6 +4006,9 @@ interface TweenOptions<T> {
3776
4006
  /** Any new animation passed the same cancelKey cancels the prior one in flight. */
3777
4007
  cancelKey?: string;
3778
4008
  }
4009
+ /** A spring animation: runs until the value settles on `to` rather than for a
4010
+ * set duration, so it absorbs an initial velocity naturally. Non-numeric `T`
4011
+ * needs the four vector helpers. */
3779
4012
  interface SpringOptions<T> {
3780
4013
  from: T;
3781
4014
  to: T;
@@ -3797,6 +4030,9 @@ interface SpringOptions<T> {
3797
4030
  onDone?: () => void;
3798
4031
  cancelKey?: string;
3799
4032
  }
4033
+ /** Spring and decay as one animation. With a `to`, a spring pulls toward it;
4034
+ * with `to: null`, the value coasts on its velocity. Either can become the
4035
+ * other mid-flight through the handle. */
3800
4036
  interface PhysicsOptions<T> {
3801
4037
  from: T;
3802
4038
  /** Target. `null` ⇒ no spring force (decay-mode). */
@@ -3817,12 +4053,16 @@ interface PhysicsOptions<T> {
3817
4053
  onDone?: () => void;
3818
4054
  cancelKey?: string;
3819
4055
  }
4056
+ /** An `AnimationHandle` that can also be steered while it runs — the point of
4057
+ * the physics primitive. */
3820
4058
  interface PhysicsHandle<T = unknown> extends AnimationHandle {
3821
4059
  /** Retarget mid-flight. `null` ⇒ switch to decay-mode (no spring force). */
3822
4060
  setTarget(to: T | null): void;
3823
4061
  /** Replace the current velocity in T-units per second. */
3824
4062
  setVelocity(v: T): void;
3825
4063
  }
4064
+ /** Momentum: coast from `from` at `velocity`, slowing by `friction` each
4065
+ * second until below `threshold`. What a flick-to-pan leaves behind. */
3826
4066
  interface DecayOptions<T> {
3827
4067
  from: T;
3828
4068
  velocity: T;
@@ -3837,6 +4077,8 @@ interface DecayOptions<T> {
3837
4077
  onDone?: () => void;
3838
4078
  cancelKey?: string;
3839
4079
  }
4080
+ /** Options for `useAnimator`. Everything here is an injection seam for tests;
4081
+ * the defaults are the real clock, rAF, and `setTimeout`. */
3840
4082
  interface UseAnimatorOptions {
3841
4083
  /** Optional clock injection for tests. Returns ms since some epoch. */
3842
4084
  now?: () => number;
@@ -3849,6 +4091,15 @@ interface UseAnimatorOptions {
3849
4091
  /** Companion to `setTimer`. Defaults to global `clearTimeout`. */
3850
4092
  clearTimer?: (handle: unknown) => void;
3851
4093
  }
4094
+ /**
4095
+ * Owns every running animation on a canvas and drives them from one rAF loop.
4096
+ * Beyond the primitives (`tween`, `spring`, `decay`, `physics`) it offers
4097
+ * composition — `loop`, `stagger` — and bulk control by handle, by cancel-key,
4098
+ * or over everything at once.
4099
+ *
4100
+ * An animator does not know about the scene: animations report values through
4101
+ * `onTick` and the caller decides what to do with them.
4102
+ */
3852
4103
  interface Animator {
3853
4104
  tween<T>(opts: TweenOptions<T>): AnimationHandle;
3854
4105
  spring<T>(opts: SpringOptions<T>): AnimationHandle;
@@ -3952,6 +4203,7 @@ interface Animator {
3952
4203
  */
3953
4204
  keepAlive(): () => void;
3954
4205
  }
4206
+ /** Options for `Animator.loop`. */
3955
4207
  interface LoopOptions {
3956
4208
  /** Maximum number of iterations. Default Infinity. */
3957
4209
  count?: number;
@@ -3968,15 +4220,20 @@ interface StaggerOptions {
3968
4220
  * any timer or child is alive. */
3969
4221
  cancelKey?: string;
3970
4222
  }
4223
+ /** Produces one iteration of a loop. Must arrange for `next` to be called when
4224
+ * the animation it returns finishes, or the loop stalls after one pass. */
3971
4225
  type LoopFactory = (iteration: number, next: () => void) => AnimationHandle;
3972
4226
  /** Per-index delay schedule. Number ⇒ `index * delay` ms. Function ⇒ caller
3973
4227
  * decides the absolute delay for each index (e.g. `i => i * i * 30`). */
3974
4228
  type StaggerDelay = number | ((index: number) => number);
4229
+ /** Produces the animation for one staggered item. */
3975
4230
  type StaggerFactory<TItem> = (item: TItem, index: number) => AnimationHandle;
3976
4231
  /** A `T` value or a function that derives one from the per-item context. Used
3977
4232
  * by the fluent builder methods (`.tween`, `.springPose`) so each item can
3978
4233
  * vary an option (e.g. `to: (_item, i) => (i + 1) * 10`). */
3979
4234
  type StaggerPerItem<T, TItem> = T | ((item: TItem, index: number) => T);
4235
+ /** Options for the stagger builder's `.tween`: a tween per item, where
4236
+ * `from`, `to` and `ms` may each vary by item. */
3980
4237
  interface StaggerTweenOptions<T, TItem> {
3981
4238
  from: StaggerPerItem<T, TItem>;
3982
4239
  to: StaggerPerItem<T, TItem>;
@@ -3986,6 +4243,8 @@ interface StaggerTweenOptions<T, TItem> {
3986
4243
  onTick: (value: T, item: TItem, index: number) => void;
3987
4244
  onDone?: (item: TItem, index: number) => void;
3988
4245
  }
4246
+ /** Options for the stagger builder's `.springPose`: the spring tuning, and
4247
+ * whether each item's settle is recorded as an undoable op. */
3989
4248
  interface StaggerSpringPoseOptions<TPose> {
3990
4249
  preset?: SpringPresetName;
3991
4250
  stiffness?: number;
@@ -3995,6 +4254,8 @@ interface StaggerSpringPoseOptions<TPose> {
3995
4254
  recordOp?: boolean;
3996
4255
  opLabel?: string;
3997
4256
  }
4257
+ /** Fluent form of `Animator.stagger`: pick what to run per item after the
4258
+ * items and the delay schedule are already fixed. */
3998
4259
  interface StaggerBuilder<TItem> {
3999
4260
  /** Run an arbitrary per-item factory. */
4000
4261
  each(factory: StaggerFactory<TItem>): AnimationHandle;
@@ -4009,6 +4270,8 @@ interface StaggerBuilder<TItem> {
4009
4270
  id: string;
4010
4271
  }, TPose>, poseFn: (item: TItem, index: number) => TPose, opts?: StaggerSpringPoseOptions<TPose>): AnimationHandle;
4011
4272
  }
4273
+ /** Options for `Animator.tweenLoop` — a tween's options plus how each
4274
+ * iteration relates to the last. */
4012
4275
  interface TweenLoopOptions<T> {
4013
4276
  from: T;
4014
4277
  to: T;
@@ -4042,6 +4305,10 @@ interface ReorderAdapter {
4042
4305
  getChildren(parentId: string | null): string[];
4043
4306
  setChildOrder(parentId: string | null, ids: string[]): void;
4044
4307
  }
4308
+ /** Everything the interaction layer can ask of a scene, as one type: the
4309
+ * move, resize, rotate, selection, layer and reorder contracts combined.
4310
+ * `<SceneCanvas>` synthesizes one of these, which is why most consumers never
4311
+ * touch an adapter directly. */
4045
4312
  type SceneCanvasAdapter<TData, TLayer extends string, TPose> = MoveAdapter<Node$1<TData, TLayer, TPose>, TPose> & ResizeAdapter<Node$1<TData, TLayer, TPose>, TPose> & RotateAdapter<Node$1<TData, TLayer, TPose>, TPose> & AreaSelectAdapter & LassoSelectAdapter & LayerEnumerableAdapter<TLayer> & ReorderAdapter & Partial<InsertAdapter<Node$1<TData, TLayer, TPose>>> & {
4046
4313
  getParent(id: string): string | null;
4047
4314
  getSelection(): string[];
@@ -4102,6 +4369,9 @@ interface SceneToAdapterOptions<TData, TLayer extends string, TPose> {
4102
4369
  * primitive — containers move but their descendants don't follow. */
4103
4370
  cascadeContainerPose?: 'rect' | ((pose: TPose, dx: number, dy: number) => TPose);
4104
4371
  }
4372
+ /** Derive the adapter for a scene. Reads go straight to the scene; writes are
4373
+ * ops applied through its history, so anything done through the adapter is
4374
+ * undoable. */
4105
4375
  declare function sceneToAdapter<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>, options?: SceneToAdapterOptions<TData, TLayer, TPose>): SceneCanvasAdapter<TData, TLayer, TPose>;
4106
4376
  /**
4107
4377
  * React-hook wrapper around `sceneToAdapter`. Memoizes on `scene`,
@@ -4122,11 +4392,14 @@ declare function useSceneAdapter<TData, TLayer extends string, TPose>(scene: Sce
4122
4392
  * Consumers should import from here directly; `rotate.ts` re-exports the
4123
4393
  * same symbols for back-compat. */
4124
4394
 
4395
+ /** Projects a pose to and from a rotated bounding box, so the rotate action
4396
+ * can work on pose shapes that carry rotation differently. */
4125
4397
  interface RotateGeometry<TPose> {
4126
4398
  getRotatedBounds(pose: TPose): RotatedPose;
4127
4399
  /** Write a new rotation back into the pose; bounds stay the same. */
4128
4400
  withRotation(pose: TPose, rotation: number): TPose;
4129
4401
  }
4402
+ /** Options for the `rotate` action. */
4130
4403
  interface UseRotateOptions<TPose> {
4131
4404
  /** Behaviors are typed against the pose shape; the kit ships none yet
4132
4405
  * (rotation snap behaviors are deferred). For non-rect TPose, behaviors
@@ -4238,6 +4511,8 @@ interface OpenFilePickerOptions {
4238
4511
  /** Allow multi-select. Default false. */
4239
4512
  multiple?: boolean;
4240
4513
  }
4514
+ /** Show the browser's file picker and resolve with what the user chose —
4515
+ * empty when they cancel. Must be called from a user gesture. */
4241
4516
  declare function openFilePicker(opts?: OpenFilePickerOptions): Promise<File[]>;
4242
4517
 
4243
4518
  /**
@@ -4286,6 +4561,9 @@ interface NodeRouting {
4286
4561
  /** Enumerate registered kinds in registration order. */
4287
4562
  list(): readonly NodeRoutingEntry[];
4288
4563
  }
4564
+ /** Build a registry of per-node-kind routing entries, which decide how a node
4565
+ * kind is drawn, hit-tested and serialized. Registering a duplicate kind name
4566
+ * throws. */
4289
4567
  declare function createNodeRouting(): NodeRouting;
4290
4568
 
4291
4569
  /**
@@ -4352,6 +4630,9 @@ interface NodePaintCtx {
4352
4630
  * load-status error variant). */
4353
4631
  resolveImage?: (node: Node$1<unknown, string, unknown>) => ImageBitmap | undefined;
4354
4632
  }
4633
+ /** A painter for one kind of node: which nodes it claims, and the draw
4634
+ * commands it emits for them. Registering one is how a consumer teaches the
4635
+ * default renderer to draw its own node kinds. */
4355
4636
  interface NodeShapeEntry<TData = unknown, TPose = unknown> {
4356
4637
  /** Stable identifier — used for unregistration and debugging. Pick
4357
4638
  * something descriptive: `'kit:text'`, `'app:image'`, etc. */
@@ -4396,6 +4677,7 @@ interface NodeInk {
4396
4677
  /** Stroke width in world units. `0` for no stroke. */
4397
4678
  strokeWidth: number;
4398
4679
  }
4680
+ /** Options for `registerNodeShape`. */
4399
4681
  interface RegisterNodeShapeOptions {
4400
4682
  /** `'high'` puts the painter ahead of all normally-registered ones (so
4401
4683
  * it can win over a kit built-in). `'normal'` appends at the end. */
@@ -4464,6 +4746,20 @@ declare function shapeCoversPoint<TData, TPose>(node: Node$1<TData, string, TPos
4464
4746
  * first, then `'normal'`. Useful for debugging which painter handles a
4465
4747
  * given node. */
4466
4748
  declare function getNodeShapes(): readonly NodeShapeEntry[];
4749
+ /**
4750
+ * What a node's `data.fill` means to the built-in painters.
4751
+ *
4752
+ * A string is a color, `'none'` skips the fill, and an object is a
4753
+ * {@link FillStyle} used as-is — which is how a gradient or a pattern reaches
4754
+ * the renderer without a consumer registering a painter of its own. The
4755
+ * renderer has taken every `FillStyle` variant since the paint model landed;
4756
+ * only these two painters were narrower than it.
4757
+ *
4758
+ * `undefined` falls back to `data.color`, then to a default fill — but only
4759
+ * when there is no stroke, since a stroke-only path (pencil) should not
4760
+ * acquire one.
4761
+ */
4762
+ type NodeFill = string | FillStyle;
4467
4763
 
4468
4764
  /**
4469
4765
  * `defaultDrawOne` — the kit's default per-node draw function.
@@ -4491,6 +4787,9 @@ declare function getNodeShapes(): readonly NodeShapeEntry[];
4491
4787
  * overlay since their content already shows.
4492
4788
  */
4493
4789
 
4790
+ /** Paint one node the way the kit does by default: dispatch to the first
4791
+ * registered node-shape painter that matches, then draw its `data.label` on
4792
+ * top when it has one. Consumers replace or wrap this via `drawOne`. */
4494
4793
  declare function defaultDrawOne<TData, TLayer extends string, TPose>(node: Node$1<TData, TLayer, TPose>, pose: TPose, ctx?: NodePaintCtx): DrawCommand[];
4495
4794
 
4496
4795
  /** Default size in CSS pixels for selection corner-handles AND their
@@ -4520,6 +4819,9 @@ interface SceneCanvasHit {
4520
4819
  id: string;
4521
4820
  kind: string;
4522
4821
  }
4822
+ /** Props for `<SceneCanvas>`. Most are optional: a scene is the only thing it
4823
+ * truly needs, and everything else — tools, layers, selection handling,
4824
+ * layouts, animation — layers onto sensible defaults. */
4523
4825
  type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<Node$1<TData, TLayer, TPose>, TPose>, 'adapter' | 'moveOptions' | 'resizeOptions' | 'rotateOptions' | 'snap' | 'pickEvery' | 'boundsOf' | 'handleHitRadius' | 'selection' | 'selectionOptions' | 'tools' | 'geometry' | 'layers' | 'onBackgroundClick' | 'getIsVisible'> & {
4524
4826
  /** A `Scene` (typically from `useScene`) — or a `SerializedScene`
4525
4827
  * JSON object, which SceneCanvas bakes into a Scene internally on
@@ -5000,10 +5302,24 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<No
5000
5302
  onDoubleClick?: (hit: SceneCanvasHit | null) => void;
5001
5303
  };
5002
5304
  declare function SceneCanvasInner<TData, TLayer extends string, TPose>(props: SceneCanvasProps<TData, TLayer, TPose>, ref: React__default.ForwardedRef<SceneCanvasApi>): react_jsx_runtime.JSX.Element;
5305
+ /**
5306
+ * The canvas component: renders a `Scene` and wires the interaction stack
5307
+ * around it.
5308
+ *
5309
+ * Mounting one gives you the whole default kit — an adapter synthesized from
5310
+ * the scene, the built-in tools and actions, selection, undo, and the gesture
5311
+ * dispatcher — with each piece replaceable through props. This is the intended
5312
+ * entry point; the lower-level primitives it composes are not part of the
5313
+ * public surface.
5314
+ *
5315
+ * Its ref exposes a `SceneCanvasApi` for the imperative operations that do not
5316
+ * fit a prop (view control, hit queries, redraw requests).
5317
+ */
5003
5318
  declare const SceneCanvas: <TData, TLayer extends string, TPose>(props: SceneCanvasProps<TData, TLayer, TPose> & {
5004
5319
  ref?: React__default.Ref<SceneCanvasApi>;
5005
5320
  }) => ReturnType<typeof SceneCanvasInner>;
5006
5321
 
5322
+ /** Props for `<CursorCoordsHud>`. */
5007
5323
  interface CursorCoordsHudProps {
5008
5324
  canvasRef: React.RefObject<HTMLCanvasElement | null>;
5009
5325
  viewRef: React.RefObject<View>;
@@ -5013,8 +5329,11 @@ interface CursorCoordsHudProps {
5013
5329
  right?: number;
5014
5330
  };
5015
5331
  }
5332
+ /** Debug overlay showing the pointer's client and world coordinates and the
5333
+ * current frame rate, pinned to the canvas's top-right corner. */
5016
5334
  declare function CursorCoordsHud({ canvasRef, viewRef, offset }: CursorCoordsHudProps): react_jsx_runtime.JSX.Element | null;
5017
5335
 
5336
+ /** Props for `<PickHud>`. */
5018
5337
  interface PickHudProps {
5019
5338
  canvasRef: React.RefObject<HTMLCanvasElement | null>;
5020
5339
  viewRef: React.RefObject<View>;
@@ -5030,6 +5349,8 @@ interface PickHudProps {
5030
5349
  right?: number;
5031
5350
  };
5032
5351
  }
5352
+ /** Debug overlay listing every node under the pointer, with the one a click
5353
+ * would actually select shown in bold. */
5033
5354
  declare function PickHud({ canvasRef, viewRef, pickEvery, pickBest, offset }: PickHudProps): react_jsx_runtime.JSX.Element | null;
5034
5355
 
5035
5356
  /**
@@ -5056,6 +5377,8 @@ interface ImageNodeData {
5056
5377
  opacity?: number;
5057
5378
  };
5058
5379
  }
5380
+ /** Where an image is in its load: never requested, in flight, decoded, or
5381
+ * failed. Renderers paint a placeholder for anything but `'ready'`. */
5059
5382
  type ImageStatus = 'idle' | 'loading' | 'ready' | 'error';
5060
5383
  /** Synchronous read. Returns the decoded bitmap when ready; otherwise returns
5061
5384
  * `undefined` and lazily starts a de-duped async load for `src`. */
@@ -5151,6 +5474,9 @@ interface NodeProperties {
5151
5474
  /** Enumerate registered kinds in registration order. */
5152
5475
  list(): readonly NodePropertiesEntry[];
5153
5476
  }
5477
+ /** Build a registry of per-node-kind property descriptors, which schema-driven
5478
+ * property panels read to know what a node exposes. Registering a duplicate
5479
+ * kind name throws. */
5154
5480
  declare function createNodeProperties(): NodeProperties;
5155
5481
 
5156
5482
  /** Radians-stored / degrees-shown conversion for `pose.rotation` leaves.
@@ -5202,6 +5528,8 @@ declare const inferredNodeProperties: readonly NodePropertiesEntry[];
5202
5528
  * group level (see `renderSceneToCanvas`'s implementation).
5203
5529
  */
5204
5530
  type SceneViewDrawOne<TData, TLayer extends string, TPose> = (node: Node$1<TData, TLayer, TPose>, pose: TPose, view: View) => DrawCommand[];
5531
+ /** What to draw into an existing canvas: the scene, the view, and the same
5532
+ * painting hooks `<SceneCanvas>` takes. */
5205
5533
  interface RenderSceneToCanvasArgs<TData, TLayer extends string, TPose> {
5206
5534
  /** The DOM canvas to paint into. The helper owns its WebGL2 context: the
5207
5535
  * first call on a given canvas creates a renderer and stashes it; subsequent
@@ -5274,6 +5602,7 @@ declare function buildSceneViewCommands<TData, TLayer extends string, TPose>(sce
5274
5602
  */
5275
5603
  declare function renderSceneToCanvas<TData, TLayer extends string, TPose>(args: RenderSceneToCanvasArgs<TData, TLayer, TPose>): void;
5276
5604
 
5605
+ /** Props for `<SceneViewCanvas>`. */
5277
5606
  interface SceneViewCanvasProps<TData, TLayer extends string, TPose> {
5278
5607
  /** Scene to render. Must be the same `Scene` instance passed to whoever
5279
5608
  * is mutating it; the component subscribes to its version stream and
@@ -5318,6 +5647,9 @@ declare function SceneViewCanvasInner<TData, TLayer extends string, TPose>(props
5318
5647
  */
5319
5648
  declare const SceneViewCanvas: typeof SceneViewCanvasInner;
5320
5649
 
5650
+ /** Build a scene outside React. `useScene` is the usual entry point; reach for
5651
+ * this in tests, in headless rendering, or wherever a scene must outlive a
5652
+ * component. Throws if no system layers are declared. */
5321
5653
  declare function createScene<TData, TLayer extends string, TPose = RectPose>(options: UseSceneOptions<TData, TLayer, TPose>): Scene<TData, TLayer, TPose>;
5322
5654
  /** Reconstruct a Scene from a JSON snapshot produced by `scene.toJSON()`.
5323
5655
  * Function fields (e.g., `clipFromPose`) are resolved by string key via the
@@ -5361,6 +5693,8 @@ type DefaultLayer = typeof DEFAULT_LAYER;
5361
5693
  declare function useScene<TItem extends {
5362
5694
  id: string;
5363
5695
  }>(options: UseSceneTrivialOptions<TItem>): Scene<TItem, DefaultLayer, TItem>;
5696
+ /** The full call shape: explicit layers, initial nodes, custom ops, and
5697
+ * history configuration. */
5364
5698
  declare function useScene<TData, TLayer extends string, TPose = RectPose>(options: UseSceneOptions<TData, TLayer, TPose>): Scene<TData, TLayer, TPose>;
5365
5699
 
5366
5700
  /**
@@ -5440,6 +5774,7 @@ declare function computeFitView<TData, TLayer extends string, TPose>(scene: Scen
5440
5774
  */
5441
5775
  declare function computeIndicatorCommand(mainView: View, mainViewDims: ViewportDims, style?: IndicatorStyle): PathDrawCommand;
5442
5776
 
5777
+ /** Props for `<MinimapCanvas>`. */
5443
5778
  interface MinimapCanvasProps<TData, TLayer extends string, TPose> {
5444
5779
  /** Same scene the main canvas is rendering. */
5445
5780
  scene: Scene<TData, TLayer, TPose>;
@@ -5507,6 +5842,7 @@ interface HeadlessCanvasLike {
5507
5842
  height: number;
5508
5843
  getContext(contextId: 'webgl2', options?: WebGLContextAttributes): unknown;
5509
5844
  }
5845
+ /** What to render, at what resolution, and with which quality settings. */
5510
5846
  interface RenderSceneToPixelsArgs<TData, TLayer extends string, TPose> {
5511
5847
  scene: Scene<TData, TLayer, TPose>;
5512
5848
  /** Scene-space rect to render (origin + size in scene units). Output pixel
@@ -5550,6 +5886,8 @@ interface RenderSceneToPixelsArgs<TData, TLayer extends string, TPose> {
5550
5886
  * `flattenTolerance`. Explicitly passing 0.25 is always valid. */
5551
5887
  flattenTolerancePx?: number;
5552
5888
  }
5889
+ /** The result of planning a headless render: how big the output is, the view
5890
+ * that maps the source rect onto it, and the commands to draw. */
5553
5891
  interface PixelRenderPlan {
5554
5892
  width: number;
5555
5893
  height: number;
@@ -5560,6 +5898,15 @@ interface PixelRenderPlan {
5560
5898
  * anisotropic `View`, and the full command list (background + view-wrapped
5561
5899
  * scene). Exported for tests and for callers targeting their own renderer. */
5562
5900
  declare function planPixelRender<TData, TLayer extends string, TPose>(args: Omit<RenderSceneToPixelsArgs<TData, TLayer, TPose>, 'gl' | 'createCanvas' | 'flattenTolerancePx'>): PixelRenderPlan;
5901
+ /**
5902
+ * Render part of a scene to raw pixels, with no canvas mounted and no React
5903
+ * involved — for export, thumbnails, print, and pixel-diff tests.
5904
+ *
5905
+ * Output size follows from the source rect and the requested scale, so
5906
+ * rendering the same region at a higher scale is a real resolution increase
5907
+ * rather than an upscale: curves are re-flattened and glyphs re-rasterized for
5908
+ * the output resolution.
5909
+ */
5563
5910
  declare function renderSceneToPixels<TData, TLayer extends string, TPose>(args: RenderSceneToPixelsArgs<TData, TLayer, TPose>): RasterImage;
5564
5911
 
5565
5912
  /**
@@ -5636,22 +5983,36 @@ declare function SelectionContextProviderIfRoot({ children, }: {
5636
5983
  */
5637
5984
  declare function usePublishSelection(ids: readonly NodeId[], kinds?: readonly (string | undefined)[]): void;
5638
5985
 
5986
+ /** Mount a `<PointerContextProvider>` only when none is already in scope. */
5639
5987
  declare function PointerProviderIfRoot({ children }: {
5640
5988
  children: ReactNode;
5641
5989
  }): react_jsx_runtime.JSX.Element;
5642
5990
 
5991
+ /** Mount an `<ActionsProvider>` only when none is already in scope, so
5992
+ * nesting canvases share one action registry instead of shadowing it. */
5643
5993
  declare function ActionsProviderIfRoot({ children }: {
5644
5994
  children: ReactNode;
5645
5995
  }): react_jsx_runtime.JSX.Element;
5646
5996
 
5997
+ /** Mount a `<DepRegistryProvider>` only when none is already in scope, so a
5998
+ * consumer's dep sources are not shadowed by a nested canvas. */
5647
5999
  declare function DepRegistryProviderIfRoot({ children }: {
5648
6000
  children: ReactNode;
5649
6001
  }): react_jsx_runtime.JSX.Element;
5650
6002
 
6003
+ /**
6004
+ * Mounts every kit-wide provider at once — deps, actions, active tool,
6005
+ * selection and pointer — each only if one is not already in scope.
6006
+ *
6007
+ * `<SceneCanvas>` does this for itself, so this is for the case where kit
6008
+ * state has to be shared by things outside a canvas: a toolbar, a property
6009
+ * panel, or two canvases that should agree on the selection.
6010
+ */
5651
6011
  declare function WeaselProvider({ children }: {
5652
6012
  children: ReactNode;
5653
6013
  }): react_jsx_runtime.JSX.Element;
5654
6014
 
6015
+ /** Options for `useCanvasFocus`. */
5655
6016
  interface UseCanvasFocusOptions {
5656
6017
  /** Initial focus state. Default `false` — handles hidden until first click. */
5657
6018
  initial?: boolean;
@@ -5659,6 +6020,8 @@ interface UseCanvasFocusOptions {
5659
6020
  * document tab order). Set to `-1` for programmatic-only focus. */
5660
6021
  tabIndex?: number;
5661
6022
  }
6023
+ /** What `useCanvasFocus` hands back: the focus state, the props that
6024
+ * maintain it, and a getter for reading it from per-frame code. */
5662
6025
  interface CanvasFocusReturn {
5663
6026
  /** Live boolean — true when the element has DOM focus. Triggers re-renders
5664
6027
  * when the focus state changes (set via React state). */
@@ -5678,6 +6041,8 @@ interface CanvasFocusReturn {
5678
6041
  /** Imperative focus / blur. Useful for tests and programmatic control. */
5679
6042
  setFocused: (next: boolean) => void;
5680
6043
  }
6044
+ /** Track DOM focus on the canvas, so chrome that should only show while the
6045
+ * canvas is focused can be gated on it. */
5681
6046
  declare function useCanvasFocus(options?: UseCanvasFocusOptions): CanvasFocusReturn;
5682
6047
 
5683
6048
  /**
@@ -5691,6 +6056,7 @@ declare function useCanvasFocus(options?: UseCanvasFocusOptions): CanvasFocusRet
5691
6056
  * construction time.
5692
6057
  */
5693
6058
 
6059
+ /** Options for `gateLayer`. */
5694
6060
  interface GateLayerOptions<TData> {
5695
6061
  /** The wrapped layer. Its `id`, `label`, `defaultVisible`, `alwaysOn`,
5696
6062
  * `space` flow through unchanged. */
@@ -5698,6 +6064,9 @@ interface GateLayerOptions<TData> {
5698
6064
  /** Returns `true` to render the layer this frame, `false` to skip. */
5699
6065
  visible: () => boolean;
5700
6066
  }
6067
+ /** Wrap a render layer so it only draws while `visible()` is true. The
6068
+ * predicate is consulted per frame, which is how chrome follows canvas focus
6069
+ * without the layer knowing anything about focus. */
5701
6070
  declare function gateLayer<TData>(opts: GateLayerOptions<TData>): RenderLayer<TData>;
5702
6071
 
5703
6072
  /**
@@ -5756,7 +6125,7 @@ declare function composeAffordanceLayer(id: string, label: string, affordances:
5756
6125
  hitTest(wx: number, wy: number, state: ChromeState, view: View, dims: {
5757
6126
  width: number;
5758
6127
  height: number;
5759
- }, isVisible?: (id: string) => boolean): AffordanceBinding | null;
6128
+ }, isVisible?: (id: string) => boolean): LayerHit | null;
5760
6129
  };
5761
6130
 
5762
6131
  /**
@@ -5823,6 +6192,8 @@ declare function annulusSemiAxes(shape: Extract<AffordanceRegion['shape'], {
5823
6192
  ry: number;
5824
6193
  };
5825
6194
 
6195
+ /** Options for `createCornerResizeAffordance` — the size and appearance of
6196
+ * the corner handles. */
5826
6197
  interface CornerResizeAffordanceOptions {
5827
6198
  /** Hit radius (screen-px) for the corner handles. Default 8. */
5828
6199
  handleHitRadius?: number;
@@ -5831,6 +6202,8 @@ interface CornerResizeAffordanceOptions {
5831
6202
  fill?: string;
5832
6203
  stroke?: string;
5833
6204
  }
6205
+ /** What a corner-resize hit hands to the resize action: which corner stays
6206
+ * put, what is being resized, and the world-space pivot to scale from. */
5834
6207
  interface CornerResizeScratch extends CommonAffordanceScratch {
5835
6208
  /** Resize anchor identifying the OPPOSITE corner (the one that stays
5836
6209
  * fixed). Matches the kit's existing ResizeAnchor convention. */
@@ -5858,6 +6231,8 @@ interface CornerResizeScratch extends CommonAffordanceScratch {
5858
6231
  */
5859
6232
  declare function createCornerResizeAffordance(opts?: CornerResizeAffordanceOptions): Affordance;
5860
6233
 
6234
+ /** Options for `createRotationAffordance` — how thick the rotate band is
6235
+ * outside the selection, and how (or whether) it is painted. */
5861
6236
  interface RotationAffordanceOptions {
5862
6237
  /** Minimum screen-space thickness of the rotate-zone band outside the
5863
6238
  * selection AABB. The outer ellipse semi-axes are clamped to
@@ -5877,6 +6252,8 @@ interface RotationAffordanceOptions {
5877
6252
  /** Cursor while hovering the ring. Defaults to `'grab'`. */
5878
6253
  cursor?: string;
5879
6254
  }
6255
+ /** What a rotation-handle hit hands to the rotate action: what is being
6256
+ * rotated, and the world-space pivot it turns around. */
5880
6257
  interface RotationScratch extends CommonAffordanceScratch {
5881
6258
  /** Id of the rotation target — single selection id, or
5882
6259
  * `MULTI_RESIZE_TARGET_ID` for multi-selection. */
@@ -5931,12 +6308,16 @@ interface AnchorState {
5931
6308
  /** Current editable path for a node id. Non-polygon values are ignored. */
5932
6309
  getPose(id: string): unknown;
5933
6310
  }
6311
+ /** Options for the path-anchor affordances. */
5934
6312
  interface PathAnchorAffordanceOptions {
5935
6313
  /** Hit radius (screen-px) for anchor and control points. Default 8. */
5936
6314
  hitRadius?: number;
5937
6315
  /** Cursor while hovering an anchor or control. Defaults to `'pointer'`. */
5938
6316
  cursor?: string;
5939
6317
  }
6318
+ /** What an anchor hit hands to the action that follows: which path, which
6319
+ * anchor, and whether the grab was on the anchor itself or one of its two
6320
+ * control points. */
5940
6321
  interface AnchorScratch extends CommonAffordanceScratch {
5941
6322
  /** Node id of the path the anchor belongs to. */
5942
6323
  targetId: string;
@@ -6062,6 +6443,7 @@ interface MeasuredText {
6062
6443
  /** Greedy word-wrap text measurement against `maxWidth`; preserves explicit `\n` breaks. */
6063
6444
  declare function measureText(ctx: CanvasRenderingContext2D, text: string, maxWidth: number, style: ResolvedTextStyle): MeasuredText;
6064
6445
 
6446
+ /** Options for `measureTextBounds`. */
6065
6447
  interface MeasureTextBoundsOpts {
6066
6448
  /** Wrap width; words exceeding it start a new line. Default `Infinity` (no wrap). */
6067
6449
  maxWidth?: number;
@@ -6172,10 +6554,12 @@ declare function caretIndexAt(ctx: CanvasRenderingContext2D, x: number, y: numbe
6172
6554
  * closing edge from `polygon[N-1]` to `polygon[0]` is implicit. Even-odd
6173
6555
  * fill rule (matches `pointInPath`).
6174
6556
  */
6557
+ /** A 2D point or vector. */
6175
6558
  interface Vec2 {
6176
6559
  x: number;
6177
6560
  y: number;
6178
6561
  }
6562
+ /** An axis-aligned rectangle. */
6179
6563
  interface Rect {
6180
6564
  x: number;
6181
6565
  y: number;
@@ -6271,6 +6655,8 @@ declare function fitTextPose(ctx: CanvasRenderingContext2D, pose: TextPose, opts
6271
6655
  * `isMixed` check, regardless of what's being aggregated.
6272
6656
  */
6273
6657
  declare const MIXED: unique symbol;
6658
+ /** The type of {@link MIXED}. Property panels use it to say "the selection
6659
+ * does not agree on this value" without colliding with any real value. */
6274
6660
  type Mixed = typeof MIXED;
6275
6661
 
6276
6662
  /**
@@ -6515,7 +6901,7 @@ declare function unionBounds<TPose extends RectPose>(poses: Iterable<TPose>): Re
6515
6901
  * `useSceneTextEdit` — scene-aware wrapper around `useTextEdit`.
6516
6902
  *
6517
6903
  * Every consumer that wires `useTextEdit` against a `useScene`-managed
6518
- * scene writes the same six callbacks: scene lookups for text / style /
6904
+ * scene writes the same callbacks: scene lookups for text / style /
6519
6905
  * runs / screen-pose, and `scene.update(id, { data })` for commits. This
6520
6906
  * helper bakes that wiring in. Consumers pass `scene` + `container` and
6521
6907
  * get back the same `UseTextEditReturn` shape (`startEdit`, `isEditing`,
@@ -6525,7 +6911,7 @@ declare function unionBounds<TPose extends RectPose>(poses: Iterable<TPose>): Re
6525
6911
  * directly — matches the `useScene({ items })` trivial form where
6526
6912
  * `data === item` for text-shaped items, and matches `TextPose`-shaped
6527
6913
  * data. For custom data shapes, override any of the optional projections
6528
- * (`getText` / `getStyle` / `getRuns` / `setText` / `setRuns`).
6914
+ * (`getText` / `getStyle` / `getRuns` / `setText` / `setRuns` / `setStyle`).
6529
6915
  *
6530
6916
  * Pose component: the helper reads `(x, y, width, height)` straight off
6531
6917
  * the node's pose (typed `RectPose`). Pass `view` and it projects that box
@@ -6555,6 +6941,14 @@ interface UseSceneTextEditOptions<TData> {
6555
6941
  setText?: (data: TData, text: string) => TData;
6556
6942
  /** Produce updated data with new runs. Default: `{ ...data, runs }`. */
6557
6943
  setRuns?: (data: TData, runs: StyledRun[]) => TData;
6944
+ /**
6945
+ * Produce updated data with a new node-wide style. Default:
6946
+ * `{ ...data, style }`. Written only when a range toggle has to *clear* a
6947
+ * flag the node itself sets — the run algebra is additive, so that edit
6948
+ * lowers the node flag and raises it on the runs outside the range. See
6949
+ * `useTextEdit`'s `setStyle`.
6950
+ */
6951
+ setStyle?: (data: TData, style: TextStyle) => TData;
6558
6952
  /** Fallback fontSize when `style.fontSize` is unset. Default `16`. */
6559
6953
  defaultFontSize?: number;
6560
6954
  /**
@@ -6588,6 +6982,8 @@ interface UseSceneTextEditReturn extends UseTextEditReturn {
6588
6982
  * a caret offset via `caretIndexAt`, and starts edit on that node. */
6589
6983
  onDoubleClick: (e: MouseEvent$1<HTMLElement>) => void;
6590
6984
  }
6985
+ /** Wire double-click-to-edit text on a scene: mounts a DOM editing overlay
6986
+ * over the node being edited and writes the result back as an undoable op. */
6591
6987
  declare function useSceneTextEdit<TData extends DefaultTextData, TLayer extends string, TPose extends RectPose = RectPose>(scene: Scene<TData, TLayer, TPose>, container: HTMLElement | null, options?: UseSceneTextEditOptions<TData>): UseSceneTextEditReturn;
6592
6988
 
6593
6989
  /**
@@ -6614,6 +7010,8 @@ declare function useSceneTextEdit<TData extends DefaultTextData, TLayer extends
6614
7010
 
6615
7011
  /** The additive run flags. */
6616
7012
  type FlagKey = 'bold' | 'italic' | 'underline' | 'strikethrough';
7013
+ /** The result of toggling a style flag over a text range: the rewritten runs
7014
+ * and node style, and whether the change could be made at all. */
6617
7015
  interface SetFlagResult {
6618
7016
  runs: StyledRun[];
6619
7017
  style: TextStyle;
@@ -6650,6 +7048,9 @@ declare function setFlagOverRange(runs: readonly StyledRun[], style: TextStyle,
6650
7048
  * silently different result.
6651
7049
  */
6652
7050
 
7051
+ /** Build a draw command for a single unstyled string. Text is laid out with
7052
+ * the registered font's metrics, wrapped at `maxWidth` and aligned within
7053
+ * `height` when both are given. */
6653
7054
  declare function textCommand(x: number, y: number, text: string, style?: TextStyle, maxWidth?: number, height?: number, verticalAlign?: TextVerticalAlign): DrawCommand;
6654
7055
 
6655
7056
  /**
@@ -6819,6 +7220,8 @@ declare function gradientForBounds(kind: GradientKind, bounds: {
6819
7220
  * the renderer in one frame.
6820
7221
  */
6821
7222
 
7223
+ /** The box a `'bounds'` gradient's normalized geometry is mapped onto —
7224
+ * usually a node's bounds. */
6822
7225
  interface FillPoseBox {
6823
7226
  x: number;
6824
7227
  y: number;
@@ -7029,6 +7432,9 @@ interface MoveToIndexArgs {
7029
7432
  /** Op: move all `ids` to a contiguous block starting at `index` within `parentId`'s child order. */
7030
7433
  declare function createMoveToIndexOp(args: MoveToIndexArgs): Op;
7031
7434
 
7435
+ /** The geometry fields a `setPath` op replaces together — the path itself,
7436
+ * whether it is closed, and the parameters it was generated from. They move
7437
+ * as one so a parametric shape and its baked path never disagree. */
7032
7438
  interface SetPathFields {
7033
7439
  path: unknown;
7034
7440
  closed: boolean;
@@ -7074,6 +7480,7 @@ interface HitAdapter<TNode extends {
7074
7480
  getPose: (id: string) => TPose;
7075
7481
  getParent: (id: string) => string | null;
7076
7482
  }
7483
+ /** Options for `nestedHitTester`. */
7077
7484
  interface NestedHitOpts<TNode extends {
7078
7485
  id: string;
7079
7486
  }, TPose> {
@@ -7090,6 +7497,8 @@ interface NestedHitOpts<TNode extends {
7090
7497
  * never (treat every object as hittable). */
7091
7498
  isGroup?: (id: string, obj: TNode | undefined) => boolean;
7092
7499
  }
7500
+ /** Hit-test entry points for a nested scene: one that always picks the
7501
+ * outermost ancestor, and one that steps deeper on alt-click. */
7093
7502
  interface NestedHitTester {
7094
7503
  /** Outermost-ancestor pick. Suitable as the chrome-level `pickEvery`: a
7095
7504
  * casual click selects the whole top-level ancestor. Returns `null` on
@@ -7103,6 +7512,9 @@ interface NestedHitTester {
7103
7512
  * Plug into `useSelectTool({ pickBest })`. */
7104
7513
  pickBest: (worldX: number, worldY: number, alt: boolean, selection: readonly string[]) => string | null;
7105
7514
  }
7515
+ /** Build hit-testers that respect containers: a plain click selects the
7516
+ * top-level ancestor, and alt-clicking descends one level at a time toward
7517
+ * the leaf actually under the pointer. */
7106
7518
  declare function nestedHitTester<TNode extends {
7107
7519
  id: string;
7108
7520
  }, TPose>(adapter: HitAdapter<TNode, TPose>, opts: NestedHitOpts<TNode, TPose>): NestedHitTester;
@@ -7219,6 +7631,9 @@ declare function boundsOfPath(path: Path): RectPath;
7219
7631
  * uses it to validate the array length in dev builds.
7220
7632
  */
7221
7633
 
7634
+ /** One anchor of an editable path: its on-curve point plus the two control
7635
+ * handles that shape the segments either side of it. Handles are in the same
7636
+ * space as the point, and absent when the adjoining segment is straight. */
7222
7637
  interface PenAnchor {
7223
7638
  x: number;
7224
7639
  y: number;
@@ -7244,6 +7659,8 @@ declare function pathToAnchors(path: PolygonPath): {
7244
7659
  anchors: PenAnchor[][];
7245
7660
  closed: boolean[];
7246
7661
  };
7662
+ /** How many anchors a path has. Matches the per-anchor arrays the renderer
7663
+ * expects for `vertexColors`. */
7247
7664
  declare function countPathAnchors(path: Path): number;
7248
7665
 
7249
7666
  interface Point {
@@ -7557,6 +7974,10 @@ declare function flattenQuadratic(x0: number, y0: number, x1: number, y1: number
7557
7974
  * front.
7558
7975
  */
7559
7976
  declare function flattenCubicWithArcLen(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, tolerance: number, out: number[], arcOut: number[]): number;
7977
+ /** Flatten a quadratic bezier into line segments within `tolerance`, appending
7978
+ * points to `out` and their cumulative arc lengths to `arcOut`. The arc
7979
+ * lengths are what lets per-anchor color and dash phase be interpolated
7980
+ * evenly along the curve rather than per segment. */
7560
7981
  declare function flattenQuadraticWithArcLen(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, tolerance: number, out: number[], arcOut: number[]): number;
7561
7982
 
7562
7983
  /**
@@ -7621,8 +8042,11 @@ declare function decomposePath(parent: Path, world: Path): Path;
7621
8042
  * one subpath is also returned as a single-element array — a trivial pass.
7622
8043
  */
7623
8044
 
8045
+ /** Split a path into one path per subpath, cutting at each `M`. A path with a
8046
+ * single subpath comes back as a one-element array. */
7624
8047
  declare function splitSubpaths(path: PolygonPath): PolygonPath[];
7625
8048
 
8049
+ /** Options for `splitByLine`. */
7626
8050
  interface SplitByLineOptions {
7627
8051
  /** Polyline flattening tolerance for the boundary-crossing gate. */
7628
8052
  flattenTolerance?: number;
@@ -7682,6 +8106,7 @@ declare const pathOriginProjection: OriginProjection<Path>;
7682
8106
  * argument.
7683
8107
  */
7684
8108
 
8109
+ /** Appearance of the pen tool's in-progress path. */
7685
8110
  interface PenPreviewStyle {
7686
8111
  anchorFill?: string;
7687
8112
  anchorStroke?: string;
@@ -7690,12 +8115,16 @@ interface PenPreviewStyle {
7690
8115
  closeHintFill?: string;
7691
8116
  finishedSubpathStroke?: string;
7692
8117
  }
8118
+ /** Options for `createPenPreviewLayer`. */
7693
8119
  interface CreatePenPreviewLayerOptions {
7694
8120
  /** The Tool returned by usePenTool. The layer reads its scratch via
7695
8121
  * `tool.initScratch()` (the hook is contracted to return a stable ref). */
7696
8122
  penTool: Tool<PenScratch>;
7697
8123
  style?: PenPreviewStyle;
7698
8124
  }
8125
+ /** Render layer that draws the pen tool's path as it is being placed —
8126
+ * committed anchors, the rubber band to the cursor, and the close hint. Draws
8127
+ * nothing when the pen is idle. */
7699
8128
  declare function createPenPreviewLayer(opts: CreatePenPreviewLayerOptions): RenderLayer<unknown>;
7700
8129
 
7701
8130
  /**
@@ -7720,6 +8149,8 @@ declare function createPenPreviewLayer(opts: CreatePenPreviewLayerOptions): Rend
7720
8149
  * stay constant regardless of zoom.
7721
8150
  */
7722
8151
 
8152
+ /** Options for `createPathEditingOverlayLayer`. Everything is read per frame,
8153
+ * so the layer follows a changing edit target without being rebuilt. */
7723
8154
  interface CreatePathEditingOverlayLayerOptions {
7724
8155
  /** Returns the id of the polygon currently in anchor-edit mode, or null
7725
8156
  * when no node is being edited. Read each frame so live selection /
@@ -7750,6 +8181,7 @@ interface CreatePathEditingOverlayLayerOptions {
7750
8181
  /** Optional styling overrides. */
7751
8182
  style?: PathEditingOverlayStyle;
7752
8183
  }
8184
+ /** Appearance of the anchor and handle markers. */
7753
8185
  interface PathEditingOverlayStyle {
7754
8186
  anchorSizePx?: number;
7755
8187
  handleDotRadiusPx?: number;
@@ -7769,6 +8201,9 @@ interface PathEditingOverlayStyle {
7769
8201
  /** Fill of the marquee rubber band. */
7770
8202
  marqueeFill?: string;
7771
8203
  }
8204
+ /** Render layer that draws the anchors and control handles of the path
8205
+ * currently being anchor-edited. Draws nothing when no path is being
8206
+ * edited. */
7772
8207
  declare function createPathEditingOverlayLayer(opts: CreatePathEditingOverlayLayerOptions): RenderLayer<unknown>;
7773
8208
 
7774
8209
  /** Union of N paths. Commutative. Returns an empty path if all inputs are empty. */
@@ -7832,6 +8267,7 @@ interface SharedAnchor {
7832
8267
  /** Spiro continuity class at this anchor. Default 'g2-smooth'. */
7833
8268
  spiroType?: 'corner' | 'g2-smooth' | 'g4-smooth';
7834
8269
  }
8270
+ /** Which curve representation an anchor set is interpreted through. */
7835
8271
  type CurveRepKind = 'bezierCubic' | 'bezierQuadratic' | 'nurbs' | 'spiro';
7836
8272
  /** A user-facing control surfaced by a representation. Rendered uniformly
7837
8273
  * by the demo's panel sidebar. */
@@ -7874,14 +8310,19 @@ interface CurveRepresentation {
7874
8310
  discriminators(anchors: SharedAnchor[]): Discriminator[];
7875
8311
  }
7876
8312
 
8313
+ /** Cubic bezier: each segment takes two control handles. The familiar pen-tool curve, and what SVG path data stores natively. */
7877
8314
  declare const bezierCubic: CurveRepresentation;
7878
8315
 
8316
+ /** Quadratic bezier: one control point per segment. Cheaper than cubic and what TrueType glyph outlines use, at the cost of expressiveness. */
7879
8317
  declare const bezierQuadratic: CurveRepresentation;
7880
8318
 
8319
+ /** NURBS: anchors act as weighted control points the curve is pulled toward rather than passing through. Flattened to line segments when converted to a path. */
7881
8320
  declare const nurbs: CurveRepresentation;
7882
8321
 
8322
+ /** Spiro (κ-curves): curvature-continuous through each anchor, so joins stay visually smooth without hand-tuned handles. Approximated as cubics when converted to a path. */
7883
8323
  declare const spiro: CurveRepresentation;
7884
8324
 
8325
+ /** Every curve representation the kit ships, keyed by kind. */
7885
8326
  declare const CURVE_REPS: Readonly<Record<CurveRepKind, CurveRepresentation>>;
7886
8327
 
7887
8328
  /**
@@ -8105,6 +8546,8 @@ declare function guideSnapStrategy<TPose extends {
8105
8546
  x: number;
8106
8547
  y: number;
8107
8548
  }>(getGuides: () => readonly Guide[], options?: Omit<GuideSnapOptions<TPose>, 'origin'>): SnapStrategy<TPose>;
8549
+ /** As above, for a `TPose` that is not a rect: `origin` tells the strategy how
8550
+ * to read and write the pose's origin. */
8108
8551
  declare function guideSnapStrategy<TPose>(getGuides: () => readonly Guide[], options: GuideSnapOptions<TPose> & {
8109
8552
  origin: OriginProjection<TPose>;
8110
8553
  }): SnapStrategy<TPose>;
@@ -8175,6 +8618,9 @@ interface AlignBounds {
8175
8618
  /** Which feature of a box to test against candidates, per axis.
8176
8619
  * 'min' = left/top edge, 'center' = centerline, 'max' = right/bottom edge. */
8177
8620
  type AlignAnchor = 'min' | 'center' | 'max';
8621
+ /** The correction an alignment match asks for: the translation that lands the
8622
+ * dragged bounds on the matched guides, and the guides themselves so they can
8623
+ * be drawn. */
8178
8624
  interface AlignMatchResult {
8179
8625
  dx: number;
8180
8626
  dy: number;
@@ -8188,6 +8634,8 @@ interface AlignBoundsProjection<TPose> {
8188
8634
  boundsOf(pose: TPose): AlignBounds;
8189
8635
  translate(pose: TPose, dx: number, dy: number): TPose;
8190
8636
  }
8637
+ /** Which candidate lines to derive from a set of bounds — edges, centers, or
8638
+ * both, and whether the page box contributes its own. */
8191
8639
  interface DeriveAlignmentGuidesOptions {
8192
8640
  /** Include the document/page box's edges + center as candidates. */
8193
8641
  page?: AlignBounds;
@@ -8310,16 +8758,22 @@ declare function rotationHandle(pose: {
8310
8758
  * handle's center on both axes. Mirrors `hitCornerHandle`. */
8311
8759
  declare function hitRotationHandle(handle: RotationHandle, px: number, py: number, radius: number): boolean;
8312
8760
 
8761
+ /** A point in world coordinates. */
8313
8762
  interface DragRectPoint {
8314
8763
  x: number;
8315
8764
  y: number;
8316
8765
  }
8766
+ /** The axis-aligned box between the drag's two corners, always with
8767
+ * non-negative extents regardless of drag direction. */
8317
8768
  interface DragRectBounds {
8318
8769
  x: number;
8319
8770
  y: number;
8320
8771
  width: number;
8321
8772
  height: number;
8322
8773
  }
8774
+ /** Live state of a rectangle drag, handed to each lifecycle callback. Either
8775
+ * corner can be moved mid-gesture, which is how a tool re-anchors a drag
8776
+ * without restarting it. */
8323
8777
  interface DragRectCtx<TScratch = unknown> {
8324
8778
  start: DragRectPoint;
8325
8779
  current: DragRectPoint;
@@ -8332,12 +8786,15 @@ interface DragRectCtx<TScratch = unknown> {
8332
8786
  /** Override the current point mid-gesture (between start and end). */
8333
8787
  setCurrent(p: DragRectPoint): void;
8334
8788
  }
8789
+ /** The context handed to `onEnd`, adding whether the final box is too small
8790
+ * to be meaningful. */
8335
8791
  interface DragRectEndCtx<TScratch = unknown> extends DragRectCtx<TScratch> {
8336
8792
  /** True if the end-time bounds are at or below `minBounds` on either axis.
8337
8793
  * Present-tense state check — distinct from the base's retrospective
8338
8794
  * `wasSubThreshold`. Computed by this wrapper, not by `useDragGesture`. */
8339
8795
  isSubThreshold: boolean;
8340
8796
  }
8797
+ /** Options for `useDragRect`. */
8341
8798
  interface UseDragRectOptions<TScratch = unknown> {
8342
8799
  minBounds?: {
8343
8800
  width: number;
@@ -8357,6 +8814,7 @@ interface UseDragRectOptions<TScratch = unknown> {
8357
8814
  * behavior is identical to today (identity passthrough). */
8358
8815
  snapPoint?: (p: DragRectPoint) => DragRectPoint;
8359
8816
  }
8817
+ /** Drives a rectangle drag and publishes the live box for overlay drawing. */
8360
8818
  interface DragRectController {
8361
8819
  start(worldX: number, worldY: number, modifiers: ModifierState): void;
8362
8820
  move(worldX: number, worldY: number, modifiers: ModifierState): boolean;
@@ -8369,6 +8827,14 @@ interface DragRectController {
8369
8827
  } | null;
8370
8828
  readonly isActive: boolean;
8371
8829
  }
8830
+ /**
8831
+ * The gesture "the user drew a rectangle": press, drag, release, with the
8832
+ * resulting box reported live and at commit.
8833
+ *
8834
+ * It is a spatial input primitive, not an insert mechanism — what the box
8835
+ * means is entirely up to whoever consumes it. Marquee selection, cropping and
8836
+ * shape insertion all sit on top of the same gesture.
8837
+ */
8372
8838
  declare function useDragRect<TScratch = unknown>(options?: UseDragRectOptions<TScratch>): DragRectController;
8373
8839
 
8374
8840
  /** Pointer position in both world (gesture-coord) and client (CSS-px) space. */
@@ -8391,11 +8857,15 @@ interface DragGestureCtx<TScratch = unknown> {
8391
8857
  /** 'pending' or 'active'. Never 'idle' inside a callback. */
8392
8858
  phase: 'pending' | 'active';
8393
8859
  }
8860
+ /** The context handed to `onEnd`, adding whether the gesture ever passed its
8861
+ * activation threshold. */
8394
8862
  interface DragGestureEndCtx<TScratch = unknown> extends DragGestureCtx<TScratch> {
8395
8863
  /** True if phase never reached 'active'. Wrappers without thresholdReached
8396
8864
  * always see false here (their gesture activates at start()). */
8397
8865
  wasSubThreshold: boolean;
8398
8866
  }
8867
+ /** Options for `useDragGesture`: when the gesture becomes active, and what to
8868
+ * do at each point in its lifecycle. */
8399
8869
  interface UseDragGestureOptions<TScratch = unknown> {
8400
8870
  initScratch?: () => TScratch;
8401
8871
  /** Predicate consulted on each move while phase === 'pending'. Return true
@@ -8410,6 +8880,8 @@ interface UseDragGestureOptions<TScratch = unknown> {
8410
8880
  onGestureStart?: () => void;
8411
8881
  onGestureEnd?: (committed: boolean) => void;
8412
8882
  }
8883
+ /** Drives a drag gesture. The owner feeds it pointer positions; it decides
8884
+ * when the drag has really begun and calls back accordingly. */
8413
8885
  interface DragGestureController {
8414
8886
  start(point: DragGesturePoint, modifiers: ModifierState): void;
8415
8887
  move(point: DragGesturePoint, modifiers: ModifierState): boolean;
@@ -8418,25 +8890,41 @@ interface DragGestureController {
8418
8890
  readonly phase: DragGesturePhase;
8419
8891
  readonly isActive: boolean;
8420
8892
  }
8893
+ /**
8894
+ * The base drag primitive: tracks a pointer from press to release, with an
8895
+ * optional threshold below which the gesture stays pending and commits
8896
+ * nothing.
8897
+ *
8898
+ * It is a gesture and only a gesture — it says where the pointer went, never
8899
+ * what that should do. `useDragRect` and `useDragRadial` build on it, and
8900
+ * actions decide what to make of the result.
8901
+ */
8421
8902
  declare function useDragGesture<TScratch = unknown>(options?: UseDragGestureOptions<TScratch>): DragGestureController;
8422
8903
 
8904
+ /** A point in world coordinates. */
8423
8905
  interface DragRadialPoint {
8424
8906
  x: number;
8425
8907
  y: number;
8426
8908
  }
8909
+ /** A radial drag expressed as its center and the polar coordinates of the
8910
+ * cursor relative to it. */
8427
8911
  interface DragRadialState {
8428
8912
  center: DragRadialPoint;
8429
8913
  radius: number;
8430
8914
  rotation: number;
8431
8915
  }
8916
+ /** Live state of a radial drag, handed to each lifecycle callback. */
8432
8917
  interface DragRadialCtx<TScratch = unknown> extends DragRadialState {
8433
8918
  modifiers: ModifierState;
8434
8919
  scratch: TScratch;
8435
8920
  }
8921
+ /** The context handed to `onEnd`, adding whether the final radius is too
8922
+ * small to be meaningful. */
8436
8923
  interface DragRadialEndCtx<TScratch = unknown> extends DragRadialCtx<TScratch> {
8437
8924
  /** True at end time if the radius is at or below `minRadius`. */
8438
8925
  isSubThreshold: boolean;
8439
8926
  }
8927
+ /** Options for `useDragRadial`. */
8440
8928
  interface UseDragRadialOptions<TScratch = unknown> {
8441
8929
  minRadius?: number;
8442
8930
  initScratch?: () => TScratch;
@@ -8453,6 +8941,8 @@ interface UseDragRadialOptions<TScratch = unknown> {
8453
8941
  * When omitted, behavior is identical to today (identity passthrough). */
8454
8942
  snapPoint?: (p: DragRadialPoint) => DragRadialPoint;
8455
8943
  }
8944
+ /** Drives a radial drag and publishes the live center/radius/rotation for
8945
+ * overlay drawing. */
8456
8946
  interface DragRadialController {
8457
8947
  start(worldX: number, worldY: number, modifiers: ModifierState): void;
8458
8948
  move(worldX: number, worldY: number, modifiers: ModifierState): boolean;
@@ -8572,6 +9062,7 @@ declare function setScratch<T>(store: ScratchStore, key: ScratchKey<T>, value: T
8572
9062
  * `false` if it wasn't. */
8573
9063
  declare function deleteScratch<T>(store: ScratchStore, key: ScratchKey<T>): boolean;
8574
9064
 
9065
+ /** Options for `selectFromLasso`. */
8575
9066
  interface SelectFromLassoOptions {
8576
9067
  /** Hit mode for `hitTestLasso`. Default 'intersect'. */
8577
9068
  mode?: LassoHitMode;
@@ -8656,6 +9147,8 @@ interface UseDistributeReturn {
8656
9147
  * remaining items are repositioned. Single batch — one undo step. */
8657
9148
  declare function useDistribute<TPose>(adapter: DistributeAdapter<TPose>, options?: UseDistributeOptions<TPose>): UseDistributeReturn;
8658
9149
 
9150
+ /** The six Boolean path operations, each acting on the current selection and
9151
+ * committing as one undo step. */
8659
9152
  interface UseBooleansReturn {
8660
9153
  union(): void;
8661
9154
  intersect(): void;
@@ -8664,13 +9157,18 @@ interface UseBooleansReturn {
8664
9157
  divide(): void;
8665
9158
  crop(): void;
8666
9159
  }
9160
+ /** Options for `useBooleans`. */
8667
9161
  interface UseBooleansOptions {
8668
9162
  /** No-op. Retained for source-compatibility; auto-registration is now
8669
9163
  * handled by `useStandardActions` via the Pathfinder descriptors. */
8670
9164
  enableActions?: boolean;
8671
9165
  }
9166
+ /** Bind the Boolean path operations to an adapter that knows how to read the
9167
+ * selection, fetch world-space paths and mint result nodes. */
8672
9168
  declare function useBooleans(adapter: BooleansAdapter, _options?: UseBooleansOptions): UseBooleansReturn;
8673
9169
 
9170
+ /** Publish a Boolean-ops adapter so the built-in Pathfinder actions can run.
9171
+ * Silently does nothing outside a `<DepRegistryProvider>`. */
8674
9172
  declare function useBooleansAdapter(adapter: BooleansAdapter): void;
8675
9173
 
8676
9174
  /**
@@ -8758,40 +9256,87 @@ declare function createDebugOverlayLayer({ sink, config, }: CreateDebugOverlayLa
8758
9256
  * `DebugConfig`.
8759
9257
  */
8760
9258
  declare const DEFAULT_DEBUG_THEME: DebugTheme;
9259
+ /**
9260
+ * Default line widths and dashes. Hairline everywhere so the overlay never
9261
+ * hides the geometry it is describing; the dash on hitboxes is what
9262
+ * distinguishes them from the solid bounds box at the same rect.
9263
+ * Override by passing `strokes: { ... }` on `DebugConfig`.
9264
+ */
9265
+ declare const DEFAULT_DEBUG_STROKES: DebugStrokes;
8761
9266
 
9267
+ /** No easing: constant rate from start to finish. */
8762
9268
  declare const linear: EasingFn;
9269
+ /** Accelerates from a standstill, gently. */
8763
9270
  declare const easeInQuad: EasingFn;
9271
+ /** Decelerates to a stop, gently. The safe default for UI motion. */
8764
9272
  declare const easeOutQuad: EasingFn;
9273
+ /** Accelerates then decelerates, gently. */
8765
9274
  declare const easeInOutQuad: EasingFn;
9275
+ /** Accelerates from a standstill, moderately. */
8766
9276
  declare const easeInCubic: EasingFn;
9277
+ /** Decelerates to a stop, moderately. */
8767
9278
  declare const easeOutCubic: EasingFn;
9279
+ /** Accelerates then decelerates, moderately. */
8768
9280
  declare const easeInOutCubic: EasingFn;
9281
+ /** Accelerates from a standstill, sharply. */
8769
9282
  declare const easeInQuart: EasingFn;
9283
+ /** Decelerates to a stop, sharply. */
8770
9284
  declare const easeOutQuart: EasingFn;
9285
+ /** Accelerates then decelerates, sharply. */
8771
9286
  declare const easeInOutQuart: EasingFn;
9287
+ /** Accelerates from a standstill, very sharply. */
8772
9288
  declare const easeInQuint: EasingFn;
9289
+ /** Decelerates to a stop, very sharply. */
8773
9290
  declare const easeOutQuint: EasingFn;
9291
+ /** Accelerates then decelerates, very sharply. */
8774
9292
  declare const easeInOutQuint: EasingFn;
9293
+ /** Accelerates from a standstill along a sine curve — the mildest
9294
+ * acceleration of the built-ins. */
8775
9295
  declare const easeInSine: EasingFn;
9296
+ /** Decelerates to a stop along a sine curve — the mildest
9297
+ * deceleration of the built-ins. */
8776
9298
  declare const easeOutSine: EasingFn;
9299
+ /** Accelerates then decelerates along a sine curve. */
8777
9300
  declare const easeInOutSine: EasingFn;
9301
+ /** Accelerates exponentially: barely moves at first, then rushes. */
8778
9302
  declare const easeInExpo: EasingFn;
9303
+ /** Decelerates exponentially: leaps away, then creeps in. */
8779
9304
  declare const easeOutExpo: EasingFn;
9305
+ /** Exponential at both ends — a very fast middle between two
9306
+ * near-still extremes. */
8780
9307
  declare const easeInOutExpo: EasingFn;
9308
+ /** Accelerates along a circular arc: slow start, abrupt arrival. */
8781
9309
  declare const easeInCirc: EasingFn;
9310
+ /** Decelerates along a circular arc: abrupt start, slow arrival. */
8782
9311
  declare const easeOutCirc: EasingFn;
9312
+ /** Circular arcs at both ends. */
8783
9313
  declare const easeInOutCirc: EasingFn;
9314
+ /** Pulls back past the start before moving forward. Overshoots below 0. */
8784
9315
  declare const easeInBack: EasingFn;
9316
+ /** Overshoots the target, then settles back onto it. Exceeds 1. */
8785
9317
  declare const easeOutBack: EasingFn;
9318
+ /** Overshoots at both ends. Leaves the 0–1 range on each side. */
8786
9319
  declare const easeInOutBack: EasingFn;
9320
+ /** Oscillates around the start with growing amplitude, then snaps away. */
8787
9321
  declare const easeInElastic: EasingFn;
9322
+ /** Springs past the target and wobbles into it. Exceeds 1. */
8788
9323
  declare const easeOutElastic: EasingFn;
9324
+ /** Wobbles at both ends. Leaves the 0–1 range on each side. */
8789
9325
  declare const easeInOutElastic: EasingFn;
9326
+ /** Lands on the target and bounces, in hops of decreasing height. */
8790
9327
  declare const easeOutBounce: EasingFn;
9328
+ /** Bounces up to the start before departing — `easeOutBounce` reversed. */
8791
9329
  declare const easeInBounce: EasingFn;
9330
+ /** Bounces at both ends. */
8792
9331
  declare const easeInOutBounce: EasingFn;
9332
+ /** Alias for `easeInQuad`, kept for call sites that predate the
9333
+ * named-curve library. */
8793
9334
  declare const easeIn: EasingFn;
9335
+ /** Alias for `easeOutQuad`, kept for call sites that predate the
9336
+ * named-curve library. */
8794
9337
  declare const easeOut: EasingFn;
9338
+ /** Alias for `easeInOutQuad`, kept for call sites that predate the
9339
+ * named-curve library. */
8795
9340
  declare const easeInOut: EasingFn;
8796
9341
  /** All easings in one bag — useful for demos / pickers. */
8797
9342
  declare const EASINGS: {
@@ -8827,11 +9372,18 @@ declare const EASINGS: {
8827
9372
  readonly easeOutBounce: EasingFn;
8828
9373
  readonly easeInOutBounce: EasingFn;
8829
9374
  };
9375
+ /** The name of one of the built-in easing curves. */
8830
9376
  type EasingName = keyof typeof EASINGS;
9377
+ /** Named spring tunings, from softest to firmest. Springs settle on a target
9378
+ * rather than running for a fixed duration, so these are an alternative to an
9379
+ * easing curve, not a modifier on one. */
8831
9380
  declare const SPRING_PRESETS: Record<SpringPresetName, SpringPreset>;
8832
9381
 
9382
+ /** Create the animator for a canvas. One rAF loop drives every animation it
9383
+ * owns, and everything still running is cancelled on unmount. */
8833
9384
  declare function useAnimator(opts?: UseAnimatorOptions): Animator;
8834
9385
 
9386
+ /** Options for `tweenPose`. */
8835
9387
  interface TweenPoseOptions<TPose> {
8836
9388
  id: string;
8837
9389
  to: TPose;
@@ -8847,6 +9399,7 @@ interface TweenPoseOptions<TPose> {
8847
9399
  opLabel?: string;
8848
9400
  onDone?: () => void;
8849
9401
  }
9402
+ /** Options for `springPose`. */
8850
9403
  interface SpringPoseOptions<TPose> {
8851
9404
  id: string;
8852
9405
  to: TPose;
@@ -8859,13 +9412,25 @@ interface SpringPoseOptions<TPose> {
8859
9412
  opLabel?: string;
8860
9413
  onDone?: () => void;
8861
9414
  }
9415
+ /**
9416
+ * Animate one node's pose to `to` over `ms`, writing each frame through the
9417
+ * adapter.
9418
+ *
9419
+ * Unlike the color helpers this really does move the node. Undo therefore has
9420
+ * to be considered: by default a single transform op covering the whole
9421
+ * animation is recorded up front, so one undo returns the node to where it
9422
+ * started rather than replaying frames.
9423
+ */
8862
9424
  declare function tweenPose<TNode extends {
8863
9425
  id: string;
8864
9426
  }, TPose>(animator: Animator, adapter: SceneAdapter<TNode, TPose>, opts: TweenPoseOptions<TPose>): AnimationHandle;
9427
+ /** `tweenPose` driven by a spring instead of a duration. Same op-recording
9428
+ * behavior. */
8865
9429
  declare function springPose<TNode extends {
8866
9430
  id: string;
8867
9431
  }, TPose>(animator: Animator, adapter: SceneAdapter<TNode, TPose>, opts: SpringPoseOptions<TPose>): AnimationHandle;
8868
9432
 
9433
+ /** Options for `animateOnSetPose`. */
8869
9434
  interface AnimateOnSetPoseOptions<TPose> {
8870
9435
  /** Default: 200ms tween with easeOut. */
8871
9436
  ms?: number;
@@ -8893,10 +9458,24 @@ interface AnimateOnSetPoseOptions<TPose> {
8893
9458
  /** Op label for the recorded transform op. Default: `'animate'`. */
8894
9459
  opLabel?: string;
8895
9460
  }
9461
+ /**
9462
+ * Wrap an adapter so every `setPose` animates to the new pose instead of
9463
+ * jumping to it. Anything that moves a node — a layout strategy, an action, a
9464
+ * consumer's own code — is animated without knowing it, since the adapter is
9465
+ * the single write path.
9466
+ *
9467
+ * Poses written from inside another animation's tick, and (optionally) poses
9468
+ * written for a node currently under a gesture, are passed straight through:
9469
+ * animating those would fight whatever is already driving the node.
9470
+ */
8896
9471
  declare function animateOnSetPose<TNode extends {
8897
9472
  id: string;
8898
9473
  }, TPose>(adapter: SceneAdapter<TNode, TPose>, animator: Animator, opts?: AnimateOnSetPoseOptions<TPose>): SceneAdapter<TNode, TPose>;
8899
9474
 
9475
+ /** How nodes enter and leave. `enterFrom` derives the pose a new node starts
9476
+ * at, given where it belongs; `exitTo` derives the pose a departing node
9477
+ * animates to before it is actually removed. Omit either to leave that
9478
+ * transition instant. */
8900
9479
  interface LifecycleAnimation<TPose> {
8901
9480
  /** Pose to animate the new object FROM at insert. */
8902
9481
  enterFrom?: (final: TPose) => TPose;
@@ -8906,11 +9485,14 @@ interface LifecycleAnimation<TPose> {
8906
9485
  easing?: EasingFn;
8907
9486
  geometry?: PoseProjection<TPose>;
8908
9487
  }
9488
+ /** Wrap an adapter so inserts and removals animate — the scene-graph
9489
+ * equivalent of CSS enter/leave transitions. */
8909
9490
  declare function animateLifecycle<TNode extends {
8910
9491
  id: string;
8911
9492
  pose?: TPose;
8912
9493
  }, TPose>(adapter: SceneAdapter<TNode, TPose>, animator: Animator, opts: LifecycleAnimation<TPose>): SceneAdapter<TNode, TPose>;
8913
9494
 
9495
+ /** Options for the `momentum` move behavior. */
8914
9496
  interface MomentumOptions {
8915
9497
  /** Required: the per-Canvas animator that will own the decay. */
8916
9498
  animator: Animator;
@@ -8947,10 +9529,24 @@ interface MomentumOptions {
8947
9529
  */
8948
9530
  boundary?: 'stop' | 'continue';
8949
9531
  }
9532
+ /**
9533
+ * Move behavior that keeps a dragged node coasting after the pointer is
9534
+ * released, at the velocity it was travelling, until friction brings it below
9535
+ * `threshold`.
9536
+ *
9537
+ * Plugs into the move action rather than replacing it, so the drag itself is
9538
+ * unchanged — this only decides what happens after the release. The whole
9539
+ * flick, coast included, records as one undoable transform.
9540
+ */
8950
9541
  declare function momentum<TPose>(opts: MomentumOptions): MoveBehavior<TPose>;
8951
9542
 
9543
+ /** Convert an 8-bit sRGB triple to OKLab. */
8952
9544
  declare function srgbU8ToOklab(r: number, g: number, b: number): [number, number, number];
9545
+ /** Convert OKLab back to an 8-bit sRGB triple, clamped into gamut. */
8953
9546
  declare function oklabToSrgbU8(L: number, A: number, B: number): [number, number, number];
9547
+ /** Blend two 8-bit sRGB colors through OKLab. Perceptually even, and it does
9548
+ * not pass through the muddy midpoints an sRGB blend produces between
9549
+ * complementary hues. */
8954
9550
  declare function lerpOklab(from: readonly [number, number, number], to: readonly [number, number, number], t: number): [number, number, number];
8955
9551
  /** Convert OKLab (L, a, b) to OKLCh (L, C, h). h is in radians, range [-π, π]. */
8956
9552
  declare function oklabToOklch(L: number, A: number, B: number): [number, number, number];
@@ -8961,6 +9557,9 @@ declare function oklchToOklab(L: number, C: number, h: number): [number, number,
8961
9557
  * is taken from the other endpoint (avoids hue snap-from-undefined).
8962
9558
  * h inputs are in radians. */
8963
9559
  declare function lerpOklch(from: readonly [number, number, number], to: readonly [number, number, number], t: number): [number, number, number];
9560
+ /** Which space a color blend is computed in. `'rgb'` is cheapest; `'oklab'`
9561
+ * is perceptually even; `'oklch'` additionally travels around the hue wheel
9562
+ * rather than through it. */
8964
9563
  type ColorSpace = 'rgb' | 'oklab' | 'oklch';
8965
9564
  /** Lerp a flat RGBA color array `from` toward `to`. Inputs are 0..1
8966
9565
  * floats (the renderer's color space); outputs are 0..1 floats too.
@@ -8980,6 +9579,7 @@ declare function lerpColorArray(from: readonly number[], to: readonly number[],
8980
9579
  * when a custom color-space or shaping is needed.
8981
9580
  */
8982
9581
  type ColorInterpolate = (from: readonly number[], to: readonly number[], t: number) => number[];
9582
+ /** Options for `tweenVertexColors`. */
8983
9583
  interface TweenVertexColorsOptions {
8984
9584
  id: string;
8985
9585
  channel: VertexColorChannel;
@@ -8996,7 +9596,17 @@ interface TweenVertexColorsOptions {
8996
9596
  interpolate?: ColorInterpolate;
8997
9597
  onDone?: () => void;
8998
9598
  }
9599
+ /**
9600
+ * Animate one node's per-anchor colors from `from` to `to` over `ms`.
9601
+ *
9602
+ * The colors are published to the animator's `colorOverrides` registry rather
9603
+ * than written into the scene, so nothing is recorded in history and the
9604
+ * node's own data is untouched; the override is dropped when the animation
9605
+ * finishes. Starting another color animation on the same node and channel
9606
+ * cancels this one.
9607
+ */
8999
9608
  declare function tweenVertexColors(animator: Animator, opts: TweenVertexColorsOptions): AnimationHandle;
9609
+ /** Options for `springVertexColors`. */
9000
9610
  interface SpringVertexColorsOptions {
9001
9611
  id: string;
9002
9612
  channel: VertexColorChannel;
@@ -9012,7 +9622,10 @@ interface SpringVertexColorsOptions {
9012
9622
  interpolate?: ColorInterpolate;
9013
9623
  onDone?: () => void;
9014
9624
  }
9625
+ /** `tweenVertexColors` driven by a spring instead of a duration. Same override
9626
+ * semantics. */
9015
9627
  declare function springVertexColors(animator: Animator, opts: SpringVertexColorsOptions): AnimationHandle;
9628
+ /** Options for `cycleVertexColors`. */
9016
9629
  interface CycleVertexColorsOptions {
9017
9630
  id: string;
9018
9631
  channel: VertexColorChannel;
@@ -9024,6 +9637,9 @@ interface CycleVertexColorsOptions {
9024
9637
  * progress `t` in 0..1; returns the blended array in 0..1 floats. */
9025
9638
  interpolate?: ColorInterpolate;
9026
9639
  }
9640
+ /** Removes an installed color cycle. Unlike the other color helpers this is
9641
+ * not an `AnimationHandle`, because a cycle has no progress to pause or
9642
+ * scale — it only ends. */
9027
9643
  interface CycleHandle {
9028
9644
  cancel(): void;
9029
9645
  }
@@ -9038,6 +9654,9 @@ interface CycleHandle {
9038
9654
  * cycleVertexColors holds an `animator.keepAlive()` entry for the
9039
9655
  * lifetime of the cycle; `cancel()` releases it. */
9040
9656
  declare function cycleVertexColors(animator: Animator, opts: CycleVertexColorsOptions): CycleHandle;
9657
+ /** Options for `staggerVertexColors`. `origin` picks which anchor the wave
9658
+ * starts from and `perAnchorDelay` how far behind each successive anchor
9659
+ * runs. */
9041
9660
  interface StaggerVertexColorsOptions {
9042
9661
  id: string;
9043
9662
  channel: VertexColorChannel;
@@ -9053,6 +9672,9 @@ interface StaggerVertexColorsOptions {
9053
9672
  interpolate?: ColorInterpolate;
9054
9673
  onDone?: () => void;
9055
9674
  }
9675
+ /** Run the same color change across a node's anchors as a wave, each anchor
9676
+ * starting later than the one before it. Same override semantics as
9677
+ * `tweenVertexColors`. */
9056
9678
  declare function staggerVertexColors(animator: Animator, opts: StaggerVertexColorsOptions): AnimationHandle;
9057
9679
  /** Build an n-anchor rainbow RGBA array sweeping the hue wheel. The
9058
9680
  * output is suitable to pass directly into `stroke.vertexColors`,
@@ -9068,8 +9690,14 @@ declare function rainbowVertexColors(n: number, opts?: {
9068
9690
  * `to`-target typically needs. */
9069
9691
  declare function solidVertexColors(n: number, r: number, g: number, b: number, a?: number): number[];
9070
9692
 
9693
+ /** Snap policy that never picks a target — every drop is rejected, which is
9694
+ * what a free-form container wants. */
9071
9695
  declare function none<TPose>(): LayoutSnap<TPose>;
9696
+ /** Snap policy that always picks the target closest to the pointer, however
9697
+ * far away it is. */
9072
9698
  declare function nearest<TPose>(): LayoutSnap<TPose>;
9699
+ /** Snap policy that picks the closest target, but only within `tolerance`
9700
+ * world units — beyond that the drop is rejected. */
9073
9701
  declare function nearestWithin<TPose>(opts: {
9074
9702
  tolerance: number;
9075
9703
  }): LayoutSnap<TPose>;
@@ -9091,6 +9719,7 @@ declare function containedThenNearest<TPose>(): LayoutSnap<TPose>;
9091
9719
  */
9092
9720
  declare function cellAt<TPose>(): LayoutSnap<TPose>;
9093
9721
 
9722
+ /** Options for `freeform`. */
9094
9723
  interface FreeformOptions<TPose> {
9095
9724
  snap?: LayoutSnap<TPose>;
9096
9725
  }
@@ -9102,6 +9731,7 @@ interface FreeformOptions<TPose> {
9102
9731
  */
9103
9732
  declare function freeform<TPose>(opts?: FreeformOptions<TPose>): LayoutStrategy<TPose>;
9104
9733
 
9734
+ /** Options for `tileGrid`. */
9105
9735
  interface TileGridOptions<TPose> {
9106
9736
  cols: number;
9107
9737
  rows: number;
@@ -9121,9 +9751,14 @@ interface TileGridOptions<TPose> {
9121
9751
  height: number;
9122
9752
  }, dragged: TPose): TPose;
9123
9753
  }
9754
+ /** Layout strategy that arranges children into a fixed grid of cells, one
9755
+ * child per cell. A drag reflows the others to make room, and the container
9756
+ * holds at most `cols × rows` children. */
9124
9757
  declare function tileGrid<TPose>(opts: TileGridOptions<TPose>): LayoutStrategy<TPose>;
9125
9758
 
9759
+ /** Which points within a container a child can snap to. */
9126
9760
  type SnapPattern = 'corners' | 'edges' | 'center' | 'grid';
9761
+ /** Options for `snapPoint`. */
9127
9762
  interface SnapPointOptions<TPose> {
9128
9763
  pattern: SnapPattern;
9129
9764
  /** Spacing for the 'grid' pattern, in world units. Default 50. */
@@ -9132,10 +9767,14 @@ interface SnapPointOptions<TPose> {
9132
9767
  tolerance?: number;
9133
9768
  snap?: LayoutSnap<TPose>;
9134
9769
  }
9770
+ /** A point in world coordinates. */
9135
9771
  type Pt = {
9136
9772
  x: number;
9137
9773
  y: number;
9138
9774
  };
9775
+ /** Layout strategy that leaves children where they are but offers a fixed set
9776
+ * of points — corners, edge midpoints, center, or a grid — for a dragged
9777
+ * child to land on. */
9139
9778
  declare function snapPoint<TPose extends Pt>(opts: SnapPointOptions<TPose>): LayoutStrategy<TPose>;
9140
9779
 
9141
9780
  /**
@@ -9252,11 +9891,17 @@ declare function HandIcon({ className, size }: IconProps): react_jsx_runtime.JSX
9252
9891
  * inside — readable, debuggable, not hidden. */
9253
9892
  declare function UnknownIcon({ className, size }: IconProps): react_jsx_runtime.JSX.Element;
9254
9893
 
9894
+ /** Icon for the union operation: two overlapping circles merged into one filled shape. */
9255
9895
  declare function UnionIcon(): react_jsx_runtime.JSX.Element;
9896
+ /** Icon for the intersect operation: only the overlap of two circles filled. */
9256
9897
  declare function IntersectIcon(): react_jsx_runtime.JSX.Element;
9898
+ /** Icon for the subtract operation: the front circle removed from the back one. */
9257
9899
  declare function SubtractIcon(): react_jsx_runtime.JSX.Element;
9900
+ /** Icon for the exclude operation: both circles filled except their overlap. */
9258
9901
  declare function ExcludeIcon(): react_jsx_runtime.JSX.Element;
9902
+ /** Icon for the divide operation: two circles split into their separate regions. */
9259
9903
  declare function DivideIcon(): react_jsx_runtime.JSX.Element;
9904
+ /** Icon for the crop operation: the back shape clipped to the front one. */
9260
9905
  declare function CropIcon(): react_jsx_runtime.JSX.Element;
9261
9906
 
9262
9907
  /** What the registry knows at dispatch time. */
@@ -9296,6 +9941,7 @@ declare function scopeBindings(entries: Iterable<Contribution>, state: Eligibili
9296
9941
  */
9297
9942
  declare function mergeContributions(...bundles: readonly Contribution[][]): Contribution[];
9298
9943
 
9944
+ /** Appearance of the dashed box drawn during a marquee or insert drag. */
9299
9945
  interface InsertOverlayStyle {
9300
9946
  fill?: string;
9301
9947
  stroke?: string;
@@ -9303,4 +9949,4 @@ interface InsertOverlayStyle {
9303
9949
  lineWidth?: number;
9304
9950
  }
9305
9951
 
9306
- 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_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, 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, NodeId, type NodeInk, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type OpenFilePickerOptions, OrderedAdapter, OriginProjection, 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, ToolCtx, 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 ViewportZoomOptions, VisibilityRules, WeaselProvider, type WheelInput, type WheelState, ZoomBound, type ZoomBounds, type ZoomClampOpts, ZoomFactor, aabbCenter, actionIs, alignDeltaFor, alignInsertBehavior, alignMoveBehavior, alignResizeBehavior, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyHitExistingGate, 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, 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, when, withAlpha01, withCoord, withGradientKind, withinPxBox, withinPxRadius, worldEditToStorage, zoomAt, zoomAtLeast };
9952
+ 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, ToolCtx, 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, applyHitExistingGate, 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 };