@weasel-js/core 1.14.2 → 1.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +251 -0
- package/dist/WeaselProvider.js +4 -5
- package/dist/affordances/composeAffordanceLayer.js +1 -2
- package/dist/affordances/cornerResize.js +4 -5
- package/dist/affordances/hitAffordanceRegions.js +1 -2
- package/dist/affordances/pathAnchors.js +1 -3
- package/dist/affordances/pathAnchors.js.map +1 -1
- package/dist/affordances/rotateCursor.js +1 -2
- package/dist/affordances/rotationHandle.js +2 -3
- package/dist/animation/behaviors/coast.js +1 -2
- package/dist/animation/behaviors/coastByWrite.js +2 -3
- package/dist/animation/behaviors/coastOnTargets.js +2 -3
- package/dist/animation/behaviors/momentum.js +1 -2
- package/dist/animation/clipTargets.js +1 -2
- package/dist/animation/departures.js +2 -3
- package/dist/animation/poseHelpers.js +2 -3
- package/dist/animation/poseTarget.js +2 -3
- package/dist/animation/poseTransition.js +1 -2
- package/dist/animation/reflow.js +2 -3
- package/dist/animation/rewind.js +1 -2
- package/dist/animation/rig/bindRig.js +2 -3
- package/dist/animation/rig/rigNode.js +1 -2
- package/dist/animation/rig/rigSeat.js +1 -2
- package/dist/animation/rig/skinBinding.js +1 -2
- package/dist/animation/rig/useRig.js +2 -3
- package/dist/animation/wrappers/animateLifecycle.js +1 -2
- package/dist/animation/wrappers/animateOnSetPose.js +1 -2
- package/dist/animation/wrappers/instantPose.js +1 -2
- package/dist/animation/writtenPoseTarget.js +1 -2
- package/dist/barrel/interactions.js +2 -1
- package/dist/barrel/paths.js +1 -1
- package/dist/barrel/renderer.js +2 -2
- package/dist/barrel/routing.js +6 -4
- package/dist/barrel/scene.js +2 -2
- package/dist/barrel/text.js +5 -3
- package/dist/canvas/Canvas.js +10 -7
- package/dist/canvas/Canvas.js.map +1 -1
- package/dist/canvas/CanvasView.js +6 -7
- package/dist/canvas/CursorCoordsHud.js +2 -3
- package/dist/canvas/DrawCanvas.js +8 -5
- package/dist/canvas/DrawCanvas.js.map +1 -1
- package/dist/canvas/GestureReason.js +1 -2
- package/dist/canvas/GestureReason.module.js +1 -2
- package/dist/canvas/LeanSceneCanvas.js +2 -3
- package/dist/canvas/ModalityHud.js +2 -3
- package/dist/canvas/NodeShape.js +3 -4
- package/dist/canvas/PickHud.js +2 -3
- package/dist/canvas/SceneCanvas/ActionsProviderIfRoot.js +1 -2
- package/dist/canvas/SceneCanvas/CanvasKitProviders.js +3 -4
- package/dist/canvas/SceneCanvas/DepRegistryProviderIfRoot.js +1 -2
- package/dist/canvas/SceneCanvas/DevHuds.js +1 -2
- package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js +1 -2
- package/dist/canvas/SceneCanvas/SceneCanvasInput.js +8 -5
- package/dist/canvas/SceneCanvas/SceneCanvasInput.js.map +1 -1
- package/dist/canvas/SceneCanvas/SurfaceDeclarations.js +1 -2
- package/dist/canvas/SceneCanvas/brushOverlay.js +1 -2
- package/dist/canvas/SceneCanvas/builtinToolSets.js +7 -5
- package/dist/canvas/SceneCanvas/builtinToolSets.js.map +1 -1
- package/dist/canvas/SceneCanvas/canvasPassThrough.js +1 -2
- package/dist/canvas/SceneCanvas/contributionFrameHooks.js +1 -2
- package/dist/canvas/SceneCanvas/coordTrace.js +1 -2
- package/dist/canvas/SceneCanvas/defaultNodeProperties.js +4 -5
- package/dist/canvas/SceneCanvas/defaultNodeRouting.js +1 -2
- package/dist/canvas/SceneCanvas/defaultTextEditor.js +4 -5
- package/dist/canvas/SceneCanvas/describePresets.js +1 -2
- package/dist/canvas/SceneCanvas/dispatcherGestureBounds.js +1 -2
- package/dist/canvas/SceneCanvas/features.js +1 -2
- package/dist/canvas/SceneCanvas/insertPreviewCommands.js +1 -2
- package/dist/canvas/SceneCanvas/mergeLayers.js +1 -2
- package/dist/canvas/SceneCanvas/namedPresets.js +5 -6
- package/dist/canvas/SceneCanvas/poseGeometry.js +1 -2
- package/dist/canvas/SceneCanvas/poseRegistrars.js +1 -2
- package/dist/canvas/SceneCanvas/presets/arrange.js +2 -3
- package/dist/canvas/SceneCanvas/presets/baseline.js +1 -2
- package/dist/canvas/SceneCanvas/presets/chrome.js +1 -2
- package/dist/canvas/SceneCanvas/presets/composites.js +1 -2
- package/dist/canvas/SceneCanvas/presets/edit.js +4 -5
- package/dist/canvas/SceneCanvas/presets/ingest.js +1 -2
- package/dist/canvas/SceneCanvas/presets/paths.js +9 -10
- package/dist/canvas/SceneCanvas/presets/paths.js.map +1 -1
- package/dist/canvas/SceneCanvas/presets/select.js +1 -2
- package/dist/canvas/SceneCanvas/presets/toolDriven.js +2 -3
- package/dist/canvas/SceneCanvas/presets/tools.js +1 -2
- package/dist/canvas/SceneCanvas/presets/transform.js +2 -3
- package/dist/canvas/SceneCanvas/presets/view.js +2 -3
- package/dist/canvas/SceneCanvas/props.js +1 -2
- package/dist/canvas/SceneCanvas/scenePointQuery.js +2 -3
- package/dist/canvas/SceneCanvas/shapeGeneratorProperties.js +2 -3
- package/dist/canvas/SceneCanvas/shapeGeneratorProperties.js.map +1 -1
- package/dist/canvas/SceneCanvas/toolRegistry.js +2 -3
- package/dist/canvas/SceneCanvas/useActionTunings.js +1 -2
- package/dist/canvas/SceneCanvas/useActionsPropResolver.js +1 -2
- package/dist/canvas/SceneCanvas/useBakedScene.js +2 -3
- package/dist/canvas/SceneCanvas/useBuiltinShapeTools.js +7 -8
- package/dist/canvas/SceneCanvas/useBuiltinTools.js +3 -2
- package/dist/canvas/SceneCanvas/useBuiltinTools.js.map +1 -1
- package/dist/canvas/SceneCanvas/useCanvasCamera.js +2 -3
- package/dist/canvas/SceneCanvas/useCanvasDevtoolsRoot.js +1 -2
- package/dist/canvas/SceneCanvas/useCanvasDispatcher.js +1 -2
- package/dist/canvas/SceneCanvas/useCanvasSelection.js +8 -6
- package/dist/canvas/SceneCanvas/useCanvasSelection.js.map +1 -1
- package/dist/canvas/SceneCanvas/useCanvasTools.js +2 -3
- package/dist/canvas/SceneCanvas/useChromeAffordances.js +2 -3
- package/dist/canvas/SceneCanvas/useContributionRoles.js +3 -2
- package/dist/canvas/SceneCanvas/useContributionRoles.js.map +1 -1
- package/dist/canvas/SceneCanvas/useDepartureGhostLayer.js +4 -5
- package/dist/canvas/SceneCanvas/useDispatcherOverlayLayer.js +2 -3
- package/dist/canvas/SceneCanvas/useHeldModifiers.js +1 -2
- package/dist/canvas/SceneCanvas/useMagnificationCheck.js +41 -0
- package/dist/canvas/SceneCanvas/useMagnificationCheck.js.map +1 -0
- package/dist/canvas/SceneCanvas/useNodeAtPoint.js +1 -2
- package/dist/canvas/SceneCanvas/useNodeKinds.js +2 -3
- package/dist/canvas/SceneCanvas/usePreviewGhostLayer.js +10 -11
- package/dist/canvas/SceneCanvas/useSceneCanvasHandle.js +1 -2
- package/dist/canvas/SceneCanvas/useSceneCanvasLayers.js +6 -7
- package/dist/canvas/SceneCanvas/useSceneCanvasPathEdit.js +1 -2
- package/dist/canvas/SceneCanvas/useSceneCanvasTools.js +1 -2
- package/dist/canvas/SceneCanvas/useSceneChrome.js +22 -11
- package/dist/canvas/SceneCanvas/useSceneChrome.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneGestureDispatcher.js +6 -7
- package/dist/canvas/SceneCanvas/useScenePicking.js +5 -6
- package/dist/canvas/SceneCanvas/useSceneRedrawSources.js +1 -2
- package/dist/canvas/SceneCanvas/useSceneSelectTool.js +7 -8
- package/dist/canvas/SceneCanvas/useSceneSlotLayers.js +2 -3
- package/dist/canvas/SceneCanvas/useSceneStandardActions.js +28 -17
- package/dist/canvas/SceneCanvas/useSceneStandardActions.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSelectionOverlayLayer.js +2 -3
- package/dist/canvas/SceneCanvas/useSurfaceRouting.js +1 -2
- package/dist/canvas/SceneCanvas/useSurfaceViewInputs.js +1 -2
- package/dist/canvas/SceneCanvas/useToolKeybindings.js +1 -2
- package/dist/canvas/SceneCanvas/useViewportActions.js +3 -4
- package/dist/canvas/SceneCanvas/worldPointAt.js +1 -2
- package/dist/canvas/SceneCanvas.js +22 -20
- package/dist/canvas/SceneCanvas.js.map +1 -1
- package/dist/canvas/SceneViewCanvas.js +7 -4
- package/dist/canvas/SceneViewCanvas.js.map +1 -1
- package/dist/canvas/SurfaceCanvas.js +1 -2
- package/dist/canvas/ViewMarker.js +1 -2
- package/dist/canvas/accentColor.js +1 -2
- package/dist/canvas/adapterDerivedPath.js +2 -3
- package/dist/canvas/adapterPickSource.js +1 -2
- package/dist/canvas/affordanceAt.js +2 -4
- package/dist/canvas/affordanceAt.js.map +1 -1
- package/dist/canvas/buildSceneLayer.js +4 -5
- package/dist/canvas/buildSceneTree.js +4 -5
- package/dist/canvas/canvasRenderer.js +1 -2
- package/dist/canvas/colorOverrides.js +1 -2
- package/dist/canvas/contextAttributes.js +1 -2
- package/dist/canvas/copiesAbove.js +1 -2
- package/dist/canvas/defaultDrawOne.js +1 -2
- package/dist/canvas/deps/areaSelect.js +5 -3
- package/dist/canvas/deps/areaSelect.js.map +1 -1
- package/dist/canvas/deps/booleans.js +5 -6
- package/dist/canvas/deps/changes.js +1 -2
- package/dist/canvas/deps/chromeRules.js +36 -0
- package/dist/canvas/deps/chromeRules.js.map +1 -0
- package/dist/canvas/deps/debug.js +1 -2
- package/dist/canvas/deps/dispatchSources.js +1 -2
- package/dist/canvas/deps/dispatcher.js +1 -2
- package/dist/canvas/deps/editAnchors.js +3 -10
- package/dist/canvas/deps/editAnchors.js.map +1 -1
- package/dist/canvas/deps/enteredGroup.js +1 -2
- package/dist/canvas/deps/geometryProjection.js +1 -2
- package/dist/canvas/deps/hitTestArea.js +6 -5
- package/dist/canvas/deps/hitTestArea.js.map +1 -1
- package/dist/canvas/deps/ingestion.js +1 -2
- package/dist/canvas/deps/insert.js +3 -4
- package/dist/canvas/deps/insertSite.js +3 -4
- package/dist/canvas/deps/kitSettings.js +1 -2
- package/dist/canvas/deps/lassoSelect.js +5 -3
- package/dist/canvas/deps/lassoSelect.js.map +1 -1
- package/dist/canvas/deps/layout.js +1 -2
- package/dist/canvas/deps/modeDefaultTool.js +22 -0
- package/dist/canvas/deps/modeDefaultTool.js.map +1 -0
- package/dist/canvas/deps/nodeAtPoint.js +1 -2
- package/dist/canvas/deps/pathEditCommits.js +3 -4
- package/dist/canvas/deps/pathLeaf.js +1 -2
- package/dist/canvas/deps/pathLeafDeps.js +2 -3
- package/dist/canvas/deps/poseDescriptor.js +1 -2
- package/dist/canvas/deps/previewPaths.js +1 -2
- package/dist/canvas/deps/resizePolicy.js +1 -2
- package/dist/canvas/deps/selectionSnapshot.js +22 -0
- package/dist/canvas/deps/selectionSnapshot.js.map +1 -0
- package/dist/canvas/deps/slice.js +5 -6
- package/dist/canvas/deps/snap.js +4 -4
- package/dist/canvas/deps/snap.js.map +1 -1
- package/dist/canvas/deps/surface.js +1 -2
- package/dist/canvas/deps/textEdit.js +1 -2
- package/dist/canvas/deps/transformFollowers.js +1 -2
- package/dist/canvas/deps/view.js +1 -2
- package/dist/canvas/derivedPath.js +6 -7
- package/dist/canvas/doubleClickTarget.js +1 -2
- package/dist/canvas/drawEnvelope.js +1 -2
- package/dist/canvas/drawnBounds.js +4 -5
- package/dist/canvas/getNodeAtPoint.js +1 -2
- package/dist/canvas/hostAnchor.js +1 -2
- package/dist/canvas/hud.module.js +1 -2
- package/dist/canvas/inheritedPaints.js +1 -2
- package/dist/canvas/insertPreviewExtent.js +1 -2
- package/dist/canvas/kitRequirements.js +1 -2
- package/dist/canvas/layerHover.js +1 -2
- package/dist/canvas/layerOrder.js +1 -2
- package/dist/canvas/layerSlots.js +1 -2
- package/dist/canvas/mountedCanvases.js +1 -2
- package/dist/canvas/nodeShapes/derivedPainter.js +2 -3
- package/dist/canvas/nodeShapes/imagePainter.js +1 -2
- package/dist/canvas/nodeShapes/measurePainter.js +2 -3
- package/dist/canvas/nodeShapes/memo.js +1 -2
- package/dist/canvas/nodeShapes/nodePaint.js +1 -2
- package/dist/canvas/nodeShapes/pathPainter.js +3 -4
- package/dist/canvas/nodeShapes/poseBox.js +1 -2
- package/dist/canvas/nodeShapes/rectFallbackPainter.js +1 -2
- package/dist/canvas/nodeShapes/shapePainter.js +2 -3
- package/dist/canvas/nodeShapes/strokedBounds.js +1 -2
- package/dist/canvas/nodeShapes/textPainter.js +1 -2
- package/dist/canvas/overChildren.js +1 -2
- package/dist/canvas/overlayRoleStrokes.js +1 -2
- package/dist/canvas/ownClip.js +1 -2
- package/dist/canvas/paintCull.js +1 -2
- package/dist/canvas/paintedCursorLayer.js +1 -2
- package/dist/canvas/pathOverlay.js +1 -2
- package/dist/canvas/pickIndex/nodeBroadBox.js +3 -4
- package/dist/canvas/pickIndex/scenePickIndex.js +3 -4
- package/dist/canvas/pickReach.js +13 -10
- package/dist/canvas/pickReach.js.map +1 -1
- package/dist/canvas/pickWalk.js +9 -8
- package/dist/canvas/pickWalk.js.map +1 -1
- package/dist/canvas/planeClips.js +1 -2
- package/dist/canvas/poseRotation.js +1 -2
- package/dist/canvas/publishPreviews.js +1 -2
- package/dist/canvas/rasterReadback.js +1 -2
- package/dist/canvas/rasterToPng.js +1 -2
- package/dist/canvas/renderDebugSnapshot.js +1 -2
- package/dist/canvas/renderNeeds.js +1 -2
- package/dist/canvas/renderSceneToPixels.js +5 -6
- package/dist/canvas/sceneAdapter.js +37 -27
- package/dist/canvas/sceneAdapter.js.map +1 -1
- package/dist/canvas/sceneClipboard.js +19 -7
- package/dist/canvas/sceneClipboard.js.map +1 -1
- package/dist/canvas/sceneLayerPaint.js +1 -2
- package/dist/canvas/scenePickReads.js +1 -2
- package/dist/canvas/scenePickSource.js +7 -8
- package/dist/canvas/scenePickSource.js.map +1 -1
- package/dist/canvas/sceneSlotWiring.js +2 -3
- package/dist/canvas/sceneViewRender.js +5 -6
- package/dist/canvas/shownNodes.js +1 -2
- package/dist/canvas/slopsDebugLayer.js +1 -2
- package/dist/canvas/surfaceContribution.js +1 -2
- package/dist/canvas/useCanvasElements.js +1 -2
- package/dist/canvas/useCanvasHandle.js +1 -2
- package/dist/canvas/useCanvasPaint.js +2 -3
- package/dist/canvas/useCanvasRenderer.js +1 -2
- package/dist/canvas/useCanvasSurface.js +22 -5
- package/dist/canvas/useCanvasSurface.js.map +1 -1
- package/dist/canvas/useCanvasView.js +2 -3
- package/dist/canvas/useClientToWorld.js +1 -2
- package/dist/canvas/useExtraLayers.js +1 -2
- package/dist/canvas/useFrameLoop.js +7 -9
- package/dist/canvas/useFrameLoop.js.map +1 -1
- package/dist/canvas/useHitObserver.js +1 -2
- package/dist/canvas/useHostAnchor.js +1 -2
- package/dist/canvas/useInFlightBounds.js +6 -6
- package/dist/canvas/useInFlightBounds.js.map +1 -1
- package/dist/canvas/useLateContentRedraw.js +1 -2
- package/dist/canvas/useLayerStack.js +2 -3
- package/dist/canvas/usePaintedCursor.js +1 -2
- package/dist/canvas/useRedrawOn.js +1 -2
- package/dist/canvas/useSceneAdapter.js +1 -2
- package/dist/canvas/useSceneLayerList.js +1 -2
- package/dist/canvas/useSurfaceInput.js +1 -2
- package/dist/canvas/useSurfaceSize.js +5 -5
- package/dist/canvas/useSurfaceSize.js.map +1 -1
- package/dist/canvas/useToolCursor.js +1 -2
- package/dist/canvas/useViewAim.js +2 -3
- package/dist/canvas/useViewHelpers.js +5 -4
- package/dist/canvas/useViewHelpers.js.map +1 -1
- package/dist/canvas/useViewLayerGate.js +1 -2
- package/dist/canvas/useViewNesting.js +1 -2
- package/dist/canvas/useViewRegistrySurface.js +1 -2
- package/dist/canvas/viewInputs.js +1 -2
- package/dist/canvas/viewMarkers.js +1 -2
- package/dist/canvas/viewRegistry.js +1 -2
- package/dist/canvas/viewSnap.js +1 -2
- package/dist/canvas/watchElementMove.js +1 -2
- package/dist/canvas/wrapNodeOutput.js +1 -2
- package/dist/core/adapters/testing/rootsTree.js +1 -2
- package/dist/core/applyOps.js +1 -2
- package/dist/core/device/targets.js +1 -2
- package/dist/core/device/useDeviceProfile.js +1 -2
- package/dist/core/device/useTargetBasePx.js +1 -2
- package/dist/core/device/watchDevicePixelRatio.js +1 -2
- package/dist/core/geometry/autoPoseDescriptor.js +2 -3
- package/dist/core/geometry/booleanOfPaths.js +1 -2
- package/dist/core/geometry/inkExtents.js +1 -2
- package/dist/core/geometry/pathPoseDescriptor.js +1 -2
- package/dist/core/geometry/poseDescriptor.js +1 -2
- package/dist/core/geometry/regionHit.js +36 -18
- package/dist/core/geometry/regionHit.js.map +1 -1
- package/dist/core/geometry/targetFrame.js +1 -2
- package/dist/core/geometry/unionBounds.js +1 -2
- package/dist/core/layers/backgroundFill.js +1 -2
- package/dist/core/layers/children.js +1 -2
- package/dist/core/layers/gateLayer.js +1 -2
- package/dist/core/layers/layerGroup.js +1 -2
- package/dist/core/layers/redrawSource.js +1 -2
- package/dist/core/layers/render.js +1 -2
- package/dist/core/layers/retain.js +1 -2
- package/dist/core/ops/arrange.js +1 -2
- package/dist/core/ops/create.js +2 -3
- package/dist/core/ops/createHistory.js +2 -3
- package/dist/core/ops/delete.js +2 -3
- package/dist/core/ops/nodeFlags.js +1 -2
- package/dist/core/ops/registry.js +1 -2
- package/dist/core/ops/reorder/algorithms.js +1 -2
- package/dist/core/ops/reorder/index.js +1 -2
- package/dist/core/ops/reorder/setChildOrder.js +1 -2
- package/dist/core/ops/reparent.js +1 -2
- package/dist/core/ops/select.js +1 -2
- package/dist/core/ops/setData.js +1 -2
- package/dist/core/ops/setDependsOn.js +1 -2
- package/dist/core/ops/setLayer.js +1 -2
- package/dist/core/ops/setLayout.js +1 -2
- package/dist/core/ops/setPath.js +1 -2
- package/dist/core/ops/setText.js +1 -2
- package/dist/core/ops/slot.js +1 -2
- package/dist/core/ops/transform.js +1 -2
- package/dist/core/ops/writtenBy.js +1 -2
- package/dist/core/pages/fitViewToPage.js +1 -2
- package/dist/core/pages/pageEdits.js +3 -4
- package/dist/core/pages/pages.js +1 -2
- package/dist/core/pages/pages.js.map +1 -1
- package/dist/core/pages/pagesLayer.js +1 -2
- package/dist/core/paint/meshKind.js +1 -2
- package/dist/core/paint/meshKindLazy.js +9 -18
- package/dist/core/paint/meshKindLazy.js.map +1 -1
- package/dist/core/paint/paintKindEntry.js +1 -2
- package/dist/core/paint/paintKinds.js +1 -2
- package/dist/core/paint/registerMesh.js +1 -2
- package/dist/core/scene/NodeProperties.js +1 -2
- package/dist/core/scene/NodeRouting.js +1 -2
- package/dist/core/scene/annotation.js +1 -2
- package/dist/core/scene/appliedLog.js +1 -2
- package/dist/core/scene/arrivalWindow.js +2 -3
- package/dist/core/scene/arrivals.js +1 -2
- package/dist/core/scene/booleanGroup.js +1 -2
- package/dist/core/scene/booleanOfChildren.js +1 -2
- package/dist/core/scene/boundOps.js +1 -2
- package/dist/core/scene/carryDescendants.js +2 -3
- package/dist/core/scene/clipNothing.js +1 -2
- package/dist/core/scene/composeFrame.js +1 -2
- package/dist/core/scene/composePose.js +1 -2
- package/dist/core/scene/declaredFieldSetters.js +1 -2
- package/dist/core/scene/depFrame.js +1 -2
- package/dist/core/scene/depMemo.js +1 -2
- package/dist/core/scene/dependents.js +1 -2
- package/dist/core/scene/derivedParts.js +1 -2
- package/dist/core/scene/derivedPath.js +2 -3
- package/dist/core/scene/docValues.js +1 -2
- package/dist/core/scene/documentOf.js +1 -2
- package/dist/core/scene/editMode.js +5 -3
- package/dist/core/scene/editMode.js.map +1 -1
- package/dist/core/scene/editPass.js +1 -2
- package/dist/core/scene/effectivePose.js +3 -4
- package/dist/core/scene/fieldEdits.js +1 -2
- package/dist/core/scene/fontReads.js +1 -2
- package/dist/core/scene/historyFacade.js +8 -52
- package/dist/core/scene/historyFacade.js.map +1 -1
- package/dist/core/scene/historyForm.js +1 -2
- package/dist/core/scene/inheritedPaint.js +1 -2
- package/dist/core/scene/kitOps.js +16 -15
- package/dist/core/scene/kitOps.js.map +1 -1
- package/dist/core/scene/kitRegistry.js +2 -3
- package/dist/core/scene/layerOps.js +1 -2
- package/dist/core/scene/layerStack.js +1 -2
- package/dist/core/scene/layoutPass.js +4 -5
- package/dist/core/scene/lockGuard.js +1 -2
- package/dist/core/scene/minSize.js +1 -2
- package/dist/core/scene/nestedHit.js +1 -2
- package/dist/core/scene/nodeAsShown.js +1 -2
- package/dist/core/scene/nodeFlags.js +1 -2
- package/dist/core/scene/nodeFnFields.js +1 -2
- package/dist/core/scene/nodeGates.js +3 -4
- package/dist/core/scene/nodeGates.js.map +1 -1
- package/dist/core/scene/nodeMemo.js +1 -2
- package/dist/core/scene/nodeStore.js +2 -3
- package/dist/core/scene/notifier.js +1 -2
- package/dist/core/scene/opTable.js +9 -10
- package/dist/core/scene/opTable.js.map +1 -1
- package/dist/core/scene/outerOps.js +3 -4
- package/dist/core/scene/outerOps.js.map +1 -1
- package/dist/core/scene/pathEffects/blend.js +1 -2
- package/dist/core/scene/pathEffects/derive.js +2 -3
- package/dist/core/scene/pathEffects/effects.js +1 -2
- package/dist/core/scene/pathEffects/foundHidden.js +1 -2
- package/dist/core/scene/pathEffects/textAlong.js +1 -2
- package/dist/core/scene/pathEffects/textAlongBands.js +1 -2
- package/dist/core/scene/plyStacks.js +1 -2
- package/dist/core/scene/poseFeed.js +1 -2
- package/dist/core/scene/poseHold.js +1 -2
- package/dist/core/scene/poseOverrides.js +1 -2
- package/dist/core/scene/posePlies.js +1 -2
- package/dist/core/scene/poseRemovals.js +1 -2
- package/dist/core/scene/poseSnapshot.js +1 -2
- package/dist/core/scene/poseWrites.js +17 -17
- package/dist/core/scene/poseWrites.js.map +1 -1
- package/dist/core/scene/reconcileSpecs.js +26 -3
- package/dist/core/scene/reconcileSpecs.js.map +1 -1
- package/dist/core/scene/recorder.js +1 -2
- package/dist/core/scene/renderOrder.js +1 -2
- package/dist/core/scene/sameValue.js +1 -2
- package/dist/core/scene/scene.js +11 -12
- package/dist/core/scene/scene.js.map +1 -1
- package/dist/core/scene/sceneChanges.js +1 -2
- package/dist/core/scene/sceneEdits.js +1 -2
- package/dist/core/scene/sceneJournals.js +77 -0
- package/dist/core/scene/sceneJournals.js.map +1 -0
- package/dist/core/scene/sceneMutators.js +2 -3
- package/dist/core/scene/scenePoseAdapter.js +1 -2
- package/dist/core/scene/sceneRecording.js +4 -4
- package/dist/core/scene/sceneRecording.js.map +1 -1
- package/dist/core/scene/sceneSelection.js +8 -5
- package/dist/core/scene/sceneSelection.js.map +1 -1
- package/dist/core/scene/sceneState.js +3 -4
- package/dist/core/scene/scrollOffsets.js +1 -2
- package/dist/core/scene/serialization.js +2 -3
- package/dist/core/scene/staleReplay.js +1 -2
- package/dist/core/scene/statedFields.js +1 -2
- package/dist/core/scene/strategyView.js +1 -2
- package/dist/core/scene/treeEdits.js +2 -3
- package/dist/core/scene/treeOrder.js +1 -2
- package/dist/core/scene/treeReads.js +1 -2
- package/dist/core/scene/treeShape.js +1 -2
- package/dist/core/scene/types.js +1 -2
- package/dist/core/scene/types.js.map +1 -1
- package/dist/core/scene/unionOfChildren.js +1 -2
- package/dist/core/scene/unitScopes.js +20 -4
- package/dist/core/scene/unitScopes.js.map +1 -1
- package/dist/core/scene/useScene.js +2 -3
- package/dist/core/scene/worldSave.js +2 -3
- package/dist/core/selection/chromeState.js +1 -2
- package/dist/core/selection/outermostSelection.js +56 -0
- package/dist/core/selection/outermostSelection.js.map +1 -0
- package/dist/core/selection/readOnlySelection.js +1 -2
- package/dist/core/selection/selectionTarget.js +1 -2
- package/dist/core/selection/usePublishSceneSelection.js +1 -2
- package/dist/core/selection/useSelection.js +1 -2
- package/dist/core/shapeKinds.js +1 -2
- package/dist/core/stableStringify.js +1 -2
- package/dist/core/stylus/stylus.js +1 -2
- package/dist/core/stylus/usePointerStylus.js +1 -2
- package/dist/core/usePaintKinds.js +1 -2
- package/dist/core/viewport/clampView.js +1 -2
- package/dist/core/viewport/clientToWorld.js +1 -2
- package/dist/core/viewport/createVelocityTracker.js +1 -2
- package/dist/core/viewport/fitToBounds.js +1 -2
- package/dist/core/viewport/fitViewToBounds.js +1 -2
- package/dist/core/viewport/interpolateView.js +1 -2
- package/dist/core/viewport/parallax.js +1 -2
- package/dist/core/viewport/sceneNodeClientRect.js +1 -2
- package/dist/core/viewport/screenSlop.js +1 -2
- package/dist/core/viewport/useAutoCenter.js +1 -2
- package/dist/core/viewport/useCanvasSize.js +48 -28
- package/dist/core/viewport/useCanvasSize.js.map +1 -1
- package/dist/core/viewport/useDecayLoop.js +1 -2
- package/dist/core/viewport/useNodeOverlayFrame.js +1 -2
- package/dist/core/viewport/useVelocityTracker.js +1 -2
- package/dist/core/viewport/useViewAnimation.js +3 -4
- package/dist/core/viewport/view.js +1 -2
- package/dist/core/viewport/viewTransform.js +1 -2
- package/dist/core/viewport/viewportWorldRect.js +1 -2
- package/dist/core/viewport/wheelHandler.js +1 -2
- package/dist/core/viewport/zoomAt.js +2 -3
- package/dist/core/viewport/zoomBounds.js +1 -2
- package/dist/debug/createDebugOverlayLayer.js +1 -2
- package/dist/debug/createDebugSink.js +1 -2
- package/dist/debug/defaultTheme.js +1 -2
- package/dist/debug/features.js +1 -2
- package/dist/debug/frameStats.js +1 -2
- package/dist/debug/overlayPanels.js +1 -2
- package/dist/debug/parseDebugFlags.js +1 -2
- package/dist/debug/useDebugSink.js +2 -3
- package/dist/{depSchema-DD9H89gX.d.ts → depSchema-C7a_OMt-.d.ts} +101 -65
- package/dist/devtools/handlers.js +1 -2
- package/dist/devtools/history.js +1 -2
- package/dist/devtools/hook.js +1 -2
- package/dist/devtools/label.js +1 -2
- package/dist/devtools/notices.js +1 -2
- package/dist/devtools/protocol.js +1 -2
- package/dist/devtools/registry.js +1 -2
- package/dist/devtools/root.js +1 -2
- package/dist/devtools/serialize.js +1 -2
- package/dist/devtools/session.js +2 -3
- package/dist/devtools/transport.js +1 -2
- package/dist/devtools/useDevtoolsRoot.js +1 -2
- package/dist/devtools-protocol.d.ts +1 -1
- package/dist/devtools-protocol.js +2 -2
- package/dist/devtools.d.ts +1 -1
- package/dist/devtools.js +1 -2
- package/dist/domains/chrome-caps/buildChromeCtx.js +1 -2
- package/dist/domains/chrome-caps/conditions.js +1 -2
- package/dist/domains/chrome-caps/defaults.js +1 -2
- package/dist/domains/chrome-caps/resolve.js +3 -3
- package/dist/domains/chrome-caps/resolve.js.map +1 -1
- package/dist/domains/chrome-caps/useChromeCaps.js +5 -4
- package/dist/domains/chrome-caps/useChromeCaps.js.map +1 -1
- package/dist/domains/chrome-caps/useHoverTracking.js +1 -2
- package/dist/domains/ingestion/contentHandlers.js +1 -2
- package/dist/domains/ingestion/ghost.js +2 -3
- package/dist/domains/ingestion/imageHandler.js +1 -2
- package/dist/domains/ingestion/kitHandlers.js +2 -3
- package/dist/domains/ingestion/openFilePicker.js +1 -2
- package/dist/domains/ingestion/placement.js +1 -2
- package/dist/domains/ingestion/svgHandler.js +1 -2
- package/dist/domains/ingestion/textHandler.js +1 -2
- package/dist/domains/ingestion/useCanvasIngestion.js +1 -2
- package/dist/domains/ingestion/weaselJsonHandler.js +2 -3
- package/dist/domains/longPress/longPressFeedback.js +1 -2
- package/dist/domains/measure/actionIds.js +1 -2
- package/dist/domains/measure/measureCommands.js +6 -7
- package/dist/domains/measure/measureContribution.js +3 -4
- package/dist/domains/measure/measureEdits.js +3 -4
- package/dist/domains/measure/measureGestures.js +2 -3
- package/dist/domains/measure/measureHit.js +3 -4
- package/dist/domains/measure/measureLayer.js +3 -4
- package/dist/domains/measure/measurement.js +1 -2
- package/dist/domains/measure/measurements.js +1 -2
- package/dist/domains/modes/modeLayers.js +1 -2
- package/dist/domains/modes/modeTriggers.js +1 -2
- package/dist/domains/pathEffects/effectSources.js +2 -3
- package/dist/domains/pathEffects/index.js +1 -2
- package/dist/domains/pathEffects/readSource.js +3 -4
- package/dist/domains/pathEffects/textItems.js +1 -2
- package/dist/domains/pathEffects/useEffectSourcesLayer.js +3 -4
- package/dist/domains/paths/anchorData.js +1 -2
- package/dist/domains/paths/anchorMarkers.js +1 -2
- package/dist/domains/paths/editablePath.js +3 -4
- package/dist/domains/paths/originProjection.js +1 -2
- package/dist/domains/paths/pathEditExtension.js +1 -2
- package/dist/domains/paths/pathEditState.js +1 -26
- package/dist/domains/paths/pathEditState.js.map +1 -1
- package/dist/domains/paths/pathEditingOverlayLayer.js +2 -3
- package/dist/domains/paths/pathLayer.js +1 -2
- package/dist/domains/paths/pathRepresentation.js +1 -2
- package/dist/domains/paths/pathSnap/glyphs.js +1 -2
- package/dist/domains/paths/pathSnap/pathSnapSource.js +1 -2
- package/dist/domains/paths/pathSnap/sceneIndex.js +1 -2
- package/dist/domains/paths/pathSnap/snapGeometry.js +2 -3
- package/dist/domains/paths/penPreviewLayer.js +1 -2
- package/dist/domains/paths/shapeGenerator.js +1 -2
- package/dist/domains/paths/strokeOutline.js +2 -3
- package/dist/domains/paths/useAnchorFields.js +1 -2
- package/dist/domains/paths/usePathEdit.js +2 -3
- package/dist/domains/poseRun/usePoseRun.js +1 -2
- package/dist/domains/selection/enteredGroupFrame.js +1 -2
- package/dist/domains/selection/enteredGroupScope.js +1 -2
- package/dist/domains/selection/enteredOperands.js +1 -2
- package/dist/domains/selection/handleCommands.js +2 -3
- package/dist/domains/selection/overlay.js +6 -7
- package/dist/domains/selection/selectionPose.js +2 -3
- package/dist/domains/snap/angle2d.js +1 -2
- package/dist/domains/snap/debugCandidates.js +1 -2
- package/dist/domains/snap/gather.js +1 -2
- package/dist/domains/snap/inputSubspace.js +2 -3
- package/dist/domains/snap/lazySession.js +1 -2
- package/dist/domains/snap/marks.js +1 -2
- package/dist/domains/snap/outcomeStore.js +1 -2
- package/dist/domains/snap/pointSnap.js +1 -2
- package/dist/domains/snap/probes2d.js +6 -2
- package/dist/domains/snap/probes2d.js.map +1 -1
- package/dist/domains/snap/readoutDraw.js +1 -2
- package/dist/domains/snap/readoutLayer.js +1 -2
- package/dist/domains/snap/registry.js +1 -2
- package/dist/domains/snap/resizeBox.js +1 -2
- package/dist/domains/snap/roles.js +1 -2
- package/dist/domains/snap/rotationSource.js +1 -2
- package/dist/domains/snap/sceneReads.js +13 -4
- package/dist/domains/snap/sceneReads.js.map +1 -1
- package/dist/domains/snap/sceneSession2d.js +6 -5
- package/dist/domains/snap/sceneSession2d.js.map +1 -1
- package/dist/domains/snap/screen.js +2 -3
- package/dist/domains/snap/session2d.js +4 -5
- package/dist/domains/snap/spanSnap.js +1 -2
- package/dist/domains/snap/stepAngles.js +1 -2
- package/dist/domains/text/editingDrawOne.js +1 -2
- package/dist/domains/text/hostTextEditors.js +1 -2
- package/dist/domains/text/index.js +2 -2
- package/dist/domains/text/sceneTextDrafts.js +1 -2
- package/dist/domains/text/textHitAt.js +4 -5
- package/dist/domains/text/textLayer.js +12 -2
- package/dist/domains/text/textLayer.js.map +1 -1
- package/dist/domains/text/useSceneTextEdit.js +4 -5
- package/dist/domains/viewports/aim.js +3 -4
- package/dist/domains/viewports/viewMarker.js +1 -2
- package/dist/domains/viewports/viewMarkerDrag.js +1 -2
- package/dist/domains/viewports/viewResolver.js +1 -2
- package/dist/domains/viewports/viewportLayer.js +1 -2
- package/dist/iconRegistry/IconRegistryProvider.js +1 -2
- package/dist/iconRegistry/useIconGlyph.js +1 -2
- package/dist/iconRegistry/useIconVariant.js +1 -2
- package/dist/icons.table.js +2 -3
- package/dist/icons.table.js.map +1 -1
- package/dist/icons.table.json +5 -0
- package/dist/icons2.table.js +1 -2
- package/dist/index.d.ts +160 -64
- package/dist/index.js +14 -9
- package/dist/input/keyState.js +1 -2
- package/dist/input/useKeyModifiers.js +1 -2
- package/dist/input/useKeyState.js +1 -2
- package/dist/interactions/actions/admitsChild.js +1 -2
- package/dist/interactions/actions/align/action.js +6 -7
- package/dist/interactions/actions/align/align.js +6 -7
- package/dist/interactions/actions/booleans/action.js +5 -4
- package/dist/interactions/actions/booleans/action.js.map +1 -1
- package/dist/interactions/actions/booleans/booleanGroupAction.js +2 -3
- package/dist/interactions/actions/booleans/booleans.js +1 -2
- package/dist/interactions/actions/booleans/commit.js +4 -5
- package/dist/interactions/actions/booleans/custom.js +2 -3
- package/dist/interactions/actions/booleans/keymap.js +1 -2
- package/dist/interactions/actions/booleans/operands.js +1 -2
- package/dist/interactions/actions/booleans/pieces.js +1 -2
- package/dist/interactions/actions/booleans/placement.js +1 -2
- package/dist/interactions/actions/booleans/useBooleans.js +1 -2
- package/dist/interactions/actions/booleans/useBooleansAdapter.js +1 -2
- package/dist/interactions/actions/clipboard/action.js +2 -3
- package/dist/interactions/actions/clipboard/clipboardOps.js +2 -3
- package/dist/interactions/actions/clipboard/materializePaste.js +1 -2
- package/dist/interactions/actions/clipboard/wireFormat.js +1 -2
- package/dist/interactions/actions/clone/action.js +7 -8
- package/dist/interactions/actions/clone/behaviors.js +4 -5
- package/dist/interactions/actions/defaultCommitAdapter.js +2 -3
- package/dist/interactions/actions/defaults/anchorEditing.js +6 -10
- package/dist/interactions/actions/defaults/anchorEditing.js.map +1 -1
- package/dist/interactions/actions/defaults/anchorFields.js +1 -2
- package/dist/interactions/actions/defaults/anchorHandles.js +2 -3
- package/dist/interactions/actions/defaults/anchorJoin.js +2 -3
- package/dist/interactions/actions/defaults/areaSelect.js +6 -6
- package/dist/interactions/actions/defaults/areaSelect.js.map +1 -1
- package/dist/interactions/actions/defaults/bendSegment.js +4 -6
- package/dist/interactions/actions/defaults/bendSegment.js.map +1 -1
- package/dist/interactions/actions/defaults/cancelGesture.js +1 -2
- package/dist/interactions/actions/defaults/clearSelection.js +1 -2
- package/dist/interactions/actions/defaults/containerScroll.js +4 -5
- package/dist/interactions/actions/defaults/contextMenu.js +6 -7
- package/dist/interactions/actions/defaults/copySubtree.js +2 -3
- package/dist/interactions/actions/defaults/createPaintAction.js +3 -4
- package/dist/interactions/actions/defaults/delete.js +2 -3
- package/dist/interactions/actions/defaults/duplicate.js +5 -6
- package/dist/interactions/actions/defaults/enterGroup.js +2 -3
- package/dist/interactions/actions/defaults/enterPathEdit.js +1 -2
- package/dist/interactions/actions/defaults/enterTextEdit.js +1 -2
- package/dist/interactions/actions/defaults/escape.js +1 -2
- package/dist/interactions/actions/defaults/exitPathEdit.js +18 -3
- package/dist/interactions/actions/defaults/exitPathEdit.js.map +1 -1
- package/dist/interactions/actions/defaults/group.js +6 -7
- package/dist/interactions/actions/defaults/ingest.js +3 -4
- package/dist/interactions/actions/defaults/insertPathAnchor.js +2 -3
- package/dist/interactions/actions/defaults/nudge.js +3 -4
- package/dist/interactions/actions/defaults/nudgeSteps.js +2 -3
- package/dist/interactions/actions/defaults/nudgeSteps.js.map +1 -1
- package/dist/interactions/actions/defaults/pathEditMarks.js +1 -2
- package/dist/interactions/actions/defaults/pinchZoom.js +3 -4
- package/dist/interactions/actions/defaults/reorder.js +2 -3
- package/dist/interactions/actions/defaults/requiresSelection.js +1 -2
- package/dist/interactions/actions/defaults/segmentUnder.js +1 -2
- package/dist/interactions/actions/defaults/selectAll.js +1 -2
- package/dist/interactions/actions/defaults/selectDeep.js +1 -2
- package/dist/interactions/actions/defaults/setFill.js +1 -2
- package/dist/interactions/actions/defaults/setFillOpacity.js +1 -2
- package/dist/interactions/actions/defaults/setStroke.js +1 -2
- package/dist/interactions/actions/defaults/setStrokeOpacity.js +1 -2
- package/dist/interactions/actions/defaults/slice.js +1 -2
- package/dist/interactions/actions/defaults/sliceOps.js +1 -2
- package/dist/interactions/actions/defaults/toolActivate.js +1 -2
- package/dist/interactions/actions/defaults/toolResetToDefault.js +1 -2
- package/dist/interactions/actions/defaults/undoRedo.js +1 -2
- package/dist/interactions/actions/defaults/viewportDragPan.js +1 -2
- package/dist/interactions/actions/defaults/viewportWheelPan.js +1 -2
- package/dist/interactions/actions/defaults/viewportZoom.js +3 -4
- package/dist/interactions/actions/distribute/action.js +4 -5
- package/dist/interactions/actions/distribute/distribute.js +5 -6
- package/dist/interactions/actions/distribute/plan.js +1 -2
- package/dist/interactions/actions/drawnBoxes.js +4 -5
- package/dist/interactions/actions/dropVerdict.js +1 -2
- package/dist/interactions/actions/edit-anchors/action.js +7 -9
- package/dist/interactions/actions/edit-anchors/action.js.map +1 -1
- package/dist/interactions/actions/edit-anchors/extensionDrags.js +1 -2
- package/dist/interactions/actions/edit-anchors/geometry.js +1 -2
- package/dist/interactions/actions/edit-anchors/handleDrag.js +1 -2
- package/dist/interactions/actions/edit-anchors/handles.js +1 -2
- package/dist/interactions/actions/edit-anchors/params.js +1 -2
- package/dist/interactions/actions/edit-anchors/preview.js +1 -2
- package/dist/interactions/actions/edit-anchors/symmetry.js +1 -2
- package/dist/interactions/actions/flip/action.js +8 -9
- package/dist/interactions/actions/flip/helpers.js +1 -2
- package/dist/interactions/actions/geometryProjection.js +1 -2
- package/dist/interactions/actions/gestureFrames.js +3 -4
- package/dist/interactions/actions/gestureLifecycle.js +1 -2
- package/dist/interactions/actions/hitSelection.js +7 -3
- package/dist/interactions/actions/hitSelection.js.map +1 -1
- package/dist/interactions/actions/insert/action.js +27 -9
- package/dist/interactions/actions/insert/action.js.map +1 -1
- package/dist/interactions/actions/insert/commit.js +2 -3
- package/dist/interactions/actions/insert/extras.js +1 -2
- package/dist/interactions/actions/insert/frame.js +1 -2
- package/dist/interactions/actions/insert/geometry.js +1 -2
- package/dist/interactions/actions/insert/params.js +42 -0
- package/dist/interactions/actions/insert/params.js.map +1 -0
- package/dist/interactions/actions/insert/parent.js +1 -2
- package/dist/interactions/actions/insert/placeAction.js +5 -6
- package/dist/interactions/actions/insert/repositionAction.js +1 -2
- package/dist/interactions/actions/insert/rotateAction.js +1 -2
- package/dist/interactions/actions/insert/session.js +5 -6
- package/dist/interactions/actions/insert/shape.js +2 -3
- package/dist/interactions/actions/lasso-select/action.js +9 -9
- package/dist/interactions/actions/lasso-select/action.js.map +1 -1
- package/dist/interactions/actions/lasso-select/behaviors/selectFromLasso.js +2 -3
- package/dist/interactions/actions/magnification.js +37 -0
- package/dist/interactions/actions/magnification.js.map +1 -0
- package/dist/interactions/actions/move/action.js +2 -3
- package/dist/interactions/actions/move/behaviors/layoutDrop.js +2 -3
- package/dist/interactions/actions/move/behaviors/reparentOnDrop.js +2 -3
- package/dist/interactions/actions/move/behaviors/snapBackOrDelete.js +1 -2
- package/dist/interactions/actions/move/behaviors/snapToContainer.js +2 -3
- package/dist/interactions/actions/move/capture.js +6 -7
- package/dist/interactions/actions/move/commit/index.js +2 -3
- package/dist/interactions/actions/move/commit/layoutDrop.js +4 -5
- package/dist/interactions/actions/move/commit/layoutRelease.js +7 -8
- package/dist/interactions/actions/move/commit/rebase.js +2 -3
- package/dist/interactions/actions/move/commit/reparent.js +5 -6
- package/dist/interactions/actions/move/delta.js +2 -3
- package/dist/interactions/actions/move/frame.js +2 -3
- package/dist/interactions/actions/move/gestureAdapter.js +1 -2
- package/dist/interactions/actions/move/landedDescendants.js +2 -3
- package/dist/interactions/actions/move/layout/container.js +3 -4
- package/dist/interactions/actions/move/layout/dragged.js +2 -3
- package/dist/interactions/actions/move/layout/dropPass.js +5 -6
- package/dist/interactions/actions/move/layout/exits.js +2 -3
- package/dist/interactions/actions/move/layout/glide.js +2 -3
- package/dist/interactions/actions/move/layout/view.js +1 -2
- package/dist/interactions/actions/move/refusal.js +2 -3
- package/dist/interactions/actions/move/session.js +4 -5
- package/dist/interactions/actions/move/translate.js +2 -3
- package/dist/interactions/actions/moveNodes.js +5 -6
- package/dist/interactions/actions/notices.js +16 -0
- package/dist/interactions/actions/notices.js.map +1 -0
- package/dist/interactions/actions/outlines/createOutlines.js +9 -8
- package/dist/interactions/actions/outlines/createOutlines.js.map +1 -1
- package/dist/interactions/actions/outlines/createOutlinesAction.js +14 -10
- package/dist/interactions/actions/outlines/createOutlinesAction.js.map +1 -1
- package/dist/interactions/actions/outlines/outlineStroke.js +2 -3
- package/dist/interactions/actions/outlines/outlineStrokeAction.js +5 -5
- package/dist/interactions/actions/outlines/outlineStrokeAction.js.map +1 -1
- package/dist/interactions/actions/outlines/replaceWithPaths.js +5 -6
- package/dist/interactions/actions/outlines/strokeRegion.js +1 -2
- package/dist/interactions/actions/outlines/useCreateOutlinesAdapter.js +1 -2
- package/dist/interactions/actions/pathCommands/cutJoin.js +3 -4
- package/dist/interactions/actions/pathCommands/livePathEdit.js +3 -4
- package/dist/interactions/actions/pathCommands/pathNodes.js +2 -3
- package/dist/interactions/actions/pathCommands/simplifyOffset.js +2 -3
- package/dist/interactions/actions/pathGestureTags.js +1 -2
- package/dist/interactions/actions/planeInput.js +2 -3
- package/dist/interactions/actions/pointerState.js +1 -2
- package/dist/interactions/actions/poseDescriptorDep.js +1 -2
- package/dist/interactions/actions/poseFrame.js +3 -4
- package/dist/interactions/actions/resize/action.js +3 -4
- package/dist/interactions/actions/resize/aspect.js +1 -2
- package/dist/interactions/actions/resize/behaviors/clampMinSize.js +1 -2
- package/dist/interactions/actions/resize/boxFrame.js +1 -2
- package/dist/interactions/actions/resize/capture.js +7 -8
- package/dist/interactions/actions/resize/commit.js +3 -4
- package/dist/interactions/actions/resize/cornerHandles.js +1 -2
- package/dist/interactions/actions/resize/frame.js +7 -8
- package/dist/interactions/actions/resize/held.js +2 -3
- package/dist/interactions/actions/resize/minimum.js +1 -2
- package/dist/interactions/actions/resize/replay.js +1 -2
- package/dist/interactions/actions/resize/ruleBounds.js +1 -2
- package/dist/interactions/actions/resize/session.js +9 -10
- package/dist/interactions/actions/resolveOverlays.js +1 -2
- package/dist/interactions/actions/resolvePreviews.js +3 -4
- package/dist/interactions/actions/rotate/action.js +5 -6
- package/dist/interactions/actions/rotate/commit.js +2 -3
- package/dist/interactions/actions/rotate/frame.js +3 -4
- package/dist/interactions/actions/rotate/geometry.js +1 -2
- package/dist/interactions/actions/rotate/handle.js +2 -3
- package/dist/interactions/actions/rotate/replay.js +2 -3
- package/dist/interactions/actions/rotate/session.js +10 -11
- package/dist/interactions/actions/selectionSubtree.js +7 -22
- package/dist/interactions/actions/selectionSubtree.js.map +1 -1
- package/dist/interactions/actions/spatialReference.js +1 -2
- package/dist/interactions/actions/testUtils.js +1 -9
- package/dist/interactions/actions/testUtils.js.map +1 -1
- package/dist/interactions/actions/transform-again/action.js +5 -6
- package/dist/interactions/actions/transform-again/memory.js +1 -2
- package/dist/interactions/actions/transformFinish.js +1 -2
- package/dist/interactions/actions/useActionSet.js +1 -2
- package/dist/interactions/actions/useNotices.js +12 -0
- package/dist/interactions/actions/useNotices.js.map +1 -0
- package/dist/interactions/actions/useStandardActions.js +1 -2
- package/dist/interactions/gestures/dragGesture/dragGesture.js +1 -2
- package/dist/interactions/gestures/dragGesture/dragPointOf.js +1 -2
- package/dist/interactions/gestures/dragRadial/dragRadial.js +2 -3
- package/dist/interactions/gestures/dragRect/dragRect.js +2 -3
- package/dist/interactions/gestures/handleDrag/handleDrag.js +1 -2
- package/dist/interactions/gestures/pointerDrag/pointerDrag.js +1 -2
- package/dist/interactions/gestures/shared/originProjection.js +1 -2
- package/dist/interactions/gestures/shared/screenTolerance.js +1 -2
- package/dist/interactions/gestures/thresholdDrag/thresholdDrag.js +1 -2
- package/dist/kitSettingsSchema.js +4 -5
- package/dist/test-hook/createTestHook.js +1 -2
- package/dist/test-hook/install.js +1 -2
- package/dist/test-hook/useTestHook.js +1 -2
- package/dist/test-seams.d.ts +7 -14
- package/dist/test-seams.js +2 -2
- package/dist/tools/builtin/anchors/anchorsTool.js +30 -0
- package/dist/tools/builtin/anchors/anchorsTool.js.map +1 -0
- package/dist/tools/builtin/ellipse/useEllipseTool.js +2 -3
- package/dist/tools/builtin/eyedropper/useEyedropperTool.js +1 -2
- package/dist/tools/builtin/hand/dragPanContribution.js +1 -2
- package/dist/tools/builtin/hand/useHandTool.js +1 -2
- package/dist/tools/builtin/image/useImageTool.js +1 -2
- package/dist/tools/builtin/lasso/useLassoTool.js +1 -2
- package/dist/tools/builtin/line/useLineTool.js +2 -3
- package/dist/tools/builtin/measure/useMeasureTool.js +2 -3
- package/dist/tools/builtin/pen/penHandle.js +1 -2
- package/dist/tools/builtin/pen/usePenTool.js +6 -7
- package/dist/tools/builtin/pencil/usePencilTool.js +1 -2
- package/dist/tools/builtin/pickTopMostHit.js +1 -2
- package/dist/tools/builtin/polygon/usePolygonTool.js +2 -3
- package/dist/tools/builtin/pressTarget.js +1 -2
- package/dist/tools/builtin/rect/useRectTool.js +2 -3
- package/dist/tools/builtin/select/adapterPointQuery.js +3 -4
- package/dist/tools/builtin/select/collapseDeferred.js +1 -2
- package/dist/tools/builtin/select/groupEntry.js +2 -3
- package/dist/tools/builtin/select/pressDecision.js +3 -4
- package/dist/tools/builtin/select/pressDecision.js.map +1 -1
- package/dist/tools/builtin/select/selectionContributions.js +1 -2
- package/dist/tools/builtin/select/useSelectTool.js +5 -6
- package/dist/tools/builtin/shared/insertToolOptions.js +1 -2
- package/dist/tools/builtin/shared/pointerFollower.js +1 -2
- package/dist/tools/builtin/slice/useSliceTool.js +5 -6
- package/dist/tools/builtin/star/useStarTool.js +2 -3
- package/dist/tools/builtin/sticky/stickyNode.js +1 -2
- package/dist/tools/builtin/sticky/useStickyTool.js +2 -3
- package/dist/tools/builtin/text/useTextTool.js +1 -2
- package/dist/tools/index.js +4 -2
- package/dist/tools/overlayBinding.js +1 -2
- package/dist/tools/toolOptions.js +60 -0
- package/dist/tools/toolOptions.js.map +1 -0
- package/dist/tools/useKeybindings.js +1 -2
- package/dist/{types-DW14eu9B.d.ts → types-BUvUXZe5.d.ts} +3 -3
- package/dist/util/color.js +1 -2
- package/dist/util/paint.js +1 -2
- package/dist/version.js +2 -3
- package/package.json +27 -27
- package/dist/interactions/actions/defaults/pathEditTools.js +0 -60
- package/dist/interactions/actions/defaults/pathEditTools.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ALWAYS, NEVER, evaluate } from "@weasel-js/routing";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/domains/chrome-caps/conditions.ts
|
|
4
4
|
/**
|
|
5
5
|
* Promote a Rule tree to a fluent Condition.
|
|
6
6
|
*
|
|
@@ -109,6 +109,5 @@ var coarsePointer = cond({ coarsePointer: true });
|
|
|
109
109
|
/** Primary pointer can hover. Absent device profile → true. */
|
|
110
110
|
var canHover = cond({ canHover: true });
|
|
111
111
|
|
|
112
|
-
//#endregion
|
|
113
112
|
export { actionIs, always, and, canHover, capabilityAll, capabilityIn, capabilityIs, capabilityNot, coarsePointer, cond, editingAnchors, focused, gesturing, hovering, hoveringSelected, modeIn, modeIs, modeNot, modifierHeld, multiActive, never, not, or, selectionAtLeast, selectionEmpty, selectionIs, when, zoomAtLeast };
|
|
114
113
|
//# sourceMappingURL=conditions.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/domains/chrome-caps/defaults.ts
|
|
2
2
|
/**
|
|
3
3
|
* Kit-shipped defaults. Merged with the consumer's `chromeVisibility` map
|
|
4
4
|
* at resolve time; consumer entries take precedence per id.
|
|
@@ -29,6 +29,5 @@ var defaultVisibilityRules = {
|
|
|
29
29
|
"snap.guides": { gesturing: true }
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
//#endregion
|
|
33
32
|
export { defaultVisibilityRules };
|
|
34
33
|
//# sourceMappingURL=defaults.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { viewZoom } from "../../core/viewport/view.js";
|
|
2
1
|
import { defaultVisibilityRules } from "./defaults.js";
|
|
2
|
+
import { viewZoom } from "../../core/viewport/view.js";
|
|
3
3
|
import { DEFAULT_ALLOWED_CAPABILITIES, evaluate } from "@weasel-js/routing";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/domains/chrome-caps/resolve.ts
|
|
6
6
|
/**
|
|
7
7
|
* Build the per-frame visibility check: consumer rules merged on top of
|
|
8
8
|
* the kit defaults, evaluated against `ctx`.
|
|
@@ -23,6 +23,7 @@ function resolveVisibility(consumer, ctx) {
|
|
|
23
23
|
allowedCapabilities: DEFAULT_ALLOWED_CAPABILITIES
|
|
24
24
|
};
|
|
25
25
|
return (id) => {
|
|
26
|
+
if (ruleCtx.hiddenChrome?.has(id)) return false;
|
|
26
27
|
const entry = merged[id];
|
|
27
28
|
if (entry === void 0) return true;
|
|
28
29
|
if (typeof entry === "function") return entry(ruleCtx);
|
|
@@ -30,6 +31,5 @@ function resolveVisibility(consumer, ctx) {
|
|
|
30
31
|
};
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
//#endregion
|
|
34
34
|
export { resolveVisibility };
|
|
35
35
|
//# sourceMappingURL=resolve.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.js","names":[],"sources":["../../../src/domains/chrome-caps/resolve.ts"],"sourcesContent":["import type { ChromeCtx, ChromeId, VisibilityRules } from './types';\nimport type { RuleCtx } from '@weasel-js/routing';\nimport { DEFAULT_ALLOWED_CAPABILITIES } from '@weasel-js/routing';\nimport { evaluate } from '@weasel-js/routing';\nimport { defaultVisibilityRules } from './defaults';\nimport { viewZoom } from 'core/viewport/view';\n\n/**\n * Build the per-frame visibility check: consumer rules merged on top of\n * the kit defaults, evaluated against `ctx`.\n *\n * `ChromeCtx` is the legacy shape; surfaces still on it get `mode='normal'`\n * and `DEFAULT_ALLOWED_CAPABILITIES` filled in here, so a caller that never\n * opted into modality behaves exactly like one sitting in normal mode.\n */\nexport function resolveVisibility(\n consumer: VisibilityRules | undefined,\n ctx: ChromeCtx | RuleCtx,\n): (id: ChromeId) => boolean {\n const merged: VisibilityRules = consumer\n ? { ...defaultVisibilityRules, ...consumer }\n : defaultVisibilityRules;\n const ruleCtx: RuleCtx = 'mode' in ctx\n ? ctx\n : {\n ...ctx,\n zoom: viewZoom(ctx.view),\n mode: 'normal',\n allowedCapabilities: DEFAULT_ALLOWED_CAPABILITIES,\n };\n return (id) => {\n const entry = merged[id];\n if (entry === undefined) return true;\n if (typeof entry === 'function') return entry(ruleCtx);\n return evaluate(entry, ruleCtx);\n };\n}\n"],"mappings":";;;;;;;;;;;;;AAeA,SAAgB,kBACd,UACA,KAC2B;CAC3B,MAAM,SAA0B,WAC5B;EAAE,GAAG;EAAwB,GAAG;CAAS,IACzC;CACJ,MAAM,UAAmB,UAAU,MAC/B,MACA;EACA,GAAG;EACH,MAAM,SAAS,IAAI,IAAI;EACvB,MAAM;EACN,qBAAqB;CACvB;CACF,QAAQ,OAAO;EACb,MAAM,QAAQ,OAAO;EACrB,IAAI,UAAU,QAAW,OAAO;EAChC,IAAI,OAAO,UAAU,YAAY,OAAO,MAAM,OAAO;EACrD,OAAO,SAAS,OAAO,OAAO;CAChC;AACF"}
|
|
1
|
+
{"version":3,"file":"resolve.js","names":[],"sources":["../../../src/domains/chrome-caps/resolve.ts"],"sourcesContent":["import type { ChromeCtx, ChromeId, VisibilityRules } from './types';\nimport type { RuleCtx } from '@weasel-js/routing';\nimport { DEFAULT_ALLOWED_CAPABILITIES } from '@weasel-js/routing';\nimport { evaluate } from '@weasel-js/routing';\nimport { defaultVisibilityRules } from './defaults';\nimport { viewZoom } from 'core/viewport/view';\n\n/**\n * Build the per-frame visibility check: consumer rules merged on top of\n * the kit defaults, evaluated against `ctx`.\n *\n * `ChromeCtx` is the legacy shape; surfaces still on it get `mode='normal'`\n * and `DEFAULT_ALLOWED_CAPABILITIES` filled in here, so a caller that never\n * opted into modality behaves exactly like one sitting in normal mode.\n */\nexport function resolveVisibility(\n consumer: VisibilityRules | undefined,\n ctx: ChromeCtx | RuleCtx,\n): (id: ChromeId) => boolean {\n const merged: VisibilityRules = consumer\n ? { ...defaultVisibilityRules, ...consumer }\n : defaultVisibilityRules;\n const ruleCtx: RuleCtx = 'mode' in ctx\n ? ctx\n : {\n ...ctx,\n zoom: viewZoom(ctx.view),\n mode: 'normal',\n allowedCapabilities: DEFAULT_ALLOWED_CAPABILITIES,\n };\n return (id) => {\n if (ruleCtx.hiddenChrome?.has(id)) return false;\n const entry = merged[id];\n if (entry === undefined) return true;\n if (typeof entry === 'function') return entry(ruleCtx);\n return evaluate(entry, ruleCtx);\n };\n}\n"],"mappings":";;;;;;;;;;;;;AAeA,SAAgB,kBACd,UACA,KAC2B;CAC3B,MAAM,SAA0B,WAC5B;EAAE,GAAG;EAAwB,GAAG;CAAS,IACzC;CACJ,MAAM,UAAmB,UAAU,MAC/B,MACA;EACA,GAAG;EACH,MAAM,SAAS,IAAI,IAAI;EACvB,MAAM;EACN,qBAAqB;CACvB;CACF,QAAQ,OAAO;EACb,IAAI,QAAQ,cAAc,IAAI,EAAE,GAAG,OAAO;EAC1C,MAAM,QAAQ,OAAO;EACrB,IAAI,UAAU,QAAW,OAAO;EAChC,IAAI,OAAO,UAAU,YAAY,OAAO,MAAM,OAAO;EACrD,OAAO,SAAS,OAAO,OAAO;CAChC;AACF"}
|
|
@@ -4,7 +4,7 @@ import { useMemo } from "react";
|
|
|
4
4
|
import { useLatest } from "@weasel-js/react";
|
|
5
5
|
import { DEFAULT_ALLOWED_CAPABILITIES, buildRuleCtx } from "@weasel-js/routing";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/domains/chrome-caps/useChromeCaps.ts
|
|
8
8
|
/**
|
|
9
9
|
* The rule context a surface's chrome-visibility rules and action eligibility
|
|
10
10
|
* are evaluated against, and the hook that keeps one for `<SceneCanvas>`.
|
|
@@ -30,7 +30,8 @@ function surfaceRuleCtx(surface, view) {
|
|
|
30
30
|
allowedCapabilities: surface.mode?.allowedCapabilities ?? DEFAULT_ALLOWED_CAPABILITIES,
|
|
31
31
|
selectionResizable: resizable ? view.selection.every((id) => resizable(id)) : void 0,
|
|
32
32
|
editingAnchors: surface.editingAnchors,
|
|
33
|
-
device: surface.device
|
|
33
|
+
device: surface.device,
|
|
34
|
+
...surface.hiddenChrome ? { hiddenChrome: surface.hiddenChrome } : {}
|
|
34
35
|
});
|
|
35
36
|
}
|
|
36
37
|
/** The chrome-caps answers for a surface. The object keeps its identity for
|
|
@@ -47,7 +48,8 @@ function useChromeCaps(source) {
|
|
|
47
48
|
mode: now.getMode?.(),
|
|
48
49
|
resizable: now.resizable,
|
|
49
50
|
editingAnchors: now.editingAnchors(),
|
|
50
|
-
device: now.device
|
|
51
|
+
device: now.device,
|
|
52
|
+
hiddenChrome: now.getHiddenChrome?.()
|
|
51
53
|
}, inputs);
|
|
52
54
|
};
|
|
53
55
|
return {
|
|
@@ -57,6 +59,5 @@ function useChromeCaps(source) {
|
|
|
57
59
|
}, [live]);
|
|
58
60
|
}
|
|
59
61
|
|
|
60
|
-
//#endregion
|
|
61
62
|
export { surfaceRuleCtx, useChromeCaps };
|
|
62
63
|
//# sourceMappingURL=useChromeCaps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChromeCaps.js","names":[],"sources":["../../../src/domains/chrome-caps/useChromeCaps.ts"],"sourcesContent":["/**\n * The rule context a surface's chrome-visibility rules and action eligibility\n * are evaluated against, and the hook that keeps one for `<SceneCanvas>`.\n */\nimport { useMemo } from 'react';\nimport type { ActiveMode } from '@weasel-js/modes';\nimport { useLatest } from '@weasel-js/react';\nimport {\n buildRuleCtx,\n DEFAULT_ALLOWED_CAPABILITIES,\n type DeviceProfile,\n type ModifierState,\n type RuleCtx,\n} from '@weasel-js/routing';\nimport type { NodeId } from '../../core/scene/types';\nimport { viewZoom, type View } from '../../core/viewport/view';\nimport { resolveVisibility } from './resolve';\nimport type { VisibilityRules } from './types';\n\n/**\n * The part of a rule context that belongs to one view. Everything else a\n * `RuleCtx` carries — mode, capabilities, device, focus — is the surface's and\n * the same for every view drawn on it.\n */\nexport interface ViewRuleInputs {\n selection: readonly NodeId[];\n view: View;\n /** What that view's dispatcher currently has in flight. */\n action: { kind: string | null; id: string | null };\n}\n\n/** The part of a rule context that belongs to the surface. */\nexport interface SurfaceRuleInputs {\n focused: boolean;\n /** The modifier keys held. Absent means none, so `modifierHeld` never matches. */\n modifiers?: ModifierState | undefined;\n hover: NodeId | null;\n /** Absent on a surface with no mode registry, which behaves as normal mode. */\n mode: ActiveMode | undefined;\n /** Whether one node may be resized. Absent means every node may. */\n resizable: ((id: string) => boolean) | undefined;\n editingAnchors: boolean;\n device: DeviceProfile;\n}\n\nconst NO_MODIFIERS = { alt: false, ctrl: false, meta: false, shift: false };\n\n/** One view's rule context on a surface. */\nexport function surfaceRuleCtx(surface: SurfaceRuleInputs, view: ViewRuleInputs): RuleCtx {\n const { resizable } = surface;\n return buildRuleCtx({\n focused: surface.focused,\n selection: view.selection,\n multiActive: view.selection.length > 1,\n modifiers: surface.modifiers ?? NO_MODIFIERS,\n action: view.action,\n hover: surface.hover,\n zoom: viewZoom(view.view),\n mode: surface.mode?.id ?? 'normal',\n // An empty set would make every `capability:` rule false and hide the\n // chrome those rules gate.\n allowedCapabilities: surface.mode?.allowedCapabilities ?? DEFAULT_ALLOWED_CAPABILITIES,\n // Left undefined without a predicate, which `resizable:` reads as resizable.\n selectionResizable: resizable ? view.selection.every((id) => resizable(id)) : undefined,\n editingAnchors: surface.editingAnchors,\n device: surface.device,\n });\n}\n\n/** Where a surface's rule context comes from. Read at the moment a rule is\n * evaluated, never at render. */\nexport interface ChromeCapsSource {\n /** The surface's rule table, over the kit defaults. */\n rules: VisibilityRules | undefined;\n /** The active mode. Absent when no mode registry is wired. */\n getMode: (() => ActiveMode) | undefined;\n /** Absent means the surface always counts as focused. */\n getFocused: (() => boolean) | undefined;\n getHover: () => NodeId | null;\n /** Absent means no modifier key ever counts as held. */\n getModifiers?: (() => ModifierState) | undefined;\n resizable: ((id: string) => boolean) | undefined;\n editingAnchors: () => boolean;\n device: DeviceProfile;\n}\n\n/**\n * A surface's chrome-caps answers for one view. The rules are surface-wide on\n * purpose — one consumer table, one set of kit defaults — but a rule keyed on\n * selection, camera or the in-flight action answers differently per view, so\n * the caller supplies that part and both the paint gate and the dispatcher's\n * eligibility filter read the same context.\n */\nexport interface ChromeCaps {\n /** `undefined` when the surface gates nothing: no mode registry is wired. */\n ruleCtx(inputs: ViewRuleInputs): RuleCtx | undefined;\n isVisible(inputs: ViewRuleInputs): (id: string) => boolean;\n}\n\n/** The chrome-caps answers for a surface. The object keeps its identity for\n * the life of the component and reads `source` as of the last commit. */\nexport function useChromeCaps(source: ChromeCapsSource): ChromeCaps {\n const live = useLatest(source);\n return useMemo(() => {\n const build = (inputs: ViewRuleInputs): RuleCtx => {\n const now = live.current;\n return surfaceRuleCtx({\n focused: now.getFocused ? now.getFocused() : true,\n modifiers: now.getModifiers?.(),\n hover: now.getHover(),\n mode: now.getMode?.(),\n resizable: now.resizable,\n editingAnchors: now.editingAnchors(),\n device: now.device,\n }, inputs);\n };\n return {\n ruleCtx: (inputs) => (live.current.getMode ? build(inputs) : undefined),\n isVisible: (inputs) => resolveVisibility(live.current.rules, build(inputs)),\n };\n }, [live]);\n}\n"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useChromeCaps.js","names":[],"sources":["../../../src/domains/chrome-caps/useChromeCaps.ts"],"sourcesContent":["/**\n * The rule context a surface's chrome-visibility rules and action eligibility\n * are evaluated against, and the hook that keeps one for `<SceneCanvas>`.\n */\nimport { useMemo } from 'react';\nimport type { ActiveMode } from '@weasel-js/modes';\nimport { useLatest } from '@weasel-js/react';\nimport {\n buildRuleCtx,\n DEFAULT_ALLOWED_CAPABILITIES,\n type DeviceProfile,\n type ModifierState,\n type RuleCtx,\n} from '@weasel-js/routing';\nimport type { NodeId } from '../../core/scene/types';\nimport { viewZoom, type View } from '../../core/viewport/view';\nimport { resolveVisibility } from './resolve';\nimport type { VisibilityRules } from './types';\n\n/**\n * The part of a rule context that belongs to one view. Everything else a\n * `RuleCtx` carries — mode, capabilities, device, focus — is the surface's and\n * the same for every view drawn on it.\n */\nexport interface ViewRuleInputs {\n selection: readonly NodeId[];\n view: View;\n /** What that view's dispatcher currently has in flight. */\n action: { kind: string | null; id: string | null };\n}\n\n/** The part of a rule context that belongs to the surface. */\nexport interface SurfaceRuleInputs {\n focused: boolean;\n /** The modifier keys held. Absent means none, so `modifierHeld` never matches. */\n modifiers?: ModifierState | undefined;\n hover: NodeId | null;\n /** Absent on a surface with no mode registry, which behaves as normal mode. */\n mode: ActiveMode | undefined;\n /** Whether one node may be resized. Absent means every node may. */\n resizable: ((id: string) => boolean) | undefined;\n editingAnchors: boolean;\n device: DeviceProfile;\n /** Chrome the active tool hides. Absent hides nothing. */\n hiddenChrome?: ReadonlySet<string> | undefined;\n}\n\nconst NO_MODIFIERS = { alt: false, ctrl: false, meta: false, shift: false };\n\n/** One view's rule context on a surface. */\nexport function surfaceRuleCtx(surface: SurfaceRuleInputs, view: ViewRuleInputs): RuleCtx {\n const { resizable } = surface;\n return buildRuleCtx({\n focused: surface.focused,\n selection: view.selection,\n multiActive: view.selection.length > 1,\n modifiers: surface.modifiers ?? NO_MODIFIERS,\n action: view.action,\n hover: surface.hover,\n zoom: viewZoom(view.view),\n mode: surface.mode?.id ?? 'normal',\n // An empty set would make every `capability:` rule false and hide the\n // chrome those rules gate.\n allowedCapabilities: surface.mode?.allowedCapabilities ?? DEFAULT_ALLOWED_CAPABILITIES,\n // Left undefined without a predicate, which `resizable:` reads as resizable.\n selectionResizable: resizable ? view.selection.every((id) => resizable(id)) : undefined,\n editingAnchors: surface.editingAnchors,\n device: surface.device,\n ...(surface.hiddenChrome ? { hiddenChrome: surface.hiddenChrome } : {}),\n });\n}\n\n/** Where a surface's rule context comes from. Read at the moment a rule is\n * evaluated, never at render. */\nexport interface ChromeCapsSource {\n /** The surface's rule table, over the kit defaults. */\n rules: VisibilityRules | undefined;\n /** The active mode. Absent when no mode registry is wired. */\n getMode: (() => ActiveMode) | undefined;\n /** Absent means the surface always counts as focused. */\n getFocused: (() => boolean) | undefined;\n getHover: () => NodeId | null;\n /** Absent means no modifier key ever counts as held. */\n getModifiers?: (() => ModifierState) | undefined;\n resizable: ((id: string) => boolean) | undefined;\n editingAnchors: () => boolean;\n device: DeviceProfile;\n /** The chrome the active tool hides (`ToolDef.hides`). Absent hides nothing. */\n getHiddenChrome?: (() => ReadonlySet<string> | undefined) | undefined;\n}\n\n/**\n * A surface's chrome-caps answers for one view. The rules are surface-wide on\n * purpose — one consumer table, one set of kit defaults — but a rule keyed on\n * selection, camera or the in-flight action answers differently per view, so\n * the caller supplies that part and both the paint gate and the dispatcher's\n * eligibility filter read the same context.\n */\nexport interface ChromeCaps {\n /** `undefined` when the surface gates nothing: no mode registry is wired. */\n ruleCtx(inputs: ViewRuleInputs): RuleCtx | undefined;\n isVisible(inputs: ViewRuleInputs): (id: string) => boolean;\n}\n\n/** The chrome-caps answers for a surface. The object keeps its identity for\n * the life of the component and reads `source` as of the last commit. */\nexport function useChromeCaps(source: ChromeCapsSource): ChromeCaps {\n const live = useLatest(source);\n return useMemo(() => {\n const build = (inputs: ViewRuleInputs): RuleCtx => {\n const now = live.current;\n return surfaceRuleCtx({\n focused: now.getFocused ? now.getFocused() : true,\n modifiers: now.getModifiers?.(),\n hover: now.getHover(),\n mode: now.getMode?.(),\n resizable: now.resizable,\n editingAnchors: now.editingAnchors(),\n device: now.device,\n hiddenChrome: now.getHiddenChrome?.(),\n }, inputs);\n };\n return {\n ruleCtx: (inputs) => (live.current.getMode ? build(inputs) : undefined),\n isVisible: (inputs) => resolveVisibility(live.current.rules, build(inputs)),\n };\n }, [live]);\n}\n"],"mappings":";;;;;;;;;;;AA+CA,IAAM,eAAe;CAAE,KAAK;CAAO,MAAM;CAAO,MAAM;CAAO,OAAO;AAAM;;AAG1E,SAAgB,eAAe,SAA4B,MAA+B;CACxF,MAAM,EAAE,cAAc;CACtB,OAAO,aAAa;EAClB,SAAS,QAAQ;EACjB,WAAW,KAAK;EAChB,aAAa,KAAK,UAAU,SAAS;EACrC,WAAW,QAAQ,aAAa;EAChC,QAAQ,KAAK;EACb,OAAO,QAAQ;EACf,MAAM,SAAS,KAAK,IAAI;EACxB,MAAM,QAAQ,MAAM,MAAM;EAG1B,qBAAqB,QAAQ,MAAM,uBAAuB;EAE1D,oBAAoB,YAAY,KAAK,UAAU,OAAO,OAAO,UAAU,EAAE,CAAC,IAAI;EAC9E,gBAAgB,QAAQ;EACxB,QAAQ,QAAQ;EAChB,GAAI,QAAQ,eAAe,EAAE,cAAc,QAAQ,aAAa,IAAI,CAAC;CACvE,CAAC;AACH;;;AAoCA,SAAgB,cAAc,QAAsC;CAClE,MAAM,OAAO,UAAU,MAAM;CAC7B,OAAO,cAAc;EACnB,MAAM,SAAS,WAAoC;GACjD,MAAM,MAAM,KAAK;GACjB,OAAO,eAAe;IACpB,SAAS,IAAI,aAAa,IAAI,WAAW,IAAI;IAC7C,WAAW,IAAI,eAAe;IAC9B,OAAO,IAAI,SAAS;IACpB,MAAM,IAAI,UAAU;IACpB,WAAW,IAAI;IACf,gBAAgB,IAAI,eAAe;IACnC,QAAQ,IAAI;IACZ,cAAc,IAAI,kBAAkB;GACtC,GAAG,MAAM;EACX;EACA,OAAO;GACL,UAAU,WAAY,KAAK,QAAQ,UAAU,MAAM,MAAM,IAAI;GAC7D,YAAY,WAAW,kBAAkB,KAAK,QAAQ,OAAO,MAAM,MAAM,CAAC;EAC5E;CACF,GAAG,CAAC,IAAI,CAAC;AACX"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback, useEffect, useMemo, useRef } from "react";
|
|
2
2
|
import { useLatest } from "@weasel-js/react";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/domains/chrome-caps/useHoverTracking.ts
|
|
5
5
|
/** Last-hovered NodeId for chrome-caps rules. */
|
|
6
6
|
/** Track which node the pointer is over. Returns a getter rather than state,
|
|
7
7
|
* so a pointer move does not re-render the component. Cleared on
|
|
@@ -59,6 +59,5 @@ function useHoverTracking(args) {
|
|
|
59
59
|
}), [getHover, canvasRef]);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
//#endregion
|
|
63
62
|
export { useHoverTracking };
|
|
64
63
|
//# sourceMappingURL=useHoverTracking.js.map
|
|
@@ -2,7 +2,7 @@ import { dwarn } from "../../debug/flag.js";
|
|
|
2
2
|
import { admitIngestMime } from "@weasel-js/routing";
|
|
3
3
|
import { UNKNOWN_MIME, mimeMatchesGlob } from "@weasel-js/gestures";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/domains/ingestion/contentHandlers.ts
|
|
6
6
|
/**
|
|
7
7
|
* Content-handler registry for external-content ingestion.
|
|
8
8
|
*
|
|
@@ -127,6 +127,5 @@ async function runIngest(items, ctx, opts = {}) {
|
|
|
127
127
|
await Promise.all(runs);
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
//#endregion
|
|
131
130
|
export { admitHandlerMimes, couldClaim, getContentHandlers, handlersFor, registerContentHandler, runIngest };
|
|
132
131
|
//# sourceMappingURL=contentHandlers.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { arrivalBounds } from "./placement.js";
|
|
2
1
|
import { couldClaim } from "./contentHandlers.js";
|
|
2
|
+
import { arrivalBounds } from "./placement.js";
|
|
3
3
|
import { rectPath } from "@weasel-js/geom";
|
|
4
4
|
import { pendingKindOf } from "@weasel-js/routing";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/domains/ingestion/ghost.ts
|
|
7
7
|
/**
|
|
8
8
|
* What a drag still in flight would land as. A browser shows a hovering drag's
|
|
9
9
|
* kinds and MIMEs and nothing else — no contents, no size — so the ghost is a
|
|
@@ -51,6 +51,5 @@ function previewIngest(deps, params, handlers) {
|
|
|
51
51
|
return previewPaths.show(boxes.map((b) => ({ path: rectPath(b.x, b.y, b.width, b.height) })));
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
//#endregion
|
|
55
54
|
export { ghostBounds, previewIngest };
|
|
56
55
|
//# sourceMappingURL=ghost.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { arrivalBounds } from "./placement.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/domains/ingestion/imageHandler.ts
|
|
4
4
|
var VIEWPORT_FIT = .9;
|
|
5
5
|
var defaultMeasure = async (file) => {
|
|
6
6
|
const bitmap = await createImageBitmap(file);
|
|
@@ -57,6 +57,5 @@ var kitImageHandler = {
|
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
59
|
|
|
60
|
-
//#endregion
|
|
61
60
|
export { embedFilesAsImageNodes, kitImageHandler };
|
|
62
61
|
//# sourceMappingURL=imageHandler.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { kitImageHandler } from "./imageHandler.js";
|
|
2
2
|
import { kitSvgHandler } from "./svgHandler.js";
|
|
3
|
-
import { kitWeaselJsonHandler } from "./weaselJsonHandler.js";
|
|
4
3
|
import { kitTextHandler } from "./textHandler.js";
|
|
4
|
+
import { kitWeaselJsonHandler } from "./weaselJsonHandler.js";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/domains/ingestion/kitHandlers.ts
|
|
7
7
|
var KIT_CONTENT_HANDLERS = [
|
|
8
8
|
kitImageHandler,
|
|
9
9
|
kitSvgHandler,
|
|
@@ -17,6 +17,5 @@ function kitHandlersFor(option = true) {
|
|
|
17
17
|
return KIT_CONTENT_HANDLERS.filter((h) => !option.omit.includes(h.id));
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
//#endregion
|
|
21
20
|
export { KIT_CONTENT_HANDLERS, kitHandlersFor };
|
|
22
21
|
//# sourceMappingURL=kitHandlers.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/domains/ingestion/openFilePicker.ts
|
|
2
2
|
/**
|
|
3
3
|
* Show the browser's file picker and resolve with what the user chose —
|
|
4
4
|
* empty when they cancel. Must be called from a user gesture (a click
|
|
@@ -28,6 +28,5 @@ function openFilePicker(opts = {}) {
|
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
//#endregion
|
|
32
31
|
export { openFilePicker };
|
|
33
32
|
//# sourceMappingURL=openFilePicker.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/domains/ingestion/placement.ts
|
|
2
2
|
var CASCADE_OFFSET_PX = 24;
|
|
3
3
|
/**
|
|
4
4
|
* Where the kit's handlers put arriving content of a given size: centered on
|
|
@@ -20,6 +20,5 @@ function arrivalBounds(ctx, size, index) {
|
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
//#endregion
|
|
24
23
|
export { arrivalBounds };
|
|
25
24
|
//# sourceMappingURL=placement.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { embedFilesAsImageNodes } from "./imageHandler.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/domains/ingestion/svgHandler.ts
|
|
4
4
|
var SVG_MIME = "image/svg+xml";
|
|
5
5
|
var FALLBACK_WIDTH = 300;
|
|
6
6
|
var FALLBACK_HEIGHT = 150;
|
|
@@ -84,6 +84,5 @@ var kitSvgHandler = {
|
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
86
|
|
|
87
|
-
//#endregion
|
|
88
87
|
export { SVG_MIME, isSvgFileItem, kitSvgHandler, sniffSvgText };
|
|
89
88
|
//# sourceMappingURL=svgHandler.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { arrivalBounds } from "./placement.js";
|
|
2
2
|
import { measureTextBounds } from "@weasel-js/text";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/domains/ingestion/textHandler.ts
|
|
5
5
|
/**
|
|
6
6
|
* The kit's `text/plain` content handler: a pasted or dropped string becomes
|
|
7
7
|
* a text node. Registered by default with the other kit handlers.
|
|
@@ -46,6 +46,5 @@ function createTextHandler(opts = {}) {
|
|
|
46
46
|
* canvas with the `ingest` feature takes text unless its `ingestion.kitHandlers` omits it. */
|
|
47
47
|
var kitTextHandler = createTextHandler();
|
|
48
48
|
|
|
49
|
-
//#endregion
|
|
50
49
|
export { createTextHandler, kitTextHandler };
|
|
51
50
|
//# sourceMappingURL=textHandler.js.map
|
|
@@ -5,7 +5,7 @@ import { useCallback, useEffect, useMemo } from "react";
|
|
|
5
5
|
import { useLatest } from "@weasel-js/react";
|
|
6
6
|
import { itemsFromFiles } from "@weasel-js/routing";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/domains/ingestion/useCanvasIngestion.ts
|
|
9
9
|
/**
|
|
10
10
|
* One canvas's share of ingestion: its content handlers and the kit's it keeps, which run on
|
|
11
11
|
* it alone and admit the string flavors they name while it is mounted, the
|
|
@@ -59,6 +59,5 @@ function useCanvasIngestion(adapter, getRegistry, options) {
|
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
//#endregion
|
|
63
62
|
export { useCanvasIngestion };
|
|
64
63
|
//# sourceMappingURL=useCanvasIngestion.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { dwarn } from "../../debug/flag.js";
|
|
2
1
|
import { materializePaste } from "../../interactions/actions/clipboard/materializePaste.js";
|
|
3
2
|
import { WEASEL_CLIPBOARD_MIME, WEASEL_CLIPBOARD_MIME_WEB, extractWeaselClipboardFromSvg, parseWeaselClipboardText, sniffWeaselClipboardText } from "../../interactions/actions/clipboard/wireFormat.js";
|
|
3
|
+
import { dwarn } from "../../debug/flag.js";
|
|
4
4
|
import { sniffSvgText } from "./svgHandler.js";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/domains/ingestion/weaselJsonHandler.ts
|
|
7
7
|
/** text/plain SVG whose `<metadata>` carries a verified weasel payload —
|
|
8
8
|
* the draw→draw DOM-paste flavor (Chromium exposes only text/plain there).
|
|
9
9
|
* The `"weaselClipboard"` substring guard keeps match cheap on arbitrary
|
|
@@ -52,6 +52,5 @@ var kitWeaselJsonHandler = {
|
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
//#endregion
|
|
56
55
|
export { kitWeaselJsonHandler };
|
|
57
56
|
//# sourceMappingURL=weaselJsonHandler.js.map
|
|
@@ -2,7 +2,7 @@ import { accentColorOf } from "../../canvas/accentColor.js";
|
|
|
2
2
|
import { ellipsePath, polylineFromPoints } from "@weasel-js/geom";
|
|
3
3
|
import { prefersReducedMotion } from "@weasel-js/react";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/domains/longPress/longPressFeedback.ts
|
|
6
6
|
/** Entry and layer id of the default feedback, so a host can find or order it. */
|
|
7
7
|
var LONG_PRESS_FEEDBACK_ID = "long-press-feedback";
|
|
8
8
|
var RING_SEGMENTS = 64;
|
|
@@ -120,6 +120,5 @@ function createLongPressFeedbackContribution(opts = {}) {
|
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
//#endregion
|
|
124
123
|
export { LONG_PRESS_FEEDBACK_ID, createLongPressFeedbackContribution };
|
|
125
124
|
//# sourceMappingURL=longPressFeedback.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/domains/measure/actionIds.ts
|
|
2
2
|
/** The ids of the measure feature's actions. */
|
|
3
3
|
var MEASURE_ACTION_IDS = {
|
|
4
4
|
/** The measure tool's drag, which adds a measurement. */
|
|
@@ -17,6 +17,5 @@ var MEASURE_ACTION_IDS = {
|
|
|
17
17
|
unpick: "measure.unpick"
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
//#endregion
|
|
21
20
|
export { MEASURE_ACTION_IDS };
|
|
22
21
|
//# sourceMappingURL=actionIds.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { translateSelection } from "../../interactions/actions/defaults/nudge.js";
|
|
2
|
+
import { requiresSelection } from "../../interactions/actions/defaults/requiresSelection.js";
|
|
3
3
|
import { commitOps } from "../../interactions/actions/defaultCommitAdapter.js";
|
|
4
4
|
import { commitTransformOps, transformApplyOps } from "../../interactions/actions/transformFinish.js";
|
|
5
|
-
import {
|
|
6
|
-
import { requiresSelection } from "../../interactions/actions/defaults/requiresSelection.js";
|
|
7
|
-
import { translateSelection } from "../../interactions/actions/defaults/nudge.js";
|
|
5
|
+
import { poseDescriptorOf } from "../../interactions/actions/poseDescriptorDep.js";
|
|
8
6
|
import { rotateSelectionOps } from "../../interactions/actions/rotate/replay.js";
|
|
7
|
+
import { recordTransform } from "../../interactions/actions/transform-again/memory.js";
|
|
8
|
+
import { measurementOf } from "./measurement.js";
|
|
9
9
|
import { currentMeasureId, measureIds } from "./measurements.js";
|
|
10
10
|
import { MEASURE_LABELS, deleteMeasureOps } from "./measureEdits.js";
|
|
11
11
|
import { MEASURE_ACTION_IDS } from "./actionIds.js";
|
|
12
12
|
import { ActionDisabledReason } from "@weasel-js/routing";
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
// src/domains/measure/measureCommands.ts
|
|
15
15
|
var MOVE_LABEL = "Move by Measurement";
|
|
16
16
|
var ROTATE_LABEL = "Rotate by Measurement";
|
|
17
17
|
function current(deps, ms) {
|
|
@@ -175,6 +175,5 @@ function measureCommands(ms) {
|
|
|
175
175
|
];
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
//#endregion
|
|
179
178
|
export { measureCommands };
|
|
180
179
|
//# sourceMappingURL=measureCommands.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { MEASURE_ACTION_IDS } from "./actionIds.js";
|
|
2
|
-
import { measureDragAction, measurePickAction } from "./measureGestures.js";
|
|
3
1
|
import { measureCommands } from "./measureCommands.js";
|
|
2
|
+
import { measureDragAction, measurePickAction } from "./measureGestures.js";
|
|
4
3
|
import { MEASURE_AFFORDANCE_KIND, measurementsLayer } from "./measureLayer.js";
|
|
4
|
+
import { MEASURE_ACTION_IDS } from "./actionIds.js";
|
|
5
5
|
import { hitPredicate } from "@weasel-js/gestures";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/domains/measure/measureContribution.ts
|
|
8
8
|
var onMeasurement = hitPredicate((hit) => hit?.kind === MEASURE_AFFORDANCE_KIND);
|
|
9
9
|
var MODS_ANY = {
|
|
10
10
|
shift: "optional",
|
|
@@ -54,6 +54,5 @@ function measurementsContribution(scene, ms) {
|
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
//#endregion
|
|
58
57
|
export { measurementsContribution };
|
|
59
58
|
//# sourceMappingURL=measureContribution.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { measureEndsOf, measureNode, measurePose, withMeasureEnd } from "./measurement.js";
|
|
2
|
-
import { createTransformOp } from "../../core/ops/transform.js";
|
|
3
1
|
import { createSetDataOp } from "../../core/ops/setData.js";
|
|
2
|
+
import { createTransformOp } from "../../core/ops/transform.js";
|
|
4
3
|
import { deleteNode, insertAt } from "../../interactions/actions/pathCommands/pathNodes.js";
|
|
4
|
+
import { measureEndsOf, measureNode, measurePose, withMeasureEnd } from "./measurement.js";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/domains/measure/measureEdits.ts
|
|
7
7
|
/** The labels measurement edits land in history under. */
|
|
8
8
|
var MEASURE_LABELS = {
|
|
9
9
|
add: "Measure",
|
|
@@ -77,6 +77,5 @@ function deleteMeasureOps(scene, ids, label) {
|
|
|
77
77
|
return ops;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
//#endregion
|
|
81
80
|
export { MEASURE_LABELS, addMeasureOp, deleteMeasureOps, moveEndOps, moveMeasureOps, translatedMeasure };
|
|
82
81
|
//# sourceMappingURL=measureEdits.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { measureBetween, measureEndsOf, withMeasureEnd } from "./measurement.js";
|
|
2
1
|
import { commitOps } from "../../interactions/actions/defaultCommitAdapter.js";
|
|
3
2
|
import { SNAP_ANGLE_STEP, SNAP_ROLES, snapMods } from "../snap/roles.js";
|
|
4
3
|
import { spanSnap } from "../snap/spanSnap.js";
|
|
4
|
+
import { measureBetween, measureEndsOf, withMeasureEnd } from "./measurement.js";
|
|
5
5
|
import { measureAt } from "./measureHit.js";
|
|
6
6
|
import { addMeasureOp, moveEndOps, moveMeasureOps, translatedMeasure } from "./measureEdits.js";
|
|
7
7
|
import { MEASURE_ACTION_IDS } from "./actionIds.js";
|
|
8
8
|
import { resolveParams } from "@weasel-js/routing";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/domains/measure/measureGestures.ts
|
|
11
11
|
/** Screen-px radius around a measurement that picks it. */
|
|
12
12
|
var MEASURE_HIT_PX = 6;
|
|
13
13
|
var pointOf = (at) => at.drag?.current ?? at.world;
|
|
@@ -177,6 +177,5 @@ function measureDragAction(ms) {
|
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
//#endregion
|
|
181
180
|
export { MEASURE_HIT_PX, hitOf, measureCreateAction, measureDragAction, measurePickAction, measurePickAtAction, pxToWorld };
|
|
182
181
|
//# sourceMappingURL=measureGestures.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { nodesAsShown, shownLookup } from "../../core/scene/nodeAsShown.js";
|
|
2
1
|
import { measureEndsOf } from "./measurement.js";
|
|
3
|
-
import { nodeGates } from "../../core/scene/nodeGates.js";
|
|
4
2
|
import { measureIds } from "./measurements.js";
|
|
3
|
+
import { nodesAsShown, shownLookup } from "../../core/scene/nodeAsShown.js";
|
|
4
|
+
import { nodeGates } from "../../core/scene/nodeGates.js";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/domains/measure/measureHit.ts
|
|
7
7
|
function distanceToSegment(p, a, b) {
|
|
8
8
|
const dx = b.x - a.x;
|
|
9
9
|
const dy = b.y - a.y;
|
|
@@ -77,6 +77,5 @@ function measureEndSource(opts = {}) {
|
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
//#endregion
|
|
81
80
|
export { measureAt, measureEndSource };
|
|
82
81
|
//# sourceMappingURL=measureHit.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { viewToTransform } from "../../core/viewport/view.js";
|
|
2
1
|
import { worldToScreen } from "../../core/viewport/viewTransform.js";
|
|
2
|
+
import { viewToTransform } from "../../core/viewport/view.js";
|
|
3
3
|
import { OVERLAY_ROLE_STROKES } from "../../canvas/overlayRoleStrokes.js";
|
|
4
|
-
import { measureEndsOf } from "./measurement.js";
|
|
5
4
|
import { measureCommands } from "../../canvas/nodeShapes/measurePainter.js";
|
|
5
|
+
import { measureEndsOf } from "./measurement.js";
|
|
6
6
|
import { measureAt } from "./measureHit.js";
|
|
7
7
|
import { MEASURE_HIT_PX } from "./measureGestures.js";
|
|
8
8
|
import { rectPath } from "@weasel-js/geom";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/domains/measure/measureLayer.ts
|
|
11
11
|
/** The registered layer's id; a press it claims routes as `layer:<id>`. */
|
|
12
12
|
var MEASURE_LAYER_ID = "weasel-measure";
|
|
13
13
|
/** The affordance kind a press on a measurement routes under. */
|
|
@@ -81,6 +81,5 @@ function measurementsLayer(scene, ms) {
|
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
//#endregion
|
|
85
84
|
export { MEASURE_AFFORDANCE_KIND, MEASURE_LAYER_ID, measurementsLayer };
|
|
86
85
|
//# sourceMappingURL=measureLayer.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/domains/measure/measurement.ts
|
|
2
2
|
/** Measure from `start` to `end`. */
|
|
3
3
|
function measureBetween(start, end) {
|
|
4
4
|
const dx = end.x - start.x;
|
|
@@ -74,6 +74,5 @@ function withMeasureEnd(node, which, to) {
|
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
//#endregion
|
|
78
77
|
export { measureBetween, measureEndsOf, measureNode, measurePose, measurementOf, withMeasureEnd };
|
|
79
78
|
//# sourceMappingURL=measurement.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { measurementOf } from "./measurement.js";
|
|
2
2
|
import { createEmitter } from "@weasel-js/registry";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/domains/measure/measurements.ts
|
|
5
5
|
function cell(initial) {
|
|
6
6
|
let value = initial;
|
|
7
7
|
const changed = createEmitter();
|
|
@@ -36,6 +36,5 @@ function currentMeasureId(scene, ms) {
|
|
|
36
36
|
return measureIds(scene, ms).at(-1) ?? null;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
//#endregion
|
|
40
39
|
export { createMeasurements, currentMeasureId, measureIds };
|
|
41
40
|
//# sourceMappingURL=measurements.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { viewToTransform } from "../../core/viewport/view.js";
|
|
2
2
|
import { worldToScreen } from "../../core/viewport/viewTransform.js";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/domains/modes/modeLayers.ts
|
|
5
5
|
var DEFAULT_INTENSITY = .12;
|
|
6
6
|
/**
|
|
7
7
|
* A screen-space layer painting the active mode's `WorkspaceVisual`, or the `fallback`'s in a
|
|
@@ -141,6 +141,5 @@ function modeDecorationLayer(decorations, opts = {}) {
|
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
//#endregion
|
|
145
144
|
export { modeDecorationLayer, workspaceTintLayer };
|
|
146
145
|
//# sourceMappingURL=modeLayers.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ActionDisabledReason } from "@weasel-js/routing";
|
|
2
2
|
import { modeLabel } from "@weasel-js/modes";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/domains/modes/modeTriggers.ts
|
|
5
5
|
/**
|
|
6
6
|
* The registry's double-click entries as an always-on contribution: for each mode whose
|
|
7
7
|
* `entry.trigger` is `'double-click-target'`, one action bound to a double-click on each routing
|
|
@@ -62,6 +62,5 @@ function triggerAction(mode, targets, enter, canEnter) {
|
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
//#endregion
|
|
66
65
|
export { modeTriggers };
|
|
67
66
|
//# sourceMappingURL=modeTriggers.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { sourcesOf } from "../../core/scene/dependents.js";
|
|
2
1
|
import { pathEffectOf } from "../../core/scene/pathEffects/derive.js";
|
|
2
|
+
import { sourcesOf } from "../../core/scene/dependents.js";
|
|
3
3
|
import { isTextData } from "@weasel-js/text";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/domains/pathEffects/effectSources.ts
|
|
6
6
|
/**
|
|
7
7
|
* A path effect that hides its sources is edited through itself: its text and
|
|
8
8
|
* its path are reached from the effect node.
|
|
@@ -64,6 +64,5 @@ function hiddenSourcesTakenWith(scene, ids, keep = /* @__PURE__ */ new Set()) {
|
|
|
64
64
|
return taken;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
//#endregion
|
|
68
67
|
export { effectSourceFor, hiddenSourcesTakenWith, sourcesHiddenBy };
|
|
69
68
|
//# sourceMappingURL=effectSources.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PATH_EFFECT, createPathEffectDerivations } from "../../core/scene/pathEffects/derive.js";
|
|
2
2
|
import { readEffectSource } from "./readSource.js";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/domains/pathEffects/index.ts
|
|
5
5
|
/**
|
|
6
6
|
* The kit's path effects, wired to its painters: the derivations a scene
|
|
7
7
|
* holding blends, bends and repeats registers, and the registry helper that
|
|
@@ -30,6 +30,5 @@ function withPathEffectsRegistry(registry = {}) {
|
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
//#endregion
|
|
34
33
|
export { PATH_EFFECT_DERIVATIONS, readEffectSource, withPathEffectsRegistry };
|
|
35
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { findNodeShape } from "../../canvas/NodeShape.js";
|
|
2
2
|
import { isRectPose } from "../../core/geometry/autoPoseDescriptor.js";
|
|
3
|
+
import { noteFontRead } from "../../core/scene/fontReads.js";
|
|
3
4
|
import { pathPaintOf } from "../../canvas/nodeShapes/nodePaint.js";
|
|
4
|
-
import { findNodeShape } from "../../canvas/NodeShape.js";
|
|
5
5
|
import { textEffectItems } from "./textItems.js";
|
|
6
6
|
import { pathThroughPoseFrame, poseLinearOf } from "@weasel-js/geom";
|
|
7
7
|
import { isTextData } from "@weasel-js/text";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// src/domains/pathEffects/readSource.ts
|
|
10
10
|
/**
|
|
11
11
|
* How the kit's path effects read a source node: its outline from its
|
|
12
12
|
* painter's silhouette, its paint as `kit:path` resolves it.
|
|
@@ -57,6 +57,5 @@ function readShape(dep) {
|
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
//#endregion
|
|
61
60
|
export { readEffectSource };
|
|
62
61
|
//# sourceMappingURL=readSource.js.map
|
|
@@ -2,7 +2,7 @@ import { noteFontRead } from "../../core/scene/fontReads.js";
|
|
|
2
2
|
import { poseFrameOf, transformPath } from "@weasel-js/geom";
|
|
3
3
|
import { TextOutlinesError, loadTextOutlines, textClusters } from "@weasel-js/text";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/domains/pathEffects/textItems.ts
|
|
6
6
|
/**
|
|
7
7
|
* A text node as a path effect's items: its first line's grapheme clusters,
|
|
8
8
|
* each one's outlines and decoration rules in its own frame, sized as the node
|
|
@@ -57,6 +57,5 @@ function scaleOf(pose) {
|
|
|
57
57
|
return m === null ? 1 : Math.sqrt(Math.abs(m[0] * m[3] - m[1] * m[2]));
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
//#endregion
|
|
61
60
|
export { textEffectItems };
|
|
62
61
|
//# sourceMappingURL=textItems.js.map
|