@yuzhouu/canvas-kit 0.1.13 → 0.1.15
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 +52 -264
- package/_vendor/canvas-core/bindings/bindingManager.d.ts +33 -0
- package/_vendor/canvas-core/bindings/bindingUtil.d.ts +7 -7
- package/_vendor/canvas-core/bindings/terminalBinding.d.ts +1 -1
- package/_vendor/canvas-core/editor/clipboardAssets.d.ts +6 -0
- package/_vendor/canvas-core/editor/commands/assetCommands.d.ts +7 -0
- package/_vendor/canvas-core/editor/commands/bindingCommands.d.ts +12 -0
- package/_vendor/canvas-core/editor/{commands.d.ts → commands/commandTypes.d.ts} +4 -6
- package/_vendor/canvas-core/editor/commands/commands.d.ts +5 -0
- package/_vendor/canvas-core/editor/commands/documentCommands.d.ts +9 -0
- package/_vendor/canvas-core/editor/commands/sessionCommands.d.ts +13 -0
- package/_vendor/canvas-core/editor/commands/shapeCommands.d.ts +9 -0
- package/_vendor/canvas-core/editor/commands/shapeFlags.d.ts +10 -0
- package/_vendor/canvas-core/editor/commands/shapeRemoval.d.ts +10 -0
- package/_vendor/canvas-core/editor/commands/shapeRepair.d.ts +11 -0
- package/_vendor/canvas-core/editor/createEditor.d.ts +6 -0
- package/_vendor/canvas-core/editor/editor.d.ts +310 -538
- package/_vendor/canvas-core/editor/events/canvasNavigationInteraction.d.ts +2 -0
- package/_vendor/canvas-core/editor/events/eventRouter.d.ts +16 -0
- package/_vendor/canvas-core/editor/{events.d.ts → events/events.d.ts} +18 -8
- package/_vendor/canvas-core/editor/{managers → events}/inputsManager.d.ts +6 -4
- package/_vendor/canvas-core/editor/{interactions.d.ts → events/interactions.d.ts} +12 -12
- package/_vendor/canvas-core/editor/events/keyboardShortcuts.d.ts +23 -0
- package/_vendor/canvas-core/editor/events/pointerClickRecognizer.d.ts +11 -0
- package/_vendor/canvas-core/editor/history/historyManager.d.ts +40 -0
- package/_vendor/canvas-core/editor/{operationManager.d.ts → history/operationManager.d.ts} +21 -18
- package/_vendor/canvas-core/editor/queries/bindingQueryCache.d.ts +28 -0
- package/_vendor/canvas-core/editor/queries/bindingQueryState.d.ts +11 -0
- package/_vendor/canvas-core/editor/queries/draftBindingIndex.d.ts +19 -0
- package/_vendor/canvas-core/editor/queries/shapeGeometryQueryCache.d.ts +34 -0
- package/_vendor/canvas-core/editor/queries/shapeTransforms.d.ts +13 -15
- package/_vendor/canvas-core/editor/queries/shapeTreeIndex.d.ts +27 -0
- package/_vendor/canvas-core/editor/queries/shapeTreeIndexState.d.ts +11 -0
- package/_vendor/canvas-core/editor/{managers → queries}/spatialIndexManager.d.ts +5 -3
- package/_vendor/canvas-core/editor/records/documentSnapshots.d.ts +14 -0
- package/_vendor/canvas-core/editor/records/editorRecordFactory.d.ts +19 -0
- package/_vendor/canvas-core/editor/records/recordQueries.d.ts +3 -0
- package/_vendor/canvas-core/editor/{resizeGeometry.d.ts → selection/resizeGeometry.d.ts} +2 -2
- package/_vendor/canvas-core/editor/{selection.d.ts → selection/selection.d.ts} +4 -30
- package/_vendor/canvas-core/editor/{managers → selection}/selectionGeometry.d.ts +2 -2
- package/_vendor/canvas-core/editor/selection/selectionHandleHitTest.d.ts +8 -0
- package/_vendor/canvas-core/editor/selection/selectionLayout.d.ts +20 -0
- package/_vendor/canvas-core/editor/selection/selectionOverlay.d.ts +25 -0
- package/_vendor/canvas-core/editor/selection/selectionOverlayEquality.d.ts +8 -0
- package/_vendor/canvas-core/editor/selection/selectionOverlayManager.d.ts +34 -0
- package/_vendor/canvas-core/editor/{selectionResizeCapabilities.d.ts → selection/selectionResizeCapabilities.d.ts} +2 -2
- package/_vendor/canvas-core/editor/selection/selectionSet.d.ts +9 -0
- package/_vendor/canvas-core/editor/selection/selectionTargets.d.ts +10 -0
- package/_vendor/canvas-core/editor/selection/selectionTransforms.d.ts +6 -0
- package/_vendor/canvas-core/editor/shapes/shapeContainment.d.ts +14 -0
- package/_vendor/canvas-core/editor/{managers → shapes}/shapeEditingManager.d.ts +2 -2
- package/_vendor/canvas-core/editor/shapes/shapeExportTraversal.d.ts +3 -0
- package/_vendor/canvas-core/editor/shapes/shapeGeometry.d.ts +22 -0
- package/_vendor/canvas-core/editor/shapes/shapeGrouping.d.ts +22 -0
- package/_vendor/canvas-core/editor/{managers → shapes}/shapeOrder.d.ts +20 -2
- package/_vendor/canvas-core/editor/shapes/shapeReparenting.d.ts +21 -0
- package/_vendor/canvas-core/editor/shapes/shapeSignalManager.d.ts +33 -0
- package/_vendor/canvas-core/editor/{shapeTransformSpace.d.ts → shapes/shapeTransformSpace.d.ts} +3 -3
- package/_vendor/canvas-core/editor/shapes/shapeTreeQueries.d.ts +12 -0
- package/_vendor/canvas-core/editor/snapping/gapSnap.d.ts +6 -0
- package/_vendor/canvas-core/editor/snapping/pointSnap.d.ts +5 -0
- package/_vendor/canvas-core/editor/snapping/resizeSnap.d.ts +11 -0
- package/_vendor/canvas-core/editor/snapping/snapDecision.d.ts +2 -0
- package/_vendor/canvas-core/editor/{managers → snapping}/snapGeometry.d.ts +0 -1
- package/_vendor/canvas-core/editor/{managers → snapping}/snapIndicators.d.ts +2 -2
- package/_vendor/canvas-core/editor/{managers → snapping}/snapManager.d.ts +23 -5
- package/_vendor/canvas-core/editor/{managers/snapCalculations.d.ts → snapping/snapResults.d.ts} +2 -17
- package/_vendor/canvas-core/editor/{managers → snapping}/snapTypes.d.ts +1 -1
- package/_vendor/canvas-core/editor/state/editorReadModels.d.ts +34 -0
- package/_vendor/canvas-core/editor/state/editorSignals.d.ts +82 -0
- package/_vendor/canvas-core/editor/state/editorStateUtils.d.ts +9 -0
- package/_vendor/canvas-core/editor/{managers → state}/interactionTransientManager.d.ts +4 -4
- package/_vendor/canvas-core/editor/{managers → viewport}/cameraManager.d.ts +21 -4
- package/_vendor/canvas-core/editor/{cameraPanSession.d.ts → viewport/cameraPanSession.d.ts} +3 -3
- package/_vendor/canvas-core/editor/{edgeScroll.d.ts → viewport/edgeScroll.d.ts} +1 -1
- package/_vendor/canvas-core/editor/{renderWindow.d.ts → viewport/renderWindow.d.ts} +8 -8
- package/_vendor/canvas-core/editor/{managers → viewport}/renderWindowManager.d.ts +14 -6
- package/_vendor/canvas-core/geometry/box.d.ts +1 -0
- package/_vendor/canvas-core/index.d.ts +30 -25
- package/_vendor/canvas-core/plugins/editorRuntimePlugin.d.ts +2 -5
- package/_vendor/canvas-core/plugins/editorRuntimeRegistry.d.ts +0 -4
- package/_vendor/canvas-core/plugins/index.d.ts +1 -1
- package/_vendor/canvas-core/reactivity.d.ts +2 -0
- package/_vendor/canvas-core/schema/records.d.ts +1 -1
- package/_vendor/canvas-core/shapes/shapeUtil.d.ts +6 -5
- package/_vendor/canvas-core/shapes/shapeUtilGeometry.d.ts +6 -0
- package/_vendor/canvas-core/tools/hand/handTool.d.ts +1 -1
- package/_vendor/canvas-core/tools/select/selectTool.d.ts +1 -1
- package/_vendor/canvas-core/tools/select/selectToolHelpers.d.ts +11 -12
- package/_vendor/canvas-core/tools/select/states/brushingState.d.ts +2 -2
- package/_vendor/canvas-core/tools/select/states/draggingPluginInteractionState.d.ts +2 -3
- package/_vendor/canvas-core/tools/select/states/idleState.d.ts +2 -2
- package/_vendor/canvas-core/tools/select/states/pointingCanvasState.d.ts +2 -2
- package/_vendor/canvas-core/tools/select/states/pointingResizeHandleState.d.ts +1 -1
- package/_vendor/canvas-core/tools/select/states/pointingRotateHandleState.d.ts +1 -1
- package/_vendor/canvas-core/tools/select/states/pointingSelectionHandleInteractionState.d.ts +3 -3
- package/_vendor/canvas-core/tools/select/states/pointingShapeState.d.ts +3 -3
- package/_vendor/canvas-core/tools/select/states/resizingState.d.ts +3 -3
- package/_vendor/canvas-core/tools/select/states/rotatingState.d.ts +3 -3
- package/_vendor/canvas-core/tools/select/states/selectStateNode.d.ts +8 -12
- package/_vendor/canvas-core/tools/select/states/translatingState.d.ts +2 -3
- package/_vendor/canvas-core/tools/stateNode.d.ts +30 -0
- package/_vendor/canvas-core/tools/toolManager.d.ts +24 -0
- package/_vendor/canvas-core/utils/equality.d.ts +9 -0
- package/_vendor/canvas-extension-contracts/contributions.d.ts +92 -0
- package/_vendor/canvas-extension-contracts/index.d.ts +6 -0
- package/_vendor/canvas-extension-contracts/operations.d.ts +131 -0
- package/_vendor/canvas-extension-contracts/persistence.d.ts +16 -0
- package/_vendor/canvas-extension-contracts/plugin.d.ts +37 -0
- package/_vendor/canvas-extension-contracts/shape.d.ts +5 -0
- package/_vendor/canvas-extension-contracts/tokens.d.ts +12 -0
- package/_vendor/canvas-react/components/CanvasView.d.ts +3 -10
- package/_vendor/canvas-react/components/DefaultGrid.d.ts +1 -0
- package/_vendor/canvas-react/components/canvasKeyboardEvents.d.ts +2 -2
- package/_vendor/canvas-react/components/index.d.ts +1 -0
- package/_vendor/canvas-react/components/shape-layer/ShapeClipStack.d.ts +11 -0
- package/_vendor/canvas-react/components/shape-layer/ShapeDecorations.d.ts +1 -0
- package/_vendor/canvas-react/components/shape-layer/ShapeForegroundItem.d.ts +5 -0
- package/_vendor/canvas-react/components/shape-layer/ShapeItem.d.ts +5 -0
- package/_vendor/canvas-react/components/shape-layer/ShapeRenderList.d.ts +1 -0
- package/_vendor/canvas-react/components/shape-layer/ShapeRenderer.d.ts +12 -0
- package/_vendor/canvas-react/components/shape-layer/shapeFrame.d.ts +11 -0
- package/_vendor/canvas-react/components/useCanvasDomEvents.d.ts +2 -2
- package/_vendor/canvas-react/dom.d.ts +1 -1
- package/_vendor/canvas-react/host/ShapeHeadingControl.d.ts +33 -0
- package/_vendor/canvas-react/host/canvasRenderBindings.d.ts +21 -0
- package/_vendor/canvas-react/host/canvasRenderBindingsContext.d.ts +5 -0
- package/_vendor/canvas-react/host/canvasRenderPlugin.d.ts +3 -12
- package/_vendor/canvas-react/host/index.d.ts +6 -7
- package/_vendor/canvas-react/index.d.ts +1 -1
- package/_vendor/signals/atom.d.ts +7 -5
- package/_vendor/signals/computed.d.ts +10 -8
- package/_vendor/signals/core.d.ts +32 -15
- package/_vendor/signals/effect.d.ts +2 -22
- package/_vendor/signals/index.d.ts +6 -7
- package/_vendor/signals/types.d.ts +14 -7
- package/_vendor/store/diff.d.ts +1 -1
- package/_vendor/store/history.d.ts +6 -21
- package/_vendor/store/index.d.ts +4 -4
- package/_vendor/store/store.d.ts +19 -17
- package/browser/indexedDb.d.ts +0 -4
- package/browser/persistence.d.ts +3 -3
- package/browser/persistenceFlushEvents.d.ts +2 -0
- package/chrome/floating/CanvasKitFloatingContent.d.ts +10 -0
- package/chrome/floating/CanvasKitFloatingPortal.d.ts +1 -0
- package/chrome/floating/useCanvasKitFloatingPosition.d.ts +5 -3
- package/chrome/toolbar/FloatingSelectionToolbarPageSpace.d.ts +7 -3
- package/host-VhUj_Gf6.mjs +48 -0
- package/index.css +1 -1
- package/index.d.ts +16 -47
- package/index.mjs +6 -88
- package/package.json +8 -15
- package/plugin-runtime.d.ts +3 -0
- package/plugin-runtime.mjs +1 -0
- package/react/CanvasKitContext.d.ts +8 -0
- package/react/CanvasKitRoot.d.ts +2 -11
- package/react/canvasActions.d.ts +3 -0
- package/react/canvasKitRootContracts.d.ts +19 -0
- package/react/host/CanvasKitCanvasHost.d.ts +7 -0
- package/react/host/import/CanvasImportHost.d.ts +13 -0
- package/react/host/keyboard/useCanvasKeyboardShortcuts.d.ts +8 -0
- package/react/reportCanvasHostError.d.ts +1 -0
- package/react/useCanvasKitRootRuntime.d.ts +12 -0
- package/runtime/activateCanvasPlugins.d.ts +16 -0
- package/runtime/canvasExportController.d.ts +11 -0
- package/runtime/canvasKit.d.ts +3 -0
- package/runtime/canvasKitContracts.d.ts +208 -0
- package/runtime/canvasKitRootRuntime.d.ts +17 -0
- package/runtime/canvasPluginGraph.d.ts +5 -11
- package/runtime/canvasRuntimeInitialization.d.ts +12 -0
- package/runtime/canvasRuntimeOwner.d.ts +16 -0
- package/runtime/createCanvasKitEditor.d.ts +1 -0
- package/runtime/facade/canvasProductData.d.ts +14 -0
- package/runtime/facade/canvasReadable.d.ts +13 -0
- package/runtime/facade/createCanvasKitFacade.d.ts +17 -0
- package/runtime/facade/layerTree.d.ts +12 -0
- package/runtime/persistenceCoordinator.d.ts +22 -5
- package/runtime/registries/productApiRegistry.d.ts +12 -3
- package/_vendor/canvas-core/editor/bindingReactionScope.d.ts +0 -7
- package/_vendor/canvas-core/editor/canvasPanInteraction.d.ts +0 -2
- package/_vendor/canvas-core/editor/createEditorWithPlugins.d.ts +0 -6
- package/_vendor/canvas-core/editor/editorComputedHelpers.d.ts +0 -24
- package/_vendor/canvas-core/editor/editorSelectionTransforms.d.ts +0 -6
- package/_vendor/canvas-core/editor/historyManager.d.ts +0 -36
- package/_vendor/canvas-core/editor/index.d.ts +0 -11
- package/_vendor/canvas-core/editor/managers/bindingManager.d.ts +0 -27
- package/_vendor/canvas-core/editor/managers/clipboardManager.d.ts +0 -14
- package/_vendor/canvas-core/editor/managers/documentSnapshotManager.d.ts +0 -28
- package/_vendor/canvas-core/editor/managers/queryManager.d.ts +0 -102
- package/_vendor/canvas-core/editor/managers/queryState.d.ts +0 -18
- package/_vendor/canvas-core/editor/managers/selectionLayoutManager.d.ts +0 -34
- package/_vendor/canvas-core/editor/managers/selectionManager.d.ts +0 -21
- package/_vendor/canvas-core/editor/managers/selectionOverlayManager.d.ts +0 -25
- package/_vendor/canvas-core/editor/managers/shapeGeometryManager.d.ts +0 -43
- package/_vendor/canvas-core/editor/managers/shapeHierarchyManager.d.ts +0 -63
- package/_vendor/canvas-core/editor/managers/shapeReparenting.d.ts +0 -7
- package/_vendor/canvas-core/editor/managers/shortcutManager.d.ts +0 -56
- package/_vendor/canvas-core/editor/managers/sideEffectManager.d.ts +0 -23
- package/_vendor/canvas-core/editor/managers/toolManager.d.ts +0 -24
- package/_vendor/canvas-core/editor/selectionHandleInteractions.d.ts +0 -11
- package/_vendor/canvas-core/editor/selectionOverlay.d.ts +0 -35
- package/_vendor/canvas-core/editor/stateNode.d.ts +0 -31
- package/_vendor/canvas-core/shapes/capabilities.d.ts +0 -25
- package/_vendor/canvas-core/tools/index.d.ts +0 -2
- package/_vendor/canvas-plugin-sdk/capability.d.ts +0 -10
- package/_vendor/canvas-plugin-sdk/index.d.ts +0 -3
- package/_vendor/canvas-plugin-sdk/plugin.d.ts +0 -29
- package/_vendor/canvas-plugin-sdk/setupExtension.d.ts +0 -5
- package/_vendor/canvas-product-contracts/actionRegistry.d.ts +0 -4
- package/_vendor/canvas-product-contracts/actions.d.ts +0 -44
- package/_vendor/canvas-product-contracts/capability.d.ts +0 -8
- package/_vendor/canvas-product-contracts/chrome.d.ts +0 -53
- package/_vendor/canvas-product-contracts/chromeRegistry.d.ts +0 -9
- package/_vendor/canvas-product-contracts/contextMenu.d.ts +0 -63
- package/_vendor/canvas-product-contracts/contextMenuRegistry.d.ts +0 -4
- package/_vendor/canvas-product-contracts/exportRegistry.d.ts +0 -6
- package/_vendor/canvas-product-contracts/exports.d.ts +0 -27
- package/_vendor/canvas-product-contracts/importRegistry.d.ts +0 -7
- package/_vendor/canvas-product-contracts/imports.d.ts +0 -39
- package/_vendor/canvas-product-contracts/index.d.ts +0 -15
- package/_vendor/canvas-product-contracts/productApi.d.ts +0 -29
- package/_vendor/canvas-product-contracts/services.d.ts +0 -21
- package/_vendor/canvas-product-contracts/toolbar.d.ts +0 -146
- package/_vendor/canvas-product-contracts/toolbarRegistry.d.ts +0 -9
- package/_vendor/canvas-react/host/canvasOverlayRegistryContext.d.ts +0 -3
- package/_vendor/canvas-react/host/canvasRenderRuntime.d.ts +0 -13
- package/_vendor/canvas-react/host/canvasRendererRegistryContext.d.ts +0 -3
- package/_vendor/canvas-react/host/domEventGuards.d.ts +0 -11
- package/_vendor/canvas-react/host/overlayRegistry.d.ts +0 -18
- package/_vendor/canvas-react/host/rendererRegistry.d.ts +0 -15
- package/_vendor/plugin-arrow/api.d.ts +0 -33
- 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 -27
- 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 -25
- 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 -2
- package/_vendor/plugin-arrow/index.d.ts +0 -15
- package/_vendor/plugin-arrow/productRuntime.d.ts +0 -2
- package/_vendor/plugin-arrow/selectionHandleInteractions.d.ts +0 -3
- package/_vendor/plugin-arrow/types.d.ts +0 -31
- package/_vendor/plugin-draw/DrawShapeRenderer.d.ts +0 -13
- package/_vendor/plugin-draw/canvasRender.d.ts +0 -2
- package/_vendor/plugin-draw/drawGeometry.d.ts +0 -42
- package/_vendor/plugin-draw/drawHitTest.d.ts +0 -11
- package/_vendor/plugin-draw/drawInterpolation.d.ts +0 -5
- package/_vendor/plugin-draw/drawPath.d.ts +0 -43
- package/_vendor/plugin-draw/drawSegments.d.ts +0 -11
- package/_vendor/plugin-draw/drawSelectionTransform.d.ts +0 -18
- package/_vendor/plugin-draw/drawShapeGeometry.d.ts +0 -33
- package/_vendor/plugin-draw/drawShapeUtil.d.ts +0 -22
- package/_vendor/plugin-draw/drawStrokeGeometry.d.ts +0 -17
- package/_vendor/plugin-draw/drawTool.d.ts +0 -6
- package/_vendor/plugin-draw/editorRuntime.d.ts +0 -7
- package/_vendor/plugin-draw/feature.d.ts +0 -2
- package/_vendor/plugin-draw/index.d.ts +0 -14
- package/_vendor/plugin-draw/productRuntime.d.ts +0 -2
- package/_vendor/plugin-draw/types.d.ts +0 -23
- package/_vendor/plugin-eraser/canvasRender.d.ts +0 -2
- package/_vendor/plugin-eraser/editorRuntime.d.ts +0 -2
- package/_vendor/plugin-eraser/eraserRuntime.d.ts +0 -12
- package/_vendor/plugin-eraser/eraserTool.d.ts +0 -5
- package/_vendor/plugin-eraser/feature.d.ts +0 -2
- package/_vendor/plugin-eraser/index.d.ts +0 -6
- package/_vendor/plugin-eraser/productRuntime.d.ts +0 -2
- package/_vendor/plugin-frame/api.d.ts +0 -19
- package/_vendor/plugin-frame/canvasRender.d.ts +0 -9
- package/_vendor/plugin-frame/editorRuntime.d.ts +0 -7
- package/_vendor/plugin-frame/feature.d.ts +0 -2
- package/_vendor/plugin-frame/frameShapeUtil.d.ts +0 -35
- package/_vendor/plugin-frame/frameTool.d.ts +0 -6
- package/_vendor/plugin-frame/index.d.ts +0 -9
- package/_vendor/plugin-frame/productRuntime.d.ts +0 -2
- package/_vendor/plugin-geo/api.d.ts +0 -27
- package/_vendor/plugin-geo/canvasRender.d.ts +0 -13
- package/_vendor/plugin-geo/editorRuntime.d.ts +0 -7
- package/_vendor/plugin-geo/feature.d.ts +0 -2
- package/_vendor/plugin-geo/geoGeometry.d.ts +0 -24
- package/_vendor/plugin-geo/geoShapeUtil.d.ts +0 -14
- package/_vendor/plugin-geo/geoStrokeStyle.d.ts +0 -2
- package/_vendor/plugin-geo/geoTools.d.ts +0 -27
- package/_vendor/plugin-geo/index.d.ts +0 -10
- package/_vendor/plugin-geo/productRuntime.d.ts +0 -2
- package/_vendor/plugin-geo/types.d.ts +0 -22
- package/_vendor/plugin-group/canvasRender.d.ts +0 -9
- package/_vendor/plugin-group/editorRuntime.d.ts +0 -7
- package/_vendor/plugin-group/feature.d.ts +0 -2
- package/_vendor/plugin-group/groupContributions.d.ts +0 -7
- package/_vendor/plugin-group/groupShapeUtil.d.ts +0 -35
- package/_vendor/plugin-group/index.d.ts +0 -7
- package/_vendor/plugin-group/productRuntime.d.ts +0 -2
- package/_vendor/plugin-image/actionIds.d.ts +0 -9
- package/_vendor/plugin-image/canvasRender.d.ts +0 -2
- package/_vendor/plugin-image/cornerRadius.d.ts +0 -6
- package/_vendor/plugin-image/crop.d.ts +0 -112
- package/_vendor/plugin-image/cropInteractions.d.ts +0 -3
- package/_vendor/plugin-image/cropRuntime.d.ts +0 -2
- package/_vendor/plugin-image/cropSession.d.ts +0 -6
- package/_vendor/plugin-image/editorRuntime.d.ts +0 -3
- package/_vendor/plugin-image/feature.d.ts +0 -2
- package/_vendor/plugin-image/imageHostActionContract.d.ts +0 -2
- package/_vendor/plugin-image/imageShapeUtil.d.ts +0 -13
- package/_vendor/plugin-image/imageSvgExporter.d.ts +0 -6
- package/_vendor/plugin-image/index.d.ts +0 -13
- package/_vendor/plugin-image/productRuntime.d.ts +0 -4
- package/_vendor/plugin-image/runtimeShared.d.ts +0 -5
- package/_vendor/plugin-image/smudge.d.ts +0 -67
- package/_vendor/plugin-image/smudgeInteractions.d.ts +0 -2
- package/_vendor/plugin-image/smudgeRuntime.d.ts +0 -2
- package/_vendor/plugin-image/styleRuntime.d.ts +0 -22
- package/_vendor/plugin-image/toolbarRuntime.d.ts +0 -3
- package/_vendor/plugin-image/types.d.ts +0 -53
- package/_vendor/plugin-laser/canvasRender.d.ts +0 -2
- package/_vendor/plugin-laser/editorRuntime.d.ts +0 -2
- package/_vendor/plugin-laser/feature.d.ts +0 -2
- package/_vendor/plugin-laser/index.d.ts +0 -6
- package/_vendor/plugin-laser/laserRuntime.d.ts +0 -18
- package/_vendor/plugin-laser/laserTool.d.ts +0 -4
- package/_vendor/plugin-laser/productRuntime.d.ts +0 -2
- package/_vendor/plugin-path/PathDraftOverlay.d.ts +0 -1
- package/_vendor/plugin-path/PathEditInsertPreviewOverlay.d.ts +0 -1
- package/_vendor/plugin-path/PathShapeRenderer.d.ts +0 -15
- package/_vendor/plugin-path/canvasRender.d.ts +0 -2
- package/_vendor/plugin-path/editorRuntime.d.ts +0 -7
- package/_vendor/plugin-path/feature.d.ts +0 -2
- package/_vendor/plugin-path/index.d.ts +0 -8
- package/_vendor/plugin-path/pathBoolean.d.ts +0 -13
- package/_vendor/plugin-path/pathDraft.d.ts +0 -10
- package/_vendor/plugin-path/pathEditPreview.d.ts +0 -11
- package/_vendor/plugin-path/pathEditSelection.d.ts +0 -24
- package/_vendor/plugin-path/pathEditSnap.d.ts +0 -6
- package/_vendor/plugin-path/pathGeometry.d.ts +0 -74
- package/_vendor/plugin-path/pathHandles.d.ts +0 -18
- package/_vendor/plugin-path/pathHistory.d.ts +0 -13
- package/_vendor/plugin-path/pathInteractions.d.ts +0 -7
- package/_vendor/plugin-path/pathShapeUtil.d.ts +0 -30
- package/_vendor/plugin-path/pathSvg.d.ts +0 -3
- package/_vendor/plugin-path/pathTool.d.ts +0 -42
- package/_vendor/plugin-path/productRuntime.d.ts +0 -15
- package/_vendor/plugin-path/types.d.ts +0 -36
- package/_vendor/plugin-runtime-clipboard/capability.d.ts +0 -1
- package/_vendor/plugin-runtime-clipboard/clipboardActions.d.ts +0 -6
- package/_vendor/plugin-runtime-clipboard/clipboardService.d.ts +0 -10
- package/_vendor/plugin-runtime-clipboard/index.d.ts +0 -4
- package/_vendor/plugin-runtime-clipboard/plugin.d.ts +0 -1
- package/_vendor/plugin-runtime-export/blobDataUrl.d.ts +0 -1
- package/_vendor/plugin-runtime-export/canvasExportApi.d.ts +0 -43
- package/_vendor/plugin-runtime-export/index.d.ts +0 -8
- package/_vendor/plugin-runtime-export/plugin.d.ts +0 -5
- package/_vendor/plugin-runtime-export/pngExport.d.ts +0 -15
- package/_vendor/plugin-runtime-export/svgExport.d.ts +0 -40
- package/_vendor/plugin-text/api.d.ts +0 -20
- package/_vendor/plugin-text/canvasRender.d.ts +0 -8
- package/_vendor/plugin-text/capabilities.d.ts +0 -2
- package/_vendor/plugin-text/editorRuntime.d.ts +0 -5
- package/_vendor/plugin-text/feature.d.ts +0 -4
- package/_vendor/plugin-text/geoLabelBindingUtil.d.ts +0 -48
- package/_vendor/plugin-text/host/RichTextEditingBox.d.ts +0 -10
- package/_vendor/plugin-text/host/TiptapTextEditor.d.ts +0 -29
- package/_vendor/plugin-text/host/initialTextBackground.d.ts +0 -2
- package/_vendor/plugin-text/host/richTextRendering.d.ts +0 -10
- package/_vendor/plugin-text/host/textDomSelection.d.ts +0 -7
- package/_vendor/plugin-text/host/textEditingBoxStyle.d.ts +0 -4
- package/_vendor/plugin-text/host/textEntryFocus.d.ts +0 -23
- package/_vendor/plugin-text/host/textFontLoader.d.ts +0 -3
- package/_vendor/plugin-text/host/textFormattingApi.d.ts +0 -16
- package/_vendor/plugin-text/host/textMeasurement.d.ts +0 -21
- package/_vendor/plugin-text/host/textMeasurementSync.d.ts +0 -11
- package/_vendor/plugin-text/host/textRangeSelection.d.ts +0 -14
- package/_vendor/plugin-text/host/textShapeRendererRuntime.d.ts +0 -11
- package/_vendor/plugin-text/host/textShapeSync.d.ts +0 -19
- package/_vendor/plugin-text/host/tiptapTextEditorController.d.ts +0 -38
- package/_vendor/plugin-text/index.d.ts +0 -15
- package/_vendor/plugin-text/pathLabelBindingUtil.d.ts +0 -55
- package/_vendor/plugin-text/productRuntime.d.ts +0 -6
- package/_vendor/plugin-text/richTextLinks.d.ts +0 -3
- package/_vendor/plugin-text/richTextUtils.d.ts +0 -26
- package/_vendor/plugin-text/shapeWideTextFormatting.d.ts +0 -12
- package/_vendor/plugin-text/textFonts.d.ts +0 -49
- package/_vendor/plugin-text/textFormatting.d.ts +0 -47
- package/_vendor/plugin-text/textFormattingSession.d.ts +0 -6
- package/_vendor/plugin-text/textInteractions.d.ts +0 -2
- package/_vendor/plugin-text/textLabelHelpers.d.ts +0 -70
- package/_vendor/plugin-text/textLinkPopoverPresentation.d.ts +0 -18
- package/_vendor/plugin-text/textShapeHelpers.d.ts +0 -21
- package/_vendor/plugin-text/textShapeSvgExporter.d.ts +0 -9
- package/_vendor/plugin-text/textShapeUtil.d.ts +0 -24
- package/_vendor/plugin-text/textStyle.d.ts +0 -18
- package/_vendor/plugin-text/textTool.d.ts +0 -4
- package/_vendor/plugin-text/textTypes.d.ts +0 -29
- package/canvasKitTools.d.ts +0 -3
- package/chrome/contextMenuRuntime.d.ts +0 -7
- package/chrome/toolbar/mergeToolbarGroups.d.ts +0 -8
- package/chrome/toolbar/toolbarLabels.d.ts +0 -8
- package/chrome/toolbar/useToolbarSurfaces.d.ts +0 -21
- package/chrome/types.d.ts +0 -71
- package/chrome/useCanvasKitChromeContext.d.ts +0 -18
- package/chrome/useCanvasKitLayerTree.d.ts +0 -6
- package/chrome/useChromeSurfaces.d.ts +0 -12
- package/chrome/useContextMenuSurface.d.ts +0 -12
- package/chrome/useHistoryControls.d.ts +0 -12
- package/chrome/usePageControls.d.ts +0 -16
- package/chrome/useZoomControls.d.ts +0 -13
- package/commands/command.d.ts +0 -11
- package/commands/commandTokens.d.ts +0 -61
- package/commands/documentCommands.d.ts +0 -2
- package/commands/historyCommands.d.ts +0 -3
- package/commands/index.d.ts +0 -11
- package/commands/layerCommands.d.ts +0 -20
- package/commands/pageCommands.d.ts +0 -12
- package/commands/selectionCommands.d.ts +0 -12
- package/commands/shapeCommands.d.ts +0 -8
- package/commands/toolCommands.d.ts +0 -2
- package/commands/viewCommands.d.ts +0 -10
- package/contracts/canvasProductControllerContracts.d.ts +0 -32
- package/controller/canvasProductController.d.ts +0 -174
- package/controller/index.d.ts +0 -3
- package/controller/layerTree.d.ts +0 -10
- package/plugins/host/image/api/imageHostApi.d.ts +0 -11
- package/plugins/host/image/api/imageHostApiContract.d.ts +0 -60
- package/plugins/host/image/asset/imageAssetService.d.ts +0 -11
- package/plugins/host/image/asset/imageBlobStore.d.ts +0 -31
- package/plugins/host/image/asset/imageFileHelpers.d.ts +0 -43
- package/plugins/host/image/asset/svgImageAssetInliner.d.ts +0 -3
- package/plugins/host/image/import/ImageImportController.d.ts +0 -11
- package/plugins/host/image/index.d.ts +0 -15
- package/plugins/host/image/plugin.d.ts +0 -1
- package/plugins/host/image/smudge/imageSmudgeHostActions.d.ts +0 -10
- package/plugins/host/image/toolbar/imageHostActions.d.ts +0 -63
- package/plugins/host/image/toolbar/imageToolbarHostBridge.d.ts +0 -14
- package/plugins/host/text/link/TextLinkHoverPopover.d.ts +0 -6
- package/plugins/host/text/textHostPlugin.d.ts +0 -5
- package/plugins/host/text/textSvgAssetInliner.d.ts +0 -3
- package/plugins/host/text/textSvgAssetPlugin.d.ts +0 -2
- package/plugins/runtime/import-host/CanvasImportHost.d.ts +0 -4
- package/plugins/runtime/import-host/capability.d.ts +0 -1
- package/plugins/runtime/import-host/index.d.ts +0 -2
- package/plugins/runtime/import-host/plugin.d.ts +0 -1
- package/plugins/runtime/keyboard-shortcuts/index.d.ts +0 -1
- package/plugins/runtime/keyboard-shortcuts/plugin.d.ts +0 -1
- package/plugins/runtime/keyboard-shortcuts/useCanvasKeyboardShortcuts.d.ts +0 -6
- package/plugins/runtime/tool-actions/capability.d.ts +0 -1
- package/plugins/runtime/tool-actions/index.d.ts +0 -2
- package/plugins/runtime/tool-actions/plugin.d.ts +0 -1
- package/plugins/runtime/tool-actions/toolActions.d.ts +0 -2
- package/plugins/standard/clipboard/chrome.d.ts +0 -2
- package/plugins/standard/clipboard/contextMenu.d.ts +0 -2
- package/plugins/standard/clipboard/plugin.d.ts +0 -1
- package/plugins/standard/clipboard/shortcuts.d.ts +0 -5
- package/plugins/standard/createStandardCanvasKitPlugins.d.ts +0 -15
- package/plugins/standard/selection/actions.d.ts +0 -21
- package/plugins/standard/selection/chrome.d.ts +0 -2
- package/plugins/standard/selection/contextMenu.d.ts +0 -2
- package/plugins/standard/selection/plugin.d.ts +0 -1
- package/plugins/standard/selection/toolbar.d.ts +0 -2
- package/plugins/standard/tool-ui/contextMenu.d.ts +0 -2
- package/plugins/standard/tool-ui/plugin.d.ts +0 -1
- package/plugins/standard/tool-ui/toolbar.d.ts +0 -2
- package/plugins/standard/view/actions.d.ts +0 -5
- package/plugins/standard/view/chrome.d.ts +0 -2
- package/plugins/standard/view/contextMenu.d.ts +0 -2
- package/plugins/standard/view/plugin.d.ts +0 -1
- package/react/useCanvasKitRuntime.d.ts +0 -2
- package/react/useCanvasProductControllerLifecycle.d.ts +0 -9
- package/runtime/canvasKitActionContext.d.ts +0 -17
- package/runtime/canvasKitActionExecutor.d.ts +0 -12
- package/runtime/canvasKitCommandExecutor.d.ts +0 -22
- package/runtime/canvasKitPluginContracts.d.ts +0 -28
- package/runtime/canvasKitPluginLifecycle.d.ts +0 -32
- package/runtime/canvasKitPluginSetup.d.ts +0 -35
- package/runtime/canvasKitPluginUi.d.ts +0 -37
- package/runtime/canvasKitResourceScope.d.ts +0 -5
- package/runtime/canvasKitRuntime.d.ts +0 -59
- package/runtime/canvasKitRuntimeContracts.d.ts +0 -35
- package/runtime/createCanvasKitCommandAction.d.ts +0 -10
- package/runtime/persistenceContracts.d.ts +0 -12
- package/runtime/productAssetResolvers.d.ts +0 -29
- package/runtime/productServiceRegistry.d.ts +0 -8
- package/runtime/registries/actionRegistry.d.ts +0 -5
- package/runtime/registries/chromeRegistry.d.ts +0 -2
- package/runtime/registries/contextMenuRegistry.d.ts +0 -5
- package/runtime/registries/exportRegistry.d.ts +0 -2
- package/runtime/registries/importRegistry.d.ts +0 -2
- package/runtime/registries/index.d.ts +0 -7
- package/runtime/registries/toolbarRegistry.d.ts +0 -5
- /package/_vendor/canvas-core/editor/{selectionBindingSegments.d.ts → selection/selectionBindingSegments.d.ts} +0 -0
- /package/_vendor/canvas-core/editor/{managers → snapping}/snapSnapshotBuilder.d.ts +0 -0
- /package/_vendor/canvas-core/editor/{camera.d.ts → viewport/camera.d.ts} +0 -0
|
@@ -1,24 +1,37 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Signal } from "../../../signals/index";
|
|
2
2
|
import type { ChangeSource } from "../../../store/index";
|
|
3
3
|
import { Vec } from "../../geometry/vec";
|
|
4
4
|
import { type Camera } from "../../schema/records";
|
|
5
5
|
import type { PageId } from "../../schema/records";
|
|
6
6
|
import type { Editor } from "../editor";
|
|
7
|
+
export interface CameraAnimationScheduler {
|
|
8
|
+
requestFrame(callback: (timestamp: number) => void): unknown;
|
|
9
|
+
cancelFrame(handle: unknown): void;
|
|
10
|
+
prefersReducedMotion?(): boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface CameraAnimationOptions {
|
|
13
|
+
durationMs: number;
|
|
14
|
+
pageId?: PageId;
|
|
15
|
+
source?: ChangeSource;
|
|
16
|
+
}
|
|
7
17
|
/**
|
|
8
18
|
* Camera and viewport-screen-size state for the editor. Owns the viewport size
|
|
9
19
|
* atom (viewport + camera together define the page<->screen transform) and the
|
|
10
20
|
* camera read/write/transform operations carved out of the Editor facade so the
|
|
11
|
-
* editor can stay a thinner delegating surface.
|
|
12
|
-
*
|
|
21
|
+
* editor can stay a thinner delegating surface. Editor publishes the owned
|
|
22
|
+
* viewport signal through its grouped state facade.
|
|
13
23
|
*/
|
|
14
24
|
export declare class CameraManager {
|
|
15
25
|
private readonly editor;
|
|
26
|
+
private readonly animationScheduler?;
|
|
16
27
|
private readonly _viewportScreenSizeSignal;
|
|
17
28
|
readonly viewportScreenSizeSignal: Signal<{
|
|
18
29
|
w: number;
|
|
19
30
|
h: number;
|
|
20
31
|
}>;
|
|
21
|
-
|
|
32
|
+
private animationFrame;
|
|
33
|
+
private animationGeneration;
|
|
34
|
+
constructor(editor: Editor, animationScheduler?: CameraAnimationScheduler | undefined);
|
|
22
35
|
getCurrentCamera(): Camera;
|
|
23
36
|
getCamera(pageId?: PageId): Camera;
|
|
24
37
|
pageToScreen(point: Vec, pageId?: PageId): Vec;
|
|
@@ -27,6 +40,10 @@ export declare class CameraManager {
|
|
|
27
40
|
pageId?: PageId;
|
|
28
41
|
source?: ChangeSource;
|
|
29
42
|
}): void;
|
|
43
|
+
animateCameraTo(target: Camera, options: CameraAnimationOptions): void;
|
|
44
|
+
cancelAnimation(): void;
|
|
45
|
+
dispose(): void;
|
|
46
|
+
private writeCamera;
|
|
30
47
|
panCamera(delta: Vec, source?: ChangeSource): void;
|
|
31
48
|
zoomCameraAtScreenPoint(screenPoint: Vec, deltaY: number, source?: ChangeSource): void;
|
|
32
49
|
zoomCameraToScreenPoint(screenPoint: Vec, zoom: number, source?: ChangeSource): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Vec } from "
|
|
2
|
-
import type { Camera } from "
|
|
3
|
-
import type { Editor } from "
|
|
1
|
+
import type { Vec } from "../../geometry/vec";
|
|
2
|
+
import type { Camera } from "../../schema/records";
|
|
3
|
+
import type { Editor } from "../editor";
|
|
4
4
|
export interface CameraPanSession {
|
|
5
5
|
originScreenPoint: Vec;
|
|
6
6
|
originCamera: Camera;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import { Box } from "
|
|
2
|
-
import type { ShapeId } from "
|
|
1
|
+
import { Box } from "../../geometry/box";
|
|
2
|
+
import type { ShapeId, ShapeRecord } from "../../schema/records";
|
|
3
|
+
export interface RenderItem {
|
|
4
|
+
id: ShapeId;
|
|
5
|
+
shape: ShapeRecord;
|
|
6
|
+
bounds: Box;
|
|
7
|
+
isSelected: boolean;
|
|
8
|
+
}
|
|
3
9
|
export declare const RENDER_CULLING_OVERSCAN_SCREEN = 160;
|
|
4
10
|
export interface ShapeIndexRange {
|
|
5
11
|
start: number;
|
|
@@ -11,7 +17,6 @@ export interface ShapeWindowSnapshot {
|
|
|
11
17
|
shapeIds: ShapeId[];
|
|
12
18
|
}
|
|
13
19
|
export declare function doesBoxContainBox(outer: Box, inner: Box): boolean;
|
|
14
|
-
export declare function formatShapeIndexRanges(ranges: ShapeIndexRange[]): string;
|
|
15
20
|
export declare function getRetainedRenderWindowExtraShapeBudget(culledShapeCount: number): number;
|
|
16
21
|
export declare function mergeShapeIndexRanges(ranges: ShapeIndexRange[], gapAllowance?: number): ShapeIndexRange[];
|
|
17
22
|
export declare function doRangesContainRanges(outerRanges: ShapeIndexRange[], innerRanges: ShapeIndexRange[]): boolean;
|
|
@@ -22,9 +27,4 @@ export declare function getShapeIndexRangesForShapeIds(shapeIds: ShapeId[], page
|
|
|
22
27
|
export declare function getShapeWindowSnapshot(pageShapeIds: ShapeId[], ranges: ShapeIndexRange[], options?: {
|
|
23
28
|
viewportReady?: boolean;
|
|
24
29
|
}): ShapeWindowSnapshot;
|
|
25
|
-
export declare function getShapeIdArrayChangeCounts(previous: ShapeId[], next: ShapeId[]): {
|
|
26
|
-
changed: number;
|
|
27
|
-
added: number;
|
|
28
|
-
removed: number;
|
|
29
|
-
};
|
|
30
30
|
export declare function collectRetainedShapeRanges(pageShapeIds: ShapeId[], culledShapeIds: ShapeId[], selectedIds: Set<ShapeId>, extraShapeBudget: number): ShapeIndexRange[];
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import { type Signal } from "../../../signals/index";
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { Box } from "../../geometry/box";
|
|
3
|
+
import type { PageId, ShapeId } from "../../schema/records";
|
|
4
|
+
import type { Editor } from "../editor";
|
|
5
|
+
import { type RenderItem } from "./renderWindow";
|
|
6
|
+
interface RenderWindowSignals {
|
|
7
|
+
currentPageId: Signal<PageId>;
|
|
8
|
+
currentPageShapeIds: Signal<ShapeId[]>;
|
|
9
|
+
selectedShapeIds: Signal<ShapeId[]>;
|
|
10
|
+
selectedShapeIdSet: Signal<Set<ShapeId>>;
|
|
11
|
+
viewportPageBounds: Signal<Box | null>;
|
|
12
|
+
renderViewportPageBounds: Signal<Box | null>;
|
|
13
|
+
}
|
|
4
14
|
/**
|
|
5
15
|
* Render culling and retained-window signals for the editor render host. The
|
|
6
16
|
* Editor exposes thin signal aliases that forward here.
|
|
7
17
|
*/
|
|
8
18
|
export declare class RenderWindowManager {
|
|
9
|
-
private readonly editor;
|
|
10
19
|
readonly shapeRenderOrderByIdSignal: Signal<Map<ShapeId, number>>;
|
|
11
20
|
readonly culledShapeIdsSignal: Signal<ShapeId[]>;
|
|
12
21
|
readonly culledShapeIdSetSignal: Signal<Set<ShapeId>>;
|
|
@@ -16,10 +25,9 @@ export declare class RenderWindowManager {
|
|
|
16
25
|
readonly retainedShapeIdsSignal: Signal<ShapeId[]>;
|
|
17
26
|
readonly renderVisibleShapeIdSetSignal: Signal<Set<ShapeId>>;
|
|
18
27
|
readonly renderItemsSignal: Signal<RenderItem[]>;
|
|
19
|
-
readonly renderHostDebugStateSignal: Signal<EditorRenderHostDebugState>;
|
|
20
28
|
private readonly retainedBaseShapeWindowSnapshotSignal;
|
|
21
29
|
private readonly retainedShapeWindowSnapshotSignal;
|
|
22
|
-
|
|
23
|
-
constructor(editor: Editor);
|
|
30
|
+
constructor(editor: Editor, signals: RenderWindowSignals);
|
|
24
31
|
private getPageIndexById;
|
|
25
32
|
}
|
|
33
|
+
export {};
|
|
@@ -1,30 +1,36 @@
|
|
|
1
|
-
export { Editor } from "./editor/editor";
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
1
|
+
export { Editor, type CenterOnShapeOptions, } from "./editor/editor";
|
|
2
|
+
export type { CameraAnimationScheduler } from "./editor/viewport/cameraManager";
|
|
3
|
+
export { createEditor, type CreateEditorOptions, } from "./editor/createEditor";
|
|
4
|
+
export { HistoryManager, type HistoryScope, type HistoryState, } from "./editor/history/historyManager";
|
|
5
|
+
export { EditorOperationManager, type EditorCommit, type EditorOperation, type EditorOperationHistory, type EditorOperationOptions, } from "./editor/history/operationManager";
|
|
6
|
+
export type { SnapDiagnostics, SnapDiagnosticsState, } from "./editor/snapping/snapManager";
|
|
5
7
|
export { doesLineSegmentIntersectPolygon, distanceBetweenSegments, distanceToSegment, getPolygonsBounds, isPointInPolygon, isPointInPolygons, isValidPolygon, nearestPointOnSegment, segmentsIntersect, } from "./geometry";
|
|
6
8
|
export { getShapeContentClipPath } from "./geometry/contentCutout";
|
|
7
|
-
export { getShapeGeometry,
|
|
9
|
+
export { getShapeGeometry, getShapeExportPageBounds, getShapeExportToPageTransform, getShapeLocalToPageTransform, getShapeTransformFieldsFromMatrix, getShapePositionedOutlineVertices, getShapePositionedToPageTransform, getShapePageBounds, getShapePageCenter, getShapePageCorners, getShapePageOutlineVertices, pagePointToShapePositionedPoint, positionedShapePointToPagePoint, getShapeRenderToPageTransform, } from "./editor/queries/shapeTransforms";
|
|
8
10
|
export type { ShapeGeometry, ShapeTransformDecompositionOptions, ShapeTransformFields, } from "./editor/queries/shapeTransforms";
|
|
9
|
-
export type { BindingPreviewState, GapSnapIndicatorGapState, GapSnapIndicatorState, PointSnapIndicatorState, SnapIndicatorState, SelectionBindingSegment, TerminalBindingGuideState, SelectionBindingMiddleHandle, SelectionBindingMiddleHandleAnchor, SelectionBindingTerminalHandle, SelectionBindingTerminalHandleAnchor, SelectionCustomHandle, SelectionCustomHandleAnchor, SelectionHandle,
|
|
10
|
-
export { SELECTION_RESIZE_ALL_MODES, SELECTION_RESIZE_ASPECT_RATIO_LOCKED_ONLY_MODES, SELECTION_RESIZE_CORNER_HANDLE_IDS, SELECTION_RESIZE_FREE_ONLY_MODES, SELECTION_RESIZE_HANDLE_IDS, flipSelectionLocalBounds, getSelectionLocalBoundsFromPagePoints, mapSelectionLocalBoundsBetweenBounds, mapSelectionLocalPointBetweenBounds, mirrorSelectionLocalPoint, rotateSelectionPagePoint, selectionLocalPointToPagePoint, selectionPagePointToLocalPoint, } from "./editor/selection";
|
|
11
|
-
export { getAnchoredSelectionResizeLocalBounds, getAspectRatioLockedSelectionResizeBounds, getCenteredSelectionResizeBounds, getConstrainedSelectionResizeBounds, getLocalDimensionsFromSelectionResize, getSelectionResizeBounds, getSelectionResizeDimensionsFromLocal, getSelectionResizeScalesFromBounds, isSelectionResizeCorner, normalizeSelectionResizeBoundsFromEdges, selectionResizeHandleMovesBottomEdge, selectionResizeHandleMovesLeftEdge, selectionResizeHandleMovesRightEdge, selectionResizeHandleMovesTopEdge, } from "./editor/resizeGeometry";
|
|
12
|
-
export { InteractionHandlerRegistry } from "./editor/interactions";
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export type {
|
|
16
|
-
export type {
|
|
17
|
-
export type {
|
|
18
|
-
export type { ShapeContainment } from "./editor/
|
|
19
|
-
export type {
|
|
11
|
+
export type { BindingPreviewState, GapSnapIndicatorGapState, GapSnapIndicatorState, PointSnapIndicatorState, SnapIndicatorState, SelectionBindingSegment, TerminalBindingGuideState, SelectionBindingMiddleHandle, SelectionBindingMiddleHandleAnchor, SelectionBindingTerminalHandle, SelectionBindingTerminalHandleAnchor, SelectionCustomHandle, SelectionCustomHandleAnchor, SelectionHandle, SelectionOverlayFrameGeometryState, SelectionOverlayFrameStyleState, SelectionOverlayHandleAnchorsState, SelectionOverlayHandlesState, SelectionResizeHandle, SelectionResizeHandleAnchor, SelectionResizeHandleId, SelectionResizeMode, SelectionRotateHandle, SelectionRotateHandleAnchor, SelectionRotateHandleId, SelectionMirrorAxis, } from "./editor/selection/selection";
|
|
12
|
+
export { SELECTION_RESIZE_ALL_MODES, SELECTION_RESIZE_ASPECT_RATIO_LOCKED_ONLY_MODES, SELECTION_RESIZE_CORNER_HANDLE_IDS, SELECTION_RESIZE_FREE_ONLY_MODES, SELECTION_RESIZE_HANDLE_IDS, flipSelectionLocalBounds, getSelectionLocalBoundsFromPagePoints, mapSelectionLocalBoundsBetweenBounds, mapSelectionLocalPointBetweenBounds, mirrorSelectionLocalPoint, rotateSelectionPagePoint, selectionLocalPointToPagePoint, selectionPagePointToLocalPoint, } from "./editor/selection/selection";
|
|
13
|
+
export { getAnchoredSelectionResizeLocalBounds, getAspectRatioLockedSelectionResizeBounds, getCenteredSelectionResizeBounds, getConstrainedSelectionResizeBounds, getLocalDimensionsFromSelectionResize, getSelectionResizeBounds, getSelectionResizeDimensionsFromLocal, getSelectionResizeScalesFromBounds, isSelectionResizeCorner, normalizeSelectionResizeBoundsFromEdges, selectionResizeHandleMovesBottomEdge, selectionResizeHandleMovesLeftEdge, selectionResizeHandleMovesRightEdge, selectionResizeHandleMovesTopEdge, } from "./editor/selection/resizeGeometry";
|
|
14
|
+
export { InteractionHandlerRegistry } from "./editor/events/interactions";
|
|
15
|
+
export { doesKeyboardShortcutMatch, formatKeyboardShortcut, normalizeKeyboardShortcut, } from "./editor/events/keyboardShortcuts";
|
|
16
|
+
export type { EditorEventInteractionHandler, LandInteractionHandler, PointerDragInteractionSession, PointerDragInteractionUpdateResult, SelectionHandleInteractionHandler, SelectionHandleInteractionInput, SelectionHandleInteractionSession, SelectionHandleInteractionUpdateResult, ShapePointerInteractionHandler, ShapePointerInteractionInput, } from "./editor/events/interactions";
|
|
17
|
+
export type { KeyboardShortcutChord, KeyboardShortcutEventLike, KeyboardShortcutInput, } from "./editor/events/keyboardShortcuts";
|
|
18
|
+
export type { EditorSelectionMetadata, EditorSelectionState, EditorShapeEditingState, EditorToolState, } from "./editor/state/editorReadModels";
|
|
19
|
+
export type { EditorRenderInteractionSignals, EditorRenderOverlaySignals, EditorRenderSignals, EditorRenderViewportSignals, EditorStateSignals, } from "./editor/state/editorSignals";
|
|
20
|
+
export type { ContainerBoundsQueryOptions, ShapeContainment, } from "./editor/shapes/shapeContainment";
|
|
21
|
+
export type { ShapeGroupState } from "./editor/shapes/shapeGrouping";
|
|
22
|
+
export type { LayerOrderDirection, LayerOrderEdge, ShapeSiblingOrderDirection, ShapeSiblingOrderEdge, ShapeSiblingOrderState, ShapeSelectionSiblingOrderState, } from "./editor/shapes/shapeOrder";
|
|
23
|
+
export type { ReparentShapePlacementInput, ReparentShapePlacementFailureReason, ReparentShapePlacementResult, } from "./editor/shapes/shapeReparenting";
|
|
24
|
+
export type { ShapePropsPatch } from "./editor/commands/commandTypes";
|
|
25
|
+
export type { ShapeAtPointOptions, ShapeLineSegmentHitTestOptions, SpatialQueryOptions, } from "./editor/queries/spatialIndexManager";
|
|
20
26
|
export type { TerminalBindingTargetInput, ConnectionPoint, ConnectionTerminal, TerminalBindingResolver, TerminalBindingResolverInput, ResolvedTerminalBinding, } from "./bindings/terminalBinding";
|
|
21
27
|
export { DEFAULT_TERMINAL_BINDING_PORTS, getResolvedShapeTerminalBindingPort, getResolvedShapeTerminalBindingPorts, } from "./bindings/terminalPorts";
|
|
22
28
|
export type { ResolvedShapeTerminalBindingPort, ShapeTerminalBindingPort, TerminalBindingPortId, } from "./bindings/terminalPorts";
|
|
23
|
-
export type { EditorCommandOptions, EditorCommands, CreateAssetInput, CreateBindingInput, CreatePageInput, MovePageInput, RenamePageInput, ReparentShapesInput, CreateShapeInput, SetCameraInput, ShapeUpdate, StartEditingShapeInput, UpdateAssetInput, UpdateBindingInput, UpdateDocumentMetaInput, UpdatePageMetaInput, } from "./editor/commands";
|
|
24
|
-
export { reparentShapeToContainingParent } from "./editor/commands";
|
|
29
|
+
export type { EditorCommandOptions, EditorCommands, CreateAssetInput, CreateBindingInput, CreatePageInput, MovePageInput, RenamePageInput, ReparentShapesInput, CreateShapeInput, SetCameraInput, ShapeUpdate, StartEditingShapeInput, UpdateAssetInput, UpdateBindingInput, UpdateDocumentMetaInput, UpdatePageMetaInput, } from "./editor/commands/commands";
|
|
30
|
+
export { reparentShapeToContainingParent } from "./editor/commands/commands";
|
|
25
31
|
export { isEditorClipboardPayload, } from "./editor/clipboard";
|
|
26
32
|
export type { ClipboardAssetSidecar, DuplicateSelectionInput, EditorClipboardPayload, PasteClipboardPayloadInput, } from "./editor/clipboard";
|
|
27
|
-
export type { EditorEvent,
|
|
33
|
+
export type { EditorEvent, EditorEventContext, EditorEventRoutingEffect, EditorEventResult, DoubleClickEditorEvent, PointerEditorEvent, KeyboardEditorEvent, WheelEditorEvent, TickEditorEvent, CancelEditorEvent, EditorPointerType, } from "./editor/events/events";
|
|
28
34
|
export type { ChangeSource, RecordUpdate, RecordsDiff, ScopedStoreRecord, StoreRecord, StoreChange, StoreScopeOf, StoreSnapshot, } from "../store/index";
|
|
29
35
|
export { SnapshotParseError, parseDocumentSnapshot, parseSessionSnapshot, } from "./schema/snapshots";
|
|
30
36
|
export type { DocumentSnapshot, SessionSnapshot } from "./schema/snapshots";
|
|
@@ -32,25 +38,24 @@ export { ShapeUtil } from "./shapes/shapeUtil";
|
|
|
32
38
|
export { CHILD_TRANSFORM_POLICY_EPSILON, formatChildTransformPolicyViolation, getChildTransformPolicyViolation, } from "./shapes/childTransformPolicy";
|
|
33
39
|
export type { ChildTransformPolicy, ChildTransformPolicyProvider, ChildTransformPolicyViolation, } from "./shapes/childTransformPolicy";
|
|
34
40
|
export type { ShapeBoundsSnapGeometry, ShapeBrushSelectInput, ShapeBrushWrapInput, ShapeClipboardCopyInput, ShapeBindingPointInput, ShapeChildPlacementInput, ShapeChildVisibilityInput, ShapeEditEndInput, ShapeEditEndResult, ShapeGeometryInput, ShapeGroupingInput, ShapeHandleSnapContext, ShapeHandleSnapGeometry, ShapeHoverTargetInput, ShapeLineSegmentHitTestInput, ShapeLabelPathGeometry, ShapeLabelPathNearestPositionOptions, ShapePointHitTestInput, ShapeSnapPoint, ShapeSnapPointKind, ShapeTerminalBindingOutline, ShapeSelectionHandleAnchorInput, ShapeSelectionHandleAnchors, ShapeSelectionFrameInput, ShapeSelectionFlipAxis, ShapeSelectionFlipInput, ShapeSelectionOverlayInfo, ShapeSelectionOverlayInfoInput, ShapeSelectionPathStyle, ShapeSelectionPagePoints, ShapeSelectionPagePointsInput, ShapeSelectionResizeInput, ShapeSelectionResizeCapabilityInput, ShapeSelectionResizeModesInput, ShapeSelectionTransformCapabilityInput, ShapeSelectionTranslateInput, } from "./shapes/shapeUtil";
|
|
35
|
-
export type { HandleSnapContext, HandleSnapInput, HandleSnapMode, HandleSnapResult, HandleSnapSnapshot, HandleSnapSnapshotInput, ResizeSnapInput, ResizeSnapResult, ResizeSnapSnapshot, SnapAxis, SnapCoordinateSpace, SnapPointIndex, SnapPointIndexEntry, SnapPointKind, TranslateSnapInput, TranslateSnapResult, TranslateSnapSnapshot, } from "./editor/
|
|
41
|
+
export type { HandleSnapContext, HandleSnapInput, HandleSnapMode, HandleSnapResult, HandleSnapSnapshot, HandleSnapSnapshotInput, ResizeSnapInput, ResizeSnapResult, ResizeSnapSnapshot, SnapAxis, SnapCoordinateSpace, SnapPointIndex, SnapPointIndexEntry, SnapPointKind, TranslateSnapInput, TranslateSnapResult, TranslateSnapSnapshot, } from "./editor/snapping/snapTypes";
|
|
36
42
|
export { ShapeUtilRegistry } from "./shapes/shapeUtilRegistry";
|
|
37
43
|
export { resolveTerminalBindingAtPoint, } from "./bindings/terminalBinding";
|
|
38
44
|
export { ShapeSvgExporterRegistry, exportShapesToSvgString, renderSvgNode, } from "./exports/svg";
|
|
39
45
|
export type { ShapeSvgExporter, SvgAttributeValue, SvgElementNode, SvgExportContext, SvgExportOptions, SvgExportResult, SvgExportSkipReason, SvgExportSkippedShape, SvgNode, } from "./exports/svg";
|
|
40
46
|
export { getExportIntegrityReport, repairExportIntegrity, } from "./exports/integrity";
|
|
41
47
|
export type { ExportIntegrityIssue, ExportIntegrityIssueKind, ExportIntegrityRepairResult, ExportIntegrityReport, } from "./exports/integrity";
|
|
42
|
-
export { getShapeCapabilityManifest } from "./shapes/capabilities";
|
|
43
|
-
export type { ShapeCapabilityDefinition, ShapeCapabilityManifest, ShapeCapabilityManifestEntry, ShapeCapabilitySupport, } from "./shapes/capabilities";
|
|
44
48
|
export { BindingUtil } from "./bindings/bindingUtil";
|
|
45
49
|
export type { BindingSelectionCompanionFrameContext, BindingTargetShapeContentCutoutContext, BindingUtilEffect, } from "./bindings/bindingUtil";
|
|
46
50
|
export { BindingUtilRegistry } from "./bindings/bindingUtilRegistry";
|
|
47
|
-
export { StateNode } from "./
|
|
48
|
-
export {
|
|
51
|
+
export { StateNode } from "./tools/stateNode";
|
|
52
|
+
export type { StateNodeEvent } from "./tools/stateNode";
|
|
53
|
+
export { getEdgeScrollDelta } from "./editor/viewport/edgeScroll";
|
|
49
54
|
export { HandTool } from "./tools/hand/handTool";
|
|
50
55
|
export { SelectTool } from "./tools/select/selectTool";
|
|
51
56
|
export { LAND_DEFAULT_THEME_COLOR_FALLBACKS, LAND_THEME_COLOR_SLOTS, LAND_THEME_COLOR_TOKEN_BY_SLOT, areShapeColorsEqual, createCustomShapeColor, createThemeShapeColor, getThemeColorTokenName, isCustomShapeColorRef, isShapeColor, isThemeShapeColorRef, isTransparentShapeColor, normalizeShapeColor, resolveShapeColor, shapeColorToCssColor, } from "./shapes/colors";
|
|
52
57
|
export type { CustomShapeColorRef, ShapeColor, ThemeColorSlot, ThemeColorResolver, ThemeColorTokenName, ThemeShapeColorRef, } from "./shapes/colors";
|
|
53
|
-
export {
|
|
58
|
+
export { type EditorPlugin, createEditorRuntimeToken, EditorRuntimeRegistry, type EditorRuntimeToken, } from "./plugins";
|
|
54
59
|
export { DEFAULT_CAMERA, DEFAULT_DOCUMENT_ID, DEFAULT_PAGE_ID, DEFAULT_SESSION_ID, createDefaultDocument, createDefaultPage, createDefaultSession, isAssetRecord, isBindingRecord, isDocumentRecord, isDocumentMetadataRecord, isPageRecord, isSessionRecord, isShapeRecord, type AssetId, type AssetRecord, type AssetRecordBase, type BaseRecord, type BindingId, type BindingRecordBase, type BindingRecord, type Camera, type DocumentId, type DocumentMetadataRecord, type DocumentRecord, type EditorRecord, type PageCameraById, type PageId, type PageSelectionById, type PageRecord, type RecordScope, type SessionRecord, type ShapeId, type ShapeParentId, type ShapeRecordBase, type ShapeRecord, type ShapeEditingEntryRequest, type ShapeEditingEntryMode, type ShapeEditingPoint, type ShapeEditingSession, } from "./schema/records";
|
|
55
60
|
export { Vec } from "./geometry/vec";
|
|
56
61
|
export { Box } from "./geometry/box";
|
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
import type { BindingUtil } from "../bindings/bindingUtil";
|
|
2
2
|
import type { Editor } from "../editor/editor";
|
|
3
|
-
import type { LandInteractionHandler } from "../editor/interactions";
|
|
3
|
+
import type { LandInteractionHandler } from "../editor/events/interactions";
|
|
4
4
|
import type { ShapeSvgExporter } from "../exports/svg";
|
|
5
|
-
import type { ShapeCapabilityDefinition } from "../shapes/capabilities";
|
|
6
5
|
import type { ShapeUtil } from "../shapes/shapeUtil";
|
|
7
6
|
export interface EditorPlugin {
|
|
8
7
|
id: string;
|
|
9
|
-
shapeCapabilities?: ShapeCapabilityDefinition[];
|
|
10
8
|
shapeUtils?: ShapeUtil[];
|
|
11
9
|
shapeSvgExporters?: ShapeSvgExporter[];
|
|
12
10
|
bindingUtils?: BindingUtil[];
|
|
13
11
|
interactionHandlers?: LandInteractionHandler[];
|
|
14
12
|
setup?(editor: Editor): void | (() => void);
|
|
15
13
|
}
|
|
16
|
-
export declare function
|
|
14
|
+
export declare function collectEditorPluginContributions(plugins: readonly EditorPlugin[]): {
|
|
17
15
|
shapeUtils: ShapeUtil[];
|
|
18
16
|
shapeSvgExporters: ShapeSvgExporter[];
|
|
19
17
|
bindingUtils: BindingUtil[];
|
|
20
|
-
shapeCapabilities: ShapeCapabilityDefinition[];
|
|
21
18
|
};
|
|
22
19
|
export declare function setupEditorPlugins(editor: Editor, plugins: readonly EditorPlugin[]): () => void;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type Signal } from "../../signals/index";
|
|
2
1
|
export interface EditorRuntimeToken<TValue> {
|
|
3
2
|
readonly id: string;
|
|
4
3
|
readonly __value?: TValue;
|
|
@@ -8,9 +7,6 @@ export declare class EditorRuntimeRegistry {
|
|
|
8
7
|
private readonly values;
|
|
9
8
|
private readonly disposers;
|
|
10
9
|
private isDisposed;
|
|
11
|
-
private readonly revision;
|
|
12
|
-
readonly revisionSignal: Signal<number>;
|
|
13
|
-
notify(): void;
|
|
14
10
|
provide<TValue>(token: EditorRuntimeToken<TValue>, value: TValue, dispose?: (value: TValue) => void): TValue;
|
|
15
11
|
get<TValue>(token: EditorRuntimeToken<TValue>): TValue | null;
|
|
16
12
|
require<TValue>(token: EditorRuntimeToken<TValue>): TValue;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export type { EditorPlugin } from "./editorRuntimePlugin";
|
|
2
2
|
export { createEditorRuntimeToken, EditorRuntimeRegistry, type EditorRuntimeToken, } from "./editorRuntimeRegistry";
|
|
@@ -2,9 +2,9 @@ import { Box } from "../geometry/box";
|
|
|
2
2
|
import { Mat } from "../geometry/mat";
|
|
3
3
|
import { Vec } from "../geometry/vec";
|
|
4
4
|
import type { Editor } from "../editor/editor";
|
|
5
|
-
import type { CreateShapeInput, ShapeUpdate } from "../editor/commands";
|
|
6
|
-
import { type SelectionMirrorAxis } from "../editor/selection";
|
|
7
|
-
import type { SelectionBindingMiddleHandleAnchor, SelectionBindingSegment, SelectionBindingTerminalHandleAnchor, SelectionCustomHandleAnchor, SelectionHandle, SelectionResizeHandleId, SelectionResizeMode } from "../editor/selection";
|
|
5
|
+
import type { CreateShapeInput, ShapeUpdate } from "../editor/commands/commands";
|
|
6
|
+
import { type SelectionMirrorAxis } from "../editor/selection/selection";
|
|
7
|
+
import type { SelectionBindingMiddleHandleAnchor, SelectionBindingSegment, SelectionBindingTerminalHandleAnchor, SelectionCustomHandleAnchor, SelectionHandle, SelectionResizeHandleId, SelectionResizeMode } from "../editor/selection/selection";
|
|
8
8
|
import type { ShapeId, ShapeParentId, ShapeRecordBase } from "../schema/records";
|
|
9
9
|
import { type ShapeTerminalBindingPort } from "../bindings/terminalPorts";
|
|
10
10
|
import type { ChildTransformPolicy } from "./childTransformPolicy";
|
|
@@ -222,7 +222,9 @@ export declare abstract class ShapeUtil<S extends ShapeRecordBase = ShapeRecordB
|
|
|
222
222
|
getLabelPathGeometry(_shape: S, _input: ShapeSelectionOverlayInfoInput): ShapeLabelPathGeometry | null;
|
|
223
223
|
isWrappedByBrush(_shape: S, input: ShapeBrushWrapInput): boolean;
|
|
224
224
|
canSelectByBrush(shape: S, input: ShapeBrushSelectInput): boolean;
|
|
225
|
-
|
|
225
|
+
/** Builds the local transform encoded by this record's transform fields. */
|
|
226
|
+
getLocalTransform(shape: S): Mat;
|
|
227
|
+
getPositionedTransform(shape: S): Mat;
|
|
226
228
|
canEdit(_shape: S): boolean;
|
|
227
229
|
canReceiveChildren(_shape: S): boolean;
|
|
228
230
|
getChildTransformPolicy(_shape: S): ChildTransformPolicy;
|
|
@@ -235,7 +237,6 @@ export declare abstract class ShapeUtil<S extends ShapeRecordBase = ShapeRecordB
|
|
|
235
237
|
getTerminalBindingPorts(shape: S, input: ShapeGeometryInput): readonly ShapeTerminalBindingPort[];
|
|
236
238
|
getTerminalBindingOutlines(shape: S, input: ShapeGeometryInput): readonly ShapeTerminalBindingOutline[];
|
|
237
239
|
canCopyToClipboard(_shape: S, _input: ShapeClipboardCopyInput): boolean;
|
|
238
|
-
repairLoadedShape(_shape: S): S | null;
|
|
239
240
|
onEditEnd(_shape: S, _input: ShapeEditEndInput): ShapeEditEndResult | void;
|
|
240
241
|
hitTest(shape: S, positionedPoint: Vec, _input?: ShapePointHitTestInput): boolean;
|
|
241
242
|
hitTestBindingTarget(shape: S, positionedPoint: Vec, input?: ShapePointHitTestInput): boolean;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Box } from "../geometry/box";
|
|
2
|
+
import { Vec } from "../geometry/vec";
|
|
3
|
+
export declare function getBoxCorners(bounds: Box): Vec[];
|
|
4
|
+
export declare function doesLineSegmentIntersectBox(start: Vec, end: Vec, bounds: Box): boolean;
|
|
5
|
+
export declare function getOutlineBoundaryPoint(raw: Vec, opposite: Vec, outlineVertices: readonly Vec[]): Vec | null;
|
|
6
|
+
export declare function getValidatedDimension(props: object, key: "w" | "h", fallback: number): number;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { Box } from "../../geometry/box";
|
|
2
2
|
import { Mat } from "../../geometry/mat";
|
|
3
3
|
import { Vec } from "../../geometry/vec";
|
|
4
|
-
import type { ShapeUpdate } from "../../editor/commands";
|
|
4
|
+
import type { ShapeUpdate } from "../../editor/commands/commands";
|
|
5
5
|
import type { Editor } from "../../editor/editor";
|
|
6
|
-
import type { PointerEditorEvent, TickEditorEvent } from "../../editor/events";
|
|
7
|
-
import type { SelectionResizeHandleId, SelectionResizeMode, SelectionResizePointShapeSnapshot, SelectionResizeShapeSnapshot, SelectionRotationTransform, SelectionRotatePointShapeSnapshot, SelectionRotateShapeSnapshot } from "../../editor/selection";
|
|
8
|
-
import type { HandleSnapMode, HandleSnapSnapshot, ResizeSnapSnapshot, TranslateSnapSnapshot } from "../../editor/
|
|
9
|
-
import type { PointerDragInteractionSession } from "../../editor/interactions";
|
|
10
|
-
import type { SelectionHandleInteractionSession } from "../../editor/selectionHandleInteractions";
|
|
6
|
+
import type { PointerEditorEvent, TickEditorEvent } from "../../editor/events/events";
|
|
7
|
+
import type { SelectionResizeHandleId, SelectionResizeMode, SelectionResizePointShapeSnapshot, SelectionResizeShapeSnapshot, SelectionRotationTransform, SelectionRotatePointShapeSnapshot, SelectionRotateShapeSnapshot } from "../../editor/selection/selection";
|
|
8
|
+
import type { HandleSnapMode, HandleSnapSnapshot, ResizeSnapSnapshot, TranslateSnapSnapshot } from "../../editor/snapping/snapTypes";
|
|
9
|
+
import type { PointerDragInteractionSession, SelectionHandleInteractionSession } from "../../editor/events/interactions";
|
|
11
10
|
import type { ShapeId, ShapeRecord } from "../../schema/records";
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
11
|
+
export declare const DRAG_START_DISTANCE_SCREEN = 3;
|
|
12
|
+
export declare const DRAG_START_DISTANCE_SCREEN_SQUARED: number;
|
|
14
13
|
export declare const ROTATION_SNAP_STEP: number;
|
|
15
14
|
export declare const ROTATION_SOFT_SNAP_STEP: number;
|
|
16
15
|
export declare const ROTATION_SOFT_SNAP_THRESHOLD: number;
|
|
@@ -20,9 +19,9 @@ export declare const TRANSLATE_SNAP_DISTANCE_SCREEN = 8;
|
|
|
20
19
|
export declare const TRANSLATE_SNAP_MAX_SCREEN_VELOCITY = 0.5;
|
|
21
20
|
export declare const RESIZE_SNAP_DISTANCE_SCREEN = 8;
|
|
22
21
|
export declare const HANDLE_SNAP_DISTANCE_SCREEN = 8;
|
|
23
|
-
export declare const
|
|
24
|
-
export declare const
|
|
25
|
-
export declare const
|
|
22
|
+
export declare const TRANSLATE_OPERATION_KIND = "select.translate";
|
|
23
|
+
export declare const RESIZE_OPERATION_KIND = "select.resize";
|
|
24
|
+
export declare const ROTATE_OPERATION_KIND = "select.rotate";
|
|
26
25
|
export type TranslateAxis = "x" | "y";
|
|
27
26
|
export interface PointingCanvasInfo {
|
|
28
27
|
originPagePoint: Vec;
|
|
@@ -133,7 +132,7 @@ export declare function getSelectionDragInputFromCurrentInputs(editor: Editor):
|
|
|
133
132
|
export declare function getSelectionDragInputForTick(editor: Editor, event: TickEditorEvent, mode: EdgeScrollTickMode): SelectionDragInput | null;
|
|
134
133
|
export declare function applySelectionDragFromCurrentInputs(editor: Editor, apply: (input: SelectionDragInput) => void): void;
|
|
135
134
|
export declare function createBrushBounds(origin: Vec, current: Vec): Box;
|
|
136
|
-
export declare function
|
|
135
|
+
export declare function hasExceededScreenDragThreshold(originScreenPoint: Vec, screenPoint: Vec): boolean;
|
|
137
136
|
export declare function arePagePointsApproximatelyEqual(left: Vec, right: Vec): boolean;
|
|
138
137
|
export declare function toggleIds(base: ShapeId[], toggled: ShapeId[]): ShapeId[];
|
|
139
138
|
export declare function getOutermostSelectableShapeIds(editor: Editor, shapeIds: Iterable<ShapeId>): ShapeId[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Editor } from "../../../editor/editor";
|
|
2
|
-
import { StateNode } from "
|
|
3
|
-
import type { PointerEditorEvent, TickEditorEvent } from "../../../editor/events";
|
|
2
|
+
import { StateNode } from "../../stateNode";
|
|
3
|
+
import type { PointerEditorEvent, TickEditorEvent } from "../../../editor/events/events";
|
|
4
4
|
import { type BrushInfo } from "../selectToolHelpers";
|
|
5
5
|
import { InfoStateNode } from "./selectStateNode";
|
|
6
6
|
export declare class BrushingState extends InfoStateNode<BrushInfo> {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { Editor } from "../../../editor/editor";
|
|
2
|
-
import { StateNode } from "
|
|
3
|
-
import type { CancelEditorEvent, PointerEditorEvent } from "../../../editor/events";
|
|
2
|
+
import { StateNode } from "../../stateNode";
|
|
3
|
+
import type { CancelEditorEvent, PointerEditorEvent } from "../../../editor/events/events";
|
|
4
4
|
import { type DraggingPluginInteractionInfo } from "../selectToolHelpers";
|
|
5
5
|
import { DraggingStateNode, type DragApplyInput } from "./selectStateNode";
|
|
6
6
|
export declare class DraggingPluginInteractionState extends DraggingStateNode<DraggingPluginInteractionInfo> {
|
|
7
|
-
protected readonly tickMode: "apply_after_scroll";
|
|
8
7
|
constructor(editor: Editor, parent: StateNode);
|
|
9
8
|
protected getOperationKind(info: DraggingPluginInteractionInfo): string;
|
|
10
9
|
protected onDragStart(): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Editor } from "../../../editor/editor";
|
|
2
|
-
import { StateNode } from "
|
|
3
|
-
import type { PointerEditorEvent } from "../../../editor/events";
|
|
2
|
+
import { StateNode } from "../../stateNode";
|
|
3
|
+
import type { PointerEditorEvent } from "../../../editor/events/events";
|
|
4
4
|
export declare class IdleState extends StateNode {
|
|
5
5
|
constructor(editor: Editor, parent: StateNode);
|
|
6
6
|
protected onEnter(): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Editor } from "../../../editor/editor";
|
|
2
|
-
import { StateNode } from "
|
|
3
|
-
import type { PointerEditorEvent } from "../../../editor/events";
|
|
2
|
+
import { StateNode } from "../../stateNode";
|
|
3
|
+
import type { PointerEditorEvent } from "../../../editor/events/events";
|
|
4
4
|
import { type PointingCanvasInfo } from "../selectToolHelpers";
|
|
5
5
|
import { PointingStateNode } from "./selectStateNode";
|
|
6
6
|
export declare class PointingCanvasState extends PointingStateNode<PointingCanvasInfo> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Editor } from "../../../editor/editor";
|
|
2
|
-
import { StateNode } from "
|
|
2
|
+
import { StateNode } from "../../stateNode";
|
|
3
3
|
import { type PointingResizeHandleInfo } from "../selectToolHelpers";
|
|
4
4
|
import { PointingStateNode } from "./selectStateNode";
|
|
5
5
|
export declare class PointingResizeHandleState extends PointingStateNode<PointingResizeHandleInfo> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Editor } from "../../../editor/editor";
|
|
2
|
-
import { StateNode } from "
|
|
2
|
+
import { StateNode } from "../../stateNode";
|
|
3
3
|
import { type PointingRotateHandleInfo } from "../selectToolHelpers";
|
|
4
4
|
import { PointingStateNode } from "./selectStateNode";
|
|
5
5
|
export declare class PointingRotateHandleState extends PointingStateNode<PointingRotateHandleInfo> {
|
package/_vendor/canvas-core/tools/select/states/pointingSelectionHandleInteractionState.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Editor } from "../../../editor/editor";
|
|
2
|
-
import type { CancelEditorEvent, PointerEditorEvent } from "../../../editor/events";
|
|
3
|
-
import { StateNode } from "
|
|
2
|
+
import type { CancelEditorEvent, EditorEventContext, PointerEditorEvent } from "../../../editor/events/events";
|
|
3
|
+
import { StateNode } from "../../stateNode";
|
|
4
4
|
import { type PointingSelectionHandleInteractionInfo } from "../selectToolHelpers";
|
|
5
5
|
import { PointingStateNode } from "./selectStateNode";
|
|
6
6
|
export declare class PointingSelectionHandleInteractionState extends PointingStateNode<PointingSelectionHandleInteractionInfo> {
|
|
7
7
|
constructor(editor: Editor, parent: StateNode);
|
|
8
8
|
protected onDragThresholdExceeded(): void;
|
|
9
|
-
protected onPointerUp(
|
|
9
|
+
protected onPointerUp(_event: PointerEditorEvent, context: EditorEventContext): void;
|
|
10
10
|
protected onCancel(event: CancelEditorEvent): void;
|
|
11
11
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { Editor } from "../../../editor/editor";
|
|
2
|
-
import { StateNode } from "
|
|
3
|
-
import type { PointerEditorEvent } from "../../../editor/events";
|
|
2
|
+
import { StateNode } from "../../stateNode";
|
|
3
|
+
import type { EditorEventContext, EditorEventRoutingEffect, PointerEditorEvent } from "../../../editor/events/events";
|
|
4
4
|
import { type PointingShapeInfo } from "../selectToolHelpers";
|
|
5
5
|
import { PointingStateNode } from "./selectStateNode";
|
|
6
6
|
export declare class PointingShapeState extends PointingStateNode<PointingShapeInfo> {
|
|
7
7
|
constructor(editor: Editor, parent: StateNode);
|
|
8
8
|
protected onInfoEnter(): void;
|
|
9
9
|
protected onDragThresholdExceeded(event: PointerEditorEvent): void;
|
|
10
|
-
protected onPointerUp(event: PointerEditorEvent): void;
|
|
10
|
+
protected onPointerUp(event: PointerEditorEvent, context: EditorEventContext): EditorEventRoutingEffect | void;
|
|
11
11
|
protected onCancel(): void;
|
|
12
12
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { Editor } from "../../../editor/editor";
|
|
2
|
-
import {
|
|
2
|
+
import type { PointerEditorEvent } from "../../../editor/events/events";
|
|
3
|
+
import { StateNode } from "../../stateNode";
|
|
3
4
|
import { type ResizingInfo } from "../selectToolHelpers";
|
|
4
5
|
import { DraggingStateNode, type DragApplyInput } from "./selectStateNode";
|
|
5
6
|
export declare class ResizingState extends DraggingStateNode<ResizingInfo> {
|
|
6
|
-
protected readonly tickMode: "apply_after_scroll_or_without_screen_point";
|
|
7
7
|
constructor(editor: Editor, parent: StateNode);
|
|
8
8
|
protected getOperationKind(): string;
|
|
9
9
|
protected onDragStart(): void;
|
|
10
|
-
protected onPointerUp(): void;
|
|
10
|
+
protected onPointerUp(event: PointerEditorEvent): void;
|
|
11
11
|
protected onCancel(): void;
|
|
12
12
|
protected onInfoExit(): void;
|
|
13
13
|
protected apply({ pagePoint, shiftKey, altKey, accelKey, }: DragApplyInput): void;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { Editor } from "../../../editor/editor";
|
|
2
|
-
import {
|
|
2
|
+
import type { PointerEditorEvent } from "../../../editor/events/events";
|
|
3
|
+
import { StateNode } from "../../stateNode";
|
|
3
4
|
import { type RotatingInfo } from "../selectToolHelpers";
|
|
4
5
|
import { DraggingStateNode, type DragApplyInput } from "./selectStateNode";
|
|
5
6
|
export declare class RotatingState extends DraggingStateNode<RotatingInfo> {
|
|
6
|
-
protected readonly tickMode: "apply_after_scroll";
|
|
7
7
|
constructor(editor: Editor, parent: StateNode);
|
|
8
8
|
protected getOperationKind(): string;
|
|
9
|
-
protected onPointerUp(): void;
|
|
9
|
+
protected onPointerUp(event: PointerEditorEvent): void;
|
|
10
10
|
protected onCancel(): void;
|
|
11
11
|
protected apply({ pagePoint, shiftKey, accelKey }: DragApplyInput): void;
|
|
12
12
|
private complete;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { Vec } from "../../../geometry/vec";
|
|
2
|
-
import { StateNode } from "
|
|
3
|
-
import type { PointerEditorEvent, TickEditorEvent } from "../../../editor/events";
|
|
4
|
-
import {
|
|
5
|
-
import type { EditorOperation } from "../../../editor/operationManager";
|
|
2
|
+
import { StateNode } from "../../stateNode";
|
|
3
|
+
import type { PointerEditorEvent, TickEditorEvent } from "../../../editor/events/events";
|
|
4
|
+
import type { EditorOperation } from "../../../editor/history/operationManager";
|
|
6
5
|
/**
|
|
7
6
|
* Base for every select-tool state that carries a transient `info` payload.
|
|
8
7
|
* Centralises the identical `info` lifecycle (assign on enter, clear on exit)
|
|
@@ -38,23 +37,20 @@ export interface DragApplyInput {
|
|
|
38
37
|
}
|
|
39
38
|
/**
|
|
40
39
|
* Base for the active drag states (translate / resize / rotate / handle
|
|
41
|
-
* interaction). Centralises the identical event wiring:
|
|
42
|
-
*
|
|
43
|
-
* current input on key changes. Subclasses implement {@link apply} plus their
|
|
44
|
-
* completion/cancellation and any extra cleanup.
|
|
40
|
+
* interaction). Centralises the identical event wiring: open an operation on
|
|
41
|
+
* enter, apply the latest input once per animation tick, and re-apply the
|
|
42
|
+
* current input on key changes. Subclasses implement {@link apply} plus their
|
|
43
|
+
* own completion / cancellation and any extra cleanup.
|
|
45
44
|
*/
|
|
46
45
|
export declare abstract class DraggingStateNode<T> extends InfoStateNode<T> {
|
|
47
46
|
protected operation: EditorOperation | null;
|
|
48
|
-
/** Edge-scroll behaviour for this gesture's tick handling. */
|
|
49
|
-
protected abstract readonly tickMode: EdgeScrollTickMode;
|
|
50
47
|
/** Stable operation kind for this gesture. */
|
|
51
48
|
protected abstract getOperationKind(info: T): string;
|
|
52
49
|
/** Apply one drag sample. Implementations must guard on `this.info`. */
|
|
53
50
|
protected abstract apply(input: DragApplyInput): void;
|
|
54
51
|
protected onInfoEnter(): void;
|
|
55
|
-
/** Extra setup after the
|
|
52
|
+
/** Extra setup after the operation is opened (e.g. clearing indicators). */
|
|
56
53
|
protected onDragStart(): void;
|
|
57
|
-
protected onPointerMove(event: PointerEditorEvent): void;
|
|
58
54
|
protected onTick(event: TickEditorEvent): void;
|
|
59
55
|
protected onKeyDown(): void;
|
|
60
56
|
protected onKeyUp(): void;
|