@weasel-js/core 1.15.0 → 1.15.2
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 +199 -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 -2
- 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 +5 -6
- package/dist/animation/poseTarget.js.map +1 -1
- package/dist/animation/poseTransition.js +1 -2
- package/dist/animation/reflow.js +9 -10
- package/dist/animation/reflow.js.map +1 -1
- package/dist/animation/rewind.js +1 -2
- package/dist/animation/rig/bindRig.js +2 -3
- package/dist/animation/rig/rigNode.js +3 -4
- package/dist/animation/rig/rigNode.js.map +1 -1
- 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/input.js +2 -1
- package/dist/barrel/interactions.js +2 -1
- package/dist/barrel/paint.js +2 -2
- package/dist/barrel/routing.js +2 -2
- package/dist/barrel/scene.js +2 -2
- package/dist/barrel/viewport.js +3 -3
- package/dist/canvas/Canvas.js +5 -6
- package/dist/canvas/CanvasView.js +6 -7
- package/dist/canvas/CursorCoordsHud.js +2 -3
- package/dist/canvas/DrawCanvas.js +3 -4
- 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 +18 -66
- package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js.map +1 -1
- package/dist/canvas/SceneCanvas/SceneCanvasInput.js +4 -5
- package/dist/canvas/SceneCanvas/SurfaceDeclarations.js +1 -2
- package/dist/canvas/SceneCanvas/brushOverlay.js +1 -2
- package/dist/canvas/SceneCanvas/builtinToolSets.js +1 -2
- 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 +3 -4
- 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 +3 -4
- 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 +1 -2
- 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 +2 -3
- 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 +1 -2
- 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 +5 -6
- 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 +26 -18
- 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 +18 -17
- package/dist/canvas/SceneCanvas.js.map +1 -1
- package/dist/canvas/SceneViewCanvas.js +2 -3
- package/dist/canvas/SurfaceCanvas.js +1 -2
- package/dist/canvas/ViewMarker.js +1 -2
- package/dist/canvas/accentColor.js +4 -5
- package/dist/canvas/accentColor.js.map +1 -1
- package/dist/canvas/adapterDerivedPath.js +2 -3
- package/dist/canvas/adapterPickSource.js +1 -2
- package/dist/canvas/affordanceAt.js +2 -3
- 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 +1 -2
- 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 -4
- package/dist/canvas/deps/enteredGroup.js +6 -6
- package/dist/canvas/deps/enteredGroup.js.map +1 -1
- package/dist/canvas/deps/geometryProjection.js +1 -2
- package/dist/canvas/deps/hitTestArea.js +4 -5
- 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 +1 -2
- package/dist/canvas/deps/nodeAtPoint.js +1 -2
- package/dist/canvas/deps/pathEditCommits.js +4 -5
- 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 +8 -4
- package/dist/canvas/deps/selectionSnapshot.js.map +1 -1
- package/dist/canvas/deps/slice.js +5 -6
- package/dist/canvas/deps/snap.js +3 -4
- 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 +1 -2
- package/dist/canvas/pickWalk.js +2 -3
- 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 +5 -6
- 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 +9 -4
- package/dist/canvas/slopsDebugLayer.js.map +1 -1
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +7 -5
- package/dist/canvas/useViewRegistrySurface.js.map +1 -1
- package/dist/canvas/viewInputs.js +1 -2
- package/dist/canvas/viewMarkers.js +1 -2
- package/dist/canvas/viewRegistry.js +6 -7
- package/dist/canvas/viewRegistry.js.map +1 -1
- 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 +1 -2
- 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 +3 -8
- package/dist/core/ops/reorder/index.js.map +1 -1
- 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 +3 -9
- package/dist/core/pages/fitViewToPage.js.map +1 -1
- package/dist/core/pages/pageEdits.js +3 -4
- package/dist/core/pages/pages.js +4 -11
- 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 +18 -23
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- package/dist/core/scene/outerOps.js +1 -2
- package/dist/core/scene/pathEffects/blend.js +3 -4
- package/dist/core/scene/pathEffects/blend.js.map +1 -1
- 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 +6 -6
- package/dist/core/scene/pathEffects/textAlong.js.map +1 -1
- 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 +1 -2
- 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 +23 -13
- 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 +1 -2
- package/dist/core/scene/sceneMutators.js +2 -3
- package/dist/core/scene/scenePoseAdapter.js +1 -2
- package/dist/core/scene/sceneRecording.js +1 -2
- 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 +8 -3
- package/dist/core/viewport/clientToWorld.js.map +1 -1
- 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 +1 -2
- 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 +7 -8
- package/dist/core/viewport/zoomAt.js.map +1 -1
- 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-ChQPzEkW.d.ts → depSchema-C7a_OMt-.d.ts} +61 -52
- 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 +12 -6
- package/dist/devtools/root.js.map +1 -1
- package/dist/devtools/serialize.js +1 -2
- package/dist/devtools/session.js +2 -3
- package/dist/devtools/transport.js +13 -18
- package/dist/devtools/transport.js.map +1 -1
- package/dist/devtools/useDevtoolsRoot.js +1 -2
- package/dist/devtools-protocol.d.ts +1 -12
- 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 +2 -3
- package/dist/domains/chrome-caps/useChromeCaps.js +1 -2
- 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 +5 -12
- package/dist/domains/measure/measureHit.js.map +1 -1
- 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 +6 -13
- package/dist/domains/paths/anchorMarkers.js.map +1 -1
- 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 -2
- package/dist/domains/paths/pathEditingOverlayLayer.js +7 -12
- package/dist/domains/paths/pathEditingOverlayLayer.js.map +1 -1
- 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 +10 -14
- package/dist/domains/paths/penPreviewLayer.js.map +1 -1
- package/dist/domains/paths/shapeGenerator.js +2 -4
- package/dist/domains/paths/shapeGenerator.js.map +1 -1
- 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 +3 -3
- package/dist/domains/snap/angle2d.js.map +1 -1
- 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 +6 -10
- package/dist/domains/snap/outcomeStore.js.map +1 -1
- package/dist/domains/snap/pointSnap.js +1 -2
- package/dist/domains/snap/probes2d.js +1 -2
- 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 +2 -3
- package/dist/domains/snap/sceneSession2d.js +2 -3
- 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/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 +13 -9
- package/dist/domains/text/useSceneTextEdit.js.map +1 -1
- package/dist/domains/viewports/aim.js +6 -12
- package/dist/domains/viewports/aim.js.map +1 -1
- package/dist/domains/viewports/viewMarker.js +1 -2
- package/dist/domains/viewports/viewMarkerDrag.js +1 -2
- package/dist/domains/viewports/viewResolver.js +6 -5
- package/dist/domains/viewports/viewResolver.js.map +1 -1
- 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 +1 -2
- package/dist/icons2.table.js +1 -2
- package/dist/index.d.ts +70 -27
- package/dist/index.js +7 -5
- package/dist/input/keyState.js +1 -2
- package/dist/input/useKeyModifiers.js +1 -2
- package/dist/input/useKeyState.js +1 -2
- package/dist/input/usePublishPointer.js +59 -0
- package/dist/input/usePublishPointer.js.map +1 -0
- 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 +1 -2
- 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 +3 -4
- 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 +3 -4
- 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 +13 -8
- package/dist/interactions/actions/defaults/containerScroll.js.map +1 -1
- 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 +5 -6
- package/dist/interactions/actions/defaults/enterGroup.js.map +1 -1
- 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 +1 -2
- 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 +3 -7
- package/dist/interactions/actions/defaults/pathEditMarks.js.map +1 -1
- 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 +4 -5
- 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 +5 -9
- package/dist/interactions/actions/edit-anchors/handleDrag.js.map +1 -1
- 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 +6 -7
- 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 +2 -3
- 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/clampMove.js +42 -0
- package/dist/interactions/actions/move/behaviors/clampMove.js.map +1 -0
- 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 +6 -10
- package/dist/interactions/actions/move/layout/container.js.map +1 -1
- 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 +4 -5
- package/dist/interactions/actions/move/layout/exits.js.map +1 -1
- 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 +1 -2
- package/dist/interactions/actions/outlines/createOutlines.js +1 -2
- package/dist/interactions/actions/outlines/createOutlinesAction.js +2 -3
- package/dist/interactions/actions/outlines/outlineStroke.js +2 -3
- package/dist/interactions/actions/outlines/outlineStrokeAction.js +2 -3
- 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 +3 -4
- 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 -2
- package/dist/interactions/actions/transform-again/action.js +5 -6
- package/dist/interactions/actions/transform-again/memory.js +3 -4
- package/dist/interactions/actions/transform-again/memory.js.map +1 -1
- package/dist/interactions/actions/transformFinish.js +1 -2
- package/dist/interactions/actions/useActionSet.js +1 -2
- package/dist/interactions/actions/useNotices.js +1 -2
- 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/move.d.ts +18 -3
- package/dist/move.js +2 -1
- 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 +4 -4
- package/dist/test-seams.js +2 -2
- package/dist/tools/builtin/anchors/anchorsTool.js +1 -2
- 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 +3 -4
- 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 +3 -4
- 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 +2 -2
- package/dist/tools/overlayBinding.js +1 -2
- package/dist/tools/toolOptions.js +17 -4
- package/dist/tools/toolOptions.js.map +1 -1
- 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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,204 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.15.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 946faff: `clampMove({ bounds })` from `@weasel-js/core/move` is a move behavior that keeps the dragged nodes inside a
|
|
8
|
+
world rect: the drag's translation is clamped so the box around every dragged node stays in `bounds`, in
|
|
9
|
+
the preview and the commit alike. `bounds` can be a function, read each frame, for a rect that changes
|
|
10
|
+
size.
|
|
11
|
+
- 507f539: paint exports `relativeLuminance` and `luminanceContrast`, the WCAG luminance and ratio `contrastRatio` is built on; core re-exports both. theme's `luminance`/`contrast`, its test helpers, ui's painted-contrast helpers and forge's pixel contrast readout now use them.
|
|
12
|
+
|
|
13
|
+
Color strings that theme's `withAlpha`/`atAlpha`, ui's `TokenPanel` hex conversion and diagram-formats' DOT and Mermaid writers read are parsed by paint's `parseColor`. The `TokenPanel` color input now converts float and percent `rgb()` channels, named colors and `hsl()` without a browser, and diagram-formats writes percent `rgb()` channels as hex instead of passing them through. diagram-formats now depends on `@weasel-js/paint`.
|
|
14
|
+
|
|
15
|
+
labkit's loupe and ui's `Timeline` ruler and lane graph measure their element with core's `useElementSize`.
|
|
16
|
+
- a4138b6: `@weasel-js/geom` states the nearest point of a segment, point distance and lerp once, in any
|
|
17
|
+
dimension, and every tier answers through that one rule.
|
|
18
|
+
|
|
19
|
+
- `@weasel-js/geom/nd` adds `segmentT`, `closestPointOnSegment`, `pointSegmentDist`,
|
|
20
|
+
`pointSegmentDist2`, `distance`, `distance2` and `lerp` over plain number arrays.
|
|
21
|
+
- The root barrel adds `segmentT` and `pointSegmentDist` over loose scalars, which allocate nothing,
|
|
22
|
+
beside the existing `pointSegmentDist2`; `distance`, `distance2` and `lerpPoint` over `Point`; and a
|
|
23
|
+
scalar `lerp`.
|
|
24
|
+
- `@weasel-js/geom/3d`'s `closestPointOnSegment` and `lerp` now go through the same rule, so a planar
|
|
25
|
+
problem gets the same numbers in 2D, 3D and `nd`.
|
|
26
|
+
|
|
27
|
+
A segment's parameter is clamped to [0, 1] and is 0 on a zero-length segment; at `t = 1` the nearest
|
|
28
|
+
point is the far end exactly. `nearestOnLine` and the private copies in core's measurement hit test,
|
|
29
|
+
animator's auto-skinning, diagram's route and label code, stroke's edge test, path-tools'
|
|
30
|
+
extend-to-meet and guides' layout snaps now call these, so their distances can move by a rounding
|
|
31
|
+
step (`Math.hypot` became a square root of the summed squares).
|
|
32
|
+
|
|
33
|
+
Corner shapes (`cornerShapePieces`) now fit the true superellipse within `CORNER_FIT_TOLERANCE` for
|
|
34
|
+
every finite `k`. Past `|k| ≈ 9` they strayed up to nine times the tolerance off the curve's straight
|
|
35
|
+
legs, because the fit stepped in an angle that crowds those legs into less than a double resolves;
|
|
36
|
+
it now steps evenly along each leg. The same corners draw with about a third fewer cubics.
|
|
37
|
+
- f1906a8: The rest of the kit's stores notify through registry's `createEmitter`: the entered group, the snap
|
|
38
|
+
outcome, devtools roots and transports, kit settings, the menu host and menu controller, tool
|
|
39
|
+
options, `RunSlots`, the seam preview, the HUD list, the effect runners, the symmetry controller,
|
|
40
|
+
the devtools client, and forge's loupe and CSS-variable stores. A listener that throws is logged
|
|
41
|
+
and no longer stops the others, and a listener unsubscribed mid-notify is no longer called; the
|
|
42
|
+
menu host, `RunSlots` and the HUD list used to walk their live set. diagram, diagram-formats, menu,
|
|
43
|
+
symmetry and devtools now depend on `@weasel-js/registry`.
|
|
44
|
+
|
|
45
|
+
Structural comparisons that went through `JSON.stringify` use `deepEqual` instead, so key order no
|
|
46
|
+
longer makes two equal values differ (theme baking, diagram export's style diffs, trial marks, path
|
|
47
|
+
constraints, unit rows, toolbar dock drops). PrefSchemaEditor's three-way merge keeps
|
|
48
|
+
`JSON.stringify`, because there a reordered key is an edit.
|
|
49
|
+
|
|
50
|
+
New: `sameList(a, b, same?)` in `@weasel-js/registry`, whether two lists hold equal elements in
|
|
51
|
+
order. `@weasel-js/react`'s `sameList` is now this function, and ui's `samePath` is an alias of it.
|
|
52
|
+
- e804540: **Behavior change:** `matchesKeyBinding` and `historyKey` now read `mod` the way `@weasel-js/gestures`
|
|
53
|
+
does: Command on an Apple platform, Ctrl elsewhere, and the other key forbidden. Before, either key
|
|
54
|
+
fired a `mod` binding on every platform, so Ctrl+Z undid on a Mac and Cmd+Z undid on Windows; now
|
|
55
|
+
neither does, and neither does Cmd+Ctrl+Z. Both take an optional `isMac` argument, defaulting to
|
|
56
|
+
`isApplePlatform()`. Everything built on them follows: labkit's trial chrome and `useUndoKeys`, and
|
|
57
|
+
the undo keys in `AssetEditor`, `LayeredCurveEditor` and forge's CSS-vars panel. A trial's snapshot
|
|
58
|
+
chord is Mod+S alone; Shift+Mod+S no longer takes a snapshot.
|
|
59
|
+
|
|
60
|
+
`rowKey` takes a sixth argument, `apple`, and selects all on Mod+A as above; Ctrl+A on a Mac no
|
|
61
|
+
longer selects all in a `Tree` or any list on `useRowNavigation`, which passes `isApplePlatform()`.
|
|
62
|
+
`rowKey` called without it reads `mod` as Ctrl.
|
|
63
|
+
|
|
64
|
+
`@weasel-js/react` reads the system color scheme: `systemColorScheme()`, `watchColorScheme(fn)` and
|
|
65
|
+
`useSystemColorScheme(follow?)`, with `DEFAULT_COLOR_SCHEME`, dark, wherever `matchMedia` is missing or
|
|
66
|
+
the system states no preference. Dark is the mode the theme's tokens paint at `:root`. theme's
|
|
67
|
+
`useResolvedColorMode`, core's `watchThemeOf` and forge's loupe conditions use it. **Behavior change:**
|
|
68
|
+
forge's loupe read a missing `matchMedia` as light; it now reads it as dark, as the theme always has.
|
|
69
|
+
|
|
70
|
+
`scene.mintId()`, and the id `add` gives a spec with none, now pass over any id the scene already
|
|
71
|
+
holds. A document reopened in a new session keeps the ids the last one minted, and a `generateId` that
|
|
72
|
+
starts over with the session could mint them again; a generator that gives 1000 taken ids in a row
|
|
73
|
+
throws.
|
|
74
|
+
- 2f6b10d: `usePublishPointer(elementRef, locate)` from `@weasel-js/core` publishes the pointer over an element into
|
|
75
|
+
the pointer store in scope, placed by `locate(pointerId, clientX, clientY)`. It is what `<SceneCanvas>`
|
|
76
|
+
does for its own canvas: a pointer pressed on the element keeps reporting once a drag leaves it, and a
|
|
77
|
+
free pointer leaving clears the store unless another view has published since. The minimap and labkit's
|
|
78
|
+
cameras now publish through it, so a drag that runs off a minimap or a lab stage no longer stops
|
|
79
|
+
reporting where the pointer is.
|
|
80
|
+
- 5f6111b: `@weasel-js/geom` exports `viewWorldToScreen(view, p)`, `viewScreenToWorld(view, p)` and
|
|
81
|
+
`viewRectToScreen(view, rect)`, which convert between world and screen through a `View` directly;
|
|
82
|
+
`@weasel-js/core` re-exports them. Core, guides, diagram, hud, labkit and path-tools now use them in
|
|
83
|
+
place of their own inline copies of the same arithmetic.
|
|
84
|
+
|
|
85
|
+
Under a flipped view (a negative `scale` axis), diagram overlays, labkit lens hit boxes and the
|
|
86
|
+
path-edit marquee now get a rect with a positive width and height. labkit's camera zoom keeps a
|
|
87
|
+
flipped axis flipped instead of turning it back to positive.
|
|
88
|
+
- Updated dependencies [507f539]
|
|
89
|
+
- Updated dependencies [c6edab2]
|
|
90
|
+
- Updated dependencies [a4138b6]
|
|
91
|
+
- Updated dependencies [5a0375b]
|
|
92
|
+
- Updated dependencies [f1906a8]
|
|
93
|
+
- Updated dependencies [e804540]
|
|
94
|
+
- Updated dependencies [6544399]
|
|
95
|
+
- Updated dependencies [5f6111b]
|
|
96
|
+
- @weasel-js/paint@1.15.2
|
|
97
|
+
- @weasel-js/geom@1.15.2
|
|
98
|
+
- @weasel-js/animator@1.15.2
|
|
99
|
+
- @weasel-js/stroke@1.15.2
|
|
100
|
+
- @weasel-js/react@1.15.2
|
|
101
|
+
- @weasel-js/routing@1.15.2
|
|
102
|
+
- @weasel-js/registry@1.15.2
|
|
103
|
+
- @weasel-js/text@1.15.2
|
|
104
|
+
- @weasel-js/ui-logic@1.15.2
|
|
105
|
+
- @weasel-js/prefs@1.15.2
|
|
106
|
+
- @weasel-js/renderer@1.15.2
|
|
107
|
+
- @weasel-js/text-dom@1.15.2
|
|
108
|
+
- @weasel-js/simulation@1.15.2
|
|
109
|
+
- @weasel-js/gestures@1.15.2
|
|
110
|
+
- @weasel-js/cursor@1.15.2
|
|
111
|
+
- @weasel-js/font@1.15.2
|
|
112
|
+
- @weasel-js/history@1.15.2
|
|
113
|
+
- @weasel-js/icons@1.15.2
|
|
114
|
+
- @weasel-js/modes@1.15.2
|
|
115
|
+
- @weasel-js/select@1.15.2
|
|
116
|
+
- @weasel-js/quantity@1.15.2
|
|
117
|
+
|
|
118
|
+
## 1.15.1
|
|
119
|
+
|
|
120
|
+
### Patch Changes
|
|
121
|
+
|
|
122
|
+
- 424ba52: The Smudge brush, the Simplify brush, a warp's control drag, and Warp Settings can be the last operation, their
|
|
123
|
+
settings changed after the fact in the last-operation panel. A brush stroke replays every dab from its start with the
|
|
124
|
+
new Size, Strength or Tolerance; text the Smudge brush converted is put back and converted again wherever the brush
|
|
125
|
+
at its new size meets it. A warp drag replays with the warp remade under the new Mode, Rows, Columns, Mapping or
|
|
126
|
+
Tolerance, the control moved as it was first, so an envelope's new grid is resampled from the mesh the drag bent.
|
|
127
|
+
Warp Settings shows only the settings a run changed. Each stays one undo entry.
|
|
128
|
+
|
|
129
|
+
A tool's options and its action's panel are one setting: `ActionTuning.keep` is handed the params a panel change set,
|
|
130
|
+
and the tuning `<SceneCanvas>` makes from `toolOptionValues` writes them back there, so an options row shows the
|
|
131
|
+
values the next stroke uses. `OngoingHandle.params` reports params a gesture took from what it edited rather than
|
|
132
|
+
from its binding, such as a held warp's own grid, which the panel shows and replay receives. A gesture that opens a
|
|
133
|
+
journal as it starts is now kept as the last operation. `SMUDGE_BRUSH_PARAMS` and `SIMPLIFY_BRUSH_PARAMS` are the
|
|
134
|
+
forms the brushes' options use, and `warpDragParams`, `configureWarpParams`, and `WARP_SETTING_FIELDS` the warps'.
|
|
135
|
+
- 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.
|
|
136
|
+
|
|
137
|
+
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.
|
|
138
|
+
- 5e66a10: A unit scope can declare the magnification its frame is drawn at: `units: { system, drawnAt: 0.4 }` on a node
|
|
139
|
+
whose scale `transform` draws its children at 0.4×. The declaration draws nothing; it says what the transform is
|
|
140
|
+
meant to be, so lengths read on screen can be divided back to the size they were modeled at.
|
|
141
|
+
|
|
142
|
+
- `magnificationOf(scopes)` (quantity) multiplies the chain's `drawnAt`; `sceneMagnification(scene, ids)` and
|
|
143
|
+
`sceneDeclaredScopes(scene, id)` (core) read it off a scene.
|
|
144
|
+
- Equal-spacing snap marks and `distanceReadout` divide their lengths by the declared magnification of the nodes
|
|
145
|
+
they measure.
|
|
146
|
+
- `undeclaredMagnifications(scene)` (core) lists every container under a declared scope whose children are drawn
|
|
147
|
+
at a size its scopes do not declare, and `SceneCanvas` warns once per container in development: a container
|
|
148
|
+
drawn at 1.5× with nothing declaring it is what turns a 20″ cabinet into 30″ of board.
|
|
149
|
+
- `scaleBar` (quantity) picks a round length for a frame's scopes, and `<ScaleBar>` (ui) draws it, labeled in the
|
|
150
|
+
frame's own units and saying what size the frame is drawn at.
|
|
151
|
+
- 2992b55: Dependency updates: `@msb235/blits` 0.16.1 (core, animator, clock, labkit), `earcut` 3.2.4 (core, geom's peer
|
|
152
|
+
range, labkit), `react-aria` 3.53.1 and `react-aria-components` 1.22.1 (ui), and `magic-string` 1.4.5, `oxc-parser`
|
|
153
|
+
0.156.0 and `unplugin` 3.7.0 (icons-plugin). geom's `earcut` peer is an exact pin, so a consumer installing geom
|
|
154
|
+
beside its own `earcut` needs 3.2.4.
|
|
155
|
+
- 8ad43af: A core `Page` can carry `meta`: values other packages keep on the page, each under its owner's key. Every page edit
|
|
156
|
+
(`addPage`, `removePage`, `movePage`, `resizePage`, `renamePage`, `setPages`) and `layoutPages` carry it, and undo
|
|
157
|
+
restores it with the page.
|
|
158
|
+
|
|
159
|
+
`documentSpecs` writes a graph page's `notation`, `layout`, and `direction` to its page's `meta['diagram:graph']`, and
|
|
160
|
+
`documentFromScene` reads them back, so a Mermaid class, state, C4, block, or other non-flowchart page drawn into a
|
|
161
|
+
scene exports as the same kind, a block diagram keeps its columns, spans, and spaces, and a flowchart keeps its
|
|
162
|
+
direction. `GRAPH_PAGE_META_KEY`, `graphPageSettingsOf`, and `GraphPageSettings` are exported. This adds API.
|
|
163
|
+
- 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.
|
|
164
|
+
- 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.
|
|
165
|
+
|
|
166
|
+
`@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.
|
|
167
|
+
- Updated dependencies [d2110bc]
|
|
168
|
+
- Updated dependencies [424ba52]
|
|
169
|
+
- Updated dependencies [5e66a10]
|
|
170
|
+
- Updated dependencies [2992b55]
|
|
171
|
+
- Updated dependencies [3105d13]
|
|
172
|
+
- Updated dependencies [027c59a]
|
|
173
|
+
- Updated dependencies [8b52282]
|
|
174
|
+
- Updated dependencies [937167e]
|
|
175
|
+
- Updated dependencies [9c051bd]
|
|
176
|
+
- Updated dependencies [b6a97f4]
|
|
177
|
+
- Updated dependencies [e982d8a]
|
|
178
|
+
- Updated dependencies [fa1c9a7]
|
|
179
|
+
- Updated dependencies [13b0604]
|
|
180
|
+
- @weasel-js/font@1.15.1
|
|
181
|
+
- @weasel-js/text@1.15.1
|
|
182
|
+
- @weasel-js/routing@1.15.1
|
|
183
|
+
- @weasel-js/quantity@1.15.1
|
|
184
|
+
- @weasel-js/geom@1.15.1
|
|
185
|
+
- @weasel-js/animator@1.15.1
|
|
186
|
+
- @weasel-js/gestures@1.15.1
|
|
187
|
+
- @weasel-js/ui-logic@1.15.1
|
|
188
|
+
- @weasel-js/prefs@1.15.1
|
|
189
|
+
- @weasel-js/select@1.15.1
|
|
190
|
+
- @weasel-js/renderer@1.15.1
|
|
191
|
+
- @weasel-js/text-dom@1.15.1
|
|
192
|
+
- @weasel-js/stroke@1.15.1
|
|
193
|
+
- @weasel-js/simulation@1.15.1
|
|
194
|
+
- @weasel-js/cursor@1.15.1
|
|
195
|
+
- @weasel-js/history@1.15.1
|
|
196
|
+
- @weasel-js/icons@1.15.1
|
|
197
|
+
- @weasel-js/modes@1.15.1
|
|
198
|
+
- @weasel-js/paint@1.15.1
|
|
199
|
+
- @weasel-js/react@1.15.1
|
|
200
|
+
- @weasel-js/registry@1.15.1
|
|
201
|
+
|
|
3
202
|
## 1.15.0
|
|
4
203
|
|
|
5
204
|
### Minor 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
|
/**
|
|
@@ -161,6 +161,5 @@ function withEdited(selection, editingId) {
|
|
|
161
161
|
return editingId === null || selection.includes(editingId) ? selection : [...selection, editingId];
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
//#endregion
|
|
165
164
|
export { PATH_ANCHOR_CHROME_ID, createPathAnchorAffordances };
|
|
166
165
|
//# sourceMappingURL=pathAnchors.js.map
|
|
@@ -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) {
|
|
@@ -112,7 +112,7 @@ function createPoseTarget(opts) {
|
|
|
112
112
|
}
|
|
113
113
|
var sceneTargets = /* @__PURE__ */ new WeakMap();
|
|
114
114
|
/** Whether two poses hold the same fields, compared without allocating: a running target asks on every publish. */
|
|
115
|
-
function
|
|
115
|
+
function samePoseShallow(a, b) {
|
|
116
116
|
if (a === b) return true;
|
|
117
117
|
if (typeof a !== "object" || typeof b !== "object" || a === null || b === null) return false;
|
|
118
118
|
const ra = a;
|
|
@@ -169,7 +169,7 @@ function scenePoseTarget(scene, id, descriptor) {
|
|
|
169
169
|
if (!n) return;
|
|
170
170
|
writing = true;
|
|
171
171
|
try {
|
|
172
|
-
if (!
|
|
172
|
+
if (!samePoseShallow(n.pose, pose)) scene.untracked(() => scene.setPose(nid, pose));
|
|
173
173
|
} finally {
|
|
174
174
|
writing = false;
|
|
175
175
|
}
|
|
@@ -180,13 +180,12 @@ function scenePoseTarget(scene, id, descriptor) {
|
|
|
180
180
|
}, () => {
|
|
181
181
|
if (writing) return false;
|
|
182
182
|
const n = scene.get(nid);
|
|
183
|
-
return !!n && mine !== void 0 && !
|
|
183
|
+
return !!n && mine !== void 0 && !samePoseShallow(n.pose, mine);
|
|
184
184
|
});
|
|
185
185
|
if (!target) return void 0;
|
|
186
186
|
made.set(id, target);
|
|
187
187
|
return target;
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
//#endregion
|
|
191
190
|
export { createPoseTarget, liveAxes, poseAxes, scenePoseTarget };
|
|
192
191
|
//# sourceMappingURL=poseTarget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"poseTarget.js","names":[],"sources":["../../src/animation/poseTarget.ts"],"sourcesContent":["import { RECT_POSE_DESCRIPTOR, type PoseDescriptor } from '../core/geometry/poseDescriptor';\nimport { documentPose, type PoseSource } from '../core/scene/effectivePose';\nimport type { NodeId, PoseOverride, PoseOverrides } from '../core/scene/types';\nimport { axesOf } from '@weasel-js/animator';\nimport { createTarget, type Target, type TargetAxes } from '@weasel-js/animator';\n\n/** What {@link createPoseTarget} takes. */\nexport interface PoseTargetOptions<TPose> {\n /** The node whose pose it is. */\n id: string;\n /** The node's committed pose: where the document says it is. */\n get(): TPose;\n /** Commits a pose: an animation's destination as it starts, and where a canceled one stopped. */\n set(pose: TPose): void;\n /** Where the pose on screen is published while the node moves. */\n overrides: PoseOverrides<TPose>;\n /** Supplies the pose's axes through `PoseDescriptor.axes`. Without one, or where it answers\n * null, the pose has to be a number, an array of numbers, or an object of numeric fields. */\n descriptor?: PoseDescriptor<TPose>;\n}\n\n/** The part of a scene {@link scenePoseTarget} reads and writes. A `Scene` satisfies it. */\nexport interface PoseTargetScene<TPose> extends PoseSource<TPose> {\n readonly overrides: PoseOverrides<TPose>;\n setPose(id: NodeId, pose: TPose): void;\n untracked<T>(fn: () => T): T;\n}\n\n/** How `like`'s kind of pose maps to axes: the descriptor's own mapping, else its flat numeric\n * fields. Null for a pose with neither. */\nexport function poseAxes<TPose>(\n descriptor: PoseDescriptor<TPose> | undefined,\n like: TPose,\n): TargetAxes<TPose> | null {\n return descriptor?.axes?.(like) ?? (axesOf(like) as TargetAxes<TPose> | null);\n}\n\nconst publishers = new WeakMap<object, () => void>();\n\n/** One function per overrides table, so every target publishing into it shares one commit a frame. */\nfunction publisherOf<TPose>(overrides: PoseOverrides<TPose>): () => void {\n let publish = publishers.get(overrides);\n if (!publish) {\n publish = () => overrides.commit();\n publishers.set(overrides, publish);\n }\n return publish;\n}\n\n/**\n * `poseAxes` for the pose `get` answers, with `from` keeping the fields that are not axes as\n * that pose has them now. Reading them once would leave them stale in every pose a canceled\n * animation commits. Null where the pose has no axes.\n */\nexport function liveAxes<TPose>(\n descriptor: PoseDescriptor<TPose> | undefined,\n get: () => TPose,\n): TargetAxes<TPose> | null {\n let like = get();\n let axes = poseAxes(descriptor, like);\n if (!axes) return null;\n const { count, angles } = axes;\n const current = (): TargetAxes<TPose> => {\n const now = get();\n if (now !== like) {\n const next = poseAxes(descriptor, now);\n if (next && next.count === count) axes = next;\n like = now;\n }\n return axes!;\n };\n return {\n count,\n angles,\n to: (p) => current().to(p),\n from: (a) => current().from(a),\n add: axes.add && ((p, d) => {\n const now = current();\n if (now.add) return now.add(p, d);\n return now.from(now.to(p).map((n, i) => n + d[i]!));\n }),\n write: axes.write && ((p, out, at) => {\n const now = current();\n if (now.write) now.write(p, out, at);\n else now.to(p).forEach((n, i) => { out[at + i] = n; });\n }),\n };\n}\n\nfunction build<TPose>(\n opts: PoseTargetOptions<TPose>,\n onRest?: () => void,\n /** Whether something else has written the committed pose since an animation last did. */\n overwritten?: () => boolean,\n): Target<TPose> | null {\n const { overrides } = opts;\n const id = opts.id as NodeId;\n const axes = liveAxes(opts.descriptor, opts.get);\n if (!axes) return null;\n const entry: PoseOverride<TPose> = {};\n let installed = false;\n /** While installed, stops the run as soon as the table changes after something else wrote\n * the pose: a drag laid over the run commits and then lets go, which would show this run's\n * last frame until its next one. */\n let unwatch: (() => void) | null = null;\n const rest = (): void => {\n installed = false;\n unwatch?.();\n unwatch = null;\n overrides.clear(id, entry);\n onRest?.();\n };\n const target = createTarget<TPose>({\n get: opts.get,\n set: opts.set,\n axes,\n show(pose) {\n // The writer wins: what was left to travel belonged to a pose that is no longer committed.\n if (target.active && overwritten?.()) target.stop({ commit: false });\n if (!target.active) {\n rest();\n return;\n }\n entry.pose = pose;\n // Reinstalled where it stood if the table dropped it; an override laid over it since, a drag's, is not taken back.\n if (!overrides.has(id, entry)) overrides.set(id, entry);\n installed = true;\n if (overwritten && unwatch === null) {\n unwatch = overrides.subscribe(() => {\n if (!target.active || !overwritten()) return;\n target.stop({ commit: false });\n if (installed) rest();\n });\n }\n },\n publish: publisherOf(overrides),\n });\n return target;\n}\n\n/**\n * A {@link Target} over one node's pose. Animations on it commit their destination through\n * `set` as they start, and the pose on screen reaches the paint and pick walks as a pose\n * override: installed while the node moves and cleared when it comes to rest.\n *\n * Throws for a pose with no axes. Make one per node: two targets over one node do not add.\n * {@link scenePoseTarget} keeps that one for a scene's nodes.\n */\nexport function createPoseTarget<TPose>(opts: PoseTargetOptions<TPose>): Target<TPose> {\n const target = build(opts);\n if (!target) {\n throw new Error('createPoseTarget: this pose has no axes; give a descriptor whose `axes` maps it');\n }\n return target;\n}\n\nconst sceneTargets = new WeakMap<object, Map<string, Target<unknown>>>();\n\n/** Whether two poses hold the same fields, compared without allocating: a running target asks on every publish. */\nfunction samePose(a: unknown, b: unknown): boolean {\n if (a === b) return true;\n if (typeof a !== 'object' || typeof b !== 'object' || a === null || b === null) return false;\n const ra = a as Record<string, unknown>;\n const rb = b as Record<string, unknown>;\n let count = 0;\n for (const k in ra) {\n if (!Object.hasOwn(ra, k)) continue;\n if (!Object.hasOwn(rb, k) || ra[k] !== rb[k]) return false;\n count++;\n }\n for (const k in rb) if (Object.hasOwn(rb, k)) count--;\n return count === 0;\n}\n\n/**\n * The pose target of node `id` in `scene`: the same one on every call, so everything animating\n * the node adds. Its committed value is the node's document pose, written without recording;\n * a caller that wants the move in history records its own op first.\n *\n * Undefined for a node that is not in the scene, or whose pose has no axes. `descriptor`\n * defaults to `RECT_POSE_DESCRIPTOR`, and is read the first time a node's target is made.\n */\nexport function scenePoseTarget<TPose>(\n scene: PoseTargetScene<TPose>,\n id: string,\n descriptor?: PoseDescriptor<TPose>,\n): Target<TPose> | undefined {\n let made = sceneTargets.get(scene.overrides);\n if (!made) {\n made = new Map();\n sceneTargets.set(scene.overrides, made);\n }\n const nid = id as NodeId;\n const node = scene.get(nid);\n const by = descriptor ?? (RECT_POSE_DESCRIPTOR as unknown as PoseDescriptor<TPose>);\n const held = made.get(id) as Target<TPose> | undefined;\n // A pose that has changed shape at rest, a polygon given more points, needs axes made for it.\n const fits = !held || held.active || !node\n || poseAxes(by, documentPose(scene, node))?.count === held.axisCount;\n if (held && fits) return held;\n if (!node) return undefined;\n // A node removed mid-flight keeps answering with the last pose it had.\n let last = documentPose(scene, node);\n /** The node's pose as an animation last left it, or as it was when the first one started. */\n let mine: TPose | undefined;\n /** While this target's own commit is being written. */\n let writing = false;\n const cache = made;\n let target: Target<TPose> | null = null;\n target = build<TPose>({\n id,\n descriptor: by,\n overrides: scene.overrides,\n get() {\n const n = scene.get(nid);\n if (n) last = documentPose(scene, n);\n if (n && !target?.active) mine = n.pose;\n return last;\n },\n set(pose) {\n const n = scene.get(nid);\n if (!n) return;\n // The write runs the layout's reflow at once, and a reflow publishes glides to the overrides.\n writing = true;\n try {\n if (!samePose(n.pose, pose)) scene.untracked(() => scene.setPose(nid, pose));\n } finally {\n writing = false;\n }\n mine = scene.get(nid)?.pose;\n },\n }, () => {\n if (!scene.get(nid)) cache.delete(id);\n }, () => {\n if (writing) return false;\n const n = scene.get(nid);\n return !!n && mine !== undefined && !samePose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AAG,MAAM,gBAAgB,MAAM,QAAQ,KAAK,IAAI,CAAC;GAC7E,UAAU;IACR,UAAU;GACZ;GACA,OAAO,MAAM,IAAI,GAAG,CAAC,EAAE;EACzB;CACF,SAAS;EACP,IAAI,CAAC,MAAM,IAAI,GAAG,GAAG,MAAM,OAAO,EAAE;CACtC,SAAS;EACP,IAAI,SAAS,OAAO;EACpB,MAAM,IAAI,MAAM,IAAI,GAAG;EACvB,OAAO,CAAC,CAAC,KAAK,SAAS,UAAa,CAAC,SAAS,EAAE,MAAM,IAAI;CAC5D,CAAC;CACD,IAAI,CAAC,QAAQ,OAAO;CACpB,KAAK,IAAI,IAAI,MAAyB;CACtC,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"poseTarget.js","names":[],"sources":["../../src/animation/poseTarget.ts"],"sourcesContent":["import { RECT_POSE_DESCRIPTOR, type PoseDescriptor } from '../core/geometry/poseDescriptor';\nimport { documentPose, type PoseSource } from '../core/scene/effectivePose';\nimport type { NodeId, PoseOverride, PoseOverrides } from '../core/scene/types';\nimport { axesOf } from '@weasel-js/animator';\nimport { createTarget, type Target, type TargetAxes } from '@weasel-js/animator';\n\n/** What {@link createPoseTarget} takes. */\nexport interface PoseTargetOptions<TPose> {\n /** The node whose pose it is. */\n id: string;\n /** The node's committed pose: where the document says it is. */\n get(): TPose;\n /** Commits a pose: an animation's destination as it starts, and where a canceled one stopped. */\n set(pose: TPose): void;\n /** Where the pose on screen is published while the node moves. */\n overrides: PoseOverrides<TPose>;\n /** Supplies the pose's axes through `PoseDescriptor.axes`. Without one, or where it answers\n * null, the pose has to be a number, an array of numbers, or an object of numeric fields. */\n descriptor?: PoseDescriptor<TPose>;\n}\n\n/** The part of a scene {@link scenePoseTarget} reads and writes. A `Scene` satisfies it. */\nexport interface PoseTargetScene<TPose> extends PoseSource<TPose> {\n readonly overrides: PoseOverrides<TPose>;\n setPose(id: NodeId, pose: TPose): void;\n untracked<T>(fn: () => T): T;\n}\n\n/** How `like`'s kind of pose maps to axes: the descriptor's own mapping, else its flat numeric\n * fields. Null for a pose with neither. */\nexport function poseAxes<TPose>(\n descriptor: PoseDescriptor<TPose> | undefined,\n like: TPose,\n): TargetAxes<TPose> | null {\n return descriptor?.axes?.(like) ?? (axesOf(like) as TargetAxes<TPose> | null);\n}\n\nconst publishers = new WeakMap<object, () => void>();\n\n/** One function per overrides table, so every target publishing into it shares one commit a frame. */\nfunction publisherOf<TPose>(overrides: PoseOverrides<TPose>): () => void {\n let publish = publishers.get(overrides);\n if (!publish) {\n publish = () => overrides.commit();\n publishers.set(overrides, publish);\n }\n return publish;\n}\n\n/**\n * `poseAxes` for the pose `get` answers, with `from` keeping the fields that are not axes as\n * that pose has them now. Reading them once would leave them stale in every pose a canceled\n * animation commits. Null where the pose has no axes.\n */\nexport function liveAxes<TPose>(\n descriptor: PoseDescriptor<TPose> | undefined,\n get: () => TPose,\n): TargetAxes<TPose> | null {\n let like = get();\n let axes = poseAxes(descriptor, like);\n if (!axes) return null;\n const { count, angles } = axes;\n const current = (): TargetAxes<TPose> => {\n const now = get();\n if (now !== like) {\n const next = poseAxes(descriptor, now);\n if (next && next.count === count) axes = next;\n like = now;\n }\n return axes!;\n };\n return {\n count,\n angles,\n to: (p) => current().to(p),\n from: (a) => current().from(a),\n add: axes.add && ((p, d) => {\n const now = current();\n if (now.add) return now.add(p, d);\n return now.from(now.to(p).map((n, i) => n + d[i]!));\n }),\n write: axes.write && ((p, out, at) => {\n const now = current();\n if (now.write) now.write(p, out, at);\n else now.to(p).forEach((n, i) => { out[at + i] = n; });\n }),\n };\n}\n\nfunction build<TPose>(\n opts: PoseTargetOptions<TPose>,\n onRest?: () => void,\n /** Whether something else has written the committed pose since an animation last did. */\n overwritten?: () => boolean,\n): Target<TPose> | null {\n const { overrides } = opts;\n const id = opts.id as NodeId;\n const axes = liveAxes(opts.descriptor, opts.get);\n if (!axes) return null;\n const entry: PoseOverride<TPose> = {};\n let installed = false;\n /** While installed, stops the run as soon as the table changes after something else wrote\n * the pose: a drag laid over the run commits and then lets go, which would show this run's\n * last frame until its next one. */\n let unwatch: (() => void) | null = null;\n const rest = (): void => {\n installed = false;\n unwatch?.();\n unwatch = null;\n overrides.clear(id, entry);\n onRest?.();\n };\n const target = createTarget<TPose>({\n get: opts.get,\n set: opts.set,\n axes,\n show(pose) {\n // The writer wins: what was left to travel belonged to a pose that is no longer committed.\n if (target.active && overwritten?.()) target.stop({ commit: false });\n if (!target.active) {\n rest();\n return;\n }\n entry.pose = pose;\n // Reinstalled where it stood if the table dropped it; an override laid over it since, a drag's, is not taken back.\n if (!overrides.has(id, entry)) overrides.set(id, entry);\n installed = true;\n if (overwritten && unwatch === null) {\n unwatch = overrides.subscribe(() => {\n if (!target.active || !overwritten()) return;\n target.stop({ commit: false });\n if (installed) rest();\n });\n }\n },\n publish: publisherOf(overrides),\n });\n return target;\n}\n\n/**\n * A {@link Target} over one node's pose. Animations on it commit their destination through\n * `set` as they start, and the pose on screen reaches the paint and pick walks as a pose\n * override: installed while the node moves and cleared when it comes to rest.\n *\n * Throws for a pose with no axes. Make one per node: two targets over one node do not add.\n * {@link scenePoseTarget} keeps that one for a scene's nodes.\n */\nexport function createPoseTarget<TPose>(opts: PoseTargetOptions<TPose>): Target<TPose> {\n const target = build(opts);\n if (!target) {\n throw new Error('createPoseTarget: this pose has no axes; give a descriptor whose `axes` maps it');\n }\n return target;\n}\n\nconst sceneTargets = new WeakMap<object, Map<string, Target<unknown>>>();\n\n/** Whether two poses hold the same fields, compared without allocating: a running target asks on every publish. */\nfunction samePoseShallow(a: unknown, b: unknown): boolean {\n if (a === b) return true;\n if (typeof a !== 'object' || typeof b !== 'object' || a === null || b === null) return false;\n const ra = a as Record<string, unknown>;\n const rb = b as Record<string, unknown>;\n let count = 0;\n for (const k in ra) {\n if (!Object.hasOwn(ra, k)) continue;\n if (!Object.hasOwn(rb, k) || ra[k] !== rb[k]) return false;\n count++;\n }\n for (const k in rb) if (Object.hasOwn(rb, k)) count--;\n return count === 0;\n}\n\n/**\n * The pose target of node `id` in `scene`: the same one on every call, so everything animating\n * the node adds. Its committed value is the node's document pose, written without recording;\n * a caller that wants the move in history records its own op first.\n *\n * Undefined for a node that is not in the scene, or whose pose has no axes. `descriptor`\n * defaults to `RECT_POSE_DESCRIPTOR`, and is read the first time a node's target is made.\n */\nexport function scenePoseTarget<TPose>(\n scene: PoseTargetScene<TPose>,\n id: string,\n descriptor?: PoseDescriptor<TPose>,\n): Target<TPose> | undefined {\n let made = sceneTargets.get(scene.overrides);\n if (!made) {\n made = new Map();\n sceneTargets.set(scene.overrides, made);\n }\n const nid = id as NodeId;\n const node = scene.get(nid);\n const by = descriptor ?? (RECT_POSE_DESCRIPTOR as unknown as PoseDescriptor<TPose>);\n const held = made.get(id) as Target<TPose> | undefined;\n // A pose that has changed shape at rest, a polygon given more points, needs axes made for it.\n const fits = !held || held.active || !node\n || poseAxes(by, documentPose(scene, node))?.count === held.axisCount;\n if (held && fits) return held;\n if (!node) return undefined;\n // A node removed mid-flight keeps answering with the last pose it had.\n let last = documentPose(scene, node);\n /** The node's pose as an animation last left it, or as it was when the first one started. */\n let mine: TPose | undefined;\n /** While this target's own commit is being written. */\n let writing = false;\n const cache = made;\n let target: Target<TPose> | null = null;\n target = build<TPose>({\n id,\n descriptor: by,\n overrides: scene.overrides,\n get() {\n const n = scene.get(nid);\n if (n) last = documentPose(scene, n);\n if (n && !target?.active) mine = n.pose;\n return last;\n },\n set(pose) {\n const n = scene.get(nid);\n if (!n) return;\n // The write runs the layout's reflow at once, and a reflow publishes glides to the overrides.\n writing = true;\n try {\n if (!samePoseShallow(n.pose, pose)) scene.untracked(() => scene.setPose(nid, pose));\n } finally {\n writing = false;\n }\n mine = scene.get(nid)?.pose;\n },\n }, () => {\n if (!scene.get(nid)) cache.delete(id);\n }, () => {\n if (writing) return false;\n const n = scene.get(nid);\n return !!n && mine !== undefined && !samePoseShallow(n.pose, mine);\n });\n if (!target) return undefined;\n made.set(id, target as Target<unknown>);\n return target;\n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F,UAAU;IACR,UAAU;GACZ;GACA,OAAO,MAAM,IAAI,GAAG,CAAC,EAAE;EACzB;CACF,SAAS;EACP,IAAI,CAAC,MAAM,IAAI,GAAG,GAAG,MAAM,OAAO,EAAE;CACtC,SAAS;EACP,IAAI,SAAS,OAAO;EACpB,MAAM,IAAI,MAAM,IAAI,GAAG;EACvB,OAAO,CAAC,CAAC,KAAK,SAAS,UAAa,CAAC,gBAAgB,EAAE,MAAM,IAAI;CACnE,CAAC;CACD,IAAI,CAAC,QAAQ,OAAO;CACpB,KAAK,IAAI,IAAI,MAAyB;CACtC,OAAO;AACT"}
|
|
@@ -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
|