@weasel-js/core 1.11.0 → 1.11.1

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 (365) hide show
  1. package/CHANGELOG.md +427 -0
  2. package/README.md +1 -1
  3. package/dist/animation/index.js +3 -3
  4. package/dist/animation/rig/bindRig.js +1 -1
  5. package/dist/animation/rig/rigNode.js.map +1 -1
  6. package/dist/barrel/canvas.js +7 -3
  7. package/dist/barrel/interactions.js +5 -4
  8. package/dist/barrel/paths.js +3 -3
  9. package/dist/barrel/renderer.js +3 -2
  10. package/dist/barrel/routing.js +6 -11
  11. package/dist/barrel/scene.js +8 -5
  12. package/dist/barrel/viewport.js +4 -3
  13. package/dist/canvas/Canvas.js +3 -1
  14. package/dist/canvas/Canvas.js.map +1 -1
  15. package/dist/canvas/SceneCanvas/SceneCanvasInput.js +17 -3
  16. package/dist/canvas/SceneCanvas/SceneCanvasInput.js.map +1 -1
  17. package/dist/canvas/SceneCanvas/builtinToolSets.js +30 -0
  18. package/dist/canvas/SceneCanvas/builtinToolSets.js.map +1 -0
  19. package/dist/canvas/SceneCanvas/canvasPassThrough.js +1 -0
  20. package/dist/canvas/SceneCanvas/canvasPassThrough.js.map +1 -1
  21. package/dist/canvas/SceneCanvas/coordTrace.js +5 -16
  22. package/dist/canvas/SceneCanvas/coordTrace.js.map +1 -1
  23. package/dist/canvas/SceneCanvas/defaultNodeProperties.js +5 -0
  24. package/dist/canvas/SceneCanvas/defaultNodeProperties.js.map +1 -1
  25. package/dist/canvas/SceneCanvas/features.js +45 -5
  26. package/dist/canvas/SceneCanvas/features.js.map +1 -1
  27. package/dist/canvas/SceneCanvas/props.js +1 -11
  28. package/dist/canvas/SceneCanvas/props.js.map +1 -1
  29. package/dist/canvas/SceneCanvas/toolRegistry.js +8 -4
  30. package/dist/canvas/SceneCanvas/toolRegistry.js.map +1 -1
  31. package/dist/canvas/SceneCanvas/useActionsPropResolver.js +1 -11
  32. package/dist/canvas/SceneCanvas/useActionsPropResolver.js.map +1 -1
  33. package/dist/canvas/SceneCanvas/useBuiltinShapeTools.js.map +1 -1
  34. package/dist/canvas/SceneCanvas/useBuiltinTools.js +2 -9
  35. package/dist/canvas/SceneCanvas/useBuiltinTools.js.map +1 -1
  36. package/dist/canvas/SceneCanvas/useCanvasDevtoolsRoot.js +93 -0
  37. package/dist/canvas/SceneCanvas/useCanvasDevtoolsRoot.js.map +1 -0
  38. package/dist/canvas/SceneCanvas/useCanvasSelection.js +7 -2
  39. package/dist/canvas/SceneCanvas/useCanvasSelection.js.map +1 -1
  40. package/dist/canvas/SceneCanvas/useCanvasTools.js +8 -8
  41. package/dist/canvas/SceneCanvas/useCanvasTools.js.map +1 -1
  42. package/dist/canvas/SceneCanvas/useNodeKinds.js +1 -1
  43. package/dist/canvas/SceneCanvas/useNodeKinds.js.map +1 -1
  44. package/dist/canvas/SceneCanvas/useSceneCanvasLayers.js +13 -2
  45. package/dist/canvas/SceneCanvas/useSceneCanvasLayers.js.map +1 -1
  46. package/dist/canvas/SceneCanvas/useSceneCanvasTools.js +1 -3
  47. package/dist/canvas/SceneCanvas/useSceneCanvasTools.js.map +1 -1
  48. package/dist/canvas/SceneCanvas/useSceneChrome.js +6 -7
  49. package/dist/canvas/SceneCanvas/useSceneChrome.js.map +1 -1
  50. package/dist/canvas/SceneCanvas/useSceneGestureDispatcher.js +5 -3
  51. package/dist/canvas/SceneCanvas/useSceneGestureDispatcher.js.map +1 -1
  52. package/dist/canvas/SceneCanvas/useScenePicking.js +2 -3
  53. package/dist/canvas/SceneCanvas/useScenePicking.js.map +1 -1
  54. package/dist/canvas/SceneCanvas/useSceneSelectTool.js +2 -1
  55. package/dist/canvas/SceneCanvas/useSceneSelectTool.js.map +1 -1
  56. package/dist/canvas/SceneCanvas/useSceneStandardActions.js +3 -4
  57. package/dist/canvas/SceneCanvas/useSceneStandardActions.js.map +1 -1
  58. package/dist/canvas/SceneCanvas.js +16 -14
  59. package/dist/canvas/SceneCanvas.js.map +1 -1
  60. package/dist/canvas/SurfaceCanvas.js +5 -22
  61. package/dist/canvas/SurfaceCanvas.js.map +1 -1
  62. package/dist/canvas/canvasRenderer.js +9 -5
  63. package/dist/canvas/canvasRenderer.js.map +1 -1
  64. package/dist/canvas/contextAttributes.js +14 -0
  65. package/dist/canvas/contextAttributes.js.map +1 -0
  66. package/dist/canvas/deps/editAnchors.js +9 -113
  67. package/dist/canvas/deps/editAnchors.js.map +1 -1
  68. package/dist/canvas/deps/insert.js +4 -2
  69. package/dist/canvas/deps/insert.js.map +1 -1
  70. package/dist/canvas/deps/pathEditCommits.js +193 -0
  71. package/dist/canvas/deps/pathEditCommits.js.map +1 -0
  72. package/dist/canvas/deps/snap.js +12 -9
  73. package/dist/canvas/deps/snap.js.map +1 -1
  74. package/dist/canvas/deps/transformFollowers.js +20 -0
  75. package/dist/canvas/deps/transformFollowers.js.map +1 -0
  76. package/dist/canvas/derivedPath.js +20 -1
  77. package/dist/canvas/derivedPath.js.map +1 -1
  78. package/dist/canvas/drawnBounds.js +29 -3
  79. package/dist/canvas/drawnBounds.js.map +1 -1
  80. package/dist/canvas/nodeShapes/derivedPainter.js +9 -1
  81. package/dist/canvas/nodeShapes/derivedPainter.js.map +1 -1
  82. package/dist/canvas/nodeShapes/pathPainter.js +3 -2
  83. package/dist/canvas/nodeShapes/pathPainter.js.map +1 -1
  84. package/dist/canvas/nodeShapes/shapePainter.js +1 -1
  85. package/dist/canvas/overlayRoleStrokes.js +12 -0
  86. package/dist/canvas/overlayRoleStrokes.js.map +1 -1
  87. package/dist/canvas/pathOverlay.js +27 -7
  88. package/dist/canvas/pathOverlay.js.map +1 -1
  89. package/dist/canvas/renderDebugSnapshot.js +1 -0
  90. package/dist/canvas/renderDebugSnapshot.js.map +1 -1
  91. package/dist/canvas/renderSceneToPixels.js +6 -5
  92. package/dist/canvas/renderSceneToPixels.js.map +1 -1
  93. package/dist/canvas/sceneAdapter.js.map +1 -1
  94. package/dist/canvas/useCanvasPaint.js +2 -1
  95. package/dist/canvas/useCanvasPaint.js.map +1 -1
  96. package/dist/canvas/useInFlightBounds.js +52 -0
  97. package/dist/canvas/useInFlightBounds.js.map +1 -0
  98. package/dist/canvas/useViewHelpers.js +7 -9
  99. package/dist/canvas/useViewHelpers.js.map +1 -1
  100. package/dist/clipboard.d.ts +3 -2
  101. package/dist/{clone-DZDrfIlU.d.ts → clone-C3e0OTuF.d.ts} +8 -21
  102. package/dist/clone.d.ts +4 -3
  103. package/dist/core/geometry/autoPoseDescriptor.js +1 -1
  104. package/dist/core/ops/setDependsOn.js +37 -0
  105. package/dist/core/ops/setDependsOn.js.map +1 -0
  106. package/dist/core/ops/writtenBy.js +53 -0
  107. package/dist/core/ops/writtenBy.js.map +1 -0
  108. package/dist/core/pages/fitViewToPage.js +12 -1
  109. package/dist/core/pages/fitViewToPage.js.map +1 -1
  110. package/dist/core/pages/pageEdits.js +164 -0
  111. package/dist/core/pages/pageEdits.js.map +1 -0
  112. package/dist/core/pages/pages.js +30 -1
  113. package/dist/core/pages/pages.js.map +1 -1
  114. package/dist/core/scene/NodeRouting.js +8 -3
  115. package/dist/core/scene/NodeRouting.js.map +1 -1
  116. package/dist/core/scene/arrivalWindow.js.map +1 -1
  117. package/dist/core/scene/carryDescendants.js +51 -0
  118. package/dist/core/scene/carryDescendants.js.map +1 -0
  119. package/dist/core/scene/docValues.js +57 -0
  120. package/dist/core/scene/docValues.js.map +1 -0
  121. package/dist/core/scene/editPass.js +111 -0
  122. package/dist/core/scene/editPass.js.map +1 -0
  123. package/dist/core/scene/effectivePose.js +7 -1
  124. package/dist/core/scene/effectivePose.js.map +1 -1
  125. package/dist/core/scene/fieldEdits.js +4 -1
  126. package/dist/core/scene/fieldEdits.js.map +1 -1
  127. package/dist/core/scene/historyFacade.js +1 -0
  128. package/dist/core/scene/historyFacade.js.map +1 -1
  129. package/dist/core/scene/layoutPass.js +28 -3
  130. package/dist/core/scene/layoutPass.js.map +1 -1
  131. package/dist/core/scene/recorder.js +28 -19
  132. package/dist/core/scene/recorder.js.map +1 -1
  133. package/dist/core/scene/scene.js +15 -9
  134. package/dist/core/scene/scene.js.map +1 -1
  135. package/dist/core/scene/sceneChanges.js +13 -0
  136. package/dist/core/scene/sceneChanges.js.map +1 -0
  137. package/dist/core/scene/sceneEdits.js +8 -1
  138. package/dist/core/scene/sceneEdits.js.map +1 -1
  139. package/dist/core/scene/sceneMutators.js +1 -0
  140. package/dist/core/scene/sceneMutators.js.map +1 -1
  141. package/dist/core/scene/sceneRecording.js +20 -3
  142. package/dist/core/scene/sceneRecording.js.map +1 -1
  143. package/dist/core/scene/sceneSelection.js +4 -1
  144. package/dist/core/scene/sceneSelection.js.map +1 -1
  145. package/dist/core/scene/sceneState.js +11 -5
  146. package/dist/core/scene/sceneState.js.map +1 -1
  147. package/dist/core/scene/serialization.js +5 -3
  148. package/dist/core/scene/serialization.js.map +1 -1
  149. package/dist/core/scene/types.js.map +1 -1
  150. package/dist/core/scene/unitScopes.js +19 -1
  151. package/dist/core/scene/unitScopes.js.map +1 -1
  152. package/dist/core/selection/usePublishSceneSelection.js +6 -12
  153. package/dist/core/selection/usePublishSceneSelection.js.map +1 -1
  154. package/dist/core/shapeKinds.js +25 -11
  155. package/dist/core/shapeKinds.js.map +1 -1
  156. package/dist/{cornerHandles-Camw_yeu.d.ts → cornerHandles-BHuoMs1o.d.ts} +1 -1
  157. package/dist/debug/createDebugOverlayLayer.js +16 -111
  158. package/dist/debug/createDebugOverlayLayer.js.map +1 -1
  159. package/dist/debug/createDebugSink.js +2 -1
  160. package/dist/debug/createDebugSink.js.map +1 -1
  161. package/dist/debug/defaultTheme.js +4 -2
  162. package/dist/debug/defaultTheme.js.map +1 -1
  163. package/dist/debug/features.js +17 -0
  164. package/dist/debug/features.js.map +1 -0
  165. package/dist/debug/overlayPanels.js +117 -0
  166. package/dist/debug/overlayPanels.js.map +1 -0
  167. package/dist/debug/parseDebugFlags.js +4 -13
  168. package/dist/debug/parseDebugFlags.js.map +1 -1
  169. package/dist/{depSchema-Cgfu_G9s.d.ts → depSchema-BpZNOv7q.d.ts} +114 -892
  170. package/dist/devtools/handlers.js +112 -0
  171. package/dist/devtools/handlers.js.map +1 -0
  172. package/dist/devtools/history.js +71 -0
  173. package/dist/devtools/history.js.map +1 -0
  174. package/dist/devtools/hook.js +74 -0
  175. package/dist/devtools/hook.js.map +1 -0
  176. package/dist/devtools/label.js +25 -0
  177. package/dist/devtools/label.js.map +1 -0
  178. package/dist/devtools/notices.js +58 -0
  179. package/dist/devtools/notices.js.map +1 -0
  180. package/dist/devtools/protocol.js +7 -0
  181. package/dist/devtools/protocol.js.map +1 -0
  182. package/dist/devtools/registry.js +90 -0
  183. package/dist/devtools/registry.js.map +1 -0
  184. package/dist/devtools/root.js +80 -0
  185. package/dist/devtools/root.js.map +1 -0
  186. package/dist/devtools/serialize.js +86 -0
  187. package/dist/devtools/serialize.js.map +1 -0
  188. package/dist/devtools/session.js +111 -0
  189. package/dist/devtools/session.js.map +1 -0
  190. package/dist/devtools/transport.js +67 -0
  191. package/dist/devtools/transport.js.map +1 -0
  192. package/dist/devtools/useDevtoolsRoot.js +81 -0
  193. package/dist/devtools/useDevtoolsRoot.js.map +1 -0
  194. package/dist/devtools-protocol.d.ts +435 -0
  195. package/dist/devtools-protocol.js +7 -0
  196. package/dist/devtools.d.ts +8 -0
  197. package/dist/devtools.js +12 -0
  198. package/dist/devtools.js.map +1 -0
  199. package/dist/features/chrome-caps/useHoverTracking.js +16 -10
  200. package/dist/features/chrome-caps/useHoverTracking.js.map +1 -1
  201. package/dist/features/ingestion/contentHandlers.js +25 -2
  202. package/dist/features/ingestion/contentHandlers.js.map +1 -1
  203. package/dist/features/measure/measureCommands.js +7 -5
  204. package/dist/features/measure/measureCommands.js.map +1 -1
  205. package/dist/features/paths/index.js +2 -2
  206. package/dist/features/paths/pathEditExtension.js.map +1 -1
  207. package/dist/features/paths/pathSnap/pathSnapSource.js +5 -5
  208. package/dist/features/paths/pathSnap/pathSnapSource.js.map +1 -1
  209. package/dist/features/paths/pathSnap/sceneIndex.js +10 -3
  210. package/dist/features/paths/pathSnap/sceneIndex.js.map +1 -1
  211. package/dist/features/selection/selectionPose.js +4 -1
  212. package/dist/features/selection/selectionPose.js.map +1 -1
  213. package/dist/features/snap/gather.js +9 -1
  214. package/dist/features/snap/gather.js.map +1 -1
  215. package/dist/features/snap/lazySession.js +17 -0
  216. package/dist/features/snap/lazySession.js.map +1 -0
  217. package/dist/features/snap/marks.js.map +1 -1
  218. package/dist/features/snap/probes2d.js +27 -19
  219. package/dist/features/snap/probes2d.js.map +1 -1
  220. package/dist/features/snap/readoutLayer.js.map +1 -1
  221. package/dist/features/snap/roles.js +2 -1
  222. package/dist/features/snap/roles.js.map +1 -1
  223. package/dist/features/snap/rotationSource.js +25 -8
  224. package/dist/features/snap/rotationSource.js.map +1 -1
  225. package/dist/features/snap/sceneSession2d.js +6 -4
  226. package/dist/features/snap/sceneSession2d.js.map +1 -1
  227. package/dist/features/snap/session2d.js +37 -23
  228. package/dist/features/snap/session2d.js.map +1 -1
  229. package/dist/features/snap/spanSnap.js +5 -2
  230. package/dist/features/snap/spanSnap.js.map +1 -1
  231. package/dist/icons.table.js +1 -1
  232. package/dist/icons.table.js.map +1 -1
  233. package/dist/icons.table.json +0 -10
  234. package/dist/index.d.ts +701 -696
  235. package/dist/index.js +35 -29
  236. package/dist/interactions/actions/align/action.js +6 -4
  237. package/dist/interactions/actions/align/action.js.map +1 -1
  238. package/dist/interactions/actions/align/align.js.map +1 -1
  239. package/dist/interactions/actions/booleans/action.js +7 -1
  240. package/dist/interactions/actions/booleans/action.js.map +1 -1
  241. package/dist/interactions/actions/clone/action.js +1 -1
  242. package/dist/interactions/actions/clone/behaviors.js +4 -4
  243. package/dist/interactions/actions/clone/behaviors.js.map +1 -1
  244. package/dist/interactions/actions/defaults/bendSegment.js +1 -1
  245. package/dist/interactions/actions/defaults/bendSegment.js.map +1 -1
  246. package/dist/interactions/actions/defaults/createPaintAction.js +1 -1
  247. package/dist/interactions/actions/defaults/delete.js +48 -39
  248. package/dist/interactions/actions/defaults/delete.js.map +1 -1
  249. package/dist/interactions/actions/defaults/duplicate.js +1 -1
  250. package/dist/interactions/actions/defaults/group.js +2 -2
  251. package/dist/interactions/actions/defaults/ingest.js +7 -5
  252. package/dist/interactions/actions/defaults/ingest.js.map +1 -1
  253. package/dist/interactions/actions/defaults/nudge.js +13 -38
  254. package/dist/interactions/actions/defaults/nudge.js.map +1 -1
  255. package/dist/interactions/actions/distribute/action.js +6 -4
  256. package/dist/interactions/actions/distribute/action.js.map +1 -1
  257. package/dist/interactions/actions/drawnBoxes.js +2 -1
  258. package/dist/interactions/actions/drawnBoxes.js.map +1 -1
  259. package/dist/interactions/actions/edit-anchors/action.js +3 -6
  260. package/dist/interactions/actions/edit-anchors/action.js.map +1 -1
  261. package/dist/interactions/actions/edit-anchors/preview.js +41 -8
  262. package/dist/interactions/actions/edit-anchors/preview.js.map +1 -1
  263. package/dist/interactions/actions/flip/action.js +6 -4
  264. package/dist/interactions/actions/flip/action.js.map +1 -1
  265. package/dist/interactions/actions/gestureLifecycle.js +5 -2
  266. package/dist/interactions/actions/gestureLifecycle.js.map +1 -1
  267. package/dist/interactions/actions/insert/action.js +1 -2
  268. package/dist/interactions/actions/insert/action.js.map +1 -1
  269. package/dist/interactions/actions/insert/commit.js +1 -1
  270. package/dist/interactions/actions/insert/parent.js +11 -0
  271. package/dist/interactions/actions/insert/parent.js.map +1 -0
  272. package/dist/interactions/actions/insert/placeAction.js +7 -2
  273. package/dist/interactions/actions/insert/placeAction.js.map +1 -1
  274. package/dist/interactions/actions/insert/session.js +5 -1
  275. package/dist/interactions/actions/insert/session.js.map +1 -1
  276. package/dist/interactions/actions/move/action.js +8 -4
  277. package/dist/interactions/actions/move/action.js.map +1 -1
  278. package/dist/interactions/actions/move/behaviors/layoutDrop.js +0 -1
  279. package/dist/interactions/actions/move/behaviors/layoutDrop.js.map +1 -1
  280. package/dist/interactions/actions/move/behaviors/snapToContainer.js +1 -1
  281. package/dist/interactions/actions/move/capture.js +1 -1
  282. package/dist/interactions/actions/move/commit/index.js +0 -2
  283. package/dist/interactions/actions/move/commit/index.js.map +1 -1
  284. package/dist/interactions/actions/move/commit/layoutDrop.js +2 -2
  285. package/dist/interactions/actions/move/commit/layoutRelease.js +2 -2
  286. package/dist/interactions/actions/move/commit/reparent.js +11 -5
  287. package/dist/interactions/actions/move/commit/reparent.js.map +1 -1
  288. package/dist/interactions/actions/move/frame.js +4 -10
  289. package/dist/interactions/actions/move/frame.js.map +1 -1
  290. package/dist/interactions/actions/move/landedDescendants.js +20 -17
  291. package/dist/interactions/actions/move/landedDescendants.js.map +1 -1
  292. package/dist/interactions/actions/move/layout/container.js +2 -1
  293. package/dist/interactions/actions/move/layout/container.js.map +1 -1
  294. package/dist/interactions/actions/move/layout/dragged.js +1 -1
  295. package/dist/interactions/actions/move/layout/dropPass.js +18 -1
  296. package/dist/interactions/actions/move/layout/dropPass.js.map +1 -1
  297. package/dist/interactions/actions/move/layout/exits.js +5 -5
  298. package/dist/interactions/actions/move/layout/exits.js.map +1 -1
  299. package/dist/interactions/actions/move/session.js +14 -3
  300. package/dist/interactions/actions/move/session.js.map +1 -1
  301. package/dist/interactions/actions/move/translate.js +8 -37
  302. package/dist/interactions/actions/move/translate.js.map +1 -1
  303. package/dist/interactions/actions/moveNodes.js +87 -0
  304. package/dist/interactions/actions/moveNodes.js.map +1 -0
  305. package/dist/interactions/actions/planeInput.js.map +1 -1
  306. package/dist/interactions/actions/resize/action.js +83 -72
  307. package/dist/interactions/actions/resize/action.js.map +1 -1
  308. package/dist/interactions/actions/resize/commit.js +2 -1
  309. package/dist/interactions/actions/resize/commit.js.map +1 -1
  310. package/dist/interactions/actions/resize/session.js +2 -0
  311. package/dist/interactions/actions/resize/session.js.map +1 -1
  312. package/dist/interactions/actions/resolvePreviews.js +3 -3
  313. package/dist/interactions/actions/resolvePreviews.js.map +1 -1
  314. package/dist/interactions/actions/rotate/action.js +7 -4
  315. package/dist/interactions/actions/rotate/action.js.map +1 -1
  316. package/dist/interactions/actions/rotate/commit.js +2 -1
  317. package/dist/interactions/actions/rotate/commit.js.map +1 -1
  318. package/dist/interactions/actions/rotate/session.js +2 -0
  319. package/dist/interactions/actions/rotate/session.js.map +1 -1
  320. package/dist/interactions/actions/selectionSubtree.js +13 -2
  321. package/dist/interactions/actions/selectionSubtree.js.map +1 -1
  322. package/dist/interactions/actions/testUtils.js.map +1 -1
  323. package/dist/interactions/actions/transform-again/action.js +5 -6
  324. package/dist/interactions/actions/transform-again/action.js.map +1 -1
  325. package/dist/interactions/actions/transformFinish.js +106 -0
  326. package/dist/interactions/actions/transformFinish.js.map +1 -0
  327. package/dist/kitSettingsSchema.js +0 -4
  328. package/dist/kitSettingsSchema.js.map +1 -1
  329. package/dist/move.d.ts +5 -4
  330. package/dist/{options-p9GZMXbY.d.ts → options-DBxEryYq.d.ts} +1 -1
  331. package/dist/resize.d.ts +4 -3
  332. package/dist/routing.d.ts +1 -1
  333. package/dist/routing.js +2 -2
  334. package/dist/test-hook/createTestHook.js +1 -1
  335. package/dist/test-hook/createTestHook.js.map +1 -1
  336. package/dist/test-hook/useTestHook.js +2 -1
  337. package/dist/test-hook/useTestHook.js.map +1 -1
  338. package/dist/test-seams.d.ts +9 -5
  339. package/dist/tools/builtin/pen/penHandle.js +3 -5
  340. package/dist/tools/builtin/pen/penHandle.js.map +1 -1
  341. package/dist/tools/index.js +26 -0
  342. package/dist/{types-CHVXGfYm.d.ts → types-7puAuVD2.d.ts} +3 -262
  343. package/dist/types-BN9hbdMI.d.ts +184 -0
  344. package/dist/types-CniVctmk.d.ts +949 -0
  345. package/dist/types-oFeQ5VjV.d.ts +264 -0
  346. package/dist/version.js +1 -1
  347. package/package.json +35 -25
  348. package/dist/canvas/SceneCanvas/useBuiltinRigTools.js +0 -65
  349. package/dist/canvas/SceneCanvas/useBuiltinRigTools.js.map +0 -1
  350. package/dist/tools/builtin/bone/boneActions.js +0 -156
  351. package/dist/tools/builtin/bone/boneActions.js.map +0 -1
  352. package/dist/tools/builtin/bone/boneOverlay.js +0 -71
  353. package/dist/tools/builtin/bone/boneOverlay.js.map +0 -1
  354. package/dist/tools/builtin/bone/placedRig.js +0 -28
  355. package/dist/tools/builtin/bone/placedRig.js.map +0 -1
  356. package/dist/tools/builtin/bone/rigEditState.js +0 -30
  357. package/dist/tools/builtin/bone/rigEditState.js.map +0 -1
  358. package/dist/tools/builtin/bone/useBoneTool.js +0 -125
  359. package/dist/tools/builtin/bone/useBoneTool.js.map +0 -1
  360. package/dist/tools/builtin/weight/useWeightTool.js +0 -101
  361. package/dist/tools/builtin/weight/useWeightTool.js.map +0 -1
  362. package/dist/tools/builtin/weight/weightActions.js +0 -140
  363. package/dist/tools/builtin/weight/weightActions.js.map +0 -1
  364. package/dist/tools/builtin/weight/weightOverlay.js +0 -78
  365. package/dist/tools/builtin/weight/weightOverlay.js.map +0 -1
@@ -5,878 +5,21 @@ import { IconRef } from '@weasel-js/icons';
5
5
  import { PaintDrawKind, DrawCommand, Effect, CompositeOp, BlendFactors } from '@weasel-js/renderer';
6
6
  import * as _weasel_js_routing_react from '@weasel-js/routing/react';
7
7
  import * as _weasel_js_geom from '@weasel-js/geom';
8
- import { Path, PoseLinear, Affine, FramedBox, View, Rect, Scale2, PolygonPath, PathFillRule, AnchorSet, PointOrigin } from '@weasel-js/geom';
9
- import * as _weasel_js_history from '@weasel-js/history';
10
- import { SerializedHistory, Op, History } from '@weasel-js/history';
8
+ import { FramedBox, View, Path, Affine, Rect, Scale2, PolygonPath, PathFillRule, AnchorSet, PointOrigin } from '@weasel-js/geom';
9
+ import { Op, History } from '@weasel-js/history';
11
10
  import { NodeId, ModifierState, OverlayRole, ResizeAnchor, ActionDeps, OngoingHandle, OngoingOverlay, SelectionApi, IngestItem, Point2, DragSample, DebugSink, LongPressState } from '@weasel-js/routing';
12
11
  import { TextNodeSource, TextOutlinesError, TextStyle, StyledRun, TextVerticalAlign } from '@weasel-js/text';
13
12
  import { CursorSpec } from '@weasel-js/cursor';
14
13
  import { ClaimableGesture } from '@weasel-js/gestures';
15
14
  import { SnapTier, ProbeRole } from '@weasel-js/geom/nd';
16
- import { a as ParallaxOpts, C as ContainerBounds, L as LayoutStrategy, P as PlaneMap, I as InsertAdapter, b as PasteOmission, R as RegionPickView, c as LayoutDropTargetMode, d as ReflowTransition } from './types-CHVXGfYm.js';
17
- import { UnitScope } from '@weasel-js/quantity';
15
+ import { S as Scene, R as RectPose } from './types-CniVctmk.js';
16
+ import { a as PlaneMap, L as LayoutStrategy, b as LayoutDropTargetMode, R as ReflowTransition } from './types-7puAuVD2.js';
18
17
  import { O as OriginProjection } from './originProjection-gY0jb4Wb.js';
19
18
  import { EasingSpec, InterpolatorFactory, Target, Animator, TargetAxes } from '@weasel-js/animator';
20
- import { B as BoundsConstraint } from './clone-DZDrfIlU.js';
19
+ import { I as InsertAdapter, P as PasteOmission, R as RegionPickView } from './types-oFeQ5VjV.js';
20
+ import { B as BoundsConstraint } from './clone-C3e0OTuF.js';
21
21
  import { P as PoseDescriptor } from './poseDescriptor-DN2yfnq_.js';
22
22
 
23
- /** The form a scene's undo entries are recorded in. A serialized history
24
- * carries it, and one carrying another is not restored. Form 2 holds the
25
- * scene's own ops for every edit; before it, an `applyBatch` entry held the
26
- * ops it was given. */
27
- declare const SCENE_HISTORY_FORM = 2;
28
- /** What `Scene.serializeHistory` answers with. */
29
- interface SerializedSceneHistory extends SerializedHistory {
30
- form: typeof SCENE_HISTORY_FORM;
31
- }
32
-
33
- interface LayerRecordBase<TLayer extends string> {
34
- id: TLayer;
35
- visible: boolean;
36
- locked: boolean;
37
- /** Draw this layer as a parallax plane: through a view derived from the
38
- * camera's (see `deriveParallaxView`), and picked through the same one.
39
- * Absent means the layer moves with the camera. */
40
- parallax?: ParallaxOpts;
41
- /** A non-printing layer of aids — measurements, notes — rather than content.
42
- * Its nodes draw on the canvas and save with the scene, but export leaves
43
- * them out and content picking passes through them. Read it through
44
- * `isAnnotationLayer`. Absent means content. */
45
- annotation?: boolean;
46
- }
47
- /** A layer declared when the scene was created. Fixed set, no display name —
48
- * these are the kit's own render bands, not something a user manages. */
49
- interface SystemLayerRecord<TLayer extends string> extends LayerRecordBase<TLayer> {
50
- kind: 'system';
51
- }
52
- /** A layer the user created and can rename, reorder or delete. */
53
- interface UserLayerRecord<TLayer extends string> extends LayerRecordBase<TLayer> {
54
- kind: 'user';
55
- name: string;
56
- }
57
- /** Per-layer metadata held by the scene: whether it is visible and locked,
58
- * and where it sits in the render stack. Distinct from a node's `layer` tag,
59
- * which merely names one of these. */
60
- type LayerRecord<TLayer extends string> = SystemLayerRecord<TLayer> | UserLayerRecord<TLayer>;
61
- /** One of the layers a scene is created with. */
62
- interface SystemLayerSpec<TLayer extends string> {
63
- id: TLayer;
64
- visible?: boolean;
65
- locked?: boolean;
66
- /** See `LayerRecord.parallax`. */
67
- parallax?: ParallaxOpts;
68
- /** See `LayerRecord.annotation`. */
69
- annotation?: boolean;
70
- }
71
- /** Argument to `Scene.addLayer`. Always produces a `UserLayerRecord`
72
- * (`kind: 'user'`). */
73
- interface AddLayerSpec<TLayer extends string> {
74
- id: TLayer;
75
- name: string;
76
- /** Default `true`. */
77
- visible?: boolean;
78
- /** Default `false`. */
79
- locked?: boolean;
80
- /** See `LayerRecord.parallax`. */
81
- parallax?: ParallaxOpts;
82
- /** See `LayerRecord.annotation`. */
83
- annotation?: boolean;
84
- /** Render-stack position. Default: top of stack (highest render index). */
85
- index?: number;
86
- }
87
-
88
- /** A pose a container's layout wrote — reported by `Scene.onReflow` — in the
89
- * node's stored frame. */
90
- interface LayoutMove<TPose> {
91
- id: NodeId;
92
- from: TPose;
93
- to: TPose;
94
- }
95
- /** How a scene reads and resizes a laid-out container's bounds. */
96
- interface LayoutFrame<TPose> {
97
- /** The container's bounds, from its world pose. Default: the pose's own
98
- * `x`/`y`/`width`/`height`; a pose without them is not laid out. */
99
- bounds?(pose: TPose): ContainerBounds | null;
100
- /** `pose` resized from bounds `from` to `to`, for a layout that grows its
101
- * container. Default: `to`'s fields written over the pose. */
102
- remap?(pose: TPose, from: ContainerBounds, to: ContainerBounds): TPose;
103
- }
104
-
105
- /** Folding a node's pose up its parent chain to world, and back down. */
106
- /** Minimal adapter needed by `composeWorldPose` and friends — pose lookup plus parent walk. */
107
- interface PoseAdapter<TPose> {
108
- getPose(id: string): TPose;
109
- getParent(id: string): string | null;
110
- /** Whether `id`'s pose is a frame its children are expressed in. Absent
111
- * means every node is one. A container whose pose derives from its children
112
- * is not: its children share its frame, so the fold passes over it. */
113
- definesFrame?(id: string): boolean;
114
- }
115
- /**
116
- * What a container's pose does to its children under a `compose`: nothing,
117
- * an offset, or a whole frame. `'rigid'` is the frame: a container's rotation
118
- * and its `transform` both reach its children, and a child's `transform`
119
- * holds the skew or stretch its box and rotation cannot.
120
- */
121
- type PoseClosure = 'identity' | 'translation' | 'rigid';
122
- /** Consumer's pose-composition strategy for hierarchical scenes. `compose`
123
- * folds a child's pose (in parent's frame) up to the next frame; `decompose`
124
- * is its inverse. Default is IDENTITY — an absolute-pose scene where every
125
- * node already stores world coords (parent is grouping-only, no transform). */
126
- interface PoseComposition<TPose> {
127
- compose(parent: TPose, child: TPose): TPose;
128
- decompose(parent: TPose, world: TPose): TPose;
129
- closure: PoseClosure;
130
- }
131
- /** Default pose-composition strategy: IDENTITY, an absolute-pose scene. */
132
- declare const IDENTITY_POSE_COMPOSITION: PoseComposition<unknown>;
133
- /** Whether `composition` makes a container's pose a frame, so a stored pose
134
- * is local to it. False for the absolute-pose model. */
135
- declare function composesFrames(composition: {
136
- closure: PoseClosure;
137
- }): boolean;
138
- /**
139
- * Walk `id`'s parent chain and fold local poses into a world pose via
140
- * `compose`. Cycle-safe.
141
- *
142
- * `compose(parent, child)` interprets `child` as expressed *in `parent`'s
143
- * local frame* and returns the equivalent pose in the next frame up.
144
- */
145
- declare function composeWorldPose<TPose>(adapter: PoseAdapter<TPose>, id: string, compose: (parent: TPose, child: TPose) => TPose): TPose;
146
- /**
147
- * Convert `worldPose` into a local pose expressed under `newParentId`'s
148
- * frame, so a reparented child keeps its visual world position.
149
- *
150
- * `decompose(parent, world)` returns the local pose `child` such that
151
- * `compose(parent, child) === world`. Pass `newParentId === null` for the
152
- * root frame; the function returns `worldPose` unchanged.
153
- */
154
- declare function rebaseLocalPose<TPose>(adapter: PoseAdapter<TPose>, worldPose: TPose, newParentId: string | null, compose: (parent: TPose, child: TPose) => TPose, decompose: (parent: TPose, world: TPose) => TPose): TPose;
155
-
156
- /**
157
- * Where a reported pose write came from.
158
- *
159
- * - `'call'` — a scene method called directly, alone or inside `scene.batch`:
160
- * a button's `scene.setPose`, a `scene.add`.
161
- * - `'ops'` — ops applied as one edit through `applyBatch` or `history.apply`,
162
- * which is how actions commit: a drag's release, a resize, a nudge, an align.
163
- * - `'undo'` / `'redo'` — a history step, a jump through the history included.
164
- * - `'layout'` — a container's layout arranging what a live edit changed; also
165
- * reported to `onReflow`.
166
- * - `'untracked'` — a write inside `scene.untracked`, such as a pose target
167
- * committing an animation's destination.
168
- */
169
- type PoseWriteOrigin = 'call' | 'ops' | 'undo' | 'redo' | 'layout' | 'untracked';
170
- /** One node's pose as a scene change left it, in the node's stored frame. */
171
- interface PoseWrite<TPose> {
172
- id: NodeId;
173
- /** The pose before the change; `undefined` for a node the change added. */
174
- from: TPose | undefined;
175
- to: TPose;
176
- origin: PoseWriteOrigin;
177
- /** The edit's label (`'setPose'`, a batch's, an action's `'Move'`) for
178
- * `'call'` and `'ops'`; `undefined` otherwise. */
179
- label?: string;
180
- }
181
- /** A removed node as it was last shown, with the descendants it took along. */
182
- interface RemovedNode<TPose, TNode = unknown> {
183
- /** The node as it stood before the change removed it. */
184
- node: TNode;
185
- /** Where it was shown, override included, in its stored frame. */
186
- pose: TPose;
187
- children: readonly RemovedNode<TPose, TNode>[];
188
- }
189
- /** One node a scene change removed, a removal's root: its descendants ride
190
- * beneath it rather than being reported apart. */
191
- interface PoseRemoval<TPose, TNode = unknown> extends RemovedNode<TPose, TNode> {
192
- id: NodeId;
193
- /** The parent it was removed from, which may still be in the scene. */
194
- parent: NodeId | null;
195
- origin: PoseWriteOrigin;
196
- label?: string;
197
- }
198
- /** What a scene reports about the poses its edits write. */
199
- interface ScenePoseReports<TPose, TNode = unknown> {
200
- /** Called with the poses each live edit's layout pass wrote, after the
201
- * edit lands — never for an undo or redo, which restore poses rather than
202
- * arrange them. What a reflow animation glides from. */
203
- onReflow(listener: (moves: readonly LayoutMove<TPose>[]) => void): () => void;
204
- /** Called once per change, before the scene's subscribers hear of it, with
205
- * every node whose pose the change wrote or that it added, and every node
206
- * it removed — an undone add among them. A node written back to the pose
207
- * it had, or both added and removed by the change, is left out of both.
208
- * Not called for `loadState` or the scene's initial nodes. */
209
- onPoseWrite(listener: (writes: readonly PoseWrite<TPose>[], removed: readonly PoseRemoval<TPose, TNode>[]) => void): () => void;
210
- }
211
-
212
- /**
213
- * One node's ephemeral presentation override — what a frame loop wants to say
214
- * about a node without saying it about the document.
215
- *
216
- * Not document content: never recorded in history, never in `toJSON`, and
217
- * writing one does not bump `Scene.getVersion()`. Hoist one entry per node and
218
- * mutate it in place on a frame loop; `PoseOverrides.commit()` is what makes a
219
- * mutation visible.
220
- */
221
- interface PoseOverride<TPose> {
222
- /** Replaces the node's document pose everywhere the render and hit-test
223
- * paths read one, including the clip a container derives from its pose, and
224
- * winning over a `derivePose`. Resolved by `effectivePose` — reading
225
- * `node.pose` directly is how those paths came to disagree about where a
226
- * node is. */
227
- pose?: TPose;
228
- /** Multiplied into the node's painted alpha, on top of any `alphaFor`. */
229
- alpha?: number;
230
- /** Replaces the geometry the node paints and is picked by: the path in its data, or the one
231
- * it derives. It is in the frame a painter draws in, so give `pose` beside it, as the
232
- * path's bounds with no rotation, or the pose's turn is applied to the path again and the
233
- * selection chrome stays on the old box. A skinned rig is the writer. */
234
- path?: Path;
235
- }
236
- /**
237
- * The scene's ephemeral per-node overrides — see {@link PoseOverride}.
238
- *
239
- * The intended shape of a frame is: `set` each node once, mutate the entries
240
- * in place per frame, `commit()` once. `commit` is not optional bookkeeping —
241
- * the painter memo keys on pose *reference*, so a mutation without a commit
242
- * paints the previous frame with no error.
243
- *
244
- * To promote a frame to document state (dropping a drag, baking an animation),
245
- * write it once through `Scene.setPose` and `clear` the override.
246
- */
247
- interface PoseOverrides<TPose> {
248
- /** Store `entry` for `id` **by reference**; the caller keeps mutating it. */
249
- set(id: NodeId, entry: PoseOverride<TPose>): void;
250
- /** The entry `set` stored, by reference — what a writer checks to know
251
- * whether its own entry is still installed. Painting reads `read`. */
252
- get(id: NodeId): PoseOverride<TPose> | undefined;
253
- /** What the node is drawn and picked with: every source of overrides for
254
- * it folded into one, as of the last write or `commit()`. `undefined` for
255
- * a node nothing overrides. The object is reused per node. */
256
- read(id: NodeId): PoseOverride<TPose> | undefined;
257
- has(id: NodeId): boolean;
258
- /** The overridden ids, as a snapshot array. */
259
- ids(): readonly NodeId[];
260
- clear(id: NodeId): void;
261
- clearAll(): void;
262
- /** Publish this frame's in-place mutations: invalidate the painter memo for
263
- * every overridden node, then notify subscribers. */
264
- commit(): void;
265
- /** Notified after every write. The canvas uses this to repaint without a
266
- * scene version bump. */
267
- subscribe(fn: () => void): () => void;
268
- /** Monotonic write counter. A snapshot for observers that poll. */
269
- getGeneration(): number;
270
- /** A claim on some nodes' poses for a writer that publishes a whole frame
271
- * at a time: a gesture's preview, a layout run. Each call is a new claim. */
272
- hold(): PoseHold<TPose>;
273
- }
274
- /**
275
- * One writer's claim on some nodes' pose overrides, from
276
- * {@link PoseOverrides.hold}.
277
- *
278
- * A hold knows which entries are its own, so several writers share the table
279
- * without clearing each other: a drag and a layout run each publish their
280
- * frame, and each sees the other's nodes as pinned.
281
- */
282
- interface PoseHold<TPose> {
283
- /** Publish this frame's poses. It is the whole picture, not a delta: an id
284
- * the frame leaves out is released. Subscribers are notified once. */
285
- set(poses: Iterable<readonly [NodeId, TPose]>): void;
286
- /** The poses other writers are publishing, by id. */
287
- others(): ReadonlyMap<NodeId, TPose>;
288
- /** Release every id still held. An id whose entry another writer has since
289
- * replaced is left alone: that writer owns it now. When the frame is being
290
- * committed to the document, call this after the write lands, or the scene
291
- * answers with the old pose in between. */
292
- drop(): void;
293
- }
294
-
295
- /** One layer as it appears in a snapshot. A snapshot written before layer
296
- * kind was serialized carries neither field, and loads as a system layer —
297
- * which is what every layer in such a snapshot was. */
298
- interface SerializedLayer<TLayer extends string> extends SystemLayerSpec<TLayer> {
299
- kind?: 'system' | 'user';
300
- /** Present on a user layer, absent on a system one. */
301
- name?: string;
302
- }
303
- /** JSON-serializable shape of a Scene's current state. Produced by
304
- * `scene.toJSON()`; consumed by `sceneFromJSON()`. Function fields
305
- * (e.g., `clipFromPose`) appear as string keys (`clipFromPoseKey`) and
306
- * are resolved through `SceneRegistry` at load time. */
307
- interface SerializedScene<TData, TLayer extends string, TPose> {
308
- version: 1;
309
- /** The whole layer stack, system and user alike — the name predates user
310
- * layers and is kept so existing snapshots still parse. */
311
- systemLayers: readonly SerializedLayer<TLayer>[];
312
- nodes: readonly SerializedNode<TData, TLayer, TPose>[];
313
- }
314
- /** JSON-serializable shape of a single node. Mirrors `AddNodeSpec` but
315
- * with function fields replaced by registry keys. */
316
- interface SerializedNode<TData, TLayer extends string, TPose> {
317
- id: string;
318
- kind: 'leaf' | 'container';
319
- layer: TLayer;
320
- pose: TPose;
321
- data: TData;
322
- /** Parent id; omitted for roots. */
323
- parent?: string;
324
- /** Registry key for the container's clip-path factory.
325
- * Containers only; omitted when the container has no clip. */
326
- clipFromPoseKey?: string;
327
- /** Registry key for the container's `copiesFromPose`. Containers only;
328
- * omitted when it draws no copies. */
329
- copiesFromPoseKey?: string;
330
- /** Ids this node's geometry derives from, or `'children'`. Omitted when it
331
- * derives from nothing. */
332
- dependsOn?: readonly string[] | 'children';
333
- /** Mirrors `SceneNode.pickable`. Omitted when the node is pickable. */
334
- pickable?: boolean;
335
- /** Mirrors `SceneNode.hidden`. Omitted when the node is shown. */
336
- hidden?: boolean;
337
- /** Mirrors `SceneNode.locked`. Omitted when the node is unlocked. */
338
- locked?: boolean;
339
- /** Registry key for the node's `derivePath` function. Omitted when it has none. */
340
- derivePathKey?: string;
341
- /** Registry key for the node's `derivePose` function. Omitted when it has none. */
342
- derivePoseKey?: string;
343
- /** Registry key for the container's layout strategy. Omitted when it has none. */
344
- layoutKey?: string;
345
- /** Mirrors `ContainerNode.units`. Omitted when the container declares none. */
346
- units?: UnitScope;
347
- }
348
-
349
- /**
350
- * Axis-aligned rectangle pose with optional rotation. Rotation is in
351
- * radians, pivoted on the unrotated AABB center; absent === 0.
352
- */
353
- interface RectPose {
354
- x: number;
355
- y: number;
356
- width: number;
357
- height: number;
358
- /** Rotation in radians around the unrotated AABB center. Absent === 0. */
359
- rotation?: number;
360
- /** A skew or per-axis scale the box and rotation cannot hold; see
361
- * {@link PoseLinear}. Absent is the identity. */
362
- transform?: PoseLinear;
363
- }
364
-
365
- /**
366
- * One dependency, as a derivation reads it: the node itself and the pose it is
367
- * painted at.
368
- *
369
- * The node comes along because a connector legitimately reads more than a box
370
- * — an edge that thickens with its endpoint's weight, or routes only to nodes
371
- * on a given layer, is answering off `data` and `layer`.
372
- */
373
- interface DerivedDep<TPose, TData = unknown, TLayer extends string = string> {
374
- node: Node<TData, TLayer, TPose>;
375
- /** Its override when it has one, else its own derived pose, else the pose
376
- * the document stores — `effectivePose`, the same answer the renderer uses. */
377
- pose: TPose;
378
- /** The path a pose override shows it by, else the one it derives, else
379
- * `null`; the document reading skips the override, and a `toPose` lookup
380
- * carries it into the box its `toPose` answers. Read
381
- * it to place something *along* a dependency: a label on a routed edge.
382
- * Resolved on first read and memoized on the dependency. */
383
- readonly path: Path | null;
384
- }
385
- /** `F` with its parameters checked bivariantly, as a method's are, so that a
386
- * `Scene<D, L, MyPose>` is a `Scene<unknown, string, unknown>`. A callback for
387
- * an unrelated pose is still rejected; one for a narrower pose is not. */
388
- type Bivariant<F extends (...args: never[]) => unknown> = {
389
- method(...args: Parameters<F>): ReturnType<F>;
390
- }['method'];
391
- /** Computes a node's path from its dependencies: the type of a node's
392
- * `derivePath` and of each entry in `SceneRegistry.derivePath`. */
393
- type DerivePathFn<TPose, TData = unknown, TLayer extends string = string> = Bivariant<(node: Node<TData, TLayer, TPose>, deps: readonly (DerivedDep<TPose, TData, TLayer> | undefined)[]) => Path | null>;
394
- /** Computes a node's pose from its dependencies: the type of a node's
395
- * `derivePose` and of each entry in `SceneRegistry.derivePose`. */
396
- type DerivePoseFn<TPose, TData = unknown, TLayer extends string = string> = Bivariant<(node: Node<TData, TLayer, TPose>, deps: readonly (DerivedDep<TPose, TData, TLayer> | undefined)[]) => TPose | null>;
397
- /** A container's clip, from its pose: the type of `ContainerNode.clipFromPose`
398
- * and of each entry in `SceneRegistry.clipFromPose`. */
399
- type ClipFromPoseFn<TPose> = Bivariant<(pose: TPose) => Path | null>;
400
- /** The extra times a container draws its children: the type of
401
- * `ContainerNode.copiesFromPose` and of each entry in
402
- * `SceneRegistry.copiesFromPose`. Each affine is in world coordinates and
403
- * carries the children, as drawn, to one copy. */
404
- type CopiesFromPoseFn<TPose, TData = unknown, TLayer extends string = string> = Bivariant<(pose: TPose, node: ContainerNode<TData, TLayer, TPose>) => readonly Affine[] | null>;
405
-
406
- /** Brand a string as a NodeId. */
407
- declare const asNodeId: (s: string) => NodeId;
408
-
409
- interface NodeBase<TData, TLayer extends string, TPose> {
410
- id: NodeId;
411
- layer: TLayer;
412
- pose: TPose;
413
- data: TData;
414
- parent: NodeId | null;
415
- /** Nodes whose poses this node's geometry is computed from. Fixed at add
416
- * time. Absent or empty means the node's geometry is authored, which is the
417
- * normal case.
418
- *
419
- * `'children'` means "my own children, in child order" — a container that
420
- * hugs its contents, which a fixed id list cannot express because
421
- * reparenting would have to maintain it. The two forms differ in lifetime
422
- * as well as in membership: deleting a node deletes everything that names
423
- * it in `dependsOn`, but a container outlives the children it derives
424
- * from — an emptied group is still a group. */
425
- dependsOn?: readonly NodeId[] | 'children';
426
- /** Whether the hit-test walk can return this node. Default `true`; `false`
427
- * makes it transparent to picking, so a click on it lands on whatever is
428
- * behind — normally its own container.
429
- *
430
- * For content a container owns rather than content the user selects on its
431
- * own: the label inside a box, a body's rows. It does not hide the node
432
- * from anything else — it still paints, still clips, and a consumer can
433
- * still select it by id. */
434
- pickable?: boolean;
435
- /** Not drawn, with its whole subtree: picking, area selection, select-all,
436
- * snapping and the selection pass over it, and an SVG export writes it with
437
- * `display="none"`. Absent means shown; `Scene.isHidden` folds in its
438
- * ancestors' flags and its layer's visibility. */
439
- hidden?: boolean;
440
- /** Out of reach, with its whole subtree: still drawn, but picking and area
441
- * selection pass over it, the selection drops it, and every edit to it
442
- * throws, as on a locked layer. Absent means unlocked; `Scene.isLocked`
443
- * folds in its ancestors' and its layer's. */
444
- locked?: boolean;
445
- /** Computes this node's path from its dependencies, in `dependsOn` order —
446
- * each one the node and the pose it is painted at.
447
- * A dependency that has been removed arrives as `undefined`.
448
- * Returning `null` means "nothing to draw right now". Re-evaluated when a
449
- * dependency's world pose changes, never authored. */
450
- derivePath?: DerivePathFn<TPose, TData, TLayer>;
451
- /** Computes this node's pose from its dependencies' poses, the same way
452
- * `derivePath` computes its path — same `dependsOn` list, same
453
- * registry-keyed serialization.
454
- *
455
- * Where a derived path is resolved at paint time and reaches only the
456
- * painter, a derived pose is what the node *is* at: it feeds bounds,
457
- * hit-testing, selection chrome, snapping and layout, and every reader
458
- * gets it through `effectivePose`. A pose override still wins over it.
459
- *
460
- * Returning `null` means "I have nothing to derive from right now", and
461
- * the node falls back to its authored `pose`. `setPose` on a derived node
462
- * still writes that authored pose; it is simply not what anything reads. */
463
- derivePose?: DerivePoseFn<TPose, TData, TLayer>;
464
- }
465
- /** A node with no children — a shape, a label, an image. */
466
- interface LeafNode<TData, TLayer extends string, TPose = RectPose> extends NodeBase<TData, TLayer, TPose> {
467
- kind: 'leaf';
468
- }
469
- /** A node with an ordered list of children. This is the real group: what
470
- * Cmd+G creates, what SVG `<g>` round-trips to. A container has its own pose,
471
- * which its children's poses are relative to, and may optionally clip them. */
472
- interface ContainerNode<TData, TLayer extends string, TPose = RectPose> extends NodeBase<TData, TLayer, TPose> {
473
- kind: 'container';
474
- children: NodeId[];
475
- /** Optional clip-path source. Re-evaluated each render. Returning `null`
476
- * means "no clip for this container right now"; an empty / zero-area path
477
- * means "clip everything out" (children render nowhere). */
478
- clipFromPose?: ClipFromPoseFn<TPose>;
479
- /** Draws the whole subtree again under each affine it returns, on top of
480
- * the original, which still draws once as authored. The copies are paint,
481
- * not nodes: nothing stores them, so they follow every edit to the
482
- * children, and a pick that lands on one answers with the child it copies.
483
- * A copy is a copy of the clipped content — the clip travels with it.
484
- * Re-evaluated each render; `null` or `[]` draws no copies. */
485
- copiesFromPose?: CopiesFromPoseFn<TPose, TData, TLayer>;
486
- /** How this container arranges its children. Whenever the container's
487
- * child set or order changes, or its bounds change size, the scene hands
488
- * the change to the strategy — `depart` for children that left it,
489
- * `arrive` for children that joined it, `childPoses` otherwise — and records the poses it writes in the same
490
- * undo entry as the change. A drag reads it too: it is the layout `move`
491
- * reflows and drops against. */
492
- layout?: LayoutStrategy<TPose>;
493
- /** The unit system this container's contents are written in, and what one
494
- * of its base units is worth in the enclosing scope's. It covers the
495
- * children, not the container; `sceneUnitScopes` reads the chain. */
496
- units?: UnitScope;
497
- }
498
- /** A node in the scene tree: either a leaf or a container. Re-exported
499
- * publicly as `SceneNode`, to avoid colliding with the DOM's `Node`. */
500
- type Node<TData, TLayer extends string, TPose = RectPose> = LeafNode<TData, TLayer, TPose> | ContainerNode<TData, TLayer, TPose>;
501
- /** What `Scene.add` needs to mint a node. Everything except the id is
502
- * required; the id is generated unless one is supplied. */
503
- interface AddNodeSpec<TData, TLayer extends string, TPose = RectPose> {
504
- kind: 'leaf' | 'container';
505
- layer: TLayer;
506
- pose: TPose;
507
- data: TData;
508
- parent?: NodeId | null;
509
- index?: number;
510
- /** Explicit id wins over the Scene's `generateId` and the kit default. */
511
- id?: NodeId;
512
- /** Mirrors `SceneNode.pickable`. Omit for the default, which is pickable. */
513
- pickable?: boolean;
514
- /** Mirrors `SceneNode.hidden`. */
515
- hidden?: boolean;
516
- /** Mirrors `SceneNode.locked`. */
517
- locked?: boolean;
518
- /** Only meaningful when `kind === 'container'`. Attach a clip-path function
519
- * to the node; ignored for leaves. Mirrors `ContainerNode.clipFromPose`. */
520
- clipFromPose?: ClipFromPoseFn<TPose>;
521
- /** Mirrors `ContainerNode.copiesFromPose`; ignored for leaves. */
522
- copiesFromPose?: CopiesFromPoseFn<TPose, TData, TLayer>;
523
- /** Mirrors `SceneNode.dependsOn`. */
524
- dependsOn?: readonly NodeId[] | 'children';
525
- /** Mirrors `SceneNode.derivePath`. Taken as a live function; its registry key is
526
- * looked up from it, never passed in. */
527
- derivePath?: DerivePathFn<TPose, TData, TLayer>;
528
- /** Mirrors `SceneNode.derivePose`, on the same terms as `derivePath`. */
529
- derivePose?: DerivePoseFn<TPose, TData, TLayer>;
530
- /** Mirrors `ContainerNode.layout`; ignored for leaves. */
531
- layout?: LayoutStrategy<TPose>;
532
- /** Mirrors `ContainerNode.units`; ignored for leaves. */
533
- units?: UnitScope;
534
- }
535
- /** A custom scene mutation registered with `Scene.registerOp`: how to apply
536
- * it and how to undo it. The pair is what makes it participate in history. */
537
- interface RegisteredOp<P> {
538
- apply: (payload: P) => void;
539
- revert: (payload: P) => void;
540
- /** Opts this kind into coalescing under `UseSceneOptions.coalesceWindowMs`:
541
- * two entries of this kind that return the same key inside the window
542
- * merge, and undoing the merged entry calls `revert` with the first
543
- * payload only. Declare it only when `revert` restores an absolute state
544
- * (a stored "from" value), never for a relative payload such as a delta.
545
- * Omitted, or returning `undefined`, the op is always its own entry. */
546
- coalesceKey?: (payload: P) => string | undefined;
547
- }
548
- /** Per-scene registry mapping string keys to live function references.
549
- * Passed to `createScene({ ..., registry })` and `sceneFromJSON(json, { registry })`.
550
- * Each function-field type has its own keyed map. */
551
- interface SceneRegistry<TPose, TData = unknown, TLayer extends string = string> {
552
- /** Maps registry keys to `clipFromPose` factory functions for container nodes. */
553
- clipFromPose?: Readonly<Record<string, ClipFromPoseFn<TPose>>>;
554
- /** Maps registry keys to `copiesFromPose` functions for container nodes. */
555
- copiesFromPose?: Readonly<Record<string, CopiesFromPoseFn<TPose, TData, TLayer>>>;
556
- /** Maps registry keys to `derivePath` functions for nodes with `dependsOn`. */
557
- derivePath?: Readonly<Record<string, DerivePathFn<TPose, TData, TLayer>>>;
558
- /** Maps registry keys to `derivePose` functions for nodes with `dependsOn`. */
559
- derivePose?: Readonly<Record<string, DerivePoseFn<TPose, TData, TLayer>>>;
560
- /** Maps registry keys to container layout strategies. */
561
- layout?: Readonly<Record<string, LayoutStrategy<TPose>>>;
562
- }
563
- /**
564
- * Decides what one edit's changes to containers do to their children.
565
- * `arrivals` maps each container to the ids that joined it — by an `add`
566
- * under it or a `move` into it, whatever op or call made them — in the order
567
- * they arrived. `changed` names every container whose child set or order
568
- * changed, or whose pose changed size, arrivals included. Both are read once
569
- * the edit's other mutations have landed.
570
- *
571
- * Return the poses to write, in each node's stored frame; they become part of
572
- * the same edit, and so of the same undo step. An empty map writes nothing.
573
- * Return `null` to refuse: the whole edit is reverted (see
574
- * `SceneArrivalRefused`).
575
- *
576
- * Runs only for live edits. Undo, redo and a restored history replay the
577
- * arrangement that was decided the first time. With none installed, a scene
578
- * holding declared layouts (`ContainerNode.layout`) runs its own.
579
- */
580
- type SceneArrivalHandler<TPose> = (arrivals: ReadonlyMap<NodeId, readonly NodeId[]>, changed: ReadonlySet<NodeId>,
581
- /** The nodes that left each container in the edit, by the container they
582
- * left — removed, or moved out. */
583
- departures: ReadonlyMap<NodeId, readonly NodeId[]>) => ReadonlyMap<NodeId, TPose> | null;
584
- /**
585
- * The kit-owned scene tree: nodes, layers, and the undo history over both.
586
- *
587
- * A scene is logical, not visual — it says what exists and where, and nothing
588
- * about how it is painted. Every mutating method is undoable, and reads are
589
- * snapshots rather than live views. Nodes are addressed by `NodeId`; hold ids
590
- * across mutations, not node objects.
591
- *
592
- * Three type parameters keep it domain-agnostic: `TData` is the app's payload,
593
- * which the kit never inspects; `TPose` is the transform shape, `RectPose` by
594
- * default; `TLayer` is the union of layer names.
595
- */
596
- interface Scene<TData, TLayer extends string, TPose = RectPose> extends ScenePoseReports<TPose, Node<TData, TLayer, TPose>> {
597
- readonly nodes: ReadonlyMap<NodeId, Node<TData, TLayer, TPose>>;
598
- readonly roots: readonly NodeId[];
599
- readonly layers: readonly LayerRecord<TLayer>[];
600
- /** The registry this scene resolves node functions against — the consumer's
601
- * entries over the kit's. */
602
- readonly registry: SceneRegistry<TPose, TData, TLayer>;
603
- /** See {@link UseSceneOptions.composition}. */
604
- readonly composition: PoseComposition<TPose>;
605
- get(id: NodeId): Node<TData, TLayer, TPose> | undefined;
606
- /** A token for the node `id` names right now, for telling one node from a
607
- * later one that reuses its id. It holds for as long as the node stays in
608
- * the scene, whatever edits it takes, and is different every time the id
609
- * enters the scene — by `add`, by an undo or redo that brings it back, or
610
- * by `loadState`. `undefined` when `id` is not in the scene. Compare tokens
611
- * for equality only; their order means nothing. */
612
- incarnation(id: NodeId): number | undefined;
613
- childrenOf(id: NodeId): readonly NodeId[];
614
- ancestorsOf(id: NodeId): readonly NodeId[];
615
- renderOrder(): Iterable<NodeId>;
616
- /** The same layer-major sequence as {@link Scene.renderOrder}, as the nodes
617
- * themselves. Prefer this wherever the ids are only going to be resolved
618
- * back to nodes. Cached until a structural edit, so repeat calls hand back
619
- * the same array — a snapshot, not a live view, and not yours to mutate. */
620
- renderOrderNodes(): readonly Node<TData, TLayer, TPose>[];
621
- /** The nodes on one layer, in render order. Cached alongside
622
- * {@link Scene.renderOrderNodes} until a structural edit. A snapshot, not
623
- * a live view, and not yours to mutate. An unknown layer id yields an
624
- * empty array. */
625
- nodesOnLayer(layer: TLayer): readonly Node<TData, TLayer, TPose>[];
626
- /** A fresh id from this scene's `generateId`, or the kit default: the id
627
- * `add` would give a spec with none. For code that has to name a node
628
- * before it exists, such as one building an insert op. */
629
- mintId(): NodeId;
630
- add(spec: AddNodeSpec<TData, TLayer, TPose>): NodeId;
631
- /** Delete `id`, its **entire subtree**, and **everything that derives from**
632
- * any of those nodes — a node listing one of them in `dependsOn` goes too,
633
- * along with its own subtree, transitively. A dependent can live anywhere in
634
- * the tree, so this deletes nodes the caller never named and may unlink
635
- * several disjoint subtrees at once. Recorded as one undoable step; `undo()`
636
- * restores every one of them where it was, child order intact. */
637
- remove(id: NodeId): void;
638
- /** {@link remove} over several roots at once, as a **single** undoable step.
639
- * Ids resolve against the tree as it stands at the call, so an id that
640
- * another one would cascade away is absorbed rather than removed twice —
641
- * which is what makes it safe to pass a whole selection. Throws if any id is
642
- * not in the scene; an empty list does nothing and records no step. */
643
- removeMany(ids: readonly NodeId[]): void;
644
- /** Every node {@link removeMany} would take if given `ids`: each id, its
645
- * subtree, everything deriving from any of those, and those nodes' subtrees
646
- * in turn. Ids not in the scene come back unchanged.
647
- *
648
- * A set, not a restore order: a dependent can be reached before the parent
649
- * it sits under, which is also in the closure. */
650
- removalClosure(ids: readonly NodeId[]): readonly NodeId[];
651
- update(id: NodeId, patch: {
652
- data: TData;
653
- }): void;
654
- setPose(id: NodeId, pose: TPose): void;
655
- /** Retag `id` to `layer`. On a **container this cascades**: every descendant
656
- * is moved to the same layer, recorded as a **single** undo step.
657
- *
658
- * Invariants:
659
- * - **Layer floor** — a child may not render below its parent, so retagging
660
- * to a layer *below* the node's parent throws. Retagging to the parent's
661
- * layer or any higher one is allowed; a node with no parent is
662
- * unconstrained.
663
- * - **No-op elision** — setting the layer a node already has does nothing
664
- * and pushes **no** history entry. */
665
- setLayer(id: NodeId, layer: TLayer): void;
666
- /** Point `id` at a different set of dependencies — retargeting an edge's end
667
- * onto another node, or switching a container between an id list and
668
- * `'children'`. Recorded as one undoable step.
669
- *
670
- * Order is significant: a derivation reads its dependencies positionally,
671
- * so `[b, a]` is not `[a, b]`. Ids need not be in the scene — a declared
672
- * dependency that appears later invalidates the node when it does, the same
673
- * as one declared at `add`. Passing `undefined` drops the declaration, after
674
- * which nothing cascades the node away.
675
- *
676
- * **No-op elision** — declaring what the node already declares does nothing
677
- * and pushes no history entry. */
678
- setDependsOn(id: NodeId, dependsOn: readonly NodeId[] | 'children' | undefined): void;
679
- /** Give container `id` a different layout — a strategy, its key in
680
- * `SceneRegistry.layout`, or `null` for none — and re-arrange its children
681
- * under it, as one undoable step. Throws for a leaf, or a key the registry
682
- * does not hold. A registered layout is recorded by its key, so a
683
- * serialized history restores it; an unregistered one lives only as long
684
- * as the session.
685
- *
686
- * **No-op elision** — setting the layout a container already has does
687
- * nothing and pushes no history entry. */
688
- setLayout(id: NodeId, layout: LayoutStrategy<TPose> | string | null): void;
689
- /** Reparent `id` under `parent` (or to a root when `parent` is `null`) at
690
- * `index` within the new sibling list, appending when `index` is omitted.
691
- * Siblings are reindexed. Recorded as one undoable step.
692
- *
693
- * Rejected (throws) when:
694
- * - `parent` exists but is a **leaf**, not a container;
695
- * - the move would form a **cycle** — `parent` is `id` itself or one of
696
- * `id`'s own descendants;
697
- * - it would drop `id` **below its new parent's layer** (child may not
698
- * render below its parent).
699
- *
700
- * `move(id, null)` — detaching to a root — is always allowed regardless of
701
- * layer, since a root has no parent to render beneath. */
702
- move(id: NodeId, parent: NodeId | null, index?: number): void;
703
- /** Shift `id` to `index` within its **current** parent's child list. Unlike
704
- * {@link move}, the parent never changes — only sibling order. */
705
- reorder(id: NodeId, index: number): void;
706
- /** Show or hide a layer. Hiding drops its nodes from the selection. */
707
- setLayerVisible(layer: TLayer, visible: boolean): void;
708
- /** Lock or unlock a layer. A locked layer still paints, but its nodes are
709
- * out of reach: picking and area selection pass over them, the selection
710
- * drops them, and every node mutation on them throws. Locking is never
711
- * blocked by the lock, and neither are the other layer operations. */
712
- setLayerLocked(layer: TLayer, locked: boolean): void;
713
- /** Set or clear (`undefined`) a layer's parallax — see
714
- * `LayerRecord.parallax`. Undoable; an animation tweening it writes inside
715
- * {@link Scene.untracked} so no frame becomes an undo step. */
716
- setLayerParallax(layer: TLayer, parallax: ParallaxOpts | undefined): void;
717
- /** Whether `id` is locked: it or an ancestor carries `locked`, or sits on a
718
- * locked layer. A lock covers its whole subtree, whatever layers the
719
- * descendants are tagged to. An id not in the scene is not locked. */
720
- isLocked(id: NodeId): boolean;
721
- /** Whether `id` is not drawn: its own layer is hidden, or it or an ancestor
722
- * carries `hidden`. A hidden layer hides only the nodes tagged to it. An
723
- * id not in the scene is not hidden. */
724
- isHidden(id: NodeId): boolean;
725
- /** Hide or show node `id` and its subtree — see `SceneNode.hidden`. One
726
- * undo step; hiding drops the subtree from the selection. Never blocked by
727
- * a lock, and setting what the node already has records nothing. */
728
- setHidden(id: NodeId, hidden: boolean): void;
729
- /** Lock or unlock node `id` and its subtree — see `SceneNode.locked`. One
730
- * undo step; locking drops the subtree from the selection. Never blocked
731
- * by a lock, and setting what the node already has records nothing. */
732
- setLocked(id: NodeId, locked: boolean): void;
733
- /** Run `fn` with the lock guard lifted, for a programmatic edit that has to
734
- * reach a locked node. Undo and redo never need it. */
735
- unlocked<T>(fn: () => T): T;
736
- addLayer(spec: AddLayerSpec<TLayer>): void;
737
- /** Drop a user layer and every node tagged to it, as one undoable step.
738
- * Removal cascades, so this also deletes nodes **on other layers** that
739
- * derive from a node on this one. */
740
- removeLayer(layer: TLayer): void;
741
- renameLayer(layer: TLayer, name: string): void;
742
- moveLayer(layer: TLayer, index: number): void;
743
- registerOp<P>(kind: string, handler: RegisteredOp<P>): void;
744
- recordOp<P>(op: {
745
- kind: string;
746
- payload: P;
747
- }): void;
748
- /** Install (or clear with `null`) the active-journal accessor after scene
749
- * construction, for a journal source built with `scene.history` as a
750
- * dependency. Overrides any `getActiveJournal` set in `UseSceneOptions`. */
751
- setActiveJournalAccessor(fn: (() => _weasel_js_history.Journal | null) | null): void;
752
- /** Install what the scene does when nodes join a container, replacing any
753
- * handler installed before; `null` removes it. Returns a function that
754
- * removes this handler, and does nothing once another has replaced it.
755
- * See {@link SceneArrivalHandler}. */
756
- setArrivalHandler(handler: SceneArrivalHandler<TPose> | null): () => void;
757
- /** Apply a batch of ops against `adapter` as one undo entry.
758
- *
759
- * The entry holds the scene writes the ops made, as a direct call records
760
- * them, and beside them any op that wrote no scene state, bound to
761
- * `adapter`. Undo restores those writes; it does not call an op's
762
- * `invert()` or the adapter again. **What an op states is not recorded**:
763
- * one applied over a document that already holds its result, as after an
764
- * `untracked` preview, records a write from that pose to itself, and undo
765
- * goes nowhere. Put the document back first.
766
- *
767
- * The entry lands in the open `batch` when there is one, else on the
768
- * active journal, else on the scene's own history, where it can coalesce
769
- * under `coalesceWindowMs` with one whose ops' keys match.
770
- *
771
- * Returns false when the arrival handler refused the batch: it is reverted
772
- * and unrecorded. Inside `batch` it is true; that batch may still refuse. */
773
- applyBatch(ops: Op[], label: string, adapter: unknown): boolean;
774
- /** The transient set of active ids — "operate on these N as a unit".
775
- * Shared by every view over this scene unless a view supplies its own
776
- * (see `CanvasView.selection`). Not document content: it never appears
777
- * in `toJSON`. It does ride on history entries, so undo and redo put
778
- * back the selection an edit was made under; changing it is never an
779
- * undo step of its own. Removing a node deselects it. */
780
- getSelection(): readonly NodeId[];
781
- setSelection(ids: readonly NodeId[]): void;
782
- /** Per-node pose / alpha overrides the render and hit-test paths read
783
- * through. Like {@link Scene.getSelection} this is not document content:
784
- * writes are never recorded, never serialized, and do not bump
785
- * {@link Scene.getVersion}. See {@link PoseOverrides}. */
786
- readonly overrides: PoseOverrides<TPose>;
787
- /** The scene's undo/redo engine, in the shape `@weasel-js/history` defines.
788
- * Mutating members route through
789
- * the scene's own wrappers, so an undo driven through this bumps
790
- * {@link Scene.getVersion} and notifies subscribers exactly as
791
- * {@link Scene.undo} does; `getVersion` / `subscribe` on it report the
792
- * engine's history version, not the scene's. */
793
- readonly history: History;
794
- undo(): boolean;
795
- redo(): boolean;
796
- canUndo(): boolean;
797
- canRedo(): boolean;
798
- batch<T>(label: string, fn: () => T): T;
799
- /** The layout container `id` declares, or `null` for a leaf or a
800
- * container that declares none. */
801
- layoutOf(id: NodeId): LayoutStrategy<TPose> | null;
802
- /** Declare the unit scope of container `id`, or clear it with `null`. */
803
- setUnits(id: NodeId, units: UnitScope | null): void;
804
- /** Run `fn` with every mutation applied but none recorded — for writes
805
- * that are not edits, such as a simulation stepping poses each frame.
806
- * Undo and redo move between recorded states and never restore an
807
- * untracked write; the next recorded change starts from whatever the
808
- * untracked writes left, so undoing it lands there. A `batch` inside
809
- * records nothing; inside a `batch`, these writes stay out of its entry.
810
- * Notifies once, reverts `fn`'s writes if it throws, and throws on
811
- * `applyBatch` and `history.apply` / `applyOps`, which exist to record. */
812
- untracked<T>(fn: () => T): T;
813
- /** Read-only snapshot of every history entry currently reachable from
814
- * the present state. Oldest applied first, then redoable entries in
815
- * the order they'd be re-applied. Each entry id is stable. */
816
- historyEntries(): readonly {
817
- id: string;
818
- label: string;
819
- }[];
820
- /** Index of the "current state". Equals the count of applied entries;
821
- * `0` means "nothing applied" (initial). */
822
- historyIndex(): number;
823
- /** Jump to the given history index, clamped to [0, total]. Returns true
824
- * if any movement occurred. */
825
- jumpToHistoryIndex(index: number): boolean;
826
- /** Snapshot the undo/redo history in a JSON-serializable form (the
827
- * engine's `SerializedHistory`, marked with the scene's recorded form).
828
- * An entry holds the scene's own ops, whichever way the edit was made.
829
- * An op handed to `applyBatch` that wrote no scene state is held as
830
- * itself, and an entry with a nameless one is dropped. Payload
831
- * JSON-safety (e.g. typed arrays inside poses) is the caller's concern.
832
- * Do not call mid-`batch` — the open batch's ops are not yet recorded. */
833
- serializeHistory(): SerializedSceneHistory;
834
- /** Replace the undo/redo history from a `serializeHistory()` snapshot.
835
- * Call on a scene whose node/layer state already matches the snapshot's
836
- * head state (i.e. right after `loadState` from the paired scene
837
- * snapshot); node state is NOT mutated. Ops re-registered via
838
- * `registerOp` before this call round-trip; unknown kinds become no-op
839
- * placeholders; external ops rebuild via the global op-factory registry
840
- * and replay against the `setHistoryAdapter` accessor. Restored entries
841
- * never coalesce with new ones. Notifies once. A snapshot that is not in
842
- * the current recorded form (see `SCENE_HISTORY_FORM`) is dropped:
843
- * the history is left as it was. Do not call mid-`batch`:
844
- * the stacks are replaced underneath the open batch, whose eventual
845
- * flush would graft onto (and evict against) the restored stacks. */
846
- restoreHistory(snapshot: SerializedHistory): void;
847
- /** Install (or clear with `null`) the accessor for the adapter that
848
- * RESTORED external ops apply against on undo/redo: the ops handed to
849
- * `applyBatch` that wrote no scene state, such as a selection change,
850
- * rebuilt from a `restoreHistory` snapshot. Resolved lazily at each
851
- * apply, so wiring order relative to `restoreHistory` doesn't matter.
852
- * Live `applyBatch` entries are unaffected (they bind their call-site
853
- * adapter). If unset when a restored op applies, the op is a debug-warned
854
- * no-op. */
855
- setHistoryAdapter(fn: (() => unknown) | null): void;
856
- /** Snapshot the current scene state to a JSON-serializable shape.
857
- * History (undo/redo stacks) is NOT captured. Function fields like
858
- * `ContainerNode.clipFromPose` are translated to string keys via the
859
- * scene's registry; throws if any function field has no matching key. */
860
- toJSON(): SerializedScene<TData, TLayer, TPose>;
861
- /** Replace this scene's entire node + layer state in place from a snapshot
862
- * produced by `toJSON()`. Unlike `sceneFromJSON`, the existing Scene
863
- * instance is preserved — holders such as `<SceneCanvas>` keep their
864
- * reference. History (undo/redo) is cleared, matching `sceneFromJSON`.
865
- * Bumps `getVersion()` and notifies subscribers exactly once. Selected
866
- * ids the snapshot does not hold leave the selection, and every pose
867
- * override is cleared.
868
- *
869
- * Throws inside any other edit — `batch`, `untracked`, `applyBatch`, an
870
- * undo — which would revert to a state this replaces. Throws on an unsupported version or unknown registry/layer ids; on a
871
- * malformed snapshot the scene is left empty or partially populated (callers should treat a
872
- * `loadState` throw as fatal and reload). Snapshots from `toJSON()` are
873
- * always well-formed. */
874
- loadState(json: SerializedScene<TData, TLayer, TPose>): void;
875
- subscribe(listener: () => void): () => void;
876
- /** Monotonically increasing version. Snapshot for `useSyncExternalStore`. */
877
- getVersion(): number;
878
- }
879
-
880
23
  /** Pixel dimensions of the canvas viewport. */
881
24
  interface ViewportDims {
882
25
  width: number;
@@ -1852,6 +995,9 @@ interface TransientPath {
1852
995
  path: Path;
1853
996
  /** Omitted reads as `'chrome'`. */
1854
997
  role?: OverlayRole;
998
+ /** Paint the path wears, drawn in place of the role's fill and under the
999
+ * role's outline: a result shown as it will look once made. */
1000
+ paint?: PathPaint;
1855
1001
  }
1856
1002
  /** How one role reads. The stroke is one screen pixel wide at any zoom. */
1857
1003
  interface PathOverlayStyle {
@@ -1959,18 +1105,6 @@ interface PreviewPathsDep {
1959
1105
  show(paths: readonly TransientPath[]): () => void;
1960
1106
  }
1961
1107
 
1962
- /** The snap readout's colors and line width, for a mark that sets no `color`. */
1963
- interface SnapReadoutStyle {
1964
- /** Points, lines and their labels. Default orange, as the path marker. */
1965
- color?: string;
1966
- /** Gap and distance marks. Default blue, as the guides. */
1967
- gapColor?: string;
1968
- /** Stroke width in screen px. Default 1. */
1969
- lineWidth?: number;
1970
- }
1971
- /** A screen-space layer drawing the marks in `store`, redrawn when they change. */
1972
- declare function createSnapReadoutLayer(store: SnapOutcomeStore, style?: SnapReadoutStyle): RenderLayer<unknown>;
1973
-
1974
1108
  /** The `snap` dep: what a drawn or dragged point locks to. */
1975
1109
 
1976
1110
  type Point$4 = {
@@ -2004,6 +1138,9 @@ interface SnapBegin {
2004
1138
  press: Point$4;
2005
1139
  /** The subject, whose geometry offers no targets. */
2006
1140
  ids?: readonly string[];
1141
+ /** The container a subject not yet in the scene lands in: an insert's
1142
+ * target. Absent for the top of the tree, or a gesture with `ids`. */
1143
+ parent?: string;
2007
1144
  /** Resize: the sides the drag pins. An axis left `free` is an edge handle. */
2008
1145
  handle?: ResizeAnchor;
2009
1146
  /** Resize: the box `handle` belongs to. Default: the subject's drawn box,
@@ -2027,6 +1164,13 @@ interface SnapBegin {
2027
1164
  /** How the camera's world maps into the parallax plane the gesture's points
2028
1165
  * are in, read each frame; absent or null in the camera's own world. */
2029
1166
  plane?: () => PlaneMap | null;
1167
+ /** Sources asked for this gesture only, after the canvas's own, under the
1168
+ * same ranking; one sharing an id with a source still asked throws. Their
1169
+ * points are 2D world coordinates, so a 3D host does not take them. */
1170
+ sources?: readonly SnapSource[];
1171
+ /** Ids of sources this gesture does not ask: listed, registered or a
1172
+ * canvas default. */
1173
+ omit?: readonly string[];
2030
1174
  }
2031
1175
  /** The snap roles held this frame. */
2032
1176
  interface SnapMods {
@@ -2126,6 +1270,12 @@ interface SnapCollect<P = Point$3> {
2126
1270
  /** `id`'s drawn box, measured as `box` is. Absent in a host with no 2D
2127
1271
  * scene. */
2128
1272
  drawnBox?(id: string): FramedBox | undefined;
1273
+ /** The subject: the nodes the gesture moves or resizes. Absent for a
1274
+ * gesture with none, such as drawing a new shape. */
1275
+ ids?: readonly string[];
1276
+ /** Where a gesture with no subject yet puts what it draws: the container a
1277
+ * new node lands in. Absent for the top of the tree. */
1278
+ parent?: string;
2129
1279
  /** Nodes that offer no targets: what the gesture moves. */
2130
1280
  exclude: readonly string[];
2131
1281
  /** Only these nodes offer targets. */
@@ -2241,11 +1391,22 @@ interface SceneCanvasSnap {
2241
1391
  * guide snaps: a pose neither a rect nor a `Path` needs its own. Default
2242
1392
  * `AUTO_ORIGIN_PROJECTION`. */
2243
1393
  originProjection?: OriginProjection<unknown>;
2244
- /** Whether the snap marks are drawn. Default `true`. */
1394
+ /** Whether the canvas draws the snap marks. Default `true`. With `false`
1395
+ * the marks are still written to the `snapReadout` dep's store, for a
1396
+ * layer of the consumer's own. */
2245
1397
  readout?: boolean;
2246
1398
  /** The readout's default colors and line width, for a mark that sets no `color`. */
2247
1399
  readoutStyle?: SnapReadoutStyle;
2248
1400
  }
1401
+ /** The snap readout's colors and line width, for a mark that sets no `color`. */
1402
+ interface SnapReadoutStyle {
1403
+ /** Points, lines and their labels. Default orange, as the path marker. */
1404
+ color?: string;
1405
+ /** Gap and distance marks. Default blue, as the guides. */
1406
+ gapColor?: string;
1407
+ /** Stroke width in screen px. Default 1. */
1408
+ lineWidth?: number;
1409
+ }
2249
1410
 
2250
1411
  type Point$2 = {
2251
1412
  x: number;
@@ -2461,6 +1622,28 @@ declare function useDecayLoop(): {
2461
1622
  cancel: () => void;
2462
1623
  };
2463
1624
 
1625
+ /** A node as a transform frame previews it: its stored pose, and its data where that changes. */
1626
+ interface TransformPreviewNode {
1627
+ id: string;
1628
+ pose: unknown;
1629
+ data?: unknown;
1630
+ }
1631
+ /**
1632
+ * Something that changes other nodes along with a whole-node transform — a
1633
+ * move, resize, rotate, flip, align, distribute, or nudge. The
1634
+ * `transformFollowers` dep holds every one, and each transform runs them all,
1635
+ * in order.
1636
+ */
1637
+ interface TransformFollower {
1638
+ /** The other nodes a drag's frame changes, given the stored pose the frame
1639
+ * puts each transformed node in: what `finish` would commit for it.
1640
+ * `data` holds the data the followers before this one previewed, by id. */
1641
+ preview(frame: ReadonlyMap<string, unknown>, data: ReadonlyMap<string, unknown>): readonly TransformPreviewNode[];
1642
+ /** `ops`, the batch so far, with this follower's ops added after it; null
1643
+ * when it refuses the transform. */
1644
+ finish(ops: readonly Op[], label: string): Op[] | null;
1645
+ }
1646
+
2464
1647
  /**
2465
1648
  * The lifecycle the ongoing transform actions (`move`, `resize`, `rotate`)
2466
1649
  * share: what their committed batch is called in history, whether it is
@@ -2730,6 +1913,16 @@ interface PathEditFinishCtx {
2730
1913
  /** The nodes that list `id` in their `dependsOn`, directly or through others. */
2731
1914
  dependents(id: string): readonly string[];
2732
1915
  }
1916
+ /**
1917
+ * The scene as {@link PathEditExtension.finishTransform} reads it: `node` and
1918
+ * `path` answer each node as the transform leaves it, `before` as it was.
1919
+ */
1920
+ interface PathTransformFinishCtx extends Omit<PathEditFinishCtx, 'id'> {
1921
+ /** The nodes the transform moves, resizes or turns. */
1922
+ ids: readonly string[];
1923
+ /** A node's committed editable path before the transform, in world space; null when it has none. */
1924
+ before(id: string): PolygonPath | null;
1925
+ }
2733
1926
  /** One feature's share of path edit. Every member is optional. */
2734
1927
  interface PathEditExtension {
2735
1928
  /** Names it as a {@link PathEditMark}'s owner. Unique per canvas. */
@@ -2765,6 +1958,14 @@ interface PathEditExtension {
2765
1958
  pose: unknown;
2766
1959
  data: unknown;
2767
1960
  }, worldPath: PolygonPath, origins?: readonly (PointOrigin | null)[], ctx?: PathEditFinishCtx): FinishedPathEdit | null;
1961
+ /**
1962
+ * The other nodes a whole-node transform — a move, resize, rotate, flip or
1963
+ * nudge — changes along with the nodes it transforms, so whatever this
1964
+ * extension keeps true across nodes holds; committed in the transform's
1965
+ * history entry. Null when the transform should not happen. An entry
1966
+ * naming a node the transform itself moves is ignored.
1967
+ */
1968
+ finishTransform?(ctx: PathTransformFinishCtx): readonly PathEditOther[] | null;
2768
1969
  /** How path edit reads and writes the nodes whose `data.representation`
2769
1970
  * is of its kind. */
2770
1971
  representation?: PathRepresentation;
@@ -2930,6 +2131,10 @@ interface IngestCtx {
2930
2131
  /** The kit insert dep — id/layer/undoable-op supplied; the canonical way
2931
2132
  * for a handler to mint a node (`insert.commit(bounds, { kind, ... })`). */
2932
2133
  insert: InsertDep;
2134
+ /** The canvas's snap dep, for a handler that places what it inserts where a
2135
+ * gesture would: begin a session, take `at()`, `end()`. Its points are ctx
2136
+ * coordinates: world on a 2D canvas, screen in a 3D host. */
2137
+ snap?: SnapDep;
2933
2138
  /** Raw op commit for handlers that build their own ops. */
2934
2139
  applyOps(ops: Op[], label?: string): void;
2935
2140
  scene: Scene<unknown, string, unknown>;
@@ -2964,7 +2169,10 @@ interface ContentHandlerEntry {
2964
2169
  /** Stable identifier — used for unregistration and debugging
2965
2170
  * (`'kit:image'`, `'app:csv'`). */
2966
2171
  id: string;
2967
- /** MIME glob(s) (`'image/*'`, `'text/csv'`) or an item predicate. */
2172
+ /** MIME glob(s) (`'image/*'`, `'text/csv'`) or an item predicate. A drop
2173
+ * or paste keeps string flavors of any exact MIME named here or in
2174
+ * `types` while the handler is registered, so a handler can claim a drag
2175
+ * from the app's own UI by a type of its own. */
2968
2176
  match: string | string[] | ((item: IngestItem) => boolean);
2969
2177
  /** For a predicate `match`: the MIME globs it could say yes to. A drag
2970
2178
  * still in flight shows its MIMEs and no contents, so a predicate cannot be
@@ -3123,6 +2331,29 @@ interface InsertLive {
3123
2331
  gesture: unknown;
3124
2332
  }
3125
2333
 
2334
+ /**
2335
+ * Layout-strategy lookup by container id, consumed by `moveAction` to run
2336
+ * the drag-time reflow pass. Sourced by `<SceneCanvas>` from the layout each
2337
+ * container declares on its scene node. `getLayout` returns null for a
2338
+ * container that declares none, so the reflow pass is a no-op then.
2339
+ */
2340
+ interface LayoutDep {
2341
+ getLayout(containerId: string): LayoutStrategy<unknown> | null;
2342
+ /** Which container wins when several contain the drop point. Default
2343
+ * `'innermost'`. */
2344
+ dropTarget?: LayoutDropTargetMode;
2345
+ /** Carries displaced siblings to their slots over time. Absent, they snap. */
2346
+ reflow?: ReflowTransition<unknown> | null;
2347
+ }
2348
+ /**
2349
+ * Whether the nodes `ids` may be dropped into the container `parent`. A move
2350
+ * consults it before reparenting anything: reparent-on-drop passes over a
2351
+ * refused container to the nearest one around it that admits them, and the
2352
+ * layout drop treats a refused layout container as if it were not there.
2353
+ * Absent, every container takes any drop.
2354
+ */
2355
+ type CanDropIntoDep = (parent: string, ids: readonly string[]) => boolean;
2356
+
3126
2357
  /**
3127
2358
  * The deps behind text editing, the clipboard, and Slice.
3128
2359
  */
@@ -3378,20 +2609,6 @@ interface ResizePolicy<TPose> extends GestureLifecycleOptions {
3378
2609
  * resize isn't wanted. */
3379
2610
  expandIds: (ids: string[]) => string[];
3380
2611
  }
3381
- /**
3382
- * Layout-strategy lookup by container id, consumed by `moveAction` to run
3383
- * the drag-time reflow pass. Sourced by `<SceneCanvas>` from the layout each
3384
- * container declares on its scene node. `getLayout` returns null for a
3385
- * container that declares none, so the reflow pass is a no-op then.
3386
- */
3387
- interface LayoutDep {
3388
- getLayout(containerId: string): LayoutStrategy<unknown> | null;
3389
- /** Which container wins when several contain the drop point. Default
3390
- * `'innermost'`. */
3391
- dropTarget?: LayoutDropTargetMode;
3392
- /** Carries displaced siblings to their slots over time. Absent, they snap. */
3393
- reflow?: ReflowTransition<unknown> | null;
3394
- }
3395
2612
 
3396
2613
  /**
3397
2614
  * The names an action may declare in `requires`, and what each resolves to.
@@ -3468,6 +2685,9 @@ declare module '@weasel-js/routing' {
3468
2685
  /** Edit-anchors dep — narrow read/write of one polygon's path. If
3469
2686
  * absent, `editAnchorsAction`'s `start` returns an empty handle (no-op). */
3470
2687
  editAnchors: EditAnchorsDep;
2688
+ /** What changes other nodes along with a whole-node transform, in order;
2689
+ * add one with `useTransformFollower`. Absent: only what it transforms changes. */
2690
+ transformFollowers?: readonly TransformFollower[];
3471
2691
  /** The transforms a path being edited should stay its own image under.
3472
2692
  * Absent: an anchor drag moves only what is dragged. */
3473
2693
  pathSymmetry?: PathSymmetryDep;
@@ -3522,6 +2742,8 @@ declare module '@weasel-js/routing' {
3522
2742
  * Optional: absent (or all-null) → `moveAction` skips reflow.
3523
2743
  */
3524
2744
  layout?: LayoutDep;
2745
+ /** Which containers a move may drop into; see {@link CanDropIntoDep}. */
2746
+ canDropInto?: CanDropIntoDep;
3525
2747
  /**
3526
2748
  * Slice dep — the commit for the Slice action. `<SceneCanvas>` publishes
3527
2749
  * `useSliceDepSource`; a consumer overrides it with `useSliceDep`.
@@ -3578,4 +2800,4 @@ declare module '@weasel-js/routing' {
3578
2800
  }
3579
2801
  }
3580
2802
 
3581
- export { type CreateOutlinesAdapter as $, type AddNodeSpec as A, type LayerGroup as B, type ContentHandlerEntry as C, type Dims as D, type EditAnchorsDep as E, type FitViewToBoundsOptions as F, type GestureLifecycleOptions as G, type HandleLocks as H, type InertiaConfig as I, type SerializedScene as J, type GeometryProjection as K, type LayoutFrame as L, type InsertNodeFactory as M, type Node as N, type InsertPaint as O, type PathEditMark as P, type SvgIngestOptions as Q, type RectPose as R, type Scene as S, type SceneCanvasSnap as T, type Affordance as U, type ViewAnimationOptions as V, type AffordanceRegion as W, type AffordanceBinding as X, type CommonAffordanceScratch as Y, type TextOverflow as Z, _resetPaintKindsForTests as _, type PathEditExtension as a, type PaintKind as a$, type PaintKindEntry as a0, type DerivePoseFn as a1, type DerivePathFn as a2, type DerivedDep as a3, type PathEditTarget as a4, type PathSymmetryDep as a5, type BooleanOpOptions as a6, type BooleansAdapter as a7, type BooleanOp as a8, type PathPaint as a9, type FinishedEditFrame as aA, type FinishedPathEdit as aB, GEOMETRY_BOUND_DATA as aC, type HandleLock as aD, type HitTestView as aE, IDENTITY_POSE_COMPOSITION as aF, type IngestCtx as aG, type IngestionDep as aH, type InsertDep as aI, type InsertEnds as aJ, type InsertExtras as aK, type InsertIntoDep as aL, type InsertLive as aM, type LassoSelectDep as aN, type LayerCommandCache as aO, type LayerDrawFailure as aP, type LayerDrawSpan as aQ, type LayerRecord as aR, type LayerRetainPolicy as aS, type LayoutDep as aT, type LayoutMove as aU, type LeafNode as aV, type Locus as aW, type MinSize as aX, type NodeAtPointDep as aY, type OutlinePathSpec as aZ, PATH_OVERLAY_ROLES as a_, type BooleanOpResult as aa, type BooleanStrokes as ab, type SnapMods as ac, type SourceCandidate as ad, type SnapProbeAt as ae, type SnapCollect as af, type SnapMark as ag, type SnapDep as ah, type SnapOutcome as ai, type AddLayerSpec as aj, type AngleCandidate as ak, type AngleCollect as al, type AnimateToBoundsOptions as am, type AreaSelectDep as an, type Bivariant as ao, type BooleanOpPreview as ap, type BooleanPreviewPiece as aq, type ClipFromPoseFn as ar, type ClipboardDep as as, type ClipboardIngestCtx as at, type ContainerNode as au, type CopiesFromPoseFn as av, type CreateOutlinesResult as aw, type CustomPaintContext as ax, DEFAULT_LAYER_RETAIN as ay, type DecayLoopConfig as az, type SnapSource as b, listPaintKinds as b$, type PaintKindEditorProps as b0, type PaintKindFamily as b1, type PaintKindLoader as b2, type PanBounds as b3, type PathEditDrag as b4, type PathEditDragStart as b5, type PathEditFinishCtx as b6, type PathEditHandleMove as b7, type PathEditMarksCtx as b8, type PathEditOther as b9, type SvgUnpacker as bA, type SystemLayerRecord as bB, type TextEditDep as bC, type TextNodeData as bD, type TransientPath as bE, type UserLayerRecord as bF, VIEW_ANIMATION_KEY as bG, type ViewAnimationApi as bH, type ViewApi as bI, type ViewChannel as bJ, applyBooleanOp as bK, applyCreateOutlines as bL, asNodeId as bM, asPaint as bN, composeWorldPose as bO, composesFrames as bP, createPathOverlay as bQ, createSnapOutcomeStore as bR, createSnapReadoutLayer as bS, depsUnchanged as bT, drawLayers as bU, drawOneLayer as bV, fitViewToBounds as bW, getPaintKind as bX, isLayerPainted as bY, isLayerVisible as bZ, listGradientKinds as b_, type PathEditPart as ba, type PathEditStore as bb, type PathForm as bc, type PathOverlay as bd, type PathOverlayOptions as be, type PathOverlayStyle as bf, type PathRepresentation as bg, type PoseClosure as bh, type PoseHold as bi, type PoseOverride as bj, type PoseWriteOrigin as bk, type PreviewPathsDep as bl, type RemovedNode as bm, type ResizePolicy as bn, SCENE_HISTORY_FORM as bo, STICKY_DEFAULTS as bp, type SceneArrivalHandler as bq, type SerializedLayer as br, type SerializedNode as bs, type SerializedSceneHistory as bt, type SnapBegin as bu, type SnapEdge as bv, type SnapEdges as bw, type SnapMarks as bx, type SnapReadoutDep as by, type SnapReadoutStyle as bz, type SnapGesture as c, minSizeOf as c0, paintKindOf as c1, paintKindRegistry as c2, paintedLayers as c3, paintsLayer as c4, paletteInsertPaint as c5, pathPaintOf as c6, patternFamily as c7, previewBooleanOp as c8, rebaseLocalPose as c9, registerContentHandler as ca, registerPaintKind as cb, registerPaintKindLoader as cc, seedTile as cd, stickyData as ce, stickyNodeFactory as cf, subscribeToSources as cg, switchGradientKind as ch, textBoxOf as ci, useDecayLoop as cj, useViewAnimation as ck, useViewAnimationOn as cl, viewAxes as cm, withoutGeometryBoundData as cn, type SnapConstrain as d, type SnapResizeBox as e, type SnapGeometry as f, type SnapOutcomeStore as g, type SnapSession as h, type SystemLayerSpec as i, type RegisteredOp as j, type SceneRegistry as k, type PoseComposition as l, type RenderLayer as m, type LayerHit as n, type PoseAdapter as o, type ViewportDims as p, type RedrawSource as q, type EditAnchorsParams as r, type SliceDep as s, type StickyStyle as t, type PoseOverrides as u, type PoseRemoval as v, type PoseWrite as w, type ScenePoseReports as x, type AnchorMarkerShape as y, type ChromeState as z };
2803
+ export { type SnapCollect as $, type AnchorMarkerShape as A, type PathEditTarget as B, type ContentHandlerEntry as C, type Dims as D, type EditAnchorsDep as E, type FitViewToBoundsOptions as F, type GestureLifecycleOptions as G, type HandleLocks as H, type InertiaConfig as I, type FinishedEditFrame as J, type PathSymmetryDep as K, type LayerHit as L, type BooleanOpOptions as M, type BooleansAdapter as N, type BooleanOp as O, type PathEditMark as P, type PathPaint as Q, type RenderLayer as R, type SnapSource as S, type TransformFollower as T, type BooleanOpResult as U, type ViewAnimationOptions as V, type BooleanStrokes as W, type SnapMods as X, type SourceCandidate as Y, type SnapProbeAt as Z, _resetPaintKindsForTests as _, type PathEditExtension as a, type SnapEdges as a$, type SnapMark as a0, type SnapDep as a1, type SnapOutcome as a2, type SnapReadoutStyle as a3, type AngleCandidate as a4, type AngleCollect as a5, type AnimateToBoundsOptions as a6, type AreaSelectDep as a7, type BooleanOpPreview as a8, type BooleanPreviewPiece as a9, type NodeAtPointDep as aA, type OutlinePathSpec as aB, PATH_OVERLAY_ROLES as aC, type PaintKind as aD, type PaintKindEditorProps as aE, type PaintKindFamily as aF, type PaintKindLoader as aG, type PanBounds as aH, type PathEditDrag as aI, type PathEditDragStart as aJ, type PathEditFinishCtx as aK, type PathEditHandleMove as aL, type PathEditMarksCtx as aM, type PathEditOther as aN, type PathEditPart as aO, type PathEditStore as aP, type PathForm as aQ, type PathOverlay as aR, type PathOverlayOptions as aS, type PathOverlayStyle as aT, type PathRepresentation as aU, type PathTransformFinishCtx as aV, type PreviewPathsDep as aW, type ResizePolicy as aX, STICKY_DEFAULTS as aY, type SnapBegin as aZ, type SnapEdge as a_, type CanDropIntoDep as aa, type ClipboardDep as ab, type ClipboardIngestCtx as ac, type CreateOutlinesResult as ad, type CustomPaintContext as ae, DEFAULT_LAYER_RETAIN as af, type DecayLoopConfig as ag, type FinishedPathEdit as ah, GEOMETRY_BOUND_DATA as ai, type HandleLock as aj, type HitTestView as ak, type IngestCtx as al, type IngestionDep as am, type InsertDep as an, type InsertEnds as ao, type InsertExtras as ap, type InsertIntoDep as aq, type InsertLive as ar, type LassoSelectDep as as, type LayerCommandCache as at, type LayerDrawFailure as au, type LayerDrawSpan as av, type LayerRetainPolicy as aw, type LayoutDep as ax, type Locus as ay, type MinSize as az, type SnapGesture as b, type SnapMarks as b0, type SnapReadoutDep as b1, type SvgUnpacker as b2, type TextEditDep as b3, type TextNodeData as b4, type TransformPreviewNode as b5, type TransientPath as b6, VIEW_ANIMATION_KEY as b7, type ViewAnimationApi as b8, type ViewApi as b9, registerPaintKindLoader as bA, seedTile as bB, stickyData as bC, stickyNodeFactory as bD, subscribeToSources as bE, switchGradientKind as bF, textBoxOf as bG, useDecayLoop as bH, useViewAnimation as bI, useViewAnimationOn as bJ, viewAxes as bK, withoutGeometryBoundData as bL, type ViewChannel as ba, applyBooleanOp as bb, applyCreateOutlines as bc, asPaint as bd, createPathOverlay as be, createSnapOutcomeStore as bf, depsUnchanged as bg, drawLayers as bh, drawOneLayer as bi, fitViewToBounds as bj, getPaintKind as bk, isLayerPainted as bl, isLayerVisible as bm, listGradientKinds as bn, listPaintKinds as bo, minSizeOf as bp, paintKindOf as bq, paintKindRegistry as br, paintedLayers as bs, paintsLayer as bt, paletteInsertPaint as bu, pathPaintOf as bv, patternFamily as bw, previewBooleanOp as bx, registerContentHandler as by, registerPaintKind as bz, type SnapConstrain as c, type SnapResizeBox as d, type SnapGeometry as e, type SnapOutcomeStore as f, type SnapSession as g, type ViewportDims as h, type RedrawSource as i, type EditAnchorsParams as j, type SliceDep as k, type StickyStyle as l, type ChromeState as m, type LayerGroup as n, type GeometryProjection as o, type InsertNodeFactory as p, type InsertPaint as q, type SvgIngestOptions as r, type SceneCanvasSnap as s, type Affordance as t, type AffordanceRegion as u, type AffordanceBinding as v, type CommonAffordanceScratch as w, type TextOverflow as x, type CreateOutlinesAdapter as y, type PaintKindEntry as z };