@yuzhouu/canvas-kit 0.1.3 → 0.1.4
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} +9 -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 +1 -1
- package/_vendor/plugin-text/editor.d.ts +2 -0
- package/_vendor/plugin-text/feature.d.ts +2 -2
- package/_vendor/plugin-text/host/RichTextToolbar.d.ts +3 -1
- package/_vendor/plugin-text/host/richTextBubbleMenuPositionSync.d.ts +7 -0
- package/_vendor/plugin-text/textShapeSvgExporter.d.ts +6 -0
- package/_vendor/plugin-text/textTypes.d.ts +2 -2
- 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 +74 -0
- package/builtins/extensions.d.ts +15 -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 +12 -14
- package/index.mjs +66 -1
- package/package.json +1 -11
- package/product/canvasKitProduct.d.ts +59 -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,6 +1,7 @@
|
|
|
1
|
-
import { Box } from "../geometry/
|
|
2
|
-
import type { Editor } from "../editor/
|
|
1
|
+
import { Box } from "../geometry/box";
|
|
2
|
+
import type { Editor } from "../editor/editor";
|
|
3
3
|
import type { AssetId, ShapeId, ShapeRecordBase } from "../schema/records";
|
|
4
|
+
import { type ShapeColor, type ThemeColorTokenName } from "../shapes/colors";
|
|
4
5
|
export type SvgAttributeValue = string | number | boolean | null | undefined;
|
|
5
6
|
export interface SvgElementNode {
|
|
6
7
|
tag: string;
|
|
@@ -13,7 +14,9 @@ export interface SvgExportContext {
|
|
|
13
14
|
bounds: Box;
|
|
14
15
|
addDef(def: SvgElementNode): string;
|
|
15
16
|
resolveAssetUrl(assetId: AssetId): string | null;
|
|
17
|
+
resolveColor(color: ShapeColor): string;
|
|
16
18
|
}
|
|
19
|
+
export type SvgThemeColorResolver = (token: ThemeColorTokenName, fallback: string) => string;
|
|
17
20
|
export interface ShapeSvgExporter<S extends ShapeRecordBase = ShapeRecordBase> {
|
|
18
21
|
type: S["type"];
|
|
19
22
|
toSvg(shape: S, context: SvgExportContext): SvgNode | null;
|
|
@@ -21,6 +24,7 @@ export interface ShapeSvgExporter<S extends ShapeRecordBase = ShapeRecordBase> {
|
|
|
21
24
|
export interface SvgExportOptions {
|
|
22
25
|
padding?: number;
|
|
23
26
|
background?: string;
|
|
27
|
+
resolveThemeColor?: SvgThemeColorResolver;
|
|
24
28
|
}
|
|
25
29
|
export interface SvgExportResult {
|
|
26
30
|
svg: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Geometry2d } from "./
|
|
2
|
-
import { Vec } from "./
|
|
3
|
-
import { Box } from "./
|
|
1
|
+
import { Geometry2d } from "./geometry2d";
|
|
2
|
+
import { Vec } from "./vec";
|
|
3
|
+
import { Box } from "./box";
|
|
4
4
|
export declare class Ellipse2d extends Geometry2d {
|
|
5
5
|
readonly width: number;
|
|
6
6
|
readonly height: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { Vec } from "./
|
|
2
|
-
export { Box } from "./
|
|
3
|
-
export { Mat } from "./
|
|
4
|
-
export { Geometry2d } from "./
|
|
5
|
-
export { Rectangle2d } from "./
|
|
6
|
-
export { Ellipse2d } from "./
|
|
7
|
-
export { Polyline2d } from "./
|
|
1
|
+
export { Vec } from "./vec";
|
|
2
|
+
export { Box } from "./box";
|
|
3
|
+
export { Mat } from "./mat";
|
|
4
|
+
export { Geometry2d } from "./geometry2d";
|
|
5
|
+
export { Rectangle2d } from "./rectangle2d";
|
|
6
|
+
export { Ellipse2d } from "./ellipse2d";
|
|
7
|
+
export { Polyline2d } from "./polyline2d";
|
|
8
8
|
export { distanceBetweenSegments, distanceToSegment, nearestPointOnSegment, segmentsIntersect, } from "./segments";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Geometry2d } from "./
|
|
2
|
-
import { Vec } from "./
|
|
3
|
-
import { Box } from "./
|
|
1
|
+
import { Geometry2d } from "./geometry2d";
|
|
2
|
+
import { Vec } from "./vec";
|
|
3
|
+
import { Box } from "./box";
|
|
4
4
|
export declare class Polyline2d extends Geometry2d {
|
|
5
5
|
readonly points: Vec[];
|
|
6
6
|
constructor(opts: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Geometry2d } from "./
|
|
2
|
-
import { Vec } from "./
|
|
3
|
-
import { Box } from "./
|
|
1
|
+
import { Geometry2d } from "./geometry2d";
|
|
2
|
+
import { Vec } from "./vec";
|
|
3
|
+
import { Box } from "./box";
|
|
4
4
|
export declare class Rectangle2d extends Geometry2d {
|
|
5
5
|
readonly width: number;
|
|
6
6
|
readonly height: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Vec } from "./
|
|
1
|
+
import { Vec } from "./vec";
|
|
2
2
|
export declare function nearestPointOnSegment(start: Vec, end: Vec, point: Vec): Vec;
|
|
3
3
|
export declare function distanceToSegment(point: Vec, start: Vec, end: Vec): number;
|
|
4
4
|
export declare function segmentsIntersect(firstStart: Vec, firstEnd: Vec, secondStart: Vec, secondEnd: Vec): boolean;
|
|
@@ -1,57 +1,59 @@
|
|
|
1
|
-
export { Editor } from "./editor/
|
|
1
|
+
export { Editor } from "./editor/editor";
|
|
2
|
+
export { createEditorWithPlugins, type CreateEditorWithPluginsOptions, } from "./editor/createEditorWithPlugins";
|
|
2
3
|
export { distanceBetweenSegments, distanceToSegment, nearestPointOnSegment, segmentsIntersect, } from "./geometry";
|
|
3
4
|
export { getShapeGeometry, getShapeExportBounds, getShapeExportPageBounds, getShapeExportToPageTransform, getShapeLocalBounds, getShapeLocalToPageTransform, getShapePositionedOutlineVertices, getShapePositionedToPageTransform, getShapePageBounds, getShapePageCenter, getShapePageCorners, getShapePageOutlineVertices, pagePointToShapePositionedPoint, positionedShapePointToPagePoint, getShapeRenderBounds, getShapeRenderToPageTransform, } from "./editor/queries/shapeTransforms";
|
|
4
5
|
export type { ShapeGeometry } from "./editor/queries/shapeTransforms";
|
|
5
|
-
export type {
|
|
6
|
+
export type { BindingPreviewState, GapSnapIndicatorGapState, GapSnapIndicatorState, PointSnapIndicatorState, SnapIndicatorState, SelectionBindingSegment, SelectionBindingMiddleHandle, SelectionBindingMiddleHandleAnchor, SelectionBindingTerminalHandle, SelectionBindingTerminalHandleAnchor, SelectionCustomHandle, SelectionCustomHandleAnchor, SelectionHandle, SelectionOverlayFrameState, SelectionOverlayFrameGeometryState, SelectionOverlayFrameStyleState, SelectionOverlayHandleAnchorsState, SelectionOverlayHandleCountsState, SelectionOverlayHandlesState, SelectionOverlayState, SelectionResizeHandle, SelectionResizeHandleAnchor, SelectionResizeHandleId, SelectionRotateHandle, SelectionRotateHandleAnchor, SelectionRotateHandleId, SelectionMirrorAxis, } from "./editor/selection";
|
|
6
7
|
export { flipSelectionLocalBounds, getSelectionLocalBoundsFromPagePoints, mapSelectionLocalBoundsBetweenBounds, mapSelectionLocalPointBetweenBounds, mirrorSelectionLocalPoint, rotateSelectionPagePoint, selectionLocalPointToPagePoint, selectionPagePointToLocalPoint, } from "./editor/selection";
|
|
7
8
|
export { getAnchoredSelectionResizeLocalBounds, getAspectRatioLockedSelectionResizeBounds, getCenteredSelectionResizeBounds, getConstrainedSelectionResizeBounds, getSelectionResizeBounds, getSelectionResizeScalesFromBounds, isSelectionResizeCorner, normalizeSelectionResizeBoundsFromEdges, selectionResizeHandleMovesBottomEdge, selectionResizeHandleMovesLeftEdge, selectionResizeHandleMovesRightEdge, selectionResizeHandleMovesTopEdge, } from "./editor/resizeGeometry";
|
|
8
9
|
export { InteractionHandlerRegistry } from "./editor/interactions";
|
|
9
10
|
export { SelectionHandleInteractionRegistry } from "./editor/selectionHandleInteractions";
|
|
11
|
+
export { ShortcutManager, formatKeyboardShortcut, normalizeKeyboardShortcut, } from "./editor/managers/shortcutManager";
|
|
10
12
|
export type { EditorEventInteractionDecision, EditorEventInteractionHandler, LandInteractionHandler, SelectionHandleInteractionHandler, SelectionHandleInteractionInput, SelectionHandleInteractionSession, SelectionHandleInteractionUpdateResult, } from "./editor/interactions";
|
|
11
|
-
export type {
|
|
12
|
-
export type {
|
|
13
|
-
export type {
|
|
14
|
-
export type {
|
|
13
|
+
export type { EditorKeyboardShortcutCommand, KeyboardShortcutBinding, KeyboardShortcutChord, KeyboardShortcutEventLike, KeyboardShortcutInput, KeyboardShortcutTarget, } from "./editor/managers/shortcutManager";
|
|
14
|
+
export type { ContainerBoundsQueryOptions, EditorPageState, EditorOverlayDebugState, EditorRenderHostDebugState, EditorSelectionState, LayerOrderDirection, LayerOrderEdge, ReparentShapePlacementInput, ReparentShapePlacementFailureReason, ReparentShapePlacementResult, ShapeSiblingOrderDirection, ShapeSiblingOrderEdge, ShapeSiblingOrderState, ShapeGroupState, ShapeSelectionSiblingOrderState, ShapePropsPatch, EditorToolState, EditorShapeEditingState, } from "./editor/editor";
|
|
15
|
+
export type { ShapeContainment } from "./editor/managers/queryManager";
|
|
16
|
+
export type { ShapeAtPointOptions, ShapeLineSegmentHitTestOptions, SpatialQueryOptions, } from "./editor/managers/spatialIndexManager";
|
|
17
|
+
export type { TerminalBindingTargetInput, ConnectionPoint, ConnectionTerminal, TerminalBindingResolver, TerminalBindingResolverInput, ResolvedTerminalBinding, } from "./bindings/terminalBinding";
|
|
15
18
|
export type { EditorCommandOptions, EditorCommands, CreateAssetInput, CreateBindingInput, CreatePageInput, MovePageInput, RenamePageInput, ReparentShapesInput, CreateShapeInput, SetCameraInput, ShapeUpdate, StartEditingShapeInput, UpdateAssetInput, UpdateBindingInput, } from "./editor/commands";
|
|
16
19
|
export { reparentShapeToContainingParent } from "./editor/commands";
|
|
17
20
|
export { isEditorClipboardPayload, } from "./editor/clipboard";
|
|
18
21
|
export type { ClipboardAssetSidecar, DuplicateSelectionInput, EditorClipboardPayload, PasteClipboardPayloadInput, } from "./editor/clipboard";
|
|
19
22
|
export type { EditorEvent, ClickEditorEvent, PointerEditorEvent, KeyboardEditorEvent, WheelEditorEvent, TickEditorEvent, CancelEditorEvent, EditorPointerType, } from "./editor/events";
|
|
20
23
|
export type { ChangeSource, RecordUpdate, RecordsDiff, ScopedStoreRecord, StoreRecord, StoreChange, StoreScopeOf, StoreSnapshot, } from "../store/index";
|
|
21
|
-
export { composeRecordsDiff, createEmptyRecordsDiff, filterRecordsDiff, getRecordMap, getRecordsDiff, hasRecordsDiff, invertRecordsDiff, squashRecordsDiffs, } from "../store/index";
|
|
22
|
-
export { appendStoreHistoryMark, createStoreHistoryEntry, createStoreHistoryMark, Store, StoreHistoryBuffer, } from "../store/index";
|
|
23
|
-
export type { StoreHistoryEntry, StoreHistoryMark, StoreHistoryState, } from "../store/index";
|
|
24
24
|
export { SnapshotParseError, parseDocumentSnapshot, parseSessionSnapshot, migrateSnapshotRecords, } from "./schema/snapshots";
|
|
25
25
|
export type { DocumentSnapshot, SessionSnapshot, SnapshotMigration, } from "./schema/snapshots";
|
|
26
|
-
export {
|
|
27
|
-
export type {
|
|
28
|
-
export {
|
|
29
|
-
export type {
|
|
30
|
-
export {
|
|
31
|
-
export type { BeforeDeleteHandler, AfterDeleteHandler, RecordTypeName, } from "./editor/managers/SideEffectManager";
|
|
26
|
+
export { createDocumentSnapshotSupport, filterDocumentSnapshotBySupport, getDocumentSnapshotRequirements, getUnsupportedDocumentSnapshotRequirements, } from "./schema/snapshotSupport";
|
|
27
|
+
export type { DocumentSnapshotRequirements, DocumentSnapshotSupport, FilterDocumentSnapshotBySupportResult, UnsupportedDocumentSnapshotRequirements, } from "./schema/snapshotSupport";
|
|
28
|
+
export { ShapeUtil } from "./shapes/shapeUtil";
|
|
29
|
+
export type { ShapeBoundsSnapGeometry, ShapeBrushSelectInput, ShapeBrushWrapInput, ShapeBindingPointInput, ShapeEditEndResult, ShapeGeometryInput, ShapeHandleSnapContext, ShapeHandleSnapGeometry, ShapeLineSegmentHitTestInput, ShapePointHitTestInput, ShapeSelectionHandleAnchorInput, ShapeSelectionHandleAnchors, ShapeSelectionFrameInput, ShapeSelectionFlipAxis, ShapeSelectionFlipInput, ShapeSelectionOverlayInfo, ShapeSelectionOverlayInfoInput, ShapeSelectionPagePoints, ShapeSelectionPagePointsInput, ShapeSelectionResizeAspectRatioLockInput, ShapeSelectionResizeInput, ShapeSelectionTranslateInput, } from "./shapes/shapeUtil";
|
|
30
|
+
export type { LaserTrailState } from "./editor/managers/interactionTransientManager";
|
|
32
31
|
export type { HandleSnapContext, HandleSnapInput, HandleSnapMode, HandleSnapResult, HandleSnapSnapshot, HandleSnapSnapshotInput, ResizeSnapInput, ResizeSnapResult, ResizeSnapSnapshot, SnapAxis, SnapCoordinateSpace, TranslateSnapInput, TranslateSnapResult, TranslateSnapSnapshot, } from "./editor/managers/snapTypes";
|
|
33
|
-
export { ShapeUtilRegistry } from "./shapes/
|
|
34
|
-
export {
|
|
32
|
+
export { ShapeUtilRegistry } from "./shapes/shapeUtilRegistry";
|
|
33
|
+
export { resolveTerminalBindingAtPoint, } from "./bindings/terminalBinding";
|
|
35
34
|
export { ShapeSvgExporterRegistry, exportShapesToSvgString, renderSvgNode, } from "./exports/svg";
|
|
36
|
-
export type { ShapeSvgExporter, SvgAttributeValue, SvgElementNode, SvgExportContext, SvgExportOptions, SvgExportResult, SvgExportSkipReason, SvgExportSkippedShape, SvgNode, } from "./exports/svg";
|
|
35
|
+
export type { ShapeSvgExporter, SvgAttributeValue, SvgElementNode, SvgExportContext, SvgExportOptions, SvgExportResult, SvgExportSkipReason, SvgExportSkippedShape, SvgThemeColorResolver, SvgNode, } from "./exports/svg";
|
|
37
36
|
export { getExportIntegrityReport, repairExportIntegrity, } from "./exports/integrity";
|
|
38
37
|
export type { ExportIntegrityIssue, ExportIntegrityIssueKind, ExportIntegrityRepairResult, ExportIntegrityReport, } from "./exports/integrity";
|
|
39
38
|
export { getShapeCapabilityManifest } from "./shapes/capabilities";
|
|
40
39
|
export type { ShapeCapabilityDefinition, ShapeCapabilityManifest, ShapeCapabilityManifestEntry, ShapeCapabilitySupport, } from "./shapes/capabilities";
|
|
41
|
-
export { BindingUtil } from "./bindings/
|
|
42
|
-
export type { BindingSelectionCompanionFrameContext, BindingUtilEffect, } from "./bindings/
|
|
43
|
-
export { BindingUtilRegistry } from "./bindings/
|
|
44
|
-
export { StateNode } from "./editor/
|
|
40
|
+
export { BindingUtil } from "./bindings/bindingUtil";
|
|
41
|
+
export type { BindingSelectionCompanionFrameContext, BindingUtilEffect, } from "./bindings/bindingUtil";
|
|
42
|
+
export { BindingUtilRegistry } from "./bindings/bindingUtilRegistry";
|
|
43
|
+
export { StateNode } from "./editor/stateNode";
|
|
45
44
|
export { getEdgeScrollDelta } from "./editor/edgeScroll";
|
|
46
|
-
export { HandTool } from "./tools/hand/
|
|
47
|
-
export { SelectTool } from "./tools/select/
|
|
48
|
-
export { SET_ACTIVE_TOOL_TOOLBAR_ACTION_ID, TOGGLE_TOOL_LOCKED_TOOLBAR_ACTION_ID, } from "./toolbar";
|
|
49
|
-
export
|
|
50
|
-
export {
|
|
51
|
-
export type {
|
|
45
|
+
export { HandTool } from "./tools/hand/handTool";
|
|
46
|
+
export { SelectTool } from "./tools/select/selectTool";
|
|
47
|
+
export { SET_ACTIVE_TOOL_TOOLBAR_ACTION_ID, TOGGLE_TOOL_LOCKED_TOOLBAR_ACTION_ID, } from "./surfaces/toolbar";
|
|
48
|
+
export { LAND_DEFAULT_THEME_COLOR_FALLBACKS, LAND_THEME_COLOR_SLOTS, LAND_THEME_COLOR_TOKEN_BY_SLOT, areShapeColorsEqual, createCustomShapeColor, createThemeShapeColor, getThemeColorTokenName, isCustomShapeColorRef, isShapeColor, isThemeShapeColorRef, isTransparentShapeColor, normalizeShapeColor, resolveShapeColor, shapeColorToCssColor, } from "./shapes/colors";
|
|
49
|
+
export type { CustomShapeColorRef, ShapeColor, ShapeColorRef, ThemeColorSlot, ThemeColorTokenName, ThemeShapeColorRef, } from "./shapes/colors";
|
|
50
|
+
export type { ContextMenuBadgeItem, ContextMenuCanvasTarget, ContextMenuCommandItem, ContextMenuContext, ContextMenuContribution, ContextMenuContributionTarget, ContextMenuItem, ActiveContextMenu, ContextMenuSection, ContextMenuSelectionTarget, ContextMenuSeparatorItem, ContextMenuShapeTarget, ContextMenuTarget, } from "./surfaces/contextMenu";
|
|
51
|
+
export { getEditorOptionsFromEditorPlugins, setupEditorPlugins, type LandEditorPlugin, } from "./plugins";
|
|
52
|
+
export type { CanvasAction, CanvasActionRunInput, CanvasActionValue, CanvasActionContext, CanvasSelectionSnapshot, CanvasToolSnapshot, } from "./surfaces/actions";
|
|
53
|
+
export type { ToolbarBadgeItem, ToolbarButtonItem, ToolbarContribution, ToolbarGroup, ToolbarItem, ToolbarSegmentedItem, ToolbarSegmentedOption, ToolbarSeparatorItem, ToolbarStepperItem, ToolbarStepperOption, ToolbarTextInputItem, ToolbarPlacement, ToolbarSurface, ToolbarSwatchesItem, ToolbarSwatchOption, } from "./surfaces/toolbar";
|
|
52
54
|
export { DEFAULT_CAMERA, DEFAULT_PAGE_ID, DEFAULT_SESSION_ID, createDefaultPage, createDefaultSession, isAnyAssetRecord, isAnyBindingRecord, isAnyShapeRecord, isAssetRecord, isBindingRecord, isDocumentRecord, isPageRecord, isSessionRecord, isShapeRecord, type AnyBindingRecord, type AnyAssetRecord, type AnyShapeRecord, type AssetId, type AssetRecord, type AssetRecordBase, type BaseRecord, type BindingId, type BindingRecordBase, type BindingRecord, type Camera, type DocumentRecord, type EditorRecord, type PageCameraById, type PageId, type PageSelectionById, type PageRecord, type RecordScope, type SessionRecord, type ShapeId, type ShapeParentId, type ShapeRecordBase, type ShapeRecord, type ShapeEditingEntryRequest, type ShapeEditingEntryMode, type ShapeEditingPoint, type ShapeEditingSession, } from "./schema/records";
|
|
53
|
-
export { Vec } from "./geometry/
|
|
54
|
-
export { Box } from "./geometry/
|
|
55
|
-
export { Mat } from "./geometry/
|
|
55
|
+
export { Vec } from "./geometry/vec";
|
|
56
|
+
export { Box } from "./geometry/box";
|
|
57
|
+
export { Mat } from "./geometry/mat";
|
|
56
58
|
export { observeValue } from "./reactivity";
|
|
57
59
|
export type { ReadonlyValue } from "./reactivity";
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import type { BindingUtil } from "../bindings/
|
|
2
|
-
import type { Editor } from "../editor/
|
|
1
|
+
import type { BindingUtil } from "../bindings/bindingUtil";
|
|
2
|
+
import type { Editor } from "../editor/editor";
|
|
3
3
|
import type { LandInteractionHandler } from "../editor/interactions";
|
|
4
4
|
import type { ShapeSvgExporter } from "../exports/svg";
|
|
5
5
|
import type { ShapeCapabilityDefinition } from "../shapes/capabilities";
|
|
6
|
-
import type { ShapeUtil } from "../shapes/
|
|
7
|
-
import type {
|
|
8
|
-
import type { ContextMenuContribution } from "../contextMenu";
|
|
9
|
-
|
|
6
|
+
import type { ShapeUtil } from "../shapes/shapeUtil";
|
|
7
|
+
import type { CanvasAction } from "../surfaces/actions";
|
|
8
|
+
import type { ContextMenuContribution } from "../surfaces/contextMenu";
|
|
9
|
+
import type { ToolbarContribution } from "../surfaces/toolbar";
|
|
10
|
+
export interface LandEditorPlugin {
|
|
10
11
|
id: string;
|
|
11
12
|
shapeCapabilities?: ShapeCapabilityDefinition[];
|
|
12
13
|
shapeUtils?: ShapeUtil[];
|
|
13
14
|
shapeSvgExporters?: ShapeSvgExporter[];
|
|
14
15
|
bindingUtils?: BindingUtil[];
|
|
15
16
|
interactionHandlers?: LandInteractionHandler[];
|
|
16
|
-
|
|
17
|
+
canvasActions?: CanvasAction[];
|
|
17
18
|
toolbarContributions?: ToolbarContribution[];
|
|
18
19
|
contextMenuContributions?: ContextMenuContribution[];
|
|
19
20
|
setup?(editor: Editor): void;
|
|
20
21
|
}
|
|
21
|
-
export declare function
|
|
22
|
+
export declare function getEditorOptionsFromEditorPlugins(plugins: readonly LandEditorPlugin[]): {
|
|
22
23
|
shapeUtils: ShapeUtil[];
|
|
23
24
|
shapeSvgExporters: ShapeSvgExporter[];
|
|
24
25
|
bindingUtils: BindingUtil[];
|
|
25
26
|
shapeCapabilities: ShapeCapabilityDefinition[];
|
|
26
27
|
};
|
|
27
|
-
export declare function
|
|
28
|
+
export declare function setupEditorPlugins(editor: Editor, plugins: readonly LandEditorPlugin[]): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { getEditorOptionsFromEditorPlugins, setupEditorPlugins, type LandEditorPlugin, } from "./editorPlugin";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { BindingUtilRegistry } from "../bindings/bindingUtilRegistry";
|
|
2
|
+
import type { ShapeUtilRegistry } from "../shapes/shapeUtilRegistry";
|
|
3
|
+
import type { AssetRecord, BindingId, BindingRecord, ShapeId, ShapeRecord } from "./records";
|
|
4
|
+
export interface DocumentSnapshotRequirements {
|
|
5
|
+
shapeTypes: readonly ShapeRecord["type"][];
|
|
6
|
+
bindingTypes: readonly BindingRecord["type"][];
|
|
7
|
+
assetTypes: readonly AssetRecord["type"][];
|
|
8
|
+
}
|
|
9
|
+
export interface DocumentSnapshotSupport {
|
|
10
|
+
modelShapeTypes: ReadonlySet<ShapeRecord["type"]>;
|
|
11
|
+
modelBindingTypes: ReadonlySet<BindingRecord["type"]>;
|
|
12
|
+
renderableShapeTypes?: ReadonlySet<ShapeRecord["type"]>;
|
|
13
|
+
}
|
|
14
|
+
export interface UnsupportedDocumentSnapshotRequirements {
|
|
15
|
+
modelShapeTypes: readonly ShapeRecord["type"][];
|
|
16
|
+
modelBindingTypes: readonly BindingRecord["type"][];
|
|
17
|
+
renderableShapeTypes: readonly ShapeRecord["type"][];
|
|
18
|
+
}
|
|
19
|
+
export interface FilterDocumentSnapshotBySupportResult {
|
|
20
|
+
snapshot: {
|
|
21
|
+
schemaVersion: 1;
|
|
22
|
+
records: unknown[];
|
|
23
|
+
};
|
|
24
|
+
removedShapeIds: readonly ShapeId[];
|
|
25
|
+
removedShapeTypes: readonly ShapeRecord["type"][];
|
|
26
|
+
removedBindingIds: readonly BindingId[];
|
|
27
|
+
removedBindingTypes: readonly BindingRecord["type"][];
|
|
28
|
+
removedRecords: readonly unknown[];
|
|
29
|
+
}
|
|
30
|
+
export declare function createDocumentSnapshotSupport({ bindingUtils, renderableShapeTypes, shapeUtils, }: {
|
|
31
|
+
bindingUtils: BindingUtilRegistry;
|
|
32
|
+
renderableShapeTypes?: Iterable<ShapeRecord["type"]>;
|
|
33
|
+
shapeUtils: ShapeUtilRegistry;
|
|
34
|
+
}): DocumentSnapshotSupport;
|
|
35
|
+
export declare function getDocumentSnapshotRequirements(snapshot: unknown): DocumentSnapshotRequirements;
|
|
36
|
+
export declare function getUnsupportedDocumentSnapshotRequirements({ requirements, support, }: {
|
|
37
|
+
requirements: DocumentSnapshotRequirements;
|
|
38
|
+
support: DocumentSnapshotSupport;
|
|
39
|
+
}): UnsupportedDocumentSnapshotRequirements;
|
|
40
|
+
export declare function filterDocumentSnapshotBySupport({ snapshot, support, }: {
|
|
41
|
+
snapshot: unknown;
|
|
42
|
+
support: DocumentSnapshotSupport;
|
|
43
|
+
}): FilterDocumentSnapshotBySupportResult;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { ShapeUtilRegistry } from "../shapes/shapeUtilRegistry";
|
|
2
|
+
import type { BindingUtilRegistry } from "../bindings/bindingUtilRegistry";
|
|
3
3
|
import type { StoreSnapshot } from "../../store/index";
|
|
4
4
|
import { type DocumentRecord, type SessionRecord } from "./records";
|
|
5
5
|
export type DocumentSnapshot = StoreSnapshot<DocumentRecord, 1>;
|
|
@@ -23,5 +23,9 @@ export interface SnapshotMigration {
|
|
|
23
23
|
* supported version (no down-migration).
|
|
24
24
|
*/
|
|
25
25
|
export declare function migrateSnapshotRecords(records: unknown[], fromVersion: number, toVersion: number, migrations: readonly SnapshotMigration[], kind?: "document" | "session"): unknown[];
|
|
26
|
+
export declare function getSnapshotEnvelope(snapshot: unknown, kind: "document" | "session"): {
|
|
27
|
+
schemaVersion: number;
|
|
28
|
+
records: unknown[];
|
|
29
|
+
};
|
|
26
30
|
export declare function parseDocumentSnapshot(snapshot: unknown, shapeUtils: ShapeUtilRegistry, bindingUtils: BindingUtilRegistry): DocumentSnapshot;
|
|
27
31
|
export declare function parseSessionSnapshot(snapshot: unknown): SessionSnapshot;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ShapeSvgExporterRegistry } from "../exports/svg";
|
|
2
2
|
import type { ShapeRecordBase } from "../schema/records";
|
|
3
|
-
import type { ShapeUtilRegistry } from "./
|
|
3
|
+
import type { ShapeUtilRegistry } from "./shapeUtilRegistry";
|
|
4
4
|
export type ShapeCapabilitySupport = "supported" | "partial" | "missing";
|
|
5
5
|
export interface ShapeCapabilityManifestEntry {
|
|
6
6
|
type: ShapeRecordBase["type"];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const LAND_THEME_COLOR_SLOTS: readonly ["fill-blue", "fill-green", "fill-red", "fill-amber", "fill-white", "fill-slate", "stroke-blue", "stroke-green", "stroke-red", "stroke-orange", "stroke-slate", "stroke-muted", "text-slate", "text-blue", "text-green", "text-red"];
|
|
2
|
+
export type ThemeColorSlot = (typeof LAND_THEME_COLOR_SLOTS)[number];
|
|
3
|
+
export type ThemeColorTokenName = `--land-shape-${ThemeColorSlot}`;
|
|
4
|
+
export interface ThemeShapeColorRef {
|
|
5
|
+
kind: "theme";
|
|
6
|
+
slot: ThemeColorSlot;
|
|
7
|
+
}
|
|
8
|
+
export interface CustomShapeColorRef {
|
|
9
|
+
kind: "custom";
|
|
10
|
+
value: string;
|
|
11
|
+
}
|
|
12
|
+
export type ShapeColorRef = ThemeShapeColorRef | CustomShapeColorRef;
|
|
13
|
+
export type ShapeColor = string | ShapeColorRef;
|
|
14
|
+
export declare const LAND_THEME_COLOR_TOKEN_BY_SLOT: Record<ThemeColorSlot, ThemeColorTokenName>;
|
|
15
|
+
export declare const LAND_DEFAULT_THEME_COLOR_FALLBACKS: Record<ThemeColorSlot, string>;
|
|
16
|
+
export declare function createThemeShapeColor(slot: ThemeColorSlot): ThemeShapeColorRef;
|
|
17
|
+
export declare function createCustomShapeColor(value: string): CustomShapeColorRef;
|
|
18
|
+
export declare function isThemeShapeColorRef(value: unknown): value is ThemeShapeColorRef;
|
|
19
|
+
export declare function isCustomShapeColorRef(value: unknown): value is CustomShapeColorRef;
|
|
20
|
+
export declare function isShapeColor(value: unknown): value is ShapeColor;
|
|
21
|
+
export declare function getThemeColorTokenName(slot: ThemeColorSlot): ThemeColorTokenName;
|
|
22
|
+
export declare function normalizeShapeColor(value: unknown, fallback: ShapeColor): ShapeColor;
|
|
23
|
+
export declare function shapeColorToCssColor(color: ShapeColor): string;
|
|
24
|
+
export declare function resolveShapeColor(color: ShapeColor, resolveThemeColor?: (token: ThemeColorTokenName, fallback: string) => string): string;
|
|
25
|
+
export declare function isTransparentShapeColor(color: ShapeColor): boolean;
|
|
26
|
+
export declare function areShapeColorsEqual(left: ShapeColor | null | undefined, right: ShapeColor | null | undefined): boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Box } from "../geometry/
|
|
2
|
-
import { Mat } from "../geometry/
|
|
3
|
-
import { Vec } from "../geometry/
|
|
4
|
-
import type { Editor } from "../editor/
|
|
1
|
+
import { Box } from "../geometry/box";
|
|
2
|
+
import { Mat } from "../geometry/mat";
|
|
3
|
+
import { Vec } from "../geometry/vec";
|
|
4
|
+
import type { Editor } from "../editor/editor";
|
|
5
5
|
import type { ShapeUpdate } from "../editor/commands";
|
|
6
6
|
import { type SelectionMirrorAxis } from "../editor/selection";
|
|
7
|
-
import type {
|
|
7
|
+
import type { SelectionBindingMiddleHandleAnchor, SelectionBindingSegment, SelectionBindingTerminalHandleAnchor, SelectionCustomHandleAnchor, SelectionHandle, SelectionResizeHandleId } from "../editor/selection";
|
|
8
8
|
import type { ShapeId, ShapeRecordBase } from "../schema/records";
|
|
9
9
|
export interface ShapeEditEndResult {
|
|
10
10
|
deleteShapeIds?: ShapeId[];
|
|
@@ -49,12 +49,20 @@ export interface ShapeBrushSelectInput extends ShapeBrushWrapInput {
|
|
|
49
49
|
isWrapping: boolean;
|
|
50
50
|
}
|
|
51
51
|
export interface ShapeLineSegmentHitTestInput {
|
|
52
|
+
editor?: Editor;
|
|
52
53
|
pageStart: Vec;
|
|
53
54
|
pageEnd: Vec;
|
|
54
55
|
positionedStart: Vec;
|
|
55
56
|
positionedEnd: Vec;
|
|
56
57
|
margin: number;
|
|
57
58
|
}
|
|
59
|
+
export interface ShapeGeometryInput {
|
|
60
|
+
editor: Editor;
|
|
61
|
+
}
|
|
62
|
+
export interface ShapePointHitTestInput extends ShapeGeometryInput {
|
|
63
|
+
pagePoint: Vec;
|
|
64
|
+
positionedPoint: Vec;
|
|
65
|
+
}
|
|
58
66
|
export interface ShapeBoundsSnapGeometry {
|
|
59
67
|
points?: readonly Vec[];
|
|
60
68
|
}
|
|
@@ -79,9 +87,12 @@ export interface ShapeSelectionFrameInput {
|
|
|
79
87
|
export interface ShapeSelectionTranslateInput {
|
|
80
88
|
editor: Editor;
|
|
81
89
|
}
|
|
90
|
+
export interface ShapeSelectionOverlayInfoInput {
|
|
91
|
+
editor: Editor;
|
|
92
|
+
}
|
|
82
93
|
export interface ShapeSelectionHandleAnchors {
|
|
83
|
-
terminalHandleAnchors: readonly
|
|
84
|
-
middleHandleAnchors: readonly
|
|
94
|
+
terminalHandleAnchors: readonly SelectionBindingTerminalHandleAnchor[];
|
|
95
|
+
middleHandleAnchors: readonly SelectionBindingMiddleHandleAnchor[];
|
|
85
96
|
customHandleAnchors?: readonly SelectionCustomHandleAnchor[];
|
|
86
97
|
}
|
|
87
98
|
export interface ShapeSelectionOverlayInfo {
|
|
@@ -90,6 +101,7 @@ export interface ShapeSelectionOverlayInfo {
|
|
|
90
101
|
endPagePoint: Vec | null;
|
|
91
102
|
middlePagePoint: Vec | null;
|
|
92
103
|
path: string | null;
|
|
104
|
+
bindingSegments?: readonly SelectionBindingSegment[];
|
|
93
105
|
}
|
|
94
106
|
export declare abstract class ShapeUtil<S extends ShapeRecordBase = ShapeRecordBase> {
|
|
95
107
|
abstract readonly type: S["type"];
|
|
@@ -98,6 +110,7 @@ export declare abstract class ShapeUtil<S extends ShapeRecordBase = ShapeRecordB
|
|
|
98
110
|
abstract getBounds(shape: S): Box;
|
|
99
111
|
getLocalBounds(shape: S): Box;
|
|
100
112
|
getRenderBounds(shape: S): Box;
|
|
113
|
+
getPointHitTestBounds(shape: S, _input?: ShapeGeometryInput): Box;
|
|
101
114
|
getExportBounds(shape: S): Box;
|
|
102
115
|
getChildClipLocalBounds(_shape: S): Box | null;
|
|
103
116
|
getChildExportClipLocalBounds(shape: S): Box | null;
|
|
@@ -119,7 +132,7 @@ export declare abstract class ShapeUtil<S extends ShapeRecordBase = ShapeRecordB
|
|
|
119
132
|
getHandleSnapGeometry(shape: S): ShapeHandleSnapGeometry;
|
|
120
133
|
getPositionedOutlineVertices(shape: S): Vec[];
|
|
121
134
|
getSelectionHandleAnchors(_shape: S, _input: ShapeSelectionHandleAnchorInput): ShapeSelectionHandleAnchors;
|
|
122
|
-
getSelectionOverlayInfo(_shape: S): ShapeSelectionOverlayInfo;
|
|
135
|
+
getSelectionOverlayInfo(_shape: S, _input: ShapeSelectionOverlayInfoInput): ShapeSelectionOverlayInfo;
|
|
123
136
|
isWrappedByBrush(_shape: S, input: ShapeBrushWrapInput): boolean;
|
|
124
137
|
canSelectByBrush(shape: S, input: ShapeBrushSelectInput): boolean;
|
|
125
138
|
getLocalToPageTransform(shape: S): Mat;
|
|
@@ -127,7 +140,7 @@ export declare abstract class ShapeUtil<S extends ShapeRecordBase = ShapeRecordB
|
|
|
127
140
|
canReceiveChildren(_shape: S): boolean;
|
|
128
141
|
repairLoadedShape(_shape: S): S | null;
|
|
129
142
|
onEditEnd(_shape: S): ShapeEditEndResult | void;
|
|
130
|
-
hitTest(shape: S, positionedPoint: Vec): boolean;
|
|
143
|
+
hitTest(shape: S, positionedPoint: Vec, _input?: ShapePointHitTestInput): boolean;
|
|
131
144
|
hitTestLineSegment(shape: S, input: ShapeLineSegmentHitTestInput): boolean;
|
|
132
145
|
resolveBindingPoint(_shape: S, input: ShapeBindingPointInput): Vec;
|
|
133
146
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ShapeRecordBase } from "../schema/records";
|
|
2
|
-
import { ShapeUtil } from "./
|
|
2
|
+
import { ShapeUtil } from "./shapeUtil";
|
|
3
3
|
export declare class ShapeUtilRegistry {
|
|
4
4
|
private readonly registry;
|
|
5
5
|
register<S extends ShapeRecordBase>(util: ShapeUtil<S>): void;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Editor } from "../editor/editor";
|
|
2
|
+
import type { ShapeId, ShapeRecordBase } from "../schema/records";
|
|
3
|
+
import type { ShapeColorRef } from "../shapes/colors";
|
|
4
|
+
export interface CanvasSelectionSnapshot {
|
|
5
|
+
selectedShapeIds: readonly ShapeId[];
|
|
6
|
+
selectedShapes: readonly ShapeRecordBase[];
|
|
7
|
+
count: number;
|
|
8
|
+
singleShapeType: ShapeRecordBase["type"] | null;
|
|
9
|
+
commonShapeType: ShapeRecordBase["type"] | null;
|
|
10
|
+
canResetRotation: boolean;
|
|
11
|
+
isMixedFrameAndPointHandleSelection: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface CanvasToolSnapshot {
|
|
14
|
+
activeToolId: string;
|
|
15
|
+
isToolLocked: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface CanvasActionContext {
|
|
18
|
+
editor: Editor;
|
|
19
|
+
selection: CanvasSelectionSnapshot;
|
|
20
|
+
tool: CanvasToolSnapshot;
|
|
21
|
+
}
|
|
22
|
+
export type CanvasActionValue = string | number | boolean | null | ShapeColorRef | {
|
|
23
|
+
readonly [key: string]: CanvasActionValue;
|
|
24
|
+
} | readonly CanvasActionValue[];
|
|
25
|
+
export interface CanvasActionRunInput<TValue extends CanvasActionValue> {
|
|
26
|
+
context: CanvasActionContext;
|
|
27
|
+
value: TValue;
|
|
28
|
+
}
|
|
29
|
+
export interface CanvasAction<TValue extends CanvasActionValue = CanvasActionValue> {
|
|
30
|
+
id: string;
|
|
31
|
+
isVisible?(context: CanvasActionContext): boolean;
|
|
32
|
+
isEnabled?(context: CanvasActionContext): boolean;
|
|
33
|
+
getValue?(context: CanvasActionContext): TValue;
|
|
34
|
+
run(input: CanvasActionRunInput<TValue>): void;
|
|
35
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { Vec } from "../geometry";
|
|
2
|
+
import type { ShapeId, ShapeRecordBase } from "../schema/records";
|
|
3
|
+
import type { CanvasActionContext, CanvasActionValue } from "./actions";
|
|
4
4
|
export interface ContextMenuCanvasTarget {
|
|
5
5
|
type: "canvas";
|
|
6
6
|
}
|
|
@@ -15,13 +15,15 @@ export interface ContextMenuSelectionTarget {
|
|
|
15
15
|
selectedShapeIds: readonly ShapeId[];
|
|
16
16
|
}
|
|
17
17
|
export type ContextMenuTarget = ContextMenuCanvasTarget | ContextMenuShapeTarget | ContextMenuSelectionTarget;
|
|
18
|
-
export interface
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
export interface ActiveContextMenu {
|
|
19
|
+
anchor: {
|
|
20
|
+
screenPoint: Vec;
|
|
21
|
+
pagePoint: Vec;
|
|
22
|
+
};
|
|
21
23
|
target: ContextMenuTarget;
|
|
22
24
|
}
|
|
23
|
-
export interface ContextMenuContext extends
|
|
24
|
-
menu:
|
|
25
|
+
export interface ContextMenuContext extends CanvasActionContext {
|
|
26
|
+
menu: ActiveContextMenu;
|
|
25
27
|
}
|
|
26
28
|
export type ContextMenuContributionTarget = "canvas" | "selection" | "shape" | "any";
|
|
27
29
|
export interface ContextMenuCommandItem {
|
|
@@ -30,7 +32,7 @@ export interface ContextMenuCommandItem {
|
|
|
30
32
|
actionId: string;
|
|
31
33
|
label: string;
|
|
32
34
|
icon?: string;
|
|
33
|
-
value?:
|
|
35
|
+
value?: CanvasActionValue;
|
|
34
36
|
shortcut?: string;
|
|
35
37
|
tone?: "default" | "destructive";
|
|
36
38
|
dataUi?: string;
|
|
@@ -1,46 +1,15 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ShapeId, ShapeRecordBase } from "./schema/records";
|
|
1
|
+
import type { CanvasActionContext, CanvasActionValue } from "./actions";
|
|
3
2
|
export declare const SET_ACTIVE_TOOL_TOOLBAR_ACTION_ID = "editor.tool.set-active-tool";
|
|
4
3
|
export declare const TOGGLE_TOOL_LOCKED_TOOLBAR_ACTION_ID = "editor.tool.toggle-locked";
|
|
5
4
|
export type ToolbarSurface = "selection" | "tool";
|
|
6
|
-
export type ToolbarPlacement = "chrome" | "context";
|
|
7
|
-
export interface ToolbarSelectionSnapshot {
|
|
8
|
-
selectedShapeIds: readonly ShapeId[];
|
|
9
|
-
selectedShapes: readonly ShapeRecordBase[];
|
|
10
|
-
count: number;
|
|
11
|
-
singleShapeType: ShapeRecordBase["type"] | null;
|
|
12
|
-
commonShapeType: ShapeRecordBase["type"] | null;
|
|
13
|
-
canResetRotation: boolean;
|
|
14
|
-
isMixedFrameAndPointHandleSelection: boolean;
|
|
15
|
-
}
|
|
16
|
-
export interface ToolbarToolSnapshot {
|
|
17
|
-
activeToolId: string;
|
|
18
|
-
isToolLocked: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface ToolbarContext {
|
|
21
|
-
editor: Editor;
|
|
22
|
-
selection: ToolbarSelectionSnapshot;
|
|
23
|
-
tool: ToolbarToolSnapshot;
|
|
24
|
-
}
|
|
25
|
-
export type ToolbarActionValue = string | number | boolean | null;
|
|
26
|
-
export interface ToolbarActionRunInput<TValue extends ToolbarActionValue> {
|
|
27
|
-
context: ToolbarContext;
|
|
28
|
-
value: TValue;
|
|
29
|
-
}
|
|
30
|
-
export interface ToolbarAction<TValue extends ToolbarActionValue = ToolbarActionValue> {
|
|
31
|
-
id: string;
|
|
32
|
-
isVisible?(context: ToolbarContext): boolean;
|
|
33
|
-
isEnabled?(context: ToolbarContext): boolean;
|
|
34
|
-
getValue?(context: ToolbarContext): TValue;
|
|
35
|
-
run(input: ToolbarActionRunInput<TValue>): void;
|
|
36
|
-
}
|
|
5
|
+
export type ToolbarPlacement = "chrome" | "context" | "floating";
|
|
37
6
|
export interface ToolbarButtonItem {
|
|
38
7
|
kind: "button";
|
|
39
8
|
id: string;
|
|
40
9
|
actionId: string;
|
|
41
10
|
label: string;
|
|
42
11
|
icon: string;
|
|
43
|
-
value?:
|
|
12
|
+
value?: CanvasActionValue;
|
|
44
13
|
shortcut?: string;
|
|
45
14
|
dataUi?: string;
|
|
46
15
|
}
|
|
@@ -57,7 +26,7 @@ export interface ToolbarSegmentedItem {
|
|
|
57
26
|
options: readonly ToolbarSegmentedOption[];
|
|
58
27
|
}
|
|
59
28
|
export interface ToolbarSwatchOption {
|
|
60
|
-
value:
|
|
29
|
+
value: CanvasActionValue;
|
|
61
30
|
label: string;
|
|
62
31
|
color: string;
|
|
63
32
|
dataUi?: string;
|
|
@@ -90,6 +59,16 @@ export interface ToolbarTextInputItem {
|
|
|
90
59
|
placeholder?: string;
|
|
91
60
|
dataUi?: string;
|
|
92
61
|
}
|
|
62
|
+
export interface ToolbarSliderItem {
|
|
63
|
+
kind: "slider";
|
|
64
|
+
id: string;
|
|
65
|
+
actionId: string;
|
|
66
|
+
label: string;
|
|
67
|
+
min: number;
|
|
68
|
+
max: number;
|
|
69
|
+
step?: number;
|
|
70
|
+
dataUi?: string;
|
|
71
|
+
}
|
|
93
72
|
export interface ToolbarBadgeItem {
|
|
94
73
|
kind: "badge";
|
|
95
74
|
id: string;
|
|
@@ -100,7 +79,7 @@ export interface ToolbarSeparatorItem {
|
|
|
100
79
|
kind: "separator";
|
|
101
80
|
id: string;
|
|
102
81
|
}
|
|
103
|
-
export type ToolbarItem = ToolbarButtonItem | ToolbarSegmentedItem | ToolbarSwatchesItem | ToolbarStepperItem | ToolbarTextInputItem | ToolbarBadgeItem | ToolbarSeparatorItem;
|
|
82
|
+
export type ToolbarItem = ToolbarButtonItem | ToolbarSegmentedItem | ToolbarSwatchesItem | ToolbarStepperItem | ToolbarTextInputItem | ToolbarSliderItem | ToolbarBadgeItem | ToolbarSeparatorItem;
|
|
104
83
|
export interface ToolbarGroup {
|
|
105
84
|
id: string;
|
|
106
85
|
order?: number;
|
|
@@ -112,6 +91,6 @@ export interface ToolbarContribution {
|
|
|
112
91
|
placement?: ToolbarPlacement;
|
|
113
92
|
order?: number;
|
|
114
93
|
actionIds: readonly string[];
|
|
115
|
-
when?(context:
|
|
116
|
-
getGroups(context:
|
|
94
|
+
when?(context: CanvasActionContext): boolean;
|
|
95
|
+
getGroups(context: CanvasActionContext): readonly ToolbarGroup[];
|
|
117
96
|
}
|