@yuzhouu/canvas-kit 0.1.7 → 0.1.9

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 (184) hide show
  1. package/README.md +5 -1
  2. package/_vendor/canvas-core/editor/commands.d.ts +10 -1
  3. package/_vendor/canvas-core/editor/createEditorWithRuntimePlugins.d.ts +6 -0
  4. package/_vendor/canvas-core/editor/editor.d.ts +6 -1
  5. package/_vendor/canvas-core/editor/index.d.ts +1 -1
  6. package/_vendor/canvas-core/editor/managers/documentSnapshotManager.d.ts +1 -1
  7. package/_vendor/canvas-core/editor/managers/snapCalculations.d.ts +34 -4
  8. package/_vendor/canvas-core/editor/managers/snapManager.d.ts +7 -0
  9. package/_vendor/canvas-core/editor/managers/snapTypes.d.ts +15 -0
  10. package/_vendor/canvas-core/editor/middleMousePanInteraction.d.ts +2 -0
  11. package/_vendor/canvas-core/index.d.ts +7 -7
  12. package/_vendor/canvas-core/plugins/{editorPlugin.d.ts → editorRuntimePlugin.d.ts} +3 -3
  13. package/_vendor/canvas-core/plugins/index.d.ts +1 -1
  14. package/_vendor/canvas-core/schema/records.d.ts +10 -1
  15. package/_vendor/canvas-core/shapes/shapeUtil.d.ts +13 -4
  16. package/_vendor/canvas-core/shapes/types.d.ts +2 -2
  17. package/_vendor/canvas-core/surfaces/toolbar.d.ts +11 -1
  18. package/_vendor/canvas-react/components/CanvasView.d.ts +3 -3
  19. package/_vendor/canvas-react/components/useCanvasDomEvents.d.ts +2 -0
  20. package/_vendor/canvas-react/host/actionRegistry.d.ts +15 -0
  21. package/_vendor/canvas-react/host/{canvasPlugin.d.ts → canvasRenderPlugin.d.ts} +5 -5
  22. package/_vendor/canvas-react/host/canvasRenderPluginHost.d.ts +2 -0
  23. package/_vendor/canvas-react/host/canvasRenderPluginHostManifest.d.ts +2 -0
  24. package/_vendor/canvas-react/host/canvasRenderPluginHostRuntime.d.ts +3 -0
  25. package/_vendor/canvas-react/host/canvasRenderPluginHostTypes.d.ts +104 -0
  26. package/_vendor/canvas-react/host/canvasRenderPluginHostValidation.d.ts +11 -0
  27. package/_vendor/canvas-react/host/contextMenuRegistry.d.ts +8 -3
  28. package/_vendor/canvas-react/host/domEventGuards.d.ts +3 -3
  29. package/_vendor/canvas-react/host/extension.d.ts +4 -4
  30. package/_vendor/canvas-react/host/index.d.ts +5 -4
  31. package/_vendor/canvas-react/host/overlayRegistry.d.ts +3 -3
  32. package/_vendor/canvas-react/host/rendererRegistry.d.ts +3 -3
  33. package/_vendor/canvas-react/host/toolbarRegistry.d.ts +9 -13
  34. package/_vendor/plugin-arrow/canvasRender.d.ts +2 -0
  35. package/_vendor/plugin-arrow/{editor.d.ts → editorRuntime.d.ts} +2 -2
  36. package/_vendor/plugin-arrow/index.d.ts +2 -2
  37. package/_vendor/plugin-draw/canvasRender.d.ts +2 -0
  38. package/_vendor/plugin-draw/{editor.d.ts → editorRuntime.d.ts} +2 -2
  39. package/_vendor/plugin-draw/index.d.ts +2 -2
  40. package/_vendor/plugin-eraser/canvasRender.d.ts +2 -0
  41. package/_vendor/plugin-eraser/editorRuntime.d.ts +2 -0
  42. package/_vendor/plugin-eraser/index.d.ts +2 -2
  43. package/_vendor/plugin-frame/{canvas.d.ts → canvasRender.d.ts} +2 -2
  44. package/_vendor/plugin-frame/{editor.d.ts → editorRuntime.d.ts} +2 -2
  45. package/_vendor/plugin-frame/index.d.ts +2 -2
  46. package/_vendor/plugin-geo/{canvas.d.ts → canvasRender.d.ts} +2 -2
  47. package/_vendor/plugin-geo/{editor.d.ts → editorRuntime.d.ts} +2 -2
  48. package/_vendor/plugin-geo/geoGeometry.d.ts +19 -3
  49. package/_vendor/plugin-geo/index.d.ts +2 -2
  50. package/_vendor/plugin-geo/types.d.ts +1 -0
  51. package/_vendor/plugin-group/{canvas.d.ts → canvasRender.d.ts} +2 -2
  52. package/_vendor/plugin-group/{editor.d.ts → editorRuntime.d.ts} +2 -2
  53. package/_vendor/plugin-group/index.d.ts +2 -2
  54. package/_vendor/plugin-image/{editor.d.ts → actionIds.d.ts} +0 -8
  55. package/_vendor/plugin-image/canvasRender.d.ts +2 -0
  56. package/_vendor/plugin-image/cropRuntime.d.ts +2 -0
  57. package/_vendor/plugin-image/editorRuntime.d.ts +5 -0
  58. package/_vendor/plugin-image/imageHostActionContract.d.ts +2 -0
  59. package/_vendor/plugin-image/imageShapeUtil.d.ts +2 -1
  60. package/_vendor/plugin-image/imageSvgExporter.d.ts +6 -0
  61. package/_vendor/plugin-image/index.d.ts +8 -4
  62. package/_vendor/plugin-image/runtimeShared.d.ts +5 -0
  63. package/_vendor/plugin-image/smudge.d.ts +63 -0
  64. package/_vendor/plugin-image/smudgeInteractions.d.ts +2 -0
  65. package/_vendor/plugin-image/smudgeRuntime.d.ts +2 -0
  66. package/_vendor/plugin-image/styleRuntime.d.ts +17 -0
  67. package/_vendor/plugin-image/toolbarRuntime.d.ts +3 -0
  68. package/_vendor/plugin-image/types.d.ts +16 -1
  69. package/_vendor/plugin-laser/canvasRender.d.ts +2 -0
  70. package/_vendor/plugin-laser/editorRuntime.d.ts +2 -0
  71. package/_vendor/plugin-laser/index.d.ts +2 -2
  72. package/_vendor/plugin-text/canvasRender.d.ts +5 -0
  73. package/_vendor/plugin-text/editorRuntime.d.ts +5 -0
  74. package/_vendor/plugin-text/host/RichTextLinkPopover.d.ts +14 -0
  75. package/_vendor/plugin-text/host/richTextRendering.d.ts +9 -1
  76. package/_vendor/plugin-text/index.d.ts +2 -0
  77. package/_vendor/plugin-text/richTextLinks.d.ts +3 -0
  78. package/_vendor/plugin-text/richTextUtils.d.ts +2 -1
  79. package/browser/indexedDb.d.ts +10 -0
  80. package/browser/persistence.d.ts +2 -4
  81. package/builtins/controller/createBuiltInCanvasController.d.ts +1 -1
  82. package/builtins/controller/layerController.d.ts +1 -1
  83. package/builtins/controller/shapeCreationController.d.ts +6 -2
  84. package/builtins/index.d.ts +1 -1
  85. package/chrome/toolbar/CanvasKitWheelCapture.d.ts +2 -0
  86. package/chrome/{FloatingSelectionToolbarPageSpace.d.ts → toolbar/FloatingSelectionToolbarPageSpace.d.ts} +1 -1
  87. package/{core/features → chrome}/toolbar/toolbarLabels.d.ts +1 -1
  88. package/chrome/{bindings → toolbar}/useToolbarSurfaces.d.ts +2 -2
  89. package/chrome/types.d.ts +12 -8
  90. package/chrome/useCanvasKitChromeContext.d.ts +6 -4
  91. package/chrome/{bindings/useCanvasKitLayerTree.d.ts → useCanvasKitLayerTree.d.ts} +1 -1
  92. package/chrome/{bindings/useContextMenuSurface.d.ts → useContextMenuSurface.d.ts} +3 -3
  93. package/chrome/useHistoryControls.d.ts +12 -0
  94. package/chrome/usePageControls.d.ts +16 -0
  95. package/chrome/{bindings/useSvgExport.d.ts → useSvgExport.d.ts} +2 -2
  96. package/chrome/useZoomControls.d.ts +9 -0
  97. package/controller/canvasKitController.d.ts +10 -7
  98. package/core/api/apiRegistry.d.ts +12 -0
  99. package/core/index.d.ts +4 -19
  100. package/core/{controller → product-controller}/canvasProductController.d.ts +17 -4
  101. package/core/product-controller/index.d.ts +2 -0
  102. package/core/runtime/productDefinition.d.ts +5 -4
  103. package/core/runtime/productHost.d.ts +5 -2
  104. package/{core/features/actions/canvasActionContext.d.ts → features/actions/actionRuntime.d.ts} +7 -1
  105. package/{core/features → features}/clipboard/clipboardContextMenuContributions.d.ts +1 -1
  106. package/features/clipboard/clipboardContribution.d.ts +11 -0
  107. package/features/clipboard/clipboardHostExtension.d.ts +2 -0
  108. package/{core/features → features}/clipboard/clipboardService.d.ts +3 -3
  109. package/features/context-menu/contextMenuRuntime.d.ts +13 -0
  110. package/{core/features → features}/export/svgExport.d.ts +1 -1
  111. package/features/image/asset/imageAssetService.d.ts +11 -0
  112. package/features/image/{imageBlobStore.d.ts → asset/imageBlobStore.d.ts} +3 -2
  113. package/features/image/asset/imageFileHelpers.d.ts +49 -0
  114. package/features/image/{svgImageAssetInliner.d.ts → asset/svgImageAssetInliner.d.ts} +1 -1
  115. package/features/image/controller/imageProductController.d.ts +27 -0
  116. package/features/image/imageHostExtension.d.ts +10 -5
  117. package/features/image/{ImageImportController.d.ts → import/ImageImportController.d.ts} +3 -3
  118. package/features/image/{useImageImport.d.ts → import/useImageImport.d.ts} +3 -4
  119. package/features/image/index.d.ts +17 -15
  120. package/features/image/smudge/imageSmudgeHostActions.d.ts +10 -0
  121. package/features/image/smudge/imageSmudgeTypes.d.ts +25 -0
  122. package/features/image/toolbar/imageHostActions.d.ts +69 -0
  123. package/features/image/{imageToolbarHostBridge.d.ts → toolbar/imageToolbarHostBridge.d.ts} +2 -2
  124. package/features/keyboard/keyboardShortcutHostExtension.d.ts +2 -0
  125. package/features/keyboard/useCanvasKitKeyboardShortcuts.d.ts +6 -0
  126. package/{react → features/persistence}/CanvasKitPersistenceNotice.d.ts +1 -1
  127. package/features/persistence/persistenceHostExtension.d.ts +2 -0
  128. package/{core/features/actions/canvasActions.d.ts → features/selection/selectionActions.d.ts} +3 -9
  129. package/{core/features/toolbar → features/selection}/selectionContextMenuContributions.d.ts +1 -1
  130. package/features/selection/selectionHostExtension.d.ts +2 -0
  131. package/features/selection/selectionToolbarContributions.d.ts +2 -0
  132. package/features/tool/toolActions.d.ts +2 -0
  133. package/{core/features/toolbar → features/tool}/toolContextMenuContributions.d.ts +1 -1
  134. package/features/tool/toolHostExtension.d.ts +2 -0
  135. package/features/tool/toolToolbarContributions.d.ts +2 -0
  136. package/features/view/viewActions.d.ts +5 -0
  137. package/{core/features/context-menu → features/view}/viewContextMenuContributions.d.ts +1 -1
  138. package/features/view/viewHostExtension.d.ts +2 -0
  139. package/host/defaultHostExtensions.d.ts +2 -0
  140. package/index.d.ts +12 -7
  141. package/index.mjs +96 -76
  142. package/package.json +1 -1
  143. package/product/canvasKitProduct.d.ts +8 -7
  144. package/react/useCanvasKitController.d.ts +1 -1
  145. package/react/useCanvasKitRuntime.d.ts +1 -1
  146. package/runtime/canvasKitHostContracts.d.ts +135 -0
  147. package/runtime/canvasKitHostFeatureHooks.d.ts +12 -0
  148. package/runtime/canvasKitRuntime.d.ts +8 -6
  149. package/runtime/canvasKitRuntimePlan.d.ts +50 -0
  150. package/_vendor/canvas-core/editor/createEditorWithPlugins.d.ts +0 -6
  151. package/_vendor/canvas-react/host/pluginHost.d.ts +0 -2
  152. package/_vendor/canvas-react/host/pluginHostManifest.d.ts +0 -2
  153. package/_vendor/canvas-react/host/pluginHostRuntime.d.ts +0 -3
  154. package/_vendor/canvas-react/host/pluginHostTypes.d.ts +0 -102
  155. package/_vendor/canvas-react/host/pluginHostValidation.d.ts +0 -11
  156. package/_vendor/plugin-arrow/canvas.d.ts +0 -2
  157. package/_vendor/plugin-draw/canvas.d.ts +0 -2
  158. package/_vendor/plugin-eraser/canvas.d.ts +0 -2
  159. package/_vendor/plugin-eraser/editor.d.ts +0 -2
  160. package/_vendor/plugin-image/canvas.d.ts +0 -2
  161. package/_vendor/plugin-laser/canvas.d.ts +0 -2
  162. package/_vendor/plugin-laser/editor.d.ts +0 -2
  163. package/_vendor/plugin-text/canvas.d.ts +0 -5
  164. package/_vendor/plugin-text/editor.d.ts +0 -5
  165. package/chrome/bindings/useCanvasKitChromeControls.d.ts +0 -27
  166. package/core/controller/featureControllerRegistry.d.ts +0 -12
  167. package/core/controller/index.d.ts +0 -4
  168. package/core/features/clipboard/clipboardContribution.d.ts +0 -19
  169. package/core/features/context-menu/contextMenuActions.d.ts +0 -12
  170. package/core/features/context-menu/contextMenuContext.d.ts +0 -6
  171. package/core/features/context-menu/contextMenuContribution.d.ts +0 -4
  172. package/core/features/hostActionIds.d.ts +0 -1
  173. package/core/features/toolbar/toolbarContribution.d.ts +0 -4
  174. package/core/runtime/productContributions.d.ts +0 -9
  175. package/features/image/imageAssetService.d.ts +0 -7
  176. package/features/image/imageFileHelpers.d.ts +0 -35
  177. package/features/image/imageHostActions.d.ts +0 -36
  178. package/features/image/imageProductController.d.ts +0 -22
  179. package/features/image/imageProductToolbarActions.d.ts +0 -2
  180. package/react/useCanvasKitKeyboardShortcuts.d.ts +0 -6
  181. package/runtime/canvasKitHostExtensions.d.ts +0 -19
  182. package/runtime/canvasKitRuntimeInitializer.d.ts +0 -11
  183. /package/chrome/{CanvasKitFloatingToolbarLayer.d.ts → toolbar/CanvasKitFloatingToolbarLayer.d.ts} +0 -0
  184. /package/core/{controller → product-controller}/productLayerTree.d.ts +0 -0
@@ -0,0 +1,104 @@
1
+ import type { LandEditorRuntimePlugin, ShapeCapabilitySupport } from "../../canvas-core/index";
2
+ import type { CanvasRenderPluginComponent, CanvasRenderPluginProvider, LandCanvasRenderPlugin } from "./canvasRenderPlugin";
3
+ import type { CanvasActionRegistry } from "./actionRegistry";
4
+ import type { CanvasContextMenuRegistry } from "./contextMenuRegistry";
5
+ import type { CanvasDomEventGuardRegistry } from "./domEventGuards";
6
+ import type { LandFeatureBundle } from "./extension";
7
+ import type { CanvasOverlayRegistry } from "./overlayRegistry";
8
+ import type { CanvasRendererRegistry } from "./rendererRegistry";
9
+ import type { CanvasToolbarRegistry } from "./toolbarRegistry";
10
+ export type CanvasRenderPluginHostSource = "built-in" | "dev-sample";
11
+ export type CanvasRenderPluginHostVerdict = "pass" | "fail";
12
+ export interface CreateCanvasRenderPluginHostRuntimeOptions {
13
+ knownHostActionIds?: readonly string[];
14
+ source?: CanvasRenderPluginHostSource;
15
+ }
16
+ export interface CanvasRenderPluginHostManifestEntry {
17
+ id: string;
18
+ extensionName: string;
19
+ source: CanvasRenderPluginHostSource;
20
+ editorRuntimePluginIds: string[];
21
+ canvasRenderPluginIds: string[];
22
+ interactionHandlerIds: string[];
23
+ canvasActionIds: string[];
24
+ toolbarContributionIds: string[];
25
+ toolbarContributions: CanvasRenderPluginHostManifestToolbarContributionEntry[];
26
+ contextMenuContributionIds: string[];
27
+ contextMenuContributions: CanvasRenderPluginHostManifestContextMenuContributionEntry[];
28
+ domEventGuardIds: string[];
29
+ canvasOverlayIds: string[];
30
+ selectionCustomHandleRendererTypes: string[];
31
+ canvasProviderIds: string[];
32
+ canvasComponentIds: string[];
33
+ shapeTypes: string[];
34
+ }
35
+ export interface CanvasRenderPluginHostManifestToolbarContributionEntry {
36
+ id: string;
37
+ surface: string;
38
+ placement: string;
39
+ actionIds: string[];
40
+ }
41
+ export interface CanvasRenderPluginHostManifestContextMenuContributionEntry {
42
+ id: string;
43
+ target: string;
44
+ actionIds: string[];
45
+ }
46
+ export interface CanvasRenderPluginHostRuntime {
47
+ editorRuntimePlugins: LandEditorRuntimePlugin[];
48
+ canvasRenderPlugins: LandCanvasRenderPlugin[];
49
+ canvasProviders: CanvasRenderPluginProvider[];
50
+ canvasComponents: CanvasRenderPluginComponent[];
51
+ actionRegistry: CanvasActionRegistry;
52
+ rendererRegistry: CanvasRendererRegistry;
53
+ overlayRegistry: CanvasOverlayRegistry;
54
+ domEventGuardRegistry: CanvasDomEventGuardRegistry;
55
+ toolbarRegistry: CanvasToolbarRegistry;
56
+ contextMenuRegistry: CanvasContextMenuRegistry;
57
+ manifest: CanvasRenderPluginHostManifestEntry[];
58
+ validation: CanvasRenderPluginHostValidationSummary;
59
+ externalPluginIds: string[];
60
+ }
61
+ export type CanvasRenderPluginHostValidationIssueSeverity = "error" | "warning";
62
+ export interface CanvasRenderPluginHostValidationIssue {
63
+ severity: CanvasRenderPluginHostValidationIssueSeverity;
64
+ code: "duplicate-feature-id" | "duplicate-editor-runtime-plugin-id" | "duplicate-canvas-render-plugin-id" | "duplicate-interaction-handler-id" | "duplicate-canvas-action-id" | "duplicate-toolbar-contribution-id" | "duplicate-context-menu-contribution-id" | "duplicate-dom-event-guard-id" | "duplicate-canvas-overlay-id" | "duplicate-selection-custom-handle-renderer" | "duplicate-canvas-provider-id" | "duplicate-canvas-component-id" | "missing-canvas-action" | "missing-context-menu-action" | "missing-editor-runtime-plugin" | "missing-canvas-render-plugin" | "missing-shape-type" | "missing-shape-capability" | "missing-shape-util" | "missing-svg-exporter" | "missing-canvas-renderer";
65
+ featureId: string | null;
66
+ pluginId: string | null;
67
+ shapeType: string | null;
68
+ message: string;
69
+ }
70
+ export interface CanvasRenderPluginHostShapeValidationSummary {
71
+ featureId: string;
72
+ shapeType: string;
73
+ hasCapability: boolean;
74
+ hasShapeUtil: boolean;
75
+ hasSvgExporter: boolean;
76
+ hasCanvasRenderer: boolean;
77
+ exportSupport: ShapeCapabilitySupport | null;
78
+ }
79
+ export interface CanvasRenderPluginHostValidationSummary {
80
+ verdict: CanvasRenderPluginHostVerdict;
81
+ issueCount: number;
82
+ errorCount: number;
83
+ warningCount: number;
84
+ issues: CanvasRenderPluginHostValidationIssue[];
85
+ featureIds: string[];
86
+ editorRuntimePluginIds: string[];
87
+ canvasRenderPluginIds: string[];
88
+ interactionHandlerIds: string[];
89
+ canvasActionIds: string[];
90
+ toolbarContributionIds: string[];
91
+ contextMenuContributionIds: string[];
92
+ domEventGuardIds: string[];
93
+ canvasOverlayIds: string[];
94
+ selectionCustomHandleRendererTypes: string[];
95
+ canvasProviderIds: string[];
96
+ canvasComponentIds: string[];
97
+ registeredRendererTypes: string[];
98
+ shapeSummaries: CanvasRenderPluginHostShapeValidationSummary[];
99
+ }
100
+ export interface ResolvedCanvasFeature {
101
+ extensionName: string;
102
+ feature: LandFeatureBundle;
103
+ source: CanvasRenderPluginHostSource;
104
+ }
@@ -0,0 +1,11 @@
1
+ import type { LandEditorRuntimePlugin } from "../../canvas-core/index";
2
+ import type { LandCanvasRenderPlugin } from "./canvasRenderPlugin";
3
+ import type { CanvasRendererRegistry } from "./rendererRegistry";
4
+ import type { CanvasRenderPluginHostValidationSummary, ResolvedCanvasFeature } from "./canvasRenderPluginHostTypes";
5
+ export declare function validateCanvasRenderPluginHost({ editorRuntimePlugins, canvasRenderPlugins, knownHostActionIds, rendererRegistry, resolvedFeatures, }: {
6
+ editorRuntimePlugins: readonly LandEditorRuntimePlugin[];
7
+ canvasRenderPlugins: readonly LandCanvasRenderPlugin[];
8
+ knownHostActionIds: readonly string[];
9
+ rendererRegistry: CanvasRendererRegistry;
10
+ resolvedFeatures: readonly ResolvedCanvasFeature[];
11
+ }): CanvasRenderPluginHostValidationSummary;
@@ -1,12 +1,17 @@
1
- import type { ContextMenuContext, ContextMenuContribution, ContextMenuContributionTarget, ContextMenuSection, LandEditorPlugin } from "../../canvas-core/index";
1
+ import type { ContextMenuContext, ContextMenuContribution, ContextMenuContributionTarget, ContextMenuSection, LandEditorRuntimePlugin } from "../../canvas-core/index";
2
2
  export declare class CanvasContextMenuRegistry {
3
3
  private readonly contributions;
4
+ private readonly contributionsByTarget;
5
+ private readonly contributionIndexes;
4
6
  private readonly duplicateContributionIds;
7
+ private nextContributionIndex;
5
8
  registerContribution(contribution: ContextMenuContribution, options?: {
6
9
  replace?: boolean;
7
10
  }): void;
8
- registerEditorPlugins(plugins: readonly LandEditorPlugin[]): void;
11
+ registerEditorRuntimePlugins(plugins: readonly LandEditorRuntimePlugin[]): void;
9
12
  getDuplicateContributionIds(): string[];
10
13
  getSections(target: ContextMenuContributionTarget, context: ContextMenuContext): ContextMenuSection[];
14
+ private addToIndex;
15
+ private removeFromIndex;
11
16
  }
12
- export declare function createCanvasContextMenuRegistry(plugins?: readonly LandEditorPlugin[]): CanvasContextMenuRegistry;
17
+ export declare function createCanvasContextMenuRegistry(plugins?: readonly LandEditorRuntimePlugin[]): CanvasContextMenuRegistry;
@@ -1,11 +1,11 @@
1
- import { type CanvasDomEventGuard, type CanvasDomEventGuardCursorInput, type CanvasDomEventGuardInput, type LandCanvasPlugin } from "./canvasPlugin";
1
+ import { type CanvasDomEventGuard, type CanvasDomEventGuardCursorInput, type CanvasDomEventGuardInput, type LandCanvasRenderPlugin } from "./canvasRenderPlugin";
2
2
  export declare class CanvasDomEventGuardRegistry {
3
3
  private readonly guards;
4
4
  private readonly registeredGuardIds;
5
5
  register(guard: CanvasDomEventGuard): void;
6
- registerCanvasPlugins(plugins: readonly LandCanvasPlugin[]): void;
6
+ registerCanvasRenderPlugins(plugins: readonly LandCanvasRenderPlugin[]): void;
7
7
  getGuards(): readonly CanvasDomEventGuard[];
8
8
  handle(input: CanvasDomEventGuardInput): "continue" | "handled";
9
9
  getCursor(input: CanvasDomEventGuardCursorInput): string | undefined;
10
10
  }
11
- export declare function createCanvasDomEventGuardRegistry(plugins?: readonly LandCanvasPlugin[]): CanvasDomEventGuardRegistry;
11
+ export declare function createCanvasDomEventGuardRegistry(plugins?: readonly LandCanvasRenderPlugin[]): CanvasDomEventGuardRegistry;
@@ -1,10 +1,10 @@
1
- import type { LandEditorPlugin, ShapeRecordBase } from "../../canvas-core/index";
2
- import type { LandCanvasPlugin } from "./canvasPlugin";
1
+ import type { LandEditorRuntimePlugin, ShapeRecordBase } from "../../canvas-core/index";
2
+ import type { LandCanvasRenderPlugin } from "./canvasRenderPlugin";
3
3
  type LandExtensionOptions = Record<string, unknown>;
4
4
  export interface LandFeatureBundle {
5
5
  id: string;
6
- editorPlugins: readonly LandEditorPlugin[];
7
- canvasPlugins: readonly LandCanvasPlugin[];
6
+ editorRuntimePlugins: readonly LandEditorRuntimePlugin[];
7
+ canvasRenderPlugins: readonly LandCanvasRenderPlugin[];
8
8
  shapeTypes: readonly ShapeRecordBase["type"][];
9
9
  }
10
10
  export interface LandExtension {
@@ -1,3 +1,4 @@
1
+ export { CanvasActionRegistry, createCanvasActionRegistry, } from "./actionRegistry";
1
2
  export { CanvasRendererRegistryContext, useCanvasRendererRegistry, } from "./canvasRendererRegistryContext";
2
3
  export { CanvasOverlayRegistryContext, useCanvasOverlayRegistry, } from "./canvasOverlayRegistryContext";
3
4
  export { CanvasDomEventGuardRegistry, createCanvasDomEventGuardRegistry, } from "./domEventGuards";
@@ -5,9 +6,9 @@ export { CanvasOverlayRegistry, createCanvasOverlayRegistry, } from "./overlayRe
5
6
  export { CanvasRendererRegistry, createCanvasRendererRegistry, } from "./rendererRegistry";
6
7
  export { CanvasToolbarRegistry, createCanvasToolbarRegistry, } from "./toolbarRegistry";
7
8
  export { CanvasContextMenuRegistry, createCanvasContextMenuRegistry, } from "./contextMenuRegistry";
8
- export type { AnyRegisteredSelectionCustomHandleRenderer, AnyRegisteredShapeRenderer, CanvasOverlayContribution, CanvasOverlayLayer, CanvasDomEventGuard, CanvasDomEventGuardCursorInput, CanvasDomEventGuardDecision, CanvasDomEventGuardInput, CanvasDomEventGuardName, CanvasPluginComponent, CanvasPluginProvider, LandCanvasPlugin, RegisteredSelectionCustomHandleRenderer, RegisteredShapeRenderer, SelectionCustomHandleRendererProps, ShapeRendererProps, } from "./canvasPlugin";
9
- export { getShapeStrokeForHover, SHAPE_HOVER_STROKE, } from "./canvasPlugin";
9
+ export type { AnyRegisteredSelectionCustomHandleRenderer, AnyRegisteredShapeRenderer, CanvasOverlayContribution, CanvasOverlayLayer, CanvasDomEventGuard, CanvasDomEventGuardCursorInput, CanvasDomEventGuardDecision, CanvasDomEventGuardInput, CanvasDomEventGuardName, CanvasRenderPluginComponent, CanvasRenderPluginProvider, LandCanvasRenderPlugin, RegisteredSelectionCustomHandleRenderer, RegisteredShapeRenderer, SelectionCustomHandleRendererProps, ShapeRendererProps, } from "./canvasRenderPlugin";
10
+ export { getShapeStrokeForHover, SHAPE_HOVER_STROKE, } from "./canvasRenderPlugin";
10
11
  export { defineLandExtension, resolveLandExtensions, } from "./extension";
11
12
  export type { ConfigurableLandExtension, LandExtension, LandExtensionConfig, LandExtensionOptionsInput, LandFeatureBundle, ResolvedLandExtension, } from "./extension";
12
- export { createCanvasPluginHostRuntime } from "./pluginHost";
13
- export type { CanvasPluginHostManifestContextMenuContributionEntry, CanvasPluginHostManifestEntry, CanvasPluginHostManifestToolbarContributionEntry, CanvasPluginHostRuntime, CanvasPluginHostShapeValidationSummary, CanvasPluginHostSource, CanvasPluginHostValidationIssue, CanvasPluginHostValidationIssueSeverity, CanvasPluginHostValidationSummary, CanvasPluginHostVerdict, CreateCanvasPluginHostRuntimeOptions, } from "./pluginHost";
13
+ export { createCanvasRenderPluginHostRuntime } from "./canvasRenderPluginHost";
14
+ export type { CanvasRenderPluginHostManifestContextMenuContributionEntry, CanvasRenderPluginHostManifestEntry, CanvasRenderPluginHostManifestToolbarContributionEntry, CanvasRenderPluginHostRuntime, CanvasRenderPluginHostShapeValidationSummary, CanvasRenderPluginHostSource, CanvasRenderPluginHostValidationIssue, CanvasRenderPluginHostValidationIssueSeverity, CanvasRenderPluginHostValidationSummary, CanvasRenderPluginHostVerdict, CreateCanvasRenderPluginHostRuntimeOptions, } from "./canvasRenderPluginHost";
@@ -1,5 +1,5 @@
1
1
  import type { SelectionCustomHandle } from "../../canvas-core/index";
2
- import type { AnyRegisteredSelectionCustomHandleRenderer, CanvasOverlayContribution, CanvasOverlayLayer, LandCanvasPlugin, RegisteredSelectionCustomHandleRenderer } from "./canvasPlugin";
2
+ import type { AnyRegisteredSelectionCustomHandleRenderer, CanvasOverlayContribution, CanvasOverlayLayer, LandCanvasRenderPlugin, RegisteredSelectionCustomHandleRenderer } from "./canvasRenderPlugin";
3
3
  export declare class CanvasOverlayRegistry {
4
4
  private readonly selectionCustomHandleRenderers;
5
5
  private readonly canvasOverlays;
@@ -13,6 +13,6 @@ export declare class CanvasOverlayRegistry {
13
13
  getSelectionCustomHandleRenderer(type: SelectionCustomHandle["type"]): AnyRegisteredSelectionCustomHandleRenderer | null;
14
14
  hasSelectionCustomHandleRenderer(type: SelectionCustomHandle["type"]): boolean;
15
15
  getRegisteredSelectionCustomHandleTypes(): SelectionCustomHandle["type"][];
16
- registerCanvasPlugins(plugins: readonly LandCanvasPlugin[]): void;
16
+ registerCanvasRenderPlugins(plugins: readonly LandCanvasRenderPlugin[]): void;
17
17
  }
18
- export declare function createCanvasOverlayRegistry(plugins?: readonly LandCanvasPlugin[]): CanvasOverlayRegistry;
18
+ export declare function createCanvasOverlayRegistry(plugins?: readonly LandCanvasRenderPlugin[]): CanvasOverlayRegistry;
@@ -1,5 +1,5 @@
1
1
  import type { ShapeRecordBase } from "../../canvas-core/index";
2
- import type { AnyRegisteredShapeRenderer, LandCanvasPlugin, RegisteredShapeRenderer } from "./canvasPlugin";
2
+ import type { AnyRegisteredShapeRenderer, LandCanvasRenderPlugin, RegisteredShapeRenderer } from "./canvasRenderPlugin";
3
3
  export declare class CanvasRendererRegistry {
4
4
  private readonly registry;
5
5
  private readonly registeredPluginIds;
@@ -7,6 +7,6 @@ export declare class CanvasRendererRegistry {
7
7
  getShapeRenderer(type: ShapeRecordBase["type"]): AnyRegisteredShapeRenderer | null;
8
8
  hasShapeRenderer(type: ShapeRecordBase["type"]): boolean;
9
9
  getRegisteredShapeTypes(): ShapeRecordBase["type"][];
10
- registerCanvasPlugins(plugins: readonly LandCanvasPlugin[]): void;
10
+ registerCanvasRenderPlugins(plugins: readonly LandCanvasRenderPlugin[]): void;
11
11
  }
12
- export declare function createCanvasRendererRegistry(plugins?: readonly LandCanvasPlugin[]): CanvasRendererRegistry;
12
+ export declare function createCanvasRendererRegistry(plugins?: readonly LandCanvasRenderPlugin[]): CanvasRendererRegistry;
@@ -1,24 +1,20 @@
1
- import type { LandEditorPlugin, CanvasAction, CanvasActionContext, ToolbarContribution, ToolbarGroup, ToolbarPlacement, ToolbarSurface } from "../../canvas-core/index";
1
+ import type { LandEditorRuntimePlugin, CanvasActionContext, ToolbarContribution, ToolbarGroup, ToolbarPlacement, ToolbarSurface } from "../../canvas-core/index";
2
2
  export declare class CanvasToolbarRegistry {
3
- private readonly actions;
4
3
  private readonly contributions;
5
- private readonly hostActionIds;
6
- private readonly duplicateActionIds;
4
+ private readonly contributionsBySurface;
5
+ private readonly contributionsBySurfaceAndPlacement;
6
+ private readonly contributionIndexes;
7
7
  private readonly duplicateContributionIds;
8
- registerAction(action: CanvasAction, options?: {
9
- replace?: boolean;
10
- }): void;
11
- registerHostAction(action: CanvasAction): void;
8
+ private nextContributionIndex;
12
9
  registerContribution(contribution: ToolbarContribution, options?: {
13
10
  replace?: boolean;
14
11
  }): void;
15
- registerEditorPlugins(plugins: readonly LandEditorPlugin[]): void;
16
- getAction(actionId: string): CanvasAction | null;
17
- getHostActionIds(): string[];
18
- getDuplicateActionIds(): string[];
12
+ registerEditorRuntimePlugins(plugins: readonly LandEditorRuntimePlugin[]): void;
19
13
  getDuplicateContributionIds(): string[];
20
14
  getGroups(surface: ToolbarSurface, context: CanvasActionContext, options?: {
21
15
  placement?: ToolbarPlacement;
22
16
  }): ToolbarGroup[];
17
+ private addToIndexes;
18
+ private removeFromIndexes;
23
19
  }
24
- export declare function createCanvasToolbarRegistry(plugins?: readonly LandEditorPlugin[]): CanvasToolbarRegistry;
20
+ export declare function createCanvasToolbarRegistry(plugins?: readonly LandEditorRuntimePlugin[]): CanvasToolbarRegistry;
@@ -0,0 +1,2 @@
1
+ import { type LandCanvasRenderPlugin } from "../canvas-react/host/index";
2
+ export declare function createArrowCanvasRenderPlugin(): LandCanvasRenderPlugin;
@@ -1,7 +1,7 @@
1
- import { type LandEditorPlugin, type ShapeSvgExporter, type SvgExportContext, type SvgNode } from "../canvas-core/index";
1
+ import { type LandEditorRuntimePlugin, type ShapeSvgExporter, type SvgExportContext, type SvgNode } from "../canvas-core/index";
2
2
  import type { ArrowShapeRecord } from "./types";
3
3
  export declare class ArrowShapeSvgExporter implements ShapeSvgExporter<ArrowShapeRecord> {
4
4
  readonly type: "arrow";
5
5
  toSvg(shape: ArrowShapeRecord, context: SvgExportContext): SvgNode;
6
6
  }
7
- export declare function createArrowEditorPlugin(): LandEditorPlugin;
7
+ export declare function createArrowEditorRuntimePlugin(): LandEditorRuntimePlugin;
@@ -1,8 +1,8 @@
1
1
  export { ArrowBindingUtil } from "./arrowBindingUtil";
2
2
  export { ArrowShapeUtil } from "./arrowShapeUtil";
3
3
  export { ArrowTool } from "./arrowTool";
4
- export { ArrowShapeSvgExporter, createArrowEditorPlugin } from "./editor";
5
- export { createArrowCanvasPlugin } from "./canvas";
4
+ export { ArrowShapeSvgExporter, createArrowEditorRuntimePlugin } from "./editorRuntime";
5
+ export { createArrowCanvasRenderPlugin } from "./canvasRender";
6
6
  export { Arrow, createArrowFeatureBundle } from "./feature";
7
7
  export { isArrowBindingRecord, isArrowShapeRecord, type ArrowBindingProps, type ArrowBindingRecord, type ArrowPoint, type ArrowShapeProps, type ArrowShapeRecord, type ArrowTerminal, } from "./types";
8
8
  export { getArrowBindingAnchorPagePoint, resolveArrowBindingPagePoint, } from "./arrowBindingAnchors";
@@ -0,0 +1,2 @@
1
+ import type { LandCanvasRenderPlugin } from "../canvas-react/host/index";
2
+ export declare function createDrawCanvasRenderPlugin(): LandCanvasRenderPlugin;
@@ -1,7 +1,7 @@
1
- import { type LandEditorPlugin, type ShapeSvgExporter, type SvgExportContext, type SvgNode } from "../canvas-core/index";
1
+ import { type LandEditorRuntimePlugin, type ShapeSvgExporter, type SvgExportContext, type SvgNode } from "../canvas-core/index";
2
2
  import { type DrawShapeRecord } from "./types";
3
3
  export declare class DrawShapeSvgExporter implements ShapeSvgExporter<DrawShapeRecord> {
4
4
  readonly type: "draw";
5
5
  toSvg(shape: DrawShapeRecord, context: SvgExportContext): SvgNode | null;
6
6
  }
7
- export declare function createDrawEditorPlugin(): LandEditorPlugin;
7
+ export declare function createDrawEditorRuntimePlugin(): LandEditorRuntimePlugin;
@@ -1,8 +1,8 @@
1
1
  export { DrawTool } from "./drawTool";
2
2
  export { DrawShapeUtil } from "./drawShapeUtil";
3
- export { DrawShapeSvgExporter, createDrawEditorPlugin } from "./editor";
3
+ export { DrawShapeSvgExporter, createDrawEditorRuntimePlugin } from "./editorRuntime";
4
4
  export { DrawShapeSvg } from "./DrawShapeRenderer";
5
- export { createDrawCanvasPlugin } from "./canvas";
5
+ export { createDrawCanvasRenderPlugin } from "./canvasRender";
6
6
  export { Draw, createDrawFeatureBundle } from "./feature";
7
7
  export { flipDrawShapeInSelectionBounds, getDrawShapeDiagnostics, getDrawShapePageSegments, getDrawShapePagePoints, normalizeTransformedDrawShape, } from "./drawGeometry";
8
8
  export { interpolateDrawShapeRecords } from "./drawInterpolation";
@@ -0,0 +1,2 @@
1
+ import { type LandCanvasRenderPlugin } from "../canvas-react/host/index";
2
+ export declare function createEraserCanvasRenderPlugin(): LandCanvasRenderPlugin;
@@ -0,0 +1,2 @@
1
+ import { type LandEditorRuntimePlugin } from "../canvas-core/index";
2
+ export declare function createEraserEditorRuntimePlugin(): LandEditorRuntimePlugin;
@@ -1,4 +1,4 @@
1
1
  export { EraserTool } from "./eraserTool";
2
- export { createEraserCanvasPlugin } from "./canvas";
3
- export { createEraserEditorPlugin } from "./editor";
2
+ export { createEraserCanvasRenderPlugin } from "./canvasRender";
3
+ export { createEraserEditorRuntimePlugin } from "./editorRuntime";
4
4
  export { Eraser, createEraserFeatureBundle } from "./feature";
@@ -1,9 +1,9 @@
1
- import { type LandCanvasPlugin } from "../canvas-react/host/index";
1
+ import { type LandCanvasRenderPlugin } from "../canvas-react/host/index";
2
2
  import type { FrameShapeRecord } from "./frameShapeUtil";
3
3
  interface FrameShapeSvgProps {
4
4
  shape: FrameShapeRecord;
5
5
  isHovered?: boolean;
6
6
  }
7
- export declare function createFrameCanvasPlugin(): LandCanvasPlugin;
7
+ export declare function createFrameCanvasRenderPlugin(): LandCanvasRenderPlugin;
8
8
  export declare function FrameShapeSvg({ shape, isHovered }: FrameShapeSvgProps): import("react/jsx-runtime").JSX.Element;
9
9
  export {};
@@ -1,7 +1,7 @@
1
- import { type LandEditorPlugin, type ShapeSvgExporter, type SvgNode, type SvgExportContext } from "../canvas-core/index";
1
+ import { type LandEditorRuntimePlugin, 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 createFrameEditorPlugin(): LandEditorPlugin;
7
+ export declare function createFrameEditorRuntimePlugin(): LandEditorRuntimePlugin;
@@ -1,6 +1,6 @@
1
1
  export { FrameShapeUtil } from "./frameShapeUtil";
2
2
  export type { FrameShapeProps, FrameShapeRecord } from "./frameShapeUtil";
3
3
  export { FrameTool } from "./frameTool";
4
- export { FrameShapeSvgExporter, createFrameEditorPlugin } from "./editor";
5
- export { createFrameCanvasPlugin } from "./canvas";
4
+ export { FrameShapeSvgExporter, createFrameEditorRuntimePlugin } from "./editorRuntime";
5
+ export { createFrameCanvasRenderPlugin } from "./canvasRender";
6
6
  export { Frame, createFrameFeatureBundle } from "./feature";
@@ -1,5 +1,5 @@
1
1
  import { type ShapeColor } from "../canvas-core/index";
2
- import { type LandCanvasPlugin } from "../canvas-react/host/index";
2
+ import { type LandCanvasRenderPlugin } from "../canvas-react/host/index";
3
3
  import type { GeoShapeRecord } from "./types";
4
4
  interface GeoShapeSvgProps {
5
5
  shape: GeoShapeRecord;
@@ -8,6 +8,6 @@ interface GeoShapeSvgProps {
8
8
  stroke?: ShapeColor;
9
9
  strokeWidth?: number;
10
10
  }
11
- export declare function createGeoCanvasPlugin(): LandCanvasPlugin;
11
+ export declare function createGeoCanvasRenderPlugin(): LandCanvasRenderPlugin;
12
12
  export declare function GeoShapeSvg({ shape, fill, isHovered, stroke, strokeWidth, }: GeoShapeSvgProps): import("react/jsx-runtime").JSX.Element;
13
13
  export {};
@@ -1,7 +1,7 @@
1
- import { type LandEditorPlugin, type ShapeSvgExporter, type SvgExportContext, type SvgNode } from "../canvas-core/index";
1
+ import { type LandEditorRuntimePlugin, type ShapeSvgExporter, type SvgExportContext, type SvgNode } from "../canvas-core/index";
2
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 createGeoEditorPlugin(): LandEditorPlugin;
7
+ export declare function createGeoEditorRuntimePlugin(): LandEditorRuntimePlugin;
@@ -1,8 +1,24 @@
1
1
  import { Box, Vec } from "../canvas-core/index";
2
2
  import type { GeoShapeKind } from "./types";
3
3
  export declare const GEO_ELLIPSE_SEGMENTS = 32;
4
- export declare function getGeoOutlinePoints(bounds: Box, geo: GeoShapeKind): Vec[];
4
+ export declare const GEO_RECTANGLE_DEFAULT_CORNER_RADIUS_PERCENT = 12;
5
+ export declare const GEO_RECTANGLE_MAX_CORNER_RADIUS_PERCENT = 50;
6
+ export declare const GEO_RECTANGLE_CORNER_SEGMENTS = 4;
7
+ export declare function getGeoOutlinePoints(bounds: Box, geo: GeoShapeKind, options?: {
8
+ cornerRadiusPercent?: unknown;
9
+ }): Vec[];
5
10
  export declare function getGeoEllipsePoints(bounds: Box, segments?: number): Vec[];
6
- export declare function getGeoPolygonPoints(bounds: Box, geo: Exclude<GeoShapeKind, "ellipse">): Vec[];
7
- export declare function getGeoPolygonPoints(bounds: Box, geo: GeoShapeKind): Vec[];
11
+ export declare function normalizeGeoRectangleCornerRadiusPercent(value: unknown, fallback?: number): number;
12
+ export declare function getGeoRectangleCornerRadius({ cornerRadiusPercent, h, w, }: {
13
+ cornerRadiusPercent?: unknown;
14
+ h: number;
15
+ w: number;
16
+ }): number;
17
+ export declare function getGeoRoundedRectanglePoints(bounds: Box, radius?: number, segments?: number): Vec[];
18
+ export declare function getGeoPolygonPoints(bounds: Box, geo: Exclude<GeoShapeKind, "ellipse">, options?: {
19
+ cornerRadiusPercent?: unknown;
20
+ }): Vec[];
21
+ export declare function getGeoPolygonPoints(bounds: Box, geo: GeoShapeKind, options?: {
22
+ cornerRadiusPercent?: unknown;
23
+ }): Vec[];
8
24
  export declare function isPointInPolygon(point: Vec, points: readonly Vec[]): boolean;
@@ -1,7 +1,7 @@
1
1
  export { DiamondTool, EllipseTool, HexagonTool, RectangleTool, StarTool, TriangleTool, } from "./geoTools";
2
2
  export { GeoShapeUtil } from "./geoShapeUtil";
3
- export { GeoShapeSvgExporter, createGeoEditorPlugin } from "./editor";
4
- export { GeoShapeSvg, createGeoCanvasPlugin } from "./canvas";
3
+ export { GeoShapeSvgExporter, createGeoEditorRuntimePlugin } from "./editorRuntime";
4
+ export { GeoShapeSvg, createGeoCanvasRenderPlugin } from "./canvasRender";
5
5
  export { Geo, createGeoFeatureBundle } from "./feature";
6
6
  export type { GeoShapeKind, GeoShapeProps, GeoShapeRecord } from "./types";
7
7
  export { GEO_SHAPE_KINDS, isGeoShapeKind, isGeoShapeRecord } from "./types";
@@ -8,6 +8,7 @@ export interface GeoShapeProps {
8
8
  fill: ShapeColor;
9
9
  stroke: ShapeColor;
10
10
  strokeWidth: number;
11
+ cornerRadiusPercent: number;
11
12
  }
12
13
  export interface GeoShapeRecord extends ShapeRecordBase<"geo", GeoShapeProps> {
13
14
  type: "geo";
@@ -1,10 +1,10 @@
1
- import { type LandCanvasPlugin } from "../canvas-react/host/index";
1
+ import { type LandCanvasRenderPlugin } from "../canvas-react/host/index";
2
2
  import type { GroupShapeRecord } from "./groupShapeUtil";
3
3
  interface GroupShapeSvgProps {
4
4
  shape: GroupShapeRecord;
5
5
  isHovered?: boolean;
6
6
  isSelected?: boolean;
7
7
  }
8
- export declare function createGroupCanvasPlugin(): LandCanvasPlugin;
8
+ export declare function createGroupCanvasRenderPlugin(): LandCanvasRenderPlugin;
9
9
  export declare function GroupShapeSvg({ shape, isHovered, isSelected, }: GroupShapeSvgProps): import("react/jsx-runtime").JSX.Element;
10
10
  export {};
@@ -1,7 +1,7 @@
1
- import { type LandEditorPlugin, type ShapeSvgExporter, type SvgNode } from "../canvas-core/index";
1
+ import { type LandEditorRuntimePlugin, 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 createGroupEditorPlugin(): LandEditorPlugin;
7
+ export declare function createGroupEditorRuntimePlugin(): LandEditorRuntimePlugin;
@@ -1,5 +1,5 @@
1
1
  export { GroupShapeUtil } from "./groupShapeUtil";
2
2
  export type { GroupShapeProps, GroupShapeRecord } from "./groupShapeUtil";
3
- export { GroupShapeSvgExporter, createGroupEditorPlugin } from "./editor";
4
- export { createGroupCanvasPlugin } from "./canvas";
3
+ export { GroupShapeSvgExporter, createGroupEditorRuntimePlugin } from "./editorRuntime";
4
+ export { createGroupCanvasRenderPlugin } from "./canvasRender";
5
5
  export { Group, createGroupFeatureBundle } from "./feature";
@@ -1,5 +1,3 @@
1
- import { type LandEditorPlugin, type ShapeSvgExporter, type SvgExportContext, type SvgNode, type CanvasActionContext } from "../canvas-core/index";
2
- import { type ImageShapeRecord } from "./types";
3
1
  export declare const IMAGE_REPLACE_TOOLBAR_ACTION_ID = "image.replace";
4
2
  export declare const IMAGE_DOWNLOAD_TOOLBAR_ACTION_ID = "image.download-original";
5
3
  export declare const IMAGE_INSERT_TOOLBAR_ACTION_ID = "image.insert";
@@ -9,9 +7,3 @@ export declare const IMAGE_CROP_ZOOM_TOOLBAR_ACTION_ID = "image.crop.zoom";
9
7
  export declare const IMAGE_CROP_ASPECT_RATIO_TOOLBAR_ACTION_ID = "image.crop.aspect-ratio";
10
8
  export declare const IMAGE_CROP_RESET_TOOLBAR_ACTION_ID = "image.crop.reset";
11
9
  export declare const IMAGE_CORNER_RADIUS_TOOLBAR_ACTION_ID = "image.corner-radius";
12
- export declare class ImageShapeSvgExporter implements ShapeSvgExporter<ImageShapeRecord> {
13
- readonly type: "image";
14
- toSvg(shape: ImageShapeRecord, context: SvgExportContext): SvgNode | null;
15
- }
16
- export declare function createImageEditorPlugin(): LandEditorPlugin;
17
- export declare function isImageCropToolbarSession(context: CanvasActionContext): boolean;
@@ -0,0 +1,2 @@
1
+ import { type LandCanvasRenderPlugin } from "../canvas-react/host/index";
2
+ export declare function createImageCanvasRenderPlugin(): LandCanvasRenderPlugin;
@@ -0,0 +1,2 @@
1
+ import type { CanvasAction } from "../canvas-core/index";
2
+ export declare function createImageCropCanvasActions(): CanvasAction[];
@@ -0,0 +1,5 @@
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";
3
+ export { ImageShapeSvgExporter } from "./imageSvgExporter";
4
+ export { isImageCropToolbarSession, isImageSmudgeToolbarSession, } from "./runtimeShared";
5
+ export declare function createImageEditorRuntimePlugin(): LandEditorRuntimePlugin;
@@ -0,0 +1,2 @@
1
+ import type { CanvasAction } from "../canvas-core/index";
2
+ export declare function createImageHostToolbarActionContract(actionId: string): CanvasAction;
@@ -1,4 +1,4 @@
1
- import { Box, ShapeUtil, type ShapeSelectionHandleAnchorInput, type ShapeSelectionHandleAnchors, type ShapeSelectionResizeAspectRatioLockInput } from "../canvas-core/index";
1
+ import { Box, ShapeUtil, type ShapeEditEndInput, type ShapeSelectionHandleAnchorInput, type ShapeSelectionHandleAnchors, type ShapeSelectionResizeAspectRatioLockInput } from "../canvas-core/index";
2
2
  import type { ImageShapeProps, ImageShapeRecord } from "./types";
3
3
  export declare class ImageShapeUtil extends ShapeUtil<ImageShapeRecord> {
4
4
  readonly type: "image";
@@ -8,5 +8,6 @@ export declare class ImageShapeUtil extends ShapeUtil<ImageShapeRecord> {
8
8
  canReceiveTerminalBinding(_shape: ImageShapeRecord): boolean;
9
9
  getSelectionResizeAspectRatioLock(_shape: ImageShapeRecord, input: ShapeSelectionResizeAspectRatioLockInput): boolean | null;
10
10
  canEdit(_shape: ImageShapeRecord): boolean;
11
+ onEditEnd(shape: ImageShapeRecord, input: ShapeEditEndInput): void;
11
12
  getSelectionHandleAnchors(shape: ImageShapeRecord, input: ShapeSelectionHandleAnchorInput): ShapeSelectionHandleAnchors;
12
13
  }
@@ -0,0 +1,6 @@
1
+ import type { ShapeSvgExporter, SvgExportContext, SvgNode } from "../canvas-core/index";
2
+ import type { ImageShapeRecord } from "./types";
3
+ export declare class ImageShapeSvgExporter implements ShapeSvgExporter<ImageShapeRecord> {
4
+ readonly type: "image";
5
+ toSvg(shape: ImageShapeRecord, context: SvgExportContext): SvgNode | null;
6
+ }
@@ -1,8 +1,12 @@
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, createImageEditorPlugin, isImageCropToolbarSession, } from "./editor";
2
- export { createImageCanvasPlugin } from "./canvas";
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";
2
+ export { createImageCanvasRenderPlugin } from "./canvasRender";
3
3
  export { createImageCropInteractionHandler, createImageCropSelectionHandleInteractionHandler, } from "./cropInteractions";
4
- export { getImageCropModeMarkId } from "./crop";
4
+ export { createImageSmudgeInteractionHandler } from "./smudgeInteractions";
5
+ export { getImageCropModeMarkId, getImageCropRectOrDefault, } from "./crop";
6
+ 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";
5
9
  export { Image, createImageFeatureBundle } from "./feature";
6
10
  export { ImageShapeUtil } from "./imageShapeUtil";
7
- export type { ImageAssetProps, ImageAssetRecord, ImageShapeCrop, ImageShapeProps, ImageShapeRecord, } from "./types";
11
+ export type { ImageAssetProps, ImageAssetRecord, ImageAssetSource, ImageRemoteCopyState, ImageShapeCrop, ImageShapeProps, ImageShapeRecord, } from "./types";
8
12
  export { isImageAssetRecord, isImageShapeRecord } from "./types";
@@ -0,0 +1,5 @@
1
+ import type { CanvasActionContext } from "../canvas-core/index";
2
+ import { type ImageShapeRecord } from "./types";
3
+ export declare function getSingleSelectedImageShape(context: CanvasActionContext): ImageShapeRecord | null;
4
+ export declare function isImageCropToolbarSession(context: CanvasActionContext): boolean;
5
+ export declare function isImageSmudgeToolbarSession(context: CanvasActionContext): boolean;