@yuzhouu/canvas-kit 0.1.3 → 0.1.4

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 (302) hide show
  1. package/README.md +80 -78
  2. package/_vendor/canvas-core/bindings/{BindingUtil.d.ts → bindingUtil.d.ts} +1 -1
  3. package/_vendor/canvas-core/bindings/{BindingUtilRegistry.d.ts → bindingUtilRegistry.d.ts} +1 -1
  4. package/_vendor/canvas-core/bindings/terminalBinding.d.ts +28 -0
  5. package/_vendor/canvas-core/editor/clipboard.d.ts +2 -2
  6. package/_vendor/canvas-core/editor/commands.d.ts +6 -1
  7. package/_vendor/canvas-core/editor/createEditorWithPlugins.d.ts +6 -0
  8. package/_vendor/canvas-core/editor/edgeScroll.d.ts +1 -1
  9. package/_vendor/canvas-core/editor/{Editor.d.ts → editor.d.ts} +46 -51
  10. package/_vendor/canvas-core/editor/editorComputedHelpers.d.ts +5 -5
  11. package/_vendor/canvas-core/editor/editorSelectionTransforms.d.ts +2 -2
  12. package/_vendor/canvas-core/editor/events.d.ts +1 -1
  13. package/_vendor/canvas-core/editor/{HistoryManager.d.ts → historyManager.d.ts} +1 -1
  14. package/_vendor/canvas-core/editor/index.d.ts +10 -7
  15. package/_vendor/canvas-core/editor/interactions.d.ts +2 -2
  16. package/_vendor/canvas-core/editor/internal.d.ts +1 -1
  17. package/_vendor/canvas-core/editor/managers/{BindingManager.d.ts → bindingManager.d.ts} +1 -1
  18. package/_vendor/canvas-core/editor/managers/{CameraManager.d.ts → cameraManager.d.ts} +2 -2
  19. package/_vendor/canvas-core/editor/managers/{ClipboardManager.d.ts → clipboardManager.d.ts} +1 -1
  20. package/_vendor/canvas-core/editor/managers/{DocumentSnapshotManager.d.ts → documentSnapshotManager.d.ts} +1 -1
  21. package/_vendor/canvas-core/editor/managers/{InputsManager.d.ts → inputsManager.d.ts} +1 -1
  22. package/_vendor/canvas-core/editor/managers/{InteractionTransientManager.d.ts → interactionTransientManager.d.ts} +13 -10
  23. package/_vendor/canvas-core/editor/managers/{QueryManager.d.ts → queryManager.d.ts} +7 -6
  24. package/_vendor/canvas-core/editor/managers/{RenderWindowManager.d.ts → renderWindowManager.d.ts} +1 -1
  25. package/_vendor/canvas-core/editor/managers/selectionGeometry.d.ts +5 -5
  26. package/_vendor/canvas-core/editor/managers/{SelectionLayoutManager.d.ts → selectionLayoutManager.d.ts} +2 -2
  27. package/_vendor/canvas-core/editor/managers/{SelectionManager.d.ts → selectionManager.d.ts} +1 -1
  28. package/_vendor/canvas-core/editor/managers/{SelectionOverlayManager.d.ts → selectionOverlayManager.d.ts} +4 -3
  29. package/_vendor/canvas-core/editor/managers/{ShapeEditingManager.d.ts → shapeEditingManager.d.ts} +1 -1
  30. package/_vendor/canvas-core/editor/managers/{ShapeGeometryManager.d.ts → shapeGeometryManager.d.ts} +5 -5
  31. package/_vendor/canvas-core/editor/managers/{ShapeHierarchyManager.d.ts → shapeHierarchyManager.d.ts} +3 -6
  32. package/_vendor/canvas-core/editor/managers/shapeOrder.d.ts +1 -1
  33. package/_vendor/canvas-core/editor/managers/shapeReparenting.d.ts +1 -1
  34. package/_vendor/canvas-core/editor/managers/shortcutManager.d.ts +56 -0
  35. package/_vendor/canvas-core/editor/managers/snapCalculations.d.ts +2 -2
  36. package/_vendor/canvas-core/editor/managers/snapGeometry.d.ts +2 -2
  37. package/_vendor/canvas-core/editor/managers/snapIndicators.d.ts +2 -2
  38. package/_vendor/canvas-core/editor/managers/{SnapManager.d.ts → snapManager.d.ts} +1 -1
  39. package/_vendor/canvas-core/editor/managers/{SnapSnapshotBuilder.d.ts → snapSnapshotBuilder.d.ts} +1 -1
  40. package/_vendor/canvas-core/editor/managers/snapTypes.d.ts +2 -2
  41. package/_vendor/canvas-core/editor/managers/{SpatialIndexManager.d.ts → spatialIndexManager.d.ts} +4 -4
  42. package/_vendor/canvas-core/editor/managers/{ToolManager.d.ts → toolManager.d.ts} +4 -5
  43. package/_vendor/canvas-core/editor/queries/shapeTransforms.d.ts +4 -4
  44. package/_vendor/canvas-core/editor/renderWindow.d.ts +1 -1
  45. package/_vendor/canvas-core/editor/resizeGeometry.d.ts +2 -2
  46. package/_vendor/canvas-core/editor/selection.d.ts +26 -19
  47. package/_vendor/canvas-core/editor/selectionHandleInteractions.d.ts +1 -1
  48. package/_vendor/canvas-core/editor/selectionOverlay.d.ts +7 -5
  49. package/_vendor/canvas-core/editor/{StateNode.d.ts → stateNode.d.ts} +1 -1
  50. package/_vendor/canvas-core/exports/integrity.d.ts +1 -1
  51. package/_vendor/canvas-core/exports/svg.d.ts +6 -2
  52. package/_vendor/canvas-core/geometry/{Box.d.ts → box.d.ts} +1 -1
  53. package/_vendor/canvas-core/geometry/{Ellipse2d.d.ts → ellipse2d.d.ts} +3 -3
  54. package/_vendor/canvas-core/geometry/{Geometry2d.d.ts → geometry2d.d.ts} +2 -2
  55. package/_vendor/canvas-core/geometry/index.d.ts +7 -7
  56. package/_vendor/canvas-core/geometry/{Mat.d.ts → mat.d.ts} +1 -1
  57. package/_vendor/canvas-core/geometry/{Polyline2d.d.ts → polyline2d.d.ts} +3 -3
  58. package/_vendor/canvas-core/geometry/{Rectangle2d.d.ts → rectangle2d.d.ts} +3 -3
  59. package/_vendor/canvas-core/geometry/segments.d.ts +1 -1
  60. package/_vendor/canvas-core/index.d.ts +33 -31
  61. package/_vendor/canvas-core/plugins/{types.d.ts → editorPlugin.d.ts} +10 -9
  62. package/_vendor/canvas-core/plugins/index.d.ts +1 -1
  63. package/_vendor/canvas-core/schema/snapshotSupport.d.ts +43 -0
  64. package/_vendor/canvas-core/schema/snapshots.d.ts +6 -2
  65. package/_vendor/canvas-core/shapes/capabilities.d.ts +1 -1
  66. package/_vendor/canvas-core/shapes/colors.d.ts +26 -0
  67. package/_vendor/canvas-core/shapes/{ShapeUtil.d.ts → shapeUtil.d.ts} +22 -9
  68. package/_vendor/canvas-core/shapes/{ShapeUtilRegistry.d.ts → shapeUtilRegistry.d.ts} +1 -1
  69. package/_vendor/canvas-core/surfaces/actions.d.ts +35 -0
  70. package/_vendor/canvas-core/{contextMenu.d.ts → surfaces/contextMenu.d.ts} +11 -9
  71. package/_vendor/canvas-core/{toolbar.d.ts → surfaces/toolbar.d.ts} +17 -38
  72. package/_vendor/canvas-core/tools/hand/handTool.d.ts +5 -0
  73. package/_vendor/canvas-core/tools/index.d.ts +2 -2
  74. package/_vendor/canvas-core/tools/select/selectContainment.d.ts +5 -4
  75. package/_vendor/canvas-core/tools/select/selectTool.d.ts +5 -0
  76. package/_vendor/canvas-core/tools/select/selectToolHelpers.d.ts +3 -3
  77. package/_vendor/canvas-core/tools/select/states/{BrushingState.d.ts → brushingState.d.ts} +3 -3
  78. package/_vendor/canvas-core/tools/select/states/{DraggingSelectionHandleInteractionState.d.ts → draggingSelectionHandleInteractionState.d.ts} +3 -3
  79. package/_vendor/canvas-core/tools/select/states/{IdleState.d.ts → idleState.d.ts} +2 -2
  80. package/_vendor/canvas-core/tools/select/states/index.d.ts +11 -11
  81. package/_vendor/canvas-core/tools/select/states/{PointingCanvasState.d.ts → pointingCanvasState.d.ts} +3 -3
  82. package/_vendor/canvas-core/tools/select/states/{PointingResizeHandleState.d.ts → pointingResizeHandleState.d.ts} +3 -3
  83. package/_vendor/canvas-core/tools/select/states/{PointingRotateHandleState.d.ts → pointingRotateHandleState.d.ts} +3 -3
  84. package/_vendor/canvas-core/tools/select/states/{PointingSelectionHandleInteractionState.d.ts → pointingSelectionHandleInteractionState.d.ts} +3 -3
  85. package/_vendor/canvas-core/tools/select/states/{PointingShapeState.d.ts → pointingShapeState.d.ts} +3 -3
  86. package/_vendor/canvas-core/tools/select/states/{ResizingState.d.ts → resizingState.d.ts} +3 -3
  87. package/_vendor/canvas-core/tools/select/states/{RotatingState.d.ts → rotatingState.d.ts} +3 -3
  88. package/_vendor/canvas-core/tools/select/states/{SelectStateNode.d.ts → selectStateNode.d.ts} +2 -2
  89. package/_vendor/canvas-core/tools/select/states/{TranslatingState.d.ts → translatingState.d.ts} +5 -4
  90. package/_vendor/canvas-react/components/CanvasView.d.ts +7 -4
  91. package/_vendor/canvas-react/components/PageSpace.d.ts +1 -1
  92. package/_vendor/canvas-react/components/ShapeLayer.d.ts +4 -1
  93. package/_vendor/canvas-react/components/index.d.ts +0 -2
  94. package/_vendor/canvas-react/components/overlays/BindingGuide.d.ts +24 -0
  95. package/_vendor/canvas-react/components/overlays/BindingPreviewOverlay.d.ts +1 -0
  96. package/_vendor/canvas-react/components/overlays/BrushBoxOverlay.d.ts +1 -0
  97. package/_vendor/canvas-react/components/overlays/OverlaySvgRoot.d.ts +1 -0
  98. package/_vendor/canvas-react/components/overlays/SelectionFrameOverlay.d.ts +1 -0
  99. package/_vendor/canvas-react/components/overlays/SelectionHandlesOverlay.d.ts +1 -0
  100. package/_vendor/canvas-react/components/overlays/SelectionOverlaySvg.d.ts +1 -0
  101. package/_vendor/canvas-react/components/overlays/SelectionPathOverlay.d.ts +1 -0
  102. package/_vendor/canvas-react/components/overlays/ShapeOutlineOverlay.d.ts +8 -0
  103. package/_vendor/canvas-react/components/overlays/SnapIndicatorsOverlay.d.ts +1 -0
  104. package/_vendor/canvas-react/components/useCanvasDomEvents.d.ts +21 -0
  105. package/_vendor/canvas-react/dom.d.ts +10 -0
  106. package/_vendor/canvas-react/host/canvasOverlayRegistryContext.d.ts +3 -0
  107. package/_vendor/{canvas-plugin-api/index.d.ts → canvas-react/host/canvasPlugin.d.ts} +24 -8
  108. package/_vendor/canvas-react/host/contextMenuRegistry.d.ts +3 -3
  109. package/_vendor/canvas-react/host/domEventGuards.d.ts +1 -1
  110. package/_vendor/{canvas-plugin-api/feature.d.ts → canvas-react/host/extension.d.ts} +3 -3
  111. package/_vendor/canvas-react/host/index.d.ts +8 -3
  112. package/_vendor/canvas-react/host/overlayRegistry.d.ts +18 -0
  113. package/_vendor/canvas-react/host/pluginHost.d.ts +2 -93
  114. package/_vendor/canvas-react/host/pluginHostManifest.d.ts +2 -0
  115. package/_vendor/canvas-react/host/pluginHostRuntime.d.ts +3 -0
  116. package/_vendor/canvas-react/host/pluginHostTypes.d.ts +102 -0
  117. package/_vendor/canvas-react/host/pluginHostValidation.d.ts +11 -0
  118. package/_vendor/canvas-react/host/rendererRegistry.d.ts +1 -1
  119. package/_vendor/canvas-react/host/toolbarRegistry.d.ts +7 -7
  120. package/_vendor/canvas-react/index.d.ts +2 -1
  121. package/_vendor/plugin-arrow/arrowBindingAnchors.d.ts +5 -0
  122. package/_vendor/plugin-arrow/arrowBindingGeometry.d.ts +28 -0
  123. package/_vendor/plugin-arrow/arrowGeometry.d.ts +24 -0
  124. package/_vendor/plugin-arrow/{ArrowShapeUtil.d.ts → arrowShapeUtil.d.ts} +5 -4
  125. package/_vendor/plugin-arrow/arrowTerminalBindingResolver.d.ts +5 -6
  126. package/_vendor/plugin-arrow/arrowTerminalCommands.d.ts +4 -4
  127. package/_vendor/plugin-arrow/canvas.d.ts +1 -1
  128. package/_vendor/plugin-arrow/{core.d.ts → editor.d.ts} +2 -2
  129. package/_vendor/plugin-arrow/feature.d.ts +2 -2
  130. package/_vendor/plugin-arrow/index.d.ts +6 -5
  131. package/_vendor/plugin-arrow/types.d.ts +2 -2
  132. package/_vendor/plugin-draw/DrawShapeRenderer.d.ts +4 -2
  133. package/_vendor/plugin-draw/canvas.d.ts +1 -1
  134. package/_vendor/plugin-draw/drawHitTest.d.ts +2 -2
  135. package/_vendor/plugin-draw/editor.d.ts +7 -0
  136. package/_vendor/plugin-draw/feature.d.ts +2 -2
  137. package/_vendor/plugin-draw/index.d.ts +3 -3
  138. package/_vendor/plugin-draw/types.d.ts +3 -3
  139. package/_vendor/plugin-eraser/canvas.d.ts +1 -1
  140. package/_vendor/plugin-eraser/editor.d.ts +2 -0
  141. package/_vendor/plugin-eraser/feature.d.ts +2 -2
  142. package/_vendor/plugin-eraser/index.d.ts +2 -2
  143. package/_vendor/plugin-frame/canvas.d.ts +4 -3
  144. package/_vendor/plugin-frame/editor.d.ts +7 -0
  145. package/_vendor/plugin-frame/feature.d.ts +2 -2
  146. package/_vendor/plugin-frame/{FrameShapeUtil.d.ts → frameShapeUtil.d.ts} +4 -3
  147. package/_vendor/plugin-frame/{FrameTool.d.ts → frameTool.d.ts} +1 -1
  148. package/_vendor/plugin-frame/index.d.ts +4 -4
  149. package/_vendor/plugin-geo/canvas.d.ts +6 -4
  150. package/_vendor/plugin-geo/editor.d.ts +7 -0
  151. package/_vendor/plugin-geo/feature.d.ts +2 -2
  152. package/_vendor/plugin-geo/geoGeometry.d.ts +8 -0
  153. package/_vendor/plugin-geo/{GeoTools.d.ts → geoTools.d.ts} +9 -0
  154. package/_vendor/plugin-geo/index.d.ts +4 -4
  155. package/_vendor/plugin-geo/types.d.ts +6 -4
  156. package/_vendor/plugin-group/canvas.d.ts +5 -5
  157. package/_vendor/plugin-group/editor.d.ts +7 -0
  158. package/_vendor/plugin-group/feature.d.ts +2 -2
  159. package/_vendor/plugin-group/index.d.ts +3 -3
  160. package/_vendor/plugin-image/canvas.d.ts +1 -1
  161. package/_vendor/plugin-image/{core.d.ts → editor.d.ts} +3 -3
  162. package/_vendor/plugin-image/feature.d.ts +2 -2
  163. package/_vendor/plugin-image/{ImageShapeUtil.d.ts → imageShapeUtil.d.ts} +2 -1
  164. package/_vendor/plugin-image/index.d.ts +2 -2
  165. package/_vendor/plugin-laser/canvas.d.ts +1 -1
  166. package/_vendor/plugin-laser/editor.d.ts +2 -0
  167. package/_vendor/plugin-laser/feature.d.ts +2 -2
  168. package/_vendor/plugin-laser/index.d.ts +2 -2
  169. package/_vendor/plugin-text/canvas.d.ts +1 -1
  170. package/_vendor/plugin-text/editor.d.ts +2 -0
  171. package/_vendor/plugin-text/feature.d.ts +2 -2
  172. package/_vendor/plugin-text/host/RichTextToolbar.d.ts +3 -1
  173. package/_vendor/plugin-text/host/richTextBubbleMenuPositionSync.d.ts +7 -0
  174. package/_vendor/plugin-text/textShapeSvgExporter.d.ts +6 -0
  175. package/_vendor/plugin-text/textTypes.d.ts +2 -2
  176. package/_vendor/store/index.d.ts +1 -1
  177. package/_vendor/store/{Store.d.ts → store.d.ts} +7 -1
  178. package/browser/localSnapshotRestore.d.ts +13 -0
  179. package/{_vendor/canvas-product-react/persistence/localSnapshotPersistence.d.ts → browser/persistence.d.ts} +16 -10
  180. package/builtins/controller/createBuiltInCanvasController.d.ts +16 -0
  181. package/builtins/controller/layerController.d.ts +9 -0
  182. package/builtins/controller/shapeCreationController.d.ts +74 -0
  183. package/builtins/extensions.d.ts +15 -0
  184. package/builtins/index.d.ts +5 -0
  185. package/chrome/CanvasKitFloatingToolbarLayer.d.ts +6 -0
  186. package/chrome/FloatingSelectionToolbarPageSpace.d.ts +9 -0
  187. package/chrome/bindings/useCanvasKitChromeControls.d.ts +27 -0
  188. package/chrome/bindings/useContextMenuSurface.d.ts +12 -0
  189. package/chrome/bindings/useSvgExport.d.ts +15 -0
  190. package/chrome/bindings/useToolbarSurfaces.d.ts +26 -0
  191. package/chrome/types.d.ts +66 -0
  192. package/chrome/useCanvasKitChromeContext.d.ts +19 -0
  193. package/controller/canvasKitController.d.ts +36 -0
  194. package/{_vendor/canvas-product-react/api/canvasProductApi.d.ts → core/controller/canvasProductController.d.ts} +11 -21
  195. package/core/controller/featureControllerRegistry.d.ts +12 -0
  196. package/core/controller/index.d.ts +4 -0
  197. package/core/controller/productLayerTree.d.ts +10 -0
  198. package/core/features/actions/canvasActionContext.d.ts +15 -0
  199. package/core/features/actions/canvasActions.d.ts +26 -0
  200. package/core/features/clipboard/clipboardContextMenuContributions.d.ts +2 -0
  201. package/core/features/clipboard/clipboardContribution.d.ts +19 -0
  202. package/{_vendor/canvas-product-react/capabilities → core/features}/clipboard/clipboardService.d.ts +3 -2
  203. package/core/features/context-menu/contextMenuActions.d.ts +12 -0
  204. package/core/features/context-menu/contextMenuContext.d.ts +6 -0
  205. package/core/features/context-menu/contextMenuContribution.d.ts +4 -0
  206. package/core/features/context-menu/viewContextMenuContributions.d.ts +2 -0
  207. package/{_vendor/canvas-product-react/capabilities/export/useSvgExport.d.ts → core/features/export/svgExport.d.ts} +11 -7
  208. package/core/features/hostActionIds.d.ts +1 -0
  209. package/core/features/toolbar/selectionContextMenuContributions.d.ts +2 -0
  210. package/core/features/toolbar/toolContextMenuContributions.d.ts +2 -0
  211. package/core/features/toolbar/toolbarContribution.d.ts +4 -0
  212. package/core/features/toolbar/toolbarLabels.d.ts +8 -0
  213. package/core/index.d.ts +23 -0
  214. package/core/runtime/productAssets.d.ts +18 -0
  215. package/core/runtime/productContributions.d.ts +9 -0
  216. package/core/runtime/productDefinition.d.ts +32 -0
  217. package/core/runtime/productEditor.d.ts +3 -0
  218. package/core/runtime/productHost.d.ts +17 -0
  219. package/{_vendor/canvas-product-react → core}/runtime/productServices.d.ts +1 -2
  220. package/{_vendor/plugin-image-product-react → features/image}/ImageImportController.d.ts +2 -2
  221. package/{_vendor/plugin-image-product-react → features/image}/imageAssetService.d.ts +2 -2
  222. package/{_vendor/plugin-image-product-react → features/image}/imageBlobStore.d.ts +1 -1
  223. package/features/image/imageFileHelpers.d.ts +35 -0
  224. package/{_vendor/plugin-image-product-react → features/image}/imageHostActions.d.ts +13 -12
  225. package/features/image/imageHostExtension.d.ts +5 -0
  226. package/features/image/imageProductController.d.ts +22 -0
  227. package/features/image/imageProductToolbarActions.d.ts +2 -0
  228. package/{_vendor/plugin-image-product-react → features/image}/imageToolbarHostBridge.d.ts +2 -2
  229. package/{_vendor/plugin-image-product-react → features/image}/index.d.ts +4 -5
  230. package/{_vendor/plugin-image-product-react → features/image}/svgImageAssetInliner.d.ts +1 -1
  231. package/{_vendor/plugin-image-product-react → features/image}/useImageImport.d.ts +5 -4
  232. package/index.css +1 -2
  233. package/index.d.ts +12 -14
  234. package/index.mjs +66 -1
  235. package/package.json +1 -11
  236. package/product/canvasKitProduct.d.ts +59 -0
  237. package/react/CanvasKitPersistenceNotice.d.ts +4 -0
  238. package/react/CanvasKitRoot.d.ts +5 -0
  239. package/react/useCanvasKitController.d.ts +5 -0
  240. package/{product/useCanvasClipboardShortcuts.d.ts → react/useCanvasKitKeyboardShortcuts.d.ts} +1 -1
  241. package/react/useCanvasKitRuntime.d.ts +4 -0
  242. package/react/useCanvasKitStartup.d.ts +9 -0
  243. package/runtime/canvasKitHostExtensions.d.ts +19 -0
  244. package/runtime/canvasKitRuntime.d.ts +19 -0
  245. package/runtime/canvasKitRuntimeInitializer.d.ts +11 -0
  246. package/_vendor/canvas-core/bindings/arrow/arrowBindingHelpers.d.ts +0 -28
  247. package/_vendor/canvas-core/tools/hand/HandTool.d.ts +0 -5
  248. package/_vendor/canvas-core/tools/select/SelectTool.d.ts +0 -5
  249. package/_vendor/canvas-product-react/api/apiRegistry.d.ts +0 -12
  250. package/_vendor/canvas-product-react/api/index.d.ts +0 -4
  251. package/_vendor/canvas-product-react/capabilities/clipboard/systemClipboard.d.ts +0 -16
  252. package/_vendor/canvas-product-react/capabilities/context-menu/systemContextMenu.d.ts +0 -17
  253. package/_vendor/canvas-product-react/capabilities/context-menu/useContextMenuSurface.d.ts +0 -12
  254. package/_vendor/canvas-product-react/capabilities/history/useHistoryControls.d.ts +0 -8
  255. package/_vendor/canvas-product-react/capabilities/pages/usePageControls.d.ts +0 -12
  256. package/_vendor/canvas-product-react/capabilities/toolbar/systemToolbar.d.ts +0 -32
  257. package/_vendor/canvas-product-react/capabilities/toolbar/useToolbarSurfaces.d.ts +0 -19
  258. package/_vendor/canvas-product-react/capabilities/zoom/useZoomControls.d.ts +0 -9
  259. package/_vendor/canvas-product-react/index.d.ts +0 -24
  260. package/_vendor/canvas-product-react/persistence/index.d.ts +0 -2
  261. package/_vendor/canvas-product-react/runtime/CanvasProductRoot.d.ts +0 -4
  262. package/_vendor/canvas-product-react/runtime/productDefinition.d.ts +0 -45
  263. package/_vendor/plugin-draw/core.d.ts +0 -7
  264. package/_vendor/plugin-eraser/core.d.ts +0 -2
  265. package/_vendor/plugin-frame/core.d.ts +0 -7
  266. package/_vendor/plugin-geo/core.d.ts +0 -7
  267. package/_vendor/plugin-group/core.d.ts +0 -7
  268. package/_vendor/plugin-image-product-react/imageProductApi.d.ts +0 -21
  269. package/_vendor/plugin-image-product-react/imageToolbarRuntime.d.ts +0 -2
  270. package/_vendor/plugin-image-product-react/snapshotGuards.d.ts +0 -1
  271. package/_vendor/plugin-laser/core.d.ts +0 -2
  272. package/_vendor/plugin-text/TextShapeSvgExporter.d.ts +0 -6
  273. package/_vendor/plugin-text/core.d.ts +0 -2
  274. package/api/canvasKitApi.d.ts +0 -29
  275. package/product/Shell.d.ts +0 -19
  276. package/product/chromeContext.d.ts +0 -70
  277. package/product/createCanvasKitEditor.d.ts +0 -6
  278. package/product/index.d.ts +0 -7
  279. package/product/persistence.d.ts +0 -3
  280. package/product/product.d.ts +0 -22
  281. package/product-CxN5NN6u.mjs +0 -4
  282. package/product.mjs +0 -1
  283. package/standard/extensions.d.ts +0 -1
  284. package/standard/index.d.ts +0 -3
  285. package/standard/standardApi.d.ts +0 -91
  286. package/standard-R17_x8HU.mjs +0 -44
  287. package/standard.mjs +0 -1
  288. /package/_vendor/canvas-core/editor/managers/{SideEffectManager.d.ts → sideEffectManager.d.ts} +0 -0
  289. /package/_vendor/canvas-core/geometry/{Vec.d.ts → vec.d.ts} +0 -0
  290. /package/_vendor/canvas-react/host/{CanvasRendererRegistryContext.d.ts → canvasRendererRegistryContext.d.ts} +0 -0
  291. /package/_vendor/plugin-arrow/{ArrowBindingUtil.d.ts → arrowBindingUtil.d.ts} +0 -0
  292. /package/_vendor/plugin-arrow/{ArrowTool.d.ts → arrowTool.d.ts} +0 -0
  293. /package/_vendor/plugin-draw/{DrawShapeUtil.d.ts → drawShapeUtil.d.ts} +0 -0
  294. /package/_vendor/plugin-draw/{DrawTool.d.ts → drawTool.d.ts} +0 -0
  295. /package/_vendor/plugin-eraser/{EraserTool.d.ts → eraserTool.d.ts} +0 -0
  296. /package/_vendor/plugin-geo/{GeoShapeUtil.d.ts → geoShapeUtil.d.ts} +0 -0
  297. /package/_vendor/plugin-group/{GroupShapeUtil.d.ts → groupShapeUtil.d.ts} +0 -0
  298. /package/_vendor/plugin-laser/{LaserTool.d.ts → laserTool.d.ts} +0 -0
  299. /package/_vendor/plugin-text/{ArrowLabelBindingUtil.d.ts → arrowLabelBindingUtil.d.ts} +0 -0
  300. /package/_vendor/plugin-text/{GeoLabelBindingUtil.d.ts → geoLabelBindingUtil.d.ts} +0 -0
  301. /package/_vendor/plugin-text/{TextShapeUtil.d.ts → textShapeUtil.d.ts} +0 -0
  302. /package/_vendor/plugin-text/{TextTool.d.ts → textTool.d.ts} +0 -0
@@ -1,7 +1,7 @@
1
- export { DiamondTool, EllipseTool, RectangleTool } from "./GeoTools";
2
- export { GeoShapeUtil } from "./GeoShapeUtil";
3
- export { GeoShapeSvgExporter, createGeoCorePlugin } from "./core";
1
+ export { DiamondTool, EllipseTool, HexagonTool, RectangleTool, StarTool, TriangleTool, } from "./geoTools";
2
+ export { GeoShapeUtil } from "./geoShapeUtil";
3
+ export { GeoShapeSvgExporter, createGeoEditorPlugin } from "./editor";
4
4
  export { GeoShapeSvg, createGeoCanvasPlugin } from "./canvas";
5
5
  export { Geo, createGeoFeatureBundle } from "./feature";
6
6
  export type { GeoShapeKind, GeoShapeProps, GeoShapeRecord } from "./types";
7
- export { isGeoShapeRecord } from "./types";
7
+ export { GEO_SHAPE_KINDS, isGeoShapeKind, isGeoShapeRecord } from "./types";
@@ -1,11 +1,12 @@
1
- import { type BaseRecord, type ShapeRecordBase } from "../canvas-core/index";
2
- export type GeoShapeKind = "rectangle" | "ellipse" | "diamond";
1
+ import { type ShapeColor, type BaseRecord, type ShapeRecordBase } from "../canvas-core/index";
2
+ export declare const GEO_SHAPE_KINDS: readonly ["rectangle", "ellipse", "diamond", "triangle", "hexagon", "star"];
3
+ export type GeoShapeKind = (typeof GEO_SHAPE_KINDS)[number];
3
4
  export interface GeoShapeProps {
4
5
  w: number;
5
6
  h: number;
6
7
  geo: GeoShapeKind;
7
- fill: string;
8
- stroke: string;
8
+ fill: ShapeColor;
9
+ stroke: ShapeColor;
9
10
  strokeWidth: number;
10
11
  }
11
12
  export interface GeoShapeRecord extends ShapeRecordBase<"geo", GeoShapeProps> {
@@ -13,3 +14,4 @@ export interface GeoShapeRecord extends ShapeRecordBase<"geo", GeoShapeProps> {
13
14
  props: GeoShapeProps;
14
15
  }
15
16
  export declare function isGeoShapeRecord(record: BaseRecord | null | undefined): record is GeoShapeRecord;
17
+ export declare function isGeoShapeKind(value: unknown): value is GeoShapeKind;
@@ -1,10 +1,10 @@
1
- import type { LandCanvasPlugin } from "../canvas-plugin-api/index";
2
- import type { GroupShapeRecord } from "./GroupShapeUtil";
1
+ import { type LandCanvasPlugin } from "../canvas-react/host/index";
2
+ import type { GroupShapeRecord } from "./groupShapeUtil";
3
3
  interface GroupShapeSvgProps {
4
4
  shape: GroupShapeRecord;
5
+ isHovered?: boolean;
6
+ isSelected?: boolean;
5
7
  }
6
8
  export declare function createGroupCanvasPlugin(): LandCanvasPlugin;
7
- export declare function GroupShapeSvg({ shape, isSelected, }: GroupShapeSvgProps & {
8
- isSelected?: boolean;
9
- }): import("react/jsx-runtime").JSX.Element;
9
+ export declare function GroupShapeSvg({ shape, isHovered, isSelected, }: GroupShapeSvgProps): import("react/jsx-runtime").JSX.Element;
10
10
  export {};
@@ -0,0 +1,7 @@
1
+ import { type LandEditorPlugin, type ShapeSvgExporter, type SvgNode } from "../canvas-core/index";
2
+ import { type GroupShapeRecord } from "./groupShapeUtil";
3
+ export declare class GroupShapeSvgExporter implements ShapeSvgExporter<GroupShapeRecord> {
4
+ readonly type: "group";
5
+ toSvg(_shape: GroupShapeRecord): SvgNode;
6
+ }
7
+ export declare function createGroupEditorPlugin(): LandEditorPlugin;
@@ -1,3 +1,3 @@
1
- import { type LandFeatureBundle } from "../canvas-plugin-api/index";
1
+ import { type LandFeatureBundle } from "../canvas-react/host/index";
2
2
  export declare function createGroupFeatureBundle(): LandFeatureBundle;
3
- export declare const Group: import("../canvas-plugin-api/index").ConfigurableLandExtension<Record<string, never>>;
3
+ export declare const Group: import("../canvas-react/host/index").ConfigurableLandExtension<Record<string, never>>;
@@ -1,5 +1,5 @@
1
- export { GroupShapeUtil } from "./GroupShapeUtil";
2
- export type { GroupShapeProps, GroupShapeRecord } from "./GroupShapeUtil";
3
- export { GroupShapeSvgExporter, createGroupCorePlugin } from "./core";
1
+ export { GroupShapeUtil } from "./groupShapeUtil";
2
+ export type { GroupShapeProps, GroupShapeRecord } from "./groupShapeUtil";
3
+ export { GroupShapeSvgExporter, createGroupEditorPlugin } from "./editor";
4
4
  export { createGroupCanvasPlugin } from "./canvas";
5
5
  export { Group, createGroupFeatureBundle } from "./feature";
@@ -1,2 +1,2 @@
1
- import type { LandCanvasPlugin } from "../canvas-plugin-api/index";
1
+ import { type LandCanvasPlugin } from "../canvas-react/host/index";
2
2
  export declare function createImageCanvasPlugin(): LandCanvasPlugin;
@@ -1,4 +1,4 @@
1
- import { type LandCorePlugin, type ShapeSvgExporter, type SvgExportContext, type SvgNode, type ToolbarContext } from "../canvas-core/index";
1
+ import { type LandEditorPlugin, type ShapeSvgExporter, type SvgExportContext, type SvgNode, type CanvasActionContext } from "../canvas-core/index";
2
2
  import { type ImageShapeRecord } from "./types";
3
3
  export declare const IMAGE_REPLACE_TOOLBAR_ACTION_ID = "image.replace";
4
4
  export declare const IMAGE_DOWNLOAD_TOOLBAR_ACTION_ID = "image.download-original";
@@ -12,5 +12,5 @@ export declare class ImageShapeSvgExporter implements ShapeSvgExporter<ImageShap
12
12
  readonly type: "image";
13
13
  toSvg(shape: ImageShapeRecord, context: SvgExportContext): SvgNode | null;
14
14
  }
15
- export declare function createImageCorePlugin(): LandCorePlugin;
16
- export declare function isImageCropToolbarSession(context: ToolbarContext): boolean;
15
+ export declare function createImageEditorPlugin(): LandEditorPlugin;
16
+ export declare function isImageCropToolbarSession(context: CanvasActionContext): boolean;
@@ -1,3 +1,3 @@
1
- import { type LandFeatureBundle } from "../canvas-plugin-api/index";
1
+ import { type LandFeatureBundle } from "../canvas-react/host/index";
2
2
  export declare function createImageFeatureBundle(): LandFeatureBundle;
3
- export declare const Image: import("../canvas-plugin-api/index").ConfigurableLandExtension<Record<string, never>>;
3
+ export declare const Image: import("../canvas-react/host/index").ConfigurableLandExtension<Record<string, never>>;
@@ -1,10 +1,11 @@
1
- import { Box, ShapeUtil, type ShapeSelectionHandleAnchorInput, type ShapeSelectionHandleAnchors } from "../canvas-core/index";
1
+ import { Box, ShapeUtil, type ShapeSelectionHandleAnchorInput, type ShapeSelectionHandleAnchors, type ShapeSelectionResizeAspectRatioLockInput } from "../canvas-core/index";
2
2
  import type { ImageShapeProps, ImageShapeRecord } from "./types";
3
3
  export declare class ImageShapeUtil extends ShapeUtil<ImageShapeRecord> {
4
4
  readonly type: "image";
5
5
  getDefaultProps(): ImageShapeProps;
6
6
  validateProps(props: unknown): ImageShapeProps;
7
7
  getBounds(shape: ImageShapeRecord): Box;
8
+ getSelectionResizeAspectRatioLock(_shape: ImageShapeRecord, input: ShapeSelectionResizeAspectRatioLockInput): boolean | null;
8
9
  canEdit(_shape: ImageShapeRecord): boolean;
9
10
  getSelectionHandleAnchors(shape: ImageShapeRecord, input: ShapeSelectionHandleAnchorInput): ShapeSelectionHandleAnchors;
10
11
  }
@@ -1,8 +1,8 @@
1
- export { IMAGE_CROP_ASPECT_RATIO_TOOLBAR_ACTION_ID, IMAGE_CROP_DONE_TOOLBAR_ACTION_ID, IMAGE_CROP_RESET_TOOLBAR_ACTION_ID, IMAGE_CROP_TOOLBAR_ACTION_ID, IMAGE_CROP_ZOOM_TOOLBAR_ACTION_ID, IMAGE_DOWNLOAD_TOOLBAR_ACTION_ID, IMAGE_INSERT_TOOLBAR_ACTION_ID, IMAGE_REPLACE_TOOLBAR_ACTION_ID, ImageShapeSvgExporter, createImageCorePlugin, isImageCropToolbarSession, } from "./core";
1
+ export { IMAGE_CROP_ASPECT_RATIO_TOOLBAR_ACTION_ID, IMAGE_CROP_DONE_TOOLBAR_ACTION_ID, IMAGE_CROP_RESET_TOOLBAR_ACTION_ID, IMAGE_CROP_TOOLBAR_ACTION_ID, IMAGE_CROP_ZOOM_TOOLBAR_ACTION_ID, IMAGE_DOWNLOAD_TOOLBAR_ACTION_ID, IMAGE_INSERT_TOOLBAR_ACTION_ID, IMAGE_REPLACE_TOOLBAR_ACTION_ID, ImageShapeSvgExporter, createImageEditorPlugin, isImageCropToolbarSession, } from "./editor";
2
2
  export { createImageCanvasPlugin } from "./canvas";
3
3
  export { createImageCropInteractionHandler, createImageCropSelectionHandleInteractionHandler, } from "./cropInteractions";
4
4
  export { getImageCropModeMarkId } from "./crop";
5
5
  export { Image, createImageFeatureBundle } from "./feature";
6
- export { ImageShapeUtil } from "./ImageShapeUtil";
6
+ export { ImageShapeUtil } from "./imageShapeUtil";
7
7
  export type { ImageAssetProps, ImageAssetRecord, ImageShapeCrop, ImageShapeProps, ImageShapeRecord, } from "./types";
8
8
  export { isImageAssetRecord, isImageShapeRecord } from "./types";
@@ -1,2 +1,2 @@
1
- import { type LandCanvasPlugin } from "../canvas-plugin-api/index";
1
+ import { type LandCanvasPlugin } from "../canvas-react/host/index";
2
2
  export declare function createLaserCanvasPlugin(): LandCanvasPlugin;
@@ -0,0 +1,2 @@
1
+ import { type LandEditorPlugin } from "../canvas-core/index";
2
+ export declare function createLaserEditorPlugin(): LandEditorPlugin;
@@ -1,3 +1,3 @@
1
- import { type LandFeatureBundle } from "../canvas-plugin-api/index";
1
+ import { type LandFeatureBundle } from "../canvas-react/host/index";
2
2
  export declare function createLaserFeatureBundle(): LandFeatureBundle;
3
- export declare const Laser: import("../canvas-plugin-api/index").ConfigurableLandExtension<Record<string, never>>;
3
+ export declare const Laser: import("../canvas-react/host/index").ConfigurableLandExtension<Record<string, never>>;
@@ -1,4 +1,4 @@
1
- export { LaserTool } from "./LaserTool";
1
+ export { LaserTool } from "./laserTool";
2
2
  export { createLaserCanvasPlugin } from "./canvas";
3
- export { createLaserCorePlugin } from "./core";
3
+ export { createLaserEditorPlugin } from "./editor";
4
4
  export { Laser, createLaserFeatureBundle } from "./feature";
@@ -1,2 +1,2 @@
1
- import type { LandCanvasPlugin } from "../canvas-plugin-api/index";
1
+ import { type LandCanvasPlugin } from "../canvas-react/host/index";
2
2
  export declare function createTextCanvasPlugin(): LandCanvasPlugin;
@@ -0,0 +1,2 @@
1
+ import { type LandEditorPlugin } from "../canvas-core/index";
2
+ export declare function createTextEditorPlugin(): LandEditorPlugin;
@@ -1,3 +1,3 @@
1
- import { type LandFeatureBundle } from "../canvas-plugin-api/index";
1
+ import { type LandFeatureBundle } from "../canvas-react/host/index";
2
2
  export declare function createTextFeatureBundle(): LandFeatureBundle;
3
- export declare const Text: import("../canvas-plugin-api/index").ConfigurableLandExtension<Record<string, never>>;
3
+ export declare const Text: import("../canvas-react/host/index").ConfigurableLandExtension<Record<string, never>>;
@@ -1,6 +1,8 @@
1
+ import type { Editor as LandEditor } from "../../canvas-core/index";
1
2
  import type { Editor as TiptapEditor } from "@tiptap/react";
2
3
  export declare function isRichTextToolbarTarget(target: EventTarget | null): boolean;
3
- export declare function RichTextToolbar({ editor, version: _version, }: {
4
+ export declare function RichTextToolbar({ editor, landEditor, version: _version, }: {
4
5
  editor: TiptapEditor;
6
+ landEditor: LandEditor;
5
7
  version: number;
6
8
  }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,7 @@
1
+ import { type Editor as LandEditor } from "../../canvas-core/index";
2
+ import type { Editor as TiptapEditor } from "@tiptap/react";
3
+ export declare const RICH_TEXT_BUBBLE_MENU_PLUGIN_KEY = "land.rich-text-bubble-menu";
4
+ export declare function useRichTextBubbleMenuPositionSync({ landEditor, textEditor, }: {
5
+ landEditor: LandEditor;
6
+ textEditor: TiptapEditor;
7
+ }): void;
@@ -0,0 +1,6 @@
1
+ import { type ShapeSvgExporter, type SvgExportContext, type SvgNode } from "../canvas-core/index";
2
+ import type { TextShapeRecord } from "./textTypes";
3
+ export declare class TextShapeSvgExporter implements ShapeSvgExporter<TextShapeRecord> {
4
+ readonly type: "text";
5
+ toSvg(shape: TextShapeRecord, context: SvgExportContext): SvgNode | null;
6
+ }
@@ -1,4 +1,4 @@
1
- import type { ShapeRecordBase } from "../canvas-core/index";
1
+ import type { ShapeColor, ShapeRecordBase } from "../canvas-core/index";
2
2
  import type { JSONContent } from "@tiptap/core";
3
3
  export type RichTextJsonValue = string | number | boolean | null | RichTextJsonValue[] | {
4
4
  [key: string]: RichTextJsonValue;
@@ -19,7 +19,7 @@ export interface TextShapeProps {
19
19
  scale: number;
20
20
  font: TextShapeFont;
21
21
  size: TextShapeSize;
22
- color: string;
22
+ color: ShapeColor;
23
23
  textAlign: TextShapeAlign;
24
24
  }
25
25
  export interface TextShapeRecord extends ShapeRecordBase<"text", TextShapeProps> {
@@ -1,5 +1,5 @@
1
1
  export { composeRecordsDiff, createEmptyRecordsDiff, filterRecordsDiff, getRecordMap, getRecordsDiff, hasRecordsDiff, invertRecordsDiff, squashRecordsDiffs, } from "./diff";
2
2
  export { appendStoreHistoryMark, createStoreHistoryEntry, createStoreHistoryMark, StoreHistoryBuffer, } from "./history";
3
- export { Store } from "./Store";
3
+ export { Store } from "./store";
4
4
  export type { ChangeSource, RecordUpdate, RecordsDiff, ScopedStoreRecord, StoreRecord, StoreChange, StoreScopeOf, StoreSnapshot, } from "./types";
5
5
  export type { StoreHistoryEntry, StoreHistoryMark, StoreHistoryState, } from "./history";
@@ -1,15 +1,21 @@
1
- import { type Atom } from "../signals/index";
1
+ import { type Atom, type Signal } from "../signals/index";
2
2
  import type { ChangeSource, RecordsDiff, ScopedStoreRecord, StoreChange, StoreRecord, StoreScopeOf } from "./types";
3
3
  type StoreListener<TRecord extends StoreRecord> = (change: StoreChange<TRecord>) => void;
4
4
  type ScopedRecord<TRecord extends StoreRecord> = Extract<TRecord, ScopedStoreRecord>;
5
5
  export declare class Store<TRecord extends StoreRecord = StoreRecord> {
6
6
  readonly recordsSignal: Atom<Map<string, TRecord>>;
7
+ private readonly recordSignals;
7
8
  private readonly listeners;
8
9
  private transactionDepth;
9
10
  private draftRecords;
10
11
  private pendingSource;
11
12
  constructor(initialRecords: TRecord[]);
12
13
  get(id: string): TRecord | undefined;
14
+ /**
15
+ * Per-record reactive read that still respects draft records during atomic
16
+ * mutations. Use this inside computed values instead of wrapping `get(id)`.
17
+ */
18
+ getRecordSignal(id: string): Signal<TRecord | undefined>;
13
19
  getAll(): TRecord[];
14
20
  getByScope<TScope extends StoreScopeOf<ScopedRecord<TRecord>>>(scope: TScope): Array<Extract<ScopedRecord<TRecord>, {
15
21
  scope: TScope;
@@ -0,0 +1,13 @@
1
+ import { type Editor, type StoreSnapshot } from "../_vendor/canvas-core/index";
2
+ import type { ProductPersistenceRestoreResult } from "../core/runtime/productDefinition";
3
+ export interface PersistedEditorSnapshots {
4
+ documentSnapshot: unknown | null;
5
+ sessionSnapshot: unknown | null;
6
+ }
7
+ export interface LocalSnapshotRestoreResult extends ProductPersistenceRestoreResult {
8
+ preservedUnsupportedRecords: readonly unknown[];
9
+ }
10
+ export declare function restorePersistedEditorSnapshots(editor: Editor, { documentSnapshot, sessionSnapshot }: PersistedEditorSnapshots): LocalSnapshotRestoreResult;
11
+ export declare function getDocumentSnapshotWithPreservedRecords(editor: Editor, preservedRecords: readonly unknown[]): StoreSnapshot<{
12
+ id: string;
13
+ }>;
@@ -1,30 +1,32 @@
1
- import type { Editor } from "../../canvas-core/index";
2
- import type { ProductPersistenceAdapter } from "../runtime/productDefinition";
1
+ import type { Editor, StoreSnapshot } from "../_vendor/canvas-core/index";
2
+ import type { ProductPersistenceAdapter } from "../core/runtime/productDefinition";
3
+ import { type PersistedEditorSnapshots } from "./localSnapshotRestore";
3
4
  export declare const LAND_DOCUMENT_INDEXEDDB_NAME = "land.canvas.persistence";
4
5
  export declare const LAND_DOCUMENT_INDEXEDDB_STORE = "snapshots";
5
6
  export declare const LAND_IMAGE_BLOB_INDEXEDDB_STORE = "imageBlobs";
6
7
  export declare const LAND_DOCUMENT_STORAGE_KEY = "land.canvas.document";
7
8
  export declare const LAND_SESSION_STORAGE_KEY = "land.canvas.session";
8
9
  export declare const LAND_DOCUMENT_INDEXEDDB_VERSION = 2;
9
- export interface PersistedEditorSnapshots {
10
- documentSnapshot: unknown | null;
11
- sessionSnapshot: unknown | null;
12
- }
13
10
  export interface LocalSnapshotPersistenceOptions {
14
11
  storageNamespace?: string;
15
- shouldIgnoreDocumentSnapshot?: (snapshot: unknown) => boolean;
16
12
  }
17
13
  export declare function createLocalSnapshotPersistence(options?: LocalSnapshotPersistenceOptions): ProductPersistenceAdapter;
18
14
  export declare class PersistenceManager {
19
15
  private readonly editor;
20
- private readonly options;
21
16
  private static readonly SAVE_DELAY_MS;
17
+ private readonly getDocumentSnapshot;
18
+ private readonly options;
22
19
  private unsubscribe;
23
20
  private saveTimeoutId;
24
21
  private hasPendingSave;
25
22
  private isSaving;
26
23
  private saveAgainAfterCurrentSave;
27
- constructor(editor: Editor, options?: LocalSnapshotPersistenceOptions);
24
+ constructor(editor: Editor, { getDocumentSnapshot, options, }?: {
25
+ getDocumentSnapshot?: () => StoreSnapshot<{
26
+ id: string;
27
+ }>;
28
+ options?: LocalSnapshotPersistenceOptions;
29
+ });
28
30
  start(): void;
29
31
  stop(): void;
30
32
  flush(): void;
@@ -34,7 +36,11 @@ export declare class PersistenceManager {
34
36
  private readonly flushWhenHidden;
35
37
  private readonly flushWhenPageIsLeaving;
36
38
  }
37
- export declare function persistEditorSnapshot(editor: Editor, options?: LocalSnapshotPersistenceOptions): Promise<void>;
39
+ export declare function persistEditorSnapshot(editor: Editor, options?: LocalSnapshotPersistenceOptions, { documentSnapshot, }?: {
40
+ documentSnapshot?: StoreSnapshot<{
41
+ id: string;
42
+ }>;
43
+ }): Promise<void>;
38
44
  export declare function readPersistedEditorSnapshots(options?: LocalSnapshotPersistenceOptions): Promise<PersistedEditorSnapshots>;
39
45
  export declare function readPersistedDocumentSnapshot(): Promise<unknown | null>;
40
46
  export declare function readPersistedSessionSnapshot(): Promise<unknown | null>;
@@ -0,0 +1,16 @@
1
+ import type { ShapeId } from "../../_vendor/canvas-core/index";
2
+ import type { CanvasProductController, CanvasProductControllerSnapshot, CanvasProductControllerOptions, CanvasProductSessionSnapshot } from "../../core/controller";
3
+ import { type BuiltInCanvasShapeCreationControllers } from "./shapeCreationController";
4
+ import { type BuiltInCanvasLayerNode } from "./layerController";
5
+ export interface BuiltInCanvasControllerSnapshot<TToolId extends string = string> extends CanvasProductControllerSnapshot<TToolId> {
6
+ productId: string;
7
+ session: CanvasProductSessionSnapshot<TToolId>;
8
+ }
9
+ export interface BuiltInCanvasController<TToolId extends string = string> extends CanvasProductController<TToolId>, BuiltInCanvasShapeCreationControllers {
10
+ snapshot(): BuiltInCanvasControllerSnapshot<TToolId>;
11
+ getLayerTree(pageId?: string): BuiltInCanvasLayerNode[];
12
+ getLayerNode(id: ShapeId): BuiltInCanvasLayerNode | null;
13
+ }
14
+ export declare function createBuiltInCanvasController<TToolId extends string = string>(options: CanvasProductControllerOptions<TToolId>): BuiltInCanvasController<TToolId>;
15
+ export declare function useBuiltInCanvasController<TToolId extends string = string>(options: CanvasProductControllerOptions<TToolId>): BuiltInCanvasController<TToolId>;
16
+ export type { BuiltInCanvasLayerNode } from "./layerController";
@@ -0,0 +1,9 @@
1
+ import type { AssetId, Editor } from "../../_vendor/canvas-core/index";
2
+ import type { GeoShapeKind } from "../../_vendor/plugin-geo/index";
3
+ import type { CanvasProductLayerNode } from "../../core/controller";
4
+ export interface BuiltInCanvasLayerNode extends CanvasProductLayerNode {
5
+ geoKind?: GeoShapeKind;
6
+ imageAssetId?: AssetId | null;
7
+ imageThumbnailSrc?: string | null;
8
+ }
9
+ export declare function withBuiltInLayerNames(editor: Editor, node: CanvasProductLayerNode): BuiltInCanvasLayerNode;
@@ -0,0 +1,74 @@
1
+ import type { Editor, ShapeColor, ShapeId } from "../../_vendor/canvas-core/index";
2
+ import { type ArrowShapeProps } from "../../_vendor/plugin-arrow/index";
3
+ import { type TextShapeProps } from "../../_vendor/plugin-text/index";
4
+ import type { CanvasProductShapeRef } from "../../core/controller";
5
+ export interface BuiltInCanvasShapeInput {
6
+ x: number;
7
+ y: number;
8
+ w?: number;
9
+ h?: number;
10
+ fill?: ShapeColor;
11
+ stroke?: ShapeColor;
12
+ strokeWidth?: number;
13
+ }
14
+ export interface BuiltInCanvasTextInput {
15
+ x: number;
16
+ y: number;
17
+ text: string;
18
+ w?: number;
19
+ h?: number;
20
+ color?: ShapeColor;
21
+ size?: TextShapeProps["size"];
22
+ }
23
+ export interface BuiltInCanvasFrameInput extends BuiltInCanvasShapeInput {
24
+ name?: string;
25
+ }
26
+ export interface BuiltInCanvasArrowBindingInput {
27
+ targetShapeId: ShapeId;
28
+ normalizedAnchor: {
29
+ x: number;
30
+ y: number;
31
+ };
32
+ }
33
+ export interface BuiltInCanvasArrowInput {
34
+ start: {
35
+ x: number;
36
+ y: number;
37
+ };
38
+ end: {
39
+ x: number;
40
+ y: number;
41
+ };
42
+ bend?: number;
43
+ stroke?: ShapeColor;
44
+ strokeWidth?: number;
45
+ headStart?: ArrowShapeProps["headStart"];
46
+ headEnd?: ArrowShapeProps["headEnd"];
47
+ startBinding?: BuiltInCanvasArrowBindingInput | null;
48
+ endBinding?: BuiltInCanvasArrowBindingInput | null;
49
+ }
50
+ export interface BuiltInGeoController {
51
+ createRectangle(input: BuiltInCanvasShapeInput): CanvasProductShapeRef | null;
52
+ createEllipse(input: BuiltInCanvasShapeInput): CanvasProductShapeRef | null;
53
+ createDiamond(input: BuiltInCanvasShapeInput): CanvasProductShapeRef | null;
54
+ createTriangle(input: BuiltInCanvasShapeInput): CanvasProductShapeRef | null;
55
+ createHexagon(input: BuiltInCanvasShapeInput): CanvasProductShapeRef | null;
56
+ createStar(input: BuiltInCanvasShapeInput): CanvasProductShapeRef | null;
57
+ }
58
+ export interface BuiltInTextController {
59
+ create(input: BuiltInCanvasTextInput): CanvasProductShapeRef | null;
60
+ }
61
+ export interface BuiltInFrameController {
62
+ create(input: BuiltInCanvasFrameInput): CanvasProductShapeRef | null;
63
+ moveShapesToFrame(ids: ShapeId[], frameId: ShapeId): ShapeId[];
64
+ }
65
+ export interface BuiltInArrowController {
66
+ create(input: BuiltInCanvasArrowInput): CanvasProductShapeRef | null;
67
+ }
68
+ export interface BuiltInCanvasShapeCreationControllers {
69
+ arrow: BuiltInArrowController;
70
+ geo: BuiltInGeoController;
71
+ text: BuiltInTextController;
72
+ frame: BuiltInFrameController;
73
+ }
74
+ export declare function createBuiltInShapeCreationControllers(editor: Editor): BuiltInCanvasShapeCreationControllers;
@@ -0,0 +1,15 @@
1
+ export interface BuiltInCanvasExtensionOptions {
2
+ arrow?: boolean;
3
+ draw?: boolean;
4
+ eraser?: boolean;
5
+ frame?: boolean;
6
+ geo?: boolean;
7
+ group?: boolean;
8
+ image?: boolean;
9
+ laser?: boolean;
10
+ text?: boolean;
11
+ }
12
+ export declare const builtInCanvasExtensions: readonly [import("../_vendor/canvas-react/host/index").ConfigurableLandExtension<Record<string, never>>, import("../_vendor/canvas-react/host/index").ConfigurableLandExtension<Record<string, never>>, import("../_vendor/canvas-react/host/index").ConfigurableLandExtension<Record<string, never>>, import("../_vendor/canvas-react/host/index").ConfigurableLandExtension<Record<string, never>>, import("../_vendor/canvas-react/host/index").ConfigurableLandExtension<Record<string, never>>, import("../_vendor/canvas-react/host/index").ConfigurableLandExtension<Record<string, never>>, import("../_vendor/canvas-react/host/index").ConfigurableLandExtension<Record<string, never>>, import("../_vendor/canvas-react/host/index").ConfigurableLandExtension<Record<string, never>>, import("../_vendor/canvas-react/host/index").ConfigurableLandExtension<Record<string, never>>];
13
+ export type BuiltInCanvasExtension = (typeof builtInCanvasExtensions)[number];
14
+ export declare function createBuiltInCanvasExtensions(options?: BuiltInCanvasExtensionOptions): readonly BuiltInCanvasExtension[];
15
+ export declare function hasBuiltInCanvasExtension(extensions: readonly BuiltInCanvasExtension[], name: keyof BuiltInCanvasExtensionOptions): boolean;
@@ -0,0 +1,5 @@
1
+ export { builtInCanvasExtensions, createBuiltInCanvasExtensions, hasBuiltInCanvasExtension, } from "./extensions";
2
+ export type { BuiltInCanvasExtension, BuiltInCanvasExtensionOptions, } from "./extensions";
3
+ export { createBuiltInCanvasController, useBuiltInCanvasController, } from "./controller/createBuiltInCanvasController";
4
+ export type { BuiltInCanvasController, BuiltInCanvasControllerSnapshot, BuiltInCanvasLayerNode, } from "./controller/createBuiltInCanvasController";
5
+ export type { BuiltInArrowController, BuiltInCanvasArrowBindingInput, BuiltInCanvasArrowInput, BuiltInCanvasFrameInput, BuiltInCanvasShapeCreationControllers, BuiltInCanvasShapeInput, BuiltInCanvasTextInput, BuiltInFrameController, BuiltInGeoController, BuiltInTextController, } from "./controller/shapeCreationController";
@@ -0,0 +1,6 @@
1
+ import type { ReactNode } from "react";
2
+ export declare function CanvasKitFloatingToolbarLayer({ children, className, dataUi, }: {
3
+ children: ReactNode;
4
+ className?: string;
5
+ dataUi?: string;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { type ReactNode } from "react";
2
+ import type { ToolbarSurfaces } from "./bindings/useToolbarSurfaces";
3
+ export declare function FloatingSelectionToolbarPageSpace({ children, className, dataUi, offset, surfaces, }: {
4
+ children: ReactNode;
5
+ className?: string;
6
+ dataUi?: string;
7
+ offset?: number;
8
+ surfaces: ToolbarSurfaces;
9
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,27 @@
1
+ import type { Editor, PageId, PageRecord } from "../../_vendor/canvas-core/index";
2
+ export interface HistoryControls {
3
+ canUndo: boolean;
4
+ canRedo: boolean;
5
+ undo(): void;
6
+ redo(): void;
7
+ }
8
+ export interface PageControls {
9
+ pages: readonly PageRecord[];
10
+ currentPage: PageRecord | null;
11
+ currentPageId: PageId;
12
+ canDeleteCurrentPage: boolean;
13
+ createPage(): void;
14
+ deleteCurrentPage(): void;
15
+ renameCurrentPage(nextName: string): void;
16
+ selectPage(pageId: PageId): void;
17
+ }
18
+ export interface ZoomControlsState {
19
+ zoom: number;
20
+ label: string;
21
+ zoomIn(): void;
22
+ zoomOut(): void;
23
+ resetZoom(): void;
24
+ }
25
+ export declare function useHistoryControls(editor: Editor): HistoryControls;
26
+ export declare function usePageControls(editor: Editor): PageControls;
27
+ export declare function useZoomControls(editor: Editor): ZoomControlsState;
@@ -0,0 +1,12 @@
1
+ import type { ContextMenuContext, ActiveContextMenu, ContextMenuSection, Editor } from "../../_vendor/canvas-core/index";
2
+ import type { CanvasPluginHostRuntime } from "../../_vendor/canvas-react/host/index";
3
+ export interface ContextMenuSurface {
4
+ context: ContextMenuContext | null;
5
+ activeContextMenu: ActiveContextMenu | null;
6
+ sections: readonly ContextMenuSection[];
7
+ }
8
+ export declare function useContextMenuSurface({ editor, activeContextMenu, pluginHostRuntime, }: {
9
+ editor: Editor;
10
+ activeContextMenu: ActiveContextMenu | null;
11
+ pluginHostRuntime: CanvasPluginHostRuntime;
12
+ }): ContextMenuSurface;
@@ -0,0 +1,15 @@
1
+ import { type RefObject } from "react";
2
+ import type { Editor, ShapeId } from "../../_vendor/canvas-core/index";
3
+ import { type ExportStatus as ProductExportStatus, type SvgAssetInliner as ProductSvgAssetInliner, type SvgExportResult as ProductSvgExportResult } from "../../core";
4
+ export type ExportStatus = ProductExportStatus;
5
+ export type SvgAssetInliner = ProductSvgAssetInliner;
6
+ export type SvgExportResult = ProductSvgExportResult;
7
+ export interface SvgExportControls {
8
+ status: ExportStatus | null;
9
+ exportSvg(shapeIds: readonly ShapeId[]): Promise<SvgExportResult>;
10
+ }
11
+ export declare function useSvgExport({ assetInliners, editor, themeRootRef, }: {
12
+ assetInliners?: readonly SvgAssetInliner[];
13
+ editor: Editor;
14
+ themeRootRef?: RefObject<HTMLElement | null>;
15
+ }): SvgExportControls;
@@ -0,0 +1,26 @@
1
+ import type { Editor, CanvasActionContext, ToolbarGroup } from "../../_vendor/canvas-core/index";
2
+ import type { CanvasPluginHostRuntime } from "../../_vendor/canvas-react/host/index";
3
+ export interface FloatingSelectionToolbarPageAnchor {
4
+ x: number;
5
+ y: number;
6
+ }
7
+ export interface ToolbarSurfaces {
8
+ context: CanvasActionContext;
9
+ activeToolId: string;
10
+ activeToolLabel: string;
11
+ isToolLocked: boolean;
12
+ selectionCount: number;
13
+ hasMixedSelectionRotation: boolean;
14
+ toolChromeToolbarGroups: readonly ToolbarGroup[];
15
+ contextToolbarGroups: readonly ToolbarGroup[];
16
+ floatingSelectionToolbarGroups: readonly ToolbarGroup[];
17
+ floatingSelectionToolbarPageAnchor: FloatingSelectionToolbarPageAnchor | null;
18
+ contextToolbarTitle: string;
19
+ showContextToolbar: boolean;
20
+ showFloatingSelectionToolbar: boolean;
21
+ }
22
+ export declare function useToolbarSurfaces({ canShowContextToolbarDuringEditing, editor, pluginHostRuntime, }: {
23
+ canShowContextToolbarDuringEditing?: (context: CanvasActionContext) => boolean;
24
+ editor: Editor;
25
+ pluginHostRuntime: CanvasPluginHostRuntime;
26
+ }): ToolbarSurfaces;
@@ -0,0 +1,66 @@
1
+ import type { CanvasKitController, CanvasKitBaseController } from "../controller/canvasKitController";
2
+ import type { BuiltInCanvasLayerNode } from "../builtins";
3
+ import type { ActiveContextMenu, EditorSelectionState, ShapeId, CanvasActionValue, CanvasActionContext } from "../_vendor/canvas-core/index";
4
+ import type { HistoryControls, PageControls, ZoomControlsState } from "./bindings/useCanvasKitChromeControls";
5
+ import type { ContextMenuSurface } from "./bindings/useContextMenuSurface";
6
+ import type { SvgExportControls } from "./bindings/useSvgExport";
7
+ import type { ToolbarSurfaces } from "./bindings/useToolbarSurfaces";
8
+ import type { ProductPersistenceStatus } from "../core";
9
+ export type { ContextMenuCommandItem, ContextMenuItem, ContextMenuSection, EditorSelectionState, ShapeId, CanvasActionValue, CanvasActionContext, ToolbarGroup, ToolbarItem, } from "../_vendor/canvas-core/index";
10
+ export type { HistoryControls, PageControls, ZoomControlsState, } from "./bindings/useCanvasKitChromeControls";
11
+ export type { ContextMenuSurface } from "./bindings/useContextMenuSurface";
12
+ export type { SvgExportControls, } from "./bindings/useSvgExport";
13
+ export type { ToolbarSurfaces, } from "./bindings/useToolbarSurfaces";
14
+ export type CanvasKitLayerNode = BuiltInCanvasLayerNode;
15
+ export interface CanvasKitToolbarActionState {
16
+ value: CanvasActionValue | undefined;
17
+ isEnabled: boolean;
18
+ isVisible: boolean;
19
+ }
20
+ export interface CanvasKitToolbarRuntime {
21
+ getActionState(input: {
22
+ actionId: string;
23
+ context: CanvasActionContext;
24
+ }): CanvasKitToolbarActionState | null;
25
+ runAction(input: {
26
+ actionId: string;
27
+ context: CanvasActionContext;
28
+ value?: CanvasActionValue;
29
+ }): void;
30
+ }
31
+ export interface CanvasKitGridControls {
32
+ isVisible: boolean;
33
+ setIsVisible(isVisible: boolean): void;
34
+ }
35
+ export interface CanvasKitPersistenceControls {
36
+ discardUnsupportedRecords: (() => Promise<void>) | null;
37
+ isDiscardingUnsupportedRecords: boolean;
38
+ status: ProductPersistenceStatus | null;
39
+ }
40
+ export interface CanvasKitChromeContext<TController extends CanvasKitBaseController = CanvasKitController> {
41
+ controller: TController;
42
+ contextMenu: CanvasKitContextMenuState;
43
+ currentPageId: string;
44
+ currentPageShapeIds: readonly ShapeId[];
45
+ history: HistoryControls;
46
+ layers: readonly BuiltInCanvasLayerNode[];
47
+ pages: PageControls;
48
+ selection: EditorSelectionState;
49
+ selectedShapeIds: readonly ShapeId[];
50
+ persistence: CanvasKitPersistenceControls;
51
+ svgExport: SvgExportControls;
52
+ toolbarRuntime: CanvasKitToolbarRuntime;
53
+ toolbarSurfaces: ToolbarSurfaces;
54
+ grid: CanvasKitGridControls;
55
+ zoom: ZoomControlsState;
56
+ }
57
+ export interface CanvasKitContextMenuState {
58
+ activeContextMenu: ActiveContextMenu | null;
59
+ onActiveContextMenuChange: (activeContextMenu: ActiveContextMenu | null) => void;
60
+ runAction(input: {
61
+ actionId: string;
62
+ context: NonNullable<ContextMenuSurface["context"]>;
63
+ value?: CanvasActionValue;
64
+ }): void;
65
+ surface: ContextMenuSurface;
66
+ }