@weasel-js/core 1.4.2 → 1.4.4

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 (49) hide show
  1. package/CHANGELOG.md +742 -0
  2. package/dist/{DrawCommand-Ch8W63oQ.d.ts → DrawCommand-CD-ug3d9.d.ts} +45 -1
  3. package/dist/{pointSnapToGrid-Dmthv94u.d.ts → autoPoseDescriptor-DF1SnnSx.d.ts} +18 -3
  4. package/dist/{stroke-Dq8nL4A2.d.ts → builtins-BXFBXegF.d.ts} +251 -102
  5. package/dist/{chunk-Y5KS66G7.js → chunk-2VXGHUVL.js} +4 -4
  6. package/dist/{chunk-Y5KS66G7.js.map → chunk-2VXGHUVL.js.map} +1 -1
  7. package/dist/{chunk-2KKYDDDD.js → chunk-4RJP2N2L.js} +43 -21
  8. package/dist/chunk-4RJP2N2L.js.map +1 -0
  9. package/dist/{chunk-TORKRNFY.js → chunk-BL65SHCX.js} +83 -8
  10. package/dist/chunk-BL65SHCX.js.map +1 -0
  11. package/dist/{chunk-MXFSHJOM.js → chunk-D4AAWR64.js} +4 -4
  12. package/dist/{chunk-MXFSHJOM.js.map → chunk-D4AAWR64.js.map} +1 -1
  13. package/dist/{chunk-ZB7UYJVG.js → chunk-DOBSZOPR.js} +3 -3
  14. package/dist/{chunk-ZB7UYJVG.js.map → chunk-DOBSZOPR.js.map} +1 -1
  15. package/dist/{chunk-BLJNRMKB.js → chunk-PRGBGMH3.js} +3 -3
  16. package/dist/{chunk-BLJNRMKB.js.map → chunk-PRGBGMH3.js.map} +1 -1
  17. package/dist/{chunk-KIVJXUYE.js → chunk-R3AWPTLZ.js} +2779 -1660
  18. package/dist/chunk-R3AWPTLZ.js.map +1 -0
  19. package/dist/{chunk-67KE7SDP.js → chunk-T3UQ3F6R.js} +4 -4
  20. package/dist/{chunk-67KE7SDP.js.map → chunk-T3UQ3F6R.js.map} +1 -1
  21. package/dist/{chunk-SBFC6J3C.js → chunk-WPM42WJP.js} +3 -3
  22. package/dist/{chunk-SBFC6J3C.js.map → chunk-WPM42WJP.js.map} +1 -1
  23. package/dist/clipboard.d.ts +2 -2
  24. package/dist/clipboard.js +3 -3
  25. package/dist/clone.d.ts +2 -2
  26. package/dist/clone.js +3 -3
  27. package/dist/{geometry-Dtt_k6Dq.d.ts → geometry-6fCNhAux.d.ts} +3 -3
  28. package/dist/{grid-nnXU4VjN.d.ts → grid-0Pbn5B2C.d.ts} +1 -14
  29. package/dist/index.d.ts +330 -288
  30. package/dist/index.js +9 -9
  31. package/dist/insert.d.ts +3 -3
  32. package/dist/insert.js +1 -1
  33. package/dist/move.d.ts +4 -4
  34. package/dist/move.js +3 -3
  35. package/dist/{options-CdFl510T.d.ts → options-DbYLImvq.d.ts} +1 -1
  36. package/dist/{registry-BwY_DxJM.d.ts → registry-BY-wI9gm.d.ts} +98 -8
  37. package/dist/renderer.d.ts +32 -4
  38. package/dist/renderer.js +9 -9
  39. package/dist/resize.d.ts +5 -4
  40. package/dist/resize.js +2 -2
  41. package/dist/routing.d.ts +6 -6
  42. package/dist/routing.js +1 -1
  43. package/dist/{types-XBcDEp3Y.d.ts → types-DEALFt5F.d.ts} +10 -6
  44. package/dist/{types-DIQAisSG.d.ts → types-bcc7jcUy.d.ts} +116 -15
  45. package/dist/{types-miXHGrZM.d.ts → types-ei3UMl9R.d.ts} +1 -1
  46. package/package.json +9 -9
  47. package/dist/chunk-2KKYDDDD.js.map +0 -1
  48. package/dist/chunk-KIVJXUYE.js.map +0 -1
  49. package/dist/chunk-TORKRNFY.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,33 +1,33 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { RefObject, ReactNode, Ref, MouseEvent as MouseEvent$1, ComponentType, MutableRefObject } from 'react';
2
+ import React__default, { RefObject, ReactNode, Ref, MouseEvent, ComponentType, 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-nnXU4VjN.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-nnXU4VjN.js';
7
- import { R as RenderLayer, D as Dims, a as DeviceProfile, b as DetectedDeviceFacts, C as Condition, c as Rule, d as RuleCtx, V as VisibilityRules, e as ChromeCtx, f as ChromeId, A as Action, I as InertiaConfig, g as ViewAnimationOptions, h as DepSchema, S as SliceDep, i as ActionsRegistry, T as Tool, j as AffordanceHit, k as Dispatcher, l as ToolDef, m as ViewportToolDef, n as AnyTool, O as OverlayPosition, o as ToolKeybinding, H as HotkeyTrigger, L as LayerHit, p as OngoingOverlay, q as ChromeState, P as PanBounds, r as SelectionApi, U as UseSelectionOptions, s as InsertExtras, B as BuiltinShapeToolId, G as GeometryProjection, t as ContentHandlerEntry, u as SvgIngestOptions, v as ActionsProp, w as Animator, x as Affordance, y as AffordanceRegion, z as AffordanceBinding, E as CommonAffordanceScratch, F as ColorOverrideRegistry, J as BooleansAdapter, K as UseAnimatorOptions, M as SpringPresetName, N as EasingSpec, Q as AnimationHandle, W as VertexColorChannel, X as SampledTrack, Y as Eligibility, Z as BindingScope, _ as Contribution, $ as ScopedBinding } from './registry-BwY_DxJM.js';
8
- export { a0 as ALWAYS, a1 as ActionDeps, a2 as ActionDisabledReason, a3 as ActionEnabledResult, a4 as ActionEntry, a5 as ActionsProvider, a6 as ActiveToolContextProvider, a7 as ActiveToolContextProviderIfRoot, a8 as ActiveToolContextProviderProps, a9 as ActiveToolContextValue, aa as AnimateToBoundsOptions, ab as AreaSelectDep, ac as BezierEasing, ad as BindingOpts, ae as BooleanOp, af as BooleanOpResult, ag as BoundGesture, ah as BuildRuleCtxArgs, ai as ClaimableGesture, aj as ClipboardDep, ak as ClipboardIngestCtx, al as ColorOverride, am as ColorOverrideFn, an as CustomPaintContext, ao as DecayLoopConfig, ap as DecayOptions, aq as DepName, ar as DepRegistry, as as DepRegistryProvider, at as DispatcherContext, au as DragSample, av as EASINGS, aw as EasingFn, ax as EasingName, ay as EditAnchorsDep, az as EventTrack, aA as GestureBinding, aB as IDENTITY_POSE_COMPOSITION, aC as ImmediateInvoker, aD as IngestCtx, aE as IngestionDep, aF as InsertDep, aG as Interpolate, aH as InterpolatorFactory, aI as InvocationCtx, aJ as Invoker, aK as KIT_SHAPE_KINDS, aL as Keyframe, aM as LassoSelectDep, aN as LayerCommandCache, aO as LayoutDep, aP as LoopFactory, aQ as LoopOptions, aR as MatchResult, aS as NEVER, aT as NestedTimeline, aU as NodeAtPointDep, aV as OngoingHandle, aW as OngoingInvoker, aX as PhysicsHandle, aY as PhysicsOptions, aZ as Point2, a_ as PointerContextProvider, a$ as PointerContextValue, b0 as PointerWorldPos, b1 as PoseAdapter, b2 as PoseComposition, b3 as ResizePolicy, b4 as ResolveAllOptions, b5 as ResolveOnlyResult, b6 as ResolvedCandidate, b7 as SPRING_PRESETS, b8 as SelectionExtendKey, b9 as SelectionMode, ba as Selector, bb as SnapDep, bc as SpringOptions, bd as SpringPreset, be as StaggerBuilder, bf as StaggerDelay, bg as StaggerFactory, bh as StaggerOptions, bi as StaggerPerItem, bj as StaggerSpringPoseOptions, bk as StaggerTweenOptions, bl as SvgUnpacker, bm as TextEditDep, bn as TimelineHandle, bo as TimelineOptions, bp as TimelineTrack, bq as ToolCtx, br as ToolModifiers, bs as ToolPresentation, bt as ToolSlot, bu as Track, bv as TweenLoopOptions, bw as TweenOptions, bx as UiOngoingControl, by as VIEW_ANIMATION_KEY, bz as ViewAnimationApi, bA as ViewApi, bB as ViewChannel, bC as actionBindings, bD as applyBooleanOp, bE as buildRuleCtx, bF as clipboardCopyAction, bG as clipboardCutAction, bH as composeRectPose, bI as composeWorldPose, bJ as createDispatcher, bK as cubicBezierEasing, bL as decomposeRectPose, bM as describeRule, bN as drawLayers, bO as drawOneLayer, bP as easeIn, bQ as easeInBack, bR as easeInBounce, bS as easeInCirc, bT as easeInCubic, bU as easeInElastic, bV as easeInExpo, bW as easeInOut, bX as easeInOutBack, bY as easeInOutBounce, bZ as easeInOutCirc, b_ as easeInOutCubic, b$ as easeInOutElastic, c0 as easeInOutExpo, c1 as easeInOutQuad, c2 as easeInOutQuart, c3 as easeInOutQuint, c4 as easeInOutSine, c5 as easeInQuad, c6 as easeInQuart, c7 as easeInQuint, c8 as easeInSine, c9 as easeOut, ca as easeOutBack, cb as easeOutBounce, cc as easeOutCirc, cd as easeOutCubic, ce as easeOutElastic, cf as easeOutExpo, cg as easeOutQuad, ch as easeOutQuart, ci as easeOutQuint, cj as easeOutSine, ck as enterTextEditAction, cl as evaluate, cm as evaluateEnabled, cn as isLayerPainted, co as isLayerVisible, cp as linear, cq as rebaseLocalPose, cr as registerContentHandler, cs as resolveEasing, ct as resolveParams, cu as sliceAction, cv as specificity, cw as translateRectPose, cx as useAction, cy as useActionsRegistry, cz as useActiveToolContext, cA as useDecayLoop, cB as useDepRegistry, cC as useDepSource, cD as useOptionalActiveToolContext, cE as useOptionalDepRegistry, cF as usePointerContext, cG as useSelection, cH as useViewAnimation, cI as worldPoseLookup } from './registry-BwY_DxJM.js';
5
+ import { a as UnitValue, b as UnitSystem, U as UseMoveOptions, O as OriginProjection } from './grid-0Pbn5B2C.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-0Pbn5B2C.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, I as InertiaConfig, g as ViewAnimationOptions, h as DepSchema, S as SliceDep, i as ActionsRegistry, T as Tool, j as AffordanceHit, k as Dispatcher, l as ToolDef, m as ViewportToolDef, n as AnyTool, O as OverlayPosition, o as ToolKeybinding, H as HotkeyTrigger, L as LayerHit, p as OngoingOverlay, q as ChromeState, r as SelectionApi, s as LayerGroup, U as UseSelectionOptions, t as InsertExtras, B as BuiltinShapeToolId, G as GeometryProjection, u as ContentHandlerEntry, v as SvgIngestOptions, P as PanBounds, w as ActionsProp, x as Animator, y as Affordance, z as AffordanceRegion, E as AffordanceBinding, F as CommonAffordanceScratch, J as ColorOverrideRegistry, K as BooleansAdapter, M as UseAnimatorOptions, N as SpringPresetName, Q as EasingSpec, W as AnimationHandle, X as VertexColorChannel, Y as SampledTrack, Z as Eligibility, _ as BindingScope, $ as Contribution, a0 as ScopedBinding } from './registry-BY-wI9gm.js';
8
+ export { a1 as ALWAYS, a2 as ActionDeps, a3 as ActionDisabledReason, a4 as ActionEnabledResult, a5 as ActionEntry, a6 as ActionsProvider, a7 as ActionsScope, a8 as ActiveToolContextProvider, a9 as ActiveToolContextProviderIfRoot, aa as ActiveToolContextProviderProps, ab as ActiveToolContextValue, ac as AnimateToBoundsOptions, ad as AreaSelectDep, ae as BezierEasing, af as BindingOpts, ag as BooleanOp, ah as BooleanOpResult, ai as BoundGesture, aj as BuildRuleCtxArgs, ak as ClaimableGesture, al as ClipboardDep, am as ClipboardIngestCtx, an as ColorOverride, ao as ColorOverrideFn, ap as CustomPaintContext, aq as DecayLoopConfig, ar as DecayOptions, as as DepName, at as DepRegistry, au as DepRegistryProvider, av as DispatcherContext, aw as DragSample, ax as EASINGS, ay as EasingFn, az as EasingName, aA as EditAnchorsDep, aB as EventTrack, aC as GestureBinding, aD as IDENTITY_POSE_COMPOSITION, aE as ImmediateInvoker, aF as IngestCtx, aG as IngestionDep, aH as InsertDep, aI as Interpolate, aJ as InterpolatorFactory, aK as InvocationCtx, aL as Invoker, aM as KIT_SHAPE_KINDS, aN as Keyframe, aO as LassoSelectDep, aP as LayerCommandCache, aQ as LayerDrawFailure, aR as LayoutDep, aS as LoopFactory, aT as LoopOptions, aU as MatchResult, aV as NEVER, aW as NestedTimeline, aX as NodeAtPointDep, aY as OngoingHandle, aZ as OngoingInvoker, a_ as PhysicsHandle, a$ as PhysicsOptions, b0 as Point2, b1 as PointerContextProvider, b2 as PointerContextValue, b3 as PointerWorldPos, b4 as PoseAdapter, b5 as PoseComposition, b6 as ResizePolicy, b7 as ResolveAllOptions, b8 as ResolveOnlyResult, b9 as ResolvedCandidate, ba as SPRING_PRESETS, bb as SelectionExtendKey, bc as SelectionMode, bd as Selector, be as SnapDep, bf as SpringOptions, bg as SpringPreset, bh as StaggerBuilder, bi as StaggerDelay, bj as StaggerFactory, bk as StaggerOptions, bl as StaggerPerItem, bm as StaggerSpringPoseOptions, bn as StaggerTweenOptions, bo as SvgUnpacker, bp as TextEditDep, bq as TimelineHandle, br as TimelineOptions, bs as TimelineTrack, bt as ToolCtx, bu as ToolModifiers, bv as ToolPresentation, bw as ToolSlot, bx as Track, by as TweenLoopOptions, bz as TweenOptions, bA as UiOngoingControl, bB as VIEW_ANIMATION_KEY, bC as ViewAnimationApi, bD as ViewApi, bE as ViewChannel, bF as actionBindings, bG as applyBooleanOp, bH as buildRuleCtx, bI as clipboardCopyAction, bJ as clipboardCutAction, bK as composeRectPose, bL as composeWorldPose, bM as createDispatcher, bN as cubicBezierEasing, bO as decomposeRectPose, bP as describeRule, bQ as drawLayers, bR as drawOneLayer, bS as easeIn, bT as easeInBack, bU as easeInBounce, bV as easeInCirc, bW as easeInCubic, bX as easeInElastic, bY as easeInExpo, bZ as easeInOut, b_ as easeInOutBack, b$ as easeInOutBounce, c0 as easeInOutCirc, c1 as easeInOutCubic, c2 as easeInOutElastic, c3 as easeInOutExpo, c4 as easeInOutQuad, c5 as easeInOutQuart, c6 as easeInOutQuint, c7 as easeInOutSine, c8 as easeInQuad, c9 as easeInQuart, ca as easeInQuint, cb as easeInSine, cc as easeOut, cd as easeOutBack, ce as easeOutBounce, cf as easeOutCirc, cg as easeOutCubic, ch as easeOutElastic, ci as easeOutExpo, cj as easeOutQuad, ck as easeOutQuart, cl as easeOutQuint, cm as easeOutSine, cn as enterTextEditAction, co as evaluate, cp as evaluateEnabled, cq as isLayerPainted, cr as isLayerVisible, cs as linear, ct as rebaseLocalPose, cu as registerContentHandler, cv as resolveEasing, cw as resolveParams, cx as sliceAction, cy as specificity, cz as translateRectPose, cA as useAction, cB as useActionsRegistry, cC as useActiveToolContext, cD as useDecayLoop, cE as useDepRegistry, cF as useDepSource, cG as useOptionalActiveToolContext, cH as useOptionalDepRegistry, cI as usePointerContext, cJ as useSelection, cK as useViewAnimation, cL as worldPoseLookup } from './registry-BY-wI9gm.js';
9
9
  import { Stroke, FillStyle, TextureHandle, TilePatternSpec, GradientKind, GradStop, GradientFill, GradientUnits, MarkerKey, MarkerRef } from '@weasel-js/paint';
10
10
  export { FillStyle, GradStop, GradientFill, GradientKind, GradientUnits, KitMarkerKey, MarkerKey, MarkerRef, Region, STROKE_DASH_RATIOS, Stroke, StrokeAlign, StrokeDashStyle, TextureHandle, TilePatternSpec, alignedStrokeRect, dashForStrokeStyle, strokeDashStyleOf } from '@weasel-js/paint';
11
- import { R as RectPose, S as Scene, N as NodeId, a as Node$1, b as SerializedScene, U as UseSceneOptions, c as SceneRegistry, d as RegisteredOp } from './types-DIQAisSG.js';
12
- export { A as AddLayerSpec, e as AddNodeSpec, C as ContainerNode, L as LayerRecord, f as LeafNode, P as PoseOverride, g as PoseOverrides, h as SerializedNode, i as SystemLayerRecord, j as SystemLayerSpec, k as UserLayerRecord, l as asNodeId } from './types-DIQAisSG.js';
13
- import { B as Bounds, P as PoseProjection, V as ViewportDims } from './geometry-Dtt_k6Dq.js';
14
- export { F as FitViewToBoundsOptions, R as RECT_POSE_DESCRIPTOR, a as ROTATED_POSE_DESCRIPTOR, f as fitViewToBounds } from './geometry-Dtt_k6Dq.js';
11
+ import { N as NodeId, S as Scene, R as RectPose, a as Node$1, b as SerializedScene, U as UseSceneOptions, c as SceneRegistry, d as RegisteredOp, P as PoseOverrides, D as DerivedDep } from './types-bcc7jcUy.js';
12
+ export { A as AddLayerSpec, e as AddNodeSpec, C as ContainerNode, L as LayerRecord, f as LeafNode, g as PoseOverride, h as SerializedNode, i as SystemLayerRecord, j as SystemLayerSpec, k as UserLayerRecord, l as asNodeId } from './types-bcc7jcUy.js';
13
+ import { B as Bounds, P as PoseProjection, V as ViewportDims } from './geometry-6fCNhAux.js';
14
+ export { F as FitViewToBoundsOptions, R as RECT_POSE_DESCRIPTOR, a as ROTATED_POSE_DESCRIPTOR, f as fitViewToBounds } from './geometry-6fCNhAux.js';
15
15
  import { GestureSpec, BodyClassification, IngestItem } from '@weasel-js/gestures';
16
16
  export { ClickSpec, DragSpec, DropSpec, GestureSpec, IngestItem, InputEvent, KeyHeldSpec, KeySpec, ModSpec, MultiTouchSpec, PasteSpec, TargetSpec, WheelSpec } from '@weasel-js/gestures';
17
- import { M as ModifierState, R as ResizePose, B as BoundsConstraint, P as PointSnapBehavior, L as LassoSelectBehavior, a as RotatedPose, e as RotateBehavior, S as SnapStrategy, c as ResizeAnchor, b as MoveBehavior, I as InsertBehavior } from './types-miXHGrZM.js';
18
- export { A as ActionBehavior, f as AreaSelectOverlay, g as BehaviorMoveResult, h as BehaviorResult, C as CloneBehavior, i as CloneLayer, j as ClonePose, G as GestureContext, k as GroupTransform, l as InsertMoveResult, m as InsertOverlay, n as InsertPoint, o as InsertProposed, p as LassoSelectMoveResult, q as LassoSelectOverlay, r as LassoSelectPose, s as LassoSelectProposed, t as PointSnapContext, d as PointSnapFrame, u as PointSnapResult, v as PointerState, w as ResizeMoveResult, x as ResizeOverlay, y as ResizeProposed, z as RotateMoveResult, D as RotateOverlay, E as RotateProposed } from './types-miXHGrZM.js';
19
- import { U as UseResizeOptions } from './pointSnapToGrid-Dmthv94u.js';
20
- export { C as CORNER_ANCHORS, a as CornerAnchor, e as CornerEdge, b as CornerHandle, c as cornerPoint, d as cornerResizeHandles, h as hitCornerHandle, p as pointSnapToGrid } from './pointSnapToGrid-Dmthv94u.js';
17
+ import { M as ModifierState, R as ResizePose, B as BoundsConstraint, P as PointSnapBehavior, L as LassoSelectBehavior, a as RotatedPose, e as RotateBehavior, S as SnapStrategy, c as ResizeAnchor, b as MoveBehavior, I as InsertBehavior } from './types-ei3UMl9R.js';
18
+ export { A as ActionBehavior, f as AreaSelectOverlay, g as BehaviorMoveResult, h as BehaviorResult, C as CloneBehavior, i as CloneLayer, j as ClonePose, G as GestureContext, k as GroupTransform, l as InsertMoveResult, m as InsertOverlay, n as InsertPoint, o as InsertProposed, p as LassoSelectMoveResult, q as LassoSelectOverlay, r as LassoSelectPose, s as LassoSelectProposed, t as PointSnapContext, d as PointSnapFrame, u as PointSnapResult, v as PointerState, w as ResizeMoveResult, x as ResizeOverlay, y as ResizeProposed, z as RotateMoveResult, D as RotateOverlay, E as RotateProposed } from './types-ei3UMl9R.js';
19
+ import { U as UseResizeOptions } from './autoPoseDescriptor-DF1SnnSx.js';
20
+ export { A as AUTO_POSE_DESCRIPTOR, C as CORNER_ANCHORS, a as CornerAnchor, e as CornerEdge, b as CornerHandle, c as cornerPoint, d as cornerResizeHandles, h as hitCornerHandle, i as isPathLike, p as pointSnapToGrid } from './autoPoseDescriptor-DF1SnnSx.js';
21
21
  import { ResolvedCursor, CursorSpec } from '@weasel-js/cursor';
22
22
  export { BakeOptions, CursorGlyph, CursorGlyphName, CursorGlyphSpec, CursorSpec, ResolvedCursor, bakeCursor, cursorFor, resolveCursor, resolveCursorTier } from '@weasel-js/cursor';
23
- import { M as MoveAdapter, A as AreaSelectAdapter, R as RotateAdapter, b as LassoHitMode, c as LassoSelectAdapter, d as ResizeAdapter, L as LayoutStrategy, e as LayerEnumerableAdapter, I as InsertAdapter, C as ClipboardSnapshot, O as OrderedAdapter, a as SceneAdapter, f as LayoutSnap } from './types-XBcDEp3Y.js';
24
- export { g as ContainerBounds, D as DropTarget, h as LayoutChild, i as LayoutContainer, j as LayoutDragged, S as SnapTarget } from './types-XBcDEp3Y.js';
23
+ import { M as MoveAdapter, A as AreaSelectAdapter, R as RotateAdapter, b as LassoHitMode, c as LassoSelectAdapter, d as ResizeAdapter, L as LayoutStrategy, e as LayerEnumerableAdapter, I as InsertAdapter, C as ClipboardSnapshot, O as OrderedAdapter, a as SceneAdapter, f as LayoutSnap } from './types-DEALFt5F.js';
24
+ export { g as ContainerBounds, D as DropTarget, h as LayoutChild, i as LayoutContainer, j as LayoutDragged, S as SnapTarget } from './types-DEALFt5F.js';
25
25
  import { D as DebugSink, a as DebugConfig, b as DebugSnapshot, c as DebugStrokes, d as DebugTheme } from './types-BHK2dkMu.js';
26
26
  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';
27
27
  import { a as PolygonPath, P as Path, b as PathFillRule, R as RectPath } from './path-JEV2c5If.js';
28
28
  import * as react_jsx_runtime from 'react/jsx-runtime';
29
- import { D as DrawCommand, b as ShaderProgramHandle, P as PathDrawCommand, M as Mat3$1 } from './DrawCommand-Ch8W63oQ.js';
30
- export { G as GroupDrawCommand, I as ImageDrawCommand, S as SPRITE_STRIDE, a as ShaderDrawCommand, c as ShaderUniform, e as SpritesDrawCommand, T as TextDrawCommand, m as mat3 } from './DrawCommand-Ch8W63oQ.js';
29
+ import { D as DrawCommand, b as ShaderProgramHandle, P as PathDrawCommand, M as Mat3$1 } from './DrawCommand-CD-ug3d9.js';
30
+ export { E as Effect, G as GroupDrawCommand, I as ImageDrawCommand, S as SPRITE_STRIDE, a as ShaderDrawCommand, c as ShaderUniform, e as SpritesDrawCommand, T as TextDrawCommand, m as mat3, r as registerEffect } from './DrawCommand-CD-ug3d9.js';
31
31
  import { Op, HistorySelection, CreateHistoryOptions, History } from '@weasel-js/history';
32
32
  export * from '@weasel-js/history';
33
33
  export { Op } from '@weasel-js/history';
@@ -35,10 +35,10 @@ import { PlacementAlign, Rect, Mat3 } from '@weasel-js/geom';
35
35
  export { PATH_C, PATH_CMD_LENGTHS, PATH_L, PATH_M, PATH_Q, PATH_Z, Rect, pathCommandCoordCount } from '@weasel-js/geom';
36
36
  import { TextRenderer, TextPose, StyledRun, TextStyle, TextPaint, TextVerticalAlign } from '@weasel-js/text';
37
37
  export { DEFAULT_TEXT_STYLE, LaidOutDecoration, LaidOutGroup, LaidOutLineBox, LaidOutOutlineGlyph, LaidOutQuad, LaidOutRuns, LayoutLine, LayoutResult, LayoutRunsOpts, MARKDOWN_RUN_GRAMMAR, MarkdownFontOptions, MeasureFn, MeasureTextBoundsOpts, MeasuredText, PositionedRun, ResolvedRun, ResolvedTextStyle, RunFlag, RunGrammar, RunMarker, SCRIPT_METRICS, StyledRun, TextAlign, TextDirection, TextLineBoxesOpts, TextPaint, TextPose, TextRenderer, TextStyle, TextVerticalAlign, cachedLayoutRuns, createMarkdownRenderer, fontString, layoutMarkdown, layoutRuns, markdownToRuns, measureText, measureTextBounds, measuredWidth, resolveAlign, resolveRuns, resolveTextStyle, runsToMarkdown, runsToPlainText, textLineBoxes, toRuns, verticalAlignOffset } from '@weasel-js/text';
38
- import { g as ShaderProgram } from './stroke-Dq8nL4A2.js';
39
- export { a as ImageMinification, R as RenderTarget, b as SpriteSheet, f as frameRect, r as resolveStrokeWidth, v as viewToMat3 } from './stroke-Dq8nL4A2.js';
38
+ import { i as ShaderProgram } from './builtins-BXFBXegF.js';
39
+ export { a as ImageMinification, R as RenderTarget, b as SpriteSheet, e as blur, g as frameRect, r as resolveStrokeWidth, v as viewToMat3, h as vignette } from './builtins-BXFBXegF.js';
40
40
  import { G as Guide } from './types-D2tTKEU0.js';
41
- export { U as UseInsertOptions } from './options-CdFl510T.js';
41
+ export { U as UseInsertOptions } from './options-DbYLImvq.js';
42
42
  export { UseClipboardOpsOptions, UseClipboardOpsReturn, WEASEL_CLIPBOARD_MIME, WEASEL_CLIPBOARD_MIME_WEB, buildWeaselClipboardText, embedWeaselMetadataInSvg, extractWeaselClipboardFromSvg, parseWeaselClipboardText, sniffWeaselClipboardText, useClipboardOps } from './clipboard.js';
43
43
  export { cloneByAltDrag } from './clone.js';
44
44
  export { FontVariant, LocalFontOutlinesResult, OutlineFontStyle, OutlineSource, OutlineStatus, OutlineVariant, canQueryLocalFonts, enableLocalFontOutlines, hasFontOutlines, isCanvasFont, listFontOutlines, outlineStatus, registerCanvasFont, registerFont, registerFontOutlines, subscribeGlyphReady, unregisterCanvasFont, unregisterFontOutlines } from '@weasel-js/font';
@@ -442,9 +442,11 @@ interface CreateParallaxLayerOpts<TData> extends ParallaxOpts {
442
442
  }
443
443
  /**
444
444
  * Wrap source RenderLayers in a parallax plane. The plane's inner view is
445
- * derived from the camera view per {@link deriveParallaxView}; source layers
446
- * run under that inner view and the result is emitted as `space: 'screen'`
447
- * so the outer Canvas applies no further transform.
445
+ * derived from the camera view per {@link deriveParallaxView}; each source
446
+ * layer is drawn through it by `drawOneLayer`, so a `space: 'world'` source
447
+ * gets the inner view's transform and a `space: 'screen'` one does not. The
448
+ * plane itself is emitted as `space: 'screen'` — its children already carry
449
+ * whatever transform they need, and the outer Canvas must add none.
448
450
  *
449
451
  * **Cosmetic only (v1):** pointer events still target the outer view.
450
452
  * Objects on parallax planes are paint, not clickable scene nodes. Use the
@@ -482,23 +484,9 @@ interface SimulationForce<TNode extends SimulationNode = SimulationNode> {
482
484
  (alpha: number): void;
483
485
  initialize?(nodes: TNode[], random?: () => number): void;
484
486
  }
485
- /** Options for `useSimulation`: the nodes to move, the forces acting on them,
486
- * and the cooling schedule that decides when the simulation settles. */
487
- interface UseSimulationOptions<TNode extends SimulationNode> {
488
- /** Mutable array of nodes. Kit + forces mutate vx/vy/x/y in place. */
489
- nodes: TNode[];
490
- /** Forces applied per tick. Each may implement `initialize` for setup. */
491
- forces?: SimulationForce<TNode>[];
492
- /** Initial alpha. Default 1. */
493
- alpha?: number;
494
- /** Settle threshold. When alpha drops below and alphaTarget is 0, onEnd fires. Default 0.001. */
495
- alphaMin?: number;
496
- /** Per-tick decay rate toward alphaTarget. Default 1 - 0.001^(1/300) ≈ 0.0228. */
497
- alphaDecay?: number;
498
- /** Target alpha. Set above alphaMin to keep sim warm (e.g. during drag). Default 0. */
499
- alphaTarget?: number;
500
- /** Friction multiplier on velocity per tick: vx *= (1 - velocityDecay). Default 0.4. */
501
- velocityDecay?: number;
487
+ /** Options for `useSimulation`: everything {@link SimulationOptions} carries,
488
+ * plus the loop's own callbacks and clock. */
489
+ interface UseSimulationOptions<TNode extends SimulationNode> extends SimulationOptions<TNode> {
502
490
  /** Fired after each integration step. */
503
491
  onTick?: (nodes: TNode[]) => void;
504
492
  /** Fired once when the sim settles (alpha < alphaMin && alphaTarget === 0). */
@@ -508,7 +496,7 @@ interface UseSimulationOptions<TNode extends SimulationNode> {
508
496
  cancelFrame?: (handle: number) => void;
509
497
  }
510
498
  /**
511
- * A running force simulation over a set of nodes.
499
+ * A force simulation over a set of nodes, with no clock of its own.
512
500
  *
513
501
  * Each tick applies every force and then integrates velocities, scaled by
514
502
  * `alpha` — a temperature that decays toward `alphaTarget` so the layout
@@ -516,8 +504,12 @@ interface UseSimulationOptions<TNode extends SimulationNode> {
516
504
  * which is what a drag does.
517
505
  *
518
506
  * Nodes are mutated in place; the simulation holds the array, not a copy.
507
+ *
508
+ * Nothing here advances time. {@link Simulation} adds the frame loop; a caller
509
+ * that wants the whole relaxation at once — a layout pass, a pre-warm, a test
510
+ * — drives {@link SimulationCore.tick} itself.
519
511
  */
520
- interface Simulation<TNode extends SimulationNode> {
512
+ interface SimulationCore<TNode extends SimulationNode> {
521
513
  readonly nodes: TNode[];
522
514
  setNodes(nodes: TNode[]): this;
523
515
  setForces(forces: SimulationForce<TNode>[]): this;
@@ -531,10 +523,6 @@ interface Simulation<TNode extends SimulationNode> {
531
523
  alphaMin(value: number): this;
532
524
  velocityDecay(): number;
533
525
  velocityDecay(value: number): this;
534
- /** Resume the RAF loop. If alpha < alphaMin, reset alpha to 1. */
535
- restart(): this;
536
- /** Cancel the RAF loop. Does not change alpha. */
537
- stop(): this;
538
526
  /**
539
527
  * Run the tick body synchronously `iterations` times. Does NOT fire
540
528
  * onTick or onEnd (matches d3-force). Used for offscreen pre-warm and tests.
@@ -542,6 +530,34 @@ interface Simulation<TNode extends SimulationNode> {
542
530
  tick(iterations?: number): this;
543
531
  isSettled(): boolean;
544
532
  }
533
+ /** A {@link SimulationCore} running on a frame loop. */
534
+ interface Simulation<TNode extends SimulationNode> extends SimulationCore<TNode> {
535
+ /** Resume the RAF loop. If alpha < alphaMin, reset alpha to 1. */
536
+ restart(): this;
537
+ /** Cancel the RAF loop. Does not change alpha. */
538
+ stop(): this;
539
+ }
540
+ /** What {@link SimulationCore} needs: the nodes, the forces acting on them,
541
+ * and the cooling schedule. {@link UseSimulationOptions} adds the loop's. */
542
+ interface SimulationOptions<TNode extends SimulationNode> {
543
+ /** Mutable array of nodes. Kit + forces mutate vx/vy/x/y in place. */
544
+ nodes: TNode[];
545
+ /** Forces applied per tick. Each may implement `initialize` for setup. */
546
+ forces?: SimulationForce<TNode>[];
547
+ /** Initial alpha. Default 1. */
548
+ alpha?: number;
549
+ /** Settle threshold. When alpha drops below and alphaTarget is 0, onEnd fires. Default 0.001. */
550
+ alphaMin?: number;
551
+ /** Per-tick decay rate toward alphaTarget. Default 1 - 0.001^(1/300) ≈ 0.0228. */
552
+ alphaDecay?: number;
553
+ /** Target alpha. Set above alphaMin to keep sim warm (e.g. during drag). Default 0. */
554
+ alphaTarget?: number;
555
+ /** Friction multiplier on velocity per tick: vx *= (1 - velocityDecay). Default 0.4. */
556
+ velocityDecay?: number;
557
+ /** Handed to each force's `initialize`. Default `Math.random`; pass a seeded
558
+ * source to make a run reproducible. */
559
+ random?: () => number;
560
+ }
545
561
  /** Default alpha decay: such that alpha drops from 1 to alphaMin (0.001) in 300 ticks. */
546
562
  declare const DEFAULT_ALPHA_DECAY: number;
547
563
  /** Alpha below which a cooling simulation is considered settled. */
@@ -551,9 +567,24 @@ declare const DEFAULT_ALPHA_MIN = 0.001;
551
567
  declare const DEFAULT_VELOCITY_DECAY = 0.4;
552
568
 
553
569
  /**
554
- * Continuous N-body simulation primitive. Owns a RAF loop and a velocity-Verlet
555
- * integrator; forces are pluggable functions matching d3-force's protocol so
556
- * d3-force's bundled forces work without translation.
570
+ * The integrator, with no clock attached.
571
+ *
572
+ * Velocity-Verlet over a pluggable force list, contract-compatible with
573
+ * d3-force so d3's own bundled forces drop in untranslated. Nothing here
574
+ * advances time: `tick()` is the only thing that moves a node, and the caller
575
+ * decides how often to call it. `useSimulation` calls it once a frame; a
576
+ * layout pass calls it a few hundred times in one go and reads the result.
577
+ *
578
+ * Splitting it out is what lets a *pure* function run a relaxation — a React
579
+ * hook cannot, and the alternative was a second integrator drifting away from
580
+ * this one.
581
+ */
582
+
583
+ declare function createSimulation<TNode extends SimulationNode>(opts: SimulationOptions<TNode>): SimulationCore<TNode>;
584
+
585
+ /**
586
+ * Continuous N-body simulation primitive: `createSimulation`'s integrator on a
587
+ * frame loop.
557
588
  *
558
589
  * The kit is adapter-agnostic — `onTick(nodes)` fires after each integration
559
590
  * step and the consumer decides how (and whether) to write through to scene
@@ -562,6 +593,47 @@ declare const DEFAULT_VELOCITY_DECAY = 0.4;
562
593
  */
563
594
  declare function useSimulation<TNode extends SimulationNode>(opts: UseSimulationOptions<TNode>): Simulation<TNode>;
564
595
 
596
+ /** What a producer is told before it is asked for a frame. */
597
+ interface PoseRunCtx<TPose> {
598
+ /** Nodes another gesture is moving, and the pose each is drawn at. The run
599
+ * will not write these, so a producer holds them fixed. */
600
+ pinned: ReadonlyMap<NodeId, TPose>;
601
+ /** Frames this run has produced, starting at 0. */
602
+ frame: number;
603
+ }
604
+ /** One frame of a run. */
605
+ interface PoseRunStep<TPose> {
606
+ /** Where the nodes it drives are this frame — the whole picture, not a
607
+ * delta. An id the frame omits stops being published, which is how a node
608
+ * leaves the run's hands: a producer that drops a grabbed box and its rows
609
+ * from one frame has released them by the next. */
610
+ poses: Iterable<readonly [NodeId, TPose]>;
611
+ /** Whether the run is finished. The frame is published either way, and a
612
+ * finished run commits. */
613
+ done: boolean;
614
+ }
615
+ interface UsePoseRunOptions<TPose> {
616
+ scene: Scene<unknown, string, TPose>;
617
+ step: (ctx: PoseRunCtx<TPose>) => PoseRunStep<TPose>;
618
+ /** The undo entry's name. Default `'Layout'`. */
619
+ label?: string;
620
+ /** How many nodes the commit wrote. Fires after the ops land. */
621
+ onCommit?: (moved: number) => void;
622
+ /** Clock injection, for tests. Defaults to `requestAnimationFrame`. */
623
+ requestFrame?: (cb: (t: number) => void) => number;
624
+ cancelFrame?: (handle: number) => void;
625
+ }
626
+ interface PoseRun {
627
+ /** Begin, or continue where a `stop` left off. Idempotent while running. */
628
+ start(): void;
629
+ /** Finish now: commit what is published, then drop the overrides. */
630
+ stop(): void;
631
+ /** Abandon: drop the overrides and write nothing, like a canceled drag. */
632
+ cancel(): void;
633
+ isRunning(): boolean;
634
+ }
635
+ declare function usePoseRun<TPose>(opts: UsePoseRunOptions<TPose>): PoseRun;
636
+
565
637
  /**
566
638
  * `useNodeOverlayFrame` — the coordinate frame a DOM overlay pinned to one
567
639
  * scene node needs: the node's world box, the projection from that box's
@@ -1157,7 +1229,7 @@ declare function zoomAt(view: View, anchor: {
1157
1229
  * unit): `1` is 100%, `0.1` is 10%, `8` is 800%.
1158
1230
  *
1159
1231
  * Every zoom path defaults from these — `zoomAt`, the `viewport.zoom` and
1160
- * pinch actions, `fitViewToBounds`, `computeWheelAction`, `useZoom`. They
1232
+ * pinch actions, `fitViewToBounds`, `computeWheelAction`. They
1161
1233
  * used to carry two disagreeing pairs, so a fit could legally land at 10x
1162
1234
  * and the next pinch frame would clamp it back to 8x.
1163
1235
  */
@@ -1195,73 +1267,6 @@ interface NodeClientRect {
1195
1267
  */
1196
1268
  declare function sceneNodeClientRect(opts: SceneNodeClientRectOpts): NodeClientRect | null;
1197
1269
 
1198
- /**
1199
- * @deprecated Prefer the descriptor-based viewport idiom: `<SceneCanvas>` now
1200
- * registers `viewport.pan` and `viewport.zoom` action descriptors via
1201
- * `useStandardActions` + `useGestureDispatcher`. Pass `useHandTool()` via
1202
- * `ambient` for drag-to-pan. The former `useWheelZoomTool`,
1203
- * `useKeyboardZoomTool`, and `useWheelPanTool` hooks are dissolved.
1204
- * `useZoom` was the original controller-style API; it remains exported with
1205
- * full test coverage but no kit-internal usage. Slated for removal in a future major.
1206
- */
1207
- interface UseZoomOptions {
1208
- zoom: number;
1209
- setZoom: (next: number) => void;
1210
- pan: {
1211
- x: number;
1212
- y: number;
1213
- };
1214
- setPan: (next: {
1215
- x: number;
1216
- y: number;
1217
- }) => void;
1218
- min?: number;
1219
- max?: number;
1220
- wheelStep?: number;
1221
- keyStep?: number;
1222
- viewport?: {
1223
- width: number;
1224
- height: number;
1225
- };
1226
- sources?: {
1227
- wheel?: boolean;
1228
- keys?: boolean;
1229
- doubleClick?: boolean;
1230
- pinch?: boolean;
1231
- };
1232
- wheelRequiresModifier?: boolean;
1233
- }
1234
- /**
1235
- * @deprecated See `UseZoomOptions` deprecation note. Prefer the
1236
- * descriptor-based viewport idiom.
1237
- */
1238
- interface UseZoomReturn {
1239
- onWheel(e: WheelEvent | React.WheelEvent): void;
1240
- onKeyDown(e: KeyboardEvent | React.KeyboardEvent): void;
1241
- onDoubleClick(e: MouseEvent | React.MouseEvent): void;
1242
- zoomTo(level: number, focal?: {
1243
- x: number;
1244
- y: number;
1245
- }): void;
1246
- zoomBy(factor: number, focal?: {
1247
- x: number;
1248
- y: number;
1249
- }): void;
1250
- reset(): void;
1251
- }
1252
- /**
1253
- * Wheel/key/double-click zoom with focal-point preservation; returns event handlers and `zoomTo`/`zoomBy`/`reset`.
1254
- *
1255
- * @deprecated Prefer the descriptor-based viewport idiom:
1256
- * `<SceneCanvas>` registers `viewport.pan` and `viewport.zoom` action
1257
- * descriptors automatically. Pass `useHandTool()` via `ambient` for
1258
- * drag-to-pan. `useZoom` covers the same input surface but doesn't
1259
- * integrate with the tool dispatcher, selection, or other gestures.
1260
- * No demo, no kit-internal hook, and no app currently consumes `useZoom`;
1261
- * slated for removal in a future major.
1262
- */
1263
- declare function useZoom(opts: UseZoomOptions): UseZoomReturn;
1264
-
1265
1270
  /**
1266
1271
  * Compute zoom and pan that fit `contentW x contentH` (in content units)
1267
1272
  * inside `viewportW x viewportH` (in pixels). `padRatio` is the fraction of
@@ -1578,7 +1583,7 @@ declare function actionShortcuts(action: Action): readonly ActionShortcut[];
1578
1583
  *
1579
1584
  * The per-frame poses still go *somewhere* the scene can see: the ephemeral
1580
1585
  * override table, which bypasses history entirely. That is what lets a node
1581
- * deriving its geometry from a dragged one follow the drag — `scenePoseLookup`
1586
+ * deriving its geometry from a dragged one follow the drag — `sceneDepLookup`
1582
1587
  * and the pick source both read overrides, and neither can see this action's
1583
1588
  * scratch. Keeping the frame in scratch alone is why the edge used to stay
1584
1589
  * anchored to the old endpoint and jump on drop.
@@ -2003,7 +2008,8 @@ declare const viewportDragPanAction: Action & {
2003
2008
  *
2004
2009
  * ## Design notes
2005
2010
  * The invoker switches on `params.kind`:
2006
- * - `'wheel'`: computes factor from deltaY, anchors zoom at (clientX, clientY).
2011
+ * - `'wheel'`: defers to `wheelZoom` (`core/viewport/wheelHandler`), the kit's
2012
+ * one statement of the wheel convention, anchored at (clientX, clientY).
2007
2013
  * The dispatcher merges wheel event data into params at dispatch time, and
2008
2014
  * converts the wheel event's client coords to canvas-local (subtracting the
2009
2015
  * canvas's bounding rect) before merging — `zoomAt` expects canvas-local.
@@ -2090,11 +2096,10 @@ declare const viewportZoomAction: Action & {
2090
2096
  *
2091
2097
  * ## Design notes
2092
2098
  * The dispatcher merges wheel event data (deltaX, deltaY, clientX, clientY)
2093
- * into params at dispatch time. The invoker
2094
- * reads them from the params bag.
2095
- *
2096
- * Pan delta is divided by view.scale so that one screen-pixel scroll equals
2097
- * one screen-pixel pan at any zoom level.
2099
+ * into params at dispatch time. The invoker reads them from the params bag
2100
+ * and defers to `wheelPan` (`core/viewport/wheelHandler`), the kit's one
2101
+ * statement of the wheel convention — which divides the delta by `view.scale`
2102
+ * so one screen-pixel scroll is one screen-pixel pan at any zoom.
2098
2103
  *
2099
2104
  * `axis` locks the pan to one axis, matching `viewport.dragPan`'s param of
2100
2105
  * the same name, so a consumer that wants a single-axis viewport can say so
@@ -2296,7 +2301,15 @@ interface UseStandardActionsOptions {
2296
2301
  pointer?: DepSchema['pointer'];
2297
2302
  /** Currently active tool id + hotkey-hold stack. */
2298
2303
  activeTool?: DepSchema['activeTool'];
2304
+ /**
2305
+ * Ids of kit-standard actions to leave unregistered, so a consumer can bind
2306
+ * its own. Ids that name no kit action are ignored;
2307
+ * `KIT_STANDARD_ACTION_IDS` is the full list.
2308
+ */
2309
+ exclude?: Iterable<string>;
2299
2310
  }
2311
+ /** Every id `useStandardActions` registers, in registration order. */
2312
+ declare const KIT_STANDARD_ACTION_IDS: readonly string[];
2300
2313
  /**
2301
2314
  * @experimental
2302
2315
  * Register each kit-standard dep source and action descriptor into the
@@ -2314,25 +2327,6 @@ interface UseStandardActionsOptions {
2314
2327
  */
2315
2328
  declare function useStandardActions(opts: UseStandardActionsOptions): void;
2316
2329
 
2317
- /**
2318
- * Shared scene-backed commit adapter for default actions.
2319
- *
2320
- * Default actions route data/layer/pose/parent mutations through the
2321
- * consumer's `applyOps` commit hook when one is present; when it isn't, they
2322
- * fall back to applying the committed ops directly against the scene through
2323
- * this adapter. It carries the scene-backed op-apply methods (`setPose` /
2324
- * `setParent` / `setData` / `setLayer` / `removeNode` / `insertNode` /
2325
- * `setChildOrder`) plus the read-side queries (`getNode` / `getNodes` /
2326
- * `getPose` / `getParent` / `getChildren` / `getSelection`) and
2327
- * `setSelection`. Known exclusions from the op factory roster — surfaces the
2328
- * scene doesn't own: `setPath` and `setText`.
2329
- *
2330
- * Lives in `interactions/actions/` (not `canvas/sceneAdapter.ts`) so default
2331
- * actions never import from `canvas/` — that back-edge would create an
2332
- * `interactions → canvas → interactions` cycle. Mirrors `moveGestureAdapter`,
2333
- * widened to all op-apply methods.
2334
- */
2335
-
2336
2330
  /** Build the adapter the default actions commit through when the consumer
2337
2331
  * supplies no `applyOps` hook of its own — it applies ops straight to the
2338
2332
  * scene. Path and text ops are not covered; those surfaces belong to their
@@ -2344,6 +2338,7 @@ declare function defaultCommitAdapter<TPose>(scene: Scene<unknown, string, TPose
2344
2338
  getSelection: () => string[];
2345
2339
  setSelection: (ids: string[]) => void;
2346
2340
  getParent: (id: string) => string | null;
2341
+ getRemovalClosure: (ids: readonly string[]) => string[];
2347
2342
  getChildren: (parentId: string | null) => string[];
2348
2343
  setChildOrder: (parentId: string | null, orderedIds: string[]) => void;
2349
2344
  setPose: (id: string, pose: TPose) => void;
@@ -2691,37 +2686,57 @@ interface VisibleRaf {
2691
2686
  declare function useVisibleRaf(frame: (time: number) => void, options?: VisibleRafOptions): VisibleRaf;
2692
2687
 
2693
2688
  /**
2694
- * Pure wheel-event reducer. Stateless sibling of `useZoom`'s
2695
- * `onWheel` handler — useful in tests, in non-React reducers, or anywhere
2696
- * the focal-point zoom math is needed without React lifecycle.
2689
+ * The kit's one wheel convention, as pure functions over `View`.
2697
2690
  *
2698
- * Conventions match the rest of the kit: `zoom` is a multiplier where `1`
2699
- * means 100%. The default bounds are the kit's system-wide zoom clamp
2700
- * ({@link DEFAULT_MIN_ZOOM} – {@link DEFAULT_MAX_ZOOM}).
2691
+ * ## Modifiers
2692
+ * - bare wheel → pan
2693
+ * - shift+wheel → horizontal pan (mouse wheels emit only `deltaY`)
2694
+ * - Cmd/Ctrl+wheel → zoom, anchored under the pointer. Ctrl also covers the
2695
+ * trackpad pinch, which browsers deliver as ctrl+wheel.
2696
+ *
2697
+ * ## Coordinates
2698
+ * `View.x` / `View.y` are world-space, so a pan delta — screen pixels, as the
2699
+ * DOM reports them — is divided by `View.scale` before it lands. The zoom
2700
+ * anchor is canvas-local: client coords minus the canvas's bounding rect.
2701
+ *
2702
+ * `viewport.wheelPan` and `viewport.zoom` are the wired form of these, and
2703
+ * call them rather than restating the math.
2701
2704
  */
2702
- /** Pure viewport state consumed and returned by `computeWheelAction`. */
2703
- interface WheelState {
2704
- /** Multiplier; `1` = 100% / no zoom. */
2705
- zoom: number;
2706
- panX: number;
2707
- panY: number;
2708
- }
2709
- /** Wheel-event input, decoupled from the DOM `WheelEvent` shape for testability. */
2705
+
2706
+ /** Multiplicative zoom applied per 100 px of wheel `deltaY`. */
2707
+ declare const WHEEL_ZOOM_STEP = 1.1;
2708
+ /** A wheel event, decoupled from the DOM `WheelEvent` shape for testability. */
2710
2709
  interface WheelInput {
2711
2710
  deltaX: number;
2712
2711
  deltaY: number;
2713
- mouseX: number;
2714
- mouseY: number;
2712
+ /** Zoom anchor, canvas-local: client coords minus the canvas's rect. */
2713
+ x: number;
2714
+ y: number;
2715
2715
  shiftKey?: boolean;
2716
+ ctrlKey?: boolean;
2716
2717
  metaKey?: boolean;
2717
2718
  }
2718
- /** Inclusive `[min, max]` zoom clamp for `computeWheelAction`. Multiplier scale. */
2719
- interface ZoomBounds {
2720
- min: number;
2721
- max: number;
2719
+ /** Which axes a wheel pan is allowed to move, and whether `deltaY` is routed
2720
+ * into the x axis (shift+wheel). An axis lock outranks `swapAxis`. */
2721
+ interface WheelPanOpts {
2722
+ axis?: 'both' | 'x' | 'y';
2723
+ swapAxis?: boolean;
2722
2724
  }
2723
- /** Pure reducer: given current viewport state and a wheel input, return the next state (zoom, pan, or scroll). */
2724
- declare function computeWheelAction(state: WheelState, input: WheelInput, bounds?: ZoomBounds): WheelState;
2725
+ /** Zoom multiplier for one wheel sample. Reciprocal in `deltaY`, so scrolling
2726
+ * a distance and back returns to the scale you started from. */
2727
+ declare function wheelZoomFactor(deltaY: number): number;
2728
+ /** Zoom one wheel sample about `anchor` (canvas-local pixels). */
2729
+ declare function wheelZoom(view: View, anchor: {
2730
+ x: number;
2731
+ y: number;
2732
+ }, deltaY: number, clamp?: ZoomClampOpts): View;
2733
+ /** Pan by one wheel sample. `delta` is in screen pixels. */
2734
+ declare function wheelPan(view: View, delta: {
2735
+ deltaX: number;
2736
+ deltaY: number;
2737
+ }, opts?: WheelPanOpts): View;
2738
+ /** Pure reducer: the whole wheel convention in one call. */
2739
+ declare function computeWheelAction(view: View, input: WheelInput, clamp?: ZoomClampOpts, opts?: Pick<WheelPanOpts, 'axis'>): View;
2725
2740
 
2726
2741
  /**
2727
2742
  * Convert client coords to element CSS-pixel coords (relative to the element's
@@ -3317,43 +3332,6 @@ declare function useHandTool(opts?: UseHandToolOptions): Tool<HandScratch | null
3317
3332
  * factories and hit gating belong on those deps, not on the tool. */
3318
3333
  declare function useTextTool(): Tool<undefined>;
3319
3334
 
3320
- /** The camera a pinch acts on, and the origin its anchor is measured from. */
3321
- interface PinchZoomTarget {
3322
- view: View;
3323
- setView: (v: View) => void;
3324
- /** Client-space origin of the surface this camera paints into. */
3325
- origin: {
3326
- left: number;
3327
- top: number;
3328
- };
3329
- }
3330
- /** Options for `usePinchZoomTool`: the zoom limits, and whether it is wired
3331
- * at all. */
3332
- interface PinchZoomToolOpts {
3333
- min?: number;
3334
- max?: number;
3335
- enabled?: boolean;
3336
- /**
3337
- * Which camera the anchor point belongs to. Return `null` — or omit this —
3338
- * for the canvas's own. A canvas hosting several views resolves the point
3339
- * here, so a pinch inside a panel zooms the panel rather than the canvas
3340
- * underneath it.
3341
- */
3342
- resolveTarget?: (clientX: number, clientY: number) => PinchZoomTarget | null;
3343
- }
3344
- /**
3345
- * Two-finger pinch zoom on the canvas. Standalone hook (not a Tool record)
3346
- * because it requires direct multi-pointer access on the canvas element.
3347
- *
3348
- * The anchor point under the gesture midpoint stays fixed on screen as the
3349
- * view scales.
3350
- *
3351
- * @param getView Read at gesture time, not at render time: each pinch move
3352
- * applies a per-frame delta to the view the previous move produced, and the
3353
- * canvas does not re-render between them.
3354
- */
3355
- declare function usePinchZoomTool(canvasRef: React.RefObject<HTMLElement | null>, getView: () => View, setView: (v: View) => void, opts?: PinchZoomToolOpts): void;
3356
-
3357
3335
  /**
3358
3336
  * In-progress pen anchor. `outHandle` is set when the anchor was placed via
3359
3337
  * click-drag (smooth anchor); undefined for click-placed corners.
@@ -4463,37 +4441,6 @@ interface HierarchicalAdapter<TNode, TPose> {
4463
4441
  getPose(id: string): TPose;
4464
4442
  }
4465
4443
 
4466
- /**
4467
- * The consumer-facing `viewport` prop shape for `<SceneCanvas>`.
4468
- *
4469
- * The features it names are wired by the `viewport.*` action descriptors
4470
- * (`useStandardActions` + `useGestureDispatcher`) and by SceneCanvas itself,
4471
- * which derives the hand tool and the registered flag inline.
4472
- */
4473
-
4474
- /** Which viewport interactions `<SceneCanvas>` wires up — pan inertia, pinch
4475
- * zoom, wheel pan, wheel and keyboard zoom. Each may be switched off with
4476
- * `false` or tuned with an options object. */
4477
- interface ViewportConfig {
4478
- inertia?: boolean | {
4479
- friction?: number;
4480
- minSpeed?: number;
4481
- boundary?: 'stop' | 'bounce' | 'spring';
4482
- bounds?: PanBounds;
4483
- };
4484
- pinchZoom?: boolean | {
4485
- min?: number;
4486
- max?: number;
4487
- };
4488
- /** Wheel pan (plain wheel → pan). Default: `true`. Set `false` to disable,
4489
- * or pass a {@link WheelPanOptions} object to lock it to one axis. */
4490
- pan?: boolean | WheelPanOptions;
4491
- /** Wheel + keyboard zoom (Cmd+wheel, Cmd+=/-/0). Default: `true`. Set `false`
4492
- * to disable, or pass a {@link ViewportZoomOptions} object to tune the wheel
4493
- * trigger + scale clamp. */
4494
- zoom?: boolean | ViewportZoomOptions;
4495
- }
4496
-
4497
4444
  /**
4498
4445
  * The scene-tree reading methods Canvas feature-detects at draw time, as an
4499
4446
  * *optional* mixin. A `SceneCanvasAdapter` supplies them; flat / bare-Canvas
@@ -4763,7 +4710,7 @@ interface CanvasProps<TNode extends {
4763
4710
  * `setView` call passes through `clampView(next, viewBounds, {width, height})`
4764
4711
  * before commit, keeping the visible rect inside `viewBounds`. If the visible
4765
4712
  * rect is larger than the bounds along an axis (zoomed out past extent), that
4766
- * axis is centered. Has no effect on `scale` — wire `useZoom` bounds for that.
4713
+ * axis is centered. Has no effect on `scale`.
4767
4714
  *
4768
4715
  * A viewport concern, not scene-shaped. Consumers that want the pan to stay
4769
4716
  * inside a document page boundary should wire this with the page dimensions.
@@ -4835,21 +4782,6 @@ interface CanvasProps<TNode extends {
4835
4782
  * report "no gesture in flight" and never fire.
4836
4783
  */
4837
4784
  gestureSource?: GestureSource;
4838
- /**
4839
- * Pinch-zoom DOM listener attachment for the canvas surface. When supplied,
4840
- * `<Canvas>` calls `usePinchZoomTool` with `canvasRef` so two-finger pinch
4841
- * events are handled directly on the canvas element.
4842
- *
4843
- * Hand tool registration, wheel pan/zoom action descriptors, and keyboard
4844
- * zoom shortcuts are SceneCanvas-level concerns and are NOT owned by Canvas.
4845
- * Those belong with the tool registry and gesture dispatcher that live in
4846
- * SceneCanvas — which is also why SceneCanvas does not pass this prop: it
4847
- * drives pinch through the `viewport.pinchZoom` action instead, and both
4848
- * paths at once would apply one gesture's zoom factor twice.
4849
- *
4850
- * When omitted, no pinch-zoom listener is attached.
4851
- */
4852
- viewport?: ViewportConfig;
4853
4785
  /**
4854
4786
  * FillStyle applied to the full canvas surface behind the scene. Accepts the
4855
4787
  * kit's `FillStyle` union (solid / pattern / linear-gradient / radial-gradient /
@@ -4938,6 +4870,13 @@ interface CanvasProps<TNode extends {
4938
4870
  * it is not drawn. Reordering two layers means naming all of them.
4939
4871
  */
4940
4872
  layerOrder?: string[];
4873
+ /**
4874
+ * Runs of consecutive layers that composite as one — the surface for
4875
+ * blurring the world while the chrome above it stays sharp. Members are
4876
+ * named by layer id, and a layer in no group draws exactly as it did
4877
+ * before. See {@link LayerGroup}.
4878
+ */
4879
+ layerGroups?: readonly LayerGroup[];
4941
4880
  }
4942
4881
 
4943
4882
  /** Minimal selection contract `sceneToAdapter` needs to wire `getSelection` /
@@ -4967,6 +4906,7 @@ type SceneCanvasAdapter<TData, TLayer extends string, TPose> = MoveAdapter<Node$
4967
4906
  setSelection(ids: string[]): void;
4968
4907
  insertNode(node: Node$1<TData, TLayer, TPose>, index?: number): void;
4969
4908
  removeNode(id: string): void;
4909
+ getRemovalClosure(ids: readonly string[]): string[];
4970
4910
  applyOps(ops: Op[], label?: string): void;
4971
4911
  snapshotSelection(ids: string[]): ClipboardSnapshot;
4972
4912
  commitPaste(clipboard: ClipboardSnapshot, offset: {
@@ -6257,9 +6197,6 @@ declare function SceneViewCanvasInner<TData, TLayer extends string, TPose>(props
6257
6197
  */
6258
6198
  declare const SceneViewCanvas: typeof SceneViewCanvasInner;
6259
6199
 
6260
- /** Build a scene outside React. `useScene` is the usual entry point; reach for
6261
- * this in tests, in headless rendering, or wherever a scene must outlive a
6262
- * component. Throws if no system layers are declared. */
6263
6200
  declare function createScene<TData, TLayer extends string, TPose = RectPose>(options: UseSceneOptions<TData, TLayer, TPose>): Scene<TData, TLayer, TPose>;
6264
6201
  /** The scene's selection in the shape `createHistory` wants, for a consumer
6265
6202
  * building a second History over the same scene (a modality machine, a
@@ -6320,18 +6257,90 @@ declare function useScene<TItem extends {
6320
6257
  declare function useScene<TData, TLayer extends string, TPose = RectPose>(options: UseSceneOptions<TData, TLayer, TPose>): Scene<TData, TLayer, TPose>;
6321
6258
 
6322
6259
  /**
6323
- * Pure math helpers for `<MinimapCanvas>`.
6260
+ * Build a {@link PoseOverrides} map.
6261
+ *
6262
+ * `getNode` resolves an id to the node object the painter memo is keyed on —
6263
+ * the only thing this module needs from the scene, and the reason it doesn't
6264
+ * import one. `onInvalidate` lets the scene invalidate derived nodes from the
6265
+ * same chokepoint.
6266
+ */
6267
+ declare function createPoseOverrides<TPose>(getNode: (id: NodeId) => {
6268
+ data?: unknown;
6269
+ } | undefined, onInvalidate?: (id: NodeId) => void): PoseOverrides<TPose>;
6270
+
6271
+ /** The subset of a node this module reads. Structural so a `Node` satisfies
6272
+ * it without importing the full generic shape. */
6273
+ interface PosedNode<TPose> {
6274
+ id: NodeId;
6275
+ kind?: 'leaf' | 'container';
6276
+ pose: TPose;
6277
+ /** Read only by the memo, which keys on its reference alongside the pose. */
6278
+ data?: unknown;
6279
+ dependsOn?: readonly NodeId[] | 'children';
6280
+ derivePose?: (node: never, deps: readonly (DerivedDep<TPose> | undefined)[]) => TPose | null;
6281
+ /** Read only when something asks a dependency for its `path`. */
6282
+ derivePath?: (node: never, deps: readonly (DerivedDep<TPose> | undefined)[]) => Path | null;
6283
+ }
6284
+ /** What resolving a pose needs: the overrides, and enough of the scene to
6285
+ * reach a node's dependencies. A `Scene` satisfies it. */
6286
+ interface PoseSource<TPose> {
6287
+ readonly overrides: Pick<PoseOverrides<TPose>, 'get'>;
6288
+ get(id: NodeId): PosedNode<TPose> | undefined;
6289
+ childrenOf(id: NodeId): readonly NodeId[];
6290
+ }
6291
+ /**
6292
+ * The pose `node` computes from its dependencies, or `null` when it derives
6293
+ * nothing — it has no `derivePose`, nothing to derive from, or its
6294
+ * `derivePose` returned `null`.
6295
+ *
6296
+ * A dependency is read through {@link effectivePose}, so a group of groups
6297
+ * resolves bottom-up and a dragged dependency's override reaches the
6298
+ * derivation the same frame it is published.
6299
+ */
6300
+ declare function derivedPose<TPose>(source: PoseSource<TPose>, node: PosedNode<TPose>): TPose | null;
6301
+ /**
6302
+ * `id` as a derivation sees it: the node, the pose it is painted at, and the
6303
+ * path it derives.
6304
+ *
6305
+ * The pose is resolved eagerly — every derivation reads it — and the path
6306
+ * lazily, because most do not and resolving a route costs a router run. Both
6307
+ * resolve *through* this function, so a dependency that is itself derived is
6308
+ * resolved before it is read.
6309
+ */
6310
+ declare function derivedDepOf<TPose>(source: PoseSource<TPose>, id: NodeId): DerivedDep<TPose> | undefined;
6311
+ /**
6312
+ * The pose the *document* says `node` is at: derived when it derives, else
6313
+ * authored. `effectivePose` minus the override step.
6324
6314
  *
6325
- * `computeFitView` derives a `View` that fits a chosen world rect into a
6326
- * minimap canvas of given pixel dims. `computeIndicatorCommand` builds the
6327
- * dashed "visible window" rect — the main canvas's screen window projected
6328
- * into the minimap's own screen coordinates.
6315
+ * For a reader that must not see an in-flight gesture — an action capturing
6316
+ * the `from` of a transform op, a placement computed against a sibling. A
6317
+ * derived pose belongs here and an override does not: derivation is what the
6318
+ * document means, an override is what one gesture is currently showing.
6319
+ */
6320
+ declare function documentPose<TPose>(source: PoseSource<TPose>, node: PosedNode<TPose>): TPose;
6321
+ /**
6322
+ * The pose to draw, pick and measure `node` at.
6329
6323
  *
6330
- * Neither helper touches GL, the DOM, or the renderer; they're pure
6331
- * functions, unit-testable with `expect`.
6324
+ * The one rule. Every pose a reader acts on comes from here: the three render
6325
+ * walks, the pick walk, the adapters tools and actions commit through.
6326
+ */
6327
+ declare function effectivePose<TPose>(source: PoseSource<TPose>, node: PosedNode<TPose>): TPose;
6328
+
6329
+ /** Registry key for {@link unionOfChildren}. */
6330
+ declare const UNION_OF_CHILDREN = "kit:unionOfChildren";
6331
+ /**
6332
+ * A container's pose as the envelope of what it holds — `unionAABB`, so a
6333
+ * rotated member contributes the extent of its ink rather than its unrotated
6334
+ * box. Paired with `dependsOn: 'children'`, this is what makes a group's
6335
+ * bounds track its members instead of freezing at the moment it was made.
6332
6336
  *
6333
- * See `docs/superpowers/specs/2026-05-31-detached-minimap-design.md`.
6337
+ * Returns `null` for an emptied container, which falls back to its authored
6338
+ * pose — the group stays where the last member left it rather than collapsing
6339
+ * to a zero box at the origin.
6334
6340
  */
6341
+ declare function unionOfChildren<TPose>(_node: unknown, deps: readonly ({
6342
+ pose: TPose;
6343
+ } | undefined)[]): TPose | null;
6335
6344
 
6336
6345
  /**
6337
6346
  * Fallback view returned when there is nothing to fit (empty scene, etc.).
@@ -7575,7 +7584,7 @@ interface UseSceneTextEditReturn extends UseTextEditReturn {
7575
7584
  * bubble). The handler looks up the canvas via `e.target`, hits the
7576
7585
  * top-most text node under the cursor via `pointInTextPose`, resolves
7577
7586
  * a caret offset via `caretIndexAt`, and starts edit on that node. */
7578
- onDoubleClick: (e: MouseEvent$1<HTMLElement>) => void;
7587
+ onDoubleClick: (e: MouseEvent<HTMLElement>) => void;
7579
7588
  }
7580
7589
  /** Wire double-click-to-edit text on a scene: mounts a DOM editing overlay
7581
7590
  * over the node being edited and writes the result back as an undoable op. */
@@ -7916,15 +7925,16 @@ interface DeleteArgs<TNode extends {
7916
7925
  index?: number;
7917
7926
  /** Full slot, anchor included. Written by `apply`; supersedes `index`. */
7918
7927
  slot?: Slot;
7919
- /** Descendants of `node`, preorder (parents before children). `removeNode`
7920
- * cascades the whole subtree, so an inverse that re-inserts `node` alone
7921
- * brings the container back empty and drops every child on the floor.
7922
- * Captured on apply; mirrored into the serialized args so a rebuilt op
7923
- * can invert without having run. */
7924
- descendants?: Placed<TNode>[];
7925
- }
7926
- /** Op: remove `node` and its subtree from the scene; inverts to a re-insert
7927
- * of the whole subtree at its captured slots. */
7928
+ /** Everything `removeNode` takes, `node` itself included — its subtree, and
7929
+ * whatever else the adapter cascades. An inverse that re-inserts `node`
7930
+ * alone brings a container back empty and leaves every dependent deleted.
7931
+ * Ordered so a node's parent precedes it, which is the order they have to
7932
+ * be re-inserted in. Captured on apply; mirrored into the serialized args so
7933
+ * a rebuilt op can invert without having run. */
7934
+ cascaded?: Placed<TNode>[];
7935
+ }
7936
+ /** Op: remove `node` and everything the adapter cascades with it; inverts to a
7937
+ * re-insert of the whole set at its captured slots. */
7928
7938
  declare function createDeleteOp<TNode extends {
7929
7939
  id: string;
7930
7940
  }>(args: DeleteArgs<TNode>): Op;
@@ -8300,8 +8310,9 @@ declare function pointInPath(path: Path, x: number, y: number, opts?: PointInPat
8300
8310
  * Polygon-vs-axis-aligned-rect tests. Pure functions; no React/kit deps.
8301
8311
  *
8302
8312
  * `polygon` is a closed polyline given as an ordered vertex array; the
8303
- * closing edge from `polygon[N-1]` to `polygon[0]` is implicit. Even-odd
8304
- * fill rule (matches `pointInPath`).
8313
+ * closing edge from `polygon[N-1]` to `polygon[0]` is implicit. Even-odd fill
8314
+ * rule, and one contour only — a path with holes or curves goes through
8315
+ * `pathHitTest`, which reads its `fillRule`.
8305
8316
  */
8306
8317
 
8307
8318
  /** A 2D point or vector. */
@@ -8314,26 +8325,23 @@ interface Vec2 {
8314
8325
  * Path-vs-geometry hit-test helpers. Five pure functions covering all
8315
8326
  * combinations of path-vs-point, path-vs-rect, and path-vs-polygon.
8316
8327
  *
8317
- * `RectPath` short-circuits to AABB arithmetic. `PolygonPath` delegates to
8318
- * the polygon kernel in `polygonHitTestRect` after extracting vertices from
8319
- * the command stream. Bezier segments in a `PolygonPath` are currently out of
8320
- * scope (paths are rect or straight-line polygon only); a non-line
8321
- * command will throw to surface accidental misuse early.
8322
- *
8323
- * For point-in-path specifically, use the existing `pointInPath` from
8324
- * `hitTest.ts` which handles beziers and fill rules correctly.
8328
+ * `RectPath` short-circuits to AABB arithmetic. A `PolygonPath` is treated as
8329
+ * its filled region: whether a point is inside comes from `pointInPath`, so
8330
+ * beziers are flattened and `fillRule` is honored, and every closed subpath
8331
+ * counts — the hole of a donut is not part of the shape under `evenodd`. Open
8332
+ * subpaths enclose no area and are ignored, matching `pointInPath`.
8325
8333
  */
8326
8334
 
8327
8335
  /** Returns true if (x, y) lies within the filled region of `path`. */
8328
- declare function pathContainsPoint(path: Path, x: number, y: number): boolean;
8336
+ declare function pathContainsPoint(path: Path, x: number, y: number, opts?: PointInPathOptions): boolean;
8329
8337
  /** Returns true if `rect` is entirely contained within `path`. */
8330
- declare function pathContainsRect(path: Path, rect: Rect): boolean;
8338
+ declare function pathContainsRect(path: Path, rect: Rect, opts?: PointInPathOptions): boolean;
8331
8339
  /** Returns true if `rect` overlaps (intersects or contains) `path`. */
8332
- declare function pathIntersectsRect(path: Path, rect: Rect): boolean;
8340
+ declare function pathIntersectsRect(path: Path, rect: Rect, opts?: PointInPathOptions): boolean;
8333
8341
  /** Returns true if every vertex of `polygon` lies inside `path`. */
8334
- declare function pathContainsPolygon(path: Path, polygon: readonly Vec2[]): boolean;
8342
+ declare function pathContainsPolygon(path: Path, polygon: readonly Vec2[], opts?: PointInPathOptions): boolean;
8335
8343
  /** Returns true if `polygon` overlaps (intersects or is contained by) `path`. */
8336
- declare function pathIntersectsPolygon(path: Path, polygon: readonly Vec2[]): boolean;
8344
+ declare function pathIntersectsPolygon(path: Path, polygon: readonly Vec2[], opts?: PointInPathOptions): boolean;
8337
8345
 
8338
8346
  /**
8339
8347
  * Pure-geometry distance from a point to a path's boundary (stroke), with
@@ -8357,6 +8365,35 @@ declare function pathIntersectsPolygon(path: Path, polygon: readonly Vec2[]): bo
8357
8365
  * combine with `pathContainsPoint` at the call site. */
8358
8366
  declare function pathDistanceToPoint(path: Path, px: number, py: number): number;
8359
8367
 
8368
+ /**
8369
+ * A station along a path: where it is at a fraction of its length, and which
8370
+ * way it is heading there.
8371
+ *
8372
+ * For anything positioned *along* geometry rather than beside it — a label on a
8373
+ * routed edge, a tick on a curve, a badge near an arrowhead. Curves are
8374
+ * flattened first, so the fraction is arc length along the drawn shape rather
8375
+ * than a curve parameter, which is what makes 0.5 look like the middle.
8376
+ */
8377
+
8378
+ interface PathStation {
8379
+ point: Vec2;
8380
+ /** Unit vector along the path at `point`, pointing toward the end. */
8381
+ tangent: Vec2;
8382
+ }
8383
+ interface PointAlongPathOptions {
8384
+ /** Curve flattening tolerance, in world units. Default 0.5. */
8385
+ flattenTolerance?: number;
8386
+ }
8387
+ /**
8388
+ * Where `path` is at `t` of its total length, and its heading there.
8389
+ *
8390
+ * `t` is clamped to 0..1. Subpaths are measured in order and treated as one
8391
+ * run, the way a browser measures a whole `<path>`. Returns `null` for a path
8392
+ * with no points at all; a path of zero length answers at its single point,
8393
+ * heading along +X.
8394
+ */
8395
+ declare function pointAlongPath(path: Path, t: number, opts?: PointAlongPathOptions): PathStation | null;
8396
+
8360
8397
  /**
8361
8398
  * In-place and copy-out path transforms. Translation is the most common —
8362
8399
  * called every pointermove during a drag — so the polygon variant mutates
@@ -9018,8 +9055,13 @@ interface PaintBindContext {
9018
9055
  * convention; it is not gradient-specific.
9019
9056
  */
9020
9057
  spaceInverse(units: GradientUnits | undefined): Mat3$1;
9021
- /** Upload a stop ramp and bind it to a texture unit. */
9022
- bindRamp(stops: GradStop[], unit: number): void;
9058
+ /**
9059
+ * Bake a stop ramp into the frame's ramp atlas, bind that atlas to a texture
9060
+ * unit, and return the `v` the ramp's own row sits at — every ramp in a
9061
+ * frame shares one texture, so a paint must sample at the returned `v` and
9062
+ * not at a constant.
9063
+ */
9064
+ bindRamp(stops: GradStop[], unit: number): number;
9023
9065
  }
9024
9066
  /**
9025
9067
  * One paint kind.
@@ -10890,4 +10932,4 @@ interface InsertOverlayStyle {
10890
10932
  lineWidth?: number;
10891
10933
  }
10892
10934
 
10893
- export { ANCHOR_HIT_BASE_PX, Action, type ActionShortcut, ActionsProp, ActionsProviderIfRoot, ActionsRegistry, Affordance, AffordanceBinding, AffordanceHit, AffordanceRegion, type AffordanceRegionHit, type AlignAdapter, type AlignAnchor, type AlignBounds, type AlignBoundsProjection, type AlignEdge, type AlignMatchResult, type AlignMoveArgs, type AlignmentBehaviorBase, type AnchorHit, type AnchorScratch, type AnchorState, type AnimateOnSetPoseOptions, AnimationHandle, Animator, AnyTool, AreaSelectAdapter, type ArrayAdapter, type ArrayAdapterConfig, ArrowIcon, BUILTIN_MARKERS, BUNDLE_TOOLS, BindingScope, BooleansAdapter, Bounds, BoundsConstraint, type BuildChromeCtxArgs, BuiltinShapeToolId, type BuiltinToolId, type BuiltinToolOptions, COARSE_TARGET_SCALE, CURVE_REPS, type CanvasExtensionApi, type CanvasFocusReturn, type CanvasHelpers, type CanvasProps, type CanvasSelectionMode, type CanvasSize, type CanvasSizeSnapshot, type CanvasSurfaceHelpers, CanvasView, type CanvasViewHelpers, type CanvasViewProps, type CaretIndexAtOpts, type CellHighlightLayerOpts, ChromeCtx, ChromeId, ChromeState, type ClampBounds, ClipboardSnapshot, type CoalescedCtx, type ColorInterpolate, ColorOverrideRegistry, type ColorSpace, CommonAffordanceScratch, type ComposeSelectionPoseOpts, type ComputeFitViewOptions, Condition, ContentHandlerEntry, Contribution, type CornerResizeAffordanceOptions, type CornerResizeScratch, type CreateChildrenLayerOpts, type CreateParallaxLayerOpts, type CreatePathEditingOverlayLayerOptions, type CreatePathLayerOpts, type CreatePenPreviewLayerOptions, type CreateTextLayerOpts, type CreateViewResolverOpts, type CreateViewportLayerOpts, CropIcon, CursorCoordsHud, type CursorCoordsHudProps, type CurveRepKind, type CurveRepresentation, type CustomLayerEntry, type CycleHandle, type CycleVertexColorsOptions, DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_DEVICE_PROFILE, DEFAULT_FILL_COLOR, DEFAULT_FLATTEN_TOLERANCE, DEFAULT_GUIDE_TOLERANCE_PX, DEFAULT_HANDLE_SIZE, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SHAPE_FILL, DEFAULT_STROKE_COLOR, DEFAULT_VELOCITY_DECAY, DebugConfig, DebugSink, DebugSnapshot, DebugStrokes, DebugTheme, type 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 DragPanParams, type DragPayload, type DragRadialController, type DragRadialCtx, type DragRadialEndCtx, type DragRadialPoint, type DragRadialState, type DragRectBounds, type DragRectController, type DragRectCtx, type DragRectEndCtx, type DragRectPoint, DrawCommand, type DropZoneOptions, EasingSpec, Eligibility, type EligibilityState, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, type FillPoseBox, type FitTextPoseOptions, type FlagKey, type FreeformOptions, GHOST_STROKE, type GateLayerOptions, GeometryProjection, type GesturePreviewSource, type GestureSource, type GridLayerOpts, type GridSlotConfig, Guide, type GuideSnapOptions, type GuidesLayerOpts, HANDLE_BASE_PX, HandIcon, InertiaConfig as HandToolInertiaConfig, type HandleDragEnd, type HandleDragPoint, type HeadlessCanvasLike, type HostAnchorAlign, type HostAnchorInput, type HostAnchorOffset, type HostAnchorStyle, HotkeyTrigger, IDENTITY_JOINT, type IconProps, ImageIcon, type ImageNodeData, type ImageStatus, type IndicatorStyle, InertiaConfig, InsertAdapter, InsertBehavior, InsertExtras, type InsertNodeFactory, type InsertOp, type InsertOverlayStyle, IntersectIcon, type Joint, type JointTransform, type LabelOptions, LassoHitMode, LassoIcon, LassoSelectAdapter, LassoSelectBehavior, LayerEnumerableAdapter, LayerHit, type LayerSlotValue, type LayersMap, LayoutSnap, LayoutStrategy, type LifecycleAnimation, LineIcon, type LinePoint, MIXED, MOVE_ANCHORS, type MarkerCtx, type MarkerEntry, type MarkerPaint, type MarkerSite, type MarkerSiteRequest, Mat3$1 as Mat3, MinimapCanvas, type MinimapCanvasProps, type MinimapFit, type Mixed, ModifierState, type MomentumOptions, MoveAdapter, MoveBehavior, type NestedHitOpts, type NestedHitTester, type NodeClientRect, NodeId, type NodeInk, type NodeInkCtx, type NodeOverlayFrame, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type NodeSilhouetteCtx, OngoingOverlay, type OpenFilePickerOptions, OrderedAdapter, OriginProjection, type OverlayPoint, OverlayPosition, PAINTED_CURSOR_LAYER_ID, PATH_ANCHOR_CHROME_ID, type PaintBindContext, type PaintKind, type PaintKindEditorProps, type PaintKindEntry, type PaintProgram, type PaintedCursor, type PaintedCursorFrame, type PaintedCursorState, PanBounds, type ParallaxOpts, Path, type PathAnchor, type PathAnchorAffordanceOptions, PathBuilder, PathDrawCommand, type PathEditingOverlayStyle, PathFillRule, type PathInWorldPose, type PenAnchor, PenIcon, type PenPreviewStyle, type PenScratch, type PenSubpath, PencilIcon, type PencilPoint, PickHud, type PickHudProps, type PickTopMostHitAdapter, type PinchZoomOptions, type PinchZoomToolOpts, type PixelRenderPlan, type PointInPathOptions, type PointInTextPoseOpts, PointSnapBehavior, PointerProviderIfRoot, type PointerSample, type PointerSession, type PointerSessionCallbacks, type PointerSessionCancelReason, type PointerSessionOptions, type PointerStylusState, PolygonIcon, PolygonPath, type PolygonPoint, type Pose, PoseProjection, type PoseRotation, type PressureToWidthOptions, type Pt, RECT_ALIGN_PROJECTION, ROTATION_HANDLE_BASE_PX, type RangeStyle, type RasterImage, RectIcon, RectPath, RectPose, type RegisterNodeShapeOptions, RegisteredOp, RenderLayer, type RenderSceneToCanvasArgs, type RenderSceneToPixelsArgs, type ReorderDirection, ResizeAdapter, ResizeAnchor, ResizePose, type ResolvableView, RotateAdapter, RotateBehavior, type RotateGeometry, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, Rule, RuleCtx, type RunStylePatch, SampledTrack, type ScalarOrXY, Scene, SceneAdapter, type SceneAdapterSelection, SceneCanvas, type SceneCanvasAdapter, type SceneCanvasApi, type SceneCanvasHit, type SceneCanvasProps, Node$1 as SceneNode, type SceneNodeClientRectOpts, SceneRegistry, type SceneSlotConfig, type SceneToAdapterOptions, SceneViewCanvas, type SceneViewCanvasProps, type SceneViewDrawOne, ScopedBinding, type ScratchKey, type ScratchStore, type SelectAdapter, type SelectFromLassoOptions, SelectIcon, SelectionApi, SelectionContextProvider, SelectionContextProviderIfRoot, type SelectionContextValue, type SelectionHandleStyle, type SelectionHandlesLayerOpts, type SelectionOutlineLayerOpts, type SelectionOverlayLayerOpts, type SelectionOverlaySlotConfig, SerializedScene, type SetFlagResult, type SetPathFields, ShaderProgramHandle, type ShapeCoversPointOptions, type SharedAnchor, type Simulation, type SimulationForce, type SimulationNode, type Skeleton, SliceDep, type SnapPattern, type SnapPointOptions, SnapStrategy, type SplitByLineOptions, type SpringPoseOptions, SpringPresetName, type SpringVertexColorsOptions, type StaggerVertexColorsOptions, type StandardSlotConfig, type StandardSlotName, StarIcon, type StarPoint, type StartEditOptions, type StyleKey, type StylusData, SubtractIcon, SvgIngestOptions, TOOL_PREF_KINDS, type TextEditScreenPose, type TextEditSelection, TextIcon, type ThresholdDragHandle, type ThresholdDragOptions, type TileGridOptions, type TilePatternOpts, Tool, type ToolBundle, ToolDef, ToolKeybinding, type ToolPref, type ToolPrefBoolean, type ToolPrefBooleanControl, type ToolPrefColor, type ToolPrefCustom, type ToolPrefEnum, type ToolPrefEnumControl, type ToolPrefEnumEncoding, type ToolPrefGroup, type ToolPrefKind, type ToolPrefLeaf, type ToolPrefNumber, type ToolPrefNumberControl, type ToolPrefNumberUnit, type ToolPrefObject, type ToolPrefPaint, type ToolPrefString, type ToolPrefStringControl, type ToolsApi, type TweenPoseOptions, type TweenVertexColorsOptions, UnionIcon, UnitSystem, UnitValue, UnknownIcon, type UseAlignOptions, type UseAlignReturn, UseAnimatorOptions, type UseArrayAdapterOptions, type UseBooleansOptions, type UseBooleansReturn, type UseCanvasFocusOptions, type UseDistributeOptions, type UseDistributeReturn, type UseDragGestureOptions, type UseDragRadialOptions, type UseDragRectOptions, type UseEyedropperToolOptions, type UseGestureDispatcherOptions, type UseGridCellHoverOptions, type UseGridCellHoverReturn, type UseGuidesReturn, type UseHandToolOptions, type UseHandleDragOptions, type UseHandleDragReturn, type UseHostAnchorOptions, type UseHoverTrackingArgs, type UseImageToolOptions, type UseKeybindingsOptions, type UseLassoSelectOptions, type UseLassoToolOptions, UseMoveOptions, type UseNodeOverlayFrameOptions, type UsePenToolOptions, type UsePointerStylusOptions, type UsePolygonToolOptions, UseResizeOptions, type UseResizePolicyOptions, type UseRotateOptions, type UseRotateToolOptions, UseSceneOptions, type UseSceneTextEditOptions, type UseSceneTextEditReturn, type UseSceneTrivialOptions, type UseSelectToolOptions, UseSelectionOptions, type UseSimulationOptions, type UseStandardActionsOptions, type UseStarToolOptions, type UseTextEditOptions, type UseTextEditReturn, type UseToolsOptions, type UseZoomOptions, type UseZoomReturn, VERSION, type Vec2, type VelocityTracker, VertexColorChannel, View, ViewAnimationOptions, type ViewRect, type ViewResolver, type ViewTarget, ViewTransform, type ViewportConfig, ViewportDims, type ViewportLayer, ViewportToolDef, type ViewportZoomAnimateOptions, type ViewportZoomOptions, VisibilityRules, type VisibleRaf, type VisibleRafOptions, type VisibleRafTarget, WeaselProvider, type WheelInput, type WheelPanOptions, type WheelState, ZoomBound, type ZoomBounds, type ZoomClampOpts, ZoomFactor, _resetMarkersForTests, _resetPaintKindsForTests, aabbCenter, actionIs, actionShortcuts, alignDeltaFor, alignInsertBehavior, alignMoveBehavior, alignResizeBehavior, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyOpsTo, applyStyleToRange, areaSelectAction, arrayAdapter, asPaint, axisAlignedBounds, bezierCubic, bezierQuadratic, blendPoses, boundsOfPath, buildChromeCtx, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, caretIndexAt, cellAt, charOffsetToDomPosition, clampView, clearSelectionAction, clientToCanvas, cloneAction, coarsePointer, composeAffordanceLayer, composePath, composeSelectionPose, computeFitView, computeFitViewport, computeIndicatorCommand, computeWheelAction, cond, constrainTo45, containedThenNearest, countPathAnchors, createCellHighlightLayer, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDeleteOp, createGridLayer, createGuidesLayer, createHistory, createInsertOp, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createPaintedCursorState, createParallaxLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createReorderOp, createReparentOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createTextLayer, createTilePattern, createTransformOp, createVelocityTracker, createViewResolver, createViewportLayer, cycleVertexColors, decomposePath, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultVisibilityRules, defineTool, defineViewportTool, deleteScratch, deriveAlignmentGuides, deriveParallaxView, dispatchApplyBatch, dlog, domPositionToCharOffset, domToRuns, dwarn, editAnchorsAction, ellipsePath, enumerateAnchors, fillInPoseFrame, fillToBoundsFrame, findNodeShape, findShapeInk, findShapeSilhouette, fitTextPose, fitToBounds, fitZoom, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, focused, forEachCoalesced, freeform, gateLayer, gesturing, getAlpha01, getImageBitmap, getMarker, getNodeShapes, getPaintKind, getScratch, getStylusData, gradientForBounds, gradientGeometry, guideSnapStrategy, hexToRgba, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, imageStatus, inferredNodeProperties, inferredNodeRouting, insertAction, interpolateView, isBuiltinToolPref, isDebugEnabled, isEditableTarget, isGradientFill, isPatternSpec, keySpecShortcut, lassoSelectAction, lerpColorArray, lerpOklab, lerpOklch, linePath, listMarkers, listPaintKinds, liveScope, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markerDrawCommands, markerInset, markerKeyOf, markerSites, matchAlignment, matchesKeyBinding, meanScale, mergeAlphaFromPrev, mergeContributions, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nearest, nearestWithin, nestedHitTester, never, nodeHasFlag, none, normalizeHex, not, nurbs, oklabToOklch, oklabToSrgbU8, oklchToOklab, openFilePicker, openPointerSession, or, paintAlpha, paintKindOf, paintWithAlpha, paintWithColor, parseColor, parseColorToRgba255, parseDebugFlags, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathDistanceToPoint, pathDivide, pathExclude, pathFromD, pathInPoseFrame, pathInWorld, pathIntersect, pathIntersectsPolygon, pathIntersectsRect, pathOriginProjection, pathPoseDescriptor, pathSubtract, pathToAnchors, pathUnion, pickTopMostHit, pinchZoomAction, planPixelRender, pointInPath, pointInRotatedRect, pointInTextPose, polygonFromPoints, polylineFromPoints, poseRotationOf, pressureToWidth, pxExtent, rainbowVertexColors, rebuildOp, rectCorners, rectPath, registerMarker, registerNodeShape, registerOpFactory, registerPaintKind, registeredOpNames, regularPolygonPath, renderLabel, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveColor, resolveDeviceProfile, resolveFillPattern, resolveMarkerSize, resolvePatternSpec, resolveSkeleton, resolveVisibility, rgbaToHex, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotatePoint, rotatedRectCorners, rotationDegreesUnit, rotationHandle, roundToCell, runsToDom, sampleGradientStops, sampleTrack, scaleDelta, scalePathToBounds, sceneFromJSON, sceneNodeClientRect, sceneSelectionStore, sceneToAdapter, scopeBindings, scratchKey, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, setFlagOverRange, setScratch, shapeCoversPoint, snap, snapPoint, solid, solidVertexColors, spiro, splitPathByLine, splitSubpaths, springPose, springVertexColors, srgbU8ToOklab, staggerVertexColors, starPath, startThresholdDrag, strokeInsets, strokeOf, strokeWith, styleAtRange, subscribeImageReady, textCommand, textCommandFromRuns, tileGrid, toHex8, transformPath, translatePath, translatePolygonInPlace, translatePoseViaDescriptor, trimPolyline, tweenPose, tweenVertexColors, unionAABB, unionBounds, unionBoundsPath, useAlign, useAnimator, useArrayAdapter, useAutoCenter, useBooleans, useBooleansAdapter, useCanvasFocus, useCanvasSize, useDeviceProfile, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGestureDispatcher, useGridCellHover, useGuides, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useImageTool, useKeybindings, useLassoTool, useLineTool, useNodeOverlayFrame, usePenTool, usePencilTool, usePinchGesture, usePinchZoomTool, usePointerStylus, usePolygonTool, usePublishSelection, useRectTool, useResizePolicy, useRotateTool, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelectionContext, useSimulation, useSliceDep, useStandardActions, useStarTool, useTextEdit, useTextTool, useTools, useVelocityTracker, useVisibleRaf, useZoom, viewportDragPanAction, viewportWheelPanAction, viewportZoomAction, viewportsAt, visualBoundsViaDescriptor, when, withAlpha01, withCoord, withGradientKind, withinPxBox, withinPxRadius, worldEditToStorage, zoomAt, zoomAtLeast };
10935
+ export { ANCHOR_HIT_BASE_PX, Action, type ActionShortcut, ActionsProp, ActionsProviderIfRoot, ActionsRegistry, Affordance, AffordanceBinding, AffordanceHit, AffordanceRegion, type AffordanceRegionHit, type AlignAdapter, type AlignAnchor, type AlignBounds, type AlignBoundsProjection, type AlignEdge, type AlignMatchResult, type AlignMoveArgs, type AlignmentBehaviorBase, type AnchorHit, type AnchorScratch, type AnchorState, type AnimateOnSetPoseOptions, AnimationHandle, Animator, AnyTool, AreaSelectAdapter, type ArrayAdapter, type ArrayAdapterConfig, ArrowIcon, BUILTIN_MARKERS, BUNDLE_TOOLS, BindingScope, BooleansAdapter, Bounds, BoundsConstraint, type BuildChromeCtxArgs, BuiltinShapeToolId, type BuiltinToolId, type BuiltinToolOptions, COARSE_TARGET_SCALE, CURVE_REPS, type CanvasExtensionApi, type CanvasFocusReturn, type CanvasHelpers, type CanvasProps, type CanvasSelectionMode, type CanvasSize, type CanvasSizeSnapshot, type CanvasSurfaceHelpers, CanvasView, type CanvasViewHelpers, type CanvasViewProps, type CaretIndexAtOpts, type CellHighlightLayerOpts, ChromeCtx, ChromeId, ChromeState, type ClampBounds, ClipboardSnapshot, type CoalescedCtx, type ColorInterpolate, ColorOverrideRegistry, type ColorSpace, CommonAffordanceScratch, type ComposeSelectionPoseOpts, type ComputeFitViewOptions, Condition, ContentHandlerEntry, Contribution, type CornerResizeAffordanceOptions, type CornerResizeScratch, type CreateChildrenLayerOpts, type CreateParallaxLayerOpts, type CreatePathEditingOverlayLayerOptions, type CreatePathLayerOpts, type CreatePenPreviewLayerOptions, type CreateTextLayerOpts, type CreateViewResolverOpts, type CreateViewportLayerOpts, CropIcon, CursorCoordsHud, type CursorCoordsHudProps, type CurveRepKind, type CurveRepresentation, type CustomLayerEntry, type CycleHandle, type CycleVertexColorsOptions, DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_DEVICE_PROFILE, DEFAULT_FILL_COLOR, DEFAULT_FLATTEN_TOLERANCE, DEFAULT_GUIDE_TOLERANCE_PX, DEFAULT_HANDLE_SIZE, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SHAPE_FILL, DEFAULT_STROKE_COLOR, DEFAULT_VELOCITY_DECAY, DebugConfig, DebugSink, DebugSnapshot, DebugStrokes, DebugTheme, type DefaultTextData, DepRegistryProviderIfRoot, DepSchema, type DeriveAlignmentGuidesOptions, DerivedDep, 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 DragPanParams, type DragPayload, type DragRadialController, type DragRadialCtx, type DragRadialEndCtx, type DragRadialPoint, type DragRadialState, type DragRectBounds, type DragRectController, type DragRectCtx, type DragRectEndCtx, type DragRectPoint, DrawCommand, type DropZoneOptions, EasingSpec, Eligibility, type EligibilityState, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, type FillPoseBox, type FitTextPoseOptions, type FlagKey, type FreeformOptions, GHOST_STROKE, type GateLayerOptions, GeometryProjection, type GesturePreviewSource, type GestureSource, type GridLayerOpts, type GridSlotConfig, Guide, type GuideSnapOptions, type GuidesLayerOpts, HANDLE_BASE_PX, HandIcon, InertiaConfig as HandToolInertiaConfig, type HandleDragEnd, type HandleDragPoint, type HeadlessCanvasLike, type HostAnchorAlign, type HostAnchorInput, type HostAnchorOffset, type HostAnchorStyle, HotkeyTrigger, IDENTITY_JOINT, type IconProps, ImageIcon, type ImageNodeData, type ImageStatus, type IndicatorStyle, InertiaConfig, InsertAdapter, InsertBehavior, InsertExtras, type InsertNodeFactory, type InsertOp, type InsertOverlayStyle, IntersectIcon, type Joint, type JointTransform, KIT_STANDARD_ACTION_IDS, type LabelOptions, LassoHitMode, LassoIcon, LassoSelectAdapter, LassoSelectBehavior, LayerEnumerableAdapter, LayerGroup, LayerHit, type LayerSlotValue, type LayersMap, LayoutSnap, LayoutStrategy, type LifecycleAnimation, LineIcon, type LinePoint, MIXED, MOVE_ANCHORS, type MarkerCtx, type MarkerEntry, type MarkerPaint, type MarkerSite, type MarkerSiteRequest, Mat3$1 as Mat3, MinimapCanvas, type MinimapCanvasProps, type MinimapFit, type Mixed, ModifierState, type MomentumOptions, MoveAdapter, MoveBehavior, type NestedHitOpts, type NestedHitTester, type NodeClientRect, NodeId, type NodeInk, type NodeInkCtx, type NodeOverlayFrame, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type NodeSilhouetteCtx, OngoingOverlay, type OpenFilePickerOptions, OrderedAdapter, OriginProjection, type OverlayPoint, OverlayPosition, PAINTED_CURSOR_LAYER_ID, PATH_ANCHOR_CHROME_ID, type PaintBindContext, type PaintKind, type PaintKindEditorProps, type PaintKindEntry, type PaintProgram, type PaintedCursor, type PaintedCursorFrame, type PaintedCursorState, PanBounds, type ParallaxOpts, Path, type PathAnchor, type PathAnchorAffordanceOptions, PathBuilder, PathDrawCommand, type PathEditingOverlayStyle, PathFillRule, type PathInWorldPose, type PathStation, type PenAnchor, PenIcon, type PenPreviewStyle, type PenScratch, type PenSubpath, PencilIcon, type PencilPoint, PickHud, type PickHudProps, type PickTopMostHitAdapter, type PinchZoomOptions, type PixelRenderPlan, type PointAlongPathOptions, type PointInPathOptions, type PointInTextPoseOpts, PointSnapBehavior, PointerProviderIfRoot, type PointerSample, type PointerSession, type PointerSessionCallbacks, type PointerSessionCancelReason, type PointerSessionOptions, type PointerStylusState, PolygonIcon, PolygonPath, type PolygonPoint, type Pose, PoseOverrides, PoseProjection, type PoseRotation, type PoseRun, type PoseRunCtx, type PoseRunStep, type PoseSource, type PosedNode, type PressureToWidthOptions, type Pt, RECT_ALIGN_PROJECTION, ROTATION_HANDLE_BASE_PX, type RangeStyle, type RasterImage, RectIcon, RectPath, RectPose, type RegisterNodeShapeOptions, RegisteredOp, RenderLayer, type RenderSceneToCanvasArgs, type RenderSceneToPixelsArgs, type ReorderDirection, ResizeAdapter, ResizeAnchor, ResizePose, type ResolvableView, RotateAdapter, RotateBehavior, type RotateGeometry, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, Rule, RuleCtx, type RunStylePatch, SampledTrack, type ScalarOrXY, Scene, SceneAdapter, type SceneAdapterSelection, SceneCanvas, type SceneCanvasAdapter, type SceneCanvasApi, type SceneCanvasHit, type SceneCanvasProps, Node$1 as SceneNode, type SceneNodeClientRectOpts, SceneRegistry, type SceneSlotConfig, type SceneToAdapterOptions, SceneViewCanvas, type SceneViewCanvasProps, type SceneViewDrawOne, ScopedBinding, type ScratchKey, type ScratchStore, type SelectAdapter, type SelectFromLassoOptions, SelectIcon, SelectionApi, SelectionContextProvider, SelectionContextProviderIfRoot, type SelectionContextValue, type SelectionHandleStyle, type SelectionHandlesLayerOpts, type SelectionOutlineLayerOpts, type SelectionOverlayLayerOpts, type SelectionOverlaySlotConfig, SerializedScene, type SetFlagResult, type SetPathFields, ShaderProgramHandle, type ShapeCoversPointOptions, type SharedAnchor, type Simulation, type SimulationCore, type SimulationForce, type SimulationNode, type SimulationOptions, type Skeleton, SliceDep, type SnapPattern, type SnapPointOptions, SnapStrategy, type SplitByLineOptions, type SpringPoseOptions, SpringPresetName, type SpringVertexColorsOptions, type StaggerVertexColorsOptions, type StandardSlotConfig, type StandardSlotName, StarIcon, type StarPoint, type StartEditOptions, type StyleKey, type StylusData, SubtractIcon, SvgIngestOptions, TOOL_PREF_KINDS, type TextEditScreenPose, type TextEditSelection, TextIcon, type ThresholdDragHandle, type ThresholdDragOptions, type TileGridOptions, type TilePatternOpts, Tool, type ToolBundle, ToolDef, ToolKeybinding, type ToolPref, type ToolPrefBoolean, type ToolPrefBooleanControl, type ToolPrefColor, type ToolPrefCustom, type ToolPrefEnum, type ToolPrefEnumControl, type ToolPrefEnumEncoding, type ToolPrefGroup, type ToolPrefKind, type ToolPrefLeaf, type ToolPrefNumber, type ToolPrefNumberControl, type ToolPrefNumberUnit, type ToolPrefObject, type ToolPrefPaint, type ToolPrefString, type ToolPrefStringControl, type ToolsApi, type TweenPoseOptions, type TweenVertexColorsOptions, UNION_OF_CHILDREN, UnionIcon, UnitSystem, UnitValue, UnknownIcon, type UseAlignOptions, type UseAlignReturn, UseAnimatorOptions, type UseArrayAdapterOptions, type UseBooleansOptions, type UseBooleansReturn, type UseCanvasFocusOptions, type UseDistributeOptions, type UseDistributeReturn, type UseDragGestureOptions, type UseDragRadialOptions, type UseDragRectOptions, type UseEyedropperToolOptions, type UseGestureDispatcherOptions, type UseGridCellHoverOptions, type UseGridCellHoverReturn, type UseGuidesReturn, type UseHandToolOptions, type UseHandleDragOptions, type UseHandleDragReturn, type UseHostAnchorOptions, type UseHoverTrackingArgs, type UseImageToolOptions, type UseKeybindingsOptions, type UseLassoSelectOptions, type UseLassoToolOptions, UseMoveOptions, type UseNodeOverlayFrameOptions, type UsePenToolOptions, type UsePointerStylusOptions, type UsePolygonToolOptions, type UsePoseRunOptions, 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, VERSION, type Vec2, type VelocityTracker, VertexColorChannel, View, ViewAnimationOptions, type ViewRect, type ViewResolver, type ViewTarget, ViewTransform, ViewportDims, type ViewportLayer, ViewportToolDef, type ViewportZoomAnimateOptions, type ViewportZoomOptions, VisibilityRules, type VisibleRaf, type VisibleRafOptions, type VisibleRafTarget, WHEEL_ZOOM_STEP, WeaselProvider, type WheelInput, type WheelPanOptions, type WheelPanOpts, ZoomBound, type ZoomClampOpts, ZoomFactor, _resetMarkersForTests, _resetPaintKindsForTests, aabbCenter, actionIs, actionShortcuts, alignDeltaFor, alignInsertBehavior, alignMoveBehavior, alignResizeBehavior, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyOpsTo, applyStyleToRange, areaSelectAction, arrayAdapter, asPaint, axisAlignedBounds, bezierCubic, bezierQuadratic, blendPoses, boundsOfPath, buildChromeCtx, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, caretIndexAt, cellAt, charOffsetToDomPosition, clampView, clearSelectionAction, clientToCanvas, cloneAction, coarsePointer, composeAffordanceLayer, composePath, composeSelectionPose, computeFitView, computeFitViewport, computeIndicatorCommand, computeWheelAction, cond, constrainTo45, containedThenNearest, countPathAnchors, createCellHighlightLayer, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDeleteOp, createGridLayer, createGuidesLayer, createHistory, createInsertOp, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createPaintedCursorState, createParallaxLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createPoseOverrides, createReorderOp, createReparentOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createSimulation, createTextLayer, createTilePattern, createTransformOp, createVelocityTracker, createViewResolver, createViewportLayer, cycleVertexColors, decomposePath, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultVisibilityRules, defineTool, defineViewportTool, deleteScratch, deriveAlignmentGuides, deriveParallaxView, derivedDepOf, derivedPose, dispatchApplyBatch, dlog, documentPose, domPositionToCharOffset, domToRuns, dwarn, editAnchorsAction, effectivePose, ellipsePath, enumerateAnchors, fillInPoseFrame, fillToBoundsFrame, findNodeShape, findShapeInk, findShapeSilhouette, fitTextPose, fitToBounds, fitZoom, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, focused, forEachCoalesced, freeform, gateLayer, gesturing, getAlpha01, getImageBitmap, getMarker, getNodeShapes, getPaintKind, getScratch, getStylusData, gradientForBounds, gradientGeometry, guideSnapStrategy, hexToRgba, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, imageStatus, inferredNodeProperties, inferredNodeRouting, insertAction, interpolateView, isBuiltinToolPref, isDebugEnabled, isEditableTarget, isGradientFill, isPatternSpec, keySpecShortcut, lassoSelectAction, lerpColorArray, lerpOklab, lerpOklch, linePath, listMarkers, listPaintKinds, liveScope, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markerDrawCommands, markerInset, markerKeyOf, markerSites, matchAlignment, matchesKeyBinding, meanScale, mergeAlphaFromPrev, mergeContributions, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nearest, nearestWithin, nestedHitTester, never, nodeHasFlag, none, normalizeHex, not, nurbs, oklabToOklch, oklabToSrgbU8, oklchToOklab, openFilePicker, openPointerSession, or, paintAlpha, paintKindOf, paintWithAlpha, paintWithColor, parseColor, parseColorToRgba255, parseDebugFlags, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathDistanceToPoint, pathDivide, pathExclude, pathFromD, pathInPoseFrame, pathInWorld, pathIntersect, pathIntersectsPolygon, pathIntersectsRect, pathOriginProjection, pathPoseDescriptor, pathSubtract, pathToAnchors, pathUnion, pickTopMostHit, pinchZoomAction, planPixelRender, pointAlongPath, pointInPath, pointInRotatedRect, pointInTextPose, polygonFromPoints, polylineFromPoints, poseRotationOf, pressureToWidth, pxExtent, rainbowVertexColors, rebuildOp, rectCorners, rectPath, registerMarker, registerNodeShape, registerOpFactory, registerPaintKind, registeredOpNames, regularPolygonPath, renderLabel, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveColor, resolveDeviceProfile, resolveFillPattern, resolveMarkerSize, resolvePatternSpec, resolveSkeleton, resolveVisibility, rgbaToHex, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotatePoint, rotatedRectCorners, rotationDegreesUnit, rotationHandle, roundToCell, runsToDom, sampleGradientStops, sampleTrack, scaleDelta, scalePathToBounds, sceneFromJSON, sceneNodeClientRect, sceneSelectionStore, sceneToAdapter, scopeBindings, scratchKey, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, setFlagOverRange, setScratch, shapeCoversPoint, snap, snapPoint, solid, solidVertexColors, spiro, splitPathByLine, splitSubpaths, springPose, springVertexColors, srgbU8ToOklab, staggerVertexColors, starPath, startThresholdDrag, strokeInsets, strokeOf, strokeWith, styleAtRange, subscribeImageReady, textCommand, textCommandFromRuns, tileGrid, toHex8, transformPath, translatePath, translatePolygonInPlace, translatePoseViaDescriptor, trimPolyline, tweenPose, tweenVertexColors, unionAABB, unionBounds, unionBoundsPath, unionOfChildren, useAlign, useAnimator, useArrayAdapter, useAutoCenter, useBooleans, useBooleansAdapter, useCanvasFocus, useCanvasSize, useDeviceProfile, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGestureDispatcher, useGridCellHover, useGuides, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useImageTool, useKeybindings, useLassoTool, useLineTool, useNodeOverlayFrame, usePenTool, usePencilTool, usePinchGesture, usePointerStylus, usePolygonTool, usePoseRun, usePublishSelection, useRectTool, useResizePolicy, useRotateTool, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelectionContext, useSimulation, useSliceDep, useStandardActions, useStarTool, useTextEdit, useTextTool, useTools, useVelocityTracker, useVisibleRaf, viewportDragPanAction, viewportWheelPanAction, viewportZoomAction, viewportsAt, visualBoundsViaDescriptor, wheelPan, wheelZoom, wheelZoomFactor, when, withAlpha01, withCoord, withGradientKind, withinPxBox, withinPxRadius, worldEditToStorage, zoomAt, zoomAtLeast };