@yuzhouu/canvas-kit 0.1.13 → 0.1.15

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 (495) hide show
  1. package/README.md +52 -264
  2. package/_vendor/canvas-core/bindings/bindingManager.d.ts +33 -0
  3. package/_vendor/canvas-core/bindings/bindingUtil.d.ts +7 -7
  4. package/_vendor/canvas-core/bindings/terminalBinding.d.ts +1 -1
  5. package/_vendor/canvas-core/editor/clipboardAssets.d.ts +6 -0
  6. package/_vendor/canvas-core/editor/commands/assetCommands.d.ts +7 -0
  7. package/_vendor/canvas-core/editor/commands/bindingCommands.d.ts +12 -0
  8. package/_vendor/canvas-core/editor/{commands.d.ts → commands/commandTypes.d.ts} +4 -6
  9. package/_vendor/canvas-core/editor/commands/commands.d.ts +5 -0
  10. package/_vendor/canvas-core/editor/commands/documentCommands.d.ts +9 -0
  11. package/_vendor/canvas-core/editor/commands/sessionCommands.d.ts +13 -0
  12. package/_vendor/canvas-core/editor/commands/shapeCommands.d.ts +9 -0
  13. package/_vendor/canvas-core/editor/commands/shapeFlags.d.ts +10 -0
  14. package/_vendor/canvas-core/editor/commands/shapeRemoval.d.ts +10 -0
  15. package/_vendor/canvas-core/editor/commands/shapeRepair.d.ts +11 -0
  16. package/_vendor/canvas-core/editor/createEditor.d.ts +6 -0
  17. package/_vendor/canvas-core/editor/editor.d.ts +310 -538
  18. package/_vendor/canvas-core/editor/events/canvasNavigationInteraction.d.ts +2 -0
  19. package/_vendor/canvas-core/editor/events/eventRouter.d.ts +16 -0
  20. package/_vendor/canvas-core/editor/{events.d.ts → events/events.d.ts} +18 -8
  21. package/_vendor/canvas-core/editor/{managers → events}/inputsManager.d.ts +6 -4
  22. package/_vendor/canvas-core/editor/{interactions.d.ts → events/interactions.d.ts} +12 -12
  23. package/_vendor/canvas-core/editor/events/keyboardShortcuts.d.ts +23 -0
  24. package/_vendor/canvas-core/editor/events/pointerClickRecognizer.d.ts +11 -0
  25. package/_vendor/canvas-core/editor/history/historyManager.d.ts +40 -0
  26. package/_vendor/canvas-core/editor/{operationManager.d.ts → history/operationManager.d.ts} +21 -18
  27. package/_vendor/canvas-core/editor/queries/bindingQueryCache.d.ts +28 -0
  28. package/_vendor/canvas-core/editor/queries/bindingQueryState.d.ts +11 -0
  29. package/_vendor/canvas-core/editor/queries/draftBindingIndex.d.ts +19 -0
  30. package/_vendor/canvas-core/editor/queries/shapeGeometryQueryCache.d.ts +34 -0
  31. package/_vendor/canvas-core/editor/queries/shapeTransforms.d.ts +13 -15
  32. package/_vendor/canvas-core/editor/queries/shapeTreeIndex.d.ts +27 -0
  33. package/_vendor/canvas-core/editor/queries/shapeTreeIndexState.d.ts +11 -0
  34. package/_vendor/canvas-core/editor/{managers → queries}/spatialIndexManager.d.ts +5 -3
  35. package/_vendor/canvas-core/editor/records/documentSnapshots.d.ts +14 -0
  36. package/_vendor/canvas-core/editor/records/editorRecordFactory.d.ts +19 -0
  37. package/_vendor/canvas-core/editor/records/recordQueries.d.ts +3 -0
  38. package/_vendor/canvas-core/editor/{resizeGeometry.d.ts → selection/resizeGeometry.d.ts} +2 -2
  39. package/_vendor/canvas-core/editor/{selection.d.ts → selection/selection.d.ts} +4 -30
  40. package/_vendor/canvas-core/editor/{managers → selection}/selectionGeometry.d.ts +2 -2
  41. package/_vendor/canvas-core/editor/selection/selectionHandleHitTest.d.ts +8 -0
  42. package/_vendor/canvas-core/editor/selection/selectionLayout.d.ts +20 -0
  43. package/_vendor/canvas-core/editor/selection/selectionOverlay.d.ts +25 -0
  44. package/_vendor/canvas-core/editor/selection/selectionOverlayEquality.d.ts +8 -0
  45. package/_vendor/canvas-core/editor/selection/selectionOverlayManager.d.ts +34 -0
  46. package/_vendor/canvas-core/editor/{selectionResizeCapabilities.d.ts → selection/selectionResizeCapabilities.d.ts} +2 -2
  47. package/_vendor/canvas-core/editor/selection/selectionSet.d.ts +9 -0
  48. package/_vendor/canvas-core/editor/selection/selectionTargets.d.ts +10 -0
  49. package/_vendor/canvas-core/editor/selection/selectionTransforms.d.ts +6 -0
  50. package/_vendor/canvas-core/editor/shapes/shapeContainment.d.ts +14 -0
  51. package/_vendor/canvas-core/editor/{managers → shapes}/shapeEditingManager.d.ts +2 -2
  52. package/_vendor/canvas-core/editor/shapes/shapeExportTraversal.d.ts +3 -0
  53. package/_vendor/canvas-core/editor/shapes/shapeGeometry.d.ts +22 -0
  54. package/_vendor/canvas-core/editor/shapes/shapeGrouping.d.ts +22 -0
  55. package/_vendor/canvas-core/editor/{managers → shapes}/shapeOrder.d.ts +20 -2
  56. package/_vendor/canvas-core/editor/shapes/shapeReparenting.d.ts +21 -0
  57. package/_vendor/canvas-core/editor/shapes/shapeSignalManager.d.ts +33 -0
  58. package/_vendor/canvas-core/editor/{shapeTransformSpace.d.ts → shapes/shapeTransformSpace.d.ts} +3 -3
  59. package/_vendor/canvas-core/editor/shapes/shapeTreeQueries.d.ts +12 -0
  60. package/_vendor/canvas-core/editor/snapping/gapSnap.d.ts +6 -0
  61. package/_vendor/canvas-core/editor/snapping/pointSnap.d.ts +5 -0
  62. package/_vendor/canvas-core/editor/snapping/resizeSnap.d.ts +11 -0
  63. package/_vendor/canvas-core/editor/snapping/snapDecision.d.ts +2 -0
  64. package/_vendor/canvas-core/editor/{managers → snapping}/snapGeometry.d.ts +0 -1
  65. package/_vendor/canvas-core/editor/{managers → snapping}/snapIndicators.d.ts +2 -2
  66. package/_vendor/canvas-core/editor/{managers → snapping}/snapManager.d.ts +23 -5
  67. package/_vendor/canvas-core/editor/{managers/snapCalculations.d.ts → snapping/snapResults.d.ts} +2 -17
  68. package/_vendor/canvas-core/editor/{managers → snapping}/snapTypes.d.ts +1 -1
  69. package/_vendor/canvas-core/editor/state/editorReadModels.d.ts +34 -0
  70. package/_vendor/canvas-core/editor/state/editorSignals.d.ts +82 -0
  71. package/_vendor/canvas-core/editor/state/editorStateUtils.d.ts +9 -0
  72. package/_vendor/canvas-core/editor/{managers → state}/interactionTransientManager.d.ts +4 -4
  73. package/_vendor/canvas-core/editor/{managers → viewport}/cameraManager.d.ts +21 -4
  74. package/_vendor/canvas-core/editor/{cameraPanSession.d.ts → viewport/cameraPanSession.d.ts} +3 -3
  75. package/_vendor/canvas-core/editor/{edgeScroll.d.ts → viewport/edgeScroll.d.ts} +1 -1
  76. package/_vendor/canvas-core/editor/{renderWindow.d.ts → viewport/renderWindow.d.ts} +8 -8
  77. package/_vendor/canvas-core/editor/{managers → viewport}/renderWindowManager.d.ts +14 -6
  78. package/_vendor/canvas-core/geometry/box.d.ts +1 -0
  79. package/_vendor/canvas-core/index.d.ts +30 -25
  80. package/_vendor/canvas-core/plugins/editorRuntimePlugin.d.ts +2 -5
  81. package/_vendor/canvas-core/plugins/editorRuntimeRegistry.d.ts +0 -4
  82. package/_vendor/canvas-core/plugins/index.d.ts +1 -1
  83. package/_vendor/canvas-core/reactivity.d.ts +2 -0
  84. package/_vendor/canvas-core/schema/records.d.ts +1 -1
  85. package/_vendor/canvas-core/shapes/shapeUtil.d.ts +6 -5
  86. package/_vendor/canvas-core/shapes/shapeUtilGeometry.d.ts +6 -0
  87. package/_vendor/canvas-core/tools/hand/handTool.d.ts +1 -1
  88. package/_vendor/canvas-core/tools/select/selectTool.d.ts +1 -1
  89. package/_vendor/canvas-core/tools/select/selectToolHelpers.d.ts +11 -12
  90. package/_vendor/canvas-core/tools/select/states/brushingState.d.ts +2 -2
  91. package/_vendor/canvas-core/tools/select/states/draggingPluginInteractionState.d.ts +2 -3
  92. package/_vendor/canvas-core/tools/select/states/idleState.d.ts +2 -2
  93. package/_vendor/canvas-core/tools/select/states/pointingCanvasState.d.ts +2 -2
  94. package/_vendor/canvas-core/tools/select/states/pointingResizeHandleState.d.ts +1 -1
  95. package/_vendor/canvas-core/tools/select/states/pointingRotateHandleState.d.ts +1 -1
  96. package/_vendor/canvas-core/tools/select/states/pointingSelectionHandleInteractionState.d.ts +3 -3
  97. package/_vendor/canvas-core/tools/select/states/pointingShapeState.d.ts +3 -3
  98. package/_vendor/canvas-core/tools/select/states/resizingState.d.ts +3 -3
  99. package/_vendor/canvas-core/tools/select/states/rotatingState.d.ts +3 -3
  100. package/_vendor/canvas-core/tools/select/states/selectStateNode.d.ts +8 -12
  101. package/_vendor/canvas-core/tools/select/states/translatingState.d.ts +2 -3
  102. package/_vendor/canvas-core/tools/stateNode.d.ts +30 -0
  103. package/_vendor/canvas-core/tools/toolManager.d.ts +24 -0
  104. package/_vendor/canvas-core/utils/equality.d.ts +9 -0
  105. package/_vendor/canvas-extension-contracts/contributions.d.ts +92 -0
  106. package/_vendor/canvas-extension-contracts/index.d.ts +6 -0
  107. package/_vendor/canvas-extension-contracts/operations.d.ts +131 -0
  108. package/_vendor/canvas-extension-contracts/persistence.d.ts +16 -0
  109. package/_vendor/canvas-extension-contracts/plugin.d.ts +37 -0
  110. package/_vendor/canvas-extension-contracts/shape.d.ts +5 -0
  111. package/_vendor/canvas-extension-contracts/tokens.d.ts +12 -0
  112. package/_vendor/canvas-react/components/CanvasView.d.ts +3 -10
  113. package/_vendor/canvas-react/components/DefaultGrid.d.ts +1 -0
  114. package/_vendor/canvas-react/components/canvasKeyboardEvents.d.ts +2 -2
  115. package/_vendor/canvas-react/components/index.d.ts +1 -0
  116. package/_vendor/canvas-react/components/shape-layer/ShapeClipStack.d.ts +11 -0
  117. package/_vendor/canvas-react/components/shape-layer/ShapeDecorations.d.ts +1 -0
  118. package/_vendor/canvas-react/components/shape-layer/ShapeForegroundItem.d.ts +5 -0
  119. package/_vendor/canvas-react/components/shape-layer/ShapeItem.d.ts +5 -0
  120. package/_vendor/canvas-react/components/shape-layer/ShapeRenderList.d.ts +1 -0
  121. package/_vendor/canvas-react/components/shape-layer/ShapeRenderer.d.ts +12 -0
  122. package/_vendor/canvas-react/components/shape-layer/shapeFrame.d.ts +11 -0
  123. package/_vendor/canvas-react/components/useCanvasDomEvents.d.ts +2 -2
  124. package/_vendor/canvas-react/dom.d.ts +1 -1
  125. package/_vendor/canvas-react/host/ShapeHeadingControl.d.ts +33 -0
  126. package/_vendor/canvas-react/host/canvasRenderBindings.d.ts +21 -0
  127. package/_vendor/canvas-react/host/canvasRenderBindingsContext.d.ts +5 -0
  128. package/_vendor/canvas-react/host/canvasRenderPlugin.d.ts +3 -12
  129. package/_vendor/canvas-react/host/index.d.ts +6 -7
  130. package/_vendor/canvas-react/index.d.ts +1 -1
  131. package/_vendor/signals/atom.d.ts +7 -5
  132. package/_vendor/signals/computed.d.ts +10 -8
  133. package/_vendor/signals/core.d.ts +32 -15
  134. package/_vendor/signals/effect.d.ts +2 -22
  135. package/_vendor/signals/index.d.ts +6 -7
  136. package/_vendor/signals/types.d.ts +14 -7
  137. package/_vendor/store/diff.d.ts +1 -1
  138. package/_vendor/store/history.d.ts +6 -21
  139. package/_vendor/store/index.d.ts +4 -4
  140. package/_vendor/store/store.d.ts +19 -17
  141. package/browser/indexedDb.d.ts +0 -4
  142. package/browser/persistence.d.ts +3 -3
  143. package/browser/persistenceFlushEvents.d.ts +2 -0
  144. package/chrome/floating/CanvasKitFloatingContent.d.ts +10 -0
  145. package/chrome/floating/CanvasKitFloatingPortal.d.ts +1 -0
  146. package/chrome/floating/useCanvasKitFloatingPosition.d.ts +5 -3
  147. package/chrome/toolbar/FloatingSelectionToolbarPageSpace.d.ts +7 -3
  148. package/host-VhUj_Gf6.mjs +48 -0
  149. package/index.css +1 -1
  150. package/index.d.ts +16 -47
  151. package/index.mjs +6 -88
  152. package/package.json +8 -15
  153. package/plugin-runtime.d.ts +3 -0
  154. package/plugin-runtime.mjs +1 -0
  155. package/react/CanvasKitContext.d.ts +8 -0
  156. package/react/CanvasKitRoot.d.ts +2 -11
  157. package/react/canvasActions.d.ts +3 -0
  158. package/react/canvasKitRootContracts.d.ts +19 -0
  159. package/react/host/CanvasKitCanvasHost.d.ts +7 -0
  160. package/react/host/import/CanvasImportHost.d.ts +13 -0
  161. package/react/host/keyboard/useCanvasKeyboardShortcuts.d.ts +8 -0
  162. package/react/reportCanvasHostError.d.ts +1 -0
  163. package/react/useCanvasKitRootRuntime.d.ts +12 -0
  164. package/runtime/activateCanvasPlugins.d.ts +16 -0
  165. package/runtime/canvasExportController.d.ts +11 -0
  166. package/runtime/canvasKit.d.ts +3 -0
  167. package/runtime/canvasKitContracts.d.ts +208 -0
  168. package/runtime/canvasKitRootRuntime.d.ts +17 -0
  169. package/runtime/canvasPluginGraph.d.ts +5 -11
  170. package/runtime/canvasRuntimeInitialization.d.ts +12 -0
  171. package/runtime/canvasRuntimeOwner.d.ts +16 -0
  172. package/runtime/createCanvasKitEditor.d.ts +1 -0
  173. package/runtime/facade/canvasProductData.d.ts +14 -0
  174. package/runtime/facade/canvasReadable.d.ts +13 -0
  175. package/runtime/facade/createCanvasKitFacade.d.ts +17 -0
  176. package/runtime/facade/layerTree.d.ts +12 -0
  177. package/runtime/persistenceCoordinator.d.ts +22 -5
  178. package/runtime/registries/productApiRegistry.d.ts +12 -3
  179. package/_vendor/canvas-core/editor/bindingReactionScope.d.ts +0 -7
  180. package/_vendor/canvas-core/editor/canvasPanInteraction.d.ts +0 -2
  181. package/_vendor/canvas-core/editor/createEditorWithPlugins.d.ts +0 -6
  182. package/_vendor/canvas-core/editor/editorComputedHelpers.d.ts +0 -24
  183. package/_vendor/canvas-core/editor/editorSelectionTransforms.d.ts +0 -6
  184. package/_vendor/canvas-core/editor/historyManager.d.ts +0 -36
  185. package/_vendor/canvas-core/editor/index.d.ts +0 -11
  186. package/_vendor/canvas-core/editor/managers/bindingManager.d.ts +0 -27
  187. package/_vendor/canvas-core/editor/managers/clipboardManager.d.ts +0 -14
  188. package/_vendor/canvas-core/editor/managers/documentSnapshotManager.d.ts +0 -28
  189. package/_vendor/canvas-core/editor/managers/queryManager.d.ts +0 -102
  190. package/_vendor/canvas-core/editor/managers/queryState.d.ts +0 -18
  191. package/_vendor/canvas-core/editor/managers/selectionLayoutManager.d.ts +0 -34
  192. package/_vendor/canvas-core/editor/managers/selectionManager.d.ts +0 -21
  193. package/_vendor/canvas-core/editor/managers/selectionOverlayManager.d.ts +0 -25
  194. package/_vendor/canvas-core/editor/managers/shapeGeometryManager.d.ts +0 -43
  195. package/_vendor/canvas-core/editor/managers/shapeHierarchyManager.d.ts +0 -63
  196. package/_vendor/canvas-core/editor/managers/shapeReparenting.d.ts +0 -7
  197. package/_vendor/canvas-core/editor/managers/shortcutManager.d.ts +0 -56
  198. package/_vendor/canvas-core/editor/managers/sideEffectManager.d.ts +0 -23
  199. package/_vendor/canvas-core/editor/managers/toolManager.d.ts +0 -24
  200. package/_vendor/canvas-core/editor/selectionHandleInteractions.d.ts +0 -11
  201. package/_vendor/canvas-core/editor/selectionOverlay.d.ts +0 -35
  202. package/_vendor/canvas-core/editor/stateNode.d.ts +0 -31
  203. package/_vendor/canvas-core/shapes/capabilities.d.ts +0 -25
  204. package/_vendor/canvas-core/tools/index.d.ts +0 -2
  205. package/_vendor/canvas-plugin-sdk/capability.d.ts +0 -10
  206. package/_vendor/canvas-plugin-sdk/index.d.ts +0 -3
  207. package/_vendor/canvas-plugin-sdk/plugin.d.ts +0 -29
  208. package/_vendor/canvas-plugin-sdk/setupExtension.d.ts +0 -5
  209. package/_vendor/canvas-product-contracts/actionRegistry.d.ts +0 -4
  210. package/_vendor/canvas-product-contracts/actions.d.ts +0 -44
  211. package/_vendor/canvas-product-contracts/capability.d.ts +0 -8
  212. package/_vendor/canvas-product-contracts/chrome.d.ts +0 -53
  213. package/_vendor/canvas-product-contracts/chromeRegistry.d.ts +0 -9
  214. package/_vendor/canvas-product-contracts/contextMenu.d.ts +0 -63
  215. package/_vendor/canvas-product-contracts/contextMenuRegistry.d.ts +0 -4
  216. package/_vendor/canvas-product-contracts/exportRegistry.d.ts +0 -6
  217. package/_vendor/canvas-product-contracts/exports.d.ts +0 -27
  218. package/_vendor/canvas-product-contracts/importRegistry.d.ts +0 -7
  219. package/_vendor/canvas-product-contracts/imports.d.ts +0 -39
  220. package/_vendor/canvas-product-contracts/index.d.ts +0 -15
  221. package/_vendor/canvas-product-contracts/productApi.d.ts +0 -29
  222. package/_vendor/canvas-product-contracts/services.d.ts +0 -21
  223. package/_vendor/canvas-product-contracts/toolbar.d.ts +0 -146
  224. package/_vendor/canvas-product-contracts/toolbarRegistry.d.ts +0 -9
  225. package/_vendor/canvas-react/host/canvasOverlayRegistryContext.d.ts +0 -3
  226. package/_vendor/canvas-react/host/canvasRenderRuntime.d.ts +0 -13
  227. package/_vendor/canvas-react/host/canvasRendererRegistryContext.d.ts +0 -3
  228. package/_vendor/canvas-react/host/domEventGuards.d.ts +0 -11
  229. package/_vendor/canvas-react/host/overlayRegistry.d.ts +0 -18
  230. package/_vendor/canvas-react/host/rendererRegistry.d.ts +0 -15
  231. package/_vendor/plugin-arrow/api.d.ts +0 -33
  232. package/_vendor/plugin-arrow/arrowBindingAnchors.d.ts +0 -5
  233. package/_vendor/plugin-arrow/arrowBindingGeometry.d.ts +0 -28
  234. package/_vendor/plugin-arrow/arrowBindingTargets.d.ts +0 -3
  235. package/_vendor/plugin-arrow/arrowBindingUtil.d.ts +0 -27
  236. package/_vendor/plugin-arrow/arrowGeometry.d.ts +0 -77
  237. package/_vendor/plugin-arrow/arrowHeadGeometry.d.ts +0 -8
  238. package/_vendor/plugin-arrow/arrowShapeUtil.d.ts +0 -25
  239. package/_vendor/plugin-arrow/arrowTerminalBindingResolver.d.ts +0 -20
  240. package/_vendor/plugin-arrow/arrowTerminalCommands.d.ts +0 -13
  241. package/_vendor/plugin-arrow/arrowTool.d.ts +0 -4
  242. package/_vendor/plugin-arrow/canvasRender.d.ts +0 -2
  243. package/_vendor/plugin-arrow/editorRuntime.d.ts +0 -7
  244. package/_vendor/plugin-arrow/feature.d.ts +0 -2
  245. package/_vendor/plugin-arrow/index.d.ts +0 -15
  246. package/_vendor/plugin-arrow/productRuntime.d.ts +0 -2
  247. package/_vendor/plugin-arrow/selectionHandleInteractions.d.ts +0 -3
  248. package/_vendor/plugin-arrow/types.d.ts +0 -31
  249. package/_vendor/plugin-draw/DrawShapeRenderer.d.ts +0 -13
  250. package/_vendor/plugin-draw/canvasRender.d.ts +0 -2
  251. package/_vendor/plugin-draw/drawGeometry.d.ts +0 -42
  252. package/_vendor/plugin-draw/drawHitTest.d.ts +0 -11
  253. package/_vendor/plugin-draw/drawInterpolation.d.ts +0 -5
  254. package/_vendor/plugin-draw/drawPath.d.ts +0 -43
  255. package/_vendor/plugin-draw/drawSegments.d.ts +0 -11
  256. package/_vendor/plugin-draw/drawSelectionTransform.d.ts +0 -18
  257. package/_vendor/plugin-draw/drawShapeGeometry.d.ts +0 -33
  258. package/_vendor/plugin-draw/drawShapeUtil.d.ts +0 -22
  259. package/_vendor/plugin-draw/drawStrokeGeometry.d.ts +0 -17
  260. package/_vendor/plugin-draw/drawTool.d.ts +0 -6
  261. package/_vendor/plugin-draw/editorRuntime.d.ts +0 -7
  262. package/_vendor/plugin-draw/feature.d.ts +0 -2
  263. package/_vendor/plugin-draw/index.d.ts +0 -14
  264. package/_vendor/plugin-draw/productRuntime.d.ts +0 -2
  265. package/_vendor/plugin-draw/types.d.ts +0 -23
  266. package/_vendor/plugin-eraser/canvasRender.d.ts +0 -2
  267. package/_vendor/plugin-eraser/editorRuntime.d.ts +0 -2
  268. package/_vendor/plugin-eraser/eraserRuntime.d.ts +0 -12
  269. package/_vendor/plugin-eraser/eraserTool.d.ts +0 -5
  270. package/_vendor/plugin-eraser/feature.d.ts +0 -2
  271. package/_vendor/plugin-eraser/index.d.ts +0 -6
  272. package/_vendor/plugin-eraser/productRuntime.d.ts +0 -2
  273. package/_vendor/plugin-frame/api.d.ts +0 -19
  274. package/_vendor/plugin-frame/canvasRender.d.ts +0 -9
  275. package/_vendor/plugin-frame/editorRuntime.d.ts +0 -7
  276. package/_vendor/plugin-frame/feature.d.ts +0 -2
  277. package/_vendor/plugin-frame/frameShapeUtil.d.ts +0 -35
  278. package/_vendor/plugin-frame/frameTool.d.ts +0 -6
  279. package/_vendor/plugin-frame/index.d.ts +0 -9
  280. package/_vendor/plugin-frame/productRuntime.d.ts +0 -2
  281. package/_vendor/plugin-geo/api.d.ts +0 -27
  282. package/_vendor/plugin-geo/canvasRender.d.ts +0 -13
  283. package/_vendor/plugin-geo/editorRuntime.d.ts +0 -7
  284. package/_vendor/plugin-geo/feature.d.ts +0 -2
  285. package/_vendor/plugin-geo/geoGeometry.d.ts +0 -24
  286. package/_vendor/plugin-geo/geoShapeUtil.d.ts +0 -14
  287. package/_vendor/plugin-geo/geoStrokeStyle.d.ts +0 -2
  288. package/_vendor/plugin-geo/geoTools.d.ts +0 -27
  289. package/_vendor/plugin-geo/index.d.ts +0 -10
  290. package/_vendor/plugin-geo/productRuntime.d.ts +0 -2
  291. package/_vendor/plugin-geo/types.d.ts +0 -22
  292. package/_vendor/plugin-group/canvasRender.d.ts +0 -9
  293. package/_vendor/plugin-group/editorRuntime.d.ts +0 -7
  294. package/_vendor/plugin-group/feature.d.ts +0 -2
  295. package/_vendor/plugin-group/groupContributions.d.ts +0 -7
  296. package/_vendor/plugin-group/groupShapeUtil.d.ts +0 -35
  297. package/_vendor/plugin-group/index.d.ts +0 -7
  298. package/_vendor/plugin-group/productRuntime.d.ts +0 -2
  299. package/_vendor/plugin-image/actionIds.d.ts +0 -9
  300. package/_vendor/plugin-image/canvasRender.d.ts +0 -2
  301. package/_vendor/plugin-image/cornerRadius.d.ts +0 -6
  302. package/_vendor/plugin-image/crop.d.ts +0 -112
  303. package/_vendor/plugin-image/cropInteractions.d.ts +0 -3
  304. package/_vendor/plugin-image/cropRuntime.d.ts +0 -2
  305. package/_vendor/plugin-image/cropSession.d.ts +0 -6
  306. package/_vendor/plugin-image/editorRuntime.d.ts +0 -3
  307. package/_vendor/plugin-image/feature.d.ts +0 -2
  308. package/_vendor/plugin-image/imageHostActionContract.d.ts +0 -2
  309. package/_vendor/plugin-image/imageShapeUtil.d.ts +0 -13
  310. package/_vendor/plugin-image/imageSvgExporter.d.ts +0 -6
  311. package/_vendor/plugin-image/index.d.ts +0 -13
  312. package/_vendor/plugin-image/productRuntime.d.ts +0 -4
  313. package/_vendor/plugin-image/runtimeShared.d.ts +0 -5
  314. package/_vendor/plugin-image/smudge.d.ts +0 -67
  315. package/_vendor/plugin-image/smudgeInteractions.d.ts +0 -2
  316. package/_vendor/plugin-image/smudgeRuntime.d.ts +0 -2
  317. package/_vendor/plugin-image/styleRuntime.d.ts +0 -22
  318. package/_vendor/plugin-image/toolbarRuntime.d.ts +0 -3
  319. package/_vendor/plugin-image/types.d.ts +0 -53
  320. package/_vendor/plugin-laser/canvasRender.d.ts +0 -2
  321. package/_vendor/plugin-laser/editorRuntime.d.ts +0 -2
  322. package/_vendor/plugin-laser/feature.d.ts +0 -2
  323. package/_vendor/plugin-laser/index.d.ts +0 -6
  324. package/_vendor/plugin-laser/laserRuntime.d.ts +0 -18
  325. package/_vendor/plugin-laser/laserTool.d.ts +0 -4
  326. package/_vendor/plugin-laser/productRuntime.d.ts +0 -2
  327. package/_vendor/plugin-path/PathDraftOverlay.d.ts +0 -1
  328. package/_vendor/plugin-path/PathEditInsertPreviewOverlay.d.ts +0 -1
  329. package/_vendor/plugin-path/PathShapeRenderer.d.ts +0 -15
  330. package/_vendor/plugin-path/canvasRender.d.ts +0 -2
  331. package/_vendor/plugin-path/editorRuntime.d.ts +0 -7
  332. package/_vendor/plugin-path/feature.d.ts +0 -2
  333. package/_vendor/plugin-path/index.d.ts +0 -8
  334. package/_vendor/plugin-path/pathBoolean.d.ts +0 -13
  335. package/_vendor/plugin-path/pathDraft.d.ts +0 -10
  336. package/_vendor/plugin-path/pathEditPreview.d.ts +0 -11
  337. package/_vendor/plugin-path/pathEditSelection.d.ts +0 -24
  338. package/_vendor/plugin-path/pathEditSnap.d.ts +0 -6
  339. package/_vendor/plugin-path/pathGeometry.d.ts +0 -74
  340. package/_vendor/plugin-path/pathHandles.d.ts +0 -18
  341. package/_vendor/plugin-path/pathHistory.d.ts +0 -13
  342. package/_vendor/plugin-path/pathInteractions.d.ts +0 -7
  343. package/_vendor/plugin-path/pathShapeUtil.d.ts +0 -30
  344. package/_vendor/plugin-path/pathSvg.d.ts +0 -3
  345. package/_vendor/plugin-path/pathTool.d.ts +0 -42
  346. package/_vendor/plugin-path/productRuntime.d.ts +0 -15
  347. package/_vendor/plugin-path/types.d.ts +0 -36
  348. package/_vendor/plugin-runtime-clipboard/capability.d.ts +0 -1
  349. package/_vendor/plugin-runtime-clipboard/clipboardActions.d.ts +0 -6
  350. package/_vendor/plugin-runtime-clipboard/clipboardService.d.ts +0 -10
  351. package/_vendor/plugin-runtime-clipboard/index.d.ts +0 -4
  352. package/_vendor/plugin-runtime-clipboard/plugin.d.ts +0 -1
  353. package/_vendor/plugin-runtime-export/blobDataUrl.d.ts +0 -1
  354. package/_vendor/plugin-runtime-export/canvasExportApi.d.ts +0 -43
  355. package/_vendor/plugin-runtime-export/index.d.ts +0 -8
  356. package/_vendor/plugin-runtime-export/plugin.d.ts +0 -5
  357. package/_vendor/plugin-runtime-export/pngExport.d.ts +0 -15
  358. package/_vendor/plugin-runtime-export/svgExport.d.ts +0 -40
  359. package/_vendor/plugin-text/api.d.ts +0 -20
  360. package/_vendor/plugin-text/canvasRender.d.ts +0 -8
  361. package/_vendor/plugin-text/capabilities.d.ts +0 -2
  362. package/_vendor/plugin-text/editorRuntime.d.ts +0 -5
  363. package/_vendor/plugin-text/feature.d.ts +0 -4
  364. package/_vendor/plugin-text/geoLabelBindingUtil.d.ts +0 -48
  365. package/_vendor/plugin-text/host/RichTextEditingBox.d.ts +0 -10
  366. package/_vendor/plugin-text/host/TiptapTextEditor.d.ts +0 -29
  367. package/_vendor/plugin-text/host/initialTextBackground.d.ts +0 -2
  368. package/_vendor/plugin-text/host/richTextRendering.d.ts +0 -10
  369. package/_vendor/plugin-text/host/textDomSelection.d.ts +0 -7
  370. package/_vendor/plugin-text/host/textEditingBoxStyle.d.ts +0 -4
  371. package/_vendor/plugin-text/host/textEntryFocus.d.ts +0 -23
  372. package/_vendor/plugin-text/host/textFontLoader.d.ts +0 -3
  373. package/_vendor/plugin-text/host/textFormattingApi.d.ts +0 -16
  374. package/_vendor/plugin-text/host/textMeasurement.d.ts +0 -21
  375. package/_vendor/plugin-text/host/textMeasurementSync.d.ts +0 -11
  376. package/_vendor/plugin-text/host/textRangeSelection.d.ts +0 -14
  377. package/_vendor/plugin-text/host/textShapeRendererRuntime.d.ts +0 -11
  378. package/_vendor/plugin-text/host/textShapeSync.d.ts +0 -19
  379. package/_vendor/plugin-text/host/tiptapTextEditorController.d.ts +0 -38
  380. package/_vendor/plugin-text/index.d.ts +0 -15
  381. package/_vendor/plugin-text/pathLabelBindingUtil.d.ts +0 -55
  382. package/_vendor/plugin-text/productRuntime.d.ts +0 -6
  383. package/_vendor/plugin-text/richTextLinks.d.ts +0 -3
  384. package/_vendor/plugin-text/richTextUtils.d.ts +0 -26
  385. package/_vendor/plugin-text/shapeWideTextFormatting.d.ts +0 -12
  386. package/_vendor/plugin-text/textFonts.d.ts +0 -49
  387. package/_vendor/plugin-text/textFormatting.d.ts +0 -47
  388. package/_vendor/plugin-text/textFormattingSession.d.ts +0 -6
  389. package/_vendor/plugin-text/textInteractions.d.ts +0 -2
  390. package/_vendor/plugin-text/textLabelHelpers.d.ts +0 -70
  391. package/_vendor/plugin-text/textLinkPopoverPresentation.d.ts +0 -18
  392. package/_vendor/plugin-text/textShapeHelpers.d.ts +0 -21
  393. package/_vendor/plugin-text/textShapeSvgExporter.d.ts +0 -9
  394. package/_vendor/plugin-text/textShapeUtil.d.ts +0 -24
  395. package/_vendor/plugin-text/textStyle.d.ts +0 -18
  396. package/_vendor/plugin-text/textTool.d.ts +0 -4
  397. package/_vendor/plugin-text/textTypes.d.ts +0 -29
  398. package/canvasKitTools.d.ts +0 -3
  399. package/chrome/contextMenuRuntime.d.ts +0 -7
  400. package/chrome/toolbar/mergeToolbarGroups.d.ts +0 -8
  401. package/chrome/toolbar/toolbarLabels.d.ts +0 -8
  402. package/chrome/toolbar/useToolbarSurfaces.d.ts +0 -21
  403. package/chrome/types.d.ts +0 -71
  404. package/chrome/useCanvasKitChromeContext.d.ts +0 -18
  405. package/chrome/useCanvasKitLayerTree.d.ts +0 -6
  406. package/chrome/useChromeSurfaces.d.ts +0 -12
  407. package/chrome/useContextMenuSurface.d.ts +0 -12
  408. package/chrome/useHistoryControls.d.ts +0 -12
  409. package/chrome/usePageControls.d.ts +0 -16
  410. package/chrome/useZoomControls.d.ts +0 -13
  411. package/commands/command.d.ts +0 -11
  412. package/commands/commandTokens.d.ts +0 -61
  413. package/commands/documentCommands.d.ts +0 -2
  414. package/commands/historyCommands.d.ts +0 -3
  415. package/commands/index.d.ts +0 -11
  416. package/commands/layerCommands.d.ts +0 -20
  417. package/commands/pageCommands.d.ts +0 -12
  418. package/commands/selectionCommands.d.ts +0 -12
  419. package/commands/shapeCommands.d.ts +0 -8
  420. package/commands/toolCommands.d.ts +0 -2
  421. package/commands/viewCommands.d.ts +0 -10
  422. package/contracts/canvasProductControllerContracts.d.ts +0 -32
  423. package/controller/canvasProductController.d.ts +0 -174
  424. package/controller/index.d.ts +0 -3
  425. package/controller/layerTree.d.ts +0 -10
  426. package/plugins/host/image/api/imageHostApi.d.ts +0 -11
  427. package/plugins/host/image/api/imageHostApiContract.d.ts +0 -60
  428. package/plugins/host/image/asset/imageAssetService.d.ts +0 -11
  429. package/plugins/host/image/asset/imageBlobStore.d.ts +0 -31
  430. package/plugins/host/image/asset/imageFileHelpers.d.ts +0 -43
  431. package/plugins/host/image/asset/svgImageAssetInliner.d.ts +0 -3
  432. package/plugins/host/image/import/ImageImportController.d.ts +0 -11
  433. package/plugins/host/image/index.d.ts +0 -15
  434. package/plugins/host/image/plugin.d.ts +0 -1
  435. package/plugins/host/image/smudge/imageSmudgeHostActions.d.ts +0 -10
  436. package/plugins/host/image/toolbar/imageHostActions.d.ts +0 -63
  437. package/plugins/host/image/toolbar/imageToolbarHostBridge.d.ts +0 -14
  438. package/plugins/host/text/link/TextLinkHoverPopover.d.ts +0 -6
  439. package/plugins/host/text/textHostPlugin.d.ts +0 -5
  440. package/plugins/host/text/textSvgAssetInliner.d.ts +0 -3
  441. package/plugins/host/text/textSvgAssetPlugin.d.ts +0 -2
  442. package/plugins/runtime/import-host/CanvasImportHost.d.ts +0 -4
  443. package/plugins/runtime/import-host/capability.d.ts +0 -1
  444. package/plugins/runtime/import-host/index.d.ts +0 -2
  445. package/plugins/runtime/import-host/plugin.d.ts +0 -1
  446. package/plugins/runtime/keyboard-shortcuts/index.d.ts +0 -1
  447. package/plugins/runtime/keyboard-shortcuts/plugin.d.ts +0 -1
  448. package/plugins/runtime/keyboard-shortcuts/useCanvasKeyboardShortcuts.d.ts +0 -6
  449. package/plugins/runtime/tool-actions/capability.d.ts +0 -1
  450. package/plugins/runtime/tool-actions/index.d.ts +0 -2
  451. package/plugins/runtime/tool-actions/plugin.d.ts +0 -1
  452. package/plugins/runtime/tool-actions/toolActions.d.ts +0 -2
  453. package/plugins/standard/clipboard/chrome.d.ts +0 -2
  454. package/plugins/standard/clipboard/contextMenu.d.ts +0 -2
  455. package/plugins/standard/clipboard/plugin.d.ts +0 -1
  456. package/plugins/standard/clipboard/shortcuts.d.ts +0 -5
  457. package/plugins/standard/createStandardCanvasKitPlugins.d.ts +0 -15
  458. package/plugins/standard/selection/actions.d.ts +0 -21
  459. package/plugins/standard/selection/chrome.d.ts +0 -2
  460. package/plugins/standard/selection/contextMenu.d.ts +0 -2
  461. package/plugins/standard/selection/plugin.d.ts +0 -1
  462. package/plugins/standard/selection/toolbar.d.ts +0 -2
  463. package/plugins/standard/tool-ui/contextMenu.d.ts +0 -2
  464. package/plugins/standard/tool-ui/plugin.d.ts +0 -1
  465. package/plugins/standard/tool-ui/toolbar.d.ts +0 -2
  466. package/plugins/standard/view/actions.d.ts +0 -5
  467. package/plugins/standard/view/chrome.d.ts +0 -2
  468. package/plugins/standard/view/contextMenu.d.ts +0 -2
  469. package/plugins/standard/view/plugin.d.ts +0 -1
  470. package/react/useCanvasKitRuntime.d.ts +0 -2
  471. package/react/useCanvasProductControllerLifecycle.d.ts +0 -9
  472. package/runtime/canvasKitActionContext.d.ts +0 -17
  473. package/runtime/canvasKitActionExecutor.d.ts +0 -12
  474. package/runtime/canvasKitCommandExecutor.d.ts +0 -22
  475. package/runtime/canvasKitPluginContracts.d.ts +0 -28
  476. package/runtime/canvasKitPluginLifecycle.d.ts +0 -32
  477. package/runtime/canvasKitPluginSetup.d.ts +0 -35
  478. package/runtime/canvasKitPluginUi.d.ts +0 -37
  479. package/runtime/canvasKitResourceScope.d.ts +0 -5
  480. package/runtime/canvasKitRuntime.d.ts +0 -59
  481. package/runtime/canvasKitRuntimeContracts.d.ts +0 -35
  482. package/runtime/createCanvasKitCommandAction.d.ts +0 -10
  483. package/runtime/persistenceContracts.d.ts +0 -12
  484. package/runtime/productAssetResolvers.d.ts +0 -29
  485. package/runtime/productServiceRegistry.d.ts +0 -8
  486. package/runtime/registries/actionRegistry.d.ts +0 -5
  487. package/runtime/registries/chromeRegistry.d.ts +0 -2
  488. package/runtime/registries/contextMenuRegistry.d.ts +0 -5
  489. package/runtime/registries/exportRegistry.d.ts +0 -2
  490. package/runtime/registries/importRegistry.d.ts +0 -2
  491. package/runtime/registries/index.d.ts +0 -7
  492. package/runtime/registries/toolbarRegistry.d.ts +0 -5
  493. /package/_vendor/canvas-core/editor/{selectionBindingSegments.d.ts → selection/selectionBindingSegments.d.ts} +0 -0
  494. /package/_vendor/canvas-core/editor/{managers → snapping}/snapSnapshotBuilder.d.ts +0 -0
  495. /package/_vendor/canvas-core/editor/{camera.d.ts → viewport/camera.d.ts} +0 -0
@@ -1,24 +1,37 @@
1
- import { type Signal } from "../../../signals/index";
1
+ import type { Signal } from "../../../signals/index";
2
2
  import type { ChangeSource } from "../../../store/index";
3
3
  import { Vec } from "../../geometry/vec";
4
4
  import { type Camera } from "../../schema/records";
5
5
  import type { PageId } from "../../schema/records";
6
6
  import type { Editor } from "../editor";
7
+ export interface CameraAnimationScheduler {
8
+ requestFrame(callback: (timestamp: number) => void): unknown;
9
+ cancelFrame(handle: unknown): void;
10
+ prefersReducedMotion?(): boolean;
11
+ }
12
+ export interface CameraAnimationOptions {
13
+ durationMs: number;
14
+ pageId?: PageId;
15
+ source?: ChangeSource;
16
+ }
7
17
  /**
8
18
  * Camera and viewport-screen-size state for the editor. Owns the viewport size
9
19
  * atom (viewport + camera together define the page<->screen transform) and the
10
20
  * camera read/write/transform operations carved out of the Editor facade so the
11
- * editor can stay a thinner delegating surface. The Editor exposes thin wrappers
12
- * that forward here and re-publishes {@link viewportScreenSizeSignal}.
21
+ * editor can stay a thinner delegating surface. Editor publishes the owned
22
+ * viewport signal through its grouped state facade.
13
23
  */
14
24
  export declare class CameraManager {
15
25
  private readonly editor;
26
+ private readonly animationScheduler?;
16
27
  private readonly _viewportScreenSizeSignal;
17
28
  readonly viewportScreenSizeSignal: Signal<{
18
29
  w: number;
19
30
  h: number;
20
31
  }>;
21
- constructor(editor: Editor);
32
+ private animationFrame;
33
+ private animationGeneration;
34
+ constructor(editor: Editor, animationScheduler?: CameraAnimationScheduler | undefined);
22
35
  getCurrentCamera(): Camera;
23
36
  getCamera(pageId?: PageId): Camera;
24
37
  pageToScreen(point: Vec, pageId?: PageId): Vec;
@@ -27,6 +40,10 @@ export declare class CameraManager {
27
40
  pageId?: PageId;
28
41
  source?: ChangeSource;
29
42
  }): void;
43
+ animateCameraTo(target: Camera, options: CameraAnimationOptions): void;
44
+ cancelAnimation(): void;
45
+ dispose(): void;
46
+ private writeCamera;
30
47
  panCamera(delta: Vec, source?: ChangeSource): void;
31
48
  zoomCameraAtScreenPoint(screenPoint: Vec, deltaY: number, source?: ChangeSource): void;
32
49
  zoomCameraToScreenPoint(screenPoint: Vec, zoom: number, source?: ChangeSource): void;
@@ -1,6 +1,6 @@
1
- import type { Vec } from "../geometry/vec";
2
- import type { Camera } from "../schema/records";
3
- import type { Editor } from "./editor";
1
+ import type { Vec } from "../../geometry/vec";
2
+ import type { Camera } from "../../schema/records";
3
+ import type { Editor } from "../editor";
4
4
  export interface CameraPanSession {
5
5
  originScreenPoint: Vec;
6
6
  originCamera: Camera;
@@ -1,4 +1,4 @@
1
- import { Vec } from "../geometry/vec";
1
+ import { Vec } from "../../geometry/vec";
2
2
  export declare function getEdgeScrollDelta(screenPoint: Vec, viewportSize: {
3
3
  w: number;
4
4
  h: number;
@@ -1,5 +1,11 @@
1
- import { Box } from "../geometry/box";
2
- import type { ShapeId } from "../schema/records";
1
+ import { Box } from "../../geometry/box";
2
+ import type { ShapeId, ShapeRecord } from "../../schema/records";
3
+ export interface RenderItem {
4
+ id: ShapeId;
5
+ shape: ShapeRecord;
6
+ bounds: Box;
7
+ isSelected: boolean;
8
+ }
3
9
  export declare const RENDER_CULLING_OVERSCAN_SCREEN = 160;
4
10
  export interface ShapeIndexRange {
5
11
  start: number;
@@ -11,7 +17,6 @@ export interface ShapeWindowSnapshot {
11
17
  shapeIds: ShapeId[];
12
18
  }
13
19
  export declare function doesBoxContainBox(outer: Box, inner: Box): boolean;
14
- export declare function formatShapeIndexRanges(ranges: ShapeIndexRange[]): string;
15
20
  export declare function getRetainedRenderWindowExtraShapeBudget(culledShapeCount: number): number;
16
21
  export declare function mergeShapeIndexRanges(ranges: ShapeIndexRange[], gapAllowance?: number): ShapeIndexRange[];
17
22
  export declare function doRangesContainRanges(outerRanges: ShapeIndexRange[], innerRanges: ShapeIndexRange[]): boolean;
@@ -22,9 +27,4 @@ export declare function getShapeIndexRangesForShapeIds(shapeIds: ShapeId[], page
22
27
  export declare function getShapeWindowSnapshot(pageShapeIds: ShapeId[], ranges: ShapeIndexRange[], options?: {
23
28
  viewportReady?: boolean;
24
29
  }): ShapeWindowSnapshot;
25
- export declare function getShapeIdArrayChangeCounts(previous: ShapeId[], next: ShapeId[]): {
26
- changed: number;
27
- added: number;
28
- removed: number;
29
- };
30
30
  export declare function collectRetainedShapeRanges(pageShapeIds: ShapeId[], culledShapeIds: ShapeId[], selectedIds: Set<ShapeId>, extraShapeBudget: number): ShapeIndexRange[];
@@ -1,12 +1,21 @@
1
1
  import { type Signal } from "../../../signals/index";
2
- import type { ShapeId } from "../../schema/records";
3
- import type { Editor, EditorRenderHostDebugState, RenderItem } from "../editor";
2
+ import type { Box } from "../../geometry/box";
3
+ import type { PageId, ShapeId } from "../../schema/records";
4
+ import type { Editor } from "../editor";
5
+ import { type RenderItem } from "./renderWindow";
6
+ interface RenderWindowSignals {
7
+ currentPageId: Signal<PageId>;
8
+ currentPageShapeIds: Signal<ShapeId[]>;
9
+ selectedShapeIds: Signal<ShapeId[]>;
10
+ selectedShapeIdSet: Signal<Set<ShapeId>>;
11
+ viewportPageBounds: Signal<Box | null>;
12
+ renderViewportPageBounds: Signal<Box | null>;
13
+ }
4
14
  /**
5
15
  * Render culling and retained-window signals for the editor render host. The
6
16
  * Editor exposes thin signal aliases that forward here.
7
17
  */
8
18
  export declare class RenderWindowManager {
9
- private readonly editor;
10
19
  readonly shapeRenderOrderByIdSignal: Signal<Map<ShapeId, number>>;
11
20
  readonly culledShapeIdsSignal: Signal<ShapeId[]>;
12
21
  readonly culledShapeIdSetSignal: Signal<Set<ShapeId>>;
@@ -16,10 +25,9 @@ export declare class RenderWindowManager {
16
25
  readonly retainedShapeIdsSignal: Signal<ShapeId[]>;
17
26
  readonly renderVisibleShapeIdSetSignal: Signal<Set<ShapeId>>;
18
27
  readonly renderItemsSignal: Signal<RenderItem[]>;
19
- readonly renderHostDebugStateSignal: Signal<EditorRenderHostDebugState>;
20
28
  private readonly retainedBaseShapeWindowSnapshotSignal;
21
29
  private readonly retainedShapeWindowSnapshotSignal;
22
- private readonly renderHostDebugStateSnapshotSignal;
23
- constructor(editor: Editor);
30
+ constructor(editor: Editor, signals: RenderWindowSignals);
24
31
  private getPageIndexById;
25
32
  }
33
+ export {};
@@ -17,3 +17,4 @@ export declare class Box {
17
17
  clone(): Box;
18
18
  static FromPoints(points: Vec[]): Box;
19
19
  }
20
+ export declare function isValidBox(box: Box): boolean;
@@ -1,30 +1,36 @@
1
- export { Editor } from "./editor/editor";
2
- export { createEditorWithPlugins, type CreateEditorWithPluginsOptions, } from "./editor/createEditorWithPlugins";
3
- export { HistoryManager, type HistoryScope, type HistoryScopeState, type HistoryState, } from "./editor/historyManager";
4
- export { EditorOperationManager, type EditorCommit, type EditorOperation, type EditorOperationHistory, type EditorOperationOptions, } from "./editor/operationManager";
1
+ export { Editor, type CenterOnShapeOptions, } from "./editor/editor";
2
+ export type { CameraAnimationScheduler } from "./editor/viewport/cameraManager";
3
+ export { createEditor, type CreateEditorOptions, } from "./editor/createEditor";
4
+ export { HistoryManager, type HistoryScope, type HistoryState, } from "./editor/history/historyManager";
5
+ export { EditorOperationManager, type EditorCommit, type EditorOperation, type EditorOperationHistory, type EditorOperationOptions, } from "./editor/history/operationManager";
6
+ export type { SnapDiagnostics, SnapDiagnosticsState, } from "./editor/snapping/snapManager";
5
7
  export { doesLineSegmentIntersectPolygon, distanceBetweenSegments, distanceToSegment, getPolygonsBounds, isPointInPolygon, isPointInPolygons, isValidPolygon, nearestPointOnSegment, segmentsIntersect, } from "./geometry";
6
8
  export { getShapeContentClipPath } from "./geometry/contentCutout";
7
- export { getShapeGeometry, getShapeExportBounds, getShapeExportPageBounds, getShapeExportToPageTransform, getShapeLocalBounds, getShapeLocalToPageTransform, getShapeTransformFieldsFromMatrix, getShapePositionedOutlineVertices, getShapePositionedToPageTransform, getShapePageBounds, getShapePageCenter, getShapePageCorners, getShapePageOutlineVertices, pagePointToShapePositionedPoint, positionedShapePointToPagePoint, getShapeRenderBounds, getShapeRenderToPageTransform, } from "./editor/queries/shapeTransforms";
9
+ export { getShapeGeometry, getShapeExportPageBounds, getShapeExportToPageTransform, getShapeLocalToPageTransform, getShapeTransformFieldsFromMatrix, getShapePositionedOutlineVertices, getShapePositionedToPageTransform, getShapePageBounds, getShapePageCenter, getShapePageCorners, getShapePageOutlineVertices, pagePointToShapePositionedPoint, positionedShapePointToPagePoint, getShapeRenderToPageTransform, } from "./editor/queries/shapeTransforms";
8
10
  export type { ShapeGeometry, ShapeTransformDecompositionOptions, ShapeTransformFields, } from "./editor/queries/shapeTransforms";
9
- export type { BindingPreviewState, GapSnapIndicatorGapState, GapSnapIndicatorState, PointSnapIndicatorState, SnapIndicatorState, SelectionBindingSegment, TerminalBindingGuideState, SelectionBindingMiddleHandle, SelectionBindingMiddleHandleAnchor, SelectionBindingTerminalHandle, SelectionBindingTerminalHandleAnchor, SelectionCustomHandle, SelectionCustomHandleAnchor, SelectionHandle, SelectionOverlayFrameState, SelectionOverlayFrameGeometryState, SelectionOverlayFrameStyleState, SelectionOverlayHandleAnchorsState, SelectionOverlayHandleCountsState, SelectionOverlayHandlesState, SelectionOverlayState, SelectionResizeHandle, SelectionResizeHandleAnchor, SelectionResizeHandleId, SelectionResizeMode, SelectionRotateHandle, SelectionRotateHandleAnchor, SelectionRotateHandleId, SelectionMirrorAxis, } from "./editor/selection";
10
- export { SELECTION_RESIZE_ALL_MODES, SELECTION_RESIZE_ASPECT_RATIO_LOCKED_ONLY_MODES, SELECTION_RESIZE_CORNER_HANDLE_IDS, SELECTION_RESIZE_FREE_ONLY_MODES, SELECTION_RESIZE_HANDLE_IDS, flipSelectionLocalBounds, getSelectionLocalBoundsFromPagePoints, mapSelectionLocalBoundsBetweenBounds, mapSelectionLocalPointBetweenBounds, mirrorSelectionLocalPoint, rotateSelectionPagePoint, selectionLocalPointToPagePoint, selectionPagePointToLocalPoint, } from "./editor/selection";
11
- export { getAnchoredSelectionResizeLocalBounds, getAspectRatioLockedSelectionResizeBounds, getCenteredSelectionResizeBounds, getConstrainedSelectionResizeBounds, getLocalDimensionsFromSelectionResize, getSelectionResizeBounds, getSelectionResizeDimensionsFromLocal, getSelectionResizeScalesFromBounds, isSelectionResizeCorner, normalizeSelectionResizeBoundsFromEdges, selectionResizeHandleMovesBottomEdge, selectionResizeHandleMovesLeftEdge, selectionResizeHandleMovesRightEdge, selectionResizeHandleMovesTopEdge, } from "./editor/resizeGeometry";
12
- export { InteractionHandlerRegistry } from "./editor/interactions";
13
- export { SelectionHandleInteractionRegistry } from "./editor/selectionHandleInteractions";
14
- export { ShortcutManager, formatKeyboardShortcut, normalizeKeyboardShortcut, } from "./editor/managers/shortcutManager";
15
- export type { EditorEventInteractionDecision, EditorEventInteractionHandler, LandInteractionHandler, PointerDragInteractionSession, PointerDragInteractionUpdateResult, SelectionHandleInteractionHandler, SelectionHandleInteractionInput, SelectionHandleInteractionSession, SelectionHandleInteractionUpdateResult, ShapePointerInteractionHandler, ShapePointerInteractionInput, } from "./editor/interactions";
16
- export type { EditorKeyboardShortcutCommand, KeyboardShortcutBinding, KeyboardShortcutChord, KeyboardShortcutEventLike, KeyboardShortcutInput, KeyboardShortcutTarget, } from "./editor/managers/shortcutManager";
17
- export type { ContainerBoundsQueryOptions, EditorPageState, EditorOverlayDebugState, EditorRenderHostDebugState, EditorSelectionMetadata, EditorSelectionState, LayerOrderDirection, LayerOrderEdge, ReparentShapePlacementInput, ReparentShapePlacementFailureReason, ReparentShapePlacementResult, ShapeSiblingOrderDirection, ShapeSiblingOrderEdge, ShapeSiblingOrderState, ShapeGroupState, ShapeSelectionSiblingOrderState, ShapePropsPatch, EditorToolState, EditorShapeEditingState, } from "./editor/editor";
18
- export type { ShapeContainment } from "./editor/managers/queryManager";
19
- export type { ShapeAtPointOptions, ShapeLineSegmentHitTestOptions, SpatialQueryOptions, } from "./editor/managers/spatialIndexManager";
11
+ export type { BindingPreviewState, GapSnapIndicatorGapState, GapSnapIndicatorState, PointSnapIndicatorState, SnapIndicatorState, SelectionBindingSegment, TerminalBindingGuideState, SelectionBindingMiddleHandle, SelectionBindingMiddleHandleAnchor, SelectionBindingTerminalHandle, SelectionBindingTerminalHandleAnchor, SelectionCustomHandle, SelectionCustomHandleAnchor, SelectionHandle, SelectionOverlayFrameGeometryState, SelectionOverlayFrameStyleState, SelectionOverlayHandleAnchorsState, SelectionOverlayHandlesState, SelectionResizeHandle, SelectionResizeHandleAnchor, SelectionResizeHandleId, SelectionResizeMode, SelectionRotateHandle, SelectionRotateHandleAnchor, SelectionRotateHandleId, SelectionMirrorAxis, } from "./editor/selection/selection";
12
+ export { SELECTION_RESIZE_ALL_MODES, SELECTION_RESIZE_ASPECT_RATIO_LOCKED_ONLY_MODES, SELECTION_RESIZE_CORNER_HANDLE_IDS, SELECTION_RESIZE_FREE_ONLY_MODES, SELECTION_RESIZE_HANDLE_IDS, flipSelectionLocalBounds, getSelectionLocalBoundsFromPagePoints, mapSelectionLocalBoundsBetweenBounds, mapSelectionLocalPointBetweenBounds, mirrorSelectionLocalPoint, rotateSelectionPagePoint, selectionLocalPointToPagePoint, selectionPagePointToLocalPoint, } from "./editor/selection/selection";
13
+ export { getAnchoredSelectionResizeLocalBounds, getAspectRatioLockedSelectionResizeBounds, getCenteredSelectionResizeBounds, getConstrainedSelectionResizeBounds, getLocalDimensionsFromSelectionResize, getSelectionResizeBounds, getSelectionResizeDimensionsFromLocal, getSelectionResizeScalesFromBounds, isSelectionResizeCorner, normalizeSelectionResizeBoundsFromEdges, selectionResizeHandleMovesBottomEdge, selectionResizeHandleMovesLeftEdge, selectionResizeHandleMovesRightEdge, selectionResizeHandleMovesTopEdge, } from "./editor/selection/resizeGeometry";
14
+ export { InteractionHandlerRegistry } from "./editor/events/interactions";
15
+ export { doesKeyboardShortcutMatch, formatKeyboardShortcut, normalizeKeyboardShortcut, } from "./editor/events/keyboardShortcuts";
16
+ export type { EditorEventInteractionHandler, LandInteractionHandler, PointerDragInteractionSession, PointerDragInteractionUpdateResult, SelectionHandleInteractionHandler, SelectionHandleInteractionInput, SelectionHandleInteractionSession, SelectionHandleInteractionUpdateResult, ShapePointerInteractionHandler, ShapePointerInteractionInput, } from "./editor/events/interactions";
17
+ export type { KeyboardShortcutChord, KeyboardShortcutEventLike, KeyboardShortcutInput, } from "./editor/events/keyboardShortcuts";
18
+ export type { EditorSelectionMetadata, EditorSelectionState, EditorShapeEditingState, EditorToolState, } from "./editor/state/editorReadModels";
19
+ export type { EditorRenderInteractionSignals, EditorRenderOverlaySignals, EditorRenderSignals, EditorRenderViewportSignals, EditorStateSignals, } from "./editor/state/editorSignals";
20
+ export type { ContainerBoundsQueryOptions, ShapeContainment, } from "./editor/shapes/shapeContainment";
21
+ export type { ShapeGroupState } from "./editor/shapes/shapeGrouping";
22
+ export type { LayerOrderDirection, LayerOrderEdge, ShapeSiblingOrderDirection, ShapeSiblingOrderEdge, ShapeSiblingOrderState, ShapeSelectionSiblingOrderState, } from "./editor/shapes/shapeOrder";
23
+ export type { ReparentShapePlacementInput, ReparentShapePlacementFailureReason, ReparentShapePlacementResult, } from "./editor/shapes/shapeReparenting";
24
+ export type { ShapePropsPatch } from "./editor/commands/commandTypes";
25
+ export type { ShapeAtPointOptions, ShapeLineSegmentHitTestOptions, SpatialQueryOptions, } from "./editor/queries/spatialIndexManager";
20
26
  export type { TerminalBindingTargetInput, ConnectionPoint, ConnectionTerminal, TerminalBindingResolver, TerminalBindingResolverInput, ResolvedTerminalBinding, } from "./bindings/terminalBinding";
21
27
  export { DEFAULT_TERMINAL_BINDING_PORTS, getResolvedShapeTerminalBindingPort, getResolvedShapeTerminalBindingPorts, } from "./bindings/terminalPorts";
22
28
  export type { ResolvedShapeTerminalBindingPort, ShapeTerminalBindingPort, TerminalBindingPortId, } from "./bindings/terminalPorts";
23
- export type { EditorCommandOptions, EditorCommands, CreateAssetInput, CreateBindingInput, CreatePageInput, MovePageInput, RenamePageInput, ReparentShapesInput, CreateShapeInput, SetCameraInput, ShapeUpdate, StartEditingShapeInput, UpdateAssetInput, UpdateBindingInput, UpdateDocumentMetaInput, UpdatePageMetaInput, } from "./editor/commands";
24
- export { reparentShapeToContainingParent } from "./editor/commands";
29
+ export type { EditorCommandOptions, EditorCommands, CreateAssetInput, CreateBindingInput, CreatePageInput, MovePageInput, RenamePageInput, ReparentShapesInput, CreateShapeInput, SetCameraInput, ShapeUpdate, StartEditingShapeInput, UpdateAssetInput, UpdateBindingInput, UpdateDocumentMetaInput, UpdatePageMetaInput, } from "./editor/commands/commands";
30
+ export { reparentShapeToContainingParent } from "./editor/commands/commands";
25
31
  export { isEditorClipboardPayload, } from "./editor/clipboard";
26
32
  export type { ClipboardAssetSidecar, DuplicateSelectionInput, EditorClipboardPayload, PasteClipboardPayloadInput, } from "./editor/clipboard";
27
- export type { EditorEvent, ClickEditorEvent, PointerEditorEvent, KeyboardEditorEvent, WheelEditorEvent, TickEditorEvent, CancelEditorEvent, EditorPointerType, } from "./editor/events";
33
+ export type { EditorEvent, EditorEventContext, EditorEventRoutingEffect, EditorEventResult, DoubleClickEditorEvent, PointerEditorEvent, KeyboardEditorEvent, WheelEditorEvent, TickEditorEvent, CancelEditorEvent, EditorPointerType, } from "./editor/events/events";
28
34
  export type { ChangeSource, RecordUpdate, RecordsDiff, ScopedStoreRecord, StoreRecord, StoreChange, StoreScopeOf, StoreSnapshot, } from "../store/index";
29
35
  export { SnapshotParseError, parseDocumentSnapshot, parseSessionSnapshot, } from "./schema/snapshots";
30
36
  export type { DocumentSnapshot, SessionSnapshot } from "./schema/snapshots";
@@ -32,25 +38,24 @@ export { ShapeUtil } from "./shapes/shapeUtil";
32
38
  export { CHILD_TRANSFORM_POLICY_EPSILON, formatChildTransformPolicyViolation, getChildTransformPolicyViolation, } from "./shapes/childTransformPolicy";
33
39
  export type { ChildTransformPolicy, ChildTransformPolicyProvider, ChildTransformPolicyViolation, } from "./shapes/childTransformPolicy";
34
40
  export type { ShapeBoundsSnapGeometry, ShapeBrushSelectInput, ShapeBrushWrapInput, ShapeClipboardCopyInput, ShapeBindingPointInput, ShapeChildPlacementInput, ShapeChildVisibilityInput, ShapeEditEndInput, ShapeEditEndResult, ShapeGeometryInput, ShapeGroupingInput, ShapeHandleSnapContext, ShapeHandleSnapGeometry, ShapeHoverTargetInput, ShapeLineSegmentHitTestInput, ShapeLabelPathGeometry, ShapeLabelPathNearestPositionOptions, ShapePointHitTestInput, ShapeSnapPoint, ShapeSnapPointKind, ShapeTerminalBindingOutline, ShapeSelectionHandleAnchorInput, ShapeSelectionHandleAnchors, ShapeSelectionFrameInput, ShapeSelectionFlipAxis, ShapeSelectionFlipInput, ShapeSelectionOverlayInfo, ShapeSelectionOverlayInfoInput, ShapeSelectionPathStyle, ShapeSelectionPagePoints, ShapeSelectionPagePointsInput, ShapeSelectionResizeInput, ShapeSelectionResizeCapabilityInput, ShapeSelectionResizeModesInput, ShapeSelectionTransformCapabilityInput, ShapeSelectionTranslateInput, } from "./shapes/shapeUtil";
35
- export type { HandleSnapContext, HandleSnapInput, HandleSnapMode, HandleSnapResult, HandleSnapSnapshot, HandleSnapSnapshotInput, ResizeSnapInput, ResizeSnapResult, ResizeSnapSnapshot, SnapAxis, SnapCoordinateSpace, SnapPointIndex, SnapPointIndexEntry, SnapPointKind, TranslateSnapInput, TranslateSnapResult, TranslateSnapSnapshot, } from "./editor/managers/snapTypes";
41
+ export type { HandleSnapContext, HandleSnapInput, HandleSnapMode, HandleSnapResult, HandleSnapSnapshot, HandleSnapSnapshotInput, ResizeSnapInput, ResizeSnapResult, ResizeSnapSnapshot, SnapAxis, SnapCoordinateSpace, SnapPointIndex, SnapPointIndexEntry, SnapPointKind, TranslateSnapInput, TranslateSnapResult, TranslateSnapSnapshot, } from "./editor/snapping/snapTypes";
36
42
  export { ShapeUtilRegistry } from "./shapes/shapeUtilRegistry";
37
43
  export { resolveTerminalBindingAtPoint, } from "./bindings/terminalBinding";
38
44
  export { ShapeSvgExporterRegistry, exportShapesToSvgString, renderSvgNode, } from "./exports/svg";
39
45
  export type { ShapeSvgExporter, SvgAttributeValue, SvgElementNode, SvgExportContext, SvgExportOptions, SvgExportResult, SvgExportSkipReason, SvgExportSkippedShape, SvgNode, } from "./exports/svg";
40
46
  export { getExportIntegrityReport, repairExportIntegrity, } from "./exports/integrity";
41
47
  export type { ExportIntegrityIssue, ExportIntegrityIssueKind, ExportIntegrityRepairResult, ExportIntegrityReport, } from "./exports/integrity";
42
- export { getShapeCapabilityManifest } from "./shapes/capabilities";
43
- export type { ShapeCapabilityDefinition, ShapeCapabilityManifest, ShapeCapabilityManifestEntry, ShapeCapabilitySupport, } from "./shapes/capabilities";
44
48
  export { BindingUtil } from "./bindings/bindingUtil";
45
49
  export type { BindingSelectionCompanionFrameContext, BindingTargetShapeContentCutoutContext, BindingUtilEffect, } from "./bindings/bindingUtil";
46
50
  export { BindingUtilRegistry } from "./bindings/bindingUtilRegistry";
47
- export { StateNode } from "./editor/stateNode";
48
- export { getEdgeScrollDelta } from "./editor/edgeScroll";
51
+ export { StateNode } from "./tools/stateNode";
52
+ export type { StateNodeEvent } from "./tools/stateNode";
53
+ export { getEdgeScrollDelta } from "./editor/viewport/edgeScroll";
49
54
  export { HandTool } from "./tools/hand/handTool";
50
55
  export { SelectTool } from "./tools/select/selectTool";
51
56
  export { LAND_DEFAULT_THEME_COLOR_FALLBACKS, LAND_THEME_COLOR_SLOTS, LAND_THEME_COLOR_TOKEN_BY_SLOT, areShapeColorsEqual, createCustomShapeColor, createThemeShapeColor, getThemeColorTokenName, isCustomShapeColorRef, isShapeColor, isThemeShapeColorRef, isTransparentShapeColor, normalizeShapeColor, resolveShapeColor, shapeColorToCssColor, } from "./shapes/colors";
52
57
  export type { CustomShapeColorRef, ShapeColor, ThemeColorSlot, ThemeColorResolver, ThemeColorTokenName, ThemeShapeColorRef, } from "./shapes/colors";
53
- export { getEditorOptionsFromPlugins, setupEditorPlugins, type EditorPlugin, createEditorRuntimeToken, EditorRuntimeRegistry, type EditorRuntimeToken, } from "./plugins";
58
+ export { type EditorPlugin, createEditorRuntimeToken, EditorRuntimeRegistry, type EditorRuntimeToken, } from "./plugins";
54
59
  export { DEFAULT_CAMERA, DEFAULT_DOCUMENT_ID, DEFAULT_PAGE_ID, DEFAULT_SESSION_ID, createDefaultDocument, createDefaultPage, createDefaultSession, isAssetRecord, isBindingRecord, isDocumentRecord, isDocumentMetadataRecord, isPageRecord, isSessionRecord, isShapeRecord, type AssetId, type AssetRecord, type AssetRecordBase, type BaseRecord, type BindingId, type BindingRecordBase, type BindingRecord, type Camera, type DocumentId, type DocumentMetadataRecord, type DocumentRecord, type EditorRecord, type PageCameraById, type PageId, type PageSelectionById, type PageRecord, type RecordScope, type SessionRecord, type ShapeId, type ShapeParentId, type ShapeRecordBase, type ShapeRecord, type ShapeEditingEntryRequest, type ShapeEditingEntryMode, type ShapeEditingPoint, type ShapeEditingSession, } from "./schema/records";
55
60
  export { Vec } from "./geometry/vec";
56
61
  export { Box } from "./geometry/box";
@@ -1,22 +1,19 @@
1
1
  import type { BindingUtil } from "../bindings/bindingUtil";
2
2
  import type { Editor } from "../editor/editor";
3
- import type { LandInteractionHandler } from "../editor/interactions";
3
+ import type { LandInteractionHandler } from "../editor/events/interactions";
4
4
  import type { ShapeSvgExporter } from "../exports/svg";
5
- import type { ShapeCapabilityDefinition } from "../shapes/capabilities";
6
5
  import type { ShapeUtil } from "../shapes/shapeUtil";
7
6
  export interface EditorPlugin {
8
7
  id: string;
9
- shapeCapabilities?: ShapeCapabilityDefinition[];
10
8
  shapeUtils?: ShapeUtil[];
11
9
  shapeSvgExporters?: ShapeSvgExporter[];
12
10
  bindingUtils?: BindingUtil[];
13
11
  interactionHandlers?: LandInteractionHandler[];
14
12
  setup?(editor: Editor): void | (() => void);
15
13
  }
16
- export declare function getEditorOptionsFromPlugins(plugins: readonly EditorPlugin[]): {
14
+ export declare function collectEditorPluginContributions(plugins: readonly EditorPlugin[]): {
17
15
  shapeUtils: ShapeUtil[];
18
16
  shapeSvgExporters: ShapeSvgExporter[];
19
17
  bindingUtils: BindingUtil[];
20
- shapeCapabilities: ShapeCapabilityDefinition[];
21
18
  };
22
19
  export declare function setupEditorPlugins(editor: Editor, plugins: readonly EditorPlugin[]): () => void;
@@ -1,4 +1,3 @@
1
- import { type Signal } from "../../signals/index";
2
1
  export interface EditorRuntimeToken<TValue> {
3
2
  readonly id: string;
4
3
  readonly __value?: TValue;
@@ -8,9 +7,6 @@ export declare class EditorRuntimeRegistry {
8
7
  private readonly values;
9
8
  private readonly disposers;
10
9
  private isDisposed;
11
- private readonly revision;
12
- readonly revisionSignal: Signal<number>;
13
- notify(): void;
14
10
  provide<TValue>(token: EditorRuntimeToken<TValue>, value: TValue, dispose?: (value: TValue) => void): TValue;
15
11
  get<TValue>(token: EditorRuntimeToken<TValue>): TValue | null;
16
12
  require<TValue>(token: EditorRuntimeToken<TValue>): TValue;
@@ -1,2 +1,2 @@
1
- export { getEditorOptionsFromPlugins, setupEditorPlugins, type EditorPlugin, } from "./editorRuntimePlugin";
1
+ export type { EditorPlugin } from "./editorRuntimePlugin";
2
2
  export { createEditorRuntimeToken, EditorRuntimeRegistry, type EditorRuntimeToken, } from "./editorRuntimeRegistry";
@@ -1,4 +1,6 @@
1
+ import type { SignalGraph } from "../signals/index";
1
2
  export interface ReadonlyValue<T> {
3
+ readonly graph: SignalGraph;
2
4
  get(): T;
3
5
  }
4
6
  export declare function observeValue<T>(name: string, value: ReadonlyValue<T>, onChange: () => void, options?: {
@@ -21,7 +21,7 @@ export interface ShapeEditingEntryRequest {
21
21
  }
22
22
  export interface ShapeEditingSession {
23
23
  shapeId: ShapeId;
24
- markId: string;
24
+ operationKind: string;
25
25
  entryMode: ShapeEditingEntryMode;
26
26
  caretPagePoint?: ShapeEditingPoint;
27
27
  isComposing: boolean;
@@ -2,9 +2,9 @@ import { Box } from "../geometry/box";
2
2
  import { Mat } from "../geometry/mat";
3
3
  import { Vec } from "../geometry/vec";
4
4
  import type { Editor } from "../editor/editor";
5
- import type { CreateShapeInput, ShapeUpdate } from "../editor/commands";
6
- import { type SelectionMirrorAxis } from "../editor/selection";
7
- import type { SelectionBindingMiddleHandleAnchor, SelectionBindingSegment, SelectionBindingTerminalHandleAnchor, SelectionCustomHandleAnchor, SelectionHandle, SelectionResizeHandleId, SelectionResizeMode } from "../editor/selection";
5
+ import type { CreateShapeInput, ShapeUpdate } from "../editor/commands/commands";
6
+ import { type SelectionMirrorAxis } from "../editor/selection/selection";
7
+ import type { SelectionBindingMiddleHandleAnchor, SelectionBindingSegment, SelectionBindingTerminalHandleAnchor, SelectionCustomHandleAnchor, SelectionHandle, SelectionResizeHandleId, SelectionResizeMode } from "../editor/selection/selection";
8
8
  import type { ShapeId, ShapeParentId, ShapeRecordBase } from "../schema/records";
9
9
  import { type ShapeTerminalBindingPort } from "../bindings/terminalPorts";
10
10
  import type { ChildTransformPolicy } from "./childTransformPolicy";
@@ -222,7 +222,9 @@ export declare abstract class ShapeUtil<S extends ShapeRecordBase = ShapeRecordB
222
222
  getLabelPathGeometry(_shape: S, _input: ShapeSelectionOverlayInfoInput): ShapeLabelPathGeometry | null;
223
223
  isWrappedByBrush(_shape: S, input: ShapeBrushWrapInput): boolean;
224
224
  canSelectByBrush(shape: S, input: ShapeBrushSelectInput): boolean;
225
- getLocalToPageTransform(shape: S): Mat;
225
+ /** Builds the local transform encoded by this record's transform fields. */
226
+ getLocalTransform(shape: S): Mat;
227
+ getPositionedTransform(shape: S): Mat;
226
228
  canEdit(_shape: S): boolean;
227
229
  canReceiveChildren(_shape: S): boolean;
228
230
  getChildTransformPolicy(_shape: S): ChildTransformPolicy;
@@ -235,7 +237,6 @@ export declare abstract class ShapeUtil<S extends ShapeRecordBase = ShapeRecordB
235
237
  getTerminalBindingPorts(shape: S, input: ShapeGeometryInput): readonly ShapeTerminalBindingPort[];
236
238
  getTerminalBindingOutlines(shape: S, input: ShapeGeometryInput): readonly ShapeTerminalBindingOutline[];
237
239
  canCopyToClipboard(_shape: S, _input: ShapeClipboardCopyInput): boolean;
238
- repairLoadedShape(_shape: S): S | null;
239
240
  onEditEnd(_shape: S, _input: ShapeEditEndInput): ShapeEditEndResult | void;
240
241
  hitTest(shape: S, positionedPoint: Vec, _input?: ShapePointHitTestInput): boolean;
241
242
  hitTestBindingTarget(shape: S, positionedPoint: Vec, input?: ShapePointHitTestInput): boolean;
@@ -0,0 +1,6 @@
1
+ import type { Box } from "../geometry/box";
2
+ import { Vec } from "../geometry/vec";
3
+ export declare function getBoxCorners(bounds: Box): Vec[];
4
+ export declare function doesLineSegmentIntersectBox(start: Vec, end: Vec, bounds: Box): boolean;
5
+ export declare function getOutlineBoundaryPoint(raw: Vec, opposite: Vec, outlineVertices: readonly Vec[]): Vec | null;
6
+ export declare function getValidatedDimension(props: object, key: "w" | "h", fallback: number): number;
@@ -1,5 +1,5 @@
1
1
  import type { Editor } from "../../editor/editor";
2
- import { StateNode } from "../../editor/stateNode";
2
+ import { StateNode } from "../stateNode";
3
3
  export declare class HandTool extends StateNode {
4
4
  constructor(editor: Editor);
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import type { Editor } from "../../editor/editor";
2
- import { StateNode } from "../../editor/stateNode";
2
+ import { StateNode } from "../stateNode";
3
3
  export declare class SelectTool extends StateNode {
4
4
  constructor(editor: Editor);
5
5
  }
@@ -1,16 +1,15 @@
1
1
  import { Box } from "../../geometry/box";
2
2
  import { Mat } from "../../geometry/mat";
3
3
  import { Vec } from "../../geometry/vec";
4
- import type { ShapeUpdate } from "../../editor/commands";
4
+ import type { ShapeUpdate } from "../../editor/commands/commands";
5
5
  import type { Editor } from "../../editor/editor";
6
- import type { PointerEditorEvent, TickEditorEvent } from "../../editor/events";
7
- import type { SelectionResizeHandleId, SelectionResizeMode, SelectionResizePointShapeSnapshot, SelectionResizeShapeSnapshot, SelectionRotationTransform, SelectionRotatePointShapeSnapshot, SelectionRotateShapeSnapshot } from "../../editor/selection";
8
- import type { HandleSnapMode, HandleSnapSnapshot, ResizeSnapSnapshot, TranslateSnapSnapshot } from "../../editor/managers/snapTypes";
9
- import type { PointerDragInteractionSession } from "../../editor/interactions";
10
- import type { SelectionHandleInteractionSession } from "../../editor/selectionHandleInteractions";
6
+ import type { PointerEditorEvent, TickEditorEvent } from "../../editor/events/events";
7
+ import type { SelectionResizeHandleId, SelectionResizeMode, SelectionResizePointShapeSnapshot, SelectionResizeShapeSnapshot, SelectionRotationTransform, SelectionRotatePointShapeSnapshot, SelectionRotateShapeSnapshot } from "../../editor/selection/selection";
8
+ import type { HandleSnapMode, HandleSnapSnapshot, ResizeSnapSnapshot, TranslateSnapSnapshot } from "../../editor/snapping/snapTypes";
9
+ import type { PointerDragInteractionSession, SelectionHandleInteractionSession } from "../../editor/events/interactions";
11
10
  import type { ShapeId, ShapeRecord } from "../../schema/records";
12
- export declare const DRAG_START_DISTANCE = 3;
13
- export declare const DRAG_START_DISTANCE_SQUARED: number;
11
+ export declare const DRAG_START_DISTANCE_SCREEN = 3;
12
+ export declare const DRAG_START_DISTANCE_SCREEN_SQUARED: number;
14
13
  export declare const ROTATION_SNAP_STEP: number;
15
14
  export declare const ROTATION_SOFT_SNAP_STEP: number;
16
15
  export declare const ROTATION_SOFT_SNAP_THRESHOLD: number;
@@ -20,9 +19,9 @@ export declare const TRANSLATE_SNAP_DISTANCE_SCREEN = 8;
20
19
  export declare const TRANSLATE_SNAP_MAX_SCREEN_VELOCITY = 0.5;
21
20
  export declare const RESIZE_SNAP_DISTANCE_SCREEN = 8;
22
21
  export declare const HANDLE_SNAP_DISTANCE_SCREEN = 8;
23
- export declare const TRANSLATE_HISTORY_MARK = "select.translate";
24
- export declare const RESIZE_HISTORY_MARK = "select.resize";
25
- export declare const ROTATE_HISTORY_MARK = "select.rotate";
22
+ export declare const TRANSLATE_OPERATION_KIND = "select.translate";
23
+ export declare const RESIZE_OPERATION_KIND = "select.resize";
24
+ export declare const ROTATE_OPERATION_KIND = "select.rotate";
26
25
  export type TranslateAxis = "x" | "y";
27
26
  export interface PointingCanvasInfo {
28
27
  originPagePoint: Vec;
@@ -133,7 +132,7 @@ export declare function getSelectionDragInputFromCurrentInputs(editor: Editor):
133
132
  export declare function getSelectionDragInputForTick(editor: Editor, event: TickEditorEvent, mode: EdgeScrollTickMode): SelectionDragInput | null;
134
133
  export declare function applySelectionDragFromCurrentInputs(editor: Editor, apply: (input: SelectionDragInput) => void): void;
135
134
  export declare function createBrushBounds(origin: Vec, current: Vec): Box;
136
- export declare function hasExceededDragThreshold(origin: Vec, point: Vec): boolean;
135
+ export declare function hasExceededScreenDragThreshold(originScreenPoint: Vec, screenPoint: Vec): boolean;
137
136
  export declare function arePagePointsApproximatelyEqual(left: Vec, right: Vec): boolean;
138
137
  export declare function toggleIds(base: ShapeId[], toggled: ShapeId[]): ShapeId[];
139
138
  export declare function getOutermostSelectableShapeIds(editor: Editor, shapeIds: Iterable<ShapeId>): ShapeId[];
@@ -1,6 +1,6 @@
1
1
  import type { Editor } from "../../../editor/editor";
2
- import { StateNode } from "../../../editor/stateNode";
3
- import type { PointerEditorEvent, TickEditorEvent } from "../../../editor/events";
2
+ import { StateNode } from "../../stateNode";
3
+ import type { PointerEditorEvent, TickEditorEvent } from "../../../editor/events/events";
4
4
  import { type BrushInfo } from "../selectToolHelpers";
5
5
  import { InfoStateNode } from "./selectStateNode";
6
6
  export declare class BrushingState extends InfoStateNode<BrushInfo> {
@@ -1,10 +1,9 @@
1
1
  import type { Editor } from "../../../editor/editor";
2
- import { StateNode } from "../../../editor/stateNode";
3
- import type { CancelEditorEvent, PointerEditorEvent } from "../../../editor/events";
2
+ import { StateNode } from "../../stateNode";
3
+ import type { CancelEditorEvent, PointerEditorEvent } from "../../../editor/events/events";
4
4
  import { type DraggingPluginInteractionInfo } from "../selectToolHelpers";
5
5
  import { DraggingStateNode, type DragApplyInput } from "./selectStateNode";
6
6
  export declare class DraggingPluginInteractionState extends DraggingStateNode<DraggingPluginInteractionInfo> {
7
- protected readonly tickMode: "apply_after_scroll";
8
7
  constructor(editor: Editor, parent: StateNode);
9
8
  protected getOperationKind(info: DraggingPluginInteractionInfo): string;
10
9
  protected onDragStart(): void;
@@ -1,6 +1,6 @@
1
1
  import type { Editor } from "../../../editor/editor";
2
- import { StateNode } from "../../../editor/stateNode";
3
- import type { PointerEditorEvent } from "../../../editor/events";
2
+ import { StateNode } from "../../stateNode";
3
+ import type { PointerEditorEvent } from "../../../editor/events/events";
4
4
  export declare class IdleState extends StateNode {
5
5
  constructor(editor: Editor, parent: StateNode);
6
6
  protected onEnter(): void;
@@ -1,6 +1,6 @@
1
1
  import type { Editor } from "../../../editor/editor";
2
- import { StateNode } from "../../../editor/stateNode";
3
- import type { PointerEditorEvent } from "../../../editor/events";
2
+ import { StateNode } from "../../stateNode";
3
+ import type { PointerEditorEvent } from "../../../editor/events/events";
4
4
  import { type PointingCanvasInfo } from "../selectToolHelpers";
5
5
  import { PointingStateNode } from "./selectStateNode";
6
6
  export declare class PointingCanvasState extends PointingStateNode<PointingCanvasInfo> {
@@ -1,5 +1,5 @@
1
1
  import type { Editor } from "../../../editor/editor";
2
- import { StateNode } from "../../../editor/stateNode";
2
+ import { StateNode } from "../../stateNode";
3
3
  import { type PointingResizeHandleInfo } from "../selectToolHelpers";
4
4
  import { PointingStateNode } from "./selectStateNode";
5
5
  export declare class PointingResizeHandleState extends PointingStateNode<PointingResizeHandleInfo> {
@@ -1,5 +1,5 @@
1
1
  import type { Editor } from "../../../editor/editor";
2
- import { StateNode } from "../../../editor/stateNode";
2
+ import { StateNode } from "../../stateNode";
3
3
  import { type PointingRotateHandleInfo } from "../selectToolHelpers";
4
4
  import { PointingStateNode } from "./selectStateNode";
5
5
  export declare class PointingRotateHandleState extends PointingStateNode<PointingRotateHandleInfo> {
@@ -1,11 +1,11 @@
1
1
  import type { Editor } from "../../../editor/editor";
2
- import type { CancelEditorEvent, PointerEditorEvent } from "../../../editor/events";
3
- import { StateNode } from "../../../editor/stateNode";
2
+ import type { CancelEditorEvent, EditorEventContext, PointerEditorEvent } from "../../../editor/events/events";
3
+ import { StateNode } from "../../stateNode";
4
4
  import { type PointingSelectionHandleInteractionInfo } from "../selectToolHelpers";
5
5
  import { PointingStateNode } from "./selectStateNode";
6
6
  export declare class PointingSelectionHandleInteractionState extends PointingStateNode<PointingSelectionHandleInteractionInfo> {
7
7
  constructor(editor: Editor, parent: StateNode);
8
8
  protected onDragThresholdExceeded(): void;
9
- protected onPointerUp(event: PointerEditorEvent): void;
9
+ protected onPointerUp(_event: PointerEditorEvent, context: EditorEventContext): void;
10
10
  protected onCancel(event: CancelEditorEvent): void;
11
11
  }
@@ -1,12 +1,12 @@
1
1
  import type { Editor } from "../../../editor/editor";
2
- import { StateNode } from "../../../editor/stateNode";
3
- import type { PointerEditorEvent } from "../../../editor/events";
2
+ import { StateNode } from "../../stateNode";
3
+ import type { EditorEventContext, EditorEventRoutingEffect, PointerEditorEvent } from "../../../editor/events/events";
4
4
  import { type PointingShapeInfo } from "../selectToolHelpers";
5
5
  import { PointingStateNode } from "./selectStateNode";
6
6
  export declare class PointingShapeState extends PointingStateNode<PointingShapeInfo> {
7
7
  constructor(editor: Editor, parent: StateNode);
8
8
  protected onInfoEnter(): void;
9
9
  protected onDragThresholdExceeded(event: PointerEditorEvent): void;
10
- protected onPointerUp(event: PointerEditorEvent): void;
10
+ protected onPointerUp(event: PointerEditorEvent, context: EditorEventContext): EditorEventRoutingEffect | void;
11
11
  protected onCancel(): void;
12
12
  }
@@ -1,13 +1,13 @@
1
1
  import type { Editor } from "../../../editor/editor";
2
- import { StateNode } from "../../../editor/stateNode";
2
+ import type { PointerEditorEvent } from "../../../editor/events/events";
3
+ import { StateNode } from "../../stateNode";
3
4
  import { type ResizingInfo } from "../selectToolHelpers";
4
5
  import { DraggingStateNode, type DragApplyInput } from "./selectStateNode";
5
6
  export declare class ResizingState extends DraggingStateNode<ResizingInfo> {
6
- protected readonly tickMode: "apply_after_scroll_or_without_screen_point";
7
7
  constructor(editor: Editor, parent: StateNode);
8
8
  protected getOperationKind(): string;
9
9
  protected onDragStart(): void;
10
- protected onPointerUp(): void;
10
+ protected onPointerUp(event: PointerEditorEvent): void;
11
11
  protected onCancel(): void;
12
12
  protected onInfoExit(): void;
13
13
  protected apply({ pagePoint, shiftKey, altKey, accelKey, }: DragApplyInput): void;
@@ -1,12 +1,12 @@
1
1
  import type { Editor } from "../../../editor/editor";
2
- import { StateNode } from "../../../editor/stateNode";
2
+ import type { PointerEditorEvent } from "../../../editor/events/events";
3
+ import { StateNode } from "../../stateNode";
3
4
  import { type RotatingInfo } from "../selectToolHelpers";
4
5
  import { DraggingStateNode, type DragApplyInput } from "./selectStateNode";
5
6
  export declare class RotatingState extends DraggingStateNode<RotatingInfo> {
6
- protected readonly tickMode: "apply_after_scroll";
7
7
  constructor(editor: Editor, parent: StateNode);
8
8
  protected getOperationKind(): string;
9
- protected onPointerUp(): void;
9
+ protected onPointerUp(event: PointerEditorEvent): void;
10
10
  protected onCancel(): void;
11
11
  protected apply({ pagePoint, shiftKey, accelKey }: DragApplyInput): void;
12
12
  private complete;
@@ -1,8 +1,7 @@
1
1
  import type { Vec } from "../../../geometry/vec";
2
- import { StateNode } from "../../../editor/stateNode";
3
- import type { PointerEditorEvent, TickEditorEvent } from "../../../editor/events";
4
- import { type EdgeScrollTickMode } from "../selectToolHelpers";
5
- import type { EditorOperation } from "../../../editor/operationManager";
2
+ import { StateNode } from "../../stateNode";
3
+ import type { PointerEditorEvent, TickEditorEvent } from "../../../editor/events/events";
4
+ import type { EditorOperation } from "../../../editor/history/operationManager";
6
5
  /**
7
6
  * Base for every select-tool state that carries a transient `info` payload.
8
7
  * Centralises the identical `info` lifecycle (assign on enter, clear on exit)
@@ -38,23 +37,20 @@ export interface DragApplyInput {
38
37
  }
39
38
  /**
40
39
  * Base for the active drag states (translate / resize / rotate / handle
41
- * interaction). Centralises the identical event wiring: mark history on enter,
42
- * apply on pointer-move, apply edge-scroll-aware input on tick, and re-apply the
43
- * current input on key changes. Subclasses implement {@link apply} plus their own
44
- * completion/cancellation and any extra cleanup.
40
+ * interaction). Centralises the identical event wiring: open an operation on
41
+ * enter, apply the latest input once per animation tick, and re-apply the
42
+ * current input on key changes. Subclasses implement {@link apply} plus their
43
+ * own completion / cancellation and any extra cleanup.
45
44
  */
46
45
  export declare abstract class DraggingStateNode<T> extends InfoStateNode<T> {
47
46
  protected operation: EditorOperation | null;
48
- /** Edge-scroll behaviour for this gesture's tick handling. */
49
- protected abstract readonly tickMode: EdgeScrollTickMode;
50
47
  /** Stable operation kind for this gesture. */
51
48
  protected abstract getOperationKind(info: T): string;
52
49
  /** Apply one drag sample. Implementations must guard on `this.info`. */
53
50
  protected abstract apply(input: DragApplyInput): void;
54
51
  protected onInfoEnter(): void;
55
- /** Extra setup after the history mark is opened (e.g. clearing indicators). */
52
+ /** Extra setup after the operation is opened (e.g. clearing indicators). */
56
53
  protected onDragStart(): void;
57
- protected onPointerMove(event: PointerEditorEvent): void;
58
54
  protected onTick(event: TickEditorEvent): void;
59
55
  protected onKeyDown(): void;
60
56
  protected onKeyUp(): void;