@weasel-js/core 1.7.0 → 1.7.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 (1003) hide show
  1. package/CHANGELOG.md +764 -0
  2. package/README.md +7 -8
  3. package/dist/WeaselProvider.js +15 -0
  4. package/dist/WeaselProvider.js.map +1 -0
  5. package/dist/affordances/composeAffordanceLayer.js +224 -0
  6. package/dist/affordances/composeAffordanceLayer.js.map +1 -0
  7. package/dist/affordances/cornerResize.js +69 -0
  8. package/dist/affordances/cornerResize.js.map +1 -0
  9. package/dist/affordances/hitAffordanceRegions.js +138 -0
  10. package/dist/affordances/hitAffordanceRegions.js.map +1 -0
  11. package/dist/affordances/pathAnchors.js +66 -0
  12. package/dist/affordances/pathAnchors.js.map +1 -0
  13. package/dist/affordances/rotationHandle.js +103 -0
  14. package/dist/affordances/rotationHandle.js.map +1 -0
  15. package/dist/animation/behaviors/momentum.js +118 -0
  16. package/dist/animation/behaviors/momentum.js.map +1 -0
  17. package/dist/animation/colorHelpers.js +135 -0
  18. package/dist/animation/colorHelpers.js.map +1 -0
  19. package/dist/animation/colorRegistry.js +37 -0
  20. package/dist/animation/colorRegistry.js.map +1 -0
  21. package/dist/animation/index.js +20 -0
  22. package/dist/animation/loop.js +62 -0
  23. package/dist/animation/loop.js.map +1 -0
  24. package/dist/animation/observe.js +23 -0
  25. package/dist/animation/observe.js.map +1 -0
  26. package/dist/animation/poseHelpers.js +50 -0
  27. package/dist/animation/poseHelpers.js.map +1 -0
  28. package/dist/animation/reflow.js +121 -0
  29. package/dist/animation/reflow.js.map +1 -0
  30. package/dist/animation/rig/bindRig.js +74 -0
  31. package/dist/animation/rig/bindRig.js.map +1 -0
  32. package/dist/animation/rig/blendPoses.js +43 -0
  33. package/dist/animation/rig/blendPoses.js.map +1 -0
  34. package/dist/animation/rig/mirrorPose.js +19 -0
  35. package/dist/animation/rig/mirrorPose.js.map +1 -0
  36. package/dist/animation/rig/resolveSkeleton.js +33 -0
  37. package/dist/animation/rig/resolveSkeleton.js.map +1 -0
  38. package/dist/animation/rig/solveIk.js +103 -0
  39. package/dist/animation/rig/solveIk.js.map +1 -0
  40. package/dist/animation/rig/types.js +12 -0
  41. package/dist/animation/rig/types.js.map +1 -0
  42. package/dist/animation/rig/useRig.js +23 -0
  43. package/dist/animation/rig/useRig.js.map +1 -0
  44. package/dist/animation/slew.js +27 -0
  45. package/dist/animation/slew.js.map +1 -0
  46. package/dist/animation/stagger.js +138 -0
  47. package/dist/animation/stagger.js.map +1 -0
  48. package/dist/animation/timeline/booking.js +106 -0
  49. package/dist/animation/timeline/booking.js.map +1 -0
  50. package/dist/animation/timeline/createTimeline.js +116 -0
  51. package/dist/animation/timeline/createTimeline.js.map +1 -0
  52. package/dist/animation/timeline/sampleTrack.js +29 -0
  53. package/dist/animation/timeline/sampleTrack.js.map +1 -0
  54. package/dist/animation/useAnimator.js +329 -0
  55. package/dist/animation/useAnimator.js.map +1 -0
  56. package/dist/animation/wrappers/animateLifecycle.js +40 -0
  57. package/dist/animation/wrappers/animateLifecycle.js.map +1 -0
  58. package/dist/animation/wrappers/animateOnSetPose.js +44 -0
  59. package/dist/animation/wrappers/animateOnSetPose.js.map +1 -0
  60. package/dist/{autoPoseDescriptor-_XOyF7t4.d.ts → autoPoseDescriptor-BT_vp9FO.d.ts} +2 -2
  61. package/dist/{builtins-DLn2lCr_.d.ts → builtins-BSUfH8nU.d.ts} +738 -513
  62. package/dist/canvas/Canvas.js +608 -0
  63. package/dist/canvas/Canvas.js.map +1 -0
  64. package/dist/canvas/CanvasView.js +255 -0
  65. package/dist/canvas/CanvasView.js.map +1 -0
  66. package/dist/canvas/CursorCoordsHud.js +75 -0
  67. package/dist/canvas/CursorCoordsHud.js.map +1 -0
  68. package/dist/canvas/DrawCanvas.js +67 -0
  69. package/dist/canvas/DrawCanvas.js.map +1 -0
  70. package/dist/canvas/MinimapCanvas.js +139 -0
  71. package/dist/canvas/MinimapCanvas.js.map +1 -0
  72. package/dist/canvas/ModalityHud.js +66 -0
  73. package/dist/canvas/ModalityHud.js.map +1 -0
  74. package/dist/canvas/NodeShape.js +391 -0
  75. package/dist/canvas/NodeShape.js.map +1 -0
  76. package/dist/canvas/PickHud.js +93 -0
  77. package/dist/canvas/PickHud.js.map +1 -0
  78. package/dist/canvas/SceneCanvas/ActionsProviderIfRoot.js +10 -0
  79. package/dist/canvas/SceneCanvas/ActionsProviderIfRoot.js.map +1 -0
  80. package/dist/canvas/SceneCanvas/DepRegistryProviderIfRoot.js +10 -0
  81. package/dist/canvas/SceneCanvas/DepRegistryProviderIfRoot.js.map +1 -0
  82. package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js +51 -0
  83. package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js.map +1 -0
  84. package/dist/canvas/SceneCanvas/contributionFrameHooks.js +42 -0
  85. package/dist/canvas/SceneCanvas/contributionFrameHooks.js.map +1 -0
  86. package/dist/canvas/SceneCanvas/defaultNodeProperties.js +549 -0
  87. package/dist/canvas/SceneCanvas/defaultNodeProperties.js.map +1 -0
  88. package/dist/canvas/SceneCanvas/defaultNodeRouting.js +26 -0
  89. package/dist/canvas/SceneCanvas/defaultNodeRouting.js.map +1 -0
  90. package/dist/canvas/SceneCanvas/dispatcherGestureBounds.js +69 -0
  91. package/dist/canvas/SceneCanvas/dispatcherGestureBounds.js.map +1 -0
  92. package/dist/canvas/SceneCanvas/features.js +97 -0
  93. package/dist/canvas/SceneCanvas/features.js.map +1 -0
  94. package/dist/canvas/SceneCanvas/poseGeometry.js +46 -0
  95. package/dist/canvas/SceneCanvas/poseGeometry.js.map +1 -0
  96. package/dist/canvas/SceneCanvas/useActionsPropResolver.js +48 -0
  97. package/dist/canvas/SceneCanvas/useActionsPropResolver.js.map +1 -0
  98. package/dist/canvas/SceneCanvas/useBuiltinShapeTools.js +70 -0
  99. package/dist/canvas/SceneCanvas/useBuiltinShapeTools.js.map +1 -0
  100. package/dist/canvas/SceneCanvas/useContributionRoles.js +75 -0
  101. package/dist/canvas/SceneCanvas/useContributionRoles.js.map +1 -0
  102. package/dist/canvas/SceneCanvas/useDispatcherOverlayLayer.js +172 -0
  103. package/dist/canvas/SceneCanvas/useDispatcherOverlayLayer.js.map +1 -0
  104. package/dist/canvas/SceneCanvas/usePreviewGhostLayer.js +69 -0
  105. package/dist/canvas/SceneCanvas/usePreviewGhostLayer.js.map +1 -0
  106. package/dist/canvas/SceneCanvas/useSceneSelectTool.js +127 -0
  107. package/dist/canvas/SceneCanvas/useSceneSelectTool.js.map +1 -0
  108. package/dist/canvas/SceneCanvas/useViewportActions.js +30 -0
  109. package/dist/canvas/SceneCanvas/useViewportActions.js.map +1 -0
  110. package/dist/canvas/SceneCanvas.js +992 -0
  111. package/dist/canvas/SceneCanvas.js.map +1 -0
  112. package/dist/canvas/SceneViewCanvas.js +54 -0
  113. package/dist/canvas/SceneViewCanvas.js.map +1 -0
  114. package/dist/canvas/accentColor.js +9 -0
  115. package/dist/canvas/accentColor.js.map +1 -0
  116. package/dist/canvas/affordanceAt.js +63 -0
  117. package/dist/canvas/affordanceAt.js.map +1 -0
  118. package/dist/canvas/buildSceneTree.js +65 -0
  119. package/dist/canvas/buildSceneTree.js.map +1 -0
  120. package/dist/canvas/canvasRenderer.js +89 -0
  121. package/dist/canvas/canvasRenderer.js.map +1 -0
  122. package/dist/canvas/colorOverrides.js +16 -0
  123. package/dist/canvas/colorOverrides.js.map +1 -0
  124. package/dist/canvas/defaultDrawOne.js +43 -0
  125. package/dist/canvas/defaultDrawOne.js.map +1 -0
  126. package/dist/canvas/deps/areaSelect.js +19 -0
  127. package/dist/canvas/deps/areaSelect.js.map +1 -0
  128. package/dist/canvas/deps/debug.js +9 -0
  129. package/dist/canvas/deps/debug.js.map +1 -0
  130. package/dist/canvas/deps/dispatcher.js +11 -0
  131. package/dist/canvas/deps/dispatcher.js.map +1 -0
  132. package/dist/canvas/deps/editAnchors.js +101 -0
  133. package/dist/canvas/deps/editAnchors.js.map +1 -0
  134. package/dist/canvas/deps/geometryProjection.js +11 -0
  135. package/dist/canvas/deps/geometryProjection.js.map +1 -0
  136. package/dist/canvas/deps/hitTestArea.js +51 -0
  137. package/dist/canvas/deps/hitTestArea.js.map +1 -0
  138. package/dist/canvas/deps/ingestion.js +31 -0
  139. package/dist/canvas/deps/ingestion.js.map +1 -0
  140. package/dist/canvas/deps/insert.js +116 -0
  141. package/dist/canvas/deps/insert.js.map +1 -0
  142. package/dist/canvas/deps/lassoSelect.js +20 -0
  143. package/dist/canvas/deps/lassoSelect.js.map +1 -0
  144. package/dist/canvas/deps/layout.js +34 -0
  145. package/dist/canvas/deps/layout.js.map +1 -0
  146. package/dist/canvas/deps/nodeAtPoint.js +19 -0
  147. package/dist/canvas/deps/nodeAtPoint.js.map +1 -0
  148. package/dist/canvas/deps/poseComposition.js +11 -0
  149. package/dist/canvas/deps/poseComposition.js.map +1 -0
  150. package/dist/canvas/deps/poseDescriptor.js +12 -0
  151. package/dist/canvas/deps/poseDescriptor.js.map +1 -0
  152. package/dist/canvas/deps/resizePolicy.js +35 -0
  153. package/dist/canvas/deps/resizePolicy.js.map +1 -0
  154. package/dist/canvas/deps/slice.js +99 -0
  155. package/dist/canvas/deps/slice.js.map +1 -0
  156. package/dist/canvas/deps/snap.js +11 -0
  157. package/dist/canvas/deps/snap.js.map +1 -0
  158. package/dist/canvas/deps/textEdit.js +21 -0
  159. package/dist/canvas/deps/textEdit.js.map +1 -0
  160. package/dist/canvas/deps/view.js +43 -0
  161. package/dist/canvas/deps/view.js.map +1 -0
  162. package/dist/canvas/derivedPath.js +47 -0
  163. package/dist/canvas/derivedPath.js.map +1 -0
  164. package/dist/canvas/drawEnvelope.js +22 -0
  165. package/dist/canvas/drawEnvelope.js.map +1 -0
  166. package/dist/canvas/getNodeAtPoint.js +18 -0
  167. package/dist/canvas/getNodeAtPoint.js.map +1 -0
  168. package/dist/canvas/hostAnchor.js +29 -0
  169. package/dist/canvas/hostAnchor.js.map +1 -0
  170. package/dist/canvas/hud.module.js +18 -0
  171. package/dist/canvas/hud.module.js.map +1 -0
  172. package/dist/canvas/insertPreviewExtent.js +103 -0
  173. package/dist/canvas/insertPreviewExtent.js.map +1 -0
  174. package/dist/canvas/kitRequirements.js +177 -0
  175. package/dist/canvas/kitRequirements.js.map +1 -0
  176. package/dist/canvas/layerOrder.js +66 -0
  177. package/dist/canvas/layerOrder.js.map +1 -0
  178. package/dist/canvas/layerSlots.js +14 -0
  179. package/dist/canvas/layerSlots.js.map +1 -0
  180. package/dist/canvas/minimapMath.js +80 -0
  181. package/dist/canvas/minimapMath.js.map +1 -0
  182. package/dist/canvas/mountedCanvases.js +20 -0
  183. package/dist/canvas/mountedCanvases.js.map +1 -0
  184. package/dist/canvas/overlayRoleStrokes.js +17 -0
  185. package/dist/canvas/overlayRoleStrokes.js.map +1 -0
  186. package/dist/canvas/paintCull.js +20 -0
  187. package/dist/canvas/paintCull.js.map +1 -0
  188. package/dist/canvas/pickWalk.js +158 -0
  189. package/dist/canvas/pickWalk.js.map +1 -0
  190. package/dist/canvas/planeClips.js +30 -0
  191. package/dist/canvas/planeClips.js.map +1 -0
  192. package/dist/canvas/poseRotation.js +35 -0
  193. package/dist/canvas/poseRotation.js.map +1 -0
  194. package/dist/canvas/rasterToPng.js +21 -0
  195. package/dist/canvas/rasterToPng.js.map +1 -0
  196. package/dist/canvas/renderDebugSnapshot.js +32 -0
  197. package/dist/canvas/renderDebugSnapshot.js.map +1 -0
  198. package/dist/canvas/renderNeeds.js +25 -0
  199. package/dist/canvas/renderNeeds.js.map +1 -0
  200. package/dist/canvas/renderSceneToPixels.js +143 -0
  201. package/dist/canvas/renderSceneToPixels.js.map +1 -0
  202. package/dist/canvas/sceneAdapter.js +270 -0
  203. package/dist/canvas/sceneAdapter.js.map +1 -0
  204. package/dist/canvas/sceneLayerPaint.js +37 -0
  205. package/dist/canvas/sceneLayerPaint.js.map +1 -0
  206. package/dist/canvas/sceneSlotWiring.js +20 -0
  207. package/dist/canvas/sceneSlotWiring.js.map +1 -0
  208. package/dist/canvas/sceneViewRender.js +72 -0
  209. package/dist/canvas/sceneViewRender.js.map +1 -0
  210. package/dist/canvas/slopsDebugLayer.js +61 -0
  211. package/dist/canvas/slopsDebugLayer.js.map +1 -0
  212. package/dist/canvas/surfaceContribution.js +15 -0
  213. package/dist/canvas/surfaceContribution.js.map +1 -0
  214. package/dist/canvas/toolPreview.js +39 -0
  215. package/dist/canvas/toolPreview.js.map +1 -0
  216. package/dist/canvas/useCanvasRenderer.js +11 -0
  217. package/dist/canvas/useCanvasRenderer.js.map +1 -0
  218. package/dist/canvas/useFrameLoop.js +60 -0
  219. package/dist/canvas/useFrameLoop.js.map +1 -0
  220. package/dist/canvas/useHostAnchor.js +71 -0
  221. package/dist/canvas/useHostAnchor.js.map +1 -0
  222. package/dist/canvas/useLateContentRedraw.js +21 -0
  223. package/dist/canvas/useLateContentRedraw.js.map +1 -0
  224. package/dist/canvas/useRedrawOn.js +21 -0
  225. package/dist/canvas/useRedrawOn.js.map +1 -0
  226. package/dist/canvas/useViewHelpers.js +120 -0
  227. package/dist/canvas/useViewHelpers.js.map +1 -0
  228. package/dist/canvas/viewInputs.js +17 -0
  229. package/dist/canvas/viewInputs.js.map +1 -0
  230. package/dist/canvas/viewRegistry.js +61 -0
  231. package/dist/canvas/viewRegistry.js.map +1 -0
  232. package/dist/canvas/wrapNodeOutput.js +14 -0
  233. package/dist/canvas/wrapNodeOutput.js.map +1 -0
  234. package/dist/clipboard.d.ts +10 -5
  235. package/dist/clipboard.js +3 -5
  236. package/dist/clone.d.ts +3 -3
  237. package/dist/clone.js +2 -5
  238. package/dist/core/adapters/arrayAdapter.js +85 -0
  239. package/dist/core/adapters/arrayAdapter.js.map +1 -0
  240. package/dist/core/adapters/useArrayAdapter.js +13 -0
  241. package/dist/core/adapters/useArrayAdapter.js.map +1 -0
  242. package/dist/core/applyOps.js +12 -0
  243. package/dist/core/applyOps.js.map +1 -0
  244. package/dist/core/device/index.js +4 -0
  245. package/dist/core/device/targets.js +17 -0
  246. package/dist/core/device/targets.js.map +1 -0
  247. package/dist/core/device/useDeviceProfile.js +75 -0
  248. package/dist/core/device/useDeviceProfile.js.map +1 -0
  249. package/dist/core/fillInPoseFrame.js +102 -0
  250. package/dist/core/fillInPoseFrame.js.map +1 -0
  251. package/dist/core/geometry/poseDescriptor.js +98 -0
  252. package/dist/core/geometry/poseDescriptor.js.map +1 -0
  253. package/dist/core/geometry/poseRotation.js +58 -0
  254. package/dist/core/geometry/poseRotation.js.map +1 -0
  255. package/dist/core/geometry/regionHit.js +102 -0
  256. package/dist/core/geometry/regionHit.js.map +1 -0
  257. package/dist/core/geometry/unionBounds.js +60 -0
  258. package/dist/core/geometry/unionBounds.js.map +1 -0
  259. package/dist/core/gradient.js +136 -0
  260. package/dist/core/gradient.js.map +1 -0
  261. package/dist/core/isPlainObject.js +11 -0
  262. package/dist/core/isPlainObject.js.map +1 -0
  263. package/dist/core/layers/render.js +150 -0
  264. package/dist/core/layers/render.js.map +1 -0
  265. package/dist/core/markerInset.js +24 -0
  266. package/dist/core/markerInset.js.map +1 -0
  267. package/dist/core/mixed.js +6 -0
  268. package/dist/core/mixed.js.map +1 -0
  269. package/dist/core/ops/arrange.js +31 -0
  270. package/dist/core/ops/arrange.js.map +1 -0
  271. package/dist/core/ops/create.js +32 -0
  272. package/dist/core/ops/create.js.map +1 -0
  273. package/dist/core/ops/createHistory.js +20 -0
  274. package/dist/core/ops/createHistory.js.map +1 -0
  275. package/dist/core/ops/delete.js +89 -0
  276. package/dist/core/ops/delete.js.map +1 -0
  277. package/dist/core/ops/registry.js +17 -0
  278. package/dist/core/ops/registry.js.map +1 -0
  279. package/dist/core/ops/reorder/algorithms.js +55 -0
  280. package/dist/core/ops/reorder/algorithms.js.map +1 -0
  281. package/dist/core/ops/reorder/index.js +140 -0
  282. package/dist/core/ops/reorder/index.js.map +1 -0
  283. package/dist/core/ops/reparent.js +52 -0
  284. package/dist/core/ops/reparent.js.map +1 -0
  285. package/dist/core/ops/select.js +34 -0
  286. package/dist/core/ops/select.js.map +1 -0
  287. package/dist/core/ops/setData.js +34 -0
  288. package/dist/core/ops/setData.js.map +1 -0
  289. package/dist/core/ops/setLayer.js +34 -0
  290. package/dist/core/ops/setLayer.js.map +1 -0
  291. package/dist/core/ops/setLayout.js +31 -0
  292. package/dist/core/ops/setLayout.js.map +1 -0
  293. package/dist/core/ops/setPath.js +57 -0
  294. package/dist/core/ops/setPath.js.map +1 -0
  295. package/dist/core/ops/setText.js +34 -0
  296. package/dist/core/ops/setText.js.map +1 -0
  297. package/dist/core/ops/slot.js +37 -0
  298. package/dist/core/ops/slot.js.map +1 -0
  299. package/dist/core/ops/transform.js +42 -0
  300. package/dist/core/ops/transform.js.map +1 -0
  301. package/dist/core/paintKinds.js +156 -0
  302. package/dist/core/paintKinds.js.map +1 -0
  303. package/dist/core/scene/NodeProperties.js +20 -0
  304. package/dist/core/scene/NodeProperties.js.map +1 -0
  305. package/dist/core/scene/NodeRouting.js +24 -0
  306. package/dist/core/scene/NodeRouting.js.map +1 -0
  307. package/dist/core/scene/arrivals.js +12 -0
  308. package/dist/core/scene/arrivals.js.map +1 -0
  309. package/dist/core/scene/composeFrame.js +29 -0
  310. package/dist/core/scene/composeFrame.js.map +1 -0
  311. package/dist/core/scene/depMemo.js +18 -0
  312. package/dist/core/scene/depMemo.js.map +1 -0
  313. package/dist/core/scene/dependents.js +66 -0
  314. package/dist/core/scene/dependents.js.map +1 -0
  315. package/dist/core/scene/derivedPath.js +31 -0
  316. package/dist/core/scene/derivedPath.js.map +1 -0
  317. package/dist/core/scene/effectivePose.js +78 -0
  318. package/dist/core/scene/effectivePose.js.map +1 -0
  319. package/dist/core/scene/kitRegistry.js +33 -0
  320. package/dist/core/scene/kitRegistry.js.map +1 -0
  321. package/dist/core/scene/layoutPass.js +96 -0
  322. package/dist/core/scene/layoutPass.js.map +1 -0
  323. package/dist/core/scene/nodeFnFields.js +83 -0
  324. package/dist/core/scene/nodeFnFields.js.map +1 -0
  325. package/dist/core/scene/nodeMemo.js +28 -0
  326. package/dist/core/scene/nodeMemo.js.map +1 -0
  327. package/dist/core/scene/poseFeed.js +87 -0
  328. package/dist/core/scene/poseFeed.js.map +1 -0
  329. package/dist/core/scene/poseOverrides.js +52 -0
  330. package/dist/core/scene/poseOverrides.js.map +1 -0
  331. package/dist/core/scene/poseSnapshot.js +54 -0
  332. package/dist/core/scene/poseSnapshot.js.map +1 -0
  333. package/dist/core/scene/scene.js +1271 -0
  334. package/dist/core/scene/scene.js.map +1 -0
  335. package/dist/core/scene/types.js +6 -0
  336. package/dist/core/scene/types.js.map +1 -0
  337. package/dist/core/scene/useScene.js +32 -0
  338. package/dist/core/scene/useScene.js.map +1 -0
  339. package/dist/core/selection/chromeState.js +31 -0
  340. package/dist/core/selection/chromeState.js.map +1 -0
  341. package/dist/core/selection/selectionTarget.js +6 -0
  342. package/dist/core/selection/selectionTarget.js.map +1 -0
  343. package/dist/core/selection/useSelection.js +71 -0
  344. package/dist/core/selection/useSelection.js.map +1 -0
  345. package/dist/core/shapeKinds.js +54 -0
  346. package/dist/core/shapeKinds.js.map +1 -0
  347. package/dist/core/strokeMarkerShapes.js +139 -0
  348. package/dist/core/strokeMarkerShapes.js.map +1 -0
  349. package/dist/core/strokeMarkers.js +28 -0
  350. package/dist/core/strokeMarkers.js.map +1 -0
  351. package/dist/core/stylus/stylus.js +39 -0
  352. package/dist/core/stylus/stylus.js.map +1 -0
  353. package/dist/core/stylus/usePointerStylus.js +51 -0
  354. package/dist/core/stylus/usePointerStylus.js.map +1 -0
  355. package/dist/core/usePaintKinds.js +17 -0
  356. package/dist/core/usePaintKinds.js.map +1 -0
  357. package/dist/core/viewport/clampView.js +24 -0
  358. package/dist/core/viewport/clampView.js.map +1 -0
  359. package/dist/core/viewport/clientToWorld.js +8 -0
  360. package/dist/core/viewport/clientToWorld.js.map +1 -0
  361. package/dist/core/viewport/createVelocityTracker.js +39 -0
  362. package/dist/core/viewport/createVelocityTracker.js.map +1 -0
  363. package/dist/core/viewport/fitToBounds.js +18 -0
  364. package/dist/core/viewport/fitToBounds.js.map +1 -0
  365. package/dist/core/viewport/fitViewToBounds.js +36 -0
  366. package/dist/core/viewport/fitViewToBounds.js.map +1 -0
  367. package/dist/core/viewport/interpolateView.js +34 -0
  368. package/dist/core/viewport/interpolateView.js.map +1 -0
  369. package/dist/core/viewport/meanScale.js +8 -0
  370. package/dist/core/viewport/meanScale.js.map +1 -0
  371. package/dist/core/viewport/parallax.js +111 -0
  372. package/dist/core/viewport/parallax.js.map +1 -0
  373. package/dist/core/viewport/pxExtent.js +42 -0
  374. package/dist/core/viewport/pxExtent.js.map +1 -0
  375. package/dist/core/viewport/sceneNodeClientRect.js +18 -0
  376. package/dist/core/viewport/sceneNodeClientRect.js.map +1 -0
  377. package/dist/core/viewport/screenSlop.js +27 -0
  378. package/dist/core/viewport/screenSlop.js.map +1 -0
  379. package/dist/core/viewport/useAutoCenter.js +32 -0
  380. package/dist/core/viewport/useAutoCenter.js.map +1 -0
  381. package/dist/core/viewport/useCanvasSize.js +29 -0
  382. package/dist/core/viewport/useCanvasSize.js.map +1 -0
  383. package/dist/core/viewport/useDecayLoop.js +63 -0
  384. package/dist/core/viewport/useDecayLoop.js.map +1 -0
  385. package/dist/core/viewport/useVelocityTracker.js +10 -0
  386. package/dist/core/viewport/useVelocityTracker.js.map +1 -0
  387. package/dist/core/viewport/useViewAnimation.js +63 -0
  388. package/dist/core/viewport/useViewAnimation.js.map +1 -0
  389. package/dist/core/viewport/view.js +37 -0
  390. package/dist/core/viewport/view.js.map +1 -0
  391. package/dist/core/viewport/viewTransform.js +11 -0
  392. package/dist/core/viewport/viewTransform.js.map +1 -0
  393. package/dist/core/viewport/viewportWorldRect.js +13 -0
  394. package/dist/core/viewport/viewportWorldRect.js.map +1 -0
  395. package/dist/core/viewport/wheelHandler.js +30 -0
  396. package/dist/core/viewport/wheelHandler.js.map +1 -0
  397. package/dist/core/viewport/zoomAt.js +22 -0
  398. package/dist/core/viewport/zoomAt.js.map +1 -0
  399. package/dist/core/viewport/zoomBounds.js +20 -0
  400. package/dist/core/viewport/zoomBounds.js.map +1 -0
  401. package/dist/{pointSnapToGrid-Dp2IxLGb.d.ts → cornerHandles-CDcZOV8h.d.ts} +3 -13
  402. package/dist/debug/createDebugOverlayLayer.js +358 -0
  403. package/dist/debug/createDebugOverlayLayer.js.map +1 -0
  404. package/dist/debug/createDebugSink.js +83 -0
  405. package/dist/debug/createDebugSink.js.map +1 -0
  406. package/dist/debug/defaultTheme.js +31 -0
  407. package/dist/debug/defaultTheme.js.map +1 -0
  408. package/dist/debug/flag.js +41 -0
  409. package/dist/debug/flag.js.map +1 -0
  410. package/dist/debug/frameStats.js +16 -0
  411. package/dist/debug/frameStats.js.map +1 -0
  412. package/dist/debug/parseDebugFlags.js +32 -0
  413. package/dist/debug/parseDebugFlags.js.map +1 -0
  414. package/dist/features/chrome-caps/buildChromeCtx.js +16 -0
  415. package/dist/features/chrome-caps/buildChromeCtx.js.map +1 -0
  416. package/dist/features/chrome-caps/conditions.js +36 -0
  417. package/dist/features/chrome-caps/conditions.js.map +1 -0
  418. package/dist/features/chrome-caps/defaults.js +26 -0
  419. package/dist/features/chrome-caps/defaults.js.map +1 -0
  420. package/dist/features/chrome-caps/index.js +7 -0
  421. package/dist/features/chrome-caps/resolve.js +23 -0
  422. package/dist/features/chrome-caps/resolve.js.map +1 -0
  423. package/dist/features/chrome-caps/useHoverTracking.js +27 -0
  424. package/dist/features/chrome-caps/useHoverTracking.js.map +1 -0
  425. package/dist/features/cursor/paintedCursorLayer.js +60 -0
  426. package/dist/features/cursor/paintedCursorLayer.js.map +1 -0
  427. package/dist/features/focus/gateLayer.js +14 -0
  428. package/dist/features/focus/gateLayer.js.map +1 -0
  429. package/dist/features/focus/useCanvasFocus.js +29 -0
  430. package/dist/features/focus/useCanvasFocus.js.map +1 -0
  431. package/dist/features/groups/children.js +23 -0
  432. package/dist/features/groups/children.js.map +1 -0
  433. package/dist/features/groups/composePose.js +67 -0
  434. package/dist/features/groups/composePose.js.map +1 -0
  435. package/dist/features/groups/nestedHit.js +40 -0
  436. package/dist/features/groups/nestedHit.js.map +1 -0
  437. package/dist/features/groups/unionOfChildren.js +15 -0
  438. package/dist/features/groups/unionOfChildren.js.map +1 -0
  439. package/dist/features/images/imageCache.js +94 -0
  440. package/dist/features/images/imageCache.js.map +1 -0
  441. package/dist/features/ingestion/contentHandlers.js +37 -0
  442. package/dist/features/ingestion/contentHandlers.js.map +1 -0
  443. package/dist/features/ingestion/imageHandler.js +45 -0
  444. package/dist/features/ingestion/imageHandler.js.map +1 -0
  445. package/dist/features/ingestion/index.js +8 -0
  446. package/dist/features/ingestion/openFilePicker.js +15 -0
  447. package/dist/features/ingestion/openFilePicker.js.map +1 -0
  448. package/dist/features/ingestion/registerKitHandlers.js +26 -0
  449. package/dist/features/ingestion/registerKitHandlers.js.map +1 -0
  450. package/dist/features/ingestion/svgHandler.js +58 -0
  451. package/dist/features/ingestion/svgHandler.js.map +1 -0
  452. package/dist/features/ingestion/weaselJsonHandler.js +39 -0
  453. package/dist/features/ingestion/weaselJsonHandler.js.map +1 -0
  454. package/dist/features/longPress/longPressFeedback.js +96 -0
  455. package/dist/features/longPress/longPressFeedback.js.map +1 -0
  456. package/dist/features/meshPaint/bake.js +79 -0
  457. package/dist/features/meshPaint/bake.js.map +1 -0
  458. package/dist/features/meshPaint/bakeCache.js +59 -0
  459. package/dist/features/meshPaint/bakeCache.js.map +1 -0
  460. package/dist/features/meshPaint/handles.js +86 -0
  461. package/dist/features/meshPaint/handles.js.map +1 -0
  462. package/dist/features/meshPaint/lazyKind.js +1298 -0
  463. package/dist/features/meshPaint/lazyKind.js.map +1 -0
  464. package/dist/features/meshPaint/meshPaint.js +236 -0
  465. package/dist/features/meshPaint/meshPaint.js.map +1 -0
  466. package/dist/features/meshPaint/meshShader.js +6 -0
  467. package/dist/features/meshPaint/meshShader.js.map +1 -0
  468. package/dist/features/meshPaint/register.js +7 -0
  469. package/dist/features/meshPaint/register.js.map +1 -0
  470. package/dist/features/meshPaint/surface.js +110 -0
  471. package/dist/features/meshPaint/surface.js.map +1 -0
  472. package/dist/features/minimap/actions.js +53 -0
  473. package/dist/features/minimap/actions.js.map +1 -0
  474. package/dist/features/minimap/createMinimapContribution.js +96 -0
  475. package/dist/features/minimap/createMinimapContribution.js.map +1 -0
  476. package/dist/features/minimap/layers.js +103 -0
  477. package/dist/features/minimap/layers.js.map +1 -0
  478. package/dist/features/modes/modeLayers.js +113 -0
  479. package/dist/features/modes/modeLayers.js.map +1 -0
  480. package/dist/features/overlays/useNodeOverlayFrame.js +103 -0
  481. package/dist/features/overlays/useNodeOverlayFrame.js.map +1 -0
  482. package/dist/features/parallax/createParallaxLayer.js +26 -0
  483. package/dist/features/parallax/createParallaxLayer.js.map +1 -0
  484. package/dist/features/parallax/createParallaxPlane.js +26 -0
  485. package/dist/features/parallax/createParallaxPlane.js.map +1 -0
  486. package/dist/features/paths/anchorEdits.js +156 -0
  487. package/dist/features/paths/anchorEdits.js.map +1 -0
  488. package/dist/features/paths/anchors.js +154 -0
  489. package/dist/features/paths/anchors.js.map +1 -0
  490. package/dist/features/paths/booleans.js +2 -0
  491. package/dist/features/paths/index.js +15 -0
  492. package/dist/features/paths/markerCommands.js +116 -0
  493. package/dist/features/paths/markerCommands.js.map +1 -0
  494. package/dist/features/paths/markerSites.js +59 -0
  495. package/dist/features/paths/markerSites.js.map +1 -0
  496. package/dist/features/paths/markers.js +95 -0
  497. package/dist/features/paths/markers.js.map +1 -0
  498. package/dist/features/paths/nearestAnchor.js +36 -0
  499. package/dist/features/paths/nearestAnchor.js.map +1 -0
  500. package/dist/features/paths/originProjection.js +16 -0
  501. package/dist/features/paths/originProjection.js.map +1 -0
  502. package/dist/features/paths/pathEditingOverlayLayer.js +137 -0
  503. package/dist/features/paths/pathEditingOverlayLayer.js.map +1 -0
  504. package/dist/features/paths/pathInWorld.js +41 -0
  505. package/dist/features/paths/pathInWorld.js.map +1 -0
  506. package/dist/features/paths/pathLayer.js +44 -0
  507. package/dist/features/paths/pathLayer.js.map +1 -0
  508. package/dist/features/paths/penPreviewLayer.js +220 -0
  509. package/dist/features/paths/penPreviewLayer.js.map +1 -0
  510. package/dist/features/paths/poseDescriptor.js +44 -0
  511. package/dist/features/paths/poseDescriptor.js.map +1 -0
  512. package/dist/features/paths/tessellate/stroke.js +230 -0
  513. package/dist/features/paths/tessellate/stroke.js.map +1 -0
  514. package/dist/features/patterns/index.js +23 -0
  515. package/dist/features/patterns/index.js.map +1 -0
  516. package/dist/features/patterns/patterns-builtin.js +38 -0
  517. package/dist/features/patterns/patterns-builtin.js.map +1 -0
  518. package/dist/features/patterns/resolveSpec.js +57 -0
  519. package/dist/features/patterns/resolveSpec.js.map +1 -0
  520. package/dist/features/patterns/tileGeometry.js +158 -0
  521. package/dist/features/patterns/tileGeometry.js.map +1 -0
  522. package/dist/features/pointer/PointerContext.js +45 -0
  523. package/dist/features/pointer/PointerContext.js.map +1 -0
  524. package/dist/features/poseRun/usePoseRun.js +70 -0
  525. package/dist/features/poseRun/usePoseRun.js.map +1 -0
  526. package/dist/features/selection/SelectionContext.js +46 -0
  527. package/dist/features/selection/SelectionContext.js.map +1 -0
  528. package/dist/features/selection/overlay.js +442 -0
  529. package/dist/features/selection/overlay.js.map +1 -0
  530. package/dist/features/simulation/createSimulation.js +61 -0
  531. package/dist/features/simulation/createSimulation.js.map +1 -0
  532. package/dist/features/simulation/types.js +6 -0
  533. package/dist/features/simulation/types.js.map +1 -0
  534. package/dist/features/simulation/useSimulation.js +74 -0
  535. package/dist/features/simulation/useSimulation.js.map +1 -0
  536. package/dist/features/text/domRuns.js +258 -0
  537. package/dist/features/text/domRuns.js.map +1 -0
  538. package/dist/features/text/fitTextPose.js +38 -0
  539. package/dist/features/text/fitTextPose.js.map +1 -0
  540. package/dist/features/text/hitTest.js +45 -0
  541. package/dist/features/text/hitTest.js.map +1 -0
  542. package/dist/features/text/renderLabel.js +14 -0
  543. package/dist/features/text/renderLabel.js.map +1 -0
  544. package/dist/features/text/runs/effectiveRangeStyle.js +66 -0
  545. package/dist/features/text/runs/effectiveRangeStyle.js.map +1 -0
  546. package/dist/features/text/runs/flagRange.js +53 -0
  547. package/dist/features/text/runs/flagRange.js.map +1 -0
  548. package/dist/features/text/runs/rangeStyle.js +135 -0
  549. package/dist/features/text/runs/rangeStyle.js.map +1 -0
  550. package/dist/features/text/textCommand.js +59 -0
  551. package/dist/features/text/textCommand.js.map +1 -0
  552. package/dist/features/text/textLayer.js +35 -0
  553. package/dist/features/text/textLayer.js.map +1 -0
  554. package/dist/features/text/textToPath.js +181 -0
  555. package/dist/features/text/textToPath.js.map +1 -0
  556. package/dist/features/text/useSceneTextEdit.js +138 -0
  557. package/dist/features/text/useSceneTextEdit.js.map +1 -0
  558. package/dist/features/text/useTextEdit.js +465 -0
  559. package/dist/features/text/useTextEdit.js.map +1 -0
  560. package/dist/features/tiling/createTiledLayer.js +63 -0
  561. package/dist/features/tiling/createTiledLayer.js.map +1 -0
  562. package/dist/features/tiling/tiledProject.js +14 -0
  563. package/dist/features/tiling/tiledProject.js.map +1 -0
  564. package/dist/features/viewports/viewResolver.js +59 -0
  565. package/dist/features/viewports/viewResolver.js.map +1 -0
  566. package/dist/features/viewports/viewportLayer.js +58 -0
  567. package/dist/features/viewports/viewportLayer.js.map +1 -0
  568. package/dist/icons/ArrowIcon.js +23 -0
  569. package/dist/icons/ArrowIcon.js.map +1 -0
  570. package/dist/icons/EllipseIcon.js +21 -0
  571. package/dist/icons/EllipseIcon.js.map +1 -0
  572. package/dist/icons/EyedropperIcon.js +49 -0
  573. package/dist/icons/EyedropperIcon.js.map +1 -0
  574. package/dist/icons/HandIcon.js +59 -0
  575. package/dist/icons/HandIcon.js.map +1 -0
  576. package/dist/icons/ImageIcon.js +34 -0
  577. package/dist/icons/ImageIcon.js.map +1 -0
  578. package/dist/icons/LassoIcon.js +22 -0
  579. package/dist/icons/LassoIcon.js.map +1 -0
  580. package/dist/icons/LineIcon.js +22 -0
  581. package/dist/icons/LineIcon.js.map +1 -0
  582. package/dist/icons/PenIcon.js +36 -0
  583. package/dist/icons/PenIcon.js.map +1 -0
  584. package/dist/icons/PencilIcon.js +25 -0
  585. package/dist/icons/PencilIcon.js.map +1 -0
  586. package/dist/icons/PolygonIcon.js +19 -0
  587. package/dist/icons/PolygonIcon.js.map +1 -0
  588. package/dist/icons/RectIcon.js +37 -0
  589. package/dist/icons/RectIcon.js.map +1 -0
  590. package/dist/icons/SelectIcon.js +20 -0
  591. package/dist/icons/SelectIcon.js.map +1 -0
  592. package/dist/icons/StarIcon.js +19 -0
  593. package/dist/icons/StarIcon.js.map +1 -0
  594. package/dist/icons/TextIcon.js +19 -0
  595. package/dist/icons/TextIcon.js.map +1 -0
  596. package/dist/icons/UnknownIcon.js +33 -0
  597. package/dist/icons/UnknownIcon.js.map +1 -0
  598. package/dist/icons/_base.js +12 -0
  599. package/dist/icons/_base.js.map +1 -0
  600. package/dist/index.css +2 -62
  601. package/dist/index.d.ts +1955 -1891
  602. package/dist/index.js +312 -13
  603. package/dist/input/keyState.js +76 -0
  604. package/dist/input/keyState.js.map +1 -0
  605. package/dist/input/useKeyState.js +22 -0
  606. package/dist/input/useKeyState.js.map +1 -0
  607. package/dist/interactions/actions/actionShortcuts.js +32 -0
  608. package/dist/interactions/actions/actionShortcuts.js.map +1 -0
  609. package/dist/interactions/actions/align/align.js +81 -0
  610. package/dist/interactions/actions/align/align.js.map +1 -0
  611. package/dist/interactions/actions/booleans/booleans.js +120 -0
  612. package/dist/interactions/actions/booleans/booleans.js.map +1 -0
  613. package/dist/interactions/actions/booleans/useBooleans.js +20 -0
  614. package/dist/interactions/actions/booleans/useBooleans.js.map +1 -0
  615. package/dist/interactions/actions/booleans/useBooleansAdapter.js +9 -0
  616. package/dist/interactions/actions/booleans/useBooleansAdapter.js.map +1 -0
  617. package/dist/interactions/actions/clipboard/clipboardOps.js +94 -0
  618. package/dist/interactions/actions/clipboard/clipboardOps.js.map +1 -0
  619. package/dist/interactions/actions/clipboard/materializePaste.js +25 -0
  620. package/dist/interactions/actions/clipboard/materializePaste.js.map +1 -0
  621. package/dist/interactions/actions/clipboard/wireFormat.js +43 -0
  622. package/dist/interactions/actions/clipboard/wireFormat.js.map +1 -0
  623. package/dist/interactions/actions/clone/behaviors/cloneByAltDrag.js +26 -0
  624. package/dist/interactions/actions/clone/behaviors/cloneByAltDrag.js.map +1 -0
  625. package/dist/interactions/actions/defaultCommitAdapter.js +42 -0
  626. package/dist/interactions/actions/defaultCommitAdapter.js.map +1 -0
  627. package/dist/interactions/actions/defaults/align.js +71 -0
  628. package/dist/interactions/actions/defaults/align.js.map +1 -0
  629. package/dist/interactions/actions/defaults/anchorEditing.js +235 -0
  630. package/dist/interactions/actions/defaults/anchorEditing.js.map +1 -0
  631. package/dist/interactions/actions/defaults/areaSelect.js +75 -0
  632. package/dist/interactions/actions/defaults/areaSelect.js.map +1 -0
  633. package/dist/interactions/actions/defaults/booleans.js +52 -0
  634. package/dist/interactions/actions/defaults/booleans.js.map +1 -0
  635. package/dist/interactions/actions/defaults/cancelGesture.js +24 -0
  636. package/dist/interactions/actions/defaults/cancelGesture.js.map +1 -0
  637. package/dist/interactions/actions/defaults/clearSelection.js +19 -0
  638. package/dist/interactions/actions/defaults/clearSelection.js.map +1 -0
  639. package/dist/interactions/actions/defaults/clipboard.js +78 -0
  640. package/dist/interactions/actions/defaults/clipboard.js.map +1 -0
  641. package/dist/interactions/actions/defaults/clone.js +96 -0
  642. package/dist/interactions/actions/defaults/clone.js.map +1 -0
  643. package/dist/interactions/actions/defaults/createOutlines.js +47 -0
  644. package/dist/interactions/actions/defaults/createOutlines.js.map +1 -0
  645. package/dist/interactions/actions/defaults/createPaintAction.js +85 -0
  646. package/dist/interactions/actions/defaults/createPaintAction.js.map +1 -0
  647. package/dist/interactions/actions/defaults/delete.js +61 -0
  648. package/dist/interactions/actions/defaults/delete.js.map +1 -0
  649. package/dist/interactions/actions/defaults/distribute.js +66 -0
  650. package/dist/interactions/actions/defaults/distribute.js.map +1 -0
  651. package/dist/interactions/actions/defaults/duplicate.js +83 -0
  652. package/dist/interactions/actions/defaults/duplicate.js.map +1 -0
  653. package/dist/interactions/actions/defaults/editAnchors.js +100 -0
  654. package/dist/interactions/actions/defaults/editAnchors.js.map +1 -0
  655. package/dist/interactions/actions/defaults/enterPathEdit.js +29 -0
  656. package/dist/interactions/actions/defaults/enterPathEdit.js.map +1 -0
  657. package/dist/interactions/actions/defaults/enterTextEdit.js +20 -0
  658. package/dist/interactions/actions/defaults/enterTextEdit.js.map +1 -0
  659. package/dist/interactions/actions/defaults/escape.js +26 -0
  660. package/dist/interactions/actions/defaults/escape.js.map +1 -0
  661. package/dist/interactions/actions/defaults/exitPathEdit.js +22 -0
  662. package/dist/interactions/actions/defaults/exitPathEdit.js.map +1 -0
  663. package/dist/interactions/actions/defaults/flip.js +119 -0
  664. package/dist/interactions/actions/defaults/flip.js.map +1 -0
  665. package/dist/interactions/actions/defaults/freshNodeId.js +10 -0
  666. package/dist/interactions/actions/defaults/freshNodeId.js.map +1 -0
  667. package/dist/interactions/actions/defaults/group.js +131 -0
  668. package/dist/interactions/actions/defaults/group.js.map +1 -0
  669. package/dist/interactions/actions/defaults/icons/actionGlyphIcons.js +40 -0
  670. package/dist/interactions/actions/defaults/icons/actionGlyphIcons.js.map +1 -0
  671. package/dist/interactions/actions/defaults/icons/actionGlyphs.js +10 -0
  672. package/dist/interactions/actions/defaults/icons/actionGlyphs.js.map +1 -0
  673. package/dist/interactions/actions/defaults/icons/alignIcons.js +173 -0
  674. package/dist/interactions/actions/defaults/icons/alignIcons.js.map +1 -0
  675. package/dist/interactions/actions/defaults/icons/booleanIcons.js +171 -0
  676. package/dist/interactions/actions/defaults/icons/booleanIcons.js.map +1 -0
  677. package/dist/interactions/actions/defaults/icons/distributeIcons.js +63 -0
  678. package/dist/interactions/actions/defaults/icons/distributeIcons.js.map +1 -0
  679. package/dist/interactions/actions/defaults/icons/editIcons.js +280 -0
  680. package/dist/interactions/actions/defaults/icons/editIcons.js.map +1 -0
  681. package/dist/interactions/actions/defaults/icons/outlineIcons.js +53 -0
  682. package/dist/interactions/actions/defaults/icons/outlineIcons.js.map +1 -0
  683. package/dist/interactions/actions/defaults/ingest.js +58 -0
  684. package/dist/interactions/actions/defaults/ingest.js.map +1 -0
  685. package/dist/interactions/actions/defaults/insert.js +288 -0
  686. package/dist/interactions/actions/defaults/insert.js.map +1 -0
  687. package/dist/interactions/actions/defaults/insertPathAnchor.js +50 -0
  688. package/dist/interactions/actions/defaults/insertPathAnchor.js.map +1 -0
  689. package/dist/interactions/actions/defaults/lassoSelect.js +156 -0
  690. package/dist/interactions/actions/defaults/lassoSelect.js.map +1 -0
  691. package/dist/interactions/actions/defaults/move.js +656 -0
  692. package/dist/interactions/actions/defaults/move.js.map +1 -0
  693. package/dist/interactions/actions/defaults/nudge.js +110 -0
  694. package/dist/interactions/actions/defaults/nudge.js.map +1 -0
  695. package/dist/interactions/actions/defaults/pinchZoom.js +63 -0
  696. package/dist/interactions/actions/defaults/pinchZoom.js.map +1 -0
  697. package/dist/interactions/actions/defaults/reorder.js +143 -0
  698. package/dist/interactions/actions/defaults/reorder.js.map +1 -0
  699. package/dist/interactions/actions/defaults/requiresSelection.js +10 -0
  700. package/dist/interactions/actions/defaults/requiresSelection.js.map +1 -0
  701. package/dist/interactions/actions/defaults/resize.js +332 -0
  702. package/dist/interactions/actions/defaults/resize.js.map +1 -0
  703. package/dist/interactions/actions/defaults/rotate.js +181 -0
  704. package/dist/interactions/actions/defaults/rotate.js.map +1 -0
  705. package/dist/interactions/actions/defaults/selectAll.js +27 -0
  706. package/dist/interactions/actions/defaults/selectAll.js.map +1 -0
  707. package/dist/interactions/actions/defaults/setFill.js +27 -0
  708. package/dist/interactions/actions/defaults/setFill.js.map +1 -0
  709. package/dist/interactions/actions/defaults/setFillOpacity.js +15 -0
  710. package/dist/interactions/actions/defaults/setFillOpacity.js.map +1 -0
  711. package/dist/interactions/actions/defaults/setStroke.js +36 -0
  712. package/dist/interactions/actions/defaults/setStroke.js.map +1 -0
  713. package/dist/interactions/actions/defaults/setStrokeOpacity.js +21 -0
  714. package/dist/interactions/actions/defaults/setStrokeOpacity.js.map +1 -0
  715. package/dist/interactions/actions/defaults/slice.js +39 -0
  716. package/dist/interactions/actions/defaults/slice.js.map +1 -0
  717. package/dist/interactions/actions/defaults/sliceOps.js +60 -0
  718. package/dist/interactions/actions/defaults/sliceOps.js.map +1 -0
  719. package/dist/interactions/actions/defaults/toolActivate.js +35 -0
  720. package/dist/interactions/actions/defaults/toolActivate.js.map +1 -0
  721. package/dist/interactions/actions/defaults/toolResetToDefault.js +26 -0
  722. package/dist/interactions/actions/defaults/toolResetToDefault.js.map +1 -0
  723. package/dist/interactions/actions/defaults/undoRedo.js +51 -0
  724. package/dist/interactions/actions/defaults/undoRedo.js.map +1 -0
  725. package/dist/interactions/actions/defaults/viewportDragPan.js +88 -0
  726. package/dist/interactions/actions/defaults/viewportDragPan.js.map +1 -0
  727. package/dist/interactions/actions/defaults/viewportWheelPan.js +57 -0
  728. package/dist/interactions/actions/defaults/viewportWheelPan.js.map +1 -0
  729. package/dist/interactions/actions/defaults/viewportZoom.js +143 -0
  730. package/dist/interactions/actions/defaults/viewportZoom.js.map +1 -0
  731. package/dist/interactions/actions/distribute/distribute.js +42 -0
  732. package/dist/interactions/actions/distribute/distribute.js.map +1 -0
  733. package/dist/interactions/actions/distribute/plan.js +29 -0
  734. package/dist/interactions/actions/distribute/plan.js.map +1 -0
  735. package/dist/interactions/actions/edit-anchors/geometry.js +61 -0
  736. package/dist/interactions/actions/edit-anchors/geometry.js.map +1 -0
  737. package/dist/interactions/actions/edit-anchors/handles.js +43 -0
  738. package/dist/interactions/actions/edit-anchors/handles.js.map +1 -0
  739. package/dist/interactions/actions/flip/helpers.js +35 -0
  740. package/dist/interactions/actions/flip/helpers.js.map +1 -0
  741. package/dist/interactions/actions/geometryProjection.js +18 -0
  742. package/dist/interactions/actions/geometryProjection.js.map +1 -0
  743. package/dist/interactions/actions/gestureLifecycle.js +44 -0
  744. package/dist/interactions/actions/gestureLifecycle.js.map +1 -0
  745. package/dist/interactions/actions/lasso-select/behaviors/selectFromLasso.js +39 -0
  746. package/dist/interactions/actions/lasso-select/behaviors/selectFromLasso.js.map +1 -0
  747. package/dist/interactions/actions/move/behaviors/snapBackOrDelete.js +36 -0
  748. package/dist/interactions/actions/move/behaviors/snapBackOrDelete.js.map +1 -0
  749. package/dist/interactions/actions/move/behaviors/snapToContainer.js +67 -0
  750. package/dist/interactions/actions/move/behaviors/snapToContainer.js.map +1 -0
  751. package/dist/interactions/actions/move/gestureAdapter.js +37 -0
  752. package/dist/interactions/actions/move/gestureAdapter.js.map +1 -0
  753. package/dist/interactions/actions/outlines/createOutlines.js +84 -0
  754. package/dist/interactions/actions/outlines/createOutlines.js.map +1 -0
  755. package/dist/interactions/actions/outlines/useCreateOutlinesAdapter.js +9 -0
  756. package/dist/interactions/actions/outlines/useCreateOutlinesAdapter.js.map +1 -0
  757. package/dist/interactions/actions/planeInput.js +168 -0
  758. package/dist/interactions/actions/planeInput.js.map +1 -0
  759. package/dist/interactions/actions/poseDescriptorDep.js +9 -0
  760. package/dist/interactions/actions/poseDescriptorDep.js.map +1 -0
  761. package/dist/interactions/actions/poseFrame.js +38 -0
  762. package/dist/interactions/actions/poseFrame.js.map +1 -0
  763. package/dist/interactions/actions/previewOverrides.js +25 -0
  764. package/dist/interactions/actions/previewOverrides.js.map +1 -0
  765. package/dist/interactions/actions/resize/autoPoseDescriptor.js +32 -0
  766. package/dist/interactions/actions/resize/autoPoseDescriptor.js.map +1 -0
  767. package/dist/interactions/actions/resize/behaviors/clampMinSize.js +18 -0
  768. package/dist/interactions/actions/resize/behaviors/clampMinSize.js.map +1 -0
  769. package/dist/interactions/actions/resize/behaviors/index.js +8 -0
  770. package/dist/interactions/actions/resize/behaviors/index.js.map +1 -0
  771. package/dist/interactions/actions/resize/behaviors/lockAspect.js +24 -0
  772. package/dist/interactions/actions/resize/behaviors/lockAspect.js.map +1 -0
  773. package/dist/interactions/actions/resize/cornerHandles.js +72 -0
  774. package/dist/interactions/actions/resize/cornerHandles.js.map +1 -0
  775. package/dist/interactions/actions/resolveOverlays.js +60 -0
  776. package/dist/interactions/actions/resolveOverlays.js.map +1 -0
  777. package/dist/interactions/actions/resolvePreviews.js +61 -0
  778. package/dist/interactions/actions/resolvePreviews.js.map +1 -0
  779. package/dist/interactions/actions/rotate/geometry.js +46 -0
  780. package/dist/interactions/actions/rotate/geometry.js.map +1 -0
  781. package/dist/interactions/actions/rotate/handle.js +27 -0
  782. package/dist/interactions/actions/rotate/handle.js.map +1 -0
  783. package/dist/interactions/actions/spatialReference.js +42 -0
  784. package/dist/interactions/actions/spatialReference.js.map +1 -0
  785. package/dist/interactions/actions/useStandardActions.js +142 -0
  786. package/dist/interactions/actions/useStandardActions.js.map +1 -0
  787. package/dist/interactions/gestures/dragGesture/dragGesture.js +111 -0
  788. package/dist/interactions/gestures/dragGesture/dragGesture.js.map +1 -0
  789. package/dist/interactions/gestures/dragRadial/dragRadial.js +117 -0
  790. package/dist/interactions/gestures/dragRadial/dragRadial.js.map +1 -0
  791. package/dist/interactions/gestures/dragRect/dragRect.js +164 -0
  792. package/dist/interactions/gestures/dragRect/dragRect.js.map +1 -0
  793. package/dist/interactions/gestures/handleDrag/handleDrag.js +46 -0
  794. package/dist/interactions/gestures/handleDrag/handleDrag.js.map +1 -0
  795. package/dist/interactions/gestures/pointerDrag/pointerDrag.js +118 -0
  796. package/dist/interactions/gestures/pointerDrag/pointerDrag.js.map +1 -0
  797. package/dist/interactions/gestures/shared/originProjection.js +42 -0
  798. package/dist/interactions/gestures/shared/originProjection.js.map +1 -0
  799. package/dist/interactions/gestures/shared/screenTolerance.js +21 -0
  800. package/dist/interactions/gestures/shared/screenTolerance.js.map +1 -0
  801. package/dist/interactions/gestures/shared/snap.js +24 -0
  802. package/dist/interactions/gestures/shared/snap.js.map +1 -0
  803. package/dist/interactions/gestures/thresholdDrag/thresholdDrag.js +30 -0
  804. package/dist/interactions/gestures/thresholdDrag/thresholdDrag.js.map +1 -0
  805. package/dist/layout/arrivals.js +36 -0
  806. package/dist/layout/arrivals.js.map +1 -0
  807. package/dist/{math-MCQcf_gc.d.ts → math-CUMxmZzn.d.ts} +8 -116
  808. package/dist/math.d.ts +4 -5
  809. package/dist/math.js +6 -4
  810. package/dist/mesh.d.ts +268 -0
  811. package/dist/mesh.js +7 -0
  812. package/dist/move.d.ts +7 -49
  813. package/dist/move.js +3 -142
  814. package/dist/originProjection-BSn4xiEy.d.ts +57 -0
  815. package/dist/patterns-builtin.js +3 -3
  816. package/dist/{poseDescriptor-rZa9W5hJ.d.ts → poseDescriptor-CjSXMf8X.d.ts} +3 -3
  817. package/dist/registerProgram-ateHDGjw.d.ts +193 -0
  818. package/dist/renderer/DrawCommand.js +6 -0
  819. package/dist/renderer/DrawCommand.js.map +1 -0
  820. package/dist/renderer/WeaselRenderer.js +328 -0
  821. package/dist/renderer/WeaselRenderer.js.map +1 -0
  822. package/dist/renderer/cache/GLImageCache.js +64 -0
  823. package/dist/renderer/cache/GLImageCache.js.map +1 -0
  824. package/dist/renderer/cache/GLMeshCache.js +102 -0
  825. package/dist/renderer/cache/GLMeshCache.js.map +1 -0
  826. package/dist/renderer/cache/GLTextureCache.js +51 -0
  827. package/dist/renderer/cache/GLTextureCache.js.map +1 -0
  828. package/dist/renderer/cache/GradientRampAtlas.js +82 -0
  829. package/dist/renderer/cache/GradientRampAtlas.js.map +1 -0
  830. package/dist/renderer/cache/cache.js +13 -0
  831. package/dist/renderer/cache/cache.js.map +1 -0
  832. package/dist/renderer/cache/markerCommandCache.js +59 -0
  833. package/dist/renderer/cache/markerCommandCache.js.map +1 -0
  834. package/dist/renderer/cache/outlineMeshCache.js +15 -0
  835. package/dist/renderer/cache/outlineMeshCache.js.map +1 -0
  836. package/dist/renderer/cache/outlineStrokeMeshCache.js +31 -0
  837. package/dist/renderer/cache/outlineStrokeMeshCache.js.map +1 -0
  838. package/dist/renderer/cache/strokeMeshCache.js +44 -0
  839. package/dist/renderer/cache/strokeMeshCache.js.map +1 -0
  840. package/dist/renderer/cullDrawCommands.js +89 -0
  841. package/dist/renderer/cullDrawCommands.js.map +1 -0
  842. package/dist/renderer/draw.js +1109 -0
  843. package/dist/renderer/draw.js.map +1 -0
  844. package/dist/renderer/drawBatch.js +168 -0
  845. package/dist/renderer/drawBatch.js.map +1 -0
  846. package/dist/renderer/effects/EffectTargets.js +45 -0
  847. package/dist/renderer/effects/EffectTargets.js.map +1 -0
  848. package/dist/renderer/effects/builtins.js +31 -0
  849. package/dist/renderer/effects/builtins.js.map +1 -0
  850. package/dist/renderer/effects/composite.js +9 -0
  851. package/dist/renderer/effects/composite.js.map +1 -0
  852. package/dist/renderer/effects/effectPrelude.js +10 -0
  853. package/dist/renderer/effects/effectPrelude.js.map +1 -0
  854. package/dist/renderer/effects/types.js +10 -0
  855. package/dist/renderer/effects/types.js.map +1 -0
  856. package/dist/renderer/index.js +19 -0
  857. package/dist/renderer/math/color.js +341 -0
  858. package/dist/renderer/math/color.js.map +1 -0
  859. package/dist/renderer/math/mat3.js +71 -0
  860. package/dist/renderer/math/mat3.js.map +1 -0
  861. package/dist/renderer/math/patternSpace.js +22 -0
  862. package/dist/renderer/math/patternSpace.js.map +1 -0
  863. package/dist/renderer/math/viewToMat3.js +19 -0
  864. package/dist/renderer/math/viewToMat3.js.map +1 -0
  865. package/dist/renderer/paintResources.js +18 -0
  866. package/dist/renderer/paintResources.js.map +1 -0
  867. package/dist/renderer/paintScratch.js +37 -0
  868. package/dist/renderer/paintScratch.js.map +1 -0
  869. package/dist/renderer/shaders/ShaderProgram.js +74 -0
  870. package/dist/renderer/shaders/ShaderProgram.js.map +1 -0
  871. package/dist/renderer/shaders/batchFill.js +118 -0
  872. package/dist/renderer/shaders/batchFill.js.map +1 -0
  873. package/dist/renderer/shaders/customPrelude.js +34 -0
  874. package/dist/renderer/shaders/customPrelude.js.map +1 -0
  875. package/dist/renderer/shaders/extractUniformNames.js +184 -0
  876. package/dist/renderer/shaders/extractUniformNames.js.map +1 -0
  877. package/dist/renderer/shaders/glyphPaint.js +61 -0
  878. package/dist/renderer/shaders/glyphPaint.js.map +1 -0
  879. package/dist/renderer/shaders/gradFill.js +30 -0
  880. package/dist/renderer/shaders/gradFill.js.map +1 -0
  881. package/dist/renderer/shaders/imageFill.js +14 -0
  882. package/dist/renderer/shaders/imageFill.js.map +1 -0
  883. package/dist/renderer/shaders/pathFill.js +13 -0
  884. package/dist/renderer/shaders/pathFill.js.map +1 -0
  885. package/dist/renderer/shaders/patternFill.js +24 -0
  886. package/dist/renderer/shaders/patternFill.js.map +1 -0
  887. package/dist/renderer/shaders/registerProgram.js +18 -0
  888. package/dist/renderer/shaders/registerProgram.js.map +1 -0
  889. package/dist/renderer/spriteSheet.js +14 -0
  890. package/dist/renderer/spriteSheet.js.map +1 -0
  891. package/dist/renderer/state/GroupState.js +77 -0
  892. package/dist/renderer/state/GroupState.js.map +1 -0
  893. package/dist/renderer/syntheticItalic.js +6 -0
  894. package/dist/renderer/syntheticItalic.js.map +1 -0
  895. package/dist/renderer/textures/registerTexture.js +14 -0
  896. package/dist/renderer/textures/registerTexture.js.map +1 -0
  897. package/dist/renderer.d.ts +11 -21
  898. package/dist/renderer.js +18 -13
  899. package/dist/resize.d.ts +10 -46
  900. package/dist/resize.js +7 -5
  901. package/dist/routing.js +2 -3
  902. package/dist/scheduling/useVisibleRaf.js +69 -0
  903. package/dist/scheduling/useVisibleRaf.js.map +1 -0
  904. package/dist/test-hook/createTestHook.js +39 -0
  905. package/dist/test-hook/createTestHook.js.map +1 -0
  906. package/dist/test-hook/install.js +12 -0
  907. package/dist/test-hook/install.js.map +1 -0
  908. package/dist/test-seams-fYf6m5pu.d.ts +356 -0
  909. package/dist/test-seams.d.ts +6 -0
  910. package/dist/test-seams.js +3 -0
  911. package/dist/tools/builtin/ellipse/useEllipseTool.js +33 -0
  912. package/dist/tools/builtin/ellipse/useEllipseTool.js.map +1 -0
  913. package/dist/tools/builtin/eyedropper/useEyedropperTool.js +55 -0
  914. package/dist/tools/builtin/eyedropper/useEyedropperTool.js.map +1 -0
  915. package/dist/tools/builtin/hand/dragPanContribution.js +17 -0
  916. package/dist/tools/builtin/hand/dragPanContribution.js.map +1 -0
  917. package/dist/tools/builtin/hand/useHandTool.js +31 -0
  918. package/dist/tools/builtin/hand/useHandTool.js.map +1 -0
  919. package/dist/tools/builtin/image/useImageTool.js +41 -0
  920. package/dist/tools/builtin/image/useImageTool.js.map +1 -0
  921. package/dist/tools/builtin/lasso/useLassoTool.js +42 -0
  922. package/dist/tools/builtin/lasso/useLassoTool.js.map +1 -0
  923. package/dist/tools/builtin/line/useLineTool.js +33 -0
  924. package/dist/tools/builtin/line/useLineTool.js.map +1 -0
  925. package/dist/tools/builtin/pen/usePenTool.js +414 -0
  926. package/dist/tools/builtin/pen/usePenTool.js.map +1 -0
  927. package/dist/tools/builtin/pencil/usePencilTool.js +36 -0
  928. package/dist/tools/builtin/pencil/usePencilTool.js.map +1 -0
  929. package/dist/tools/builtin/pickTopMostHit.js +45 -0
  930. package/dist/tools/builtin/pickTopMostHit.js.map +1 -0
  931. package/dist/tools/builtin/polygon/usePolygonTool.js +81 -0
  932. package/dist/tools/builtin/polygon/usePolygonTool.js.map +1 -0
  933. package/dist/tools/builtin/rect/useRectTool.js +32 -0
  934. package/dist/tools/builtin/rect/useRectTool.js.map +1 -0
  935. package/dist/tools/builtin/select/selectionContributions.js +109 -0
  936. package/dist/tools/builtin/select/selectionContributions.js.map +1 -0
  937. package/dist/tools/builtin/select/useSelectTool.js +162 -0
  938. package/dist/tools/builtin/select/useSelectTool.js.map +1 -0
  939. package/dist/tools/builtin/shared/insertToolOptions.js +8 -0
  940. package/dist/tools/builtin/shared/insertToolOptions.js.map +1 -0
  941. package/dist/tools/builtin/slice/useSliceTool.js +263 -0
  942. package/dist/tools/builtin/slice/useSliceTool.js.map +1 -0
  943. package/dist/tools/builtin/star/useStarTool.js +82 -0
  944. package/dist/tools/builtin/star/useStarTool.js.map +1 -0
  945. package/dist/tools/builtin/text/useTextTool.js +177 -0
  946. package/dist/tools/builtin/text/useTextTool.js.map +1 -0
  947. package/dist/tools/overlayBinding.js +8 -0
  948. package/dist/tools/overlayBinding.js.map +1 -0
  949. package/dist/tools/prefs.js +47 -0
  950. package/dist/tools/prefs.js.map +1 -0
  951. package/dist/tools/useKeybindings.js +66 -0
  952. package/dist/tools/useKeybindings.js.map +1 -0
  953. package/dist/{types-D-9QWBy5.d.ts → types-CA54-mAZ.d.ts} +181 -13
  954. package/dist/{types-qYpyTAiZ.d.ts → types-DSjd6W3n.d.ts} +32 -6
  955. package/dist/util/color.js +26 -0
  956. package/dist/util/color.js.map +1 -0
  957. package/dist/util/constrainTo45.js +17 -0
  958. package/dist/util/constrainTo45.js.map +1 -0
  959. package/dist/util/paint.js +72 -0
  960. package/dist/util/paint.js.map +1 -0
  961. package/dist/version.js +6 -0
  962. package/dist/version.js.map +1 -0
  963. package/package.json +29 -19
  964. package/dist/chunk-3TY6FHAF.js +0 -170
  965. package/dist/chunk-3TY6FHAF.js.map +0 -1
  966. package/dist/chunk-DGWNNKGD.js +0 -248
  967. package/dist/chunk-DGWNNKGD.js.map +0 -1
  968. package/dist/chunk-G4ZGQMY7.js +0 -33372
  969. package/dist/chunk-G4ZGQMY7.js.map +0 -1
  970. package/dist/chunk-L5YNZYEG.js +0 -648
  971. package/dist/chunk-L5YNZYEG.js.map +0 -1
  972. package/dist/chunk-LU4IJ52W.js +0 -111
  973. package/dist/chunk-LU4IJ52W.js.map +0 -1
  974. package/dist/chunk-M24CLARN.js +0 -28
  975. package/dist/chunk-M24CLARN.js.map +0 -1
  976. package/dist/chunk-NE27EOLP.js +0 -146
  977. package/dist/chunk-NE27EOLP.js.map +0 -1
  978. package/dist/chunk-PNNZSYRD.js +0 -318
  979. package/dist/chunk-PNNZSYRD.js.map +0 -1
  980. package/dist/chunk-UPZY4ART.js +0 -29
  981. package/dist/chunk-UPZY4ART.js.map +0 -1
  982. package/dist/chunk-WPNA6L5O.js +0 -250
  983. package/dist/chunk-WPNA6L5O.js.map +0 -1
  984. package/dist/chunk-XMAWPGTK.js +0 -128
  985. package/dist/chunk-XMAWPGTK.js.map +0 -1
  986. package/dist/clipboard.js.map +0 -1
  987. package/dist/clone.js.map +0 -1
  988. package/dist/grid-CY5UKlZh.d.ts +0 -98
  989. package/dist/index.css.map +0 -1
  990. package/dist/index.js.map +0 -1
  991. package/dist/insert.d.ts +0 -36
  992. package/dist/insert.js +0 -81
  993. package/dist/insert.js.map +0 -1
  994. package/dist/math.js.map +0 -1
  995. package/dist/move.js.map +0 -1
  996. package/dist/path-JEV2c5If.d.ts +0 -48
  997. package/dist/patterns-builtin.js.map +0 -1
  998. package/dist/renderer.css +0 -62
  999. package/dist/renderer.css.map +0 -1
  1000. package/dist/renderer.js.map +0 -1
  1001. package/dist/resize.js.map +0 -1
  1002. package/dist/routing.js.map +0 -1
  1003. package/dist/types-D2tTKEU0.d.ts +0 -18
@@ -0,0 +1,31 @@
1
+ //#region src/debug/defaultTheme.ts
2
+ var e = {
3
+ hitboxFill: "rgba(255, 0, 255, 0.25)",
4
+ hitboxStroke: "#ff00ff",
5
+ handle: "#00e5ff",
6
+ bounds: "#ffeb3b",
7
+ origin: "#69f0ae",
8
+ snap: "#ffa726",
9
+ layerText: "#e0e0e0",
10
+ layerTextBg: "rgba(0, 0, 0, 0.6)",
11
+ idText: "#ffeb3b",
12
+ fpsText: "#e0e0e0",
13
+ fpsTextBg: "rgba(0, 0, 0, 0.6)",
14
+ viewport: "#b388ff"
15
+ }, t = {
16
+ hitbox: {
17
+ width: 1,
18
+ dash: [2, 2]
19
+ },
20
+ bounds: { width: 1 },
21
+ handle: { width: 1 },
22
+ snap: { width: 1 },
23
+ viewport: {
24
+ width: 1,
25
+ dash: [6, 4]
26
+ }
27
+ };
28
+ //#endregion
29
+ export { t as DEFAULT_DEBUG_STROKES, e as DEFAULT_DEBUG_THEME };
30
+
31
+ //# sourceMappingURL=defaultTheme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaultTheme.js","names":["DEFAULT_DEBUG_THEME","DEFAULT_DEBUG_STROKES"],"sources":["../../src/debug/defaultTheme.ts"],"sourcesContent":["import type { DebugStrokes, DebugTheme } from './types';\n\n/**\n * Default colors per the spec's Visual Style section. High contrast against\n * the demo's dark backdrop. Override by passing `theme: { ... }` on\n * `DebugConfig`.\n */\nexport const DEFAULT_DEBUG_THEME: DebugTheme = {\n hitboxFill: 'rgba(255, 0, 255, 0.25)',\n hitboxStroke: '#ff00ff',\n handle: '#00e5ff',\n bounds: '#ffeb3b',\n origin: '#69f0ae',\n snap: '#ffa726',\n layerText: '#e0e0e0',\n layerTextBg: 'rgba(0, 0, 0, 0.6)',\n idText: '#ffeb3b',\n fpsText: '#e0e0e0',\n fpsTextBg: 'rgba(0, 0, 0, 0.6)',\n viewport: '#b388ff',\n};\n\n/**\n * Default line widths and dashes. Hairline everywhere so the overlay never\n * hides the geometry it is describing; the dash on hitboxes is what\n * distinguishes them from the solid bounds box at the same rect.\n * Override by passing `strokes: { ... }` on `DebugConfig`.\n */\nexport const DEFAULT_DEBUG_STROKES: DebugStrokes = {\n hitbox: { width: 1, dash: [2, 2] },\n bounds: { width: 1 },\n handle: { width: 1 },\n snap: { width: 1 },\n viewport: { width: 1, dash: [6, 4] },\n};\n"],"mappings":";AAOA,IAAaA,IAAkC;CAC7C,YAAY;CACZ,cAAc;CACd,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,MAAM;CACN,WAAW;CACX,aAAa;CACb,QAAQ;CACR,SAAS;CACT,WAAW;CACX,UAAU;AACZ,GAQaC,IAAsC;CACjD,QAAQ;EAAE,OAAO;EAAG,MAAM,CAAC,GAAG,CAAC;CAAE;CACjC,QAAQ,EAAE,OAAO,EAAE;CACnB,QAAQ,EAAE,OAAO,EAAE;CACnB,MAAM,EAAE,OAAO,EAAE;CACjB,UAAU;EAAE,OAAO;EAAG,MAAM,CAAC,GAAG,CAAC;CAAE;AACrC"}
@@ -0,0 +1,41 @@
1
+ //#region src/debug/flag.ts
2
+ var e = ["weasel.debug", "weaseldraw.debug"], t = null;
3
+ function n() {
4
+ let t = {
5
+ all: !1,
6
+ set: /* @__PURE__ */ new Set()
7
+ };
8
+ if (typeof localStorage > "u") return t;
9
+ try {
10
+ for (let t of e) {
11
+ let e = localStorage.getItem(t);
12
+ if (e != null && e !== "") return e === "1" || e === "true" || e === "*" ? {
13
+ all: !0,
14
+ set: /* @__PURE__ */ new Set()
15
+ } : {
16
+ all: !1,
17
+ set: new Set(e.split(/[\s,]+/).filter(Boolean))
18
+ };
19
+ }
20
+ return t;
21
+ } catch {
22
+ return t;
23
+ }
24
+ }
25
+ function r() {
26
+ return t === null && (t = n()), t;
27
+ }
28
+ function i(e) {
29
+ let t = r();
30
+ return t.all ? !0 : e === void 0 ? t.set.size > 0 : t.set.has(e);
31
+ }
32
+ function a(e, ...t) {
33
+ i(e) && console.debug(`[${e}]`, ...t);
34
+ }
35
+ function o(e, ...t) {
36
+ i(e) && console.warn(`[${e}]`, ...t);
37
+ }
38
+ //#endregion
39
+ export { a as dlog, o as dwarn, i as isDebugEnabled };
40
+
41
+ //# sourceMappingURL=flag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flag.js","names":["KEYS","cached","read","empty","k","v","get","isDebugEnabled","c","namespace","dlog","args","dwarn"],"sources":["../../src/debug/flag.ts"],"sourcesContent":["/**\n * Namespaced, opt-in console tracing for the kit.\n *\n * Enable in the browser:\n *\n * localStorage.setItem('weasel.debug', '*') // all namespaces\n * localStorage.setItem('weasel.debug', 'tools,dispatch') // specific ones\n * localStorage.setItem('weasel.debug', '1') // legacy \"all\"\n *\n * Each call site picks a stable namespace string. Off by default; the flag\n * is read once and cached per page session — reload to pick up a change.\n *\n * Mirrors `packages/ui/src/dlog.ts`. The two impls live in separate\n * packages because weasel-ui doesn't depend on the kit, but both read the\n * same localStorage keys so behavior is uniform from a debugger's POV.\n *\n * Known kit namespaces:\n * - tools — active-tool + hotkey transitions (useTools)\n * - dispatch — gesture start / end / cancel (dispatcher)\n * - drag-rect — useDragRect lifecycle\n * - drag-radial — useDragRadial lifecycle\n * - scene — restored-op replay gaps (history persistence)\n * - scene-canvas — SceneCanvas mount / unmount; adapter paste-translation warnings\n * - history — applyOps push, no-op suppression, serialize/restore\n * - clipboard — OS clipboard write/read failures, malformed payloads\n */\n\nconst KEYS = ['weasel.debug', 'weaseldraw.debug'] as const;\n\ninterface Cached {\n all: boolean;\n set: Set<string>;\n}\n\nlet cached: Cached | null = null;\n\nfunction read(): Cached {\n const empty: Cached = { all: false, set: new Set() };\n if (typeof localStorage === 'undefined') return empty;\n try {\n for (const k of KEYS) {\n const v = localStorage.getItem(k);\n if (v == null || v === '') continue;\n if (v === '1' || v === 'true' || v === '*') return { all: true, set: new Set() };\n return { all: false, set: new Set(v.split(/[\\s,]+/).filter(Boolean)) };\n }\n return empty;\n } catch {\n return empty;\n }\n}\n\nfunction get(): Cached {\n if (cached === null) cached = read();\n return cached;\n}\n\n/** True when `namespace` (or `*`) is enabled. Pass no argument to test\n * whether *any* namespace is on (legacy global-flag semantics). */\nexport function isDebugEnabled(namespace?: string): boolean {\n const c = get();\n if (c.all) return true;\n if (namespace === undefined) return c.set.size > 0;\n return c.set.has(namespace);\n}\n\n/** Conditional `console.debug` — no-op unless `namespace` (or `*`) is enabled.\n * Each call is prefixed with `[namespace]` so the source is searchable. */\nexport function dlog(namespace: string, ...args: unknown[]): void {\n if (!isDebugEnabled(namespace)) return;\n // eslint-disable-next-line no-console\n console.debug(`[${namespace}]`, ...args);\n}\n\n/** Conditional `console.warn` — like `dlog` but at warn level. Use for\n * diagnostics that indicate something worth surfacing during debugging\n * (e.g. no-op op batches suppressed). */\nexport function dwarn(namespace: string, ...args: unknown[]): void {\n if (!isDebugEnabled(namespace)) return;\n console.warn(`[${namespace}]`, ...args);\n}\n"],"mappings":";AA2BA,IAAMA,IAAO,CAAC,gBAAgB,kBAAkB,GAO5CC,IAAwB;AAE5B,SAASC,IAAe;CACtB,IAAMC,IAAgB;EAAE,KAAK;EAAO,qBAAK,IAAI,IAAI;CAAE;CACnD,IAAI,OAAO,eAAiB,KAAa,OAAOA;CAChD,IAAI;EACF,KAAK,IAAMC,KAAKJ,GAAM;GACpB,IAAMK,IAAI,aAAa,QAAQD,CAAC;GAChC,IAAIC,KAAK,QAAQA,MAAM,IAEvB,OADIA,MAAM,OAAOA,MAAM,UAAUA,MAAM,MAAY;IAAE,KAAK;IAAM,qBAAK,IAAI,IAAI;GAAE,IACxE;IAAE,KAAK;IAAO,KAAK,IAAI,IAAIA,EAAE,MAAM,QAAQ,CAAC,CAAC,OAAO,OAAO,CAAC;GAAE;EACvE;EACA,OAAOF;CACT,QAAQ;EACN,OAAOA;CACT;AACF;AAEA,SAASG,IAAc;CAErB,OADIL,MAAW,SAAM,IAASC,EAAK,IAC5BD;AACT;AAIA,SAAgBM,EAAe,GAA6B;CAC1D,IAAMC,IAAIF,EAAI;CAGd,OAFIE,EAAE,MAAY,KACdC,MAAc,KAAA,IAAkBD,EAAE,IAAI,OAAO,IAC1CA,EAAE,IAAI,IAAIC,CAAS;AAC5B;AAIA,SAAgBC,EAAK,GAAmB,GAAGC,GAAuB;CAChE,AAAKJ,EAAeE,CAAS,KAE7B,QAAQ,MAAM,IAAIA,EAAU,IAAI,GAAGE,CAAI;AACzC;AAKA,SAAgBC,EAAM,GAAmB,GAAGD,GAAuB;CACjE,AAAKJ,EAAeE,CAAS,KAC7B,QAAQ,KAAK,IAAIA,EAAU,IAAI,GAAGE,CAAI;AACxC"}
@@ -0,0 +1,16 @@
1
+ //#region src/debug/frameStats.ts
2
+ function e(e, t, n) {
3
+ return {
4
+ paintMs: n,
5
+ drawCalls: t.drawCalls,
6
+ layers: e.map((e, n) => ({
7
+ id: e.id,
8
+ drawCalls: t.spans[n]?.drawCalls ?? 0,
9
+ ms: e.buildMs + (t.spans[n]?.ms ?? 0)
10
+ }))
11
+ };
12
+ }
13
+ //#endregion
14
+ export { e as frameStatsOf };
15
+
16
+ //# sourceMappingURL=frameStats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frameStats.js","names":["frameStatsOf","render","layers","l","i"],"sources":["../../src/debug/frameStats.ts"],"sourcesContent":["import type { LayerDrawSpan } from 'core/layers/render';\nimport type { RenderStats } from '../renderer/WeaselRenderer';\nimport type { FrameStats } from './types';\n\n/** One paint's {@link FrameStats}: each layer's build time from `drawLayers`\n * joined with its dispatch cost from the renderer, span for span. */\nexport function frameStatsOf(layers: readonly LayerDrawSpan[], render: RenderStats, paintMs: number): FrameStats {\n return {\n paintMs,\n drawCalls: render.drawCalls,\n layers: layers.map((l, i) => ({\n id: l.id,\n drawCalls: render.spans[i]?.drawCalls ?? 0,\n ms: l.buildMs + (render.spans[i]?.ms ?? 0),\n })),\n };\n}\n"],"mappings":";AAMA,SAAgBA,EAAa,GAAkC,GAAqB,GAA6B;CAC/G,OAAO;EACL;EACA,WAAWC,EAAO;EAClB,QAAQC,EAAO,KAAK,GAAG,OAAO;GAC5B,IAAIC,EAAE;GACN,WAAWF,EAAO,MAAMG,EAAE,EAAE,aAAa;GACzC,IAAID,EAAE,WAAWF,EAAO,MAAMG,EAAE,EAAE,MAAM;EAC1C,EAAE;CACJ;AACF"}
@@ -0,0 +1,32 @@
1
+ //#region src/debug/parseDebugFlags.ts
2
+ var e = [
3
+ "hitboxes",
4
+ "handles",
5
+ "bounds",
6
+ "origins",
7
+ "snap",
8
+ "layers",
9
+ "ids",
10
+ "fps",
11
+ "viewport"
12
+ ];
13
+ function t(t) {
14
+ let n = t.startsWith("?") ? t.slice(1) : t;
15
+ if (n.length === 0) return null;
16
+ let r = new URLSearchParams(n).get("debug");
17
+ if (!r) return null;
18
+ let i = r.split(",").map((e) => e.trim()).filter(Boolean);
19
+ if (i.length === 0) return null;
20
+ if (i.includes("all")) {
21
+ let t = {};
22
+ for (let n of e) t[n] = !0;
23
+ return t;
24
+ }
25
+ let a = {};
26
+ for (let t of i) e.includes(t) && (a[t] = !0);
27
+ return Object.keys(a).length > 0 ? a : null;
28
+ }
29
+ //#endregion
30
+ export { t as parseDebugFlags };
31
+
32
+ //# sourceMappingURL=parseDebugFlags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseDebugFlags.js","names":["ALL_FEATURES","parseDebugFlags","trimmed","search","raw","tokens","t","out","f"],"sources":["../../src/debug/parseDebugFlags.ts"],"sourcesContent":["import type { DebugConfig, DebugFeature } from './types';\n\nconst ALL_FEATURES: DebugFeature[] = [\n 'hitboxes', 'handles', 'bounds', 'origins', 'snap', 'layers', 'ids', 'fps', 'viewport',\n];\n\n/**\n * Parse a URL query string (with or without leading `?`) for a `debug` param.\n *\n * - `?debug=hitboxes` → `{ hitboxes: true }`\n * - `?debug=bounds,origins` → `{ bounds: true, origins: true }`\n * - `?debug=all` → every feature enabled\n * - missing/empty/unknown-only → `null`\n */\nexport function parseDebugFlags(search: string): DebugConfig | null {\n const trimmed = search.startsWith('?') ? search.slice(1) : search;\n if (trimmed.length === 0) return null;\n const params = new URLSearchParams(trimmed);\n const raw = params.get('debug');\n if (!raw) return null;\n const tokens = raw.split(',').map((t) => t.trim()).filter(Boolean);\n if (tokens.length === 0) return null;\n if (tokens.includes('all')) {\n const out: DebugConfig = {};\n for (const f of ALL_FEATURES) out[f] = true;\n return out;\n }\n const out: DebugConfig = {};\n for (const t of tokens) {\n if ((ALL_FEATURES as string[]).includes(t)) out[t as DebugFeature] = true;\n }\n return Object.keys(out).length > 0 ? out : null;\n}\n"],"mappings":";AAEA,IAAMA,IAA+B;CACnC;CAAY;CAAW;CAAU;CAAW;CAAQ;CAAU;CAAO;CAAO;AAC9E;AAUA,SAAgBC,EAAgB,GAAoC;CAClE,IAAMC,IAAUC,EAAO,WAAW,GAAG,IAAIA,EAAO,MAAM,CAAC,IAAIA;CAC3D,IAAID,EAAQ,WAAW,GAAG,OAAO;CAEjC,IAAME,IAAM,IADO,gBAAgBF,CACvB,CAAA,CAAO,IAAI,OAAO;CAC9B,IAAI,CAACE,GAAK,OAAO;CACjB,IAAMC,IAASD,EAAI,MAAM,GAAG,CAAC,CAAC,KAAK,MAAME,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,OAAO;CACjE,IAAID,EAAO,WAAW,GAAG,OAAO;CAChC,IAAIA,EAAO,SAAS,KAAK,GAAG;EAC1B,IAAME,IAAmB,CAAC;EAC1B,KAAK,IAAMC,KAAKR,GAAc,EAAIQ,KAAK;EACvC,OAAOD;CACT;CACA,IAAMA,IAAmB,CAAC;CAC1B,KAAK,IAAM,KAAKF,GACd,AAAKL,EAA0B,SAAS,CAAC,MAAG,EAAI,KAAqB;CAEvE,OAAO,OAAO,KAAKO,CAAG,CAAC,CAAC,SAAS,IAAIA,IAAM;AAC7C"}
@@ -0,0 +1,16 @@
1
+ //#region src/features/chrome-caps/buildChromeCtx.ts
2
+ function e(e) {
3
+ return {
4
+ focused: e.focused,
5
+ selection: e.selection,
6
+ multiActive: e.multiActive,
7
+ modifiers: e.modifiers,
8
+ action: e.action,
9
+ hover: e.hover,
10
+ view: e.view
11
+ };
12
+ }
13
+ //#endregion
14
+ export { e as buildChromeCtx };
15
+
16
+ //# sourceMappingURL=buildChromeCtx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildChromeCtx.js","names":["buildChromeCtx","args"],"sources":["../../../src/features/chrome-caps/buildChromeCtx.ts"],"sourcesContent":["/**\n * Pure assembler for {@link ChromeCtx}.\n *\n * Called once per frame on the rendering side from whichever surface\n * needs to evaluate visibility rules — `composeAffordanceLayer`,\n * `createSelectionOverlayLayer`, the dispatcher overlay layer, etc.\n *\n * Sources are passed as plain getters / values rather than the live\n * objects they come from. This keeps `chrome-caps` from depending on\n * React, the dispatcher's concrete type, or `ChromeState`'s bounds\n * machinery — the same builder works from a test harness, a forge\n * story, or `<SceneCanvas>`.\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":";AAgCA,SAAgBA,EAAe,GAAqC;CAClE,OAAO;EACL,SAASC,EAAK;EACd,WAAWA,EAAK;EAChB,aAAaA,EAAK;EAClB,WAAWA,EAAK;EAChB,QAAQA,EAAK;EACb,OAAOA,EAAK;EACZ,MAAMA,EAAK;CACb;AACF"}
@@ -0,0 +1,36 @@
1
+ import { ALWAYS as e, NEVER as t, evaluate as n } from "@weasel-js/routing";
2
+ //#region src/features/chrome-caps/conditions.ts
3
+ function r(e) {
4
+ let t = (t) => n(e, t);
5
+ return t.rule = e, t.and = (t) => r(a(e, i(t))), t.or = (t) => r(o(e, i(t))), t.andNot = (t) => r(a(e, { not: i(t) })), t.orNot = (t) => r(o(e, { not: i(t) })), t;
6
+ }
7
+ function i(e) {
8
+ return typeof e == "function" ? e.rule : e;
9
+ }
10
+ function a(e, t) {
11
+ let n = "all" in e ? e.all : [e], r = "all" in t ? t.all : [t];
12
+ return { all: [...n, ...r] };
13
+ }
14
+ function o(e, t) {
15
+ let n = "any" in e ? e.any : [e], r = "any" in t ? t.any : [t];
16
+ return { any: [...n, ...r] };
17
+ }
18
+ function s(e) {
19
+ return r({ when: e });
20
+ }
21
+ function c(...e) {
22
+ return r({ all: e.map(i) });
23
+ }
24
+ function l(...e) {
25
+ return r({ any: e.map(i) });
26
+ }
27
+ function u(e) {
28
+ return r({ not: i(e) });
29
+ }
30
+ var d = r(e), f = r(t), p = r({ focused: !0 }), m = r({ gesturing: !0 });
31
+ r({ editingAnchors: !0 }), r({ resizable: !0 });
32
+ var h = (e) => r({ actionIs: e }), g = r({ selection: { empty: !0 } }), _ = (e) => r({ selection: { is: e } }), v = (e) => r({ selection: { atLeast: e } }), y = r({ when: (e) => e.multiActive }), b = r({ hovering: !0 }), x = r({ hoveringSelected: !0 }), S = (e) => r({ modifierHeld: e }), C = (e) => r({ zoomAtLeast: e }), w = (e) => r({ mode: e }), T = (e) => r({ mode: { in: e } }), E = (e) => r({ mode: { not: e } }), D = (e) => r({ capability: e }), O = (e) => r({ capability: { in: e } }), k = (e) => r({ capability: [...e] }), A = (e) => r({ capability: { not: e } }), j = r({ coarsePointer: !0 }), M = r({ canHover: !0 });
33
+ //#endregion
34
+ export { h as actionIs, d as always, c as and, M as canHover, k as capabilityAll, O as capabilityIn, D as capabilityIs, A as capabilityNot, j as coarsePointer, r as cond, p as focused, m as gesturing, b as hovering, x as hoveringSelected, T as modeIn, w as modeIs, E as modeNot, S as modifierHeld, y as multiActive, f as never, u as not, l as or, v as selectionAtLeast, g as selectionEmpty, _ as selectionIs, s as when, C as zoomAtLeast };
35
+
36
+ //# sourceMappingURL=conditions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conditions.js","names":["cond","condition","evaluate","rule","ctx","combineAll","asRule","other","combineAny","value","left","a","right","b","when","fn","and","cs","or","not","c","always","ALWAYS","never","NEVER","focused","gesturing","actionIs","kind","selectionEmpty","selectionIs","n","selectionAtLeast","multiActive","hovering","hoveringSelected","modifierHeld","m","zoomAtLeast","z","modeIs","modeIn","modes","modeNot","capabilityIs","cap","capabilityIn","caps","capabilityAll","capabilityNot","coarsePointer","canHover"],"sources":["../../../src/features/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. The function form evaluates\n * the tree against a RuleCtx; combinator methods produce new Conditions\n * wrapping `all`/`any`/`not` nodes.\n *\n * **Chain semantics: strict left-to-right.** No boolean precedence.\n * `focused.or(hovering).and(selectionIs(1))` evaluates\n * `((focused || hovering) && selectionIs(1))` — NOT\n * `(focused || (hovering && selectionIs(1)))` as standard precedence\n * would give. For grouped disjunction, use the top-level `or` / `and` /\n * `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] }` rather than `{ all: [{ all: [a, b] }, c] }`.\n * Canonical form simplifies downstream introspection.\n *\n * Use {@link when} for the inline-lambda escape hatch.\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). Implemented as a `when` because\n * `multiActive` is a derived single-call read on RuleCtx, not a\n * selector-table key. Stable; safe to introspect. */\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 (new) ─────────────────────────────────\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, so a rule written with this atom is inert on the\n * mouse-shaped default rather than silently flipping. */\nexport const coarsePointer: Condition = cond({ coarsePointer: true });\n\n/** Primary pointer can hover. Absent device profile → true. Pair with\n * `not(...)` to gate chrome that only makes sense with a hovering\n * pointer: `not(canHover)` is \"this device cannot hover\". */\nexport const canHover: Condition = cond({ canHover: true });\n"],"mappings":";;AAwBA,SAAgBA,EAAK,GAAuB;CAE1C,IAAMC,KADM,MAAiBC,EAASC,GAAMC,CAAG;CAO/C,OALA,EAA8B,OAAOD,GACrC,EAAU,OAAU,MAAUH,EAAKK,EAAWF,GAAMG,EAAOC,CAAK,CAAC,CAAC,GAClE,EAAU,MAAU,MAAUP,EAAKQ,EAAWL,GAAMG,EAAOC,CAAK,CAAC,CAAC,GAClE,EAAU,UAAU,MAAUP,EAAKK,EAAWF,GAAM,EAAE,KAAKG,EAAOC,CAAK,EAAE,CAAC,CAAC,GAC3E,EAAU,SAAU,MAAUP,EAAKQ,EAAWL,GAAM,EAAE,KAAKG,EAAOC,CAAK,EAAE,CAAC,CAAC,GACpEN;AACT;AAEA,SAASK,EAAO,GAA+B;CAC7C,OAAO,OAAOG,KAAU,aAAcA,EAAoB,OAAOA;AACnE;AAEA,SAASJ,EAAW,GAAS,GAAe;CAC1C,IAAMK,IAAO,SAASC,IAAIA,EAAE,MAAM,CAACA,CAAC,GAC9BC,IAAQ,SAASC,IAAIA,EAAE,MAAM,CAACA,CAAC;CACrC,OAAO,EAAE,KAAK,CAAC,GAAGH,GAAM,GAAGE,CAAK,EAAE;AACpC;AAEA,SAASJ,EAAW,GAAS,GAAe;CAC1C,IAAME,IAAO,SAASC,IAAIA,EAAE,MAAM,CAACA,CAAC,GAC9BC,IAAQ,SAASC,IAAIA,EAAE,MAAM,CAACA,CAAC;CACrC,OAAO,EAAE,KAAK,CAAC,GAAGH,GAAM,GAAGE,CAAK,EAAE;AACpC;AAGA,SAAgBE,EAAK,GAA0C;CAC7D,OAAOd,EAAK,EAAE,MAAMe,EAAG,CAAC;AAC1B;AAMA,SAAgBC,EAAI,GAAGC,GAAqC;CAC1D,OAAOjB,EAAK,EAAE,KAAKiB,EAAG,IAAIX,CAAM,EAAE,CAAC;AACrC;AAIA,SAAgBY,EAAG,GAAGD,GAAqC;CACzD,OAAOjB,EAAK,EAAE,KAAKiB,EAAG,IAAIX,CAAM,EAAE,CAAC;AACrC;AAIA,SAAgBa,EAAI,GAAgC;CAClD,OAAOnB,EAAK,EAAE,KAAKM,EAAOc,CAAC,EAAE,CAAC;AAChC;AAKA,IAAaC,IAAoBrB,EAAKsB,CAAM,GAI/BC,IAAmBvB,EAAKwB,CAAK,GAK7BC,IAAqBzB,EAAK,EAAE,SAAS,GAAK,CAAC,GAG3C0B,IAAuB1B,EAAK,EAAE,WAAW,GAAK,CAAC;AAGnBA,EAAK,EAAE,gBAAgB,GAAK,CAAC,GAIlCA,EAAK,EAAE,WAAW,GAAK,CAAC;AAG5D,IAAa2B,KAAY,MAA4B3B,EAAK,EAAE,UAAU4B,EAAK,CAAC,GAK/DC,IAA4B7B,EAAK,EAAE,WAAW,EAAE,OAAO,GAAK,EAAE,CAAC,GAG/D8B,KAAe,MAAyB9B,EAAK,EAAE,WAAW,EAAE,IAAI+B,EAAE,EAAE,CAAC,GAIrEC,KAAoB,MAAyBhC,EAAK,EAAE,WAAW,EAAE,SAAS+B,EAAE,EAAE,CAAC,GAM/EE,IAAyBjC,EAAK,EAAE,OAAO,MAAMoB,EAAE,YAAY,CAAC,GAK5Dc,IAAsBlC,EAAK,EAAE,UAAU,GAAK,CAAC,GAG7CmC,IAA8BnC,EAAK,EAAE,kBAAkB,GAAK,CAAC,GAK7DoC,KAAgB,MAAsCpC,EAAK,EAAE,cAAcqC,EAAE,CAAC,GAM9EC,KAAe,MAAyBtC,EAAK,EAAE,aAAauC,EAAE,CAAC,GAK/DC,KAAU,MAAyBxC,EAAK,EAAE,MAAMqC,EAAE,CAAC,GAGnDI,KAAU,MAAwCzC,EAAK,EAAE,MAAM,EAAE,IAAI0C,EAAM,EAAE,CAAC,GAG9EC,KAAW,MAAyB3C,EAAK,EAAE,MAAM,EAAE,KAAKqC,EAAE,EAAE,CAAC,GAG7DO,KAAgB,MAA2B5C,EAAK,EAAE,YAAY6C,EAAI,CAAC,GAGnEC,KAAgB,MAAuC9C,EAAK,EAAE,YAAY,EAAE,IAAI+C,EAAK,EAAE,CAAC,GAGxFC,KAAiB,MAAuChD,EAAK,EAAE,YAAY,CAAC,GAAG+C,CAAI,EAAE,CAAC,GAGtFE,KAAiB,MAA2BjD,EAAK,EAAE,YAAY,EAAE,KAAK6C,EAAI,EAAE,CAAC,GAO7EK,IAA2BlD,EAAK,EAAE,eAAe,GAAK,CAAC,GAKvDmD,IAAsBnD,EAAK,EAAE,UAAU,GAAK,CAAC"}
@@ -0,0 +1,26 @@
1
+ //#region src/features/chrome-caps/defaults.ts
2
+ var e = {
3
+ "selection.outline": { all: [{ selection: { atLeast: 1 } }, { capability: { not: "edits-anchors" } }] },
4
+ "selection.resize-handles": { all: [
5
+ { selection: { atLeast: 1 } },
6
+ { not: { gesturing: !0 } },
7
+ { capability: "transforms-selection" },
8
+ { resizable: !0 }
9
+ ] },
10
+ "selection.rotation-handle": { all: [
11
+ { selection: { atLeast: 1 } },
12
+ { focused: !0 },
13
+ { not: { gesturing: !0 } },
14
+ { capability: "transforms-selection" }
15
+ ] },
16
+ "action.marquee": { actionIs: "marquee" },
17
+ "action.lasso": { actionIs: "lasso" },
18
+ "action.move-ghosts": { actionIs: "move" },
19
+ "path-edit.anchors": { editingAnchors: !0 },
20
+ "path-edit.overlay": { editingAnchors: !0 },
21
+ "snap.guides": { gesturing: !0 }
22
+ };
23
+ //#endregion
24
+ export { e as defaultVisibilityRules };
25
+
26
+ //# sourceMappingURL=defaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaults.js","names":["defaultVisibilityRules"],"sources":["../../../src/features/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 * Written as literal Rule trees rather than fluent chains so the inputs\n * each rule depends on are immediately visible. The fluent atoms compile\n * to the same trees; either form is valid in a VisibilityRules entry.\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. There is\n * no `mode:` rule left in this table — the `path-edit.*` chrome used to be\n * the exception, on the theory that it's the visual signature of one mode;\n * see the comment on those rules below for why that was wrong in both\n * directions and what replaced it.\n *\n * Chrome that gates on the *absence* of a capability (the selection\n * outline, suppressed while an anchor-editing overlay owns the visuals)\n * uses `capability: { not: … }` for the same reason.\n */\nexport const defaultVisibilityRules: VisibilityRules = {\n // Static selection chrome — visible while a selection exists, but off\n // whenever an anchor-editing overlay has taken over the visuals (today:\n // path-edit mode; tomorrow: anything else that allows `edits-anchors`).\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. Gated on the mode actually\n // permitting transforms — grabbing a resize handle in a mode that\n // forbids `transforms-selection` could only ever be a no-op — and on the\n // selection being resizable (consumer `resizable` predicate).\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 // Rotation handle visible whenever any selection is focused — single\n // mode pivots around the selected node's center; multi mode pivots\n // around the union AABB center. Same transform gating as resize; also\n // off during an action.\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.\n //\n // This used to read `{ mode: 'path-edit' }`, which was wrong in both\n // directions. Consumers with no mode registry report mode `'normal'`,\n // so the anchor hit-test (which asks `isVisible('path-edit.anchors')`)\n // refused every anchor while the overlay — which never consulted the\n // table at all — drew them anyway: visible but not grabbable, the exact\n // failure this table exists to make impossible. And a consumer defining\n // its own anchor-editing mode under a different id got neither.\n //\n // `editingAnchors` is the state both surfaces actually care about. It's\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, and drawing anchors for the former is wrong.\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 currently driven by\n // dedicated boolean props on <SceneCanvas>. They'll move into this\n // table as they migrate.\n};\n"],"mappings":";AAuBA,IAAaA,IAA0C;CAIrD,qBAAqB,EACnB,KAAK,CACH,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,GAC5B,EAAE,YAAY,EAAE,KAAK,gBAAgB,EAAE,CACzC,EACF;CAOA,4BAA4B,EAC1B,KAAK;EACH,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE;EAC5B,EAAE,KAAK,EAAE,WAAW,GAAK,EAAE;EAC3B,EAAE,YAAY,uBAAuB;EACrC,EAAE,WAAW,GAAK;CACpB,EACF;CAMA,6BAA6B,EAC3B,KAAK;EACH,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE;EAC5B,EAAE,SAAS,GAAK;EAChB,EAAE,KAAK,EAAE,WAAW,GAAK,EAAE;EAC3B,EAAE,YAAY,uBAAuB;CACvC,EACF;CAGA,kBAAsB,EAAE,UAAU,UAAU;CAC5C,gBAAsB,EAAE,UAAU,QAAQ;CAC1C,sBAAsB,EAAE,UAAU,OAAO;CAgBzC,qBAAqB,EAAE,gBAAgB,GAAK;CAC5C,qBAAqB,EAAE,gBAAgB,GAAK;CAG5C,eAAe,EAAE,WAAW,GAAK;AAMnC"}
@@ -0,0 +1,7 @@
1
+ import { actionIs as e, always as t, and as n, canHover as r, capabilityAll as i, capabilityIn as a, capabilityIs as o, capabilityNot as s, coarsePointer as c, cond as l, focused as u, gesturing as d, hovering as f, hoveringSelected as p, modeIn as m, modeIs as h, modeNot as g, modifierHeld as _, multiActive as v, never as y, not as b, or as x, selectionAtLeast as S, selectionEmpty as C, selectionIs as w, when as T, zoomAtLeast as E } from "./conditions.js";
2
+ import { defaultVisibilityRules as D } from "./defaults.js";
3
+ import { resolveVisibility as O } from "./resolve.js";
4
+ import { buildChromeCtx as k } from "./buildChromeCtx.js";
5
+ import { useHoverTracking as A } from "./useHoverTracking.js";
6
+ import { ALWAYS as j, DEFAULT_ALLOWED_CAPABILITIES as M, NEVER as N, buildRuleCtx as P, describeRule as F, evaluate as I } from "@weasel-js/routing";
7
+ export { j as ALWAYS, M as DEFAULT_ALLOWED_CAPABILITIES, N as NEVER, e as actionIs, t as always, n as and, k as buildChromeCtx, P as buildRuleCtx, r as canHover, i as capabilityAll, a as capabilityIn, o as capabilityIs, s as capabilityNot, c as coarsePointer, l as cond, D as defaultVisibilityRules, F as describeRule, I as evaluate, u as focused, d as gesturing, f as hovering, p as hoveringSelected, m as modeIn, h as modeIs, g as modeNot, _ as modifierHeld, v as multiActive, y as never, b as not, x as or, O as resolveVisibility, S as selectionAtLeast, C as selectionEmpty, w as selectionIs, A as useHoverTracking, T as when, E as zoomAtLeast };
@@ -0,0 +1,23 @@
1
+ import { viewZoom as e } from "../../core/viewport/view.js";
2
+ import { defaultVisibilityRules as t } from "./defaults.js";
3
+ import { DEFAULT_ALLOWED_CAPABILITIES as n, evaluate as r } from "@weasel-js/routing";
4
+ //#region src/features/chrome-caps/resolve.ts
5
+ function i(i, a) {
6
+ let o = i ? {
7
+ ...t,
8
+ ...i
9
+ } : t, s = "mode" in a ? a : {
10
+ ...a,
11
+ zoom: e(a.view),
12
+ mode: "normal",
13
+ allowedCapabilities: n
14
+ };
15
+ return (e) => {
16
+ let t = o[e];
17
+ return t === void 0 ? !0 : typeof t == "function" ? t(s) : r(t, s);
18
+ };
19
+ }
20
+ //#endregion
21
+ export { i as resolveVisibility };
22
+
23
+ //# sourceMappingURL=resolve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve.js","names":["resolveVisibility","merged","consumer","defaultVisibilityRules","ruleCtx","ctx","viewZoom","DEFAULT_ALLOWED_CAPABILITIES","entry","id","evaluate"],"sources":["../../../src/features/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. Merges consumer rules on top\n * of the kit defaults, then closes over `ctx` so each chrome-id\n * lookup runs its rule against the current state.\n *\n * `VisibilityRules` entries may be either fluent `Condition` values\n * (callable) or raw `Rule` trees — we normalize at lookup time.\n *\n * Predicates are O(1) and run once per chrome id per frame; no\n * memoization in v1 — profile before adding any.\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":";;;;AAsBA,SAAgBA,EACd,GACA,GAC2B;CAC3B,IAAMC,IAA0BC,IAC5B;EAAE,GAAGC;EAAwB,GAAGD;CAAS,IACzCC,GACEC,IAAmB,UAAUC,IAC/BA,IACA;EACA,GAAGA;EACH,MAAMC,EAASD,EAAI,IAAI;EACvB,MAAM;EACN,qBAAqBE;CACvB;CACF,QAAQ,MAAO;EACb,IAAMC,IAAQP,EAAOQ;EAGrB,OAFID,MAAU,KAAA,IAAkB,KAC5B,OAAOA,KAAU,aAAmBA,EAAMJ,CAAO,IAC9CM,EAASF,GAAOJ,CAAO;CAChC;AACF"}
@@ -0,0 +1,27 @@
1
+ import { useEffect as e, useRef as t } from "react";
2
+ import { useLatest as n } from "@weasel-js/react";
3
+ //#region src/features/chrome-caps/useHoverTracking.ts
4
+ function r(r) {
5
+ let { canvasRef: i, nodeAtClientPoint: a, enabled: o = !0 } = r, s = t(null), c = n(a);
6
+ return e(() => {
7
+ if (!o) return;
8
+ let e = i.current;
9
+ if (!e) return;
10
+ let t = (e) => {
11
+ s.current = c.current(e.clientX, e.clientY)?.id ?? null;
12
+ }, n = () => {
13
+ s.current = null;
14
+ };
15
+ return e.addEventListener("pointermove", t), e.addEventListener("pointerleave", n), () => {
16
+ e.removeEventListener("pointermove", t), e.removeEventListener("pointerleave", n);
17
+ };
18
+ }, [
19
+ i,
20
+ o,
21
+ c
22
+ ]), () => s.current;
23
+ }
24
+ //#endregion
25
+ export { r as useHoverTracking };
26
+
27
+ //# sourceMappingURL=useHoverTracking.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useHoverTracking.js","names":["useHoverTracking","args","hoverRef","useRef","nodeAtRef","useLatest","nodeAtClientPoint","useEffect","enabled","c","canvasRef","onMove","onLeave"],"sources":["../../../src/features/chrome-caps/useHoverTracking.ts"],"sourcesContent":["/**\n * useHoverTracking — last-hovered NodeId for chrome-caps rules.\n *\n * Attaches a `pointermove` listener to the supplied canvas; on each move it\n * runs the supplied `nodeAtClientPoint` and caches the resulting id on a ref.\n * Cleared on `pointerleave` (pointer left the canvas → nothing is hovered).\n *\n * Returns a stable getter — call once per frame from `buildChromeCtx`.\n *\n * No re-render: the ref updates silently, and the next render that\n * reads it picks up the fresh value. Chrome-caps rules are evaluated\n * during paint, so the hover state is always read fresh.\n */\n\nimport { useEffect, useRef, type RefObject } from 'react';\nimport { useLatest } from '@weasel-js/react';\nimport type { NodeId } from '../../core/scene/types';\n\n/** Options for `useHoverTracking`. */\nexport interface UseHoverTrackingArgs {\n canvasRef: RefObject<HTMLElement | null>;\n /** Topmost id under a client point, or null. One lookup rather than a\n * client→world thunk beside a world-space picker: a screen-pixel pick\n * tolerance converts against the camera the point resolved to, and two\n * thunks are two chances to disagree about which view that is. */\n nodeAtClientPoint: (clientX: number, clientY: number) => { id: NodeId } | null;\n enabled?: boolean;\n}\n\n/** Track which node the pointer is over. Returns a getter rather than state,\n * so per-frame code can read the current value without the hover re-rendering\n * the component on every pointer move. */\nexport function useHoverTracking(args: UseHoverTrackingArgs): () => NodeId | null {\n const { canvasRef, nodeAtClientPoint, enabled = true } = args;\n const hoverRef = useRef<NodeId | null>(null);\n const nodeAtRef = useLatest(nodeAtClientPoint);\n\n useEffect(() => {\n if (!enabled) return;\n const c = canvasRef.current;\n if (!c) return;\n const onMove = (e: PointerEvent) => {\n hoverRef.current = nodeAtRef.current(e.clientX, e.clientY)?.id ?? null;\n };\n const onLeave = () => { hoverRef.current = null; };\n c.addEventListener('pointermove', onMove);\n c.addEventListener('pointerleave', onLeave);\n return () => {\n c.removeEventListener('pointermove', onMove);\n c.removeEventListener('pointerleave', onLeave);\n };\n }, [canvasRef, enabled, nodeAtRef]);\n\n return () => hoverRef.current;\n}\n"],"mappings":";;;AAgCA,SAAgBA,EAAiB,GAAiD;CAChF,IAAM,EAAE,cAAW,sBAAmB,aAAU,OAASC,GACnDC,IAAWC,EAAsB,IAAI,GACrCC,IAAYC,EAAUC,CAAiB;CAkB7C,OAhBAC,QAAgB;EACd,IAAI,CAACC,GAAS;EACd,IAAMC,IAAIC,EAAU;EACpB,IAAI,CAACD,GAAG;EACR,IAAME,KAAU,MAAoB;GAClC,EAAS,UAAUP,EAAU,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,MAAM;EACpE,GACMQ,UAAgB;GAAE,EAAS,UAAU;EAAM;EAGjD,OAFAH,EAAE,iBAAiB,eAAeE,CAAM,GACxCF,EAAE,iBAAiB,gBAAgBG,CAAO,SAC7B;GAEX,AADAH,EAAE,oBAAoB,eAAeE,CAAM,GAC3CF,EAAE,oBAAoB,gBAAgBG,CAAO;EAC/C;CACF,GAAG;EAACF;EAAWF;EAASJ;CAAS,CAAC,SAErBF,EAAS;AACxB"}
@@ -0,0 +1,60 @@
1
+ import { pathFromD as e } from "@weasel-js/geom";
2
+ import { GLYPHS as t, chromeLineWidthScale as n, cursorPaintMatrix as r, cursorPaintOps as i, cursorWorldSize as a } from "@weasel-js/cursor";
3
+ //#region src/features/cursor/paintedCursorLayer.ts
4
+ var o = "painted-cursor", s = /* @__PURE__ */ new Map();
5
+ function c(t) {
6
+ let n = s.get(t);
7
+ return n === void 0 && (n = e(t), s.set(t, n)), n;
8
+ }
9
+ function l(e) {
10
+ return {
11
+ kind: "path",
12
+ path: c(e.d),
13
+ ...e.fill === void 0 ? {} : { fill: { color: e.fill } },
14
+ ...e.stroke === void 0 ? {} : { stroke: {
15
+ paint: { color: e.stroke.color },
16
+ width: e.stroke.width,
17
+ cap: "round",
18
+ join: "round"
19
+ } }
20
+ };
21
+ }
22
+ function u(e) {
23
+ return {
24
+ id: o,
25
+ label: "Painted cursor",
26
+ space: "screen",
27
+ draw: (o, s) => {
28
+ let c = e.current();
29
+ if (!c) return [];
30
+ let { cursor: u, at: d } = c, f = t[u.glyph];
31
+ if (!f) return [];
32
+ let p = (s.scale.x + s.scale.y) / 2, m = u.worldRadius !== void 0, h = m ? a(f, u.worldRadius, p) : u.size ?? 24;
33
+ if (!(h > 0) || !Number.isFinite(h)) return [];
34
+ let g = i(f, m ? { lineWidthScale: n(f, h) } : {}), [_, v, y, b, x, S] = r(f, {
35
+ size: h,
36
+ angle: u.angle,
37
+ at: d
38
+ });
39
+ return [{
40
+ kind: "group",
41
+ transform: new Float32Array([
42
+ _,
43
+ v,
44
+ 0,
45
+ y,
46
+ b,
47
+ 0,
48
+ x,
49
+ S,
50
+ 1
51
+ ]),
52
+ children: g.map(l)
53
+ }];
54
+ }
55
+ };
56
+ }
57
+ //#endregion
58
+ export { o as PAINTED_CURSOR_LAYER_ID, u as createPaintedCursorLayer };
59
+
60
+ //# sourceMappingURL=paintedCursorLayer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paintedCursorLayer.js","names":["PAINTED_CURSOR_LAYER_ID","pathCache","pathFor","p","d","pathFromD","commandFor","op","createPaintedCursorLayer","frame","state","glyph","GLYPHS","cursor","scale","view","worldSized","size","cursorWorldSize","ops","cursorPaintOps","chromeLineWidthScale","a","b","c","e","f","cursorPaintMatrix"],"sources":["../../../src/features/cursor/paintedCursorLayer.ts"],"sourcesContent":["/**\n * The painted tier: draws a cursor glyph into the scene when it is too big,\n * or too tied to the view, to be a CSS `url()` cursor.\n *\n * A layer rather than something each tool draws in its own overlay, because\n * the alternative is every tool re-wiring the same thing. Riding the layer\n * system also means anything that reaches the cursor pipeline through a layer\n * claim — a HUD widget's `cursorAt` — gets the painted tier without knowing\n * this exists.\n *\n * Screen-space: the glyph is chrome at the pointer, not content in the\n * document, so it must not pan or zoom with the camera. What *does* track the\n * camera is a world-sized glyph's size, and `view.scale` is read for that.\n */\n\nimport { GLYPHS } from '@weasel-js/cursor';\nimport {\n chromeLineWidthScale,\n cursorPaintMatrix,\n cursorPaintOps,\n cursorWorldSize,\n} from '@weasel-js/cursor';\nimport type { CursorPaintOp } from '@weasel-js/cursor';\nimport type { DrawCommand, PathDrawCommand } from '../../renderer';\nimport type { RenderLayer } from 'core/layers/render';\nimport { pathFromD, type Path } from '@weasel-js/geom';\nimport type { PaintedCursorState } from '@weasel-js/cursor';\n\n/** Layer id, so a consumer can order or hide it like any other. */\nexport const PAINTED_CURSOR_LAYER_ID = 'painted-cursor';\n\n/**\n * `d` strings are fixed by the glyph set, so the parse is done once per glyph\n * member for the life of the process. Handing the renderer the same `Path`\n * object every frame also lets its own mesh cache hit.\n */\nconst pathCache = new Map<string, Path>();\nfunction pathFor(d: string): Path {\n let p = pathCache.get(d);\n if (p === undefined) {\n p = pathFromD(d);\n pathCache.set(d, p);\n }\n return p;\n}\n\nfunction commandFor(op: CursorPaintOp): PathDrawCommand {\n return {\n kind: 'path',\n path: pathFor(op.d),\n ...(op.fill !== undefined ? { fill: { color: op.fill } } : {}),\n ...(op.stroke !== undefined\n ? {\n stroke: {\n paint: { color: op.stroke.color },\n width: op.stroke.width,\n cap: 'round' as const,\n join: 'round' as const,\n },\n }\n : {}),\n };\n}\n\n/**\n * A screen-space layer that draws the glyph `state` currently holds at the pointer,\n * or nothing when it holds none. `<Canvas>` mounts one over its own state already.\n */\nexport function createPaintedCursorLayer(state: PaintedCursorState): RenderLayer<unknown> {\n return {\n id: PAINTED_CURSOR_LAYER_ID,\n label: 'Painted cursor',\n space: 'screen',\n draw: (_data, view) => {\n const frame = state.current();\n if (!frame) return [];\n const { cursor, at } = frame;\n const glyph = GLYPHS[cursor.glyph];\n if (!glyph) return [];\n\n // A world-sized glyph is measured against the live camera, and holds its\n // line weight in CSS px while its geometry grows — a ring at a 400px\n // radius drawn with scaled weight is a filled blob, not a cursor.\n // Radial, so a single radius needs one scale factor; average the axes.\n const scale = (view.scale.x + view.scale.y) / 2;\n const worldSized = cursor.worldRadius !== undefined;\n const size = worldSized\n ? cursorWorldSize(glyph, cursor.worldRadius as number, scale)\n : (cursor.size ?? 24);\n if (!(size > 0) || !Number.isFinite(size)) return [];\n\n const ops = cursorPaintOps(\n glyph,\n worldSized ? { lineWidthScale: chromeLineWidthScale(glyph, size) } : {},\n );\n const [a, b, c, d, e, f] = cursorPaintMatrix(glyph, {\n size,\n angle: cursor.angle,\n at,\n });\n // Column-major, the layout `Mat3` documents.\n const transform = new Float32Array([a, b, 0, c, d, 0, e, f, 1]);\n const children: DrawCommand[] = ops.map(commandFor);\n return [{ kind: 'group', transform, children }];\n },\n };\n}\n"],"mappings":";;;AA6BA,IAAaA,IAA0B,kBAOjCC,oBAAY,IAAI,IAAkB;AACxC,SAASC,EAAQ,GAAiB;CAChC,IAAIC,IAAIF,EAAU,IAAIG,CAAC;CAKvB,OAJID,MAAM,KAAA,MACR,IAAIE,EAAUD,CAAC,GACfH,EAAU,IAAIG,GAAGD,CAAC,IAEbA;AACT;AAEA,SAASG,EAAW,GAAoC;CACtD,OAAO;EACL,MAAM;EACN,MAAMJ,EAAQK,EAAG,CAAC;EAClB,GAAIA,EAAG,SAAS,KAAA,IAA2C,CAAC,IAAhC,EAAE,MAAM,EAAE,OAAOA,EAAG,KAAK,EAAE;EACvD,GAAIA,EAAG,WAAW,KAAA,IASd,CAAC,IARD,EACE,QAAQ;GACN,OAAO,EAAE,OAAOA,EAAG,OAAO,MAAM;GAChC,OAAOA,EAAG,OAAO;GACjB,KAAK;GACL,MAAM;EACR,EACF;CAEN;AACF;AAMA,SAAgBC,EAAyB,GAAiD;CACxF,OAAO;EACL,IAAIR;EACJ,OAAO;EACP,OAAO;EACP,OAAO,GAAO,MAAS;GACrB,IAAMS,IAAQC,EAAM,QAAQ;GAC5B,IAAI,CAACD,GAAO,OAAO,CAAC;GACpB,IAAM,EAAE,WAAQ,UAAOA,GACjBE,IAAQC,EAAOC,EAAO;GAC5B,IAAI,CAACF,GAAO,OAAO,CAAC;GAMpB,IAAMG,KAASC,EAAK,MAAM,IAAIA,EAAK,MAAM,KAAK,GACxCC,IAAaH,EAAO,gBAAgB,KAAA,GACpCI,IAAOD,IACTE,EAAgBP,GAAOE,EAAO,aAAuBC,CAAK,IACzDD,EAAO,QAAQ;GACpB,IAAI,EAAEI,IAAO,MAAM,CAAC,OAAO,SAASA,CAAI,GAAG,OAAO,CAAC;GAEnD,IAAME,IAAMC,EACVT,GACAK,IAAa,EAAE,gBAAgBK,EAAqBV,GAAOM,CAAI,EAAE,IAAI,CAAC,CACxE,GACM,CAACK,GAAGC,GAAGC,GAAGpB,GAAGqB,GAAGC,KAAKC,EAAkBhB,GAAO;IAClD;IACA,OAAOE,EAAO;IACd;GACF,CAAC;GAID,OAAO,CAAC;IAAE,MAAM;IAAS,WAAA,IAFH,aAAa;KAACS;KAAGC;KAAG;KAAGC;KAAGpB;KAAG;KAAGqB;KAAGC;KAAG;IAAC,CAEpC;IAAW,UADJP,EAAI,IAAIb,CACJ;GAAS,CAAC;EAChD;CACF;AACF"}
@@ -0,0 +1,14 @@
1
+ import { subscribeToSources as e } from "../../core/layers/render.js";
2
+ //#region src/features/focus/gateLayer.ts
3
+ function t(t) {
4
+ let { layer: n, visible: r } = t, i = {
5
+ id: n.id,
6
+ label: n.label,
7
+ draw: (e, t, i) => r() ? n.draw(e, t, i) : []
8
+ };
9
+ return n.defaultVisible !== void 0 && (i.defaultVisible = n.defaultVisible), n.alwaysOn !== void 0 && (i.alwaysOn = n.alwaysOn), n.space !== void 0 && (i.space = n.space), n.subscribe && (i.subscribe = e([n])), i;
10
+ }
11
+ //#endregion
12
+ export { t as gateLayer };
13
+
14
+ //# sourceMappingURL=gateLayer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gateLayer.js","names":["gateLayer","opts","wrapped","layer","visible","data","view","dims","subscribeToSources"],"sources":["../../../src/features/focus/gateLayer.ts"],"sourcesContent":["/**\n * `RenderLayer` wrapper that conditionally emits draw commands based on a\n * predicate. Most common use: hide selection-overlay handles when the\n * canvas isn't focused.\n *\n * The predicate is a getter (`() => boolean`), not a static value, because\n * RenderLayers are constructed once but their `draw` runs every frame —\n * a static value would lock in whatever the predicate returned at\n * construction time.\n */\nimport { subscribeToSources, type RenderLayer } from 'core/layers/render';\n\n/** Options for `gateLayer`. */\nexport interface GateLayerOptions<TData> {\n /** The wrapped layer. Its `id`, `label`, `defaultVisible`, `alwaysOn`,\n * `space` flow through unchanged. */\n layer: RenderLayer<TData>;\n /** Returns `true` to render the layer this frame, `false` to skip. */\n visible: () => boolean;\n}\n\n/** Wrap a render layer so it only draws while `visible()` is true. The\n * predicate is consulted per frame, which is how chrome follows canvas focus\n * without the layer knowing anything about focus. */\nexport function gateLayer<TData>(opts: GateLayerOptions<TData>): RenderLayer<TData> {\n const { layer, visible } = opts;\n const wrapped: RenderLayer<TData> = {\n id: layer.id,\n label: layer.label,\n draw: (data, view, dims) => (visible() ? layer.draw(data, view, dims) : []),\n };\n if (layer.defaultVisible !== undefined) wrapped.defaultVisible = layer.defaultVisible;\n if (layer.alwaysOn !== undefined) wrapped.alwaysOn = layer.alwaysOn;\n if (layer.space !== undefined) wrapped.space = layer.space;\n if (layer.subscribe) wrapped.subscribe = subscribeToSources([layer]);\n return wrapped;\n}\n"],"mappings":";;AAwBA,SAAgBA,EAAiB,GAAmD;CAClF,IAAM,EAAE,UAAO,eAAYC,GACrBC,IAA8B;EAClC,IAAIC,EAAM;EACV,OAAOA,EAAM;EACb,OAAO,GAAM,GAAM,MAAUC,EAAQ,IAAID,EAAM,KAAKE,GAAMC,GAAMC,CAAI,IAAI,CAAC;CAC3E;CAKA,OAJIJ,EAAM,mBAAmB,KAAA,MAAW,EAAQ,iBAAiBA,EAAM,iBACnEA,EAAM,aAAa,KAAA,MAAW,EAAQ,WAAWA,EAAM,WACvDA,EAAM,UAAU,KAAA,MAAW,EAAQ,QAAQA,EAAM,QACjDA,EAAM,cAAW,EAAQ,YAAYK,EAAmB,CAACL,CAAK,CAAC,IAC5DD;AACT"}
@@ -0,0 +1,29 @@
1
+ import { useCallback as e, useMemo as t, useRef as n, useState as r } from "react";
2
+ //#region src/features/focus/useCanvasFocus.ts
3
+ function i(i = {}) {
4
+ let { initial: a = !1, tabIndex: o = 0 } = i, [s, c] = r(a), l = n(a), u = e(() => {
5
+ l.current || (l.current = !0, c(!0));
6
+ }, []), d = e(() => {
7
+ l.current && (l.current = !1, c(!1));
8
+ }, []), f = e(() => l.current, []), p = e((e) => {
9
+ l.current !== e && (l.current = e, c(e));
10
+ }, []);
11
+ return {
12
+ focused: s,
13
+ focusProps: t(() => ({
14
+ tabIndex: o,
15
+ onFocus: u,
16
+ onBlur: d
17
+ }), [
18
+ o,
19
+ u,
20
+ d
21
+ ]),
22
+ getFocused: f,
23
+ setFocused: p
24
+ };
25
+ }
26
+ //#endregion
27
+ export { i as useCanvasFocus };
28
+
29
+ //# sourceMappingURL=useCanvasFocus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCanvasFocus.js","names":["useCanvasFocus","options","focused","setFocusedState","useState","initial","focusedRef","useRef","onFocus","useCallback","onBlur","getFocused","setFocused","next","useMemo","tabIndex"],"sources":["../../../src/features/focus/useCanvasFocus.ts"],"sourcesContent":["/**\n * Track DOM focus on a canvas (or any focusable host element). Returns the\n * live `focused` boolean, props to spread onto the focusable element, and a\n * stable `getFocused()` getter for use inside per-frame closures (notably\n * `RenderLayer.draw`, which is constructed once but called every frame).\n *\n * Pure feature module — no Canvas/SceneCanvas integration. Consumers compose\n * the hook + `gateLayer` (or their own gate) to hide affordances when blurred.\n */\nimport { useCallback, useMemo, useRef, useState } from 'react';\n\n/** Options for `useCanvasFocus`. */\nexport interface UseCanvasFocusOptions {\n /** Initial focus state. Default `false` — handles hidden until first click. */\n initial?: boolean;\n /** `tabIndex` to set on the focusable element. Default `0` (focusable in\n * document tab order). Set to `-1` for programmatic-only focus. */\n tabIndex?: number;\n}\n\n/** What `useCanvasFocus` hands back: the focus state, the props that\n * maintain it, and a getter for reading it from per-frame code. */\nexport interface CanvasFocusReturn {\n /** Live boolean — true when the element has DOM focus. Triggers re-renders\n * when the focus state changes (set via React state). */\n focused: boolean;\n /** Spread onto the focusable element (e.g. the canvas). Includes\n * `tabIndex`, `onFocus`, `onBlur`. */\n focusProps: {\n tabIndex: number;\n onFocus: () => void;\n onBlur: () => void;\n };\n /** Stable getter for the live focused state. Use inside per-frame closures\n * like `RenderLayer.draw`, where the layer is constructed once and\n * reading `focused` directly would capture the value at construction\n * time. The getter always returns the current value. */\n getFocused: () => boolean;\n /** Imperative focus / blur. Useful for tests and programmatic control. */\n setFocused: (next: boolean) => void;\n}\n\n/** Track DOM focus on the canvas, so chrome that should only show while the\n * canvas is focused can be gated on it. */\nexport function useCanvasFocus(options: UseCanvasFocusOptions = {}): CanvasFocusReturn {\n const { initial = false, tabIndex = 0 } = options;\n const [focused, setFocusedState] = useState<boolean>(initial);\n // Every state change goes through a handler below that writes this first.\n const focusedRef = useRef<boolean>(initial);\n\n const onFocus = useCallback(() => {\n if (!focusedRef.current) {\n focusedRef.current = true;\n setFocusedState(true);\n }\n }, []);\n const onBlur = useCallback(() => {\n if (focusedRef.current) {\n focusedRef.current = false;\n setFocusedState(false);\n }\n }, []);\n const getFocused = useCallback(() => focusedRef.current, []);\n const setFocused = useCallback((next: boolean) => {\n if (focusedRef.current === next) return;\n focusedRef.current = next;\n setFocusedState(next);\n }, []);\n\n // Stable until tabIndex changes, so it can be spread onto memoized elements\n // without retriggering downstream effects.\n const focusProps = useMemo(() => ({ tabIndex, onFocus, onBlur }), [tabIndex, onFocus, onBlur]);\n\n return {\n focused,\n focusProps,\n getFocused,\n setFocused,\n };\n}\n"],"mappings":";;AA4CA,SAAgBA,EAAe,IAAiC,CAAC,GAAsB;CACrF,IAAM,EAAE,aAAU,IAAO,cAAW,MAAMC,GACpC,CAACC,GAASC,KAAmBC,EAAkBC,CAAO,GAEtDC,IAAaC,EAAgBF,CAAO,GAEpCG,IAAUC,QAAkB;EAChC,AAAKH,EAAW,YACd,EAAW,UAAU,IACrBH,EAAgB,EAAI;CAExB,GAAG,CAAC,CAAC,GACCO,IAASD,QAAkB;EAC/B,AAAIH,EAAW,YACb,EAAW,UAAU,IACrBH,EAAgB,EAAK;CAEzB,GAAG,CAAC,CAAC,GACCQ,IAAaF,QAAkBH,EAAW,SAAS,CAAC,CAAC,GACrDM,IAAaH,GAAa,MAAkB;EAChD,AAAIH,EAAW,YAAYO,MAC3B,EAAW,UAAUA,GACrBV,EAAgBU,CAAI;CACtB,GAAG,CAAC,CAAC;CAML,OAAO;EACL;EACA,YAJiBC,SAAe;GAAE;GAAU;GAAS;EAAO,IAAI;GAACC;GAAUP;GAASE;EAAM,CAI1F;EACA;EACA;CACF;AACF"}
@@ -0,0 +1,23 @@
1
+ //#region src/features/groups/children.ts
2
+ function e(e) {
3
+ return {
4
+ id: e.id ?? "children",
5
+ label: e.label ?? "Children",
6
+ defaultVisible: e.defaultVisible,
7
+ alwaysOn: e.alwaysOn,
8
+ draw: (t, n) => {
9
+ let r = e.adapter.getChildren;
10
+ if (!r) return [];
11
+ let i = r(typeof e.parentId == "function" ? e.parentId() : e.parentId ?? null), a = [];
12
+ for (let r of i) {
13
+ let i = e.drawChild(r, t, n);
14
+ for (let e of i) a.push(e);
15
+ }
16
+ return a;
17
+ }
18
+ };
19
+ }
20
+ //#endregion
21
+ export { e as createChildrenLayer };
22
+
23
+ //# sourceMappingURL=children.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"children.js","names":["createChildrenLayer","opts","getChildren","ids","out","id","sub","data","view","cmd"],"sources":["../../../src/features/groups/children.ts"],"sourcesContent":["/**\n * Z-ordered child renderer — replaces the manual `for (id of getChildren()) ...`\n * pattern with a `RenderLayer` factory that consumes an `OrderedAdapter`.\n *\n * Children are drawn in z-order (forward iteration: index 0 = bottom). The\n * caller supplies a `drawChild` callback that emits `DrawCommand[]` for one\n * object; this layer is the boilerplate-free way to plug a scene graph's\n * z-order into the layer composition system.\n *\n * If the adapter doesn't implement `getChildren` (it's optional on\n * `OrderedAdapter`), the layer is a silent no-op — adopt z-order incrementally\n * without breaking existing layers.\n */\n\nimport type { DrawCommand } from '../../renderer';\nimport type { RenderLayer } from 'core/layers/render';\nimport type { View } from 'core/viewport/view';\nimport type { OrderedAdapter } from 'core/adapters/types';\n\n/** Options for `createChildrenLayer`. */\nexport interface CreateChildrenLayerOpts<TData> {\n /** Layer id for the visibility/order map. Default `'children'`. */\n id?: string;\n /** Human-readable label. Default `'Children'`. */\n label?: string;\n /** Source of `getChildren`. Only the read side is used. */\n adapter: Pick<OrderedAdapter, 'getChildren'>;\n /** Parent id (null = root). Function form lets the layer follow a moving\n * selection or focus. Default `null`. */\n parentId?: string | null | (() => string | null);\n /** Draw one child. Called once per id in z-order (bottom → top). The\n * per-child outputs are concatenated into the layer's `DrawCommand[]`. */\n drawChild(id: string, data: TData, view: View): DrawCommand[];\n /** Forwarded to the produced `RenderLayer`. */\n defaultVisible?: boolean;\n /** Forwarded to the produced `RenderLayer`. */\n alwaysOn?: boolean;\n}\n\n/** Build a `RenderLayer` that draws an `OrderedAdapter`'s children in z-order. */\nexport function createChildrenLayer<TData = unknown>(\n opts: CreateChildrenLayerOpts<TData>,\n): RenderLayer<TData> {\n return {\n id: opts.id ?? 'children',\n label: opts.label ?? 'Children',\n defaultVisible: opts.defaultVisible,\n alwaysOn: opts.alwaysOn,\n draw: (data, view) => {\n const getChildren = opts.adapter.getChildren;\n if (!getChildren) return [];\n const parent =\n typeof opts.parentId === 'function'\n ? opts.parentId()\n : opts.parentId ?? null;\n const ids = getChildren(parent);\n const out: DrawCommand[] = [];\n for (const id of ids) {\n const sub = opts.drawChild(id, data, view);\n for (const cmd of sub) out.push(cmd);\n }\n return out;\n },\n };\n}\n"],"mappings":";AAwCA,SAAgBA,EACd,GACoB;CACpB,OAAO;EACL,IAAIC,EAAK,MAAM;EACf,OAAOA,EAAK,SAAS;EACrB,gBAAgBA,EAAK;EACrB,UAAUA,EAAK;EACf,OAAO,GAAM,MAAS;GACpB,IAAMC,IAAcD,EAAK,QAAQ;GACjC,IAAI,CAACC,GAAa,OAAO,CAAC;GAK1B,IAAMC,IAAMD,EAHV,OAAOD,EAAK,YAAa,aACrBA,EAAK,SAAS,IACdA,EAAK,YAAY,IACO,GACxBG,IAAqB,CAAC;GAC5B,KAAK,IAAMC,KAAMF,GAAK;IACpB,IAAMG,IAAML,EAAK,UAAUI,GAAIE,GAAMC,CAAI;IACzC,KAAK,IAAMC,KAAOH,GAAK,EAAI,KAAKG,CAAG;GACrC;GACA,OAAOL;EACT;CACF;AACF"}
@@ -0,0 +1,67 @@
1
+ import { IDENTITY_POSE_COMPOSITION as e, composeWorldPose as t, frameAtOrAbove as n, rebaseLocalPose as r } from "../../core/scene/composeFrame.js";
2
+ //#region src/features/groups/composePose.ts
3
+ function i(e, t) {
4
+ return {
5
+ ...t,
6
+ x: e.x + t.x,
7
+ y: e.y + t.y
8
+ };
9
+ }
10
+ function a(e, t, n) {
11
+ return {
12
+ ...e,
13
+ x: e.x + t,
14
+ y: e.y + n
15
+ };
16
+ }
17
+ function o(e, t) {
18
+ return {
19
+ ...t,
20
+ x: t.x - e.x,
21
+ y: t.y - e.y
22
+ };
23
+ }
24
+ function s(e, t, n, r, i) {
25
+ let a = Math.cos(n), o = Math.sin(n);
26
+ return [e + (r - e) * a - (i - t) * o, t + (r - e) * o + (i - t) * a];
27
+ }
28
+ function c(e, t) {
29
+ let n = e.rotation ?? 0, [r, i] = s(e.x + e.width / 2, e.y + e.height / 2, n, e.x + t.x + t.width / 2, e.y + t.y + t.height / 2);
30
+ return {
31
+ ...t,
32
+ x: r - t.width / 2,
33
+ y: i - t.height / 2,
34
+ rotation: (t.rotation ?? 0) + n
35
+ };
36
+ }
37
+ function l(e, t) {
38
+ let n = e.rotation ?? 0, [r, i] = s(e.x + e.width / 2, e.y + e.height / 2, -n, t.x + t.width / 2, t.y + t.height / 2);
39
+ return {
40
+ ...t,
41
+ x: r - e.x - t.width / 2,
42
+ y: i - e.y - t.height / 2,
43
+ rotation: (t.rotation ?? 0) - n
44
+ };
45
+ }
46
+ var u = {
47
+ compose: i,
48
+ decompose: o,
49
+ closure: "translation"
50
+ }, d = {
51
+ compose: c,
52
+ decompose: l,
53
+ closure: "rigid"
54
+ };
55
+ function f(e, n) {
56
+ return (r) => {
57
+ try {
58
+ return t(e, r, n);
59
+ } catch {
60
+ return null;
61
+ }
62
+ };
63
+ }
64
+ //#endregion
65
+ export { e as IDENTITY_POSE_COMPOSITION, u as RECT_POSE_COMPOSITION, d as RIGID_POSE_COMPOSITION, i as composeRectPose, c as composeRigidPose, t as composeWorldPose, o as decomposeRectPose, l as decomposeRigidPose, n as frameAtOrAbove, r as rebaseLocalPose, a as translateRectPose, f as worldPoseLookup };
66
+
67
+ //# sourceMappingURL=composePose.js.map