@weasel-js/core 1.15.0 → 1.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +199 -0
- package/dist/WeaselProvider.js +4 -5
- package/dist/affordances/composeAffordanceLayer.js +1 -2
- package/dist/affordances/cornerResize.js +4 -5
- package/dist/affordances/hitAffordanceRegions.js +1 -2
- package/dist/affordances/pathAnchors.js +1 -2
- package/dist/affordances/rotateCursor.js +1 -2
- package/dist/affordances/rotationHandle.js +2 -3
- package/dist/animation/behaviors/coast.js +1 -2
- package/dist/animation/behaviors/coastByWrite.js +2 -3
- package/dist/animation/behaviors/coastOnTargets.js +2 -3
- package/dist/animation/behaviors/momentum.js +1 -2
- package/dist/animation/clipTargets.js +1 -2
- package/dist/animation/departures.js +2 -3
- package/dist/animation/poseHelpers.js +2 -3
- package/dist/animation/poseTarget.js +5 -6
- package/dist/animation/poseTarget.js.map +1 -1
- package/dist/animation/poseTransition.js +1 -2
- package/dist/animation/reflow.js +9 -10
- package/dist/animation/reflow.js.map +1 -1
- package/dist/animation/rewind.js +1 -2
- package/dist/animation/rig/bindRig.js +2 -3
- package/dist/animation/rig/rigNode.js +3 -4
- package/dist/animation/rig/rigNode.js.map +1 -1
- package/dist/animation/rig/rigSeat.js +1 -2
- package/dist/animation/rig/skinBinding.js +1 -2
- package/dist/animation/rig/useRig.js +2 -3
- package/dist/animation/wrappers/animateLifecycle.js +1 -2
- package/dist/animation/wrappers/animateOnSetPose.js +1 -2
- package/dist/animation/wrappers/instantPose.js +1 -2
- package/dist/animation/writtenPoseTarget.js +1 -2
- package/dist/barrel/input.js +2 -1
- package/dist/barrel/interactions.js +2 -1
- package/dist/barrel/paint.js +2 -2
- package/dist/barrel/routing.js +2 -2
- package/dist/barrel/scene.js +2 -2
- package/dist/barrel/viewport.js +3 -3
- package/dist/canvas/Canvas.js +5 -6
- package/dist/canvas/CanvasView.js +6 -7
- package/dist/canvas/CursorCoordsHud.js +2 -3
- package/dist/canvas/DrawCanvas.js +3 -4
- package/dist/canvas/GestureReason.js +1 -2
- package/dist/canvas/GestureReason.module.js +1 -2
- package/dist/canvas/LeanSceneCanvas.js +2 -3
- package/dist/canvas/ModalityHud.js +2 -3
- package/dist/canvas/NodeShape.js +3 -4
- package/dist/canvas/PickHud.js +2 -3
- package/dist/canvas/SceneCanvas/ActionsProviderIfRoot.js +1 -2
- package/dist/canvas/SceneCanvas/CanvasKitProviders.js +3 -4
- package/dist/canvas/SceneCanvas/DepRegistryProviderIfRoot.js +1 -2
- package/dist/canvas/SceneCanvas/DevHuds.js +1 -2
- package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js +18 -66
- package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js.map +1 -1
- package/dist/canvas/SceneCanvas/SceneCanvasInput.js +4 -5
- package/dist/canvas/SceneCanvas/SurfaceDeclarations.js +1 -2
- package/dist/canvas/SceneCanvas/brushOverlay.js +1 -2
- package/dist/canvas/SceneCanvas/builtinToolSets.js +1 -2
- package/dist/canvas/SceneCanvas/canvasPassThrough.js +1 -2
- package/dist/canvas/SceneCanvas/contributionFrameHooks.js +1 -2
- package/dist/canvas/SceneCanvas/coordTrace.js +1 -2
- package/dist/canvas/SceneCanvas/defaultNodeProperties.js +3 -4
- package/dist/canvas/SceneCanvas/defaultNodeRouting.js +1 -2
- package/dist/canvas/SceneCanvas/defaultTextEditor.js +4 -5
- package/dist/canvas/SceneCanvas/describePresets.js +1 -2
- package/dist/canvas/SceneCanvas/dispatcherGestureBounds.js +1 -2
- package/dist/canvas/SceneCanvas/features.js +1 -2
- package/dist/canvas/SceneCanvas/insertPreviewCommands.js +1 -2
- package/dist/canvas/SceneCanvas/mergeLayers.js +1 -2
- package/dist/canvas/SceneCanvas/namedPresets.js +5 -6
- package/dist/canvas/SceneCanvas/poseGeometry.js +1 -2
- package/dist/canvas/SceneCanvas/poseRegistrars.js +1 -2
- package/dist/canvas/SceneCanvas/presets/arrange.js +2 -3
- package/dist/canvas/SceneCanvas/presets/baseline.js +1 -2
- package/dist/canvas/SceneCanvas/presets/chrome.js +1 -2
- package/dist/canvas/SceneCanvas/presets/composites.js +1 -2
- package/dist/canvas/SceneCanvas/presets/edit.js +4 -5
- package/dist/canvas/SceneCanvas/presets/ingest.js +1 -2
- package/dist/canvas/SceneCanvas/presets/paths.js +3 -4
- package/dist/canvas/SceneCanvas/presets/select.js +1 -2
- package/dist/canvas/SceneCanvas/presets/toolDriven.js +2 -3
- package/dist/canvas/SceneCanvas/presets/tools.js +1 -2
- package/dist/canvas/SceneCanvas/presets/transform.js +2 -3
- package/dist/canvas/SceneCanvas/presets/view.js +2 -3
- package/dist/canvas/SceneCanvas/props.js +1 -2
- package/dist/canvas/SceneCanvas/scenePointQuery.js +2 -3
- package/dist/canvas/SceneCanvas/shapeGeneratorProperties.js +1 -2
- package/dist/canvas/SceneCanvas/toolRegistry.js +2 -3
- package/dist/canvas/SceneCanvas/useActionTunings.js +1 -2
- package/dist/canvas/SceneCanvas/useActionsPropResolver.js +1 -2
- package/dist/canvas/SceneCanvas/useBakedScene.js +2 -3
- package/dist/canvas/SceneCanvas/useBuiltinShapeTools.js +7 -8
- package/dist/canvas/SceneCanvas/useBuiltinTools.js +2 -3
- package/dist/canvas/SceneCanvas/useCanvasCamera.js +2 -3
- package/dist/canvas/SceneCanvas/useCanvasDevtoolsRoot.js +1 -2
- package/dist/canvas/SceneCanvas/useCanvasDispatcher.js +1 -2
- package/dist/canvas/SceneCanvas/useCanvasSelection.js +8 -6
- package/dist/canvas/SceneCanvas/useCanvasSelection.js.map +1 -1
- package/dist/canvas/SceneCanvas/useCanvasTools.js +2 -3
- package/dist/canvas/SceneCanvas/useChromeAffordances.js +2 -3
- package/dist/canvas/SceneCanvas/useContributionRoles.js +1 -2
- package/dist/canvas/SceneCanvas/useDepartureGhostLayer.js +4 -5
- package/dist/canvas/SceneCanvas/useDispatcherOverlayLayer.js +2 -3
- package/dist/canvas/SceneCanvas/useHeldModifiers.js +1 -2
- package/dist/canvas/SceneCanvas/useMagnificationCheck.js +41 -0
- package/dist/canvas/SceneCanvas/useMagnificationCheck.js.map +1 -0
- package/dist/canvas/SceneCanvas/useNodeAtPoint.js +1 -2
- package/dist/canvas/SceneCanvas/useNodeKinds.js +2 -3
- package/dist/canvas/SceneCanvas/usePreviewGhostLayer.js +10 -11
- package/dist/canvas/SceneCanvas/useSceneCanvasHandle.js +1 -2
- package/dist/canvas/SceneCanvas/useSceneCanvasLayers.js +6 -7
- package/dist/canvas/SceneCanvas/useSceneCanvasPathEdit.js +1 -2
- package/dist/canvas/SceneCanvas/useSceneCanvasTools.js +1 -2
- package/dist/canvas/SceneCanvas/useSceneChrome.js +5 -6
- package/dist/canvas/SceneCanvas/useSceneGestureDispatcher.js +6 -7
- package/dist/canvas/SceneCanvas/useScenePicking.js +5 -6
- package/dist/canvas/SceneCanvas/useSceneRedrawSources.js +1 -2
- package/dist/canvas/SceneCanvas/useSceneSelectTool.js +7 -8
- package/dist/canvas/SceneCanvas/useSceneSlotLayers.js +2 -3
- package/dist/canvas/SceneCanvas/useSceneStandardActions.js +26 -18
- package/dist/canvas/SceneCanvas/useSceneStandardActions.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSelectionOverlayLayer.js +2 -3
- package/dist/canvas/SceneCanvas/useSurfaceRouting.js +1 -2
- package/dist/canvas/SceneCanvas/useSurfaceViewInputs.js +1 -2
- package/dist/canvas/SceneCanvas/useToolKeybindings.js +1 -2
- package/dist/canvas/SceneCanvas/useViewportActions.js +3 -4
- package/dist/canvas/SceneCanvas/worldPointAt.js +1 -2
- package/dist/canvas/SceneCanvas.js +18 -17
- package/dist/canvas/SceneCanvas.js.map +1 -1
- package/dist/canvas/SceneViewCanvas.js +2 -3
- package/dist/canvas/SurfaceCanvas.js +1 -2
- package/dist/canvas/ViewMarker.js +1 -2
- package/dist/canvas/accentColor.js +4 -5
- package/dist/canvas/accentColor.js.map +1 -1
- package/dist/canvas/adapterDerivedPath.js +2 -3
- package/dist/canvas/adapterPickSource.js +1 -2
- package/dist/canvas/affordanceAt.js +2 -3
- package/dist/canvas/buildSceneLayer.js +4 -5
- package/dist/canvas/buildSceneTree.js +4 -5
- package/dist/canvas/canvasRenderer.js +1 -2
- package/dist/canvas/colorOverrides.js +1 -2
- package/dist/canvas/contextAttributes.js +1 -2
- package/dist/canvas/copiesAbove.js +1 -2
- package/dist/canvas/defaultDrawOne.js +1 -2
- package/dist/canvas/deps/areaSelect.js +5 -3
- package/dist/canvas/deps/areaSelect.js.map +1 -1
- package/dist/canvas/deps/booleans.js +5 -6
- package/dist/canvas/deps/changes.js +1 -2
- package/dist/canvas/deps/chromeRules.js +1 -2
- package/dist/canvas/deps/debug.js +1 -2
- package/dist/canvas/deps/dispatchSources.js +1 -2
- package/dist/canvas/deps/dispatcher.js +1 -2
- package/dist/canvas/deps/editAnchors.js +3 -4
- package/dist/canvas/deps/enteredGroup.js +6 -6
- package/dist/canvas/deps/enteredGroup.js.map +1 -1
- package/dist/canvas/deps/geometryProjection.js +1 -2
- package/dist/canvas/deps/hitTestArea.js +4 -5
- package/dist/canvas/deps/ingestion.js +1 -2
- package/dist/canvas/deps/insert.js +3 -4
- package/dist/canvas/deps/insertSite.js +3 -4
- package/dist/canvas/deps/kitSettings.js +1 -2
- package/dist/canvas/deps/lassoSelect.js +5 -3
- package/dist/canvas/deps/lassoSelect.js.map +1 -1
- package/dist/canvas/deps/layout.js +1 -2
- package/dist/canvas/deps/modeDefaultTool.js +1 -2
- package/dist/canvas/deps/nodeAtPoint.js +1 -2
- package/dist/canvas/deps/pathEditCommits.js +4 -5
- package/dist/canvas/deps/pathLeaf.js +1 -2
- package/dist/canvas/deps/pathLeafDeps.js +2 -3
- package/dist/canvas/deps/poseDescriptor.js +1 -2
- package/dist/canvas/deps/previewPaths.js +1 -2
- package/dist/canvas/deps/resizePolicy.js +1 -2
- package/dist/canvas/deps/selectionSnapshot.js +8 -4
- package/dist/canvas/deps/selectionSnapshot.js.map +1 -1
- package/dist/canvas/deps/slice.js +5 -6
- package/dist/canvas/deps/snap.js +3 -4
- package/dist/canvas/deps/surface.js +1 -2
- package/dist/canvas/deps/textEdit.js +1 -2
- package/dist/canvas/deps/transformFollowers.js +1 -2
- package/dist/canvas/deps/view.js +1 -2
- package/dist/canvas/derivedPath.js +6 -7
- package/dist/canvas/doubleClickTarget.js +1 -2
- package/dist/canvas/drawEnvelope.js +1 -2
- package/dist/canvas/drawnBounds.js +4 -5
- package/dist/canvas/getNodeAtPoint.js +1 -2
- package/dist/canvas/hostAnchor.js +1 -2
- package/dist/canvas/hud.module.js +1 -2
- package/dist/canvas/inheritedPaints.js +1 -2
- package/dist/canvas/insertPreviewExtent.js +1 -2
- package/dist/canvas/kitRequirements.js +1 -2
- package/dist/canvas/layerHover.js +1 -2
- package/dist/canvas/layerOrder.js +1 -2
- package/dist/canvas/layerSlots.js +1 -2
- package/dist/canvas/mountedCanvases.js +1 -2
- package/dist/canvas/nodeShapes/derivedPainter.js +2 -3
- package/dist/canvas/nodeShapes/imagePainter.js +1 -2
- package/dist/canvas/nodeShapes/measurePainter.js +2 -3
- package/dist/canvas/nodeShapes/memo.js +1 -2
- package/dist/canvas/nodeShapes/nodePaint.js +1 -2
- package/dist/canvas/nodeShapes/pathPainter.js +3 -4
- package/dist/canvas/nodeShapes/poseBox.js +1 -2
- package/dist/canvas/nodeShapes/rectFallbackPainter.js +1 -2
- package/dist/canvas/nodeShapes/shapePainter.js +2 -3
- package/dist/canvas/nodeShapes/strokedBounds.js +1 -2
- package/dist/canvas/nodeShapes/textPainter.js +1 -2
- package/dist/canvas/overChildren.js +1 -2
- package/dist/canvas/overlayRoleStrokes.js +1 -2
- package/dist/canvas/ownClip.js +1 -2
- package/dist/canvas/paintCull.js +1 -2
- package/dist/canvas/paintedCursorLayer.js +1 -2
- package/dist/canvas/pathOverlay.js +1 -2
- package/dist/canvas/pickIndex/nodeBroadBox.js +3 -4
- package/dist/canvas/pickIndex/scenePickIndex.js +3 -4
- package/dist/canvas/pickReach.js +1 -2
- package/dist/canvas/pickWalk.js +2 -3
- package/dist/canvas/planeClips.js +1 -2
- package/dist/canvas/poseRotation.js +1 -2
- package/dist/canvas/publishPreviews.js +1 -2
- package/dist/canvas/rasterReadback.js +1 -2
- package/dist/canvas/rasterToPng.js +1 -2
- package/dist/canvas/renderDebugSnapshot.js +1 -2
- package/dist/canvas/renderNeeds.js +1 -2
- package/dist/canvas/renderSceneToPixels.js +5 -6
- package/dist/canvas/sceneAdapter.js +37 -27
- package/dist/canvas/sceneAdapter.js.map +1 -1
- package/dist/canvas/sceneClipboard.js +19 -7
- package/dist/canvas/sceneClipboard.js.map +1 -1
- package/dist/canvas/sceneLayerPaint.js +1 -2
- package/dist/canvas/scenePickReads.js +1 -2
- package/dist/canvas/scenePickSource.js +5 -6
- package/dist/canvas/sceneSlotWiring.js +2 -3
- package/dist/canvas/sceneViewRender.js +5 -6
- package/dist/canvas/shownNodes.js +1 -2
- package/dist/canvas/slopsDebugLayer.js +9 -4
- package/dist/canvas/slopsDebugLayer.js.map +1 -1
- package/dist/canvas/surfaceContribution.js +1 -2
- package/dist/canvas/useCanvasElements.js +1 -2
- package/dist/canvas/useCanvasHandle.js +1 -2
- package/dist/canvas/useCanvasPaint.js +2 -3
- package/dist/canvas/useCanvasRenderer.js +1 -2
- package/dist/canvas/useCanvasSurface.js +1 -2
- package/dist/canvas/useCanvasView.js +2 -3
- package/dist/canvas/useClientToWorld.js +1 -2
- package/dist/canvas/useExtraLayers.js +1 -2
- package/dist/canvas/useFrameLoop.js +1 -2
- package/dist/canvas/useHitObserver.js +1 -2
- package/dist/canvas/useHostAnchor.js +1 -2
- package/dist/canvas/useInFlightBounds.js +6 -6
- package/dist/canvas/useInFlightBounds.js.map +1 -1
- package/dist/canvas/useLateContentRedraw.js +1 -2
- package/dist/canvas/useLayerStack.js +2 -3
- package/dist/canvas/usePaintedCursor.js +1 -2
- package/dist/canvas/useRedrawOn.js +1 -2
- package/dist/canvas/useSceneAdapter.js +1 -2
- package/dist/canvas/useSceneLayerList.js +1 -2
- package/dist/canvas/useSurfaceInput.js +1 -2
- package/dist/canvas/useSurfaceSize.js +1 -2
- package/dist/canvas/useToolCursor.js +1 -2
- package/dist/canvas/useViewAim.js +2 -3
- package/dist/canvas/useViewHelpers.js +5 -4
- package/dist/canvas/useViewHelpers.js.map +1 -1
- package/dist/canvas/useViewLayerGate.js +1 -2
- package/dist/canvas/useViewNesting.js +1 -2
- package/dist/canvas/useViewRegistrySurface.js +7 -5
- package/dist/canvas/useViewRegistrySurface.js.map +1 -1
- package/dist/canvas/viewInputs.js +1 -2
- package/dist/canvas/viewMarkers.js +1 -2
- package/dist/canvas/viewRegistry.js +6 -7
- package/dist/canvas/viewRegistry.js.map +1 -1
- package/dist/canvas/viewSnap.js +1 -2
- package/dist/canvas/watchElementMove.js +1 -2
- package/dist/canvas/wrapNodeOutput.js +1 -2
- package/dist/core/adapters/testing/rootsTree.js +1 -2
- package/dist/core/applyOps.js +1 -2
- package/dist/core/device/targets.js +1 -2
- package/dist/core/device/useDeviceProfile.js +1 -2
- package/dist/core/device/useTargetBasePx.js +1 -2
- package/dist/core/device/watchDevicePixelRatio.js +1 -2
- package/dist/core/geometry/autoPoseDescriptor.js +2 -3
- package/dist/core/geometry/booleanOfPaths.js +1 -2
- package/dist/core/geometry/inkExtents.js +1 -2
- package/dist/core/geometry/pathPoseDescriptor.js +1 -2
- package/dist/core/geometry/poseDescriptor.js +1 -2
- package/dist/core/geometry/regionHit.js +1 -2
- package/dist/core/geometry/targetFrame.js +1 -2
- package/dist/core/geometry/unionBounds.js +1 -2
- package/dist/core/layers/backgroundFill.js +1 -2
- package/dist/core/layers/children.js +1 -2
- package/dist/core/layers/gateLayer.js +1 -2
- package/dist/core/layers/layerGroup.js +1 -2
- package/dist/core/layers/redrawSource.js +1 -2
- package/dist/core/layers/render.js +1 -2
- package/dist/core/layers/retain.js +1 -2
- package/dist/core/ops/arrange.js +1 -2
- package/dist/core/ops/create.js +2 -3
- package/dist/core/ops/createHistory.js +2 -3
- package/dist/core/ops/delete.js +2 -3
- package/dist/core/ops/nodeFlags.js +1 -2
- package/dist/core/ops/registry.js +1 -2
- package/dist/core/ops/reorder/algorithms.js +1 -2
- package/dist/core/ops/reorder/index.js +3 -8
- package/dist/core/ops/reorder/index.js.map +1 -1
- package/dist/core/ops/reorder/setChildOrder.js +1 -2
- package/dist/core/ops/reparent.js +1 -2
- package/dist/core/ops/select.js +1 -2
- package/dist/core/ops/setData.js +1 -2
- package/dist/core/ops/setDependsOn.js +1 -2
- package/dist/core/ops/setLayer.js +1 -2
- package/dist/core/ops/setLayout.js +1 -2
- package/dist/core/ops/setPath.js +1 -2
- package/dist/core/ops/setText.js +1 -2
- package/dist/core/ops/slot.js +1 -2
- package/dist/core/ops/transform.js +1 -2
- package/dist/core/ops/writtenBy.js +1 -2
- package/dist/core/pages/fitViewToPage.js +3 -9
- package/dist/core/pages/fitViewToPage.js.map +1 -1
- package/dist/core/pages/pageEdits.js +3 -4
- package/dist/core/pages/pages.js +4 -11
- package/dist/core/pages/pages.js.map +1 -1
- package/dist/core/pages/pagesLayer.js +1 -2
- package/dist/core/paint/meshKind.js +1 -2
- package/dist/core/paint/meshKindLazy.js +18 -23
- package/dist/core/paint/meshKindLazy.js.map +1 -1
- package/dist/core/paint/paintKindEntry.js +1 -2
- package/dist/core/paint/paintKinds.js +1 -2
- package/dist/core/paint/registerMesh.js +1 -2
- package/dist/core/scene/NodeProperties.js +1 -2
- package/dist/core/scene/NodeRouting.js +1 -2
- package/dist/core/scene/annotation.js +1 -2
- package/dist/core/scene/appliedLog.js +1 -2
- package/dist/core/scene/arrivalWindow.js +2 -3
- package/dist/core/scene/arrivals.js +1 -2
- package/dist/core/scene/booleanGroup.js +1 -2
- package/dist/core/scene/booleanOfChildren.js +1 -2
- package/dist/core/scene/boundOps.js +1 -2
- package/dist/core/scene/carryDescendants.js +2 -3
- package/dist/core/scene/clipNothing.js +1 -2
- package/dist/core/scene/composeFrame.js +1 -2
- package/dist/core/scene/composePose.js +1 -2
- package/dist/core/scene/declaredFieldSetters.js +1 -2
- package/dist/core/scene/depFrame.js +1 -2
- package/dist/core/scene/depMemo.js +1 -2
- package/dist/core/scene/dependents.js +1 -2
- package/dist/core/scene/derivedParts.js +1 -2
- package/dist/core/scene/derivedPath.js +2 -3
- package/dist/core/scene/docValues.js +1 -2
- package/dist/core/scene/documentOf.js +1 -2
- package/dist/core/scene/editMode.js +1 -2
- package/dist/core/scene/editPass.js +1 -2
- package/dist/core/scene/effectivePose.js +3 -4
- package/dist/core/scene/fieldEdits.js +1 -2
- package/dist/core/scene/fontReads.js +1 -2
- package/dist/core/scene/historyFacade.js +1 -2
- package/dist/core/scene/historyForm.js +1 -2
- package/dist/core/scene/inheritedPaint.js +1 -2
- package/dist/core/scene/kitOps.js +16 -15
- package/dist/core/scene/kitOps.js.map +1 -1
- package/dist/core/scene/kitRegistry.js +2 -3
- package/dist/core/scene/layerOps.js +1 -2
- package/dist/core/scene/layerStack.js +1 -2
- package/dist/core/scene/layoutPass.js +4 -5
- package/dist/core/scene/lockGuard.js +1 -2
- package/dist/core/scene/minSize.js +1 -2
- package/dist/core/scene/nestedHit.js +1 -2
- package/dist/core/scene/nodeAsShown.js +1 -2
- package/dist/core/scene/nodeFlags.js +1 -2
- package/dist/core/scene/nodeFnFields.js +1 -2
- package/dist/core/scene/nodeGates.js +1 -2
- package/dist/core/scene/nodeMemo.js +1 -2
- package/dist/core/scene/nodeStore.js +2 -3
- package/dist/core/scene/notifier.js +1 -2
- package/dist/core/scene/opTable.js +1 -2
- package/dist/core/scene/outerOps.js +1 -2
- package/dist/core/scene/pathEffects/blend.js +3 -4
- package/dist/core/scene/pathEffects/blend.js.map +1 -1
- package/dist/core/scene/pathEffects/derive.js +2 -3
- package/dist/core/scene/pathEffects/effects.js +1 -2
- package/dist/core/scene/pathEffects/foundHidden.js +1 -2
- package/dist/core/scene/pathEffects/textAlong.js +6 -6
- package/dist/core/scene/pathEffects/textAlong.js.map +1 -1
- package/dist/core/scene/pathEffects/textAlongBands.js +1 -2
- package/dist/core/scene/plyStacks.js +1 -2
- package/dist/core/scene/poseFeed.js +1 -2
- package/dist/core/scene/poseHold.js +1 -2
- package/dist/core/scene/poseOverrides.js +1 -2
- package/dist/core/scene/posePlies.js +1 -2
- package/dist/core/scene/poseRemovals.js +1 -2
- package/dist/core/scene/poseSnapshot.js +1 -2
- package/dist/core/scene/poseWrites.js +1 -2
- package/dist/core/scene/reconcileSpecs.js +26 -3
- package/dist/core/scene/reconcileSpecs.js.map +1 -1
- package/dist/core/scene/recorder.js +1 -2
- package/dist/core/scene/renderOrder.js +1 -2
- package/dist/core/scene/sameValue.js +1 -2
- package/dist/core/scene/scene.js +23 -13
- package/dist/core/scene/scene.js.map +1 -1
- package/dist/core/scene/sceneChanges.js +1 -2
- package/dist/core/scene/sceneEdits.js +1 -2
- package/dist/core/scene/sceneJournals.js +1 -2
- package/dist/core/scene/sceneMutators.js +2 -3
- package/dist/core/scene/scenePoseAdapter.js +1 -2
- package/dist/core/scene/sceneRecording.js +1 -2
- package/dist/core/scene/sceneSelection.js +8 -5
- package/dist/core/scene/sceneSelection.js.map +1 -1
- package/dist/core/scene/sceneState.js +3 -4
- package/dist/core/scene/scrollOffsets.js +1 -2
- package/dist/core/scene/serialization.js +2 -3
- package/dist/core/scene/staleReplay.js +1 -2
- package/dist/core/scene/statedFields.js +1 -2
- package/dist/core/scene/strategyView.js +1 -2
- package/dist/core/scene/treeEdits.js +2 -3
- package/dist/core/scene/treeOrder.js +1 -2
- package/dist/core/scene/treeReads.js +1 -2
- package/dist/core/scene/treeShape.js +1 -2
- package/dist/core/scene/types.js +1 -2
- package/dist/core/scene/types.js.map +1 -1
- package/dist/core/scene/unionOfChildren.js +1 -2
- package/dist/core/scene/unitScopes.js +20 -4
- package/dist/core/scene/unitScopes.js.map +1 -1
- package/dist/core/scene/useScene.js +2 -3
- package/dist/core/scene/worldSave.js +2 -3
- package/dist/core/selection/chromeState.js +1 -2
- package/dist/core/selection/outermostSelection.js +56 -0
- package/dist/core/selection/outermostSelection.js.map +1 -0
- package/dist/core/selection/readOnlySelection.js +1 -2
- package/dist/core/selection/selectionTarget.js +1 -2
- package/dist/core/selection/usePublishSceneSelection.js +1 -2
- package/dist/core/selection/useSelection.js +1 -2
- package/dist/core/shapeKinds.js +1 -2
- package/dist/core/stableStringify.js +1 -2
- package/dist/core/stylus/stylus.js +1 -2
- package/dist/core/stylus/usePointerStylus.js +1 -2
- package/dist/core/usePaintKinds.js +1 -2
- package/dist/core/viewport/clampView.js +1 -2
- package/dist/core/viewport/clientToWorld.js +8 -3
- package/dist/core/viewport/clientToWorld.js.map +1 -1
- package/dist/core/viewport/createVelocityTracker.js +1 -2
- package/dist/core/viewport/fitToBounds.js +1 -2
- package/dist/core/viewport/fitViewToBounds.js +1 -2
- package/dist/core/viewport/interpolateView.js +1 -2
- package/dist/core/viewport/parallax.js +1 -2
- package/dist/core/viewport/sceneNodeClientRect.js +1 -2
- package/dist/core/viewport/screenSlop.js +1 -2
- package/dist/core/viewport/useAutoCenter.js +1 -2
- package/dist/core/viewport/useCanvasSize.js +1 -2
- package/dist/core/viewport/useDecayLoop.js +1 -2
- package/dist/core/viewport/useNodeOverlayFrame.js +1 -2
- package/dist/core/viewport/useVelocityTracker.js +1 -2
- package/dist/core/viewport/useViewAnimation.js +3 -4
- package/dist/core/viewport/view.js +1 -2
- package/dist/core/viewport/viewTransform.js +1 -2
- package/dist/core/viewport/viewportWorldRect.js +1 -2
- package/dist/core/viewport/wheelHandler.js +1 -2
- package/dist/core/viewport/zoomAt.js +7 -8
- package/dist/core/viewport/zoomAt.js.map +1 -1
- package/dist/core/viewport/zoomBounds.js +1 -2
- package/dist/debug/createDebugOverlayLayer.js +1 -2
- package/dist/debug/createDebugSink.js +1 -2
- package/dist/debug/defaultTheme.js +1 -2
- package/dist/debug/features.js +1 -2
- package/dist/debug/frameStats.js +1 -2
- package/dist/debug/overlayPanels.js +1 -2
- package/dist/debug/parseDebugFlags.js +1 -2
- package/dist/debug/useDebugSink.js +2 -3
- package/dist/{depSchema-ChQPzEkW.d.ts → depSchema-C7a_OMt-.d.ts} +61 -52
- package/dist/devtools/handlers.js +1 -2
- package/dist/devtools/history.js +1 -2
- package/dist/devtools/hook.js +1 -2
- package/dist/devtools/label.js +1 -2
- package/dist/devtools/notices.js +1 -2
- package/dist/devtools/protocol.js +1 -2
- package/dist/devtools/registry.js +1 -2
- package/dist/devtools/root.js +12 -6
- package/dist/devtools/root.js.map +1 -1
- package/dist/devtools/serialize.js +1 -2
- package/dist/devtools/session.js +2 -3
- package/dist/devtools/transport.js +13 -18
- package/dist/devtools/transport.js.map +1 -1
- package/dist/devtools/useDevtoolsRoot.js +1 -2
- package/dist/devtools-protocol.d.ts +1 -12
- package/dist/devtools-protocol.js +2 -2
- package/dist/devtools.d.ts +1 -1
- package/dist/devtools.js +1 -2
- package/dist/domains/chrome-caps/buildChromeCtx.js +1 -2
- package/dist/domains/chrome-caps/conditions.js +1 -2
- package/dist/domains/chrome-caps/defaults.js +1 -2
- package/dist/domains/chrome-caps/resolve.js +2 -3
- package/dist/domains/chrome-caps/useChromeCaps.js +1 -2
- package/dist/domains/chrome-caps/useHoverTracking.js +1 -2
- package/dist/domains/ingestion/contentHandlers.js +1 -2
- package/dist/domains/ingestion/ghost.js +2 -3
- package/dist/domains/ingestion/imageHandler.js +1 -2
- package/dist/domains/ingestion/kitHandlers.js +2 -3
- package/dist/domains/ingestion/openFilePicker.js +1 -2
- package/dist/domains/ingestion/placement.js +1 -2
- package/dist/domains/ingestion/svgHandler.js +1 -2
- package/dist/domains/ingestion/textHandler.js +1 -2
- package/dist/domains/ingestion/useCanvasIngestion.js +1 -2
- package/dist/domains/ingestion/weaselJsonHandler.js +2 -3
- package/dist/domains/longPress/longPressFeedback.js +1 -2
- package/dist/domains/measure/actionIds.js +1 -2
- package/dist/domains/measure/measureCommands.js +6 -7
- package/dist/domains/measure/measureContribution.js +3 -4
- package/dist/domains/measure/measureEdits.js +3 -4
- package/dist/domains/measure/measureGestures.js +2 -3
- package/dist/domains/measure/measureHit.js +5 -12
- package/dist/domains/measure/measureHit.js.map +1 -1
- package/dist/domains/measure/measureLayer.js +3 -4
- package/dist/domains/measure/measurement.js +1 -2
- package/dist/domains/measure/measurements.js +1 -2
- package/dist/domains/modes/modeLayers.js +1 -2
- package/dist/domains/modes/modeTriggers.js +1 -2
- package/dist/domains/pathEffects/effectSources.js +2 -3
- package/dist/domains/pathEffects/index.js +1 -2
- package/dist/domains/pathEffects/readSource.js +3 -4
- package/dist/domains/pathEffects/textItems.js +1 -2
- package/dist/domains/pathEffects/useEffectSourcesLayer.js +3 -4
- package/dist/domains/paths/anchorData.js +1 -2
- package/dist/domains/paths/anchorMarkers.js +6 -13
- package/dist/domains/paths/anchorMarkers.js.map +1 -1
- package/dist/domains/paths/editablePath.js +3 -4
- package/dist/domains/paths/originProjection.js +1 -2
- package/dist/domains/paths/pathEditExtension.js +1 -2
- package/dist/domains/paths/pathEditState.js +1 -2
- package/dist/domains/paths/pathEditingOverlayLayer.js +7 -12
- package/dist/domains/paths/pathEditingOverlayLayer.js.map +1 -1
- package/dist/domains/paths/pathLayer.js +1 -2
- package/dist/domains/paths/pathRepresentation.js +1 -2
- package/dist/domains/paths/pathSnap/glyphs.js +1 -2
- package/dist/domains/paths/pathSnap/pathSnapSource.js +1 -2
- package/dist/domains/paths/pathSnap/sceneIndex.js +1 -2
- package/dist/domains/paths/pathSnap/snapGeometry.js +2 -3
- package/dist/domains/paths/penPreviewLayer.js +10 -14
- package/dist/domains/paths/penPreviewLayer.js.map +1 -1
- package/dist/domains/paths/shapeGenerator.js +2 -4
- package/dist/domains/paths/shapeGenerator.js.map +1 -1
- package/dist/domains/paths/strokeOutline.js +2 -3
- package/dist/domains/paths/useAnchorFields.js +1 -2
- package/dist/domains/paths/usePathEdit.js +2 -3
- package/dist/domains/poseRun/usePoseRun.js +1 -2
- package/dist/domains/selection/enteredGroupFrame.js +1 -2
- package/dist/domains/selection/enteredGroupScope.js +1 -2
- package/dist/domains/selection/enteredOperands.js +1 -2
- package/dist/domains/selection/handleCommands.js +2 -3
- package/dist/domains/selection/overlay.js +6 -7
- package/dist/domains/selection/selectionPose.js +2 -3
- package/dist/domains/snap/angle2d.js +3 -3
- package/dist/domains/snap/angle2d.js.map +1 -1
- package/dist/domains/snap/debugCandidates.js +1 -2
- package/dist/domains/snap/gather.js +1 -2
- package/dist/domains/snap/inputSubspace.js +2 -3
- package/dist/domains/snap/lazySession.js +1 -2
- package/dist/domains/snap/marks.js +1 -2
- package/dist/domains/snap/outcomeStore.js +6 -10
- package/dist/domains/snap/outcomeStore.js.map +1 -1
- package/dist/domains/snap/pointSnap.js +1 -2
- package/dist/domains/snap/probes2d.js +1 -2
- package/dist/domains/snap/readoutDraw.js +1 -2
- package/dist/domains/snap/readoutLayer.js +1 -2
- package/dist/domains/snap/registry.js +1 -2
- package/dist/domains/snap/resizeBox.js +1 -2
- package/dist/domains/snap/roles.js +1 -2
- package/dist/domains/snap/rotationSource.js +1 -2
- package/dist/domains/snap/sceneReads.js +2 -3
- package/dist/domains/snap/sceneSession2d.js +2 -3
- package/dist/domains/snap/screen.js +2 -3
- package/dist/domains/snap/session2d.js +4 -5
- package/dist/domains/snap/spanSnap.js +1 -2
- package/dist/domains/snap/stepAngles.js +1 -2
- package/dist/domains/text/editingDrawOne.js +1 -2
- package/dist/domains/text/hostTextEditors.js +1 -2
- package/dist/domains/text/sceneTextDrafts.js +1 -2
- package/dist/domains/text/textHitAt.js +4 -5
- package/dist/domains/text/textLayer.js +12 -2
- package/dist/domains/text/textLayer.js.map +1 -1
- package/dist/domains/text/useSceneTextEdit.js +13 -9
- package/dist/domains/text/useSceneTextEdit.js.map +1 -1
- package/dist/domains/viewports/aim.js +6 -12
- package/dist/domains/viewports/aim.js.map +1 -1
- package/dist/domains/viewports/viewMarker.js +1 -2
- package/dist/domains/viewports/viewMarkerDrag.js +1 -2
- package/dist/domains/viewports/viewResolver.js +6 -5
- package/dist/domains/viewports/viewResolver.js.map +1 -1
- package/dist/domains/viewports/viewportLayer.js +1 -2
- package/dist/iconRegistry/IconRegistryProvider.js +1 -2
- package/dist/iconRegistry/useIconGlyph.js +1 -2
- package/dist/iconRegistry/useIconVariant.js +1 -2
- package/dist/icons.table.js +1 -2
- package/dist/icons2.table.js +1 -2
- package/dist/index.d.ts +70 -27
- package/dist/index.js +7 -5
- package/dist/input/keyState.js +1 -2
- package/dist/input/useKeyModifiers.js +1 -2
- package/dist/input/useKeyState.js +1 -2
- package/dist/input/usePublishPointer.js +59 -0
- package/dist/input/usePublishPointer.js.map +1 -0
- package/dist/interactions/actions/admitsChild.js +1 -2
- package/dist/interactions/actions/align/action.js +6 -7
- package/dist/interactions/actions/align/align.js +6 -7
- package/dist/interactions/actions/booleans/action.js +1 -2
- package/dist/interactions/actions/booleans/booleanGroupAction.js +2 -3
- package/dist/interactions/actions/booleans/booleans.js +1 -2
- package/dist/interactions/actions/booleans/commit.js +4 -5
- package/dist/interactions/actions/booleans/custom.js +2 -3
- package/dist/interactions/actions/booleans/keymap.js +1 -2
- package/dist/interactions/actions/booleans/operands.js +1 -2
- package/dist/interactions/actions/booleans/pieces.js +1 -2
- package/dist/interactions/actions/booleans/placement.js +1 -2
- package/dist/interactions/actions/booleans/useBooleans.js +1 -2
- package/dist/interactions/actions/booleans/useBooleansAdapter.js +1 -2
- package/dist/interactions/actions/clipboard/action.js +2 -3
- package/dist/interactions/actions/clipboard/clipboardOps.js +2 -3
- package/dist/interactions/actions/clipboard/materializePaste.js +1 -2
- package/dist/interactions/actions/clipboard/wireFormat.js +1 -2
- package/dist/interactions/actions/clone/action.js +7 -8
- package/dist/interactions/actions/clone/behaviors.js +4 -5
- package/dist/interactions/actions/defaultCommitAdapter.js +2 -3
- package/dist/interactions/actions/defaults/anchorEditing.js +3 -4
- package/dist/interactions/actions/defaults/anchorFields.js +1 -2
- package/dist/interactions/actions/defaults/anchorHandles.js +2 -3
- package/dist/interactions/actions/defaults/anchorJoin.js +2 -3
- package/dist/interactions/actions/defaults/areaSelect.js +6 -6
- package/dist/interactions/actions/defaults/areaSelect.js.map +1 -1
- package/dist/interactions/actions/defaults/bendSegment.js +3 -4
- package/dist/interactions/actions/defaults/cancelGesture.js +1 -2
- package/dist/interactions/actions/defaults/clearSelection.js +1 -2
- package/dist/interactions/actions/defaults/containerScroll.js +13 -8
- package/dist/interactions/actions/defaults/containerScroll.js.map +1 -1
- package/dist/interactions/actions/defaults/contextMenu.js +6 -7
- package/dist/interactions/actions/defaults/copySubtree.js +2 -3
- package/dist/interactions/actions/defaults/createPaintAction.js +3 -4
- package/dist/interactions/actions/defaults/delete.js +2 -3
- package/dist/interactions/actions/defaults/duplicate.js +5 -6
- package/dist/interactions/actions/defaults/enterGroup.js +5 -6
- package/dist/interactions/actions/defaults/enterGroup.js.map +1 -1
- package/dist/interactions/actions/defaults/enterPathEdit.js +1 -2
- package/dist/interactions/actions/defaults/enterTextEdit.js +1 -2
- package/dist/interactions/actions/defaults/escape.js +1 -2
- package/dist/interactions/actions/defaults/exitPathEdit.js +1 -2
- package/dist/interactions/actions/defaults/group.js +6 -7
- package/dist/interactions/actions/defaults/ingest.js +3 -4
- package/dist/interactions/actions/defaults/insertPathAnchor.js +2 -3
- package/dist/interactions/actions/defaults/nudge.js +3 -4
- package/dist/interactions/actions/defaults/nudgeSteps.js +2 -3
- package/dist/interactions/actions/defaults/nudgeSteps.js.map +1 -1
- package/dist/interactions/actions/defaults/pathEditMarks.js +3 -7
- package/dist/interactions/actions/defaults/pathEditMarks.js.map +1 -1
- package/dist/interactions/actions/defaults/pinchZoom.js +3 -4
- package/dist/interactions/actions/defaults/reorder.js +2 -3
- package/dist/interactions/actions/defaults/requiresSelection.js +1 -2
- package/dist/interactions/actions/defaults/segmentUnder.js +1 -2
- package/dist/interactions/actions/defaults/selectAll.js +1 -2
- package/dist/interactions/actions/defaults/selectDeep.js +1 -2
- package/dist/interactions/actions/defaults/setFill.js +1 -2
- package/dist/interactions/actions/defaults/setFillOpacity.js +1 -2
- package/dist/interactions/actions/defaults/setStroke.js +1 -2
- package/dist/interactions/actions/defaults/setStrokeOpacity.js +1 -2
- package/dist/interactions/actions/defaults/slice.js +1 -2
- package/dist/interactions/actions/defaults/sliceOps.js +1 -2
- package/dist/interactions/actions/defaults/toolActivate.js +1 -2
- package/dist/interactions/actions/defaults/toolResetToDefault.js +1 -2
- package/dist/interactions/actions/defaults/undoRedo.js +1 -2
- package/dist/interactions/actions/defaults/viewportDragPan.js +1 -2
- package/dist/interactions/actions/defaults/viewportWheelPan.js +1 -2
- package/dist/interactions/actions/defaults/viewportZoom.js +3 -4
- package/dist/interactions/actions/distribute/action.js +4 -5
- package/dist/interactions/actions/distribute/distribute.js +5 -6
- package/dist/interactions/actions/distribute/plan.js +1 -2
- package/dist/interactions/actions/drawnBoxes.js +4 -5
- package/dist/interactions/actions/dropVerdict.js +1 -2
- package/dist/interactions/actions/edit-anchors/action.js +4 -5
- package/dist/interactions/actions/edit-anchors/extensionDrags.js +1 -2
- package/dist/interactions/actions/edit-anchors/geometry.js +1 -2
- package/dist/interactions/actions/edit-anchors/handleDrag.js +5 -9
- package/dist/interactions/actions/edit-anchors/handleDrag.js.map +1 -1
- package/dist/interactions/actions/edit-anchors/handles.js +1 -2
- package/dist/interactions/actions/edit-anchors/params.js +1 -2
- package/dist/interactions/actions/edit-anchors/preview.js +1 -2
- package/dist/interactions/actions/edit-anchors/symmetry.js +1 -2
- package/dist/interactions/actions/flip/action.js +8 -9
- package/dist/interactions/actions/flip/helpers.js +1 -2
- package/dist/interactions/actions/geometryProjection.js +1 -2
- package/dist/interactions/actions/gestureFrames.js +3 -4
- package/dist/interactions/actions/gestureLifecycle.js +1 -2
- package/dist/interactions/actions/hitSelection.js +7 -3
- package/dist/interactions/actions/hitSelection.js.map +1 -1
- package/dist/interactions/actions/insert/action.js +6 -7
- package/dist/interactions/actions/insert/commit.js +2 -3
- package/dist/interactions/actions/insert/extras.js +1 -2
- package/dist/interactions/actions/insert/frame.js +1 -2
- package/dist/interactions/actions/insert/geometry.js +1 -2
- package/dist/interactions/actions/insert/params.js +2 -3
- package/dist/interactions/actions/insert/parent.js +1 -2
- package/dist/interactions/actions/insert/placeAction.js +5 -6
- package/dist/interactions/actions/insert/repositionAction.js +1 -2
- package/dist/interactions/actions/insert/rotateAction.js +1 -2
- package/dist/interactions/actions/insert/session.js +5 -6
- package/dist/interactions/actions/insert/shape.js +2 -3
- package/dist/interactions/actions/lasso-select/action.js +9 -9
- package/dist/interactions/actions/lasso-select/action.js.map +1 -1
- package/dist/interactions/actions/lasso-select/behaviors/selectFromLasso.js +2 -3
- package/dist/interactions/actions/magnification.js +37 -0
- package/dist/interactions/actions/magnification.js.map +1 -0
- package/dist/interactions/actions/move/action.js +2 -3
- package/dist/interactions/actions/move/behaviors/clampMove.js +42 -0
- package/dist/interactions/actions/move/behaviors/clampMove.js.map +1 -0
- package/dist/interactions/actions/move/behaviors/layoutDrop.js +2 -3
- package/dist/interactions/actions/move/behaviors/reparentOnDrop.js +2 -3
- package/dist/interactions/actions/move/behaviors/snapBackOrDelete.js +1 -2
- package/dist/interactions/actions/move/behaviors/snapToContainer.js +2 -3
- package/dist/interactions/actions/move/capture.js +6 -7
- package/dist/interactions/actions/move/commit/index.js +2 -3
- package/dist/interactions/actions/move/commit/layoutDrop.js +4 -5
- package/dist/interactions/actions/move/commit/layoutRelease.js +7 -8
- package/dist/interactions/actions/move/commit/rebase.js +2 -3
- package/dist/interactions/actions/move/commit/reparent.js +5 -6
- package/dist/interactions/actions/move/delta.js +2 -3
- package/dist/interactions/actions/move/frame.js +2 -3
- package/dist/interactions/actions/move/gestureAdapter.js +1 -2
- package/dist/interactions/actions/move/landedDescendants.js +2 -3
- package/dist/interactions/actions/move/layout/container.js +6 -10
- package/dist/interactions/actions/move/layout/container.js.map +1 -1
- package/dist/interactions/actions/move/layout/dragged.js +2 -3
- package/dist/interactions/actions/move/layout/dropPass.js +5 -6
- package/dist/interactions/actions/move/layout/exits.js +4 -5
- package/dist/interactions/actions/move/layout/exits.js.map +1 -1
- package/dist/interactions/actions/move/layout/glide.js +2 -3
- package/dist/interactions/actions/move/layout/view.js +1 -2
- package/dist/interactions/actions/move/refusal.js +2 -3
- package/dist/interactions/actions/move/session.js +4 -5
- package/dist/interactions/actions/move/translate.js +2 -3
- package/dist/interactions/actions/moveNodes.js +5 -6
- package/dist/interactions/actions/notices.js +1 -2
- package/dist/interactions/actions/outlines/createOutlines.js +1 -2
- package/dist/interactions/actions/outlines/createOutlinesAction.js +2 -3
- package/dist/interactions/actions/outlines/outlineStroke.js +2 -3
- package/dist/interactions/actions/outlines/outlineStrokeAction.js +2 -3
- package/dist/interactions/actions/outlines/replaceWithPaths.js +5 -6
- package/dist/interactions/actions/outlines/strokeRegion.js +1 -2
- package/dist/interactions/actions/outlines/useCreateOutlinesAdapter.js +1 -2
- package/dist/interactions/actions/pathCommands/cutJoin.js +3 -4
- package/dist/interactions/actions/pathCommands/livePathEdit.js +3 -4
- package/dist/interactions/actions/pathCommands/pathNodes.js +3 -4
- package/dist/interactions/actions/pathCommands/simplifyOffset.js +2 -3
- package/dist/interactions/actions/pathGestureTags.js +1 -2
- package/dist/interactions/actions/planeInput.js +2 -3
- package/dist/interactions/actions/pointerState.js +1 -2
- package/dist/interactions/actions/poseDescriptorDep.js +1 -2
- package/dist/interactions/actions/poseFrame.js +3 -4
- package/dist/interactions/actions/resize/action.js +3 -4
- package/dist/interactions/actions/resize/aspect.js +1 -2
- package/dist/interactions/actions/resize/behaviors/clampMinSize.js +1 -2
- package/dist/interactions/actions/resize/boxFrame.js +1 -2
- package/dist/interactions/actions/resize/capture.js +7 -8
- package/dist/interactions/actions/resize/commit.js +3 -4
- package/dist/interactions/actions/resize/cornerHandles.js +1 -2
- package/dist/interactions/actions/resize/frame.js +7 -8
- package/dist/interactions/actions/resize/held.js +2 -3
- package/dist/interactions/actions/resize/minimum.js +1 -2
- package/dist/interactions/actions/resize/replay.js +1 -2
- package/dist/interactions/actions/resize/ruleBounds.js +1 -2
- package/dist/interactions/actions/resize/session.js +9 -10
- package/dist/interactions/actions/resolveOverlays.js +1 -2
- package/dist/interactions/actions/resolvePreviews.js +3 -4
- package/dist/interactions/actions/rotate/action.js +5 -6
- package/dist/interactions/actions/rotate/commit.js +2 -3
- package/dist/interactions/actions/rotate/frame.js +3 -4
- package/dist/interactions/actions/rotate/geometry.js +1 -2
- package/dist/interactions/actions/rotate/handle.js +2 -3
- package/dist/interactions/actions/rotate/replay.js +2 -3
- package/dist/interactions/actions/rotate/session.js +10 -11
- package/dist/interactions/actions/selectionSubtree.js +7 -22
- package/dist/interactions/actions/selectionSubtree.js.map +1 -1
- package/dist/interactions/actions/spatialReference.js +1 -2
- package/dist/interactions/actions/testUtils.js +1 -2
- package/dist/interactions/actions/transform-again/action.js +5 -6
- package/dist/interactions/actions/transform-again/memory.js +3 -4
- package/dist/interactions/actions/transform-again/memory.js.map +1 -1
- package/dist/interactions/actions/transformFinish.js +1 -2
- package/dist/interactions/actions/useActionSet.js +1 -2
- package/dist/interactions/actions/useNotices.js +1 -2
- package/dist/interactions/actions/useStandardActions.js +1 -2
- package/dist/interactions/gestures/dragGesture/dragGesture.js +1 -2
- package/dist/interactions/gestures/dragGesture/dragPointOf.js +1 -2
- package/dist/interactions/gestures/dragRadial/dragRadial.js +2 -3
- package/dist/interactions/gestures/dragRect/dragRect.js +2 -3
- package/dist/interactions/gestures/handleDrag/handleDrag.js +1 -2
- package/dist/interactions/gestures/pointerDrag/pointerDrag.js +1 -2
- package/dist/interactions/gestures/shared/originProjection.js +1 -2
- package/dist/interactions/gestures/shared/screenTolerance.js +1 -2
- package/dist/interactions/gestures/thresholdDrag/thresholdDrag.js +1 -2
- package/dist/kitSettingsSchema.js +4 -5
- package/dist/move.d.ts +18 -3
- package/dist/move.js +2 -1
- package/dist/test-hook/createTestHook.js +1 -2
- package/dist/test-hook/install.js +1 -2
- package/dist/test-hook/useTestHook.js +1 -2
- package/dist/test-seams.d.ts +4 -4
- package/dist/test-seams.js +2 -2
- package/dist/tools/builtin/anchors/anchorsTool.js +1 -2
- package/dist/tools/builtin/ellipse/useEllipseTool.js +2 -3
- package/dist/tools/builtin/eyedropper/useEyedropperTool.js +1 -2
- package/dist/tools/builtin/hand/dragPanContribution.js +1 -2
- package/dist/tools/builtin/hand/useHandTool.js +1 -2
- package/dist/tools/builtin/image/useImageTool.js +1 -2
- package/dist/tools/builtin/lasso/useLassoTool.js +1 -2
- package/dist/tools/builtin/line/useLineTool.js +2 -3
- package/dist/tools/builtin/measure/useMeasureTool.js +2 -3
- package/dist/tools/builtin/pen/penHandle.js +1 -2
- package/dist/tools/builtin/pen/usePenTool.js +6 -7
- package/dist/tools/builtin/pencil/usePencilTool.js +1 -2
- package/dist/tools/builtin/pickTopMostHit.js +1 -2
- package/dist/tools/builtin/polygon/usePolygonTool.js +3 -4
- package/dist/tools/builtin/pressTarget.js +1 -2
- package/dist/tools/builtin/rect/useRectTool.js +2 -3
- package/dist/tools/builtin/select/adapterPointQuery.js +3 -4
- package/dist/tools/builtin/select/collapseDeferred.js +1 -2
- package/dist/tools/builtin/select/groupEntry.js +2 -3
- package/dist/tools/builtin/select/pressDecision.js +3 -4
- package/dist/tools/builtin/select/pressDecision.js.map +1 -1
- package/dist/tools/builtin/select/selectionContributions.js +1 -2
- package/dist/tools/builtin/select/useSelectTool.js +5 -6
- package/dist/tools/builtin/shared/insertToolOptions.js +1 -2
- package/dist/tools/builtin/shared/pointerFollower.js +1 -2
- package/dist/tools/builtin/slice/useSliceTool.js +5 -6
- package/dist/tools/builtin/star/useStarTool.js +3 -4
- package/dist/tools/builtin/sticky/stickyNode.js +1 -2
- package/dist/tools/builtin/sticky/useStickyTool.js +2 -3
- package/dist/tools/builtin/text/useTextTool.js +1 -2
- package/dist/tools/index.js +2 -2
- package/dist/tools/overlayBinding.js +1 -2
- package/dist/tools/toolOptions.js +17 -4
- package/dist/tools/toolOptions.js.map +1 -1
- package/dist/tools/useKeybindings.js +1 -2
- package/dist/{types-DW14eu9B.d.ts → types-BUvUXZe5.d.ts} +3 -3
- package/dist/util/color.js +1 -2
- package/dist/util/paint.js +1 -2
- package/dist/version.js +2 -3
- package/package.json +27 -27
|
@@ -3,7 +3,7 @@ import { overChildren } from "./overChildren.js";
|
|
|
3
3
|
import { textCommandFromRuns } from "@weasel-js/renderer";
|
|
4
4
|
import { INHERIT } from "@weasel-js/paint";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/canvas/defaultDrawOne.ts
|
|
7
7
|
function pixelScaleOf(view) {
|
|
8
8
|
const dpr = typeof window !== "undefined" && window.devicePixelRatio || 1;
|
|
9
9
|
return Math.max(Math.abs(view.scale.x), Math.abs(view.scale.y)) * dpr;
|
|
@@ -73,6 +73,5 @@ function paintBoundsFor(drawOne) {
|
|
|
73
73
|
return drawOne === defaultDrawOne ? defaultPaintBounds : void 0;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
//#endregion
|
|
77
76
|
export { defaultDrawOne, defaultPaintBounds, paintBoundsFor };
|
|
78
77
|
//# sourceMappingURL=defaultDrawOne.js.map
|
|
@@ -2,7 +2,7 @@ import { hitTestArea, regionPickOptions } from "./hitTestArea.js";
|
|
|
2
2
|
import { useLatest } from "@weasel-js/react";
|
|
3
3
|
import { useDepSource } from "@weasel-js/routing/react";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/canvas/deps/areaSelect.ts
|
|
6
6
|
/**
|
|
7
7
|
* `useAreaSelectDepSource` — wires the `areaSelect` dep consumed by
|
|
8
8
|
* `areaSelectAction`. The dep exposes:
|
|
@@ -14,27 +14,29 @@ import { useDepSource } from "@weasel-js/routing/react";
|
|
|
14
14
|
* ref internally), so callers can pass fresh selection/scene refs without
|
|
15
15
|
* triggering re-registration.
|
|
16
16
|
*/
|
|
17
|
-
function useAreaSelectDepSource(scene, selection, descriptor, alphaOf, reachable) {
|
|
17
|
+
function useAreaSelectDepSource(scene, selection, descriptor, alphaOf, reachable, targetOf) {
|
|
18
18
|
const sceneRef = useLatest(scene);
|
|
19
19
|
const selectionRef = useLatest(selection);
|
|
20
20
|
const descriptorRef = useLatest(descriptor);
|
|
21
21
|
const alphaOfRef = useLatest(alphaOf);
|
|
22
22
|
const reachableRef = useLatest(reachable);
|
|
23
|
+
const targetOfRef = useLatest(targetOf);
|
|
23
24
|
useDepSource("areaSelect", () => {
|
|
24
25
|
const sc = sceneRef.current;
|
|
25
26
|
const s = selectionRef.current;
|
|
26
27
|
const d = descriptorRef.current;
|
|
27
28
|
const a = alphaOfRef.current;
|
|
28
29
|
const r = reachableRef.current;
|
|
30
|
+
const t = targetOfRef.current;
|
|
29
31
|
const keep = (ids) => r ? ids.filter((id) => r(id)) : ids;
|
|
30
32
|
return {
|
|
31
33
|
hitTestArea: (bounds, view) => keep(hitTestArea(sc, bounds, regionPickOptions(view, a), d)),
|
|
34
|
+
...t ? { targetOf: t } : {},
|
|
32
35
|
getSelection: () => s.current,
|
|
33
36
|
setSelection: (ids) => s.set(ids)
|
|
34
37
|
};
|
|
35
38
|
});
|
|
36
39
|
}
|
|
37
40
|
|
|
38
|
-
//#endregion
|
|
39
41
|
export { useAreaSelectDepSource };
|
|
40
42
|
//# sourceMappingURL=areaSelect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"areaSelect.js","names":["hitTestAreaShared"],"sources":["../../../src/canvas/deps/areaSelect.ts"],"sourcesContent":["/**\n * `useAreaSelectDepSource` — wires the `areaSelect` dep consumed by\n * `areaSelectAction`. The dep exposes:\n * - `hitTestArea(bounds)` — silhouette-aware scan over `scene.renderOrderNodes()`\n * (rect poses by AABB; polygon poses by the kernel polygon-overlap test).\n * - `getSelection` / `setSelection` — passthrough to the kit selection api.\n *\n * Built once per render and stabilised by `useDepSource` (which reads via a\n * ref internally), so callers can pass fresh selection/scene refs without\n * triggering re-registration.\n */\nimport { useDepSource } from '@weasel-js/routing/react';\nimport { useLatest } from '@weasel-js/react';\nimport type { AreaSelectDep } from 'interactions/actions/depSchema';\nimport type { Scene, NodeId } from 'core/scene/types';\nimport type { SelectionApi } from 'core/selection/useSelection';\nimport type { PoseDescriptor } from 'interactions/actions/resize/geometry';\nimport { hitTestArea as hitTestAreaShared, regionPickOptions } from './hitTestArea';\n\nexport function useAreaSelectDepSource(\n scene: Scene<unknown, string, unknown>,\n selection: SelectionApi,\n descriptor?: PoseDescriptor<unknown>,\n /** The painted alpha the surface's layers apply, which every view shares. */\n alphaOf?: (id: string) => number,\n /** Whether a node can be reached at all: the canvas's one answer, which picking reads too. */\n reachable?: (id: string) => boolean,\n): void {\n const sceneRef = useLatest(scene);\n const selectionRef = useLatest(selection);\n const descriptorRef = useLatest(descriptor);\n const alphaOfRef = useLatest(alphaOf);\n const reachableRef = useLatest(reachable);\n\n useDepSource('areaSelect', (): AreaSelectDep => {\n const sc = sceneRef.current;\n const s = selectionRef.current;\n const d = descriptorRef.current;\n const a = alphaOfRef.current;\n const r = reachableRef.current;\n const keep = (ids: NodeId[]): NodeId[] => (r ? ids.filter((id) => r(id)) : ids);\n return {\n hitTestArea: (bounds, view) =>\n keep(hitTestAreaShared(sc, bounds, regionPickOptions(view, a), d)),\n getSelection: () => s.current as NodeId[],\n setSelection: (ids) => s.set(ids),\n };\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAmBA,SAAgB,uBACd,OACA,WACA,YAEA,SAEA,
|
|
1
|
+
{"version":3,"file":"areaSelect.js","names":["hitTestAreaShared"],"sources":["../../../src/canvas/deps/areaSelect.ts"],"sourcesContent":["/**\n * `useAreaSelectDepSource` — wires the `areaSelect` dep consumed by\n * `areaSelectAction`. The dep exposes:\n * - `hitTestArea(bounds)` — silhouette-aware scan over `scene.renderOrderNodes()`\n * (rect poses by AABB; polygon poses by the kernel polygon-overlap test).\n * - `getSelection` / `setSelection` — passthrough to the kit selection api.\n *\n * Built once per render and stabilised by `useDepSource` (which reads via a\n * ref internally), so callers can pass fresh selection/scene refs without\n * triggering re-registration.\n */\nimport { useDepSource } from '@weasel-js/routing/react';\nimport { useLatest } from '@weasel-js/react';\nimport type { AreaSelectDep } from 'interactions/actions/depSchema';\nimport type { Scene, NodeId } from 'core/scene/types';\nimport type { SelectionApi } from 'core/selection/useSelection';\nimport type { PoseDescriptor } from 'interactions/actions/resize/geometry';\nimport { hitTestArea as hitTestAreaShared, regionPickOptions } from './hitTestArea';\n\nexport function useAreaSelectDepSource(\n scene: Scene<unknown, string, unknown>,\n selection: SelectionApi,\n descriptor?: PoseDescriptor<unknown>,\n /** The painted alpha the surface's layers apply, which every view shares. */\n alphaOf?: (id: string) => number,\n /** Whether a node can be reached at all: the canvas's one answer, which picking reads too. */\n reachable?: (id: string) => boolean,\n /** The node selecting a hit selects, as a click picks. */\n targetOf?: (id: string) => string,\n): void {\n const sceneRef = useLatest(scene);\n const selectionRef = useLatest(selection);\n const descriptorRef = useLatest(descriptor);\n const alphaOfRef = useLatest(alphaOf);\n const reachableRef = useLatest(reachable);\n const targetOfRef = useLatest(targetOf);\n\n useDepSource('areaSelect', (): AreaSelectDep => {\n const sc = sceneRef.current;\n const s = selectionRef.current;\n const d = descriptorRef.current;\n const a = alphaOfRef.current;\n const r = reachableRef.current;\n const t = targetOfRef.current;\n const keep = (ids: NodeId[]): NodeId[] => (r ? ids.filter((id) => r(id)) : ids);\n return {\n hitTestArea: (bounds, view) =>\n keep(hitTestAreaShared(sc, bounds, regionPickOptions(view, a), d)),\n ...(t ? { targetOf: t } : {}),\n getSelection: () => s.current as NodeId[],\n setSelection: (ids) => s.set(ids),\n };\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAmBA,SAAgB,uBACd,OACA,WACA,YAEA,SAEA,WAEA,UACM;CACN,MAAM,WAAW,UAAU,KAAK;CAChC,MAAM,eAAe,UAAU,SAAS;CACxC,MAAM,gBAAgB,UAAU,UAAU;CAC1C,MAAM,aAAa,UAAU,OAAO;CACpC,MAAM,eAAe,UAAU,SAAS;CACxC,MAAM,cAAc,UAAU,QAAQ;CAEtC,aAAa,oBAAmC;EAC9C,MAAM,KAAK,SAAS;EACpB,MAAM,IAAI,aAAa;EACvB,MAAM,IAAI,cAAc;EACxB,MAAM,IAAI,WAAW;EACrB,MAAM,IAAI,aAAa;EACvB,MAAM,IAAI,YAAY;EACtB,MAAM,QAAQ,QAA6B,IAAI,IAAI,QAAQ,OAAO,EAAE,EAAE,CAAC,IAAI;EAC3E,OAAO;GACL,cAAc,QAAQ,SACpB,KAAKA,YAAkB,IAAI,QAAQ,kBAAkB,MAAM,CAAC,GAAG,CAAC,CAAC;GACnE,GAAI,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC;GAC3B,oBAAoB,EAAE;GACtB,eAAe,QAAQ,EAAE,IAAI,GAAG;EAClC;CACF,CAAC;AACH"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { poseDescriptorForNode } from "../../core/geometry/poseDescriptor.js";
|
|
2
|
-
import { AUTO_POSE_DESCRIPTOR } from "../../core/geometry/autoPoseDescriptor.js";
|
|
3
1
|
import { sceneInheritedPaintOf } from "../inheritedPaints.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { AUTO_POSE_DESCRIPTOR } from "../../core/geometry/autoPoseDescriptor.js";
|
|
3
|
+
import { poseDescriptorForNode } from "../../core/geometry/poseDescriptor.js";
|
|
6
4
|
import { sceneMutators } from "../../core/scene/sceneMutators.js";
|
|
5
|
+
import { asNodeId } from "../../core/scene/types.js";
|
|
7
6
|
import { scenePoseFrame } from "../../interactions/actions/poseFrame.js";
|
|
7
|
+
import { pathPaintOf } from "../nodeShapes/nodePaint.js";
|
|
8
8
|
import { drawnPose, leafPath, storePiece } from "./pathLeaf.js";
|
|
9
9
|
import { pathInWorld } from "@weasel-js/geom";
|
|
10
10
|
import { useMemo } from "react";
|
|
11
11
|
import { useLatest } from "@weasel-js/react";
|
|
12
12
|
import { useDepSource } from "@weasel-js/routing/react";
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
// src/canvas/deps/booleans.ts
|
|
15
15
|
/**
|
|
16
16
|
* The kit `booleansAdapter` dep: what the Pathfinder actions, and any tool
|
|
17
17
|
* reading the dep, work on over a canvas's own path leaves.
|
|
@@ -100,6 +100,5 @@ function useBooleansAdapterSource(scene, selection, adapter, poseDescriptor) {
|
|
|
100
100
|
useDepSource("booleansAdapter", () => booleans);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
//#endregion
|
|
104
103
|
export { useBooleansAdapterSource };
|
|
105
104
|
//# sourceMappingURL=booleans.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect } from "react";
|
|
2
2
|
import { useDepRegistry } from "@weasel-js/routing/react";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/canvas/deps/changes.ts
|
|
5
5
|
/**
|
|
6
6
|
* `useDepChangeNotices` — tells the dep registry when the scene, the
|
|
7
7
|
* selection, or the path-edit state changed. Sources are thunks, so nothing else lets chrome showing
|
|
@@ -16,6 +16,5 @@ function useDepChangeNotices(scene, selected, pathEdit) {
|
|
|
16
16
|
}, [registry, selected]);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
//#endregion
|
|
20
19
|
export { useDepChangeNotices };
|
|
21
20
|
//# sourceMappingURL=changes.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback, useMemo, useState } from "react";
|
|
2
2
|
import { useLatest } from "@weasel-js/react";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/canvas/deps/chromeRules.ts
|
|
5
5
|
/**
|
|
6
6
|
* The `chromeRules` dep: the canvas's chrome-visibility rules, read and set
|
|
7
7
|
* at run time, for an action that shows or hides a piece of chrome.
|
|
@@ -32,6 +32,5 @@ function useChromeRulesDep(rules) {
|
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
//#endregion
|
|
36
35
|
export { useChromeRulesDep };
|
|
37
36
|
//# sourceMappingURL=chromeRules.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useDepSource } from "@weasel-js/routing/react";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/canvas/deps/debug.ts
|
|
4
4
|
/**
|
|
5
5
|
* `useDebugDepSource` — wires the `debug` dep: the sink of the canvas this
|
|
6
6
|
* registrar belongs to, so actions report to the debug overlay that canvas
|
|
@@ -11,6 +11,5 @@ function useDebugDepSource(canvasApiRef) {
|
|
|
11
11
|
useDepSource("debug", () => canvasApiRef.current?.getDebug() ?? void 0);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
//#endregion
|
|
15
14
|
export { useDebugDepSource };
|
|
16
15
|
//# sourceMappingURL=debug.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useDepSource } from "@weasel-js/routing/react";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/canvas/deps/dispatchSources.ts
|
|
4
4
|
var hitOf = (c) => ({
|
|
5
5
|
bodyTarget: c.body,
|
|
6
6
|
bodyKind: c.kind,
|
|
@@ -22,6 +22,5 @@ function useDispatchDepSources(longPress, classifyTarget, kindOfNode) {
|
|
|
22
22
|
useDepSource("kindOfNode", () => (id) => kindOfNode.current?.(id));
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
//#endregion
|
|
26
25
|
export { hitAtOf, useDispatchDepSources };
|
|
27
26
|
//# sourceMappingURL=dispatchSources.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useLatest } from "@weasel-js/react";
|
|
2
2
|
import { useDepSource } from "@weasel-js/routing/react";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/canvas/deps/dispatcher.ts
|
|
5
5
|
/**
|
|
6
6
|
* `useDispatcherDepSource` — wires the `dispatcher` dep so actions can
|
|
7
7
|
* abort in-flight handles (`cancelGestureAction` is the kit's only
|
|
@@ -17,6 +17,5 @@ function useDispatcherDepSource(dispatcher) {
|
|
|
17
17
|
useDepSource("dispatcher", () => ({ cancelAll: (reason) => ref.current.cancelAll(reason) }));
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
//#endregion
|
|
21
20
|
export { useDispatcherDepSource };
|
|
22
21
|
//# sourceMappingURL=dispatcher.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { locksOf } from "../../interactions/actions/edit-anchors/params.js";
|
|
2
|
-
import { representationOf } from "../../domains/paths/pathRepresentation.js";
|
|
3
|
-
import { classifyPathStorage, pathEditPathOf, resolveEditablePathOf } from "../../domains/paths/editablePath.js";
|
|
4
2
|
import { anchorDataPatch } from "../../domains/paths/anchorData.js";
|
|
3
|
+
import { classifyPathStorage, pathEditPathOf, resolveEditablePathOf } from "../../domains/paths/editablePath.js";
|
|
4
|
+
import { representationOf } from "../../domains/paths/pathRepresentation.js";
|
|
5
5
|
import { finishCtx, finishEdit, otherOps, pathEditFollower, reshapeOps } from "./pathEditCommits.js";
|
|
6
6
|
import { useTransformFollower } from "./transformFollowers.js";
|
|
7
7
|
import { createPathEditState, isSelectedNode } from "../../domains/paths/pathEditState.js";
|
|
@@ -10,7 +10,7 @@ import { useLatest } from "@weasel-js/react";
|
|
|
10
10
|
import { resolveParams } from "@weasel-js/routing";
|
|
11
11
|
import { useDepRegistry, useDepSource } from "@weasel-js/routing/react";
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// src/canvas/deps/editAnchors.ts
|
|
14
14
|
/**
|
|
15
15
|
* `useEditAnchorsDepSource` — wires the `editAnchors` dep.
|
|
16
16
|
*
|
|
@@ -152,6 +152,5 @@ function pathAccess(sc, ad, extensions) {
|
|
|
152
152
|
};
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
//#endregion
|
|
156
155
|
export { resolveEditablePathOf, useEditAnchorsDepSource };
|
|
157
156
|
//# sourceMappingURL=editAnchors.js.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { createEmitter } from "@weasel-js/registry";
|
|
1
2
|
import { useEffect, useMemo } from "react";
|
|
2
3
|
import { useDepRegistry, useDepSource } from "@weasel-js/routing/react";
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
// src/canvas/deps/enteredGroup.ts
|
|
5
6
|
/**
|
|
6
7
|
* The entered group: the group a press resolves inside of. Session state beside
|
|
7
8
|
* the selection, not scene data, so it is never saved and never undone.
|
|
@@ -28,13 +29,13 @@ function reachableInGroup(scene, group, id) {
|
|
|
28
29
|
function createEnteredGroup(scene) {
|
|
29
30
|
let chain = [];
|
|
30
31
|
let announced = null;
|
|
31
|
-
const listeners =
|
|
32
|
+
const listeners = createEmitter();
|
|
32
33
|
const isGroup = (id) => isEnterable(scene.get(id));
|
|
33
34
|
const get = () => chain.find(isGroup) ?? null;
|
|
34
35
|
const groupsFrom = (id) => [id, ...scene.ancestorsOf(id)].filter(isGroup);
|
|
35
36
|
const announce = () => {
|
|
36
37
|
announced = get();
|
|
37
|
-
|
|
38
|
+
listeners.emit();
|
|
38
39
|
};
|
|
39
40
|
let stopScene = null;
|
|
40
41
|
const watchScene = () => scene.subscribe(() => {
|
|
@@ -63,9 +64,9 @@ function createEnteredGroup(scene) {
|
|
|
63
64
|
announced = get();
|
|
64
65
|
stopScene = watchScene();
|
|
65
66
|
}
|
|
66
|
-
listeners.
|
|
67
|
+
const off = listeners.subscribe(fn);
|
|
67
68
|
return () => {
|
|
68
|
-
|
|
69
|
+
off();
|
|
69
70
|
if (listeners.size === 0) {
|
|
70
71
|
stopScene?.();
|
|
71
72
|
stopScene = null;
|
|
@@ -85,6 +86,5 @@ function useEnteredGroupApiSource(dep) {
|
|
|
85
86
|
useEffect(() => dep.subscribe(() => registry.changed?.()), [dep, registry]);
|
|
86
87
|
}
|
|
87
88
|
|
|
88
|
-
//#endregion
|
|
89
89
|
export { createEnteredGroup, isEnterable, reachableInGroup, useEnteredGroup, useEnteredGroupApiSource };
|
|
90
90
|
//# sourceMappingURL=enteredGroup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enteredGroup.js","names":[],"sources":["../../../src/canvas/deps/enteredGroup.ts"],"sourcesContent":["/**\n * The entered group: the group a press resolves inside of. Session state beside\n * the selection, not scene data, so it is never saved and never undone.\n *\n * It remembers the entered group and the groups above it. `get()` answers the\n * innermost of those still in the scene, so deleting the group lands on its\n * parent, and an undo that brings it back lands on it again.\n */\nimport { useEffect, useMemo } from 'react';\nimport { useDepRegistry, useDepSource } from '@weasel-js/routing/react';\nimport type { NodeId, Scene } from 'core/scene/types';\n\n/** The group a press resolves inside of, held beside the selection; `<SceneCanvas enteredGroup>` takes one. */\nexport interface EnteredGroupApi {\n get(): NodeId | null;\n enter(id: NodeId): void;\n /** Moves to the nearest group above the current one, or to none. */\n leave(): void;\n /** Leaves every entered group at once. */\n leaveAll(): void;\n subscribe(fn: () => void): () => void;\n}\n\n/** Whether a node is entered as a group is: a group, or a node that consumes its children. */\nexport function isEnterable(node: { kind?: string; consumesChildren?: boolean } | undefined): boolean {\n return node?.kind === 'group' || node?.consumesChildren === true;\n}\n\n/** Whether `id` is reachable while `group` is entered: inside it, and not the group itself, and\n * not consumed by a node inside it (`SceneNode.consumesChildren`). With nothing entered every node\n * no node consumes is. Picking, region selects and select-all all ask this. */\nexport function reachableInGroup(\n scene: Pick<Scene<unknown, string, unknown>, 'ancestorsOf' | 'get'>,\n group: NodeId | null,\n id: string,\n): boolean {\n for (const above of scene.ancestorsOf(id as NodeId)) {\n if (above === group) return true;\n if (scene.get(above)?.consumesChildren === true) return false;\n }\n return group === null;\n}\n\ntype SceneReads = Pick<Scene<unknown, string, unknown>, 'get' | 'ancestorsOf' | 'subscribe'>;\n\n/** An entered-group store over `scene`, with nothing entered. */\nexport function createEnteredGroup(scene: SceneReads): EnteredGroupApi {\n let chain: NodeId[] = [];\n let announced: NodeId | null = null;\n const listeners =
|
|
1
|
+
{"version":3,"file":"enteredGroup.js","names":[],"sources":["../../../src/canvas/deps/enteredGroup.ts"],"sourcesContent":["/**\n * The entered group: the group a press resolves inside of. Session state beside\n * the selection, not scene data, so it is never saved and never undone.\n *\n * It remembers the entered group and the groups above it. `get()` answers the\n * innermost of those still in the scene, so deleting the group lands on its\n * parent, and an undo that brings it back lands on it again.\n */\nimport { useEffect, useMemo } from 'react';\nimport { createEmitter } from '@weasel-js/registry';\nimport { useDepRegistry, useDepSource } from '@weasel-js/routing/react';\nimport type { NodeId, Scene } from 'core/scene/types';\n\n/** The group a press resolves inside of, held beside the selection; `<SceneCanvas enteredGroup>` takes one. */\nexport interface EnteredGroupApi {\n get(): NodeId | null;\n enter(id: NodeId): void;\n /** Moves to the nearest group above the current one, or to none. */\n leave(): void;\n /** Leaves every entered group at once. */\n leaveAll(): void;\n subscribe(fn: () => void): () => void;\n}\n\n/** Whether a node is entered as a group is: a group, or a node that consumes its children. */\nexport function isEnterable(node: { kind?: string; consumesChildren?: boolean } | undefined): boolean {\n return node?.kind === 'group' || node?.consumesChildren === true;\n}\n\n/** Whether `id` is reachable while `group` is entered: inside it, and not the group itself, and\n * not consumed by a node inside it (`SceneNode.consumesChildren`). With nothing entered every node\n * no node consumes is. Picking, region selects and select-all all ask this. */\nexport function reachableInGroup(\n scene: Pick<Scene<unknown, string, unknown>, 'ancestorsOf' | 'get'>,\n group: NodeId | null,\n id: string,\n): boolean {\n for (const above of scene.ancestorsOf(id as NodeId)) {\n if (above === group) return true;\n if (scene.get(above)?.consumesChildren === true) return false;\n }\n return group === null;\n}\n\ntype SceneReads = Pick<Scene<unknown, string, unknown>, 'get' | 'ancestorsOf' | 'subscribe'>;\n\n/** An entered-group store over `scene`, with nothing entered. */\nexport function createEnteredGroup(scene: SceneReads): EnteredGroupApi {\n let chain: NodeId[] = [];\n let announced: NodeId | null = null;\n const listeners = createEmitter();\n\n const isGroup = (id: NodeId) => isEnterable(scene.get(id));\n const get = (): NodeId | null => chain.find(isGroup) ?? null;\n const groupsFrom = (id: NodeId): NodeId[] => [id, ...scene.ancestorsOf(id)].filter(isGroup);\n\n const announce = () => {\n announced = get();\n listeners.emit();\n };\n\n let stopScene: (() => void) | null = null;\n const watchScene = () => scene.subscribe(() => {\n if (get() !== announced) announce();\n });\n\n return {\n get,\n enter(id) {\n if (!isGroup(id)) return;\n chain = groupsFrom(id);\n announce();\n },\n leave() {\n const here = get();\n if (here === null) return;\n chain = groupsFrom(here).slice(1);\n announce();\n },\n leaveAll() {\n if (get() === null) return;\n chain = [];\n announce();\n },\n subscribe(fn) {\n if (listeners.size === 0) {\n announced = get();\n stopScene = watchScene();\n }\n const off = listeners.subscribe(fn);\n return () => {\n off();\n if (listeners.size === 0) { stopScene?.(); stopScene = null; }\n };\n },\n };\n}\n\n/** One entered-group store for the life of the scene. */\nexport function useEnteredGroup(scene: SceneReads): EnteredGroupApi {\n return useMemo(() => createEnteredGroup(scene), [scene]);\n}\n\nexport function useEnteredGroupApiSource(dep: EnteredGroupApi): void {\n useDepSource('enteredGroup', () => dep);\n // What is drawn or pasted while a group is entered lands in it, unless a source\n // registered under this one, such as a symmetry group, names a container.\n useDepSource('insertInto', (below) => ({ get: () => below()?.get() ?? dep.get() }));\n const registry = useDepRegistry();\n useEffect(() => dep.subscribe(() => registry.changed?.()), [dep, registry]);\n}\n"],"mappings":";;;;;;;;;;;;;;AAyBA,SAAgB,YAAY,MAA0E;CACpG,OAAO,MAAM,SAAS,WAAW,MAAM,qBAAqB;AAC9D;;;;AAKA,SAAgB,iBACd,OACA,OACA,IACS;CACT,KAAK,MAAM,SAAS,MAAM,YAAY,EAAY,GAAG;EACnD,IAAI,UAAU,OAAO,OAAO;EAC5B,IAAI,MAAM,IAAI,KAAK,CAAC,EAAE,qBAAqB,MAAM,OAAO;CAC1D;CACA,OAAO,UAAU;AACnB;;AAKA,SAAgB,mBAAmB,OAAoC;CACrE,IAAI,QAAkB,CAAC;CACvB,IAAI,YAA2B;CAC/B,MAAM,YAAY,cAAc;CAEhC,MAAM,WAAW,OAAe,YAAY,MAAM,IAAI,EAAE,CAAC;CACzD,MAAM,YAA2B,MAAM,KAAK,OAAO,KAAK;CACxD,MAAM,cAAc,OAAyB,CAAC,IAAI,GAAG,MAAM,YAAY,EAAE,CAAC,CAAC,CAAC,OAAO,OAAO;CAE1F,MAAM,iBAAiB;EACrB,YAAY,IAAI;EAChB,UAAU,KAAK;CACjB;CAEA,IAAI,YAAiC;CACrC,MAAM,mBAAmB,MAAM,gBAAgB;EAC7C,IAAI,IAAI,MAAM,WAAW,SAAS;CACpC,CAAC;CAED,OAAO;EACL;EACA,MAAM,IAAI;GACR,IAAI,CAAC,QAAQ,EAAE,GAAG;GAClB,QAAQ,WAAW,EAAE;GACrB,SAAS;EACX;EACA,QAAQ;GACN,MAAM,OAAO,IAAI;GACjB,IAAI,SAAS,MAAM;GACnB,QAAQ,WAAW,IAAI,CAAC,CAAC,MAAM,CAAC;GAChC,SAAS;EACX;EACA,WAAW;GACT,IAAI,IAAI,MAAM,MAAM;GACpB,QAAQ,CAAC;GACT,SAAS;EACX;EACA,UAAU,IAAI;GACZ,IAAI,UAAU,SAAS,GAAG;IACxB,YAAY,IAAI;IAChB,YAAY,WAAW;GACzB;GACA,MAAM,MAAM,UAAU,UAAU,EAAE;GAClC,aAAa;IACX,IAAI;IACJ,IAAI,UAAU,SAAS,GAAG;KAAE,YAAY;KAAG,YAAY;IAAM;GAC/D;EACF;CACF;AACF;;AAGA,SAAgB,gBAAgB,OAAoC;CAClE,OAAO,cAAc,mBAAmB,KAAK,GAAG,CAAC,KAAK,CAAC;AACzD;AAEA,SAAgB,yBAAyB,KAA4B;CACnE,aAAa,sBAAsB,GAAG;CAGtC,aAAa,eAAe,WAAW,EAAE,WAAW,MAAM,CAAC,EAAE,IAAI,KAAK,IAAI,IAAI,EAAE,EAAE;CAClF,MAAM,WAAW,eAAe;CAChC,gBAAgB,IAAI,gBAAgB,SAAS,UAAU,CAAC,GAAG,CAAC,KAAK,QAAQ,CAAC;AAC5E"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useLatest } from "@weasel-js/react";
|
|
2
2
|
import { useDepSource } from "@weasel-js/routing/react";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/canvas/deps/geometryProjection.ts
|
|
5
5
|
/**
|
|
6
6
|
* Wires the `geometryProjection` dep consumed by pose-transform actions.
|
|
7
7
|
* A source that returns `undefined` is indistinguishable from no registration:
|
|
@@ -12,6 +12,5 @@ function useGeometryProjection(projection) {
|
|
|
12
12
|
useDepSource("geometryProjection", () => ref.current);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
//#endregion
|
|
16
15
|
export { useGeometryProjection };
|
|
17
16
|
//# sourceMappingURL=geometryProjection.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { rectToPlane, toPlane } from "../../core/viewport/parallax.js";
|
|
2
1
|
import { poseDescriptorForNode, visualBoundsViaDescriptor } from "../../core/geometry/poseDescriptor.js";
|
|
3
2
|
import { AUTO_POSE_DESCRIPTOR } from "../../core/geometry/autoPoseDescriptor.js";
|
|
3
|
+
import { pickWalk } from "../pickWalk.js";
|
|
4
|
+
import { rectToPlane, toPlane } from "../../core/viewport/parallax.js";
|
|
4
5
|
import { findShapeInk, findShapeSilhouette } from "../NodeShape.js";
|
|
5
|
-
import { polygonRegion, poseOutline, rectRegion, regionBoundsOf, regionOf, regionTakes, regionTakesByBounds } from "../../core/geometry/regionHit.js";
|
|
6
6
|
import { scenePickSource } from "../scenePickSource.js";
|
|
7
|
-
import {
|
|
7
|
+
import { polygonRegion, poseOutline, rectRegion, regionBoundsOf, regionOf, regionTakes, regionTakesByBounds } from "../../core/geometry/regionHit.js";
|
|
8
8
|
import { applyToPoint, boundsOfPath, pathIntersectsRect } from "@weasel-js/geom";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/canvas/deps/hitTestArea.ts
|
|
11
11
|
/** The pick options a region dep hands the shared walk: the asking view's
|
|
12
12
|
* layer gate and camera, and the surface's alpha. */
|
|
13
13
|
function regionPickOptions(view, alphaOf) {
|
|
@@ -105,6 +105,5 @@ function regionInCopy(r, m) {
|
|
|
105
105
|
}, r.isRect && keepsAxes);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
//#endregion
|
|
109
108
|
export { hitTestArea, hitTestLassoPolygon, regionPickOptions, regionPickQuery };
|
|
110
109
|
//# sourceMappingURL=hitTestArea.js.map
|
|
@@ -2,7 +2,7 @@ import { viewportWorldRect } from "../../core/viewport/viewportWorldRect.js";
|
|
|
2
2
|
import { useLatest } from "@weasel-js/react";
|
|
3
3
|
import { useDepSource } from "@weasel-js/routing/react";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/canvas/deps/ingestion.ts
|
|
6
6
|
function useIngestionDepSource(canvasRef, getView, resolveSrc, svg, clipboard, handlers) {
|
|
7
7
|
const getViewRef = useLatest(getView);
|
|
8
8
|
const resolveSrcRef = useLatest(resolveSrc);
|
|
@@ -35,6 +35,5 @@ function useIngestionDepSource(canvasRef, getView, resolveSrc, svg, clipboard, h
|
|
|
35
35
|
}));
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
//#endregion
|
|
39
38
|
export { useIngestionDepSource };
|
|
40
39
|
//# sourceMappingURL=ingestion.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { insertPreviewExtent } from "../insertPreviewExtent.js";
|
|
2
1
|
import { insertSite } from "./insertSite.js";
|
|
3
|
-
import { minSizeOf } from "../../core/scene/minSize.js";
|
|
4
2
|
import { createInsertOp } from "../../core/ops/create.js";
|
|
3
|
+
import { insertPreviewExtent } from "../insertPreviewExtent.js";
|
|
5
4
|
import { cycleFill, solid, strokeOf } from "../../util/paint.js";
|
|
6
5
|
import { stickyData } from "../../tools/builtin/sticky/stickyNode.js";
|
|
6
|
+
import { minSizeOf } from "../../core/scene/minSize.js";
|
|
7
7
|
import { ellipsePath, linePath, polygonFromPoints, rectPath, regularPolygonPath, schneiderFit, starPath } from "@weasel-js/geom";
|
|
8
8
|
import { useRef } from "react";
|
|
9
9
|
import { useLatest } from "@weasel-js/react";
|
|
10
10
|
import { DEFAULT_TEXT_FILL } from "@weasel-js/text";
|
|
11
11
|
import { useDepRegistry, useDepSource } from "@weasel-js/routing/react";
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// src/canvas/deps/insert.ts
|
|
14
14
|
/**
|
|
15
15
|
* `useInsertDepSource` — wires the `insert` dep consumed by `insertAction`.
|
|
16
16
|
*
|
|
@@ -218,6 +218,5 @@ function useInsertDepSource(scene, adapter, factories, paint = paletteInsertPain
|
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
//#endregion
|
|
222
221
|
export { paletteInsertPaint, useInsertDepSource };
|
|
223
222
|
//# sourceMappingURL=insert.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { insertParent } from "../../interactions/actions/insert/parent.js";
|
|
1
2
|
import { composeChildFrame, composesFrames } from "../../core/scene/composeFrame.js";
|
|
2
|
-
import { definesFrame } from "../../core/scene/effectivePose.js";
|
|
3
3
|
import { viewPoseAdapter } from "../../core/scene/scrollOffsets.js";
|
|
4
|
-
import {
|
|
4
|
+
import { definesFrame } from "../../core/scene/effectivePose.js";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/canvas/deps/insertSite.ts
|
|
7
7
|
/**
|
|
8
8
|
* Where an insert lands: the container the `insertInto` dep names, on that container's
|
|
9
9
|
* layer, with the pose made local to it when the scene composes frames —
|
|
@@ -36,6 +36,5 @@ function insertSite(sc, into, canDropInto) {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
//#endregion
|
|
40
39
|
export { insertSite };
|
|
41
40
|
//# sourceMappingURL=insertSite.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useKitSettings, useLatest } from "@weasel-js/react";
|
|
2
2
|
import { useDepSource } from "@weasel-js/routing/react";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/canvas/deps/kitSettings.ts
|
|
5
5
|
/**
|
|
6
6
|
* Wires the `kitSettings` dep: the store of the nearest `<KitSettingsProvider>`,
|
|
7
7
|
* resolved at invocation so a provider swapped above the canvas reaches the next action.
|
|
@@ -11,6 +11,5 @@ function useKitSettingsDepSource() {
|
|
|
11
11
|
useDepSource("kitSettings", () => ref.current);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
//#endregion
|
|
15
14
|
export { useKitSettingsDepSource };
|
|
16
15
|
//# sourceMappingURL=kitSettings.js.map
|
|
@@ -2,34 +2,36 @@ import { hitTestArea, hitTestLassoPolygon, regionPickOptions } from "./hitTestAr
|
|
|
2
2
|
import { useLatest } from "@weasel-js/react";
|
|
3
3
|
import { useDepSource } from "@weasel-js/routing/react";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/canvas/deps/lassoSelect.ts
|
|
6
6
|
/**
|
|
7
7
|
* `useLassoSelectDepSource` — wires the `lassoSelect` dep consumed by
|
|
8
8
|
* `lassoSelectAction`: `hitTestLasso` tests the lasso polygon itself, and
|
|
9
9
|
* `hitTestArea` is the same silhouette-aware rect test `areaSelect` uses.
|
|
10
10
|
*/
|
|
11
|
-
function useLassoSelectDepSource(scene, selection, descriptor, alphaOf, reachable) {
|
|
11
|
+
function useLassoSelectDepSource(scene, selection, descriptor, alphaOf, reachable, targetOf) {
|
|
12
12
|
const sceneRef = useLatest(scene);
|
|
13
13
|
const selectionRef = useLatest(selection);
|
|
14
14
|
const descriptorRef = useLatest(descriptor);
|
|
15
15
|
const alphaOfRef = useLatest(alphaOf);
|
|
16
16
|
const reachableRef = useLatest(reachable);
|
|
17
|
+
const targetOfRef = useLatest(targetOf);
|
|
17
18
|
useDepSource("lassoSelect", () => {
|
|
18
19
|
const sc = sceneRef.current;
|
|
19
20
|
const s = selectionRef.current;
|
|
20
21
|
const d = descriptorRef.current;
|
|
21
22
|
const a = alphaOfRef.current;
|
|
22
23
|
const r = reachableRef.current;
|
|
24
|
+
const t = targetOfRef.current;
|
|
23
25
|
const keep = (ids) => r ? ids.filter((id) => r(id)) : ids;
|
|
24
26
|
return {
|
|
25
27
|
hitTestLasso: (polygon, mode, view) => keep(hitTestLassoPolygon(sc, polygon, mode, regionPickOptions(view, a), d)),
|
|
26
28
|
hitTestArea: (bounds, view) => keep(hitTestArea(sc, bounds, regionPickOptions(view, a), d)),
|
|
29
|
+
...t ? { targetOf: t } : {},
|
|
27
30
|
getSelection: () => s.current,
|
|
28
31
|
setSelection: (ids) => s.set(ids)
|
|
29
32
|
};
|
|
30
33
|
});
|
|
31
34
|
}
|
|
32
35
|
|
|
33
|
-
//#endregion
|
|
34
36
|
export { useLassoSelectDepSource };
|
|
35
37
|
//# sourceMappingURL=lassoSelect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lassoSelect.js","names":["hitTestAreaShared"],"sources":["../../../src/canvas/deps/lassoSelect.ts"],"sourcesContent":["/**\n * `useLassoSelectDepSource` — wires the `lassoSelect` dep consumed by\n * `lassoSelectAction`: `hitTestLasso` tests the lasso polygon itself, and\n * `hitTestArea` is the same silhouette-aware rect test `areaSelect` uses.\n */\nimport { useDepSource } from '@weasel-js/routing/react';\nimport { useLatest } from '@weasel-js/react';\nimport type { LassoSelectDep } from 'interactions/actions/depSchema';\nimport type { Scene, NodeId } from 'core/scene/types';\nimport type { SelectionApi } from 'core/selection/useSelection';\nimport type { PoseDescriptor } from 'interactions/actions/resize/geometry';\nimport { hitTestArea as hitTestAreaShared, hitTestLassoPolygon, regionPickOptions } from './hitTestArea';\n\nexport function useLassoSelectDepSource(\n scene: Scene<unknown, string, unknown>,\n selection: SelectionApi,\n descriptor?: PoseDescriptor<unknown>,\n /** The painted alpha the surface's layers apply, which every view shares. */\n alphaOf?: (id: string) => number,\n /** Whether a node can be reached at all: the canvas's one answer, which picking reads too. */\n reachable?: (id: string) => boolean,\n): void {\n const sceneRef = useLatest(scene);\n const selectionRef = useLatest(selection);\n const descriptorRef = useLatest(descriptor);\n const alphaOfRef = useLatest(alphaOf);\n const reachableRef = useLatest(reachable);\n\n useDepSource('lassoSelect', (): LassoSelectDep => {\n const sc = sceneRef.current;\n const s = selectionRef.current;\n const d = descriptorRef.current;\n const a = alphaOfRef.current;\n const r = reachableRef.current;\n const keep = (ids: NodeId[]): NodeId[] => (r ? ids.filter((id) => r(id)) : ids);\n return {\n hitTestLasso: (polygon, mode, view) =>\n keep(hitTestLassoPolygon(sc, polygon, mode, regionPickOptions(view, a), d)),\n hitTestArea: (bounds, view) =>\n keep(hitTestAreaShared(sc, bounds, regionPickOptions(view, a), d)),\n getSelection: () => s.current as NodeId[],\n setSelection: (ids) => s.set(ids as NodeId[]),\n };\n });\n}\n"],"mappings":";;;;;;;;;;AAaA,SAAgB,wBACd,OACA,WACA,YAEA,SAEA,
|
|
1
|
+
{"version":3,"file":"lassoSelect.js","names":["hitTestAreaShared"],"sources":["../../../src/canvas/deps/lassoSelect.ts"],"sourcesContent":["/**\n * `useLassoSelectDepSource` — wires the `lassoSelect` dep consumed by\n * `lassoSelectAction`: `hitTestLasso` tests the lasso polygon itself, and\n * `hitTestArea` is the same silhouette-aware rect test `areaSelect` uses.\n */\nimport { useDepSource } from '@weasel-js/routing/react';\nimport { useLatest } from '@weasel-js/react';\nimport type { LassoSelectDep } from 'interactions/actions/depSchema';\nimport type { Scene, NodeId } from 'core/scene/types';\nimport type { SelectionApi } from 'core/selection/useSelection';\nimport type { PoseDescriptor } from 'interactions/actions/resize/geometry';\nimport { hitTestArea as hitTestAreaShared, hitTestLassoPolygon, regionPickOptions } from './hitTestArea';\n\nexport function useLassoSelectDepSource(\n scene: Scene<unknown, string, unknown>,\n selection: SelectionApi,\n descriptor?: PoseDescriptor<unknown>,\n /** The painted alpha the surface's layers apply, which every view shares. */\n alphaOf?: (id: string) => number,\n /** Whether a node can be reached at all: the canvas's one answer, which picking reads too. */\n reachable?: (id: string) => boolean,\n /** The node selecting a hit selects, as a click picks. */\n targetOf?: (id: string) => string,\n): void {\n const sceneRef = useLatest(scene);\n const selectionRef = useLatest(selection);\n const descriptorRef = useLatest(descriptor);\n const alphaOfRef = useLatest(alphaOf);\n const reachableRef = useLatest(reachable);\n const targetOfRef = useLatest(targetOf);\n\n useDepSource('lassoSelect', (): LassoSelectDep => {\n const sc = sceneRef.current;\n const s = selectionRef.current;\n const d = descriptorRef.current;\n const a = alphaOfRef.current;\n const r = reachableRef.current;\n const t = targetOfRef.current;\n const keep = (ids: NodeId[]): NodeId[] => (r ? ids.filter((id) => r(id)) : ids);\n return {\n hitTestLasso: (polygon, mode, view) =>\n keep(hitTestLassoPolygon(sc, polygon, mode, regionPickOptions(view, a), d)),\n hitTestArea: (bounds, view) =>\n keep(hitTestAreaShared(sc, bounds, regionPickOptions(view, a), d)),\n ...(t ? { targetOf: t } : {}),\n getSelection: () => s.current as NodeId[],\n setSelection: (ids) => s.set(ids as NodeId[]),\n };\n });\n}\n"],"mappings":";;;;;;;;;;AAaA,SAAgB,wBACd,OACA,WACA,YAEA,SAEA,WAEA,UACM;CACN,MAAM,WAAW,UAAU,KAAK;CAChC,MAAM,eAAe,UAAU,SAAS;CACxC,MAAM,gBAAgB,UAAU,UAAU;CAC1C,MAAM,aAAa,UAAU,OAAO;CACpC,MAAM,eAAe,UAAU,SAAS;CACxC,MAAM,cAAc,UAAU,QAAQ;CAEtC,aAAa,qBAAqC;EAChD,MAAM,KAAK,SAAS;EACpB,MAAM,IAAI,aAAa;EACvB,MAAM,IAAI,cAAc;EACxB,MAAM,IAAI,WAAW;EACrB,MAAM,IAAI,aAAa;EACvB,MAAM,IAAI,YAAY;EACtB,MAAM,QAAQ,QAA6B,IAAI,IAAI,QAAQ,OAAO,EAAE,EAAE,CAAC,IAAI;EAC3E,OAAO;GACL,eAAe,SAAS,MAAM,SAC5B,KAAK,oBAAoB,IAAI,SAAS,MAAM,kBAAkB,MAAM,CAAC,GAAG,CAAC,CAAC;GAC5E,cAAc,QAAQ,SACpB,KAAKA,YAAkB,IAAI,QAAQ,kBAAkB,MAAM,CAAC,GAAG,CAAC,CAAC;GACnE,GAAI,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC;GAC3B,oBAAoB,EAAE;GACtB,eAAe,QAAQ,EAAE,IAAI,GAAe;EAC9C;CACF,CAAC;AACH"}
|
|
@@ -3,7 +3,7 @@ import { useEffect } from "react";
|
|
|
3
3
|
import { useLatest } from "@weasel-js/react";
|
|
4
4
|
import { useDepSource } from "@weasel-js/routing/react";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/canvas/deps/layout.ts
|
|
7
7
|
/**
|
|
8
8
|
* `useLayoutDepSource` — wires the `layout` dep consumed by `moveAction`'s
|
|
9
9
|
* drag-time reflow pass. A container's layout is the one its scene node
|
|
@@ -35,6 +35,5 @@ function useLayoutDepSource(scene, dropTarget, reflow) {
|
|
|
35
35
|
}), [scene, ref]);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
//#endregion
|
|
39
38
|
export { useLayoutDepSource };
|
|
40
39
|
//# sourceMappingURL=layout.js.map
|
|
@@ -2,7 +2,7 @@ import { useLatest } from "@weasel-js/react";
|
|
|
2
2
|
import { useDepSource } from "@weasel-js/routing/react";
|
|
3
3
|
import { defaultToolOf } from "@weasel-js/modes";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/canvas/deps/modeDefaultTool.ts
|
|
6
6
|
/**
|
|
7
7
|
* Wires the `modeDefaultTool` dep: the tool the canvas's active mode starts
|
|
8
8
|
* on, when the canvas mounts it. Absent with no mode registry.
|
|
@@ -18,6 +18,5 @@ function useModeDefaultToolDepSource(modes, tools) {
|
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
//#endregion
|
|
22
21
|
export { useModeDefaultToolDepSource };
|
|
23
22
|
//# sourceMappingURL=modeDefaultTool.js.map
|
|
@@ -2,7 +2,7 @@ import { asNodeId } from "../../core/scene/types.js";
|
|
|
2
2
|
import { useLatest } from "@weasel-js/react";
|
|
3
3
|
import { useDepSource } from "@weasel-js/routing/react";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/canvas/deps/nodeAtPoint.ts
|
|
6
6
|
function useNodeAtPointDepSource(pickEvery) {
|
|
7
7
|
const pickRef = useLatest(pickEvery);
|
|
8
8
|
useDepSource("nodeAtPoint", () => {
|
|
@@ -17,6 +17,5 @@ function useNodeAtPointDepSource(pickEvery) {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
//#endregion
|
|
21
20
|
export { useNodeAtPointDepSource };
|
|
22
21
|
//# sourceMappingURL=nodeAtPoint.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { sceneDependentsOf } from "../../core/scene/dependents.js";
|
|
2
1
|
import { createTransformOp } from "../../core/ops/transform.js";
|
|
3
2
|
import { createSetDataOp } from "../../core/ops/setData.js";
|
|
4
|
-
import { withoutShapeGenerator } from "../../domains/paths/shapeGenerator.js";
|
|
5
3
|
import { createDeleteOp } from "../../core/ops/delete.js";
|
|
4
|
+
import { writtenBy } from "../../core/ops/writtenBy.js";
|
|
5
|
+
import { sceneDependentsOf } from "../../core/scene/dependents.js";
|
|
6
6
|
import { pathEditPathOf, storeEditablePath } from "../../domains/paths/editablePath.js";
|
|
7
|
+
import { withoutShapeGenerator } from "../../domains/paths/shapeGenerator.js";
|
|
7
8
|
import { withoutGeometryBoundData } from "../../domains/paths/pathEditExtension.js";
|
|
8
|
-
import { writtenBy } from "../../core/ops/writtenBy.js";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/canvas/deps/pathEditCommits.ts
|
|
11
11
|
/** The scene as an extension's `finishEdit` reads it. */
|
|
12
12
|
function finishCtx(sc, id, extensions) {
|
|
13
13
|
return {
|
|
@@ -184,6 +184,5 @@ function pathEditFollower(sc, extensions) {
|
|
|
184
184
|
};
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
//#endregion
|
|
188
187
|
export { finishCtx, finishEdit, otherOps, pathEditFollower, reshapeOps, transformOps, transformPreview };
|
|
189
188
|
//# sourceMappingURL=pathEditCommits.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { poseLinearOf, worldEditToStorage } from "@weasel-js/geom";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/canvas/deps/pathLeaf.ts
|
|
4
4
|
/** How `g` draws a leaf at `world`, or null for a pose it reads no finite box from. */
|
|
5
5
|
function drawnPose(g, world) {
|
|
6
6
|
const b = g.getBounds(world);
|
|
@@ -61,6 +61,5 @@ function leafPath(scene, node) {
|
|
|
61
61
|
return path && (path.kind === "rect" || path.kind === "polygon") ? path : null;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
//#endregion
|
|
65
64
|
export { drawnPose, leafPath, storePiece };
|
|
66
65
|
//# sourceMappingURL=pathLeaf.js.map
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { useSliceDepSource } from "./slice.js";
|
|
2
1
|
import { useBooleansAdapterSource } from "./booleans.js";
|
|
2
|
+
import { useSliceDepSource } from "./slice.js";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/canvas/deps/pathLeafDeps.ts
|
|
5
5
|
/** The kit deps that rewrite a scene's path leaves: `slice` and `booleansAdapter`. */
|
|
6
6
|
function usePathLeafDepSources(scene, selection, adapter, poseDescriptor) {
|
|
7
7
|
useSliceDepSource(scene, selection, adapter, poseDescriptor);
|
|
8
8
|
useBooleansAdapterSource(scene, selection, adapter, poseDescriptor);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
//#endregion
|
|
12
11
|
export { usePathLeafDepSources };
|
|
13
12
|
//# sourceMappingURL=pathLeafDeps.js.map
|
|
@@ -2,13 +2,12 @@ import { AUTO_POSE_DESCRIPTOR } from "../../core/geometry/autoPoseDescriptor.js"
|
|
|
2
2
|
import { useLatest } from "@weasel-js/react";
|
|
3
3
|
import { useDepSource } from "@weasel-js/routing/react";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/canvas/deps/poseDescriptor.ts
|
|
6
6
|
/** Publish the pose descriptor every built-in action reads. */
|
|
7
7
|
function usePoseDescriptorDepSource(descriptor) {
|
|
8
8
|
const ref = useLatest(descriptor);
|
|
9
9
|
useDepSource("poseDescriptor", () => ref.current ?? AUTO_POSE_DESCRIPTOR);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
//#endregion
|
|
13
12
|
export { usePoseDescriptorDepSource };
|
|
14
13
|
//# sourceMappingURL=poseDescriptor.js.map
|
|
@@ -2,7 +2,7 @@ import { createPathOverlay } from "../pathOverlay.js";
|
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { useDepSource } from "@weasel-js/routing/react";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/canvas/deps/previewPaths.ts
|
|
6
6
|
/**
|
|
7
7
|
* `usePreviewPathsDepSource` — wires the `previewPaths` dep: where an
|
|
8
8
|
* action's `preview` draws what it would make, over this canvas.
|
|
@@ -39,6 +39,5 @@ function usePreviewPathsDepSource(canvasApiRef) {
|
|
|
39
39
|
useDepSource("previewPaths", () => dep);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
//#endregion
|
|
43
42
|
export { PREVIEW_PATHS_LAYER_ID, createPreviewPaths, usePreviewPathsDepSource };
|
|
44
43
|
//# sourceMappingURL=previewPaths.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useLatest } from "@weasel-js/react";
|
|
2
2
|
import { useDepSource } from "@weasel-js/routing/react";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/canvas/deps/resizePolicy.ts
|
|
5
5
|
/**
|
|
6
6
|
* Wires the `resizePolicy` dep consumed by `resizeAction`. Omitted
|
|
7
7
|
* `constraints` default to none; Shift's aspect lock is the snap session's.
|
|
@@ -37,6 +37,5 @@ function resizePolicyOptions(o) {
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
//#endregion
|
|
41
40
|
export { resizePolicyOptions, useResizePolicy };
|
|
42
41
|
//# sourceMappingURL=resizePolicy.js.map
|