@weasel-js/core 1.13.0 → 1.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (741) hide show
  1. package/CHANGELOG.md +326 -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 +15 -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/buildSceneTree.js +5 -3
  133. package/dist/canvas/buildSceneTree.js.map +1 -1
  134. package/dist/canvas/deps/editAnchors.js +4 -4
  135. package/dist/canvas/deps/editAnchors.js.map +1 -1
  136. package/dist/canvas/deps/enteredGroup.js +14 -5
  137. package/dist/canvas/deps/enteredGroup.js.map +1 -1
  138. package/dist/canvas/deps/ingestion.js +5 -1
  139. package/dist/canvas/deps/ingestion.js.map +1 -1
  140. package/dist/canvas/deps/insert.js.map +1 -1
  141. package/dist/canvas/deps/insertSite.js +5 -3
  142. package/dist/canvas/deps/insertSite.js.map +1 -1
  143. package/dist/canvas/deps/nodeAtPoint.js +1 -12
  144. package/dist/canvas/deps/nodeAtPoint.js.map +1 -1
  145. package/dist/canvas/deps/pathEditCommits.js +3 -3
  146. package/dist/canvas/deps/pathEditCommits.js.map +1 -1
  147. package/dist/canvas/deps/slice.js +16 -2
  148. package/dist/canvas/deps/slice.js.map +1 -1
  149. package/dist/canvas/deps/snap.js +5 -5
  150. package/dist/canvas/deps/snap.js.map +1 -1
  151. package/dist/canvas/deps/textEdit.js +5 -6
  152. package/dist/canvas/deps/textEdit.js.map +1 -1
  153. package/dist/canvas/derivedPath.js +8 -3
  154. package/dist/canvas/derivedPath.js.map +1 -1
  155. package/dist/canvas/getNodeAtPoint.js +2 -2
  156. package/dist/canvas/getNodeAtPoint.js.map +1 -1
  157. package/dist/canvas/insertPreviewExtent.js.map +1 -1
  158. package/dist/canvas/layerSlots.js.map +1 -1
  159. package/dist/canvas/nodeShapes/measurePainter.js +1 -1
  160. package/dist/canvas/nodeShapes/measurePainter.js.map +1 -1
  161. package/dist/canvas/nodeShapes/strokedBounds.js +5 -3
  162. package/dist/canvas/nodeShapes/strokedBounds.js.map +1 -1
  163. package/dist/canvas/overlayRoleStrokes.js +6 -0
  164. package/dist/canvas/overlayRoleStrokes.js.map +1 -1
  165. package/dist/canvas/pickIndex/scenePickIndex.js +10 -12
  166. package/dist/canvas/pickIndex/scenePickIndex.js.map +1 -1
  167. package/dist/canvas/sceneAdapter.js +10 -19
  168. package/dist/canvas/sceneAdapter.js.map +1 -1
  169. package/dist/canvas/sceneClipboard.js +17 -4
  170. package/dist/canvas/sceneClipboard.js.map +1 -1
  171. package/dist/canvas/sceneViewRender.js +3 -2
  172. package/dist/canvas/sceneViewRender.js.map +1 -1
  173. package/dist/canvas/surfaceContribution.js.map +1 -1
  174. package/dist/canvas/useCanvasPaint.js +10 -4
  175. package/dist/canvas/useCanvasPaint.js.map +1 -1
  176. package/dist/canvas/useHitObserver.js +1 -1
  177. package/dist/canvas/useHitObserver.js.map +1 -1
  178. package/dist/canvas/useViewAim.js +1 -1
  179. package/dist/canvas/useViewAim.js.map +1 -1
  180. package/dist/canvas/useViewHelpers.js +8 -5
  181. package/dist/canvas/useViewHelpers.js.map +1 -1
  182. package/dist/canvas/useViewNesting.js +39 -12
  183. package/dist/canvas/useViewNesting.js.map +1 -1
  184. package/dist/canvas/viewInputs.js.map +1 -1
  185. package/dist/canvas/viewMarkers.js +2 -2
  186. package/dist/canvas/viewMarkers.js.map +1 -1
  187. package/dist/canvas/viewRegistry.js +2 -2
  188. package/dist/canvas/viewRegistry.js.map +1 -1
  189. package/dist/canvas/viewSnap.js +67 -0
  190. package/dist/canvas/viewSnap.js.map +1 -0
  191. package/dist/clipboard.d.ts +6 -12
  192. package/dist/{clone-qb2e1F5p.d.ts → clone-Bz4iqGfE.d.ts} +10 -5
  193. package/dist/clone.d.ts +5 -5
  194. package/dist/core/geometry/booleanOfPaths.js +23 -0
  195. package/dist/core/geometry/booleanOfPaths.js.map +1 -0
  196. package/dist/core/geometry/pathPoseDescriptor.js +12 -9
  197. package/dist/core/geometry/pathPoseDescriptor.js.map +1 -1
  198. package/dist/core/geometry/poseDescriptor.js +12 -3
  199. package/dist/core/geometry/poseDescriptor.js.map +1 -1
  200. package/dist/core/geometry/targetFrame.js +2 -13
  201. package/dist/core/geometry/targetFrame.js.map +1 -1
  202. package/dist/core/layers/render.js +2 -1
  203. package/dist/core/layers/render.js.map +1 -1
  204. package/dist/core/layers/retain.js +5 -3
  205. package/dist/core/layers/retain.js.map +1 -1
  206. package/dist/core/ops/setPath.js +3 -0
  207. package/dist/core/ops/setPath.js.map +1 -1
  208. package/dist/core/paint/meshKindLazy.js.map +1 -1
  209. package/dist/core/paint/paintKindEntry.js.map +1 -1
  210. package/dist/core/paint/paintKinds.js +8 -1
  211. package/dist/core/paint/paintKinds.js.map +1 -1
  212. package/dist/core/scene/NodeProperties.js.map +1 -1
  213. package/dist/core/scene/NodeRouting.js.map +1 -1
  214. package/dist/core/scene/booleanGroup.js +33 -0
  215. package/dist/core/scene/booleanGroup.js.map +1 -0
  216. package/dist/core/scene/booleanOfChildren.js +53 -0
  217. package/dist/core/scene/booleanOfChildren.js.map +1 -0
  218. package/dist/core/scene/carryDescendants.js +18 -6
  219. package/dist/core/scene/carryDescendants.js.map +1 -1
  220. package/dist/core/scene/composeFrame.js +42 -5
  221. package/dist/core/scene/composeFrame.js.map +1 -1
  222. package/dist/core/scene/composePose.js +35 -16
  223. package/dist/core/scene/composePose.js.map +1 -1
  224. package/dist/core/scene/depMemo.js +36 -18
  225. package/dist/core/scene/depMemo.js.map +1 -1
  226. package/dist/core/scene/derivedParts.js +2 -23
  227. package/dist/core/scene/derivedParts.js.map +1 -1
  228. package/dist/core/scene/effectivePose.js +10 -0
  229. package/dist/core/scene/effectivePose.js.map +1 -1
  230. package/dist/core/scene/historyForm.js +5 -4
  231. package/dist/core/scene/historyForm.js.map +1 -1
  232. package/dist/core/scene/kitOps.js +5 -71
  233. package/dist/core/scene/kitOps.js.map +1 -1
  234. package/dist/core/scene/kitRegistry.js +5 -0
  235. package/dist/core/scene/kitRegistry.js.map +1 -1
  236. package/dist/core/scene/layerOps.js +82 -0
  237. package/dist/core/scene/layerOps.js.map +1 -0
  238. package/dist/core/scene/layoutPass.js +14 -12
  239. package/dist/core/scene/layoutPass.js.map +1 -1
  240. package/dist/core/scene/lockGuard.js +9 -3
  241. package/dist/core/scene/lockGuard.js.map +1 -1
  242. package/dist/core/scene/nestedHit.js +5 -5
  243. package/dist/core/scene/nestedHit.js.map +1 -1
  244. package/dist/core/scene/nodeFlags.js +8 -2
  245. package/dist/core/scene/nodeFlags.js.map +1 -1
  246. package/dist/core/scene/nodeGates.js +31 -2
  247. package/dist/core/scene/nodeGates.js.map +1 -1
  248. package/dist/core/scene/pathEffects/effects.js +22 -3
  249. package/dist/core/scene/pathEffects/effects.js.map +1 -1
  250. package/dist/core/scene/pathEffects/textAlong.js +16 -3
  251. package/dist/core/scene/pathEffects/textAlong.js.map +1 -1
  252. package/dist/core/scene/pathEffects/textAlongBands.js +65 -0
  253. package/dist/core/scene/pathEffects/textAlongBands.js.map +1 -0
  254. package/dist/core/scene/reconcileSpecs.js +1 -1
  255. package/dist/core/scene/reconcileSpecs.js.map +1 -1
  256. package/dist/core/scene/scene.js +11 -5
  257. package/dist/core/scene/scene.js.map +1 -1
  258. package/dist/core/scene/sceneEdits.js +5 -2
  259. package/dist/core/scene/sceneEdits.js.map +1 -1
  260. package/dist/core/scene/scenePoseAdapter.js +10 -1
  261. package/dist/core/scene/scenePoseAdapter.js.map +1 -1
  262. package/dist/core/scene/scrollOffsets.js +93 -0
  263. package/dist/core/scene/scrollOffsets.js.map +1 -0
  264. package/dist/core/scene/serialization.js +15 -5
  265. package/dist/core/scene/serialization.js.map +1 -1
  266. package/dist/core/scene/statedFields.js +2 -1
  267. package/dist/core/scene/statedFields.js.map +1 -1
  268. package/dist/core/scene/strategyView.js +35 -0
  269. package/dist/core/scene/strategyView.js.map +1 -0
  270. package/dist/core/scene/types.js.map +1 -1
  271. package/dist/core/scene/useScene.js +2 -0
  272. package/dist/core/scene/useScene.js.map +1 -1
  273. package/dist/core/scene/worldSave.js +87 -0
  274. package/dist/core/scene/worldSave.js.map +1 -0
  275. package/dist/core/selection/selectionTarget.js +1 -1
  276. package/dist/core/selection/selectionTarget.js.map +1 -1
  277. package/dist/{cornerHandles-CNCb7aTY.d.ts → cornerHandles-DpmQM_z5.d.ts} +1 -1
  278. package/dist/{depSchema-CpIQzKWQ.d.ts → depSchema-C3BwxitB.d.ts} +119 -99
  279. package/dist/devtools-protocol.d.ts +2 -2
  280. package/dist/devtools.d.ts +2 -2
  281. package/dist/{features → domains}/chrome-caps/buildChromeCtx.js +1 -1
  282. package/dist/domains/chrome-caps/buildChromeCtx.js.map +1 -0
  283. package/dist/{features → domains}/chrome-caps/conditions.js +1 -1
  284. package/dist/domains/chrome-caps/conditions.js.map +1 -0
  285. package/dist/{features → domains}/chrome-caps/defaults.js +1 -1
  286. package/dist/domains/chrome-caps/defaults.js.map +1 -0
  287. package/dist/{features → domains}/chrome-caps/resolve.js +1 -1
  288. package/dist/domains/chrome-caps/resolve.js.map +1 -0
  289. package/dist/{features → domains}/chrome-caps/useChromeCaps.js +1 -1
  290. package/dist/domains/chrome-caps/useChromeCaps.js.map +1 -0
  291. package/dist/{features → domains}/chrome-caps/useHoverTracking.js +1 -1
  292. package/dist/domains/chrome-caps/useHoverTracking.js.map +1 -0
  293. package/dist/{features → domains}/ingestion/contentHandlers.js +20 -3
  294. package/dist/domains/ingestion/contentHandlers.js.map +1 -0
  295. package/dist/domains/ingestion/ghost.js +56 -0
  296. package/dist/domains/ingestion/ghost.js.map +1 -0
  297. package/dist/{features → domains}/ingestion/imageHandler.js +1 -1
  298. package/dist/domains/ingestion/imageHandler.js.map +1 -0
  299. package/dist/domains/ingestion/kitHandlers.js +22 -0
  300. package/dist/domains/ingestion/kitHandlers.js.map +1 -0
  301. package/dist/{features → domains}/ingestion/openFilePicker.js +1 -1
  302. package/dist/domains/ingestion/openFilePicker.js.map +1 -0
  303. package/dist/{features → domains}/ingestion/placement.js +1 -1
  304. package/dist/domains/ingestion/placement.js.map +1 -0
  305. package/dist/{features → domains}/ingestion/svgHandler.js +1 -1
  306. package/dist/domains/ingestion/svgHandler.js.map +1 -0
  307. package/dist/{features → domains}/ingestion/textHandler.js +9 -7
  308. package/dist/domains/ingestion/textHandler.js.map +1 -0
  309. package/dist/{features → domains}/ingestion/useCanvasIngestion.js +13 -15
  310. package/dist/domains/ingestion/useCanvasIngestion.js.map +1 -0
  311. package/dist/{features → domains}/ingestion/weaselJsonHandler.js +1 -1
  312. package/dist/domains/ingestion/weaselJsonHandler.js.map +1 -0
  313. package/dist/{features → domains}/longPress/longPressFeedback.js +1 -1
  314. package/dist/domains/longPress/longPressFeedback.js.map +1 -0
  315. package/dist/{features → domains}/measure/actionIds.js +1 -1
  316. package/dist/domains/measure/actionIds.js.map +1 -0
  317. package/dist/{features → domains}/measure/measureCommands.js +1 -1
  318. package/dist/domains/measure/measureCommands.js.map +1 -0
  319. package/dist/{features → domains}/measure/measureContribution.js +1 -1
  320. package/dist/domains/measure/measureContribution.js.map +1 -0
  321. package/dist/{features → domains}/measure/measureEdits.js +1 -1
  322. package/dist/domains/measure/measureEdits.js.map +1 -0
  323. package/dist/{features → domains}/measure/measureGestures.js +4 -7
  324. package/dist/domains/measure/measureGestures.js.map +1 -0
  325. package/dist/{features → domains}/measure/measureHit.js +1 -1
  326. package/dist/domains/measure/measureHit.js.map +1 -0
  327. package/dist/{features → domains}/measure/measureLayer.js +1 -1
  328. package/dist/domains/measure/measureLayer.js.map +1 -0
  329. package/dist/{features → domains}/measure/measurement.js +1 -1
  330. package/dist/domains/measure/measurement.js.map +1 -0
  331. package/dist/{features → domains}/measure/measurements.js +2 -2
  332. package/dist/domains/measure/measurements.js.map +1 -0
  333. package/dist/{features → domains}/modes/modeLayers.js +1 -1
  334. package/dist/domains/modes/modeLayers.js.map +1 -0
  335. package/dist/{features → domains}/modes/modeTriggers.js +3 -6
  336. package/dist/domains/modes/modeTriggers.js.map +1 -0
  337. package/dist/{features → domains}/pathEffects/effectSources.js +1 -1
  338. package/dist/domains/pathEffects/effectSources.js.map +1 -0
  339. package/dist/{features → domains}/pathEffects/index.js +1 -1
  340. package/dist/domains/pathEffects/index.js.map +1 -0
  341. package/dist/{features → domains}/pathEffects/readSource.js +1 -1
  342. package/dist/domains/pathEffects/readSource.js.map +1 -0
  343. package/dist/{features → domains}/pathEffects/textItems.js +11 -2
  344. package/dist/domains/pathEffects/textItems.js.map +1 -0
  345. package/dist/{features → domains}/pathEffects/useEffectSourcesLayer.js +1 -1
  346. package/dist/domains/pathEffects/useEffectSourcesLayer.js.map +1 -0
  347. package/dist/{features → domains}/paths/anchorData.js +1 -1
  348. package/dist/domains/paths/anchorData.js.map +1 -0
  349. package/dist/{features → domains}/paths/anchorMarkers.js +9 -7
  350. package/dist/domains/paths/anchorMarkers.js.map +1 -0
  351. package/dist/{features → domains}/paths/editablePath.js +1 -1
  352. package/dist/domains/paths/editablePath.js.map +1 -0
  353. package/dist/{features → domains}/paths/index.js +3 -3
  354. package/dist/{features → domains}/paths/originProjection.js +1 -1
  355. package/dist/domains/paths/originProjection.js.map +1 -0
  356. package/dist/{features → domains}/paths/pathEditExtension.js +1 -1
  357. package/dist/domains/paths/pathEditExtension.js.map +1 -0
  358. package/dist/{features → domains}/paths/pathEditState.js +1 -1
  359. package/dist/domains/paths/pathEditState.js.map +1 -0
  360. package/dist/{features → domains}/paths/pathEditingOverlayLayer.js +1 -1
  361. package/dist/domains/paths/pathEditingOverlayLayer.js.map +1 -0
  362. package/dist/{features → domains}/paths/pathLayer.js +1 -1
  363. package/dist/domains/paths/pathLayer.js.map +1 -0
  364. package/dist/{features → domains}/paths/pathRepresentation.js +1 -1
  365. package/dist/domains/paths/pathRepresentation.js.map +1 -0
  366. package/dist/{features → domains}/paths/pathSnap/glyphs.js +1 -1
  367. package/dist/domains/paths/pathSnap/glyphs.js.map +1 -0
  368. package/dist/{features → domains}/paths/pathSnap/pathSnapSource.js +1 -1
  369. package/dist/domains/paths/pathSnap/pathSnapSource.js.map +1 -0
  370. package/dist/{features → domains}/paths/pathSnap/sceneIndex.js +1 -1
  371. package/dist/domains/paths/pathSnap/sceneIndex.js.map +1 -0
  372. package/dist/{features → domains}/paths/pathSnap/snapGeometry.js +3 -2
  373. package/dist/domains/paths/pathSnap/snapGeometry.js.map +1 -0
  374. package/dist/{features → domains}/paths/penPreviewLayer.js +1 -1
  375. package/dist/domains/paths/penPreviewLayer.js.map +1 -0
  376. package/dist/{features → domains}/paths/shapeGenerator.js +6 -4
  377. package/dist/domains/paths/shapeGenerator.js.map +1 -0
  378. package/dist/{features → domains}/paths/strokeOutline.js +1 -1
  379. package/dist/domains/paths/strokeOutline.js.map +1 -0
  380. package/dist/{features → domains}/paths/useAnchorFields.js +1 -1
  381. package/dist/domains/paths/useAnchorFields.js.map +1 -0
  382. package/dist/{features → domains}/paths/usePathEdit.js +1 -1
  383. package/dist/domains/paths/usePathEdit.js.map +1 -0
  384. package/dist/{features → domains}/poseRun/usePoseRun.js +1 -1
  385. package/dist/domains/poseRun/usePoseRun.js.map +1 -0
  386. package/dist/{features → domains}/selection/enteredGroupFrame.js +49 -10
  387. package/dist/domains/selection/enteredGroupFrame.js.map +1 -0
  388. package/dist/{features → domains}/selection/enteredGroupScope.js +1 -1
  389. package/dist/domains/selection/enteredGroupScope.js.map +1 -0
  390. package/dist/domains/selection/enteredOperands.js +29 -0
  391. package/dist/domains/selection/enteredOperands.js.map +1 -0
  392. package/dist/{features → domains}/selection/handleCommands.js +1 -1
  393. package/dist/domains/selection/handleCommands.js.map +1 -0
  394. package/dist/{features → domains}/selection/overlay.js +1 -1
  395. package/dist/domains/selection/overlay.js.map +1 -0
  396. package/dist/{features → domains}/selection/selectionPose.js +1 -1
  397. package/dist/domains/selection/selectionPose.js.map +1 -0
  398. package/dist/{features → domains}/snap/angle2d.js +1 -1
  399. package/dist/domains/snap/angle2d.js.map +1 -0
  400. package/dist/{features → domains}/snap/debugCandidates.js +1 -1
  401. package/dist/domains/snap/debugCandidates.js.map +1 -0
  402. package/dist/{features → domains}/snap/gather.js +1 -1
  403. package/dist/domains/snap/gather.js.map +1 -0
  404. package/dist/{features → domains}/snap/inputSubspace.js +1 -1
  405. package/dist/domains/snap/inputSubspace.js.map +1 -0
  406. package/dist/{features → domains}/snap/lazySession.js +1 -1
  407. package/dist/domains/snap/lazySession.js.map +1 -0
  408. package/dist/{features → domains}/snap/marks.js +1 -1
  409. package/dist/domains/snap/marks.js.map +1 -0
  410. package/dist/{features → domains}/snap/outcomeStore.js +1 -1
  411. package/dist/domains/snap/outcomeStore.js.map +1 -0
  412. package/dist/{features → domains}/snap/pointSnap.js +1 -1
  413. package/dist/domains/snap/pointSnap.js.map +1 -0
  414. package/dist/{features → domains}/snap/probes2d.js +1 -1
  415. package/dist/domains/snap/probes2d.js.map +1 -0
  416. package/dist/{features → domains}/snap/readoutDraw.js +1 -1
  417. package/dist/domains/snap/readoutDraw.js.map +1 -0
  418. package/dist/{features → domains}/snap/readoutLayer.js +1 -1
  419. package/dist/domains/snap/readoutLayer.js.map +1 -0
  420. package/dist/{features → domains}/snap/registry.js +1 -1
  421. package/dist/domains/snap/registry.js.map +1 -0
  422. package/dist/{features → domains}/snap/resizeBox.js +1 -1
  423. package/dist/domains/snap/resizeBox.js.map +1 -0
  424. package/dist/{features → domains}/snap/roles.js +1 -1
  425. package/dist/domains/snap/roles.js.map +1 -0
  426. package/dist/{features → domains}/snap/rotationSource.js +1 -1
  427. package/dist/domains/snap/rotationSource.js.map +1 -0
  428. package/dist/{features → domains}/snap/sceneReads.js +24 -3
  429. package/dist/domains/snap/sceneReads.js.map +1 -0
  430. package/dist/{features → domains}/snap/sceneSession2d.js +3 -2
  431. package/dist/domains/snap/sceneSession2d.js.map +1 -0
  432. package/dist/{features → domains}/snap/screen.js +1 -1
  433. package/dist/domains/snap/screen.js.map +1 -0
  434. package/dist/{features → domains}/snap/session2d.js +3 -2
  435. package/dist/domains/snap/session2d.js.map +1 -0
  436. package/dist/{features → domains}/snap/spanSnap.js +1 -1
  437. package/dist/domains/snap/spanSnap.js.map +1 -0
  438. package/dist/{features → domains}/snap/stepAngles.js +1 -1
  439. package/dist/domains/snap/stepAngles.js.map +1 -0
  440. package/dist/{features → domains}/text/editingDrawOne.js +4 -4
  441. package/dist/domains/text/editingDrawOne.js.map +1 -0
  442. package/dist/domains/text/hostTextEditors.js +24 -0
  443. package/dist/domains/text/hostTextEditors.js.map +1 -0
  444. package/dist/{features → domains}/text/index.js +1 -1
  445. package/dist/{features → domains}/text/sceneTextDrafts.js +1 -1
  446. package/dist/domains/text/sceneTextDrafts.js.map +1 -0
  447. package/dist/{features → domains}/text/textHitAt.js +18 -2
  448. package/dist/domains/text/textHitAt.js.map +1 -0
  449. package/dist/{features → domains}/text/textLayer.js +1 -1
  450. package/dist/domains/text/textLayer.js.map +1 -0
  451. package/dist/{features → domains}/text/useSceneTextEdit.js +11 -3
  452. package/dist/domains/text/useSceneTextEdit.js.map +1 -0
  453. package/dist/{features → domains}/viewports/aim.js +1 -1
  454. package/dist/domains/viewports/aim.js.map +1 -0
  455. package/dist/{features → domains}/viewports/viewMarker.js +23 -5
  456. package/dist/domains/viewports/viewMarker.js.map +1 -0
  457. package/dist/{features → domains}/viewports/viewMarkerDrag.js +3 -3
  458. package/dist/domains/viewports/viewMarkerDrag.js.map +1 -0
  459. package/dist/{features → domains}/viewports/viewResolver.js +1 -1
  460. package/dist/domains/viewports/viewResolver.js.map +1 -0
  461. package/dist/{features → domains}/viewports/viewportLayer.js +1 -1
  462. package/dist/domains/viewports/viewportLayer.js.map +1 -0
  463. package/dist/icons.table.js +1 -1
  464. package/dist/icons.table.js.map +1 -1
  465. package/dist/icons.table.json +106 -6
  466. package/dist/index.d.ts +1441 -1050
  467. package/dist/index.js +90 -77
  468. package/dist/interactions/actions/admitsChild.js +6 -2
  469. package/dist/interactions/actions/admitsChild.js.map +1 -1
  470. package/dist/interactions/actions/align/align.js +1 -4
  471. package/dist/interactions/actions/align/align.js.map +1 -1
  472. package/dist/interactions/actions/booleans/booleanGroupAction.js +66 -0
  473. package/dist/interactions/actions/booleans/booleanGroupAction.js.map +1 -0
  474. package/dist/interactions/actions/booleans/keymap.js +52 -0
  475. package/dist/interactions/actions/booleans/keymap.js.map +1 -0
  476. package/dist/interactions/actions/booleans/operands.js +1 -1
  477. package/dist/interactions/actions/booleans/pieces.js +4 -11
  478. package/dist/interactions/actions/booleans/pieces.js.map +1 -1
  479. package/dist/interactions/actions/clipboard/action.js +3 -7
  480. package/dist/interactions/actions/clipboard/action.js.map +1 -1
  481. package/dist/interactions/actions/clipboard/clipboardOps.js +1 -1
  482. package/dist/interactions/actions/clipboard/clipboardOps.js.map +1 -1
  483. package/dist/interactions/actions/clipboard/materializePaste.js.map +1 -1
  484. package/dist/interactions/actions/defaults/anchorEditing.js +6 -6
  485. package/dist/interactions/actions/defaults/anchorEditing.js.map +1 -1
  486. package/dist/interactions/actions/defaults/bendSegment.js +1 -1
  487. package/dist/interactions/actions/defaults/bendSegment.js.map +1 -1
  488. package/dist/interactions/actions/defaults/containerScroll.js +170 -0
  489. package/dist/interactions/actions/defaults/containerScroll.js.map +1 -0
  490. package/dist/interactions/actions/defaults/contextMenu.js +2 -5
  491. package/dist/interactions/actions/defaults/contextMenu.js.map +1 -1
  492. package/dist/interactions/actions/defaults/delete.js +1 -1
  493. package/dist/interactions/actions/defaults/delete.js.map +1 -1
  494. package/dist/interactions/actions/defaults/duplicate.js +1 -3
  495. package/dist/interactions/actions/defaults/duplicate.js.map +1 -1
  496. package/dist/interactions/actions/defaults/enterGroup.js +7 -12
  497. package/dist/interactions/actions/defaults/enterGroup.js.map +1 -1
  498. package/dist/interactions/actions/defaults/enterPathEdit.js +4 -8
  499. package/dist/interactions/actions/defaults/enterPathEdit.js.map +1 -1
  500. package/dist/interactions/actions/defaults/group.js +12 -24
  501. package/dist/interactions/actions/defaults/group.js.map +1 -1
  502. package/dist/interactions/actions/defaults/ingest.js +18 -10
  503. package/dist/interactions/actions/defaults/ingest.js.map +1 -1
  504. package/dist/interactions/actions/defaults/insertPathAnchor.js +3 -3
  505. package/dist/interactions/actions/defaults/insertPathAnchor.js.map +1 -1
  506. package/dist/interactions/actions/defaults/nudgeSteps.js +3 -21
  507. package/dist/interactions/actions/defaults/nudgeSteps.js.map +1 -1
  508. package/dist/interactions/actions/defaults/pathEditMarks.js.map +1 -1
  509. package/dist/interactions/actions/defaults/selectDeep.js +2 -2
  510. package/dist/interactions/actions/defaults/selectDeep.js.map +1 -1
  511. package/dist/interactions/actions/distribute/distribute.js.map +1 -1
  512. package/dist/interactions/actions/dropVerdict.js +9 -0
  513. package/dist/interactions/actions/dropVerdict.js.map +1 -0
  514. package/dist/interactions/actions/edit-anchors/action.js +2 -2
  515. package/dist/interactions/actions/edit-anchors/action.js.map +1 -1
  516. package/dist/interactions/actions/edit-anchors/extensionDrags.js.map +1 -1
  517. package/dist/interactions/actions/edit-anchors/geometry.js +8 -6
  518. package/dist/interactions/actions/edit-anchors/geometry.js.map +1 -1
  519. package/dist/interactions/actions/edit-anchors/handleDrag.js.map +1 -1
  520. package/dist/interactions/actions/edit-anchors/preview.js +1 -1
  521. package/dist/interactions/actions/edit-anchors/preview.js.map +1 -1
  522. package/dist/interactions/actions/flip/action.js +3 -2
  523. package/dist/interactions/actions/flip/action.js.map +1 -1
  524. package/dist/interactions/actions/geometryProjection.js +8 -3
  525. package/dist/interactions/actions/geometryProjection.js.map +1 -1
  526. package/dist/interactions/actions/gestureFrames.js +1 -0
  527. package/dist/interactions/actions/gestureFrames.js.map +1 -1
  528. package/dist/interactions/actions/insert/action.js +6 -2
  529. package/dist/interactions/actions/insert/action.js.map +1 -1
  530. package/dist/interactions/actions/insert/frame.js +1 -1
  531. package/dist/interactions/actions/insert/frame.js.map +1 -1
  532. package/dist/interactions/actions/insert/placeAction.js +6 -8
  533. package/dist/interactions/actions/insert/placeAction.js.map +1 -1
  534. package/dist/interactions/actions/insert/session.js +2 -2
  535. package/dist/interactions/actions/insert/session.js.map +1 -1
  536. package/dist/interactions/actions/move/action.js +6 -15
  537. package/dist/interactions/actions/move/action.js.map +1 -1
  538. package/dist/interactions/actions/move/behaviors/layoutDrop.js +12 -2
  539. package/dist/interactions/actions/move/behaviors/layoutDrop.js.map +1 -1
  540. package/dist/interactions/actions/move/behaviors/reparentOnDrop.js +29 -10
  541. package/dist/interactions/actions/move/behaviors/reparentOnDrop.js.map +1 -1
  542. package/dist/interactions/actions/move/behaviors/snapToContainer.js +42 -6
  543. package/dist/interactions/actions/move/behaviors/snapToContainer.js.map +1 -1
  544. package/dist/interactions/actions/move/capture.js +4 -8
  545. package/dist/interactions/actions/move/capture.js.map +1 -1
  546. package/dist/interactions/actions/move/commit/index.js.map +1 -1
  547. package/dist/interactions/actions/move/commit/layoutDrop.js +4 -3
  548. package/dist/interactions/actions/move/commit/layoutDrop.js.map +1 -1
  549. package/dist/interactions/actions/move/commit/layoutRelease.js +15 -9
  550. package/dist/interactions/actions/move/commit/layoutRelease.js.map +1 -1
  551. package/dist/interactions/actions/move/commit/reparent.js +19 -13
  552. package/dist/interactions/actions/move/commit/reparent.js.map +1 -1
  553. package/dist/interactions/actions/move/delta.js +51 -5
  554. package/dist/interactions/actions/move/delta.js.map +1 -1
  555. package/dist/interactions/actions/move/frame.js +8 -4
  556. package/dist/interactions/actions/move/frame.js.map +1 -1
  557. package/dist/interactions/actions/move/layout/container.js +19 -9
  558. package/dist/interactions/actions/move/layout/container.js.map +1 -1
  559. package/dist/interactions/actions/move/layout/dragged.js +2 -2
  560. package/dist/interactions/actions/move/layout/dragged.js.map +1 -1
  561. package/dist/interactions/actions/move/layout/dropPass.js +36 -18
  562. package/dist/interactions/actions/move/layout/dropPass.js.map +1 -1
  563. package/dist/interactions/actions/move/layout/exits.js +2 -2
  564. package/dist/interactions/actions/move/layout/exits.js.map +1 -1
  565. package/dist/interactions/actions/move/layout/glide.js +5 -5
  566. package/dist/interactions/actions/move/layout/glide.js.map +1 -1
  567. package/dist/interactions/actions/move/layout/view.js +55 -0
  568. package/dist/interactions/actions/move/layout/view.js.map +1 -0
  569. package/dist/interactions/actions/move/refusal.js +52 -0
  570. package/dist/interactions/actions/move/refusal.js.map +1 -0
  571. package/dist/interactions/actions/move/session.js +9 -8
  572. package/dist/interactions/actions/move/session.js.map +1 -1
  573. package/dist/interactions/actions/move/translate.js +10 -4
  574. package/dist/interactions/actions/move/translate.js.map +1 -1
  575. package/dist/interactions/actions/moveNodes.js +21 -5
  576. package/dist/interactions/actions/moveNodes.js.map +1 -1
  577. package/dist/interactions/actions/pathCommands/pathNodes.js +3 -3
  578. package/dist/interactions/actions/pathCommands/pathNodes.js.map +1 -1
  579. package/dist/interactions/actions/planeInput.js +14 -13
  580. package/dist/interactions/actions/planeInput.js.map +1 -1
  581. package/dist/interactions/actions/poseFrame.js +21 -8
  582. package/dist/interactions/actions/poseFrame.js.map +1 -1
  583. package/dist/interactions/actions/resize/action.js +1 -1
  584. package/dist/interactions/actions/resize/action.js.map +1 -1
  585. package/dist/interactions/actions/resize/aspect.js +1 -1
  586. package/dist/interactions/actions/resize/aspect.js.map +1 -1
  587. package/dist/interactions/actions/resize/commit.js +10 -1
  588. package/dist/interactions/actions/resize/commit.js.map +1 -1
  589. package/dist/interactions/actions/resize/frame.js +3 -2
  590. package/dist/interactions/actions/resize/frame.js.map +1 -1
  591. package/dist/interactions/actions/resize/held.js +44 -0
  592. package/dist/interactions/actions/resize/held.js.map +1 -0
  593. package/dist/interactions/actions/resize/session.js +3 -1
  594. package/dist/interactions/actions/resize/session.js.map +1 -1
  595. package/dist/interactions/actions/resolveOverlays.js +9 -0
  596. package/dist/interactions/actions/resolveOverlays.js.map +1 -1
  597. package/dist/interactions/actions/resolvePreviews.js +23 -7
  598. package/dist/interactions/actions/resolvePreviews.js.map +1 -1
  599. package/dist/interactions/actions/rotate/action.js +1 -1
  600. package/dist/interactions/actions/rotate/action.js.map +1 -1
  601. package/dist/interactions/actions/rotate/frame.js +1 -1
  602. package/dist/interactions/actions/rotate/frame.js.map +1 -1
  603. package/dist/interactions/actions/rotate/session.js +2 -2
  604. package/dist/interactions/actions/rotate/session.js.map +1 -1
  605. package/dist/interactions/actions/selectionSubtree.js +2 -4
  606. package/dist/interactions/actions/selectionSubtree.js.map +1 -1
  607. package/dist/interactions/actions/spatialReference.js +4 -9
  608. package/dist/interactions/actions/spatialReference.js.map +1 -1
  609. package/dist/interactions/gestures/dragRadial/dragRadial.js.map +1 -1
  610. package/dist/interactions/gestures/dragRect/dragRect.js.map +1 -1
  611. package/dist/kitSettingsSchema.js +2 -2
  612. package/dist/kitSettingsSchema.js.map +1 -1
  613. package/dist/{math-C_elShP_.d.ts → math-B_unOnF4.d.ts} +2 -2
  614. package/dist/math.d.ts +3 -3
  615. package/dist/move.d.ts +6 -6
  616. package/dist/{options-ClEm3SEl.d.ts → options-DAjkhbcs.d.ts} +5 -5
  617. package/dist/{poseDescriptor-DN2yfnq_.d.ts → poseDescriptor-CvSxVhCd.d.ts} +17 -4
  618. package/dist/resize.d.ts +6 -6
  619. package/dist/style.css +14 -0
  620. package/dist/test-seams.d.ts +11 -15
  621. package/dist/test-seams.js +1 -1
  622. package/dist/tools/builtin/eyedropper/useEyedropperTool.js +3 -6
  623. package/dist/tools/builtin/eyedropper/useEyedropperTool.js.map +1 -1
  624. package/dist/tools/builtin/line/useLineTool.js.map +1 -1
  625. package/dist/tools/builtin/measure/useMeasureTool.js +2 -2
  626. package/dist/tools/builtin/measure/useMeasureTool.js.map +1 -1
  627. package/dist/tools/builtin/pen/penHandle.js +2 -2
  628. package/dist/tools/builtin/pen/penHandle.js.map +1 -1
  629. package/dist/tools/builtin/pen/usePenTool.js +13 -19
  630. package/dist/tools/builtin/pen/usePenTool.js.map +1 -1
  631. package/dist/tools/builtin/polygon/usePolygonTool.js +1 -1
  632. package/dist/tools/builtin/polygon/usePolygonTool.js.map +1 -1
  633. package/dist/tools/builtin/select/groupEntry.js +1 -1
  634. package/dist/tools/builtin/select/groupEntry.js.map +1 -1
  635. package/dist/tools/builtin/select/selectionContributions.js +1 -1
  636. package/dist/tools/builtin/select/selectionContributions.js.map +1 -1
  637. package/dist/tools/builtin/select/useSelectTool.js +7 -7
  638. package/dist/tools/builtin/select/useSelectTool.js.map +1 -1
  639. package/dist/tools/builtin/slice/useSliceTool.js +5 -8
  640. package/dist/tools/builtin/slice/useSliceTool.js.map +1 -1
  641. package/dist/tools/builtin/star/useStarTool.js +1 -1
  642. package/dist/tools/builtin/star/useStarTool.js.map +1 -1
  643. package/dist/tools/index.js +2 -1
  644. package/dist/{types-49uYJN3j.d.ts → types-A_sNJYRd.d.ts} +8 -0
  645. package/dist/{types-BEdRIhNc.d.ts → types-DW14eu9B.d.ts} +131 -36
  646. package/dist/{types-p2alu-R1.d.ts → types-VCtfchp-.d.ts} +4 -6
  647. package/dist/util/color.js +12 -14
  648. package/dist/util/color.js.map +1 -1
  649. package/dist/version.js +1 -1
  650. package/package.json +25 -24
  651. package/dist/canvas/poseCascade.js +0 -65
  652. package/dist/canvas/poseCascade.js.map +0 -1
  653. package/dist/features/chrome-caps/buildChromeCtx.js.map +0 -1
  654. package/dist/features/chrome-caps/conditions.js.map +0 -1
  655. package/dist/features/chrome-caps/defaults.js.map +0 -1
  656. package/dist/features/chrome-caps/resolve.js.map +0 -1
  657. package/dist/features/chrome-caps/useChromeCaps.js.map +0 -1
  658. package/dist/features/chrome-caps/useHoverTracking.js.map +0 -1
  659. package/dist/features/ingestion/contentHandlers.js.map +0 -1
  660. package/dist/features/ingestion/imageHandler.js.map +0 -1
  661. package/dist/features/ingestion/openFilePicker.js.map +0 -1
  662. package/dist/features/ingestion/placement.js.map +0 -1
  663. package/dist/features/ingestion/registerKitHandlers.js +0 -43
  664. package/dist/features/ingestion/registerKitHandlers.js.map +0 -1
  665. package/dist/features/ingestion/svgHandler.js.map +0 -1
  666. package/dist/features/ingestion/textHandler.js.map +0 -1
  667. package/dist/features/ingestion/useCanvasIngestion.js.map +0 -1
  668. package/dist/features/ingestion/weaselJsonHandler.js.map +0 -1
  669. package/dist/features/longPress/longPressFeedback.js.map +0 -1
  670. package/dist/features/measure/actionIds.js.map +0 -1
  671. package/dist/features/measure/measureCommands.js.map +0 -1
  672. package/dist/features/measure/measureContribution.js.map +0 -1
  673. package/dist/features/measure/measureEdits.js.map +0 -1
  674. package/dist/features/measure/measureGestures.js.map +0 -1
  675. package/dist/features/measure/measureHit.js.map +0 -1
  676. package/dist/features/measure/measureLayer.js.map +0 -1
  677. package/dist/features/measure/measurement.js.map +0 -1
  678. package/dist/features/measure/measurements.js.map +0 -1
  679. package/dist/features/modes/modeLayers.js.map +0 -1
  680. package/dist/features/modes/modeTriggers.js.map +0 -1
  681. package/dist/features/pathEffects/effectSources.js.map +0 -1
  682. package/dist/features/pathEffects/index.js.map +0 -1
  683. package/dist/features/pathEffects/readSource.js.map +0 -1
  684. package/dist/features/pathEffects/textItems.js.map +0 -1
  685. package/dist/features/pathEffects/useEffectSourcesLayer.js.map +0 -1
  686. package/dist/features/paths/anchorData.js.map +0 -1
  687. package/dist/features/paths/anchorMarkers.js.map +0 -1
  688. package/dist/features/paths/editablePath.js.map +0 -1
  689. package/dist/features/paths/originProjection.js.map +0 -1
  690. package/dist/features/paths/pathEditExtension.js.map +0 -1
  691. package/dist/features/paths/pathEditState.js.map +0 -1
  692. package/dist/features/paths/pathEditingOverlayLayer.js.map +0 -1
  693. package/dist/features/paths/pathLayer.js.map +0 -1
  694. package/dist/features/paths/pathRepresentation.js.map +0 -1
  695. package/dist/features/paths/pathSnap/glyphs.js.map +0 -1
  696. package/dist/features/paths/pathSnap/pathSnapSource.js.map +0 -1
  697. package/dist/features/paths/pathSnap/sceneIndex.js.map +0 -1
  698. package/dist/features/paths/pathSnap/snapGeometry.js.map +0 -1
  699. package/dist/features/paths/penPreviewLayer.js.map +0 -1
  700. package/dist/features/paths/shapeGenerator.js.map +0 -1
  701. package/dist/features/paths/strokeOutline.js.map +0 -1
  702. package/dist/features/paths/useAnchorFields.js.map +0 -1
  703. package/dist/features/paths/usePathEdit.js.map +0 -1
  704. package/dist/features/poseRun/usePoseRun.js.map +0 -1
  705. package/dist/features/selection/enteredGroupFrame.js.map +0 -1
  706. package/dist/features/selection/enteredGroupScope.js.map +0 -1
  707. package/dist/features/selection/handleCommands.js.map +0 -1
  708. package/dist/features/selection/overlay.js.map +0 -1
  709. package/dist/features/selection/selectionPose.js.map +0 -1
  710. package/dist/features/snap/angle2d.js.map +0 -1
  711. package/dist/features/snap/debugCandidates.js.map +0 -1
  712. package/dist/features/snap/gather.js.map +0 -1
  713. package/dist/features/snap/inputSubspace.js.map +0 -1
  714. package/dist/features/snap/lazySession.js.map +0 -1
  715. package/dist/features/snap/marks.js.map +0 -1
  716. package/dist/features/snap/outcomeStore.js.map +0 -1
  717. package/dist/features/snap/pointSnap.js.map +0 -1
  718. package/dist/features/snap/probes2d.js.map +0 -1
  719. package/dist/features/snap/readoutDraw.js.map +0 -1
  720. package/dist/features/snap/readoutLayer.js.map +0 -1
  721. package/dist/features/snap/registry.js.map +0 -1
  722. package/dist/features/snap/resizeBox.js.map +0 -1
  723. package/dist/features/snap/roles.js.map +0 -1
  724. package/dist/features/snap/rotationSource.js.map +0 -1
  725. package/dist/features/snap/sceneReads.js.map +0 -1
  726. package/dist/features/snap/sceneSession2d.js.map +0 -1
  727. package/dist/features/snap/screen.js.map +0 -1
  728. package/dist/features/snap/session2d.js.map +0 -1
  729. package/dist/features/snap/spanSnap.js.map +0 -1
  730. package/dist/features/snap/stepAngles.js.map +0 -1
  731. package/dist/features/text/editingDrawOne.js.map +0 -1
  732. package/dist/features/text/sceneTextDrafts.js.map +0 -1
  733. package/dist/features/text/textHitAt.js.map +0 -1
  734. package/dist/features/text/textLayer.js.map +0 -1
  735. package/dist/features/text/useSceneTextEdit.js.map +0 -1
  736. package/dist/features/viewports/aim.js.map +0 -1
  737. package/dist/features/viewports/viewMarker.js.map +0 -1
  738. package/dist/features/viewports/viewMarkerDrag.js.map +0 -1
  739. package/dist/features/viewports/viewResolver.js.map +0 -1
  740. package/dist/features/viewports/viewportLayer.js.map +0 -1
  741. /package/dist/{features → domains}/chrome-caps/index.js +0 -0
@@ -6,20 +6,20 @@ import { IconRef } from '@weasel-js/icons';
6
6
  import { PaintDrawKind, DrawCommand, Effect, CompositeOp, BlendFactors } from '@weasel-js/renderer';
7
7
  import * as _weasel_js_routing_react from '@weasel-js/routing/react';
8
8
  import * as _weasel_js_geom from '@weasel-js/geom';
9
- import { FramedBox, View, Path, Affine, Rect, Scale2, PolygonPath, PathFillRule, AnchorSet, PointOrigin } from '@weasel-js/geom';
10
- import { I as InheritedPaint, S as Scene, R as RectPose } from './types-BEdRIhNc.js';
9
+ import { FramedBox, View, Path, Affine, Rect, Scale2, PolygonPath, Point, PathFillRule, AnchorSet, PointOrigin } from '@weasel-js/geom';
10
+ import { I as InheritedPaint, S as Scene, R as RectPose } from './types-DW14eu9B.js';
11
11
  import { Op, History } from '@weasel-js/history';
12
- import { NodeId, ModifierState, OverlayRole, ResizeAnchor, ActionDeps, OngoingHandle, OngoingOverlay, SelectionApi, IngestItem, Point2, DragSample, DebugSink, LongPressState } from '@weasel-js/routing';
12
+ import { NodeId, ModifierState, OverlayRole, WorldPoint, ResizeAnchor, ActionDeps, OngoingHandle, OngoingOverlay, IngestItem, SelectionApi, Point2, DragSample, DebugSink, LongPressState } from '@weasel-js/routing';
13
13
  import { TextNodeSource, TextOutlinesError, TextStyle, StyledRun, TextVerticalAlign } from '@weasel-js/text';
14
14
  import { CursorSpec } from '@weasel-js/cursor';
15
15
  import { ClaimableGesture } from '@weasel-js/gestures';
16
16
  import { SnapTier, ProbeRole } from '@weasel-js/geom/nd';
17
- import { a as PlaneMap, L as LayoutStrategy, b as LayoutDropTargetMode, R as ReflowTransition } from './types-49uYJN3j.js';
17
+ import { a as PlaneMap, L as LayoutStrategy, b as LayoutDropTargetMode, R as ReflowTransition } from './types-A_sNJYRd.js';
18
18
  import { O as OriginProjection } from './originProjection-gY0jb4Wb.js';
19
19
  import { EasingSpec, InterpolatorFactory, Target, Animator, TargetAxes } from '@weasel-js/animator';
20
- import { I as InsertAdapter, P as PasteOmission, R as RegionPickView } from './types-p2alu-R1.js';
21
- import { B as BoundsConstraint } from './clone-qb2e1F5p.js';
22
- import { P as PoseDescriptor } from './poseDescriptor-DN2yfnq_.js';
20
+ import { I as InsertAdapter, P as PasteOmission, R as RegionPickView } from './types-VCtfchp-.js';
21
+ import { B as BoundsConstraint } from './clone-Bz4iqGfE.js';
22
+ import { P as PoseDescriptor } from './poseDescriptor-CvSxVhCd.js';
23
23
 
24
24
  /** Pixel dimensions of the canvas viewport. */
25
25
  interface ViewportDims {
@@ -64,11 +64,11 @@ declare function fitViewToBounds(bounds: FramedBox, viewportDims: ViewportDims,
64
64
  * `Paint`'s discriminant, open on the string the way `ChromeId` is: the
65
65
  * kinds the kit ships, plus whatever a consumer registers.
66
66
  */
67
- type PaintKind = 'solid' | 'linear-gradient' | 'radial-gradient' | 'conic-gradient' | TileKind | 'texture' | (string & {});
67
+ type PaintKind = 'solid' | 'linear-gradient' | 'radial-gradient' | 'conic-gradient' | TileKind | 'image' | 'texture' | (string & {});
68
68
  /**
69
69
  * A set of kinds an editor offers as one choice. Kinds sharing a family show
70
70
  * as a single segment in a kind bar, named by the family, and the member is
71
- * picked inside that segment's body. The built-in tiles and `texture` are the
71
+ * picked inside that segment's body. The built-in tiles, `image` and `texture` are the
72
72
  * `patternFamily`.
73
73
  */
74
74
  interface PaintKindFamily {
@@ -149,7 +149,7 @@ declare function asPaint<T extends {
149
149
  * GL renderer and its serialize slot lives in `@weasel-js/svg`.
150
150
  */
151
151
 
152
- /** The family the built-in tiles and `texture` are offered under. A consumer's
152
+ /** The family the built-in tiles, `image` and `texture` are offered under. A consumer's
153
153
  * own pattern kind joins it by naming this as its `family`. */
154
154
  declare const patternFamily: PaintKindFamily;
155
155
  /** A tile paint seeded from a color. `units: 'bounds'` anchors the tile to the
@@ -519,6 +519,10 @@ interface Affordance {
519
519
  /** This affordance's interactive regions. Each lives in some target id's local frame (or
520
520
  * the world frame when `targetId` is `null`). `[]` means no chrome for this state. */
521
521
  regions(state: ChromeState): readonly AffordanceRegion[];
522
+ /** The regions a press at world `(wx, wy)` can hit, in the order `regions` lists them: a hit
523
+ * test reads these in place of `regions`, so one that leaves out a region the point is in
524
+ * changes which region wins. For an affordance with many regions, narrowed by an index. */
525
+ regionsAt?(state: ChromeState, wx: number, wy: number, view: View): readonly AffordanceRegion[];
522
526
  /** Optional non-interactive decoration (e.g., a leader line from a bounds edge to a
523
527
  * handle). Receives raw state + view because it may live outside any single target's
524
528
  * local frame. */
@@ -778,9 +782,10 @@ interface LayerGroup {
778
782
  * When `drawLayers` asks the renderer to keep a layer's pixels between frames
779
783
  * (`GroupDrawCommand.retain`) rather than submit its commands again.
780
784
  *
781
- * A layer is retained once its `deps` have held for a frame, the view has held
782
- * since the frame before (for a world-space layer, whose pixels move with
783
- * it), and it holds at least `minCommands` drawing commands. A layer changing
785
+ * A layer is retained once its `deps` have held for a frame, the view's zoom
786
+ * has held since the frame before (for a world-space layer, whose pixels move
787
+ * with it; the renderer moves a kept surface with a pan where it can), and it
788
+ * holds at least `minCommands` drawing commands. A layer changing
784
789
  * every frame is never retained: drawing it into its surface and compositing
785
790
  * that costs more than drawing it.
786
791
  */
@@ -1113,16 +1118,12 @@ interface PreviewPathsDep {
1113
1118
 
1114
1119
  /** The `snap` dep: what a drawn or dragged point locks to. */
1115
1120
 
1116
- type Point$4 = {
1117
- x: number;
1118
- y: number;
1119
- };
1120
1121
  /** Geometry a gesture brings to snap to that is in no scene node: what stays
1121
1122
  * put of a path whose anchors it is dragging. World coords. */
1122
1123
  interface SnapGeometry {
1123
1124
  paths?: readonly Path[];
1124
1125
  /** Points to snap to as anchors. */
1125
- anchors?: readonly Point$4[];
1126
+ anchors?: readonly WorldPoint[];
1126
1127
  }
1127
1128
  /** What builds a gesture's input subspace while `snap.constrain` is held:
1128
1129
  * an angle step in radians about `origin` (a rotate's every multiple of
@@ -1135,13 +1136,13 @@ type SnapConstrain = {
1135
1136
  interface SnapResizeBox {
1136
1137
  bounds: FramedBox;
1137
1138
  /** Its frame into ctx coordinates, an affine map. Default: the identity. */
1138
- toWorld?: (p: Point$4) => Point$4;
1139
+ toWorld?: (p: WorldPoint) => WorldPoint;
1139
1140
  }
1140
1141
  /** What a gesture tells the snap dep when it starts. Points are ctx
1141
1142
  * coordinates: world in 2D. */
1142
1143
  interface SnapBegin {
1143
1144
  gesture: SnapGesture;
1144
- press: Point$4;
1145
+ press: WorldPoint;
1145
1146
  /** The subject, whose geometry offers no targets. */
1146
1147
  ids?: readonly string[];
1147
1148
  /** The container a subject not yet in the scene lands in: an insert's
@@ -1153,7 +1154,7 @@ interface SnapBegin {
1153
1154
  * axis-aligned. */
1154
1155
  box?: SnapResizeBox;
1155
1156
  /** Rotate, handle: the point the angle turns about. Default `press`. */
1156
- pivot?: Point$4;
1157
+ pivot?: WorldPoint;
1157
1158
  /** Rotate: the subject's angle at press, radians. Default 0. */
1158
1159
  theta0?: number;
1159
1160
  /** Angle gestures: the reach as an angle, radians, in place of screen px
@@ -1164,7 +1165,7 @@ interface SnapBegin {
1164
1165
  * start, the previous anchor, the anchor a handle pulls from. Tangent and
1165
1166
  * perpendicular targets are measured from it, a `constrain` step turns
1166
1167
  * about it, and no point target on it is offered. */
1167
- origin?: Point$4;
1168
+ origin?: WorldPoint;
1168
1169
  also?: SnapGeometry;
1169
1170
  constrain?: SnapConstrain;
1170
1171
  /** How the camera's world maps into the parallax plane the gesture's points
@@ -1189,7 +1190,7 @@ interface SnapMods {
1189
1190
  }
1190
1191
  /** Where a session put one frame's point, and the marks to draw for it. */
1191
1192
  interface SnapOutcome {
1192
- point: Point$4;
1193
+ point: WorldPoint;
1193
1194
  /** Whether some target holds the point. */
1194
1195
  held: boolean;
1195
1196
  marks: readonly SnapMark[];
@@ -1197,7 +1198,7 @@ interface SnapOutcome {
1197
1198
  /** One gesture's snapping, from press to release. */
1198
1199
  interface SnapSession {
1199
1200
  /** Where `p` lands. */
1200
- at(p: Point$4, mods: SnapMods): SnapOutcome;
1201
+ at(p: WorldPoint, mods: SnapMods): SnapOutcome;
1201
1202
  /** Where the angle `theta` (radians, about `pivot`) lands. */
1202
1203
  angle(theta: number, mods: SnapMods): {
1203
1204
  theta: number;
@@ -1219,20 +1220,23 @@ interface SnapDep {
1219
1220
  /** The snap source contract: what a target set offers a snap session, and
1220
1221
  * the marks a session draws for what it met. */
1221
1222
 
1222
- type Point$3 = {
1223
- x: number;
1224
- y: number;
1225
- };
1226
1223
  /** The positions a target allows: `at` plus any combination of `dirs`. No
1227
1224
  * dirs is a point, one a line, two a plane. */
1228
- interface Locus<P = Point$3> {
1225
+ interface Locus<P = Point> {
1229
1226
  at: P;
1230
1227
  dirs: readonly P[];
1231
1228
  /** One interval per dir, in multiples of it: a segment or a bounded face. */
1232
1229
  span?: readonly (readonly [number, number])[];
1233
1230
  }
1231
+ /** An affine map between a frame and world, in a host's point type. */
1232
+ interface SnapFrame<P = Point> {
1233
+ /** A point given in the frame, in world. */
1234
+ toWorld(p: P): P;
1235
+ /** A world point in the frame; null where nothing maps back. */
1236
+ toLocal(p: P): P | null;
1237
+ }
1234
1238
  /** One locus a source offers one probe. */
1235
- interface SourceCandidate<P = Point$3> {
1239
+ interface SourceCandidate<P = Point> {
1236
1240
  /** The id of a probe the source was offered. */
1237
1241
  probe: string;
1238
1242
  locus: Locus<P>;
@@ -1253,13 +1257,13 @@ interface SnapEdges {
1253
1257
  y: SnapEdge;
1254
1258
  }
1255
1259
  /** A point on the subject that should land on a locus. */
1256
- interface SnapProbeAt<P = Point$3> {
1260
+ interface SnapProbeAt<P = Point> {
1257
1261
  id: string;
1258
1262
  at: P;
1259
1263
  role: ProbeRole;
1260
1264
  }
1261
1265
  /** What a session asks a source for, once per frame. */
1262
- interface SnapCollect<P = Point$3> {
1266
+ interface SnapCollect<P = Point> {
1263
1267
  gesture: SnapGesture;
1264
1268
  /** The probes this source matches, where the unsnapped gesture puts them. */
1265
1269
  probes: readonly SnapProbeAt<P>[];
@@ -1297,6 +1301,11 @@ interface SnapCollect<P = Point$3> {
1297
1301
  reachPx: number;
1298
1302
  /** Absent in a host with no 2D scene. */
1299
1303
  scene?: Scene<unknown, string, unknown>;
1304
+ /** `id`'s own frame: the coordinates its box is laid out in, from its
1305
+ * corner along its own axes, turned and transformed as it is drawn. A
1306
+ * container whose pose is a frame stores its children's poses in it.
1307
+ * Undefined for a node with no box; absent in a host that has none. */
1308
+ frameOf?(id: string): SnapFrame<P> | undefined;
1300
1309
  /** How the camera's world maps into the parallax plane the probes are in.
1301
1310
  * Absent in the camera's own world. A target the camera draws, a grid or
1302
1311
  * a ruler guide, is carried through it. */
@@ -1305,10 +1314,10 @@ interface SnapCollect<P = Point$3> {
1305
1314
  /** What a rotate or handle drag asks a source for, once per frame. Angles
1306
1315
  * are radians about `pivot`, in the frame `rotationOf` reads. */
1307
1316
  interface AngleCollect {
1308
- pivot: Point$3;
1317
+ pivot: WorldPoint;
1309
1318
  /** Where the gesture was pressed: its distance from `pivot` is the radius
1310
1319
  * the default marks are drawn at. */
1311
- press: Point$3;
1320
+ press: WorldPoint;
1312
1321
  /** The angle at press. */
1313
1322
  theta0: number;
1314
1323
  /** The unsnapped angle now. */
@@ -1336,7 +1345,7 @@ interface AngleCandidate {
1336
1345
  mark?: SnapMarks;
1337
1346
  }
1338
1347
  /** A set of snap targets. */
1339
- interface SnapSource<P = Point$3> {
1348
+ interface SnapSource<P = Point> {
1340
1349
  id: string;
1341
1350
  /** Default `'target'`. A fallback never displaces a target in reach. */
1342
1351
  tier?: SnapTier;
@@ -1351,9 +1360,9 @@ interface SnapSource<P = Point$3> {
1351
1360
  angles?(q: AngleCollect): Iterable<AngleCandidate>;
1352
1361
  }
1353
1362
  /** One mark, or several, for one candidate. */
1354
- type SnapMarks<P = Point$3> = SnapMark<P> | readonly SnapMark<P>[];
1363
+ type SnapMarks<P = Point> = SnapMark<P> | readonly SnapMark<P>[];
1355
1364
  /** What a session draws for a candidate the result meets. World coords. */
1356
- type SnapMark<P = Point$3> = {
1365
+ type SnapMark<P = Point> = {
1357
1366
  kind: 'point';
1358
1367
  at: P;
1359
1368
  glyph: string;
@@ -1414,18 +1423,14 @@ interface SnapReadoutStyle {
1414
1423
  lineWidth?: number;
1415
1424
  }
1416
1425
 
1417
- type Point$2 = {
1418
- x: number;
1419
- y: number;
1420
- };
1421
1426
  /** The marks of the snap in flight, for the readout to draw. */
1422
- interface SnapOutcomeStore<P = Point$2> {
1427
+ interface SnapOutcomeStore<P = Point> {
1423
1428
  get(): readonly SnapMark<P>[];
1424
1429
  set(marks: readonly SnapMark<P>[]): void;
1425
1430
  subscribe(listener: () => void): () => void;
1426
1431
  }
1427
1432
  /** An empty outcome store, which notifies only when the marks change. */
1428
- declare function createSnapOutcomeStore<P = Point$2>(): SnapOutcomeStore<P>;
1433
+ declare function createSnapOutcomeStore<P = Point>(): SnapOutcomeStore<P>;
1429
1434
 
1430
1435
  /** The `snapReadout` dep: where marks go to be drawn. */
1431
1436
  interface SnapReadoutDep {
@@ -1678,16 +1683,31 @@ interface GestureLifecycleOptions {
1678
1683
  onGestureEnd?(committed: boolean): void;
1679
1684
  }
1680
1685
 
1681
- /** Optional consumer seam: given a node and the affine `m` that a pose-transform
1686
+ /** The pose a node is stored with before one pose-transform action, and the
1687
+ * pose the action moved it to. A resize whose data took a mirror commits that
1688
+ * pose with its box normalized. */
1689
+ interface PoseChange<TPose = unknown> {
1690
+ readonly from: TPose;
1691
+ readonly to: TPose;
1692
+ }
1693
+ /** Optional consumer seam: given a node and the transform that a pose-transform
1682
1694
  * action applied to the node's POSE, return updated `data` with the node's
1683
- * data-held geometry transformed by `m`, or `null` if this node has no
1684
- * data-held geometry (the kit leaves `data` alone). */
1685
- interface GeometryProjection {
1695
+ * data-held geometry transformed the same way, or `null` if this node has no
1696
+ * data-held geometry (the kit leaves `data` alone).
1697
+ *
1698
+ * `m` is that transform as a plane affine, in the node's stored frame and the
1699
+ * coordinates gesture points arrive in: world on a 2D canvas, screen under the
1700
+ * identity `clientToWorld` a camera-bearing host passes. A host whose poses
1701
+ * are not planar reads the transform from `change` instead, which carries the
1702
+ * stored pose before and after in the pose's own terms. For a flip of a pose
1703
+ * that is only a box, `change` holds the same box twice and only `m` says
1704
+ * which way the content mirrored. */
1705
+ interface GeometryProjection<TPose = unknown> {
1686
1706
  transform(node: {
1687
1707
  id?: string;
1688
1708
  data: unknown;
1689
- pose: unknown;
1690
- }, m: Affine): unknown | null;
1709
+ pose: TPose;
1710
+ }, m: Affine, change: PoseChange<TPose>): unknown | null;
1691
1711
  }
1692
1712
 
1693
1713
  /** What a handle drag holds fixed: its direction from the anchor, or its length. */
@@ -1726,14 +1746,10 @@ interface PathForm {
1726
1746
  readonly kind: string;
1727
1747
  readonly [field: string]: unknown;
1728
1748
  }
1729
- type Point$1 = {
1730
- x: number;
1731
- y: number;
1732
- };
1733
1749
  /** The outline of an anchor's marker, in screen space: `size` px across at
1734
1750
  * `at`, with the anchor's neighbors along its subpath, null past an open
1735
1751
  * end. */
1736
- type AnchorMarkerShape = (at: Point$1, size: number, prev: Point$1 | null, next: Point$1 | null) => PolygonPath;
1752
+ type AnchorMarkerShape = (at: Point, size: number, prev: Point | null, next: Point | null) => PolygonPath;
1737
1753
  /** How path edit reads and writes one kind of {@link PathForm}. */
1738
1754
  interface PathRepresentation {
1739
1755
  /** The `kind` of the forms it reads. */
@@ -1762,7 +1778,7 @@ interface PathRepresentation {
1762
1778
  * representation that has this takes every segment press, in place of
1763
1779
  * Bend segment.
1764
1780
  */
1765
- segmentPress?(deps: ActionDeps, at: Point$1): (() => OngoingHandle) | null;
1781
+ segmentPress?(deps: ActionDeps, at: WorldPoint): (() => OngoingHandle) | null;
1766
1782
  }
1767
1783
 
1768
1784
  /**
@@ -1832,10 +1848,6 @@ interface PathEditPart {
1832
1848
  };
1833
1849
  };
1834
1850
  }
1835
- type Point = {
1836
- x: number;
1837
- y: number;
1838
- };
1839
1851
  /** An anchor or handle drag on the open path, as it starts. */
1840
1852
  interface PathEditDragStart extends Omit<PathEditTarget, 'node'> {
1841
1853
  /** The node's committed pose and data; null when it cannot be read. */
@@ -1873,7 +1885,7 @@ interface PathEditDrag {
1873
1885
  /** For a handle drag, where the handle goes, given `to`: where the pointer
1874
1886
  * and the locks in force put it. Extensions answer in turn, each from the
1875
1887
  * last one's answer. */
1876
- handle?(to: Point, move: PathEditHandleMove): Point;
1888
+ handle?(to: WorldPoint, move: PathEditHandleMove): WorldPoint;
1877
1889
  /** A wheel turned while the drag is in flight. Return true to claim it;
1878
1890
  * the drag then redoes its last move. */
1879
1891
  wheel?(wheel: {
@@ -2144,6 +2156,10 @@ interface IngestCtx {
2144
2156
  x: number;
2145
2157
  y: number;
2146
2158
  } | null;
2159
+ /** Every item the arrival carried, the ones other handlers took included:
2160
+ * a handler can tell that the string it was given rides beside a file.
2161
+ * Absent reads as the items the handler was handed. */
2162
+ items?: readonly IngestItem[];
2147
2163
  /** Visible canvas area in world coordinates. */
2148
2164
  viewportWorldRect(): {
2149
2165
  x: number;
@@ -2207,7 +2223,8 @@ interface ContentHandlerEntry {
2207
2223
  priority?: number;
2208
2224
  handle(items: IngestItem[], ctx: IngestCtx): void | Promise<void>;
2209
2225
  }
2210
- /** Register a content handler. Returns a disposer that removes it. */
2226
+ /** Register a content handler for every canvas on the page. Returns a disposer that removes
2227
+ * it. A handler for one canvas goes in that canvas's `ingestion.handlers` instead. */
2211
2228
  declare function registerContentHandler(entry: ContentHandlerEntry): () => void;
2212
2229
 
2213
2230
  /**
@@ -2276,6 +2293,11 @@ interface IngestionDep {
2276
2293
  /** Clipboard-paste seam for the kit weasel-JSON handler.
2277
2294
  * Live accessor, same caveat as `resolveSrc`. */
2278
2295
  clipboard?: ClipboardIngestCtx;
2296
+ /** The canvas's own content handlers and the kit's it keeps (SceneCanvas's
2297
+ * `ingestion.handlers` and `ingestion.kitHandlers`). An arrival routes
2298
+ * through these and the page-wide registry's. Absent reads as none.
2299
+ * Live accessor, same caveat as `resolveSrc`. */
2300
+ handlers?: readonly ContentHandlerEntry[];
2279
2301
  }
2280
2302
 
2281
2303
  /** The gesture an insert's bounds came from, in the same coordinates: `bounds`
@@ -2354,6 +2376,20 @@ interface InsertLive {
2354
2376
  gesture: unknown;
2355
2377
  }
2356
2378
 
2379
+ /** A no with a reason: words for the user, shown beside the pointer while a drag is over what refuses it. */
2380
+ interface DropRefusal {
2381
+ refuse: string;
2382
+ }
2383
+ /**
2384
+ * The answer to "may this land here?": `true` lands, `false` is a silent no,
2385
+ * and a {@link DropRefusal} is a no the user is told about. A drag over a
2386
+ * refusal draws its target refused and the reason beside the pointer, and a
2387
+ * release there lands nothing.
2388
+ */
2389
+ type DropVerdict = boolean | DropRefusal;
2390
+ /** The reason `verdict` gives, or `null` when it lands or says no silently. */
2391
+ declare function refusalOf(verdict: DropVerdict | undefined): string | null;
2392
+
2357
2393
  /**
2358
2394
  * Layout-strategy lookup by container id, consumed by `moveAction` to run
2359
2395
  * the drag-time reflow pass. Sourced by `<SceneCanvas>` from the layout each
@@ -2370,19 +2406,23 @@ interface LayoutDep {
2370
2406
  }
2371
2407
  /**
2372
2408
  * Whether the nodes `ids` may be dropped into the container `parent`. A move
2373
- * consults it before reparenting anything: reparent-on-drop passes over a
2374
- * refused container to the nearest one around it that admits them, and the
2375
- * layout drop treats a refused layout container as if it were not there.
2376
- * Absent, every container takes any drop.
2409
+ * consults it before reparenting anything. Where it answers `false`,
2410
+ * reparent-on-drop passes over the container to the nearest one around it
2411
+ * that admits them, and the layout drop treats a layout container as if it
2412
+ * were not there. Where it answers a `DropRefusal`, a drag over the container
2413
+ * draws it refused with the reason beside the pointer, and a release there
2414
+ * moves nothing. Absent, every container takes any drop.
2377
2415
  */
2378
- type CanDropIntoDep = (parent: string, ids: readonly string[]) => boolean;
2416
+ type CanDropIntoDep = (parent: string, ids: readonly string[]) => DropVerdict;
2379
2417
 
2380
2418
  /**
2381
2419
  * The deps behind text editing, the clipboard, and Slice.
2382
2420
  */
2383
2421
 
2384
2422
  /**
2385
- * Dep for `enterTextEditAction`.
2423
+ * Dep for `enterTextEditAction`. `<SceneCanvas>` answers it with its own
2424
+ * editor (its `textEditor` prop); a host with an editor of its own, one
2425
+ * driving character controls, publishes it instead.
2386
2426
  *
2387
2427
  * Wrap the return value of `useTextEdit` / `useSceneTextEdit` to source this
2388
2428
  * dep. The `isTextNode` predicate is optional — when absent the action fires
@@ -2419,10 +2459,7 @@ interface TextEditDep {
2419
2459
  */
2420
2460
  interface ClipboardDep {
2421
2461
  copy(): void;
2422
- paste(at?: {
2423
- worldX: number;
2424
- worldY: number;
2425
- }): void;
2462
+ paste(at?: WorldPoint): void;
2426
2463
  isEmpty(): boolean;
2427
2464
  }
2428
2465
  /**
@@ -2489,10 +2526,7 @@ type HitTestView = RegionPickView;
2489
2526
  * `exclude`. Pass moving-node roots + their descendants when the caller
2490
2527
  * wants to ignore the nodes it's manipulating.
2491
2528
  */
2492
- type NodeAtPointDep = (point: {
2493
- x: number;
2494
- y: number;
2495
- }, exclude?: Iterable<NodeId>) => NodeId | null;
2529
+ type NodeAtPointDep = (point: WorldPoint, exclude?: Iterable<NodeId>) => NodeId | null;
2496
2530
  /** What an area-selecting action needs: a way to ask what a region covers,
2497
2531
  * and a way to read and replace the selection. */
2498
2532
  interface AreaSelectDep {
@@ -2520,10 +2554,7 @@ interface LassoSelectDep {
2520
2554
  * Optional — when absent, `lassoSelectAction` falls back to AABB via
2521
2555
  * `hitTestArea`.
2522
2556
  */
2523
- hitTestLasso?(polygon: ReadonlyArray<{
2524
- x: number;
2525
- y: number;
2526
- }>, mode: 'centers' | 'intersect' | 'enclosed', view?: HitTestView): string[];
2557
+ hitTestLasso?(polygon: ReadonlyArray<WorldPoint>, mode: 'centers' | 'intersect' | 'enclosed', view?: HitTestView): string[];
2527
2558
  /** Return ids of nodes whose AABB overlaps the given rect (fallback). */
2528
2559
  hitTestArea(bounds: {
2529
2560
  x: number;
@@ -2556,32 +2587,20 @@ type InsertExtras = {
2556
2587
  kind: 'ellipse';
2557
2588
  } | {
2558
2589
  kind: 'line';
2559
- a: {
2560
- x: number;
2561
- y: number;
2562
- };
2563
- b: {
2564
- x: number;
2565
- y: number;
2566
- };
2590
+ a: WorldPoint;
2591
+ b: WorldPoint;
2567
2592
  } | {
2568
2593
  kind: 'polygon';
2569
2594
  sides: number;
2570
2595
  rotation: number;
2571
- center?: {
2572
- x: number;
2573
- y: number;
2574
- };
2596
+ center?: WorldPoint;
2575
2597
  radius?: number;
2576
2598
  } | {
2577
2599
  kind: 'star';
2578
2600
  points: number;
2579
2601
  innerRadiusRatio: number;
2580
2602
  rotation: number;
2581
- center?: {
2582
- x: number;
2583
- y: number;
2584
- };
2603
+ center?: WorldPoint;
2585
2604
  outerRadius?: number;
2586
2605
  } | {
2587
2606
  kind: 'pencil';
@@ -2798,9 +2817,10 @@ declare module '@weasel-js/routing' {
2798
2817
  /**
2799
2818
  * Optional consumer seam for the eager-sync layer: lets pose-transform
2800
2819
  * actions (resize/move/nudge/flip — NOT rotate) ALSO rewrite a node's
2801
- * data-held geometry. Given a node and the affine `m` applied to its pose,
2802
- * `transform(node, m)` returns updated `data` (geometry mapped by `m`) or
2803
- * `null` for nodes with no data-held geometry.
2820
+ * data-held geometry. Given a node, the affine `m` applied to its pose,
2821
+ * and the pose change itself, `transform(node, m, change)` returns updated
2822
+ * `data` (geometry mapped the same way) or `null` for nodes with no
2823
+ * data-held geometry. A host whose poses are not planar reads `change`.
2804
2824
  *
2805
2825
  * Strictly opt-in: when absent (or when `transform` returns null), the kit
2806
2826
  * emits only the pose op and leaves `data` untouched. Rotate intentionally
@@ -2827,4 +2847,4 @@ declare module '@weasel-js/routing' {
2827
2847
  }
2828
2848
  }
2829
2849
 
2830
- export { type SourceCandidate as $, type AnchorMarkerShape as A, type CreateOutlinesAdapter as B, type ContentHandlerEntry as C, type Dims as D, type EditAnchorsDep as E, type FitViewToBoundsOptions as F, type GestureLifecycleOptions as G, type HandleLocks as H, type InertiaConfig as I, type PaintKindEntry as J, type PathEditTarget as K, type LayerHit as L, type FinishedEditFrame as M, type PathSymmetryDep as N, type BooleanOpOptions as O, type PathEditMark as P, type BooleansAdapter as Q, type RenderLayer as R, type SnapSource as S, type TransformFollower as T, type BooleanOp as U, type ViewAnimationOptions as V, type PathPaint as W, type BooleanOpResult as X, type BooleanStrokes as Y, type SnapMods as Z, _resetPaintKindsForTests as _, type PathEditExtension as a, type SnapBegin as a$, type SnapProbeAt as a0, type SnapCollect as a1, type SnapMark as a2, type SnapDep as a3, type SnapOutcome as a4, type SnapReadoutStyle as a5, type AngleCandidate as a6, type AngleCollect as a7, type AnimateToBoundsOptions as a8, type AreaSelectDep as a9, type Locus as aA, type MinSize as aB, type NodeAtPointDep as aC, type OutlinePathSpec as aD, PATH_OVERLAY_ROLES as aE, type PaintKind as aF, type PaintKindEditorProps as aG, type PaintKindFamily as aH, type PaintKindLoader as aI, type PanBounds as aJ, type PathEditDrag as aK, type PathEditDragStart as aL, type PathEditFinishCtx as aM, type PathEditHandleMove as aN, type PathEditMarksCtx as aO, type PathEditOther as aP, type PathEditPart as aQ, type PathEditStore as aR, type PathForm as aS, type PathOverlay as aT, type PathOverlayOptions as aU, type PathOverlayStyle as aV, type PathRepresentation as aW, type PathTransformFinishCtx as aX, type PreviewPathsDep as aY, type ResizePolicy as aZ, STICKY_DEFAULTS as a_, type BooleanOpPreview as aa, type BooleanPreviewPiece as ab, type CanDropIntoDep as ac, type ClipboardDep as ad, type ClipboardIngestCtx as ae, type CreateOutlinesResult as af, type CustomPaintContext as ag, DEFAULT_LAYER_RETAIN as ah, type DecayLoopConfig as ai, type FinishedPathEdit as aj, GEOMETRY_BOUND_DATA as ak, type HandleLock as al, type HitTestView as am, type IngestCtx as an, type IngestionDep as ao, type InsertDep as ap, type InsertEnds as aq, type InsertExtras as ar, type InsertIntoDep as as, type InsertLive as at, type LassoSelectDep as au, type LayerCommandCache as av, type LayerDrawFailure as aw, type LayerDrawSpan as ax, type LayerRetainPolicy as ay, type LayoutDep as az, type SnapGesture as b, type SnapEdge as b0, type SnapEdges as b1, type SnapMarks as b2, type SnapReadoutDep as b3, type SvgUnpacker as b4, type TextEditDep as b5, type TextNodeData as b6, type TransformPreviewNode as b7, type TransientPath as b8, VIEW_ANIMATION_KEY as b9, previewBooleanOp as bA, registerContentHandler as bB, registerPaintKind as bC, registerPaintKindLoader as bD, seedTile as bE, stickyData as bF, stickyNodeFactory as bG, subscribeToSources as bH, switchGradientKind as bI, textBoxOf as bJ, useDecayLoop as bK, useEnteredGroup as bL, useViewAnimation as bM, useViewAnimationOn as bN, viewAxes as bO, withoutGeometryBoundData as bP, type ViewAnimationApi as ba, type ViewApi as bb, type ViewChannel as bc, applyBooleanOp as bd, applyCreateOutlines as be, asPaint as bf, createEnteredGroup as bg, createPathOverlay as bh, createSnapOutcomeStore as bi, depsUnchanged as bj, drawLayers as bk, drawOneLayer as bl, fitViewToBounds as bm, getPaintKind as bn, isLayerPainted as bo, isLayerVisible as bp, listGradientKinds as bq, listPaintKinds as br, minSizeOf as bs, paintKindOf as bt, paintKindRegistry as bu, paintedLayers as bv, paintsLayer as bw, paletteInsertPaint as bx, pathPaintOf as by, patternFamily as bz, type SnapConstrain as c, type SnapResizeBox as d, type SnapGeometry as e, type SnapOutcomeStore as f, type SnapSession as g, type LayerDims as h, type ViewportDims as i, type RedrawSource as j, type EditAnchorsParams as k, type SliceDep as l, type StickyStyle as m, type EnteredGroupApi as n, type ChromeState as o, type LayerGroup as p, type GeometryProjection as q, type InsertNodeFactory as r, type InsertPaint as s, type SvgIngestOptions as t, type SceneCanvasSnap as u, type Affordance as v, type AffordanceRegion as w, type AffordanceBinding as x, type CommonAffordanceScratch as y, type TextOverflow as z };
2850
+ export { type SourceCandidate as $, type AnchorMarkerShape as A, type CreateOutlinesAdapter as B, type ContentHandlerEntry as C, type Dims as D, type EditAnchorsDep as E, type FitViewToBoundsOptions as F, type GestureLifecycleOptions as G, type HandleLocks as H, type InertiaConfig as I, type PaintKindEntry as J, type PathEditTarget as K, type LayerHit as L, type FinishedEditFrame as M, type PathSymmetryDep as N, type BooleanOpOptions as O, type PathEditMark as P, type BooleansAdapter as Q, type RenderLayer as R, type SnapSource as S, type TextOverflow as T, type BooleanOp as U, type ViewAnimationOptions as V, type PathPaint as W, type BooleanOpResult as X, type BooleanStrokes as Y, type SnapMods as Z, _resetPaintKindsForTests as _, type PathEditExtension as a, type PreviewPathsDep as a$, type SnapProbeAt as a0, type SnapCollect as a1, type SnapMark as a2, type SnapDep as a3, type SnapOutcome as a4, type SnapReadoutStyle as a5, type AngleCandidate as a6, type AngleCollect as a7, type AnimateToBoundsOptions as a8, type AreaSelectDep as a9, type LayerRetainPolicy as aA, type LayoutDep as aB, type Locus as aC, type MinSize as aD, type NodeAtPointDep as aE, type OutlinePathSpec as aF, PATH_OVERLAY_ROLES as aG, type PaintKind as aH, type PaintKindEditorProps as aI, type PaintKindFamily as aJ, type PaintKindLoader as aK, type PanBounds as aL, type PathEditDrag as aM, type PathEditDragStart as aN, type PathEditFinishCtx as aO, type PathEditHandleMove as aP, type PathEditMarksCtx as aQ, type PathEditOther as aR, type PathEditPart as aS, type PathEditStore as aT, type PathForm as aU, type PathOverlay as aV, type PathOverlayOptions as aW, type PathOverlayStyle as aX, type PathRepresentation as aY, type PathTransformFinishCtx as aZ, type PoseChange as a_, type BooleanOpPreview as aa, type BooleanPreviewPiece as ab, type CanDropIntoDep as ac, type ClipboardDep as ad, type ClipboardIngestCtx as ae, type CreateOutlinesResult as af, type CustomPaintContext as ag, DEFAULT_LAYER_RETAIN as ah, type DecayLoopConfig as ai, type DropRefusal as aj, type DropVerdict as ak, type FinishedPathEdit as al, GEOMETRY_BOUND_DATA as am, type HandleLock as an, type HitTestView as ao, type IngestCtx as ap, type IngestionDep as aq, type InsertDep as ar, type InsertEnds as as, type InsertExtras as at, type InsertIntoDep as au, type InsertLive as av, type LassoSelectDep as aw, type LayerCommandCache as ax, type LayerDrawFailure as ay, type LayerDrawSpan as az, type SnapGesture as b, type ResizePolicy as b0, STICKY_DEFAULTS as b1, type SnapBegin as b2, type SnapEdge as b3, type SnapEdges as b4, type SnapFrame as b5, type SnapMarks as b6, type SnapReadoutDep as b7, type SvgUnpacker as b8, type TextEditDep as b9, paintsLayer as bA, paletteInsertPaint as bB, pathPaintOf as bC, patternFamily as bD, previewBooleanOp as bE, refusalOf as bF, registerContentHandler as bG, registerPaintKind as bH, registerPaintKindLoader as bI, seedTile as bJ, stickyData as bK, stickyNodeFactory as bL, subscribeToSources as bM, switchGradientKind as bN, textBoxOf as bO, useDecayLoop as bP, useEnteredGroup as bQ, useViewAnimation as bR, useViewAnimationOn as bS, viewAxes as bT, withoutGeometryBoundData as bU, type TextNodeData as ba, type TransformPreviewNode as bb, type TransientPath as bc, VIEW_ANIMATION_KEY as bd, type ViewAnimationApi as be, type ViewApi as bf, type ViewChannel as bg, applyBooleanOp as bh, applyCreateOutlines as bi, asPaint as bj, createEnteredGroup as bk, createPathOverlay as bl, createSnapOutcomeStore as bm, depsUnchanged as bn, drawLayers as bo, drawOneLayer as bp, fitViewToBounds as bq, getPaintKind as br, isLayerPainted as bs, isLayerVisible as bt, listGradientKinds as bu, listPaintKinds as bv, minSizeOf as bw, paintKindOf as bx, paintKindRegistry as by, paintedLayers as bz, type SnapConstrain as c, type SnapResizeBox as d, type SnapGeometry as e, type SnapOutcomeStore as f, type SnapSession as g, type LayerDims as h, type ViewportDims as i, type RedrawSource as j, type EditAnchorsParams as k, type SliceDep as l, type StickyStyle as m, type EnteredGroupApi as n, type ChromeState as o, type LayerGroup as p, type TransformFollower as q, type GeometryProjection as r, type InsertNodeFactory as s, type InsertPaint as t, type SvgIngestOptions as u, type SceneCanvasSnap as v, type Affordance as w, type AffordanceRegion as x, type AffordanceBinding as y, type CommonAffordanceScratch as z };
@@ -1,8 +1,8 @@
1
1
  import { e as DebugFeature, a as DebugConfig } from './types-BN9hbdMI.js';
2
2
  import { DispatchTrace, TraceRing } from '@weasel-js/routing';
3
- import { S as Scene } from './types-BEdRIhNc.js';
3
+ import { S as Scene } from './types-DW14eu9B.js';
4
4
  import '@weasel-js/history';
5
- import './types-49uYJN3j.js';
5
+ import './types-A_sNJYRd.js';
6
6
  import '@weasel-js/geom';
7
7
  import '@weasel-js/quantity';
8
8
  import '@weasel-js/paint';
@@ -1,9 +1,9 @@
1
1
  export { DEVTOOLS_ENVELOPE, DEVTOOLS_PROTOCOL, DevtoolsActionEntry, DevtoolsArea, DevtoolsBinding, DevtoolsDepEntry, DevtoolsEnvelope, DevtoolsHistoryOp, DevtoolsHistoryRecord, DevtoolsHistorySlice, DevtoolsNodeDetail, DevtoolsNodeSummary, DevtoolsOverlays, DevtoolsRegistry, DevtoolsRequest, DevtoolsResult, DevtoolsRoot, DevtoolsRootInfo, DevtoolsRootSource, DevtoolsRootState, DevtoolsSchedule, DevtoolsToolEntry, DevtoolsTraceSlice, DevtoolsTransport, PageMessage, PageTransport, PanelMessage, PanelTransport, SerializeLimits, SerializedValue, WeaselDevtoolsHook, createDevtoolsHook, createDevtoolsRoot, createInPageTransports, createWindowPageTransport, createWindowPanelTransport, installDevtoolsHook, isDevtoolsEnvelope, serialize } from './devtools-protocol.js';
2
2
  import './types-BN9hbdMI.js';
3
3
  import '@weasel-js/routing';
4
- import './types-BEdRIhNc.js';
4
+ import './types-DW14eu9B.js';
5
5
  import '@weasel-js/history';
6
- import './types-49uYJN3j.js';
6
+ import './types-A_sNJYRd.js';
7
7
  import '@weasel-js/geom';
8
8
  import '@weasel-js/quantity';
9
9
  import '@weasel-js/paint';
@@ -1,4 +1,4 @@
1
- //#region src/features/chrome-caps/buildChromeCtx.ts
1
+ //#region src/domains/chrome-caps/buildChromeCtx.ts
2
2
  /** Gather the current canvas state into the context that chrome-visibility
3
3
  * rules are evaluated against. Rebuilt per frame. */
4
4
  function buildChromeCtx(args) {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildChromeCtx.js","names":[],"sources":["../../../src/domains/chrome-caps/buildChromeCtx.ts"],"sourcesContent":["/**\n * Pure assembler for {@link ChromeCtx}. Sources are passed as plain values\n * rather than the live objects they come from, which keeps `chrome-caps`\n * from depending on React or the dispatcher's concrete type.\n */\n\nimport type { NodeId } from '../../core/scene/types';\nimport type { ModifierState } from '../../interactions/gestures/types';\nimport type { View } from '../../core/viewport/view';\nimport type { ChromeCtx } from './types';\n\n/** The pieces of live canvas state a `ChromeCtx` is assembled from. */\nexport interface BuildChromeCtxArgs {\n focused: boolean;\n selection: readonly NodeId[];\n multiActive: boolean;\n modifiers: ModifierState;\n action: { kind: string | null; id: string | null };\n hover: NodeId | null;\n view: View;\n}\n\n/** Gather the current canvas state into the context that chrome-visibility\n * rules are evaluated against. Rebuilt per frame. */\nexport function buildChromeCtx(args: BuildChromeCtxArgs): ChromeCtx {\n return {\n focused: args.focused,\n selection: args.selection,\n multiActive: args.multiActive,\n modifiers: args.modifiers,\n action: args.action,\n hover: args.hover,\n view: args.view,\n };\n}\n"],"mappings":";;;AAwBA,SAAgB,eAAe,MAAqC;CAClE,OAAO;EACL,SAAS,KAAK;EACd,WAAW,KAAK;EAChB,aAAa,KAAK;EAClB,WAAW,KAAK;EAChB,QAAQ,KAAK;EACb,OAAO,KAAK;EACZ,MAAM,KAAK;CACb;AACF"}
@@ -1,6 +1,6 @@
1
1
  import { ALWAYS, NEVER, evaluate } from "@weasel-js/routing";
2
2
 
3
- //#region src/features/chrome-caps/conditions.ts
3
+ //#region src/domains/chrome-caps/conditions.ts
4
4
  /**
5
5
  * Promote a Rule tree to a fluent Condition.
6
6
  *
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conditions.js","names":[],"sources":["../../../src/domains/chrome-caps/conditions.ts"],"sourcesContent":["import type { Condition } from './types';\nimport type { Rule } from '@weasel-js/routing';\nimport type { RuleCtx } from '@weasel-js/routing';\nimport { evaluate, ALWAYS, NEVER } from '@weasel-js/routing';\nimport type { ModifierState } from '../../interactions/gestures/types';\n\n/**\n * Promote a Rule tree to a fluent Condition.\n *\n * **Chain semantics: strict left-to-right.** No boolean precedence.\n * `focused.or(hovering).and(selectionIs(1))` evaluates\n * `((focused || hovering) && selectionIs(1))`. For grouped disjunction, use\n * the top-level `or` / `and` / `not` helpers or name intermediates.\n *\n * Combinators flatten same-kind nesting on construction so `a.and(b).and(c)`\n * produces `{ all: [a, b, c] }`.\n */\nexport function cond(rule: Rule): Condition {\n const fn = (ctx: RuleCtx) => evaluate(rule, ctx);\n const condition = fn as Condition;\n (condition as { rule: Rule }).rule = rule;\n condition.and = (other) => cond(combineAll(rule, asRule(other)));\n condition.or = (other) => cond(combineAny(rule, asRule(other)));\n condition.andNot = (other) => cond(combineAll(rule, { not: asRule(other) }));\n condition.orNot = (other) => cond(combineAny(rule, { not: asRule(other) }));\n return condition;\n}\n\nfunction asRule(value: Condition | Rule): Rule {\n return typeof value === 'function' ? (value as Condition).rule : value;\n}\n\nfunction combineAll(a: Rule, b: Rule): Rule {\n const left = 'all' in a ? a.all : [a];\n const right = 'all' in b ? b.all : [b];\n return { all: [...left, ...right] };\n}\n\nfunction combineAny(a: Rule, b: Rule): Rule {\n const left = 'any' in a ? a.any : [a];\n const right = 'any' in b ? b.any : [b];\n return { any: [...left, ...right] };\n}\n\n/** Inline-lambda escape hatch. Wraps the closure as a `when` rule node. */\nexport function when(fn: (ctx: RuleCtx) => boolean): Condition {\n return cond({ when: fn });\n}\n\n// ─── Variadic helpers (for grouped expressions) ─────────────────────\n\n/** `(a && b && c && ...)` — useful when chain mixing makes left-to-right\n * semantics ambiguous. */\nexport function and(...cs: (Condition | Rule)[]): Condition {\n return cond({ all: cs.map(asRule) });\n}\n\n/** `(a || b || c || ...)` — preferred over `.or` chains when mixed with\n * `.and` to make grouping explicit. */\nexport function or(...cs: (Condition | Rule)[]): Condition {\n return cond({ any: cs.map(asRule) });\n}\n\n/** `!c` — top-level negation. Most rules use `.andNot()` / `.orNot()`\n * instead; this is for the lead-with-negation case. */\nexport function not(c: Condition | Rule): Condition {\n return cond({ not: asRule(c) });\n}\n\n// ─── Constant atoms ─────────────────────────────────────────────────\n\n/** Always true. The fallback for any chrome id without a registered rule. */\nexport const always: Condition = cond(ALWAYS);\n\n/** Always false. Useful for \"turn this chrome off entirely\":\n * `chromeVisibility={{ 'snap.guides': never }}`. */\nexport const never: Condition = cond(NEVER);\n\n// ─── Focus / action atoms ───────────────────────────────────────────\n\n/** Canvas surface currently focused. */\nexport const focused: Condition = cond({ focused: true });\n\n/** Any action currently in flight (read: user is gesturing). */\nexport const gesturing: Condition = cond({ gesturing: true });\n\n/** A path is currently in anchor-edit mode. */\nexport const editingAnchors: Condition = cond({ editingAnchors: true });\n\n/** Current selection is resizable (every selected node passes the consumer's\n * `selectTool.resize.resizable` predicate). Absent predicate → resizable. */\nexport const resizable: Condition = cond({ resizable: true });\n\n/** Active action's kind matches `kind` (e.g. `actionIs('move')`). */\nexport const actionIs = (kind: string): Condition => cond({ actionIs: kind });\n\n// ─── Selection atoms ────────────────────────────────────────────────\n\n/** Nothing selected. */\nexport const selectionEmpty: Condition = cond({ selection: { empty: true } });\n\n/** Exactly `n` items selected. */\nexport const selectionIs = (n: number): Condition => cond({ selection: { is: n } });\n\n/** At least `n` items selected. `selectionAtLeast(1)` is the common\n * \"something is selected\" check. */\nexport const selectionAtLeast = (n: number): Condition => cond({ selection: { atLeast: n } });\n\n/** Multi-mode handle behavior active (single shared union-bounds\n * handle vs per-item handles). */\nexport const multiActive: Condition = cond({ when: (c) => c.multiActive });\n\n// ─── Hover atoms ────────────────────────────────────────────────────\n\n/** Pointer is hovering some node. */\nexport const hovering: Condition = cond({ hovering: true });\n\n/** Pointer is hovering a node that is currently selected. */\nexport const hoveringSelected: Condition = cond({ hoveringSelected: true });\n\n// ─── Modifier atoms ─────────────────────────────────────────────────\n\n/** Named modifier key currently held. */\nexport const modifierHeld = (m: keyof ModifierState): Condition => cond({ modifierHeld: m });\n\n// ─── View atoms ─────────────────────────────────────────────────────\n\n/** View scale (uniform or geometric mean for non-uniform) is at least\n * `z`. Useful for \"hide hairline chrome at low zoom\" rules. */\nexport const zoomAtLeast = (z: number): Condition => cond({ zoomAtLeast: z });\n\n// ─── Mode + capability atoms ───────────────────────────────────────\n\n/** Active mode equals `m`. */\nexport const modeIs = (m: string): Condition => cond({ mode: m });\n\n/** Active mode is one of `modes`. */\nexport const modeIn = (modes: readonly string[]): Condition => cond({ mode: { in: modes } });\n\n/** Active mode is NOT `m`. */\nexport const modeNot = (m: string): Condition => cond({ mode: { not: m } });\n\n/** Active mode's `allows` includes capability `cap`. */\nexport const capabilityIs = (cap: string): Condition => cond({ capability: cap });\n\n/** Active mode's `allows` includes ANY of `caps` (OR). */\nexport const capabilityIn = (caps: readonly string[]): Condition => cond({ capability: { in: caps } });\n\n/** Active mode's `allows` includes ALL of `caps` (AND). */\nexport const capabilityAll = (caps: readonly string[]): Condition => cond({ capability: [...caps] });\n\n/** Active mode's `allows` does NOT include capability `cap`. */\nexport const capabilityNot = (cap: string): Condition => cond({ capability: { not: cap } });\n\n// ─── Device atoms ───────────────────────────────────────────────────\n\n/** Primary pointer is imprecise (touch, most styluses). Absent device\n * profile → false. */\nexport const coarsePointer: Condition = cond({ coarsePointer: true });\n\n/** Primary pointer can hover. Absent device profile → true. */\nexport const canHover: Condition = cond({ canHover: true });\n"],"mappings":";;;;;;;;;;;;;;AAiBA,SAAgB,KAAK,MAAuB;CAC1C,MAAM,MAAM,QAAiB,SAAS,MAAM,GAAG;CAC/C,MAAM,YAAY;CAClB,UAA8B,OAAO;CACrC,UAAU,OAAU,UAAU,KAAK,WAAW,MAAM,OAAO,KAAK,CAAC,CAAC;CAClE,UAAU,MAAU,UAAU,KAAK,WAAW,MAAM,OAAO,KAAK,CAAC,CAAC;CAClE,UAAU,UAAU,UAAU,KAAK,WAAW,MAAM,EAAE,KAAK,OAAO,KAAK,EAAE,CAAC,CAAC;CAC3E,UAAU,SAAU,UAAU,KAAK,WAAW,MAAM,EAAE,KAAK,OAAO,KAAK,EAAE,CAAC,CAAC;CAC3E,OAAO;AACT;AAEA,SAAS,OAAO,OAA+B;CAC7C,OAAO,OAAO,UAAU,aAAc,MAAoB,OAAO;AACnE;AAEA,SAAS,WAAW,GAAS,GAAe;CAC1C,MAAM,OAAO,SAAS,IAAI,EAAE,MAAM,CAAC,CAAC;CACpC,MAAM,QAAQ,SAAS,IAAI,EAAE,MAAM,CAAC,CAAC;CACrC,OAAO,EAAE,KAAK,CAAC,GAAG,MAAM,GAAG,KAAK,EAAE;AACpC;AAEA,SAAS,WAAW,GAAS,GAAe;CAC1C,MAAM,OAAO,SAAS,IAAI,EAAE,MAAM,CAAC,CAAC;CACpC,MAAM,QAAQ,SAAS,IAAI,EAAE,MAAM,CAAC,CAAC;CACrC,OAAO,EAAE,KAAK,CAAC,GAAG,MAAM,GAAG,KAAK,EAAE;AACpC;;AAGA,SAAgB,KAAK,IAA0C;CAC7D,OAAO,KAAK,EAAE,MAAM,GAAG,CAAC;AAC1B;;;AAMA,SAAgB,IAAI,GAAG,IAAqC;CAC1D,OAAO,KAAK,EAAE,KAAK,GAAG,IAAI,MAAM,EAAE,CAAC;AACrC;;;AAIA,SAAgB,GAAG,GAAG,IAAqC;CACzD,OAAO,KAAK,EAAE,KAAK,GAAG,IAAI,MAAM,EAAE,CAAC;AACrC;;;AAIA,SAAgB,IAAI,GAAgC;CAClD,OAAO,KAAK,EAAE,KAAK,OAAO,CAAC,EAAE,CAAC;AAChC;;AAKA,IAAa,SAAoB,KAAK,MAAM;;;AAI5C,IAAa,QAAmB,KAAK,KAAK;;AAK1C,IAAa,UAAqB,KAAK,EAAE,SAAS,KAAK,CAAC;;AAGxD,IAAa,YAAuB,KAAK,EAAE,WAAW,KAAK,CAAC;;AAG5D,IAAa,iBAA4B,KAAK,EAAE,gBAAgB,KAAK,CAAC;;;AAItE,IAAa,YAAuB,KAAK,EAAE,WAAW,KAAK,CAAC;;AAG5D,IAAa,YAAY,SAA4B,KAAK,EAAE,UAAU,KAAK,CAAC;;AAK5E,IAAa,iBAA4B,KAAK,EAAE,WAAW,EAAE,OAAO,KAAK,EAAE,CAAC;;AAG5E,IAAa,eAAe,MAAyB,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,CAAC;;;AAIlF,IAAa,oBAAoB,MAAyB,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,CAAC;;;AAI5F,IAAa,cAAyB,KAAK,EAAE,OAAO,MAAM,EAAE,YAAY,CAAC;;AAKzE,IAAa,WAAsB,KAAK,EAAE,UAAU,KAAK,CAAC;;AAG1D,IAAa,mBAA8B,KAAK,EAAE,kBAAkB,KAAK,CAAC;;AAK1E,IAAa,gBAAgB,MAAsC,KAAK,EAAE,cAAc,EAAE,CAAC;;;AAM3F,IAAa,eAAe,MAAyB,KAAK,EAAE,aAAa,EAAE,CAAC;;AAK5E,IAAa,UAAU,MAAyB,KAAK,EAAE,MAAM,EAAE,CAAC;;AAGhE,IAAa,UAAU,UAAwC,KAAK,EAAE,MAAM,EAAE,IAAI,MAAM,EAAE,CAAC;;AAG3F,IAAa,WAAW,MAAyB,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;;AAG1E,IAAa,gBAAgB,QAA2B,KAAK,EAAE,YAAY,IAAI,CAAC;;AAGhF,IAAa,gBAAgB,SAAuC,KAAK,EAAE,YAAY,EAAE,IAAI,KAAK,EAAE,CAAC;;AAGrG,IAAa,iBAAiB,SAAuC,KAAK,EAAE,YAAY,CAAC,GAAG,IAAI,EAAE,CAAC;;AAGnG,IAAa,iBAAiB,QAA2B,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,EAAE,CAAC;;;AAM1F,IAAa,gBAA2B,KAAK,EAAE,eAAe,KAAK,CAAC;;AAGpE,IAAa,WAAsB,KAAK,EAAE,UAAU,KAAK,CAAC"}
@@ -1,4 +1,4 @@
1
- //#region src/features/chrome-caps/defaults.ts
1
+ //#region src/domains/chrome-caps/defaults.ts
2
2
  /**
3
3
  * Kit-shipped defaults. Merged with the consumer's `chromeVisibility` map
4
4
  * at resolve time; consumer entries take precedence per id.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaults.js","names":[],"sources":["../../../src/domains/chrome-caps/defaults.ts"],"sourcesContent":["import type { VisibilityRules } from './types';\nimport type { Rule } from '@weasel-js/routing';\n\n/**\n * Kit-shipped defaults. Merged with the consumer's `chromeVisibility` map\n * at resolve time; consumer entries take precedence per id.\n *\n * Gating is written in terms of **capabilities, not mode ids**. A\n * capability rule keeps holding when a new mode is added that permits the\n * same thing; a mode rule has to be found and edited every time.\n */\nexport const defaultVisibilityRules: VisibilityRules = {\n // Off whenever an anchor-editing overlay has taken over the visuals.\n 'selection.outline': {\n all: [\n { selection: { atLeast: 1 } },\n { capability: { not: 'edits-anchors' } },\n ],\n } as Rule,\n\n // Handles hide during an action so the moving / resizing object isn't\n // visually crowded; they reappear on commit.\n 'selection.resize-handles': {\n all: [\n { selection: { atLeast: 1 } },\n { not: { gesturing: true } },\n { capability: 'transforms-selection' },\n { resizable: true },\n ],\n } as Rule,\n\n 'selection.rotation-handle': {\n all: [\n { selection: { atLeast: 1 } },\n { focused: true },\n { not: { gesturing: true } },\n { capability: 'transforms-selection' },\n ],\n } as Rule,\n\n // Transient action chrome — only shown during the matching action.\n 'action.marquee': { actionIs: 'marquee' } as Rule,\n 'action.lasso': { actionIs: 'lasso' } as Rule,\n 'action.move-ghosts': { actionIs: 'move' } as Rule,\n\n // Path-edit chrome — gated on there actually being an edited path, not on\n // `{ mode: 'path-edit' }`: consumers with no mode registry report mode\n // `'normal'`, and one defining its own anchor-editing mode uses another id.\n // A state selector rather than a `capability:` one on purpose: the\n // capability says the user *may* edit anchors, which is not the same as\n // a path *being* edited.\n 'path-edit.anchors': { editingAnchors: true } as Rule,\n 'path-edit.overlay': { editingAnchors: true } as Rule,\n\n // Snap system — guides during any action; targets consumer-driven for now.\n 'snap.guides': { gesturing: true } as Rule,\n // 'snap.targets' — no default; consumer-driven for now.\n\n // 'grid' / 'debug.*' — no default; visibility is driven by dedicated\n // boolean props on <SceneCanvas>.\n};\n"],"mappings":";;;;;;;;;AAWA,IAAa,yBAA0C;CAErD,qBAAqB,EACnB,KAAK,CACH,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,GAC5B,EAAE,YAAY,EAAE,KAAK,gBAAgB,EAAE,CACzC,EACF;CAIA,4BAA4B,EAC1B,KAAK;EACH,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE;EAC5B,EAAE,KAAK,EAAE,WAAW,KAAK,EAAE;EAC3B,EAAE,YAAY,uBAAuB;EACrC,EAAE,WAAW,KAAK;CACpB,EACF;CAEA,6BAA6B,EAC3B,KAAK;EACH,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE;EAC5B,EAAE,SAAS,KAAK;EAChB,EAAE,KAAK,EAAE,WAAW,KAAK,EAAE;EAC3B,EAAE,YAAY,uBAAuB;CACvC,EACF;CAGA,kBAAsB,EAAE,UAAU,UAAU;CAC5C,gBAAsB,EAAE,UAAU,QAAQ;CAC1C,sBAAsB,EAAE,UAAU,OAAO;CAQzC,qBAAqB,EAAE,gBAAgB,KAAK;CAC5C,qBAAqB,EAAE,gBAAgB,KAAK;CAG5C,eAAe,EAAE,WAAW,KAAK;AAKnC"}
@@ -2,7 +2,7 @@ import { viewZoom } from "../../core/viewport/view.js";
2
2
  import { defaultVisibilityRules } from "./defaults.js";
3
3
  import { DEFAULT_ALLOWED_CAPABILITIES, evaluate } from "@weasel-js/routing";
4
4
 
5
- //#region src/features/chrome-caps/resolve.ts
5
+ //#region src/domains/chrome-caps/resolve.ts
6
6
  /**
7
7
  * Build the per-frame visibility check: consumer rules merged on top of
8
8
  * the kit defaults, evaluated against `ctx`.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve.js","names":[],"sources":["../../../src/domains/chrome-caps/resolve.ts"],"sourcesContent":["import type { ChromeCtx, ChromeId, VisibilityRules } from './types';\nimport type { RuleCtx } from '@weasel-js/routing';\nimport { DEFAULT_ALLOWED_CAPABILITIES } from '@weasel-js/routing';\nimport { evaluate } from '@weasel-js/routing';\nimport { defaultVisibilityRules } from './defaults';\nimport { viewZoom } from 'core/viewport/view';\n\n/**\n * Build the per-frame visibility check: consumer rules merged on top of\n * the kit defaults, evaluated against `ctx`.\n *\n * `ChromeCtx` is the legacy shape; surfaces still on it get `mode='normal'`\n * and `DEFAULT_ALLOWED_CAPABILITIES` filled in here, so a caller that never\n * opted into modality behaves exactly like one sitting in normal mode.\n */\nexport function resolveVisibility(\n consumer: VisibilityRules | undefined,\n ctx: ChromeCtx | RuleCtx,\n): (id: ChromeId) => boolean {\n const merged: VisibilityRules = consumer\n ? { ...defaultVisibilityRules, ...consumer }\n : defaultVisibilityRules;\n const ruleCtx: RuleCtx = 'mode' in ctx\n ? ctx\n : {\n ...ctx,\n zoom: viewZoom(ctx.view),\n mode: 'normal',\n allowedCapabilities: DEFAULT_ALLOWED_CAPABILITIES,\n };\n return (id) => {\n const entry = merged[id];\n if (entry === undefined) return true;\n if (typeof entry === 'function') return entry(ruleCtx);\n return evaluate(entry, ruleCtx);\n };\n}\n"],"mappings":";;;;;;;;;;;;;AAeA,SAAgB,kBACd,UACA,KAC2B;CAC3B,MAAM,SAA0B,WAC5B;EAAE,GAAG;EAAwB,GAAG;CAAS,IACzC;CACJ,MAAM,UAAmB,UAAU,MAC/B,MACA;EACA,GAAG;EACH,MAAM,SAAS,IAAI,IAAI;EACvB,MAAM;EACN,qBAAqB;CACvB;CACF,QAAQ,OAAO;EACb,MAAM,QAAQ,OAAO;EACrB,IAAI,UAAU,QAAW,OAAO;EAChC,IAAI,OAAO,UAAU,YAAY,OAAO,MAAM,OAAO;EACrD,OAAO,SAAS,OAAO,OAAO;CAChC;AACF"}