@yuzhouu/canvas-kit 0.1.3 → 0.1.5
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 +80 -78
- package/_vendor/canvas-core/bindings/{BindingUtil.d.ts → bindingUtil.d.ts} +1 -1
- package/_vendor/canvas-core/bindings/{BindingUtilRegistry.d.ts → bindingUtilRegistry.d.ts} +1 -1
- package/_vendor/canvas-core/bindings/terminalBinding.d.ts +28 -0
- package/_vendor/canvas-core/editor/clipboard.d.ts +2 -2
- package/_vendor/canvas-core/editor/commands.d.ts +6 -1
- package/_vendor/canvas-core/editor/createEditorWithPlugins.d.ts +6 -0
- package/_vendor/canvas-core/editor/edgeScroll.d.ts +1 -1
- package/_vendor/canvas-core/editor/{Editor.d.ts → editor.d.ts} +46 -51
- package/_vendor/canvas-core/editor/editorComputedHelpers.d.ts +5 -5
- package/_vendor/canvas-core/editor/editorSelectionTransforms.d.ts +2 -2
- package/_vendor/canvas-core/editor/events.d.ts +1 -1
- package/_vendor/canvas-core/editor/{HistoryManager.d.ts → historyManager.d.ts} +1 -1
- package/_vendor/canvas-core/editor/index.d.ts +10 -7
- package/_vendor/canvas-core/editor/interactions.d.ts +2 -2
- package/_vendor/canvas-core/editor/internal.d.ts +1 -1
- package/_vendor/canvas-core/editor/managers/{BindingManager.d.ts → bindingManager.d.ts} +1 -1
- package/_vendor/canvas-core/editor/managers/{CameraManager.d.ts → cameraManager.d.ts} +2 -2
- package/_vendor/canvas-core/editor/managers/{ClipboardManager.d.ts → clipboardManager.d.ts} +1 -1
- package/_vendor/canvas-core/editor/managers/{DocumentSnapshotManager.d.ts → documentSnapshotManager.d.ts} +1 -1
- package/_vendor/canvas-core/editor/managers/{InputsManager.d.ts → inputsManager.d.ts} +1 -1
- package/_vendor/canvas-core/editor/managers/{InteractionTransientManager.d.ts → interactionTransientManager.d.ts} +13 -10
- package/_vendor/canvas-core/editor/managers/{QueryManager.d.ts → queryManager.d.ts} +7 -6
- package/_vendor/canvas-core/editor/managers/{RenderWindowManager.d.ts → renderWindowManager.d.ts} +1 -1
- package/_vendor/canvas-core/editor/managers/selectionGeometry.d.ts +5 -5
- package/_vendor/canvas-core/editor/managers/{SelectionLayoutManager.d.ts → selectionLayoutManager.d.ts} +2 -2
- package/_vendor/canvas-core/editor/managers/{SelectionManager.d.ts → selectionManager.d.ts} +1 -1
- package/_vendor/canvas-core/editor/managers/{SelectionOverlayManager.d.ts → selectionOverlayManager.d.ts} +4 -3
- package/_vendor/canvas-core/editor/managers/{ShapeEditingManager.d.ts → shapeEditingManager.d.ts} +1 -1
- package/_vendor/canvas-core/editor/managers/{ShapeGeometryManager.d.ts → shapeGeometryManager.d.ts} +5 -5
- package/_vendor/canvas-core/editor/managers/{ShapeHierarchyManager.d.ts → shapeHierarchyManager.d.ts} +3 -6
- package/_vendor/canvas-core/editor/managers/shapeOrder.d.ts +1 -1
- package/_vendor/canvas-core/editor/managers/shapeReparenting.d.ts +1 -1
- package/_vendor/canvas-core/editor/managers/shortcutManager.d.ts +56 -0
- package/_vendor/canvas-core/editor/managers/snapCalculations.d.ts +2 -2
- package/_vendor/canvas-core/editor/managers/snapGeometry.d.ts +2 -2
- package/_vendor/canvas-core/editor/managers/snapIndicators.d.ts +2 -2
- package/_vendor/canvas-core/editor/managers/{SnapManager.d.ts → snapManager.d.ts} +1 -1
- package/_vendor/canvas-core/editor/managers/{SnapSnapshotBuilder.d.ts → snapSnapshotBuilder.d.ts} +1 -1
- package/_vendor/canvas-core/editor/managers/snapTypes.d.ts +2 -2
- package/_vendor/canvas-core/editor/managers/{SpatialIndexManager.d.ts → spatialIndexManager.d.ts} +4 -4
- package/_vendor/canvas-core/editor/managers/{ToolManager.d.ts → toolManager.d.ts} +4 -5
- package/_vendor/canvas-core/editor/queries/shapeTransforms.d.ts +4 -4
- package/_vendor/canvas-core/editor/renderWindow.d.ts +1 -1
- package/_vendor/canvas-core/editor/resizeGeometry.d.ts +2 -2
- package/_vendor/canvas-core/editor/selection.d.ts +26 -19
- package/_vendor/canvas-core/editor/selectionHandleInteractions.d.ts +1 -1
- package/_vendor/canvas-core/editor/selectionOverlay.d.ts +7 -5
- package/_vendor/canvas-core/editor/{StateNode.d.ts → stateNode.d.ts} +1 -1
- package/_vendor/canvas-core/exports/integrity.d.ts +1 -1
- package/_vendor/canvas-core/exports/svg.d.ts +6 -2
- package/_vendor/canvas-core/geometry/{Box.d.ts → box.d.ts} +1 -1
- package/_vendor/canvas-core/geometry/{Ellipse2d.d.ts → ellipse2d.d.ts} +3 -3
- package/_vendor/canvas-core/geometry/{Geometry2d.d.ts → geometry2d.d.ts} +2 -2
- package/_vendor/canvas-core/geometry/index.d.ts +7 -7
- package/_vendor/canvas-core/geometry/{Mat.d.ts → mat.d.ts} +1 -1
- package/_vendor/canvas-core/geometry/{Polyline2d.d.ts → polyline2d.d.ts} +3 -3
- package/_vendor/canvas-core/geometry/{Rectangle2d.d.ts → rectangle2d.d.ts} +3 -3
- package/_vendor/canvas-core/geometry/segments.d.ts +1 -1
- package/_vendor/canvas-core/index.d.ts +33 -31
- package/_vendor/canvas-core/plugins/{types.d.ts → editorPlugin.d.ts} +10 -9
- package/_vendor/canvas-core/plugins/index.d.ts +1 -1
- package/_vendor/canvas-core/schema/snapshotSupport.d.ts +43 -0
- package/_vendor/canvas-core/schema/snapshots.d.ts +6 -2
- package/_vendor/canvas-core/shapes/capabilities.d.ts +1 -1
- package/_vendor/canvas-core/shapes/colors.d.ts +26 -0
- package/_vendor/canvas-core/shapes/{ShapeUtil.d.ts → shapeUtil.d.ts} +22 -9
- package/_vendor/canvas-core/shapes/{ShapeUtilRegistry.d.ts → shapeUtilRegistry.d.ts} +1 -1
- package/_vendor/canvas-core/surfaces/actions.d.ts +35 -0
- package/_vendor/canvas-core/{contextMenu.d.ts → surfaces/contextMenu.d.ts} +11 -9
- package/_vendor/canvas-core/{toolbar.d.ts → surfaces/toolbar.d.ts} +17 -38
- package/_vendor/canvas-core/tools/hand/handTool.d.ts +5 -0
- package/_vendor/canvas-core/tools/index.d.ts +2 -2
- package/_vendor/canvas-core/tools/select/selectContainment.d.ts +5 -4
- package/_vendor/canvas-core/tools/select/selectTool.d.ts +5 -0
- package/_vendor/canvas-core/tools/select/selectToolHelpers.d.ts +3 -3
- package/_vendor/canvas-core/tools/select/states/{BrushingState.d.ts → brushingState.d.ts} +3 -3
- package/_vendor/canvas-core/tools/select/states/{DraggingSelectionHandleInteractionState.d.ts → draggingSelectionHandleInteractionState.d.ts} +3 -3
- package/_vendor/canvas-core/tools/select/states/{IdleState.d.ts → idleState.d.ts} +2 -2
- package/_vendor/canvas-core/tools/select/states/index.d.ts +11 -11
- package/_vendor/canvas-core/tools/select/states/{PointingCanvasState.d.ts → pointingCanvasState.d.ts} +3 -3
- package/_vendor/canvas-core/tools/select/states/{PointingResizeHandleState.d.ts → pointingResizeHandleState.d.ts} +3 -3
- package/_vendor/canvas-core/tools/select/states/{PointingRotateHandleState.d.ts → pointingRotateHandleState.d.ts} +3 -3
- package/_vendor/canvas-core/tools/select/states/{PointingSelectionHandleInteractionState.d.ts → pointingSelectionHandleInteractionState.d.ts} +3 -3
- package/_vendor/canvas-core/tools/select/states/{PointingShapeState.d.ts → pointingShapeState.d.ts} +3 -3
- package/_vendor/canvas-core/tools/select/states/{ResizingState.d.ts → resizingState.d.ts} +3 -3
- package/_vendor/canvas-core/tools/select/states/{RotatingState.d.ts → rotatingState.d.ts} +3 -3
- package/_vendor/canvas-core/tools/select/states/{SelectStateNode.d.ts → selectStateNode.d.ts} +2 -2
- package/_vendor/canvas-core/tools/select/states/{TranslatingState.d.ts → translatingState.d.ts} +5 -4
- package/_vendor/canvas-react/components/CanvasView.d.ts +7 -4
- package/_vendor/canvas-react/components/PageSpace.d.ts +1 -1
- package/_vendor/canvas-react/components/ShapeLayer.d.ts +4 -1
- package/_vendor/canvas-react/components/index.d.ts +0 -2
- package/_vendor/canvas-react/components/overlays/BindingGuide.d.ts +24 -0
- package/_vendor/canvas-react/components/overlays/BindingPreviewOverlay.d.ts +1 -0
- package/_vendor/canvas-react/components/overlays/BrushBoxOverlay.d.ts +1 -0
- package/_vendor/canvas-react/components/overlays/OverlaySvgRoot.d.ts +1 -0
- package/_vendor/canvas-react/components/overlays/SelectionFrameOverlay.d.ts +1 -0
- package/_vendor/canvas-react/components/overlays/SelectionHandlesOverlay.d.ts +1 -0
- package/_vendor/canvas-react/components/overlays/SelectionOverlaySvg.d.ts +1 -0
- package/_vendor/canvas-react/components/overlays/SelectionPathOverlay.d.ts +1 -0
- package/_vendor/canvas-react/components/overlays/ShapeOutlineOverlay.d.ts +8 -0
- package/_vendor/canvas-react/components/overlays/SnapIndicatorsOverlay.d.ts +1 -0
- package/_vendor/canvas-react/components/useCanvasDomEvents.d.ts +21 -0
- package/_vendor/canvas-react/dom.d.ts +10 -0
- package/_vendor/canvas-react/host/canvasOverlayRegistryContext.d.ts +3 -0
- package/_vendor/{canvas-plugin-api/index.d.ts → canvas-react/host/canvasPlugin.d.ts} +24 -8
- package/_vendor/canvas-react/host/contextMenuRegistry.d.ts +3 -3
- package/_vendor/canvas-react/host/domEventGuards.d.ts +1 -1
- package/_vendor/{canvas-plugin-api/feature.d.ts → canvas-react/host/extension.d.ts} +3 -3
- package/_vendor/canvas-react/host/index.d.ts +8 -3
- package/_vendor/canvas-react/host/overlayRegistry.d.ts +18 -0
- package/_vendor/canvas-react/host/pluginHost.d.ts +2 -93
- package/_vendor/canvas-react/host/pluginHostManifest.d.ts +2 -0
- package/_vendor/canvas-react/host/pluginHostRuntime.d.ts +3 -0
- package/_vendor/canvas-react/host/pluginHostTypes.d.ts +102 -0
- package/_vendor/canvas-react/host/pluginHostValidation.d.ts +11 -0
- package/_vendor/canvas-react/host/rendererRegistry.d.ts +1 -1
- package/_vendor/canvas-react/host/toolbarRegistry.d.ts +7 -7
- package/_vendor/canvas-react/index.d.ts +2 -1
- package/_vendor/plugin-arrow/arrowBindingAnchors.d.ts +5 -0
- package/_vendor/plugin-arrow/arrowBindingGeometry.d.ts +28 -0
- package/_vendor/plugin-arrow/arrowGeometry.d.ts +24 -0
- package/_vendor/plugin-arrow/{ArrowShapeUtil.d.ts → arrowShapeUtil.d.ts} +5 -4
- package/_vendor/plugin-arrow/arrowTerminalBindingResolver.d.ts +5 -6
- package/_vendor/plugin-arrow/arrowTerminalCommands.d.ts +4 -4
- package/_vendor/plugin-arrow/canvas.d.ts +1 -1
- package/_vendor/plugin-arrow/{core.d.ts → editor.d.ts} +2 -2
- package/_vendor/plugin-arrow/feature.d.ts +2 -2
- package/_vendor/plugin-arrow/index.d.ts +6 -5
- package/_vendor/plugin-arrow/types.d.ts +2 -2
- package/_vendor/plugin-draw/DrawShapeRenderer.d.ts +4 -2
- package/_vendor/plugin-draw/canvas.d.ts +1 -1
- package/_vendor/plugin-draw/drawHitTest.d.ts +2 -2
- package/_vendor/plugin-draw/editor.d.ts +7 -0
- package/_vendor/plugin-draw/feature.d.ts +2 -2
- package/_vendor/plugin-draw/index.d.ts +3 -3
- package/_vendor/plugin-draw/types.d.ts +3 -3
- package/_vendor/plugin-eraser/canvas.d.ts +1 -1
- package/_vendor/plugin-eraser/editor.d.ts +2 -0
- package/_vendor/plugin-eraser/feature.d.ts +2 -2
- package/_vendor/plugin-eraser/index.d.ts +2 -2
- package/_vendor/plugin-frame/canvas.d.ts +4 -3
- package/_vendor/plugin-frame/editor.d.ts +7 -0
- package/_vendor/plugin-frame/feature.d.ts +2 -2
- package/_vendor/plugin-frame/{FrameShapeUtil.d.ts → frameShapeUtil.d.ts} +4 -3
- package/_vendor/plugin-frame/{FrameTool.d.ts → frameTool.d.ts} +1 -1
- package/_vendor/plugin-frame/index.d.ts +4 -4
- package/_vendor/plugin-geo/canvas.d.ts +6 -4
- package/_vendor/plugin-geo/editor.d.ts +7 -0
- package/_vendor/plugin-geo/feature.d.ts +2 -2
- package/_vendor/plugin-geo/geoGeometry.d.ts +8 -0
- package/_vendor/plugin-geo/{GeoTools.d.ts → geoTools.d.ts} +10 -0
- package/_vendor/plugin-geo/index.d.ts +4 -4
- package/_vendor/plugin-geo/types.d.ts +6 -4
- package/_vendor/plugin-group/canvas.d.ts +5 -5
- package/_vendor/plugin-group/editor.d.ts +7 -0
- package/_vendor/plugin-group/feature.d.ts +2 -2
- package/_vendor/plugin-group/index.d.ts +3 -3
- package/_vendor/plugin-image/canvas.d.ts +1 -1
- package/_vendor/plugin-image/{core.d.ts → editor.d.ts} +3 -3
- package/_vendor/plugin-image/feature.d.ts +2 -2
- package/_vendor/plugin-image/{ImageShapeUtil.d.ts → imageShapeUtil.d.ts} +2 -1
- package/_vendor/plugin-image/index.d.ts +2 -2
- package/_vendor/plugin-laser/canvas.d.ts +1 -1
- package/_vendor/plugin-laser/editor.d.ts +2 -0
- package/_vendor/plugin-laser/feature.d.ts +2 -2
- package/_vendor/plugin-laser/index.d.ts +2 -2
- package/_vendor/plugin-text/canvas.d.ts +5 -2
- package/_vendor/plugin-text/editor.d.ts +5 -0
- package/_vendor/plugin-text/feature.d.ts +4 -3
- package/_vendor/plugin-text/host/RichTextEditingBox.d.ts +3 -1
- package/_vendor/plugin-text/host/RichTextToolbar.d.ts +3 -1
- package/_vendor/plugin-text/host/TiptapTextEditor.d.ts +3 -1
- package/_vendor/plugin-text/host/richTextBubbleMenuPositionSync.d.ts +7 -0
- package/_vendor/plugin-text/host/textEditingBoxStyle.d.ts +2 -1
- package/_vendor/plugin-text/host/textFontLoader.d.ts +2 -1
- package/_vendor/plugin-text/host/textMeasurement.d.ts +4 -3
- package/_vendor/plugin-text/host/textMeasurementSync.d.ts +2 -1
- package/_vendor/plugin-text/host/textShapeRendererRuntime.d.ts +2 -1
- package/_vendor/plugin-text/host/textShapeSync.d.ts +3 -1
- package/_vendor/plugin-text/host/tiptapTextEditorController.d.ts +3 -1
- package/_vendor/plugin-text/index.d.ts +2 -0
- package/_vendor/plugin-text/textFonts.d.ts +46 -0
- package/_vendor/plugin-text/textShapeSvgExporter.d.ts +9 -0
- package/_vendor/plugin-text/textStyle.d.ts +11 -2
- package/_vendor/plugin-text/textTypes.d.ts +4 -4
- package/_vendor/store/index.d.ts +1 -1
- package/_vendor/store/{Store.d.ts → store.d.ts} +7 -1
- package/browser/localSnapshotRestore.d.ts +13 -0
- package/{_vendor/canvas-product-react/persistence/localSnapshotPersistence.d.ts → browser/persistence.d.ts} +16 -10
- package/builtins/controller/createBuiltInCanvasController.d.ts +16 -0
- package/builtins/controller/layerController.d.ts +9 -0
- package/builtins/controller/shapeCreationController.d.ts +76 -0
- package/builtins/extensions.d.ts +17 -0
- package/builtins/index.d.ts +5 -0
- package/chrome/CanvasKitFloatingToolbarLayer.d.ts +6 -0
- package/chrome/FloatingSelectionToolbarPageSpace.d.ts +9 -0
- package/chrome/bindings/useCanvasKitChromeControls.d.ts +27 -0
- package/chrome/bindings/useContextMenuSurface.d.ts +12 -0
- package/chrome/bindings/useSvgExport.d.ts +15 -0
- package/chrome/bindings/useToolbarSurfaces.d.ts +26 -0
- package/chrome/types.d.ts +66 -0
- package/chrome/useCanvasKitChromeContext.d.ts +19 -0
- package/controller/canvasKitController.d.ts +36 -0
- package/{_vendor/canvas-product-react/api/canvasProductApi.d.ts → core/controller/canvasProductController.d.ts} +11 -21
- package/core/controller/featureControllerRegistry.d.ts +12 -0
- package/core/controller/index.d.ts +4 -0
- package/core/controller/productLayerTree.d.ts +10 -0
- package/core/features/actions/canvasActionContext.d.ts +15 -0
- package/core/features/actions/canvasActions.d.ts +26 -0
- package/core/features/clipboard/clipboardContextMenuContributions.d.ts +2 -0
- package/core/features/clipboard/clipboardContribution.d.ts +19 -0
- package/{_vendor/canvas-product-react/capabilities → core/features}/clipboard/clipboardService.d.ts +3 -2
- package/core/features/context-menu/contextMenuActions.d.ts +12 -0
- package/core/features/context-menu/contextMenuContext.d.ts +6 -0
- package/core/features/context-menu/contextMenuContribution.d.ts +4 -0
- package/core/features/context-menu/viewContextMenuContributions.d.ts +2 -0
- package/{_vendor/canvas-product-react/capabilities/export/useSvgExport.d.ts → core/features/export/svgExport.d.ts} +11 -7
- package/core/features/hostActionIds.d.ts +1 -0
- package/core/features/toolbar/selectionContextMenuContributions.d.ts +2 -0
- package/core/features/toolbar/toolContextMenuContributions.d.ts +2 -0
- package/core/features/toolbar/toolbarContribution.d.ts +4 -0
- package/core/features/toolbar/toolbarLabels.d.ts +8 -0
- package/core/index.d.ts +23 -0
- package/core/runtime/productAssets.d.ts +18 -0
- package/core/runtime/productContributions.d.ts +9 -0
- package/core/runtime/productDefinition.d.ts +32 -0
- package/core/runtime/productEditor.d.ts +3 -0
- package/core/runtime/productHost.d.ts +17 -0
- package/{_vendor/canvas-product-react → core}/runtime/productServices.d.ts +1 -2
- package/{_vendor/plugin-image-product-react → features/image}/ImageImportController.d.ts +2 -2
- package/{_vendor/plugin-image-product-react → features/image}/imageAssetService.d.ts +2 -2
- package/{_vendor/plugin-image-product-react → features/image}/imageBlobStore.d.ts +1 -1
- package/features/image/imageFileHelpers.d.ts +35 -0
- package/{_vendor/plugin-image-product-react → features/image}/imageHostActions.d.ts +13 -12
- package/features/image/imageHostExtension.d.ts +5 -0
- package/features/image/imageProductController.d.ts +22 -0
- package/features/image/imageProductToolbarActions.d.ts +2 -0
- package/{_vendor/plugin-image-product-react → features/image}/imageToolbarHostBridge.d.ts +2 -2
- package/{_vendor/plugin-image-product-react → features/image}/index.d.ts +4 -5
- package/{_vendor/plugin-image-product-react → features/image}/svgImageAssetInliner.d.ts +1 -1
- package/{_vendor/plugin-image-product-react → features/image}/useImageImport.d.ts +5 -4
- package/index.css +1 -2
- package/index.d.ts +14 -14
- package/index.mjs +66 -1
- package/package.json +1 -11
- package/product/canvasKitProduct.d.ts +50 -0
- package/react/CanvasKitPersistenceNotice.d.ts +4 -0
- package/react/CanvasKitRoot.d.ts +5 -0
- package/react/useCanvasKitController.d.ts +5 -0
- package/{product/useCanvasClipboardShortcuts.d.ts → react/useCanvasKitKeyboardShortcuts.d.ts} +1 -1
- package/react/useCanvasKitRuntime.d.ts +4 -0
- package/react/useCanvasKitStartup.d.ts +9 -0
- package/runtime/canvasKitHostExtensions.d.ts +19 -0
- package/runtime/canvasKitRuntime.d.ts +19 -0
- package/runtime/canvasKitRuntimeInitializer.d.ts +11 -0
- package/_vendor/canvas-core/bindings/arrow/arrowBindingHelpers.d.ts +0 -28
- package/_vendor/canvas-core/tools/hand/HandTool.d.ts +0 -5
- package/_vendor/canvas-core/tools/select/SelectTool.d.ts +0 -5
- package/_vendor/canvas-product-react/api/apiRegistry.d.ts +0 -12
- package/_vendor/canvas-product-react/api/index.d.ts +0 -4
- package/_vendor/canvas-product-react/capabilities/clipboard/systemClipboard.d.ts +0 -16
- package/_vendor/canvas-product-react/capabilities/context-menu/systemContextMenu.d.ts +0 -17
- package/_vendor/canvas-product-react/capabilities/context-menu/useContextMenuSurface.d.ts +0 -12
- package/_vendor/canvas-product-react/capabilities/history/useHistoryControls.d.ts +0 -8
- package/_vendor/canvas-product-react/capabilities/pages/usePageControls.d.ts +0 -12
- package/_vendor/canvas-product-react/capabilities/toolbar/systemToolbar.d.ts +0 -32
- package/_vendor/canvas-product-react/capabilities/toolbar/useToolbarSurfaces.d.ts +0 -19
- package/_vendor/canvas-product-react/capabilities/zoom/useZoomControls.d.ts +0 -9
- package/_vendor/canvas-product-react/index.d.ts +0 -24
- package/_vendor/canvas-product-react/persistence/index.d.ts +0 -2
- package/_vendor/canvas-product-react/runtime/CanvasProductRoot.d.ts +0 -4
- package/_vendor/canvas-product-react/runtime/productDefinition.d.ts +0 -45
- package/_vendor/plugin-draw/core.d.ts +0 -7
- package/_vendor/plugin-eraser/core.d.ts +0 -2
- package/_vendor/plugin-frame/core.d.ts +0 -7
- package/_vendor/plugin-geo/core.d.ts +0 -7
- package/_vendor/plugin-group/core.d.ts +0 -7
- package/_vendor/plugin-image-product-react/imageProductApi.d.ts +0 -21
- package/_vendor/plugin-image-product-react/imageToolbarRuntime.d.ts +0 -2
- package/_vendor/plugin-image-product-react/snapshotGuards.d.ts +0 -1
- package/_vendor/plugin-laser/core.d.ts +0 -2
- package/_vendor/plugin-text/TextShapeSvgExporter.d.ts +0 -6
- package/_vendor/plugin-text/core.d.ts +0 -2
- package/api/canvasKitApi.d.ts +0 -29
- package/product/Shell.d.ts +0 -19
- package/product/chromeContext.d.ts +0 -70
- package/product/createCanvasKitEditor.d.ts +0 -6
- package/product/index.d.ts +0 -7
- package/product/persistence.d.ts +0 -3
- package/product/product.d.ts +0 -22
- package/product-CxN5NN6u.mjs +0 -4
- package/product.mjs +0 -1
- package/standard/extensions.d.ts +0 -1
- package/standard/index.d.ts +0 -3
- package/standard/standardApi.d.ts +0 -91
- package/standard-R17_x8HU.mjs +0 -44
- package/standard.mjs +0 -1
- /package/_vendor/canvas-core/editor/managers/{SideEffectManager.d.ts → sideEffectManager.d.ts} +0 -0
- /package/_vendor/canvas-core/geometry/{Vec.d.ts → vec.d.ts} +0 -0
- /package/_vendor/canvas-react/host/{CanvasRendererRegistryContext.d.ts → canvasRendererRegistryContext.d.ts} +0 -0
- /package/_vendor/plugin-arrow/{ArrowBindingUtil.d.ts → arrowBindingUtil.d.ts} +0 -0
- /package/_vendor/plugin-arrow/{ArrowTool.d.ts → arrowTool.d.ts} +0 -0
- /package/_vendor/plugin-draw/{DrawShapeUtil.d.ts → drawShapeUtil.d.ts} +0 -0
- /package/_vendor/plugin-draw/{DrawTool.d.ts → drawTool.d.ts} +0 -0
- /package/_vendor/plugin-eraser/{EraserTool.d.ts → eraserTool.d.ts} +0 -0
- /package/_vendor/plugin-geo/{GeoShapeUtil.d.ts → geoShapeUtil.d.ts} +0 -0
- /package/_vendor/plugin-group/{GroupShapeUtil.d.ts → groupShapeUtil.d.ts} +0 -0
- /package/_vendor/plugin-laser/{LaserTool.d.ts → laserTool.d.ts} +0 -0
- /package/_vendor/plugin-text/{ArrowLabelBindingUtil.d.ts → arrowLabelBindingUtil.d.ts} +0 -0
- /package/_vendor/plugin-text/{GeoLabelBindingUtil.d.ts → geoLabelBindingUtil.d.ts} +0 -0
- /package/_vendor/plugin-text/{TextShapeUtil.d.ts → textShapeUtil.d.ts} +0 -0
- /package/_vendor/plugin-text/{TextTool.d.ts → textTool.d.ts} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { HandTool } from "./hand/
|
|
2
|
-
export { SelectTool } from "./select/
|
|
1
|
+
export { HandTool } from "./hand/handTool";
|
|
2
|
+
export { SelectTool } from "./select/selectTool";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { Editor } from "../../editor/
|
|
1
|
+
import type { Editor } from "../../editor/editor";
|
|
2
|
+
import type { Vec } from "../../geometry/vec";
|
|
2
3
|
import type { ShapeId, ShapeParentId } from "../../schema/records";
|
|
3
4
|
/**
|
|
4
5
|
* Containment / reparenting helpers used by the translating gesture. These are
|
|
@@ -6,6 +7,6 @@ import type { ShapeId, ShapeParentId } from "../../schema/records";
|
|
|
6
7
|
* driven by the set of shape ids being dragged.
|
|
7
8
|
*/
|
|
8
9
|
export declare function getSharedCurrentParentId(editor: Editor, shapeIds: readonly ShapeId[]): ShapeParentId | null;
|
|
9
|
-
export declare function resolveContainmentParentId(editor: Editor, shapeIds: readonly ShapeId[]): ShapeParentId | null;
|
|
10
|
-
export declare function updateDropTarget(editor: Editor, shapeIds: readonly ShapeId[]): void;
|
|
11
|
-
export declare function applyContainmentParent(editor: Editor, shapeIds: readonly ShapeId[]): void;
|
|
10
|
+
export declare function resolveContainmentParentId(editor: Editor, shapeIds: readonly ShapeId[], pagePoint?: Vec): ShapeParentId | null;
|
|
11
|
+
export declare function updateDropTarget(editor: Editor, shapeIds: readonly ShapeId[], pagePoint?: Vec): void;
|
|
12
|
+
export declare function applyContainmentParent(editor: Editor, shapeIds: readonly ShapeId[], pagePoint?: Vec): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Box } from "../../geometry/
|
|
2
|
-
import { Vec } from "../../geometry/
|
|
1
|
+
import { Box } from "../../geometry/box";
|
|
2
|
+
import { Vec } from "../../geometry/vec";
|
|
3
3
|
import type { ShapeUpdate } from "../../editor/commands";
|
|
4
|
-
import type { Editor } from "../../editor/
|
|
4
|
+
import type { Editor } from "../../editor/editor";
|
|
5
5
|
import type { PointerEditorEvent, TickEditorEvent } from "../../editor/events";
|
|
6
6
|
import type { SelectionResizeHandleId, SelectionResizePointShapeSnapshot, SelectionResizeShapeSnapshot, SelectionRotationTransform, SelectionRotatePointShapeSnapshot, SelectionRotateShapeSnapshot } from "../../editor/selection";
|
|
7
7
|
import type { HandleSnapSnapshot, ResizeSnapSnapshot, TranslateSnapSnapshot } from "../../editor/managers/snapTypes";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Editor } from "../../../editor/
|
|
2
|
-
import { StateNode } from "../../../editor/
|
|
1
|
+
import type { Editor } from "../../../editor/editor";
|
|
2
|
+
import { StateNode } from "../../../editor/stateNode";
|
|
3
3
|
import type { PointerEditorEvent, TickEditorEvent } from "../../../editor/events";
|
|
4
4
|
import { type BrushInfo } from "../selectToolHelpers";
|
|
5
|
-
import { InfoStateNode } from "./
|
|
5
|
+
import { InfoStateNode } from "./selectStateNode";
|
|
6
6
|
export declare class BrushingState extends InfoStateNode<BrushInfo> {
|
|
7
7
|
constructor(editor: Editor, parent: StateNode);
|
|
8
8
|
protected onInfoEnter(): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Editor } from "../../../editor/
|
|
2
|
-
import { StateNode } from "../../../editor/
|
|
1
|
+
import type { Editor } from "../../../editor/editor";
|
|
2
|
+
import { StateNode } from "../../../editor/stateNode";
|
|
3
3
|
import type { PointerEditorEvent } from "../../../editor/events";
|
|
4
4
|
import { type DraggingSelectionHandleInteractionInfo } from "../selectToolHelpers";
|
|
5
|
-
import { DraggingStateNode, type DragApplyInput } from "./
|
|
5
|
+
import { DraggingStateNode, type DragApplyInput } from "./selectStateNode";
|
|
6
6
|
export declare class DraggingSelectionHandleInteractionState extends DraggingStateNode<DraggingSelectionHandleInteractionInfo> {
|
|
7
7
|
protected readonly tickMode: "apply_after_scroll";
|
|
8
8
|
constructor(editor: Editor, parent: StateNode);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Editor } from "../../../editor/
|
|
2
|
-
import { StateNode } from "../../../editor/
|
|
1
|
+
import type { Editor } from "../../../editor/editor";
|
|
2
|
+
import { StateNode } from "../../../editor/stateNode";
|
|
3
3
|
import type { PointerEditorEvent } from "../../../editor/events";
|
|
4
4
|
export declare class IdleState extends StateNode {
|
|
5
5
|
constructor(editor: Editor, parent: StateNode);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { BrushingState } from "./
|
|
2
|
-
export { DraggingSelectionHandleInteractionState } from "./
|
|
3
|
-
export { IdleState } from "./
|
|
4
|
-
export { PointingCanvasState } from "./
|
|
5
|
-
export { PointingResizeHandleState } from "./
|
|
6
|
-
export { PointingRotateHandleState } from "./
|
|
7
|
-
export { PointingSelectionHandleInteractionState } from "./
|
|
8
|
-
export { PointingShapeState } from "./
|
|
9
|
-
export { ResizingState } from "./
|
|
10
|
-
export { RotatingState } from "./
|
|
11
|
-
export { TranslatingState } from "./
|
|
1
|
+
export { BrushingState } from "./brushingState";
|
|
2
|
+
export { DraggingSelectionHandleInteractionState } from "./draggingSelectionHandleInteractionState";
|
|
3
|
+
export { IdleState } from "./idleState";
|
|
4
|
+
export { PointingCanvasState } from "./pointingCanvasState";
|
|
5
|
+
export { PointingResizeHandleState } from "./pointingResizeHandleState";
|
|
6
|
+
export { PointingRotateHandleState } from "./pointingRotateHandleState";
|
|
7
|
+
export { PointingSelectionHandleInteractionState } from "./pointingSelectionHandleInteractionState";
|
|
8
|
+
export { PointingShapeState } from "./pointingShapeState";
|
|
9
|
+
export { ResizingState } from "./resizingState";
|
|
10
|
+
export { RotatingState } from "./rotatingState";
|
|
11
|
+
export { TranslatingState } from "./translatingState";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Editor } from "../../../editor/
|
|
2
|
-
import { StateNode } from "../../../editor/
|
|
1
|
+
import type { Editor } from "../../../editor/editor";
|
|
2
|
+
import { StateNode } from "../../../editor/stateNode";
|
|
3
3
|
import type { PointerEditorEvent } from "../../../editor/events";
|
|
4
4
|
import { type PointingCanvasInfo } from "../selectToolHelpers";
|
|
5
|
-
import { PointingStateNode } from "./
|
|
5
|
+
import { PointingStateNode } from "./selectStateNode";
|
|
6
6
|
export declare class PointingCanvasState extends PointingStateNode<PointingCanvasInfo> {
|
|
7
7
|
constructor(editor: Editor, parent: StateNode);
|
|
8
8
|
protected onDragThresholdExceeded(event: PointerEditorEvent): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Editor } from "../../../editor/
|
|
2
|
-
import { StateNode } from "../../../editor/
|
|
1
|
+
import type { Editor } from "../../../editor/editor";
|
|
2
|
+
import { StateNode } from "../../../editor/stateNode";
|
|
3
3
|
import { type PointingResizeHandleInfo } from "../selectToolHelpers";
|
|
4
|
-
import { PointingStateNode } from "./
|
|
4
|
+
import { PointingStateNode } from "./selectStateNode";
|
|
5
5
|
export declare class PointingResizeHandleState extends PointingStateNode<PointingResizeHandleInfo> {
|
|
6
6
|
constructor(editor: Editor, parent: StateNode);
|
|
7
7
|
protected onDragThresholdExceeded(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Editor } from "../../../editor/
|
|
2
|
-
import { StateNode } from "../../../editor/
|
|
1
|
+
import type { Editor } from "../../../editor/editor";
|
|
2
|
+
import { StateNode } from "../../../editor/stateNode";
|
|
3
3
|
import { type PointingRotateHandleInfo } from "../selectToolHelpers";
|
|
4
|
-
import { PointingStateNode } from "./
|
|
4
|
+
import { PointingStateNode } from "./selectStateNode";
|
|
5
5
|
export declare class PointingRotateHandleState extends PointingStateNode<PointingRotateHandleInfo> {
|
|
6
6
|
constructor(editor: Editor, parent: StateNode);
|
|
7
7
|
protected onDragThresholdExceeded(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Editor } from "../../../editor/
|
|
2
|
-
import { StateNode } from "../../../editor/
|
|
1
|
+
import type { Editor } from "../../../editor/editor";
|
|
2
|
+
import { StateNode } from "../../../editor/stateNode";
|
|
3
3
|
import { type PointingSelectionHandleInteractionInfo } from "../selectToolHelpers";
|
|
4
|
-
import { PointingStateNode } from "./
|
|
4
|
+
import { PointingStateNode } from "./selectStateNode";
|
|
5
5
|
export declare class PointingSelectionHandleInteractionState extends PointingStateNode<PointingSelectionHandleInteractionInfo> {
|
|
6
6
|
constructor(editor: Editor, parent: StateNode);
|
|
7
7
|
protected onDragThresholdExceeded(): void;
|
package/_vendor/canvas-core/tools/select/states/{PointingShapeState.d.ts → pointingShapeState.d.ts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Editor } from "../../../editor/
|
|
2
|
-
import { StateNode } from "../../../editor/
|
|
1
|
+
import type { Editor } from "../../../editor/editor";
|
|
2
|
+
import { StateNode } from "../../../editor/stateNode";
|
|
3
3
|
import type { PointerEditorEvent } from "../../../editor/events";
|
|
4
4
|
import { type PointingShapeInfo } from "../selectToolHelpers";
|
|
5
|
-
import { PointingStateNode } from "./
|
|
5
|
+
import { PointingStateNode } from "./selectStateNode";
|
|
6
6
|
export declare class PointingShapeState extends PointingStateNode<PointingShapeInfo> {
|
|
7
7
|
constructor(editor: Editor, parent: StateNode);
|
|
8
8
|
protected onInfoEnter(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Editor } from "../../../editor/
|
|
2
|
-
import { StateNode } from "../../../editor/
|
|
1
|
+
import type { Editor } from "../../../editor/editor";
|
|
2
|
+
import { StateNode } from "../../../editor/stateNode";
|
|
3
3
|
import { type ResizingInfo } from "../selectToolHelpers";
|
|
4
|
-
import { DraggingStateNode, type DragApplyInput } from "./
|
|
4
|
+
import { DraggingStateNode, type DragApplyInput } from "./selectStateNode";
|
|
5
5
|
export declare class ResizingState extends DraggingStateNode<ResizingInfo> {
|
|
6
6
|
protected readonly tickMode: "apply_after_scroll_or_without_screen_point";
|
|
7
7
|
constructor(editor: Editor, parent: StateNode);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Editor } from "../../../editor/
|
|
2
|
-
import { StateNode } from "../../../editor/
|
|
1
|
+
import type { Editor } from "../../../editor/editor";
|
|
2
|
+
import { StateNode } from "../../../editor/stateNode";
|
|
3
3
|
import { type RotatingInfo } from "../selectToolHelpers";
|
|
4
|
-
import { DraggingStateNode, type DragApplyInput } from "./
|
|
4
|
+
import { DraggingStateNode, type DragApplyInput } from "./selectStateNode";
|
|
5
5
|
export declare class RotatingState extends DraggingStateNode<RotatingInfo> {
|
|
6
6
|
protected readonly tickMode: "apply_after_scroll";
|
|
7
7
|
constructor(editor: Editor, parent: StateNode);
|
package/_vendor/canvas-core/tools/select/states/{SelectStateNode.d.ts → selectStateNode.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Vec } from "../../../geometry/
|
|
2
|
-
import { StateNode } from "../../../editor/
|
|
1
|
+
import type { Vec } from "../../../geometry/vec";
|
|
2
|
+
import { StateNode } from "../../../editor/stateNode";
|
|
3
3
|
import type { PointerEditorEvent, TickEditorEvent } from "../../../editor/events";
|
|
4
4
|
import { type EdgeScrollTickMode } from "../selectToolHelpers";
|
|
5
5
|
/**
|
package/_vendor/canvas-core/tools/select/states/{TranslatingState.d.ts → translatingState.d.ts}
RENAMED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import type { Editor } from "../../../editor/
|
|
2
|
-
import {
|
|
1
|
+
import type { Editor } from "../../../editor/editor";
|
|
2
|
+
import type { PointerEditorEvent } from "../../../editor/events";
|
|
3
|
+
import { StateNode } from "../../../editor/stateNode";
|
|
3
4
|
import { type TranslatingInfo } from "../selectToolHelpers";
|
|
4
|
-
import { DraggingStateNode, type DragApplyInput } from "./
|
|
5
|
+
import { DraggingStateNode, type DragApplyInput } from "./selectStateNode";
|
|
5
6
|
export declare class TranslatingState extends DraggingStateNode<TranslatingInfo> {
|
|
6
7
|
protected readonly tickMode: "always_apply";
|
|
7
8
|
constructor(editor: Editor, parent: StateNode);
|
|
8
9
|
protected getHistoryMark(): string;
|
|
9
10
|
protected onDragStart(): void;
|
|
10
|
-
protected onPointerUp(): void;
|
|
11
|
+
protected onPointerUp(event: PointerEditorEvent): void;
|
|
11
12
|
protected onCancel(): void;
|
|
12
13
|
protected onInfoExit(): void;
|
|
13
14
|
protected apply({ pagePoint, shiftKey, accelKey }: DragApplyInput): void;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import type { CanvasPluginComponent, CanvasPluginProvider } from "
|
|
1
|
+
import { type ActiveContextMenu } from "../../canvas-core/index";
|
|
2
|
+
import type { CanvasPluginComponent, CanvasPluginProvider } from "../host/canvasPlugin";
|
|
3
3
|
import { type CanvasRendererRegistry } from "../host/rendererRegistry";
|
|
4
|
+
import { type CanvasOverlayRegistry } from "../host/overlayRegistry";
|
|
4
5
|
import { type CanvasDomEventGuardRegistry } from "../host/domEventGuards";
|
|
5
|
-
export declare function Canvas({ canvasComponents, canvasProviders, domEventGuardRegistry, onContextMenuRequest, rendererRegistry, }?: {
|
|
6
|
+
export declare function Canvas({ canvasComponents, canvasProviders, domEventGuardRegistry, onContextMenuRequest, overlayRegistry, rendererRegistry, showGrid, }?: {
|
|
6
7
|
canvasComponents?: readonly CanvasPluginComponent[];
|
|
7
8
|
canvasProviders?: readonly CanvasPluginProvider[];
|
|
8
9
|
domEventGuardRegistry?: CanvasDomEventGuardRegistry;
|
|
9
|
-
onContextMenuRequest?: (
|
|
10
|
+
onContextMenuRequest?: (activeContextMenu: ActiveContextMenu) => void;
|
|
11
|
+
overlayRegistry?: CanvasOverlayRegistry;
|
|
10
12
|
rendererRegistry?: CanvasRendererRegistry;
|
|
13
|
+
showGrid?: boolean;
|
|
11
14
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { type ShapeId } from "../../canvas-core/index";
|
|
2
|
+
export declare function ShapeLayer({ hoveredShapeId, }: {
|
|
3
|
+
hoveredShapeId?: ShapeId | null;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface PagePointLike {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
}
|
|
5
|
+
export type DashedGuideSegmentKind = "binding-preview" | "selection-binding";
|
|
6
|
+
export declare function DashedGuideSegment({ start, end, startInset, endInset, strokeWidth, dashSize, gapSize, kind, terminal, }: {
|
|
7
|
+
start: PagePointLike;
|
|
8
|
+
end: PagePointLike;
|
|
9
|
+
startInset: number;
|
|
10
|
+
endInset: number;
|
|
11
|
+
strokeWidth: number;
|
|
12
|
+
dashSize: number;
|
|
13
|
+
gapSize: number;
|
|
14
|
+
kind: DashedGuideSegmentKind;
|
|
15
|
+
terminal: string;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
17
|
+
export declare function DashedGuidePath({ path, strokeWidth, dashSize, gapSize, kind, terminal, }: {
|
|
18
|
+
path: string;
|
|
19
|
+
strokeWidth: number;
|
|
20
|
+
dashSize: number;
|
|
21
|
+
gapSize: number;
|
|
22
|
+
kind: DashedGuideSegmentKind;
|
|
23
|
+
terminal: string;
|
|
24
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BindingPreviewOverlay: import("react").NamedExoticComponent<object>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BrushBoxOverlay: import("react").NamedExoticComponent<object>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const OverlaySvgRoot: import("react").NamedExoticComponent<object>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SelectionFrameOverlay: import("react").NamedExoticComponent<object>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SelectionHandlesOverlay: import("react").NamedExoticComponent<object>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SelectionOverlaySvg: import("react").NamedExoticComponent<object>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SelectionPathOverlay: import("react").NamedExoticComponent<object>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Editor, type ShapeRecord } from "../../../canvas-core/index";
|
|
2
|
+
export declare function ShapeOutlineOverlay({ editor, shape, stroke, fill, strokeWidth, }: {
|
|
3
|
+
editor: Editor;
|
|
4
|
+
shape: ShapeRecord;
|
|
5
|
+
stroke: string;
|
|
6
|
+
fill: string;
|
|
7
|
+
strokeWidth: number;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SnapIndicatorsOverlay: import("react").NamedExoticComponent<object>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type MouseEvent as ReactMouseEvent, type PointerEvent as ReactPointerEvent, type RefObject } from "react";
|
|
2
|
+
import { type ActiveContextMenu, type Editor, type ShapeEditingSession, type ShapeId } from "../../canvas-core/index";
|
|
3
|
+
import type { CanvasDomEventGuardRegistry } from "../host/domEventGuards";
|
|
4
|
+
export interface CanvasDomEventHandlers {
|
|
5
|
+
onPointerDown: (event: ReactPointerEvent<HTMLDivElement>) => void;
|
|
6
|
+
onContextMenu: (event: ReactMouseEvent<HTMLDivElement>) => void;
|
|
7
|
+
}
|
|
8
|
+
export interface CanvasDomEventState {
|
|
9
|
+
containerRef: RefObject<HTMLDivElement | null>;
|
|
10
|
+
handlers: CanvasDomEventHandlers;
|
|
11
|
+
hoveredShapeId: ShapeId | null;
|
|
12
|
+
isPointerActive: boolean;
|
|
13
|
+
surfaceCursor: string | undefined;
|
|
14
|
+
}
|
|
15
|
+
export declare function useCanvasDomEvents({ activeDomEventGuards, activeToolId, editor, onContextMenuRequest, shapeEditingSession, }: {
|
|
16
|
+
activeDomEventGuards: CanvasDomEventGuardRegistry;
|
|
17
|
+
activeToolId: string;
|
|
18
|
+
editor: Editor;
|
|
19
|
+
onContextMenuRequest?: (activeContextMenu: ActiveContextMenu) => void;
|
|
20
|
+
shapeEditingSession: ShapeEditingSession | null;
|
|
21
|
+
}): CanvasDomEventState;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Vec, type Editor } from "../canvas-core/index";
|
|
2
|
+
export declare const CANVAS_SURFACE_DATA_UI = "canvas-surface";
|
|
3
|
+
export declare const CANVAS_SURFACE_SELECTOR = "[data-ui=\"canvas-surface\"]";
|
|
4
|
+
export declare function getEditableEventTarget(target: EventTarget | null): HTMLElement | null;
|
|
5
|
+
export declare function isEditableEventTarget(target: EventTarget | null): boolean;
|
|
6
|
+
export declare function getCanvasSurfaceElement(root?: ParentNode): HTMLElement | null;
|
|
7
|
+
export declare function getCanvasSurfaceElementForNode(node: Node | null | undefined): HTMLElement | null;
|
|
8
|
+
export declare function forwardWheelEventToCanvasSurface(event: WheelEvent, source: Node): boolean;
|
|
9
|
+
export declare function getCanvasSurfaceScreenPoint(point: Pick<MouseEvent, "clientX" | "clientY">, surface?: HTMLElement | null): Vec;
|
|
10
|
+
export declare function getCanvasSurfacePagePoint(editor: Editor, point: Pick<MouseEvent, "clientX" | "clientY">, surface?: HTMLElement | null): Vec;
|
|
@@ -1,18 +1,35 @@
|
|
|
1
1
|
import type { ComponentType, ReactNode } from "react";
|
|
2
|
-
import type { Editor,
|
|
3
|
-
export { defineLandExtension, resolveLandExtensions, } from "./feature";
|
|
4
|
-
export type { ConfigurableLandExtension, LandExtension, LandExtensionConfig, LandExtensionOptionsInput, LandFeatureBundle, ResolvedLandExtension, } from "./feature";
|
|
2
|
+
import type { Editor, SelectionCustomHandle, ShapeColor, ShapeEditingSession, ShapeRecordBase } from "../../canvas-core/index";
|
|
5
3
|
export interface ShapeRendererProps<S extends ShapeRecordBase = ShapeRecordBase> {
|
|
6
4
|
shape: S;
|
|
7
5
|
editor: Editor;
|
|
8
6
|
isSelected: boolean;
|
|
7
|
+
isHovered: boolean;
|
|
9
8
|
shapeEditingSession: ShapeEditingSession | null;
|
|
10
9
|
}
|
|
10
|
+
export declare const SHAPE_HOVER_STROKE = "var(--land-selection, #2563eb)";
|
|
11
|
+
export declare function getShapeStrokeForHover(stroke: ShapeColor, isHovered: boolean): string;
|
|
11
12
|
export interface RegisteredShapeRenderer<S extends ShapeRecordBase = ShapeRecordBase> {
|
|
12
13
|
type: S["type"];
|
|
13
14
|
component: ComponentType<ShapeRendererProps<S>>;
|
|
14
15
|
}
|
|
15
|
-
export type AnyRegisteredShapeRenderer = RegisteredShapeRenderer<
|
|
16
|
+
export type AnyRegisteredShapeRenderer = RegisteredShapeRenderer<any>;
|
|
17
|
+
export interface SelectionCustomHandleRendererProps<H extends SelectionCustomHandle = SelectionCustomHandle> {
|
|
18
|
+
handle: H;
|
|
19
|
+
strokeWidth: number;
|
|
20
|
+
}
|
|
21
|
+
export interface RegisteredSelectionCustomHandleRenderer<H extends SelectionCustomHandle = SelectionCustomHandle> {
|
|
22
|
+
type: H["type"];
|
|
23
|
+
component: ComponentType<SelectionCustomHandleRendererProps<H>>;
|
|
24
|
+
}
|
|
25
|
+
export type AnyRegisteredSelectionCustomHandleRenderer = RegisteredSelectionCustomHandleRenderer<any>;
|
|
26
|
+
export type CanvasOverlayLayer = "below-host" | "above-host";
|
|
27
|
+
export interface CanvasOverlayContribution {
|
|
28
|
+
id: string;
|
|
29
|
+
component: ComponentType;
|
|
30
|
+
layer?: CanvasOverlayLayer;
|
|
31
|
+
order?: number;
|
|
32
|
+
}
|
|
16
33
|
export interface CanvasPluginComponent {
|
|
17
34
|
id: string;
|
|
18
35
|
component: ComponentType;
|
|
@@ -23,7 +40,6 @@ export interface CanvasPluginProvider {
|
|
|
23
40
|
children: ReactNode;
|
|
24
41
|
}>;
|
|
25
42
|
}
|
|
26
|
-
export type ShapeRendererRegistrar = <S extends ShapeRecordBase>(renderer: RegisteredShapeRenderer<S>) => void;
|
|
27
43
|
export type CanvasDomEventGuardName = "pointer_down" | "pointer_move" | "pointer_up" | "pointer_cancel" | "wheel" | "key_down" | "key_up";
|
|
28
44
|
export type CanvasDomEventGuardDecision = "continue" | "handled";
|
|
29
45
|
export interface CanvasDomEventGuardInput {
|
|
@@ -48,10 +64,10 @@ export interface CanvasDomEventGuard {
|
|
|
48
64
|
}
|
|
49
65
|
export interface LandCanvasPlugin {
|
|
50
66
|
id: string;
|
|
67
|
+
shapeRenderers?: readonly AnyRegisteredShapeRenderer[];
|
|
68
|
+
canvasOverlays?: readonly CanvasOverlayContribution[];
|
|
69
|
+
selectionCustomHandleRenderers?: readonly AnyRegisteredSelectionCustomHandleRenderer[];
|
|
51
70
|
domEventGuards?: readonly CanvasDomEventGuard[];
|
|
52
71
|
canvasProviders?: readonly CanvasPluginProvider[];
|
|
53
72
|
canvasComponents?: readonly CanvasPluginComponent[];
|
|
54
|
-
setup(registerShapeRenderer: ShapeRendererRegistrar): void;
|
|
55
73
|
}
|
|
56
|
-
export type { ToolbarAction, ToolbarActionRunInput, ToolbarActionValue, ToolbarBadgeItem, ToolbarButtonItem, ToolbarContext, ToolbarContribution, ToolbarGroup, ToolbarItem, ToolbarSegmentedItem, ToolbarSegmentedOption, ToolbarSelectionSnapshot, ToolbarSeparatorItem, ToolbarStepperItem, ToolbarStepperOption, ToolbarTextInputItem, ToolbarSurface, ToolbarSwatchesItem, ToolbarSwatchOption, ToolbarToolSnapshot, };
|
|
57
|
-
export declare function setupCanvasPlugins(plugins: readonly LandCanvasPlugin[], registerShapeRenderer: ShapeRendererRegistrar): void;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { ContextMenuContext, ContextMenuContribution, ContextMenuContributionTarget, ContextMenuSection,
|
|
1
|
+
import type { ContextMenuContext, ContextMenuContribution, ContextMenuContributionTarget, ContextMenuSection, LandEditorPlugin } from "../../canvas-core/index";
|
|
2
2
|
export declare class CanvasContextMenuRegistry {
|
|
3
3
|
private readonly contributions;
|
|
4
4
|
private readonly duplicateContributionIds;
|
|
5
5
|
registerContribution(contribution: ContextMenuContribution, options?: {
|
|
6
6
|
replace?: boolean;
|
|
7
7
|
}): void;
|
|
8
|
-
|
|
8
|
+
registerEditorPlugins(plugins: readonly LandEditorPlugin[]): void;
|
|
9
9
|
getDuplicateContributionIds(): string[];
|
|
10
10
|
getSections(target: ContextMenuContributionTarget, context: ContextMenuContext): ContextMenuSection[];
|
|
11
11
|
}
|
|
12
|
-
export declare function createCanvasContextMenuRegistry(plugins?: readonly
|
|
12
|
+
export declare function createCanvasContextMenuRegistry(plugins?: readonly LandEditorPlugin[]): CanvasContextMenuRegistry;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CanvasDomEventGuard, type CanvasDomEventGuardCursorInput, type CanvasDomEventGuardInput, type LandCanvasPlugin } from "
|
|
1
|
+
import { type CanvasDomEventGuard, type CanvasDomEventGuardCursorInput, type CanvasDomEventGuardInput, type LandCanvasPlugin } from "./canvasPlugin";
|
|
2
2
|
export declare class CanvasDomEventGuardRegistry {
|
|
3
3
|
private readonly guards;
|
|
4
4
|
private readonly registeredGuardIds;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { LandCanvasPlugin } from "./
|
|
1
|
+
import type { LandEditorPlugin, ShapeRecordBase } from "../../canvas-core/index";
|
|
2
|
+
import type { LandCanvasPlugin } from "./canvasPlugin";
|
|
3
3
|
type LandExtensionOptions = Record<string, unknown>;
|
|
4
4
|
export interface LandFeatureBundle {
|
|
5
5
|
id: string;
|
|
6
|
-
|
|
6
|
+
editorPlugins: readonly LandEditorPlugin[];
|
|
7
7
|
canvasPlugins: readonly LandCanvasPlugin[];
|
|
8
8
|
shapeTypes: readonly ShapeRecordBase["type"][];
|
|
9
9
|
}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
export { CanvasRendererRegistryContext, useCanvasRendererRegistry, } from "./
|
|
1
|
+
export { CanvasRendererRegistryContext, useCanvasRendererRegistry, } from "./canvasRendererRegistryContext";
|
|
2
|
+
export { CanvasOverlayRegistryContext, useCanvasOverlayRegistry, } from "./canvasOverlayRegistryContext";
|
|
2
3
|
export { CanvasDomEventGuardRegistry, createCanvasDomEventGuardRegistry, } from "./domEventGuards";
|
|
4
|
+
export { CanvasOverlayRegistry, createCanvasOverlayRegistry, } from "./overlayRegistry";
|
|
3
5
|
export { CanvasRendererRegistry, createCanvasRendererRegistry, } from "./rendererRegistry";
|
|
4
6
|
export { CanvasToolbarRegistry, createCanvasToolbarRegistry, } from "./toolbarRegistry";
|
|
5
7
|
export { CanvasContextMenuRegistry, createCanvasContextMenuRegistry, } from "./contextMenuRegistry";
|
|
6
|
-
export type { AnyRegisteredShapeRenderer, RegisteredShapeRenderer, ShapeRendererProps, } from "
|
|
8
|
+
export type { AnyRegisteredSelectionCustomHandleRenderer, AnyRegisteredShapeRenderer, CanvasOverlayContribution, CanvasOverlayLayer, CanvasDomEventGuard, CanvasDomEventGuardCursorInput, CanvasDomEventGuardDecision, CanvasDomEventGuardInput, CanvasDomEventGuardName, CanvasPluginComponent, CanvasPluginProvider, LandCanvasPlugin, RegisteredSelectionCustomHandleRenderer, RegisteredShapeRenderer, SelectionCustomHandleRendererProps, ShapeRendererProps, } from "./canvasPlugin";
|
|
9
|
+
export { getShapeStrokeForHover, SHAPE_HOVER_STROKE, } from "./canvasPlugin";
|
|
10
|
+
export { defineLandExtension, resolveLandExtensions, } from "./extension";
|
|
11
|
+
export type { ConfigurableLandExtension, LandExtension, LandExtensionConfig, LandExtensionOptionsInput, LandFeatureBundle, ResolvedLandExtension, } from "./extension";
|
|
7
12
|
export { createCanvasPluginHostRuntime } from "./pluginHost";
|
|
8
|
-
export type { CanvasPluginHostManifestEntry, CanvasPluginHostManifestToolbarContributionEntry, CanvasPluginHostRuntime, CanvasPluginHostShapeValidationSummary, CanvasPluginHostSource, CanvasPluginHostValidationIssue, CanvasPluginHostValidationIssueSeverity, CanvasPluginHostValidationSummary, CanvasPluginHostVerdict, CreateCanvasPluginHostRuntimeOptions, } from "./pluginHost";
|
|
13
|
+
export type { CanvasPluginHostManifestContextMenuContributionEntry, CanvasPluginHostManifestEntry, CanvasPluginHostManifestToolbarContributionEntry, CanvasPluginHostRuntime, CanvasPluginHostShapeValidationSummary, CanvasPluginHostSource, CanvasPluginHostValidationIssue, CanvasPluginHostValidationIssueSeverity, CanvasPluginHostValidationSummary, CanvasPluginHostVerdict, CreateCanvasPluginHostRuntimeOptions, } from "./pluginHost";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { SelectionCustomHandle } from "../../canvas-core/index";
|
|
2
|
+
import type { AnyRegisteredSelectionCustomHandleRenderer, CanvasOverlayContribution, CanvasOverlayLayer, LandCanvasPlugin, RegisteredSelectionCustomHandleRenderer } from "./canvasPlugin";
|
|
3
|
+
export declare class CanvasOverlayRegistry {
|
|
4
|
+
private readonly selectionCustomHandleRenderers;
|
|
5
|
+
private readonly canvasOverlays;
|
|
6
|
+
private readonly registeredPluginIds;
|
|
7
|
+
registerCanvasOverlay(overlay: CanvasOverlayContribution): void;
|
|
8
|
+
getCanvasOverlay(id: string): CanvasOverlayContribution | null;
|
|
9
|
+
hasCanvasOverlay(id: string): boolean;
|
|
10
|
+
getCanvasOverlays(layer?: CanvasOverlayLayer): CanvasOverlayContribution[];
|
|
11
|
+
getRegisteredCanvasOverlayIds(): string[];
|
|
12
|
+
registerSelectionCustomHandleRenderer<H extends SelectionCustomHandle>(renderer: RegisteredSelectionCustomHandleRenderer<H>): void;
|
|
13
|
+
getSelectionCustomHandleRenderer(type: SelectionCustomHandle["type"]): AnyRegisteredSelectionCustomHandleRenderer | null;
|
|
14
|
+
hasSelectionCustomHandleRenderer(type: SelectionCustomHandle["type"]): boolean;
|
|
15
|
+
getRegisteredSelectionCustomHandleTypes(): SelectionCustomHandle["type"][];
|
|
16
|
+
registerCanvasPlugins(plugins: readonly LandCanvasPlugin[]): void;
|
|
17
|
+
}
|
|
18
|
+
export declare function createCanvasOverlayRegistry(plugins?: readonly LandCanvasPlugin[]): CanvasOverlayRegistry;
|
|
@@ -1,93 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import type { LandCorePlugin } from "../../canvas-core/index";
|
|
4
|
-
import { type CanvasRendererRegistry } from "./rendererRegistry";
|
|
5
|
-
import { type CanvasDomEventGuardRegistry } from "./domEventGuards";
|
|
6
|
-
import { type CanvasToolbarRegistry } from "./toolbarRegistry";
|
|
7
|
-
import { type CanvasContextMenuRegistry } from "./contextMenuRegistry";
|
|
8
|
-
export type CanvasPluginHostSource = "built-in" | "dev-sample";
|
|
9
|
-
export type CanvasPluginHostVerdict = "pass" | "fail";
|
|
10
|
-
export interface CreateCanvasPluginHostRuntimeOptions {
|
|
11
|
-
source?: CanvasPluginHostSource;
|
|
12
|
-
}
|
|
13
|
-
export interface CanvasPluginHostManifestEntry {
|
|
14
|
-
id: string;
|
|
15
|
-
extensionName: string;
|
|
16
|
-
source: CanvasPluginHostSource;
|
|
17
|
-
corePluginIds: string[];
|
|
18
|
-
canvasPluginIds: string[];
|
|
19
|
-
interactionHandlerIds: string[];
|
|
20
|
-
toolbarActionIds: string[];
|
|
21
|
-
toolbarContributionIds: string[];
|
|
22
|
-
toolbarContributions: CanvasPluginHostManifestToolbarContributionEntry[];
|
|
23
|
-
contextMenuContributionIds: string[];
|
|
24
|
-
contextMenuContributions: CanvasPluginHostManifestContextMenuContributionEntry[];
|
|
25
|
-
domEventGuardIds: string[];
|
|
26
|
-
canvasProviderIds: string[];
|
|
27
|
-
canvasComponentIds: string[];
|
|
28
|
-
shapeTypes: string[];
|
|
29
|
-
}
|
|
30
|
-
export interface CanvasPluginHostManifestToolbarContributionEntry {
|
|
31
|
-
id: string;
|
|
32
|
-
surface: string;
|
|
33
|
-
placement: string;
|
|
34
|
-
actionIds: string[];
|
|
35
|
-
}
|
|
36
|
-
export interface CanvasPluginHostManifestContextMenuContributionEntry {
|
|
37
|
-
id: string;
|
|
38
|
-
target: string;
|
|
39
|
-
actionIds: string[];
|
|
40
|
-
}
|
|
41
|
-
export interface CanvasPluginHostRuntime {
|
|
42
|
-
corePlugins: LandCorePlugin[];
|
|
43
|
-
canvasPlugins: LandCanvasPlugin[];
|
|
44
|
-
canvasProviders: CanvasPluginProvider[];
|
|
45
|
-
canvasComponents: CanvasPluginComponent[];
|
|
46
|
-
rendererRegistry: CanvasRendererRegistry;
|
|
47
|
-
domEventGuardRegistry: CanvasDomEventGuardRegistry;
|
|
48
|
-
toolbarRegistry: CanvasToolbarRegistry;
|
|
49
|
-
contextMenuRegistry: CanvasContextMenuRegistry;
|
|
50
|
-
manifest: CanvasPluginHostManifestEntry[];
|
|
51
|
-
validation: CanvasPluginHostValidationSummary;
|
|
52
|
-
externalPluginIds: string[];
|
|
53
|
-
ignoreStoredSnapshots: boolean;
|
|
54
|
-
disablePersistence: boolean;
|
|
55
|
-
}
|
|
56
|
-
export type CanvasPluginHostValidationIssueSeverity = "error" | "warning";
|
|
57
|
-
export interface CanvasPluginHostValidationIssue {
|
|
58
|
-
severity: CanvasPluginHostValidationIssueSeverity;
|
|
59
|
-
code: "duplicate-feature-id" | "duplicate-core-plugin-id" | "duplicate-canvas-plugin-id" | "duplicate-interaction-handler-id" | "duplicate-toolbar-action-id" | "duplicate-toolbar-contribution-id" | "duplicate-context-menu-contribution-id" | "duplicate-dom-event-guard-id" | "duplicate-canvas-provider-id" | "duplicate-canvas-component-id" | "missing-toolbar-action" | "missing-context-menu-action" | "missing-core-plugin" | "missing-canvas-plugin" | "missing-shape-type" | "missing-shape-capability" | "missing-shape-util" | "missing-svg-exporter" | "missing-canvas-renderer";
|
|
60
|
-
featureId: string | null;
|
|
61
|
-
pluginId: string | null;
|
|
62
|
-
shapeType: string | null;
|
|
63
|
-
message: string;
|
|
64
|
-
}
|
|
65
|
-
export interface CanvasPluginHostShapeValidationSummary {
|
|
66
|
-
featureId: string;
|
|
67
|
-
shapeType: string;
|
|
68
|
-
hasCapability: boolean;
|
|
69
|
-
hasShapeUtil: boolean;
|
|
70
|
-
hasSvgExporter: boolean;
|
|
71
|
-
hasCanvasRenderer: boolean;
|
|
72
|
-
exportSupport: ShapeCapabilitySupport | null;
|
|
73
|
-
}
|
|
74
|
-
export interface CanvasPluginHostValidationSummary {
|
|
75
|
-
verdict: CanvasPluginHostVerdict;
|
|
76
|
-
issueCount: number;
|
|
77
|
-
errorCount: number;
|
|
78
|
-
warningCount: number;
|
|
79
|
-
issues: CanvasPluginHostValidationIssue[];
|
|
80
|
-
featureIds: string[];
|
|
81
|
-
corePluginIds: string[];
|
|
82
|
-
canvasPluginIds: string[];
|
|
83
|
-
interactionHandlerIds: string[];
|
|
84
|
-
toolbarActionIds: string[];
|
|
85
|
-
toolbarContributionIds: string[];
|
|
86
|
-
contextMenuContributionIds: string[];
|
|
87
|
-
domEventGuardIds: string[];
|
|
88
|
-
canvasProviderIds: string[];
|
|
89
|
-
canvasComponentIds: string[];
|
|
90
|
-
registeredRendererTypes: string[];
|
|
91
|
-
shapeSummaries: CanvasPluginHostShapeValidationSummary[];
|
|
92
|
-
}
|
|
93
|
-
export declare function createCanvasPluginHostRuntime(extensions: readonly LandExtension[], options?: CreateCanvasPluginHostRuntimeOptions): CanvasPluginHostRuntime;
|
|
1
|
+
export { createCanvasPluginHostRuntime } from "./pluginHostRuntime";
|
|
2
|
+
export type { CanvasPluginHostManifestContextMenuContributionEntry, CanvasPluginHostManifestEntry, CanvasPluginHostManifestToolbarContributionEntry, CanvasPluginHostRuntime, CanvasPluginHostShapeValidationSummary, CanvasPluginHostSource, CanvasPluginHostValidationIssue, CanvasPluginHostValidationIssueSeverity, CanvasPluginHostValidationSummary, CanvasPluginHostVerdict, CreateCanvasPluginHostRuntimeOptions, } from "./pluginHostTypes";
|