@yuzhouu/canvas-kit 0.1.9 → 0.1.11

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 (375) hide show
  1. package/README.md +204 -101
  2. package/_vendor/canvas-core/bindings/bindingUtil.d.ts +23 -0
  3. package/_vendor/canvas-core/bindings/terminalPorts.d.ts +67 -0
  4. package/_vendor/canvas-core/editor/bindingReactionScope.d.ts +7 -0
  5. package/_vendor/canvas-core/editor/cameraPanSession.d.ts +9 -0
  6. package/_vendor/canvas-core/editor/canvasPanInteraction.d.ts +2 -0
  7. package/_vendor/canvas-core/editor/commands.d.ts +16 -4
  8. package/_vendor/canvas-core/editor/createEditorWithPlugins.d.ts +6 -0
  9. package/_vendor/canvas-core/editor/editor.d.ts +44 -31
  10. package/_vendor/canvas-core/editor/editorComputedHelpers.d.ts +5 -2
  11. package/_vendor/canvas-core/editor/historyManager.d.ts +24 -6
  12. package/_vendor/canvas-core/editor/index.d.ts +2 -2
  13. package/_vendor/canvas-core/editor/interactions.d.ts +41 -8
  14. package/_vendor/canvas-core/editor/managers/bindingManager.d.ts +2 -6
  15. package/_vendor/canvas-core/editor/managers/inputsManager.d.ts +3 -0
  16. package/_vendor/canvas-core/editor/managers/interactionTransientManager.d.ts +0 -26
  17. package/_vendor/canvas-core/editor/managers/queryManager.d.ts +26 -1
  18. package/_vendor/canvas-core/editor/managers/selectionLayoutManager.d.ts +5 -0
  19. package/_vendor/canvas-core/editor/managers/selectionOverlayManager.d.ts +1 -0
  20. package/_vendor/canvas-core/editor/managers/shapeEditingManager.d.ts +4 -0
  21. package/_vendor/canvas-core/editor/managers/shapeGeometryManager.d.ts +3 -2
  22. package/_vendor/canvas-core/editor/managers/shapeHierarchyManager.d.ts +7 -2
  23. package/_vendor/canvas-core/editor/managers/shapeReparenting.d.ts +3 -2
  24. package/_vendor/canvas-core/editor/managers/snapCalculations.d.ts +4 -1
  25. package/_vendor/canvas-core/editor/managers/snapGeometry.d.ts +2 -1
  26. package/_vendor/canvas-core/editor/managers/snapTypes.d.ts +1 -0
  27. package/_vendor/canvas-core/editor/managers/spatialIndexManager.d.ts +1 -0
  28. package/_vendor/canvas-core/editor/operationManager.d.ts +74 -0
  29. package/_vendor/canvas-core/editor/queries/shapeTransforms.d.ts +32 -12
  30. package/_vendor/canvas-core/editor/selection.d.ts +19 -5
  31. package/_vendor/canvas-core/editor/selectionOverlay.d.ts +7 -4
  32. package/_vendor/canvas-core/editor/selectionResizeCapabilities.d.ts +9 -0
  33. package/_vendor/canvas-core/editor/shapeTransformSpace.d.ts +6 -0
  34. package/_vendor/canvas-core/exports/svg.d.ts +3 -3
  35. package/_vendor/canvas-core/geometry/contentCutout.d.ts +8 -0
  36. package/_vendor/canvas-core/geometry/index.d.ts +1 -0
  37. package/_vendor/canvas-core/geometry/mat.d.ts +6 -2
  38. package/_vendor/canvas-core/geometry/polygon.d.ts +7 -0
  39. package/_vendor/canvas-core/geometry/vec.d.ts +0 -2
  40. package/_vendor/canvas-core/index.d.ts +21 -23
  41. package/_vendor/canvas-core/plugins/editorRuntimePlugin.d.ts +4 -10
  42. package/_vendor/canvas-core/plugins/editorRuntimeRegistry.d.ts +19 -0
  43. package/_vendor/canvas-core/plugins/index.d.ts +2 -1
  44. package/_vendor/canvas-core/schema/records.d.ts +2 -7
  45. package/_vendor/canvas-core/schema/snapshots.d.ts +10 -19
  46. package/_vendor/canvas-core/shapes/colors.d.ts +3 -3
  47. package/_vendor/canvas-core/shapes/shapeUtil.d.ts +97 -13
  48. package/_vendor/canvas-core/tools/select/selectToolHelpers.d.ts +18 -8
  49. package/_vendor/canvas-core/tools/select/states/draggingPluginInteractionState.d.ts +16 -0
  50. package/_vendor/canvas-core/tools/select/states/index.d.ts +1 -1
  51. package/_vendor/canvas-core/tools/select/states/pointingSelectionHandleInteractionState.d.ts +3 -2
  52. package/_vendor/canvas-core/tools/select/states/pointingShapeState.d.ts +1 -1
  53. package/_vendor/canvas-core/tools/select/states/resizingState.d.ts +1 -1
  54. package/_vendor/canvas-core/tools/select/states/rotatingState.d.ts +1 -1
  55. package/_vendor/canvas-core/tools/select/states/selectStateNode.d.ts +6 -2
  56. package/_vendor/canvas-core/tools/select/states/translatingState.d.ts +1 -1
  57. package/_vendor/canvas-plugin-sdk/actionRegistry.d.ts +7 -0
  58. package/_vendor/{canvas-core/surfaces → canvas-plugin-sdk}/actions.d.ts +21 -6
  59. package/_vendor/canvas-plugin-sdk/capability.d.ts +16 -0
  60. package/_vendor/canvas-plugin-sdk/chrome.d.ts +52 -0
  61. package/_vendor/canvas-plugin-sdk/chromeRegistry.d.ts +15 -0
  62. package/_vendor/{canvas-core/surfaces → canvas-plugin-sdk}/contextMenu.d.ts +25 -30
  63. package/_vendor/canvas-plugin-sdk/contextMenuRegistry.d.ts +11 -0
  64. package/_vendor/canvas-plugin-sdk/exportRegistry.d.ts +9 -0
  65. package/_vendor/canvas-plugin-sdk/exports.d.ts +26 -0
  66. package/_vendor/canvas-plugin-sdk/importRegistry.d.ts +10 -0
  67. package/_vendor/canvas-plugin-sdk/imports.d.ts +38 -0
  68. package/_vendor/canvas-plugin-sdk/index.d.ts +18 -0
  69. package/_vendor/canvas-plugin-sdk/lifecycle.d.ts +31 -0
  70. package/_vendor/canvas-plugin-sdk/plugin.d.ts +76 -0
  71. package/_vendor/canvas-plugin-sdk/pluginUi.d.ts +37 -0
  72. package/_vendor/canvas-plugin-sdk/productApi.d.ts +28 -0
  73. package/_vendor/canvas-plugin-sdk/services.d.ts +20 -0
  74. package/_vendor/{canvas-core/surfaces → canvas-plugin-sdk}/toolbar.d.ts +48 -5
  75. package/_vendor/canvas-plugin-sdk/toolbarRegistry.d.ts +18 -0
  76. package/_vendor/canvas-react/components/CanvasView.d.ts +2 -2
  77. package/_vendor/canvas-react/components/canvasKeyboardEvents.d.ts +13 -0
  78. package/_vendor/canvas-react/components/useCanvasDomEvents.d.ts +4 -3
  79. package/_vendor/canvas-react/contextMenuRequest.d.ts +19 -0
  80. package/_vendor/canvas-react/host/canvasRenderPlugin.d.ts +22 -5
  81. package/_vendor/canvas-react/host/canvasRenderRuntime.d.ts +13 -0
  82. package/_vendor/canvas-react/host/domEventGuards.d.ts +3 -3
  83. package/_vendor/canvas-react/host/index.d.ts +3 -9
  84. package/_vendor/canvas-react/host/overlayRegistry.d.ts +3 -3
  85. package/_vendor/canvas-react/host/rendererRegistry.d.ts +7 -4
  86. package/_vendor/canvas-react/index.d.ts +1 -0
  87. package/_vendor/plugin-arrow/api.d.ts +33 -0
  88. package/_vendor/plugin-arrow/arrowGeometry.d.ts +7 -4
  89. package/_vendor/plugin-arrow/arrowHeadGeometry.d.ts +8 -0
  90. package/_vendor/plugin-arrow/arrowShapeUtil.d.ts +7 -4
  91. package/_vendor/plugin-arrow/arrowTerminalCommands.d.ts +2 -2
  92. package/_vendor/plugin-arrow/canvasRender.d.ts +2 -2
  93. package/_vendor/plugin-arrow/editorRuntime.d.ts +2 -2
  94. package/_vendor/plugin-arrow/feature.d.ts +2 -3
  95. package/_vendor/plugin-arrow/index.d.ts +5 -2
  96. package/_vendor/plugin-arrow/productRuntime.d.ts +2 -0
  97. package/_vendor/plugin-builtin-clipboard/clipboardChromeContributions.d.ts +2 -0
  98. package/{features/clipboard → _vendor/plugin-builtin-clipboard}/clipboardContextMenuContributions.d.ts +1 -1
  99. package/{features/clipboard → _vendor/plugin-builtin-clipboard}/clipboardContribution.d.ts +2 -2
  100. package/{features/clipboard → _vendor/plugin-builtin-clipboard}/clipboardService.d.ts +3 -3
  101. package/_vendor/plugin-builtin-clipboard/index.d.ts +3 -0
  102. package/_vendor/plugin-builtin-clipboard/plugin.d.ts +1 -0
  103. package/_vendor/plugin-builtin-export/blobDataUrl.d.ts +1 -0
  104. package/_vendor/plugin-builtin-export/canvasExportApi.d.ts +43 -0
  105. package/_vendor/plugin-builtin-export/index.d.ts +8 -0
  106. package/_vendor/plugin-builtin-export/plugin.d.ts +5 -0
  107. package/_vendor/plugin-builtin-export/pngExport.d.ts +15 -0
  108. package/{features/export → _vendor/plugin-builtin-export}/svgExport.d.ts +9 -2
  109. package/_vendor/plugin-builtin-import-host/CanvasImportHost.d.ts +3 -0
  110. package/_vendor/plugin-builtin-import-host/capability.d.ts +1 -0
  111. package/_vendor/plugin-builtin-import-host/index.d.ts +2 -0
  112. package/_vendor/plugin-builtin-import-host/plugin.d.ts +1 -0
  113. package/_vendor/plugin-builtin-tool-actions/capability.d.ts +1 -0
  114. package/_vendor/plugin-builtin-tool-actions/index.d.ts +2 -0
  115. package/_vendor/plugin-builtin-tool-actions/plugin.d.ts +1 -0
  116. package/_vendor/plugin-builtin-tool-actions/toolActions.d.ts +2 -0
  117. package/_vendor/plugin-connector/canvasRender.d.ts +2 -0
  118. package/_vendor/plugin-connector/connectorBindingUtil.d.ts +28 -0
  119. package/_vendor/plugin-connector/connectorBindings.d.ts +8 -0
  120. package/_vendor/plugin-connector/connectorGeometry.d.ts +70 -0
  121. package/_vendor/plugin-connector/connectorHandles.d.ts +12 -0
  122. package/_vendor/plugin-connector/connectorInteractions.d.ts +3 -0
  123. package/_vendor/plugin-connector/connectorMarker.d.ts +7 -0
  124. package/_vendor/plugin-connector/connectorModel.d.ts +43 -0
  125. package/_vendor/plugin-connector/connectorPortInteraction.d.ts +13 -0
  126. package/_vendor/plugin-connector/connectorPorts.d.ts +23 -0
  127. package/_vendor/plugin-connector/connectorRuntime.d.ts +62 -0
  128. package/_vendor/plugin-connector/connectorShapeUtil.d.ts +29 -0
  129. package/_vendor/plugin-connector/connectorTool.d.ts +4 -0
  130. package/_vendor/plugin-connector/constants.d.ts +17 -0
  131. package/_vendor/plugin-connector/editorRuntime.d.ts +7 -0
  132. package/_vendor/plugin-connector/feature.d.ts +4 -0
  133. package/_vendor/plugin-connector/index.d.ts +18 -0
  134. package/_vendor/plugin-connector/orthogonalRoute.d.ts +9 -0
  135. package/_vendor/plugin-connector/productRuntime.d.ts +2 -0
  136. package/_vendor/plugin-connector/quickConnect.d.ts +28 -0
  137. package/_vendor/plugin-connector/types.d.ts +51 -0
  138. package/_vendor/plugin-draw/DrawShapeRenderer.d.ts +5 -2
  139. package/_vendor/plugin-draw/canvasRender.d.ts +2 -2
  140. package/_vendor/plugin-draw/drawGeometry.d.ts +4 -7
  141. package/_vendor/plugin-draw/drawPath.d.ts +7 -1
  142. package/_vendor/plugin-draw/drawShapeUtil.d.ts +2 -2
  143. package/_vendor/plugin-draw/editorRuntime.d.ts +3 -3
  144. package/_vendor/plugin-draw/feature.d.ts +2 -3
  145. package/_vendor/plugin-draw/index.d.ts +4 -3
  146. package/_vendor/plugin-draw/productRuntime.d.ts +2 -0
  147. package/_vendor/plugin-eraser/canvasRender.d.ts +2 -2
  148. package/_vendor/plugin-eraser/editorRuntime.d.ts +2 -2
  149. package/_vendor/plugin-eraser/eraserRuntime.d.ts +12 -0
  150. package/_vendor/plugin-eraser/feature.d.ts +2 -3
  151. package/_vendor/plugin-eraser/index.d.ts +4 -2
  152. package/_vendor/plugin-eraser/productRuntime.d.ts +2 -0
  153. package/_vendor/plugin-frame/api.d.ts +19 -0
  154. package/_vendor/plugin-frame/canvasRender.d.ts +5 -5
  155. package/_vendor/plugin-frame/editorRuntime.d.ts +2 -2
  156. package/_vendor/plugin-frame/feature.d.ts +2 -3
  157. package/_vendor/plugin-frame/frameShapeUtil.d.ts +12 -2
  158. package/_vendor/plugin-frame/index.d.ts +5 -2
  159. package/_vendor/plugin-frame/productRuntime.d.ts +2 -0
  160. package/_vendor/plugin-geo/api.d.ts +27 -0
  161. package/_vendor/plugin-geo/canvasRender.d.ts +5 -5
  162. package/_vendor/plugin-geo/editorRuntime.d.ts +3 -3
  163. package/_vendor/plugin-geo/feature.d.ts +2 -3
  164. package/_vendor/plugin-geo/geoShapeUtil.d.ts +1 -1
  165. package/_vendor/plugin-geo/geoStrokeStyle.d.ts +2 -0
  166. package/_vendor/plugin-geo/geoTools.d.ts +1 -1
  167. package/_vendor/plugin-geo/index.d.ts +8 -5
  168. package/_vendor/plugin-geo/productRuntime.d.ts +2 -0
  169. package/_vendor/plugin-geo/types.d.ts +5 -1
  170. package/_vendor/plugin-group/canvasRender.d.ts +3 -4
  171. package/_vendor/plugin-group/editorRuntime.d.ts +2 -2
  172. package/_vendor/plugin-group/feature.d.ts +2 -3
  173. package/_vendor/plugin-group/groupContributions.d.ts +7 -0
  174. package/_vendor/plugin-group/groupShapeUtil.d.ts +24 -5
  175. package/_vendor/plugin-group/index.d.ts +4 -2
  176. package/_vendor/plugin-group/productRuntime.d.ts +2 -0
  177. package/_vendor/plugin-image/canvasRender.d.ts +2 -2
  178. package/_vendor/plugin-image/cropRuntime.d.ts +1 -1
  179. package/_vendor/plugin-image/cropSession.d.ts +5 -3
  180. package/_vendor/plugin-image/editorRuntime.d.ts +2 -4
  181. package/_vendor/plugin-image/feature.d.ts +2 -3
  182. package/_vendor/plugin-image/imageHostActionContract.d.ts +1 -1
  183. package/_vendor/plugin-image/imageShapeUtil.d.ts +3 -3
  184. package/_vendor/plugin-image/index.d.ts +5 -4
  185. package/_vendor/plugin-image/productRuntime.d.ts +4 -0
  186. package/_vendor/plugin-image/runtimeShared.d.ts +1 -1
  187. package/_vendor/plugin-image/smudge.d.ts +6 -2
  188. package/_vendor/plugin-image/smudgeRuntime.d.ts +1 -1
  189. package/_vendor/plugin-image/styleRuntime.d.ts +6 -1
  190. package/_vendor/plugin-image/toolbarRuntime.d.ts +1 -1
  191. package/_vendor/plugin-laser/canvasRender.d.ts +2 -2
  192. package/_vendor/plugin-laser/editorRuntime.d.ts +2 -2
  193. package/_vendor/plugin-laser/feature.d.ts +2 -3
  194. package/_vendor/plugin-laser/index.d.ts +4 -2
  195. package/_vendor/plugin-laser/laserRuntime.d.ts +18 -0
  196. package/_vendor/plugin-laser/productRuntime.d.ts +2 -0
  197. package/_vendor/plugin-packaging/api.d.ts +74 -0
  198. package/_vendor/plugin-packaging/canvasRender.d.ts +2 -0
  199. package/_vendor/plugin-packaging/editorRuntime.d.ts +2 -0
  200. package/_vendor/plugin-packaging/feature.d.ts +2 -0
  201. package/_vendor/plugin-packaging/index.d.ts +19 -0
  202. package/_vendor/plugin-packaging/packagingArtwork.d.ts +5 -0
  203. package/_vendor/plugin-packaging/packagingDxf.d.ts +9 -0
  204. package/_vendor/plugin-packaging/packagingGeometry.d.ts +74 -0
  205. package/_vendor/plugin-packaging/packagingInteractions.d.ts +2 -0
  206. package/_vendor/plugin-packaging/packagingPdfExporter.d.ts +25 -0
  207. package/_vendor/plugin-packaging/packagingRuntime.d.ts +11 -0
  208. package/_vendor/plugin-packaging/packagingShapeUtil.d.ts +34 -0
  209. package/_vendor/plugin-packaging/packagingStyle.d.ts +10 -0
  210. package/_vendor/plugin-packaging/packagingSvgExporter.d.ts +7 -0
  211. package/_vendor/plugin-packaging/productRuntime.d.ts +2 -0
  212. package/_vendor/plugin-packaging/types.d.ts +168 -0
  213. package/_vendor/plugin-packaging/validation.d.ts +3 -0
  214. package/_vendor/plugin-path/PathDraftOverlay.d.ts +1 -0
  215. package/_vendor/plugin-path/PathEditInsertPreviewOverlay.d.ts +1 -0
  216. package/_vendor/plugin-path/PathShapeRenderer.d.ts +15 -0
  217. package/_vendor/plugin-path/canvasRender.d.ts +2 -0
  218. package/_vendor/plugin-path/editorRuntime.d.ts +7 -0
  219. package/_vendor/plugin-path/feature.d.ts +2 -0
  220. package/_vendor/plugin-path/index.d.ts +8 -0
  221. package/_vendor/plugin-path/pathBoolean.d.ts +13 -0
  222. package/_vendor/plugin-path/pathDraft.d.ts +10 -0
  223. package/_vendor/plugin-path/pathEditPreview.d.ts +11 -0
  224. package/_vendor/plugin-path/pathEditSelection.d.ts +24 -0
  225. package/_vendor/plugin-path/pathEditSnap.d.ts +6 -0
  226. package/_vendor/plugin-path/pathGeometry.d.ts +74 -0
  227. package/_vendor/plugin-path/pathHandles.d.ts +18 -0
  228. package/_vendor/plugin-path/pathHistory.d.ts +13 -0
  229. package/_vendor/plugin-path/pathInteractions.d.ts +7 -0
  230. package/_vendor/plugin-path/pathShapeUtil.d.ts +30 -0
  231. package/_vendor/plugin-path/pathSvg.d.ts +3 -0
  232. package/_vendor/plugin-path/pathTool.d.ts +42 -0
  233. package/_vendor/plugin-path/productRuntime.d.ts +15 -0
  234. package/_vendor/plugin-path/types.d.ts +36 -0
  235. package/_vendor/plugin-text/api.d.ts +20 -0
  236. package/_vendor/plugin-text/canvasRender.d.ts +6 -3
  237. package/_vendor/plugin-text/capabilities.d.ts +2 -0
  238. package/_vendor/plugin-text/editorRuntime.d.ts +3 -3
  239. package/_vendor/plugin-text/feature.d.ts +4 -4
  240. package/_vendor/plugin-text/geoLabelBindingUtil.d.ts +6 -3
  241. package/_vendor/plugin-text/host/RichTextEditingBox.d.ts +4 -1
  242. package/_vendor/plugin-text/host/TiptapTextEditor.d.ts +6 -3
  243. package/_vendor/plugin-text/host/initialTextBackground.d.ts +2 -0
  244. package/_vendor/plugin-text/host/richTextRendering.d.ts +1 -2
  245. package/_vendor/plugin-text/host/textEditingBoxStyle.d.ts +1 -1
  246. package/_vendor/plugin-text/host/textEntryFocus.d.ts +2 -1
  247. package/_vendor/plugin-text/host/textFormattingApi.d.ts +16 -0
  248. package/_vendor/plugin-text/host/textMeasurement.d.ts +10 -2
  249. package/_vendor/plugin-text/host/textShapeRendererRuntime.d.ts +3 -1
  250. package/_vendor/plugin-text/host/tiptapTextEditorController.d.ts +4 -1
  251. package/_vendor/plugin-text/index.d.ts +11 -4
  252. package/_vendor/plugin-text/pathLabelBindingUtil.d.ts +55 -0
  253. package/_vendor/plugin-text/productRuntime.d.ts +6 -0
  254. package/_vendor/plugin-text/richTextUtils.d.ts +9 -2
  255. package/_vendor/plugin-text/shapeWideTextFormatting.d.ts +12 -0
  256. package/_vendor/plugin-text/textFonts.d.ts +6 -3
  257. package/_vendor/plugin-text/textFormatting.d.ts +47 -0
  258. package/_vendor/plugin-text/textFormattingSession.d.ts +6 -0
  259. package/_vendor/plugin-text/textLabelHelpers.d.ts +32 -6
  260. package/_vendor/plugin-text/textLinkPopoverPresentation.d.ts +18 -0
  261. package/_vendor/plugin-text/textShapeHelpers.d.ts +1 -0
  262. package/_vendor/plugin-text/textShapeUtil.d.ts +9 -5
  263. package/_vendor/plugin-text/textTypes.d.ts +1 -0
  264. package/_vendor/signals/core.d.ts +1 -0
  265. package/_vendor/signals/effect.d.ts +0 -4
  266. package/_vendor/signals/index.d.ts +2 -2
  267. package/_vendor/store/history.d.ts +1 -1
  268. package/_vendor/store/store.d.ts +6 -0
  269. package/browser/indexedDb.d.ts +10 -10
  270. package/browser/persistence.d.ts +6 -38
  271. package/chrome/floating/CanvasKitFloatingPortal.d.ts +6 -0
  272. package/chrome/floating/useCanvasKitFloatingPosition.d.ts +11 -0
  273. package/chrome/toolbar/CanvasKitFloatingToolbarLayer.d.ts +1 -1
  274. package/chrome/toolbar/FloatingSelectionToolbarPageSpace.d.ts +5 -3
  275. package/chrome/toolbar/toolbarLabels.d.ts +1 -1
  276. package/chrome/toolbar/useToolbarSurfaces.d.ts +11 -16
  277. package/chrome/types.d.ts +15 -17
  278. package/chrome/useCanvasKitChromeContext.d.ts +12 -15
  279. package/chrome/useChromeSurfaces.d.ts +12 -0
  280. package/chrome/useContextMenuSurface.d.ts +4 -4
  281. package/chrome/useHistoryControls.d.ts +3 -3
  282. package/chrome/usePageControls.d.ts +3 -3
  283. package/controller/canvasKitController.d.ts +5 -16
  284. package/core/index.d.ts +4 -6
  285. package/core/product-controller/canvasProductController.d.ts +42 -12
  286. package/core/product-controller/index.d.ts +1 -1
  287. package/core/runtime/productAssets.d.ts +4 -2
  288. package/core/runtime/productEditor.d.ts +1 -1
  289. package/core/runtime/productServices.d.ts +11 -21
  290. package/core/runtime/runtimeContracts.d.ts +17 -0
  291. package/es-DocrZgUh.mjs +2 -0
  292. package/features/context-menu/contextMenuRuntime.d.ts +4 -4
  293. package/features/image/asset/imageAssetService.d.ts +2 -3
  294. package/features/image/asset/imageBlobStore.d.ts +7 -2
  295. package/features/image/asset/imageFileHelpers.d.ts +0 -6
  296. package/features/image/asset/svgImageAssetInliner.d.ts +1 -1
  297. package/features/image/controller/imageProductController.d.ts +2 -2
  298. package/features/image/imageHostPlugin.d.ts +1 -0
  299. package/features/image/import/ImageImportController.d.ts +3 -1
  300. package/features/image/index.d.ts +1 -3
  301. package/features/image/smudge/imageSmudgeHostActions.d.ts +2 -2
  302. package/features/image/toolbar/imageHostActions.d.ts +17 -7
  303. package/features/image/toolbar/imageToolbarHostBridge.d.ts +1 -1
  304. package/features/text/link/TextLinkHoverPopover.d.ts +6 -0
  305. package/features/text/textHostPlugin.d.ts +5 -0
  306. package/features/text/textSvgAssetInliner.d.ts +3 -0
  307. package/features/text/textSvgAssetPlugin.d.ts +2 -0
  308. package/index.css +1 -1
  309. package/index.d.ts +36 -12
  310. package/index.mjs +111 -96
  311. package/package.json +12 -9
  312. package/plugins/standardCanvasKitPlugins.d.ts +16 -0
  313. package/react/CanvasKitRoot.d.ts +10 -5
  314. package/react/useCanvasKitControllerLifecycle.d.ts +8 -0
  315. package/react/useCanvasKitRuntime.d.ts +2 -4
  316. package/runtime/canvasKitCommandExecutor.d.ts +13 -0
  317. package/runtime/canvasKitPluginContracts.d.ts +34 -0
  318. package/runtime/canvasKitPluginSetup.d.ts +32 -0
  319. package/runtime/canvasKitResourceScope.d.ts +5 -0
  320. package/runtime/canvasKitRuntime.d.ts +48 -19
  321. package/runtime/canvasKitRuntimeContracts.d.ts +34 -0
  322. package/runtime/persistenceCoordinator.d.ts +33 -0
  323. package/_vendor/canvas-core/editor/createEditorWithRuntimePlugins.d.ts +0 -6
  324. package/_vendor/canvas-core/editor/middleMousePanInteraction.d.ts +0 -2
  325. package/_vendor/canvas-core/schema/snapshotSupport.d.ts +0 -43
  326. package/_vendor/canvas-core/tools/select/states/draggingSelectionHandleInteractionState.d.ts +0 -15
  327. package/_vendor/canvas-react/host/actionRegistry.d.ts +0 -15
  328. package/_vendor/canvas-react/host/canvasRenderPluginHost.d.ts +0 -2
  329. package/_vendor/canvas-react/host/canvasRenderPluginHostManifest.d.ts +0 -2
  330. package/_vendor/canvas-react/host/canvasRenderPluginHostRuntime.d.ts +0 -3
  331. package/_vendor/canvas-react/host/canvasRenderPluginHostTypes.d.ts +0 -104
  332. package/_vendor/canvas-react/host/canvasRenderPluginHostValidation.d.ts +0 -11
  333. package/_vendor/canvas-react/host/contextMenuRegistry.d.ts +0 -17
  334. package/_vendor/canvas-react/host/extension.d.ts +0 -37
  335. package/_vendor/canvas-react/host/toolbarRegistry.d.ts +0 -20
  336. package/_vendor/plugin-text/arrowLabelBindingUtil.d.ts +0 -42
  337. package/_vendor/plugin-text/host/RichTextLinkPopover.d.ts +0 -14
  338. package/_vendor/plugin-text/host/RichTextToolbar.d.ts +0 -8
  339. package/_vendor/plugin-text/host/richTextBubbleMenuPositionSync.d.ts +0 -7
  340. package/browser/localSnapshotRestore.d.ts +0 -13
  341. package/builtins/controller/createBuiltInCanvasController.d.ts +0 -16
  342. package/builtins/controller/layerController.d.ts +0 -9
  343. package/builtins/controller/shapeCreationController.d.ts +0 -83
  344. package/builtins/extensions.d.ts +0 -18
  345. package/builtins/index.d.ts +0 -5
  346. package/chrome/useSvgExport.d.ts +0 -15
  347. package/core/api/apiRegistry.d.ts +0 -12
  348. package/core/runtime/productDefinition.d.ts +0 -33
  349. package/core/runtime/productHost.d.ts +0 -20
  350. package/features/actions/actionRuntime.d.ts +0 -21
  351. package/features/clipboard/clipboardHostExtension.d.ts +0 -2
  352. package/features/image/imageHostExtension.d.ts +0 -10
  353. package/features/image/import/useImageImport.d.ts +0 -16
  354. package/features/keyboard/keyboardShortcutHostExtension.d.ts +0 -2
  355. package/features/keyboard/useCanvasKitKeyboardShortcuts.d.ts +0 -6
  356. package/features/persistence/CanvasKitPersistenceNotice.d.ts +0 -4
  357. package/features/persistence/persistenceHostExtension.d.ts +0 -2
  358. package/features/selection/selectionActions.d.ts +0 -20
  359. package/features/selection/selectionContextMenuContributions.d.ts +0 -2
  360. package/features/selection/selectionHostExtension.d.ts +0 -2
  361. package/features/selection/selectionToolbarContributions.d.ts +0 -2
  362. package/features/tool/toolActions.d.ts +0 -2
  363. package/features/tool/toolContextMenuContributions.d.ts +0 -2
  364. package/features/tool/toolHostExtension.d.ts +0 -2
  365. package/features/tool/toolToolbarContributions.d.ts +0 -2
  366. package/features/view/viewActions.d.ts +0 -5
  367. package/features/view/viewContextMenuContributions.d.ts +0 -2
  368. package/features/view/viewHostExtension.d.ts +0 -2
  369. package/host/defaultHostExtensions.d.ts +0 -2
  370. package/product/canvasKitProduct.d.ts +0 -51
  371. package/react/useCanvasKitController.d.ts +0 -5
  372. package/react/useCanvasKitStartup.d.ts +0 -9
  373. package/runtime/canvasKitHostContracts.d.ts +0 -135
  374. package/runtime/canvasKitHostFeatureHooks.d.ts +0 -12
  375. package/runtime/canvasKitRuntimePlan.d.ts +0 -50
@@ -0,0 +1,19 @@
1
+ import type { ShapeColor, ShapeId } from "../canvas-core/index";
2
+ import { type CanvasPluginApi, type CanvasShapeRef } from "../canvas-plugin-sdk/index";
3
+ export interface FrameInput {
4
+ x: number;
5
+ y: number;
6
+ w?: number;
7
+ h?: number;
8
+ name?: string;
9
+ fill?: ShapeColor;
10
+ stroke?: ShapeColor;
11
+ strokeWidth?: number;
12
+ meta?: Record<string, unknown>;
13
+ }
14
+ export interface FrameApi {
15
+ create(input: FrameInput): CanvasShapeRef<"frame"> | null;
16
+ moveShapesToFrame(ids: ShapeId[], frameId: ShapeId): ShapeId[];
17
+ }
18
+ export declare const frameApiToken: import("../canvas-plugin-sdk/index").ProductApiToken<FrameApi>;
19
+ export declare const framePluginApi: CanvasPluginApi<FrameApi>;
@@ -1,9 +1,9 @@
1
- import { type LandCanvasRenderPlugin } from "../canvas-react/host/index";
2
- import type { FrameShapeRecord } from "./frameShapeUtil";
1
+ import { type CanvasRenderPlugin } from "../canvas-react/host/index";
2
+ import { type FrameShapeRecord } from "./frameShapeUtil";
3
3
  interface FrameShapeSvgProps {
4
4
  shape: FrameShapeRecord;
5
- isHovered?: boolean;
5
+ hideName?: boolean;
6
6
  }
7
- export declare function createFrameCanvasRenderPlugin(): LandCanvasRenderPlugin;
8
- export declare function FrameShapeSvg({ shape, isHovered }: FrameShapeSvgProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function createFrameCanvasRenderPlugin(): CanvasRenderPlugin;
8
+ export declare function FrameShapeSvg({ shape, hideName, }: FrameShapeSvgProps): import("react/jsx-runtime").JSX.Element;
9
9
  export {};
@@ -1,7 +1,7 @@
1
- import { type LandEditorRuntimePlugin, type ShapeSvgExporter, type SvgNode, type SvgExportContext } from "../canvas-core/index";
1
+ import { type EditorPlugin, type ShapeSvgExporter, type SvgNode, type SvgExportContext } from "../canvas-core/index";
2
2
  import { type FrameShapeRecord } from "./frameShapeUtil";
3
3
  export declare class FrameShapeSvgExporter implements ShapeSvgExporter<FrameShapeRecord> {
4
4
  readonly type: "frame";
5
5
  toSvg(shape: FrameShapeRecord, context: SvgExportContext): SvgNode;
6
6
  }
7
- export declare function createFrameEditorRuntimePlugin(): LandEditorRuntimePlugin;
7
+ export declare function createFrameEditorPlugin(): EditorPlugin;
@@ -1,3 +1,2 @@
1
- import { type LandFeatureBundle } from "../canvas-react/host/index";
2
- export declare function createFrameFeatureBundle(): LandFeatureBundle;
3
- export declare const Frame: import("../canvas-react/host/index").ConfigurableLandExtension<Record<string, never>>;
1
+ import { setupFrameProduct } from "./productRuntime";
2
+ export declare const Frame: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof setupFrameProduct>;
@@ -1,4 +1,4 @@
1
- import { Box, ShapeUtil, Vec, type ShapeColor, type ShapeBrushSelectInput, type ShapeLineSegmentHitTestInput, type ShapeRecordBase } from "../canvas-core/index";
1
+ import { Box, ShapeUtil, Vec, type ShapeColor, type ShapeBrushSelectInput, type ShapeLineSegmentHitTestInput, type ShapeRecordBase, type ShapeSelectionResizeCapabilityInput } from "../canvas-core/index";
2
2
  export interface FrameShapeProps {
3
3
  w: number;
4
4
  h: number;
@@ -8,14 +8,24 @@ export interface FrameShapeProps {
8
8
  strokeWidth: number;
9
9
  }
10
10
  export type FrameShapeRecord = ShapeRecordBase<"frame", FrameShapeProps>;
11
+ export declare const FRAME_NAME_BASELINE = -8;
12
+ export declare const FRAME_NAME_FALLBACK = "Frame";
13
+ export declare const FRAME_NAME_FONT_SIZE = 12;
14
+ export declare const FRAME_NAME_RENDER_HEIGHT = 34;
15
+ export declare function getFrameDisplayName(name: string): string;
16
+ export declare function getFrameRenderBounds(shape: FrameShapeRecord): Box;
11
17
  export declare class FrameShapeUtil extends ShapeUtil<FrameShapeRecord> {
12
18
  readonly type: "frame";
13
19
  getDefaultProps(): FrameShapeProps;
14
20
  validateProps(props: unknown): FrameShapeProps;
15
- getBounds(shape: FrameShapeRecord): Box;
21
+ getLocalBounds(shape: FrameShapeRecord): Box;
22
+ getRenderBounds(shape: FrameShapeRecord): Box;
16
23
  getPointHitTestBounds(shape: FrameShapeRecord): Box;
24
+ canEdit(_shape: FrameShapeRecord): boolean;
17
25
  canReceiveChildren(_shape: FrameShapeRecord): boolean;
26
+ canSnapChildrenToSelf(_shape: FrameShapeRecord): boolean;
18
27
  canReceiveTerminalBinding(_shape: FrameShapeRecord): boolean;
28
+ getSelectionResizeHandleIds(_shape: FrameShapeRecord, _input: ShapeSelectionResizeCapabilityInput): readonly ["top_left", "top_right", "bottom_right", "bottom_left"];
19
29
  shouldRotateDescendants(_shape: FrameShapeRecord): boolean;
20
30
  getChildClipLocalBounds(shape: FrameShapeRecord): Box | null;
21
31
  canSelectByBrush(shape: FrameShapeRecord, input: ShapeBrushSelectInput): boolean;
@@ -1,6 +1,9 @@
1
1
  export { FrameShapeUtil } from "./frameShapeUtil";
2
+ export { frameApiToken } from "./api";
3
+ export type { FrameApi, FrameInput } from "./api";
2
4
  export type { FrameShapeProps, FrameShapeRecord } from "./frameShapeUtil";
3
5
  export { FrameTool } from "./frameTool";
4
- export { FrameShapeSvgExporter, createFrameEditorRuntimePlugin } from "./editorRuntime";
6
+ export { FrameShapeSvgExporter, createFrameEditorPlugin } from "./editorRuntime";
7
+ export { setupFrameProduct } from "./productRuntime";
5
8
  export { createFrameCanvasRenderPlugin } from "./canvasRender";
6
- export { Frame, createFrameFeatureBundle } from "./feature";
9
+ export { Frame } from "./feature";
@@ -0,0 +1,2 @@
1
+ import { type CanvasPluginSetupContext } from "../canvas-plugin-sdk/index";
2
+ export declare function setupFrameProduct(context: CanvasPluginSetupContext): void;
@@ -0,0 +1,27 @@
1
+ import type { ShapeColor } from "../canvas-core/index";
2
+ import { type CanvasPluginApi, type CanvasShapeRef } from "../canvas-plugin-sdk/index";
3
+ import type { GeoShapeProps } from "./types";
4
+ export interface GeoShapeInput {
5
+ x: number;
6
+ y: number;
7
+ w?: number;
8
+ h?: number;
9
+ fill?: ShapeColor;
10
+ stroke?: ShapeColor;
11
+ strokeStyle?: GeoShapeProps["strokeStyle"];
12
+ strokeWidth?: number;
13
+ meta?: Record<string, unknown>;
14
+ }
15
+ export interface GeoRectangleInput extends GeoShapeInput {
16
+ cornerRadiusPercent?: GeoShapeProps["cornerRadiusPercent"];
17
+ }
18
+ export interface GeoApi {
19
+ createRectangle(input: GeoRectangleInput): CanvasShapeRef<"geo"> | null;
20
+ createEllipse(input: GeoShapeInput): CanvasShapeRef<"geo"> | null;
21
+ createRhombus(input: GeoShapeInput): CanvasShapeRef<"geo"> | null;
22
+ createTriangle(input: GeoShapeInput): CanvasShapeRef<"geo"> | null;
23
+ createHexagon(input: GeoShapeInput): CanvasShapeRef<"geo"> | null;
24
+ createStar(input: GeoShapeInput): CanvasShapeRef<"geo"> | null;
25
+ }
26
+ export declare const geoApiToken: import("../canvas-plugin-sdk/index").ProductApiToken<GeoApi>;
27
+ export declare const geoPluginApi: CanvasPluginApi<GeoApi>;
@@ -1,13 +1,13 @@
1
1
  import { type ShapeColor } from "../canvas-core/index";
2
- import { type LandCanvasRenderPlugin } from "../canvas-react/host/index";
3
- import type { GeoShapeRecord } from "./types";
2
+ import { type CanvasRenderPlugin } from "../canvas-react/host/index";
3
+ import type { GeoShapeRecord, GeoStrokeStyle } from "./types";
4
4
  interface GeoShapeSvgProps {
5
5
  shape: GeoShapeRecord;
6
6
  fill?: ShapeColor;
7
- isHovered?: boolean;
8
7
  stroke?: ShapeColor;
8
+ strokeStyle?: GeoStrokeStyle;
9
9
  strokeWidth?: number;
10
10
  }
11
- export declare function createGeoCanvasRenderPlugin(): LandCanvasRenderPlugin;
12
- export declare function GeoShapeSvg({ shape, fill, isHovered, stroke, strokeWidth, }: GeoShapeSvgProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function createGeoCanvasRenderPlugin(): CanvasRenderPlugin;
12
+ export declare function GeoShapeSvg({ shape, fill, stroke, strokeStyle, strokeWidth, }: GeoShapeSvgProps): import("react/jsx-runtime").JSX.Element;
13
13
  export {};
@@ -1,7 +1,7 @@
1
- import { type LandEditorRuntimePlugin, type ShapeSvgExporter, type SvgExportContext, type SvgNode } from "../canvas-core/index";
2
- import { type GeoShapeRecord } from "./types";
1
+ import { type EditorPlugin, type ShapeSvgExporter, type SvgExportContext, type SvgNode } from "../canvas-core/index";
2
+ import type { GeoShapeRecord } from "./types";
3
3
  export declare class GeoShapeSvgExporter implements ShapeSvgExporter<GeoShapeRecord> {
4
4
  readonly type: "geo";
5
5
  toSvg(shape: GeoShapeRecord, context: SvgExportContext): SvgNode;
6
6
  }
7
- export declare function createGeoEditorRuntimePlugin(): LandEditorRuntimePlugin;
7
+ export declare function createGeoEditorPlugin(): EditorPlugin;
@@ -1,3 +1,2 @@
1
- import { type LandFeatureBundle } from "../canvas-react/host/index";
2
- export declare function createGeoFeatureBundle(): LandFeatureBundle;
3
- export declare const Geo: import("../canvas-react/host/index").ConfigurableLandExtension<Record<string, never>>;
1
+ import { setupGeoProduct } from "./productRuntime";
2
+ export declare const Geo: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof setupGeoProduct>;
@@ -4,7 +4,7 @@ export declare class GeoShapeUtil extends ShapeUtil<GeoShapeRecord> {
4
4
  readonly type: "geo";
5
5
  getDefaultProps(): GeoShapeProps;
6
6
  validateProps(props: unknown): GeoShapeProps;
7
- getBounds(shape: GeoShapeRecord): Box;
7
+ getLocalBounds(shape: GeoShapeRecord): Box;
8
8
  canReceiveTerminalBinding(_shape: GeoShapeRecord): boolean;
9
9
  getPositionedOutlineVertices(shape: GeoShapeRecord): Vec[];
10
10
  getHandleSnapGeometry(shape: GeoShapeRecord): ShapeHandleSnapGeometry;
@@ -0,0 +1,2 @@
1
+ import type { GeoStrokeStyle } from "./types";
2
+ export declare function getGeoStrokeDasharray(strokeStyle: GeoStrokeStyle, strokeWidth: number): string | undefined;
@@ -12,7 +12,7 @@ export declare class RectangleTool extends BoxGeoTool {
12
12
  export declare class EllipseTool extends BoxGeoTool {
13
13
  constructor(editor: Editor);
14
14
  }
15
- export declare class DiamondTool extends BoxGeoTool {
15
+ export declare class RhombusTool extends BoxGeoTool {
16
16
  constructor(editor: Editor);
17
17
  }
18
18
  export declare class TriangleTool extends BoxGeoTool {
@@ -1,7 +1,10 @@
1
- export { DiamondTool, EllipseTool, HexagonTool, RectangleTool, StarTool, TriangleTool, } from "./geoTools";
1
+ export { EllipseTool, HexagonTool, RectangleTool, RhombusTool, StarTool, TriangleTool, } from "./geoTools";
2
+ export { geoApiToken } from "./api";
3
+ export type { GeoApi, GeoRectangleInput, GeoShapeInput, } from "./api";
2
4
  export { GeoShapeUtil } from "./geoShapeUtil";
3
- export { GeoShapeSvgExporter, createGeoEditorRuntimePlugin } from "./editorRuntime";
5
+ export { GeoShapeSvgExporter, createGeoEditorPlugin } from "./editorRuntime";
6
+ export { setupGeoProduct } from "./productRuntime";
4
7
  export { GeoShapeSvg, createGeoCanvasRenderPlugin } from "./canvasRender";
5
- export { Geo, createGeoFeatureBundle } from "./feature";
6
- export type { GeoShapeKind, GeoShapeProps, GeoShapeRecord } from "./types";
7
- export { GEO_SHAPE_KINDS, isGeoShapeKind, isGeoShapeRecord } from "./types";
8
+ export { Geo } from "./feature";
9
+ export type { GeoShapeKind, GeoShapeProps, GeoShapeRecord, GeoStrokeStyle, } from "./types";
10
+ export { GEO_SHAPE_KINDS, GEO_STROKE_STYLES, isGeoShapeKind, isGeoShapeRecord, isGeoStrokeStyle, } from "./types";
@@ -0,0 +1,2 @@
1
+ import { type CanvasPluginSetupContext } from "../canvas-plugin-sdk/index";
2
+ export declare function setupGeoProduct(context: CanvasPluginSetupContext): void;
@@ -1,12 +1,15 @@
1
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"];
2
+ export declare const GEO_SHAPE_KINDS: readonly ["rectangle", "ellipse", "rhombus", "triangle", "hexagon", "star"];
3
3
  export type GeoShapeKind = (typeof GEO_SHAPE_KINDS)[number];
4
+ export declare const GEO_STROKE_STYLES: readonly ["solid", "dashed", "dotted", "none"];
5
+ export type GeoStrokeStyle = (typeof GEO_STROKE_STYLES)[number];
4
6
  export interface GeoShapeProps {
5
7
  w: number;
6
8
  h: number;
7
9
  geo: GeoShapeKind;
8
10
  fill: ShapeColor;
9
11
  stroke: ShapeColor;
12
+ strokeStyle: GeoStrokeStyle;
10
13
  strokeWidth: number;
11
14
  cornerRadiusPercent: number;
12
15
  }
@@ -16,3 +19,4 @@ export interface GeoShapeRecord extends ShapeRecordBase<"geo", GeoShapeProps> {
16
19
  }
17
20
  export declare function isGeoShapeRecord(record: BaseRecord | null | undefined): record is GeoShapeRecord;
18
21
  export declare function isGeoShapeKind(value: unknown): value is GeoShapeKind;
22
+ export declare function isGeoStrokeStyle(value: unknown): value is GeoStrokeStyle;
@@ -1,10 +1,9 @@
1
- import { type LandCanvasRenderPlugin } from "../canvas-react/host/index";
1
+ import { type CanvasRenderPlugin } from "../canvas-react/host/index";
2
2
  import type { GroupShapeRecord } from "./groupShapeUtil";
3
3
  interface GroupShapeSvgProps {
4
4
  shape: GroupShapeRecord;
5
- isHovered?: boolean;
6
5
  isSelected?: boolean;
7
6
  }
8
- export declare function createGroupCanvasRenderPlugin(): LandCanvasRenderPlugin;
9
- export declare function GroupShapeSvg({ shape, isHovered, isSelected, }: GroupShapeSvgProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function createGroupCanvasRenderPlugin(): CanvasRenderPlugin;
8
+ export declare function GroupShapeSvg({ shape, isSelected, }: GroupShapeSvgProps): import("react/jsx-runtime").JSX.Element;
10
9
  export {};
@@ -1,7 +1,7 @@
1
- import { type LandEditorRuntimePlugin, type ShapeSvgExporter, type SvgNode } from "../canvas-core/index";
1
+ import { type EditorPlugin, type ShapeSvgExporter, type SvgNode } from "../canvas-core/index";
2
2
  import { type GroupShapeRecord } from "./groupShapeUtil";
3
3
  export declare class GroupShapeSvgExporter implements ShapeSvgExporter<GroupShapeRecord> {
4
4
  readonly type: "group";
5
5
  toSvg(_shape: GroupShapeRecord): SvgNode;
6
6
  }
7
- export declare function createGroupEditorRuntimePlugin(): LandEditorRuntimePlugin;
7
+ export declare function createGroupEditorPlugin(): EditorPlugin;
@@ -1,3 +1,2 @@
1
- import { type LandFeatureBundle } from "../canvas-react/host/index";
2
- export declare function createGroupFeatureBundle(): LandFeatureBundle;
3
- export declare const Group: import("../canvas-react/host/index").ConfigurableLandExtension<Record<string, never>>;
1
+ import { setupGroupProduct } from "./productRuntime";
2
+ export declare const Group: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof setupGroupProduct>;
@@ -0,0 +1,7 @@
1
+ import { type CanvasAction, type ContextMenuContribution, type ToolbarContribution } from "../canvas-plugin-sdk/index";
2
+ export declare const GROUP_SELECTION_ACTION_ID = "group.selection.group";
3
+ export declare const UNGROUP_SELECTION_ACTION_ID = "group.selection.ungroup";
4
+ export declare const groupSelectionAction: CanvasAction;
5
+ export declare const ungroupSelectionAction: CanvasAction;
6
+ export declare const groupToolbarContribution: ToolbarContribution;
7
+ export declare const groupContextMenuContribution: ContextMenuContribution;
@@ -1,16 +1,35 @@
1
- import { Box, ShapeUtil, type Vec, type ShapeRecordBase } from "../canvas-core/index";
1
+ import { Box, ShapeUtil, type Vec, type ShapeLineSegmentHitTestInput, type ShapeGroupingInput, type ShapeRecordBase } from "../canvas-core/index";
2
2
  export interface GroupShapeProps {
3
- w: number;
4
- h: number;
3
+ /** Intrinsic width of the group's parent-local frame. */
4
+ readonly w: number;
5
+ /** Intrinsic height of the group's parent-local frame. */
6
+ readonly h: number;
5
7
  }
6
8
  export type GroupShapeRecord = ShapeRecordBase<"group", GroupShapeProps>;
7
9
  export declare class GroupShapeUtil extends ShapeUtil<GroupShapeRecord> {
8
10
  readonly type: "group";
11
+ getGroupingShapeCreateInput({ parentId, parentLocalBounds, }: ShapeGroupingInput): {
12
+ type: "group";
13
+ x: number;
14
+ y: number;
15
+ parentId: import("../canvas-core/index").ShapeParentId;
16
+ props: {
17
+ w: number;
18
+ h: number;
19
+ };
20
+ };
9
21
  getDefaultProps(): GroupShapeProps;
10
22
  validateProps(props: unknown): GroupShapeProps;
11
- getBounds(shape: GroupShapeRecord): Box;
23
+ getLocalBounds(shape: GroupShapeRecord): Box;
12
24
  hitTest(_shape: GroupShapeRecord, _positionedPoint: Vec): boolean;
13
- isTransformDescendantContainer(_shape: GroupShapeRecord): boolean;
25
+ hitTestLineSegment(_shape: GroupShapeRecord, _input: ShapeLineSegmentHitTestInput): boolean;
26
+ isSelectionTransformContainer(_shape: GroupShapeRecord): boolean;
14
27
  canUngroupChildren(_shape: GroupShapeRecord): boolean;
28
+ shouldResizeDescendants(_shape: GroupShapeRecord): boolean;
29
+ getResizeToFitDescendantsProps(shape: GroupShapeRecord, descendantBounds: Box): GroupShapeProps;
30
+ getMinimumChildCount(_shape: GroupShapeRecord): number;
31
+ contributesToExportBounds(_shape: GroupShapeRecord): boolean;
15
32
  canReceiveChildren(_shape: GroupShapeRecord): boolean;
33
+ canAutomaticallyReceiveChildren(_shape: GroupShapeRecord): boolean;
34
+ canBeDirectlyBrushSelected(_shape: GroupShapeRecord): boolean;
16
35
  }
@@ -1,5 +1,7 @@
1
1
  export { GroupShapeUtil } from "./groupShapeUtil";
2
2
  export type { GroupShapeProps, GroupShapeRecord } from "./groupShapeUtil";
3
- export { GroupShapeSvgExporter, createGroupEditorRuntimePlugin } from "./editorRuntime";
3
+ export { GroupShapeSvgExporter, createGroupEditorPlugin } from "./editorRuntime";
4
+ export { setupGroupProduct } from "./productRuntime";
4
5
  export { createGroupCanvasRenderPlugin } from "./canvasRender";
5
- export { Group, createGroupFeatureBundle } from "./feature";
6
+ export { Group } from "./feature";
7
+ export { groupContextMenuContribution, GROUP_SELECTION_ACTION_ID, groupSelectionAction, groupToolbarContribution, UNGROUP_SELECTION_ACTION_ID, ungroupSelectionAction, } from "./groupContributions";
@@ -0,0 +1,2 @@
1
+ import type { CanvasPluginSetupContext } from "../canvas-plugin-sdk/index";
2
+ export declare function setupGroupProduct(context: CanvasPluginSetupContext): void;
@@ -1,2 +1,2 @@
1
- import { type LandCanvasRenderPlugin } from "../canvas-react/host/index";
2
- export declare function createImageCanvasRenderPlugin(): LandCanvasRenderPlugin;
1
+ import { type CanvasRenderPlugin } from "../canvas-react/host/index";
2
+ export declare function createImageCanvasRenderPlugin(): CanvasRenderPlugin;
@@ -1,2 +1,2 @@
1
- import type { CanvasAction } from "../canvas-core/index";
1
+ import { type CanvasAction } from "../canvas-plugin-sdk/index";
2
2
  export declare function createImageCropCanvasActions(): CanvasAction[];
@@ -1,4 +1,6 @@
1
+ import { type Editor } from "../canvas-core/index";
1
2
  import type { ImageShapeRecord } from "./types";
2
- export declare function rememberImageCropSessionBaseline(shape: ImageShapeRecord): void;
3
- export declare function getImageCropSessionBaseline(shapeId: ImageShapeRecord["id"]): ImageShapeRecord | null;
4
- export declare function clearImageCropSessionBaseline(shapeId: ImageShapeRecord["id"]): void;
3
+ export declare function rememberImageCropSessionBaseline(editor: Editor, shape: ImageShapeRecord): void;
4
+ export declare function getImageCropSessionBaseline(editor: Editor, shapeId: ImageShapeRecord["id"]): ImageShapeRecord | null;
5
+ export declare function clearImageCropSessionBaseline(editor: Editor, shapeId: ImageShapeRecord["id"]): void;
6
+ export declare function setupImageCropSessionLifecycle(editor: Editor): () => void;
@@ -1,5 +1,3 @@
1
- import type { LandEditorRuntimePlugin } from "../canvas-core/index";
2
- export { IMAGE_CORNER_RADIUS_TOOLBAR_ACTION_ID, 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, } from "./actionIds";
1
+ import type { EditorPlugin } from "../canvas-core/index";
3
2
  export { ImageShapeSvgExporter } from "./imageSvgExporter";
4
- export { isImageCropToolbarSession, isImageSmudgeToolbarSession, } from "./runtimeShared";
5
- export declare function createImageEditorRuntimePlugin(): LandEditorRuntimePlugin;
3
+ export declare function createImageEditorPlugin(): EditorPlugin;
@@ -1,3 +1,2 @@
1
- import { type LandFeatureBundle } from "../canvas-react/host/index";
2
- export declare function createImageFeatureBundle(): LandFeatureBundle;
3
- export declare const Image: import("../canvas-react/host/index").ConfigurableLandExtension<Record<string, never>>;
1
+ import { setupImageProduct } from "./productRuntime";
2
+ export declare const Image: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof setupImageProduct>;
@@ -1,2 +1,2 @@
1
- import type { CanvasAction } from "../canvas-core/index";
1
+ import { type CanvasAction } from "../canvas-plugin-sdk/index";
2
2
  export declare function createImageHostToolbarActionContract(actionId: string): CanvasAction;
@@ -1,12 +1,12 @@
1
- import { Box, ShapeUtil, type ShapeEditEndInput, type ShapeSelectionHandleAnchorInput, type ShapeSelectionHandleAnchors, type ShapeSelectionResizeAspectRatioLockInput } from "../canvas-core/index";
1
+ import { Box, ShapeUtil, type ShapeEditEndInput, type ShapeSelectionHandleAnchorInput, type ShapeSelectionHandleAnchors, type ShapeSelectionResizeModesInput } 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
- getBounds(shape: ImageShapeRecord): Box;
7
+ getLocalBounds(shape: ImageShapeRecord): Box;
8
8
  canReceiveTerminalBinding(_shape: ImageShapeRecord): boolean;
9
- getSelectionResizeAspectRatioLock(_shape: ImageShapeRecord, input: ShapeSelectionResizeAspectRatioLockInput): boolean | null;
9
+ getAllowedSelectionResizeModes(_shape: ImageShapeRecord, _input: ShapeSelectionResizeModesInput): readonly ["aspect_ratio_locked"];
10
10
  canEdit(_shape: ImageShapeRecord): boolean;
11
11
  onEditEnd(shape: ImageShapeRecord, input: ShapeEditEndInput): void;
12
12
  getSelectionHandleAnchors(shape: ImageShapeRecord, input: ShapeSelectionHandleAnchorInput): ShapeSelectionHandleAnchors;
@@ -1,12 +1,13 @@
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_CORNER_RADIUS_TOOLBAR_ACTION_ID, IMAGE_DOWNLOAD_TOOLBAR_ACTION_ID, IMAGE_INSERT_TOOLBAR_ACTION_ID, IMAGE_REPLACE_TOOLBAR_ACTION_ID, ImageShapeSvgExporter, createImageEditorRuntimePlugin, isImageCropToolbarSession, isImageSmudgeToolbarSession, } from "./editorRuntime";
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_CORNER_RADIUS_TOOLBAR_ACTION_ID, IMAGE_DOWNLOAD_TOOLBAR_ACTION_ID, IMAGE_INSERT_TOOLBAR_ACTION_ID, IMAGE_REPLACE_TOOLBAR_ACTION_ID, isImageCropToolbarSession, isImageSmudgeToolbarSession, setupImageProduct, } from "./productRuntime";
2
+ export { ImageShapeSvgExporter, createImageEditorPlugin, } from "./editorRuntime";
2
3
  export { createImageCanvasRenderPlugin } from "./canvasRender";
3
4
  export { createImageCropInteractionHandler, createImageCropSelectionHandleInteractionHandler, } from "./cropInteractions";
4
5
  export { createImageSmudgeInteractionHandler } from "./smudgeInteractions";
5
6
  export { getImageCropModeMarkId, getImageCropRectOrDefault, } from "./crop";
6
7
  export type { ImageCropRect } from "./crop";
7
- export { DEFAULT_IMAGE_SMUDGE_BRUSH_COLOR, DEFAULT_IMAGE_SMUDGE_BRUSH_SIZE, IMAGE_SMUDGE_BRUSH_COLOR_TOOLBAR_ACTION_ID, IMAGE_SMUDGE_BRUSH_SIZE_MAX, IMAGE_SMUDGE_BRUSH_SIZE_MIN, IMAGE_SMUDGE_BRUSH_SIZE_TOOLBAR_ACTION_ID, IMAGE_SMUDGE_CANCEL_TOOLBAR_ACTION_ID, IMAGE_SMUDGE_CONFIRM_TOOLBAR_ACTION_ID, IMAGE_SMUDGE_TOOLBAR_ACTION_ID, cancelImageSmudgeSession, cancelImageSmudgeSessionIfActive, cloneImageSmudgeStrokes, completeImageSmudgeSession, getActiveImageSmudgeSession, getImageSmudgeModeMarkId, isImageSmudgeModeForShape, isImageSmudgeToolbarActionId, registerImageSmudgeConfirmHandler, requestImageSmudgeConfirm, startImageSmudgeSession, updateImageSmudgeBrush, } from "./smudge";
8
- export type { ImageSmudgeBrush, ImageSmudgeStroke, ImageSmudgeStrokePoint, } from "./smudge";
9
- export { Image, createImageFeatureBundle } from "./feature";
8
+ export { DEFAULT_IMAGE_SMUDGE_BRUSH_COLOR, DEFAULT_IMAGE_SMUDGE_BRUSH_SIZE, IMAGE_SMUDGE_BRUSH_COLOR_TOOLBAR_ACTION_ID, IMAGE_SMUDGE_BRUSH_SIZE_MAX, IMAGE_SMUDGE_BRUSH_SIZE_MIN, IMAGE_SMUDGE_BRUSH_SIZE_TOOLBAR_ACTION_ID, IMAGE_SMUDGE_CANCEL_TOOLBAR_ACTION_ID, IMAGE_SMUDGE_CONFIRM_TOOLBAR_ACTION_ID, IMAGE_SMUDGE_TOOLBAR_ACTION_ID, cancelImageSmudgeSession, cancelImageSmudgeSessionIfActive, cloneImageSmudgeStrokes, completeImageSmudgeSession, getActiveImageSmudgeSession, getImageSmudgeModeMarkId, isImageSmudgeModeForShape, isImageSmudgeToolbarActionId, registerImageSmudgeConfirmHandler, redoImageSmudgeStroke, requestImageSmudgeConfirm, startImageSmudgeSession, undoImageSmudgeStroke, updateImageSmudgeBrush, } from "./smudge";
9
+ export type { ImageSmudgeBrush, ImageSmudgeSessionSnapshot, ImageSmudgeStroke, ImageSmudgeStrokePoint, } from "./smudge";
10
+ export { Image } from "./feature";
10
11
  export { ImageShapeUtil } from "./imageShapeUtil";
11
12
  export type { ImageAssetProps, ImageAssetRecord, ImageAssetSource, ImageRemoteCopyState, ImageShapeCrop, ImageShapeProps, ImageShapeRecord, } from "./types";
12
13
  export { isImageAssetRecord, isImageShapeRecord } from "./types";
@@ -0,0 +1,4 @@
1
+ import type { CanvasPluginSetupContext } from "../canvas-plugin-sdk/index";
2
+ export { IMAGE_CORNER_RADIUS_TOOLBAR_ACTION_ID, 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, } from "./actionIds";
3
+ export { isImageCropToolbarSession, isImageSmudgeToolbarSession, } from "./runtimeShared";
4
+ export declare function setupImageProduct(context: CanvasPluginSetupContext): void;
@@ -1,4 +1,4 @@
1
- import type { CanvasActionContext } from "../canvas-core/index";
1
+ import { type CanvasActionContext } from "../canvas-plugin-sdk/index";
2
2
  import { type ImageShapeRecord } from "./types";
3
3
  export declare function getSingleSelectedImageShape(context: CanvasActionContext): ImageShapeRecord | null;
4
4
  export declare function isImageCropToolbarSession(context: CanvasActionContext): boolean;
@@ -1,4 +1,4 @@
1
- import type { Editor, ShapeId } from "../canvas-core/index";
1
+ import { type Editor, type ShapeId } from "../canvas-core/index";
2
2
  import type { ImageShapeRecord } from "./types";
3
3
  export declare const IMAGE_SMUDGE_TOOLBAR_ACTION_ID = "image.smudge";
4
4
  export declare const IMAGE_SMUDGE_CANCEL_TOOLBAR_ACTION_ID = "image.smudge.cancel";
@@ -33,6 +33,8 @@ export type ImageSmudgeSessionSnapshot = Readonly<{
33
33
  shapeId: ShapeId;
34
34
  brush: ImageSmudgeBrush;
35
35
  strokes: readonly ImageSmudgeStroke[];
36
+ canUndo: boolean;
37
+ canRedo: boolean;
36
38
  }>;
37
39
  type ImageSmudgeSubscriber = () => void;
38
40
  type ImageSmudgeConfirmHandler = (input?: ImageSmudgeConfirmInput) => Promise<unknown>;
@@ -54,9 +56,11 @@ export declare function getImageSmudgeSessionSnapshot(editor: Editor, shapeId: S
54
56
  export declare function getActiveImageSmudgeSession(editor: Editor): ImageSmudgeSessionSnapshot | null;
55
57
  export declare function subscribeImageSmudgeSession(editor: Editor, subscriber: ImageSmudgeSubscriber): () => void;
56
58
  export declare function beginImageSmudgeStroke(editor: Editor, point: ImageSmudgeStrokePoint): void;
57
- export declare function addImageSmudgeStrokePoint(editor: Editor, point: ImageSmudgeStrokePoint): void;
58
59
  export declare function appendImageSmudgeStrokePoint(editor: Editor, point: ImageSmudgeStrokePoint): void;
59
60
  export declare function endImageSmudgeStroke(editor: Editor): void;
61
+ export declare function cancelImageSmudgeStroke(editor: Editor): void;
62
+ export declare function undoImageSmudgeStroke(editor: Editor): boolean;
63
+ export declare function redoImageSmudgeStroke(editor: Editor): boolean;
60
64
  export declare function registerImageSmudgeConfirmHandler(editor: Editor, handler: ImageSmudgeConfirmHandler): () => void;
61
65
  export declare function requestImageSmudgeConfirm(editor: Editor, input?: ImageSmudgeConfirmInput): Promise<unknown>;
62
66
  export declare function cloneImageSmudgeStrokes(strokes: readonly ImageSmudgeStroke[]): ImageSmudgeStroke[];
@@ -1,2 +1,2 @@
1
- import type { CanvasAction } from "../canvas-core/index";
1
+ import { type CanvasAction } from "../canvas-plugin-sdk/index";
2
2
  export declare function createImageSmudgeCanvasActions(): CanvasAction[];
@@ -1,4 +1,4 @@
1
- import { type CanvasAction, type ToolbarGroup } from "../canvas-core/index";
1
+ import { type CanvasAction, type ToolbarGroup } from "../canvas-plugin-sdk/index";
2
2
  export declare function createImageStyleCanvasActions(): CanvasAction[];
3
3
  export declare function createImageCornerRadiusToolbarGroup({ dataUiPrefix, id, order, }: {
4
4
  dataUiPrefix: string;
@@ -12,6 +12,11 @@ export declare function createImageCornerRadiusToolbarItem({ dataUiPrefix, }: {
12
12
  id: string;
13
13
  actionId: string;
14
14
  label: string;
15
+ icon: string;
15
16
  placeholder: string;
17
+ suffix: string;
18
+ validate: typeof isValidImageCornerRadiusToolbarValue;
16
19
  dataUi: string;
17
20
  };
21
+ declare function isValidImageCornerRadiusToolbarValue(value: string): boolean;
22
+ export {};
@@ -1,3 +1,3 @@
1
- import type { ContextMenuContribution, ToolbarContribution } from "../canvas-core/index";
1
+ import { type ContextMenuContribution, type ToolbarContribution } from "../canvas-plugin-sdk/index";
2
2
  export declare function createImageToolbarContributions(): ToolbarContribution[];
3
3
  export declare function createImageContextMenuContributions(): ContextMenuContribution[];
@@ -1,2 +1,2 @@
1
- import { type LandCanvasRenderPlugin } from "../canvas-react/host/index";
2
- export declare function createLaserCanvasRenderPlugin(): LandCanvasRenderPlugin;
1
+ import { type CanvasRenderPlugin } from "../canvas-react/host/index";
2
+ export declare function createLaserCanvasRenderPlugin(): CanvasRenderPlugin;
@@ -1,2 +1,2 @@
1
- import { type LandEditorRuntimePlugin } from "../canvas-core/index";
2
- export declare function createLaserEditorRuntimePlugin(): LandEditorRuntimePlugin;
1
+ import type { EditorPlugin } from "../canvas-core/index";
2
+ export declare function createLaserEditorPlugin(): EditorPlugin;
@@ -1,3 +1,2 @@
1
- import { type LandFeatureBundle } from "../canvas-react/host/index";
2
- export declare function createLaserFeatureBundle(): LandFeatureBundle;
3
- export declare const Laser: import("../canvas-react/host/index").ConfigurableLandExtension<Record<string, never>>;
1
+ import { setupLaserProduct } from "./productRuntime";
2
+ export declare const Laser: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof setupLaserProduct>;
@@ -1,4 +1,6 @@
1
1
  export { LaserTool } from "./laserTool";
2
2
  export { createLaserCanvasRenderPlugin } from "./canvasRender";
3
- export { createLaserEditorRuntimePlugin } from "./editorRuntime";
4
- export { Laser, createLaserFeatureBundle } from "./feature";
3
+ export { createLaserEditorPlugin } from "./editorRuntime";
4
+ export { setupLaserProduct } from "./productRuntime";
5
+ export { getLaserRuntime } from "./laserRuntime";
6
+ export { Laser } from "./feature";
@@ -0,0 +1,18 @@
1
+ import { type Editor, type Vec } from "../canvas-core/index";
2
+ import { type Signal } from "../signals/index";
3
+ export interface LaserTrailState {
4
+ sessionId: number;
5
+ phase: "active" | "ending";
6
+ points: readonly Vec[];
7
+ }
8
+ export interface LaserRuntime {
9
+ readonly trailSignal: Signal<LaserTrailState | null>;
10
+ readonly activeSignal: Signal<boolean>;
11
+ start(): number;
12
+ set(sessionId: number, points: readonly Vec[]): void;
13
+ finish(sessionId: number): void;
14
+ clear(sessionId: number): void;
15
+ }
16
+ export declare const laserRuntimeToken: import("../canvas-core/index").EditorRuntimeToken<LaserRuntime>;
17
+ export declare function createLaserRuntime(): LaserRuntime;
18
+ export declare function getLaserRuntime(editor: Editor): LaserRuntime;
@@ -0,0 +1,2 @@
1
+ import { type CanvasPluginSetupContext } from "../canvas-plugin-sdk/index";
2
+ export declare function setupLaserProduct(context: CanvasPluginSetupContext): void;