@yuzhouu/canvas-kit 0.1.2 → 0.1.3
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/_vendor/canvas-core/bindings/BindingUtil.d.ts +45 -0
- package/_vendor/canvas-core/bindings/BindingUtilRegistry.d.ts +8 -0
- package/_vendor/canvas-core/bindings/arrow/arrowBindingHelpers.d.ts +28 -0
- package/_vendor/canvas-core/contextMenu.d.ts +62 -0
- package/_vendor/canvas-core/editor/Editor.d.ts +564 -0
- package/_vendor/canvas-core/editor/HistoryManager.d.ts +18 -0
- package/_vendor/canvas-core/editor/StateNode.d.ts +31 -0
- package/_vendor/canvas-core/editor/camera.d.ts +3 -0
- package/_vendor/canvas-core/editor/clipboard.d.ts +43 -0
- package/_vendor/canvas-core/editor/commands.d.ts +126 -0
- package/_vendor/canvas-core/editor/edgeScroll.d.ts +5 -0
- package/_vendor/canvas-core/editor/editorComputedHelpers.d.ts +21 -0
- package/_vendor/canvas-core/editor/editorSelectionTransforms.d.ts +6 -0
- package/_vendor/canvas-core/editor/events.d.ts +71 -0
- package/_vendor/canvas-core/editor/{index.ts → index.d.ts} +1 -5
- package/_vendor/canvas-core/editor/interactions.d.ts +51 -0
- package/_vendor/canvas-core/editor/internal.d.ts +7 -0
- package/_vendor/canvas-core/editor/managers/BindingManager.d.ts +27 -0
- package/_vendor/canvas-core/editor/managers/CameraManager.d.ts +39 -0
- package/_vendor/canvas-core/editor/managers/ClipboardManager.d.ts +14 -0
- package/_vendor/canvas-core/editor/managers/DocumentSnapshotManager.d.ts +28 -0
- package/_vendor/canvas-core/editor/managers/InputsManager.d.ts +44 -0
- package/_vendor/canvas-core/editor/managers/InteractionTransientManager.d.ts +52 -0
- package/_vendor/canvas-core/editor/managers/QueryManager.d.ts +76 -0
- package/_vendor/canvas-core/editor/managers/RenderWindowManager.d.ts +25 -0
- package/_vendor/canvas-core/editor/managers/SelectionLayoutManager.d.ts +29 -0
- package/_vendor/canvas-core/editor/managers/SelectionManager.d.ts +21 -0
- package/_vendor/canvas-core/editor/managers/SelectionOverlayManager.d.ts +23 -0
- package/_vendor/canvas-core/editor/managers/ShapeEditingManager.d.ts +29 -0
- package/_vendor/canvas-core/editor/managers/ShapeGeometryManager.d.ts +42 -0
- package/_vendor/canvas-core/editor/managers/ShapeHierarchyManager.d.ts +58 -0
- package/_vendor/canvas-core/editor/managers/SideEffectManager.d.ts +23 -0
- package/_vendor/canvas-core/editor/managers/SnapManager.d.ts +29 -0
- package/_vendor/canvas-core/editor/managers/SnapSnapshotBuilder.d.ts +22 -0
- package/_vendor/canvas-core/editor/managers/SpatialIndexManager.d.ts +30 -0
- package/_vendor/canvas-core/editor/managers/ToolManager.d.ts +25 -0
- package/_vendor/canvas-core/editor/managers/queryState.d.ts +18 -0
- package/_vendor/canvas-core/editor/managers/selectionGeometry.d.ts +28 -0
- package/_vendor/canvas-core/editor/managers/shapeOrder.d.ts +14 -0
- package/_vendor/canvas-core/editor/managers/shapeReparenting.d.ts +6 -0
- package/_vendor/canvas-core/editor/managers/snapCalculations.d.ts +40 -0
- package/_vendor/canvas-core/editor/managers/snapGeometry.d.ts +26 -0
- package/_vendor/canvas-core/editor/managers/snapIndicators.d.ts +22 -0
- package/_vendor/canvas-core/editor/managers/snapTypes.d.ts +98 -0
- package/_vendor/canvas-core/editor/queries/shapeTransforms.d.ts +27 -0
- package/_vendor/canvas-core/editor/renderWindow.d.ts +30 -0
- package/_vendor/canvas-core/editor/resizeGeometry.d.ts +97 -0
- package/_vendor/canvas-core/editor/selection.d.ts +224 -0
- package/_vendor/canvas-core/editor/selectionHandleInteractions.d.ts +11 -0
- package/_vendor/canvas-core/editor/selectionOverlay.d.ts +31 -0
- package/_vendor/canvas-core/exports/integrity.d.ts +32 -0
- package/_vendor/canvas-core/exports/svg.d.ts +48 -0
- package/_vendor/canvas-core/geometry/Box.d.ts +19 -0
- package/_vendor/canvas-core/geometry/Ellipse2d.d.ts +16 -0
- package/_vendor/canvas-core/geometry/Geometry2d.d.ts +15 -0
- package/_vendor/canvas-core/geometry/Mat.d.ts +28 -0
- package/_vendor/canvas-core/geometry/Polyline2d.d.ts +14 -0
- package/_vendor/canvas-core/geometry/Rectangle2d.d.ts +16 -0
- package/_vendor/canvas-core/geometry/Vec.d.ts +37 -0
- package/_vendor/canvas-core/geometry/{index.ts → index.d.ts} +1 -6
- package/_vendor/canvas-core/geometry/segments.d.ts +5 -0
- package/_vendor/canvas-core/index.d.ts +57 -0
- package/_vendor/canvas-core/plugins/index.d.ts +1 -0
- package/_vendor/canvas-core/plugins/types.d.ts +27 -0
- package/_vendor/canvas-core/reactivity.d.ts +4 -0
- package/_vendor/canvas-core/schema/records.d.ts +112 -0
- package/_vendor/canvas-core/schema/snapshots.d.ts +27 -0
- package/_vendor/canvas-core/shapes/ShapeUtil.d.ts +133 -0
- package/_vendor/canvas-core/shapes/ShapeUtilRegistry.d.ts +9 -0
- package/_vendor/canvas-core/shapes/capabilities.d.ts +25 -0
- package/_vendor/canvas-core/shapes/types.d.ts +2 -0
- package/_vendor/canvas-core/toolbar.d.ts +117 -0
- package/_vendor/canvas-core/tools/hand/HandTool.d.ts +5 -0
- package/_vendor/canvas-core/tools/select/SelectTool.d.ts +5 -0
- package/_vendor/canvas-core/tools/select/selectContainment.d.ts +11 -0
- package/_vendor/canvas-core/tools/select/selectToolHelpers.d.ts +161 -0
- package/_vendor/canvas-core/tools/select/states/BrushingState.d.ts +19 -0
- package/_vendor/canvas-core/tools/select/states/DraggingSelectionHandleInteractionState.d.ts +15 -0
- package/_vendor/canvas-core/tools/select/states/IdleState.d.ts +8 -0
- package/_vendor/canvas-core/tools/select/states/PointingCanvasState.d.ts +11 -0
- package/_vendor/canvas-core/tools/select/states/PointingResizeHandleState.d.ts +10 -0
- package/_vendor/canvas-core/tools/select/states/PointingRotateHandleState.d.ts +10 -0
- package/_vendor/canvas-core/tools/select/states/PointingSelectionHandleInteractionState.d.ts +10 -0
- package/_vendor/canvas-core/tools/select/states/PointingShapeState.d.ts +12 -0
- package/_vendor/canvas-core/tools/select/states/ResizingState.d.ts +16 -0
- package/_vendor/canvas-core/tools/select/states/RotatingState.d.ts +14 -0
- package/_vendor/canvas-core/tools/select/states/SelectStateNode.d.ts +60 -0
- package/_vendor/canvas-core/tools/select/states/TranslatingState.d.ts +16 -0
- package/_vendor/canvas-plugin-api/feature.d.ts +37 -0
- package/_vendor/canvas-plugin-api/index.d.ts +57 -0
- package/_vendor/canvas-product-react/api/apiRegistry.d.ts +12 -0
- package/_vendor/canvas-product-react/api/canvasProductApi.d.ts +124 -0
- package/_vendor/canvas-product-react/api/index.d.ts +4 -0
- package/_vendor/canvas-product-react/capabilities/clipboard/clipboardService.d.ts +9 -0
- package/_vendor/canvas-product-react/capabilities/clipboard/systemClipboard.d.ts +16 -0
- package/_vendor/canvas-product-react/capabilities/context-menu/systemContextMenu.d.ts +17 -0
- package/_vendor/canvas-product-react/capabilities/context-menu/useContextMenuSurface.d.ts +12 -0
- package/_vendor/canvas-product-react/capabilities/export/useSvgExport.d.ts +29 -0
- package/_vendor/canvas-product-react/capabilities/history/useHistoryControls.d.ts +8 -0
- package/_vendor/canvas-product-react/capabilities/pages/usePageControls.d.ts +12 -0
- package/_vendor/canvas-product-react/capabilities/toolbar/systemToolbar.d.ts +32 -0
- package/_vendor/canvas-product-react/capabilities/toolbar/useToolbarSurfaces.d.ts +19 -0
- package/_vendor/canvas-product-react/capabilities/zoom/useZoomControls.d.ts +9 -0
- package/_vendor/canvas-product-react/index.d.ts +24 -0
- package/_vendor/canvas-product-react/persistence/index.d.ts +2 -0
- package/_vendor/canvas-product-react/persistence/localSnapshotPersistence.d.ts +40 -0
- package/_vendor/canvas-product-react/runtime/CanvasProductRoot.d.ts +4 -0
- package/_vendor/canvas-product-react/runtime/productDefinition.d.ts +45 -0
- package/_vendor/canvas-product-react/runtime/productServices.d.ts +31 -0
- package/_vendor/canvas-react/components/CanvasView.d.ts +11 -0
- package/_vendor/canvas-react/components/OverlayLayer.d.ts +1 -0
- package/_vendor/canvas-react/components/PageSpace.d.ts +6 -0
- package/_vendor/canvas-react/components/ShapeLayer.d.ts +1 -0
- package/_vendor/canvas-react/hooks/useEditor.d.ts +3 -0
- package/_vendor/canvas-react/hooks/useValue.d.ts +2 -0
- package/_vendor/canvas-react/host/CanvasRendererRegistryContext.d.ts +3 -0
- package/_vendor/canvas-react/host/contextMenuRegistry.d.ts +12 -0
- package/_vendor/canvas-react/host/domEventGuards.d.ts +11 -0
- package/_vendor/canvas-react/host/index.d.ts +8 -0
- package/_vendor/canvas-react/host/pluginHost.d.ts +93 -0
- package/_vendor/canvas-react/host/rendererRegistry.d.ts +12 -0
- package/_vendor/canvas-react/host/toolbarRegistry.d.ts +24 -0
- package/_vendor/plugin-arrow/ArrowBindingUtil.d.ts +27 -0
- package/_vendor/plugin-arrow/ArrowShapeUtil.d.ts +20 -0
- package/_vendor/plugin-arrow/ArrowTool.d.ts +4 -0
- package/_vendor/plugin-arrow/arrowGeometry.d.ts +50 -0
- package/_vendor/plugin-arrow/arrowTerminalBindingResolver.d.ts +21 -0
- package/_vendor/plugin-arrow/arrowTerminalCommands.d.ts +12 -0
- package/_vendor/plugin-arrow/canvas.d.ts +2 -0
- package/_vendor/plugin-arrow/core.d.ts +7 -0
- package/_vendor/plugin-arrow/feature.d.ts +3 -0
- package/_vendor/plugin-arrow/index.d.ts +11 -0
- package/_vendor/plugin-arrow/selectionHandleInteractions.d.ts +3 -0
- package/_vendor/plugin-arrow/types.d.ts +31 -0
- package/_vendor/plugin-draw/DrawShapeRenderer.d.ts +8 -0
- package/_vendor/plugin-draw/DrawShapeUtil.d.ts +21 -0
- package/_vendor/plugin-draw/DrawTool.d.ts +6 -0
- package/_vendor/plugin-draw/canvas.d.ts +2 -0
- package/_vendor/plugin-draw/core.d.ts +7 -0
- package/_vendor/plugin-draw/drawGeometry.d.ts +45 -0
- package/_vendor/plugin-draw/drawHitTest.d.ts +11 -0
- package/_vendor/plugin-draw/drawInterpolation.d.ts +5 -0
- package/_vendor/plugin-draw/drawPath.d.ts +37 -0
- package/_vendor/plugin-draw/drawSegments.d.ts +11 -0
- package/_vendor/plugin-draw/drawSelectionTransform.d.ts +18 -0
- package/_vendor/plugin-draw/drawShapeGeometry.d.ts +33 -0
- package/_vendor/plugin-draw/drawStrokeGeometry.d.ts +17 -0
- package/_vendor/plugin-draw/feature.d.ts +3 -0
- package/_vendor/plugin-draw/index.d.ts +13 -0
- package/_vendor/plugin-draw/types.d.ts +23 -0
- package/_vendor/plugin-eraser/EraserTool.d.ts +5 -0
- package/_vendor/plugin-eraser/canvas.d.ts +2 -0
- package/_vendor/plugin-eraser/core.d.ts +2 -0
- package/_vendor/plugin-eraser/feature.d.ts +3 -0
- package/_vendor/plugin-frame/FrameShapeUtil.d.ts +22 -0
- package/_vendor/plugin-frame/FrameTool.d.ts +6 -0
- package/_vendor/plugin-frame/canvas.d.ts +8 -0
- package/_vendor/plugin-frame/core.d.ts +7 -0
- package/_vendor/plugin-frame/feature.d.ts +3 -0
- package/_vendor/plugin-geo/GeoShapeUtil.d.ts +13 -0
- package/_vendor/plugin-geo/GeoTools.d.ts +17 -0
- package/_vendor/plugin-geo/canvas.d.ts +11 -0
- package/_vendor/plugin-geo/core.d.ts +7 -0
- package/_vendor/plugin-geo/feature.d.ts +3 -0
- package/_vendor/plugin-geo/types.d.ts +15 -0
- package/_vendor/plugin-group/GroupShapeUtil.d.ts +15 -0
- package/_vendor/plugin-group/canvas.d.ts +10 -0
- package/_vendor/plugin-group/core.d.ts +7 -0
- package/_vendor/plugin-group/feature.d.ts +3 -0
- package/_vendor/plugin-image/ImageShapeUtil.d.ts +10 -0
- package/_vendor/plugin-image/canvas.d.ts +2 -0
- package/_vendor/plugin-image/core.d.ts +16 -0
- package/_vendor/plugin-image/crop.d.ts +112 -0
- package/_vendor/plugin-image/cropInteractions.d.ts +3 -0
- package/_vendor/plugin-image/cropSession.d.ts +4 -0
- package/_vendor/plugin-image/feature.d.ts +3 -0
- package/_vendor/plugin-image/index.d.ts +8 -0
- package/_vendor/plugin-image/types.d.ts +37 -0
- package/_vendor/plugin-image-product-react/ImageImportController.d.ts +9 -0
- package/_vendor/plugin-image-product-react/imageAssetService.d.ts +7 -0
- package/_vendor/plugin-image-product-react/imageBlobStore.d.ts +25 -0
- package/_vendor/plugin-image-product-react/imageHostActions.d.ts +35 -0
- package/_vendor/plugin-image-product-react/imageProductApi.d.ts +21 -0
- package/_vendor/plugin-image-product-react/imageToolbarHostBridge.d.ts +14 -0
- package/_vendor/plugin-image-product-react/imageToolbarRuntime.d.ts +2 -0
- package/_vendor/plugin-image-product-react/index.d.ts +16 -0
- package/_vendor/plugin-image-product-react/snapshotGuards.d.ts +1 -0
- package/_vendor/plugin-image-product-react/svgImageAssetInliner.d.ts +3 -0
- package/_vendor/plugin-image-product-react/useImageImport.d.ts +16 -0
- package/_vendor/plugin-laser/LaserTool.d.ts +4 -0
- package/_vendor/plugin-laser/canvas.d.ts +2 -0
- package/_vendor/plugin-laser/core.d.ts +2 -0
- package/_vendor/plugin-laser/feature.d.ts +3 -0
- package/_vendor/plugin-text/ArrowLabelBindingUtil.d.ts +42 -0
- package/_vendor/plugin-text/GeoLabelBindingUtil.d.ts +45 -0
- package/_vendor/plugin-text/TextShapeSvgExporter.d.ts +6 -0
- package/_vendor/plugin-text/TextShapeUtil.d.ts +19 -0
- package/_vendor/plugin-text/TextTool.d.ts +4 -0
- package/_vendor/plugin-text/canvas.d.ts +2 -0
- package/_vendor/plugin-text/core.d.ts +2 -0
- package/_vendor/plugin-text/feature.d.ts +3 -0
- package/_vendor/plugin-text/host/RichTextEditingBox.d.ts +5 -0
- package/_vendor/plugin-text/host/RichTextToolbar.d.ts +6 -0
- package/_vendor/plugin-text/host/TiptapTextEditor.d.ts +24 -0
- package/_vendor/plugin-text/host/richTextRendering.d.ts +3 -0
- package/_vendor/plugin-text/host/textDomSelection.d.ts +7 -0
- package/_vendor/plugin-text/host/textEditingBoxStyle.d.ts +3 -0
- package/_vendor/plugin-text/host/textEntryFocus.d.ts +22 -0
- package/_vendor/plugin-text/host/textFontLoader.d.ts +2 -0
- package/_vendor/plugin-text/host/textMeasurement.d.ts +12 -0
- package/_vendor/plugin-text/host/textMeasurementSync.d.ts +10 -0
- package/_vendor/plugin-text/host/textRangeSelection.d.ts +14 -0
- package/_vendor/plugin-text/host/textShapeRendererRuntime.d.ts +8 -0
- package/_vendor/plugin-text/host/textShapeSync.d.ts +17 -0
- package/_vendor/plugin-text/host/tiptapTextEditorController.d.ts +33 -0
- package/_vendor/plugin-text/index.d.ts +4 -0
- package/_vendor/plugin-text/richTextUtils.d.ts +18 -0
- package/_vendor/plugin-text/textInteractions.d.ts +2 -0
- package/_vendor/plugin-text/textLabelHelpers.d.ts +44 -0
- package/_vendor/plugin-text/textShapeHelpers.d.ts +21 -0
- package/_vendor/plugin-text/textStyle.d.ts +9 -0
- package/_vendor/plugin-text/textTypes.d.ts +28 -0
- package/_vendor/signals/atom.d.ts +9 -0
- package/_vendor/signals/computed.d.ts +11 -0
- package/_vendor/signals/core.d.ts +17 -0
- package/_vendor/signals/effect.d.ts +29 -0
- package/_vendor/signals/types.d.ts +15 -0
- package/_vendor/store/Store.d.ts +26 -0
- package/_vendor/store/diff.d.ts +9 -0
- package/_vendor/store/history.d.ts +37 -0
- package/_vendor/store/index.d.ts +5 -0
- package/_vendor/store/types.d.ts +27 -0
- package/api/canvasKitApi.d.ts +2 -2
- package/index.css +1 -1
- package/index.d.ts +0 -1
- package/index.mjs +1 -1
- package/package.json +1 -1
- package/product/Shell.d.ts +2 -2
- package/product/chromeContext.d.ts +8 -8
- package/product/createCanvasKitEditor.d.ts +1 -1
- package/product/persistence.d.ts +1 -1
- package/product/product.d.ts +1 -1
- package/product/useCanvasClipboardShortcuts.d.ts +2 -2
- package/product-CxN5NN6u.mjs +4 -0
- package/product.mjs +1 -1
- package/standard/extensions.d.ts +1 -1
- package/standard/standardApi.d.ts +5 -5
- package/standard-R17_x8HU.mjs +44 -0
- package/standard.mjs +1 -1
- package/_vendor/canvas-core/bindings/BindingUtil.ts +0 -92
- package/_vendor/canvas-core/bindings/BindingUtilRegistry.ts +0 -22
- package/_vendor/canvas-core/bindings/arrow/arrowBindingHelpers.ts +0 -52
- package/_vendor/canvas-core/contextMenu.ts +0 -85
- package/_vendor/canvas-core/editor/Editor.ts +0 -2614
- package/_vendor/canvas-core/editor/HistoryManager.ts +0 -83
- package/_vendor/canvas-core/editor/StateNode.ts +0 -162
- package/_vendor/canvas-core/editor/camera.ts +0 -6
- package/_vendor/canvas-core/editor/clipboard.ts +0 -478
- package/_vendor/canvas-core/editor/commands.ts +0 -833
- package/_vendor/canvas-core/editor/edgeScroll.ts +0 -37
- package/_vendor/canvas-core/editor/editorComputedHelpers.ts +0 -257
- package/_vendor/canvas-core/editor/editorSelectionTransforms.ts +0 -116
- package/_vendor/canvas-core/editor/events.ts +0 -93
- package/_vendor/canvas-core/editor/interactions.ts +0 -101
- package/_vendor/canvas-core/editor/internal.ts +0 -22
- package/_vendor/canvas-core/editor/managers/BindingManager.ts +0 -262
- package/_vendor/canvas-core/editor/managers/CameraManager.ts +0 -147
- package/_vendor/canvas-core/editor/managers/ClipboardManager.ts +0 -32
- package/_vendor/canvas-core/editor/managers/DocumentSnapshotManager.ts +0 -256
- package/_vendor/canvas-core/editor/managers/InputsManager.ts +0 -319
- package/_vendor/canvas-core/editor/managers/InteractionTransientManager.ts +0 -218
- package/_vendor/canvas-core/editor/managers/QueryManager.ts +0 -837
- package/_vendor/canvas-core/editor/managers/RenderWindowManager.ts +0 -347
- package/_vendor/canvas-core/editor/managers/SelectionLayoutManager.ts +0 -196
- package/_vendor/canvas-core/editor/managers/SelectionManager.ts +0 -98
- package/_vendor/canvas-core/editor/managers/SelectionOverlayManager.ts +0 -308
- package/_vendor/canvas-core/editor/managers/ShapeEditingManager.ts +0 -226
- package/_vendor/canvas-core/editor/managers/ShapeGeometryManager.ts +0 -162
- package/_vendor/canvas-core/editor/managers/ShapeHierarchyManager.ts +0 -797
- package/_vendor/canvas-core/editor/managers/SideEffectManager.ts +0 -83
- package/_vendor/canvas-core/editor/managers/SnapManager.ts +0 -433
- package/_vendor/canvas-core/editor/managers/SnapSnapshotBuilder.ts +0 -430
- package/_vendor/canvas-core/editor/managers/SpatialIndexManager.ts +0 -354
- package/_vendor/canvas-core/editor/managers/ToolManager.ts +0 -81
- package/_vendor/canvas-core/editor/managers/queryState.ts +0 -583
- package/_vendor/canvas-core/editor/managers/selectionGeometry.ts +0 -287
- package/_vendor/canvas-core/editor/managers/shapeOrder.ts +0 -350
- package/_vendor/canvas-core/editor/managers/shapeReparenting.ts +0 -160
- package/_vendor/canvas-core/editor/managers/snapCalculations.ts +0 -412
- package/_vendor/canvas-core/editor/managers/snapGeometry.ts +0 -202
- package/_vendor/canvas-core/editor/managers/snapIndicators.ts +0 -403
- package/_vendor/canvas-core/editor/managers/snapTypes.ts +0 -122
- package/_vendor/canvas-core/editor/queries/shapeTransforms.ts +0 -171
- package/_vendor/canvas-core/editor/renderWindow.ts +0 -439
- package/_vendor/canvas-core/editor/resizeGeometry.ts +0 -654
- package/_vendor/canvas-core/editor/selection.ts +0 -489
- package/_vendor/canvas-core/editor/selectionHandleInteractions.ts +0 -43
- package/_vendor/canvas-core/editor/selectionOverlay.ts +0 -567
- package/_vendor/canvas-core/exports/integrity.ts +0 -174
- package/_vendor/canvas-core/exports/svg.ts +0 -494
- package/_vendor/canvas-core/geometry/Box.ts +0 -80
- package/_vendor/canvas-core/geometry/Ellipse2d.ts +0 -67
- package/_vendor/canvas-core/geometry/Geometry2d.ts +0 -52
- package/_vendor/canvas-core/geometry/Mat.ts +0 -92
- package/_vendor/canvas-core/geometry/Polyline2d.ts +0 -63
- package/_vendor/canvas-core/geometry/Rectangle2d.ts +0 -64
- package/_vendor/canvas-core/geometry/Vec.ts +0 -123
- package/_vendor/canvas-core/geometry/segments.ts +0 -65
- package/_vendor/canvas-core/index.ts +0 -391
- package/_vendor/canvas-core/plugins/index.ts +0 -5
- package/_vendor/canvas-core/plugins/types.ts +0 -53
- package/_vendor/canvas-core/reactivity.ts +0 -16
- package/_vendor/canvas-core/schema/records.ts +0 -221
- package/_vendor/canvas-core/schema/snapshots.ts +0 -527
- package/_vendor/canvas-core/shapes/ShapeUtil.ts +0 -516
- package/_vendor/canvas-core/shapes/ShapeUtilRegistry.ts +0 -26
- package/_vendor/canvas-core/shapes/capabilities.ts +0 -67
- package/_vendor/canvas-core/shapes/types.ts +0 -20
- package/_vendor/canvas-core/toolbar.ts +0 -148
- package/_vendor/canvas-core/tools/hand/HandTool.ts +0 -75
- package/_vendor/canvas-core/tools/select/SelectTool.ts +0 -33
- package/_vendor/canvas-core/tools/select/selectContainment.ts +0 -104
- package/_vendor/canvas-core/tools/select/selectToolHelpers.ts +0 -801
- package/_vendor/canvas-core/tools/select/states/BrushingState.ts +0 -145
- package/_vendor/canvas-core/tools/select/states/DraggingSelectionHandleInteractionState.ts +0 -116
- package/_vendor/canvas-core/tools/select/states/IdleState.ts +0 -159
- package/_vendor/canvas-core/tools/select/states/PointingCanvasState.ts +0 -41
- package/_vendor/canvas-core/tools/select/states/PointingResizeHandleState.ts +0 -78
- package/_vendor/canvas-core/tools/select/states/PointingRotateHandleState.ts +0 -64
- package/_vendor/canvas-core/tools/select/states/PointingSelectionHandleInteractionState.ts +0 -34
- package/_vendor/canvas-core/tools/select/states/PointingShapeState.ts +0 -140
- package/_vendor/canvas-core/tools/select/states/ResizingState.ts +0 -171
- package/_vendor/canvas-core/tools/select/states/RotatingState.ts +0 -124
- package/_vendor/canvas-core/tools/select/states/SelectStateNode.ts +0 -128
- package/_vendor/canvas-core/tools/select/states/TranslatingState.ts +0 -139
- package/_vendor/canvas-plugin-api/feature.ts +0 -204
- package/_vendor/canvas-plugin-api/index.ts +0 -142
- package/_vendor/canvas-product-react/api/apiRegistry.ts +0 -35
- package/_vendor/canvas-product-react/api/canvasProductApi.ts +0 -422
- package/_vendor/canvas-product-react/api/index.ts +0 -31
- package/_vendor/canvas-product-react/capabilities/clipboard/clipboardService.ts +0 -36
- package/_vendor/canvas-product-react/capabilities/clipboard/systemClipboard.ts +0 -245
- package/_vendor/canvas-product-react/capabilities/context-menu/systemContextMenu.ts +0 -396
- package/_vendor/canvas-product-react/capabilities/context-menu/useContextMenuSurface.ts +0 -59
- package/_vendor/canvas-product-react/capabilities/export/useSvgExport.ts +0 -156
- package/_vendor/canvas-product-react/capabilities/history/useHistoryControls.ts +0 -23
- package/_vendor/canvas-product-react/capabilities/pages/usePageControls.ts +0 -41
- package/_vendor/canvas-product-react/capabilities/toolbar/systemToolbar.ts +0 -490
- package/_vendor/canvas-product-react/capabilities/toolbar/useToolbarSurfaces.ts +0 -92
- package/_vendor/canvas-product-react/capabilities/zoom/useZoomControls.ts +0 -27
- package/_vendor/canvas-product-react/index.ts +0 -84
- package/_vendor/canvas-product-react/persistence/index.ts +0 -18
- package/_vendor/canvas-product-react/persistence/localSnapshotPersistence.ts +0 -294
- package/_vendor/canvas-product-react/runtime/CanvasProductRoot.tsx +0 -250
- package/_vendor/canvas-product-react/runtime/productDefinition.ts +0 -72
- package/_vendor/canvas-product-react/runtime/productServices.ts +0 -96
- package/_vendor/canvas-react/components/CanvasView.tsx +0 -796
- package/_vendor/canvas-react/components/OverlayLayer.tsx +0 -879
- package/_vendor/canvas-react/components/PageSpace.tsx +0 -34
- package/_vendor/canvas-react/components/ShapeLayer.tsx +0 -428
- package/_vendor/canvas-react/hooks/useEditor.ts +0 -11
- package/_vendor/canvas-react/hooks/useValue.ts +0 -14
- package/_vendor/canvas-react/host/CanvasRendererRegistryContext.tsx +0 -14
- package/_vendor/canvas-react/host/contextMenuRegistry.ts +0 -61
- package/_vendor/canvas-react/host/domEventGuards.ts +0 -61
- package/_vendor/canvas-react/host/index.ts +0 -38
- package/_vendor/canvas-react/host/pluginHost.ts +0 -635
- package/_vendor/canvas-react/host/rendererRegistry.tsx +0 -58
- package/_vendor/canvas-react/host/toolbarRegistry.ts +0 -100
- package/_vendor/plugin-arrow/ArrowBindingUtil.ts +0 -239
- package/_vendor/plugin-arrow/ArrowShapeUtil.ts +0 -311
- package/_vendor/plugin-arrow/ArrowTool.ts +0 -208
- package/_vendor/plugin-arrow/arrowGeometry.ts +0 -441
- package/_vendor/plugin-arrow/arrowTerminalBindingResolver.ts +0 -253
- package/_vendor/plugin-arrow/arrowTerminalCommands.ts +0 -230
- package/_vendor/plugin-arrow/canvas.tsx +0 -92
- package/_vendor/plugin-arrow/core.ts +0 -409
- package/_vendor/plugin-arrow/feature.ts +0 -20
- package/_vendor/plugin-arrow/index.ts +0 -28
- package/_vendor/plugin-arrow/selectionHandleInteractions.ts +0 -154
- package/_vendor/plugin-arrow/types.ts +0 -63
- package/_vendor/plugin-draw/DrawShapeRenderer.tsx +0 -60
- package/_vendor/plugin-draw/DrawShapeUtil.ts +0 -372
- package/_vendor/plugin-draw/DrawTool.ts +0 -444
- package/_vendor/plugin-draw/canvas.tsx +0 -24
- package/_vendor/plugin-draw/core.ts +0 -515
- package/_vendor/plugin-draw/drawGeometry.ts +0 -491
- package/_vendor/plugin-draw/drawHitTest.ts +0 -271
- package/_vendor/plugin-draw/drawInterpolation.ts +0 -250
- package/_vendor/plugin-draw/drawPath.ts +0 -550
- package/_vendor/plugin-draw/drawSegments.ts +0 -106
- package/_vendor/plugin-draw/drawSelectionTransform.ts +0 -67
- package/_vendor/plugin-draw/drawShapeGeometry.ts +0 -307
- package/_vendor/plugin-draw/drawStrokeGeometry.ts +0 -454
- package/_vendor/plugin-draw/feature.ts +0 -20
- package/_vendor/plugin-draw/index.ts +0 -31
- package/_vendor/plugin-draw/types.ts +0 -36
- package/_vendor/plugin-eraser/EraserTool.ts +0 -297
- package/_vendor/plugin-eraser/canvas.tsx +0 -616
- package/_vendor/plugin-eraser/core.ts +0 -49
- package/_vendor/plugin-eraser/feature.ts +0 -20
- package/_vendor/plugin-frame/FrameShapeUtil.ts +0 -173
- package/_vendor/plugin-frame/FrameTool.ts +0 -225
- package/_vendor/plugin-frame/canvas.tsx +0 -75
- package/_vendor/plugin-frame/core.ts +0 -534
- package/_vendor/plugin-frame/feature.ts +0 -20
- package/_vendor/plugin-geo/GeoShapeUtil.ts +0 -463
- package/_vendor/plugin-geo/GeoTools.ts +0 -247
- package/_vendor/plugin-geo/canvas.tsx +0 -90
- package/_vendor/plugin-geo/core.ts +0 -495
- package/_vendor/plugin-geo/feature.ts +0 -20
- package/_vendor/plugin-geo/types.ts +0 -27
- package/_vendor/plugin-group/GroupShapeUtil.ts +0 -59
- package/_vendor/plugin-group/canvas.tsx +0 -59
- package/_vendor/plugin-group/core.ts +0 -40
- package/_vendor/plugin-group/feature.ts +0 -20
- package/_vendor/plugin-image/ImageShapeUtil.ts +0 -95
- package/_vendor/plugin-image/canvas.tsx +0 -212
- package/_vendor/plugin-image/core.ts +0 -542
- package/_vendor/plugin-image/crop.ts +0 -770
- package/_vendor/plugin-image/cropInteractions.ts +0 -350
- package/_vendor/plugin-image/cropSession.ts +0 -38
- package/_vendor/plugin-image/feature.ts +0 -20
- package/_vendor/plugin-image/index.ts +0 -29
- package/_vendor/plugin-image/types.ts +0 -55
- package/_vendor/plugin-image-product-react/ImageImportController.tsx +0 -143
- package/_vendor/plugin-image-product-react/imageAssetService.ts +0 -52
- package/_vendor/plugin-image-product-react/imageBlobStore.ts +0 -315
- package/_vendor/plugin-image-product-react/imageHostActions.ts +0 -438
- package/_vendor/plugin-image-product-react/imageProductApi.ts +0 -88
- package/_vendor/plugin-image-product-react/imageToolbarHostBridge.ts +0 -48
- package/_vendor/plugin-image-product-react/imageToolbarRuntime.ts +0 -21
- package/_vendor/plugin-image-product-react/index.ts +0 -60
- package/_vendor/plugin-image-product-react/snapshotGuards.ts +0 -33
- package/_vendor/plugin-image-product-react/svgImageAssetInliner.ts +0 -54
- package/_vendor/plugin-image-product-react/useImageImport.ts +0 -64
- package/_vendor/plugin-laser/LaserTool.ts +0 -154
- package/_vendor/plugin-laser/canvas.tsx +0 -645
- package/_vendor/plugin-laser/core.ts +0 -49
- package/_vendor/plugin-laser/feature.ts +0 -20
- package/_vendor/plugin-text/ArrowLabelBindingUtil.ts +0 -336
- package/_vendor/plugin-text/GeoLabelBindingUtil.ts +0 -391
- package/_vendor/plugin-text/TextShapeSvgExporter.ts +0 -101
- package/_vendor/plugin-text/TextShapeUtil.ts +0 -284
- package/_vendor/plugin-text/TextTool.ts +0 -228
- package/_vendor/plugin-text/canvas.tsx +0 -115
- package/_vendor/plugin-text/core.ts +0 -422
- package/_vendor/plugin-text/feature.ts +0 -20
- package/_vendor/plugin-text/host/RichTextEditingBox.tsx +0 -144
- package/_vendor/plugin-text/host/RichTextToolbar.tsx +0 -266
- package/_vendor/plugin-text/host/TiptapTextEditor.tsx +0 -191
- package/_vendor/plugin-text/host/richTextRendering.tsx +0 -49
- package/_vendor/plugin-text/host/textDomSelection.ts +0 -93
- package/_vendor/plugin-text/host/textEditingBoxStyle.ts +0 -36
- package/_vendor/plugin-text/host/textEntryFocus.ts +0 -307
- package/_vendor/plugin-text/host/textFontLoader.ts +0 -149
- package/_vendor/plugin-text/host/textMeasurement.ts +0 -258
- package/_vendor/plugin-text/host/textMeasurementSync.ts +0 -77
- package/_vendor/plugin-text/host/textRangeSelection.ts +0 -134
- package/_vendor/plugin-text/host/textShapeRendererRuntime.tsx +0 -89
- package/_vendor/plugin-text/host/textShapeSync.ts +0 -173
- package/_vendor/plugin-text/host/tiptapTextEditorController.ts +0 -148
- package/_vendor/plugin-text/index.ts +0 -18
- package/_vendor/plugin-text/richTextUtils.ts +0 -259
- package/_vendor/plugin-text/textInteractions.ts +0 -366
- package/_vendor/plugin-text/textLabelHelpers.ts +0 -235
- package/_vendor/plugin-text/textShapeHelpers.ts +0 -123
- package/_vendor/plugin-text/textStyle.ts +0 -96
- package/_vendor/plugin-text/textTypes.ts +0 -48
- package/_vendor/signals/atom.ts +0 -74
- package/_vendor/signals/computed.ts +0 -132
- package/_vendor/signals/core.ts +0 -130
- package/_vendor/signals/effect.ts +0 -117
- package/_vendor/signals/types.ts +0 -17
- package/_vendor/store/Store.ts +0 -171
- package/_vendor/store/diff.ts +0 -229
- package/_vendor/store/history.ts +0 -177
- package/_vendor/store/index.ts +0 -32
- package/_vendor/store/types.ts +0 -37
- package/internal-modules.d.ts +0 -187
- package/product-iyBbEPIs.mjs +0 -4
- package/standard-BmrxwqpJ.mjs +0 -44
- /package/_vendor/canvas-core/tools/{index.ts → index.d.ts} +0 -0
- /package/_vendor/canvas-core/tools/select/states/{index.ts → index.d.ts} +0 -0
- /package/_vendor/canvas-react/components/{index.ts → index.d.ts} +0 -0
- /package/_vendor/canvas-react/{index.ts → index.d.ts} +0 -0
- /package/_vendor/plugin-eraser/{index.ts → index.d.ts} +0 -0
- /package/_vendor/plugin-frame/{index.ts → index.d.ts} +0 -0
- /package/_vendor/plugin-geo/{index.ts → index.d.ts} +0 -0
- /package/_vendor/plugin-group/{index.ts → index.d.ts} +0 -0
- /package/_vendor/plugin-laser/{index.ts → index.d.ts} +0 -0
- /package/_vendor/signals/{index.ts → index.d.ts} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Vec, type Editor, type ResolvedArrowTerminalBinding, type ShapeId, type ShapeRecord } from "../canvas-core/index";
|
|
2
|
+
import { type ArrowPoint, type ArrowShapeRecord } from "./types";
|
|
3
|
+
export declare function resolveArrowBindingPagePoint(editor: Editor, target: ShapeRecord, normalizedAnchor: ArrowPoint, oppositePagePoint: Vec): Vec;
|
|
4
|
+
export declare function resolveArrowTerminalBindingAtPoint(editor: Editor, { terminal, rawPagePoint, oppositePagePoint, excludeShapeId, ignoreTargets, }: {
|
|
5
|
+
terminal: "start" | "end";
|
|
6
|
+
rawPagePoint: Vec;
|
|
7
|
+
oppositePagePoint: Vec;
|
|
8
|
+
excludeShapeId?: ShapeId;
|
|
9
|
+
ignoreTargets?: boolean;
|
|
10
|
+
}): ResolvedArrowTerminalBinding;
|
|
11
|
+
export declare function resolveArrowTerminalBindingAtStartPoint(editor: Editor, { terminal, rawPagePoint, ignoreTargets, }: {
|
|
12
|
+
terminal: "start" | "end";
|
|
13
|
+
rawPagePoint: Vec;
|
|
14
|
+
ignoreTargets?: boolean;
|
|
15
|
+
}): ResolvedArrowTerminalBinding;
|
|
16
|
+
export declare function resolveArrowTerminalBindingForArrow(editor: Editor, { arrow, terminal, rawPagePoint, ignoreTargets, }: {
|
|
17
|
+
arrow: ArrowShapeRecord;
|
|
18
|
+
terminal: "start" | "end";
|
|
19
|
+
rawPagePoint: Vec;
|
|
20
|
+
ignoreTargets?: boolean;
|
|
21
|
+
}): ResolvedArrowTerminalBinding;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Vec, type ChangeSource, type Editor, type PageId, type ResolvedArrowTerminalBinding, type ShapeId, type ArrowBindingTargetInput } from "../canvas-core/index";
|
|
2
|
+
import { type ArrowShapeRecord, type ArrowShapeProps, type ArrowTerminal } from "./types";
|
|
3
|
+
export interface CreateArrowInput {
|
|
4
|
+
startPagePoint: Vec;
|
|
5
|
+
endPagePoint: Vec;
|
|
6
|
+
startBinding?: ArrowBindingTargetInput | null;
|
|
7
|
+
endBinding?: ArrowBindingTargetInput | null;
|
|
8
|
+
props?: Partial<ArrowShapeProps>;
|
|
9
|
+
parentId?: PageId;
|
|
10
|
+
}
|
|
11
|
+
export declare function createArrow(editor: Editor, input: CreateArrowInput, source?: ChangeSource): ArrowShapeRecord;
|
|
12
|
+
export declare function applyResolvedArrowTerminalBinding(editor: Editor, shapeId: ShapeId | null, terminal: ArrowTerminal, resolvedBinding: ResolvedArrowTerminalBinding, source?: ChangeSource): ArrowShapeRecord | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type LandCorePlugin, type ShapeSvgExporter, type SvgExportContext, type SvgNode } from "../canvas-core/index";
|
|
2
|
+
import type { ArrowShapeRecord } from "./types";
|
|
3
|
+
export declare class ArrowShapeSvgExporter implements ShapeSvgExporter<ArrowShapeRecord> {
|
|
4
|
+
readonly type: "arrow";
|
|
5
|
+
toSvg(shape: ArrowShapeRecord, context: SvgExportContext): SvgNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function createArrowCorePlugin(): LandCorePlugin;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { ArrowBindingUtil } from "./ArrowBindingUtil";
|
|
2
|
+
export { ArrowShapeUtil } from "./ArrowShapeUtil";
|
|
3
|
+
export { ArrowTool } from "./ArrowTool";
|
|
4
|
+
export { ArrowShapeSvgExporter, createArrowCorePlugin } from "./core";
|
|
5
|
+
export { createArrowCanvasPlugin } from "./canvas";
|
|
6
|
+
export { Arrow, createArrowFeatureBundle } from "./feature";
|
|
7
|
+
export { isArrowBindingRecord, isArrowShapeRecord, type ArrowBindingProps, type ArrowBindingRecord, type ArrowPoint, type ArrowShapeProps, type ArrowShapeRecord, type ArrowTerminal, } from "./types";
|
|
8
|
+
export { resolveArrowBindingPagePoint, resolveArrowTerminalBindingAtPoint, resolveArrowTerminalBindingAtStartPoint, resolveArrowTerminalBindingForArrow, } from "./arrowTerminalBindingResolver";
|
|
9
|
+
export { createArrow } from "./arrowTerminalCommands";
|
|
10
|
+
export { getArrowTerminalPagePoint } from "./arrowGeometry";
|
|
11
|
+
export { createArrowInteractionHandler, createArrowSelectionHandleInteractionHandler, } from "./selectionHandleInteractions";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type LandInteractionHandler, type SelectionHandleInteractionHandler } from "../canvas-core/index";
|
|
2
|
+
export declare function createArrowSelectionHandleInteractionHandler(): SelectionHandleInteractionHandler;
|
|
3
|
+
export declare function createArrowInteractionHandler(): LandInteractionHandler;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { BaseRecord, BindingRecordBase, ShapeRecordBase } from "../canvas-core/index";
|
|
2
|
+
export interface ArrowPoint {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
}
|
|
6
|
+
export type ArrowTerminal = "start" | "end";
|
|
7
|
+
export interface ArrowShapeProps {
|
|
8
|
+
w: number;
|
|
9
|
+
h: number;
|
|
10
|
+
start: ArrowPoint;
|
|
11
|
+
end: ArrowPoint;
|
|
12
|
+
bend: number;
|
|
13
|
+
stroke: string;
|
|
14
|
+
strokeWidth: number;
|
|
15
|
+
headStart: "none" | "arrow";
|
|
16
|
+
headEnd: "none" | "arrow";
|
|
17
|
+
}
|
|
18
|
+
export interface ArrowShapeRecord extends ShapeRecordBase<"arrow", ArrowShapeProps> {
|
|
19
|
+
type: "arrow";
|
|
20
|
+
props: ArrowShapeProps;
|
|
21
|
+
}
|
|
22
|
+
export interface ArrowBindingProps {
|
|
23
|
+
terminal: ArrowTerminal;
|
|
24
|
+
normalizedAnchor: ArrowPoint;
|
|
25
|
+
}
|
|
26
|
+
export interface ArrowBindingRecord extends BindingRecordBase<"arrow", ArrowBindingProps> {
|
|
27
|
+
type: "arrow";
|
|
28
|
+
props: ArrowBindingProps;
|
|
29
|
+
}
|
|
30
|
+
export declare function isArrowShapeRecord(record: BaseRecord | null | undefined): record is ArrowShapeRecord;
|
|
31
|
+
export declare function isArrowBindingRecord(record: BaseRecord | null | undefined): record is ArrowBindingRecord;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DrawShapeRecord } from "./types";
|
|
2
|
+
interface DrawShapeSvgProps {
|
|
3
|
+
shape: DrawShapeRecord;
|
|
4
|
+
stroke?: string;
|
|
5
|
+
strokeWidth?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function DrawShapeSvg({ shape, stroke, strokeWidth, }: DrawShapeSvgProps): import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Box, ShapeUtil, Vec, type ShapeBrushWrapInput, type ShapeBrushSelectInput, type ShapeLineSegmentHitTestInput, type ShapeSelectionFlipInput, type ShapeSelectionOverlayInfo, type ShapeSelectionResizeInput, type ShapeUpdate } from "../canvas-core/index";
|
|
2
|
+
import type { DrawShapeProps, DrawShapeRecord } from "./types";
|
|
3
|
+
export declare class DrawShapeUtil extends ShapeUtil<DrawShapeRecord> {
|
|
4
|
+
readonly type: "draw";
|
|
5
|
+
getDefaultProps(): DrawShapeProps;
|
|
6
|
+
validateProps(props: unknown): DrawShapeProps;
|
|
7
|
+
getBounds(shape: DrawShapeRecord): Box;
|
|
8
|
+
getLocalBounds(shape: DrawShapeRecord): Box;
|
|
9
|
+
getRenderBounds(shape: DrawShapeRecord): Box;
|
|
10
|
+
getExportBounds(shape: DrawShapeRecord): Box;
|
|
11
|
+
getSelectionResizeLocalBounds(shape: DrawShapeRecord): Box;
|
|
12
|
+
resizeSelectionBounds(shape: DrawShapeRecord, input: ShapeSelectionResizeInput): ShapeUpdate;
|
|
13
|
+
flipSelectionBounds(shape: DrawShapeRecord, input: ShapeSelectionFlipInput): ShapeUpdate;
|
|
14
|
+
getSelectionOverlayInfo(_shape: DrawShapeRecord): ShapeSelectionOverlayInfo;
|
|
15
|
+
isWrappedByBrush(shape: DrawShapeRecord, input: ShapeBrushWrapInput): boolean;
|
|
16
|
+
canSelectByBrush(shape: DrawShapeRecord, input: ShapeBrushSelectInput): boolean;
|
|
17
|
+
getPositionedOutlineVertices(shape: DrawShapeRecord): Vec[];
|
|
18
|
+
hitTest(shape: DrawShapeRecord, positionedPoint: Vec): boolean;
|
|
19
|
+
hitTestLineSegment(shape: DrawShapeRecord, input: ShapeLineSegmentHitTestInput): boolean;
|
|
20
|
+
repairLoadedShape(shape: DrawShapeRecord): DrawShapeRecord | null;
|
|
21
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type LandCorePlugin, type ShapeSvgExporter, type SvgNode } from "../canvas-core/index";
|
|
2
|
+
import { type DrawShapeRecord } from "./types";
|
|
3
|
+
export declare class DrawShapeSvgExporter implements ShapeSvgExporter<DrawShapeRecord> {
|
|
4
|
+
readonly type: "draw";
|
|
5
|
+
toSvg(shape: DrawShapeRecord): SvgNode | null;
|
|
6
|
+
}
|
|
7
|
+
export declare function createDrawCorePlugin(): LandCorePlugin;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Box, Vec } from "../canvas-core/index";
|
|
2
|
+
import { type DrawSelectionFlipInput, type DrawSelectionResizeInput } from "./drawSelectionTransform";
|
|
3
|
+
import { getDrawPointGeometry, getDrawSegmentGeometry, type DrawShapeGeometry, type DrawShapeSamplingStats } from "./drawShapeGeometry";
|
|
4
|
+
import type { DrawShapePoint, DrawShapeRecord, DrawShapeSegment } from "./types";
|
|
5
|
+
export { getDrawPointGeometry, getDrawSegmentGeometry };
|
|
6
|
+
export type { DrawShapeGeometry, DrawShapeSamplingStats, } from "./drawShapeGeometry";
|
|
7
|
+
type DrawLocalGeometryCacheKey = Pick<DrawShapeRecord, "props">;
|
|
8
|
+
type DrawPositionedGeometryCacheKey = Pick<DrawShapeRecord, "x" | "y" | "props">;
|
|
9
|
+
type DrawPageGeometryCacheKey = Pick<DrawShapeRecord, "x" | "y" | "rotation" | "scaleX" | "scaleY" | "props">;
|
|
10
|
+
export interface DrawShapeDiagnostics extends DrawShapeSamplingStats {
|
|
11
|
+
hasPath: boolean;
|
|
12
|
+
hasSelectionPath: boolean;
|
|
13
|
+
outlineVertexCount: number;
|
|
14
|
+
}
|
|
15
|
+
export interface NormalizedDrawShape {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
segments: DrawShapeSegment[];
|
|
19
|
+
pointBounds: Box;
|
|
20
|
+
localBounds: Box;
|
|
21
|
+
renderBounds: Box;
|
|
22
|
+
path: string | null;
|
|
23
|
+
selectionPath: string | null;
|
|
24
|
+
fillPath: string | null;
|
|
25
|
+
outlineVertices: Vec[];
|
|
26
|
+
outlinePolygons: Vec[][];
|
|
27
|
+
sampling: DrawShapeSamplingStats;
|
|
28
|
+
}
|
|
29
|
+
export declare function getDrawShapeLocalGeometry(shape: DrawLocalGeometryCacheKey): DrawShapeGeometry;
|
|
30
|
+
export declare function normalizeDrawShapeFromSegmentSet(segments: readonly DrawShapeSegment[], strokeWidth: number, isPen?: boolean, isClosed?: boolean): NormalizedDrawShape;
|
|
31
|
+
export declare function normalizeDrawShapeFromPointSet(points: readonly DrawShapePoint[], strokeWidth: number, isPen?: boolean, isClosed?: boolean): NormalizedDrawShape;
|
|
32
|
+
export declare function normalizeDrawShapeFromPagePoints(pagePoints: readonly DrawShapePoint[], strokeWidth: number, isPen?: boolean, isClosed?: boolean): NormalizedDrawShape;
|
|
33
|
+
export declare function normalizeDrawShapeFromPageSegments(pageSegments: readonly DrawShapeSegment[], strokeWidth: number, isPen?: boolean, isClosed?: boolean): NormalizedDrawShape;
|
|
34
|
+
export declare function getDrawShapePositionedSegments(shape: Pick<DrawShapeRecord, "x" | "y" | "props">): DrawShapeSegment[];
|
|
35
|
+
export declare function getDrawShapePositionedPoints(shape: Pick<DrawShapeRecord, "x" | "y" | "props">): DrawShapePoint[];
|
|
36
|
+
export declare function getDrawShapePositionedGeometry(shape: DrawPositionedGeometryCacheKey): DrawShapeGeometry;
|
|
37
|
+
export declare function getDrawShapePagePoints(shape: DrawShapeRecord): DrawShapePoint[];
|
|
38
|
+
export declare function getDrawShapePageSegments(shape: DrawShapeRecord): DrawShapeSegment[];
|
|
39
|
+
export declare function normalizeTransformedDrawShape(shape: DrawShapeRecord): NormalizedDrawShape;
|
|
40
|
+
export declare function getDrawShapePageGeometry(shape: DrawPageGeometryCacheKey): DrawShapeGeometry;
|
|
41
|
+
export declare function resizeDrawShapeToSelectionBounds(shape: DrawShapeRecord, input: DrawSelectionResizeInput): NormalizedDrawShape;
|
|
42
|
+
export declare function flipDrawShapeInSelectionBounds(shape: DrawShapeRecord, input: DrawSelectionFlipInput): NormalizedDrawShape;
|
|
43
|
+
export declare function resizeDrawShapeToPageBounds(shape: Pick<DrawShapeRecord, "x" | "y" | "props">, nextPageBounds: Box): NormalizedDrawShape;
|
|
44
|
+
export declare function cloneDrawShapeSegmentsForUpdate(segments: readonly DrawShapeSegment[]): DrawShapeSegment[];
|
|
45
|
+
export declare function getDrawShapeDiagnostics(shape: DrawLocalGeometryCacheKey): DrawShapeDiagnostics;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Vec } from "../canvas-core/index";
|
|
2
|
+
import type { DrawShapeGeometry } from "./drawShapeGeometry";
|
|
3
|
+
interface DrawShapeHitTestOptions {
|
|
4
|
+
fill?: string;
|
|
5
|
+
isClosed?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function hitTestDrawShapeGeometry(geometry: Pick<DrawShapeGeometry, "outlinePolygons" | "outlineVertices" | "normalizedPoints">, strokeWidth: number, point: Vec, options?: DrawShapeHitTestOptions): boolean;
|
|
8
|
+
export declare function hitTestDrawShapeLineSegmentGeometry(geometry: Pick<DrawShapeGeometry, "outlinePolygons" | "outlineVertices" | "normalizedPoints">, strokeWidth: number, start: Vec, end: Vec, options?: DrawShapeHitTestOptions & {
|
|
9
|
+
margin?: number;
|
|
10
|
+
}): boolean;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DrawShapeRecord } from "./types";
|
|
2
|
+
export interface DrawShapeInterpolationOptions {
|
|
3
|
+
pointCount?: number;
|
|
4
|
+
}
|
|
5
|
+
export declare function interpolateDrawShapeRecords(from: DrawShapeRecord, to: DrawShapeRecord, t: number, options?: DrawShapeInterpolationOptions): DrawShapeRecord;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Vec } from "../canvas-core/index";
|
|
2
|
+
import type { DrawShapePoint, DrawShapeSegment } from "./types";
|
|
3
|
+
export interface DrawPointSamplingOptions {
|
|
4
|
+
minPointDistance: number;
|
|
5
|
+
positionBlend: number;
|
|
6
|
+
pressureBlend: number;
|
|
7
|
+
maxPointCount: number;
|
|
8
|
+
}
|
|
9
|
+
export interface DrawInputPointGuardOptions {
|
|
10
|
+
minPointDistance: number;
|
|
11
|
+
pressureDeltaThreshold: number;
|
|
12
|
+
softMaxPointCount: number;
|
|
13
|
+
hardMaxPointCount: number;
|
|
14
|
+
maxDistanceMultiplier: number;
|
|
15
|
+
}
|
|
16
|
+
export interface DrawPointSamplingResult {
|
|
17
|
+
points: DrawShapePoint[];
|
|
18
|
+
rawPointCount: number;
|
|
19
|
+
sampledPointCount: number;
|
|
20
|
+
maxPointCount: number;
|
|
21
|
+
reduced: boolean;
|
|
22
|
+
capped: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare function getDrawPointSamplingLimit(isPen: boolean): number;
|
|
25
|
+
export declare function getDrawSegmentPointLimit(isPen: boolean): number;
|
|
26
|
+
export declare function drawPointToVec(point: DrawShapePoint): Vec;
|
|
27
|
+
export declare function cloneDrawPoint(point: DrawShapePoint): DrawShapePoint;
|
|
28
|
+
export declare function cloneDrawSegment(segment: DrawShapeSegment): DrawShapeSegment;
|
|
29
|
+
export declare function getFlattenedDrawSegmentPoints(segments: readonly DrawShapeSegment[]): DrawShapePoint[];
|
|
30
|
+
export declare function getDrawSegmentsFromPoints(points: readonly DrawShapePoint[]): DrawShapeSegment[];
|
|
31
|
+
export declare function getDrawInputPointGuardOptions(strokeWidth: number, isPen: boolean): DrawInputPointGuardOptions;
|
|
32
|
+
export declare function appendGuardedDrawPoint(points: DrawShapePoint[], point: DrawShapePoint, options: DrawInputPointGuardOptions): void;
|
|
33
|
+
export declare function sampleDrawPoints(points: readonly DrawShapePoint[], options: DrawPointSamplingOptions): DrawPointSamplingResult;
|
|
34
|
+
export declare function getDrawCenterlinePathFromPoints(points: readonly DrawShapePoint[]): string | null;
|
|
35
|
+
export declare function getClosedDrawCenterlinePathFromPoints(points: readonly DrawShapePoint[]): string | null;
|
|
36
|
+
export declare function getClosedSvgPathFromVecs(points: readonly Vec[]): string | null;
|
|
37
|
+
export declare function getSmoothClosedSvgPathFromVecs(points: readonly Vec[]): string | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Box, Vec } from "../canvas-core/index";
|
|
2
|
+
import type { DrawShapePoint, DrawShapeSegment } from "./types";
|
|
3
|
+
export declare function cloneDrawPoints(points: readonly DrawShapePoint[]): DrawShapePoint[];
|
|
4
|
+
export declare function cloneDrawSegments(segments: readonly DrawShapeSegment[]): DrawShapeSegment[];
|
|
5
|
+
export declare function cloneDrawSegment(segment: DrawShapeSegment): DrawShapeSegment;
|
|
6
|
+
export declare function translateDrawPoints(points: readonly DrawShapePoint[], dx: number, dy: number): DrawShapePoint[];
|
|
7
|
+
export declare function translateDrawSegments(segments: readonly DrawShapeSegment[], dx: number, dy: number): DrawShapeSegment[];
|
|
8
|
+
export declare function mapDrawPointCoordinates(points: readonly DrawShapePoint[], mapper: (point: Vec, index: number) => Vec): DrawShapePoint[];
|
|
9
|
+
export declare function mapDrawSegmentCoordinates(segments: readonly DrawShapeSegment[], mapper: (point: Vec, segmentIndex: number, pointIndex: number) => Vec): DrawShapeSegment[];
|
|
10
|
+
export declare function mapDrawShapePointsToBounds(points: readonly DrawShapePoint[], fromBounds: Box, toBounds: Box): DrawShapePoint[];
|
|
11
|
+
export declare function mapDrawShapeSegmentsToBounds(segments: readonly DrawShapeSegment[], fromBounds: Box, toBounds: Box): DrawShapeSegment[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Box, Vec, type SelectionMirrorAxis } from "../canvas-core/index";
|
|
2
|
+
import type { DrawShapeSegment } from "./types";
|
|
3
|
+
export interface DrawSelectionRotationTransform {
|
|
4
|
+
selectionRotation: number;
|
|
5
|
+
selectionRotationCenter: Vec;
|
|
6
|
+
}
|
|
7
|
+
export interface DrawSelectionResizeInput extends DrawSelectionRotationTransform {
|
|
8
|
+
targetSelectionStrokeBounds: Box;
|
|
9
|
+
scaleX: number;
|
|
10
|
+
scaleY: number;
|
|
11
|
+
}
|
|
12
|
+
export interface DrawSelectionFlipInput extends DrawSelectionRotationTransform {
|
|
13
|
+
axis: SelectionMirrorAxis;
|
|
14
|
+
selectionMirrorBounds: Box;
|
|
15
|
+
}
|
|
16
|
+
export declare function mapPageDrawSegmentsToSelectionLocal(segments: readonly DrawShapeSegment[], input: DrawSelectionRotationTransform): DrawShapeSegment[];
|
|
17
|
+
export declare function mapSelectionLocalDrawSegmentsToPage(segments: readonly DrawShapeSegment[], input: DrawSelectionRotationTransform): DrawShapeSegment[];
|
|
18
|
+
export declare function mirrorSelectionLocalDrawSegments(segments: readonly DrawShapeSegment[], input: DrawSelectionFlipInput): DrawShapeSegment[];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Box, Vec } from "../canvas-core/index";
|
|
2
|
+
import type { DrawShapePoint, DrawShapeSegment } from "./types";
|
|
3
|
+
export interface DrawShapeSamplingStats {
|
|
4
|
+
rawPointCount: number;
|
|
5
|
+
sampledPointCount: number;
|
|
6
|
+
sampledPointLimit: number;
|
|
7
|
+
reduced: boolean;
|
|
8
|
+
capped: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface DrawShapeGeometry {
|
|
11
|
+
normalizedSegments: DrawShapeSegment[];
|
|
12
|
+
normalizedPoints: DrawShapePoint[];
|
|
13
|
+
pointBounds: Box;
|
|
14
|
+
path: string | null;
|
|
15
|
+
selectionPath: string | null;
|
|
16
|
+
fillPath: string | null;
|
|
17
|
+
localBounds: Box;
|
|
18
|
+
renderBounds: Box;
|
|
19
|
+
outlineVertices: Vec[];
|
|
20
|
+
outlinePolygons: Vec[][];
|
|
21
|
+
sampling: DrawShapeSamplingStats;
|
|
22
|
+
}
|
|
23
|
+
export declare function createDrawGeometryFromDerivedData({ segments, outlineVertices, outlinePolygons, strokeWidth, sampling, isClosed, }: {
|
|
24
|
+
segments: readonly DrawShapeSegment[];
|
|
25
|
+
outlineVertices: readonly Vec[];
|
|
26
|
+
outlinePolygons?: readonly Vec[][];
|
|
27
|
+
strokeWidth: number;
|
|
28
|
+
sampling: DrawShapeSamplingStats;
|
|
29
|
+
isClosed: boolean;
|
|
30
|
+
}): DrawShapeGeometry;
|
|
31
|
+
export declare function createTranslatedDrawGeometry(geometry: DrawShapeGeometry, strokeWidth: number, dx: number, dy: number, isClosed: boolean): DrawShapeGeometry;
|
|
32
|
+
export declare function getDrawPointGeometry(points: readonly DrawShapePoint[], strokeWidth: number, isPen?: boolean, isClosed?: boolean): DrawShapeGeometry;
|
|
33
|
+
export declare function getDrawSegmentGeometry(segments: readonly DrawShapeSegment[], strokeWidth: number, isPen?: boolean, isClosed?: boolean): DrawShapeGeometry;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Vec } from "../canvas-core/index";
|
|
2
|
+
import type { DrawShapePoint } from "./types";
|
|
3
|
+
export interface DrawStrokeDerivedPoint {
|
|
4
|
+
point: Vec;
|
|
5
|
+
direction: Vec;
|
|
6
|
+
pressure: number;
|
|
7
|
+
radius: number;
|
|
8
|
+
runningLength: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function createStrokeDerivedPoints(points: readonly DrawShapePoint[], strokeWidth: number, isPen: boolean, isClosed: boolean, options?: {
|
|
11
|
+
taperStart?: boolean;
|
|
12
|
+
taperEnd?: boolean;
|
|
13
|
+
}): DrawStrokeDerivedPoint[];
|
|
14
|
+
export declare function getStrokeOutlineVertices(points: readonly DrawStrokeDerivedPoint[], isClosed: boolean, options?: {
|
|
15
|
+
capStart?: boolean;
|
|
16
|
+
capEnd?: boolean;
|
|
17
|
+
}): Vec[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { DrawTool } from "./DrawTool";
|
|
2
|
+
export { DrawShapeUtil } from "./DrawShapeUtil";
|
|
3
|
+
export { DrawShapeSvgExporter, createDrawCorePlugin } from "./core";
|
|
4
|
+
export { DrawShapeSvg } from "./DrawShapeRenderer";
|
|
5
|
+
export { createDrawCanvasPlugin } from "./canvas";
|
|
6
|
+
export { Draw, createDrawFeatureBundle } from "./feature";
|
|
7
|
+
export { flipDrawShapeInSelectionBounds, getDrawShapeDiagnostics, getDrawShapePageSegments, getDrawShapePagePoints, normalizeTransformedDrawShape, } from "./drawGeometry";
|
|
8
|
+
export { interpolateDrawShapeRecords } from "./drawInterpolation";
|
|
9
|
+
export type { DrawShapePoint, DrawShapeProps, DrawShapeRecord, DrawShapeSegment, } from "./types";
|
|
10
|
+
export { isDrawShapeRecord } from "./types";
|
|
11
|
+
export type { DrawShapeDiagnostics, DrawShapeSamplingStats, } from "./drawGeometry";
|
|
12
|
+
export type { DrawShapeInterpolationOptions } from "./drawInterpolation";
|
|
13
|
+
export type { DrawSelectionFlipInput, DrawSelectionResizeInput, DrawSelectionRotationTransform, } from "./drawSelectionTransform";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type BaseRecord, type ShapeRecordBase } from "../canvas-core/index";
|
|
2
|
+
export interface DrawShapePoint {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
pressure?: number;
|
|
6
|
+
segment?: "straight";
|
|
7
|
+
}
|
|
8
|
+
export interface DrawShapeSegment {
|
|
9
|
+
points: DrawShapePoint[];
|
|
10
|
+
}
|
|
11
|
+
export interface DrawShapeProps {
|
|
12
|
+
segments: DrawShapeSegment[];
|
|
13
|
+
stroke: string;
|
|
14
|
+
strokeWidth: number;
|
|
15
|
+
fill: string;
|
|
16
|
+
isClosed: boolean;
|
|
17
|
+
isPen?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface DrawShapeRecord extends ShapeRecordBase<"draw", DrawShapeProps> {
|
|
20
|
+
type: "draw";
|
|
21
|
+
props: DrawShapeProps;
|
|
22
|
+
}
|
|
23
|
+
export declare function isDrawShapeRecord(record: BaseRecord | null | undefined): record is DrawShapeRecord;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Box, ShapeUtil, Vec, type ShapeBrushSelectInput, type ShapeLineSegmentHitTestInput, type ShapeRecordBase } from "../canvas-core/index";
|
|
2
|
+
export interface FrameShapeProps {
|
|
3
|
+
w: number;
|
|
4
|
+
h: number;
|
|
5
|
+
name: string;
|
|
6
|
+
fill: string;
|
|
7
|
+
stroke: string;
|
|
8
|
+
strokeWidth: number;
|
|
9
|
+
}
|
|
10
|
+
export type FrameShapeRecord = ShapeRecordBase<"frame", FrameShapeProps>;
|
|
11
|
+
export declare class FrameShapeUtil extends ShapeUtil<FrameShapeRecord> {
|
|
12
|
+
readonly type: "frame";
|
|
13
|
+
getDefaultProps(): FrameShapeProps;
|
|
14
|
+
validateProps(props: unknown): FrameShapeProps;
|
|
15
|
+
getBounds(shape: FrameShapeRecord): Box;
|
|
16
|
+
canReceiveChildren(_shape: FrameShapeRecord): boolean;
|
|
17
|
+
shouldRotateDescendants(_shape: FrameShapeRecord): boolean;
|
|
18
|
+
getChildClipLocalBounds(shape: FrameShapeRecord): Box | null;
|
|
19
|
+
canSelectByBrush(shape: FrameShapeRecord, input: ShapeBrushSelectInput): boolean;
|
|
20
|
+
hitTest(shape: FrameShapeRecord, positionedPoint: Vec): boolean;
|
|
21
|
+
hitTestLineSegment(shape: FrameShapeRecord, input: ShapeLineSegmentHitTestInput): boolean;
|
|
22
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { LandCanvasPlugin } from "../canvas-plugin-api/index";
|
|
2
|
+
import type { FrameShapeRecord } from "./FrameShapeUtil";
|
|
3
|
+
interface FrameShapeSvgProps {
|
|
4
|
+
shape: FrameShapeRecord;
|
|
5
|
+
}
|
|
6
|
+
export declare function createFrameCanvasPlugin(): LandCanvasPlugin;
|
|
7
|
+
export declare function FrameShapeSvg({ shape }: FrameShapeSvgProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type LandCorePlugin, type ShapeSvgExporter, type SvgNode } from "../canvas-core/index";
|
|
2
|
+
import { type FrameShapeRecord } from "./FrameShapeUtil";
|
|
3
|
+
export declare class FrameShapeSvgExporter implements ShapeSvgExporter<FrameShapeRecord> {
|
|
4
|
+
readonly type: "frame";
|
|
5
|
+
toSvg(shape: FrameShapeRecord): SvgNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function createFrameCorePlugin(): LandCorePlugin;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Box, ShapeUtil, Vec, type ShapeBindingPointInput, type ShapeHandleSnapGeometry, type ShapeLineSegmentHitTestInput } from "../canvas-core/index";
|
|
2
|
+
import type { GeoShapeProps, GeoShapeRecord } from "./types";
|
|
3
|
+
export declare class GeoShapeUtil extends ShapeUtil<GeoShapeRecord> {
|
|
4
|
+
readonly type: "geo";
|
|
5
|
+
getDefaultProps(): GeoShapeProps;
|
|
6
|
+
validateProps(props: unknown): GeoShapeProps;
|
|
7
|
+
getBounds(shape: GeoShapeRecord): Box;
|
|
8
|
+
getPositionedOutlineVertices(shape: GeoShapeRecord): Vec[];
|
|
9
|
+
getHandleSnapGeometry(shape: GeoShapeRecord): ShapeHandleSnapGeometry;
|
|
10
|
+
hitTest(shape: GeoShapeRecord, positionedPoint: Vec): boolean;
|
|
11
|
+
hitTestLineSegment(shape: GeoShapeRecord, input: ShapeLineSegmentHitTestInput): boolean;
|
|
12
|
+
resolveBindingPoint(shape: GeoShapeRecord, input: ShapeBindingPointInput): Vec;
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { StateNode, type Editor } from "../canvas-core/index";
|
|
2
|
+
import type { GeoShapeKind, GeoShapeProps } from "./types";
|
|
3
|
+
declare class BoxGeoTool extends StateNode {
|
|
4
|
+
private readonly geo;
|
|
5
|
+
constructor(editor: Editor, id: string, geo: GeoShapeKind);
|
|
6
|
+
getDefaultProps(): GeoShapeProps;
|
|
7
|
+
}
|
|
8
|
+
export declare class RectangleTool extends BoxGeoTool {
|
|
9
|
+
constructor(editor: Editor);
|
|
10
|
+
}
|
|
11
|
+
export declare class EllipseTool extends BoxGeoTool {
|
|
12
|
+
constructor(editor: Editor);
|
|
13
|
+
}
|
|
14
|
+
export declare class DiamondTool extends BoxGeoTool {
|
|
15
|
+
constructor(editor: Editor);
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { LandCanvasPlugin } from "../canvas-plugin-api/index";
|
|
2
|
+
import type { GeoShapeRecord } from "./types";
|
|
3
|
+
interface GeoShapeSvgProps {
|
|
4
|
+
shape: GeoShapeRecord;
|
|
5
|
+
fill?: string;
|
|
6
|
+
stroke?: string;
|
|
7
|
+
strokeWidth?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function createGeoCanvasPlugin(): LandCanvasPlugin;
|
|
10
|
+
export declare function GeoShapeSvg({ shape, fill, stroke, strokeWidth, }: GeoShapeSvgProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type LandCorePlugin, type ShapeSvgExporter, type SvgNode } from "../canvas-core/index";
|
|
2
|
+
import { type GeoShapeRecord } from "./types";
|
|
3
|
+
export declare class GeoShapeSvgExporter implements ShapeSvgExporter<GeoShapeRecord> {
|
|
4
|
+
readonly type: "geo";
|
|
5
|
+
toSvg(shape: GeoShapeRecord): SvgNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function createGeoCorePlugin(): LandCorePlugin;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type BaseRecord, type ShapeRecordBase } from "../canvas-core/index";
|
|
2
|
+
export type GeoShapeKind = "rectangle" | "ellipse" | "diamond";
|
|
3
|
+
export interface GeoShapeProps {
|
|
4
|
+
w: number;
|
|
5
|
+
h: number;
|
|
6
|
+
geo: GeoShapeKind;
|
|
7
|
+
fill: string;
|
|
8
|
+
stroke: string;
|
|
9
|
+
strokeWidth: number;
|
|
10
|
+
}
|
|
11
|
+
export interface GeoShapeRecord extends ShapeRecordBase<"geo", GeoShapeProps> {
|
|
12
|
+
type: "geo";
|
|
13
|
+
props: GeoShapeProps;
|
|
14
|
+
}
|
|
15
|
+
export declare function isGeoShapeRecord(record: BaseRecord | null | undefined): record is GeoShapeRecord;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Box, ShapeUtil, type Vec, type ShapeRecordBase } from "../canvas-core/index";
|
|
2
|
+
export interface GroupShapeProps {
|
|
3
|
+
w: number;
|
|
4
|
+
h: number;
|
|
5
|
+
}
|
|
6
|
+
export type GroupShapeRecord = ShapeRecordBase<"group", GroupShapeProps>;
|
|
7
|
+
export declare class GroupShapeUtil extends ShapeUtil<GroupShapeRecord> {
|
|
8
|
+
readonly type: "group";
|
|
9
|
+
getDefaultProps(): GroupShapeProps;
|
|
10
|
+
validateProps(props: unknown): GroupShapeProps;
|
|
11
|
+
getBounds(shape: GroupShapeRecord): Box;
|
|
12
|
+
hitTest(_shape: GroupShapeRecord, _positionedPoint: Vec): boolean;
|
|
13
|
+
shouldTransformDescendants(_shape: GroupShapeRecord): boolean;
|
|
14
|
+
canReceiveChildren(_shape: GroupShapeRecord): boolean;
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { LandCanvasPlugin } from "../canvas-plugin-api/index";
|
|
2
|
+
import type { GroupShapeRecord } from "./GroupShapeUtil";
|
|
3
|
+
interface GroupShapeSvgProps {
|
|
4
|
+
shape: GroupShapeRecord;
|
|
5
|
+
}
|
|
6
|
+
export declare function createGroupCanvasPlugin(): LandCanvasPlugin;
|
|
7
|
+
export declare function GroupShapeSvg({ shape, isSelected, }: GroupShapeSvgProps & {
|
|
8
|
+
isSelected?: boolean;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type LandCorePlugin, type ShapeSvgExporter, type SvgNode } from "../canvas-core/index";
|
|
2
|
+
import { type GroupShapeRecord } from "./GroupShapeUtil";
|
|
3
|
+
export declare class GroupShapeSvgExporter implements ShapeSvgExporter<GroupShapeRecord> {
|
|
4
|
+
readonly type: "group";
|
|
5
|
+
toSvg(_shape: GroupShapeRecord): SvgNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function createGroupCorePlugin(): LandCorePlugin;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Box, ShapeUtil, type ShapeSelectionHandleAnchorInput, type ShapeSelectionHandleAnchors } from "../canvas-core/index";
|
|
2
|
+
import type { ImageShapeProps, ImageShapeRecord } from "./types";
|
|
3
|
+
export declare class ImageShapeUtil extends ShapeUtil<ImageShapeRecord> {
|
|
4
|
+
readonly type: "image";
|
|
5
|
+
getDefaultProps(): ImageShapeProps;
|
|
6
|
+
validateProps(props: unknown): ImageShapeProps;
|
|
7
|
+
getBounds(shape: ImageShapeRecord): Box;
|
|
8
|
+
canEdit(_shape: ImageShapeRecord): boolean;
|
|
9
|
+
getSelectionHandleAnchors(shape: ImageShapeRecord, input: ShapeSelectionHandleAnchorInput): ShapeSelectionHandleAnchors;
|
|
10
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type LandCorePlugin, type ShapeSvgExporter, type SvgExportContext, type SvgNode, type ToolbarContext } from "../canvas-core/index";
|
|
2
|
+
import { type ImageShapeRecord } from "./types";
|
|
3
|
+
export declare const IMAGE_REPLACE_TOOLBAR_ACTION_ID = "image.replace";
|
|
4
|
+
export declare const IMAGE_DOWNLOAD_TOOLBAR_ACTION_ID = "image.download-original";
|
|
5
|
+
export declare const IMAGE_INSERT_TOOLBAR_ACTION_ID = "image.insert";
|
|
6
|
+
export declare const IMAGE_CROP_TOOLBAR_ACTION_ID = "image.crop";
|
|
7
|
+
export declare const IMAGE_CROP_DONE_TOOLBAR_ACTION_ID = "image.crop.done";
|
|
8
|
+
export declare const IMAGE_CROP_ZOOM_TOOLBAR_ACTION_ID = "image.crop.zoom";
|
|
9
|
+
export declare const IMAGE_CROP_ASPECT_RATIO_TOOLBAR_ACTION_ID = "image.crop.aspect-ratio";
|
|
10
|
+
export declare const IMAGE_CROP_RESET_TOOLBAR_ACTION_ID = "image.crop.reset";
|
|
11
|
+
export declare class ImageShapeSvgExporter implements ShapeSvgExporter<ImageShapeRecord> {
|
|
12
|
+
readonly type: "image";
|
|
13
|
+
toSvg(shape: ImageShapeRecord, context: SvgExportContext): SvgNode | null;
|
|
14
|
+
}
|
|
15
|
+
export declare function createImageCorePlugin(): LandCorePlugin;
|
|
16
|
+
export declare function isImageCropToolbarSession(context: ToolbarContext): boolean;
|