@yuzhouu/canvas-kit 0.1.11 → 0.1.13

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 (229) hide show
  1. package/README.md +47 -13
  2. package/_vendor/canvas-core/bindings/bindingUtil.d.ts +1 -0
  3. package/_vendor/canvas-core/editor/clipboard.d.ts +1 -1
  4. package/_vendor/canvas-core/editor/commands.d.ts +0 -2
  5. package/_vendor/canvas-core/editor/managers/bindingManager.d.ts +4 -0
  6. package/_vendor/canvas-core/editor/queries/shapeTransforms.d.ts +3 -4
  7. package/_vendor/canvas-core/editor/resizeGeometry.d.ts +20 -0
  8. package/_vendor/canvas-core/editor/selectionResizeCapabilities.d.ts +2 -0
  9. package/_vendor/canvas-core/geometry/mat.d.ts +2 -3
  10. package/_vendor/canvas-core/index.d.ts +4 -2
  11. package/_vendor/canvas-core/schema/records.d.ts +0 -1
  12. package/_vendor/canvas-core/schema/snapshots.d.ts +2 -2
  13. package/_vendor/canvas-core/shapes/childTransformPolicy.d.ts +16 -0
  14. package/_vendor/canvas-core/shapes/shapeUtil.d.ts +3 -3
  15. package/_vendor/canvas-plugin-sdk/capability.d.ts +0 -6
  16. package/_vendor/canvas-plugin-sdk/index.d.ts +1 -16
  17. package/_vendor/canvas-plugin-sdk/plugin.d.ts +5 -52
  18. package/_vendor/canvas-plugin-sdk/setupExtension.d.ts +5 -0
  19. package/_vendor/canvas-product-contracts/actionRegistry.d.ts +4 -0
  20. package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/actions.d.ts +10 -16
  21. package/_vendor/canvas-product-contracts/capability.d.ts +8 -0
  22. package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/chrome.d.ts +1 -0
  23. package/_vendor/canvas-product-contracts/chromeRegistry.d.ts +9 -0
  24. package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/contextMenu.d.ts +4 -0
  25. package/_vendor/canvas-product-contracts/contextMenuRegistry.d.ts +4 -0
  26. package/_vendor/canvas-product-contracts/exportRegistry.d.ts +6 -0
  27. package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/exports.d.ts +1 -0
  28. package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/importRegistry.d.ts +1 -4
  29. package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/imports.d.ts +1 -0
  30. package/_vendor/canvas-product-contracts/index.d.ts +15 -0
  31. package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/productApi.d.ts +6 -5
  32. package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/services.d.ts +2 -1
  33. package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/toolbar.d.ts +3 -6
  34. package/_vendor/canvas-product-contracts/toolbarRegistry.d.ts +9 -0
  35. package/_vendor/plugin-arrow/api.d.ts +2 -2
  36. package/_vendor/plugin-frame/api.d.ts +2 -2
  37. package/_vendor/plugin-geo/api.d.ts +2 -2
  38. package/_vendor/plugin-group/groupContributions.d.ts +1 -1
  39. package/_vendor/plugin-group/productRuntime.d.ts +1 -1
  40. package/_vendor/plugin-image/cropRuntime.d.ts +1 -1
  41. package/_vendor/plugin-image/imageHostActionContract.d.ts +1 -1
  42. package/_vendor/plugin-image/productRuntime.d.ts +1 -1
  43. package/_vendor/plugin-image/runtimeShared.d.ts +1 -1
  44. package/_vendor/plugin-image/smudgeRuntime.d.ts +1 -1
  45. package/_vendor/plugin-image/styleRuntime.d.ts +1 -1
  46. package/_vendor/plugin-image/toolbarRuntime.d.ts +1 -1
  47. package/_vendor/plugin-runtime-clipboard/capability.d.ts +1 -0
  48. package/_vendor/{plugin-builtin-clipboard/clipboardContribution.d.ts → plugin-runtime-clipboard/clipboardActions.d.ts} +1 -6
  49. package/_vendor/{plugin-builtin-clipboard → plugin-runtime-clipboard}/clipboardService.d.ts +2 -2
  50. package/_vendor/plugin-runtime-clipboard/index.d.ts +4 -0
  51. package/_vendor/plugin-runtime-clipboard/plugin.d.ts +1 -0
  52. package/_vendor/{plugin-builtin-export → plugin-runtime-export}/canvasExportApi.d.ts +2 -2
  53. package/_vendor/{plugin-builtin-export → plugin-runtime-export}/index.d.ts +1 -1
  54. package/_vendor/{plugin-builtin-export → plugin-runtime-export}/plugin.d.ts +1 -1
  55. package/_vendor/plugin-text/api.d.ts +2 -2
  56. package/_vendor/plugin-text/feature.d.ts +1 -1
  57. package/_vendor/plugin-text/textShapeHelpers.d.ts +0 -1
  58. package/browser/persistence.d.ts +1 -1
  59. package/canvasKitTools.d.ts +3 -0
  60. package/chrome/contextMenuRuntime.d.ts +7 -0
  61. package/chrome/toolbar/FloatingSelectionToolbarPageSpace.d.ts +1 -1
  62. package/chrome/toolbar/mergeToolbarGroups.d.ts +8 -0
  63. package/chrome/toolbar/toolbarLabels.d.ts +1 -1
  64. package/chrome/toolbar/useToolbarSurfaces.d.ts +1 -1
  65. package/chrome/types.d.ts +7 -8
  66. package/chrome/useCanvasKitChromeContext.d.ts +7 -7
  67. package/chrome/useCanvasKitLayerTree.d.ts +3 -2
  68. package/chrome/useChromeSurfaces.d.ts +1 -1
  69. package/chrome/useContextMenuSurface.d.ts +1 -1
  70. package/chrome/useHistoryControls.d.ts +3 -3
  71. package/chrome/usePageControls.d.ts +8 -8
  72. package/chrome/useZoomControls.d.ts +5 -1
  73. package/commands/command.d.ts +11 -0
  74. package/commands/commandTokens.d.ts +61 -0
  75. package/commands/documentCommands.d.ts +2 -0
  76. package/commands/historyCommands.d.ts +3 -0
  77. package/commands/index.d.ts +11 -0
  78. package/commands/layerCommands.d.ts +20 -0
  79. package/commands/pageCommands.d.ts +12 -0
  80. package/commands/selectionCommands.d.ts +12 -0
  81. package/commands/shapeCommands.d.ts +8 -0
  82. package/commands/toolCommands.d.ts +2 -0
  83. package/commands/viewCommands.d.ts +10 -0
  84. package/contracts/canvasProductControllerContracts.d.ts +32 -0
  85. package/{core/product-controller → controller}/canvasProductController.d.ts +27 -55
  86. package/controller/index.d.ts +3 -0
  87. package/{core/product-controller/productLayerTree.d.ts → controller/layerTree.d.ts} +1 -1
  88. package/index.d.ts +31 -27
  89. package/index.mjs +88 -111
  90. package/package.json +2 -2
  91. package/plugins/host/image/api/imageHostApi.d.ts +11 -0
  92. package/plugins/host/image/api/imageHostApiContract.d.ts +60 -0
  93. package/{features → plugins/host}/image/asset/imageAssetService.d.ts +3 -2
  94. package/{features → plugins/host}/image/asset/imageBlobStore.d.ts +2 -2
  95. package/{features → plugins/host}/image/asset/imageFileHelpers.d.ts +1 -1
  96. package/{features → plugins/host}/image/asset/svgImageAssetInliner.d.ts +1 -1
  97. package/{features → plugins/host}/image/import/ImageImportController.d.ts +2 -2
  98. package/{features → plugins/host}/image/index.d.ts +4 -4
  99. package/plugins/host/image/plugin.d.ts +1 -0
  100. package/{features → plugins/host}/image/smudge/imageSmudgeHostActions.d.ts +3 -3
  101. package/{features → plugins/host}/image/toolbar/imageHostActions.d.ts +8 -24
  102. package/{features → plugins/host}/image/toolbar/imageToolbarHostBridge.d.ts +2 -2
  103. package/{features → plugins/host}/text/link/TextLinkHoverPopover.d.ts +1 -1
  104. package/plugins/host/text/textHostPlugin.d.ts +5 -0
  105. package/plugins/host/text/textSvgAssetInliner.d.ts +3 -0
  106. package/plugins/host/text/textSvgAssetPlugin.d.ts +2 -0
  107. package/{_vendor/plugin-builtin-import-host → plugins/runtime/import-host}/CanvasImportHost.d.ts +2 -1
  108. package/plugins/runtime/import-host/capability.d.ts +1 -0
  109. package/plugins/runtime/import-host/plugin.d.ts +1 -0
  110. package/plugins/runtime/keyboard-shortcuts/index.d.ts +1 -0
  111. package/plugins/runtime/keyboard-shortcuts/plugin.d.ts +1 -0
  112. package/plugins/runtime/keyboard-shortcuts/useCanvasKeyboardShortcuts.d.ts +6 -0
  113. package/plugins/runtime/tool-actions/capability.d.ts +1 -0
  114. package/{_vendor/plugin-builtin-tool-actions → plugins/runtime/tool-actions}/index.d.ts +1 -1
  115. package/plugins/runtime/tool-actions/plugin.d.ts +1 -0
  116. package/plugins/runtime/tool-actions/toolActions.d.ts +2 -0
  117. package/plugins/standard/clipboard/chrome.d.ts +2 -0
  118. package/plugins/standard/clipboard/contextMenu.d.ts +2 -0
  119. package/plugins/standard/clipboard/plugin.d.ts +1 -0
  120. package/plugins/standard/clipboard/shortcuts.d.ts +5 -0
  121. package/plugins/{standardCanvasKitPlugins.d.ts → standard/createStandardCanvasKitPlugins.d.ts} +2 -3
  122. package/plugins/standard/selection/actions.d.ts +21 -0
  123. package/plugins/standard/selection/chrome.d.ts +2 -0
  124. package/plugins/standard/selection/contextMenu.d.ts +2 -0
  125. package/plugins/standard/selection/plugin.d.ts +1 -0
  126. package/plugins/standard/selection/toolbar.d.ts +2 -0
  127. package/plugins/standard/tool-ui/contextMenu.d.ts +2 -0
  128. package/plugins/standard/tool-ui/plugin.d.ts +1 -0
  129. package/plugins/standard/tool-ui/toolbar.d.ts +2 -0
  130. package/plugins/standard/view/actions.d.ts +5 -0
  131. package/plugins/standard/view/chrome.d.ts +2 -0
  132. package/plugins/standard/view/contextMenu.d.ts +2 -0
  133. package/plugins/standard/view/plugin.d.ts +1 -0
  134. package/react/CanvasKitRoot.d.ts +3 -2
  135. package/react/useCanvasProductControllerLifecycle.d.ts +9 -0
  136. package/runtime/canvasKitActionContext.d.ts +17 -0
  137. package/runtime/canvasKitActionExecutor.d.ts +12 -0
  138. package/runtime/canvasKitCommandExecutor.d.ts +12 -3
  139. package/runtime/canvasKitPluginContracts.d.ts +13 -19
  140. package/{_vendor/canvas-plugin-sdk/lifecycle.d.ts → runtime/canvasKitPluginLifecycle.d.ts} +6 -5
  141. package/runtime/canvasKitPluginSetup.d.ts +9 -6
  142. package/{_vendor/canvas-plugin-sdk/pluginUi.d.ts → runtime/canvasKitPluginUi.d.ts} +5 -5
  143. package/runtime/canvasKitRuntime.d.ts +14 -5
  144. package/runtime/canvasKitRuntimeContracts.d.ts +8 -7
  145. package/runtime/canvasPluginGraph.d.ts +15 -0
  146. package/runtime/createCanvasKitCommandAction.d.ts +10 -0
  147. package/runtime/createCanvasKitEditor.d.ts +7 -0
  148. package/{core/runtime/runtimeContracts.d.ts → runtime/persistenceContracts.d.ts} +1 -6
  149. package/runtime/persistenceCoordinator.d.ts +1 -1
  150. package/{core/runtime/productAssets.d.ts → runtime/productAssetResolvers.d.ts} +11 -2
  151. package/runtime/productServiceRegistry.d.ts +8 -0
  152. package/runtime/registries/actionRegistry.d.ts +5 -0
  153. package/runtime/registries/chromeRegistry.d.ts +2 -0
  154. package/runtime/registries/contextMenuRegistry.d.ts +5 -0
  155. package/runtime/registries/exportRegistry.d.ts +2 -0
  156. package/runtime/registries/importRegistry.d.ts +2 -0
  157. package/runtime/registries/index.d.ts +7 -0
  158. package/runtime/registries/productApiRegistry.d.ts +5 -0
  159. package/runtime/registries/toolbarRegistry.d.ts +5 -0
  160. package/_vendor/canvas-plugin-sdk/actionRegistry.d.ts +0 -7
  161. package/_vendor/canvas-plugin-sdk/chromeRegistry.d.ts +0 -15
  162. package/_vendor/canvas-plugin-sdk/contextMenuRegistry.d.ts +0 -11
  163. package/_vendor/canvas-plugin-sdk/exportRegistry.d.ts +0 -9
  164. package/_vendor/canvas-plugin-sdk/toolbarRegistry.d.ts +0 -18
  165. package/_vendor/plugin-builtin-clipboard/clipboardChromeContributions.d.ts +0 -2
  166. package/_vendor/plugin-builtin-clipboard/clipboardContextMenuContributions.d.ts +0 -2
  167. package/_vendor/plugin-builtin-clipboard/index.d.ts +0 -3
  168. package/_vendor/plugin-builtin-clipboard/plugin.d.ts +0 -1
  169. package/_vendor/plugin-builtin-import-host/capability.d.ts +0 -1
  170. package/_vendor/plugin-builtin-import-host/plugin.d.ts +0 -1
  171. package/_vendor/plugin-builtin-tool-actions/capability.d.ts +0 -1
  172. package/_vendor/plugin-builtin-tool-actions/plugin.d.ts +0 -1
  173. package/_vendor/plugin-builtin-tool-actions/toolActions.d.ts +0 -2
  174. package/_vendor/plugin-connector/canvasRender.d.ts +0 -2
  175. package/_vendor/plugin-connector/connectorBindingUtil.d.ts +0 -28
  176. package/_vendor/plugin-connector/connectorBindings.d.ts +0 -8
  177. package/_vendor/plugin-connector/connectorGeometry.d.ts +0 -70
  178. package/_vendor/plugin-connector/connectorHandles.d.ts +0 -12
  179. package/_vendor/plugin-connector/connectorInteractions.d.ts +0 -3
  180. package/_vendor/plugin-connector/connectorMarker.d.ts +0 -7
  181. package/_vendor/plugin-connector/connectorModel.d.ts +0 -43
  182. package/_vendor/plugin-connector/connectorPortInteraction.d.ts +0 -13
  183. package/_vendor/plugin-connector/connectorPorts.d.ts +0 -23
  184. package/_vendor/plugin-connector/connectorRuntime.d.ts +0 -62
  185. package/_vendor/plugin-connector/connectorShapeUtil.d.ts +0 -29
  186. package/_vendor/plugin-connector/connectorTool.d.ts +0 -4
  187. package/_vendor/plugin-connector/constants.d.ts +0 -17
  188. package/_vendor/plugin-connector/editorRuntime.d.ts +0 -7
  189. package/_vendor/plugin-connector/feature.d.ts +0 -4
  190. package/_vendor/plugin-connector/index.d.ts +0 -18
  191. package/_vendor/plugin-connector/orthogonalRoute.d.ts +0 -9
  192. package/_vendor/plugin-connector/productRuntime.d.ts +0 -2
  193. package/_vendor/plugin-connector/quickConnect.d.ts +0 -28
  194. package/_vendor/plugin-connector/types.d.ts +0 -51
  195. package/_vendor/plugin-packaging/api.d.ts +0 -74
  196. package/_vendor/plugin-packaging/canvasRender.d.ts +0 -2
  197. package/_vendor/plugin-packaging/editorRuntime.d.ts +0 -2
  198. package/_vendor/plugin-packaging/feature.d.ts +0 -2
  199. package/_vendor/plugin-packaging/index.d.ts +0 -19
  200. package/_vendor/plugin-packaging/packagingArtwork.d.ts +0 -5
  201. package/_vendor/plugin-packaging/packagingDxf.d.ts +0 -9
  202. package/_vendor/plugin-packaging/packagingGeometry.d.ts +0 -74
  203. package/_vendor/plugin-packaging/packagingInteractions.d.ts +0 -2
  204. package/_vendor/plugin-packaging/packagingPdfExporter.d.ts +0 -25
  205. package/_vendor/plugin-packaging/packagingRuntime.d.ts +0 -11
  206. package/_vendor/plugin-packaging/packagingShapeUtil.d.ts +0 -34
  207. package/_vendor/plugin-packaging/packagingStyle.d.ts +0 -10
  208. package/_vendor/plugin-packaging/packagingSvgExporter.d.ts +0 -7
  209. package/_vendor/plugin-packaging/productRuntime.d.ts +0 -2
  210. package/_vendor/plugin-packaging/types.d.ts +0 -168
  211. package/_vendor/plugin-packaging/validation.d.ts +0 -3
  212. package/controller/canvasKitController.d.ts +0 -28
  213. package/core/index.d.ts +0 -7
  214. package/core/product-controller/index.d.ts +0 -2
  215. package/core/runtime/productEditor.d.ts +0 -3
  216. package/core/runtime/productServices.d.ts +0 -20
  217. package/es-DocrZgUh.mjs +0 -2
  218. package/features/context-menu/contextMenuRuntime.d.ts +0 -13
  219. package/features/image/controller/imageProductController.d.ts +0 -27
  220. package/features/image/imageHostPlugin.d.ts +0 -1
  221. package/features/image/smudge/imageSmudgeTypes.d.ts +0 -25
  222. package/features/text/textHostPlugin.d.ts +0 -5
  223. package/features/text/textSvgAssetInliner.d.ts +0 -3
  224. package/features/text/textSvgAssetPlugin.d.ts +0 -2
  225. package/react/useCanvasKitControllerLifecycle.d.ts +0 -8
  226. /package/_vendor/{plugin-builtin-export → plugin-runtime-export}/blobDataUrl.d.ts +0 -0
  227. /package/_vendor/{plugin-builtin-export → plugin-runtime-export}/pngExport.d.ts +0 -0
  228. /package/_vendor/{plugin-builtin-export → plugin-runtime-export}/svgExport.d.ts +0 -0
  229. /package/{_vendor/plugin-builtin-import-host → plugins/runtime/import-host}/index.d.ts +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yuzhouu/canvas-kit",
3
- "version": "0.1.11",
4
- "description": "Land canvas packaged as an all-in-one React canvas kit and typed API surface.",
3
+ "version": "0.1.13",
4
+ "description": "Extensible Land canvas runtime, standard React product profile, and typed API surface.",
5
5
  "type": "module",
6
6
  "main": "./index.mjs",
7
7
  "module": "./index.mjs",
@@ -0,0 +1,11 @@
1
+ import type { Editor } from "../../../../_vendor/canvas-core/index";
2
+ import type { ProductServiceRegistry } from "../../../../_vendor/canvas-product-contracts/index";
3
+ import { canvasKitImageHostApiToken, type CanvasKitImageHostApi } from "./imageHostApiContract";
4
+ export interface CanvasKitImageHostApiRuntimeOptions {
5
+ flushSnapshot?: () => Promise<void>;
6
+ }
7
+ export declare function createCanvasKitImageHostApi({ editor, flushSnapshot, services, }: CanvasKitImageHostApiRuntimeOptions & {
8
+ editor: Editor;
9
+ services: ProductServiceRegistry;
10
+ }): CanvasKitImageHostApi | null;
11
+ export { canvasKitImageHostApiToken };
@@ -0,0 +1,60 @@
1
+ import type { AssetId, ShapeId, Vec } from "../../../../_vendor/canvas-core/index";
2
+ import type { ImageShapeCrop, ImageSmudgeBrush, ImageSmudgeStroke } from "../../../../_vendor/plugin-image/index";
3
+ export type CanvasKitImageInsertStrategy = "auto" | "copy" | "link";
4
+ export type CanvasKitImageInsertSource = {
5
+ type: "file";
6
+ file: File;
7
+ } | {
8
+ type: "blob";
9
+ blob: Blob;
10
+ name?: string;
11
+ mimeType?: string;
12
+ originalUrl?: string;
13
+ } | {
14
+ type: "url";
15
+ url: string;
16
+ name?: string;
17
+ altText?: string;
18
+ };
19
+ export interface CanvasKitImageInsertSize {
20
+ w: number;
21
+ h: number;
22
+ }
23
+ export interface CanvasKitImageInsertInput {
24
+ source: CanvasKitImageInsertSource;
25
+ pagePoint?: Vec;
26
+ size?: CanvasKitImageInsertSize;
27
+ strategy?: CanvasKitImageInsertStrategy;
28
+ }
29
+ export interface CanvasKitImageReplaceInput {
30
+ file: File;
31
+ }
32
+ export interface CanvasKitImageSmudgeConfirmPayload {
33
+ shapeId: ShapeId;
34
+ sourceAssetId: AssetId | null;
35
+ imageBlob: Blob;
36
+ maskBlob?: Blob;
37
+ width: number;
38
+ height: number;
39
+ crop: ImageShapeCrop | null;
40
+ strokes: ImageSmudgeStroke[];
41
+ }
42
+ export interface CanvasKitImageSmudgeController {
43
+ start(input?: {
44
+ shapeId?: ShapeId;
45
+ brush?: Partial<ImageSmudgeBrush>;
46
+ }): boolean;
47
+ setBrush(brush: Partial<ImageSmudgeBrush>): boolean;
48
+ cancel(): void;
49
+ confirm(input?: {
50
+ replace?: boolean;
51
+ }): Promise<CanvasKitImageSmudgeConfirmPayload | null>;
52
+ isActive(): boolean;
53
+ }
54
+ export interface CanvasKitImageHostApi {
55
+ insert(input: CanvasKitImageInsertInput): Promise<ShapeId | null>;
56
+ replaceSelection(input: CanvasKitImageReplaceInput): Promise<boolean>;
57
+ downloadSelectionOriginal(): Promise<void>;
58
+ smudge: CanvasKitImageSmudgeController;
59
+ }
60
+ export declare const canvasKitImageHostApiToken: import("../../../../_vendor/canvas-product-contracts/index").ProductApiToken<CanvasKitImageHostApi>;
@@ -1,4 +1,5 @@
1
- import { type ProductAssetResolverService, type ProductServiceFactory } from "../../../core";
1
+ import { type ProductServiceFactory } from "../../../../_vendor/canvas-product-contracts/index";
2
+ import type { ProductAssetResolverService } from "../../../../runtime/productAssetResolvers";
2
3
  import { type ImageObjectUrlStore } from "./imageBlobStore";
3
4
  export interface ImageAssetService extends ProductAssetResolverService {
4
5
  objectUrls: ImageObjectUrlStore;
@@ -6,5 +7,5 @@ export interface ImageAssetService extends ProductAssetResolverService {
6
7
  export interface ImageAssetServiceOptions {
7
8
  flushSnapshot?: () => Promise<void>;
8
9
  }
9
- export declare const imageAssetServiceToken: import("../../../_vendor/canvas-plugin-sdk/index").ProductServiceToken<ImageAssetService>;
10
+ export declare const imageAssetServiceToken: import("../../../../_vendor/canvas-product-contracts/index").ProductServiceToken<ImageAssetService>;
10
11
  export declare function localImageAssetService({ flushSnapshot, }?: ImageAssetServiceOptions): ProductServiceFactory<ImageAssetService>;
@@ -1,5 +1,5 @@
1
- import type { AssetId, Editor } from "../../../_vendor/canvas-core/index";
2
- export { readBlobAsDataUrl } from "../../../_vendor/plugin-builtin-export/index";
1
+ import type { AssetId, Editor } from "../../../../_vendor/canvas-core/index";
2
+ export { readBlobAsDataUrl } from "../../../../_vendor/plugin-runtime-export/index";
3
3
  export interface ImageBlobWriteResult {
4
4
  storageKey: string;
5
5
  }
@@ -1,4 +1,4 @@
1
- import type { ImageAssetSource } from "../../../_vendor/plugin-image/index";
1
+ import type { ImageAssetSource } from "../../../../_vendor/plugin-image/index";
2
2
  export interface PreparedImageAssetInput {
3
3
  name: string;
4
4
  source: ImageAssetSource;
@@ -1,3 +1,3 @@
1
- import { type SvgAssetInliner } from "../../../_vendor/plugin-builtin-export/index";
1
+ import { type SvgAssetInliner } from "../../../../_vendor/plugin-runtime-export/index";
2
2
  import type { ImageAssetService } from "./imageAssetService";
3
3
  export declare function createImageSvgAssetInliner(imageAssetService: ImageAssetService): SvgAssetInliner;
@@ -1,5 +1,5 @@
1
- import type { Editor } from "../../../_vendor/canvas-core/index";
2
- import type { CanvasImportRegistry } from "../../../_vendor/canvas-plugin-sdk/index";
1
+ import type { Editor } from "../../../../_vendor/canvas-core/index";
2
+ import { type CanvasImportRegistry } from "../../../../_vendor/canvas-product-contracts/index";
3
3
  import type { ImageAssetService } from "../asset/imageAssetService";
4
4
  import type { ImageToolbarHostBridge } from "../toolbar/imageToolbarHostBridge";
5
5
  export declare const ImageImportController: import("react").NamedExoticComponent<{
@@ -1,7 +1,7 @@
1
1
  export { ImageImportController } from "./import/ImageImportController";
2
- export { createImageProductController, imageProductControllerToken, } from "./controller/imageProductController";
3
- export type { ImageInsertInput, ImageProductController, ImageProductControllerRuntimeOptions, ImageReplaceInput, } from "./controller/imageProductController";
4
- export type { ImageShapeCrop, ImageSmudgeBrush, ImageSmudgeConfirmPayload, ImageSmudgeController, ImageSmudgeStroke, ImageSmudgeStrokePoint, } from "./smudge/imageSmudgeTypes";
2
+ export { canvasKitImageHostApiToken, createCanvasKitImageHostApi, } from "./api/imageHostApi";
3
+ export type { CanvasKitImageHostApiRuntimeOptions, } from "./api/imageHostApi";
4
+ export type { CanvasKitImageHostApi, CanvasKitImageInsertInput, CanvasKitImageInsertSize, CanvasKitImageInsertSource, CanvasKitImageInsertStrategy, CanvasKitImageReplaceInput, CanvasKitImageSmudgeConfirmPayload, CanvasKitImageSmudgeController, } from "./api/imageHostApiContract";
5
5
  export { imageAssetServiceToken, localImageAssetService, } from "./asset/imageAssetService";
6
6
  export type { ImageAssetService } from "./asset/imageAssetService";
7
7
  export { createImageToolbarHostBridge, ImageToolbarHostBridge, imageToolbarHostBridgeService, imageToolbarHostBridgeToken, } from "./toolbar/imageToolbarHostBridge";
@@ -9,7 +9,7 @@ export type { ImageToolbarHostBridgeHandlers } from "./toolbar/imageToolbarHostB
9
9
  export { cleanupUnreferencedImageBlobs, createImageObjectUrlStore, createImageStorageKey, deleteImageBlob, getAllImageBlobStorageKeys, getLocalImageAssetStorageKey, getRemoteImageAssetUrl, getReferencedImageStorageKeys, readImageBlob, readImageBlobAsDataUrl, writeImageBlob, } from "./asset/imageBlobStore";
10
10
  export type { ImageBlobWriteResult, ImageObjectUrlStore, } from "./asset/imageBlobStore";
11
11
  export { downloadSelectedImageOriginal, createImageToolbarActions, getFirstImageFile, insertImageIntoEditor, replaceSelectedImageFromFile, } from "./toolbar/imageHostActions";
12
- export type { ImageInsertSource, ImageInsertSize, ImageInsertStrategy, InsertImageInput, ReplaceSelectedImageFileInput, } from "./toolbar/imageHostActions";
12
+ export type { InsertImageInput, ReplaceSelectedImageFileInput, } from "./toolbar/imageHostActions";
13
13
  export { confirmImageSmudgeSession } from "./smudge/imageSmudgeHostActions";
14
14
  export type { ConfirmImageSmudgeSessionInput } from "./smudge/imageSmudgeHostActions";
15
15
  export { createImageSvgAssetInliner } from "./asset/svgImageAssetInliner";
@@ -0,0 +1 @@
1
+ export declare const ImageHostPlugin: import("../../..").CanvasPlugin;
@@ -1,10 +1,10 @@
1
- import type { Editor } from "../../../_vendor/canvas-core/index";
1
+ import type { Editor } from "../../../../_vendor/canvas-core/index";
2
+ import type { CanvasKitImageSmudgeConfirmPayload } from "../api/imageHostApiContract";
2
3
  import { type ImageObjectUrlStore } from "../asset/imageBlobStore";
3
- import type { ImageSmudgeConfirmPayload } from "./imageSmudgeTypes";
4
4
  export interface ConfirmImageSmudgeSessionInput {
5
5
  editor: Editor;
6
6
  imageObjectUrls: ImageObjectUrlStore;
7
7
  flushSnapshot?: () => Promise<void>;
8
8
  replace?: boolean;
9
9
  }
10
- export declare function confirmImageSmudgeSession({ editor, imageObjectUrls, flushSnapshot, replace, }: ConfirmImageSmudgeSessionInput): Promise<ImageSmudgeConfirmPayload | null>;
10
+ export declare function confirmImageSmudgeSession({ editor, imageObjectUrls, flushSnapshot, replace, }: ConfirmImageSmudgeSessionInput): Promise<CanvasKitImageSmudgeConfirmPayload | null>;
@@ -1,34 +1,18 @@
1
- import { type CanvasAction } from "../../../_vendor/canvas-plugin-sdk/index";
2
- import { type AssetId, type Editor, type ShapeId, Vec } from "../../../_vendor/canvas-core/index";
3
- import { type ImageAssetRecord, type ImageShapeRecord } from "../../../_vendor/plugin-image/index";
1
+ import { type CanvasAction } from "../../../../_vendor/canvas-product-contracts/index";
2
+ import { type AssetId, type Editor, type ShapeId, Vec } from "../../../../_vendor/canvas-core/index";
3
+ import { type ImageAssetRecord, type ImageShapeRecord } from "../../../../_vendor/plugin-image/index";
4
+ import type { CanvasKitImageInsertSize, CanvasKitImageInsertSource, CanvasKitImageInsertStrategy } from "../api/imageHostApiContract";
4
5
  import { type ImageObjectUrlStore } from "../asset/imageBlobStore";
5
6
  import type { ImageToolbarHostBridge } from "./imageToolbarHostBridge";
6
- import { type LocalImageBlobInput } from "../asset/imageFileHelpers";
7
7
  export { getFirstImageFile } from "../asset/imageFileHelpers";
8
- export type ImageInsertStrategy = "auto" | "copy" | "link";
9
- export type ImageInsertSource = {
10
- type: "file";
11
- file: File;
12
- } | ({
13
- type: "blob";
14
- } & LocalImageBlobInput) | {
15
- type: "url";
16
- url: string;
17
- name?: string;
18
- altText?: string;
19
- };
20
- export interface ImageInsertSize {
21
- w: number;
22
- h: number;
23
- }
24
8
  export interface InsertImageInput {
25
9
  editor: Editor;
26
10
  imageObjectUrls: ImageObjectUrlStore;
27
- source: ImageInsertSource;
11
+ source: CanvasKitImageInsertSource;
28
12
  pagePoint?: Vec;
29
- size?: ImageInsertSize;
13
+ size?: CanvasKitImageInsertSize;
30
14
  flushSnapshot?: () => Promise<void>;
31
- strategy?: ImageInsertStrategy;
15
+ strategy?: CanvasKitImageInsertStrategy;
32
16
  }
33
17
  export interface ReplaceSelectedImageFileInput {
34
18
  editor: Editor;
@@ -46,7 +30,7 @@ export declare function localizeRemoteImageAsset({ assetId, editor, flushSnapsho
46
30
  editor: Editor;
47
31
  flushSnapshot?: () => Promise<void>;
48
32
  imageObjectUrls: ImageObjectUrlStore;
49
- source: Extract<ImageInsertSource, {
33
+ source: Extract<CanvasKitImageInsertSource, {
50
34
  type: "url";
51
35
  }>;
52
36
  }): Promise<void>;
@@ -1,4 +1,4 @@
1
- import { type ProductServiceFactory } from "../../../core";
1
+ import { type ProductServiceFactory } from "../../../../_vendor/canvas-product-contracts/index";
2
2
  export interface ImageToolbarHostBridgeHandlers {
3
3
  openInsertFilePicker(): void;
4
4
  openReplaceFilePicker(): void;
@@ -10,5 +10,5 @@ export declare class ImageToolbarHostBridge {
10
10
  openReplaceFilePicker(): void;
11
11
  }
12
12
  export declare function createImageToolbarHostBridge(): ImageToolbarHostBridge;
13
- export declare const imageToolbarHostBridgeToken: import("../../../_vendor/canvas-plugin-sdk/index").ProductServiceToken<ImageToolbarHostBridge>;
13
+ export declare const imageToolbarHostBridgeToken: import("../../../../_vendor/canvas-product-contracts/index").ProductServiceToken<ImageToolbarHostBridge>;
14
14
  export declare function imageToolbarHostBridgeService(): ProductServiceFactory<ImageToolbarHostBridge>;
@@ -1,5 +1,5 @@
1
1
  import { type ReactNode } from "react";
2
- import type { TextLinkPopoverPresenter } from "../../../_vendor/plugin-text/index";
2
+ import type { TextLinkPopoverPresenter } from "../../../../_vendor/plugin-text/index";
3
3
  export interface TextLinkHoverPopoverIcons {
4
4
  open: ReactNode;
5
5
  }
@@ -0,0 +1,5 @@
1
+ import { type TextLinkPopoverPresenter } from "../../../_vendor/plugin-text/index";
2
+ import { type CanvasPlugin } from "../../../runtime/canvasKitPluginContracts";
3
+ export declare function createTextHostPlugin({ presenter, }: {
4
+ presenter: TextLinkPopoverPresenter;
5
+ }): CanvasPlugin;
@@ -0,0 +1,3 @@
1
+ import { type TextFontCatalog } from "../../../_vendor/plugin-text/index";
2
+ import { type SvgAssetInliner } from "../../../_vendor/plugin-runtime-export/index";
3
+ export declare function createTextSvgAssetInliner(fontCatalog: TextFontCatalog): SvgAssetInliner;
@@ -0,0 +1,2 @@
1
+ import { type CanvasPlugin } from "../../../runtime/canvasKitPluginContracts";
2
+ export declare function createTextSvgAssetPlugin(): CanvasPlugin;
@@ -1,3 +1,4 @@
1
- import type { CanvasImportPreview, CanvasPluginComponentProps } from "../canvas-plugin-sdk/index";
1
+ import { type CanvasImportPreview } from "../../../_vendor/canvas-product-contracts/index";
2
+ import type { CanvasPluginComponentProps } from "../../../runtime/canvasKitPluginContracts";
2
3
  export declare function CanvasImportHost({ editor, getHostElement, imports, }: CanvasPluginComponentProps): null;
3
4
  export declare function getImportPreview(dataTransfer: DataTransfer | null): CanvasImportPreview;
@@ -0,0 +1 @@
1
+ export declare const canvasImportHostCapability: import("../../../_vendor/canvas-plugin-sdk/index").CanvasPluginValueToken<boolean>;
@@ -0,0 +1 @@
1
+ export declare const ImportHostPlugin: import("../../..").CanvasPlugin;
@@ -0,0 +1 @@
1
+ export { KeyboardShortcutHostPlugin } from "./plugin";
@@ -0,0 +1 @@
1
+ export declare const KeyboardShortcutHostPlugin: import("../../..").CanvasPlugin;
@@ -0,0 +1,6 @@
1
+ import type { Editor } from "../../../_vendor/canvas-core/index";
2
+ import type { ExecuteCanvasKitAction } from "../../../runtime/canvasKitActionExecutor";
3
+ export declare function useCanvasKeyboardShortcuts({ editor, executeAction, }: {
4
+ editor: Editor;
5
+ executeAction: ExecuteCanvasKitAction;
6
+ }): void;
@@ -0,0 +1 @@
1
+ export declare const canvasToolActionsCapability: import("../../../_vendor/canvas-plugin-sdk/index").CanvasPluginValueToken<true>;
@@ -1,2 +1,2 @@
1
1
  export { canvasToolActionsCapability } from "./capability";
2
- export { BuiltinToolActionsPlugin } from "./plugin";
2
+ export { DefaultToolActionsPlugin } from "./plugin";
@@ -0,0 +1 @@
1
+ export declare const DefaultToolActionsPlugin: import("../../../_vendor/canvas-plugin-sdk/index").CanvasPlugin<(context: import("../../../_vendor/canvas-plugin-sdk/index").CanvasPluginSetupContext) => void>;
@@ -0,0 +1,2 @@
1
+ import { type CanvasAction } from "../../../_vendor/canvas-product-contracts/index";
2
+ export declare const toolActions: readonly CanvasAction[];
@@ -0,0 +1,2 @@
1
+ import { type ChromeContribution } from "../../../_vendor/canvas-product-contracts/index";
2
+ export declare const clipboardChromeContributions: readonly ChromeContribution[];
@@ -0,0 +1,2 @@
1
+ import { type ContextMenuContribution } from "../../../_vendor/canvas-product-contracts/index";
2
+ export declare const clipboardContextMenuContributions: readonly ContextMenuContribution[];
@@ -0,0 +1 @@
1
+ export declare const StandardClipboardPlugin: import("../../../_vendor/canvas-plugin-sdk/index").CanvasPlugin<(context: import("../../../_vendor/canvas-plugin-sdk/index").CanvasPluginSetupContext) => void>;
@@ -0,0 +1,5 @@
1
+ import type { KeyboardShortcutInput } from "../../../_vendor/canvas-core/index";
2
+ export declare const clipboardActionShortcuts: readonly {
3
+ actionId: string;
4
+ shortcut: KeyboardShortcutInput;
5
+ }[];
@@ -1,8 +1,7 @@
1
- import { type TextPluginOptions } from "../_vendor/plugin-text/index";
2
- import type { CanvasPlugin } from "../runtime/canvasKitPluginContracts";
1
+ import { type TextPluginOptions } from "../../_vendor/plugin-text/index";
2
+ import type { CanvasPlugin } from "../../runtime/canvasKitPluginContracts";
3
3
  export interface CanvasKitStandardPluginOptions {
4
4
  arrow?: boolean;
5
- connector?: boolean;
6
5
  draw?: boolean;
7
6
  eraser?: boolean;
8
7
  frame?: boolean;
@@ -0,0 +1,21 @@
1
+ import { type CanvasAction, type CanvasActionContext } from "../../../_vendor/canvas-product-contracts/index";
2
+ import type { KeyboardShortcutInput } from "../../../_vendor/canvas-core/index";
3
+ export declare const SYSTEM_SELECTION_DELETE_ACTION_ID: "system.selection.delete";
4
+ export declare const SYSTEM_SELECTION_DUPLICATE_ACTION_ID: "system.selection.duplicate";
5
+ export declare const SYSTEM_SELECTION_SELECT_ALL_ACTION_ID: "system.selection.select-all";
6
+ export declare const SYSTEM_SELECTION_RESET_ROTATION_ACTION_ID: "system.selection.reset-rotation";
7
+ export declare const SYSTEM_SELECTION_FLIP_HORIZONTAL_ACTION_ID: "system.selection.flip-horizontal";
8
+ export declare const SYSTEM_SELECTION_FLIP_VERTICAL_ACTION_ID: "system.selection.flip-vertical";
9
+ export declare const SYSTEM_SELECTION_SEND_TO_BACK_ACTION_ID: "layer.send-to-back";
10
+ export declare const SYSTEM_SELECTION_SEND_BACKWARD_ACTION_ID: "layer.send-backward";
11
+ export declare const SYSTEM_SELECTION_BRING_FORWARD_ACTION_ID: "layer.bring-forward";
12
+ export declare const SYSTEM_SELECTION_BRING_TO_FRONT_ACTION_ID: "layer.bring-to-front";
13
+ export declare const SYSTEM_SELECTION_SET_OPACITY_ACTION_ID: "system.selection.set-opacity";
14
+ export declare const SYSTEM_SELECTION_ALIGN_ACTION_ID: "system.selection.align";
15
+ export declare const SYSTEM_SELECTION_DISTRIBUTE_ACTION_ID: "system.selection.distribute";
16
+ export declare const selectionActionShortcuts: readonly {
17
+ actionId: string;
18
+ shortcut: KeyboardShortcutInput;
19
+ }[];
20
+ export declare function isSingleSelectedFrameChild(context: CanvasActionContext): boolean;
21
+ export declare const selectionActions: readonly CanvasAction[];
@@ -0,0 +1,2 @@
1
+ import { type ChromeContribution } from "../../../_vendor/canvas-product-contracts/index";
2
+ export declare const selectionChromeContributions: readonly ChromeContribution[];
@@ -0,0 +1,2 @@
1
+ import { type ContextMenuContribution } from "../../../_vendor/canvas-product-contracts/index";
2
+ export declare const selectionContextMenuContributions: readonly ContextMenuContribution[];
@@ -0,0 +1 @@
1
+ export declare const StandardSelectionPlugin: import("../../../_vendor/canvas-plugin-sdk/index").CanvasPlugin<(context: import("../../../_vendor/canvas-plugin-sdk/index").CanvasPluginSetupContext) => void>;
@@ -0,0 +1,2 @@
1
+ import { type ToolbarContribution } from "../../../_vendor/canvas-product-contracts/index";
2
+ export declare const selectionToolbarContributions: readonly ToolbarContribution[];
@@ -0,0 +1,2 @@
1
+ import type { ContextMenuContribution } from "../../../_vendor/canvas-product-contracts/index";
2
+ export declare const toolContextMenuContributions: readonly ContextMenuContribution[];
@@ -0,0 +1 @@
1
+ export declare const StandardToolUiPlugin: import("../../../_vendor/canvas-plugin-sdk/index").CanvasPlugin<(context: import("../../../_vendor/canvas-plugin-sdk/index").CanvasPluginSetupContext) => void>;
@@ -0,0 +1,2 @@
1
+ import { type ToolbarContribution } from "../../../_vendor/canvas-product-contracts/index";
2
+ export declare const toolToolbarContributions: readonly ToolbarContribution[];
@@ -0,0 +1,5 @@
1
+ import type { CanvasAction } from "../../../_vendor/canvas-product-contracts/index";
2
+ export declare const SYSTEM_VIEW_ZOOM_IN_ACTION_ID: "system.view.zoom-in";
3
+ export declare const SYSTEM_VIEW_ZOOM_OUT_ACTION_ID: "system.view.zoom-out";
4
+ export declare const SYSTEM_VIEW_RESET_ZOOM_ACTION_ID: "system.view.reset-zoom";
5
+ export declare const viewActions: readonly CanvasAction[];
@@ -0,0 +1,2 @@
1
+ import { type ChromeContribution } from "../../../_vendor/canvas-product-contracts/index";
2
+ export declare const viewChromeContributions: readonly ChromeContribution[];
@@ -0,0 +1,2 @@
1
+ import { type ContextMenuContribution } from "../../../_vendor/canvas-product-contracts/index";
2
+ export declare const viewContextMenuContributions: readonly ContextMenuContribution[];
@@ -0,0 +1 @@
1
+ export declare const StandardViewPlugin: import("../../../_vendor/canvas-plugin-sdk/index").CanvasPlugin<(context: import("../../../_vendor/canvas-plugin-sdk/index").CanvasPluginSetupContext) => void>;
@@ -1,8 +1,9 @@
1
- import type { CanvasKitController } from "../controller/canvasKitController";
1
+ import type { CanvasKitToolId } from "../canvasKitTools";
2
+ import type { CanvasProductController } from "../controller";
2
3
  import type { CanvasKitRuntime } from "../runtime/canvasKitRuntimeContracts";
3
4
  export interface CanvasKitRootProps {
4
5
  runtime: CanvasKitRuntime;
5
- onControllerReady?: (controller: CanvasKitController) => void;
6
+ onControllerReady?: (controller: CanvasProductController<CanvasKitToolId>) => void;
6
7
  onControllerDispose?: () => void;
7
8
  exposeControllerOnWindow?: boolean;
8
9
  windowKey?: string;
@@ -0,0 +1,9 @@
1
+ import type { CanvasKitToolId } from "../canvasKitTools";
2
+ import type { CanvasProductController } from "../controller";
3
+ export declare function useCanvasProductControllerLifecycle({ controller, exposeControllerOnWindow, onControllerDispose, onControllerReady, windowKey, }: {
4
+ controller: CanvasProductController<CanvasKitToolId>;
5
+ exposeControllerOnWindow: boolean;
6
+ onControllerDispose?: () => void;
7
+ onControllerReady?: (controller: CanvasProductController<CanvasKitToolId>) => void;
8
+ windowKey: string;
9
+ }): void;
@@ -0,0 +1,17 @@
1
+ import type { Editor } from "../_vendor/canvas-core/index";
2
+ import { type CanvasActionContext } from "../_vendor/canvas-product-contracts/index";
3
+ export declare function createCanvasActionContext({ editor, toolState, selectionState, }: {
4
+ editor: Editor;
5
+ toolState: {
6
+ activeToolId: string;
7
+ isToolLocked: boolean;
8
+ };
9
+ selectionState: {
10
+ count: number;
11
+ singleShapeType: CanvasActionContext["selection"]["singleShapeType"];
12
+ commonShapeType: CanvasActionContext["selection"]["commonShapeType"];
13
+ canFlipSelection: boolean;
14
+ canResetSelectionRotation: boolean;
15
+ isMixedFrameAndPointHandleSelection: boolean;
16
+ };
17
+ }): CanvasActionContext;
@@ -0,0 +1,12 @@
1
+ import { type CanvasActionContext, type CanvasActionRegistry, type CanvasActionValue } from "../_vendor/canvas-product-contracts/index";
2
+ import type { CanvasKitCommandExecutor } from "./canvasKitCommandExecutor";
3
+ export interface CanvasKitActionExecutionInput {
4
+ actionId: string;
5
+ context: CanvasActionContext;
6
+ value?: CanvasActionValue;
7
+ }
8
+ export type ExecuteCanvasKitAction = (input: CanvasKitActionExecutionInput) => boolean;
9
+ export declare function createCanvasKitActionExecutor({ actionRegistry, commandExecutor, }: {
10
+ actionRegistry: CanvasActionRegistry;
11
+ commandExecutor: CanvasKitCommandExecutor;
12
+ }): ExecuteCanvasKitAction;
@@ -1,5 +1,6 @@
1
- import type { CanvasActionContext } from "../_vendor/canvas-plugin-sdk/index";
1
+ import { type CanvasActionContext } from "../_vendor/canvas-product-contracts/index";
2
2
  import type { Editor } from "../_vendor/canvas-core/index";
3
+ import type { CanvasKitCommand, ExecuteCanvasKitDefinedCommand } from "../commands";
3
4
  import type { CanvasPluginBeforeCommand } from "./canvasKitPluginContracts";
4
5
  export interface CanvasKitCommandInput<TResult> {
5
6
  commandId: string;
@@ -7,7 +8,15 @@ export interface CanvasKitCommandInput<TResult> {
7
8
  run(): TResult;
8
9
  }
9
10
  export type ExecuteCanvasKitCommand = <TResult>(input: CanvasKitCommandInput<TResult>) => TResult;
10
- export declare function createCanvasKitCommandExecutor({ editor, hooks, }: {
11
+ export interface CanvasKitCommandExecutor {
12
+ execute: ExecuteCanvasKitDefinedCommand;
13
+ executeBootstrap: ExecuteCanvasKitDefinedCommand;
14
+ executeFromAction: <TArgs extends readonly unknown[], TResult>(command: CanvasKitCommand<TArgs, TResult>, context: CanvasActionContext, ...args: TArgs) => TResult;
15
+ executeAction: ExecuteCanvasKitCommand;
16
+ }
17
+ export declare function createCanvasKitCommandExecutor({ assertCanBootstrap, assertCanExecute, editor, hooks, }: {
18
+ assertCanBootstrap?: () => void;
19
+ assertCanExecute?: () => void;
11
20
  editor: Editor;
12
21
  hooks: readonly CanvasPluginBeforeCommand[];
13
- }): ExecuteCanvasKitCommand;
22
+ }): CanvasKitCommandExecutor;
@@ -1,34 +1,28 @@
1
- import { type CanvasPluginBeforeCommand as SdkCanvasPluginBeforeCommand, type CanvasPluginBeforeCommandContext as SdkCanvasPluginBeforeCommandContext, type CanvasPluginBeforeReady as SdkCanvasPluginBeforeReady, type CanvasPluginBeforeReadyContext as SdkCanvasPluginBeforeReadyContext, type CanvasPluginComponent as SdkCanvasPluginComponent, type CanvasPluginComponentProps as SdkCanvasPluginComponentProps, type CanvasPluginProvider as SdkCanvasPluginProvider, type CanvasPluginLifecycleSetup as SdkCanvasPluginLifecycleSetup, type CanvasPluginPersistence as SdkCanvasPluginPersistence, type CanvasPluginUiSetup as SdkCanvasPluginUiSetup, type CanvasPluginApi as SdkCanvasPluginApi, type CanvasPluginApiContext, type CanvasPlugin as SdkCanvasPlugin, type CanvasPluginDefinition as SdkCanvasPluginDefinition, type CanvasPluginSetup as SdkCanvasPluginSetup, type CanvasPluginSetupContext as SdkCanvasPluginSetupContext } from "../_vendor/canvas-plugin-sdk/index";
2
- import type { ProductAssetResolverService, ProductServiceRegistry, ProductServiceToken } from "../core";
3
- import type { SvgAssetInliner } from "../_vendor/plugin-builtin-export/index";
1
+ import { type CanvasPlugin as SdkCanvasPlugin, type CanvasPluginDefinition as SdkCanvasPluginDefinition, type CanvasPluginSetup, type CanvasPluginSetupExtension } from "../_vendor/canvas-plugin-sdk/index";
2
+ import { type CanvasPluginApi as SdkCanvasPluginApi, type CanvasPluginApiContext, type CanvasPluginApiSetup, type ProductServiceRegistry, type ProductServiceToken } from "../_vendor/canvas-product-contracts/index";
3
+ import type { ProductAssetResolverService } from "./productAssetResolvers";
4
+ import type { SvgAssetInliner } from "../_vendor/plugin-runtime-export/index";
5
+ export type { CanvasPluginSetup, CanvasPluginSetupContext, } from "../_vendor/canvas-plugin-sdk/index";
6
+ export type { CanvasPluginBeforeCommand, CanvasPluginBeforeCommandContext, CanvasPluginBeforeReady, CanvasPluginBeforeReadyContext, CanvasPluginLifecycleSetup, CanvasPluginPersistence, } from "./canvasKitPluginLifecycle";
7
+ export { canvasKitLifecycleExtension, canvasKitPersistenceExtension, } from "./canvasKitPluginLifecycle";
8
+ export type { CanvasPluginComponent, CanvasPluginComponentProps, CanvasPluginProvider, CanvasPluginUiSetup, } from "./canvasKitPluginUi";
9
+ export { canvasKitUiExtension } from "./canvasKitPluginUi";
4
10
  export type CanvasPluginApi<TApi> = SdkCanvasPluginApi<TApi, CanvasPluginContext>;
5
11
  export interface CanvasPluginContext extends CanvasPluginApiContext {
6
12
  productId: string;
7
13
  services: ProductServiceRegistry;
8
14
  }
15
+ export declare const canvasKitApisExtension: CanvasPluginSetupExtension<CanvasPluginApiSetup<CanvasPluginContext>>;
9
16
  export interface CanvasKitPluginAssetSetup {
10
17
  addResolver(token: ProductServiceToken<ProductAssetResolverService>): void;
11
18
  addSvgInliners(...inliners: readonly SvgAssetInliner[]): void;
12
19
  }
13
- export type CanvasKitPluginLifecycleSetup = SdkCanvasPluginLifecycleSetup;
14
- export type CanvasKitPluginUiSetup = SdkCanvasPluginUiSetup;
15
- export type CanvasKitPluginPersistence = SdkCanvasPluginPersistence;
16
- export interface CanvasKitPluginSetupContext extends SdkCanvasPluginSetupContext<CanvasPluginContext> {
17
- readonly assets: CanvasKitPluginAssetSetup;
18
- }
19
- export type CanvasKitPluginSetup = SdkCanvasPluginSetup<CanvasKitPluginSetupContext>;
20
- export type CanvasPlugin = Omit<SdkCanvasPlugin<CanvasKitPluginSetup>, "editor" | "render" | "setup"> & {
20
+ export declare const canvasKitAssetsExtension: CanvasPluginSetupExtension<CanvasKitPluginAssetSetup>;
21
+ export type CanvasPlugin = Omit<SdkCanvasPlugin<CanvasPluginSetup>, "editor" | "render" | "setup"> & {
21
22
  readonly editor?: unknown;
22
23
  readonly render?: unknown;
23
24
  readonly setup?: (...args: never[]) => unknown;
24
25
  };
25
- export type CanvasPluginDefinition = SdkCanvasPluginDefinition<CanvasKitPluginSetup>;
26
+ export type CanvasPluginDefinition = SdkCanvasPluginDefinition<CanvasPluginSetup>;
26
27
  export type CanvasPluginInput = CanvasPlugin | readonly CanvasPluginInput[];
27
28
  export declare function defineCanvasPlugin(plugin: CanvasPluginDefinition): CanvasPlugin;
28
- export type CanvasPluginBeforeReadyContext = SdkCanvasPluginBeforeReadyContext;
29
- export type CanvasPluginBeforeCommandContext = SdkCanvasPluginBeforeCommandContext;
30
- export type CanvasPluginBeforeReady = SdkCanvasPluginBeforeReady;
31
- export type CanvasPluginBeforeCommand = SdkCanvasPluginBeforeCommand;
32
- export type CanvasPluginComponentProps = SdkCanvasPluginComponentProps;
33
- export type CanvasPluginProvider = SdkCanvasPluginProvider;
34
- export type CanvasPluginComponent = SdkCanvasPluginComponent;
@@ -1,10 +1,9 @@
1
- import type { Editor } from "../canvas-core/index";
2
- import type { CanvasActionContext } from "./actions";
3
- import type { ProductServiceRegistry } from "./services";
1
+ import type { Editor } from "../_vendor/canvas-core/index";
2
+ import { type CanvasActionContext, type ProductServiceRegistry } from "../_vendor/canvas-product-contracts/index";
4
3
  export interface CanvasPluginPersistence {
5
4
  flush(): Promise<void>;
6
5
  }
7
- export interface CanvasPluginStartupResult {
6
+ export interface CanvasKitStartupResult {
8
7
  documentSource: "restored" | "seeded" | "empty";
9
8
  sessionRestored: boolean;
10
9
  warnings: readonly unknown[];
@@ -14,7 +13,7 @@ export interface CanvasPluginBeforeReadyContext {
14
13
  persistence: CanvasPluginPersistence | null;
15
14
  productId: string;
16
15
  signal: AbortSignal;
17
- startup: CanvasPluginStartupResult;
16
+ startup: CanvasKitStartupResult;
18
17
  services: ProductServiceRegistry;
19
18
  }
20
19
  export interface CanvasPluginBeforeCommandContext {
@@ -29,3 +28,5 @@ export interface CanvasPluginLifecycleSetup {
29
28
  beforeReady(hook: CanvasPluginBeforeReady): void;
30
29
  defer(dispose: () => void): void;
31
30
  }
31
+ export declare const canvasKitLifecycleExtension: import("../_vendor/canvas-plugin-sdk/index").CanvasPluginSetupExtension<CanvasPluginLifecycleSetup>;
32
+ export declare const canvasKitPersistenceExtension: import("../_vendor/canvas-plugin-sdk/index").CanvasPluginSetupExtension<CanvasPluginPersistence | null>;