@yuzhouu/canvas-kit 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +204 -101
- package/_vendor/canvas-core/bindings/bindingUtil.d.ts +23 -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/cameraPanSession.d.ts +9 -0
- package/_vendor/canvas-core/editor/canvasPanInteraction.d.ts +2 -0
- package/_vendor/canvas-core/editor/commands.d.ts +16 -4
- package/_vendor/canvas-core/editor/createEditorWithPlugins.d.ts +6 -0
- package/_vendor/canvas-core/editor/editor.d.ts +44 -31
- package/_vendor/canvas-core/editor/editorComputedHelpers.d.ts +5 -2
- package/_vendor/canvas-core/editor/historyManager.d.ts +24 -6
- package/_vendor/canvas-core/editor/index.d.ts +2 -2
- package/_vendor/canvas-core/editor/interactions.d.ts +41 -8
- package/_vendor/canvas-core/editor/managers/bindingManager.d.ts +2 -6
- package/_vendor/canvas-core/editor/managers/inputsManager.d.ts +3 -0
- package/_vendor/canvas-core/editor/managers/interactionTransientManager.d.ts +0 -26
- package/_vendor/canvas-core/editor/managers/queryManager.d.ts +26 -1
- package/_vendor/canvas-core/editor/managers/selectionLayoutManager.d.ts +5 -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/shapeGeometryManager.d.ts +3 -2
- package/_vendor/canvas-core/editor/managers/shapeHierarchyManager.d.ts +7 -2
- package/_vendor/canvas-core/editor/managers/shapeReparenting.d.ts +3 -2
- 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/managers/snapTypes.d.ts +1 -0
- package/_vendor/canvas-core/editor/managers/spatialIndexManager.d.ts +1 -0
- package/_vendor/canvas-core/editor/operationManager.d.ts +74 -0
- package/_vendor/canvas-core/editor/queries/shapeTransforms.d.ts +32 -12
- package/_vendor/canvas-core/editor/selection.d.ts +19 -5
- package/_vendor/canvas-core/editor/selectionOverlay.d.ts +7 -4
- package/_vendor/canvas-core/editor/selectionResizeCapabilities.d.ts +9 -0
- package/_vendor/canvas-core/editor/shapeTransformSpace.d.ts +6 -0
- package/_vendor/canvas-core/exports/svg.d.ts +3 -3
- package/_vendor/canvas-core/geometry/contentCutout.d.ts +8 -0
- package/_vendor/canvas-core/geometry/index.d.ts +1 -0
- package/_vendor/canvas-core/geometry/mat.d.ts +6 -2
- package/_vendor/canvas-core/geometry/polygon.d.ts +7 -0
- package/_vendor/canvas-core/geometry/vec.d.ts +0 -2
- package/_vendor/canvas-core/index.d.ts +21 -23
- package/_vendor/canvas-core/plugins/editorRuntimePlugin.d.ts +4 -10
- package/_vendor/canvas-core/plugins/editorRuntimeRegistry.d.ts +19 -0
- package/_vendor/canvas-core/plugins/index.d.ts +2 -1
- package/_vendor/canvas-core/schema/records.d.ts +2 -7
- package/_vendor/canvas-core/schema/snapshots.d.ts +10 -19
- package/_vendor/canvas-core/shapes/colors.d.ts +3 -3
- package/_vendor/canvas-core/shapes/shapeUtil.d.ts +97 -13
- package/_vendor/canvas-core/tools/select/selectToolHelpers.d.ts +18 -8
- package/_vendor/canvas-core/tools/select/states/draggingPluginInteractionState.d.ts +16 -0
- package/_vendor/canvas-core/tools/select/states/index.d.ts +1 -1
- package/_vendor/canvas-core/tools/select/states/pointingSelectionHandleInteractionState.d.ts +3 -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/actionRegistry.d.ts +7 -0
- package/_vendor/{canvas-core/surfaces → canvas-plugin-sdk}/actions.d.ts +21 -6
- package/_vendor/canvas-plugin-sdk/capability.d.ts +16 -0
- package/_vendor/canvas-plugin-sdk/chrome.d.ts +52 -0
- package/_vendor/canvas-plugin-sdk/chromeRegistry.d.ts +15 -0
- package/_vendor/{canvas-core/surfaces → canvas-plugin-sdk}/contextMenu.d.ts +25 -30
- package/_vendor/canvas-plugin-sdk/contextMenuRegistry.d.ts +11 -0
- package/_vendor/canvas-plugin-sdk/exportRegistry.d.ts +9 -0
- package/_vendor/canvas-plugin-sdk/exports.d.ts +26 -0
- package/_vendor/canvas-plugin-sdk/importRegistry.d.ts +10 -0
- package/_vendor/canvas-plugin-sdk/imports.d.ts +38 -0
- package/_vendor/canvas-plugin-sdk/index.d.ts +18 -0
- package/_vendor/canvas-plugin-sdk/lifecycle.d.ts +31 -0
- package/_vendor/canvas-plugin-sdk/plugin.d.ts +76 -0
- package/_vendor/canvas-plugin-sdk/pluginUi.d.ts +37 -0
- package/_vendor/canvas-plugin-sdk/productApi.d.ts +28 -0
- package/_vendor/canvas-plugin-sdk/services.d.ts +20 -0
- package/_vendor/{canvas-core/surfaces → canvas-plugin-sdk}/toolbar.d.ts +48 -5
- package/_vendor/canvas-plugin-sdk/toolbarRegistry.d.ts +18 -0
- package/_vendor/canvas-react/components/CanvasView.d.ts +2 -2
- package/_vendor/canvas-react/components/canvasKeyboardEvents.d.ts +13 -0
- package/_vendor/canvas-react/components/useCanvasDomEvents.d.ts +4 -3
- package/_vendor/canvas-react/contextMenuRequest.d.ts +19 -0
- package/_vendor/canvas-react/host/canvasRenderPlugin.d.ts +22 -5
- package/_vendor/canvas-react/host/canvasRenderRuntime.d.ts +13 -0
- package/_vendor/canvas-react/host/domEventGuards.d.ts +3 -3
- package/_vendor/canvas-react/host/index.d.ts +3 -9
- package/_vendor/canvas-react/host/overlayRegistry.d.ts +3 -3
- package/_vendor/canvas-react/host/rendererRegistry.d.ts +7 -4
- package/_vendor/canvas-react/index.d.ts +1 -0
- package/_vendor/plugin-arrow/api.d.ts +33 -0
- package/_vendor/plugin-arrow/arrowGeometry.d.ts +7 -4
- package/_vendor/plugin-arrow/arrowHeadGeometry.d.ts +8 -0
- package/_vendor/plugin-arrow/arrowShapeUtil.d.ts +7 -4
- package/_vendor/plugin-arrow/arrowTerminalCommands.d.ts +2 -2
- package/_vendor/plugin-arrow/canvasRender.d.ts +2 -2
- package/_vendor/plugin-arrow/editorRuntime.d.ts +2 -2
- package/_vendor/plugin-arrow/feature.d.ts +2 -3
- package/_vendor/plugin-arrow/index.d.ts +5 -2
- package/_vendor/plugin-arrow/productRuntime.d.ts +2 -0
- package/_vendor/plugin-builtin-clipboard/clipboardChromeContributions.d.ts +2 -0
- package/{features/clipboard → _vendor/plugin-builtin-clipboard}/clipboardContextMenuContributions.d.ts +1 -1
- package/{features/clipboard → _vendor/plugin-builtin-clipboard}/clipboardContribution.d.ts +2 -2
- package/{features/clipboard → _vendor/plugin-builtin-clipboard}/clipboardService.d.ts +3 -3
- package/_vendor/plugin-builtin-clipboard/index.d.ts +3 -0
- package/_vendor/plugin-builtin-clipboard/plugin.d.ts +1 -0
- package/_vendor/plugin-builtin-export/blobDataUrl.d.ts +1 -0
- package/_vendor/plugin-builtin-export/canvasExportApi.d.ts +43 -0
- package/_vendor/plugin-builtin-export/index.d.ts +8 -0
- package/_vendor/plugin-builtin-export/plugin.d.ts +5 -0
- package/_vendor/plugin-builtin-export/pngExport.d.ts +15 -0
- package/{features/export → _vendor/plugin-builtin-export}/svgExport.d.ts +9 -2
- package/_vendor/plugin-builtin-import-host/CanvasImportHost.d.ts +3 -0
- package/_vendor/plugin-builtin-import-host/capability.d.ts +1 -0
- package/_vendor/plugin-builtin-import-host/index.d.ts +2 -0
- package/_vendor/plugin-builtin-import-host/plugin.d.ts +1 -0
- package/_vendor/plugin-builtin-tool-actions/capability.d.ts +1 -0
- package/_vendor/plugin-builtin-tool-actions/index.d.ts +2 -0
- package/_vendor/plugin-builtin-tool-actions/plugin.d.ts +1 -0
- package/_vendor/plugin-builtin-tool-actions/toolActions.d.ts +2 -0
- package/_vendor/plugin-connector/canvasRender.d.ts +2 -0
- package/_vendor/plugin-connector/connectorBindingUtil.d.ts +28 -0
- package/_vendor/plugin-connector/connectorBindings.d.ts +8 -0
- package/_vendor/plugin-connector/connectorGeometry.d.ts +70 -0
- package/_vendor/plugin-connector/connectorHandles.d.ts +12 -0
- package/_vendor/plugin-connector/connectorInteractions.d.ts +3 -0
- package/_vendor/plugin-connector/connectorMarker.d.ts +7 -0
- package/_vendor/plugin-connector/connectorModel.d.ts +43 -0
- package/_vendor/plugin-connector/connectorPortInteraction.d.ts +13 -0
- package/_vendor/plugin-connector/connectorPorts.d.ts +23 -0
- package/_vendor/plugin-connector/connectorRuntime.d.ts +62 -0
- package/_vendor/plugin-connector/connectorShapeUtil.d.ts +29 -0
- package/_vendor/plugin-connector/connectorTool.d.ts +4 -0
- package/_vendor/plugin-connector/constants.d.ts +17 -0
- package/_vendor/plugin-connector/editorRuntime.d.ts +7 -0
- package/_vendor/plugin-connector/feature.d.ts +4 -0
- package/_vendor/plugin-connector/index.d.ts +18 -0
- package/_vendor/plugin-connector/orthogonalRoute.d.ts +9 -0
- package/_vendor/plugin-connector/productRuntime.d.ts +2 -0
- package/_vendor/plugin-connector/quickConnect.d.ts +28 -0
- package/_vendor/plugin-connector/types.d.ts +51 -0
- package/_vendor/plugin-draw/DrawShapeRenderer.d.ts +5 -2
- package/_vendor/plugin-draw/canvasRender.d.ts +2 -2
- package/_vendor/plugin-draw/drawGeometry.d.ts +4 -7
- package/_vendor/plugin-draw/drawPath.d.ts +7 -1
- package/_vendor/plugin-draw/drawShapeUtil.d.ts +2 -2
- package/_vendor/plugin-draw/editorRuntime.d.ts +3 -3
- package/_vendor/plugin-draw/feature.d.ts +2 -3
- package/_vendor/plugin-draw/index.d.ts +4 -3
- package/_vendor/plugin-draw/productRuntime.d.ts +2 -0
- package/_vendor/plugin-eraser/canvasRender.d.ts +2 -2
- package/_vendor/plugin-eraser/editorRuntime.d.ts +2 -2
- package/_vendor/plugin-eraser/eraserRuntime.d.ts +12 -0
- package/_vendor/plugin-eraser/feature.d.ts +2 -3
- package/_vendor/plugin-eraser/index.d.ts +4 -2
- 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 +5 -5
- package/_vendor/plugin-frame/editorRuntime.d.ts +2 -2
- package/_vendor/plugin-frame/feature.d.ts +2 -3
- package/_vendor/plugin-frame/frameShapeUtil.d.ts +12 -2
- package/_vendor/plugin-frame/index.d.ts +5 -2
- 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 +5 -5
- package/_vendor/plugin-geo/editorRuntime.d.ts +3 -3
- package/_vendor/plugin-geo/feature.d.ts +2 -3
- package/_vendor/plugin-geo/geoShapeUtil.d.ts +1 -1
- 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 +8 -5
- 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 +3 -4
- package/_vendor/plugin-group/editorRuntime.d.ts +2 -2
- package/_vendor/plugin-group/feature.d.ts +2 -3
- package/_vendor/plugin-group/groupContributions.d.ts +7 -0
- package/_vendor/plugin-group/groupShapeUtil.d.ts +24 -5
- package/_vendor/plugin-group/index.d.ts +4 -2
- package/_vendor/plugin-group/productRuntime.d.ts +2 -0
- package/_vendor/plugin-image/canvasRender.d.ts +2 -2
- package/_vendor/plugin-image/cropRuntime.d.ts +1 -1
- package/_vendor/plugin-image/cropSession.d.ts +5 -3
- package/_vendor/plugin-image/editorRuntime.d.ts +2 -4
- package/_vendor/plugin-image/feature.d.ts +2 -3
- package/_vendor/plugin-image/imageHostActionContract.d.ts +1 -1
- package/_vendor/plugin-image/imageShapeUtil.d.ts +3 -3
- package/_vendor/plugin-image/index.d.ts +5 -4
- package/_vendor/plugin-image/productRuntime.d.ts +4 -0
- package/_vendor/plugin-image/runtimeShared.d.ts +1 -1
- package/_vendor/plugin-image/smudge.d.ts +6 -2
- 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/canvasRender.d.ts +2 -2
- package/_vendor/plugin-laser/editorRuntime.d.ts +2 -2
- package/_vendor/plugin-laser/feature.d.ts +2 -3
- package/_vendor/plugin-laser/index.d.ts +4 -2
- package/_vendor/plugin-laser/laserRuntime.d.ts +18 -0
- package/_vendor/plugin-laser/productRuntime.d.ts +2 -0
- package/_vendor/plugin-packaging/api.d.ts +74 -0
- package/_vendor/plugin-packaging/canvasRender.d.ts +2 -0
- package/_vendor/plugin-packaging/editorRuntime.d.ts +2 -0
- package/_vendor/plugin-packaging/feature.d.ts +2 -0
- package/_vendor/plugin-packaging/index.d.ts +19 -0
- package/_vendor/plugin-packaging/packagingArtwork.d.ts +5 -0
- package/_vendor/plugin-packaging/packagingDxf.d.ts +9 -0
- package/_vendor/plugin-packaging/packagingGeometry.d.ts +74 -0
- package/_vendor/plugin-packaging/packagingInteractions.d.ts +2 -0
- package/_vendor/plugin-packaging/packagingPdfExporter.d.ts +25 -0
- package/_vendor/plugin-packaging/packagingRuntime.d.ts +11 -0
- package/_vendor/plugin-packaging/packagingShapeUtil.d.ts +34 -0
- package/_vendor/plugin-packaging/packagingStyle.d.ts +10 -0
- package/_vendor/plugin-packaging/packagingSvgExporter.d.ts +7 -0
- package/_vendor/plugin-packaging/productRuntime.d.ts +2 -0
- package/_vendor/plugin-packaging/types.d.ts +168 -0
- package/_vendor/plugin-packaging/validation.d.ts +3 -0
- package/_vendor/plugin-path/PathDraftOverlay.d.ts +1 -0
- package/_vendor/plugin-path/PathEditInsertPreviewOverlay.d.ts +1 -0
- package/_vendor/plugin-path/PathShapeRenderer.d.ts +15 -0
- package/_vendor/plugin-path/canvasRender.d.ts +2 -0
- package/_vendor/plugin-path/editorRuntime.d.ts +7 -0
- package/_vendor/plugin-path/feature.d.ts +2 -0
- package/_vendor/plugin-path/index.d.ts +8 -0
- package/_vendor/plugin-path/pathBoolean.d.ts +13 -0
- package/_vendor/plugin-path/pathDraft.d.ts +10 -0
- package/_vendor/plugin-path/pathEditPreview.d.ts +11 -0
- package/_vendor/plugin-path/pathEditSelection.d.ts +24 -0
- package/_vendor/plugin-path/pathEditSnap.d.ts +6 -0
- package/_vendor/plugin-path/pathGeometry.d.ts +74 -0
- package/_vendor/plugin-path/pathHandles.d.ts +18 -0
- package/_vendor/plugin-path/pathHistory.d.ts +13 -0
- package/_vendor/plugin-path/pathInteractions.d.ts +7 -0
- package/_vendor/plugin-path/pathShapeUtil.d.ts +30 -0
- package/_vendor/plugin-path/pathSvg.d.ts +3 -0
- package/_vendor/plugin-path/pathTool.d.ts +42 -0
- package/_vendor/plugin-path/productRuntime.d.ts +15 -0
- package/_vendor/plugin-path/types.d.ts +36 -0
- package/_vendor/plugin-text/api.d.ts +20 -0
- package/_vendor/plugin-text/canvasRender.d.ts +6 -3
- package/_vendor/plugin-text/capabilities.d.ts +2 -0
- package/_vendor/plugin-text/editorRuntime.d.ts +3 -3
- package/_vendor/plugin-text/feature.d.ts +4 -4
- package/_vendor/plugin-text/geoLabelBindingUtil.d.ts +6 -3
- package/_vendor/plugin-text/host/RichTextEditingBox.d.ts +4 -1
- package/_vendor/plugin-text/host/TiptapTextEditor.d.ts +6 -3
- package/_vendor/plugin-text/host/initialTextBackground.d.ts +2 -0
- package/_vendor/plugin-text/host/richTextRendering.d.ts +1 -2
- 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/textFormattingApi.d.ts +16 -0
- package/_vendor/plugin-text/host/textMeasurement.d.ts +10 -2
- package/_vendor/plugin-text/host/textShapeRendererRuntime.d.ts +3 -1
- package/_vendor/plugin-text/host/tiptapTextEditorController.d.ts +4 -1
- package/_vendor/plugin-text/index.d.ts +11 -4
- 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 +9 -2
- package/_vendor/plugin-text/shapeWideTextFormatting.d.ts +12 -0
- package/_vendor/plugin-text/textFonts.d.ts +6 -3
- package/_vendor/plugin-text/textFormatting.d.ts +47 -0
- package/_vendor/plugin-text/textFormattingSession.d.ts +6 -0
- package/_vendor/plugin-text/textLabelHelpers.d.ts +32 -6
- package/_vendor/plugin-text/textLinkPopoverPresentation.d.ts +18 -0
- package/_vendor/plugin-text/textShapeHelpers.d.ts +1 -0
- package/_vendor/plugin-text/textShapeUtil.d.ts +9 -5
- package/_vendor/plugin-text/textTypes.d.ts +1 -0
- package/_vendor/signals/core.d.ts +1 -0
- package/_vendor/signals/effect.d.ts +0 -4
- package/_vendor/signals/index.d.ts +2 -2
- package/_vendor/store/history.d.ts +1 -1
- package/_vendor/store/store.d.ts +6 -0
- package/browser/indexedDb.d.ts +10 -10
- package/browser/persistence.d.ts +6 -38
- package/chrome/floating/CanvasKitFloatingPortal.d.ts +6 -0
- package/chrome/floating/useCanvasKitFloatingPosition.d.ts +11 -0
- package/chrome/toolbar/CanvasKitFloatingToolbarLayer.d.ts +1 -1
- package/chrome/toolbar/FloatingSelectionToolbarPageSpace.d.ts +5 -3
- package/chrome/toolbar/toolbarLabels.d.ts +1 -1
- package/chrome/toolbar/useToolbarSurfaces.d.ts +11 -16
- package/chrome/types.d.ts +15 -17
- package/chrome/useCanvasKitChromeContext.d.ts +12 -15
- package/chrome/useChromeSurfaces.d.ts +12 -0
- package/chrome/useContextMenuSurface.d.ts +4 -4
- package/chrome/useHistoryControls.d.ts +3 -3
- package/chrome/usePageControls.d.ts +3 -3
- package/controller/canvasKitController.d.ts +5 -16
- package/core/index.d.ts +4 -6
- package/core/product-controller/canvasProductController.d.ts +42 -12
- package/core/product-controller/index.d.ts +1 -1
- package/core/runtime/productAssets.d.ts +4 -2
- package/core/runtime/productEditor.d.ts +1 -1
- package/core/runtime/productServices.d.ts +11 -21
- package/core/runtime/runtimeContracts.d.ts +17 -0
- package/es-DocrZgUh.mjs +2 -0
- package/features/context-menu/contextMenuRuntime.d.ts +4 -4
- package/features/image/asset/imageAssetService.d.ts +2 -3
- package/features/image/asset/imageBlobStore.d.ts +7 -2
- 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 +2 -2
- package/features/image/toolbar/imageHostActions.d.ts +17 -7
- package/features/image/toolbar/imageToolbarHostBridge.d.ts +1 -1
- package/features/text/link/TextLinkHoverPopover.d.ts +6 -0
- package/features/text/textHostPlugin.d.ts +5 -0
- 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 +36 -12
- package/index.mjs +111 -96
- package/package.json +12 -9
- package/plugins/standardCanvasKitPlugins.d.ts +16 -0
- package/react/CanvasKitRoot.d.ts +10 -5
- package/react/useCanvasKitControllerLifecycle.d.ts +8 -0
- package/react/useCanvasKitRuntime.d.ts +2 -4
- package/runtime/canvasKitCommandExecutor.d.ts +13 -0
- package/runtime/canvasKitPluginContracts.d.ts +34 -0
- package/runtime/canvasKitPluginSetup.d.ts +32 -0
- package/runtime/canvasKitResourceScope.d.ts +5 -0
- package/runtime/canvasKitRuntime.d.ts +48 -19
- package/runtime/canvasKitRuntimeContracts.d.ts +34 -0
- package/runtime/persistenceCoordinator.d.ts +33 -0
- package/_vendor/canvas-core/editor/createEditorWithRuntimePlugins.d.ts +0 -6
- package/_vendor/canvas-core/editor/middleMousePanInteraction.d.ts +0 -2
- package/_vendor/canvas-core/schema/snapshotSupport.d.ts +0 -43
- package/_vendor/canvas-core/tools/select/states/draggingSelectionHandleInteractionState.d.ts +0 -15
- package/_vendor/canvas-react/host/actionRegistry.d.ts +0 -15
- package/_vendor/canvas-react/host/canvasRenderPluginHost.d.ts +0 -2
- package/_vendor/canvas-react/host/canvasRenderPluginHostManifest.d.ts +0 -2
- package/_vendor/canvas-react/host/canvasRenderPluginHostRuntime.d.ts +0 -3
- package/_vendor/canvas-react/host/canvasRenderPluginHostTypes.d.ts +0 -104
- package/_vendor/canvas-react/host/canvasRenderPluginHostValidation.d.ts +0 -11
- package/_vendor/canvas-react/host/contextMenuRegistry.d.ts +0 -17
- package/_vendor/canvas-react/host/extension.d.ts +0 -37
- package/_vendor/canvas-react/host/toolbarRegistry.d.ts +0 -20
- package/_vendor/plugin-text/arrowLabelBindingUtil.d.ts +0 -42
- package/_vendor/plugin-text/host/RichTextLinkPopover.d.ts +0 -14
- package/_vendor/plugin-text/host/RichTextToolbar.d.ts +0 -8
- package/_vendor/plugin-text/host/richTextBubbleMenuPositionSync.d.ts +0 -7
- package/browser/localSnapshotRestore.d.ts +0 -13
- package/builtins/controller/createBuiltInCanvasController.d.ts +0 -16
- package/builtins/controller/layerController.d.ts +0 -9
- package/builtins/controller/shapeCreationController.d.ts +0 -83
- package/builtins/extensions.d.ts +0 -18
- package/builtins/index.d.ts +0 -5
- package/chrome/useSvgExport.d.ts +0 -15
- package/core/api/apiRegistry.d.ts +0 -12
- package/core/runtime/productDefinition.d.ts +0 -33
- package/core/runtime/productHost.d.ts +0 -20
- package/features/actions/actionRuntime.d.ts +0 -21
- package/features/clipboard/clipboardHostExtension.d.ts +0 -2
- package/features/image/imageHostExtension.d.ts +0 -10
- package/features/image/import/useImageImport.d.ts +0 -16
- package/features/keyboard/keyboardShortcutHostExtension.d.ts +0 -2
- package/features/keyboard/useCanvasKitKeyboardShortcuts.d.ts +0 -6
- package/features/persistence/CanvasKitPersistenceNotice.d.ts +0 -4
- package/features/persistence/persistenceHostExtension.d.ts +0 -2
- package/features/selection/selectionActions.d.ts +0 -20
- package/features/selection/selectionContextMenuContributions.d.ts +0 -2
- package/features/selection/selectionHostExtension.d.ts +0 -2
- 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/toolHostExtension.d.ts +0 -2
- package/features/tool/toolToolbarContributions.d.ts +0 -2
- package/features/view/viewActions.d.ts +0 -5
- package/features/view/viewContextMenuContributions.d.ts +0 -2
- package/features/view/viewHostExtension.d.ts +0 -2
- package/host/defaultHostExtensions.d.ts +0 -2
- package/product/canvasKitProduct.d.ts +0 -51
- package/react/useCanvasKitController.d.ts +0 -5
- package/react/useCanvasKitStartup.d.ts +0 -9
- package/runtime/canvasKitHostContracts.d.ts +0 -135
- package/runtime/canvasKitHostFeatureHooks.d.ts +0 -12
- package/runtime/canvasKitRuntimePlan.d.ts +0 -50
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ShapeColor, ShapeId } from "../canvas-core/index";
|
|
2
|
+
import { type CanvasPluginApi, type CanvasShapeRef } from "../canvas-plugin-sdk/index";
|
|
3
|
+
export interface FrameInput {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
w?: number;
|
|
7
|
+
h?: number;
|
|
8
|
+
name?: string;
|
|
9
|
+
fill?: ShapeColor;
|
|
10
|
+
stroke?: ShapeColor;
|
|
11
|
+
strokeWidth?: number;
|
|
12
|
+
meta?: Record<string, unknown>;
|
|
13
|
+
}
|
|
14
|
+
export interface FrameApi {
|
|
15
|
+
create(input: FrameInput): CanvasShapeRef<"frame"> | null;
|
|
16
|
+
moveShapesToFrame(ids: ShapeId[], frameId: ShapeId): ShapeId[];
|
|
17
|
+
}
|
|
18
|
+
export declare const frameApiToken: import("../canvas-plugin-sdk/index").ProductApiToken<FrameApi>;
|
|
19
|
+
export declare const framePluginApi: CanvasPluginApi<FrameApi>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import type
|
|
1
|
+
import { type CanvasRenderPlugin } from "../canvas-react/host/index";
|
|
2
|
+
import { type FrameShapeRecord } from "./frameShapeUtil";
|
|
3
3
|
interface FrameShapeSvgProps {
|
|
4
4
|
shape: FrameShapeRecord;
|
|
5
|
-
|
|
5
|
+
hideName?: boolean;
|
|
6
6
|
}
|
|
7
|
-
export declare function createFrameCanvasRenderPlugin():
|
|
8
|
-
export declare function FrameShapeSvg({ shape,
|
|
7
|
+
export declare function createFrameCanvasRenderPlugin(): CanvasRenderPlugin;
|
|
8
|
+
export declare function FrameShapeSvg({ shape, hideName, }: FrameShapeSvgProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type EditorPlugin, type ShapeSvgExporter, type SvgNode, type SvgExportContext } from "../canvas-core/index";
|
|
2
2
|
import { type FrameShapeRecord } from "./frameShapeUtil";
|
|
3
3
|
export declare class FrameShapeSvgExporter implements ShapeSvgExporter<FrameShapeRecord> {
|
|
4
4
|
readonly type: "frame";
|
|
5
5
|
toSvg(shape: FrameShapeRecord, context: SvgExportContext): SvgNode;
|
|
6
6
|
}
|
|
7
|
-
export declare function
|
|
7
|
+
export declare function createFrameEditorPlugin(): EditorPlugin;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
3
|
-
export declare const Frame: import("../canvas-react/host/index").ConfigurableLandExtension<Record<string, never>>;
|
|
1
|
+
import { setupFrameProduct } from "./productRuntime";
|
|
2
|
+
export declare const Frame: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof setupFrameProduct>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Box, ShapeUtil, Vec, type ShapeColor, type ShapeBrushSelectInput, type ShapeLineSegmentHitTestInput, type ShapeRecordBase } from "../canvas-core/index";
|
|
1
|
+
import { Box, ShapeUtil, Vec, type ShapeColor, type ShapeBrushSelectInput, type ShapeLineSegmentHitTestInput, type ShapeRecordBase, type ShapeSelectionResizeCapabilityInput } from "../canvas-core/index";
|
|
2
2
|
export interface FrameShapeProps {
|
|
3
3
|
w: number;
|
|
4
4
|
h: number;
|
|
@@ -8,14 +8,24 @@ export interface FrameShapeProps {
|
|
|
8
8
|
strokeWidth: number;
|
|
9
9
|
}
|
|
10
10
|
export type FrameShapeRecord = ShapeRecordBase<"frame", FrameShapeProps>;
|
|
11
|
+
export declare const FRAME_NAME_BASELINE = -8;
|
|
12
|
+
export declare const FRAME_NAME_FALLBACK = "Frame";
|
|
13
|
+
export declare const FRAME_NAME_FONT_SIZE = 12;
|
|
14
|
+
export declare const FRAME_NAME_RENDER_HEIGHT = 34;
|
|
15
|
+
export declare function getFrameDisplayName(name: string): string;
|
|
16
|
+
export declare function getFrameRenderBounds(shape: FrameShapeRecord): Box;
|
|
11
17
|
export declare class FrameShapeUtil extends ShapeUtil<FrameShapeRecord> {
|
|
12
18
|
readonly type: "frame";
|
|
13
19
|
getDefaultProps(): FrameShapeProps;
|
|
14
20
|
validateProps(props: unknown): FrameShapeProps;
|
|
15
|
-
|
|
21
|
+
getLocalBounds(shape: FrameShapeRecord): Box;
|
|
22
|
+
getRenderBounds(shape: FrameShapeRecord): Box;
|
|
16
23
|
getPointHitTestBounds(shape: FrameShapeRecord): Box;
|
|
24
|
+
canEdit(_shape: FrameShapeRecord): boolean;
|
|
17
25
|
canReceiveChildren(_shape: FrameShapeRecord): boolean;
|
|
26
|
+
canSnapChildrenToSelf(_shape: FrameShapeRecord): boolean;
|
|
18
27
|
canReceiveTerminalBinding(_shape: FrameShapeRecord): boolean;
|
|
28
|
+
getSelectionResizeHandleIds(_shape: FrameShapeRecord, _input: ShapeSelectionResizeCapabilityInput): readonly ["top_left", "top_right", "bottom_right", "bottom_left"];
|
|
19
29
|
shouldRotateDescendants(_shape: FrameShapeRecord): boolean;
|
|
20
30
|
getChildClipLocalBounds(shape: FrameShapeRecord): Box | null;
|
|
21
31
|
canSelectByBrush(shape: FrameShapeRecord, input: ShapeBrushSelectInput): boolean;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export { FrameShapeUtil } from "./frameShapeUtil";
|
|
2
|
+
export { frameApiToken } from "./api";
|
|
3
|
+
export type { FrameApi, FrameInput } from "./api";
|
|
2
4
|
export type { FrameShapeProps, FrameShapeRecord } from "./frameShapeUtil";
|
|
3
5
|
export { FrameTool } from "./frameTool";
|
|
4
|
-
export { FrameShapeSvgExporter,
|
|
6
|
+
export { FrameShapeSvgExporter, createFrameEditorPlugin } from "./editorRuntime";
|
|
7
|
+
export { setupFrameProduct } from "./productRuntime";
|
|
5
8
|
export { createFrameCanvasRenderPlugin } from "./canvasRender";
|
|
6
|
-
export { Frame
|
|
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-plugin-sdk/index";
|
|
3
|
+
import type { GeoShapeProps } from "./types";
|
|
4
|
+
export interface GeoShapeInput {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
w?: number;
|
|
8
|
+
h?: number;
|
|
9
|
+
fill?: ShapeColor;
|
|
10
|
+
stroke?: ShapeColor;
|
|
11
|
+
strokeStyle?: GeoShapeProps["strokeStyle"];
|
|
12
|
+
strokeWidth?: number;
|
|
13
|
+
meta?: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
export interface GeoRectangleInput extends GeoShapeInput {
|
|
16
|
+
cornerRadiusPercent?: GeoShapeProps["cornerRadiusPercent"];
|
|
17
|
+
}
|
|
18
|
+
export interface GeoApi {
|
|
19
|
+
createRectangle(input: GeoRectangleInput): CanvasShapeRef<"geo"> | null;
|
|
20
|
+
createEllipse(input: GeoShapeInput): CanvasShapeRef<"geo"> | null;
|
|
21
|
+
createRhombus(input: GeoShapeInput): CanvasShapeRef<"geo"> | null;
|
|
22
|
+
createTriangle(input: GeoShapeInput): CanvasShapeRef<"geo"> | null;
|
|
23
|
+
createHexagon(input: GeoShapeInput): CanvasShapeRef<"geo"> | null;
|
|
24
|
+
createStar(input: GeoShapeInput): CanvasShapeRef<"geo"> | null;
|
|
25
|
+
}
|
|
26
|
+
export declare const geoApiToken: import("../canvas-plugin-sdk/index").ProductApiToken<GeoApi>;
|
|
27
|
+
export declare const geoPluginApi: CanvasPluginApi<GeoApi>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { type ShapeColor } from "../canvas-core/index";
|
|
2
|
-
import { type
|
|
3
|
-
import type { GeoShapeRecord } from "./types";
|
|
2
|
+
import { type CanvasRenderPlugin } from "../canvas-react/host/index";
|
|
3
|
+
import type { GeoShapeRecord, GeoStrokeStyle } from "./types";
|
|
4
4
|
interface GeoShapeSvgProps {
|
|
5
5
|
shape: GeoShapeRecord;
|
|
6
6
|
fill?: ShapeColor;
|
|
7
|
-
isHovered?: boolean;
|
|
8
7
|
stroke?: ShapeColor;
|
|
8
|
+
strokeStyle?: GeoStrokeStyle;
|
|
9
9
|
strokeWidth?: number;
|
|
10
10
|
}
|
|
11
|
-
export declare function createGeoCanvasRenderPlugin():
|
|
12
|
-
export declare function GeoShapeSvg({ shape, fill,
|
|
11
|
+
export declare function createGeoCanvasRenderPlugin(): CanvasRenderPlugin;
|
|
12
|
+
export declare function GeoShapeSvg({ shape, fill, stroke, strokeStyle, strokeWidth, }: GeoShapeSvgProps): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import {
|
|
1
|
+
import { type EditorPlugin, type ShapeSvgExporter, type SvgExportContext, type SvgNode } from "../canvas-core/index";
|
|
2
|
+
import type { GeoShapeRecord } from "./types";
|
|
3
3
|
export declare class GeoShapeSvgExporter implements ShapeSvgExporter<GeoShapeRecord> {
|
|
4
4
|
readonly type: "geo";
|
|
5
5
|
toSvg(shape: GeoShapeRecord, context: SvgExportContext): SvgNode;
|
|
6
6
|
}
|
|
7
|
-
export declare function
|
|
7
|
+
export declare function createGeoEditorPlugin(): EditorPlugin;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
3
|
-
export declare const Geo: import("../canvas-react/host/index").ConfigurableLandExtension<Record<string, never>>;
|
|
1
|
+
import { setupGeoProduct } from "./productRuntime";
|
|
2
|
+
export declare const Geo: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof setupGeoProduct>;
|
|
@@ -4,7 +4,7 @@ export declare class GeoShapeUtil extends ShapeUtil<GeoShapeRecord> {
|
|
|
4
4
|
readonly type: "geo";
|
|
5
5
|
getDefaultProps(): GeoShapeProps;
|
|
6
6
|
validateProps(props: unknown): GeoShapeProps;
|
|
7
|
-
|
|
7
|
+
getLocalBounds(shape: GeoShapeRecord): Box;
|
|
8
8
|
canReceiveTerminalBinding(_shape: GeoShapeRecord): boolean;
|
|
9
9
|
getPositionedOutlineVertices(shape: GeoShapeRecord): Vec[];
|
|
10
10
|
getHandleSnapGeometry(shape: GeoShapeRecord): ShapeHandleSnapGeometry;
|
|
@@ -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,
|
|
5
|
+
export { GeoShapeSvgExporter, createGeoEditorPlugin } from "./editorRuntime";
|
|
6
|
+
export { setupGeoProduct } from "./productRuntime";
|
|
4
7
|
export { GeoShapeSvg, createGeoCanvasRenderPlugin } from "./canvasRender";
|
|
5
|
-
export { Geo
|
|
6
|
-
export type { GeoShapeKind, GeoShapeProps, GeoShapeRecord } from "./types";
|
|
7
|
-
export { GEO_SHAPE_KINDS, isGeoShapeKind, isGeoShapeRecord } from "./types";
|
|
8
|
+
export { Geo } from "./feature";
|
|
9
|
+
export type { GeoShapeKind, GeoShapeProps, GeoShapeRecord, GeoStrokeStyle, } from "./types";
|
|
10
|
+
export { GEO_SHAPE_KINDS, GEO_STROKE_STYLES, isGeoShapeKind, isGeoShapeRecord, isGeoStrokeStyle, } from "./types";
|
|
@@ -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;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type CanvasRenderPlugin } from "../canvas-react/host/index";
|
|
2
2
|
import type { GroupShapeRecord } from "./groupShapeUtil";
|
|
3
3
|
interface GroupShapeSvgProps {
|
|
4
4
|
shape: GroupShapeRecord;
|
|
5
|
-
isHovered?: boolean;
|
|
6
5
|
isSelected?: boolean;
|
|
7
6
|
}
|
|
8
|
-
export declare function createGroupCanvasRenderPlugin():
|
|
9
|
-
export declare function GroupShapeSvg({ shape,
|
|
7
|
+
export declare function createGroupCanvasRenderPlugin(): CanvasRenderPlugin;
|
|
8
|
+
export declare function GroupShapeSvg({ shape, isSelected, }: GroupShapeSvgProps): import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type EditorPlugin, type ShapeSvgExporter, type SvgNode } from "../canvas-core/index";
|
|
2
2
|
import { type GroupShapeRecord } from "./groupShapeUtil";
|
|
3
3
|
export declare class GroupShapeSvgExporter implements ShapeSvgExporter<GroupShapeRecord> {
|
|
4
4
|
readonly type: "group";
|
|
5
5
|
toSvg(_shape: GroupShapeRecord): SvgNode;
|
|
6
6
|
}
|
|
7
|
-
export declare function
|
|
7
|
+
export declare function createGroupEditorPlugin(): EditorPlugin;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
3
|
-
export declare const Group: import("../canvas-react/host/index").ConfigurableLandExtension<Record<string, never>>;
|
|
1
|
+
import { setupGroupProduct } from "./productRuntime";
|
|
2
|
+
export declare const Group: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof setupGroupProduct>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type CanvasAction, type ContextMenuContribution, type ToolbarContribution } from "../canvas-plugin-sdk/index";
|
|
2
|
+
export declare const GROUP_SELECTION_ACTION_ID = "group.selection.group";
|
|
3
|
+
export declare const UNGROUP_SELECTION_ACTION_ID = "group.selection.ungroup";
|
|
4
|
+
export declare const groupSelectionAction: CanvasAction;
|
|
5
|
+
export declare const ungroupSelectionAction: CanvasAction;
|
|
6
|
+
export declare const groupToolbarContribution: ToolbarContribution;
|
|
7
|
+
export declare const groupContextMenuContribution: ContextMenuContribution;
|
|
@@ -1,16 +1,35 @@
|
|
|
1
|
-
import { Box, ShapeUtil, type Vec, type ShapeRecordBase } from "../canvas-core/index";
|
|
1
|
+
import { Box, ShapeUtil, type Vec, type ShapeLineSegmentHitTestInput, type ShapeGroupingInput, type ShapeRecordBase } from "../canvas-core/index";
|
|
2
2
|
export interface GroupShapeProps {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/** Intrinsic width of the group's parent-local frame. */
|
|
4
|
+
readonly w: number;
|
|
5
|
+
/** Intrinsic height of the group's parent-local frame. */
|
|
6
|
+
readonly h: number;
|
|
5
7
|
}
|
|
6
8
|
export type GroupShapeRecord = ShapeRecordBase<"group", GroupShapeProps>;
|
|
7
9
|
export declare class GroupShapeUtil extends ShapeUtil<GroupShapeRecord> {
|
|
8
10
|
readonly type: "group";
|
|
11
|
+
getGroupingShapeCreateInput({ parentId, parentLocalBounds, }: ShapeGroupingInput): {
|
|
12
|
+
type: "group";
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
parentId: import("../canvas-core/index").ShapeParentId;
|
|
16
|
+
props: {
|
|
17
|
+
w: number;
|
|
18
|
+
h: number;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
9
21
|
getDefaultProps(): GroupShapeProps;
|
|
10
22
|
validateProps(props: unknown): GroupShapeProps;
|
|
11
|
-
|
|
23
|
+
getLocalBounds(shape: GroupShapeRecord): Box;
|
|
12
24
|
hitTest(_shape: GroupShapeRecord, _positionedPoint: Vec): boolean;
|
|
13
|
-
|
|
25
|
+
hitTestLineSegment(_shape: GroupShapeRecord, _input: ShapeLineSegmentHitTestInput): boolean;
|
|
26
|
+
isSelectionTransformContainer(_shape: GroupShapeRecord): boolean;
|
|
14
27
|
canUngroupChildren(_shape: GroupShapeRecord): boolean;
|
|
28
|
+
shouldResizeDescendants(_shape: GroupShapeRecord): boolean;
|
|
29
|
+
getResizeToFitDescendantsProps(shape: GroupShapeRecord, descendantBounds: Box): GroupShapeProps;
|
|
30
|
+
getMinimumChildCount(_shape: GroupShapeRecord): number;
|
|
31
|
+
contributesToExportBounds(_shape: GroupShapeRecord): boolean;
|
|
15
32
|
canReceiveChildren(_shape: GroupShapeRecord): boolean;
|
|
33
|
+
canAutomaticallyReceiveChildren(_shape: GroupShapeRecord): boolean;
|
|
34
|
+
canBeDirectlyBrushSelected(_shape: GroupShapeRecord): boolean;
|
|
16
35
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { GroupShapeUtil } from "./groupShapeUtil";
|
|
2
2
|
export type { GroupShapeProps, GroupShapeRecord } from "./groupShapeUtil";
|
|
3
|
-
export { GroupShapeSvgExporter,
|
|
3
|
+
export { GroupShapeSvgExporter, createGroupEditorPlugin } from "./editorRuntime";
|
|
4
|
+
export { setupGroupProduct } from "./productRuntime";
|
|
4
5
|
export { createGroupCanvasRenderPlugin } from "./canvasRender";
|
|
5
|
-
export { Group
|
|
6
|
+
export { Group } from "./feature";
|
|
7
|
+
export { groupContextMenuContribution, GROUP_SELECTION_ACTION_ID, groupSelectionAction, groupToolbarContribution, UNGROUP_SELECTION_ACTION_ID, ungroupSelectionAction, } from "./groupContributions";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export declare function createImageCanvasRenderPlugin():
|
|
1
|
+
import { type CanvasRenderPlugin } from "../canvas-react/host/index";
|
|
2
|
+
export declare function createImageCanvasRenderPlugin(): CanvasRenderPlugin;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type CanvasAction } from "../canvas-plugin-sdk/index";
|
|
2
2
|
export declare function createImageCropCanvasActions(): CanvasAction[];
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { type Editor } from "../canvas-core/index";
|
|
1
2
|
import type { ImageShapeRecord } from "./types";
|
|
2
|
-
export declare function rememberImageCropSessionBaseline(shape: ImageShapeRecord): void;
|
|
3
|
-
export declare function getImageCropSessionBaseline(shapeId: ImageShapeRecord["id"]): ImageShapeRecord | null;
|
|
4
|
-
export declare function clearImageCropSessionBaseline(shapeId: ImageShapeRecord["id"]): void;
|
|
3
|
+
export declare function rememberImageCropSessionBaseline(editor: Editor, shape: ImageShapeRecord): void;
|
|
4
|
+
export declare function getImageCropSessionBaseline(editor: Editor, shapeId: ImageShapeRecord["id"]): ImageShapeRecord | null;
|
|
5
|
+
export declare function clearImageCropSessionBaseline(editor: Editor, shapeId: ImageShapeRecord["id"]): void;
|
|
6
|
+
export declare function setupImageCropSessionLifecycle(editor: Editor): () => void;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export { IMAGE_CORNER_RADIUS_TOOLBAR_ACTION_ID, IMAGE_CROP_ASPECT_RATIO_TOOLBAR_ACTION_ID, IMAGE_CROP_DONE_TOOLBAR_ACTION_ID, IMAGE_CROP_RESET_TOOLBAR_ACTION_ID, IMAGE_CROP_TOOLBAR_ACTION_ID, IMAGE_CROP_ZOOM_TOOLBAR_ACTION_ID, IMAGE_DOWNLOAD_TOOLBAR_ACTION_ID, IMAGE_INSERT_TOOLBAR_ACTION_ID, IMAGE_REPLACE_TOOLBAR_ACTION_ID, } from "./actionIds";
|
|
1
|
+
import type { EditorPlugin } from "../canvas-core/index";
|
|
3
2
|
export { ImageShapeSvgExporter } from "./imageSvgExporter";
|
|
4
|
-
export
|
|
5
|
-
export declare function createImageEditorRuntimePlugin(): LandEditorRuntimePlugin;
|
|
3
|
+
export declare function createImageEditorPlugin(): EditorPlugin;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
3
|
-
export declare const Image: import("../canvas-react/host/index").ConfigurableLandExtension<Record<string, never>>;
|
|
1
|
+
import { setupImageProduct } from "./productRuntime";
|
|
2
|
+
export declare const Image: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof setupImageProduct>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type CanvasAction } from "../canvas-plugin-sdk/index";
|
|
2
2
|
export declare function createImageHostToolbarActionContract(actionId: string): CanvasAction;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Box, ShapeUtil, type ShapeEditEndInput, type ShapeSelectionHandleAnchorInput, type ShapeSelectionHandleAnchors, type
|
|
1
|
+
import { Box, ShapeUtil, type ShapeEditEndInput, type ShapeSelectionHandleAnchorInput, type ShapeSelectionHandleAnchors, type ShapeSelectionResizeModesInput } from "../canvas-core/index";
|
|
2
2
|
import type { ImageShapeProps, ImageShapeRecord } from "./types";
|
|
3
3
|
export declare class ImageShapeUtil extends ShapeUtil<ImageShapeRecord> {
|
|
4
4
|
readonly type: "image";
|
|
5
5
|
getDefaultProps(): ImageShapeProps;
|
|
6
6
|
validateProps(props: unknown): ImageShapeProps;
|
|
7
|
-
|
|
7
|
+
getLocalBounds(shape: ImageShapeRecord): Box;
|
|
8
8
|
canReceiveTerminalBinding(_shape: ImageShapeRecord): boolean;
|
|
9
|
-
|
|
9
|
+
getAllowedSelectionResizeModes(_shape: ImageShapeRecord, _input: ShapeSelectionResizeModesInput): readonly ["aspect_ratio_locked"];
|
|
10
10
|
canEdit(_shape: ImageShapeRecord): boolean;
|
|
11
11
|
onEditEnd(shape: ImageShapeRecord, input: ShapeEditEndInput): void;
|
|
12
12
|
getSelectionHandleAnchors(shape: ImageShapeRecord, input: ShapeSelectionHandleAnchorInput): ShapeSelectionHandleAnchors;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
export { IMAGE_CROP_ASPECT_RATIO_TOOLBAR_ACTION_ID, IMAGE_CROP_DONE_TOOLBAR_ACTION_ID, IMAGE_CROP_RESET_TOOLBAR_ACTION_ID, IMAGE_CROP_TOOLBAR_ACTION_ID, IMAGE_CROP_ZOOM_TOOLBAR_ACTION_ID, IMAGE_CORNER_RADIUS_TOOLBAR_ACTION_ID, IMAGE_DOWNLOAD_TOOLBAR_ACTION_ID, IMAGE_INSERT_TOOLBAR_ACTION_ID, IMAGE_REPLACE_TOOLBAR_ACTION_ID,
|
|
1
|
+
export { IMAGE_CROP_ASPECT_RATIO_TOOLBAR_ACTION_ID, IMAGE_CROP_DONE_TOOLBAR_ACTION_ID, IMAGE_CROP_RESET_TOOLBAR_ACTION_ID, IMAGE_CROP_TOOLBAR_ACTION_ID, IMAGE_CROP_ZOOM_TOOLBAR_ACTION_ID, IMAGE_CORNER_RADIUS_TOOLBAR_ACTION_ID, IMAGE_DOWNLOAD_TOOLBAR_ACTION_ID, IMAGE_INSERT_TOOLBAR_ACTION_ID, IMAGE_REPLACE_TOOLBAR_ACTION_ID, isImageCropToolbarSession, isImageSmudgeToolbarSession, setupImageProduct, } from "./productRuntime";
|
|
2
|
+
export { ImageShapeSvgExporter, createImageEditorPlugin, } from "./editorRuntime";
|
|
2
3
|
export { createImageCanvasRenderPlugin } from "./canvasRender";
|
|
3
4
|
export { createImageCropInteractionHandler, createImageCropSelectionHandleInteractionHandler, } from "./cropInteractions";
|
|
4
5
|
export { createImageSmudgeInteractionHandler } from "./smudgeInteractions";
|
|
5
6
|
export { getImageCropModeMarkId, getImageCropRectOrDefault, } from "./crop";
|
|
6
7
|
export type { ImageCropRect } from "./crop";
|
|
7
|
-
export { DEFAULT_IMAGE_SMUDGE_BRUSH_COLOR, DEFAULT_IMAGE_SMUDGE_BRUSH_SIZE, IMAGE_SMUDGE_BRUSH_COLOR_TOOLBAR_ACTION_ID, IMAGE_SMUDGE_BRUSH_SIZE_MAX, IMAGE_SMUDGE_BRUSH_SIZE_MIN, IMAGE_SMUDGE_BRUSH_SIZE_TOOLBAR_ACTION_ID, IMAGE_SMUDGE_CANCEL_TOOLBAR_ACTION_ID, IMAGE_SMUDGE_CONFIRM_TOOLBAR_ACTION_ID, IMAGE_SMUDGE_TOOLBAR_ACTION_ID, cancelImageSmudgeSession, cancelImageSmudgeSessionIfActive, cloneImageSmudgeStrokes, completeImageSmudgeSession, getActiveImageSmudgeSession, getImageSmudgeModeMarkId, isImageSmudgeModeForShape, isImageSmudgeToolbarActionId, registerImageSmudgeConfirmHandler, requestImageSmudgeConfirm, startImageSmudgeSession, updateImageSmudgeBrush, } from "./smudge";
|
|
8
|
-
export type { ImageSmudgeBrush, ImageSmudgeStroke, ImageSmudgeStrokePoint, } from "./smudge";
|
|
9
|
-
export { Image
|
|
8
|
+
export { DEFAULT_IMAGE_SMUDGE_BRUSH_COLOR, DEFAULT_IMAGE_SMUDGE_BRUSH_SIZE, IMAGE_SMUDGE_BRUSH_COLOR_TOOLBAR_ACTION_ID, IMAGE_SMUDGE_BRUSH_SIZE_MAX, IMAGE_SMUDGE_BRUSH_SIZE_MIN, IMAGE_SMUDGE_BRUSH_SIZE_TOOLBAR_ACTION_ID, IMAGE_SMUDGE_CANCEL_TOOLBAR_ACTION_ID, IMAGE_SMUDGE_CONFIRM_TOOLBAR_ACTION_ID, IMAGE_SMUDGE_TOOLBAR_ACTION_ID, cancelImageSmudgeSession, cancelImageSmudgeSessionIfActive, cloneImageSmudgeStrokes, completeImageSmudgeSession, getActiveImageSmudgeSession, getImageSmudgeModeMarkId, isImageSmudgeModeForShape, isImageSmudgeToolbarActionId, registerImageSmudgeConfirmHandler, redoImageSmudgeStroke, requestImageSmudgeConfirm, startImageSmudgeSession, undoImageSmudgeStroke, updateImageSmudgeBrush, } from "./smudge";
|
|
9
|
+
export type { ImageSmudgeBrush, ImageSmudgeSessionSnapshot, ImageSmudgeStroke, ImageSmudgeStrokePoint, } from "./smudge";
|
|
10
|
+
export { Image } from "./feature";
|
|
10
11
|
export { ImageShapeUtil } from "./imageShapeUtil";
|
|
11
12
|
export type { ImageAssetProps, ImageAssetRecord, ImageAssetSource, ImageRemoteCopyState, ImageShapeCrop, ImageShapeProps, ImageShapeRecord, } from "./types";
|
|
12
13
|
export { isImageAssetRecord, isImageShapeRecord } from "./types";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CanvasPluginSetupContext } from "../canvas-plugin-sdk/index";
|
|
2
|
+
export { IMAGE_CORNER_RADIUS_TOOLBAR_ACTION_ID, IMAGE_CROP_ASPECT_RATIO_TOOLBAR_ACTION_ID, IMAGE_CROP_DONE_TOOLBAR_ACTION_ID, IMAGE_CROP_RESET_TOOLBAR_ACTION_ID, IMAGE_CROP_TOOLBAR_ACTION_ID, IMAGE_CROP_ZOOM_TOOLBAR_ACTION_ID, IMAGE_DOWNLOAD_TOOLBAR_ACTION_ID, IMAGE_INSERT_TOOLBAR_ACTION_ID, IMAGE_REPLACE_TOOLBAR_ACTION_ID, } from "./actionIds";
|
|
3
|
+
export { isImageCropToolbarSession, isImageSmudgeToolbarSession, } from "./runtimeShared";
|
|
4
|
+
export declare function setupImageProduct(context: CanvasPluginSetupContext): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type CanvasActionContext } from "../canvas-plugin-sdk/index";
|
|
2
2
|
import { type ImageShapeRecord } from "./types";
|
|
3
3
|
export declare function getSingleSelectedImageShape(context: CanvasActionContext): ImageShapeRecord | null;
|
|
4
4
|
export declare function isImageCropToolbarSession(context: CanvasActionContext): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Editor, type ShapeId } from "../canvas-core/index";
|
|
2
2
|
import type { ImageShapeRecord } from "./types";
|
|
3
3
|
export declare const IMAGE_SMUDGE_TOOLBAR_ACTION_ID = "image.smudge";
|
|
4
4
|
export declare const IMAGE_SMUDGE_CANCEL_TOOLBAR_ACTION_ID = "image.smudge.cancel";
|
|
@@ -33,6 +33,8 @@ export type ImageSmudgeSessionSnapshot = Readonly<{
|
|
|
33
33
|
shapeId: ShapeId;
|
|
34
34
|
brush: ImageSmudgeBrush;
|
|
35
35
|
strokes: readonly ImageSmudgeStroke[];
|
|
36
|
+
canUndo: boolean;
|
|
37
|
+
canRedo: boolean;
|
|
36
38
|
}>;
|
|
37
39
|
type ImageSmudgeSubscriber = () => void;
|
|
38
40
|
type ImageSmudgeConfirmHandler = (input?: ImageSmudgeConfirmInput) => Promise<unknown>;
|
|
@@ -54,9 +56,11 @@ export declare function getImageSmudgeSessionSnapshot(editor: Editor, shapeId: S
|
|
|
54
56
|
export declare function getActiveImageSmudgeSession(editor: Editor): ImageSmudgeSessionSnapshot | null;
|
|
55
57
|
export declare function subscribeImageSmudgeSession(editor: Editor, subscriber: ImageSmudgeSubscriber): () => void;
|
|
56
58
|
export declare function beginImageSmudgeStroke(editor: Editor, point: ImageSmudgeStrokePoint): void;
|
|
57
|
-
export declare function addImageSmudgeStrokePoint(editor: Editor, point: ImageSmudgeStrokePoint): void;
|
|
58
59
|
export declare function appendImageSmudgeStrokePoint(editor: Editor, point: ImageSmudgeStrokePoint): void;
|
|
59
60
|
export declare function endImageSmudgeStroke(editor: Editor): void;
|
|
61
|
+
export declare function cancelImageSmudgeStroke(editor: Editor): void;
|
|
62
|
+
export declare function undoImageSmudgeStroke(editor: Editor): boolean;
|
|
63
|
+
export declare function redoImageSmudgeStroke(editor: Editor): boolean;
|
|
60
64
|
export declare function registerImageSmudgeConfirmHandler(editor: Editor, handler: ImageSmudgeConfirmHandler): () => void;
|
|
61
65
|
export declare function requestImageSmudgeConfirm(editor: Editor, input?: ImageSmudgeConfirmInput): Promise<unknown>;
|
|
62
66
|
export declare function cloneImageSmudgeStrokes(strokes: readonly ImageSmudgeStroke[]): ImageSmudgeStroke[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type CanvasAction } from "../canvas-plugin-sdk/index";
|
|
2
2
|
export declare function createImageSmudgeCanvasActions(): CanvasAction[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CanvasAction, type ToolbarGroup } from "../canvas-
|
|
1
|
+
import { type CanvasAction, type ToolbarGroup } from "../canvas-plugin-sdk/index";
|
|
2
2
|
export declare function createImageStyleCanvasActions(): CanvasAction[];
|
|
3
3
|
export declare function createImageCornerRadiusToolbarGroup({ dataUiPrefix, id, order, }: {
|
|
4
4
|
dataUiPrefix: string;
|
|
@@ -12,6 +12,11 @@ export declare function createImageCornerRadiusToolbarItem({ dataUiPrefix, }: {
|
|
|
12
12
|
id: string;
|
|
13
13
|
actionId: string;
|
|
14
14
|
label: string;
|
|
15
|
+
icon: string;
|
|
15
16
|
placeholder: string;
|
|
17
|
+
suffix: string;
|
|
18
|
+
validate: typeof isValidImageCornerRadiusToolbarValue;
|
|
16
19
|
dataUi: string;
|
|
17
20
|
};
|
|
21
|
+
declare function isValidImageCornerRadiusToolbarValue(value: string): boolean;
|
|
22
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ContextMenuContribution, type ToolbarContribution } from "../canvas-plugin-sdk/index";
|
|
2
2
|
export declare function createImageToolbarContributions(): ToolbarContribution[];
|
|
3
3
|
export declare function createImageContextMenuContributions(): ContextMenuContribution[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export declare function createLaserCanvasRenderPlugin():
|
|
1
|
+
import { type CanvasRenderPlugin } from "../canvas-react/host/index";
|
|
2
|
+
export declare function createLaserCanvasRenderPlugin(): CanvasRenderPlugin;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function
|
|
1
|
+
import type { EditorPlugin } from "../canvas-core/index";
|
|
2
|
+
export declare function createLaserEditorPlugin(): EditorPlugin;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
3
|
-
export declare const Laser: import("../canvas-react/host/index").ConfigurableLandExtension<Record<string, never>>;
|
|
1
|
+
import { setupLaserProduct } from "./productRuntime";
|
|
2
|
+
export declare const Laser: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof setupLaserProduct>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { LaserTool } from "./laserTool";
|
|
2
2
|
export { createLaserCanvasRenderPlugin } from "./canvasRender";
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
3
|
+
export { createLaserEditorPlugin } from "./editorRuntime";
|
|
4
|
+
export { setupLaserProduct } from "./productRuntime";
|
|
5
|
+
export { getLaserRuntime } from "./laserRuntime";
|
|
6
|
+
export { Laser } from "./feature";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type Editor, type Vec } from "../canvas-core/index";
|
|
2
|
+
import { type Signal } from "../signals/index";
|
|
3
|
+
export interface LaserTrailState {
|
|
4
|
+
sessionId: number;
|
|
5
|
+
phase: "active" | "ending";
|
|
6
|
+
points: readonly Vec[];
|
|
7
|
+
}
|
|
8
|
+
export interface LaserRuntime {
|
|
9
|
+
readonly trailSignal: Signal<LaserTrailState | null>;
|
|
10
|
+
readonly activeSignal: Signal<boolean>;
|
|
11
|
+
start(): number;
|
|
12
|
+
set(sessionId: number, points: readonly Vec[]): void;
|
|
13
|
+
finish(sessionId: number): void;
|
|
14
|
+
clear(sessionId: number): void;
|
|
15
|
+
}
|
|
16
|
+
export declare const laserRuntimeToken: import("../canvas-core/index").EditorRuntimeToken<LaserRuntime>;
|
|
17
|
+
export declare function createLaserRuntime(): LaserRuntime;
|
|
18
|
+
export declare function getLaserRuntime(editor: Editor): LaserRuntime;
|