@yuzhouu/canvas-standard 0.1.6 → 0.1.7
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 +22 -5
- package/_vendor/plugin-draw/_vendor/canvas-core/editor/editor.d.ts +14 -1
- package/_vendor/plugin-draw/_vendor/canvas-core/editor/selection/selectionOverlay.d.ts +1 -0
- package/_vendor/plugin-draw/_vendor/canvas-core/editor/state/editorSignals.d.ts +3 -0
- package/_vendor/plugin-draw/_vendor/canvas-core/editor/viewport/cameraManager.d.ts +11 -0
- package/_vendor/plugin-draw/_vendor/canvas-core/index.d.ts +1 -1
- package/_vendor/plugin-draw/_vendor/canvas-react/host/ShapeHeadingControl.d.ts +1 -2
- package/_vendor/plugin-draw/_vendor/canvas-react/index.d.ts +1 -0
- package/_vendor/plugin-draw/api.d.ts +7 -3
- package/_vendor/plugin-draw/drawGeometry.d.ts +13 -5
- package/_vendor/plugin-draw/drawInputFilter.d.ts +25 -0
- package/_vendor/plugin-draw/drawPath.d.ts +0 -3
- package/_vendor/plugin-draw/drawShapeGeometry.d.ts +4 -2
- package/_vendor/plugin-draw/drawStrokeGeometry.d.ts +6 -14
- package/_vendor/plugin-draw/index.d.ts +1 -1
- package/_vendor/plugin-draw/types.d.ts +2 -0
- package/_vendor/plugin-eraser/_vendor/canvas-core/editor/editor.d.ts +14 -1
- package/_vendor/plugin-eraser/_vendor/canvas-core/editor/selection/selectionOverlay.d.ts +1 -0
- package/_vendor/plugin-eraser/_vendor/canvas-core/editor/state/editorSignals.d.ts +3 -0
- package/_vendor/plugin-eraser/_vendor/canvas-core/editor/viewport/cameraManager.d.ts +11 -0
- package/_vendor/plugin-eraser/_vendor/canvas-core/index.d.ts +1 -1
- package/_vendor/plugin-eraser/_vendor/canvas-react/host/ShapeHeadingControl.d.ts +1 -2
- package/_vendor/plugin-eraser/_vendor/canvas-react/index.d.ts +1 -0
- package/_vendor/plugin-flow/_vendor/canvas-core/editor/editor.d.ts +14 -1
- package/_vendor/plugin-flow/_vendor/canvas-core/editor/selection/selectionOverlay.d.ts +1 -0
- package/_vendor/plugin-flow/_vendor/canvas-core/editor/state/editorSignals.d.ts +3 -0
- package/_vendor/plugin-flow/_vendor/canvas-core/editor/viewport/cameraManager.d.ts +11 -0
- package/_vendor/plugin-flow/_vendor/canvas-core/index.d.ts +1 -1
- package/_vendor/plugin-flow/_vendor/canvas-react/host/ShapeHeadingControl.d.ts +1 -2
- package/_vendor/plugin-flow/_vendor/canvas-react/index.d.ts +1 -0
- package/_vendor/plugin-flow/_vendor/plugin-image/host/api.d.ts +9 -2
- package/_vendor/plugin-flow/_vendor/plugin-image/host/asset/imageAssetOperations.d.ts +3 -3
- package/_vendor/plugin-flow/_vendor/plugin-text/api.d.ts +26 -4
- package/_vendor/plugin-flow/_vendor/plugin-text/geoLabelApi.d.ts +6 -0
- package/_vendor/plugin-flow/_vendor/plugin-text/geoLabelBindingUtil.d.ts +2 -2
- package/_vendor/plugin-flow/_vendor/plugin-text/host/richTextRendering.d.ts +4 -0
- package/_vendor/plugin-flow/_vendor/plugin-text/host/useTextLabelLayout.d.ts +3 -0
- package/_vendor/plugin-flow/_vendor/plugin-text/index.d.ts +1 -1
- package/_vendor/plugin-flow/_vendor/plugin-text/richTextUtils.d.ts +2 -0
- package/_vendor/plugin-flow/_vendor/plugin-text/textFormatting.d.ts +1 -1
- package/_vendor/plugin-flow/_vendor/plugin-text/textLabelHelpers.d.ts +5 -1
- package/_vendor/plugin-flow/_vendor/plugin-text/textSearch.d.ts +1 -1
- package/_vendor/plugin-flow/_vendor/plugin-text/textStyle.d.ts +13 -2
- package/_vendor/plugin-flow/_vendor/plugin-text/textTasks.d.ts +11 -0
- package/_vendor/plugin-flow/_vendor/plugin-text/textTypes.d.ts +24 -1
- package/_vendor/plugin-flow/api.d.ts +20 -1
- package/_vendor/plugin-flow/editorRuntime.d.ts +1 -1
- package/_vendor/plugin-flow/flowEdgeBindingUtil.d.ts +0 -1
- package/_vendor/plugin-flow/flowEdgeInteraction.d.ts +1 -10
- package/_vendor/plugin-flow/flowEdgeModel.d.ts +1 -0
- package/_vendor/plugin-flow/flowEdgePrimitives.d.ts +1 -7
- package/_vendor/plugin-flow/flowEdgeRuntime.d.ts +15 -1
- package/_vendor/plugin-flow/flowPortInteraction.d.ts +15 -0
- package/_vendor/plugin-flow/index.d.ts +1 -1
- package/_vendor/plugin-flow/types.d.ts +1 -2
- package/_vendor/plugin-flow/xyflowEdgePaths.d.ts +19 -0
- package/_vendor/plugin-frame/_vendor/canvas-core/editor/editor.d.ts +14 -1
- package/_vendor/plugin-frame/_vendor/canvas-core/editor/selection/selectionOverlay.d.ts +1 -0
- package/_vendor/plugin-frame/_vendor/canvas-core/editor/state/editorSignals.d.ts +3 -0
- package/_vendor/plugin-frame/_vendor/canvas-core/editor/viewport/cameraManager.d.ts +11 -0
- package/_vendor/plugin-frame/_vendor/canvas-core/index.d.ts +1 -1
- package/_vendor/plugin-frame/_vendor/canvas-react/host/ShapeHeadingControl.d.ts +1 -2
- package/_vendor/plugin-frame/_vendor/canvas-react/index.d.ts +1 -0
- package/_vendor/plugin-frame/api.d.ts +9 -0
- package/_vendor/plugin-frame/frameCreationRuntime.d.ts +10 -0
- package/_vendor/plugin-frame/frameTool.d.ts +2 -0
- package/_vendor/plugin-frame/index.d.ts +1 -1
- package/_vendor/plugin-geo/GeoFillPattern.d.ts +7 -0
- package/_vendor/plugin-geo/_vendor/canvas-core/editor/editor.d.ts +14 -1
- package/_vendor/plugin-geo/_vendor/canvas-core/editor/selection/selectionOverlay.d.ts +1 -0
- package/_vendor/plugin-geo/_vendor/canvas-core/editor/state/editorSignals.d.ts +3 -0
- package/_vendor/plugin-geo/_vendor/canvas-core/editor/viewport/cameraManager.d.ts +11 -0
- package/_vendor/plugin-geo/_vendor/canvas-core/index.d.ts +1 -1
- package/_vendor/plugin-geo/_vendor/canvas-react/host/ShapeHeadingControl.d.ts +1 -2
- package/_vendor/plugin-geo/_vendor/canvas-react/index.d.ts +1 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/api.d.ts +74 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/canvasRender.d.ts +10 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/editorRichTextLinks.d.ts +7 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/editorRuntime.d.ts +5 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/feature.d.ts +10 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/geoLabelApi.d.ts +6 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/geoLabelBindingUtil.d.ts +54 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/host/RichTextEditingBox.d.ts +12 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/host/TiptapTextEditor.d.ts +29 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/host/blobDataUrl.d.ts +1 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/host/browserRichTextLink.d.ts +1 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/host/initialTextBackground.d.ts +2 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/host/richTextRendering.d.ts +21 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/host/textDomSelection.d.ts +7 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/host/textEditingBoxStyle.d.ts +4 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/host/textEntryFocus.d.ts +23 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/host/textFontLoader.d.ts +3 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/host/textFormattingApi.d.ts +16 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/host/textMeasurement.d.ts +29 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/host/textMeasurementSync.d.ts +11 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/host/textRangeSelection.d.ts +14 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/host/textShapeRendererRuntime.d.ts +12 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/host/textShapeSync.d.ts +19 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/host/textSvgAssetInliner.d.ts +3 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/host/textSvgExportPlugin.d.ts +5 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/host/tiptapTextEditorController.d.ts +38 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/host/useTextLabelLayout.d.ts +3 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/index.d.ts +21 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/pathLabelBindingUtil.d.ts +60 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/richTextLinks.d.ts +12 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/richTextUtils.d.ts +28 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/shapeWideTextFormatting.d.ts +18 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/textFonts.d.ts +49 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/textFormatting.d.ts +50 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/textFormattingSession.d.ts +6 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/textInteractions.d.ts +4 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/textLabelHelpers.d.ts +76 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/textLinkPopoverPresentation.d.ts +20 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/textSearch.d.ts +19 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/textShapeHelpers.d.ts +21 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/textShapeSvgExporter.d.ts +9 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/textShapeUtil.d.ts +24 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/textStyle.d.ts +30 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/textTasks.d.ts +11 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/textTool.d.ts +4 -0
- package/_vendor/plugin-geo/_vendor/plugin-text/textTypes.d.ts +53 -0
- package/_vendor/plugin-geo/api.d.ts +21 -1
- package/_vendor/plugin-geo/feature.d.ts +5 -0
- package/_vendor/plugin-geo/geoFill.d.ts +21 -0
- package/_vendor/plugin-geo/geoShadow.d.ts +2 -0
- package/_vendor/plugin-geo/geoShapeUtil.d.ts +2 -0
- package/_vendor/plugin-geo/index.d.ts +7 -4
- package/_vendor/plugin-geo/types.d.ts +5 -0
- package/_vendor/plugin-group/_vendor/canvas-core/editor/editor.d.ts +14 -1
- package/_vendor/plugin-group/_vendor/canvas-core/editor/selection/selectionOverlay.d.ts +1 -0
- package/_vendor/plugin-group/_vendor/canvas-core/editor/state/editorSignals.d.ts +3 -0
- package/_vendor/plugin-group/_vendor/canvas-core/editor/viewport/cameraManager.d.ts +11 -0
- package/_vendor/plugin-group/_vendor/canvas-core/index.d.ts +1 -1
- package/_vendor/plugin-group/_vendor/canvas-react/host/ShapeHeadingControl.d.ts +1 -2
- package/_vendor/plugin-group/_vendor/canvas-react/index.d.ts +1 -0
- package/_vendor/plugin-html/_vendor/canvas-core/editor/editor.d.ts +14 -1
- package/_vendor/plugin-html/_vendor/canvas-core/editor/selection/selectionOverlay.d.ts +1 -0
- package/_vendor/plugin-html/_vendor/canvas-core/editor/state/editorSignals.d.ts +3 -0
- package/_vendor/plugin-html/_vendor/canvas-core/editor/viewport/cameraManager.d.ts +11 -0
- package/_vendor/plugin-html/_vendor/canvas-core/index.d.ts +1 -1
- package/_vendor/plugin-html/_vendor/canvas-react/host/ShapeHeadingControl.d.ts +1 -2
- package/_vendor/plugin-html/_vendor/canvas-react/index.d.ts +1 -0
- package/_vendor/plugin-image/_vendor/canvas-core/editor/editor.d.ts +14 -1
- package/_vendor/plugin-image/_vendor/canvas-core/editor/selection/selectionOverlay.d.ts +1 -0
- package/_vendor/plugin-image/_vendor/canvas-core/editor/state/editorSignals.d.ts +3 -0
- package/_vendor/plugin-image/_vendor/canvas-core/editor/viewport/cameraManager.d.ts +11 -0
- package/_vendor/plugin-image/_vendor/canvas-core/index.d.ts +1 -1
- package/_vendor/plugin-image/_vendor/canvas-react/host/ShapeHeadingControl.d.ts +1 -2
- package/_vendor/plugin-image/_vendor/canvas-react/index.d.ts +1 -0
- package/_vendor/plugin-image/host/api.d.ts +9 -2
- package/_vendor/plugin-image/host/asset/imageAssetOperations.d.ts +3 -3
- package/_vendor/plugin-laser/_vendor/canvas-core/editor/editor.d.ts +14 -1
- package/_vendor/plugin-laser/_vendor/canvas-core/editor/selection/selectionOverlay.d.ts +1 -0
- package/_vendor/plugin-laser/_vendor/canvas-core/editor/state/editorSignals.d.ts +3 -0
- package/_vendor/plugin-laser/_vendor/canvas-core/editor/viewport/cameraManager.d.ts +11 -0
- package/_vendor/plugin-laser/_vendor/canvas-core/index.d.ts +1 -1
- package/_vendor/plugin-laser/_vendor/canvas-react/host/ShapeHeadingControl.d.ts +1 -2
- package/_vendor/plugin-laser/_vendor/canvas-react/index.d.ts +1 -0
- package/_vendor/plugin-path/_vendor/canvas-core/editor/editor.d.ts +14 -1
- package/_vendor/plugin-path/_vendor/canvas-core/editor/selection/selectionOverlay.d.ts +1 -0
- package/_vendor/plugin-path/_vendor/canvas-core/editor/state/editorSignals.d.ts +3 -0
- package/_vendor/plugin-path/_vendor/canvas-core/editor/viewport/cameraManager.d.ts +11 -0
- package/_vendor/plugin-path/_vendor/canvas-core/index.d.ts +1 -1
- package/_vendor/plugin-path/_vendor/canvas-react/host/ShapeHeadingControl.d.ts +1 -2
- package/_vendor/plugin-path/_vendor/canvas-react/index.d.ts +1 -0
- package/_vendor/plugin-runtime-clipboard/_vendor/canvas-core/editor/editor.d.ts +14 -1
- package/_vendor/plugin-runtime-clipboard/_vendor/canvas-core/editor/selection/selectionOverlay.d.ts +1 -0
- package/_vendor/plugin-runtime-clipboard/_vendor/canvas-core/editor/state/editorSignals.d.ts +3 -0
- package/_vendor/plugin-runtime-clipboard/_vendor/canvas-core/editor/viewport/cameraManager.d.ts +11 -0
- package/_vendor/plugin-runtime-clipboard/_vendor/canvas-core/index.d.ts +1 -1
- package/_vendor/plugin-runtime-clipboard/_vendor/canvas-react/host/ShapeHeadingControl.d.ts +1 -2
- package/_vendor/plugin-runtime-clipboard/_vendor/canvas-react/index.d.ts +1 -0
- package/_vendor/plugin-runtime-export/_vendor/canvas-core/editor/editor.d.ts +14 -1
- package/_vendor/plugin-runtime-export/_vendor/canvas-core/editor/selection/selectionOverlay.d.ts +1 -0
- package/_vendor/plugin-runtime-export/_vendor/canvas-core/editor/state/editorSignals.d.ts +3 -0
- package/_vendor/plugin-runtime-export/_vendor/canvas-core/editor/viewport/cameraManager.d.ts +11 -0
- package/_vendor/plugin-runtime-export/_vendor/canvas-core/index.d.ts +1 -1
- package/_vendor/plugin-runtime-export/_vendor/canvas-react/host/ShapeHeadingControl.d.ts +1 -2
- package/_vendor/plugin-runtime-export/_vendor/canvas-react/index.d.ts +1 -0
- package/_vendor/plugin-text/_vendor/canvas-core/editor/editor.d.ts +14 -1
- package/_vendor/plugin-text/_vendor/canvas-core/editor/selection/selectionOverlay.d.ts +1 -0
- package/_vendor/plugin-text/_vendor/canvas-core/editor/state/editorSignals.d.ts +3 -0
- package/_vendor/plugin-text/_vendor/canvas-core/editor/viewport/cameraManager.d.ts +11 -0
- package/_vendor/plugin-text/_vendor/canvas-core/index.d.ts +1 -1
- package/_vendor/plugin-text/_vendor/canvas-react/host/ShapeHeadingControl.d.ts +1 -2
- package/_vendor/plugin-text/_vendor/canvas-react/index.d.ts +1 -0
- package/_vendor/plugin-text/api.d.ts +26 -4
- package/_vendor/plugin-text/geoLabelApi.d.ts +6 -0
- package/_vendor/plugin-text/geoLabelBindingUtil.d.ts +2 -2
- package/_vendor/plugin-text/host/richTextRendering.d.ts +4 -0
- package/_vendor/plugin-text/host/useTextLabelLayout.d.ts +3 -0
- package/_vendor/plugin-text/index.d.ts +1 -1
- package/_vendor/plugin-text/richTextUtils.d.ts +2 -0
- package/_vendor/plugin-text/textFormatting.d.ts +1 -1
- package/_vendor/plugin-text/textLabelHelpers.d.ts +5 -1
- package/_vendor/plugin-text/textSearch.d.ts +1 -1
- package/_vendor/plugin-text/textStyle.d.ts +13 -2
- package/_vendor/plugin-text/textTasks.d.ts +11 -0
- package/_vendor/plugin-text/textTypes.d.ts +24 -1
- package/_vendor/plugin-video/_vendor/canvas-core/editor/editor.d.ts +14 -1
- package/_vendor/plugin-video/_vendor/canvas-core/editor/selection/selectionOverlay.d.ts +1 -0
- package/_vendor/plugin-video/_vendor/canvas-core/editor/state/editorSignals.d.ts +3 -0
- package/_vendor/plugin-video/_vendor/canvas-core/editor/viewport/cameraManager.d.ts +11 -0
- package/_vendor/plugin-video/_vendor/canvas-core/index.d.ts +1 -1
- package/_vendor/plugin-video/_vendor/canvas-react/host/ShapeHeadingControl.d.ts +1 -2
- package/_vendor/plugin-video/_vendor/canvas-react/index.d.ts +1 -0
- package/index.d.ts +0 -2
- package/index.mjs +67 -67
- package/package.json +3 -3
- package/_vendor/plugin-arrow/_vendor/canvas-core/bindings/bindingManager.d.ts +0 -34
- package/_vendor/plugin-arrow/_vendor/canvas-core/bindings/bindingUtil.d.ts +0 -76
- package/_vendor/plugin-arrow/_vendor/canvas-core/bindings/bindingUtilRegistry.d.ts +0 -8
- package/_vendor/plugin-arrow/_vendor/canvas-core/bindings/terminalBinding.d.ts +0 -28
- package/_vendor/plugin-arrow/_vendor/canvas-core/bindings/terminalPorts.d.ts +0 -67
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/clipboard.d.ts +0 -43
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/clipboardAssets.d.ts +0 -6
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/commands/assetCommands.d.ts +0 -7
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/commands/bindingCommands.d.ts +0 -14
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/commands/commandTypes.d.ts +0 -165
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/commands/commands.d.ts +0 -5
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/commands/documentCommands.d.ts +0 -9
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/commands/sessionCommands.d.ts +0 -13
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/commands/shapeCommands.d.ts +0 -9
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/commands/shapeFlags.d.ts +0 -10
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/commands/shapeRemoval.d.ts +0 -10
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/commands/shapeRepair.d.ts +0 -11
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/createEditor.d.ts +0 -6
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/editor.d.ts +0 -361
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/events/canvasNavigationInteraction.d.ts +0 -2
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/events/eventRouter.d.ts +0 -16
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/events/events.d.ts +0 -81
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/events/inputsManager.d.ts +0 -49
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/events/interactions.d.ts +0 -85
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/events/keyboardShortcuts.d.ts +0 -23
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/events/pointerClickRecognizer.d.ts +0 -11
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/history/historyManager.d.ts +0 -40
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/history/operationManager.d.ts +0 -77
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/internal.d.ts +0 -7
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/queries/bindingQueryCache.d.ts +0 -28
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/queries/bindingQueryState.d.ts +0 -11
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/queries/draftBindingIndex.d.ts +0 -19
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/queries/shapeGeometryQueryCache.d.ts +0 -34
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/queries/shapeTransforms.d.ts +0 -44
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/queries/shapeTreeIndex.d.ts +0 -27
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/queries/shapeTreeIndexState.d.ts +0 -11
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/queries/spatialIndexManager.d.ts +0 -34
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/records/documentSnapshots.d.ts +0 -14
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/records/editorRecordFactory.d.ts +0 -19
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/records/recordQueries.d.ts +0 -3
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/selection/resizeGeometry.d.ts +0 -117
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/selection/selection.d.ts +0 -223
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/selection/selectionBindingSegments.d.ts +0 -7
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/selection/selectionGeometry.d.ts +0 -28
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/selection/selectionHandleHitTest.d.ts +0 -8
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/selection/selectionLayout.d.ts +0 -20
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/selection/selectionOverlay.d.ts +0 -25
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/selection/selectionOverlayEquality.d.ts +0 -8
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/selection/selectionOverlayManager.d.ts +0 -34
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/selection/selectionResizeCapabilities.d.ts +0 -11
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/selection/selectionSet.d.ts +0 -9
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/selection/selectionTargets.d.ts +0 -10
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/selection/selectionTransforms.d.ts +0 -6
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/shapes/shapeContainment.d.ts +0 -14
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/shapes/shapeEditingManager.d.ts +0 -33
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/shapes/shapeExportTraversal.d.ts +0 -3
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/shapes/shapeGeometry.d.ts +0 -22
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/shapes/shapeGrouping.d.ts +0 -22
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/shapes/shapeOrder.d.ts +0 -32
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/shapes/shapeReparenting.d.ts +0 -21
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/shapes/shapeSignalManager.d.ts +0 -33
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/shapes/shapeTransformSpace.d.ts +0 -6
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/shapes/shapeTreeQueries.d.ts +0 -12
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/snapping/gapSnap.d.ts +0 -6
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/snapping/pointSnap.d.ts +0 -5
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/snapping/resizeSnap.d.ts +0 -11
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/snapping/snapDecision.d.ts +0 -2
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/snapping/snapGeometry.d.ts +0 -26
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/snapping/snapIndicators.d.ts +0 -22
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/snapping/snapManager.d.ts +0 -54
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/snapping/snapResults.d.ts +0 -58
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/snapping/snapSnapshotBuilder.d.ts +0 -22
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/snapping/snapTypes.d.ts +0 -114
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/state/editorReadModels.d.ts +0 -35
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/state/editorSignals.d.ts +0 -82
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/state/editorStateUtils.d.ts +0 -9
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/state/interactionTransientManager.d.ts +0 -35
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/viewport/camera.d.ts +0 -3
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/viewport/cameraManager.d.ts +0 -56
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/viewport/cameraPanSession.d.ts +0 -9
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/viewport/edgeScroll.d.ts +0 -5
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/viewport/renderWindow.d.ts +0 -30
- package/_vendor/plugin-arrow/_vendor/canvas-core/editor/viewport/renderWindowManager.d.ts +0 -33
- package/_vendor/plugin-arrow/_vendor/canvas-core/exports/integrity.d.ts +0 -32
- package/_vendor/plugin-arrow/_vendor/canvas-core/exports/svg.d.ts +0 -65
- package/_vendor/plugin-arrow/_vendor/canvas-core/geometry/box.d.ts +0 -20
- package/_vendor/plugin-arrow/_vendor/canvas-core/geometry/contentCutout.d.ts +0 -8
- package/_vendor/plugin-arrow/_vendor/canvas-core/geometry/ellipse2d.d.ts +0 -16
- package/_vendor/plugin-arrow/_vendor/canvas-core/geometry/geometry2d.d.ts +0 -15
- package/_vendor/plugin-arrow/_vendor/canvas-core/geometry/index.d.ts +0 -9
- package/_vendor/plugin-arrow/_vendor/canvas-core/geometry/mat.d.ts +0 -31
- package/_vendor/plugin-arrow/_vendor/canvas-core/geometry/polygon.d.ts +0 -7
- package/_vendor/plugin-arrow/_vendor/canvas-core/geometry/polyline2d.d.ts +0 -14
- package/_vendor/plugin-arrow/_vendor/canvas-core/geometry/rectangle2d.d.ts +0 -16
- package/_vendor/plugin-arrow/_vendor/canvas-core/geometry/segments.d.ts +0 -5
- package/_vendor/plugin-arrow/_vendor/canvas-core/geometry/vec.d.ts +0 -35
- package/_vendor/plugin-arrow/_vendor/canvas-core/index.d.ts +0 -68
- package/_vendor/plugin-arrow/_vendor/canvas-core/plugins/editorRuntimePlugin.d.ts +0 -24
- package/_vendor/plugin-arrow/_vendor/canvas-core/plugins/editorRuntimeRegistry.d.ts +0 -15
- package/_vendor/plugin-arrow/_vendor/canvas-core/plugins/index.d.ts +0 -2
- package/_vendor/plugin-arrow/_vendor/canvas-core/reactivity.d.ts +0 -8
- package/_vendor/plugin-arrow/_vendor/canvas-core/schema/records.d.ts +0 -121
- package/_vendor/plugin-arrow/_vendor/canvas-core/schema/snapshots.d.ts +0 -22
- package/_vendor/plugin-arrow/_vendor/canvas-core/shapes/childTransformPolicy.d.ts +0 -16
- package/_vendor/plugin-arrow/_vendor/canvas-core/shapes/colors.d.ts +0 -26
- package/_vendor/plugin-arrow/_vendor/canvas-core/shapes/shapeHeading.d.ts +0 -20
- package/_vendor/plugin-arrow/_vendor/canvas-core/shapes/shapeHitTestDecoration.d.ts +0 -16
- package/_vendor/plugin-arrow/_vendor/canvas-core/shapes/shapeUtil.d.ts +0 -249
- package/_vendor/plugin-arrow/_vendor/canvas-core/shapes/shapeUtilGeometry.d.ts +0 -6
- package/_vendor/plugin-arrow/_vendor/canvas-core/shapes/shapeUtilRegistry.d.ts +0 -9
- package/_vendor/plugin-arrow/_vendor/canvas-core/shapes/types.d.ts +0 -2
- package/_vendor/plugin-arrow/_vendor/canvas-core/tools/hand/handTool.d.ts +0 -5
- package/_vendor/plugin-arrow/_vendor/canvas-core/tools/select/selectContainment.d.ts +0 -12
- package/_vendor/plugin-arrow/_vendor/canvas-core/tools/select/selectTool.d.ts +0 -5
- package/_vendor/plugin-arrow/_vendor/canvas-core/tools/select/selectToolHelpers.d.ts +0 -170
- package/_vendor/plugin-arrow/_vendor/canvas-core/tools/select/states/brushingState.d.ts +0 -19
- package/_vendor/plugin-arrow/_vendor/canvas-core/tools/select/states/draggingPluginInteractionState.d.ts +0 -15
- package/_vendor/plugin-arrow/_vendor/canvas-core/tools/select/states/idleState.d.ts +0 -8
- package/_vendor/plugin-arrow/_vendor/canvas-core/tools/select/states/index.d.ts +0 -11
- package/_vendor/plugin-arrow/_vendor/canvas-core/tools/select/states/pointingCanvasState.d.ts +0 -11
- package/_vendor/plugin-arrow/_vendor/canvas-core/tools/select/states/pointingResizeHandleState.d.ts +0 -10
- package/_vendor/plugin-arrow/_vendor/canvas-core/tools/select/states/pointingRotateHandleState.d.ts +0 -10
- package/_vendor/plugin-arrow/_vendor/canvas-core/tools/select/states/pointingSelectionHandleInteractionState.d.ts +0 -11
- package/_vendor/plugin-arrow/_vendor/canvas-core/tools/select/states/pointingShapeState.d.ts +0 -12
- package/_vendor/plugin-arrow/_vendor/canvas-core/tools/select/states/resizingState.d.ts +0 -16
- package/_vendor/plugin-arrow/_vendor/canvas-core/tools/select/states/rotatingState.d.ts +0 -14
- package/_vendor/plugin-arrow/_vendor/canvas-core/tools/select/states/selectStateNode.d.ts +0 -60
- package/_vendor/plugin-arrow/_vendor/canvas-core/tools/select/states/translatingState.d.ts +0 -16
- package/_vendor/plugin-arrow/_vendor/canvas-core/tools/stateNode.d.ts +0 -30
- package/_vendor/plugin-arrow/_vendor/canvas-core/tools/toolManager.d.ts +0 -24
- package/_vendor/plugin-arrow/_vendor/canvas-core/utils/equality.d.ts +0 -9
- package/_vendor/plugin-arrow/_vendor/canvas-extension-contracts/contributions.d.ts +0 -92
- package/_vendor/plugin-arrow/_vendor/canvas-extension-contracts/index.d.ts +0 -6
- package/_vendor/plugin-arrow/_vendor/canvas-extension-contracts/operations.d.ts +0 -149
- package/_vendor/plugin-arrow/_vendor/canvas-extension-contracts/persistence.d.ts +0 -16
- package/_vendor/plugin-arrow/_vendor/canvas-extension-contracts/plugin.d.ts +0 -39
- package/_vendor/plugin-arrow/_vendor/canvas-extension-contracts/shape.d.ts +0 -5
- package/_vendor/plugin-arrow/_vendor/canvas-extension-contracts/tokens.d.ts +0 -12
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/CanvasView.d.ts +0 -7
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/DefaultGrid.d.ts +0 -1
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/OverlayLayer.d.ts +0 -1
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/PageSpace.d.ts +0 -6
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/ShapeLayer.d.ts +0 -1
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/canvasKeyboardEvents.d.ts +0 -13
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/index.d.ts +0 -3
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/overlays/BindingGuide.d.ts +0 -24
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/overlays/BindingPreviewOverlay.d.ts +0 -1
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/overlays/BrushBoxOverlay.d.ts +0 -1
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/overlays/OverlaySvgRoot.d.ts +0 -1
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/overlays/SelectionFrameOverlay.d.ts +0 -1
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/overlays/SelectionHandlesOverlay.d.ts +0 -1
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/overlays/SelectionOverlaySvg.d.ts +0 -1
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/overlays/SelectionPathOverlay.d.ts +0 -8
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/overlays/ShapeOutlineOverlay.d.ts +0 -8
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/overlays/SnapIndicatorsOverlay.d.ts +0 -1
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/overlays/TerminalBindingGuidesOverlay.d.ts +0 -1
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/shape-layer/ShapeClipStack.d.ts +0 -11
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/shape-layer/ShapeDecorations.d.ts +0 -1
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/shape-layer/ShapeForegroundItem.d.ts +0 -5
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/shape-layer/ShapeItem.d.ts +0 -5
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/shape-layer/ShapeRenderList.d.ts +0 -1
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/shape-layer/ShapeRenderer.d.ts +0 -12
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/shape-layer/shapeFrame.d.ts +0 -11
- package/_vendor/plugin-arrow/_vendor/canvas-react/components/useCanvasDomEvents.d.ts +0 -23
- package/_vendor/plugin-arrow/_vendor/canvas-react/contextMenuRequest.d.ts +0 -19
- package/_vendor/plugin-arrow/_vendor/canvas-react/dom.d.ts +0 -10
- package/_vendor/plugin-arrow/_vendor/canvas-react/hooks/useEditor.d.ts +0 -3
- package/_vendor/plugin-arrow/_vendor/canvas-react/hooks/useValue.d.ts +0 -2
- package/_vendor/plugin-arrow/_vendor/canvas-react/host/ShapeHeadingControl.d.ts +0 -35
- package/_vendor/plugin-arrow/_vendor/canvas-react/host/canvasRenderBindings.d.ts +0 -22
- package/_vendor/plugin-arrow/_vendor/canvas-react/host/canvasRenderBindingsContext.d.ts +0 -5
- package/_vendor/plugin-arrow/_vendor/canvas-react/host/canvasRenderPlugin.d.ts +0 -87
- package/_vendor/plugin-arrow/_vendor/canvas-react/host/index.d.ts +0 -7
- package/_vendor/plugin-arrow/_vendor/canvas-react/index.d.ts +0 -5
- package/_vendor/plugin-arrow/_vendor/signals/atom.d.ts +0 -11
- package/_vendor/plugin-arrow/_vendor/signals/computed.d.ts +0 -13
- package/_vendor/plugin-arrow/_vendor/signals/core.d.ts +0 -35
- package/_vendor/plugin-arrow/_vendor/signals/effect.d.ts +0 -5
- package/_vendor/plugin-arrow/_vendor/signals/index.d.ts +0 -8
- package/_vendor/plugin-arrow/_vendor/signals/types.d.ts +0 -22
- package/_vendor/plugin-arrow/_vendor/store/diff.d.ts +0 -9
- package/_vendor/plugin-arrow/_vendor/store/history.d.ts +0 -22
- package/_vendor/plugin-arrow/_vendor/store/index.d.ts +0 -5
- package/_vendor/plugin-arrow/_vendor/store/store.d.ts +0 -40
- package/_vendor/plugin-arrow/_vendor/store/types.d.ts +0 -27
- package/_vendor/plugin-arrow/api.d.ts +0 -54
- package/_vendor/plugin-arrow/arrowBindingAnchors.d.ts +0 -5
- package/_vendor/plugin-arrow/arrowBindingGeometry.d.ts +0 -28
- package/_vendor/plugin-arrow/arrowBindingTargets.d.ts +0 -3
- package/_vendor/plugin-arrow/arrowBindingUtil.d.ts +0 -30
- package/_vendor/plugin-arrow/arrowGeometry.d.ts +0 -77
- package/_vendor/plugin-arrow/arrowHeadGeometry.d.ts +0 -8
- package/_vendor/plugin-arrow/arrowShapeUtil.d.ts +0 -24
- package/_vendor/plugin-arrow/arrowStrokeStyle.d.ts +0 -2
- package/_vendor/plugin-arrow/arrowTerminalBindingResolver.d.ts +0 -20
- package/_vendor/plugin-arrow/arrowTerminalCommands.d.ts +0 -13
- package/_vendor/plugin-arrow/arrowTool.d.ts +0 -4
- package/_vendor/plugin-arrow/canvasRender.d.ts +0 -2
- package/_vendor/plugin-arrow/editorRuntime.d.ts +0 -7
- package/_vendor/plugin-arrow/feature.d.ts +0 -3
- package/_vendor/plugin-arrow/index.d.ts +0 -14
- package/_vendor/plugin-arrow/selectionHandleInteractions.d.ts +0 -3
- package/_vendor/plugin-arrow/types.d.ts +0 -37
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @yuzhouu/canvas-standard
|
|
2
2
|
|
|
3
|
-
The standard Land canvas aggregation. Connector and Packaging remain standalone opt-in plugins; the profile includes and reexports the other first-party plugins and returns matching plugin and minimal CanvasAction arrays for CanvasKit. Product React UI is owned by the consuming app.
|
|
3
|
+
The standard Land canvas aggregation. Arrow, Connector and Packaging remain standalone opt-in plugins; the profile includes and reexports the other first-party plugins and returns matching plugin and minimal CanvasAction arrays for CanvasKit. Product React UI is owned by the consuming app.
|
|
4
4
|
|
|
5
5
|
`createStandardCanvasKitProfile({ shortcutOverrides })` applies product-level
|
|
6
6
|
shortcut overrides while composing the profile. Omitted entries keep the
|
|
@@ -24,7 +24,7 @@ function StandardCanvas() {
|
|
|
24
24
|
}
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
Connector and Packaging must be installed and composed separately:
|
|
27
|
+
Arrow, Connector and Packaging must be installed and composed separately:
|
|
28
28
|
|
|
29
29
|
```tsx
|
|
30
30
|
import { Connector } from "@yuzhouu/plugin-connector";
|
|
@@ -60,6 +60,20 @@ import {
|
|
|
60
60
|
|
|
61
61
|
const flow = canvas.api(flowApiToken);
|
|
62
62
|
if (flow) {
|
|
63
|
+
const createdNode = flow.createNodeFromPort({
|
|
64
|
+
sourceShapeId,
|
|
65
|
+
kind: "text",
|
|
66
|
+
});
|
|
67
|
+
const createdConnection = flow.connections.connect({
|
|
68
|
+
sourceShapeId,
|
|
69
|
+
targetNodeId,
|
|
70
|
+
});
|
|
71
|
+
flow.connections.reconnect({
|
|
72
|
+
edgeId: createdConnection.edgeId,
|
|
73
|
+
terminal: "end",
|
|
74
|
+
shapeId: replacementTargetNodeId,
|
|
75
|
+
});
|
|
76
|
+
|
|
63
77
|
const connections = flow.connections.forNode(nodeId);
|
|
64
78
|
const unsubscribe = connections.subscribe(() => {
|
|
65
79
|
const { inputs, outputs } = connections.getSnapshot();
|
|
@@ -79,9 +93,12 @@ if (flow) {
|
|
|
79
93
|
```
|
|
80
94
|
|
|
81
95
|
`forNode()` accepts only subtype-marked Flow Text/Image nodes. Connection
|
|
82
|
-
snapshots expose stable edge IDs and source/target shape and port references
|
|
83
|
-
`
|
|
84
|
-
|
|
96
|
+
snapshots expose stable edge IDs and source/target shape and port references.
|
|
97
|
+
`connect()` creates a validated edge, `reconnect()` preserves its ID while
|
|
98
|
+
atomically replacing one endpoint, and `disconnect()` records an undoable edge
|
|
99
|
+
deletion. `createNodeFromPort()` owns the composite node measurement, placement,
|
|
100
|
+
edge, and Binding operation; standalone Flow nodes continue to use generic
|
|
101
|
+
`canvas.shapes` CRUD.
|
|
85
102
|
|
|
86
103
|
The HTML plugin is enabled by default. Pass `html: false` to omit sandboxed
|
|
87
104
|
HTML embeds from a profile.
|
|
@@ -33,7 +33,7 @@ import type { LayerOrderDirection, LayerOrderEdge, ShapeSelectionSiblingOrderSta
|
|
|
33
33
|
import type { ReparentShapePlacementInput, ReparentShapePlacementResult } from "./shapes/shapeReparenting";
|
|
34
34
|
import { SnapManager, type SnapDiagnostics } from "./snapping/snapManager";
|
|
35
35
|
import type { EditorRenderSignals, EditorStateSignals } from "./state/editorSignals";
|
|
36
|
-
import { type CameraAnimationScheduler } from "./viewport/cameraManager";
|
|
36
|
+
import { type CameraAnimationScheduler, type CameraLockPoint } from "./viewport/cameraManager";
|
|
37
37
|
export interface EditorOptions {
|
|
38
38
|
shapeUtils?: ShapeUtil[];
|
|
39
39
|
shapeSvgExporters?: ShapeSvgExporter[];
|
|
@@ -97,11 +97,13 @@ export declare class Editor {
|
|
|
97
97
|
private readonly _shapeDefaultPropsByTypeSignal;
|
|
98
98
|
private assetUrlResolver;
|
|
99
99
|
private readonly _readonlySignal;
|
|
100
|
+
private readonly _documentLockedSignal;
|
|
100
101
|
private writesClosed;
|
|
101
102
|
readonly document: {
|
|
102
103
|
readonly getMetadata: () => DocumentMetadataRecord | undefined;
|
|
103
104
|
readonly updateMetadata: (patch: Record<string, unknown>, source?: ChangeSource) => DocumentMetadataRecord;
|
|
104
105
|
readonly setReadonly: (readonly: boolean) => void;
|
|
106
|
+
readonly setLocked: (isLocked: boolean) => void;
|
|
105
107
|
};
|
|
106
108
|
readonly session: {
|
|
107
109
|
readonly get: () => SessionRecord;
|
|
@@ -293,6 +295,7 @@ export declare class Editor {
|
|
|
293
295
|
pageId?: PageId;
|
|
294
296
|
source?: ChangeSource;
|
|
295
297
|
}) => void;
|
|
298
|
+
readonly setLock: (pagePoint: CameraLockPoint | null) => boolean;
|
|
296
299
|
readonly pan: (delta: Vec, source?: ChangeSource) => void;
|
|
297
300
|
readonly zoomAtScreenPoint: (screenPoint: Vec, deltaY: number, source?: ChangeSource) => void;
|
|
298
301
|
readonly zoomToScreenPoint: (screenPoint: Vec, zoom: number, source?: ChangeSource) => void;
|
|
@@ -304,6 +307,15 @@ export declare class Editor {
|
|
|
304
307
|
}) => void;
|
|
305
308
|
readonly stopCameraAnimation: () => void;
|
|
306
309
|
readonly getCurrentPageBounds: (pageId?: PageId) => Box | null;
|
|
310
|
+
readonly centerOnPoint: (point: {
|
|
311
|
+
x: number;
|
|
312
|
+
y: number;
|
|
313
|
+
}, options?: {
|
|
314
|
+
source?: ChangeSource;
|
|
315
|
+
animation?: {
|
|
316
|
+
durationMs: number;
|
|
317
|
+
};
|
|
318
|
+
}) => boolean;
|
|
307
319
|
readonly centerOnShape: (shapeId: ShapeId, options?: CenterOnShapeOptions) => boolean;
|
|
308
320
|
readonly zoomToBounds: (bounds: Box, options?: {
|
|
309
321
|
padding?: number;
|
|
@@ -351,6 +363,7 @@ export declare class Editor {
|
|
|
351
363
|
};
|
|
352
364
|
constructor(options?: EditorOptions);
|
|
353
365
|
closeWrites(): void;
|
|
366
|
+
private setDocumentReadonlyFlag;
|
|
354
367
|
assertDocumentWriteAllowed(): void;
|
|
355
368
|
private assertStoreChangeAllowed;
|
|
356
369
|
private registerBuiltInInteractions;
|
|
@@ -4,6 +4,7 @@ import type { ShapeSelectionHandleAnchors, ShapeSelectionPathStyle } from "../..
|
|
|
4
4
|
import type { SelectionBindingMiddleHandle, SelectionBindingSegment, SelectionBindingTerminalHandle, SelectionCustomHandle, SelectionFrame, SelectionOverlayHandleAnchorsState, SelectionResizeHandle, SelectionResizeHandleId, SelectionRotateHandle } from "./selection";
|
|
5
5
|
export interface SelectedShapeOverlayItem {
|
|
6
6
|
id: ShapeId;
|
|
7
|
+
frameCorners: Vec[];
|
|
7
8
|
usesSelectionPathOverlay: boolean;
|
|
8
9
|
startPagePoint: Vec | null;
|
|
9
10
|
endPagePoint: Vec | null;
|
|
@@ -4,12 +4,14 @@ import type { Mat } from "../../geometry/mat";
|
|
|
4
4
|
import type { Vec } from "../../geometry/vec";
|
|
5
5
|
import type { Camera, PageId, PageRecord, SessionRecord, ShapeEditingEntryRequest, ShapeEditingSession, ShapeId, ShapeRecord } from "../../schema/records";
|
|
6
6
|
import type { HistoryState } from "../history/historyManager";
|
|
7
|
+
import type { CameraLock } from "../viewport/cameraManager";
|
|
7
8
|
import type { BindingPreviewState, SelectionBindingSegment, SelectionOverlayFrameGeometryState, SelectionOverlayFrameStyleState, SelectionOverlayHandleAnchorsState, SelectionOverlayHandlesState, SnapIndicatorState, TerminalBindingGuideState } from "../selection/selection";
|
|
8
9
|
import type { SelectedShapeOverlayItem } from "../selection/selectionOverlay";
|
|
9
10
|
import type { RenderItem } from "../viewport/renderWindow";
|
|
10
11
|
import type { EditorSelectionMetadata, EditorSelectionState, EditorShapeEditingState, EditorToolState, ShapeTreeSnapshotEntry } from "./editorReadModels";
|
|
11
12
|
export interface EditorStateSignals {
|
|
12
13
|
readonly readonly: Signal<boolean>;
|
|
14
|
+
readonly documentLocked: Signal<boolean>;
|
|
13
15
|
readonly session: Signal<SessionRecord>;
|
|
14
16
|
readonly pages: Signal<PageRecord[]>;
|
|
15
17
|
readonly currentPageId: Signal<PageId>;
|
|
@@ -31,6 +33,7 @@ export interface EditorStateSignals {
|
|
|
31
33
|
readonly selectionLocalBounds: Signal<Box | null>;
|
|
32
34
|
readonly selectionAnchorPagePoint: Signal<Vec | null>;
|
|
33
35
|
readonly camera: Signal<Camera>;
|
|
36
|
+
readonly cameraLock: Signal<CameraLock | null>;
|
|
34
37
|
readonly cameraZoom: Signal<number>;
|
|
35
38
|
readonly pageTransform: Signal<Mat>;
|
|
36
39
|
readonly viewportScreenSize: Signal<{
|
|
@@ -14,6 +14,14 @@ export interface CameraAnimationOptions {
|
|
|
14
14
|
pageId?: PageId;
|
|
15
15
|
source?: ChangeSource;
|
|
16
16
|
}
|
|
17
|
+
export interface CameraLockPoint {
|
|
18
|
+
readonly x: number;
|
|
19
|
+
readonly y: number;
|
|
20
|
+
}
|
|
21
|
+
export interface CameraLock {
|
|
22
|
+
readonly pageId: PageId;
|
|
23
|
+
readonly pagePoint: CameraLockPoint;
|
|
24
|
+
}
|
|
17
25
|
/**
|
|
18
26
|
* Camera and viewport-screen-size state for the editor. Owns the viewport size
|
|
19
27
|
* atom (viewport + camera together define the page<->screen transform) and the
|
|
@@ -29,6 +37,8 @@ export declare class CameraManager {
|
|
|
29
37
|
w: number;
|
|
30
38
|
h: number;
|
|
31
39
|
}>;
|
|
40
|
+
private readonly _cameraLockSignal;
|
|
41
|
+
readonly cameraLockSignal: Signal<CameraLock | null>;
|
|
32
42
|
private animationFrame;
|
|
33
43
|
private animationGeneration;
|
|
34
44
|
constructor(editor: Editor, animationScheduler?: CameraAnimationScheduler | undefined);
|
|
@@ -40,6 +50,7 @@ export declare class CameraManager {
|
|
|
40
50
|
pageId?: PageId;
|
|
41
51
|
source?: ChangeSource;
|
|
42
52
|
}): void;
|
|
53
|
+
setLock(pagePoint: CameraLockPoint | null): boolean;
|
|
43
54
|
animateCameraTo(target: Camera, options: CameraAnimationOptions): void;
|
|
44
55
|
cancelAnimation(): void;
|
|
45
56
|
dispose(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Editor, type CenterOnShapeOptions, } from "./editor/editor";
|
|
2
|
-
export type { CameraAnimationScheduler } from "./editor/viewport/cameraManager";
|
|
2
|
+
export type { CameraAnimationScheduler, CameraLock, CameraLockPoint, } from "./editor/viewport/cameraManager";
|
|
3
3
|
export { createEditor, type CreateEditorOptions, } from "./editor/createEditor";
|
|
4
4
|
export { HistoryManager, type HistoryScope, type HistoryState, } from "./editor/history/historyManager";
|
|
5
5
|
export { EditorOperationManager, type EditorCommit, type EditorOperation, type EditorOperationHistory, type EditorOperationOptions, } from "./editor/history/operationManager";
|
|
@@ -25,11 +25,10 @@ export interface ShapeHeadingControlProps<S extends ShapeRecordBase = ShapeRecor
|
|
|
25
25
|
readonly color?: string;
|
|
26
26
|
readonly offsetX?: number;
|
|
27
27
|
readonly editable?: boolean;
|
|
28
|
-
readonly showBackground?: boolean;
|
|
29
28
|
readonly showDragHandle?: boolean;
|
|
30
29
|
}
|
|
31
30
|
export declare function createShapeHeadingDomEventGuard({ id, selector, }: {
|
|
32
31
|
id: string;
|
|
33
32
|
selector: string;
|
|
34
33
|
}): CanvasDomEventGuard;
|
|
35
|
-
export declare function ShapeHeadingControl<S extends ShapeRecordBase>({ editor, shape, isEditing, value, fallback, bodyWidth, bodyHeight, renderHeight, operationKind, editAriaLabel, inputAriaLabel, dataUi, onValueChange, leading, color, offsetX, editable,
|
|
34
|
+
export declare function ShapeHeadingControl<S extends ShapeRecordBase>({ editor, shape, isEditing, value, fallback, bodyWidth, bodyHeight, renderHeight, operationKind, editAriaLabel, inputAriaLabel, dataUi, onValueChange, leading, color, offsetX, editable, showDragHandle, }: ShapeHeadingControlProps<S>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,3 +3,4 @@ export type { CanvasContextMenuRequest, CanvasContextMenuTarget, } from "./conte
|
|
|
3
3
|
export { CANVAS_SURFACE_DATA_UI, CANVAS_SURFACE_SELECTOR, forwardWheelEventToCanvasSurface, getCanvasSurfaceElement, getCanvasSurfaceElementForNode, getCanvasSurfacePagePoint, getCanvasSurfaceScreenPoint, getEditableEventTarget, isEditableEventTarget, } from "./dom";
|
|
4
4
|
export { useEditor, EditorContext } from "./hooks/useEditor";
|
|
5
5
|
export { useValue } from "./hooks/useValue";
|
|
6
|
+
export { BindingSegmentsOverlay } from "./components/overlays/SelectionPathOverlay";
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type DrawShapeProps } from "./types";
|
|
3
|
-
|
|
1
|
+
import { type Editor, type ShapeId } from "./_vendor/canvas-core/index";
|
|
2
|
+
import { type DrawShapeProps, type DrawBrush } from "./types";
|
|
3
|
+
type DrawBrushStyle = Pick<DrawShapeProps, "brush" | "fill" | "stroke" | "strokeWidth" | "isClosed">;
|
|
4
|
+
export type DrawStylePatch = Partial<DrawBrushStyle>;
|
|
4
5
|
export interface DrawApi {
|
|
5
6
|
getSelectionStyle(): DrawStylePatch | null;
|
|
6
7
|
setSelectionStyle(patch: DrawStylePatch): readonly ShapeId[];
|
|
7
8
|
getToolDefaults(): DrawShapeProps;
|
|
9
|
+
subscribeToolDefaults(listener: () => void): () => void;
|
|
10
|
+
getBrushDefaults(brush: DrawBrush): DrawBrushStyle;
|
|
8
11
|
setToolDefaults(patch: DrawStylePatch): DrawShapeProps;
|
|
9
12
|
}
|
|
10
13
|
export declare const drawApiToken: import("./_vendor/canvas-extension-contracts/index").CanvasApiToken<DrawApi>;
|
|
11
14
|
export declare function createDrawPluginApi({ editor, }: {
|
|
12
15
|
editor: Editor;
|
|
13
16
|
}): DrawApi;
|
|
17
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Box, Vec } from "./_vendor/canvas-core/index";
|
|
2
2
|
import { type DrawSelectionFlipInput, type DrawSelectionResizeInput } from "./drawSelectionTransform";
|
|
3
3
|
import { getDrawPointGeometry, getDrawSegmentGeometry, type DrawShapeGeometry, type DrawShapeSamplingStats } from "./drawShapeGeometry";
|
|
4
|
-
import type { DrawShapePoint, DrawShapeRecord, DrawShapeSegment } from "./types";
|
|
4
|
+
import type { DrawBrush, DrawShapePoint, DrawShapeRecord, DrawShapeSegment } from "./types";
|
|
5
5
|
export { getDrawPointGeometry, getDrawSegmentGeometry };
|
|
6
6
|
export type { DrawShapeGeometry, DrawShapeSamplingStats, } from "./drawShapeGeometry";
|
|
7
7
|
type DrawLocalGeometryCacheKey = Pick<DrawShapeRecord, "props">;
|
|
@@ -26,10 +26,18 @@ export interface NormalizedDrawShape {
|
|
|
26
26
|
sampling: DrawShapeSamplingStats;
|
|
27
27
|
}
|
|
28
28
|
export declare function getDrawShapeLocalGeometry(shape: DrawLocalGeometryCacheKey): DrawShapeGeometry;
|
|
29
|
-
export declare function normalizeDrawShapeFromSegmentSet(segments: readonly DrawShapeSegment[], strokeWidth: number, isPen?: boolean, isClosed?: boolean
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export declare function
|
|
29
|
+
export declare function normalizeDrawShapeFromSegmentSet(segments: readonly DrawShapeSegment[], strokeWidth: number, isPen?: boolean, isClosed?: boolean, options?: {
|
|
30
|
+
brush?: DrawBrush;
|
|
31
|
+
}): NormalizedDrawShape;
|
|
32
|
+
export declare function normalizeDrawShapeFromPointSet(points: readonly DrawShapePoint[], strokeWidth: number, isPen?: boolean, isClosed?: boolean, options?: {
|
|
33
|
+
brush?: DrawBrush;
|
|
34
|
+
}): NormalizedDrawShape;
|
|
35
|
+
export declare function normalizeDrawShapeFromPoints(pagePoints: readonly DrawShapePoint[], strokeWidth: number, isPen?: boolean, isClosed?: boolean, options?: {
|
|
36
|
+
brush?: DrawBrush;
|
|
37
|
+
}): NormalizedDrawShape;
|
|
38
|
+
export declare function normalizeDrawShapeFromSegments(pageSegments: readonly DrawShapeSegment[], strokeWidth: number, isPen?: boolean, isClosed?: boolean, options?: {
|
|
39
|
+
brush?: DrawBrush;
|
|
40
|
+
}): NormalizedDrawShape;
|
|
33
41
|
export declare function getDrawShapePositionedSegments(shape: Pick<DrawShapeRecord, "x" | "y" | "props">): DrawShapeSegment[];
|
|
34
42
|
export declare function getDrawShapePositionedPoints(shape: Pick<DrawShapeRecord, "x" | "y" | "props">): DrawShapePoint[];
|
|
35
43
|
export declare function getDrawShapePositionedGeometry(shape: DrawPositionedGeometryCacheKey): DrawShapeGeometry;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Vec } from "./_vendor/canvas-core/index";
|
|
2
|
+
interface DrawInputSample {
|
|
3
|
+
screenPoint: Vec;
|
|
4
|
+
timestamp: number;
|
|
5
|
+
pressure: number;
|
|
6
|
+
}
|
|
7
|
+
export declare class DrawInputFilter {
|
|
8
|
+
private previous;
|
|
9
|
+
private position;
|
|
10
|
+
private velocity;
|
|
11
|
+
private pressure;
|
|
12
|
+
private readonly maxLag;
|
|
13
|
+
constructor({ sample, isPen }: {
|
|
14
|
+
sample: DrawInputSample;
|
|
15
|
+
isPen: boolean;
|
|
16
|
+
});
|
|
17
|
+
update(sample: DrawInputSample, { straight, complete }?: {
|
|
18
|
+
straight?: boolean;
|
|
19
|
+
complete?: boolean;
|
|
20
|
+
}): {
|
|
21
|
+
screenPoint: Vec;
|
|
22
|
+
pressure: number;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { Vec } from "./_vendor/canvas-core/index";
|
|
2
2
|
import type { DrawShapePoint, DrawShapeSegment } from "./types";
|
|
3
3
|
export interface DrawPointSamplingOptions {
|
|
4
|
-
minPointDistance: number;
|
|
5
|
-
positionBlend: number;
|
|
6
|
-
pressureBlend: number;
|
|
7
4
|
maxPointCount: number;
|
|
8
5
|
}
|
|
9
6
|
export interface DrawInputPointGuardOptions {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Box, Vec } from "./_vendor/canvas-core/index";
|
|
2
|
-
import type { DrawShapePoint, DrawShapeSegment } from "./types";
|
|
2
|
+
import type { DrawBrush, DrawShapePoint, DrawShapeSegment } from "./types";
|
|
3
3
|
export interface DrawShapeSamplingStats {
|
|
4
4
|
rawPointCount: number;
|
|
5
5
|
sampledPointCount: number;
|
|
@@ -30,4 +30,6 @@ export declare function createDrawGeometryFromDerivedData({ segments, outlineVer
|
|
|
30
30
|
}): DrawShapeGeometry;
|
|
31
31
|
export declare function createTranslatedDrawGeometry(geometry: DrawShapeGeometry, strokeWidth: number, dx: number, dy: number, isClosed: boolean): DrawShapeGeometry;
|
|
32
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
|
|
33
|
+
export declare function getDrawSegmentGeometry(segments: readonly DrawShapeSegment[], strokeWidth: number, isPen?: boolean, isClosed?: boolean, { brush }?: {
|
|
34
|
+
brush?: DrawBrush;
|
|
35
|
+
}): DrawShapeGeometry;
|
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import { Vec } from "./_vendor/canvas-core/index";
|
|
2
2
|
import type { DrawShapePoint } from "./types";
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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;
|
|
3
|
+
export declare function getDrawStrokeOutline({ points, strokeWidth, isPen, isClosed, constantWidth, }: {
|
|
4
|
+
points: readonly DrawShapePoint[];
|
|
5
|
+
strokeWidth: number;
|
|
6
|
+
isPen: boolean;
|
|
7
|
+
isClosed: boolean;
|
|
8
|
+
constantWidth: boolean;
|
|
17
9
|
}): Vec[];
|
|
@@ -8,7 +8,7 @@ export { createDrawCanvasRenderPlugin } from "./canvasRender";
|
|
|
8
8
|
export { Draw } from "./feature";
|
|
9
9
|
export { flipDrawShapeInSelectionBounds, getDrawShapeDiagnostics, getDrawShapeParentSegments, getDrawShapeParentPoints, } from "./drawGeometry";
|
|
10
10
|
export { interpolateDrawShapeRecords } from "./drawInterpolation";
|
|
11
|
-
export type { DrawShapePoint, DrawShapeProps, DrawShapeRecord, DrawShapeSegment, } from "./types";
|
|
11
|
+
export type { DrawBrush, DrawShapePoint, DrawShapeProps, DrawShapeRecord, DrawShapeSegment, } from "./types";
|
|
12
12
|
export { isDrawShapeRecord } from "./types";
|
|
13
13
|
export type { DrawShapeDiagnostics, DrawShapeSamplingStats, } from "./drawGeometry";
|
|
14
14
|
export type { DrawShapeInterpolationOptions } from "./drawInterpolation";
|
|
@@ -8,7 +8,9 @@ export interface DrawShapePoint {
|
|
|
8
8
|
export interface DrawShapeSegment {
|
|
9
9
|
points: DrawShapePoint[];
|
|
10
10
|
}
|
|
11
|
+
export type DrawBrush = "pencil" | "highlighter";
|
|
11
12
|
export interface DrawShapeProps {
|
|
13
|
+
brush: DrawBrush;
|
|
12
14
|
segments: DrawShapeSegment[];
|
|
13
15
|
stroke: ShapeColor;
|
|
14
16
|
strokeWidth: number;
|
|
@@ -33,7 +33,7 @@ import type { LayerOrderDirection, LayerOrderEdge, ShapeSelectionSiblingOrderSta
|
|
|
33
33
|
import type { ReparentShapePlacementInput, ReparentShapePlacementResult } from "./shapes/shapeReparenting";
|
|
34
34
|
import { SnapManager, type SnapDiagnostics } from "./snapping/snapManager";
|
|
35
35
|
import type { EditorRenderSignals, EditorStateSignals } from "./state/editorSignals";
|
|
36
|
-
import { type CameraAnimationScheduler } from "./viewport/cameraManager";
|
|
36
|
+
import { type CameraAnimationScheduler, type CameraLockPoint } from "./viewport/cameraManager";
|
|
37
37
|
export interface EditorOptions {
|
|
38
38
|
shapeUtils?: ShapeUtil[];
|
|
39
39
|
shapeSvgExporters?: ShapeSvgExporter[];
|
|
@@ -97,11 +97,13 @@ export declare class Editor {
|
|
|
97
97
|
private readonly _shapeDefaultPropsByTypeSignal;
|
|
98
98
|
private assetUrlResolver;
|
|
99
99
|
private readonly _readonlySignal;
|
|
100
|
+
private readonly _documentLockedSignal;
|
|
100
101
|
private writesClosed;
|
|
101
102
|
readonly document: {
|
|
102
103
|
readonly getMetadata: () => DocumentMetadataRecord | undefined;
|
|
103
104
|
readonly updateMetadata: (patch: Record<string, unknown>, source?: ChangeSource) => DocumentMetadataRecord;
|
|
104
105
|
readonly setReadonly: (readonly: boolean) => void;
|
|
106
|
+
readonly setLocked: (isLocked: boolean) => void;
|
|
105
107
|
};
|
|
106
108
|
readonly session: {
|
|
107
109
|
readonly get: () => SessionRecord;
|
|
@@ -293,6 +295,7 @@ export declare class Editor {
|
|
|
293
295
|
pageId?: PageId;
|
|
294
296
|
source?: ChangeSource;
|
|
295
297
|
}) => void;
|
|
298
|
+
readonly setLock: (pagePoint: CameraLockPoint | null) => boolean;
|
|
296
299
|
readonly pan: (delta: Vec, source?: ChangeSource) => void;
|
|
297
300
|
readonly zoomAtScreenPoint: (screenPoint: Vec, deltaY: number, source?: ChangeSource) => void;
|
|
298
301
|
readonly zoomToScreenPoint: (screenPoint: Vec, zoom: number, source?: ChangeSource) => void;
|
|
@@ -304,6 +307,15 @@ export declare class Editor {
|
|
|
304
307
|
}) => void;
|
|
305
308
|
readonly stopCameraAnimation: () => void;
|
|
306
309
|
readonly getCurrentPageBounds: (pageId?: PageId) => Box | null;
|
|
310
|
+
readonly centerOnPoint: (point: {
|
|
311
|
+
x: number;
|
|
312
|
+
y: number;
|
|
313
|
+
}, options?: {
|
|
314
|
+
source?: ChangeSource;
|
|
315
|
+
animation?: {
|
|
316
|
+
durationMs: number;
|
|
317
|
+
};
|
|
318
|
+
}) => boolean;
|
|
307
319
|
readonly centerOnShape: (shapeId: ShapeId, options?: CenterOnShapeOptions) => boolean;
|
|
308
320
|
readonly zoomToBounds: (bounds: Box, options?: {
|
|
309
321
|
padding?: number;
|
|
@@ -351,6 +363,7 @@ export declare class Editor {
|
|
|
351
363
|
};
|
|
352
364
|
constructor(options?: EditorOptions);
|
|
353
365
|
closeWrites(): void;
|
|
366
|
+
private setDocumentReadonlyFlag;
|
|
354
367
|
assertDocumentWriteAllowed(): void;
|
|
355
368
|
private assertStoreChangeAllowed;
|
|
356
369
|
private registerBuiltInInteractions;
|
|
@@ -4,6 +4,7 @@ import type { ShapeSelectionHandleAnchors, ShapeSelectionPathStyle } from "../..
|
|
|
4
4
|
import type { SelectionBindingMiddleHandle, SelectionBindingSegment, SelectionBindingTerminalHandle, SelectionCustomHandle, SelectionFrame, SelectionOverlayHandleAnchorsState, SelectionResizeHandle, SelectionResizeHandleId, SelectionRotateHandle } from "./selection";
|
|
5
5
|
export interface SelectedShapeOverlayItem {
|
|
6
6
|
id: ShapeId;
|
|
7
|
+
frameCorners: Vec[];
|
|
7
8
|
usesSelectionPathOverlay: boolean;
|
|
8
9
|
startPagePoint: Vec | null;
|
|
9
10
|
endPagePoint: Vec | null;
|
|
@@ -4,12 +4,14 @@ import type { Mat } from "../../geometry/mat";
|
|
|
4
4
|
import type { Vec } from "../../geometry/vec";
|
|
5
5
|
import type { Camera, PageId, PageRecord, SessionRecord, ShapeEditingEntryRequest, ShapeEditingSession, ShapeId, ShapeRecord } from "../../schema/records";
|
|
6
6
|
import type { HistoryState } from "../history/historyManager";
|
|
7
|
+
import type { CameraLock } from "../viewport/cameraManager";
|
|
7
8
|
import type { BindingPreviewState, SelectionBindingSegment, SelectionOverlayFrameGeometryState, SelectionOverlayFrameStyleState, SelectionOverlayHandleAnchorsState, SelectionOverlayHandlesState, SnapIndicatorState, TerminalBindingGuideState } from "../selection/selection";
|
|
8
9
|
import type { SelectedShapeOverlayItem } from "../selection/selectionOverlay";
|
|
9
10
|
import type { RenderItem } from "../viewport/renderWindow";
|
|
10
11
|
import type { EditorSelectionMetadata, EditorSelectionState, EditorShapeEditingState, EditorToolState, ShapeTreeSnapshotEntry } from "./editorReadModels";
|
|
11
12
|
export interface EditorStateSignals {
|
|
12
13
|
readonly readonly: Signal<boolean>;
|
|
14
|
+
readonly documentLocked: Signal<boolean>;
|
|
13
15
|
readonly session: Signal<SessionRecord>;
|
|
14
16
|
readonly pages: Signal<PageRecord[]>;
|
|
15
17
|
readonly currentPageId: Signal<PageId>;
|
|
@@ -31,6 +33,7 @@ export interface EditorStateSignals {
|
|
|
31
33
|
readonly selectionLocalBounds: Signal<Box | null>;
|
|
32
34
|
readonly selectionAnchorPagePoint: Signal<Vec | null>;
|
|
33
35
|
readonly camera: Signal<Camera>;
|
|
36
|
+
readonly cameraLock: Signal<CameraLock | null>;
|
|
34
37
|
readonly cameraZoom: Signal<number>;
|
|
35
38
|
readonly pageTransform: Signal<Mat>;
|
|
36
39
|
readonly viewportScreenSize: Signal<{
|
|
@@ -14,6 +14,14 @@ export interface CameraAnimationOptions {
|
|
|
14
14
|
pageId?: PageId;
|
|
15
15
|
source?: ChangeSource;
|
|
16
16
|
}
|
|
17
|
+
export interface CameraLockPoint {
|
|
18
|
+
readonly x: number;
|
|
19
|
+
readonly y: number;
|
|
20
|
+
}
|
|
21
|
+
export interface CameraLock {
|
|
22
|
+
readonly pageId: PageId;
|
|
23
|
+
readonly pagePoint: CameraLockPoint;
|
|
24
|
+
}
|
|
17
25
|
/**
|
|
18
26
|
* Camera and viewport-screen-size state for the editor. Owns the viewport size
|
|
19
27
|
* atom (viewport + camera together define the page<->screen transform) and the
|
|
@@ -29,6 +37,8 @@ export declare class CameraManager {
|
|
|
29
37
|
w: number;
|
|
30
38
|
h: number;
|
|
31
39
|
}>;
|
|
40
|
+
private readonly _cameraLockSignal;
|
|
41
|
+
readonly cameraLockSignal: Signal<CameraLock | null>;
|
|
32
42
|
private animationFrame;
|
|
33
43
|
private animationGeneration;
|
|
34
44
|
constructor(editor: Editor, animationScheduler?: CameraAnimationScheduler | undefined);
|
|
@@ -40,6 +50,7 @@ export declare class CameraManager {
|
|
|
40
50
|
pageId?: PageId;
|
|
41
51
|
source?: ChangeSource;
|
|
42
52
|
}): void;
|
|
53
|
+
setLock(pagePoint: CameraLockPoint | null): boolean;
|
|
43
54
|
animateCameraTo(target: Camera, options: CameraAnimationOptions): void;
|
|
44
55
|
cancelAnimation(): void;
|
|
45
56
|
dispose(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Editor, type CenterOnShapeOptions, } from "./editor/editor";
|
|
2
|
-
export type { CameraAnimationScheduler } from "./editor/viewport/cameraManager";
|
|
2
|
+
export type { CameraAnimationScheduler, CameraLock, CameraLockPoint, } from "./editor/viewport/cameraManager";
|
|
3
3
|
export { createEditor, type CreateEditorOptions, } from "./editor/createEditor";
|
|
4
4
|
export { HistoryManager, type HistoryScope, type HistoryState, } from "./editor/history/historyManager";
|
|
5
5
|
export { EditorOperationManager, type EditorCommit, type EditorOperation, type EditorOperationHistory, type EditorOperationOptions, } from "./editor/history/operationManager";
|
|
@@ -25,11 +25,10 @@ export interface ShapeHeadingControlProps<S extends ShapeRecordBase = ShapeRecor
|
|
|
25
25
|
readonly color?: string;
|
|
26
26
|
readonly offsetX?: number;
|
|
27
27
|
readonly editable?: boolean;
|
|
28
|
-
readonly showBackground?: boolean;
|
|
29
28
|
readonly showDragHandle?: boolean;
|
|
30
29
|
}
|
|
31
30
|
export declare function createShapeHeadingDomEventGuard({ id, selector, }: {
|
|
32
31
|
id: string;
|
|
33
32
|
selector: string;
|
|
34
33
|
}): CanvasDomEventGuard;
|
|
35
|
-
export declare function ShapeHeadingControl<S extends ShapeRecordBase>({ editor, shape, isEditing, value, fallback, bodyWidth, bodyHeight, renderHeight, operationKind, editAriaLabel, inputAriaLabel, dataUi, onValueChange, leading, color, offsetX, editable,
|
|
34
|
+
export declare function ShapeHeadingControl<S extends ShapeRecordBase>({ editor, shape, isEditing, value, fallback, bodyWidth, bodyHeight, renderHeight, operationKind, editAriaLabel, inputAriaLabel, dataUi, onValueChange, leading, color, offsetX, editable, showDragHandle, }: ShapeHeadingControlProps<S>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,3 +3,4 @@ export type { CanvasContextMenuRequest, CanvasContextMenuTarget, } from "./conte
|
|
|
3
3
|
export { CANVAS_SURFACE_DATA_UI, CANVAS_SURFACE_SELECTOR, forwardWheelEventToCanvasSurface, getCanvasSurfaceElement, getCanvasSurfaceElementForNode, getCanvasSurfacePagePoint, getCanvasSurfaceScreenPoint, getEditableEventTarget, isEditableEventTarget, } from "./dom";
|
|
4
4
|
export { useEditor, EditorContext } from "./hooks/useEditor";
|
|
5
5
|
export { useValue } from "./hooks/useValue";
|
|
6
|
+
export { BindingSegmentsOverlay } from "./components/overlays/SelectionPathOverlay";
|
|
@@ -33,7 +33,7 @@ import type { LayerOrderDirection, LayerOrderEdge, ShapeSelectionSiblingOrderSta
|
|
|
33
33
|
import type { ReparentShapePlacementInput, ReparentShapePlacementResult } from "./shapes/shapeReparenting";
|
|
34
34
|
import { SnapManager, type SnapDiagnostics } from "./snapping/snapManager";
|
|
35
35
|
import type { EditorRenderSignals, EditorStateSignals } from "./state/editorSignals";
|
|
36
|
-
import { type CameraAnimationScheduler } from "./viewport/cameraManager";
|
|
36
|
+
import { type CameraAnimationScheduler, type CameraLockPoint } from "./viewport/cameraManager";
|
|
37
37
|
export interface EditorOptions {
|
|
38
38
|
shapeUtils?: ShapeUtil[];
|
|
39
39
|
shapeSvgExporters?: ShapeSvgExporter[];
|
|
@@ -97,11 +97,13 @@ export declare class Editor {
|
|
|
97
97
|
private readonly _shapeDefaultPropsByTypeSignal;
|
|
98
98
|
private assetUrlResolver;
|
|
99
99
|
private readonly _readonlySignal;
|
|
100
|
+
private readonly _documentLockedSignal;
|
|
100
101
|
private writesClosed;
|
|
101
102
|
readonly document: {
|
|
102
103
|
readonly getMetadata: () => DocumentMetadataRecord | undefined;
|
|
103
104
|
readonly updateMetadata: (patch: Record<string, unknown>, source?: ChangeSource) => DocumentMetadataRecord;
|
|
104
105
|
readonly setReadonly: (readonly: boolean) => void;
|
|
106
|
+
readonly setLocked: (isLocked: boolean) => void;
|
|
105
107
|
};
|
|
106
108
|
readonly session: {
|
|
107
109
|
readonly get: () => SessionRecord;
|
|
@@ -293,6 +295,7 @@ export declare class Editor {
|
|
|
293
295
|
pageId?: PageId;
|
|
294
296
|
source?: ChangeSource;
|
|
295
297
|
}) => void;
|
|
298
|
+
readonly setLock: (pagePoint: CameraLockPoint | null) => boolean;
|
|
296
299
|
readonly pan: (delta: Vec, source?: ChangeSource) => void;
|
|
297
300
|
readonly zoomAtScreenPoint: (screenPoint: Vec, deltaY: number, source?: ChangeSource) => void;
|
|
298
301
|
readonly zoomToScreenPoint: (screenPoint: Vec, zoom: number, source?: ChangeSource) => void;
|
|
@@ -304,6 +307,15 @@ export declare class Editor {
|
|
|
304
307
|
}) => void;
|
|
305
308
|
readonly stopCameraAnimation: () => void;
|
|
306
309
|
readonly getCurrentPageBounds: (pageId?: PageId) => Box | null;
|
|
310
|
+
readonly centerOnPoint: (point: {
|
|
311
|
+
x: number;
|
|
312
|
+
y: number;
|
|
313
|
+
}, options?: {
|
|
314
|
+
source?: ChangeSource;
|
|
315
|
+
animation?: {
|
|
316
|
+
durationMs: number;
|
|
317
|
+
};
|
|
318
|
+
}) => boolean;
|
|
307
319
|
readonly centerOnShape: (shapeId: ShapeId, options?: CenterOnShapeOptions) => boolean;
|
|
308
320
|
readonly zoomToBounds: (bounds: Box, options?: {
|
|
309
321
|
padding?: number;
|
|
@@ -351,6 +363,7 @@ export declare class Editor {
|
|
|
351
363
|
};
|
|
352
364
|
constructor(options?: EditorOptions);
|
|
353
365
|
closeWrites(): void;
|
|
366
|
+
private setDocumentReadonlyFlag;
|
|
354
367
|
assertDocumentWriteAllowed(): void;
|
|
355
368
|
private assertStoreChangeAllowed;
|
|
356
369
|
private registerBuiltInInteractions;
|
|
@@ -4,6 +4,7 @@ import type { ShapeSelectionHandleAnchors, ShapeSelectionPathStyle } from "../..
|
|
|
4
4
|
import type { SelectionBindingMiddleHandle, SelectionBindingSegment, SelectionBindingTerminalHandle, SelectionCustomHandle, SelectionFrame, SelectionOverlayHandleAnchorsState, SelectionResizeHandle, SelectionResizeHandleId, SelectionRotateHandle } from "./selection";
|
|
5
5
|
export interface SelectedShapeOverlayItem {
|
|
6
6
|
id: ShapeId;
|
|
7
|
+
frameCorners: Vec[];
|
|
7
8
|
usesSelectionPathOverlay: boolean;
|
|
8
9
|
startPagePoint: Vec | null;
|
|
9
10
|
endPagePoint: Vec | null;
|
|
@@ -4,12 +4,14 @@ import type { Mat } from "../../geometry/mat";
|
|
|
4
4
|
import type { Vec } from "../../geometry/vec";
|
|
5
5
|
import type { Camera, PageId, PageRecord, SessionRecord, ShapeEditingEntryRequest, ShapeEditingSession, ShapeId, ShapeRecord } from "../../schema/records";
|
|
6
6
|
import type { HistoryState } from "../history/historyManager";
|
|
7
|
+
import type { CameraLock } from "../viewport/cameraManager";
|
|
7
8
|
import type { BindingPreviewState, SelectionBindingSegment, SelectionOverlayFrameGeometryState, SelectionOverlayFrameStyleState, SelectionOverlayHandleAnchorsState, SelectionOverlayHandlesState, SnapIndicatorState, TerminalBindingGuideState } from "../selection/selection";
|
|
8
9
|
import type { SelectedShapeOverlayItem } from "../selection/selectionOverlay";
|
|
9
10
|
import type { RenderItem } from "../viewport/renderWindow";
|
|
10
11
|
import type { EditorSelectionMetadata, EditorSelectionState, EditorShapeEditingState, EditorToolState, ShapeTreeSnapshotEntry } from "./editorReadModels";
|
|
11
12
|
export interface EditorStateSignals {
|
|
12
13
|
readonly readonly: Signal<boolean>;
|
|
14
|
+
readonly documentLocked: Signal<boolean>;
|
|
13
15
|
readonly session: Signal<SessionRecord>;
|
|
14
16
|
readonly pages: Signal<PageRecord[]>;
|
|
15
17
|
readonly currentPageId: Signal<PageId>;
|
|
@@ -31,6 +33,7 @@ export interface EditorStateSignals {
|
|
|
31
33
|
readonly selectionLocalBounds: Signal<Box | null>;
|
|
32
34
|
readonly selectionAnchorPagePoint: Signal<Vec | null>;
|
|
33
35
|
readonly camera: Signal<Camera>;
|
|
36
|
+
readonly cameraLock: Signal<CameraLock | null>;
|
|
34
37
|
readonly cameraZoom: Signal<number>;
|
|
35
38
|
readonly pageTransform: Signal<Mat>;
|
|
36
39
|
readonly viewportScreenSize: Signal<{
|
|
@@ -14,6 +14,14 @@ export interface CameraAnimationOptions {
|
|
|
14
14
|
pageId?: PageId;
|
|
15
15
|
source?: ChangeSource;
|
|
16
16
|
}
|
|
17
|
+
export interface CameraLockPoint {
|
|
18
|
+
readonly x: number;
|
|
19
|
+
readonly y: number;
|
|
20
|
+
}
|
|
21
|
+
export interface CameraLock {
|
|
22
|
+
readonly pageId: PageId;
|
|
23
|
+
readonly pagePoint: CameraLockPoint;
|
|
24
|
+
}
|
|
17
25
|
/**
|
|
18
26
|
* Camera and viewport-screen-size state for the editor. Owns the viewport size
|
|
19
27
|
* atom (viewport + camera together define the page<->screen transform) and the
|
|
@@ -29,6 +37,8 @@ export declare class CameraManager {
|
|
|
29
37
|
w: number;
|
|
30
38
|
h: number;
|
|
31
39
|
}>;
|
|
40
|
+
private readonly _cameraLockSignal;
|
|
41
|
+
readonly cameraLockSignal: Signal<CameraLock | null>;
|
|
32
42
|
private animationFrame;
|
|
33
43
|
private animationGeneration;
|
|
34
44
|
constructor(editor: Editor, animationScheduler?: CameraAnimationScheduler | undefined);
|
|
@@ -40,6 +50,7 @@ export declare class CameraManager {
|
|
|
40
50
|
pageId?: PageId;
|
|
41
51
|
source?: ChangeSource;
|
|
42
52
|
}): void;
|
|
53
|
+
setLock(pagePoint: CameraLockPoint | null): boolean;
|
|
43
54
|
animateCameraTo(target: Camera, options: CameraAnimationOptions): void;
|
|
44
55
|
cancelAnimation(): void;
|
|
45
56
|
dispose(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Editor, type CenterOnShapeOptions, } from "./editor/editor";
|
|
2
|
-
export type { CameraAnimationScheduler } from "./editor/viewport/cameraManager";
|
|
2
|
+
export type { CameraAnimationScheduler, CameraLock, CameraLockPoint, } from "./editor/viewport/cameraManager";
|
|
3
3
|
export { createEditor, type CreateEditorOptions, } from "./editor/createEditor";
|
|
4
4
|
export { HistoryManager, type HistoryScope, type HistoryState, } from "./editor/history/historyManager";
|
|
5
5
|
export { EditorOperationManager, type EditorCommit, type EditorOperation, type EditorOperationHistory, type EditorOperationOptions, } from "./editor/history/operationManager";
|