@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
|
@@ -2,7 +2,7 @@ import { useCallback, useEffect, useRef } from "react";
|
|
|
2
2
|
import { useLatest } from "@weasel-js/react";
|
|
3
3
|
import { clientToCanvasRect, openPointerSession } from "@weasel-js/routing";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/interactions/gestures/handleDrag/handleDrag.ts
|
|
6
6
|
function defaultRectEl(target) {
|
|
7
7
|
if (target instanceof SVGElement && target.ownerSVGElement) return target.ownerSVGElement;
|
|
8
8
|
return target;
|
|
@@ -58,6 +58,5 @@ function useHandleDrag(opts) {
|
|
|
58
58
|
}, [optsRef]) };
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
//#endregion
|
|
62
61
|
export { useHandleDrag };
|
|
63
62
|
//# sourceMappingURL=handleDrag.js.map
|
|
@@ -3,7 +3,7 @@ import { useKitSettings, useLatest } from "@weasel-js/react";
|
|
|
3
3
|
import { openPointerSession, pastDragThreshold } from "@weasel-js/routing";
|
|
4
4
|
import { fixedSeat } from "@weasel-js/gestures";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/interactions/gestures/pointerDrag/pointerDrag.ts
|
|
7
7
|
var dropZones = /* @__PURE__ */ new Set();
|
|
8
8
|
var activeDrag = null;
|
|
9
9
|
function registerDropZone(zone) {
|
|
@@ -205,6 +205,5 @@ function useDropZone(opts) {
|
|
|
205
205
|
}, [optsRef]);
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
//#endregion
|
|
209
208
|
export { useDragHandle, useDropZone };
|
|
210
209
|
//# sourceMappingURL=pointerDrag.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isPathLike } from "../../../core/geometry/autoPoseDescriptor.js";
|
|
2
2
|
import { boundsOfPath, translatePath } from "@weasel-js/geom";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/interactions/gestures/shared/originProjection.ts
|
|
5
5
|
/** Identity projection for `TPose extends { x; y }`. */
|
|
6
6
|
var RECT_ORIGIN_PROJECTION = {
|
|
7
7
|
getOrigin: (p) => ({
|
|
@@ -44,6 +44,5 @@ var AUTO_ORIGIN_PROJECTION = {
|
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
//#endregion
|
|
48
47
|
export { AUTO_ORIGIN_PROJECTION, RECT_ORIGIN_PROJECTION };
|
|
49
48
|
//# sourceMappingURL=originProjection.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { pxExtent } from "@weasel-js/geom";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/interactions/gestures/shared/screenTolerance.ts
|
|
4
4
|
/** A screen-pixel tolerance in world units, per axis, through the camera of
|
|
5
5
|
* the view the gesture landed in. With no view, one pixel is one unit. */
|
|
6
6
|
function screenTolerance(px, ctx) {
|
|
@@ -31,6 +31,5 @@ function gestureReaders(deps) {
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
//#endregion
|
|
35
34
|
export { gesturePlaneReader, gestureReaders, gestureViewReader, screenTolerance };
|
|
36
35
|
//# sourceMappingURL=screenTolerance.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { openPointerSession, pastDragThreshold } from "@weasel-js/routing";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/interactions/gestures/thresholdDrag/thresholdDrag.ts
|
|
4
4
|
/** Begin a threshold-gated drag from a React PointerDown event; returns a handle exposing live state. */
|
|
5
5
|
function startThresholdDrag(e, opts) {
|
|
6
6
|
const start = {
|
|
@@ -59,6 +59,5 @@ function startThresholdDrag(e, opts) {
|
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
//#endregion
|
|
63
62
|
export { startThresholdDrag };
|
|
64
63
|
//# sourceMappingURL=thresholdDrag.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ANCHOR_HIT_BASE_PX, HANDLE_BASE_PX, ROTATION_HANDLE_BASE_PX } from "./core/device/targets.js";
|
|
2
2
|
import { DEFAULT_VIEW_ANIMATION_MS } from "./core/viewport/useViewAnimation.js";
|
|
3
|
-
import {
|
|
4
|
-
import { ANCHOR_CLICK_PX } from "./interactions/actions/defaults/anchorEditing.js";
|
|
3
|
+
import { DEFAULT_PICK_TOLERANCE_PX } from "./canvas/SceneCanvas/useSceneSelectTool.js";
|
|
5
4
|
import { SEGMENT_HIT_PX } from "./interactions/actions/defaults/segmentUnder.js";
|
|
5
|
+
import { ANCHOR_CLICK_PX } from "./interactions/actions/defaults/anchorEditing.js";
|
|
6
6
|
import { ANCHOR_RADIUS_PX, CLOSE_HINT_RADIUS_PX, HANDLE_DOT_RADIUS_PX, PEN_CLOSE_HIT_PX } from "./domains/paths/penPreviewLayer.js";
|
|
7
|
+
import { DEFAULT_SNAP_PX } from "./domains/snap/session2d.js";
|
|
7
8
|
import { SLICE_CLOSE_HIT_PX, VERTEX_RADIUS_PX } from "./tools/builtin/slice/useSliceTool.js";
|
|
8
|
-
import { DEFAULT_PICK_TOLERANCE_PX } from "./canvas/SceneCanvas/useSceneSelectTool.js";
|
|
9
9
|
import { DOUBLE_CLICK_MAX_MS, DOUBLE_CLICK_MAX_PX, DRAG_THRESHOLD_PX, LONG_PRESS_MS, TAP_THRESHOLD_PX } from "@weasel-js/gestures";
|
|
10
10
|
import { pref } from "@weasel-js/prefs";
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// src/kitSettingsSchema.ts
|
|
13
13
|
var ms = {
|
|
14
14
|
scale: 1,
|
|
15
15
|
suffix: "ms"
|
|
@@ -78,6 +78,5 @@ var coreKitSettingsSchema = pref.group("Canvas", {
|
|
|
78
78
|
view: pref.group("View", { animationMs: msLeaf("Camera animation", DEFAULT_VIEW_ANIMATION_MS, 0) })
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
-
//#endregion
|
|
82
81
|
export { coreKitSettingsSchema };
|
|
83
82
|
//# sourceMappingURL=kitSettingsSchema.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/test-hook/createTestHook.ts
|
|
2
2
|
function createTestHook(refs) {
|
|
3
3
|
let resolveReady;
|
|
4
4
|
const ready = new Promise((r) => {
|
|
@@ -37,6 +37,5 @@ function createTestHook(refs) {
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
//#endregion
|
|
41
40
|
export { createTestHook };
|
|
42
41
|
//# sourceMappingURL=createTestHook.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createTestHook } from "./createTestHook.js";
|
|
2
2
|
import { isDev } from "@weasel-js/react";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/test-hook/install.ts
|
|
5
5
|
/** Hooks of the canvases mounted now, oldest first. `window.__weaselTest` is the first. */
|
|
6
6
|
var live = [];
|
|
7
7
|
/** Make a hook for this canvas and return it iff
|
|
@@ -32,6 +32,5 @@ function releaseTestHook(hook) {
|
|
|
32
32
|
else delete window.__weaselTest;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
//#endregion
|
|
36
35
|
export { installTestHookIfRequested, releaseTestHook };
|
|
37
36
|
//# sourceMappingURL=install.js.map
|
|
@@ -2,7 +2,7 @@ import { installTestHookIfRequested, releaseTestHook } from "./install.js";
|
|
|
2
2
|
import { useEffect } from "react";
|
|
3
3
|
import { isDev, useLatest } from "@weasel-js/react";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/test-hook/useTestHook.ts
|
|
6
6
|
/** The test hook for one canvas: opt-in via `?test=1`, never in a production
|
|
7
7
|
* build. `read` is called for the values of the last committed render. */
|
|
8
8
|
function useTestHook(read) {
|
|
@@ -24,6 +24,5 @@ function useTestHook(read) {
|
|
|
24
24
|
}, [live]);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
//#endregion
|
|
28
27
|
export { useTestHook };
|
|
29
28
|
//# sourceMappingURL=useTestHook.js.map
|
package/dist/test-seams.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { E as EditAnchorsDep, P as PathEditMark, a as PathEditExtension, H as HandleLocks, S as SnapSource, b as SnapGesture, c as SnapConstrain, d as SnapResizeBox, e as SnapGeometry, f as SnapOutcomeStore, g as SnapSession } from './depSchema-
|
|
2
|
-
export { _ as _resetPaintKindsForTests } from './depSchema-
|
|
1
|
+
import { E as EditAnchorsDep, P as PathEditMark, a as PathEditExtension, H as HandleLocks, S as SnapSource, b as SnapGesture, c as SnapConstrain, d as SnapResizeBox, e as SnapGeometry, f as SnapOutcomeStore, g as SnapAnchors, h as SnapSession } from './depSchema-C7a_OMt-.js';
|
|
2
|
+
export { _ as _resetPaintKindsForTests } from './depSchema-C7a_OMt-.js';
|
|
3
3
|
export { _resetMarkersForTests } from '@weasel-js/stroke/test-seams';
|
|
4
|
-
import { S as Scene } from './types-
|
|
4
|
+
import { S as Scene } from './types-BUvUXZe5.js';
|
|
5
5
|
import { SelectionApi, ActionTunings, WorldPoint, ResizeAnchor } from '@weasel-js/routing';
|
|
6
6
|
import { Op } from '@weasel-js/history';
|
|
7
7
|
import { View } from '@weasel-js/geom';
|
|
@@ -19,8 +19,8 @@ import '@weasel-js/cursor';
|
|
|
19
19
|
import '@weasel-js/gestures';
|
|
20
20
|
import '@weasel-js/geom/nd';
|
|
21
21
|
import '@weasel-js/animator';
|
|
22
|
-
import './types-VCtfchp-.js';
|
|
23
22
|
import './clone-Bz4iqGfE.js';
|
|
23
|
+
import './types-VCtfchp-.js';
|
|
24
24
|
import '@weasel-js/react';
|
|
25
25
|
import '@weasel-js/quantity';
|
|
26
26
|
|
|
@@ -72,16 +72,6 @@ interface PathEditState {
|
|
|
72
72
|
* pressed. Not tied to the edited path, so they outlast a change of it. */
|
|
73
73
|
getHandleLocks(): HandleLocks | null;
|
|
74
74
|
setHandleLocks(next: HandleLocks): void;
|
|
75
|
-
/**
|
|
76
|
-
* The path-edit tool in use, or null for plain anchor editing. Path edit has
|
|
77
|
-
* a set of named tools, one active at a time, each changing what a plain
|
|
78
|
-
* drag does: `'simplifyBrush'` brushes the path simpler. A tool belongs to
|
|
79
|
-
* the open path; with none open, or a different one, there is none.
|
|
80
|
-
*/
|
|
81
|
-
getTool(): string | null;
|
|
82
|
-
/** Switch tool, or pass null to go back to plain anchor editing. Ignored
|
|
83
|
-
* with no path open. */
|
|
84
|
-
setTool(id: string | null): void;
|
|
85
75
|
/** Notified when a write changes what the anchor overlay paints. A host
|
|
86
76
|
* that owns the id announces its own changes. */
|
|
87
77
|
subscribe(listener: () => void): () => void;
|
|
@@ -154,6 +144,9 @@ interface SnapSession2dOptions {
|
|
|
154
144
|
/** How a pose's origin, the point a grid or a guide snaps, is read.
|
|
155
145
|
* Default `AUTO_ORIGIN_PROJECTION`: a rect's `{x, y}`, a path's bounds. */
|
|
156
146
|
originProjection?: OriginProjection<unknown>;
|
|
147
|
+
/** Points of each node a move snaps, in its own box frame, as
|
|
148
|
+
* `SceneCanvasSnap.anchors`. */
|
|
149
|
+
anchors?: SnapAnchors;
|
|
157
150
|
/** How `view`'s world maps into the parallax plane the gesture's points
|
|
158
151
|
* are in. Default: they are in `view`'s own world. */
|
|
159
152
|
plane?: PlaneMap | null;
|
package/dist/test-seams.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { _resetPaintKindsForTests } from "./core/paint/paintKinds.js";
|
|
2
|
-
import { useEditAnchorsDepSource } from "./canvas/deps/editAnchors.js";
|
|
3
|
-
import { createSnapSession2d } from "./domains/snap/sceneSession2d.js";
|
|
4
2
|
import { makeEditAnchorsDep } from "./interactions/actions/testUtils.js";
|
|
3
|
+
import { useEditAnchorsDepSource } from "./canvas/deps/editAnchors.js";
|
|
5
4
|
import { rootsTree } from "./core/adapters/testing/rootsTree.js";
|
|
5
|
+
import { createSnapSession2d } from "./domains/snap/sceneSession2d.js";
|
|
6
6
|
import { _resetMarkersForTests } from "@weasel-js/stroke/test-seams";
|
|
7
7
|
|
|
8
8
|
export { _resetMarkersForTests, _resetPaintKindsForTests, createSnapSession2d as createSnapSession2dForTests, makeEditAnchorsDep as makeEditAnchorsDepForTests, rootsTree as rootsTreeForTests, useEditAnchorsDepSource as useEditAnchorsDepSourceForTests };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineTool } from "../../overlayBinding.js";
|
|
2
|
+
|
|
3
|
+
// src/tools/builtin/anchors/anchorsTool.ts
|
|
4
|
+
/** The id of {@link anchorsTool}, which `PATH_EDIT` names as its `defaultTool`. The `pathEdit`
|
|
5
|
+
* preset mounts it. */
|
|
6
|
+
var ANCHORS_TOOL_ID = "anchors";
|
|
7
|
+
/**
|
|
8
|
+
* Path edit's anchor editing, as a tool: what a drag in path edit does with no
|
|
9
|
+
* other path-edit tool on. It binds nothing. Anchor editing's bindings —
|
|
10
|
+
* `editAnchors`, the marquee, the segment bend and the rest the `pathEdit`
|
|
11
|
+
* preset registers — are ambient, so they take a gesture under any tool that
|
|
12
|
+
* leaves it unclaimed; a path-edit tool such as the Simplify brush claims the
|
|
13
|
+
* drag at the active tier, which outranks them. Holding the active slot is
|
|
14
|
+
* what this tool is for: it is the tool path edit starts on and Escape
|
|
15
|
+
* returns to.
|
|
16
|
+
*/
|
|
17
|
+
var anchorsTool = defineTool({
|
|
18
|
+
id: ANCHORS_TOOL_ID,
|
|
19
|
+
keybinding: { key: "A" },
|
|
20
|
+
capabilities: ["edits-anchors"],
|
|
21
|
+
hookName: "anchorsTool",
|
|
22
|
+
presentation: {
|
|
23
|
+
label: "Anchors",
|
|
24
|
+
icon: /* @icon */ "core:anchors",
|
|
25
|
+
group: "path-edit"
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export { ANCHORS_TOOL_ID, anchorsTool };
|
|
30
|
+
//# sourceMappingURL=anchorsTool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anchorsTool.js","names":[],"sources":["../../../../src/tools/builtin/anchors/anchorsTool.ts"],"sourcesContent":["import { defineTool, type Tool } from '../../overlayBinding';\nimport { icon } from '../../../icons.gen';\n\n/** The id of {@link anchorsTool}, which `PATH_EDIT` names as its `defaultTool`. The `pathEdit`\n * preset mounts it. */\nexport const ANCHORS_TOOL_ID = 'anchors';\n\n/**\n * Path edit's anchor editing, as a tool: what a drag in path edit does with no\n * other path-edit tool on. It binds nothing. Anchor editing's bindings —\n * `editAnchors`, the marquee, the segment bend and the rest the `pathEdit`\n * preset registers — are ambient, so they take a gesture under any tool that\n * leaves it unclaimed; a path-edit tool such as the Simplify brush claims the\n * drag at the active tier, which outranks them. Holding the active slot is\n * what this tool is for: it is the tool path edit starts on and Escape\n * returns to.\n */\nexport const anchorsTool: Tool = defineTool({\n id: ANCHORS_TOOL_ID,\n keybinding: { key: 'A' },\n capabilities: ['edits-anchors'],\n hookName: 'anchorsTool',\n presentation: { label: 'Anchors', icon: icon('anchors'), group: 'path-edit' },\n});\n"],"mappings":";;;;;AAKA,CAAA,CAAA,CAAA,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;;;;;;;;AAY/B,CAAA,CAAA,CAAA,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW;AAC1C,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACJ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAI,CAAA;AACvB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,CAAA;AAC9B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACV,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc;AAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,aAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAY,CAAA;AAC9E,CAAC,CAAA"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { INSERT_REPOSITION_BINDING } from "../../../interactions/actions/insert/repositionAction.js";
|
|
2
1
|
import { defineTool } from "../../overlayBinding.js";
|
|
2
|
+
import { INSERT_REPOSITION_BINDING } from "../../../interactions/actions/insert/repositionAction.js";
|
|
3
3
|
import { insertBindingBehaviors } from "../shared/insertToolOptions.js";
|
|
4
4
|
import { useMemo } from "react";
|
|
5
5
|
import { cursorFor } from "@weasel-js/cursor";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/tools/builtin/ellipse/useEllipseTool.tsx
|
|
8
8
|
/**
|
|
9
9
|
* Drag-to-draw ellipse tool. Mirrors `useRectTool`: the `drag` binding
|
|
10
10
|
* routes to `insertAction`, which owns the live preview and commits
|
|
@@ -36,6 +36,5 @@ function useEllipseTool(options = {}) {
|
|
|
36
36
|
}), [behaviors]);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
//#endregion
|
|
40
39
|
export { useEllipseTool };
|
|
41
40
|
//# sourceMappingURL=useEllipseTool.js.map
|
|
@@ -3,7 +3,7 @@ import { useMemo } from "react";
|
|
|
3
3
|
import { useLatest } from "@weasel-js/react";
|
|
4
4
|
import { cursorFor } from "@weasel-js/cursor";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/tools/builtin/eyedropper/useEyedropperTool.ts
|
|
7
7
|
/**
|
|
8
8
|
* Eyedropper. Click a node to sample its color; the consumer's `onPick`
|
|
9
9
|
* callback decides where the color goes. Engages as a sticky active-slot
|
|
@@ -64,6 +64,5 @@ function useEyedropperTool(opts) {
|
|
|
64
64
|
]);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
//#endregion
|
|
68
67
|
export { useEyedropperTool };
|
|
69
68
|
//# sourceMappingURL=useEyedropperTool.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/tools/builtin/hand/dragPanContribution.ts
|
|
2
2
|
/** Id of the entry {@link dragPanContribution} builds. */
|
|
3
3
|
var DRAG_PAN_ID = "viewport.dragPanBinding";
|
|
4
4
|
/** An always-live entry that pans the view on a drag no tool claims. No preset
|
|
@@ -20,6 +20,5 @@ function dragPanContribution(params = {}) {
|
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
//#endregion
|
|
24
23
|
export { DRAG_PAN_ID, dragPanContribution };
|
|
25
24
|
//# sourceMappingURL=dragPanContribution.js.map
|
|
@@ -2,7 +2,7 @@ import { defineTool } from "../../overlayBinding.js";
|
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { useLatest } from "@weasel-js/react";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/tools/builtin/hand/useHandTool.ts
|
|
6
6
|
/**
|
|
7
7
|
* Pan-on-drag tool. Registered in both the active slot (sticky, `H` key)
|
|
8
8
|
* and the hotkey slot (momentary, hold `space`).
|
|
@@ -38,6 +38,5 @@ function useHandTool(opts = {}) {
|
|
|
38
38
|
}] }), [optsRef]);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
//#endregion
|
|
42
41
|
export { useHandTool };
|
|
43
42
|
//# sourceMappingURL=useHandTool.js.map
|
|
@@ -2,7 +2,7 @@ import { defineTool } from "../../overlayBinding.js";
|
|
|
2
2
|
import { insertBindingBehaviors } from "../shared/insertToolOptions.js";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/tools/builtin/image/useImageTool.tsx
|
|
6
6
|
/**
|
|
7
7
|
* Drag-to-insert image tool. A drag-rect commits a leaf node with
|
|
8
8
|
* `data: { image: { src } }` through the dispatcher's `insertAction` + the
|
|
@@ -46,6 +46,5 @@ function useImageTool(options) {
|
|
|
46
46
|
]);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
//#endregion
|
|
50
49
|
export { useImageTool };
|
|
51
50
|
//# sourceMappingURL=useImageTool.js.map
|
|
@@ -2,7 +2,7 @@ import { defineTool } from "../../overlayBinding.js";
|
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { useLatest } from "@weasel-js/react";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/tools/builtin/lasso/useLassoTool.ts
|
|
6
6
|
/** Free-form polygon select Tool. Drag is handled entirely by the gesture
|
|
7
7
|
* dispatcher via the `lassoSelect` action binding below; the dispatcher
|
|
8
8
|
* overlay layer (`useDispatcherOverlayLayer`) paints the live polyline +
|
|
@@ -50,6 +50,5 @@ function useLassoTool(options = {}) {
|
|
|
50
50
|
]);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
//#endregion
|
|
54
53
|
export { useLassoTool };
|
|
55
54
|
//# sourceMappingURL=useLassoTool.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { INSERT_REPOSITION_BINDING } from "../../../interactions/actions/insert/repositionAction.js";
|
|
2
1
|
import { defineTool } from "../../overlayBinding.js";
|
|
2
|
+
import { INSERT_REPOSITION_BINDING } from "../../../interactions/actions/insert/repositionAction.js";
|
|
3
3
|
import { insertBindingBehaviors } from "../shared/insertToolOptions.js";
|
|
4
4
|
import { useMemo } from "react";
|
|
5
5
|
import { cursorFor } from "@weasel-js/cursor";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/tools/builtin/line/useLineTool.tsx
|
|
8
8
|
/**
|
|
9
9
|
* Drag-to-draw line tool. The `drag` binding routes to `insertAction`, which
|
|
10
10
|
* commits through the `insert` dep with `{ kind: 'line', a, b }` endpoints
|
|
@@ -38,6 +38,5 @@ function useLineTool(options = {}) {
|
|
|
38
38
|
}), [behaviors]);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
//#endregion
|
|
42
41
|
export { useLineTool };
|
|
43
42
|
//# sourceMappingURL=useLineTool.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineTool } from "../../overlayBinding.js";
|
|
2
|
-
import { MEASURE_ACTION_IDS } from "../../../domains/measure/actionIds.js";
|
|
3
2
|
import { measureCreateAction, measurePickAtAction } from "../../../domains/measure/measureGestures.js";
|
|
3
|
+
import { MEASURE_ACTION_IDS } from "../../../domains/measure/actionIds.js";
|
|
4
4
|
import { useMemo } from "react";
|
|
5
5
|
import { useLatest } from "@weasel-js/react";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/tools/builtin/measure/useMeasureTool.ts
|
|
8
8
|
/**
|
|
9
9
|
* Measure tool. A drag adds a measurement from press to release in world
|
|
10
10
|
* units — both ends through the `snap` dep, Shift holding the angle to
|
|
@@ -86,6 +86,5 @@ function useMeasureTool(options) {
|
|
|
86
86
|
]);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
//#endregion
|
|
90
89
|
export { useMeasureTool };
|
|
91
90
|
//# sourceMappingURL=useMeasureTool.js.map
|
|
@@ -2,7 +2,7 @@ import { SNAP_AXIS_STEP, SNAP_ROLES, snapMods } from "../../../domains/snap/role
|
|
|
2
2
|
import { inputSession } from "../../../domains/snap/session2d.js";
|
|
3
3
|
import { roleReader } from "@weasel-js/routing";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/tools/builtin/pen/penHandle.ts
|
|
6
6
|
/** The pen's handle drag: the modifiers it reads, and where it puts the handle. */
|
|
7
7
|
/** The modifiers the pen's handle drag reads on the press, every move, and
|
|
8
8
|
* the release: Alt breaks the new anchor's mirror, Shift holds the handle to
|
|
@@ -53,6 +53,5 @@ function pullHandle(s, ctx, linked) {
|
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
//#endregion
|
|
57
56
|
export { PEN_HANDLE_ROLES, pullHandle };
|
|
58
57
|
//# sourceMappingURL=penHandle.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { asNodeId } from "../../../core/scene/types.js";
|
|
2
|
-
import { defaultCommitAdapter } from "../../../interactions/actions/defaultCommitAdapter.js";
|
|
3
|
-
import { snapMods } from "../../../domains/snap/roles.js";
|
|
4
|
-
import { createDeleteOp } from "../../../core/ops/delete.js";
|
|
5
|
-
import { resolveEditablePathOf } from "../../../domains/paths/editablePath.js";
|
|
6
1
|
import { defineTool } from "../../overlayBinding.js";
|
|
2
|
+
import { asNodeId } from "../../../core/scene/types.js";
|
|
7
3
|
import { createPenPreviewLayer, penReachOf } from "../../../domains/paths/penPreviewLayer.js";
|
|
4
|
+
import { resolveEditablePathOf } from "../../../domains/paths/editablePath.js";
|
|
5
|
+
import { createDeleteOp } from "../../../core/ops/delete.js";
|
|
6
|
+
import { defaultCommitAdapter } from "../../../interactions/actions/defaultCommitAdapter.js";
|
|
8
7
|
import { PEN_HANDLE_ROLES, pullHandle } from "./penHandle.js";
|
|
9
8
|
import { pointSnap } from "../../../domains/snap/pointSnap.js";
|
|
9
|
+
import { snapMods } from "../../../domains/snap/roles.js";
|
|
10
10
|
import { createPointerFollower } from "../shared/pointerFollower.js";
|
|
11
11
|
import { anchorsToPath, boundsOfPath, editAnchorSetTracked, nearestPathAnchor, pathToAnchors, pxExtent, reverseAnchors, withinPxRadius, worldCoords } from "@weasel-js/geom";
|
|
12
12
|
import { useCallback, useMemo, useReducer, useRef, useState } from "react";
|
|
@@ -14,7 +14,7 @@ import { useKitSettings, useLatest } from "@weasel-js/react";
|
|
|
14
14
|
import { ActionDisabledReason } from "@weasel-js/routing";
|
|
15
15
|
import { cursorFor } from "@weasel-js/cursor";
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
// src/tools/builtin/pen/usePenTool.ts
|
|
18
18
|
function freshScratch() {
|
|
19
19
|
return {
|
|
20
20
|
finishedSubpaths: [],
|
|
@@ -617,6 +617,5 @@ function samePath(a, b) {
|
|
|
617
617
|
return ac.every((v, i) => v === bc[i]);
|
|
618
618
|
}
|
|
619
619
|
|
|
620
|
-
//#endregion
|
|
621
620
|
export { usePenTool };
|
|
622
621
|
//# sourceMappingURL=usePenTool.js.map
|
|
@@ -3,7 +3,7 @@ import { insertBindingBehaviors } from "../shared/insertToolOptions.js";
|
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { cursorFor } from "@weasel-js/cursor";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/tools/builtin/pencil/usePencilTool.tsx
|
|
7
7
|
/**
|
|
8
8
|
* Freehand pencil tool. The `drag` binding routes to `insertAction`,
|
|
9
9
|
* which accumulates the pointer trail and commits it as
|
|
@@ -38,6 +38,5 @@ function usePencilTool(options = {}) {
|
|
|
38
38
|
}), [behaviors]);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
//#endregion
|
|
42
41
|
export { usePencilTool };
|
|
43
42
|
//# sourceMappingURL=usePencilTool.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/tools/builtin/pickTopMostHit.ts
|
|
2
2
|
/** Reduce a set of hit ids to the single one a click should act on: drop any
|
|
3
3
|
* id that is an ancestor of another in the set, then take the topmost of what
|
|
4
4
|
* remains. A child beats its own ancestor regardless of what z the two report.
|
|
@@ -57,6 +57,5 @@ function zOf(getZIndex, id) {
|
|
|
57
57
|
return typeof z === "number" && Number.isFinite(z) ? z : -Infinity;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
//#endregion
|
|
61
60
|
export { pickTopMostHit };
|
|
62
61
|
//# sourceMappingURL=pickTopMostHit.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { defineTool } from "../../overlayBinding.js";
|
|
1
2
|
import { INSERT_REPOSITION_BINDING } from "../../../interactions/actions/insert/repositionAction.js";
|
|
2
3
|
import { SHAPE_COUNT_RANGE } from "../../../domains/paths/shapeGenerator.js";
|
|
3
|
-
import { defineTool } from "../../overlayBinding.js";
|
|
4
4
|
import { insertBindingBehaviors } from "../shared/insertToolOptions.js";
|
|
5
5
|
import { useCallback, useMemo, useRef, useState } from "react";
|
|
6
6
|
import { cursorFor } from "@weasel-js/cursor";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/tools/builtin/polygon/usePolygonTool.tsx
|
|
9
9
|
/**
|
|
10
10
|
* Drag-from-center polygon tool. Pointerdown sets center; drag
|
|
11
11
|
* determines radius + rotation; release commits via `insertAction` (the
|
|
@@ -109,6 +109,5 @@ function usePolygonTool(options = {}) {
|
|
|
109
109
|
]);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
//#endregion
|
|
113
112
|
export { usePolygonTool };
|
|
114
113
|
//# sourceMappingURL=usePolygonTool.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/tools/builtin/pressTarget.ts
|
|
2
2
|
/**
|
|
3
3
|
* The node a press on `hitId` selects: the outermost group above it that is
|
|
4
4
|
* below `entered`, or `hitId` itself when there is none. With nothing entered
|
|
@@ -17,6 +17,5 @@ function pressTarget(tree, hitId, entered) {
|
|
|
17
17
|
return target;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
//#endregion
|
|
21
20
|
export { pressTarget };
|
|
22
21
|
//# sourceMappingURL=pressTarget.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { INSERT_REPOSITION_BINDING } from "../../../interactions/actions/insert/repositionAction.js";
|
|
2
1
|
import { defineTool } from "../../overlayBinding.js";
|
|
2
|
+
import { INSERT_REPOSITION_BINDING } from "../../../interactions/actions/insert/repositionAction.js";
|
|
3
3
|
import { insertBindingBehaviors } from "../shared/insertToolOptions.js";
|
|
4
4
|
import { useMemo } from "react";
|
|
5
5
|
import { cursorFor } from "@weasel-js/cursor";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/tools/builtin/rect/useRectTool.ts
|
|
8
8
|
/**
|
|
9
9
|
* Drag-to-draw rectangle tool.
|
|
10
10
|
*
|
|
@@ -38,6 +38,5 @@ function useRectTool(options = {}) {
|
|
|
38
38
|
}), [behaviors]);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
//#endregion
|
|
42
41
|
export { useRectTool };
|
|
43
42
|
//# sourceMappingURL=useRectTool.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { toPlane } from "../../../core/viewport/parallax.js";
|
|
2
|
-
import { poseDescriptorForNode } from "../../../core/geometry/poseDescriptor.js";
|
|
3
1
|
import { shapeCoversPoint } from "../../../canvas/NodeShape.js";
|
|
4
2
|
import { ownClipOf } from "../../../canvas/ownClip.js";
|
|
3
|
+
import { poseDescriptorForNode } from "../../../core/geometry/poseDescriptor.js";
|
|
4
|
+
import { toPlane } from "../../../core/viewport/parallax.js";
|
|
5
5
|
import { applyToPoint, boundsOfPath, meanScale, pathContainsPoint } from "@weasel-js/geom";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/tools/builtin/select/adapterPointQuery.ts
|
|
8
8
|
/**
|
|
9
9
|
* The point query `useSelectTool`'s default `pickEvery` asks of a bare adapter:
|
|
10
10
|
* a point at (px, py) with `t` world units of slop. AABB first (cheap), then
|
|
@@ -53,6 +53,5 @@ function adapterPointQuery(d, preciseLeaves) {
|
|
|
53
53
|
return pointQuery;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
//#endregion
|
|
57
56
|
export { adapterPointQuery };
|
|
58
57
|
//# sourceMappingURL=adapterPointQuery.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ActionDisabledReason } from "@weasel-js/routing";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/tools/builtin/select/collapseDeferred.ts
|
|
4
4
|
/**
|
|
5
5
|
* `select.collapseDeferred` — the release half of the deferred multi-click.
|
|
6
6
|
*
|
|
@@ -35,6 +35,5 @@ function createCollapseDeferredAction(pressRef) {
|
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
//#endregion
|
|
39
38
|
export { createCollapseDeferredAction };
|
|
40
39
|
//# sourceMappingURL=collapseDeferred.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { onBody, onEmptyCanvas } from "./selectionContributions.js";
|
|
2
1
|
import { createEnterGroupAction, createLeaveGroupAction } from "../../../interactions/actions/defaults/enterGroup.js";
|
|
2
|
+
import { onBody, onEmptyCanvas } from "./selectionContributions.js";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { useLatest } from "@weasel-js/react";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/tools/builtin/select/groupEntry.ts
|
|
7
7
|
/** Id of the entry {@link createGroupEntryContribution} builds. */
|
|
8
8
|
var GROUP_ENTRY_ID = "group.entry";
|
|
9
9
|
var INITIAL = [{
|
|
@@ -77,6 +77,5 @@ var GROUP_LEAVE_PRESS_BINDING = {
|
|
|
77
77
|
opts: { id: "group.leave.press" }
|
|
78
78
|
};
|
|
79
79
|
|
|
80
|
-
//#endregion
|
|
81
80
|
export { GROUP_ENTRY_ID, GROUP_LEAVE_PRESS_BINDING, createGroupEntryContribution, useGroupEntryContribution };
|
|
82
81
|
//# sourceMappingURL=groupEntry.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isEnvelope } from "../../../core/scene/effectivePose.js";
|
|
2
|
-
import {
|
|
2
|
+
import { holderOf } from "@weasel-js/select";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/tools/builtin/select/pressDecision.ts
|
|
5
5
|
/**
|
|
6
6
|
* Decide a press with no extend modifier on `top`, and one with it.
|
|
7
7
|
*
|
|
@@ -22,11 +22,10 @@ function pressDecision(top, sel, mods, extendLocked, tree) {
|
|
|
22
22
|
}
|
|
23
23
|
function insideSelectedGroup(top, sel, tree) {
|
|
24
24
|
if (sel.includes(top)) return false;
|
|
25
|
-
const ancestor =
|
|
25
|
+
const ancestor = holderOf(new Set(sel), top, (id) => tree.getParent(id));
|
|
26
26
|
const node = ancestor === null ? void 0 : tree.getNode(ancestor);
|
|
27
27
|
return node !== void 0 && isEnvelope(node);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
//#endregion
|
|
31
30
|
export { pressDecision };
|
|
32
31
|
//# sourceMappingURL=pressDecision.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pressDecision.js","names":[],"sources":["../../../../src/tools/builtin/select/pressDecision.ts"],"sourcesContent":["import { isEnvelope } from 'core/scene/effectivePose';\nimport {
|
|
1
|
+
{"version":3,"file":"pressDecision.js","names":[],"sources":["../../../../src/tools/builtin/select/pressDecision.ts"],"sourcesContent":["import { isEnvelope } from 'core/scene/effectivePose';\nimport { holderOf } from '@weasel-js/select';\n\n/** The tree a press reads: who a node's parent is, and the node itself. */\nexport interface PressTree {\n getParent(id: string): string | null;\n getNode(id: string): unknown;\n}\n\n/** What a press on `top` does to the selection. */\nexport interface PressDecision {\n /** Apply the click to the selection on the press. */\n applyNow: boolean;\n /** The id the click is held back for until release, so the press can drag\n * what is already selected instead; `null` when nothing is held back. */\n deferred: string | null;\n}\n\n/**\n * Decide a press with no extend modifier on `top`, and one with it.\n *\n * Pressing a member of a multi-selection, or a node inside a selected group,\n * leaves the selection alone: the press may be the start of a drag of the\n * set, or of the group. A group here is a container whose pose derives from\n * its children; one with its own pose is a place its members sit, and a press\n * picks the member out of it.\n */\nexport function pressDecision(\n top: string,\n sel: readonly string[],\n mods: { shift: boolean; meta: boolean },\n extendLocked: () => boolean,\n tree: PressTree,\n): PressDecision {\n const isExtend = mods.shift;\n const inMultiSelection = sel.includes(top) && sel.length > 1;\n const defer = !isExtend && (inMultiSelection || insideSelectedGroup(top, sel, tree));\n return { applyNow: !defer && !(isExtend && extendLocked()), deferred: defer ? top : null };\n}\n\nfunction insideSelectedGroup(top: string, sel: readonly string[], tree: PressTree): boolean {\n if (sel.includes(top)) return false;\n const ancestor = holderOf(new Set(sel), top, (id) => tree.getParent(id));\n const node = ancestor === null ? undefined : tree.getNode(ancestor) as { dependsOn?: unknown; derivePose?: unknown } | undefined;\n return node !== undefined && isEnvelope(node);\n}\n"],"mappings":";;;;;;;;;;;;;AA2BA,SAAgB,cACd,KACA,KACA,MACA,cACA,MACe;CACf,MAAM,WAAW,KAAK;CACtB,MAAM,mBAAmB,IAAI,SAAS,GAAG,KAAK,IAAI,SAAS;CAC3D,MAAM,QAAQ,CAAC,aAAa,oBAAoB,oBAAoB,KAAK,KAAK,IAAI;CAClF,OAAO;EAAE,UAAU,CAAC,SAAS,EAAE,YAAY,aAAa;EAAI,UAAU,QAAQ,MAAM;CAAK;AAC3F;AAEA,SAAS,oBAAoB,KAAa,KAAwB,MAA0B;CAC1F,IAAI,IAAI,SAAS,GAAG,GAAG,OAAO;CAC9B,MAAM,WAAW,SAAS,IAAI,IAAI,GAAG,GAAG,MAAM,OAAO,KAAK,UAAU,EAAE,CAAC;CACvE,MAAM,OAAO,aAAa,OAAO,SAAY,KAAK,QAAQ,QAAQ;CAClE,OAAO,SAAS,UAAa,WAAW,IAAI;AAC9C"}
|