@weasel-js/core 1.13.0-rc.0 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (745) hide show
  1. package/CHANGELOG.md +408 -0
  2. package/README.md +8 -12
  3. package/dist/affordances/hitAffordanceRegions.js +1 -1
  4. package/dist/affordances/hitAffordanceRegions.js.map +1 -1
  5. package/dist/affordances/pathAnchors.js.map +1 -1
  6. package/dist/animation/clipTargets.js +1 -1
  7. package/dist/animation/clipTargets.js.map +1 -1
  8. package/dist/animation/poseTarget.js +5 -32
  9. package/dist/animation/poseTarget.js.map +1 -1
  10. package/dist/{autoPoseDescriptor-CZ1eXbzY.d.ts → autoPoseDescriptor-C25QVb0W.d.ts} +1 -1
  11. package/dist/barrel/canvas.js +8 -8
  12. package/dist/barrel/chrome.js +9 -9
  13. package/dist/barrel/input.js +1 -1
  14. package/dist/barrel/interactions.js +3 -3
  15. package/dist/barrel/paint.js +2 -2
  16. package/dist/barrel/paths.js +19 -17
  17. package/dist/barrel/renderer.js +11 -7
  18. package/dist/barrel/routing.js +4 -1
  19. package/dist/barrel/scene.js +16 -12
  20. package/dist/barrel/text.js +5 -5
  21. package/dist/barrel/viewport.js +8 -8
  22. package/dist/canvas/Canvas.js +2 -2
  23. package/dist/canvas/Canvas.js.map +1 -1
  24. package/dist/canvas/CanvasView.js +20 -14
  25. package/dist/canvas/CanvasView.js.map +1 -1
  26. package/dist/canvas/GestureReason.js +64 -0
  27. package/dist/canvas/GestureReason.js.map +1 -0
  28. package/dist/canvas/GestureReason.module.js +7 -0
  29. package/dist/canvas/GestureReason.module.js.map +1 -0
  30. package/dist/canvas/LeanSceneCanvas.js +3 -1
  31. package/dist/canvas/LeanSceneCanvas.js.map +1 -1
  32. package/dist/canvas/NodeShape.js +2 -0
  33. package/dist/canvas/NodeShape.js.map +1 -1
  34. package/dist/canvas/PickHud.js +7 -3
  35. package/dist/canvas/PickHud.js.map +1 -1
  36. package/dist/canvas/SceneCanvas/CanvasKitProviders.js +1 -1
  37. package/dist/canvas/SceneCanvas/CanvasKitProviders.js.map +1 -1
  38. package/dist/canvas/SceneCanvas/DevHuds.js +2 -2
  39. package/dist/canvas/SceneCanvas/DevHuds.js.map +1 -1
  40. package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js +4 -2
  41. package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js.map +1 -1
  42. package/dist/canvas/SceneCanvas/SceneCanvasInput.js +3 -1
  43. package/dist/canvas/SceneCanvas/SceneCanvasInput.js.map +1 -1
  44. package/dist/canvas/SceneCanvas/brushOverlay.js.map +1 -1
  45. package/dist/canvas/SceneCanvas/builtinToolSets.js +17 -9
  46. package/dist/canvas/SceneCanvas/builtinToolSets.js.map +1 -1
  47. package/dist/canvas/SceneCanvas/canvasPassThrough.js +2 -1
  48. package/dist/canvas/SceneCanvas/canvasPassThrough.js.map +1 -1
  49. package/dist/canvas/SceneCanvas/defaultNodeProperties.js +75 -19
  50. package/dist/canvas/SceneCanvas/defaultNodeProperties.js.map +1 -1
  51. package/dist/canvas/SceneCanvas/defaultNodeRouting.js +7 -1
  52. package/dist/canvas/SceneCanvas/defaultNodeRouting.js.map +1 -1
  53. package/dist/canvas/SceneCanvas/defaultTextEditor.js +108 -0
  54. package/dist/canvas/SceneCanvas/defaultTextEditor.js.map +1 -0
  55. package/dist/canvas/SceneCanvas/describePresets.js +47 -0
  56. package/dist/canvas/SceneCanvas/describePresets.js.map +1 -0
  57. package/dist/canvas/SceneCanvas/features.js +57 -16
  58. package/dist/canvas/SceneCanvas/features.js.map +1 -1
  59. package/dist/canvas/SceneCanvas/mergeLayers.js +10 -1
  60. package/dist/canvas/SceneCanvas/mergeLayers.js.map +1 -1
  61. package/dist/canvas/SceneCanvas/namedPresets.js +52 -24
  62. package/dist/canvas/SceneCanvas/namedPresets.js.map +1 -1
  63. package/dist/canvas/SceneCanvas/presets/arrange.js +35 -10
  64. package/dist/canvas/SceneCanvas/presets/arrange.js.map +1 -1
  65. package/dist/canvas/SceneCanvas/presets/baseline.js +9 -0
  66. package/dist/canvas/SceneCanvas/presets/baseline.js.map +1 -0
  67. package/dist/canvas/SceneCanvas/presets/chrome.js.map +1 -1
  68. package/dist/canvas/SceneCanvas/presets/composites.js +43 -0
  69. package/dist/canvas/SceneCanvas/presets/composites.js.map +1 -0
  70. package/dist/canvas/SceneCanvas/presets/edit.js +79 -26
  71. package/dist/canvas/SceneCanvas/presets/edit.js.map +1 -1
  72. package/dist/canvas/SceneCanvas/presets/ingest.js +1 -0
  73. package/dist/canvas/SceneCanvas/presets/ingest.js.map +1 -1
  74. package/dist/canvas/SceneCanvas/presets/paths.js +58 -16
  75. package/dist/canvas/SceneCanvas/presets/paths.js.map +1 -1
  76. package/dist/canvas/SceneCanvas/presets/select.js +4 -2
  77. package/dist/canvas/SceneCanvas/presets/select.js.map +1 -1
  78. package/dist/canvas/SceneCanvas/presets/tools.js +24 -0
  79. package/dist/canvas/SceneCanvas/presets/tools.js.map +1 -0
  80. package/dist/canvas/SceneCanvas/presets/transform.js +4 -0
  81. package/dist/canvas/SceneCanvas/presets/transform.js.map +1 -1
  82. package/dist/canvas/SceneCanvas/presets/view.js +3 -1
  83. package/dist/canvas/SceneCanvas/presets/view.js.map +1 -1
  84. package/dist/canvas/SceneCanvas/props.js.map +1 -1
  85. package/dist/canvas/SceneCanvas/shapeGeneratorProperties.js +1 -1
  86. package/dist/canvas/SceneCanvas/shapeGeneratorProperties.js.map +1 -1
  87. package/dist/canvas/SceneCanvas/toolRegistry.js +5 -4
  88. package/dist/canvas/SceneCanvas/toolRegistry.js.map +1 -1
  89. package/dist/canvas/SceneCanvas/useCanvasTools.js +26 -10
  90. package/dist/canvas/SceneCanvas/useCanvasTools.js.map +1 -1
  91. package/dist/canvas/SceneCanvas/useContributionRoles.js +17 -2
  92. package/dist/canvas/SceneCanvas/useContributionRoles.js.map +1 -1
  93. package/dist/canvas/SceneCanvas/useDepartureGhostLayer.js +5 -4
  94. package/dist/canvas/SceneCanvas/useDepartureGhostLayer.js.map +1 -1
  95. package/dist/canvas/SceneCanvas/useDispatcherOverlayLayer.js +1 -1
  96. package/dist/canvas/SceneCanvas/useNodeAtPoint.js.map +1 -1
  97. package/dist/canvas/SceneCanvas/useSceneCanvasLayers.js +9 -8
  98. package/dist/canvas/SceneCanvas/useSceneCanvasLayers.js.map +1 -1
  99. package/dist/canvas/SceneCanvas/useSceneCanvasPathEdit.js +2 -2
  100. package/dist/canvas/SceneCanvas/useSceneCanvasPathEdit.js.map +1 -1
  101. package/dist/canvas/SceneCanvas/useSceneCanvasTools.js +4 -1
  102. package/dist/canvas/SceneCanvas/useSceneCanvasTools.js.map +1 -1
  103. package/dist/canvas/SceneCanvas/useSceneChrome.js +7 -4
  104. package/dist/canvas/SceneCanvas/useSceneChrome.js.map +1 -1
  105. package/dist/canvas/SceneCanvas/useSceneGestureDispatcher.js +9 -9
  106. package/dist/canvas/SceneCanvas/useSceneGestureDispatcher.js.map +1 -1
  107. package/dist/canvas/SceneCanvas/useScenePicking.js +4 -7
  108. package/dist/canvas/SceneCanvas/useScenePicking.js.map +1 -1
  109. package/dist/canvas/SceneCanvas/useSceneRedrawSources.js +2 -1
  110. package/dist/canvas/SceneCanvas/useSceneRedrawSources.js.map +1 -1
  111. package/dist/canvas/SceneCanvas/useSceneSelectTool.js +6 -6
  112. package/dist/canvas/SceneCanvas/useSceneSelectTool.js.map +1 -1
  113. package/dist/canvas/SceneCanvas/useSceneStandardActions.js +2 -2
  114. package/dist/canvas/SceneCanvas/useSceneStandardActions.js.map +1 -1
  115. package/dist/canvas/SceneCanvas/useSelectionOverlayLayer.js +1 -1
  116. package/dist/canvas/SceneCanvas/useSelectionOverlayLayer.js.map +1 -1
  117. package/dist/canvas/SceneCanvas/useSurfaceViewInputs.js.map +1 -1
  118. package/dist/canvas/SceneCanvas/useToolKeybindings.js +2 -2
  119. package/dist/canvas/SceneCanvas/useToolKeybindings.js.map +1 -1
  120. package/dist/canvas/SceneCanvas/useViewportActions.js +5 -2
  121. package/dist/canvas/SceneCanvas/useViewportActions.js.map +1 -1
  122. package/dist/canvas/SceneCanvas/worldPointAt.js.map +1 -1
  123. package/dist/canvas/SceneCanvas.js +22 -11
  124. package/dist/canvas/SceneCanvas.js.map +1 -1
  125. package/dist/canvas/SceneViewCanvas.js +1 -0
  126. package/dist/canvas/SceneViewCanvas.js.map +1 -1
  127. package/dist/canvas/ViewMarker.js.map +1 -1
  128. package/dist/canvas/accentColor.js +14 -1
  129. package/dist/canvas/accentColor.js.map +1 -1
  130. package/dist/canvas/affordanceAt.js +2 -2
  131. package/dist/canvas/affordanceAt.js.map +1 -1
  132. package/dist/canvas/buildSceneLayer.js +1 -1
  133. package/dist/canvas/buildSceneLayer.js.map +1 -1
  134. package/dist/canvas/buildSceneTree.js +5 -3
  135. package/dist/canvas/buildSceneTree.js.map +1 -1
  136. package/dist/canvas/canvasRenderer.js +6 -2
  137. package/dist/canvas/canvasRenderer.js.map +1 -1
  138. package/dist/canvas/deps/editAnchors.js +4 -4
  139. package/dist/canvas/deps/editAnchors.js.map +1 -1
  140. package/dist/canvas/deps/enteredGroup.js +14 -5
  141. package/dist/canvas/deps/enteredGroup.js.map +1 -1
  142. package/dist/canvas/deps/ingestion.js +5 -1
  143. package/dist/canvas/deps/ingestion.js.map +1 -1
  144. package/dist/canvas/deps/insert.js.map +1 -1
  145. package/dist/canvas/deps/insertSite.js +5 -3
  146. package/dist/canvas/deps/insertSite.js.map +1 -1
  147. package/dist/canvas/deps/nodeAtPoint.js +1 -12
  148. package/dist/canvas/deps/nodeAtPoint.js.map +1 -1
  149. package/dist/canvas/deps/pathEditCommits.js +3 -3
  150. package/dist/canvas/deps/pathEditCommits.js.map +1 -1
  151. package/dist/canvas/deps/slice.js +16 -2
  152. package/dist/canvas/deps/slice.js.map +1 -1
  153. package/dist/canvas/deps/snap.js +5 -5
  154. package/dist/canvas/deps/snap.js.map +1 -1
  155. package/dist/canvas/deps/textEdit.js +5 -6
  156. package/dist/canvas/deps/textEdit.js.map +1 -1
  157. package/dist/canvas/derivedPath.js +8 -3
  158. package/dist/canvas/derivedPath.js.map +1 -1
  159. package/dist/canvas/getNodeAtPoint.js +2 -2
  160. package/dist/canvas/getNodeAtPoint.js.map +1 -1
  161. package/dist/canvas/insertPreviewExtent.js.map +1 -1
  162. package/dist/canvas/layerSlots.js.map +1 -1
  163. package/dist/canvas/nodeShapes/measurePainter.js +1 -1
  164. package/dist/canvas/nodeShapes/measurePainter.js.map +1 -1
  165. package/dist/canvas/nodeShapes/strokedBounds.js +5 -3
  166. package/dist/canvas/nodeShapes/strokedBounds.js.map +1 -1
  167. package/dist/canvas/overlayRoleStrokes.js +6 -0
  168. package/dist/canvas/overlayRoleStrokes.js.map +1 -1
  169. package/dist/canvas/pickIndex/scenePickIndex.js +10 -12
  170. package/dist/canvas/pickIndex/scenePickIndex.js.map +1 -1
  171. package/dist/canvas/sceneAdapter.js +10 -19
  172. package/dist/canvas/sceneAdapter.js.map +1 -1
  173. package/dist/canvas/sceneClipboard.js +17 -4
  174. package/dist/canvas/sceneClipboard.js.map +1 -1
  175. package/dist/canvas/sceneViewRender.js +7 -5
  176. package/dist/canvas/sceneViewRender.js.map +1 -1
  177. package/dist/canvas/surfaceContribution.js.map +1 -1
  178. package/dist/canvas/useCanvasPaint.js +12 -4
  179. package/dist/canvas/useCanvasPaint.js.map +1 -1
  180. package/dist/canvas/useHitObserver.js +1 -1
  181. package/dist/canvas/useHitObserver.js.map +1 -1
  182. package/dist/canvas/useViewAim.js +1 -1
  183. package/dist/canvas/useViewAim.js.map +1 -1
  184. package/dist/canvas/useViewHelpers.js +8 -5
  185. package/dist/canvas/useViewHelpers.js.map +1 -1
  186. package/dist/canvas/useViewNesting.js +39 -12
  187. package/dist/canvas/useViewNesting.js.map +1 -1
  188. package/dist/canvas/viewInputs.js.map +1 -1
  189. package/dist/canvas/viewMarkers.js +2 -2
  190. package/dist/canvas/viewMarkers.js.map +1 -1
  191. package/dist/canvas/viewRegistry.js +2 -2
  192. package/dist/canvas/viewRegistry.js.map +1 -1
  193. package/dist/canvas/viewSnap.js +67 -0
  194. package/dist/canvas/viewSnap.js.map +1 -0
  195. package/dist/clipboard.d.ts +6 -12
  196. package/dist/{clone-qb2e1F5p.d.ts → clone-Bz4iqGfE.d.ts} +10 -5
  197. package/dist/clone.d.ts +5 -5
  198. package/dist/core/geometry/booleanOfPaths.js +23 -0
  199. package/dist/core/geometry/booleanOfPaths.js.map +1 -0
  200. package/dist/core/geometry/pathPoseDescriptor.js +12 -9
  201. package/dist/core/geometry/pathPoseDescriptor.js.map +1 -1
  202. package/dist/core/geometry/poseDescriptor.js +12 -3
  203. package/dist/core/geometry/poseDescriptor.js.map +1 -1
  204. package/dist/core/geometry/targetFrame.js +2 -13
  205. package/dist/core/geometry/targetFrame.js.map +1 -1
  206. package/dist/core/layers/render.js +2 -1
  207. package/dist/core/layers/render.js.map +1 -1
  208. package/dist/core/layers/retain.js +5 -3
  209. package/dist/core/layers/retain.js.map +1 -1
  210. package/dist/core/ops/setPath.js +3 -0
  211. package/dist/core/ops/setPath.js.map +1 -1
  212. package/dist/core/paint/meshKindLazy.js.map +1 -1
  213. package/dist/core/paint/paintKindEntry.js.map +1 -1
  214. package/dist/core/paint/paintKinds.js +8 -1
  215. package/dist/core/paint/paintKinds.js.map +1 -1
  216. package/dist/core/scene/NodeProperties.js.map +1 -1
  217. package/dist/core/scene/NodeRouting.js.map +1 -1
  218. package/dist/core/scene/booleanGroup.js +33 -0
  219. package/dist/core/scene/booleanGroup.js.map +1 -0
  220. package/dist/core/scene/booleanOfChildren.js +53 -0
  221. package/dist/core/scene/booleanOfChildren.js.map +1 -0
  222. package/dist/core/scene/carryDescendants.js +18 -6
  223. package/dist/core/scene/carryDescendants.js.map +1 -1
  224. package/dist/core/scene/composeFrame.js +42 -5
  225. package/dist/core/scene/composeFrame.js.map +1 -1
  226. package/dist/core/scene/composePose.js +35 -16
  227. package/dist/core/scene/composePose.js.map +1 -1
  228. package/dist/core/scene/depMemo.js +36 -18
  229. package/dist/core/scene/depMemo.js.map +1 -1
  230. package/dist/core/scene/derivedParts.js +2 -23
  231. package/dist/core/scene/derivedParts.js.map +1 -1
  232. package/dist/core/scene/effectivePose.js +10 -0
  233. package/dist/core/scene/effectivePose.js.map +1 -1
  234. package/dist/core/scene/historyForm.js +5 -4
  235. package/dist/core/scene/historyForm.js.map +1 -1
  236. package/dist/core/scene/kitOps.js +5 -71
  237. package/dist/core/scene/kitOps.js.map +1 -1
  238. package/dist/core/scene/kitRegistry.js +5 -0
  239. package/dist/core/scene/kitRegistry.js.map +1 -1
  240. package/dist/core/scene/layerOps.js +82 -0
  241. package/dist/core/scene/layerOps.js.map +1 -0
  242. package/dist/core/scene/layoutPass.js +14 -12
  243. package/dist/core/scene/layoutPass.js.map +1 -1
  244. package/dist/core/scene/lockGuard.js +9 -3
  245. package/dist/core/scene/lockGuard.js.map +1 -1
  246. package/dist/core/scene/nestedHit.js +5 -5
  247. package/dist/core/scene/nestedHit.js.map +1 -1
  248. package/dist/core/scene/nodeFlags.js +8 -2
  249. package/dist/core/scene/nodeFlags.js.map +1 -1
  250. package/dist/core/scene/nodeGates.js +31 -2
  251. package/dist/core/scene/nodeGates.js.map +1 -1
  252. package/dist/core/scene/pathEffects/effects.js +22 -3
  253. package/dist/core/scene/pathEffects/effects.js.map +1 -1
  254. package/dist/core/scene/pathEffects/textAlong.js +16 -3
  255. package/dist/core/scene/pathEffects/textAlong.js.map +1 -1
  256. package/dist/core/scene/pathEffects/textAlongBands.js +65 -0
  257. package/dist/core/scene/pathEffects/textAlongBands.js.map +1 -0
  258. package/dist/core/scene/reconcileSpecs.js +1 -1
  259. package/dist/core/scene/reconcileSpecs.js.map +1 -1
  260. package/dist/core/scene/scene.js +11 -5
  261. package/dist/core/scene/scene.js.map +1 -1
  262. package/dist/core/scene/sceneEdits.js +5 -2
  263. package/dist/core/scene/sceneEdits.js.map +1 -1
  264. package/dist/core/scene/scenePoseAdapter.js +10 -1
  265. package/dist/core/scene/scenePoseAdapter.js.map +1 -1
  266. package/dist/core/scene/scrollOffsets.js +93 -0
  267. package/dist/core/scene/scrollOffsets.js.map +1 -0
  268. package/dist/core/scene/serialization.js +15 -5
  269. package/dist/core/scene/serialization.js.map +1 -1
  270. package/dist/core/scene/statedFields.js +2 -1
  271. package/dist/core/scene/statedFields.js.map +1 -1
  272. package/dist/core/scene/strategyView.js +35 -0
  273. package/dist/core/scene/strategyView.js.map +1 -0
  274. package/dist/core/scene/types.js.map +1 -1
  275. package/dist/core/scene/useScene.js +2 -0
  276. package/dist/core/scene/useScene.js.map +1 -1
  277. package/dist/core/scene/worldSave.js +87 -0
  278. package/dist/core/scene/worldSave.js.map +1 -0
  279. package/dist/core/selection/selectionTarget.js +1 -1
  280. package/dist/core/selection/selectionTarget.js.map +1 -1
  281. package/dist/{cornerHandles-CNCb7aTY.d.ts → cornerHandles-DpmQM_z5.d.ts} +1 -1
  282. package/dist/{depSchema-B1RS-IJx.d.ts → depSchema-C3BwxitB.d.ts} +130 -104
  283. package/dist/devtools-protocol.d.ts +2 -2
  284. package/dist/devtools.d.ts +2 -2
  285. package/dist/{features → domains}/chrome-caps/buildChromeCtx.js +1 -1
  286. package/dist/domains/chrome-caps/buildChromeCtx.js.map +1 -0
  287. package/dist/{features → domains}/chrome-caps/conditions.js +1 -1
  288. package/dist/domains/chrome-caps/conditions.js.map +1 -0
  289. package/dist/{features → domains}/chrome-caps/defaults.js +1 -1
  290. package/dist/domains/chrome-caps/defaults.js.map +1 -0
  291. package/dist/{features → domains}/chrome-caps/resolve.js +1 -1
  292. package/dist/domains/chrome-caps/resolve.js.map +1 -0
  293. package/dist/{features → domains}/chrome-caps/useChromeCaps.js +1 -1
  294. package/dist/domains/chrome-caps/useChromeCaps.js.map +1 -0
  295. package/dist/{features → domains}/chrome-caps/useHoverTracking.js +1 -1
  296. package/dist/domains/chrome-caps/useHoverTracking.js.map +1 -0
  297. package/dist/{features → domains}/ingestion/contentHandlers.js +20 -3
  298. package/dist/domains/ingestion/contentHandlers.js.map +1 -0
  299. package/dist/domains/ingestion/ghost.js +56 -0
  300. package/dist/domains/ingestion/ghost.js.map +1 -0
  301. package/dist/{features → domains}/ingestion/imageHandler.js +1 -1
  302. package/dist/domains/ingestion/imageHandler.js.map +1 -0
  303. package/dist/domains/ingestion/kitHandlers.js +22 -0
  304. package/dist/domains/ingestion/kitHandlers.js.map +1 -0
  305. package/dist/{features → domains}/ingestion/openFilePicker.js +1 -1
  306. package/dist/domains/ingestion/openFilePicker.js.map +1 -0
  307. package/dist/{features → domains}/ingestion/placement.js +1 -1
  308. package/dist/domains/ingestion/placement.js.map +1 -0
  309. package/dist/{features → domains}/ingestion/svgHandler.js +1 -1
  310. package/dist/domains/ingestion/svgHandler.js.map +1 -0
  311. package/dist/{features → domains}/ingestion/textHandler.js +9 -7
  312. package/dist/domains/ingestion/textHandler.js.map +1 -0
  313. package/dist/{features → domains}/ingestion/useCanvasIngestion.js +13 -15
  314. package/dist/domains/ingestion/useCanvasIngestion.js.map +1 -0
  315. package/dist/{features → domains}/ingestion/weaselJsonHandler.js +1 -1
  316. package/dist/domains/ingestion/weaselJsonHandler.js.map +1 -0
  317. package/dist/{features → domains}/longPress/longPressFeedback.js +1 -1
  318. package/dist/domains/longPress/longPressFeedback.js.map +1 -0
  319. package/dist/{features → domains}/measure/actionIds.js +1 -1
  320. package/dist/domains/measure/actionIds.js.map +1 -0
  321. package/dist/{features → domains}/measure/measureCommands.js +1 -1
  322. package/dist/domains/measure/measureCommands.js.map +1 -0
  323. package/dist/{features → domains}/measure/measureContribution.js +1 -1
  324. package/dist/domains/measure/measureContribution.js.map +1 -0
  325. package/dist/{features → domains}/measure/measureEdits.js +1 -1
  326. package/dist/domains/measure/measureEdits.js.map +1 -0
  327. package/dist/{features → domains}/measure/measureGestures.js +4 -7
  328. package/dist/domains/measure/measureGestures.js.map +1 -0
  329. package/dist/{features → domains}/measure/measureHit.js +1 -1
  330. package/dist/domains/measure/measureHit.js.map +1 -0
  331. package/dist/{features → domains}/measure/measureLayer.js +1 -1
  332. package/dist/domains/measure/measureLayer.js.map +1 -0
  333. package/dist/{features → domains}/measure/measurement.js +1 -1
  334. package/dist/domains/measure/measurement.js.map +1 -0
  335. package/dist/{features → domains}/measure/measurements.js +2 -2
  336. package/dist/domains/measure/measurements.js.map +1 -0
  337. package/dist/{features → domains}/modes/modeLayers.js +1 -1
  338. package/dist/domains/modes/modeLayers.js.map +1 -0
  339. package/dist/{features → domains}/modes/modeTriggers.js +3 -6
  340. package/dist/domains/modes/modeTriggers.js.map +1 -0
  341. package/dist/{features → domains}/pathEffects/effectSources.js +1 -1
  342. package/dist/domains/pathEffects/effectSources.js.map +1 -0
  343. package/dist/{features → domains}/pathEffects/index.js +1 -1
  344. package/dist/domains/pathEffects/index.js.map +1 -0
  345. package/dist/{features → domains}/pathEffects/readSource.js +1 -1
  346. package/dist/domains/pathEffects/readSource.js.map +1 -0
  347. package/dist/{features → domains}/pathEffects/textItems.js +11 -2
  348. package/dist/domains/pathEffects/textItems.js.map +1 -0
  349. package/dist/{features → domains}/pathEffects/useEffectSourcesLayer.js +1 -1
  350. package/dist/domains/pathEffects/useEffectSourcesLayer.js.map +1 -0
  351. package/dist/{features → domains}/paths/anchorData.js +1 -1
  352. package/dist/domains/paths/anchorData.js.map +1 -0
  353. package/dist/{features → domains}/paths/anchorMarkers.js +9 -7
  354. package/dist/domains/paths/anchorMarkers.js.map +1 -0
  355. package/dist/{features → domains}/paths/editablePath.js +1 -1
  356. package/dist/domains/paths/editablePath.js.map +1 -0
  357. package/dist/{features → domains}/paths/index.js +3 -3
  358. package/dist/{features → domains}/paths/originProjection.js +1 -1
  359. package/dist/domains/paths/originProjection.js.map +1 -0
  360. package/dist/{features → domains}/paths/pathEditExtension.js +1 -1
  361. package/dist/domains/paths/pathEditExtension.js.map +1 -0
  362. package/dist/{features → domains}/paths/pathEditState.js +1 -1
  363. package/dist/domains/paths/pathEditState.js.map +1 -0
  364. package/dist/{features → domains}/paths/pathEditingOverlayLayer.js +1 -1
  365. package/dist/domains/paths/pathEditingOverlayLayer.js.map +1 -0
  366. package/dist/{features → domains}/paths/pathLayer.js +1 -1
  367. package/dist/domains/paths/pathLayer.js.map +1 -0
  368. package/dist/{features → domains}/paths/pathRepresentation.js +1 -1
  369. package/dist/domains/paths/pathRepresentation.js.map +1 -0
  370. package/dist/{features → domains}/paths/pathSnap/glyphs.js +1 -1
  371. package/dist/domains/paths/pathSnap/glyphs.js.map +1 -0
  372. package/dist/{features → domains}/paths/pathSnap/pathSnapSource.js +1 -1
  373. package/dist/domains/paths/pathSnap/pathSnapSource.js.map +1 -0
  374. package/dist/{features → domains}/paths/pathSnap/sceneIndex.js +1 -1
  375. package/dist/domains/paths/pathSnap/sceneIndex.js.map +1 -0
  376. package/dist/{features → domains}/paths/pathSnap/snapGeometry.js +3 -2
  377. package/dist/domains/paths/pathSnap/snapGeometry.js.map +1 -0
  378. package/dist/{features → domains}/paths/penPreviewLayer.js +1 -1
  379. package/dist/domains/paths/penPreviewLayer.js.map +1 -0
  380. package/dist/{features → domains}/paths/shapeGenerator.js +6 -4
  381. package/dist/domains/paths/shapeGenerator.js.map +1 -0
  382. package/dist/{features → domains}/paths/strokeOutline.js +1 -1
  383. package/dist/domains/paths/strokeOutline.js.map +1 -0
  384. package/dist/{features → domains}/paths/useAnchorFields.js +1 -1
  385. package/dist/domains/paths/useAnchorFields.js.map +1 -0
  386. package/dist/{features → domains}/paths/usePathEdit.js +1 -1
  387. package/dist/domains/paths/usePathEdit.js.map +1 -0
  388. package/dist/{features → domains}/poseRun/usePoseRun.js +1 -1
  389. package/dist/domains/poseRun/usePoseRun.js.map +1 -0
  390. package/dist/{features → domains}/selection/enteredGroupFrame.js +49 -10
  391. package/dist/domains/selection/enteredGroupFrame.js.map +1 -0
  392. package/dist/{features → domains}/selection/enteredGroupScope.js +1 -1
  393. package/dist/domains/selection/enteredGroupScope.js.map +1 -0
  394. package/dist/domains/selection/enteredOperands.js +29 -0
  395. package/dist/domains/selection/enteredOperands.js.map +1 -0
  396. package/dist/{features → domains}/selection/handleCommands.js +1 -1
  397. package/dist/domains/selection/handleCommands.js.map +1 -0
  398. package/dist/{features → domains}/selection/overlay.js +1 -1
  399. package/dist/domains/selection/overlay.js.map +1 -0
  400. package/dist/{features → domains}/selection/selectionPose.js +1 -1
  401. package/dist/domains/selection/selectionPose.js.map +1 -0
  402. package/dist/{features → domains}/snap/angle2d.js +1 -1
  403. package/dist/domains/snap/angle2d.js.map +1 -0
  404. package/dist/{features → domains}/snap/debugCandidates.js +1 -1
  405. package/dist/domains/snap/debugCandidates.js.map +1 -0
  406. package/dist/{features → domains}/snap/gather.js +1 -1
  407. package/dist/domains/snap/gather.js.map +1 -0
  408. package/dist/{features → domains}/snap/inputSubspace.js +1 -1
  409. package/dist/domains/snap/inputSubspace.js.map +1 -0
  410. package/dist/{features → domains}/snap/lazySession.js +1 -1
  411. package/dist/domains/snap/lazySession.js.map +1 -0
  412. package/dist/{features → domains}/snap/marks.js +1 -1
  413. package/dist/domains/snap/marks.js.map +1 -0
  414. package/dist/{features → domains}/snap/outcomeStore.js +1 -1
  415. package/dist/domains/snap/outcomeStore.js.map +1 -0
  416. package/dist/{features → domains}/snap/pointSnap.js +1 -1
  417. package/dist/domains/snap/pointSnap.js.map +1 -0
  418. package/dist/{features → domains}/snap/probes2d.js +1 -1
  419. package/dist/domains/snap/probes2d.js.map +1 -0
  420. package/dist/{features → domains}/snap/readoutDraw.js +1 -1
  421. package/dist/domains/snap/readoutDraw.js.map +1 -0
  422. package/dist/{features → domains}/snap/readoutLayer.js +1 -1
  423. package/dist/domains/snap/readoutLayer.js.map +1 -0
  424. package/dist/{features → domains}/snap/registry.js +1 -1
  425. package/dist/domains/snap/registry.js.map +1 -0
  426. package/dist/{features → domains}/snap/resizeBox.js +1 -1
  427. package/dist/domains/snap/resizeBox.js.map +1 -0
  428. package/dist/{features → domains}/snap/roles.js +1 -1
  429. package/dist/domains/snap/roles.js.map +1 -0
  430. package/dist/{features → domains}/snap/rotationSource.js +1 -1
  431. package/dist/domains/snap/rotationSource.js.map +1 -0
  432. package/dist/{features → domains}/snap/sceneReads.js +24 -3
  433. package/dist/domains/snap/sceneReads.js.map +1 -0
  434. package/dist/{features → domains}/snap/sceneSession2d.js +3 -2
  435. package/dist/domains/snap/sceneSession2d.js.map +1 -0
  436. package/dist/{features → domains}/snap/screen.js +1 -1
  437. package/dist/domains/snap/screen.js.map +1 -0
  438. package/dist/{features → domains}/snap/session2d.js +3 -2
  439. package/dist/domains/snap/session2d.js.map +1 -0
  440. package/dist/{features → domains}/snap/spanSnap.js +1 -1
  441. package/dist/domains/snap/spanSnap.js.map +1 -0
  442. package/dist/{features → domains}/snap/stepAngles.js +1 -1
  443. package/dist/domains/snap/stepAngles.js.map +1 -0
  444. package/dist/{features → domains}/text/editingDrawOne.js +4 -4
  445. package/dist/domains/text/editingDrawOne.js.map +1 -0
  446. package/dist/domains/text/hostTextEditors.js +24 -0
  447. package/dist/domains/text/hostTextEditors.js.map +1 -0
  448. package/dist/{features → domains}/text/index.js +1 -1
  449. package/dist/{features → domains}/text/sceneTextDrafts.js +1 -1
  450. package/dist/domains/text/sceneTextDrafts.js.map +1 -0
  451. package/dist/{features → domains}/text/textHitAt.js +18 -2
  452. package/dist/domains/text/textHitAt.js.map +1 -0
  453. package/dist/{features → domains}/text/textLayer.js +1 -1
  454. package/dist/domains/text/textLayer.js.map +1 -0
  455. package/dist/{features → domains}/text/useSceneTextEdit.js +11 -3
  456. package/dist/domains/text/useSceneTextEdit.js.map +1 -0
  457. package/dist/{features → domains}/viewports/aim.js +1 -1
  458. package/dist/domains/viewports/aim.js.map +1 -0
  459. package/dist/{features → domains}/viewports/viewMarker.js +23 -5
  460. package/dist/domains/viewports/viewMarker.js.map +1 -0
  461. package/dist/{features → domains}/viewports/viewMarkerDrag.js +3 -3
  462. package/dist/domains/viewports/viewMarkerDrag.js.map +1 -0
  463. package/dist/{features → domains}/viewports/viewResolver.js +1 -1
  464. package/dist/domains/viewports/viewResolver.js.map +1 -0
  465. package/dist/{features → domains}/viewports/viewportLayer.js +3 -2
  466. package/dist/domains/viewports/viewportLayer.js.map +1 -0
  467. package/dist/icons.table.js +1 -1
  468. package/dist/icons.table.js.map +1 -1
  469. package/dist/icons.table.json +106 -6
  470. package/dist/index.d.ts +1445 -1053
  471. package/dist/index.js +90 -77
  472. package/dist/interactions/actions/admitsChild.js +6 -2
  473. package/dist/interactions/actions/admitsChild.js.map +1 -1
  474. package/dist/interactions/actions/align/align.js +1 -4
  475. package/dist/interactions/actions/align/align.js.map +1 -1
  476. package/dist/interactions/actions/booleans/booleanGroupAction.js +66 -0
  477. package/dist/interactions/actions/booleans/booleanGroupAction.js.map +1 -0
  478. package/dist/interactions/actions/booleans/keymap.js +52 -0
  479. package/dist/interactions/actions/booleans/keymap.js.map +1 -0
  480. package/dist/interactions/actions/booleans/operands.js +1 -1
  481. package/dist/interactions/actions/booleans/pieces.js +4 -11
  482. package/dist/interactions/actions/booleans/pieces.js.map +1 -1
  483. package/dist/interactions/actions/clipboard/action.js +3 -7
  484. package/dist/interactions/actions/clipboard/action.js.map +1 -1
  485. package/dist/interactions/actions/clipboard/clipboardOps.js +1 -1
  486. package/dist/interactions/actions/clipboard/clipboardOps.js.map +1 -1
  487. package/dist/interactions/actions/clipboard/materializePaste.js.map +1 -1
  488. package/dist/interactions/actions/defaults/anchorEditing.js +6 -6
  489. package/dist/interactions/actions/defaults/anchorEditing.js.map +1 -1
  490. package/dist/interactions/actions/defaults/bendSegment.js +1 -1
  491. package/dist/interactions/actions/defaults/bendSegment.js.map +1 -1
  492. package/dist/interactions/actions/defaults/containerScroll.js +170 -0
  493. package/dist/interactions/actions/defaults/containerScroll.js.map +1 -0
  494. package/dist/interactions/actions/defaults/contextMenu.js +2 -5
  495. package/dist/interactions/actions/defaults/contextMenu.js.map +1 -1
  496. package/dist/interactions/actions/defaults/delete.js +1 -1
  497. package/dist/interactions/actions/defaults/delete.js.map +1 -1
  498. package/dist/interactions/actions/defaults/duplicate.js +1 -3
  499. package/dist/interactions/actions/defaults/duplicate.js.map +1 -1
  500. package/dist/interactions/actions/defaults/enterGroup.js +7 -12
  501. package/dist/interactions/actions/defaults/enterGroup.js.map +1 -1
  502. package/dist/interactions/actions/defaults/enterPathEdit.js +4 -8
  503. package/dist/interactions/actions/defaults/enterPathEdit.js.map +1 -1
  504. package/dist/interactions/actions/defaults/group.js +12 -24
  505. package/dist/interactions/actions/defaults/group.js.map +1 -1
  506. package/dist/interactions/actions/defaults/ingest.js +18 -10
  507. package/dist/interactions/actions/defaults/ingest.js.map +1 -1
  508. package/dist/interactions/actions/defaults/insertPathAnchor.js +3 -3
  509. package/dist/interactions/actions/defaults/insertPathAnchor.js.map +1 -1
  510. package/dist/interactions/actions/defaults/nudgeSteps.js +3 -21
  511. package/dist/interactions/actions/defaults/nudgeSteps.js.map +1 -1
  512. package/dist/interactions/actions/defaults/pathEditMarks.js.map +1 -1
  513. package/dist/interactions/actions/defaults/selectDeep.js +2 -2
  514. package/dist/interactions/actions/defaults/selectDeep.js.map +1 -1
  515. package/dist/interactions/actions/distribute/distribute.js.map +1 -1
  516. package/dist/interactions/actions/dropVerdict.js +9 -0
  517. package/dist/interactions/actions/dropVerdict.js.map +1 -0
  518. package/dist/interactions/actions/edit-anchors/action.js +2 -2
  519. package/dist/interactions/actions/edit-anchors/action.js.map +1 -1
  520. package/dist/interactions/actions/edit-anchors/extensionDrags.js.map +1 -1
  521. package/dist/interactions/actions/edit-anchors/geometry.js +8 -6
  522. package/dist/interactions/actions/edit-anchors/geometry.js.map +1 -1
  523. package/dist/interactions/actions/edit-anchors/handleDrag.js.map +1 -1
  524. package/dist/interactions/actions/edit-anchors/preview.js +1 -1
  525. package/dist/interactions/actions/edit-anchors/preview.js.map +1 -1
  526. package/dist/interactions/actions/flip/action.js +3 -2
  527. package/dist/interactions/actions/flip/action.js.map +1 -1
  528. package/dist/interactions/actions/geometryProjection.js +8 -3
  529. package/dist/interactions/actions/geometryProjection.js.map +1 -1
  530. package/dist/interactions/actions/gestureFrames.js +1 -0
  531. package/dist/interactions/actions/gestureFrames.js.map +1 -1
  532. package/dist/interactions/actions/insert/action.js +6 -2
  533. package/dist/interactions/actions/insert/action.js.map +1 -1
  534. package/dist/interactions/actions/insert/frame.js +1 -1
  535. package/dist/interactions/actions/insert/frame.js.map +1 -1
  536. package/dist/interactions/actions/insert/placeAction.js +6 -8
  537. package/dist/interactions/actions/insert/placeAction.js.map +1 -1
  538. package/dist/interactions/actions/insert/session.js +2 -2
  539. package/dist/interactions/actions/insert/session.js.map +1 -1
  540. package/dist/interactions/actions/move/action.js +6 -15
  541. package/dist/interactions/actions/move/action.js.map +1 -1
  542. package/dist/interactions/actions/move/behaviors/layoutDrop.js +12 -2
  543. package/dist/interactions/actions/move/behaviors/layoutDrop.js.map +1 -1
  544. package/dist/interactions/actions/move/behaviors/reparentOnDrop.js +29 -10
  545. package/dist/interactions/actions/move/behaviors/reparentOnDrop.js.map +1 -1
  546. package/dist/interactions/actions/move/behaviors/snapToContainer.js +42 -6
  547. package/dist/interactions/actions/move/behaviors/snapToContainer.js.map +1 -1
  548. package/dist/interactions/actions/move/capture.js +4 -8
  549. package/dist/interactions/actions/move/capture.js.map +1 -1
  550. package/dist/interactions/actions/move/commit/index.js.map +1 -1
  551. package/dist/interactions/actions/move/commit/layoutDrop.js +4 -3
  552. package/dist/interactions/actions/move/commit/layoutDrop.js.map +1 -1
  553. package/dist/interactions/actions/move/commit/layoutRelease.js +15 -9
  554. package/dist/interactions/actions/move/commit/layoutRelease.js.map +1 -1
  555. package/dist/interactions/actions/move/commit/reparent.js +19 -13
  556. package/dist/interactions/actions/move/commit/reparent.js.map +1 -1
  557. package/dist/interactions/actions/move/delta.js +51 -5
  558. package/dist/interactions/actions/move/delta.js.map +1 -1
  559. package/dist/interactions/actions/move/frame.js +8 -4
  560. package/dist/interactions/actions/move/frame.js.map +1 -1
  561. package/dist/interactions/actions/move/layout/container.js +19 -9
  562. package/dist/interactions/actions/move/layout/container.js.map +1 -1
  563. package/dist/interactions/actions/move/layout/dragged.js +2 -2
  564. package/dist/interactions/actions/move/layout/dragged.js.map +1 -1
  565. package/dist/interactions/actions/move/layout/dropPass.js +36 -18
  566. package/dist/interactions/actions/move/layout/dropPass.js.map +1 -1
  567. package/dist/interactions/actions/move/layout/exits.js +2 -2
  568. package/dist/interactions/actions/move/layout/exits.js.map +1 -1
  569. package/dist/interactions/actions/move/layout/glide.js +5 -5
  570. package/dist/interactions/actions/move/layout/glide.js.map +1 -1
  571. package/dist/interactions/actions/move/layout/view.js +55 -0
  572. package/dist/interactions/actions/move/layout/view.js.map +1 -0
  573. package/dist/interactions/actions/move/refusal.js +52 -0
  574. package/dist/interactions/actions/move/refusal.js.map +1 -0
  575. package/dist/interactions/actions/move/session.js +9 -8
  576. package/dist/interactions/actions/move/session.js.map +1 -1
  577. package/dist/interactions/actions/move/translate.js +10 -4
  578. package/dist/interactions/actions/move/translate.js.map +1 -1
  579. package/dist/interactions/actions/moveNodes.js +21 -5
  580. package/dist/interactions/actions/moveNodes.js.map +1 -1
  581. package/dist/interactions/actions/pathCommands/pathNodes.js +3 -3
  582. package/dist/interactions/actions/pathCommands/pathNodes.js.map +1 -1
  583. package/dist/interactions/actions/planeInput.js +14 -13
  584. package/dist/interactions/actions/planeInput.js.map +1 -1
  585. package/dist/interactions/actions/poseFrame.js +21 -8
  586. package/dist/interactions/actions/poseFrame.js.map +1 -1
  587. package/dist/interactions/actions/resize/action.js +1 -1
  588. package/dist/interactions/actions/resize/action.js.map +1 -1
  589. package/dist/interactions/actions/resize/aspect.js +1 -1
  590. package/dist/interactions/actions/resize/aspect.js.map +1 -1
  591. package/dist/interactions/actions/resize/commit.js +10 -1
  592. package/dist/interactions/actions/resize/commit.js.map +1 -1
  593. package/dist/interactions/actions/resize/frame.js +3 -2
  594. package/dist/interactions/actions/resize/frame.js.map +1 -1
  595. package/dist/interactions/actions/resize/held.js +44 -0
  596. package/dist/interactions/actions/resize/held.js.map +1 -0
  597. package/dist/interactions/actions/resize/session.js +3 -1
  598. package/dist/interactions/actions/resize/session.js.map +1 -1
  599. package/dist/interactions/actions/resolveOverlays.js +9 -0
  600. package/dist/interactions/actions/resolveOverlays.js.map +1 -1
  601. package/dist/interactions/actions/resolvePreviews.js +23 -7
  602. package/dist/interactions/actions/resolvePreviews.js.map +1 -1
  603. package/dist/interactions/actions/rotate/action.js +1 -1
  604. package/dist/interactions/actions/rotate/action.js.map +1 -1
  605. package/dist/interactions/actions/rotate/frame.js +1 -1
  606. package/dist/interactions/actions/rotate/frame.js.map +1 -1
  607. package/dist/interactions/actions/rotate/session.js +2 -2
  608. package/dist/interactions/actions/rotate/session.js.map +1 -1
  609. package/dist/interactions/actions/selectionSubtree.js +2 -4
  610. package/dist/interactions/actions/selectionSubtree.js.map +1 -1
  611. package/dist/interactions/actions/spatialReference.js +4 -9
  612. package/dist/interactions/actions/spatialReference.js.map +1 -1
  613. package/dist/interactions/gestures/dragRadial/dragRadial.js.map +1 -1
  614. package/dist/interactions/gestures/dragRect/dragRect.js.map +1 -1
  615. package/dist/kitSettingsSchema.js +2 -2
  616. package/dist/kitSettingsSchema.js.map +1 -1
  617. package/dist/{math-C_elShP_.d.ts → math-B_unOnF4.d.ts} +2 -2
  618. package/dist/math.d.ts +3 -3
  619. package/dist/move.d.ts +6 -6
  620. package/dist/{options-ClEm3SEl.d.ts → options-DAjkhbcs.d.ts} +5 -5
  621. package/dist/{poseDescriptor-DN2yfnq_.d.ts → poseDescriptor-CvSxVhCd.d.ts} +17 -4
  622. package/dist/resize.d.ts +6 -6
  623. package/dist/style.css +14 -0
  624. package/dist/test-seams.d.ts +11 -15
  625. package/dist/test-seams.js +1 -1
  626. package/dist/tools/builtin/eyedropper/useEyedropperTool.js +3 -6
  627. package/dist/tools/builtin/eyedropper/useEyedropperTool.js.map +1 -1
  628. package/dist/tools/builtin/line/useLineTool.js.map +1 -1
  629. package/dist/tools/builtin/measure/useMeasureTool.js +2 -2
  630. package/dist/tools/builtin/measure/useMeasureTool.js.map +1 -1
  631. package/dist/tools/builtin/pen/penHandle.js +2 -2
  632. package/dist/tools/builtin/pen/penHandle.js.map +1 -1
  633. package/dist/tools/builtin/pen/usePenTool.js +13 -19
  634. package/dist/tools/builtin/pen/usePenTool.js.map +1 -1
  635. package/dist/tools/builtin/polygon/usePolygonTool.js +1 -1
  636. package/dist/tools/builtin/polygon/usePolygonTool.js.map +1 -1
  637. package/dist/tools/builtin/select/groupEntry.js +1 -1
  638. package/dist/tools/builtin/select/groupEntry.js.map +1 -1
  639. package/dist/tools/builtin/select/selectionContributions.js +1 -1
  640. package/dist/tools/builtin/select/selectionContributions.js.map +1 -1
  641. package/dist/tools/builtin/select/useSelectTool.js +7 -7
  642. package/dist/tools/builtin/select/useSelectTool.js.map +1 -1
  643. package/dist/tools/builtin/slice/useSliceTool.js +5 -8
  644. package/dist/tools/builtin/slice/useSliceTool.js.map +1 -1
  645. package/dist/tools/builtin/star/useStarTool.js +1 -1
  646. package/dist/tools/builtin/star/useStarTool.js.map +1 -1
  647. package/dist/tools/index.js +2 -1
  648. package/dist/{types-49uYJN3j.d.ts → types-A_sNJYRd.d.ts} +8 -0
  649. package/dist/{types-BEdRIhNc.d.ts → types-DW14eu9B.d.ts} +131 -36
  650. package/dist/{types-p2alu-R1.d.ts → types-VCtfchp-.d.ts} +4 -6
  651. package/dist/util/color.js +12 -14
  652. package/dist/util/color.js.map +1 -1
  653. package/dist/version.js +1 -1
  654. package/package.json +25 -24
  655. package/dist/canvas/poseCascade.js +0 -65
  656. package/dist/canvas/poseCascade.js.map +0 -1
  657. package/dist/features/chrome-caps/buildChromeCtx.js.map +0 -1
  658. package/dist/features/chrome-caps/conditions.js.map +0 -1
  659. package/dist/features/chrome-caps/defaults.js.map +0 -1
  660. package/dist/features/chrome-caps/resolve.js.map +0 -1
  661. package/dist/features/chrome-caps/useChromeCaps.js.map +0 -1
  662. package/dist/features/chrome-caps/useHoverTracking.js.map +0 -1
  663. package/dist/features/ingestion/contentHandlers.js.map +0 -1
  664. package/dist/features/ingestion/imageHandler.js.map +0 -1
  665. package/dist/features/ingestion/openFilePicker.js.map +0 -1
  666. package/dist/features/ingestion/placement.js.map +0 -1
  667. package/dist/features/ingestion/registerKitHandlers.js +0 -43
  668. package/dist/features/ingestion/registerKitHandlers.js.map +0 -1
  669. package/dist/features/ingestion/svgHandler.js.map +0 -1
  670. package/dist/features/ingestion/textHandler.js.map +0 -1
  671. package/dist/features/ingestion/useCanvasIngestion.js.map +0 -1
  672. package/dist/features/ingestion/weaselJsonHandler.js.map +0 -1
  673. package/dist/features/longPress/longPressFeedback.js.map +0 -1
  674. package/dist/features/measure/actionIds.js.map +0 -1
  675. package/dist/features/measure/measureCommands.js.map +0 -1
  676. package/dist/features/measure/measureContribution.js.map +0 -1
  677. package/dist/features/measure/measureEdits.js.map +0 -1
  678. package/dist/features/measure/measureGestures.js.map +0 -1
  679. package/dist/features/measure/measureHit.js.map +0 -1
  680. package/dist/features/measure/measureLayer.js.map +0 -1
  681. package/dist/features/measure/measurement.js.map +0 -1
  682. package/dist/features/measure/measurements.js.map +0 -1
  683. package/dist/features/modes/modeLayers.js.map +0 -1
  684. package/dist/features/modes/modeTriggers.js.map +0 -1
  685. package/dist/features/pathEffects/effectSources.js.map +0 -1
  686. package/dist/features/pathEffects/index.js.map +0 -1
  687. package/dist/features/pathEffects/readSource.js.map +0 -1
  688. package/dist/features/pathEffects/textItems.js.map +0 -1
  689. package/dist/features/pathEffects/useEffectSourcesLayer.js.map +0 -1
  690. package/dist/features/paths/anchorData.js.map +0 -1
  691. package/dist/features/paths/anchorMarkers.js.map +0 -1
  692. package/dist/features/paths/editablePath.js.map +0 -1
  693. package/dist/features/paths/originProjection.js.map +0 -1
  694. package/dist/features/paths/pathEditExtension.js.map +0 -1
  695. package/dist/features/paths/pathEditState.js.map +0 -1
  696. package/dist/features/paths/pathEditingOverlayLayer.js.map +0 -1
  697. package/dist/features/paths/pathLayer.js.map +0 -1
  698. package/dist/features/paths/pathRepresentation.js.map +0 -1
  699. package/dist/features/paths/pathSnap/glyphs.js.map +0 -1
  700. package/dist/features/paths/pathSnap/pathSnapSource.js.map +0 -1
  701. package/dist/features/paths/pathSnap/sceneIndex.js.map +0 -1
  702. package/dist/features/paths/pathSnap/snapGeometry.js.map +0 -1
  703. package/dist/features/paths/penPreviewLayer.js.map +0 -1
  704. package/dist/features/paths/shapeGenerator.js.map +0 -1
  705. package/dist/features/paths/strokeOutline.js.map +0 -1
  706. package/dist/features/paths/useAnchorFields.js.map +0 -1
  707. package/dist/features/paths/usePathEdit.js.map +0 -1
  708. package/dist/features/poseRun/usePoseRun.js.map +0 -1
  709. package/dist/features/selection/enteredGroupFrame.js.map +0 -1
  710. package/dist/features/selection/enteredGroupScope.js.map +0 -1
  711. package/dist/features/selection/handleCommands.js.map +0 -1
  712. package/dist/features/selection/overlay.js.map +0 -1
  713. package/dist/features/selection/selectionPose.js.map +0 -1
  714. package/dist/features/snap/angle2d.js.map +0 -1
  715. package/dist/features/snap/debugCandidates.js.map +0 -1
  716. package/dist/features/snap/gather.js.map +0 -1
  717. package/dist/features/snap/inputSubspace.js.map +0 -1
  718. package/dist/features/snap/lazySession.js.map +0 -1
  719. package/dist/features/snap/marks.js.map +0 -1
  720. package/dist/features/snap/outcomeStore.js.map +0 -1
  721. package/dist/features/snap/pointSnap.js.map +0 -1
  722. package/dist/features/snap/probes2d.js.map +0 -1
  723. package/dist/features/snap/readoutDraw.js.map +0 -1
  724. package/dist/features/snap/readoutLayer.js.map +0 -1
  725. package/dist/features/snap/registry.js.map +0 -1
  726. package/dist/features/snap/resizeBox.js.map +0 -1
  727. package/dist/features/snap/roles.js.map +0 -1
  728. package/dist/features/snap/rotationSource.js.map +0 -1
  729. package/dist/features/snap/sceneReads.js.map +0 -1
  730. package/dist/features/snap/sceneSession2d.js.map +0 -1
  731. package/dist/features/snap/screen.js.map +0 -1
  732. package/dist/features/snap/session2d.js.map +0 -1
  733. package/dist/features/snap/spanSnap.js.map +0 -1
  734. package/dist/features/snap/stepAngles.js.map +0 -1
  735. package/dist/features/text/editingDrawOne.js.map +0 -1
  736. package/dist/features/text/sceneTextDrafts.js.map +0 -1
  737. package/dist/features/text/textHitAt.js.map +0 -1
  738. package/dist/features/text/textLayer.js.map +0 -1
  739. package/dist/features/text/useSceneTextEdit.js.map +0 -1
  740. package/dist/features/viewports/aim.js.map +0 -1
  741. package/dist/features/viewports/viewMarker.js.map +0 -1
  742. package/dist/features/viewports/viewMarkerDrag.js.map +0 -1
  743. package/dist/features/viewports/viewResolver.js.map +0 -1
  744. package/dist/features/viewports/viewportLayer.js.map +0 -1
  745. /package/dist/{features → domains}/chrome-caps/index.js +0 -0
package/dist/index.d.ts CHANGED
@@ -1,24 +1,25 @@
1
- import { D as Dims, R as RenderLayer, L as LayerHit, V as ViewAnimationOptions, a as PathEditExtension, h as ViewportDims, F as FitViewToBoundsOptions, i as RedrawSource, j as EditAnchorsParams, I as InertiaConfig, E as EditAnchorsDep, G as GestureLifecycleOptions, k as SliceDep, l as StickyStyle, m as EnteredGroupApi, C as ContentHandlerEntry, A as AnchorMarkerShape, P as PathEditMark, n as ChromeState, o as LayerGroup, S as SnapSource, T as TransformFollower, p as GeometryProjection, q as InsertNodeFactory, r as InsertPaint, s as SvgIngestOptions, t as SceneCanvasSnap, u as Affordance, v as AffordanceRegion, w as AffordanceBinding, x as CommonAffordanceScratch, y as TextOverflow, z as CreateOutlinesAdapter, B as PaintKindEntry, J as PathEditTarget, K as FinishedEditFrame, M as PathSymmetryDep, H as HandleLocks, N as BooleanOpOptions, O as BooleansAdapter, Q as BooleanOp, U as PathPaint, W as BooleanOpResult, X as BooleanStrokes, Y as SnapMods, Z as SourceCandidate, $ as SnapProbeAt, a0 as SnapCollect, a1 as SnapMark, b as SnapGesture, a2 as SnapDep, a3 as SnapOutcome, f as SnapOutcomeStore, a4 as SnapReadoutStyle } from './depSchema-B1RS-IJx.js';
2
- export { a5 as AngleCandidate, a6 as AngleCollect, a7 as AnimateToBoundsOptions, a8 as AreaSelectDep, a9 as BooleanOpPreview, aa as BooleanPreviewPiece, ab as CanDropIntoDep, ac as ClipboardDep, ad as ClipboardIngestCtx, ae as CreateOutlinesResult, af as CustomPaintContext, ag as DEFAULT_LAYER_RETAIN, ah as DecayLoopConfig, ai as FinishedPathEdit, aj as GEOMETRY_BOUND_DATA, ak as HandleLock, al as HitTestView, am as IngestCtx, an as IngestionDep, ao as InsertDep, ap as InsertEnds, aq as InsertExtras, ar as InsertIntoDep, as as InsertLive, at as LassoSelectDep, au as LayerCommandCache, av as LayerDrawFailure, aw as LayerDrawSpan, ax as LayerRetainPolicy, ay as LayoutDep, az as Locus, aA as MinSize, aB as NodeAtPointDep, aC as OutlinePathSpec, aD as PATH_OVERLAY_ROLES, aE as PaintKind, aF as PaintKindEditorProps, aG as PaintKindFamily, aH as PaintKindLoader, aI as PanBounds, aJ as PathEditDrag, aK as PathEditDragStart, aL as PathEditFinishCtx, aM as PathEditHandleMove, aN as PathEditMarksCtx, aO as PathEditOther, aP as PathEditPart, aQ as PathEditStore, aR as PathForm, aS as PathOverlay, aT as PathOverlayOptions, aU as PathOverlayStyle, aV as PathRepresentation, aW as PathTransformFinishCtx, aX as PreviewPathsDep, aY as ResizePolicy, aZ as STICKY_DEFAULTS, a_ as SnapBegin, c as SnapConstrain, a$ as SnapEdge, b0 as SnapEdges, e as SnapGeometry, b1 as SnapMarks, b2 as SnapReadoutDep, d as SnapResizeBox, g as SnapSession, b3 as SvgUnpacker, b4 as TextEditDep, b5 as TextNodeData, b6 as TransformPreviewNode, b7 as TransientPath, b8 as VIEW_ANIMATION_KEY, b9 as ViewAnimationApi, ba as ViewApi, bb as ViewChannel, bc as applyBooleanOp, bd as applyCreateOutlines, be as asPaint, bf as createEnteredGroup, bg as createPathOverlay, bh as createSnapOutcomeStore, bi as depsUnchanged, bj as drawLayers, bk as drawOneLayer, bl as fitViewToBounds, bm as getPaintKind, bn as isLayerPainted, bo as isLayerVisible, bp as listGradientKinds, bq as listPaintKinds, br as minSizeOf, bs as paintKindOf, bt as paintKindRegistry, bu as paintedLayers, bv as paintsLayer, bw as paletteInsertPaint, bx as pathPaintOf, by as patternFamily, bz as previewBooleanOp, bA as registerContentHandler, bB as registerPaintKind, bC as registerPaintKindLoader, bD as seedTile, bE as stickyData, bF as stickyNodeFactory, bG as subscribeToSources, bH as switchGradientKind, bI as textBoxOf, bJ as useDecayLoop, bK as useEnteredGroup, bL as useViewAnimation, bM as useViewAnimationOn, bN as viewAxes, bO as withoutGeometryBoundData } from './depSchema-B1RS-IJx.js';
3
- import { View, Scale2, Path, FramedBox, PolygonPath, GlMat3, Point as Point$3, AnchorField, AnchorSet, PlacementAlign, Rect, Affine, PathSnapKind, PathInWorldPose, AnchorFieldValues, NumberEntry, JoinOptions, SegmentHit, PointOrigin, AnchorSymmetry, BlendPathsOptions, RunAlign, TrackSide, BendAlongPathOptions, RepeatAlongPathOptions, PoseLinear } from '@weasel-js/geom';
4
- export { AnchorField, AnchorFieldValues, AnchorPair, AverageAxis, BendAlongPathOptions, BezierEasing, BlendPathsOptions, FramedBox as Bounds, CONSTRAINT_TOLERANCE, CORNER_FIT_TOLERANCE, CORNER_KEYWORDS, ConstrainedPathEdit, ConstraintPoint, CornerFrame, CornerKeyword, CornerPiece, CornerShape, CornerShapeFrame, CornerSpec, DEFAULT_FLATTEN_TOLERANCE, EASINGS, EasingFn, EasingName, EasingSpec, ExtendToMeetOptions, JoinOptions, MeasurePathOptions, NumberEntry, OpenPathEnd, PATH_C, PATH_CMD_LENGTHS, PATH_L, PATH_M, PATH_Q, PATH_SNAP_KINDS, PATH_Z, Path, PathBlend, PathBuilder, PathConstraint, PathConstraintKind, PathCrossing, PathFillRule, PathInWorldPose, PathMeasure, PathSegment, PathSnapHit, PathSnapIndex, PathSnapKind, PathSnapQuery, PathStation, PathStop, PenAnchor, PointAlongPathOptions, PointInPathOptions, PolygonPath, PoseLinear, PoseRotation, Rect, RectPath, RepeatAlongPathOptions, RepeatStation, ResolvedCorners, SPRING_PRESETS, Scale2, SegmentCrossing, SimplifyPathOptions, SmudgePathOptions, SolveConstraintsOptions, SolveConstraintsResult, SpringPreset, SpringPresetName, TrimPathOptions, TrimResult, Point as Vec2, View, ZOOM_FLOOR, asPolygonPath, averageAnchorsAt, bendAlongPath, blendPaths, boundsOfPath, circlePath, composePath, constrainPathEdit, constraintAnchors, cornerAt, cornerFrameAt, cornerFrames, cornerKeywordOf, cornerShapeK, cornerShapePieces, cornerSpecAt, countPathAnchors, createPathSnapIndex, cubicBezierEasing, decomposePath, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, ellipsePath, extendToMeet, findPathSnap, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, hasCorners, hasOpenSubpath, intersectSegments, isCornerShape, joinAnchorsAt, lengthenOpenEnd, linePath, linear, meanScale, measurePath, nextCornerShape, openEndRay, openPathEnds, pathAnchorPoints, pathCommandCoordCount, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathCrossings, pathDistanceToPoint, pathFromD, pathInPoseFrame, pathInWorld, pathIntersectsPolygon, pathIntersectsRect, pathSegments, pathSignedArea, pathThroughPoseFrame, pathToAnchors, pathToD, pointAlongPath, pointInPath, polygonFromPoints, polylineFromPoints, poseFrameInverseOf, poseFrameOf, poseLinearOf, poseRotationOf, prepareBlend, pxExtent, rectMarkerPath, rectPath, regularPolygonPath, remapPerAnchor, repeatAlongPath, resolveCorners, resolveCornersWithSources, resolveEasing, reversePath, rotatePathAround, roundRectPath, scaleDelta, scalePathToBounds, screenAngleOf, simplifyAnchorsAt, simplifyPath, smudgePath, solveConstraints, solvePathConstraints, splitByClosure, splitSubpaths, squarePath, standoff, starPath, stationsAlongPath, transformPath, translatePath, trimPathAt, unionBoundsPath, unsatisfiedConstraints, withCorner, withinPxBox, withinPxRadius, withoutCorners, worldEditToStorage } from '@weasel-js/geom';
5
- import { a as PlaneMap, L as LayoutStrategy, R as ReflowTransition, b as LayoutDropTargetMode } from './types-49uYJN3j.js';
6
- export { C as ContainerBounds, D as DropRegion, c as DropTarget, d as LayoutArrival, e as LayoutChild, f as LayoutContainer, g as LayoutDragged, h as LayoutSnap, P as ParallaxOpts, i as ReflowGlideOptions, S as ScalarOrXY, j as deriveParallaxView, k as fromPlane, p as planeMap, l as planeMatrix, m as planeToPlane, r as rectFromPlane, n as rectToPlane, t as toPlane } from './types-49uYJN3j.js';
1
+ import { D as Dims, R as RenderLayer, L as LayerHit, h as LayerDims, V as ViewAnimationOptions, a as PathEditExtension, i as ViewportDims, F as FitViewToBoundsOptions, j as RedrawSource, k as EditAnchorsParams, I as InertiaConfig, E as EditAnchorsDep, G as GestureLifecycleOptions, l as SliceDep, m as StickyStyle, A as AnchorMarkerShape, P as PathEditMark, T as TextOverflow, n as EnteredGroupApi, C as ContentHandlerEntry, o as ChromeState, p as LayerGroup, S as SnapSource, q as TransformFollower, r as GeometryProjection, s as InsertNodeFactory, t as InsertPaint, u as SvgIngestOptions, v as SceneCanvasSnap, w as Affordance, x as AffordanceRegion, y as AffordanceBinding, z as CommonAffordanceScratch, B as CreateOutlinesAdapter, J as PaintKindEntry, K as PathEditTarget, M as FinishedEditFrame, N as PathSymmetryDep, H as HandleLocks, O as BooleanOpOptions, Q as BooleansAdapter, U as BooleanOp, W as PathPaint, X as BooleanOpResult, Y as BooleanStrokes, Z as SnapMods, $ as SourceCandidate, a0 as SnapProbeAt, a1 as SnapCollect, a2 as SnapMark, b as SnapGesture, a3 as SnapDep, a4 as SnapOutcome, f as SnapOutcomeStore, a5 as SnapReadoutStyle } from './depSchema-C3BwxitB.js';
2
+ export { a6 as AngleCandidate, a7 as AngleCollect, a8 as AnimateToBoundsOptions, a9 as AreaSelectDep, aa as BooleanOpPreview, ab as BooleanPreviewPiece, ac as CanDropIntoDep, ad as ClipboardDep, ae as ClipboardIngestCtx, af as CreateOutlinesResult, ag as CustomPaintContext, ah as DEFAULT_LAYER_RETAIN, ai as DecayLoopConfig, aj as DropRefusal, ak as DropVerdict, al as FinishedPathEdit, am as GEOMETRY_BOUND_DATA, an as HandleLock, ao as HitTestView, ap as IngestCtx, aq as IngestionDep, ar as InsertDep, as as InsertEnds, at as InsertExtras, au as InsertIntoDep, av as InsertLive, aw as LassoSelectDep, ax as LayerCommandCache, ay as LayerDrawFailure, az as LayerDrawSpan, aA as LayerRetainPolicy, aB as LayoutDep, aC as Locus, aD as MinSize, aE as NodeAtPointDep, aF as OutlinePathSpec, aG as PATH_OVERLAY_ROLES, aH as PaintKind, aI as PaintKindEditorProps, aJ as PaintKindFamily, aK as PaintKindLoader, aL as PanBounds, aM as PathEditDrag, aN as PathEditDragStart, aO as PathEditFinishCtx, aP as PathEditHandleMove, aQ as PathEditMarksCtx, aR as PathEditOther, aS as PathEditPart, aT as PathEditStore, aU as PathForm, aV as PathOverlay, aW as PathOverlayOptions, aX as PathOverlayStyle, aY as PathRepresentation, aZ as PathTransformFinishCtx, a_ as PoseChange, a$ as PreviewPathsDep, b0 as ResizePolicy, b1 as STICKY_DEFAULTS, b2 as SnapBegin, c as SnapConstrain, b3 as SnapEdge, b4 as SnapEdges, b5 as SnapFrame, e as SnapGeometry, b6 as SnapMarks, b7 as SnapReadoutDep, d as SnapResizeBox, g as SnapSession, b8 as SvgUnpacker, b9 as TextEditDep, ba as TextNodeData, bb as TransformPreviewNode, bc as TransientPath, bd as VIEW_ANIMATION_KEY, be as ViewAnimationApi, bf as ViewApi, bg as ViewChannel, bh as applyBooleanOp, bi as applyCreateOutlines, bj as asPaint, bk as createEnteredGroup, bl as createPathOverlay, bm as createSnapOutcomeStore, bn as depsUnchanged, bo as drawLayers, bp as drawOneLayer, bq as fitViewToBounds, br as getPaintKind, bs as isLayerPainted, bt as isLayerVisible, bu as listGradientKinds, bv as listPaintKinds, bw as minSizeOf, bx as paintKindOf, by as paintKindRegistry, bz as paintedLayers, bA as paintsLayer, bB as paletteInsertPaint, bC as pathPaintOf, bD as patternFamily, bE as previewBooleanOp, bF as refusalOf, bG as registerContentHandler, bH as registerPaintKind, bI as registerPaintKindLoader, bJ as seedTile, bK as stickyData, bL as stickyNodeFactory, bM as subscribeToSources, bN as switchGradientKind, bO as textBoxOf, bP as useDecayLoop, bQ as useEnteredGroup, bR as useViewAnimation, bS as useViewAnimationOn, bT as viewAxes, bU as withoutGeometryBoundData } from './depSchema-C3BwxitB.js';
3
+ import { View, Scale2, Path, FramedBox, PolygonPath, Affine, GlMat3, Point, AnchorField, AnchorSet, PlacementAlign, Rect, PathSnapKind, PathInWorldPose, AnchorFieldValues, NumberEntry, JoinOptions, SegmentHit, PointOrigin, AnchorSymmetry, BlendPathsOptions, RunAlign, TrackSide, BendAlongPathOptions, RepeatAlongPathOptions, RoughenPathOptions, ZigzagPathOptions, PuckerBloatPathOptions, PoseLinear } from '@weasel-js/geom';
4
+ export { AnchorField, AnchorFieldValues, AnchorPair, AverageAxis, BendAlongPathOptions, BezierEasing, BlendPathsOptions, FramedBox as Bounds, CONSTRAINT_TOLERANCE, CORNER_FIT_TOLERANCE, CORNER_KEYWORDS, ConstrainedPathEdit, ConstraintPoint, CornerFrame, CornerKeyword, CornerPiece, CornerShape, CornerShapeFrame, CornerSpec, DEFAULT_FLATTEN_TOLERANCE, EASINGS, EasingFn, EasingName, EasingSpec, ExtendToMeetOptions, JoinOptions, MeasurePathOptions, NumberEntry, OpenPathEnd, PATH_C, PATH_CMD_LENGTHS, PATH_L, PATH_M, PATH_Q, PATH_SNAP_KINDS, PATH_Z, Path, PathBlend, PathBuilder, PathConstraint, PathConstraintKind, PathCrossing, PathFillRule, PathInWorldPose, PathMeasure, PathSegment, PathSnapHit, PathSnapIndex, PathSnapKind, PathSnapQuery, PathStation, PathStop, PenAnchor, PointAlongPathOptions, PointInPathOptions, PolygonPath, PoseLinear, PoseRotation, PuckerBloatPathOptions, Rect, RectPath, RepeatAlongPathOptions, RepeatStation, ResolvedCorners, RoughenPathOptions, SPRING_PRESETS, Scale2, SegmentCrossing, SimplifyPathOptions, SmudgePathOptions, SolveConstraintsOptions, SolveConstraintsResult, SpringPreset, SpringPresetName, TrimPathOptions, TrimResult, Point as Vec2, View, ZOOM_FLOOR, ZigzagPathOptions, asPolygonPath, averageAnchorsAt, bendAlongPath, blendPaths, boundsOfPath, circlePath, composePath, constrainPathEdit, constraintAnchors, cornerAt, cornerFrameAt, cornerFrames, cornerKeywordOf, cornerShapeK, cornerShapePieces, cornerSpecAt, countPathAnchors, createPathSnapIndex, cubicBezierEasing, decomposePath, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, ellipsePath, extendToMeet, findPathSnap, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, hasCorners, hasOpenSubpath, intersectSegments, isCornerShape, joinAnchorsAt, lengthenOpenEnd, linePath, linear, meanScale, measurePath, nextCornerShape, openEndRay, openPathEnds, pathAnchorPoints, pathCommandCoordCount, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathCrossings, pathDistanceToPoint, pathFromD, pathInPoseFrame, pathInWorld, pathIntersectsPolygon, pathIntersectsRect, pathSegments, pathSignedArea, pathThroughPoseFrame, pathToAnchors, pathToD, pointAlongPath, pointInPath, polygonFromPoints, polylineFromPoints, poseFrameInverseOf, poseFrameOf, poseLinearOf, poseRotationOf, prepareBlend, puckerBloatPath, pxExtent, rectMarkerPath, rectPath, regularPolygonPath, remapPerAnchor, repeatAlongPath, resolveCorners, resolveCornersWithSources, resolveEasing, reversePath, rotatePathAround, roughenPath, roundRectPath, scaleDelta, scalePathToBounds, screenAngleOf, simplifyAnchorsAt, simplifyPath, smudgePath, solveConstraints, solvePathConstraints, splitByClosure, splitSubpaths, squarePath, standoff, starPath, stationsAlongPath, transformPath, translatePath, trimPathAt, unionBoundsPath, unsatisfiedConstraints, withCorner, withinPxBox, withinPxRadius, withoutCorners, worldEditToStorage, zigzagPath } from '@weasel-js/geom';
5
+ import { a as PlaneMap, L as LayoutStrategy, R as ReflowTransition, b as LayoutDropTargetMode } from './types-A_sNJYRd.js';
6
+ export { C as ContainerBounds, D as DropRegion, c as DropTarget, d as LayoutArrival, e as LayoutChild, f as LayoutContainer, g as LayoutDragged, h as LayoutSnap, P as ParallaxOpts, i as ReflowGlideOptions, S as ScalarOrXY, j as deriveParallaxView, k as fromPlane, p as planeMap, l as planeMatrix, m as planeToPlane, r as rectFromPlane, n as rectToPlane, t as toPlane } from './types-A_sNJYRd.js';
7
7
  export { DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_VELOCITY_DECAY, Simulation, SimulationCore, SimulationForce, SimulationNode, SimulationOptions, UseSimulationOptions, createSimulation } from '@weasel-js/simulation';
8
8
  export { useSimulation } from '@weasel-js/simulation/react';
9
- import { R as RectPose, a as SystemLayerSpec, A as AddNodeSpec, b as RegisteredOp, c as SceneRegistry, P as PoseComposition, L as LayoutFrame, N as Node, I as InheritedPaint, d as PoseAdapter, S as Scene, e as PoseRemoval, f as PoseWrite, g as ScenePoseReports, h as PoseOverrides, i as SerializedScene, D as DerivePoseFn, j as SerializedSceneV1, k as SpecsFromSerializedOptions, l as NodeClip, m as DerivePathFn, n as DerivedDep } from './types-BEdRIhNc.js';
10
- export { o as AddLayerSpec, B as Bivariant, C as ClipFromPoseFn, p as CopiesFromPoseFn, G as GroupNode, q as IDENTITY_POSE_COMPOSITION, r as LayerRecord, s as LayoutMove, M as MarkNode, t as PoseClosure, u as PoseHold, v as PoseOverride, w as PoseWriteOrigin, x as RemovedNode, y as SCENE_HISTORY_FORM, z as SceneArrivalHandler, E as SceneBatchOptions, F as SceneDeclaredFieldSetters, H as SceneDoc, J as SceneDocValues, K as SceneEditPass, O as SceneEditPassOptions, Q as SceneEditSummary, T as SerializedDoc, U as SerializedLayer, V as SerializedNode, W as SerializedNodeV1, X as SerializedSceneHistory, Y as SkippedKey, Z as SystemLayerRecord, _ as UserLayerRecord, $ as V1Classifier, a0 as asNodeId, a1 as composeWorldPose, a2 as composesFrames, a3 as inheritedPaintIn, a4 as inheritedPaintOf, a5 as inheritsPaint, a6 as nodeKindOf, a7 as rebaseLocalPose, a8 as specsFromSerialized, a9 as withInheritedPaint } from './types-BEdRIhNc.js';
11
- import { NodeId, SelectionMode, SelectionExtendKey, SelectionApi, IngestItem, OngoingOverlay, PointerSessionCancelReason, DeviceProfile, Bounds, Tool as Tool$1, Contribution as Contribution$1, ContributionChrome as ContributionChrome$1, ToolDef as ToolDef$1, DepName, DepSchema, Action, ActionDeps, GestureBinding, AffordanceHit, ActionDisabledReason, ToolKeybinding, HotkeyTrigger, ModifierState, RuleCtx, Rule, ActionTunings, BindingOverrides, ActionsProp, DebugSink, ToolSet, ToolEntry, Dispatcher, OverlayRole, ResizeAnchor, InvocationCtx, OngoingHandle } from '@weasel-js/routing';
12
- export { ALWAYS, Action, ActionDeps, ActionDisabledReason, ActionDisabledReasonValue, ActionDispatch, ActionEnabledResult, ActionEntry, ActionItem, ActionParamSchema, ActionParams, ActionPresentation, ActionSettings, ActionSettingsState, ActionShortcut, ActionTuning, ActionTunings, ActionUnavailable, ActionVariant, ActionsProp, ActionsRegistry, AffordanceHit, AssemblyInputs, BindingOpts, BindingOverrides, BindingScope, BindingSource, BoundGesture, BuildRuleCtxArgs, COARSE_TARGET_SCALE, CONTROL_SELECTOR, CaptureGestureOptions, CaptureKeyOptions, CaptureKind, CapturedSpec, Carried, Carry, CarryCallbacks, CarryPayload, CarryPointer, CarryStage, ContributionDeps, ContributionRouting, DEFAULT_ALLOWED_CAPABILITIES, DEFAULT_DEVICE_PROFILE, DRAG_THRESHOLD_PX, DebugSink, DepListing, DepName, DepRegistry, DepSchema, DepSource, DetectedDeviceFacts, DeviceProfile, DispatchRecord, DispatchRecordInput, Dispatcher, DispatcherContext, DragSample, DroppedCandidate, Eligibility, EligibilityState, GestureBinding, GestureKitSettings, HandleKind, HitShape, HotkeyTrigger, ImmediateInvoker, IngestItem, InputEvent, InvocationCtx, Invoker, KEYMAP_HOLD, KeyBinding, KeyReach, KeymapDef, KeymapDescription, KeymapRow, KeymapStack, KeymapUnbound, KeymapVerdict, LONG_PRESS_MS, LongPressOptions, LongPressState, LongPressStore, MatchResult, MenuDef, MenuHit, MenuHost, MenuOpenRequest, MenuSources, ModeShortcutHandlers, ModifierRole, ModifierRoles, ModifierState, NEVER, NodeId, OngoingHandle, OngoingInvoker, OngoingOverlay, OpenKeymap, OpenMenu, OverlayPosition, OverlayRole, PendingLongPress, PlacedBy, Point2, PointerSession, PointerSessionCallbacks, PointerSessionCancelReason, PointerSessionOptions, RankedCandidate, RecordCandidate, ResizeAnchor, ResolveAllOptions, ResolveOnlyResult, ResolvedBindingOverrides, ResolvedCandidate, RoleKeys, RoleRebinds, Rule, RuleCtx, ScopedBinding, ScratchKey, ScratchStore, SelectionApi, SelectionExtendKey, SelectionMode, Selector, SpecificityPart, ToolEntry, ToolKeybinding, ToolModifiers, ToolPresentation, ToolSet, ToolSlot, TunedBinding, UiOngoingControl, ViewportGestureKind, WalkStep, actionBindings, actionCursor, actionItemTitle, actionItems, actionSettingsParams, actionShortcuts, actionsTagged, activatesFocusedControl, assembleEntries, bindingId, buildDepsFromRequires, buildRuleCtx, captureGesture, captureKey, clientToCanvas, createDepRegistry, createDispatcher, createKeymapStack, createLongPressStore, defineTool, deleteScratch, describeKeymap, describeRule, dlog, dwarn, evaluate, evaluateActive, evaluateEnabled, focusedControlOwnsKey, getScratch, heldKeySpec, historyKey, isDebugEnabled, isEditableTarget, isInControlWithin, isToolSet, keySpecShortcut, keymapContribution, keymapLeaderBindingId, keymapLeaderId, keymapShortcuts, keysHeld, liveScope, matchActionItem, matchesKeyBinding, modeShortcutSpec, modeShortcuts, modifierStateOf, openPointerSession, overlaysOf, pastDragThreshold, readActionSettings, resolveBindingOverrides, resolveDeviceProfile, resolveParams, resolveSchemaMenu, roleReader, scopeBindings, scratchKey, setScratch, specificity, startCarry, taggedActionItems, toolIdsOf, toolSet, toolSetHas, tuneAction, withoutTools } from '@weasel-js/routing';
9
+ import { R as RectPose, a as SystemLayerSpec, A as AddNodeSpec, b as RegisteredOp, c as SceneRegistry, P as PoseComposition, L as LayoutFrame, N as Node, I as InheritedPaint, d as ScrollOffset, e as PoseAdapter, S as Scene, f as PoseRemoval, g as PoseWrite, h as ScenePoseReports, i as PoseOverrides, j as SerializedScene, D as DerivePoseFn, k as SavedScene, l as SpecsFromSerializedOptions, m as NodeClip, n as DerivePathFn, o as DerivedDep } from './types-DW14eu9B.js';
10
+ export { p as AddLayerSpec, B as Bivariant, C as ClipFromPoseFn, q as CopiesFromPoseFn, G as GroupNode, r as IDENTITY_POSE_COMPOSITION, s as LayerRecord, t as LayoutMove, M as MarkNode, u as PoseClosure, v as PoseHold, w as PoseOverride, x as PoseWriteOrigin, y as RemovedNode, z as SCENE_HISTORY_FORM, E as SceneArrivalHandler, F as SceneBatchOptions, H as SceneDeclaredFieldSetters, J as SceneDoc, K as SceneDocValues, O as SceneEditPass, Q as SceneEditPassOptions, T as SceneEditSummary, U as SceneScroll, V as ScrollOffsets, W as ScrollSource, X as SerializedDoc, Y as SerializedLayer, Z as SerializedNode, _ as SerializedNodeV1, $ as SerializedSceneHistory, a0 as SerializedSceneV1, a1 as SerializedSceneV2, a2 as SkippedKey, a3 as SystemLayerRecord, a4 as UserLayerRecord, a5 as V1Classifier, a6 as asNodeId, a7 as childFrameAt, a8 as composeChildFrame, a9 as composeWorldPose, aa as composesFrames, ab as createScrollOffsets, ac as inheritedPaintIn, ad as inheritedPaintOf, ae as inheritsPaint, af as isSerializedScene, ag as nodeKindOf, ah as rebaseLocalPose, ai as scrolledFrames, aj as specsFromSerialized, ak as viewPoseAdapter, al as withInheritedPaint } from './types-DW14eu9B.js';
11
+ import * as _weasel_js_routing from '@weasel-js/routing';
12
+ import { NodeId, SelectionMode, SelectionExtendKey, SelectionApi, IngestItem, OngoingOverlay, PointerSessionCancelReason, DeviceProfile, Bounds, Tool as Tool$1, Contribution as Contribution$1, ContributionChrome as ContributionChrome$1, ToolDef as ToolDef$1, DepName, DepSchema, Action, ActionDeps, WorldPoint, GestureBinding, AffordanceHit, ActionDisabledReason, ToolKeybinding, HotkeyTrigger, ModifierState, RuleCtx, Rule, ActionTunings, BindingOverrides, ActionsProp, DebugSink, ToolSet, ToolEntry, Dispatcher, OverlayRole, ResizeAnchor, InvocationCtx, OngoingHandle } from '@weasel-js/routing';
13
+ export { ALWAYS, Action, ActionDeps, ActionDisabledReason, ActionDisabledReasonValue, ActionDispatch, ActionEnabledResult, ActionEntry, ActionItem, ActionParamSchema, ActionParams, ActionPresentation, ActionSettings, ActionSettingsState, ActionShortcut, ActionTuning, ActionTunings, ActionUnavailable, ActionVariant, ActionsProp, ActionsRegistry, AffordanceHit, AssemblyInputs, BindingOpts, BindingOverrides, BindingScope, BindingSource, BoundGesture, BuildRuleCtxArgs, COARSE_TARGET_SCALE, CONTROL_SELECTOR, CaptureGestureOptions, CaptureKeyOptions, CaptureKind, CapturedSpec, Carried, Carry, CarryCallbacks, CarryPayload, CarryPointer, CarryStage, ContributionDeps, ContributionRouting, DEFAULT_ALLOWED_CAPABILITIES, DEFAULT_DEVICE_PROFILE, DRAG_THRESHOLD_PX, DebugSink, DepListing, DepName, DepRegistry, DepSchema, DepSource, DetectedDeviceFacts, DeviceProfile, DispatchRecord, DispatchRecordInput, Dispatcher, DispatcherContext, DragSample, DroppedCandidate, Eligibility, EligibilityState, GestureBinding, GestureKitSettings, HandleKind, HitShape, HotkeyTrigger, ImmediateInvoker, ImmediateParams, IngestItem, InputEvent, InvocationCtx, Invoker, KEYMAP_HOLD, KeyBinding, KeyReach, KeymapDef, KeymapDescription, KeymapRow, KeymapStack, KeymapUnbound, KeymapVerdict, LONG_PRESS_MS, LongPressOptions, LongPressState, LongPressStore, MatchResult, MenuAccess, MenuCustomAt, MenuDef, MenuHit, MenuHost, MenuOpenRequest, MenuSources, ModeShortcutHandlers, ModifierRole, ModifierRoles, ModifierState, NEVER, NodeId, OngoingHandle, OngoingInvoker, OngoingOverlay, OpenKeymap, OpenMenu, OverlayPosition, OverlayRole, PendingLongPress, PlacedBy, Point2, PointerSession, PointerSessionCallbacks, PointerSessionCancelReason, PointerSessionOptions, RankedCandidate, RecordCandidate, ResizeAnchor, ResolveAllOptions, ResolveOnlyResult, ResolvedBindingOverrides, ResolvedCandidate, RoleKeys, RoleRebinds, Rule, RuleCtx, ScopedBinding, ScratchKey, ScratchStore, SelectionApi, SelectionExtendKey, SelectionMode, Selector, SpecificityPart, ToolEntry, ToolKeybinding, ToolModifiers, ToolPresentation, ToolSet, ToolSlot, TunedBinding, UiOngoingControl, ViewportGestureKind, WalkStep, WorldPoint, actionBindings, actionCursor, actionItemTitle, actionItems, actionSettingsParams, actionShortcuts, actionsTagged, activatesFocusedControl, assembleEntries, bindingId, buildDepsFromRequires, buildRuleCtx, captureGesture, captureKey, clientToCanvas, createDepRegistry, createDispatcher, createKeymapStack, createLongPressStore, defineTool, deleteScratch, describeKeymap, describeRule, dlog, dwarn, evaluate, evaluateActive, evaluateEnabled, focusedControlOwnsKey, getScratch, heldKeySpec, historyKey, holdPreview, holdPreviewId, isDebugEnabled, isEditableTarget, isInControlWithin, isToolSet, keySpecShortcut, keymapContribution, keymapLeaderBindingId, keymapLeaderId, keymapShortcuts, keysHeld, liveScope, matchActionItem, matchesKeyBinding, modeShortcutSpec, modeShortcuts, modifierStateOf, openPointerSession, overlaysOf, pastDragThreshold, readActionSettings, resolveBindingOverrides, resolveDeviceProfile, resolveParams, resolveSchemaMenu, roleReader, scopeBindings, scratchKey, setScratch, specificity, startCarry, taggedActionItems, toolIdsOf, toolSet, toolSetHas, tuneAction, withoutTools } from '@weasel-js/routing';
13
14
  import * as react from 'react';
14
- import react__default, { Ref, RefObject, ReactNode, MutableRefObject, MouseEvent } from 'react';
15
+ import react__default, { Ref, RefObject, ReactNode, MutableRefObject } from 'react';
15
16
  import { Reflection } from '@weasel-js/registry';
16
17
  export { MIXED, Mixed, QueryMatch, Reflectable, ReflectedEntry, Reflection, RegisterOptions, Registrant, createReflectable, isPlainObject } from '@weasel-js/registry';
17
18
  export { stableStringify } from './json.js';
18
- import { P as PoseDescriptor, b as RotatedPose } from './poseDescriptor-DN2yfnq_.js';
19
- export { R as RECT_POSE_DESCRIPTOR, a as ROTATED_POSE_DESCRIPTOR, p as poseDescriptorForNode, t as translatePoseViaDescriptor, v as visualBoundsViaDescriptor } from './poseDescriptor-DN2yfnq_.js';
19
+ import { P as PoseDescriptor, b as RotatedPose } from './poseDescriptor-CvSxVhCd.js';
20
+ export { R as RECT_POSE_DESCRIPTOR, a as ROTATED_POSE_DESCRIPTOR, T as TranslateLead, p as poseDescriptorForNode, t as translatePoseViaDescriptor, v as visualBoundsViaDescriptor } from './poseDescriptor-CvSxVhCd.js';
20
21
  import { KitSettingsStore } from '@weasel-js/react';
21
- export { CanvasFocusReturn, FrameClock, FrameClockOptions, UseCanvasFocusOptions, VisibleRaf, VisibleRafOptions, VisibleRafTarget, useCanvasFocus, useFrameClock, useLatest, useVisibleRaf } from '@weasel-js/react';
22
+ export { CanvasFocusReturn, UseCanvasFocusOptions, VisibleRaf, VisibleRafOptions, VisibleRafTarget, useCanvasFocus, useLatest, useVisibleRaf } from '@weasel-js/react';
22
23
  import { PaintedCursorState, CursorSink, CursorSpec } from '@weasel-js/cursor';
23
24
  export { BakeOptions, CURSOR_ANGLE_STEPS, CURSOR_MAX_CSS_PX, CursorGlyph, CursorGlyphName, CursorGlyphSpec, CursorSink, CursorSinkTarget, CursorSpec, PaintedCursor, PaintedCursorFrame, PaintedCursorState, ResolvedCursor, bakeCursor, createCursorSink, createPaintedCursorState, cursorFor, resolveCursor, resolveCursorTier } from '@weasel-js/cursor';
24
25
  import { DrawCommand, FlattenTolerance, ImageMinification, ShaderProgramHandle, CommandStroke as CommandStroke$1 } from '@weasel-js/renderer';
@@ -29,41 +30,42 @@ import { VertexColorChannel, Target, Animator, ColorOverrideRegistry, TargetAxes
29
30
  import { SelectionStore as SelectionStore$1 } from '@weasel-js/select';
30
31
  import { ToolsApi as ToolsApi$1, UseToolsOptions as UseToolsOptions$1, PointerContextValue, Yoke } from '@weasel-js/routing/react';
31
32
  export { ActionsProvider, ActiveToolContextProvider, ActiveToolContextProviderIfRoot, ActiveToolContextProviderProps, ActiveToolContextValue, CommandOptions, DepRegistryProvider, DispatcherChannels, InputScope, OngoingAction, PointerContextProvider, PointerContextValue, PointerWorldPos, SelectionContextProvider, SelectionContextProviderIfRoot, SelectionContextValue, UseGestureDispatcherOptions, Yoke, createPointerStore, useAction, useActionsRegistry, useActiveToolContext, useCommand, useDepRegistry, useDepSource, useGestureDispatcher, useMenuHost, useMenus, useOngoingAction, useOpenKeymap, useOptionalActiveToolContext, useOptionalDepRegistry, usePointerContext, usePointerPosition, usePublishSelection, useSelectionContext, useYoke } from '@weasel-js/routing/react';
32
- import { Paint, CommandFill, CommandStroke, CommandPaint, Fill, Inherit, Stroke, Palette, SolidPaint, VertexWidth, PaintedFill, PaintedStroke } from '@weasel-js/paint';
33
- export { ColorInterpolationSpace, ColorSpace, CommandFill, CommandPaint, CommandPaintUnits, CommandStroke, Fill, GradStop, GradientKind, GradientPaint, HalfWidths, HueInterpolation, INHERIT, Inherit, KitMarkerKey, MarkerKey, MarkerRef, OklchDeg, Paint, PaintUnits, PaintedFill, PaintedStroke, PatternPaint, PatternPlacement, PatternTransform, PatternTransformParts, PosedPaint, Region, STROKE_DASH_RATIOS, ScreenLength, SolidPaint, Stroke, StrokeAlign, StrokeDashStyle, StrokeNib, TILE_KINDS, TextureHandle, TexturePaint, TileKind, TilePaint, TilePatternSpec, VertexWidth, VertexWidthSides, alignedStrokeRect, composePatternTransform, contrastLineColor, contrastRatio, dashForStrokeStyle, decomposePatternTransform, gradientForBounds, gradientGeometry, hexToOklchDeg, hexToRgbBytes, hexToRgba, hslToSrgb, interpolateSrgb, isGradientPaint, isPatternPaint, isSolidPaint, isTileKind, isTilePaint, lerpColorArray, lerpFill, lerpOklab, lerpOklch, lerpPaint, lerpStroke, linearSrgbToOklab, linearToSrgb, normalizeHex, oklabToLinearSrgb, oklabToOklch, oklabToSrgbU8, oklchDegToHex, oklchToOklab, parseColor, parseColorToRgba255, parseHexBytes, patternPlacementOf, resolveColor, resolveFill, resolveScreenLength, resolveStroke, rgbaToHex, sampleGradientStops, scaleVertexWidth, srgbFloatToOklab, srgbToHsl, srgbToLinear, srgbU8ToOklab, strokeDashStyleOf, tileSpecOf, vertexHalfWidths, vertexWidthFromSides, wcagLevels, widestHalfWidth, withGradientKind } from '@weasel-js/paint';
33
+ import { Paint, CommandFill, CommandStroke, Fill, Inherit, Stroke, CommandPaint, Palette, SolidPaint, VertexWidth, PaintedFill, PaintedStroke } from '@weasel-js/paint';
34
+ export { ColorInterpolationSpace, ColorSpace, CommandFill, CommandPaint, CommandPaintUnits, CommandStroke, Fill, GradStop, GradientKind, GradientPaint, HalfWidths, HueInterpolation, INHERIT, ImagePatternPaint, Inherit, KitMarkerKey, MarkerKey, MarkerRef, OklchDeg, Paint, PaintUnits, PaintedFill, PaintedStroke, PatternPaint, PatternPlacement, PatternTransform, PatternTransformParts, PosedPaint, Region, STROKE_DASH_RATIOS, ScreenLength, SolidPaint, Stroke, StrokeAlign, StrokeDashStyle, StrokeNib, TILE_KINDS, TextureHandle, TexturePaint, TileExtent, TileKind, TilePaint, TilePatternSpec, VertexWidth, VertexWidthSides, alignedStrokeRect, composePatternTransform, contrastLineColor, contrastRatio, dashForStrokeStyle, decomposePatternTransform, gradientForBounds, gradientGeometry, hexToOklchDeg, hexToRgbBytes, hexToRgba, hslToSrgb, interpolateSrgb, isGradientPaint, isImagePatternPaint, isPatternPaint, isSolidPaint, isTileKind, isTilePaint, lerpColorArray, lerpFill, lerpOklab, lerpOklch, lerpPaint, lerpStroke, linearSrgbToOklab, linearToSrgb, normalizeHex, oklabToLinearSrgb, oklabToOklch, oklabToSrgbU8, oklchDegToHex, oklchToOklab, parseColor, parseColorToRgba255, parseHexBytes, patternPlacementOf, resolveColor, resolveFill, resolveScreenLength, resolveStroke, rgbaToHex, sampleGradientStops, scaleVertexWidth, srgbFloatToOklab, srgbToHsl, srgbToLinear, srgbU8ToOklab, strokeDashStyleOf, tileSpecOf, vertexHalfWidths, vertexWidthFromSides, wcagLevels, widestHalfWidth, withGradientKind } from '@weasel-js/paint';
34
35
  import { FontRequest } from '@weasel-js/font';
35
36
  export { FaceMetrics, FaceRuleMetrics, FaceScriptMetrics, FontFamilyFaces, FontRequest, FontStyle, FontVariant, LocalFontOutlinesResult, OutlineFaceInfo, OutlineSource, OutlineStatus, OutlineVariant, RegisterFontOptions, canQueryLocalFonts, cssFamilyName, cssFontFamily, cssFontFamilyLoading, enableLocalFontOutlines, fontOutlineRegistry, fontRegistry, hasFontOutlines, isCanvasFont, listFontOutlines, loadFontOutlines, outlineStatus, refreshCanvasFont, registerCanvasFont, registerFont, registerFontOutlines, subscribeGlyphReady, unregisterCanvasFont, unregisterFontOutlines, warmFonts } from '@weasel-js/font';
36
37
  import * as _weasel_js_history from '@weasel-js/history';
37
38
  import { Op, CreateHistoryOptions, History, HistorySelection } from '@weasel-js/history';
38
39
  export { BeginJournalOptions, CreateHistoryOptions, EvictedEntry, History, HistoryBranch, HistoryEntry, HistoryLogger, HistorySelection, HistoryStep, Journal, Op, RecordEntryOptions, SerializedHistory, SerializedHistoryEntry, SerializedOp, SwapArgs, SwapOpOptions, swapOp } from '@weasel-js/history';
39
- import { G as GestureContext, B as BoundsConstraint, R as RotateBehavior, I as InsertBehavior, L as LassoSelectBehavior, M as MoveBehavior } from './clone-qb2e1F5p.js';
40
- export { A as ActionBehavior, a as AreaSelectOverlay, b as BehaviorEnd, c as BehaviorResult, C as CloneBehavior, d as CloneBehaviorResult, e as GestureFrames, f as GroupTransform, g as InsertMoveResult, h as InsertOverlay, i as InsertPoint, j as InsertProposed, k as LassoSelectMoveResult, l as LassoSelectOverlay, m as LassoSelectPose, n as LassoSelectProposed, o as MoveEnd, P as PointerState, p as ResizeMoveResult, q as ResizeOverlay, r as ResizeProposed, s as RotateMoveResult, t as RotateOverlay, u as RotateProposed } from './clone-qb2e1F5p.js';
41
- import { d as ResizeHandleLayout, U as UseResizeOptions, T as TargetTransform } from './cornerHandles-CNCb7aTY.js';
42
- export { C as CORNER_ANCHORS, a as CornerAnchor, k as CornerEdge, b as CornerHandle, E as EDGE_HANDLE_MIN_RADII, H as HandleEdge, R as RESIZE_HANDLE_ANCHORS, c as ResizeHandleAnchor, e as cornerPoint, f as cornerResizeHandles, g as fixedCornerOf, h as handlePoint, i as hitCornerHandle, j as isCornerHandle, r as resizeHandlesFor } from './cornerHandles-CNCb7aTY.js';
40
+ import { G as GestureContext, B as BoundsConstraint, R as RotateBehavior, I as InsertBehavior, L as LassoSelectBehavior, M as MoveBehavior } from './clone-Bz4iqGfE.js';
41
+ export { A as ActionBehavior, a as AreaSelectOverlay, b as BehaviorEnd, c as BehaviorResult, C as CloneBehavior, d as CloneBehaviorResult, e as GestureFrames, f as GroupTransform, g as InsertMoveResult, h as InsertOverlay, i as InsertPoint, j as InsertProposed, k as LassoSelectMoveResult, l as LassoSelectOverlay, m as LassoSelectPose, n as LassoSelectProposed, o as MoveEnd, P as PointerState, p as ResizeMoveResult, q as ResizeOverlay, r as ResizeProposed, s as RotateMoveResult, t as RotateOverlay, u as RotateProposed } from './clone-Bz4iqGfE.js';
42
+ import { d as ResizeHandleLayout, U as UseResizeOptions, T as TargetTransform } from './cornerHandles-DpmQM_z5.js';
43
+ export { C as CORNER_ANCHORS, a as CornerAnchor, k as CornerEdge, b as CornerHandle, E as EDGE_HANDLE_MIN_RADII, H as HandleEdge, R as RESIZE_HANDLE_ANCHORS, c as ResizeHandleAnchor, e as cornerPoint, f as cornerResizeHandles, g as fixedCornerOf, h as handlePoint, i as hitCornerHandle, j as isCornerHandle, r as resizeHandlesFor } from './cornerHandles-DpmQM_z5.js';
43
44
  import { ModeRegistry, WorkspaceVisual, ModeDecorations, NodeScope } from '@weasel-js/modes';
44
- import { M as MoveAdapter, A as AreaSelectAdapter, L as LayerEnumerableAdapter, a as LassoHitMode, P as PasteOmission, b as ResizeAdapter, c as RotateAdapter, d as LassoSelectAdapter, I as InsertAdapter, C as ClipboardSnapshot, e as PasteCtx, O as OrderedAdapter } from './types-p2alu-R1.js';
45
- export { R as RegionPickView, S as SnapTarget } from './types-p2alu-R1.js';
45
+ import { M as MoveAdapter, A as AreaSelectAdapter, L as LayerEnumerableAdapter, a as LassoHitMode, P as PasteOmission, b as ResizeAdapter, c as RotateAdapter, d as LassoSelectAdapter, I as InsertAdapter, C as ClipboardSnapshot, e as PasteCtx, O as OrderedAdapter } from './types-VCtfchp-.js';
46
+ export { R as RegionPickView, S as SnapTarget } from './types-VCtfchp-.js';
46
47
  import * as _weasel_js_gestures from '@weasel-js/gestures';
48
+ import { KeySpec } from '@weasel-js/gestures';
47
49
  export { BindingOverrideInput, CarrySpec, ClaimableGesture, ClickSpec, DragSpec, DropSpec, GestureSpec, KeyHeldSpec, KeySpec, ModSpec, MultiTouchSpec, PasteSpec, PinchSpec, TargetPredicate, TargetSpec, WheelSpec, bindingSpec, bodyPredicate, held, hitPredicate, key, keySpecRoute, unbound } from '@weasel-js/gestures';
48
- import { U as UseMoveOptions } from './options-ClEm3SEl.js';
50
+ import { U as UseMoveOptions } from './options-DAjkhbcs.js';
49
51
  import { IconRef, IconTable, IconVariantLoader, IconRegistry, IconGlyph, IconEntry, IconVariantState } from '@weasel-js/icons';
50
52
  export { IconRef, IconTable, toIconRef } from '@weasel-js/icons';
53
+ import { TextStyle, StyledRun, TextVerticalAlign, TextPaint, TextPose, TextOutlinesError } from '@weasel-js/text';
54
+ export { CacheUse, DEFAULT_DECORATION_METRICS, DEFAULT_TEXT_FILL, DEFAULT_TEXT_STYLE, DecorationKind, FaceMetricsFn, FitTextPoseOptions, FlagKey, FontVariantCaps, LabelOptions, LaidOutCell, LaidOutDecoration, LaidOutGroup, LaidOutLineBox, LaidOutOutlineGlyph, LaidOutQuad, LaidOutRuns, LayoutLine, LayoutResult, LayoutRunsOpts, MARKDOWN_RUN_GRAMMAR, MarkdownFontOptions, MeasureFn, MeasureTextBoundsOpts, MeasuredSpan, MeasuredText, PaintRunsOpts, PaintedRuns, PlacedGlyph, PointInTextPoseOpts, PositionedRun, QUAD_STRIDE, RangeStyle, ResolvedRun, ResolvedTextStyle, RunFlag, RunGrammar, RunMarker, RunSourceMap, RunStylePatch, SCRIPT_METRICS, SMALL_CAPS_SCALE, ScriptPreset, SetFlagResult, ShapedCluster, ShapedGlyph, SmallCapsText, StyleKey, StyledRun, TextAlign, TextDirection, TextLineBoxesOpts, TextNodeSource, TextOutlineSource, TextOutlinesError, TextOutlinesFailure, TextPaint, TextPaintPath, TextPose, TextPoseLayout, TextPoseLayoutInput, TextRenderer, TextShaper, TextStyle, TextToPathOptions, TextTransform, TextVerticalAlign, TransformedRunText, applyStyleToRange, cachedLayoutRuns, cachedPaintRuns, caretIndexAt, createMarkdownRenderer, decorationMetrics, defaultLabelTextRenderer, dropRuns, effectiveRangeStyle, fitTextPose, fontString, halfLeadingFor, isBoldWeight, isSmallCapsLetter, isTextData, layoutMarkdown, layoutRuns, layoutTextPose, loadTextOutlines, markdownToRuns, measureText, measureTextBounds, measuredWidth, nodeHasFlag, numericWeight, paintRuns, paragraphDirection, patchRangeStyle, pointInTextPose, rangeWeight, registerBidi, registerShaper, renderLabel, resolveAlign, resolveRunFace, resolveRuns, resolveTextStyle, runsToMarkdown, runsToPlainText, scriptMetrics, scriptMetricsFor, setFlagOverRange, smallCapsScale, smallCapsScaleFor, smallCapsText, styleAtRange, textLineBoxes, textPoseLayoutInput, textToPath, textToPathsByPaint, toRuns, transformRunTexts, unboldPatch, verticalAlignOffset } from '@weasel-js/text';
55
+ import { UseTextEditReturn } from '@weasel-js/text-dom';
56
+ export { StartEditOptions, StyleToggle, TEXT_EDIT_FONT_HOLD, TextEditClipRect, TextEditCommit, TextEditScreenPose, TextEditSelection, UseTextEditOptions, UseTextEditReturn, charOffsetToDomPosition, domPositionToCharOffset, domToRuns, runsToDom, useTextEdit } from '@weasel-js/text-dom';
51
57
  import * as _weasel_js_prefs from '@weasel-js/prefs';
52
58
  import { PrefSection, PrefNumberUnit } from '@weasel-js/prefs';
53
59
  import { UnitScope } from '@weasel-js/quantity';
54
60
  export { ANGLE_RADIANS, IMPERIAL_INCHES, METRIC_MM, PIXELS, PerAxis, PlaneUnits, PlaneValue, ScopeTree, Unit, UnitEntry, UnitExpr, UnitExprContext, UnitScale, UnitScope, UnitSystem, UnitValue, axisUnits, formatAxes, formatScoped, formatUnit, fromRoot, parseUnitExpr, resolveAxes, resolveScoped, resolveUnit, resolveUnitExpr, scopesOf, toRoot, unitScale } from '@weasel-js/quantity';
55
- import { TextPose, TextStyle, StyledRun, TextVerticalAlign, TextPaint, TextOutlinesError } from '@weasel-js/text';
56
- export { DEFAULT_DECORATION_METRICS, DEFAULT_TEXT_FILL, DEFAULT_TEXT_STYLE, DecorationKind, FaceMetricsFn, FitTextPoseOptions, FlagKey, FontVariantCaps, LabelOptions, LaidOutCell, LaidOutDecoration, LaidOutGroup, LaidOutLineBox, LaidOutOutlineGlyph, LaidOutQuad, LaidOutRuns, LayoutLine, LayoutResult, LayoutRunsOpts, MARKDOWN_RUN_GRAMMAR, MarkdownFontOptions, MeasureFn, MeasureTextBoundsOpts, MeasuredSpan, MeasuredText, PaintRunsOpts, PaintedRuns, PlacedGlyph, PointInTextPoseOpts, PositionedRun, RangeStyle, ResolvedRun, ResolvedTextStyle, RunFlag, RunGrammar, RunMarker, RunSourceMap, RunStylePatch, SCRIPT_METRICS, SMALL_CAPS_SCALE, ScriptPreset, SetFlagResult, SmallCapsText, StyleKey, StyledRun, TextAlign, TextDirection, TextLineBoxesOpts, TextNodeSource, TextOutlineSource, TextOutlinesError, TextOutlinesFailure, TextPaint, TextPaintPath, TextPose, TextPoseLayout, TextPoseLayoutInput, TextRenderer, TextStyle, TextToPathOptions, TextTransform, TextVerticalAlign, TransformedRunText, applyStyleToRange, cachedLayoutRuns, cachedPaintRuns, caretIndexAt, createMarkdownRenderer, decorationMetrics, defaultLabelTextRenderer, effectiveRangeStyle, fitTextPose, fontString, isBoldWeight, isSmallCapsLetter, isTextData, layoutMarkdown, layoutRuns, layoutTextPose, loadTextOutlines, markdownToRuns, measureText, measureTextBounds, measuredWidth, nodeHasFlag, numericWeight, paintRuns, paragraphDirection, patchRangeStyle, pointInTextPose, rangeWeight, registerBidi, renderLabel, resolveAlign, resolveRunFace, resolveRuns, resolveTextStyle, runsToMarkdown, runsToPlainText, scriptMetrics, scriptMetricsFor, setFlagOverRange, smallCapsScale, smallCapsScaleFor, smallCapsText, styleAtRange, textLineBoxes, textPoseLayoutInput, textToPath, textToPathsByPaint, toRuns, transformRunTexts, unboldPatch, verticalAlignOffset } from '@weasel-js/text';
57
- import { UseTextEditReturn } from '@weasel-js/text-dom';
58
- export { StartEditOptions, StyleToggle, TEXT_EDIT_FONT_HOLD, TextEditClipRect, TextEditCommit, TextEditScreenPose, TextEditSelection, UseTextEditOptions, UseTextEditReturn, charOffsetToDomPosition, domPositionToCharOffset, domToRuns, runsToDom, useTextEdit } from '@weasel-js/text-dom';
59
61
  export { BUILTIN_MARKERS, MarkerCtx, MarkerEntry, MarkerPaint, MarkerSite, MarkerSiteRequest, OffsetPathOptions, StrokeToPathOptions, getMarker, listMarkers, markerInset, markerKeyOf, markerRegistry, markerSites, offsetPath, registerMarker, resolveMarkerSize, resolveStrokeWidth, strokeInsets, strokeToPath } from '@weasel-js/stroke';
60
62
  export { Polyline, trimPolyline } from '@weasel-js/geom/tessellate';
61
- export { C as CLIP_NOTHING, a as aabbCenter, c as clipNothing, p as pointInRotatedRect, r as rectCorners, b as rotatePoint, d as rotatedRectCorners } from './math-C_elShP_.js';
63
+ export { C as CLIP_NOTHING, a as aabbCenter, c as clipNothing, p as pointInRotatedRect, r as rectCorners, b as rotatePoint, d as rotatedRectCorners } from './math-B_unOnF4.js';
62
64
  export { SnipAtCrossingsOptions, SplitBySegmentOptions, pathDivide, pathExclude, pathIntersect, pathSubtract, pathUnion, snipPathByPolyline, snipPathsAtCrossings, splitPathByPolyline, splitPathBySegment, trianglesToPath } from '@weasel-js/geom/booleans';
63
65
  export { CURVE_REPS, CurveRepKind, CurveRepresentation, Discriminator, SharedAnchor, bezierCubic, bezierQuadratic, nurbs, spiro } from '@weasel-js/geom/curves';
64
66
  import { O as OriginProjection } from './originProjection-gY0jb4Wb.js';
65
67
  export { A as AUTO_ORIGIN_PROJECTION, R as RECT_ORIGIN_PROJECTION } from './originProjection-gY0jb4Wb.js';
66
- export { A as AUTO_POSE_DESCRIPTOR, i as isPathLike, a as isRectPose } from './autoPoseDescriptor-CZ1eXbzY.js';
68
+ export { A as AUTO_POSE_DESCRIPTOR, i as isPathLike, a as isRectPose } from './autoPoseDescriptor-C25QVb0W.js';
67
69
  export { ClipboardFlavors, UseClipboardOpsOptions, UseClipboardOpsReturn, WEASEL_CLIPBOARD_MIME, WEASEL_CLIPBOARD_MIME_WEB, buildWeaselClipboardText, embedWeaselMetadataInSvg, extractWeaselClipboardFromSvg, parseWeaselClipboardText, sniffWeaselClipboardText, useClipboardOps } from './clipboard.js';
68
70
  import { Vec, SnapCandidate } from '@weasel-js/geom/nd';
69
71
 
@@ -135,8 +137,15 @@ declare function viewZoom(view: View): number;
135
137
  declare function normalizeView(view: View): View;
136
138
 
137
139
  /** Options for `useScene` — the layers the scene has, what it starts out
138
- * holding, and how its history behaves. */
139
- interface UseSceneOptions<TData, TLayer extends string, TPose = RectPose> {
140
+ * holding, and how its history behaves. A scene whose `TPose` is not a
141
+ * {@link RectPose} has no default composition and must name one. */
142
+ type UseSceneOptions<TData, TLayer extends string, TPose = RectPose> = SceneOptions<TData, TLayer, TPose> & NamesComposition<TPose>;
143
+ /** `composition` is required unless `TPose` is a rect the default can fold. */
144
+ type NamesComposition<TPose> = [TPose] extends [RectPose] ? unknown : {
145
+ composition: PoseComposition<TPose>;
146
+ };
147
+ /** Everything `useScene` takes, with `composition` optional. */
148
+ interface SceneOptions<TData, TLayer extends string, TPose = RectPose> {
140
149
  systemLayers: readonly SystemLayerSpec<TLayer>[];
141
150
  initial?: readonly AddNodeSpec<TData, TLayer, TPose>[];
142
151
  /** The document values the scene starts with, outside history. See `Scene.doc`. */
@@ -155,7 +164,12 @@ interface UseSceneOptions<TData, TLayer extends string, TPose = RectPose> {
155
164
  /** Per-scene registry for non-serializable function fields (clipFromPose, etc.).
156
165
  * Required only when serializing/deserializing scenes that use function fields. */
157
166
  registry?: SceneRegistry<TPose, TData, TLayer>;
158
- /** How a child's pose folds into its container's. Default: it does not, and every pose is world. */
167
+ /** How a child's pose folds into its container's frame. A stored child pose
168
+ * is local to the nearest container that defines a frame, and moving a
169
+ * container writes one pose. Default `RIGID_POSE_COMPOSITION`, which reads
170
+ * `x`, `y`, `width`, `height`, `rotation` and `transform`; a scene of any
171
+ * other pose names its own, or `IDENTITY_POSE_COMPOSITION`, under which every
172
+ * pose is world and a container never carries its children. */
159
173
  composition?: PoseComposition<TPose>;
160
174
  /** How laid-out containers are measured. See {@link LayoutFrame}. */
161
175
  layoutFrame?: LayoutFrame<TPose>;
@@ -478,6 +492,17 @@ interface CanvasViewCommonProps {
478
492
  /** Which of the surface's layers this view paints. Defaults to all of them —
479
493
  * the same content through a second camera. */
480
494
  layers?: (surface: readonly RenderLayer<unknown>[]) => readonly RenderLayer<unknown>[];
495
+ /**
496
+ * The id of a view whose layers this one paints, read at every paint and
497
+ * pick: what that view paints, as a `parent` gives a nested view, narrowed by
498
+ * this view's own `layers`, `layerVisibility` and `layerOrder`. Where that
499
+ * view owns a selection and this one does not, this view acts on that
500
+ * selection and draws its chrome. Its rect and camera are not taken; this
501
+ * view is still measured on its own frame. A loupe aimed over a panel
502
+ * follows the panel. `null`, or an id no view has, paints what this view
503
+ * would without it.
504
+ */
505
+ follows?: () => string | null;
481
506
  /**
482
507
  * Show or hide layers in this view only, by id — the map `<Canvas>` takes,
483
508
  * applied after `layers` narrows the stack. A scene layer paints as
@@ -643,7 +668,7 @@ interface CanvasViewHandle {
643
668
  /** Paint the view for one frame of the canvas: its layers through its own
644
669
  * camera, clipped to its rect. For a view added with `paint: false`, whose
645
670
  * host draws it; empty until the view has mounted. */
646
- draw(data: unknown, outer: View, dims: Dims): DrawCommand[];
671
+ draw(data: unknown, outer: View, dims: LayerDims): DrawCommand[];
647
672
  /** Stop painting and routing the view. */
648
673
  remove(): void;
649
674
  }
@@ -1087,6 +1112,12 @@ declare function composeRigidPose<TPose extends RectPose>(parent: TPose, child:
1087
1112
  /** Inverse of `composeRigidPose` — un-turns about the parent's center, then
1088
1113
  * subtracts the parent's offset. */
1089
1114
  declare function decomposeRigidPose<TPose extends RectPose>(parent: TPose, world: TPose): TPose;
1115
+ /** `scroll` for `composeRectPose`: the frame moved by minus `offset`. */
1116
+ declare function scrollRectPose<TPose extends RectPose>(frame: TPose, offset: ScrollOffset): TPose;
1117
+ /** `scroll` for `composeRigidPose`: the frame moved by minus `offset` taken
1118
+ * through its own rotation and `transform`, so content scrolls along the
1119
+ * container's axes however it is turned. */
1120
+ declare function scrollRigidPose<TPose extends RectPose>(frame: TPose, offset: ScrollOffset): TPose;
1090
1121
  /** Translation-only composition over `RectPose`. What a scene wants when a
1091
1122
  * container groups its children but never turns them. */
1092
1123
  declare const RECT_POSE_COMPOSITION: PoseComposition<RectPose>;
@@ -1103,6 +1134,22 @@ declare const RIGID_POSE_COMPOSITION: PoseComposition<RectPose>;
1103
1134
  */
1104
1135
  declare function worldPoseLookup<TPose>(adapter: PoseAdapter<TPose>, compose: (parent: TPose, child: TPose) => TPose): (id: string) => TPose | null;
1105
1136
 
1137
+ /**
1138
+ * World reads and local writes, paired, for the default actions.
1139
+ *
1140
+ * A container's pose defines a frame, so a node's stored pose is expressed in
1141
+ * its parent's. The geometry an action reasons about is world; every pose it
1142
+ * writes back through `setPose` or a pose op is local. An action that reads
1143
+ * world and writes world looks right for one gesture and drifts on the next,
1144
+ * because the stored pose is then read in the parent's frame again.
1145
+ *
1146
+ * Under `IDENTITY_POSE_COMPOSITION` local and world are the same value.
1147
+ *
1148
+ * A scene-backed frame reads world as the view shows it, a scrolled
1149
+ * container's content moved by its offset, and writes back through the same
1150
+ * fold, so a pose an action stores is the content position.
1151
+ */
1152
+
1106
1153
  /** The two directions an action needs, over one composition strategy. */
1107
1154
  interface PoseFrame<TPose> {
1108
1155
  /** The strategy in force. `closure` says what it can express exactly. */
@@ -1111,8 +1158,11 @@ interface PoseFrame<TPose> {
1111
1158
  world(id: NodeId): TPose;
1112
1159
  /** The node whose frame `id` is stored in, or `null` for the root frame. */
1113
1160
  frame(id: NodeId): NodeId | null;
1114
- /** World pose of the frame `id` is stored in, or `null` for the root frame. */
1161
+ /** World pose of the frame `id` is stored in, or `null` for the root frame:
1162
+ * the container's `childFrame`, scrolled where the view scrolls it. */
1115
1163
  parentWorld(id: NodeId): TPose | null;
1164
+ /** The frame `id` gives its children when its own pose folds to `world`. */
1165
+ childFrame(id: NodeId, world: TPose): TPose;
1116
1166
  /** `worldPose` expressed in `id`'s own parent frame — what `setPose` stores. */
1117
1167
  local(id: NodeId, worldPose: TPose): TPose;
1118
1168
  /** `worldPose` expressed under `parentId`'s frame. For a node about to be
@@ -1120,8 +1170,12 @@ interface PoseFrame<TPose> {
1120
1170
  localUnder(parentId: NodeId | null, worldPose: TPose): TPose;
1121
1171
  }
1122
1172
  /** The `poseFrame` a scene-backed action works in, over the scene's own
1123
- * composition. Under IDENTITY every method is a no-op. */
1173
+ * composition, read and written through the view's scrolled frames. */
1124
1174
  declare function scenePoseFrame(scene: Scene<unknown, string, unknown>): PoseFrame<unknown>;
1175
+ /** Each node's box frame in world, `boxFrameOf` its world pose: where a
1176
+ * container's children are laid out, and its own grid runs. `null` for a
1177
+ * node missing from `scene` or whose pose is not a box. */
1178
+ declare function sceneBoxFrames(scene: Scene<unknown, string, unknown>): (id: string) => Affine | null;
1125
1179
 
1126
1180
  /**
1127
1181
  * The kit version a build was compiled from, so an app can report what it is
@@ -2011,6 +2065,9 @@ declare function interpolateView(from: View, to: View): (t: number) => View;
2011
2065
  interface AimSource {
2012
2066
  aim(): ViewAim | null;
2013
2067
  setAim?(aim: ViewAim): void;
2068
+ /** Tells a marker drawing this aim that it changed, so the marker repaints. Without it the marker
2069
+ * repaints only when something else asks for a redraw. Returns an unsubscribe. */
2070
+ subscribe?(listener: () => void): () => void;
2014
2071
  }
2015
2072
  /** How a marker's outline is stroked, in screen px. */
2016
2073
  interface ViewMarkerStyle {
@@ -2029,8 +2086,8 @@ interface ViewMarkerProps {
2029
2086
  /** Screen px. Default: stroke `#ffffff`, width 1, dash [2, 3]. */
2030
2087
  style?: ViewMarkerStyle;
2031
2088
  /** Default true: dragging the marker edits the source's aim. A source with no writer is never interactive.
2032
- * A marker grabs its whole interior plus {@link VIEW_MARKER_HIT_SLOP_PX}, so one covering much of its
2033
- * frame takes every press there; `false` opts out. */
2089
+ * A marker grabs its interior plus {@link VIEW_MARKER_HIT_SLOP_PX} while it covers at most three quarters
2090
+ * of its frame, and past that only a band that wide either side of its rim, so the frame keeps its presses. */
2034
2091
  interactive?: boolean;
2035
2092
  }
2036
2093
  /** The marker style a {@link ViewMarkerProps.style} fills in from: the minimap indicator's. */
@@ -2056,7 +2113,8 @@ declare const VIEW_MARKER_HIT_SLOP_PX = 4;
2056
2113
  /**
2057
2114
  * The grab for a press at frame px `at` in `space`, the marker's target, or
2058
2115
  * `null` when the marker is not interactive, its source has no writer or no
2059
- * aim, or `at` is not on its outline or within {@link VIEW_MARKER_HIT_SLOP_PX} of it. A surface with views
2116
+ * aim, or `at` is not on its outline or within {@link VIEW_MARKER_HIT_SLOP_PX} of it — of its rim alone, for a
2117
+ * marker covering most of its frame (see {@link ViewMarkerProps.interactive}). A surface with views
2060
2118
  * calls this itself; a canvas with none, such as a detached minimap, calls it to route a press to its marker.
2061
2119
  */
2062
2120
  declare function grabViewMarker(props: ViewMarkerProps, host: ViewMarkerHost, space: AimSpace, at: {
@@ -2207,8 +2265,8 @@ declare const VIEW_MARKER_DRAG = "view.marker.drag";
2207
2265
  declare function viewMarkerDragAction(): Action;
2208
2266
  /**
2209
2267
  * The always-on entry (id `'view-marker'`) that binds a drag on any marker to {@link VIEW_MARKER_DRAG}.
2210
- * A `<SceneCanvas>` installs it unless `actions={null}` or a `tools` takeover leaves it out; to turn marker
2211
- * dragging back on there, pass it in `ambient`, or in the takeover's own `useTools` ambient list.
2268
+ * A `<SceneCanvas>` installs it, beside a `tools` takeover too, unless `actions={null}` leaves it out; to turn
2269
+ * marker dragging back on there, pass it in `ambient`.
2212
2270
  */
2213
2271
  declare function createViewMarkerContribution(): SurfaceContribution;
2214
2272
 
@@ -2249,11 +2307,12 @@ interface SceneViewLayers {
2249
2307
  * layer left out of it is not painted. */
2250
2308
  layerOrder?: readonly string[];
2251
2309
  }
2252
- /** The view size `buildSceneViewCommands` culls to, and how it bounds a
2253
- * node's paint before painting it. */
2310
+ /** The view size `buildSceneViewCommands` culls to, the density it will be
2311
+ * painted at, and how it bounds a node's paint before painting it. */
2254
2312
  interface SceneViewCull<TData, TLayer extends string, TPose> {
2255
2313
  width: number;
2256
2314
  height: number;
2315
+ dpr: number;
2257
2316
  paintBounds?: PaintBoundsFn<Node<TData, TLayer, TPose>, TPose>;
2258
2317
  }
2259
2318
  /** What to draw into an existing canvas: the scene, the view, and the same
@@ -2942,7 +3001,7 @@ declare function DepRegistryProviderIfRoot({ children }: {
2942
3001
  * only `menuHost`, `view` and `worldToClient` on a surface without a scene; `selection`, `scene`,
2943
3002
  * `hitAt` and `kindOfNode` refine the hit and the keyboard anchor where they are supplied.
2944
3003
  */
2945
- declare function openContextMenu(deps: ActionDeps, params?: Record<string, unknown>, anchorOf?: (deps: ActionDeps) => Point$3 | null): boolean;
3004
+ declare function openContextMenu(deps: ActionDeps, params?: Record<string, unknown>, anchorOf?: (deps: ActionDeps) => Point | null): boolean;
2946
3005
  /**
2947
3006
  * Opens the context menu: for the pointer on a right-click or an unclaimed
2948
3007
  * long-press, selecting the shape under it first; for the keyboard on
@@ -3080,8 +3139,9 @@ interface UseAlignOptions<TPose> {
3080
3139
  geometry?: PoseDescriptor<TPose>;
3081
3140
  /** Label passed to applyOps. Default 'Align'. */
3082
3141
  label?: string;
3083
- /** How local poses fold up to world. Default IDENTITY, where the two are
3084
- * the same value and the alignment runs entirely in stored coordinates. */
3142
+ /** How local poses fold up to world. Default IDENTITY, which takes every
3143
+ * pose the adapter answers as world; over a scene's adapter, pass
3144
+ * `scene.composition`. */
3085
3145
  composition?: PoseComposition<TPose>;
3086
3146
  /** The nodes behind the adapter's ids. With it, a stroked node aligns by
3087
3147
  * the box it is drawn with (`drawnBoundsOf`); without, by its pose box.
@@ -3136,8 +3196,9 @@ interface UseDistributeOptions<TPose> {
3136
3196
  defaultMode?: DistributeMode;
3137
3197
  /** Label passed to applyOps. Default 'Distribute'. */
3138
3198
  label?: string;
3139
- /** How local poses fold up to world. Default IDENTITY, where the two are
3140
- * the same value and the spread runs entirely in stored coordinates. */
3199
+ /** How local poses fold up to world. Default IDENTITY, which takes every
3200
+ * pose the adapter answers as world; over a scene's adapter, pass
3201
+ * `scene.composition`. */
3141
3202
  composition?: PoseComposition<TPose>;
3142
3203
  }
3143
3204
  /** Return shape of `useDistribute`. */
@@ -3195,8 +3256,7 @@ interface SetAnchorFieldParams {
3195
3256
  /** A point a spatial reference of `'pointer'` resolves to in place of the
3196
3257
  * pointer dep, when the invocation has one of its own. */
3197
3258
  type AtPoint = {
3198
- worldX: number;
3199
- worldY: number;
3259
+ world: WorldPoint;
3200
3260
  };
3201
3261
  type AlignParams = AtPoint & {
3202
3262
  to: AlignReference;
@@ -3504,8 +3564,8 @@ declare const editingLayer: EditedLayerOf;
3504
3564
  * names. An action in a scene with no `parallax` layer, or invoked with no
3505
3565
  * scene or view to read a plane from, runs exactly as it would unwrapped.
3506
3566
  *
3507
- * An immediate action's world point is `params.worldX` / `params.worldY`,
3508
- * the dispatcher's convention for a click; it is carried when present. */
3567
+ * An immediate action's points are its params' `world` and `press`; each
3568
+ * is carried when present. */
3509
3569
  declare function inPlane<A extends Action>(action: A, layerOf: EditedLayerOf): A;
3510
3570
 
3511
3571
  /** Binding params `viewport.dragPan` understands, read at `start`. A bare
@@ -3597,6 +3657,51 @@ declare function makeViewportWheelPanAction(opts?: WheelPanOptions): Action & {
3597
3657
  requires: string[];
3598
3658
  };
3599
3659
 
3660
+ /**
3661
+ * Wheel scrolling of a layout container whose content runs past its bounds,
3662
+ * such as `tileGrid({ overflow: 'scroll' })`. The strategy's `contentExtent`
3663
+ * says how far; the offset goes to `scene.scroll`, which moves what the view
3664
+ * shows and leaves the document where it is.
3665
+ */
3666
+
3667
+ type AnyScene$2 = Scene<unknown, string, unknown>;
3668
+ /** How far a container's content can scroll on each axis, in its own units:
3669
+ * `[min, max]`, zero included, so an unscrolled container is in range. */
3670
+ interface ScrollRange {
3671
+ x: readonly [number, number];
3672
+ y: readonly [number, number];
3673
+ }
3674
+ /**
3675
+ * How far `id`'s content can scroll: the span its layout's `contentExtent`
3676
+ * reaches past its bounds, read through the document fold the layout pass
3677
+ * arranges it in. Measured in the container's own frame, the axes a scroll
3678
+ * offset runs along, so a turned container scrolls by its own length rather
3679
+ * than its box's. `null` for a node whose layout reports no extent, one whose
3680
+ * pose is not a frame, and under a composition that cannot scroll.
3681
+ */
3682
+ declare function scrollRange(scene: AnyScene$2, id: NodeId, descriptor: PoseDescriptor<unknown>): ScrollRange | null;
3683
+ interface Scrollable {
3684
+ id: NodeId;
3685
+ range: ScrollRange;
3686
+ }
3687
+ /** The innermost shown container under the world point `at` whose content
3688
+ * can scroll, with its range. */
3689
+ declare function scrollableAt(scene: AnyScene$2, at: {
3690
+ x: number;
3691
+ y: number;
3692
+ }, descriptor: PoseDescriptor<unknown>): Scrollable | null;
3693
+ /**
3694
+ * Wheel over a container whose content runs past its bounds scrolls that
3695
+ * content along the container's own axes, clamped to the strategy's
3696
+ * `contentExtent`; Shift+wheel scrolls it across. A container already at the
3697
+ * end of its range in the wheel's direction hands the wheel to the scrollable
3698
+ * container holding it, and past the outermost one the action passes, so the
3699
+ * wheel pans the viewport. Anywhere else it declines.
3700
+ */
3701
+ declare const containerScrollAction: Action & {
3702
+ requires: string[];
3703
+ };
3704
+
3600
3705
  /**
3601
3706
  * `editAnchorsAction` — ongoing Action descriptor for editing polygon anchors.
3602
3707
  *
@@ -4064,15 +4169,15 @@ declare function useKeybindings(tools: ToolsApi, options?: UseKeybindingsOptions
4064
4169
  /** Options for `useSelectTool`: how a point resolves to nodes, how a click
4065
4170
  * chooses among them, and the appearance of the marquee. */
4066
4171
  interface UseSelectToolOptions<TPose> {
4067
- /** Return ids of all objects whose painted body covers (worldX, worldY).
4172
+ /** Return ids of all objects whose painted body covers `world`.
4068
4173
  * Order doesn't matter — the tool collapses parent/child overlap via
4069
4174
  * `pickTopMostHit`. When omitted, defaults to an AABB-vs-point walk of
4070
4175
  * the adapter's tree using the pose descriptor. Override for tighter
4071
4176
  * shapes (path / polygon hit-tests). */
4072
- pickEvery?: (worldX: number, worldY: number) => string[];
4177
+ pickEvery?: (world: WorldPoint) => string[];
4073
4178
  /** Optional alt-aware selection-update hit returning the single id the
4074
4179
  * click should act on. */
4075
- pickBest?: (worldX: number, worldY: number, alt: boolean, selection: readonly string[]) => string | null;
4180
+ pickBest?: (world: WorldPoint, alt: boolean, selection: readonly string[]) => string | null;
4076
4181
  /** How to read poses for the default `pickEvery`. Default
4077
4182
  * `AUTO_POSE_DESCRIPTOR`. */
4078
4183
  poseDescriptor?: PoseDescriptor<TPose>;
@@ -4242,6 +4347,43 @@ declare const onEmptyCanvas: _weasel_js_gestures.TargetPredicate & {
4242
4347
  * tool adds this to its ambient list. */
4243
4348
  declare function areaSelectContribution(): Contribution;
4244
4349
 
4350
+ /** The reads `pressTarget` makes: the tree, and each node's kind. */
4351
+ interface PressTargetTree {
4352
+ getParent(id: string): string | null;
4353
+ getNode(id: string): unknown;
4354
+ }
4355
+
4356
+ type Box = {
4357
+ x: number;
4358
+ y: number;
4359
+ width: number;
4360
+ height: number;
4361
+ };
4362
+ /** What `group.enter` reads: the node under a point and the tree above it. */
4363
+ interface EnterGroupOptions {
4364
+ /** The node under the point, before any group above it is considered. */
4365
+ pickHit: (world: WorldPoint) => string | null;
4366
+ tree: PressTargetTree;
4367
+ }
4368
+ /** What `group.leave` reads: where a group's box is. */
4369
+ interface LeaveGroupOptions {
4370
+ boxOf: (id: string) => Box | null;
4371
+ }
4372
+
4373
+ /** Id of the entry {@link createGroupEntryContribution} builds. */
4374
+ declare const GROUP_ENTRY_ID = "group.entry";
4375
+ /**
4376
+ * `group.enter` and `group.leave`, bound under any tool that leaves the gesture unclaimed. A
4377
+ * double-click on a body enters the group a press there would select, and declines where that is
4378
+ * no group, so text and path editing keep their double-click. Escape leaves one level, carrying
4379
+ * the phase `escape` does and declining with nothing entered, which leaves Escape to `escape`.
4380
+ * Leaving on a press is the select tool's ({@link GROUP_LEAVE_PRESS_BINDING}): under a drawing
4381
+ * tool a press outside the group draws into it.
4382
+ */
4383
+ declare function createGroupEntryContribution(opts: EnterGroupOptions & LeaveGroupOptions): Contribution;
4384
+ /** {@link createGroupEntryContribution} for the life of a canvas, reading its pickers live. */
4385
+ declare function useGroupEntryContribution(opts: EnterGroupOptions & LeaveGroupOptions): Contribution;
4386
+
4245
4387
  /** What `pickTopMostHit` ranks a hit list by: the tree, and a z signal where
4246
4388
  * the adapter has one. */
4247
4389
  interface PickTopMostHitAdapter {
@@ -4686,10 +4828,7 @@ interface UseEyedropperToolOptions {
4686
4828
  declare function useEyedropperTool(opts: UseEyedropperToolOptions): Tool;
4687
4829
 
4688
4830
  /** An endpoint of a line, in world coordinates. */
4689
- interface LinePoint {
4690
- x: number;
4691
- y: number;
4692
- }
4831
+ type LinePoint = WorldPoint;
4693
4832
  /**
4694
4833
  * Drag-to-draw line tool. The `drag` binding routes to `insertAction`, which
4695
4834
  * commits through the `insert` dep with `{ kind: 'line', a, b }` endpoints
@@ -4732,10 +4871,7 @@ interface UseLassoToolOptions extends UseLassoSelectOptions {
4732
4871
  declare function useLassoTool(options?: UseLassoToolOptions): Tool;
4733
4872
 
4734
4873
  /** A point in world coordinates. */
4735
- interface PolygonPoint {
4736
- x: number;
4737
- y: number;
4738
- }
4874
+ type PolygonPoint = WorldPoint;
4739
4875
  /** Options for `usePolygonTool`. */
4740
4876
  interface UsePolygonToolOptions extends InsertToolOptions {
4741
4877
  label?: string;
@@ -4762,10 +4898,7 @@ declare function usePolygonTool<TNode extends {
4762
4898
  }>(options?: UsePolygonToolOptions): Tool;
4763
4899
 
4764
4900
  /** A point in world coordinates. */
4765
- interface StarPoint {
4766
- x: number;
4767
- y: number;
4768
- }
4901
+ type StarPoint = WorldPoint;
4769
4902
  /** Options for `useStarTool`. */
4770
4903
  interface UseStarToolOptions extends InsertToolOptions {
4771
4904
  label?: string;
@@ -4852,10 +4985,7 @@ interface SliceScratch {
4852
4985
  declare function useSliceTool(options?: UseSliceToolOptions): Tool;
4853
4986
 
4854
4987
  /** A world-space point. */
4855
- interface MeasurePoint {
4856
- x: number;
4857
- y: number;
4858
- }
4988
+ type MeasurePoint = Point;
4859
4989
  /**
4860
4990
  * The offset from `start` to `end`, in world units. `dx` and `dy` are on the
4861
4991
  * world's own axes, where y grows downward; `angle` reads like a protractor
@@ -4929,10 +5059,10 @@ declare function createMeasurements(options: {
4929
5059
  layer: string;
4930
5060
  }): Measurements;
4931
5061
  /** The measurement nodes on `ms.layer`, oldest first. */
4932
- declare function measureIds(scene: Pick<Scene<unknown, string, unknown>, 'renderOrderNodes'>, ms: Pick<Measurements, 'layer'>): NodeId[];
5062
+ declare function measureIds(scene: Pick<Scene<unknown, string, unknown>, 'nodesOnLayer'>, ms: Pick<Measurements, 'layer'>): NodeId[];
4933
5063
  /** The measurement commands act on: the picked one while it is still in the
4934
5064
  * scene, else the newest. */
4935
- declare function currentMeasureId(scene: Pick<Scene<unknown, string, unknown>, 'renderOrderNodes' | 'get'>, ms: Pick<Measurements, 'layer' | 'picked'>): NodeId | null;
5065
+ declare function currentMeasureId(scene: Pick<Scene<unknown, string, unknown>, 'nodesOnLayer' | 'get'>, ms: Pick<Measurements, 'layer' | 'picked'>): NodeId | null;
4936
5066
 
4937
5067
  /** Options for `useMeasureTool`. */
4938
5068
  interface UseMeasureToolOptions {
@@ -5031,790 +5161,970 @@ type ChromeId = 'selection.outline' | 'selection.resize-handles' | 'selection.ro
5031
5161
  type VisibilityRules = Partial<Record<ChromeId, Condition | Rule>>;
5032
5162
 
5033
5163
  /**
5034
- * Promote a Rule tree to a fluent Condition.
5035
- *
5036
- * **Chain semantics: strict left-to-right.** No boolean precedence.
5037
- * `focused.or(hovering).and(selectionIs(1))` evaluates
5038
- * `((focused || hovering) && selectionIs(1))`. For grouped disjunction, use
5039
- * the top-level `or` / `and` / `not` helpers or name intermediates.
5040
- *
5041
- * Combinators flatten same-kind nesting on construction so `a.and(b).and(c)`
5042
- * produces `{ all: [a, b, c] }`.
5164
+ * The selection overlay's resize handles: their style, where the kit puts
5165
+ * them, and the commands that paint them.
5043
5166
  */
5044
- declare function cond(rule: Rule): Condition;
5045
- /** Inline-lambda escape hatch. Wraps the closure as a `when` rule node. */
5046
- declare function when(fn: (ctx: RuleCtx) => boolean): Condition;
5047
- /** `(a && b && c && ...)` — useful when chain mixing makes left-to-right
5048
- * semantics ambiguous. */
5049
- declare function and(...cs: (Condition | Rule)[]): Condition;
5050
- /** `(a || b || c || ...)` — preferred over `.or` chains when mixed with
5051
- * `.and` to make grouping explicit. */
5052
- declare function or(...cs: (Condition | Rule)[]): Condition;
5053
- /** `!c` — top-level negation. Most rules use `.andNot()` / `.orNot()`
5054
- * instead; this is for the lead-with-negation case. */
5055
- declare function not(c: Condition | Rule): Condition;
5056
- /** Always true. The fallback for any chrome id without a registered rule. */
5057
- declare const always: Condition;
5058
- /** Always false. Useful for "turn this chrome off entirely":
5059
- * `chromeVisibility={{ 'snap.guides': never }}`. */
5060
- declare const never: Condition;
5061
- /** Canvas surface currently focused. */
5062
- declare const focused: Condition;
5063
- /** Any action currently in flight (read: user is gesturing). */
5064
- declare const gesturing: Condition;
5065
- /** A path is currently in anchor-edit mode. */
5066
- declare const editingAnchors: Condition;
5067
- /** Active action's kind matches `kind` (e.g. `actionIs('move')`). */
5068
- declare const actionIs: (kind: string) => Condition;
5069
- /** Nothing selected. */
5070
- declare const selectionEmpty: Condition;
5071
- /** Exactly `n` items selected. */
5072
- declare const selectionIs: (n: number) => Condition;
5073
- /** At least `n` items selected. `selectionAtLeast(1)` is the common
5074
- * "something is selected" check. */
5075
- declare const selectionAtLeast: (n: number) => Condition;
5076
- /** Multi-mode handle behavior active (single shared union-bounds
5077
- * handle vs per-item handles). */
5078
- declare const multiActive: Condition;
5079
- /** Pointer is hovering some node. */
5080
- declare const hovering: Condition;
5081
- /** Pointer is hovering a node that is currently selected. */
5082
- declare const hoveringSelected: Condition;
5083
- /** Named modifier key currently held. */
5084
- declare const modifierHeld: (m: keyof ModifierState) => Condition;
5085
- /** View scale (uniform or geometric mean for non-uniform) is at least
5086
- * `z`. Useful for "hide hairline chrome at low zoom" rules. */
5087
- declare const zoomAtLeast: (z: number) => Condition;
5088
- /** Active mode equals `m`. */
5089
- declare const modeIs: (m: string) => Condition;
5090
- /** Active mode is one of `modes`. */
5091
- declare const modeIn: (modes: readonly string[]) => Condition;
5092
- /** Active mode is NOT `m`. */
5093
- declare const modeNot: (m: string) => Condition;
5094
- /** Active mode's `allows` includes capability `cap`. */
5095
- declare const capabilityIs: (cap: string) => Condition;
5096
- /** Active mode's `allows` includes ANY of `caps` (OR). */
5097
- declare const capabilityIn: (caps: readonly string[]) => Condition;
5098
- /** Active mode's `allows` includes ALL of `caps` (AND). */
5099
- declare const capabilityAll: (caps: readonly string[]) => Condition;
5100
- /** Active mode's `allows` does NOT include capability `cap`. */
5101
- declare const capabilityNot: (cap: string) => Condition;
5102
- /** Primary pointer is imprecise (touch, most styluses). Absent device
5103
- * profile → false. */
5104
- declare const coarsePointer: Condition;
5105
- /** Primary pointer can hover. Absent device profile → true. */
5106
- declare const canHover: Condition;
5167
+
5168
+ /** Handle visuals, as a consumer supplies them. */
5169
+ interface SelectionHandleStyle {
5170
+ size?: number;
5171
+ fill?: CommandFill;
5172
+ outline?: CommandStroke;
5173
+ }
5107
5174
 
5108
5175
  /**
5109
- * Kit-shipped defaults. Merged with the consumer's `chromeVisibility` map
5110
- * at resolve time; consumer entries take precedence per id.
5111
- *
5112
- * Gating is written in terms of **capabilities, not mode ids**. A
5113
- * capability rule keeps holding when a new mode is added that permits the
5114
- * same thing; a mode rule has to be found and edited every time.
5176
+ * The pose and box a selection's chrome is drawn around: precedence between
5177
+ * the in-flight overlays and the stored pose, a container's union over its
5178
+ * leaves, and the drawn box a scene supplies.
5115
5179
  */
5116
- declare const defaultVisibilityRules: VisibilityRules;
5117
5180
 
5181
+ /** Options for `composeSelectionPose`. */
5182
+ interface ComposeSelectionPoseOpts<TPose> {
5183
+ /** Move overlay; when present its `poses` map wins over everything else. */
5184
+ moveOverlay?: {
5185
+ poses: Map<string, TPose>;
5186
+ } | null;
5187
+ /**
5188
+ * Resize overlay; consulted only when move overlay does not own the id.
5189
+ * For container resize, `leafPoses` (when present) maps each leaf id under
5190
+ * the container to its overlay pose. If absent the container falls back to
5191
+ * stored leaf poses.
5192
+ */
5193
+ resizeOverlay?: {
5194
+ id: string;
5195
+ currentPose: TPose;
5196
+ leafPoses?: Map<string, TPose>;
5197
+ } | null;
5198
+ /** Fallback pose lookup (typically the stored/committed pose). */
5199
+ getStoredPose: (id: string) => TPose;
5200
+ /** How to read poses. Default `AUTO_POSE_DESCRIPTOR`. */
5201
+ poseDescriptor?: PoseDescriptor<TPose>;
5202
+ /** Walk a container's direct children (e.g. `scene.childrenOf`). With
5203
+ * `isContainer`, a selected container resolves to the union AABB of its
5204
+ * transitive leaf poses instead of its own stored pose. */
5205
+ getChildren?: (id: string) => readonly string[];
5206
+ /** True when `id` is a structural container. */
5207
+ isContainer?: (id: string) => boolean;
5208
+ /** The nodes behind the ids. With it, a container's union takes each leaf
5209
+ * as drawn, stroke included (`drawnBoundsOf`); without, its pose box. */
5210
+ scene?: DrawnBoundsScene;
5211
+ /** View scale a screen-pixel stroke is resolved at. Default 1. */
5212
+ viewScale?: () => number | Scale2;
5213
+ }
5118
5214
  /**
5119
- * Build the per-frame visibility check: consumer rules merged on top of
5120
- * the kit defaults, evaluated against `ctx`.
5121
- *
5122
- * `ChromeCtx` is the legacy shape; surfaces still on it get `mode='normal'`
5123
- * and `DEFAULT_ALLOWED_CAPABILITIES` filled in here, so a caller that never
5124
- * opted into modality behaves exactly like one sitting in normal mode.
5215
+ * Build a pose resolver for a selection. Precedence per id:
5216
+ * move overlay > resize overlay > stored. When `getChildren`/`isContainer`
5217
+ * are supplied and the id resolves to a container, the resolver returns the
5218
+ * union AABB of all transitive leaf poses (each leaf still subject to the
5219
+ * precedence rules). Containers with no leaves resolve to `null`.
5125
5220
  */
5126
- declare function resolveVisibility(consumer: VisibilityRules | undefined, ctx: ChromeCtx | RuleCtx): (id: ChromeId) => boolean;
5221
+ declare function composeSelectionPose<TPose>(opts: ComposeSelectionPoseOpts<TPose>): (id: string) => TPose | null;
5127
5222
 
5128
5223
  /**
5129
- * Pure assembler for {@link ChromeCtx}. Sources are passed as plain values
5130
- * rather than the live objects they come from, which keeps `chrome-caps`
5131
- * from depending on React or the dispatcher's concrete type.
5224
+ * Selection overlay primitives — render layers for drawing selection
5225
+ * outlines and resize handles.
5226
+ *
5227
+ * **Pose shape:** TPose is generic; callers pass `poseDescriptor` for poses
5228
+ * `AUTO_POSE_DESCRIPTOR` can't read. Container ids reduce via `unionAABB`
5229
+ * over the projected AABBs.
5132
5230
  */
5133
5231
 
5134
- /** The pieces of live canvas state a `ChromeCtx` is assembled from. */
5135
- interface BuildChromeCtxArgs {
5136
- focused: boolean;
5137
- selection: readonly NodeId[];
5138
- multiActive: boolean;
5139
- modifiers: ModifierState;
5140
- action: {
5141
- kind: string | null;
5142
- id: string | null;
5143
- };
5144
- hover: NodeId | null;
5145
- view: View;
5146
- }
5147
- /** Gather the current canvas state into the context that chrome-visibility
5148
- * rules are evaluated against. Rebuilt per frame. */
5149
- declare function buildChromeCtx(args: BuildChromeCtxArgs): ChromeCtx;
5150
-
5151
- /** Last-hovered NodeId for chrome-caps rules. */
5152
-
5153
- /** Options for `useHoverTracking`. */
5154
- interface UseHoverTrackingArgs {
5155
- /** Topmost id under a client point, or null. */
5156
- nodeAtClientPoint: (clientX: number, clientY: number) => {
5157
- id: NodeId;
5158
- } | null;
5159
- enabled?: boolean;
5160
- /** Called when the hovered id changes, `null` once the pointer is over no node or has left. */
5161
- onChange?: (id: NodeId | null) => void;
5162
- }
5163
- /** What `useHoverTracking` returns. Both members keep their identity. */
5164
- interface HoverTracking {
5165
- /** The node the pointer is over, or null. */
5166
- getHover: () => NodeId | null;
5167
- /** Hand it the element to track, or null to stop: a callback ref, so an
5168
- * element that mounts after the hook is tracked from the moment it arrives. */
5169
- canvasRef: (element: HTMLElement | null) => void;
5232
+ /** Options every selection layer shares. `getSelection` and `getPose` are
5233
+ * declared on {@link SelectionOverlayLayerOpts}, which makes both optional —
5234
+ * omitted, they come off the draw envelope. */
5235
+ interface SelectionLayerCommon<TPose> {
5236
+ /** How to read poses. Default `AUTO_POSE_DESCRIPTOR`. */
5237
+ poseDescriptor?: PoseDescriptor<TPose>;
5238
+ /** Walk a container's direct children (e.g. `scene.childrenOf`). When
5239
+ * supplied with `isContainer`, any id that resolves to a container is
5240
+ * rendered using the union bounds of all its transitive leaves. */
5241
+ getChildren?: (id: string) => readonly string[];
5242
+ /** True when `id` is a structural container. */
5243
+ isContainer?: (id: string) => boolean;
5244
+ /** The nodes behind the ids `getPose` answers for. With it, a stroked
5245
+ * node's chrome sits on its stroke (`drawnBoundsOf`); without, on its
5246
+ * pose box. Ignored when bounds come off the draw envelope. */
5247
+ scene?: DrawnBoundsScene;
5170
5248
  }
5171
- /** Track which node the pointer is over. Returns a getter rather than state,
5172
- * so a pointer move does not re-render the component. Cleared on
5173
- * `pointerleave`. */
5174
- declare function useHoverTracking(args: UseHoverTrackingArgs): HoverTracking;
5175
-
5176
- /** `<SceneCanvas geometry>`: hit-test and bounds overrides, consumed by the
5177
- * internal select tool. Ignored if the consumer passes their own `tools`. */
5178
- interface SceneCanvasGeometry {
5179
- /** Hit-test override. Return the topmost id, the full back-to-front hit
5180
- * stack (`string[]`), or `null` for empty space. The stack form lets a
5181
- * consumer with domain overlap ordering (e.g. children over their
5182
- * container) feed the kit's `pickTopMostHit` the true order instead of
5183
- * pre-collapsing to one id. Matches `Canvas`'s `pickEvery` shape. */
5184
- pickEvery?: (worldX: number, worldY: number) => string | string[] | null;
5185
- boundsOf?: (id: string) => FramedBox | null;
5186
- /**
5187
- * What "the pointer is on this node" means for the default body-pick.
5188
- *
5189
- * - `'pose'` — the node's pose rect, rotation honored.
5190
- * - `'shape'` (default) — the pose rect as a pre-filter, then the ink the painter
5191
- * actually lays down: its silhouette filled or not per the painter's `ink`, plus
5192
- * its outline widened by the stroke half-width and `pickTolerancePx`.
5193
- *
5194
- * Painters with no silhouette keep the pose-rect answer either way. Ignored when
5195
- * `pickEvery` is supplied: that override owns the test.
5196
- */
5197
- picking?: 'pose' | 'shape';
5249
+ /** Options for `createSelectionOutlineLayer`. The overlay layer's options
5250
+ * minus the handle visuals — the two run the same body. */
5251
+ type SelectionOutlineLayerOpts<TPose> = Omit<SelectionOverlayLayerOpts<TPose>, 'handles' | 'handlesOf' | 'resizeHandles' | 'rotationHandle'>;
5252
+ /** Options for `createSelectionHandlesLayer`. The overlay layer's options
5253
+ * minus the outline stroke — the two run the same body. */
5254
+ type SelectionHandlesLayerOpts<TPose> = Omit<SelectionOverlayLayerOpts<TPose>, 'outline'>;
5255
+ /** Options for `createSelectionOverlayLayer`. */
5256
+ interface SelectionOverlayLayerOpts<TPose> extends SelectionLayerCommon<TPose> {
5198
5257
  /**
5199
- * Grab slop around a shape's outline, in **screen** pixels, so the target keeps
5200
- * its apparent size at any zoom. Default 4. It widens the outline test under
5201
- * `picking: 'shape'` and grows the pose-rect pre-filter so those outline hits
5202
- * survive it. Set `0` for exact geometry.
5258
+ * Which ids to draw chrome for. Omit to take them from the `ChromeState` on
5259
+ * the draw envelope, which is what makes one canvas's several views each
5260
+ * outline their own selection — the layer is shared, the envelope is not.
5203
5261
  */
5204
- pickTolerancePx?: number;
5262
+ getSelection?: () => readonly NodeId[];
5205
5263
  /**
5206
- * Whether a shape's box includes its stroke as drawn — align, joins, and
5207
- * markers counted — or is the pose's geometry alone. Default `true`. The
5208
- * selection outline and handles sit on it, resize keeps the stroke's
5209
- * outer edge under the pointer without scaling the stroke, and rotate,
5210
- * flip, align, and distribute measure it. Stored geometry is unaffected.
5264
+ * Resolve an id to the pose to draw chrome around. Return null to skip an
5265
+ * id. Omit to take bounds from the same envelope `getSelection` omitted
5266
+ * takes ids from.
5267
+ *
5268
+ * Takes `string` rather than `NodeId` because the container-aware resolver
5269
+ * walks expanded leaf ids via `getChildren`, which is generic over strings.
5211
5270
  */
5212
- boundsIncludeStroke?: boolean;
5271
+ getPose?: (id: string) => TPose | null;
5272
+ outline?: CommandStroke & {
5273
+ pad?: number;
5274
+ };
5275
+ /** Pass `false` to render outlines only. */
5276
+ handles?: SelectionHandleStyle | false;
5277
+ /** Where to paint handles, in the bounds' own frame. Replaces the kit's
5278
+ * layout, `resizeHandles` included. */
5279
+ handlesOf?: (bounds: FramedBox) => {
5280
+ x: number;
5281
+ y: number;
5282
+ }[];
5283
+ /** The layout the resize affordance hits by: its `hitRadiusPx`, never
5284
+ * `handles.size`, decides which edge handles are painted. Default: edges on,
5285
+ * at the kit's default hit radius. */
5286
+ resizeHandles?: Partial<ResizeHandleLayout>;
5287
+ /** Draw a rotate badge above the selection's top edge. `true` places it at
5288
+ * the default offset; `distance` sets the offset in screen pixels. Off by
5289
+ * default. */
5290
+ rotationHandle?: boolean | {
5291
+ distance?: number;
5292
+ };
5293
+ /** Optional separate id list for the per-item outline pass, for a
5294
+ * multi-selection whose handle pass works against a synthetic union id
5295
+ * (e.g. `MULTI_RESIZE_TARGET_ID`) while each real member is outlined.
5296
+ * When omitted, the outline pass uses the handle pass's ids. */
5297
+ getOutlineIds?: () => readonly NodeId[];
5298
+ /** Optional set of ids to suppress entirely — both outline and handles
5299
+ * are skipped. */
5300
+ getSuppressedIds?: () => ReadonlySet<string>;
5213
5301
  }
5302
+ /**
5303
+ * `RenderLayer` that draws selection outlines only. Stack alongside
5304
+ * `createSelectionHandlesLayer` (or use `createSelectionOverlayLayer`, which
5305
+ * runs both passes in one layer) when both are wanted.
5306
+ */
5307
+ declare function createSelectionOutlineLayer<TPose>(opts: SelectionOutlineLayerOpts<TPose>): RenderLayer<unknown>;
5308
+ /**
5309
+ * `RenderLayer` that draws selection handles only. Stack on top of
5310
+ * `createSelectionOutlineLayer` (handles render on top of the outline).
5311
+ */
5312
+ declare function createSelectionHandlesLayer<TPose>(opts: SelectionHandlesLayerOpts<TPose>): RenderLayer<unknown>;
5313
+ /**
5314
+ * Draws outlines then handles in a single layer. Exactly equivalent to
5315
+ * stacking `createSelectionOutlineLayer` and `createSelectionHandlesLayer` —
5316
+ * all three run the same body. Pass `handles: false` to render outlines only.
5317
+ */
5318
+ declare function createSelectionOverlayLayer<TPose>(opts: SelectionOverlayLayerOpts<TPose>): RenderLayer<unknown>;
5214
5319
 
5215
- /** Minimal hit descriptor passed to `onDoubleClick`. Contains the fields
5216
- * modality dispatch needs; extends as the kit's `Hit` type evolves. */
5217
- interface SceneCanvasHit {
5218
- id: string;
5219
- kind: string;
5220
- }
5221
- /** `<SceneCanvas>`'s props for what the pointer can reach and what a click names. */
5222
- interface SceneCanvasPointerProps {
5223
- /**
5224
- * Per-id pointer-interactivity predicate: an id it returns `false` for is excluded from
5225
- * hit-test results. Typical use: suppressing pointer events for dimmed nodes.
5226
- */
5227
- isPointerInteractive?: (id: string) => boolean;
5228
- /**
5229
- * The entered group: the group a press resolves inside of, and which a double-click drills down
5230
- * from. Nodes outside it take no hits. Pass one from `useEnteredGroup(scene)` to read or drive it
5231
- * from outside the canvas, as `selection` is passed; without it the canvas keeps its own.
5232
- */
5233
- enteredGroup?: EnteredGroupApi;
5234
- /**
5235
- * Called when the user double-clicks the canvas, with the hit node (id + kind) at that
5236
- * position, or `null` on empty canvas. A notification, not a binding: it fires whatever the
5237
- * double-click does. Entering a mode on the node belongs to `modeTriggers` instead.
5238
- */
5239
- onDoubleClick?: (hit: SceneCanvasHit | null) => void;
5240
- /** Called on every click — a press and release without a drag — with the
5241
- * node under it, or `null` on empty canvas. Fires after the click's own
5242
- * behavior, so a pick it made is already in the selection, and fires
5243
- * again on a node that was already picked. */
5244
- onClick?: (hit: SceneCanvasHit | null) => void;
5245
- /** Called when the topmost pickable node under the pointer changes, with
5246
- * its id, and with `null` once there is none or the pointer leaves. */
5247
- onHover?: (id: string | null) => void;
5248
- }
5320
+ /**
5321
+ * The scene slot: an adapter's tree as render layers, one per scene layer.
5322
+ */
5249
5323
 
5250
- /** The `<SceneCanvas>` props that change the actions and bindings a canvas has. */
5251
- interface SceneCanvasActionProps {
5324
+ /** Scene slot config — describes how to draw one object with its effective pose. */
5325
+ interface SceneSlotConfig<TNode extends {
5326
+ id: string;
5327
+ }, TPose> {
5328
+ /** Paint these, in this order, in place of the adapter's tree: one flat run with no
5329
+ * scene layers, no container clips, and no pose composition. */
5330
+ objects?: TNode[];
5331
+ /** The pose an object is painted at. Defaults to `adapter.getPose(obj.id)`. `<SceneCanvas>`
5332
+ * hands it each node as the scene shows it, its `pose` an override's or a derived one,
5333
+ * and carries an override's `path` into the box it answers; return a pose placed from
5334
+ * `obj.pose`, or a drag in flight and a rig's motion do not show in this view. */
5335
+ toPose?: (obj: TNode) => TPose;
5336
+ /** Draw a single object as a `DrawCommand` tree. `ctx` carries a derived
5337
+ * node's path: `<SceneCanvas>` resolves it from the scene, and
5338
+ * `buildSceneLayer` called without one from its adapter. */
5339
+ drawOne: (obj: TNode, pose: TPose, view: View, ctx?: NodePaintCtx) => DrawCommand[];
5340
+ /** The path a container derives from its dependencies' poses, for the clip
5341
+ * it imposes on its subtree — `drawOne`'s `ctx` carries the derived path a
5342
+ * node *paints*, this one the clip it *imposes*. A scene-aware caller
5343
+ * supplies it; left out, both are resolved off the adapter. */
5344
+ derivedPathOf?: (obj: TNode, pose: TPose) => Path | null;
5345
+ /** Default ghost alpha for the move-overlay slot. Default 0.85. */
5346
+ ghostAlpha?: number;
5347
+ /** Per-id alpha multiplier. A node's emitted `DrawCommand[]` is wrapped in a
5348
+ * `{ kind: 'group', alpha }` when the returned value is not 1. */
5349
+ alphaFor?: (id: string) => number;
5252
5350
  /**
5253
- * Tune actions on this canvas without restating them, keyed by action id:
5254
- * `params` every invocation starts from, and `bindings` added beside the
5255
- * action's own. A tuning applies to whichever descriptor holds the id, a
5256
- * preset's or a tool's. Pass a stable object; a params thunk is read on
5257
- * every call. See the core README ("Tuning an action").
5351
+ * Post-processor for the scene slot's emitted commands: called with the final
5352
+ * world-space `DrawCommand[]` each time a scene canvas layer draws (after per-node
5353
+ * rotation wrapping and `alphaFor`), once per layer when the slot is split into
5354
+ * `scene:<layerId>` layers. Its return value replaces the array handed to the renderer.
5355
+ *
5356
+ * Commands are world-space — `drawLayers` applies the view transform afterward. Clip
5357
+ * nesting is capped at 7 levels; a wrapping group with `clip` consumes one. The
5358
+ * move-overlay ghost (drag preview) is not post-processed.
5258
5359
  */
5259
- tune?: ActionTunings;
5360
+ postProcess?: (cmds: DrawCommand[], view: View, dims: Dims) => DrawCommand[];
5260
5361
  /**
5261
- * Replace or remove bindings by binding id, on actions and contributions
5262
- * alike: a route string (`'[*:*] keyDown(=) +mod'`), a spec (`key('Mod+=')`),
5263
- * or `null` to unbind. Pass a stable object.
5362
+ * Skip what cannot reach the view. A node `paintBounds` places outside the
5363
+ * `dims` rectangle under `view` is not painted at all; then, after
5364
+ * `postProcess`, `cullDrawCommands` drops any remaining command that cannot
5365
+ * reach it — see there for what it can and cannot bound. So `postProcess`
5366
+ * sees an empty group where a culled node would have painted.
5367
+ *
5368
+ * Off by default because it makes the layer's world-space output depend on
5369
+ * the view: anything that draws this layer once and shows the result under
5370
+ * another view — a cache keyed without `view`, a consumer re-wrapping the
5371
+ * commands — would show the first view's cull.
5264
5372
  */
5265
- bindingOverrides?: BindingOverrides;
5373
+ cull?: boolean;
5266
5374
  /**
5267
- * Replace, add or mute whole action descriptors. Pass `null` to disable
5268
- * all defaults. To change a built-in's params or add a key, use `tune`.
5375
+ * Where `drawOne`'s output for a node can reach, in the frame it paints in
5376
+ * — before the pose rotation the slot wraps it in. `null` for a node it
5377
+ * cannot bound cheaply. Read only under `cull`, which skips `drawOne` for a
5378
+ * node whose box misses the view, so it must enclose everything `drawOne`
5379
+ * paints: a box too small makes a node vanish before it leaves the screen.
5380
+ *
5381
+ * `<SceneCanvas>` supplies `defaultPaintBounds` while `drawOne` is
5382
+ * `defaultDrawOne`. Omit it with any other `drawOne` and culling only
5383
+ * trims commands after painting.
5269
5384
  */
5270
- actions?: ActionsProp;
5385
+ paintBounds?: PaintBoundsFn<TNode, TPose>;
5271
5386
  }
5272
5387
 
5273
5388
  /**
5274
- * Turns pasted or dropped plain text into a text node sized to the string. Registered nowhere by
5275
- * default: a canvas opts in with `ingestion={{ handlers: [kitTextHandler] }}`.
5389
+ * The draw commands path edit paints for the open path, in screen space: its
5390
+ * outline, then each anchor's handles and marker.
5276
5391
  */
5277
- declare const kitTextHandler: ContentHandlerEntry;
5278
5392
 
5279
- /** Options for {@link openFilePicker}. */
5280
- interface OpenFilePickerOptions {
5281
- /** `<input accept>` filter, e.g. `'image/*'` or `'.csv,text/csv'`. */
5282
- accept?: string;
5283
- /** Allow multi-select. Default false. */
5284
- multiple?: boolean;
5393
+ /** Appearance of the outline and of the anchor and handle markers. */
5394
+ interface PathEditingOverlayStyle {
5395
+ anchorSizePx?: number;
5396
+ handleDotRadiusPx?: number;
5397
+ anchorFill?: string;
5398
+ anchorStroke?: string;
5399
+ handleStroke?: string;
5400
+ /** Fill of the control-point circle. Defaults to the handleStroke color
5401
+ * at 50% alpha. */
5402
+ handleDotFill?: string;
5403
+ /** Fill of a selected anchor square. Defaults to the anchor stroke color. */
5404
+ anchorFillSelected?: string;
5405
+ /** The open path's outline, drawn over its own fill and stroke so the path
5406
+ * shows however its paint and its markers cover it. */
5407
+ outlineStroke?: string;
5408
+ outlineWidthPx?: number;
5409
+ /** Radius of the dot an unselected anchor shrinks to where anchors sit
5410
+ * closer together on screen than a marker is wide. */
5411
+ denseDotRadiusPx?: number;
5412
+ /** Stroke of the marquee rubber band. */
5413
+ marqueeStroke?: string;
5414
+ /** Fill of the marquee rubber band. */
5415
+ marqueeFill?: string;
5285
5416
  }
5286
- /**
5287
- * Show the browser's file picker and resolve with what the user chose —
5288
- * empty when they cancel. Must be called from a user gesture (a click
5289
- * handler): browsers block programmatic `input.click()` otherwise. Pairs
5290
- * with `CanvasExtensionApi.ingest`:
5291
- *
5292
- * ```ts
5293
- * const files = await openFilePicker({ accept: 'image/*', multiple: true });
5294
- * canvasRef.current?.ingest(files);
5295
- * ```
5296
- */
5297
- declare function openFilePicker(opts?: OpenFilePickerOptions): Promise<File[]>;
5417
+ /** The path-edit overlay's look where a {@link PathEditingOverlayStyle} leaves a field out. */
5418
+ declare const DEFAULT_OVERLAY_STYLE: Required<PathEditingOverlayStyle>;
5298
5419
 
5299
5420
  /**
5300
- * Ghosts of removed nodes: what a pose transition shows leaving after the
5301
- * scene has let a node go. A ghost is not a scene node, so picking,
5302
- * selection and history never see it; it lives here until its glide ends.
5421
+ * Screen-space render layer for path-editing chrome — the open path's
5422
+ * outline, anchor markers, tangent lines, and control-point dots for a
5423
+ * polygon path that is the current edit target, under them whatever marks
5424
+ * its path-edit extensions draw. Marker sizes stay constant regardless of zoom.
5303
5425
  */
5304
5426
 
5305
- /** A removed node as its ghost shows it now. */
5306
- interface ShownDeparture<TPose, TNode> {
5307
- removal: PoseRemoval<TPose, TNode>;
5308
- pose: TPose;
5309
- alpha: number;
5427
+ /** Options for `createPathEditingOverlayLayer`. Everything is read per frame,
5428
+ * so the layer follows a changing edit target without being rebuilt. */
5429
+ interface CreatePathEditingOverlayLayerOptions {
5430
+ /** Returns the id of the polygon currently in anchor-edit mode, or null
5431
+ * when no node is being edited. */
5432
+ getEditingId(): string | null;
5433
+ /**
5434
+ * Returns the pose for an id, or null if the node has been deleted.
5435
+ * Non-polygon poses are tolerated (the layer no-ops on them).
5436
+ *
5437
+ * `previews` are the drawing view's in-flight preview surfaces, so an
5438
+ * anchor dragged in one panel does not move in the others. Resolve against
5439
+ * them before falling back to the committed pose.
5440
+ *
5441
+ * `view` is the drawing view's camera. Answer in its world: a node whose
5442
+ * layer is a parallax plane stores its path in the plane's.
5443
+ */
5444
+ getPose(id: string, previews: readonly GesturePreviewSource[], view: View): Path | null;
5445
+ /** The marker of each anchor, by flat index, for a node whose path was
5446
+ * drawn from a form (`PathRepresentation.anchorMarkers`); null, or an
5447
+ * anchor with none, draws a square. Resolve against `previews` as
5448
+ * `getPose` does. */
5449
+ getAnchorMarkers?(id: string, previews: readonly GesturePreviewSource[]): readonly (AnchorMarkerShape | null)[] | null;
5450
+ /** Flat indices of the selected anchors. Selected anchors render
5451
+ * filled; unselected ones hollow. */
5452
+ getSelectedAnchors?(): ReadonlySet<number>;
5453
+ /** In-flight anchor-marquee rect in world coords, or null. Drawn as a
5454
+ * rubber band while `marqueeAnchorsAction` is dragging. */
5455
+ getMarquee?(view: View): {
5456
+ x: number;
5457
+ y: number;
5458
+ width: number;
5459
+ height: number;
5460
+ } | null;
5461
+ /** The edited node's committed pose and data, which extensions' marks read. */
5462
+ getNode?(id: string): {
5463
+ pose: unknown;
5464
+ data: unknown;
5465
+ layer?: string;
5466
+ } | null;
5467
+ /** The path-edit extensions whose marks are drawn, in order. */
5468
+ getExtensions?(): readonly PathEditExtension[];
5469
+ /** The selected extension mark, or null. */
5470
+ getSelectedMark?(): PathEditMark | null;
5471
+ /** Optional styling overrides. */
5472
+ style?: PathEditingOverlayStyle;
5310
5473
  }
5311
- /** The ghosts one canvas shows. */
5312
- interface Departures<TPose, TNode> {
5313
- /** See `removal` off from where it was shown toward `exit` of that pose,
5314
- * fading out, through `transition`. Does nothing for a transition with no
5315
- * `over`, which cannot carry a node the scene no longer holds. */
5316
- leave(removal: PoseRemoval<TPose, TNode>, exit: (pose: TPose) => TPose, transition: ReflowTransition<TPose>): void;
5317
- /** Drop `id`'s ghost — its node is back — and answer where it was shown. */
5318
- recall(id: string): TPose | undefined;
5319
- shown(): ShownDeparture<TPose, TNode>[];
5320
- /** Hear each frame a ghost moves, and each one that comes or goes. */
5321
- subscribe(listener: () => void): () => void;
5322
- dispose(): void;
5474
+ /** Render layer that draws the outline and the anchors and control handles
5475
+ * of the path currently being anchor-edited. Draws nothing when no path is
5476
+ * being edited. */
5477
+ declare function createPathEditingOverlayLayer(opts: CreatePathEditingOverlayLayerOptions): RenderLayer<unknown>;
5478
+
5479
+ /** Standard slot names — render in this canonical order.
5480
+ * `cellHighlight` is not an anchor for custom layers: it sits between the
5481
+ * grid and the scene, so anchor to one of those. */
5482
+ /** @internal */
5483
+ declare const STANDARD_SLOTS: readonly ["grid", "cellHighlight", "scene", "selectionOverlay"];
5484
+ /** Names of the slots `<Canvas>` supports out of the box (excluding the implicit cell-highlight overlay). */
5485
+ type StandardSlotName = Exclude<(typeof STANDARD_SLOTS)[number], 'cellHighlight'>;
5486
+ /** Custom layer entry — any key not in `STANDARD_SLOTS`. The presence of
5487
+ * `.layer` discriminates this from a slot config. */
5488
+ interface CustomLayerEntry {
5489
+ layer: RenderLayer<unknown>;
5490
+ /** Insert immediately after the named standard slot or another custom-layer key. */
5491
+ after?: StandardSlotName | (string & {});
5492
+ /** Insert immediately before the named standard slot or another custom-layer key. */
5493
+ before?: StandardSlotName | (string & {});
5323
5494
  }
5324
- /** An empty set of ghosts, for `bindPoseTransition` to fill and a layer to
5325
- * draw; `usePoseTransition` makes one per canvas. */
5326
- declare function createDepartures<TPose, TNode>(): Departures<TPose, TNode>;
5495
+ /** Selection-overlay slot config — passed through to `createSelectionOverlayLayer`,
5496
+ * minus the `getSelection`/`getPose` the canvas wires automatically and the
5497
+ * `resizeHandles` it takes from the hit-test, so the two cannot disagree. */
5498
+ type SelectionOverlaySlotConfig<TPose> = Omit<SelectionOverlayLayerOpts<TPose>, 'getSelection' | 'getPose' | 'resizeHandles'> & {
5499
+ /** Override the auto-wired pose lookup (overlay-aware → adapter fallback). */
5500
+ poseById?: (id: string) => TPose | null;
5501
+ };
5502
+ /** Path-edit overlay slot config: how `<SceneCanvas>` draws the chrome of the
5503
+ * path whose anchors are being edited. */
5504
+ interface PathEditingOverlaySlotConfig {
5505
+ /** Anchor and handle marker overrides. */
5506
+ style?: PathEditingOverlayStyle;
5507
+ }
5508
+ /** Per-slot config union. The key narrows it in practice. */
5509
+ type StandardSlotConfig<TNode extends {
5510
+ id: string;
5511
+ }, TPose> = SceneSlotConfig<TNode, TPose> | SelectionOverlaySlotConfig<TPose> | PathEditingOverlaySlotConfig;
5512
+ /** What may fill one of the canvas's named layer slots: a config the canvas
5513
+ * builds the layer from, a pre-built layer, or `null` to leave the slot
5514
+ * empty. */
5515
+ type LayerSlotValue<TNode extends {
5516
+ id: string;
5517
+ }, TPose> = StandardSlotConfig<TNode, TPose> | CustomLayerEntry | null;
5518
+ /** The canvas's render stack, as named slots. The standard slots (grid,
5519
+ * scene, selection overlay, cell highlight) fix where a layer sits in the
5520
+ * stack; scene and selection overlay can be configured, and every one can be
5521
+ * given a layer of your own or switched off. Further keys add custom layers.
5522
+ * `TSceneSlot` is what the scene slot accepts: `<SceneCanvas>` takes a
5523
+ * partial config and fills the rest from its defaults. */
5524
+ type LayersMap<TNode extends {
5525
+ id: string;
5526
+ }, TPose, TSceneSlot = SceneSlotConfig<TNode, TPose>> = {
5527
+ /** Grid slot, beneath the scene. Takes a pre-built layer (`{ layer }`) —
5528
+ * e.g. `createGridLayer` from `@weasel-js/guides` — or `null`. */
5529
+ grid?: CustomLayerEntry | null;
5530
+ /** Scene slot: the config `<SceneCanvas>` builds its layers from, a
5531
+ * pre-built layer that paints the scene in their place, or `null`. A
5532
+ * pre-built layer gets no ghost of a node in flight, which needs `drawOne`. */
5533
+ scene?: TSceneSlot | CustomLayerEntry | null;
5534
+ /** Selection-overlay slot: the config `<SceneCanvas>` builds the layer
5535
+ * from, a pre-built layer that paints in its place, or `null` for no
5536
+ * selection chrome. */
5537
+ selectionOverlay?: SelectionOverlaySlotConfig<TPose> | CustomLayerEntry | null;
5538
+ /** Cell-highlight overlay slot, drawn immediately after the grid. Takes a
5539
+ * pre-built layer (`{ layer }`) — e.g. `createCellHighlightLayer` from
5540
+ * `@weasel-js/guides` — or `null`. */
5541
+ cellHighlight?: CustomLayerEntry | null;
5542
+ /** `<SceneCanvas>`'s anchor-editing overlay, above the selection overlay:
5543
+ * the config it builds the layer from, a pre-built layer, or `null`. */
5544
+ pathEditingOverlay?: PathEditingOverlaySlotConfig | CustomLayerEntry | null;
5545
+ } & {
5546
+ [customKey: string]: LayerSlotValue<TNode, TPose> | TSceneSlot | undefined;
5547
+ };
5548
+ /** The scene slot once built: its canvas layers, bottom first. Each `key` is
5549
+ * an anchor a custom layer can name (`scene`, or `scene:<layerId>`). */
5550
+ interface SceneSlotLayers {
5551
+ layers: ReadonlyArray<{
5552
+ key: string;
5553
+ layer: RenderLayer<unknown>;
5554
+ }>;
5555
+ }
5556
+ /** What `<Canvas>` composes: a {@link LayersMap} with every slot already a
5557
+ * layer. `<SceneCanvas>` builds one from its `layers` prop. */
5558
+ type CanvasLayers = {
5559
+ grid?: CustomLayerEntry | null;
5560
+ cellHighlight?: CustomLayerEntry | null;
5561
+ scene?: SceneSlotLayers | null;
5562
+ selectionOverlay?: CustomLayerEntry | null;
5563
+ } & {
5564
+ [customKey: string]: CustomLayerEntry | SceneSlotLayers | null | undefined;
5565
+ };
5327
5566
 
5328
5567
  /**
5329
- * Which pose writes a canvas glides, and through what: `<SceneCanvas
5330
- * poseTransition>`. The transition is the kind `reflowTransition` takes, and
5331
- * one object can serve both.
5568
+ * Promote a Rule tree to a fluent Condition.
5569
+ *
5570
+ * **Chain semantics: strict left-to-right.** No boolean precedence.
5571
+ * `focused.or(hovering).and(selectionIs(1))` evaluates
5572
+ * `((focused || hovering) && selectionIs(1))`. For grouped disjunction, use
5573
+ * the top-level `or` / `and` / `not` helpers or name intermediates.
5574
+ *
5575
+ * Combinators flatten same-kind nesting on construction so `a.and(b).and(c)`
5576
+ * produces `{ all: [a, b, c] }`.
5332
5577
  */
5333
- interface PoseTransitionSeat<TPose> {
5334
- /** Shows each glide through a pose override; writes nothing. */
5335
- transition: ReflowTransition<TPose>;
5336
- /** Whether `write` glides. Default {@link glidesByDefault}. */
5337
- glides?: (write: PoseWrite<TPose>) => boolean;
5338
- /** Where a node the scene adds is first shown, given the pose it was added
5339
- * at. Absent, an added node appears in place. */
5340
- enter?: (pose: TPose) => TPose;
5341
- /** Where a node the scene removes is seen off to, given the pose it was
5342
- * shown at: a ghost of it glides there fading out, drawn but never picked,
5343
- * selected or recorded. Absent, a removed node vanishes. Needs a
5344
- * transition from `useAnimatedReflow` or `createReflowTransition`. */
5345
- exit?: (pose: TPose) => TPose;
5346
- /** Whether a removal is seen off through `exit`. Default: every one but
5347
- * an untracked removal. */
5348
- exits?: (removal: PoseRemoval<TPose>) => boolean;
5349
- }
5578
+ declare function cond(rule: Rule): Condition;
5579
+ /** Inline-lambda escape hatch. Wraps the closure as a `when` rule node. */
5580
+ declare function when(fn: (ctx: RuleCtx) => boolean): Condition;
5581
+ /** `(a && b && c && ...)` — useful when chain mixing makes left-to-right
5582
+ * semantics ambiguous. */
5583
+ declare function and(...cs: (Condition | Rule)[]): Condition;
5584
+ /** `(a || b || c || ...)` — preferred over `.or` chains when mixed with
5585
+ * `.and` to make grouping explicit. */
5586
+ declare function or(...cs: (Condition | Rule)[]): Condition;
5587
+ /** `!c` — top-level negation. Most rules use `.andNot()` / `.orNot()`
5588
+ * instead; this is for the lead-with-negation case. */
5589
+ declare function not(c: Condition | Rule): Condition;
5590
+ /** Always true. The fallback for any chrome id without a registered rule. */
5591
+ declare const always: Condition;
5592
+ /** Always false. Useful for "turn this chrome off entirely":
5593
+ * `chromeVisibility={{ 'snap.guides': never }}`. */
5594
+ declare const never: Condition;
5595
+ /** Canvas surface currently focused. */
5596
+ declare const focused: Condition;
5597
+ /** Any action currently in flight (read: user is gesturing). */
5598
+ declare const gesturing: Condition;
5599
+ /** A path is currently in anchor-edit mode. */
5600
+ declare const editingAnchors: Condition;
5601
+ /** Active action's kind matches `kind` (e.g. `actionIs('move')`). */
5602
+ declare const actionIs: (kind: string) => Condition;
5603
+ /** Nothing selected. */
5604
+ declare const selectionEmpty: Condition;
5605
+ /** Exactly `n` items selected. */
5606
+ declare const selectionIs: (n: number) => Condition;
5607
+ /** At least `n` items selected. `selectionAtLeast(1)` is the common
5608
+ * "something is selected" check. */
5609
+ declare const selectionAtLeast: (n: number) => Condition;
5610
+ /** Multi-mode handle behavior active (single shared union-bounds
5611
+ * handle vs per-item handles). */
5612
+ declare const multiActive: Condition;
5613
+ /** Pointer is hovering some node. */
5614
+ declare const hovering: Condition;
5615
+ /** Pointer is hovering a node that is currently selected. */
5616
+ declare const hoveringSelected: Condition;
5617
+ /** Named modifier key currently held. */
5618
+ declare const modifierHeld: (m: keyof ModifierState) => Condition;
5619
+ /** View scale (uniform or geometric mean for non-uniform) is at least
5620
+ * `z`. Useful for "hide hairline chrome at low zoom" rules. */
5621
+ declare const zoomAtLeast: (z: number) => Condition;
5622
+ /** Active mode equals `m`. */
5623
+ declare const modeIs: (m: string) => Condition;
5624
+ /** Active mode is one of `modes`. */
5625
+ declare const modeIn: (modes: readonly string[]) => Condition;
5626
+ /** Active mode is NOT `m`. */
5627
+ declare const modeNot: (m: string) => Condition;
5628
+ /** Active mode's `allows` includes capability `cap`. */
5629
+ declare const capabilityIs: (cap: string) => Condition;
5630
+ /** Active mode's `allows` includes ANY of `caps` (OR). */
5631
+ declare const capabilityIn: (caps: readonly string[]) => Condition;
5632
+ /** Active mode's `allows` includes ALL of `caps` (AND). */
5633
+ declare const capabilityAll: (caps: readonly string[]) => Condition;
5634
+ /** Active mode's `allows` does NOT include capability `cap`. */
5635
+ declare const capabilityNot: (cap: string) => Condition;
5636
+ /** Primary pointer is imprecise (touch, most styluses). Absent device
5637
+ * profile → false. */
5638
+ declare const coarsePointer: Condition;
5639
+ /** Primary pointer can hover. Absent device profile → true. */
5640
+ declare const canHover: Condition;
5641
+
5642
+ /**
5643
+ * Kit-shipped defaults. Merged with the consumer's `chromeVisibility` map
5644
+ * at resolve time; consumer entries take precedence per id.
5645
+ *
5646
+ * Gating is written in terms of **capabilities, not mode ids**. A
5647
+ * capability rule keeps holding when a new mode is added that permits the
5648
+ * same thing; a mode rule has to be found and edited every time.
5649
+ */
5650
+ declare const defaultVisibilityRules: VisibilityRules;
5651
+
5350
5652
  /**
5351
- * The writes a {@link PoseTransitionSeat} glides unless told otherwise: a
5352
- * direct scene call, an undo, and a redo. An action's commit (`'ops'`) is
5353
- * left out because most show their own result — a drag's release is already
5354
- * where it is written — and `tweenPose` records its op before it animates.
5355
- * Layout writes belong to `reflowTransition`.
5653
+ * Build the per-frame visibility check: consumer rules merged on top of
5654
+ * the kit defaults, evaluated against `ctx`.
5655
+ *
5656
+ * `ChromeCtx` is the legacy shape; surfaces still on it get `mode='normal'`
5657
+ * and `DEFAULT_ALLOWED_CAPABILITIES` filled in here, so a caller that never
5658
+ * opted into modality behaves exactly like one sitting in normal mode.
5356
5659
  */
5357
- declare function glidesByDefault(write: PoseWrite<unknown>): boolean;
5358
- /** The part of a scene a pose transition hears and reads. */
5359
- interface PoseTransitionScene<TPose, TNode = unknown> extends Pick<ScenePoseReports<TPose, TNode>, 'onPoseWrite'> {
5360
- readonly overrides: Pick<PoseOverrides<TPose>, 'read'>;
5361
- }
5362
- /** Hand `scene`'s pose writes to the seat's transition, each gliding from the
5363
- * pose it was shown at. A node something else poses through an override — a
5364
- * drag's preview, another animation — is left to it. With `departures`,
5365
- * removals leave as ghosts there, and a node that comes back while its ghost
5366
- * is leaving returns from where the ghost was. */
5367
- declare function bindPoseTransition<TPose, TNode = unknown>(scene: PoseTransitionScene<TPose, TNode>, seat: () => PoseTransitionSeat<TPose> | null | undefined, departures?: Departures<TPose, TNode>): () => void;
5368
- /** {@link bindPoseTransition} for a component's life, following the latest
5369
- * seat. Subscribes only while there is one. Answers the ghosts it shows. */
5370
- declare function usePoseTransition<TPose, TNode = unknown>(scene: PoseTransitionScene<TPose, TNode>, seat: PoseTransitionSeat<TPose> | null | undefined): Departures<TPose, TNode>;
5660
+ declare function resolveVisibility(consumer: VisibilityRules | undefined, ctx: ChromeCtx | RuleCtx): (id: ChromeId) => boolean;
5371
5661
 
5372
5662
  /**
5373
- * A routing-trait classifier entry. Other traits (shape, label, icon, …)
5374
- * are independent registries — fields like `label` or `icon` do NOT belong
5375
- * on this interface.
5663
+ * Pure assembler for {@link ChromeCtx}. Sources are passed as plain values
5664
+ * rather than the live objects they come from, which keeps `chrome-caps`
5665
+ * from depending on React or the dispatcher's concrete type.
5376
5666
  */
5377
- interface NodeRoutingEntry {
5378
- /** Unique kind name. Routing tables key on this string. Consumer-defined;
5379
- * the kit places no constraint beyond uniqueness within a registry. */
5380
- name: string;
5381
- /** Predicate over a node's `data` payload, and the node itself where the caller has one, for
5382
- * a kind its data cannot show (`'group'`). First registered kind whose `matches` returns
5383
- * true claims the node. */
5384
- matches: (data: unknown, node?: RoutedNode) => boolean;
5667
+
5668
+ /** The pieces of live canvas state a `ChromeCtx` is assembled from. */
5669
+ interface BuildChromeCtxArgs {
5670
+ focused: boolean;
5671
+ selection: readonly NodeId[];
5672
+ multiActive: boolean;
5673
+ modifiers: ModifierState;
5674
+ action: {
5675
+ kind: string | null;
5676
+ id: string | null;
5677
+ };
5678
+ hover: NodeId | null;
5679
+ view: View;
5385
5680
  }
5386
- /** What a routing entry may read of a node beside its data. */
5387
- interface RoutedNode {
5388
- /** The node's structural kind: `'mark'` or `'group'`. */
5389
- readonly kind?: string;
5681
+ /** Gather the current canvas state into the context that chrome-visibility
5682
+ * rules are evaluated against. Rebuilt per frame. */
5683
+ declare function buildChromeCtx(args: BuildChromeCtxArgs): ChromeCtx;
5684
+
5685
+ /** Last-hovered NodeId for chrome-caps rules. */
5686
+
5687
+ /** Options for `useHoverTracking`. */
5688
+ interface UseHoverTrackingArgs {
5689
+ /** Topmost id under a client point, or null. */
5690
+ nodeAtClientPoint: (clientX: number, clientY: number) => {
5691
+ id: NodeId;
5692
+ } | null;
5693
+ enabled?: boolean;
5694
+ /** Called when the hovered id changes, `null` once the pointer is over no node or has left. */
5695
+ onChange?: (id: NodeId | null) => void;
5696
+ }
5697
+ /** What `useHoverTracking` returns. Both members keep their identity. */
5698
+ interface HoverTracking {
5699
+ /** The node the pointer is over, or null. */
5700
+ getHover: () => NodeId | null;
5701
+ /** Hand it the element to track, or null to stop: a callback ref, so an
5702
+ * element that mounts after the hook is tracked from the moment it arrives. */
5703
+ canvasRef: (element: HTMLElement | null) => void;
5704
+ }
5705
+ /** Track which node the pointer is over. Returns a getter rather than state,
5706
+ * so a pointer move does not re-render the component. Cleared on
5707
+ * `pointerleave`. */
5708
+ declare function useHoverTracking(args: UseHoverTrackingArgs): HoverTracking;
5709
+
5710
+ /** `<SceneCanvas geometry>`: hit-test and bounds overrides, consumed by the
5711
+ * internal select tool. Ignored if the consumer passes their own `tools`. */
5712
+ interface SceneCanvasGeometry {
5713
+ /** Hit-test override. Return the topmost id, the full back-to-front hit
5714
+ * stack (`string[]`), or `null` for empty space. The stack form lets a
5715
+ * consumer with domain overlap ordering (e.g. children over their
5716
+ * container) feed the kit's `pickTopMostHit` the true order instead of
5717
+ * pre-collapsing to one id. Matches `Canvas`'s `pickEvery` shape. */
5718
+ pickEvery?: (world: WorldPoint) => string | string[] | null;
5719
+ boundsOf?: (id: string) => FramedBox | null;
5720
+ /**
5721
+ * What "the pointer is on this node" means for the default body-pick.
5722
+ *
5723
+ * - `'pose'` — the node's pose rect, rotation honored.
5724
+ * - `'shape'` (default) — the pose rect as a pre-filter, then the ink the painter
5725
+ * actually lays down: its silhouette filled or not per the painter's `ink`, plus
5726
+ * its outline widened by the stroke half-width and `pickTolerancePx`.
5727
+ *
5728
+ * Painters with no silhouette keep the pose-rect answer either way. Ignored when
5729
+ * `pickEvery` is supplied: that override owns the test.
5730
+ */
5731
+ picking?: 'pose' | 'shape';
5732
+ /**
5733
+ * Grab slop around a shape's outline, in **screen** pixels, so the target keeps
5734
+ * its apparent size at any zoom. Default 4. It widens the outline test under
5735
+ * `picking: 'shape'` and grows the pose-rect pre-filter so those outline hits
5736
+ * survive it. Set `0` for exact geometry.
5737
+ */
5738
+ pickTolerancePx?: number;
5739
+ /**
5740
+ * Whether a shape's box includes its stroke as drawn — align, joins, and
5741
+ * markers counted — or is the pose's geometry alone. Default `true`. The
5742
+ * selection outline and handles sit on it, resize keeps the stroke's
5743
+ * outer edge under the pointer without scaling the stroke, and rotate,
5744
+ * flip, align, and distribute measure it. Stored geometry is unaffected.
5745
+ */
5746
+ boundsIncludeStroke?: boolean;
5390
5747
  }
5748
+
5749
+ /** A scene `drawOne` that leaves out one node's glyphs. */
5750
+ type EditingDrawOne = <TNode extends Node<unknown, string, unknown>>(node: TNode, pose: unknown, view?: View, ctx?: NodePaintCtx) => DrawCommand[];
5751
+
5391
5752
  /**
5392
- * The **routing trait's** registry: answers "what routing-kind string does
5393
- * this node's data map to?" The result flows into declarative tool-routing
5394
- * tables (`{ target: 'rect', actionId: 'move' }`).
5753
+ * Union math over rect-shaped poses.
5754
+ *
5755
+ * Two answers, deliberately distinct. `unionBounds` folds the *unrotated*
5756
+ * boxes and is what commit-time actions want, because they go on to write
5757
+ * poses back in that same frame. `unionAABB` expands each rotated member to
5758
+ * the extent of its ink first, and is what anything a user looks at or clicks
5759
+ * wants — selection chrome, gesture bounds, an export viewBox. Folding the
5760
+ * unrotated box there under-reports the extent of a rotated member exactly
5761
+ * when the consumer is watching it move.
5395
5762
  */
5396
- interface NodeRouting {
5397
- /** Register a kind. Order matters: first match wins during `classify`.
5398
- * Throws if a kind with this name is already registered. */
5399
- register(kind: NodeRoutingEntry): void;
5400
- /** Walk registered kinds in registration order; return the first kind
5401
- * whose `matches(data, node)` returns true, or `'unknown'` if none match. */
5402
- classify(data: unknown, node?: RoutedNode): string;
5403
- /** Lookup a kind entry by name. */
5404
- get(name: string): NodeRoutingEntry | undefined;
5405
- /** Enumerate registered kinds in registration order. */
5406
- list(): readonly NodeRoutingEntry[];
5407
- }
5408
- /** The routing kind of a node: the name of the first entry whose `matches(data, node)` returns
5409
- * true, or `'unknown'`. What `NodeRouting.classify` answers, for a caller holding a plain list. */
5410
- declare function routeKind(entries: readonly NodeRoutingEntry[], data: unknown, node?: RoutedNode): string;
5411
- /** Build a registry of per-node-kind routing entries. Registering a duplicate
5412
- * kind name throws. */
5413
- declare function createNodeRouting(): NodeRouting;
5414
5763
 
5764
+ /** Compute the AABB envelope of a set of rect-shaped poses, ignoring any
5765
+ * rotation they carry. See the module docstring before reaching for this
5766
+ * over {@link unionAABB}. */
5767
+ declare function unionBounds<TPose extends RectPose>(poses: Iterable<TPose>): RectPose | null;
5415
5768
  /**
5416
- * The scene slot: an adapter's tree as render layers, one per scene layer.
5769
+ * Axis-align a pose that carries a `rotation` or a `transform`: returns the
5770
+ * AABB of the box as drawn, its four corners through `poseFrameOf`, with both
5771
+ * fields dropped.
5772
+ *
5773
+ * A pose with neither is returned as-is.
5774
+ */
5775
+ declare function axisAlignedBounds<TPose extends RectPose>(b: TPose): RectPose;
5776
+ /**
5777
+ * Fold every part into one world-space AABB, skipping `null` / `undefined`
5778
+ * entries. Rotated parts are expanded via {@link axisAlignedBounds} first;
5779
+ * the result never carries a `rotation` (a union of several oriented boxes
5780
+ * has no single orientation to report).
5781
+ *
5782
+ * Returns `null` when nothing was contributed.
5417
5783
  */
5784
+ declare function unionAABB<TPose extends RectPose>(parts: Iterable<TPose | null | undefined>): RectPose | null;
5418
5785
 
5419
- /** Scene slot config — describes how to draw one object with its effective pose. */
5420
- interface SceneSlotConfig<TNode extends {
5421
- id: string;
5422
- }, TPose> {
5423
- /** Paint these, in this order, in place of the adapter's tree: one flat run with no
5424
- * scene layers, no container clips, and no pose composition. */
5425
- objects?: TNode[];
5426
- /** The pose an object is painted at. Defaults to `adapter.getPose(obj.id)`. `<SceneCanvas>`
5427
- * hands it each node as the scene shows it, its `pose` an override's or a derived one,
5428
- * and carries an override's `path` into the box it answers; return a pose placed from
5429
- * `obj.pose`, or a drag in flight and a rig's motion do not show in this view. */
5430
- toPose?: (obj: TNode) => TPose;
5431
- /** Draw a single object as a `DrawCommand` tree. `ctx` carries a derived
5432
- * node's path: `<SceneCanvas>` resolves it from the scene, and
5433
- * `buildSceneLayer` called without one from its adapter. */
5434
- drawOne: (obj: TNode, pose: TPose, view: View, ctx?: NodePaintCtx) => DrawCommand[];
5435
- /** The path a container derives from its dependencies' poses, for the clip
5436
- * it imposes on its subtree — `drawOne`'s `ctx` carries the derived path a
5437
- * node *paints*, this one the clip it *imposes*. A scene-aware caller
5438
- * supplies it; left out, both are resolved off the adapter. */
5439
- derivedPathOf?: (obj: TNode, pose: TPose) => Path | null;
5440
- /** Default ghost alpha for the move-overlay slot. Default 0.85. */
5441
- ghostAlpha?: number;
5442
- /** Per-id alpha multiplier. A node's emitted `DrawCommand[]` is wrapped in a
5443
- * `{ kind: 'group', alpha }` when the returned value is not 1. */
5444
- alphaFor?: (id: string) => number;
5786
+ /** Shape the default projections expect `data` to satisfy. All fields
5787
+ * optional so any object satisfies the constraint — projections fill in
5788
+ * the gaps for non-default shapes. */
5789
+ interface DefaultTextData {
5790
+ text?: string;
5791
+ style?: TextStyle;
5792
+ runs?: readonly StyledRun[];
5793
+ fill?: Fill | Inherit | null;
5794
+ stroke?: Stroke | Inherit | null;
5795
+ verticalAlign?: TextVerticalAlign;
5796
+ padding?: number;
5797
+ overflow?: TextOverflow;
5798
+ }
5799
+ /** All-optional projections + fontSize fallback. */
5800
+ interface UseSceneTextEditOptions<TData> {
5445
5801
  /**
5446
- * Post-processor for the scene slot's emitted commands: called with the final
5447
- * world-space `DrawCommand[]` each time a scene canvas layer draws (after per-node
5448
- * rotation wrapping and `alphaFor`), once per layer when the slot is split into
5449
- * `scene:<layerId>` layers. Its return value replaces the array handed to the renderer.
5802
+ * Is this node text? A double-click opens an edit only on a node that
5803
+ * answers yes, and passes through any other to the text under it. Default:
5804
+ * `isTextData`, the test `inferredNodeRouting` classifies a text node by. Pass one when `getText` reads some other shape.
5805
+ */
5806
+ isText?: (data: TData) => boolean;
5807
+ /** Read plain text from `data`. Default: `data.text ?? ''`. */
5808
+ getText?: (data: TData) => string;
5809
+ /** Read style from `data`. Default: `data.style`. */
5810
+ getStyle?: (data: TData) => TextStyle | undefined;
5811
+ /** Read the node's paint from `data`. Default: `data.fill` / `data.stroke`. */
5812
+ getPaint?: (data: TData) => TextPaint | undefined;
5813
+ /** Read rich-text runs from `data`. Default: `data.runs`. */
5814
+ getRuns?: (data: TData) => readonly StyledRun[] | undefined;
5815
+ /** Read the box vertical alignment from `data`. Default: `data.verticalAlign`. */
5816
+ getVerticalAlign?: (data: TData) => TextVerticalAlign | undefined;
5817
+ /** Read the inset from the node's box to its text from `data`. Default: `data.padding`. */
5818
+ getPadding?: (data: TData) => number | undefined;
5819
+ /** Read whether the node cuts its text at its box from `data`, which the
5820
+ * overlay then does too. Default: `data.overflow`. */
5821
+ getOverflow?: (data: TData) => TextOverflow | undefined;
5822
+ /** Produce updated data with new text. Default: `{ ...data, text }`. */
5823
+ setText?: (data: TData, text: string) => TData;
5824
+ /** Produce updated data with new runs. Default: `{ ...data, runs }`. */
5825
+ setRuns?: (data: TData, runs: StyledRun[]) => TData;
5826
+ /**
5827
+ * Produce updated data with a new node-wide style. Default:
5828
+ * `{ ...data, style }`. Written only when a range toggle has to *clear* a
5829
+ * flag the node itself sets — the run algebra is additive, so that edit
5830
+ * lowers the node flag and raises it on the runs outside the range. See
5831
+ * `useTextEdit`'s `setStyle`.
5450
5832
  *
5451
- * Commands are world-space — `drawLayers` applies the view transform afterward. Clip
5452
- * nesting is capped at 7 levels; a wrapping group with `clip` consumes one. The
5453
- * move-overlay ghost (drag preview) is not post-processed.
5833
+ * An edit's text, runs, and style are folded through these three and
5834
+ * written as one `scene.update`, so a commit is one undo step.
5454
5835
  */
5455
- postProcess?: (cmds: DrawCommand[], view: View, dims: Dims) => DrawCommand[];
5836
+ setStyle?: (data: TData, style: TextStyle) => TData;
5837
+ /** Fallback fontSize when `style.fontSize` is unset. Default `16`. */
5838
+ defaultFontSize?: number;
5456
5839
  /**
5457
- * Skip what cannot reach the view. A node `paintBounds` places outside the
5458
- * `dims` rectangle under `view` is not painted at all; then, after
5459
- * `postProcess`, `cullDrawCommands` drops any remaining command that cannot
5460
- * reach it — see there for what it can and cannot bound. So `postProcess`
5461
- * sees an empty group where a culled node would have painted.
5840
+ * The view to project through. Omit it and the view is read live from the
5841
+ * weasel canvas mounted inside `container` (the one a double-click landed
5842
+ * on, when there are several). With no canvas there, the node's world box
5843
+ * is passed through as screen pixels.
5462
5844
  *
5463
- * Off by default because it makes the layer's world-space output depend on
5464
- * the view: anything that draws this layer once and shows the result under
5465
- * another view — a cache keyed without `view`, a consumer re-wrapping the
5466
- * commands — would show the first view's cull.
5845
+ * A thunk is re-read on every projection; a plain `View` is the value from
5846
+ * the render that supplied it.
5467
5847
  */
5468
- cull?: boolean;
5848
+ view?: View | (() => View);
5469
5849
  /**
5470
- * Where `drawOne`'s output for a node can reach, in the frame it paints in
5471
- * — before the pose rotation the slot wraps it in. `null` for a node it
5472
- * cannot bound cheaply. Read only under `cull`, which skips `drawOne` for a
5473
- * node whose box misses the view, so it must enclose everything `drawOne`
5474
- * paints: a box too small makes a node vanish before it leaves the screen.
5475
- *
5476
- * `<SceneCanvas>` supplies `defaultPaintBounds` while `drawOne` is
5477
- * `defaultDrawOne`. Omit it with any other `drawOne` and culling only
5478
- * trims commands after painting.
5850
+ * Forwarded to `useTextEdit`: is `el` part of the editor's own chrome?
5851
+ * Focus moving into it does not end the edit. Wire it to whatever renders
5852
+ * the character controls.
5479
5853
  */
5480
- paintBounds?: PaintBoundsFn<TNode, TPose>;
5481
- }
5482
-
5483
- /**
5484
- * The selection overlay's resize handles: their style, where the kit puts
5485
- * them, and the commands that paint them.
5486
- */
5487
-
5488
- /** Handle visuals, as a consumer supplies them. */
5489
- interface SelectionHandleStyle {
5490
- size?: number;
5491
- fill?: CommandFill;
5492
- outline?: CommandStroke;
5854
+ isEditorChrome?: (el: Element) => boolean;
5855
+ /** Forwarded to `useTextEdit`: what Escape does to the edit. */
5856
+ escape?: 'cancel' | 'commit';
5857
+ /** Forwarded to `useTextEdit`: how long an edit waits for its face. */
5858
+ fontHold?: number;
5859
+ /** Forwarded to `useTextEdit`: called as an edit of the node `id` opens,
5860
+ * whichever way it was started. */
5861
+ onStart?: (id: string) => void;
5862
+ /** Forwarded to `useTextEdit`: called as the edit of `id` closes, after
5863
+ * any commit has been written to the scene. */
5864
+ onEnd?: (id: string) => void;
5493
5865
  }
5494
-
5495
- /**
5496
- * The pose and box a selection's chrome is drawn around: precedence between
5497
- * the in-flight overlays and the stored pose, a container's union over its
5498
- * leaves, and the drawn box a scene supplies.
5499
- */
5500
-
5501
- /** Options for `composeSelectionPose`. */
5502
- interface ComposeSelectionPoseOpts<TPose> {
5503
- /** Move overlay; when present its `poses` map wins over everything else. */
5504
- moveOverlay?: {
5505
- poses: Map<string, TPose>;
5506
- } | null;
5866
+ /** What `onDoubleClick` reads of the event: a React or a DOM `MouseEvent`. */
5867
+ type TextEditDoubleClick = Pick<MouseEvent, 'target' | 'clientX' | 'clientY'>;
5868
+ /** Return shape extends `UseTextEditReturn` with an `onDoubleClick`
5869
+ * binding for the canvas container. Double-clicking inside a text
5870
+ * node enters edit mode with the caret seeded at the clicked glyph. */
5871
+ interface UseSceneTextEditReturn extends UseTextEditReturn {
5872
+ /** Bind to the element wrapping `<SceneCanvas>` (the same element
5873
+ * passed as `container`, or any ancestor that receives the dblclick
5874
+ * bubble). Starts an edit on the top-most text node under the cursor. */
5875
+ onDoubleClick: (e: TextEditDoubleClick) => void;
5876
+ /** The `isText` option asked of the node with this id: what
5877
+ * `TextEditDep.isTextNode` wants, so both ways into an edit agree. */
5878
+ isTextNode: (id: string) => boolean;
5507
5879
  /**
5508
- * Resize overlay; consulted only when move overlay does not own the id.
5509
- * For container resize, `leafPoses` (when present) maps each leaf id under
5510
- * the container to its overlay pose. If absent the container falls back to
5511
- * stored leaf poses.
5880
+ * `defaultDrawOne`, less the glyphs of the node being edited: the overlay
5881
+ * stands in for its text, and the rest of the node, a `background` among
5882
+ * it, goes on painting. Pass it as `layers.scene.drawOne`, with
5883
+ * `paintBounds: defaultPaintBounds`, in place of an `alphaFor` that hides
5884
+ * the whole node.
5512
5885
  */
5513
- resizeOverlay?: {
5514
- id: string;
5515
- currentPose: TPose;
5516
- leafPoses?: Map<string, TPose>;
5517
- } | null;
5518
- /** Fallback pose lookup (typically the stored/committed pose). */
5519
- getStoredPose: (id: string) => TPose;
5520
- /** How to read poses. Default `AUTO_POSE_DESCRIPTOR`. */
5521
- poseDescriptor?: PoseDescriptor<TPose>;
5522
- /** Walk a container's direct children (e.g. `scene.childrenOf`). With
5523
- * `isContainer`, a selected container resolves to the union AABB of its
5524
- * transitive leaf poses instead of its own stored pose. */
5525
- getChildren?: (id: string) => readonly string[];
5526
- /** True when `id` is a structural container. */
5527
- isContainer?: (id: string) => boolean;
5528
- /** The nodes behind the ids. With it, a container's union takes each leaf
5529
- * as drawn, stroke included (`drawnBoundsOf`); without, its pose box. */
5530
- scene?: DrawnBoundsScene;
5531
- /** View scale a screen-pixel stroke is resolved at. Default 1. */
5532
- viewScale?: () => number | Scale2;
5886
+ drawOne: EditingDrawOne;
5533
5887
  }
5534
- /**
5535
- * Build a pose resolver for a selection. Precedence per id:
5536
- * move overlay > resize overlay > stored. When `getChildren`/`isContainer`
5537
- * are supplied and the id resolves to a container, the resolver returns the
5538
- * union AABB of all transitive leaf poses (each leaf still subject to the
5539
- * precedence rules). Containers with no leaves resolve to `null`.
5540
- */
5541
- declare function composeSelectionPose<TPose>(opts: ComposeSelectionPoseOpts<TPose>): (id: string) => TPose | null;
5888
+ /** Wire double-click-to-edit text on a scene: mounts a DOM editing overlay
5889
+ * over the node being edited and writes the result back as an undoable op.
5890
+ * `<SceneCanvas>`'s own editor stands down for any canvas inside `container`. */
5891
+ declare function useSceneTextEdit<TData extends DefaultTextData, TLayer extends string, TPose extends RectPose = RectPose>(scene: Scene<TData, TLayer, TPose>, container: HTMLElement | null, options?: UseSceneTextEditOptions<TData>): UseSceneTextEditReturn;
5542
5892
 
5543
5893
  /**
5544
- * Selection overlay primitives — render layers for drawing selection
5545
- * outlines and resize handles.
5546
- *
5547
- * **Pose shape:** TPose is generic; callers pass `poseDescriptor` for poses
5548
- * `AUTO_POSE_DESCRIPTOR` can't read. Container ids reduce via `unionAABB`
5549
- * over the projected AABBs.
5894
+ * `<SceneCanvas>`'s own text editor: the one a text or sticky tool's
5895
+ * `enterTextEdit` reaches, and a double-click on a text node opens, when the
5896
+ * host has wired none of its own. It stands down for a host editor — a
5897
+ * `useSceneTextEdit` whose container holds the canvas, or a `textEdit` dep
5898
+ * registered over it.
5550
5899
  */
5551
5900
 
5552
- /** Options every selection layer shares. `getSelection` and `getPose` are
5553
- * declared on {@link SelectionOverlayLayerOpts}, which makes both optional —
5554
- * omitted, they come off the draw envelope. */
5555
- interface SelectionLayerCommon<TPose> {
5556
- /** How to read poses. Default `AUTO_POSE_DESCRIPTOR`. */
5557
- poseDescriptor?: PoseDescriptor<TPose>;
5558
- /** Walk a container's direct children (e.g. `scene.childrenOf`). When
5559
- * supplied with `isContainer`, any id that resolves to a container is
5560
- * rendered using the union bounds of all its transitive leaves. */
5561
- getChildren?: (id: string) => readonly string[];
5562
- /** True when `id` is a structural container. */
5563
- isContainer?: (id: string) => boolean;
5564
- /** The nodes behind the ids `getPose` answers for. With it, a stroked
5565
- * node's chrome sits on its stroke (`drawnBoundsOf`); without, on its
5566
- * pose box. Ignored when bounds come off the draw envelope. */
5567
- scene?: DrawnBoundsScene;
5901
+ /** `<SceneCanvas textEditor>`: its own editor's options, or `false` for none. */
5902
+ type SceneCanvasTextEditor<TData> = false | UseSceneTextEditOptions<TData>;
5903
+
5904
+ /** Minimal hit descriptor passed to `onDoubleClick`. Contains the fields
5905
+ * modality dispatch needs; extends as the kit's `Hit` type evolves. */
5906
+ interface SceneCanvasHit {
5907
+ id: string;
5908
+ kind: string;
5568
5909
  }
5569
- /** Options for `createSelectionOutlineLayer`. The overlay layer's options
5570
- * minus the handle visuals — the two run the same body. */
5571
- type SelectionOutlineLayerOpts<TPose> = Omit<SelectionOverlayLayerOpts<TPose>, 'handles' | 'handlesOf' | 'resizeHandles' | 'rotationHandle'>;
5572
- /** Options for `createSelectionHandlesLayer`. The overlay layer's options
5573
- * minus the outline stroke — the two run the same body. */
5574
- type SelectionHandlesLayerOpts<TPose> = Omit<SelectionOverlayLayerOpts<TPose>, 'outline'>;
5575
- /** Options for `createSelectionOverlayLayer`. */
5576
- interface SelectionOverlayLayerOpts<TPose> extends SelectionLayerCommon<TPose> {
5910
+ /** `<SceneCanvas>`'s props for what the pointer can reach and what a click names. */
5911
+ interface SceneCanvasPointerProps<TData = unknown> {
5577
5912
  /**
5578
- * Which ids to draw chrome for. Omit to take them from the `ChromeState` on
5579
- * the draw envelope, which is what makes one canvas's several views each
5580
- * outline their own selection — the layer is shared, the envelope is not.
5913
+ * Per-id pointer-interactivity predicate: an id it returns `false` for is excluded from
5914
+ * hit-test results. Typical use: suppressing pointer events for dimmed nodes.
5581
5915
  */
5582
- getSelection?: () => readonly NodeId[];
5916
+ isPointerInteractive?: (id: string) => boolean;
5583
5917
  /**
5584
- * Resolve an id to the pose to draw chrome around. Return null to skip an
5585
- * id. Omit to take bounds from the same envelope `getSelection` omitted
5586
- * takes ids from.
5918
+ * The entered group: the group a press resolves inside of, and which a double-click drills down
5919
+ * from. Nodes outside it take no hits. Pass one from `useEnteredGroup(scene)` to read or drive it
5920
+ * from outside the canvas, as `selection` is passed; without it the canvas keeps its own.
5921
+ */
5922
+ enteredGroup?: EnteredGroupApi;
5923
+ /**
5924
+ * Called when the user double-clicks the canvas, with the hit node (id + kind) at that
5925
+ * position, or `null` on empty canvas. A notification, not a binding: it fires whatever the
5926
+ * double-click does. Entering a mode on the node belongs to `modeTriggers` instead.
5927
+ */
5928
+ onDoubleClick?: (hit: SceneCanvasHit | null) => void;
5929
+ /** Called on every click — a press and release without a drag — with the
5930
+ * node under it, or `null` on empty canvas. Fires after the click's own
5931
+ * behavior, so a pick it made is already in the selection, and fires
5932
+ * again on a node that was already picked. */
5933
+ onClick?: (hit: SceneCanvasHit | null) => void;
5934
+ /** Called when the topmost pickable node under the pointer changes, with
5935
+ * its id, and with `null` once there is none or the pointer leaves. */
5936
+ onHover?: (id: string | null) => void;
5937
+ /**
5938
+ * The canvas's own text editor: what a text or sticky tool's `enterTextEdit`
5939
+ * opens, and, with the `edit` feature, a double-click on a text node. Pass
5940
+ * `useSceneTextEdit`'s options to configure it, or `false` for none.
5587
5941
  *
5588
- * Takes `string` rather than `NodeId` because the container-aware resolver
5589
- * walks expanded leaf ids via `getChildren`, which is generic over strings.
5942
+ * It mounts its overlay in the canvas's offset parent, so the canvas wants a
5943
+ * positioned ancestor. It stands down for a host's own editor: a
5944
+ * `useSceneTextEdit` whose container holds the canvas, or a `textEdit` dep
5945
+ * registered by a child. Wire one of those for character controls, which
5946
+ * read the edit's state.
5590
5947
  */
5591
- getPose?: (id: string) => TPose | null;
5592
- outline?: CommandStroke & {
5593
- pad?: number;
5594
- };
5595
- /** Pass `false` to render outlines only. */
5596
- handles?: SelectionHandleStyle | false;
5597
- /** Where to paint handles, in the bounds' own frame. Replaces the kit's
5598
- * layout, `resizeHandles` included. */
5599
- handlesOf?: (bounds: FramedBox) => {
5600
- x: number;
5601
- y: number;
5602
- }[];
5603
- /** The layout the resize affordance hits by: its `hitRadiusPx`, never
5604
- * `handles.size`, decides which edge handles are painted. Default: edges on,
5605
- * at the kit's default hit radius. */
5606
- resizeHandles?: Partial<ResizeHandleLayout>;
5607
- /** Draw a rotate badge above the selection's top edge. `true` places it at
5608
- * the default offset; `distance` sets the offset in screen pixels. Off by
5609
- * default. */
5610
- rotationHandle?: boolean | {
5611
- distance?: number;
5612
- };
5613
- /** Optional separate id list for the per-item outline pass, for a
5614
- * multi-selection whose handle pass works against a synthetic union id
5615
- * (e.g. `MULTI_RESIZE_TARGET_ID`) while each real member is outlined.
5616
- * When omitted, the outline pass uses the handle pass's ids. */
5617
- getOutlineIds?: () => readonly NodeId[];
5618
- /** Optional set of ids to suppress entirely — both outline and handles
5619
- * are skipped. */
5620
- getSuppressedIds?: () => ReadonlySet<string>;
5948
+ textEditor?: SceneCanvasTextEditor<TData>;
5621
5949
  }
5622
- /**
5623
- * `RenderLayer` that draws selection outlines only. Stack alongside
5624
- * `createSelectionHandlesLayer` (or use `createSelectionOverlayLayer`, which
5625
- * runs both passes in one layer) when both are wanted.
5626
- */
5627
- declare function createSelectionOutlineLayer<TPose>(opts: SelectionOutlineLayerOpts<TPose>): RenderLayer<unknown>;
5628
- /**
5629
- * `RenderLayer` that draws selection handles only. Stack on top of
5630
- * `createSelectionOutlineLayer` (handles render on top of the outline).
5631
- */
5632
- declare function createSelectionHandlesLayer<TPose>(opts: SelectionHandlesLayerOpts<TPose>): RenderLayer<unknown>;
5633
- /**
5634
- * Draws outlines then handles in a single layer. Exactly equivalent to
5635
- * stacking `createSelectionOutlineLayer` and `createSelectionHandlesLayer` —
5636
- * all three run the same body. Pass `handles: false` to render outlines only.
5637
- */
5638
- declare function createSelectionOverlayLayer<TPose>(opts: SelectionOverlayLayerOpts<TPose>): RenderLayer<unknown>;
5950
+
5951
+ /** The `<SceneCanvas>` props that change the actions and bindings a canvas has. */
5952
+ interface SceneCanvasActionProps {
5953
+ /**
5954
+ * Tune actions on this canvas without restating them, keyed by action id:
5955
+ * `params` every invocation starts from, and `bindings` added beside the
5956
+ * action's own. A tuning applies to whichever descriptor holds the id, a
5957
+ * preset's or a tool's. Pass a stable object; a params thunk is read on
5958
+ * every call. See the core README ("Tuning an action").
5959
+ */
5960
+ tune?: ActionTunings;
5961
+ /**
5962
+ * Replace or remove bindings by binding id, on actions and contributions
5963
+ * alike: a route string (`'[*:*] keyDown(=) +mod'`), a spec (`key('Mod+=')`),
5964
+ * or `null` to unbind. Pass a stable object.
5965
+ */
5966
+ bindingOverrides?: BindingOverrides;
5967
+ /**
5968
+ * Replace, add or mute whole action descriptors. Pass `null` to disable
5969
+ * all defaults. To change a built-in's params or add a key, use `tune`.
5970
+ */
5971
+ actions?: ActionsProp;
5972
+ }
5973
+
5974
+ /** Turns pasted or dropped plain text into a text node sized to the string. A kit handler, so a
5975
+ * canvas with the `ingest` feature takes text unless its `ingestion.kitHandlers` omits it. */
5976
+ declare const kitTextHandler: ContentHandlerEntry;
5639
5977
 
5640
5978
  /**
5641
- * The draw commands path edit paints for the open path, in screen space: its
5642
- * outline, then each anchor's handles and marker.
5979
+ * The kit's default content handlers, which every `<SceneCanvas>` routes through unless its
5980
+ * `ingestion.kitHandlers` turns some or all of them off. They belong to the canvas, not to
5981
+ * the page-wide registry, so one canvas turning one off leaves the others alone.
5643
5982
  */
5644
5983
 
5645
- /** Appearance of the outline and of the anchor and handle markers. */
5646
- interface PathEditingOverlayStyle {
5647
- anchorSizePx?: number;
5648
- handleDotRadiusPx?: number;
5649
- anchorFill?: string;
5650
- anchorStroke?: string;
5651
- handleStroke?: string;
5652
- /** Fill of the control-point circle. Defaults to the handleStroke color
5653
- * at 50% alpha. */
5654
- handleDotFill?: string;
5655
- /** Fill of a selected anchor square. Defaults to the anchor stroke color. */
5656
- anchorFillSelected?: string;
5657
- /** The open path's outline, drawn over its own fill and stroke so the path
5658
- * shows however its paint and its markers cover it. */
5659
- outlineStroke?: string;
5660
- outlineWidthPx?: number;
5661
- /** Radius of the dot an unselected anchor shrinks to where anchors sit
5662
- * closer together on screen than a marker is wide. */
5663
- denseDotRadiusPx?: number;
5664
- /** Stroke of the marquee rubber band. */
5665
- marqueeStroke?: string;
5666
- /** Fill of the marquee rubber band. */
5667
- marqueeFill?: string;
5984
+ /** `<SceneCanvas ingestion={{ kitHandlers }}>`: `true` (the default) keeps every kit handler,
5985
+ * `false` none, and `{ omit }` all but the ids named (`'kit:image'`, `'kit:svg'`,
5986
+ * `'kit:weasel-json'`, `'kit:text'`). */
5987
+ type KitHandlersOption = boolean | {
5988
+ omit: readonly string[];
5989
+ };
5990
+
5991
+ /** Options for {@link openFilePicker}. */
5992
+ interface OpenFilePickerOptions {
5993
+ /** `<input accept>` filter, e.g. `'image/*'` or `'.csv,text/csv'`. */
5994
+ accept?: string;
5995
+ /** Allow multi-select. Default false. */
5996
+ multiple?: boolean;
5668
5997
  }
5669
- /** The path-edit overlay's look where a {@link PathEditingOverlayStyle} leaves a field out. */
5670
- declare const DEFAULT_OVERLAY_STYLE: Required<PathEditingOverlayStyle>;
5998
+ /**
5999
+ * Show the browser's file picker and resolve with what the user chose —
6000
+ * empty when they cancel. Must be called from a user gesture (a click
6001
+ * handler): browsers block programmatic `input.click()` otherwise. Pairs
6002
+ * with `CanvasExtensionApi.ingest`:
6003
+ *
6004
+ * ```ts
6005
+ * const files = await openFilePicker({ accept: 'image/*', multiple: true });
6006
+ * canvasRef.current?.ingest(files);
6007
+ * ```
6008
+ */
6009
+ declare function openFilePicker(opts?: OpenFilePickerOptions): Promise<File[]>;
5671
6010
 
5672
6011
  /**
5673
- * Screen-space render layer for path-editing chrome — the open path's
5674
- * outline, anchor markers, tangent lines, and control-point dots for a
5675
- * polygon path that is the current edit target, under them whatever marks
5676
- * its path-edit extensions draw. Marker sizes stay constant regardless of zoom.
6012
+ * Ghosts of removed nodes: what a pose transition shows leaving after the
6013
+ * scene has let a node go. A ghost is not a scene node, so picking,
6014
+ * selection and history never see it; it lives here until its glide ends.
5677
6015
  */
5678
6016
 
5679
- /** Options for `createPathEditingOverlayLayer`. Everything is read per frame,
5680
- * so the layer follows a changing edit target without being rebuilt. */
5681
- interface CreatePathEditingOverlayLayerOptions {
5682
- /** Returns the id of the polygon currently in anchor-edit mode, or null
5683
- * when no node is being edited. */
5684
- getEditingId(): string | null;
5685
- /**
5686
- * Returns the pose for an id, or null if the node has been deleted.
5687
- * Non-polygon poses are tolerated (the layer no-ops on them).
5688
- *
5689
- * `previews` are the drawing view's in-flight preview surfaces, so an
5690
- * anchor dragged in one panel does not move in the others. Resolve against
5691
- * them before falling back to the committed pose.
5692
- *
5693
- * `view` is the drawing view's camera. Answer in its world: a node whose
5694
- * layer is a parallax plane stores its path in the plane's.
5695
- */
5696
- getPose(id: string, previews: readonly GesturePreviewSource[], view: View): Path | null;
5697
- /** The marker of each anchor, by flat index, for a node whose path was
5698
- * drawn from a form (`PathRepresentation.anchorMarkers`); null, or an
5699
- * anchor with none, draws a square. Resolve against `previews` as
5700
- * `getPose` does. */
5701
- getAnchorMarkers?(id: string, previews: readonly GesturePreviewSource[]): readonly (AnchorMarkerShape | null)[] | null;
5702
- /** Flat indices of the selected anchors. Selected anchors render
5703
- * filled; unselected ones hollow. */
5704
- getSelectedAnchors?(): ReadonlySet<number>;
5705
- /** In-flight anchor-marquee rect in world coords, or null. Drawn as a
5706
- * rubber band while `marqueeAnchorsAction` is dragging. */
5707
- getMarquee?(view: View): {
5708
- x: number;
5709
- y: number;
5710
- width: number;
5711
- height: number;
5712
- } | null;
5713
- /** The edited node's committed pose and data, which extensions' marks read. */
5714
- getNode?(id: string): {
5715
- pose: unknown;
5716
- data: unknown;
5717
- layer?: string;
5718
- } | null;
5719
- /** The path-edit extensions whose marks are drawn, in order. */
5720
- getExtensions?(): readonly PathEditExtension[];
5721
- /** The selected extension mark, or null. */
5722
- getSelectedMark?(): PathEditMark | null;
5723
- /** Optional styling overrides. */
5724
- style?: PathEditingOverlayStyle;
6017
+ /** A removed node as its ghost shows it now. */
6018
+ interface ShownDeparture<TPose, TNode> {
6019
+ removal: PoseRemoval<TPose, TNode>;
6020
+ pose: TPose;
6021
+ alpha: number;
5725
6022
  }
5726
- /** Render layer that draws the outline and the anchors and control handles
5727
- * of the path currently being anchor-edited. Draws nothing when no path is
5728
- * being edited. */
5729
- declare function createPathEditingOverlayLayer(opts: CreatePathEditingOverlayLayerOptions): RenderLayer<unknown>;
6023
+ /** The ghosts one canvas shows. */
6024
+ interface Departures<TPose, TNode> {
6025
+ /** See `removal` off from where it was shown toward `exit` of that pose,
6026
+ * fading out, through `transition`. Does nothing for a transition with no
6027
+ * `over`, which cannot carry a node the scene no longer holds. */
6028
+ leave(removal: PoseRemoval<TPose, TNode>, exit: (pose: TPose) => TPose, transition: ReflowTransition<TPose>): void;
6029
+ /** Drop `id`'s ghost — its node is back — and answer where it was shown. */
6030
+ recall(id: string): TPose | undefined;
6031
+ shown(): ShownDeparture<TPose, TNode>[];
6032
+ /** Hear each frame a ghost moves, and each one that comes or goes. */
6033
+ subscribe(listener: () => void): () => void;
6034
+ dispose(): void;
6035
+ }
6036
+ /** An empty set of ghosts, for `bindPoseTransition` to fill and a layer to
6037
+ * draw; `usePoseTransition` makes one per canvas. */
6038
+ declare function createDepartures<TPose, TNode>(): Departures<TPose, TNode>;
5730
6039
 
5731
- /** Standard slot names — render in this canonical order.
5732
- * `cellHighlight` is not an anchor for custom layers: it sits between the
5733
- * grid and the scene, so anchor to one of those. */
5734
- /** @internal */
5735
- declare const STANDARD_SLOTS: readonly ["grid", "cellHighlight", "scene", "selectionOverlay"];
5736
- /** Names of the slots `<Canvas>` supports out of the box (excluding the implicit cell-highlight overlay). */
5737
- type StandardSlotName = Exclude<(typeof STANDARD_SLOTS)[number], 'cellHighlight'>;
5738
- /** Custom layer entry — any key not in `STANDARD_SLOTS`. The presence of
5739
- * `.layer` discriminates this from a slot config. */
5740
- interface CustomLayerEntry {
5741
- layer: RenderLayer<unknown>;
5742
- /** Insert immediately after the named standard slot or another custom-layer key. */
5743
- after?: StandardSlotName | (string & {});
5744
- /** Insert immediately before the named standard slot or another custom-layer key. */
5745
- before?: StandardSlotName | (string & {});
6040
+ /**
6041
+ * Which pose writes a canvas glides, and through what: `<SceneCanvas
6042
+ * poseTransition>`. The transition is the kind `reflowTransition` takes, and
6043
+ * one object can serve both.
6044
+ */
6045
+ interface PoseTransitionSeat<TPose> {
6046
+ /** Shows each glide through a pose override; writes nothing. */
6047
+ transition: ReflowTransition<TPose>;
6048
+ /** Whether `write` glides. Default {@link glidesByDefault}. */
6049
+ glides?: (write: PoseWrite<TPose>) => boolean;
6050
+ /** Where a node the scene adds is first shown, given the pose it was added
6051
+ * at. Absent, an added node appears in place. */
6052
+ enter?: (pose: TPose) => TPose;
6053
+ /** Where a node the scene removes is seen off to, given the pose it was
6054
+ * shown at: a ghost of it glides there fading out, drawn but never picked,
6055
+ * selected or recorded. Absent, a removed node vanishes. Needs a
6056
+ * transition from `useAnimatedReflow` or `createReflowTransition`. */
6057
+ exit?: (pose: TPose) => TPose;
6058
+ /** Whether a removal is seen off through `exit`. Default: every one but
6059
+ * an untracked removal. */
6060
+ exits?: (removal: PoseRemoval<TPose>) => boolean;
5746
6061
  }
5747
- /** Selection-overlay slot config — passed through to `createSelectionOverlayLayer`,
5748
- * minus the `getSelection`/`getPose` the canvas wires automatically and the
5749
- * `resizeHandles` it takes from the hit-test, so the two cannot disagree. */
5750
- type SelectionOverlaySlotConfig<TPose> = Omit<SelectionOverlayLayerOpts<TPose>, 'getSelection' | 'getPose' | 'resizeHandles'> & {
5751
- /** Override the auto-wired pose lookup (overlay-aware → adapter fallback). */
5752
- poseById?: (id: string) => TPose | null;
5753
- };
5754
- /** Path-edit overlay slot config: how `<SceneCanvas>` draws the chrome of the
5755
- * path whose anchors are being edited. */
5756
- interface PathEditingOverlaySlotConfig {
5757
- /** Anchor and handle marker overrides. */
5758
- style?: PathEditingOverlayStyle;
6062
+ /**
6063
+ * The writes a {@link PoseTransitionSeat} glides unless told otherwise: a
6064
+ * direct scene call, an undo, and a redo. An action's commit (`'ops'`) is
6065
+ * left out because most show their own result — a drag's release is already
6066
+ * where it is written — and `tweenPose` records its op before it animates.
6067
+ * Layout writes belong to `reflowTransition`.
6068
+ */
6069
+ declare function glidesByDefault(write: PoseWrite<unknown>): boolean;
6070
+ /** The part of a scene a pose transition hears and reads. */
6071
+ interface PoseTransitionScene<TPose, TNode = unknown> extends Pick<ScenePoseReports<TPose, TNode>, 'onPoseWrite'> {
6072
+ readonly overrides: Pick<PoseOverrides<TPose>, 'read'>;
5759
6073
  }
5760
- /** Per-slot config union. The key narrows it in practice. */
5761
- type StandardSlotConfig<TNode extends {
5762
- id: string;
5763
- }, TPose> = SceneSlotConfig<TNode, TPose> | SelectionOverlaySlotConfig<TPose> | PathEditingOverlaySlotConfig;
5764
- /** What may fill one of the canvas's named layer slots: a config the canvas
5765
- * builds the layer from, a pre-built layer, or `null` to leave the slot
5766
- * empty. */
5767
- type LayerSlotValue<TNode extends {
5768
- id: string;
5769
- }, TPose> = StandardSlotConfig<TNode, TPose> | CustomLayerEntry | null;
5770
- /** The canvas's render stack, as named slots. The standard slots (grid,
5771
- * scene, selection overlay, cell highlight) fix where a layer sits in the
5772
- * stack; scene and selection overlay can be configured, and every one can be
5773
- * given a layer of your own or switched off. Further keys add custom layers.
5774
- * `TSceneSlot` is what the scene slot accepts: `<SceneCanvas>` takes a
5775
- * partial config and fills the rest from its defaults. */
5776
- type LayersMap<TNode extends {
5777
- id: string;
5778
- }, TPose, TSceneSlot = SceneSlotConfig<TNode, TPose>> = {
5779
- /** Grid slot, beneath the scene. Takes a pre-built layer (`{ layer }`) —
5780
- * e.g. `createGridLayer` from `@weasel-js/guides` — or `null`. */
5781
- grid?: CustomLayerEntry | null;
5782
- /** Scene slot: the config `<SceneCanvas>` builds its layers from, a
5783
- * pre-built layer that paints the scene in their place, or `null`. A
5784
- * pre-built layer gets no ghost of a node in flight, which needs `drawOne`. */
5785
- scene?: TSceneSlot | CustomLayerEntry | null;
5786
- /** Selection-overlay slot: the config `<SceneCanvas>` builds the layer
5787
- * from, a pre-built layer that paints in its place, or `null` for no
5788
- * selection chrome. */
5789
- selectionOverlay?: SelectionOverlaySlotConfig<TPose> | CustomLayerEntry | null;
5790
- /** Cell-highlight overlay slot, drawn immediately after the grid. Takes a
5791
- * pre-built layer (`{ layer }`) — e.g. `createCellHighlightLayer` from
5792
- * `@weasel-js/guides` — or `null`. */
5793
- cellHighlight?: CustomLayerEntry | null;
5794
- /** `<SceneCanvas>`'s anchor-editing overlay, above the selection overlay:
5795
- * the config it builds the layer from, a pre-built layer, or `null`. */
5796
- pathEditingOverlay?: PathEditingOverlaySlotConfig | CustomLayerEntry | null;
5797
- } & {
5798
- [customKey: string]: LayerSlotValue<TNode, TPose> | TSceneSlot | undefined;
5799
- };
5800
- /** The scene slot once built: its canvas layers, bottom first. Each `key` is
5801
- * an anchor a custom layer can name (`scene`, or `scene:<layerId>`). */
5802
- interface SceneSlotLayers {
5803
- layers: ReadonlyArray<{
5804
- key: string;
5805
- layer: RenderLayer<unknown>;
5806
- }>;
6074
+ /** Hand `scene`'s pose writes to the seat's transition, each gliding from the
6075
+ * pose it was shown at. A node something else poses through an override — a
6076
+ * drag's preview, another animation — is left to it. With `departures`,
6077
+ * removals leave as ghosts there, and a node that comes back while its ghost
6078
+ * is leaving returns from where the ghost was. */
6079
+ declare function bindPoseTransition<TPose, TNode = unknown>(scene: PoseTransitionScene<TPose, TNode>, seat: () => PoseTransitionSeat<TPose> | null | undefined, departures?: Departures<TPose, TNode>): () => void;
6080
+ /** {@link bindPoseTransition} for a component's life, following the latest
6081
+ * seat. Subscribes only while there is one. Answers the ghosts it shows. */
6082
+ declare function usePoseTransition<TPose, TNode = unknown>(scene: PoseTransitionScene<TPose, TNode>, seat: PoseTransitionSeat<TPose> | null | undefined): Departures<TPose, TNode>;
6083
+
6084
+ /**
6085
+ * A routing-trait classifier entry. Other traits (shape, label, icon, …)
6086
+ * are independent registries — fields like `label` or `icon` do NOT belong
6087
+ * on this interface.
6088
+ */
6089
+ interface NodeRoutingEntry {
6090
+ /** Unique kind name. Routing tables key on this string. Consumer-defined;
6091
+ * the kit places no constraint beyond uniqueness within a registry. */
6092
+ name: string;
6093
+ /** Predicate over a node's `data` payload, and the node itself where the caller has one, for
6094
+ * a kind its data cannot show (`'group'`). First registered kind whose `matches` returns
6095
+ * true claims the node. */
6096
+ matches: (data: unknown, node?: RoutedNode) => boolean;
5807
6097
  }
5808
- /** What `<Canvas>` composes: a {@link LayersMap} with every slot already a
5809
- * layer. `<SceneCanvas>` builds one from its `layers` prop. */
5810
- type CanvasLayers = {
5811
- grid?: CustomLayerEntry | null;
5812
- cellHighlight?: CustomLayerEntry | null;
5813
- scene?: SceneSlotLayers | null;
5814
- selectionOverlay?: CustomLayerEntry | null;
5815
- } & {
5816
- [customKey: string]: CustomLayerEntry | SceneSlotLayers | null | undefined;
5817
- };
6098
+ /** What a routing entry may read of a node beside its data. */
6099
+ interface RoutedNode {
6100
+ /** The node's structural kind: `'mark'` or `'group'`. */
6101
+ readonly kind?: string;
6102
+ /** Set on a boolean group: see `booleanGroupFields`. */
6103
+ readonly consumesChildren?: boolean;
6104
+ }
6105
+ /**
6106
+ * The **routing trait's** registry: answers "what routing-kind string does
6107
+ * this node's data map to?" The result flows into declarative tool-routing
6108
+ * tables (`{ target: 'rect', actionId: 'move' }`).
6109
+ */
6110
+ interface NodeRouting {
6111
+ /** Register a kind. Order matters: first match wins during `classify`.
6112
+ * Throws if a kind with this name is already registered. */
6113
+ register(kind: NodeRoutingEntry): void;
6114
+ /** Walk registered kinds in registration order; return the first kind
6115
+ * whose `matches(data, node)` returns true, or `'unknown'` if none match. */
6116
+ classify(data: unknown, node?: RoutedNode): string;
6117
+ /** Lookup a kind entry by name. */
6118
+ get(name: string): NodeRoutingEntry | undefined;
6119
+ /** Enumerate registered kinds in registration order. */
6120
+ list(): readonly NodeRoutingEntry[];
6121
+ }
6122
+ /** The routing kind of a node: the name of the first entry whose `matches(data, node)` returns
6123
+ * true, or `'unknown'`. What `NodeRouting.classify` answers, for a caller holding a plain list. */
6124
+ declare function routeKind(entries: readonly NodeRoutingEntry[], data: unknown, node?: RoutedNode): string;
6125
+ /** Build a registry of per-node-kind routing entries. Registering a duplicate
6126
+ * kind name throws. */
6127
+ declare function createNodeRouting(): NodeRouting;
5818
6128
 
5819
6129
  /**
5820
6130
  * A camera: held in a ref when uncontrolled, taken from the `view` option when
@@ -5998,6 +6308,11 @@ interface CanvasRetainOptions {
5998
6308
  /** GPU memory, in bytes, retained layers may hold together:
5999
6309
  * `WeaselRendererOptions.retainBudget`. 0 retains nothing. */
6000
6310
  budget?: number;
6311
+ /** Round the view's translation to whole device pixels while it moves, so
6312
+ * a retained layer is composited moved rather than drawn again; it draws
6313
+ * exactly once the view holds. Drawn and hit positions then differ by up
6314
+ * to half a device pixel while the view moves. Default `true`. */
6315
+ whole?: boolean;
6001
6316
  }
6002
6317
  /**
6003
6318
  * Props for `<Canvas>`. Canvas is scene-agnostic: it owns the GL surface, view state, hover
@@ -6420,10 +6735,16 @@ declare const DRAW_TOOLS: ToolSet<BuiltinToolId>;
6420
6735
  declare const TYPE_TOOLS: ToolSet<BuiltinToolId>;
6421
6736
  /** The tools that cut the page itself. */
6422
6737
  declare const PAGE_TOOLS: ToolSet<BuiltinToolId>;
6423
- /** Every built-in tool, in palette order: the navigation tools, the shape-kind
6424
- * table's tools in its order, then the knife. */
6738
+ /** The built-in tool sets in palette order: selection, then navigation, then the tools that make
6739
+ * things. Each set is named for the presentation group its tools sit in. */
6740
+ declare const BUILTIN_TOOL_GROUPS: readonly ToolSet<BuiltinToolId>[];
6741
+ /** The natural order of palette groups, which `ToolPalette` follows unless given its own. */
6742
+ declare const TOOL_GROUP_ORDER: readonly string[];
6743
+ /** Every built-in tool, in palette order: {@link BUILTIN_TOOL_GROUPS} one after another, then any
6744
+ * shape kind in no family. */
6425
6745
  declare const BUILTIN_TOOLS: ToolSet<BuiltinToolId>;
6426
- /** Every built-in tool id, in palette order: {@link BUILTIN_TOOLS} opened. */
6746
+ /** Every built-in tool id, in palette order: {@link BUILTIN_TOOLS} opened. A palette orders the
6747
+ * tools within each group by it. */
6427
6748
  declare const BUILTIN_TOOL_IDS: readonly BuiltinToolId[];
6428
6749
 
6429
6750
  /** Default size in CSS pixels for selection corner-handles AND their
@@ -6437,8 +6758,8 @@ interface SceneCanvasLongPress {
6437
6758
  * Default: a ring that fills around the press point
6438
6759
  * (`createLongPressFeedbackContribution()`), static under
6439
6760
  * `prefers-reduced-motion`. `false` shows nothing; a contribution replaces
6440
- * it, reading the `longPress` dep. Installed beside `ambient`, so under a
6441
- * `tools` takeover add it to your own `useTools` call instead.
6761
+ * it, reading the `longPress` dep. Installed beside `ambient` and beside a `tools`
6762
+ * takeover, unless the takeover's ambient holds an entry of the same id.
6442
6763
  */
6443
6764
  feedback?: boolean | SurfaceContribution;
6444
6765
  /** Default true. A long-press some binding handled pulses
@@ -6494,9 +6815,9 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<TP
6494
6815
  poseTransition?: PoseTransitionSeat<TPose> | null;
6495
6816
  /**
6496
6817
  * Lets pose-transform actions (move, resize, nudge, flip — NOT rotate) also rewrite a
6497
- * node's data-held geometry. Given a node and the affine `m` applied to its pose,
6498
- * `transform(node, m)` returns updated `data`, or `null` for nodes with no data-held
6499
- * geometry. When absent, the kit emits only the pose op and leaves `data` untouched.
6818
+ * node's data-held geometry: `transform(node, m, change)` returns updated `data`, or
6819
+ * `null` for nodes with no data-held geometry. When absent, the kit emits only the pose
6820
+ * op and leaves `data` untouched.
6500
6821
  *
6501
6822
  * @see GeometryProjection
6502
6823
  */
@@ -6529,7 +6850,7 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<TP
6529
6850
  * the live alt state + current selection so consumers can implement
6530
6851
  * alt-cycling through an overlapping stack. Default: top-most hit
6531
6852
  * (alt ignored). */
6532
- pickBest?: (worldX: number, worldY: number, alt: boolean, sel: readonly string[]) => string | null;
6853
+ pickBest?: (world: _weasel_js_routing.WorldPoint, alt: boolean, sel: readonly string[]) => string | null;
6533
6854
  };
6534
6855
  /** Consumer node factories for the `insert` action, keyed by tool `kind`.
6535
6856
  * Each factory receives the drag AABB + tool `extras` and returns the
@@ -6546,9 +6867,9 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<TP
6546
6867
  insertPaint?: InsertPaint;
6547
6868
  /** External-content ingestion (OS drop / clipboard paste / picker).
6548
6869
  *
6549
- * - `handlers` — consumer content handlers registered for this canvas's
6550
- * lifetime (priority 0 by default — they beat the kit's `image/*` /
6551
- * `image/svg+xml` handlers at -100/-90).
6870
+ * - `handlers` — content handlers for this canvas alone, priority 0 by default, above
6871
+ * the kit's. One for every canvas on the page goes through `registerContentHandler`.
6872
+ * - `kitHandlers` — which kit handlers it keeps (`KitHandlersOption`); default all.
6552
6873
  * - `resolveSrc` — overrides the image handler's `data:`-URI embed (e.g.
6553
6874
  * upload to an asset store, return the URL).
6554
6875
  * - `svg.unpack` — makes the kit SVG handler parse dropped SVG files into
@@ -6560,10 +6881,10 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<TP
6560
6881
  * rather than letting them fall through. Also governs Cmd/Ctrl+V under
6561
6882
  * the `edit` preset; the rest takes the `ingest` preset.
6562
6883
  *
6563
- * Memoize `handlers` and `clipboard.reviver`: an inline array literal
6564
- * re-registers the handlers on every render. */
6884
+ * Memoize `handlers` and `clipboard.reviver`: inline literals rebuild them every render. */
6565
6885
  ingestion?: {
6566
6886
  handlers?: ContentHandlerEntry[];
6887
+ kitHandlers?: KitHandlersOption;
6567
6888
  resolveSrc?: (file: File) => Promise<string>;
6568
6889
  svg?: SvgIngestOptions;
6569
6890
  clipboard?: {
@@ -6828,34 +7149,31 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<TP
6828
7149
  * nor picked here. See `CanvasProps.layerOrder`.
6829
7150
  */
6830
7151
  layerOrder?: string[];
6831
- } & SceneCanvasPointerProps & SceneCanvasActionProps;
7152
+ } & SceneCanvasPointerProps<TData> & SceneCanvasActionProps;
6832
7153
 
6833
7154
  /**
6834
7155
  * The behavior presets `<SceneCanvas features>` composes. A bare canvas renders
6835
- * its scene and keeps a selection nothing sets; every behavior beyond that is
6836
- * turned on by a preset.
7156
+ * its scene, keeps a selection nothing sets, and undoes and redoes whatever
7157
+ * changed it; every behavior beyond that is turned on by a preset.
6837
7158
  *
6838
7159
  * A preset is a {@link FeaturePreset} object: the actions, tools, bindings,
6839
- * chrome, and contributions one behavior brings. Core's own are named
6840
- * (`'select'`, `'draw'`) and live in `namedPresets.ts`; a package ships its
6841
- * own the same way and an app passes the object. Nothing here imports an
6842
- * action, so a canvas reaches only the presets it is handed.
6843
- *
6844
- * A preset is not one of the `packages/core/src/features/<name>/` source
7160
+ * chrome, and contributions one behavior brings, and the presets it includes.
7161
+ * One that holds only actions, tools, and includes is a bundle, pure grouping;
7162
+ * one with any other role is an atom, whose parts only work together. Core's
7163
+ * own are named (`'select'`, `'draw'`) and live in `namedPresets.ts`; a
7164
+ * package ships its own the same way and an app passes the object. Nothing
7165
+ * here imports an action, so a canvas reaches only the presets it is handed.
7166
+ *
7167
+ * A preset is not one of the `packages/core/src/domains/<name>/` source
6845
7168
  * directories that `docs/taxonomy.md` calls a feature; the two share a word
6846
7169
  * and nothing else.
6847
7170
  */
6848
7171
 
6849
- /** A core preset that names one behavior and abbreviates nothing. */
6850
- type BaseFeature = 'view' | 'select' | 'outline' | 'move' | 'resize' | 'rotate' | 'edit' | 'arrange' | 'paths' | 'ingest';
6851
- /** A core preset that abbreviates others: `pick` is `select` + `outline`,
6852
- * `transform` is `resize` + `rotate`, and `draw` is every base preset. */
6853
- type CompositeFeature = 'pick' | 'transform' | 'draw';
7172
+ /** Every core preset's name `<SceneCanvas features>` accepts, each after the
7173
+ * presets it includes. */
7174
+ declare const SCENE_CANVAS_FEATURES: readonly ["tools:select", "tools:view", "tools:shape", "tools:draw", "tools:type", "tools:page", "view", "select", "outline", "pick", "move", "resize", "rotate", "transform", "escape", "contextMenu", "selectAll", "duplicate", "delete", "group", "nudge", "style", "clipboard", "edit", "flip", "reorder", "align", "distribute", "arrange", "anchorKeys", "pathfinder", "outlines", "pathEdit", "pathCommands", "paths", "ingest", "draw"];
6854
7175
  /** A core preset's name, as `<SceneCanvas features>` takes it. */
6855
- type Feature = BaseFeature | CompositeFeature;
6856
- /** Every name `<SceneCanvas features>` accepts, each composite after the
6857
- * presets it names. */
6858
- declare const SCENE_CANVAS_FEATURES: readonly Feature[];
7176
+ type Feature = (typeof SCENE_CANVAS_FEATURES)[number];
6859
7177
  /** What a preset's ambient bindings are built from: the `selectTool` options
6860
7178
  * that configure them. */
6861
7179
  interface FeatureBindingOptions {
@@ -6869,6 +7187,8 @@ interface FeatureBindingOptions {
6869
7187
  * passes it to `features`, and an app that does not never loads its code.
6870
7188
  */
6871
7189
  interface FeaturePreset {
7190
+ /** What a person calls it, where one is listed. Absent, the id. */
7191
+ readonly label?: string;
6872
7192
  /** Unique per canvas. `refines` names presets by it, and two different
6873
7193
  * presets with one id on one canvas throw. */
6874
7194
  readonly id: string;
@@ -6888,6 +7208,10 @@ interface FeaturePreset {
6888
7208
  /** Snap sources every snap session on the canvas asks, after
6889
7209
  * `<SceneCanvas snap.sources>` and the presets before it. */
6890
7210
  readonly snapSources?: readonly SnapSource[];
7211
+ /** Layers it adds to the render stack, by slot, as `<SceneCanvas layers>`
7212
+ * takes them: `grid` fills the grid slot, any other key adds a layer. A
7213
+ * slot `<SceneCanvas layers>` names, `null` included, keeps the consumer's. */
7214
+ readonly layers?: Readonly<Record<string, CustomLayerEntry>>;
6891
7215
  /** The selection chrome that is drawn, and can be grabbed, only while it is on. */
6892
7216
  readonly chrome?: readonly ChromeId[];
6893
7217
  /** Default chrome-caps rules for chrome of its own, under the consumer's
@@ -6900,25 +7224,25 @@ interface FeaturePreset {
6900
7224
  * declare: deps, overlays, `attach`, views, frame hooks. A `tools` takeover
6901
7225
  * brings its own ambient and leaves them out. */
6902
7226
  readonly contributions?: readonly SurfaceContribution[];
6903
- /** Ids of presets whose actions this one's register ahead of, so that where
6904
- * both bind one gesture, this one's is tried first: anchor nudging ahead of
6905
- * node nudging. A preset named here that is not on is ignored. */
7227
+ /** Ids of presets whose actions, and those of every preset they include,
7228
+ * this one's register ahead of, so that where both bind one gesture, this
7229
+ * one's is tried first: anchor nudging ahead of node nudging. A preset named
7230
+ * here that is not on is ignored. */
6906
7231
  readonly refines?: readonly string[];
6907
7232
  /** Presets it turns on with itself, ahead of its own place in the order. */
6908
7233
  readonly includes?: readonly FeaturePreset[];
6909
7234
  }
6910
7235
  /** What `<SceneCanvas features>` takes: a core preset's name or any preset. */
6911
7236
  type FeatureEntry = Feature | FeaturePreset;
6912
- /** The names a canvas resolves: one preset each, or the presets a composite
6913
- * abbreviates. */
6914
- interface NamedPresets {
6915
- readonly base: Readonly<Record<BaseFeature, FeaturePreset>>;
6916
- readonly composite: Readonly<Record<CompositeFeature, readonly BaseFeature[]>>;
6917
- }
7237
+ /** The names a canvas resolves, each to its preset. */
7238
+ type NamedPresets = Readonly<Record<string, FeaturePreset>>;
6918
7239
  /** Where a canvas finds presets beyond the objects it is handed: the names it
6919
7240
  * resolves, if any, and the actions it registers once a tool binds them. */
6920
7241
  interface PresetSource {
6921
7242
  readonly named: NamedPresets | null;
7243
+ /** Actions every canvas registers whatever its presets: undo and redo, since anything that changes
7244
+ * the scene — a preset's action, a tool, the host — leaves history to step through. */
7245
+ readonly baseline?: readonly Action[];
6922
7246
  /** Actions registered only when a tool or contribution binds them. */
6923
7247
  readonly pool: readonly Action[];
6924
7248
  }
@@ -7142,10 +7466,10 @@ interface PickHudProps {
7142
7466
  * passes that conversion, so the readout agrees with the picks. */
7143
7467
  toWorld?: (clientX: number, clientY: number) => [number, number];
7144
7468
  /** World-space hit-test. Same shape as `useSelectTool`'s `pickEvery`. */
7145
- pickEvery: (worldX: number, worldY: number) => readonly string[];
7469
+ pickEvery: (world: WorldPoint) => readonly string[];
7146
7470
  /** Optional single-best resolver — the id this point would select on a
7147
7471
  * bare click. When supplied, that id is rendered bold in the list. */
7148
- pickBest?: (worldX: number, worldY: number) => string | null;
7472
+ pickBest?: (world: WorldPoint) => string | null;
7149
7473
  /** Inset from the canvas's top-right corner. Default `{ top: 76, right: 8 }`
7150
7474
  * so the HUD clears `CursorCoordsHud` (~64 px tall in its 3-line form). */
7151
7475
  offset?: {
@@ -7238,6 +7562,10 @@ type SceneCanvasAdapter<TData, TLayer extends string, TPose> = MoveAdapter<Node<
7238
7562
  /** Present only when a composing strategy is configured; the render
7239
7563
  * walk feature-detects it. */
7240
7564
  composePose?(parent: TPose, child: TPose): TPose;
7565
+ /** The frame a container gives its children, scrolled by the scene's
7566
+ * `scroll` offset — see `PoseAdapter.childFrame`. Present only when the
7567
+ * composition can scroll. */
7568
+ childFrame?(id: string, world: TPose): TPose;
7241
7569
  getSelection(): string[];
7242
7570
  setSelection(ids: string[]): void;
7243
7571
  insertNode(node: Node<TData, TLayer, TPose>, index?: number): void;
@@ -7289,13 +7617,8 @@ interface SceneToAdapterOptions<TData, TLayer extends string, TPose> {
7289
7617
  }
7290
7618
  /** Derive the adapter for a scene. Reads go straight to the scene; writes are
7291
7619
  * ops applied through its history, so anything done through the adapter is
7292
- * undoable.
7293
- *
7294
- * Moving a container carries its contents either way the scene composes
7295
- * poses. Under a frame (`scene.composition`) the one pose written moves them.
7296
- * Under the absolute-pose model `setPose` on a container translates every
7297
- * descendant by the same delta, and a batch that poses descendants too undoes
7298
- * exactly only when it goes through this adapter's `applyOps`. */
7620
+ * undoable. A container's pose is a frame its children are stored in, so the
7621
+ * one pose written moves its contents. */
7299
7622
  declare function sceneToAdapter<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>, options?: SceneToAdapterOptions<TData, TLayer, TPose>): SceneCanvasAdapter<TData, TLayer, TPose>;
7300
7623
 
7301
7624
  /**
@@ -7307,6 +7630,8 @@ declare function useSceneAdapter<TData, TLayer extends string, TPose>(scene: Sce
7307
7630
  /** Routes a group node as `'group'`, whatever its data holds. `inferredNodeRouting` leads
7308
7631
  * with it; spread it ahead of `defaultNodeRouting`, which is the shape-kind table alone. */
7309
7632
  declare const groupNodeRouting: NodeRoutingEntry;
7633
+ /** Routes a boolean group (`booleanGroupFields`) as `'boolean'`: its data holds no path of its own. */
7634
+ declare const booleanGroupRouting: NodeRoutingEntry;
7310
7635
  /**
7311
7636
  * Routing classifiers for the kit's built-in shape kinds
7312
7637
  * (`KIT_SHAPE_KINDS`): each entry matches `data.kind === '<name>'`. Routing
@@ -7333,9 +7658,10 @@ declare const inferredNodeRouting: readonly NodeRoutingEntry[];
7333
7658
  *
7334
7659
  * `schema` is a `PrefSection`, not the `PrefGroup` a preferences schema
7335
7660
  * is: a leaf's own key is its whole dotted node path (`pose.x`,
7336
- * `data.fill`, `data.style.fontSize`), rooted at `pose` or `data`. The
7337
- * sections it nests are headings only; their keys do not contribute to
7338
- * the node path.
7661
+ * `data.fill`, `data.style.fontSize`), rooted at `pose` or `data`, or a
7662
+ * field the node declares for its children (`clip`, `units.unit`), which a
7663
+ * panel writes through `scene.setClip` / `scene.setUnits`. The sections it
7664
+ * nests are headings only; their keys do not contribute to the node path.
7339
7665
  *
7340
7666
  * Kind names share the routing trait's vocabulary — an entry registered
7341
7667
  * as `'rect'` describes nodes `NodeRouting.classify` maps to `'rect'`.
@@ -7416,8 +7742,10 @@ interface PreviewNode<TData, TLayer extends string, TPose> {
7416
7742
  id: NodeId;
7417
7743
  /** The node as committed. */
7418
7744
  node: Node<TData, TLayer, TPose>;
7419
- /** The pose a source previews, else the node's effective pose — where the
7420
- * scene's overrides put it mid-transform. */
7745
+ /** Where the node draws, in world: the pose a source previews, else its
7746
+ * effective pose — where the scene's overrides put it mid-transform —
7747
+ * folded through every container's frame, previewed or not, and scrolled
7748
+ * as the view scrolls it. */
7421
7749
  pose: TPose;
7422
7750
  /** The interim data, or the committed one when only the pose is in flight. */
7423
7751
  data: TData;
@@ -7426,13 +7754,17 @@ interface PreviewNode<TData, TLayer extends string, TPose> {
7426
7754
  * reflowing into its destination slot. It reads better painted settled.
7427
7755
  */
7428
7756
  opaque: boolean;
7429
- /** Previewed descendants, so a container's ghost brings its children. */
7757
+ /** Previewed descendants, and those a previewed frame carries, so a
7758
+ * container's ghost brings its children. */
7430
7759
  children: PreviewNode<TData, TLayer, TPose>[];
7431
7760
  }
7432
7761
  /**
7433
7762
  * The previewing subtrees, as roots. A previewed node whose parent is also
7434
7763
  * previewing is a child of that parent's entry rather than a root of its own,
7435
7764
  * which is what lets a caller draw a container and its contents as one thing.
7765
+ * A previewed container whose pose is a frame brings every child it carries,
7766
+ * previewed or not. A source previews a pose in the frame the node is stored
7767
+ * in; each entry's pose is in world.
7436
7768
  *
7437
7769
  * An id with no node is skipped: an insert previews before the node it will
7438
7770
  * create exists.
@@ -7472,10 +7804,6 @@ declare function publishPreviews<TData, TLayer extends string, TPose>(scene: Sce
7472
7804
  * start produces a zero-area drag rect around a trail that swept the page.
7473
7805
  */
7474
7806
 
7475
- type Point$2 = {
7476
- x: number;
7477
- y: number;
7478
- };
7479
7807
  /** The fields of an `insertPreview` overlay this needs. `canvas/deps/insert`
7480
7808
  * passes the equivalent from its own `(bounds, extras)` commit arguments. */
7481
7809
  interface InsertPreviewLike {
@@ -7493,24 +7821,24 @@ type InsertPreviewGeometry = {
7493
7821
  kind: 'box';
7494
7822
  } | {
7495
7823
  kind: 'line';
7496
- a: Point$2;
7497
- b: Point$2;
7824
+ a: Point;
7825
+ b: Point;
7498
7826
  } | {
7499
7827
  kind: 'polygon';
7500
- center: Point$2;
7828
+ center: Point;
7501
7829
  radius: number;
7502
7830
  sides: number;
7503
7831
  rotation: number;
7504
7832
  } | {
7505
7833
  kind: 'star';
7506
- center: Point$2;
7834
+ center: Point;
7507
7835
  outerRadius: number;
7508
7836
  innerRadius: number;
7509
7837
  points: number;
7510
7838
  rotation: number;
7511
7839
  } | {
7512
7840
  kind: 'pencil';
7513
- samples: ReadonlyArray<Point$2>;
7841
+ samples: ReadonlyArray<Point>;
7514
7842
  };
7515
7843
  /** An in-flight insert's shape, resolved from its drag rect and `extras`. */
7516
7844
  interface InsertPreviewExtent {
@@ -7541,17 +7869,13 @@ declare function insertPreviewExtent(ov: InsertPreviewLike): InsertPreviewExtent
7541
7869
  * `DrawCommand`, no style, no React, no dispatcher. World coordinates only.
7542
7870
  */
7543
7871
 
7544
- type Point$1 = {
7545
- x: number;
7546
- y: number;
7547
- };
7548
7872
  /**
7549
7873
  * The chrome-caps id a surface consults before painting each variant. The
7550
7874
  * gating itself is the painter's — two views of one surface may disagree about
7551
7875
  * whether to show an in-flight marquee — but the id is not something a caller
7552
7876
  * should have to guess.
7553
7877
  */
7554
- type OverlayVisibilityId = 'action.marquee' | 'action.lasso' | 'action.insert-preview' | 'action.polyline' | 'action.brush';
7878
+ type OverlayVisibilityId = 'action.marquee' | 'action.lasso' | 'action.insert-preview' | 'action.polyline' | 'action.brush' | 'action.reason';
7555
7879
  /**
7556
7880
  * One in-flight overlay, in world coordinates.
7557
7881
  *
@@ -7572,9 +7896,9 @@ type ResolvedOverlay = {
7572
7896
  visibilityId: 'action.lasso';
7573
7897
  /** The trail so far, at least two long. The region it encloses is the
7574
7898
  * trail closed back to its first vertex. */
7575
- vertices: ReadonlyArray<Point$1>;
7899
+ vertices: ReadonlyArray<Point>;
7576
7900
  /** Live pointer position — the trail's last vertex until it advances. */
7577
- current: Point$1;
7901
+ current: Point;
7578
7902
  shiftHeld: boolean;
7579
7903
  } | {
7580
7904
  kind: 'insertPreview';
@@ -7586,7 +7910,7 @@ type ResolvedOverlay = {
7586
7910
  geometry: InsertPreviewGeometry;
7587
7911
  /** The drag's anchor — a growth axis to mark. Absent for a pencil, which
7588
7912
  * has none. */
7589
- anchorPoint?: Point$1;
7913
+ anchorPoint?: Point;
7590
7914
  /** World affines the shape will also be drawn under, as the action gave them. */
7591
7915
  copies?: readonly (readonly [number, number, number, number, number, number])[];
7592
7916
  /** The action's per-shape payload, verbatim. Carries what geometry
@@ -7597,7 +7921,7 @@ type ResolvedOverlay = {
7597
7921
  visibilityId: 'action.polyline';
7598
7922
  /** The run, at least two long, open — the last point does not join the
7599
7923
  * first. A closed sweep is a `lasso`. */
7600
- points: ReadonlyArray<Point$1>;
7924
+ points: ReadonlyArray<Point>;
7601
7925
  /** What the run is, for a painter choosing a style. Never defaulted
7602
7926
  * away: `'chrome'` when the action named none. A role the painter has
7603
7927
  * no style for is drawn as plain chrome, not dropped. */
@@ -7606,9 +7930,15 @@ type ResolvedOverlay = {
7606
7930
  kind: 'brush';
7607
7931
  visibilityId: 'action.brush';
7608
7932
  /** The brush's path, at least one point; the last is where it is now. */
7609
- points: ReadonlyArray<Point$1>;
7933
+ points: ReadonlyArray<Point>;
7610
7934
  /** On screen: a painter draws it at this size at every zoom. */
7611
7935
  radiusPx: number;
7936
+ } | {
7937
+ kind: 'reason';
7938
+ visibilityId: 'action.reason';
7939
+ /** The pointer, which a painter shows `text` beside. */
7940
+ at: Point;
7941
+ text: string;
7612
7942
  };
7613
7943
  /** The overlays worth painting, in the order the handles published them. */
7614
7944
  declare function resolveOverlays(overlays: Iterable<OngoingOverlay>): ResolvedOverlay[];
@@ -7838,7 +8168,7 @@ declare function useDevtoolsLabel(): string | null;
7838
8168
  */
7839
8169
  declare function createEnteredGroupScope(opts: {
7840
8170
  entered: EnteredGroupApi;
7841
- scene: Pick<Scene<unknown, string, unknown>, 'ancestorsOf'>;
8171
+ scene: Pick<Scene<unknown, string, unknown>, 'ancestorsOf' | 'get'>;
7842
8172
  /** Alpha for a node outside the entered group. Default `OUT_OF_SCOPE_ALPHA`. */
7843
8173
  dimAlpha?: number;
7844
8174
  }): NodeScope;
@@ -8108,160 +8438,6 @@ interface CreateTextLayerOpts<T> {
8108
8438
  /** Build a `RenderLayer` that emits one `TextDrawCommand` per text node. */
8109
8439
  declare function createTextLayer<T>(opts: CreateTextLayerOpts<T>): RenderLayer<unknown>;
8110
8440
 
8111
- /** A scene `drawOne` that leaves out one node's glyphs. */
8112
- type EditingDrawOne = <TNode extends Node<unknown, string, unknown>>(node: TNode, pose: unknown, view?: View, ctx?: NodePaintCtx) => DrawCommand[];
8113
-
8114
- /**
8115
- * Union math over rect-shaped poses.
8116
- *
8117
- * Two answers, deliberately distinct. `unionBounds` folds the *unrotated*
8118
- * boxes and is what commit-time actions want, because they go on to write
8119
- * poses back in that same frame. `unionAABB` expands each rotated member to
8120
- * the extent of its ink first, and is what anything a user looks at or clicks
8121
- * wants — selection chrome, gesture bounds, an export viewBox. Folding the
8122
- * unrotated box there under-reports the extent of a rotated member exactly
8123
- * when the consumer is watching it move.
8124
- */
8125
-
8126
- /** Compute the AABB envelope of a set of rect-shaped poses, ignoring any
8127
- * rotation they carry. See the module docstring before reaching for this
8128
- * over {@link unionAABB}. */
8129
- declare function unionBounds<TPose extends RectPose>(poses: Iterable<TPose>): RectPose | null;
8130
- /**
8131
- * Axis-align a pose that carries a `rotation` or a `transform`: returns the
8132
- * AABB of the box as drawn, its four corners through `poseFrameOf`, with both
8133
- * fields dropped.
8134
- *
8135
- * A pose with neither is returned as-is.
8136
- */
8137
- declare function axisAlignedBounds<TPose extends RectPose>(b: TPose): RectPose;
8138
- /**
8139
- * Fold every part into one world-space AABB, skipping `null` / `undefined`
8140
- * entries. Rotated parts are expanded via {@link axisAlignedBounds} first;
8141
- * the result never carries a `rotation` (a union of several oriented boxes
8142
- * has no single orientation to report).
8143
- *
8144
- * Returns `null` when nothing was contributed.
8145
- */
8146
- declare function unionAABB<TPose extends RectPose>(parts: Iterable<TPose | null | undefined>): RectPose | null;
8147
-
8148
- /**
8149
- * `useSceneTextEdit` — scene-aware wrapper around `useTextEdit`: scene
8150
- * lookups for text / style / runs / screen-pose, and
8151
- * `scene.update(id, { data })` for commits. The overlay and a double-click
8152
- * both read the pose a node is painted at, so text inside a container whose
8153
- * pose is a frame is edited where it is drawn.
8154
- *
8155
- * Defaults assume the node's `data` carries `text` / `style` / `runs`
8156
- * directly. For custom data shapes, override any of the optional projections.
8157
- * Consumers with non-rect poses should drop down to raw `useTextEdit` and
8158
- * supply their own `getScreenPose`.
8159
- */
8160
-
8161
- /** Shape the default projections expect `data` to satisfy. All fields
8162
- * optional so any object satisfies the constraint — projections fill in
8163
- * the gaps for non-default shapes. */
8164
- interface DefaultTextData {
8165
- text?: string;
8166
- style?: TextStyle;
8167
- runs?: readonly StyledRun[];
8168
- fill?: Fill | Inherit | null;
8169
- stroke?: Stroke | Inherit | null;
8170
- verticalAlign?: TextVerticalAlign;
8171
- padding?: number;
8172
- overflow?: TextOverflow;
8173
- }
8174
- /** All-optional projections + fontSize fallback. */
8175
- interface UseSceneTextEditOptions<TData> {
8176
- /**
8177
- * Is this node text? A double-click opens an edit only on a node that
8178
- * answers yes, and passes through any other to the text under it. Default:
8179
- * `isTextData`, the test `inferredNodeRouting` classifies a text node by. Pass one when `getText` reads some other shape.
8180
- */
8181
- isText?: (data: TData) => boolean;
8182
- /** Read plain text from `data`. Default: `data.text ?? ''`. */
8183
- getText?: (data: TData) => string;
8184
- /** Read style from `data`. Default: `data.style`. */
8185
- getStyle?: (data: TData) => TextStyle | undefined;
8186
- /** Read the node's paint from `data`. Default: `data.fill` / `data.stroke`. */
8187
- getPaint?: (data: TData) => TextPaint | undefined;
8188
- /** Read rich-text runs from `data`. Default: `data.runs`. */
8189
- getRuns?: (data: TData) => readonly StyledRun[] | undefined;
8190
- /** Read the box vertical alignment from `data`. Default: `data.verticalAlign`. */
8191
- getVerticalAlign?: (data: TData) => TextVerticalAlign | undefined;
8192
- /** Read the inset from the node's box to its text from `data`. Default: `data.padding`. */
8193
- getPadding?: (data: TData) => number | undefined;
8194
- /** Read whether the node cuts its text at its box from `data`, which the
8195
- * overlay then does too. Default: `data.overflow`. */
8196
- getOverflow?: (data: TData) => TextOverflow | undefined;
8197
- /** Produce updated data with new text. Default: `{ ...data, text }`. */
8198
- setText?: (data: TData, text: string) => TData;
8199
- /** Produce updated data with new runs. Default: `{ ...data, runs }`. */
8200
- setRuns?: (data: TData, runs: StyledRun[]) => TData;
8201
- /**
8202
- * Produce updated data with a new node-wide style. Default:
8203
- * `{ ...data, style }`. Written only when a range toggle has to *clear* a
8204
- * flag the node itself sets — the run algebra is additive, so that edit
8205
- * lowers the node flag and raises it on the runs outside the range. See
8206
- * `useTextEdit`'s `setStyle`.
8207
- *
8208
- * An edit's text, runs, and style are folded through these three and
8209
- * written as one `scene.update`, so a commit is one undo step.
8210
- */
8211
- setStyle?: (data: TData, style: TextStyle) => TData;
8212
- /** Fallback fontSize when `style.fontSize` is unset. Default `16`. */
8213
- defaultFontSize?: number;
8214
- /**
8215
- * The view to project through. Omit it and the view is read live from the
8216
- * weasel canvas mounted inside `container` (the one a double-click landed
8217
- * on, when there are several). With no canvas there, the node's world box
8218
- * is passed through as screen pixels.
8219
- *
8220
- * A thunk is re-read on every projection; a plain `View` is the value from
8221
- * the render that supplied it.
8222
- */
8223
- view?: View | (() => View);
8224
- /**
8225
- * Forwarded to `useTextEdit`: is `el` part of the editor's own chrome?
8226
- * Focus moving into it does not end the edit. Wire it to whatever renders
8227
- * the character controls.
8228
- */
8229
- isEditorChrome?: (el: Element) => boolean;
8230
- /** Forwarded to `useTextEdit`: what Escape does to the edit. */
8231
- escape?: 'cancel' | 'commit';
8232
- /** Forwarded to `useTextEdit`: how long an edit waits for its face. */
8233
- fontHold?: number;
8234
- /** Forwarded to `useTextEdit`: called as an edit of the node `id` opens,
8235
- * whichever way it was started. */
8236
- onStart?: (id: string) => void;
8237
- /** Forwarded to `useTextEdit`: called as the edit of `id` closes, after
8238
- * any commit has been written to the scene. */
8239
- onEnd?: (id: string) => void;
8240
- }
8241
- /** Return shape extends `UseTextEditReturn` with an `onDoubleClick`
8242
- * binding for the canvas container. Double-clicking inside a text
8243
- * node enters edit mode with the caret seeded at the clicked glyph. */
8244
- interface UseSceneTextEditReturn extends UseTextEditReturn {
8245
- /** Bind to the element wrapping `<SceneCanvas>` (the same element
8246
- * passed as `container`, or any ancestor that receives the dblclick
8247
- * bubble). Starts an edit on the top-most text node under the cursor. */
8248
- onDoubleClick: (e: MouseEvent<HTMLElement>) => void;
8249
- /** The `isText` option asked of the node with this id: what
8250
- * `TextEditDep.isTextNode` wants, so both ways into an edit agree. */
8251
- isTextNode: (id: string) => boolean;
8252
- /**
8253
- * `defaultDrawOne`, less the glyphs of the node being edited: the overlay
8254
- * stands in for its text, and the rest of the node, a `background` among
8255
- * it, goes on painting. Pass it as `layers.scene.drawOne`, with
8256
- * `paintBounds: defaultPaintBounds`, in place of an `alphaFor` that hides
8257
- * the whole node.
8258
- */
8259
- drawOne: EditingDrawOne;
8260
- }
8261
- /** Wire double-click-to-edit text on a scene: mounts a DOM editing overlay
8262
- * over the node being edited and writes the result back as an undoable op. */
8263
- declare function useSceneTextEdit<TData extends DefaultTextData, TLayer extends string, TPose extends RectPose = RectPose>(scene: Scene<TData, TLayer, TPose>, container: HTMLElement | null, options?: UseSceneTextEditOptions<TData>): UseSceneTextEditReturn;
8264
-
8265
8441
  /** How Outline Stroke and a Boolean operation counting strokes measure one. */
8266
8442
  interface StrokeRegionOptions {
8267
8443
  /** The view scale a `{ px }` width resolves against: one number, or the
@@ -8324,9 +8500,9 @@ declare function useCreateOutlinesAdapter(adapter: CreateOutlinesAdapter): void;
8324
8500
  * only round-trips the 6-char form, so call-sites pad the saved alpha back on
8325
8501
  * when the user picks via the native widget. */
8326
8502
  /** Expand `#rgb` / `#rgba` / `#rrggbb` to `#rrggbbaa`. Pads `ff` when no alpha
8327
- * channel is present. Non-hex inputs (named colors, `rgba(...)`) are
8328
- * returned unchanged — the kit's renderer accepts arbitrary CSS, and
8329
- * we only normalize the hex shapes we actually persist. */
8503
+ * channel is present. Anything else — named colors, `rgba(...)`, a malformed
8504
+ * `#` value — is returned unchanged: the kit's renderer accepts arbitrary CSS,
8505
+ * and we only normalize the hex shapes we actually persist. */
8330
8506
  declare function toHex8(color: string): string;
8331
8507
  /** Return the alpha channel of `color` as 0..1. Defaults to 1 when the
8332
8508
  * color is not in 8-char hex form. */
@@ -8788,12 +8964,18 @@ declare function registeredOpNames(): readonly string[];
8788
8964
  * `getParent` returns the live parent at call time so mid-batch
8789
8965
  * parent updates compose correctly. */
8790
8966
  declare function scenePoseAdapter(scene: Scene<unknown, string, unknown>): PoseAdapter<unknown>;
8967
+ /** `scenePoseAdapter` read as the view shows it: each scrolled container's
8968
+ * children moved by its offset. For a gesture, which reads the world it
8969
+ * writes back through the same fold, so what it stores is the content
8970
+ * position; the layout pass and other document writers use
8971
+ * `scenePoseAdapter`. */
8972
+ declare function sceneViewPoseAdapter(scene: Scene<unknown, string, unknown>): PoseAdapter<unknown>;
8791
8973
 
8792
8974
  /**
8793
8975
  * Bringing a node's descendants along when something writes the node's pose
8794
8976
  * and nothing writes theirs: a layout restacking a container, a drop landing
8795
- * one, a page move. Under absolute poses a descendant stores its own world
8796
- * pose, so it stays behind unless it is written too.
8977
+ * one, a page move. A descendant stored in a frame that moves rides it; one
8978
+ * stored above it, under an envelope, stays behind unless it is written too.
8797
8979
  */
8798
8980
 
8799
8981
  /** What carrying reads: the tree, every stored pose, and how poses compose. */
@@ -8813,6 +8995,15 @@ declare function sceneCarrySource(scene: Scene<unknown, string, unknown>): Carry
8813
8995
  * under it are left to whoever moves it.
8814
8996
  */
8815
8997
  declare function carriedDescendants<TPose>(source: CarrySource<TPose>, root: NodeId, translate: (world: TPose, id: NodeId) => TPose | null, moving?: (id: NodeId) => boolean): Map<NodeId, TPose>;
8998
+ /** The nodes whose stored pose is in `id`'s frame: its children, and through
8999
+ * a child that is an envelope, that child's own. */
9000
+ declare function heldInFrame(scene: {
9001
+ childrenOf(id: NodeId): readonly NodeId[];
9002
+ get(id: NodeId): {
9003
+ dependsOn?: unknown;
9004
+ derivePose?: unknown;
9005
+ } | undefined;
9006
+ }, id: NodeId): NodeId[];
8816
9007
 
8817
9008
  /** @internal */
8818
9009
  interface HitAdapter<TNode extends {
@@ -8844,14 +9035,14 @@ interface NestedHitTester {
8844
9035
  /** Outermost-ancestor pick. Suitable as the chrome-level `pickEvery`: a
8845
9036
  * casual click selects the whole top-level ancestor. Returns `null` on
8846
9037
  * empty space. */
8847
- pickOutermost: (worldX: number, worldY: number) => string | null;
9038
+ pickOutermost: (world: WorldPoint) => string | null;
8848
9039
  /** Alt-aware selection-update pick. Without `alt`, returns the outermost
8849
9040
  * ancestor (same as `pickOutermost`). With `alt`, returns one level
8850
9041
  * deeper than the deepest currently-selected ancestor in the leaf's
8851
9042
  * chain — repeated alt-clicks step ancestor → descendant → leaf. With
8852
9043
  * `alt` and nothing in the chain selected, jumps straight to the leaf.
8853
9044
  * Plug into `useSelectTool({ pickBest })`. */
8854
- pickBest: (worldX: number, worldY: number, alt: boolean, selection: readonly string[]) => string | null;
9045
+ pickBest: (world: WorldPoint, alt: boolean, selection: readonly string[]) => string | null;
8855
9046
  }
8856
9047
  /** Build hit-testers that respect containers: a plain click selects the
8857
9048
  * top-level ancestor, and alt-clicking descends one level at a time toward
@@ -8888,14 +9079,14 @@ declare function createScene<TData, TLayer extends string, TPose = RectPose>(opt
8888
9079
  * registry passed in `options`. Throws on unknown version, unknown registry
8889
9080
  * keys, or invalid scene shape (cross-layer subtrees, unknown layer ids).
8890
9081
  * The scene starts with empty history. */
8891
- declare function sceneFromJSON<TData, TLayer extends string, TPose>(json: SerializedScene<TData, TLayer, TPose> | SerializedSceneV1<TData, TLayer, TPose>, options?: {
9082
+ declare function sceneFromJSON<TData, TLayer extends string, TPose>(json: SavedScene<TData, TLayer, TPose>, options?: {
8892
9083
  registry?: SceneRegistry<TPose, TData, TLayer>;
8893
9084
  historyLimit?: number;
8894
9085
  coalesceWindowMs?: number;
8895
9086
  generateId?: () => NodeId;
8896
9087
  ops?: Readonly<Record<string, RegisteredOp<unknown>>>;
8897
- composition?: UseSceneOptions<TData, TLayer, TPose>['composition'];
8898
- layoutFrame?: UseSceneOptions<TData, TLayer, TPose>['layoutFrame'];
9088
+ composition?: SceneOptions<TData, TLayer, TPose>['composition'];
9089
+ layoutFrame?: SceneOptions<TData, TLayer, TPose>['layoutFrame'];
8899
9090
  } & SpecsFromSerializedOptions<TData, TLayer, TPose>): Scene<TData, TLayer, TPose>;
8900
9091
 
8901
9092
  /**
@@ -8967,6 +9158,7 @@ interface StatedNodeFields {
8967
9158
  locked?: boolean;
8968
9159
  units?: UnitScope;
8969
9160
  clip?: NodeClip;
9161
+ consumesChildren?: boolean;
8970
9162
  }
8971
9163
  /** The plain optional fields of a node or spec as a spread for `scene.add`:
8972
9164
  * each present only when stated, so an unstated one keeps the scene's
@@ -8976,6 +9168,41 @@ declare const statedFields: (n: StatedNodeFields & {
8976
9168
  kind?: string;
8977
9169
  }) => StatedNodeFields;
8978
9170
 
9171
+ /**
9172
+ * Reading a save from before a scene's poses composed by default. Versions 1
9173
+ * and 2 stored every pose as world; version 3 stores a child's pose in the
9174
+ * frame of the nearest container that defines one.
9175
+ */
9176
+
9177
+ /** What localizing reads of a node: where it sits, its pose, and whether it is a frame. */
9178
+ interface PlacedSpec<TPose> {
9179
+ id?: NodeId | string;
9180
+ parent?: NodeId | string | null;
9181
+ pose: TPose;
9182
+ dependsOn?: unknown;
9183
+ derivePose?: unknown;
9184
+ }
9185
+ /**
9186
+ * `specs`, whose every pose is world, with each pose made local to the frame
9187
+ * it is stored in under `composition`: an old save as it loads, or a tree an
9188
+ * importer measured in world. A child of a container whose pose derives from
9189
+ * its children shares that container's frame, so it is rebased against the
9190
+ * frame above it.
9191
+ */
9192
+ declare function localizeWorldPoses<TPose, TSpec extends PlacedSpec<TPose>>(specs: readonly TSpec[], composition: PoseComposition<TPose>): TSpec[];
9193
+ /**
9194
+ * Where each of `specs` draws: its pose folded through the frames above it
9195
+ * under `composition`, by id. The inverse of {@link localizeWorldPoses}, for
9196
+ * a reader of a spec list that is not in a scene yet.
9197
+ */
9198
+ declare function worldPosesOf<TPose, TSpec extends PlacedSpec<TPose>>(specs: readonly TSpec[], composition: PoseComposition<TPose>): Map<string, TPose>;
9199
+ /**
9200
+ * `specs`, whose every pose is world, as they are stored once added to
9201
+ * `scene`: each made local to the frame it lands in, whether that frame is
9202
+ * among `specs` or already in the scene.
9203
+ */
9204
+ declare function localizeInScene<TPose, TSpec extends PlacedSpec<TPose>>(scene: Scene<unknown, string, TPose>, specs: readonly TSpec[]): TSpec[];
9205
+
8979
9206
  /**
8980
9207
  * Build a {@link PoseOverrides} map.
8981
9208
  *
@@ -9207,6 +9434,33 @@ declare function unionOfChildren<TPose>(_node: unknown, deps: readonly ({
9207
9434
  pose: TPose;
9208
9435
  } | undefined)[]): TPose | null;
9209
9436
 
9437
+ /** The booleans that make one shape of their operands: the Pathfinder's four
9438
+ * shape modes, and what a boolean group can be set to. */
9439
+ type BooleanShapeOp = 'union' | 'intersect' | 'subtract' | 'exclude';
9440
+
9441
+ /** A boolean group's path, from its children: see `booleanGroup.ts`. */
9442
+
9443
+ /** Registry key for {@link booleanOfChildren}. */
9444
+ declare const BOOLEAN_OF_CHILDREN = "kit:booleanOfChildren";
9445
+ /** The operation a boolean group's `data.boolean` names; union when it names none. */
9446
+ declare function booleanOpOf(data: unknown): BooleanShapeOp;
9447
+ /**
9448
+ * A boolean group's path: `data.boolean` over its children's outlines, back
9449
+ * to front, so subtract takes everything in front from the backmost child. A
9450
+ * group among them is one operand, the union of what it shows. A hidden child
9451
+ * is no operand. `null` when no child has an outline, which draws nothing.
9452
+ */
9453
+ declare function booleanOfChildren(node: {
9454
+ data?: unknown;
9455
+ }, deps: readonly (DerivedDep<unknown> | undefined)[]): Path | null;
9456
+
9457
+ /**
9458
+ * The fields that make a node a boolean group, for `scene.add` beside its
9459
+ * layer, pose, parent and `data`. Its children are added under it as usual;
9460
+ * its pose follows theirs, so the one it is added with is a placeholder.
9461
+ */
9462
+ declare function booleanGroupFields<TPose>(): Pick<AddNodeSpec<unknown, string, TPose>, 'kind' | 'consumesChildren' | 'dependsOn' | 'derivePath' | 'derivePose'>;
9463
+
9210
9464
  /** The layer-record field the predicates below read. */
9211
9465
  interface AnnotationFlag {
9212
9466
  readonly id: string;
@@ -9294,7 +9548,7 @@ interface MeasureHit {
9294
9548
  * units of it, else a line within the same distance. A hidden or locked
9295
9549
  * measurement (`nodeGates`) is passed over.
9296
9550
  */
9297
- declare function measureAt(scene: Pick<Scene<unknown, string, unknown>, 'renderOrderNodes' | 'get' | 'layers' | 'overrides'>, ms: Pick<Measurements, 'layer'>, p: MeasurePoint, tolerance: number): MeasureHit | null;
9551
+ declare function measureAt(scene: Pick<Scene<unknown, string, unknown>, 'nodesOnLayer' | 'get' | 'layers' | 'overrides'>, ms: Pick<Measurements, 'layer'>, p: MeasurePoint, tolerance: number): MeasureHit | null;
9298
9552
  /** Options for `measureEndSource`. */
9299
9553
  interface MeasureEndSourceOptions {
9300
9554
  /** Overrides the canvas's reach for measurement ends, in screen px. */
@@ -9843,6 +10097,21 @@ interface EffectItem {
9843
10097
  middle: number;
9844
10098
  /** What it paints; empty for a piece that only takes room, such as a space. */
9845
10099
  parts: readonly DerivedPart[];
10100
+ /** Rules it carries across its stretch — a text decoration cut to one cluster. A band that runs to the item's end
10101
+ * joins one alike in paint and depth that starts the next item, so the effect draws them as one ribbon bent along
10102
+ * the path rather than as rigid pieces. */
10103
+ bands?: readonly EffectBand[];
10104
+ }
10105
+ /** A rule across part of an item, in the item's frame. */
10106
+ interface EffectBand {
10107
+ /** Its ends along the item, 0..`length`. */
10108
+ x0: number;
10109
+ x1: number;
10110
+ /** Its top and bottom edges, y down from the anchor line. */
10111
+ y0: number;
10112
+ y1: number;
10113
+ fill: Fill | null;
10114
+ stroke: Stroke | null;
9846
10115
  }
9847
10116
  /** A source shape. */
9848
10117
  interface EffectSource {
@@ -9913,7 +10182,8 @@ interface BlendEffect extends BlendPathsOptions, PathEffectOptions {
9913
10182
 
9914
10183
  /**
9915
10184
  * Text (or any shape) laid along a path, item by item. Its sources are `[text, path]`. Only the text's first laid line
9916
- * follows the path; a color glyph keeps its advance and paints nothing; underlines and other decorations are not drawn.
10185
+ * follows the path; a color glyph keeps its advance and paints nothing. An item's bands — underline, strikethrough and
10186
+ * overline — join their alike neighbors' and bend with the path as one ribbon, while the glyphs stay rigid.
9917
10187
  * On an open path an item whose middle falls past either end is not drawn; on a closed one the text wraps past the
9918
10188
  * seam, and an item a whole lap on from the first item's start is not drawn.
9919
10189
  */
@@ -9940,7 +10210,8 @@ declare function textAlongParts(effect: TextAlongEffect, items: readonly EffectI
9940
10210
  /**
9941
10211
  * The path effects, each as the parts it paints from its sources: a blend's
9942
10212
  * steps between two shapes, a shape bent along a spine, copies of a shape
9943
- * along a path, text laid along a path.
10213
+ * along a path, text laid along a path, and one shape roughened, zigzagged,
10214
+ * or puckered and bloated.
9944
10215
  */
9945
10216
 
9946
10217
  /** A shape bent along a spine. Its sources are `[shape, spine]`. */
@@ -9951,8 +10222,21 @@ interface BendAlongEffect extends BendAlongPathOptions, PathEffectOptions {
9951
10222
  interface RepeatAlongEffect extends Omit<RepeatAlongPathOptions, 'flattenTolerance'>, PathEffectOptions {
9952
10223
  kind: 'repeatAlong';
9953
10224
  }
10225
+ /** A shape with every point of its outline moved at random. Its source is `[shape]`. */
10226
+ interface RoughenEffect extends RoughenPathOptions, PathEffectOptions {
10227
+ kind: 'roughen';
10228
+ }
10229
+ /** A shape with its outline pushed alternately to either side. Its source is `[shape]`. */
10230
+ interface ZigzagEffect extends ZigzagPathOptions, PathEffectOptions {
10231
+ kind: 'zigzag';
10232
+ }
10233
+ /** A shape with its anchors pulled toward its middle and its handles pushed
10234
+ * away, or the reverse. Its source is `[shape]`. */
10235
+ interface PuckerBloatEffect extends PuckerBloatPathOptions, PathEffectOptions {
10236
+ kind: 'puckerBloat';
10237
+ }
9954
10238
  /** A path effect, as a node's `data.pathEffect` holds it. */
9955
- type PathEffect = BlendEffect | BendAlongEffect | RepeatAlongEffect | TextAlongEffect;
10239
+ type PathEffect = BlendEffect | BendAlongEffect | RepeatAlongEffect | TextAlongEffect | RoughenEffect | ZigzagEffect | PuckerBloatEffect;
9956
10240
 
9957
10241
  /**
9958
10242
  * A path effect as a scene node: a leaf whose `dependsOn` names its sources,
@@ -10162,6 +10446,29 @@ declare function commitBooleanPieces(adapter: BooleansAdapter, operands: Boolean
10162
10446
  * that should count strokes as they do. */
10163
10447
  declare const PATHFINDER_STROKES: BooleanStrokes;
10164
10448
 
10449
+ /** The Pathfinder keymap's id; its leader action is `keymap.pathfinder`. */
10450
+ declare const PATHFINDER_KEYMAP_ID = "pathfinder";
10451
+ /** Alt+P, by the physical key too, since with Alt held on a Mac it types `π`. */
10452
+ declare const PATHFINDER_LEADER: KeySpec;
10453
+ /**
10454
+ * The Pathfinder operations on held keys, behind the leader Alt+P: holding
10455
+ * an operation's key previews it on the selection, releasing runs it, and
10456
+ * Escape while it is held cancels it. Each binding's id is its hold's action
10457
+ * id (`pathfinder.union.hold`), which is what a host rebinds it by. The
10458
+ * operations themselves come from the `paths` preset; this carries only their
10459
+ * holds. Install it with `<SceneCanvas ambient>`.
10460
+ */
10461
+ declare const PATHFINDER_KEYMAP: readonly Contribution$1<never>[];
10462
+
10463
+ type AnyScene$1 = Scene<unknown, string, unknown>;
10464
+ /**
10465
+ * Put `ids` under a new boolean group of `op`, in the frontmost one's place, as
10466
+ * one undo entry; nothing moves on screen. The group wears the frontmost
10467
+ * operand's `fill` and `stroke`. Returns its id, or `null` when fewer than two
10468
+ * of `ids` are nodes on one layer.
10469
+ */
10470
+ declare function makeBooleanGroup(scene: AnyScene$1, ids: readonly string[], op?: BooleanShapeOp): NodeId | null;
10471
+
10165
10472
  /** Default world-space distance from the rect's top edge to the rotation
10166
10473
  * handle's center. Matches the demo's visual default; consumers can
10167
10474
  * override per-call. Unscaled — kit-internal use sites multiply by
@@ -10194,10 +10501,7 @@ declare function rotationHandle(pose: {
10194
10501
  declare function hitRotationHandle(handle: Pick<RotationHandle, 'cx' | 'cy'>, px: number, py: number, radius: number): boolean;
10195
10502
 
10196
10503
  /** A point in world coordinates. */
10197
- interface DragRectPoint {
10198
- x: number;
10199
- y: number;
10200
- }
10504
+ type DragRectPoint = WorldPoint;
10201
10505
  /** The axis-aligned box between the drag's two corners, always with
10202
10506
  * non-negative extents regardless of drag direction. */
10203
10507
  interface DragRectBounds {
@@ -10350,10 +10654,7 @@ declare function dragPointOf(event: {
10350
10654
  }, view?: ViewLike): DragGesturePoint;
10351
10655
 
10352
10656
  /** A point in world coordinates. */
10353
- interface DragRadialPoint {
10354
- x: number;
10355
- y: number;
10356
- }
10657
+ type DragRadialPoint = WorldPoint;
10357
10658
  /** A radial drag expressed as its center and the polar coordinates of the
10358
10659
  * cursor relative to it. */
10359
10660
  interface DragRadialState {
@@ -10436,8 +10737,8 @@ interface PathAnchor {
10436
10737
  * anchor: its control becomes the first anchor's `controlIn`, the way
10437
10738
  * `pathToAnchors` reads it, so the two walkers count alike. */
10438
10739
  declare function enumerateAnchors(path: PolygonPath): PathAnchor[];
10439
- /** Mutate `coords` in-place: write `(x, y)` at `coordIndex`, return a new
10440
- * PolygonPath sharing the same commands but with a fresh coords buffer. */
10740
+ /** A new PolygonPath sharing `path`'s commands, with the point at `coordIndex`
10741
+ * moved to `(x, y)` in the path's own space, in a fresh coords buffer. */
10441
10742
  declare function withCoord(path: PolygonPath, coordIndex: number, x: number, y: number): PolygonPath;
10442
10743
 
10443
10744
  /** Result of a hit-test against a path's anchors / control handles. */
@@ -10549,13 +10850,6 @@ interface PoseTargetScene<TPose> extends PoseSource<TPose> {
10549
10850
  /** How `like`'s kind of pose maps to axes: the descriptor's own mapping, else its flat numeric
10550
10851
  * fields. Null for a pose with neither. */
10551
10852
  declare function poseAxes<TPose>(descriptor: PoseDescriptor<TPose> | undefined, like: TPose): TargetAxes<TPose> | null;
10552
- /** How a container's pose target carries its descendants, for {@link scenePoseTarget}. */
10553
- interface PoseCascade<TPose> {
10554
- /** Commits `pose` to the container, moving its descendants' poses with it. */
10555
- write(pose: TPose): void;
10556
- /** The descendants, each at the pose to show it at while the container shows at `pose`. */
10557
- beside(pose: TPose): Iterable<readonly [NodeId, TPose]>;
10558
- }
10559
10853
  /**
10560
10854
  * A {@link Target} over one node's pose. Animations on it commit their destination through
10561
10855
  * `set` as they start, and the pose on screen reaches the paint and pick walks as a pose
@@ -10571,11 +10865,9 @@ declare function createPoseTarget<TPose>(opts: PoseTargetOptions<TPose>): Target
10571
10865
  * a caller that wants the move in history records its own op first.
10572
10866
  *
10573
10867
  * Undefined for a node that is not in the scene, or whose pose has no axes. `descriptor`
10574
- * defaults to `RECT_POSE_DESCRIPTOR`. With `cascade`, for a container whose descendants hold
10575
- * poses of their own, a commit goes through `cascade.write` and the descendants are shown
10576
- * traveling beside the container. Both are read the first time a node's target is made.
10868
+ * defaults to `RECT_POSE_DESCRIPTOR`, and is read the first time a node's target is made.
10577
10869
  */
10578
- declare function scenePoseTarget<TPose>(scene: PoseTargetScene<TPose>, id: string, descriptor?: PoseDescriptor<TPose>, cascade?: PoseCascade<TPose>): Target<TPose> | undefined;
10870
+ declare function scenePoseTarget<TPose>(scene: PoseTargetScene<TPose>, id: string, descriptor?: PoseDescriptor<TPose>): Target<TPose> | undefined;
10579
10871
 
10580
10872
  /** What {@link createWrittenPoseTarget} takes. */
10581
10873
  interface WrittenPoseTargetOptions<TPose> {
@@ -10607,7 +10899,6 @@ interface SceneClipTargetsOptions<TPose> {
10607
10899
  }>>;
10608
10900
  /** As `scenePoseTarget` takes them. */
10609
10901
  descriptor?: PoseDescriptor<TPose>;
10610
- cascade?: PoseCascade<TPose>;
10611
10902
  }
10612
10903
  /**
10613
10904
  * A `ClipBinder.target` over a scene. `pose:<node id>` is that node's pose target, the one
@@ -11069,7 +11360,7 @@ interface UseRigNodeOptions<TPose> extends Pick<BindRigOptions<TPose>, 'apply' |
11069
11360
  declare function useRigNode<TPose>(options: UseRigNodeOptions<TPose>): Rig;
11070
11361
 
11071
11362
  /** A glyph this package draws, by its bare name. */
11072
- type CoreIconName = 'arrow' | 'ellipse' | 'eyedropper' | 'hand' | 'image' | 'lasso' | 'line' | 'pen' | 'pencil' | 'polygon' | 'rect' | 'select' | 'slice' | 'star' | 'sticky' | 'text' | 'unknown' | 'cut' | 'copy' | 'paste' | 'duplicate' | 'transformAgain' | 'group' | 'ungroup' | 'bringForward' | 'bringToFront' | 'sendBackward' | 'sendToBack' | 'flipX' | 'flipY' | 'delete' | 'undo' | 'redo' | 'measure' | 'tune' | 'alignLeft' | 'alignRight' | 'alignTop' | 'alignBottom' | 'alignCenterX' | 'alignCenterY' | 'distributeHorizontal' | 'distributeVertical' | 'union' | 'intersect' | 'subtract' | 'exclude' | 'divide' | 'crop' | 'trim' | 'merge' | 'join' | 'bridge' | 'cutAtCrossings' | 'simplify' | 'offsetPath' | 'retractHandles' | 'symmetricHandles' | 'holdHandleAngle' | 'holdHandleLength' | 'simplifyBrush' | 'harmonize' | 'averageAnchors' | 'bendSegment' | 'nudgeAnchors' | 'nudgeAnchorsUp' | 'nudgeAnchorsDown' | 'nudgeAnchorsLeft' | 'createOutlines' | 'outlineStroke' | 'bold' | 'italic' | 'underline' | 'strikethrough' | 'overline' | 'superscript' | 'subscript' | 'textAlignLeft' | 'textAlignCenter' | 'textAlignRight' | 'textAlignJustify' | 'textAlignTop' | 'textAlignMiddle' | 'textAlignBottom' | 'strokeWidth' | 'strokeCap' | 'strokeJoin' | 'strokeAlign' | 'capButt' | 'capRound' | 'capSquare' | 'joinMiter' | 'joinRound' | 'joinBevel' | 'alignInner' | 'alignCenter' | 'alignOuter' | 'dashSolid' | 'dashDashed' | 'dashDotted' | 'dashCustom' | 'paintSolid' | 'paintLinear' | 'paintRadial' | 'paintConic' | 'paintMesh' | 'paintPattern' | 'paintNone';
11363
+ type CoreIconName = 'arrow' | 'ellipse' | 'eyedropper' | 'hand' | 'image' | 'lasso' | 'line' | 'pen' | 'pencil' | 'polygon' | 'rect' | 'select' | 'slice' | 'star' | 'sticky' | 'text' | 'unknown' | 'cut' | 'copy' | 'paste' | 'duplicate' | 'transformAgain' | 'group' | 'ungroup' | 'bringForward' | 'bringToFront' | 'sendBackward' | 'sendToBack' | 'flipX' | 'flipY' | 'delete' | 'undo' | 'redo' | 'measure' | 'tune' | 'alignLeft' | 'alignRight' | 'alignTop' | 'alignBottom' | 'alignCenterX' | 'alignCenterY' | 'distributeHorizontal' | 'distributeVertical' | 'union' | 'intersect' | 'subtract' | 'exclude' | 'divide' | 'crop' | 'trim' | 'booleanGroup' | 'merge' | 'join' | 'bridge' | 'cutAtCrossings' | 'simplify' | 'offsetPath' | 'retractHandles' | 'symmetricHandles' | 'holdHandleAngle' | 'holdHandleLength' | 'simplifyBrush' | 'harmonize' | 'averageAnchors' | 'bendSegment' | 'nudgeAnchors' | 'nudgeAnchorsUp' | 'nudgeAnchorsDown' | 'nudgeAnchorsLeft' | 'createOutlines' | 'outlineStroke' | 'bold' | 'italic' | 'underline' | 'strikethrough' | 'overline' | 'superscript' | 'subscript' | 'textAlignLeft' | 'textAlignCenter' | 'textAlignRight' | 'textAlignJustify' | 'textAlignStart' | 'textAlignEnd' | 'textAlignTop' | 'textAlignMiddle' | 'textAlignBottom' | 'strokeWidth' | 'strokeCap' | 'strokeJoin' | 'strokeAlign' | 'capButt' | 'capRound' | 'capSquare' | 'joinMiter' | 'joinRound' | 'joinBevel' | 'alignInner' | 'alignCenter' | 'alignOuter' | 'dashSolid' | 'dashDashed' | 'dashDotted' | 'dashCustom' | 'paintSolid' | 'paintLinear' | 'paintRadial' | 'paintConic' | 'paintMesh' | 'paintPattern' | 'paintInherit' | 'paintNone' | 'markerNone' | 'markerArrow' | 'markerArrowOpen' | 'markerArrowConcave' | 'markerTriangleHollow' | 'markerDiamond' | 'markerDiamondHollow' | 'markerCircle' | 'markerSquare' | 'markerBar' | 'markerDot' | 'markerCrowOne' | 'markerCrowMany' | 'markerCrowZeroOne' | 'markerCrowOneMany' | 'markerCrowZeroMany';
11073
11364
  declare module '@weasel-js/icons' {
11074
11365
  interface IconName {
11075
11366
  'core:arrow': true;
@@ -11122,6 +11413,7 @@ declare module '@weasel-js/icons' {
11122
11413
  'core:divide': true;
11123
11414
  'core:crop': true;
11124
11415
  'core:trim': true;
11416
+ 'core:booleanGroup': true;
11125
11417
  'core:merge': true;
11126
11418
  'core:join': true;
11127
11419
  'core:bridge': true;
@@ -11153,6 +11445,8 @@ declare module '@weasel-js/icons' {
11153
11445
  'core:textAlignCenter': true;
11154
11446
  'core:textAlignRight': true;
11155
11447
  'core:textAlignJustify': true;
11448
+ 'core:textAlignStart': true;
11449
+ 'core:textAlignEnd': true;
11156
11450
  'core:textAlignTop': true;
11157
11451
  'core:textAlignMiddle': true;
11158
11452
  'core:textAlignBottom': true;
@@ -11179,7 +11473,24 @@ declare module '@weasel-js/icons' {
11179
11473
  'core:paintConic': true;
11180
11474
  'core:paintMesh': true;
11181
11475
  'core:paintPattern': true;
11476
+ 'core:paintInherit': true;
11182
11477
  'core:paintNone': true;
11478
+ 'core:markerNone': true;
11479
+ 'core:markerArrow': true;
11480
+ 'core:markerArrowOpen': true;
11481
+ 'core:markerArrowConcave': true;
11482
+ 'core:markerTriangleHollow': true;
11483
+ 'core:markerDiamond': true;
11484
+ 'core:markerDiamondHollow': true;
11485
+ 'core:markerCircle': true;
11486
+ 'core:markerSquare': true;
11487
+ 'core:markerBar': true;
11488
+ 'core:markerDot': true;
11489
+ 'core:markerCrowOne': true;
11490
+ 'core:markerCrowMany': true;
11491
+ 'core:markerCrowZeroOne': true;
11492
+ 'core:markerCrowOneMany': true;
11493
+ 'core:markerCrowZeroMany': true;
11183
11494
  }
11184
11495
  }
11185
11496
 
@@ -11200,27 +11511,59 @@ declare const PAINTED_CURSOR_LAYER_ID = "painted-cursor";
11200
11511
  */
11201
11512
  declare function createPaintedCursorLayer(state: PaintedCursorState): RenderLayer<unknown>;
11202
11513
 
11514
+ /** One preset as data: what it holds by id, for a tool that lists or rearranges presets. */
11515
+ interface PresetDescription {
11516
+ id: string;
11517
+ label: string;
11518
+ /** The package that ships it, as `describePresets` was told. */
11519
+ package: string;
11520
+ /** It has a role beyond actions, built-in tools, and includes, so its parts only work together. */
11521
+ atom: boolean;
11522
+ /** Its own action ids, in registration order. */
11523
+ actions: readonly string[];
11524
+ /** Its own tools' ids: built-ins with their sets opened, then tools of its own. */
11525
+ tools: readonly string[];
11526
+ /** The ids of the presets it includes. */
11527
+ includes: readonly string[];
11528
+ }
11529
+ /** Whether `preset` is an atom: it holds a role beyond actions, built-in tools, and includes. */
11530
+ declare function isAtom(preset: FeaturePreset): boolean;
11531
+ /**
11532
+ * Every preset reachable from `sources` (keyed by the package that ships them), its includes followed, once each,
11533
+ * each after the presets it includes. A preset reached from two packages is the first's.
11534
+ */
11535
+ declare function describePresets(sources: Readonly<Record<string, readonly FeaturePreset[]>>): PresetDescription[];
11536
+
11203
11537
  /**
11204
11538
  * Core's presets by name: what `features={['draw']}` resolves through.
11205
11539
  * Importing this module loads every core preset's actions; a canvas handed
11206
11540
  * only preset objects never reaches it.
11207
11541
  */
11208
11542
 
11209
- /** The base presets each composite preset turns on. */
11210
- declare const COMPOSITE_FEATURES: Readonly<Record<CompositeFeature, readonly BaseFeature[]>>;
11211
- /** The kit-standard action ids each preset registers. */
11212
- declare const FEATURE_ACTION_IDS: Readonly<Record<BaseFeature, readonly string[]>>;
11543
+ /** Each core preset by name, in the order `SCENE_CANVAS_FEATURES` lists them. */
11544
+ declare const FEATURE_PRESETS: Readonly<Record<Feature, FeaturePreset>>;
11545
+ /** The kit-standard action ids each preset registers itself, leaving out those of the presets it includes. */
11546
+ declare const FEATURE_ACTION_IDS: Readonly<Record<Feature, readonly string[]>>;
11213
11547
  /**
11214
11548
  * Kit-standard actions no preset registers: they belong to the tools that bind
11215
11549
  * them. A canvas registers each one whenever a tool it carries names it in a
11216
11550
  * binding — `insert` with any shape tool, `enterTextEdit` with the text tool.
11217
11551
  */
11218
11552
  declare const TOOL_DRIVEN_ACTION_IDS: readonly string[];
11553
+ /** The kit-standard actions every canvas registers, preset or none: undo and redo. */
11554
+ declare const BASELINE_ACTION_IDS: readonly string[];
11555
+
11556
+ /** Undo and redo, which every canvas registers whatever its presets. */
11557
+ declare const BASELINE_ACTIONS: readonly [_weasel_js_routing.Action & {
11558
+ requires: string[];
11559
+ }, _weasel_js_routing.Action & {
11560
+ requires: string[];
11561
+ }];
11219
11562
 
11220
11563
  /** Pan and zoom: the hand tool, drag-pan, and pinch. */
11221
11564
  declare const viewPreset: FeaturePreset;
11222
11565
 
11223
- /** The select tool: click, marquee, lasso, and clearing on an empty click. */
11566
+ /** The select and lasso tools: click, marquee, lasso, and clearing on an empty click. */
11224
11567
  declare const selectPreset: FeaturePreset;
11225
11568
 
11226
11569
  /** The selection outline, drawn only while this is on. */
@@ -11234,30 +11577,83 @@ declare const rotatePreset: FeaturePreset;
11234
11577
  * claim the drag. */
11235
11578
  declare const movePreset: FeaturePreset;
11236
11579
 
11237
- /**
11238
- * Undo and redo, delete, duplicate, group and ungroup, nudge, select-all,
11239
- * Escape, the context menu, cancel-gesture, cut, copy, and paste, fill and
11240
- * stroke, and their keys.
11580
+ /** Escape, and canceling the gesture in flight. */
11581
+ declare const escapePreset: FeaturePreset;
11582
+ /** The context menu. */
11583
+ declare const contextMenuPreset: FeaturePreset;
11584
+ /** Cmd/Ctrl+A. */
11585
+ declare const selectAllPreset: FeaturePreset;
11586
+ /** Duplicate, and repeating the last transform. */
11587
+ declare const duplicatePreset: FeaturePreset;
11588
+ /** Deleting the selection. */
11589
+ declare const deletePreset: FeaturePreset;
11590
+ /** Group and ungroup. */
11591
+ declare const groupPreset: FeaturePreset;
11592
+ /** The arrow keys. */
11593
+ declare const nudgePreset: FeaturePreset;
11594
+ /** Fill and stroke, and their opacities. */
11595
+ declare const stylePreset: FeaturePreset;
11596
+ /**
11597
+ * Cut, copy, and paste.
11241
11598
  *
11242
11599
  * Cmd/Ctrl+V arrives as a DOM `paste` event, and two presets answer it. This
11243
11600
  * one brings `clipboard.pasteEvent`, which pastes nodes a kit canvas copied
11244
11601
  * and nothing else; `ingest` takes those plus images, SVG, files, and every
11245
11602
  * OS drop. With both on, `ingest` answers alone.
11246
11603
  */
11604
+ declare const clipboardPreset: FeaturePreset;
11605
+ /** Every edit preset above, and their keys. */
11247
11606
  declare const editPreset: FeaturePreset;
11248
11607
 
11608
+ /** Flipping the selection. */
11609
+ declare const flipPreset: FeaturePreset;
11610
+ /** Bringing forward and sending backward. */
11611
+ declare const reorderPreset: FeaturePreset;
11612
+ /** Aligning edges and centers. */
11613
+ declare const alignPreset: FeaturePreset;
11614
+ /** Distributing across or down. */
11615
+ declare const distributePreset: FeaturePreset;
11249
11616
  /** Align, distribute, reorder, and flip. */
11250
11617
  declare const arrangePreset: FeaturePreset;
11251
11618
 
11252
11619
  /**
11253
- * Pathfinder operations, path-edit entry, and anchor editing.
11254
- *
11255
- * It refines `edit`: anchor nudging and deleting are tried ahead of their
11256
- * node-level twins, which bind the same keys and are enabled whenever
11257
- * anything is selected.
11258
- */
11620
+ * The path-edit keys that share a key with a node-level action: anchor nudging
11621
+ * and deleting, and Escape out of path edit or its tool. Each is tried ahead of
11622
+ * its twin, which is enabled whenever anything is selected.
11623
+ */
11624
+ declare const anchorKeysPreset: FeaturePreset;
11625
+ /** The pathfinder booleans, and the live boolean group. */
11626
+ declare const pathfinderPreset: FeaturePreset;
11627
+ /** Text and strokes to paths. */
11628
+ declare const outlinesPreset: FeaturePreset;
11629
+ /** Entering path edit, and editing anchors, handles, and segments in it. */
11630
+ declare const pathEditPreset: FeaturePreset;
11631
+ /** Simplify, offset, snip at crossings, and join paths. */
11632
+ declare const pathCommandsPreset: FeaturePreset;
11633
+ /** Pathfinder operations, path-edit entry, and anchor editing. */
11259
11634
  declare const pathsPreset: FeaturePreset;
11260
11635
 
11636
+ /** The select tool and the lasso. */
11637
+ declare const selectToolsPreset: FeaturePreset;
11638
+ /** The hand tool. */
11639
+ declare const viewToolsPreset: FeaturePreset;
11640
+ /** The tools that drag out a primitive: rect, ellipse, line, polygon, star. */
11641
+ declare const shapeToolsPreset: FeaturePreset;
11642
+ /** The pen and the pencil. */
11643
+ declare const drawToolsPreset: FeaturePreset;
11644
+ /** Text and the sticky note. */
11645
+ declare const typeToolsPreset: FeaturePreset;
11646
+ /** The page slicer. */
11647
+ declare const pageToolsPreset: FeaturePreset;
11648
+
11649
+ /** Select, and the selection's outline. */
11650
+ declare const pickPreset: FeaturePreset;
11651
+ /** Resize and rotate handles. */
11652
+ declare const transformPreset: FeaturePreset;
11653
+ /** Every core behavior: view, pick, transform, move, edit, arrange, paths, and ingest. Tools that make things are
11654
+ * left to the canvas, through the `tools:` presets or `defaultTools`. */
11655
+ declare const drawPreset: FeaturePreset;
11656
+
11261
11657
  /** Dropped and pasted content: images, SVG, files, and whatever
11262
11658
  * `ingestion.handlers` accept, on Cmd/Ctrl+V or an OS drop. */
11263
11659
  declare const ingestPreset: FeaturePreset;
@@ -11323,10 +11719,6 @@ declare function resolvedSnapMarks<P>(satisfied: readonly {
11323
11719
  mark?: SnapCandidateMark<P>;
11324
11720
  }[], delta: P): SnapMark<P>[];
11325
11721
 
11326
- type Point = {
11327
- x: number;
11328
- y: number;
11329
- };
11330
11722
  /** A drawing tool's point snapping: the points it places one by one, and the
11331
11723
  * cursor it trails from the last of them. */
11332
11724
  interface PointSnap {
@@ -11519,4 +11911,4 @@ declare const coreKitSettingsSchema: Omit<_weasel_js_prefs.PrefGroup, "children"
11519
11911
  };
11520
11912
  };
11521
11913
 
11522
- export { ANCHOR_HIT_BASE_PX, AREA_SELECT_ID, ActionsProviderIfRoot, AddNodeSpec, Affordance, AffordanceBinding, AffordanceRegion, type AffordanceRegionHit, type AimHeldViewProps, type AimOutline, type AimPoint, type AimSource, type AimSpace, type AlignAdapter, type AlignEdge, type AlignReference, type AnchorEdit, type AnchorFieldsApi, type AnchorHit, AnchorMarkerShape, type AnchorScratch, type AnchorState, type AnimateOnSetPoseOptions, type AnimatedReflow, type AnnotationFlag, type AnyTool, AreaSelectAdapter, type ArrangeArgs, type ArrangedPose, BUILTIN_TOOLS, BUILTIN_TOOL_IDS, type BaseFeature, type BendAlongEffect, type BindRigOptions, type BlendEffect, type BooleanCommitPiece, BooleanOp, BooleanOpOptions, BooleanOpResult, type BooleanOperands, type BooleanSource, BooleanStrokes, BooleansAdapter, BoundsConstraint, type BuildChromeCtxArgs, type BuiltinShapeToolId, type BuiltinToolId, type BuiltinToolOptions, CANVAS_CONTEXT_ATTRIBUTES, COMPOSITE_FEATURES, type CameraHeldViewProps, type CameraProps, CanvasDebugSink, type CanvasExtensionApi, type CanvasHelpers, type CanvasLayers, type CanvasProps, type CanvasRetainOptions, type CanvasSize, type CanvasSizeSnapshot, type CanvasSurfaceHelpers, CanvasView, type CanvasViewCamera, type CanvasViewCommonProps, type CanvasViewHandle, type CanvasViewHelpers, type CanvasViewProps, type CanvasViewState, type CarrySource, type ChildOrder, type ChromeCtx, type ChromeId, ChromeState, type ClampBounds, ClipboardSnapshot, type CoalescedCtx, CommonAffordanceScratch, type ComposeSelectionPoseOpts, type CompositeFeature, type ComputeSliceOpsArgs, type ComputeSliceResult, type Condition, ContentHandlerEntry, type Contribution, type ContributionChrome, type ContributionDepReader, type ContributionFrameCtx, type CoreIconName, type CoreKitTargetSettings, type CornerResizeAffordanceOptions, type CornerResizeScratch, type CreateChildrenLayerOpts, type CreateDebugOverlayLayerOpts, CreateOutlinesAdapter, type CreatePathEditingOverlayLayerOptions, type CreatePathLayerOpts, type CreatePenPreviewLayerOptions, type CreateTextLayerOpts, type CreateViewResolverOpts, type CreateViewportLayerOpts, CursorCoordsHud, type CursorCoordsHudProps, type CustomLayerEntry, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_FILL_COLOR, DEFAULT_HANDLE_SIZE, DEFAULT_INK, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_OVERLAY_STYLE, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SIMPLIFY_TOLERANCE, DEFAULT_SNAP_PX, DEFAULT_STROKE_COLOR, DRAG_PAN_ID, DRAW_TOOLS, DebugConfig, DebugSnapshot, DebugStrokes, DebugTheme, type DefaultTextData, type DeleteActionOptions, type DeleteArgs, DepRegistryProviderIfRoot, type Departures, DerivePathFn, DerivePoseFn, DerivedDep, type DerivedPart, DeviceProfileProvider, type DeviceProfileProviderProps, DevtoolsLabel, type DevtoolsLabelProps, Dims, type DistributeAdapter, type DistributeAxis, type DistributeMode, type DragGestureController, type DragGestureCtx, type DragGestureEndCtx, type DragGesturePhase, type DragGesturePoint, type DragHandleOptions, type DragPanParams, type DragPayload, type DragRadialController, type DragRadialCtx, type DragRadialEndCtx, type DragRadialPoint, type DragRadialState, type DragRectBounds, type DragRectController, type DragRectCtx, type DragRectEndCtx, type DragRectPoint, DrawCanvas, type DrawCanvasDraw, type DrawCanvasProps, type DrawnBoundsOptions, type DrawnBoundsScene, type DropZoneOptions, EditAnchorsDep, EditAnchorsParams, type EditableShape, type EditedLayerOf, type EditingDrawOne, type EffectItem, type EffectSource, type EffectSourceReader, EnteredGroupApi, FALLBACK_ACCENT, FEATURE_ACTION_IDS, type Feature, type FeatureBindingOptions, type FeatureEntry, type FeaturePreset, type FeedDelta, type FeedNode, FinishedEditFrame, FitViewToBoundsOptions, type FlipAxis, type FlipPivot, GHOST_STROKE, type GateLayerOptions, type GateSource, type GatedLayer, type GatedNode, type GatherSnapOptions, type GeneratedShape, GeometryProjection, GestureContext, type GesturePreviewSource, type GestureSource, HANDLE_BASE_PX, HANDLE_LOCK_ROLES, InertiaConfig as HandToolInertiaConfig, type HandleDragEnd, type HandleDragPoint, type HandleEdit, HandleLocks, type HandleScope, type HeadlessCanvasLike, type HostAnchorAlign, type HostAnchorInput, type HostAnchorOffset, type HostAnchorStyle, type HoverTracking, INSERT_REPOSITION_BINDING, IconRegistryProvider, IconRegistryProviderIfRoot, type IconRegistryProviderProps, InertiaConfig, InheritedPaint, type InkExtents, InsertAdapter, type InsertArgs, InsertBehavior, InsertNodeFactory, type InsertOp, type InsertOverlayStyle, InsertPaint, type InsertPreviewExtent, type InsertPreviewGeometry, type InsertPreviewLike, type InsertPreviewOverlay, type InsertToolOptions, type JoinPlan, KIT_SHAPE_KINDS, KIT_STANDARD_ACTION_IDS, KIT_VERSIONS, type KeyModifiers, type KeyState, type KeyStateAttachOptions, type KitInsertShape, type KitRequirements, type KitVersions, LONG_PRESS_FEEDBACK_ID, LassoHitMode, LassoSelectAdapter, LassoSelectBehavior, LayerEnumerableAdapter, LayerGroup, LayerHit, type LayerSlotValue, type LayersMap, LayoutDropTargetMode, LayoutFrame, type LayoutRef, LayoutStrategy, LeanSceneCanvas, type LeanSceneCanvasProps, type LifecycleAdapter, type LifecycleAnimation, type LinePoint, type LivePathEditSpec, type LongPressFeedbackOptions, MEASURE_ACTION_IDS, MEASURE_AFFORDANCE_KIND, MEASURE_LAYER_ID, MOVE_NODES_REQUIRES, type MeasureCell, type MeasureData, type MeasureEnd, type MeasureEndSourceOptions, type MeasureHit, type MeasurePoint, type Measurement, type Measurements, type ModeTriggerHandlers, type MomentumOptions, MoveAdapter, MoveBehavior, type MoveToIndexArgs, type NestedHitOpts, type NestedHitTester, type NodeClientRect, NodeClip, type NodeFlagArgs, type NodeGates, type NodeInk, type NodeInkCtx, type NodeOverlayFrame, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type NodeSilhouetteCtx, OVERLAY_ROLE_STROKES, type OpFactory, type OpenFilePickerOptions, type OpsApplier, OrderedAdapter, OriginProjection, type OutlineStrokeResult, type Overlay, type OverlayPoint, type OverlayVisibilityId, PAGES_DOC_KEY, PAGE_TOOLS, PAINTED_CURSOR_LAYER_ID, PATHFINDER_STROKES, PATH_ANCHOR_CHROME_ID, PATH_EFFECT, PATH_EFFECT_DERIVATIONS, PATH_GESTURE_TAGS, PATH_SNAP_LABELS, type Page, type PageEditOptions, type PageLayoutOptions, type PagesDoc, type PagesLayerOptions, type PaintBoundsFn, PaintKindEntry, type PaintedSkins, PasteCtx, PasteOmission, type PathAnchor, type PathAnchorAffordanceOptions, PathEditExtension, type PathEditFrame, type PathEditHost, PathEditMark, type PathEditOpening, type PathEditPreview, PathEditTarget, type PathEditingOverlaySlotConfig, type PathEditingOverlayStyle, type PathEffect, type PathEffectDerivations, type PathEffectOptions, type PathGestureFamily, type PathNode, PathPaint, type PathSnapSourceOptions, type PathStorageKind, PathSymmetryDep, type PenContinuation, type PenPreviewStyle, type PenScratch, type PenSubpath, type PencilPoint, PickHud, type PickHudProps, type PickSlop, type PickTopMostHitAdapter, type PinchZoomOptions, type PixelRenderPlan, type PlacedNode, type PlacedPage, PlaneMap, type PointSnap, type PointerFollower, PointerProviderIfRoot, type PointerSample, type PointerStylusState, type PolygonGenerator, type PolygonPoint, PoseAdapter, type PoseAnimationAdapter, type PoseCascade, PoseComposition, PoseDescriptor, type PoseFeed, type PoseFrame, PoseOverrides, PoseRemoval, type PoseRun, type PoseRunCtx, type PoseRunStep, type PoseSource, type PoseTargetOptions, type PoseTargetScene, type PoseTransitionScene, type PoseTransitionSeat, PoseWrite, type PosedNode, type PressureToWidthOptions, type PreviewNode, RECT_POSE_COMPOSITION, RIGID_POSE_COMPOSITION, ROTATION_HANDLE_BASE_PX, type RasterImage, type RasterRenderArgs, type RasterSession, type RasterSessionOptions, type RectAim, RectPose, RedrawSource, type ReflowScene, ReflowTransition, type ReflowTransitionOptions, type RegisterNodeShapeOptions, RegisteredOp, type RenderDebugSnapshotArgs, RenderLayer, type RenderNeeds, type RenderSceneToCanvasArgs, type RenderSceneToPixelsArgs, type ReorderArgs, type ReorderDirection, type ReorderRestoreEntry, type ReparentArgs, type RepeatAlongEffect, type RepeatableTransform, type RequirementMismatch, type ResizeActionOptions, ResizeAdapter, ResizeHandleLayout, type ResolvableView, type ResolvedOverlay, type RestPath, type Rig, type RigApply, type RigApplyContext, type RigNodeData, type RigNodeParts, type RigNodeSource, type RigScene, RotateAdapter, RotateBehavior, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, type RoutedNode, SCENE_CANVAS_FEATURES, SELECTION_MOVE_ID, SELECTION_RESIZE_ID, SELECTION_ROTATE_ID, SELECTION_TRANSFORM_ID, SELECT_TOOLS, SHAPE_COUNT_RANGE, SHAPE_KINDS, SHAPE_TOOLS, SNAP_ANGLE_STEP, SNAP_AXIS_STEP, SNAP_ROLES, STAR_RATIO_RANGE, Scene, type SceneAdapterSelection, SceneArrivalRefused, SceneCanvas, type SceneCanvasAdapter, type SceneCanvasApi, type SceneCanvasGeometry, type SceneCanvasHit, type SceneCanvasLayers, type SceneCanvasLongPress, type SceneCanvasProps, SceneCanvasSnap, type SceneCanvasViewport, type SceneClipTargetsOptions, Node as SceneNode, type SceneNodeClientRectOpts, ScenePoseReports, SceneRegistry, type SceneSlotConfig, type SceneSlotLayers, type SceneToAdapterOptions, SceneViewCanvas, type SceneViewCanvasProps, type SceneViewCull, type SceneViewDrawOne, type SceneViewLayers, type ScopedScene, type ScreenSlop, type SelectAdapter, type SelectFromLassoOptions, type SelectionHandleStyle, type SelectionHandlesLayerOpts, type SelectionMoveOptions, type SelectionOutlineLayerOpts, type SelectionOverlayLayerOpts, type SelectionOverlaySlotConfig, type SelectionRotateOptions, type SelectionStore, type SelectionTransformOptions, SerializedScene, SerializedSceneV1, type SetAnchorFieldParams, type SetChildOrderArgs, type SetDataArgs, type SetDependsOnArgs, type SetLayerArgs, type SetLayoutArgs, type SetPathArgs, type SetPathFields, type SetSelectionArgs, type SetTextArgs, type ShapeCoversPointOptions, type ShapeGenerator, type ShapeKind, type ShapeKindDescriptor, type ShapeKindsWhere, type ShownDataSource, type ShownDeparture, type SiblingSlot, SliceDep, type SliceLeaf, type SlicePiece, type SliceScratch, type SliceableNode, type SnapCandidateMark, SnapCollect, SnapDep, SnapGesture, SnapMark, SnapMods, SnapOutcome, SnapOutcomeStore, SnapProbeAt, SnapReadoutStyle, SnapSource, SourceCandidate, type SpatialReference, type SpatialReferenceSources, SpecsFromSerializedOptions, type SpringPoseOptions, type StaggerSpringPoseOptions, type StandardSlotConfig, type StandardSlotName, type StarGenerator, type StarPoint, type StatedNodeFields, StickyStyle, type StrokeRegionOptions, type StylusData, type SurfaceContribution, type SurfaceSizeProps, SvgIngestOptions, SystemLayerSpec, TOOL_DRIVEN_ACTION_IDS, TYPE_TOOLS, TargetTransform, type TextAlongEffect, TextOverflow, type ThresholdDragHandle, type ThresholdDragOptions, type Tool, type ToolDef, type ToolsApi, type TransformArgs, TransformFollower, type TweenPoseOptions, UNION_OF_CHILDREN, type UseAlignOptions, type UseAlignReturn, type UseBooleansOptions, type UseBooleansReturn, type UseDistributeOptions, type UseDistributeReturn, type UseDragGestureOptions, type UseDragRadialOptions, type UseDragRectOptions, type UseEyedropperToolOptions, type UseHandToolOptions, type UseHandleDragOptions, type UseHandleDragReturn, type UseHostAnchorOptions, type UseHoverTrackingArgs, type UseImageToolOptions, type UseKeyStateOptions, type UseKeybindingsOptions, type UseLassoSelectOptions, type UseLassoToolOptions, type UseMeasureToolOptions, UseMoveOptions, type UseNodeOverlayFrameOptions, type UsePenToolOptions, type UsePointerStylusOptions, type UsePolygonToolOptions, type UsePoseRunOptions, UseResizeOptions, type UseResizePolicyOptions, type UseRigNodeOptions, type UseRotateOptions, type UseSceneOptions, type UseSceneTextEditOptions, type UseSceneTextEditReturn, type UseSceneTrivialOptions, type UseSelectToolOptions, type UseSelectionOptions, type UseSliceToolOptions, type UseStandardActionsOptions, type UseStarToolOptions, type UseStickyToolOptions, type UseToolsOptions, VERSION, VIEW_MARKER_DEFAULT_STYLE, VIEW_MARKER_DRAG, VIEW_MARKER_HIT_SLOP_PX, VIEW_TOOLS, type VelocityTracker, type VersionCheck, type ViewAim, ViewAnimationOptions, type ViewAt, type ViewKitSettings, type ViewLike, ViewMarker, type ViewMarkerGrab, type ViewMarkerHost, type ViewMarkerProps, type ViewMarkerStyle, type ViewPoseAdapter, type ViewRect, type ViewResolver, type ViewTarget, type ViewTransform, ViewportDims, type ViewportLayer, type ViewportZoomAnimateOptions, type ViewportZoomOptions, type VisibilityRules, WHEEL_ZOOM_STEP, type WarmRenderOptions, WeaselProvider, type WeaselProviderProps, type WheelInput, type WheelPanOptions, type WheelPanOpts, type WorkspaceTintLayerOptions, type WrittenNode, type WrittenPoseTargetOptions, type ZoomAxis, type ZoomBound, type ZoomClampOpts, type ZoomFactor, accentColorOf, actionIs, addPage, adjacentPage, aimSpace2d, alignDeltaFor, alignTargetBounds, always, anchorEditWouldChange, and, animateLifecycle, animateOnSetPose, annotationLayerIds, annulusSemiAxes, applyOpsTo, applyOutlineStroke, areaSelectAction, areaSelectContribution, arrangePreset, assertSnapSourceIds, axisAlignedBounds, axisZoomFactor, bindPoseTransition, bindRig, buildChromeCtx, buildDebugOverlayCommands, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, carriedDescendants, checkRequirements, clampShapeGenerator, clampView, classifyPathStorage, clearSelectionAction, clipOutline, clipboardCopyAction, clipboardCutAction, clipboardPasteAction, clipboardPasteEventAction, cloneAction, coarsePointer, commitAnchorEdit, commitBooleanPieces, commitDeleteToScene, commitOps, composeAffordanceLayer, composeRectPose, composeRigidPose, composeSelectionPose, computeFitViewport, computeSliceOps, computeWheelAction, cond, contextMenuAction, coreKitSettingsSchema, createArrangeOp, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDeleteAction, createDeleteOp, createDepartures, createEnteredGroupScope, createHistory, createInsertOp, createKeyState, createLongPressFeedbackContribution, createMeasurements, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathEffectDerivations, createPathLayer, createPenPreviewLayer, createPointerFollower, createPoseFeed, createPoseOverrides, createPoseTarget, createRasterSession, createReflowTransition, createReorderOp, createReparentOp, createResizeAction, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetChildOrderOp, createSetDataOp, createSetDependsOnOp, createSetHiddenOp, createSetLayerOp, createSetLayoutOp, createSetLockedOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createSnapReadoutLayer, createTextLayer, createTransformOp, createVelocityTracker, createViewMarkerContribution, createViewMarkerLayer, createViewResolver, createViewportLayer, createWrittenPoseTarget, currentMeasureId, cycleFill, dataRestPath, debugSnapshotArgs, decomposeRectPose, decomposeRigidPose, defaultCommitAdapter, defaultDrawOne, defaultNodeProperties, defaultNodeRouting, defaultPaintBounds, defaultVisibilityRules, definesFrame, deleteAction, deleteAnchorsAction, deleteNode, deleteSelectedMark, depOf, derivedDepOf, derivedPartsOf, derivedPose, dispatchApplyBatch, documentDepOf, documentOf, documentPose, dragPanContribution, dragPointOf, drawnAABBOf, drawnBoundsOf, drawnBoundsScene, editAnchorsAction, editPreset, editTargetOf, editedPathSymmetries, editingAnchors, editingLayer, effectSourceFor, effectivePose, enterTextEditAction, enumerateAnchors, exitPathEditToolAction, findNodeShape, findShapeBounds, findShapeDrawnBounds, findShapeInk, findShapeSilhouette, finishPathEditFrame, fitToBounds, fitViewToPage, fitZoom, flattenPreviews, flipAction, focused, forEachCoalesced, forgetTransform, gateLayer, gatherSnapCandidates, gesturePlaneReader, gestureViewReader, gesturing, getAlpha01, getNodeShapes, getStylusData, glidesByDefault, grabViewMarker, groupNodeRouting, hasChildren, hasEditablePath, hiddenSourceDeleteOps, hiddenSourcesTakenWith, hidesSubtree, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, inPlane, inferredNodeProperties, inferredNodeRouting, ingestPreset, inkExtentsOf, insertAction, insertAt, insertLayer, insertPreviewExtent, insertRepositionAction, interpolateView, isAnnotationLayer, isAnnotationNode, isLeaf, isNodeHidden, isNodeLocked, isOverChildren, isRectAim, isShapeGenerator, joinPathsCommand, joinSelectedAnchors, kitTextHandler, lassoSelectAction, lastTransform, layoutPages, livePathEdit, locksInForce, makeHandleCommand, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markUnder, measureAt, measureBetween, measureEndSource, measureEndsOf, measureIds, measureNode, measurePose, measuredSegmentCommands, measurementOf, measurementsContribution, mergeAlphaFromPrev, mergeContributions, modeDecorationLayer, modeIn, modeIs, modeNot, modeTriggers, modifierHeld, momentum, moveAction, moveNodes, moveNodesOps, movePage, movePreset, multiActive, nestedHitTester, never, nextPageId, nodeAsShown, nodeGates, nodeOutline, normalizeView, normalizeZoom, not, noteFontRead, nudgeAnchorsDownAction, nudgeAnchorsLeftAction, nudgeAnchorsRightAction, nudgeAnchorsUpAction, onEmptyCanvas, opFactoryRegistry, openContextMenu, openFilePicker, or, outlinePreset, overChildren, pageAt, pageHolding, pageInView, pageMembers, pageName, pageOfBounds, pagesBounds, pagesLayer, pagesOf, paintAbove, paintAlpha, paintWithAlpha, paintWithColor, parseDebugFlags, pathCopy, pathEditPathOf, pathEditPreview, pathEditToolAction, pathEditToolActive, pathEffectNode, pathEffectOf, pathEffectParts, pathFromParts, pathNodesOf, pathOperationTags, pathOriginProjection, pathPoseDescriptor, pathSnapGlyph, pathSnapSource, pathsPreset, pickTopMostHit, pillCommands, pinchZoomAction, placeAction, placeSkeleton, placedPagesOf, planJoin, planPixelRender, pointRegionFrame, pointSnap, poseAxes, pressureToWidth, publishPreviews, rasterToPng, readEffectSource, rebuildOp, reconcileSpecs, recordTransform, rectAim, regenerateShape, registerNodeShape, registerOpFactory, registeredOpNames, registeredPathEffects, releaseCanvasRenderer, removePage, renamePage, renderDebugSnapshot, renderNeeds, renderSceneToCanvas, renderSceneToPixels, requiresAnchorSelection, reshapeOps, reshapeTo, resizeAction, resizePage, resizePreset, resolveBooleanOperands, resolveEditablePathOf, resolveOverlays, resolvePartPaint, resolvePreviews, resolveSpatialReference, resolveVisibility, resolvedSnapMarks, rigFromNode, rigidRigApply, rotateAction, rotateAroundAABBCenter, rotatePreset, rotationDegreesUnit, rotationHandle, rotationSnapSource, routeKind, satisfiesRange, sceneCarrySource, sceneClipTargets, sceneFromJSON, sceneNodeClientRect, scenePoseAdapter, scenePoseFrame, scenePoseTarget, sceneSelectionStore, sceneSharedUnitScopes, sceneToAdapter, sceneUnitScopes, screenToWorld, screenTolerance, segmentUnder, selectAnchorAction, selectFromLasso, selectPreset, selectedPathNodes, selectionAtLeast, selectionEmpty, selectionIs, selectionLayer, selectionMoveBindings, selectionMoveContribution, selectionResizeBindings, selectionResizeContribution, selectionRotateBindings, selectionRotateContribution, selectionTransformBindings, selectionTransformContribution, setPages, settleShapeGenerator, shapeCoversPoint, shapeGeneratorOf, shapeGeneratorPath, sliceAction, slotOf, snapMods, snapSourcesFor, solid, sourcesHiddenBy, sourcesOf, splitOverChildren, springPose, staggerSpringPose, startThresholdDrag, statedFields, stepAngles, storeEditablePath, strokeOf, strokeRegion, strokeWith, textAlongParts, tickedSegment, toHex8, translateRectPose, tweenPose, unionAABB, unionBounds, unionOfChildren, unionOfChildrenVia, unplaceSkeleton, useAlign, useAnchorFields, useAnimatedReflow, useAutoCenter, useBooleans, useBooleansAdapter, useBooleansAdapterSource, useCanvasSize, useCreateOutlinesAdapter, useDeviceProfile, useDevtoolsLabel, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEffectSourcesLayer, useElementSize, useEllipseTool, useEyedropperTool, useGradientKinds, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useIconGlyph, useIconRegistry, useIconVariant, useImageTool, useKeyModifiers, useKeyState, useKeybindings, useLassoTool, useLineTool, useMeasureTool, useNodeOverlayFrame, usePaintKind, usePaintKinds, usePenTool, usePencilTool, usePointerStylus, usePolygonTool, usePoseDescriptorDepSource, usePoseRun, usePoseTransition, useRectTool, useResizePolicy, useRig, useRigNode, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSliceDep, useSliceDepSource, useSliceTool, useSnapSource, useStandardActions, useStarTool, useStickyTool, useTextTool, useTools, useTransformFollower, useVelocityTracker, viewForAim, viewMarkerDragAction, viewPreset, viewToTransform, viewZoom, viewportDragPanAction, viewportWheelPanAction, viewportWorldRect, viewportZoomAction, warmRender, watchDevicePixelRatio, wheelPan, wheelZoom, wheelZoomFactor, when, withAlpha01, withCoord, withInheritedPaintBounds, withInheritedPaints, withPath, withPathEffectsRegistry, withoutShapeGenerator, workspaceTintLayer, worldPoseLookup, worldToScreen, writtenBy, zoomAt, zoomAtLeast };
11914
+ export { ANCHOR_HIT_BASE_PX, AREA_SELECT_ID, ActionsProviderIfRoot, AddNodeSpec, Affordance, AffordanceBinding, AffordanceRegion, type AffordanceRegionHit, type AimHeldViewProps, type AimOutline, type AimPoint, type AimSource, type AimSpace, type AlignAdapter, type AlignEdge, type AlignReference, type AnchorEdit, type AnchorFieldsApi, type AnchorHit, AnchorMarkerShape, type AnchorScratch, type AnchorState, type AnimateOnSetPoseOptions, type AnimatedReflow, type AnnotationFlag, type AnyTool, AreaSelectAdapter, type ArrangeArgs, type ArrangedPose, BASELINE_ACTIONS, BASELINE_ACTION_IDS, BOOLEAN_OF_CHILDREN, BUILTIN_TOOLS, BUILTIN_TOOL_GROUPS, BUILTIN_TOOL_IDS, type BendAlongEffect, type BindRigOptions, type BlendEffect, type BooleanCommitPiece, BooleanOp, BooleanOpOptions, BooleanOpResult, type BooleanOperands, type BooleanShapeOp, type BooleanSource, BooleanStrokes, BooleansAdapter, BoundsConstraint, type BuildChromeCtxArgs, type BuiltinShapeToolId, type BuiltinToolId, type BuiltinToolOptions, CANVAS_CONTEXT_ATTRIBUTES, type CameraHeldViewProps, type CameraProps, CanvasDebugSink, type CanvasExtensionApi, type CanvasHelpers, type CanvasLayers, type CanvasProps, type CanvasRetainOptions, type CanvasSize, type CanvasSizeSnapshot, type CanvasSurfaceHelpers, CanvasView, type CanvasViewCamera, type CanvasViewCommonProps, type CanvasViewHandle, type CanvasViewHelpers, type CanvasViewProps, type CanvasViewState, type CarrySource, type ChildOrder, type ChromeCtx, type ChromeId, ChromeState, type ClampBounds, ClipboardSnapshot, type CoalescedCtx, CommonAffordanceScratch, type ComposeSelectionPoseOpts, type ComputeSliceOpsArgs, type ComputeSliceResult, type Condition, ContentHandlerEntry, type Contribution, type ContributionChrome, type ContributionDepReader, type ContributionFrameCtx, type CoreIconName, type CoreKitTargetSettings, type CornerResizeAffordanceOptions, type CornerResizeScratch, type CreateChildrenLayerOpts, type CreateDebugOverlayLayerOpts, CreateOutlinesAdapter, type CreatePathEditingOverlayLayerOptions, type CreatePathLayerOpts, type CreatePenPreviewLayerOptions, type CreateTextLayerOpts, type CreateViewResolverOpts, type CreateViewportLayerOpts, CursorCoordsHud, type CursorCoordsHudProps, type CustomLayerEntry, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_FILL_COLOR, DEFAULT_HANDLE_SIZE, DEFAULT_INK, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_OVERLAY_STYLE, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SIMPLIFY_TOLERANCE, DEFAULT_SNAP_PX, DEFAULT_STROKE_COLOR, DRAG_PAN_ID, DRAW_TOOLS, DebugConfig, DebugSnapshot, DebugStrokes, DebugTheme, type DefaultTextData, type DeleteActionOptions, type DeleteArgs, DepRegistryProviderIfRoot, type Departures, DerivePathFn, DerivePoseFn, DerivedDep, type DerivedPart, DeviceProfileProvider, type DeviceProfileProviderProps, DevtoolsLabel, type DevtoolsLabelProps, Dims, type DistributeAdapter, type DistributeAxis, type DistributeMode, type DragGestureController, type DragGestureCtx, type DragGestureEndCtx, type DragGesturePhase, type DragGesturePoint, type DragHandleOptions, type DragPanParams, type DragPayload, type DragRadialController, type DragRadialCtx, type DragRadialEndCtx, type DragRadialPoint, type DragRadialState, type DragRectBounds, type DragRectController, type DragRectCtx, type DragRectEndCtx, type DragRectPoint, DrawCanvas, type DrawCanvasDraw, type DrawCanvasProps, type DrawnBoundsOptions, type DrawnBoundsScene, type DropZoneOptions, EditAnchorsDep, EditAnchorsParams, type EditableShape, type EditedLayerOf, type EditingDrawOne, type EffectBand, type EffectItem, type EffectSource, type EffectSourceReader, type EnterGroupOptions, EnteredGroupApi, FALLBACK_ACCENT, FEATURE_ACTION_IDS, FEATURE_PRESETS, type Feature, type FeatureBindingOptions, type FeatureEntry, type FeaturePreset, type FeedDelta, type FeedNode, FinishedEditFrame, FitViewToBoundsOptions, type FlipAxis, type FlipPivot, GHOST_STROKE, GROUP_ENTRY_ID, type GateLayerOptions, type GateSource, type GatedLayer, type GatedNode, type GatherSnapOptions, type GeneratedShape, GeometryProjection, GestureContext, type GesturePreviewSource, type GestureSource, HANDLE_BASE_PX, HANDLE_LOCK_ROLES, InertiaConfig as HandToolInertiaConfig, type HandleDragEnd, type HandleDragPoint, type HandleEdit, HandleLocks, type HandleScope, type HeadlessCanvasLike, type HostAnchorAlign, type HostAnchorInput, type HostAnchorOffset, type HostAnchorStyle, type HoverTracking, INSERT_REPOSITION_BINDING, IconRegistryProvider, IconRegistryProviderIfRoot, type IconRegistryProviderProps, InertiaConfig, InheritedPaint, type InkExtents, InsertAdapter, type InsertArgs, InsertBehavior, InsertNodeFactory, type InsertOp, type InsertOverlayStyle, InsertPaint, type InsertPreviewExtent, type InsertPreviewGeometry, type InsertPreviewLike, type InsertPreviewOverlay, type InsertToolOptions, type JoinPlan, KIT_SHAPE_KINDS, KIT_STANDARD_ACTION_IDS, KIT_VERSIONS, type KeyModifiers, type KeyState, type KeyStateAttachOptions, type KitHandlersOption, type KitInsertShape, type KitRequirements, type KitVersions, LONG_PRESS_FEEDBACK_ID, LassoHitMode, LassoSelectAdapter, LassoSelectBehavior, LayerDims, LayerEnumerableAdapter, LayerGroup, LayerHit, type LayerSlotValue, type LayersMap, LayoutDropTargetMode, LayoutFrame, type LayoutRef, LayoutStrategy, LeanSceneCanvas, type LeanSceneCanvasProps, type LeaveGroupOptions, type LifecycleAdapter, type LifecycleAnimation, type LinePoint, type LivePathEditSpec, type LongPressFeedbackOptions, MEASURE_ACTION_IDS, MEASURE_AFFORDANCE_KIND, MEASURE_LAYER_ID, MOVE_NODES_REQUIRES, type MeasureCell, type MeasureData, type MeasureEnd, type MeasureEndSourceOptions, type MeasureHit, type MeasurePoint, type Measurement, type Measurements, type ModeTriggerHandlers, type MomentumOptions, MoveAdapter, MoveBehavior, type MoveToIndexArgs, type NamedPresets, type NestedHitOpts, type NestedHitTester, type NodeClientRect, NodeClip, type NodeFlagArgs, type NodeGates, type NodeInk, type NodeInkCtx, type NodeOverlayFrame, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type NodeSilhouetteCtx, OVERLAY_ROLE_STROKES, type OpFactory, type OpenFilePickerOptions, type OpsApplier, OrderedAdapter, OriginProjection, type OutlineStrokeResult, type Overlay, type OverlayPoint, type OverlayVisibilityId, PAGES_DOC_KEY, PAGE_TOOLS, PAINTED_CURSOR_LAYER_ID, PATHFINDER_KEYMAP, PATHFINDER_KEYMAP_ID, PATHFINDER_LEADER, PATHFINDER_STROKES, PATH_ANCHOR_CHROME_ID, PATH_EFFECT, PATH_EFFECT_DERIVATIONS, PATH_GESTURE_TAGS, PATH_SNAP_LABELS, type Page, type PageEditOptions, type PageLayoutOptions, type PagesDoc, type PagesLayerOptions, type PaintBoundsFn, PaintKindEntry, type PaintedSkins, PasteCtx, PasteOmission, type PathAnchor, type PathAnchorAffordanceOptions, PathEditExtension, type PathEditFrame, type PathEditHost, PathEditMark, type PathEditOpening, type PathEditPreview, PathEditTarget, type PathEditingOverlaySlotConfig, type PathEditingOverlayStyle, type PathEffect, type PathEffectDerivations, type PathEffectOptions, type PathGestureFamily, type PathNode, PathPaint, type PathSnapSourceOptions, type PathStorageKind, PathSymmetryDep, type PenContinuation, type PenPreviewStyle, type PenScratch, type PenSubpath, type PencilPoint, PickHud, type PickHudProps, type PickSlop, type PickTopMostHitAdapter, type PinchZoomOptions, type PixelRenderPlan, type PlacedNode, type PlacedPage, type PlacedSpec, PlaneMap, type PointSnap, type PointerFollower, PointerProviderIfRoot, type PointerSample, type PointerStylusState, type PolygonGenerator, type PolygonPoint, PoseAdapter, type PoseAnimationAdapter, PoseComposition, PoseDescriptor, type PoseFeed, type PoseFrame, PoseOverrides, PoseRemoval, type PoseRun, type PoseRunCtx, type PoseRunStep, type PoseSource, type PoseTargetOptions, type PoseTargetScene, type PoseTransitionScene, type PoseTransitionSeat, PoseWrite, type PosedNode, type PresetDescription, type PressTargetTree, type PressureToWidthOptions, type PreviewNode, type PuckerBloatEffect, RECT_POSE_COMPOSITION, RIGID_POSE_COMPOSITION, ROTATION_HANDLE_BASE_PX, type RasterImage, type RasterRenderArgs, type RasterSession, type RasterSessionOptions, type RectAim, RectPose, RedrawSource, type ReflowScene, ReflowTransition, type ReflowTransitionOptions, type RegisterNodeShapeOptions, RegisteredOp, type RenderDebugSnapshotArgs, RenderLayer, type RenderNeeds, type RenderSceneToCanvasArgs, type RenderSceneToPixelsArgs, type ReorderArgs, type ReorderDirection, type ReorderRestoreEntry, type ReparentArgs, type RepeatAlongEffect, type RepeatableTransform, type RequirementMismatch, type ResizeActionOptions, ResizeAdapter, ResizeHandleLayout, type ResolvableView, type ResolvedOverlay, type RestPath, type Rig, type RigApply, type RigApplyContext, type RigNodeData, type RigNodeParts, type RigNodeSource, type RigScene, RotateAdapter, RotateBehavior, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, type RoughenEffect, type RoutedNode, SCENE_CANVAS_FEATURES, SELECTION_MOVE_ID, SELECTION_RESIZE_ID, SELECTION_ROTATE_ID, SELECTION_TRANSFORM_ID, SELECT_TOOLS, SHAPE_COUNT_RANGE, SHAPE_KINDS, SHAPE_TOOLS, SNAP_ANGLE_STEP, SNAP_AXIS_STEP, SNAP_ROLES, STAR_RATIO_RANGE, SavedScene, Scene, type SceneAdapterSelection, SceneArrivalRefused, SceneCanvas, type SceneCanvasAdapter, type SceneCanvasApi, type SceneCanvasGeometry, type SceneCanvasHit, type SceneCanvasLayers, type SceneCanvasLongPress, type SceneCanvasProps, SceneCanvasSnap, type SceneCanvasTextEditor, type SceneCanvasViewport, type SceneClipTargetsOptions, Node as SceneNode, type SceneNodeClientRectOpts, type SceneOptions, ScenePoseReports, SceneRegistry, type SceneSlotConfig, type SceneSlotLayers, type SceneToAdapterOptions, SceneViewCanvas, type SceneViewCanvasProps, type SceneViewCull, type SceneViewDrawOne, type SceneViewLayers, type ScopedScene, type ScreenSlop, ScrollOffset, type ScrollRange, type SelectAdapter, type SelectFromLassoOptions, type SelectionHandleStyle, type SelectionHandlesLayerOpts, type SelectionMoveOptions, type SelectionOutlineLayerOpts, type SelectionOverlayLayerOpts, type SelectionOverlaySlotConfig, type SelectionRotateOptions, type SelectionStore, type SelectionTransformOptions, SerializedScene, type SetAnchorFieldParams, type SetChildOrderArgs, type SetDataArgs, type SetDependsOnArgs, type SetLayerArgs, type SetLayoutArgs, type SetPathArgs, type SetPathFields, type SetSelectionArgs, type SetTextArgs, type ShapeCoversPointOptions, type ShapeGenerator, type ShapeKind, type ShapeKindDescriptor, type ShapeKindsWhere, type ShownDataSource, type ShownDeparture, type SiblingSlot, SliceDep, type SliceLeaf, type SlicePiece, type SliceScratch, type SliceableNode, type SnapCandidateMark, SnapCollect, SnapDep, SnapGesture, SnapMark, SnapMods, SnapOutcome, SnapOutcomeStore, SnapProbeAt, SnapReadoutStyle, SnapSource, SourceCandidate, type SpatialReference, type SpatialReferenceSources, SpecsFromSerializedOptions, type SpringPoseOptions, type StaggerSpringPoseOptions, type StandardSlotConfig, type StandardSlotName, type StarGenerator, type StarPoint, type StatedNodeFields, StickyStyle, type StrokeRegionOptions, type StylusData, type SurfaceContribution, type SurfaceSizeProps, SvgIngestOptions, SystemLayerSpec, TOOL_DRIVEN_ACTION_IDS, TOOL_GROUP_ORDER, TYPE_TOOLS, TargetTransform, type TextAlongEffect, type TextEditDoubleClick, TextOverflow, type ThresholdDragHandle, type ThresholdDragOptions, type Tool, type ToolDef, type ToolsApi, type TransformArgs, TransformFollower, type TweenPoseOptions, UNION_OF_CHILDREN, type UseAlignOptions, type UseAlignReturn, type UseBooleansOptions, type UseBooleansReturn, type UseDistributeOptions, type UseDistributeReturn, type UseDragGestureOptions, type UseDragRadialOptions, type UseDragRectOptions, type UseEyedropperToolOptions, type UseHandToolOptions, type UseHandleDragOptions, type UseHandleDragReturn, type UseHostAnchorOptions, type UseHoverTrackingArgs, type UseImageToolOptions, type UseKeyStateOptions, type UseKeybindingsOptions, type UseLassoSelectOptions, type UseLassoToolOptions, type UseMeasureToolOptions, UseMoveOptions, type UseNodeOverlayFrameOptions, type UsePenToolOptions, type UsePointerStylusOptions, type UsePolygonToolOptions, type UsePoseRunOptions, UseResizeOptions, type UseResizePolicyOptions, type UseRigNodeOptions, type UseRotateOptions, type UseSceneOptions, type UseSceneTextEditOptions, type UseSceneTextEditReturn, type UseSceneTrivialOptions, type UseSelectToolOptions, type UseSelectionOptions, type UseSliceToolOptions, type UseStandardActionsOptions, type UseStarToolOptions, type UseStickyToolOptions, type UseToolsOptions, VERSION, VIEW_MARKER_DEFAULT_STYLE, VIEW_MARKER_DRAG, VIEW_MARKER_HIT_SLOP_PX, VIEW_TOOLS, type VelocityTracker, type VersionCheck, type ViewAim, ViewAnimationOptions, type ViewAt, type ViewKitSettings, type ViewLike, ViewMarker, type ViewMarkerGrab, type ViewMarkerHost, type ViewMarkerProps, type ViewMarkerStyle, type ViewPoseAdapter, type ViewRect, type ViewResolver, type ViewTarget, type ViewTransform, ViewportDims, type ViewportLayer, type ViewportZoomAnimateOptions, type ViewportZoomOptions, type VisibilityRules, WHEEL_ZOOM_STEP, type WarmRenderOptions, WeaselProvider, type WeaselProviderProps, type WheelInput, type WheelPanOptions, type WheelPanOpts, type WorkspaceTintLayerOptions, type WrittenNode, type WrittenPoseTargetOptions, type ZigzagEffect, type ZoomAxis, type ZoomBound, type ZoomClampOpts, type ZoomFactor, accentColorOf, actionIs, addPage, adjacentPage, aimSpace2d, alignDeltaFor, alignPreset, alignTargetBounds, always, anchorEditWouldChange, anchorKeysPreset, and, animateLifecycle, animateOnSetPose, annotationLayerIds, annulusSemiAxes, applyOpsTo, applyOutlineStroke, areaSelectAction, areaSelectContribution, arrangePreset, assertSnapSourceIds, axisAlignedBounds, axisZoomFactor, bindPoseTransition, bindRig, booleanGroupFields, booleanGroupRouting, booleanOfChildren, booleanOpOf, buildChromeCtx, buildDebugOverlayCommands, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, carriedDescendants, checkRequirements, clampShapeGenerator, clampView, classifyPathStorage, clearSelectionAction, clipOutline, clipboardCopyAction, clipboardCutAction, clipboardPasteAction, clipboardPasteEventAction, clipboardPreset, cloneAction, coarsePointer, commitAnchorEdit, commitBooleanPieces, commitDeleteToScene, commitOps, composeAffordanceLayer, composeRectPose, composeRigidPose, composeSelectionPose, computeFitViewport, computeSliceOps, computeWheelAction, cond, containerScrollAction, contextMenuAction, contextMenuPreset, coreKitSettingsSchema, createArrangeOp, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDeleteAction, createDeleteOp, createDepartures, createEnteredGroupScope, createGroupEntryContribution, createHistory, createInsertOp, createKeyState, createLongPressFeedbackContribution, createMeasurements, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathEffectDerivations, createPathLayer, createPenPreviewLayer, createPointerFollower, createPoseFeed, createPoseOverrides, createPoseTarget, createRasterSession, createReflowTransition, createReorderOp, createReparentOp, createResizeAction, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetChildOrderOp, createSetDataOp, createSetDependsOnOp, createSetHiddenOp, createSetLayerOp, createSetLayoutOp, createSetLockedOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createSnapReadoutLayer, createTextLayer, createTransformOp, createVelocityTracker, createViewMarkerContribution, createViewMarkerLayer, createViewResolver, createViewportLayer, createWrittenPoseTarget, currentMeasureId, cycleFill, dataRestPath, debugSnapshotArgs, decomposeRectPose, decomposeRigidPose, defaultCommitAdapter, defaultDrawOne, defaultNodeProperties, defaultNodeRouting, defaultPaintBounds, defaultVisibilityRules, definesFrame, deleteAction, deleteAnchorsAction, deleteNode, deletePreset, deleteSelectedMark, depOf, derivedDepOf, derivedPartsOf, derivedPose, describePresets, dispatchApplyBatch, distributePreset, documentDepOf, documentOf, documentPose, dragPanContribution, dragPointOf, drawPreset, drawToolsPreset, drawnAABBOf, drawnBoundsOf, drawnBoundsScene, duplicatePreset, editAnchorsAction, editPreset, editTargetOf, editedPathSymmetries, editingAnchors, editingLayer, effectSourceFor, effectivePose, enterTextEditAction, enumerateAnchors, escapePreset, exitPathEditToolAction, findNodeShape, findShapeBounds, findShapeDrawnBounds, findShapeInk, findShapeSilhouette, finishPathEditFrame, fitToBounds, fitViewToPage, fitZoom, flattenPreviews, flipAction, flipPreset, focused, forEachCoalesced, forgetTransform, gateLayer, gatherSnapCandidates, gesturePlaneReader, gestureViewReader, gesturing, getAlpha01, getNodeShapes, getStylusData, glidesByDefault, grabViewMarker, groupNodeRouting, groupPreset, hasChildren, hasEditablePath, heldInFrame, hiddenSourceDeleteOps, hiddenSourcesTakenWith, hidesSubtree, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, inPlane, inferredNodeProperties, inferredNodeRouting, ingestPreset, inkExtentsOf, insertAction, insertAt, insertLayer, insertPreviewExtent, insertRepositionAction, interpolateView, isAnnotationLayer, isAnnotationNode, isAtom, isLeaf, isNodeHidden, isNodeLocked, isOverChildren, isRectAim, isShapeGenerator, joinPathsCommand, joinSelectedAnchors, kitTextHandler, lassoSelectAction, lastTransform, layoutPages, livePathEdit, localizeInScene, localizeWorldPoses, locksInForce, makeBooleanGroup, makeHandleCommand, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markUnder, measureAt, measureBetween, measureEndSource, measureEndsOf, measureIds, measureNode, measurePose, measuredSegmentCommands, measurementOf, measurementsContribution, mergeAlphaFromPrev, mergeContributions, modeDecorationLayer, modeIn, modeIs, modeNot, modeTriggers, modifierHeld, momentum, moveAction, moveNodes, moveNodesOps, movePage, movePreset, multiActive, nestedHitTester, never, nextPageId, nodeAsShown, nodeGates, nodeOutline, normalizeView, normalizeZoom, not, noteFontRead, nudgeAnchorsDownAction, nudgeAnchorsLeftAction, nudgeAnchorsRightAction, nudgeAnchorsUpAction, nudgePreset, onEmptyCanvas, opFactoryRegistry, openContextMenu, openFilePicker, or, outlinePreset, outlinesPreset, overChildren, pageAt, pageHolding, pageInView, pageMembers, pageName, pageOfBounds, pageToolsPreset, pagesBounds, pagesLayer, pagesOf, paintAbove, paintAlpha, paintWithAlpha, paintWithColor, parseDebugFlags, pathCommandsPreset, pathCopy, pathEditPathOf, pathEditPreset, pathEditPreview, pathEditToolAction, pathEditToolActive, pathEffectNode, pathEffectOf, pathEffectParts, pathFromParts, pathNodesOf, pathOperationTags, pathOriginProjection, pathPoseDescriptor, pathSnapGlyph, pathSnapSource, pathfinderPreset, pathsPreset, pickPreset, pickTopMostHit, pillCommands, pinchZoomAction, placeAction, placeSkeleton, placedPagesOf, planJoin, planPixelRender, pointRegionFrame, pointSnap, poseAxes, pressureToWidth, publishPreviews, rasterToPng, readEffectSource, rebuildOp, reconcileSpecs, recordTransform, rectAim, regenerateShape, registerNodeShape, registerOpFactory, registeredOpNames, registeredPathEffects, releaseCanvasRenderer, removePage, renamePage, renderDebugSnapshot, renderNeeds, renderSceneToCanvas, renderSceneToPixels, reorderPreset, requiresAnchorSelection, reshapeOps, reshapeTo, resizeAction, resizePage, resizePreset, resolveBooleanOperands, resolveEditablePathOf, resolveOverlays, resolvePartPaint, resolvePreviews, resolveSpatialReference, resolveVisibility, resolvedSnapMarks, rigFromNode, rigidRigApply, rotateAction, rotateAroundAABBCenter, rotatePreset, rotationDegreesUnit, rotationHandle, rotationSnapSource, routeKind, satisfiesRange, sceneBoxFrames, sceneCarrySource, sceneClipTargets, sceneFromJSON, sceneNodeClientRect, scenePoseAdapter, scenePoseFrame, scenePoseTarget, sceneSelectionStore, sceneSharedUnitScopes, sceneToAdapter, sceneUnitScopes, sceneViewPoseAdapter, screenToWorld, screenTolerance, scrollRange, scrollRectPose, scrollRigidPose, scrollableAt, segmentUnder, selectAllPreset, selectAnchorAction, selectFromLasso, selectPreset, selectToolsPreset, selectedPathNodes, selectionAtLeast, selectionEmpty, selectionIs, selectionLayer, selectionMoveBindings, selectionMoveContribution, selectionResizeBindings, selectionResizeContribution, selectionRotateBindings, selectionRotateContribution, selectionTransformBindings, selectionTransformContribution, setPages, settleShapeGenerator, shapeCoversPoint, shapeGeneratorOf, shapeGeneratorPath, shapeToolsPreset, sliceAction, slotOf, snapMods, snapSourcesFor, solid, sourcesHiddenBy, sourcesOf, splitOverChildren, springPose, staggerSpringPose, startThresholdDrag, statedFields, stepAngles, storeEditablePath, strokeOf, strokeRegion, strokeWith, stylePreset, textAlongParts, tickedSegment, toHex8, transformPreset, translateRectPose, tweenPose, typeToolsPreset, unionAABB, unionBounds, unionOfChildren, unionOfChildrenVia, unplaceSkeleton, useAlign, useAnchorFields, useAnimatedReflow, useAutoCenter, useBooleans, useBooleansAdapter, useBooleansAdapterSource, useCanvasSize, useCreateOutlinesAdapter, useDeviceProfile, useDevtoolsLabel, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEffectSourcesLayer, useElementSize, useEllipseTool, useEyedropperTool, useGradientKinds, useGroupEntryContribution, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useIconGlyph, useIconRegistry, useIconVariant, useImageTool, useKeyModifiers, useKeyState, useKeybindings, useLassoTool, useLineTool, useMeasureTool, useNodeOverlayFrame, usePaintKind, usePaintKinds, usePenTool, usePencilTool, usePointerStylus, usePolygonTool, usePoseDescriptorDepSource, usePoseRun, usePoseTransition, useRectTool, useResizePolicy, useRig, useRigNode, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSliceDep, useSliceDepSource, useSliceTool, useSnapSource, useStandardActions, useStarTool, useStickyTool, useTextTool, useTools, useTransformFollower, useVelocityTracker, viewForAim, viewMarkerDragAction, viewPreset, viewToTransform, viewToolsPreset, viewZoom, viewportDragPanAction, viewportWheelPanAction, viewportWorldRect, viewportZoomAction, warmRender, watchDevicePixelRatio, wheelPan, wheelZoom, wheelZoomFactor, when, withAlpha01, withCoord, withInheritedPaintBounds, withInheritedPaints, withPath, withPathEffectsRegistry, withoutShapeGenerator, workspaceTintLayer, worldPoseLookup, worldPosesOf, worldToScreen, writtenBy, zoomAt, zoomAtLeast };