@weasel-js/core 1.11.0 → 1.12.0
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/CHANGELOG.md +611 -0
- package/README.md +1 -1
- package/dist/WeaselProvider.js +1 -1
- package/dist/affordances/pathAnchors.js +10 -6
- package/dist/affordances/pathAnchors.js.map +1 -1
- package/dist/animation/index.js +3 -3
- package/dist/animation/rig/bindRig.js +1 -1
- package/dist/animation/rig/rigNode.js.map +1 -1
- package/dist/barrel/canvas.js +9 -3
- package/dist/barrel/interactions.js +5 -4
- package/dist/barrel/paint.js +4 -4
- package/dist/barrel/paths.js +10 -6
- package/dist/barrel/renderer.js +5 -3
- package/dist/barrel/routing.js +7 -12
- package/dist/barrel/scene.js +9 -5
- package/dist/barrel/text.js +2 -2
- package/dist/barrel/viewport.js +9 -4
- package/dist/canvas/Canvas.js +5 -2
- package/dist/canvas/Canvas.js.map +1 -1
- package/dist/canvas/CanvasView.js +23 -34
- package/dist/canvas/CanvasView.js.map +1 -1
- package/dist/canvas/ModalityHud.js +1 -1
- package/dist/canvas/NodeShape.js +4 -1
- package/dist/canvas/NodeShape.js.map +1 -1
- package/dist/canvas/SceneCanvas/ActionsProviderIfRoot.js +1 -1
- package/dist/canvas/SceneCanvas/DepRegistryProviderIfRoot.js +1 -1
- package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js +1 -1
- package/dist/canvas/SceneCanvas/SceneCanvasInput.js +17 -3
- package/dist/canvas/SceneCanvas/SceneCanvasInput.js.map +1 -1
- package/dist/canvas/SceneCanvas/SurfaceDeclarations.js +23 -0
- package/dist/canvas/SceneCanvas/SurfaceDeclarations.js.map +1 -0
- package/dist/canvas/SceneCanvas/builtinToolSets.js +30 -0
- package/dist/canvas/SceneCanvas/builtinToolSets.js.map +1 -0
- package/dist/canvas/SceneCanvas/canvasPassThrough.js +2 -0
- package/dist/canvas/SceneCanvas/canvasPassThrough.js.map +1 -1
- package/dist/canvas/SceneCanvas/coordTrace.js +5 -16
- package/dist/canvas/SceneCanvas/coordTrace.js.map +1 -1
- package/dist/canvas/SceneCanvas/defaultNodeProperties.js +5 -0
- package/dist/canvas/SceneCanvas/defaultNodeProperties.js.map +1 -1
- package/dist/canvas/SceneCanvas/features.js +45 -5
- package/dist/canvas/SceneCanvas/features.js.map +1 -1
- package/dist/canvas/SceneCanvas/props.js +1 -11
- package/dist/canvas/SceneCanvas/props.js.map +1 -1
- package/dist/canvas/SceneCanvas/scenePointQuery.js +7 -3
- package/dist/canvas/SceneCanvas/scenePointQuery.js.map +1 -1
- package/dist/canvas/SceneCanvas/toolRegistry.js +8 -4
- package/dist/canvas/SceneCanvas/toolRegistry.js.map +1 -1
- package/dist/canvas/SceneCanvas/useActionTunings.js +6 -1
- package/dist/canvas/SceneCanvas/useActionTunings.js.map +1 -1
- package/dist/canvas/SceneCanvas/useActionsPropResolver.js +1 -11
- package/dist/canvas/SceneCanvas/useActionsPropResolver.js.map +1 -1
- package/dist/canvas/SceneCanvas/useBuiltinShapeTools.js.map +1 -1
- package/dist/canvas/SceneCanvas/useBuiltinTools.js +2 -9
- package/dist/canvas/SceneCanvas/useBuiltinTools.js.map +1 -1
- package/dist/canvas/SceneCanvas/useCanvasDevtoolsRoot.js +94 -0
- package/dist/canvas/SceneCanvas/useCanvasDevtoolsRoot.js.map +1 -0
- package/dist/canvas/SceneCanvas/useCanvasSelection.js +7 -2
- package/dist/canvas/SceneCanvas/useCanvasSelection.js.map +1 -1
- package/dist/canvas/SceneCanvas/useCanvasTools.js +15 -10
- package/dist/canvas/SceneCanvas/useCanvasTools.js.map +1 -1
- package/dist/canvas/SceneCanvas/useNodeKinds.js +1 -1
- package/dist/canvas/SceneCanvas/useNodeKinds.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneCanvasHandle.js +9 -3
- package/dist/canvas/SceneCanvas/useSceneCanvasHandle.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneCanvasLayers.js +23 -4
- package/dist/canvas/SceneCanvas/useSceneCanvasLayers.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneCanvasTools.js +2 -3
- package/dist/canvas/SceneCanvas/useSceneCanvasTools.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneChrome.js +6 -7
- package/dist/canvas/SceneCanvas/useSceneChrome.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneGestureDispatcher.js +24 -7
- package/dist/canvas/SceneCanvas/useSceneGestureDispatcher.js.map +1 -1
- package/dist/canvas/SceneCanvas/useScenePicking.js +2 -3
- package/dist/canvas/SceneCanvas/useScenePicking.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneSelectTool.js +2 -1
- package/dist/canvas/SceneCanvas/useSceneSelectTool.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneStandardActions.js +5 -5
- package/dist/canvas/SceneCanvas/useSceneStandardActions.js.map +1 -1
- package/dist/canvas/SceneCanvas.js +27 -24
- package/dist/canvas/SceneCanvas.js.map +1 -1
- package/dist/canvas/SurfaceCanvas.js +5 -22
- package/dist/canvas/SurfaceCanvas.js.map +1 -1
- package/dist/canvas/ViewMarker.js +35 -0
- package/dist/canvas/ViewMarker.js.map +1 -0
- package/dist/canvas/canvasRenderer.js +9 -5
- package/dist/canvas/canvasRenderer.js.map +1 -1
- package/dist/canvas/contextAttributes.js +14 -0
- package/dist/canvas/contextAttributes.js.map +1 -0
- package/dist/canvas/defaultDrawOne.js +2 -0
- package/dist/canvas/defaultDrawOne.js.map +1 -1
- package/dist/canvas/deps/booleans.js +2 -1
- package/dist/canvas/deps/booleans.js.map +1 -1
- package/dist/canvas/deps/editAnchors.js +9 -113
- package/dist/canvas/deps/editAnchors.js.map +1 -1
- package/dist/canvas/deps/hitTestArea.js +2 -2
- package/dist/canvas/deps/hitTestArea.js.map +1 -1
- package/dist/canvas/deps/insert.js +10 -4
- package/dist/canvas/deps/insert.js.map +1 -1
- package/dist/canvas/deps/pathEditCommits.js +189 -0
- package/dist/canvas/deps/pathEditCommits.js.map +1 -0
- package/dist/canvas/deps/snap.js +12 -9
- package/dist/canvas/deps/snap.js.map +1 -1
- package/dist/canvas/deps/transformFollowers.js +20 -0
- package/dist/canvas/deps/transformFollowers.js.map +1 -0
- package/dist/canvas/derivedPath.js +20 -1
- package/dist/canvas/derivedPath.js.map +1 -1
- package/dist/canvas/drawnBounds.js +38 -4
- package/dist/canvas/drawnBounds.js.map +1 -1
- package/dist/canvas/inheritedPaints.js +44 -0
- package/dist/canvas/inheritedPaints.js.map +1 -0
- package/dist/canvas/nodeShapes/derivedPainter.js +23 -16
- package/dist/canvas/nodeShapes/derivedPainter.js.map +1 -1
- package/dist/canvas/nodeShapes/nodePaint.js +13 -34
- package/dist/canvas/nodeShapes/nodePaint.js.map +1 -1
- package/dist/canvas/nodeShapes/pathPainter.js +12 -10
- package/dist/canvas/nodeShapes/pathPainter.js.map +1 -1
- package/dist/canvas/nodeShapes/rectFallbackPainter.js +4 -5
- package/dist/canvas/nodeShapes/rectFallbackPainter.js.map +1 -1
- package/dist/canvas/nodeShapes/shapePainter.js +12 -11
- package/dist/canvas/nodeShapes/shapePainter.js.map +1 -1
- package/dist/canvas/nodeShapes/textPainter.js +13 -12
- package/dist/canvas/nodeShapes/textPainter.js.map +1 -1
- package/dist/canvas/overlayRoleStrokes.js +12 -0
- package/dist/canvas/overlayRoleStrokes.js.map +1 -1
- package/dist/canvas/pathOverlay.js +27 -7
- package/dist/canvas/pathOverlay.js.map +1 -1
- package/dist/canvas/pickReach.js +3 -3
- package/dist/canvas/pickReach.js.map +1 -1
- package/dist/canvas/pickWalk.js +3 -1
- package/dist/canvas/pickWalk.js.map +1 -1
- package/dist/canvas/renderDebugSnapshot.js +1 -0
- package/dist/canvas/renderDebugSnapshot.js.map +1 -1
- package/dist/canvas/renderSceneToPixels.js +7 -6
- package/dist/canvas/renderSceneToPixels.js.map +1 -1
- package/dist/canvas/sceneAdapter.js.map +1 -1
- package/dist/canvas/sceneSlotWiring.js +2 -1
- package/dist/canvas/sceneSlotWiring.js.map +1 -1
- package/dist/canvas/sceneViewRender.js +2 -1
- package/dist/canvas/sceneViewRender.js.map +1 -1
- package/dist/canvas/surfaceContribution.js +12 -8
- package/dist/canvas/surfaceContribution.js.map +1 -1
- package/dist/canvas/useCanvasPaint.js +2 -1
- package/dist/canvas/useCanvasPaint.js.map +1 -1
- package/dist/canvas/useCanvasView.js +4 -2
- package/dist/canvas/useCanvasView.js.map +1 -1
- package/dist/canvas/useInFlightBounds.js +52 -0
- package/dist/canvas/useInFlightBounds.js.map +1 -0
- package/dist/canvas/useLayerStack.js +6 -2
- package/dist/canvas/useLayerStack.js.map +1 -1
- package/dist/canvas/useViewAim.js +121 -0
- package/dist/canvas/useViewAim.js.map +1 -0
- package/dist/canvas/useViewHelpers.js +7 -9
- package/dist/canvas/useViewHelpers.js.map +1 -1
- package/dist/canvas/useViewNesting.js +3 -2
- package/dist/canvas/useViewNesting.js.map +1 -1
- package/dist/canvas/useViewRegistrySurface.js +4 -2
- package/dist/canvas/useViewRegistrySurface.js.map +1 -1
- package/dist/canvas/viewMarkers.js +63 -0
- package/dist/canvas/viewMarkers.js.map +1 -0
- package/dist/canvas/viewRegistry.js +27 -1
- package/dist/canvas/viewRegistry.js.map +1 -1
- package/dist/clipboard.d.ts +3 -2
- package/dist/{clone-DZDrfIlU.d.ts → clone-C3e0OTuF.d.ts} +8 -21
- package/dist/clone.d.ts +4 -3
- package/dist/core/geometry/autoPoseDescriptor.js +1 -1
- package/dist/core/ops/setDependsOn.js +37 -0
- package/dist/core/ops/setDependsOn.js.map +1 -0
- package/dist/core/ops/writtenBy.js +53 -0
- package/dist/core/ops/writtenBy.js.map +1 -0
- package/dist/core/pages/fitViewToPage.js +12 -1
- package/dist/core/pages/fitViewToPage.js.map +1 -1
- package/dist/core/pages/pageEdits.js +163 -0
- package/dist/core/pages/pageEdits.js.map +1 -0
- package/dist/core/pages/pages.js +30 -1
- package/dist/core/pages/pages.js.map +1 -1
- package/dist/core/paint/meshKindLazy.js +59 -2
- package/dist/core/paint/meshKindLazy.js.map +1 -1
- package/dist/core/scene/NodeRouting.js +8 -3
- package/dist/core/scene/NodeRouting.js.map +1 -1
- package/dist/core/scene/arrivalWindow.js.map +1 -1
- package/dist/core/scene/carryDescendants.js +51 -0
- package/dist/core/scene/carryDescendants.js.map +1 -0
- package/dist/core/scene/clipNothing.js +13 -0
- package/dist/core/scene/clipNothing.js.map +1 -0
- package/dist/core/scene/depMemo.js +11 -3
- package/dist/core/scene/depMemo.js.map +1 -1
- package/dist/core/scene/dependents.js +7 -1
- package/dist/core/scene/dependents.js.map +1 -1
- package/dist/core/scene/derivedParts.js +10 -11
- package/dist/core/scene/derivedParts.js.map +1 -1
- package/dist/core/scene/docValues.js +57 -0
- package/dist/core/scene/docValues.js.map +1 -0
- package/dist/core/scene/editPass.js +111 -0
- package/dist/core/scene/editPass.js.map +1 -0
- package/dist/core/scene/effectivePose.js +13 -2
- package/dist/core/scene/effectivePose.js.map +1 -1
- package/dist/core/scene/fieldEdits.js +4 -1
- package/dist/core/scene/fieldEdits.js.map +1 -1
- package/dist/core/scene/fontReads.js +37 -0
- package/dist/core/scene/fontReads.js.map +1 -0
- package/dist/core/scene/historyFacade.js +1 -0
- package/dist/core/scene/historyFacade.js.map +1 -1
- package/dist/core/scene/inheritedPaint.js +75 -0
- package/dist/core/scene/inheritedPaint.js.map +1 -0
- package/dist/core/scene/kitRegistry.js +5 -0
- package/dist/core/scene/kitRegistry.js.map +1 -1
- package/dist/core/scene/layoutPass.js +28 -3
- package/dist/core/scene/layoutPass.js.map +1 -1
- package/dist/core/scene/nodeMemo.js +15 -7
- package/dist/core/scene/nodeMemo.js.map +1 -1
- package/dist/core/scene/pathEffects/blend.js.map +1 -1
- package/dist/core/scene/pathEffects/derive.js +7 -2
- package/dist/core/scene/pathEffects/derive.js.map +1 -1
- package/dist/core/scene/pathEffects/effects.js +3 -1
- package/dist/core/scene/pathEffects/effects.js.map +1 -1
- package/dist/core/scene/pathEffects/textAlong.js +95 -0
- package/dist/core/scene/pathEffects/textAlong.js.map +1 -0
- package/dist/core/scene/recorder.js +28 -19
- package/dist/core/scene/recorder.js.map +1 -1
- package/dist/core/scene/scene.js +15 -9
- package/dist/core/scene/scene.js.map +1 -1
- package/dist/core/scene/sceneChanges.js +13 -0
- package/dist/core/scene/sceneChanges.js.map +1 -0
- package/dist/core/scene/sceneEdits.js +8 -1
- package/dist/core/scene/sceneEdits.js.map +1 -1
- package/dist/core/scene/sceneMutators.js +1 -0
- package/dist/core/scene/sceneMutators.js.map +1 -1
- package/dist/core/scene/sceneRecording.js +20 -3
- package/dist/core/scene/sceneRecording.js.map +1 -1
- package/dist/core/scene/sceneSelection.js +4 -1
- package/dist/core/scene/sceneSelection.js.map +1 -1
- package/dist/core/scene/sceneState.js +11 -5
- package/dist/core/scene/sceneState.js.map +1 -1
- package/dist/core/scene/serialization.js +5 -3
- package/dist/core/scene/serialization.js.map +1 -1
- package/dist/core/scene/types.js.map +1 -1
- package/dist/core/scene/unitScopes.js +19 -1
- package/dist/core/scene/unitScopes.js.map +1 -1
- package/dist/core/selection/usePublishSceneSelection.js +6 -12
- package/dist/core/selection/usePublishSceneSelection.js.map +1 -1
- package/dist/core/shapeKinds.js +25 -11
- package/dist/core/shapeKinds.js.map +1 -1
- package/dist/{cornerHandles-Camw_yeu.d.ts → cornerHandles-p8fDIAKt.d.ts} +3 -2
- package/dist/debug/createDebugOverlayLayer.js +16 -111
- package/dist/debug/createDebugOverlayLayer.js.map +1 -1
- package/dist/debug/createDebugSink.js +2 -1
- package/dist/debug/createDebugSink.js.map +1 -1
- package/dist/debug/defaultTheme.js +4 -2
- package/dist/debug/defaultTheme.js.map +1 -1
- package/dist/debug/features.js +17 -0
- package/dist/debug/features.js.map +1 -0
- package/dist/debug/overlayPanels.js +117 -0
- package/dist/debug/overlayPanels.js.map +1 -0
- package/dist/debug/parseDebugFlags.js +4 -13
- package/dist/debug/parseDebugFlags.js.map +1 -1
- package/dist/{depSchema-Cgfu_G9s.d.ts → depSchema-mG19aEdD.d.ts} +174 -904
- package/dist/devtools/handlers.js +112 -0
- package/dist/devtools/handlers.js.map +1 -0
- package/dist/devtools/history.js +71 -0
- package/dist/devtools/history.js.map +1 -0
- package/dist/devtools/hook.js +74 -0
- package/dist/devtools/hook.js.map +1 -0
- package/dist/devtools/label.js +25 -0
- package/dist/devtools/label.js.map +1 -0
- package/dist/devtools/notices.js +58 -0
- package/dist/devtools/notices.js.map +1 -0
- package/dist/devtools/protocol.js +7 -0
- package/dist/devtools/protocol.js.map +1 -0
- package/dist/devtools/registry.js +90 -0
- package/dist/devtools/registry.js.map +1 -0
- package/dist/devtools/root.js +80 -0
- package/dist/devtools/root.js.map +1 -0
- package/dist/devtools/serialize.js +86 -0
- package/dist/devtools/serialize.js.map +1 -0
- package/dist/devtools/session.js +111 -0
- package/dist/devtools/session.js.map +1 -0
- package/dist/devtools/transport.js +67 -0
- package/dist/devtools/transport.js.map +1 -0
- package/dist/devtools/useDevtoolsRoot.js +81 -0
- package/dist/devtools/useDevtoolsRoot.js.map +1 -0
- package/dist/devtools-protocol.d.ts +435 -0
- package/dist/devtools-protocol.js +7 -0
- package/dist/devtools.d.ts +8 -0
- package/dist/devtools.js +12 -0
- package/dist/devtools.js.map +1 -0
- package/dist/features/chrome-caps/useHoverTracking.js +16 -10
- package/dist/features/chrome-caps/useHoverTracking.js.map +1 -1
- package/dist/features/ingestion/contentHandlers.js +25 -2
- package/dist/features/ingestion/contentHandlers.js.map +1 -1
- package/dist/features/measure/measureCommands.js +7 -5
- package/dist/features/measure/measureCommands.js.map +1 -1
- package/dist/features/measure/measureContribution.js +4 -2
- package/dist/features/measure/measureContribution.js.map +1 -1
- package/dist/features/modes/modeTriggers.js +7 -3
- package/dist/features/modes/modeTriggers.js.map +1 -1
- package/dist/features/pathEffects/effectSources.js +60 -0
- package/dist/features/pathEffects/effectSources.js.map +1 -0
- package/dist/features/pathEffects/readSource.js +17 -1
- package/dist/features/pathEffects/readSource.js.map +1 -1
- package/dist/features/pathEffects/textItems.js +53 -0
- package/dist/features/pathEffects/textItems.js.map +1 -0
- package/dist/features/pathEffects/useEffectSourcesLayer.js +57 -0
- package/dist/features/pathEffects/useEffectSourcesLayer.js.map +1 -0
- package/dist/features/paths/index.js +2 -2
- package/dist/features/paths/pathEditExtension.js.map +1 -1
- package/dist/features/paths/pathEditState.js +5 -2
- package/dist/features/paths/pathEditState.js.map +1 -1
- package/dist/features/paths/pathSnap/pathSnapSource.js +5 -5
- package/dist/features/paths/pathSnap/pathSnapSource.js.map +1 -1
- package/dist/features/paths/pathSnap/sceneIndex.js +10 -3
- package/dist/features/paths/pathSnap/sceneIndex.js.map +1 -1
- package/dist/features/selection/selectionPose.js +4 -1
- package/dist/features/selection/selectionPose.js.map +1 -1
- package/dist/features/snap/gather.js +9 -1
- package/dist/features/snap/gather.js.map +1 -1
- package/dist/features/snap/lazySession.js +17 -0
- package/dist/features/snap/lazySession.js.map +1 -0
- package/dist/features/snap/marks.js.map +1 -1
- package/dist/features/snap/probes2d.js +27 -19
- package/dist/features/snap/probes2d.js.map +1 -1
- package/dist/features/snap/readoutLayer.js.map +1 -1
- package/dist/features/snap/roles.js +2 -1
- package/dist/features/snap/roles.js.map +1 -1
- package/dist/features/snap/rotationSource.js +25 -8
- package/dist/features/snap/rotationSource.js.map +1 -1
- package/dist/features/snap/sceneSession2d.js +6 -4
- package/dist/features/snap/sceneSession2d.js.map +1 -1
- package/dist/features/snap/session2d.js +37 -23
- package/dist/features/snap/session2d.js.map +1 -1
- package/dist/features/snap/spanSnap.js +5 -2
- package/dist/features/snap/spanSnap.js.map +1 -1
- package/dist/features/text/sceneTextDrafts.js +65 -0
- package/dist/features/text/sceneTextDrafts.js.map +1 -0
- package/dist/features/text/textHitAt.js +31 -2
- package/dist/features/text/textHitAt.js.map +1 -1
- package/dist/features/text/useSceneTextEdit.js +22 -18
- package/dist/features/text/useSceneTextEdit.js.map +1 -1
- package/dist/features/viewports/aim.js +105 -0
- package/dist/features/viewports/aim.js.map +1 -0
- package/dist/features/viewports/viewMarker.js +82 -0
- package/dist/features/viewports/viewMarker.js.map +1 -0
- package/dist/features/viewports/viewMarkerDrag.js +55 -0
- package/dist/features/viewports/viewMarkerDrag.js.map +1 -0
- package/dist/icons.table.js +1 -1
- package/dist/icons.table.js.map +1 -1
- package/dist/icons.table.json +0 -10
- package/dist/index.d.ts +1198 -894
- package/dist/index.js +55 -38
- package/dist/interactions/actions/align/action.js +6 -4
- package/dist/interactions/actions/align/action.js.map +1 -1
- package/dist/interactions/actions/align/align.js.map +1 -1
- package/dist/interactions/actions/booleans/action.js +7 -1
- package/dist/interactions/actions/booleans/action.js.map +1 -1
- package/dist/interactions/actions/booleans/booleans.js +2 -1
- package/dist/interactions/actions/booleans/booleans.js.map +1 -1
- package/dist/interactions/actions/booleans/operands.js +6 -5
- package/dist/interactions/actions/booleans/operands.js.map +1 -1
- package/dist/interactions/actions/clipboard/action.js +27 -17
- package/dist/interactions/actions/clipboard/action.js.map +1 -1
- package/dist/interactions/actions/clone/action.js +1 -1
- package/dist/interactions/actions/clone/behaviors.js +4 -4
- package/dist/interactions/actions/clone/behaviors.js.map +1 -1
- package/dist/interactions/actions/defaults/anchorEditing.js +44 -23
- package/dist/interactions/actions/defaults/anchorEditing.js.map +1 -1
- package/dist/interactions/actions/defaults/anchorJoin.js +12 -6
- package/dist/interactions/actions/defaults/anchorJoin.js.map +1 -1
- package/dist/interactions/actions/defaults/bendSegment.js +8 -5
- package/dist/interactions/actions/defaults/bendSegment.js.map +1 -1
- package/dist/interactions/actions/defaults/cancelGesture.js +11 -8
- package/dist/interactions/actions/defaults/cancelGesture.js.map +1 -1
- package/dist/interactions/actions/defaults/contextMenu.js +17 -8
- package/dist/interactions/actions/defaults/contextMenu.js.map +1 -1
- package/dist/interactions/actions/defaults/createPaintAction.js +2 -2
- package/dist/interactions/actions/defaults/createPaintAction.js.map +1 -1
- package/dist/interactions/actions/defaults/delete.js +64 -41
- package/dist/interactions/actions/defaults/delete.js.map +1 -1
- package/dist/interactions/actions/defaults/duplicate.js +12 -9
- package/dist/interactions/actions/defaults/duplicate.js.map +1 -1
- package/dist/interactions/actions/defaults/enterPathEdit.js +19 -9
- package/dist/interactions/actions/defaults/enterPathEdit.js.map +1 -1
- package/dist/interactions/actions/defaults/escape.js +11 -8
- package/dist/interactions/actions/defaults/escape.js.map +1 -1
- package/dist/interactions/actions/defaults/exitPathEdit.js +7 -4
- package/dist/interactions/actions/defaults/exitPathEdit.js.map +1 -1
- package/dist/interactions/actions/defaults/group.js +21 -15
- package/dist/interactions/actions/defaults/group.js.map +1 -1
- package/dist/interactions/actions/defaults/ingest.js +17 -9
- package/dist/interactions/actions/defaults/ingest.js.map +1 -1
- package/dist/interactions/actions/defaults/insertPathAnchor.js +7 -4
- package/dist/interactions/actions/defaults/insertPathAnchor.js.map +1 -1
- package/dist/interactions/actions/defaults/nudge.js +21 -40
- package/dist/interactions/actions/defaults/nudge.js.map +1 -1
- package/dist/interactions/actions/defaults/pathEditTools.js +11 -8
- package/dist/interactions/actions/defaults/pathEditTools.js.map +1 -1
- package/dist/interactions/actions/defaults/pinchZoom.js +7 -4
- package/dist/interactions/actions/defaults/pinchZoom.js.map +1 -1
- package/dist/interactions/actions/defaults/reorder.js +24 -6
- package/dist/interactions/actions/defaults/reorder.js.map +1 -1
- package/dist/interactions/actions/defaults/selectAll.js +8 -5
- package/dist/interactions/actions/defaults/selectAll.js.map +1 -1
- package/dist/interactions/actions/defaults/setFill.js +7 -3
- package/dist/interactions/actions/defaults/setFill.js.map +1 -1
- package/dist/interactions/actions/defaults/setFillOpacity.js +1 -1
- package/dist/interactions/actions/defaults/setStroke.js +12 -11
- package/dist/interactions/actions/defaults/setStroke.js.map +1 -1
- package/dist/interactions/actions/defaults/setStrokeOpacity.js +1 -1
- package/dist/interactions/actions/defaults/toolActivate.js +7 -1
- package/dist/interactions/actions/defaults/toolActivate.js.map +1 -1
- package/dist/interactions/actions/defaults/toolResetToDefault.js +7 -4
- package/dist/interactions/actions/defaults/toolResetToDefault.js.map +1 -1
- package/dist/interactions/actions/defaults/undoRedo.js +19 -13
- package/dist/interactions/actions/defaults/undoRedo.js.map +1 -1
- package/dist/interactions/actions/defaults/viewportWheelPan.js +16 -7
- package/dist/interactions/actions/defaults/viewportWheelPan.js.map +1 -1
- package/dist/interactions/actions/defaults/viewportZoom.js +24 -6
- package/dist/interactions/actions/defaults/viewportZoom.js.map +1 -1
- package/dist/interactions/actions/distribute/action.js +6 -4
- package/dist/interactions/actions/distribute/action.js.map +1 -1
- package/dist/interactions/actions/drawnBoxes.js +2 -1
- package/dist/interactions/actions/drawnBoxes.js.map +1 -1
- package/dist/interactions/actions/edit-anchors/action.js +10 -10
- package/dist/interactions/actions/edit-anchors/action.js.map +1 -1
- package/dist/interactions/actions/edit-anchors/preview.js +41 -8
- package/dist/interactions/actions/edit-anchors/preview.js.map +1 -1
- package/dist/interactions/actions/flip/action.js +14 -6
- package/dist/interactions/actions/flip/action.js.map +1 -1
- package/dist/interactions/actions/gestureLifecycle.js +5 -2
- package/dist/interactions/actions/gestureLifecycle.js.map +1 -1
- package/dist/interactions/actions/insert/action.js +1 -2
- package/dist/interactions/actions/insert/action.js.map +1 -1
- package/dist/interactions/actions/insert/commit.js +1 -1
- package/dist/interactions/actions/insert/parent.js +11 -0
- package/dist/interactions/actions/insert/parent.js.map +1 -0
- package/dist/interactions/actions/insert/placeAction.js +7 -2
- package/dist/interactions/actions/insert/placeAction.js.map +1 -1
- package/dist/interactions/actions/insert/repositionAction.js +2 -1
- package/dist/interactions/actions/insert/repositionAction.js.map +1 -1
- package/dist/interactions/actions/insert/session.js +5 -1
- package/dist/interactions/actions/insert/session.js.map +1 -1
- package/dist/interactions/actions/move/action.js +15 -8
- package/dist/interactions/actions/move/action.js.map +1 -1
- package/dist/interactions/actions/move/behaviors/layoutDrop.js +0 -1
- package/dist/interactions/actions/move/behaviors/layoutDrop.js.map +1 -1
- package/dist/interactions/actions/move/behaviors/snapToContainer.js +1 -1
- package/dist/interactions/actions/move/capture.js +1 -1
- package/dist/interactions/actions/move/commit/index.js +0 -2
- package/dist/interactions/actions/move/commit/index.js.map +1 -1
- package/dist/interactions/actions/move/commit/layoutDrop.js +2 -2
- package/dist/interactions/actions/move/commit/layoutRelease.js +2 -2
- package/dist/interactions/actions/move/commit/reparent.js +11 -5
- package/dist/interactions/actions/move/commit/reparent.js.map +1 -1
- package/dist/interactions/actions/move/frame.js +4 -10
- package/dist/interactions/actions/move/frame.js.map +1 -1
- package/dist/interactions/actions/move/landedDescendants.js +20 -17
- package/dist/interactions/actions/move/landedDescendants.js.map +1 -1
- package/dist/interactions/actions/move/layout/container.js +2 -1
- package/dist/interactions/actions/move/layout/container.js.map +1 -1
- package/dist/interactions/actions/move/layout/dragged.js +1 -1
- package/dist/interactions/actions/move/layout/dropPass.js +18 -1
- package/dist/interactions/actions/move/layout/dropPass.js.map +1 -1
- package/dist/interactions/actions/move/layout/exits.js +5 -5
- package/dist/interactions/actions/move/layout/exits.js.map +1 -1
- package/dist/interactions/actions/move/session.js +14 -3
- package/dist/interactions/actions/move/session.js.map +1 -1
- package/dist/interactions/actions/move/translate.js +8 -37
- package/dist/interactions/actions/move/translate.js.map +1 -1
- package/dist/interactions/actions/moveNodes.js +87 -0
- package/dist/interactions/actions/moveNodes.js.map +1 -0
- package/dist/interactions/actions/outlines/createOutlinesAction.js +8 -5
- package/dist/interactions/actions/outlines/createOutlinesAction.js.map +1 -1
- package/dist/interactions/actions/outlines/outlineStroke.js +5 -3
- package/dist/interactions/actions/outlines/outlineStroke.js.map +1 -1
- package/dist/interactions/actions/pathCommands/cutJoin.js +8 -5
- package/dist/interactions/actions/pathCommands/cutJoin.js.map +1 -1
- package/dist/interactions/actions/planeInput.js.map +1 -1
- package/dist/interactions/actions/resize/action.js +83 -72
- package/dist/interactions/actions/resize/action.js.map +1 -1
- package/dist/interactions/actions/resize/commit.js +2 -1
- package/dist/interactions/actions/resize/commit.js.map +1 -1
- package/dist/interactions/actions/resize/cornerHandles.js +2 -1
- package/dist/interactions/actions/resize/cornerHandles.js.map +1 -1
- package/dist/interactions/actions/resize/session.js +2 -0
- package/dist/interactions/actions/resize/session.js.map +1 -1
- package/dist/interactions/actions/resolvePreviews.js +3 -3
- package/dist/interactions/actions/resolvePreviews.js.map +1 -1
- package/dist/interactions/actions/rotate/action.js +7 -4
- package/dist/interactions/actions/rotate/action.js.map +1 -1
- package/dist/interactions/actions/rotate/commit.js +2 -1
- package/dist/interactions/actions/rotate/commit.js.map +1 -1
- package/dist/interactions/actions/rotate/session.js +2 -0
- package/dist/interactions/actions/rotate/session.js.map +1 -1
- package/dist/interactions/actions/selectionSubtree.js +25 -9
- package/dist/interactions/actions/selectionSubtree.js.map +1 -1
- package/dist/interactions/actions/testUtils.js.map +1 -1
- package/dist/interactions/actions/transform-again/action.js +13 -11
- package/dist/interactions/actions/transform-again/action.js.map +1 -1
- package/dist/interactions/actions/transformFinish.js +106 -0
- package/dist/interactions/actions/transformFinish.js.map +1 -0
- package/dist/json.d.ts +4 -0
- package/dist/json.js +3 -0
- package/dist/kitSettingsSchema.js +8 -5
- package/dist/kitSettingsSchema.js.map +1 -1
- package/dist/{math-CrJULaZI.d.ts → math-B56zxVs5.d.ts} +10 -1
- package/dist/math.d.ts +1 -1
- package/dist/math.js +2 -1
- package/dist/move.d.ts +5 -4
- package/dist/{options-p9GZMXbY.d.ts → options-DBxEryYq.d.ts} +1 -1
- package/dist/resize.d.ts +4 -3
- package/dist/routing.d.ts +1 -1
- package/dist/routing.js +2 -2
- package/dist/test-hook/createTestHook.js +1 -1
- package/dist/test-hook/createTestHook.js.map +1 -1
- package/dist/test-hook/useTestHook.js +2 -1
- package/dist/test-hook/useTestHook.js.map +1 -1
- package/dist/test-seams.d.ts +9 -5
- package/dist/tools/builtin/ellipse/useEllipseTool.js +1 -0
- package/dist/tools/builtin/ellipse/useEllipseTool.js.map +1 -1
- package/dist/tools/builtin/eyedropper/useEyedropperTool.js +2 -1
- package/dist/tools/builtin/eyedropper/useEyedropperTool.js.map +1 -1
- package/dist/tools/builtin/hand/dragPanContribution.js +4 -1
- package/dist/tools/builtin/hand/dragPanContribution.js.map +1 -1
- package/dist/tools/builtin/hand/useHandTool.js +7 -4
- package/dist/tools/builtin/hand/useHandTool.js.map +1 -1
- package/dist/tools/builtin/image/useImageTool.js +1 -0
- package/dist/tools/builtin/image/useImageTool.js.map +1 -1
- package/dist/tools/builtin/lasso/useLassoTool.js +1 -0
- package/dist/tools/builtin/lasso/useLassoTool.js.map +1 -1
- package/dist/tools/builtin/line/useLineTool.js +1 -0
- package/dist/tools/builtin/line/useLineTool.js.map +1 -1
- package/dist/tools/builtin/measure/useMeasureTool.js +12 -5
- package/dist/tools/builtin/measure/useMeasureTool.js.map +1 -1
- package/dist/tools/builtin/pen/penHandle.js +3 -5
- package/dist/tools/builtin/pen/penHandle.js.map +1 -1
- package/dist/tools/builtin/pen/usePenTool.js +14 -6
- package/dist/tools/builtin/pen/usePenTool.js.map +1 -1
- package/dist/tools/builtin/pencil/usePencilTool.js +1 -0
- package/dist/tools/builtin/pencil/usePencilTool.js.map +1 -1
- package/dist/tools/builtin/polygon/usePolygonTool.js +13 -4
- package/dist/tools/builtin/polygon/usePolygonTool.js.map +1 -1
- package/dist/tools/builtin/rect/useRectTool.js +1 -0
- package/dist/tools/builtin/rect/useRectTool.js.map +1 -1
- package/dist/tools/builtin/select/adapterPointQuery.js +3 -2
- package/dist/tools/builtin/select/adapterPointQuery.js.map +1 -1
- package/dist/tools/builtin/select/pressDecision.js +32 -0
- package/dist/tools/builtin/select/pressDecision.js.map +1 -0
- package/dist/tools/builtin/select/selectionContributions.js +22 -13
- package/dist/tools/builtin/select/selectionContributions.js.map +1 -1
- package/dist/tools/builtin/select/useSelectTool.js +13 -10
- package/dist/tools/builtin/select/useSelectTool.js.map +1 -1
- package/dist/tools/builtin/slice/useSliceTool.js +22 -8
- package/dist/tools/builtin/slice/useSliceTool.js.map +1 -1
- package/dist/tools/builtin/star/useStarTool.js +13 -4
- package/dist/tools/builtin/star/useStarTool.js.map +1 -1
- package/dist/tools/builtin/sticky/stickyNode.js +4 -1
- package/dist/tools/builtin/sticky/stickyNode.js.map +1 -1
- package/dist/tools/builtin/sticky/useStickyTool.js +10 -5
- package/dist/tools/builtin/sticky/useStickyTool.js.map +1 -1
- package/dist/tools/builtin/text/useTextTool.js +3 -1
- package/dist/tools/builtin/text/useTextTool.js.map +1 -1
- package/dist/tools/index.js +26 -0
- package/dist/{types-CHVXGfYm.d.ts → types-7puAuVD2.d.ts} +3 -262
- package/dist/types-BN9hbdMI.d.ts +184 -0
- package/dist/types-CniVctmk.d.ts +949 -0
- package/dist/types-oFeQ5VjV.d.ts +264 -0
- package/dist/util/paint.js +1 -3
- package/dist/util/paint.js.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +39 -25
- package/dist/canvas/SceneCanvas/useBuiltinRigTools.js +0 -65
- package/dist/canvas/SceneCanvas/useBuiltinRigTools.js.map +0 -1
- package/dist/tools/builtin/bone/boneActions.js +0 -156
- package/dist/tools/builtin/bone/boneActions.js.map +0 -1
- package/dist/tools/builtin/bone/boneOverlay.js +0 -71
- package/dist/tools/builtin/bone/boneOverlay.js.map +0 -1
- package/dist/tools/builtin/bone/placedRig.js +0 -28
- package/dist/tools/builtin/bone/placedRig.js.map +0 -1
- package/dist/tools/builtin/bone/rigEditState.js +0 -30
- package/dist/tools/builtin/bone/rigEditState.js.map +0 -1
- package/dist/tools/builtin/bone/useBoneTool.js +0 -125
- package/dist/tools/builtin/bone/useBoneTool.js.map +0 -1
- package/dist/tools/builtin/weight/useWeightTool.js +0 -101
- package/dist/tools/builtin/weight/useWeightTool.js.map +0 -1
- package/dist/tools/builtin/weight/weightActions.js +0 -140
- package/dist/tools/builtin/weight/weightActions.js.map +0 -1
- package/dist/tools/builtin/weight/weightOverlay.js +0 -78
- package/dist/tools/builtin/weight/weightOverlay.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,44 +1,51 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { View, Scale2, Path, FramedBox, PolygonPath, Point as Point$3, AnchorField, AnchorSet,
|
|
4
|
-
export { AnchorField, AnchorFieldValues, AnchorPair, AverageAxis, BendAlongPathOptions, BezierEasing, BlendPathsOptions, FramedBox as Bounds, CONSTRAINT_TOLERANCE, CORNER_FIT_TOLERANCE, CORNER_KEYWORDS, ConstrainedPathEdit, ConstraintPoint, CornerFrame, CornerKeyword, CornerPiece, CornerShape, CornerShapeFrame, CornerSpec, DEFAULT_FLATTEN_TOLERANCE, EASINGS, EasingFn, EasingName, EasingSpec, ExtendToMeetOptions, JoinOptions, MeasurePathOptions, NumberEntry, OpenPathEnd, PATH_C, PATH_CMD_LENGTHS, PATH_L, PATH_M, PATH_Q, PATH_SNAP_KINDS, PATH_Z, Path, PathBlend, PathBuilder, PathConstraint, PathConstraintKind, PathCrossing, PathFillRule, PathInWorldPose, PathMeasure, PathSegment, PathSnapHit, PathSnapIndex, PathSnapKind, PathSnapQuery, PathStation, PathStop, PenAnchor, PointAlongPathOptions, PointInPathOptions, PolygonPath, PoseLinear, PoseRotation, Rect, RectPath, RepeatAlongPathOptions, RepeatStation, ResolvedCorners, SPRING_PRESETS, Scale2, SegmentCrossing, SimplifyPathOptions, SmudgePathOptions, SolveConstraintsOptions, SolveConstraintsResult, SpringPreset, SpringPresetName, TrimPathOptions, TrimResult, Point as Vec2, View, ZOOM_FLOOR, asPolygonPath, averageAnchorsAt, bendAlongPath, blendPaths, boundsOfPath, circlePath, composePath, constrainPathEdit, constraintAnchors, cornerAt, cornerFrameAt, cornerFrames, cornerKeywordOf, cornerShapeK, cornerShapePieces, cornerSpecAt, countPathAnchors, createPathSnapIndex, cubicBezierEasing, decomposePath, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, ellipsePath, extendToMeet, findPathSnap, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, hasCorners, hasOpenSubpath, intersectSegments, isCornerShape, joinAnchorsAt, lengthenOpenEnd, linePath, linear, meanScale, measurePath, nextCornerShape, openEndRay, openPathEnds, pathAnchorPoints, pathCommandCoordCount, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathCrossings, pathDistanceToPoint, pathFromD, pathInPoseFrame, pathInWorld, pathIntersectsPolygon, pathIntersectsRect, pathSegments, pathSignedArea, pathThroughPoseFrame, pathToAnchors, pointAlongPath, pointInPath, polygonFromPoints, polylineFromPoints, poseFrameInverseOf, poseFrameOf, poseLinearOf, poseRotationOf, prepareBlend, pxExtent, rectMarkerPath, rectPath, regularPolygonPath, remapPerAnchor, repeatAlongPath, resolveCorners, resolveCornersWithSources, resolveEasing, reversePath, rotatePathAround, roundRectPath, scaleDelta, scalePathToBounds, screenAngleOf, simplifyAnchorsAt, simplifyPath, smudgePath, solveConstraints, solvePathConstraints, splitByClosure, splitSubpaths, squarePath, standoff, starPath, stationsAlongPath, transformPath, translatePath, trimPathAt, unionBoundsPath, unsatisfiedConstraints, withCorner, withinPxBox, withinPxRadius, withoutCorners, worldEditToStorage } from '@weasel-js/geom';
|
|
5
|
-
import {
|
|
6
|
-
export { C as ContainerBounds, D as DropRegion,
|
|
1
|
+
import { I as InheritedPaint, D as Dims, R as RenderLayer, L as LayerHit, V as ViewAnimationOptions, a as PathEditExtension, h as ViewportDims, F as FitViewToBoundsOptions, i as RedrawSource, j as EditAnchorsParams, k as InertiaConfig, E as EditAnchorsDep, G as GestureLifecycleOptions, l as SliceDep, m as StickyStyle, C as ContentHandlerEntry, A as AnchorMarkerShape, P as PathEditMark, n as ChromeState, o as LayerGroup, S as SnapSource, T as TransformFollower, p as GeometryProjection, q as InsertNodeFactory, r as InsertPaint, s as SvgIngestOptions, t as SceneCanvasSnap, u as Affordance, v as AffordanceRegion, w as AffordanceBinding, x as CommonAffordanceScratch, y as TextOverflow, z as CreateOutlinesAdapter, B as PaintKindEntry, J as PathEditTarget, K as FinishedEditFrame, M as PathSymmetryDep, H as HandleLocks, N as BooleanOpOptions, O as BooleansAdapter, Q as BooleanOp, U as PathPaint, W as BooleanOpResult, X as BooleanStrokes, Y as SnapMods, Z as SourceCandidate, $ as SnapProbeAt, a0 as SnapCollect, a1 as SnapMark, b as SnapGesture, a2 as SnapDep, a3 as SnapOutcome, f as SnapOutcomeStore, a4 as SnapReadoutStyle } from './depSchema-mG19aEdD.js';
|
|
2
|
+
export { a5 as AngleCandidate, a6 as AngleCollect, a7 as AnimateToBoundsOptions, a8 as AreaSelectDep, a9 as BooleanOpPreview, aa as BooleanPreviewPiece, ab as CanDropIntoDep, ac as ClipboardDep, ad as ClipboardIngestCtx, ae as CreateOutlinesResult, af as CustomPaintContext, ag as DEFAULT_LAYER_RETAIN, ah as DecayLoopConfig, ai as FinishedPathEdit, aj as GEOMETRY_BOUND_DATA, ak as HandleLock, al as HitTestView, am as IngestCtx, an as IngestionDep, ao as InsertDep, ap as InsertEnds, aq as InsertExtras, ar as InsertIntoDep, as as InsertLive, at as LassoSelectDep, au as LayerCommandCache, av as LayerDrawFailure, aw as LayerDrawSpan, ax as LayerRetainPolicy, ay as LayoutDep, az as Locus, aA as MinSize, aB as NodeAtPointDep, aC as OutlinePathSpec, aD as PATH_OVERLAY_ROLES, aE as PaintKind, aF as PaintKindEditorProps, aG as PaintKindFamily, aH as PaintKindLoader, aI as PanBounds, aJ as PathEditDrag, aK as PathEditDragStart, aL as PathEditFinishCtx, aM as PathEditHandleMove, aN as PathEditMarksCtx, aO as PathEditOther, aP as PathEditPart, aQ as PathEditStore, aR as PathForm, aS as PathOverlay, aT as PathOverlayOptions, aU as PathOverlayStyle, aV as PathRepresentation, aW as PathTransformFinishCtx, aX as PreviewPathsDep, aY as ResizePolicy, aZ as STICKY_DEFAULTS, a_ as SnapBegin, c as SnapConstrain, a$ as SnapEdge, b0 as SnapEdges, e as SnapGeometry, b1 as SnapMarks, b2 as SnapReadoutDep, d as SnapResizeBox, g as SnapSession, b3 as SvgUnpacker, b4 as TextEditDep, b5 as TextNodeData, b6 as TransformPreviewNode, b7 as TransientPath, b8 as VIEW_ANIMATION_KEY, b9 as ViewAnimationApi, ba as ViewApi, bb as ViewChannel, bc as applyBooleanOp, bd as applyCreateOutlines, be as asPaint, bf as createPathOverlay, bg as createSnapOutcomeStore, bh as depsUnchanged, bi as drawLayers, bj as drawOneLayer, bk as fitViewToBounds, bl as getPaintKind, bm as inheritedPaintOf, bn as inheritsPaint, bo as isLayerPainted, bp as isLayerVisible, bq as listGradientKinds, br as listPaintKinds, bs as minSizeOf, bt as paintKindOf, bu as paintKindRegistry, bv as paintedLayers, bw as paintsLayer, bx as paletteInsertPaint, by as pathPaintOf, bz as patternFamily, bA as previewBooleanOp, bB as registerContentHandler, bC as registerPaintKind, bD as registerPaintKindLoader, bE as seedTile, bF as stickyData, bG as stickyNodeFactory, bH as subscribeToSources, bI as switchGradientKind, bJ as textBoxOf, bK as useDecayLoop, bL as useViewAnimation, bM as useViewAnimationOn, bN as viewAxes, bO as withInheritedPaint, bP as withoutGeometryBoundData } from './depSchema-mG19aEdD.js';
|
|
3
|
+
import { View, Scale2, Path, FramedBox, PolygonPath, GlMat3, Point as Point$3, AnchorField, AnchorSet, PlacementAlign, Rect, Affine, PathSnapKind, PathInWorldPose, AnchorFieldValues, NumberEntry, JoinOptions, SegmentHit, PointOrigin, AnchorSymmetry, BlendPathsOptions, RunAlign, TrackSide, BendAlongPathOptions, RepeatAlongPathOptions, PoseLinear } from '@weasel-js/geom';
|
|
4
|
+
export { AnchorField, AnchorFieldValues, AnchorPair, AverageAxis, BendAlongPathOptions, BezierEasing, BlendPathsOptions, FramedBox as Bounds, CONSTRAINT_TOLERANCE, CORNER_FIT_TOLERANCE, CORNER_KEYWORDS, ConstrainedPathEdit, ConstraintPoint, CornerFrame, CornerKeyword, CornerPiece, CornerShape, CornerShapeFrame, CornerSpec, DEFAULT_FLATTEN_TOLERANCE, EASINGS, EasingFn, EasingName, EasingSpec, ExtendToMeetOptions, JoinOptions, MeasurePathOptions, NumberEntry, OpenPathEnd, PATH_C, PATH_CMD_LENGTHS, PATH_L, PATH_M, PATH_Q, PATH_SNAP_KINDS, PATH_Z, Path, PathBlend, PathBuilder, PathConstraint, PathConstraintKind, PathCrossing, PathFillRule, PathInWorldPose, PathMeasure, PathSegment, PathSnapHit, PathSnapIndex, PathSnapKind, PathSnapQuery, PathStation, PathStop, PenAnchor, PointAlongPathOptions, PointInPathOptions, PolygonPath, PoseLinear, PoseRotation, Rect, RectPath, RepeatAlongPathOptions, RepeatStation, ResolvedCorners, SPRING_PRESETS, Scale2, SegmentCrossing, SimplifyPathOptions, SmudgePathOptions, SolveConstraintsOptions, SolveConstraintsResult, SpringPreset, SpringPresetName, TrimPathOptions, TrimResult, Point as Vec2, View, ZOOM_FLOOR, asPolygonPath, averageAnchorsAt, bendAlongPath, blendPaths, boundsOfPath, circlePath, composePath, constrainPathEdit, constraintAnchors, cornerAt, cornerFrameAt, cornerFrames, cornerKeywordOf, cornerShapeK, cornerShapePieces, cornerSpecAt, countPathAnchors, createPathSnapIndex, cubicBezierEasing, decomposePath, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, ellipsePath, extendToMeet, findPathSnap, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, hasCorners, hasOpenSubpath, intersectSegments, isCornerShape, joinAnchorsAt, lengthenOpenEnd, linePath, linear, meanScale, measurePath, nextCornerShape, openEndRay, openPathEnds, pathAnchorPoints, pathCommandCoordCount, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathCrossings, pathDistanceToPoint, pathFromD, pathInPoseFrame, pathInWorld, pathIntersectsPolygon, pathIntersectsRect, pathSegments, pathSignedArea, pathThroughPoseFrame, pathToAnchors, pathToD, pointAlongPath, pointInPath, polygonFromPoints, polylineFromPoints, poseFrameInverseOf, poseFrameOf, poseLinearOf, poseRotationOf, prepareBlend, pxExtent, rectMarkerPath, rectPath, regularPolygonPath, remapPerAnchor, repeatAlongPath, resolveCorners, resolveCornersWithSources, resolveEasing, reversePath, rotatePathAround, roundRectPath, scaleDelta, scalePathToBounds, screenAngleOf, simplifyAnchorsAt, simplifyPath, smudgePath, solveConstraints, solvePathConstraints, splitByClosure, splitSubpaths, squarePath, standoff, starPath, stationsAlongPath, transformPath, translatePath, trimPathAt, unionBoundsPath, unsatisfiedConstraints, withCorner, withinPxBox, withinPxRadius, withoutCorners, worldEditToStorage } from '@weasel-js/geom';
|
|
5
|
+
import { a as PlaneMap, L as LayoutStrategy, R as ReflowTransition, b as LayoutDropTargetMode } from './types-7puAuVD2.js';
|
|
6
|
+
export { C as ContainerBounds, D as DropRegion, c as DropTarget, d as LayoutArrival, e as LayoutChild, f as LayoutContainer, g as LayoutDragged, h as LayoutSnap, P as ParallaxOpts, i as ReflowGlideOptions, S as ScalarOrXY, j as deriveParallaxView, k as fromPlane, p as planeMap, l as planeMatrix, m as planeToPlane, r as rectFromPlane, n as rectToPlane, t as toPlane } from './types-7puAuVD2.js';
|
|
7
7
|
export { DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_VELOCITY_DECAY, Simulation, SimulationCore, SimulationForce, SimulationNode, SimulationOptions, UseSimulationOptions, createSimulation } from '@weasel-js/simulation';
|
|
8
8
|
export { useSimulation } from '@weasel-js/simulation/react';
|
|
9
|
-
import {
|
|
10
|
-
export {
|
|
11
|
-
import
|
|
12
|
-
|
|
9
|
+
import { R as RectPose, a as SystemLayerSpec, A as AddNodeSpec, b as RegisteredOp, c as SceneRegistry, P as PoseComposition, L as LayoutFrame, N as Node, d as PoseAdapter, S as Scene, e as PoseRemoval, f as PoseWrite, g as ScenePoseReports, h as PoseOverrides, i as SerializedScene, D as DerivePoseFn, j as DerivePathFn, k as DerivedDep } from './types-CniVctmk.js';
|
|
10
|
+
export { l as AddLayerSpec, B as Bivariant, C as ClipFromPoseFn, m as ContainerNode, n as CopiesFromPoseFn, I as IDENTITY_POSE_COMPOSITION, o as LayerRecord, p as LayoutMove, q as LeafNode, r as PoseClosure, s as PoseHold, t as PoseOverride, u as PoseWriteOrigin, v as RemovedNode, w as SCENE_HISTORY_FORM, x as SceneArrivalHandler, y as SceneBatchOptions, z as SceneDoc, E as SceneDocValues, F as SceneEditPass, G as SceneEditPassOptions, H as SceneEditSummary, J as SerializedDoc, K as SerializedLayer, M as SerializedNode, O as SerializedSceneHistory, Q as SystemLayerRecord, U as UserLayerRecord, T as asNodeId, V as composeWorldPose, W as composesFrames, X as rebaseLocalPose } from './types-CniVctmk.js';
|
|
11
|
+
import { NodeId, SelectionMode, SelectionExtendKey, SelectionApi, IngestItem, OngoingOverlay, PointerSessionCancelReason, DeviceProfile, Bounds, Tool as Tool$1, Contribution as Contribution$1, ContributionChrome as ContributionChrome$1, ToolDef as ToolDef$1, DepName, DepSchema, Action, ActionDeps, GestureBinding, AffordanceHit, ActionDisabledReason, ToolKeybinding, HotkeyTrigger, ModifierState, RuleCtx, Rule, ActionTunings, BindingOverrides, ActionsProp, DebugSink, ToolSet, ToolEntry, OverlayRole, ResizeAnchor, InvocationCtx, OngoingHandle } from '@weasel-js/routing';
|
|
12
|
+
export { ALWAYS, Action, ActionDeps, ActionDisabledReason, ActionDisabledReasonValue, ActionDispatch, ActionEnabledResult, ActionEntry, ActionItem, ActionParamSchema, ActionParams, ActionPresentation, ActionSettings, ActionSettingsState, ActionShortcut, ActionTuning, ActionTunings, ActionUnavailable, ActionVariant, ActionsProp, ActionsRegistry, AffordanceHit, AssemblyInputs, BindingOpts, BindingOverrides, BindingScope, BindingSource, BoundGesture, BuildRuleCtxArgs, COARSE_TARGET_SCALE, CONTROL_SELECTOR, CaptureGestureOptions, CaptureKeyOptions, CaptureKind, CapturedSpec, Carried, Carry, CarryCallbacks, CarryPayload, CarryPointer, CarryStage, ContributionDeps, ContributionRouting, DEFAULT_ALLOWED_CAPABILITIES, DEFAULT_DEVICE_PROFILE, DRAG_THRESHOLD_PX, DebugSink, DepListing, DepName, DepRegistry, DepSchema, DepSource, DetectedDeviceFacts, DeviceProfile, DispatchRecord, DispatchRecordInput, Dispatcher, DispatcherContext, DragSample, DroppedCandidate, Eligibility, EligibilityState, GestureBinding, GestureKitSettings, HandleKind, HitShape, HotkeyTrigger, ImmediateInvoker, IngestItem, InputEvent, InvocationCtx, Invoker, KEYMAP_HOLD, KeyBinding, KeyReach, KeymapDef, KeymapDescription, KeymapRow, KeymapStack, KeymapUnbound, KeymapVerdict, LONG_PRESS_MS, LongPressOptions, LongPressState, LongPressStore, MatchResult, MenuDef, MenuHit, MenuHost, MenuOpenRequest, MenuSources, ModeShortcutHandlers, ModifierRole, ModifierRoles, ModifierState, NEVER, NodeId, OngoingHandle, OngoingInvoker, OngoingOverlay, OpenKeymap, OpenMenu, OverlayPosition, OverlayRole, PendingLongPress, PlacedBy, Point2, PointerSession, PointerSessionCallbacks, PointerSessionCancelReason, PointerSessionOptions, RankedCandidate, RecordCandidate, ResizeAnchor, ResolveAllOptions, ResolveOnlyResult, ResolvedBindingOverrides, ResolvedCandidate, RoleKeys, RoleRebinds, Rule, RuleCtx, ScopedBinding, ScratchKey, ScratchStore, SelectionApi, SelectionExtendKey, SelectionMode, Selector, SpecificityPart, ToolEntry, ToolKeybinding, ToolModifiers, ToolPresentation, ToolSet, ToolSlot, TunedBinding, UiOngoingControl, ViewportGestureKind, WalkStep, actionBindings, actionCursor, actionItemTitle, actionItems, actionSettingsParams, actionShortcuts, actionsTagged, activatesFocusedControl, assembleEntries, bindingId, buildDepsFromRequires, buildRuleCtx, captureGesture, captureKey, clientToCanvas, createDepRegistry, createDispatcher, createKeymapStack, createLongPressStore, defineTool, deleteScratch, describeKeymap, describeRule, dlog, dwarn, evaluate, evaluateActive, evaluateEnabled, focusedControlOwnsKey, getScratch, heldKeySpec, historyKey, isDebugEnabled, isEditableTarget, isInControlWithin, isToolSet, keySpecShortcut, keymapContribution, keymapLeaderBindingId, keymapLeaderId, keymapShortcuts, keysHeld, liveScope, matchActionItem, matchesKeyBinding, modeShortcutSpec, modeShortcuts, openPointerSession, overlaysOf, pastDragThreshold, readActionSettings, resolveBindingOverrides, resolveDeviceProfile, resolveParams, resolveSchemaMenu, roleReader, scopeBindings, scratchKey, setScratch, specificity, startCarry, taggedActionItems, toolIdsOf, toolSet, toolSetHas, tuneAction, withoutTools } from '@weasel-js/routing';
|
|
13
|
+
import * as react from 'react';
|
|
14
|
+
import react__default, { Ref, RefObject, ReactNode, MutableRefObject, MouseEvent } from 'react';
|
|
13
15
|
import { Reflection } from '@weasel-js/registry';
|
|
14
16
|
export { MIXED, Mixed, QueryMatch, Reflectable, ReflectedEntry, Reflection, RegisterOptions, Registrant, createReflectable, isPlainObject } from '@weasel-js/registry';
|
|
17
|
+
export { stableStringify } from './json.js';
|
|
18
|
+
import { P as PoseDescriptor, b as RotatedPose } from './poseDescriptor-DN2yfnq_.js';
|
|
19
|
+
export { R as RECT_POSE_DESCRIPTOR, a as ROTATED_POSE_DESCRIPTOR, p as poseDescriptorForNode, t as translatePoseViaDescriptor, v as visualBoundsViaDescriptor } from './poseDescriptor-DN2yfnq_.js';
|
|
15
20
|
import { KitSettingsStore } from '@weasel-js/react';
|
|
16
21
|
export { CanvasFocusReturn, FrameClock, FrameClockOptions, UseCanvasFocusOptions, VisibleRaf, VisibleRafOptions, VisibleRafTarget, useCanvasFocus, useFrameClock, useLatest, useVisibleRaf } from '@weasel-js/react';
|
|
17
22
|
import { PaintedCursorState, CursorSink, CursorSpec } from '@weasel-js/cursor';
|
|
18
23
|
export { BakeOptions, CURSOR_ANGLE_STEPS, CURSOR_MAX_CSS_PX, CursorGlyph, CursorGlyphName, CursorGlyphSpec, CursorSink, CursorSinkTarget, CursorSpec, PaintedCursor, PaintedCursorFrame, PaintedCursorState, ResolvedCursor, bakeCursor, createCursorSink, createPaintedCursorState, cursorFor, resolveCursor, resolveCursorTier } from '@weasel-js/cursor';
|
|
19
|
-
import { DrawCommand, FlattenTolerance, ShaderProgramHandle, CommandStroke as CommandStroke$1 } from '@weasel-js/renderer';
|
|
24
|
+
import { DrawCommand, FlattenTolerance, ImageMinification, ShaderProgramHandle, CommandStroke as CommandStroke$1 } from '@weasel-js/renderer';
|
|
20
25
|
export { BlendFactor, BlendFactors, CompositeOp, CullRect, DrawCommand, Effect, FillPoseBox, FlattenTolerance, GlMat3, GroupDrawCommand, ImageDrawCommand, ImageMinification, ImageNodeData, ImageRasterSize, ImageStatus, PaintBindContext, PaintDrawKind, PaintProgram, PaintResources, PathDrawCommand, ProgramSource, RenderTarget, SPRITE_STRIDE, ShaderDrawCommand, ShaderProgram, ShaderProgramHandle, ShaderUniform, SpriteSheet, SpritesDrawCommand, TextDrawCommand, TilePatternOpts, bitmapSrc, blur, commandFill, commandPaint, commandStroke, createTilePattern, cullDrawCommands, fillInPoseFrame, fillToBoundsFrame, frameRect, getImageBitmap, imageStatus, isPaintKindKnown, isVectorImageSrc, mat3, registerEffect, releaseImage, resolveFillPattern, resolvePatternSpec, retryImage, setImageCacheBudget, subscribeImageReady, textCommand, textCommandFromPose, textCommandFromRuns, viewToMat3, vignette, warmPaintKinds } from '@weasel-js/renderer';
|
|
21
|
-
import {
|
|
26
|
+
import { C as CanvasDebugSink, D as DebugSnapshot, a as DebugConfig, b as DebugStrokes, c as DebugTheme } from './types-BN9hbdMI.js';
|
|
27
|
+
export { d as DEBUG_FEATURES, e as DebugFeature, f as DebugStroke, F as FrameStats, L as LayerFrameStats, R as RecordedBounds, g as RecordedHandle, h as RecordedHitbox, i as RecordedLayer, j as RecordedOrigin, k as RecordedSnap, l as RecordedViewport } from './types-BN9hbdMI.js';
|
|
28
|
+
import { VertexColorChannel, Target, Animator, ColorOverrideRegistry, TargetAxes, Pose, ClipBinder, SpringPresetName, StaggerOptions, StaggerDelay, EasingSpec, AnimationHandle, Skeleton, Skin } from '@weasel-js/animator';
|
|
22
29
|
import { SelectionStore as SelectionStore$1 } from '@weasel-js/select';
|
|
23
|
-
import { Paint, CommandFill, CommandStroke, CommandPaint, Fill, Stroke, Palette, SolidPaint, VertexWidth } from '@weasel-js/paint';
|
|
24
|
-
export { ColorInterpolationSpace, ColorSpace, CommandFill, CommandPaint, CommandPaintUnits, CommandStroke, Fill, GradStop, GradientKind, GradientPaint, HalfWidths, HueInterpolation, KitMarkerKey, MarkerKey, MarkerRef, OklchDeg, Paint, PaintUnits, PatternPaint, PatternPlacement, PatternTransform, PatternTransformParts, PosedPaint, Region, STROKE_DASH_RATIOS, ScreenLength, SolidPaint, Stroke, StrokeAlign, StrokeDashStyle, StrokeNib, TILE_KINDS, TextureHandle, TexturePaint, TileKind, TilePaint, TilePatternSpec, VertexWidth, VertexWidthSides, alignedStrokeRect, composePatternTransform, contrastLineColor, dashForStrokeStyle, decomposePatternTransform, gradientForBounds, gradientGeometry, hexToOklchDeg, hexToRgbBytes, hexToRgba, hslToSrgb, interpolateSrgb, isGradientPaint, isPatternPaint, isSolidPaint, isTileKind, isTilePaint, lerpColorArray, lerpFill, lerpOklab, lerpOklch, lerpPaint, lerpStroke, linearSrgbToOklab, linearToSrgb, normalizeHex, oklabToLinearSrgb, oklabToOklch, oklabToSrgbU8, oklchDegToHex, oklchToOklab, parseColor, parseColorToRgba255, parseHexBytes, patternPlacementOf, resolveColor, resolveScreenLength, rgbaToHex, sampleGradientStops, scaleVertexWidth, srgbFloatToOklab, srgbToHsl, srgbToLinear, srgbU8ToOklab, strokeDashStyleOf, tileSpecOf, vertexHalfWidths, vertexWidthFromSides, widestHalfWidth, withGradientKind } from '@weasel-js/paint';
|
|
25
30
|
import { ToolsApi as ToolsApi$1, UseToolsOptions as UseToolsOptions$1, PointerContextValue, Yoke } from '@weasel-js/routing/react';
|
|
26
|
-
export { ActionsProvider, ActiveToolContextProvider, ActiveToolContextProviderIfRoot, ActiveToolContextProviderProps, ActiveToolContextValue, CommandOptions, DepRegistryProvider, DispatcherChannels, InputScope, OngoingAction, PointerContextProvider, PointerContextValue, PointerWorldPos, SelectionContextProvider, SelectionContextProviderIfRoot, SelectionContextValue, UseGestureDispatcherOptions, Yoke, createPointerStore, useAction, useActionsRegistry, useActiveToolContext, useCommand, useDepRegistry, useDepSource, useGestureDispatcher, useMenuHost, useMenus, useOngoingAction, useOptionalActiveToolContext, useOptionalDepRegistry, usePointerContext, usePointerPosition, usePublishSelection, useSelectionContext, useYoke } from '@weasel-js/routing/react';
|
|
31
|
+
export { ActionsProvider, ActiveToolContextProvider, ActiveToolContextProviderIfRoot, ActiveToolContextProviderProps, ActiveToolContextValue, CommandOptions, DepRegistryProvider, DispatcherChannels, InputScope, OngoingAction, PointerContextProvider, PointerContextValue, PointerWorldPos, SelectionContextProvider, SelectionContextProviderIfRoot, SelectionContextValue, UseGestureDispatcherOptions, Yoke, createPointerStore, useAction, useActionsRegistry, useActiveToolContext, useCommand, useDepRegistry, useDepSource, useGestureDispatcher, useMenuHost, useMenus, useOngoingAction, useOpenKeymap, useOptionalActiveToolContext, useOptionalDepRegistry, usePointerContext, usePointerPosition, usePublishSelection, useSelectionContext, useYoke } from '@weasel-js/routing/react';
|
|
32
|
+
import { Paint, CommandFill, CommandStroke, CommandPaint, Fill, Inherit, Stroke, Palette, SolidPaint, VertexWidth, PaintedFill, PaintedStroke } from '@weasel-js/paint';
|
|
33
|
+
export { ColorInterpolationSpace, ColorSpace, CommandFill, CommandPaint, CommandPaintUnits, CommandStroke, Fill, GradStop, GradientKind, GradientPaint, HalfWidths, HueInterpolation, INHERIT, Inherit, KitMarkerKey, MarkerKey, MarkerRef, OklchDeg, Paint, PaintUnits, PaintedFill, PaintedStroke, PatternPaint, PatternPlacement, PatternTransform, PatternTransformParts, PosedPaint, Region, STROKE_DASH_RATIOS, ScreenLength, SolidPaint, Stroke, StrokeAlign, StrokeDashStyle, StrokeNib, TILE_KINDS, TextureHandle, TexturePaint, TileKind, TilePaint, TilePatternSpec, VertexWidth, VertexWidthSides, alignedStrokeRect, composePatternTransform, contrastLineColor, contrastRatio, dashForStrokeStyle, decomposePatternTransform, gradientForBounds, gradientGeometry, hexToOklchDeg, hexToRgbBytes, hexToRgba, hslToSrgb, interpolateSrgb, isGradientPaint, isPatternPaint, isSolidPaint, isTileKind, isTilePaint, lerpColorArray, lerpFill, lerpOklab, lerpOklch, lerpPaint, lerpStroke, linearSrgbToOklab, linearToSrgb, normalizeHex, oklabToLinearSrgb, oklabToOklch, oklabToSrgbU8, oklchDegToHex, oklchToOklab, parseColor, parseColorToRgba255, parseHexBytes, patternPlacementOf, resolveColor, resolveFill, resolveScreenLength, resolveStroke, rgbaToHex, sampleGradientStops, scaleVertexWidth, srgbFloatToOklab, srgbToHsl, srgbToLinear, srgbU8ToOklab, strokeDashStyleOf, tileSpecOf, vertexHalfWidths, vertexWidthFromSides, wcagLevels, widestHalfWidth, withGradientKind } from '@weasel-js/paint';
|
|
27
34
|
import { FontRequest } from '@weasel-js/font';
|
|
28
35
|
export { FaceMetrics, FaceRuleMetrics, FaceScriptMetrics, FontFamilyFaces, FontRequest, FontStyle, FontVariant, LocalFontOutlinesResult, OutlineFaceInfo, OutlineSource, OutlineStatus, OutlineVariant, RegisterFontOptions, canQueryLocalFonts, cssFamilyName, cssFontFamily, cssFontFamilyLoading, enableLocalFontOutlines, fontOutlineRegistry, fontRegistry, hasFontOutlines, isCanvasFont, listFontOutlines, loadFontOutlines, outlineStatus, refreshCanvasFont, registerCanvasFont, registerFont, registerFontOutlines, subscribeGlyphReady, unregisterCanvasFont, unregisterFontOutlines, warmFonts } from '@weasel-js/font';
|
|
29
36
|
import * as _weasel_js_history from '@weasel-js/history';
|
|
30
37
|
import { Op, CreateHistoryOptions, History, HistorySelection } from '@weasel-js/history';
|
|
31
|
-
export { BeginJournalOptions, CreateHistoryOptions, EvictedEntry, History, HistoryBranch, HistoryEntry, HistoryLogger, HistorySelection, Journal, Op, RecordEntryOptions, SerializedHistory, SerializedHistoryEntry, SerializedOp, SwapArgs, SwapOpOptions, swapOp } from '@weasel-js/history';
|
|
32
|
-
import {
|
|
33
|
-
export {
|
|
34
|
-
import {
|
|
35
|
-
export {
|
|
36
|
-
import { d as ResizeHandleLayout, U as UseResizeOptions, T as TargetTransform } from './cornerHandles-Camw_yeu.js';
|
|
37
|
-
export { C as CORNER_ANCHORS, a as CornerAnchor, k as CornerEdge, b as CornerHandle, E as EDGE_HANDLE_MIN_RADII, H as HandleEdge, R as RESIZE_HANDLE_ANCHORS, c as ResizeHandleAnchor, e as cornerPoint, f as cornerResizeHandles, g as fixedCornerOf, h as handlePoint, i as hitCornerHandle, j as isCornerHandle, r as resizeHandlesFor } from './cornerHandles-Camw_yeu.js';
|
|
38
|
+
export { BeginJournalOptions, CreateHistoryOptions, EvictedEntry, History, HistoryBranch, HistoryEntry, HistoryLogger, HistorySelection, HistoryStep, Journal, Op, RecordEntryOptions, SerializedHistory, SerializedHistoryEntry, SerializedOp, SwapArgs, SwapOpOptions, swapOp } from '@weasel-js/history';
|
|
39
|
+
import { G as GestureContext, B as BoundsConstraint, R as RotateBehavior, I as InsertBehavior, L as LassoSelectBehavior, M as MoveBehavior } from './clone-C3e0OTuF.js';
|
|
40
|
+
export { A as ActionBehavior, a as AreaSelectOverlay, b as BehaviorEnd, c as BehaviorResult, C as CloneBehavior, d as CloneBehaviorResult, e as GestureFrames, f as GroupTransform, g as InsertMoveResult, h as InsertOverlay, i as InsertPoint, j as InsertProposed, k as LassoSelectMoveResult, l as LassoSelectOverlay, m as LassoSelectPose, n as LassoSelectProposed, o as MoveEnd, P as PointerState, p as ResizeMoveResult, q as ResizeOverlay, r as ResizeProposed, s as RotateMoveResult, t as RotateOverlay, u as RotateProposed } from './clone-C3e0OTuF.js';
|
|
41
|
+
import { d as ResizeHandleLayout, U as UseResizeOptions, T as TargetTransform } from './cornerHandles-p8fDIAKt.js';
|
|
42
|
+
export { C as CORNER_ANCHORS, a as CornerAnchor, k as CornerEdge, b as CornerHandle, E as EDGE_HANDLE_MIN_RADII, H as HandleEdge, R as RESIZE_HANDLE_ANCHORS, c as ResizeHandleAnchor, e as cornerPoint, f as cornerResizeHandles, g as fixedCornerOf, h as handlePoint, i as hitCornerHandle, j as isCornerHandle, r as resizeHandlesFor } from './cornerHandles-p8fDIAKt.js';
|
|
38
43
|
import { ModeRegistry, ModeDecorations } from '@weasel-js/modes';
|
|
44
|
+
import { M as MoveAdapter, A as AreaSelectAdapter, L as LayerEnumerableAdapter, a as LassoHitMode, P as PasteOmission, b as ResizeAdapter, c as RotateAdapter, d as LassoSelectAdapter, I as InsertAdapter, C as ClipboardSnapshot, e as PasteCtx, O as OrderedAdapter } from './types-oFeQ5VjV.js';
|
|
45
|
+
export { R as RegionPickView, S as SnapTarget } from './types-oFeQ5VjV.js';
|
|
39
46
|
import * as _weasel_js_gestures from '@weasel-js/gestures';
|
|
40
|
-
export { CarrySpec, ClaimableGesture, ClickSpec, DragSpec, DropSpec, GestureSpec, KeyHeldSpec, KeySpec, ModSpec, MultiTouchSpec, PasteSpec, PinchSpec, TargetPredicate, TargetSpec, WheelSpec, bodyPredicate, hitPredicate } from '@weasel-js/gestures';
|
|
41
|
-
import { U as UseMoveOptions } from './options-
|
|
47
|
+
export { BindingOverrideInput, CarrySpec, ClaimableGesture, ClickSpec, DragSpec, DropSpec, GestureSpec, KeyHeldSpec, KeySpec, ModSpec, MultiTouchSpec, PasteSpec, PinchSpec, TargetPredicate, TargetSpec, WheelSpec, bindingSpec, bodyPredicate, held, hitPredicate, key, keySpecRoute, unbound } from '@weasel-js/gestures';
|
|
48
|
+
import { U as UseMoveOptions } from './options-DBxEryYq.js';
|
|
42
49
|
import { IconRef, IconTable, IconVariantLoader, IconRegistry, IconGlyph, IconEntry, IconVariantState } from '@weasel-js/icons';
|
|
43
50
|
export { IconRef, IconTable, toIconRef } from '@weasel-js/icons';
|
|
44
51
|
import * as _weasel_js_prefs from '@weasel-js/prefs';
|
|
@@ -46,20 +53,43 @@ import { PrefSection, PrefNumberUnit } from '@weasel-js/prefs';
|
|
|
46
53
|
import { UnitScope } from '@weasel-js/quantity';
|
|
47
54
|
export { ANGLE_RADIANS, IMPERIAL_INCHES, METRIC_MM, PIXELS, PerAxis, PlaneUnits, PlaneValue, ScopeTree, Unit, UnitEntry, UnitExpr, UnitExprContext, UnitScale, UnitScope, UnitSystem, UnitValue, axisUnits, formatAxes, formatScoped, formatUnit, fromRoot, parseUnitExpr, resolveAxes, resolveScoped, resolveUnit, resolveUnitExpr, scopesOf, toRoot, unitScale } from '@weasel-js/quantity';
|
|
48
55
|
import { TextPose, TextStyle, StyledRun, TextVerticalAlign, TextPaint, TextOutlinesError } from '@weasel-js/text';
|
|
49
|
-
export { DEFAULT_DECORATION_METRICS, DEFAULT_TEXT_STYLE, DecorationKind, FaceMetricsFn, FitTextPoseOptions, FlagKey, FontVariantCaps, LabelOptions, LaidOutCell, LaidOutDecoration, LaidOutGroup, LaidOutLineBox, LaidOutOutlineGlyph, LaidOutQuad, LaidOutRuns, LayoutLine, LayoutResult, LayoutRunsOpts, MARKDOWN_RUN_GRAMMAR, MarkdownFontOptions, MeasureFn, MeasureTextBoundsOpts, MeasuredSpan, MeasuredText, PaintRunsOpts, PaintedRuns, PlacedGlyph, PointInTextPoseOpts, PositionedRun, RangeStyle, ResolvedRun, ResolvedTextStyle, RunFlag, RunGrammar, RunMarker, RunSourceMap, RunStylePatch, SCRIPT_METRICS, SMALL_CAPS_SCALE, ScriptPreset, SetFlagResult, SmallCapsText, StyleKey, StyledRun, TextAlign, TextDirection, TextLineBoxesOpts, TextNodeSource, TextOutlineSource, TextOutlinesError, TextOutlinesFailure, TextPaint, TextPaintPath, TextPose, TextPoseLayout, TextPoseLayoutInput, TextRenderer, TextStyle, TextToPathOptions, TextTransform, TextVerticalAlign, TransformedRunText, applyStyleToRange, cachedLayoutRuns, cachedPaintRuns, caretIndexAt, createMarkdownRenderer, decorationMetrics, defaultLabelTextRenderer, effectiveRangeStyle, fitTextPose, fontString, isBoldWeight, isSmallCapsLetter, isTextData, layoutMarkdown, layoutRuns, layoutTextPose, loadTextOutlines, markdownToRuns, measureText, measureTextBounds, measuredWidth, nodeHasFlag, numericWeight, paintRuns, paragraphDirection, patchRangeStyle, pointInTextPose, rangeWeight, registerBidi, renderLabel, resolveAlign, resolveRunFace, resolveRuns, resolveTextStyle, runsToMarkdown, runsToPlainText, scriptMetrics, scriptMetricsFor, setFlagOverRange, smallCapsScale, smallCapsScaleFor, smallCapsText, styleAtRange, textLineBoxes, textPoseLayoutInput, textToPath, textToPathsByPaint, toRuns, transformRunTexts, unboldPatch, verticalAlignOffset } from '@weasel-js/text';
|
|
56
|
+
export { DEFAULT_DECORATION_METRICS, DEFAULT_TEXT_FILL, DEFAULT_TEXT_STYLE, DecorationKind, FaceMetricsFn, FitTextPoseOptions, FlagKey, FontVariantCaps, LabelOptions, LaidOutCell, LaidOutDecoration, LaidOutGroup, LaidOutLineBox, LaidOutOutlineGlyph, LaidOutQuad, LaidOutRuns, LayoutLine, LayoutResult, LayoutRunsOpts, MARKDOWN_RUN_GRAMMAR, MarkdownFontOptions, MeasureFn, MeasureTextBoundsOpts, MeasuredSpan, MeasuredText, PaintRunsOpts, PaintedRuns, PlacedGlyph, PointInTextPoseOpts, PositionedRun, RangeStyle, ResolvedRun, ResolvedTextStyle, RunFlag, RunGrammar, RunMarker, RunSourceMap, RunStylePatch, SCRIPT_METRICS, SMALL_CAPS_SCALE, ScriptPreset, SetFlagResult, SmallCapsText, StyleKey, StyledRun, TextAlign, TextDirection, TextLineBoxesOpts, TextNodeSource, TextOutlineSource, TextOutlinesError, TextOutlinesFailure, TextPaint, TextPaintPath, TextPose, TextPoseLayout, TextPoseLayoutInput, TextRenderer, TextStyle, TextToPathOptions, TextTransform, TextVerticalAlign, TransformedRunText, applyStyleToRange, cachedLayoutRuns, cachedPaintRuns, caretIndexAt, createMarkdownRenderer, decorationMetrics, defaultLabelTextRenderer, effectiveRangeStyle, fitTextPose, fontString, isBoldWeight, isSmallCapsLetter, isTextData, layoutMarkdown, layoutRuns, layoutTextPose, loadTextOutlines, markdownToRuns, measureText, measureTextBounds, measuredWidth, nodeHasFlag, numericWeight, paintRuns, paragraphDirection, patchRangeStyle, pointInTextPose, rangeWeight, registerBidi, renderLabel, resolveAlign, resolveRunFace, resolveRuns, resolveTextStyle, runsToMarkdown, runsToPlainText, scriptMetrics, scriptMetricsFor, setFlagOverRange, smallCapsScale, smallCapsScaleFor, smallCapsText, styleAtRange, textLineBoxes, textPoseLayoutInput, textToPath, textToPathsByPaint, toRuns, transformRunTexts, unboldPatch, verticalAlignOffset } from '@weasel-js/text';
|
|
50
57
|
import { UseTextEditReturn } from '@weasel-js/text-dom';
|
|
51
58
|
export { StartEditOptions, StyleToggle, TEXT_EDIT_FONT_HOLD, TextEditClipRect, TextEditCommit, TextEditScreenPose, TextEditSelection, UseTextEditOptions, UseTextEditReturn, charOffsetToDomPosition, domPositionToCharOffset, domToRuns, runsToDom, useTextEdit } from '@weasel-js/text-dom';
|
|
52
59
|
export { BUILTIN_MARKERS, MarkerCtx, MarkerEntry, MarkerPaint, MarkerSite, MarkerSiteRequest, OffsetPathOptions, StrokeToPathOptions, getMarker, listMarkers, markerInset, markerKeyOf, markerRegistry, markerSites, offsetPath, registerMarker, resolveMarkerSize, resolveStrokeWidth, strokeInsets, strokeToPath } from '@weasel-js/stroke';
|
|
53
60
|
export { Polyline, trimPolyline } from '@weasel-js/geom/tessellate';
|
|
61
|
+
export { C as CLIP_NOTHING, a as aabbCenter, c as clipNothing, p as pointInRotatedRect, r as rectCorners, b as rotatePoint, d as rotatedRectCorners } from './math-B56zxVs5.js';
|
|
54
62
|
export { SnipAtCrossingsOptions, SplitBySegmentOptions, pathDivide, pathExclude, pathIntersect, pathSubtract, pathUnion, snipPathByPolyline, snipPathsAtCrossings, splitPathByPolyline, splitPathBySegment, trianglesToPath } from '@weasel-js/geom/booleans';
|
|
55
63
|
export { CURVE_REPS, CurveRepKind, CurveRepresentation, Discriminator, SharedAnchor, bezierCubic, bezierQuadratic, nurbs, spiro } from '@weasel-js/geom/curves';
|
|
56
64
|
import { O as OriginProjection } from './originProjection-gY0jb4Wb.js';
|
|
57
65
|
export { A as AUTO_ORIGIN_PROJECTION, R as RECT_ORIGIN_PROJECTION } from './originProjection-gY0jb4Wb.js';
|
|
58
66
|
export { A as AUTO_POSE_DESCRIPTOR, i as isPathLike, a as isRectPose } from './autoPoseDescriptor-CZ1eXbzY.js';
|
|
59
|
-
export { a as aabbCenter, p as pointInRotatedRect, r as rectCorners, b as rotatePoint, c as rotatedRectCorners } from './math-CrJULaZI.js';
|
|
60
67
|
export { ClipboardFlavors, UseClipboardOpsOptions, UseClipboardOpsReturn, WEASEL_CLIPBOARD_MIME, WEASEL_CLIPBOARD_MIME_WEB, buildWeaselClipboardText, embedWeaselMetadataInSvg, extractWeaselClipboardFromSvg, parseWeaselClipboardText, sniffWeaselClipboardText, useClipboardOps } from './clipboard.js';
|
|
61
68
|
import { Vec, SnapCandidate } from '@weasel-js/geom/nd';
|
|
62
69
|
|
|
70
|
+
/** One pose write an {@link createArrangeOp} made. */
|
|
71
|
+
interface ArrangedPose {
|
|
72
|
+
id: string;
|
|
73
|
+
from: unknown;
|
|
74
|
+
to: unknown;
|
|
75
|
+
}
|
|
76
|
+
/** Arguments to {@link createArrangeOp}. */
|
|
77
|
+
interface ArrangeArgs {
|
|
78
|
+
/** The writes to make. Absent until a computed arrangement has run once. */
|
|
79
|
+
placed?: ArrangedPose[];
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Op: write a set of poses decided when the op first applies, not when it is
|
|
83
|
+
* built. The scene appends one to an edit that moves nodes into a container,
|
|
84
|
+
* and `compute` asks the container what to do with them after the rest of
|
|
85
|
+
* the edit has landed. Every later apply — redo, or a rebuild from a
|
|
86
|
+
* serialized history — replays the writes it recorded, so the arrangement is
|
|
87
|
+
* decided once. `write` replaces the adapter's `setPose` for this op and its
|
|
88
|
+
* inverses — the scene passes its own, since not every adapter an edit is
|
|
89
|
+
* applied through can write poses.
|
|
90
|
+
*/
|
|
91
|
+
declare function createArrangeOp(args: ArrangeArgs, compute?: () => ArrangedPose[], write?: (id: string, pose: unknown) => void): Op;
|
|
92
|
+
|
|
63
93
|
/** Pan offset (in pixels) plus per-axis zoom (pixels per content unit). */
|
|
64
94
|
interface ViewTransform {
|
|
65
95
|
panX: number;
|
|
@@ -109,6 +139,8 @@ declare function normalizeView(view: View): View;
|
|
|
109
139
|
interface UseSceneOptions<TData, TLayer extends string, TPose = RectPose> {
|
|
110
140
|
systemLayers: readonly SystemLayerSpec<TLayer>[];
|
|
111
141
|
initial?: readonly AddNodeSpec<TData, TLayer, TPose>[];
|
|
142
|
+
/** The document values the scene starts with, outside history. See `Scene.doc`. */
|
|
143
|
+
doc?: Readonly<Record<string, unknown>>;
|
|
112
144
|
ops?: Readonly<Record<string, RegisteredOp<unknown>>>;
|
|
113
145
|
historyLimit?: number;
|
|
114
146
|
/** Window (ms) within which consecutive same-shaped mutations merge into
|
|
@@ -187,6 +219,10 @@ interface NodePaintCtx {
|
|
|
187
219
|
* on `channel`, the colors to paint instead. **Absent** when nothing animates
|
|
188
220
|
* the node. The kit's path painters apply it; see `withColorOverrides`. */
|
|
189
221
|
vertexColors?: (channel: VertexColorChannel, base: readonly number[] | undefined) => readonly number[] | undefined;
|
|
222
|
+
/** What the node's `'inherit'` fill and stroke resolve to, looked up from
|
|
223
|
+
* its containers by the scene's `drawOne` wrapper. **Absent** for a node
|
|
224
|
+
* that inherits nothing. Hand it to `resolveFill` / `resolveStroke`. */
|
|
225
|
+
inherited?: InheritedPaint;
|
|
190
226
|
}
|
|
191
227
|
/**
|
|
192
228
|
* Per-node draw function — the scene-slot `drawOne` signature shared by
|
|
@@ -291,6 +327,12 @@ interface NodeInkCtx {
|
|
|
291
327
|
* rotation and `transform`. With it, a `{ px }` length is measured the way
|
|
292
328
|
* the renderer builds it, exact in every direction; without, at `scale`. */
|
|
293
329
|
screen?: readonly [number, number, number, number];
|
|
330
|
+
/** The path the node shows in place of its pose's, already where it is
|
|
331
|
+
* drawn: its box is measured from this, not from the placeholder pose. */
|
|
332
|
+
derivedPath?: Path | null;
|
|
333
|
+
/** As {@link NodePaintCtx.inherited}: a stroke or fill the node inherits
|
|
334
|
+
* inks it as its own does. */
|
|
335
|
+
inherited?: InheritedPaint;
|
|
294
336
|
}
|
|
295
337
|
|
|
296
338
|
/** What a painter that declares no `ink` is assumed to do. */
|
|
@@ -337,6 +379,9 @@ interface ShapeCoversPointOptions {
|
|
|
337
379
|
* everywhere, which degrades picking to the caller's AABB: for an edge,
|
|
338
380
|
* a zero-sized pose. */
|
|
339
381
|
derivedPath?: Path | null;
|
|
382
|
+
/** See {@link NodeInkCtx.inherited}. Without it an `'inherit'` field is
|
|
383
|
+
* read as none. */
|
|
384
|
+
inherited?: NodeInkCtx['inherited'];
|
|
340
385
|
}
|
|
341
386
|
/**
|
|
342
387
|
* Does the shape `node` actually paints cover the world point? Asks the painter's silhouette,
|
|
@@ -408,14 +453,14 @@ interface ViewRect {
|
|
|
408
453
|
w: number;
|
|
409
454
|
h: number;
|
|
410
455
|
}
|
|
411
|
-
/**
|
|
412
|
-
interface
|
|
456
|
+
/** The props every `<CanvasView>` takes, whichever side it holds. */
|
|
457
|
+
interface CanvasViewCommonProps {
|
|
413
458
|
/** Identifies the view to the surface and to input routing. Must be unique
|
|
414
459
|
* among the views on one canvas. */
|
|
415
460
|
id: string;
|
|
416
461
|
/**
|
|
417
462
|
* The id of a view to nest this one in. `bounds` is then measured from that
|
|
418
|
-
* view's rect, and a thunked `bounds` or `
|
|
463
|
+
* view's rect, and a thunked `bounds`, `view` or `aim` receives that view's camera
|
|
419
464
|
* and size as `outer` and `dims`. The view paints after it, cut to what it
|
|
420
465
|
* shows, paints only the layers it paints, and takes input there before it
|
|
421
466
|
* does. While no view has that id, this one neither paints nor takes input.
|
|
@@ -424,19 +469,6 @@ interface CanvasViewProps {
|
|
|
424
469
|
/** Where this view paints, recomputed every frame so the rect can track the
|
|
425
470
|
* outer camera. A plain rect is accepted for a fixed panel. */
|
|
426
471
|
bounds: ViewRect | ((outer: View, dims: Dims) => ViewRect);
|
|
427
|
-
/** Camera. Supply this to control it; otherwise the view keeps its own,
|
|
428
|
-
* seeded from `defaultView`. `onViewChange` fires either way.
|
|
429
|
-
*
|
|
430
|
-
* A thunk is a camera derived from the canvas's — a loupe following the
|
|
431
|
-
* pointer — read fresh at every paint and every event, so the two cannot
|
|
432
|
-
* disagree mid-gesture. It is controlled: a pan inside the view reaches
|
|
433
|
-
* only `onViewChange`. */
|
|
434
|
-
view?: View | ((outer: View, dims: Dims) => View);
|
|
435
|
-
defaultView?: View;
|
|
436
|
-
onViewChange?: (v: View) => void;
|
|
437
|
-
/** Pan limits, applied to every camera change the same way `<Canvas>`
|
|
438
|
-
* applies its own. */
|
|
439
|
-
viewBounds?: FramedBox;
|
|
440
472
|
/** Receives this view's camera, to read, drive, and watch from outside it. */
|
|
441
473
|
cameraRef?: Ref<CanvasViewCamera>;
|
|
442
474
|
/** Which of the surface's layers this view paints. Defaults to all of them —
|
|
@@ -488,6 +520,40 @@ interface CanvasViewProps {
|
|
|
488
520
|
* `selection` is supplied. */
|
|
489
521
|
selectionOptions?: UseSelectionOptions;
|
|
490
522
|
}
|
|
523
|
+
/** A view that holds its camera. */
|
|
524
|
+
interface CameraHeldViewProps {
|
|
525
|
+
/** Camera. Supply this to control it; otherwise the view keeps its own,
|
|
526
|
+
* seeded from `defaultView`. `onViewChange` fires either way.
|
|
527
|
+
*
|
|
528
|
+
* A thunk is a camera derived from the canvas's — a loupe following the
|
|
529
|
+
* pointer — read fresh at every paint and every event, so the two cannot
|
|
530
|
+
* disagree mid-gesture. It is controlled: a pan inside the view reaches
|
|
531
|
+
* only `onViewChange`. */
|
|
532
|
+
view?: View | ((outer: View, dims: Dims) => View);
|
|
533
|
+
defaultView?: View;
|
|
534
|
+
onViewChange?: (v: View) => void;
|
|
535
|
+
/** Pan limits, applied to every camera change the same way `<Canvas>`
|
|
536
|
+
* applies its own. */
|
|
537
|
+
viewBounds?: FramedBox;
|
|
538
|
+
aim?: never;
|
|
539
|
+
onAimChange?: never;
|
|
540
|
+
}
|
|
541
|
+
/** A view that holds its aim, and derives its camera from it. */
|
|
542
|
+
interface AimHeldViewProps {
|
|
543
|
+
/** What the view shows, as a world rect; its camera fits it to the frame, uniformly and centered.
|
|
544
|
+
* A thunk is read at each paint and event, measured like a thunked `view`. */
|
|
545
|
+
aim: FramedBox | ((outer: View, dims: Dims) => FramedBox);
|
|
546
|
+
/** A pan or zoom inside the view, or `setAim` on it, reported as the held rect that camera move carries. */
|
|
547
|
+
onAimChange?: (aim: FramedBox) => void;
|
|
548
|
+
view?: never;
|
|
549
|
+
defaultView?: never;
|
|
550
|
+
onViewChange?: never;
|
|
551
|
+
viewBounds?: never;
|
|
552
|
+
}
|
|
553
|
+
/** Props for `<CanvasView>`: the common ones, and either a camera or an aim. `Omit` does not distribute over
|
|
554
|
+
* the union, and a `Partial` of it does not spread back into `<CanvasView>`, so a wrapper builds its props from
|
|
555
|
+
* {@link CanvasViewCommonProps} and one half. */
|
|
556
|
+
type CanvasViewProps = CanvasViewCommonProps & (CameraHeldViewProps | AimHeldViewProps);
|
|
491
557
|
|
|
492
558
|
/**
|
|
493
559
|
* One view on a shared canvas. Owns a camera, contributes the viewport node
|
|
@@ -499,177 +565,71 @@ interface CanvasViewProps {
|
|
|
499
565
|
*/
|
|
500
566
|
declare function CanvasView(props: CanvasViewProps): null;
|
|
501
567
|
|
|
502
|
-
/**
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
/** One bit per debug feature; absent keys are off. */
|
|
508
|
-
interface DebugConfig {
|
|
509
|
-
hitboxes?: boolean;
|
|
510
|
-
handles?: boolean;
|
|
511
|
-
bounds?: boolean;
|
|
512
|
-
origins?: boolean;
|
|
513
|
-
snap?: boolean;
|
|
514
|
-
layers?: boolean;
|
|
515
|
-
/** Render each tracked node's id as a label at the top-left of its
|
|
516
|
-
* bounds. Pulls from the same `recordBounds` stream `bounds` uses, so
|
|
517
|
-
* no extra sink calls are required to enable. */
|
|
518
|
-
ids?: boolean;
|
|
519
|
-
/** Frame panel in the top-left corner: repaint rate and interval, the
|
|
520
|
-
* CPU cost and GL draw-call count of the last paint, and both again per
|
|
521
|
-
* render layer. The rate tracks the overlay's own draw callback, so it is
|
|
522
|
-
* the canvas's repaint rate — a canvas that is not repainting shows the
|
|
523
|
-
* last numbers, not zero. */
|
|
524
|
-
fps?: boolean;
|
|
525
|
-
/** The last viewport change a pan or zoom made: the viewport it started
|
|
526
|
-
* from, outlined in the current view, and the world point it held fixed. */
|
|
527
|
-
viewport?: boolean;
|
|
528
|
-
/** Optional per-feature color overrides; falls back to the default theme. */
|
|
529
|
-
theme?: Partial<DebugTheme>;
|
|
530
|
-
/** Optional per-feature line-width / dash overrides; falls back to
|
|
531
|
-
* {@link DEFAULT_DEBUG_STROKES}. */
|
|
532
|
-
strokes?: Partial<DebugStrokes>;
|
|
533
|
-
}
|
|
534
|
-
/** The name of one debug-overlay feature — the keys of {@link DebugConfig}
|
|
535
|
-
* that toggle a visualization. */
|
|
536
|
-
type DebugFeature = 'hitboxes' | 'handles' | 'bounds' | 'origins' | 'snap' | 'layers' | 'ids' | 'fps' | 'viewport';
|
|
537
|
-
/** Colors the debug overlay draws with, one entry per feature. */
|
|
538
|
-
interface DebugTheme {
|
|
539
|
-
hitboxFill: string;
|
|
540
|
-
hitboxStroke: string;
|
|
541
|
-
handle: string;
|
|
542
|
-
bounds: string;
|
|
543
|
-
origin: string;
|
|
544
|
-
snap: string;
|
|
545
|
-
layerText: string;
|
|
546
|
-
layerTextBg: string;
|
|
547
|
-
/** Color for the per-node id label rendered when `config.ids` is on. */
|
|
548
|
-
idText: string;
|
|
549
|
-
/** Foreground / background for the FPS panel. */
|
|
550
|
-
fpsText: string;
|
|
551
|
-
fpsTextBg: string;
|
|
552
|
-
/** Previous-viewport outline, anchor trail and readout. */
|
|
553
|
-
viewport: string;
|
|
554
|
-
}
|
|
555
|
-
/** Line width and dash pattern for one stroked debug feature. An empty (or
|
|
556
|
-
* omitted) `dash` is a solid line. */
|
|
557
|
-
interface DebugStroke {
|
|
558
|
-
width: number;
|
|
559
|
-
dash?: readonly number[];
|
|
560
|
-
}
|
|
561
|
-
/** The stroked half of the debug overlay's appearance, split from
|
|
562
|
-
* {@link DebugTheme} because only some features draw a line at all — text
|
|
563
|
-
* panels and filled origin dots take color and nothing else. */
|
|
564
|
-
interface DebugStrokes {
|
|
565
|
-
hitbox: DebugStroke;
|
|
566
|
-
bounds: DebugStroke;
|
|
567
|
-
handle: DebugStroke;
|
|
568
|
-
/** Rejected snap candidates only; accepted ones paint as a filled dot. */
|
|
569
|
-
snap: DebugStroke;
|
|
570
|
-
/** The previous-viewport outline and the anchor's trail. */
|
|
571
|
-
viewport: DebugStroke;
|
|
572
|
-
}
|
|
573
|
-
/** A hit region tested during the current frame. */
|
|
574
|
-
interface RecordedHitbox {
|
|
575
|
-
id: string;
|
|
576
|
-
kind: 'body' | 'handle' | 'rotation' | 'anchor';
|
|
577
|
-
shape: HitShape;
|
|
578
|
-
}
|
|
579
|
-
/** A handle drawn during the current frame, and where. */
|
|
580
|
-
interface RecordedHandle {
|
|
581
|
-
id: string;
|
|
582
|
-
position: {
|
|
583
|
-
x: number;
|
|
584
|
-
y: number;
|
|
585
|
-
};
|
|
586
|
-
kind: HandleKind;
|
|
568
|
+
/** A point in a view's world. A 2D world is the plane z = 0, so `z` is absent there. */
|
|
569
|
+
interface AimPoint {
|
|
570
|
+
x: number;
|
|
571
|
+
y: number;
|
|
572
|
+
z?: number;
|
|
587
573
|
}
|
|
588
|
-
/** A
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
574
|
+
/** A closed outline in a frame's CSS px, from the frame's top-left; at least 3 points. */
|
|
575
|
+
type AimOutline = readonly {
|
|
576
|
+
x: number;
|
|
577
|
+
y: number;
|
|
578
|
+
}[];
|
|
579
|
+
/** A target view, as an aim is drawn into it: its world, and its frame. */
|
|
580
|
+
interface AimSpace {
|
|
581
|
+
/** The view whose frame this is; `null` for a surface's root view. */
|
|
582
|
+
readonly viewId: string | null;
|
|
583
|
+
/** `'2d'` for core's views; any other value is its owner's (kernel3d: `'3d'`). */
|
|
584
|
+
readonly kind: string;
|
|
585
|
+
readonly size: {
|
|
594
586
|
width: number;
|
|
595
587
|
height: number;
|
|
596
588
|
};
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
interface RecordedOrigin {
|
|
600
|
-
id: string;
|
|
601
|
-
point: {
|
|
589
|
+
/** World point to frame px; `null` where the point does not draw (behind a 3D camera). */
|
|
590
|
+
project(p: AimPoint): {
|
|
602
591
|
x: number;
|
|
603
592
|
y: number;
|
|
604
|
-
};
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
* won. Unlike the other records these survive across frames, until the
|
|
608
|
-
* gesture ends. */
|
|
609
|
-
interface RecordedSnap {
|
|
610
|
-
point: {
|
|
593
|
+
} | null;
|
|
594
|
+
/** Frame px to the world point under it; `null` where there is none (a 3D ray missing its plane). */
|
|
595
|
+
unproject(px: {
|
|
611
596
|
x: number;
|
|
612
597
|
y: number;
|
|
613
|
-
};
|
|
614
|
-
accepted: boolean;
|
|
598
|
+
}): AimPoint | null;
|
|
615
599
|
}
|
|
616
|
-
/**
|
|
617
|
-
interface
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
/** The
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
from:
|
|
627
|
-
to: View$1;
|
|
628
|
-
/** World point the gesture held fixed, when it had one. */
|
|
629
|
-
anchor?: {
|
|
600
|
+
/** What a viewport shows, read in the world of the view it names. */
|
|
601
|
+
interface ViewAim<TExtent = unknown> {
|
|
602
|
+
readonly viewId: string | null;
|
|
603
|
+
/** Discriminates `extent`: `'rect'` for core's 2D views. */
|
|
604
|
+
readonly kind: string;
|
|
605
|
+
/** Where the aim lies in its world, in its owner's own terms. */
|
|
606
|
+
readonly extent: TExtent;
|
|
607
|
+
/** The aim's outline in `space`'s frame, or `null` when it cannot be drawn there. */
|
|
608
|
+
outlineIn(space: AimSpace): AimOutline | null;
|
|
609
|
+
/** This aim moved so the world point under frame px `from` in `space` ends up under `to`; `null` when either misses. */
|
|
610
|
+
pannedIn(space: AimSpace, from: {
|
|
630
611
|
x: number;
|
|
631
612
|
y: number;
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
id: string;
|
|
637
|
-
/** GL draw calls issued while this layer's commands were dispatched. A
|
|
638
|
-
* batched run is drawn when it closes, so it counts toward the layer that
|
|
639
|
-
* closed it. */
|
|
640
|
-
drawCalls: number;
|
|
641
|
-
/** CPU milliseconds: building the layer's commands plus dispatching them. */
|
|
642
|
-
ms: number;
|
|
643
|
-
}
|
|
644
|
-
/** What one paint cost, for the frame panel. */
|
|
645
|
-
interface FrameStats {
|
|
646
|
-
/** CPU milliseconds for the whole paint — command build and dispatch. GPU
|
|
647
|
-
* time is not included; the GPU runs asynchronously. */
|
|
648
|
-
paintMs: number;
|
|
649
|
-
drawCalls: number;
|
|
650
|
-
layers: LayerFrameStats[];
|
|
651
|
-
}
|
|
652
|
-
/** Everything the sink collected, ready for the overlay to draw. */
|
|
653
|
-
interface DebugSnapshot {
|
|
654
|
-
hitboxes: RecordedHitbox[];
|
|
655
|
-
handles: RecordedHandle[];
|
|
656
|
-
bounds: RecordedBounds[];
|
|
657
|
-
origins: RecordedOrigin[];
|
|
658
|
-
snap: RecordedSnap[];
|
|
659
|
-
layers: RecordedLayer[];
|
|
660
|
-
/** Latest viewport change; survives frames until replaced. */
|
|
661
|
-
viewport: RecordedViewport | null;
|
|
662
|
-
/** The previous paint's cost. The overlay draws before the paint it is part
|
|
663
|
-
* of is dispatched, so this is always one paint behind. */
|
|
664
|
-
frame: FrameStats | null;
|
|
665
|
-
}
|
|
666
|
-
/** The sink `<Canvas>` creates: what tools record into, plus the canvas-side
|
|
667
|
-
* half — the frame stats only the painter knows — and the read the overlay
|
|
668
|
-
* draws from. */
|
|
669
|
-
interface CanvasDebugSink extends DebugSink {
|
|
670
|
-
recordFrame(stats: FrameStats): void;
|
|
671
|
-
snapshot(): DebugSnapshot;
|
|
613
|
+
}, to: {
|
|
614
|
+
x: number;
|
|
615
|
+
y: number;
|
|
616
|
+
}): ViewAim<TExtent> | null;
|
|
672
617
|
}
|
|
618
|
+
/** Core's 2D aim: a world rect a view shows. */
|
|
619
|
+
type RectAim = ViewAim<FramedBox> & {
|
|
620
|
+
readonly kind: 'rect';
|
|
621
|
+
};
|
|
622
|
+
/** The aim of view `viewId` (`null`: a surface's root) showing world rect `rect`. */
|
|
623
|
+
declare function rectAim(viewId: string | null, rect: FramedBox): RectAim;
|
|
624
|
+
/** Whether `aim` is core's 2D rect aim, so its `extent` is a world rect. */
|
|
625
|
+
declare function isRectAim(aim: ViewAim): aim is RectAim;
|
|
626
|
+
/** A 2D view's frame: `view` is its camera and `size` its frame; frame px are measured from the frame's top-left. */
|
|
627
|
+
declare function aimSpace2d(viewId: string | null, view: View, size: Dims): AimSpace;
|
|
628
|
+
/**
|
|
629
|
+
* The camera that shows `rect` in a frame of `size`: `'exact'` per axis (the inverse of `viewportWorldRect`),
|
|
630
|
+
* `'contain'` uniform and centered. Not clamped to a zoom range, and finite for an empty rect or frame. Normalized.
|
|
631
|
+
*/
|
|
632
|
+
declare function viewForAim(rect: FramedBox, size: Dims, fit: 'exact' | 'contain'): View;
|
|
673
633
|
|
|
674
634
|
/**
|
|
675
635
|
* A view added through {@link SceneCanvasApi.addView}.
|
|
@@ -926,6 +886,13 @@ interface SceneCanvasApi extends CanvasExtensionApi {
|
|
|
926
886
|
}, opts?: {
|
|
927
887
|
except?: string;
|
|
928
888
|
}): ViewAt;
|
|
889
|
+
/** What view `id` shows (`null`: the canvas's own camera), or `null` while no such view is mounted. */
|
|
890
|
+
aimOf(id: string | null): ViewAim | null;
|
|
891
|
+
/** Point view `id` at `aim`. A camera-held view moves its camera to show the aim exactly, per axis, so a
|
|
892
|
+
* rect of another shape stretches it; for a uniform zoom-to-fit, use `fitViewToBounds` or `animateView`.
|
|
893
|
+
* An aim-held view reports the aim through `onAimChange`. `false` when there is no such view, the aim is
|
|
894
|
+
* not one it can read, or the write goes nowhere: no camera writer, or a controlled view with no handler. */
|
|
895
|
+
setAim(id: string | null, aim: ViewAim): boolean;
|
|
929
896
|
}
|
|
930
897
|
|
|
931
898
|
/**
|
|
@@ -942,6 +909,8 @@ interface SceneCanvasApi extends CanvasExtensionApi {
|
|
|
942
909
|
*/
|
|
943
910
|
interface GesturePreviewSource {
|
|
944
911
|
previewIds?(): Iterable<string> | null;
|
|
912
|
+
/** Absent/null falls back to the node's effective pose, which is where a
|
|
913
|
+
* transform publishing to the scene's overrides puts it. */
|
|
945
914
|
previewPose?(id: string): unknown;
|
|
946
915
|
/** Companion to `previewPose` for actions that mutate node data (anchor
|
|
947
916
|
* edits on `data.path` nodes). Absent/null falls back to committed data. */
|
|
@@ -1454,9 +1423,6 @@ interface UseNodeOverlayFrameOptions<TPose> {
|
|
|
1454
1423
|
*/
|
|
1455
1424
|
declare function useNodeOverlayFrame<TData, TLayer extends string, TPose extends RectPose>(scene: Scene<TData, TLayer, TPose>, containerRef: RefObject<HTMLElement | null>, nodeId: string | null | undefined, options?: UseNodeOverlayFrameOptions<TPose>): NodeOverlayFrame | null;
|
|
1456
1425
|
|
|
1457
|
-
/** JSON with object keys sorted, so two equal values produce one string. */
|
|
1458
|
-
declare function stableStringify(value: unknown): string;
|
|
1459
|
-
|
|
1460
1426
|
/** A 2D point in the rect element's local coordinate space. */
|
|
1461
1427
|
interface HandleDragPoint {
|
|
1462
1428
|
x: number;
|
|
@@ -1644,7 +1610,7 @@ interface DeviceProfileProviderProps {
|
|
|
1644
1610
|
* Publish one resolved profile to a subtree. `<SceneCanvas>` renders this so
|
|
1645
1611
|
* overlays, affordances, and consumer chrome all read the same object.
|
|
1646
1612
|
*/
|
|
1647
|
-
declare function DeviceProfileProvider({ value, children }: DeviceProfileProviderProps):
|
|
1613
|
+
declare function DeviceProfileProvider({ value, children }: DeviceProfileProviderProps): react.FunctionComponentElement<react.ProviderProps<DeviceProfile | null>>;
|
|
1648
1614
|
|
|
1649
1615
|
/**
|
|
1650
1616
|
* Call `onChange` each time `window.devicePixelRatio` changes: the window
|
|
@@ -1717,6 +1683,10 @@ interface PageLayoutOptions {
|
|
|
1717
1683
|
* Throws on two pages with one id.
|
|
1718
1684
|
*/
|
|
1719
1685
|
declare function layoutPages(pages: readonly Page[], options?: PageLayoutOptions): PlacedPage[];
|
|
1686
|
+
/** The name page `index` of the page order shows: its own, else "Page" and its place. */
|
|
1687
|
+
declare function pageName(page: {
|
|
1688
|
+
readonly name?: string | undefined;
|
|
1689
|
+
}, index: number): string;
|
|
1720
1690
|
/** The page under a world point, or `null` between and outside them. A point on an edge is on the page. */
|
|
1721
1691
|
declare function pageAt(pages: readonly PlacedPage[], point: {
|
|
1722
1692
|
readonly x: number;
|
|
@@ -1728,6 +1698,13 @@ declare function pageAt(pages: readonly PlacedPage[], point: {
|
|
|
1728
1698
|
* rule that says which page an object is on.
|
|
1729
1699
|
*/
|
|
1730
1700
|
declare function pageOfBounds(pages: readonly PlacedPage[], bounds: Bounds): PlacedPage | null;
|
|
1701
|
+
/**
|
|
1702
|
+
* The page a world-space box is held by: the one it is on (`pageOfBounds`),
|
|
1703
|
+
* else the one nearest it by the box-to-box gap, the earlier of two equally
|
|
1704
|
+
* near. `null` only with no pages. Used where every object must land on some
|
|
1705
|
+
* page, such as an export; `pageOfBounds` stays the rule for what is on one.
|
|
1706
|
+
*/
|
|
1707
|
+
declare function pageHolding(pages: readonly PlacedPage[], bounds: Bounds): PlacedPage | null;
|
|
1731
1708
|
/**
|
|
1732
1709
|
* The page `step` places along the page order from the one with id `current`:
|
|
1733
1710
|
* the next slide is `1`, the one before is `-1`. `null` past either end, unless
|
|
@@ -1758,6 +1735,64 @@ declare function pagesLayer(pages: readonly PlacedPage[], options: PagesLayerOpt
|
|
|
1758
1735
|
|
|
1759
1736
|
/** The view that shows one placed page whole: `fitViewToBounds` on its rect. */
|
|
1760
1737
|
declare function fitViewToPage(page: PlacedPage, viewportDims: ViewportDims, currentView: View, options?: FitViewToBoundsOptions): View;
|
|
1738
|
+
/** The page the view shows most of: the one overlapping the visible world rect most, or `null` when none shows. */
|
|
1739
|
+
declare function pageInView(pages: readonly PlacedPage[], view: View, viewportDims: ViewportDims): PlacedPage | null;
|
|
1740
|
+
|
|
1741
|
+
/**
|
|
1742
|
+
* A document's pages as a scene document value, and the edits that change
|
|
1743
|
+
* them. Each edit moves the nodes on a page by however far the page itself
|
|
1744
|
+
* moved, so what is on a page stays where it is on that page.
|
|
1745
|
+
*/
|
|
1746
|
+
|
|
1747
|
+
/** The document value under {@link PAGES_DOC_KEY}: the pages in order, and how they are laid out. */
|
|
1748
|
+
interface PagesDoc {
|
|
1749
|
+
readonly pages: readonly Page[];
|
|
1750
|
+
readonly layout?: PageLayoutOptions;
|
|
1751
|
+
}
|
|
1752
|
+
/** The scene document value key a page list lives under (`scene.doc`). */
|
|
1753
|
+
declare const PAGES_DOC_KEY = "core:pages";
|
|
1754
|
+
/** Options every page edit takes. */
|
|
1755
|
+
interface PageEditOptions {
|
|
1756
|
+
/** The undo entry's label. */
|
|
1757
|
+
label?: string;
|
|
1758
|
+
/** How node poses are measured and moved. Default: poses are rects. */
|
|
1759
|
+
descriptor?: PoseDescriptor<unknown>;
|
|
1760
|
+
}
|
|
1761
|
+
/** The scene's pages doc, or `null` when it has none. */
|
|
1762
|
+
declare function pagesOf<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>): PagesDoc | null;
|
|
1763
|
+
/** The scene's pages, placed in world space; empty when it has no pages doc. */
|
|
1764
|
+
declare function placedPagesOf<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>): PlacedPage[];
|
|
1765
|
+
/** An id none of `pages` has: `page-1`, `page-2`, and so on. */
|
|
1766
|
+
declare function nextPageId(pages: readonly Page[]): string;
|
|
1767
|
+
/**
|
|
1768
|
+
* The root nodes on each placed page, by page id: each root belongs to the
|
|
1769
|
+
* page its bounds overlap most (`pageOfBounds`). A root in the gaps belongs to
|
|
1770
|
+
* none, and one that derives from other nodes is left out, since it follows
|
|
1771
|
+
* them.
|
|
1772
|
+
*/
|
|
1773
|
+
declare function pageMembers<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>, placed: readonly PlacedPage[], descriptor?: PoseDescriptor<unknown>): Map<string, NodeId[]>;
|
|
1774
|
+
/**
|
|
1775
|
+
* Replace the scene's pages doc with `next`, moving each page's members by
|
|
1776
|
+
* the change in their page's place, all as one undo entry labeled `label`.
|
|
1777
|
+
* Members of a page `next` drops are left where they are; `removePage` deletes
|
|
1778
|
+
* them first.
|
|
1779
|
+
*/
|
|
1780
|
+
declare function setPages<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>, next: PagesDoc, label: string, options?: Pick<PageEditOptions, 'descriptor'>): void;
|
|
1781
|
+
/** Insert `page` at `index`, by default after the last page. */
|
|
1782
|
+
declare function addPage<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>, page: Page, options?: PageEditOptions & {
|
|
1783
|
+
index?: number;
|
|
1784
|
+
}): void;
|
|
1785
|
+
/** Delete page `id`, what is on it, and every node that derives from that, as one entry. */
|
|
1786
|
+
declare function removePage<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>, id: string, options?: PageEditOptions): void;
|
|
1787
|
+
/** Move page `id` to `index` in the page order. */
|
|
1788
|
+
declare function movePage<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>, id: string, index: number, options?: PageEditOptions): void;
|
|
1789
|
+
/** Give page `id` a new size. Its members keep their places on it; the pages after it shift. */
|
|
1790
|
+
declare function resizePage<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>, id: string, size: {
|
|
1791
|
+
readonly width: number;
|
|
1792
|
+
readonly height: number;
|
|
1793
|
+
}, options?: PageEditOptions): void;
|
|
1794
|
+
/** Rename page `id`; an empty name removes it. */
|
|
1795
|
+
declare function renamePage<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>, id: string, name: string, options?: PageEditOptions): void;
|
|
1761
1796
|
|
|
1762
1797
|
/** Optional clamp bounds for `zoomAt`. Defaults: {@link DEFAULT_MIN_ZOOM} /
|
|
1763
1798
|
* {@link DEFAULT_MAX_ZOOM} (per axis). */
|
|
@@ -1965,6 +2000,211 @@ declare function useVelocityTracker(): VelocityTracker;
|
|
|
1965
2000
|
*/
|
|
1966
2001
|
declare function interpolateView(from: View, to: View): (t: number) => View;
|
|
1967
2002
|
|
|
2003
|
+
/** An aim handed in by value (another surface's view, a 3D pane), with the writer that moves it. */
|
|
2004
|
+
interface AimSource {
|
|
2005
|
+
aim(): ViewAim | null;
|
|
2006
|
+
setAim?(aim: ViewAim): void;
|
|
2007
|
+
}
|
|
2008
|
+
/** How a marker's outline is stroked, in screen px. */
|
|
2009
|
+
interface ViewMarkerStyle {
|
|
2010
|
+
stroke?: string;
|
|
2011
|
+
width?: number;
|
|
2012
|
+
dash?: readonly number[];
|
|
2013
|
+
}
|
|
2014
|
+
/** One view's aim, drawn inside another view's frame. */
|
|
2015
|
+
interface ViewMarkerProps {
|
|
2016
|
+
/** Unique among the markers on one surface. */
|
|
2017
|
+
id: string;
|
|
2018
|
+
/** Whose aim: a view id on this surface, `null` for the root view, or an aim by value. */
|
|
2019
|
+
source: string | null | AimSource;
|
|
2020
|
+
/** Whose frame it is drawn in, after that view's layers: a view id, or `null` for the root. */
|
|
2021
|
+
target: string | null;
|
|
2022
|
+
/** Screen px. Default: stroke `#ffffff`, width 1, dash [2, 3]. */
|
|
2023
|
+
style?: ViewMarkerStyle;
|
|
2024
|
+
/** Default true: dragging the marker edits the source's aim. A source with no writer is never interactive.
|
|
2025
|
+
* A marker grabs its whole interior plus {@link VIEW_MARKER_HIT_SLOP_PX}, so one covering much of its
|
|
2026
|
+
* frame takes every press there; `false` opts out. */
|
|
2027
|
+
interactive?: boolean;
|
|
2028
|
+
}
|
|
2029
|
+
/** The marker style a {@link ViewMarkerProps.style} fills in from: the minimap indicator's. */
|
|
2030
|
+
declare const VIEW_MARKER_DEFAULT_STYLE: Required<ViewMarkerStyle>;
|
|
2031
|
+
/** What a marker resolves aims through: the surface's views. */
|
|
2032
|
+
interface ViewMarkerHost {
|
|
2033
|
+
aimOf(id: string | null): ViewAim | null;
|
|
2034
|
+
setAim(id: string | null, aim: ViewAim): boolean;
|
|
2035
|
+
}
|
|
2036
|
+
/** A screen-space layer, id `view-marker:<id>`, drawing `props`'s source aim in the frame it is handed. */
|
|
2037
|
+
declare function createViewMarkerLayer(props: () => ViewMarkerProps, host: ViewMarkerHost): RenderLayer<unknown>;
|
|
2038
|
+
/** A press on a marker, held for the drag: where it started, and the aim it started from. */
|
|
2039
|
+
interface ViewMarkerGrab {
|
|
2040
|
+
readonly markerId: string;
|
|
2041
|
+
/** Pan the source so the world point under the press ends up under `world`, a point in the target's world. */
|
|
2042
|
+
moveTo(world: {
|
|
2043
|
+
x: number;
|
|
2044
|
+
y: number;
|
|
2045
|
+
}): void;
|
|
2046
|
+
}
|
|
2047
|
+
/** A press this many screen px outside the outline still counts. */
|
|
2048
|
+
declare const VIEW_MARKER_HIT_SLOP_PX = 4;
|
|
2049
|
+
/**
|
|
2050
|
+
* The grab for a press at frame px `at` in `space`, the marker's target, or
|
|
2051
|
+
* `null` when the marker is not interactive, its source has no writer or no
|
|
2052
|
+
* aim, or `at` is not on its outline or within {@link VIEW_MARKER_HIT_SLOP_PX} of it. A surface with views
|
|
2053
|
+
* calls this itself; a canvas with none, such as a detached minimap, calls it to route a press to its marker.
|
|
2054
|
+
*/
|
|
2055
|
+
declare function grabViewMarker(props: ViewMarkerProps, host: ViewMarkerHost, space: AimSpace, at: {
|
|
2056
|
+
x: number;
|
|
2057
|
+
y: number;
|
|
2058
|
+
}): ViewMarkerGrab | null;
|
|
2059
|
+
|
|
2060
|
+
/**
|
|
2061
|
+
* Draws one view's aim inside another's frame, after that view's own layers.
|
|
2062
|
+
*
|
|
2063
|
+
* Renders nothing; outside a surface it is inert. Either view may mount after
|
|
2064
|
+
* the marker does: until both are there it draws nothing.
|
|
2065
|
+
*/
|
|
2066
|
+
declare function ViewMarker(props: ViewMarkerProps): null;
|
|
2067
|
+
|
|
2068
|
+
/**
|
|
2069
|
+
* The routing types that carry an overlay, bound to the kit's `RenderLayer`.
|
|
2070
|
+
*
|
|
2071
|
+
* `@weasel-js/routing` never reads an overlay — it collects the live ones and
|
|
2072
|
+
* hands them back in scope order — so it leaves the element type open. What a
|
|
2073
|
+
* weasel canvas draws is a `RenderLayer`, and every kit call site should see
|
|
2074
|
+
* that rather than `unknown`, so core binds the parameter once, here, and
|
|
2075
|
+
* re-exports these names under the ones they have always had.
|
|
2076
|
+
*/
|
|
2077
|
+
|
|
2078
|
+
/** What a canvas overlay is, at this layer. */
|
|
2079
|
+
type Overlay = RenderLayer<unknown>;
|
|
2080
|
+
declare module '@weasel-js/routing' {
|
|
2081
|
+
interface OverlaySchema {
|
|
2082
|
+
overlay: RenderLayer<unknown>;
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
/** Routing's `Contribution`, with overlays typed as `RenderLayer`. */
|
|
2086
|
+
type Contribution = Contribution$1<Overlay>;
|
|
2087
|
+
/** Routing's `ContributionChrome`, with overlays typed as `RenderLayer`. */
|
|
2088
|
+
type ContributionChrome = ContributionChrome$1<Overlay>;
|
|
2089
|
+
/** Routing's `Tool`, with overlays typed as `RenderLayer`. */
|
|
2090
|
+
type Tool = Tool$1<Overlay>;
|
|
2091
|
+
/** The same type as `Tool`, kept for code that imports it by this name. */
|
|
2092
|
+
type AnyTool = Tool;
|
|
2093
|
+
/** Routing's `ToolDef` (what `defineTool` takes), with overlays typed as `RenderLayer`. */
|
|
2094
|
+
type ToolDef = ToolDef$1<Overlay>;
|
|
2095
|
+
/** Routing's `ToolsApi`, with overlays typed as `RenderLayer`. */
|
|
2096
|
+
type ToolsApi = ToolsApi$1<Overlay>;
|
|
2097
|
+
/** Routing's `UseToolsOptions`, with overlays typed as `RenderLayer`. */
|
|
2098
|
+
type UseToolsOptions = UseToolsOptions$1<Overlay>;
|
|
2099
|
+
/** Routing's `useTools`, typed for `RenderLayer` overlays. */
|
|
2100
|
+
declare const useTools: (opts: UseToolsOptions) => ToolsApi;
|
|
2101
|
+
|
|
2102
|
+
/**
|
|
2103
|
+
* The versions a contribution can require, keyed by package without its
|
|
2104
|
+
* `@weasel-js/` scope. Only core reports its version today.
|
|
2105
|
+
*/
|
|
2106
|
+
interface KitVersions {
|
|
2107
|
+
core: string;
|
|
2108
|
+
}
|
|
2109
|
+
/** A contribution's `requires`: a semver range per package it was written against. */
|
|
2110
|
+
type KitRequirements = {
|
|
2111
|
+
readonly [K in keyof KitVersions]?: string;
|
|
2112
|
+
};
|
|
2113
|
+
/** The running kit's versions. */
|
|
2114
|
+
declare const KIT_VERSIONS: Readonly<KitVersions>;
|
|
2115
|
+
/** One requirement the running kit does not meet. */
|
|
2116
|
+
interface RequirementMismatch {
|
|
2117
|
+
package: string;
|
|
2118
|
+
range: string;
|
|
2119
|
+
/** The running version, or `undefined` when that package reports none. */
|
|
2120
|
+
running: string | undefined;
|
|
2121
|
+
reason: 'unsatisfied' | 'invalid-range' | 'unknown-package';
|
|
2122
|
+
}
|
|
2123
|
+
/**
|
|
2124
|
+
* Whether `version` falls in `range`. `null` when either cannot be read, so a
|
|
2125
|
+
* caller can tell a mismatch from a requirement it could not check.
|
|
2126
|
+
*/
|
|
2127
|
+
declare function satisfiesRange(version: string, range: string): boolean | null;
|
|
2128
|
+
/**
|
|
2129
|
+
* Every requirement in `requires` the running kit does not meet. A package
|
|
2130
|
+
* whose build does not know its own version (`0.0.0-unknown`, core's source
|
|
2131
|
+
* bundled without its define) is skipped: nothing can be said about it.
|
|
2132
|
+
*/
|
|
2133
|
+
declare function checkRequirements(requires: KitRequirements, running?: Readonly<Partial<Record<string, string>>>): RequirementMismatch[];
|
|
2134
|
+
|
|
2135
|
+
/** Reads the surface's deps from inside `SurfaceContribution.attach`. */
|
|
2136
|
+
interface ContributionDepReader {
|
|
2137
|
+
get<K extends DepName>(name: K): DepSchema[K] | undefined;
|
|
2138
|
+
}
|
|
2139
|
+
/** What {@link SurfaceContribution.beforePaint} and `afterPaint` are handed. */
|
|
2140
|
+
interface ContributionFrameCtx {
|
|
2141
|
+
/** The frame's timestamp, on `performance.now()`'s clock. Both phases of one
|
|
2142
|
+
* frame see the same value. */
|
|
2143
|
+
readonly time: number;
|
|
2144
|
+
/** The surface camera this frame paints with. */
|
|
2145
|
+
readonly view: View;
|
|
2146
|
+
/** Ask for another frame. A hook animating something calls this every frame
|
|
2147
|
+
* it still has work for, and stops calling it to let the loop go idle. */
|
|
2148
|
+
requestFrame(): void;
|
|
2149
|
+
/** The surface's deps, as `attach` reads them. */
|
|
2150
|
+
readonly deps: ContributionDepReader;
|
|
2151
|
+
}
|
|
2152
|
+
/**
|
|
2153
|
+
* A feature a surface installs in one step. Every role is optional: `bindings`,
|
|
2154
|
+
* `actions`, `deps`, `overlay` and `presentation` from `Contribution`, plus
|
|
2155
|
+
* the ones below. Installing it installs every role it declares, and removing
|
|
2156
|
+
* it removes them.
|
|
2157
|
+
*/
|
|
2158
|
+
interface SurfaceContribution extends Contribution {
|
|
2159
|
+
/** Views this entry adds to the surface, as `<SceneCanvas views>` takes. */
|
|
2160
|
+
views?: readonly CanvasViewProps[];
|
|
2161
|
+
/** Markers this entry draws, as `<ViewMarker>` elements would. */
|
|
2162
|
+
markers?: readonly ViewMarkerProps[];
|
|
2163
|
+
/**
|
|
2164
|
+
* Runs once the surface mounts; returns its teardown. For what the roles
|
|
2165
|
+
* above cannot say — a registered (hit-testable) layer, a subscription.
|
|
2166
|
+
*
|
|
2167
|
+
* Keyed by the function's identity, so a contribution built once (in a
|
|
2168
|
+
* `useMemo`, or at module scope) attaches once however often the host
|
|
2169
|
+
* re-renders.
|
|
2170
|
+
*/
|
|
2171
|
+
attach?: (api: CanvasExtensionApi, deps: ContributionDepReader) => () => void;
|
|
2172
|
+
/**
|
|
2173
|
+
* Runs on every frame the surface paints, before the paint — for state the
|
|
2174
|
+
* entry's layers read, advanced once per frame. Hooks run in the order the
|
|
2175
|
+
* surface lists its entries (registered tools, then `ambient` in array
|
|
2176
|
+
* order), and one that throws is reported and skipped without stopping the
|
|
2177
|
+
* frame.
|
|
2178
|
+
*/
|
|
2179
|
+
beforePaint?: (ctx: ContributionFrameCtx) => void;
|
|
2180
|
+
/** Runs after a frame's pixels have landed, in the same order as
|
|
2181
|
+
* {@link beforePaint}. A frame that painted nothing runs no `afterPaint`. */
|
|
2182
|
+
afterPaint?: (ctx: ContributionFrameCtx) => void;
|
|
2183
|
+
/**
|
|
2184
|
+
* The kit versions this entry was written against, as semver ranges:
|
|
2185
|
+
* `{ core: '^1.7' }`. A mismatch warns in development, or throws where the
|
|
2186
|
+
* surface is set to `versionCheck="strict"`.
|
|
2187
|
+
*/
|
|
2188
|
+
requires?: KitRequirements;
|
|
2189
|
+
}
|
|
2190
|
+
/**
|
|
2191
|
+
* Concatenate contribution bundles into one registry, preserving order. Throws
|
|
2192
|
+
* on a duplicate entry id, dep name, view id or marker id — two features
|
|
2193
|
+
* answering for the same name is a bug in whichever was added second.
|
|
2194
|
+
*/
|
|
2195
|
+
declare function mergeContributions<T extends SurfaceContribution>(...bundles: readonly (readonly T[])[]): T[];
|
|
2196
|
+
|
|
2197
|
+
/** The action id a drag on a view marker routes to. */
|
|
2198
|
+
declare const VIEW_MARKER_DRAG = "view.marker.drag";
|
|
2199
|
+
/** Drags the grabbed marker. There is nothing to commit, so a cancel ends where a release does. */
|
|
2200
|
+
declare function viewMarkerDragAction(): Action;
|
|
2201
|
+
/**
|
|
2202
|
+
* The always-on entry (id `'view-marker'`) that binds a drag on any marker to {@link VIEW_MARKER_DRAG}.
|
|
2203
|
+
* A `<SceneCanvas>` installs it unless `actions={null}` or a `tools` takeover leaves it out; to turn marker
|
|
2204
|
+
* dragging back on there, pass it in `ambient`, or in the takeover's own `useTools` ambient list.
|
|
2205
|
+
*/
|
|
2206
|
+
declare function createViewMarkerContribution(): SurfaceContribution;
|
|
2207
|
+
|
|
1968
2208
|
/** The size props every canvas host takes. */
|
|
1969
2209
|
interface SurfaceSizeProps {
|
|
1970
2210
|
/** CSS-pixel width. Omit it, or `height`, and the element fills its parent
|
|
@@ -2118,7 +2358,7 @@ interface SceneViewCanvasProps<TData, TLayer extends string, TPose> extends Surf
|
|
|
2118
2358
|
* pointer listeners or call `toBlob` for snapshots through this. */
|
|
2119
2359
|
canvasRef?: Ref<HTMLCanvasElement>;
|
|
2120
2360
|
}
|
|
2121
|
-
declare function SceneViewCanvasInner<TData, TLayer extends string, TPose>(props: SceneViewCanvasProps<TData, TLayer, TPose>):
|
|
2361
|
+
declare function SceneViewCanvasInner<TData, TLayer extends string, TPose>(props: SceneViewCanvasProps<TData, TLayer, TPose>): react.JSX.Element;
|
|
2122
2362
|
/**
|
|
2123
2363
|
* Pointer-inert read-only scene view. It attaches no event listeners;
|
|
2124
2364
|
* consumers attach their own through `canvasRef`, a plain prop because
|
|
@@ -2162,7 +2402,7 @@ interface DrawCanvasProps extends SurfaceSizeProps {
|
|
|
2162
2402
|
* a package demo, a swatch, a preview — where a `<SceneCanvas>` would bring a
|
|
2163
2403
|
* scene, tools and an input dispatcher that nothing uses.
|
|
2164
2404
|
*/
|
|
2165
|
-
declare function DrawCanvas(props: DrawCanvasProps):
|
|
2405
|
+
declare function DrawCanvas(props: DrawCanvasProps): react.JSX.Element;
|
|
2166
2406
|
|
|
2167
2407
|
/** The accent canvas chrome paints in when the element sits under no theme. */
|
|
2168
2408
|
declare const FALLBACK_ACCENT = "#4c8dff";
|
|
@@ -2390,134 +2630,7 @@ declare function useKeyState(options?: UseKeyStateOptions): KeyState;
|
|
|
2390
2630
|
* For chrome that draws the modifiers; a frame loop polls
|
|
2391
2631
|
* {@link useKeyState} instead. The object is the same one between changes.
|
|
2392
2632
|
*/
|
|
2393
|
-
declare function useKeyModifiers(options?: UseKeyStateOptions): KeyModifiers;
|
|
2394
|
-
|
|
2395
|
-
/**
|
|
2396
|
-
* The routing types that carry an overlay, bound to the kit's `RenderLayer`.
|
|
2397
|
-
*
|
|
2398
|
-
* `@weasel-js/routing` never reads an overlay — it collects the live ones and
|
|
2399
|
-
* hands them back in scope order — so it leaves the element type open. What a
|
|
2400
|
-
* weasel canvas draws is a `RenderLayer`, and every kit call site should see
|
|
2401
|
-
* that rather than `unknown`, so core binds the parameter once, here, and
|
|
2402
|
-
* re-exports these names under the ones they have always had.
|
|
2403
|
-
*/
|
|
2404
|
-
|
|
2405
|
-
/** What a canvas overlay is, at this layer. */
|
|
2406
|
-
type Overlay = RenderLayer<unknown>;
|
|
2407
|
-
declare module '@weasel-js/routing' {
|
|
2408
|
-
interface OverlaySchema {
|
|
2409
|
-
overlay: RenderLayer<unknown>;
|
|
2410
|
-
}
|
|
2411
|
-
}
|
|
2412
|
-
/** Routing's `Contribution`, with overlays typed as `RenderLayer`. */
|
|
2413
|
-
type Contribution = Contribution$1<Overlay>;
|
|
2414
|
-
/** Routing's `ContributionChrome`, with overlays typed as `RenderLayer`. */
|
|
2415
|
-
type ContributionChrome = ContributionChrome$1<Overlay>;
|
|
2416
|
-
/** Routing's `Tool`, with overlays typed as `RenderLayer`. */
|
|
2417
|
-
type Tool = Tool$1<Overlay>;
|
|
2418
|
-
/** The same type as `Tool`, kept for code that imports it by this name. */
|
|
2419
|
-
type AnyTool = Tool;
|
|
2420
|
-
/** Routing's `ToolDef` (what `defineTool` takes), with overlays typed as `RenderLayer`. */
|
|
2421
|
-
type ToolDef = ToolDef$1<Overlay>;
|
|
2422
|
-
/** Routing's `ToolsApi`, with overlays typed as `RenderLayer`. */
|
|
2423
|
-
type ToolsApi = ToolsApi$1<Overlay>;
|
|
2424
|
-
/** Routing's `UseToolsOptions`, with overlays typed as `RenderLayer`. */
|
|
2425
|
-
type UseToolsOptions = UseToolsOptions$1<Overlay>;
|
|
2426
|
-
/** Routing's `useTools`, typed for `RenderLayer` overlays. */
|
|
2427
|
-
declare const useTools: (opts: UseToolsOptions) => ToolsApi;
|
|
2428
|
-
|
|
2429
|
-
/**
|
|
2430
|
-
* The versions a contribution can require, keyed by package without its
|
|
2431
|
-
* `@weasel-js/` scope. Only core reports its version today.
|
|
2432
|
-
*/
|
|
2433
|
-
interface KitVersions {
|
|
2434
|
-
core: string;
|
|
2435
|
-
}
|
|
2436
|
-
/** A contribution's `requires`: a semver range per package it was written against. */
|
|
2437
|
-
type KitRequirements = {
|
|
2438
|
-
readonly [K in keyof KitVersions]?: string;
|
|
2439
|
-
};
|
|
2440
|
-
/** The running kit's versions. */
|
|
2441
|
-
declare const KIT_VERSIONS: Readonly<KitVersions>;
|
|
2442
|
-
/** One requirement the running kit does not meet. */
|
|
2443
|
-
interface RequirementMismatch {
|
|
2444
|
-
package: string;
|
|
2445
|
-
range: string;
|
|
2446
|
-
/** The running version, or `undefined` when that package reports none. */
|
|
2447
|
-
running: string | undefined;
|
|
2448
|
-
reason: 'unsatisfied' | 'invalid-range' | 'unknown-package';
|
|
2449
|
-
}
|
|
2450
|
-
/**
|
|
2451
|
-
* Whether `version` falls in `range`. `null` when either cannot be read, so a
|
|
2452
|
-
* caller can tell a mismatch from a requirement it could not check.
|
|
2453
|
-
*/
|
|
2454
|
-
declare function satisfiesRange(version: string, range: string): boolean | null;
|
|
2455
|
-
/**
|
|
2456
|
-
* Every requirement in `requires` the running kit does not meet. A package
|
|
2457
|
-
* whose build does not know its own version (`0.0.0-unknown`, core's source
|
|
2458
|
-
* bundled without its define) is skipped: nothing can be said about it.
|
|
2459
|
-
*/
|
|
2460
|
-
declare function checkRequirements(requires: KitRequirements, running?: Readonly<Partial<Record<string, string>>>): RequirementMismatch[];
|
|
2461
|
-
|
|
2462
|
-
/** Reads the surface's deps from inside `SurfaceContribution.attach`. */
|
|
2463
|
-
interface ContributionDepReader {
|
|
2464
|
-
get<K extends DepName>(name: K): DepSchema[K] | undefined;
|
|
2465
|
-
}
|
|
2466
|
-
/** What {@link SurfaceContribution.beforePaint} and `afterPaint` are handed. */
|
|
2467
|
-
interface ContributionFrameCtx {
|
|
2468
|
-
/** The frame's timestamp, on `performance.now()`'s clock. Both phases of one
|
|
2469
|
-
* frame see the same value. */
|
|
2470
|
-
readonly time: number;
|
|
2471
|
-
/** The surface camera this frame paints with. */
|
|
2472
|
-
readonly view: View;
|
|
2473
|
-
/** Ask for another frame. A hook animating something calls this every frame
|
|
2474
|
-
* it still has work for, and stops calling it to let the loop go idle. */
|
|
2475
|
-
requestFrame(): void;
|
|
2476
|
-
/** The surface's deps, as `attach` reads them. */
|
|
2477
|
-
readonly deps: ContributionDepReader;
|
|
2478
|
-
}
|
|
2479
|
-
/**
|
|
2480
|
-
* A feature a surface installs in one step. Every role is optional: `bindings`,
|
|
2481
|
-
* `actions`, `deps`, `overlay` and `presentation` from `Contribution`, plus
|
|
2482
|
-
* the ones below. Installing it installs every role it declares, and removing
|
|
2483
|
-
* it removes them.
|
|
2484
|
-
*/
|
|
2485
|
-
interface SurfaceContribution extends Contribution {
|
|
2486
|
-
/** Views this entry adds to the surface, as `<SceneCanvas views>` takes. */
|
|
2487
|
-
views?: readonly CanvasViewProps[];
|
|
2488
|
-
/**
|
|
2489
|
-
* Runs once the surface mounts; returns its teardown. For what the roles
|
|
2490
|
-
* above cannot say — a registered (hit-testable) layer, a subscription.
|
|
2491
|
-
*
|
|
2492
|
-
* Keyed by the function's identity, so a contribution built once (in a
|
|
2493
|
-
* `useMemo`, or at module scope) attaches once however often the host
|
|
2494
|
-
* re-renders.
|
|
2495
|
-
*/
|
|
2496
|
-
attach?: (api: CanvasExtensionApi, deps: ContributionDepReader) => () => void;
|
|
2497
|
-
/**
|
|
2498
|
-
* Runs on every frame the surface paints, before the paint — for state the
|
|
2499
|
-
* entry's layers read, advanced once per frame. Hooks run in the order the
|
|
2500
|
-
* surface lists its entries (registered tools, then `ambient` in array
|
|
2501
|
-
* order), and one that throws is reported and skipped without stopping the
|
|
2502
|
-
* frame.
|
|
2503
|
-
*/
|
|
2504
|
-
beforePaint?: (ctx: ContributionFrameCtx) => void;
|
|
2505
|
-
/** Runs after a frame's pixels have landed, in the same order as
|
|
2506
|
-
* {@link beforePaint}. A frame that painted nothing runs no `afterPaint`. */
|
|
2507
|
-
afterPaint?: (ctx: ContributionFrameCtx) => void;
|
|
2508
|
-
/**
|
|
2509
|
-
* The kit versions this entry was written against, as semver ranges:
|
|
2510
|
-
* `{ core: '^1.7' }`. A mismatch warns in development, or throws where the
|
|
2511
|
-
* surface is set to `versionCheck="strict"`.
|
|
2512
|
-
*/
|
|
2513
|
-
requires?: KitRequirements;
|
|
2514
|
-
}
|
|
2515
|
-
/**
|
|
2516
|
-
* Concatenate contribution bundles into one registry, preserving order. Throws
|
|
2517
|
-
* on a duplicate entry id, dep name or view id — two features answering for
|
|
2518
|
-
* the same name is a bug in whichever was added second.
|
|
2519
|
-
*/
|
|
2520
|
-
declare function mergeContributions<T extends SurfaceContribution>(...bundles: readonly (readonly T[])[]): T[];
|
|
2633
|
+
declare function useKeyModifiers(options?: UseKeyStateOptions): KeyModifiers;
|
|
2521
2634
|
|
|
2522
2635
|
/** Entry and layer id of the default feedback, so a host can find or order it. */
|
|
2523
2636
|
declare const LONG_PRESS_FEEDBACK_ID = "long-press-feedback";
|
|
@@ -2629,6 +2742,13 @@ interface RenderSceneToPixelsArgs<TData, TLayer extends string, TPose> {
|
|
|
2629
2742
|
* output's top-left, one unit per output pixel. Annotations, watermarks,
|
|
2630
2743
|
* and `renderDebugSnapshot`'s overlay ride here. */
|
|
2631
2744
|
overlay?: readonly DrawCommand[];
|
|
2745
|
+
/** Draw the scene's annotation layers (`isAnnotationLayer`). Default
|
|
2746
|
+
* `false`: a raster is an export, which leaves them out as the SVG export
|
|
2747
|
+
* does. Pass `true` to reproduce the canvas as it looked. */
|
|
2748
|
+
annotations?: boolean;
|
|
2749
|
+
/** Screen space → output pixels, which `'screen'`-unit paint is measured in. Default: output pixels. A
|
|
2750
|
+
* raster standing in for part of a larger surface, such as an export's page, names the whole here. */
|
|
2751
|
+
screen?: GlMat3;
|
|
2632
2752
|
}
|
|
2633
2753
|
/** The result of planning a headless render: how big the output is, the view
|
|
2634
2754
|
* that maps the source rect onto it, and the commands to draw. */
|
|
@@ -2774,6 +2894,8 @@ interface RenderDebugSnapshotArgs<TData, TLayer extends string, TPose> extends O
|
|
|
2774
2894
|
/** Which overlay features to draw, as on `<Canvas debug>`. The frame panel
|
|
2775
2895
|
* shows the recorded paint cost but no rate: a still image has no frames. */
|
|
2776
2896
|
config: DebugConfig;
|
|
2897
|
+
/** Draw the scene's annotation layers. Default `true`, as the canvas did. */
|
|
2898
|
+
annotations?: boolean;
|
|
2777
2899
|
}
|
|
2778
2900
|
/**
|
|
2779
2901
|
* Rasterize the scene through `view` at `size` and paint the debug overlay
|
|
@@ -2794,18 +2916,18 @@ declare function rasterToPng(image: RasterImage): Promise<Blob>;
|
|
|
2794
2916
|
/** Mount a `<PointerContextProvider>` only when none is already in scope. */
|
|
2795
2917
|
declare function PointerProviderIfRoot({ children }: {
|
|
2796
2918
|
children: ReactNode;
|
|
2797
|
-
}):
|
|
2919
|
+
}): react.JSX.Element;
|
|
2798
2920
|
|
|
2799
2921
|
/** Mount an `<ActionsProvider>` only when none is already in scope. */
|
|
2800
2922
|
declare function ActionsProviderIfRoot({ children }: {
|
|
2801
2923
|
children: ReactNode;
|
|
2802
|
-
}):
|
|
2924
|
+
}): react.JSX.Element;
|
|
2803
2925
|
|
|
2804
2926
|
/** Mount a `<DepRegistryProvider>` only when none is already in scope, so a
|
|
2805
2927
|
* consumer's dep sources are not shadowed by a nested canvas. */
|
|
2806
2928
|
declare function DepRegistryProviderIfRoot({ children }: {
|
|
2807
2929
|
children: ReactNode;
|
|
2808
|
-
}):
|
|
2930
|
+
}): react.JSX.Element;
|
|
2809
2931
|
|
|
2810
2932
|
/**
|
|
2811
2933
|
* Open the menu for a right-click, or for Shift+F10 when `params` carry no client point. Reads
|
|
@@ -2847,18 +2969,14 @@ type PathGestureFamily = Exclude<keyof typeof PATH_GESTURE_TAGS, 'path'>;
|
|
|
2847
2969
|
/** The tags of a path operation in `family`. */
|
|
2848
2970
|
declare function pathOperationTags(family: PathGestureFamily): readonly string[];
|
|
2849
2971
|
|
|
2850
|
-
/**
|
|
2851
|
-
* The box of a node as drawn — its pose box with the stroke included — which
|
|
2852
|
-
* is what selection chrome, resize, rotate, and alignment sit on. Places that
|
|
2853
|
-
* store geometry (a group's derived pose, booleans, export) keep reading the
|
|
2854
|
-
* pose box through `framedBounds`.
|
|
2855
|
-
*/
|
|
2856
|
-
|
|
2857
2972
|
/** The scene reads {@link drawnBoundsOf} makes. `childrenOf` absent: every
|
|
2858
|
-
* node is a leaf.
|
|
2973
|
+
* node is a leaf. `derivedPathOf` absent: every node is measured by its pose,
|
|
2974
|
+
* a path-derived one included — `drawnBoundsScene` supplies it for a `Scene`. */
|
|
2859
2975
|
interface DrawnBoundsScene {
|
|
2860
2976
|
get(id: NodeId): Node<unknown, string, unknown> | undefined;
|
|
2861
2977
|
childrenOf?(id: NodeId): readonly NodeId[];
|
|
2978
|
+
/** The path a node shows in place of its pose's, or `null` for one that shows its own. */
|
|
2979
|
+
derivedPathOf?(id: NodeId): Path | null;
|
|
2862
2980
|
}
|
|
2863
2981
|
/** How {@link drawnBoundsOf} reads a node. */
|
|
2864
2982
|
interface DrawnBoundsOptions {
|
|
@@ -2877,7 +2995,8 @@ interface DrawnBoundsOptions {
|
|
|
2877
2995
|
* drawn in: a turned node's box comes back turned with it. A node with no
|
|
2878
2996
|
* stroke, a painter that declares no {@link NodeShapeEntry.drawnBounds}, or
|
|
2879
2997
|
* `includeStroke: false` answers `framedBounds` unchanged. A container's box
|
|
2880
|
-
* reaches as far as its members' boxes do.
|
|
2998
|
+
* reaches as far as its members' boxes do. A node showing a derived path is
|
|
2999
|
+
* boxed around that path, and its placeholder pose plays no part.
|
|
2881
3000
|
*/
|
|
2882
3001
|
declare function drawnBoundsOf(scene: DrawnBoundsScene, id: NodeId, pose: unknown, opts?: DrawnBoundsOptions): FramedBox;
|
|
2883
3002
|
/** How far `id`'s ink at `pose` reaches past its pose box on each side, in
|
|
@@ -2956,7 +3075,9 @@ interface UseAlignOptions<TPose> {
|
|
|
2956
3075
|
* the same value and the alignment runs entirely in stored coordinates. */
|
|
2957
3076
|
composition?: PoseComposition<TPose>;
|
|
2958
3077
|
/** The nodes behind the adapter's ids. With it, a stroked node aligns by
|
|
2959
|
-
* the box it is drawn with (`drawnBoundsOf`); without, by its pose box.
|
|
3078
|
+
* the box it is drawn with (`drawnBoundsOf`); without, by its pose box.
|
|
3079
|
+
* Pass a `Scene` through `drawnBoundsScene` so a path-derived node is
|
|
3080
|
+
* boxed by its path. */
|
|
2960
3081
|
scene?: DrawnBoundsScene;
|
|
2961
3082
|
/** View scale a screen-pixel stroke is resolved at. Default 1. */
|
|
2962
3083
|
viewScale?: () => number | Scale2;
|
|
@@ -3145,6 +3266,7 @@ declare function defaultCommitAdapter<TPose>(scene: Scene<unknown, string, TPose
|
|
|
3145
3266
|
setChildOrder(parentId: string | null, ids: string[]): void;
|
|
3146
3267
|
setData(id: string, data: unknown): void;
|
|
3147
3268
|
setLayer(id: string, layer: string): void;
|
|
3269
|
+
setDependsOn(id: string, dependsOn: readonly string[] | "children" | undefined): void;
|
|
3148
3270
|
setLayout(id: string, layout: string | LayoutStrategy<TPose> | null): void;
|
|
3149
3271
|
setHidden(id: string, hidden: boolean): void;
|
|
3150
3272
|
setLocked(id: string, locked: boolean): void;
|
|
@@ -3182,6 +3304,14 @@ declare const flipAction: Action & {
|
|
|
3182
3304
|
requires: string[];
|
|
3183
3305
|
};
|
|
3184
3306
|
|
|
3307
|
+
/** Options for {@link createResizeAction}. */
|
|
3308
|
+
interface ResizeActionOptions {
|
|
3309
|
+
/** Runs in place of the scene commit, handed each resized node's pose at
|
|
3310
|
+
* release, so a host keeping the geometry as data can store it. The scene
|
|
3311
|
+
* is left as it was, and no undo entry is made; the constraints' `onEnd`
|
|
3312
|
+
* answers are not asked for. */
|
|
3313
|
+
commit?: (poses: ReadonlyMap<NodeId, unknown>, deps: ActionDeps) => void;
|
|
3314
|
+
}
|
|
3185
3315
|
/**
|
|
3186
3316
|
* Anchor-relative drag resize, committed as one batch on release. It needs
|
|
3187
3317
|
* `InvocationCtx.drag.affordance` with a `handle:*` kind.
|
|
@@ -3192,6 +3322,10 @@ declare const flipAction: Action & {
|
|
|
3192
3322
|
* carries the constraints, point snaps, and `expandIds`; absent, the invoker
|
|
3193
3323
|
* runs no constraints and `ids => ids` expansion.
|
|
3194
3324
|
*/
|
|
3325
|
+
declare function createResizeAction(opts?: ResizeActionOptions): Action & {
|
|
3326
|
+
requires: string[];
|
|
3327
|
+
};
|
|
3328
|
+
/** The resize that commits to the scene. */
|
|
3195
3329
|
declare const resizeAction: Action & {
|
|
3196
3330
|
requires: string[];
|
|
3197
3331
|
};
|
|
@@ -3628,6 +3762,34 @@ declare const sliceAction: Action & {
|
|
|
3628
3762
|
requires: string[];
|
|
3629
3763
|
};
|
|
3630
3764
|
|
|
3765
|
+
/**
|
|
3766
|
+
* Delete ops for the sources a removal of `ids` takes with it (see
|
|
3767
|
+
* `hiddenSourcesTakenWith`), for an action whose own ops remove `ids` some
|
|
3768
|
+
* other way. Append them after those ops: a delete finds its slot as it runs.
|
|
3769
|
+
* Sources in `keep` stay.
|
|
3770
|
+
*/
|
|
3771
|
+
declare function hiddenSourceDeleteOps(scene: Scene<unknown, string, unknown>, ids: readonly NodeId[], label: string, keep?: ReadonlySet<NodeId>): Op[];
|
|
3772
|
+
/** Options for {@link createDeleteAction}. */
|
|
3773
|
+
interface DeleteActionOptions {
|
|
3774
|
+
/** Runs in place of the default, {@link commitDeleteToScene}. */
|
|
3775
|
+
commit?: (ids: readonly NodeId[], deps: ActionDeps) => void;
|
|
3776
|
+
}
|
|
3777
|
+
/** The default commit: removes `ids`, their dependents, and the sources a
|
|
3778
|
+
* path effect among them hid, as one undo entry, then empties the selection. */
|
|
3779
|
+
declare function commitDeleteToScene(ids: readonly NodeId[], deps: ActionDeps): void;
|
|
3780
|
+
/** Delete on Delete and Backspace: hands the selected ids to `commit`. */
|
|
3781
|
+
declare function createDeleteAction(opts?: DeleteActionOptions): Action & {
|
|
3782
|
+
requires: string[];
|
|
3783
|
+
};
|
|
3784
|
+
/**
|
|
3785
|
+
* Removes every selected node from the scene as one undo entry. Undo restores
|
|
3786
|
+
* everything the removal cascaded — a container's children and a deleted
|
|
3787
|
+
* node's dependents come back with it, at their own slots.
|
|
3788
|
+
*/
|
|
3789
|
+
declare const deleteAction: Action & {
|
|
3790
|
+
requires: string[];
|
|
3791
|
+
};
|
|
3792
|
+
|
|
3631
3793
|
/**
|
|
3632
3794
|
* Tuning for {@link makePinchZoomAction}.
|
|
3633
3795
|
*/
|
|
@@ -3663,7 +3825,8 @@ declare const clipboardCopyAction: Action & {
|
|
|
3663
3825
|
};
|
|
3664
3826
|
/**
|
|
3665
3827
|
* Static descriptor for the `clipboard.cut` Action (Cmd/Ctrl+X) — copy, then
|
|
3666
|
-
* the same batched delete `deleteAction` performs, as one undo entry
|
|
3828
|
+
* the same batched delete `deleteAction` performs, as one undo entry: the
|
|
3829
|
+
* sources a path effect hid go too.
|
|
3667
3830
|
*/
|
|
3668
3831
|
declare const clipboardCutAction: Action & {
|
|
3669
3832
|
requires: string[];
|
|
@@ -4323,318 +4486,6 @@ interface UseStickyToolOptions extends InsertToolOptions, StickyStyle {
|
|
|
4323
4486
|
*/
|
|
4324
4487
|
declare function useStickyTool(options?: UseStickyToolOptions): Tool;
|
|
4325
4488
|
|
|
4326
|
-
/** The part of a scene a rig's skins read and write. */
|
|
4327
|
-
interface SkinScene<TPose> {
|
|
4328
|
-
get(id: NodeId): {
|
|
4329
|
-
pose: TPose;
|
|
4330
|
-
data?: unknown;
|
|
4331
|
-
} | undefined;
|
|
4332
|
-
readonly overrides: PoseOverrides<TPose>;
|
|
4333
|
-
setPose(id: NodeId, pose: TPose): void;
|
|
4334
|
-
update(id: NodeId, patch: {
|
|
4335
|
-
data: never;
|
|
4336
|
-
}): void;
|
|
4337
|
-
}
|
|
4338
|
-
/** Where a node's path is drawn, for a skin to bend: `null` for a node with none. */
|
|
4339
|
-
type RestPath<TPose> = (node: {
|
|
4340
|
-
pose: TPose;
|
|
4341
|
-
data?: unknown;
|
|
4342
|
-
}) => Path | null;
|
|
4343
|
-
/** The path in a node's `data.path`, carried through its pose as `kit:path` paints it. */
|
|
4344
|
-
declare function dataRestPath<TPose>(node: {
|
|
4345
|
-
pose: TPose;
|
|
4346
|
-
data?: unknown;
|
|
4347
|
-
}): Path | null;
|
|
4348
|
-
|
|
4349
|
-
/** The part of a scene a rig writes to. */
|
|
4350
|
-
interface RigScene<TPose> extends SkinScene<TPose> {
|
|
4351
|
-
batch<T>(label: string, fn: () => T): T;
|
|
4352
|
-
}
|
|
4353
|
-
/** What a `RigApply` knows about the node it is posing. */
|
|
4354
|
-
interface RigApplyContext<TPose> {
|
|
4355
|
-
/** The joint the node rides. */
|
|
4356
|
-
joint: string;
|
|
4357
|
-
node: NodeId;
|
|
4358
|
-
/** The node's document pose when the rig was bound — where it sits at the
|
|
4359
|
-
* bind pose. */
|
|
4360
|
-
rest: TPose;
|
|
4361
|
-
/** The joint's world transform at the bind pose. */
|
|
4362
|
-
restWorld: GlMat3;
|
|
4363
|
-
/** `world * inverse(restWorld)`: the motion since the bind pose, in world
|
|
4364
|
-
* space. Carrying `rest` by it is what welding the node to the joint means. */
|
|
4365
|
-
fromRest: GlMat3;
|
|
4366
|
-
}
|
|
4367
|
-
/** Turns a joint's world transform into a pose for one bound node. The only
|
|
4368
|
-
* part of a rig that knows the scene's pose shape. */
|
|
4369
|
-
type RigApply<TPose> = (world: GlMat3, ctx: RigApplyContext<TPose>) => TPose;
|
|
4370
|
-
/** Options for `bindRig`. */
|
|
4371
|
-
interface BindRigOptions<TPose> {
|
|
4372
|
-
scene: RigScene<TPose>;
|
|
4373
|
-
skeleton: Skeleton;
|
|
4374
|
-
/** Joint name → the node or nodes that ride it. Each node keeps the offset
|
|
4375
|
-
* from its joint that it has at the bind pose. */
|
|
4376
|
-
bindings?: Readonly<Record<string, NodeId | readonly NodeId[]>>;
|
|
4377
|
-
/** Node id → the weights its path bends by. Where a bound node moves whole with one joint,
|
|
4378
|
-
* a skinned node's points each follow their own joints, and the rig shows the bent path
|
|
4379
|
-
* through the node's pose override, posed at the path's bounds. */
|
|
4380
|
-
skins?: Readonly<Record<NodeId, Skin>>;
|
|
4381
|
-
/** Where a skinned node's path is drawn when the rig is bound. Default
|
|
4382
|
-
* {@link dataRestPath}: the node's `data.path`, through its pose. */
|
|
4383
|
-
restPath?: RestPath<TPose>;
|
|
4384
|
-
/** Default: {@link rigidRigApply} over `descriptor`. */
|
|
4385
|
-
apply?: RigApply<TPose>;
|
|
4386
|
-
/** The descriptor the default `apply` reads and writes poses through.
|
|
4387
|
-
* Default `AUTO_POSE_DESCRIPTOR`. */
|
|
4388
|
-
descriptor?: PoseDescriptor<TPose>;
|
|
4389
|
-
}
|
|
4390
|
-
/** A skeleton bound to scene nodes, as `bindRig` returns it. */
|
|
4391
|
-
interface Rig {
|
|
4392
|
-
readonly skeleton: Skeleton;
|
|
4393
|
-
/**
|
|
4394
|
-
* The rig's pose as a value an animator moves. Its committed value starts as `{}`, the bind
|
|
4395
|
-
* pose, and each frame the rig is posed with what the target shows. A clip is a
|
|
4396
|
-
* `SampledTrack<Pose>` given this as its `target`: clips on one rig crossfade by their
|
|
4397
|
-
* `weight`s, weights short of 1 leave the rest to the committed pose, and a `spring` or
|
|
4398
|
-
* `tween` from a pose away from the committed one adds on top. `animator.hold` shows a pose made elsewhere the same way, an
|
|
4399
|
-
* IK solve included.
|
|
4400
|
-
*/
|
|
4401
|
-
readonly target: Target<Pose>;
|
|
4402
|
-
/**
|
|
4403
|
-
* Commit `pose` and move every bound node to what the target now shows, which is `pose`
|
|
4404
|
-
* unless something is animating the target; a hold on it weighs the new pose in when it is
|
|
4405
|
-
* next read, at the animator's next frame or the hold's `touch()`. Writes go through the scene's pose overrides —
|
|
4406
|
-
* no history entry, no document write, no version bump — and are committed. `root`, where
|
|
4407
|
-
* given, replaces the placement, as {@link Rig.place}.
|
|
4408
|
-
*/
|
|
4409
|
-
pose(pose: Pose, root?: GlMat3): void;
|
|
4410
|
-
/** Place the rig in the world by `root`, which may mirror it, and pose it there. It stays
|
|
4411
|
-
* until placed again; with no `root`, the rig goes back to where its skeleton puts it. */
|
|
4412
|
-
place(root?: GlMat3): void;
|
|
4413
|
-
/** The joint world transforms as the rig was last posed, root applied. */
|
|
4414
|
-
world(): ReadonlyMap<string, GlMat3>;
|
|
4415
|
-
/** Write the current frame into the bound nodes' document poses as one
|
|
4416
|
-
* undo entry, and drop the overrides. A skinned node's bent path goes into
|
|
4417
|
-
* its `data.path`. Later frames stay relative to the bind-time rest, so
|
|
4418
|
-
* baking does not compound. */
|
|
4419
|
-
bake(label?: string): void;
|
|
4420
|
-
/** Drop the overrides; the nodes show their document poses again until the
|
|
4421
|
-
* rig is next posed. */
|
|
4422
|
-
release(): void;
|
|
4423
|
-
}
|
|
4424
|
-
/**
|
|
4425
|
-
* Carries a node rigidly with its joint: the rest pose's center moves by
|
|
4426
|
-
* `fromRest`, and its rotation turns with the rest pose's x-axis. Scale in the
|
|
4427
|
-
* joint chain moves positions but not sizes — the pose model holds no shear,
|
|
4428
|
-
* and a sized pose under anisotropic scale would need one. Write an `apply`
|
|
4429
|
-
* that reads `world` to size nodes from joint scale.
|
|
4430
|
-
*/
|
|
4431
|
-
declare function rigidRigApply<TPose>(descriptor: PoseDescriptor<TPose>): RigApply<TPose>;
|
|
4432
|
-
/**
|
|
4433
|
-
* Bind a skeleton's joints to scene nodes. Nodes are written in world space
|
|
4434
|
-
* and the rig resolves its own hierarchy, so bound nodes are best left
|
|
4435
|
-
* unparented, or under containers whose pose does not compose into theirs;
|
|
4436
|
-
* the scene's tree stays free to order and group them for drawing.
|
|
4437
|
-
*/
|
|
4438
|
-
declare function bindRig<TPose>(options: BindRigOptions<TPose>): Rig;
|
|
4439
|
-
|
|
4440
|
-
/** What a rig reads from node data: a `skeleton` on the node that is the rig, and on the nodes
|
|
4441
|
-
* under it a `skin` for a path that bends or a `joint` for a node that rides one whole. */
|
|
4442
|
-
interface RigNodeData {
|
|
4443
|
-
/** Joints relative to the node's pose: its box's top-left corner, turned as the node is. */
|
|
4444
|
-
skeleton?: Skeleton;
|
|
4445
|
-
skin?: Skin;
|
|
4446
|
-
joint?: string;
|
|
4447
|
-
}
|
|
4448
|
-
/** Weights to bind in place of the document's, and word of when they change. A `RigEditState`
|
|
4449
|
-
* is one: it holds what a stroke of the weight tool has painted and not yet written. */
|
|
4450
|
-
interface PaintedSkins {
|
|
4451
|
-
/** By node. A new map whenever the weights change. */
|
|
4452
|
-
painted(): ReadonlyMap<NodeId, Skin>;
|
|
4453
|
-
listen(fn: () => void): () => void;
|
|
4454
|
-
}
|
|
4455
|
-
/** The part of a scene `rigFromNode` reads. */
|
|
4456
|
-
interface RigNodeSource<TPose> {
|
|
4457
|
-
get(id: NodeId): {
|
|
4458
|
-
pose: TPose;
|
|
4459
|
-
data?: unknown;
|
|
4460
|
-
} | undefined;
|
|
4461
|
-
childrenOf(id: NodeId): readonly NodeId[];
|
|
4462
|
-
}
|
|
4463
|
-
/** The skeleton, bindings, and skins a rig node declares, as `bindRig` takes them. */
|
|
4464
|
-
interface RigNodeParts {
|
|
4465
|
-
skeleton: Skeleton;
|
|
4466
|
-
bindings: Record<string, NodeId[]>;
|
|
4467
|
-
skins: Record<NodeId, Skin>;
|
|
4468
|
-
}
|
|
4469
|
-
/**
|
|
4470
|
-
* A skeleton as a rig node's data keeps it, moved to where the node's pose puts it: its root
|
|
4471
|
-
* joints are offset from the pose box's top-left corner and turned as the node is. Joints
|
|
4472
|
-
* under a root are relative to their parents and are left as they are.
|
|
4473
|
-
*/
|
|
4474
|
-
declare function placeSkeleton<TPose>(skeleton: Skeleton, pose: TPose, descriptor?: PoseDescriptor<TPose>): Skeleton;
|
|
4475
|
-
/** The inverse of {@link placeSkeleton}: a skeleton in the scene's space, as the node at
|
|
4476
|
-
* `pose` would keep it in its data. */
|
|
4477
|
-
declare function unplaceSkeleton<TPose>(skeleton: Skeleton, pose: TPose, descriptor?: PoseDescriptor<TPose>): Skeleton;
|
|
4478
|
-
/**
|
|
4479
|
-
* Read a rig out of the scene: the skeleton in `id`'s `data.skeleton`, placed by that node's
|
|
4480
|
-
* pose, and under it every node whose data has a `skin` or names a `joint`.
|
|
4481
|
-
*/
|
|
4482
|
-
declare function rigFromNode<TPose>(scene: RigNodeSource<TPose>, id: NodeId, descriptor?: PoseDescriptor<TPose>): RigNodeParts;
|
|
4483
|
-
/** Options for `useRigNode`. */
|
|
4484
|
-
interface UseRigNodeOptions<TPose> extends Pick<BindRigOptions<TPose>, 'apply' | 'descriptor' | 'restPath'> {
|
|
4485
|
-
scene: RigScene<TPose> & RigNodeSource<TPose> & {
|
|
4486
|
-
subscribe(listener: () => void): () => void;
|
|
4487
|
-
getVersion(): number;
|
|
4488
|
-
};
|
|
4489
|
-
/** The node whose data holds the skeleton. */
|
|
4490
|
-
node: NodeId;
|
|
4491
|
-
/** Weights bound in place of a node's `data.skin` while they are held. Give it the
|
|
4492
|
-
* `RigEditState` the weight tool has, and a stroke bends the path as it is painted. */
|
|
4493
|
-
painting?: PaintedSkins;
|
|
4494
|
-
}
|
|
4495
|
-
/**
|
|
4496
|
-
* A {@link Rig} read from a node, as {@link rigFromNode} reads it. It is bound again when the
|
|
4497
|
-
* rig node or a node under it changes its pose or data, or when nodes under it come or go; an
|
|
4498
|
-
* edit elsewhere in the scene leaves it alone. A rig bound again keeps its `target`, with the
|
|
4499
|
-
* animations running on it, its committed pose, and its placement, unless the skeleton's
|
|
4500
|
-
* joints were added, removed, renamed, or reordered. Then it has a new `target`, which takes
|
|
4501
|
-
* over the placement and the pose of every joint the skeleton still names. Animations go on
|
|
4502
|
-
* running on the target they were started on and show through the new one, so a joint that
|
|
4503
|
-
* was renamed stops moving.
|
|
4504
|
-
*/
|
|
4505
|
-
declare function useRigNode<TPose>(options: UseRigNodeOptions<TPose>): Rig;
|
|
4506
|
-
|
|
4507
|
-
/** What the bone and weight tools share between gestures: the joint they act on, and the
|
|
4508
|
-
* weights a stroke has painted and not yet written. */
|
|
4509
|
-
interface RigEditState extends PaintedSkins {
|
|
4510
|
-
/** The active joint's name, or `null`. */
|
|
4511
|
-
active(): string | null;
|
|
4512
|
-
setActive(joint: string | null): void;
|
|
4513
|
-
/** Weights a stroke of the weight tool has painted and not yet written, by node. Empty
|
|
4514
|
-
* between strokes. `useRigNode` given this state as `painting` binds them as they change. */
|
|
4515
|
-
painted(): ReadonlyMap<NodeId, Skin>;
|
|
4516
|
-
/** Replace the painted weights; `null` empties them. */
|
|
4517
|
-
paint(next: ReadonlyMap<NodeId, Skin> | null): void;
|
|
4518
|
-
/** Notified when the active joint or the painted weights change. Returns an unsubscribe. */
|
|
4519
|
-
listen(fn: () => void): () => void;
|
|
4520
|
-
}
|
|
4521
|
-
/** A `RigEditState` with no joint active. Hand one to both tools so a joint picked with the
|
|
4522
|
-
* bone tool is the one the weight tool paints. */
|
|
4523
|
-
declare function createRigEditState(): RigEditState;
|
|
4524
|
-
|
|
4525
|
-
/** Options for `useBoneTool`. */
|
|
4526
|
-
interface UseBoneToolOptions {
|
|
4527
|
-
scene: Scene<unknown, string, unknown>;
|
|
4528
|
-
/** The node whose data holds the skeleton, or will once a bone is drawn: usually read from
|
|
4529
|
-
* the selection. `null` leaves the tool with nothing to edit. */
|
|
4530
|
-
rig: () => NodeId | null;
|
|
4531
|
-
/** Shared with `useWeightTool`, so both act on one joint. Default: the tool's own. */
|
|
4532
|
-
state?: RigEditState;
|
|
4533
|
-
/** Override the default keybinding (`{ key: 'J' }`). Pass `null` to omit. */
|
|
4534
|
-
keybinding?: ToolKeybinding | null;
|
|
4535
|
-
/** Screen px around a joint within which a press takes it. Default 10. */
|
|
4536
|
-
reach?: number;
|
|
4537
|
-
}
|
|
4538
|
-
/**
|
|
4539
|
-
* Draws and edits the skeleton in a node's `data.skeleton`. A drag on a joint moves it, with
|
|
4540
|
-
* the joints under it; a drag from anywhere else draws a bone, from the active joint if there
|
|
4541
|
-
* is one and from the press if not, and the new joint becomes the active one. A click picks
|
|
4542
|
-
* the active joint or clears it, Delete removes it with everything under it, taking its
|
|
4543
|
-
* weights out of every skin beneath the rig node, and Escape clears it. Each edit is one undo
|
|
4544
|
-
* entry.
|
|
4545
|
-
*/
|
|
4546
|
-
declare function useBoneTool(options: UseBoneToolOptions): Tool;
|
|
4547
|
-
|
|
4548
|
-
/** A rig node and its skeleton in the scene's space, as the rig tools edit and draw it. */
|
|
4549
|
-
interface PlacedRig {
|
|
4550
|
-
id: NodeId;
|
|
4551
|
-
skeleton: Skeleton;
|
|
4552
|
-
}
|
|
4553
|
-
/** The rig at node `id`, an empty skeleton for a node that has none yet, or `null` when
|
|
4554
|
-
* there is no such node. */
|
|
4555
|
-
declare function placedRig(scene: {
|
|
4556
|
-
get(id: NodeId): {
|
|
4557
|
-
pose: unknown;
|
|
4558
|
-
data?: unknown;
|
|
4559
|
-
} | undefined;
|
|
4560
|
-
}, id: NodeId | null): PlacedRig | null;
|
|
4561
|
-
|
|
4562
|
-
/**
|
|
4563
|
-
* A screen-space layer drawing a skeleton as bones and joints at a constant size: a line from
|
|
4564
|
-
* each joint to its parent, a ring on each joint, and the active joint filled.
|
|
4565
|
-
*/
|
|
4566
|
-
declare function createBoneOverlay(source: {
|
|
4567
|
-
id: string;
|
|
4568
|
-
/** The skeleton to draw, in the scene's space, or `null` for none. */
|
|
4569
|
-
skeleton(): Skeleton | null;
|
|
4570
|
-
active(): string | null;
|
|
4571
|
-
subscribe(fn: () => void): () => void;
|
|
4572
|
-
/** Joint dot radius in screen px, read each frame. Default `JOINT_RADIUS_PX`. */
|
|
4573
|
-
jointRadiusPx?: () => number | undefined;
|
|
4574
|
-
}): RenderLayer<unknown>;
|
|
4575
|
-
|
|
4576
|
-
/** Options for `useWeightTool`. */
|
|
4577
|
-
interface UseWeightToolOptions {
|
|
4578
|
-
scene: Scene<unknown, string, unknown>;
|
|
4579
|
-
/** The node whose data holds the skeleton; the tool paints the paths under it. */
|
|
4580
|
-
rig: () => NodeId | null;
|
|
4581
|
-
/** Shared with `useBoneTool`, so both act on one joint. Default: the tool's own. */
|
|
4582
|
-
state?: RigEditState;
|
|
4583
|
-
/** Override the default keybinding (`{ key: 'W' }`). Pass `null` to omit. */
|
|
4584
|
-
keybinding?: ToolKeybinding | null;
|
|
4585
|
-
/** The brush's radius in screen px. Default 24. */
|
|
4586
|
-
radius?: number;
|
|
4587
|
-
/** Screen px around a joint within which a click picks it. Default 10. */
|
|
4588
|
-
reach?: number;
|
|
4589
|
-
}
|
|
4590
|
-
/**
|
|
4591
|
-
* Paints how much the active joint weighs each point of the paths under a rig node, into
|
|
4592
|
-
* their `data.skin`. A click on a joint makes it the active one. A drag is a round brush:
|
|
4593
|
-
* points under it follow the active joint more, the nearer the brush's center, and their
|
|
4594
|
-
* other joints give way; with Alt held they follow it less. A click away from any joint is
|
|
4595
|
-
* one dab. Every point shows as a dot colored by the active joint's share of it. A stroke is
|
|
4596
|
-
* one undo entry, and until it ends its weights are in `state.painted()`, which `useRigNode`
|
|
4597
|
-
* binds when given the same `state` as `painting`.
|
|
4598
|
-
*/
|
|
4599
|
-
declare function useWeightTool(options: UseWeightToolOptions): Tool;
|
|
4600
|
-
|
|
4601
|
-
/** One path under the rig node, where it is drawn, with the weights now showing. */
|
|
4602
|
-
interface WeighedPath {
|
|
4603
|
-
id: NodeId;
|
|
4604
|
-
path: PolygonPath;
|
|
4605
|
-
skin: Skin;
|
|
4606
|
-
}
|
|
4607
|
-
/** What the weight tool's actions read and write, all of it the tool's own. */
|
|
4608
|
-
interface WeightEnv {
|
|
4609
|
-
scene(): Scene<unknown, string, unknown>;
|
|
4610
|
-
placed(): PlacedRig | null;
|
|
4611
|
-
state: RigEditState;
|
|
4612
|
-
/** Screen px around a joint within which a click picks it. */
|
|
4613
|
-
reachPx(): number;
|
|
4614
|
-
/** The brush's radius in screen px. */
|
|
4615
|
-
radiusPx(): number;
|
|
4616
|
-
/** Weights a stroke has painted and not yet committed, by node. */
|
|
4617
|
-
painted(): ReadonlyMap<NodeId, Skin>;
|
|
4618
|
-
paint(next: ReadonlyMap<NodeId, Skin> | null): void;
|
|
4619
|
-
}
|
|
4620
|
-
/** Every path under the rig node, with what `env.painted()` holds for it in place of its
|
|
4621
|
-
* `data.skin`. */
|
|
4622
|
-
declare function weighedPaths(env: Pick<WeightEnv, 'scene' | 'placed' | 'painted'>): WeighedPath[];
|
|
4623
|
-
|
|
4624
|
-
/**
|
|
4625
|
-
* A screen-space layer drawing a dot on every point of every path under a rig, anchors and
|
|
4626
|
-
* curve handles alike, colored by how much the active joint weighs it. With no joint active
|
|
4627
|
-
* the dots are gray.
|
|
4628
|
-
*/
|
|
4629
|
-
declare function createWeightOverlay(source: {
|
|
4630
|
-
id: string;
|
|
4631
|
-
paths(): readonly WeighedPath[];
|
|
4632
|
-
active(): string | null;
|
|
4633
|
-
subscribe(fn: () => void): () => void;
|
|
4634
|
-
/** Point dot radius in screen px, read each frame. Default `POINT_RADIUS_PX`. */
|
|
4635
|
-
pointRadiusPx?: () => number | undefined;
|
|
4636
|
-
}): RenderLayer<unknown>;
|
|
4637
|
-
|
|
4638
4489
|
/**
|
|
4639
4490
|
* In-progress pen anchor. A click places a corner, with no handles. A drag
|
|
4640
4491
|
* sets `outHandle` to the drag point and `inHandle` to its mirror through
|
|
@@ -5297,6 +5148,8 @@ interface UseHoverTrackingArgs {
|
|
|
5297
5148
|
id: NodeId;
|
|
5298
5149
|
} | null;
|
|
5299
5150
|
enabled?: boolean;
|
|
5151
|
+
/** Called when the hovered id changes, `null` once the pointer is over no node or has left. */
|
|
5152
|
+
onChange?: (id: NodeId | null) => void;
|
|
5300
5153
|
}
|
|
5301
5154
|
/** What `useHoverTracking` returns. Both members keep their identity. */
|
|
5302
5155
|
interface HoverTracking {
|
|
@@ -5381,95 +5234,33 @@ interface SceneCanvasPointerProps {
|
|
|
5381
5234
|
* behavior, so a pick it made is already in the selection, and fires
|
|
5382
5235
|
* again on a node that was already picked. */
|
|
5383
5236
|
onClick?: (hit: SceneCanvasHit | null) => void;
|
|
5237
|
+
/** Called when the topmost pickable node under the pointer changes, with
|
|
5238
|
+
* its id, and with `null` once there is none or the pointer leaves. */
|
|
5239
|
+
onHover?: (id: string | null) => void;
|
|
5240
|
+
}
|
|
5241
|
+
|
|
5242
|
+
/** The `<SceneCanvas>` props that change the actions and bindings a canvas has. */
|
|
5243
|
+
interface SceneCanvasActionProps {
|
|
5244
|
+
/**
|
|
5245
|
+
* Tune actions on this canvas without restating them, keyed by action id:
|
|
5246
|
+
* `params` every invocation starts from, and `bindings` added beside the
|
|
5247
|
+
* action's own. A tuning applies to whichever descriptor holds the id, a
|
|
5248
|
+
* preset's or a tool's. Pass a stable object; a params thunk is read on
|
|
5249
|
+
* every call. See the core README ("Tuning an action").
|
|
5250
|
+
*/
|
|
5251
|
+
tune?: ActionTunings;
|
|
5252
|
+
/**
|
|
5253
|
+
* Replace or remove bindings by binding id, on actions and contributions
|
|
5254
|
+
* alike: a route string (`'[*:*] keyDown(=) +mod'`), a spec (`key('Mod+=')`),
|
|
5255
|
+
* or `null` to unbind. Pass a stable object.
|
|
5256
|
+
*/
|
|
5257
|
+
bindingOverrides?: BindingOverrides;
|
|
5258
|
+
/**
|
|
5259
|
+
* Replace, add or mute whole action descriptors. Pass `null` to disable
|
|
5260
|
+
* all defaults. To change a built-in's params or add a key, use `tune`.
|
|
5261
|
+
*/
|
|
5262
|
+
actions?: ActionsProp;
|
|
5384
5263
|
}
|
|
5385
|
-
|
|
5386
|
-
/**
|
|
5387
|
-
* The kit's built-in shape kinds — one table, every other spelling derived.
|
|
5388
|
-
*
|
|
5389
|
-
* This module imports nothing on purpose: `useBuiltinShapeTools` imports the
|
|
5390
|
-
* package barrel, so anything barrel-reachable that needs these lists at
|
|
5391
|
-
* module-evaluation time must not route through it.
|
|
5392
|
-
*/
|
|
5393
|
-
/** What the kit knows about one built-in shape kind. */
|
|
5394
|
-
interface ShapeKindDescriptor {
|
|
5395
|
-
/** Mounted as a built-in shape tool by `useBuiltinShapeTools`, and so a
|
|
5396
|
-
* member of `BuiltinShapeToolId` / `KIT_SHAPE_KINDS`. `image` is false:
|
|
5397
|
-
* `useImageTool` needs a `src` and can't be auto-mounted. */
|
|
5398
|
-
readonly tool: boolean;
|
|
5399
|
-
/** `insertAction` emits an `insertPreview` overlay for this kind, and the
|
|
5400
|
-
* dispatcher overlay layer knows how to draw it. Kinds without one still
|
|
5401
|
-
* commit; they just have no live drag preview. */
|
|
5402
|
-
readonly insertPreview: boolean;
|
|
5403
|
-
/** A node of this kind is a text node: an insert drops into its caret, and
|
|
5404
|
-
* its properties carry the text groups. Absent, it is not. */
|
|
5405
|
-
readonly text?: boolean;
|
|
5406
|
-
}
|
|
5407
|
-
/**
|
|
5408
|
-
* Declaration order is the enumeration order of every derived list —
|
|
5409
|
-
* `KIT_SHAPE_KINDS`, and through it `defaultNodeRouting` /
|
|
5410
|
-
* `defaultNodeProperties` / `BUILTIN_TOOL_IDS`.
|
|
5411
|
-
*/
|
|
5412
|
-
declare const SHAPE_KINDS: {
|
|
5413
|
-
readonly rect: {
|
|
5414
|
-
readonly tool: true;
|
|
5415
|
-
readonly insertPreview: true;
|
|
5416
|
-
};
|
|
5417
|
-
readonly ellipse: {
|
|
5418
|
-
readonly tool: true;
|
|
5419
|
-
readonly insertPreview: true;
|
|
5420
|
-
};
|
|
5421
|
-
readonly line: {
|
|
5422
|
-
readonly tool: true;
|
|
5423
|
-
readonly insertPreview: true;
|
|
5424
|
-
};
|
|
5425
|
-
readonly polygon: {
|
|
5426
|
-
readonly tool: true;
|
|
5427
|
-
readonly insertPreview: true;
|
|
5428
|
-
};
|
|
5429
|
-
readonly star: {
|
|
5430
|
-
readonly tool: true;
|
|
5431
|
-
readonly insertPreview: true;
|
|
5432
|
-
};
|
|
5433
|
-
readonly pen: {
|
|
5434
|
-
readonly tool: true;
|
|
5435
|
-
readonly insertPreview: false;
|
|
5436
|
-
};
|
|
5437
|
-
readonly pencil: {
|
|
5438
|
-
readonly tool: true;
|
|
5439
|
-
readonly insertPreview: true;
|
|
5440
|
-
};
|
|
5441
|
-
readonly lasso: {
|
|
5442
|
-
readonly tool: true;
|
|
5443
|
-
readonly insertPreview: false;
|
|
5444
|
-
};
|
|
5445
|
-
readonly text: {
|
|
5446
|
-
readonly tool: true;
|
|
5447
|
-
readonly insertPreview: true;
|
|
5448
|
-
readonly text: true;
|
|
5449
|
-
};
|
|
5450
|
-
readonly sticky: {
|
|
5451
|
-
readonly tool: true;
|
|
5452
|
-
readonly insertPreview: true;
|
|
5453
|
-
readonly text: true;
|
|
5454
|
-
};
|
|
5455
|
-
readonly image: {
|
|
5456
|
-
readonly tool: false;
|
|
5457
|
-
readonly insertPreview: true;
|
|
5458
|
-
};
|
|
5459
|
-
};
|
|
5460
|
-
/** Every kind in the table, tool or not. */
|
|
5461
|
-
type ShapeKind = keyof typeof SHAPE_KINDS;
|
|
5462
|
-
/** The keys of a shape-kind table whose descriptor sets `F` to `true`. */
|
|
5463
|
-
type ShapeKindsWhere<T, F extends keyof ShapeKindDescriptor> = {
|
|
5464
|
-
[K in keyof T]: T[K] extends Record<F, true> ? K : never;
|
|
5465
|
-
}[keyof T];
|
|
5466
|
-
/** Built-in shape tool ids handled by `useBuiltinShapeTools`. */
|
|
5467
|
-
type BuiltinShapeToolId = ShapeKindsWhere<typeof SHAPE_KINDS, 'tool'>;
|
|
5468
|
-
/** The insert kinds the kit's dispatcher overlay layer knows how to render.
|
|
5469
|
-
* Consumer-defined kinds fall outside it: no live preview, commit unaffected. */
|
|
5470
|
-
type KitInsertShape = ShapeKindsWhere<typeof SHAPE_KINDS, 'insertPreview'>;
|
|
5471
|
-
/** Runtime, iterable list of the shape-tool ids in `BuiltinShapeToolId`. */
|
|
5472
|
-
declare const KIT_SHAPE_KINDS: readonly BuiltinShapeToolId[];
|
|
5473
5264
|
|
|
5474
5265
|
/**
|
|
5475
5266
|
* Turns pasted or dropped plain text into a text node sized to the string. Registered nowhere by
|
|
@@ -5606,6 +5397,9 @@ interface NodeRouting {
|
|
|
5606
5397
|
/** Enumerate registered kinds in registration order. */
|
|
5607
5398
|
list(): readonly NodeRoutingEntry[];
|
|
5608
5399
|
}
|
|
5400
|
+
/** The routing kind of a node: the name of the first entry whose `matches(data, node)` returns
|
|
5401
|
+
* true, or `'unknown'`. What `NodeRouting.classify` answers, for a caller holding a plain list. */
|
|
5402
|
+
declare function routeKind(entries: readonly NodeRoutingEntry[], data: unknown, node?: RoutedNode): string;
|
|
5609
5403
|
/** Build a registry of per-node-kind routing entries. Registering a duplicate
|
|
5610
5404
|
* kind name throws. */
|
|
5611
5405
|
declare function createNodeRouting(): NodeRouting;
|
|
@@ -6212,6 +6006,12 @@ interface CanvasProps<TPose = unknown> extends SurfaceSizeProps {
|
|
|
6212
6006
|
* zoom, whatever the scene's world unit. A number holds a fixed world
|
|
6213
6007
|
* tolerance instead. */
|
|
6214
6008
|
flattenTolerance?: FlattenTolerance;
|
|
6009
|
+
/** How images drawn smaller than their pixels are filtered, forwarded to
|
|
6010
|
+
* `WeaselRendererOptions.imageMinification`. Default `'linear'`, one tap,
|
|
6011
|
+
* which aliases an image drawn at half size or less; `'auto'` builds an
|
|
6012
|
+
* image's mipmaps the first time a frame draws it that small. Changing it
|
|
6013
|
+
* re-uploads every image. */
|
|
6014
|
+
imageMinification?: ImageMinification;
|
|
6215
6015
|
/** Which unchanged layers the renderer keeps as pixels between frames and
|
|
6216
6016
|
* composites as one quad, instead of drawing their commands again — see
|
|
6217
6017
|
* `RenderLayer.retain` and `LayerRetainPolicy`. `false` retains no layer on
|
|
@@ -6298,11 +6098,14 @@ interface CanvasProps<TPose = unknown> extends SurfaceSizeProps {
|
|
|
6298
6098
|
/** Inline style for the `<canvas>` this component renders; a tool's cursor
|
|
6299
6099
|
* is merged over it. Not applied under `paintInto`, where only that cursor
|
|
6300
6100
|
* is written, onto the input element. */
|
|
6301
|
-
style?:
|
|
6101
|
+
style?: react__default.CSSProperties;
|
|
6302
6102
|
/** Tab order of the `<canvas>` this component renders. Default 0, so the
|
|
6303
6103
|
* canvas is focusable. Not applied under `paintInto`: whether the input
|
|
6304
6104
|
* element can take focus is the caller's to decide. */
|
|
6305
6105
|
tabIndex?: number;
|
|
6106
|
+
/** Accessible name of the `<canvas>` this component renders; devtools lists the canvas under it.
|
|
6107
|
+
* Not applied under `paintInto`. */
|
|
6108
|
+
'aria-label'?: string;
|
|
6306
6109
|
/** Fired when the element input comes from gains focus: the canvas, or
|
|
6307
6110
|
* under `paintInto` the `inputElement`. Called with the DOM event. */
|
|
6308
6111
|
onFocus?: (event: FocusEvent) => void;
|
|
@@ -6327,7 +6130,7 @@ interface CanvasProps<TPose = unknown> extends SurfaceSizeProps {
|
|
|
6327
6130
|
* (move/resize/rotate) instead of the committed scene; an id outside the active overlay
|
|
6328
6131
|
* falls back to the adapter.
|
|
6329
6132
|
*/
|
|
6330
|
-
helpersRef?:
|
|
6133
|
+
helpersRef?: react__default.MutableRefObject<CanvasHelpers<TPose> | null>;
|
|
6331
6134
|
/**
|
|
6332
6135
|
* Debug overlay configuration.
|
|
6333
6136
|
* - `undefined` (default): read `?debug=…` from the URL.
|
|
@@ -6341,7 +6144,7 @@ interface CanvasProps<TPose = unknown> extends SurfaceSizeProps {
|
|
|
6341
6144
|
debug?: DebugConfig | false;
|
|
6342
6145
|
/** Test-only escape hatch: writes the live debug sink to this ref so tests
|
|
6343
6146
|
* can call `snapshot()` after a render. No effect when debug is off. */
|
|
6344
|
-
debugSinkRef?:
|
|
6147
|
+
debugSinkRef?: react__default.MutableRefObject<CanvasDebugSink | null>;
|
|
6345
6148
|
/**
|
|
6346
6149
|
* Shader programs to compile before the frame that first draws them; one
|
|
6347
6150
|
* not named here compiles on that frame. Each handle comes from a
|
|
@@ -6414,6 +6217,115 @@ interface CanvasProps<TPose = unknown> extends SurfaceSizeProps {
|
|
|
6414
6217
|
* Pass a stable object: a new one each render re-registers it. */
|
|
6415
6218
|
declare function useSnapSource(source: SnapSource): void;
|
|
6416
6219
|
|
|
6220
|
+
/**
|
|
6221
|
+
* Add a follower to the `transformFollowers` dep for the lifetime of the
|
|
6222
|
+
* calling component, after every one already there in its scope and the
|
|
6223
|
+
* scopes above. `follower` is read each time the dep is; answering null adds
|
|
6224
|
+
* nothing.
|
|
6225
|
+
*/
|
|
6226
|
+
declare function useTransformFollower(follower: () => TransformFollower | null): void;
|
|
6227
|
+
|
|
6228
|
+
/**
|
|
6229
|
+
* The kit's built-in shape kinds — one table, every other spelling derived.
|
|
6230
|
+
*
|
|
6231
|
+
* This module imports nothing on purpose: `useBuiltinShapeTools` imports the
|
|
6232
|
+
* package barrel, so anything barrel-reachable that needs these lists at
|
|
6233
|
+
* module-evaluation time must not route through it.
|
|
6234
|
+
*/
|
|
6235
|
+
/** What the kit knows about one built-in shape kind. */
|
|
6236
|
+
interface ShapeKindDescriptor {
|
|
6237
|
+
/** Mounted as a built-in shape tool by `useBuiltinShapeTools`, and so a
|
|
6238
|
+
* member of `BuiltinShapeToolId` / `KIT_SHAPE_KINDS`. `image` is false:
|
|
6239
|
+
* `useImageTool` needs a `src` and can't be auto-mounted. */
|
|
6240
|
+
readonly tool: boolean;
|
|
6241
|
+
/** `insertAction` emits an `insertPreview` overlay for this kind, and the
|
|
6242
|
+
* dispatcher overlay layer knows how to draw it. Kinds without one still
|
|
6243
|
+
* commit; they just have no live drag preview. */
|
|
6244
|
+
readonly insertPreview: boolean;
|
|
6245
|
+
/** The tool family a kind with a tool belongs to: which built-in tool set
|
|
6246
|
+
* names it, and so which palette group it sits in. */
|
|
6247
|
+
readonly family?: 'shape' | 'draw' | 'select' | 'type';
|
|
6248
|
+
/** A node of this kind is a text node: an insert drops into its caret, and
|
|
6249
|
+
* its properties carry the text groups. Absent, it is not. */
|
|
6250
|
+
readonly text?: boolean;
|
|
6251
|
+
}
|
|
6252
|
+
/**
|
|
6253
|
+
* Declaration order is the enumeration order of every derived list —
|
|
6254
|
+
* `KIT_SHAPE_KINDS`, and through it `defaultNodeRouting` /
|
|
6255
|
+
* `defaultNodeProperties` / `BUILTIN_TOOL_IDS`.
|
|
6256
|
+
*/
|
|
6257
|
+
declare const SHAPE_KINDS: {
|
|
6258
|
+
readonly rect: {
|
|
6259
|
+
readonly tool: true;
|
|
6260
|
+
readonly insertPreview: true;
|
|
6261
|
+
readonly family: "shape";
|
|
6262
|
+
};
|
|
6263
|
+
readonly ellipse: {
|
|
6264
|
+
readonly tool: true;
|
|
6265
|
+
readonly insertPreview: true;
|
|
6266
|
+
readonly family: "shape";
|
|
6267
|
+
};
|
|
6268
|
+
readonly line: {
|
|
6269
|
+
readonly tool: true;
|
|
6270
|
+
readonly insertPreview: true;
|
|
6271
|
+
readonly family: "shape";
|
|
6272
|
+
};
|
|
6273
|
+
readonly polygon: {
|
|
6274
|
+
readonly tool: true;
|
|
6275
|
+
readonly insertPreview: true;
|
|
6276
|
+
readonly family: "shape";
|
|
6277
|
+
};
|
|
6278
|
+
readonly star: {
|
|
6279
|
+
readonly tool: true;
|
|
6280
|
+
readonly insertPreview: true;
|
|
6281
|
+
readonly family: "shape";
|
|
6282
|
+
};
|
|
6283
|
+
readonly pen: {
|
|
6284
|
+
readonly tool: true;
|
|
6285
|
+
readonly insertPreview: false;
|
|
6286
|
+
readonly family: "draw";
|
|
6287
|
+
};
|
|
6288
|
+
readonly pencil: {
|
|
6289
|
+
readonly tool: true;
|
|
6290
|
+
readonly insertPreview: true;
|
|
6291
|
+
readonly family: "draw";
|
|
6292
|
+
};
|
|
6293
|
+
readonly lasso: {
|
|
6294
|
+
readonly tool: true;
|
|
6295
|
+
readonly insertPreview: false;
|
|
6296
|
+
readonly family: "select";
|
|
6297
|
+
};
|
|
6298
|
+
readonly text: {
|
|
6299
|
+
readonly tool: true;
|
|
6300
|
+
readonly insertPreview: true;
|
|
6301
|
+
readonly text: true;
|
|
6302
|
+
readonly family: "type";
|
|
6303
|
+
};
|
|
6304
|
+
readonly sticky: {
|
|
6305
|
+
readonly tool: true;
|
|
6306
|
+
readonly insertPreview: true;
|
|
6307
|
+
readonly text: true;
|
|
6308
|
+
readonly family: "type";
|
|
6309
|
+
};
|
|
6310
|
+
readonly image: {
|
|
6311
|
+
readonly tool: false;
|
|
6312
|
+
readonly insertPreview: true;
|
|
6313
|
+
};
|
|
6314
|
+
};
|
|
6315
|
+
/** Every kind in the table, tool or not. */
|
|
6316
|
+
type ShapeKind = keyof typeof SHAPE_KINDS;
|
|
6317
|
+
/** The keys of a shape-kind table whose descriptor sets `F` to `true`. */
|
|
6318
|
+
type ShapeKindsWhere<T, F extends keyof ShapeKindDescriptor> = {
|
|
6319
|
+
[K in keyof T]: T[K] extends Record<F, true> ? K : never;
|
|
6320
|
+
}[keyof T];
|
|
6321
|
+
/** Built-in shape tool ids handled by `useBuiltinShapeTools`. */
|
|
6322
|
+
type BuiltinShapeToolId = ShapeKindsWhere<typeof SHAPE_KINDS, 'tool'>;
|
|
6323
|
+
/** The insert kinds the kit's dispatcher overlay layer knows how to render.
|
|
6324
|
+
* Consumer-defined kinds fall outside it: no live preview, commit unaffected. */
|
|
6325
|
+
type KitInsertShape = ShapeKindsWhere<typeof SHAPE_KINDS, 'insertPreview'>;
|
|
6326
|
+
/** Runtime, iterable list of the shape-tool ids in `BuiltinShapeToolId`. */
|
|
6327
|
+
declare const KIT_SHAPE_KINDS: readonly BuiltinShapeToolId[];
|
|
6328
|
+
|
|
6417
6329
|
/** Per-tool option overrides for the built-in tools.
|
|
6418
6330
|
* Each entry is a narrow subset of the underlying hook's options surface
|
|
6419
6331
|
* — just the knobs that need consumer control under the bundle pattern. */
|
|
@@ -6433,20 +6345,6 @@ interface BuiltinToolOptions {
|
|
|
6433
6345
|
slice?: {
|
|
6434
6346
|
closeHitRadius?: number;
|
|
6435
6347
|
};
|
|
6436
|
-
/** The bone and weight tools. `rig` names the node they edit; by default the one
|
|
6437
|
-
* selected node, or the nearest ancestor of it holding `data.skeleton`. `state` is the
|
|
6438
|
-
* joint they share, which a canvas otherwise makes for itself; pass the one handed to
|
|
6439
|
-
* `useRigNode` as `painting` so a stroke shows as it is painted. `reach` is the screen
|
|
6440
|
-
* px around a joint within which a press takes it. */
|
|
6441
|
-
rig?: {
|
|
6442
|
-
rig?: () => NodeId | null;
|
|
6443
|
-
state?: RigEditState;
|
|
6444
|
-
reach?: number;
|
|
6445
|
-
};
|
|
6446
|
-
/** The weight tool's brush radius, in screen px. */
|
|
6447
|
-
weight?: {
|
|
6448
|
-
radius?: number;
|
|
6449
|
-
};
|
|
6450
6348
|
}
|
|
6451
6349
|
|
|
6452
6350
|
/** How a surface treats an entry whose `requires` the running kit does not
|
|
@@ -6492,6 +6390,26 @@ interface SceneCanvasViewport {
|
|
|
6492
6390
|
recenter?: () => View | void;
|
|
6493
6391
|
}
|
|
6494
6392
|
|
|
6393
|
+
/** Built-in tool ids SceneCanvas knows how to mount, through `defaultTools` or a preset. */
|
|
6394
|
+
type BuiltinToolId = 'select' | 'hand' | BuiltinShapeToolId | 'slice';
|
|
6395
|
+
/** The selection tools: click and marquee, and the lasso. */
|
|
6396
|
+
declare const SELECT_TOOLS: ToolSet<BuiltinToolId>;
|
|
6397
|
+
/** The view tools. */
|
|
6398
|
+
declare const VIEW_TOOLS: ToolSet<BuiltinToolId>;
|
|
6399
|
+
/** The tools that drag out a closed or open primitive. */
|
|
6400
|
+
declare const SHAPE_TOOLS: ToolSet<BuiltinToolId>;
|
|
6401
|
+
/** The freehand and bezier path tools. */
|
|
6402
|
+
declare const DRAW_TOOLS: ToolSet<BuiltinToolId>;
|
|
6403
|
+
/** The text tools: text and the sticky note. */
|
|
6404
|
+
declare const TYPE_TOOLS: ToolSet<BuiltinToolId>;
|
|
6405
|
+
/** The tools that cut the page itself. */
|
|
6406
|
+
declare const PAGE_TOOLS: ToolSet<BuiltinToolId>;
|
|
6407
|
+
/** Every built-in tool, in palette order: the navigation tools, the shape-kind
|
|
6408
|
+
* table's tools in its order, then the knife. */
|
|
6409
|
+
declare const BUILTIN_TOOLS: ToolSet<BuiltinToolId>;
|
|
6410
|
+
/** Every built-in tool id, in palette order: {@link BUILTIN_TOOLS} opened. */
|
|
6411
|
+
declare const BUILTIN_TOOL_IDS: readonly BuiltinToolId[];
|
|
6412
|
+
|
|
6495
6413
|
/** Default size in CSS pixels for selection corner-handles AND their
|
|
6496
6414
|
* hit-test radius, at `targetScale = 1`. Deliberately unscaled; kit-internal
|
|
6497
6415
|
* use sites multiply by `DeviceProfile.targetScale`. */
|
|
@@ -6518,12 +6436,6 @@ interface SceneCanvasLongPress {
|
|
|
6518
6436
|
type SceneCanvasLayers<TNode extends {
|
|
6519
6437
|
id: string;
|
|
6520
6438
|
}, TPose> = LayersMap<TNode, TPose, Partial<SceneSlotConfig<TNode, TPose>>>;
|
|
6521
|
-
/** Built-in tool ids SceneCanvas knows how to mount when no `tools` prop
|
|
6522
|
-
* is supplied, via `defaultTools`. */
|
|
6523
|
-
type BuiltinToolId = 'select' | 'hand' | BuiltinShapeToolId | 'slice' | 'bone' | 'weight';
|
|
6524
|
-
/** Every built-in tool id, in palette order: the navigation tools, the shape
|
|
6525
|
-
* tools of the `core/shapeKinds` table, then the knife and the rig tools. */
|
|
6526
|
-
declare const BUILTIN_TOOL_IDS: readonly BuiltinToolId[];
|
|
6527
6439
|
|
|
6528
6440
|
/** Props for `<SceneCanvas>`. A scene is the only thing it needs. With nothing
|
|
6529
6441
|
* else it renders that scene and keeps a selection no input sets; `features`
|
|
@@ -6593,8 +6505,8 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<TP
|
|
|
6593
6505
|
selectTool?: {
|
|
6594
6506
|
move?: UseMoveOptions<TPose>;
|
|
6595
6507
|
resize?: UseResizeOptions<TPose>;
|
|
6596
|
-
/** Rotation options, or `false` to
|
|
6597
|
-
* `rotate` action
|
|
6508
|
+
/** Rotation options, or `false` to hide the rotation handle and bind it to
|
|
6509
|
+
* nothing; the `rotate` action stays, for other tools and `actions.rotate`. */
|
|
6598
6510
|
rotate?: UseRotateOptions<TPose> | false;
|
|
6599
6511
|
handleHitRadius?: number;
|
|
6600
6512
|
/** Override the body-pick used on click/pointerdown. Alt-aware: receives
|
|
@@ -6706,8 +6618,8 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<TP
|
|
|
6706
6618
|
* - `true` pulls in the built-in for this id (`'pen'`, `'lasso'`,
|
|
6707
6619
|
* `'hand'`, …), the same as listing it in `defaultTools`. Unknown
|
|
6708
6620
|
* built-in ids warn in dev and are ignored.
|
|
6709
|
-
* - `Tool` adds a new id or replaces an existing one
|
|
6710
|
-
* (dev-only warning
|
|
6621
|
+
* - `Tool` adds a new id or replaces an existing one in place
|
|
6622
|
+
* (dev-only warning if `defaultTools` also names that id).
|
|
6711
6623
|
* - `false` omits a bundled tool entirely.
|
|
6712
6624
|
* Auto-wiring (keybindings, dispatcher, action registry) still runs.
|
|
6713
6625
|
*
|
|
@@ -6745,12 +6657,13 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<TP
|
|
|
6745
6657
|
onToolsCreated?: (tools: ToolsApi) => void;
|
|
6746
6658
|
/**
|
|
6747
6659
|
* Built-in tools SceneCanvas registers in its internal `useTools`, on top
|
|
6748
|
-
* of the ones presets bring (`select` from `pick`, `hand` from `view`)
|
|
6660
|
+
* of the ones presets bring (`select` from `pick`, `hand` from `view`):
|
|
6661
|
+
* ids, or sets of them such as `SHAPE_TOOLS`, or `withoutTools(...)` of one.
|
|
6749
6662
|
* Default: none. Each tool also registers the kit actions it binds, so
|
|
6750
6663
|
* `['rect']` brings `insert`. Ignored when the consumer supplies their own
|
|
6751
6664
|
* `tools` prop.
|
|
6752
6665
|
*/
|
|
6753
|
-
defaultTools?: readonly BuiltinToolId[];
|
|
6666
|
+
defaultTools?: readonly ToolEntry<BuiltinToolId>[];
|
|
6754
6667
|
/** Per-tool option overrides for the built-in tools. Each entry is a
|
|
6755
6668
|
* narrow subset of the underlying hook's options surface — `lasso.mode`,
|
|
6756
6669
|
* `rig.state`, etc. */
|
|
@@ -6778,25 +6691,12 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<TP
|
|
|
6778
6691
|
longPress?: SceneCanvasLongPress;
|
|
6779
6692
|
/** Configures the `view` preset, and implies it. See {@link SceneCanvasViewport}. */
|
|
6780
6693
|
viewport?: SceneCanvasViewport;
|
|
6781
|
-
/**
|
|
6782
|
-
* Tune actions on this canvas without restating them, keyed by action id:
|
|
6783
|
-
* `params` every invocation starts from, and `bindings` added beside the
|
|
6784
|
-
* action's own. A tuning applies to whichever descriptor holds the id, a
|
|
6785
|
-
* preset's or a tool's. Pass a stable object; a params thunk is read on
|
|
6786
|
-
* every call. See the core README ("Tuning an action").
|
|
6787
|
-
*/
|
|
6788
|
-
tune?: ActionTunings;
|
|
6789
|
-
/**
|
|
6790
|
-
* Replace, add or mute whole action descriptors. Pass `null` to disable
|
|
6791
|
-
* all defaults. To change a built-in's params or add a key, use `tune`.
|
|
6792
|
-
*/
|
|
6793
|
-
actions?: ActionsProp;
|
|
6794
6694
|
/**
|
|
6795
6695
|
* Given a scene node, return a short human-readable "kind" label (e.g. `'rectangle'`,
|
|
6796
6696
|
* `'sticky note'`), which the kit publishes per id into any surrounding
|
|
6797
6697
|
* `<SelectionContextProvider>`. Return `undefined` to skip an entry. When omitted,
|
|
6798
|
-
*
|
|
6799
|
-
*
|
|
6698
|
+
* each node reports its routing kind (see `routing`), and a node that routes as
|
|
6699
|
+
* `'unknown'` is left unlabeled.
|
|
6800
6700
|
*/
|
|
6801
6701
|
describeKind?: (node: Node<TData, TLayer, TPose>) => string | undefined;
|
|
6802
6702
|
/**
|
|
@@ -6912,7 +6812,7 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<TP
|
|
|
6912
6812
|
* nor picked here. See `CanvasProps.layerOrder`.
|
|
6913
6813
|
*/
|
|
6914
6814
|
layerOrder?: string[];
|
|
6915
|
-
} & SceneCanvasPointerProps;
|
|
6815
|
+
} & SceneCanvasPointerProps & SceneCanvasActionProps;
|
|
6916
6816
|
|
|
6917
6817
|
/**
|
|
6918
6818
|
* The behavior presets `<SceneCanvas features>` composes. A bare canvas renders
|
|
@@ -6960,8 +6860,8 @@ interface FeaturePreset {
|
|
|
6960
6860
|
* are standard actions: `<SceneCanvas actions>` overrides and mutes them,
|
|
6961
6861
|
* and `tune` reaches them. */
|
|
6962
6862
|
readonly actions?: readonly Action[];
|
|
6963
|
-
/** Tools it mounts: a built-in by id, or a tool of its own. */
|
|
6964
|
-
readonly tools?: readonly (BuiltinToolId | Tool)[];
|
|
6863
|
+
/** Tools it mounts: a built-in by id or a set of them, or a tool of its own. */
|
|
6864
|
+
readonly tools?: readonly (ToolEntry<BuiltinToolId> | Tool)[];
|
|
6965
6865
|
/** Its ambient bindings: an always-live entry routing a gesture to its
|
|
6966
6866
|
* actions under any tool that does not claim the gesture itself. */
|
|
6967
6867
|
readonly ambient?: (options: FeatureBindingOptions) => Contribution;
|
|
@@ -7040,7 +6940,7 @@ declare function rotateAroundAABBCenter(x: number, y: number, width: number, hei
|
|
|
7040
6940
|
|
|
7041
6941
|
declare function SceneCanvasInner<TData, TLayer extends string, TPose>(props: SceneCanvasProps<TData, TLayer, TPose> & {
|
|
7042
6942
|
presetSource: PresetSource;
|
|
7043
|
-
}, ref:
|
|
6943
|
+
}, ref: react__default.ForwardedRef<SceneCanvasApi>): react__default.JSX.Element;
|
|
7044
6944
|
/**
|
|
7045
6945
|
* The canvas component: renders a `Scene` and wires the interaction stack
|
|
7046
6946
|
* around it.
|
|
@@ -7056,9 +6956,16 @@ declare function SceneCanvasInner<TData, TLayer extends string, TPose>(props: Sc
|
|
|
7056
6956
|
* fit a prop (view control, hit queries, redraw requests).
|
|
7057
6957
|
*/
|
|
7058
6958
|
declare const SceneCanvas: <TData, TLayer extends string, TPose>(props: SceneCanvasProps<TData, TLayer, TPose> & {
|
|
7059
|
-
ref?:
|
|
6959
|
+
ref?: react__default.Ref<SceneCanvasApi>;
|
|
7060
6960
|
}) => ReturnType<typeof SceneCanvasInner>;
|
|
7061
6961
|
|
|
6962
|
+
/**
|
|
6963
|
+
* What a canvas's WebGL2 context is opened with. A context keeps the attributes of whoever opened it
|
|
6964
|
+
* first, and the renderer refuses one without a stencil buffer, so anything that may open a weasel
|
|
6965
|
+
* canvas before its first paint (a pixel reader in a test, a tenant sharing the buffer) asks for these.
|
|
6966
|
+
*/
|
|
6967
|
+
declare const CANVAS_CONTEXT_ATTRIBUTES: Readonly<WebGLContextAttributes>;
|
|
6968
|
+
|
|
7062
6969
|
/** How each `polyline` overlay role reads. An action publishes the run and
|
|
7063
6970
|
* the word; this table is the whole of the paint, for the dispatcher overlay
|
|
7064
6971
|
* and for any tool previewing the same kind of run between gestures. */
|
|
@@ -7078,8 +6985,8 @@ type LeanSceneCanvasProps<TData, TLayer extends string, TPose> = Omit<SceneCanva
|
|
|
7078
6985
|
* `viewPreset` here; pass it.
|
|
7079
6986
|
*/
|
|
7080
6987
|
declare const LeanSceneCanvas: <TData, TLayer extends string, TPose>(props: LeanSceneCanvasProps<TData, TLayer, TPose> & {
|
|
7081
|
-
ref?:
|
|
7082
|
-
}) =>
|
|
6988
|
+
ref?: react__default.Ref<SceneCanvasApi>;
|
|
6989
|
+
}) => react__default.ReactElement;
|
|
7083
6990
|
|
|
7084
6991
|
/**
|
|
7085
6992
|
* How a painter asks for part of a node's paint to land on top of the node's
|
|
@@ -7203,7 +7110,7 @@ interface CursorCoordsHudProps {
|
|
|
7203
7110
|
}
|
|
7204
7111
|
/** Debug overlay showing the pointer's client and world coordinates and the
|
|
7205
7112
|
* current frame rate, pinned to the canvas's top-right corner. */
|
|
7206
|
-
declare function CursorCoordsHud({ canvasRef, anchorRef, viewRef, toWorld, offset }: CursorCoordsHudProps):
|
|
7113
|
+
declare function CursorCoordsHud({ canvasRef, anchorRef, viewRef, toWorld, offset }: CursorCoordsHudProps): react.JSX.Element | null;
|
|
7207
7114
|
|
|
7208
7115
|
/** Props for `<PickHud>`. */
|
|
7209
7116
|
interface PickHudProps {
|
|
@@ -7231,7 +7138,43 @@ interface PickHudProps {
|
|
|
7231
7138
|
}
|
|
7232
7139
|
/** Debug overlay listing every node under the pointer, with the one a click
|
|
7233
7140
|
* would actually select shown in bold. */
|
|
7234
|
-
declare function PickHud({ canvasRef, anchorRef, viewRef, toWorld, pickEvery, pickBest, offset }: PickHudProps):
|
|
7141
|
+
declare function PickHud({ canvasRef, anchorRef, viewRef, toWorld, pickEvery, pickBest, offset }: PickHudProps): react.JSX.Element | null;
|
|
7142
|
+
|
|
7143
|
+
/** The part of a scene the lookup reads. */
|
|
7144
|
+
type ParentLookup<TNode> = {
|
|
7145
|
+
get(id: NodeId): TNode | undefined;
|
|
7146
|
+
};
|
|
7147
|
+
type PaintedNode = {
|
|
7148
|
+
data?: unknown;
|
|
7149
|
+
parent?: NodeId | null;
|
|
7150
|
+
};
|
|
7151
|
+
/** What `node`'s `'inherit'` fields take from its containers in `scene`, or
|
|
7152
|
+
* `undefined` for a node that inherits nothing. */
|
|
7153
|
+
declare function inheritedPaintIn<TNode extends PaintedNode>(scene: ParentLookup<TNode>, node: TNode): InheritedPaint | undefined;
|
|
7154
|
+
/** What an `'inherit'` fill and stroke on `node` would take from its
|
|
7155
|
+
* containers in `scene`, whatever `node` holds now — what an editor offering
|
|
7156
|
+
* the choice shows it would paint. */
|
|
7157
|
+
declare function paintAbove<TNode extends PaintedNode>(scene: ParentLookup<TNode>, node: TNode): InheritedPaint;
|
|
7158
|
+
/**
|
|
7159
|
+
* Wrap a `drawOne` so a node whose fill or stroke is `'inherit'` arrives at
|
|
7160
|
+
* the painter with its containers' paint on `ctx.inherited`, as
|
|
7161
|
+
* `withDerivedPaths` does for a derived path. Every other node passes the
|
|
7162
|
+
* caller's `ctx` through untouched.
|
|
7163
|
+
*/
|
|
7164
|
+
declare function withInheritedPaints<TData, TLayer extends string, TPose>(scene: ParentLookup<Node<TData, TLayer, TPose>>, drawOne: SceneViewDrawOne<TData, TLayer, TPose>): SceneViewDrawOne<TData, TLayer, TPose>;
|
|
7165
|
+
|
|
7166
|
+
/**
|
|
7167
|
+
* The render walk's half of derived paths: resolving one against a scene, and
|
|
7168
|
+
* handing it to the painter.
|
|
7169
|
+
*
|
|
7170
|
+
* The resolver itself lives in `core/scene/derivedPath.ts`, beside
|
|
7171
|
+
* `derivedPose` — a *pose* can derive from a dependency's path, so
|
|
7172
|
+
* `effectivePose` has to be able to reach it.
|
|
7173
|
+
*/
|
|
7174
|
+
|
|
7175
|
+
/** `scene` read as `drawnBoundsOf` reads one, each node that shows a computed
|
|
7176
|
+
* path answering it. One object per scene, so it can key a memo. */
|
|
7177
|
+
declare function drawnBoundsScene<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>): DrawnBoundsScene;
|
|
7235
7178
|
|
|
7236
7179
|
/**
|
|
7237
7180
|
* Synthesize a `<Canvas>`-compatible adapter from a `Scene` primitive.
|
|
@@ -7282,6 +7225,8 @@ type SceneCanvasAdapter<TData, TLayer extends string, TPose> = MoveAdapter<Node<
|
|
|
7282
7225
|
setLayout(id: string, layout: LayoutStrategy<TPose> | string | null): void;
|
|
7283
7226
|
/** Move a node to another layer — what a `setLayer` op writes through. */
|
|
7284
7227
|
setLayer(id: string, layer: TLayer): void;
|
|
7228
|
+
/** Retarget a derived node's sources — what a `setDependsOn` op writes through. */
|
|
7229
|
+
setDependsOn(id: string, dependsOn: readonly string[] | 'children' | undefined): void;
|
|
7285
7230
|
/** Hide or show a node — what a `setHidden` op writes through. */
|
|
7286
7231
|
setHidden(id: string, hidden: boolean): void;
|
|
7287
7232
|
/** Lock or unlock a node — what a `setLocked` op writes through. */
|
|
@@ -7430,22 +7375,24 @@ declare const defaultNodeProperties: readonly NodePropertiesEntry[];
|
|
|
7430
7375
|
declare const inferredNodeProperties: readonly NodePropertiesEntry[];
|
|
7431
7376
|
|
|
7432
7377
|
/**
|
|
7433
|
-
* What an in-flight gesture is proposing, resolved against the
|
|
7378
|
+
* What an in-flight gesture is proposing, resolved against the scene.
|
|
7434
7379
|
*
|
|
7435
|
-
* An ongoing action
|
|
7436
|
-
*
|
|
7437
|
-
*
|
|
7438
|
-
*
|
|
7439
|
-
*
|
|
7440
|
-
*
|
|
7380
|
+
* An ongoing action names the ids it previews on its handle. A transform —
|
|
7381
|
+
* move, resize, rotate — publishes their poses to the scene's overrides, and
|
|
7382
|
+
* other actions answer `previewPose` on the handle. Resolving them means
|
|
7383
|
+
* knowing which ids are in flight, which of those are roots, whose preview
|
|
7384
|
+
* wins when two sources name the same id, and which are merely displaced
|
|
7385
|
+
* rather than dragged. None of that is about drawing, and a consumer with its
|
|
7386
|
+
* own renderer needs all of it.
|
|
7441
7387
|
*/
|
|
7442
7388
|
|
|
7443
7389
|
/** One node an in-flight gesture is previewing, as {@link resolvePreviews} returns it. */
|
|
7444
7390
|
interface PreviewNode<TData, TLayer extends string, TPose> {
|
|
7445
7391
|
id: NodeId;
|
|
7446
|
-
/** The node as committed
|
|
7392
|
+
/** The node as committed. */
|
|
7447
7393
|
node: Node<TData, TLayer, TPose>;
|
|
7448
|
-
/** The
|
|
7394
|
+
/** The pose a source previews, else the node's effective pose — where the
|
|
7395
|
+
* scene's overrides put it mid-transform. */
|
|
7449
7396
|
pose: TPose;
|
|
7450
7397
|
/** The interim data, or the committed one when only the pose is in flight. */
|
|
7451
7398
|
data: TData;
|
|
@@ -7463,7 +7410,7 @@ interface PreviewNode<TData, TLayer extends string, TPose> {
|
|
|
7463
7410
|
* which is what lets a caller draw a container and its contents as one thing.
|
|
7464
7411
|
*
|
|
7465
7412
|
* An id with no node is skipped: an insert previews before the node it will
|
|
7466
|
-
* create exists.
|
|
7413
|
+
* create exists.
|
|
7467
7414
|
*/
|
|
7468
7415
|
declare function resolvePreviews<TData, TLayer extends string, TPose>(sources: Iterable<GesturePreviewSource>, scene: Scene<TData, TLayer, TPose>): PreviewNode<TData, TLayer, TPose>[];
|
|
7469
7416
|
/** Every entry in the forest, parents before their children. */
|
|
@@ -7629,11 +7576,11 @@ interface IconRegistryProviderProps {
|
|
|
7629
7576
|
children: ReactNode;
|
|
7630
7577
|
}
|
|
7631
7578
|
/** Holds one icon registry for everything below it. */
|
|
7632
|
-
declare function IconRegistryProvider({ icons, variants, children }: IconRegistryProviderProps):
|
|
7579
|
+
declare function IconRegistryProvider({ icons, variants, children }: IconRegistryProviderProps): react.JSX.Element;
|
|
7633
7580
|
/** Mount an empty {@link IconRegistryProvider} only when none is already in scope. */
|
|
7634
7581
|
declare function IconRegistryProviderIfRoot({ children }: {
|
|
7635
7582
|
children: ReactNode;
|
|
7636
|
-
}):
|
|
7583
|
+
}): react.JSX.Element;
|
|
7637
7584
|
/** The registry in scope, or `null` outside every provider. */
|
|
7638
7585
|
declare function useIconRegistry(): IconRegistry | null;
|
|
7639
7586
|
|
|
@@ -7674,7 +7621,7 @@ interface WeaselProviderProps {
|
|
|
7674
7621
|
* panel, or two canvases that should agree on the selection. Mount it above
|
|
7675
7622
|
* any `useTools(...)` call, or the dispatcher sees a stale active tool.
|
|
7676
7623
|
*/
|
|
7677
|
-
declare function WeaselProvider({ children, isolate, icons, iconVariants }: WeaselProviderProps):
|
|
7624
|
+
declare function WeaselProvider({ children, isolate, icons, iconVariants }: WeaselProviderProps): react.JSX.Element;
|
|
7678
7625
|
|
|
7679
7626
|
/** Options for {@link workspaceTintLayer}. */
|
|
7680
7627
|
interface WorkspaceTintLayerOptions {
|
|
@@ -7817,6 +7764,22 @@ declare const DEFAULT_DEBUG_THEME: DebugTheme;
|
|
|
7817
7764
|
*/
|
|
7818
7765
|
declare const DEFAULT_DEBUG_STROKES: DebugStrokes;
|
|
7819
7766
|
|
|
7767
|
+
/** Props for `<DevtoolsLabel>`. */
|
|
7768
|
+
interface DevtoolsLabelProps {
|
|
7769
|
+
/** The name a devtools panel lists each canvas below this under, unless the canvas has an `aria-label` or id. */
|
|
7770
|
+
value: string;
|
|
7771
|
+
children?: ReactNode;
|
|
7772
|
+
}
|
|
7773
|
+
/**
|
|
7774
|
+
* Names the canvases beneath it in a devtools panel, ahead of any labeled
|
|
7775
|
+
* element between them and it. A host that frames canvases it did not write,
|
|
7776
|
+
* such as a lab's trial or a story's frame, knows the right name; the nearest
|
|
7777
|
+
* labeled ancestor is only a guess.
|
|
7778
|
+
*/
|
|
7779
|
+
declare function DevtoolsLabel({ value, children }: DevtoolsLabelProps): react.JSX.Element;
|
|
7780
|
+
/** The label the nearest `<DevtoolsLabel>` gives, or null outside one. */
|
|
7781
|
+
declare function useDevtoolsLabel(): string | null;
|
|
7782
|
+
|
|
7820
7783
|
/**
|
|
7821
7784
|
* Bundle a list of Affordances into a single RenderLayer.
|
|
7822
7785
|
*
|
|
@@ -8139,8 +8102,8 @@ interface DefaultTextData {
|
|
|
8139
8102
|
text?: string;
|
|
8140
8103
|
style?: TextStyle;
|
|
8141
8104
|
runs?: readonly StyledRun[];
|
|
8142
|
-
fill?: Fill | null;
|
|
8143
|
-
stroke?: Stroke | null;
|
|
8105
|
+
fill?: Fill | Inherit | null;
|
|
8106
|
+
stroke?: Stroke | Inherit | null;
|
|
8144
8107
|
verticalAlign?: TextVerticalAlign;
|
|
8145
8108
|
padding?: number;
|
|
8146
8109
|
overflow?: TextOverflow;
|
|
@@ -8371,10 +8334,6 @@ declare function strokeOf(color: string, width?: number): CommandStroke & {
|
|
|
8371
8334
|
/** A stroke painted with `paint` at `width` world units — `strokeOf`'s sibling
|
|
8372
8335
|
* for a gradient or pattern, which has no color to pass. */
|
|
8373
8336
|
declare function strokeWith(paint: Paint, width?: number): Stroke;
|
|
8374
|
-
/** The kit's default node fill — what a shape with no declared fill paints. */
|
|
8375
|
-
declare const DEFAULT_SHAPE_FILL: Fill & {
|
|
8376
|
-
paint: Paint;
|
|
8377
|
-
};
|
|
8378
8337
|
/**
|
|
8379
8338
|
* The 0..1 alpha a paint paints at.
|
|
8380
8339
|
*
|
|
@@ -8404,50 +8363,27 @@ declare function paintWithColor(paint: Paint | undefined, color: string): Paint;
|
|
|
8404
8363
|
* call-sites can dispatch through `(adapter.applyOps ?? applyOpsTo)` with
|
|
8405
8364
|
* matching arguments. The default ignores it.
|
|
8406
8365
|
*/
|
|
8407
|
-
declare function applyOpsTo<A>(adapter: A, ops: Op[], _label?: string): void;
|
|
8408
|
-
/**
|
|
8409
|
-
* Dispatcher: invokes `adapter.applyOps` if present, otherwise falls back
|
|
8410
|
-
* to `applyOpsTo`. Convenience for hooks so they don't repeat the
|
|
8411
|
-
* `?? applyOpsTo` pattern at every call site.
|
|
8412
|
-
*/
|
|
8413
|
-
declare function dispatchApplyBatch<A>(adapter: A, ops: Op[], label?: string): void;
|
|
8414
|
-
|
|
8415
|
-
/** Arguments to {@link createTransformOp}: replace node `id`'s pose `from` → `to`. */
|
|
8416
|
-
interface TransformArgs<TPose> {
|
|
8417
|
-
id: string;
|
|
8418
|
-
from: TPose;
|
|
8419
|
-
to: TPose;
|
|
8420
|
-
label?: string;
|
|
8421
|
-
coalesceKey?: string;
|
|
8422
|
-
}
|
|
8423
|
-
/** Op: set an object's pose, inverting back to `from`. `coalesceKey` defaults to
|
|
8424
|
-
* `transform:${id}` so successive pose writes to the same node (drag-move,
|
|
8425
|
-
* resize, repeated nudges) merge into one undo entry within the history's
|
|
8426
|
-
* coalesce window. Pass an explicit key (or a unique one) to opt out. */
|
|
8427
|
-
declare function createTransformOp<TPose>(args: TransformArgs<TPose>): Op;
|
|
8428
|
-
|
|
8429
|
-
/** One pose write an {@link createArrangeOp} made. */
|
|
8430
|
-
interface ArrangedPose {
|
|
8431
|
-
id: string;
|
|
8432
|
-
from: unknown;
|
|
8433
|
-
to: unknown;
|
|
8434
|
-
}
|
|
8435
|
-
/** Arguments to {@link createArrangeOp}. */
|
|
8436
|
-
interface ArrangeArgs {
|
|
8437
|
-
/** The writes to make. Absent until a computed arrangement has run once. */
|
|
8438
|
-
placed?: ArrangedPose[];
|
|
8439
|
-
}
|
|
8440
|
-
/**
|
|
8441
|
-
* Op: write a set of poses decided when the op first applies, not when it is
|
|
8442
|
-
* built. The scene appends one to an edit that moves nodes into a container,
|
|
8443
|
-
* and `compute` asks the container what to do with them after the rest of
|
|
8444
|
-
* the edit has landed. Every later apply — redo, or a rebuild from a
|
|
8445
|
-
* serialized history — replays the writes it recorded, so the arrangement is
|
|
8446
|
-
* decided once. `write` replaces the adapter's `setPose` for this op and its
|
|
8447
|
-
* inverses — the scene passes its own, since not every adapter an edit is
|
|
8448
|
-
* applied through can write poses.
|
|
8366
|
+
declare function applyOpsTo<A>(adapter: A, ops: Op[], _label?: string): void;
|
|
8367
|
+
/**
|
|
8368
|
+
* Dispatcher: invokes `adapter.applyOps` if present, otherwise falls back
|
|
8369
|
+
* to `applyOpsTo`. Convenience for hooks so they don't repeat the
|
|
8370
|
+
* `?? applyOpsTo` pattern at every call site.
|
|
8449
8371
|
*/
|
|
8450
|
-
declare function
|
|
8372
|
+
declare function dispatchApplyBatch<A>(adapter: A, ops: Op[], label?: string): void;
|
|
8373
|
+
|
|
8374
|
+
/** Arguments to {@link createTransformOp}: replace node `id`'s pose `from` → `to`. */
|
|
8375
|
+
interface TransformArgs<TPose> {
|
|
8376
|
+
id: string;
|
|
8377
|
+
from: TPose;
|
|
8378
|
+
to: TPose;
|
|
8379
|
+
label?: string;
|
|
8380
|
+
coalesceKey?: string;
|
|
8381
|
+
}
|
|
8382
|
+
/** Op: set an object's pose, inverting back to `from`. `coalesceKey` defaults to
|
|
8383
|
+
* `transform:${id}` so successive pose writes to the same node (drag-move,
|
|
8384
|
+
* resize, repeated nudges) merge into one undo entry within the history's
|
|
8385
|
+
* coalesce window. Pass an explicit key (or a unique one) to opt out. */
|
|
8386
|
+
declare function createTransformOp<TPose>(args: TransformArgs<TPose>): Op;
|
|
8451
8387
|
|
|
8452
8388
|
/**
|
|
8453
8389
|
* A node's position among its siblings, recorded so an op can put it back.
|
|
@@ -8605,6 +8541,20 @@ interface SetLayerArgs {
|
|
|
8605
8541
|
* explicit key to opt out. */
|
|
8606
8542
|
declare function createSetLayerOp(args: SetLayerArgs): Op;
|
|
8607
8543
|
|
|
8544
|
+
type DependsOn = readonly string[] | 'children' | undefined;
|
|
8545
|
+
/** Arguments to {@link createSetDependsOnOp}: retarget node `id`'s derivation
|
|
8546
|
+
* from the sources `from` to `to`. `undefined` is no derivation. */
|
|
8547
|
+
interface SetDependsOnArgs {
|
|
8548
|
+
id: string;
|
|
8549
|
+
from: DependsOn;
|
|
8550
|
+
to: DependsOn;
|
|
8551
|
+
label?: string;
|
|
8552
|
+
coalesceKey?: string;
|
|
8553
|
+
}
|
|
8554
|
+
/** Op: set what a derived node's geometry derives from, inverting back to
|
|
8555
|
+
* `from`. */
|
|
8556
|
+
declare function createSetDependsOnOp(args: SetDependsOnArgs): Op;
|
|
8557
|
+
|
|
8608
8558
|
/** Arguments to {@link createSetHiddenOp} and {@link createSetLockedOp}: set
|
|
8609
8559
|
* node `id`'s flag `from` → `to`. */
|
|
8610
8560
|
interface NodeFlagArgs {
|
|
@@ -8739,6 +8689,18 @@ interface SetPathArgs {
|
|
|
8739
8689
|
*/
|
|
8740
8690
|
declare function createSetPathOp(args: SetPathArgs): Op;
|
|
8741
8691
|
|
|
8692
|
+
/** A node's pose and data, as a batch of ops leaves them. */
|
|
8693
|
+
interface WrittenNode {
|
|
8694
|
+
pose: unknown;
|
|
8695
|
+
data: unknown;
|
|
8696
|
+
}
|
|
8697
|
+
/**
|
|
8698
|
+
* The pose and data `ops` leave each node they write, by id, read by applying
|
|
8699
|
+
* them to a recorder rather than the scene; null when one cannot be read that
|
|
8700
|
+
* way. A node only re-parented, re-layered, inserted, or removed is not in it.
|
|
8701
|
+
*/
|
|
8702
|
+
declare function writtenBy(sc: Scene<unknown, string, unknown>, ops: readonly Op[]): Map<string, WrittenNode> | null;
|
|
8703
|
+
|
|
8742
8704
|
/** Rebuilds an op from its serialized `args`. */
|
|
8743
8705
|
type OpFactory = (args: unknown) => Op;
|
|
8744
8706
|
/** Every registered op factory, keyed by op name, in registration order. */
|
|
@@ -8764,6 +8726,31 @@ declare function registeredOpNames(): readonly string[];
|
|
|
8764
8726
|
* parent updates compose correctly. */
|
|
8765
8727
|
declare function scenePoseAdapter(scene: Scene<unknown, string, unknown>): PoseAdapter<unknown>;
|
|
8766
8728
|
|
|
8729
|
+
/**
|
|
8730
|
+
* Bringing a node's descendants along when something writes the node's pose
|
|
8731
|
+
* and nothing writes theirs: a layout restacking a container, a drop landing
|
|
8732
|
+
* one, a page move. Under absolute poses a descendant stores its own world
|
|
8733
|
+
* pose, so it stays behind unless it is written too.
|
|
8734
|
+
*/
|
|
8735
|
+
|
|
8736
|
+
/** What carrying reads: the tree, every stored pose, and how poses compose. */
|
|
8737
|
+
interface CarrySource<TPose> {
|
|
8738
|
+
childrenOf(id: NodeId): readonly NodeId[];
|
|
8739
|
+
poses: PoseAdapter<TPose>;
|
|
8740
|
+
composition: PoseComposition<TPose>;
|
|
8741
|
+
}
|
|
8742
|
+
/** A {@link CarrySource} over a scene's document poses. */
|
|
8743
|
+
declare function sceneCarrySource(scene: Scene<unknown, string, unknown>): CarrySource<unknown>;
|
|
8744
|
+
/**
|
|
8745
|
+
* The stored poses that bring `root`'s descendants along with it: each one's
|
|
8746
|
+
* world pose put through `translate`, rebased into the frame it is stored in.
|
|
8747
|
+
* A descendant stored in the frame of `root` or of a node under it is left
|
|
8748
|
+
* out, since that frame carries it, and so is one `translate` answers null
|
|
8749
|
+
* for. A descendant `moving` names is moving on its own: it and everything
|
|
8750
|
+
* under it are left to whoever moves it.
|
|
8751
|
+
*/
|
|
8752
|
+
declare function carriedDescendants<TPose>(source: CarrySource<TPose>, root: NodeId, translate: (world: TPose, id: NodeId) => TPose | null, moving?: (id: NodeId) => boolean): Map<NodeId, TPose>;
|
|
8753
|
+
|
|
8767
8754
|
/** @internal */
|
|
8768
8755
|
interface HitAdapter<TNode extends {
|
|
8769
8756
|
id: string;
|
|
@@ -8946,6 +8933,13 @@ interface ScopedScene {
|
|
|
8946
8933
|
declare function sceneUnitScopes(scene: ScopedScene, id: NodeId, root: UnitScope, opts?: {
|
|
8947
8934
|
inclusive?: boolean;
|
|
8948
8935
|
}): UnitScope[];
|
|
8936
|
+
/**
|
|
8937
|
+
* The unit scopes every node of `ids` sits in, outermost first: the run of
|
|
8938
|
+
* their chains that agree, where two containers declaring equal scopes
|
|
8939
|
+
* agree. What a reader showing or snapping several nodes as one reads them
|
|
8940
|
+
* in; the root alone for no nodes.
|
|
8941
|
+
*/
|
|
8942
|
+
declare function sceneSharedUnitScopes(scene: ScopedScene, ids: readonly NodeId[], root: UnitScope): UnitScope[];
|
|
8949
8943
|
|
|
8950
8944
|
/**
|
|
8951
8945
|
* Thrown by a scene edit — `batch`, `untracked`, or a bare `add` / `move` —
|
|
@@ -9006,6 +9000,10 @@ declare function derivedPose<TPose>(source: PoseSource<TPose>, node: PosedNode<T
|
|
|
9006
9000
|
* resolved before it is read.
|
|
9007
9001
|
*/
|
|
9008
9002
|
declare function derivedDepOf<TPose>(source: PoseSource<TPose>, id: NodeId, reader?: PosedNode<TPose>): DerivedDep<TPose> | undefined;
|
|
9003
|
+
/** `id` as {@link derivedDepOf} answers it, but at the pose and path the
|
|
9004
|
+
* document holds: no override anywhere down its dependencies counts. For a
|
|
9005
|
+
* reader that must not see an in-flight gesture, such as an edit pass. */
|
|
9006
|
+
declare function documentDepOf<TPose>(source: PoseSource<TPose>, id: NodeId): DerivedDep<TPose> | undefined;
|
|
9009
9007
|
/**
|
|
9010
9008
|
* The pose the *document* says `node` is at: derived when it derives, else
|
|
9011
9009
|
* authored. `effectivePose` minus the override step, at every link of the
|
|
@@ -9587,17 +9585,33 @@ interface PathEditPreview {
|
|
|
9587
9585
|
previewPose: NonNullable<OngoingHandle['previewPose']>;
|
|
9588
9586
|
previewData: NonNullable<OngoingHandle['previewData']>;
|
|
9589
9587
|
}
|
|
9588
|
+
/** One frame of a drag that reshapes the path in edit mode: the world-space
|
|
9589
|
+
* polygon it makes, and where each of its points came from when the drag
|
|
9590
|
+
* knows (`editAnchorSetTracked`). */
|
|
9591
|
+
interface PathEditFrame {
|
|
9592
|
+
path: PolygonPath;
|
|
9593
|
+
origins?: readonly (PointOrigin | null)[];
|
|
9594
|
+
}
|
|
9595
|
+
/** `path`, a frame of an edit of `id`, finished by the dep's `finishEdit` as
|
|
9596
|
+
* committing it would be: its path and the other nodes' that move with it.
|
|
9597
|
+
* Null when an extension cannot finish it. */
|
|
9598
|
+
declare function finishPathEditFrame(dep: EditAnchorsDep, id: string, path: PolygonPath, origins?: readonly (PointOrigin | null)[]): FinishedEditFrame | null;
|
|
9590
9599
|
/**
|
|
9591
9600
|
* Preview ghosts for a drag that reshapes the path in edit mode. `current`
|
|
9592
|
-
* answers the
|
|
9593
|
-
*
|
|
9594
|
-
*
|
|
9595
|
-
*
|
|
9596
|
-
*
|
|
9601
|
+
* answers the frame to show, or null while there is nothing to preview yet.
|
|
9602
|
+
* Each frame is finished as committing it would be
|
|
9603
|
+
* ({@link finishPathEditFrame}), so the node's constraints and the nodes
|
|
9604
|
+
* linked to it show as they will commit; a frame that cannot be finished
|
|
9605
|
+
* commits nothing, and shows nothing. A drag that finishes its own frames
|
|
9606
|
+
* passes `finished`, the world-space paths of the other nodes its frame
|
|
9607
|
+
* moves, and its frames are shown as they are. Null when the node stores its
|
|
9608
|
+
* path in neither supported place.
|
|
9609
|
+
*
|
|
9610
|
+
* The ghost is what committing the frame would store (`storeEditablePath`),
|
|
9597
9611
|
* so a path drawn from a form is drawn again from the edited form on every
|
|
9598
9612
|
* move.
|
|
9599
9613
|
*/
|
|
9600
|
-
declare function pathEditPreview(dep: EditAnchorsDep, id: string, current: () =>
|
|
9614
|
+
declare function pathEditPreview(dep: EditAnchorsDep, id: string, current: () => PathEditFrame | null, finished?: () => readonly {
|
|
9601
9615
|
id: string;
|
|
9602
9616
|
path: PolygonPath;
|
|
9603
9617
|
}[]): PathEditPreview | null;
|
|
@@ -9648,12 +9662,21 @@ declare function nodeOutline(node: Node<unknown, string, unknown>): Path | null;
|
|
|
9648
9662
|
/** One painted piece of a derived path. */
|
|
9649
9663
|
interface DerivedPart {
|
|
9650
9664
|
path: Path;
|
|
9651
|
-
/** The part's fill
|
|
9652
|
-
*
|
|
9653
|
-
fill?: Fill | null;
|
|
9665
|
+
/** The part's fill, read as a node's is: absent paints none, and
|
|
9666
|
+
* `INHERIT` takes the node's own `data.fill`. */
|
|
9667
|
+
fill?: Fill | Inherit | null;
|
|
9654
9668
|
/** The part's stroke, on the same terms as `fill`. */
|
|
9655
|
-
stroke?: Stroke | null;
|
|
9656
|
-
}
|
|
9669
|
+
stroke?: Stroke | Inherit | null;
|
|
9670
|
+
}
|
|
9671
|
+
/** What `part` paints, its `INHERIT` taken from `own`, the deriving node's
|
|
9672
|
+
* data — whose own `INHERIT` takes `inherited`, its container's. */
|
|
9673
|
+
declare function resolvePartPaint(part: DerivedPart, own: {
|
|
9674
|
+
fill?: Fill | Inherit | null;
|
|
9675
|
+
stroke?: Stroke | Inherit | null;
|
|
9676
|
+
} | null | undefined, inherited?: InheritedPaint): {
|
|
9677
|
+
fill: PaintedFill | null;
|
|
9678
|
+
stroke: PaintedStroke | null;
|
|
9679
|
+
};
|
|
9657
9680
|
/**
|
|
9658
9681
|
* One path holding every part's outline, with the parts remembered against
|
|
9659
9682
|
* it for the painter. Return it from a `derivePath`. `null` for no parts.
|
|
@@ -9670,6 +9693,21 @@ declare function derivedPartsOf(path: Path | null | undefined): readonly Derived
|
|
|
9670
9693
|
* `createPathEffectDerivations` by the layer that owns the painters.
|
|
9671
9694
|
*/
|
|
9672
9695
|
|
|
9696
|
+
/** Options every path effect may take. */
|
|
9697
|
+
interface PathEffectOptions {
|
|
9698
|
+
/** Its sources are hidden while it shows them. */
|
|
9699
|
+
hideSources?: boolean;
|
|
9700
|
+
}
|
|
9701
|
+
/** One rigid piece an effect lays along a path, in its own frame: x from 0 at its leading edge to `length`, y down,
|
|
9702
|
+
* its anchor line (a glyph's baseline) at y = 0. */
|
|
9703
|
+
interface EffectItem {
|
|
9704
|
+
/** How much of the path it takes. */
|
|
9705
|
+
length: number;
|
|
9706
|
+
/** Height above the anchor line of the line it centers on — a glyph's x-height middle. */
|
|
9707
|
+
middle: number;
|
|
9708
|
+
/** What it paints; empty for a piece that only takes room, such as a space. */
|
|
9709
|
+
parts: readonly DerivedPart[];
|
|
9710
|
+
}
|
|
9673
9711
|
/** A source shape. */
|
|
9674
9712
|
interface EffectSource {
|
|
9675
9713
|
/** Its outline where it is drawn. */
|
|
@@ -9691,6 +9729,9 @@ interface EffectSource {
|
|
|
9691
9729
|
* a real "none". */
|
|
9692
9730
|
fill: Fill | null;
|
|
9693
9731
|
stroke: Stroke | null;
|
|
9732
|
+
/** The pieces it lays one by one along a path — a text node's grapheme
|
|
9733
|
+
* clusters. Called only by an effect that lays items. */
|
|
9734
|
+
items?: () => readonly EffectItem[];
|
|
9694
9735
|
}
|
|
9695
9736
|
/** Reads one dependency as a source; `null` when it has no outline. */
|
|
9696
9737
|
type EffectSourceReader = (dep: DerivedDep<unknown>) => EffectSource | null;
|
|
@@ -9702,7 +9743,7 @@ type EffectSourceReader = (dep: DerivedDep<unknown>) => EffectSource | null;
|
|
|
9702
9743
|
|
|
9703
9744
|
/** Steps between two shapes. Its sources are `[from, to]`, or
|
|
9704
9745
|
* `[from, to, spine]` to lay the steps along a third path. */
|
|
9705
|
-
interface BlendEffect extends BlendPathsOptions {
|
|
9746
|
+
interface BlendEffect extends BlendPathsOptions, PathEffectOptions {
|
|
9706
9747
|
kind: 'blend';
|
|
9707
9748
|
/** How many shapes stand between the two sources, spacing by count. */
|
|
9708
9749
|
steps: number;
|
|
@@ -9729,22 +9770,53 @@ interface BlendEffect extends BlendPathsOptions {
|
|
|
9729
9770
|
orient?: boolean;
|
|
9730
9771
|
}
|
|
9731
9772
|
|
|
9773
|
+
/**
|
|
9774
|
+
* Text along a path: a source's items — a text node's grapheme clusters, or a
|
|
9775
|
+
* whole shape as one item — laid end to end along a path, each turned to it.
|
|
9776
|
+
*/
|
|
9777
|
+
|
|
9778
|
+
/**
|
|
9779
|
+
* Text (or any shape) laid along a path, item by item. Its sources are `[text, path]`. Only the text's first laid line
|
|
9780
|
+
* follows the path; a color glyph keeps its advance and paints nothing; underlines and other decorations are not drawn.
|
|
9781
|
+
* On an open path an item whose middle falls past either end is not drawn; on a closed one the text wraps past the
|
|
9782
|
+
* seam, and an item a whole lap on from the first item's start is not drawn.
|
|
9783
|
+
*/
|
|
9784
|
+
interface TextAlongEffect extends PathEffectOptions {
|
|
9785
|
+
kind: 'textAlong';
|
|
9786
|
+
/** Which part of the text sits at `start`. Default `'start'`. */
|
|
9787
|
+
align?: RunAlign;
|
|
9788
|
+
/** Where the text sits, as a fraction 0..1 of the path's length from its first point. Default 0. */
|
|
9789
|
+
start?: number;
|
|
9790
|
+
/** How far the anchor line sits off the path, toward the glyphs' up, in world units. Default 0. */
|
|
9791
|
+
shift?: number;
|
|
9792
|
+
/** What sits on the path: the glyphs' baseline, or (`'center'`) their x-height middle. Default `'baseline'`. */
|
|
9793
|
+
anchor?: 'baseline' | 'center';
|
|
9794
|
+
/** Text longer than its room is cut at the path's end (`'clip'`), or has the gaps between items squeezed until it
|
|
9795
|
+
* fits (`'fit'`). Default `'clip'`. */
|
|
9796
|
+
overflow?: 'clip' | 'fit';
|
|
9797
|
+
/** Which side of the path the glyphs stand on; see `TrackSide`. Default `'auto'`, whichever reads upright. Turned over,
|
|
9798
|
+
* the text keeps the stretch of path it had, and on an open path drops whichever letters fall off it. */
|
|
9799
|
+
side?: TrackSide;
|
|
9800
|
+
}
|
|
9801
|
+
/** The parts `items` paint laid along `path` as `effect` says; `[]` when there is nothing to lay or nowhere to lay it. */
|
|
9802
|
+
declare function textAlongParts(effect: TextAlongEffect, items: readonly EffectItem[], path: Path): DerivedPart[];
|
|
9803
|
+
|
|
9732
9804
|
/**
|
|
9733
9805
|
* The path effects, each as the parts it paints from its sources: a blend's
|
|
9734
9806
|
* steps between two shapes, a shape bent along a spine, copies of a shape
|
|
9735
|
-
* along a path.
|
|
9807
|
+
* along a path, text laid along a path.
|
|
9736
9808
|
*/
|
|
9737
9809
|
|
|
9738
9810
|
/** A shape bent along a spine. Its sources are `[shape, spine]`. */
|
|
9739
|
-
interface BendAlongEffect extends BendAlongPathOptions {
|
|
9811
|
+
interface BendAlongEffect extends BendAlongPathOptions, PathEffectOptions {
|
|
9740
9812
|
kind: 'bendAlong';
|
|
9741
9813
|
}
|
|
9742
9814
|
/** Copies of a shape along a path. Its sources are `[shape, path]`. */
|
|
9743
|
-
interface RepeatAlongEffect extends Omit<RepeatAlongPathOptions, 'flattenTolerance'
|
|
9815
|
+
interface RepeatAlongEffect extends Omit<RepeatAlongPathOptions, 'flattenTolerance'>, PathEffectOptions {
|
|
9744
9816
|
kind: 'repeatAlong';
|
|
9745
9817
|
}
|
|
9746
9818
|
/** A path effect, as a node's `data.pathEffect` holds it. */
|
|
9747
|
-
type PathEffect = BlendEffect | BendAlongEffect | RepeatAlongEffect;
|
|
9819
|
+
type PathEffect = BlendEffect | BendAlongEffect | RepeatAlongEffect | TextAlongEffect;
|
|
9748
9820
|
|
|
9749
9821
|
/**
|
|
9750
9822
|
* A path effect as a scene node: a leaf whose `dependsOn` names its sources,
|
|
@@ -9815,7 +9887,11 @@ declare function registeredPathEffects(registry: {
|
|
|
9815
9887
|
derivePose?: Readonly<Record<string, unknown>>;
|
|
9816
9888
|
}): PathEffectDerivations | null;
|
|
9817
9889
|
|
|
9818
|
-
/**
|
|
9890
|
+
/** Note that the derivation running now read glyph outlines. */
|
|
9891
|
+
declare function noteFontRead(): void;
|
|
9892
|
+
|
|
9893
|
+
/** `dep` as a path effect's source, or `null` when it has no outline. A text
|
|
9894
|
+
* node's source also carries its grapheme clusters as items. */
|
|
9819
9895
|
declare function readEffectSource(dep: DerivedDep<unknown>): EffectSource | null;
|
|
9820
9896
|
|
|
9821
9897
|
/**
|
|
@@ -9835,6 +9911,26 @@ declare const PATH_EFFECT_DERIVATIONS: PathEffectDerivations;
|
|
|
9835
9911
|
*/
|
|
9836
9912
|
declare function withPathEffectsRegistry<TPose, TData = unknown, TLayer extends string = string>(registry?: SceneRegistry<TPose, TData, TLayer>): SceneRegistry<TPose, TData, TLayer>;
|
|
9837
9913
|
|
|
9914
|
+
/**
|
|
9915
|
+
* For a path-effect node with `hideSources`, the source an edit of `role`
|
|
9916
|
+
* goes to: `'text'`, its first source when that is a text node; `'path'`, the
|
|
9917
|
+
* path it lays along — the second source of an along kind, a blend's spine.
|
|
9918
|
+
* `null` otherwise. The one answer every edit route asks.
|
|
9919
|
+
*/
|
|
9920
|
+
declare function effectSourceFor<TData, TLayer extends string, TPose>(scene: Pick<Scene<TData, TLayer, TPose>, 'get'>, id: NodeId, role: 'text' | 'path'): NodeId | null;
|
|
9921
|
+
/**
|
|
9922
|
+
* The sources a removal of `ids` takes with it: those that a path effect with
|
|
9923
|
+
* `hideSources` in the removal hid, and that nothing staying still derives
|
|
9924
|
+
* from. A source another effect still reads stays, and so does one shown
|
|
9925
|
+
* again since or named in `keep`. Transitive, so an effect's hidden effect
|
|
9926
|
+
* takes its own too.
|
|
9927
|
+
*/
|
|
9928
|
+
declare function hiddenSourcesTakenWith<TData, TLayer extends string, TPose>(scene: Pick<Scene<TData, TLayer, TPose>, 'get' | 'removalClosure'>, ids: readonly NodeId[], keep?: ReadonlySet<NodeId>): NodeId[];
|
|
9929
|
+
|
|
9930
|
+
/** For each selected path-effect node with `hideSources`, its hidden sources' outlines as the effect reads them, in a
|
|
9931
|
+
* one-screen-pixel stroke of the `'chrome'` overlay color at 40% opacity. The selection comes off the draw envelope. */
|
|
9932
|
+
declare function useEffectSourcesLayer<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>): RenderLayer<unknown>;
|
|
9933
|
+
|
|
9838
9934
|
/** The Boolean path operations, each acting on the current selection and
|
|
9839
9935
|
* committing as one undo step. */
|
|
9840
9936
|
interface UseBooleansReturn {
|
|
@@ -10203,6 +10299,33 @@ interface AnchorHit {
|
|
|
10203
10299
|
* are within `threshold` (controls are smaller and rendered on top). */
|
|
10204
10300
|
declare function hitAnchor(path: PolygonPath, worldX: number, worldY: number, threshold: number): AnchorHit | null;
|
|
10205
10301
|
|
|
10302
|
+
type AnyScene = Scene<unknown, string, unknown>;
|
|
10303
|
+
/** The deps {@link moveNodes} reads; an action calling it declares these. */
|
|
10304
|
+
declare const MOVE_NODES_REQUIRES: readonly ["scene", "selection", "applyOps", "poseDescriptor", "geometryProjection", "transformFollowers"];
|
|
10305
|
+
/**
|
|
10306
|
+
* The ops that move `ids` by `delta` the way a drag of them commits: each id
|
|
10307
|
+
* that is not itself derived (a derived one is moved through what it derives
|
|
10308
|
+
* from) and every descendant not carried by a moving frame, each translated in
|
|
10309
|
+
* the frame it is stored in. `delta` is in the coordinates a gesture's points
|
|
10310
|
+
* are — world on a 2D canvas — and the `poseDescriptor` dep turns it into each
|
|
10311
|
+
* pose's translation, so a 3D host's descriptor lands it on the node's plane.
|
|
10312
|
+
*/
|
|
10313
|
+
declare function moveNodesOps(scene: AnyScene, ids: readonly string[], delta: {
|
|
10314
|
+
dx: number;
|
|
10315
|
+
dy: number;
|
|
10316
|
+
}, deps?: Pick<ActionDeps, 'poseDescriptor' | 'geometryProjection'>, label?: string): Op[];
|
|
10317
|
+
/**
|
|
10318
|
+
* Move `ids` by `delta` the way a drag of them commits ({@link moveNodesOps}),
|
|
10319
|
+
* finished by the `transformFollowers` and committed as one undo entry through
|
|
10320
|
+
* `applyOps`, else the scene. Inside an open `scene.batch` it joins that
|
|
10321
|
+
* batch's entry. Returns whether anything moved. A caller running as an
|
|
10322
|
+
* action declares {@link MOVE_NODES_REQUIRES}.
|
|
10323
|
+
*/
|
|
10324
|
+
declare function moveNodes(deps: ActionDeps, ids: readonly string[], delta: {
|
|
10325
|
+
dx: number;
|
|
10326
|
+
dy: number;
|
|
10327
|
+
}, label?: string): boolean;
|
|
10328
|
+
|
|
10206
10329
|
/**
|
|
10207
10330
|
* A transform the selection underwent, kept relative so it can be applied to
|
|
10208
10331
|
* whatever is selected next.
|
|
@@ -10605,6 +10728,120 @@ interface MomentumOptions {
|
|
|
10605
10728
|
*/
|
|
10606
10729
|
declare function momentum<TPose>(opts: MomentumOptions): MoveBehavior<TPose>;
|
|
10607
10730
|
|
|
10731
|
+
/** The part of a scene a rig's skins read and write. */
|
|
10732
|
+
interface SkinScene<TPose> {
|
|
10733
|
+
get(id: NodeId): {
|
|
10734
|
+
pose: TPose;
|
|
10735
|
+
data?: unknown;
|
|
10736
|
+
} | undefined;
|
|
10737
|
+
readonly overrides: PoseOverrides<TPose>;
|
|
10738
|
+
setPose(id: NodeId, pose: TPose): void;
|
|
10739
|
+
update(id: NodeId, patch: {
|
|
10740
|
+
data: never;
|
|
10741
|
+
}): void;
|
|
10742
|
+
}
|
|
10743
|
+
/** Where a node's path is drawn, for a skin to bend: `null` for a node with none. */
|
|
10744
|
+
type RestPath<TPose> = (node: {
|
|
10745
|
+
pose: TPose;
|
|
10746
|
+
data?: unknown;
|
|
10747
|
+
}) => Path | null;
|
|
10748
|
+
/** The path in a node's `data.path`, carried through its pose as `kit:path` paints it. */
|
|
10749
|
+
declare function dataRestPath<TPose>(node: {
|
|
10750
|
+
pose: TPose;
|
|
10751
|
+
data?: unknown;
|
|
10752
|
+
}): Path | null;
|
|
10753
|
+
|
|
10754
|
+
/** The part of a scene a rig writes to. */
|
|
10755
|
+
interface RigScene<TPose> extends SkinScene<TPose> {
|
|
10756
|
+
batch<T>(label: string, fn: () => T): T;
|
|
10757
|
+
}
|
|
10758
|
+
/** What a `RigApply` knows about the node it is posing. */
|
|
10759
|
+
interface RigApplyContext<TPose> {
|
|
10760
|
+
/** The joint the node rides. */
|
|
10761
|
+
joint: string;
|
|
10762
|
+
node: NodeId;
|
|
10763
|
+
/** The node's document pose when the rig was bound — where it sits at the
|
|
10764
|
+
* bind pose. */
|
|
10765
|
+
rest: TPose;
|
|
10766
|
+
/** The joint's world transform at the bind pose. */
|
|
10767
|
+
restWorld: GlMat3;
|
|
10768
|
+
/** `world * inverse(restWorld)`: the motion since the bind pose, in world
|
|
10769
|
+
* space. Carrying `rest` by it is what welding the node to the joint means. */
|
|
10770
|
+
fromRest: GlMat3;
|
|
10771
|
+
}
|
|
10772
|
+
/** Turns a joint's world transform into a pose for one bound node. The only
|
|
10773
|
+
* part of a rig that knows the scene's pose shape. */
|
|
10774
|
+
type RigApply<TPose> = (world: GlMat3, ctx: RigApplyContext<TPose>) => TPose;
|
|
10775
|
+
/** Options for `bindRig`. */
|
|
10776
|
+
interface BindRigOptions<TPose> {
|
|
10777
|
+
scene: RigScene<TPose>;
|
|
10778
|
+
skeleton: Skeleton;
|
|
10779
|
+
/** Joint name → the node or nodes that ride it. Each node keeps the offset
|
|
10780
|
+
* from its joint that it has at the bind pose. */
|
|
10781
|
+
bindings?: Readonly<Record<string, NodeId | readonly NodeId[]>>;
|
|
10782
|
+
/** Node id → the weights its path bends by. Where a bound node moves whole with one joint,
|
|
10783
|
+
* a skinned node's points each follow their own joints, and the rig shows the bent path
|
|
10784
|
+
* through the node's pose override, posed at the path's bounds. */
|
|
10785
|
+
skins?: Readonly<Record<NodeId, Skin>>;
|
|
10786
|
+
/** Where a skinned node's path is drawn when the rig is bound. Default
|
|
10787
|
+
* {@link dataRestPath}: the node's `data.path`, through its pose. */
|
|
10788
|
+
restPath?: RestPath<TPose>;
|
|
10789
|
+
/** Default: {@link rigidRigApply} over `descriptor`. */
|
|
10790
|
+
apply?: RigApply<TPose>;
|
|
10791
|
+
/** The descriptor the default `apply` reads and writes poses through.
|
|
10792
|
+
* Default `AUTO_POSE_DESCRIPTOR`. */
|
|
10793
|
+
descriptor?: PoseDescriptor<TPose>;
|
|
10794
|
+
}
|
|
10795
|
+
/** A skeleton bound to scene nodes, as `bindRig` returns it. */
|
|
10796
|
+
interface Rig {
|
|
10797
|
+
readonly skeleton: Skeleton;
|
|
10798
|
+
/**
|
|
10799
|
+
* The rig's pose as a value an animator moves. Its committed value starts as `{}`, the bind
|
|
10800
|
+
* pose, and each frame the rig is posed with what the target shows. A clip is a
|
|
10801
|
+
* `SampledTrack<Pose>` given this as its `target`: clips on one rig crossfade by their
|
|
10802
|
+
* `weight`s, weights short of 1 leave the rest to the committed pose, and a `spring` or
|
|
10803
|
+
* `tween` from a pose away from the committed one adds on top. `animator.hold` shows a pose made elsewhere the same way, an
|
|
10804
|
+
* IK solve included.
|
|
10805
|
+
*/
|
|
10806
|
+
readonly target: Target<Pose>;
|
|
10807
|
+
/**
|
|
10808
|
+
* Commit `pose` and move every bound node to what the target now shows, which is `pose`
|
|
10809
|
+
* unless something is animating the target; a hold on it weighs the new pose in when it is
|
|
10810
|
+
* next read, at the animator's next frame or the hold's `touch()`. Writes go through the scene's pose overrides —
|
|
10811
|
+
* no history entry, no document write, no version bump — and are committed. `root`, where
|
|
10812
|
+
* given, replaces the placement, as {@link Rig.place}.
|
|
10813
|
+
*/
|
|
10814
|
+
pose(pose: Pose, root?: GlMat3): void;
|
|
10815
|
+
/** Place the rig in the world by `root`, which may mirror it, and pose it there. It stays
|
|
10816
|
+
* until placed again; with no `root`, the rig goes back to where its skeleton puts it. */
|
|
10817
|
+
place(root?: GlMat3): void;
|
|
10818
|
+
/** The joint world transforms as the rig was last posed, root applied. */
|
|
10819
|
+
world(): ReadonlyMap<string, GlMat3>;
|
|
10820
|
+
/** Write the current frame into the bound nodes' document poses as one
|
|
10821
|
+
* undo entry, and drop the overrides. A skinned node's bent path goes into
|
|
10822
|
+
* its `data.path`. Later frames stay relative to the bind-time rest, so
|
|
10823
|
+
* baking does not compound. */
|
|
10824
|
+
bake(label?: string): void;
|
|
10825
|
+
/** Drop the overrides; the nodes show their document poses again until the
|
|
10826
|
+
* rig is next posed. */
|
|
10827
|
+
release(): void;
|
|
10828
|
+
}
|
|
10829
|
+
/**
|
|
10830
|
+
* Carries a node rigidly with its joint: the rest pose's center moves by
|
|
10831
|
+
* `fromRest`, and its rotation turns with the rest pose's x-axis. Scale in the
|
|
10832
|
+
* joint chain moves positions but not sizes — the pose model holds no shear,
|
|
10833
|
+
* and a sized pose under anisotropic scale would need one. Write an `apply`
|
|
10834
|
+
* that reads `world` to size nodes from joint scale.
|
|
10835
|
+
*/
|
|
10836
|
+
declare function rigidRigApply<TPose>(descriptor: PoseDescriptor<TPose>): RigApply<TPose>;
|
|
10837
|
+
/**
|
|
10838
|
+
* Bind a skeleton's joints to scene nodes. Nodes are written in world space
|
|
10839
|
+
* and the rig resolves its own hierarchy, so bound nodes are best left
|
|
10840
|
+
* unparented, or under containers whose pose does not compose into theirs;
|
|
10841
|
+
* the scene's tree stays free to order and group them for drawing.
|
|
10842
|
+
*/
|
|
10843
|
+
declare function bindRig<TPose>(options: BindRigOptions<TPose>): Rig;
|
|
10844
|
+
|
|
10608
10845
|
/**
|
|
10609
10846
|
* A {@link Rig} bound for the component's lifetime, its overrides dropped on
|
|
10610
10847
|
* unmount. Rebinds — re-reading every node's rest pose — whenever an option's
|
|
@@ -10612,12 +10849,78 @@ declare function momentum<TPose>(opts: MomentumOptions): MoveBehavior<TPose>;
|
|
|
10612
10849
|
*/
|
|
10613
10850
|
declare function useRig<TPose>(options: BindRigOptions<TPose>): Rig;
|
|
10614
10851
|
|
|
10852
|
+
/** What a rig reads from node data: a `skeleton` on the node that is the rig, and on the nodes
|
|
10853
|
+
* under it a `skin` for a path that bends or a `joint` for a node that rides one whole. */
|
|
10854
|
+
interface RigNodeData {
|
|
10855
|
+
/** Joints relative to the node's pose: its box's top-left corner, turned as the node is. */
|
|
10856
|
+
skeleton?: Skeleton;
|
|
10857
|
+
skin?: Skin;
|
|
10858
|
+
joint?: string;
|
|
10859
|
+
}
|
|
10860
|
+
/** Weights to bind in place of the document's, and word of when they change. `@weasel-js/rig`'s
|
|
10861
|
+
* `RigEditState` is one: it holds what a stroke of the weight tool has painted and not yet written. */
|
|
10862
|
+
interface PaintedSkins {
|
|
10863
|
+
/** By node. A new map whenever the weights change. */
|
|
10864
|
+
painted(): ReadonlyMap<NodeId, Skin>;
|
|
10865
|
+
listen(fn: () => void): () => void;
|
|
10866
|
+
}
|
|
10867
|
+
/** The part of a scene `rigFromNode` reads. */
|
|
10868
|
+
interface RigNodeSource<TPose> {
|
|
10869
|
+
get(id: NodeId): {
|
|
10870
|
+
pose: TPose;
|
|
10871
|
+
data?: unknown;
|
|
10872
|
+
} | undefined;
|
|
10873
|
+
childrenOf(id: NodeId): readonly NodeId[];
|
|
10874
|
+
}
|
|
10875
|
+
/** The skeleton, bindings, and skins a rig node declares, as `bindRig` takes them. */
|
|
10876
|
+
interface RigNodeParts {
|
|
10877
|
+
skeleton: Skeleton;
|
|
10878
|
+
bindings: Record<string, NodeId[]>;
|
|
10879
|
+
skins: Record<NodeId, Skin>;
|
|
10880
|
+
}
|
|
10881
|
+
/**
|
|
10882
|
+
* A skeleton as a rig node's data keeps it, moved to where the node's pose puts it: its root
|
|
10883
|
+
* joints are offset from the pose box's top-left corner and turned as the node is. Joints
|
|
10884
|
+
* under a root are relative to their parents and are left as they are.
|
|
10885
|
+
*/
|
|
10886
|
+
declare function placeSkeleton<TPose>(skeleton: Skeleton, pose: TPose, descriptor?: PoseDescriptor<TPose>): Skeleton;
|
|
10887
|
+
/** The inverse of {@link placeSkeleton}: a skeleton in the scene's space, as the node at
|
|
10888
|
+
* `pose` would keep it in its data. */
|
|
10889
|
+
declare function unplaceSkeleton<TPose>(skeleton: Skeleton, pose: TPose, descriptor?: PoseDescriptor<TPose>): Skeleton;
|
|
10890
|
+
/**
|
|
10891
|
+
* Read a rig out of the scene: the skeleton in `id`'s `data.skeleton`, placed by that node's
|
|
10892
|
+
* pose, and under it every node whose data has a `skin` or names a `joint`.
|
|
10893
|
+
*/
|
|
10894
|
+
declare function rigFromNode<TPose>(scene: RigNodeSource<TPose>, id: NodeId, descriptor?: PoseDescriptor<TPose>): RigNodeParts;
|
|
10895
|
+
/** Options for `useRigNode`. */
|
|
10896
|
+
interface UseRigNodeOptions<TPose> extends Pick<BindRigOptions<TPose>, 'apply' | 'descriptor' | 'restPath'> {
|
|
10897
|
+
scene: RigScene<TPose> & RigNodeSource<TPose> & {
|
|
10898
|
+
subscribe(listener: () => void): () => void;
|
|
10899
|
+
getVersion(): number;
|
|
10900
|
+
};
|
|
10901
|
+
/** The node whose data holds the skeleton. */
|
|
10902
|
+
node: NodeId;
|
|
10903
|
+
/** Weights bound in place of a node's `data.skin` while they are held. Give it the
|
|
10904
|
+
* `RigEditState` `@weasel-js/rig`'s weight tool has, and a stroke bends the path as it is painted. */
|
|
10905
|
+
painting?: PaintedSkins;
|
|
10906
|
+
}
|
|
10907
|
+
/**
|
|
10908
|
+
* A {@link Rig} read from a node, as {@link rigFromNode} reads it. It is bound again when the
|
|
10909
|
+
* rig node or a node under it changes its pose or data, or when nodes under it come or go; an
|
|
10910
|
+
* edit elsewhere in the scene leaves it alone. A rig bound again keeps its `target`, with the
|
|
10911
|
+
* animations running on it, its committed pose, and its placement, unless the skeleton's
|
|
10912
|
+
* joints were added, removed, renamed, or reordered. Then it has a new `target`, which takes
|
|
10913
|
+
* over the placement and the pose of every joint the skeleton still names. Animations go on
|
|
10914
|
+
* running on the target they were started on and show through the new one, so a joint that
|
|
10915
|
+
* was renamed stops moving.
|
|
10916
|
+
*/
|
|
10917
|
+
declare function useRigNode<TPose>(options: UseRigNodeOptions<TPose>): Rig;
|
|
10918
|
+
|
|
10615
10919
|
/** A glyph this package draws, by its bare name. */
|
|
10616
|
-
type CoreIconName = 'arrow' | '
|
|
10920
|
+
type CoreIconName = 'arrow' | 'ellipse' | 'eyedropper' | 'hand' | 'image' | 'lasso' | 'line' | 'pen' | 'pencil' | 'polygon' | 'rect' | 'select' | 'slice' | 'star' | 'sticky' | 'text' | 'unknown' | 'cut' | 'copy' | 'paste' | 'duplicate' | 'transformAgain' | 'group' | 'ungroup' | 'bringForward' | 'bringToFront' | 'sendBackward' | 'sendToBack' | 'flipX' | 'flipY' | 'delete' | 'undo' | 'redo' | 'measure' | 'tune' | 'alignLeft' | 'alignRight' | 'alignTop' | 'alignBottom' | 'alignCenterX' | 'alignCenterY' | 'distributeHorizontal' | 'distributeVertical' | 'union' | 'intersect' | 'subtract' | 'exclude' | 'divide' | 'crop' | 'trim' | 'merge' | 'join' | 'bridge' | 'cutAtCrossings' | 'simplify' | 'offsetPath' | 'retractHandles' | 'symmetricHandles' | 'holdHandleAngle' | 'holdHandleLength' | 'simplifyBrush' | 'harmonize' | 'averageAnchors' | 'bendSegment' | 'nudgeAnchors' | 'nudgeAnchorsUp' | 'nudgeAnchorsDown' | 'nudgeAnchorsLeft' | 'createOutlines' | 'outlineStroke' | 'bold' | 'italic' | 'underline' | 'strikethrough' | 'overline' | 'superscript' | 'subscript' | 'textAlignLeft' | 'textAlignCenter' | 'textAlignRight' | 'textAlignJustify' | 'textAlignTop' | 'textAlignMiddle' | 'textAlignBottom' | 'strokeWidth' | 'strokeCap' | 'strokeJoin' | 'strokeAlign' | 'capButt' | 'capRound' | 'capSquare' | 'joinMiter' | 'joinRound' | 'joinBevel' | 'alignInner' | 'alignCenter' | 'alignOuter' | 'dashSolid' | 'dashDashed' | 'dashDotted' | 'dashCustom' | 'paintSolid' | 'paintLinear' | 'paintRadial' | 'paintConic' | 'paintMesh' | 'paintPattern' | 'paintNone';
|
|
10617
10921
|
declare module '@weasel-js/icons' {
|
|
10618
10922
|
interface IconName {
|
|
10619
10923
|
'core:arrow': true;
|
|
10620
|
-
'core:bone': true;
|
|
10621
10924
|
'core:ellipse': true;
|
|
10622
10925
|
'core:eyedropper': true;
|
|
10623
10926
|
'core:hand': true;
|
|
@@ -10634,7 +10937,6 @@ declare module '@weasel-js/icons' {
|
|
|
10634
10937
|
'core:sticky': true;
|
|
10635
10938
|
'core:text': true;
|
|
10636
10939
|
'core:unknown': true;
|
|
10637
|
-
'core:weight': true;
|
|
10638
10940
|
'core:cut': true;
|
|
10639
10941
|
'core:copy': true;
|
|
10640
10942
|
'core:paste': true;
|
|
@@ -10830,7 +11132,8 @@ declare const SNAP_ROLES: {
|
|
|
10830
11132
|
/** The angle step `snap.constrain` (Shift) holds a direction to: a line, a
|
|
10831
11133
|
* measurement, a rotate, a symmetry axis. 15 degrees. */
|
|
10832
11134
|
declare const SNAP_ANGLE_STEP: number;
|
|
10833
|
-
/** The step an `'axis'` lock holds a move
|
|
11135
|
+
/** The step an `'axis'` lock holds a move or an anchor drag to, and Shift a
|
|
11136
|
+
* pen handle: the axes and the diagonals. */
|
|
10834
11137
|
declare const SNAP_AXIS_STEP: number;
|
|
10835
11138
|
/** The snap roles `ctx` holds. */
|
|
10836
11139
|
declare function snapMods(ctx: {
|
|
@@ -10840,6 +11143,8 @@ declare function snapMods(ctx: {
|
|
|
10840
11143
|
|
|
10841
11144
|
/** The sources that answer `gesture`: those naming it, and, for one naming none, point, move and resize. */
|
|
10842
11145
|
declare function snapSourcesFor<S extends Pick<SnapSource<unknown>, 'gestures'>>(sources: readonly S[], gesture: SnapGesture): S[];
|
|
11146
|
+
/** Throws if two of `sources` share an id: one would silently replace the other. */
|
|
11147
|
+
declare function assertSnapSourceIds(sources: readonly Pick<SnapSource<unknown>, 'id'>[]): void;
|
|
10843
11148
|
/** What a candidate draws when the result meets it. */
|
|
10844
11149
|
type SnapCandidateMark<P> = NonNullable<SourceCandidate<P>['mark']>;
|
|
10845
11150
|
/** How `gatherSnapCandidates` reads a host's points. */
|
|
@@ -10917,6 +11222,9 @@ declare function pathSnapSource(opts?: PathSnapSourceOptions): SnapSource;
|
|
|
10917
11222
|
/** The canvas's reach when neither a source nor the kit settings name one. */
|
|
10918
11223
|
declare const DEFAULT_SNAP_PX = 8;
|
|
10919
11224
|
|
|
11225
|
+
/** A screen-space layer drawing the marks in `store`, redrawn when they change. */
|
|
11226
|
+
declare function createSnapReadoutLayer(store: SnapOutcomeStore, style?: SnapReadoutStyle): RenderLayer<unknown>;
|
|
11227
|
+
|
|
10920
11228
|
/**
|
|
10921
11229
|
* The screen-space drawing the snap readout and the guides overlay share:
|
|
10922
11230
|
* ticked segments, number pills, and the glyph-and-label of a point mark.
|
|
@@ -10951,8 +11259,6 @@ interface CoreKitTargetSettings {
|
|
|
10951
11259
|
penCloseHintRadiusPx: number;
|
|
10952
11260
|
/** How near the pen's first anchor a click closes the subpath. */
|
|
10953
11261
|
penCloseHitPx: number;
|
|
10954
|
-
boneJointRadiusPx: number;
|
|
10955
|
-
weightPointRadiusPx: number;
|
|
10956
11262
|
sliceVertexRadiusPx: number;
|
|
10957
11263
|
/** How near the knife's first point a click closes the cut. */
|
|
10958
11264
|
sliceCloseHitPx: number;
|
|
@@ -11002,6 +11308,10 @@ declare const coreKitSettingsSchema: Omit<_weasel_js_prefs.PrefGroup, "children"
|
|
|
11002
11308
|
readonly dragPx: _weasel_js_prefs.PrefNumber & {
|
|
11003
11309
|
default: number;
|
|
11004
11310
|
};
|
|
11311
|
+
readonly keymapUnbound: _weasel_js_prefs.PrefEnumBase<"modal" | "cascade"> & {
|
|
11312
|
+
default: "modal" | "cascade";
|
|
11313
|
+
clearable?: false;
|
|
11314
|
+
};
|
|
11005
11315
|
};
|
|
11006
11316
|
};
|
|
11007
11317
|
readonly targets: Omit<_weasel_js_prefs.PrefGroup, "children"> & {
|
|
@@ -11039,12 +11349,6 @@ declare const coreKitSettingsSchema: Omit<_weasel_js_prefs.PrefGroup, "children"
|
|
|
11039
11349
|
readonly penCloseHitPx: _weasel_js_prefs.PrefNumber & {
|
|
11040
11350
|
default: number;
|
|
11041
11351
|
};
|
|
11042
|
-
readonly boneJointRadiusPx: _weasel_js_prefs.PrefNumber & {
|
|
11043
|
-
default: number;
|
|
11044
|
-
};
|
|
11045
|
-
readonly weightPointRadiusPx: _weasel_js_prefs.PrefNumber & {
|
|
11046
|
-
default: number;
|
|
11047
|
-
};
|
|
11048
11352
|
readonly sliceVertexRadiusPx: _weasel_js_prefs.PrefNumber & {
|
|
11049
11353
|
default: number;
|
|
11050
11354
|
};
|
|
@@ -11063,4 +11367,4 @@ declare const coreKitSettingsSchema: Omit<_weasel_js_prefs.PrefGroup, "children"
|
|
|
11063
11367
|
};
|
|
11064
11368
|
};
|
|
11065
11369
|
|
|
11066
|
-
export { ANCHOR_HIT_BASE_PX, AREA_SELECT_ID, ActionsProviderIfRoot, AddNodeSpec, Affordance, AffordanceBinding, AffordanceRegion, type AffordanceRegionHit, type AlignAdapter, type AlignEdge, type AlignReference, type AnchorEdit, type AnchorFieldsApi, type AnchorHit, AnchorMarkerShape, type AnchorScratch, type AnchorState, type AnimateOnSetPoseOptions, type AnimatedReflow, type AnnotationFlag, type AnyTool, AreaSelectAdapter, type ArrangeArgs, type ArrangedPose, BUILTIN_TOOL_IDS, type BaseFeature, type BendAlongEffect, type BindRigOptions, type BlendEffect, type BooleanCommitPiece, BooleanOp, BooleanOpOptions, BooleanOpResult, type BooleanOperands, type BooleanSource, BooleanStrokes, BooleansAdapter, BoundsConstraint, type BuildChromeCtxArgs, type BuiltinShapeToolId, type BuiltinToolId, type BuiltinToolOptions, COMPOSITE_FEATURES, type CameraProps, type CanvasDebugSink, type CanvasExtensionApi, type CanvasHelpers, type CanvasLayers, type CanvasProps, type CanvasRetainOptions, type CanvasSize, type CanvasSizeSnapshot, type CanvasSurfaceHelpers, CanvasView, type CanvasViewCamera, type CanvasViewHandle, type CanvasViewHelpers, type CanvasViewProps, type CanvasViewState, type ChildOrder, type ChromeCtx, type ChromeId, ChromeState, type ClampBounds, ClipboardSnapshot, type CoalescedCtx, CommonAffordanceScratch, type ComposeSelectionPoseOpts, type CompositeFeature, type ComputeSliceOpsArgs, type ComputeSliceResult, type Condition, ContentHandlerEntry, type Contribution, type ContributionChrome, type ContributionDepReader, type ContributionFrameCtx, type CoreIconName, type CoreKitTargetSettings, type CornerResizeAffordanceOptions, type CornerResizeScratch, type CreateChildrenLayerOpts, type CreateDebugOverlayLayerOpts, CreateOutlinesAdapter, type CreatePathEditingOverlayLayerOptions, type CreatePathLayerOpts, type CreatePenPreviewLayerOptions, type CreateTextLayerOpts, type CreateViewResolverOpts, type CreateViewportLayerOpts, CursorCoordsHud, type CursorCoordsHudProps, type CustomLayerEntry, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_FILL_COLOR, DEFAULT_HANDLE_SIZE, DEFAULT_INK, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_OVERLAY_STYLE, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SHAPE_FILL, DEFAULT_SIMPLIFY_TOLERANCE, DEFAULT_SNAP_PX, DEFAULT_STROKE_COLOR, DRAG_PAN_ID, type DebugConfig, type DebugFeature, type DebugSnapshot, type DebugStroke, type DebugStrokes, type DebugTheme, type DefaultTextData, type DeleteArgs, DepRegistryProviderIfRoot, type Departures, DerivePathFn, DerivePoseFn, DerivedDep, type DerivedPart, DeviceProfileProvider, type DeviceProfileProviderProps, Dims, type DistributeAdapter, type DistributeAxis, type DistributeMode, type DragGestureController, type DragGestureCtx, type DragGestureEndCtx, type DragGesturePhase, type DragGesturePoint, type DragHandleOptions, type DragPanParams, type DragPayload, type DragRadialController, type DragRadialCtx, type DragRadialEndCtx, type DragRadialPoint, type DragRadialState, type DragRectBounds, type DragRectController, type DragRectCtx, type DragRectEndCtx, type DragRectPoint, DrawCanvas, type DrawCanvasDraw, type DrawCanvasProps, type DrawnBoundsOptions, type DrawnBoundsScene, type DropZoneOptions, EditAnchorsDep, EditAnchorsParams, type EditableShape, type EditedLayerOf, type EditingDrawOne, type EffectSource, type EffectSourceReader, FALLBACK_ACCENT, FEATURE_ACTION_IDS, type Feature, type FeatureBindingOptions, type FeatureEntry, type FeaturePreset, type FeedDelta, type FeedNode, FitViewToBoundsOptions, type FlipAxis, type FlipPivot, type FrameStats, GHOST_STROKE, type GateLayerOptions, type GateSource, type GatedLayer, type GatedNode, type GatherSnapOptions, type GeneratedShape, GeometryProjection, GestureContext, type GesturePreviewSource, type GestureSource, HANDLE_BASE_PX, HANDLE_LOCK_ROLES, InertiaConfig as HandToolInertiaConfig, type HandleDragEnd, type HandleDragPoint, type HandleEdit, HandleLocks, type HandleScope, type HeadlessCanvasLike, type HostAnchorAlign, type HostAnchorInput, type HostAnchorOffset, type HostAnchorStyle, type HoverTracking, INSERT_REPOSITION_BINDING, IconRegistryProvider, IconRegistryProviderIfRoot, type IconRegistryProviderProps, InertiaConfig, type InkExtents, InsertAdapter, type InsertArgs, InsertBehavior, InsertNodeFactory, type InsertOp, type InsertOverlayStyle, InsertPaint, type InsertPreviewExtent, type InsertPreviewGeometry, type InsertPreviewLike, type InsertPreviewOverlay, type InsertToolOptions, type JoinPlan, KIT_SHAPE_KINDS, KIT_STANDARD_ACTION_IDS, KIT_VERSIONS, type KeyModifiers, type KeyState, type KeyStateAttachOptions, type KitInsertShape, type KitRequirements, type KitVersions, LONG_PRESS_FEEDBACK_ID, LassoHitMode, LassoSelectAdapter, LassoSelectBehavior, LayerEnumerableAdapter, type LayerFrameStats, LayerGroup, LayerHit, type LayerSlotValue, type LayersMap, LayoutDropTargetMode, LayoutFrame, type LayoutRef, LayoutStrategy, LeanSceneCanvas, type LeanSceneCanvasProps, type LifecycleAdapter, type LifecycleAnimation, type LinePoint, type LivePathEditSpec, type LongPressFeedbackOptions, MEASURE_ACTION_IDS, MEASURE_AFFORDANCE_KIND, MEASURE_LAYER_ID, type MeasureCell, type MeasureData, type MeasureEnd, type MeasureEndSourceOptions, type MeasureHit, type MeasurePoint, type Measurement, type Measurements, type ModeTriggerHandlers, type MomentumOptions, MoveAdapter, MoveBehavior, type MoveToIndexArgs, type NestedHitOpts, type NestedHitTester, type NodeClientRect, type NodeFlagArgs, type NodeGates, type NodeInk, type NodeInkCtx, type NodeOverlayFrame, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type NodeSilhouetteCtx, OVERLAY_ROLE_STROKES, type OpFactory, type OpenFilePickerOptions, type OpsApplier, OrderedAdapter, OriginProjection, type OutlineStrokeResult, type Overlay, type OverlayPoint, type OverlayVisibilityId, PAINTED_CURSOR_LAYER_ID, PATHFINDER_STROKES, PATH_ANCHOR_CHROME_ID, PATH_EFFECT, PATH_EFFECT_DERIVATIONS, PATH_GESTURE_TAGS, PATH_SNAP_LABELS, type Page, type PageLayoutOptions, type PagesLayerOptions, type PaintBoundsFn, PaintKindEntry, type PaintedSkins, PasteCtx, PasteOmission, type PathAnchor, type PathAnchorAffordanceOptions, PathEditExtension, type PathEditHost, PathEditMark, type PathEditOpening, type PathEditPreview, PathEditTarget, type PathEditingOverlaySlotConfig, type PathEditingOverlayStyle, type PathEffect, type PathEffectDerivations, type PathGestureFamily, type PathNode, PathPaint, type PathSnapSourceOptions, type PathStorageKind, PathSymmetryDep, type PenContinuation, type PenPreviewStyle, type PenScratch, type PenSubpath, type PencilPoint, PickHud, type PickHudProps, type PickSlop, type PickTopMostHitAdapter, type PinchZoomOptions, type PixelRenderPlan, type PlacedNode, type PlacedPage, type PlacedRig, PlaneMap, type PointSnap, type PointerFollower, PointerProviderIfRoot, type PointerSample, type PointerStylusState, type PolygonGenerator, type PolygonPoint, PoseAdapter, type PoseAnimationAdapter, type PoseCascade, PoseComposition, PoseDescriptor, type PoseFeed, type PoseFrame, PoseOverrides, PoseRemoval, type PoseRun, type PoseRunCtx, type PoseRunStep, type PoseSource, type PoseTargetOptions, type PoseTargetScene, type PoseTransitionScene, type PoseTransitionSeat, PoseWrite, type PosedNode, type PressureToWidthOptions, type PreviewNode, RECT_POSE_COMPOSITION, RIGID_POSE_COMPOSITION, ROTATION_HANDLE_BASE_PX, type RasterImage, type RasterRenderArgs, type RasterSession, type RasterSessionOptions, type RecordedBounds, type RecordedHandle, type RecordedHitbox, type RecordedLayer, type RecordedOrigin, type RecordedSnap, type RecordedViewport, RectPose, RedrawSource, type ReflowScene, ReflowTransition, type ReflowTransitionOptions, type RegisterNodeShapeOptions, RegisteredOp, type RenderDebugSnapshotArgs, RenderLayer, type RenderNeeds, type RenderSceneToCanvasArgs, type RenderSceneToPixelsArgs, type ReorderArgs, type ReorderDirection, type ReorderRestoreEntry, type ReparentArgs, type RepeatAlongEffect, type RepeatableTransform, type RequirementMismatch, ResizeAdapter, ResizeHandleLayout, type ResolvableView, type ResolvedOverlay, type RestPath, type Rig, type RigApply, type RigApplyContext, type RigEditState, type RigNodeData, type RigNodeParts, type RigNodeSource, type RigScene, RotateAdapter, RotateBehavior, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, type RoutedNode, SCENE_CANVAS_FEATURES, SELECTION_MOVE_ID, SELECTION_RESIZE_ID, SELECTION_ROTATE_ID, SELECTION_TRANSFORM_ID, SHAPE_COUNT_RANGE, SHAPE_KINDS, SNAP_ANGLE_STEP, SNAP_AXIS_STEP, SNAP_ROLES, STAR_RATIO_RANGE, Scene, type SceneAdapterSelection, SceneArrivalRefused, SceneCanvas, type SceneCanvasAdapter, type SceneCanvasApi, type SceneCanvasGeometry, type SceneCanvasHit, type SceneCanvasLayers, type SceneCanvasLongPress, type SceneCanvasProps, SceneCanvasSnap, type SceneCanvasViewport, type SceneClipTargetsOptions, Node as SceneNode, type SceneNodeClientRectOpts, ScenePoseReports, SceneRegistry, type SceneSlotConfig, type SceneSlotLayers, type SceneToAdapterOptions, SceneViewCanvas, type SceneViewCanvasProps, type SceneViewCull, type SceneViewDrawOne, type SceneViewLayers, type ScopedScene, type ScreenSlop, type SelectAdapter, type SelectFromLassoOptions, type SelectionHandleStyle, type SelectionHandlesLayerOpts, type SelectionMoveOptions, type SelectionOutlineLayerOpts, type SelectionOverlayLayerOpts, type SelectionOverlaySlotConfig, type SelectionRotateOptions, type SelectionStore, type SelectionTransformOptions, SerializedScene, type SetAnchorFieldParams, type SetChildOrderArgs, type SetDataArgs, type SetLayerArgs, type SetLayoutArgs, type SetPathArgs, type SetPathFields, type SetSelectionArgs, type SetTextArgs, type ShapeCoversPointOptions, type ShapeGenerator, type ShapeKind, type ShapeKindDescriptor, type ShapeKindsWhere, type ShownDeparture, type SiblingSlot, SliceDep, type SliceLeaf, type SlicePiece, type SliceScratch, type SliceableNode, type SnapCandidateMark, SnapCollect, SnapDep, SnapGesture, SnapMark, SnapMods, SnapOutcome, SnapProbeAt, SnapSource, SourceCandidate, type SpatialReference, type SpatialReferenceSources, type SpringPoseOptions, type StaggerSpringPoseOptions, type StandardSlotConfig, type StandardSlotName, type StarGenerator, type StarPoint, StickyStyle, type StrokeRegionOptions, type StylusData, type SurfaceContribution, type SurfaceSizeProps, SvgIngestOptions, SystemLayerSpec, TOOL_DRIVEN_ACTION_IDS, TargetTransform, TextOverflow, type ThresholdDragHandle, type ThresholdDragOptions, type Tool, type ToolDef, type ToolsApi, type TransformArgs, type TweenPoseOptions, UNION_OF_CHILDREN, type UseAlignOptions, type UseAlignReturn, type UseBoneToolOptions, type UseBooleansOptions, type UseBooleansReturn, type UseDistributeOptions, type UseDistributeReturn, type UseDragGestureOptions, type UseDragRadialOptions, type UseDragRectOptions, type UseEyedropperToolOptions, type UseHandToolOptions, type UseHandleDragOptions, type UseHandleDragReturn, type UseHostAnchorOptions, type UseHoverTrackingArgs, type UseImageToolOptions, type UseKeyStateOptions, type UseKeybindingsOptions, type UseLassoSelectOptions, type UseLassoToolOptions, type UseMeasureToolOptions, UseMoveOptions, type UseNodeOverlayFrameOptions, type UsePenToolOptions, type UsePointerStylusOptions, type UsePolygonToolOptions, type UsePoseRunOptions, UseResizeOptions, type UseResizePolicyOptions, type UseRigNodeOptions, type UseRotateOptions, type UseSceneOptions, type UseSceneTextEditOptions, type UseSceneTextEditReturn, type UseSceneTrivialOptions, type UseSelectToolOptions, type UseSelectionOptions, type UseSliceToolOptions, type UseStandardActionsOptions, type UseStarToolOptions, type UseStickyToolOptions, type UseToolsOptions, type UseWeightToolOptions, VERSION, type VelocityTracker, type VersionCheck, ViewAnimationOptions, type ViewAt, type ViewKitSettings, type ViewLike, type ViewPoseAdapter, type ViewRect, type ViewResolver, type ViewTarget, type ViewTransform, ViewportDims, type ViewportLayer, type ViewportZoomAnimateOptions, type ViewportZoomOptions, type VisibilityRules, WHEEL_ZOOM_STEP, type WarmRenderOptions, WeaselProvider, type WeaselProviderProps, type WeighedPath, type WeightEnv, type WheelInput, type WheelPanOptions, type WheelPanOpts, type WorkspaceTintLayerOptions, type WrittenPoseTargetOptions, type ZoomAxis, type ZoomBound, type ZoomClampOpts, type ZoomFactor, accentColorOf, actionIs, adjacentPage, alignDeltaFor, alignTargetBounds, always, anchorEditWouldChange, and, animateLifecycle, animateOnSetPose, annotationLayerIds, annulusSemiAxes, applyOpsTo, applyOutlineStroke, areaSelectAction, areaSelectContribution, arrangePreset, axisAlignedBounds, axisZoomFactor, bindPoseTransition, bindRig, buildChromeCtx, buildDebugOverlayCommands, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, checkRequirements, clampShapeGenerator, clampView, classifyPathStorage, clearSelectionAction, clipboardCopyAction, clipboardCutAction, clipboardPasteAction, clipboardPasteEventAction, cloneAction, coarsePointer, commitAnchorEdit, commitBooleanPieces, commitOps, composeAffordanceLayer, composeRectPose, composeRigidPose, composeSelectionPose, computeFitViewport, computeSliceOps, computeWheelAction, cond, contextMenuAction, coreKitSettingsSchema, createArrangeOp, createBoneOverlay, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDeleteOp, createDepartures, createHistory, createInsertOp, createKeyState, createLongPressFeedbackContribution, createMeasurements, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathEffectDerivations, createPathLayer, createPenPreviewLayer, createPointerFollower, createPoseFeed, createPoseOverrides, createPoseTarget, createRasterSession, createReflowTransition, createReorderOp, createReparentOp, createRigEditState, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetChildOrderOp, createSetDataOp, createSetHiddenOp, createSetLayerOp, createSetLayoutOp, createSetLockedOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createTextLayer, createTransformOp, createVelocityTracker, createViewResolver, createViewportLayer, createWeightOverlay, createWrittenPoseTarget, currentMeasureId, cycleFill, dataRestPath, debugSnapshotArgs, decomposeRectPose, decomposeRigidPose, defaultCommitAdapter, defaultDrawOne, defaultNodeProperties, defaultNodeRouting, defaultPaintBounds, defaultVisibilityRules, definesFrame, deleteAnchorsAction, deleteNode, deleteSelectedMark, depOf, derivedDepOf, derivedPartsOf, derivedPose, dispatchApplyBatch, documentPose, dragPanContribution, dragPointOf, drawnAABBOf, drawnBoundsOf, editAnchorsAction, editPreset, editTargetOf, editedPathSymmetries, editingAnchors, editingLayer, effectivePose, enterTextEditAction, enumerateAnchors, exitPathEditToolAction, findNodeShape, findShapeBounds, findShapeDrawnBounds, findShapeInk, findShapeSilhouette, fitToBounds, fitViewToPage, fitZoom, flattenPreviews, flipAction, focused, forEachCoalesced, forgetTransform, gateLayer, gatherSnapCandidates, gesturePlaneReader, gestureViewReader, gesturing, getAlpha01, getNodeShapes, getStylusData, glidesByDefault, groupNodeRouting, hasEditablePath, hidesSubtree, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, inPlane, inferredNodeProperties, inferredNodeRouting, ingestPreset, inkExtentsOf, insertAction, insertAt, insertLayer, insertPreviewExtent, insertRepositionAction, interpolateView, isAnnotationLayer, isAnnotationNode, isNodeHidden, isNodeLocked, isOverChildren, isShapeGenerator, joinPathsCommand, joinSelectedAnchors, kitTextHandler, lassoSelectAction, lastTransform, layoutPages, livePathEdit, locksInForce, makeHandleCommand, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markUnder, measureAt, measureBetween, measureEndSource, measureEndsOf, measureIds, measureNode, measurePose, measuredSegmentCommands, measurementOf, measurementsContribution, mergeAlphaFromPrev, mergeContributions, modeDecorationLayer, modeIn, modeIs, modeNot, modeTriggers, modifierHeld, momentum, moveAction, movePreset, multiActive, nestedHitTester, never, nodeGates, nodeOutline, normalizeView, normalizeZoom, not, nudgeAnchorsDownAction, nudgeAnchorsLeftAction, nudgeAnchorsRightAction, nudgeAnchorsUpAction, onEmptyCanvas, opFactoryRegistry, openContextMenu, openFilePicker, or, outlinePreset, overChildren, pageAt, pageOfBounds, pagesBounds, pagesLayer, paintAlpha, paintWithAlpha, paintWithColor, parseDebugFlags, pathCopy, pathEditPathOf, pathEditPreview, pathEditToolAction, pathEditToolActive, pathEffectNode, pathEffectOf, pathEffectParts, pathFromParts, pathNodesOf, pathOperationTags, pathOriginProjection, pathPoseDescriptor, pathSnapGlyph, pathSnapSource, pathsPreset, pickTopMostHit, pillCommands, pinchZoomAction, placeAction, placeSkeleton, placedRig, planJoin, planPixelRender, pointRegionFrame, pointSnap, poseAxes, pressureToWidth, rasterToPng, readEffectSource, rebuildOp, reconcileSpecs, recordTransform, regenerateShape, registerNodeShape, registerOpFactory, registeredOpNames, registeredPathEffects, releaseCanvasRenderer, renderDebugSnapshot, renderNeeds, renderSceneToCanvas, renderSceneToPixels, requiresAnchorSelection, reshapeOps, reshapeTo, resizeAction, resizePreset, resolveBooleanOperands, resolveEditablePathOf, resolveOverlays, resolvePreviews, resolveSpatialReference, resolveVisibility, resolvedSnapMarks, rigFromNode, rigidRigApply, rotateAction, rotateAroundAABBCenter, rotatePreset, rotationDegreesUnit, rotationHandle, rotationSnapSource, satisfiesRange, sceneClipTargets, sceneFromJSON, sceneNodeClientRect, scenePoseAdapter, scenePoseFrame, scenePoseTarget, sceneSelectionStore, sceneToAdapter, sceneUnitScopes, screenToWorld, screenTolerance, segmentUnder, selectAnchorAction, selectFromLasso, selectPreset, selectedPathNodes, selectionAtLeast, selectionEmpty, selectionIs, selectionLayer, selectionMoveBindings, selectionMoveContribution, selectionResizeBindings, selectionResizeContribution, selectionRotateBindings, selectionRotateContribution, selectionTransformBindings, selectionTransformContribution, settleShapeGenerator, shapeCoversPoint, shapeGeneratorOf, shapeGeneratorPath, sliceAction, slotOf, snapMods, snapSourcesFor, solid, splitOverChildren, springPose, stableStringify, staggerSpringPose, startThresholdDrag, stepAngles, storeEditablePath, strokeOf, strokeRegion, strokeWith, tickedSegment, toHex8, translateRectPose, tweenPose, unionAABB, unionBounds, unionOfChildren, unionOfChildrenVia, unplaceSkeleton, useAlign, useAnchorFields, useAnimatedReflow, useAutoCenter, useBoneTool, useBooleans, useBooleansAdapter, useBooleansAdapterSource, useCanvasSize, useCreateOutlinesAdapter, useDeviceProfile, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useElementSize, useEllipseTool, useEyedropperTool, useGradientKinds, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useIconGlyph, useIconRegistry, useIconVariant, useImageTool, useKeyModifiers, useKeyState, useKeybindings, useLassoTool, useLineTool, useMeasureTool, useNodeOverlayFrame, usePaintKind, usePaintKinds, usePenTool, usePencilTool, usePointerStylus, usePolygonTool, usePoseDescriptorDepSource, usePoseRun, usePoseTransition, useRectTool, useResizePolicy, useRig, useRigNode, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSliceDep, useSliceDepSource, useSliceTool, useSnapSource, useStandardActions, useStarTool, useStickyTool, useTextTool, useTools, useVelocityTracker, useWeightTool, viewPreset, viewToTransform, viewZoom, viewportDragPanAction, viewportWheelPanAction, viewportWorldRect, viewportZoomAction, warmRender, watchDevicePixelRatio, weighedPaths, wheelPan, wheelZoom, wheelZoomFactor, when, withAlpha01, withCoord, withPath, withPathEffectsRegistry, withoutShapeGenerator, workspaceTintLayer, worldPoseLookup, worldToScreen, zoomAt, zoomAtLeast };
|
|
11370
|
+
export { ANCHOR_HIT_BASE_PX, AREA_SELECT_ID, ActionsProviderIfRoot, AddNodeSpec, Affordance, AffordanceBinding, AffordanceRegion, type AffordanceRegionHit, type AimHeldViewProps, type AimOutline, type AimPoint, type AimSource, type AimSpace, type AlignAdapter, type AlignEdge, type AlignReference, type AnchorEdit, type AnchorFieldsApi, type AnchorHit, AnchorMarkerShape, type AnchorScratch, type AnchorState, type AnimateOnSetPoseOptions, type AnimatedReflow, type AnnotationFlag, type AnyTool, AreaSelectAdapter, type ArrangeArgs, type ArrangedPose, BUILTIN_TOOLS, BUILTIN_TOOL_IDS, type BaseFeature, type BendAlongEffect, type BindRigOptions, type BlendEffect, type BooleanCommitPiece, BooleanOp, BooleanOpOptions, BooleanOpResult, type BooleanOperands, type BooleanSource, BooleanStrokes, BooleansAdapter, BoundsConstraint, type BuildChromeCtxArgs, type BuiltinShapeToolId, type BuiltinToolId, type BuiltinToolOptions, CANVAS_CONTEXT_ATTRIBUTES, COMPOSITE_FEATURES, type CameraHeldViewProps, type CameraProps, CanvasDebugSink, type CanvasExtensionApi, type CanvasHelpers, type CanvasLayers, type CanvasProps, type CanvasRetainOptions, type CanvasSize, type CanvasSizeSnapshot, type CanvasSurfaceHelpers, CanvasView, type CanvasViewCamera, type CanvasViewCommonProps, type CanvasViewHandle, type CanvasViewHelpers, type CanvasViewProps, type CanvasViewState, type CarrySource, type ChildOrder, type ChromeCtx, type ChromeId, ChromeState, type ClampBounds, ClipboardSnapshot, type CoalescedCtx, CommonAffordanceScratch, type ComposeSelectionPoseOpts, type CompositeFeature, type ComputeSliceOpsArgs, type ComputeSliceResult, type Condition, ContentHandlerEntry, type Contribution, type ContributionChrome, type ContributionDepReader, type ContributionFrameCtx, type CoreIconName, type CoreKitTargetSettings, type CornerResizeAffordanceOptions, type CornerResizeScratch, type CreateChildrenLayerOpts, type CreateDebugOverlayLayerOpts, CreateOutlinesAdapter, type CreatePathEditingOverlayLayerOptions, type CreatePathLayerOpts, type CreatePenPreviewLayerOptions, type CreateTextLayerOpts, type CreateViewResolverOpts, type CreateViewportLayerOpts, CursorCoordsHud, type CursorCoordsHudProps, type CustomLayerEntry, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_FILL_COLOR, DEFAULT_HANDLE_SIZE, DEFAULT_INK, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_OVERLAY_STYLE, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SIMPLIFY_TOLERANCE, DEFAULT_SNAP_PX, DEFAULT_STROKE_COLOR, DRAG_PAN_ID, DRAW_TOOLS, DebugConfig, DebugSnapshot, DebugStrokes, DebugTheme, type DefaultTextData, type DeleteActionOptions, type DeleteArgs, DepRegistryProviderIfRoot, type Departures, DerivePathFn, DerivePoseFn, DerivedDep, type DerivedPart, DeviceProfileProvider, type DeviceProfileProviderProps, DevtoolsLabel, type DevtoolsLabelProps, Dims, type DistributeAdapter, type DistributeAxis, type DistributeMode, type DragGestureController, type DragGestureCtx, type DragGestureEndCtx, type DragGesturePhase, type DragGesturePoint, type DragHandleOptions, type DragPanParams, type DragPayload, type DragRadialController, type DragRadialCtx, type DragRadialEndCtx, type DragRadialPoint, type DragRadialState, type DragRectBounds, type DragRectController, type DragRectCtx, type DragRectEndCtx, type DragRectPoint, DrawCanvas, type DrawCanvasDraw, type DrawCanvasProps, type DrawnBoundsOptions, type DrawnBoundsScene, type DropZoneOptions, EditAnchorsDep, EditAnchorsParams, type EditableShape, type EditedLayerOf, type EditingDrawOne, type EffectItem, type EffectSource, type EffectSourceReader, FALLBACK_ACCENT, FEATURE_ACTION_IDS, type Feature, type FeatureBindingOptions, type FeatureEntry, type FeaturePreset, type FeedDelta, type FeedNode, FinishedEditFrame, FitViewToBoundsOptions, type FlipAxis, type FlipPivot, GHOST_STROKE, type GateLayerOptions, type GateSource, type GatedLayer, type GatedNode, type GatherSnapOptions, type GeneratedShape, GeometryProjection, GestureContext, type GesturePreviewSource, type GestureSource, HANDLE_BASE_PX, HANDLE_LOCK_ROLES, InertiaConfig as HandToolInertiaConfig, type HandleDragEnd, type HandleDragPoint, type HandleEdit, HandleLocks, type HandleScope, type HeadlessCanvasLike, type HostAnchorAlign, type HostAnchorInput, type HostAnchorOffset, type HostAnchorStyle, type HoverTracking, INSERT_REPOSITION_BINDING, IconRegistryProvider, IconRegistryProviderIfRoot, type IconRegistryProviderProps, InertiaConfig, InheritedPaint, type InkExtents, InsertAdapter, type InsertArgs, InsertBehavior, InsertNodeFactory, type InsertOp, type InsertOverlayStyle, InsertPaint, type InsertPreviewExtent, type InsertPreviewGeometry, type InsertPreviewLike, type InsertPreviewOverlay, type InsertToolOptions, type JoinPlan, KIT_SHAPE_KINDS, KIT_STANDARD_ACTION_IDS, KIT_VERSIONS, type KeyModifiers, type KeyState, type KeyStateAttachOptions, type KitInsertShape, type KitRequirements, type KitVersions, LONG_PRESS_FEEDBACK_ID, LassoHitMode, LassoSelectAdapter, LassoSelectBehavior, LayerEnumerableAdapter, LayerGroup, LayerHit, type LayerSlotValue, type LayersMap, LayoutDropTargetMode, LayoutFrame, type LayoutRef, LayoutStrategy, LeanSceneCanvas, type LeanSceneCanvasProps, type LifecycleAdapter, type LifecycleAnimation, type LinePoint, type LivePathEditSpec, type LongPressFeedbackOptions, MEASURE_ACTION_IDS, MEASURE_AFFORDANCE_KIND, MEASURE_LAYER_ID, MOVE_NODES_REQUIRES, type MeasureCell, type MeasureData, type MeasureEnd, type MeasureEndSourceOptions, type MeasureHit, type MeasurePoint, type Measurement, type Measurements, type ModeTriggerHandlers, type MomentumOptions, MoveAdapter, MoveBehavior, type MoveToIndexArgs, type NestedHitOpts, type NestedHitTester, type NodeClientRect, type NodeFlagArgs, type NodeGates, type NodeInk, type NodeInkCtx, type NodeOverlayFrame, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type NodeSilhouetteCtx, OVERLAY_ROLE_STROKES, type OpFactory, type OpenFilePickerOptions, type OpsApplier, OrderedAdapter, OriginProjection, type OutlineStrokeResult, type Overlay, type OverlayPoint, type OverlayVisibilityId, PAGES_DOC_KEY, PAGE_TOOLS, PAINTED_CURSOR_LAYER_ID, PATHFINDER_STROKES, PATH_ANCHOR_CHROME_ID, PATH_EFFECT, PATH_EFFECT_DERIVATIONS, PATH_GESTURE_TAGS, PATH_SNAP_LABELS, type Page, type PageEditOptions, type PageLayoutOptions, type PagesDoc, type PagesLayerOptions, type PaintBoundsFn, PaintKindEntry, type PaintedSkins, PasteCtx, PasteOmission, type PathAnchor, type PathAnchorAffordanceOptions, PathEditExtension, type PathEditFrame, type PathEditHost, PathEditMark, type PathEditOpening, type PathEditPreview, PathEditTarget, type PathEditingOverlaySlotConfig, type PathEditingOverlayStyle, type PathEffect, type PathEffectDerivations, type PathEffectOptions, type PathGestureFamily, type PathNode, PathPaint, type PathSnapSourceOptions, type PathStorageKind, PathSymmetryDep, type PenContinuation, type PenPreviewStyle, type PenScratch, type PenSubpath, type PencilPoint, PickHud, type PickHudProps, type PickSlop, type PickTopMostHitAdapter, type PinchZoomOptions, type PixelRenderPlan, type PlacedNode, type PlacedPage, PlaneMap, type PointSnap, type PointerFollower, PointerProviderIfRoot, type PointerSample, type PointerStylusState, type PolygonGenerator, type PolygonPoint, PoseAdapter, type PoseAnimationAdapter, type PoseCascade, PoseComposition, PoseDescriptor, type PoseFeed, type PoseFrame, PoseOverrides, PoseRemoval, type PoseRun, type PoseRunCtx, type PoseRunStep, type PoseSource, type PoseTargetOptions, type PoseTargetScene, type PoseTransitionScene, type PoseTransitionSeat, PoseWrite, type PosedNode, type PressureToWidthOptions, type PreviewNode, RECT_POSE_COMPOSITION, RIGID_POSE_COMPOSITION, ROTATION_HANDLE_BASE_PX, type RasterImage, type RasterRenderArgs, type RasterSession, type RasterSessionOptions, type RectAim, RectPose, RedrawSource, type ReflowScene, ReflowTransition, type ReflowTransitionOptions, type RegisterNodeShapeOptions, RegisteredOp, type RenderDebugSnapshotArgs, RenderLayer, type RenderNeeds, type RenderSceneToCanvasArgs, type RenderSceneToPixelsArgs, type ReorderArgs, type ReorderDirection, type ReorderRestoreEntry, type ReparentArgs, type RepeatAlongEffect, type RepeatableTransform, type RequirementMismatch, type ResizeActionOptions, ResizeAdapter, ResizeHandleLayout, type ResolvableView, type ResolvedOverlay, type RestPath, type Rig, type RigApply, type RigApplyContext, type RigNodeData, type RigNodeParts, type RigNodeSource, type RigScene, RotateAdapter, RotateBehavior, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, type RoutedNode, SCENE_CANVAS_FEATURES, SELECTION_MOVE_ID, SELECTION_RESIZE_ID, SELECTION_ROTATE_ID, SELECTION_TRANSFORM_ID, SELECT_TOOLS, SHAPE_COUNT_RANGE, SHAPE_KINDS, SHAPE_TOOLS, SNAP_ANGLE_STEP, SNAP_AXIS_STEP, SNAP_ROLES, STAR_RATIO_RANGE, Scene, type SceneAdapterSelection, SceneArrivalRefused, SceneCanvas, type SceneCanvasAdapter, type SceneCanvasApi, type SceneCanvasGeometry, type SceneCanvasHit, type SceneCanvasLayers, type SceneCanvasLongPress, type SceneCanvasProps, SceneCanvasSnap, type SceneCanvasViewport, type SceneClipTargetsOptions, Node as SceneNode, type SceneNodeClientRectOpts, ScenePoseReports, SceneRegistry, type SceneSlotConfig, type SceneSlotLayers, type SceneToAdapterOptions, SceneViewCanvas, type SceneViewCanvasProps, type SceneViewCull, type SceneViewDrawOne, type SceneViewLayers, type ScopedScene, type ScreenSlop, type SelectAdapter, type SelectFromLassoOptions, type SelectionHandleStyle, type SelectionHandlesLayerOpts, type SelectionMoveOptions, type SelectionOutlineLayerOpts, type SelectionOverlayLayerOpts, type SelectionOverlaySlotConfig, type SelectionRotateOptions, type SelectionStore, type SelectionTransformOptions, SerializedScene, type SetAnchorFieldParams, type SetChildOrderArgs, type SetDataArgs, type SetDependsOnArgs, type SetLayerArgs, type SetLayoutArgs, type SetPathArgs, type SetPathFields, type SetSelectionArgs, type SetTextArgs, type ShapeCoversPointOptions, type ShapeGenerator, type ShapeKind, type ShapeKindDescriptor, type ShapeKindsWhere, type ShownDeparture, type SiblingSlot, SliceDep, type SliceLeaf, type SlicePiece, type SliceScratch, type SliceableNode, type SnapCandidateMark, SnapCollect, SnapDep, SnapGesture, SnapMark, SnapMods, SnapOutcome, SnapOutcomeStore, SnapProbeAt, SnapReadoutStyle, SnapSource, SourceCandidate, type SpatialReference, type SpatialReferenceSources, type SpringPoseOptions, type StaggerSpringPoseOptions, type StandardSlotConfig, type StandardSlotName, type StarGenerator, type StarPoint, StickyStyle, type StrokeRegionOptions, type StylusData, type SurfaceContribution, type SurfaceSizeProps, SvgIngestOptions, SystemLayerSpec, TOOL_DRIVEN_ACTION_IDS, TYPE_TOOLS, TargetTransform, type TextAlongEffect, TextOverflow, type ThresholdDragHandle, type ThresholdDragOptions, type Tool, type ToolDef, type ToolsApi, type TransformArgs, TransformFollower, type TweenPoseOptions, UNION_OF_CHILDREN, type UseAlignOptions, type UseAlignReturn, type UseBooleansOptions, type UseBooleansReturn, type UseDistributeOptions, type UseDistributeReturn, type UseDragGestureOptions, type UseDragRadialOptions, type UseDragRectOptions, type UseEyedropperToolOptions, type UseHandToolOptions, type UseHandleDragOptions, type UseHandleDragReturn, type UseHostAnchorOptions, type UseHoverTrackingArgs, type UseImageToolOptions, type UseKeyStateOptions, type UseKeybindingsOptions, type UseLassoSelectOptions, type UseLassoToolOptions, type UseMeasureToolOptions, UseMoveOptions, type UseNodeOverlayFrameOptions, type UsePenToolOptions, type UsePointerStylusOptions, type UsePolygonToolOptions, type UsePoseRunOptions, UseResizeOptions, type UseResizePolicyOptions, type UseRigNodeOptions, type UseRotateOptions, type UseSceneOptions, type UseSceneTextEditOptions, type UseSceneTextEditReturn, type UseSceneTrivialOptions, type UseSelectToolOptions, type UseSelectionOptions, type UseSliceToolOptions, type UseStandardActionsOptions, type UseStarToolOptions, type UseStickyToolOptions, type UseToolsOptions, VERSION, VIEW_MARKER_DEFAULT_STYLE, VIEW_MARKER_DRAG, VIEW_MARKER_HIT_SLOP_PX, VIEW_TOOLS, type VelocityTracker, type VersionCheck, type ViewAim, ViewAnimationOptions, type ViewAt, type ViewKitSettings, type ViewLike, ViewMarker, type ViewMarkerGrab, type ViewMarkerHost, type ViewMarkerProps, type ViewMarkerStyle, type ViewPoseAdapter, type ViewRect, type ViewResolver, type ViewTarget, type ViewTransform, ViewportDims, type ViewportLayer, type ViewportZoomAnimateOptions, type ViewportZoomOptions, type VisibilityRules, WHEEL_ZOOM_STEP, type WarmRenderOptions, WeaselProvider, type WeaselProviderProps, type WheelInput, type WheelPanOptions, type WheelPanOpts, type WorkspaceTintLayerOptions, type WrittenNode, type WrittenPoseTargetOptions, type ZoomAxis, type ZoomBound, type ZoomClampOpts, type ZoomFactor, accentColorOf, actionIs, addPage, adjacentPage, aimSpace2d, alignDeltaFor, alignTargetBounds, always, anchorEditWouldChange, and, animateLifecycle, animateOnSetPose, annotationLayerIds, annulusSemiAxes, applyOpsTo, applyOutlineStroke, areaSelectAction, areaSelectContribution, arrangePreset, assertSnapSourceIds, axisAlignedBounds, axisZoomFactor, bindPoseTransition, bindRig, buildChromeCtx, buildDebugOverlayCommands, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, carriedDescendants, checkRequirements, clampShapeGenerator, clampView, classifyPathStorage, clearSelectionAction, clipboardCopyAction, clipboardCutAction, clipboardPasteAction, clipboardPasteEventAction, cloneAction, coarsePointer, commitAnchorEdit, commitBooleanPieces, commitDeleteToScene, commitOps, composeAffordanceLayer, composeRectPose, composeRigidPose, composeSelectionPose, computeFitViewport, computeSliceOps, computeWheelAction, cond, contextMenuAction, coreKitSettingsSchema, createArrangeOp, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDeleteAction, createDeleteOp, createDepartures, createHistory, createInsertOp, createKeyState, createLongPressFeedbackContribution, createMeasurements, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathEffectDerivations, createPathLayer, createPenPreviewLayer, createPointerFollower, createPoseFeed, createPoseOverrides, createPoseTarget, createRasterSession, createReflowTransition, createReorderOp, createReparentOp, createResizeAction, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetChildOrderOp, createSetDataOp, createSetDependsOnOp, createSetHiddenOp, createSetLayerOp, createSetLayoutOp, createSetLockedOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createSnapReadoutLayer, createTextLayer, createTransformOp, createVelocityTracker, createViewMarkerContribution, createViewMarkerLayer, createViewResolver, createViewportLayer, createWrittenPoseTarget, currentMeasureId, cycleFill, dataRestPath, debugSnapshotArgs, decomposeRectPose, decomposeRigidPose, defaultCommitAdapter, defaultDrawOne, defaultNodeProperties, defaultNodeRouting, defaultPaintBounds, defaultVisibilityRules, definesFrame, deleteAction, deleteAnchorsAction, deleteNode, deleteSelectedMark, depOf, derivedDepOf, derivedPartsOf, derivedPose, dispatchApplyBatch, documentDepOf, documentPose, dragPanContribution, dragPointOf, drawnAABBOf, drawnBoundsOf, drawnBoundsScene, editAnchorsAction, editPreset, editTargetOf, editedPathSymmetries, editingAnchors, editingLayer, effectSourceFor, effectivePose, enterTextEditAction, enumerateAnchors, exitPathEditToolAction, findNodeShape, findShapeBounds, findShapeDrawnBounds, findShapeInk, findShapeSilhouette, finishPathEditFrame, fitToBounds, fitViewToPage, fitZoom, flattenPreviews, flipAction, focused, forEachCoalesced, forgetTransform, gateLayer, gatherSnapCandidates, gesturePlaneReader, gestureViewReader, gesturing, getAlpha01, getNodeShapes, getStylusData, glidesByDefault, grabViewMarker, groupNodeRouting, hasEditablePath, hiddenSourceDeleteOps, hiddenSourcesTakenWith, hidesSubtree, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, inPlane, inferredNodeProperties, inferredNodeRouting, ingestPreset, inheritedPaintIn, inkExtentsOf, insertAction, insertAt, insertLayer, insertPreviewExtent, insertRepositionAction, interpolateView, isAnnotationLayer, isAnnotationNode, isNodeHidden, isNodeLocked, isOverChildren, isRectAim, isShapeGenerator, joinPathsCommand, joinSelectedAnchors, kitTextHandler, lassoSelectAction, lastTransform, layoutPages, livePathEdit, locksInForce, makeHandleCommand, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markUnder, measureAt, measureBetween, measureEndSource, measureEndsOf, measureIds, measureNode, measurePose, measuredSegmentCommands, measurementOf, measurementsContribution, mergeAlphaFromPrev, mergeContributions, modeDecorationLayer, modeIn, modeIs, modeNot, modeTriggers, modifierHeld, momentum, moveAction, moveNodes, moveNodesOps, movePage, movePreset, multiActive, nestedHitTester, never, nextPageId, nodeGates, nodeOutline, normalizeView, normalizeZoom, not, noteFontRead, nudgeAnchorsDownAction, nudgeAnchorsLeftAction, nudgeAnchorsRightAction, nudgeAnchorsUpAction, onEmptyCanvas, opFactoryRegistry, openContextMenu, openFilePicker, or, outlinePreset, overChildren, pageAt, pageHolding, pageInView, pageMembers, pageName, pageOfBounds, pagesBounds, pagesLayer, pagesOf, paintAbove, paintAlpha, paintWithAlpha, paintWithColor, parseDebugFlags, pathCopy, pathEditPathOf, pathEditPreview, pathEditToolAction, pathEditToolActive, pathEffectNode, pathEffectOf, pathEffectParts, pathFromParts, pathNodesOf, pathOperationTags, pathOriginProjection, pathPoseDescriptor, pathSnapGlyph, pathSnapSource, pathsPreset, pickTopMostHit, pillCommands, pinchZoomAction, placeAction, placeSkeleton, placedPagesOf, planJoin, planPixelRender, pointRegionFrame, pointSnap, poseAxes, pressureToWidth, rasterToPng, readEffectSource, rebuildOp, reconcileSpecs, recordTransform, rectAim, regenerateShape, registerNodeShape, registerOpFactory, registeredOpNames, registeredPathEffects, releaseCanvasRenderer, removePage, renamePage, renderDebugSnapshot, renderNeeds, renderSceneToCanvas, renderSceneToPixels, requiresAnchorSelection, reshapeOps, reshapeTo, resizeAction, resizePage, resizePreset, resolveBooleanOperands, resolveEditablePathOf, resolveOverlays, resolvePartPaint, resolvePreviews, resolveSpatialReference, resolveVisibility, resolvedSnapMarks, rigFromNode, rigidRigApply, rotateAction, rotateAroundAABBCenter, rotatePreset, rotationDegreesUnit, rotationHandle, rotationSnapSource, routeKind, satisfiesRange, sceneCarrySource, sceneClipTargets, sceneFromJSON, sceneNodeClientRect, scenePoseAdapter, scenePoseFrame, scenePoseTarget, sceneSelectionStore, sceneSharedUnitScopes, sceneToAdapter, sceneUnitScopes, screenToWorld, screenTolerance, segmentUnder, selectAnchorAction, selectFromLasso, selectPreset, selectedPathNodes, selectionAtLeast, selectionEmpty, selectionIs, selectionLayer, selectionMoveBindings, selectionMoveContribution, selectionResizeBindings, selectionResizeContribution, selectionRotateBindings, selectionRotateContribution, selectionTransformBindings, selectionTransformContribution, setPages, settleShapeGenerator, shapeCoversPoint, shapeGeneratorOf, shapeGeneratorPath, sliceAction, slotOf, snapMods, snapSourcesFor, solid, splitOverChildren, springPose, staggerSpringPose, startThresholdDrag, stepAngles, storeEditablePath, strokeOf, strokeRegion, strokeWith, textAlongParts, tickedSegment, toHex8, translateRectPose, tweenPose, unionAABB, unionBounds, unionOfChildren, unionOfChildrenVia, unplaceSkeleton, useAlign, useAnchorFields, useAnimatedReflow, useAutoCenter, useBooleans, useBooleansAdapter, useBooleansAdapterSource, useCanvasSize, useCreateOutlinesAdapter, useDeviceProfile, useDevtoolsLabel, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEffectSourcesLayer, useElementSize, useEllipseTool, useEyedropperTool, useGradientKinds, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useIconGlyph, useIconRegistry, useIconVariant, useImageTool, useKeyModifiers, useKeyState, useKeybindings, useLassoTool, useLineTool, useMeasureTool, useNodeOverlayFrame, usePaintKind, usePaintKinds, usePenTool, usePencilTool, usePointerStylus, usePolygonTool, usePoseDescriptorDepSource, usePoseRun, usePoseTransition, useRectTool, useResizePolicy, useRig, useRigNode, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSliceDep, useSliceDepSource, useSliceTool, useSnapSource, useStandardActions, useStarTool, useStickyTool, useTextTool, useTools, useTransformFollower, useVelocityTracker, viewForAim, viewMarkerDragAction, viewPreset, viewToTransform, viewZoom, viewportDragPanAction, viewportWheelPanAction, viewportWorldRect, viewportZoomAction, warmRender, watchDevicePixelRatio, wheelPan, wheelZoom, wheelZoomFactor, when, withAlpha01, withCoord, withInheritedPaints, withPath, withPathEffectsRegistry, withoutShapeGenerator, workspaceTintLayer, worldPoseLookup, worldToScreen, writtenBy, zoomAt, zoomAtLeast };
|