@weasel-js/core 1.15.0 → 1.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +84 -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 +2 -3
- package/dist/animation/poseTransition.js +1 -2
- package/dist/animation/reflow.js +2 -3
- package/dist/animation/rewind.js +1 -2
- package/dist/animation/rig/bindRig.js +2 -3
- package/dist/animation/rig/rigNode.js +1 -2
- package/dist/animation/rig/rigSeat.js +1 -2
- package/dist/animation/rig/skinBinding.js +1 -2
- package/dist/animation/rig/useRig.js +2 -3
- package/dist/animation/wrappers/animateLifecycle.js +1 -2
- package/dist/animation/wrappers/animateOnSetPose.js +1 -2
- package/dist/animation/wrappers/instantPose.js +1 -2
- package/dist/animation/writtenPoseTarget.js +1 -2
- package/dist/barrel/interactions.js +2 -1
- package/dist/barrel/routing.js +2 -2
- package/dist/barrel/scene.js +2 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- package/dist/canvas/surfaceContribution.js +1 -2
- package/dist/canvas/useCanvasElements.js +1 -2
- package/dist/canvas/useCanvasHandle.js +1 -2
- package/dist/canvas/useCanvasPaint.js +2 -3
- package/dist/canvas/useCanvasRenderer.js +1 -2
- package/dist/canvas/useCanvasSurface.js +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 +1 -2
- package/dist/canvas/viewInputs.js +1 -2
- package/dist/canvas/viewMarkers.js +1 -2
- package/dist/canvas/viewRegistry.js +1 -2
- package/dist/canvas/viewSnap.js +1 -2
- package/dist/canvas/watchElementMove.js +1 -2
- package/dist/canvas/wrapNodeOutput.js +1 -2
- package/dist/core/adapters/testing/rootsTree.js +1 -2
- package/dist/core/applyOps.js +1 -2
- package/dist/core/device/targets.js +1 -2
- package/dist/core/device/useDeviceProfile.js +1 -2
- package/dist/core/device/useTargetBasePx.js +1 -2
- package/dist/core/device/watchDevicePixelRatio.js +1 -2
- package/dist/core/geometry/autoPoseDescriptor.js +2 -3
- package/dist/core/geometry/booleanOfPaths.js +1 -2
- package/dist/core/geometry/inkExtents.js +1 -2
- package/dist/core/geometry/pathPoseDescriptor.js +1 -2
- package/dist/core/geometry/poseDescriptor.js +1 -2
- package/dist/core/geometry/regionHit.js +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 +1 -2
- package/dist/core/ops/reorder/setChildOrder.js +1 -2
- package/dist/core/ops/reparent.js +1 -2
- package/dist/core/ops/select.js +1 -2
- package/dist/core/ops/setData.js +1 -2
- package/dist/core/ops/setDependsOn.js +1 -2
- package/dist/core/ops/setLayer.js +1 -2
- package/dist/core/ops/setLayout.js +1 -2
- package/dist/core/ops/setPath.js +1 -2
- package/dist/core/ops/setText.js +1 -2
- package/dist/core/ops/slot.js +1 -2
- package/dist/core/ops/transform.js +1 -2
- package/dist/core/ops/writtenBy.js +1 -2
- package/dist/core/pages/fitViewToPage.js +1 -2
- package/dist/core/pages/pageEdits.js +3 -4
- package/dist/core/pages/pages.js +1 -2
- package/dist/core/pages/pages.js.map +1 -1
- package/dist/core/pages/pagesLayer.js +1 -2
- package/dist/core/paint/meshKind.js +1 -2
- package/dist/core/paint/meshKindLazy.js +9 -18
- package/dist/core/paint/meshKindLazy.js.map +1 -1
- package/dist/core/paint/paintKindEntry.js +1 -2
- package/dist/core/paint/paintKinds.js +1 -2
- package/dist/core/paint/registerMesh.js +1 -2
- package/dist/core/scene/NodeProperties.js +1 -2
- package/dist/core/scene/NodeRouting.js +1 -2
- package/dist/core/scene/annotation.js +1 -2
- package/dist/core/scene/appliedLog.js +1 -2
- package/dist/core/scene/arrivalWindow.js +2 -3
- package/dist/core/scene/arrivals.js +1 -2
- package/dist/core/scene/booleanGroup.js +1 -2
- package/dist/core/scene/booleanOfChildren.js +1 -2
- package/dist/core/scene/boundOps.js +1 -2
- package/dist/core/scene/carryDescendants.js +2 -3
- package/dist/core/scene/clipNothing.js +1 -2
- package/dist/core/scene/composeFrame.js +1 -2
- package/dist/core/scene/composePose.js +1 -2
- package/dist/core/scene/declaredFieldSetters.js +1 -2
- package/dist/core/scene/depFrame.js +1 -2
- package/dist/core/scene/depMemo.js +1 -2
- package/dist/core/scene/dependents.js +1 -2
- package/dist/core/scene/derivedParts.js +1 -2
- package/dist/core/scene/derivedPath.js +2 -3
- package/dist/core/scene/docValues.js +1 -2
- package/dist/core/scene/documentOf.js +1 -2
- package/dist/core/scene/editMode.js +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 +1 -2
- package/dist/core/scene/pathEffects/derive.js +2 -3
- package/dist/core/scene/pathEffects/effects.js +1 -2
- package/dist/core/scene/pathEffects/foundHidden.js +1 -2
- package/dist/core/scene/pathEffects/textAlong.js +1 -2
- package/dist/core/scene/pathEffects/textAlongBands.js +1 -2
- package/dist/core/scene/plyStacks.js +1 -2
- package/dist/core/scene/poseFeed.js +1 -2
- package/dist/core/scene/poseHold.js +1 -2
- package/dist/core/scene/poseOverrides.js +1 -2
- package/dist/core/scene/posePlies.js +1 -2
- package/dist/core/scene/poseRemovals.js +1 -2
- package/dist/core/scene/poseSnapshot.js +1 -2
- package/dist/core/scene/poseWrites.js +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 +11 -12
- package/dist/core/scene/scene.js.map +1 -1
- package/dist/core/scene/sceneChanges.js +1 -2
- package/dist/core/scene/sceneEdits.js +1 -2
- package/dist/core/scene/sceneJournals.js +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 +1 -2
- package/dist/core/viewport/createVelocityTracker.js +1 -2
- package/dist/core/viewport/fitToBounds.js +1 -2
- package/dist/core/viewport/fitViewToBounds.js +1 -2
- package/dist/core/viewport/interpolateView.js +1 -2
- package/dist/core/viewport/parallax.js +1 -2
- package/dist/core/viewport/sceneNodeClientRect.js +1 -2
- package/dist/core/viewport/screenSlop.js +1 -2
- package/dist/core/viewport/useAutoCenter.js +1 -2
- package/dist/core/viewport/useCanvasSize.js +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 +2 -3
- package/dist/core/viewport/zoomBounds.js +1 -2
- package/dist/debug/createDebugOverlayLayer.js +1 -2
- package/dist/debug/createDebugSink.js +1 -2
- package/dist/debug/defaultTheme.js +1 -2
- package/dist/debug/features.js +1 -2
- package/dist/debug/frameStats.js +1 -2
- package/dist/debug/overlayPanels.js +1 -2
- package/dist/debug/parseDebugFlags.js +1 -2
- package/dist/debug/useDebugSink.js +2 -3
- package/dist/{depSchema-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 +1 -2
- package/dist/devtools/serialize.js +1 -2
- package/dist/devtools/session.js +2 -3
- package/dist/devtools/transport.js +1 -2
- package/dist/devtools/useDevtoolsRoot.js +1 -2
- package/dist/devtools-protocol.d.ts +1 -1
- package/dist/devtools-protocol.js +2 -2
- package/dist/devtools.d.ts +1 -1
- package/dist/devtools.js +1 -2
- package/dist/domains/chrome-caps/buildChromeCtx.js +1 -2
- package/dist/domains/chrome-caps/conditions.js +1 -2
- package/dist/domains/chrome-caps/defaults.js +1 -2
- package/dist/domains/chrome-caps/resolve.js +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 +3 -4
- package/dist/domains/measure/measureLayer.js +3 -4
- package/dist/domains/measure/measurement.js +1 -2
- package/dist/domains/measure/measurements.js +1 -2
- package/dist/domains/modes/modeLayers.js +1 -2
- package/dist/domains/modes/modeTriggers.js +1 -2
- package/dist/domains/pathEffects/effectSources.js +2 -3
- package/dist/domains/pathEffects/index.js +1 -2
- package/dist/domains/pathEffects/readSource.js +3 -4
- package/dist/domains/pathEffects/textItems.js +1 -2
- package/dist/domains/pathEffects/useEffectSourcesLayer.js +3 -4
- package/dist/domains/paths/anchorData.js +1 -2
- package/dist/domains/paths/anchorMarkers.js +1 -2
- package/dist/domains/paths/editablePath.js +3 -4
- package/dist/domains/paths/originProjection.js +1 -2
- package/dist/domains/paths/pathEditExtension.js +1 -2
- package/dist/domains/paths/pathEditState.js +1 -2
- package/dist/domains/paths/pathEditingOverlayLayer.js +2 -3
- package/dist/domains/paths/pathLayer.js +1 -2
- package/dist/domains/paths/pathRepresentation.js +1 -2
- package/dist/domains/paths/pathSnap/glyphs.js +1 -2
- package/dist/domains/paths/pathSnap/pathSnapSource.js +1 -2
- package/dist/domains/paths/pathSnap/sceneIndex.js +1 -2
- package/dist/domains/paths/pathSnap/snapGeometry.js +2 -3
- package/dist/domains/paths/penPreviewLayer.js +1 -2
- package/dist/domains/paths/shapeGenerator.js +1 -2
- package/dist/domains/paths/strokeOutline.js +2 -3
- package/dist/domains/paths/useAnchorFields.js +1 -2
- package/dist/domains/paths/usePathEdit.js +2 -3
- package/dist/domains/poseRun/usePoseRun.js +1 -2
- package/dist/domains/selection/enteredGroupFrame.js +1 -2
- package/dist/domains/selection/enteredGroupScope.js +1 -2
- package/dist/domains/selection/enteredOperands.js +1 -2
- package/dist/domains/selection/handleCommands.js +2 -3
- package/dist/domains/selection/overlay.js +6 -7
- package/dist/domains/selection/selectionPose.js +2 -3
- package/dist/domains/snap/angle2d.js +1 -2
- package/dist/domains/snap/debugCandidates.js +1 -2
- package/dist/domains/snap/gather.js +1 -2
- package/dist/domains/snap/inputSubspace.js +2 -3
- package/dist/domains/snap/lazySession.js +1 -2
- package/dist/domains/snap/marks.js +1 -2
- package/dist/domains/snap/outcomeStore.js +1 -2
- package/dist/domains/snap/pointSnap.js +1 -2
- package/dist/domains/snap/probes2d.js +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 +4 -5
- package/dist/domains/viewports/aim.js +3 -4
- package/dist/domains/viewports/viewMarker.js +1 -2
- package/dist/domains/viewports/viewMarkerDrag.js +1 -2
- package/dist/domains/viewports/viewResolver.js +1 -2
- package/dist/domains/viewports/viewportLayer.js +1 -2
- package/dist/iconRegistry/IconRegistryProvider.js +1 -2
- package/dist/iconRegistry/useIconGlyph.js +1 -2
- package/dist/iconRegistry/useIconVariant.js +1 -2
- package/dist/icons.table.js +1 -2
- package/dist/icons2.table.js +1 -2
- package/dist/index.d.ts +51 -7
- package/dist/index.js +3 -2
- package/dist/input/keyState.js +1 -2
- package/dist/input/useKeyModifiers.js +1 -2
- package/dist/input/useKeyState.js +1 -2
- package/dist/interactions/actions/admitsChild.js +1 -2
- package/dist/interactions/actions/align/action.js +6 -7
- package/dist/interactions/actions/align/align.js +6 -7
- package/dist/interactions/actions/booleans/action.js +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 +4 -5
- package/dist/interactions/actions/defaults/contextMenu.js +6 -7
- package/dist/interactions/actions/defaults/copySubtree.js +2 -3
- package/dist/interactions/actions/defaults/createPaintAction.js +3 -4
- package/dist/interactions/actions/defaults/delete.js +2 -3
- package/dist/interactions/actions/defaults/duplicate.js +5 -6
- package/dist/interactions/actions/defaults/enterGroup.js +2 -3
- package/dist/interactions/actions/defaults/enterPathEdit.js +1 -2
- package/dist/interactions/actions/defaults/enterTextEdit.js +1 -2
- package/dist/interactions/actions/defaults/escape.js +1 -2
- package/dist/interactions/actions/defaults/exitPathEdit.js +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 +1 -2
- package/dist/interactions/actions/defaults/pinchZoom.js +3 -4
- package/dist/interactions/actions/defaults/reorder.js +2 -3
- package/dist/interactions/actions/defaults/requiresSelection.js +1 -2
- package/dist/interactions/actions/defaults/segmentUnder.js +1 -2
- package/dist/interactions/actions/defaults/selectAll.js +1 -2
- package/dist/interactions/actions/defaults/selectDeep.js +1 -2
- package/dist/interactions/actions/defaults/setFill.js +1 -2
- package/dist/interactions/actions/defaults/setFillOpacity.js +1 -2
- package/dist/interactions/actions/defaults/setStroke.js +1 -2
- package/dist/interactions/actions/defaults/setStrokeOpacity.js +1 -2
- package/dist/interactions/actions/defaults/slice.js +1 -2
- package/dist/interactions/actions/defaults/sliceOps.js +1 -2
- package/dist/interactions/actions/defaults/toolActivate.js +1 -2
- package/dist/interactions/actions/defaults/toolResetToDefault.js +1 -2
- package/dist/interactions/actions/defaults/undoRedo.js +1 -2
- package/dist/interactions/actions/defaults/viewportDragPan.js +1 -2
- package/dist/interactions/actions/defaults/viewportWheelPan.js +1 -2
- package/dist/interactions/actions/defaults/viewportZoom.js +3 -4
- package/dist/interactions/actions/distribute/action.js +4 -5
- package/dist/interactions/actions/distribute/distribute.js +5 -6
- package/dist/interactions/actions/distribute/plan.js +1 -2
- package/dist/interactions/actions/drawnBoxes.js +4 -5
- package/dist/interactions/actions/dropVerdict.js +1 -2
- package/dist/interactions/actions/edit-anchors/action.js +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 +1 -2
- package/dist/interactions/actions/edit-anchors/handles.js +1 -2
- package/dist/interactions/actions/edit-anchors/params.js +1 -2
- package/dist/interactions/actions/edit-anchors/preview.js +1 -2
- package/dist/interactions/actions/edit-anchors/symmetry.js +1 -2
- package/dist/interactions/actions/flip/action.js +8 -9
- package/dist/interactions/actions/flip/helpers.js +1 -2
- package/dist/interactions/actions/geometryProjection.js +1 -2
- package/dist/interactions/actions/gestureFrames.js +3 -4
- package/dist/interactions/actions/gestureLifecycle.js +1 -2
- package/dist/interactions/actions/hitSelection.js +7 -3
- package/dist/interactions/actions/hitSelection.js.map +1 -1
- package/dist/interactions/actions/insert/action.js +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/layoutDrop.js +2 -3
- package/dist/interactions/actions/move/behaviors/reparentOnDrop.js +2 -3
- package/dist/interactions/actions/move/behaviors/snapBackOrDelete.js +1 -2
- package/dist/interactions/actions/move/behaviors/snapToContainer.js +2 -3
- package/dist/interactions/actions/move/capture.js +6 -7
- package/dist/interactions/actions/move/commit/index.js +2 -3
- package/dist/interactions/actions/move/commit/layoutDrop.js +4 -5
- package/dist/interactions/actions/move/commit/layoutRelease.js +7 -8
- package/dist/interactions/actions/move/commit/rebase.js +2 -3
- package/dist/interactions/actions/move/commit/reparent.js +5 -6
- package/dist/interactions/actions/move/delta.js +2 -3
- package/dist/interactions/actions/move/frame.js +2 -3
- package/dist/interactions/actions/move/gestureAdapter.js +1 -2
- package/dist/interactions/actions/move/landedDescendants.js +2 -3
- package/dist/interactions/actions/move/layout/container.js +3 -4
- package/dist/interactions/actions/move/layout/dragged.js +2 -3
- package/dist/interactions/actions/move/layout/dropPass.js +5 -6
- package/dist/interactions/actions/move/layout/exits.js +2 -3
- package/dist/interactions/actions/move/layout/glide.js +2 -3
- package/dist/interactions/actions/move/layout/view.js +1 -2
- package/dist/interactions/actions/move/refusal.js +2 -3
- package/dist/interactions/actions/move/session.js +4 -5
- package/dist/interactions/actions/move/translate.js +2 -3
- package/dist/interactions/actions/moveNodes.js +5 -6
- package/dist/interactions/actions/notices.js +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 +1 -2
- 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/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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isNodeHidden, isNodeLocked, nodeGates } from "./nodeGates.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/core/scene/lockGuard.ts
|
|
4
4
|
/**
|
|
5
5
|
* The scene's lock guard: what a lock refuses, what the selection may hold,
|
|
6
6
|
* and how a caller that is restoring an already-legal state gets past it.
|
|
@@ -47,6 +47,5 @@ function createLockGuard(state) {
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
//#endregion
|
|
51
50
|
export { createLockGuard };
|
|
52
51
|
//# sourceMappingURL=lockGuard.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/scene/minSize.ts
|
|
2
2
|
/** A node's minimum, from `data.minSize`, or `null` when it has none. A
|
|
3
3
|
* side that is not a positive number holds nothing. */
|
|
4
4
|
function minSizeOf(data) {
|
|
@@ -12,6 +12,5 @@ function minSizeOf(data) {
|
|
|
12
12
|
} : null;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
//#endregion
|
|
16
15
|
export { minSizeOf };
|
|
17
16
|
//# sourceMappingURL=minSize.js.map
|
|
@@ -2,7 +2,7 @@ import { worldPoseLookup } from "./composePose.js";
|
|
|
2
2
|
import { poseDescriptorForNode } from "../geometry/poseDescriptor.js";
|
|
3
3
|
import { AUTO_POSE_DESCRIPTOR } from "../geometry/autoPoseDescriptor.js";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/core/scene/nestedHit.ts
|
|
6
6
|
/** Build hit-testers that respect containers: a plain click selects the
|
|
7
7
|
* top-level ancestor, and alt-clicking descends one level at a time toward
|
|
8
8
|
* the leaf actually under the pointer. */
|
|
@@ -49,6 +49,5 @@ function nestedHitTester(adapter, opts) {
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
//#endregion
|
|
53
52
|
export { nestedHitTester };
|
|
54
53
|
//# sourceMappingURL=nestedHit.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/scene/nodeAsShown.ts
|
|
2
2
|
/** Marks a node whose data is already shown. An own enumerable key, so a spread
|
|
3
3
|
* of the node (`{ ...node, pose }`) carries it, and applying an override to a
|
|
4
4
|
* copy of a shown node is a no-op however the copy was made. */
|
|
@@ -67,6 +67,5 @@ function nodesAsShown(overrides, nodes) {
|
|
|
67
67
|
return held.any ? nodes.map((node) => nodeAsShown(overrides, node)) : nodes;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
//#endregion
|
|
71
70
|
export { nodeAsShown, nodesAsShown, shownCopyOf, shownLookup, withShownData };
|
|
72
71
|
//# sourceMappingURL=nodeAsShown.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/scene/nodeFlags.ts
|
|
2
2
|
/** Stored only while set, so a snapshot of an unflagged node carries neither. */
|
|
3
3
|
function write(node, flag, to) {
|
|
4
4
|
if (to) node[flag] = true;
|
|
@@ -44,6 +44,5 @@ function createNodeFlags(env) {
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
//#endregion
|
|
48
47
|
export { createNodeFlags };
|
|
49
48
|
//# sourceMappingURL=nodeFlags.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/scene/nodeFnFields.ts
|
|
2
2
|
var NODE_FN_FIELDS = [
|
|
3
3
|
{
|
|
4
4
|
field: "clipFromPose",
|
|
@@ -93,6 +93,5 @@ function fnFieldsOfNode(node) {
|
|
|
93
93
|
return out;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
//#endregion
|
|
97
96
|
export { NODE_FN_FIELDS, createNodeFnFields, fnFieldsOfNode, fnKeysOf, restoreFn };
|
|
98
97
|
//# sourceMappingURL=nodeFnFields.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/scene/nodeGates.ts
|
|
2
2
|
/** Whether `node`'s own flag hides it and its subtree. A walk from the roots
|
|
3
3
|
* down prunes where this holds instead of asking {@link NodeGates.hidden}
|
|
4
4
|
* per node; the two agree because this is the flag that answer climbs for. */
|
|
@@ -102,6 +102,5 @@ function isNodeLocked(scene, id) {
|
|
|
102
102
|
return climbs(scene, id, layers === null ? (node) => node.locked === true : (node) => node.locked === true || layers.has(node.layer));
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
//#endregion
|
|
106
105
|
export { hidesSubtree, isNodeHidden, isNodeLocked, nodeGates };
|
|
107
106
|
//# sourceMappingURL=nodeGates.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/scene/nodeMemo.ts
|
|
2
2
|
function createNodeMemoScope() {
|
|
3
3
|
return /* @__PURE__ */ new WeakMap();
|
|
4
4
|
}
|
|
@@ -114,6 +114,5 @@ function dropPoseKeyedMemoSlots(node) {
|
|
|
114
114
|
for (const [slot, entry] of record.slots) if (entry.pose !== void 0) record.slots.delete(slot);
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
//#endregion
|
|
118
117
|
export { bumpNodeMemoGeneration, createNodeMemoScope, dropPoseKeyedMemoSlots, nodeMemo, nodeMemoGeneration };
|
|
119
118
|
//# sourceMappingURL=nodeMemo.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { dwarn } from "../../debug/flag.js";
|
|
1
2
|
import { createDependentsIndex } from "./dependents.js";
|
|
2
3
|
import { dropPoseKeyedMemoSlots } from "./nodeMemo.js";
|
|
3
|
-
import { dwarn } from "../../debug/flag.js";
|
|
4
4
|
import { restoreFn } from "./nodeFnFields.js";
|
|
5
5
|
import { SceneMembershipError } from "./staleReplay.js";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/core/scene/nodeStore.ts
|
|
8
8
|
/**
|
|
9
9
|
* The scene's node store: the tree links, the reverse index of who derives
|
|
10
10
|
* from whom, and the function fields a node carries beside its data.
|
|
@@ -200,6 +200,5 @@ function createNodeStore(state, invalidateOrder, fnFields) {
|
|
|
200
200
|
};
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
-
//#endregion
|
|
204
203
|
export { createNodeStore };
|
|
205
204
|
//# sourceMappingURL=nodeStore.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createEmitter } from "@weasel-js/registry";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/core/scene/notifier.ts
|
|
4
4
|
function createNotifier() {
|
|
5
5
|
const changed = createEmitter();
|
|
6
6
|
let version = 0;
|
|
@@ -43,6 +43,5 @@ function createNotifier() {
|
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
//#endregion
|
|
47
46
|
export { createNotifier };
|
|
48
47
|
//# sourceMappingURL=notifier.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/scene/opTable.ts
|
|
2
2
|
function createOpTable(env) {
|
|
3
3
|
const handlers = /* @__PURE__ */ new Map();
|
|
4
4
|
function handlerFor(kind) {
|
|
@@ -51,6 +51,5 @@ function createOpTable(env) {
|
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
//#endregion
|
|
55
54
|
export { createOpTable };
|
|
56
55
|
//# sourceMappingURL=opTable.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { rebuildOp } from "../ops/registry.js";
|
|
2
2
|
import { bindOpToAdapter, bindOpToHistoryAdapter } from "./boundOps.js";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/core/scene/outerOps.ts
|
|
5
5
|
/** A kit op under the key of the outer op that caused it, so two edits merge
|
|
6
6
|
* when their outer ops would have. */
|
|
7
7
|
function keyed(kit, outerKey) {
|
|
@@ -68,6 +68,5 @@ function createOuterOps(env) {
|
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
//#endregion
|
|
72
71
|
export { createOuterOps };
|
|
73
72
|
//# sourceMappingURL=outerOps.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { boundsOfPath, measurePath, multiply, prepareBlend, rotate, rotatePathAround, transformPath, translate } from "@weasel-js/geom";
|
|
2
2
|
import { lerpFill, lerpStroke } from "@weasel-js/paint";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/core/scene/pathEffects/blend.ts
|
|
5
5
|
/**
|
|
6
6
|
* A blend's steps: where each sits between its two sources — evenly by
|
|
7
7
|
* count, or a fixed distance apart — and, with a spine, laid along it.
|
|
@@ -75,6 +75,5 @@ function blendParts(effect, a, b, spine) {
|
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
//#endregion
|
|
79
78
|
export { blendParts, blendStations };
|
|
80
79
|
//# sourceMappingURL=blend.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { derivedPartsOf, pathFromParts } from "../derivedParts.js";
|
|
1
2
|
import { fontGeneration, noteFontRead, withFontReads } from "../fontReads.js";
|
|
2
3
|
import { samePoseValue, snapshotPose } from "../poseSnapshot.js";
|
|
3
|
-
import { derivedPartsOf, pathFromParts } from "../derivedParts.js";
|
|
4
4
|
import { effectParts } from "./effects.js";
|
|
5
5
|
import { boundsOfPath } from "@weasel-js/geom";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/core/scene/pathEffects/derive.ts
|
|
8
8
|
/**
|
|
9
9
|
* A path effect as a scene node: a leaf whose `dependsOn` names its sources,
|
|
10
10
|
* whose `data.pathEffect` says what to make of them, and whose path and pose
|
|
@@ -113,6 +113,5 @@ function registeredPathEffects(registry) {
|
|
|
113
113
|
} : null;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
//#endregion
|
|
117
116
|
export { PATH_EFFECT, createPathEffectDerivations, pathEffectNode, pathEffectOf, pathEffectParts, registeredPathEffects };
|
|
118
117
|
//# sourceMappingURL=derive.js.map
|
|
@@ -2,7 +2,7 @@ import { blendParts } from "./blend.js";
|
|
|
2
2
|
import { textAlongParts, wholeItem } from "./textAlong.js";
|
|
3
3
|
import { bendAlongPath, puckerBloatPath, repeatAlongPath, roughenPath, zigzagPath } from "@weasel-js/geom";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/core/scene/pathEffects/effects.ts
|
|
6
6
|
/**
|
|
7
7
|
* The path effects, each as the parts it paints from its sources: a blend's
|
|
8
8
|
* steps between two shapes, a shape bent along a spine, copies of a shape
|
|
@@ -56,6 +56,5 @@ function effectParts(effect, sources) {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
//#endregion
|
|
60
59
|
export { effectParts };
|
|
61
60
|
//# sourceMappingURL=effects.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { pathEffectOf } from "./derive.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/core/scene/pathEffects/foundHidden.ts
|
|
4
4
|
/**
|
|
5
5
|
* A path effect's `foundHidden` names its sources by position, so a retarget
|
|
6
6
|
* of its `dependsOn` carries the record along: every writer of `dependsOn`
|
|
@@ -30,6 +30,5 @@ function foundHiddenRetargeted(data, from, to) {
|
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
//#endregion
|
|
34
33
|
export { foundHiddenRetargeted };
|
|
35
34
|
//# sourceMappingURL=foundHidden.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { bandParts } from "./textAlongBands.js";
|
|
2
2
|
import { boundsOfPath, multiply, pathShape, placeAlongRun, rotate, runLength, trackRun, transformPath, translate } from "@weasel-js/geom";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/core/scene/pathEffects/textAlong.ts
|
|
5
5
|
/**
|
|
6
6
|
* Text along a path: a source's items — a text node's grapheme clusters, or a
|
|
7
7
|
* whole shape as one item — laid end to end along a path, each turned to it.
|
|
@@ -103,6 +103,5 @@ function itemFrame(place, length, lift) {
|
|
|
103
103
|
var clamp01 = (v) => v > 1 ? 1 : v > 0 ? v : 0;
|
|
104
104
|
var finiteOr = (v, d) => v !== void 0 && Number.isFinite(v) ? v : d;
|
|
105
105
|
|
|
106
|
-
//#endregion
|
|
107
106
|
export { textAlongParts, wholeItem };
|
|
108
107
|
//# sourceMappingURL=textAlong.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { polygonFromPoints, runStationAt } from "@weasel-js/geom";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/core/scene/pathEffects/textAlongBands.ts
|
|
4
4
|
/**
|
|
5
5
|
* The bands text along a path carries — decoration rules cut into clusters — joined across neighboring items and drawn
|
|
6
6
|
* as ribbons that bend with the path.
|
|
@@ -60,6 +60,5 @@ function ribbonPart(r, run, shift) {
|
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
//#endregion
|
|
64
63
|
export { bandParts };
|
|
65
64
|
//# sourceMappingURL=textAlongBands.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { carryBoxPath } from "./depFrame.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/core/scene/plyStacks.ts
|
|
4
4
|
/** Empty stacks. */
|
|
5
5
|
function createPlyStacks() {
|
|
6
6
|
const plies = /* @__PURE__ */ new Map();
|
|
@@ -84,6 +84,5 @@ function plyPath(stack, pose, held) {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
//#endregion
|
|
88
87
|
export { createPlyStacks, plyPath };
|
|
89
88
|
//# sourceMappingURL=plyStacks.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { effectivePose } from "./effectivePose.js";
|
|
2
2
|
import { createEmitter } from "@weasel-js/registry";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/core/scene/poseFeed.ts
|
|
5
5
|
var EMPTY = Object.freeze([]);
|
|
6
6
|
/** A {@link PoseFeed} over `scene`, reporting effective poses (committed pose
|
|
7
7
|
* under any override). The first `read()` is a reset listing every node. */
|
|
@@ -117,6 +117,5 @@ function createPoseFeed(scene) {
|
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
//#endregion
|
|
121
120
|
export { createPoseFeed };
|
|
122
121
|
//# sourceMappingURL=poseFeed.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/scene/poseHold.ts
|
|
2
2
|
/** Build the {@link PoseHold} a table hands out from `hold()`. `pliesOf`
|
|
3
3
|
* answers a node's plies, bottom first. */
|
|
4
4
|
function createPoseHold(table, pliesOf) {
|
|
@@ -61,6 +61,5 @@ function* mapped(poses) {
|
|
|
61
61
|
for (const [id, pose] of poses) yield [id, { pose }];
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
//#endregion
|
|
65
64
|
export { createPoseHold };
|
|
66
65
|
//# sourceMappingURL=poseHold.js.map
|
|
@@ -5,7 +5,7 @@ import { foldPlies } from "./posePlies.js";
|
|
|
5
5
|
import { createPlyStacks, plyPath } from "./plyStacks.js";
|
|
6
6
|
import { createEmitter } from "@weasel-js/registry";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/core/scene/poseOverrides.ts
|
|
9
9
|
/**
|
|
10
10
|
* Build a {@link PoseOverrides} map.
|
|
11
11
|
*
|
|
@@ -105,6 +105,5 @@ function createPoseOverrides(getNode, onInvalidate) {
|
|
|
105
105
|
return table;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
//#endregion
|
|
109
108
|
export { createPoseOverrides };
|
|
110
109
|
//# sourceMappingURL=poseOverrides.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { kit, last, mix, mul, patch } from "@msb235/blits";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/core/scene/posePlies.ts
|
|
4
4
|
/** What a ply says about a node with fewer plies than its depth. */
|
|
5
5
|
var NOTHING = Object.freeze({});
|
|
6
6
|
/** Per lower function, per upper one, the two run in turn: kept, so a node
|
|
@@ -54,6 +54,5 @@ function foldPlies(plies) {
|
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
//#endregion
|
|
58
57
|
export { foldPlies };
|
|
59
58
|
//# sourceMappingURL=posePlies.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/scene/poseRemovals.ts
|
|
2
2
|
function createRemovalLog(shown) {
|
|
3
3
|
const removals = /* @__PURE__ */ new Map();
|
|
4
4
|
return {
|
|
@@ -54,6 +54,5 @@ function createRemovalLog(shown) {
|
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
//#endregion
|
|
58
57
|
export { createRemovalLog };
|
|
59
58
|
//# sourceMappingURL=poseRemovals.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isPlainObject, isPlainPrototype } from "../isPlainObject.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/core/scene/poseSnapshot.ts
|
|
4
4
|
/**
|
|
5
5
|
* Comparing a pose against what it was, by value.
|
|
6
6
|
*
|
|
@@ -70,6 +70,5 @@ function samePoseValue(snapshot, value, depth = DEPTH) {
|
|
|
70
70
|
return false;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
//#endregion
|
|
74
73
|
export { samePoseValue, snapshotPose };
|
|
75
74
|
//# sourceMappingURL=poseSnapshot.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRemovalLog } from "./poseRemovals.js";
|
|
2
2
|
import { createEmitter, deepEqual } from "@weasel-js/registry";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/core/scene/poseWrites.ts
|
|
5
5
|
/**
|
|
6
6
|
* What a scene reports about the poses it writes: each change's net pose per
|
|
7
7
|
* node, the nodes it removed as they were last shown, and where each came
|
|
@@ -147,6 +147,5 @@ function createPoseWriteLog(env) {
|
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
//#endregion
|
|
151
150
|
export { createPoseWriteLog };
|
|
152
151
|
//# sourceMappingURL=poseWrites.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { sameValue } from "./sameValue.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/core/scene/reconcileSpecs.ts
|
|
4
4
|
/**
|
|
5
5
|
* Bring `scene` from `prev` to `next`: add what `next` gained, remove what it
|
|
6
6
|
* lost, and write only the fields that changed between the two.
|
|
@@ -11,7 +11,9 @@ import { sameValue } from "./sameValue.js";
|
|
|
11
11
|
* outside data is not an undo step.
|
|
12
12
|
*
|
|
13
13
|
* Every spec needs an `id`, and `next` must be in an order `createScene` would
|
|
14
|
-
* accept — parents and dependencies before what names them.
|
|
14
|
+
* accept — parents and dependencies before what names them. Siblings stand in
|
|
15
|
+
* `next`'s order wherever a parent's children in it differ from `prev`'s, by an
|
|
16
|
+
* addition or a reorder; elsewhere a reorder made in the scene stays. A node whose
|
|
15
17
|
* `kind` or derive functions change is removed and added again, along with
|
|
16
18
|
* everything its removal takes with it, and stays selected if it was.
|
|
17
19
|
*/
|
|
@@ -47,9 +49,31 @@ function reconcileSpecs(scene, prev, next) {
|
|
|
47
49
|
if (spec.hidden === true !== (before.hidden === true)) scene.setHidden(id, spec.hidden === true);
|
|
48
50
|
if (spec.locked === true && before.locked !== true) scene.setLocked(id, true);
|
|
49
51
|
}
|
|
52
|
+
reorderToSpecs(scene, prev, next);
|
|
50
53
|
if (selected.some((id) => removed.has(id))) scene.setSelection(selected.filter((id) => scene.get(id) !== void 0));
|
|
51
54
|
});
|
|
52
55
|
}
|
|
56
|
+
/** Each parent whose spec children `next` lists differently from `prev` gets
|
|
57
|
+
* them in `next`'s order, in the slots they hold among its children now, so
|
|
58
|
+
* a child no spec names keeps its place. */
|
|
59
|
+
function reorderToSpecs(scene, prev, next) {
|
|
60
|
+
const before = childLists(prev);
|
|
61
|
+
for (const [parent, wanted] of childLists(next)) {
|
|
62
|
+
if (sameValue(wanted, before.get(parent))) continue;
|
|
63
|
+
const named = new Set(wanted);
|
|
64
|
+
const siblings = parent === null ? scene.roots : scene.childrenOf(parent);
|
|
65
|
+
const slots = siblings.flatMap((id, i) => named.has(id) ? [i] : []);
|
|
66
|
+
wanted.filter((id) => siblings.includes(id)).forEach((id, k) => scene.reorder(id, slots[k]));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function childLists(specs) {
|
|
70
|
+
const out = /* @__PURE__ */ new Map();
|
|
71
|
+
for (const spec of specs) {
|
|
72
|
+
const parent = spec.parent ?? null;
|
|
73
|
+
out.set(parent, [...out.get(parent) ?? [], spec.id]);
|
|
74
|
+
}
|
|
75
|
+
return out;
|
|
76
|
+
}
|
|
53
77
|
function byId(specs) {
|
|
54
78
|
const out = /* @__PURE__ */ new Map();
|
|
55
79
|
for (const spec of specs) {
|
|
@@ -63,6 +87,5 @@ function needsReplace(a, b) {
|
|
|
63
87
|
return a.kind !== b.kind || a.pickable !== b.pickable || a.consumesChildren !== b.consumesChildren || a.derivePath !== b.derivePath || a.derivePose !== b.derivePose || a.clipFromPose !== b.clipFromPose || a.copiesFromPose !== b.copiesFromPose || a.layout !== b.layout;
|
|
64
88
|
}
|
|
65
89
|
|
|
66
|
-
//#endregion
|
|
67
90
|
export { reconcileSpecs };
|
|
68
91
|
//# sourceMappingURL=reconcileSpecs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reconcileSpecs.js","names":["same"],"sources":["../../../src/core/scene/reconcileSpecs.ts"],"sourcesContent":["import { sameValue as same } from './sameValue';\nimport type { AddNodeSpec, NodeId, Scene } from './types';\n\n/**\n * Bring `scene` from `prev` to `next`: add what `next` gained, remove what it\n * lost, and write only the fields that changed between the two.\n *\n * The diff is spec against spec, not spec against scene, so whatever the scene\n * did since `prev` — a node dragged, an edge authored by a gesture — survives\n * unless `next` changes that same field. The writes are untracked: syncing to\n * outside data is not an undo step.\n *\n * Every spec needs an `id`, and `next` must be in an order `createScene` would\n * accept — parents and dependencies before what names them. A node whose\n * `kind` or derive functions change is removed and added again, along with\n * everything its removal takes with it, and stays selected if it was.\n */\nexport function reconcileSpecs<TData, TLayer extends string, TPose>(\n scene: Scene<TData, TLayer, TPose>,\n prev: readonly AddNodeSpec<TData, TLayer, TPose>[],\n next: readonly AddNodeSpec<TData, TLayer, TPose>[],\n): void {\n const prevById = byId(prev);\n const nextById = byId(next);\n const gone: NodeId[] = [];\n for (const [id, before] of prevById) {\n const after = nextById.get(id);\n if (after === undefined || needsReplace(before, after)) gone.push(id);\n }\n const removing = scene.removalClosure(gone.filter((id) => scene.get(id) !== undefined));\n const removed = new Set(removing);\n\n // A replaced node is the same node to whoever selected it.\n const selected = scene.getSelection();\n\n scene.untracked(() => {\n scene.removeMany(removing);\n for (const spec of next) {\n const id = spec.id!;\n const before = prevById.get(id);\n if (scene.get(id) === undefined || before === undefined || removed.has(id)) {\n scene.add(spec);\n continue;\n }\n // An unlock goes first and a lock last, so the writes between can land.\n if (before.locked === true && spec.locked !== true) scene.setLocked(id, false);\n const parent = spec.parent ?? null;\n if (parent !== (before.parent ?? null)) scene.move(id, parent);\n if (spec.layer !== before.layer) scene.setLayer(id, spec.layer);\n if (!same(spec.data, before.data)) scene.update(id, { data: spec.data });\n if (!same(spec.dependsOn, before.dependsOn)) scene.setDependsOn(id, spec.dependsOn);\n if (!same(spec.units, before.units)) scene.setUnits(id, spec.units ?? null);\n if (spec.clip !== before.clip) scene.setClip(id, spec.clip ?? null);\n if (!same(spec.pose, before.pose)) scene.setPose(id, spec.pose);\n if ((spec.hidden === true) !== (before.hidden === true)) scene.setHidden(id, spec.hidden === true);\n if (spec.locked === true && before.locked !== true) scene.setLocked(id, true);\n }\n if (selected.some((id) => removed.has(id))) {\n scene.setSelection(selected.filter((id) => scene.get(id) !== undefined));\n }\n });\n}\n\nfunction byId<T extends { id?: NodeId }>(specs: readonly T[]): Map<NodeId, T> {\n const out = new Map<NodeId, T>();\n for (const spec of specs) {\n if (spec.id === undefined) throw new Error('reconcileSpecs: every spec needs an id');\n if (out.has(spec.id)) throw new Error(`reconcileSpecs: id \"${spec.id}\" appears more than once`);\n out.set(spec.id, spec);\n }\n return out;\n}\n\nfunction needsReplace<TData, TLayer extends string, TPose>(\n a: AddNodeSpec<TData, TLayer, TPose>,\n b: AddNodeSpec<TData, TLayer, TPose>,\n): boolean {\n return a.kind !== b.kind\n || a.pickable !== b.pickable\n || a.consumesChildren !== b.consumesChildren\n || a.derivePath !== b.derivePath\n || a.derivePose !== b.derivePose\n || a.clipFromPose !== b.clipFromPose\n || a.copiesFromPose !== b.copiesFromPose\n || a.layout !== b.layout;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"reconcileSpecs.js","names":["same"],"sources":["../../../src/core/scene/reconcileSpecs.ts"],"sourcesContent":["import { sameValue as same } from './sameValue';\nimport type { AddNodeSpec, NodeId, Scene } from './types';\n\n/**\n * Bring `scene` from `prev` to `next`: add what `next` gained, remove what it\n * lost, and write only the fields that changed between the two.\n *\n * The diff is spec against spec, not spec against scene, so whatever the scene\n * did since `prev` — a node dragged, an edge authored by a gesture — survives\n * unless `next` changes that same field. The writes are untracked: syncing to\n * outside data is not an undo step.\n *\n * Every spec needs an `id`, and `next` must be in an order `createScene` would\n * accept — parents and dependencies before what names them. Siblings stand in\n * `next`'s order wherever a parent's children in it differ from `prev`'s, by an\n * addition or a reorder; elsewhere a reorder made in the scene stays. A node whose\n * `kind` or derive functions change is removed and added again, along with\n * everything its removal takes with it, and stays selected if it was.\n */\nexport function reconcileSpecs<TData, TLayer extends string, TPose>(\n scene: Scene<TData, TLayer, TPose>,\n prev: readonly AddNodeSpec<TData, TLayer, TPose>[],\n next: readonly AddNodeSpec<TData, TLayer, TPose>[],\n): void {\n const prevById = byId(prev);\n const nextById = byId(next);\n const gone: NodeId[] = [];\n for (const [id, before] of prevById) {\n const after = nextById.get(id);\n if (after === undefined || needsReplace(before, after)) gone.push(id);\n }\n const removing = scene.removalClosure(gone.filter((id) => scene.get(id) !== undefined));\n const removed = new Set(removing);\n\n // A replaced node is the same node to whoever selected it.\n const selected = scene.getSelection();\n\n scene.untracked(() => {\n scene.removeMany(removing);\n for (const spec of next) {\n const id = spec.id!;\n const before = prevById.get(id);\n if (scene.get(id) === undefined || before === undefined || removed.has(id)) {\n scene.add(spec);\n continue;\n }\n // An unlock goes first and a lock last, so the writes between can land.\n if (before.locked === true && spec.locked !== true) scene.setLocked(id, false);\n const parent = spec.parent ?? null;\n if (parent !== (before.parent ?? null)) scene.move(id, parent);\n if (spec.layer !== before.layer) scene.setLayer(id, spec.layer);\n if (!same(spec.data, before.data)) scene.update(id, { data: spec.data });\n if (!same(spec.dependsOn, before.dependsOn)) scene.setDependsOn(id, spec.dependsOn);\n if (!same(spec.units, before.units)) scene.setUnits(id, spec.units ?? null);\n if (spec.clip !== before.clip) scene.setClip(id, spec.clip ?? null);\n if (!same(spec.pose, before.pose)) scene.setPose(id, spec.pose);\n if ((spec.hidden === true) !== (before.hidden === true)) scene.setHidden(id, spec.hidden === true);\n if (spec.locked === true && before.locked !== true) scene.setLocked(id, true);\n }\n reorderToSpecs(scene, prev, next);\n if (selected.some((id) => removed.has(id))) {\n scene.setSelection(selected.filter((id) => scene.get(id) !== undefined));\n }\n });\n}\n\n/** Each parent whose spec children `next` lists differently from `prev` gets\n * them in `next`'s order, in the slots they hold among its children now, so\n * a child no spec names keeps its place. */\nfunction reorderToSpecs<TData, TLayer extends string, TPose>(\n scene: Scene<TData, TLayer, TPose>,\n prev: readonly AddNodeSpec<TData, TLayer, TPose>[],\n next: readonly AddNodeSpec<TData, TLayer, TPose>[],\n): void {\n const before = childLists(prev);\n for (const [parent, wanted] of childLists(next)) {\n if (same(wanted, before.get(parent))) continue;\n const named = new Set(wanted);\n const siblings = parent === null ? scene.roots : scene.childrenOf(parent);\n const slots = siblings.flatMap((id, i) => (named.has(id) ? [i] : []));\n const order = wanted.filter((id) => siblings.includes(id));\n // Filling the slots left to right, each move leaves every earlier slot as it should end.\n order.forEach((id, k) => scene.reorder(id, slots[k]!));\n }\n}\n\nfunction childLists<T extends { id?: NodeId; parent?: NodeId | null }>(specs: readonly T[]): Map<NodeId | null, NodeId[]> {\n const out = new Map<NodeId | null, NodeId[]>();\n for (const spec of specs) {\n const parent = spec.parent ?? null;\n out.set(parent, [...(out.get(parent) ?? []), spec.id!]);\n }\n return out;\n}\n\nfunction byId<T extends { id?: NodeId }>(specs: readonly T[]): Map<NodeId, T> {\n const out = new Map<NodeId, T>();\n for (const spec of specs) {\n if (spec.id === undefined) throw new Error('reconcileSpecs: every spec needs an id');\n if (out.has(spec.id)) throw new Error(`reconcileSpecs: id \"${spec.id}\" appears more than once`);\n out.set(spec.id, spec);\n }\n return out;\n}\n\nfunction needsReplace<TData, TLayer extends string, TPose>(\n a: AddNodeSpec<TData, TLayer, TPose>,\n b: AddNodeSpec<TData, TLayer, TPose>,\n): boolean {\n return a.kind !== b.kind\n || a.pickable !== b.pickable\n || a.consumesChildren !== b.consumesChildren\n || a.derivePath !== b.derivePath\n || a.derivePose !== b.derivePose\n || a.clipFromPose !== b.clipFromPose\n || a.copiesFromPose !== b.copiesFromPose\n || a.layout !== b.layout;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBA,SAAgB,eACd,OACA,MACA,MACM;CACN,MAAM,WAAW,KAAK,IAAI;CAC1B,MAAM,WAAW,KAAK,IAAI;CAC1B,MAAM,OAAiB,CAAC;CACxB,KAAK,MAAM,CAAC,IAAI,WAAW,UAAU;EACnC,MAAM,QAAQ,SAAS,IAAI,EAAE;EAC7B,IAAI,UAAU,UAAa,aAAa,QAAQ,KAAK,GAAG,KAAK,KAAK,EAAE;CACtE;CACA,MAAM,WAAW,MAAM,eAAe,KAAK,QAAQ,OAAO,MAAM,IAAI,EAAE,MAAM,MAAS,CAAC;CACtF,MAAM,UAAU,IAAI,IAAI,QAAQ;CAGhC,MAAM,WAAW,MAAM,aAAa;CAEpC,MAAM,gBAAgB;EACpB,MAAM,WAAW,QAAQ;EACzB,KAAK,MAAM,QAAQ,MAAM;GACvB,MAAM,KAAK,KAAK;GAChB,MAAM,SAAS,SAAS,IAAI,EAAE;GAC9B,IAAI,MAAM,IAAI,EAAE,MAAM,UAAa,WAAW,UAAa,QAAQ,IAAI,EAAE,GAAG;IAC1E,MAAM,IAAI,IAAI;IACd;GACF;GAEA,IAAI,OAAO,WAAW,QAAQ,KAAK,WAAW,MAAM,MAAM,UAAU,IAAI,KAAK;GAC7E,MAAM,SAAS,KAAK,UAAU;GAC9B,IAAI,YAAY,OAAO,UAAU,OAAO,MAAM,KAAK,IAAI,MAAM;GAC7D,IAAI,KAAK,UAAU,OAAO,OAAO,MAAM,SAAS,IAAI,KAAK,KAAK;GAC9D,IAAI,CAACA,UAAK,KAAK,MAAM,OAAO,IAAI,GAAG,MAAM,OAAO,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC;GACvE,IAAI,CAACA,UAAK,KAAK,WAAW,OAAO,SAAS,GAAG,MAAM,aAAa,IAAI,KAAK,SAAS;GAClF,IAAI,CAACA,UAAK,KAAK,OAAO,OAAO,KAAK,GAAG,MAAM,SAAS,IAAI,KAAK,SAAS,IAAI;GAC1E,IAAI,KAAK,SAAS,OAAO,MAAM,MAAM,QAAQ,IAAI,KAAK,QAAQ,IAAI;GAClE,IAAI,CAACA,UAAK,KAAK,MAAM,OAAO,IAAI,GAAG,MAAM,QAAQ,IAAI,KAAK,IAAI;GAC9D,IAAK,KAAK,WAAW,UAAW,OAAO,WAAW,OAAO,MAAM,UAAU,IAAI,KAAK,WAAW,IAAI;GACjG,IAAI,KAAK,WAAW,QAAQ,OAAO,WAAW,MAAM,MAAM,UAAU,IAAI,IAAI;EAC9E;EACA,eAAe,OAAO,MAAM,IAAI;EAChC,IAAI,SAAS,MAAM,OAAO,QAAQ,IAAI,EAAE,CAAC,GACvC,MAAM,aAAa,SAAS,QAAQ,OAAO,MAAM,IAAI,EAAE,MAAM,MAAS,CAAC;CAE3E,CAAC;AACH;;;;AAKA,SAAS,eACP,OACA,MACA,MACM;CACN,MAAM,SAAS,WAAW,IAAI;CAC9B,KAAK,MAAM,CAAC,QAAQ,WAAW,WAAW,IAAI,GAAG;EAC/C,IAAIA,UAAK,QAAQ,OAAO,IAAI,MAAM,CAAC,GAAG;EACtC,MAAM,QAAQ,IAAI,IAAI,MAAM;EAC5B,MAAM,WAAW,WAAW,OAAO,MAAM,QAAQ,MAAM,WAAW,MAAM;EACxE,MAAM,QAAQ,SAAS,SAAS,IAAI,MAAO,MAAM,IAAI,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,CAAE;EAGpE,AAFc,OAAO,QAAQ,OAAO,SAAS,SAAS,EAAE,CAExD,CAAA,CAAM,SAAS,IAAI,MAAM,MAAM,QAAQ,IAAI,MAAM,EAAG,CAAC;CACvD;AACF;AAEA,SAAS,WAA8D,OAAmD;CACxH,MAAM,sBAAM,IAAI,IAA6B;CAC7C,KAAK,MAAM,QAAQ,OAAO;EACxB,MAAM,SAAS,KAAK,UAAU;EAC9B,IAAI,IAAI,QAAQ,CAAC,GAAI,IAAI,IAAI,MAAM,KAAK,CAAC,GAAI,KAAK,EAAG,CAAC;CACxD;CACA,OAAO;AACT;AAEA,SAAS,KAAgC,OAAqC;CAC5E,MAAM,sBAAM,IAAI,IAAe;CAC/B,KAAK,MAAM,QAAQ,OAAO;EACxB,IAAI,KAAK,OAAO,QAAW,MAAM,IAAI,MAAM,wCAAwC;EACnF,IAAI,IAAI,IAAI,KAAK,EAAE,GAAG,MAAM,IAAI,MAAM,uBAAuB,KAAK,GAAG,yBAAyB;EAC9F,IAAI,IAAI,KAAK,IAAI,IAAI;CACvB;CACA,OAAO;AACT;AAEA,SAAS,aACP,GACA,GACS;CACT,OAAO,EAAE,SAAS,EAAE,QACf,EAAE,aAAa,EAAE,YACjB,EAAE,qBAAqB,EAAE,oBACzB,EAAE,eAAe,EAAE,cACnB,EAAE,eAAe,EAAE,cACnB,EAAE,iBAAiB,EAAE,gBACrB,EAAE,mBAAmB,EAAE,kBACvB,EAAE,WAAW,EAAE;AACtB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { bindOpToAdapter } from "./boundOps.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/core/scene/recorder.ts
|
|
4
4
|
/** Take back ops that wrote outside the scene, newest first. The scene's own
|
|
5
5
|
* writes are reverted by the applied log. */
|
|
6
6
|
function unwind(outer) {
|
|
@@ -123,6 +123,5 @@ function createRecorder(env) {
|
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
//#endregion
|
|
127
126
|
export { createRecorder };
|
|
128
127
|
//# sourceMappingURL=recorder.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { hasChildren } from "./treeShape.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/core/scene/renderOrder.ts
|
|
4
4
|
/**
|
|
5
5
|
* A scene's render order: its nodes layer-major, each layer in tree preorder,
|
|
6
6
|
* cached until the structure changes.
|
|
@@ -131,6 +131,5 @@ function createRenderOrder(state) {
|
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
//#endregion
|
|
135
134
|
export { createRenderOrder };
|
|
136
135
|
//# sourceMappingURL=renderOrder.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isPlainObject } from "../isPlainObject.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/core/scene/sameValue.ts
|
|
4
4
|
/** Structural equality over plain objects and arrays; anything else by identity. */
|
|
5
5
|
function sameValue(a, b) {
|
|
6
6
|
if (Object.is(a, b)) return true;
|
|
@@ -12,6 +12,5 @@ function sameValue(a, b) {
|
|
|
12
12
|
return false;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
//#endregion
|
|
16
15
|
export { sameValue };
|
|
17
16
|
//# sourceMappingURL=sameValue.js.map
|
package/dist/core/scene/scene.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { RIGID_POSE_COMPOSITION } from "./composePose.js";
|
|
2
|
-
import { effectivePose } from "./effectivePose.js";
|
|
3
|
-
import { createScrollOffsets } from "./scrollOffsets.js";
|
|
4
|
-
import { asNodeId } from "./types.js";
|
|
5
|
-
import { documentReads, sceneMutators } from "./sceneMutators.js";
|
|
6
1
|
import { withKitRegistry } from "./kitRegistry.js";
|
|
7
2
|
import { createPoseOverrides } from "./poseOverrides.js";
|
|
3
|
+
import { createScrollOffsets } from "./scrollOffsets.js";
|
|
8
4
|
import { createArrivalWindow } from "./arrivalWindow.js";
|
|
5
|
+
import { documentReads, sceneMutators } from "./sceneMutators.js";
|
|
9
6
|
import { createNotifier } from "./notifier.js";
|
|
10
7
|
import { sceneChanges } from "./sceneChanges.js";
|
|
11
8
|
import { createPoseWriteLog } from "./poseWrites.js";
|
|
9
|
+
import { effectivePose } from "./effectivePose.js";
|
|
12
10
|
import { createEditMode } from "./editMode.js";
|
|
13
|
-
import { resolveLayoutFrame, runLayoutPass } from "./layoutPass.js";
|
|
14
|
-
import { systemLayerRecord } from "./layerStack.js";
|
|
15
11
|
import { createSceneEdits } from "./sceneEdits.js";
|
|
16
12
|
import { createSceneRecording } from "./sceneRecording.js";
|
|
17
13
|
import { createSceneSelection } from "./sceneSelection.js";
|
|
18
|
-
import { layerFromSerialized, specsFromSerialized } from "./serialization.js";
|
|
19
14
|
import { createSceneState } from "./sceneState.js";
|
|
15
|
+
import { systemLayerRecord } from "./layerStack.js";
|
|
16
|
+
import { layerFromSerialized, specsFromSerialized } from "./serialization.js";
|
|
17
|
+
import { resolveLayoutFrame, runLayoutPass } from "./layoutPass.js";
|
|
18
|
+
import { RIGID_POSE_COMPOSITION } from "./composePose.js";
|
|
19
|
+
import { asNodeId } from "./types.js";
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
// src/core/scene/scene.ts
|
|
22
22
|
/** A node still in `scene`, with the pose it is shown at. */
|
|
23
23
|
function shownNode(scene, id) {
|
|
24
24
|
const node = scene.get(id);
|
|
@@ -59,7 +59,7 @@ function buildScene(options, layers, initialNodes, initialDoc) {
|
|
|
59
59
|
writePose
|
|
60
60
|
});
|
|
61
61
|
const generateId = options.generateId ?? defaultGenerateId;
|
|
62
|
-
const selection = createSceneSelection(locks.reachable);
|
|
62
|
+
const selection = createSceneSelection(locks.reachable, (id) => state.nodes.get(id)?.parent);
|
|
63
63
|
selection.subscribe(notifier.notify);
|
|
64
64
|
/** Ephemeral, deliberately not part of `state`: not document content, never in `toJSON` or history. */
|
|
65
65
|
const overrides = createPoseOverrides((id) => state.nodes.get(id), doc.store.invalidateDependents);
|
|
@@ -133,7 +133,7 @@ function buildScene(options, layers, initialNodes, initialDoc) {
|
|
|
133
133
|
doc.reset(json.systemLayers.map(layerFromSerialized), json.doc);
|
|
134
134
|
recording.clearHistory();
|
|
135
135
|
poseWrites.quiet(() => edits.construct(specs));
|
|
136
|
-
selection.replace(
|
|
136
|
+
selection.replace(selection.legal(selection.get().filter((id) => state.nodes.has(id))));
|
|
137
137
|
notifier.notify();
|
|
138
138
|
},
|
|
139
139
|
...sceneChanges(notifier, selection)
|
|
@@ -154,6 +154,5 @@ function sceneFromJSON(json, options = {}) {
|
|
|
154
154
|
return buildScene(options, json.systemLayers.map(layerFromSerialized), (registry) => specsFromSerialized(json, registry, options), json.doc);
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
//#endregion
|
|
158
157
|
export { createScene, sceneFromJSON };
|
|
159
158
|
//# sourceMappingURL=scene.js.map
|