@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
|
@@ -6,20 +6,20 @@ import { IconRef } from '@weasel-js/icons';
|
|
|
6
6
|
import { PaintDrawKind, DrawCommand, Effect, CompositeOp, BlendFactors } from '@weasel-js/renderer';
|
|
7
7
|
import * as _weasel_js_routing_react from '@weasel-js/routing/react';
|
|
8
8
|
import * as _weasel_js_geom from '@weasel-js/geom';
|
|
9
|
-
import { FramedBox, View, Path, Affine, Rect, Scale2, PolygonPath, PathFillRule, AnchorSet, PointOrigin } from '@weasel-js/geom';
|
|
10
|
-
import { I as InheritedPaint, S as Scene, R as RectPose } from './types-
|
|
9
|
+
import { FramedBox, View, Path, Affine, Rect, Scale2, PolygonPath, Point, PathFillRule, AnchorSet, PointOrigin } from '@weasel-js/geom';
|
|
10
|
+
import { I as InheritedPaint, S as Scene, R as RectPose } from './types-DW14eu9B.js';
|
|
11
11
|
import { Op, History } from '@weasel-js/history';
|
|
12
|
-
import { NodeId, ModifierState, OverlayRole, ResizeAnchor, ActionDeps, OngoingHandle, OngoingOverlay,
|
|
12
|
+
import { NodeId, ModifierState, OverlayRole, WorldPoint, ResizeAnchor, ActionDeps, OngoingHandle, OngoingOverlay, IngestItem, SelectionApi, Point2, DragSample, DebugSink, LongPressState } from '@weasel-js/routing';
|
|
13
13
|
import { TextNodeSource, TextOutlinesError, TextStyle, StyledRun, TextVerticalAlign } from '@weasel-js/text';
|
|
14
14
|
import { CursorSpec } from '@weasel-js/cursor';
|
|
15
15
|
import { ClaimableGesture } from '@weasel-js/gestures';
|
|
16
16
|
import { SnapTier, ProbeRole } from '@weasel-js/geom/nd';
|
|
17
|
-
import { a as PlaneMap, L as LayoutStrategy, b as LayoutDropTargetMode, R as ReflowTransition } from './types-
|
|
17
|
+
import { a as PlaneMap, L as LayoutStrategy, b as LayoutDropTargetMode, R as ReflowTransition } from './types-A_sNJYRd.js';
|
|
18
18
|
import { O as OriginProjection } from './originProjection-gY0jb4Wb.js';
|
|
19
19
|
import { EasingSpec, InterpolatorFactory, Target, Animator, TargetAxes } from '@weasel-js/animator';
|
|
20
|
-
import { I as InsertAdapter, P as PasteOmission, R as RegionPickView } from './types-
|
|
21
|
-
import { B as BoundsConstraint } from './clone-
|
|
22
|
-
import { P as PoseDescriptor } from './poseDescriptor-
|
|
20
|
+
import { I as InsertAdapter, P as PasteOmission, R as RegionPickView } from './types-VCtfchp-.js';
|
|
21
|
+
import { B as BoundsConstraint } from './clone-Bz4iqGfE.js';
|
|
22
|
+
import { P as PoseDescriptor } from './poseDescriptor-CvSxVhCd.js';
|
|
23
23
|
|
|
24
24
|
/** Pixel dimensions of the canvas viewport. */
|
|
25
25
|
interface ViewportDims {
|
|
@@ -64,11 +64,11 @@ declare function fitViewToBounds(bounds: FramedBox, viewportDims: ViewportDims,
|
|
|
64
64
|
* `Paint`'s discriminant, open on the string the way `ChromeId` is: the
|
|
65
65
|
* kinds the kit ships, plus whatever a consumer registers.
|
|
66
66
|
*/
|
|
67
|
-
type PaintKind = 'solid' | 'linear-gradient' | 'radial-gradient' | 'conic-gradient' | TileKind | 'texture' | (string & {});
|
|
67
|
+
type PaintKind = 'solid' | 'linear-gradient' | 'radial-gradient' | 'conic-gradient' | TileKind | 'image' | 'texture' | (string & {});
|
|
68
68
|
/**
|
|
69
69
|
* A set of kinds an editor offers as one choice. Kinds sharing a family show
|
|
70
70
|
* as a single segment in a kind bar, named by the family, and the member is
|
|
71
|
-
* picked inside that segment's body. The built-in tiles and `texture` are the
|
|
71
|
+
* picked inside that segment's body. The built-in tiles, `image` and `texture` are the
|
|
72
72
|
* `patternFamily`.
|
|
73
73
|
*/
|
|
74
74
|
interface PaintKindFamily {
|
|
@@ -149,7 +149,7 @@ declare function asPaint<T extends {
|
|
|
149
149
|
* GL renderer and its serialize slot lives in `@weasel-js/svg`.
|
|
150
150
|
*/
|
|
151
151
|
|
|
152
|
-
/** The family the built-in tiles and `texture` are offered under. A consumer's
|
|
152
|
+
/** The family the built-in tiles, `image` and `texture` are offered under. A consumer's
|
|
153
153
|
* own pattern kind joins it by naming this as its `family`. */
|
|
154
154
|
declare const patternFamily: PaintKindFamily;
|
|
155
155
|
/** A tile paint seeded from a color. `units: 'bounds'` anchors the tile to the
|
|
@@ -519,6 +519,10 @@ interface Affordance {
|
|
|
519
519
|
/** This affordance's interactive regions. Each lives in some target id's local frame (or
|
|
520
520
|
* the world frame when `targetId` is `null`). `[]` means no chrome for this state. */
|
|
521
521
|
regions(state: ChromeState): readonly AffordanceRegion[];
|
|
522
|
+
/** The regions a press at world `(wx, wy)` can hit, in the order `regions` lists them: a hit
|
|
523
|
+
* test reads these in place of `regions`, so one that leaves out a region the point is in
|
|
524
|
+
* changes which region wins. For an affordance with many regions, narrowed by an index. */
|
|
525
|
+
regionsAt?(state: ChromeState, wx: number, wy: number, view: View): readonly AffordanceRegion[];
|
|
522
526
|
/** Optional non-interactive decoration (e.g., a leader line from a bounds edge to a
|
|
523
527
|
* handle). Receives raw state + view because it may live outside any single target's
|
|
524
528
|
* local frame. */
|
|
@@ -778,9 +782,10 @@ interface LayerGroup {
|
|
|
778
782
|
* When `drawLayers` asks the renderer to keep a layer's pixels between frames
|
|
779
783
|
* (`GroupDrawCommand.retain`) rather than submit its commands again.
|
|
780
784
|
*
|
|
781
|
-
* A layer is retained once its `deps` have held for a frame, the view
|
|
782
|
-
* since the frame before (for a world-space layer, whose pixels move
|
|
783
|
-
* it
|
|
785
|
+
* A layer is retained once its `deps` have held for a frame, the view's zoom
|
|
786
|
+
* has held since the frame before (for a world-space layer, whose pixels move
|
|
787
|
+
* with it; the renderer moves a kept surface with a pan where it can), and it
|
|
788
|
+
* holds at least `minCommands` drawing commands. A layer changing
|
|
784
789
|
* every frame is never retained: drawing it into its surface and compositing
|
|
785
790
|
* that costs more than drawing it.
|
|
786
791
|
*/
|
|
@@ -805,11 +810,17 @@ declare function subscribeToSources(sources: readonly {
|
|
|
805
810
|
subscribe?: RedrawSource['subscribe'];
|
|
806
811
|
}[])): RedrawSource['subscribe'];
|
|
807
812
|
|
|
808
|
-
/** Canvas size in CSS pixels
|
|
813
|
+
/** Canvas size in CSS pixels. */
|
|
809
814
|
interface Dims {
|
|
810
815
|
width: number;
|
|
811
816
|
height: number;
|
|
812
817
|
}
|
|
818
|
+
/** What a layer draws into: its size, and the device pixels to the CSS pixel
|
|
819
|
+
* the frame is painted at, which is what an effect's reach is measured in. */
|
|
820
|
+
interface LayerDims extends Dims {
|
|
821
|
+
dpr: number;
|
|
822
|
+
}
|
|
823
|
+
|
|
813
824
|
/**
|
|
814
825
|
* What a layer's `draw` threw, and which layer threw it. A throw that escaped
|
|
815
826
|
* the frame loop would take the whole frame with it, every other layer
|
|
@@ -846,7 +857,7 @@ interface RenderLayer<TData> {
|
|
|
846
857
|
* Emit a DrawCommand tree, in the coordinates `space` names. A world-space
|
|
847
858
|
* layer must NOT apply the view transform itself.
|
|
848
859
|
*/
|
|
849
|
-
draw: (data: TData, view: View, dims:
|
|
860
|
+
draw: (data: TData, view: View, dims: LayerDims) => DrawCommand[];
|
|
850
861
|
/**
|
|
851
862
|
* Optional cache key. When present and a `LayerCommandCache` is supplied to
|
|
852
863
|
* `drawLayers`, the layer's previous `DrawCommand[]` is reused as long as
|
|
@@ -861,7 +872,7 @@ interface RenderLayer<TData> {
|
|
|
861
872
|
* the way world-space layers are** (see `space` below) — include them in
|
|
862
873
|
* `deps` if `draw` reads them.
|
|
863
874
|
*/
|
|
864
|
-
deps?: (data: TData, view: View, dims:
|
|
875
|
+
deps?: (data: TData, view: View, dims: LayerDims) => readonly unknown[];
|
|
865
876
|
/** Whether the layer is shown when no explicit visibility entry exists.
|
|
866
877
|
* Defaults to `true` when absent. */
|
|
867
878
|
defaultVisible?: boolean;
|
|
@@ -948,7 +959,7 @@ interface LayerDrawSpan {
|
|
|
948
959
|
* layer drawn. `retain` decides which unchanged layers the renderer keeps
|
|
949
960
|
* as pixels between frames; `false` keeps none.
|
|
950
961
|
*/
|
|
951
|
-
declare function drawLayers<TData>(layers: RenderLayer<TData>[], data: TData, visibility: Record<string, boolean>, order: string[] | undefined, view: View | undefined, dims:
|
|
962
|
+
declare function drawLayers<TData>(layers: RenderLayer<TData>[], data: TData, visibility: Record<string, boolean>, order: string[] | undefined, view: View | undefined, dims: LayerDims, cache?: LayerCommandCache, onLayerError?: (failure: LayerDrawFailure) => void, groups?: readonly LayerGroup[], spans?: LayerDrawSpan[], retain?: LayerRetainPolicy | false): DrawCommand[];
|
|
952
963
|
/**
|
|
953
964
|
* Resolve one layer's visibility: `alwaysOn` wins, then an explicit entry in
|
|
954
965
|
* `visibility`, then `defaultVisible`, defaulting to shown.
|
|
@@ -980,7 +991,7 @@ declare function paintedLayers<TData>(layers: readonly RenderLayer<TData>[], vis
|
|
|
980
991
|
* layer it was. The layer's cache entry goes with it, so the next frame is a
|
|
981
992
|
* real re-attempt.
|
|
982
993
|
*/
|
|
983
|
-
declare function drawOneLayer<TData>(layer: RenderLayer<TData>, data: TData, view: View, dims:
|
|
994
|
+
declare function drawOneLayer<TData>(layer: RenderLayer<TData>, data: TData, view: View, dims: LayerDims, cache?: LayerCommandCache, onLayerError?: (failure: LayerDrawFailure) => void): DrawCommand[];
|
|
984
995
|
/** Whether `b` matches `a` entry for entry under `Object.is` — how
|
|
985
996
|
* `RenderLayer.deps` is compared, and any cache keyed the same way. */
|
|
986
997
|
declare function depsUnchanged(a: readonly unknown[], b: readonly unknown[]): boolean;
|
|
@@ -1107,16 +1118,12 @@ interface PreviewPathsDep {
|
|
|
1107
1118
|
|
|
1108
1119
|
/** The `snap` dep: what a drawn or dragged point locks to. */
|
|
1109
1120
|
|
|
1110
|
-
type Point$4 = {
|
|
1111
|
-
x: number;
|
|
1112
|
-
y: number;
|
|
1113
|
-
};
|
|
1114
1121
|
/** Geometry a gesture brings to snap to that is in no scene node: what stays
|
|
1115
1122
|
* put of a path whose anchors it is dragging. World coords. */
|
|
1116
1123
|
interface SnapGeometry {
|
|
1117
1124
|
paths?: readonly Path[];
|
|
1118
1125
|
/** Points to snap to as anchors. */
|
|
1119
|
-
anchors?: readonly
|
|
1126
|
+
anchors?: readonly WorldPoint[];
|
|
1120
1127
|
}
|
|
1121
1128
|
/** What builds a gesture's input subspace while `snap.constrain` is held:
|
|
1122
1129
|
* an angle step in radians about `origin` (a rotate's every multiple of
|
|
@@ -1129,13 +1136,13 @@ type SnapConstrain = {
|
|
|
1129
1136
|
interface SnapResizeBox {
|
|
1130
1137
|
bounds: FramedBox;
|
|
1131
1138
|
/** Its frame into ctx coordinates, an affine map. Default: the identity. */
|
|
1132
|
-
toWorld?: (p:
|
|
1139
|
+
toWorld?: (p: WorldPoint) => WorldPoint;
|
|
1133
1140
|
}
|
|
1134
1141
|
/** What a gesture tells the snap dep when it starts. Points are ctx
|
|
1135
1142
|
* coordinates: world in 2D. */
|
|
1136
1143
|
interface SnapBegin {
|
|
1137
1144
|
gesture: SnapGesture;
|
|
1138
|
-
press:
|
|
1145
|
+
press: WorldPoint;
|
|
1139
1146
|
/** The subject, whose geometry offers no targets. */
|
|
1140
1147
|
ids?: readonly string[];
|
|
1141
1148
|
/** The container a subject not yet in the scene lands in: an insert's
|
|
@@ -1147,7 +1154,7 @@ interface SnapBegin {
|
|
|
1147
1154
|
* axis-aligned. */
|
|
1148
1155
|
box?: SnapResizeBox;
|
|
1149
1156
|
/** Rotate, handle: the point the angle turns about. Default `press`. */
|
|
1150
|
-
pivot?:
|
|
1157
|
+
pivot?: WorldPoint;
|
|
1151
1158
|
/** Rotate: the subject's angle at press, radians. Default 0. */
|
|
1152
1159
|
theta0?: number;
|
|
1153
1160
|
/** Angle gestures: the reach as an angle, radians, in place of screen px
|
|
@@ -1158,7 +1165,7 @@ interface SnapBegin {
|
|
|
1158
1165
|
* start, the previous anchor, the anchor a handle pulls from. Tangent and
|
|
1159
1166
|
* perpendicular targets are measured from it, a `constrain` step turns
|
|
1160
1167
|
* about it, and no point target on it is offered. */
|
|
1161
|
-
origin?:
|
|
1168
|
+
origin?: WorldPoint;
|
|
1162
1169
|
also?: SnapGeometry;
|
|
1163
1170
|
constrain?: SnapConstrain;
|
|
1164
1171
|
/** How the camera's world maps into the parallax plane the gesture's points
|
|
@@ -1183,7 +1190,7 @@ interface SnapMods {
|
|
|
1183
1190
|
}
|
|
1184
1191
|
/** Where a session put one frame's point, and the marks to draw for it. */
|
|
1185
1192
|
interface SnapOutcome {
|
|
1186
|
-
point:
|
|
1193
|
+
point: WorldPoint;
|
|
1187
1194
|
/** Whether some target holds the point. */
|
|
1188
1195
|
held: boolean;
|
|
1189
1196
|
marks: readonly SnapMark[];
|
|
@@ -1191,7 +1198,7 @@ interface SnapOutcome {
|
|
|
1191
1198
|
/** One gesture's snapping, from press to release. */
|
|
1192
1199
|
interface SnapSession {
|
|
1193
1200
|
/** Where `p` lands. */
|
|
1194
|
-
at(p:
|
|
1201
|
+
at(p: WorldPoint, mods: SnapMods): SnapOutcome;
|
|
1195
1202
|
/** Where the angle `theta` (radians, about `pivot`) lands. */
|
|
1196
1203
|
angle(theta: number, mods: SnapMods): {
|
|
1197
1204
|
theta: number;
|
|
@@ -1213,20 +1220,23 @@ interface SnapDep {
|
|
|
1213
1220
|
/** The snap source contract: what a target set offers a snap session, and
|
|
1214
1221
|
* the marks a session draws for what it met. */
|
|
1215
1222
|
|
|
1216
|
-
type Point$3 = {
|
|
1217
|
-
x: number;
|
|
1218
|
-
y: number;
|
|
1219
|
-
};
|
|
1220
1223
|
/** The positions a target allows: `at` plus any combination of `dirs`. No
|
|
1221
1224
|
* dirs is a point, one a line, two a plane. */
|
|
1222
|
-
interface Locus<P = Point
|
|
1225
|
+
interface Locus<P = Point> {
|
|
1223
1226
|
at: P;
|
|
1224
1227
|
dirs: readonly P[];
|
|
1225
1228
|
/** One interval per dir, in multiples of it: a segment or a bounded face. */
|
|
1226
1229
|
span?: readonly (readonly [number, number])[];
|
|
1227
1230
|
}
|
|
1231
|
+
/** An affine map between a frame and world, in a host's point type. */
|
|
1232
|
+
interface SnapFrame<P = Point> {
|
|
1233
|
+
/** A point given in the frame, in world. */
|
|
1234
|
+
toWorld(p: P): P;
|
|
1235
|
+
/** A world point in the frame; null where nothing maps back. */
|
|
1236
|
+
toLocal(p: P): P | null;
|
|
1237
|
+
}
|
|
1228
1238
|
/** One locus a source offers one probe. */
|
|
1229
|
-
interface SourceCandidate<P = Point
|
|
1239
|
+
interface SourceCandidate<P = Point> {
|
|
1230
1240
|
/** The id of a probe the source was offered. */
|
|
1231
1241
|
probe: string;
|
|
1232
1242
|
locus: Locus<P>;
|
|
@@ -1247,13 +1257,13 @@ interface SnapEdges {
|
|
|
1247
1257
|
y: SnapEdge;
|
|
1248
1258
|
}
|
|
1249
1259
|
/** A point on the subject that should land on a locus. */
|
|
1250
|
-
interface SnapProbeAt<P = Point
|
|
1260
|
+
interface SnapProbeAt<P = Point> {
|
|
1251
1261
|
id: string;
|
|
1252
1262
|
at: P;
|
|
1253
1263
|
role: ProbeRole;
|
|
1254
1264
|
}
|
|
1255
1265
|
/** What a session asks a source for, once per frame. */
|
|
1256
|
-
interface SnapCollect<P = Point
|
|
1266
|
+
interface SnapCollect<P = Point> {
|
|
1257
1267
|
gesture: SnapGesture;
|
|
1258
1268
|
/** The probes this source matches, where the unsnapped gesture puts them. */
|
|
1259
1269
|
probes: readonly SnapProbeAt<P>[];
|
|
@@ -1291,6 +1301,11 @@ interface SnapCollect<P = Point$3> {
|
|
|
1291
1301
|
reachPx: number;
|
|
1292
1302
|
/** Absent in a host with no 2D scene. */
|
|
1293
1303
|
scene?: Scene<unknown, string, unknown>;
|
|
1304
|
+
/** `id`'s own frame: the coordinates its box is laid out in, from its
|
|
1305
|
+
* corner along its own axes, turned and transformed as it is drawn. A
|
|
1306
|
+
* container whose pose is a frame stores its children's poses in it.
|
|
1307
|
+
* Undefined for a node with no box; absent in a host that has none. */
|
|
1308
|
+
frameOf?(id: string): SnapFrame<P> | undefined;
|
|
1294
1309
|
/** How the camera's world maps into the parallax plane the probes are in.
|
|
1295
1310
|
* Absent in the camera's own world. A target the camera draws, a grid or
|
|
1296
1311
|
* a ruler guide, is carried through it. */
|
|
@@ -1299,10 +1314,10 @@ interface SnapCollect<P = Point$3> {
|
|
|
1299
1314
|
/** What a rotate or handle drag asks a source for, once per frame. Angles
|
|
1300
1315
|
* are radians about `pivot`, in the frame `rotationOf` reads. */
|
|
1301
1316
|
interface AngleCollect {
|
|
1302
|
-
pivot:
|
|
1317
|
+
pivot: WorldPoint;
|
|
1303
1318
|
/** Where the gesture was pressed: its distance from `pivot` is the radius
|
|
1304
1319
|
* the default marks are drawn at. */
|
|
1305
|
-
press:
|
|
1320
|
+
press: WorldPoint;
|
|
1306
1321
|
/** The angle at press. */
|
|
1307
1322
|
theta0: number;
|
|
1308
1323
|
/** The unsnapped angle now. */
|
|
@@ -1330,7 +1345,7 @@ interface AngleCandidate {
|
|
|
1330
1345
|
mark?: SnapMarks;
|
|
1331
1346
|
}
|
|
1332
1347
|
/** A set of snap targets. */
|
|
1333
|
-
interface SnapSource<P = Point
|
|
1348
|
+
interface SnapSource<P = Point> {
|
|
1334
1349
|
id: string;
|
|
1335
1350
|
/** Default `'target'`. A fallback never displaces a target in reach. */
|
|
1336
1351
|
tier?: SnapTier;
|
|
@@ -1345,9 +1360,9 @@ interface SnapSource<P = Point$3> {
|
|
|
1345
1360
|
angles?(q: AngleCollect): Iterable<AngleCandidate>;
|
|
1346
1361
|
}
|
|
1347
1362
|
/** One mark, or several, for one candidate. */
|
|
1348
|
-
type SnapMarks<P = Point
|
|
1363
|
+
type SnapMarks<P = Point> = SnapMark<P> | readonly SnapMark<P>[];
|
|
1349
1364
|
/** What a session draws for a candidate the result meets. World coords. */
|
|
1350
|
-
type SnapMark<P = Point
|
|
1365
|
+
type SnapMark<P = Point> = {
|
|
1351
1366
|
kind: 'point';
|
|
1352
1367
|
at: P;
|
|
1353
1368
|
glyph: string;
|
|
@@ -1408,18 +1423,14 @@ interface SnapReadoutStyle {
|
|
|
1408
1423
|
lineWidth?: number;
|
|
1409
1424
|
}
|
|
1410
1425
|
|
|
1411
|
-
type Point$2 = {
|
|
1412
|
-
x: number;
|
|
1413
|
-
y: number;
|
|
1414
|
-
};
|
|
1415
1426
|
/** The marks of the snap in flight, for the readout to draw. */
|
|
1416
|
-
interface SnapOutcomeStore<P = Point
|
|
1427
|
+
interface SnapOutcomeStore<P = Point> {
|
|
1417
1428
|
get(): readonly SnapMark<P>[];
|
|
1418
1429
|
set(marks: readonly SnapMark<P>[]): void;
|
|
1419
1430
|
subscribe(listener: () => void): () => void;
|
|
1420
1431
|
}
|
|
1421
1432
|
/** An empty outcome store, which notifies only when the marks change. */
|
|
1422
|
-
declare function createSnapOutcomeStore<P = Point
|
|
1433
|
+
declare function createSnapOutcomeStore<P = Point>(): SnapOutcomeStore<P>;
|
|
1423
1434
|
|
|
1424
1435
|
/** The `snapReadout` dep: where marks go to be drawn. */
|
|
1425
1436
|
interface SnapReadoutDep {
|
|
@@ -1672,16 +1683,31 @@ interface GestureLifecycleOptions {
|
|
|
1672
1683
|
onGestureEnd?(committed: boolean): void;
|
|
1673
1684
|
}
|
|
1674
1685
|
|
|
1675
|
-
/**
|
|
1686
|
+
/** The pose a node is stored with before one pose-transform action, and the
|
|
1687
|
+
* pose the action moved it to. A resize whose data took a mirror commits that
|
|
1688
|
+
* pose with its box normalized. */
|
|
1689
|
+
interface PoseChange<TPose = unknown> {
|
|
1690
|
+
readonly from: TPose;
|
|
1691
|
+
readonly to: TPose;
|
|
1692
|
+
}
|
|
1693
|
+
/** Optional consumer seam: given a node and the transform that a pose-transform
|
|
1676
1694
|
* action applied to the node's POSE, return updated `data` with the node's
|
|
1677
|
-
* data-held geometry transformed
|
|
1678
|
-
* data-held geometry (the kit leaves `data` alone).
|
|
1679
|
-
|
|
1695
|
+
* data-held geometry transformed the same way, or `null` if this node has no
|
|
1696
|
+
* data-held geometry (the kit leaves `data` alone).
|
|
1697
|
+
*
|
|
1698
|
+
* `m` is that transform as a plane affine, in the node's stored frame and the
|
|
1699
|
+
* coordinates gesture points arrive in: world on a 2D canvas, screen under the
|
|
1700
|
+
* identity `clientToWorld` a camera-bearing host passes. A host whose poses
|
|
1701
|
+
* are not planar reads the transform from `change` instead, which carries the
|
|
1702
|
+
* stored pose before and after in the pose's own terms. For a flip of a pose
|
|
1703
|
+
* that is only a box, `change` holds the same box twice and only `m` says
|
|
1704
|
+
* which way the content mirrored. */
|
|
1705
|
+
interface GeometryProjection<TPose = unknown> {
|
|
1680
1706
|
transform(node: {
|
|
1681
1707
|
id?: string;
|
|
1682
1708
|
data: unknown;
|
|
1683
|
-
pose:
|
|
1684
|
-
}, m: Affine): unknown | null;
|
|
1709
|
+
pose: TPose;
|
|
1710
|
+
}, m: Affine, change: PoseChange<TPose>): unknown | null;
|
|
1685
1711
|
}
|
|
1686
1712
|
|
|
1687
1713
|
/** What a handle drag holds fixed: its direction from the anchor, or its length. */
|
|
@@ -1720,14 +1746,10 @@ interface PathForm {
|
|
|
1720
1746
|
readonly kind: string;
|
|
1721
1747
|
readonly [field: string]: unknown;
|
|
1722
1748
|
}
|
|
1723
|
-
type Point$1 = {
|
|
1724
|
-
x: number;
|
|
1725
|
-
y: number;
|
|
1726
|
-
};
|
|
1727
1749
|
/** The outline of an anchor's marker, in screen space: `size` px across at
|
|
1728
1750
|
* `at`, with the anchor's neighbors along its subpath, null past an open
|
|
1729
1751
|
* end. */
|
|
1730
|
-
type AnchorMarkerShape = (at: Point
|
|
1752
|
+
type AnchorMarkerShape = (at: Point, size: number, prev: Point | null, next: Point | null) => PolygonPath;
|
|
1731
1753
|
/** How path edit reads and writes one kind of {@link PathForm}. */
|
|
1732
1754
|
interface PathRepresentation {
|
|
1733
1755
|
/** The `kind` of the forms it reads. */
|
|
@@ -1756,7 +1778,7 @@ interface PathRepresentation {
|
|
|
1756
1778
|
* representation that has this takes every segment press, in place of
|
|
1757
1779
|
* Bend segment.
|
|
1758
1780
|
*/
|
|
1759
|
-
segmentPress?(deps: ActionDeps, at:
|
|
1781
|
+
segmentPress?(deps: ActionDeps, at: WorldPoint): (() => OngoingHandle) | null;
|
|
1760
1782
|
}
|
|
1761
1783
|
|
|
1762
1784
|
/**
|
|
@@ -1826,10 +1848,6 @@ interface PathEditPart {
|
|
|
1826
1848
|
};
|
|
1827
1849
|
};
|
|
1828
1850
|
}
|
|
1829
|
-
type Point = {
|
|
1830
|
-
x: number;
|
|
1831
|
-
y: number;
|
|
1832
|
-
};
|
|
1833
1851
|
/** An anchor or handle drag on the open path, as it starts. */
|
|
1834
1852
|
interface PathEditDragStart extends Omit<PathEditTarget, 'node'> {
|
|
1835
1853
|
/** The node's committed pose and data; null when it cannot be read. */
|
|
@@ -1867,7 +1885,7 @@ interface PathEditDrag {
|
|
|
1867
1885
|
/** For a handle drag, where the handle goes, given `to`: where the pointer
|
|
1868
1886
|
* and the locks in force put it. Extensions answer in turn, each from the
|
|
1869
1887
|
* last one's answer. */
|
|
1870
|
-
handle?(to:
|
|
1888
|
+
handle?(to: WorldPoint, move: PathEditHandleMove): WorldPoint;
|
|
1871
1889
|
/** A wheel turned while the drag is in flight. Return true to claim it;
|
|
1872
1890
|
* the drag then redoes its last move. */
|
|
1873
1891
|
wheel?(wheel: {
|
|
@@ -2138,6 +2156,10 @@ interface IngestCtx {
|
|
|
2138
2156
|
x: number;
|
|
2139
2157
|
y: number;
|
|
2140
2158
|
} | null;
|
|
2159
|
+
/** Every item the arrival carried, the ones other handlers took included:
|
|
2160
|
+
* a handler can tell that the string it was given rides beside a file.
|
|
2161
|
+
* Absent reads as the items the handler was handed. */
|
|
2162
|
+
items?: readonly IngestItem[];
|
|
2141
2163
|
/** Visible canvas area in world coordinates. */
|
|
2142
2164
|
viewportWorldRect(): {
|
|
2143
2165
|
x: number;
|
|
@@ -2201,7 +2223,8 @@ interface ContentHandlerEntry {
|
|
|
2201
2223
|
priority?: number;
|
|
2202
2224
|
handle(items: IngestItem[], ctx: IngestCtx): void | Promise<void>;
|
|
2203
2225
|
}
|
|
2204
|
-
/** Register a content handler. Returns a disposer that removes
|
|
2226
|
+
/** Register a content handler for every canvas on the page. Returns a disposer that removes
|
|
2227
|
+
* it. A handler for one canvas goes in that canvas's `ingestion.handlers` instead. */
|
|
2205
2228
|
declare function registerContentHandler(entry: ContentHandlerEntry): () => void;
|
|
2206
2229
|
|
|
2207
2230
|
/**
|
|
@@ -2270,6 +2293,11 @@ interface IngestionDep {
|
|
|
2270
2293
|
/** Clipboard-paste seam for the kit weasel-JSON handler.
|
|
2271
2294
|
* Live accessor, same caveat as `resolveSrc`. */
|
|
2272
2295
|
clipboard?: ClipboardIngestCtx;
|
|
2296
|
+
/** The canvas's own content handlers and the kit's it keeps (SceneCanvas's
|
|
2297
|
+
* `ingestion.handlers` and `ingestion.kitHandlers`). An arrival routes
|
|
2298
|
+
* through these and the page-wide registry's. Absent reads as none.
|
|
2299
|
+
* Live accessor, same caveat as `resolveSrc`. */
|
|
2300
|
+
handlers?: readonly ContentHandlerEntry[];
|
|
2273
2301
|
}
|
|
2274
2302
|
|
|
2275
2303
|
/** The gesture an insert's bounds came from, in the same coordinates: `bounds`
|
|
@@ -2348,6 +2376,20 @@ interface InsertLive {
|
|
|
2348
2376
|
gesture: unknown;
|
|
2349
2377
|
}
|
|
2350
2378
|
|
|
2379
|
+
/** A no with a reason: words for the user, shown beside the pointer while a drag is over what refuses it. */
|
|
2380
|
+
interface DropRefusal {
|
|
2381
|
+
refuse: string;
|
|
2382
|
+
}
|
|
2383
|
+
/**
|
|
2384
|
+
* The answer to "may this land here?": `true` lands, `false` is a silent no,
|
|
2385
|
+
* and a {@link DropRefusal} is a no the user is told about. A drag over a
|
|
2386
|
+
* refusal draws its target refused and the reason beside the pointer, and a
|
|
2387
|
+
* release there lands nothing.
|
|
2388
|
+
*/
|
|
2389
|
+
type DropVerdict = boolean | DropRefusal;
|
|
2390
|
+
/** The reason `verdict` gives, or `null` when it lands or says no silently. */
|
|
2391
|
+
declare function refusalOf(verdict: DropVerdict | undefined): string | null;
|
|
2392
|
+
|
|
2351
2393
|
/**
|
|
2352
2394
|
* Layout-strategy lookup by container id, consumed by `moveAction` to run
|
|
2353
2395
|
* the drag-time reflow pass. Sourced by `<SceneCanvas>` from the layout each
|
|
@@ -2364,19 +2406,23 @@ interface LayoutDep {
|
|
|
2364
2406
|
}
|
|
2365
2407
|
/**
|
|
2366
2408
|
* Whether the nodes `ids` may be dropped into the container `parent`. A move
|
|
2367
|
-
* consults it before reparenting anything
|
|
2368
|
-
*
|
|
2369
|
-
* layout drop treats a
|
|
2370
|
-
*
|
|
2409
|
+
* consults it before reparenting anything. Where it answers `false`,
|
|
2410
|
+
* reparent-on-drop passes over the container to the nearest one around it
|
|
2411
|
+
* that admits them, and the layout drop treats a layout container as if it
|
|
2412
|
+
* were not there. Where it answers a `DropRefusal`, a drag over the container
|
|
2413
|
+
* draws it refused with the reason beside the pointer, and a release there
|
|
2414
|
+
* moves nothing. Absent, every container takes any drop.
|
|
2371
2415
|
*/
|
|
2372
|
-
type CanDropIntoDep = (parent: string, ids: readonly string[]) =>
|
|
2416
|
+
type CanDropIntoDep = (parent: string, ids: readonly string[]) => DropVerdict;
|
|
2373
2417
|
|
|
2374
2418
|
/**
|
|
2375
2419
|
* The deps behind text editing, the clipboard, and Slice.
|
|
2376
2420
|
*/
|
|
2377
2421
|
|
|
2378
2422
|
/**
|
|
2379
|
-
* Dep for `enterTextEditAction`.
|
|
2423
|
+
* Dep for `enterTextEditAction`. `<SceneCanvas>` answers it with its own
|
|
2424
|
+
* editor (its `textEditor` prop); a host with an editor of its own, one
|
|
2425
|
+
* driving character controls, publishes it instead.
|
|
2380
2426
|
*
|
|
2381
2427
|
* Wrap the return value of `useTextEdit` / `useSceneTextEdit` to source this
|
|
2382
2428
|
* dep. The `isTextNode` predicate is optional — when absent the action fires
|
|
@@ -2413,10 +2459,7 @@ interface TextEditDep {
|
|
|
2413
2459
|
*/
|
|
2414
2460
|
interface ClipboardDep {
|
|
2415
2461
|
copy(): void;
|
|
2416
|
-
paste(at?:
|
|
2417
|
-
worldX: number;
|
|
2418
|
-
worldY: number;
|
|
2419
|
-
}): void;
|
|
2462
|
+
paste(at?: WorldPoint): void;
|
|
2420
2463
|
isEmpty(): boolean;
|
|
2421
2464
|
}
|
|
2422
2465
|
/**
|
|
@@ -2483,10 +2526,7 @@ type HitTestView = RegionPickView;
|
|
|
2483
2526
|
* `exclude`. Pass moving-node roots + their descendants when the caller
|
|
2484
2527
|
* wants to ignore the nodes it's manipulating.
|
|
2485
2528
|
*/
|
|
2486
|
-
type NodeAtPointDep = (point:
|
|
2487
|
-
x: number;
|
|
2488
|
-
y: number;
|
|
2489
|
-
}, exclude?: Iterable<NodeId>) => NodeId | null;
|
|
2529
|
+
type NodeAtPointDep = (point: WorldPoint, exclude?: Iterable<NodeId>) => NodeId | null;
|
|
2490
2530
|
/** What an area-selecting action needs: a way to ask what a region covers,
|
|
2491
2531
|
* and a way to read and replace the selection. */
|
|
2492
2532
|
interface AreaSelectDep {
|
|
@@ -2514,10 +2554,7 @@ interface LassoSelectDep {
|
|
|
2514
2554
|
* Optional — when absent, `lassoSelectAction` falls back to AABB via
|
|
2515
2555
|
* `hitTestArea`.
|
|
2516
2556
|
*/
|
|
2517
|
-
hitTestLasso?(polygon: ReadonlyArray<
|
|
2518
|
-
x: number;
|
|
2519
|
-
y: number;
|
|
2520
|
-
}>, mode: 'centers' | 'intersect' | 'enclosed', view?: HitTestView): string[];
|
|
2557
|
+
hitTestLasso?(polygon: ReadonlyArray<WorldPoint>, mode: 'centers' | 'intersect' | 'enclosed', view?: HitTestView): string[];
|
|
2521
2558
|
/** Return ids of nodes whose AABB overlaps the given rect (fallback). */
|
|
2522
2559
|
hitTestArea(bounds: {
|
|
2523
2560
|
x: number;
|
|
@@ -2550,32 +2587,20 @@ type InsertExtras = {
|
|
|
2550
2587
|
kind: 'ellipse';
|
|
2551
2588
|
} | {
|
|
2552
2589
|
kind: 'line';
|
|
2553
|
-
a:
|
|
2554
|
-
|
|
2555
|
-
y: number;
|
|
2556
|
-
};
|
|
2557
|
-
b: {
|
|
2558
|
-
x: number;
|
|
2559
|
-
y: number;
|
|
2560
|
-
};
|
|
2590
|
+
a: WorldPoint;
|
|
2591
|
+
b: WorldPoint;
|
|
2561
2592
|
} | {
|
|
2562
2593
|
kind: 'polygon';
|
|
2563
2594
|
sides: number;
|
|
2564
2595
|
rotation: number;
|
|
2565
|
-
center?:
|
|
2566
|
-
x: number;
|
|
2567
|
-
y: number;
|
|
2568
|
-
};
|
|
2596
|
+
center?: WorldPoint;
|
|
2569
2597
|
radius?: number;
|
|
2570
2598
|
} | {
|
|
2571
2599
|
kind: 'star';
|
|
2572
2600
|
points: number;
|
|
2573
2601
|
innerRadiusRatio: number;
|
|
2574
2602
|
rotation: number;
|
|
2575
|
-
center?:
|
|
2576
|
-
x: number;
|
|
2577
|
-
y: number;
|
|
2578
|
-
};
|
|
2603
|
+
center?: WorldPoint;
|
|
2579
2604
|
outerRadius?: number;
|
|
2580
2605
|
} | {
|
|
2581
2606
|
kind: 'pencil';
|
|
@@ -2792,9 +2817,10 @@ declare module '@weasel-js/routing' {
|
|
|
2792
2817
|
/**
|
|
2793
2818
|
* Optional consumer seam for the eager-sync layer: lets pose-transform
|
|
2794
2819
|
* actions (resize/move/nudge/flip — NOT rotate) ALSO rewrite a node's
|
|
2795
|
-
* data-held geometry. Given a node
|
|
2796
|
-
* `transform(node, m)` returns updated
|
|
2797
|
-
* `null` for nodes with no
|
|
2820
|
+
* data-held geometry. Given a node, the affine `m` applied to its pose,
|
|
2821
|
+
* and the pose change itself, `transform(node, m, change)` returns updated
|
|
2822
|
+
* `data` (geometry mapped the same way) or `null` for nodes with no
|
|
2823
|
+
* data-held geometry. A host whose poses are not planar reads `change`.
|
|
2798
2824
|
*
|
|
2799
2825
|
* Strictly opt-in: when absent (or when `transform` returns null), the kit
|
|
2800
2826
|
* emits only the pose op and leaves `data` untouched. Rotate intentionally
|
|
@@ -2821,4 +2847,4 @@ declare module '@weasel-js/routing' {
|
|
|
2821
2847
|
}
|
|
2822
2848
|
}
|
|
2823
2849
|
|
|
2824
|
-
export { type
|
|
2850
|
+
export { type SourceCandidate as $, type AnchorMarkerShape as A, type CreateOutlinesAdapter as B, type ContentHandlerEntry as C, type Dims as D, type EditAnchorsDep as E, type FitViewToBoundsOptions as F, type GestureLifecycleOptions as G, type HandleLocks as H, type InertiaConfig as I, type PaintKindEntry as J, type PathEditTarget as K, type LayerHit as L, type FinishedEditFrame as M, type PathSymmetryDep as N, type BooleanOpOptions as O, type PathEditMark as P, type BooleansAdapter as Q, type RenderLayer as R, type SnapSource as S, type TextOverflow as T, type BooleanOp as U, type ViewAnimationOptions as V, type PathPaint as W, type BooleanOpResult as X, type BooleanStrokes as Y, type SnapMods as Z, _resetPaintKindsForTests as _, type PathEditExtension as a, type PreviewPathsDep as a$, type SnapProbeAt as a0, type SnapCollect as a1, type SnapMark as a2, type SnapDep as a3, type SnapOutcome as a4, type SnapReadoutStyle as a5, type AngleCandidate as a6, type AngleCollect as a7, type AnimateToBoundsOptions as a8, type AreaSelectDep as a9, type LayerRetainPolicy as aA, type LayoutDep as aB, type Locus as aC, type MinSize as aD, type NodeAtPointDep as aE, type OutlinePathSpec as aF, PATH_OVERLAY_ROLES as aG, type PaintKind as aH, type PaintKindEditorProps as aI, type PaintKindFamily as aJ, type PaintKindLoader as aK, type PanBounds as aL, type PathEditDrag as aM, type PathEditDragStart as aN, type PathEditFinishCtx as aO, type PathEditHandleMove as aP, type PathEditMarksCtx as aQ, type PathEditOther as aR, type PathEditPart as aS, type PathEditStore as aT, type PathForm as aU, type PathOverlay as aV, type PathOverlayOptions as aW, type PathOverlayStyle as aX, type PathRepresentation as aY, type PathTransformFinishCtx as aZ, type PoseChange as a_, type BooleanOpPreview as aa, type BooleanPreviewPiece as ab, type CanDropIntoDep as ac, type ClipboardDep as ad, type ClipboardIngestCtx as ae, type CreateOutlinesResult as af, type CustomPaintContext as ag, DEFAULT_LAYER_RETAIN as ah, type DecayLoopConfig as ai, type DropRefusal as aj, type DropVerdict as ak, type FinishedPathEdit as al, GEOMETRY_BOUND_DATA as am, type HandleLock as an, type HitTestView as ao, type IngestCtx as ap, type IngestionDep as aq, type InsertDep as ar, type InsertEnds as as, type InsertExtras as at, type InsertIntoDep as au, type InsertLive as av, type LassoSelectDep as aw, type LayerCommandCache as ax, type LayerDrawFailure as ay, type LayerDrawSpan as az, type SnapGesture as b, type ResizePolicy as b0, STICKY_DEFAULTS as b1, type SnapBegin as b2, type SnapEdge as b3, type SnapEdges as b4, type SnapFrame as b5, type SnapMarks as b6, type SnapReadoutDep as b7, type SvgUnpacker as b8, type TextEditDep as b9, paintsLayer as bA, paletteInsertPaint as bB, pathPaintOf as bC, patternFamily as bD, previewBooleanOp as bE, refusalOf as bF, registerContentHandler as bG, registerPaintKind as bH, registerPaintKindLoader as bI, seedTile as bJ, stickyData as bK, stickyNodeFactory as bL, subscribeToSources as bM, switchGradientKind as bN, textBoxOf as bO, useDecayLoop as bP, useEnteredGroup as bQ, useViewAnimation as bR, useViewAnimationOn as bS, viewAxes as bT, withoutGeometryBoundData as bU, type TextNodeData as ba, type TransformPreviewNode as bb, type TransientPath as bc, VIEW_ANIMATION_KEY as bd, type ViewAnimationApi as be, type ViewApi as bf, type ViewChannel as bg, applyBooleanOp as bh, applyCreateOutlines as bi, asPaint as bj, createEnteredGroup as bk, createPathOverlay as bl, createSnapOutcomeStore as bm, depsUnchanged as bn, drawLayers as bo, drawOneLayer as bp, fitViewToBounds as bq, getPaintKind as br, isLayerPainted as bs, isLayerVisible as bt, listGradientKinds as bu, listPaintKinds as bv, minSizeOf as bw, paintKindOf as bx, paintKindRegistry as by, paintedLayers as bz, type SnapConstrain as c, type SnapResizeBox as d, type SnapGeometry as e, type SnapOutcomeStore as f, type SnapSession as g, type LayerDims as h, type ViewportDims as i, type RedrawSource as j, type EditAnchorsParams as k, type SliceDep as l, type StickyStyle as m, type EnteredGroupApi as n, type ChromeState as o, type LayerGroup as p, type TransformFollower as q, type GeometryProjection as r, type InsertNodeFactory as s, type InsertPaint as t, type SvgIngestOptions as u, type SceneCanvasSnap as v, type Affordance as w, type AffordanceRegion as x, type AffordanceBinding as y, type CommonAffordanceScratch as z };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { e as DebugFeature, a as DebugConfig } from './types-BN9hbdMI.js';
|
|
2
2
|
import { DispatchTrace, TraceRing } from '@weasel-js/routing';
|
|
3
|
-
import { S as Scene } from './types-
|
|
3
|
+
import { S as Scene } from './types-DW14eu9B.js';
|
|
4
4
|
import '@weasel-js/history';
|
|
5
|
-
import './types-
|
|
5
|
+
import './types-A_sNJYRd.js';
|
|
6
6
|
import '@weasel-js/geom';
|
|
7
7
|
import '@weasel-js/quantity';
|
|
8
8
|
import '@weasel-js/paint';
|
package/dist/devtools.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { DEVTOOLS_ENVELOPE, DEVTOOLS_PROTOCOL, DevtoolsActionEntry, DevtoolsArea, DevtoolsBinding, DevtoolsDepEntry, DevtoolsEnvelope, DevtoolsHistoryOp, DevtoolsHistoryRecord, DevtoolsHistorySlice, DevtoolsNodeDetail, DevtoolsNodeSummary, DevtoolsOverlays, DevtoolsRegistry, DevtoolsRequest, DevtoolsResult, DevtoolsRoot, DevtoolsRootInfo, DevtoolsRootSource, DevtoolsRootState, DevtoolsSchedule, DevtoolsToolEntry, DevtoolsTraceSlice, DevtoolsTransport, PageMessage, PageTransport, PanelMessage, PanelTransport, SerializeLimits, SerializedValue, WeaselDevtoolsHook, createDevtoolsHook, createDevtoolsRoot, createInPageTransports, createWindowPageTransport, createWindowPanelTransport, installDevtoolsHook, isDevtoolsEnvelope, serialize } from './devtools-protocol.js';
|
|
2
2
|
import './types-BN9hbdMI.js';
|
|
3
3
|
import '@weasel-js/routing';
|
|
4
|
-
import './types-
|
|
4
|
+
import './types-DW14eu9B.js';
|
|
5
5
|
import '@weasel-js/history';
|
|
6
|
-
import './types-
|
|
6
|
+
import './types-A_sNJYRd.js';
|
|
7
7
|
import '@weasel-js/geom';
|
|
8
8
|
import '@weasel-js/quantity';
|
|
9
9
|
import '@weasel-js/paint';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/
|
|
1
|
+
//#region src/domains/chrome-caps/buildChromeCtx.ts
|
|
2
2
|
/** Gather the current canvas state into the context that chrome-visibility
|
|
3
3
|
* rules are evaluated against. Rebuilt per frame. */
|
|
4
4
|
function buildChromeCtx(args) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildChromeCtx.js","names":[],"sources":["../../../src/domains/chrome-caps/buildChromeCtx.ts"],"sourcesContent":["/**\n * Pure assembler for {@link ChromeCtx}. Sources are passed as plain values\n * rather than the live objects they come from, which keeps `chrome-caps`\n * from depending on React or the dispatcher's concrete type.\n */\n\nimport type { NodeId } from '../../core/scene/types';\nimport type { ModifierState } from '../../interactions/gestures/types';\nimport type { View } from '../../core/viewport/view';\nimport type { ChromeCtx } from './types';\n\n/** The pieces of live canvas state a `ChromeCtx` is assembled from. */\nexport interface BuildChromeCtxArgs {\n focused: boolean;\n selection: readonly NodeId[];\n multiActive: boolean;\n modifiers: ModifierState;\n action: { kind: string | null; id: string | null };\n hover: NodeId | null;\n view: View;\n}\n\n/** Gather the current canvas state into the context that chrome-visibility\n * rules are evaluated against. Rebuilt per frame. */\nexport function buildChromeCtx(args: BuildChromeCtxArgs): ChromeCtx {\n return {\n focused: args.focused,\n selection: args.selection,\n multiActive: args.multiActive,\n modifiers: args.modifiers,\n action: args.action,\n hover: args.hover,\n view: args.view,\n };\n}\n"],"mappings":";;;AAwBA,SAAgB,eAAe,MAAqC;CAClE,OAAO;EACL,SAAS,KAAK;EACd,WAAW,KAAK;EAChB,aAAa,KAAK;EAClB,WAAW,KAAK;EAChB,QAAQ,KAAK;EACb,OAAO,KAAK;EACZ,MAAM,KAAK;CACb;AACF"}
|