@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,9 +1,9 @@
|
|
|
1
1
|
import { IDENTITY_POSE_COMPOSITION } from "./composeFrame.js";
|
|
2
|
-
import { asNodeId } from "./types.js";
|
|
3
2
|
import { createScene } from "./scene.js";
|
|
3
|
+
import { asNodeId } from "./types.js";
|
|
4
4
|
import { useRef, useSyncExternalStore } from "react";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/core/scene/useScene.ts
|
|
7
7
|
/** A subscribe function that never notifies. `useSyncExternalStore` still runs
|
|
8
8
|
* (hooks are unconditional) but the host is never re-rendered by the store. */
|
|
9
9
|
var NEVER_SUBSCRIBE = () => () => {};
|
|
@@ -37,6 +37,5 @@ function useScene(options) {
|
|
|
37
37
|
return scene;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
//#endregion
|
|
41
40
|
export { useScene };
|
|
42
41
|
//# sourceMappingURL=useScene.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { composeWorldPose } from "./composeFrame.js";
|
|
2
|
-
import { definesFrame } from "./effectivePose.js";
|
|
3
2
|
import { scenePoseAdapter } from "./scenePoseAdapter.js";
|
|
3
|
+
import { definesFrame } from "./effectivePose.js";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/core/scene/worldSave.ts
|
|
6
6
|
/**
|
|
7
7
|
* Reading a save from before a scene's poses composed by default. Versions 1
|
|
8
8
|
* and 2 stored every pose as world; version 3 stores a child's pose in the
|
|
@@ -82,6 +82,5 @@ function localizeInScene(scene, specs) {
|
|
|
82
82
|
return localizeWorldPoses([...above.values(), ...specs], scene.composition).slice(above.size);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
//#endregion
|
|
86
85
|
export { localizeInScene, localizeWorldPoses, worldPosesOf };
|
|
87
86
|
//# sourceMappingURL=worldSave.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { unionAABB } from "../geometry/unionBounds.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/core/selection/chromeState.ts
|
|
4
4
|
/** Nothing selected, nothing resolvable — what a caller reads before a
|
|
5
5
|
* surface has attached, or where chrome state has no owner. */
|
|
6
6
|
var EMPTY_CHROME_STATE = {
|
|
@@ -50,6 +50,5 @@ function buildChromeState(args) {
|
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
//#endregion
|
|
54
53
|
export { EMPTY_CHROME_STATE, buildChromeState, paintsLayer };
|
|
55
54
|
//# sourceMappingURL=chromeState.js.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { outermost } from "@weasel-js/select";
|
|
2
|
+
|
|
3
|
+
// src/core/selection/outermostSelection.ts
|
|
4
|
+
var views = /* @__PURE__ */ new WeakMap();
|
|
5
|
+
/**
|
|
6
|
+
* A view of `api` whose every write keeps only the outermost ids under `parentOf`, so a
|
|
7
|
+
* selection kept off the scene holds a selected node's subtree the way the scene's own does.
|
|
8
|
+
* `api` itself is untouched and still writes as it did.
|
|
9
|
+
*
|
|
10
|
+
* One view per `api` and `parentOf`, so it is as stable a memo or effect dependency as `api`.
|
|
11
|
+
*/
|
|
12
|
+
function outermostSelection(api, parentOf) {
|
|
13
|
+
const cached = views.get(api);
|
|
14
|
+
if (cached && cached.parentOf === parentOf) return cached.view;
|
|
15
|
+
const narrow = (ids) => outermost(ids, parentOf);
|
|
16
|
+
const set = (ids) => api.set(narrow(ids));
|
|
17
|
+
const settle = () => {
|
|
18
|
+
const ids = api.get();
|
|
19
|
+
const kept = narrow(ids);
|
|
20
|
+
if (kept !== ids) api.set(kept);
|
|
21
|
+
};
|
|
22
|
+
const view = {
|
|
23
|
+
get current() {
|
|
24
|
+
return api.current;
|
|
25
|
+
},
|
|
26
|
+
get: api.get,
|
|
27
|
+
contains: api.contains,
|
|
28
|
+
set,
|
|
29
|
+
add(id) {
|
|
30
|
+
api.add(id);
|
|
31
|
+
settle();
|
|
32
|
+
},
|
|
33
|
+
remove: api.remove,
|
|
34
|
+
toggle(id) {
|
|
35
|
+
api.toggle(id);
|
|
36
|
+
settle();
|
|
37
|
+
},
|
|
38
|
+
clear: api.clear,
|
|
39
|
+
applyClick(id, modifiers) {
|
|
40
|
+
api.applyClick(id, modifiers);
|
|
41
|
+
settle();
|
|
42
|
+
},
|
|
43
|
+
adapterMethods: {
|
|
44
|
+
getSelection: api.adapterMethods.getSelection,
|
|
45
|
+
setSelection: (ids) => api.adapterMethods.setSelection(narrow(ids))
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
views.set(api, {
|
|
49
|
+
parentOf,
|
|
50
|
+
view
|
|
51
|
+
});
|
|
52
|
+
return view;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { outermostSelection };
|
|
56
|
+
//# sourceMappingURL=outermostSelection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outermostSelection.js","names":[],"sources":["../../../src/core/selection/outermostSelection.ts"],"sourcesContent":["import { outermost, type ParentOf } from '@weasel-js/select';\nimport type { NodeId } from 'core/scene/types';\nimport type { SelectionApi } from './useSelection';\n\nconst views = new WeakMap<SelectionApi, { parentOf: ParentOf<NodeId>; view: SelectionApi }>();\n\n/**\n * A view of `api` whose every write keeps only the outermost ids under `parentOf`, so a\n * selection kept off the scene holds a selected node's subtree the way the scene's own does.\n * `api` itself is untouched and still writes as it did.\n *\n * One view per `api` and `parentOf`, so it is as stable a memo or effect dependency as `api`.\n */\nexport function outermostSelection(api: SelectionApi, parentOf: ParentOf<NodeId>): SelectionApi {\n const cached = views.get(api);\n if (cached && cached.parentOf === parentOf) return cached.view;\n const narrow = (ids: readonly NodeId[]) => outermost(ids, parentOf) as NodeId[];\n const set = (ids: NodeId[]): void => api.set(narrow(ids));\n const settle = (): void => {\n const ids = api.get();\n const kept = narrow(ids);\n if (kept !== ids) api.set(kept);\n };\n const view: SelectionApi = {\n get current() { return api.current; },\n get: api.get,\n contains: api.contains,\n set,\n add(id) { api.add(id); settle(); },\n remove: api.remove,\n toggle(id) { api.toggle(id); settle(); },\n clear: api.clear,\n applyClick(id, modifiers) { api.applyClick(id, modifiers); settle(); },\n adapterMethods: {\n getSelection: api.adapterMethods.getSelection,\n setSelection: (ids) => api.adapterMethods.setSelection(narrow(ids)),\n },\n };\n views.set(api, { parentOf, view });\n return view;\n}\n"],"mappings":";;;AAIA,IAAM,wBAAQ,IAAI,QAA0E;;;;;;;;AAS5F,SAAgB,mBAAmB,KAAmB,UAA0C;CAC9F,MAAM,SAAS,MAAM,IAAI,GAAG;CAC5B,IAAI,UAAU,OAAO,aAAa,UAAU,OAAO,OAAO;CAC1D,MAAM,UAAU,QAA2B,UAAU,KAAK,QAAQ;CAClE,MAAM,OAAO,QAAwB,IAAI,IAAI,OAAO,GAAG,CAAC;CACxD,MAAM,eAAqB;EACzB,MAAM,MAAM,IAAI,IAAI;EACpB,MAAM,OAAO,OAAO,GAAG;EACvB,IAAI,SAAS,KAAK,IAAI,IAAI,IAAI;CAChC;CACA,MAAM,OAAqB;EACzB,IAAI,UAAU;GAAE,OAAO,IAAI;EAAS;EACpC,KAAK,IAAI;EACT,UAAU,IAAI;EACd;EACA,IAAI,IAAI;GAAE,IAAI,IAAI,EAAE;GAAG,OAAO;EAAG;EACjC,QAAQ,IAAI;EACZ,OAAO,IAAI;GAAE,IAAI,OAAO,EAAE;GAAG,OAAO;EAAG;EACvC,OAAO,IAAI;EACX,WAAW,IAAI,WAAW;GAAE,IAAI,WAAW,IAAI,SAAS;GAAG,OAAO;EAAG;EACrE,gBAAgB;GACd,cAAc,IAAI,eAAe;GACjC,eAAe,QAAQ,IAAI,eAAe,aAAa,OAAO,GAAG,CAAC;EACpE;CACF;CACA,MAAM,IAAI,KAAK;EAAE;EAAU;CAAK,CAAC;CACjC,OAAO;AACT"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/selection/readOnlySelection.ts
|
|
2
2
|
var methodViews = /* @__PURE__ */ new WeakMap();
|
|
3
3
|
var apiViews = /* @__PURE__ */ new WeakMap();
|
|
4
4
|
var ignore = () => {};
|
|
@@ -42,6 +42,5 @@ function readOnlySelection(api) {
|
|
|
42
42
|
return view;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
//#endregion
|
|
46
45
|
export { readOnlySelection };
|
|
47
46
|
//# sourceMappingURL=readOnlySelection.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/selection/selectionTarget.ts
|
|
2
2
|
/** Synthetic id a canvas uses to address the
|
|
3
3
|
* union-AABB target when 2+ real ids are selected. The selection-overlay
|
|
4
4
|
* layer and the affordance hit-tester both resolve it to `ChromeState`'s
|
|
@@ -12,6 +12,5 @@
|
|
|
12
12
|
* `features`). */
|
|
13
13
|
var MULTI_RESIZE_TARGET_ID = "__weasel:multi-selection";
|
|
14
14
|
|
|
15
|
-
//#endregion
|
|
16
15
|
export { MULTI_RESIZE_TARGET_ID };
|
|
17
16
|
//# sourceMappingURL=selectionTarget.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
2
|
import { usePublishSelection } from "@weasel-js/routing/react";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/core/selection/usePublishSceneSelection.ts
|
|
5
5
|
/** The label published beside each selected id, parallel to `ids`; `undefined` when
|
|
6
6
|
* nothing is selected. Without `describe`, every entry is unlabeled. */
|
|
7
7
|
function selectionKindLabels(scene, ids, describe) {
|
|
@@ -22,6 +22,5 @@ function usePublishSceneSelection(scene, ids, describe) {
|
|
|
22
22
|
usePublishSelection(ids, kinds);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
//#endregion
|
|
26
25
|
export { selectionKindLabels, usePublishSceneSelection };
|
|
27
26
|
//# sourceMappingURL=usePublishSceneSelection.js.map
|
|
@@ -3,7 +3,7 @@ import { useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from
|
|
|
3
3
|
import { useLatest } from "@weasel-js/react";
|
|
4
4
|
import { createSelectionStore, intentOf, select } from "@weasel-js/select";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/core/selection/useSelection.ts
|
|
7
7
|
/** The order a store paints its nodes in, when it is a scene and has one. */
|
|
8
8
|
function paintOrderOf(store) {
|
|
9
9
|
const { renderOrder } = store;
|
|
@@ -102,6 +102,5 @@ function useSelection(opts = {}) {
|
|
|
102
102
|
}, [store, optsRef]);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
//#endregion
|
|
106
105
|
export { useSelection };
|
|
107
106
|
//# sourceMappingURL=useSelection.js.map
|
package/dist/core/shapeKinds.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/shapeKinds.ts
|
|
2
2
|
/**
|
|
3
3
|
* Declaration order is the enumeration order of every derived list —
|
|
4
4
|
* `KIT_SHAPE_KINDS`, and through it `defaultNodeRouting` /
|
|
@@ -78,6 +78,5 @@ function kitShapeKindsOf(family) {
|
|
|
78
78
|
return KIT_SHAPE_KINDS.filter((k) => SHAPE_KINDS[k].family === family);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
//#endregion
|
|
82
81
|
export { KIT_SHAPE_KINDS, SHAPE_KINDS, kitShapeKindsOf, shapeKindInfo, shapeKindsWhere };
|
|
83
82
|
//# sourceMappingURL=shapeKinds.js.map
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/stableStringify.ts
|
|
2
2
|
/** JSON with object keys sorted, so two equal values produce one string. */
|
|
3
3
|
function stableStringify(value) {
|
|
4
4
|
return JSON.stringify(value, (_key, v) => v && typeof v === "object" && !Array.isArray(v) ? Object.fromEntries(Object.entries(v).sort(([a], [b]) => a < b ? -1 : 1)) : v);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
//#endregion
|
|
8
7
|
export { stableStringify };
|
|
9
8
|
//# sourceMappingURL=stableStringify.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { clientToWorld } from "../viewport/clientToWorld.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/core/stylus/stylus.ts
|
|
4
4
|
/**
|
|
5
5
|
* Map a 0..1 pressure value to a stroke width.
|
|
6
6
|
*
|
|
@@ -58,6 +58,5 @@ function forEachCoalesced(event, ctx, cb) {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
//#endregion
|
|
62
61
|
export { forEachCoalesced, getStylusData, pressureToWidth };
|
|
63
62
|
//# sourceMappingURL=stylus.js.map
|
|
@@ -2,7 +2,7 @@ import { getStylusData } from "./stylus.js";
|
|
|
2
2
|
import { useEffect, useRef, useState } from "react";
|
|
3
3
|
import { useLatest } from "@weasel-js/react";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/core/stylus/usePointerStylus.ts
|
|
6
6
|
var IDLE = {
|
|
7
7
|
pressure: 0,
|
|
8
8
|
tiltX: 0,
|
|
@@ -73,6 +73,5 @@ function usePointerStylus(target, options = {}) {
|
|
|
73
73
|
return state;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
//#endregion
|
|
77
76
|
export { usePointerStylus };
|
|
78
77
|
//# sourceMappingURL=usePointerStylus.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getPaintKind, listGradientKinds, listPaintKinds, paintKindRegistry } from "./paint/paintKinds.js";
|
|
2
2
|
import { useCallback, useSyncExternalStore } from "react";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/core/usePaintKinds.ts
|
|
5
5
|
/** Every registered paint kind, as {@link listPaintKinds} returns it,
|
|
6
6
|
* re-rendering the caller whenever a kind is registered or removed. */
|
|
7
7
|
function usePaintKinds() {
|
|
@@ -22,6 +22,5 @@ function usePaintKind(kind) {
|
|
|
22
22
|
return useSyncExternalStore(paintKindRegistry.subscribe, read, read);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
//#endregion
|
|
26
25
|
export { useGradientKinds, usePaintKind, usePaintKinds };
|
|
27
26
|
//# sourceMappingURL=usePaintKinds.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/viewport/clampView.ts
|
|
2
2
|
/**
|
|
3
3
|
* Clamp a `View` so the visible world rect stays within `bounds`.
|
|
4
4
|
*
|
|
@@ -35,6 +35,5 @@ function clampView(view, bounds, canvas) {
|
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
//#endregion
|
|
39
38
|
export { clampView };
|
|
40
39
|
//# sourceMappingURL=clampView.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/viewport/clientToWorld.ts
|
|
2
2
|
/**
|
|
3
3
|
* Map a browser client coord pair to world coords.
|
|
4
4
|
*
|
|
@@ -14,6 +14,5 @@ function clientToWorld(clientX, clientY, origin, view) {
|
|
|
14
14
|
return [(clientX - origin.left) / view.scale.x + view.x, (clientY - origin.top) / view.scale.y + view.y];
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
//#endregion
|
|
18
17
|
export { clientToWorld };
|
|
19
18
|
//# sourceMappingURL=clientToWorld.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/viewport/createVelocityTracker.ts
|
|
2
2
|
/** Hook-free velocity tracker. `useVelocityTracker` wraps one of these; the
|
|
3
3
|
* action layer builds its own, because an Action descriptor is a static
|
|
4
4
|
* object and cannot call hooks. */
|
|
@@ -38,6 +38,5 @@ function createVelocityTracker() {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
//#endregion
|
|
42
41
|
export { createVelocityTracker };
|
|
43
42
|
//# sourceMappingURL=createVelocityTracker.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { normalizeZoom } from "./zoomBounds.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/core/viewport/fitToBounds.ts
|
|
4
4
|
/**
|
|
5
5
|
* Compute the largest uniform zoom (px per content-unit) that fits a content
|
|
6
6
|
* rect of `contentW x contentH` (in content units) into a viewport rect of
|
|
@@ -30,6 +30,5 @@ function fitToBounds(viewportW, viewportH, contentW, contentH, paddingPx = 0, cl
|
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
//#endregion
|
|
34
33
|
export { fitToBounds, fitZoom };
|
|
35
34
|
//# sourceMappingURL=fitToBounds.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, normalizeZoom } from "./zoomBounds.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/core/viewport/fitViewToBounds.ts
|
|
4
4
|
/**
|
|
5
5
|
* Compute the target {@link View} that fits `bounds` (world space) inside
|
|
6
6
|
* `viewportDims` (CSS px). The bounds are centered in the viewport with
|
|
@@ -57,6 +57,5 @@ function fitViewToBounds(bounds, viewportDims, currentView, opts = {}) {
|
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
//#endregion
|
|
61
60
|
export { fitViewToBounds };
|
|
62
61
|
//# sourceMappingURL=fitViewToBounds.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/viewport/interpolateView.ts
|
|
2
2
|
/**
|
|
3
3
|
* Per-axis camera curve. Two views that differ in scale agree at exactly one
|
|
4
4
|
* screen point; holding the world point under it fixed is what makes a zoom
|
|
@@ -49,6 +49,5 @@ function interpolateView(from, to) {
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
//#endregion
|
|
53
52
|
export { interpolateView };
|
|
54
53
|
//# sourceMappingURL=interpolateView.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/viewport/parallax.ts
|
|
2
2
|
function asXY(v) {
|
|
3
3
|
return typeof v === "number" ? {
|
|
4
4
|
x: v,
|
|
@@ -139,6 +139,5 @@ function planeMatrix(m) {
|
|
|
139
139
|
];
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
//#endregion
|
|
143
142
|
export { deriveParallaxView, fromPlane, planeMap, planeMatrix, planeToPlane, rectFromPlane, rectToPlane, toPlane };
|
|
144
143
|
//# sourceMappingURL=parallax.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { viewToTransform } from "./view.js";
|
|
2
2
|
import { worldToScreen } from "./viewTransform.js";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/core/viewport/sceneNodeClientRect.ts
|
|
5
5
|
/**
|
|
6
6
|
* Project a scene node's world AABB to client (viewport) coordinates,
|
|
7
7
|
* e.g. to anchor a `Callout` at a canvas-drawn object. Snapshot
|
|
@@ -22,6 +22,5 @@ function sceneNodeClientRect(opts) {
|
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
//#endregion
|
|
26
25
|
export { sceneNodeClientRect };
|
|
27
26
|
//# sourceMappingURL=sceneNodeClientRect.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { multiply, scale } from "@weasel-js/geom";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/core/viewport/screenSlop.ts
|
|
4
4
|
/**
|
|
5
5
|
* Pointer forgiveness measured on screen.
|
|
6
6
|
*
|
|
@@ -51,6 +51,5 @@ function hasSlop(slop) {
|
|
|
51
51
|
return typeof slop === "number" ? slop > 0 : slop.px > 0;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
//#endregion
|
|
55
54
|
export { hasSlop, slopForStrokeHit, widenSlop };
|
|
56
55
|
//# sourceMappingURL=screenSlop.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { fitZoom } from "./fitToBounds.js";
|
|
2
2
|
import { useEffect, useRef } from "react";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/core/viewport/useAutoCenter.ts
|
|
5
5
|
/**
|
|
6
6
|
* Compute zoom and pan that fit `contentW x contentH` (in content units)
|
|
7
7
|
* inside `viewportW x viewportH` (in pixels). `padRatio` is the fraction of
|
|
@@ -41,6 +41,5 @@ function useAutoCenter(width, height, contentW, contentH, setZoom, setPan) {
|
|
|
41
41
|
]);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
//#endregion
|
|
45
44
|
export { computeFitViewport, useAutoCenter };
|
|
46
45
|
//# sourceMappingURL=useAutoCenter.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useDeviceProfile } from "../device/useDeviceProfile.js";
|
|
2
2
|
import { useMemo, useSyncExternalStore } from "react";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/core/viewport/useCanvasSize.ts
|
|
5
5
|
/** Track a container's content-rect size via `ResizeObserver`, and density via
|
|
6
6
|
* the ambient `DeviceProfile`.
|
|
7
7
|
*
|
|
@@ -66,6 +66,5 @@ function useElementSize(containerRef, options) {
|
|
|
66
66
|
return useSyncExternalStore(store.subscribe, store.get, store.get);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
//#endregion
|
|
70
69
|
export { useCanvasSize, useElementSize };
|
|
71
70
|
//# sourceMappingURL=useCanvasSize.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback, useEffect, useRef } from "react";
|
|
2
2
|
import { useVisibleRaf } from "@weasel-js/react";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/core/viewport/useDecayLoop.ts
|
|
5
5
|
/**
|
|
6
6
|
* Fraction of velocity preserved per `'spring'` bounce. 0.5 means each bounce
|
|
7
7
|
* loses half its energy, giving a quick visible settle (typically 2–4 bounces
|
|
@@ -128,6 +128,5 @@ function useDecayLoop() {
|
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
//#endregion
|
|
132
131
|
export { useDecayLoop };
|
|
133
132
|
//# sourceMappingURL=useDecayLoop.js.map
|
|
@@ -5,7 +5,7 @@ import { effectivePose } from "../scene/effectivePose.js";
|
|
|
5
5
|
import { applyToPoint, invert, multiply, poseFrameOf } from "@weasel-js/geom";
|
|
6
6
|
import { useCallback, useInsertionEffect, useRef } from "react";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/core/viewport/useNodeOverlayFrame.ts
|
|
9
9
|
/**
|
|
10
10
|
* `useNodeOverlayFrame` — the coordinate frame a DOM overlay pinned to one
|
|
11
11
|
* scene node needs: the node's world box, the projection from that box's
|
|
@@ -114,6 +114,5 @@ function viewMatrix(view) {
|
|
|
114
114
|
];
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
//#endregion
|
|
118
117
|
export { useNodeOverlayFrame };
|
|
119
118
|
//# sourceMappingURL=useNodeOverlayFrame.js.map
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { createVelocityTracker } from "./createVelocityTracker.js";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/core/viewport/useVelocityTracker.ts
|
|
5
5
|
/** Records recent pointer deltas and reports the current velocity, averaged
|
|
6
6
|
* over the last 100ms — the throw speed a momentum decay starts from. */
|
|
7
7
|
function useVelocityTracker() {
|
|
8
8
|
return useMemo(() => createVelocityTracker(), []);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
//#endregion
|
|
12
11
|
export { useVelocityTracker };
|
|
13
12
|
//# sourceMappingURL=useVelocityTracker.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { normalizeView } from "./view.js";
|
|
2
|
-
import { fitViewToBounds } from "./fitViewToBounds.js";
|
|
3
1
|
import { interpolateView } from "./interpolateView.js";
|
|
2
|
+
import { fitViewToBounds } from "./fitViewToBounds.js";
|
|
3
|
+
import { normalizeView } from "./view.js";
|
|
4
4
|
import { easeOutCubic } from "@weasel-js/geom";
|
|
5
5
|
import { useId, useMemo, useRef } from "react";
|
|
6
6
|
import { useKitSetting, useLatest, usePrefersReducedMotion } from "@weasel-js/react";
|
|
7
7
|
import { useAnimator } from "@weasel-js/animator/react";
|
|
8
8
|
import { createTarget } from "@weasel-js/animator";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/core/viewport/useViewAnimation.ts
|
|
11
11
|
/** Cancel-key prefix. Each hook instance appends its own id, so two runners
|
|
12
12
|
* sharing an animator do not cancel each other. */
|
|
13
13
|
var VIEW_ANIMATION_KEY = "view";
|
|
@@ -177,6 +177,5 @@ function createViewAnimation(key, viewRef, animatorRef, targetRef, writingRef, m
|
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
//#endregion
|
|
181
180
|
export { DEFAULT_VIEW_ANIMATION_MS, VIEW_ANIMATION_KEY, useViewAnimation, useViewAnimationOn, viewAxes };
|
|
182
181
|
//# sourceMappingURL=useViewAnimation.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { normalizeZoom as normalizeZoom$1, warnInvalidView } from "./zoomBounds.js";
|
|
2
2
|
import { meanScale } from "@weasel-js/geom";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/core/viewport/view.ts
|
|
5
5
|
/**
|
|
6
6
|
* Bridge `View` into the legacy `ViewTransform` shape. The two use opposite
|
|
7
7
|
* sign conventions for the translation half: `view.x` is camera position;
|
|
@@ -59,6 +59,5 @@ function finiteTranslation(v) {
|
|
|
59
59
|
return 0;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
//#endregion
|
|
63
62
|
export { normalizeView, sameView, viewToTransform, viewZoom };
|
|
64
63
|
//# sourceMappingURL=view.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/viewport/viewTransform.ts
|
|
2
2
|
/** Project a world-space point to screen-space pixels through a `ViewTransform`. */
|
|
3
3
|
function worldToScreen(worldX, worldY, view) {
|
|
4
4
|
return [view.panX + worldX * view.zoom.x, view.panY + worldY * view.zoom.y];
|
|
@@ -8,6 +8,5 @@ function screenToWorld(screenX, screenY, view) {
|
|
|
8
8
|
return [(screenX - view.panX) / view.zoom.x, (screenY - view.panY) / view.zoom.y];
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
//#endregion
|
|
12
11
|
export { screenToWorld, worldToScreen };
|
|
13
12
|
//# sourceMappingURL=viewTransform.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/viewport/viewportWorldRect.ts
|
|
2
2
|
/**
|
|
3
3
|
* The world-space rectangle a camera shows in a host `size` CSS pixels across.
|
|
4
4
|
*
|
|
@@ -16,6 +16,5 @@ function viewportWorldRect(view, size) {
|
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
//#endregion
|
|
20
19
|
export { viewportWorldRect };
|
|
21
20
|
//# sourceMappingURL=viewportWorldRect.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { zoomAt } from "./zoomAt.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/core/viewport/wheelHandler.ts
|
|
4
4
|
/** Multiplicative zoom applied per 100 px of wheel `deltaY`. */
|
|
5
5
|
var WHEEL_ZOOM_STEP = 1.1;
|
|
6
6
|
/** Zoom multiplier for one wheel sample. Reciprocal in `deltaY`, so scrolling
|
|
@@ -36,6 +36,5 @@ function computeWheelAction(view, input, clamp, opts = {}) {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
//#endregion
|
|
40
39
|
export { WHEEL_ZOOM_STEP, computeWheelAction, wheelPan, wheelZoom, wheelZoomFactor };
|
|
41
40
|
//# sourceMappingURL=wheelHandler.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, normalizeZoom } from "./zoomBounds.js";
|
|
2
1
|
import { normalizeView } from "./view.js";
|
|
2
|
+
import { DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, normalizeZoom } from "./zoomBounds.js";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/core/viewport/zoomAt.ts
|
|
5
5
|
/** Bound a scale's *magnitude*, keeping its direction. `scale.y < 0` is how a
|
|
6
6
|
* `View` spells a y-up camera, so clamping the signed value against positive
|
|
7
7
|
* bounds would flip the axis and collapse the zoom rather than limit it. */
|
|
@@ -54,6 +54,5 @@ function zoomAt(input, anchor, factor, opts) {
|
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
//#endregion
|
|
58
57
|
export { axisZoomFactor, zoomAt };
|
|
59
58
|
//# sourceMappingURL=zoomAt.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ZOOM_FLOOR, normalizeZoom } from "@weasel-js/geom";
|
|
2
2
|
import { isDev } from "@weasel-js/registry";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/core/viewport/zoomBounds.ts
|
|
5
5
|
/**
|
|
6
6
|
* The kit's system-wide zoom clamp, in `View.scale` units (pixels per world
|
|
7
7
|
* unit): `1` is 100%, `0.1` is 10%, `8` is 800%.
|
|
@@ -33,6 +33,5 @@ function warnInvalidView(what) {
|
|
|
33
33
|
console.warn(`[weasel] a view was given ${what} and has been clamped. A view's zoom is always positive and finite, and its position finite; see ZOOM_FLOOR.`);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
//#endregion
|
|
37
36
|
export { DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, ZOOM_FLOOR, normalizeZoom$1 as normalizeZoom, warnInvalidView };
|
|
38
37
|
//# sourceMappingURL=zoomBounds.js.map
|
|
@@ -6,7 +6,7 @@ import { LINE_H, emitFramePanel, emitLayersPanel, emitTextPanel, rectPath as rec
|
|
|
6
6
|
import { textCommandFromRuns } from "@weasel-js/renderer";
|
|
7
7
|
import { PATH_L, PATH_M, PATH_Z } from "@weasel-js/geom";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// src/debug/createDebugOverlayLayer.ts
|
|
10
10
|
var DEBUG_OVERLAY_ID = "debug-overlay";
|
|
11
11
|
var FPS_WINDOW = 60;
|
|
12
12
|
/**
|
|
@@ -346,6 +346,5 @@ function segment(x0, y0, x1, y1) {
|
|
|
346
346
|
};
|
|
347
347
|
}
|
|
348
348
|
|
|
349
|
-
//#endregion
|
|
350
349
|
export { DEBUG_OVERLAY_ID, buildDebugOverlayCommands, createDebugOverlayLayer };
|
|
351
350
|
//# sourceMappingURL=createDebugOverlayLayer.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/debug/createDebugSink.ts
|
|
2
2
|
/**
|
|
3
3
|
* Build a sink that stores recorded primitives in arrays keyed by feature.
|
|
4
4
|
* A `recordX` call no-ops when its flag in `config` is off, so callers can
|
|
@@ -100,6 +100,5 @@ function createDebugSink(config) {
|
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
//#endregion
|
|
104
103
|
export { createDebugSink };
|
|
105
104
|
//# sourceMappingURL=createDebugSink.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/debug/defaultTheme.ts
|
|
2
2
|
/**
|
|
3
3
|
* Default colors per the spec's Visual Style section. High contrast against
|
|
4
4
|
* the demo's dark backdrop. Override by passing `theme: { ... }` on
|
|
@@ -40,6 +40,5 @@ var DEFAULT_DEBUG_STROKES = {
|
|
|
40
40
|
highlight: { width: 2 }
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
-
//#endregion
|
|
44
43
|
export { DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME };
|
|
45
44
|
//# sourceMappingURL=defaultTheme.js.map
|
package/dist/debug/features.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/debug/features.ts
|
|
2
2
|
/** Every debug-overlay feature a `DebugConfig` flag turns on, in the order a list of them shows. */
|
|
3
3
|
var DEBUG_FEATURES = [
|
|
4
4
|
"hitboxes",
|
|
@@ -12,6 +12,5 @@ var DEBUG_FEATURES = [
|
|
|
12
12
|
"viewport"
|
|
13
13
|
];
|
|
14
14
|
|
|
15
|
-
//#endregion
|
|
16
15
|
export { DEBUG_FEATURES };
|
|
17
16
|
//# sourceMappingURL=features.js.map
|