@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,256 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.15.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 424ba52: The Smudge brush, the Simplify brush, a warp's control drag, and Warp Settings can be the last operation, their
|
|
8
|
+
settings changed after the fact in the last-operation panel. A brush stroke replays every dab from its start with the
|
|
9
|
+
new Size, Strength or Tolerance; text the Smudge brush converted is put back and converted again wherever the brush
|
|
10
|
+
at its new size meets it. A warp drag replays with the warp remade under the new Mode, Rows, Columns, Mapping or
|
|
11
|
+
Tolerance, the control moved as it was first, so an envelope's new grid is resampled from the mesh the drag bent.
|
|
12
|
+
Warp Settings shows only the settings a run changed. Each stays one undo entry.
|
|
13
|
+
|
|
14
|
+
A tool's options and its action's panel are one setting: `ActionTuning.keep` is handed the params a panel change set,
|
|
15
|
+
and the tuning `<SceneCanvas>` makes from `toolOptionValues` writes them back there, so an options row shows the
|
|
16
|
+
values the next stroke uses. `OngoingHandle.params` reports params a gesture took from what it edited rather than
|
|
17
|
+
from its binding, such as a held warp's own grid, which the panel shows and replay receives. A gesture that opens a
|
|
18
|
+
journal as it starts is now kept as the last operation. `SMUDGE_BRUSH_PARAMS` and `SIMPLIFY_BRUSH_PARAMS` are the
|
|
19
|
+
forms the brushes' options use, and `warpDragParams`, `configureWarpParams`, and `WARP_SETTING_FIELDS` the warps'.
|
|
20
|
+
- 9515681: A marquee or lasso now selects at the depth a click does. A hit inside a group that isn't entered selects the outermost such group, not the marks inside it. `AreaSelectDep` and `LassoSelectDep` take an optional `targetOf(id)` for this, and `<SceneCanvas>` wires it from the entered group.
|
|
21
|
+
|
|
22
|
+
A clone's selection outline now lands on its ghost under a parent away from the origin. A previewed pose is read in the frame the node is stored in, as the ghost and the published overrides read it. The scene adapter gains `worldOfStored(id, stored)` to carry it to world, and `getEffectivePose` now answers world during a preview as well as after it.
|
|
23
|
+
- 5e66a10: A unit scope can declare the magnification its frame is drawn at: `units: { system, drawnAt: 0.4 }` on a node
|
|
24
|
+
whose scale `transform` draws its children at 0.4×. The declaration draws nothing; it says what the transform is
|
|
25
|
+
meant to be, so lengths read on screen can be divided back to the size they were modeled at.
|
|
26
|
+
|
|
27
|
+
- `magnificationOf(scopes)` (quantity) multiplies the chain's `drawnAt`; `sceneMagnification(scene, ids)` and
|
|
28
|
+
`sceneDeclaredScopes(scene, id)` (core) read it off a scene.
|
|
29
|
+
- Equal-spacing snap marks and `distanceReadout` divide their lengths by the declared magnification of the nodes
|
|
30
|
+
they measure.
|
|
31
|
+
- `undeclaredMagnifications(scene)` (core) lists every container under a declared scope whose children are drawn
|
|
32
|
+
at a size its scopes do not declare, and `SceneCanvas` warns once per container in development: a container
|
|
33
|
+
drawn at 1.5× with nothing declaring it is what turns a 20″ cabinet into 30″ of board.
|
|
34
|
+
- `scaleBar` (quantity) picks a round length for a frame's scopes, and `<ScaleBar>` (ui) draws it, labeled in the
|
|
35
|
+
frame's own units and saying what size the frame is drawn at.
|
|
36
|
+
- 2992b55: Dependency updates: `@msb235/blits` 0.16.1 (core, animator, clock, labkit), `earcut` 3.2.4 (core, geom's peer
|
|
37
|
+
range, labkit), `react-aria` 3.53.1 and `react-aria-components` 1.22.1 (ui), and `magic-string` 1.4.5, `oxc-parser`
|
|
38
|
+
0.156.0 and `unplugin` 3.7.0 (icons-plugin). geom's `earcut` peer is an exact pin, so a consumer installing geom
|
|
39
|
+
beside its own `earcut` needs 3.2.4.
|
|
40
|
+
- 8ad43af: A core `Page` can carry `meta`: values other packages keep on the page, each under its owner's key. Every page edit
|
|
41
|
+
(`addPage`, `removePage`, `movePage`, `resizePage`, `renamePage`, `setPages`) and `layoutPages` carry it, and undo
|
|
42
|
+
restores it with the page.
|
|
43
|
+
|
|
44
|
+
`documentSpecs` writes a graph page's `notation`, `layout`, and `direction` to its page's `meta['diagram:graph']`, and
|
|
45
|
+
`documentFromScene` reads them back, so a Mermaid class, state, C4, block, or other non-flowchart page drawn into a
|
|
46
|
+
scene exports as the same kind, a block diagram keeps its columns, spans, and spaces, and a flowchart keeps its
|
|
47
|
+
direction. `GRAPH_PAGE_META_KEY`, `graphPageSettingsOf`, and `GraphPageSettings` are exported. This adds API.
|
|
48
|
+
- 120420a: `reconcileSpecs` now puts siblings in `next`'s order wherever a parent's children there differ from `prev`'s, by an addition or a reorder. A node added among existing siblings used to land after all of them, so it could paint above a node `next` listed after it. A reorder made in the scene still stands while `next` keeps the same order, and a child no spec names keeps its place.
|
|
49
|
+
- e982d8a: A selection never holds a node together with its descendant: a selected node holds its whole subtree, which counts as selected and can't be selected on its own. The scene's selection keeps only the outermost of the ids written to it, whichever order they come in, and drops a node moved under a selected one. `<SceneCanvas>` applies the same rule to a `selection` kept off the scene, on every write the canvas makes. Selecting a group whose child is selected replaces the child with the group, and Shift-clicking a child of a selected group leaves the selection as it was.
|
|
50
|
+
|
|
51
|
+
`@weasel-js/select` adds `outermost(ids, parentOf)`, the ids no ancestor among them holds, and `holderOf(selected, id, parentOf)`, the selected id that holds `id`: itself or its nearest selected ancestor.
|
|
52
|
+
- Updated dependencies [d2110bc]
|
|
53
|
+
- Updated dependencies [424ba52]
|
|
54
|
+
- Updated dependencies [5e66a10]
|
|
55
|
+
- Updated dependencies [2992b55]
|
|
56
|
+
- Updated dependencies [3105d13]
|
|
57
|
+
- Updated dependencies [027c59a]
|
|
58
|
+
- Updated dependencies [8b52282]
|
|
59
|
+
- Updated dependencies [937167e]
|
|
60
|
+
- Updated dependencies [9c051bd]
|
|
61
|
+
- Updated dependencies [b6a97f4]
|
|
62
|
+
- Updated dependencies [e982d8a]
|
|
63
|
+
- Updated dependencies [fa1c9a7]
|
|
64
|
+
- Updated dependencies [13b0604]
|
|
65
|
+
- @weasel-js/font@1.15.1
|
|
66
|
+
- @weasel-js/text@1.15.1
|
|
67
|
+
- @weasel-js/routing@1.15.1
|
|
68
|
+
- @weasel-js/quantity@1.15.1
|
|
69
|
+
- @weasel-js/geom@1.15.1
|
|
70
|
+
- @weasel-js/animator@1.15.1
|
|
71
|
+
- @weasel-js/gestures@1.15.1
|
|
72
|
+
- @weasel-js/ui-logic@1.15.1
|
|
73
|
+
- @weasel-js/prefs@1.15.1
|
|
74
|
+
- @weasel-js/select@1.15.1
|
|
75
|
+
- @weasel-js/renderer@1.15.1
|
|
76
|
+
- @weasel-js/text-dom@1.15.1
|
|
77
|
+
- @weasel-js/stroke@1.15.1
|
|
78
|
+
- @weasel-js/simulation@1.15.1
|
|
79
|
+
- @weasel-js/cursor@1.15.1
|
|
80
|
+
- @weasel-js/history@1.15.1
|
|
81
|
+
- @weasel-js/icons@1.15.1
|
|
82
|
+
- @weasel-js/modes@1.15.1
|
|
83
|
+
- @weasel-js/paint@1.15.1
|
|
84
|
+
- @weasel-js/react@1.15.1
|
|
85
|
+
- @weasel-js/registry@1.15.1
|
|
86
|
+
|
|
87
|
+
## 1.15.0
|
|
88
|
+
|
|
89
|
+
### Minor Changes
|
|
90
|
+
|
|
91
|
+
- 48b6c4c: <!-- bump-approved: minor: maintainer — 1.15.0 release requested 2026-10-31 -->
|
|
92
|
+
|
|
93
|
+
An action can declare its params as a form, `Action.params` (a `@weasel-js/prefs` group of labels, ranges, steps,
|
|
94
|
+
and defaults). An immediate run of such an action that commits one history entry becomes the actions tree's last
|
|
95
|
+
operation, read with `useLastOperation()` / `useLastOperationStore()` (or `lastOperationOf(registry)`). Its
|
|
96
|
+
`adjust(patch)` undoes that entry, puts back the selection the run started from, reruns the action with the patch
|
|
97
|
+
over the values it used, and keeps the new entry in place of the old one, so the history still holds one entry. Any
|
|
98
|
+
other history step, an undo or redo, or `dismiss()` clears it. The values last used become the action's params for
|
|
99
|
+
the rest of the session, under any tuning. Core publishes a `selectionSnapshot` dep that captures the node selection
|
|
100
|
+
and the anchor selection together, which the rerun restores.
|
|
101
|
+
|
|
102
|
+
`@weasel-js/ui` adds `<LastOperationPanel>`, which draws the last operation as a form titled with the command's label,
|
|
103
|
+
adjusting it on each change and dismissing it from its close button; it renders nothing while there is none.
|
|
104
|
+
|
|
105
|
+
`bridgePaths` and `bridgeAnchors` declare their Tension (`BRIDGE_PARAMS`), `resamplePath` its count, spacing, corners,
|
|
106
|
+
and tolerance (`RESAMPLE_PARAMS`), and `addExtremeAnchors` a new Turns param (`ADD_EXTREMES_PARAMS`). `resamplePath`
|
|
107
|
+
is now an immediate command committing one entry, where it was an ongoing action previewed through `begin`: code
|
|
108
|
+
driving it with `useOngoingAction` must trigger it instead. `addExtremeAnchors` takes `params.axes` — `'xy'` (the
|
|
109
|
+
default), `'x'`, or `'y'` — and geom's `segmentExtremaTs` and `addExtremaAnchors` take the same choice as a last
|
|
110
|
+
argument (`ExtremaAxes`).
|
|
111
|
+
|
|
112
|
+
### Patch Changes
|
|
113
|
+
|
|
114
|
+
- 8461e7b: `NodeGates.hidden` and `NodeGates.locked` take the node itself as well as its id, and answer the same for
|
|
115
|
+
either; a walk that already holds the node saves looking it up. The pick walk now hands them its
|
|
116
|
+
candidates, decides a marquee from a node's bounds before building anything to test its outline, and no
|
|
117
|
+
longer allocates per candidate. Scene edits and history pushes allocate less per op. No result changes.
|
|
118
|
+
- 70a64a3: Tools can declare options: `ToolDef.options` names the action they are params of, a prefs group of number leaves
|
|
119
|
+
(their bounds and defaults), and which one is the tool's size and which its strength. `<SceneCanvas>` tunes the
|
|
120
|
+
action from the values the host keeps in the new `toolOptionValues` dep (`ToolOptionValues`, published with
|
|
121
|
+
`useToolOptionValues`; `createToolOptionValues` keeps them in memory). `defineTool` adds step actions for the size
|
|
122
|
+
and strength, bound to `[` `]` and `Shift+[` `Shift+]` while the tool is the active one, so they win over the same keys'
|
|
123
|
+
anchor-selection commands only then.
|
|
124
|
+
|
|
125
|
+
The Smudge brush (`SMUDGE_BRUSH_OPTIONS`: size, strength) and the Simplify brush (`SIMPLIFY_BRUSH_OPTIONS`: size,
|
|
126
|
+
tolerance) declare theirs. Size steps by ×1.25; the Smudge brush's strength by 0.1, the Simplify brush's tolerance by
|
|
127
|
+
×1.25.
|
|
128
|
+
- f77e789: A canvas left to fill its parent now shows its new size, painted, in the frame its parent resized in, rather than
|
|
129
|
+
one frame late at the old size. `<Canvas>`, `<SceneCanvas>`, `<DrawCanvas>`, and `<SceneViewCanvas>` also paint a
|
|
130
|
+
commit that changes their size in place instead of on the next frame. `useElementSize` and `useCanvasSize` take
|
|
131
|
+
`{ beforePaint: true }` to render their caller with a new size inside the `ResizeObserver` callback; it suits only a
|
|
132
|
+
caller whose render lays out nothing outside the observed element, since the browser reports anything else that
|
|
133
|
+
resizes there as a loop error. Without it the size arrives in a task after the callback, as before. A canvas's
|
|
134
|
+
`onResize` now fires from a passive effect.
|
|
135
|
+
- 0e60598: Drawing a polygon or a star leaves the last-operation panel up with its sides, or its points and inner radius
|
|
136
|
+
(`insertParams`, `POLYGON_INSERT_PARAMS`, `STAR_INSERT_PARAMS`); a change redraws the shape in place from the same
|
|
137
|
+
drag, as one undo entry. A drag that insert behaviors answered gets no panel. The star's "Inner" property row is now
|
|
138
|
+
"Inner radius". The scene's history answers `activeJournal()`, and its journals `observe`, so the last operation
|
|
139
|
+
follows edits into an open journal, such as path edit's.
|
|
140
|
+
- a1cb281: Images drawn at half their size or smaller are now smoothed through mipmaps by default: `imageMinification` defaults
|
|
141
|
+
to `'auto'` on `WeaselRenderer` and `<Canvas>`, which builds an image's mipmaps the first time a frame draws the whole of
|
|
142
|
+
it that small. This changes the pixels of every image drawn small; pass `imageMinification: 'linear'` for the old
|
|
143
|
+
single-tap look. A draw with `source` and a `sprites` run never sample mipmaps, under any mode, so a sprite-sheet cell
|
|
144
|
+
drawn small no longer takes color from the cells beside it under `'mipmap'` or `'auto'`.
|
|
145
|
+
- c41c917: Path edit's tools are ordinary tools, and a mode can name the tool it starts on.
|
|
146
|
+
|
|
147
|
+
**Breaking:** the `pathEditTool.*` toggle actions (`pathEditToolAction`, `exitPathEditToolAction`,
|
|
148
|
+
`pathEditToolActive`, `simplifyBrushToolAction`, `lengthenToolAction`, `SIMPLIFY_BRUSH_TOOL`, `LENGTHEN_TOOL`) are
|
|
149
|
+
removed, as are the `editAnchors` dep's `tool` and `setTool`, `PathEditHost`'s `tool` and `setTool`, and
|
|
150
|
+
`AnchorState.tool`. The `simplifyBrush` and `lengthenPath` actions no longer bind a drag themselves: mount
|
|
151
|
+
`useSimplifyBrushTool` and `useLengthenTool` (or `usePathEditTools`, named by `PATH_EDIT_TOOLS`; `usePathToolsTools`
|
|
152
|
+
includes them), each carrying `edits-anchors`. Their bindings sit at the active tier, so they outrank anchor
|
|
153
|
+
editing's ambient drags; a Lengthen drag on an anchor that is no open end falls through to moving it.
|
|
154
|
+
|
|
155
|
+
`ModeDefinition.defaultTool` names the tool a mode starts on: entering the mode activates it, leaving restores the
|
|
156
|
+
tool active at entry, and Escape with another tool on returns to it before a second Escape leaves: a mode shortcut's
|
|
157
|
+
`exit` and `cancel` and core's `exitPathEdit` each call `returnToModeDefault` first, reading the new `modeDefaultTool`
|
|
158
|
+
dep `<SceneCanvas>` sources. `PATH_EDIT` names core's new `anchors` tool (key A, glyph `core:anchors`), which the
|
|
159
|
+
`pathEdit` preset mounts and `ANCHOR_TOOLS` names; it binds nothing and holds path edit's active slot. The pointer
|
|
160
|
+
cursor over an anchor or handle is now `editAnchors`' own `cursor`, so a path-edit tool's cursor shows there.
|
|
161
|
+
|
|
162
|
+
A `chromeRules` dep, which `<SceneCanvas>` sources, reads and sets chrome-visibility rules at run time. The toggles
|
|
163
|
+
`pathEdit.show.direction`, `.comb`, `.balance`, and `.corners` (group `pathOverlays`) use it to flip each overlay
|
|
164
|
+
between `always` and `never`, and come with the preset that draws it.
|
|
165
|
+
|
|
166
|
+
`ToolPalette` takes `ineligible: 'dim' | 'hide'`, default `dim`; `hide` leaves out every tool the current mode does
|
|
167
|
+
not allow. The Girth tool's palette group is now `path`, beside Trim, Extend, and the Smudge brush.
|
|
168
|
+
|
|
169
|
+
In the dev server and under vitest, `weaselIcons` in app mode stops looking for tables at the nearest workspace root
|
|
170
|
+
above the app, and reads that workspace's packages' source tables. It used to walk on into an enclosing checkout's
|
|
171
|
+
`node_modules` (a git worktree sits inside its main checkout), so a worktree served that checkout's glyphs: a glyph
|
|
172
|
+
added on the branch drew as "?", and one redrawn there drew as before.
|
|
173
|
+
- d25ad30: A runs array can now be refilled in place. `clearRuns(runs)` in `@weasel-js/text` forgets what the layout and
|
|
174
|
+
paint caches hold for it while leaving it filed, `resolveRunsInto(out, runs, style)` resolves into an array the
|
|
175
|
+
caller owns, rewriting each run object whose optional fields match, and `textCommandFromRunsInto(cmd, …)` in
|
|
176
|
+
`@weasel-js/renderer` refills a text command and its runs. Core re-exports all three.
|
|
177
|
+
|
|
178
|
+
A HUD text widget now keeps one command and one runs array for its life and refills them when its text, color
|
|
179
|
+
or family changes, so a readout rewritten every frame no longer allocates a command, its runs, or a cache
|
|
180
|
+
entry per label. What its `draw` returned shows the widget's current text rather than a snapshot of the
|
|
181
|
+
text it had then.
|
|
182
|
+
- 1de1aab: The Smudge brush now smudges text: a text node it may push (selected, or any unlocked, shown one while nothing is
|
|
183
|
+
selected) is converted to outlines, as Create Outlines does, the moment the brush touches it, and its paths are
|
|
184
|
+
smudged from then on. Conversion and smudge are one undo entry labeled "Smudge brush", and Escape mid-stroke puts the
|
|
185
|
+
text back. Text whose face has no outlines is left alone, and the user is told once per stroke. In a host with no
|
|
186
|
+
`createOutlinesAdapter` dep, text is skipped. A selected group is now smudged as its path leaves.
|
|
187
|
+
|
|
188
|
+
`applyCreateOutlines(adapter, ids?)` converts the given text nodes rather than only the selection.
|
|
189
|
+
|
|
190
|
+
A journal can now open inside another (`Journal.beginJournal`), and `scene.history.beginJournal` opens inside the
|
|
191
|
+
journal edits are going to when there is one, so a gesture journaled during a mode lands in the mode's journal as one
|
|
192
|
+
entry. A journal opened on `scene.history` now takes the scene's `applyBatch` edits without an active-journal accessor.
|
|
193
|
+
|
|
194
|
+
New `notices` dep (`NoticesDep`, published with `useNotices`): where an action tells the user something went wrong.
|
|
195
|
+
Create Outlines, Outline Stroke, Pathfinder, and the Smudge brush report text they cannot outline through it, and fall
|
|
196
|
+
back to the console without it.
|
|
197
|
+
- fce0494: A node can now declare points of its own that a move snaps, through `<SceneCanvas snap={{ anchors }}>`
|
|
198
|
+
or `createSnapSession2d({ anchors })`: a function from a node id to points in that node's box frame,
|
|
199
|
+
such as a cabinet's hanger holes. Each becomes a probe of the new role `'anchor'`, offered only to a
|
|
200
|
+
source whose `roles` list it, so a grid can land the holes on a pegboard's while alignment and spacing
|
|
201
|
+
keep measuring the box.
|
|
202
|
+
- 746fab0: The warp tools (Distort, Envelope, Puppet Warp) now work on a selected group: one set of controls is laid around all
|
|
203
|
+
of its paths, and they warp together. Selected text converts to outlines when a warp begins on it (a drag on the fresh
|
|
204
|
+
controls, or a pin placed), conversion and warp landing as one undo step; canceling the drag puts the text back, and
|
|
205
|
+
text whose face has no outlines is left alone with a notice. While a warp tool is active, the selection's resize and
|
|
206
|
+
rotation handles no longer draw over its controls or take its presses.
|
|
207
|
+
|
|
208
|
+
New `ToolDef.hides`: chrome ids hidden, in paint and hit-test alike, while that tool is the active one (carried to
|
|
209
|
+
rules as `RuleCtx.hiddenChrome`).
|
|
210
|
+
- Updated dependencies [2bdba7b]
|
|
211
|
+
- Updated dependencies [8461e7b]
|
|
212
|
+
- Updated dependencies [70a64a3]
|
|
213
|
+
- Updated dependencies [3f13a49]
|
|
214
|
+
- Updated dependencies [719d457]
|
|
215
|
+
- Updated dependencies [d40f593]
|
|
216
|
+
- Updated dependencies [81a1b94]
|
|
217
|
+
- Updated dependencies [b7d362d]
|
|
218
|
+
- Updated dependencies [a95d3a4]
|
|
219
|
+
- Updated dependencies [e05ddd3]
|
|
220
|
+
- Updated dependencies [30bf607]
|
|
221
|
+
- Updated dependencies [35f0277]
|
|
222
|
+
- Updated dependencies [48b6c4c]
|
|
223
|
+
- Updated dependencies [a1cb281]
|
|
224
|
+
- Updated dependencies [2e2f76c]
|
|
225
|
+
- Updated dependencies [c41c917]
|
|
226
|
+
- Updated dependencies [fbc7ebf]
|
|
227
|
+
- Updated dependencies [d25ad30]
|
|
228
|
+
- Updated dependencies [1de1aab]
|
|
229
|
+
- Updated dependencies [fce0494]
|
|
230
|
+
- Updated dependencies [51ca29e]
|
|
231
|
+
- Updated dependencies [746fab0]
|
|
232
|
+
- @weasel-js/renderer@1.15.0
|
|
233
|
+
- @weasel-js/history@1.15.0
|
|
234
|
+
- @weasel-js/routing@1.15.0
|
|
235
|
+
- @weasel-js/font@1.15.0
|
|
236
|
+
- @weasel-js/text@1.15.0
|
|
237
|
+
- @weasel-js/geom@1.15.0
|
|
238
|
+
- @weasel-js/modes@1.15.0
|
|
239
|
+
- @weasel-js/stroke@1.15.0
|
|
240
|
+
- @weasel-js/text-dom@1.15.0
|
|
241
|
+
- @weasel-js/animator@1.15.0
|
|
242
|
+
- @weasel-js/headless@1.15.0
|
|
243
|
+
- @weasel-js/gestures@1.15.0
|
|
244
|
+
- @weasel-js/cursor@1.15.0
|
|
245
|
+
- @weasel-js/icons@1.15.0
|
|
246
|
+
- @weasel-js/paint@1.15.0
|
|
247
|
+
- @weasel-js/prefs@1.15.0
|
|
248
|
+
- @weasel-js/quantity@1.15.0
|
|
249
|
+
- @weasel-js/react@1.15.0
|
|
250
|
+
- @weasel-js/registry@1.15.0
|
|
251
|
+
- @weasel-js/select@1.15.0
|
|
252
|
+
- @weasel-js/simulation@1.15.0
|
|
253
|
+
|
|
3
254
|
## 1.14.2
|
|
4
255
|
|
|
5
256
|
### Patch Changes
|
package/dist/WeaselProvider.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { PointerProviderIfRoot } from "./canvas/SceneCanvas/PointerProviderIfRoot.js";
|
|
2
|
-
import { ActionsProviderIfRoot } from "./canvas/SceneCanvas/ActionsProviderIfRoot.js";
|
|
3
|
-
import { DepRegistryProviderIfRoot } from "./canvas/SceneCanvas/DepRegistryProviderIfRoot.js";
|
|
4
1
|
import { IconRegistryScope } from "./iconRegistry/IconRegistryProvider.js";
|
|
2
|
+
import { DepRegistryProviderIfRoot } from "./canvas/SceneCanvas/DepRegistryProviderIfRoot.js";
|
|
3
|
+
import { ActionsProviderIfRoot } from "./canvas/SceneCanvas/ActionsProviderIfRoot.js";
|
|
4
|
+
import { PointerProviderIfRoot } from "./canvas/SceneCanvas/PointerProviderIfRoot.js";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { ActionsProvider, ActiveToolContextProvider, ActiveToolContextProviderIfRoot, DepRegistryProvider, PointerContextProvider, SelectionContextProvider, SelectionContextProviderIfRoot } from "@weasel-js/routing/react";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/WeaselProvider.tsx
|
|
9
9
|
/**
|
|
10
10
|
* Mounts every kit-wide provider at once — deps, actions, active tool,
|
|
11
11
|
* selection, and pointer — each only if one is not already in scope, or
|
|
@@ -24,6 +24,5 @@ function WeaselProvider({ children, isolate = false, icons, iconVariants }) {
|
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
//#endregion
|
|
28
27
|
export { WeaselProvider };
|
|
29
28
|
//# sourceMappingURL=WeaselProvider.js.map
|
|
@@ -4,7 +4,7 @@ import { angleOf, isRigid, localToWorld, pxExtentIn, targetCorners } from "../co
|
|
|
4
4
|
import { annulusSemiAxes, hitAffordanceRegions, pointRegionAnchor, pointRegionFrame, pointRegionLive, pointRegionScreenQuad, transformOf } from "./hitAffordanceRegions.js";
|
|
5
5
|
import { PATH_L, PATH_M, PATH_Z, boundsOfPath } from "@weasel-js/geom";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/affordances/composeAffordanceLayer.ts
|
|
8
8
|
/**
|
|
9
9
|
* Bundle a list of Affordances into a single RenderLayer.
|
|
10
10
|
*
|
|
@@ -294,6 +294,5 @@ function worldOf(region, xf, view) {
|
|
|
294
294
|
};
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
-
//#endregion
|
|
298
297
|
export { composeAffordanceLayer };
|
|
299
298
|
//# sourceMappingURL=composeAffordanceLayer.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { HANDLE_BASE_PX } from "../core/device/targets.js";
|
|
2
|
-
import { angleOf, localToWorld } from "../core/geometry/targetFrame.js";
|
|
3
1
|
import { RESIZE_HANDLE_ANCHORS, fixedCornerOf, handlePoint, isCornerHandle } from "../interactions/actions/resize/cornerHandles.js";
|
|
4
|
-
import {
|
|
2
|
+
import { angleOf, localToWorld } from "../core/geometry/targetFrame.js";
|
|
5
3
|
import { MULTI_RESIZE_TARGET_ID } from "../core/selection/selectionTarget.js";
|
|
4
|
+
import { transformOf } from "./hitAffordanceRegions.js";
|
|
5
|
+
import { HANDLE_BASE_PX } from "../core/device/targets.js";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/affordances/cornerResize.ts
|
|
8
8
|
var DEFAULT_FILL = "#d4c4a8";
|
|
9
9
|
var DEFAULT_STROKE = "#1a130d";
|
|
10
10
|
/**
|
|
@@ -115,6 +115,5 @@ function pickRenderTarget(state) {
|
|
|
115
115
|
return null;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
//#endregion
|
|
119
118
|
export { createCornerResizeAffordance };
|
|
120
119
|
//# sourceMappingURL=cornerResize.js.map
|
|
@@ -2,7 +2,7 @@ import { IDENTITY_TARGET, angleOf, localToWorld, normalToWorld, pxExtentIn, targ
|
|
|
2
2
|
import { edgeHandlesFit } from "../interactions/actions/resize/cornerHandles.js";
|
|
3
3
|
import { multiply, scale, scaleDelta, screenAngleOf, standoff, strokeHitTest } from "@weasel-js/geom";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/affordances/hitAffordanceRegions.ts
|
|
6
6
|
/**
|
|
7
7
|
* Walk affordances for a world-space hit, topmost first.
|
|
8
8
|
*
|
|
@@ -173,6 +173,5 @@ function hitRegion(region, wx, wy, xf, view) {
|
|
|
173
173
|
return local.x >= r.x && local.x <= r.x + r.width && local.y >= r.y && local.y <= r.y + r.height;
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
//#endregion
|
|
177
176
|
export { angleOf, annulusSemiAxes, hitAffordanceRegions, localToWorld, pointRegionAnchor, pointRegionFrame, pointRegionLive, pointRegionScreenQuad, transformOf };
|
|
178
177
|
//# sourceMappingURL=hitAffordanceRegions.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { enumerateAnchors } from "../interactions/actions/edit-anchors/geometry.js";
|
|
2
2
|
import { pathToAnchors } from "@weasel-js/geom";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/affordances/pathAnchors.ts
|
|
5
5
|
/** Chrome-caps id gating the anchor, control, and segment affordances. */
|
|
6
6
|
var PATH_ANCHOR_CHROME_ID = "path-edit.anchors";
|
|
7
7
|
/**
|
|
@@ -46,7 +46,6 @@ function createPathAnchorAffordances(getAnchorState, opts = {}) {
|
|
|
46
46
|
hitRadiusPx: hitRadius
|
|
47
47
|
},
|
|
48
48
|
hitKind,
|
|
49
|
-
...getAnchorState()?.tool ? {} : { cursor },
|
|
50
49
|
bind: () => ({ initialScratch: {
|
|
51
50
|
...scratch,
|
|
52
51
|
targetId
|
|
@@ -162,6 +161,5 @@ function withEdited(selection, editingId) {
|
|
|
162
161
|
return editingId === null || selection.includes(editingId) ? selection : [...selection, editingId];
|
|
163
162
|
}
|
|
164
163
|
|
|
165
|
-
//#endregion
|
|
166
164
|
export { PATH_ANCHOR_CHROME_ID, createPathAnchorAffordances };
|
|
167
165
|
//# sourceMappingURL=pathAnchors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pathAnchors.js","names":[],"sources":["../../src/affordances/pathAnchors.ts"],"sourcesContent":["/** Path anchor, control-handle, and segment affordances, and the parts path-edit extensions add. */\n\nimport type { CursorSpec } from '@weasel-js/cursor';\nimport type { Affordance, AffordanceBinding, AffordanceRegion, CommonAffordanceScratch } from './types';\nimport type { ChromeState } from 'core/selection/chromeState';\nimport { pathToAnchors, type AnchorSet, type PolygonPath } from '@weasel-js/geom';\nimport { enumerateAnchors } from 'interactions/actions/edit-anchors/geometry';\nimport type { PathEditExtension } from 'domains/paths/pathEditExtension';\n\n/**\n * Live anchor-editing state. The thunk that returns it is called on every\n * pointer event, so it must be cheap (O(1) field reads).\n */\nexport interface AnchorState {\n /** Id of the path currently in anchor-edit mode, or `null`. Control handles\n * are only hittable on the path that is being edited. */\n editingId: string | null;\n /** Current editable path for a node id. Non-polygon values are ignored. */\n getPose(id: string): unknown;\n /** The committed pose and data of a node, which extensions' parts read. */\n getNode?(id: string): { pose: unknown; data: unknown } | null;\n /** The path-edit extensions whose parts are pressed, in order. */\n extensions?: readonly PathEditExtension[];\n /** The active path-edit tool, if any. While one is set, anchors and controls\n * carry no cursor of their own, so the tool's action shows its own. */\n tool?: string | null;\n /** The path whose outline counts as a segment press, when it is not\n * `getPose`'s: a path drawn from a form, edited through the form's edit\n * path. */\n getOutline?(id: string): unknown;\n}\n\n/** Options for the path-anchor affordances. */\nexport interface PathAnchorAffordanceOptions {\n /** Hit radius (screen-px) for anchor and control points. Default 8. */\n hitRadius?: number;\n /** Cursor while hovering an anchor or control, with no path-edit tool\n * active. Defaults to `'pointer'`. */\n cursor?: CursorSpec;\n}\n\n/** What an anchor hit hands to the action that follows. */\nexport interface AnchorScratch extends CommonAffordanceScratch {\n /** Node id of the path the anchor belongs to. */\n targetId: string;\n /** Sequential anchor index in path walk order. */\n anchorIndex: number;\n /** Which of the anchor's three grabbable points this is. */\n part: 'anchor' | 'controlIn' | 'controlOut';\n}\n\n/** Chrome-caps id gating the anchor, control, and segment affordances. */\nexport const PATH_ANCHOR_CHROME_ID = 'path-edit.anchors';\n\n/**\n * Segment, extension-part, anchor, and control affordances for the selected\n * paths, bottom → top.\n *\n * Three affordances rather than one, so that a control handle beats an anchor\n * regardless of which is nearer, the way controls draw on top, and both beat\n * the segment they sit on. Within each, nearest wins. A press on the edited\n * path's outline is a `segment` hit, which the segment bend binds to and a\n * selection move turns down. Anchors, controls, and segments share one id:\n * chrome-caps gates anchor editing as a single piece of chrome. A part a\n * path-edit extension adds (`PathEditExtension.parts`) may name a chrome id of\n * its own as well, so it can be shown apart from the anchors.\n *\n * Order matters — spread this into an affordance list in the returned order.\n */\nexport function createPathAnchorAffordances(\n getAnchorState: () => AnchorState | null,\n opts: PathAnchorAffordanceOptions = {},\n): Affordance[] {\n const { hitRadius = 8, cursor = 'pointer' } = opts;\n\n /** Selected polygon paths, and the one being edited, paired with their node id. */\n const editablePaths = (state: ChromeState): Array<{ id: string; path: PolygonPath }> => {\n const anchorState = getAnchorState();\n if (!anchorState) return [];\n const out: Array<{ id: string; path: PolygonPath }> = [];\n for (const id of withEdited(state.selection, anchorState.editingId)) {\n const pose = anchorState.getPose(id);\n if (!pose || (pose as { kind?: string }).kind !== 'polygon') continue;\n out.push({ id, path: pose as PolygonPath });\n }\n return out;\n };\n\n const point = (\n id: string,\n targetId: string,\n x: number,\n y: number,\n scratch: AnchorScratch,\n hitKind: string,\n ): AffordanceRegion => ({\n id,\n // Anchor coordinates are already world space, pose rotation baked in.\n // Anchoring to `null` keeps the framework from applying it twice.\n targetId: null,\n shape: { kind: 'point', x, y, hitRadiusPx: hitRadius },\n hitKind,\n ...(getAnchorState()?.tool ? {} : { cursor }),\n bind: (): AffordanceBinding => ({ initialScratch: { ...scratch, targetId } }),\n });\n\n const anchors: Affordance = {\n id: PATH_ANCHOR_CHROME_ID,\n regions(state) {\n const editingId = getAnchorState()?.editingId ?? null;\n const out: AffordanceRegion[] = [];\n for (const { id, path } of editablePaths(state)) {\n // `editAnchorsAction` edits whatever path the dep says is in edit\n // mode, ignoring which one was hit — so once a path IS being edited,\n // only its own anchors may claim the press.\n if (editingId !== null && id !== editingId) continue;\n for (const a of enumerateAnchors(path)) {\n out.push(point(\n `${id}:anchor:${a.anchorIndex}`,\n id, a.x, a.y,\n { targetId: id, anchorIndex: a.anchorIndex, part: 'anchor' },\n `anchor:${a.anchorIndex}`,\n ));\n }\n }\n return out;\n },\n };\n\n const controls: Affordance = {\n id: PATH_ANCHOR_CHROME_ID,\n regions(state) {\n const anchorState = getAnchorState();\n const editingId = anchorState?.editingId ?? null;\n if (editingId === null) return [];\n const out: AffordanceRegion[] = [];\n for (const { id, path } of editablePaths(state)) {\n // Controls are grabbable only on the path actually in edit mode.\n if (id !== editingId) continue;\n for (const a of enumerateAnchors(path)) {\n if (a.controlIn) {\n out.push(point(\n `${id}:controlIn:${a.anchorIndex}`,\n id, a.controlIn.x, a.controlIn.y,\n { targetId: id, anchorIndex: a.anchorIndex, part: 'controlIn' },\n `controlIn:${a.anchorIndex}`,\n ));\n }\n if (a.controlOut) {\n out.push(point(\n `${id}:controlOut:${a.anchorIndex}`,\n id, a.controlOut.x, a.controlOut.y,\n { targetId: id, anchorIndex: a.anchorIndex, part: 'controlOut' },\n `controlOut:${a.anchorIndex}`,\n ));\n }\n }\n }\n return out;\n },\n };\n\n const segments: Affordance = {\n id: PATH_ANCHOR_CHROME_ID,\n regions(state) {\n const editingId = getAnchorState()?.editingId ?? null;\n if (editingId === null) return [];\n const edited = editablePaths(state).find(({ id }) => id === editingId);\n if (!edited) return [];\n const outline = getAnchorState()?.getOutline?.(editingId) as PolygonPath | null | undefined;\n return [{\n id: `${editingId}:segment`,\n targetId: null,\n shape: { kind: 'outline', path: outline?.kind === 'polygon' ? outline : edited.path, hitRadiusPx: hitRadius },\n hitKind: 'segment',\n bind: (): AffordanceBinding => ({ initialScratch: { targetId: editingId } }),\n }];\n },\n };\n\n return [segments, extensionParts(getAnchorState, hitRadius, cursor), anchors, controls];\n}\n\n/** The parts path-edit extensions add to the path in edit mode, each pressed\n * as its own `hitKind`. */\nfunction extensionParts(\n getAnchorState: () => AnchorState | null,\n hitRadius: number,\n cursor: CursorSpec,\n): Affordance {\n return {\n id: PATH_ANCHOR_CHROME_ID,\n regions() {\n const anchorState = getAnchorState();\n const editingId = anchorState?.editingId ?? null;\n const extensions = anchorState?.extensions?.filter((e) => e.parts) ?? [];\n if (editingId === null || extensions.length === 0) return [];\n const pose = anchorState!.getPose(editingId);\n const node = anchorState!.getNode?.(editingId);\n if (!node || !pose || (pose as { kind?: string }).kind !== 'polygon') return [];\n const target = {\n id: editingId, node, path: pose as PolygonPath, anchors: pathToAnchors(pose as PolygonPath) as AnchorSet,\n };\n return extensions.flatMap((ext) => ext.parts!(target).map((part): AffordanceRegion => ({\n id: `${editingId}:${part.hitKind}`,\n targetId: null,\n shape: {\n kind: 'point', x: part.x, y: part.y, hitRadiusPx: part.hitRadiusPx ?? hitRadius,\n ...(part.standoff ? { standoff: part.standoff } : {}),\n },\n hitKind: part.hitKind,\n ...(part.chromeId ? { chromeId: part.chromeId } : {}),\n cursor,\n bind: (): AffordanceBinding => ({ initialScratch: { targetId: editingId } }),\n })));\n },\n };\n}\n\n/** `selection`, and the path being edited after it when the selection does not hold it: a path edited through the\n * effect that hides it is edited while the effect is what is selected. */\nfunction withEdited(selection: readonly string[], editingId: string | null): readonly string[] {\n return editingId === null || selection.includes(editingId) ? selection : [...selection, editingId];\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"pathAnchors.js","names":[],"sources":["../../src/affordances/pathAnchors.ts"],"sourcesContent":["/** Path anchor, control-handle, and segment affordances, and the parts path-edit extensions add. */\n\nimport type { CursorSpec } from '@weasel-js/cursor';\nimport type { Affordance, AffordanceBinding, AffordanceRegion, CommonAffordanceScratch } from './types';\nimport type { ChromeState } from 'core/selection/chromeState';\nimport { pathToAnchors, type AnchorSet, type PolygonPath } from '@weasel-js/geom';\nimport { enumerateAnchors } from 'interactions/actions/edit-anchors/geometry';\nimport type { PathEditExtension } from 'domains/paths/pathEditExtension';\n\n/**\n * Live anchor-editing state. The thunk that returns it is called on every\n * pointer event, so it must be cheap (O(1) field reads).\n */\nexport interface AnchorState {\n /** Id of the path currently in anchor-edit mode, or `null`. Control handles\n * are only hittable on the path that is being edited. */\n editingId: string | null;\n /** Current editable path for a node id. Non-polygon values are ignored. */\n getPose(id: string): unknown;\n /** The committed pose and data of a node, which extensions' parts read. */\n getNode?(id: string): { pose: unknown; data: unknown } | null;\n /** The path-edit extensions whose parts are pressed, in order. */\n extensions?: readonly PathEditExtension[];\n /** The path whose outline counts as a segment press, when it is not\n * `getPose`'s: a path drawn from a form, edited through the form's edit\n * path. */\n getOutline?(id: string): unknown;\n}\n\n/** Options for the path-anchor affordances. */\nexport interface PathAnchorAffordanceOptions {\n /** Hit radius (screen-px) for anchor and control points. Default 8. */\n hitRadius?: number;\n /** Cursor while hovering a part a path-edit extension adds. Defaults to\n * `'pointer'`. Anchors and controls carry none: the action a drag on one\n * would start shows its own, `editAnchors`' pointer or a path-edit tool's. */\n cursor?: CursorSpec;\n}\n\n/** What an anchor hit hands to the action that follows. */\nexport interface AnchorScratch extends CommonAffordanceScratch {\n /** Node id of the path the anchor belongs to. */\n targetId: string;\n /** Sequential anchor index in path walk order. */\n anchorIndex: number;\n /** Which of the anchor's three grabbable points this is. */\n part: 'anchor' | 'controlIn' | 'controlOut';\n}\n\n/** Chrome-caps id gating the anchor, control, and segment affordances. */\nexport const PATH_ANCHOR_CHROME_ID = 'path-edit.anchors';\n\n/**\n * Segment, extension-part, anchor, and control affordances for the selected\n * paths, bottom → top.\n *\n * Three affordances rather than one, so that a control handle beats an anchor\n * regardless of which is nearer, the way controls draw on top, and both beat\n * the segment they sit on. Within each, nearest wins. A press on the edited\n * path's outline is a `segment` hit, which the segment bend binds to and a\n * selection move turns down. Anchors, controls, and segments share one id:\n * chrome-caps gates anchor editing as a single piece of chrome. A part a\n * path-edit extension adds (`PathEditExtension.parts`) may name a chrome id of\n * its own as well, so it can be shown apart from the anchors.\n *\n * Order matters — spread this into an affordance list in the returned order.\n */\nexport function createPathAnchorAffordances(\n getAnchorState: () => AnchorState | null,\n opts: PathAnchorAffordanceOptions = {},\n): Affordance[] {\n const { hitRadius = 8, cursor = 'pointer' } = opts;\n\n /** Selected polygon paths, and the one being edited, paired with their node id. */\n const editablePaths = (state: ChromeState): Array<{ id: string; path: PolygonPath }> => {\n const anchorState = getAnchorState();\n if (!anchorState) return [];\n const out: Array<{ id: string; path: PolygonPath }> = [];\n for (const id of withEdited(state.selection, anchorState.editingId)) {\n const pose = anchorState.getPose(id);\n if (!pose || (pose as { kind?: string }).kind !== 'polygon') continue;\n out.push({ id, path: pose as PolygonPath });\n }\n return out;\n };\n\n const point = (\n id: string,\n targetId: string,\n x: number,\n y: number,\n scratch: AnchorScratch,\n hitKind: string,\n ): AffordanceRegion => ({\n id,\n // Anchor coordinates are already world space, pose rotation baked in.\n // Anchoring to `null` keeps the framework from applying it twice.\n targetId: null,\n shape: { kind: 'point', x, y, hitRadiusPx: hitRadius },\n hitKind,\n bind: (): AffordanceBinding => ({ initialScratch: { ...scratch, targetId } }),\n });\n\n const anchors: Affordance = {\n id: PATH_ANCHOR_CHROME_ID,\n regions(state) {\n const editingId = getAnchorState()?.editingId ?? null;\n const out: AffordanceRegion[] = [];\n for (const { id, path } of editablePaths(state)) {\n // `editAnchorsAction` edits whatever path the dep says is in edit\n // mode, ignoring which one was hit — so once a path IS being edited,\n // only its own anchors may claim the press.\n if (editingId !== null && id !== editingId) continue;\n for (const a of enumerateAnchors(path)) {\n out.push(point(\n `${id}:anchor:${a.anchorIndex}`,\n id, a.x, a.y,\n { targetId: id, anchorIndex: a.anchorIndex, part: 'anchor' },\n `anchor:${a.anchorIndex}`,\n ));\n }\n }\n return out;\n },\n };\n\n const controls: Affordance = {\n id: PATH_ANCHOR_CHROME_ID,\n regions(state) {\n const anchorState = getAnchorState();\n const editingId = anchorState?.editingId ?? null;\n if (editingId === null) return [];\n const out: AffordanceRegion[] = [];\n for (const { id, path } of editablePaths(state)) {\n // Controls are grabbable only on the path actually in edit mode.\n if (id !== editingId) continue;\n for (const a of enumerateAnchors(path)) {\n if (a.controlIn) {\n out.push(point(\n `${id}:controlIn:${a.anchorIndex}`,\n id, a.controlIn.x, a.controlIn.y,\n { targetId: id, anchorIndex: a.anchorIndex, part: 'controlIn' },\n `controlIn:${a.anchorIndex}`,\n ));\n }\n if (a.controlOut) {\n out.push(point(\n `${id}:controlOut:${a.anchorIndex}`,\n id, a.controlOut.x, a.controlOut.y,\n { targetId: id, anchorIndex: a.anchorIndex, part: 'controlOut' },\n `controlOut:${a.anchorIndex}`,\n ));\n }\n }\n }\n return out;\n },\n };\n\n const segments: Affordance = {\n id: PATH_ANCHOR_CHROME_ID,\n regions(state) {\n const editingId = getAnchorState()?.editingId ?? null;\n if (editingId === null) return [];\n const edited = editablePaths(state).find(({ id }) => id === editingId);\n if (!edited) return [];\n const outline = getAnchorState()?.getOutline?.(editingId) as PolygonPath | null | undefined;\n return [{\n id: `${editingId}:segment`,\n targetId: null,\n shape: { kind: 'outline', path: outline?.kind === 'polygon' ? outline : edited.path, hitRadiusPx: hitRadius },\n hitKind: 'segment',\n bind: (): AffordanceBinding => ({ initialScratch: { targetId: editingId } }),\n }];\n },\n };\n\n return [segments, extensionParts(getAnchorState, hitRadius, cursor), anchors, controls];\n}\n\n/** The parts path-edit extensions add to the path in edit mode, each pressed\n * as its own `hitKind`. */\nfunction extensionParts(\n getAnchorState: () => AnchorState | null,\n hitRadius: number,\n cursor: CursorSpec,\n): Affordance {\n return {\n id: PATH_ANCHOR_CHROME_ID,\n regions() {\n const anchorState = getAnchorState();\n const editingId = anchorState?.editingId ?? null;\n const extensions = anchorState?.extensions?.filter((e) => e.parts) ?? [];\n if (editingId === null || extensions.length === 0) return [];\n const pose = anchorState!.getPose(editingId);\n const node = anchorState!.getNode?.(editingId);\n if (!node || !pose || (pose as { kind?: string }).kind !== 'polygon') return [];\n const target = {\n id: editingId, node, path: pose as PolygonPath, anchors: pathToAnchors(pose as PolygonPath) as AnchorSet,\n };\n return extensions.flatMap((ext) => ext.parts!(target).map((part): AffordanceRegion => ({\n id: `${editingId}:${part.hitKind}`,\n targetId: null,\n shape: {\n kind: 'point', x: part.x, y: part.y, hitRadiusPx: part.hitRadiusPx ?? hitRadius,\n ...(part.standoff ? { standoff: part.standoff } : {}),\n },\n hitKind: part.hitKind,\n ...(part.chromeId ? { chromeId: part.chromeId } : {}),\n cursor,\n bind: (): AffordanceBinding => ({ initialScratch: { targetId: editingId } }),\n })));\n },\n };\n}\n\n/** `selection`, and the path being edited after it when the selection does not hold it: a path edited through the\n * effect that hides it is edited while the effect is what is selected. */\nfunction withEdited(selection: readonly string[], editingId: string | null): readonly string[] {\n return editingId === null || selection.includes(editingId) ? selection : [...selection, editingId];\n}\n"],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/affordances/rotateCursor.ts
|
|
2
2
|
/**
|
|
3
3
|
* The `rotate` glyph for a pointer at world point `at` turning something
|
|
4
4
|
* about world point `pivot`, seen through a view of `scale`. The glyph's arc
|
|
@@ -13,6 +13,5 @@ function rotateCursorAt(pivot, at, scale) {
|
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
//#endregion
|
|
17
16
|
export { rotateCursorAt };
|
|
18
17
|
//# sourceMappingURL=rotateCursor.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { localToWorld } from "../core/geometry/targetFrame.js";
|
|
2
|
-
import { transformOf } from "./hitAffordanceRegions.js";
|
|
3
2
|
import { MULTI_RESIZE_TARGET_ID } from "../core/selection/selectionTarget.js";
|
|
3
|
+
import { transformOf } from "./hitAffordanceRegions.js";
|
|
4
4
|
import { rotateCursorAt } from "./rotateCursor.js";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/affordances/rotationHandle.ts
|
|
7
7
|
var isAnnulusForm = (paint) => "fill" in paint || "stroke" in paint || "insetPx" in paint;
|
|
8
8
|
var DEFAULT_PAINT = {
|
|
9
9
|
fill: { paint: {
|
|
@@ -119,6 +119,5 @@ function pickTarget(state) {
|
|
|
119
119
|
return null;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
//#endregion
|
|
123
122
|
export { createRotationAffordance };
|
|
124
123
|
//# sourceMappingURL=rotationHandle.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/animation/behaviors/coast.ts
|
|
2
2
|
var nextCoast = 0;
|
|
3
3
|
/** A cancel key no other coast holds. */
|
|
4
4
|
var coastKey = () => `momentum:${nextCoast++}`;
|
|
@@ -22,6 +22,5 @@ function clampCorner(bounds, x, y) {
|
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
//#endregion
|
|
26
25
|
export { clampCorner, coastKey, sameBounds };
|
|
27
26
|
//# sourceMappingURL=coast.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { translatePoseViaDescriptor } from "../../core/geometry/poseDescriptor.js";
|
|
2
1
|
import { createTransformOp } from "../../core/ops/transform.js";
|
|
2
|
+
import { translatePoseViaDescriptor } from "../../core/geometry/poseDescriptor.js";
|
|
3
3
|
import { clampCorner, coastKey, sameBounds } from "./coast.js";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/animation/behaviors/coastByWrite.ts
|
|
6
6
|
/**
|
|
7
7
|
* A coast over an adapter with no pose targets: one decay of the flick's travel, written to
|
|
8
8
|
* every node it carries each frame, through `previewPoses` where the adapter has it and
|
|
@@ -130,6 +130,5 @@ function coastByWrite(a) {
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
//#endregion
|
|
134
133
|
export { coastByWrite };
|
|
135
134
|
//# sourceMappingURL=coastByWrite.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { translatePoseViaDescriptor } from "../../core/geometry/poseDescriptor.js";
|
|
2
1
|
import { createTransformOp } from "../../core/ops/transform.js";
|
|
2
|
+
import { translatePoseViaDescriptor } from "../../core/geometry/poseDescriptor.js";
|
|
3
3
|
import { poseKey } from "../poseHelpers.js";
|
|
4
4
|
import { clampCorner, coastKey, sameBounds } from "./coast.js";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/animation/behaviors/coastOnTargets.ts
|
|
7
7
|
/** A world velocity as the rate of change of a pose at `at`. */
|
|
8
8
|
function poseVelocity(ax, d, at, vx, vy) {
|
|
9
9
|
const base = ax.to(at);
|
|
@@ -137,6 +137,5 @@ function coastOnTargets(a, targets) {
|
|
|
137
137
|
for (const r of [...riders.values()]) launch(r, ctx.current.get(r.id), a.vx, a.vy);
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
//#endregion
|
|
141
140
|
export { coastOnTargets };
|
|
142
141
|
//# sourceMappingURL=coastOnTargets.js.map
|
|
@@ -3,7 +3,7 @@ import { coastByWrite } from "./coastByWrite.js";
|
|
|
3
3
|
import { coastOnTargets } from "./coastOnTargets.js";
|
|
4
4
|
import { getScratch, scratchKey, setScratch } from "@weasel-js/routing";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/animation/behaviors/momentum.ts
|
|
7
7
|
var SAMPLES = scratchKey("momentum.samples");
|
|
8
8
|
/**
|
|
9
9
|
* Move behavior that keeps a dragged node coasting after the pointer is
|
|
@@ -98,6 +98,5 @@ function momentum(opts) {
|
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
//#endregion
|
|
102
101
|
export { momentum };
|
|
103
102
|
//# sourceMappingURL=momentum.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { scenePoseTarget } from "./poseTarget.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/animation/clipTargets.ts
|
|
4
4
|
/**
|
|
5
5
|
* A `ClipBinder.target` over a scene. `pose:<node id>` is that node's pose target, the one
|
|
6
6
|
* `scenePoseTarget` answers, and `rig:<name>` is the target of the rig given under that
|
|
@@ -14,6 +14,5 @@ function sceneClipTargets(scene, options = {}) {
|
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
//#endregion
|
|
18
17
|
export { sceneClipTargets };
|
|
19
18
|
//# sourceMappingURL=clipTargets.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { poseAxes } from "./poseTarget.js";
|
|
2
1
|
import { createPoseOverrides } from "../core/scene/poseOverrides.js";
|
|
2
|
+
import { poseAxes } from "./poseTarget.js";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/animation/departures.ts
|
|
5
5
|
/** `base`'s poses with an opacity riding beside them, as one more axis. */
|
|
6
6
|
function fadedDescriptor(base) {
|
|
7
7
|
const lerp = base.lerp;
|
|
@@ -111,6 +111,5 @@ function createDepartures() {
|
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
//#endregion
|
|
115
114
|
export { createDepartures, fadedDescriptor };
|
|
116
115
|
//# sourceMappingURL=departures.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { RECT_POSE_DESCRIPTOR } from "../core/geometry/poseDescriptor.js";
|
|
2
1
|
import { createTransformOp } from "../core/ops/transform.js";
|
|
2
|
+
import { RECT_POSE_DESCRIPTOR } from "../core/geometry/poseDescriptor.js";
|
|
3
3
|
import { rewindingSpring, rewindingTween } from "./rewind.js";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/animation/poseHelpers.ts
|
|
6
6
|
/** The cancel key every move of node `id`'s pose shares. */
|
|
7
7
|
var poseKey = (id) => `pose:${id}`;
|
|
8
8
|
function recordTransformOp(adapter, id, from, to, label) {
|
|
@@ -164,6 +164,5 @@ function staggerSpringPose(animator, adapter, opts) {
|
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
//#endregion
|
|
168
167
|
export { poseKey, springPose, staggerSpringPose, tweenPose };
|
|
169
168
|
//# sourceMappingURL=poseHelpers.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { documentPose } from "../core/scene/effectivePose.js";
|
|
2
1
|
import { RECT_POSE_DESCRIPTOR } from "../core/geometry/poseDescriptor.js";
|
|
2
|
+
import { documentPose } from "../core/scene/effectivePose.js";
|
|
3
3
|
import { axesOf, createTarget } from "@weasel-js/animator";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/animation/poseTarget.ts
|
|
6
6
|
/** How `like`'s kind of pose maps to axes: the descriptor's own mapping, else its flat numeric
|
|
7
7
|
* fields. Null for a pose with neither. */
|
|
8
8
|
function poseAxes(descriptor, like) {
|
|
@@ -187,6 +187,5 @@ function scenePoseTarget(scene, id, descriptor) {
|
|
|
187
187
|
return target;
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
//#endregion
|
|
191
190
|
export { createPoseTarget, liveAxes, poseAxes, scenePoseTarget };
|
|
192
191
|
//# sourceMappingURL=poseTarget.js.map
|
|
@@ -2,7 +2,7 @@ import { createDepartures } from "./departures.js";
|
|
|
2
2
|
import { useEffect, useMemo } from "react";
|
|
3
3
|
import { useLatest } from "@weasel-js/react";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/animation/poseTransition.ts
|
|
6
6
|
/**
|
|
7
7
|
* The writes a {@link PoseTransitionSeat} glides unless told otherwise: a
|
|
8
8
|
* direct scene call, an undo, and a redo. An action's commit (`'ops'`) is
|
|
@@ -59,6 +59,5 @@ function usePoseTransition(scene, seat) {
|
|
|
59
59
|
return departures;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
//#endregion
|
|
63
62
|
export { bindPoseTransition, glidesByDefault, usePoseTransition };
|
|
64
63
|
//# sourceMappingURL=poseTransition.js.map
|
package/dist/animation/reflow.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { documentPose, effectivePose } from "../core/scene/effectivePose.js";
|
|
2
1
|
import { RECT_POSE_DESCRIPTOR } from "../core/geometry/poseDescriptor.js";
|
|
2
|
+
import { documentPose, effectivePose } from "../core/scene/effectivePose.js";
|
|
3
3
|
import { liveAxes } from "./poseTarget.js";
|
|
4
4
|
import { useEffect, useMemo } from "react";
|
|
5
5
|
import { useLatest } from "@weasel-js/react";
|
|
6
6
|
import { createTarget } from "@weasel-js/animator";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/animation/reflow.ts
|
|
9
9
|
/** The animator's cancel-key for one node's glide. */
|
|
10
10
|
var keyFor = (id) => `reflow:${id}`;
|
|
11
11
|
function samePose(a, b) {
|
|
@@ -231,6 +231,5 @@ function useAnimatedReflow(scene, animator, opts) {
|
|
|
231
231
|
return reflow;
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
//#endregion
|
|
235
234
|
export { createReflowTransition, useAnimatedReflow };
|
|
236
235
|
//# sourceMappingURL=reflow.js.map
|