@weasel-js/core 1.13.0 → 1.14.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 +300 -0
- package/README.md +8 -12
- package/dist/affordances/hitAffordanceRegions.js +1 -1
- package/dist/affordances/hitAffordanceRegions.js.map +1 -1
- package/dist/affordances/pathAnchors.js.map +1 -1
- package/dist/animation/clipTargets.js +1 -1
- package/dist/animation/clipTargets.js.map +1 -1
- package/dist/animation/poseTarget.js +5 -32
- package/dist/animation/poseTarget.js.map +1 -1
- package/dist/{autoPoseDescriptor-CZ1eXbzY.d.ts → autoPoseDescriptor-C25QVb0W.d.ts} +1 -1
- package/dist/barrel/canvas.js +8 -8
- package/dist/barrel/chrome.js +9 -9
- package/dist/barrel/input.js +1 -1
- package/dist/barrel/interactions.js +3 -3
- package/dist/barrel/paint.js +2 -2
- package/dist/barrel/paths.js +19 -17
- package/dist/barrel/renderer.js +11 -7
- package/dist/barrel/routing.js +4 -1
- package/dist/barrel/scene.js +16 -12
- package/dist/barrel/text.js +5 -5
- package/dist/barrel/viewport.js +8 -8
- package/dist/canvas/Canvas.js +2 -2
- package/dist/canvas/Canvas.js.map +1 -1
- package/dist/canvas/CanvasView.js +20 -14
- package/dist/canvas/CanvasView.js.map +1 -1
- package/dist/canvas/GestureReason.js +64 -0
- package/dist/canvas/GestureReason.js.map +1 -0
- package/dist/canvas/GestureReason.module.js +7 -0
- package/dist/canvas/GestureReason.module.js.map +1 -0
- package/dist/canvas/LeanSceneCanvas.js +3 -1
- package/dist/canvas/LeanSceneCanvas.js.map +1 -1
- package/dist/canvas/NodeShape.js +2 -0
- package/dist/canvas/NodeShape.js.map +1 -1
- package/dist/canvas/PickHud.js +7 -3
- package/dist/canvas/PickHud.js.map +1 -1
- package/dist/canvas/SceneCanvas/CanvasKitProviders.js +1 -1
- package/dist/canvas/SceneCanvas/CanvasKitProviders.js.map +1 -1
- package/dist/canvas/SceneCanvas/DevHuds.js +2 -2
- package/dist/canvas/SceneCanvas/DevHuds.js.map +1 -1
- package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js +4 -2
- package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js.map +1 -1
- package/dist/canvas/SceneCanvas/SceneCanvasInput.js +3 -1
- package/dist/canvas/SceneCanvas/SceneCanvasInput.js.map +1 -1
- package/dist/canvas/SceneCanvas/brushOverlay.js.map +1 -1
- package/dist/canvas/SceneCanvas/builtinToolSets.js +17 -9
- package/dist/canvas/SceneCanvas/builtinToolSets.js.map +1 -1
- package/dist/canvas/SceneCanvas/canvasPassThrough.js +2 -1
- package/dist/canvas/SceneCanvas/canvasPassThrough.js.map +1 -1
- package/dist/canvas/SceneCanvas/defaultNodeProperties.js +75 -19
- package/dist/canvas/SceneCanvas/defaultNodeProperties.js.map +1 -1
- package/dist/canvas/SceneCanvas/defaultNodeRouting.js +7 -1
- package/dist/canvas/SceneCanvas/defaultNodeRouting.js.map +1 -1
- package/dist/canvas/SceneCanvas/defaultTextEditor.js +108 -0
- package/dist/canvas/SceneCanvas/defaultTextEditor.js.map +1 -0
- package/dist/canvas/SceneCanvas/describePresets.js +47 -0
- package/dist/canvas/SceneCanvas/describePresets.js.map +1 -0
- package/dist/canvas/SceneCanvas/features.js +57 -16
- package/dist/canvas/SceneCanvas/features.js.map +1 -1
- package/dist/canvas/SceneCanvas/mergeLayers.js +10 -1
- package/dist/canvas/SceneCanvas/mergeLayers.js.map +1 -1
- package/dist/canvas/SceneCanvas/namedPresets.js +52 -24
- package/dist/canvas/SceneCanvas/namedPresets.js.map +1 -1
- package/dist/canvas/SceneCanvas/presets/arrange.js +35 -10
- package/dist/canvas/SceneCanvas/presets/arrange.js.map +1 -1
- package/dist/canvas/SceneCanvas/presets/baseline.js +9 -0
- package/dist/canvas/SceneCanvas/presets/baseline.js.map +1 -0
- package/dist/canvas/SceneCanvas/presets/chrome.js.map +1 -1
- package/dist/canvas/SceneCanvas/presets/composites.js +43 -0
- package/dist/canvas/SceneCanvas/presets/composites.js.map +1 -0
- package/dist/canvas/SceneCanvas/presets/edit.js +79 -26
- package/dist/canvas/SceneCanvas/presets/edit.js.map +1 -1
- package/dist/canvas/SceneCanvas/presets/ingest.js +1 -0
- package/dist/canvas/SceneCanvas/presets/ingest.js.map +1 -1
- package/dist/canvas/SceneCanvas/presets/paths.js +58 -16
- package/dist/canvas/SceneCanvas/presets/paths.js.map +1 -1
- package/dist/canvas/SceneCanvas/presets/select.js +4 -2
- package/dist/canvas/SceneCanvas/presets/select.js.map +1 -1
- package/dist/canvas/SceneCanvas/presets/tools.js +24 -0
- package/dist/canvas/SceneCanvas/presets/tools.js.map +1 -0
- package/dist/canvas/SceneCanvas/presets/transform.js +4 -0
- package/dist/canvas/SceneCanvas/presets/transform.js.map +1 -1
- package/dist/canvas/SceneCanvas/presets/view.js +3 -1
- package/dist/canvas/SceneCanvas/presets/view.js.map +1 -1
- package/dist/canvas/SceneCanvas/props.js.map +1 -1
- package/dist/canvas/SceneCanvas/shapeGeneratorProperties.js +1 -1
- package/dist/canvas/SceneCanvas/shapeGeneratorProperties.js.map +1 -1
- package/dist/canvas/SceneCanvas/toolRegistry.js +5 -4
- package/dist/canvas/SceneCanvas/toolRegistry.js.map +1 -1
- package/dist/canvas/SceneCanvas/useCanvasTools.js +26 -10
- package/dist/canvas/SceneCanvas/useCanvasTools.js.map +1 -1
- package/dist/canvas/SceneCanvas/useContributionRoles.js +15 -2
- package/dist/canvas/SceneCanvas/useContributionRoles.js.map +1 -1
- package/dist/canvas/SceneCanvas/useDepartureGhostLayer.js +5 -4
- package/dist/canvas/SceneCanvas/useDepartureGhostLayer.js.map +1 -1
- package/dist/canvas/SceneCanvas/useDispatcherOverlayLayer.js +1 -1
- package/dist/canvas/SceneCanvas/useNodeAtPoint.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneCanvasLayers.js +9 -8
- package/dist/canvas/SceneCanvas/useSceneCanvasLayers.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneCanvasPathEdit.js +2 -2
- package/dist/canvas/SceneCanvas/useSceneCanvasPathEdit.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneCanvasTools.js +4 -1
- package/dist/canvas/SceneCanvas/useSceneCanvasTools.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneChrome.js +7 -4
- package/dist/canvas/SceneCanvas/useSceneChrome.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneGestureDispatcher.js +9 -9
- package/dist/canvas/SceneCanvas/useSceneGestureDispatcher.js.map +1 -1
- package/dist/canvas/SceneCanvas/useScenePicking.js +4 -7
- package/dist/canvas/SceneCanvas/useScenePicking.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneRedrawSources.js +2 -1
- package/dist/canvas/SceneCanvas/useSceneRedrawSources.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneSelectTool.js +6 -6
- package/dist/canvas/SceneCanvas/useSceneSelectTool.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneStandardActions.js +2 -2
- package/dist/canvas/SceneCanvas/useSceneStandardActions.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSelectionOverlayLayer.js +1 -1
- package/dist/canvas/SceneCanvas/useSelectionOverlayLayer.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSurfaceViewInputs.js.map +1 -1
- package/dist/canvas/SceneCanvas/useToolKeybindings.js +2 -2
- package/dist/canvas/SceneCanvas/useToolKeybindings.js.map +1 -1
- package/dist/canvas/SceneCanvas/useViewportActions.js +5 -2
- package/dist/canvas/SceneCanvas/useViewportActions.js.map +1 -1
- package/dist/canvas/SceneCanvas/worldPointAt.js.map +1 -1
- package/dist/canvas/SceneCanvas.js +22 -11
- package/dist/canvas/SceneCanvas.js.map +1 -1
- package/dist/canvas/SceneViewCanvas.js +1 -0
- package/dist/canvas/SceneViewCanvas.js.map +1 -1
- package/dist/canvas/ViewMarker.js.map +1 -1
- package/dist/canvas/accentColor.js +14 -1
- package/dist/canvas/accentColor.js.map +1 -1
- package/dist/canvas/affordanceAt.js +2 -2
- package/dist/canvas/affordanceAt.js.map +1 -1
- package/dist/canvas/buildSceneTree.js +5 -3
- package/dist/canvas/buildSceneTree.js.map +1 -1
- package/dist/canvas/deps/editAnchors.js +4 -4
- package/dist/canvas/deps/editAnchors.js.map +1 -1
- package/dist/canvas/deps/enteredGroup.js +14 -5
- package/dist/canvas/deps/enteredGroup.js.map +1 -1
- package/dist/canvas/deps/ingestion.js +5 -1
- package/dist/canvas/deps/ingestion.js.map +1 -1
- package/dist/canvas/deps/insert.js.map +1 -1
- package/dist/canvas/deps/insertSite.js +5 -3
- package/dist/canvas/deps/insertSite.js.map +1 -1
- package/dist/canvas/deps/nodeAtPoint.js +1 -12
- package/dist/canvas/deps/nodeAtPoint.js.map +1 -1
- package/dist/canvas/deps/pathEditCommits.js +3 -3
- package/dist/canvas/deps/pathEditCommits.js.map +1 -1
- package/dist/canvas/deps/slice.js +16 -2
- package/dist/canvas/deps/slice.js.map +1 -1
- package/dist/canvas/deps/snap.js +5 -5
- package/dist/canvas/deps/snap.js.map +1 -1
- package/dist/canvas/deps/textEdit.js +5 -6
- package/dist/canvas/deps/textEdit.js.map +1 -1
- package/dist/canvas/derivedPath.js +8 -3
- package/dist/canvas/derivedPath.js.map +1 -1
- package/dist/canvas/getNodeAtPoint.js +2 -2
- package/dist/canvas/getNodeAtPoint.js.map +1 -1
- package/dist/canvas/insertPreviewExtent.js.map +1 -1
- package/dist/canvas/layerSlots.js.map +1 -1
- package/dist/canvas/nodeShapes/measurePainter.js +1 -1
- package/dist/canvas/nodeShapes/measurePainter.js.map +1 -1
- package/dist/canvas/nodeShapes/strokedBounds.js +5 -3
- package/dist/canvas/nodeShapes/strokedBounds.js.map +1 -1
- package/dist/canvas/overlayRoleStrokes.js +6 -0
- package/dist/canvas/overlayRoleStrokes.js.map +1 -1
- package/dist/canvas/pickIndex/scenePickIndex.js +10 -12
- package/dist/canvas/pickIndex/scenePickIndex.js.map +1 -1
- package/dist/canvas/sceneAdapter.js +10 -19
- package/dist/canvas/sceneAdapter.js.map +1 -1
- package/dist/canvas/sceneClipboard.js +17 -4
- package/dist/canvas/sceneClipboard.js.map +1 -1
- package/dist/canvas/sceneViewRender.js +3 -2
- package/dist/canvas/sceneViewRender.js.map +1 -1
- package/dist/canvas/surfaceContribution.js.map +1 -1
- package/dist/canvas/useCanvasPaint.js +10 -4
- package/dist/canvas/useCanvasPaint.js.map +1 -1
- package/dist/canvas/useHitObserver.js +1 -1
- package/dist/canvas/useHitObserver.js.map +1 -1
- package/dist/canvas/useViewAim.js +1 -1
- package/dist/canvas/useViewAim.js.map +1 -1
- package/dist/canvas/useViewHelpers.js +8 -5
- package/dist/canvas/useViewHelpers.js.map +1 -1
- package/dist/canvas/useViewNesting.js +39 -12
- package/dist/canvas/useViewNesting.js.map +1 -1
- package/dist/canvas/viewInputs.js.map +1 -1
- package/dist/canvas/viewMarkers.js +2 -2
- package/dist/canvas/viewMarkers.js.map +1 -1
- package/dist/canvas/viewRegistry.js +2 -2
- package/dist/canvas/viewRegistry.js.map +1 -1
- package/dist/canvas/viewSnap.js +67 -0
- package/dist/canvas/viewSnap.js.map +1 -0
- package/dist/clipboard.d.ts +6 -12
- package/dist/{clone-qb2e1F5p.d.ts → clone-Bz4iqGfE.d.ts} +10 -5
- package/dist/clone.d.ts +5 -5
- package/dist/core/geometry/booleanOfPaths.js +23 -0
- package/dist/core/geometry/booleanOfPaths.js.map +1 -0
- package/dist/core/geometry/pathPoseDescriptor.js +12 -9
- package/dist/core/geometry/pathPoseDescriptor.js.map +1 -1
- package/dist/core/geometry/poseDescriptor.js +12 -3
- package/dist/core/geometry/poseDescriptor.js.map +1 -1
- package/dist/core/geometry/targetFrame.js +2 -13
- package/dist/core/geometry/targetFrame.js.map +1 -1
- package/dist/core/layers/render.js +2 -1
- package/dist/core/layers/render.js.map +1 -1
- package/dist/core/layers/retain.js +5 -3
- package/dist/core/layers/retain.js.map +1 -1
- package/dist/core/ops/setPath.js +3 -0
- package/dist/core/ops/setPath.js.map +1 -1
- package/dist/core/paint/meshKindLazy.js.map +1 -1
- package/dist/core/paint/paintKindEntry.js.map +1 -1
- package/dist/core/paint/paintKinds.js +8 -1
- package/dist/core/paint/paintKinds.js.map +1 -1
- package/dist/core/scene/NodeProperties.js.map +1 -1
- package/dist/core/scene/NodeRouting.js.map +1 -1
- package/dist/core/scene/booleanGroup.js +33 -0
- package/dist/core/scene/booleanGroup.js.map +1 -0
- package/dist/core/scene/booleanOfChildren.js +53 -0
- package/dist/core/scene/booleanOfChildren.js.map +1 -0
- package/dist/core/scene/carryDescendants.js +18 -6
- package/dist/core/scene/carryDescendants.js.map +1 -1
- package/dist/core/scene/composeFrame.js +42 -5
- package/dist/core/scene/composeFrame.js.map +1 -1
- package/dist/core/scene/composePose.js +35 -16
- package/dist/core/scene/composePose.js.map +1 -1
- package/dist/core/scene/depMemo.js +36 -18
- package/dist/core/scene/depMemo.js.map +1 -1
- package/dist/core/scene/derivedParts.js +2 -23
- package/dist/core/scene/derivedParts.js.map +1 -1
- package/dist/core/scene/effectivePose.js +10 -0
- package/dist/core/scene/effectivePose.js.map +1 -1
- package/dist/core/scene/historyForm.js +5 -4
- package/dist/core/scene/historyForm.js.map +1 -1
- package/dist/core/scene/kitOps.js +5 -71
- package/dist/core/scene/kitOps.js.map +1 -1
- package/dist/core/scene/kitRegistry.js +5 -0
- package/dist/core/scene/kitRegistry.js.map +1 -1
- package/dist/core/scene/layerOps.js +82 -0
- package/dist/core/scene/layerOps.js.map +1 -0
- package/dist/core/scene/layoutPass.js +14 -12
- package/dist/core/scene/layoutPass.js.map +1 -1
- package/dist/core/scene/lockGuard.js +9 -3
- package/dist/core/scene/lockGuard.js.map +1 -1
- package/dist/core/scene/nestedHit.js +5 -5
- package/dist/core/scene/nestedHit.js.map +1 -1
- package/dist/core/scene/nodeFlags.js +8 -2
- package/dist/core/scene/nodeFlags.js.map +1 -1
- package/dist/core/scene/nodeGates.js +31 -2
- package/dist/core/scene/nodeGates.js.map +1 -1
- package/dist/core/scene/pathEffects/effects.js +22 -3
- package/dist/core/scene/pathEffects/effects.js.map +1 -1
- package/dist/core/scene/pathEffects/textAlong.js +16 -3
- package/dist/core/scene/pathEffects/textAlong.js.map +1 -1
- package/dist/core/scene/pathEffects/textAlongBands.js +65 -0
- package/dist/core/scene/pathEffects/textAlongBands.js.map +1 -0
- package/dist/core/scene/reconcileSpecs.js +1 -1
- package/dist/core/scene/reconcileSpecs.js.map +1 -1
- package/dist/core/scene/scene.js +11 -5
- package/dist/core/scene/scene.js.map +1 -1
- package/dist/core/scene/sceneEdits.js +5 -2
- package/dist/core/scene/sceneEdits.js.map +1 -1
- package/dist/core/scene/scenePoseAdapter.js +10 -1
- package/dist/core/scene/scenePoseAdapter.js.map +1 -1
- package/dist/core/scene/scrollOffsets.js +93 -0
- package/dist/core/scene/scrollOffsets.js.map +1 -0
- package/dist/core/scene/serialization.js +15 -5
- package/dist/core/scene/serialization.js.map +1 -1
- package/dist/core/scene/statedFields.js +2 -1
- package/dist/core/scene/statedFields.js.map +1 -1
- package/dist/core/scene/strategyView.js +35 -0
- package/dist/core/scene/strategyView.js.map +1 -0
- package/dist/core/scene/types.js.map +1 -1
- package/dist/core/scene/useScene.js +2 -0
- package/dist/core/scene/useScene.js.map +1 -1
- package/dist/core/scene/worldSave.js +87 -0
- package/dist/core/scene/worldSave.js.map +1 -0
- package/dist/core/selection/selectionTarget.js +1 -1
- package/dist/core/selection/selectionTarget.js.map +1 -1
- package/dist/{cornerHandles-CNCb7aTY.d.ts → cornerHandles-DpmQM_z5.d.ts} +1 -1
- package/dist/{depSchema-CpIQzKWQ.d.ts → depSchema-C3BwxitB.d.ts} +119 -99
- package/dist/devtools-protocol.d.ts +2 -2
- package/dist/devtools.d.ts +2 -2
- package/dist/{features → domains}/chrome-caps/buildChromeCtx.js +1 -1
- package/dist/domains/chrome-caps/buildChromeCtx.js.map +1 -0
- package/dist/{features → domains}/chrome-caps/conditions.js +1 -1
- package/dist/domains/chrome-caps/conditions.js.map +1 -0
- package/dist/{features → domains}/chrome-caps/defaults.js +1 -1
- package/dist/domains/chrome-caps/defaults.js.map +1 -0
- package/dist/{features → domains}/chrome-caps/resolve.js +1 -1
- package/dist/domains/chrome-caps/resolve.js.map +1 -0
- package/dist/{features → domains}/chrome-caps/useChromeCaps.js +1 -1
- package/dist/domains/chrome-caps/useChromeCaps.js.map +1 -0
- package/dist/{features → domains}/chrome-caps/useHoverTracking.js +1 -1
- package/dist/domains/chrome-caps/useHoverTracking.js.map +1 -0
- package/dist/{features → domains}/ingestion/contentHandlers.js +20 -3
- package/dist/domains/ingestion/contentHandlers.js.map +1 -0
- package/dist/domains/ingestion/ghost.js +56 -0
- package/dist/domains/ingestion/ghost.js.map +1 -0
- package/dist/{features → domains}/ingestion/imageHandler.js +1 -1
- package/dist/domains/ingestion/imageHandler.js.map +1 -0
- package/dist/domains/ingestion/kitHandlers.js +22 -0
- package/dist/domains/ingestion/kitHandlers.js.map +1 -0
- package/dist/{features → domains}/ingestion/openFilePicker.js +1 -1
- package/dist/domains/ingestion/openFilePicker.js.map +1 -0
- package/dist/{features → domains}/ingestion/placement.js +1 -1
- package/dist/domains/ingestion/placement.js.map +1 -0
- package/dist/{features → domains}/ingestion/svgHandler.js +1 -1
- package/dist/domains/ingestion/svgHandler.js.map +1 -0
- package/dist/{features → domains}/ingestion/textHandler.js +9 -7
- package/dist/domains/ingestion/textHandler.js.map +1 -0
- package/dist/{features → domains}/ingestion/useCanvasIngestion.js +13 -15
- package/dist/domains/ingestion/useCanvasIngestion.js.map +1 -0
- package/dist/{features → domains}/ingestion/weaselJsonHandler.js +1 -1
- package/dist/domains/ingestion/weaselJsonHandler.js.map +1 -0
- package/dist/{features → domains}/longPress/longPressFeedback.js +1 -1
- package/dist/domains/longPress/longPressFeedback.js.map +1 -0
- package/dist/{features → domains}/measure/actionIds.js +1 -1
- package/dist/domains/measure/actionIds.js.map +1 -0
- package/dist/{features → domains}/measure/measureCommands.js +1 -1
- package/dist/domains/measure/measureCommands.js.map +1 -0
- package/dist/{features → domains}/measure/measureContribution.js +1 -1
- package/dist/domains/measure/measureContribution.js.map +1 -0
- package/dist/{features → domains}/measure/measureEdits.js +1 -1
- package/dist/domains/measure/measureEdits.js.map +1 -0
- package/dist/{features → domains}/measure/measureGestures.js +4 -7
- package/dist/domains/measure/measureGestures.js.map +1 -0
- package/dist/{features → domains}/measure/measureHit.js +1 -1
- package/dist/domains/measure/measureHit.js.map +1 -0
- package/dist/{features → domains}/measure/measureLayer.js +1 -1
- package/dist/domains/measure/measureLayer.js.map +1 -0
- package/dist/{features → domains}/measure/measurement.js +1 -1
- package/dist/domains/measure/measurement.js.map +1 -0
- package/dist/{features → domains}/measure/measurements.js +2 -2
- package/dist/domains/measure/measurements.js.map +1 -0
- package/dist/{features → domains}/modes/modeLayers.js +1 -1
- package/dist/domains/modes/modeLayers.js.map +1 -0
- package/dist/{features → domains}/modes/modeTriggers.js +3 -6
- package/dist/domains/modes/modeTriggers.js.map +1 -0
- package/dist/{features → domains}/pathEffects/effectSources.js +1 -1
- package/dist/domains/pathEffects/effectSources.js.map +1 -0
- package/dist/{features → domains}/pathEffects/index.js +1 -1
- package/dist/domains/pathEffects/index.js.map +1 -0
- package/dist/{features → domains}/pathEffects/readSource.js +1 -1
- package/dist/domains/pathEffects/readSource.js.map +1 -0
- package/dist/{features → domains}/pathEffects/textItems.js +11 -2
- package/dist/domains/pathEffects/textItems.js.map +1 -0
- package/dist/{features → domains}/pathEffects/useEffectSourcesLayer.js +1 -1
- package/dist/domains/pathEffects/useEffectSourcesLayer.js.map +1 -0
- package/dist/{features → domains}/paths/anchorData.js +1 -1
- package/dist/domains/paths/anchorData.js.map +1 -0
- package/dist/{features → domains}/paths/anchorMarkers.js +9 -7
- package/dist/domains/paths/anchorMarkers.js.map +1 -0
- package/dist/{features → domains}/paths/editablePath.js +1 -1
- package/dist/domains/paths/editablePath.js.map +1 -0
- package/dist/{features → domains}/paths/index.js +3 -3
- package/dist/{features → domains}/paths/originProjection.js +1 -1
- package/dist/domains/paths/originProjection.js.map +1 -0
- package/dist/{features → domains}/paths/pathEditExtension.js +1 -1
- package/dist/domains/paths/pathEditExtension.js.map +1 -0
- package/dist/{features → domains}/paths/pathEditState.js +1 -1
- package/dist/domains/paths/pathEditState.js.map +1 -0
- package/dist/{features → domains}/paths/pathEditingOverlayLayer.js +1 -1
- package/dist/domains/paths/pathEditingOverlayLayer.js.map +1 -0
- package/dist/{features → domains}/paths/pathLayer.js +1 -1
- package/dist/domains/paths/pathLayer.js.map +1 -0
- package/dist/{features → domains}/paths/pathRepresentation.js +1 -1
- package/dist/domains/paths/pathRepresentation.js.map +1 -0
- package/dist/{features → domains}/paths/pathSnap/glyphs.js +1 -1
- package/dist/domains/paths/pathSnap/glyphs.js.map +1 -0
- package/dist/{features → domains}/paths/pathSnap/pathSnapSource.js +1 -1
- package/dist/domains/paths/pathSnap/pathSnapSource.js.map +1 -0
- package/dist/{features → domains}/paths/pathSnap/sceneIndex.js +1 -1
- package/dist/domains/paths/pathSnap/sceneIndex.js.map +1 -0
- package/dist/{features → domains}/paths/pathSnap/snapGeometry.js +3 -2
- package/dist/domains/paths/pathSnap/snapGeometry.js.map +1 -0
- package/dist/{features → domains}/paths/penPreviewLayer.js +1 -1
- package/dist/domains/paths/penPreviewLayer.js.map +1 -0
- package/dist/{features → domains}/paths/shapeGenerator.js +6 -4
- package/dist/domains/paths/shapeGenerator.js.map +1 -0
- package/dist/{features → domains}/paths/strokeOutline.js +1 -1
- package/dist/domains/paths/strokeOutline.js.map +1 -0
- package/dist/{features → domains}/paths/useAnchorFields.js +1 -1
- package/dist/domains/paths/useAnchorFields.js.map +1 -0
- package/dist/{features → domains}/paths/usePathEdit.js +1 -1
- package/dist/domains/paths/usePathEdit.js.map +1 -0
- package/dist/{features → domains}/poseRun/usePoseRun.js +1 -1
- package/dist/domains/poseRun/usePoseRun.js.map +1 -0
- package/dist/{features → domains}/selection/enteredGroupFrame.js +49 -10
- package/dist/domains/selection/enteredGroupFrame.js.map +1 -0
- package/dist/{features → domains}/selection/enteredGroupScope.js +1 -1
- package/dist/domains/selection/enteredGroupScope.js.map +1 -0
- package/dist/domains/selection/enteredOperands.js +29 -0
- package/dist/domains/selection/enteredOperands.js.map +1 -0
- package/dist/{features → domains}/selection/handleCommands.js +1 -1
- package/dist/domains/selection/handleCommands.js.map +1 -0
- package/dist/{features → domains}/selection/overlay.js +1 -1
- package/dist/domains/selection/overlay.js.map +1 -0
- package/dist/{features → domains}/selection/selectionPose.js +1 -1
- package/dist/domains/selection/selectionPose.js.map +1 -0
- package/dist/{features → domains}/snap/angle2d.js +1 -1
- package/dist/domains/snap/angle2d.js.map +1 -0
- package/dist/{features → domains}/snap/debugCandidates.js +1 -1
- package/dist/domains/snap/debugCandidates.js.map +1 -0
- package/dist/{features → domains}/snap/gather.js +1 -1
- package/dist/domains/snap/gather.js.map +1 -0
- package/dist/{features → domains}/snap/inputSubspace.js +1 -1
- package/dist/domains/snap/inputSubspace.js.map +1 -0
- package/dist/{features → domains}/snap/lazySession.js +1 -1
- package/dist/domains/snap/lazySession.js.map +1 -0
- package/dist/{features → domains}/snap/marks.js +1 -1
- package/dist/domains/snap/marks.js.map +1 -0
- package/dist/{features → domains}/snap/outcomeStore.js +1 -1
- package/dist/domains/snap/outcomeStore.js.map +1 -0
- package/dist/{features → domains}/snap/pointSnap.js +1 -1
- package/dist/domains/snap/pointSnap.js.map +1 -0
- package/dist/{features → domains}/snap/probes2d.js +1 -1
- package/dist/domains/snap/probes2d.js.map +1 -0
- package/dist/{features → domains}/snap/readoutDraw.js +1 -1
- package/dist/domains/snap/readoutDraw.js.map +1 -0
- package/dist/{features → domains}/snap/readoutLayer.js +1 -1
- package/dist/domains/snap/readoutLayer.js.map +1 -0
- package/dist/{features → domains}/snap/registry.js +1 -1
- package/dist/domains/snap/registry.js.map +1 -0
- package/dist/{features → domains}/snap/resizeBox.js +1 -1
- package/dist/domains/snap/resizeBox.js.map +1 -0
- package/dist/{features → domains}/snap/roles.js +1 -1
- package/dist/domains/snap/roles.js.map +1 -0
- package/dist/{features → domains}/snap/rotationSource.js +1 -1
- package/dist/domains/snap/rotationSource.js.map +1 -0
- package/dist/{features → domains}/snap/sceneReads.js +24 -3
- package/dist/domains/snap/sceneReads.js.map +1 -0
- package/dist/{features → domains}/snap/sceneSession2d.js +3 -2
- package/dist/domains/snap/sceneSession2d.js.map +1 -0
- package/dist/{features → domains}/snap/screen.js +1 -1
- package/dist/domains/snap/screen.js.map +1 -0
- package/dist/{features → domains}/snap/session2d.js +3 -2
- package/dist/domains/snap/session2d.js.map +1 -0
- package/dist/{features → domains}/snap/spanSnap.js +1 -1
- package/dist/domains/snap/spanSnap.js.map +1 -0
- package/dist/{features → domains}/snap/stepAngles.js +1 -1
- package/dist/domains/snap/stepAngles.js.map +1 -0
- package/dist/{features → domains}/text/editingDrawOne.js +4 -4
- package/dist/domains/text/editingDrawOne.js.map +1 -0
- package/dist/domains/text/hostTextEditors.js +24 -0
- package/dist/domains/text/hostTextEditors.js.map +1 -0
- package/dist/{features → domains}/text/index.js +1 -1
- package/dist/{features → domains}/text/sceneTextDrafts.js +1 -1
- package/dist/domains/text/sceneTextDrafts.js.map +1 -0
- package/dist/{features → domains}/text/textHitAt.js +18 -2
- package/dist/domains/text/textHitAt.js.map +1 -0
- package/dist/{features → domains}/text/textLayer.js +1 -1
- package/dist/domains/text/textLayer.js.map +1 -0
- package/dist/{features → domains}/text/useSceneTextEdit.js +11 -3
- package/dist/domains/text/useSceneTextEdit.js.map +1 -0
- package/dist/{features → domains}/viewports/aim.js +1 -1
- package/dist/domains/viewports/aim.js.map +1 -0
- package/dist/{features → domains}/viewports/viewMarker.js +23 -5
- package/dist/domains/viewports/viewMarker.js.map +1 -0
- package/dist/{features → domains}/viewports/viewMarkerDrag.js +3 -3
- package/dist/domains/viewports/viewMarkerDrag.js.map +1 -0
- package/dist/{features → domains}/viewports/viewResolver.js +1 -1
- package/dist/domains/viewports/viewResolver.js.map +1 -0
- package/dist/{features → domains}/viewports/viewportLayer.js +1 -1
- package/dist/domains/viewports/viewportLayer.js.map +1 -0
- package/dist/icons.table.js +1 -1
- package/dist/icons.table.js.map +1 -1
- package/dist/icons.table.json +106 -6
- package/dist/index.d.ts +1441 -1050
- package/dist/index.js +90 -77
- package/dist/interactions/actions/admitsChild.js +6 -2
- package/dist/interactions/actions/admitsChild.js.map +1 -1
- package/dist/interactions/actions/align/align.js +1 -4
- package/dist/interactions/actions/align/align.js.map +1 -1
- package/dist/interactions/actions/booleans/booleanGroupAction.js +66 -0
- package/dist/interactions/actions/booleans/booleanGroupAction.js.map +1 -0
- package/dist/interactions/actions/booleans/keymap.js +52 -0
- package/dist/interactions/actions/booleans/keymap.js.map +1 -0
- package/dist/interactions/actions/booleans/operands.js +1 -1
- package/dist/interactions/actions/booleans/pieces.js +4 -11
- package/dist/interactions/actions/booleans/pieces.js.map +1 -1
- package/dist/interactions/actions/clipboard/action.js +3 -7
- package/dist/interactions/actions/clipboard/action.js.map +1 -1
- package/dist/interactions/actions/clipboard/clipboardOps.js +1 -1
- package/dist/interactions/actions/clipboard/clipboardOps.js.map +1 -1
- package/dist/interactions/actions/clipboard/materializePaste.js.map +1 -1
- package/dist/interactions/actions/defaults/anchorEditing.js +6 -6
- package/dist/interactions/actions/defaults/anchorEditing.js.map +1 -1
- package/dist/interactions/actions/defaults/bendSegment.js +1 -1
- package/dist/interactions/actions/defaults/bendSegment.js.map +1 -1
- package/dist/interactions/actions/defaults/containerScroll.js +170 -0
- package/dist/interactions/actions/defaults/containerScroll.js.map +1 -0
- package/dist/interactions/actions/defaults/contextMenu.js +2 -5
- package/dist/interactions/actions/defaults/contextMenu.js.map +1 -1
- package/dist/interactions/actions/defaults/delete.js +1 -1
- package/dist/interactions/actions/defaults/delete.js.map +1 -1
- package/dist/interactions/actions/defaults/duplicate.js +1 -3
- package/dist/interactions/actions/defaults/duplicate.js.map +1 -1
- package/dist/interactions/actions/defaults/enterGroup.js +7 -12
- package/dist/interactions/actions/defaults/enterGroup.js.map +1 -1
- package/dist/interactions/actions/defaults/enterPathEdit.js +4 -8
- package/dist/interactions/actions/defaults/enterPathEdit.js.map +1 -1
- package/dist/interactions/actions/defaults/group.js +12 -24
- package/dist/interactions/actions/defaults/group.js.map +1 -1
- package/dist/interactions/actions/defaults/ingest.js +18 -10
- package/dist/interactions/actions/defaults/ingest.js.map +1 -1
- package/dist/interactions/actions/defaults/insertPathAnchor.js +3 -3
- package/dist/interactions/actions/defaults/insertPathAnchor.js.map +1 -1
- package/dist/interactions/actions/defaults/nudgeSteps.js +3 -21
- package/dist/interactions/actions/defaults/nudgeSteps.js.map +1 -1
- package/dist/interactions/actions/defaults/pathEditMarks.js.map +1 -1
- package/dist/interactions/actions/defaults/selectDeep.js +2 -2
- package/dist/interactions/actions/defaults/selectDeep.js.map +1 -1
- package/dist/interactions/actions/distribute/distribute.js.map +1 -1
- package/dist/interactions/actions/dropVerdict.js +9 -0
- package/dist/interactions/actions/dropVerdict.js.map +1 -0
- package/dist/interactions/actions/edit-anchors/action.js +2 -2
- package/dist/interactions/actions/edit-anchors/action.js.map +1 -1
- package/dist/interactions/actions/edit-anchors/extensionDrags.js.map +1 -1
- package/dist/interactions/actions/edit-anchors/geometry.js +8 -6
- package/dist/interactions/actions/edit-anchors/geometry.js.map +1 -1
- package/dist/interactions/actions/edit-anchors/handleDrag.js.map +1 -1
- package/dist/interactions/actions/edit-anchors/preview.js +1 -1
- package/dist/interactions/actions/edit-anchors/preview.js.map +1 -1
- package/dist/interactions/actions/flip/action.js +3 -2
- package/dist/interactions/actions/flip/action.js.map +1 -1
- package/dist/interactions/actions/geometryProjection.js +8 -3
- package/dist/interactions/actions/geometryProjection.js.map +1 -1
- package/dist/interactions/actions/gestureFrames.js +1 -0
- package/dist/interactions/actions/gestureFrames.js.map +1 -1
- package/dist/interactions/actions/insert/action.js +6 -2
- package/dist/interactions/actions/insert/action.js.map +1 -1
- package/dist/interactions/actions/insert/frame.js +1 -1
- package/dist/interactions/actions/insert/frame.js.map +1 -1
- package/dist/interactions/actions/insert/placeAction.js +6 -8
- package/dist/interactions/actions/insert/placeAction.js.map +1 -1
- package/dist/interactions/actions/insert/session.js +2 -2
- package/dist/interactions/actions/insert/session.js.map +1 -1
- package/dist/interactions/actions/move/action.js +6 -15
- package/dist/interactions/actions/move/action.js.map +1 -1
- package/dist/interactions/actions/move/behaviors/layoutDrop.js +12 -2
- package/dist/interactions/actions/move/behaviors/layoutDrop.js.map +1 -1
- package/dist/interactions/actions/move/behaviors/reparentOnDrop.js +29 -10
- package/dist/interactions/actions/move/behaviors/reparentOnDrop.js.map +1 -1
- package/dist/interactions/actions/move/behaviors/snapToContainer.js +42 -6
- package/dist/interactions/actions/move/behaviors/snapToContainer.js.map +1 -1
- package/dist/interactions/actions/move/capture.js +4 -8
- package/dist/interactions/actions/move/capture.js.map +1 -1
- package/dist/interactions/actions/move/commit/index.js.map +1 -1
- package/dist/interactions/actions/move/commit/layoutDrop.js +4 -3
- package/dist/interactions/actions/move/commit/layoutDrop.js.map +1 -1
- package/dist/interactions/actions/move/commit/layoutRelease.js +15 -9
- package/dist/interactions/actions/move/commit/layoutRelease.js.map +1 -1
- package/dist/interactions/actions/move/commit/reparent.js +19 -13
- package/dist/interactions/actions/move/commit/reparent.js.map +1 -1
- package/dist/interactions/actions/move/delta.js +51 -5
- package/dist/interactions/actions/move/delta.js.map +1 -1
- package/dist/interactions/actions/move/frame.js +8 -4
- package/dist/interactions/actions/move/frame.js.map +1 -1
- package/dist/interactions/actions/move/layout/container.js +19 -9
- package/dist/interactions/actions/move/layout/container.js.map +1 -1
- package/dist/interactions/actions/move/layout/dragged.js +2 -2
- package/dist/interactions/actions/move/layout/dragged.js.map +1 -1
- package/dist/interactions/actions/move/layout/dropPass.js +36 -18
- package/dist/interactions/actions/move/layout/dropPass.js.map +1 -1
- package/dist/interactions/actions/move/layout/exits.js +2 -2
- package/dist/interactions/actions/move/layout/exits.js.map +1 -1
- package/dist/interactions/actions/move/layout/glide.js +5 -5
- package/dist/interactions/actions/move/layout/glide.js.map +1 -1
- package/dist/interactions/actions/move/layout/view.js +55 -0
- package/dist/interactions/actions/move/layout/view.js.map +1 -0
- package/dist/interactions/actions/move/refusal.js +52 -0
- package/dist/interactions/actions/move/refusal.js.map +1 -0
- package/dist/interactions/actions/move/session.js +9 -8
- package/dist/interactions/actions/move/session.js.map +1 -1
- package/dist/interactions/actions/move/translate.js +10 -4
- package/dist/interactions/actions/move/translate.js.map +1 -1
- package/dist/interactions/actions/moveNodes.js +21 -5
- package/dist/interactions/actions/moveNodes.js.map +1 -1
- package/dist/interactions/actions/pathCommands/pathNodes.js +3 -3
- package/dist/interactions/actions/pathCommands/pathNodes.js.map +1 -1
- package/dist/interactions/actions/planeInput.js +14 -13
- package/dist/interactions/actions/planeInput.js.map +1 -1
- package/dist/interactions/actions/poseFrame.js +21 -8
- package/dist/interactions/actions/poseFrame.js.map +1 -1
- package/dist/interactions/actions/resize/action.js +1 -1
- package/dist/interactions/actions/resize/action.js.map +1 -1
- package/dist/interactions/actions/resize/aspect.js +1 -1
- package/dist/interactions/actions/resize/aspect.js.map +1 -1
- package/dist/interactions/actions/resize/commit.js +10 -1
- package/dist/interactions/actions/resize/commit.js.map +1 -1
- package/dist/interactions/actions/resize/frame.js +3 -2
- package/dist/interactions/actions/resize/frame.js.map +1 -1
- package/dist/interactions/actions/resize/held.js +44 -0
- package/dist/interactions/actions/resize/held.js.map +1 -0
- package/dist/interactions/actions/resize/session.js +3 -1
- package/dist/interactions/actions/resize/session.js.map +1 -1
- package/dist/interactions/actions/resolveOverlays.js +9 -0
- package/dist/interactions/actions/resolveOverlays.js.map +1 -1
- package/dist/interactions/actions/resolvePreviews.js +23 -7
- package/dist/interactions/actions/resolvePreviews.js.map +1 -1
- package/dist/interactions/actions/rotate/action.js +1 -1
- package/dist/interactions/actions/rotate/action.js.map +1 -1
- package/dist/interactions/actions/rotate/frame.js +1 -1
- package/dist/interactions/actions/rotate/frame.js.map +1 -1
- package/dist/interactions/actions/rotate/session.js +2 -2
- package/dist/interactions/actions/rotate/session.js.map +1 -1
- package/dist/interactions/actions/selectionSubtree.js +2 -4
- package/dist/interactions/actions/selectionSubtree.js.map +1 -1
- package/dist/interactions/actions/spatialReference.js +4 -9
- package/dist/interactions/actions/spatialReference.js.map +1 -1
- package/dist/interactions/gestures/dragRadial/dragRadial.js.map +1 -1
- package/dist/interactions/gestures/dragRect/dragRect.js.map +1 -1
- package/dist/kitSettingsSchema.js +2 -2
- package/dist/kitSettingsSchema.js.map +1 -1
- package/dist/{math-C_elShP_.d.ts → math-B_unOnF4.d.ts} +2 -2
- package/dist/math.d.ts +3 -3
- package/dist/move.d.ts +6 -6
- package/dist/{options-ClEm3SEl.d.ts → options-DAjkhbcs.d.ts} +5 -5
- package/dist/{poseDescriptor-DN2yfnq_.d.ts → poseDescriptor-CvSxVhCd.d.ts} +17 -4
- package/dist/resize.d.ts +6 -6
- package/dist/style.css +14 -0
- package/dist/test-seams.d.ts +11 -15
- package/dist/test-seams.js +1 -1
- package/dist/tools/builtin/eyedropper/useEyedropperTool.js +3 -6
- package/dist/tools/builtin/eyedropper/useEyedropperTool.js.map +1 -1
- package/dist/tools/builtin/line/useLineTool.js.map +1 -1
- package/dist/tools/builtin/measure/useMeasureTool.js +2 -2
- package/dist/tools/builtin/measure/useMeasureTool.js.map +1 -1
- package/dist/tools/builtin/pen/penHandle.js +2 -2
- package/dist/tools/builtin/pen/penHandle.js.map +1 -1
- package/dist/tools/builtin/pen/usePenTool.js +13 -19
- package/dist/tools/builtin/pen/usePenTool.js.map +1 -1
- package/dist/tools/builtin/polygon/usePolygonTool.js +1 -1
- package/dist/tools/builtin/polygon/usePolygonTool.js.map +1 -1
- package/dist/tools/builtin/select/groupEntry.js +1 -1
- package/dist/tools/builtin/select/groupEntry.js.map +1 -1
- package/dist/tools/builtin/select/selectionContributions.js +1 -1
- package/dist/tools/builtin/select/selectionContributions.js.map +1 -1
- package/dist/tools/builtin/select/useSelectTool.js +7 -7
- package/dist/tools/builtin/select/useSelectTool.js.map +1 -1
- package/dist/tools/builtin/slice/useSliceTool.js +5 -8
- package/dist/tools/builtin/slice/useSliceTool.js.map +1 -1
- package/dist/tools/builtin/star/useStarTool.js +1 -1
- package/dist/tools/builtin/star/useStarTool.js.map +1 -1
- package/dist/tools/index.js +2 -1
- package/dist/{types-49uYJN3j.d.ts → types-A_sNJYRd.d.ts} +8 -0
- package/dist/{types-BEdRIhNc.d.ts → types-DW14eu9B.d.ts} +131 -36
- package/dist/{types-p2alu-R1.d.ts → types-VCtfchp-.d.ts} +4 -6
- package/dist/util/color.js +12 -14
- package/dist/util/color.js.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +25 -24
- package/dist/canvas/poseCascade.js +0 -65
- package/dist/canvas/poseCascade.js.map +0 -1
- package/dist/features/chrome-caps/buildChromeCtx.js.map +0 -1
- package/dist/features/chrome-caps/conditions.js.map +0 -1
- package/dist/features/chrome-caps/defaults.js.map +0 -1
- package/dist/features/chrome-caps/resolve.js.map +0 -1
- package/dist/features/chrome-caps/useChromeCaps.js.map +0 -1
- package/dist/features/chrome-caps/useHoverTracking.js.map +0 -1
- package/dist/features/ingestion/contentHandlers.js.map +0 -1
- package/dist/features/ingestion/imageHandler.js.map +0 -1
- package/dist/features/ingestion/openFilePicker.js.map +0 -1
- package/dist/features/ingestion/placement.js.map +0 -1
- package/dist/features/ingestion/registerKitHandlers.js +0 -43
- package/dist/features/ingestion/registerKitHandlers.js.map +0 -1
- package/dist/features/ingestion/svgHandler.js.map +0 -1
- package/dist/features/ingestion/textHandler.js.map +0 -1
- package/dist/features/ingestion/useCanvasIngestion.js.map +0 -1
- package/dist/features/ingestion/weaselJsonHandler.js.map +0 -1
- package/dist/features/longPress/longPressFeedback.js.map +0 -1
- package/dist/features/measure/actionIds.js.map +0 -1
- package/dist/features/measure/measureCommands.js.map +0 -1
- package/dist/features/measure/measureContribution.js.map +0 -1
- package/dist/features/measure/measureEdits.js.map +0 -1
- package/dist/features/measure/measureGestures.js.map +0 -1
- package/dist/features/measure/measureHit.js.map +0 -1
- package/dist/features/measure/measureLayer.js.map +0 -1
- package/dist/features/measure/measurement.js.map +0 -1
- package/dist/features/measure/measurements.js.map +0 -1
- package/dist/features/modes/modeLayers.js.map +0 -1
- package/dist/features/modes/modeTriggers.js.map +0 -1
- package/dist/features/pathEffects/effectSources.js.map +0 -1
- package/dist/features/pathEffects/index.js.map +0 -1
- package/dist/features/pathEffects/readSource.js.map +0 -1
- package/dist/features/pathEffects/textItems.js.map +0 -1
- package/dist/features/pathEffects/useEffectSourcesLayer.js.map +0 -1
- package/dist/features/paths/anchorData.js.map +0 -1
- package/dist/features/paths/anchorMarkers.js.map +0 -1
- package/dist/features/paths/editablePath.js.map +0 -1
- package/dist/features/paths/originProjection.js.map +0 -1
- package/dist/features/paths/pathEditExtension.js.map +0 -1
- package/dist/features/paths/pathEditState.js.map +0 -1
- package/dist/features/paths/pathEditingOverlayLayer.js.map +0 -1
- package/dist/features/paths/pathLayer.js.map +0 -1
- package/dist/features/paths/pathRepresentation.js.map +0 -1
- package/dist/features/paths/pathSnap/glyphs.js.map +0 -1
- package/dist/features/paths/pathSnap/pathSnapSource.js.map +0 -1
- package/dist/features/paths/pathSnap/sceneIndex.js.map +0 -1
- package/dist/features/paths/pathSnap/snapGeometry.js.map +0 -1
- package/dist/features/paths/penPreviewLayer.js.map +0 -1
- package/dist/features/paths/shapeGenerator.js.map +0 -1
- package/dist/features/paths/strokeOutline.js.map +0 -1
- package/dist/features/paths/useAnchorFields.js.map +0 -1
- package/dist/features/paths/usePathEdit.js.map +0 -1
- package/dist/features/poseRun/usePoseRun.js.map +0 -1
- package/dist/features/selection/enteredGroupFrame.js.map +0 -1
- package/dist/features/selection/enteredGroupScope.js.map +0 -1
- package/dist/features/selection/handleCommands.js.map +0 -1
- package/dist/features/selection/overlay.js.map +0 -1
- package/dist/features/selection/selectionPose.js.map +0 -1
- package/dist/features/snap/angle2d.js.map +0 -1
- package/dist/features/snap/debugCandidates.js.map +0 -1
- package/dist/features/snap/gather.js.map +0 -1
- package/dist/features/snap/inputSubspace.js.map +0 -1
- package/dist/features/snap/lazySession.js.map +0 -1
- package/dist/features/snap/marks.js.map +0 -1
- package/dist/features/snap/outcomeStore.js.map +0 -1
- package/dist/features/snap/pointSnap.js.map +0 -1
- package/dist/features/snap/probes2d.js.map +0 -1
- package/dist/features/snap/readoutDraw.js.map +0 -1
- package/dist/features/snap/readoutLayer.js.map +0 -1
- package/dist/features/snap/registry.js.map +0 -1
- package/dist/features/snap/resizeBox.js.map +0 -1
- package/dist/features/snap/roles.js.map +0 -1
- package/dist/features/snap/rotationSource.js.map +0 -1
- package/dist/features/snap/sceneReads.js.map +0 -1
- package/dist/features/snap/sceneSession2d.js.map +0 -1
- package/dist/features/snap/screen.js.map +0 -1
- package/dist/features/snap/session2d.js.map +0 -1
- package/dist/features/snap/spanSnap.js.map +0 -1
- package/dist/features/snap/stepAngles.js.map +0 -1
- package/dist/features/text/editingDrawOne.js.map +0 -1
- package/dist/features/text/sceneTextDrafts.js.map +0 -1
- package/dist/features/text/textHitAt.js.map +0 -1
- package/dist/features/text/textLayer.js.map +0 -1
- package/dist/features/text/useSceneTextEdit.js.map +0 -1
- package/dist/features/viewports/aim.js.map +0 -1
- package/dist/features/viewports/viewMarker.js.map +0 -1
- package/dist/features/viewports/viewMarkerDrag.js.map +0 -1
- package/dist/features/viewports/viewResolver.js.map +0 -1
- package/dist/features/viewports/viewportLayer.js.map +0 -1
- /package/dist/{features → domains}/chrome-caps/index.js +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { D as Dims, R as RenderLayer, L as LayerHit, h as LayerDims, V as ViewAnimationOptions, a as PathEditExtension, i as ViewportDims, F as FitViewToBoundsOptions, j as RedrawSource, k as EditAnchorsParams, I as InertiaConfig, E as EditAnchorsDep, G as GestureLifecycleOptions, l as SliceDep, m as StickyStyle,
|
|
2
|
-
export { a6 as AngleCandidate, a7 as AngleCollect, a8 as AnimateToBoundsOptions, a9 as AreaSelectDep, aa as BooleanOpPreview, ab as BooleanPreviewPiece, ac as CanDropIntoDep, ad as ClipboardDep, ae as ClipboardIngestCtx, af as CreateOutlinesResult, ag as CustomPaintContext, ah as DEFAULT_LAYER_RETAIN, ai as DecayLoopConfig, aj as
|
|
3
|
-
import { View, Scale2, Path, FramedBox, PolygonPath, GlMat3, Point
|
|
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-
|
|
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-
|
|
1
|
+
import { D as Dims, R as RenderLayer, L as LayerHit, h as LayerDims, V as ViewAnimationOptions, a as PathEditExtension, i as ViewportDims, F as FitViewToBoundsOptions, j as RedrawSource, k as EditAnchorsParams, I as InertiaConfig, E as EditAnchorsDep, G as GestureLifecycleOptions, l as SliceDep, m as StickyStyle, A as AnchorMarkerShape, P as PathEditMark, T as TextOverflow, n as EnteredGroupApi, C as ContentHandlerEntry, o as ChromeState, p as LayerGroup, S as SnapSource, q as TransformFollower, r as GeometryProjection, s as InsertNodeFactory, t as InsertPaint, u as SvgIngestOptions, v as SceneCanvasSnap, w as Affordance, x as AffordanceRegion, y as AffordanceBinding, z as CommonAffordanceScratch, B as CreateOutlinesAdapter, J as PaintKindEntry, K as PathEditTarget, M as FinishedEditFrame, N as PathSymmetryDep, H as HandleLocks, O as BooleanOpOptions, Q as BooleansAdapter, U as BooleanOp, W as PathPaint, X as BooleanOpResult, Y as BooleanStrokes, Z as SnapMods, $ as SourceCandidate, a0 as SnapProbeAt, a1 as SnapCollect, a2 as SnapMark, b as SnapGesture, a3 as SnapDep, a4 as SnapOutcome, f as SnapOutcomeStore, a5 as SnapReadoutStyle } from './depSchema-C3BwxitB.js';
|
|
2
|
+
export { a6 as AngleCandidate, a7 as AngleCollect, a8 as AnimateToBoundsOptions, a9 as AreaSelectDep, aa as BooleanOpPreview, ab as BooleanPreviewPiece, ac as CanDropIntoDep, ad as ClipboardDep, ae as ClipboardIngestCtx, af as CreateOutlinesResult, ag as CustomPaintContext, ah as DEFAULT_LAYER_RETAIN, ai as DecayLoopConfig, aj as DropRefusal, ak as DropVerdict, al as FinishedPathEdit, am as GEOMETRY_BOUND_DATA, an as HandleLock, ao as HitTestView, ap as IngestCtx, aq as IngestionDep, ar as InsertDep, as as InsertEnds, at as InsertExtras, au as InsertIntoDep, av as InsertLive, aw as LassoSelectDep, ax as LayerCommandCache, ay as LayerDrawFailure, az as LayerDrawSpan, aA as LayerRetainPolicy, aB as LayoutDep, aC as Locus, aD as MinSize, aE as NodeAtPointDep, aF as OutlinePathSpec, aG as PATH_OVERLAY_ROLES, aH as PaintKind, aI as PaintKindEditorProps, aJ as PaintKindFamily, aK as PaintKindLoader, aL as PanBounds, aM as PathEditDrag, aN as PathEditDragStart, aO as PathEditFinishCtx, aP as PathEditHandleMove, aQ as PathEditMarksCtx, aR as PathEditOther, aS as PathEditPart, aT as PathEditStore, aU as PathForm, aV as PathOverlay, aW as PathOverlayOptions, aX as PathOverlayStyle, aY as PathRepresentation, aZ as PathTransformFinishCtx, a_ as PoseChange, a$ as PreviewPathsDep, b0 as ResizePolicy, b1 as STICKY_DEFAULTS, b2 as SnapBegin, c as SnapConstrain, b3 as SnapEdge, b4 as SnapEdges, b5 as SnapFrame, e as SnapGeometry, b6 as SnapMarks, b7 as SnapReadoutDep, d as SnapResizeBox, g as SnapSession, b8 as SvgUnpacker, b9 as TextEditDep, ba as TextNodeData, bb as TransformPreviewNode, bc as TransientPath, bd as VIEW_ANIMATION_KEY, be as ViewAnimationApi, bf as ViewApi, bg as ViewChannel, bh as applyBooleanOp, bi as applyCreateOutlines, bj as asPaint, bk as createEnteredGroup, bl as createPathOverlay, bm as createSnapOutcomeStore, bn as depsUnchanged, bo as drawLayers, bp as drawOneLayer, bq as fitViewToBounds, br as getPaintKind, bs as isLayerPainted, bt as isLayerVisible, bu as listGradientKinds, bv as listPaintKinds, bw as minSizeOf, bx as paintKindOf, by as paintKindRegistry, bz as paintedLayers, bA as paintsLayer, bB as paletteInsertPaint, bC as pathPaintOf, bD as patternFamily, bE as previewBooleanOp, bF as refusalOf, bG as registerContentHandler, bH as registerPaintKind, bI as registerPaintKindLoader, bJ as seedTile, bK as stickyData, bL as stickyNodeFactory, bM as subscribeToSources, bN as switchGradientKind, bO as textBoxOf, bP as useDecayLoop, bQ as useEnteredGroup, bR as useViewAnimation, bS as useViewAnimationOn, bT as viewAxes, bU as withoutGeometryBoundData } from './depSchema-C3BwxitB.js';
|
|
3
|
+
import { View, Scale2, Path, FramedBox, PolygonPath, Affine, GlMat3, Point, AnchorField, AnchorSet, PlacementAlign, Rect, PathSnapKind, PathInWorldPose, AnchorFieldValues, NumberEntry, JoinOptions, SegmentHit, PointOrigin, AnchorSymmetry, BlendPathsOptions, RunAlign, TrackSide, BendAlongPathOptions, RepeatAlongPathOptions, RoughenPathOptions, ZigzagPathOptions, PuckerBloatPathOptions, 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, PuckerBloatPathOptions, Rect, RectPath, RepeatAlongPathOptions, RepeatStation, ResolvedCorners, RoughenPathOptions, SPRING_PRESETS, Scale2, SegmentCrossing, SimplifyPathOptions, SmudgePathOptions, SolveConstraintsOptions, SolveConstraintsResult, SpringPreset, SpringPresetName, TrimPathOptions, TrimResult, Point as Vec2, View, ZOOM_FLOOR, ZigzagPathOptions, 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, puckerBloatPath, pxExtent, rectMarkerPath, rectPath, regularPolygonPath, remapPerAnchor, repeatAlongPath, resolveCorners, resolveCornersWithSources, resolveEasing, reversePath, rotatePathAround, roughenPath, 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, zigzagPath } from '@weasel-js/geom';
|
|
5
|
+
import { a as PlaneMap, L as LayoutStrategy, R as ReflowTransition, b as LayoutDropTargetMode } from './types-A_sNJYRd.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-A_sNJYRd.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 { R as RectPose, a as SystemLayerSpec, A as AddNodeSpec, b as RegisteredOp, c as SceneRegistry, P as PoseComposition, L as LayoutFrame, N as Node, I as InheritedPaint, d as PoseAdapter, S as Scene,
|
|
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, I as InheritedPaint, d as ScrollOffset, e as PoseAdapter, S as Scene, f as PoseRemoval, g as PoseWrite, h as ScenePoseReports, i as PoseOverrides, j as SerializedScene, D as DerivePoseFn, k as SavedScene, l as SpecsFromSerializedOptions, m as NodeClip, n as DerivePathFn, o as DerivedDep } from './types-DW14eu9B.js';
|
|
10
|
+
export { p as AddLayerSpec, B as Bivariant, C as ClipFromPoseFn, q as CopiesFromPoseFn, G as GroupNode, r as IDENTITY_POSE_COMPOSITION, s as LayerRecord, t as LayoutMove, M as MarkNode, u as PoseClosure, v as PoseHold, w as PoseOverride, x as PoseWriteOrigin, y as RemovedNode, z as SCENE_HISTORY_FORM, E as SceneArrivalHandler, F as SceneBatchOptions, H as SceneDeclaredFieldSetters, J as SceneDoc, K as SceneDocValues, O as SceneEditPass, Q as SceneEditPassOptions, T as SceneEditSummary, U as SceneScroll, V as ScrollOffsets, W as ScrollSource, X as SerializedDoc, Y as SerializedLayer, Z as SerializedNode, _ as SerializedNodeV1, $ as SerializedSceneHistory, a0 as SerializedSceneV1, a1 as SerializedSceneV2, a2 as SkippedKey, a3 as SystemLayerRecord, a4 as UserLayerRecord, a5 as V1Classifier, a6 as asNodeId, a7 as childFrameAt, a8 as composeChildFrame, a9 as composeWorldPose, aa as composesFrames, ab as createScrollOffsets, ac as inheritedPaintIn, ad as inheritedPaintOf, ae as inheritsPaint, af as isSerializedScene, ag as nodeKindOf, ah as rebaseLocalPose, ai as scrolledFrames, aj as specsFromSerialized, ak as viewPoseAdapter, al as withInheritedPaint } from './types-DW14eu9B.js';
|
|
11
|
+
import * as _weasel_js_routing from '@weasel-js/routing';
|
|
12
|
+
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, WorldPoint, GestureBinding, AffordanceHit, ActionDisabledReason, ToolKeybinding, HotkeyTrigger, ModifierState, RuleCtx, Rule, ActionTunings, BindingOverrides, ActionsProp, DebugSink, ToolSet, ToolEntry, Dispatcher, OverlayRole, ResizeAnchor, InvocationCtx, OngoingHandle } from '@weasel-js/routing';
|
|
13
|
+
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, ImmediateParams, IngestItem, InputEvent, InvocationCtx, Invoker, KEYMAP_HOLD, KeyBinding, KeyReach, KeymapDef, KeymapDescription, KeymapRow, KeymapStack, KeymapUnbound, KeymapVerdict, LONG_PRESS_MS, LongPressOptions, LongPressState, LongPressStore, MatchResult, MenuAccess, MenuCustomAt, 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, WorldPoint, 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, holdPreview, holdPreviewId, isDebugEnabled, isEditableTarget, isInControlWithin, isToolSet, keySpecShortcut, keymapContribution, keymapLeaderBindingId, keymapLeaderId, keymapShortcuts, keysHeld, liveScope, matchActionItem, matchesKeyBinding, modeShortcutSpec, modeShortcuts, modifierStateOf, 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
14
|
import * as react from 'react';
|
|
14
|
-
import react__default, { Ref, RefObject, ReactNode, MutableRefObject
|
|
15
|
+
import react__default, { Ref, RefObject, ReactNode, MutableRefObject } from 'react';
|
|
15
16
|
import { Reflection } from '@weasel-js/registry';
|
|
16
17
|
export { MIXED, Mixed, QueryMatch, Reflectable, ReflectedEntry, Reflection, RegisterOptions, Registrant, createReflectable, isPlainObject } from '@weasel-js/registry';
|
|
17
18
|
export { stableStringify } from './json.js';
|
|
18
|
-
import { P as PoseDescriptor, b as RotatedPose } from './poseDescriptor-
|
|
19
|
-
export { R as RECT_POSE_DESCRIPTOR, a as ROTATED_POSE_DESCRIPTOR, p as poseDescriptorForNode, t as translatePoseViaDescriptor, v as visualBoundsViaDescriptor } from './poseDescriptor-
|
|
19
|
+
import { P as PoseDescriptor, b as RotatedPose } from './poseDescriptor-CvSxVhCd.js';
|
|
20
|
+
export { R as RECT_POSE_DESCRIPTOR, a as ROTATED_POSE_DESCRIPTOR, T as TranslateLead, p as poseDescriptorForNode, t as translatePoseViaDescriptor, v as visualBoundsViaDescriptor } from './poseDescriptor-CvSxVhCd.js';
|
|
20
21
|
import { KitSettingsStore } from '@weasel-js/react';
|
|
21
|
-
export { CanvasFocusReturn,
|
|
22
|
+
export { CanvasFocusReturn, UseCanvasFocusOptions, VisibleRaf, VisibleRafOptions, VisibleRafTarget, useCanvasFocus, useLatest, useVisibleRaf } from '@weasel-js/react';
|
|
22
23
|
import { PaintedCursorState, CursorSink, CursorSpec } from '@weasel-js/cursor';
|
|
23
24
|
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';
|
|
24
25
|
import { DrawCommand, FlattenTolerance, ImageMinification, ShaderProgramHandle, CommandStroke as CommandStroke$1 } from '@weasel-js/renderer';
|
|
@@ -29,41 +30,42 @@ import { VertexColorChannel, Target, Animator, ColorOverrideRegistry, TargetAxes
|
|
|
29
30
|
import { SelectionStore as SelectionStore$1 } from '@weasel-js/select';
|
|
30
31
|
import { ToolsApi as ToolsApi$1, UseToolsOptions as UseToolsOptions$1, PointerContextValue, Yoke } from '@weasel-js/routing/react';
|
|
31
32
|
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,
|
|
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';
|
|
33
|
+
import { Paint, CommandFill, CommandStroke, Fill, Inherit, Stroke, CommandPaint, Palette, SolidPaint, VertexWidth, PaintedFill, PaintedStroke } from '@weasel-js/paint';
|
|
34
|
+
export { ColorInterpolationSpace, ColorSpace, CommandFill, CommandPaint, CommandPaintUnits, CommandStroke, Fill, GradStop, GradientKind, GradientPaint, HalfWidths, HueInterpolation, INHERIT, ImagePatternPaint, 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, TileExtent, TileKind, TilePaint, TilePatternSpec, VertexWidth, VertexWidthSides, alignedStrokeRect, composePatternTransform, contrastLineColor, contrastRatio, dashForStrokeStyle, decomposePatternTransform, gradientForBounds, gradientGeometry, hexToOklchDeg, hexToRgbBytes, hexToRgba, hslToSrgb, interpolateSrgb, isGradientPaint, isImagePatternPaint, 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';
|
|
34
35
|
import { FontRequest } from '@weasel-js/font';
|
|
35
36
|
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';
|
|
36
37
|
import * as _weasel_js_history from '@weasel-js/history';
|
|
37
38
|
import { Op, CreateHistoryOptions, History, HistorySelection } from '@weasel-js/history';
|
|
38
39
|
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-
|
|
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-
|
|
41
|
-
import { d as ResizeHandleLayout, U as UseResizeOptions, T as TargetTransform } from './cornerHandles-
|
|
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-
|
|
40
|
+
import { G as GestureContext, B as BoundsConstraint, R as RotateBehavior, I as InsertBehavior, L as LassoSelectBehavior, M as MoveBehavior } from './clone-Bz4iqGfE.js';
|
|
41
|
+
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-Bz4iqGfE.js';
|
|
42
|
+
import { d as ResizeHandleLayout, U as UseResizeOptions, T as TargetTransform } from './cornerHandles-DpmQM_z5.js';
|
|
43
|
+
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-DpmQM_z5.js';
|
|
43
44
|
import { ModeRegistry, WorkspaceVisual, ModeDecorations, NodeScope } 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-
|
|
45
|
-
export { R as RegionPickView, S as SnapTarget } from './types-
|
|
45
|
+
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-VCtfchp-.js';
|
|
46
|
+
export { R as RegionPickView, S as SnapTarget } from './types-VCtfchp-.js';
|
|
46
47
|
import * as _weasel_js_gestures from '@weasel-js/gestures';
|
|
48
|
+
import { KeySpec } from '@weasel-js/gestures';
|
|
47
49
|
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-
|
|
50
|
+
import { U as UseMoveOptions } from './options-DAjkhbcs.js';
|
|
49
51
|
import { IconRef, IconTable, IconVariantLoader, IconRegistry, IconGlyph, IconEntry, IconVariantState } from '@weasel-js/icons';
|
|
50
52
|
export { IconRef, IconTable, toIconRef } from '@weasel-js/icons';
|
|
53
|
+
import { TextStyle, StyledRun, TextVerticalAlign, TextPaint, TextPose, TextOutlinesError } from '@weasel-js/text';
|
|
54
|
+
export { CacheUse, 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, QUAD_STRIDE, RangeStyle, ResolvedRun, ResolvedTextStyle, RunFlag, RunGrammar, RunMarker, RunSourceMap, RunStylePatch, SCRIPT_METRICS, SMALL_CAPS_SCALE, ScriptPreset, SetFlagResult, ShapedCluster, ShapedGlyph, SmallCapsText, StyleKey, StyledRun, TextAlign, TextDirection, TextLineBoxesOpts, TextNodeSource, TextOutlineSource, TextOutlinesError, TextOutlinesFailure, TextPaint, TextPaintPath, TextPose, TextPoseLayout, TextPoseLayoutInput, TextRenderer, TextShaper, TextStyle, TextToPathOptions, TextTransform, TextVerticalAlign, TransformedRunText, applyStyleToRange, cachedLayoutRuns, cachedPaintRuns, caretIndexAt, createMarkdownRenderer, decorationMetrics, defaultLabelTextRenderer, dropRuns, effectiveRangeStyle, fitTextPose, fontString, halfLeadingFor, isBoldWeight, isSmallCapsLetter, isTextData, layoutMarkdown, layoutRuns, layoutTextPose, loadTextOutlines, markdownToRuns, measureText, measureTextBounds, measuredWidth, nodeHasFlag, numericWeight, paintRuns, paragraphDirection, patchRangeStyle, pointInTextPose, rangeWeight, registerBidi, registerShaper, 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';
|
|
55
|
+
import { UseTextEditReturn } from '@weasel-js/text-dom';
|
|
56
|
+
export { StartEditOptions, StyleToggle, TEXT_EDIT_FONT_HOLD, TextEditClipRect, TextEditCommit, TextEditScreenPose, TextEditSelection, UseTextEditOptions, UseTextEditReturn, charOffsetToDomPosition, domPositionToCharOffset, domToRuns, runsToDom, useTextEdit } from '@weasel-js/text-dom';
|
|
51
57
|
import * as _weasel_js_prefs from '@weasel-js/prefs';
|
|
52
58
|
import { PrefSection, PrefNumberUnit } from '@weasel-js/prefs';
|
|
53
59
|
import { UnitScope } from '@weasel-js/quantity';
|
|
54
60
|
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';
|
|
55
|
-
import { TextPose, TextStyle, StyledRun, TextVerticalAlign, TextPaint, TextOutlinesError } 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, QUAD_STRIDE, 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';
|
|
57
|
-
import { UseTextEditReturn } from '@weasel-js/text-dom';
|
|
58
|
-
export { StartEditOptions, StyleToggle, TEXT_EDIT_FONT_HOLD, TextEditClipRect, TextEditCommit, TextEditScreenPose, TextEditSelection, UseTextEditOptions, UseTextEditReturn, charOffsetToDomPosition, domPositionToCharOffset, domToRuns, runsToDom, useTextEdit } from '@weasel-js/text-dom';
|
|
59
61
|
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';
|
|
60
62
|
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-
|
|
63
|
+
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-B_unOnF4.js';
|
|
62
64
|
export { SnipAtCrossingsOptions, SplitBySegmentOptions, pathDivide, pathExclude, pathIntersect, pathSubtract, pathUnion, snipPathByPolyline, snipPathsAtCrossings, splitPathByPolyline, splitPathBySegment, trianglesToPath } from '@weasel-js/geom/booleans';
|
|
63
65
|
export { CURVE_REPS, CurveRepKind, CurveRepresentation, Discriminator, SharedAnchor, bezierCubic, bezierQuadratic, nurbs, spiro } from '@weasel-js/geom/curves';
|
|
64
66
|
import { O as OriginProjection } from './originProjection-gY0jb4Wb.js';
|
|
65
67
|
export { A as AUTO_ORIGIN_PROJECTION, R as RECT_ORIGIN_PROJECTION } from './originProjection-gY0jb4Wb.js';
|
|
66
|
-
export { A as AUTO_POSE_DESCRIPTOR, i as isPathLike, a as isRectPose } from './autoPoseDescriptor-
|
|
68
|
+
export { A as AUTO_POSE_DESCRIPTOR, i as isPathLike, a as isRectPose } from './autoPoseDescriptor-C25QVb0W.js';
|
|
67
69
|
export { ClipboardFlavors, UseClipboardOpsOptions, UseClipboardOpsReturn, WEASEL_CLIPBOARD_MIME, WEASEL_CLIPBOARD_MIME_WEB, buildWeaselClipboardText, embedWeaselMetadataInSvg, extractWeaselClipboardFromSvg, parseWeaselClipboardText, sniffWeaselClipboardText, useClipboardOps } from './clipboard.js';
|
|
68
70
|
import { Vec, SnapCandidate } from '@weasel-js/geom/nd';
|
|
69
71
|
|
|
@@ -135,8 +137,15 @@ declare function viewZoom(view: View): number;
|
|
|
135
137
|
declare function normalizeView(view: View): View;
|
|
136
138
|
|
|
137
139
|
/** Options for `useScene` — the layers the scene has, what it starts out
|
|
138
|
-
* holding, and how its history behaves.
|
|
139
|
-
|
|
140
|
+
* holding, and how its history behaves. A scene whose `TPose` is not a
|
|
141
|
+
* {@link RectPose} has no default composition and must name one. */
|
|
142
|
+
type UseSceneOptions<TData, TLayer extends string, TPose = RectPose> = SceneOptions<TData, TLayer, TPose> & NamesComposition<TPose>;
|
|
143
|
+
/** `composition` is required unless `TPose` is a rect the default can fold. */
|
|
144
|
+
type NamesComposition<TPose> = [TPose] extends [RectPose] ? unknown : {
|
|
145
|
+
composition: PoseComposition<TPose>;
|
|
146
|
+
};
|
|
147
|
+
/** Everything `useScene` takes, with `composition` optional. */
|
|
148
|
+
interface SceneOptions<TData, TLayer extends string, TPose = RectPose> {
|
|
140
149
|
systemLayers: readonly SystemLayerSpec<TLayer>[];
|
|
141
150
|
initial?: readonly AddNodeSpec<TData, TLayer, TPose>[];
|
|
142
151
|
/** The document values the scene starts with, outside history. See `Scene.doc`. */
|
|
@@ -155,7 +164,12 @@ interface UseSceneOptions<TData, TLayer extends string, TPose = RectPose> {
|
|
|
155
164
|
/** Per-scene registry for non-serializable function fields (clipFromPose, etc.).
|
|
156
165
|
* Required only when serializing/deserializing scenes that use function fields. */
|
|
157
166
|
registry?: SceneRegistry<TPose, TData, TLayer>;
|
|
158
|
-
/** How a child's pose folds into its container's.
|
|
167
|
+
/** How a child's pose folds into its container's frame. A stored child pose
|
|
168
|
+
* is local to the nearest container that defines a frame, and moving a
|
|
169
|
+
* container writes one pose. Default `RIGID_POSE_COMPOSITION`, which reads
|
|
170
|
+
* `x`, `y`, `width`, `height`, `rotation` and `transform`; a scene of any
|
|
171
|
+
* other pose names its own, or `IDENTITY_POSE_COMPOSITION`, under which every
|
|
172
|
+
* pose is world and a container never carries its children. */
|
|
159
173
|
composition?: PoseComposition<TPose>;
|
|
160
174
|
/** How laid-out containers are measured. See {@link LayoutFrame}. */
|
|
161
175
|
layoutFrame?: LayoutFrame<TPose>;
|
|
@@ -478,6 +492,17 @@ interface CanvasViewCommonProps {
|
|
|
478
492
|
/** Which of the surface's layers this view paints. Defaults to all of them —
|
|
479
493
|
* the same content through a second camera. */
|
|
480
494
|
layers?: (surface: readonly RenderLayer<unknown>[]) => readonly RenderLayer<unknown>[];
|
|
495
|
+
/**
|
|
496
|
+
* The id of a view whose layers this one paints, read at every paint and
|
|
497
|
+
* pick: what that view paints, as a `parent` gives a nested view, narrowed by
|
|
498
|
+
* this view's own `layers`, `layerVisibility` and `layerOrder`. Where that
|
|
499
|
+
* view owns a selection and this one does not, this view acts on that
|
|
500
|
+
* selection and draws its chrome. Its rect and camera are not taken; this
|
|
501
|
+
* view is still measured on its own frame. A loupe aimed over a panel
|
|
502
|
+
* follows the panel. `null`, or an id no view has, paints what this view
|
|
503
|
+
* would without it.
|
|
504
|
+
*/
|
|
505
|
+
follows?: () => string | null;
|
|
481
506
|
/**
|
|
482
507
|
* Show or hide layers in this view only, by id — the map `<Canvas>` takes,
|
|
483
508
|
* applied after `layers` narrows the stack. A scene layer paints as
|
|
@@ -1087,6 +1112,12 @@ declare function composeRigidPose<TPose extends RectPose>(parent: TPose, child:
|
|
|
1087
1112
|
/** Inverse of `composeRigidPose` — un-turns about the parent's center, then
|
|
1088
1113
|
* subtracts the parent's offset. */
|
|
1089
1114
|
declare function decomposeRigidPose<TPose extends RectPose>(parent: TPose, world: TPose): TPose;
|
|
1115
|
+
/** `scroll` for `composeRectPose`: the frame moved by minus `offset`. */
|
|
1116
|
+
declare function scrollRectPose<TPose extends RectPose>(frame: TPose, offset: ScrollOffset): TPose;
|
|
1117
|
+
/** `scroll` for `composeRigidPose`: the frame moved by minus `offset` taken
|
|
1118
|
+
* through its own rotation and `transform`, so content scrolls along the
|
|
1119
|
+
* container's axes however it is turned. */
|
|
1120
|
+
declare function scrollRigidPose<TPose extends RectPose>(frame: TPose, offset: ScrollOffset): TPose;
|
|
1090
1121
|
/** Translation-only composition over `RectPose`. What a scene wants when a
|
|
1091
1122
|
* container groups its children but never turns them. */
|
|
1092
1123
|
declare const RECT_POSE_COMPOSITION: PoseComposition<RectPose>;
|
|
@@ -1103,6 +1134,22 @@ declare const RIGID_POSE_COMPOSITION: PoseComposition<RectPose>;
|
|
|
1103
1134
|
*/
|
|
1104
1135
|
declare function worldPoseLookup<TPose>(adapter: PoseAdapter<TPose>, compose: (parent: TPose, child: TPose) => TPose): (id: string) => TPose | null;
|
|
1105
1136
|
|
|
1137
|
+
/**
|
|
1138
|
+
* World reads and local writes, paired, for the default actions.
|
|
1139
|
+
*
|
|
1140
|
+
* A container's pose defines a frame, so a node's stored pose is expressed in
|
|
1141
|
+
* its parent's. The geometry an action reasons about is world; every pose it
|
|
1142
|
+
* writes back through `setPose` or a pose op is local. An action that reads
|
|
1143
|
+
* world and writes world looks right for one gesture and drifts on the next,
|
|
1144
|
+
* because the stored pose is then read in the parent's frame again.
|
|
1145
|
+
*
|
|
1146
|
+
* Under `IDENTITY_POSE_COMPOSITION` local and world are the same value.
|
|
1147
|
+
*
|
|
1148
|
+
* A scene-backed frame reads world as the view shows it, a scrolled
|
|
1149
|
+
* container's content moved by its offset, and writes back through the same
|
|
1150
|
+
* fold, so a pose an action stores is the content position.
|
|
1151
|
+
*/
|
|
1152
|
+
|
|
1106
1153
|
/** The two directions an action needs, over one composition strategy. */
|
|
1107
1154
|
interface PoseFrame<TPose> {
|
|
1108
1155
|
/** The strategy in force. `closure` says what it can express exactly. */
|
|
@@ -1111,8 +1158,11 @@ interface PoseFrame<TPose> {
|
|
|
1111
1158
|
world(id: NodeId): TPose;
|
|
1112
1159
|
/** The node whose frame `id` is stored in, or `null` for the root frame. */
|
|
1113
1160
|
frame(id: NodeId): NodeId | null;
|
|
1114
|
-
/** World pose of the frame `id` is stored in, or `null` for the root frame
|
|
1161
|
+
/** World pose of the frame `id` is stored in, or `null` for the root frame:
|
|
1162
|
+
* the container's `childFrame`, scrolled where the view scrolls it. */
|
|
1115
1163
|
parentWorld(id: NodeId): TPose | null;
|
|
1164
|
+
/** The frame `id` gives its children when its own pose folds to `world`. */
|
|
1165
|
+
childFrame(id: NodeId, world: TPose): TPose;
|
|
1116
1166
|
/** `worldPose` expressed in `id`'s own parent frame — what `setPose` stores. */
|
|
1117
1167
|
local(id: NodeId, worldPose: TPose): TPose;
|
|
1118
1168
|
/** `worldPose` expressed under `parentId`'s frame. For a node about to be
|
|
@@ -1120,8 +1170,12 @@ interface PoseFrame<TPose> {
|
|
|
1120
1170
|
localUnder(parentId: NodeId | null, worldPose: TPose): TPose;
|
|
1121
1171
|
}
|
|
1122
1172
|
/** The `poseFrame` a scene-backed action works in, over the scene's own
|
|
1123
|
-
* composition
|
|
1173
|
+
* composition, read and written through the view's scrolled frames. */
|
|
1124
1174
|
declare function scenePoseFrame(scene: Scene<unknown, string, unknown>): PoseFrame<unknown>;
|
|
1175
|
+
/** Each node's box frame in world, `boxFrameOf` its world pose: where a
|
|
1176
|
+
* container's children are laid out, and its own grid runs. `null` for a
|
|
1177
|
+
* node missing from `scene` or whose pose is not a box. */
|
|
1178
|
+
declare function sceneBoxFrames(scene: Scene<unknown, string, unknown>): (id: string) => Affine | null;
|
|
1125
1179
|
|
|
1126
1180
|
/**
|
|
1127
1181
|
* The kit version a build was compiled from, so an app can report what it is
|
|
@@ -2011,6 +2065,9 @@ declare function interpolateView(from: View, to: View): (t: number) => View;
|
|
|
2011
2065
|
interface AimSource {
|
|
2012
2066
|
aim(): ViewAim | null;
|
|
2013
2067
|
setAim?(aim: ViewAim): void;
|
|
2068
|
+
/** Tells a marker drawing this aim that it changed, so the marker repaints. Without it the marker
|
|
2069
|
+
* repaints only when something else asks for a redraw. Returns an unsubscribe. */
|
|
2070
|
+
subscribe?(listener: () => void): () => void;
|
|
2014
2071
|
}
|
|
2015
2072
|
/** How a marker's outline is stroked, in screen px. */
|
|
2016
2073
|
interface ViewMarkerStyle {
|
|
@@ -2029,8 +2086,8 @@ interface ViewMarkerProps {
|
|
|
2029
2086
|
/** Screen px. Default: stroke `#ffffff`, width 1, dash [2, 3]. */
|
|
2030
2087
|
style?: ViewMarkerStyle;
|
|
2031
2088
|
/** Default true: dragging the marker edits the source's aim. A source with no writer is never interactive.
|
|
2032
|
-
* A marker grabs its
|
|
2033
|
-
* frame
|
|
2089
|
+
* A marker grabs its interior plus {@link VIEW_MARKER_HIT_SLOP_PX} while it covers at most three quarters
|
|
2090
|
+
* of its frame, and past that only a band that wide either side of its rim, so the frame keeps its presses. */
|
|
2034
2091
|
interactive?: boolean;
|
|
2035
2092
|
}
|
|
2036
2093
|
/** The marker style a {@link ViewMarkerProps.style} fills in from: the minimap indicator's. */
|
|
@@ -2056,7 +2113,8 @@ declare const VIEW_MARKER_HIT_SLOP_PX = 4;
|
|
|
2056
2113
|
/**
|
|
2057
2114
|
* The grab for a press at frame px `at` in `space`, the marker's target, or
|
|
2058
2115
|
* `null` when the marker is not interactive, its source has no writer or no
|
|
2059
|
-
* aim, or `at` is not on its outline or within {@link VIEW_MARKER_HIT_SLOP_PX} of it
|
|
2116
|
+
* aim, or `at` is not on its outline or within {@link VIEW_MARKER_HIT_SLOP_PX} of it — of its rim alone, for a
|
|
2117
|
+
* marker covering most of its frame (see {@link ViewMarkerProps.interactive}). A surface with views
|
|
2060
2118
|
* calls this itself; a canvas with none, such as a detached minimap, calls it to route a press to its marker.
|
|
2061
2119
|
*/
|
|
2062
2120
|
declare function grabViewMarker(props: ViewMarkerProps, host: ViewMarkerHost, space: AimSpace, at: {
|
|
@@ -2207,8 +2265,8 @@ declare const VIEW_MARKER_DRAG = "view.marker.drag";
|
|
|
2207
2265
|
declare function viewMarkerDragAction(): Action;
|
|
2208
2266
|
/**
|
|
2209
2267
|
* The always-on entry (id `'view-marker'`) that binds a drag on any marker to {@link VIEW_MARKER_DRAG}.
|
|
2210
|
-
* A `<SceneCanvas>` installs it unless `actions={null}`
|
|
2211
|
-
* dragging back on there, pass it in `ambient
|
|
2268
|
+
* A `<SceneCanvas>` installs it, beside a `tools` takeover too, unless `actions={null}` leaves it out; to turn
|
|
2269
|
+
* marker dragging back on there, pass it in `ambient`.
|
|
2212
2270
|
*/
|
|
2213
2271
|
declare function createViewMarkerContribution(): SurfaceContribution;
|
|
2214
2272
|
|
|
@@ -2943,7 +3001,7 @@ declare function DepRegistryProviderIfRoot({ children }: {
|
|
|
2943
3001
|
* only `menuHost`, `view` and `worldToClient` on a surface without a scene; `selection`, `scene`,
|
|
2944
3002
|
* `hitAt` and `kindOfNode` refine the hit and the keyboard anchor where they are supplied.
|
|
2945
3003
|
*/
|
|
2946
|
-
declare function openContextMenu(deps: ActionDeps, params?: Record<string, unknown>, anchorOf?: (deps: ActionDeps) => Point
|
|
3004
|
+
declare function openContextMenu(deps: ActionDeps, params?: Record<string, unknown>, anchorOf?: (deps: ActionDeps) => Point | null): boolean;
|
|
2947
3005
|
/**
|
|
2948
3006
|
* Opens the context menu: for the pointer on a right-click or an unclaimed
|
|
2949
3007
|
* long-press, selecting the shape under it first; for the keyboard on
|
|
@@ -3081,8 +3139,9 @@ interface UseAlignOptions<TPose> {
|
|
|
3081
3139
|
geometry?: PoseDescriptor<TPose>;
|
|
3082
3140
|
/** Label passed to applyOps. Default 'Align'. */
|
|
3083
3141
|
label?: string;
|
|
3084
|
-
/** How local poses fold up to world. Default IDENTITY,
|
|
3085
|
-
* the
|
|
3142
|
+
/** How local poses fold up to world. Default IDENTITY, which takes every
|
|
3143
|
+
* pose the adapter answers as world; over a scene's adapter, pass
|
|
3144
|
+
* `scene.composition`. */
|
|
3086
3145
|
composition?: PoseComposition<TPose>;
|
|
3087
3146
|
/** The nodes behind the adapter's ids. With it, a stroked node aligns by
|
|
3088
3147
|
* the box it is drawn with (`drawnBoundsOf`); without, by its pose box.
|
|
@@ -3137,8 +3196,9 @@ interface UseDistributeOptions<TPose> {
|
|
|
3137
3196
|
defaultMode?: DistributeMode;
|
|
3138
3197
|
/** Label passed to applyOps. Default 'Distribute'. */
|
|
3139
3198
|
label?: string;
|
|
3140
|
-
/** How local poses fold up to world. Default IDENTITY,
|
|
3141
|
-
* the
|
|
3199
|
+
/** How local poses fold up to world. Default IDENTITY, which takes every
|
|
3200
|
+
* pose the adapter answers as world; over a scene's adapter, pass
|
|
3201
|
+
* `scene.composition`. */
|
|
3142
3202
|
composition?: PoseComposition<TPose>;
|
|
3143
3203
|
}
|
|
3144
3204
|
/** Return shape of `useDistribute`. */
|
|
@@ -3196,8 +3256,7 @@ interface SetAnchorFieldParams {
|
|
|
3196
3256
|
/** A point a spatial reference of `'pointer'` resolves to in place of the
|
|
3197
3257
|
* pointer dep, when the invocation has one of its own. */
|
|
3198
3258
|
type AtPoint = {
|
|
3199
|
-
|
|
3200
|
-
worldY: number;
|
|
3259
|
+
world: WorldPoint;
|
|
3201
3260
|
};
|
|
3202
3261
|
type AlignParams = AtPoint & {
|
|
3203
3262
|
to: AlignReference;
|
|
@@ -3505,8 +3564,8 @@ declare const editingLayer: EditedLayerOf;
|
|
|
3505
3564
|
* names. An action in a scene with no `parallax` layer, or invoked with no
|
|
3506
3565
|
* scene or view to read a plane from, runs exactly as it would unwrapped.
|
|
3507
3566
|
*
|
|
3508
|
-
* An immediate action's
|
|
3509
|
-
*
|
|
3567
|
+
* An immediate action's points are its params' `world` and `press`; each
|
|
3568
|
+
* is carried when present. */
|
|
3510
3569
|
declare function inPlane<A extends Action>(action: A, layerOf: EditedLayerOf): A;
|
|
3511
3570
|
|
|
3512
3571
|
/** Binding params `viewport.dragPan` understands, read at `start`. A bare
|
|
@@ -3598,6 +3657,51 @@ declare function makeViewportWheelPanAction(opts?: WheelPanOptions): Action & {
|
|
|
3598
3657
|
requires: string[];
|
|
3599
3658
|
};
|
|
3600
3659
|
|
|
3660
|
+
/**
|
|
3661
|
+
* Wheel scrolling of a layout container whose content runs past its bounds,
|
|
3662
|
+
* such as `tileGrid({ overflow: 'scroll' })`. The strategy's `contentExtent`
|
|
3663
|
+
* says how far; the offset goes to `scene.scroll`, which moves what the view
|
|
3664
|
+
* shows and leaves the document where it is.
|
|
3665
|
+
*/
|
|
3666
|
+
|
|
3667
|
+
type AnyScene$2 = Scene<unknown, string, unknown>;
|
|
3668
|
+
/** How far a container's content can scroll on each axis, in its own units:
|
|
3669
|
+
* `[min, max]`, zero included, so an unscrolled container is in range. */
|
|
3670
|
+
interface ScrollRange {
|
|
3671
|
+
x: readonly [number, number];
|
|
3672
|
+
y: readonly [number, number];
|
|
3673
|
+
}
|
|
3674
|
+
/**
|
|
3675
|
+
* How far `id`'s content can scroll: the span its layout's `contentExtent`
|
|
3676
|
+
* reaches past its bounds, read through the document fold the layout pass
|
|
3677
|
+
* arranges it in. Measured in the container's own frame, the axes a scroll
|
|
3678
|
+
* offset runs along, so a turned container scrolls by its own length rather
|
|
3679
|
+
* than its box's. `null` for a node whose layout reports no extent, one whose
|
|
3680
|
+
* pose is not a frame, and under a composition that cannot scroll.
|
|
3681
|
+
*/
|
|
3682
|
+
declare function scrollRange(scene: AnyScene$2, id: NodeId, descriptor: PoseDescriptor<unknown>): ScrollRange | null;
|
|
3683
|
+
interface Scrollable {
|
|
3684
|
+
id: NodeId;
|
|
3685
|
+
range: ScrollRange;
|
|
3686
|
+
}
|
|
3687
|
+
/** The innermost shown container under the world point `at` whose content
|
|
3688
|
+
* can scroll, with its range. */
|
|
3689
|
+
declare function scrollableAt(scene: AnyScene$2, at: {
|
|
3690
|
+
x: number;
|
|
3691
|
+
y: number;
|
|
3692
|
+
}, descriptor: PoseDescriptor<unknown>): Scrollable | null;
|
|
3693
|
+
/**
|
|
3694
|
+
* Wheel over a container whose content runs past its bounds scrolls that
|
|
3695
|
+
* content along the container's own axes, clamped to the strategy's
|
|
3696
|
+
* `contentExtent`; Shift+wheel scrolls it across. A container already at the
|
|
3697
|
+
* end of its range in the wheel's direction hands the wheel to the scrollable
|
|
3698
|
+
* container holding it, and past the outermost one the action passes, so the
|
|
3699
|
+
* wheel pans the viewport. Anywhere else it declines.
|
|
3700
|
+
*/
|
|
3701
|
+
declare const containerScrollAction: Action & {
|
|
3702
|
+
requires: string[];
|
|
3703
|
+
};
|
|
3704
|
+
|
|
3601
3705
|
/**
|
|
3602
3706
|
* `editAnchorsAction` — ongoing Action descriptor for editing polygon anchors.
|
|
3603
3707
|
*
|
|
@@ -4065,15 +4169,15 @@ declare function useKeybindings(tools: ToolsApi, options?: UseKeybindingsOptions
|
|
|
4065
4169
|
/** Options for `useSelectTool`: how a point resolves to nodes, how a click
|
|
4066
4170
|
* chooses among them, and the appearance of the marquee. */
|
|
4067
4171
|
interface UseSelectToolOptions<TPose> {
|
|
4068
|
-
/** Return ids of all objects whose painted body covers
|
|
4172
|
+
/** Return ids of all objects whose painted body covers `world`.
|
|
4069
4173
|
* Order doesn't matter — the tool collapses parent/child overlap via
|
|
4070
4174
|
* `pickTopMostHit`. When omitted, defaults to an AABB-vs-point walk of
|
|
4071
4175
|
* the adapter's tree using the pose descriptor. Override for tighter
|
|
4072
4176
|
* shapes (path / polygon hit-tests). */
|
|
4073
|
-
pickEvery?: (
|
|
4177
|
+
pickEvery?: (world: WorldPoint) => string[];
|
|
4074
4178
|
/** Optional alt-aware selection-update hit returning the single id the
|
|
4075
4179
|
* click should act on. */
|
|
4076
|
-
pickBest?: (
|
|
4180
|
+
pickBest?: (world: WorldPoint, alt: boolean, selection: readonly string[]) => string | null;
|
|
4077
4181
|
/** How to read poses for the default `pickEvery`. Default
|
|
4078
4182
|
* `AUTO_POSE_DESCRIPTOR`. */
|
|
4079
4183
|
poseDescriptor?: PoseDescriptor<TPose>;
|
|
@@ -4243,6 +4347,43 @@ declare const onEmptyCanvas: _weasel_js_gestures.TargetPredicate & {
|
|
|
4243
4347
|
* tool adds this to its ambient list. */
|
|
4244
4348
|
declare function areaSelectContribution(): Contribution;
|
|
4245
4349
|
|
|
4350
|
+
/** The reads `pressTarget` makes: the tree, and each node's kind. */
|
|
4351
|
+
interface PressTargetTree {
|
|
4352
|
+
getParent(id: string): string | null;
|
|
4353
|
+
getNode(id: string): unknown;
|
|
4354
|
+
}
|
|
4355
|
+
|
|
4356
|
+
type Box = {
|
|
4357
|
+
x: number;
|
|
4358
|
+
y: number;
|
|
4359
|
+
width: number;
|
|
4360
|
+
height: number;
|
|
4361
|
+
};
|
|
4362
|
+
/** What `group.enter` reads: the node under a point and the tree above it. */
|
|
4363
|
+
interface EnterGroupOptions {
|
|
4364
|
+
/** The node under the point, before any group above it is considered. */
|
|
4365
|
+
pickHit: (world: WorldPoint) => string | null;
|
|
4366
|
+
tree: PressTargetTree;
|
|
4367
|
+
}
|
|
4368
|
+
/** What `group.leave` reads: where a group's box is. */
|
|
4369
|
+
interface LeaveGroupOptions {
|
|
4370
|
+
boxOf: (id: string) => Box | null;
|
|
4371
|
+
}
|
|
4372
|
+
|
|
4373
|
+
/** Id of the entry {@link createGroupEntryContribution} builds. */
|
|
4374
|
+
declare const GROUP_ENTRY_ID = "group.entry";
|
|
4375
|
+
/**
|
|
4376
|
+
* `group.enter` and `group.leave`, bound under any tool that leaves the gesture unclaimed. A
|
|
4377
|
+
* double-click on a body enters the group a press there would select, and declines where that is
|
|
4378
|
+
* no group, so text and path editing keep their double-click. Escape leaves one level, carrying
|
|
4379
|
+
* the phase `escape` does and declining with nothing entered, which leaves Escape to `escape`.
|
|
4380
|
+
* Leaving on a press is the select tool's ({@link GROUP_LEAVE_PRESS_BINDING}): under a drawing
|
|
4381
|
+
* tool a press outside the group draws into it.
|
|
4382
|
+
*/
|
|
4383
|
+
declare function createGroupEntryContribution(opts: EnterGroupOptions & LeaveGroupOptions): Contribution;
|
|
4384
|
+
/** {@link createGroupEntryContribution} for the life of a canvas, reading its pickers live. */
|
|
4385
|
+
declare function useGroupEntryContribution(opts: EnterGroupOptions & LeaveGroupOptions): Contribution;
|
|
4386
|
+
|
|
4246
4387
|
/** What `pickTopMostHit` ranks a hit list by: the tree, and a z signal where
|
|
4247
4388
|
* the adapter has one. */
|
|
4248
4389
|
interface PickTopMostHitAdapter {
|
|
@@ -4687,10 +4828,7 @@ interface UseEyedropperToolOptions {
|
|
|
4687
4828
|
declare function useEyedropperTool(opts: UseEyedropperToolOptions): Tool;
|
|
4688
4829
|
|
|
4689
4830
|
/** An endpoint of a line, in world coordinates. */
|
|
4690
|
-
|
|
4691
|
-
x: number;
|
|
4692
|
-
y: number;
|
|
4693
|
-
}
|
|
4831
|
+
type LinePoint = WorldPoint;
|
|
4694
4832
|
/**
|
|
4695
4833
|
* Drag-to-draw line tool. The `drag` binding routes to `insertAction`, which
|
|
4696
4834
|
* commits through the `insert` dep with `{ kind: 'line', a, b }` endpoints
|
|
@@ -4733,10 +4871,7 @@ interface UseLassoToolOptions extends UseLassoSelectOptions {
|
|
|
4733
4871
|
declare function useLassoTool(options?: UseLassoToolOptions): Tool;
|
|
4734
4872
|
|
|
4735
4873
|
/** A point in world coordinates. */
|
|
4736
|
-
|
|
4737
|
-
x: number;
|
|
4738
|
-
y: number;
|
|
4739
|
-
}
|
|
4874
|
+
type PolygonPoint = WorldPoint;
|
|
4740
4875
|
/** Options for `usePolygonTool`. */
|
|
4741
4876
|
interface UsePolygonToolOptions extends InsertToolOptions {
|
|
4742
4877
|
label?: string;
|
|
@@ -4763,10 +4898,7 @@ declare function usePolygonTool<TNode extends {
|
|
|
4763
4898
|
}>(options?: UsePolygonToolOptions): Tool;
|
|
4764
4899
|
|
|
4765
4900
|
/** A point in world coordinates. */
|
|
4766
|
-
|
|
4767
|
-
x: number;
|
|
4768
|
-
y: number;
|
|
4769
|
-
}
|
|
4901
|
+
type StarPoint = WorldPoint;
|
|
4770
4902
|
/** Options for `useStarTool`. */
|
|
4771
4903
|
interface UseStarToolOptions extends InsertToolOptions {
|
|
4772
4904
|
label?: string;
|
|
@@ -4853,10 +4985,7 @@ interface SliceScratch {
|
|
|
4853
4985
|
declare function useSliceTool(options?: UseSliceToolOptions): Tool;
|
|
4854
4986
|
|
|
4855
4987
|
/** A world-space point. */
|
|
4856
|
-
|
|
4857
|
-
x: number;
|
|
4858
|
-
y: number;
|
|
4859
|
-
}
|
|
4988
|
+
type MeasurePoint = Point;
|
|
4860
4989
|
/**
|
|
4861
4990
|
* The offset from `start` to `end`, in world units. `dx` and `dy` are on the
|
|
4862
4991
|
* world's own axes, where y grows downward; `angle` reads like a protractor
|
|
@@ -4930,10 +5059,10 @@ declare function createMeasurements(options: {
|
|
|
4930
5059
|
layer: string;
|
|
4931
5060
|
}): Measurements;
|
|
4932
5061
|
/** The measurement nodes on `ms.layer`, oldest first. */
|
|
4933
|
-
declare function measureIds(scene: Pick<Scene<unknown, string, unknown>, '
|
|
5062
|
+
declare function measureIds(scene: Pick<Scene<unknown, string, unknown>, 'nodesOnLayer'>, ms: Pick<Measurements, 'layer'>): NodeId[];
|
|
4934
5063
|
/** The measurement commands act on: the picked one while it is still in the
|
|
4935
5064
|
* scene, else the newest. */
|
|
4936
|
-
declare function currentMeasureId(scene: Pick<Scene<unknown, string, unknown>, '
|
|
5065
|
+
declare function currentMeasureId(scene: Pick<Scene<unknown, string, unknown>, 'nodesOnLayer' | 'get'>, ms: Pick<Measurements, 'layer' | 'picked'>): NodeId | null;
|
|
4937
5066
|
|
|
4938
5067
|
/** Options for `useMeasureTool`. */
|
|
4939
5068
|
interface UseMeasureToolOptions {
|
|
@@ -5032,790 +5161,970 @@ type ChromeId = 'selection.outline' | 'selection.resize-handles' | 'selection.ro
|
|
|
5032
5161
|
type VisibilityRules = Partial<Record<ChromeId, Condition | Rule>>;
|
|
5033
5162
|
|
|
5034
5163
|
/**
|
|
5035
|
-
*
|
|
5036
|
-
*
|
|
5037
|
-
* **Chain semantics: strict left-to-right.** No boolean precedence.
|
|
5038
|
-
* `focused.or(hovering).and(selectionIs(1))` evaluates
|
|
5039
|
-
* `((focused || hovering) && selectionIs(1))`. For grouped disjunction, use
|
|
5040
|
-
* the top-level `or` / `and` / `not` helpers or name intermediates.
|
|
5041
|
-
*
|
|
5042
|
-
* Combinators flatten same-kind nesting on construction so `a.and(b).and(c)`
|
|
5043
|
-
* produces `{ all: [a, b, c] }`.
|
|
5164
|
+
* The selection overlay's resize handles: their style, where the kit puts
|
|
5165
|
+
* them, and the commands that paint them.
|
|
5044
5166
|
*/
|
|
5045
|
-
|
|
5046
|
-
/**
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
* `.and` to make grouping explicit. */
|
|
5053
|
-
declare function or(...cs: (Condition | Rule)[]): Condition;
|
|
5054
|
-
/** `!c` — top-level negation. Most rules use `.andNot()` / `.orNot()`
|
|
5055
|
-
* instead; this is for the lead-with-negation case. */
|
|
5056
|
-
declare function not(c: Condition | Rule): Condition;
|
|
5057
|
-
/** Always true. The fallback for any chrome id without a registered rule. */
|
|
5058
|
-
declare const always: Condition;
|
|
5059
|
-
/** Always false. Useful for "turn this chrome off entirely":
|
|
5060
|
-
* `chromeVisibility={{ 'snap.guides': never }}`. */
|
|
5061
|
-
declare const never: Condition;
|
|
5062
|
-
/** Canvas surface currently focused. */
|
|
5063
|
-
declare const focused: Condition;
|
|
5064
|
-
/** Any action currently in flight (read: user is gesturing). */
|
|
5065
|
-
declare const gesturing: Condition;
|
|
5066
|
-
/** A path is currently in anchor-edit mode. */
|
|
5067
|
-
declare const editingAnchors: Condition;
|
|
5068
|
-
/** Active action's kind matches `kind` (e.g. `actionIs('move')`). */
|
|
5069
|
-
declare const actionIs: (kind: string) => Condition;
|
|
5070
|
-
/** Nothing selected. */
|
|
5071
|
-
declare const selectionEmpty: Condition;
|
|
5072
|
-
/** Exactly `n` items selected. */
|
|
5073
|
-
declare const selectionIs: (n: number) => Condition;
|
|
5074
|
-
/** At least `n` items selected. `selectionAtLeast(1)` is the common
|
|
5075
|
-
* "something is selected" check. */
|
|
5076
|
-
declare const selectionAtLeast: (n: number) => Condition;
|
|
5077
|
-
/** Multi-mode handle behavior active (single shared union-bounds
|
|
5078
|
-
* handle vs per-item handles). */
|
|
5079
|
-
declare const multiActive: Condition;
|
|
5080
|
-
/** Pointer is hovering some node. */
|
|
5081
|
-
declare const hovering: Condition;
|
|
5082
|
-
/** Pointer is hovering a node that is currently selected. */
|
|
5083
|
-
declare const hoveringSelected: Condition;
|
|
5084
|
-
/** Named modifier key currently held. */
|
|
5085
|
-
declare const modifierHeld: (m: keyof ModifierState) => Condition;
|
|
5086
|
-
/** View scale (uniform or geometric mean for non-uniform) is at least
|
|
5087
|
-
* `z`. Useful for "hide hairline chrome at low zoom" rules. */
|
|
5088
|
-
declare const zoomAtLeast: (z: number) => Condition;
|
|
5089
|
-
/** Active mode equals `m`. */
|
|
5090
|
-
declare const modeIs: (m: string) => Condition;
|
|
5091
|
-
/** Active mode is one of `modes`. */
|
|
5092
|
-
declare const modeIn: (modes: readonly string[]) => Condition;
|
|
5093
|
-
/** Active mode is NOT `m`. */
|
|
5094
|
-
declare const modeNot: (m: string) => Condition;
|
|
5095
|
-
/** Active mode's `allows` includes capability `cap`. */
|
|
5096
|
-
declare const capabilityIs: (cap: string) => Condition;
|
|
5097
|
-
/** Active mode's `allows` includes ANY of `caps` (OR). */
|
|
5098
|
-
declare const capabilityIn: (caps: readonly string[]) => Condition;
|
|
5099
|
-
/** Active mode's `allows` includes ALL of `caps` (AND). */
|
|
5100
|
-
declare const capabilityAll: (caps: readonly string[]) => Condition;
|
|
5101
|
-
/** Active mode's `allows` does NOT include capability `cap`. */
|
|
5102
|
-
declare const capabilityNot: (cap: string) => Condition;
|
|
5103
|
-
/** Primary pointer is imprecise (touch, most styluses). Absent device
|
|
5104
|
-
* profile → false. */
|
|
5105
|
-
declare const coarsePointer: Condition;
|
|
5106
|
-
/** Primary pointer can hover. Absent device profile → true. */
|
|
5107
|
-
declare const canHover: Condition;
|
|
5167
|
+
|
|
5168
|
+
/** Handle visuals, as a consumer supplies them. */
|
|
5169
|
+
interface SelectionHandleStyle {
|
|
5170
|
+
size?: number;
|
|
5171
|
+
fill?: CommandFill;
|
|
5172
|
+
outline?: CommandStroke;
|
|
5173
|
+
}
|
|
5108
5174
|
|
|
5109
5175
|
/**
|
|
5110
|
-
*
|
|
5111
|
-
*
|
|
5112
|
-
*
|
|
5113
|
-
* Gating is written in terms of **capabilities, not mode ids**. A
|
|
5114
|
-
* capability rule keeps holding when a new mode is added that permits the
|
|
5115
|
-
* same thing; a mode rule has to be found and edited every time.
|
|
5176
|
+
* The pose and box a selection's chrome is drawn around: precedence between
|
|
5177
|
+
* the in-flight overlays and the stored pose, a container's union over its
|
|
5178
|
+
* leaves, and the drawn box a scene supplies.
|
|
5116
5179
|
*/
|
|
5117
|
-
declare const defaultVisibilityRules: VisibilityRules;
|
|
5118
5180
|
|
|
5181
|
+
/** Options for `composeSelectionPose`. */
|
|
5182
|
+
interface ComposeSelectionPoseOpts<TPose> {
|
|
5183
|
+
/** Move overlay; when present its `poses` map wins over everything else. */
|
|
5184
|
+
moveOverlay?: {
|
|
5185
|
+
poses: Map<string, TPose>;
|
|
5186
|
+
} | null;
|
|
5187
|
+
/**
|
|
5188
|
+
* Resize overlay; consulted only when move overlay does not own the id.
|
|
5189
|
+
* For container resize, `leafPoses` (when present) maps each leaf id under
|
|
5190
|
+
* the container to its overlay pose. If absent the container falls back to
|
|
5191
|
+
* stored leaf poses.
|
|
5192
|
+
*/
|
|
5193
|
+
resizeOverlay?: {
|
|
5194
|
+
id: string;
|
|
5195
|
+
currentPose: TPose;
|
|
5196
|
+
leafPoses?: Map<string, TPose>;
|
|
5197
|
+
} | null;
|
|
5198
|
+
/** Fallback pose lookup (typically the stored/committed pose). */
|
|
5199
|
+
getStoredPose: (id: string) => TPose;
|
|
5200
|
+
/** How to read poses. Default `AUTO_POSE_DESCRIPTOR`. */
|
|
5201
|
+
poseDescriptor?: PoseDescriptor<TPose>;
|
|
5202
|
+
/** Walk a container's direct children (e.g. `scene.childrenOf`). With
|
|
5203
|
+
* `isContainer`, a selected container resolves to the union AABB of its
|
|
5204
|
+
* transitive leaf poses instead of its own stored pose. */
|
|
5205
|
+
getChildren?: (id: string) => readonly string[];
|
|
5206
|
+
/** True when `id` is a structural container. */
|
|
5207
|
+
isContainer?: (id: string) => boolean;
|
|
5208
|
+
/** The nodes behind the ids. With it, a container's union takes each leaf
|
|
5209
|
+
* as drawn, stroke included (`drawnBoundsOf`); without, its pose box. */
|
|
5210
|
+
scene?: DrawnBoundsScene;
|
|
5211
|
+
/** View scale a screen-pixel stroke is resolved at. Default 1. */
|
|
5212
|
+
viewScale?: () => number | Scale2;
|
|
5213
|
+
}
|
|
5119
5214
|
/**
|
|
5120
|
-
* Build
|
|
5121
|
-
*
|
|
5122
|
-
*
|
|
5123
|
-
*
|
|
5124
|
-
*
|
|
5125
|
-
* opted into modality behaves exactly like one sitting in normal mode.
|
|
5215
|
+
* Build a pose resolver for a selection. Precedence per id:
|
|
5216
|
+
* move overlay > resize overlay > stored. When `getChildren`/`isContainer`
|
|
5217
|
+
* are supplied and the id resolves to a container, the resolver returns the
|
|
5218
|
+
* union AABB of all transitive leaf poses (each leaf still subject to the
|
|
5219
|
+
* precedence rules). Containers with no leaves resolve to `null`.
|
|
5126
5220
|
*/
|
|
5127
|
-
declare function
|
|
5221
|
+
declare function composeSelectionPose<TPose>(opts: ComposeSelectionPoseOpts<TPose>): (id: string) => TPose | null;
|
|
5128
5222
|
|
|
5129
5223
|
/**
|
|
5130
|
-
*
|
|
5131
|
-
*
|
|
5132
|
-
*
|
|
5224
|
+
* Selection overlay primitives — render layers for drawing selection
|
|
5225
|
+
* outlines and resize handles.
|
|
5226
|
+
*
|
|
5227
|
+
* **Pose shape:** TPose is generic; callers pass `poseDescriptor` for poses
|
|
5228
|
+
* `AUTO_POSE_DESCRIPTOR` can't read. Container ids reduce via `unionAABB`
|
|
5229
|
+
* over the projected AABBs.
|
|
5133
5230
|
*/
|
|
5134
5231
|
|
|
5135
|
-
/**
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
/** Last-hovered NodeId for chrome-caps rules. */
|
|
5153
|
-
|
|
5154
|
-
/** Options for `useHoverTracking`. */
|
|
5155
|
-
interface UseHoverTrackingArgs {
|
|
5156
|
-
/** Topmost id under a client point, or null. */
|
|
5157
|
-
nodeAtClientPoint: (clientX: number, clientY: number) => {
|
|
5158
|
-
id: NodeId;
|
|
5159
|
-
} | null;
|
|
5160
|
-
enabled?: boolean;
|
|
5161
|
-
/** Called when the hovered id changes, `null` once the pointer is over no node or has left. */
|
|
5162
|
-
onChange?: (id: NodeId | null) => void;
|
|
5163
|
-
}
|
|
5164
|
-
/** What `useHoverTracking` returns. Both members keep their identity. */
|
|
5165
|
-
interface HoverTracking {
|
|
5166
|
-
/** The node the pointer is over, or null. */
|
|
5167
|
-
getHover: () => NodeId | null;
|
|
5168
|
-
/** Hand it the element to track, or null to stop: a callback ref, so an
|
|
5169
|
-
* element that mounts after the hook is tracked from the moment it arrives. */
|
|
5170
|
-
canvasRef: (element: HTMLElement | null) => void;
|
|
5232
|
+
/** Options every selection layer shares. `getSelection` and `getPose` are
|
|
5233
|
+
* declared on {@link SelectionOverlayLayerOpts}, which makes both optional —
|
|
5234
|
+
* omitted, they come off the draw envelope. */
|
|
5235
|
+
interface SelectionLayerCommon<TPose> {
|
|
5236
|
+
/** How to read poses. Default `AUTO_POSE_DESCRIPTOR`. */
|
|
5237
|
+
poseDescriptor?: PoseDescriptor<TPose>;
|
|
5238
|
+
/** Walk a container's direct children (e.g. `scene.childrenOf`). When
|
|
5239
|
+
* supplied with `isContainer`, any id that resolves to a container is
|
|
5240
|
+
* rendered using the union bounds of all its transitive leaves. */
|
|
5241
|
+
getChildren?: (id: string) => readonly string[];
|
|
5242
|
+
/** True when `id` is a structural container. */
|
|
5243
|
+
isContainer?: (id: string) => boolean;
|
|
5244
|
+
/** The nodes behind the ids `getPose` answers for. With it, a stroked
|
|
5245
|
+
* node's chrome sits on its stroke (`drawnBoundsOf`); without, on its
|
|
5246
|
+
* pose box. Ignored when bounds come off the draw envelope. */
|
|
5247
|
+
scene?: DrawnBoundsScene;
|
|
5171
5248
|
}
|
|
5172
|
-
/**
|
|
5173
|
-
*
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
interface
|
|
5180
|
-
/** Hit-test override. Return the topmost id, the full back-to-front hit
|
|
5181
|
-
* stack (`string[]`), or `null` for empty space. The stack form lets a
|
|
5182
|
-
* consumer with domain overlap ordering (e.g. children over their
|
|
5183
|
-
* container) feed the kit's `pickTopMostHit` the true order instead of
|
|
5184
|
-
* pre-collapsing to one id. Matches `Canvas`'s `pickEvery` shape. */
|
|
5185
|
-
pickEvery?: (worldX: number, worldY: number) => string | string[] | null;
|
|
5186
|
-
boundsOf?: (id: string) => FramedBox | null;
|
|
5187
|
-
/**
|
|
5188
|
-
* What "the pointer is on this node" means for the default body-pick.
|
|
5189
|
-
*
|
|
5190
|
-
* - `'pose'` — the node's pose rect, rotation honored.
|
|
5191
|
-
* - `'shape'` (default) — the pose rect as a pre-filter, then the ink the painter
|
|
5192
|
-
* actually lays down: its silhouette filled or not per the painter's `ink`, plus
|
|
5193
|
-
* its outline widened by the stroke half-width and `pickTolerancePx`.
|
|
5194
|
-
*
|
|
5195
|
-
* Painters with no silhouette keep the pose-rect answer either way. Ignored when
|
|
5196
|
-
* `pickEvery` is supplied: that override owns the test.
|
|
5197
|
-
*/
|
|
5198
|
-
picking?: 'pose' | 'shape';
|
|
5249
|
+
/** Options for `createSelectionOutlineLayer`. The overlay layer's options
|
|
5250
|
+
* minus the handle visuals — the two run the same body. */
|
|
5251
|
+
type SelectionOutlineLayerOpts<TPose> = Omit<SelectionOverlayLayerOpts<TPose>, 'handles' | 'handlesOf' | 'resizeHandles' | 'rotationHandle'>;
|
|
5252
|
+
/** Options for `createSelectionHandlesLayer`. The overlay layer's options
|
|
5253
|
+
* minus the outline stroke — the two run the same body. */
|
|
5254
|
+
type SelectionHandlesLayerOpts<TPose> = Omit<SelectionOverlayLayerOpts<TPose>, 'outline'>;
|
|
5255
|
+
/** Options for `createSelectionOverlayLayer`. */
|
|
5256
|
+
interface SelectionOverlayLayerOpts<TPose> extends SelectionLayerCommon<TPose> {
|
|
5199
5257
|
/**
|
|
5200
|
-
*
|
|
5201
|
-
*
|
|
5202
|
-
*
|
|
5203
|
-
* survive it. Set `0` for exact geometry.
|
|
5258
|
+
* Which ids to draw chrome for. Omit to take them from the `ChromeState` on
|
|
5259
|
+
* the draw envelope, which is what makes one canvas's several views each
|
|
5260
|
+
* outline their own selection — the layer is shared, the envelope is not.
|
|
5204
5261
|
*/
|
|
5205
|
-
|
|
5262
|
+
getSelection?: () => readonly NodeId[];
|
|
5206
5263
|
/**
|
|
5207
|
-
*
|
|
5208
|
-
*
|
|
5209
|
-
*
|
|
5210
|
-
*
|
|
5211
|
-
*
|
|
5264
|
+
* Resolve an id to the pose to draw chrome around. Return null to skip an
|
|
5265
|
+
* id. Omit to take bounds from the same envelope `getSelection` omitted
|
|
5266
|
+
* takes ids from.
|
|
5267
|
+
*
|
|
5268
|
+
* Takes `string` rather than `NodeId` because the container-aware resolver
|
|
5269
|
+
* walks expanded leaf ids via `getChildren`, which is generic over strings.
|
|
5212
5270
|
*/
|
|
5213
|
-
|
|
5271
|
+
getPose?: (id: string) => TPose | null;
|
|
5272
|
+
outline?: CommandStroke & {
|
|
5273
|
+
pad?: number;
|
|
5274
|
+
};
|
|
5275
|
+
/** Pass `false` to render outlines only. */
|
|
5276
|
+
handles?: SelectionHandleStyle | false;
|
|
5277
|
+
/** Where to paint handles, in the bounds' own frame. Replaces the kit's
|
|
5278
|
+
* layout, `resizeHandles` included. */
|
|
5279
|
+
handlesOf?: (bounds: FramedBox) => {
|
|
5280
|
+
x: number;
|
|
5281
|
+
y: number;
|
|
5282
|
+
}[];
|
|
5283
|
+
/** The layout the resize affordance hits by: its `hitRadiusPx`, never
|
|
5284
|
+
* `handles.size`, decides which edge handles are painted. Default: edges on,
|
|
5285
|
+
* at the kit's default hit radius. */
|
|
5286
|
+
resizeHandles?: Partial<ResizeHandleLayout>;
|
|
5287
|
+
/** Draw a rotate badge above the selection's top edge. `true` places it at
|
|
5288
|
+
* the default offset; `distance` sets the offset in screen pixels. Off by
|
|
5289
|
+
* default. */
|
|
5290
|
+
rotationHandle?: boolean | {
|
|
5291
|
+
distance?: number;
|
|
5292
|
+
};
|
|
5293
|
+
/** Optional separate id list for the per-item outline pass, for a
|
|
5294
|
+
* multi-selection whose handle pass works against a synthetic union id
|
|
5295
|
+
* (e.g. `MULTI_RESIZE_TARGET_ID`) while each real member is outlined.
|
|
5296
|
+
* When omitted, the outline pass uses the handle pass's ids. */
|
|
5297
|
+
getOutlineIds?: () => readonly NodeId[];
|
|
5298
|
+
/** Optional set of ids to suppress entirely — both outline and handles
|
|
5299
|
+
* are skipped. */
|
|
5300
|
+
getSuppressedIds?: () => ReadonlySet<string>;
|
|
5214
5301
|
}
|
|
5302
|
+
/**
|
|
5303
|
+
* `RenderLayer` that draws selection outlines only. Stack alongside
|
|
5304
|
+
* `createSelectionHandlesLayer` (or use `createSelectionOverlayLayer`, which
|
|
5305
|
+
* runs both passes in one layer) when both are wanted.
|
|
5306
|
+
*/
|
|
5307
|
+
declare function createSelectionOutlineLayer<TPose>(opts: SelectionOutlineLayerOpts<TPose>): RenderLayer<unknown>;
|
|
5308
|
+
/**
|
|
5309
|
+
* `RenderLayer` that draws selection handles only. Stack on top of
|
|
5310
|
+
* `createSelectionOutlineLayer` (handles render on top of the outline).
|
|
5311
|
+
*/
|
|
5312
|
+
declare function createSelectionHandlesLayer<TPose>(opts: SelectionHandlesLayerOpts<TPose>): RenderLayer<unknown>;
|
|
5313
|
+
/**
|
|
5314
|
+
* Draws outlines then handles in a single layer. Exactly equivalent to
|
|
5315
|
+
* stacking `createSelectionOutlineLayer` and `createSelectionHandlesLayer` —
|
|
5316
|
+
* all three run the same body. Pass `handles: false` to render outlines only.
|
|
5317
|
+
*/
|
|
5318
|
+
declare function createSelectionOverlayLayer<TPose>(opts: SelectionOverlayLayerOpts<TPose>): RenderLayer<unknown>;
|
|
5215
5319
|
|
|
5216
|
-
/**
|
|
5217
|
-
*
|
|
5218
|
-
|
|
5219
|
-
id: string;
|
|
5220
|
-
kind: string;
|
|
5221
|
-
}
|
|
5222
|
-
/** `<SceneCanvas>`'s props for what the pointer can reach and what a click names. */
|
|
5223
|
-
interface SceneCanvasPointerProps {
|
|
5224
|
-
/**
|
|
5225
|
-
* Per-id pointer-interactivity predicate: an id it returns `false` for is excluded from
|
|
5226
|
-
* hit-test results. Typical use: suppressing pointer events for dimmed nodes.
|
|
5227
|
-
*/
|
|
5228
|
-
isPointerInteractive?: (id: string) => boolean;
|
|
5229
|
-
/**
|
|
5230
|
-
* The entered group: the group a press resolves inside of, and which a double-click drills down
|
|
5231
|
-
* from. Nodes outside it take no hits. Pass one from `useEnteredGroup(scene)` to read or drive it
|
|
5232
|
-
* from outside the canvas, as `selection` is passed; without it the canvas keeps its own.
|
|
5233
|
-
*/
|
|
5234
|
-
enteredGroup?: EnteredGroupApi;
|
|
5235
|
-
/**
|
|
5236
|
-
* Called when the user double-clicks the canvas, with the hit node (id + kind) at that
|
|
5237
|
-
* position, or `null` on empty canvas. A notification, not a binding: it fires whatever the
|
|
5238
|
-
* double-click does. Entering a mode on the node belongs to `modeTriggers` instead.
|
|
5239
|
-
*/
|
|
5240
|
-
onDoubleClick?: (hit: SceneCanvasHit | null) => void;
|
|
5241
|
-
/** Called on every click — a press and release without a drag — with the
|
|
5242
|
-
* node under it, or `null` on empty canvas. Fires after the click's own
|
|
5243
|
-
* behavior, so a pick it made is already in the selection, and fires
|
|
5244
|
-
* again on a node that was already picked. */
|
|
5245
|
-
onClick?: (hit: SceneCanvasHit | null) => void;
|
|
5246
|
-
/** Called when the topmost pickable node under the pointer changes, with
|
|
5247
|
-
* its id, and with `null` once there is none or the pointer leaves. */
|
|
5248
|
-
onHover?: (id: string | null) => void;
|
|
5249
|
-
}
|
|
5320
|
+
/**
|
|
5321
|
+
* The scene slot: an adapter's tree as render layers, one per scene layer.
|
|
5322
|
+
*/
|
|
5250
5323
|
|
|
5251
|
-
/**
|
|
5252
|
-
interface
|
|
5324
|
+
/** Scene slot config — describes how to draw one object with its effective pose. */
|
|
5325
|
+
interface SceneSlotConfig<TNode extends {
|
|
5326
|
+
id: string;
|
|
5327
|
+
}, TPose> {
|
|
5328
|
+
/** Paint these, in this order, in place of the adapter's tree: one flat run with no
|
|
5329
|
+
* scene layers, no container clips, and no pose composition. */
|
|
5330
|
+
objects?: TNode[];
|
|
5331
|
+
/** The pose an object is painted at. Defaults to `adapter.getPose(obj.id)`. `<SceneCanvas>`
|
|
5332
|
+
* hands it each node as the scene shows it, its `pose` an override's or a derived one,
|
|
5333
|
+
* and carries an override's `path` into the box it answers; return a pose placed from
|
|
5334
|
+
* `obj.pose`, or a drag in flight and a rig's motion do not show in this view. */
|
|
5335
|
+
toPose?: (obj: TNode) => TPose;
|
|
5336
|
+
/** Draw a single object as a `DrawCommand` tree. `ctx` carries a derived
|
|
5337
|
+
* node's path: `<SceneCanvas>` resolves it from the scene, and
|
|
5338
|
+
* `buildSceneLayer` called without one from its adapter. */
|
|
5339
|
+
drawOne: (obj: TNode, pose: TPose, view: View, ctx?: NodePaintCtx) => DrawCommand[];
|
|
5340
|
+
/** The path a container derives from its dependencies' poses, for the clip
|
|
5341
|
+
* it imposes on its subtree — `drawOne`'s `ctx` carries the derived path a
|
|
5342
|
+
* node *paints*, this one the clip it *imposes*. A scene-aware caller
|
|
5343
|
+
* supplies it; left out, both are resolved off the adapter. */
|
|
5344
|
+
derivedPathOf?: (obj: TNode, pose: TPose) => Path | null;
|
|
5345
|
+
/** Default ghost alpha for the move-overlay slot. Default 0.85. */
|
|
5346
|
+
ghostAlpha?: number;
|
|
5347
|
+
/** Per-id alpha multiplier. A node's emitted `DrawCommand[]` is wrapped in a
|
|
5348
|
+
* `{ kind: 'group', alpha }` when the returned value is not 1. */
|
|
5349
|
+
alphaFor?: (id: string) => number;
|
|
5253
5350
|
/**
|
|
5254
|
-
*
|
|
5255
|
-
* `
|
|
5256
|
-
*
|
|
5257
|
-
*
|
|
5258
|
-
*
|
|
5351
|
+
* Post-processor for the scene slot's emitted commands: called with the final
|
|
5352
|
+
* world-space `DrawCommand[]` each time a scene canvas layer draws (after per-node
|
|
5353
|
+
* rotation wrapping and `alphaFor`), once per layer when the slot is split into
|
|
5354
|
+
* `scene:<layerId>` layers. Its return value replaces the array handed to the renderer.
|
|
5355
|
+
*
|
|
5356
|
+
* Commands are world-space — `drawLayers` applies the view transform afterward. Clip
|
|
5357
|
+
* nesting is capped at 7 levels; a wrapping group with `clip` consumes one. The
|
|
5358
|
+
* move-overlay ghost (drag preview) is not post-processed.
|
|
5259
5359
|
*/
|
|
5260
|
-
|
|
5360
|
+
postProcess?: (cmds: DrawCommand[], view: View, dims: Dims) => DrawCommand[];
|
|
5261
5361
|
/**
|
|
5262
|
-
*
|
|
5263
|
-
*
|
|
5264
|
-
*
|
|
5362
|
+
* Skip what cannot reach the view. A node `paintBounds` places outside the
|
|
5363
|
+
* `dims` rectangle under `view` is not painted at all; then, after
|
|
5364
|
+
* `postProcess`, `cullDrawCommands` drops any remaining command that cannot
|
|
5365
|
+
* reach it — see there for what it can and cannot bound. So `postProcess`
|
|
5366
|
+
* sees an empty group where a culled node would have painted.
|
|
5367
|
+
*
|
|
5368
|
+
* Off by default because it makes the layer's world-space output depend on
|
|
5369
|
+
* the view: anything that draws this layer once and shows the result under
|
|
5370
|
+
* another view — a cache keyed without `view`, a consumer re-wrapping the
|
|
5371
|
+
* commands — would show the first view's cull.
|
|
5265
5372
|
*/
|
|
5266
|
-
|
|
5373
|
+
cull?: boolean;
|
|
5267
5374
|
/**
|
|
5268
|
-
*
|
|
5269
|
-
*
|
|
5375
|
+
* Where `drawOne`'s output for a node can reach, in the frame it paints in
|
|
5376
|
+
* — before the pose rotation the slot wraps it in. `null` for a node it
|
|
5377
|
+
* cannot bound cheaply. Read only under `cull`, which skips `drawOne` for a
|
|
5378
|
+
* node whose box misses the view, so it must enclose everything `drawOne`
|
|
5379
|
+
* paints: a box too small makes a node vanish before it leaves the screen.
|
|
5380
|
+
*
|
|
5381
|
+
* `<SceneCanvas>` supplies `defaultPaintBounds` while `drawOne` is
|
|
5382
|
+
* `defaultDrawOne`. Omit it with any other `drawOne` and culling only
|
|
5383
|
+
* trims commands after painting.
|
|
5270
5384
|
*/
|
|
5271
|
-
|
|
5385
|
+
paintBounds?: PaintBoundsFn<TNode, TPose>;
|
|
5272
5386
|
}
|
|
5273
5387
|
|
|
5274
5388
|
/**
|
|
5275
|
-
*
|
|
5276
|
-
*
|
|
5389
|
+
* The draw commands path edit paints for the open path, in screen space: its
|
|
5390
|
+
* outline, then each anchor's handles and marker.
|
|
5277
5391
|
*/
|
|
5278
|
-
declare const kitTextHandler: ContentHandlerEntry;
|
|
5279
5392
|
|
|
5280
|
-
/**
|
|
5281
|
-
interface
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5393
|
+
/** Appearance of the outline and of the anchor and handle markers. */
|
|
5394
|
+
interface PathEditingOverlayStyle {
|
|
5395
|
+
anchorSizePx?: number;
|
|
5396
|
+
handleDotRadiusPx?: number;
|
|
5397
|
+
anchorFill?: string;
|
|
5398
|
+
anchorStroke?: string;
|
|
5399
|
+
handleStroke?: string;
|
|
5400
|
+
/** Fill of the control-point circle. Defaults to the handleStroke color
|
|
5401
|
+
* at 50% alpha. */
|
|
5402
|
+
handleDotFill?: string;
|
|
5403
|
+
/** Fill of a selected anchor square. Defaults to the anchor stroke color. */
|
|
5404
|
+
anchorFillSelected?: string;
|
|
5405
|
+
/** The open path's outline, drawn over its own fill and stroke so the path
|
|
5406
|
+
* shows however its paint and its markers cover it. */
|
|
5407
|
+
outlineStroke?: string;
|
|
5408
|
+
outlineWidthPx?: number;
|
|
5409
|
+
/** Radius of the dot an unselected anchor shrinks to where anchors sit
|
|
5410
|
+
* closer together on screen than a marker is wide. */
|
|
5411
|
+
denseDotRadiusPx?: number;
|
|
5412
|
+
/** Stroke of the marquee rubber band. */
|
|
5413
|
+
marqueeStroke?: string;
|
|
5414
|
+
/** Fill of the marquee rubber band. */
|
|
5415
|
+
marqueeFill?: string;
|
|
5286
5416
|
}
|
|
5287
|
-
/**
|
|
5288
|
-
|
|
5289
|
-
* empty when they cancel. Must be called from a user gesture (a click
|
|
5290
|
-
* handler): browsers block programmatic `input.click()` otherwise. Pairs
|
|
5291
|
-
* with `CanvasExtensionApi.ingest`:
|
|
5292
|
-
*
|
|
5293
|
-
* ```ts
|
|
5294
|
-
* const files = await openFilePicker({ accept: 'image/*', multiple: true });
|
|
5295
|
-
* canvasRef.current?.ingest(files);
|
|
5296
|
-
* ```
|
|
5297
|
-
*/
|
|
5298
|
-
declare function openFilePicker(opts?: OpenFilePickerOptions): Promise<File[]>;
|
|
5417
|
+
/** The path-edit overlay's look where a {@link PathEditingOverlayStyle} leaves a field out. */
|
|
5418
|
+
declare const DEFAULT_OVERLAY_STYLE: Required<PathEditingOverlayStyle>;
|
|
5299
5419
|
|
|
5300
5420
|
/**
|
|
5301
|
-
*
|
|
5302
|
-
*
|
|
5303
|
-
*
|
|
5421
|
+
* Screen-space render layer for path-editing chrome — the open path's
|
|
5422
|
+
* outline, anchor markers, tangent lines, and control-point dots for a
|
|
5423
|
+
* polygon path that is the current edit target, under them whatever marks
|
|
5424
|
+
* its path-edit extensions draw. Marker sizes stay constant regardless of zoom.
|
|
5304
5425
|
*/
|
|
5305
5426
|
|
|
5306
|
-
/**
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5427
|
+
/** Options for `createPathEditingOverlayLayer`. Everything is read per frame,
|
|
5428
|
+
* so the layer follows a changing edit target without being rebuilt. */
|
|
5429
|
+
interface CreatePathEditingOverlayLayerOptions {
|
|
5430
|
+
/** Returns the id of the polygon currently in anchor-edit mode, or null
|
|
5431
|
+
* when no node is being edited. */
|
|
5432
|
+
getEditingId(): string | null;
|
|
5433
|
+
/**
|
|
5434
|
+
* Returns the pose for an id, or null if the node has been deleted.
|
|
5435
|
+
* Non-polygon poses are tolerated (the layer no-ops on them).
|
|
5436
|
+
*
|
|
5437
|
+
* `previews` are the drawing view's in-flight preview surfaces, so an
|
|
5438
|
+
* anchor dragged in one panel does not move in the others. Resolve against
|
|
5439
|
+
* them before falling back to the committed pose.
|
|
5440
|
+
*
|
|
5441
|
+
* `view` is the drawing view's camera. Answer in its world: a node whose
|
|
5442
|
+
* layer is a parallax plane stores its path in the plane's.
|
|
5443
|
+
*/
|
|
5444
|
+
getPose(id: string, previews: readonly GesturePreviewSource[], view: View): Path | null;
|
|
5445
|
+
/** The marker of each anchor, by flat index, for a node whose path was
|
|
5446
|
+
* drawn from a form (`PathRepresentation.anchorMarkers`); null, or an
|
|
5447
|
+
* anchor with none, draws a square. Resolve against `previews` as
|
|
5448
|
+
* `getPose` does. */
|
|
5449
|
+
getAnchorMarkers?(id: string, previews: readonly GesturePreviewSource[]): readonly (AnchorMarkerShape | null)[] | null;
|
|
5450
|
+
/** Flat indices of the selected anchors. Selected anchors render
|
|
5451
|
+
* filled; unselected ones hollow. */
|
|
5452
|
+
getSelectedAnchors?(): ReadonlySet<number>;
|
|
5453
|
+
/** In-flight anchor-marquee rect in world coords, or null. Drawn as a
|
|
5454
|
+
* rubber band while `marqueeAnchorsAction` is dragging. */
|
|
5455
|
+
getMarquee?(view: View): {
|
|
5456
|
+
x: number;
|
|
5457
|
+
y: number;
|
|
5458
|
+
width: number;
|
|
5459
|
+
height: number;
|
|
5460
|
+
} | null;
|
|
5461
|
+
/** The edited node's committed pose and data, which extensions' marks read. */
|
|
5462
|
+
getNode?(id: string): {
|
|
5463
|
+
pose: unknown;
|
|
5464
|
+
data: unknown;
|
|
5465
|
+
layer?: string;
|
|
5466
|
+
} | null;
|
|
5467
|
+
/** The path-edit extensions whose marks are drawn, in order. */
|
|
5468
|
+
getExtensions?(): readonly PathEditExtension[];
|
|
5469
|
+
/** The selected extension mark, or null. */
|
|
5470
|
+
getSelectedMark?(): PathEditMark | null;
|
|
5471
|
+
/** Optional styling overrides. */
|
|
5472
|
+
style?: PathEditingOverlayStyle;
|
|
5311
5473
|
}
|
|
5312
|
-
/**
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5474
|
+
/** Render layer that draws the outline and the anchors and control handles
|
|
5475
|
+
* of the path currently being anchor-edited. Draws nothing when no path is
|
|
5476
|
+
* being edited. */
|
|
5477
|
+
declare function createPathEditingOverlayLayer(opts: CreatePathEditingOverlayLayerOptions): RenderLayer<unknown>;
|
|
5478
|
+
|
|
5479
|
+
/** Standard slot names — render in this canonical order.
|
|
5480
|
+
* `cellHighlight` is not an anchor for custom layers: it sits between the
|
|
5481
|
+
* grid and the scene, so anchor to one of those. */
|
|
5482
|
+
/** @internal */
|
|
5483
|
+
declare const STANDARD_SLOTS: readonly ["grid", "cellHighlight", "scene", "selectionOverlay"];
|
|
5484
|
+
/** Names of the slots `<Canvas>` supports out of the box (excluding the implicit cell-highlight overlay). */
|
|
5485
|
+
type StandardSlotName = Exclude<(typeof STANDARD_SLOTS)[number], 'cellHighlight'>;
|
|
5486
|
+
/** Custom layer entry — any key not in `STANDARD_SLOTS`. The presence of
|
|
5487
|
+
* `.layer` discriminates this from a slot config. */
|
|
5488
|
+
interface CustomLayerEntry {
|
|
5489
|
+
layer: RenderLayer<unknown>;
|
|
5490
|
+
/** Insert immediately after the named standard slot or another custom-layer key. */
|
|
5491
|
+
after?: StandardSlotName | (string & {});
|
|
5492
|
+
/** Insert immediately before the named standard slot or another custom-layer key. */
|
|
5493
|
+
before?: StandardSlotName | (string & {});
|
|
5324
5494
|
}
|
|
5325
|
-
/**
|
|
5326
|
-
*
|
|
5327
|
-
|
|
5495
|
+
/** Selection-overlay slot config — passed through to `createSelectionOverlayLayer`,
|
|
5496
|
+
* minus the `getSelection`/`getPose` the canvas wires automatically and the
|
|
5497
|
+
* `resizeHandles` it takes from the hit-test, so the two cannot disagree. */
|
|
5498
|
+
type SelectionOverlaySlotConfig<TPose> = Omit<SelectionOverlayLayerOpts<TPose>, 'getSelection' | 'getPose' | 'resizeHandles'> & {
|
|
5499
|
+
/** Override the auto-wired pose lookup (overlay-aware → adapter fallback). */
|
|
5500
|
+
poseById?: (id: string) => TPose | null;
|
|
5501
|
+
};
|
|
5502
|
+
/** Path-edit overlay slot config: how `<SceneCanvas>` draws the chrome of the
|
|
5503
|
+
* path whose anchors are being edited. */
|
|
5504
|
+
interface PathEditingOverlaySlotConfig {
|
|
5505
|
+
/** Anchor and handle marker overrides. */
|
|
5506
|
+
style?: PathEditingOverlayStyle;
|
|
5507
|
+
}
|
|
5508
|
+
/** Per-slot config union. The key narrows it in practice. */
|
|
5509
|
+
type StandardSlotConfig<TNode extends {
|
|
5510
|
+
id: string;
|
|
5511
|
+
}, TPose> = SceneSlotConfig<TNode, TPose> | SelectionOverlaySlotConfig<TPose> | PathEditingOverlaySlotConfig;
|
|
5512
|
+
/** What may fill one of the canvas's named layer slots: a config the canvas
|
|
5513
|
+
* builds the layer from, a pre-built layer, or `null` to leave the slot
|
|
5514
|
+
* empty. */
|
|
5515
|
+
type LayerSlotValue<TNode extends {
|
|
5516
|
+
id: string;
|
|
5517
|
+
}, TPose> = StandardSlotConfig<TNode, TPose> | CustomLayerEntry | null;
|
|
5518
|
+
/** The canvas's render stack, as named slots. The standard slots (grid,
|
|
5519
|
+
* scene, selection overlay, cell highlight) fix where a layer sits in the
|
|
5520
|
+
* stack; scene and selection overlay can be configured, and every one can be
|
|
5521
|
+
* given a layer of your own or switched off. Further keys add custom layers.
|
|
5522
|
+
* `TSceneSlot` is what the scene slot accepts: `<SceneCanvas>` takes a
|
|
5523
|
+
* partial config and fills the rest from its defaults. */
|
|
5524
|
+
type LayersMap<TNode extends {
|
|
5525
|
+
id: string;
|
|
5526
|
+
}, TPose, TSceneSlot = SceneSlotConfig<TNode, TPose>> = {
|
|
5527
|
+
/** Grid slot, beneath the scene. Takes a pre-built layer (`{ layer }`) —
|
|
5528
|
+
* e.g. `createGridLayer` from `@weasel-js/guides` — or `null`. */
|
|
5529
|
+
grid?: CustomLayerEntry | null;
|
|
5530
|
+
/** Scene slot: the config `<SceneCanvas>` builds its layers from, a
|
|
5531
|
+
* pre-built layer that paints the scene in their place, or `null`. A
|
|
5532
|
+
* pre-built layer gets no ghost of a node in flight, which needs `drawOne`. */
|
|
5533
|
+
scene?: TSceneSlot | CustomLayerEntry | null;
|
|
5534
|
+
/** Selection-overlay slot: the config `<SceneCanvas>` builds the layer
|
|
5535
|
+
* from, a pre-built layer that paints in its place, or `null` for no
|
|
5536
|
+
* selection chrome. */
|
|
5537
|
+
selectionOverlay?: SelectionOverlaySlotConfig<TPose> | CustomLayerEntry | null;
|
|
5538
|
+
/** Cell-highlight overlay slot, drawn immediately after the grid. Takes a
|
|
5539
|
+
* pre-built layer (`{ layer }`) — e.g. `createCellHighlightLayer` from
|
|
5540
|
+
* `@weasel-js/guides` — or `null`. */
|
|
5541
|
+
cellHighlight?: CustomLayerEntry | null;
|
|
5542
|
+
/** `<SceneCanvas>`'s anchor-editing overlay, above the selection overlay:
|
|
5543
|
+
* the config it builds the layer from, a pre-built layer, or `null`. */
|
|
5544
|
+
pathEditingOverlay?: PathEditingOverlaySlotConfig | CustomLayerEntry | null;
|
|
5545
|
+
} & {
|
|
5546
|
+
[customKey: string]: LayerSlotValue<TNode, TPose> | TSceneSlot | undefined;
|
|
5547
|
+
};
|
|
5548
|
+
/** The scene slot once built: its canvas layers, bottom first. Each `key` is
|
|
5549
|
+
* an anchor a custom layer can name (`scene`, or `scene:<layerId>`). */
|
|
5550
|
+
interface SceneSlotLayers {
|
|
5551
|
+
layers: ReadonlyArray<{
|
|
5552
|
+
key: string;
|
|
5553
|
+
layer: RenderLayer<unknown>;
|
|
5554
|
+
}>;
|
|
5555
|
+
}
|
|
5556
|
+
/** What `<Canvas>` composes: a {@link LayersMap} with every slot already a
|
|
5557
|
+
* layer. `<SceneCanvas>` builds one from its `layers` prop. */
|
|
5558
|
+
type CanvasLayers = {
|
|
5559
|
+
grid?: CustomLayerEntry | null;
|
|
5560
|
+
cellHighlight?: CustomLayerEntry | null;
|
|
5561
|
+
scene?: SceneSlotLayers | null;
|
|
5562
|
+
selectionOverlay?: CustomLayerEntry | null;
|
|
5563
|
+
} & {
|
|
5564
|
+
[customKey: string]: CustomLayerEntry | SceneSlotLayers | null | undefined;
|
|
5565
|
+
};
|
|
5328
5566
|
|
|
5329
5567
|
/**
|
|
5330
|
-
*
|
|
5331
|
-
*
|
|
5332
|
-
*
|
|
5568
|
+
* Promote a Rule tree to a fluent Condition.
|
|
5569
|
+
*
|
|
5570
|
+
* **Chain semantics: strict left-to-right.** No boolean precedence.
|
|
5571
|
+
* `focused.or(hovering).and(selectionIs(1))` evaluates
|
|
5572
|
+
* `((focused || hovering) && selectionIs(1))`. For grouped disjunction, use
|
|
5573
|
+
* the top-level `or` / `and` / `not` helpers or name intermediates.
|
|
5574
|
+
*
|
|
5575
|
+
* Combinators flatten same-kind nesting on construction so `a.and(b).and(c)`
|
|
5576
|
+
* produces `{ all: [a, b, c] }`.
|
|
5333
5577
|
*/
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5578
|
+
declare function cond(rule: Rule): Condition;
|
|
5579
|
+
/** Inline-lambda escape hatch. Wraps the closure as a `when` rule node. */
|
|
5580
|
+
declare function when(fn: (ctx: RuleCtx) => boolean): Condition;
|
|
5581
|
+
/** `(a && b && c && ...)` — useful when chain mixing makes left-to-right
|
|
5582
|
+
* semantics ambiguous. */
|
|
5583
|
+
declare function and(...cs: (Condition | Rule)[]): Condition;
|
|
5584
|
+
/** `(a || b || c || ...)` — preferred over `.or` chains when mixed with
|
|
5585
|
+
* `.and` to make grouping explicit. */
|
|
5586
|
+
declare function or(...cs: (Condition | Rule)[]): Condition;
|
|
5587
|
+
/** `!c` — top-level negation. Most rules use `.andNot()` / `.orNot()`
|
|
5588
|
+
* instead; this is for the lead-with-negation case. */
|
|
5589
|
+
declare function not(c: Condition | Rule): Condition;
|
|
5590
|
+
/** Always true. The fallback for any chrome id without a registered rule. */
|
|
5591
|
+
declare const always: Condition;
|
|
5592
|
+
/** Always false. Useful for "turn this chrome off entirely":
|
|
5593
|
+
* `chromeVisibility={{ 'snap.guides': never }}`. */
|
|
5594
|
+
declare const never: Condition;
|
|
5595
|
+
/** Canvas surface currently focused. */
|
|
5596
|
+
declare const focused: Condition;
|
|
5597
|
+
/** Any action currently in flight (read: user is gesturing). */
|
|
5598
|
+
declare const gesturing: Condition;
|
|
5599
|
+
/** A path is currently in anchor-edit mode. */
|
|
5600
|
+
declare const editingAnchors: Condition;
|
|
5601
|
+
/** Active action's kind matches `kind` (e.g. `actionIs('move')`). */
|
|
5602
|
+
declare const actionIs: (kind: string) => Condition;
|
|
5603
|
+
/** Nothing selected. */
|
|
5604
|
+
declare const selectionEmpty: Condition;
|
|
5605
|
+
/** Exactly `n` items selected. */
|
|
5606
|
+
declare const selectionIs: (n: number) => Condition;
|
|
5607
|
+
/** At least `n` items selected. `selectionAtLeast(1)` is the common
|
|
5608
|
+
* "something is selected" check. */
|
|
5609
|
+
declare const selectionAtLeast: (n: number) => Condition;
|
|
5610
|
+
/** Multi-mode handle behavior active (single shared union-bounds
|
|
5611
|
+
* handle vs per-item handles). */
|
|
5612
|
+
declare const multiActive: Condition;
|
|
5613
|
+
/** Pointer is hovering some node. */
|
|
5614
|
+
declare const hovering: Condition;
|
|
5615
|
+
/** Pointer is hovering a node that is currently selected. */
|
|
5616
|
+
declare const hoveringSelected: Condition;
|
|
5617
|
+
/** Named modifier key currently held. */
|
|
5618
|
+
declare const modifierHeld: (m: keyof ModifierState) => Condition;
|
|
5619
|
+
/** View scale (uniform or geometric mean for non-uniform) is at least
|
|
5620
|
+
* `z`. Useful for "hide hairline chrome at low zoom" rules. */
|
|
5621
|
+
declare const zoomAtLeast: (z: number) => Condition;
|
|
5622
|
+
/** Active mode equals `m`. */
|
|
5623
|
+
declare const modeIs: (m: string) => Condition;
|
|
5624
|
+
/** Active mode is one of `modes`. */
|
|
5625
|
+
declare const modeIn: (modes: readonly string[]) => Condition;
|
|
5626
|
+
/** Active mode is NOT `m`. */
|
|
5627
|
+
declare const modeNot: (m: string) => Condition;
|
|
5628
|
+
/** Active mode's `allows` includes capability `cap`. */
|
|
5629
|
+
declare const capabilityIs: (cap: string) => Condition;
|
|
5630
|
+
/** Active mode's `allows` includes ANY of `caps` (OR). */
|
|
5631
|
+
declare const capabilityIn: (caps: readonly string[]) => Condition;
|
|
5632
|
+
/** Active mode's `allows` includes ALL of `caps` (AND). */
|
|
5633
|
+
declare const capabilityAll: (caps: readonly string[]) => Condition;
|
|
5634
|
+
/** Active mode's `allows` does NOT include capability `cap`. */
|
|
5635
|
+
declare const capabilityNot: (cap: string) => Condition;
|
|
5636
|
+
/** Primary pointer is imprecise (touch, most styluses). Absent device
|
|
5637
|
+
* profile → false. */
|
|
5638
|
+
declare const coarsePointer: Condition;
|
|
5639
|
+
/** Primary pointer can hover. Absent device profile → true. */
|
|
5640
|
+
declare const canHover: Condition;
|
|
5641
|
+
|
|
5642
|
+
/**
|
|
5643
|
+
* Kit-shipped defaults. Merged with the consumer's `chromeVisibility` map
|
|
5644
|
+
* at resolve time; consumer entries take precedence per id.
|
|
5645
|
+
*
|
|
5646
|
+
* Gating is written in terms of **capabilities, not mode ids**. A
|
|
5647
|
+
* capability rule keeps holding when a new mode is added that permits the
|
|
5648
|
+
* same thing; a mode rule has to be found and edited every time.
|
|
5649
|
+
*/
|
|
5650
|
+
declare const defaultVisibilityRules: VisibilityRules;
|
|
5651
|
+
|
|
5351
5652
|
/**
|
|
5352
|
-
*
|
|
5353
|
-
*
|
|
5354
|
-
*
|
|
5355
|
-
*
|
|
5356
|
-
*
|
|
5653
|
+
* Build the per-frame visibility check: consumer rules merged on top of
|
|
5654
|
+
* the kit defaults, evaluated against `ctx`.
|
|
5655
|
+
*
|
|
5656
|
+
* `ChromeCtx` is the legacy shape; surfaces still on it get `mode='normal'`
|
|
5657
|
+
* and `DEFAULT_ALLOWED_CAPABILITIES` filled in here, so a caller that never
|
|
5658
|
+
* opted into modality behaves exactly like one sitting in normal mode.
|
|
5357
5659
|
*/
|
|
5358
|
-
declare function
|
|
5359
|
-
/** The part of a scene a pose transition hears and reads. */
|
|
5360
|
-
interface PoseTransitionScene<TPose, TNode = unknown> extends Pick<ScenePoseReports<TPose, TNode>, 'onPoseWrite'> {
|
|
5361
|
-
readonly overrides: Pick<PoseOverrides<TPose>, 'read'>;
|
|
5362
|
-
}
|
|
5363
|
-
/** Hand `scene`'s pose writes to the seat's transition, each gliding from the
|
|
5364
|
-
* pose it was shown at. A node something else poses through an override — a
|
|
5365
|
-
* drag's preview, another animation — is left to it. With `departures`,
|
|
5366
|
-
* removals leave as ghosts there, and a node that comes back while its ghost
|
|
5367
|
-
* is leaving returns from where the ghost was. */
|
|
5368
|
-
declare function bindPoseTransition<TPose, TNode = unknown>(scene: PoseTransitionScene<TPose, TNode>, seat: () => PoseTransitionSeat<TPose> | null | undefined, departures?: Departures<TPose, TNode>): () => void;
|
|
5369
|
-
/** {@link bindPoseTransition} for a component's life, following the latest
|
|
5370
|
-
* seat. Subscribes only while there is one. Answers the ghosts it shows. */
|
|
5371
|
-
declare function usePoseTransition<TPose, TNode = unknown>(scene: PoseTransitionScene<TPose, TNode>, seat: PoseTransitionSeat<TPose> | null | undefined): Departures<TPose, TNode>;
|
|
5660
|
+
declare function resolveVisibility(consumer: VisibilityRules | undefined, ctx: ChromeCtx | RuleCtx): (id: ChromeId) => boolean;
|
|
5372
5661
|
|
|
5373
5662
|
/**
|
|
5374
|
-
*
|
|
5375
|
-
*
|
|
5376
|
-
* on
|
|
5663
|
+
* Pure assembler for {@link ChromeCtx}. Sources are passed as plain values
|
|
5664
|
+
* rather than the live objects they come from, which keeps `chrome-caps`
|
|
5665
|
+
* from depending on React or the dispatcher's concrete type.
|
|
5377
5666
|
*/
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5667
|
+
|
|
5668
|
+
/** The pieces of live canvas state a `ChromeCtx` is assembled from. */
|
|
5669
|
+
interface BuildChromeCtxArgs {
|
|
5670
|
+
focused: boolean;
|
|
5671
|
+
selection: readonly NodeId[];
|
|
5672
|
+
multiActive: boolean;
|
|
5673
|
+
modifiers: ModifierState;
|
|
5674
|
+
action: {
|
|
5675
|
+
kind: string | null;
|
|
5676
|
+
id: string | null;
|
|
5677
|
+
};
|
|
5678
|
+
hover: NodeId | null;
|
|
5679
|
+
view: View;
|
|
5386
5680
|
}
|
|
5387
|
-
/**
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5681
|
+
/** Gather the current canvas state into the context that chrome-visibility
|
|
5682
|
+
* rules are evaluated against. Rebuilt per frame. */
|
|
5683
|
+
declare function buildChromeCtx(args: BuildChromeCtxArgs): ChromeCtx;
|
|
5684
|
+
|
|
5685
|
+
/** Last-hovered NodeId for chrome-caps rules. */
|
|
5686
|
+
|
|
5687
|
+
/** Options for `useHoverTracking`. */
|
|
5688
|
+
interface UseHoverTrackingArgs {
|
|
5689
|
+
/** Topmost id under a client point, or null. */
|
|
5690
|
+
nodeAtClientPoint: (clientX: number, clientY: number) => {
|
|
5691
|
+
id: NodeId;
|
|
5692
|
+
} | null;
|
|
5693
|
+
enabled?: boolean;
|
|
5694
|
+
/** Called when the hovered id changes, `null` once the pointer is over no node or has left. */
|
|
5695
|
+
onChange?: (id: NodeId | null) => void;
|
|
5696
|
+
}
|
|
5697
|
+
/** What `useHoverTracking` returns. Both members keep their identity. */
|
|
5698
|
+
interface HoverTracking {
|
|
5699
|
+
/** The node the pointer is over, or null. */
|
|
5700
|
+
getHover: () => NodeId | null;
|
|
5701
|
+
/** Hand it the element to track, or null to stop: a callback ref, so an
|
|
5702
|
+
* element that mounts after the hook is tracked from the moment it arrives. */
|
|
5703
|
+
canvasRef: (element: HTMLElement | null) => void;
|
|
5704
|
+
}
|
|
5705
|
+
/** Track which node the pointer is over. Returns a getter rather than state,
|
|
5706
|
+
* so a pointer move does not re-render the component. Cleared on
|
|
5707
|
+
* `pointerleave`. */
|
|
5708
|
+
declare function useHoverTracking(args: UseHoverTrackingArgs): HoverTracking;
|
|
5709
|
+
|
|
5710
|
+
/** `<SceneCanvas geometry>`: hit-test and bounds overrides, consumed by the
|
|
5711
|
+
* internal select tool. Ignored if the consumer passes their own `tools`. */
|
|
5712
|
+
interface SceneCanvasGeometry {
|
|
5713
|
+
/** Hit-test override. Return the topmost id, the full back-to-front hit
|
|
5714
|
+
* stack (`string[]`), or `null` for empty space. The stack form lets a
|
|
5715
|
+
* consumer with domain overlap ordering (e.g. children over their
|
|
5716
|
+
* container) feed the kit's `pickTopMostHit` the true order instead of
|
|
5717
|
+
* pre-collapsing to one id. Matches `Canvas`'s `pickEvery` shape. */
|
|
5718
|
+
pickEvery?: (world: WorldPoint) => string | string[] | null;
|
|
5719
|
+
boundsOf?: (id: string) => FramedBox | null;
|
|
5720
|
+
/**
|
|
5721
|
+
* What "the pointer is on this node" means for the default body-pick.
|
|
5722
|
+
*
|
|
5723
|
+
* - `'pose'` — the node's pose rect, rotation honored.
|
|
5724
|
+
* - `'shape'` (default) — the pose rect as a pre-filter, then the ink the painter
|
|
5725
|
+
* actually lays down: its silhouette filled or not per the painter's `ink`, plus
|
|
5726
|
+
* its outline widened by the stroke half-width and `pickTolerancePx`.
|
|
5727
|
+
*
|
|
5728
|
+
* Painters with no silhouette keep the pose-rect answer either way. Ignored when
|
|
5729
|
+
* `pickEvery` is supplied: that override owns the test.
|
|
5730
|
+
*/
|
|
5731
|
+
picking?: 'pose' | 'shape';
|
|
5732
|
+
/**
|
|
5733
|
+
* Grab slop around a shape's outline, in **screen** pixels, so the target keeps
|
|
5734
|
+
* its apparent size at any zoom. Default 4. It widens the outline test under
|
|
5735
|
+
* `picking: 'shape'` and grows the pose-rect pre-filter so those outline hits
|
|
5736
|
+
* survive it. Set `0` for exact geometry.
|
|
5737
|
+
*/
|
|
5738
|
+
pickTolerancePx?: number;
|
|
5739
|
+
/**
|
|
5740
|
+
* Whether a shape's box includes its stroke as drawn — align, joins, and
|
|
5741
|
+
* markers counted — or is the pose's geometry alone. Default `true`. The
|
|
5742
|
+
* selection outline and handles sit on it, resize keeps the stroke's
|
|
5743
|
+
* outer edge under the pointer without scaling the stroke, and rotate,
|
|
5744
|
+
* flip, align, and distribute measure it. Stored geometry is unaffected.
|
|
5745
|
+
*/
|
|
5746
|
+
boundsIncludeStroke?: boolean;
|
|
5391
5747
|
}
|
|
5748
|
+
|
|
5749
|
+
/** A scene `drawOne` that leaves out one node's glyphs. */
|
|
5750
|
+
type EditingDrawOne = <TNode extends Node<unknown, string, unknown>>(node: TNode, pose: unknown, view?: View, ctx?: NodePaintCtx) => DrawCommand[];
|
|
5751
|
+
|
|
5392
5752
|
/**
|
|
5393
|
-
*
|
|
5394
|
-
*
|
|
5395
|
-
*
|
|
5753
|
+
* Union math over rect-shaped poses.
|
|
5754
|
+
*
|
|
5755
|
+
* Two answers, deliberately distinct. `unionBounds` folds the *unrotated*
|
|
5756
|
+
* boxes and is what commit-time actions want, because they go on to write
|
|
5757
|
+
* poses back in that same frame. `unionAABB` expands each rotated member to
|
|
5758
|
+
* the extent of its ink first, and is what anything a user looks at or clicks
|
|
5759
|
+
* wants — selection chrome, gesture bounds, an export viewBox. Folding the
|
|
5760
|
+
* unrotated box there under-reports the extent of a rotated member exactly
|
|
5761
|
+
* when the consumer is watching it move.
|
|
5396
5762
|
*/
|
|
5397
|
-
interface NodeRouting {
|
|
5398
|
-
/** Register a kind. Order matters: first match wins during `classify`.
|
|
5399
|
-
* Throws if a kind with this name is already registered. */
|
|
5400
|
-
register(kind: NodeRoutingEntry): void;
|
|
5401
|
-
/** Walk registered kinds in registration order; return the first kind
|
|
5402
|
-
* whose `matches(data, node)` returns true, or `'unknown'` if none match. */
|
|
5403
|
-
classify(data: unknown, node?: RoutedNode): string;
|
|
5404
|
-
/** Lookup a kind entry by name. */
|
|
5405
|
-
get(name: string): NodeRoutingEntry | undefined;
|
|
5406
|
-
/** Enumerate registered kinds in registration order. */
|
|
5407
|
-
list(): readonly NodeRoutingEntry[];
|
|
5408
|
-
}
|
|
5409
|
-
/** The routing kind of a node: the name of the first entry whose `matches(data, node)` returns
|
|
5410
|
-
* true, or `'unknown'`. What `NodeRouting.classify` answers, for a caller holding a plain list. */
|
|
5411
|
-
declare function routeKind(entries: readonly NodeRoutingEntry[], data: unknown, node?: RoutedNode): string;
|
|
5412
|
-
/** Build a registry of per-node-kind routing entries. Registering a duplicate
|
|
5413
|
-
* kind name throws. */
|
|
5414
|
-
declare function createNodeRouting(): NodeRouting;
|
|
5415
5763
|
|
|
5764
|
+
/** Compute the AABB envelope of a set of rect-shaped poses, ignoring any
|
|
5765
|
+
* rotation they carry. See the module docstring before reaching for this
|
|
5766
|
+
* over {@link unionAABB}. */
|
|
5767
|
+
declare function unionBounds<TPose extends RectPose>(poses: Iterable<TPose>): RectPose | null;
|
|
5416
5768
|
/**
|
|
5417
|
-
*
|
|
5769
|
+
* Axis-align a pose that carries a `rotation` or a `transform`: returns the
|
|
5770
|
+
* AABB of the box as drawn, its four corners through `poseFrameOf`, with both
|
|
5771
|
+
* fields dropped.
|
|
5772
|
+
*
|
|
5773
|
+
* A pose with neither is returned as-is.
|
|
5774
|
+
*/
|
|
5775
|
+
declare function axisAlignedBounds<TPose extends RectPose>(b: TPose): RectPose;
|
|
5776
|
+
/**
|
|
5777
|
+
* Fold every part into one world-space AABB, skipping `null` / `undefined`
|
|
5778
|
+
* entries. Rotated parts are expanded via {@link axisAlignedBounds} first;
|
|
5779
|
+
* the result never carries a `rotation` (a union of several oriented boxes
|
|
5780
|
+
* has no single orientation to report).
|
|
5781
|
+
*
|
|
5782
|
+
* Returns `null` when nothing was contributed.
|
|
5418
5783
|
*/
|
|
5784
|
+
declare function unionAABB<TPose extends RectPose>(parts: Iterable<TPose | null | undefined>): RectPose | null;
|
|
5419
5785
|
|
|
5420
|
-
/**
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
drawOne: (obj: TNode, pose: TPose, view: View, ctx?: NodePaintCtx) => DrawCommand[];
|
|
5436
|
-
/** The path a container derives from its dependencies' poses, for the clip
|
|
5437
|
-
* it imposes on its subtree — `drawOne`'s `ctx` carries the derived path a
|
|
5438
|
-
* node *paints*, this one the clip it *imposes*. A scene-aware caller
|
|
5439
|
-
* supplies it; left out, both are resolved off the adapter. */
|
|
5440
|
-
derivedPathOf?: (obj: TNode, pose: TPose) => Path | null;
|
|
5441
|
-
/** Default ghost alpha for the move-overlay slot. Default 0.85. */
|
|
5442
|
-
ghostAlpha?: number;
|
|
5443
|
-
/** Per-id alpha multiplier. A node's emitted `DrawCommand[]` is wrapped in a
|
|
5444
|
-
* `{ kind: 'group', alpha }` when the returned value is not 1. */
|
|
5445
|
-
alphaFor?: (id: string) => number;
|
|
5786
|
+
/** Shape the default projections expect `data` to satisfy. All fields
|
|
5787
|
+
* optional so any object satisfies the constraint — projections fill in
|
|
5788
|
+
* the gaps for non-default shapes. */
|
|
5789
|
+
interface DefaultTextData {
|
|
5790
|
+
text?: string;
|
|
5791
|
+
style?: TextStyle;
|
|
5792
|
+
runs?: readonly StyledRun[];
|
|
5793
|
+
fill?: Fill | Inherit | null;
|
|
5794
|
+
stroke?: Stroke | Inherit | null;
|
|
5795
|
+
verticalAlign?: TextVerticalAlign;
|
|
5796
|
+
padding?: number;
|
|
5797
|
+
overflow?: TextOverflow;
|
|
5798
|
+
}
|
|
5799
|
+
/** All-optional projections + fontSize fallback. */
|
|
5800
|
+
interface UseSceneTextEditOptions<TData> {
|
|
5446
5801
|
/**
|
|
5447
|
-
*
|
|
5448
|
-
*
|
|
5449
|
-
*
|
|
5450
|
-
|
|
5802
|
+
* Is this node text? A double-click opens an edit only on a node that
|
|
5803
|
+
* answers yes, and passes through any other to the text under it. Default:
|
|
5804
|
+
* `isTextData`, the test `inferredNodeRouting` classifies a text node by. Pass one when `getText` reads some other shape.
|
|
5805
|
+
*/
|
|
5806
|
+
isText?: (data: TData) => boolean;
|
|
5807
|
+
/** Read plain text from `data`. Default: `data.text ?? ''`. */
|
|
5808
|
+
getText?: (data: TData) => string;
|
|
5809
|
+
/** Read style from `data`. Default: `data.style`. */
|
|
5810
|
+
getStyle?: (data: TData) => TextStyle | undefined;
|
|
5811
|
+
/** Read the node's paint from `data`. Default: `data.fill` / `data.stroke`. */
|
|
5812
|
+
getPaint?: (data: TData) => TextPaint | undefined;
|
|
5813
|
+
/** Read rich-text runs from `data`. Default: `data.runs`. */
|
|
5814
|
+
getRuns?: (data: TData) => readonly StyledRun[] | undefined;
|
|
5815
|
+
/** Read the box vertical alignment from `data`. Default: `data.verticalAlign`. */
|
|
5816
|
+
getVerticalAlign?: (data: TData) => TextVerticalAlign | undefined;
|
|
5817
|
+
/** Read the inset from the node's box to its text from `data`. Default: `data.padding`. */
|
|
5818
|
+
getPadding?: (data: TData) => number | undefined;
|
|
5819
|
+
/** Read whether the node cuts its text at its box from `data`, which the
|
|
5820
|
+
* overlay then does too. Default: `data.overflow`. */
|
|
5821
|
+
getOverflow?: (data: TData) => TextOverflow | undefined;
|
|
5822
|
+
/** Produce updated data with new text. Default: `{ ...data, text }`. */
|
|
5823
|
+
setText?: (data: TData, text: string) => TData;
|
|
5824
|
+
/** Produce updated data with new runs. Default: `{ ...data, runs }`. */
|
|
5825
|
+
setRuns?: (data: TData, runs: StyledRun[]) => TData;
|
|
5826
|
+
/**
|
|
5827
|
+
* Produce updated data with a new node-wide style. Default:
|
|
5828
|
+
* `{ ...data, style }`. Written only when a range toggle has to *clear* a
|
|
5829
|
+
* flag the node itself sets — the run algebra is additive, so that edit
|
|
5830
|
+
* lowers the node flag and raises it on the runs outside the range. See
|
|
5831
|
+
* `useTextEdit`'s `setStyle`.
|
|
5451
5832
|
*
|
|
5452
|
-
*
|
|
5453
|
-
*
|
|
5454
|
-
* move-overlay ghost (drag preview) is not post-processed.
|
|
5833
|
+
* An edit's text, runs, and style are folded through these three and
|
|
5834
|
+
* written as one `scene.update`, so a commit is one undo step.
|
|
5455
5835
|
*/
|
|
5456
|
-
|
|
5836
|
+
setStyle?: (data: TData, style: TextStyle) => TData;
|
|
5837
|
+
/** Fallback fontSize when `style.fontSize` is unset. Default `16`. */
|
|
5838
|
+
defaultFontSize?: number;
|
|
5457
5839
|
/**
|
|
5458
|
-
*
|
|
5459
|
-
*
|
|
5460
|
-
*
|
|
5461
|
-
*
|
|
5462
|
-
* sees an empty group where a culled node would have painted.
|
|
5840
|
+
* The view to project through. Omit it and the view is read live from the
|
|
5841
|
+
* weasel canvas mounted inside `container` (the one a double-click landed
|
|
5842
|
+
* on, when there are several). With no canvas there, the node's world box
|
|
5843
|
+
* is passed through as screen pixels.
|
|
5463
5844
|
*
|
|
5464
|
-
*
|
|
5465
|
-
* the
|
|
5466
|
-
* another view — a cache keyed without `view`, a consumer re-wrapping the
|
|
5467
|
-
* commands — would show the first view's cull.
|
|
5845
|
+
* A thunk is re-read on every projection; a plain `View` is the value from
|
|
5846
|
+
* the render that supplied it.
|
|
5468
5847
|
*/
|
|
5469
|
-
|
|
5848
|
+
view?: View | (() => View);
|
|
5470
5849
|
/**
|
|
5471
|
-
*
|
|
5472
|
-
*
|
|
5473
|
-
*
|
|
5474
|
-
* node whose box misses the view, so it must enclose everything `drawOne`
|
|
5475
|
-
* paints: a box too small makes a node vanish before it leaves the screen.
|
|
5476
|
-
*
|
|
5477
|
-
* `<SceneCanvas>` supplies `defaultPaintBounds` while `drawOne` is
|
|
5478
|
-
* `defaultDrawOne`. Omit it with any other `drawOne` and culling only
|
|
5479
|
-
* trims commands after painting.
|
|
5850
|
+
* Forwarded to `useTextEdit`: is `el` part of the editor's own chrome?
|
|
5851
|
+
* Focus moving into it does not end the edit. Wire it to whatever renders
|
|
5852
|
+
* the character controls.
|
|
5480
5853
|
*/
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
/**
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
*/
|
|
5488
|
-
|
|
5489
|
-
/**
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
fill?: CommandFill;
|
|
5493
|
-
outline?: CommandStroke;
|
|
5854
|
+
isEditorChrome?: (el: Element) => boolean;
|
|
5855
|
+
/** Forwarded to `useTextEdit`: what Escape does to the edit. */
|
|
5856
|
+
escape?: 'cancel' | 'commit';
|
|
5857
|
+
/** Forwarded to `useTextEdit`: how long an edit waits for its face. */
|
|
5858
|
+
fontHold?: number;
|
|
5859
|
+
/** Forwarded to `useTextEdit`: called as an edit of the node `id` opens,
|
|
5860
|
+
* whichever way it was started. */
|
|
5861
|
+
onStart?: (id: string) => void;
|
|
5862
|
+
/** Forwarded to `useTextEdit`: called as the edit of `id` closes, after
|
|
5863
|
+
* any commit has been written to the scene. */
|
|
5864
|
+
onEnd?: (id: string) => void;
|
|
5494
5865
|
}
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
* the
|
|
5499
|
-
*
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5866
|
+
/** What `onDoubleClick` reads of the event: a React or a DOM `MouseEvent`. */
|
|
5867
|
+
type TextEditDoubleClick = Pick<MouseEvent, 'target' | 'clientX' | 'clientY'>;
|
|
5868
|
+
/** Return shape extends `UseTextEditReturn` with an `onDoubleClick`
|
|
5869
|
+
* binding for the canvas container. Double-clicking inside a text
|
|
5870
|
+
* node enters edit mode with the caret seeded at the clicked glyph. */
|
|
5871
|
+
interface UseSceneTextEditReturn extends UseTextEditReturn {
|
|
5872
|
+
/** Bind to the element wrapping `<SceneCanvas>` (the same element
|
|
5873
|
+
* passed as `container`, or any ancestor that receives the dblclick
|
|
5874
|
+
* bubble). Starts an edit on the top-most text node under the cursor. */
|
|
5875
|
+
onDoubleClick: (e: TextEditDoubleClick) => void;
|
|
5876
|
+
/** The `isText` option asked of the node with this id: what
|
|
5877
|
+
* `TextEditDep.isTextNode` wants, so both ways into an edit agree. */
|
|
5878
|
+
isTextNode: (id: string) => boolean;
|
|
5508
5879
|
/**
|
|
5509
|
-
*
|
|
5510
|
-
*
|
|
5511
|
-
*
|
|
5512
|
-
*
|
|
5880
|
+
* `defaultDrawOne`, less the glyphs of the node being edited: the overlay
|
|
5881
|
+
* stands in for its text, and the rest of the node, a `background` among
|
|
5882
|
+
* it, goes on painting. Pass it as `layers.scene.drawOne`, with
|
|
5883
|
+
* `paintBounds: defaultPaintBounds`, in place of an `alphaFor` that hides
|
|
5884
|
+
* the whole node.
|
|
5513
5885
|
*/
|
|
5514
|
-
|
|
5515
|
-
id: string;
|
|
5516
|
-
currentPose: TPose;
|
|
5517
|
-
leafPoses?: Map<string, TPose>;
|
|
5518
|
-
} | null;
|
|
5519
|
-
/** Fallback pose lookup (typically the stored/committed pose). */
|
|
5520
|
-
getStoredPose: (id: string) => TPose;
|
|
5521
|
-
/** How to read poses. Default `AUTO_POSE_DESCRIPTOR`. */
|
|
5522
|
-
poseDescriptor?: PoseDescriptor<TPose>;
|
|
5523
|
-
/** Walk a container's direct children (e.g. `scene.childrenOf`). With
|
|
5524
|
-
* `isContainer`, a selected container resolves to the union AABB of its
|
|
5525
|
-
* transitive leaf poses instead of its own stored pose. */
|
|
5526
|
-
getChildren?: (id: string) => readonly string[];
|
|
5527
|
-
/** True when `id` is a structural container. */
|
|
5528
|
-
isContainer?: (id: string) => boolean;
|
|
5529
|
-
/** The nodes behind the ids. With it, a container's union takes each leaf
|
|
5530
|
-
* as drawn, stroke included (`drawnBoundsOf`); without, its pose box. */
|
|
5531
|
-
scene?: DrawnBoundsScene;
|
|
5532
|
-
/** View scale a screen-pixel stroke is resolved at. Default 1. */
|
|
5533
|
-
viewScale?: () => number | Scale2;
|
|
5886
|
+
drawOne: EditingDrawOne;
|
|
5534
5887
|
}
|
|
5535
|
-
/**
|
|
5536
|
-
*
|
|
5537
|
-
*
|
|
5538
|
-
|
|
5539
|
-
* union AABB of all transitive leaf poses (each leaf still subject to the
|
|
5540
|
-
* precedence rules). Containers with no leaves resolve to `null`.
|
|
5541
|
-
*/
|
|
5542
|
-
declare function composeSelectionPose<TPose>(opts: ComposeSelectionPoseOpts<TPose>): (id: string) => TPose | null;
|
|
5888
|
+
/** Wire double-click-to-edit text on a scene: mounts a DOM editing overlay
|
|
5889
|
+
* over the node being edited and writes the result back as an undoable op.
|
|
5890
|
+
* `<SceneCanvas>`'s own editor stands down for any canvas inside `container`. */
|
|
5891
|
+
declare function useSceneTextEdit<TData extends DefaultTextData, TLayer extends string, TPose extends RectPose = RectPose>(scene: Scene<TData, TLayer, TPose>, container: HTMLElement | null, options?: UseSceneTextEditOptions<TData>): UseSceneTextEditReturn;
|
|
5543
5892
|
|
|
5544
5893
|
/**
|
|
5545
|
-
*
|
|
5546
|
-
*
|
|
5547
|
-
*
|
|
5548
|
-
*
|
|
5549
|
-
*
|
|
5550
|
-
* over the projected AABBs.
|
|
5894
|
+
* `<SceneCanvas>`'s own text editor: the one a text or sticky tool's
|
|
5895
|
+
* `enterTextEdit` reaches, and a double-click on a text node opens, when the
|
|
5896
|
+
* host has wired none of its own. It stands down for a host editor — a
|
|
5897
|
+
* `useSceneTextEdit` whose container holds the canvas, or a `textEdit` dep
|
|
5898
|
+
* registered over it.
|
|
5551
5899
|
*/
|
|
5552
5900
|
|
|
5553
|
-
/**
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
* rendered using the union bounds of all its transitive leaves. */
|
|
5562
|
-
getChildren?: (id: string) => readonly string[];
|
|
5563
|
-
/** True when `id` is a structural container. */
|
|
5564
|
-
isContainer?: (id: string) => boolean;
|
|
5565
|
-
/** The nodes behind the ids `getPose` answers for. With it, a stroked
|
|
5566
|
-
* node's chrome sits on its stroke (`drawnBoundsOf`); without, on its
|
|
5567
|
-
* pose box. Ignored when bounds come off the draw envelope. */
|
|
5568
|
-
scene?: DrawnBoundsScene;
|
|
5901
|
+
/** `<SceneCanvas textEditor>`: its own editor's options, or `false` for none. */
|
|
5902
|
+
type SceneCanvasTextEditor<TData> = false | UseSceneTextEditOptions<TData>;
|
|
5903
|
+
|
|
5904
|
+
/** Minimal hit descriptor passed to `onDoubleClick`. Contains the fields
|
|
5905
|
+
* modality dispatch needs; extends as the kit's `Hit` type evolves. */
|
|
5906
|
+
interface SceneCanvasHit {
|
|
5907
|
+
id: string;
|
|
5908
|
+
kind: string;
|
|
5569
5909
|
}
|
|
5570
|
-
/**
|
|
5571
|
-
|
|
5572
|
-
type SelectionOutlineLayerOpts<TPose> = Omit<SelectionOverlayLayerOpts<TPose>, 'handles' | 'handlesOf' | 'resizeHandles' | 'rotationHandle'>;
|
|
5573
|
-
/** Options for `createSelectionHandlesLayer`. The overlay layer's options
|
|
5574
|
-
* minus the outline stroke — the two run the same body. */
|
|
5575
|
-
type SelectionHandlesLayerOpts<TPose> = Omit<SelectionOverlayLayerOpts<TPose>, 'outline'>;
|
|
5576
|
-
/** Options for `createSelectionOverlayLayer`. */
|
|
5577
|
-
interface SelectionOverlayLayerOpts<TPose> extends SelectionLayerCommon<TPose> {
|
|
5910
|
+
/** `<SceneCanvas>`'s props for what the pointer can reach and what a click names. */
|
|
5911
|
+
interface SceneCanvasPointerProps<TData = unknown> {
|
|
5578
5912
|
/**
|
|
5579
|
-
*
|
|
5580
|
-
*
|
|
5581
|
-
* outline their own selection — the layer is shared, the envelope is not.
|
|
5913
|
+
* Per-id pointer-interactivity predicate: an id it returns `false` for is excluded from
|
|
5914
|
+
* hit-test results. Typical use: suppressing pointer events for dimmed nodes.
|
|
5582
5915
|
*/
|
|
5583
|
-
|
|
5916
|
+
isPointerInteractive?: (id: string) => boolean;
|
|
5584
5917
|
/**
|
|
5585
|
-
*
|
|
5586
|
-
*
|
|
5587
|
-
*
|
|
5918
|
+
* The entered group: the group a press resolves inside of, and which a double-click drills down
|
|
5919
|
+
* from. Nodes outside it take no hits. Pass one from `useEnteredGroup(scene)` to read or drive it
|
|
5920
|
+
* from outside the canvas, as `selection` is passed; without it the canvas keeps its own.
|
|
5921
|
+
*/
|
|
5922
|
+
enteredGroup?: EnteredGroupApi;
|
|
5923
|
+
/**
|
|
5924
|
+
* Called when the user double-clicks the canvas, with the hit node (id + kind) at that
|
|
5925
|
+
* position, or `null` on empty canvas. A notification, not a binding: it fires whatever the
|
|
5926
|
+
* double-click does. Entering a mode on the node belongs to `modeTriggers` instead.
|
|
5927
|
+
*/
|
|
5928
|
+
onDoubleClick?: (hit: SceneCanvasHit | null) => void;
|
|
5929
|
+
/** Called on every click — a press and release without a drag — with the
|
|
5930
|
+
* node under it, or `null` on empty canvas. Fires after the click's own
|
|
5931
|
+
* behavior, so a pick it made is already in the selection, and fires
|
|
5932
|
+
* again on a node that was already picked. */
|
|
5933
|
+
onClick?: (hit: SceneCanvasHit | null) => void;
|
|
5934
|
+
/** Called when the topmost pickable node under the pointer changes, with
|
|
5935
|
+
* its id, and with `null` once there is none or the pointer leaves. */
|
|
5936
|
+
onHover?: (id: string | null) => void;
|
|
5937
|
+
/**
|
|
5938
|
+
* The canvas's own text editor: what a text or sticky tool's `enterTextEdit`
|
|
5939
|
+
* opens, and, with the `edit` feature, a double-click on a text node. Pass
|
|
5940
|
+
* `useSceneTextEdit`'s options to configure it, or `false` for none.
|
|
5588
5941
|
*
|
|
5589
|
-
*
|
|
5590
|
-
*
|
|
5942
|
+
* It mounts its overlay in the canvas's offset parent, so the canvas wants a
|
|
5943
|
+
* positioned ancestor. It stands down for a host's own editor: a
|
|
5944
|
+
* `useSceneTextEdit` whose container holds the canvas, or a `textEdit` dep
|
|
5945
|
+
* registered by a child. Wire one of those for character controls, which
|
|
5946
|
+
* read the edit's state.
|
|
5591
5947
|
*/
|
|
5592
|
-
|
|
5593
|
-
outline?: CommandStroke & {
|
|
5594
|
-
pad?: number;
|
|
5595
|
-
};
|
|
5596
|
-
/** Pass `false` to render outlines only. */
|
|
5597
|
-
handles?: SelectionHandleStyle | false;
|
|
5598
|
-
/** Where to paint handles, in the bounds' own frame. Replaces the kit's
|
|
5599
|
-
* layout, `resizeHandles` included. */
|
|
5600
|
-
handlesOf?: (bounds: FramedBox) => {
|
|
5601
|
-
x: number;
|
|
5602
|
-
y: number;
|
|
5603
|
-
}[];
|
|
5604
|
-
/** The layout the resize affordance hits by: its `hitRadiusPx`, never
|
|
5605
|
-
* `handles.size`, decides which edge handles are painted. Default: edges on,
|
|
5606
|
-
* at the kit's default hit radius. */
|
|
5607
|
-
resizeHandles?: Partial<ResizeHandleLayout>;
|
|
5608
|
-
/** Draw a rotate badge above the selection's top edge. `true` places it at
|
|
5609
|
-
* the default offset; `distance` sets the offset in screen pixels. Off by
|
|
5610
|
-
* default. */
|
|
5611
|
-
rotationHandle?: boolean | {
|
|
5612
|
-
distance?: number;
|
|
5613
|
-
};
|
|
5614
|
-
/** Optional separate id list for the per-item outline pass, for a
|
|
5615
|
-
* multi-selection whose handle pass works against a synthetic union id
|
|
5616
|
-
* (e.g. `MULTI_RESIZE_TARGET_ID`) while each real member is outlined.
|
|
5617
|
-
* When omitted, the outline pass uses the handle pass's ids. */
|
|
5618
|
-
getOutlineIds?: () => readonly NodeId[];
|
|
5619
|
-
/** Optional set of ids to suppress entirely — both outline and handles
|
|
5620
|
-
* are skipped. */
|
|
5621
|
-
getSuppressedIds?: () => ReadonlySet<string>;
|
|
5948
|
+
textEditor?: SceneCanvasTextEditor<TData>;
|
|
5622
5949
|
}
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
/**
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5950
|
+
|
|
5951
|
+
/** The `<SceneCanvas>` props that change the actions and bindings a canvas has. */
|
|
5952
|
+
interface SceneCanvasActionProps {
|
|
5953
|
+
/**
|
|
5954
|
+
* Tune actions on this canvas without restating them, keyed by action id:
|
|
5955
|
+
* `params` every invocation starts from, and `bindings` added beside the
|
|
5956
|
+
* action's own. A tuning applies to whichever descriptor holds the id, a
|
|
5957
|
+
* preset's or a tool's. Pass a stable object; a params thunk is read on
|
|
5958
|
+
* every call. See the core README ("Tuning an action").
|
|
5959
|
+
*/
|
|
5960
|
+
tune?: ActionTunings;
|
|
5961
|
+
/**
|
|
5962
|
+
* Replace or remove bindings by binding id, on actions and contributions
|
|
5963
|
+
* alike: a route string (`'[*:*] keyDown(=) +mod'`), a spec (`key('Mod+=')`),
|
|
5964
|
+
* or `null` to unbind. Pass a stable object.
|
|
5965
|
+
*/
|
|
5966
|
+
bindingOverrides?: BindingOverrides;
|
|
5967
|
+
/**
|
|
5968
|
+
* Replace, add or mute whole action descriptors. Pass `null` to disable
|
|
5969
|
+
* all defaults. To change a built-in's params or add a key, use `tune`.
|
|
5970
|
+
*/
|
|
5971
|
+
actions?: ActionsProp;
|
|
5972
|
+
}
|
|
5973
|
+
|
|
5974
|
+
/** Turns pasted or dropped plain text into a text node sized to the string. A kit handler, so a
|
|
5975
|
+
* canvas with the `ingest` feature takes text unless its `ingestion.kitHandlers` omits it. */
|
|
5976
|
+
declare const kitTextHandler: ContentHandlerEntry;
|
|
5640
5977
|
|
|
5641
5978
|
/**
|
|
5642
|
-
* The
|
|
5643
|
-
*
|
|
5979
|
+
* The kit's default content handlers, which every `<SceneCanvas>` routes through unless its
|
|
5980
|
+
* `ingestion.kitHandlers` turns some or all of them off. They belong to the canvas, not to
|
|
5981
|
+
* the page-wide registry, so one canvas turning one off leaves the others alone.
|
|
5644
5982
|
*/
|
|
5645
5983
|
|
|
5646
|
-
/**
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
* shows however its paint and its markers cover it. */
|
|
5660
|
-
outlineStroke?: string;
|
|
5661
|
-
outlineWidthPx?: number;
|
|
5662
|
-
/** Radius of the dot an unselected anchor shrinks to where anchors sit
|
|
5663
|
-
* closer together on screen than a marker is wide. */
|
|
5664
|
-
denseDotRadiusPx?: number;
|
|
5665
|
-
/** Stroke of the marquee rubber band. */
|
|
5666
|
-
marqueeStroke?: string;
|
|
5667
|
-
/** Fill of the marquee rubber band. */
|
|
5668
|
-
marqueeFill?: string;
|
|
5984
|
+
/** `<SceneCanvas ingestion={{ kitHandlers }}>`: `true` (the default) keeps every kit handler,
|
|
5985
|
+
* `false` none, and `{ omit }` all but the ids named (`'kit:image'`, `'kit:svg'`,
|
|
5986
|
+
* `'kit:weasel-json'`, `'kit:text'`). */
|
|
5987
|
+
type KitHandlersOption = boolean | {
|
|
5988
|
+
omit: readonly string[];
|
|
5989
|
+
};
|
|
5990
|
+
|
|
5991
|
+
/** Options for {@link openFilePicker}. */
|
|
5992
|
+
interface OpenFilePickerOptions {
|
|
5993
|
+
/** `<input accept>` filter, e.g. `'image/*'` or `'.csv,text/csv'`. */
|
|
5994
|
+
accept?: string;
|
|
5995
|
+
/** Allow multi-select. Default false. */
|
|
5996
|
+
multiple?: boolean;
|
|
5669
5997
|
}
|
|
5670
|
-
/**
|
|
5671
|
-
|
|
5998
|
+
/**
|
|
5999
|
+
* Show the browser's file picker and resolve with what the user chose —
|
|
6000
|
+
* empty when they cancel. Must be called from a user gesture (a click
|
|
6001
|
+
* handler): browsers block programmatic `input.click()` otherwise. Pairs
|
|
6002
|
+
* with `CanvasExtensionApi.ingest`:
|
|
6003
|
+
*
|
|
6004
|
+
* ```ts
|
|
6005
|
+
* const files = await openFilePicker({ accept: 'image/*', multiple: true });
|
|
6006
|
+
* canvasRef.current?.ingest(files);
|
|
6007
|
+
* ```
|
|
6008
|
+
*/
|
|
6009
|
+
declare function openFilePicker(opts?: OpenFilePickerOptions): Promise<File[]>;
|
|
5672
6010
|
|
|
5673
6011
|
/**
|
|
5674
|
-
*
|
|
5675
|
-
*
|
|
5676
|
-
*
|
|
5677
|
-
* its path-edit extensions draw. Marker sizes stay constant regardless of zoom.
|
|
6012
|
+
* Ghosts of removed nodes: what a pose transition shows leaving after the
|
|
6013
|
+
* scene has let a node go. A ghost is not a scene node, so picking,
|
|
6014
|
+
* selection and history never see it; it lives here until its glide ends.
|
|
5678
6015
|
*/
|
|
5679
6016
|
|
|
5680
|
-
/**
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
getEditingId(): string | null;
|
|
5686
|
-
/**
|
|
5687
|
-
* Returns the pose for an id, or null if the node has been deleted.
|
|
5688
|
-
* Non-polygon poses are tolerated (the layer no-ops on them).
|
|
5689
|
-
*
|
|
5690
|
-
* `previews` are the drawing view's in-flight preview surfaces, so an
|
|
5691
|
-
* anchor dragged in one panel does not move in the others. Resolve against
|
|
5692
|
-
* them before falling back to the committed pose.
|
|
5693
|
-
*
|
|
5694
|
-
* `view` is the drawing view's camera. Answer in its world: a node whose
|
|
5695
|
-
* layer is a parallax plane stores its path in the plane's.
|
|
5696
|
-
*/
|
|
5697
|
-
getPose(id: string, previews: readonly GesturePreviewSource[], view: View): Path | null;
|
|
5698
|
-
/** The marker of each anchor, by flat index, for a node whose path was
|
|
5699
|
-
* drawn from a form (`PathRepresentation.anchorMarkers`); null, or an
|
|
5700
|
-
* anchor with none, draws a square. Resolve against `previews` as
|
|
5701
|
-
* `getPose` does. */
|
|
5702
|
-
getAnchorMarkers?(id: string, previews: readonly GesturePreviewSource[]): readonly (AnchorMarkerShape | null)[] | null;
|
|
5703
|
-
/** Flat indices of the selected anchors. Selected anchors render
|
|
5704
|
-
* filled; unselected ones hollow. */
|
|
5705
|
-
getSelectedAnchors?(): ReadonlySet<number>;
|
|
5706
|
-
/** In-flight anchor-marquee rect in world coords, or null. Drawn as a
|
|
5707
|
-
* rubber band while `marqueeAnchorsAction` is dragging. */
|
|
5708
|
-
getMarquee?(view: View): {
|
|
5709
|
-
x: number;
|
|
5710
|
-
y: number;
|
|
5711
|
-
width: number;
|
|
5712
|
-
height: number;
|
|
5713
|
-
} | null;
|
|
5714
|
-
/** The edited node's committed pose and data, which extensions' marks read. */
|
|
5715
|
-
getNode?(id: string): {
|
|
5716
|
-
pose: unknown;
|
|
5717
|
-
data: unknown;
|
|
5718
|
-
layer?: string;
|
|
5719
|
-
} | null;
|
|
5720
|
-
/** The path-edit extensions whose marks are drawn, in order. */
|
|
5721
|
-
getExtensions?(): readonly PathEditExtension[];
|
|
5722
|
-
/** The selected extension mark, or null. */
|
|
5723
|
-
getSelectedMark?(): PathEditMark | null;
|
|
5724
|
-
/** Optional styling overrides. */
|
|
5725
|
-
style?: PathEditingOverlayStyle;
|
|
6017
|
+
/** A removed node as its ghost shows it now. */
|
|
6018
|
+
interface ShownDeparture<TPose, TNode> {
|
|
6019
|
+
removal: PoseRemoval<TPose, TNode>;
|
|
6020
|
+
pose: TPose;
|
|
6021
|
+
alpha: number;
|
|
5726
6022
|
}
|
|
5727
|
-
/**
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
6023
|
+
/** The ghosts one canvas shows. */
|
|
6024
|
+
interface Departures<TPose, TNode> {
|
|
6025
|
+
/** See `removal` off from where it was shown toward `exit` of that pose,
|
|
6026
|
+
* fading out, through `transition`. Does nothing for a transition with no
|
|
6027
|
+
* `over`, which cannot carry a node the scene no longer holds. */
|
|
6028
|
+
leave(removal: PoseRemoval<TPose, TNode>, exit: (pose: TPose) => TPose, transition: ReflowTransition<TPose>): void;
|
|
6029
|
+
/** Drop `id`'s ghost — its node is back — and answer where it was shown. */
|
|
6030
|
+
recall(id: string): TPose | undefined;
|
|
6031
|
+
shown(): ShownDeparture<TPose, TNode>[];
|
|
6032
|
+
/** Hear each frame a ghost moves, and each one that comes or goes. */
|
|
6033
|
+
subscribe(listener: () => void): () => void;
|
|
6034
|
+
dispose(): void;
|
|
6035
|
+
}
|
|
6036
|
+
/** An empty set of ghosts, for `bindPoseTransition` to fill and a layer to
|
|
6037
|
+
* draw; `usePoseTransition` makes one per canvas. */
|
|
6038
|
+
declare function createDepartures<TPose, TNode>(): Departures<TPose, TNode>;
|
|
5731
6039
|
|
|
5732
|
-
/**
|
|
5733
|
-
*
|
|
5734
|
-
*
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
/**
|
|
5746
|
-
|
|
6040
|
+
/**
|
|
6041
|
+
* Which pose writes a canvas glides, and through what: `<SceneCanvas
|
|
6042
|
+
* poseTransition>`. The transition is the kind `reflowTransition` takes, and
|
|
6043
|
+
* one object can serve both.
|
|
6044
|
+
*/
|
|
6045
|
+
interface PoseTransitionSeat<TPose> {
|
|
6046
|
+
/** Shows each glide through a pose override; writes nothing. */
|
|
6047
|
+
transition: ReflowTransition<TPose>;
|
|
6048
|
+
/** Whether `write` glides. Default {@link glidesByDefault}. */
|
|
6049
|
+
glides?: (write: PoseWrite<TPose>) => boolean;
|
|
6050
|
+
/** Where a node the scene adds is first shown, given the pose it was added
|
|
6051
|
+
* at. Absent, an added node appears in place. */
|
|
6052
|
+
enter?: (pose: TPose) => TPose;
|
|
6053
|
+
/** Where a node the scene removes is seen off to, given the pose it was
|
|
6054
|
+
* shown at: a ghost of it glides there fading out, drawn but never picked,
|
|
6055
|
+
* selected or recorded. Absent, a removed node vanishes. Needs a
|
|
6056
|
+
* transition from `useAnimatedReflow` or `createReflowTransition`. */
|
|
6057
|
+
exit?: (pose: TPose) => TPose;
|
|
6058
|
+
/** Whether a removal is seen off through `exit`. Default: every one but
|
|
6059
|
+
* an untracked removal. */
|
|
6060
|
+
exits?: (removal: PoseRemoval<TPose>) => boolean;
|
|
5747
6061
|
}
|
|
5748
|
-
/**
|
|
5749
|
-
*
|
|
5750
|
-
*
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
interface
|
|
5758
|
-
|
|
5759
|
-
style?: PathEditingOverlayStyle;
|
|
6062
|
+
/**
|
|
6063
|
+
* The writes a {@link PoseTransitionSeat} glides unless told otherwise: a
|
|
6064
|
+
* direct scene call, an undo, and a redo. An action's commit (`'ops'`) is
|
|
6065
|
+
* left out because most show their own result — a drag's release is already
|
|
6066
|
+
* where it is written — and `tweenPose` records its op before it animates.
|
|
6067
|
+
* Layout writes belong to `reflowTransition`.
|
|
6068
|
+
*/
|
|
6069
|
+
declare function glidesByDefault(write: PoseWrite<unknown>): boolean;
|
|
6070
|
+
/** The part of a scene a pose transition hears and reads. */
|
|
6071
|
+
interface PoseTransitionScene<TPose, TNode = unknown> extends Pick<ScenePoseReports<TPose, TNode>, 'onPoseWrite'> {
|
|
6072
|
+
readonly overrides: Pick<PoseOverrides<TPose>, 'read'>;
|
|
5760
6073
|
}
|
|
5761
|
-
/**
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
/**
|
|
5772
|
-
*
|
|
5773
|
-
*
|
|
5774
|
-
*
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
/**
|
|
5781
|
-
*
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
* pre-built layer that paints the scene in their place, or `null`. A
|
|
5785
|
-
* pre-built layer gets no ghost of a node in flight, which needs `drawOne`. */
|
|
5786
|
-
scene?: TSceneSlot | CustomLayerEntry | null;
|
|
5787
|
-
/** Selection-overlay slot: the config `<SceneCanvas>` builds the layer
|
|
5788
|
-
* from, a pre-built layer that paints in its place, or `null` for no
|
|
5789
|
-
* selection chrome. */
|
|
5790
|
-
selectionOverlay?: SelectionOverlaySlotConfig<TPose> | CustomLayerEntry | null;
|
|
5791
|
-
/** Cell-highlight overlay slot, drawn immediately after the grid. Takes a
|
|
5792
|
-
* pre-built layer (`{ layer }`) — e.g. `createCellHighlightLayer` from
|
|
5793
|
-
* `@weasel-js/guides` — or `null`. */
|
|
5794
|
-
cellHighlight?: CustomLayerEntry | null;
|
|
5795
|
-
/** `<SceneCanvas>`'s anchor-editing overlay, above the selection overlay:
|
|
5796
|
-
* the config it builds the layer from, a pre-built layer, or `null`. */
|
|
5797
|
-
pathEditingOverlay?: PathEditingOverlaySlotConfig | CustomLayerEntry | null;
|
|
5798
|
-
} & {
|
|
5799
|
-
[customKey: string]: LayerSlotValue<TNode, TPose> | TSceneSlot | undefined;
|
|
5800
|
-
};
|
|
5801
|
-
/** The scene slot once built: its canvas layers, bottom first. Each `key` is
|
|
5802
|
-
* an anchor a custom layer can name (`scene`, or `scene:<layerId>`). */
|
|
5803
|
-
interface SceneSlotLayers {
|
|
5804
|
-
layers: ReadonlyArray<{
|
|
5805
|
-
key: string;
|
|
5806
|
-
layer: RenderLayer<unknown>;
|
|
5807
|
-
}>;
|
|
6074
|
+
/** Hand `scene`'s pose writes to the seat's transition, each gliding from the
|
|
6075
|
+
* pose it was shown at. A node something else poses through an override — a
|
|
6076
|
+
* drag's preview, another animation — is left to it. With `departures`,
|
|
6077
|
+
* removals leave as ghosts there, and a node that comes back while its ghost
|
|
6078
|
+
* is leaving returns from where the ghost was. */
|
|
6079
|
+
declare function bindPoseTransition<TPose, TNode = unknown>(scene: PoseTransitionScene<TPose, TNode>, seat: () => PoseTransitionSeat<TPose> | null | undefined, departures?: Departures<TPose, TNode>): () => void;
|
|
6080
|
+
/** {@link bindPoseTransition} for a component's life, following the latest
|
|
6081
|
+
* seat. Subscribes only while there is one. Answers the ghosts it shows. */
|
|
6082
|
+
declare function usePoseTransition<TPose, TNode = unknown>(scene: PoseTransitionScene<TPose, TNode>, seat: PoseTransitionSeat<TPose> | null | undefined): Departures<TPose, TNode>;
|
|
6083
|
+
|
|
6084
|
+
/**
|
|
6085
|
+
* A routing-trait classifier entry. Other traits (shape, label, icon, …)
|
|
6086
|
+
* are independent registries — fields like `label` or `icon` do NOT belong
|
|
6087
|
+
* on this interface.
|
|
6088
|
+
*/
|
|
6089
|
+
interface NodeRoutingEntry {
|
|
6090
|
+
/** Unique kind name. Routing tables key on this string. Consumer-defined;
|
|
6091
|
+
* the kit places no constraint beyond uniqueness within a registry. */
|
|
6092
|
+
name: string;
|
|
6093
|
+
/** Predicate over a node's `data` payload, and the node itself where the caller has one, for
|
|
6094
|
+
* a kind its data cannot show (`'group'`). First registered kind whose `matches` returns
|
|
6095
|
+
* true claims the node. */
|
|
6096
|
+
matches: (data: unknown, node?: RoutedNode) => boolean;
|
|
5808
6097
|
}
|
|
5809
|
-
/** What
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
|
|
6098
|
+
/** What a routing entry may read of a node beside its data. */
|
|
6099
|
+
interface RoutedNode {
|
|
6100
|
+
/** The node's structural kind: `'mark'` or `'group'`. */
|
|
6101
|
+
readonly kind?: string;
|
|
6102
|
+
/** Set on a boolean group: see `booleanGroupFields`. */
|
|
6103
|
+
readonly consumesChildren?: boolean;
|
|
6104
|
+
}
|
|
6105
|
+
/**
|
|
6106
|
+
* The **routing trait's** registry: answers "what routing-kind string does
|
|
6107
|
+
* this node's data map to?" The result flows into declarative tool-routing
|
|
6108
|
+
* tables (`{ target: 'rect', actionId: 'move' }`).
|
|
6109
|
+
*/
|
|
6110
|
+
interface NodeRouting {
|
|
6111
|
+
/** Register a kind. Order matters: first match wins during `classify`.
|
|
6112
|
+
* Throws if a kind with this name is already registered. */
|
|
6113
|
+
register(kind: NodeRoutingEntry): void;
|
|
6114
|
+
/** Walk registered kinds in registration order; return the first kind
|
|
6115
|
+
* whose `matches(data, node)` returns true, or `'unknown'` if none match. */
|
|
6116
|
+
classify(data: unknown, node?: RoutedNode): string;
|
|
6117
|
+
/** Lookup a kind entry by name. */
|
|
6118
|
+
get(name: string): NodeRoutingEntry | undefined;
|
|
6119
|
+
/** Enumerate registered kinds in registration order. */
|
|
6120
|
+
list(): readonly NodeRoutingEntry[];
|
|
6121
|
+
}
|
|
6122
|
+
/** The routing kind of a node: the name of the first entry whose `matches(data, node)` returns
|
|
6123
|
+
* true, or `'unknown'`. What `NodeRouting.classify` answers, for a caller holding a plain list. */
|
|
6124
|
+
declare function routeKind(entries: readonly NodeRoutingEntry[], data: unknown, node?: RoutedNode): string;
|
|
6125
|
+
/** Build a registry of per-node-kind routing entries. Registering a duplicate
|
|
6126
|
+
* kind name throws. */
|
|
6127
|
+
declare function createNodeRouting(): NodeRouting;
|
|
5819
6128
|
|
|
5820
6129
|
/**
|
|
5821
6130
|
* A camera: held in a ref when uncontrolled, taken from the `view` option when
|
|
@@ -5999,6 +6308,11 @@ interface CanvasRetainOptions {
|
|
|
5999
6308
|
/** GPU memory, in bytes, retained layers may hold together:
|
|
6000
6309
|
* `WeaselRendererOptions.retainBudget`. 0 retains nothing. */
|
|
6001
6310
|
budget?: number;
|
|
6311
|
+
/** Round the view's translation to whole device pixels while it moves, so
|
|
6312
|
+
* a retained layer is composited moved rather than drawn again; it draws
|
|
6313
|
+
* exactly once the view holds. Drawn and hit positions then differ by up
|
|
6314
|
+
* to half a device pixel while the view moves. Default `true`. */
|
|
6315
|
+
whole?: boolean;
|
|
6002
6316
|
}
|
|
6003
6317
|
/**
|
|
6004
6318
|
* Props for `<Canvas>`. Canvas is scene-agnostic: it owns the GL surface, view state, hover
|
|
@@ -6421,10 +6735,16 @@ declare const DRAW_TOOLS: ToolSet<BuiltinToolId>;
|
|
|
6421
6735
|
declare const TYPE_TOOLS: ToolSet<BuiltinToolId>;
|
|
6422
6736
|
/** The tools that cut the page itself. */
|
|
6423
6737
|
declare const PAGE_TOOLS: ToolSet<BuiltinToolId>;
|
|
6424
|
-
/**
|
|
6425
|
-
*
|
|
6738
|
+
/** The built-in tool sets in palette order: selection, then navigation, then the tools that make
|
|
6739
|
+
* things. Each set is named for the presentation group its tools sit in. */
|
|
6740
|
+
declare const BUILTIN_TOOL_GROUPS: readonly ToolSet<BuiltinToolId>[];
|
|
6741
|
+
/** The natural order of palette groups, which `ToolPalette` follows unless given its own. */
|
|
6742
|
+
declare const TOOL_GROUP_ORDER: readonly string[];
|
|
6743
|
+
/** Every built-in tool, in palette order: {@link BUILTIN_TOOL_GROUPS} one after another, then any
|
|
6744
|
+
* shape kind in no family. */
|
|
6426
6745
|
declare const BUILTIN_TOOLS: ToolSet<BuiltinToolId>;
|
|
6427
|
-
/** Every built-in tool id, in palette order: {@link BUILTIN_TOOLS} opened.
|
|
6746
|
+
/** Every built-in tool id, in palette order: {@link BUILTIN_TOOLS} opened. A palette orders the
|
|
6747
|
+
* tools within each group by it. */
|
|
6428
6748
|
declare const BUILTIN_TOOL_IDS: readonly BuiltinToolId[];
|
|
6429
6749
|
|
|
6430
6750
|
/** Default size in CSS pixels for selection corner-handles AND their
|
|
@@ -6438,8 +6758,8 @@ interface SceneCanvasLongPress {
|
|
|
6438
6758
|
* Default: a ring that fills around the press point
|
|
6439
6759
|
* (`createLongPressFeedbackContribution()`), static under
|
|
6440
6760
|
* `prefers-reduced-motion`. `false` shows nothing; a contribution replaces
|
|
6441
|
-
* it, reading the `longPress` dep. Installed beside `ambient
|
|
6442
|
-
*
|
|
6761
|
+
* it, reading the `longPress` dep. Installed beside `ambient` and beside a `tools`
|
|
6762
|
+
* takeover, unless the takeover's ambient holds an entry of the same id.
|
|
6443
6763
|
*/
|
|
6444
6764
|
feedback?: boolean | SurfaceContribution;
|
|
6445
6765
|
/** Default true. A long-press some binding handled pulses
|
|
@@ -6495,9 +6815,9 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<TP
|
|
|
6495
6815
|
poseTransition?: PoseTransitionSeat<TPose> | null;
|
|
6496
6816
|
/**
|
|
6497
6817
|
* Lets pose-transform actions (move, resize, nudge, flip — NOT rotate) also rewrite a
|
|
6498
|
-
* node's data-held geometry
|
|
6499
|
-
* `
|
|
6500
|
-
*
|
|
6818
|
+
* node's data-held geometry: `transform(node, m, change)` returns updated `data`, or
|
|
6819
|
+
* `null` for nodes with no data-held geometry. When absent, the kit emits only the pose
|
|
6820
|
+
* op and leaves `data` untouched.
|
|
6501
6821
|
*
|
|
6502
6822
|
* @see GeometryProjection
|
|
6503
6823
|
*/
|
|
@@ -6530,7 +6850,7 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<TP
|
|
|
6530
6850
|
* the live alt state + current selection so consumers can implement
|
|
6531
6851
|
* alt-cycling through an overlapping stack. Default: top-most hit
|
|
6532
6852
|
* (alt ignored). */
|
|
6533
|
-
pickBest?: (
|
|
6853
|
+
pickBest?: (world: _weasel_js_routing.WorldPoint, alt: boolean, sel: readonly string[]) => string | null;
|
|
6534
6854
|
};
|
|
6535
6855
|
/** Consumer node factories for the `insert` action, keyed by tool `kind`.
|
|
6536
6856
|
* Each factory receives the drag AABB + tool `extras` and returns the
|
|
@@ -6547,9 +6867,9 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<TP
|
|
|
6547
6867
|
insertPaint?: InsertPaint;
|
|
6548
6868
|
/** External-content ingestion (OS drop / clipboard paste / picker).
|
|
6549
6869
|
*
|
|
6550
|
-
* - `handlers` —
|
|
6551
|
-
*
|
|
6552
|
-
*
|
|
6870
|
+
* - `handlers` — content handlers for this canvas alone, priority 0 by default, above
|
|
6871
|
+
* the kit's. One for every canvas on the page goes through `registerContentHandler`.
|
|
6872
|
+
* - `kitHandlers` — which kit handlers it keeps (`KitHandlersOption`); default all.
|
|
6553
6873
|
* - `resolveSrc` — overrides the image handler's `data:`-URI embed (e.g.
|
|
6554
6874
|
* upload to an asset store, return the URL).
|
|
6555
6875
|
* - `svg.unpack` — makes the kit SVG handler parse dropped SVG files into
|
|
@@ -6561,10 +6881,10 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<TP
|
|
|
6561
6881
|
* rather than letting them fall through. Also governs Cmd/Ctrl+V under
|
|
6562
6882
|
* the `edit` preset; the rest takes the `ingest` preset.
|
|
6563
6883
|
*
|
|
6564
|
-
* Memoize `handlers` and `clipboard.reviver`:
|
|
6565
|
-
* re-registers the handlers on every render. */
|
|
6884
|
+
* Memoize `handlers` and `clipboard.reviver`: inline literals rebuild them every render. */
|
|
6566
6885
|
ingestion?: {
|
|
6567
6886
|
handlers?: ContentHandlerEntry[];
|
|
6887
|
+
kitHandlers?: KitHandlersOption;
|
|
6568
6888
|
resolveSrc?: (file: File) => Promise<string>;
|
|
6569
6889
|
svg?: SvgIngestOptions;
|
|
6570
6890
|
clipboard?: {
|
|
@@ -6829,34 +7149,31 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<TP
|
|
|
6829
7149
|
* nor picked here. See `CanvasProps.layerOrder`.
|
|
6830
7150
|
*/
|
|
6831
7151
|
layerOrder?: string[];
|
|
6832
|
-
} & SceneCanvasPointerProps & SceneCanvasActionProps;
|
|
7152
|
+
} & SceneCanvasPointerProps<TData> & SceneCanvasActionProps;
|
|
6833
7153
|
|
|
6834
7154
|
/**
|
|
6835
7155
|
* The behavior presets `<SceneCanvas features>` composes. A bare canvas renders
|
|
6836
|
-
* its scene
|
|
6837
|
-
* turned on by a preset.
|
|
7156
|
+
* its scene, keeps a selection nothing sets, and undoes and redoes whatever
|
|
7157
|
+
* changed it; every behavior beyond that is turned on by a preset.
|
|
6838
7158
|
*
|
|
6839
7159
|
* A preset is a {@link FeaturePreset} object: the actions, tools, bindings,
|
|
6840
|
-
* chrome, and contributions one behavior brings
|
|
6841
|
-
*
|
|
6842
|
-
*
|
|
6843
|
-
*
|
|
6844
|
-
*
|
|
6845
|
-
*
|
|
7160
|
+
* chrome, and contributions one behavior brings, and the presets it includes.
|
|
7161
|
+
* One that holds only actions, tools, and includes is a bundle, pure grouping;
|
|
7162
|
+
* one with any other role is an atom, whose parts only work together. Core's
|
|
7163
|
+
* own are named (`'select'`, `'draw'`) and live in `namedPresets.ts`; a
|
|
7164
|
+
* package ships its own the same way and an app passes the object. Nothing
|
|
7165
|
+
* here imports an action, so a canvas reaches only the presets it is handed.
|
|
7166
|
+
*
|
|
7167
|
+
* A preset is not one of the `packages/core/src/domains/<name>/` source
|
|
6846
7168
|
* directories that `docs/taxonomy.md` calls a feature; the two share a word
|
|
6847
7169
|
* and nothing else.
|
|
6848
7170
|
*/
|
|
6849
7171
|
|
|
6850
|
-
/**
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
* `transform` is `resize` + `rotate`, and `draw` is every base preset. */
|
|
6854
|
-
type CompositeFeature = 'pick' | 'transform' | 'draw';
|
|
7172
|
+
/** Every core preset's name `<SceneCanvas features>` accepts, each after the
|
|
7173
|
+
* presets it includes. */
|
|
7174
|
+
declare const SCENE_CANVAS_FEATURES: readonly ["tools:select", "tools:view", "tools:shape", "tools:draw", "tools:type", "tools:page", "view", "select", "outline", "pick", "move", "resize", "rotate", "transform", "escape", "contextMenu", "selectAll", "duplicate", "delete", "group", "nudge", "style", "clipboard", "edit", "flip", "reorder", "align", "distribute", "arrange", "anchorKeys", "pathfinder", "outlines", "pathEdit", "pathCommands", "paths", "ingest", "draw"];
|
|
6855
7175
|
/** A core preset's name, as `<SceneCanvas features>` takes it. */
|
|
6856
|
-
type Feature =
|
|
6857
|
-
/** Every name `<SceneCanvas features>` accepts, each composite after the
|
|
6858
|
-
* presets it names. */
|
|
6859
|
-
declare const SCENE_CANVAS_FEATURES: readonly Feature[];
|
|
7176
|
+
type Feature = (typeof SCENE_CANVAS_FEATURES)[number];
|
|
6860
7177
|
/** What a preset's ambient bindings are built from: the `selectTool` options
|
|
6861
7178
|
* that configure them. */
|
|
6862
7179
|
interface FeatureBindingOptions {
|
|
@@ -6870,6 +7187,8 @@ interface FeatureBindingOptions {
|
|
|
6870
7187
|
* passes it to `features`, and an app that does not never loads its code.
|
|
6871
7188
|
*/
|
|
6872
7189
|
interface FeaturePreset {
|
|
7190
|
+
/** What a person calls it, where one is listed. Absent, the id. */
|
|
7191
|
+
readonly label?: string;
|
|
6873
7192
|
/** Unique per canvas. `refines` names presets by it, and two different
|
|
6874
7193
|
* presets with one id on one canvas throw. */
|
|
6875
7194
|
readonly id: string;
|
|
@@ -6889,6 +7208,10 @@ interface FeaturePreset {
|
|
|
6889
7208
|
/** Snap sources every snap session on the canvas asks, after
|
|
6890
7209
|
* `<SceneCanvas snap.sources>` and the presets before it. */
|
|
6891
7210
|
readonly snapSources?: readonly SnapSource[];
|
|
7211
|
+
/** Layers it adds to the render stack, by slot, as `<SceneCanvas layers>`
|
|
7212
|
+
* takes them: `grid` fills the grid slot, any other key adds a layer. A
|
|
7213
|
+
* slot `<SceneCanvas layers>` names, `null` included, keeps the consumer's. */
|
|
7214
|
+
readonly layers?: Readonly<Record<string, CustomLayerEntry>>;
|
|
6892
7215
|
/** The selection chrome that is drawn, and can be grabbed, only while it is on. */
|
|
6893
7216
|
readonly chrome?: readonly ChromeId[];
|
|
6894
7217
|
/** Default chrome-caps rules for chrome of its own, under the consumer's
|
|
@@ -6901,25 +7224,25 @@ interface FeaturePreset {
|
|
|
6901
7224
|
* declare: deps, overlays, `attach`, views, frame hooks. A `tools` takeover
|
|
6902
7225
|
* brings its own ambient and leaves them out. */
|
|
6903
7226
|
readonly contributions?: readonly SurfaceContribution[];
|
|
6904
|
-
/** Ids of presets whose actions
|
|
6905
|
-
*
|
|
6906
|
-
*
|
|
7227
|
+
/** Ids of presets whose actions, and those of every preset they include,
|
|
7228
|
+
* this one's register ahead of, so that where both bind one gesture, this
|
|
7229
|
+
* one's is tried first: anchor nudging ahead of node nudging. A preset named
|
|
7230
|
+
* here that is not on is ignored. */
|
|
6907
7231
|
readonly refines?: readonly string[];
|
|
6908
7232
|
/** Presets it turns on with itself, ahead of its own place in the order. */
|
|
6909
7233
|
readonly includes?: readonly FeaturePreset[];
|
|
6910
7234
|
}
|
|
6911
7235
|
/** What `<SceneCanvas features>` takes: a core preset's name or any preset. */
|
|
6912
7236
|
type FeatureEntry = Feature | FeaturePreset;
|
|
6913
|
-
/** The names a canvas resolves
|
|
6914
|
-
|
|
6915
|
-
interface NamedPresets {
|
|
6916
|
-
readonly base: Readonly<Record<BaseFeature, FeaturePreset>>;
|
|
6917
|
-
readonly composite: Readonly<Record<CompositeFeature, readonly BaseFeature[]>>;
|
|
6918
|
-
}
|
|
7237
|
+
/** The names a canvas resolves, each to its preset. */
|
|
7238
|
+
type NamedPresets = Readonly<Record<string, FeaturePreset>>;
|
|
6919
7239
|
/** Where a canvas finds presets beyond the objects it is handed: the names it
|
|
6920
7240
|
* resolves, if any, and the actions it registers once a tool binds them. */
|
|
6921
7241
|
interface PresetSource {
|
|
6922
7242
|
readonly named: NamedPresets | null;
|
|
7243
|
+
/** Actions every canvas registers whatever its presets: undo and redo, since anything that changes
|
|
7244
|
+
* the scene — a preset's action, a tool, the host — leaves history to step through. */
|
|
7245
|
+
readonly baseline?: readonly Action[];
|
|
6923
7246
|
/** Actions registered only when a tool or contribution binds them. */
|
|
6924
7247
|
readonly pool: readonly Action[];
|
|
6925
7248
|
}
|
|
@@ -7143,10 +7466,10 @@ interface PickHudProps {
|
|
|
7143
7466
|
* passes that conversion, so the readout agrees with the picks. */
|
|
7144
7467
|
toWorld?: (clientX: number, clientY: number) => [number, number];
|
|
7145
7468
|
/** World-space hit-test. Same shape as `useSelectTool`'s `pickEvery`. */
|
|
7146
|
-
pickEvery: (
|
|
7469
|
+
pickEvery: (world: WorldPoint) => readonly string[];
|
|
7147
7470
|
/** Optional single-best resolver — the id this point would select on a
|
|
7148
7471
|
* bare click. When supplied, that id is rendered bold in the list. */
|
|
7149
|
-
pickBest?: (
|
|
7472
|
+
pickBest?: (world: WorldPoint) => string | null;
|
|
7150
7473
|
/** Inset from the canvas's top-right corner. Default `{ top: 76, right: 8 }`
|
|
7151
7474
|
* so the HUD clears `CursorCoordsHud` (~64 px tall in its 3-line form). */
|
|
7152
7475
|
offset?: {
|
|
@@ -7239,6 +7562,10 @@ type SceneCanvasAdapter<TData, TLayer extends string, TPose> = MoveAdapter<Node<
|
|
|
7239
7562
|
/** Present only when a composing strategy is configured; the render
|
|
7240
7563
|
* walk feature-detects it. */
|
|
7241
7564
|
composePose?(parent: TPose, child: TPose): TPose;
|
|
7565
|
+
/** The frame a container gives its children, scrolled by the scene's
|
|
7566
|
+
* `scroll` offset — see `PoseAdapter.childFrame`. Present only when the
|
|
7567
|
+
* composition can scroll. */
|
|
7568
|
+
childFrame?(id: string, world: TPose): TPose;
|
|
7242
7569
|
getSelection(): string[];
|
|
7243
7570
|
setSelection(ids: string[]): void;
|
|
7244
7571
|
insertNode(node: Node<TData, TLayer, TPose>, index?: number): void;
|
|
@@ -7290,13 +7617,8 @@ interface SceneToAdapterOptions<TData, TLayer extends string, TPose> {
|
|
|
7290
7617
|
}
|
|
7291
7618
|
/** Derive the adapter for a scene. Reads go straight to the scene; writes are
|
|
7292
7619
|
* ops applied through its history, so anything done through the adapter is
|
|
7293
|
-
* undoable.
|
|
7294
|
-
*
|
|
7295
|
-
* Moving a container carries its contents either way the scene composes
|
|
7296
|
-
* poses. Under a frame (`scene.composition`) the one pose written moves them.
|
|
7297
|
-
* Under the absolute-pose model `setPose` on a container translates every
|
|
7298
|
-
* descendant by the same delta, and a batch that poses descendants too undoes
|
|
7299
|
-
* exactly only when it goes through this adapter's `applyOps`. */
|
|
7620
|
+
* undoable. A container's pose is a frame its children are stored in, so the
|
|
7621
|
+
* one pose written moves its contents. */
|
|
7300
7622
|
declare function sceneToAdapter<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>, options?: SceneToAdapterOptions<TData, TLayer, TPose>): SceneCanvasAdapter<TData, TLayer, TPose>;
|
|
7301
7623
|
|
|
7302
7624
|
/**
|
|
@@ -7308,6 +7630,8 @@ declare function useSceneAdapter<TData, TLayer extends string, TPose>(scene: Sce
|
|
|
7308
7630
|
/** Routes a group node as `'group'`, whatever its data holds. `inferredNodeRouting` leads
|
|
7309
7631
|
* with it; spread it ahead of `defaultNodeRouting`, which is the shape-kind table alone. */
|
|
7310
7632
|
declare const groupNodeRouting: NodeRoutingEntry;
|
|
7633
|
+
/** Routes a boolean group (`booleanGroupFields`) as `'boolean'`: its data holds no path of its own. */
|
|
7634
|
+
declare const booleanGroupRouting: NodeRoutingEntry;
|
|
7311
7635
|
/**
|
|
7312
7636
|
* Routing classifiers for the kit's built-in shape kinds
|
|
7313
7637
|
* (`KIT_SHAPE_KINDS`): each entry matches `data.kind === '<name>'`. Routing
|
|
@@ -7334,9 +7658,10 @@ declare const inferredNodeRouting: readonly NodeRoutingEntry[];
|
|
|
7334
7658
|
*
|
|
7335
7659
|
* `schema` is a `PrefSection`, not the `PrefGroup` a preferences schema
|
|
7336
7660
|
* is: a leaf's own key is its whole dotted node path (`pose.x`,
|
|
7337
|
-
* `data.fill`, `data.style.fontSize`), rooted at `pose` or `data
|
|
7338
|
-
*
|
|
7339
|
-
*
|
|
7661
|
+
* `data.fill`, `data.style.fontSize`), rooted at `pose` or `data`, or a
|
|
7662
|
+
* field the node declares for its children (`clip`, `units.unit`), which a
|
|
7663
|
+
* panel writes through `scene.setClip` / `scene.setUnits`. The sections it
|
|
7664
|
+
* nests are headings only; their keys do not contribute to the node path.
|
|
7340
7665
|
*
|
|
7341
7666
|
* Kind names share the routing trait's vocabulary — an entry registered
|
|
7342
7667
|
* as `'rect'` describes nodes `NodeRouting.classify` maps to `'rect'`.
|
|
@@ -7417,8 +7742,10 @@ interface PreviewNode<TData, TLayer extends string, TPose> {
|
|
|
7417
7742
|
id: NodeId;
|
|
7418
7743
|
/** The node as committed. */
|
|
7419
7744
|
node: Node<TData, TLayer, TPose>;
|
|
7420
|
-
/**
|
|
7421
|
-
* scene's overrides put it mid-transform
|
|
7745
|
+
/** Where the node draws, in world: the pose a source previews, else its
|
|
7746
|
+
* effective pose — where the scene's overrides put it mid-transform —
|
|
7747
|
+
* folded through every container's frame, previewed or not, and scrolled
|
|
7748
|
+
* as the view scrolls it. */
|
|
7422
7749
|
pose: TPose;
|
|
7423
7750
|
/** The interim data, or the committed one when only the pose is in flight. */
|
|
7424
7751
|
data: TData;
|
|
@@ -7427,13 +7754,17 @@ interface PreviewNode<TData, TLayer extends string, TPose> {
|
|
|
7427
7754
|
* reflowing into its destination slot. It reads better painted settled.
|
|
7428
7755
|
*/
|
|
7429
7756
|
opaque: boolean;
|
|
7430
|
-
/** Previewed descendants,
|
|
7757
|
+
/** Previewed descendants, and those a previewed frame carries, so a
|
|
7758
|
+
* container's ghost brings its children. */
|
|
7431
7759
|
children: PreviewNode<TData, TLayer, TPose>[];
|
|
7432
7760
|
}
|
|
7433
7761
|
/**
|
|
7434
7762
|
* The previewing subtrees, as roots. A previewed node whose parent is also
|
|
7435
7763
|
* previewing is a child of that parent's entry rather than a root of its own,
|
|
7436
7764
|
* which is what lets a caller draw a container and its contents as one thing.
|
|
7765
|
+
* A previewed container whose pose is a frame brings every child it carries,
|
|
7766
|
+
* previewed or not. A source previews a pose in the frame the node is stored
|
|
7767
|
+
* in; each entry's pose is in world.
|
|
7437
7768
|
*
|
|
7438
7769
|
* An id with no node is skipped: an insert previews before the node it will
|
|
7439
7770
|
* create exists.
|
|
@@ -7473,10 +7804,6 @@ declare function publishPreviews<TData, TLayer extends string, TPose>(scene: Sce
|
|
|
7473
7804
|
* start produces a zero-area drag rect around a trail that swept the page.
|
|
7474
7805
|
*/
|
|
7475
7806
|
|
|
7476
|
-
type Point$2 = {
|
|
7477
|
-
x: number;
|
|
7478
|
-
y: number;
|
|
7479
|
-
};
|
|
7480
7807
|
/** The fields of an `insertPreview` overlay this needs. `canvas/deps/insert`
|
|
7481
7808
|
* passes the equivalent from its own `(bounds, extras)` commit arguments. */
|
|
7482
7809
|
interface InsertPreviewLike {
|
|
@@ -7494,24 +7821,24 @@ type InsertPreviewGeometry = {
|
|
|
7494
7821
|
kind: 'box';
|
|
7495
7822
|
} | {
|
|
7496
7823
|
kind: 'line';
|
|
7497
|
-
a: Point
|
|
7498
|
-
b: Point
|
|
7824
|
+
a: Point;
|
|
7825
|
+
b: Point;
|
|
7499
7826
|
} | {
|
|
7500
7827
|
kind: 'polygon';
|
|
7501
|
-
center: Point
|
|
7828
|
+
center: Point;
|
|
7502
7829
|
radius: number;
|
|
7503
7830
|
sides: number;
|
|
7504
7831
|
rotation: number;
|
|
7505
7832
|
} | {
|
|
7506
7833
|
kind: 'star';
|
|
7507
|
-
center: Point
|
|
7834
|
+
center: Point;
|
|
7508
7835
|
outerRadius: number;
|
|
7509
7836
|
innerRadius: number;
|
|
7510
7837
|
points: number;
|
|
7511
7838
|
rotation: number;
|
|
7512
7839
|
} | {
|
|
7513
7840
|
kind: 'pencil';
|
|
7514
|
-
samples: ReadonlyArray<Point
|
|
7841
|
+
samples: ReadonlyArray<Point>;
|
|
7515
7842
|
};
|
|
7516
7843
|
/** An in-flight insert's shape, resolved from its drag rect and `extras`. */
|
|
7517
7844
|
interface InsertPreviewExtent {
|
|
@@ -7542,17 +7869,13 @@ declare function insertPreviewExtent(ov: InsertPreviewLike): InsertPreviewExtent
|
|
|
7542
7869
|
* `DrawCommand`, no style, no React, no dispatcher. World coordinates only.
|
|
7543
7870
|
*/
|
|
7544
7871
|
|
|
7545
|
-
type Point$1 = {
|
|
7546
|
-
x: number;
|
|
7547
|
-
y: number;
|
|
7548
|
-
};
|
|
7549
7872
|
/**
|
|
7550
7873
|
* The chrome-caps id a surface consults before painting each variant. The
|
|
7551
7874
|
* gating itself is the painter's — two views of one surface may disagree about
|
|
7552
7875
|
* whether to show an in-flight marquee — but the id is not something a caller
|
|
7553
7876
|
* should have to guess.
|
|
7554
7877
|
*/
|
|
7555
|
-
type OverlayVisibilityId = 'action.marquee' | 'action.lasso' | 'action.insert-preview' | 'action.polyline' | 'action.brush';
|
|
7878
|
+
type OverlayVisibilityId = 'action.marquee' | 'action.lasso' | 'action.insert-preview' | 'action.polyline' | 'action.brush' | 'action.reason';
|
|
7556
7879
|
/**
|
|
7557
7880
|
* One in-flight overlay, in world coordinates.
|
|
7558
7881
|
*
|
|
@@ -7573,9 +7896,9 @@ type ResolvedOverlay = {
|
|
|
7573
7896
|
visibilityId: 'action.lasso';
|
|
7574
7897
|
/** The trail so far, at least two long. The region it encloses is the
|
|
7575
7898
|
* trail closed back to its first vertex. */
|
|
7576
|
-
vertices: ReadonlyArray<Point
|
|
7899
|
+
vertices: ReadonlyArray<Point>;
|
|
7577
7900
|
/** Live pointer position — the trail's last vertex until it advances. */
|
|
7578
|
-
current: Point
|
|
7901
|
+
current: Point;
|
|
7579
7902
|
shiftHeld: boolean;
|
|
7580
7903
|
} | {
|
|
7581
7904
|
kind: 'insertPreview';
|
|
@@ -7587,7 +7910,7 @@ type ResolvedOverlay = {
|
|
|
7587
7910
|
geometry: InsertPreviewGeometry;
|
|
7588
7911
|
/** The drag's anchor — a growth axis to mark. Absent for a pencil, which
|
|
7589
7912
|
* has none. */
|
|
7590
|
-
anchorPoint?: Point
|
|
7913
|
+
anchorPoint?: Point;
|
|
7591
7914
|
/** World affines the shape will also be drawn under, as the action gave them. */
|
|
7592
7915
|
copies?: readonly (readonly [number, number, number, number, number, number])[];
|
|
7593
7916
|
/** The action's per-shape payload, verbatim. Carries what geometry
|
|
@@ -7598,7 +7921,7 @@ type ResolvedOverlay = {
|
|
|
7598
7921
|
visibilityId: 'action.polyline';
|
|
7599
7922
|
/** The run, at least two long, open — the last point does not join the
|
|
7600
7923
|
* first. A closed sweep is a `lasso`. */
|
|
7601
|
-
points: ReadonlyArray<Point
|
|
7924
|
+
points: ReadonlyArray<Point>;
|
|
7602
7925
|
/** What the run is, for a painter choosing a style. Never defaulted
|
|
7603
7926
|
* away: `'chrome'` when the action named none. A role the painter has
|
|
7604
7927
|
* no style for is drawn as plain chrome, not dropped. */
|
|
@@ -7607,9 +7930,15 @@ type ResolvedOverlay = {
|
|
|
7607
7930
|
kind: 'brush';
|
|
7608
7931
|
visibilityId: 'action.brush';
|
|
7609
7932
|
/** The brush's path, at least one point; the last is where it is now. */
|
|
7610
|
-
points: ReadonlyArray<Point
|
|
7933
|
+
points: ReadonlyArray<Point>;
|
|
7611
7934
|
/** On screen: a painter draws it at this size at every zoom. */
|
|
7612
7935
|
radiusPx: number;
|
|
7936
|
+
} | {
|
|
7937
|
+
kind: 'reason';
|
|
7938
|
+
visibilityId: 'action.reason';
|
|
7939
|
+
/** The pointer, which a painter shows `text` beside. */
|
|
7940
|
+
at: Point;
|
|
7941
|
+
text: string;
|
|
7613
7942
|
};
|
|
7614
7943
|
/** The overlays worth painting, in the order the handles published them. */
|
|
7615
7944
|
declare function resolveOverlays(overlays: Iterable<OngoingOverlay>): ResolvedOverlay[];
|
|
@@ -7839,7 +8168,7 @@ declare function useDevtoolsLabel(): string | null;
|
|
|
7839
8168
|
*/
|
|
7840
8169
|
declare function createEnteredGroupScope(opts: {
|
|
7841
8170
|
entered: EnteredGroupApi;
|
|
7842
|
-
scene: Pick<Scene<unknown, string, unknown>, 'ancestorsOf'>;
|
|
8171
|
+
scene: Pick<Scene<unknown, string, unknown>, 'ancestorsOf' | 'get'>;
|
|
7843
8172
|
/** Alpha for a node outside the entered group. Default `OUT_OF_SCOPE_ALPHA`. */
|
|
7844
8173
|
dimAlpha?: number;
|
|
7845
8174
|
}): NodeScope;
|
|
@@ -8109,160 +8438,6 @@ interface CreateTextLayerOpts<T> {
|
|
|
8109
8438
|
/** Build a `RenderLayer` that emits one `TextDrawCommand` per text node. */
|
|
8110
8439
|
declare function createTextLayer<T>(opts: CreateTextLayerOpts<T>): RenderLayer<unknown>;
|
|
8111
8440
|
|
|
8112
|
-
/** A scene `drawOne` that leaves out one node's glyphs. */
|
|
8113
|
-
type EditingDrawOne = <TNode extends Node<unknown, string, unknown>>(node: TNode, pose: unknown, view?: View, ctx?: NodePaintCtx) => DrawCommand[];
|
|
8114
|
-
|
|
8115
|
-
/**
|
|
8116
|
-
* Union math over rect-shaped poses.
|
|
8117
|
-
*
|
|
8118
|
-
* Two answers, deliberately distinct. `unionBounds` folds the *unrotated*
|
|
8119
|
-
* boxes and is what commit-time actions want, because they go on to write
|
|
8120
|
-
* poses back in that same frame. `unionAABB` expands each rotated member to
|
|
8121
|
-
* the extent of its ink first, and is what anything a user looks at or clicks
|
|
8122
|
-
* wants — selection chrome, gesture bounds, an export viewBox. Folding the
|
|
8123
|
-
* unrotated box there under-reports the extent of a rotated member exactly
|
|
8124
|
-
* when the consumer is watching it move.
|
|
8125
|
-
*/
|
|
8126
|
-
|
|
8127
|
-
/** Compute the AABB envelope of a set of rect-shaped poses, ignoring any
|
|
8128
|
-
* rotation they carry. See the module docstring before reaching for this
|
|
8129
|
-
* over {@link unionAABB}. */
|
|
8130
|
-
declare function unionBounds<TPose extends RectPose>(poses: Iterable<TPose>): RectPose | null;
|
|
8131
|
-
/**
|
|
8132
|
-
* Axis-align a pose that carries a `rotation` or a `transform`: returns the
|
|
8133
|
-
* AABB of the box as drawn, its four corners through `poseFrameOf`, with both
|
|
8134
|
-
* fields dropped.
|
|
8135
|
-
*
|
|
8136
|
-
* A pose with neither is returned as-is.
|
|
8137
|
-
*/
|
|
8138
|
-
declare function axisAlignedBounds<TPose extends RectPose>(b: TPose): RectPose;
|
|
8139
|
-
/**
|
|
8140
|
-
* Fold every part into one world-space AABB, skipping `null` / `undefined`
|
|
8141
|
-
* entries. Rotated parts are expanded via {@link axisAlignedBounds} first;
|
|
8142
|
-
* the result never carries a `rotation` (a union of several oriented boxes
|
|
8143
|
-
* has no single orientation to report).
|
|
8144
|
-
*
|
|
8145
|
-
* Returns `null` when nothing was contributed.
|
|
8146
|
-
*/
|
|
8147
|
-
declare function unionAABB<TPose extends RectPose>(parts: Iterable<TPose | null | undefined>): RectPose | null;
|
|
8148
|
-
|
|
8149
|
-
/**
|
|
8150
|
-
* `useSceneTextEdit` — scene-aware wrapper around `useTextEdit`: scene
|
|
8151
|
-
* lookups for text / style / runs / screen-pose, and
|
|
8152
|
-
* `scene.update(id, { data })` for commits. The overlay and a double-click
|
|
8153
|
-
* both read the pose a node is painted at, so text inside a container whose
|
|
8154
|
-
* pose is a frame is edited where it is drawn.
|
|
8155
|
-
*
|
|
8156
|
-
* Defaults assume the node's `data` carries `text` / `style` / `runs`
|
|
8157
|
-
* directly. For custom data shapes, override any of the optional projections.
|
|
8158
|
-
* Consumers with non-rect poses should drop down to raw `useTextEdit` and
|
|
8159
|
-
* supply their own `getScreenPose`.
|
|
8160
|
-
*/
|
|
8161
|
-
|
|
8162
|
-
/** Shape the default projections expect `data` to satisfy. All fields
|
|
8163
|
-
* optional so any object satisfies the constraint — projections fill in
|
|
8164
|
-
* the gaps for non-default shapes. */
|
|
8165
|
-
interface DefaultTextData {
|
|
8166
|
-
text?: string;
|
|
8167
|
-
style?: TextStyle;
|
|
8168
|
-
runs?: readonly StyledRun[];
|
|
8169
|
-
fill?: Fill | Inherit | null;
|
|
8170
|
-
stroke?: Stroke | Inherit | null;
|
|
8171
|
-
verticalAlign?: TextVerticalAlign;
|
|
8172
|
-
padding?: number;
|
|
8173
|
-
overflow?: TextOverflow;
|
|
8174
|
-
}
|
|
8175
|
-
/** All-optional projections + fontSize fallback. */
|
|
8176
|
-
interface UseSceneTextEditOptions<TData> {
|
|
8177
|
-
/**
|
|
8178
|
-
* Is this node text? A double-click opens an edit only on a node that
|
|
8179
|
-
* answers yes, and passes through any other to the text under it. Default:
|
|
8180
|
-
* `isTextData`, the test `inferredNodeRouting` classifies a text node by. Pass one when `getText` reads some other shape.
|
|
8181
|
-
*/
|
|
8182
|
-
isText?: (data: TData) => boolean;
|
|
8183
|
-
/** Read plain text from `data`. Default: `data.text ?? ''`. */
|
|
8184
|
-
getText?: (data: TData) => string;
|
|
8185
|
-
/** Read style from `data`. Default: `data.style`. */
|
|
8186
|
-
getStyle?: (data: TData) => TextStyle | undefined;
|
|
8187
|
-
/** Read the node's paint from `data`. Default: `data.fill` / `data.stroke`. */
|
|
8188
|
-
getPaint?: (data: TData) => TextPaint | undefined;
|
|
8189
|
-
/** Read rich-text runs from `data`. Default: `data.runs`. */
|
|
8190
|
-
getRuns?: (data: TData) => readonly StyledRun[] | undefined;
|
|
8191
|
-
/** Read the box vertical alignment from `data`. Default: `data.verticalAlign`. */
|
|
8192
|
-
getVerticalAlign?: (data: TData) => TextVerticalAlign | undefined;
|
|
8193
|
-
/** Read the inset from the node's box to its text from `data`. Default: `data.padding`. */
|
|
8194
|
-
getPadding?: (data: TData) => number | undefined;
|
|
8195
|
-
/** Read whether the node cuts its text at its box from `data`, which the
|
|
8196
|
-
* overlay then does too. Default: `data.overflow`. */
|
|
8197
|
-
getOverflow?: (data: TData) => TextOverflow | undefined;
|
|
8198
|
-
/** Produce updated data with new text. Default: `{ ...data, text }`. */
|
|
8199
|
-
setText?: (data: TData, text: string) => TData;
|
|
8200
|
-
/** Produce updated data with new runs. Default: `{ ...data, runs }`. */
|
|
8201
|
-
setRuns?: (data: TData, runs: StyledRun[]) => TData;
|
|
8202
|
-
/**
|
|
8203
|
-
* Produce updated data with a new node-wide style. Default:
|
|
8204
|
-
* `{ ...data, style }`. Written only when a range toggle has to *clear* a
|
|
8205
|
-
* flag the node itself sets — the run algebra is additive, so that edit
|
|
8206
|
-
* lowers the node flag and raises it on the runs outside the range. See
|
|
8207
|
-
* `useTextEdit`'s `setStyle`.
|
|
8208
|
-
*
|
|
8209
|
-
* An edit's text, runs, and style are folded through these three and
|
|
8210
|
-
* written as one `scene.update`, so a commit is one undo step.
|
|
8211
|
-
*/
|
|
8212
|
-
setStyle?: (data: TData, style: TextStyle) => TData;
|
|
8213
|
-
/** Fallback fontSize when `style.fontSize` is unset. Default `16`. */
|
|
8214
|
-
defaultFontSize?: number;
|
|
8215
|
-
/**
|
|
8216
|
-
* The view to project through. Omit it and the view is read live from the
|
|
8217
|
-
* weasel canvas mounted inside `container` (the one a double-click landed
|
|
8218
|
-
* on, when there are several). With no canvas there, the node's world box
|
|
8219
|
-
* is passed through as screen pixels.
|
|
8220
|
-
*
|
|
8221
|
-
* A thunk is re-read on every projection; a plain `View` is the value from
|
|
8222
|
-
* the render that supplied it.
|
|
8223
|
-
*/
|
|
8224
|
-
view?: View | (() => View);
|
|
8225
|
-
/**
|
|
8226
|
-
* Forwarded to `useTextEdit`: is `el` part of the editor's own chrome?
|
|
8227
|
-
* Focus moving into it does not end the edit. Wire it to whatever renders
|
|
8228
|
-
* the character controls.
|
|
8229
|
-
*/
|
|
8230
|
-
isEditorChrome?: (el: Element) => boolean;
|
|
8231
|
-
/** Forwarded to `useTextEdit`: what Escape does to the edit. */
|
|
8232
|
-
escape?: 'cancel' | 'commit';
|
|
8233
|
-
/** Forwarded to `useTextEdit`: how long an edit waits for its face. */
|
|
8234
|
-
fontHold?: number;
|
|
8235
|
-
/** Forwarded to `useTextEdit`: called as an edit of the node `id` opens,
|
|
8236
|
-
* whichever way it was started. */
|
|
8237
|
-
onStart?: (id: string) => void;
|
|
8238
|
-
/** Forwarded to `useTextEdit`: called as the edit of `id` closes, after
|
|
8239
|
-
* any commit has been written to the scene. */
|
|
8240
|
-
onEnd?: (id: string) => void;
|
|
8241
|
-
}
|
|
8242
|
-
/** Return shape extends `UseTextEditReturn` with an `onDoubleClick`
|
|
8243
|
-
* binding for the canvas container. Double-clicking inside a text
|
|
8244
|
-
* node enters edit mode with the caret seeded at the clicked glyph. */
|
|
8245
|
-
interface UseSceneTextEditReturn extends UseTextEditReturn {
|
|
8246
|
-
/** Bind to the element wrapping `<SceneCanvas>` (the same element
|
|
8247
|
-
* passed as `container`, or any ancestor that receives the dblclick
|
|
8248
|
-
* bubble). Starts an edit on the top-most text node under the cursor. */
|
|
8249
|
-
onDoubleClick: (e: MouseEvent<HTMLElement>) => void;
|
|
8250
|
-
/** The `isText` option asked of the node with this id: what
|
|
8251
|
-
* `TextEditDep.isTextNode` wants, so both ways into an edit agree. */
|
|
8252
|
-
isTextNode: (id: string) => boolean;
|
|
8253
|
-
/**
|
|
8254
|
-
* `defaultDrawOne`, less the glyphs of the node being edited: the overlay
|
|
8255
|
-
* stands in for its text, and the rest of the node, a `background` among
|
|
8256
|
-
* it, goes on painting. Pass it as `layers.scene.drawOne`, with
|
|
8257
|
-
* `paintBounds: defaultPaintBounds`, in place of an `alphaFor` that hides
|
|
8258
|
-
* the whole node.
|
|
8259
|
-
*/
|
|
8260
|
-
drawOne: EditingDrawOne;
|
|
8261
|
-
}
|
|
8262
|
-
/** Wire double-click-to-edit text on a scene: mounts a DOM editing overlay
|
|
8263
|
-
* over the node being edited and writes the result back as an undoable op. */
|
|
8264
|
-
declare function useSceneTextEdit<TData extends DefaultTextData, TLayer extends string, TPose extends RectPose = RectPose>(scene: Scene<TData, TLayer, TPose>, container: HTMLElement | null, options?: UseSceneTextEditOptions<TData>): UseSceneTextEditReturn;
|
|
8265
|
-
|
|
8266
8441
|
/** How Outline Stroke and a Boolean operation counting strokes measure one. */
|
|
8267
8442
|
interface StrokeRegionOptions {
|
|
8268
8443
|
/** The view scale a `{ px }` width resolves against: one number, or the
|
|
@@ -8325,9 +8500,9 @@ declare function useCreateOutlinesAdapter(adapter: CreateOutlinesAdapter): void;
|
|
|
8325
8500
|
* only round-trips the 6-char form, so call-sites pad the saved alpha back on
|
|
8326
8501
|
* when the user picks via the native widget. */
|
|
8327
8502
|
/** Expand `#rgb` / `#rgba` / `#rrggbb` to `#rrggbbaa`. Pads `ff` when no alpha
|
|
8328
|
-
* channel is present.
|
|
8329
|
-
* returned unchanged
|
|
8330
|
-
* we only normalize the hex shapes we actually persist. */
|
|
8503
|
+
* channel is present. Anything else — named colors, `rgba(...)`, a malformed
|
|
8504
|
+
* `#` value — is returned unchanged: the kit's renderer accepts arbitrary CSS,
|
|
8505
|
+
* and we only normalize the hex shapes we actually persist. */
|
|
8331
8506
|
declare function toHex8(color: string): string;
|
|
8332
8507
|
/** Return the alpha channel of `color` as 0..1. Defaults to 1 when the
|
|
8333
8508
|
* color is not in 8-char hex form. */
|
|
@@ -8789,12 +8964,18 @@ declare function registeredOpNames(): readonly string[];
|
|
|
8789
8964
|
* `getParent` returns the live parent at call time so mid-batch
|
|
8790
8965
|
* parent updates compose correctly. */
|
|
8791
8966
|
declare function scenePoseAdapter(scene: Scene<unknown, string, unknown>): PoseAdapter<unknown>;
|
|
8967
|
+
/** `scenePoseAdapter` read as the view shows it: each scrolled container's
|
|
8968
|
+
* children moved by its offset. For a gesture, which reads the world it
|
|
8969
|
+
* writes back through the same fold, so what it stores is the content
|
|
8970
|
+
* position; the layout pass and other document writers use
|
|
8971
|
+
* `scenePoseAdapter`. */
|
|
8972
|
+
declare function sceneViewPoseAdapter(scene: Scene<unknown, string, unknown>): PoseAdapter<unknown>;
|
|
8792
8973
|
|
|
8793
8974
|
/**
|
|
8794
8975
|
* Bringing a node's descendants along when something writes the node's pose
|
|
8795
8976
|
* and nothing writes theirs: a layout restacking a container, a drop landing
|
|
8796
|
-
* one, a page move.
|
|
8797
|
-
*
|
|
8977
|
+
* one, a page move. A descendant stored in a frame that moves rides it; one
|
|
8978
|
+
* stored above it, under an envelope, stays behind unless it is written too.
|
|
8798
8979
|
*/
|
|
8799
8980
|
|
|
8800
8981
|
/** What carrying reads: the tree, every stored pose, and how poses compose. */
|
|
@@ -8814,6 +8995,15 @@ declare function sceneCarrySource(scene: Scene<unknown, string, unknown>): Carry
|
|
|
8814
8995
|
* under it are left to whoever moves it.
|
|
8815
8996
|
*/
|
|
8816
8997
|
declare function carriedDescendants<TPose>(source: CarrySource<TPose>, root: NodeId, translate: (world: TPose, id: NodeId) => TPose | null, moving?: (id: NodeId) => boolean): Map<NodeId, TPose>;
|
|
8998
|
+
/** The nodes whose stored pose is in `id`'s frame: its children, and through
|
|
8999
|
+
* a child that is an envelope, that child's own. */
|
|
9000
|
+
declare function heldInFrame(scene: {
|
|
9001
|
+
childrenOf(id: NodeId): readonly NodeId[];
|
|
9002
|
+
get(id: NodeId): {
|
|
9003
|
+
dependsOn?: unknown;
|
|
9004
|
+
derivePose?: unknown;
|
|
9005
|
+
} | undefined;
|
|
9006
|
+
}, id: NodeId): NodeId[];
|
|
8817
9007
|
|
|
8818
9008
|
/** @internal */
|
|
8819
9009
|
interface HitAdapter<TNode extends {
|
|
@@ -8845,14 +9035,14 @@ interface NestedHitTester {
|
|
|
8845
9035
|
/** Outermost-ancestor pick. Suitable as the chrome-level `pickEvery`: a
|
|
8846
9036
|
* casual click selects the whole top-level ancestor. Returns `null` on
|
|
8847
9037
|
* empty space. */
|
|
8848
|
-
pickOutermost: (
|
|
9038
|
+
pickOutermost: (world: WorldPoint) => string | null;
|
|
8849
9039
|
/** Alt-aware selection-update pick. Without `alt`, returns the outermost
|
|
8850
9040
|
* ancestor (same as `pickOutermost`). With `alt`, returns one level
|
|
8851
9041
|
* deeper than the deepest currently-selected ancestor in the leaf's
|
|
8852
9042
|
* chain — repeated alt-clicks step ancestor → descendant → leaf. With
|
|
8853
9043
|
* `alt` and nothing in the chain selected, jumps straight to the leaf.
|
|
8854
9044
|
* Plug into `useSelectTool({ pickBest })`. */
|
|
8855
|
-
pickBest: (
|
|
9045
|
+
pickBest: (world: WorldPoint, alt: boolean, selection: readonly string[]) => string | null;
|
|
8856
9046
|
}
|
|
8857
9047
|
/** Build hit-testers that respect containers: a plain click selects the
|
|
8858
9048
|
* top-level ancestor, and alt-clicking descends one level at a time toward
|
|
@@ -8889,14 +9079,14 @@ declare function createScene<TData, TLayer extends string, TPose = RectPose>(opt
|
|
|
8889
9079
|
* registry passed in `options`. Throws on unknown version, unknown registry
|
|
8890
9080
|
* keys, or invalid scene shape (cross-layer subtrees, unknown layer ids).
|
|
8891
9081
|
* The scene starts with empty history. */
|
|
8892
|
-
declare function sceneFromJSON<TData, TLayer extends string, TPose>(json:
|
|
9082
|
+
declare function sceneFromJSON<TData, TLayer extends string, TPose>(json: SavedScene<TData, TLayer, TPose>, options?: {
|
|
8893
9083
|
registry?: SceneRegistry<TPose, TData, TLayer>;
|
|
8894
9084
|
historyLimit?: number;
|
|
8895
9085
|
coalesceWindowMs?: number;
|
|
8896
9086
|
generateId?: () => NodeId;
|
|
8897
9087
|
ops?: Readonly<Record<string, RegisteredOp<unknown>>>;
|
|
8898
|
-
composition?:
|
|
8899
|
-
layoutFrame?:
|
|
9088
|
+
composition?: SceneOptions<TData, TLayer, TPose>['composition'];
|
|
9089
|
+
layoutFrame?: SceneOptions<TData, TLayer, TPose>['layoutFrame'];
|
|
8900
9090
|
} & SpecsFromSerializedOptions<TData, TLayer, TPose>): Scene<TData, TLayer, TPose>;
|
|
8901
9091
|
|
|
8902
9092
|
/**
|
|
@@ -8968,6 +9158,7 @@ interface StatedNodeFields {
|
|
|
8968
9158
|
locked?: boolean;
|
|
8969
9159
|
units?: UnitScope;
|
|
8970
9160
|
clip?: NodeClip;
|
|
9161
|
+
consumesChildren?: boolean;
|
|
8971
9162
|
}
|
|
8972
9163
|
/** The plain optional fields of a node or spec as a spread for `scene.add`:
|
|
8973
9164
|
* each present only when stated, so an unstated one keeps the scene's
|
|
@@ -8977,6 +9168,41 @@ declare const statedFields: (n: StatedNodeFields & {
|
|
|
8977
9168
|
kind?: string;
|
|
8978
9169
|
}) => StatedNodeFields;
|
|
8979
9170
|
|
|
9171
|
+
/**
|
|
9172
|
+
* Reading a save from before a scene's poses composed by default. Versions 1
|
|
9173
|
+
* and 2 stored every pose as world; version 3 stores a child's pose in the
|
|
9174
|
+
* frame of the nearest container that defines one.
|
|
9175
|
+
*/
|
|
9176
|
+
|
|
9177
|
+
/** What localizing reads of a node: where it sits, its pose, and whether it is a frame. */
|
|
9178
|
+
interface PlacedSpec<TPose> {
|
|
9179
|
+
id?: NodeId | string;
|
|
9180
|
+
parent?: NodeId | string | null;
|
|
9181
|
+
pose: TPose;
|
|
9182
|
+
dependsOn?: unknown;
|
|
9183
|
+
derivePose?: unknown;
|
|
9184
|
+
}
|
|
9185
|
+
/**
|
|
9186
|
+
* `specs`, whose every pose is world, with each pose made local to the frame
|
|
9187
|
+
* it is stored in under `composition`: an old save as it loads, or a tree an
|
|
9188
|
+
* importer measured in world. A child of a container whose pose derives from
|
|
9189
|
+
* its children shares that container's frame, so it is rebased against the
|
|
9190
|
+
* frame above it.
|
|
9191
|
+
*/
|
|
9192
|
+
declare function localizeWorldPoses<TPose, TSpec extends PlacedSpec<TPose>>(specs: readonly TSpec[], composition: PoseComposition<TPose>): TSpec[];
|
|
9193
|
+
/**
|
|
9194
|
+
* Where each of `specs` draws: its pose folded through the frames above it
|
|
9195
|
+
* under `composition`, by id. The inverse of {@link localizeWorldPoses}, for
|
|
9196
|
+
* a reader of a spec list that is not in a scene yet.
|
|
9197
|
+
*/
|
|
9198
|
+
declare function worldPosesOf<TPose, TSpec extends PlacedSpec<TPose>>(specs: readonly TSpec[], composition: PoseComposition<TPose>): Map<string, TPose>;
|
|
9199
|
+
/**
|
|
9200
|
+
* `specs`, whose every pose is world, as they are stored once added to
|
|
9201
|
+
* `scene`: each made local to the frame it lands in, whether that frame is
|
|
9202
|
+
* among `specs` or already in the scene.
|
|
9203
|
+
*/
|
|
9204
|
+
declare function localizeInScene<TPose, TSpec extends PlacedSpec<TPose>>(scene: Scene<unknown, string, TPose>, specs: readonly TSpec[]): TSpec[];
|
|
9205
|
+
|
|
8980
9206
|
/**
|
|
8981
9207
|
* Build a {@link PoseOverrides} map.
|
|
8982
9208
|
*
|
|
@@ -9208,6 +9434,33 @@ declare function unionOfChildren<TPose>(_node: unknown, deps: readonly ({
|
|
|
9208
9434
|
pose: TPose;
|
|
9209
9435
|
} | undefined)[]): TPose | null;
|
|
9210
9436
|
|
|
9437
|
+
/** The booleans that make one shape of their operands: the Pathfinder's four
|
|
9438
|
+
* shape modes, and what a boolean group can be set to. */
|
|
9439
|
+
type BooleanShapeOp = 'union' | 'intersect' | 'subtract' | 'exclude';
|
|
9440
|
+
|
|
9441
|
+
/** A boolean group's path, from its children: see `booleanGroup.ts`. */
|
|
9442
|
+
|
|
9443
|
+
/** Registry key for {@link booleanOfChildren}. */
|
|
9444
|
+
declare const BOOLEAN_OF_CHILDREN = "kit:booleanOfChildren";
|
|
9445
|
+
/** The operation a boolean group's `data.boolean` names; union when it names none. */
|
|
9446
|
+
declare function booleanOpOf(data: unknown): BooleanShapeOp;
|
|
9447
|
+
/**
|
|
9448
|
+
* A boolean group's path: `data.boolean` over its children's outlines, back
|
|
9449
|
+
* to front, so subtract takes everything in front from the backmost child. A
|
|
9450
|
+
* group among them is one operand, the union of what it shows. A hidden child
|
|
9451
|
+
* is no operand. `null` when no child has an outline, which draws nothing.
|
|
9452
|
+
*/
|
|
9453
|
+
declare function booleanOfChildren(node: {
|
|
9454
|
+
data?: unknown;
|
|
9455
|
+
}, deps: readonly (DerivedDep<unknown> | undefined)[]): Path | null;
|
|
9456
|
+
|
|
9457
|
+
/**
|
|
9458
|
+
* The fields that make a node a boolean group, for `scene.add` beside its
|
|
9459
|
+
* layer, pose, parent and `data`. Its children are added under it as usual;
|
|
9460
|
+
* its pose follows theirs, so the one it is added with is a placeholder.
|
|
9461
|
+
*/
|
|
9462
|
+
declare function booleanGroupFields<TPose>(): Pick<AddNodeSpec<unknown, string, TPose>, 'kind' | 'consumesChildren' | 'dependsOn' | 'derivePath' | 'derivePose'>;
|
|
9463
|
+
|
|
9211
9464
|
/** The layer-record field the predicates below read. */
|
|
9212
9465
|
interface AnnotationFlag {
|
|
9213
9466
|
readonly id: string;
|
|
@@ -9295,7 +9548,7 @@ interface MeasureHit {
|
|
|
9295
9548
|
* units of it, else a line within the same distance. A hidden or locked
|
|
9296
9549
|
* measurement (`nodeGates`) is passed over.
|
|
9297
9550
|
*/
|
|
9298
|
-
declare function measureAt(scene: Pick<Scene<unknown, string, unknown>, '
|
|
9551
|
+
declare function measureAt(scene: Pick<Scene<unknown, string, unknown>, 'nodesOnLayer' | 'get' | 'layers' | 'overrides'>, ms: Pick<Measurements, 'layer'>, p: MeasurePoint, tolerance: number): MeasureHit | null;
|
|
9299
9552
|
/** Options for `measureEndSource`. */
|
|
9300
9553
|
interface MeasureEndSourceOptions {
|
|
9301
9554
|
/** Overrides the canvas's reach for measurement ends, in screen px. */
|
|
@@ -9844,6 +10097,21 @@ interface EffectItem {
|
|
|
9844
10097
|
middle: number;
|
|
9845
10098
|
/** What it paints; empty for a piece that only takes room, such as a space. */
|
|
9846
10099
|
parts: readonly DerivedPart[];
|
|
10100
|
+
/** Rules it carries across its stretch — a text decoration cut to one cluster. A band that runs to the item's end
|
|
10101
|
+
* joins one alike in paint and depth that starts the next item, so the effect draws them as one ribbon bent along
|
|
10102
|
+
* the path rather than as rigid pieces. */
|
|
10103
|
+
bands?: readonly EffectBand[];
|
|
10104
|
+
}
|
|
10105
|
+
/** A rule across part of an item, in the item's frame. */
|
|
10106
|
+
interface EffectBand {
|
|
10107
|
+
/** Its ends along the item, 0..`length`. */
|
|
10108
|
+
x0: number;
|
|
10109
|
+
x1: number;
|
|
10110
|
+
/** Its top and bottom edges, y down from the anchor line. */
|
|
10111
|
+
y0: number;
|
|
10112
|
+
y1: number;
|
|
10113
|
+
fill: Fill | null;
|
|
10114
|
+
stroke: Stroke | null;
|
|
9847
10115
|
}
|
|
9848
10116
|
/** A source shape. */
|
|
9849
10117
|
interface EffectSource {
|
|
@@ -9914,7 +10182,8 @@ interface BlendEffect extends BlendPathsOptions, PathEffectOptions {
|
|
|
9914
10182
|
|
|
9915
10183
|
/**
|
|
9916
10184
|
* Text (or any shape) laid along a path, item by item. Its sources are `[text, path]`. Only the text's first laid line
|
|
9917
|
-
* follows the path; a color glyph keeps its advance and paints nothing
|
|
10185
|
+
* follows the path; a color glyph keeps its advance and paints nothing. An item's bands — underline, strikethrough and
|
|
10186
|
+
* overline — join their alike neighbors' and bend with the path as one ribbon, while the glyphs stay rigid.
|
|
9918
10187
|
* On an open path an item whose middle falls past either end is not drawn; on a closed one the text wraps past the
|
|
9919
10188
|
* seam, and an item a whole lap on from the first item's start is not drawn.
|
|
9920
10189
|
*/
|
|
@@ -9941,7 +10210,8 @@ declare function textAlongParts(effect: TextAlongEffect, items: readonly EffectI
|
|
|
9941
10210
|
/**
|
|
9942
10211
|
* The path effects, each as the parts it paints from its sources: a blend's
|
|
9943
10212
|
* steps between two shapes, a shape bent along a spine, copies of a shape
|
|
9944
|
-
* along a path, text laid along a path
|
|
10213
|
+
* along a path, text laid along a path, and one shape roughened, zigzagged,
|
|
10214
|
+
* or puckered and bloated.
|
|
9945
10215
|
*/
|
|
9946
10216
|
|
|
9947
10217
|
/** A shape bent along a spine. Its sources are `[shape, spine]`. */
|
|
@@ -9952,8 +10222,21 @@ interface BendAlongEffect extends BendAlongPathOptions, PathEffectOptions {
|
|
|
9952
10222
|
interface RepeatAlongEffect extends Omit<RepeatAlongPathOptions, 'flattenTolerance'>, PathEffectOptions {
|
|
9953
10223
|
kind: 'repeatAlong';
|
|
9954
10224
|
}
|
|
10225
|
+
/** A shape with every point of its outline moved at random. Its source is `[shape]`. */
|
|
10226
|
+
interface RoughenEffect extends RoughenPathOptions, PathEffectOptions {
|
|
10227
|
+
kind: 'roughen';
|
|
10228
|
+
}
|
|
10229
|
+
/** A shape with its outline pushed alternately to either side. Its source is `[shape]`. */
|
|
10230
|
+
interface ZigzagEffect extends ZigzagPathOptions, PathEffectOptions {
|
|
10231
|
+
kind: 'zigzag';
|
|
10232
|
+
}
|
|
10233
|
+
/** A shape with its anchors pulled toward its middle and its handles pushed
|
|
10234
|
+
* away, or the reverse. Its source is `[shape]`. */
|
|
10235
|
+
interface PuckerBloatEffect extends PuckerBloatPathOptions, PathEffectOptions {
|
|
10236
|
+
kind: 'puckerBloat';
|
|
10237
|
+
}
|
|
9955
10238
|
/** A path effect, as a node's `data.pathEffect` holds it. */
|
|
9956
|
-
type PathEffect = BlendEffect | BendAlongEffect | RepeatAlongEffect | TextAlongEffect;
|
|
10239
|
+
type PathEffect = BlendEffect | BendAlongEffect | RepeatAlongEffect | TextAlongEffect | RoughenEffect | ZigzagEffect | PuckerBloatEffect;
|
|
9957
10240
|
|
|
9958
10241
|
/**
|
|
9959
10242
|
* A path effect as a scene node: a leaf whose `dependsOn` names its sources,
|
|
@@ -10163,6 +10446,29 @@ declare function commitBooleanPieces(adapter: BooleansAdapter, operands: Boolean
|
|
|
10163
10446
|
* that should count strokes as they do. */
|
|
10164
10447
|
declare const PATHFINDER_STROKES: BooleanStrokes;
|
|
10165
10448
|
|
|
10449
|
+
/** The Pathfinder keymap's id; its leader action is `keymap.pathfinder`. */
|
|
10450
|
+
declare const PATHFINDER_KEYMAP_ID = "pathfinder";
|
|
10451
|
+
/** Alt+P, by the physical key too, since with Alt held on a Mac it types `π`. */
|
|
10452
|
+
declare const PATHFINDER_LEADER: KeySpec;
|
|
10453
|
+
/**
|
|
10454
|
+
* The Pathfinder operations on held keys, behind the leader Alt+P: holding
|
|
10455
|
+
* an operation's key previews it on the selection, releasing runs it, and
|
|
10456
|
+
* Escape while it is held cancels it. Each binding's id is its hold's action
|
|
10457
|
+
* id (`pathfinder.union.hold`), which is what a host rebinds it by. The
|
|
10458
|
+
* operations themselves come from the `paths` preset; this carries only their
|
|
10459
|
+
* holds. Install it with `<SceneCanvas ambient>`.
|
|
10460
|
+
*/
|
|
10461
|
+
declare const PATHFINDER_KEYMAP: readonly Contribution$1<never>[];
|
|
10462
|
+
|
|
10463
|
+
type AnyScene$1 = Scene<unknown, string, unknown>;
|
|
10464
|
+
/**
|
|
10465
|
+
* Put `ids` under a new boolean group of `op`, in the frontmost one's place, as
|
|
10466
|
+
* one undo entry; nothing moves on screen. The group wears the frontmost
|
|
10467
|
+
* operand's `fill` and `stroke`. Returns its id, or `null` when fewer than two
|
|
10468
|
+
* of `ids` are nodes on one layer.
|
|
10469
|
+
*/
|
|
10470
|
+
declare function makeBooleanGroup(scene: AnyScene$1, ids: readonly string[], op?: BooleanShapeOp): NodeId | null;
|
|
10471
|
+
|
|
10166
10472
|
/** Default world-space distance from the rect's top edge to the rotation
|
|
10167
10473
|
* handle's center. Matches the demo's visual default; consumers can
|
|
10168
10474
|
* override per-call. Unscaled — kit-internal use sites multiply by
|
|
@@ -10195,10 +10501,7 @@ declare function rotationHandle(pose: {
|
|
|
10195
10501
|
declare function hitRotationHandle(handle: Pick<RotationHandle, 'cx' | 'cy'>, px: number, py: number, radius: number): boolean;
|
|
10196
10502
|
|
|
10197
10503
|
/** A point in world coordinates. */
|
|
10198
|
-
|
|
10199
|
-
x: number;
|
|
10200
|
-
y: number;
|
|
10201
|
-
}
|
|
10504
|
+
type DragRectPoint = WorldPoint;
|
|
10202
10505
|
/** The axis-aligned box between the drag's two corners, always with
|
|
10203
10506
|
* non-negative extents regardless of drag direction. */
|
|
10204
10507
|
interface DragRectBounds {
|
|
@@ -10351,10 +10654,7 @@ declare function dragPointOf(event: {
|
|
|
10351
10654
|
}, view?: ViewLike): DragGesturePoint;
|
|
10352
10655
|
|
|
10353
10656
|
/** A point in world coordinates. */
|
|
10354
|
-
|
|
10355
|
-
x: number;
|
|
10356
|
-
y: number;
|
|
10357
|
-
}
|
|
10657
|
+
type DragRadialPoint = WorldPoint;
|
|
10358
10658
|
/** A radial drag expressed as its center and the polar coordinates of the
|
|
10359
10659
|
* cursor relative to it. */
|
|
10360
10660
|
interface DragRadialState {
|
|
@@ -10437,8 +10737,8 @@ interface PathAnchor {
|
|
|
10437
10737
|
* anchor: its control becomes the first anchor's `controlIn`, the way
|
|
10438
10738
|
* `pathToAnchors` reads it, so the two walkers count alike. */
|
|
10439
10739
|
declare function enumerateAnchors(path: PolygonPath): PathAnchor[];
|
|
10440
|
-
/**
|
|
10441
|
-
*
|
|
10740
|
+
/** A new PolygonPath sharing `path`'s commands, with the point at `coordIndex`
|
|
10741
|
+
* moved to `(x, y)` in the path's own space, in a fresh coords buffer. */
|
|
10442
10742
|
declare function withCoord(path: PolygonPath, coordIndex: number, x: number, y: number): PolygonPath;
|
|
10443
10743
|
|
|
10444
10744
|
/** Result of a hit-test against a path's anchors / control handles. */
|
|
@@ -10550,13 +10850,6 @@ interface PoseTargetScene<TPose> extends PoseSource<TPose> {
|
|
|
10550
10850
|
/** How `like`'s kind of pose maps to axes: the descriptor's own mapping, else its flat numeric
|
|
10551
10851
|
* fields. Null for a pose with neither. */
|
|
10552
10852
|
declare function poseAxes<TPose>(descriptor: PoseDescriptor<TPose> | undefined, like: TPose): TargetAxes<TPose> | null;
|
|
10553
|
-
/** How a container's pose target carries its descendants, for {@link scenePoseTarget}. */
|
|
10554
|
-
interface PoseCascade<TPose> {
|
|
10555
|
-
/** Commits `pose` to the container, moving its descendants' poses with it. */
|
|
10556
|
-
write(pose: TPose): void;
|
|
10557
|
-
/** The descendants, each at the pose to show it at while the container shows at `pose`. */
|
|
10558
|
-
beside(pose: TPose): Iterable<readonly [NodeId, TPose]>;
|
|
10559
|
-
}
|
|
10560
10853
|
/**
|
|
10561
10854
|
* A {@link Target} over one node's pose. Animations on it commit their destination through
|
|
10562
10855
|
* `set` as they start, and the pose on screen reaches the paint and pick walks as a pose
|
|
@@ -10572,11 +10865,9 @@ declare function createPoseTarget<TPose>(opts: PoseTargetOptions<TPose>): Target
|
|
|
10572
10865
|
* a caller that wants the move in history records its own op first.
|
|
10573
10866
|
*
|
|
10574
10867
|
* Undefined for a node that is not in the scene, or whose pose has no axes. `descriptor`
|
|
10575
|
-
* defaults to `RECT_POSE_DESCRIPTOR
|
|
10576
|
-
* poses of their own, a commit goes through `cascade.write` and the descendants are shown
|
|
10577
|
-
* traveling beside the container. Both are read the first time a node's target is made.
|
|
10868
|
+
* defaults to `RECT_POSE_DESCRIPTOR`, and is read the first time a node's target is made.
|
|
10578
10869
|
*/
|
|
10579
|
-
declare function scenePoseTarget<TPose>(scene: PoseTargetScene<TPose>, id: string, descriptor?: PoseDescriptor<TPose
|
|
10870
|
+
declare function scenePoseTarget<TPose>(scene: PoseTargetScene<TPose>, id: string, descriptor?: PoseDescriptor<TPose>): Target<TPose> | undefined;
|
|
10580
10871
|
|
|
10581
10872
|
/** What {@link createWrittenPoseTarget} takes. */
|
|
10582
10873
|
interface WrittenPoseTargetOptions<TPose> {
|
|
@@ -10608,7 +10899,6 @@ interface SceneClipTargetsOptions<TPose> {
|
|
|
10608
10899
|
}>>;
|
|
10609
10900
|
/** As `scenePoseTarget` takes them. */
|
|
10610
10901
|
descriptor?: PoseDescriptor<TPose>;
|
|
10611
|
-
cascade?: PoseCascade<TPose>;
|
|
10612
10902
|
}
|
|
10613
10903
|
/**
|
|
10614
10904
|
* A `ClipBinder.target` over a scene. `pose:<node id>` is that node's pose target, the one
|
|
@@ -11070,7 +11360,7 @@ interface UseRigNodeOptions<TPose> extends Pick<BindRigOptions<TPose>, 'apply' |
|
|
|
11070
11360
|
declare function useRigNode<TPose>(options: UseRigNodeOptions<TPose>): Rig;
|
|
11071
11361
|
|
|
11072
11362
|
/** A glyph this package draws, by its bare name. */
|
|
11073
|
-
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';
|
|
11363
|
+
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' | 'booleanGroup' | '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' | 'textAlignStart' | 'textAlignEnd' | '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' | 'paintInherit' | 'paintNone' | 'markerNone' | 'markerArrow' | 'markerArrowOpen' | 'markerArrowConcave' | 'markerTriangleHollow' | 'markerDiamond' | 'markerDiamondHollow' | 'markerCircle' | 'markerSquare' | 'markerBar' | 'markerDot' | 'markerCrowOne' | 'markerCrowMany' | 'markerCrowZeroOne' | 'markerCrowOneMany' | 'markerCrowZeroMany';
|
|
11074
11364
|
declare module '@weasel-js/icons' {
|
|
11075
11365
|
interface IconName {
|
|
11076
11366
|
'core:arrow': true;
|
|
@@ -11123,6 +11413,7 @@ declare module '@weasel-js/icons' {
|
|
|
11123
11413
|
'core:divide': true;
|
|
11124
11414
|
'core:crop': true;
|
|
11125
11415
|
'core:trim': true;
|
|
11416
|
+
'core:booleanGroup': true;
|
|
11126
11417
|
'core:merge': true;
|
|
11127
11418
|
'core:join': true;
|
|
11128
11419
|
'core:bridge': true;
|
|
@@ -11154,6 +11445,8 @@ declare module '@weasel-js/icons' {
|
|
|
11154
11445
|
'core:textAlignCenter': true;
|
|
11155
11446
|
'core:textAlignRight': true;
|
|
11156
11447
|
'core:textAlignJustify': true;
|
|
11448
|
+
'core:textAlignStart': true;
|
|
11449
|
+
'core:textAlignEnd': true;
|
|
11157
11450
|
'core:textAlignTop': true;
|
|
11158
11451
|
'core:textAlignMiddle': true;
|
|
11159
11452
|
'core:textAlignBottom': true;
|
|
@@ -11180,7 +11473,24 @@ declare module '@weasel-js/icons' {
|
|
|
11180
11473
|
'core:paintConic': true;
|
|
11181
11474
|
'core:paintMesh': true;
|
|
11182
11475
|
'core:paintPattern': true;
|
|
11476
|
+
'core:paintInherit': true;
|
|
11183
11477
|
'core:paintNone': true;
|
|
11478
|
+
'core:markerNone': true;
|
|
11479
|
+
'core:markerArrow': true;
|
|
11480
|
+
'core:markerArrowOpen': true;
|
|
11481
|
+
'core:markerArrowConcave': true;
|
|
11482
|
+
'core:markerTriangleHollow': true;
|
|
11483
|
+
'core:markerDiamond': true;
|
|
11484
|
+
'core:markerDiamondHollow': true;
|
|
11485
|
+
'core:markerCircle': true;
|
|
11486
|
+
'core:markerSquare': true;
|
|
11487
|
+
'core:markerBar': true;
|
|
11488
|
+
'core:markerDot': true;
|
|
11489
|
+
'core:markerCrowOne': true;
|
|
11490
|
+
'core:markerCrowMany': true;
|
|
11491
|
+
'core:markerCrowZeroOne': true;
|
|
11492
|
+
'core:markerCrowOneMany': true;
|
|
11493
|
+
'core:markerCrowZeroMany': true;
|
|
11184
11494
|
}
|
|
11185
11495
|
}
|
|
11186
11496
|
|
|
@@ -11201,27 +11511,59 @@ declare const PAINTED_CURSOR_LAYER_ID = "painted-cursor";
|
|
|
11201
11511
|
*/
|
|
11202
11512
|
declare function createPaintedCursorLayer(state: PaintedCursorState): RenderLayer<unknown>;
|
|
11203
11513
|
|
|
11514
|
+
/** One preset as data: what it holds by id, for a tool that lists or rearranges presets. */
|
|
11515
|
+
interface PresetDescription {
|
|
11516
|
+
id: string;
|
|
11517
|
+
label: string;
|
|
11518
|
+
/** The package that ships it, as `describePresets` was told. */
|
|
11519
|
+
package: string;
|
|
11520
|
+
/** It has a role beyond actions, built-in tools, and includes, so its parts only work together. */
|
|
11521
|
+
atom: boolean;
|
|
11522
|
+
/** Its own action ids, in registration order. */
|
|
11523
|
+
actions: readonly string[];
|
|
11524
|
+
/** Its own tools' ids: built-ins with their sets opened, then tools of its own. */
|
|
11525
|
+
tools: readonly string[];
|
|
11526
|
+
/** The ids of the presets it includes. */
|
|
11527
|
+
includes: readonly string[];
|
|
11528
|
+
}
|
|
11529
|
+
/** Whether `preset` is an atom: it holds a role beyond actions, built-in tools, and includes. */
|
|
11530
|
+
declare function isAtom(preset: FeaturePreset): boolean;
|
|
11531
|
+
/**
|
|
11532
|
+
* Every preset reachable from `sources` (keyed by the package that ships them), its includes followed, once each,
|
|
11533
|
+
* each after the presets it includes. A preset reached from two packages is the first's.
|
|
11534
|
+
*/
|
|
11535
|
+
declare function describePresets(sources: Readonly<Record<string, readonly FeaturePreset[]>>): PresetDescription[];
|
|
11536
|
+
|
|
11204
11537
|
/**
|
|
11205
11538
|
* Core's presets by name: what `features={['draw']}` resolves through.
|
|
11206
11539
|
* Importing this module loads every core preset's actions; a canvas handed
|
|
11207
11540
|
* only preset objects never reaches it.
|
|
11208
11541
|
*/
|
|
11209
11542
|
|
|
11210
|
-
/**
|
|
11211
|
-
declare const
|
|
11212
|
-
/** The kit-standard action ids each preset registers. */
|
|
11213
|
-
declare const FEATURE_ACTION_IDS: Readonly<Record<
|
|
11543
|
+
/** Each core preset by name, in the order `SCENE_CANVAS_FEATURES` lists them. */
|
|
11544
|
+
declare const FEATURE_PRESETS: Readonly<Record<Feature, FeaturePreset>>;
|
|
11545
|
+
/** The kit-standard action ids each preset registers itself, leaving out those of the presets it includes. */
|
|
11546
|
+
declare const FEATURE_ACTION_IDS: Readonly<Record<Feature, readonly string[]>>;
|
|
11214
11547
|
/**
|
|
11215
11548
|
* Kit-standard actions no preset registers: they belong to the tools that bind
|
|
11216
11549
|
* them. A canvas registers each one whenever a tool it carries names it in a
|
|
11217
11550
|
* binding — `insert` with any shape tool, `enterTextEdit` with the text tool.
|
|
11218
11551
|
*/
|
|
11219
11552
|
declare const TOOL_DRIVEN_ACTION_IDS: readonly string[];
|
|
11553
|
+
/** The kit-standard actions every canvas registers, preset or none: undo and redo. */
|
|
11554
|
+
declare const BASELINE_ACTION_IDS: readonly string[];
|
|
11555
|
+
|
|
11556
|
+
/** Undo and redo, which every canvas registers whatever its presets. */
|
|
11557
|
+
declare const BASELINE_ACTIONS: readonly [_weasel_js_routing.Action & {
|
|
11558
|
+
requires: string[];
|
|
11559
|
+
}, _weasel_js_routing.Action & {
|
|
11560
|
+
requires: string[];
|
|
11561
|
+
}];
|
|
11220
11562
|
|
|
11221
11563
|
/** Pan and zoom: the hand tool, drag-pan, and pinch. */
|
|
11222
11564
|
declare const viewPreset: FeaturePreset;
|
|
11223
11565
|
|
|
11224
|
-
/** The select
|
|
11566
|
+
/** The select and lasso tools: click, marquee, lasso, and clearing on an empty click. */
|
|
11225
11567
|
declare const selectPreset: FeaturePreset;
|
|
11226
11568
|
|
|
11227
11569
|
/** The selection outline, drawn only while this is on. */
|
|
@@ -11235,30 +11577,83 @@ declare const rotatePreset: FeaturePreset;
|
|
|
11235
11577
|
* claim the drag. */
|
|
11236
11578
|
declare const movePreset: FeaturePreset;
|
|
11237
11579
|
|
|
11238
|
-
/**
|
|
11239
|
-
|
|
11240
|
-
|
|
11241
|
-
|
|
11580
|
+
/** Escape, and canceling the gesture in flight. */
|
|
11581
|
+
declare const escapePreset: FeaturePreset;
|
|
11582
|
+
/** The context menu. */
|
|
11583
|
+
declare const contextMenuPreset: FeaturePreset;
|
|
11584
|
+
/** Cmd/Ctrl+A. */
|
|
11585
|
+
declare const selectAllPreset: FeaturePreset;
|
|
11586
|
+
/** Duplicate, and repeating the last transform. */
|
|
11587
|
+
declare const duplicatePreset: FeaturePreset;
|
|
11588
|
+
/** Deleting the selection. */
|
|
11589
|
+
declare const deletePreset: FeaturePreset;
|
|
11590
|
+
/** Group and ungroup. */
|
|
11591
|
+
declare const groupPreset: FeaturePreset;
|
|
11592
|
+
/** The arrow keys. */
|
|
11593
|
+
declare const nudgePreset: FeaturePreset;
|
|
11594
|
+
/** Fill and stroke, and their opacities. */
|
|
11595
|
+
declare const stylePreset: FeaturePreset;
|
|
11596
|
+
/**
|
|
11597
|
+
* Cut, copy, and paste.
|
|
11242
11598
|
*
|
|
11243
11599
|
* Cmd/Ctrl+V arrives as a DOM `paste` event, and two presets answer it. This
|
|
11244
11600
|
* one brings `clipboard.pasteEvent`, which pastes nodes a kit canvas copied
|
|
11245
11601
|
* and nothing else; `ingest` takes those plus images, SVG, files, and every
|
|
11246
11602
|
* OS drop. With both on, `ingest` answers alone.
|
|
11247
11603
|
*/
|
|
11604
|
+
declare const clipboardPreset: FeaturePreset;
|
|
11605
|
+
/** Every edit preset above, and their keys. */
|
|
11248
11606
|
declare const editPreset: FeaturePreset;
|
|
11249
11607
|
|
|
11608
|
+
/** Flipping the selection. */
|
|
11609
|
+
declare const flipPreset: FeaturePreset;
|
|
11610
|
+
/** Bringing forward and sending backward. */
|
|
11611
|
+
declare const reorderPreset: FeaturePreset;
|
|
11612
|
+
/** Aligning edges and centers. */
|
|
11613
|
+
declare const alignPreset: FeaturePreset;
|
|
11614
|
+
/** Distributing across or down. */
|
|
11615
|
+
declare const distributePreset: FeaturePreset;
|
|
11250
11616
|
/** Align, distribute, reorder, and flip. */
|
|
11251
11617
|
declare const arrangePreset: FeaturePreset;
|
|
11252
11618
|
|
|
11253
11619
|
/**
|
|
11254
|
-
*
|
|
11255
|
-
*
|
|
11256
|
-
*
|
|
11257
|
-
|
|
11258
|
-
|
|
11259
|
-
*/
|
|
11620
|
+
* The path-edit keys that share a key with a node-level action: anchor nudging
|
|
11621
|
+
* and deleting, and Escape out of path edit or its tool. Each is tried ahead of
|
|
11622
|
+
* its twin, which is enabled whenever anything is selected.
|
|
11623
|
+
*/
|
|
11624
|
+
declare const anchorKeysPreset: FeaturePreset;
|
|
11625
|
+
/** The pathfinder booleans, and the live boolean group. */
|
|
11626
|
+
declare const pathfinderPreset: FeaturePreset;
|
|
11627
|
+
/** Text and strokes to paths. */
|
|
11628
|
+
declare const outlinesPreset: FeaturePreset;
|
|
11629
|
+
/** Entering path edit, and editing anchors, handles, and segments in it. */
|
|
11630
|
+
declare const pathEditPreset: FeaturePreset;
|
|
11631
|
+
/** Simplify, offset, snip at crossings, and join paths. */
|
|
11632
|
+
declare const pathCommandsPreset: FeaturePreset;
|
|
11633
|
+
/** Pathfinder operations, path-edit entry, and anchor editing. */
|
|
11260
11634
|
declare const pathsPreset: FeaturePreset;
|
|
11261
11635
|
|
|
11636
|
+
/** The select tool and the lasso. */
|
|
11637
|
+
declare const selectToolsPreset: FeaturePreset;
|
|
11638
|
+
/** The hand tool. */
|
|
11639
|
+
declare const viewToolsPreset: FeaturePreset;
|
|
11640
|
+
/** The tools that drag out a primitive: rect, ellipse, line, polygon, star. */
|
|
11641
|
+
declare const shapeToolsPreset: FeaturePreset;
|
|
11642
|
+
/** The pen and the pencil. */
|
|
11643
|
+
declare const drawToolsPreset: FeaturePreset;
|
|
11644
|
+
/** Text and the sticky note. */
|
|
11645
|
+
declare const typeToolsPreset: FeaturePreset;
|
|
11646
|
+
/** The page slicer. */
|
|
11647
|
+
declare const pageToolsPreset: FeaturePreset;
|
|
11648
|
+
|
|
11649
|
+
/** Select, and the selection's outline. */
|
|
11650
|
+
declare const pickPreset: FeaturePreset;
|
|
11651
|
+
/** Resize and rotate handles. */
|
|
11652
|
+
declare const transformPreset: FeaturePreset;
|
|
11653
|
+
/** Every core behavior: view, pick, transform, move, edit, arrange, paths, and ingest. Tools that make things are
|
|
11654
|
+
* left to the canvas, through the `tools:` presets or `defaultTools`. */
|
|
11655
|
+
declare const drawPreset: FeaturePreset;
|
|
11656
|
+
|
|
11262
11657
|
/** Dropped and pasted content: images, SVG, files, and whatever
|
|
11263
11658
|
* `ingestion.handlers` accept, on Cmd/Ctrl+V or an OS drop. */
|
|
11264
11659
|
declare const ingestPreset: FeaturePreset;
|
|
@@ -11324,10 +11719,6 @@ declare function resolvedSnapMarks<P>(satisfied: readonly {
|
|
|
11324
11719
|
mark?: SnapCandidateMark<P>;
|
|
11325
11720
|
}[], delta: P): SnapMark<P>[];
|
|
11326
11721
|
|
|
11327
|
-
type Point = {
|
|
11328
|
-
x: number;
|
|
11329
|
-
y: number;
|
|
11330
|
-
};
|
|
11331
11722
|
/** A drawing tool's point snapping: the points it places one by one, and the
|
|
11332
11723
|
* cursor it trails from the last of them. */
|
|
11333
11724
|
interface PointSnap {
|
|
@@ -11520,4 +11911,4 @@ declare const coreKitSettingsSchema: Omit<_weasel_js_prefs.PrefGroup, "children"
|
|
|
11520
11911
|
};
|
|
11521
11912
|
};
|
|
11522
11913
|
|
|
11523
|
-
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, EnteredGroupApi, 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, LayerDims, 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, NodeClip, 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, SerializedSceneV1, 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 ShownDataSource, 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, SpecsFromSerializedOptions, type SpringPoseOptions, type StaggerSpringPoseOptions, type StandardSlotConfig, type StandardSlotName, type StarGenerator, type StarPoint, type StatedNodeFields, 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, clipOutline, 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, createEnteredGroupScope, 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, documentOf, 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, hasChildren, hasEditablePath, hiddenSourceDeleteOps, hiddenSourcesTakenWith, hidesSubtree, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, inPlane, inferredNodeProperties, inferredNodeRouting, ingestPreset, inkExtentsOf, insertAction, insertAt, insertLayer, insertPreviewExtent, insertRepositionAction, interpolateView, isAnnotationLayer, isAnnotationNode, isLeaf, 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, nodeAsShown, 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, publishPreviews, 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, sourcesHiddenBy, sourcesOf, splitOverChildren, springPose, staggerSpringPose, startThresholdDrag, statedFields, 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, withInheritedPaintBounds, withInheritedPaints, withPath, withPathEffectsRegistry, withoutShapeGenerator, workspaceTintLayer, worldPoseLookup, worldToScreen, writtenBy, zoomAt, zoomAtLeast };
|
|
11914
|
+
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, BASELINE_ACTIONS, BASELINE_ACTION_IDS, BOOLEAN_OF_CHILDREN, BUILTIN_TOOLS, BUILTIN_TOOL_GROUPS, BUILTIN_TOOL_IDS, type BendAlongEffect, type BindRigOptions, type BlendEffect, type BooleanCommitPiece, BooleanOp, BooleanOpOptions, BooleanOpResult, type BooleanOperands, type BooleanShapeOp, type BooleanSource, BooleanStrokes, BooleansAdapter, BoundsConstraint, type BuildChromeCtxArgs, type BuiltinShapeToolId, type BuiltinToolId, type BuiltinToolOptions, CANVAS_CONTEXT_ATTRIBUTES, 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 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 EffectBand, type EffectItem, type EffectSource, type EffectSourceReader, type EnterGroupOptions, EnteredGroupApi, FALLBACK_ACCENT, FEATURE_ACTION_IDS, FEATURE_PRESETS, type Feature, type FeatureBindingOptions, type FeatureEntry, type FeaturePreset, type FeedDelta, type FeedNode, FinishedEditFrame, FitViewToBoundsOptions, type FlipAxis, type FlipPivot, GHOST_STROKE, GROUP_ENTRY_ID, 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 KitHandlersOption, type KitInsertShape, type KitRequirements, type KitVersions, LONG_PRESS_FEEDBACK_ID, LassoHitMode, LassoSelectAdapter, LassoSelectBehavior, LayerDims, LayerEnumerableAdapter, LayerGroup, LayerHit, type LayerSlotValue, type LayersMap, LayoutDropTargetMode, LayoutFrame, type LayoutRef, LayoutStrategy, LeanSceneCanvas, type LeanSceneCanvasProps, type LeaveGroupOptions, 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 NamedPresets, type NestedHitOpts, type NestedHitTester, type NodeClientRect, NodeClip, 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_KEYMAP, PATHFINDER_KEYMAP_ID, PATHFINDER_LEADER, 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, type PlacedSpec, PlaneMap, type PointSnap, type PointerFollower, PointerProviderIfRoot, type PointerSample, type PointerStylusState, type PolygonGenerator, type PolygonPoint, PoseAdapter, type PoseAnimationAdapter, 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 PresetDescription, type PressTargetTree, type PressureToWidthOptions, type PreviewNode, type PuckerBloatEffect, 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 RoughenEffect, 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, SavedScene, Scene, type SceneAdapterSelection, SceneArrivalRefused, SceneCanvas, type SceneCanvasAdapter, type SceneCanvasApi, type SceneCanvasGeometry, type SceneCanvasHit, type SceneCanvasLayers, type SceneCanvasLongPress, type SceneCanvasProps, SceneCanvasSnap, type SceneCanvasTextEditor, type SceneCanvasViewport, type SceneClipTargetsOptions, Node as SceneNode, type SceneNodeClientRectOpts, type SceneOptions, ScenePoseReports, SceneRegistry, type SceneSlotConfig, type SceneSlotLayers, type SceneToAdapterOptions, SceneViewCanvas, type SceneViewCanvasProps, type SceneViewCull, type SceneViewDrawOne, type SceneViewLayers, type ScopedScene, type ScreenSlop, ScrollOffset, type ScrollRange, 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 ShownDataSource, 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, SpecsFromSerializedOptions, type SpringPoseOptions, type StaggerSpringPoseOptions, type StandardSlotConfig, type StandardSlotName, type StarGenerator, type StarPoint, type StatedNodeFields, StickyStyle, type StrokeRegionOptions, type StylusData, type SurfaceContribution, type SurfaceSizeProps, SvgIngestOptions, SystemLayerSpec, TOOL_DRIVEN_ACTION_IDS, TOOL_GROUP_ORDER, TYPE_TOOLS, TargetTransform, type TextAlongEffect, type TextEditDoubleClick, 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 ZigzagEffect, type ZoomAxis, type ZoomBound, type ZoomClampOpts, type ZoomFactor, accentColorOf, actionIs, addPage, adjacentPage, aimSpace2d, alignDeltaFor, alignPreset, alignTargetBounds, always, anchorEditWouldChange, anchorKeysPreset, and, animateLifecycle, animateOnSetPose, annotationLayerIds, annulusSemiAxes, applyOpsTo, applyOutlineStroke, areaSelectAction, areaSelectContribution, arrangePreset, assertSnapSourceIds, axisAlignedBounds, axisZoomFactor, bindPoseTransition, bindRig, booleanGroupFields, booleanGroupRouting, booleanOfChildren, booleanOpOf, buildChromeCtx, buildDebugOverlayCommands, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, carriedDescendants, checkRequirements, clampShapeGenerator, clampView, classifyPathStorage, clearSelectionAction, clipOutline, clipboardCopyAction, clipboardCutAction, clipboardPasteAction, clipboardPasteEventAction, clipboardPreset, cloneAction, coarsePointer, commitAnchorEdit, commitBooleanPieces, commitDeleteToScene, commitOps, composeAffordanceLayer, composeRectPose, composeRigidPose, composeSelectionPose, computeFitViewport, computeSliceOps, computeWheelAction, cond, containerScrollAction, contextMenuAction, contextMenuPreset, coreKitSettingsSchema, createArrangeOp, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDeleteAction, createDeleteOp, createDepartures, createEnteredGroupScope, createGroupEntryContribution, 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, deletePreset, deleteSelectedMark, depOf, derivedDepOf, derivedPartsOf, derivedPose, describePresets, dispatchApplyBatch, distributePreset, documentDepOf, documentOf, documentPose, dragPanContribution, dragPointOf, drawPreset, drawToolsPreset, drawnAABBOf, drawnBoundsOf, drawnBoundsScene, duplicatePreset, editAnchorsAction, editPreset, editTargetOf, editedPathSymmetries, editingAnchors, editingLayer, effectSourceFor, effectivePose, enterTextEditAction, enumerateAnchors, escapePreset, exitPathEditToolAction, findNodeShape, findShapeBounds, findShapeDrawnBounds, findShapeInk, findShapeSilhouette, finishPathEditFrame, fitToBounds, fitViewToPage, fitZoom, flattenPreviews, flipAction, flipPreset, focused, forEachCoalesced, forgetTransform, gateLayer, gatherSnapCandidates, gesturePlaneReader, gestureViewReader, gesturing, getAlpha01, getNodeShapes, getStylusData, glidesByDefault, grabViewMarker, groupNodeRouting, groupPreset, hasChildren, hasEditablePath, heldInFrame, hiddenSourceDeleteOps, hiddenSourcesTakenWith, hidesSubtree, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, inPlane, inferredNodeProperties, inferredNodeRouting, ingestPreset, inkExtentsOf, insertAction, insertAt, insertLayer, insertPreviewExtent, insertRepositionAction, interpolateView, isAnnotationLayer, isAnnotationNode, isAtom, isLeaf, isNodeHidden, isNodeLocked, isOverChildren, isRectAim, isShapeGenerator, joinPathsCommand, joinSelectedAnchors, kitTextHandler, lassoSelectAction, lastTransform, layoutPages, livePathEdit, localizeInScene, localizeWorldPoses, locksInForce, makeBooleanGroup, 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, nodeAsShown, nodeGates, nodeOutline, normalizeView, normalizeZoom, not, noteFontRead, nudgeAnchorsDownAction, nudgeAnchorsLeftAction, nudgeAnchorsRightAction, nudgeAnchorsUpAction, nudgePreset, onEmptyCanvas, opFactoryRegistry, openContextMenu, openFilePicker, or, outlinePreset, outlinesPreset, overChildren, pageAt, pageHolding, pageInView, pageMembers, pageName, pageOfBounds, pageToolsPreset, pagesBounds, pagesLayer, pagesOf, paintAbove, paintAlpha, paintWithAlpha, paintWithColor, parseDebugFlags, pathCommandsPreset, pathCopy, pathEditPathOf, pathEditPreset, pathEditPreview, pathEditToolAction, pathEditToolActive, pathEffectNode, pathEffectOf, pathEffectParts, pathFromParts, pathNodesOf, pathOperationTags, pathOriginProjection, pathPoseDescriptor, pathSnapGlyph, pathSnapSource, pathfinderPreset, pathsPreset, pickPreset, pickTopMostHit, pillCommands, pinchZoomAction, placeAction, placeSkeleton, placedPagesOf, planJoin, planPixelRender, pointRegionFrame, pointSnap, poseAxes, pressureToWidth, publishPreviews, rasterToPng, readEffectSource, rebuildOp, reconcileSpecs, recordTransform, rectAim, regenerateShape, registerNodeShape, registerOpFactory, registeredOpNames, registeredPathEffects, releaseCanvasRenderer, removePage, renamePage, renderDebugSnapshot, renderNeeds, renderSceneToCanvas, renderSceneToPixels, reorderPreset, requiresAnchorSelection, reshapeOps, reshapeTo, resizeAction, resizePage, resizePreset, resolveBooleanOperands, resolveEditablePathOf, resolveOverlays, resolvePartPaint, resolvePreviews, resolveSpatialReference, resolveVisibility, resolvedSnapMarks, rigFromNode, rigidRigApply, rotateAction, rotateAroundAABBCenter, rotatePreset, rotationDegreesUnit, rotationHandle, rotationSnapSource, routeKind, satisfiesRange, sceneBoxFrames, sceneCarrySource, sceneClipTargets, sceneFromJSON, sceneNodeClientRect, scenePoseAdapter, scenePoseFrame, scenePoseTarget, sceneSelectionStore, sceneSharedUnitScopes, sceneToAdapter, sceneUnitScopes, sceneViewPoseAdapter, screenToWorld, screenTolerance, scrollRange, scrollRectPose, scrollRigidPose, scrollableAt, segmentUnder, selectAllPreset, selectAnchorAction, selectFromLasso, selectPreset, selectToolsPreset, selectedPathNodes, selectionAtLeast, selectionEmpty, selectionIs, selectionLayer, selectionMoveBindings, selectionMoveContribution, selectionResizeBindings, selectionResizeContribution, selectionRotateBindings, selectionRotateContribution, selectionTransformBindings, selectionTransformContribution, setPages, settleShapeGenerator, shapeCoversPoint, shapeGeneratorOf, shapeGeneratorPath, shapeToolsPreset, sliceAction, slotOf, snapMods, snapSourcesFor, solid, sourcesHiddenBy, sourcesOf, splitOverChildren, springPose, staggerSpringPose, startThresholdDrag, statedFields, stepAngles, storeEditablePath, strokeOf, strokeRegion, strokeWith, stylePreset, textAlongParts, tickedSegment, toHex8, transformPreset, translateRectPose, tweenPose, typeToolsPreset, 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, useGroupEntryContribution, 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, viewToolsPreset, viewZoom, viewportDragPanAction, viewportWheelPanAction, viewportWorldRect, viewportZoomAction, warmRender, watchDevicePixelRatio, wheelPan, wheelZoom, wheelZoomFactor, when, withAlpha01, withCoord, withInheritedPaintBounds, withInheritedPaints, withPath, withPathEffectsRegistry, withoutShapeGenerator, workspaceTintLayer, worldPoseLookup, worldPosesOf, worldToScreen, writtenBy, zoomAt, zoomAtLeast };
|