@weasel-js/core 1.13.0-rc.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 +408 -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 +17 -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/buildSceneLayer.js +1 -1
- package/dist/canvas/buildSceneLayer.js.map +1 -1
- package/dist/canvas/buildSceneTree.js +5 -3
- package/dist/canvas/buildSceneTree.js.map +1 -1
- package/dist/canvas/canvasRenderer.js +6 -2
- package/dist/canvas/canvasRenderer.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 +7 -5
- package/dist/canvas/sceneViewRender.js.map +1 -1
- package/dist/canvas/surfaceContribution.js.map +1 -1
- package/dist/canvas/useCanvasPaint.js +12 -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-B1RS-IJx.d.ts → depSchema-C3BwxitB.d.ts} +130 -104
- 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 +3 -2
- 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 +1445 -1053
- 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
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { defaultDrawOne, defaultPaintBounds, paintBoundsFor } from "../defaultDrawOne.js";
|
|
2
|
+
import { isCustomEntry } from "../layerSlots.js";
|
|
3
|
+
import { drawOneEditing } from "../../domains/text/editingDrawOne.js";
|
|
4
|
+
import { hostTextEditorHolds } from "../../domains/text/hostTextEditors.js";
|
|
5
|
+
import { useSceneTextEditor } from "../../domains/text/useSceneTextEdit.js";
|
|
6
|
+
import { useEffect, useLayoutEffect, useMemo, useState } from "react";
|
|
7
|
+
import { useLatest } from "@weasel-js/react";
|
|
8
|
+
import { useDepRegistry, useDepSource } from "@weasel-js/routing/react";
|
|
9
|
+
|
|
10
|
+
//#region src/canvas/SceneCanvas/defaultTextEditor.tsx
|
|
11
|
+
/**
|
|
12
|
+
* `<SceneCanvas>`'s own text editor: the one a text or sticky tool's
|
|
13
|
+
* `enterTextEdit` reaches, and a double-click on a text node opens, when the
|
|
14
|
+
* host has wired none of its own. It stands down for a host editor — a
|
|
15
|
+
* `useSceneTextEdit` whose container holds the canvas, or a `textEdit` dep
|
|
16
|
+
* registered over it.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* The editor, mounted into the canvas's containing block — its offset parent,
|
|
20
|
+
* else its parent — so the overlay is positioned against the box it is
|
|
21
|
+
* measured from. `on` false mounts it nowhere.
|
|
22
|
+
*/
|
|
23
|
+
function useDefaultTextEditor(scene, elementRef, config, on) {
|
|
24
|
+
const [element, setElement] = useState(null);
|
|
25
|
+
useLayoutEffect(() => {
|
|
26
|
+
if (elementRef.current !== element) setElement(elementRef.current);
|
|
27
|
+
});
|
|
28
|
+
const container = on && config !== false && element ? element.offsetParent ?? element.parentElement : null;
|
|
29
|
+
const edit = useSceneTextEditor(scene, container, config || {});
|
|
30
|
+
const editRef = useLatest(edit);
|
|
31
|
+
const elRef = useLatest(element);
|
|
32
|
+
const dep = useMemo(() => ({
|
|
33
|
+
startEdit: (id, opts) => editRef.current.startEdit(id, opts),
|
|
34
|
+
isTextNode: (id) => editRef.current.isTextNode(id)
|
|
35
|
+
}), [editRef]);
|
|
36
|
+
const yields = useMemo(() => () => {
|
|
37
|
+
const el = elRef.current;
|
|
38
|
+
return el === null || hostTextEditorHolds(el);
|
|
39
|
+
}, [elRef]);
|
|
40
|
+
return {
|
|
41
|
+
edit,
|
|
42
|
+
dep,
|
|
43
|
+
element: container ? element : null,
|
|
44
|
+
yields
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Publishes the editor as the `textEdit` dep and opens it on a double-click.
|
|
49
|
+
* Rendered after the canvas's standard deps and before its children, so it
|
|
50
|
+
* sits over the stub and under any `textEdit` a child registers.
|
|
51
|
+
*/
|
|
52
|
+
function DefaultTextEditDep({ editor, onDoubleClick }) {
|
|
53
|
+
const { dep, element, yields, edit } = editor;
|
|
54
|
+
const registry = useDepRegistry();
|
|
55
|
+
const editRef = useLatest(edit);
|
|
56
|
+
useDepSource("textEdit", (below) => element && !yields() ? dep : below());
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
if (!element || !onDoubleClick) return;
|
|
59
|
+
const open = (e) => {
|
|
60
|
+
if (registry.get("textEdit") === dep) editRef.current.onDoubleClick(e);
|
|
61
|
+
};
|
|
62
|
+
element.addEventListener("dblclick", open);
|
|
63
|
+
return () => element.removeEventListener("dblclick", open);
|
|
64
|
+
}, [
|
|
65
|
+
element,
|
|
66
|
+
onDoubleClick,
|
|
67
|
+
registry,
|
|
68
|
+
dep,
|
|
69
|
+
editRef
|
|
70
|
+
]);
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The canvas's own editor, and its `layers` with the edited node's glyphs left
|
|
75
|
+
* out. Not mounted under `paintInto`, where the canvas element is the host's.
|
|
76
|
+
*/
|
|
77
|
+
function useCanvasTextEditor(scene, elementRef, props) {
|
|
78
|
+
const editor = useDefaultTextEditor(scene, elementRef, props.textEditor, !props.paintInto);
|
|
79
|
+
const editingId = editor.edit.editingId;
|
|
80
|
+
return {
|
|
81
|
+
editor,
|
|
82
|
+
layers: useMemo(() => layersWhileEditing(props.layers, editingId), [props.layers, editingId])
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* `layers` with the scene slot's `drawOne` leaving out the glyphs of the node
|
|
87
|
+
* `editingId` names, which the overlay stands in for; `layers` itself when
|
|
88
|
+
* nothing is being edited, or the slot is not the kit's.
|
|
89
|
+
*/
|
|
90
|
+
function layersWhileEditing(layers, editingId) {
|
|
91
|
+
if (editingId === null) return layers;
|
|
92
|
+
const slot = layers?.scene;
|
|
93
|
+
if (slot === null || isCustomEntry(slot)) return layers;
|
|
94
|
+
const base = slot?.drawOne ?? defaultDrawOne;
|
|
95
|
+
const paintBounds = slot && "paintBounds" in slot ? slot.paintBounds : slot?.drawOne ? paintBoundsFor(base) : defaultPaintBounds;
|
|
96
|
+
return {
|
|
97
|
+
...layers,
|
|
98
|
+
scene: {
|
|
99
|
+
...slot,
|
|
100
|
+
drawOne: drawOneEditing(editingId, base),
|
|
101
|
+
paintBounds
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
//#endregion
|
|
107
|
+
export { DefaultTextEditDep, layersWhileEditing, useCanvasTextEditor, useDefaultTextEditor };
|
|
108
|
+
//# sourceMappingURL=defaultTextEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultTextEditor.js","names":[],"sources":["../../../src/canvas/SceneCanvas/defaultTextEditor.tsx"],"sourcesContent":["/**\n * `<SceneCanvas>`'s own text editor: the one a text or sticky tool's\n * `enterTextEdit` reaches, and a double-click on a text node opens, when the\n * host has wired none of its own. It stands down for a host editor — a\n * `useSceneTextEdit` whose container holds the canvas, or a `textEdit` dep\n * registered over it.\n */\nimport { useEffect, useLayoutEffect, useMemo, useState, type MutableRefObject } from 'react';\nimport { useLatest } from '@weasel-js/react';\nimport { useDepRegistry, useDepSource } from '@weasel-js/routing/react';\nimport type { TextEditDep } from 'interactions/actions/depSchema';\nimport type { Node, Scene } from 'core/scene/types';\nimport {\n useSceneTextEditor, type DefaultTextData, type UseSceneTextEditOptions, type UseSceneTextEditReturn,\n} from 'domains/text/useSceneTextEdit';\nimport { hostTextEditorHolds } from 'domains/text/hostTextEditors';\nimport { drawOneEditing, type EditingDrawOne } from 'domains/text/editingDrawOne';\nimport { defaultDrawOne, defaultPaintBounds, paintBoundsFor } from '../defaultDrawOne';\nimport { isCustomEntry } from '../layerSlots';\nimport type { SceneCanvasLayers } from './props';\n\n/** `<SceneCanvas textEditor>`: its own editor's options, or `false` for none. */\nexport type SceneCanvasTextEditor<TData> = false | UseSceneTextEditOptions<TData>;\n\nexport interface DefaultTextEditor {\n edit: UseSceneTextEditReturn;\n /** The `textEdit` dep this editor answers with while it is the one standing. */\n dep: TextEditDep;\n element: HTMLElement | null;\n /** Whether the host has an editor of its own over this canvas. */\n yields: () => boolean;\n}\n\n/**\n * The editor, mounted into the canvas's containing block — its offset parent,\n * else its parent — so the overlay is positioned against the box it is\n * measured from. `on` false mounts it nowhere.\n */\nexport function useDefaultTextEditor<TData>(\n scene: Scene<TData, string, unknown>,\n elementRef: MutableRefObject<HTMLElement | null>,\n config: SceneCanvasTextEditor<TData> | undefined,\n on: boolean,\n): DefaultTextEditor {\n const [element, setElement] = useState<HTMLElement | null>(null);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- the canvas fills elementRef on commit, so every commit rereads it; the guard stops a loop\n useLayoutEffect(() => {\n if (elementRef.current !== element) setElement(elementRef.current);\n });\n const live = on && config !== false;\n const container = live && element ? ((element.offsetParent ?? element.parentElement) as HTMLElement | null) : null;\n const edit = useSceneTextEditor(\n scene as unknown as Scene<DefaultTextData, string>, container, (config || {}) as unknown as UseSceneTextEditOptions<DefaultTextData>,\n );\n const editRef = useLatest(edit);\n const elRef = useLatest(element);\n const dep = useMemo<TextEditDep>(() => ({\n startEdit: (id, opts) => editRef.current.startEdit(id, opts),\n isTextNode: (id) => editRef.current.isTextNode(id),\n }), [editRef]);\n const yields = useMemo(() => () => {\n const el = elRef.current;\n return el === null || hostTextEditorHolds(el);\n }, [elRef]);\n return { edit, dep, element: container ? element : null, yields };\n}\n\n/**\n * Publishes the editor as the `textEdit` dep and opens it on a double-click.\n * Rendered after the canvas's standard deps and before its children, so it\n * sits over the stub and under any `textEdit` a child registers.\n */\nexport function DefaultTextEditDep({ editor, onDoubleClick }: {\n editor: DefaultTextEditor;\n /** Whether a double-click on a text node opens it: the `edit` feature. */\n onDoubleClick: boolean;\n}): null {\n const { dep, element, yields, edit } = editor;\n const registry = useDepRegistry();\n const editRef = useLatest(edit);\n useDepSource('textEdit', (below) => (element && !yields() ? dep : (below() as TextEditDep)));\n useEffect(() => {\n if (!element || !onDoubleClick) return;\n const open = (e: MouseEvent) => {\n if (registry.get('textEdit') === dep) editRef.current.onDoubleClick(e);\n };\n element.addEventListener('dblclick', open);\n return () => element.removeEventListener('dblclick', open);\n }, [element, onDoubleClick, registry, dep, editRef]);\n return null;\n}\n\n/**\n * The canvas's own editor, and its `layers` with the edited node's glyphs left\n * out. Not mounted under `paintInto`, where the canvas element is the host's.\n */\nexport function useCanvasTextEditor<TData, TLayer extends string, TPose>(\n scene: Scene<TData, string, unknown>,\n elementRef: MutableRefObject<HTMLElement | null>,\n props: {\n textEditor?: SceneCanvasTextEditor<TData>;\n paintInto?: unknown;\n layers?: SceneCanvasLayers<Node<TData, TLayer, TPose>, TPose>;\n },\n): { editor: DefaultTextEditor; layers: SceneCanvasLayers<Node<TData, TLayer, TPose>, TPose> | undefined } {\n const editor = useDefaultTextEditor(scene, elementRef, props.textEditor, !props.paintInto);\n const editingId = editor.edit.editingId;\n const layers = useMemo(() => layersWhileEditing(props.layers, editingId), [props.layers, editingId]);\n return { editor, layers };\n}\n\n/**\n * `layers` with the scene slot's `drawOne` leaving out the glyphs of the node\n * `editingId` names, which the overlay stands in for; `layers` itself when\n * nothing is being edited, or the slot is not the kit's.\n */\nexport function layersWhileEditing<TData, TLayer extends string, TPose>(\n layers: SceneCanvasLayers<Node<TData, TLayer, TPose>, TPose> | undefined,\n editingId: string | null,\n): SceneCanvasLayers<Node<TData, TLayer, TPose>, TPose> | undefined {\n if (editingId === null) return layers;\n const slot = layers?.scene;\n if (slot === null || isCustomEntry(slot)) return layers;\n const base = (slot?.drawOne ?? defaultDrawOne) as EditingDrawOne;\n const paintBounds = slot && 'paintBounds' in slot\n ? slot.paintBounds\n : slot?.drawOne ? paintBoundsFor(base) : defaultPaintBounds;\n return {\n ...layers, scene: { ...slot, drawOne: drawOneEditing(editingId, base), paintBounds },\n } as SceneCanvasLayers<Node<TData, TLayer, TPose>, TPose>;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAsCA,SAAgB,qBACd,OACA,YACA,QACA,IACmB;CACnB,MAAM,CAAC,SAAS,cAAc,SAA6B,IAAI;CAE/D,sBAAsB;EACpB,IAAI,WAAW,YAAY,SAAS,WAAW,WAAW,OAAO;CACnE,CAAC;CAED,MAAM,YADO,MAAM,WAAW,SACJ,UAAY,QAAQ,gBAAgB,QAAQ,gBAAwC;CAC9G,MAAM,OAAO,mBACX,OAAoD,WAAY,UAAU,CAAC,CAC7E;CACA,MAAM,UAAU,UAAU,IAAI;CAC9B,MAAM,QAAQ,UAAU,OAAO;CAC/B,MAAM,MAAM,eAA4B;EACtC,YAAY,IAAI,SAAS,QAAQ,QAAQ,UAAU,IAAI,IAAI;EAC3D,aAAa,OAAO,QAAQ,QAAQ,WAAW,EAAE;CACnD,IAAI,CAAC,OAAO,CAAC;CACb,MAAM,SAAS,oBAAoB;EACjC,MAAM,KAAK,MAAM;EACjB,OAAO,OAAO,QAAQ,oBAAoB,EAAE;CAC9C,GAAG,CAAC,KAAK,CAAC;CACV,OAAO;EAAE;EAAM;EAAK,SAAS,YAAY,UAAU;EAAM;CAAO;AAClE;;;;;;AAOA,SAAgB,mBAAmB,EAAE,QAAQ,iBAIpC;CACP,MAAM,EAAE,KAAK,SAAS,QAAQ,SAAS;CACvC,MAAM,WAAW,eAAe;CAChC,MAAM,UAAU,UAAU,IAAI;CAC9B,aAAa,aAAa,UAAW,WAAW,CAAC,OAAO,IAAI,MAAO,MAAM,CAAkB;CAC3F,gBAAgB;EACd,IAAI,CAAC,WAAW,CAAC,eAAe;EAChC,MAAM,QAAQ,MAAkB;GAC9B,IAAI,SAAS,IAAI,UAAU,MAAM,KAAK,QAAQ,QAAQ,cAAc,CAAC;EACvE;EACA,QAAQ,iBAAiB,YAAY,IAAI;EACzC,aAAa,QAAQ,oBAAoB,YAAY,IAAI;CAC3D,GAAG;EAAC;EAAS;EAAe;EAAU;EAAK;CAAO,CAAC;CACnD,OAAO;AACT;;;;;AAMA,SAAgB,oBACd,OACA,YACA,OAKyG;CACzG,MAAM,SAAS,qBAAqB,OAAO,YAAY,MAAM,YAAY,CAAC,MAAM,SAAS;CACzF,MAAM,YAAY,OAAO,KAAK;CAE9B,OAAO;EAAE;EAAQ,QADF,cAAc,mBAAmB,MAAM,QAAQ,SAAS,GAAG,CAAC,MAAM,QAAQ,SAAS,CACjF;CAAO;AAC1B;;;;;;AAOA,SAAgB,mBACd,QACA,WACkE;CAClE,IAAI,cAAc,MAAM,OAAO;CAC/B,MAAM,OAAO,QAAQ;CACrB,IAAI,SAAS,QAAQ,cAAc,IAAI,GAAG,OAAO;CACjD,MAAM,OAAQ,MAAM,WAAW;CAC/B,MAAM,cAAc,QAAQ,iBAAiB,OACzC,KAAK,cACL,MAAM,UAAU,eAAe,IAAI,IAAI;CAC3C,OAAO;EACL,GAAG;EAAQ,OAAO;GAAE,GAAG;GAAM,SAAS,eAAe,WAAW,IAAI;GAAG;EAAY;CACrF;AACF"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { namesBuiltins, presetToolIds } from "./features.js";
|
|
2
|
+
|
|
3
|
+
//#region src/canvas/SceneCanvas/describePresets.ts
|
|
4
|
+
var ATOM_ROLES = [
|
|
5
|
+
"ambient",
|
|
6
|
+
"moveBehaviors",
|
|
7
|
+
"snapSources",
|
|
8
|
+
"layers",
|
|
9
|
+
"chrome",
|
|
10
|
+
"chromeRules",
|
|
11
|
+
"pathEdit",
|
|
12
|
+
"contributions",
|
|
13
|
+
"refines"
|
|
14
|
+
];
|
|
15
|
+
var filled = (v) => v !== void 0 && (typeof v !== "object" || v === null || (Array.isArray(v) ? v.length > 0 : Object.keys(v).length > 0));
|
|
16
|
+
/** Whether `preset` is an atom: it holds a role beyond actions, built-in tools, and includes. */
|
|
17
|
+
function isAtom(preset) {
|
|
18
|
+
return ATOM_ROLES.some((role) => filled(preset[role])) || (preset.tools ?? []).some((t) => !namesBuiltins(t));
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Every preset reachable from `sources` (keyed by the package that ships them), its includes followed, once each,
|
|
22
|
+
* each after the presets it includes. A preset reached from two packages is the first's.
|
|
23
|
+
*/
|
|
24
|
+
function describePresets(sources) {
|
|
25
|
+
const out = [];
|
|
26
|
+
const seen = /* @__PURE__ */ new Set();
|
|
27
|
+
const visit = (p, pkg) => {
|
|
28
|
+
if (seen.has(p.id)) return;
|
|
29
|
+
seen.add(p.id);
|
|
30
|
+
for (const inner of p.includes ?? []) visit(inner, pkg);
|
|
31
|
+
out.push({
|
|
32
|
+
id: p.id,
|
|
33
|
+
label: p.label ?? p.id,
|
|
34
|
+
package: pkg,
|
|
35
|
+
atom: isAtom(p),
|
|
36
|
+
actions: (p.actions ?? []).map((a) => a.id),
|
|
37
|
+
tools: presetToolIds(p),
|
|
38
|
+
includes: (p.includes ?? []).map((inner) => inner.id)
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
for (const [pkg, presets] of Object.entries(sources)) for (const p of presets) visit(p, pkg);
|
|
42
|
+
return out;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
//#endregion
|
|
46
|
+
export { describePresets, isAtom };
|
|
47
|
+
//# sourceMappingURL=describePresets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"describePresets.js","names":[],"sources":["../../../src/canvas/SceneCanvas/describePresets.ts"],"sourcesContent":["import { namesBuiltins, presetToolIds, type FeaturePreset } from './features';\n\n/** One preset as data: what it holds by id, for a tool that lists or rearranges presets. */\nexport interface PresetDescription {\n id: string;\n label: string;\n /** The package that ships it, as `describePresets` was told. */\n package: string;\n /** It has a role beyond actions, built-in tools, and includes, so its parts only work together. */\n atom: boolean;\n /** Its own action ids, in registration order. */\n actions: readonly string[];\n /** Its own tools' ids: built-ins with their sets opened, then tools of its own. */\n tools: readonly string[];\n /** The ids of the presets it includes. */\n includes: readonly string[];\n}\n\nconst ATOM_ROLES = [\n 'ambient', 'moveBehaviors', 'snapSources', 'layers', 'chrome', 'chromeRules', 'pathEdit', 'contributions', 'refines',\n] as const satisfies readonly (keyof FeaturePreset)[];\n\nconst filled = (v: unknown): boolean =>\n v !== undefined && (typeof v !== 'object' || v === null || (Array.isArray(v) ? v.length > 0 : Object.keys(v).length > 0));\n\n/** Whether `preset` is an atom: it holds a role beyond actions, built-in tools, and includes. */\nexport function isAtom(preset: FeaturePreset): boolean {\n return ATOM_ROLES.some((role) => filled(preset[role])) || (preset.tools ?? []).some((t) => !namesBuiltins(t));\n}\n\n/**\n * Every preset reachable from `sources` (keyed by the package that ships them), its includes followed, once each,\n * each after the presets it includes. A preset reached from two packages is the first's.\n */\nexport function describePresets(sources: Readonly<Record<string, readonly FeaturePreset[]>>): PresetDescription[] {\n const out: PresetDescription[] = [];\n const seen = new Set<string>();\n const visit = (p: FeaturePreset, pkg: string): void => {\n if (seen.has(p.id)) return;\n seen.add(p.id);\n for (const inner of p.includes ?? []) visit(inner, pkg);\n out.push({\n id: p.id,\n label: p.label ?? p.id,\n package: pkg,\n atom: isAtom(p),\n actions: (p.actions ?? []).map((a) => a.id),\n tools: presetToolIds(p),\n includes: (p.includes ?? []).map((inner) => inner.id),\n });\n };\n for (const [pkg, presets] of Object.entries(sources)) for (const p of presets) visit(p, pkg);\n return out;\n}\n"],"mappings":";;;AAkBA,IAAM,aAAa;CACjB;CAAW;CAAiB;CAAe;CAAU;CAAU;CAAe;CAAY;CAAiB;AAC7G;AAEA,IAAM,UAAU,MACd,MAAM,WAAc,OAAO,MAAM,YAAY,MAAM,SAAS,MAAM,QAAQ,CAAC,IAAI,EAAE,SAAS,IAAI,OAAO,KAAK,CAAC,CAAC,CAAC,SAAS;;AAGxH,SAAgB,OAAO,QAAgC;CACrD,OAAO,WAAW,MAAM,SAAS,OAAO,OAAO,KAAK,CAAC,MAAM,OAAO,SAAS,CAAC,EAAA,CAAG,MAAM,MAAM,CAAC,cAAc,CAAC,CAAC;AAC9G;;;;;AAMA,SAAgB,gBAAgB,SAAkF;CAChH,MAAM,MAA2B,CAAC;CAClC,MAAM,uBAAO,IAAI,IAAY;CAC7B,MAAM,SAAS,GAAkB,QAAsB;EACrD,IAAI,KAAK,IAAI,EAAE,EAAE,GAAG;EACpB,KAAK,IAAI,EAAE,EAAE;EACb,KAAK,MAAM,SAAS,EAAE,YAAY,CAAC,GAAG,MAAM,OAAO,GAAG;EACtD,IAAI,KAAK;GACP,IAAI,EAAE;GACN,OAAO,EAAE,SAAS,EAAE;GACpB,SAAS;GACT,MAAM,OAAO,CAAC;GACd,UAAU,EAAE,WAAW,CAAC,EAAA,CAAG,KAAK,MAAM,EAAE,EAAE;GAC1C,OAAO,cAAc,CAAC;GACtB,WAAW,EAAE,YAAY,CAAC,EAAA,CAAG,KAAK,UAAU,MAAM,EAAE;EACtD,CAAC;CACH;CACA,KAAK,MAAM,CAAC,KAAK,YAAY,OAAO,QAAQ,OAAO,GAAG,KAAK,MAAM,KAAK,SAAS,MAAM,GAAG,GAAG;CAC3F,OAAO;AACT"}
|
|
@@ -1,25 +1,33 @@
|
|
|
1
|
-
import { never } from "../../
|
|
1
|
+
import { never } from "../../domains/chrome-caps/conditions.js";
|
|
2
2
|
import { toolIdsOf } from "@weasel-js/routing";
|
|
3
3
|
|
|
4
4
|
//#region src/canvas/SceneCanvas/features.ts
|
|
5
5
|
/**
|
|
6
6
|
* The behavior presets `<SceneCanvas features>` composes. A bare canvas renders
|
|
7
|
-
* its scene
|
|
8
|
-
* turned on by a preset.
|
|
7
|
+
* its scene, keeps a selection nothing sets, and undoes and redoes whatever
|
|
8
|
+
* changed it; every behavior beyond that is turned on by a preset.
|
|
9
9
|
*
|
|
10
10
|
* A preset is a {@link FeaturePreset} object: the actions, tools, bindings,
|
|
11
|
-
* chrome, and contributions one behavior brings
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
11
|
+
* chrome, and contributions one behavior brings, and the presets it includes.
|
|
12
|
+
* One that holds only actions, tools, and includes is a bundle, pure grouping;
|
|
13
|
+
* one with any other role is an atom, whose parts only work together. Core's
|
|
14
|
+
* own are named (`'select'`, `'draw'`) and live in `namedPresets.ts`; a
|
|
15
|
+
* package ships its own the same way and an app passes the object. Nothing
|
|
16
|
+
* here imports an action, so a canvas reaches only the presets it is handed.
|
|
15
17
|
*
|
|
16
|
-
* A preset is not one of the `packages/core/src/
|
|
18
|
+
* A preset is not one of the `packages/core/src/domains/<name>/` source
|
|
17
19
|
* directories that `docs/taxonomy.md` calls a feature; the two share a word
|
|
18
20
|
* and nothing else.
|
|
19
21
|
*/
|
|
20
|
-
/** Every name `<SceneCanvas features>` accepts, each
|
|
21
|
-
* presets it
|
|
22
|
+
/** Every core preset's name `<SceneCanvas features>` accepts, each after the
|
|
23
|
+
* presets it includes. */
|
|
22
24
|
var SCENE_CANVAS_FEATURES = [
|
|
25
|
+
"tools:select",
|
|
26
|
+
"tools:view",
|
|
27
|
+
"tools:shape",
|
|
28
|
+
"tools:draw",
|
|
29
|
+
"tools:type",
|
|
30
|
+
"tools:page",
|
|
23
31
|
"view",
|
|
24
32
|
"select",
|
|
25
33
|
"outline",
|
|
@@ -28,15 +36,33 @@ var SCENE_CANVAS_FEATURES = [
|
|
|
28
36
|
"resize",
|
|
29
37
|
"rotate",
|
|
30
38
|
"transform",
|
|
39
|
+
"escape",
|
|
40
|
+
"contextMenu",
|
|
41
|
+
"selectAll",
|
|
42
|
+
"duplicate",
|
|
43
|
+
"delete",
|
|
44
|
+
"group",
|
|
45
|
+
"nudge",
|
|
46
|
+
"style",
|
|
47
|
+
"clipboard",
|
|
31
48
|
"edit",
|
|
49
|
+
"flip",
|
|
50
|
+
"reorder",
|
|
51
|
+
"align",
|
|
52
|
+
"distribute",
|
|
32
53
|
"arrange",
|
|
54
|
+
"anchorKeys",
|
|
55
|
+
"pathfinder",
|
|
56
|
+
"outlines",
|
|
57
|
+
"pathEdit",
|
|
58
|
+
"pathCommands",
|
|
33
59
|
"paths",
|
|
34
60
|
"ingest",
|
|
35
61
|
"draw"
|
|
36
62
|
];
|
|
37
63
|
/**
|
|
38
64
|
* The presets a canvas runs with: names expanded, `includes` pulled in, each
|
|
39
|
-
* preset once, and every one placed ahead of the presets it `refines
|
|
65
|
+
* preset once, and every one placed ahead of the presets it `refines` and what those include. Ties
|
|
40
66
|
* keep the order given. Where names resolve, a `viewport` config turns on the
|
|
41
67
|
* `view` preset, since that prop only configures what `view` turns on.
|
|
42
68
|
*
|
|
@@ -57,15 +83,24 @@ function resolveFeatures(features, named, opts = {}) {
|
|
|
57
83
|
};
|
|
58
84
|
for (const f of features ?? []) if (typeof f !== "string") add(f);
|
|
59
85
|
else if (!named) throw new Error(`[SceneCanvas] this canvas resolves no preset names; pass the preset for "${f}"`);
|
|
60
|
-
else if (f
|
|
61
|
-
else add(named
|
|
62
|
-
if (opts.viewport && named) add(named.
|
|
86
|
+
else if (!Object.hasOwn(named, f)) throw new Error(`[SceneCanvas] no preset is named "${f}"`);
|
|
87
|
+
else add(named[f]);
|
|
88
|
+
if (opts.viewport && named?.view) add(named.view);
|
|
89
|
+
const parents = /* @__PURE__ */ new Map();
|
|
90
|
+
for (const p of listed) for (const inner of p.includes ?? []) parents.set(inner.id, [...parents.get(inner.id) ?? [], p.id]);
|
|
91
|
+
const namesFor = (id, out = /* @__PURE__ */ new Set()) => {
|
|
92
|
+
if (out.has(id)) return out;
|
|
93
|
+
out.add(id);
|
|
94
|
+
for (const up of parents.get(id) ?? []) namesFor(up, out);
|
|
95
|
+
return out;
|
|
96
|
+
};
|
|
63
97
|
const ordered = [];
|
|
64
98
|
const placed = /* @__PURE__ */ new Set();
|
|
65
99
|
const place = (p) => {
|
|
66
100
|
if (placed.has(p.id)) return;
|
|
67
101
|
placed.add(p.id);
|
|
68
|
-
|
|
102
|
+
const names = namesFor(p.id);
|
|
103
|
+
for (const r of listed) if (r.refines?.some((id) => names.has(id))) place(r);
|
|
69
104
|
ordered.push(p);
|
|
70
105
|
};
|
|
71
106
|
for (const p of listed) place(p);
|
|
@@ -74,6 +109,7 @@ function resolveFeatures(features, named, opts = {}) {
|
|
|
74
109
|
presets,
|
|
75
110
|
pathEdit: presets.flatMap((p) => p.pathEdit ?? []),
|
|
76
111
|
snapSources: presets.flatMap((p) => p.snapSources ?? []),
|
|
112
|
+
layers: Object.assign({}, ...presets.map((p) => p.layers ?? {})),
|
|
77
113
|
has: (id) => byId.has(id)
|
|
78
114
|
};
|
|
79
115
|
}
|
|
@@ -100,6 +136,11 @@ function presetActions(enabled) {
|
|
|
100
136
|
}
|
|
101
137
|
/** Whether a preset's `tools` entry names built-ins, by id or set, rather than being a tool of its own. */
|
|
102
138
|
var namesBuiltins = (t) => typeof t === "string" || "members" in t;
|
|
139
|
+
/** The ids of the tools `preset` mounts itself: built-ins with their sets opened, then tools of its own. */
|
|
140
|
+
var presetToolIds = (preset) => {
|
|
141
|
+
const tools = preset.tools ?? [];
|
|
142
|
+
return [...toolIdsOf(tools.filter(namesBuiltins)), ...tools.filter((t) => !namesBuiltins(t)).map((t) => t.id)];
|
|
143
|
+
};
|
|
103
144
|
/** The built-in tool ids the given presets mount. */
|
|
104
145
|
function presetBuiltinTools(enabled) {
|
|
105
146
|
const ids = /* @__PURE__ */ new Set();
|
|
@@ -141,5 +182,5 @@ function presetChromeRules(enabled, owned) {
|
|
|
141
182
|
}
|
|
142
183
|
|
|
143
184
|
//#endregion
|
|
144
|
-
export { SCENE_CANVAS_FEATURES, presetActions, presetAmbient, presetBuiltinTools, presetChromeRules, presetContributions, presetOwnTools, resolveFeatures };
|
|
185
|
+
export { SCENE_CANVAS_FEATURES, namesBuiltins, presetActions, presetAmbient, presetBuiltinTools, presetChromeRules, presetContributions, presetOwnTools, presetToolIds, resolveFeatures };
|
|
145
186
|
//# sourceMappingURL=features.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features.js","names":[],"sources":["../../../src/canvas/SceneCanvas/features.ts"],"sourcesContent":["/**\n * The behavior presets `<SceneCanvas features>` composes. A bare canvas renders\n * its scene and keeps a selection nothing sets; every behavior beyond that is\n * turned on by a preset.\n *\n * A preset is a {@link FeaturePreset} object: the actions, tools, bindings,\n * chrome, and contributions one behavior brings. Core's own are named\n * (`'select'`, `'draw'`) and live in `namedPresets.ts`; a package ships its\n * own the same way and an app passes the object. Nothing here imports an\n * action, so a canvas reaches only the presets it is handed.\n *\n * A preset is not one of the `packages/core/src/features/<name>/` source\n * directories that `docs/taxonomy.md` calls a feature; the two share a word\n * and nothing else.\n */\nimport { toolIdsOf, type Action, type ToolEntry } from '@weasel-js/routing';\nimport { never } from 'features/chrome-caps/conditions';\nimport type { ChromeId, VisibilityRules } from 'features/chrome-caps/types';\nimport type { MoveBehavior } from 'interactions/gestures/types';\nimport type { UseMoveOptions } from 'interactions/actions/move/options';\nimport type { UseRotateOptions } from 'interactions/actions/rotate/options';\nimport type { Contribution, Tool } from 'tools/overlayBinding';\nimport type { PathEditExtension } from 'features/paths/pathEditExtension';\nimport type { SnapSource } from 'features/snap/types';\nimport type { SurfaceContribution } from '../surfaceContribution';\nimport type { BuiltinToolId } from './props';\n\n/** A core preset that names one behavior and abbreviates nothing. */\nexport type BaseFeature =\n | 'view'\n | 'select'\n | 'outline'\n | 'move'\n | 'resize'\n | 'rotate'\n | 'edit'\n | 'arrange'\n | 'paths'\n | 'ingest';\n\n/** A core preset that abbreviates others: `pick` is `select` + `outline`,\n * `transform` is `resize` + `rotate`, and `draw` is every base preset. */\nexport type CompositeFeature = 'pick' | 'transform' | 'draw';\n\n/** A core preset's name, as `<SceneCanvas features>` takes it. */\nexport type Feature = BaseFeature | CompositeFeature;\n\n/** Every name `<SceneCanvas features>` accepts, each composite after the\n * presets it names. */\nexport const SCENE_CANVAS_FEATURES: readonly Feature[] = [\n 'view', 'select', 'outline', 'pick', 'move', 'resize', 'rotate', 'transform',\n 'edit', 'arrange', 'paths', 'ingest', 'draw',\n];\n\n/** What a preset's ambient bindings are built from: the `selectTool` options\n * that configure them. */\nexport interface FeatureBindingOptions {\n move?: UseMoveOptions<unknown>;\n rotate?: UseRotateOptions<unknown>;\n}\n\n/**\n * Everything turning one preset on means. Every role is optional.\n *\n * A package's preset is the unit an app opts into: the app imports it and\n * passes it to `features`, and an app that does not never loads its code.\n */\nexport interface FeaturePreset {\n /** Unique per canvas. `refines` names presets by it, and two different\n * presets with one id on one canvas throw. */\n readonly id: string;\n /** The action descriptors it registers, in the order they register. They\n * are standard actions: `<SceneCanvas actions>` overrides and mutes them,\n * and `tune` reaches them. */\n readonly actions?: readonly Action[];\n /** Tools it mounts: a built-in by id or a set of them, or a tool of its own. */\n readonly tools?: readonly (ToolEntry<BuiltinToolId> | Tool)[];\n /** Its ambient bindings: an always-live entry routing a gesture to its\n * actions under any tool that does not claim the gesture itself. */\n readonly ambient?: (options: FeatureBindingOptions) => Contribution;\n /** Behaviors folded into every move the presets' ambient bindings run,\n * after the select tool's own: a snap, a readout of the drag. They reach\n * only a move some enabled preset binds, `move` or `draw`'s. */\n readonly moveBehaviors?: readonly MoveBehavior<unknown>[];\n /** Snap sources every snap session on the canvas asks, after\n * `<SceneCanvas snap.sources>` and the presets before it. */\n readonly snapSources?: readonly SnapSource[];\n /** The selection chrome that is drawn, and can be grabbed, only while it is on. */\n readonly chrome?: readonly ChromeId[];\n /** Default chrome-caps rules for chrome of its own, under the consumer's\n * `chromeVisibility`: a mark it draws only on request, say. */\n readonly chromeRules?: VisibilityRules;\n /** What it adds to path edit: marks, grabbable parts, what an edit keeps\n * true. Consulted in preset order. */\n readonly pathEdit?: readonly PathEditExtension[];\n /** Entries installed beside `<SceneCanvas ambient>`, with every role they\n * declare: deps, overlays, `attach`, views, frame hooks. A `tools` takeover\n * brings its own ambient and leaves them out. */\n readonly contributions?: readonly SurfaceContribution[];\n /** Ids of presets whose actions this one's register ahead of, so that where\n * both bind one gesture, this one's is tried first: anchor nudging ahead of\n * node nudging. A preset named here that is not on is ignored. */\n readonly refines?: readonly string[];\n /** Presets it turns on with itself, ahead of its own place in the order. */\n readonly includes?: readonly FeaturePreset[];\n}\n\n/** What `<SceneCanvas features>` takes: a core preset's name or any preset. */\nexport type FeatureEntry = Feature | FeaturePreset;\n\n/** The names a canvas resolves: one preset each, or the presets a composite\n * abbreviates. */\nexport interface NamedPresets {\n readonly base: Readonly<Record<BaseFeature, FeaturePreset>>;\n readonly composite: Readonly<Record<CompositeFeature, readonly BaseFeature[]>>;\n}\n\n/** Where a canvas finds presets beyond the objects it is handed: the names it\n * resolves, if any, and the actions it registers once a tool binds them. */\nexport interface PresetSource {\n readonly named: NamedPresets | null;\n /** Actions registered only when a tool or contribution binds them. */\n readonly pool: readonly Action[];\n}\n\n/** The presets a canvas runs with, in the order their actions register. */\nexport interface EnabledPresets {\n readonly presets: readonly FeaturePreset[];\n /** Their path-edit extensions, in order. */\n readonly pathEdit: readonly PathEditExtension[];\n /** Their snap sources, in order. */\n readonly snapSources: readonly SnapSource[];\n /** Whether a preset with this id is on. */\n has(id: string): boolean;\n}\n\n/**\n * The presets a canvas runs with: names expanded, `includes` pulled in, each\n * preset once, and every one placed ahead of the presets it `refines`. Ties\n * keep the order given. Where names resolve, a `viewport` config turns on the\n * `view` preset, since that prop only configures what `view` turns on.\n *\n * `selectRotates: false` is `selectTool.rotate === false`: every preset keeps\n * its actions, but loses its ambient `rotate` bindings and the rotation handle\n * from its chrome, which hides the handle unless a consumer rule shows it.\n */\nexport function resolveFeatures(\n features: readonly FeatureEntry[] | undefined,\n named: NamedPresets | null,\n opts: { viewport?: boolean; selectRotates?: boolean } = {},\n): EnabledPresets {\n const listed: FeaturePreset[] = [];\n const byId = new Map<string, FeaturePreset>();\n const add = (p: FeaturePreset): void => {\n const held = byId.get(p.id);\n if (held === p) return;\n if (held) throw new Error(`[SceneCanvas] two different presets have the id \"${p.id}\"`);\n byId.set(p.id, p);\n for (const inner of p.includes ?? []) add(inner);\n listed.push(p);\n };\n for (const f of features ?? []) {\n if (typeof f !== 'string') add(f);\n else if (!named) throw new Error(`[SceneCanvas] this canvas resolves no preset names; pass the preset for \"${f}\"`);\n else if (f in named.composite) for (const b of named.composite[f as CompositeFeature]) add(named.base[b]);\n else add(named.base[f as BaseFeature]);\n }\n if (opts.viewport && named) add(named.base.view);\n\n const ordered: FeaturePreset[] = [];\n const placed = new Set<string>();\n const place = (p: FeaturePreset): void => {\n if (placed.has(p.id)) return;\n placed.add(p.id);\n for (const r of listed) if (r.refines?.includes(p.id)) place(r);\n ordered.push(p);\n };\n for (const p of listed) place(p);\n const presets = opts.selectRotates === false ? ordered.map(withoutSelectRotate) : ordered;\n return {\n presets,\n pathEdit: presets.flatMap((p) => p.pathEdit ?? []),\n snapSources: presets.flatMap((p) => p.snapSources ?? []),\n has: (id) => byId.has(id),\n };\n}\n\nconst ROTATION_HANDLE: ChromeId = 'selection.rotation-handle';\n\n/** `p` without its ambient `rotate` bindings or the rotation handle. */\nfunction withoutSelectRotate(p: FeaturePreset): FeaturePreset {\n const { ambient, chrome } = p;\n if (!ambient && !chrome?.includes(ROTATION_HANDLE)) return p;\n return {\n ...p,\n ...(ambient ? {\n ambient: (o: FeatureBindingOptions): Contribution => {\n const c = ambient(o);\n return c.bindings ? { ...c, bindings: c.bindings.filter((b) => b.actionId !== 'rotate') } : c;\n },\n } : {}),\n ...(chrome ? { chrome: chrome.filter((id) => id !== ROTATION_HANDLE) } : {}),\n };\n}\n\n/** The actions the given presets register, in registration order. */\nexport function presetActions(enabled: EnabledPresets): Action[] {\n return enabled.presets.flatMap((p) => p.actions ?? []);\n}\n\n/** Whether a preset's `tools` entry names built-ins, by id or set, rather than being a tool of its own. */\nconst namesBuiltins = (t: ToolEntry<BuiltinToolId> | Tool): t is ToolEntry<BuiltinToolId> =>\n typeof t === 'string' || 'members' in t;\n\n/** The built-in tool ids the given presets mount. */\nexport function presetBuiltinTools(enabled: EnabledPresets): Set<BuiltinToolId> {\n const ids = new Set<BuiltinToolId>();\n for (const p of enabled.presets) {\n for (const id of toolIdsOf((p.tools ?? []).filter(namesBuiltins))) ids.add(id);\n }\n return ids;\n}\n\n/** The tools of their own the given presets mount, by id. */\nexport function presetOwnTools(enabled: EnabledPresets): Record<string, Tool> {\n const out: Record<string, Tool> = {};\n for (const p of enabled.presets) for (const t of p.tools ?? []) if (!namesBuiltins(t)) out[t.id] = t;\n return out;\n}\n\n/** The given presets' ambient entries and contributions, in the order they are\n * matched. Their `moveBehaviors` follow the ones `options.move` brings. */\nexport function presetAmbient(enabled: EnabledPresets, options: FeatureBindingOptions): Contribution[] {\n const extra = enabled.presets.flatMap((p) => p.moveBehaviors ?? []);\n const move = extra.length === 0\n ? options.move\n : { ...options.move, behaviors: [...(options.move?.behaviors ?? []), ...extra] };\n const opts = { ...options, move };\n return enabled.presets.flatMap((p) => (p.ambient ? [p.ambient(opts)] : []));\n}\n\n/** The given presets' contributions, in preset order. */\nexport function presetContributions(enabled: EnabledPresets): SurfaceContribution[] {\n return enabled.presets.flatMap((p) => p.contributions ?? []);\n}\n\n/** The enabled presets' own `chromeRules`, then rules hiding each chrome id\n * in `owned` that no enabled preset turns on. `never` also takes a handle out\n * of hit-testing, so a hidden one cannot be grabbed. */\nexport function presetChromeRules(enabled: EnabledPresets, owned: readonly ChromeId[]): VisibilityRules {\n const on = new Set(enabled.presets.flatMap((p) => p.chrome ?? []));\n const rules: VisibilityRules = Object.assign({}, ...enabled.presets.map((p) => p.chromeRules ?? {}));\n for (const id of owned) if (!on.has(id)) rules[id] = never;\n return rules;\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"features.js","names":[],"sources":["../../../src/canvas/SceneCanvas/features.ts"],"sourcesContent":["/**\n * The behavior presets `<SceneCanvas features>` composes. A bare canvas renders\n * its scene, keeps a selection nothing sets, and undoes and redoes whatever\n * changed it; every behavior beyond that is turned on by a preset.\n *\n * A preset is a {@link FeaturePreset} object: the actions, tools, bindings,\n * chrome, and contributions one behavior brings, and the presets it includes.\n * One that holds only actions, tools, and includes is a bundle, pure grouping;\n * one with any other role is an atom, whose parts only work together. Core's\n * own are named (`'select'`, `'draw'`) and live in `namedPresets.ts`; a\n * package ships its own the same way and an app passes the object. Nothing\n * here imports an action, so a canvas reaches only the presets it is handed.\n *\n * A preset is not one of the `packages/core/src/domains/<name>/` source\n * directories that `docs/taxonomy.md` calls a feature; the two share a word\n * and nothing else.\n */\nimport { toolIdsOf, type Action, type ToolEntry } from '@weasel-js/routing';\nimport { never } from 'domains/chrome-caps/conditions';\nimport type { ChromeId, VisibilityRules } from 'domains/chrome-caps/types';\nimport type { MoveBehavior } from 'interactions/gestures/types';\nimport type { UseMoveOptions } from 'interactions/actions/move/options';\nimport type { UseRotateOptions } from 'interactions/actions/rotate/options';\nimport type { Contribution, Tool } from 'tools/overlayBinding';\nimport type { PathEditExtension } from 'domains/paths/pathEditExtension';\nimport type { SnapSource } from 'domains/snap/types';\nimport type { SurfaceContribution } from '../surfaceContribution';\nimport type { CustomLayerEntry } from '../layerSlots';\nimport type { BuiltinToolId } from './props';\n\n/** Every core preset's name `<SceneCanvas features>` accepts, each after the\n * presets it includes. */\nexport const SCENE_CANVAS_FEATURES = [\n 'tools:select', 'tools:view', 'tools:shape', 'tools:draw', 'tools:type', 'tools:page',\n 'view', 'select', 'outline', 'pick', 'move', 'resize', 'rotate', 'transform',\n 'escape', 'contextMenu', 'selectAll', 'duplicate', 'delete', 'group', 'nudge', 'style', 'clipboard', 'edit',\n 'flip', 'reorder', 'align', 'distribute', 'arrange',\n 'anchorKeys', 'pathfinder', 'outlines', 'pathEdit', 'pathCommands', 'paths',\n 'ingest', 'draw',\n] as const;\n\n/** A core preset's name, as `<SceneCanvas features>` takes it. */\nexport type Feature = (typeof SCENE_CANVAS_FEATURES)[number];\n\n/** What a preset's ambient bindings are built from: the `selectTool` options\n * that configure them. */\nexport interface FeatureBindingOptions {\n move?: UseMoveOptions<unknown>;\n rotate?: UseRotateOptions<unknown>;\n}\n\n/**\n * Everything turning one preset on means. Every role is optional.\n *\n * A package's preset is the unit an app opts into: the app imports it and\n * passes it to `features`, and an app that does not never loads its code.\n */\nexport interface FeaturePreset {\n /** What a person calls it, where one is listed. Absent, the id. */\n readonly label?: string;\n /** Unique per canvas. `refines` names presets by it, and two different\n * presets with one id on one canvas throw. */\n readonly id: string;\n /** The action descriptors it registers, in the order they register. They\n * are standard actions: `<SceneCanvas actions>` overrides and mutes them,\n * and `tune` reaches them. */\n readonly actions?: readonly Action[];\n /** Tools it mounts: a built-in by id or a set of them, or a tool of its own. */\n readonly tools?: readonly (ToolEntry<BuiltinToolId> | Tool)[];\n /** Its ambient bindings: an always-live entry routing a gesture to its\n * actions under any tool that does not claim the gesture itself. */\n readonly ambient?: (options: FeatureBindingOptions) => Contribution;\n /** Behaviors folded into every move the presets' ambient bindings run,\n * after the select tool's own: a snap, a readout of the drag. They reach\n * only a move some enabled preset binds, `move` or `draw`'s. */\n readonly moveBehaviors?: readonly MoveBehavior<unknown>[];\n /** Snap sources every snap session on the canvas asks, after\n * `<SceneCanvas snap.sources>` and the presets before it. */\n readonly snapSources?: readonly SnapSource[];\n /** Layers it adds to the render stack, by slot, as `<SceneCanvas layers>`\n * takes them: `grid` fills the grid slot, any other key adds a layer. A\n * slot `<SceneCanvas layers>` names, `null` included, keeps the consumer's. */\n readonly layers?: Readonly<Record<string, CustomLayerEntry>>;\n /** The selection chrome that is drawn, and can be grabbed, only while it is on. */\n readonly chrome?: readonly ChromeId[];\n /** Default chrome-caps rules for chrome of its own, under the consumer's\n * `chromeVisibility`: a mark it draws only on request, say. */\n readonly chromeRules?: VisibilityRules;\n /** What it adds to path edit: marks, grabbable parts, what an edit keeps\n * true. Consulted in preset order. */\n readonly pathEdit?: readonly PathEditExtension[];\n /** Entries installed beside `<SceneCanvas ambient>`, with every role they\n * declare: deps, overlays, `attach`, views, frame hooks. A `tools` takeover\n * brings its own ambient and leaves them out. */\n readonly contributions?: readonly SurfaceContribution[];\n /** Ids of presets whose actions, and those of every preset they include,\n * this one's register ahead of, so that where both bind one gesture, this\n * one's is tried first: anchor nudging ahead of node nudging. A preset named\n * here that is not on is ignored. */\n readonly refines?: readonly string[];\n /** Presets it turns on with itself, ahead of its own place in the order. */\n readonly includes?: readonly FeaturePreset[];\n}\n\n/** What `<SceneCanvas features>` takes: a core preset's name or any preset. */\nexport type FeatureEntry = Feature | FeaturePreset;\n\n/** The names a canvas resolves, each to its preset. */\nexport type NamedPresets = Readonly<Record<string, FeaturePreset>>;\n\n/** Where a canvas finds presets beyond the objects it is handed: the names it\n * resolves, if any, and the actions it registers once a tool binds them. */\nexport interface PresetSource {\n readonly named: NamedPresets | null;\n /** Actions every canvas registers whatever its presets: undo and redo, since anything that changes\n * the scene — a preset's action, a tool, the host — leaves history to step through. */\n readonly baseline?: readonly Action[];\n /** Actions registered only when a tool or contribution binds them. */\n readonly pool: readonly Action[];\n}\n\n/** The presets a canvas runs with, in the order their actions register. */\nexport interface EnabledPresets {\n readonly presets: readonly FeaturePreset[];\n /** Their path-edit extensions, in order. */\n readonly pathEdit: readonly PathEditExtension[];\n /** Their snap sources, in order. */\n readonly snapSources: readonly SnapSource[];\n /** Their layers by slot; a later preset's wins a slot both name. */\n readonly layers: Readonly<Record<string, CustomLayerEntry>>;\n /** Whether a preset with this id is on. */\n has(id: string): boolean;\n}\n\n/**\n * The presets a canvas runs with: names expanded, `includes` pulled in, each\n * preset once, and every one placed ahead of the presets it `refines` and what those include. Ties\n * keep the order given. Where names resolve, a `viewport` config turns on the\n * `view` preset, since that prop only configures what `view` turns on.\n *\n * `selectRotates: false` is `selectTool.rotate === false`: every preset keeps\n * its actions, but loses its ambient `rotate` bindings and the rotation handle\n * from its chrome, which hides the handle unless a consumer rule shows it.\n */\nexport function resolveFeatures(\n features: readonly FeatureEntry[] | undefined,\n named: NamedPresets | null,\n opts: { viewport?: boolean; selectRotates?: boolean } = {},\n): EnabledPresets {\n const listed: FeaturePreset[] = [];\n const byId = new Map<string, FeaturePreset>();\n const add = (p: FeaturePreset): void => {\n const held = byId.get(p.id);\n if (held === p) return;\n if (held) throw new Error(`[SceneCanvas] two different presets have the id \"${p.id}\"`);\n byId.set(p.id, p);\n for (const inner of p.includes ?? []) add(inner);\n listed.push(p);\n };\n for (const f of features ?? []) {\n if (typeof f !== 'string') add(f);\n else if (!named) throw new Error(`[SceneCanvas] this canvas resolves no preset names; pass the preset for \"${f}\"`);\n else if (!Object.hasOwn(named, f)) throw new Error(`[SceneCanvas] no preset is named \"${f}\"`);\n else add(named[f]!);\n }\n if (opts.viewport && named?.view) add(named.view);\n\n // Each preset's id and the ids of every preset that includes it, at any depth: what a refinement of it can name.\n const parents = new Map<string, string[]>();\n for (const p of listed) for (const inner of p.includes ?? []) parents.set(inner.id, [...(parents.get(inner.id) ?? []), p.id]);\n const namesFor = (id: string, out = new Set<string>()): Set<string> => {\n if (out.has(id)) return out;\n out.add(id);\n for (const up of parents.get(id) ?? []) namesFor(up, out);\n return out;\n };\n const ordered: FeaturePreset[] = [];\n const placed = new Set<string>();\n const place = (p: FeaturePreset): void => {\n if (placed.has(p.id)) return;\n placed.add(p.id);\n const names = namesFor(p.id);\n for (const r of listed) if (r.refines?.some((id) => names.has(id))) place(r);\n ordered.push(p);\n };\n for (const p of listed) place(p);\n const presets = opts.selectRotates === false ? ordered.map(withoutSelectRotate) : ordered;\n return {\n presets,\n pathEdit: presets.flatMap((p) => p.pathEdit ?? []),\n snapSources: presets.flatMap((p) => p.snapSources ?? []),\n layers: Object.assign({}, ...presets.map((p) => p.layers ?? {})) as Record<string, CustomLayerEntry>,\n has: (id) => byId.has(id),\n };\n}\n\nconst ROTATION_HANDLE: ChromeId = 'selection.rotation-handle';\n\n/** `p` without its ambient `rotate` bindings or the rotation handle. */\nfunction withoutSelectRotate(p: FeaturePreset): FeaturePreset {\n const { ambient, chrome } = p;\n if (!ambient && !chrome?.includes(ROTATION_HANDLE)) return p;\n return {\n ...p,\n ...(ambient ? {\n ambient: (o: FeatureBindingOptions): Contribution => {\n const c = ambient(o);\n return c.bindings ? { ...c, bindings: c.bindings.filter((b) => b.actionId !== 'rotate') } : c;\n },\n } : {}),\n ...(chrome ? { chrome: chrome.filter((id) => id !== ROTATION_HANDLE) } : {}),\n };\n}\n\n/** The actions the given presets register, in registration order. */\nexport function presetActions(enabled: EnabledPresets): Action[] {\n return enabled.presets.flatMap((p) => p.actions ?? []);\n}\n\n/** Whether a preset's `tools` entry names built-ins, by id or set, rather than being a tool of its own. */\nexport const namesBuiltins = (t: ToolEntry<BuiltinToolId> | Tool): t is ToolEntry<BuiltinToolId> =>\n typeof t === 'string' || 'members' in t;\n\n/** The ids of the tools `preset` mounts itself: built-ins with their sets opened, then tools of its own. */\nexport const presetToolIds = (preset: FeaturePreset): string[] => {\n const tools = preset.tools ?? [];\n return [...toolIdsOf(tools.filter(namesBuiltins)), ...tools.filter((t): t is Tool => !namesBuiltins(t)).map((t) => t.id)];\n};\n\n/** The built-in tool ids the given presets mount. */\nexport function presetBuiltinTools(enabled: EnabledPresets): Set<BuiltinToolId> {\n const ids = new Set<BuiltinToolId>();\n for (const p of enabled.presets) {\n for (const id of toolIdsOf((p.tools ?? []).filter(namesBuiltins))) ids.add(id);\n }\n return ids;\n}\n\n/** The tools of their own the given presets mount, by id. */\nexport function presetOwnTools(enabled: EnabledPresets): Record<string, Tool> {\n const out: Record<string, Tool> = {};\n for (const p of enabled.presets) for (const t of p.tools ?? []) if (!namesBuiltins(t)) out[t.id] = t;\n return out;\n}\n\n/** The given presets' ambient entries and contributions, in the order they are\n * matched. Their `moveBehaviors` follow the ones `options.move` brings. */\nexport function presetAmbient(enabled: EnabledPresets, options: FeatureBindingOptions): Contribution[] {\n const extra = enabled.presets.flatMap((p) => p.moveBehaviors ?? []);\n const move = extra.length === 0\n ? options.move\n : { ...options.move, behaviors: [...(options.move?.behaviors ?? []), ...extra] };\n const opts = { ...options, move };\n return enabled.presets.flatMap((p) => (p.ambient ? [p.ambient(opts)] : []));\n}\n\n/** The given presets' contributions, in preset order. */\nexport function presetContributions(enabled: EnabledPresets): SurfaceContribution[] {\n return enabled.presets.flatMap((p) => p.contributions ?? []);\n}\n\n/** The enabled presets' own `chromeRules`, then rules hiding each chrome id\n * in `owned` that no enabled preset turns on. `never` also takes a handle out\n * of hit-testing, so a hidden one cannot be grabbed. */\nexport function presetChromeRules(enabled: EnabledPresets, owned: readonly ChromeId[]): VisibilityRules {\n const on = new Set(enabled.presets.flatMap((p) => p.chrome ?? []));\n const rules: VisibilityRules = Object.assign({}, ...enabled.presets.map((p) => p.chromeRules ?? {}));\n for (const id of owned) if (!on.has(id)) rules[id] = never;\n return rules;\n}\n"],"mappings":"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"}
|
|
@@ -3,6 +3,15 @@ import { defaultDrawOne, defaultPaintBounds, paintBoundsFor } from "../defaultDr
|
|
|
3
3
|
import { isCustomEntry } from "../layerSlots.js";
|
|
4
4
|
|
|
5
5
|
//#region src/canvas/SceneCanvas/mergeLayers.ts
|
|
6
|
+
/** `<SceneCanvas layers>` laid over the enabled presets' layers: a slot the
|
|
7
|
+
* consumer names, `null` included, is theirs, and the rest are the presets'. */
|
|
8
|
+
function layersOverPresets(presetLayers, user) {
|
|
9
|
+
if (Object.keys(presetLayers).length === 0) return user;
|
|
10
|
+
return {
|
|
11
|
+
...presetLayers,
|
|
12
|
+
...user
|
|
13
|
+
};
|
|
14
|
+
}
|
|
6
15
|
/** Deep-merge user-supplied `layers` with kit defaults. Slots the user
|
|
7
16
|
* doesn't mention get filled with defaults; slots explicitly set to
|
|
8
17
|
* `null` are dropped. Partial slot configs are shallow-spread on top of the
|
|
@@ -39,5 +48,5 @@ function mergeLayersWithDefaults(user, targetScale = 1, baseSizes = {}) {
|
|
|
39
48
|
}
|
|
40
49
|
|
|
41
50
|
//#endregion
|
|
42
|
-
export { mergeLayersWithDefaults };
|
|
51
|
+
export { layersOverPresets, mergeLayersWithDefaults };
|
|
43
52
|
//# sourceMappingURL=mergeLayers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergeLayers.js","names":[],"sources":["../../../src/canvas/SceneCanvas/mergeLayers.ts"],"sourcesContent":["import type { DrawCommand } from '@weasel-js/renderer';\nimport { targetSizesPx, type TargetSizesPx } from '../../core/device/targets';\nimport type { Node } from 'core/scene/types';\nimport { defaultDrawOne, defaultPaintBounds, paintBoundsFor } from '../defaultDrawOne';\nimport { isCustomEntry, type LayersMap } from '../layerSlots';\nimport type { SceneCanvasLayers } from './props';\n\n/** Deep-merge user-supplied `layers` with kit defaults. Slots the user\n * doesn't mention get filled with defaults; slots explicitly set to\n * `null` are dropped. Partial slot configs are shallow-spread on top of the\n * default slot config. `targetScale` (from the {@link DeviceProfile}) and `baseSizes` go to `targetSizesPx`. */\nexport function mergeLayersWithDefaults<TData, TLayer extends string, TPose>(\n user: SceneCanvasLayers<Node<TData, TLayer, TPose>, TPose> | undefined,\n targetScale = 1, baseSizes: Partial<TargetSizesPx> = {},\n): LayersMap<Node<TData, TLayer, TPose>, TPose> {\n const defaults = {\n scene: {\n drawOne: defaultDrawOne as (\n node: Node<TData, TLayer, TPose>,\n pose: TPose,\n ) => DrawCommand[],\n paintBounds: defaultPaintBounds<TData, TLayer, TPose>,\n },\n selectionOverlay: { handles: { size: targetSizesPx(targetScale, baseSizes).handle } },\n };\n\n if (!user) return defaults as LayersMap<Node<TData, TLayer, TPose>, TPose>;\n\n // Start from a shallow copy of the user map so unknown slots pass through.\n const result = { ...user } as LayersMap<Node<TData, TLayer, TPose>, TPose>;\n\n if (!('scene' in user)) {\n result.scene = defaults.scene;\n } else if (user.scene === null || isCustomEntry(user.scene)) {\n result.scene = user.scene;\n } else {\n const scene = { ...defaults.scene, ...user.scene };\n result.scene = user.scene && 'paintBounds' in user.scene\n ? scene\n : { ...scene, paintBounds: paintBoundsFor<TData, TLayer, TPose>(scene.drawOne) };\n }\n\n if (!('selectionOverlay' in user)) {\n result.selectionOverlay = defaults.selectionOverlay;\n } else if (user.selectionOverlay === null || isCustomEntry(user.selectionOverlay)) {\n result.selectionOverlay = user.selectionOverlay;\n } else {\n result.selectionOverlay = { ...defaults.selectionOverlay, ...user.selectionOverlay };\n }\n\n return result;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"mergeLayers.js","names":[],"sources":["../../../src/canvas/SceneCanvas/mergeLayers.ts"],"sourcesContent":["import type { DrawCommand } from '@weasel-js/renderer';\nimport { targetSizesPx, type TargetSizesPx } from '../../core/device/targets';\nimport type { Node } from 'core/scene/types';\nimport { defaultDrawOne, defaultPaintBounds, paintBoundsFor } from '../defaultDrawOne';\nimport { isCustomEntry, type CustomLayerEntry, type LayersMap } from '../layerSlots';\nimport type { SceneCanvasLayers } from './props';\n\n/** `<SceneCanvas layers>` laid over the enabled presets' layers: a slot the\n * consumer names, `null` included, is theirs, and the rest are the presets'. */\nexport function layersOverPresets<L extends object>(\n presetLayers: Readonly<Record<string, CustomLayerEntry>>,\n user: L | undefined,\n): L | undefined {\n if (Object.keys(presetLayers).length === 0) return user;\n return { ...presetLayers, ...user } as L;\n}\n\n/** Deep-merge user-supplied `layers` with kit defaults. Slots the user\n * doesn't mention get filled with defaults; slots explicitly set to\n * `null` are dropped. Partial slot configs are shallow-spread on top of the\n * default slot config. `targetScale` (from the {@link DeviceProfile}) and `baseSizes` go to `targetSizesPx`. */\nexport function mergeLayersWithDefaults<TData, TLayer extends string, TPose>(\n user: SceneCanvasLayers<Node<TData, TLayer, TPose>, TPose> | undefined,\n targetScale = 1, baseSizes: Partial<TargetSizesPx> = {},\n): LayersMap<Node<TData, TLayer, TPose>, TPose> {\n const defaults = {\n scene: {\n drawOne: defaultDrawOne as (\n node: Node<TData, TLayer, TPose>,\n pose: TPose,\n ) => DrawCommand[],\n paintBounds: defaultPaintBounds<TData, TLayer, TPose>,\n },\n selectionOverlay: { handles: { size: targetSizesPx(targetScale, baseSizes).handle } },\n };\n\n if (!user) return defaults as LayersMap<Node<TData, TLayer, TPose>, TPose>;\n\n // Start from a shallow copy of the user map so unknown slots pass through.\n const result = { ...user } as LayersMap<Node<TData, TLayer, TPose>, TPose>;\n\n if (!('scene' in user)) {\n result.scene = defaults.scene;\n } else if (user.scene === null || isCustomEntry(user.scene)) {\n result.scene = user.scene;\n } else {\n const scene = { ...defaults.scene, ...user.scene };\n result.scene = user.scene && 'paintBounds' in user.scene\n ? scene\n : { ...scene, paintBounds: paintBoundsFor<TData, TLayer, TPose>(scene.drawOne) };\n }\n\n if (!('selectionOverlay' in user)) {\n result.selectionOverlay = defaults.selectionOverlay;\n } else if (user.selectionOverlay === null || isCustomEntry(user.selectionOverlay)) {\n result.selectionOverlay = user.selectionOverlay;\n } else {\n result.selectionOverlay = { ...defaults.selectionOverlay, ...user.selectionOverlay };\n }\n\n return result;\n}\n"],"mappings":";;;;;;;AASA,SAAgB,kBACd,cACA,MACe;CACf,IAAI,OAAO,KAAK,YAAY,CAAC,CAAC,WAAW,GAAG,OAAO;CACnD,OAAO;EAAE,GAAG;EAAc,GAAG;CAAK;AACpC;;;;;AAMA,SAAgB,wBACd,MACA,cAAc,GAAG,YAAoC,CAAC,GACR;CAC9C,MAAM,WAAW;EACf,OAAO;GACL,SAAS;GAIT,aAAa;EACf;EACA,kBAAkB,EAAE,SAAS,EAAE,MAAM,cAAc,aAAa,SAAS,CAAC,CAAC,OAAO,EAAE;CACtF;CAEA,IAAI,CAAC,MAAM,OAAO;CAGlB,MAAM,SAAS,EAAE,GAAG,KAAK;CAEzB,IAAI,EAAE,WAAW,OACf,OAAO,QAAQ,SAAS;MACnB,IAAI,KAAK,UAAU,QAAQ,cAAc,KAAK,KAAK,GACxD,OAAO,QAAQ,KAAK;MACf;EACL,MAAM,QAAQ;GAAE,GAAG,SAAS;GAAO,GAAG,KAAK;EAAM;EACjD,OAAO,QAAQ,KAAK,SAAS,iBAAiB,KAAK,QAC/C,QACA;GAAE,GAAG;GAAO,aAAa,eAAqC,MAAM,OAAO;EAAE;CACnF;CAEA,IAAI,EAAE,sBAAsB,OAC1B,OAAO,mBAAmB,SAAS;MAC9B,IAAI,KAAK,qBAAqB,QAAQ,cAAc,KAAK,gBAAgB,GAC9E,OAAO,mBAAmB,KAAK;MAE/B,OAAO,mBAAmB;EAAE,GAAG,SAAS;EAAkB,GAAG,KAAK;CAAiB;CAGrF,OAAO;AACT"}
|
|
@@ -1,56 +1,84 @@
|
|
|
1
|
-
import { arrangePreset } from "./presets/arrange.js";
|
|
2
|
-
import { editPreset } from "./presets/edit.js";
|
|
1
|
+
import { alignPreset, arrangePreset, distributePreset, flipPreset, reorderPreset } from "./presets/arrange.js";
|
|
2
|
+
import { clipboardPreset, contextMenuPreset, deletePreset, duplicatePreset, editPreset, escapePreset, groupPreset, nudgePreset, selectAllPreset, stylePreset } from "./presets/edit.js";
|
|
3
3
|
import { ingestPreset } from "./presets/ingest.js";
|
|
4
|
-
import { pathsPreset } from "./presets/paths.js";
|
|
4
|
+
import { anchorKeysPreset, outlinesPreset, pathCommandsPreset, pathEditPreset, pathfinderPreset, pathsPreset } from "./presets/paths.js";
|
|
5
|
+
import { drawToolsPreset, pageToolsPreset, selectToolsPreset, shapeToolsPreset, typeToolsPreset, viewToolsPreset } from "./presets/tools.js";
|
|
5
6
|
import { selectPreset } from "./presets/select.js";
|
|
6
|
-
import { toolDrivenActions } from "./presets/toolDriven.js";
|
|
7
7
|
import { movePreset, outlinePreset, resizePreset, rotatePreset } from "./presets/transform.js";
|
|
8
8
|
import { viewPreset } from "./presets/view.js";
|
|
9
|
+
import { drawPreset, pickPreset, transformPreset } from "./presets/composites.js";
|
|
10
|
+
import { toolDrivenActions } from "./presets/toolDriven.js";
|
|
11
|
+
import { BASELINE_ACTIONS } from "./presets/baseline.js";
|
|
9
12
|
|
|
10
13
|
//#region src/canvas/SceneCanvas/namedPresets.ts
|
|
11
|
-
/** Each core preset by name
|
|
14
|
+
/** Each core preset by name, in the order `SCENE_CANVAS_FEATURES` lists them. */
|
|
12
15
|
var FEATURE_PRESETS = {
|
|
16
|
+
"tools:select": selectToolsPreset,
|
|
17
|
+
"tools:view": viewToolsPreset,
|
|
18
|
+
"tools:shape": shapeToolsPreset,
|
|
19
|
+
"tools:draw": drawToolsPreset,
|
|
20
|
+
"tools:type": typeToolsPreset,
|
|
21
|
+
"tools:page": pageToolsPreset,
|
|
13
22
|
view: viewPreset,
|
|
14
23
|
select: selectPreset,
|
|
15
24
|
outline: outlinePreset,
|
|
25
|
+
pick: pickPreset,
|
|
26
|
+
move: movePreset,
|
|
16
27
|
resize: resizePreset,
|
|
17
28
|
rotate: rotatePreset,
|
|
18
|
-
|
|
29
|
+
transform: transformPreset,
|
|
30
|
+
escape: escapePreset,
|
|
31
|
+
contextMenu: contextMenuPreset,
|
|
32
|
+
selectAll: selectAllPreset,
|
|
33
|
+
duplicate: duplicatePreset,
|
|
34
|
+
delete: deletePreset,
|
|
35
|
+
group: groupPreset,
|
|
36
|
+
nudge: nudgePreset,
|
|
37
|
+
style: stylePreset,
|
|
38
|
+
clipboard: clipboardPreset,
|
|
19
39
|
edit: editPreset,
|
|
40
|
+
flip: flipPreset,
|
|
41
|
+
reorder: reorderPreset,
|
|
42
|
+
align: alignPreset,
|
|
43
|
+
distribute: distributePreset,
|
|
20
44
|
arrange: arrangePreset,
|
|
45
|
+
anchorKeys: anchorKeysPreset,
|
|
46
|
+
pathfinder: pathfinderPreset,
|
|
47
|
+
outlines: outlinesPreset,
|
|
48
|
+
pathEdit: pathEditPreset,
|
|
49
|
+
pathCommands: pathCommandsPreset,
|
|
21
50
|
paths: pathsPreset,
|
|
22
|
-
ingest: ingestPreset
|
|
23
|
-
|
|
24
|
-
var BASE_FEATURES = Object.keys(FEATURE_PRESETS);
|
|
25
|
-
/** The base presets each composite preset turns on. */
|
|
26
|
-
var COMPOSITE_FEATURES = {
|
|
27
|
-
pick: ["select", "outline"],
|
|
28
|
-
transform: ["resize", "rotate"],
|
|
29
|
-
draw: BASE_FEATURES
|
|
51
|
+
ingest: ingestPreset,
|
|
52
|
+
draw: drawPreset
|
|
30
53
|
};
|
|
54
|
+
var FEATURES = Object.keys(FEATURE_PRESETS);
|
|
31
55
|
/** The names `<SceneCanvas>` resolves. */
|
|
32
|
-
var CORE_NAMED_PRESETS =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
36
|
-
/** The kit-standard action ids each preset registers. */
|
|
37
|
-
var FEATURE_ACTION_IDS = Object.fromEntries(BASE_FEATURES.map((f) => [f, (FEATURE_PRESETS[f].actions ?? []).map((a) => a.id)]));
|
|
56
|
+
var CORE_NAMED_PRESETS = FEATURE_PRESETS;
|
|
57
|
+
/** The kit-standard action ids each preset registers itself, leaving out those of the presets it includes. */
|
|
58
|
+
var FEATURE_ACTION_IDS = Object.fromEntries(FEATURES.map((f) => [f, (FEATURE_PRESETS[f].actions ?? []).map((a) => a.id)]));
|
|
38
59
|
/**
|
|
39
60
|
* Kit-standard actions no preset registers: they belong to the tools that bind
|
|
40
61
|
* them. A canvas registers each one whenever a tool it carries names it in a
|
|
41
62
|
* binding — `insert` with any shape tool, `enterTextEdit` with the text tool.
|
|
42
63
|
*/
|
|
43
64
|
var TOOL_DRIVEN_ACTION_IDS = toolDrivenActions.map((a) => a.id);
|
|
44
|
-
/**
|
|
65
|
+
/** The kit-standard actions every canvas registers, preset or none: undo and redo. */
|
|
66
|
+
var BASELINE_ACTION_IDS = BASELINE_ACTIONS.map((a) => a.id);
|
|
67
|
+
/** Every kit-standard action: the baseline, each core preset's in table order, then the
|
|
45
68
|
* tool-driven ones. */
|
|
46
|
-
var KIT_STANDARD_ACTIONS = [
|
|
69
|
+
var KIT_STANDARD_ACTIONS = [
|
|
70
|
+
...BASELINE_ACTIONS,
|
|
71
|
+
...FEATURES.flatMap((f) => FEATURE_PRESETS[f].actions ?? []),
|
|
72
|
+
...toolDrivenActions
|
|
73
|
+
];
|
|
47
74
|
/** What `<SceneCanvas>` resolves `features` through: every core name, and
|
|
48
75
|
* every kit-standard action for its tools to bring. */
|
|
49
76
|
var CORE_PRESET_SOURCE = {
|
|
50
77
|
named: CORE_NAMED_PRESETS,
|
|
51
|
-
pool: KIT_STANDARD_ACTIONS
|
|
78
|
+
pool: KIT_STANDARD_ACTIONS,
|
|
79
|
+
baseline: BASELINE_ACTIONS
|
|
52
80
|
};
|
|
53
81
|
|
|
54
82
|
//#endregion
|
|
55
|
-
export {
|
|
83
|
+
export { BASELINE_ACTION_IDS, CORE_NAMED_PRESETS, CORE_PRESET_SOURCE, FEATURE_ACTION_IDS, FEATURE_PRESETS, KIT_STANDARD_ACTIONS, TOOL_DRIVEN_ACTION_IDS };
|
|
56
84
|
//# sourceMappingURL=namedPresets.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"namedPresets.js","names":[],"sources":["../../../src/canvas/SceneCanvas/namedPresets.ts"],"sourcesContent":["/**\n * Core's presets by name: what `features={['draw']}` resolves through.\n * Importing this module loads every core preset's actions; a canvas handed\n * only preset objects never reaches it.\n */\nimport type { Action } from '@weasel-js/routing';\nimport type {
|
|
1
|
+
{"version":3,"file":"namedPresets.js","names":[],"sources":["../../../src/canvas/SceneCanvas/namedPresets.ts"],"sourcesContent":["/**\n * Core's presets by name: what `features={['draw']}` resolves through.\n * Importing this module loads every core preset's actions; a canvas handed\n * only preset objects never reaches it.\n */\nimport type { Action } from '@weasel-js/routing';\nimport type { Feature, FeaturePreset, NamedPresets, PresetSource } from './features';\nimport {\n alignPreset, arrangePreset, distributePreset, flipPreset, reorderPreset,\n} from './presets/arrange';\nimport { drawPreset, pickPreset, transformPreset } from './presets/composites';\nimport {\n clipboardPreset, contextMenuPreset, deletePreset, duplicatePreset, editPreset, escapePreset, groupPreset,\n nudgePreset, selectAllPreset, stylePreset,\n} from './presets/edit';\nimport { ingestPreset } from './presets/ingest';\nimport {\n anchorKeysPreset, outlinesPreset, pathCommandsPreset, pathEditPreset, pathfinderPreset, pathsPreset,\n} from './presets/paths';\nimport { selectPreset } from './presets/select';\nimport { toolDrivenActions } from './presets/toolDriven';\nimport {\n drawToolsPreset, pageToolsPreset, selectToolsPreset, shapeToolsPreset, typeToolsPreset, viewToolsPreset,\n} from './presets/tools';\nimport { BASELINE_ACTIONS } from './presets/baseline';\nimport { movePreset, outlinePreset, resizePreset, rotatePreset } from './presets/transform';\nimport { viewPreset } from './presets/view';\n\n/** Each core preset by name, in the order `SCENE_CANVAS_FEATURES` lists them. */\nexport const FEATURE_PRESETS: Readonly<Record<Feature, FeaturePreset>> = {\n 'tools:select': selectToolsPreset,\n 'tools:view': viewToolsPreset,\n 'tools:shape': shapeToolsPreset,\n 'tools:draw': drawToolsPreset,\n 'tools:type': typeToolsPreset,\n 'tools:page': pageToolsPreset,\n view: viewPreset,\n select: selectPreset,\n outline: outlinePreset,\n pick: pickPreset,\n move: movePreset,\n resize: resizePreset,\n rotate: rotatePreset,\n transform: transformPreset,\n escape: escapePreset,\n contextMenu: contextMenuPreset,\n selectAll: selectAllPreset,\n duplicate: duplicatePreset,\n delete: deletePreset,\n group: groupPreset,\n nudge: nudgePreset,\n style: stylePreset,\n clipboard: clipboardPreset,\n edit: editPreset,\n flip: flipPreset,\n reorder: reorderPreset,\n align: alignPreset,\n distribute: distributePreset,\n arrange: arrangePreset,\n anchorKeys: anchorKeysPreset,\n pathfinder: pathfinderPreset,\n outlines: outlinesPreset,\n pathEdit: pathEditPreset,\n pathCommands: pathCommandsPreset,\n paths: pathsPreset,\n ingest: ingestPreset,\n draw: drawPreset,\n};\n\nconst FEATURES = Object.keys(FEATURE_PRESETS) as Feature[];\n\n/** The names `<SceneCanvas>` resolves. */\nexport const CORE_NAMED_PRESETS: NamedPresets = FEATURE_PRESETS;\n\n/** The kit-standard action ids each preset registers itself, leaving out those of the presets it includes. */\nexport const FEATURE_ACTION_IDS = Object.fromEntries(\n FEATURES.map((f): [Feature, readonly string[]] => [f, (FEATURE_PRESETS[f].actions ?? []).map((a) => a.id)]),\n) as Readonly<Record<Feature, readonly string[]>>;\n\n/**\n * Kit-standard actions no preset registers: they belong to the tools that bind\n * them. A canvas registers each one whenever a tool it carries names it in a\n * binding — `insert` with any shape tool, `enterTextEdit` with the text tool.\n */\nexport const TOOL_DRIVEN_ACTION_IDS: readonly string[] = toolDrivenActions.map((a) => a.id);\n\n/** The kit-standard actions every canvas registers, preset or none: undo and redo. */\nexport const BASELINE_ACTION_IDS: readonly string[] = BASELINE_ACTIONS.map((a) => a.id);\n\n/** Every kit-standard action: the baseline, each core preset's in table order, then the\n * tool-driven ones. */\nexport const KIT_STANDARD_ACTIONS: readonly Action[] = [\n ...BASELINE_ACTIONS,\n ...FEATURES.flatMap((f) => FEATURE_PRESETS[f].actions ?? []),\n ...toolDrivenActions,\n];\n\n/** What `<SceneCanvas>` resolves `features` through: every core name, and\n * every kit-standard action for its tools to bring. */\nexport const CORE_PRESET_SOURCE: PresetSource = { named: CORE_NAMED_PRESETS, pool: KIT_STANDARD_ACTIONS, baseline: BASELINE_ACTIONS };\n"],"mappings":";;;;;;;;;;;;;;AA6BA,IAAa,kBAA4D;CACvE,gBAAgB;CAChB,cAAc;CACd,eAAe;CACf,cAAc;CACd,cAAc;CACd,cAAc;CACd,MAAM;CACN,QAAQ;CACR,SAAS;CACT,MAAM;CACN,MAAM;CACN,QAAQ;CACR,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,aAAa;CACb,WAAW;CACX,WAAW;CACX,QAAQ;CACR,OAAO;CACP,OAAO;CACP,OAAO;CACP,WAAW;CACX,MAAM;CACN,MAAM;CACN,SAAS;CACT,OAAO;CACP,YAAY;CACZ,SAAS;CACT,YAAY;CACZ,YAAY;CACZ,UAAU;CACV,UAAU;CACV,cAAc;CACd,OAAO;CACP,QAAQ;CACR,MAAM;AACR;AAEA,IAAM,WAAW,OAAO,KAAK,eAAe;;AAG5C,IAAa,qBAAmC;;AAGhD,IAAa,qBAAqB,OAAO,YACvC,SAAS,KAAK,MAAoC,CAAC,IAAI,gBAAgB,EAAE,CAAC,WAAW,CAAC,EAAA,CAAG,KAAK,MAAM,EAAE,EAAE,CAAC,CAAC,CAC5G;;;;;;AAOA,IAAa,yBAA4C,kBAAkB,KAAK,MAAM,EAAE,EAAE;;AAG1F,IAAa,sBAAyC,iBAAiB,KAAK,MAAM,EAAE,EAAE;;;AAItF,IAAa,uBAA0C;CACrD,GAAG;CACH,GAAG,SAAS,SAAS,MAAM,gBAAgB,EAAE,CAAC,WAAW,CAAC,CAAC;CAC3D,GAAG;AACL;;;AAIA,IAAa,qBAAmC;CAAE,OAAO;CAAoB,MAAM;CAAsB,UAAU;AAAiB"}
|