@yuzhouu/canvas-kit 0.1.12 → 0.1.14

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 (483) hide show
  1. package/README.md +52 -238
  2. package/_vendor/canvas-core/bindings/bindingManager.d.ts +33 -0
  3. package/_vendor/canvas-core/bindings/bindingUtil.d.ts +7 -6
  4. package/_vendor/canvas-core/bindings/terminalBinding.d.ts +1 -1
  5. package/_vendor/canvas-core/editor/clipboard.d.ts +1 -1
  6. package/_vendor/canvas-core/editor/clipboardAssets.d.ts +6 -0
  7. package/_vendor/canvas-core/editor/commands/assetCommands.d.ts +7 -0
  8. package/_vendor/canvas-core/editor/commands/bindingCommands.d.ts +12 -0
  9. package/_vendor/canvas-core/editor/{commands.d.ts → commands/commandTypes.d.ts} +4 -8
  10. package/_vendor/canvas-core/editor/commands/commands.d.ts +5 -0
  11. package/_vendor/canvas-core/editor/commands/documentCommands.d.ts +9 -0
  12. package/_vendor/canvas-core/editor/commands/sessionCommands.d.ts +13 -0
  13. package/_vendor/canvas-core/editor/commands/shapeCommands.d.ts +9 -0
  14. package/_vendor/canvas-core/editor/commands/shapeFlags.d.ts +10 -0
  15. package/_vendor/canvas-core/editor/commands/shapeRemoval.d.ts +10 -0
  16. package/_vendor/canvas-core/editor/commands/shapeRepair.d.ts +11 -0
  17. package/_vendor/canvas-core/editor/createEditor.d.ts +6 -0
  18. package/_vendor/canvas-core/editor/editor.d.ts +310 -538
  19. package/_vendor/canvas-core/editor/events/canvasNavigationInteraction.d.ts +2 -0
  20. package/_vendor/canvas-core/editor/events/eventRouter.d.ts +16 -0
  21. package/_vendor/canvas-core/editor/{events.d.ts → events/events.d.ts} +18 -8
  22. package/_vendor/canvas-core/editor/{managers → events}/inputsManager.d.ts +6 -4
  23. package/_vendor/canvas-core/editor/{interactions.d.ts → events/interactions.d.ts} +12 -12
  24. package/_vendor/canvas-core/editor/events/keyboardShortcuts.d.ts +23 -0
  25. package/_vendor/canvas-core/editor/events/pointerClickRecognizer.d.ts +11 -0
  26. package/_vendor/canvas-core/editor/history/historyManager.d.ts +40 -0
  27. package/_vendor/canvas-core/editor/{operationManager.d.ts → history/operationManager.d.ts} +21 -18
  28. package/_vendor/canvas-core/editor/queries/bindingQueryCache.d.ts +28 -0
  29. package/_vendor/canvas-core/editor/queries/bindingQueryState.d.ts +11 -0
  30. package/_vendor/canvas-core/editor/queries/draftBindingIndex.d.ts +19 -0
  31. package/_vendor/canvas-core/editor/queries/shapeGeometryQueryCache.d.ts +34 -0
  32. package/_vendor/canvas-core/editor/queries/shapeTransforms.d.ts +15 -19
  33. package/_vendor/canvas-core/editor/queries/shapeTreeIndex.d.ts +27 -0
  34. package/_vendor/canvas-core/editor/queries/shapeTreeIndexState.d.ts +11 -0
  35. package/_vendor/canvas-core/editor/{managers → queries}/spatialIndexManager.d.ts +5 -3
  36. package/_vendor/canvas-core/editor/records/documentSnapshots.d.ts +14 -0
  37. package/_vendor/canvas-core/editor/records/editorRecordFactory.d.ts +19 -0
  38. package/_vendor/canvas-core/editor/records/recordQueries.d.ts +3 -0
  39. package/_vendor/canvas-core/editor/{resizeGeometry.d.ts → selection/resizeGeometry.d.ts} +22 -2
  40. package/_vendor/canvas-core/editor/{selection.d.ts → selection/selection.d.ts} +4 -30
  41. package/_vendor/canvas-core/editor/{managers → selection}/selectionGeometry.d.ts +2 -2
  42. package/_vendor/canvas-core/editor/selection/selectionHandleHitTest.d.ts +8 -0
  43. package/_vendor/canvas-core/editor/selection/selectionLayout.d.ts +20 -0
  44. package/_vendor/canvas-core/editor/selection/selectionOverlay.d.ts +25 -0
  45. package/_vendor/canvas-core/editor/selection/selectionOverlayEquality.d.ts +8 -0
  46. package/_vendor/canvas-core/editor/selection/selectionOverlayManager.d.ts +34 -0
  47. package/_vendor/canvas-core/editor/{selectionResizeCapabilities.d.ts → selection/selectionResizeCapabilities.d.ts} +4 -2
  48. package/_vendor/canvas-core/editor/selection/selectionSet.d.ts +9 -0
  49. package/_vendor/canvas-core/editor/selection/selectionTargets.d.ts +10 -0
  50. package/_vendor/canvas-core/editor/selection/selectionTransforms.d.ts +6 -0
  51. package/_vendor/canvas-core/editor/shapes/shapeContainment.d.ts +14 -0
  52. package/_vendor/canvas-core/editor/{managers → shapes}/shapeEditingManager.d.ts +2 -2
  53. package/_vendor/canvas-core/editor/shapes/shapeExportTraversal.d.ts +3 -0
  54. package/_vendor/canvas-core/editor/shapes/shapeGeometry.d.ts +21 -0
  55. package/_vendor/canvas-core/editor/shapes/shapeGrouping.d.ts +22 -0
  56. package/_vendor/canvas-core/editor/{managers → shapes}/shapeOrder.d.ts +20 -2
  57. package/_vendor/canvas-core/editor/shapes/shapeReparenting.d.ts +21 -0
  58. package/_vendor/canvas-core/editor/shapes/shapeSignalManager.d.ts +35 -0
  59. package/_vendor/canvas-core/editor/{shapeTransformSpace.d.ts → shapes/shapeTransformSpace.d.ts} +3 -3
  60. package/_vendor/canvas-core/editor/shapes/shapeTreeQueries.d.ts +12 -0
  61. package/_vendor/canvas-core/editor/snapping/gapSnap.d.ts +6 -0
  62. package/_vendor/canvas-core/editor/snapping/pointSnap.d.ts +5 -0
  63. package/_vendor/canvas-core/editor/snapping/resizeSnap.d.ts +11 -0
  64. package/_vendor/canvas-core/editor/snapping/snapDecision.d.ts +2 -0
  65. package/_vendor/canvas-core/editor/{managers → snapping}/snapGeometry.d.ts +0 -1
  66. package/_vendor/canvas-core/editor/{managers → snapping}/snapIndicators.d.ts +2 -2
  67. package/_vendor/canvas-core/editor/{managers → snapping}/snapManager.d.ts +23 -5
  68. package/_vendor/canvas-core/editor/{managers/snapCalculations.d.ts → snapping/snapResults.d.ts} +2 -17
  69. package/_vendor/canvas-core/editor/{managers → snapping}/snapTypes.d.ts +1 -1
  70. package/_vendor/canvas-core/editor/state/editorReadModels.d.ts +34 -0
  71. package/_vendor/canvas-core/editor/state/editorSignals.d.ts +82 -0
  72. package/_vendor/canvas-core/editor/state/editorStateUtils.d.ts +9 -0
  73. package/_vendor/canvas-core/editor/{managers → state}/interactionTransientManager.d.ts +4 -4
  74. package/_vendor/canvas-core/editor/{managers → viewport}/cameraManager.d.ts +21 -4
  75. package/_vendor/canvas-core/editor/{cameraPanSession.d.ts → viewport/cameraPanSession.d.ts} +3 -3
  76. package/_vendor/canvas-core/editor/{edgeScroll.d.ts → viewport/edgeScroll.d.ts} +1 -1
  77. package/_vendor/canvas-core/editor/{renderWindow.d.ts → viewport/renderWindow.d.ts} +8 -8
  78. package/_vendor/canvas-core/editor/{managers → viewport}/renderWindowManager.d.ts +14 -6
  79. package/_vendor/canvas-core/geometry/box.d.ts +1 -0
  80. package/_vendor/canvas-core/geometry/mat.d.ts +2 -3
  81. package/_vendor/canvas-core/index.d.ts +33 -26
  82. package/_vendor/canvas-core/plugins/editorRuntimePlugin.d.ts +2 -5
  83. package/_vendor/canvas-core/plugins/editorRuntimeRegistry.d.ts +0 -4
  84. package/_vendor/canvas-core/plugins/index.d.ts +1 -1
  85. package/_vendor/canvas-core/reactivity.d.ts +2 -0
  86. package/_vendor/canvas-core/schema/records.d.ts +1 -2
  87. package/_vendor/canvas-core/schema/snapshots.d.ts +2 -2
  88. package/_vendor/canvas-core/shapes/childTransformPolicy.d.ts +16 -0
  89. package/_vendor/canvas-core/shapes/shapeUtil.d.ts +9 -8
  90. package/_vendor/canvas-core/shapes/shapeUtilGeometry.d.ts +6 -0
  91. package/_vendor/canvas-core/tools/hand/handTool.d.ts +1 -1
  92. package/_vendor/canvas-core/tools/select/selectTool.d.ts +1 -1
  93. package/_vendor/canvas-core/tools/select/selectToolHelpers.d.ts +11 -12
  94. package/_vendor/canvas-core/tools/select/states/brushingState.d.ts +2 -2
  95. package/_vendor/canvas-core/tools/select/states/draggingPluginInteractionState.d.ts +2 -3
  96. package/_vendor/canvas-core/tools/select/states/idleState.d.ts +2 -2
  97. package/_vendor/canvas-core/tools/select/states/pointingCanvasState.d.ts +2 -2
  98. package/_vendor/canvas-core/tools/select/states/pointingResizeHandleState.d.ts +1 -1
  99. package/_vendor/canvas-core/tools/select/states/pointingRotateHandleState.d.ts +1 -1
  100. package/_vendor/canvas-core/tools/select/states/pointingSelectionHandleInteractionState.d.ts +3 -3
  101. package/_vendor/canvas-core/tools/select/states/pointingShapeState.d.ts +3 -3
  102. package/_vendor/canvas-core/tools/select/states/resizingState.d.ts +3 -3
  103. package/_vendor/canvas-core/tools/select/states/rotatingState.d.ts +3 -3
  104. package/_vendor/canvas-core/tools/select/states/selectStateNode.d.ts +8 -12
  105. package/_vendor/canvas-core/tools/select/states/translatingState.d.ts +2 -3
  106. package/_vendor/canvas-core/tools/stateNode.d.ts +30 -0
  107. package/_vendor/canvas-core/tools/toolManager.d.ts +24 -0
  108. package/_vendor/canvas-core/utils/equality.d.ts +9 -0
  109. package/_vendor/canvas-extension-contracts/contributions.d.ts +92 -0
  110. package/_vendor/canvas-extension-contracts/index.d.ts +6 -0
  111. package/_vendor/canvas-extension-contracts/operations.d.ts +131 -0
  112. package/_vendor/canvas-extension-contracts/persistence.d.ts +16 -0
  113. package/_vendor/canvas-extension-contracts/plugin.d.ts +37 -0
  114. package/_vendor/canvas-extension-contracts/shape.d.ts +5 -0
  115. package/_vendor/canvas-extension-contracts/tokens.d.ts +12 -0
  116. package/_vendor/canvas-react/components/CanvasView.d.ts +3 -10
  117. package/_vendor/canvas-react/components/DefaultGrid.d.ts +1 -0
  118. package/_vendor/canvas-react/components/canvasKeyboardEvents.d.ts +2 -2
  119. package/_vendor/canvas-react/components/index.d.ts +1 -0
  120. package/_vendor/canvas-react/components/shape-layer/ShapeClipStack.d.ts +11 -0
  121. package/_vendor/canvas-react/components/shape-layer/ShapeDecorations.d.ts +2 -0
  122. package/_vendor/canvas-react/components/shape-layer/ShapeForegroundItem.d.ts +5 -0
  123. package/_vendor/canvas-react/components/shape-layer/ShapeItem.d.ts +5 -0
  124. package/_vendor/canvas-react/components/shape-layer/ShapeRenderList.d.ts +1 -0
  125. package/_vendor/canvas-react/components/shape-layer/ShapeRenderer.d.ts +12 -0
  126. package/_vendor/canvas-react/components/shape-layer/shapeFrame.d.ts +11 -0
  127. package/_vendor/canvas-react/components/useCanvasDomEvents.d.ts +2 -2
  128. package/_vendor/canvas-react/dom.d.ts +1 -1
  129. package/_vendor/canvas-react/host/canvasRenderBindings.d.ts +21 -0
  130. package/_vendor/canvas-react/host/canvasRenderBindingsContext.d.ts +5 -0
  131. package/_vendor/canvas-react/host/canvasRenderPlugin.d.ts +3 -12
  132. package/_vendor/canvas-react/host/index.d.ts +4 -7
  133. package/_vendor/canvas-react/index.d.ts +1 -1
  134. package/_vendor/signals/atom.d.ts +7 -5
  135. package/_vendor/signals/computed.d.ts +10 -8
  136. package/_vendor/signals/core.d.ts +32 -15
  137. package/_vendor/signals/effect.d.ts +2 -22
  138. package/_vendor/signals/index.d.ts +6 -7
  139. package/_vendor/signals/types.d.ts +14 -7
  140. package/_vendor/store/diff.d.ts +1 -1
  141. package/_vendor/store/history.d.ts +6 -21
  142. package/_vendor/store/index.d.ts +4 -4
  143. package/_vendor/store/store.d.ts +19 -17
  144. package/browser/indexedDb.d.ts +0 -4
  145. package/browser/persistence.d.ts +3 -3
  146. package/browser/persistenceFlushEvents.d.ts +2 -0
  147. package/chrome/floating/CanvasKitFloatingContent.d.ts +10 -0
  148. package/chrome/floating/CanvasKitFloatingPortal.d.ts +1 -0
  149. package/chrome/floating/useCanvasKitFloatingPosition.d.ts +5 -3
  150. package/chrome/toolbar/FloatingSelectionToolbarPageSpace.d.ts +7 -3
  151. package/index.css +1 -1
  152. package/index.d.ts +16 -45
  153. package/index.mjs +46 -88
  154. package/package.json +3 -15
  155. package/react/CanvasKitContext.d.ts +8 -0
  156. package/react/CanvasKitRoot.d.ts +2 -10
  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 +192 -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 +8 -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 -23
  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 -22
  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/chrome/toolbar/mergeToolbarGroups.d.ts +0 -8
  399. package/chrome/toolbar/toolbarLabels.d.ts +0 -8
  400. package/chrome/toolbar/useToolbarSurfaces.d.ts +0 -21
  401. package/chrome/types.d.ts +0 -72
  402. package/chrome/useCanvasKitChromeContext.d.ts +0 -18
  403. package/chrome/useCanvasKitLayerTree.d.ts +0 -5
  404. package/chrome/useChromeSurfaces.d.ts +0 -12
  405. package/chrome/useContextMenuSurface.d.ts +0 -12
  406. package/chrome/useHistoryControls.d.ts +0 -12
  407. package/chrome/usePageControls.d.ts +0 -16
  408. package/chrome/useZoomControls.d.ts +0 -9
  409. package/controller/canvasKitController.d.ts +0 -28
  410. package/core/index.d.ts +0 -7
  411. package/core/product-controller/canvasProductController.d.ts +0 -202
  412. package/core/product-controller/index.d.ts +0 -2
  413. package/core/product-controller/productLayerTree.d.ts +0 -10
  414. package/core/runtime/productAssets.d.ts +0 -20
  415. package/core/runtime/productEditor.d.ts +0 -3
  416. package/core/runtime/productServices.d.ts +0 -20
  417. package/core/runtime/runtimeContracts.d.ts +0 -17
  418. package/features/context-menu/contextMenuRuntime.d.ts +0 -13
  419. package/features/image/asset/imageAssetService.d.ts +0 -10
  420. package/features/image/asset/imageBlobStore.d.ts +0 -31
  421. package/features/image/asset/imageFileHelpers.d.ts +0 -43
  422. package/features/image/asset/svgImageAssetInliner.d.ts +0 -3
  423. package/features/image/controller/imageProductController.d.ts +0 -27
  424. package/features/image/imageHostPlugin.d.ts +0 -1
  425. package/features/image/import/ImageImportController.d.ts +0 -11
  426. package/features/image/index.d.ts +0 -15
  427. package/features/image/smudge/imageSmudgeHostActions.d.ts +0 -10
  428. package/features/image/smudge/imageSmudgeTypes.d.ts +0 -25
  429. package/features/image/toolbar/imageHostActions.d.ts +0 -79
  430. package/features/image/toolbar/imageToolbarHostBridge.d.ts +0 -14
  431. package/features/text/link/TextLinkHoverPopover.d.ts +0 -6
  432. package/features/text/textHostPlugin.d.ts +0 -5
  433. package/features/text/textSvgAssetInliner.d.ts +0 -3
  434. package/features/text/textSvgAssetPlugin.d.ts +0 -2
  435. package/plugins/runtime/import-host/CanvasImportHost.d.ts +0 -4
  436. package/plugins/runtime/import-host/capability.d.ts +0 -1
  437. package/plugins/runtime/import-host/index.d.ts +0 -2
  438. package/plugins/runtime/import-host/plugin.d.ts +0 -1
  439. package/plugins/runtime/keyboard-shortcuts/index.d.ts +0 -1
  440. package/plugins/runtime/keyboard-shortcuts/plugin.d.ts +0 -1
  441. package/plugins/runtime/keyboard-shortcuts/useCanvasKeyboardShortcuts.d.ts +0 -8
  442. package/plugins/runtime/tool-actions/capability.d.ts +0 -1
  443. package/plugins/runtime/tool-actions/index.d.ts +0 -2
  444. package/plugins/runtime/tool-actions/plugin.d.ts +0 -1
  445. package/plugins/runtime/tool-actions/toolActions.d.ts +0 -2
  446. package/plugins/standard/clipboard/chrome.d.ts +0 -2
  447. package/plugins/standard/clipboard/contextMenu.d.ts +0 -2
  448. package/plugins/standard/clipboard/plugin.d.ts +0 -1
  449. package/plugins/standard/clipboard/shortcuts.d.ts +0 -5
  450. package/plugins/standard/createStandardCanvasKitPlugins.d.ts +0 -15
  451. package/plugins/standard/selection/actions.d.ts +0 -21
  452. package/plugins/standard/selection/chrome.d.ts +0 -2
  453. package/plugins/standard/selection/contextMenu.d.ts +0 -2
  454. package/plugins/standard/selection/plugin.d.ts +0 -1
  455. package/plugins/standard/selection/toolbar.d.ts +0 -2
  456. package/plugins/standard/tool-ui/contextMenu.d.ts +0 -2
  457. package/plugins/standard/tool-ui/plugin.d.ts +0 -1
  458. package/plugins/standard/tool-ui/toolbar.d.ts +0 -2
  459. package/plugins/standard/view/actions.d.ts +0 -5
  460. package/plugins/standard/view/chrome.d.ts +0 -2
  461. package/plugins/standard/view/contextMenu.d.ts +0 -2
  462. package/plugins/standard/view/plugin.d.ts +0 -1
  463. package/react/useCanvasKitControllerLifecycle.d.ts +0 -8
  464. package/react/useCanvasKitRuntime.d.ts +0 -2
  465. package/runtime/canvasKitActionContext.d.ts +0 -17
  466. package/runtime/canvasKitCommandExecutor.d.ts +0 -13
  467. package/runtime/canvasKitPluginContracts.d.ts +0 -32
  468. package/runtime/canvasKitPluginLifecycle.d.ts +0 -32
  469. package/runtime/canvasKitPluginSetup.d.ts +0 -34
  470. package/runtime/canvasKitPluginUi.d.ts +0 -35
  471. package/runtime/canvasKitResourceScope.d.ts +0 -5
  472. package/runtime/canvasKitRuntime.d.ts +0 -50
  473. package/runtime/canvasKitRuntimeContracts.d.ts +0 -34
  474. package/runtime/registries/actionRegistry.d.ts +0 -5
  475. package/runtime/registries/chromeRegistry.d.ts +0 -2
  476. package/runtime/registries/contextMenuRegistry.d.ts +0 -5
  477. package/runtime/registries/exportRegistry.d.ts +0 -2
  478. package/runtime/registries/importRegistry.d.ts +0 -2
  479. package/runtime/registries/index.d.ts +0 -7
  480. package/runtime/registries/toolbarRegistry.d.ts +0 -5
  481. /package/_vendor/canvas-core/editor/{selectionBindingSegments.d.ts → selection/selectionBindingSegments.d.ts} +0 -0
  482. /package/_vendor/canvas-core/editor/{managers → snapping}/snapSnapshotBuilder.d.ts +0 -0
  483. /package/_vendor/canvas-core/editor/{camera.d.ts → viewport/camera.d.ts} +0 -0
@@ -1,17 +1,17 @@
1
- import { type Signal } from "../../../signals/index";
1
+ import type { Signal } from "../../../signals/index";
2
2
  import { type TerminalBindingResolver, type TerminalBindingResolverInput, type ResolvedTerminalBinding } from "../../bindings/terminalBinding";
3
3
  import type { Box } from "../../geometry/box";
4
4
  import type { ShapeId } from "../../schema/records";
5
5
  import type { Editor } from "../editor";
6
- import type { BindingPreviewState, SnapIndicatorState, TerminalBindingGuideState } from "../selection";
6
+ import type { BindingPreviewState, SnapIndicatorState, TerminalBindingGuideState } from "../selection/selection";
7
7
  export declare class InteractionTransientManager {
8
8
  private readonly editor;
9
9
  private readonly _brushBoxSignal;
10
10
  readonly brushBoxSignal: Signal<Box | null>;
11
- readonly brushBoxActiveSignal: import("../../../signals/index").Computed<boolean>;
11
+ readonly brushBoxActiveSignal: Signal<boolean>;
12
12
  private readonly _bindingPreviewSignal;
13
13
  readonly bindingPreviewSignal: Signal<BindingPreviewState | null>;
14
- readonly bindingPreviewActiveSignal: import("../../../signals/index").Computed<boolean>;
14
+ readonly bindingPreviewActiveSignal: Signal<boolean>;
15
15
  private readonly _terminalBindingGuidesSignal;
16
16
  readonly terminalBindingGuidesSignal: Signal<TerminalBindingGuideState[]>;
17
17
  private readonly _dropTargetShapeIdSignal;
@@ -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;
@@ -16,7 +16,6 @@ export declare class Mat {
16
16
  static Identity(): Mat;
17
17
  static Translate(x: number, y: number): Mat;
18
18
  static Rotate(angle: number): Mat;
19
- static SkewX(angle: number): Mat;
20
19
  static Scale(sx: number, sy: number): Mat;
21
20
  /** Compose: this × other */
22
21
  compose(other: Mat): Mat;
@@ -27,6 +26,6 @@ export declare class Mat {
27
26
  invert(): Mat;
28
27
  toCssString(): string;
29
28
  toSvgString(): string;
30
- /** Create a transform for a shape: translate * rotate * skewX * scale. */
31
- static ForShape(x: number, y: number, rotation: number, scaleX?: number, scaleY?: number, skewX?: number): Mat;
29
+ /** Create a transform for a shape: translate * rotate * scale. */
30
+ static ForShape(x: number, y: number, rotation: number, scaleX?: number, scaleY?: number): Mat;
32
31
  }
@@ -1,54 +1,61 @@
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, getSelectionResizeBounds, 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";
31
37
  export { ShapeUtil } from "./shapes/shapeUtil";
32
- export type { ShapeBoundsSnapGeometry, ShapeBrushSelectInput, ShapeBrushWrapInput, ShapeClipboardCopyInput, ShapeBindingPointInput, ShapeBindingTargetHitTestInput, 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";
33
- export type { HandleSnapContext, HandleSnapInput, HandleSnapMode, HandleSnapResult, HandleSnapSnapshot, HandleSnapSnapshotInput, ResizeSnapInput, ResizeSnapResult, ResizeSnapSnapshot, SnapAxis, SnapCoordinateSpace, SnapPointIndex, SnapPointIndexEntry, SnapPointKind, TranslateSnapInput, TranslateSnapResult, TranslateSnapSnapshot, } from "./editor/managers/snapTypes";
38
+ export { CHILD_TRANSFORM_POLICY_EPSILON, formatChildTransformPolicyViolation, getChildTransformPolicyViolation, } from "./shapes/childTransformPolicy";
39
+ export type { ChildTransformPolicy, ChildTransformPolicyProvider, ChildTransformPolicyViolation, } from "./shapes/childTransformPolicy";
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";
41
+ export type { HandleSnapContext, HandleSnapInput, HandleSnapMode, HandleSnapResult, HandleSnapSnapshot, HandleSnapSnapshotInput, ResizeSnapInput, ResizeSnapResult, ResizeSnapSnapshot, SnapAxis, SnapCoordinateSpace, SnapPointIndex, SnapPointIndexEntry, SnapPointKind, TranslateSnapInput, TranslateSnapResult, TranslateSnapSnapshot, } from "./editor/snapping/snapTypes";
34
42
  export { ShapeUtilRegistry } from "./shapes/shapeUtilRegistry";
35
43
  export { resolveTerminalBindingAtPoint, } from "./bindings/terminalBinding";
36
44
  export { ShapeSvgExporterRegistry, exportShapesToSvgString, renderSvgNode, } from "./exports/svg";
37
45
  export type { ShapeSvgExporter, SvgAttributeValue, SvgElementNode, SvgExportContext, SvgExportOptions, SvgExportResult, SvgExportSkipReason, SvgExportSkippedShape, SvgNode, } from "./exports/svg";
38
46
  export { getExportIntegrityReport, repairExportIntegrity, } from "./exports/integrity";
39
47
  export type { ExportIntegrityIssue, ExportIntegrityIssueKind, ExportIntegrityRepairResult, ExportIntegrityReport, } from "./exports/integrity";
40
- export { getShapeCapabilityManifest } from "./shapes/capabilities";
41
- export type { ShapeCapabilityDefinition, ShapeCapabilityManifest, ShapeCapabilityManifestEntry, ShapeCapabilitySupport, } from "./shapes/capabilities";
42
48
  export { BindingUtil } from "./bindings/bindingUtil";
43
49
  export type { BindingSelectionCompanionFrameContext, BindingTargetShapeContentCutoutContext, BindingUtilEffect, } from "./bindings/bindingUtil";
44
50
  export { BindingUtilRegistry } from "./bindings/bindingUtilRegistry";
45
- export { StateNode } from "./editor/stateNode";
46
- 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";
47
54
  export { HandTool } from "./tools/hand/handTool";
48
55
  export { SelectTool } from "./tools/select/selectTool";
49
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";
50
57
  export type { CustomShapeColorRef, ShapeColor, ThemeColorSlot, ThemeColorResolver, ThemeColorTokenName, ThemeShapeColorRef, } from "./shapes/colors";
51
- export { getEditorOptionsFromPlugins, setupEditorPlugins, type EditorPlugin, createEditorRuntimeToken, EditorRuntimeRegistry, type EditorRuntimeToken, } from "./plugins";
58
+ export { type EditorPlugin, createEditorRuntimeToken, EditorRuntimeRegistry, type EditorRuntimeToken, } from "./plugins";
52
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";
53
60
  export { Vec } from "./geometry/vec";
54
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;
@@ -59,7 +59,6 @@ export interface ShapeRecordBase<Type extends string = string, Props extends obj
59
59
  x: number;
60
60
  y: number;
61
61
  rotation: number;
62
- skewX: number;
63
62
  scaleX: number;
64
63
  scaleY: number;
65
64
  opacity: number;
@@ -2,12 +2,12 @@ import type { ShapeUtilRegistry } from "../shapes/shapeUtilRegistry";
2
2
  import type { BindingUtilRegistry } from "../bindings/bindingUtilRegistry";
3
3
  import type { StoreSnapshot } from "../../store/index";
4
4
  import { type DocumentRecord, type SessionRecord } from "./records";
5
- export type DocumentSnapshot = StoreSnapshot<DocumentRecord, 2>;
5
+ export type DocumentSnapshot = StoreSnapshot<DocumentRecord, 3>;
6
6
  export type SessionSnapshot = StoreSnapshot<SessionRecord, 1>;
7
7
  export declare class SnapshotParseError extends Error {
8
8
  constructor(message: string);
9
9
  }
10
- declare const CURRENT_DOCUMENT_SNAPSHOT_VERSION: 2;
10
+ declare const CURRENT_DOCUMENT_SNAPSHOT_VERSION: 3;
11
11
  declare const CURRENT_SESSION_SNAPSHOT_VERSION: 1;
12
12
  export declare function getSnapshotEnvelope(snapshot: unknown, kind: "document"): {
13
13
  schemaVersion: typeof CURRENT_DOCUMENT_SNAPSHOT_VERSION;
@@ -0,0 +1,16 @@
1
+ import type { ShapeRecordBase } from "../schema/records";
2
+ export type ChildTransformPolicy = "isometry" | "similarity";
3
+ export declare const CHILD_TRANSFORM_POLICY_EPSILON = 1e-8;
4
+ export interface ChildTransformPolicyProvider<S extends ShapeRecordBase = ShapeRecordBase> {
5
+ canReceiveChildren(shape: S): boolean;
6
+ getChildTransformPolicy(shape: S): ChildTransformPolicy;
7
+ }
8
+ export interface ChildTransformPolicyViolation {
9
+ shapeId: ShapeRecordBase["id"];
10
+ shapeType: ShapeRecordBase["type"];
11
+ policy: ChildTransformPolicy;
12
+ scaleX: number;
13
+ scaleY: number;
14
+ }
15
+ export declare function getChildTransformPolicyViolation<S extends ShapeRecordBase>(shape: S, provider: ChildTransformPolicyProvider<S>, epsilon?: number): ChildTransformPolicyViolation | null;
16
+ export declare function formatChildTransformPolicyViolation(violation: ChildTransformPolicyViolation): string;
@@ -2,11 +2,12 @@ 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
+ import type { ChildTransformPolicy } from "./childTransformPolicy";
10
11
  export interface ShapeEditEndResult {
11
12
  deleteShapeIds?: ShapeId[];
12
13
  }
@@ -94,8 +95,6 @@ export interface ShapePointHitTestInput extends ShapeGeometryInput {
94
95
  pagePoint: Vec;
95
96
  positionedPoint: Vec;
96
97
  }
97
- export interface ShapeBindingTargetHitTestInput extends ShapePointHitTestInput {
98
- }
99
98
  export interface ShapeTerminalBindingOutline {
100
99
  points: readonly Vec[];
101
100
  closed: boolean;
@@ -223,9 +222,12 @@ export declare abstract class ShapeUtil<S extends ShapeRecordBase = ShapeRecordB
223
222
  getLabelPathGeometry(_shape: S, _input: ShapeSelectionOverlayInfoInput): ShapeLabelPathGeometry | null;
224
223
  isWrappedByBrush(_shape: S, input: ShapeBrushWrapInput): boolean;
225
224
  canSelectByBrush(shape: S, input: ShapeBrushSelectInput): boolean;
226
- 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;
227
228
  canEdit(_shape: S): boolean;
228
229
  canReceiveChildren(_shape: S): boolean;
230
+ getChildTransformPolicy(_shape: S): ChildTransformPolicy;
229
231
  canReceiveChild(shape: S, _child: ShapeRecordBase): boolean;
230
232
  isChildVisible(_shape: S, _child: ShapeRecordBase, _input: ShapeChildVisibilityInput): boolean;
231
233
  getChildPlacementMeta(_shape: S, child: ShapeRecordBase, _input: ShapeChildPlacementInput): Record<string, unknown>;
@@ -235,10 +237,9 @@ 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
- hitTestBindingTarget(shape: S, positionedPoint: Vec, input?: ShapeBindingTargetHitTestInput): boolean;
242
+ hitTestBindingTarget(shape: S, positionedPoint: Vec, input?: ShapePointHitTestInput): boolean;
242
243
  hitTestLineSegment(shape: S, input: ShapeLineSegmentHitTestInput): boolean;
243
244
  resolveBindingPoint(shape: S, input: ShapeBindingPointInput): Vec;
244
245
  }
@@ -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
  }