@yuzhouu/canvas-kit 0.1.10 → 0.1.12
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.
- package/README.md +95 -40
- package/_vendor/canvas-core/bindings/bindingUtil.d.ts +15 -0
- package/_vendor/canvas-core/bindings/terminalPorts.d.ts +67 -0
- package/_vendor/canvas-core/editor/bindingReactionScope.d.ts +7 -0
- package/_vendor/canvas-core/editor/commands.d.ts +3 -3
- package/_vendor/canvas-core/editor/editor.d.ts +20 -5
- package/_vendor/canvas-core/editor/editorComputedHelpers.d.ts +1 -0
- package/_vendor/canvas-core/editor/historyManager.d.ts +2 -5
- package/_vendor/canvas-core/editor/interactions.d.ts +33 -9
- package/_vendor/canvas-core/editor/managers/bindingManager.d.ts +1 -6
- package/_vendor/canvas-core/editor/managers/queryManager.d.ts +13 -0
- package/_vendor/canvas-core/editor/managers/selectionLayoutManager.d.ts +3 -0
- package/_vendor/canvas-core/editor/managers/selectionOverlayManager.d.ts +1 -0
- package/_vendor/canvas-core/editor/managers/shapeEditingManager.d.ts +4 -0
- package/_vendor/canvas-core/editor/managers/shapeHierarchyManager.d.ts +1 -0
- package/_vendor/canvas-core/editor/managers/snapCalculations.d.ts +4 -1
- package/_vendor/canvas-core/editor/managers/snapGeometry.d.ts +2 -1
- package/_vendor/canvas-core/editor/operationManager.d.ts +74 -0
- package/_vendor/canvas-core/editor/selectionOverlay.d.ts +3 -1
- package/_vendor/canvas-core/exports/svg.d.ts +2 -3
- package/_vendor/canvas-core/geometry/contentCutout.d.ts +8 -0
- package/_vendor/canvas-core/index.d.ts +9 -5
- package/_vendor/canvas-core/shapes/colors.d.ts +2 -1
- package/_vendor/canvas-core/shapes/shapeUtil.d.ts +47 -1
- package/_vendor/canvas-core/tools/select/selectToolHelpers.d.ts +9 -2
- package/_vendor/canvas-core/tools/select/states/{draggingSelectionHandleInteractionState.d.ts → draggingPluginInteractionState.d.ts} +5 -4
- package/_vendor/canvas-core/tools/select/states/index.d.ts +1 -1
- package/_vendor/canvas-core/tools/select/states/pointingSelectionHandleInteractionState.d.ts +2 -2
- package/_vendor/canvas-core/tools/select/states/pointingShapeState.d.ts +1 -1
- package/_vendor/canvas-core/tools/select/states/resizingState.d.ts +1 -1
- package/_vendor/canvas-core/tools/select/states/rotatingState.d.ts +1 -1
- package/_vendor/canvas-core/tools/select/states/selectStateNode.d.ts +6 -2
- package/_vendor/canvas-core/tools/select/states/translatingState.d.ts +1 -1
- package/_vendor/canvas-plugin-sdk/capability.d.ts +10 -0
- package/_vendor/canvas-plugin-sdk/index.d.ts +2 -6
- package/_vendor/canvas-plugin-sdk/plugin.d.ts +18 -28
- package/_vendor/canvas-plugin-sdk/setupExtension.d.ts +5 -0
- package/_vendor/canvas-product-contracts/actionRegistry.d.ts +4 -0
- package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/actions.d.ts +14 -3
- package/_vendor/canvas-product-contracts/capability.d.ts +8 -0
- package/_vendor/canvas-product-contracts/chrome.d.ts +53 -0
- package/_vendor/canvas-product-contracts/chromeRegistry.d.ts +9 -0
- package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/contextMenu.d.ts +4 -0
- package/_vendor/canvas-product-contracts/contextMenuRegistry.d.ts +4 -0
- package/_vendor/canvas-product-contracts/exportRegistry.d.ts +6 -0
- package/_vendor/canvas-product-contracts/exports.d.ts +27 -0
- package/_vendor/canvas-product-contracts/importRegistry.d.ts +7 -0
- package/_vendor/canvas-product-contracts/imports.d.ts +39 -0
- package/_vendor/canvas-product-contracts/index.d.ts +15 -0
- package/_vendor/canvas-product-contracts/productApi.d.ts +29 -0
- package/_vendor/canvas-product-contracts/services.d.ts +21 -0
- package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/toolbar.d.ts +23 -4
- package/_vendor/canvas-product-contracts/toolbarRegistry.d.ts +9 -0
- package/_vendor/canvas-react/host/canvasRenderPlugin.d.ts +15 -4
- package/_vendor/canvas-react/host/index.d.ts +2 -2
- package/_vendor/plugin-arrow/api.d.ts +33 -0
- package/_vendor/plugin-arrow/arrowGeometry.d.ts +2 -1
- package/_vendor/plugin-arrow/arrowHeadGeometry.d.ts +8 -0
- package/_vendor/plugin-arrow/arrowShapeUtil.d.ts +2 -1
- package/_vendor/plugin-arrow/editorRuntime.d.ts +0 -2
- package/_vendor/plugin-arrow/feature.d.ts +2 -2
- package/_vendor/plugin-arrow/index.d.ts +4 -1
- package/_vendor/plugin-arrow/productRuntime.d.ts +2 -0
- package/_vendor/plugin-draw/DrawShapeRenderer.d.ts +5 -2
- package/_vendor/plugin-draw/drawPath.d.ts +7 -1
- package/_vendor/plugin-draw/editorRuntime.d.ts +1 -3
- package/_vendor/plugin-draw/feature.d.ts +2 -2
- package/_vendor/plugin-draw/index.d.ts +2 -1
- package/_vendor/plugin-draw/productRuntime.d.ts +2 -0
- package/_vendor/plugin-eraser/editorRuntime.d.ts +1 -3
- package/_vendor/plugin-eraser/feature.d.ts +2 -2
- package/_vendor/plugin-eraser/index.d.ts +2 -1
- package/_vendor/plugin-eraser/productRuntime.d.ts +2 -0
- package/_vendor/plugin-frame/api.d.ts +19 -0
- package/_vendor/plugin-frame/canvasRender.d.ts +3 -3
- package/_vendor/plugin-frame/editorRuntime.d.ts +0 -2
- package/_vendor/plugin-frame/feature.d.ts +2 -2
- package/_vendor/plugin-frame/frameShapeUtil.d.ts +8 -0
- package/_vendor/plugin-frame/index.d.ts +4 -1
- package/_vendor/plugin-frame/productRuntime.d.ts +2 -0
- package/_vendor/plugin-geo/api.d.ts +27 -0
- package/_vendor/plugin-geo/canvasRender.d.ts +3 -3
- package/_vendor/plugin-geo/editorRuntime.d.ts +1 -3
- package/_vendor/plugin-geo/feature.d.ts +2 -2
- package/_vendor/plugin-geo/geoStrokeStyle.d.ts +2 -0
- package/_vendor/plugin-geo/geoTools.d.ts +1 -1
- package/_vendor/plugin-geo/index.d.ts +7 -4
- package/_vendor/plugin-geo/productRuntime.d.ts +2 -0
- package/_vendor/plugin-geo/types.d.ts +5 -1
- package/_vendor/plugin-group/canvasRender.d.ts +1 -2
- package/_vendor/plugin-group/editorRuntime.d.ts +0 -2
- package/_vendor/plugin-group/feature.d.ts +2 -2
- package/_vendor/plugin-group/groupContributions.d.ts +1 -1
- package/_vendor/plugin-group/index.d.ts +2 -1
- package/_vendor/plugin-group/productRuntime.d.ts +2 -0
- package/_vendor/plugin-image/cropRuntime.d.ts +1 -1
- package/_vendor/plugin-image/editorRuntime.d.ts +0 -4
- package/_vendor/plugin-image/feature.d.ts +2 -2
- package/_vendor/plugin-image/imageHostActionContract.d.ts +1 -1
- package/_vendor/plugin-image/index.d.ts +2 -1
- package/_vendor/plugin-image/productRuntime.d.ts +4 -0
- package/_vendor/plugin-image/runtimeShared.d.ts +1 -1
- package/_vendor/plugin-image/smudgeRuntime.d.ts +1 -1
- package/_vendor/plugin-image/styleRuntime.d.ts +6 -1
- package/_vendor/plugin-image/toolbarRuntime.d.ts +1 -1
- package/_vendor/plugin-laser/editorRuntime.d.ts +1 -3
- package/_vendor/plugin-laser/feature.d.ts +2 -2
- package/_vendor/plugin-laser/index.d.ts +2 -1
- package/_vendor/plugin-laser/productRuntime.d.ts +2 -0
- package/_vendor/plugin-path/PathShapeRenderer.d.ts +5 -2
- package/_vendor/plugin-path/editorRuntime.d.ts +1 -15
- package/_vendor/plugin-path/feature.d.ts +2 -2
- package/_vendor/plugin-path/index.d.ts +2 -1
- package/_vendor/plugin-path/pathHistory.d.ts +13 -0
- package/_vendor/plugin-path/pathShapeUtil.d.ts +3 -1
- package/_vendor/plugin-path/pathTool.d.ts +3 -0
- package/_vendor/plugin-path/productRuntime.d.ts +15 -0
- package/_vendor/plugin-runtime-clipboard/capability.d.ts +1 -0
- package/{features/clipboard/clipboardContribution.d.ts → _vendor/plugin-runtime-clipboard/clipboardActions.d.ts} +1 -7
- package/{features/clipboard → _vendor/plugin-runtime-clipboard}/clipboardService.d.ts +3 -3
- package/_vendor/plugin-runtime-clipboard/index.d.ts +4 -0
- package/_vendor/plugin-runtime-clipboard/plugin.d.ts +1 -0
- package/_vendor/plugin-runtime-export/blobDataUrl.d.ts +1 -0
- package/_vendor/plugin-runtime-export/canvasExportApi.d.ts +43 -0
- package/_vendor/plugin-runtime-export/index.d.ts +8 -0
- package/_vendor/plugin-runtime-export/plugin.d.ts +5 -0
- package/_vendor/plugin-runtime-export/pngExport.d.ts +15 -0
- package/{features/export → _vendor/plugin-runtime-export}/svgExport.d.ts +9 -2
- package/_vendor/plugin-text/api.d.ts +20 -0
- package/_vendor/plugin-text/capabilities.d.ts +2 -0
- package/_vendor/plugin-text/editorRuntime.d.ts +2 -8
- package/_vendor/plugin-text/feature.d.ts +1 -1
- package/_vendor/plugin-text/geoLabelBindingUtil.d.ts +0 -2
- package/_vendor/plugin-text/host/TiptapTextEditor.d.ts +1 -1
- package/_vendor/plugin-text/host/initialTextBackground.d.ts +2 -0
- package/_vendor/plugin-text/host/richTextRendering.d.ts +1 -1
- package/_vendor/plugin-text/host/textEditingBoxStyle.d.ts +1 -1
- package/_vendor/plugin-text/host/textEntryFocus.d.ts +2 -1
- package/_vendor/plugin-text/host/textMeasurement.d.ts +10 -2
- package/_vendor/plugin-text/index.d.ts +7 -3
- package/_vendor/plugin-text/pathLabelBindingUtil.d.ts +55 -0
- package/_vendor/plugin-text/productRuntime.d.ts +6 -0
- package/_vendor/plugin-text/richTextUtils.d.ts +3 -2
- package/_vendor/plugin-text/shapeWideTextFormatting.d.ts +4 -0
- package/_vendor/plugin-text/textFormatting.d.ts +2 -0
- package/_vendor/plugin-text/textLabelHelpers.d.ts +23 -2
- package/_vendor/plugin-text/textShapeUtil.d.ts +5 -2
- package/_vendor/plugin-text/textTypes.d.ts +1 -0
- package/_vendor/signals/core.d.ts +1 -0
- package/_vendor/signals/index.d.ts +1 -1
- package/_vendor/store/history.d.ts +1 -1
- package/_vendor/store/store.d.ts +2 -0
- package/browser/indexedDb.d.ts +10 -10
- package/browser/persistence.d.ts +4 -25
- package/chrome/floating/useCanvasKitFloatingPosition.d.ts +1 -1
- package/chrome/toolbar/FloatingSelectionToolbarPageSpace.d.ts +5 -3
- package/chrome/toolbar/mergeToolbarGroups.d.ts +8 -0
- package/chrome/toolbar/toolbarLabels.d.ts +1 -1
- package/chrome/toolbar/useToolbarSurfaces.d.ts +9 -10
- package/chrome/types.d.ts +12 -9
- package/chrome/useCanvasKitChromeContext.d.ts +4 -7
- package/chrome/useChromeSurfaces.d.ts +12 -0
- package/chrome/useContextMenuSurface.d.ts +1 -1
- package/controller/canvasKitController.d.ts +4 -11
- package/core/index.d.ts +3 -4
- package/core/product-controller/canvasProductController.d.ts +40 -11
- package/core/product-controller/index.d.ts +1 -1
- package/core/runtime/productServices.d.ts +5 -19
- package/core/runtime/runtimeContracts.d.ts +3 -3
- package/features/context-menu/contextMenuRuntime.d.ts +1 -1
- package/features/image/asset/imageAssetService.d.ts +2 -3
- package/features/image/asset/imageBlobStore.d.ts +1 -0
- package/features/image/asset/imageFileHelpers.d.ts +0 -6
- package/features/image/asset/svgImageAssetInliner.d.ts +1 -1
- package/features/image/controller/imageProductController.d.ts +2 -2
- package/features/image/imageHostPlugin.d.ts +1 -0
- package/features/image/import/ImageImportController.d.ts +3 -1
- package/features/image/index.d.ts +1 -3
- package/features/image/smudge/imageSmudgeHostActions.d.ts +1 -1
- package/features/image/toolbar/imageHostActions.d.ts +8 -9
- package/features/image/toolbar/imageToolbarHostBridge.d.ts +1 -1
- package/features/text/{textProductPlugin.d.ts → textHostPlugin.d.ts} +1 -1
- package/features/text/textSvgAssetInliner.d.ts +3 -0
- package/features/text/textSvgAssetPlugin.d.ts +2 -0
- package/index.css +1 -1
- package/index.d.ts +31 -19
- package/index.mjs +88 -84
- package/package.json +2 -2
- package/plugins/runtime/import-host/CanvasImportHost.d.ts +4 -0
- package/plugins/runtime/import-host/capability.d.ts +1 -0
- package/plugins/runtime/import-host/index.d.ts +2 -0
- package/plugins/runtime/import-host/plugin.d.ts +1 -0
- package/plugins/runtime/keyboard-shortcuts/index.d.ts +1 -0
- package/plugins/runtime/keyboard-shortcuts/plugin.d.ts +1 -0
- package/plugins/runtime/keyboard-shortcuts/useCanvasKeyboardShortcuts.d.ts +8 -0
- package/plugins/runtime/tool-actions/capability.d.ts +1 -0
- package/plugins/runtime/tool-actions/index.d.ts +2 -0
- package/plugins/runtime/tool-actions/plugin.d.ts +1 -0
- package/plugins/runtime/tool-actions/toolActions.d.ts +2 -0
- package/plugins/standard/clipboard/chrome.d.ts +2 -0
- package/plugins/standard/clipboard/contextMenu.d.ts +2 -0
- package/plugins/standard/clipboard/plugin.d.ts +1 -0
- package/plugins/standard/clipboard/shortcuts.d.ts +5 -0
- package/plugins/standard/createStandardCanvasKitPlugins.d.ts +15 -0
- package/{features/selection/selectionActions.d.ts → plugins/standard/selection/actions.d.ts} +4 -2
- package/plugins/standard/selection/chrome.d.ts +2 -0
- package/plugins/standard/selection/contextMenu.d.ts +2 -0
- package/plugins/standard/selection/plugin.d.ts +1 -0
- package/plugins/standard/selection/toolbar.d.ts +2 -0
- package/plugins/standard/tool-ui/contextMenu.d.ts +2 -0
- package/plugins/standard/tool-ui/plugin.d.ts +1 -0
- package/plugins/standard/tool-ui/toolbar.d.ts +2 -0
- package/{features/view/viewActions.d.ts → plugins/standard/view/actions.d.ts} +1 -1
- package/plugins/standard/view/chrome.d.ts +2 -0
- package/plugins/standard/view/contextMenu.d.ts +2 -0
- package/plugins/standard/view/plugin.d.ts +1 -0
- package/{features/actions/actionRuntime.d.ts → runtime/canvasKitActionContext.d.ts} +3 -2
- package/runtime/canvasKitCommandExecutor.d.ts +1 -1
- package/runtime/canvasKitPluginContracts.d.ts +29 -76
- package/runtime/canvasKitPluginLifecycle.d.ts +32 -0
- package/runtime/canvasKitPluginSetup.d.ts +34 -0
- package/runtime/canvasKitPluginUi.d.ts +35 -0
- package/runtime/canvasKitResourceScope.d.ts +5 -0
- package/runtime/canvasKitRuntime.d.ts +9 -7
- package/runtime/canvasKitRuntimeContracts.d.ts +2 -5
- package/runtime/canvasPluginGraph.d.ts +15 -0
- package/runtime/persistenceCoordinator.d.ts +33 -0
- package/runtime/registries/actionRegistry.d.ts +5 -0
- package/runtime/registries/chromeRegistry.d.ts +2 -0
- package/runtime/registries/contextMenuRegistry.d.ts +5 -0
- package/runtime/registries/exportRegistry.d.ts +2 -0
- package/runtime/registries/importRegistry.d.ts +2 -0
- package/runtime/registries/index.d.ts +7 -0
- package/runtime/registries/productApiRegistry.d.ts +5 -0
- package/runtime/registries/toolbarRegistry.d.ts +5 -0
- package/_vendor/canvas-plugin-sdk/actionRegistry.d.ts +0 -7
- package/_vendor/canvas-plugin-sdk/contextMenuRegistry.d.ts +0 -11
- package/_vendor/canvas-plugin-sdk/toolbarRegistry.d.ts +0 -19
- package/_vendor/plugin-packaging/canvasRender.d.ts +0 -2
- package/_vendor/plugin-packaging/editorRuntime.d.ts +0 -2
- package/_vendor/plugin-packaging/feature.d.ts +0 -2
- package/_vendor/plugin-packaging/index.d.ts +0 -17
- package/_vendor/plugin-packaging/packagingArtwork.d.ts +0 -5
- package/_vendor/plugin-packaging/packagingDxf.d.ts +0 -9
- package/_vendor/plugin-packaging/packagingGeometry.d.ts +0 -74
- package/_vendor/plugin-packaging/packagingInteractions.d.ts +0 -2
- package/_vendor/plugin-packaging/packagingPdfExporter.d.ts +0 -25
- package/_vendor/plugin-packaging/packagingRuntime.d.ts +0 -11
- package/_vendor/plugin-packaging/packagingShapeUtil.d.ts +0 -34
- package/_vendor/plugin-packaging/packagingStyle.d.ts +0 -10
- package/_vendor/plugin-packaging/packagingSvgExporter.d.ts +0 -7
- package/_vendor/plugin-packaging/productRuntime.d.ts +0 -2
- package/_vendor/plugin-packaging/types.d.ts +0 -168
- package/_vendor/plugin-packaging/validation.d.ts +0 -3
- package/_vendor/plugin-text/arrowLabelBindingUtil.d.ts +0 -47
- package/builtins/controller/createBuiltInCanvasController.d.ts +0 -18
- package/builtins/controller/layerController.d.ts +0 -9
- package/builtins/controller/packagingController.d.ts +0 -71
- package/builtins/controller/shapeCreationController.d.ts +0 -83
- package/builtins/index.d.ts +0 -7
- package/builtins/plugins.d.ts +0 -16
- package/chrome/useSvgExport.d.ts +0 -15
- package/core/api/apiRegistry.d.ts +0 -12
- package/es-DocrZgUh.mjs +0 -2
- package/features/clipboard/clipboardContextMenuContributions.d.ts +0 -2
- package/features/clipboard/clipboardPlugin.d.ts +0 -1
- package/features/image/imageProductPlugin.d.ts +0 -1
- package/features/image/import/useImageImport.d.ts +0 -16
- package/features/keyboard/keyboardShortcutPlugin.d.ts +0 -1
- package/features/keyboard/useCanvasKitKeyboardShortcuts.d.ts +0 -8
- package/features/selection/selectionContextMenuContributions.d.ts +0 -2
- package/features/selection/selectionPlugin.d.ts +0 -1
- package/features/selection/selectionToolbarContributions.d.ts +0 -2
- package/features/tool/toolActions.d.ts +0 -2
- package/features/tool/toolContextMenuContributions.d.ts +0 -2
- package/features/tool/toolPlugin.d.ts +0 -1
- package/features/tool/toolToolbarContributions.d.ts +0 -2
- package/features/view/viewContextMenuContributions.d.ts +0 -2
- package/features/view/viewPlugin.d.ts +0 -1
- package/product/standardCanvasKitPlugins.d.ts +0 -4
- package/runtime/canvasKitPlugins.d.ts +0 -33
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { type CanvasProductContribution } from "../canvas-plugin-sdk/index";
|
|
2
1
|
import { type EditorPlugin, type ShapeSvgExporter, type SvgExportContext, type SvgNode } from "../canvas-core/index";
|
|
3
|
-
import {
|
|
2
|
+
import type { DrawShapeRecord } from "./types";
|
|
4
3
|
export declare class DrawShapeSvgExporter implements ShapeSvgExporter<DrawShapeRecord> {
|
|
5
4
|
readonly type: "draw";
|
|
6
5
|
toSvg(shape: DrawShapeRecord, context: SvgExportContext): SvgNode | null;
|
|
7
6
|
}
|
|
8
7
|
export declare function createDrawEditorPlugin(): EditorPlugin;
|
|
9
|
-
export declare function createDrawProductContribution(): CanvasProductContribution;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const Draw: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof
|
|
1
|
+
import { setupDrawProduct } from "./productRuntime";
|
|
2
|
+
export declare const Draw: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof setupDrawProduct>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { DrawTool } from "./drawTool";
|
|
2
2
|
export { DrawShapeUtil } from "./drawShapeUtil";
|
|
3
|
-
export { DrawShapeSvgExporter, createDrawEditorPlugin
|
|
3
|
+
export { DrawShapeSvgExporter, createDrawEditorPlugin } from "./editorRuntime";
|
|
4
|
+
export { setupDrawProduct } from "./productRuntime";
|
|
4
5
|
export { DrawShapeSvg } from "./DrawShapeRenderer";
|
|
5
6
|
export { createDrawCanvasRenderPlugin } from "./canvasRender";
|
|
6
7
|
export { Draw } from "./feature";
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type EditorPlugin } from "../canvas-core/index";
|
|
1
|
+
import type { EditorPlugin } from "../canvas-core/index";
|
|
3
2
|
export declare function createEraserEditorPlugin(): EditorPlugin;
|
|
4
|
-
export declare function createEraserProductContribution(): CanvasProductContribution;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const Eraser: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof
|
|
1
|
+
import { setupEraserProduct } from "./productRuntime";
|
|
2
|
+
export declare const Eraser: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof setupEraserProduct>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { EraserTool } from "./eraserTool";
|
|
2
2
|
export { createEraserCanvasRenderPlugin } from "./canvasRender";
|
|
3
|
-
export { createEraserEditorPlugin
|
|
3
|
+
export { createEraserEditorPlugin } from "./editorRuntime";
|
|
4
|
+
export { setupEraserProduct } from "./productRuntime";
|
|
4
5
|
export { getEraserRuntime } from "./eraserRuntime";
|
|
5
6
|
export { Eraser } from "./feature";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ShapeColor, ShapeId } from "../canvas-core/index";
|
|
2
|
+
import { type CanvasPluginApi, type CanvasShapeRef } from "../canvas-product-contracts/index";
|
|
3
|
+
export interface FrameInput {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
w?: number;
|
|
7
|
+
h?: number;
|
|
8
|
+
name?: string;
|
|
9
|
+
fill?: ShapeColor;
|
|
10
|
+
stroke?: ShapeColor;
|
|
11
|
+
strokeWidth?: number;
|
|
12
|
+
meta?: Record<string, unknown>;
|
|
13
|
+
}
|
|
14
|
+
export interface FrameApi {
|
|
15
|
+
create(input: FrameInput): CanvasShapeRef<"frame"> | null;
|
|
16
|
+
moveShapesToFrame(ids: ShapeId[], frameId: ShapeId): ShapeId[];
|
|
17
|
+
}
|
|
18
|
+
export declare const frameApiToken: import("../canvas-product-contracts/index").ProductApiToken<FrameApi>;
|
|
19
|
+
export declare const framePluginApi: CanvasPluginApi<FrameApi>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type CanvasRenderPlugin } from "../canvas-react/host/index";
|
|
2
|
-
import type
|
|
2
|
+
import { type FrameShapeRecord } from "./frameShapeUtil";
|
|
3
3
|
interface FrameShapeSvgProps {
|
|
4
4
|
shape: FrameShapeRecord;
|
|
5
|
-
|
|
5
|
+
hideName?: boolean;
|
|
6
6
|
}
|
|
7
7
|
export declare function createFrameCanvasRenderPlugin(): CanvasRenderPlugin;
|
|
8
|
-
export declare function FrameShapeSvg({ shape,
|
|
8
|
+
export declare function FrameShapeSvg({ shape, hideName, }: FrameShapeSvgProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type CanvasProductContribution } from "../canvas-plugin-sdk/index";
|
|
2
1
|
import { type EditorPlugin, type ShapeSvgExporter, type SvgNode, type SvgExportContext } from "../canvas-core/index";
|
|
3
2
|
import { type FrameShapeRecord } from "./frameShapeUtil";
|
|
4
3
|
export declare class FrameShapeSvgExporter implements ShapeSvgExporter<FrameShapeRecord> {
|
|
@@ -6,4 +5,3 @@ export declare class FrameShapeSvgExporter implements ShapeSvgExporter<FrameShap
|
|
|
6
5
|
toSvg(shape: FrameShapeRecord, context: SvgExportContext): SvgNode;
|
|
7
6
|
}
|
|
8
7
|
export declare function createFrameEditorPlugin(): EditorPlugin;
|
|
9
|
-
export declare function createFrameProductContribution(): CanvasProductContribution;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const Frame: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof
|
|
1
|
+
import { setupFrameProduct } from "./productRuntime";
|
|
2
|
+
export declare const Frame: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof setupFrameProduct>;
|
|
@@ -8,12 +8,20 @@ export interface FrameShapeProps {
|
|
|
8
8
|
strokeWidth: number;
|
|
9
9
|
}
|
|
10
10
|
export type FrameShapeRecord = ShapeRecordBase<"frame", FrameShapeProps>;
|
|
11
|
+
export declare const FRAME_NAME_BASELINE = -8;
|
|
12
|
+
export declare const FRAME_NAME_FALLBACK = "Frame";
|
|
13
|
+
export declare const FRAME_NAME_FONT_SIZE = 12;
|
|
14
|
+
export declare const FRAME_NAME_RENDER_HEIGHT = 34;
|
|
15
|
+
export declare function getFrameDisplayName(name: string): string;
|
|
16
|
+
export declare function getFrameRenderBounds(shape: FrameShapeRecord): Box;
|
|
11
17
|
export declare class FrameShapeUtil extends ShapeUtil<FrameShapeRecord> {
|
|
12
18
|
readonly type: "frame";
|
|
13
19
|
getDefaultProps(): FrameShapeProps;
|
|
14
20
|
validateProps(props: unknown): FrameShapeProps;
|
|
15
21
|
getLocalBounds(shape: FrameShapeRecord): Box;
|
|
22
|
+
getRenderBounds(shape: FrameShapeRecord): Box;
|
|
16
23
|
getPointHitTestBounds(shape: FrameShapeRecord): Box;
|
|
24
|
+
canEdit(_shape: FrameShapeRecord): boolean;
|
|
17
25
|
canReceiveChildren(_shape: FrameShapeRecord): boolean;
|
|
18
26
|
canSnapChildrenToSelf(_shape: FrameShapeRecord): boolean;
|
|
19
27
|
canReceiveTerminalBinding(_shape: FrameShapeRecord): boolean;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export { FrameShapeUtil } from "./frameShapeUtil";
|
|
2
|
+
export { frameApiToken } from "./api";
|
|
3
|
+
export type { FrameApi, FrameInput } from "./api";
|
|
2
4
|
export type { FrameShapeProps, FrameShapeRecord } from "./frameShapeUtil";
|
|
3
5
|
export { FrameTool } from "./frameTool";
|
|
4
|
-
export { FrameShapeSvgExporter, createFrameEditorPlugin
|
|
6
|
+
export { FrameShapeSvgExporter, createFrameEditorPlugin } from "./editorRuntime";
|
|
7
|
+
export { setupFrameProduct } from "./productRuntime";
|
|
5
8
|
export { createFrameCanvasRenderPlugin } from "./canvasRender";
|
|
6
9
|
export { Frame } from "./feature";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ShapeColor } from "../canvas-core/index";
|
|
2
|
+
import { type CanvasPluginApi, type CanvasShapeRef } from "../canvas-product-contracts/index";
|
|
3
|
+
import type { GeoShapeProps } from "./types";
|
|
4
|
+
export interface GeoShapeInput {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
w?: number;
|
|
8
|
+
h?: number;
|
|
9
|
+
fill?: ShapeColor;
|
|
10
|
+
stroke?: ShapeColor;
|
|
11
|
+
strokeStyle?: GeoShapeProps["strokeStyle"];
|
|
12
|
+
strokeWidth?: number;
|
|
13
|
+
meta?: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
export interface GeoRectangleInput extends GeoShapeInput {
|
|
16
|
+
cornerRadiusPercent?: GeoShapeProps["cornerRadiusPercent"];
|
|
17
|
+
}
|
|
18
|
+
export interface GeoApi {
|
|
19
|
+
createRectangle(input: GeoRectangleInput): CanvasShapeRef<"geo"> | null;
|
|
20
|
+
createEllipse(input: GeoShapeInput): CanvasShapeRef<"geo"> | null;
|
|
21
|
+
createRhombus(input: GeoShapeInput): CanvasShapeRef<"geo"> | null;
|
|
22
|
+
createTriangle(input: GeoShapeInput): CanvasShapeRef<"geo"> | null;
|
|
23
|
+
createHexagon(input: GeoShapeInput): CanvasShapeRef<"geo"> | null;
|
|
24
|
+
createStar(input: GeoShapeInput): CanvasShapeRef<"geo"> | null;
|
|
25
|
+
}
|
|
26
|
+
export declare const geoApiToken: import("../canvas-product-contracts/index").ProductApiToken<GeoApi>;
|
|
27
|
+
export declare const geoPluginApi: CanvasPluginApi<GeoApi>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { type ShapeColor } from "../canvas-core/index";
|
|
2
2
|
import { type CanvasRenderPlugin } from "../canvas-react/host/index";
|
|
3
|
-
import type { GeoShapeRecord } from "./types";
|
|
3
|
+
import type { GeoShapeRecord, GeoStrokeStyle } from "./types";
|
|
4
4
|
interface GeoShapeSvgProps {
|
|
5
5
|
shape: GeoShapeRecord;
|
|
6
6
|
fill?: ShapeColor;
|
|
7
|
-
isHovered?: boolean;
|
|
8
7
|
stroke?: ShapeColor;
|
|
8
|
+
strokeStyle?: GeoStrokeStyle;
|
|
9
9
|
strokeWidth?: number;
|
|
10
10
|
}
|
|
11
11
|
export declare function createGeoCanvasRenderPlugin(): CanvasRenderPlugin;
|
|
12
|
-
export declare function GeoShapeSvg({ shape, fill,
|
|
12
|
+
export declare function GeoShapeSvg({ shape, fill, stroke, strokeStyle, strokeWidth, }: GeoShapeSvgProps): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { type CanvasProductContribution } from "../canvas-plugin-sdk/index";
|
|
2
1
|
import { type EditorPlugin, type ShapeSvgExporter, type SvgExportContext, type SvgNode } from "../canvas-core/index";
|
|
3
|
-
import {
|
|
2
|
+
import type { GeoShapeRecord } from "./types";
|
|
4
3
|
export declare class GeoShapeSvgExporter implements ShapeSvgExporter<GeoShapeRecord> {
|
|
5
4
|
readonly type: "geo";
|
|
6
5
|
toSvg(shape: GeoShapeRecord, context: SvgExportContext): SvgNode;
|
|
7
6
|
}
|
|
8
7
|
export declare function createGeoEditorPlugin(): EditorPlugin;
|
|
9
|
-
export declare function createGeoProductContribution(): CanvasProductContribution;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const Geo: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof
|
|
1
|
+
import { setupGeoProduct } from "./productRuntime";
|
|
2
|
+
export declare const Geo: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof setupGeoProduct>;
|
|
@@ -12,7 +12,7 @@ export declare class RectangleTool extends BoxGeoTool {
|
|
|
12
12
|
export declare class EllipseTool extends BoxGeoTool {
|
|
13
13
|
constructor(editor: Editor);
|
|
14
14
|
}
|
|
15
|
-
export declare class
|
|
15
|
+
export declare class RhombusTool extends BoxGeoTool {
|
|
16
16
|
constructor(editor: Editor);
|
|
17
17
|
}
|
|
18
18
|
export declare class TriangleTool extends BoxGeoTool {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { EllipseTool, HexagonTool, RectangleTool, RhombusTool, StarTool, TriangleTool, } from "./geoTools";
|
|
2
|
+
export { geoApiToken } from "./api";
|
|
3
|
+
export type { GeoApi, GeoRectangleInput, GeoShapeInput, } from "./api";
|
|
2
4
|
export { GeoShapeUtil } from "./geoShapeUtil";
|
|
3
|
-
export { GeoShapeSvgExporter, createGeoEditorPlugin
|
|
5
|
+
export { GeoShapeSvgExporter, createGeoEditorPlugin } from "./editorRuntime";
|
|
6
|
+
export { setupGeoProduct } from "./productRuntime";
|
|
4
7
|
export { GeoShapeSvg, createGeoCanvasRenderPlugin } from "./canvasRender";
|
|
5
8
|
export { Geo } from "./feature";
|
|
6
|
-
export type { GeoShapeKind, GeoShapeProps, GeoShapeRecord } from "./types";
|
|
7
|
-
export { GEO_SHAPE_KINDS, isGeoShapeKind, isGeoShapeRecord } from "./types";
|
|
9
|
+
export type { GeoShapeKind, GeoShapeProps, GeoShapeRecord, GeoStrokeStyle, } from "./types";
|
|
10
|
+
export { GEO_SHAPE_KINDS, GEO_STROKE_STYLES, isGeoShapeKind, isGeoShapeRecord, isGeoStrokeStyle, } from "./types";
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { type ShapeColor, type BaseRecord, type ShapeRecordBase } from "../canvas-core/index";
|
|
2
|
-
export declare const GEO_SHAPE_KINDS: readonly ["rectangle", "ellipse", "
|
|
2
|
+
export declare const GEO_SHAPE_KINDS: readonly ["rectangle", "ellipse", "rhombus", "triangle", "hexagon", "star"];
|
|
3
3
|
export type GeoShapeKind = (typeof GEO_SHAPE_KINDS)[number];
|
|
4
|
+
export declare const GEO_STROKE_STYLES: readonly ["solid", "dashed", "dotted", "none"];
|
|
5
|
+
export type GeoStrokeStyle = (typeof GEO_STROKE_STYLES)[number];
|
|
4
6
|
export interface GeoShapeProps {
|
|
5
7
|
w: number;
|
|
6
8
|
h: number;
|
|
7
9
|
geo: GeoShapeKind;
|
|
8
10
|
fill: ShapeColor;
|
|
9
11
|
stroke: ShapeColor;
|
|
12
|
+
strokeStyle: GeoStrokeStyle;
|
|
10
13
|
strokeWidth: number;
|
|
11
14
|
cornerRadiusPercent: number;
|
|
12
15
|
}
|
|
@@ -16,3 +19,4 @@ export interface GeoShapeRecord extends ShapeRecordBase<"geo", GeoShapeProps> {
|
|
|
16
19
|
}
|
|
17
20
|
export declare function isGeoShapeRecord(record: BaseRecord | null | undefined): record is GeoShapeRecord;
|
|
18
21
|
export declare function isGeoShapeKind(value: unknown): value is GeoShapeKind;
|
|
22
|
+
export declare function isGeoStrokeStyle(value: unknown): value is GeoStrokeStyle;
|
|
@@ -2,9 +2,8 @@ import { type CanvasRenderPlugin } from "../canvas-react/host/index";
|
|
|
2
2
|
import type { GroupShapeRecord } from "./groupShapeUtil";
|
|
3
3
|
interface GroupShapeSvgProps {
|
|
4
4
|
shape: GroupShapeRecord;
|
|
5
|
-
isHovered?: boolean;
|
|
6
5
|
isSelected?: boolean;
|
|
7
6
|
}
|
|
8
7
|
export declare function createGroupCanvasRenderPlugin(): CanvasRenderPlugin;
|
|
9
|
-
export declare function GroupShapeSvg({ shape,
|
|
8
|
+
export declare function GroupShapeSvg({ shape, isSelected, }: GroupShapeSvgProps): import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type CanvasProductContribution } from "../canvas-plugin-sdk/index";
|
|
2
1
|
import { type EditorPlugin, type ShapeSvgExporter, type SvgNode } from "../canvas-core/index";
|
|
3
2
|
import { type GroupShapeRecord } from "./groupShapeUtil";
|
|
4
3
|
export declare class GroupShapeSvgExporter implements ShapeSvgExporter<GroupShapeRecord> {
|
|
@@ -6,4 +5,3 @@ export declare class GroupShapeSvgExporter implements ShapeSvgExporter<GroupShap
|
|
|
6
5
|
toSvg(_shape: GroupShapeRecord): SvgNode;
|
|
7
6
|
}
|
|
8
7
|
export declare function createGroupEditorPlugin(): EditorPlugin;
|
|
9
|
-
export declare function createGroupProductContribution(): CanvasProductContribution;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const Group: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof
|
|
1
|
+
import { setupGroupProduct } from "./productRuntime";
|
|
2
|
+
export declare const Group: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof setupGroupProduct>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CanvasAction, type ContextMenuContribution, type ToolbarContribution } from "../canvas-
|
|
1
|
+
import { type CanvasAction, type ContextMenuContribution, type ToolbarContribution } from "../canvas-product-contracts/index";
|
|
2
2
|
export declare const GROUP_SELECTION_ACTION_ID = "group.selection.group";
|
|
3
3
|
export declare const UNGROUP_SELECTION_ACTION_ID = "group.selection.ungroup";
|
|
4
4
|
export declare const groupSelectionAction: CanvasAction;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { GroupShapeUtil } from "./groupShapeUtil";
|
|
2
2
|
export type { GroupShapeProps, GroupShapeRecord } from "./groupShapeUtil";
|
|
3
|
-
export { GroupShapeSvgExporter, createGroupEditorPlugin
|
|
3
|
+
export { GroupShapeSvgExporter, createGroupEditorPlugin } from "./editorRuntime";
|
|
4
|
+
export { setupGroupProduct } from "./productRuntime";
|
|
4
5
|
export { createGroupCanvasRenderPlugin } from "./canvasRender";
|
|
5
6
|
export { Group } from "./feature";
|
|
6
7
|
export { groupContextMenuContribution, GROUP_SELECTION_ACTION_ID, groupSelectionAction, groupToolbarContribution, UNGROUP_SELECTION_ACTION_ID, ungroupSelectionAction, } from "./groupContributions";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { type CanvasAction } from "../canvas-
|
|
1
|
+
import { type CanvasAction } from "../canvas-product-contracts/index";
|
|
2
2
|
export declare function createImageCropCanvasActions(): CanvasAction[];
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { type CanvasProductContribution } from "../canvas-plugin-sdk/index";
|
|
2
1
|
import type { EditorPlugin } from "../canvas-core/index";
|
|
3
|
-
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";
|
|
4
2
|
export { ImageShapeSvgExporter } from "./imageSvgExporter";
|
|
5
|
-
export { isImageCropToolbarSession, isImageSmudgeToolbarSession, } from "./runtimeShared";
|
|
6
3
|
export declare function createImageEditorPlugin(): EditorPlugin;
|
|
7
|
-
export declare function createImageProductContribution(): CanvasProductContribution;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const Image: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof
|
|
1
|
+
import { setupImageProduct } from "./productRuntime";
|
|
2
|
+
export declare const Image: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof setupImageProduct>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { type CanvasAction } from "../canvas-
|
|
1
|
+
import { type CanvasAction } from "../canvas-product-contracts/index";
|
|
2
2
|
export declare function createImageHostToolbarActionContract(actionId: string): CanvasAction;
|
|
@@ -1,4 +1,5 @@
|
|
|
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,
|
|
1
|
+
export { IMAGE_CROP_ASPECT_RATIO_TOOLBAR_ACTION_ID, IMAGE_CROP_DONE_TOOLBAR_ACTION_ID, IMAGE_CROP_RESET_TOOLBAR_ACTION_ID, IMAGE_CROP_TOOLBAR_ACTION_ID, IMAGE_CROP_ZOOM_TOOLBAR_ACTION_ID, IMAGE_CORNER_RADIUS_TOOLBAR_ACTION_ID, IMAGE_DOWNLOAD_TOOLBAR_ACTION_ID, IMAGE_INSERT_TOOLBAR_ACTION_ID, IMAGE_REPLACE_TOOLBAR_ACTION_ID, isImageCropToolbarSession, isImageSmudgeToolbarSession, setupImageProduct, } from "./productRuntime";
|
|
2
|
+
export { ImageShapeSvgExporter, createImageEditorPlugin, } from "./editorRuntime";
|
|
2
3
|
export { createImageCanvasRenderPlugin } from "./canvasRender";
|
|
3
4
|
export { createImageCropInteractionHandler, createImageCropSelectionHandleInteractionHandler, } from "./cropInteractions";
|
|
4
5
|
export { createImageSmudgeInteractionHandler } from "./smudgeInteractions";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type CanvasPluginSetupContext } from "../canvas-plugin-sdk/index";
|
|
2
|
+
export { IMAGE_CORNER_RADIUS_TOOLBAR_ACTION_ID, IMAGE_CROP_ASPECT_RATIO_TOOLBAR_ACTION_ID, IMAGE_CROP_DONE_TOOLBAR_ACTION_ID, IMAGE_CROP_RESET_TOOLBAR_ACTION_ID, IMAGE_CROP_TOOLBAR_ACTION_ID, IMAGE_CROP_ZOOM_TOOLBAR_ACTION_ID, IMAGE_DOWNLOAD_TOOLBAR_ACTION_ID, IMAGE_INSERT_TOOLBAR_ACTION_ID, IMAGE_REPLACE_TOOLBAR_ACTION_ID, } from "./actionIds";
|
|
3
|
+
export { isImageCropToolbarSession, isImageSmudgeToolbarSession, } from "./runtimeShared";
|
|
4
|
+
export declare function setupImageProduct(context: CanvasPluginSetupContext): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CanvasActionContext } from "../canvas-
|
|
1
|
+
import { type CanvasActionContext } from "../canvas-product-contracts/index";
|
|
2
2
|
import { type ImageShapeRecord } from "./types";
|
|
3
3
|
export declare function getSingleSelectedImageShape(context: CanvasActionContext): ImageShapeRecord | null;
|
|
4
4
|
export declare function isImageCropToolbarSession(context: CanvasActionContext): boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { type CanvasAction } from "../canvas-
|
|
1
|
+
import { type CanvasAction } from "../canvas-product-contracts/index";
|
|
2
2
|
export declare function createImageSmudgeCanvasActions(): CanvasAction[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CanvasAction, type ToolbarGroup } from "../canvas-
|
|
1
|
+
import { type CanvasAction, type ToolbarGroup } from "../canvas-product-contracts/index";
|
|
2
2
|
export declare function createImageStyleCanvasActions(): CanvasAction[];
|
|
3
3
|
export declare function createImageCornerRadiusToolbarGroup({ dataUiPrefix, id, order, }: {
|
|
4
4
|
dataUiPrefix: string;
|
|
@@ -12,6 +12,11 @@ export declare function createImageCornerRadiusToolbarItem({ dataUiPrefix, }: {
|
|
|
12
12
|
id: string;
|
|
13
13
|
actionId: string;
|
|
14
14
|
label: string;
|
|
15
|
+
icon: string;
|
|
15
16
|
placeholder: string;
|
|
17
|
+
suffix: string;
|
|
18
|
+
validate: typeof isValidImageCornerRadiusToolbarValue;
|
|
16
19
|
dataUi: string;
|
|
17
20
|
};
|
|
21
|
+
declare function isValidImageCornerRadiusToolbarValue(value: string): boolean;
|
|
22
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { type ContextMenuContribution, type ToolbarContribution } from "../canvas-
|
|
1
|
+
import { type ContextMenuContribution, type ToolbarContribution } from "../canvas-product-contracts/index";
|
|
2
2
|
export declare function createImageToolbarContributions(): ToolbarContribution[];
|
|
3
3
|
export declare function createImageContextMenuContributions(): ContextMenuContribution[];
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type EditorPlugin } from "../canvas-core/index";
|
|
1
|
+
import type { EditorPlugin } from "../canvas-core/index";
|
|
3
2
|
export declare function createLaserEditorPlugin(): EditorPlugin;
|
|
4
|
-
export declare function createLaserProductContribution(): CanvasProductContribution;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const Laser: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof
|
|
1
|
+
import { setupLaserProduct } from "./productRuntime";
|
|
2
|
+
export declare const Laser: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof setupLaserProduct>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { LaserTool } from "./laserTool";
|
|
2
2
|
export { createLaserCanvasRenderPlugin } from "./canvasRender";
|
|
3
|
-
export { createLaserEditorPlugin
|
|
3
|
+
export { createLaserEditorPlugin } from "./editorRuntime";
|
|
4
|
+
export { setupLaserProduct } from "./productRuntime";
|
|
4
5
|
export { getLaserRuntime } from "./laserRuntime";
|
|
5
6
|
export { Laser } from "./feature";
|
|
@@ -2,11 +2,14 @@ import { type ShapeColor, type ShapeEditingSession } from "../canvas-core/index"
|
|
|
2
2
|
import type { PathShapeRecord } from "./types";
|
|
3
3
|
interface PathShapeSvgProps {
|
|
4
4
|
shape: PathShapeRecord;
|
|
5
|
-
isHovered?: boolean;
|
|
6
5
|
shapeEditingSession?: ShapeEditingSession | null;
|
|
7
6
|
fill?: ShapeColor;
|
|
8
7
|
stroke?: ShapeColor;
|
|
9
8
|
strokeWidth?: number;
|
|
10
9
|
}
|
|
11
|
-
export declare function PathShapeSvg({ shape,
|
|
10
|
+
export declare function PathShapeSvg({ shape, shapeEditingSession, fill, stroke, strokeWidth, }: PathShapeSvgProps): import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
export declare function PathShapeHoverSvg({ shape, strokeWidth, }: {
|
|
12
|
+
shape: PathShapeRecord;
|
|
13
|
+
strokeWidth: number;
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
12
15
|
export {};
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
import { type CanvasProductContribution } from "../canvas-plugin-sdk/index";
|
|
2
1
|
import { type EditorPlugin, type ShapeSvgExporter, type SvgExportContext, type SvgNode } from "../canvas-core/index";
|
|
3
|
-
import {
|
|
4
|
-
export declare const PATH_EDIT_TOOLBAR_ACTION_ID = "path.edit";
|
|
5
|
-
export declare const PATH_EDIT_SNAP_ACTION_ID = "path.edit.snap-nodes";
|
|
6
|
-
export declare const PATH_BOOLEAN_UNION_ACTION_ID = "path.boolean.union";
|
|
7
|
-
export declare const PATH_BOOLEAN_SUBTRACT_ACTION_ID = "path.boolean.subtract";
|
|
8
|
-
export declare const PATH_BOOLEAN_INTERSECT_ACTION_ID = "path.boolean.intersect";
|
|
9
|
-
export declare const PATH_BOOLEAN_XOR_ACTION_ID = "path.boolean.xor";
|
|
10
|
-
export declare const PATH_NODE_DELETE_ACTION_ID = "path.node.delete";
|
|
11
|
-
export declare const PATH_NODE_MAKE_CURVE_ACTION_ID = "path.node.make-curve";
|
|
12
|
-
export declare const PATH_NODE_REMOVE_HANDLES_ACTION_ID = "path.node.remove-handles";
|
|
13
|
-
export declare const PATH_NODE_MERGE_ACTION_ID = "path.node.merge";
|
|
14
|
-
export declare const PATH_NODE_JOIN_ACTION_ID = "path.node.join";
|
|
15
|
-
export declare const PATH_NODE_SEPARATE_ACTION_ID = "path.node.separate";
|
|
2
|
+
import type { PathShapeRecord } from "./types";
|
|
16
3
|
export declare class PathShapeSvgExporter implements ShapeSvgExporter<PathShapeRecord> {
|
|
17
4
|
readonly type: "path";
|
|
18
5
|
toSvg(shape: PathShapeRecord, context: SvgExportContext): SvgNode | null;
|
|
19
6
|
}
|
|
20
7
|
export declare function createPathEditorPlugin(): EditorPlugin;
|
|
21
|
-
export declare function createPathProductContribution(): CanvasProductContribution;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const Path: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof
|
|
1
|
+
import { setupPathProduct } from "./productRuntime";
|
|
2
|
+
export declare const Path: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof setupPathProduct>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { createPathCanvasRenderPlugin } from "./canvasRender";
|
|
2
|
-
export {
|
|
2
|
+
export { PathShapeSvgExporter, createPathEditorPlugin, } from "./editorRuntime";
|
|
3
|
+
export { PATH_BOOLEAN_INTERSECT_ACTION_ID, PATH_BOOLEAN_SUBTRACT_ACTION_ID, PATH_BOOLEAN_UNION_ACTION_ID, PATH_BOOLEAN_XOR_ACTION_ID, PATH_EDIT_DONE_ACTION_ID, PATH_EDIT_TOOLBAR_ACTION_ID, PATH_EDIT_SNAP_ACTION_ID, PATH_NODE_DELETE_ACTION_ID, PATH_NODE_JOIN_ACTION_ID, PATH_NODE_MAKE_CURVE_ACTION_ID, PATH_NODE_MERGE_ACTION_ID, PATH_NODE_REMOVE_HANDLES_ACTION_ID, PATH_NODE_SEPARATE_ACTION_ID, setupPathProduct, } from "./productRuntime";
|
|
3
4
|
export { Path } from "./feature";
|
|
4
5
|
export { PATH_CONTROL_HANDLE_TYPE, PATH_NODE_HANDLE_TYPE, createPathControlHandleId, createPathNodeHandleId, parsePathHandle, type PathControlHandleKind, type PathControlHandleInfo, type PathHandleInfo, type PathNodeHandleInfo, } from "./pathHandles";
|
|
5
6
|
export { PathShapeUtil } from "./pathShapeUtil";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type Editor, type ShapeId } from "../canvas-core/index";
|
|
2
|
+
import { type PathShapeRecord } from "./types";
|
|
3
|
+
export type PathHistoryMode = "create" | "edit";
|
|
4
|
+
interface PathHistorySessionOptions {
|
|
5
|
+
onApply?: (shape: PathShapeRecord) => void;
|
|
6
|
+
onBoundaryUndo?: () => boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function startPathHistorySession(editor: Editor, mode: PathHistoryMode, shapeId: ShapeId, options?: PathHistorySessionOptions): boolean;
|
|
9
|
+
export declare function recordPathHistoryStep(editor: Editor, shapeId: ShapeId): boolean;
|
|
10
|
+
export declare function replaceCurrentPathHistoryStep(editor: Editor, shapeId: ShapeId): boolean;
|
|
11
|
+
export declare function endPathHistorySession(editor: Editor, mode: PathHistoryMode, shapeId: ShapeId): boolean;
|
|
12
|
+
export declare function hasPathHistoryNetChanges(editor: Editor, mode: PathHistoryMode, shapeId: ShapeId): boolean;
|
|
13
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Box, ShapeUtil, Vec, type ShapeBrushSelectInput, type ShapeBrushWrapInput, type ShapeHandleSnapGeometry, type ShapeLineSegmentHitTestInput, type ShapePointHitTestInput, type ShapeSelectionHandleAnchorInput, type ShapeSelectionHandleAnchors, type ShapeSelectionFrameInput, type ShapeSelectionOverlayInfo, type ShapeSelectionOverlayInfoInput, type ShapeSelectionResizeInput, type ShapeUpdate } from "../canvas-core/index";
|
|
1
|
+
import { Box, ShapeUtil, Vec, type ShapeBrushSelectInput, type ShapeBrushWrapInput, type ShapeBindingPointInput, type ShapeHandleSnapGeometry, type ShapeLineSegmentHitTestInput, type ShapePointHitTestInput, type ShapeSelectionHandleAnchorInput, type ShapeSelectionHandleAnchors, type ShapeSelectionFrameInput, type ShapeSelectionOverlayInfo, type ShapeSelectionOverlayInfoInput, type ShapeSelectionResizeInput, type ShapeTerminalBindingOutline, type ShapeUpdate } from "../canvas-core/index";
|
|
2
2
|
import { type PathShapeProps, type PathShapeRecord } from "./types";
|
|
3
3
|
export declare class PathShapeUtil extends ShapeUtil<PathShapeRecord> {
|
|
4
4
|
readonly type: "path";
|
|
@@ -11,6 +11,8 @@ export declare class PathShapeUtil extends ShapeUtil<PathShapeRecord> {
|
|
|
11
11
|
getSelectionResizeLocalBounds(shape: PathShapeRecord): Box;
|
|
12
12
|
resizeSelectionBounds(shape: PathShapeRecord, input: ShapeSelectionResizeInput): ShapeUpdate;
|
|
13
13
|
getPositionedOutlineVertices(shape: PathShapeRecord): Vec[];
|
|
14
|
+
getTerminalBindingOutlines(shape: PathShapeRecord): readonly ShapeTerminalBindingOutline[];
|
|
15
|
+
resolveBindingPoint(shape: PathShapeRecord, input: ShapeBindingPointInput): Vec;
|
|
14
16
|
getHandleSnapGeometry(shape: PathShapeRecord): ShapeHandleSnapGeometry;
|
|
15
17
|
canReceiveTerminalBinding(_shape: PathShapeRecord): boolean;
|
|
16
18
|
canEdit(_shape: PathShapeRecord): boolean;
|
|
@@ -21,6 +21,7 @@ interface PathPointerModifiers {
|
|
|
21
21
|
}
|
|
22
22
|
export declare class PathTool extends StateNode {
|
|
23
23
|
draft: PathDraft | null;
|
|
24
|
+
private operation;
|
|
24
25
|
constructor(editor: Editor);
|
|
25
26
|
protected onEnter(): void;
|
|
26
27
|
protected onExit(): void;
|
|
@@ -35,5 +36,7 @@ export declare class PathTool extends StateNode {
|
|
|
35
36
|
finishDraftAndEdit(): void;
|
|
36
37
|
cancelDraft(): void;
|
|
37
38
|
hasDraft(): boolean;
|
|
39
|
+
private commitOperation;
|
|
40
|
+
private cancelOperation;
|
|
38
41
|
}
|
|
39
42
|
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type CanvasPluginSetupContext } from "../canvas-plugin-sdk/index";
|
|
2
|
+
export declare const PATH_EDIT_TOOLBAR_ACTION_ID = "path.edit";
|
|
3
|
+
export declare const PATH_EDIT_DONE_ACTION_ID = "path.edit.done";
|
|
4
|
+
export declare const PATH_EDIT_SNAP_ACTION_ID = "path.edit.snap-nodes";
|
|
5
|
+
export declare const PATH_BOOLEAN_UNION_ACTION_ID = "path.boolean.union";
|
|
6
|
+
export declare const PATH_BOOLEAN_SUBTRACT_ACTION_ID = "path.boolean.subtract";
|
|
7
|
+
export declare const PATH_BOOLEAN_INTERSECT_ACTION_ID = "path.boolean.intersect";
|
|
8
|
+
export declare const PATH_BOOLEAN_XOR_ACTION_ID = "path.boolean.xor";
|
|
9
|
+
export declare const PATH_NODE_DELETE_ACTION_ID = "path.node.delete";
|
|
10
|
+
export declare const PATH_NODE_MAKE_CURVE_ACTION_ID = "path.node.make-curve";
|
|
11
|
+
export declare const PATH_NODE_REMOVE_HANDLES_ACTION_ID = "path.node.remove-handles";
|
|
12
|
+
export declare const PATH_NODE_MERGE_ACTION_ID = "path.node.merge";
|
|
13
|
+
export declare const PATH_NODE_JOIN_ACTION_ID = "path.node.join";
|
|
14
|
+
export declare const PATH_NODE_SEPARATE_ACTION_ID = "path.node.separate";
|
|
15
|
+
export declare function setupPathProduct(context: CanvasPluginSetupContext): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const canvasClipboardRuntimeCapability: import("../canvas-plugin-sdk/index").CanvasPluginValueToken<true>;
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import { type CanvasAction } from "
|
|
2
|
-
import type { KeyboardShortcutInput } from "../../_vendor/canvas-core/index";
|
|
3
|
-
import type { ProductServiceRegistry } from "../../core/runtime/productServices";
|
|
1
|
+
import { type CanvasAction, type ProductServiceRegistry } from "../canvas-product-contracts/index";
|
|
4
2
|
export declare const SYSTEM_CLIPBOARD_COPY_ACTION_ID = "system.clipboard.copy";
|
|
5
3
|
export declare const SYSTEM_CLIPBOARD_CUT_ACTION_ID = "system.clipboard.cut";
|
|
6
4
|
export declare const SYSTEM_CLIPBOARD_PASTE_ACTION_ID = "system.clipboard.paste";
|
|
7
5
|
export declare const SYSTEM_CLIPBOARD_PASTE_AT_POINT_ACTION_ID = "system.clipboard.paste-at-point";
|
|
8
|
-
export declare const clipboardActionShortcuts: readonly {
|
|
9
|
-
actionId: string;
|
|
10
|
-
shortcut: KeyboardShortcutInput;
|
|
11
|
-
}[];
|
|
12
6
|
export declare function createClipboardActions(services: ProductServiceRegistry): readonly CanvasAction[];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { EditorClipboardPayload } from "
|
|
2
|
-
import { type ProductServiceFactory, type ProductServiceRegistry } from "
|
|
1
|
+
import type { EditorClipboardPayload } from "../canvas-core/index";
|
|
2
|
+
import { type ProductServiceFactory, type ProductServiceRegistry } from "../canvas-product-contracts/index";
|
|
3
3
|
export interface CanvasClipboardService {
|
|
4
4
|
write(payload: EditorClipboardPayload): Promise<void>;
|
|
5
5
|
read(): Promise<EditorClipboardPayload | null>;
|
|
6
6
|
getMemoryPayload(): EditorClipboardPayload | null;
|
|
7
7
|
}
|
|
8
|
-
export declare const canvasClipboardServiceToken: import("
|
|
8
|
+
export declare const canvasClipboardServiceToken: import("../canvas-product-contracts/index").ProductServiceToken<CanvasClipboardService>;
|
|
9
9
|
export declare function getCanvasClipboardService(services: ProductServiceRegistry): CanvasClipboardService | null;
|
|
10
10
|
export declare function memoryCanvasClipboardService(): ProductServiceFactory<CanvasClipboardService>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DefaultClipboardRuntimePlugin: import("../canvas-plugin-sdk/index").CanvasPlugin<(context: import("../canvas-plugin-sdk/index").CanvasPluginSetupContext) => void>;
|