@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,6 +1,6 @@
|
|
|
1
1
|
import type { ShapeId } from "../../schema/records";
|
|
2
2
|
import { type DuplicateSelectionInput, type EditorClipboardPayload, type PasteClipboardPayloadInput } from "../clipboard";
|
|
3
|
-
import type { Editor } from "../
|
|
3
|
+
import type { Editor } from "../editor";
|
|
4
4
|
/**
|
|
5
5
|
* Clipboard operations over editor selections. The Editor exposes thin wrappers
|
|
6
6
|
* that forward here.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ChangeSource } from "../../../store/index";
|
|
2
2
|
import { type EditorRecord } from "../../schema/records";
|
|
3
3
|
import { type DocumentSnapshot, type SessionSnapshot } from "../../schema/snapshots";
|
|
4
|
-
import type { Editor } from "../
|
|
4
|
+
import type { Editor } from "../editor";
|
|
5
5
|
/**
|
|
6
6
|
* Document/session snapshot serialization, restore, and post-restore repair.
|
|
7
7
|
* The Editor exposes thin wrappers that forward here.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EditorEvent, PointerEditorEvent } from "../events";
|
|
2
|
-
import { Vec } from "../../geometry/
|
|
2
|
+
import { Vec } from "../../geometry/vec";
|
|
3
3
|
export type InputDragPhase = "idle" | "pointing" | "dragging";
|
|
4
4
|
export interface InputsState {
|
|
5
5
|
originPagePoint: Vec | null;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type Signal } from "../../../signals/index";
|
|
2
|
-
import { type
|
|
3
|
-
import type { Box } from "../../geometry/
|
|
4
|
-
import type { Vec } from "../../geometry/
|
|
2
|
+
import { type TerminalBindingResolver, type TerminalBindingResolverInput, type ResolvedTerminalBinding } from "../../bindings/terminalBinding";
|
|
3
|
+
import type { Box } from "../../geometry/box";
|
|
4
|
+
import type { Vec } from "../../geometry/vec";
|
|
5
5
|
import type { ShapeId } from "../../schema/records";
|
|
6
|
-
import type { Editor } from "../
|
|
7
|
-
import type {
|
|
6
|
+
import type { Editor } from "../editor";
|
|
7
|
+
import type { BindingPreviewState, SnapIndicatorState } from "../selection";
|
|
8
8
|
export interface LaserTrailState {
|
|
9
9
|
sessionId: number;
|
|
10
10
|
phase: "active" | "ending";
|
|
@@ -26,11 +26,13 @@ export declare class InteractionTransientManager {
|
|
|
26
26
|
readonly laserTrailActiveSignal: import("../../../signals/index").Computed<boolean>;
|
|
27
27
|
private nextLaserSessionId;
|
|
28
28
|
private readonly _bindingPreviewSignal;
|
|
29
|
-
readonly bindingPreviewSignal: Signal<
|
|
29
|
+
readonly bindingPreviewSignal: Signal<BindingPreviewState | null>;
|
|
30
30
|
readonly bindingPreviewActiveSignal: import("../../../signals/index").Computed<boolean>;
|
|
31
31
|
private readonly _dropTargetShapeIdSignal;
|
|
32
32
|
readonly dropTargetShapeIdSignal: Signal<ShapeId | null>;
|
|
33
|
-
private
|
|
33
|
+
private readonly _selectionTranslationActiveSignal;
|
|
34
|
+
readonly selectionTranslationActiveSignal: Signal<boolean>;
|
|
35
|
+
private terminalBindingResolver;
|
|
34
36
|
constructor(editor: Editor);
|
|
35
37
|
setBrushBox(brushBox: Box | null): void;
|
|
36
38
|
getErasingShapeIds(): ShapeId[];
|
|
@@ -43,10 +45,11 @@ export declare class InteractionTransientManager {
|
|
|
43
45
|
setLaserTrail(sessionId: number, points: readonly Vec[]): void;
|
|
44
46
|
finishLaserTrail(sessionId: number): void;
|
|
45
47
|
clearLaserTrail(sessionId: number): void;
|
|
46
|
-
setBindingPreview(preview:
|
|
48
|
+
setBindingPreview(preview: BindingPreviewState | null): void;
|
|
47
49
|
setDropTargetShapeId(shapeId: ShapeId | null): void;
|
|
50
|
+
setSelectionTranslationActive(active: boolean): void;
|
|
48
51
|
setSnapIndicators(indicators: SnapIndicatorState[] | null): void;
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
setTerminalBindingResolver(resolver: TerminalBindingResolver): void;
|
|
53
|
+
resolveTerminalBinding(input: TerminalBindingResolverInput): ResolvedTerminalBinding;
|
|
51
54
|
clearSelectionTransients(): void;
|
|
52
55
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type Signal } from "../../../signals/index";
|
|
2
|
-
import { Box } from "../../geometry/
|
|
3
|
-
import { Mat } from "../../geometry/
|
|
4
|
-
import { Vec } from "../../geometry/
|
|
2
|
+
import { Box } from "../../geometry/box";
|
|
3
|
+
import { Mat } from "../../geometry/mat";
|
|
4
|
+
import { Vec } from "../../geometry/vec";
|
|
5
5
|
import { type BindingId, type BindingRecord, type PageId, type ShapeId, type ShapeParentId, type ShapeRecord } from "../../schema/records";
|
|
6
|
-
import type { Editor } from "../
|
|
6
|
+
import type { Editor } from "../editor";
|
|
7
7
|
import { type ShapeGeometry } from "../queries/shapeTransforms";
|
|
8
8
|
import { type QueryState } from "./queryState";
|
|
9
9
|
import { type SelectionGeometrySnapshot } from "./selectionGeometry";
|
|
@@ -21,7 +21,7 @@ export declare class QueryManager {
|
|
|
21
21
|
readonly selectionRotationSignal: Signal<number>;
|
|
22
22
|
readonly selectionRotationCenterSignal: Signal<Vec | null>;
|
|
23
23
|
readonly selectionHasCompatibleRotationSignal: Signal<boolean>;
|
|
24
|
-
readonly
|
|
24
|
+
readonly selectionAnchorPagePointSignal: Signal<Vec | null>;
|
|
25
25
|
private readonly stateAtom;
|
|
26
26
|
private readonly shapeQuerySignals;
|
|
27
27
|
constructor(editor: Editor);
|
|
@@ -36,6 +36,7 @@ export declare class QueryManager {
|
|
|
36
36
|
getShapeSubtreePageBounds(shapeId: ShapeId): Box | null;
|
|
37
37
|
getShapeContainment(containerId: ShapeId, shapeId: ShapeId): ShapeContainment | null;
|
|
38
38
|
getContainingShapeParentId(shapeIds: Iterable<ShapeId>): ShapeParentId | null;
|
|
39
|
+
getContainingShapeParentIdAtPoint(shapeIds: Iterable<ShapeId>, point: Vec): ShapeParentId | null;
|
|
39
40
|
getContainingParentIdForShapeRecord(shape: ShapeRecord): ShapeParentId | null;
|
|
40
41
|
getShapeClipAncestorIds(shapeId: ShapeId): ShapeId[];
|
|
41
42
|
getShapeClipAncestorIdsSignal(shapeId: ShapeId): Signal<ShapeId[]>;
|
|
@@ -64,7 +65,7 @@ export declare class QueryManager {
|
|
|
64
65
|
getSelectionHasRotation(): boolean;
|
|
65
66
|
getSelectionRotationCenter(): Vec | null;
|
|
66
67
|
getSelectionHasCompatibleRotation(): boolean;
|
|
67
|
-
|
|
68
|
+
getSelectionAnchorPagePoint(): Vec | null;
|
|
68
69
|
getBinding(id: BindingId): BindingRecord | undefined;
|
|
69
70
|
getBindings(): BindingRecord[];
|
|
70
71
|
getBindingIdsFromShape(shapeId: ShapeId): BindingId[];
|
package/_vendor/canvas-core/editor/managers/{RenderWindowManager.d.ts → renderWindowManager.d.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Signal } from "../../../signals/index";
|
|
2
2
|
import type { ShapeId } from "../../schema/records";
|
|
3
|
-
import type { Editor, EditorRenderHostDebugState, RenderItem } from "../
|
|
3
|
+
import type { Editor, EditorRenderHostDebugState, RenderItem } from "../editor";
|
|
4
4
|
/**
|
|
5
5
|
* Render culling and retained-window signals for the editor render host. The
|
|
6
6
|
* Editor exposes thin signal aliases that forward here.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type Signal } from "../../../signals/index";
|
|
2
|
-
import { Box } from "../../geometry/
|
|
3
|
-
import { Vec } from "../../geometry/
|
|
2
|
+
import { Box } from "../../geometry/box";
|
|
3
|
+
import { Vec } from "../../geometry/vec";
|
|
4
4
|
import type { ShapeId } from "../../schema/records";
|
|
5
|
-
import type { Editor } from "../
|
|
5
|
+
import type { Editor } from "../editor";
|
|
6
6
|
import type { ShapeGeometry } from "../queries/shapeTransforms";
|
|
7
7
|
export interface SelectionGeometrySnapshot {
|
|
8
8
|
outlineVertices: Vec[];
|
|
@@ -10,7 +10,7 @@ export interface SelectionGeometrySnapshot {
|
|
|
10
10
|
frameBounds: Box | null;
|
|
11
11
|
rotation: number;
|
|
12
12
|
rotationCenter: Vec | null;
|
|
13
|
-
|
|
13
|
+
selectionAnchorPagePoint: Vec | null;
|
|
14
14
|
hasRotation: boolean;
|
|
15
15
|
hasCompatibleRotation: boolean;
|
|
16
16
|
}
|
|
@@ -23,6 +23,6 @@ export interface SelectionGeometrySignals {
|
|
|
23
23
|
rotation: Signal<number>;
|
|
24
24
|
rotationCenter: Signal<Vec | null>;
|
|
25
25
|
hasCompatibleRotation: Signal<boolean>;
|
|
26
|
-
|
|
26
|
+
selectionAnchorPagePoint: Signal<Vec | null>;
|
|
27
27
|
}
|
|
28
28
|
export declare function createSelectionGeometrySignals(editor: Editor, getShapeGeometrySnapshot: (shapeId: ShapeId) => ShapeGeometry | undefined): SelectionGeometrySignals;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ChangeSource } from "../../../store/index";
|
|
2
|
-
import { Box } from "../../geometry/
|
|
2
|
+
import { Box } from "../../geometry/box";
|
|
3
3
|
import type { PageId } from "../../schema/records";
|
|
4
|
-
import type { Editor } from "../
|
|
4
|
+
import type { Editor } from "../editor";
|
|
5
5
|
export type AlignMode = "left" | "horizontal-center" | "right" | "top" | "vertical-center" | "bottom";
|
|
6
6
|
export type DistributeAxis = "horizontal" | "vertical";
|
|
7
7
|
export interface ZoomToBoundsOptions {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ChangeSource } from "../../../store/index";
|
|
2
2
|
import type { PageId, ShapeId } from "../../schema/records";
|
|
3
|
-
import type { Editor } from "../
|
|
3
|
+
import type { Editor } from "../editor";
|
|
4
4
|
/**
|
|
5
5
|
* Selection-set writes for the editor: which shapes are selected per page. These
|
|
6
6
|
* are cohesive session-state mutations carved out of the Editor facade so the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Signal } from "../../../signals/index";
|
|
2
|
-
import type { Editor, EditorOverlayDebugState } from "../
|
|
3
|
-
import type { SelectionOverlayFrameState, SelectionOverlayFrameGeometryState, SelectionOverlayFrameStyleState, SelectionOverlayHandleAnchorsState, SelectionOverlayHandleCountsState, SelectionOverlayHandlesState, SelectionOverlayState } from "../selection";
|
|
2
|
+
import type { Editor, EditorOverlayDebugState } from "../editor";
|
|
3
|
+
import type { SelectionBindingSegment, SelectionOverlayFrameState, SelectionOverlayFrameGeometryState, SelectionOverlayFrameStyleState, SelectionOverlayHandleAnchorsState, SelectionOverlayHandleCountsState, SelectionOverlayHandlesState, SelectionOverlayState } from "../selection";
|
|
4
4
|
/**
|
|
5
5
|
* Selection overlay derived state: frame geometry/style, handles, combined
|
|
6
6
|
* overlay state, companion frames, and debug metrics. The Editor exposes thin
|
|
@@ -10,7 +10,8 @@ export declare class SelectionOverlayManager {
|
|
|
10
10
|
private readonly editor;
|
|
11
11
|
readonly frameGeometrySignal: Signal<SelectionOverlayFrameGeometryState | null>;
|
|
12
12
|
readonly companionFrameGeometriesSignal: Signal<SelectionOverlayFrameGeometryState[]>;
|
|
13
|
-
readonly
|
|
13
|
+
readonly pathSignal: Signal<string | null>;
|
|
14
|
+
readonly bindingSegmentsSignal: Signal<SelectionBindingSegment[]>;
|
|
14
15
|
readonly frameStyleSignal: Signal<SelectionOverlayFrameStyleState>;
|
|
15
16
|
readonly frameSignal: Signal<SelectionOverlayFrameState | null>;
|
|
16
17
|
readonly handleAnchorsSignal: Signal<SelectionOverlayHandleAnchorsState | null>;
|
package/_vendor/canvas-core/editor/managers/{ShapeEditingManager.d.ts → shapeEditingManager.d.ts}
RENAMED
|
@@ -2,7 +2,7 @@ import { type Signal } from "../../../signals/index";
|
|
|
2
2
|
import type { ChangeSource } from "../../../store/index";
|
|
3
3
|
import type { ShapeEditingEntryRequest, ShapeEditingSession, ShapeId, ShapeRecord } from "../../schema/records";
|
|
4
4
|
import type { StartEditingShapeInput } from "../commands";
|
|
5
|
-
import type { Editor } from "../
|
|
5
|
+
import type { Editor } from "../editor";
|
|
6
6
|
/**
|
|
7
7
|
* Shape editing lifecycle for the editor: edit-session entry, completion,
|
|
8
8
|
* cancellation, composition state, and focus-entry requests. The Editor exposes
|
package/_vendor/canvas-core/editor/managers/{ShapeGeometryManager.d.ts → shapeGeometryManager.d.ts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Box } from "../../geometry/
|
|
2
|
-
import { Mat } from "../../geometry/
|
|
3
|
-
import { Vec } from "../../geometry/
|
|
1
|
+
import { Box } from "../../geometry/box";
|
|
2
|
+
import { Mat } from "../../geometry/mat";
|
|
3
|
+
import { Vec } from "../../geometry/vec";
|
|
4
4
|
import type { ShapeId, ShapeRecord } from "../../schema/records";
|
|
5
|
-
import type { Editor } from "../
|
|
5
|
+
import type { Editor } from "../editor";
|
|
6
6
|
import { type ShapeGeometry } from "../queries/shapeTransforms";
|
|
7
7
|
import type { SelectionFrame } from "../selection";
|
|
8
8
|
/**
|
|
@@ -38,5 +38,5 @@ export declare class ShapeGeometryManager {
|
|
|
38
38
|
isPointInSelectionBounds(point: Vec): boolean;
|
|
39
39
|
getSelectionFrameLocalBoundsPoint(point: Vec): Vec | null;
|
|
40
40
|
getSelectionPageOutlineVertices(): Vec[];
|
|
41
|
-
|
|
41
|
+
getSelectionAnchorPagePoint(): Vec | null;
|
|
42
42
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ChangeSource } from "../../../store/index";
|
|
2
|
-
import type {
|
|
3
|
-
import type { Editor } from "../
|
|
4
|
-
import type { ContainerBoundsQueryOptions, LayerOrderDirection, LayerOrderEdge,
|
|
2
|
+
import type { ShapeId, ShapeParentId, ShapeRecord } from "../../schema/records";
|
|
3
|
+
import type { Editor } from "../editor";
|
|
4
|
+
import type { ContainerBoundsQueryOptions, LayerOrderDirection, LayerOrderEdge, ReparentShapePlacementInput, ReparentShapePlacementResult, ShapeGroupState, ShapeSelectionSiblingOrderState, ShapeSiblingOrderDirection, ShapeSiblingOrderEdge, ShapeSiblingOrderState } from "../editor";
|
|
5
5
|
/**
|
|
6
6
|
* Shape-tree structure operations for the editor: grouping/ungrouping, the layer
|
|
7
7
|
* tree, sibling/parent z-ordering, and reparent placement. These are cohesive
|
|
@@ -18,9 +18,6 @@ export declare class ShapeHierarchyManager {
|
|
|
18
18
|
canGroupSelection(): boolean;
|
|
19
19
|
private getGroupStateForShapeIds;
|
|
20
20
|
private groupShapesFromState;
|
|
21
|
-
getLayerTree(pageId?: PageId): LayerTreeNode[];
|
|
22
|
-
getLayerNode(id: ShapeId): LayerTreeNode | null;
|
|
23
|
-
private getLayerDepth;
|
|
24
21
|
canGroupShapes(ids: readonly ShapeId[]): boolean;
|
|
25
22
|
groupShapes(ids: readonly ShapeId[], source?: ChangeSource): ShapeRecord | null;
|
|
26
23
|
groupSelection(source?: ChangeSource): ShapeRecord | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ChangeSource } from "../../../store/index";
|
|
2
2
|
import type { ShapeId } from "../../schema/records";
|
|
3
|
-
import type { Editor, LayerOrderDirection, LayerOrderEdge, ShapeSelectionSiblingOrderState, ShapeSiblingOrderDirection, ShapeSiblingOrderEdge, ShapeSiblingOrderState } from "../
|
|
3
|
+
import type { Editor, LayerOrderDirection, LayerOrderEdge, ShapeSelectionSiblingOrderState, ShapeSiblingOrderDirection, ShapeSiblingOrderEdge, ShapeSiblingOrderState } from "../editor";
|
|
4
4
|
export declare function getSelectionParentOrderState(editor: Editor): ShapeSelectionSiblingOrderState | null;
|
|
5
5
|
export declare function getSelectionSiblingOrderState(editor: Editor): ShapeSiblingOrderState | null;
|
|
6
6
|
export declare function canMoveSelectionWithinParent(editor: Editor, direction: ShapeSiblingOrderDirection): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ChangeSource } from "../../../store/index";
|
|
2
2
|
import type { ShapeId, ShapeParentId } from "../../schema/records";
|
|
3
|
-
import type { Editor, ReparentShapePlacementInput, ReparentShapePlacementResult } from "../
|
|
3
|
+
import type { Editor, ReparentShapePlacementInput, ReparentShapePlacementResult } from "../editor";
|
|
4
4
|
export declare function canUseShapeParent(editor: Editor, parentId: ShapeParentId, childId?: ShapeId): boolean;
|
|
5
5
|
export declare function moveShapesToParentPlacement(editor: Editor, input: ReparentShapePlacementInput, source?: ChangeSource): boolean;
|
|
6
6
|
export declare function moveShapesToParentPlacementResult(editor: Editor, input: ReparentShapePlacementInput, source?: ChangeSource): ReparentShapePlacementResult;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { KeyboardEditorEvent } from "../events";
|
|
2
|
+
export type EditorKeyboardShortcutCommand = "delete-selection" | "move-selection-backward" | "move-selection-forward" | "redo" | "reset-interaction" | "undo";
|
|
3
|
+
export type KeyboardShortcutTarget = {
|
|
4
|
+
type: "action";
|
|
5
|
+
actionId: string;
|
|
6
|
+
} | {
|
|
7
|
+
type: "editor";
|
|
8
|
+
command: EditorKeyboardShortcutCommand;
|
|
9
|
+
} | {
|
|
10
|
+
type: "tool";
|
|
11
|
+
toolId: string;
|
|
12
|
+
};
|
|
13
|
+
export interface KeyboardShortcutChord {
|
|
14
|
+
key: string;
|
|
15
|
+
altKey?: boolean;
|
|
16
|
+
ctrlKey?: boolean;
|
|
17
|
+
metaKey?: boolean;
|
|
18
|
+
shiftKey?: boolean;
|
|
19
|
+
accelKey?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export type KeyboardShortcutInput = string | KeyboardShortcutChord;
|
|
22
|
+
export interface KeyboardShortcutBinding {
|
|
23
|
+
id: string;
|
|
24
|
+
shortcut: KeyboardShortcutInput;
|
|
25
|
+
target: KeyboardShortcutTarget;
|
|
26
|
+
label?: string;
|
|
27
|
+
}
|
|
28
|
+
export type KeyboardShortcutEventLike = Pick<KeyboardEditorEvent, "key" | "altKey" | "ctrlKey" | "metaKey" | "shiftKey" | "accelKey">;
|
|
29
|
+
interface NormalizedKeyboardShortcutChord {
|
|
30
|
+
key: string;
|
|
31
|
+
altKey: boolean;
|
|
32
|
+
ctrlKey?: boolean;
|
|
33
|
+
metaKey?: boolean;
|
|
34
|
+
shiftKey: boolean;
|
|
35
|
+
accelKey?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export declare class ShortcutManager {
|
|
38
|
+
private readonly bindings;
|
|
39
|
+
private readonly bindingIds;
|
|
40
|
+
register(binding: KeyboardShortcutBinding): void;
|
|
41
|
+
registerActionShortcut(actionId: string, shortcut: KeyboardShortcutInput): void;
|
|
42
|
+
registerEditorShortcut(command: EditorKeyboardShortcutCommand, shortcut: KeyboardShortcutInput): void;
|
|
43
|
+
registerToolShortcut(toolId: string, shortcut: KeyboardShortcutInput): void;
|
|
44
|
+
unregister(id: string): void;
|
|
45
|
+
getBinding(id: string): KeyboardShortcutBinding | null;
|
|
46
|
+
getTargetForEvent(event: KeyboardShortcutEventLike): KeyboardShortcutTarget | null;
|
|
47
|
+
getActionIdForEvent(event: KeyboardShortcutEventLike): string | null;
|
|
48
|
+
getToolIdForEvent(event: KeyboardShortcutEventLike): string | null;
|
|
49
|
+
getActionShortcutLabel(actionId: string): string | undefined;
|
|
50
|
+
getToolShortcutLabel(toolId: string): string | undefined;
|
|
51
|
+
private getBindingForEvent;
|
|
52
|
+
private getBindingLabel;
|
|
53
|
+
}
|
|
54
|
+
export declare function normalizeKeyboardShortcut(shortcut: KeyboardShortcutInput): NormalizedKeyboardShortcutChord;
|
|
55
|
+
export declare function formatKeyboardShortcut(shortcut: KeyboardShortcutInput): string;
|
|
56
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
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 { ShapeId } from "../../schema/records";
|
|
4
4
|
import type { SelectionResizeHandleId } from "../selection";
|
|
5
5
|
import type { ResizeSnapInput, SnapAxis, SnapNode, SnapPoint } from "./snapTypes";
|
|
@@ -1,5 +1,5 @@
|
|
|
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 { SnapAxis } from "./snapTypes";
|
|
4
4
|
export declare const EPSILON = 1e-8;
|
|
5
5
|
export declare function areVecsEqual(left: Vec, right: Vec): boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
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 { GapSnapIndicatorGapState, GapSnapIndicatorState, PointSnapIndicatorState, SnapIndicatorState } from "../selection";
|
|
4
4
|
import type { Gap, GapAxisSnap, PointAxisSnap } from "./snapCalculations";
|
|
5
5
|
import type { SnapAxis, SnapCoordinateSpace, SnapNode } from "./snapTypes";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Signal } from "../../../signals/index";
|
|
2
2
|
import type { ShapeId } from "../../schema/records";
|
|
3
|
-
import type { Editor } from "../
|
|
3
|
+
import type { Editor } from "../editor";
|
|
4
4
|
import type { SnapIndicatorState } from "../selection";
|
|
5
5
|
import type { HandleSnapInput, HandleSnapResult, HandleSnapSnapshot, HandleSnapSnapshotInput, ResizeSnapInput, ResizeSnapResult, ResizeSnapSnapshot, SnapCoordinateSpace, TranslateSnapInput, TranslateSnapResult, TranslateSnapSnapshot } from "./snapTypes";
|
|
6
6
|
export declare class SnapManager {
|
package/_vendor/canvas-core/editor/managers/{SnapSnapshotBuilder.d.ts → snapSnapshotBuilder.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ShapeId } from "../../schema/records";
|
|
2
|
-
import type { Editor } from "../
|
|
2
|
+
import type { Editor } from "../editor";
|
|
3
3
|
import type { HandleSnapSnapshot, HandleSnapSnapshotInput, ResizeSnapSnapshot, SnapCoordinateSpace, TranslateSnapSnapshot } from "./snapTypes";
|
|
4
4
|
export declare class SnapSnapshotBuilder {
|
|
5
5
|
private readonly editor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Box } from "../../geometry/
|
|
2
|
-
import type { Vec } from "../../geometry/
|
|
1
|
+
import type { Box } from "../../geometry/box";
|
|
2
|
+
import type { Vec } from "../../geometry/vec";
|
|
3
3
|
import type { ShapeId, ShapeParentId } from "../../schema/records";
|
|
4
4
|
import type { SelectionHandle, SelectionResizeHandleId, SnapIndicatorState } from "../selection";
|
|
5
5
|
export type SnapAxis = "x" | "y";
|
package/_vendor/canvas-core/editor/managers/{SpatialIndexManager.d.ts → spatialIndexManager.d.ts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
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 { PageId, ShapeRecord } from "../../schema/records";
|
|
4
|
-
import type { Editor } from "../
|
|
5
|
-
import type { QueryManager } from "./
|
|
4
|
+
import type { Editor } from "../editor";
|
|
5
|
+
import type { QueryManager } from "./queryManager";
|
|
6
6
|
export interface SpatialQueryOptions {
|
|
7
7
|
pageId?: PageId;
|
|
8
8
|
}
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import type { Editor } from "../
|
|
1
|
+
import type { Editor } from "../editor";
|
|
2
2
|
import type { CancelEditorEvent, EditorEvent } from "../events";
|
|
3
|
-
import type { StateNode } from "../
|
|
3
|
+
import type { StateNode } from "../stateNode";
|
|
4
|
+
import type { KeyboardShortcutInput } from "./shortcutManager";
|
|
4
5
|
type ToolFactory = (editor: Editor) => StateNode;
|
|
5
6
|
export interface ToolRegistrationOptions {
|
|
6
|
-
shortcut?:
|
|
7
|
+
shortcut?: KeyboardShortcutInput;
|
|
7
8
|
}
|
|
8
9
|
export declare class ToolManager {
|
|
9
10
|
private readonly editor;
|
|
10
11
|
readonly activeToolId: import("../../../signals/index").Atom<string>;
|
|
11
12
|
readonly isToolLocked: import("../../../signals/index").Atom<boolean>;
|
|
12
13
|
private readonly registry;
|
|
13
|
-
private readonly shortcutToolIds;
|
|
14
14
|
private activeTool;
|
|
15
15
|
constructor(editor: Editor);
|
|
16
16
|
register(id: string, factory: ToolFactory, options?: ToolRegistrationOptions): void;
|
|
17
17
|
hasTool(id: string): boolean;
|
|
18
|
-
getToolIdForShortcut(key: string): string | null;
|
|
19
18
|
setActiveTool(id: string, reason?: CancelEditorEvent["reason"]): void;
|
|
20
19
|
dispatch(event: EditorEvent): void;
|
|
21
20
|
cancel(reason: CancelEditorEvent["reason"]): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Box } from "../../geometry/
|
|
2
|
-
import { Mat } from "../../geometry/
|
|
3
|
-
import { Vec } from "../../geometry/
|
|
1
|
+
import { Box } from "../../geometry/box";
|
|
2
|
+
import { Mat } from "../../geometry/mat";
|
|
3
|
+
import { Vec } from "../../geometry/vec";
|
|
4
4
|
import type { ShapeRecord } from "../../schema/records";
|
|
5
|
-
import type { ShapeUtil } from "../../shapes/
|
|
5
|
+
import type { ShapeUtil } from "../../shapes/shapeUtil";
|
|
6
6
|
export interface ShapeGeometry {
|
|
7
7
|
bounds: Box;
|
|
8
8
|
center: Vec;
|
|
@@ -1,5 +1,5 @@
|
|
|
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 { SelectionResizeHandleId } from "./selection";
|
|
4
4
|
export interface SelectionResizeBoundsResult {
|
|
5
5
|
bounds: Box;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Box } from "../geometry/
|
|
2
|
-
import { Vec } from "../geometry/
|
|
3
|
-
import type { ConnectionTerminal } from "../bindings/
|
|
1
|
+
import { Box } from "../geometry/box";
|
|
2
|
+
import { Vec } from "../geometry/vec";
|
|
3
|
+
import type { ConnectionTerminal } from "../bindings/terminalBinding";
|
|
4
4
|
import type { ShapeId, ShapeRecord } from "../schema/records";
|
|
5
5
|
export type SelectionResizeHandleId = "top_left" | "top" | "top_right" | "right" | "bottom_right" | "bottom" | "bottom_left" | "left";
|
|
6
6
|
export type SelectionRotateHandleId = "top_left_rotate" | "top_right_rotate" | "bottom_right_rotate" | "bottom_left_rotate";
|
|
@@ -16,14 +16,14 @@ export interface SelectionRotateHandle {
|
|
|
16
16
|
point: Vec;
|
|
17
17
|
bounds: Box;
|
|
18
18
|
}
|
|
19
|
-
export interface
|
|
20
|
-
kind: "
|
|
19
|
+
export interface SelectionBindingTerminalHandle {
|
|
20
|
+
kind: "binding_terminal";
|
|
21
21
|
terminal: ConnectionTerminal;
|
|
22
22
|
point: Vec;
|
|
23
23
|
bounds: Box;
|
|
24
24
|
}
|
|
25
|
-
export interface
|
|
26
|
-
kind: "
|
|
25
|
+
export interface SelectionBindingMiddleHandle {
|
|
26
|
+
kind: "binding_middle";
|
|
27
27
|
point: Vec;
|
|
28
28
|
bounds: Box;
|
|
29
29
|
}
|
|
@@ -45,13 +45,13 @@ export interface SelectionRotateHandleAnchor {
|
|
|
45
45
|
id: SelectionRotateHandleId;
|
|
46
46
|
point: Vec;
|
|
47
47
|
}
|
|
48
|
-
export interface
|
|
49
|
-
kind: "
|
|
48
|
+
export interface SelectionBindingTerminalHandleAnchor {
|
|
49
|
+
kind: "binding_terminal";
|
|
50
50
|
terminal: ConnectionTerminal;
|
|
51
51
|
point: Vec;
|
|
52
52
|
}
|
|
53
|
-
export interface
|
|
54
|
-
kind: "
|
|
53
|
+
export interface SelectionBindingMiddleHandleAnchor {
|
|
54
|
+
kind: "binding_middle";
|
|
55
55
|
point: Vec;
|
|
56
56
|
}
|
|
57
57
|
export interface SelectionCustomHandleAnchor {
|
|
@@ -104,12 +104,19 @@ export interface SelectionRotateSnapshot {
|
|
|
104
104
|
pointShapes: SelectionRotatePointShapeSnapshot[];
|
|
105
105
|
}
|
|
106
106
|
export type SelectionMirrorAxis = "horizontal" | "vertical";
|
|
107
|
-
export type SelectionHandle = SelectionResizeHandle | SelectionRotateHandle |
|
|
108
|
-
export interface
|
|
107
|
+
export type SelectionHandle = SelectionResizeHandle | SelectionRotateHandle | SelectionBindingTerminalHandle | SelectionBindingMiddleHandle | SelectionCustomHandle;
|
|
108
|
+
export interface BindingPreviewState {
|
|
109
109
|
terminal: ConnectionTerminal;
|
|
110
110
|
targetShapeId: ShapeId;
|
|
111
111
|
resolvedPagePoint: Vec;
|
|
112
112
|
rawPagePoint: Vec;
|
|
113
|
+
guidePath?: string | null;
|
|
114
|
+
}
|
|
115
|
+
export interface SelectionBindingSegment {
|
|
116
|
+
terminal: ConnectionTerminal;
|
|
117
|
+
anchorPagePoint: Vec;
|
|
118
|
+
boundaryPagePoint: Vec;
|
|
119
|
+
guidePath?: string | null;
|
|
113
120
|
}
|
|
114
121
|
export interface PointSnapIndicatorState {
|
|
115
122
|
id: string;
|
|
@@ -139,8 +146,8 @@ export interface SelectionOverlayState {
|
|
|
139
146
|
rotationCenter: Vec;
|
|
140
147
|
resizeHandles: SelectionResizeHandle[];
|
|
141
148
|
rotateHandles: SelectionRotateHandle[];
|
|
142
|
-
terminalHandles:
|
|
143
|
-
middleHandles:
|
|
149
|
+
terminalHandles: SelectionBindingTerminalHandle[];
|
|
150
|
+
middleHandles: SelectionBindingMiddleHandle[];
|
|
144
151
|
customHandles: SelectionCustomHandle[];
|
|
145
152
|
strokeWidth: number;
|
|
146
153
|
cornerRadius: number;
|
|
@@ -164,16 +171,16 @@ export interface SelectionOverlayFrameStyleState {
|
|
|
164
171
|
export interface SelectionOverlayHandlesState {
|
|
165
172
|
resizeHandles: SelectionResizeHandle[];
|
|
166
173
|
rotateHandles: SelectionRotateHandle[];
|
|
167
|
-
terminalHandles:
|
|
168
|
-
middleHandles:
|
|
174
|
+
terminalHandles: SelectionBindingTerminalHandle[];
|
|
175
|
+
middleHandles: SelectionBindingMiddleHandle[];
|
|
169
176
|
customHandles: SelectionCustomHandle[];
|
|
170
177
|
strokeWidth: number;
|
|
171
178
|
}
|
|
172
179
|
export interface SelectionOverlayHandleAnchorsState {
|
|
173
180
|
resizeHandleAnchors: SelectionResizeHandleAnchor[];
|
|
174
181
|
rotateHandleAnchors: SelectionRotateHandleAnchor[];
|
|
175
|
-
terminalHandleAnchors:
|
|
176
|
-
middleHandleAnchors:
|
|
182
|
+
terminalHandleAnchors: SelectionBindingTerminalHandleAnchor[];
|
|
183
|
+
middleHandleAnchors: SelectionBindingMiddleHandleAnchor[];
|
|
177
184
|
customHandleAnchors: SelectionCustomHandleAnchor[];
|
|
178
185
|
}
|
|
179
186
|
export interface SelectionOverlayHandleCountsState {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Editor } from "./
|
|
1
|
+
import type { Editor } from "./editor";
|
|
2
2
|
import type { InteractionHandlerRegistry } from "./interactions";
|
|
3
3
|
import type { SelectionHandleInteractionHandler, SelectionHandleInteractionInput, SelectionHandleInteractionSession } from "./interactions";
|
|
4
4
|
export type { SelectionHandleInteractionHandler, SelectionHandleInteractionInput, SelectionHandleInteractionSession, } from "./interactions";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Vec } from "../geometry/
|
|
1
|
+
import { Vec } from "../geometry/vec";
|
|
2
2
|
import type { ShapeId, ShapeRecord } from "../schema/records";
|
|
3
|
-
import type { ShapeSelectionHandleAnchors } from "../shapes/
|
|
4
|
-
import type {
|
|
3
|
+
import type { ShapeSelectionHandleAnchors } from "../shapes/shapeUtil";
|
|
4
|
+
import type { SelectionBindingMiddleHandle, SelectionBindingSegment, SelectionBindingTerminalHandle, SelectionCustomHandle, SelectionFrame, SelectionOverlayFrameGeometryState, SelectionOverlayFrameState, SelectionOverlayFrameStyleState, SelectionOverlayHandleAnchorsState, SelectionOverlayHandleCountsState, SelectionOverlayHandlesState, SelectionResizeHandle, SelectionRotateHandle } from "./selection";
|
|
5
5
|
export interface SelectedShapeOverlayItem {
|
|
6
6
|
id: ShapeId;
|
|
7
7
|
usesSelectionPathOverlay: boolean;
|
|
@@ -9,14 +9,16 @@ export interface SelectedShapeOverlayItem {
|
|
|
9
9
|
endPagePoint: Vec | null;
|
|
10
10
|
middlePagePoint: Vec | null;
|
|
11
11
|
path: string | null;
|
|
12
|
+
bindingSegments: readonly SelectionBindingSegment[];
|
|
12
13
|
}
|
|
13
14
|
export interface SelectionHandleState {
|
|
14
15
|
resizeHandles: SelectionResizeHandle[];
|
|
15
16
|
rotateHandles: SelectionRotateHandle[];
|
|
16
|
-
terminalHandles:
|
|
17
|
-
middleHandles:
|
|
17
|
+
terminalHandles: SelectionBindingTerminalHandle[];
|
|
18
|
+
middleHandles: SelectionBindingMiddleHandle[];
|
|
18
19
|
customHandles: SelectionCustomHandle[];
|
|
19
20
|
}
|
|
21
|
+
export declare function areSelectionBindingSegmentArraysEqual(a: readonly SelectionBindingSegment[], b: readonly SelectionBindingSegment[]): boolean;
|
|
20
22
|
export declare function areSelectedShapeOverlayItemsEqual(a: SelectedShapeOverlayItem[], b: SelectedShapeOverlayItem[]): boolean;
|
|
21
23
|
export declare function areSelectionOverlayFrameStatesEqual(a: SelectionOverlayFrameState | null, b: SelectionOverlayFrameState | null): boolean;
|
|
22
24
|
export declare function areSelectionOverlayFrameGeometryStatesEqual(a: SelectionOverlayFrameGeometryState | null, b: SelectionOverlayFrameGeometryState | null): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Editor } from "./
|
|
1
|
+
import type { Editor } from "./editor";
|
|
2
2
|
import type { CancelEditorEvent, ClickEditorEvent, EditorEvent, KeyboardEditorEvent, PointerEditorEvent, TickEditorEvent, WheelEditorEvent } from "./events";
|
|
3
3
|
export declare abstract class StateNode {
|
|
4
4
|
readonly editor: Editor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Editor } from "../editor/
|
|
1
|
+
import type { Editor } from "../editor/editor";
|
|
2
2
|
import { type BindingId, type ShapeId } from "../schema/records";
|
|
3
3
|
import type { ShapeSvgExporterRegistry } from "./svg";
|
|
4
4
|
export type ExportIntegrityIssueKind = "missing-shape" | "missing-bounds" | "missing-exporter" | "missing-binding-endpoint" | "invalid-binding" | "duplicate-exclusive-binding";
|