@weasel-js/core 1.14.2 → 1.15.1
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 +251 -0
- package/dist/WeaselProvider.js +4 -5
- package/dist/affordances/composeAffordanceLayer.js +1 -2
- package/dist/affordances/cornerResize.js +4 -5
- package/dist/affordances/hitAffordanceRegions.js +1 -2
- package/dist/affordances/pathAnchors.js +1 -3
- package/dist/affordances/pathAnchors.js.map +1 -1
- package/dist/affordances/rotateCursor.js +1 -2
- package/dist/affordances/rotationHandle.js +2 -3
- package/dist/animation/behaviors/coast.js +1 -2
- package/dist/animation/behaviors/coastByWrite.js +2 -3
- package/dist/animation/behaviors/coastOnTargets.js +2 -3
- package/dist/animation/behaviors/momentum.js +1 -2
- package/dist/animation/clipTargets.js +1 -2
- package/dist/animation/departures.js +2 -3
- package/dist/animation/poseHelpers.js +2 -3
- package/dist/animation/poseTarget.js +2 -3
- package/dist/animation/poseTransition.js +1 -2
- package/dist/animation/reflow.js +2 -3
- package/dist/animation/rewind.js +1 -2
- package/dist/animation/rig/bindRig.js +2 -3
- package/dist/animation/rig/rigNode.js +1 -2
- package/dist/animation/rig/rigSeat.js +1 -2
- package/dist/animation/rig/skinBinding.js +1 -2
- package/dist/animation/rig/useRig.js +2 -3
- package/dist/animation/wrappers/animateLifecycle.js +1 -2
- package/dist/animation/wrappers/animateOnSetPose.js +1 -2
- package/dist/animation/wrappers/instantPose.js +1 -2
- package/dist/animation/writtenPoseTarget.js +1 -2
- package/dist/barrel/interactions.js +2 -1
- package/dist/barrel/paths.js +1 -1
- package/dist/barrel/renderer.js +2 -2
- package/dist/barrel/routing.js +6 -4
- package/dist/barrel/scene.js +2 -2
- package/dist/barrel/text.js +5 -3
- package/dist/canvas/Canvas.js +10 -7
- package/dist/canvas/Canvas.js.map +1 -1
- package/dist/canvas/CanvasView.js +6 -7
- package/dist/canvas/CursorCoordsHud.js +2 -3
- package/dist/canvas/DrawCanvas.js +8 -5
- package/dist/canvas/DrawCanvas.js.map +1 -1
- package/dist/canvas/GestureReason.js +1 -2
- package/dist/canvas/GestureReason.module.js +1 -2
- package/dist/canvas/LeanSceneCanvas.js +2 -3
- package/dist/canvas/ModalityHud.js +2 -3
- package/dist/canvas/NodeShape.js +3 -4
- package/dist/canvas/PickHud.js +2 -3
- package/dist/canvas/SceneCanvas/ActionsProviderIfRoot.js +1 -2
- package/dist/canvas/SceneCanvas/CanvasKitProviders.js +3 -4
- package/dist/canvas/SceneCanvas/DepRegistryProviderIfRoot.js +1 -2
- package/dist/canvas/SceneCanvas/DevHuds.js +1 -2
- package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js +1 -2
- package/dist/canvas/SceneCanvas/SceneCanvasInput.js +8 -5
- package/dist/canvas/SceneCanvas/SceneCanvasInput.js.map +1 -1
- package/dist/canvas/SceneCanvas/SurfaceDeclarations.js +1 -2
- package/dist/canvas/SceneCanvas/brushOverlay.js +1 -2
- package/dist/canvas/SceneCanvas/builtinToolSets.js +7 -5
- package/dist/canvas/SceneCanvas/builtinToolSets.js.map +1 -1
- package/dist/canvas/SceneCanvas/canvasPassThrough.js +1 -2
- package/dist/canvas/SceneCanvas/contributionFrameHooks.js +1 -2
- package/dist/canvas/SceneCanvas/coordTrace.js +1 -2
- package/dist/canvas/SceneCanvas/defaultNodeProperties.js +4 -5
- package/dist/canvas/SceneCanvas/defaultNodeRouting.js +1 -2
- package/dist/canvas/SceneCanvas/defaultTextEditor.js +4 -5
- package/dist/canvas/SceneCanvas/describePresets.js +1 -2
- package/dist/canvas/SceneCanvas/dispatcherGestureBounds.js +1 -2
- package/dist/canvas/SceneCanvas/features.js +1 -2
- package/dist/canvas/SceneCanvas/insertPreviewCommands.js +1 -2
- package/dist/canvas/SceneCanvas/mergeLayers.js +1 -2
- package/dist/canvas/SceneCanvas/namedPresets.js +5 -6
- package/dist/canvas/SceneCanvas/poseGeometry.js +1 -2
- package/dist/canvas/SceneCanvas/poseRegistrars.js +1 -2
- package/dist/canvas/SceneCanvas/presets/arrange.js +2 -3
- package/dist/canvas/SceneCanvas/presets/baseline.js +1 -2
- package/dist/canvas/SceneCanvas/presets/chrome.js +1 -2
- package/dist/canvas/SceneCanvas/presets/composites.js +1 -2
- package/dist/canvas/SceneCanvas/presets/edit.js +4 -5
- package/dist/canvas/SceneCanvas/presets/ingest.js +1 -2
- package/dist/canvas/SceneCanvas/presets/paths.js +9 -10
- package/dist/canvas/SceneCanvas/presets/paths.js.map +1 -1
- package/dist/canvas/SceneCanvas/presets/select.js +1 -2
- package/dist/canvas/SceneCanvas/presets/toolDriven.js +2 -3
- package/dist/canvas/SceneCanvas/presets/tools.js +1 -2
- package/dist/canvas/SceneCanvas/presets/transform.js +2 -3
- package/dist/canvas/SceneCanvas/presets/view.js +2 -3
- package/dist/canvas/SceneCanvas/props.js +1 -2
- package/dist/canvas/SceneCanvas/scenePointQuery.js +2 -3
- package/dist/canvas/SceneCanvas/shapeGeneratorProperties.js +2 -3
- package/dist/canvas/SceneCanvas/shapeGeneratorProperties.js.map +1 -1
- package/dist/canvas/SceneCanvas/toolRegistry.js +2 -3
- package/dist/canvas/SceneCanvas/useActionTunings.js +1 -2
- package/dist/canvas/SceneCanvas/useActionsPropResolver.js +1 -2
- package/dist/canvas/SceneCanvas/useBakedScene.js +2 -3
- package/dist/canvas/SceneCanvas/useBuiltinShapeTools.js +7 -8
- package/dist/canvas/SceneCanvas/useBuiltinTools.js +3 -2
- package/dist/canvas/SceneCanvas/useBuiltinTools.js.map +1 -1
- package/dist/canvas/SceneCanvas/useCanvasCamera.js +2 -3
- package/dist/canvas/SceneCanvas/useCanvasDevtoolsRoot.js +1 -2
- package/dist/canvas/SceneCanvas/useCanvasDispatcher.js +1 -2
- package/dist/canvas/SceneCanvas/useCanvasSelection.js +8 -6
- package/dist/canvas/SceneCanvas/useCanvasSelection.js.map +1 -1
- package/dist/canvas/SceneCanvas/useCanvasTools.js +2 -3
- package/dist/canvas/SceneCanvas/useChromeAffordances.js +2 -3
- package/dist/canvas/SceneCanvas/useContributionRoles.js +3 -2
- package/dist/canvas/SceneCanvas/useContributionRoles.js.map +1 -1
- package/dist/canvas/SceneCanvas/useDepartureGhostLayer.js +4 -5
- package/dist/canvas/SceneCanvas/useDispatcherOverlayLayer.js +2 -3
- package/dist/canvas/SceneCanvas/useHeldModifiers.js +1 -2
- package/dist/canvas/SceneCanvas/useMagnificationCheck.js +41 -0
- package/dist/canvas/SceneCanvas/useMagnificationCheck.js.map +1 -0
- package/dist/canvas/SceneCanvas/useNodeAtPoint.js +1 -2
- package/dist/canvas/SceneCanvas/useNodeKinds.js +2 -3
- package/dist/canvas/SceneCanvas/usePreviewGhostLayer.js +10 -11
- package/dist/canvas/SceneCanvas/useSceneCanvasHandle.js +1 -2
- package/dist/canvas/SceneCanvas/useSceneCanvasLayers.js +6 -7
- package/dist/canvas/SceneCanvas/useSceneCanvasPathEdit.js +1 -2
- package/dist/canvas/SceneCanvas/useSceneCanvasTools.js +1 -2
- package/dist/canvas/SceneCanvas/useSceneChrome.js +22 -11
- package/dist/canvas/SceneCanvas/useSceneChrome.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneGestureDispatcher.js +6 -7
- package/dist/canvas/SceneCanvas/useScenePicking.js +5 -6
- package/dist/canvas/SceneCanvas/useSceneRedrawSources.js +1 -2
- package/dist/canvas/SceneCanvas/useSceneSelectTool.js +7 -8
- package/dist/canvas/SceneCanvas/useSceneSlotLayers.js +2 -3
- package/dist/canvas/SceneCanvas/useSceneStandardActions.js +28 -17
- package/dist/canvas/SceneCanvas/useSceneStandardActions.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSelectionOverlayLayer.js +2 -3
- package/dist/canvas/SceneCanvas/useSurfaceRouting.js +1 -2
- package/dist/canvas/SceneCanvas/useSurfaceViewInputs.js +1 -2
- package/dist/canvas/SceneCanvas/useToolKeybindings.js +1 -2
- package/dist/canvas/SceneCanvas/useViewportActions.js +3 -4
- package/dist/canvas/SceneCanvas/worldPointAt.js +1 -2
- package/dist/canvas/SceneCanvas.js +22 -20
- package/dist/canvas/SceneCanvas.js.map +1 -1
- package/dist/canvas/SceneViewCanvas.js +7 -4
- package/dist/canvas/SceneViewCanvas.js.map +1 -1
- package/dist/canvas/SurfaceCanvas.js +1 -2
- package/dist/canvas/ViewMarker.js +1 -2
- package/dist/canvas/accentColor.js +1 -2
- package/dist/canvas/adapterDerivedPath.js +2 -3
- package/dist/canvas/adapterPickSource.js +1 -2
- package/dist/canvas/affordanceAt.js +2 -4
- package/dist/canvas/affordanceAt.js.map +1 -1
- package/dist/canvas/buildSceneLayer.js +4 -5
- package/dist/canvas/buildSceneTree.js +4 -5
- package/dist/canvas/canvasRenderer.js +1 -2
- package/dist/canvas/colorOverrides.js +1 -2
- package/dist/canvas/contextAttributes.js +1 -2
- package/dist/canvas/copiesAbove.js +1 -2
- package/dist/canvas/defaultDrawOne.js +1 -2
- package/dist/canvas/deps/areaSelect.js +5 -3
- package/dist/canvas/deps/areaSelect.js.map +1 -1
- package/dist/canvas/deps/booleans.js +5 -6
- package/dist/canvas/deps/changes.js +1 -2
- package/dist/canvas/deps/chromeRules.js +36 -0
- package/dist/canvas/deps/chromeRules.js.map +1 -0
- package/dist/canvas/deps/debug.js +1 -2
- package/dist/canvas/deps/dispatchSources.js +1 -2
- package/dist/canvas/deps/dispatcher.js +1 -2
- package/dist/canvas/deps/editAnchors.js +3 -10
- package/dist/canvas/deps/editAnchors.js.map +1 -1
- package/dist/canvas/deps/enteredGroup.js +1 -2
- package/dist/canvas/deps/geometryProjection.js +1 -2
- package/dist/canvas/deps/hitTestArea.js +6 -5
- package/dist/canvas/deps/hitTestArea.js.map +1 -1
- package/dist/canvas/deps/ingestion.js +1 -2
- package/dist/canvas/deps/insert.js +3 -4
- package/dist/canvas/deps/insertSite.js +3 -4
- package/dist/canvas/deps/kitSettings.js +1 -2
- package/dist/canvas/deps/lassoSelect.js +5 -3
- package/dist/canvas/deps/lassoSelect.js.map +1 -1
- package/dist/canvas/deps/layout.js +1 -2
- package/dist/canvas/deps/modeDefaultTool.js +22 -0
- package/dist/canvas/deps/modeDefaultTool.js.map +1 -0
- package/dist/canvas/deps/nodeAtPoint.js +1 -2
- package/dist/canvas/deps/pathEditCommits.js +3 -4
- package/dist/canvas/deps/pathLeaf.js +1 -2
- package/dist/canvas/deps/pathLeafDeps.js +2 -3
- package/dist/canvas/deps/poseDescriptor.js +1 -2
- package/dist/canvas/deps/previewPaths.js +1 -2
- package/dist/canvas/deps/resizePolicy.js +1 -2
- package/dist/canvas/deps/selectionSnapshot.js +22 -0
- package/dist/canvas/deps/selectionSnapshot.js.map +1 -0
- package/dist/canvas/deps/slice.js +5 -6
- package/dist/canvas/deps/snap.js +4 -4
- package/dist/canvas/deps/snap.js.map +1 -1
- package/dist/canvas/deps/surface.js +1 -2
- package/dist/canvas/deps/textEdit.js +1 -2
- package/dist/canvas/deps/transformFollowers.js +1 -2
- package/dist/canvas/deps/view.js +1 -2
- package/dist/canvas/derivedPath.js +6 -7
- package/dist/canvas/doubleClickTarget.js +1 -2
- package/dist/canvas/drawEnvelope.js +1 -2
- package/dist/canvas/drawnBounds.js +4 -5
- package/dist/canvas/getNodeAtPoint.js +1 -2
- package/dist/canvas/hostAnchor.js +1 -2
- package/dist/canvas/hud.module.js +1 -2
- package/dist/canvas/inheritedPaints.js +1 -2
- package/dist/canvas/insertPreviewExtent.js +1 -2
- package/dist/canvas/kitRequirements.js +1 -2
- package/dist/canvas/layerHover.js +1 -2
- package/dist/canvas/layerOrder.js +1 -2
- package/dist/canvas/layerSlots.js +1 -2
- package/dist/canvas/mountedCanvases.js +1 -2
- package/dist/canvas/nodeShapes/derivedPainter.js +2 -3
- package/dist/canvas/nodeShapes/imagePainter.js +1 -2
- package/dist/canvas/nodeShapes/measurePainter.js +2 -3
- package/dist/canvas/nodeShapes/memo.js +1 -2
- package/dist/canvas/nodeShapes/nodePaint.js +1 -2
- package/dist/canvas/nodeShapes/pathPainter.js +3 -4
- package/dist/canvas/nodeShapes/poseBox.js +1 -2
- package/dist/canvas/nodeShapes/rectFallbackPainter.js +1 -2
- package/dist/canvas/nodeShapes/shapePainter.js +2 -3
- package/dist/canvas/nodeShapes/strokedBounds.js +1 -2
- package/dist/canvas/nodeShapes/textPainter.js +1 -2
- package/dist/canvas/overChildren.js +1 -2
- package/dist/canvas/overlayRoleStrokes.js +1 -2
- package/dist/canvas/ownClip.js +1 -2
- package/dist/canvas/paintCull.js +1 -2
- package/dist/canvas/paintedCursorLayer.js +1 -2
- package/dist/canvas/pathOverlay.js +1 -2
- package/dist/canvas/pickIndex/nodeBroadBox.js +3 -4
- package/dist/canvas/pickIndex/scenePickIndex.js +3 -4
- package/dist/canvas/pickReach.js +13 -10
- package/dist/canvas/pickReach.js.map +1 -1
- package/dist/canvas/pickWalk.js +9 -8
- package/dist/canvas/pickWalk.js.map +1 -1
- package/dist/canvas/planeClips.js +1 -2
- package/dist/canvas/poseRotation.js +1 -2
- package/dist/canvas/publishPreviews.js +1 -2
- package/dist/canvas/rasterReadback.js +1 -2
- package/dist/canvas/rasterToPng.js +1 -2
- package/dist/canvas/renderDebugSnapshot.js +1 -2
- package/dist/canvas/renderNeeds.js +1 -2
- package/dist/canvas/renderSceneToPixels.js +5 -6
- package/dist/canvas/sceneAdapter.js +37 -27
- package/dist/canvas/sceneAdapter.js.map +1 -1
- package/dist/canvas/sceneClipboard.js +19 -7
- package/dist/canvas/sceneClipboard.js.map +1 -1
- package/dist/canvas/sceneLayerPaint.js +1 -2
- package/dist/canvas/scenePickReads.js +1 -2
- package/dist/canvas/scenePickSource.js +7 -8
- package/dist/canvas/scenePickSource.js.map +1 -1
- package/dist/canvas/sceneSlotWiring.js +2 -3
- package/dist/canvas/sceneViewRender.js +5 -6
- package/dist/canvas/shownNodes.js +1 -2
- package/dist/canvas/slopsDebugLayer.js +1 -2
- package/dist/canvas/surfaceContribution.js +1 -2
- package/dist/canvas/useCanvasElements.js +1 -2
- package/dist/canvas/useCanvasHandle.js +1 -2
- package/dist/canvas/useCanvasPaint.js +2 -3
- package/dist/canvas/useCanvasRenderer.js +1 -2
- package/dist/canvas/useCanvasSurface.js +22 -5
- package/dist/canvas/useCanvasSurface.js.map +1 -1
- package/dist/canvas/useCanvasView.js +2 -3
- package/dist/canvas/useClientToWorld.js +1 -2
- package/dist/canvas/useExtraLayers.js +1 -2
- package/dist/canvas/useFrameLoop.js +7 -9
- package/dist/canvas/useFrameLoop.js.map +1 -1
- package/dist/canvas/useHitObserver.js +1 -2
- package/dist/canvas/useHostAnchor.js +1 -2
- package/dist/canvas/useInFlightBounds.js +6 -6
- package/dist/canvas/useInFlightBounds.js.map +1 -1
- package/dist/canvas/useLateContentRedraw.js +1 -2
- package/dist/canvas/useLayerStack.js +2 -3
- package/dist/canvas/usePaintedCursor.js +1 -2
- package/dist/canvas/useRedrawOn.js +1 -2
- package/dist/canvas/useSceneAdapter.js +1 -2
- package/dist/canvas/useSceneLayerList.js +1 -2
- package/dist/canvas/useSurfaceInput.js +1 -2
- package/dist/canvas/useSurfaceSize.js +5 -5
- package/dist/canvas/useSurfaceSize.js.map +1 -1
- package/dist/canvas/useToolCursor.js +1 -2
- package/dist/canvas/useViewAim.js +2 -3
- package/dist/canvas/useViewHelpers.js +5 -4
- package/dist/canvas/useViewHelpers.js.map +1 -1
- package/dist/canvas/useViewLayerGate.js +1 -2
- package/dist/canvas/useViewNesting.js +1 -2
- package/dist/canvas/useViewRegistrySurface.js +1 -2
- package/dist/canvas/viewInputs.js +1 -2
- package/dist/canvas/viewMarkers.js +1 -2
- package/dist/canvas/viewRegistry.js +1 -2
- package/dist/canvas/viewSnap.js +1 -2
- package/dist/canvas/watchElementMove.js +1 -2
- package/dist/canvas/wrapNodeOutput.js +1 -2
- package/dist/core/adapters/testing/rootsTree.js +1 -2
- package/dist/core/applyOps.js +1 -2
- package/dist/core/device/targets.js +1 -2
- package/dist/core/device/useDeviceProfile.js +1 -2
- package/dist/core/device/useTargetBasePx.js +1 -2
- package/dist/core/device/watchDevicePixelRatio.js +1 -2
- package/dist/core/geometry/autoPoseDescriptor.js +2 -3
- package/dist/core/geometry/booleanOfPaths.js +1 -2
- package/dist/core/geometry/inkExtents.js +1 -2
- package/dist/core/geometry/pathPoseDescriptor.js +1 -2
- package/dist/core/geometry/poseDescriptor.js +1 -2
- package/dist/core/geometry/regionHit.js +36 -18
- package/dist/core/geometry/regionHit.js.map +1 -1
- package/dist/core/geometry/targetFrame.js +1 -2
- package/dist/core/geometry/unionBounds.js +1 -2
- package/dist/core/layers/backgroundFill.js +1 -2
- package/dist/core/layers/children.js +1 -2
- package/dist/core/layers/gateLayer.js +1 -2
- package/dist/core/layers/layerGroup.js +1 -2
- package/dist/core/layers/redrawSource.js +1 -2
- package/dist/core/layers/render.js +1 -2
- package/dist/core/layers/retain.js +1 -2
- package/dist/core/ops/arrange.js +1 -2
- package/dist/core/ops/create.js +2 -3
- package/dist/core/ops/createHistory.js +2 -3
- package/dist/core/ops/delete.js +2 -3
- package/dist/core/ops/nodeFlags.js +1 -2
- package/dist/core/ops/registry.js +1 -2
- package/dist/core/ops/reorder/algorithms.js +1 -2
- package/dist/core/ops/reorder/index.js +1 -2
- package/dist/core/ops/reorder/setChildOrder.js +1 -2
- package/dist/core/ops/reparent.js +1 -2
- package/dist/core/ops/select.js +1 -2
- package/dist/core/ops/setData.js +1 -2
- package/dist/core/ops/setDependsOn.js +1 -2
- package/dist/core/ops/setLayer.js +1 -2
- package/dist/core/ops/setLayout.js +1 -2
- package/dist/core/ops/setPath.js +1 -2
- package/dist/core/ops/setText.js +1 -2
- package/dist/core/ops/slot.js +1 -2
- package/dist/core/ops/transform.js +1 -2
- package/dist/core/ops/writtenBy.js +1 -2
- package/dist/core/pages/fitViewToPage.js +1 -2
- package/dist/core/pages/pageEdits.js +3 -4
- package/dist/core/pages/pages.js +1 -2
- package/dist/core/pages/pages.js.map +1 -1
- package/dist/core/pages/pagesLayer.js +1 -2
- package/dist/core/paint/meshKind.js +1 -2
- package/dist/core/paint/meshKindLazy.js +9 -18
- package/dist/core/paint/meshKindLazy.js.map +1 -1
- package/dist/core/paint/paintKindEntry.js +1 -2
- package/dist/core/paint/paintKinds.js +1 -2
- package/dist/core/paint/registerMesh.js +1 -2
- package/dist/core/scene/NodeProperties.js +1 -2
- package/dist/core/scene/NodeRouting.js +1 -2
- package/dist/core/scene/annotation.js +1 -2
- package/dist/core/scene/appliedLog.js +1 -2
- package/dist/core/scene/arrivalWindow.js +2 -3
- package/dist/core/scene/arrivals.js +1 -2
- package/dist/core/scene/booleanGroup.js +1 -2
- package/dist/core/scene/booleanOfChildren.js +1 -2
- package/dist/core/scene/boundOps.js +1 -2
- package/dist/core/scene/carryDescendants.js +2 -3
- package/dist/core/scene/clipNothing.js +1 -2
- package/dist/core/scene/composeFrame.js +1 -2
- package/dist/core/scene/composePose.js +1 -2
- package/dist/core/scene/declaredFieldSetters.js +1 -2
- package/dist/core/scene/depFrame.js +1 -2
- package/dist/core/scene/depMemo.js +1 -2
- package/dist/core/scene/dependents.js +1 -2
- package/dist/core/scene/derivedParts.js +1 -2
- package/dist/core/scene/derivedPath.js +2 -3
- package/dist/core/scene/docValues.js +1 -2
- package/dist/core/scene/documentOf.js +1 -2
- package/dist/core/scene/editMode.js +5 -3
- package/dist/core/scene/editMode.js.map +1 -1
- package/dist/core/scene/editPass.js +1 -2
- package/dist/core/scene/effectivePose.js +3 -4
- package/dist/core/scene/fieldEdits.js +1 -2
- package/dist/core/scene/fontReads.js +1 -2
- package/dist/core/scene/historyFacade.js +8 -52
- package/dist/core/scene/historyFacade.js.map +1 -1
- package/dist/core/scene/historyForm.js +1 -2
- package/dist/core/scene/inheritedPaint.js +1 -2
- package/dist/core/scene/kitOps.js +16 -15
- package/dist/core/scene/kitOps.js.map +1 -1
- package/dist/core/scene/kitRegistry.js +2 -3
- package/dist/core/scene/layerOps.js +1 -2
- package/dist/core/scene/layerStack.js +1 -2
- package/dist/core/scene/layoutPass.js +4 -5
- package/dist/core/scene/lockGuard.js +1 -2
- package/dist/core/scene/minSize.js +1 -2
- package/dist/core/scene/nestedHit.js +1 -2
- package/dist/core/scene/nodeAsShown.js +1 -2
- package/dist/core/scene/nodeFlags.js +1 -2
- package/dist/core/scene/nodeFnFields.js +1 -2
- package/dist/core/scene/nodeGates.js +3 -4
- package/dist/core/scene/nodeGates.js.map +1 -1
- package/dist/core/scene/nodeMemo.js +1 -2
- package/dist/core/scene/nodeStore.js +2 -3
- package/dist/core/scene/notifier.js +1 -2
- package/dist/core/scene/opTable.js +9 -10
- package/dist/core/scene/opTable.js.map +1 -1
- package/dist/core/scene/outerOps.js +3 -4
- package/dist/core/scene/outerOps.js.map +1 -1
- package/dist/core/scene/pathEffects/blend.js +1 -2
- package/dist/core/scene/pathEffects/derive.js +2 -3
- package/dist/core/scene/pathEffects/effects.js +1 -2
- package/dist/core/scene/pathEffects/foundHidden.js +1 -2
- package/dist/core/scene/pathEffects/textAlong.js +1 -2
- package/dist/core/scene/pathEffects/textAlongBands.js +1 -2
- package/dist/core/scene/plyStacks.js +1 -2
- package/dist/core/scene/poseFeed.js +1 -2
- package/dist/core/scene/poseHold.js +1 -2
- package/dist/core/scene/poseOverrides.js +1 -2
- package/dist/core/scene/posePlies.js +1 -2
- package/dist/core/scene/poseRemovals.js +1 -2
- package/dist/core/scene/poseSnapshot.js +1 -2
- package/dist/core/scene/poseWrites.js +17 -17
- package/dist/core/scene/poseWrites.js.map +1 -1
- package/dist/core/scene/reconcileSpecs.js +26 -3
- package/dist/core/scene/reconcileSpecs.js.map +1 -1
- package/dist/core/scene/recorder.js +1 -2
- package/dist/core/scene/renderOrder.js +1 -2
- package/dist/core/scene/sameValue.js +1 -2
- package/dist/core/scene/scene.js +11 -12
- package/dist/core/scene/scene.js.map +1 -1
- package/dist/core/scene/sceneChanges.js +1 -2
- package/dist/core/scene/sceneEdits.js +1 -2
- package/dist/core/scene/sceneJournals.js +77 -0
- package/dist/core/scene/sceneJournals.js.map +1 -0
- package/dist/core/scene/sceneMutators.js +2 -3
- package/dist/core/scene/scenePoseAdapter.js +1 -2
- package/dist/core/scene/sceneRecording.js +4 -4
- package/dist/core/scene/sceneRecording.js.map +1 -1
- package/dist/core/scene/sceneSelection.js +8 -5
- package/dist/core/scene/sceneSelection.js.map +1 -1
- package/dist/core/scene/sceneState.js +3 -4
- package/dist/core/scene/scrollOffsets.js +1 -2
- package/dist/core/scene/serialization.js +2 -3
- package/dist/core/scene/staleReplay.js +1 -2
- package/dist/core/scene/statedFields.js +1 -2
- package/dist/core/scene/strategyView.js +1 -2
- package/dist/core/scene/treeEdits.js +2 -3
- package/dist/core/scene/treeOrder.js +1 -2
- package/dist/core/scene/treeReads.js +1 -2
- package/dist/core/scene/treeShape.js +1 -2
- package/dist/core/scene/types.js +1 -2
- package/dist/core/scene/types.js.map +1 -1
- package/dist/core/scene/unionOfChildren.js +1 -2
- package/dist/core/scene/unitScopes.js +20 -4
- package/dist/core/scene/unitScopes.js.map +1 -1
- package/dist/core/scene/useScene.js +2 -3
- package/dist/core/scene/worldSave.js +2 -3
- package/dist/core/selection/chromeState.js +1 -2
- package/dist/core/selection/outermostSelection.js +56 -0
- package/dist/core/selection/outermostSelection.js.map +1 -0
- package/dist/core/selection/readOnlySelection.js +1 -2
- package/dist/core/selection/selectionTarget.js +1 -2
- package/dist/core/selection/usePublishSceneSelection.js +1 -2
- package/dist/core/selection/useSelection.js +1 -2
- package/dist/core/shapeKinds.js +1 -2
- package/dist/core/stableStringify.js +1 -2
- package/dist/core/stylus/stylus.js +1 -2
- package/dist/core/stylus/usePointerStylus.js +1 -2
- package/dist/core/usePaintKinds.js +1 -2
- package/dist/core/viewport/clampView.js +1 -2
- package/dist/core/viewport/clientToWorld.js +1 -2
- package/dist/core/viewport/createVelocityTracker.js +1 -2
- package/dist/core/viewport/fitToBounds.js +1 -2
- package/dist/core/viewport/fitViewToBounds.js +1 -2
- package/dist/core/viewport/interpolateView.js +1 -2
- package/dist/core/viewport/parallax.js +1 -2
- package/dist/core/viewport/sceneNodeClientRect.js +1 -2
- package/dist/core/viewport/screenSlop.js +1 -2
- package/dist/core/viewport/useAutoCenter.js +1 -2
- package/dist/core/viewport/useCanvasSize.js +48 -28
- package/dist/core/viewport/useCanvasSize.js.map +1 -1
- package/dist/core/viewport/useDecayLoop.js +1 -2
- package/dist/core/viewport/useNodeOverlayFrame.js +1 -2
- package/dist/core/viewport/useVelocityTracker.js +1 -2
- package/dist/core/viewport/useViewAnimation.js +3 -4
- package/dist/core/viewport/view.js +1 -2
- package/dist/core/viewport/viewTransform.js +1 -2
- package/dist/core/viewport/viewportWorldRect.js +1 -2
- package/dist/core/viewport/wheelHandler.js +1 -2
- package/dist/core/viewport/zoomAt.js +2 -3
- package/dist/core/viewport/zoomBounds.js +1 -2
- package/dist/debug/createDebugOverlayLayer.js +1 -2
- package/dist/debug/createDebugSink.js +1 -2
- package/dist/debug/defaultTheme.js +1 -2
- package/dist/debug/features.js +1 -2
- package/dist/debug/frameStats.js +1 -2
- package/dist/debug/overlayPanels.js +1 -2
- package/dist/debug/parseDebugFlags.js +1 -2
- package/dist/debug/useDebugSink.js +2 -3
- package/dist/{depSchema-DD9H89gX.d.ts → depSchema-C7a_OMt-.d.ts} +101 -65
- package/dist/devtools/handlers.js +1 -2
- package/dist/devtools/history.js +1 -2
- package/dist/devtools/hook.js +1 -2
- package/dist/devtools/label.js +1 -2
- package/dist/devtools/notices.js +1 -2
- package/dist/devtools/protocol.js +1 -2
- package/dist/devtools/registry.js +1 -2
- package/dist/devtools/root.js +1 -2
- package/dist/devtools/serialize.js +1 -2
- package/dist/devtools/session.js +2 -3
- package/dist/devtools/transport.js +1 -2
- package/dist/devtools/useDevtoolsRoot.js +1 -2
- package/dist/devtools-protocol.d.ts +1 -1
- package/dist/devtools-protocol.js +2 -2
- package/dist/devtools.d.ts +1 -1
- package/dist/devtools.js +1 -2
- package/dist/domains/chrome-caps/buildChromeCtx.js +1 -2
- package/dist/domains/chrome-caps/conditions.js +1 -2
- package/dist/domains/chrome-caps/defaults.js +1 -2
- package/dist/domains/chrome-caps/resolve.js +3 -3
- package/dist/domains/chrome-caps/resolve.js.map +1 -1
- package/dist/domains/chrome-caps/useChromeCaps.js +5 -4
- package/dist/domains/chrome-caps/useChromeCaps.js.map +1 -1
- package/dist/domains/chrome-caps/useHoverTracking.js +1 -2
- package/dist/domains/ingestion/contentHandlers.js +1 -2
- package/dist/domains/ingestion/ghost.js +2 -3
- package/dist/domains/ingestion/imageHandler.js +1 -2
- package/dist/domains/ingestion/kitHandlers.js +2 -3
- package/dist/domains/ingestion/openFilePicker.js +1 -2
- package/dist/domains/ingestion/placement.js +1 -2
- package/dist/domains/ingestion/svgHandler.js +1 -2
- package/dist/domains/ingestion/textHandler.js +1 -2
- package/dist/domains/ingestion/useCanvasIngestion.js +1 -2
- package/dist/domains/ingestion/weaselJsonHandler.js +2 -3
- package/dist/domains/longPress/longPressFeedback.js +1 -2
- package/dist/domains/measure/actionIds.js +1 -2
- package/dist/domains/measure/measureCommands.js +6 -7
- package/dist/domains/measure/measureContribution.js +3 -4
- package/dist/domains/measure/measureEdits.js +3 -4
- package/dist/domains/measure/measureGestures.js +2 -3
- package/dist/domains/measure/measureHit.js +3 -4
- package/dist/domains/measure/measureLayer.js +3 -4
- package/dist/domains/measure/measurement.js +1 -2
- package/dist/domains/measure/measurements.js +1 -2
- package/dist/domains/modes/modeLayers.js +1 -2
- package/dist/domains/modes/modeTriggers.js +1 -2
- package/dist/domains/pathEffects/effectSources.js +2 -3
- package/dist/domains/pathEffects/index.js +1 -2
- package/dist/domains/pathEffects/readSource.js +3 -4
- package/dist/domains/pathEffects/textItems.js +1 -2
- package/dist/domains/pathEffects/useEffectSourcesLayer.js +3 -4
- package/dist/domains/paths/anchorData.js +1 -2
- package/dist/domains/paths/anchorMarkers.js +1 -2
- package/dist/domains/paths/editablePath.js +3 -4
- package/dist/domains/paths/originProjection.js +1 -2
- package/dist/domains/paths/pathEditExtension.js +1 -2
- package/dist/domains/paths/pathEditState.js +1 -26
- package/dist/domains/paths/pathEditState.js.map +1 -1
- package/dist/domains/paths/pathEditingOverlayLayer.js +2 -3
- package/dist/domains/paths/pathLayer.js +1 -2
- package/dist/domains/paths/pathRepresentation.js +1 -2
- package/dist/domains/paths/pathSnap/glyphs.js +1 -2
- package/dist/domains/paths/pathSnap/pathSnapSource.js +1 -2
- package/dist/domains/paths/pathSnap/sceneIndex.js +1 -2
- package/dist/domains/paths/pathSnap/snapGeometry.js +2 -3
- package/dist/domains/paths/penPreviewLayer.js +1 -2
- package/dist/domains/paths/shapeGenerator.js +1 -2
- package/dist/domains/paths/strokeOutline.js +2 -3
- package/dist/domains/paths/useAnchorFields.js +1 -2
- package/dist/domains/paths/usePathEdit.js +2 -3
- package/dist/domains/poseRun/usePoseRun.js +1 -2
- package/dist/domains/selection/enteredGroupFrame.js +1 -2
- package/dist/domains/selection/enteredGroupScope.js +1 -2
- package/dist/domains/selection/enteredOperands.js +1 -2
- package/dist/domains/selection/handleCommands.js +2 -3
- package/dist/domains/selection/overlay.js +6 -7
- package/dist/domains/selection/selectionPose.js +2 -3
- package/dist/domains/snap/angle2d.js +1 -2
- package/dist/domains/snap/debugCandidates.js +1 -2
- package/dist/domains/snap/gather.js +1 -2
- package/dist/domains/snap/inputSubspace.js +2 -3
- package/dist/domains/snap/lazySession.js +1 -2
- package/dist/domains/snap/marks.js +1 -2
- package/dist/domains/snap/outcomeStore.js +1 -2
- package/dist/domains/snap/pointSnap.js +1 -2
- package/dist/domains/snap/probes2d.js +6 -2
- package/dist/domains/snap/probes2d.js.map +1 -1
- package/dist/domains/snap/readoutDraw.js +1 -2
- package/dist/domains/snap/readoutLayer.js +1 -2
- package/dist/domains/snap/registry.js +1 -2
- package/dist/domains/snap/resizeBox.js +1 -2
- package/dist/domains/snap/roles.js +1 -2
- package/dist/domains/snap/rotationSource.js +1 -2
- package/dist/domains/snap/sceneReads.js +13 -4
- package/dist/domains/snap/sceneReads.js.map +1 -1
- package/dist/domains/snap/sceneSession2d.js +6 -5
- package/dist/domains/snap/sceneSession2d.js.map +1 -1
- package/dist/domains/snap/screen.js +2 -3
- package/dist/domains/snap/session2d.js +4 -5
- package/dist/domains/snap/spanSnap.js +1 -2
- package/dist/domains/snap/stepAngles.js +1 -2
- package/dist/domains/text/editingDrawOne.js +1 -2
- package/dist/domains/text/hostTextEditors.js +1 -2
- package/dist/domains/text/index.js +2 -2
- package/dist/domains/text/sceneTextDrafts.js +1 -2
- package/dist/domains/text/textHitAt.js +4 -5
- package/dist/domains/text/textLayer.js +12 -2
- package/dist/domains/text/textLayer.js.map +1 -1
- package/dist/domains/text/useSceneTextEdit.js +4 -5
- package/dist/domains/viewports/aim.js +3 -4
- package/dist/domains/viewports/viewMarker.js +1 -2
- package/dist/domains/viewports/viewMarkerDrag.js +1 -2
- package/dist/domains/viewports/viewResolver.js +1 -2
- package/dist/domains/viewports/viewportLayer.js +1 -2
- package/dist/iconRegistry/IconRegistryProvider.js +1 -2
- package/dist/iconRegistry/useIconGlyph.js +1 -2
- package/dist/iconRegistry/useIconVariant.js +1 -2
- package/dist/icons.table.js +2 -3
- package/dist/icons.table.js.map +1 -1
- package/dist/icons.table.json +5 -0
- package/dist/icons2.table.js +1 -2
- package/dist/index.d.ts +160 -64
- package/dist/index.js +14 -9
- package/dist/input/keyState.js +1 -2
- package/dist/input/useKeyModifiers.js +1 -2
- package/dist/input/useKeyState.js +1 -2
- package/dist/interactions/actions/admitsChild.js +1 -2
- package/dist/interactions/actions/align/action.js +6 -7
- package/dist/interactions/actions/align/align.js +6 -7
- package/dist/interactions/actions/booleans/action.js +5 -4
- package/dist/interactions/actions/booleans/action.js.map +1 -1
- package/dist/interactions/actions/booleans/booleanGroupAction.js +2 -3
- package/dist/interactions/actions/booleans/booleans.js +1 -2
- package/dist/interactions/actions/booleans/commit.js +4 -5
- package/dist/interactions/actions/booleans/custom.js +2 -3
- package/dist/interactions/actions/booleans/keymap.js +1 -2
- package/dist/interactions/actions/booleans/operands.js +1 -2
- package/dist/interactions/actions/booleans/pieces.js +1 -2
- package/dist/interactions/actions/booleans/placement.js +1 -2
- package/dist/interactions/actions/booleans/useBooleans.js +1 -2
- package/dist/interactions/actions/booleans/useBooleansAdapter.js +1 -2
- package/dist/interactions/actions/clipboard/action.js +2 -3
- package/dist/interactions/actions/clipboard/clipboardOps.js +2 -3
- package/dist/interactions/actions/clipboard/materializePaste.js +1 -2
- package/dist/interactions/actions/clipboard/wireFormat.js +1 -2
- package/dist/interactions/actions/clone/action.js +7 -8
- package/dist/interactions/actions/clone/behaviors.js +4 -5
- package/dist/interactions/actions/defaultCommitAdapter.js +2 -3
- package/dist/interactions/actions/defaults/anchorEditing.js +6 -10
- package/dist/interactions/actions/defaults/anchorEditing.js.map +1 -1
- package/dist/interactions/actions/defaults/anchorFields.js +1 -2
- package/dist/interactions/actions/defaults/anchorHandles.js +2 -3
- package/dist/interactions/actions/defaults/anchorJoin.js +2 -3
- package/dist/interactions/actions/defaults/areaSelect.js +6 -6
- package/dist/interactions/actions/defaults/areaSelect.js.map +1 -1
- package/dist/interactions/actions/defaults/bendSegment.js +4 -6
- package/dist/interactions/actions/defaults/bendSegment.js.map +1 -1
- package/dist/interactions/actions/defaults/cancelGesture.js +1 -2
- package/dist/interactions/actions/defaults/clearSelection.js +1 -2
- package/dist/interactions/actions/defaults/containerScroll.js +4 -5
- package/dist/interactions/actions/defaults/contextMenu.js +6 -7
- package/dist/interactions/actions/defaults/copySubtree.js +2 -3
- package/dist/interactions/actions/defaults/createPaintAction.js +3 -4
- package/dist/interactions/actions/defaults/delete.js +2 -3
- package/dist/interactions/actions/defaults/duplicate.js +5 -6
- package/dist/interactions/actions/defaults/enterGroup.js +2 -3
- package/dist/interactions/actions/defaults/enterPathEdit.js +1 -2
- package/dist/interactions/actions/defaults/enterTextEdit.js +1 -2
- package/dist/interactions/actions/defaults/escape.js +1 -2
- package/dist/interactions/actions/defaults/exitPathEdit.js +18 -3
- package/dist/interactions/actions/defaults/exitPathEdit.js.map +1 -1
- package/dist/interactions/actions/defaults/group.js +6 -7
- package/dist/interactions/actions/defaults/ingest.js +3 -4
- package/dist/interactions/actions/defaults/insertPathAnchor.js +2 -3
- package/dist/interactions/actions/defaults/nudge.js +3 -4
- package/dist/interactions/actions/defaults/nudgeSteps.js +2 -3
- package/dist/interactions/actions/defaults/nudgeSteps.js.map +1 -1
- package/dist/interactions/actions/defaults/pathEditMarks.js +1 -2
- package/dist/interactions/actions/defaults/pinchZoom.js +3 -4
- package/dist/interactions/actions/defaults/reorder.js +2 -3
- package/dist/interactions/actions/defaults/requiresSelection.js +1 -2
- package/dist/interactions/actions/defaults/segmentUnder.js +1 -2
- package/dist/interactions/actions/defaults/selectAll.js +1 -2
- package/dist/interactions/actions/defaults/selectDeep.js +1 -2
- package/dist/interactions/actions/defaults/setFill.js +1 -2
- package/dist/interactions/actions/defaults/setFillOpacity.js +1 -2
- package/dist/interactions/actions/defaults/setStroke.js +1 -2
- package/dist/interactions/actions/defaults/setStrokeOpacity.js +1 -2
- package/dist/interactions/actions/defaults/slice.js +1 -2
- package/dist/interactions/actions/defaults/sliceOps.js +1 -2
- package/dist/interactions/actions/defaults/toolActivate.js +1 -2
- package/dist/interactions/actions/defaults/toolResetToDefault.js +1 -2
- package/dist/interactions/actions/defaults/undoRedo.js +1 -2
- package/dist/interactions/actions/defaults/viewportDragPan.js +1 -2
- package/dist/interactions/actions/defaults/viewportWheelPan.js +1 -2
- package/dist/interactions/actions/defaults/viewportZoom.js +3 -4
- package/dist/interactions/actions/distribute/action.js +4 -5
- package/dist/interactions/actions/distribute/distribute.js +5 -6
- package/dist/interactions/actions/distribute/plan.js +1 -2
- package/dist/interactions/actions/drawnBoxes.js +4 -5
- package/dist/interactions/actions/dropVerdict.js +1 -2
- package/dist/interactions/actions/edit-anchors/action.js +7 -9
- package/dist/interactions/actions/edit-anchors/action.js.map +1 -1
- package/dist/interactions/actions/edit-anchors/extensionDrags.js +1 -2
- package/dist/interactions/actions/edit-anchors/geometry.js +1 -2
- package/dist/interactions/actions/edit-anchors/handleDrag.js +1 -2
- package/dist/interactions/actions/edit-anchors/handles.js +1 -2
- package/dist/interactions/actions/edit-anchors/params.js +1 -2
- package/dist/interactions/actions/edit-anchors/preview.js +1 -2
- package/dist/interactions/actions/edit-anchors/symmetry.js +1 -2
- package/dist/interactions/actions/flip/action.js +8 -9
- package/dist/interactions/actions/flip/helpers.js +1 -2
- package/dist/interactions/actions/geometryProjection.js +1 -2
- package/dist/interactions/actions/gestureFrames.js +3 -4
- package/dist/interactions/actions/gestureLifecycle.js +1 -2
- package/dist/interactions/actions/hitSelection.js +7 -3
- package/dist/interactions/actions/hitSelection.js.map +1 -1
- package/dist/interactions/actions/insert/action.js +27 -9
- package/dist/interactions/actions/insert/action.js.map +1 -1
- package/dist/interactions/actions/insert/commit.js +2 -3
- package/dist/interactions/actions/insert/extras.js +1 -2
- package/dist/interactions/actions/insert/frame.js +1 -2
- package/dist/interactions/actions/insert/geometry.js +1 -2
- package/dist/interactions/actions/insert/params.js +42 -0
- package/dist/interactions/actions/insert/params.js.map +1 -0
- package/dist/interactions/actions/insert/parent.js +1 -2
- package/dist/interactions/actions/insert/placeAction.js +5 -6
- package/dist/interactions/actions/insert/repositionAction.js +1 -2
- package/dist/interactions/actions/insert/rotateAction.js +1 -2
- package/dist/interactions/actions/insert/session.js +5 -6
- package/dist/interactions/actions/insert/shape.js +2 -3
- package/dist/interactions/actions/lasso-select/action.js +9 -9
- package/dist/interactions/actions/lasso-select/action.js.map +1 -1
- package/dist/interactions/actions/lasso-select/behaviors/selectFromLasso.js +2 -3
- package/dist/interactions/actions/magnification.js +37 -0
- package/dist/interactions/actions/magnification.js.map +1 -0
- package/dist/interactions/actions/move/action.js +2 -3
- package/dist/interactions/actions/move/behaviors/layoutDrop.js +2 -3
- package/dist/interactions/actions/move/behaviors/reparentOnDrop.js +2 -3
- package/dist/interactions/actions/move/behaviors/snapBackOrDelete.js +1 -2
- package/dist/interactions/actions/move/behaviors/snapToContainer.js +2 -3
- package/dist/interactions/actions/move/capture.js +6 -7
- package/dist/interactions/actions/move/commit/index.js +2 -3
- package/dist/interactions/actions/move/commit/layoutDrop.js +4 -5
- package/dist/interactions/actions/move/commit/layoutRelease.js +7 -8
- package/dist/interactions/actions/move/commit/rebase.js +2 -3
- package/dist/interactions/actions/move/commit/reparent.js +5 -6
- package/dist/interactions/actions/move/delta.js +2 -3
- package/dist/interactions/actions/move/frame.js +2 -3
- package/dist/interactions/actions/move/gestureAdapter.js +1 -2
- package/dist/interactions/actions/move/landedDescendants.js +2 -3
- package/dist/interactions/actions/move/layout/container.js +3 -4
- package/dist/interactions/actions/move/layout/dragged.js +2 -3
- package/dist/interactions/actions/move/layout/dropPass.js +5 -6
- package/dist/interactions/actions/move/layout/exits.js +2 -3
- package/dist/interactions/actions/move/layout/glide.js +2 -3
- package/dist/interactions/actions/move/layout/view.js +1 -2
- package/dist/interactions/actions/move/refusal.js +2 -3
- package/dist/interactions/actions/move/session.js +4 -5
- package/dist/interactions/actions/move/translate.js +2 -3
- package/dist/interactions/actions/moveNodes.js +5 -6
- package/dist/interactions/actions/notices.js +16 -0
- package/dist/interactions/actions/notices.js.map +1 -0
- package/dist/interactions/actions/outlines/createOutlines.js +9 -8
- package/dist/interactions/actions/outlines/createOutlines.js.map +1 -1
- package/dist/interactions/actions/outlines/createOutlinesAction.js +14 -10
- package/dist/interactions/actions/outlines/createOutlinesAction.js.map +1 -1
- package/dist/interactions/actions/outlines/outlineStroke.js +2 -3
- package/dist/interactions/actions/outlines/outlineStrokeAction.js +5 -5
- package/dist/interactions/actions/outlines/outlineStrokeAction.js.map +1 -1
- package/dist/interactions/actions/outlines/replaceWithPaths.js +5 -6
- package/dist/interactions/actions/outlines/strokeRegion.js +1 -2
- package/dist/interactions/actions/outlines/useCreateOutlinesAdapter.js +1 -2
- package/dist/interactions/actions/pathCommands/cutJoin.js +3 -4
- package/dist/interactions/actions/pathCommands/livePathEdit.js +3 -4
- package/dist/interactions/actions/pathCommands/pathNodes.js +2 -3
- package/dist/interactions/actions/pathCommands/simplifyOffset.js +2 -3
- package/dist/interactions/actions/pathGestureTags.js +1 -2
- package/dist/interactions/actions/planeInput.js +2 -3
- package/dist/interactions/actions/pointerState.js +1 -2
- package/dist/interactions/actions/poseDescriptorDep.js +1 -2
- package/dist/interactions/actions/poseFrame.js +3 -4
- package/dist/interactions/actions/resize/action.js +3 -4
- package/dist/interactions/actions/resize/aspect.js +1 -2
- package/dist/interactions/actions/resize/behaviors/clampMinSize.js +1 -2
- package/dist/interactions/actions/resize/boxFrame.js +1 -2
- package/dist/interactions/actions/resize/capture.js +7 -8
- package/dist/interactions/actions/resize/commit.js +3 -4
- package/dist/interactions/actions/resize/cornerHandles.js +1 -2
- package/dist/interactions/actions/resize/frame.js +7 -8
- package/dist/interactions/actions/resize/held.js +2 -3
- package/dist/interactions/actions/resize/minimum.js +1 -2
- package/dist/interactions/actions/resize/replay.js +1 -2
- package/dist/interactions/actions/resize/ruleBounds.js +1 -2
- package/dist/interactions/actions/resize/session.js +9 -10
- package/dist/interactions/actions/resolveOverlays.js +1 -2
- package/dist/interactions/actions/resolvePreviews.js +3 -4
- package/dist/interactions/actions/rotate/action.js +5 -6
- package/dist/interactions/actions/rotate/commit.js +2 -3
- package/dist/interactions/actions/rotate/frame.js +3 -4
- package/dist/interactions/actions/rotate/geometry.js +1 -2
- package/dist/interactions/actions/rotate/handle.js +2 -3
- package/dist/interactions/actions/rotate/replay.js +2 -3
- package/dist/interactions/actions/rotate/session.js +10 -11
- package/dist/interactions/actions/selectionSubtree.js +7 -22
- package/dist/interactions/actions/selectionSubtree.js.map +1 -1
- package/dist/interactions/actions/spatialReference.js +1 -2
- package/dist/interactions/actions/testUtils.js +1 -9
- package/dist/interactions/actions/testUtils.js.map +1 -1
- package/dist/interactions/actions/transform-again/action.js +5 -6
- package/dist/interactions/actions/transform-again/memory.js +1 -2
- package/dist/interactions/actions/transformFinish.js +1 -2
- package/dist/interactions/actions/useActionSet.js +1 -2
- package/dist/interactions/actions/useNotices.js +12 -0
- package/dist/interactions/actions/useNotices.js.map +1 -0
- package/dist/interactions/actions/useStandardActions.js +1 -2
- package/dist/interactions/gestures/dragGesture/dragGesture.js +1 -2
- package/dist/interactions/gestures/dragGesture/dragPointOf.js +1 -2
- package/dist/interactions/gestures/dragRadial/dragRadial.js +2 -3
- package/dist/interactions/gestures/dragRect/dragRect.js +2 -3
- package/dist/interactions/gestures/handleDrag/handleDrag.js +1 -2
- package/dist/interactions/gestures/pointerDrag/pointerDrag.js +1 -2
- package/dist/interactions/gestures/shared/originProjection.js +1 -2
- package/dist/interactions/gestures/shared/screenTolerance.js +1 -2
- package/dist/interactions/gestures/thresholdDrag/thresholdDrag.js +1 -2
- package/dist/kitSettingsSchema.js +4 -5
- package/dist/test-hook/createTestHook.js +1 -2
- package/dist/test-hook/install.js +1 -2
- package/dist/test-hook/useTestHook.js +1 -2
- package/dist/test-seams.d.ts +7 -14
- package/dist/test-seams.js +2 -2
- package/dist/tools/builtin/anchors/anchorsTool.js +30 -0
- package/dist/tools/builtin/anchors/anchorsTool.js.map +1 -0
- package/dist/tools/builtin/ellipse/useEllipseTool.js +2 -3
- package/dist/tools/builtin/eyedropper/useEyedropperTool.js +1 -2
- package/dist/tools/builtin/hand/dragPanContribution.js +1 -2
- package/dist/tools/builtin/hand/useHandTool.js +1 -2
- package/dist/tools/builtin/image/useImageTool.js +1 -2
- package/dist/tools/builtin/lasso/useLassoTool.js +1 -2
- package/dist/tools/builtin/line/useLineTool.js +2 -3
- package/dist/tools/builtin/measure/useMeasureTool.js +2 -3
- package/dist/tools/builtin/pen/penHandle.js +1 -2
- package/dist/tools/builtin/pen/usePenTool.js +6 -7
- package/dist/tools/builtin/pencil/usePencilTool.js +1 -2
- package/dist/tools/builtin/pickTopMostHit.js +1 -2
- package/dist/tools/builtin/polygon/usePolygonTool.js +2 -3
- package/dist/tools/builtin/pressTarget.js +1 -2
- package/dist/tools/builtin/rect/useRectTool.js +2 -3
- package/dist/tools/builtin/select/adapterPointQuery.js +3 -4
- package/dist/tools/builtin/select/collapseDeferred.js +1 -2
- package/dist/tools/builtin/select/groupEntry.js +2 -3
- package/dist/tools/builtin/select/pressDecision.js +3 -4
- package/dist/tools/builtin/select/pressDecision.js.map +1 -1
- package/dist/tools/builtin/select/selectionContributions.js +1 -2
- package/dist/tools/builtin/select/useSelectTool.js +5 -6
- package/dist/tools/builtin/shared/insertToolOptions.js +1 -2
- package/dist/tools/builtin/shared/pointerFollower.js +1 -2
- package/dist/tools/builtin/slice/useSliceTool.js +5 -6
- package/dist/tools/builtin/star/useStarTool.js +2 -3
- package/dist/tools/builtin/sticky/stickyNode.js +1 -2
- package/dist/tools/builtin/sticky/useStickyTool.js +2 -3
- package/dist/tools/builtin/text/useTextTool.js +1 -2
- package/dist/tools/index.js +4 -2
- package/dist/tools/overlayBinding.js +1 -2
- package/dist/tools/toolOptions.js +60 -0
- package/dist/tools/toolOptions.js.map +1 -0
- package/dist/tools/useKeybindings.js +1 -2
- package/dist/{types-DW14eu9B.d.ts → types-BUvUXZe5.d.ts} +3 -3
- package/dist/util/color.js +1 -2
- package/dist/util/paint.js +1 -2
- package/dist/version.js +2 -3
- package/package.json +27 -27
- package/dist/interactions/actions/defaults/pathEditTools.js +0 -60
- package/dist/interactions/actions/defaults/pathEditTools.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { minSizeOf } from "../../../core/scene/minSize.js";
|
|
2
2
|
import { poseFrameOf } from "@weasel-js/geom";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/interactions/actions/resize/minimum.ts
|
|
5
5
|
/**
|
|
6
6
|
* The smallest the resized box may go, from each written node's
|
|
7
7
|
* `data.minSize`: a lone target's own, or, for a box several share, the box
|
|
@@ -30,6 +30,5 @@ function boxMinimum(scene, writeIds, leafBounds, startWorlds, box, sharedBox) {
|
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
//#endregion
|
|
34
33
|
export { boxMinimum };
|
|
35
34
|
//# sourceMappingURL=minimum.js.map
|
|
@@ -2,7 +2,7 @@ import { resizeOps } from "./commit.js";
|
|
|
2
2
|
import { posesInBox } from "./frame.js";
|
|
3
3
|
import { captureResize } from "./session.js";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/interactions/actions/resize/replay.ts
|
|
6
6
|
/** `to`, given in units of `from` (`{ x: 0, y: 0, width: 1, height: 1 }` is
|
|
7
7
|
* `from` itself), in `from`'s own coordinates. */
|
|
8
8
|
function boxInUnits(from, to) {
|
|
@@ -52,6 +52,5 @@ function resizeSelectionOps(scene, selected, anchor, units, deps, label) {
|
|
|
52
52
|
}, previews, label);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
//#endregion
|
|
56
55
|
export { boxInUnits, resizeSelectionOps, unitsOfBox };
|
|
57
56
|
//# sourceMappingURL=replay.js.map
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { isRectPose } from "../../../core/geometry/autoPoseDescriptor.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/interactions/actions/resize/ruleBounds.ts
|
|
4
4
|
/** `pose` as the bounds a constraint or a point snap reads. A pose that is
|
|
5
5
|
* already a box goes through whole, so a `rotation` on it rides along. */
|
|
6
6
|
function boundsForRules(geometry, pose) {
|
|
7
7
|
return isRectPose(pose) ? pose : geometry.getBounds(pose);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
//#endregion
|
|
11
10
|
export { boundsForRules };
|
|
12
11
|
//# sourceMappingURL=ruleBounds.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { localToWorld } from "../../../core/geometry/targetFrame.js";
|
|
2
|
-
import { outsetBox } from "../../../core/geometry/inkExtents.js";
|
|
3
|
-
import { scenePoseFrame } from "../poseFrame.js";
|
|
4
|
-
import { nodeDescriptors, poseDescriptorOf } from "../poseDescriptorDep.js";
|
|
5
1
|
import { transformFinisher } from "../transformFinish.js";
|
|
6
|
-
import { readGestureLifecycle } from "../gestureLifecycle.js";
|
|
7
2
|
import { gestureReaders } from "../../gestures/shared/screenTolerance.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
3
|
+
import { readGestureLifecycle } from "../gestureLifecycle.js";
|
|
4
|
+
import { nodeDescriptors, poseDescriptorOf } from "../poseDescriptorDep.js";
|
|
5
|
+
import { scenePoseFrame } from "../poseFrame.js";
|
|
11
6
|
import { buildGestureContext, captureBox, captureStarts, captureTargets, resolvePolicy } from "./capture.js";
|
|
7
|
+
import { drawnBoxes } from "../drawnBoxes.js";
|
|
12
8
|
import { boxMinimum } from "./minimum.js";
|
|
9
|
+
import { boxFrame } from "./boxFrame.js";
|
|
10
|
+
import { captureHeld } from "./held.js";
|
|
11
|
+
import { localToWorld } from "../../../core/geometry/targetFrame.js";
|
|
12
|
+
import { outsetBox } from "../../../core/geometry/inkExtents.js";
|
|
13
13
|
import { inputSession } from "../../../domains/snap/session2d.js";
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
// src/interactions/actions/resize/session.ts
|
|
16
16
|
/** Capture what resizing `ids` from `anchor` acts on. Null when nothing it
|
|
17
17
|
* would write exists. */
|
|
18
18
|
function captureResize(scene, ids, anchor, deps) {
|
|
@@ -107,6 +107,5 @@ function beginResize(ctx) {
|
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
//#endregion
|
|
111
110
|
export { beginResize, captureResize };
|
|
112
111
|
//# sourceMappingURL=session.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { insertPreviewExtent } from "../../canvas/insertPreviewExtent.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/interactions/actions/resolveOverlays.ts
|
|
4
4
|
/** The overlays worth painting, in the order the handles published them. */
|
|
5
5
|
function resolveOverlays(overlays) {
|
|
6
6
|
const out = [];
|
|
@@ -80,6 +80,5 @@ function resolveOverlays(overlays) {
|
|
|
80
80
|
return out;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
//#endregion
|
|
84
83
|
export { resolveOverlays };
|
|
85
84
|
//# sourceMappingURL=resolveOverlays.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { asNodeId } from "../../core/scene/types.js";
|
|
2
2
|
import { definesFrame, effectivePose } from "../../core/scene/effectivePose.js";
|
|
3
|
+
import { composeWorldPose, composesFrames } from "../../core/scene/composeFrame.js";
|
|
3
4
|
import { viewPoseAdapter } from "../../core/scene/scrollOffsets.js";
|
|
4
|
-
import { asNodeId } from "../../core/scene/types.js";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/interactions/actions/resolvePreviews.ts
|
|
7
7
|
/** First non-null answer across sources, in the order given. */
|
|
8
8
|
function firstNonNull(sources, id, read) {
|
|
9
9
|
for (const source of sources) {
|
|
@@ -89,6 +89,5 @@ function flattenPreviews(roots) {
|
|
|
89
89
|
return out;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
//#endregion
|
|
93
92
|
export { flattenPreviews, resolvePreviews };
|
|
94
93
|
//# sourceMappingURL=resolvePreviews.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { rotateCursorAt } from "../../../affordances/rotateCursor.js";
|
|
2
1
|
import { transformPreview } from "../transformFinish.js";
|
|
3
2
|
import { closeGesture, runBehaviorCancel } from "../gestureLifecycle.js";
|
|
4
3
|
import { inPlane, selectionLayer } from "../planeInput.js";
|
|
5
|
-
import {
|
|
6
|
-
import { recordTransform } from "../transform-again/memory.js";
|
|
7
|
-
import { nextFrame } from "./frame.js";
|
|
4
|
+
import { rotateCursorAt } from "../../../affordances/rotateCursor.js";
|
|
8
5
|
import { commitRotate } from "./commit.js";
|
|
6
|
+
import { nextFrame } from "./frame.js";
|
|
9
7
|
import { beginRotate } from "./session.js";
|
|
8
|
+
import { recordTransform } from "../transform-again/memory.js";
|
|
9
|
+
import { SNAP_ROLES } from "../../../domains/snap/roles.js";
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
// src/interactions/actions/rotate/action.ts
|
|
12
12
|
/**
|
|
13
13
|
* Pointer-driven rotation of the selection, committed as one undo entry.
|
|
14
14
|
*
|
|
@@ -95,6 +95,5 @@ var rotateAction = inPlane({
|
|
|
95
95
|
enabled: () => true
|
|
96
96
|
}, selectionLayer);
|
|
97
97
|
|
|
98
|
-
//#endregion
|
|
99
98
|
export { rotateAction };
|
|
100
99
|
//# sourceMappingURL=action.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { createTransformOp } from "../../../core/ops/transform.js";
|
|
1
2
|
import { defaultCommitAdapter } from "../defaultCommitAdapter.js";
|
|
2
3
|
import { commitGestureOps, reduceBehaviorEnd } from "../gestureLifecycle.js";
|
|
3
|
-
import { createTransformOp } from "../../../core/ops/transform.js";
|
|
4
4
|
import { syncGestureCurrent } from "./frame.js";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/interactions/actions/rotate/commit.ts
|
|
7
7
|
/** One transform op per rotated node: `from` the pose stored at press, `to`
|
|
8
8
|
* its preview. */
|
|
9
9
|
function rotateOps(ids, originPoses, previews, label) {
|
|
@@ -44,6 +44,5 @@ function commitRotate(session, frame) {
|
|
|
44
44
|
return commitGestureOps(target, lifecycle, ops);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
//#endregion
|
|
48
47
|
export { commitRotate, rotateOps };
|
|
49
48
|
//# sourceMappingURL=commit.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { translatePoseViaDescriptor } from "../../../core/geometry/poseDescriptor.js";
|
|
2
|
-
import { carryPose, planeOf } from "../planeInput.js";
|
|
3
1
|
import { pointerStateOf } from "../pointerState.js";
|
|
4
2
|
import { snapMods } from "../../../domains/snap/roles.js";
|
|
3
|
+
import { carryPose, planeOf } from "../planeInput.js";
|
|
4
|
+
import { translatePoseViaDescriptor } from "../../../core/geometry/poseDescriptor.js";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/interactions/actions/rotate/frame.ts
|
|
7
7
|
/** `origin` turned by `delta` radians, its center orbiting `pivot` when one
|
|
8
8
|
* is given. */
|
|
9
9
|
function turnPose(d, origin, delta, pivot) {
|
|
@@ -88,6 +88,5 @@ function nextFrame(session, readers, moveCtx) {
|
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
//#endregion
|
|
92
91
|
export { nextFrame, storedPreviews, syncGestureCurrent, turnedWorlds };
|
|
93
92
|
//# sourceMappingURL=frame.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/interactions/actions/rotate/geometry.ts
|
|
2
2
|
/** AABB center of an unrotated rect — the canonical rotation pivot. */
|
|
3
3
|
function aabbCenter(bounds) {
|
|
4
4
|
return {
|
|
@@ -53,6 +53,5 @@ function pointInRotatedRect(pose, worldX, worldY) {
|
|
|
53
53
|
return local.x >= pose.x && local.x <= pose.x + pose.width && local.y >= pose.y && local.y <= pose.y + pose.height;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
//#endregion
|
|
57
56
|
export { aabbCenter, pointInRotatedRect, rectCorners, rotatePoint, rotatedRectCorners };
|
|
58
57
|
//# sourceMappingURL=geometry.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ROTATION_HANDLE_BASE_PX } from "../../../core/device/targets.js";
|
|
2
1
|
import { localToWorld, normalToWorld, targetTransformOf } from "../../../core/geometry/targetFrame.js";
|
|
2
|
+
import { ROTATION_HANDLE_BASE_PX } from "../../../core/device/targets.js";
|
|
3
3
|
import { standoff } from "@weasel-js/geom";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/interactions/actions/rotate/handle.ts
|
|
6
6
|
/** Default world-space distance from the rect's top edge to the rotation
|
|
7
7
|
* handle's center. Matches the demo's visual default; consumers can
|
|
8
8
|
* override per-call. Unscaled — kit-internal use sites multiply by
|
|
@@ -35,6 +35,5 @@ function hitRotationHandle(handle, px, py, radius) {
|
|
|
35
35
|
return Math.abs(px - handle.cx) <= radius && Math.abs(py - handle.cy) <= radius;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
//#endregion
|
|
39
38
|
export { DEFAULT_ROTATION_HANDLE_DISTANCE, hitRotationHandle, rotationHandle };
|
|
40
39
|
//# sourceMappingURL=handle.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { shapeSources } from "../selectionSubtree.js";
|
|
2
|
-
import { storedPreviews } from "./frame.js";
|
|
3
2
|
import { rotateOps } from "./commit.js";
|
|
3
|
+
import { storedPreviews } from "./frame.js";
|
|
4
4
|
import { captureTurn } from "./session.js";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/interactions/actions/rotate/replay.ts
|
|
7
7
|
/** The ops that turn `selected` by `angle` radians the way a rotate drag
|
|
8
8
|
* would: about the selection's center, or each node about its own. */
|
|
9
9
|
function rotateSelectionOps(scene, selected, deps, angle, pivot, label) {
|
|
@@ -21,6 +21,5 @@ function rotateSelectionOps(scene, selected, deps, angle, pivot, label) {
|
|
|
21
21
|
return rotateOps([...turn.origins.keys()], originPoses, previews, label);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
//#endregion
|
|
25
24
|
export { rotateSelectionOps };
|
|
26
25
|
//# sourceMappingURL=replay.js.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { scenePoseFrame } from "../poseFrame.js";
|
|
3
|
-
import { nodeDescriptors, poseDescriptorOf } from "../poseDescriptorDep.js";
|
|
1
|
+
import { pointerStateOf } from "../pointerState.js";
|
|
4
2
|
import { transformFinisher } from "../transformFinish.js";
|
|
3
|
+
import { sceneGestureFrames } from "../gestureFrames.js";
|
|
4
|
+
import { unionAABB } from "../../../core/geometry/unionBounds.js";
|
|
5
|
+
import { gestureReaders } from "../../gestures/shared/screenTolerance.js";
|
|
5
6
|
import { readGestureLifecycle } from "../gestureLifecycle.js";
|
|
7
|
+
import { moveGestureAdapter } from "../move/gestureAdapter.js";
|
|
6
8
|
import { carryPose, invertPlane, planeOf } from "../planeInput.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { pointerStateOf } from "../pointerState.js";
|
|
9
|
+
import { nodeDescriptors, poseDescriptorOf } from "../poseDescriptorDep.js";
|
|
10
|
+
import { scenePoseFrame } from "../poseFrame.js";
|
|
10
11
|
import { drawnBoxes } from "../drawnBoxes.js";
|
|
11
|
-
import {
|
|
12
|
-
import { moveGestureAdapter } from "../move/gestureAdapter.js";
|
|
13
|
-
import { SNAP_ANGLE_STEP } from "../../../domains/snap/roles.js";
|
|
12
|
+
import { shapeSources } from "../selectionSubtree.js";
|
|
14
13
|
import { inputSession } from "../../../domains/snap/session2d.js";
|
|
14
|
+
import { SNAP_ANGLE_STEP } from "../../../domains/snap/roles.js";
|
|
15
15
|
import { resolveParams } from "@weasel-js/routing";
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
// src/interactions/actions/rotate/session.ts
|
|
18
18
|
function captureOrigins(view, scene, ids, descriptorOf, poseFrame, boxes) {
|
|
19
19
|
const originPoses = /* @__PURE__ */ new Map();
|
|
20
20
|
const origins = /* @__PURE__ */ new Map();
|
|
@@ -138,6 +138,5 @@ function beginRotate(ctx, opts) {
|
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
//#endregion
|
|
142
141
|
export { beginRotate, captureTurn };
|
|
143
142
|
//# sourceMappingURL=session.js.map
|
|
@@ -1,28 +1,14 @@
|
|
|
1
|
-
import { poseDescriptorForNode, translatePoseViaDescriptor } from "../../core/geometry/poseDescriptor.js";
|
|
2
1
|
import { asNodeId } from "../../core/scene/types.js";
|
|
3
|
-
import { sceneMutators } from "../../core/scene/sceneMutators.js";
|
|
4
2
|
import { createTransformOp } from "../../core/ops/transform.js";
|
|
3
|
+
import { sceneMutators } from "../../core/scene/sceneMutators.js";
|
|
4
|
+
import { poseDescriptorForNode, translatePoseViaDescriptor } from "../../core/geometry/poseDescriptor.js";
|
|
5
|
+
import { outermost } from "@weasel-js/select";
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* already reaches this node, so acting on it again would double it. */
|
|
9
|
-
function hasSelectedAncestor(parentOf, id, set) {
|
|
10
|
-
return selectedAncestor(parentOf, id, set) !== null;
|
|
11
|
-
}
|
|
12
|
-
/** The nearest ancestor of `id` that is in `set`, or `null`. */
|
|
13
|
-
function selectedAncestor(parentOf, id, set) {
|
|
14
|
-
let parent = parentOf(id);
|
|
15
|
-
while (parent != null) {
|
|
16
|
-
if (set.has(parent)) return parent;
|
|
17
|
-
parent = parentOf(parent);
|
|
18
|
-
}
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
/** The ids in `ids` that are in the scene and have no selected ancestor. */
|
|
7
|
+
// src/interactions/actions/selectionSubtree.ts
|
|
8
|
+
/** The ids in `ids` that are in the scene and that no ancestor in `ids` holds. */
|
|
22
9
|
function selectedRoots(scene, ids) {
|
|
23
|
-
const set = new Set(ids);
|
|
24
10
|
const parentOf = (id) => scene.get(asNodeId(id))?.parent ?? null;
|
|
25
|
-
return ids.map((id) => asNodeId(id)).filter((id) => scene.get(id) !== void 0
|
|
11
|
+
return outermost(ids, parentOf).map((id) => asNodeId(id)).filter((id) => scene.get(id) !== void 0);
|
|
26
12
|
}
|
|
27
13
|
/** Whether `id` draws a path derived from other nodes. Its pose is a
|
|
28
14
|
* placeholder: the path follows the nodes it derives from. */
|
|
@@ -149,6 +135,5 @@ function storedDelta(frame, descriptor, id, dx, dy) {
|
|
|
149
135
|
};
|
|
150
136
|
}
|
|
151
137
|
|
|
152
|
-
|
|
153
|
-
export { hasSelectedAncestor, moveSources, selectedAncestor, selectedRoots, shapeSources, storedDelta, subtreeIds, translateEach, translateTargets };
|
|
138
|
+
export { moveSources, selectedRoots, shapeSources, storedDelta, subtreeIds, translateEach, translateTargets };
|
|
154
139
|
//# sourceMappingURL=selectionSubtree.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectionSubtree.js","names":[],"sources":["../../../src/interactions/actions/selectionSubtree.ts"],"sourcesContent":["import type { NodeId, Scene } from 'core/scene/types';\nimport { asNodeId } from 'core/scene/types';\nimport type { PoseFrame } from './poseFrame';\nimport type { TransformFinisher } from './transformFinish';\nimport { createTransformOp } from 'core/ops/transform';\nimport { sceneMutators } from 'core/scene/sceneMutators';\nimport { poseDescriptorForNode, translatePoseViaDescriptor, type PoseDescriptor } from 'core/geometry/poseDescriptor';\n\ntype AnyScene = Scene<unknown, string, unknown>;\n\n/** True when any ancestor of `id` is also in `set` — acting on that ancestor\n * already reaches this node, so acting on it again would double it. */\nexport function hasSelectedAncestor(\n parentOf: (id: string) => string | null,\n id: string,\n set: ReadonlySet<string>,\n): boolean {\n return selectedAncestor(parentOf, id, set) !== null;\n}\n\n/** The nearest ancestor of `id` that is in `set`, or `null`. */\nexport function selectedAncestor(\n parentOf: (id: string) => string | null,\n id: string,\n set: ReadonlySet<string>,\n): string | null {\n let parent = parentOf(id);\n while (parent != null) {\n if (set.has(parent)) return parent;\n parent = parentOf(parent);\n }\n return null;\n}\n\n/** The ids in `ids` that are in the scene and have no selected ancestor. */\nexport function selectedRoots(scene: AnyScene, ids: readonly string[]): NodeId[] {\n const set = new Set<string>(ids);\n const parentOf = (id: string) => scene.get(asNodeId(id))?.parent ?? null;\n return ids\n .map((id) => asNodeId(id))\n .filter((id) => scene.get(id) !== undefined && !hasSelectedAncestor(parentOf, id, set));\n}\n\n/** Whether `id` draws a path derived from other nodes. Its pose is a\n * placeholder: the path follows the nodes it derives from. */\nfunction derivesPathOnly(scene: AnyScene, id: string): boolean {\n const node = scene.get(asNodeId(id));\n return node?.derivePath !== undefined && node.derivePose === undefined\n && Array.isArray(node.dependsOn) && node.dependsOn.length > 0;\n}\n\n/**\n * The nodes a translation of `ids` has to act on. A node whose pose is derived\n * from an id list cannot be moved itself, since a pose written to it is\n * overwritten on the next read, so the nodes it derives from stand in for it,\n * through however many derived nodes that takes. A node reached that way which\n * derives only its path — a wire under a label — follows its own dependencies\n * and is not written. Each id appears once, in the order it was first reached.\n */\nexport function moveSources(scene: AnyScene, ids: readonly string[]): string[] {\n const out = new Set<string>();\n const walked = new Set<string>();\n const visit = (id: string, reached: boolean): void => {\n if (walked.has(id)) return;\n walked.add(id);\n if (reached && derivesPathOnly(scene, id)) return;\n const node = scene.get(asNodeId(id));\n const deps = node?.derivePose !== undefined && Array.isArray(node.dependsOn) ? node.dependsOn : [];\n if (deps.length === 0) out.add(id);\n else for (const dep of deps) visit(dep, true);\n };\n for (const id of ids) visit(id, false);\n return [...out];\n}\n\n/**\n * The nodes a resize, rotation, flip, or alignment of `ids` has to write. A\n * node whose pose is derived cannot be written itself, so what it derives\n * from stands in for it — a container's children, or the ids a node names —\n * through however many derived nodes that takes, leaving out one reached that\n * way which derives only its path, as {@link moveSources} does. Each id appears once, in the order it\n * was first reached.\n */\nexport function shapeSources(scene: AnyScene, ids: readonly string[]): string[] {\n const out = new Set<string>();\n const walked = new Set<string>();\n const visit = (id: string, reached: boolean): void => {\n if (walked.has(id)) return;\n walked.add(id);\n if (reached && derivesPathOnly(scene, id)) return;\n const node = scene.get(asNodeId(id));\n const deps = node?.derivePose === undefined\n ? []\n : node.dependsOn === 'children' ? scene.childrenOf(asNodeId(id)) : node.dependsOn ?? [];\n if (deps.length === 0 && node?.dependsOn !== 'children') out.add(id);\n else for (const dep of deps) visit(dep, true);\n };\n for (const id of ids) visit(id, false);\n return [...out];\n}\n\n/** `id` and everything under it, a parent ahead of its children. */\nexport function subtreeIds(scene: AnyScene, id: NodeId): NodeId[] {\n const out: NodeId[] = [];\n const walk = (at: NodeId): void => {\n out.push(at);\n for (const child of scene.childrenOf(at)) walk(child);\n };\n walk(id);\n return out;\n}\n\n/**\n * The nodes whose stored pose has to change for `ids` to move as a unit: each\n * selected node and its descendants, less any stored in the frame of another\n * node in the set, which that frame carries.\n */\nexport function translateTargets(\n scene: AnyScene,\n frame: PoseFrame<unknown>,\n ids: readonly string[],\n): NodeId[] {\n const moving = new Set<NodeId>();\n for (const root of selectedRoots(scene, ids)) {\n for (const id of subtreeIds(scene, root)) moving.add(id);\n }\n return [...moving].filter((id) => {\n const storedIn = frame.frame(id);\n return storedIn === null || !moving.has(storedIn);\n });\n}\n\n/**\n * Move each of `moves` by its own delta, taking along whatever has to be\n * written for that node to move as a unit ({@link translateTargets}). Every\n * world pose is read before the first write, so one move cannot shift what a\n * later one reads. Call inside a `scene.batch`.\n */\nexport function translateEach(\n scene: AnyScene,\n frame: PoseFrame<unknown>,\n descriptor: PoseDescriptor<unknown>,\n moves: readonly { id: string; dx: number; dy: number }[],\n finish?: TransformFinisher,\n label = 'Translate',\n): void {\n const writes: { id: NodeId; to: unknown }[] = [];\n const seen = new Set<NodeId>();\n for (const { id, dx, dy } of moves) {\n if (dx === 0 && dy === 0) continue;\n for (const target of translateTargets(scene, frame, [id])) {\n if (seen.has(target)) continue;\n seen.add(target);\n const node = scene.get(target);\n if (!node) continue;\n const d = poseDescriptorForNode(descriptor, node);\n writes.push({ id: target, to: frame.local(target, translatePoseViaDescriptor(frame.world(target), dx, dy, d)) });\n }\n }\n const ops = writes.map(({ id, to }) => createTransformOp({ id, from: scene.get(id)!.pose, to, label }));\n const all = finish && ops.length > 0 ? finish(ops, label) : ops;\n if (!all) return;\n const adapter = sceneMutators(scene);\n for (const op of all) op.apply(adapter);\n}\n\n/** The world translation `(dx, dy)` as a translation of `id`'s stored pose,\n * which under a turned frame points another way. */\nexport function storedDelta(\n frame: PoseFrame<unknown>,\n descriptor: PoseDescriptor<unknown>,\n id: NodeId,\n dx: number,\n dy: number,\n): { dx: number; dy: number } {\n if (frame.frame(id) === null) return { dx, dy };\n const world = frame.world(id);\n const from = descriptor.getBounds(frame.local(id, world));\n const to = descriptor.getBounds(frame.local(id, translatePoseViaDescriptor(world, dx, dy, descriptor)));\n return { dx: to.x - from.x, dy: to.y - from.y };\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"selectionSubtree.js","names":[],"sources":["../../../src/interactions/actions/selectionSubtree.ts"],"sourcesContent":["import { outermost } from '@weasel-js/select';\nimport type { NodeId, Scene } from 'core/scene/types';\nimport { asNodeId } from 'core/scene/types';\nimport type { PoseFrame } from './poseFrame';\nimport type { TransformFinisher } from './transformFinish';\nimport { createTransformOp } from 'core/ops/transform';\nimport { sceneMutators } from 'core/scene/sceneMutators';\nimport { poseDescriptorForNode, translatePoseViaDescriptor, type PoseDescriptor } from 'core/geometry/poseDescriptor';\n\ntype AnyScene = Scene<unknown, string, unknown>;\n\n/** The ids in `ids` that are in the scene and that no ancestor in `ids` holds. */\nexport function selectedRoots(scene: AnyScene, ids: readonly string[]): NodeId[] {\n const parentOf = (id: string) => scene.get(asNodeId(id))?.parent ?? null;\n return outermost(ids, parentOf).map((id) => asNodeId(id)).filter((id) => scene.get(id) !== undefined);\n}\n\n/** Whether `id` draws a path derived from other nodes. Its pose is a\n * placeholder: the path follows the nodes it derives from. */\nfunction derivesPathOnly(scene: AnyScene, id: string): boolean {\n const node = scene.get(asNodeId(id));\n return node?.derivePath !== undefined && node.derivePose === undefined\n && Array.isArray(node.dependsOn) && node.dependsOn.length > 0;\n}\n\n/**\n * The nodes a translation of `ids` has to act on. A node whose pose is derived\n * from an id list cannot be moved itself, since a pose written to it is\n * overwritten on the next read, so the nodes it derives from stand in for it,\n * through however many derived nodes that takes. A node reached that way which\n * derives only its path — a wire under a label — follows its own dependencies\n * and is not written. Each id appears once, in the order it was first reached.\n */\nexport function moveSources(scene: AnyScene, ids: readonly string[]): string[] {\n const out = new Set<string>();\n const walked = new Set<string>();\n const visit = (id: string, reached: boolean): void => {\n if (walked.has(id)) return;\n walked.add(id);\n if (reached && derivesPathOnly(scene, id)) return;\n const node = scene.get(asNodeId(id));\n const deps = node?.derivePose !== undefined && Array.isArray(node.dependsOn) ? node.dependsOn : [];\n if (deps.length === 0) out.add(id);\n else for (const dep of deps) visit(dep, true);\n };\n for (const id of ids) visit(id, false);\n return [...out];\n}\n\n/**\n * The nodes a resize, rotation, flip, or alignment of `ids` has to write. A\n * node whose pose is derived cannot be written itself, so what it derives\n * from stands in for it — a container's children, or the ids a node names —\n * through however many derived nodes that takes, leaving out one reached that\n * way which derives only its path, as {@link moveSources} does. Each id appears once, in the order it\n * was first reached.\n */\nexport function shapeSources(scene: AnyScene, ids: readonly string[]): string[] {\n const out = new Set<string>();\n const walked = new Set<string>();\n const visit = (id: string, reached: boolean): void => {\n if (walked.has(id)) return;\n walked.add(id);\n if (reached && derivesPathOnly(scene, id)) return;\n const node = scene.get(asNodeId(id));\n const deps = node?.derivePose === undefined\n ? []\n : node.dependsOn === 'children' ? scene.childrenOf(asNodeId(id)) : node.dependsOn ?? [];\n if (deps.length === 0 && node?.dependsOn !== 'children') out.add(id);\n else for (const dep of deps) visit(dep, true);\n };\n for (const id of ids) visit(id, false);\n return [...out];\n}\n\n/** `id` and everything under it, a parent ahead of its children. */\nexport function subtreeIds(scene: AnyScene, id: NodeId): NodeId[] {\n const out: NodeId[] = [];\n const walk = (at: NodeId): void => {\n out.push(at);\n for (const child of scene.childrenOf(at)) walk(child);\n };\n walk(id);\n return out;\n}\n\n/**\n * The nodes whose stored pose has to change for `ids` to move as a unit: each\n * selected node and its descendants, less any stored in the frame of another\n * node in the set, which that frame carries.\n */\nexport function translateTargets(\n scene: AnyScene,\n frame: PoseFrame<unknown>,\n ids: readonly string[],\n): NodeId[] {\n const moving = new Set<NodeId>();\n for (const root of selectedRoots(scene, ids)) {\n for (const id of subtreeIds(scene, root)) moving.add(id);\n }\n return [...moving].filter((id) => {\n const storedIn = frame.frame(id);\n return storedIn === null || !moving.has(storedIn);\n });\n}\n\n/**\n * Move each of `moves` by its own delta, taking along whatever has to be\n * written for that node to move as a unit ({@link translateTargets}). Every\n * world pose is read before the first write, so one move cannot shift what a\n * later one reads. Call inside a `scene.batch`.\n */\nexport function translateEach(\n scene: AnyScene,\n frame: PoseFrame<unknown>,\n descriptor: PoseDescriptor<unknown>,\n moves: readonly { id: string; dx: number; dy: number }[],\n finish?: TransformFinisher,\n label = 'Translate',\n): void {\n const writes: { id: NodeId; to: unknown }[] = [];\n const seen = new Set<NodeId>();\n for (const { id, dx, dy } of moves) {\n if (dx === 0 && dy === 0) continue;\n for (const target of translateTargets(scene, frame, [id])) {\n if (seen.has(target)) continue;\n seen.add(target);\n const node = scene.get(target);\n if (!node) continue;\n const d = poseDescriptorForNode(descriptor, node);\n writes.push({ id: target, to: frame.local(target, translatePoseViaDescriptor(frame.world(target), dx, dy, d)) });\n }\n }\n const ops = writes.map(({ id, to }) => createTransformOp({ id, from: scene.get(id)!.pose, to, label }));\n const all = finish && ops.length > 0 ? finish(ops, label) : ops;\n if (!all) return;\n const adapter = sceneMutators(scene);\n for (const op of all) op.apply(adapter);\n}\n\n/** The world translation `(dx, dy)` as a translation of `id`'s stored pose,\n * which under a turned frame points another way. */\nexport function storedDelta(\n frame: PoseFrame<unknown>,\n descriptor: PoseDescriptor<unknown>,\n id: NodeId,\n dx: number,\n dy: number,\n): { dx: number; dy: number } {\n if (frame.frame(id) === null) return { dx, dy };\n const world = frame.world(id);\n const from = descriptor.getBounds(frame.local(id, world));\n const to = descriptor.getBounds(frame.local(id, translatePoseViaDescriptor(world, dx, dy, descriptor)));\n return { dx: to.x - from.x, dy: to.y - from.y };\n}\n"],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/interactions/actions/spatialReference.ts
|
|
2
2
|
/**
|
|
3
3
|
* The world bounds `ref` names — a point comes back as a zero-size rect — or
|
|
4
4
|
* `null` when it names nothing right now (no pointer, a missing node, a
|
|
@@ -39,6 +39,5 @@ function actionReferenceSources(params, pointer, scene, frame, boxes) {
|
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
//#endregion
|
|
43
42
|
export { actionReferenceSources, resolveSpatialReference };
|
|
44
43
|
//# sourceMappingURL=spatialReference.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/interactions/actions/testUtils.ts
|
|
2
2
|
/**
|
|
3
3
|
* Build an inert {@link EditAnchorsDep} for action unit tests. Every
|
|
4
4
|
* member has a harmless default; override just the ones a test cares
|
|
@@ -13,7 +13,6 @@ function makeEditAnchorsDep(over = {}) {
|
|
|
13
13
|
let selected = /* @__PURE__ */ new Set();
|
|
14
14
|
let marquee = null;
|
|
15
15
|
let handleLocks;
|
|
16
|
-
let tool = null;
|
|
17
16
|
return Object.defineProperties({
|
|
18
17
|
get handleLocks() {
|
|
19
18
|
return handleLocks;
|
|
@@ -38,16 +37,9 @@ function makeEditAnchorsDep(over = {}) {
|
|
|
38
37
|
},
|
|
39
38
|
setMarquee(rect) {
|
|
40
39
|
marquee = rect;
|
|
41
|
-
},
|
|
42
|
-
get tool() {
|
|
43
|
-
return tool;
|
|
44
|
-
},
|
|
45
|
-
setTool(id) {
|
|
46
|
-
tool = id;
|
|
47
40
|
}
|
|
48
41
|
}, Object.getOwnPropertyDescriptors(over));
|
|
49
42
|
}
|
|
50
43
|
|
|
51
|
-
//#endregion
|
|
52
44
|
export { makeEditAnchorsDep };
|
|
53
45
|
//# sourceMappingURL=testUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testUtils.js","names":[],"sources":["../../../src/interactions/actions/testUtils.ts"],"sourcesContent":["import type { NodeId, PoseOverrides } from 'core/scene/types';\nimport type { ActionDeps } from '@weasel-js/routing';\nimport type { MoveEnd } from '../gestures/types';\nimport type { EditAnchorsDep } from './depSchema';\n\n/**\n * Deps for an action unit test, stubbing only the slice the action reads.\n * Such stubs fall short of the full `DepSchema` types an action's deps carry,\n * and this is where they are let through.\n */\nexport function stubDeps(deps: Record<string, unknown>): ActionDeps {\n return deps as ActionDeps;\n}\n\n/**\n * What a move behavior's `onEnd` is told, for a test calling it directly:\n * unanswered and released at the world origin, with a `translateOps` that\n * emits nothing unless one is given.\n */\nexport function moveEnd(translateOps: MoveEnd['translateOps'] = () => []): MoveEnd {\n return { answered: false, translateOps, pointer: { x: 0, y: 0 } };\n}\n\n/**\n * Build an inert {@link EditAnchorsDep} for action unit tests. Every\n * member has a harmless default; override just the ones a test cares\n * about.\n *\n * Anchor selection and the marquee default to a **live** in-memory store\n * rather than a no-op, because most anchor-editing actions read back what\n * they wrote (select-then-nudge, marquee-then-delete). A test that wants\n * to assert the write instead of the round trip can pass its own spies.\n */\nexport function makeEditAnchorsDep(over: Partial<EditAnchorsDep> = {}): EditAnchorsDep {\n let selected: ReadonlySet<number> = new Set();\n let marquee: EditAnchorsDep['marquee'] = null;\n let handleLocks: EditAnchorsDep['handleLocks'];\n
|
|
1
|
+
{"version":3,"file":"testUtils.js","names":[],"sources":["../../../src/interactions/actions/testUtils.ts"],"sourcesContent":["import type { NodeId, PoseOverrides } from 'core/scene/types';\nimport type { ActionDeps } from '@weasel-js/routing';\nimport type { MoveEnd } from '../gestures/types';\nimport type { EditAnchorsDep } from './depSchema';\n\n/**\n * Deps for an action unit test, stubbing only the slice the action reads.\n * Such stubs fall short of the full `DepSchema` types an action's deps carry,\n * and this is where they are let through.\n */\nexport function stubDeps(deps: Record<string, unknown>): ActionDeps {\n return deps as ActionDeps;\n}\n\n/**\n * What a move behavior's `onEnd` is told, for a test calling it directly:\n * unanswered and released at the world origin, with a `translateOps` that\n * emits nothing unless one is given.\n */\nexport function moveEnd(translateOps: MoveEnd['translateOps'] = () => []): MoveEnd {\n return { answered: false, translateOps, pointer: { x: 0, y: 0 } };\n}\n\n/**\n * Build an inert {@link EditAnchorsDep} for action unit tests. Every\n * member has a harmless default; override just the ones a test cares\n * about.\n *\n * Anchor selection and the marquee default to a **live** in-memory store\n * rather than a no-op, because most anchor-editing actions read back what\n * they wrote (select-then-nudge, marquee-then-delete). A test that wants\n * to assert the write instead of the round trip can pass its own spies.\n */\nexport function makeEditAnchorsDep(over: Partial<EditAnchorsDep> = {}): EditAnchorsDep {\n let selected: ReadonlySet<number> = new Set();\n let marquee: EditAnchorsDep['marquee'] = null;\n let handleLocks: EditAnchorsDep['handleLocks'];\n const base: EditAnchorsDep = {\n get handleLocks() {\n return handleLocks;\n },\n setHandleLocks(next) {\n handleLocks = next;\n },\n editingId: 'node-a',\n setEditingId: () => {},\n getStorageKind: () => 'pose',\n getNodeShape: () => null,\n getEditablePath: () => null,\n applyEdit: () => {},\n get selectedAnchors() {\n return selected;\n },\n setSelectedAnchors(next: Iterable<number>) {\n selected = new Set(next);\n },\n get marquee() {\n return marquee;\n },\n setMarquee(rect) {\n marquee = rect;\n },\n };\n // Spread order matters: an explicit `selectedAnchors` / `marquee`\n // override must win over the accessor pair above, so copy descriptors\n // rather than plain-assigning (a getter would otherwise be clobbered by\n // an undefined value or survive a legitimate override).\n return Object.defineProperties(\n base,\n Object.getOwnPropertyDescriptors(over),\n ) as EditAnchorsDep;\n}\n\n/** The pose a transform drag publishes for `id` to the scene's overrides, or\n * null: where the drag shows it, since its handle carries no pose. */\nexport function heldPose(scene: unknown, id: string): unknown {\n return (scene as { overrides: PoseOverrides<unknown> }).overrides.read(id as NodeId)?.pose ?? null;\n}\n"],"mappings":";;;;;;;;;;;AAiCA,SAAgB,mBAAmB,OAAgC,CAAC,GAAmB;CACrF,IAAI,2BAAgC,IAAI,IAAI;CAC5C,IAAI,UAAqC;CACzC,IAAI;CA+BJ,OAAO,OAAO,iBACZ;EA9BA,IAAI,cAAc;GAChB,OAAO;EACT;EACA,eAAe,MAAM;GACnB,cAAc;EAChB;EACA,WAAW;EACX,oBAAoB,CAAC;EACrB,sBAAsB;EACtB,oBAAoB;EACpB,uBAAuB;EACvB,iBAAiB,CAAC;EAClB,IAAI,kBAAkB;GACpB,OAAO;EACT;EACA,mBAAmB,MAAwB;GACzC,WAAW,IAAI,IAAI,IAAI;EACzB;EACA,IAAI,UAAU;GACZ,OAAO;EACT;EACA,WAAW,MAAM;GACf,UAAU;EACZ;CAOA,GACA,OAAO,0BAA0B,IAAI,CACvC;AACF"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { poseDescriptorOf } from "../poseDescriptorDep.js";
|
|
2
1
|
import { commitTransformOps, transformApplyOps } from "../transformFinish.js";
|
|
3
|
-
import { lastTransform, recordTransform } from "./memory.js";
|
|
4
|
-
import { requiresSelection } from "../defaults/requiresSelection.js";
|
|
5
|
-
import { resizeSelectionOps } from "../resize/replay.js";
|
|
6
2
|
import { DUPLICATE_OFFSET, duplicateSelection } from "../defaults/duplicate.js";
|
|
7
3
|
import { translateSelection } from "../defaults/nudge.js";
|
|
4
|
+
import { requiresSelection } from "../defaults/requiresSelection.js";
|
|
5
|
+
import { poseDescriptorOf } from "../poseDescriptorDep.js";
|
|
6
|
+
import { resizeSelectionOps } from "../resize/replay.js";
|
|
8
7
|
import { rotateSelectionOps } from "../rotate/replay.js";
|
|
8
|
+
import { lastTransform, recordTransform } from "./memory.js";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/interactions/actions/transform-again/action.ts
|
|
11
11
|
var LABEL = "Transform Again";
|
|
12
12
|
/** With nothing recorded yet, a repeat is a plain duplicate. */
|
|
13
13
|
var FIRST = {
|
|
@@ -75,6 +75,5 @@ var transformAgainAction = {
|
|
|
75
75
|
enabled: requiresSelection
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
-
//#endregion
|
|
79
78
|
export { transformAgainAction };
|
|
80
79
|
//# sourceMappingURL=action.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/interactions/actions/transform-again/memory.ts
|
|
2
2
|
var LAST = /* @__PURE__ */ new WeakMap();
|
|
3
3
|
function sameIds(a, b) {
|
|
4
4
|
if (a.length !== b.length) return false;
|
|
@@ -41,6 +41,5 @@ function forgetTransform(scene) {
|
|
|
41
41
|
LAST.delete(scene);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
//#endregion
|
|
45
44
|
export { forgetTransform, lastTransform, recordTransform };
|
|
46
45
|
//# sourceMappingURL=memory.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { commitOps } from "./defaultCommitAdapter.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/interactions/actions/transformFinish.ts
|
|
4
4
|
/** Every follower in `deps.transformFollowers` finishing the batch in turn, as a {@link TransformFinisher}; undefined with none. */
|
|
5
5
|
function transformFinisher(deps) {
|
|
6
6
|
const followers = deps?.transformFollowers;
|
|
@@ -101,6 +101,5 @@ function transformPreview(deps, scene, previews) {
|
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
//#endregion
|
|
105
104
|
export { commitTransformOps, finishTransformOps, transformApplyOps, transformFinisher, transformPreview };
|
|
106
105
|
//# sourceMappingURL=transformFinish.js.map
|
|
@@ -3,7 +3,7 @@ import { useLatest } from "@weasel-js/react";
|
|
|
3
3
|
import "@weasel-js/routing";
|
|
4
4
|
import { useActionsRegistry, useOptionalActiveToolContext, useOptionalDepRegistry } from "@weasel-js/routing/react";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/interactions/actions/useActionSet.ts
|
|
7
7
|
/**
|
|
8
8
|
* The two halves of `useStandardActions`, apart from the action list it
|
|
9
9
|
* defaults to, so a canvas that names its own set never loads the kit's.
|
|
@@ -78,6 +78,5 @@ function useActionSet(actions, exclude) {
|
|
|
78
78
|
]);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
//#endregion
|
|
82
81
|
export { useActionSet, useStandardDeps };
|
|
83
82
|
//# sourceMappingURL=useActionSet.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useDepSource } from "@weasel-js/routing/react";
|
|
2
|
+
|
|
3
|
+
// src/interactions/actions/useNotices.ts
|
|
4
|
+
/** Publish the host's notice surface as the `notices` dep, where actions tell
|
|
5
|
+
* the user something went wrong. Silently does nothing outside a
|
|
6
|
+
* `<DepRegistryProvider>`. */
|
|
7
|
+
function useNotices(notices) {
|
|
8
|
+
useDepSource("notices", () => notices);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { useNotices };
|
|
12
|
+
//# sourceMappingURL=useNotices.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNotices.js","names":[],"sources":["../../../src/interactions/actions/useNotices.ts"],"sourcesContent":["import { useDepSource } from '@weasel-js/routing/react';\nimport type { NoticesDep } from './notices';\n\n/** Publish the host's notice surface as the `notices` dep, where actions tell\n * the user something went wrong. Silently does nothing outside a\n * `<DepRegistryProvider>`. */\nexport function useNotices(notices: NoticesDep): void {\n useDepSource('notices', () => notices);\n}\n"],"mappings":";;;;;;AAMA,SAAgB,WAAW,SAA2B;CACpD,aAAa,iBAAiB,OAAO;AACvC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { KIT_STANDARD_ACTIONS } from "../../canvas/SceneCanvas/namedPresets.js";
|
|
2
2
|
import { useActionSet, useStandardDeps } from "./useActionSet.js";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/interactions/actions/useStandardActions.ts
|
|
5
5
|
/** Every id `useStandardActions` can register, each core preset's in turn and
|
|
6
6
|
* then the tool-driven ones. It holds `clipboard.pasteEvent` back while
|
|
7
7
|
* `ingest` is registered. */
|
|
@@ -22,6 +22,5 @@ function useStandardActions(opts) {
|
|
|
22
22
|
useActionSet(actions, exclude);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
//#endregion
|
|
26
25
|
export { KIT_STANDARD_ACTION_IDS, useStandardActions };
|
|
27
26
|
//# sourceMappingURL=useStandardActions.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback, useMemo, useRef, useState } from "react";
|
|
2
2
|
import { useLatest } from "@weasel-js/react";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/interactions/gestures/dragGesture/dragGesture.ts
|
|
5
5
|
/**
|
|
6
6
|
* The base drag primitive: tracks a pointer from press to release, with an
|
|
7
7
|
* optional threshold below which the gesture stays pending and commits
|
|
@@ -144,6 +144,5 @@ function useDragGesture(options = {}) {
|
|
|
144
144
|
]);
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
//#endregion
|
|
148
147
|
export { useDragGesture };
|
|
149
148
|
//# sourceMappingURL=dragGesture.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { clientToWorld } from "../../../core/viewport/clientToWorld.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/interactions/gestures/dragGesture/dragPointOf.ts
|
|
4
4
|
var IDENTITY = {
|
|
5
5
|
x: 0,
|
|
6
6
|
y: 0,
|
|
@@ -25,6 +25,5 @@ function dragPointOf(event, element, view = IDENTITY) {
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
//#endregion
|
|
29
28
|
export { dragPointOf };
|
|
30
29
|
//# sourceMappingURL=dragPointOf.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { dlog } from "../../../debug/flag.js";
|
|
2
1
|
import { useDragGesture } from "../dragGesture/dragGesture.js";
|
|
2
|
+
import { dlog } from "../../../debug/flag.js";
|
|
3
3
|
import { useCallback, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { useLatest } from "@weasel-js/react";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/interactions/gestures/dragRadial/dragRadial.ts
|
|
7
7
|
function stateFrom(s) {
|
|
8
8
|
const dx = s.current.x - s.center.x;
|
|
9
9
|
const dy = s.current.y - s.center.y;
|
|
@@ -148,6 +148,5 @@ function useDragRadial(options = {}) {
|
|
|
148
148
|
]);
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
//#endregion
|
|
152
151
|
export { useDragRadial };
|
|
153
152
|
//# sourceMappingURL=dragRadial.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { dlog } from "../../../debug/flag.js";
|
|
2
1
|
import { useDragGesture } from "../dragGesture/dragGesture.js";
|
|
2
|
+
import { dlog } from "../../../debug/flag.js";
|
|
3
3
|
import { useCallback, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { useLatest } from "@weasel-js/react";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/interactions/gestures/dragRect/dragRect.ts
|
|
7
7
|
function boundsFrom(start, current) {
|
|
8
8
|
return {
|
|
9
9
|
x: Math.min(start.x, current.x),
|
|
@@ -203,6 +203,5 @@ function useDragRect(options = {}) {
|
|
|
203
203
|
]);
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
//#endregion
|
|
207
206
|
export { useDragRect };
|
|
208
207
|
//# sourceMappingURL=dragRect.js.map
|