@weasel-js/core 1.6.1 → 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 (1005) hide show
  1. package/CHANGELOG.md +1006 -0
  2. package/README.md +28 -9
  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-HWyuLzE-.d.ts → builtins-BSUfH8nU.d.ts} +1301 -508
  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-7mCcm6qG.d.ts → cornerHandles-CDcZOV8h.d.ts} +54 -71
  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 -86
  601. package/dist/index.d.ts +2349 -2609
  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 -48
  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 +18 -20
  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.d.ts +1 -1
  902. package/dist/routing.js +2 -3
  903. package/dist/scheduling/useVisibleRaf.js +69 -0
  904. package/dist/scheduling/useVisibleRaf.js.map +1 -0
  905. package/dist/test-hook/createTestHook.js +39 -0
  906. package/dist/test-hook/createTestHook.js.map +1 -0
  907. package/dist/test-hook/install.js +12 -0
  908. package/dist/test-hook/install.js.map +1 -0
  909. package/dist/test-seams-fYf6m5pu.d.ts +356 -0
  910. package/dist/test-seams.d.ts +6 -0
  911. package/dist/test-seams.js +3 -0
  912. package/dist/tools/builtin/ellipse/useEllipseTool.js +33 -0
  913. package/dist/tools/builtin/ellipse/useEllipseTool.js.map +1 -0
  914. package/dist/tools/builtin/eyedropper/useEyedropperTool.js +55 -0
  915. package/dist/tools/builtin/eyedropper/useEyedropperTool.js.map +1 -0
  916. package/dist/tools/builtin/hand/dragPanContribution.js +17 -0
  917. package/dist/tools/builtin/hand/dragPanContribution.js.map +1 -0
  918. package/dist/tools/builtin/hand/useHandTool.js +31 -0
  919. package/dist/tools/builtin/hand/useHandTool.js.map +1 -0
  920. package/dist/tools/builtin/image/useImageTool.js +41 -0
  921. package/dist/tools/builtin/image/useImageTool.js.map +1 -0
  922. package/dist/tools/builtin/lasso/useLassoTool.js +42 -0
  923. package/dist/tools/builtin/lasso/useLassoTool.js.map +1 -0
  924. package/dist/tools/builtin/line/useLineTool.js +33 -0
  925. package/dist/tools/builtin/line/useLineTool.js.map +1 -0
  926. package/dist/tools/builtin/pen/usePenTool.js +414 -0
  927. package/dist/tools/builtin/pen/usePenTool.js.map +1 -0
  928. package/dist/tools/builtin/pencil/usePencilTool.js +36 -0
  929. package/dist/tools/builtin/pencil/usePencilTool.js.map +1 -0
  930. package/dist/tools/builtin/pickTopMostHit.js +45 -0
  931. package/dist/tools/builtin/pickTopMostHit.js.map +1 -0
  932. package/dist/tools/builtin/polygon/usePolygonTool.js +81 -0
  933. package/dist/tools/builtin/polygon/usePolygonTool.js.map +1 -0
  934. package/dist/tools/builtin/rect/useRectTool.js +32 -0
  935. package/dist/tools/builtin/rect/useRectTool.js.map +1 -0
  936. package/dist/tools/builtin/select/selectionContributions.js +109 -0
  937. package/dist/tools/builtin/select/selectionContributions.js.map +1 -0
  938. package/dist/tools/builtin/select/useSelectTool.js +162 -0
  939. package/dist/tools/builtin/select/useSelectTool.js.map +1 -0
  940. package/dist/tools/builtin/shared/insertToolOptions.js +8 -0
  941. package/dist/tools/builtin/shared/insertToolOptions.js.map +1 -0
  942. package/dist/tools/builtin/slice/useSliceTool.js +263 -0
  943. package/dist/tools/builtin/slice/useSliceTool.js.map +1 -0
  944. package/dist/tools/builtin/star/useStarTool.js +82 -0
  945. package/dist/tools/builtin/star/useStarTool.js.map +1 -0
  946. package/dist/tools/builtin/text/useTextTool.js +177 -0
  947. package/dist/tools/builtin/text/useTextTool.js.map +1 -0
  948. package/dist/tools/overlayBinding.js +8 -0
  949. package/dist/tools/overlayBinding.js.map +1 -0
  950. package/dist/tools/prefs.js +47 -0
  951. package/dist/tools/prefs.js.map +1 -0
  952. package/dist/tools/useKeybindings.js +66 -0
  953. package/dist/tools/useKeybindings.js.map +1 -0
  954. package/dist/{types-CxC8P6W0.d.ts → types-CA54-mAZ.d.ts} +188 -17
  955. package/dist/{types-D_74YlWs.d.ts → types-DSjd6W3n.d.ts} +35 -12
  956. package/dist/util/color.js +26 -0
  957. package/dist/util/color.js.map +1 -0
  958. package/dist/util/constrainTo45.js +17 -0
  959. package/dist/util/constrainTo45.js.map +1 -0
  960. package/dist/util/paint.js +72 -0
  961. package/dist/util/paint.js.map +1 -0
  962. package/dist/version.js +6 -0
  963. package/dist/version.js.map +1 -0
  964. package/package.json +31 -18
  965. package/dist/chunk-44EWMJV2.js +0 -128
  966. package/dist/chunk-44EWMJV2.js.map +0 -1
  967. package/dist/chunk-4RJP2N2L.js +0 -143
  968. package/dist/chunk-4RJP2N2L.js.map +0 -1
  969. package/dist/chunk-BJN5ZRIJ.js +0 -167
  970. package/dist/chunk-BJN5ZRIJ.js.map +0 -1
  971. package/dist/chunk-D4AAWR64.js +0 -28
  972. package/dist/chunk-D4AAWR64.js.map +0 -1
  973. package/dist/chunk-DOBSZOPR.js +0 -29
  974. package/dist/chunk-DOBSZOPR.js.map +0 -1
  975. package/dist/chunk-H6N2JSZ3.js +0 -248
  976. package/dist/chunk-H6N2JSZ3.js.map +0 -1
  977. package/dist/chunk-HPFJUUTF.js +0 -167
  978. package/dist/chunk-HPFJUUTF.js.map +0 -1
  979. package/dist/chunk-L5YNZYEG.js +0 -648
  980. package/dist/chunk-L5YNZYEG.js.map +0 -1
  981. package/dist/chunk-MZAIDI6D.js +0 -32492
  982. package/dist/chunk-MZAIDI6D.js.map +0 -1
  983. package/dist/chunk-PNNZSYRD.js +0 -318
  984. package/dist/chunk-PNNZSYRD.js.map +0 -1
  985. package/dist/chunk-RMR4QMM6.js +0 -250
  986. package/dist/chunk-RMR4QMM6.js.map +0 -1
  987. package/dist/clipboard.js.map +0 -1
  988. package/dist/clone.js.map +0 -1
  989. package/dist/grid-BXdz8GF2.d.ts +0 -158
  990. package/dist/index.css.map +0 -1
  991. package/dist/index.js.map +0 -1
  992. package/dist/insert.d.ts +0 -37
  993. package/dist/insert.js +0 -81
  994. package/dist/insert.js.map +0 -1
  995. package/dist/math.js.map +0 -1
  996. package/dist/move.js.map +0 -1
  997. package/dist/options-CzjxFoYZ.d.ts +0 -67
  998. package/dist/path-JEV2c5If.d.ts +0 -48
  999. package/dist/patterns-builtin.js.map +0 -1
  1000. package/dist/renderer.css +0 -86
  1001. package/dist/renderer.css.map +0 -1
  1002. package/dist/renderer.js.map +0 -1
  1003. package/dist/resize.js.map +0 -1
  1004. package/dist/routing.js.map +0 -1
  1005. package/dist/types-D2tTKEU0.d.ts +0 -18
package/README.md CHANGED
@@ -28,12 +28,30 @@ npm install @weasel-js/core react
28
28
 
29
29
  `useScene` holds the scene: a tree of leaf and container nodes, each carrying your data and a pose. Every change to it is an **op**, which is what makes it undoable. `<SceneCanvas>` renders a scene and routes input to it.
30
30
 
31
+ A bare `<SceneCanvas>` only renders. It keeps a selection that nothing sets from input, and it routes any bindings you add, but it has no tools, no standard actions, no keys and no selection chrome. Behavior comes from presets named in `features`, each independent of the others:
32
+
33
+ | Preset | Turns on |
34
+ |---|---|
35
+ | `view` | wheel pan and zoom, pinch, the zoom keys, the hand tool (H, or hold Space). Passing `viewport` implies it. |
36
+ | `pick` | the select tool, active from the start: click to pick, drag on empty to marquee, click on empty to clear; the selection outline |
37
+ | `move` | drag a body to move it, Alt-drag to clone — under any tool that leaves the drag unclaimed |
38
+ | `transform` | resize and rotation handles |
39
+ | `edit` | undo/redo, delete, duplicate, group/ungroup, nudge, select-all, Escape, cut/copy/paste, fill and stroke, and their keys |
40
+ | `arrange` | align, distribute, reorder, flip |
41
+ | `paths` | pathfinder operations, path editing and anchor editing |
42
+ | `ingest` | dropped and pasted content |
43
+ | `draw` | all of the above |
44
+
45
+ `defaultTools` adds built-in tools on top, and each brings the actions it binds: `defaultTools={['rect']}` brings `insert`.
46
+
31
47
  Interactions are **actions** — descriptors registered into an actions registry — reached by **gesture bindings**. A tool is a list of `{ spec, actionId }` pairs and nothing more; the kit's own select, shape and viewport tools are built that way.
32
48
 
33
49
  ```tsx
34
- import { SceneCanvas, useScene, useSelection, gridSnapStrategy, type RectPose } from '@weasel-js/core';
50
+ import { SceneCanvas, BUILTIN_TOOL_IDS, useScene, useSelection, type RectPose } from '@weasel-js/core';
51
+ import { createGridLayer, gridSnapStrategy } from '@weasel-js/guides';
35
52
 
36
53
  const W = 800, H = 600;
54
+ const grid = createGridLayer({ spacing: 20, bounds: () => ({ x: 0, y: 0, width: W, height: H }) });
37
55
 
38
56
  export function Editor() {
39
57
  const scene = useScene({ systemLayers: [{ id: 'default' }], initial: [] });
@@ -48,12 +66,10 @@ export function Editor() {
48
66
  height={H}
49
67
  scene={scene}
50
68
  selection={selection}
51
- selectionMode="multi"
52
- toolBundle="exhaustive"
69
+ features={['draw']}
70
+ defaultTools={BUILTIN_TOOL_IDS}
53
71
  selectTool={{ snap: gridSnapStrategy<RectPose>(20) }}
54
- layers={{
55
- grid: { spacing: 20, bounds: () => ({ x: 0, y: 0, width: W, height: H }) },
56
- }}
72
+ layers={{ grid: { layer: grid } }}
57
73
  />
58
74
  );
59
75
  }
@@ -71,7 +87,7 @@ Lower-level surfaces take a narrow **adapter** instead of a scene — a few meth
71
87
 
72
88
  An `Action` is a named operation — `delete`, `duplicate`, `group`, `insert`, `viewport.dragPan` — paired with the input that triggers it. `<ActionsProvider>` holds the registered descriptors, and the gesture dispatcher matches live input against each one's `defaultBinding` and the active tool's bindings. Keystrokes and pointer gestures take the same path, so a keyboard shortcut and a drag are two bindings on one action rather than two mechanisms.
73
89
 
74
- `<SceneCanvas>` mounts a provider when none is above it and registers the kit-standard actions: escape, select-all, delete, duplicate, group and ungroup, undo and redo, flip, nudge, reorder, align, distribute, the pathfinder booleans, path-anchor editing, fill and stroke, clipboard, and the pointer-driven move, resize, rotate, insert, clone, area-select and lasso.
90
+ `<SceneCanvas>` mounts a provider when none is above it and registers the kit-standard actions its `features` presets name — under `draw`, all of them: escape, select-all, delete, duplicate, group and ungroup, undo and redo, flip, nudge, reorder, align, distribute, the pathfinder booleans, path-anchor editing, fill and stroke, clipboard, and the pointer-driven move, resize, rotate, clone, area-select and lasso. `FEATURE_ACTION_IDS` lists which preset registers which. `insert` comes with the shape tools that bind it.
75
91
 
76
92
  ```tsx
77
93
  <SceneCanvas
@@ -79,6 +95,7 @@ An `Action` is a named operation — `delete`, `duplicate`, `group`, `insert`, `
79
95
  height={H}
80
96
  scene={scene}
81
97
  selection={selection}
98
+ features={['draw']}
82
99
  actions={{
83
100
  duplicate: null, // drop the default
84
101
  'app.publish': { // add your own
@@ -95,7 +112,7 @@ An `Action` is a named operation — `delete`, `duplicate`, `group`, `insert`, `
95
112
  />
96
113
  ```
97
114
 
98
- The `actions` prop takes `null` to unregister every default, or a record keyed by action id. Each value is `null` to drop that one id, a partial `Action` to merge onto the default of the same id, or a complete `Action` to register a new one.
115
+ The `actions` prop applies on top of what the presets registered. It takes `null` to unregister every default, or a record keyed by action id. Each value is `null` to drop that one id, a partial `Action` to merge onto the default of the same id, or a complete `Action` to register a new one.
99
116
 
100
117
  An action does its work through `invoker`, not a bare callback. `{ timing: 'immediate' }` runs once; `{ timing: 'ongoing' }` returns a handle so a drag can preview while it moves and commit at the end. The deps an invoker reads (`selection`, `scene`, `applyOps`, …) are declared in `requires` and resolved at invocation time, which is what lets a consumer swap one — see `useDepSource`. To fire an action yourself, wrap the canvas in your own `<ActionsProvider>` and call `trigger(id, params)` on the registry `useActionsRegistry()` returns.
101
118
 
@@ -148,7 +165,7 @@ Core's main entry carries the everyday surface. A few narrower ones have their o
148
165
  | Import | Holds |
149
166
  |---|---|
150
167
  | `@weasel-js/core/renderer` | the renderer, `registerProgram`, `registerTexture`, draw commands |
151
- | `@weasel-js/core/move`, `/resize`, `/insert`, `/clone`, `/clipboard` | helpers for building on those actions, e.g. `snapToGrid`, `clampMinSize` |
168
+ | `@weasel-js/core/move`, `/resize`, `/clone`, `/clipboard` | helpers for building on those actions, e.g. `snapBackOrDelete`, `clampMinSize` |
152
169
  | `@weasel-js/core/patterns-builtin` | the built-in fill patterns |
153
170
  | `@weasel-js/core/routing` | route grammar and introspection: parsing, the route registry, conflict checks |
154
171
 
@@ -162,6 +179,7 @@ Every package is published under `@weasel-js` and released together at one versi
162
179
  | `geom` | pure 2D geometry — affine, box, curve, polyline; polygon booleans under `./booleans` |
163
180
  | `gestures` | the gesture taxonomy, route grammars and matchers; no React, no DOM |
164
181
  | `history` | undo/redo with scoped sub-histories; no React, no DOM |
182
+ | `react` | generic React hooks the other packages share: `useLatest`, `useStableByContent` |
165
183
  | `paint` | fills, strokes, gradients and dashes as plain data |
166
184
  | `text` | styled runs, kerned layout, wrapping and measurement |
167
185
  | `bidi` | the Unicode Bidirectional Algorithm (UAX #9) |
@@ -169,6 +187,7 @@ Every package is published under `@weasel-js` and released together at one versi
169
187
  | `svg` | SVG import and export |
170
188
  | `modes` | app-level modality: capability tags, mode definitions, a mode registry |
171
189
  | `diagram` | node-link diagrams: ports on any node's perimeter, flowchart-style bodies |
190
+ | `guides` | placement aids: grids, guide lines, alignment and snapping to them, container layout strategies |
172
191
  | `hud` | WebGL-rendered widgets composited into a canvas |
173
192
  | `cursor` | tool cursors as authored glyphs, baked to CSS or painted when too large |
174
193
  | `loupe` | a magnifier model: where it's aimed, how far it magnifies, what's under it |
@@ -0,0 +1,15 @@
1
+ import { PointerContextProvider as e } from "./features/pointer/PointerContext.js";
2
+ import { SelectionContextProvider as t, SelectionContextProviderIfRoot as n } from "./features/selection/SelectionContext.js";
3
+ import { PointerProviderIfRoot as r } from "./canvas/SceneCanvas/PointerProviderIfRoot.js";
4
+ import { ActionsProviderIfRoot as i } from "./canvas/SceneCanvas/ActionsProviderIfRoot.js";
5
+ import { DepRegistryProviderIfRoot as a } from "./canvas/SceneCanvas/DepRegistryProviderIfRoot.js";
6
+ import { ActionsProvider as o, ActiveToolContextProvider as s, ActiveToolContextProviderIfRoot as c, DepRegistryProvider as l } from "@weasel-js/routing/react";
7
+ import { jsx as u } from "react/jsx-runtime";
8
+ //#region src/WeaselProvider.tsx
9
+ function d({ children: d, isolate: f = !1 }) {
10
+ return /* @__PURE__ */ u(f ? l : a, { children: /* @__PURE__ */ u(f ? o : i, { children: /* @__PURE__ */ u(f ? s : c, { children: /* @__PURE__ */ u(f ? t : n, { children: /* @__PURE__ */ u(f ? e : r, { children: d }) }) }) }) });
11
+ }
12
+ //#endregion
13
+ export { d as WeaselProvider };
14
+
15
+ //# sourceMappingURL=WeaselProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WeaselProvider.js","names":["WeaselProvider","isolate","DepRegistryProvider","DepRegistryProviderIfRoot","ActionsProvider","ActionsProviderIfRoot","ActiveToolContextProvider","ActiveToolContextProviderIfRoot","SelectionContextProvider","SelectionContextProviderIfRoot","PointerContextProvider","PointerProviderIfRoot"],"sources":["../src/WeaselProvider.tsx"],"sourcesContent":["/**\n * `<WeaselProvider>` — top-level convenience that mounts all five kit-root\n * contexts in a single wrap. By default each underlying provider uses its\n * `IfRoot` variant, so `<WeaselProvider>` is safely nestable: when a parent\n * `<WeaselProvider>` (or any of the individual providers) is already in\n * scope, the inner one renders its children unwrapped and defers to the\n * parent registry. `isolate` opts out of that.\n *\n * Use this at the harness / app root above any `useTools(...)` call so the\n * resulting `ToolsApi` is bound to the same `ActiveToolContext` the\n * surrounding `<SceneCanvas>` reads — otherwise keybinding-driven tool\n * switches update local state in the outer `useTools` but the dispatcher\n * (which reads the context) sees a stale active tool.\n *\n * Provider nesting order matches the order `<SceneCanvas>` mounts them\n * internally so swapping a manual SceneCanvas-wrapping setup for\n * `<WeaselProvider>` doesn't change effect ordering.\n */\nimport type { ComponentType, ReactNode } from 'react';\nimport { DepRegistryProviderIfRoot } from './canvas/SceneCanvas/DepRegistryProviderIfRoot';\nimport { ActionsProviderIfRoot } from './canvas/SceneCanvas/ActionsProviderIfRoot';\nimport { PointerProviderIfRoot } from './canvas/SceneCanvas/PointerProviderIfRoot';\nimport { ActiveToolContextProvider, ActiveToolContextProviderIfRoot } from '@weasel-js/routing/react';\nimport {\n SelectionContextProvider,\n SelectionContextProviderIfRoot,\n} from './features/selection/SelectionContext';\nimport { DepRegistryProvider } from '@weasel-js/routing/react';\nimport { ActionsProvider } from '@weasel-js/routing/react';\nimport { PointerContextProvider } from './features/pointer/PointerContext';\n\ntype Wrapper = ComponentType<{ children: ReactNode }>;\n\n/** Props for {@link WeaselProvider}. */\nexport interface WeaselProviderProps {\n children: ReactNode;\n /**\n * Mount every provider unconditionally rather than deferring to one already\n * in scope.\n *\n * An actions registry holds one dispatcher, so a second `<SceneCanvas>`\n * joining a scope displaces the first and takes its input away. Two canvases\n * on one page each want their own scope; wrap each in an isolated provider.\n * The cost is that they share nothing — a toolbar outside both can drive\n * neither.\n */\n isolate?: boolean;\n}\n\n/**\n * Mounts every kit-wide provider at once — deps, actions, active tool,\n * selection and pointer — each only if one is not already in scope, or\n * unconditionally under `isolate`.\n *\n * `<SceneCanvas>` does this for itself, so this is for the case where kit\n * state has to be shared by things outside a canvas: a toolbar, a property\n * panel, or two canvases that should agree on the selection.\n */\nexport function WeaselProvider({ children, isolate = false }: WeaselProviderProps) {\n const Deps: Wrapper = isolate ? DepRegistryProvider : DepRegistryProviderIfRoot;\n const Actions: Wrapper = isolate ? ActionsProvider : ActionsProviderIfRoot;\n const ActiveTool: Wrapper = isolate\n ? ActiveToolContextProvider\n : ActiveToolContextProviderIfRoot;\n const Selection: Wrapper = isolate\n ? SelectionContextProvider\n : SelectionContextProviderIfRoot;\n const Pointer: Wrapper = isolate ? PointerContextProvider : PointerProviderIfRoot;\n return (\n <Deps>\n <Actions>\n <ActiveTool>\n <Selection>\n <Pointer>\n {children}\n </Pointer>\n </Selection>\n </ActiveTool>\n </Actions>\n </Deps>\n );\n}\n"],"mappings":";;;;;;;;AA0DA,SAAgBA,EAAe,EAAE,aAAU,aAAU,MAA8B;CAUjF,OACE,kBAVoBC,IAAUC,IAAsBC,GAUpD,EAAA,UACE,kBAVqBF,IAAUG,IAAkBC,GAUjD,EAAA,UACE,kBAVsBJ,IACxBK,IACAC,GAQE,EAAA,UACE,kBARmBN,IACvBO,IACAC,GAMI,EAAA,UACE,kBANeR,IAAUS,IAAyBC,GAMlD,EACG,YACM,CAAA,EACA,CAAA,EACD,CAAA,EACL,CAAA,EACL,CAAA;AAEV"}
@@ -0,0 +1,224 @@
1
+ import { viewToTransform as e } from "../core/viewport/view.js";
2
+ import { worldToScreen as t } from "../core/viewport/viewTransform.js";
3
+ import { pxExtent as n } from "../core/viewport/pxExtent.js";
4
+ import { angleOf as r, annulusSemiAxes as i, hitAffordanceRegions as a, localToWorld as o, pointRegionAnchor as s, pointRegionFrame as c, pointRegionScreenQuad as l, transformOf as u } from "./hitAffordanceRegions.js";
5
+ import { PATH_L as d, PATH_M as f, PATH_Z as p } from "@weasel-js/geom";
6
+ //#region src/affordances/composeAffordanceLayer.ts
7
+ function m(t, n, r) {
8
+ return {
9
+ id: t,
10
+ label: n,
11
+ space: "screen",
12
+ draw: (t, n, i) => {
13
+ let a = h(t), o = g(t), s = _(t), c = [], l = e(n);
14
+ for (let e of r) if (!s || s(e.id)) {
15
+ for (let t of e.regions(a)) {
16
+ let r = u(a, t.targetId);
17
+ t.paint && y(t, r, n, a, l, c), o && v(o, e.id, t, r, n);
18
+ }
19
+ if (e.decorate) for (let t of e.decorate(a, n)) c.push(t);
20
+ }
21
+ return c;
22
+ },
23
+ hitTest: (e, t, n, i, o, s) => {
24
+ let c = h(n);
25
+ if (!c) return null;
26
+ let l = a(r, e, t, c, i, s ?? _(n) ?? void 0);
27
+ if (!l) return null;
28
+ let { cursor: u, strength: d, claimedKinds: f } = l.region;
29
+ return {
30
+ ...l.binding,
31
+ ...u === void 0 ? {} : { cursor: u },
32
+ ...d === void 0 ? {} : { strength: d },
33
+ ...f === void 0 ? {} : { claimedKinds: f }
34
+ };
35
+ }
36
+ };
37
+ }
38
+ function h(e) {
39
+ let t = e;
40
+ return typeof t?.getChromeState == "function" ? t.getChromeState() : e;
41
+ }
42
+ function g(e) {
43
+ let t = e;
44
+ return typeof t?.getDebug == "function" ? t.getDebug() : null;
45
+ }
46
+ function _(e) {
47
+ let t = e;
48
+ return typeof t?.getIsVisible == "function" ? t.getIsVisible() : null;
49
+ }
50
+ function v(e, t, n, a, s) {
51
+ if (n.shape.kind === "point") {
52
+ let r = c(n.shape, a, s), i = l(n.shape, a, s, (e, t) => [e, t]);
53
+ e.recordHitbox(t, "handle", {
54
+ kind: "polygon",
55
+ points: i.map((e) => ({
56
+ x: r.x + (e.x - r.x) / s.scale.x,
57
+ y: r.y + (e.y - r.y) / s.scale.y
58
+ }))
59
+ });
60
+ return;
61
+ }
62
+ if (n.shape.kind === "annulus") {
63
+ let c = n.shape, { rx: l, ry: u } = i(c, s, r(a)), d = [
64
+ o(a, c.cx + l, c.cy),
65
+ o(a, c.cx - l, c.cy),
66
+ o(a, c.cx, c.cy + u),
67
+ o(a, c.cx, c.cy - u)
68
+ ], f = Math.min(...d.map((e) => e.x)), p = Math.min(...d.map((e) => e.y)), m = Math.max(...d.map((e) => e.x)), h = Math.max(...d.map((e) => e.y));
69
+ e.recordHitbox(t, "handle", {
70
+ kind: "rect",
71
+ x: f,
72
+ y: p,
73
+ width: m - f,
74
+ height: h - p,
75
+ ...a.identity ? {} : { rotation: Math.atan2(a.sin, a.cos) }
76
+ });
77
+ return;
78
+ }
79
+ let u = n.shape, d = o(a, u.x + u.width / 2, u.y + u.height / 2);
80
+ e.recordHitbox(t, "handle", {
81
+ kind: "rect",
82
+ x: d.x - u.width / 2,
83
+ y: d.y - u.height / 2,
84
+ width: u.width,
85
+ height: u.height,
86
+ ...a.identity ? {} : { rotation: Math.atan2(a.sin, a.cos) }
87
+ });
88
+ }
89
+ function y(e, a, o, s, l, u) {
90
+ let m = e.paint;
91
+ if (m.kind === "square") {
92
+ if (e.shape.kind !== "point") return;
93
+ let n = c(e.shape, a, o), [r, i] = t(n.x, n.y, l), s = m.sizePx / 2, h = m.fill ? { fill: m.fill } : {}, g = m.stroke ? { stroke: m.stroke } : {};
94
+ if (n.angle === 0) {
95
+ u.push({
96
+ kind: "path",
97
+ path: {
98
+ kind: "rect",
99
+ x: r - s,
100
+ y: i - s,
101
+ width: m.sizePx,
102
+ height: m.sizePx
103
+ },
104
+ ...h,
105
+ ...g
106
+ });
107
+ return;
108
+ }
109
+ let _ = Math.cos(n.angle) * s, v = Math.sin(n.angle) * s, y = /* @__PURE__ */ new Float32Array(8);
110
+ [
111
+ [-1, -1],
112
+ [1, -1],
113
+ [1, 1],
114
+ [-1, 1]
115
+ ].forEach(([e, t], n) => {
116
+ y[n * 2] = r + _ * e - v * t, y[n * 2 + 1] = i + v * e + _ * t;
117
+ }), u.push({
118
+ kind: "path",
119
+ path: {
120
+ kind: "polygon",
121
+ commands: new Uint8Array([
122
+ f,
123
+ d,
124
+ d,
125
+ d,
126
+ p
127
+ ]),
128
+ coords: y,
129
+ fillRule: "nonzero"
130
+ },
131
+ ...h,
132
+ ...g
133
+ });
134
+ return;
135
+ }
136
+ if (m.kind === "annulus") {
137
+ if (e.shape.kind !== "annulus") return;
138
+ let t = e.shape, s = n(m.insetPx ?? 0, o.scale, r(a)), c = b(t, i(t, o, r(a)), s, a, l, m.fill, m.stroke);
139
+ c && u.push(c);
140
+ return;
141
+ }
142
+ if (m.kind === "custom") {
143
+ let t = {
144
+ world: x(e, a, o),
145
+ local: e.shape,
146
+ view: o,
147
+ state: s
148
+ };
149
+ for (let e of m.draw(t)) u.push(e);
150
+ return;
151
+ }
152
+ }
153
+ function b(e, n, r, i, a, s, c) {
154
+ let l = n.rx - r.x, u = n.ry - r.y;
155
+ if (l <= 0 || u <= 0) return null;
156
+ let m = e.cx, h = e.cy, g = e.innerWidth / 2 + r.x, _ = e.innerHeight / 2 + r.y, v = _ < u, y = g < l;
157
+ if (!v && !y) return null;
158
+ let b = v ? l * Math.sqrt(1 - (_ / u) ** 2) : 0, x = y ? u * Math.sqrt(1 - (g / l) ** 2) : 0, S = [], C = [];
159
+ function w(e, t) {
160
+ S.push(f), C.push({
161
+ x: m + l * Math.cos(e),
162
+ y: h + u * Math.sin(e)
163
+ });
164
+ for (let n = 1; n <= 24; n++) {
165
+ let r = e + (t - e) * (n / 24);
166
+ S.push(d), C.push({
167
+ x: m + l * Math.cos(r),
168
+ y: h + u * Math.sin(r)
169
+ });
170
+ }
171
+ S.push(p);
172
+ }
173
+ v && (w(Math.atan2(-_ / u, b / l), Math.atan2(-_ / u, -b / l)), w(Math.atan2(_ / u, b / l), Math.atan2(_ / u, -b / l))), y && (w(Math.atan2(-x / u, g / l), Math.atan2(x / u, g / l)), w(Math.atan2(-x / u, -g / l), Math.atan2(x / u, -g / l) - 2 * Math.PI));
174
+ let T = new Float32Array(C.length * 2);
175
+ for (let e = 0; e < C.length; e++) {
176
+ let n = o(i, C[e].x, C[e].y), [r, s] = t(n.x, n.y, a);
177
+ T[e * 2] = r, T[e * 2 + 1] = s;
178
+ }
179
+ return {
180
+ kind: "path",
181
+ path: {
182
+ kind: "polygon",
183
+ commands: new Uint8Array(S),
184
+ coords: T,
185
+ fillRule: "nonzero"
186
+ },
187
+ ...s ? { fill: s } : {},
188
+ ...c ? { stroke: c } : {}
189
+ };
190
+ }
191
+ function x(e, t, n) {
192
+ if (e.shape.kind === "point") {
193
+ let r = s(e.shape, t, n);
194
+ return {
195
+ x: r.x,
196
+ y: r.y
197
+ };
198
+ }
199
+ if (e.shape.kind === "annulus") {
200
+ let a = e.shape, { rx: s, ry: c } = i(a, n, r(t)), l = [
201
+ o(t, a.cx + s, a.cy),
202
+ o(t, a.cx - s, a.cy),
203
+ o(t, a.cx, a.cy + c),
204
+ o(t, a.cx, a.cy - c)
205
+ ], u = Math.min(...l.map((e) => e.x)), d = Math.min(...l.map((e) => e.y)), f = Math.max(...l.map((e) => e.x)), p = Math.max(...l.map((e) => e.y));
206
+ return {
207
+ x: u,
208
+ y: d,
209
+ width: f - u,
210
+ height: p - d
211
+ };
212
+ }
213
+ let a = e.shape, c = o(t, a.x, a.y), l = o(t, a.x + a.width, a.y), u = o(t, a.x, a.y + a.height), d = o(t, a.x + a.width, a.y + a.height), f = Math.min(c.x, l.x, u.x, d.x), p = Math.min(c.y, l.y, u.y, d.y), m = Math.max(c.x, l.x, u.x, d.x), h = Math.max(c.y, l.y, u.y, d.y);
214
+ return {
215
+ x: f,
216
+ y: p,
217
+ width: m - f,
218
+ height: h - p
219
+ };
220
+ }
221
+ //#endregion
222
+ export { m as composeAffordanceLayer };
223
+
224
+ //# sourceMappingURL=composeAffordanceLayer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composeAffordanceLayer.js","names":["composeAffordanceLayer","state","asChromeState","data","debug","asDebugSink","isVisible","asIsVisible","out","t","viewToTransform","view","a","affordances","region","xf","transformOf","paintRegion","recordRegionHitbox","cmd","hit","hitAffordanceRegions","wx","wy","cursor","strength","claimedKinds","maybe","f","pointRegionFrame","quad","pointRegionScreenQuad","x","y","affordanceId","q","s","annulusSemiAxes","angleOf","pts","localToWorld","rx","ry","minX","p","minY","maxX","maxY","r","w","paint","sx","sy","worldToScreen","viewT","half","fill","stroke","c","sn","coords","u","v","i","PATH_M","PATH_L","PATH_Z","insetLocal","pxExtent","annulusCommand","ctx","worldOf","semiAxes","cx","shape","cy","rectHW","rectHH","haveTopBottom","haveLeftRight","xT","yR","cmds","localPts","appendPetal","t0","t1","pointRegionAnchor","b"],"sources":["../../src/affordances/composeAffordanceLayer.ts"],"sourcesContent":["import type { RenderLayer } from 'core/layers/render';\nimport type { DrawCommand } from '../renderer';\nimport type { ChromeState } from 'core/selection/chromeState';\nimport type { View } from 'core/viewport/view';\nimport { viewToTransform } from 'core/viewport/view';\nimport { worldToScreen } from 'core/viewport/viewTransform';\nimport { pxExtent } from 'core/viewport/pxExtent';\nimport type { DebugSink } from '../debug/types';\nimport type { FillStyle, Stroke } from '@weasel-js/paint';\nimport { PATH_M, PATH_L, PATH_Z } from '@weasel-js/geom';\nimport {\n angleOf,\n annulusSemiAxes,\n hitAffordanceRegions,\n localToWorld,\n pointRegionAnchor,\n pointRegionFrame,\n pointRegionScreenQuad,\n transformOf,\n type TargetTransform,\n} from './hitAffordanceRegions';\nimport type {\n Affordance,\n AffordanceRegion,\n CustomPaintContext,\n LayerHit,\n} from './types';\n\n/**\n * @experimental\n * Bundle a list of Affordances into a single RenderLayer.\n *\n * Each affordance declares interactive regions in target-local coordinates;\n * this layer composes each target's bounds transform (rotation around the\n * AABB center, when present) once per region for both paint and hit-test.\n *\n * FillStyle order matches array order (first → last = bottom → top). Hit-test\n * walks regions in reverse (top → bottom) and returns the first non-null\n * binding.\n *\n * `decorate(state, view)` runs *after* a given affordance's regions for\n * paint only — useful for leader lines and other purely-visual chrome that\n * don't fit the region model.\n */\nexport function composeAffordanceLayer(\n id: string,\n label: string,\n affordances: readonly Affordance[],\n): RenderLayer<ChromeState> & {\n hitTest(\n wx: number,\n wy: number,\n state: unknown,\n view: View,\n dims: { width: number; height: number },\n isVisible?: (id: string) => boolean,\n ): LayerHit | null;\n} {\n return {\n id,\n label,\n space: 'screen',\n draw: (data, view, _dims): DrawCommand[] => {\n const state = asChromeState(data);\n const debug = asDebugSink(data);\n const isVisible = asIsVisible(data);\n const out: DrawCommand[] = [];\n const t = viewToTransform(view);\n for (const a of affordances) {\n if (isVisible && !isVisible(a.id)) continue;\n for (const region of a.regions(state)) {\n const xf = transformOf(state, region.targetId);\n if (region.paint) paintRegion(region, xf, view, state, t, out);\n if (debug) recordRegionHitbox(debug, a.id, region, xf, view);\n }\n if (a.decorate) {\n for (const cmd of a.decorate(state, view)) out.push(cmd);\n }\n }\n return out;\n },\n // The walk itself lives in `hitAffordanceRegions` so this layer and\n // `buildAffordanceAt` share one implementation rather than two that can\n // drift. This wrapper lifts the region's declared cursor and claim onto\n // the binding, the way `buildAffordanceAt` lifts them onto `AffordanceHit`.\n hitTest: (wx, wy, data, view, _dims, isVisible): LayerHit | null => {\n const state = asChromeState(data);\n if (!state) return null;\n const hit = hitAffordanceRegions(\n affordances, wx, wy, state, view, isVisible ?? asIsVisible(data) ?? undefined,\n );\n if (!hit) return null;\n const { cursor, strength, claimedKinds } = hit.region;\n return {\n ...hit.binding,\n ...(cursor !== undefined ? { cursor } : {}),\n ...(strength !== undefined ? { strength } : {}),\n ...(claimedKinds !== undefined ? { claimedKinds } : {}),\n };\n },\n };\n}\n\n// ─── Data unwrappers ────────────────────────────────────────────────────────\n\n// `draw` is called by Canvas with `CanvasHelpers` and by tests with a bare\n// `ChromeState`. Tests stay terse this way, and production gets the live\n// debug sink via the same channel.\nfunction asChromeState(data: unknown): ChromeState {\n const maybe = data as { getChromeState?: () => ChromeState };\n if (typeof maybe?.getChromeState === 'function') return maybe.getChromeState();\n return data as ChromeState;\n}\n\nfunction asDebugSink(data: unknown): DebugSink | null {\n const maybe = data as { getDebug?: () => DebugSink | null };\n if (typeof maybe?.getDebug === 'function') return maybe.getDebug();\n return null;\n}\n\n/** Pull a chrome-caps visibility predicate off the data envelope when\n * present. When absent (legacy callers / tests passing bare state),\n * every affordance renders — preserves pre-chrome-caps behavior. */\nfunction asIsVisible(data: unknown): ((id: string) => boolean) | null {\n const maybe = data as { getIsVisible?: () => (id: string) => boolean };\n if (typeof maybe?.getIsVisible === 'function') return maybe.getIsVisible();\n return null;\n}\n\nfunction recordRegionHitbox(\n debug: DebugSink,\n affordanceId: string,\n region: AffordanceRegion,\n xf: TargetTransform,\n view: View,\n): void {\n if (region.shape.kind === 'point') {\n // The hit square is a square on *screen* — turned with the target when the\n // region asks — so in world it is a parallelogram, recorded as one.\n const f = pointRegionFrame(region.shape, xf, view);\n const quad = pointRegionScreenQuad(region.shape, xf, view, (x, y) => [x, y]);\n debug.recordHitbox(affordanceId, 'handle', {\n kind: 'polygon',\n points: quad.map((q) => ({\n x: f.x + (q.x - f.x) / view.scale.x,\n y: f.y + (q.y - f.y) / view.scale.y,\n })),\n });\n return;\n }\n if (region.shape.kind === 'annulus') {\n // Approximate the annulus visualization as the outer ellipse's AABB.\n // The DebugSink's hitbox primitives don't model ring shapes; the\n // always-visible dev paint (`paint.kind === 'annulus'`) draws the\n // actual ring. Consumers that want a precise debug overlay can match\n // against the affordance id and render the annulus themselves.\n const s = region.shape;\n const { rx, ry } = annulusSemiAxes(s, view, angleOf(xf));\n const pts = [\n localToWorld(xf, s.cx + rx, s.cy),\n localToWorld(xf, s.cx - rx, s.cy),\n localToWorld(xf, s.cx, s.cy + ry),\n localToWorld(xf, s.cx, s.cy - ry),\n ];\n const minX = Math.min(...pts.map((p) => p.x));\n const minY = Math.min(...pts.map((p) => p.y));\n const maxX = Math.max(...pts.map((p) => p.x));\n const maxY = Math.max(...pts.map((p) => p.y));\n debug.recordHitbox(affordanceId, 'handle', {\n kind: 'rect',\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n ...(xf.identity ? {} : { rotation: Math.atan2(xf.sin, xf.cos) }),\n });\n return;\n }\n // rect: axis-aligned in local frame; apply target rotation around the\n // AABB pivot when present.\n const r = region.shape;\n const w = localToWorld(xf, r.x + r.width / 2, r.y + r.height / 2);\n debug.recordHitbox(affordanceId, 'handle', {\n kind: 'rect',\n x: w.x - r.width / 2,\n y: w.y - r.height / 2,\n width: r.width,\n height: r.height,\n ...(xf.identity ? {} : { rotation: Math.atan2(xf.sin, xf.cos) }),\n });\n}\n\n// ─── FillStyle ──────────────────────────────────────────────────────────────────\n\nfunction paintRegion(\n region: AffordanceRegion,\n xf: TargetTransform,\n view: View,\n state: ChromeState,\n viewT: ReturnType<typeof viewToTransform>,\n out: DrawCommand[],\n): void {\n const paint = region.paint!;\n if (paint.kind === 'square') {\n if (region.shape.kind !== 'point') {\n // 'square' only makes sense over a point shape. Silently skip — a\n // future paint variant can cover rect outlines.\n return;\n }\n // Same frame the hit-test reads, at the paint's own size.\n const f = pointRegionFrame(region.shape, xf, view);\n const [sx, sy] = worldToScreen(f.x, f.y, viewT);\n const half = paint.sizePx / 2;\n const fill = paint.fill ? { fill: paint.fill } : {};\n const stroke = paint.stroke ? { stroke: paint.stroke } : {};\n if (f.angle === 0) {\n out.push({\n kind: 'path',\n path: { kind: 'rect', x: sx - half, y: sy - half, width: paint.sizePx, height: paint.sizePx },\n ...fill, ...stroke,\n });\n return;\n }\n const c = Math.cos(f.angle) * half, sn = Math.sin(f.angle) * half;\n const coords = new Float32Array(8);\n [[-1, -1], [1, -1], [1, 1], [-1, 1]].forEach(([u, v], i) => {\n coords[i * 2] = sx + c * u - sn * v;\n coords[i * 2 + 1] = sy + sn * u + c * v;\n });\n out.push({\n kind: 'path',\n path: { kind: 'polygon', commands: new Uint8Array([PATH_M, PATH_L, PATH_L, PATH_L, PATH_Z]), coords, fillRule: 'nonzero' },\n ...fill, ...stroke,\n });\n return;\n }\n if (paint.kind === 'annulus') {\n if (region.shape.kind !== 'annulus') return; // type mismatch — silent skip\n const s = region.shape;\n // Convert the screen-px inset to target-local units so it visually\n // matches at any zoom. `localToWorld` is rotation+translation (no\n // scale), so target-local units equal world units for ring math.\n const insetLocal = pxExtent(paint.insetPx ?? 0, view.scale, angleOf(xf));\n // Same `minBandPx` clamp the hit-test applies, so the ring you can see is\n // the ring you can grab.\n const cmd = annulusCommand(s, annulusSemiAxes(s, view, angleOf(xf)), insetLocal, xf, viewT, paint.fill, paint.stroke);\n if (cmd) out.push(cmd);\n return;\n }\n if (paint.kind === 'custom') {\n const ctx: CustomPaintContext = {\n world: worldOf(region, xf, view),\n local: region.shape,\n view,\n state,\n };\n for (const cmd of paint.draw(ctx)) out.push(cmd);\n return;\n }\n}\n\n/** Build a screen-space DrawCommand for an annulus region: the area\n * inside the (contracted) outer ellipse but outside the (expanded)\n * inner rect. Renders as four disjoint petal subpaths — one per rect\n * edge — so the visible fill is true `ellipse \\ rect`. A naive\n * ellipse + rect even-odd path would also fill the rect's corner\n * triangles where they poke past the contracted ellipse. Returns null\n * when the band collapses on both axes. */\nfunction annulusCommand(\n shape: Extract<AffordanceRegion['shape'], { kind: 'annulus' }>,\n semiAxes: { rx: number; ry: number },\n insetLocal: { x: number; y: number },\n xf: TargetTransform,\n viewT: ReturnType<typeof viewToTransform>,\n fill: FillStyle | undefined,\n stroke: Stroke | undefined,\n): DrawCommand | null {\n const rx = semiAxes.rx - insetLocal.x;\n const ry = semiAxes.ry - insetLocal.y;\n if (rx <= 0 || ry <= 0) return null;\n const cx = shape.cx;\n const cy = shape.cy;\n // Expanded inner rect (still in target-local coords).\n const rectHW = shape.innerWidth / 2 + insetLocal.x;\n const rectHH = shape.innerHeight / 2 + insetLocal.y;\n // Each petal exists only when the corresponding rect edge actually\n // intersects the ellipse interior — otherwise the rect already\n // extends past the ellipse on that axis and there's no band to show.\n const haveTopBottom = rectHH < ry;\n const haveLeftRight = rectHW < rx;\n if (!haveTopBottom && !haveLeftRight) return null;\n const xT = haveTopBottom ? rx * Math.sqrt(1 - (rectHH / ry) ** 2) : 0;\n const yR = haveLeftRight ? ry * Math.sqrt(1 - (rectHW / rx) ** 2) : 0;\n\n // Sampling density per petal arc — line segments are visually clean\n // for the rotate-band band thickness and avoid the cubic-Bézier\n // sub-arc bookkeeping. 24 is smooth at typical zooms.\n const SAMPLES = 24;\n const cmds: number[] = [];\n const localPts: { x: number; y: number }[] = [];\n\n function appendPetal(t0: number, t1: number): void {\n cmds.push(PATH_M);\n localPts.push({ x: cx + rx * Math.cos(t0), y: cy + ry * Math.sin(t0) });\n for (let i = 1; i <= SAMPLES; i++) {\n const t = t0 + (t1 - t0) * (i / SAMPLES);\n cmds.push(PATH_L);\n localPts.push({ x: cx + rx * Math.cos(t), y: cy + ry * Math.sin(t) });\n }\n // PATH_Z closes back to the move-to point along the rect edge — both\n // endpoints share the rect-edge coord by construction, so the\n // closing segment IS the chord.\n cmds.push(PATH_Z);\n }\n\n if (haveTopBottom) {\n // Top petal: y < cy. Arc from right endpoint over t = -π/2 to left.\n appendPetal(\n Math.atan2(-rectHH / ry, xT / rx), // in (-π/2, 0)\n Math.atan2(-rectHH / ry, -xT / rx), // in (-π, -π/2), decreasing through -π/2\n );\n // Bottom petal: y > cy. Arc through t = +π/2.\n appendPetal(\n Math.atan2(rectHH / ry, xT / rx), // in (0, π/2)\n Math.atan2(rectHH / ry, -xT / rx), // in (π/2, π), increasing through π/2\n );\n }\n if (haveLeftRight) {\n // Right petal: x > cx. Arc through t = 0.\n appendPetal(\n Math.atan2(-yR / ry, rectHW / rx), // in (-π/2, 0)\n Math.atan2(yR / ry, rectHW / rx), // in (0, π/2)\n );\n // Left petal: x < cx. Arc through t = ±π. Shift the end angle by\n // -2π so the parametric trace passes through the leftmost point\n // monotonically instead of crossing the right side.\n appendPetal(\n Math.atan2(-yR / ry, -rectHW / rx), // in (-π, -π/2)\n Math.atan2(yR / ry, -rectHW / rx) - 2 * Math.PI, // in (-3π/2, -π), decreasing through -π\n );\n }\n\n const coords = new Float32Array(localPts.length * 2);\n for (let i = 0; i < localPts.length; i++) {\n const w = localToWorld(xf, localPts[i].x, localPts[i].y);\n const [sx, sy] = worldToScreen(w.x, w.y, viewT);\n coords[i * 2] = sx;\n coords[i * 2 + 1] = sy;\n }\n return {\n kind: 'path',\n path: { kind: 'polygon', commands: new Uint8Array(cmds), coords, fillRule: 'nonzero' },\n ...(fill ? { fill } : {}),\n ...(stroke ? { stroke } : {}),\n };\n}\n\nfunction worldOf(region: AffordanceRegion, xf: TargetTransform, view: View): CustomPaintContext['world'] {\n if (region.shape.kind === 'point') {\n const w = pointRegionAnchor(region.shape, xf, view);\n return { x: w.x, y: w.y };\n }\n if (region.shape.kind === 'annulus') {\n // Outer ellipse bounding box, in world coords. Map the four cardinal\n // extrema through the target transform and AABB the result. (Rotated\n // ellipses are still ellipses; their AABB needs all four points.)\n const s = region.shape;\n const { rx, ry } = annulusSemiAxes(s, view, angleOf(xf));\n const pts = [\n localToWorld(xf, s.cx + rx, s.cy),\n localToWorld(xf, s.cx - rx, s.cy),\n localToWorld(xf, s.cx, s.cy + ry),\n localToWorld(xf, s.cx, s.cy - ry),\n ];\n const minX = Math.min(...pts.map((p) => p.x));\n const minY = Math.min(...pts.map((p) => p.y));\n const maxX = Math.max(...pts.map((p) => p.x));\n const maxY = Math.max(...pts.map((p) => p.y));\n return { x: minX, y: minY, width: maxX - minX, height: maxY - minY };\n }\n // Rect: map the rect's origin and far corner; width/height under rotation\n // describe the AABB of the rotated rect, which is what custom-paint\n // consumers most often want. Affordances needing exact rotated geometry\n // can read `local` + reapply rotation themselves via `view`/`state`.\n const r = region.shape;\n const a = localToWorld(xf, r.x, r.y);\n const b = localToWorld(xf, r.x + r.width, r.y);\n const c = localToWorld(xf, r.x, r.y + r.height);\n const d = localToWorld(xf, r.x + r.width, r.y + r.height);\n const minX = Math.min(a.x, b.x, c.x, d.x);\n const minY = Math.min(a.y, b.y, c.y, d.y);\n const maxX = Math.max(a.x, b.x, c.x, d.x);\n const maxY = Math.max(a.y, b.y, c.y, d.y);\n return { x: minX, y: minY, width: maxX - minX, height: maxY - minY };\n}\n\n// Hit-testing lives in `hitAffordanceRegions.ts` — see `hitRegion` there.\n"],"mappings":";;;;;;AA4CA,SAAgBA,EACd,GACA,GACA,GAUA;CACA,OAAO;EACL;EACA;EACA,OAAO;EACP,OAAO,GAAM,GAAM,MAAyB;GAC1C,IAAMC,IAAQC,EAAcC,CAAI,GAC1BC,IAAQC,EAAYF,CAAI,GACxBG,IAAYC,EAAYJ,CAAI,GAC5BK,IAAqB,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,IAAInC,EAAE,GAAG4E,EAAE,GAAG9B,EAAE,GAAG,EAAE,CAAC;CACxC,OAAO;EAAE,GAAGf;EAAM,GAAGE;EAAM,OAAOC,IAAOH;EAAM,QAAQI,IAAOF;CAAK;AACrE"}
@@ -0,0 +1,69 @@
1
+ import { HANDLE_BASE_PX as e } from "../core/device/targets.js";
2
+ import { CORNER_ANCHORS as t, cornerPoint as n, fixedCornerOf as r } from "../interactions/actions/resize/cornerHandles.js";
3
+ import { MULTI_RESIZE_TARGET_ID as i } from "../core/selection/selectionTarget.js";
4
+ import { angleOf as a, localToWorld as o, transformOf as s } from "./hitAffordanceRegions.js";
5
+ //#region src/affordances/cornerResize.ts
6
+ var c = "#d4c4a8", l = "#1a130d";
7
+ function u(i = {}) {
8
+ let { handleHitRadius: u = e, handleSize: f = e, fill: p = c, stroke: m = l } = i, h = {
9
+ kind: "square",
10
+ sizePx: f,
11
+ fill: { color: p },
12
+ stroke: {
13
+ paint: { color: m },
14
+ width: 1
15
+ }
16
+ };
17
+ return {
18
+ id: "selection.resize-handles",
19
+ regions(e) {
20
+ let i = d(e);
21
+ if (!i) return [];
22
+ let c = i.bounds, l = s(e, i.id);
23
+ return t.map((e) => {
24
+ let t = n(c, e), s = r(c, e.anchor), d = o(l, s.x, s.y);
25
+ return {
26
+ id: `corner-${e.tag}`,
27
+ targetId: i.id,
28
+ shape: {
29
+ kind: "point",
30
+ x: t.x,
31
+ y: t.y,
32
+ hitRadiusPx: u,
33
+ turned: !0
34
+ },
35
+ paint: h,
36
+ hitKind: e.kind,
37
+ cursor: {
38
+ glyph: "resize",
39
+ angle: (e.anchor.x === e.anchor.y ? Math.PI / 4 : -Math.PI / 4) + a(l),
40
+ fallback: e.anchor.x === e.anchor.y ? "nwse-resize" : "nesw-resize"
41
+ },
42
+ bind: () => ({ initialScratch: {
43
+ anchor: e.anchor,
44
+ targetId: i.id,
45
+ fixedPoint: d
46
+ } })
47
+ };
48
+ });
49
+ }
50
+ };
51
+ }
52
+ function d(e) {
53
+ if (e.multiActive && e.unionBounds) return {
54
+ id: i,
55
+ bounds: e.unionBounds
56
+ };
57
+ if (e.selection.length === 1) {
58
+ let t = e.selection[0], n = e.boundsOf(t);
59
+ return n ? {
60
+ id: t,
61
+ bounds: n
62
+ } : null;
63
+ }
64
+ return null;
65
+ }
66
+ //#endregion
67
+ export { u as createCornerResizeAffordance };
68
+
69
+ //# sourceMappingURL=cornerResize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cornerResize.js","names":["DEFAULT_FILL","DEFAULT_STROKE","createCornerResizeAffordance","HANDLE_BASE_PX","opts","paint","handleSize","fill","stroke","target","pickRenderTarget","state","b","xf","transformOf","CORNER_ANCHORS","corner","cornerPoint","c","fixedLocal","fixedCornerOf","fixedPoint","localToWorld","handleHitRadius","angleOf","MULTI_RESIZE_TARGET_ID","id"],"sources":["../../src/affordances/cornerResize.ts"],"sourcesContent":["import type { Affordance, AffordanceBinding, AffordanceRegion, CommonAffordanceScratch } from './types';\nimport type { ChromeState, Bounds } from 'core/selection/chromeState';\nimport type { ResizeAnchor } from 'interactions/gestures/types';\nimport { CORNER_ANCHORS, cornerPoint, fixedCornerOf } from 'interactions/actions/resize/cornerHandles';\nimport { MULTI_RESIZE_TARGET_ID } from 'core/selection/selectionTarget';\nimport { angleOf, localToWorld, transformOf } from './hitAffordanceRegions';\nimport { HANDLE_BASE_PX } from 'core/device/targets';\n\n/** Options for `createCornerResizeAffordance` — the size and appearance of\n * the corner handles. */\nexport interface CornerResizeAffordanceOptions {\n /** Hit radius (screen-px) for the corner handles. Default 8. */\n handleHitRadius?: number;\n /** Visual handle size (screen-px). Default 8. */\n handleSize?: number;\n fill?: string;\n stroke?: string;\n}\n\n/** What a corner-resize hit hands to the resize action: which corner stays\n * put, what is being resized, and the world-space pivot to scale from. */\nexport interface CornerResizeScratch extends CommonAffordanceScratch {\n /** Resize anchor identifying the OPPOSITE corner (the one that stays\n * fixed). Matches the kit's existing ResizeAnchor convention. */\n anchor: ResizeAnchor;\n /** Id of the resize target. In multi-mode this is `MULTI_RESIZE_TARGET_ID`. */\n targetId: string;\n /** The fixed corner in **world** coords, with the target's rotation already\n * applied. `resizeAction` scales from this point, and it has no access to\n * the target transform, so the affordance resolves it here. */\n fixedPoint: { x: number; y: number };\n}\n\nconst DEFAULT_FILL = '#d4c4a8';\nconst DEFAULT_STROKE = '#1a130d';\n\n/**\n * @experimental\n * Corner-handle affordance for resizing the active selection (single\n * member in single-mode; the union AABB in multi-mode).\n *\n * Declares four point regions in the target's local frame; the framework\n * applies the target's bounds rotation for both paint and hit-test. The\n * drag channel returned here is a no-op stub that claims — consuming\n * tools (`useResizeTool`) wrap each region's `bind()` to substitute a\n * drag channel that drives `useResize`.\n */\nexport function createCornerResizeAffordance(\n opts: CornerResizeAffordanceOptions = {},\n): Affordance {\n const {\n handleHitRadius = HANDLE_BASE_PX,\n handleSize = HANDLE_BASE_PX,\n fill = DEFAULT_FILL,\n stroke = DEFAULT_STROKE,\n } = opts;\n\n const paint = {\n kind: 'square' as const,\n sizePx: handleSize,\n fill: { color: fill },\n stroke: { paint: { color: stroke }, width: 1 },\n };\n\n return {\n id: 'selection.resize-handles',\n regions(state: ChromeState): readonly AffordanceRegion[] {\n const target = pickRenderTarget(state);\n if (!target) return [];\n const b = target.bounds;\n // The transform the framework applies to these regions. Needed here too,\n // because `fixedPoint` leaves the local frame — it travels to\n // `resizeAction`, which works in world coords.\n const xf = transformOf(state, target.id);\n return CORNER_ANCHORS.map((c) => {\n const corner = cornerPoint(b, c);\n const fixedLocal = fixedCornerOf(b, c.anchor);\n const fixedPoint = localToWorld(xf, fixedLocal.x, fixedLocal.y);\n return {\n id: `corner-${c.tag}`,\n targetId: target.id,\n shape: { kind: 'point' as const, x: corner.x, y: corner.y, hitRadiusPx: handleHitRadius, turned: true },\n paint,\n hitKind: c.kind,\n // Diagonal by fixed-corner parity: a matched-axis anchor (min-min /\n // max-max fixed) means the dragged corner sits on the ↘ diagonal;\n // mixed axes sit on the ↗ diagonal. The glyph is horizontal at angle\n // 0, so the diagonal is a half-quarter-turn either way, plus the\n // target's own rotation. The keyword is the fallback rather than the\n // answer: CSS has four of them, which cannot express a target\n // rotated to anything but a multiple of 45°.\n cursor: {\n glyph: 'resize',\n angle: (c.anchor.x === c.anchor.y ? Math.PI / 4 : -Math.PI / 4) + angleOf(xf),\n fallback: c.anchor.x === c.anchor.y ? 'nwse-resize' : 'nesw-resize',\n },\n bind: (): AffordanceBinding => ({\n initialScratch: {\n anchor: c.anchor,\n targetId: target.id,\n fixedPoint,\n } satisfies CornerResizeScratch,\n }),\n } satisfies AffordanceRegion;\n });\n },\n };\n}\n\nfunction pickRenderTarget(state: ChromeState): { id: string; bounds: Bounds } | null {\n if (state.multiActive && state.unionBounds) {\n return { id: MULTI_RESIZE_TARGET_ID, bounds: state.unionBounds };\n }\n if (state.selection.length === 1) {\n const id = state.selection[0];\n const b = state.boundsOf(id);\n return b ? { id, bounds: b } : null;\n }\n return null;\n}\n"],"mappings":";;;;;AAiCA,IAAMA,IAAe,WACfC,IAAiB;AAavB,SAAgBC,EACd,IAAsC,CAAC,GAC3B;CACZ,IAAM,EACJ,qBAAkBC,GAClB,gBAAaA,GACb,UAAOH,GACP,YAASC,MACPG,GAEEC,IAAQ;EACZ,MAAM;EACN,QAAQC;EACR,MAAM,EAAE,OAAOC,EAAK;EACpB,QAAQ;GAAE,OAAO,EAAE,OAAOC,EAAO;GAAG,OAAO;EAAE;CAC/C;CAEA,OAAO;EACL,IAAI;EACJ,QAAQ,GAAiD;GACvD,IAAMC,IAASC,EAAiBC,CAAK;GACrC,IAAI,CAACF,GAAQ,OAAO,CAAC;GACrB,IAAMG,IAAIH,EAAO,QAIXI,IAAKC,EAAYH,GAAOF,EAAO,EAAE;GACvC,OAAOM,EAAe,KAAK,MAAM;IAC/B,IAAMC,IAASC,EAAYL,GAAGM,CAAC,GACzBC,IAAaC,EAAcR,GAAGM,EAAE,MAAM,GACtCG,IAAaC,EAAaT,GAAIM,EAAW,GAAGA,EAAW,CAAC;IAC9D,OAAO;KACL,IAAI,UAAUD,EAAE;KAChB,UAAUT,EAAO;KACjB,OAAO;MAAE,MAAM;MAAkB,GAAGO,EAAO;MAAG,GAAGA,EAAO;MAAG,aAAaO;MAAiB,QAAQ;KAAK;KACtG;KACA,SAASL,EAAE;KAQX,QAAQ;MACN,OAAO;MACP,QAAQA,EAAE,OAAO,MAAMA,EAAE,OAAO,IAAI,KAAK,KAAK,IAAI,CAAC,KAAK,KAAK,KAAKM,EAAQX,CAAE;MAC5E,UAAUK,EAAE,OAAO,MAAMA,EAAE,OAAO,IAAI,gBAAgB;KACxD;KACA,aAAgC,EAC9B,gBAAgB;MACd,QAAQA,EAAE;MACV,UAAUT,EAAO;MACjB;KACF,EACF;IACF;GACF,CAAC;EACH;CACF;AACF;AAEA,SAASC,EAAiB,GAA2D;CACnF,IAAIC,EAAM,eAAeA,EAAM,aAC7B,OAAO;EAAE,IAAIc;EAAwB,QAAQd,EAAM;CAAY;CAEjE,IAAIA,EAAM,UAAU,WAAW,GAAG;EAChC,IAAMe,IAAKf,EAAM,UAAU,IACrBC,IAAID,EAAM,SAASe,CAAE;EAC3B,OAAOd,IAAI;GAAE;GAAI,QAAQA;EAAE,IAAI;CACjC;CACA,OAAO;AACT"}
@@ -0,0 +1,138 @@
1
+ import { poseRotationOf as e } from "../core/geometry/poseRotation.js";
2
+ import { pxExtent as t, scaleDelta as n, screenAngleOf as r, standoff as i } from "../core/viewport/pxExtent.js";
3
+ //#region src/affordances/hitAffordanceRegions.ts
4
+ function a(e, t, n, r, i, a) {
5
+ for (let s = e.length - 1; s >= 0; s--) {
6
+ let l = e[s];
7
+ if (a && !a(l.id)) continue;
8
+ let u = l.regions(r), d = null;
9
+ for (let e = 0; e < u.length; e++) {
10
+ let a = u[e], s = c(r, a.targetId);
11
+ if (!g(a, t, n, s, i)) continue;
12
+ let l = o(a, t, n, s, i);
13
+ (d === null || l <= d.d2) && (d = {
14
+ region: a,
15
+ d2: l
16
+ });
17
+ }
18
+ if (d) return {
19
+ affordanceId: l.id,
20
+ regionId: d.region.id,
21
+ region: d.region,
22
+ binding: d.region.bind()
23
+ };
24
+ }
25
+ return null;
26
+ }
27
+ function o(e, t, n, r, i) {
28
+ let a = e.shape, o = a.kind === "point" ? m(a, r, i) : a.kind === "annulus" ? u(r, a.cx, a.cy) : u(r, a.x + a.width / 2, a.y + a.height / 2), s = o.x - t, c = o.y - n;
29
+ return s * s + c * c;
30
+ }
31
+ var s = {
32
+ cx: 0,
33
+ cy: 0,
34
+ cos: 1,
35
+ sin: 0,
36
+ identity: !0
37
+ };
38
+ function c(t, n) {
39
+ if (n === null) return s;
40
+ let r = t.boundsOf(n);
41
+ if (!r) return s;
42
+ let i = e(r);
43
+ return i ? {
44
+ cx: i.cx,
45
+ cy: i.cy,
46
+ cos: Math.cos(i.rotation),
47
+ sin: Math.sin(i.rotation),
48
+ identity: !1
49
+ } : s;
50
+ }
51
+ function l(e) {
52
+ return e.identity ? 0 : Math.atan2(e.sin, e.cos);
53
+ }
54
+ function u(e, t, n) {
55
+ if (e.identity) return {
56
+ x: t,
57
+ y: n
58
+ };
59
+ let r = t - e.cx, i = n - e.cy;
60
+ return {
61
+ x: e.cx + e.cos * r - e.sin * i,
62
+ y: e.cy + e.sin * r + e.cos * i
63
+ };
64
+ }
65
+ function d(e, t, n) {
66
+ if (e.identity) return {
67
+ x: t,
68
+ y: n
69
+ };
70
+ let r = t - e.cx, i = n - e.cy;
71
+ return {
72
+ x: e.cx + e.cos * r + e.sin * i,
73
+ y: e.cy - e.sin * r + e.cos * i
74
+ };
75
+ }
76
+ function f(e, t, n) {
77
+ let i = m(e, t, n), a = e.turned ? r(l(t), n.scale) : 0;
78
+ return {
79
+ x: i.x,
80
+ y: i.y,
81
+ angle: a,
82
+ half: e.hitRadiusPx
83
+ };
84
+ }
85
+ function p(e, t, n, r) {
86
+ let i = f(e, t, n), [a, o] = r(i.x, i.y), s = Math.cos(i.angle) * i.half, c = Math.sin(i.angle) * i.half;
87
+ return [
88
+ [-1, -1],
89
+ [1, -1],
90
+ [1, 1],
91
+ [-1, 1]
92
+ ].map(([e, t]) => ({
93
+ x: a + s * e - c * t,
94
+ y: o + c * e + s * t
95
+ }));
96
+ }
97
+ function m(e, t, n) {
98
+ let r = u(t, e.x, e.y);
99
+ if (!e.standoff) return r;
100
+ let a = e.standoff.normal, o = t.identity ? a : {
101
+ x: t.cos * a.x - t.sin * a.y,
102
+ y: t.sin * a.x + t.cos * a.y
103
+ };
104
+ return i(r, o, e.standoff.px, n.scale);
105
+ }
106
+ function h(e, n, r = 0) {
107
+ let i = e.minBandPx ?? 0;
108
+ if (i === 0) return {
109
+ rx: e.rx,
110
+ ry: e.ry
111
+ };
112
+ let a = t(i, n.scale, r);
113
+ return {
114
+ rx: Math.max(e.rx, e.innerWidth / 2 + a.x),
115
+ ry: Math.max(e.ry, e.innerHeight / 2 + a.y)
116
+ };
117
+ }
118
+ function g(e, t, r, i, a) {
119
+ let o = d(i, t, r);
120
+ if (e.shape.kind === "point") {
121
+ let o = f(e.shape, i, a), s = n(t - o.x, r - o.y, a.scale), c = Math.cos(o.angle), l = Math.sin(o.angle), u = c * s.x + l * s.y, d = -l * s.x + c * s.y;
122
+ return Math.abs(u) <= o.half && Math.abs(d) <= o.half;
123
+ }
124
+ if (e.shape.kind === "annulus") {
125
+ let t = e.shape;
126
+ if (o.x >= t.innerX && o.x <= t.innerX + t.innerWidth && o.y >= t.innerY && o.y <= t.innerY + t.innerHeight) return !1;
127
+ let { rx: n, ry: r } = h(t, a, l(i));
128
+ if (n <= 0 || r <= 0) return !1;
129
+ let s = (o.x - t.cx) / n, c = (o.y - t.cy) / r;
130
+ return s * s + c * c <= 1;
131
+ }
132
+ let s = e.shape;
133
+ return o.x >= s.x && o.x <= s.x + s.width && o.y >= s.y && o.y <= s.y + s.height;
134
+ }
135
+ //#endregion
136
+ export { l as angleOf, h as annulusSemiAxes, a as hitAffordanceRegions, u as localToWorld, m as pointRegionAnchor, f as pointRegionFrame, p as pointRegionScreenQuad, c as transformOf };
137
+
138
+ //# sourceMappingURL=hitAffordanceRegions.js.map