@yuzhouu/canvas-kit 0.1.12 → 0.1.14
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 -238
- package/_vendor/canvas-core/bindings/bindingManager.d.ts +33 -0
- package/_vendor/canvas-core/bindings/bindingUtil.d.ts +7 -6
- package/_vendor/canvas-core/bindings/terminalBinding.d.ts +1 -1
- package/_vendor/canvas-core/editor/clipboard.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 -8
- 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 +15 -19
- 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} +22 -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} +4 -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 +21 -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 +35 -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/geometry/mat.d.ts +2 -3
- package/_vendor/canvas-core/index.d.ts +33 -26
- 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 -2
- package/_vendor/canvas-core/schema/snapshots.d.ts +2 -2
- package/_vendor/canvas-core/shapes/childTransformPolicy.d.ts +16 -0
- package/_vendor/canvas-core/shapes/shapeUtil.d.ts +9 -8
- 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 +2 -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/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 +4 -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/index.css +1 -1
- package/index.d.ts +16 -45
- package/index.mjs +46 -88
- package/package.json +3 -15
- package/react/CanvasKitContext.d.ts +8 -0
- package/react/CanvasKitRoot.d.ts +2 -10
- 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 +192 -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 +8 -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 -23
- 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 -22
- 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/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 -72
- package/chrome/useCanvasKitChromeContext.d.ts +0 -18
- package/chrome/useCanvasKitLayerTree.d.ts +0 -5
- 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 -9
- package/controller/canvasKitController.d.ts +0 -28
- package/core/index.d.ts +0 -7
- package/core/product-controller/canvasProductController.d.ts +0 -202
- package/core/product-controller/index.d.ts +0 -2
- package/core/product-controller/productLayerTree.d.ts +0 -10
- package/core/runtime/productAssets.d.ts +0 -20
- package/core/runtime/productEditor.d.ts +0 -3
- package/core/runtime/productServices.d.ts +0 -20
- package/core/runtime/runtimeContracts.d.ts +0 -17
- package/features/context-menu/contextMenuRuntime.d.ts +0 -13
- package/features/image/asset/imageAssetService.d.ts +0 -10
- package/features/image/asset/imageBlobStore.d.ts +0 -31
- package/features/image/asset/imageFileHelpers.d.ts +0 -43
- package/features/image/asset/svgImageAssetInliner.d.ts +0 -3
- package/features/image/controller/imageProductController.d.ts +0 -27
- package/features/image/imageHostPlugin.d.ts +0 -1
- package/features/image/import/ImageImportController.d.ts +0 -11
- package/features/image/index.d.ts +0 -15
- package/features/image/smudge/imageSmudgeHostActions.d.ts +0 -10
- package/features/image/smudge/imageSmudgeTypes.d.ts +0 -25
- package/features/image/toolbar/imageHostActions.d.ts +0 -79
- package/features/image/toolbar/imageToolbarHostBridge.d.ts +0 -14
- package/features/text/link/TextLinkHoverPopover.d.ts +0 -6
- package/features/text/textHostPlugin.d.ts +0 -5
- package/features/text/textSvgAssetInliner.d.ts +0 -3
- package/features/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 -8
- 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/useCanvasKitControllerLifecycle.d.ts +0 -8
- package/react/useCanvasKitRuntime.d.ts +0 -2
- package/runtime/canvasKitActionContext.d.ts +0 -17
- package/runtime/canvasKitCommandExecutor.d.ts +0 -13
- package/runtime/canvasKitPluginContracts.d.ts +0 -32
- package/runtime/canvasKitPluginLifecycle.d.ts +0 -32
- package/runtime/canvasKitPluginSetup.d.ts +0 -34
- package/runtime/canvasKitPluginUi.d.ts +0 -35
- package/runtime/canvasKitResourceScope.d.ts +0 -5
- package/runtime/canvasKitRuntime.d.ts +0 -50
- package/runtime/canvasKitRuntimeContracts.d.ts +0 -34
- 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,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Signal } from "../../../signals/index";
|
|
2
2
|
import { type TerminalBindingResolver, type TerminalBindingResolverInput, type ResolvedTerminalBinding } from "../../bindings/terminalBinding";
|
|
3
3
|
import type { Box } from "../../geometry/box";
|
|
4
4
|
import type { ShapeId } from "../../schema/records";
|
|
5
5
|
import type { Editor } from "../editor";
|
|
6
|
-
import type { BindingPreviewState, SnapIndicatorState, TerminalBindingGuideState } from "../selection";
|
|
6
|
+
import type { BindingPreviewState, SnapIndicatorState, TerminalBindingGuideState } from "../selection/selection";
|
|
7
7
|
export declare class InteractionTransientManager {
|
|
8
8
|
private readonly editor;
|
|
9
9
|
private readonly _brushBoxSignal;
|
|
10
10
|
readonly brushBoxSignal: Signal<Box | null>;
|
|
11
|
-
readonly brushBoxActiveSignal:
|
|
11
|
+
readonly brushBoxActiveSignal: Signal<boolean>;
|
|
12
12
|
private readonly _bindingPreviewSignal;
|
|
13
13
|
readonly bindingPreviewSignal: Signal<BindingPreviewState | null>;
|
|
14
|
-
readonly bindingPreviewActiveSignal:
|
|
14
|
+
readonly bindingPreviewActiveSignal: Signal<boolean>;
|
|
15
15
|
private readonly _terminalBindingGuidesSignal;
|
|
16
16
|
readonly terminalBindingGuidesSignal: Signal<TerminalBindingGuideState[]>;
|
|
17
17
|
private readonly _dropTargetShapeIdSignal;
|
|
@@ -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 {};
|
|
@@ -16,7 +16,6 @@ export declare class Mat {
|
|
|
16
16
|
static Identity(): Mat;
|
|
17
17
|
static Translate(x: number, y: number): Mat;
|
|
18
18
|
static Rotate(angle: number): Mat;
|
|
19
|
-
static SkewX(angle: number): Mat;
|
|
20
19
|
static Scale(sx: number, sy: number): Mat;
|
|
21
20
|
/** Compose: this × other */
|
|
22
21
|
compose(other: Mat): Mat;
|
|
@@ -27,6 +26,6 @@ export declare class Mat {
|
|
|
27
26
|
invert(): Mat;
|
|
28
27
|
toCssString(): string;
|
|
29
28
|
toSvgString(): string;
|
|
30
|
-
/** Create a transform for a shape: translate * rotate *
|
|
31
|
-
static ForShape(x: number, y: number, rotation: number, scaleX?: number, scaleY?: number
|
|
29
|
+
/** Create a transform for a shape: translate * rotate * scale. */
|
|
30
|
+
static ForShape(x: number, y: number, rotation: number, scaleX?: number, scaleY?: number): Mat;
|
|
32
31
|
}
|
|
@@ -1,54 +1,61 @@
|
|
|
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, getSelectionResizeBounds, 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";
|
|
31
37
|
export { ShapeUtil } from "./shapes/shapeUtil";
|
|
32
|
-
export
|
|
33
|
-
export type {
|
|
38
|
+
export { CHILD_TRANSFORM_POLICY_EPSILON, formatChildTransformPolicyViolation, getChildTransformPolicyViolation, } from "./shapes/childTransformPolicy";
|
|
39
|
+
export type { ChildTransformPolicy, ChildTransformPolicyProvider, ChildTransformPolicyViolation, } from "./shapes/childTransformPolicy";
|
|
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";
|
|
41
|
+
export type { HandleSnapContext, HandleSnapInput, HandleSnapMode, HandleSnapResult, HandleSnapSnapshot, HandleSnapSnapshotInput, ResizeSnapInput, ResizeSnapResult, ResizeSnapSnapshot, SnapAxis, SnapCoordinateSpace, SnapPointIndex, SnapPointIndexEntry, SnapPointKind, TranslateSnapInput, TranslateSnapResult, TranslateSnapSnapshot, } from "./editor/snapping/snapTypes";
|
|
34
42
|
export { ShapeUtilRegistry } from "./shapes/shapeUtilRegistry";
|
|
35
43
|
export { resolveTerminalBindingAtPoint, } from "./bindings/terminalBinding";
|
|
36
44
|
export { ShapeSvgExporterRegistry, exportShapesToSvgString, renderSvgNode, } from "./exports/svg";
|
|
37
45
|
export type { ShapeSvgExporter, SvgAttributeValue, SvgElementNode, SvgExportContext, SvgExportOptions, SvgExportResult, SvgExportSkipReason, SvgExportSkippedShape, SvgNode, } from "./exports/svg";
|
|
38
46
|
export { getExportIntegrityReport, repairExportIntegrity, } from "./exports/integrity";
|
|
39
47
|
export type { ExportIntegrityIssue, ExportIntegrityIssueKind, ExportIntegrityRepairResult, ExportIntegrityReport, } from "./exports/integrity";
|
|
40
|
-
export { getShapeCapabilityManifest } from "./shapes/capabilities";
|
|
41
|
-
export type { ShapeCapabilityDefinition, ShapeCapabilityManifest, ShapeCapabilityManifestEntry, ShapeCapabilitySupport, } from "./shapes/capabilities";
|
|
42
48
|
export { BindingUtil } from "./bindings/bindingUtil";
|
|
43
49
|
export type { BindingSelectionCompanionFrameContext, BindingTargetShapeContentCutoutContext, BindingUtilEffect, } from "./bindings/bindingUtil";
|
|
44
50
|
export { BindingUtilRegistry } from "./bindings/bindingUtilRegistry";
|
|
45
|
-
export { StateNode } from "./
|
|
46
|
-
export {
|
|
51
|
+
export { StateNode } from "./tools/stateNode";
|
|
52
|
+
export type { StateNodeEvent } from "./tools/stateNode";
|
|
53
|
+
export { getEdgeScrollDelta } from "./editor/viewport/edgeScroll";
|
|
47
54
|
export { HandTool } from "./tools/hand/handTool";
|
|
48
55
|
export { SelectTool } from "./tools/select/selectTool";
|
|
49
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";
|
|
50
57
|
export type { CustomShapeColorRef, ShapeColor, ThemeColorSlot, ThemeColorResolver, ThemeColorTokenName, ThemeShapeColorRef, } from "./shapes/colors";
|
|
51
|
-
export {
|
|
58
|
+
export { type EditorPlugin, createEditorRuntimeToken, EditorRuntimeRegistry, type EditorRuntimeToken, } from "./plugins";
|
|
52
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";
|
|
53
60
|
export { Vec } from "./geometry/vec";
|
|
54
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";
|
|
@@ -21,7 +21,7 @@ export interface ShapeEditingEntryRequest {
|
|
|
21
21
|
}
|
|
22
22
|
export interface ShapeEditingSession {
|
|
23
23
|
shapeId: ShapeId;
|
|
24
|
-
|
|
24
|
+
operationKind: string;
|
|
25
25
|
entryMode: ShapeEditingEntryMode;
|
|
26
26
|
caretPagePoint?: ShapeEditingPoint;
|
|
27
27
|
isComposing: boolean;
|
|
@@ -59,7 +59,6 @@ export interface ShapeRecordBase<Type extends string = string, Props extends obj
|
|
|
59
59
|
x: number;
|
|
60
60
|
y: number;
|
|
61
61
|
rotation: number;
|
|
62
|
-
skewX: number;
|
|
63
62
|
scaleX: number;
|
|
64
63
|
scaleY: number;
|
|
65
64
|
opacity: number;
|
|
@@ -2,12 +2,12 @@ import type { ShapeUtilRegistry } from "../shapes/shapeUtilRegistry";
|
|
|
2
2
|
import type { BindingUtilRegistry } from "../bindings/bindingUtilRegistry";
|
|
3
3
|
import type { StoreSnapshot } from "../../store/index";
|
|
4
4
|
import { type DocumentRecord, type SessionRecord } from "./records";
|
|
5
|
-
export type DocumentSnapshot = StoreSnapshot<DocumentRecord,
|
|
5
|
+
export type DocumentSnapshot = StoreSnapshot<DocumentRecord, 3>;
|
|
6
6
|
export type SessionSnapshot = StoreSnapshot<SessionRecord, 1>;
|
|
7
7
|
export declare class SnapshotParseError extends Error {
|
|
8
8
|
constructor(message: string);
|
|
9
9
|
}
|
|
10
|
-
declare const CURRENT_DOCUMENT_SNAPSHOT_VERSION:
|
|
10
|
+
declare const CURRENT_DOCUMENT_SNAPSHOT_VERSION: 3;
|
|
11
11
|
declare const CURRENT_SESSION_SNAPSHOT_VERSION: 1;
|
|
12
12
|
export declare function getSnapshotEnvelope(snapshot: unknown, kind: "document"): {
|
|
13
13
|
schemaVersion: typeof CURRENT_DOCUMENT_SNAPSHOT_VERSION;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ShapeRecordBase } from "../schema/records";
|
|
2
|
+
export type ChildTransformPolicy = "isometry" | "similarity";
|
|
3
|
+
export declare const CHILD_TRANSFORM_POLICY_EPSILON = 1e-8;
|
|
4
|
+
export interface ChildTransformPolicyProvider<S extends ShapeRecordBase = ShapeRecordBase> {
|
|
5
|
+
canReceiveChildren(shape: S): boolean;
|
|
6
|
+
getChildTransformPolicy(shape: S): ChildTransformPolicy;
|
|
7
|
+
}
|
|
8
|
+
export interface ChildTransformPolicyViolation {
|
|
9
|
+
shapeId: ShapeRecordBase["id"];
|
|
10
|
+
shapeType: ShapeRecordBase["type"];
|
|
11
|
+
policy: ChildTransformPolicy;
|
|
12
|
+
scaleX: number;
|
|
13
|
+
scaleY: number;
|
|
14
|
+
}
|
|
15
|
+
export declare function getChildTransformPolicyViolation<S extends ShapeRecordBase>(shape: S, provider: ChildTransformPolicyProvider<S>, epsilon?: number): ChildTransformPolicyViolation | null;
|
|
16
|
+
export declare function formatChildTransformPolicyViolation(violation: ChildTransformPolicyViolation): string;
|
|
@@ -2,11 +2,12 @@ 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
|
+
import type { ChildTransformPolicy } from "./childTransformPolicy";
|
|
10
11
|
export interface ShapeEditEndResult {
|
|
11
12
|
deleteShapeIds?: ShapeId[];
|
|
12
13
|
}
|
|
@@ -94,8 +95,6 @@ export interface ShapePointHitTestInput extends ShapeGeometryInput {
|
|
|
94
95
|
pagePoint: Vec;
|
|
95
96
|
positionedPoint: Vec;
|
|
96
97
|
}
|
|
97
|
-
export interface ShapeBindingTargetHitTestInput extends ShapePointHitTestInput {
|
|
98
|
-
}
|
|
99
98
|
export interface ShapeTerminalBindingOutline {
|
|
100
99
|
points: readonly Vec[];
|
|
101
100
|
closed: boolean;
|
|
@@ -223,9 +222,12 @@ export declare abstract class ShapeUtil<S extends ShapeRecordBase = ShapeRecordB
|
|
|
223
222
|
getLabelPathGeometry(_shape: S, _input: ShapeSelectionOverlayInfoInput): ShapeLabelPathGeometry | null;
|
|
224
223
|
isWrappedByBrush(_shape: S, input: ShapeBrushWrapInput): boolean;
|
|
225
224
|
canSelectByBrush(shape: S, input: ShapeBrushSelectInput): boolean;
|
|
226
|
-
|
|
225
|
+
/** Builds the local transform encoded by this record's transform fields. */
|
|
226
|
+
getLocalTransform(shape: S): Mat;
|
|
227
|
+
getPositionedTransform(shape: S): Mat;
|
|
227
228
|
canEdit(_shape: S): boolean;
|
|
228
229
|
canReceiveChildren(_shape: S): boolean;
|
|
230
|
+
getChildTransformPolicy(_shape: S): ChildTransformPolicy;
|
|
229
231
|
canReceiveChild(shape: S, _child: ShapeRecordBase): boolean;
|
|
230
232
|
isChildVisible(_shape: S, _child: ShapeRecordBase, _input: ShapeChildVisibilityInput): boolean;
|
|
231
233
|
getChildPlacementMeta(_shape: S, child: ShapeRecordBase, _input: ShapeChildPlacementInput): Record<string, unknown>;
|
|
@@ -235,10 +237,9 @@ 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
|
-
hitTestBindingTarget(shape: S, positionedPoint: Vec, input?:
|
|
242
|
+
hitTestBindingTarget(shape: S, positionedPoint: Vec, input?: ShapePointHitTestInput): boolean;
|
|
242
243
|
hitTestLineSegment(shape: S, input: ShapeLineSegmentHitTestInput): boolean;
|
|
243
244
|
resolveBindingPoint(shape: S, input: ShapeBindingPointInput): Vec;
|
|
244
245
|
}
|
|
@@ -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
|
}
|