@weasel-js/core 1.15.0 → 1.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +84 -0
- package/dist/WeaselProvider.js +4 -5
- package/dist/affordances/composeAffordanceLayer.js +1 -2
- package/dist/affordances/cornerResize.js +4 -5
- package/dist/affordances/hitAffordanceRegions.js +1 -2
- package/dist/affordances/pathAnchors.js +1 -2
- package/dist/affordances/rotateCursor.js +1 -2
- package/dist/affordances/rotationHandle.js +2 -3
- package/dist/animation/behaviors/coast.js +1 -2
- package/dist/animation/behaviors/coastByWrite.js +2 -3
- package/dist/animation/behaviors/coastOnTargets.js +2 -3
- package/dist/animation/behaviors/momentum.js +1 -2
- package/dist/animation/clipTargets.js +1 -2
- package/dist/animation/departures.js +2 -3
- package/dist/animation/poseHelpers.js +2 -3
- package/dist/animation/poseTarget.js +2 -3
- package/dist/animation/poseTransition.js +1 -2
- package/dist/animation/reflow.js +2 -3
- package/dist/animation/rewind.js +1 -2
- package/dist/animation/rig/bindRig.js +2 -3
- package/dist/animation/rig/rigNode.js +1 -2
- package/dist/animation/rig/rigSeat.js +1 -2
- package/dist/animation/rig/skinBinding.js +1 -2
- package/dist/animation/rig/useRig.js +2 -3
- package/dist/animation/wrappers/animateLifecycle.js +1 -2
- package/dist/animation/wrappers/animateOnSetPose.js +1 -2
- package/dist/animation/wrappers/instantPose.js +1 -2
- package/dist/animation/writtenPoseTarget.js +1 -2
- package/dist/barrel/interactions.js +2 -1
- package/dist/barrel/routing.js +2 -2
- package/dist/barrel/scene.js +2 -2
- package/dist/canvas/Canvas.js +5 -6
- package/dist/canvas/CanvasView.js +6 -7
- package/dist/canvas/CursorCoordsHud.js +2 -3
- package/dist/canvas/DrawCanvas.js +3 -4
- package/dist/canvas/GestureReason.js +1 -2
- package/dist/canvas/GestureReason.module.js +1 -2
- package/dist/canvas/LeanSceneCanvas.js +2 -3
- package/dist/canvas/ModalityHud.js +2 -3
- package/dist/canvas/NodeShape.js +3 -4
- package/dist/canvas/PickHud.js +2 -3
- package/dist/canvas/SceneCanvas/ActionsProviderIfRoot.js +1 -2
- package/dist/canvas/SceneCanvas/CanvasKitProviders.js +3 -4
- package/dist/canvas/SceneCanvas/DepRegistryProviderIfRoot.js +1 -2
- package/dist/canvas/SceneCanvas/DevHuds.js +1 -2
- package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js +1 -2
- package/dist/canvas/SceneCanvas/SceneCanvasInput.js +4 -5
- package/dist/canvas/SceneCanvas/SurfaceDeclarations.js +1 -2
- package/dist/canvas/SceneCanvas/brushOverlay.js +1 -2
- package/dist/canvas/SceneCanvas/builtinToolSets.js +1 -2
- package/dist/canvas/SceneCanvas/canvasPassThrough.js +1 -2
- package/dist/canvas/SceneCanvas/contributionFrameHooks.js +1 -2
- package/dist/canvas/SceneCanvas/coordTrace.js +1 -2
- package/dist/canvas/SceneCanvas/defaultNodeProperties.js +3 -4
- package/dist/canvas/SceneCanvas/defaultNodeRouting.js +1 -2
- package/dist/canvas/SceneCanvas/defaultTextEditor.js +4 -5
- package/dist/canvas/SceneCanvas/describePresets.js +1 -2
- package/dist/canvas/SceneCanvas/dispatcherGestureBounds.js +1 -2
- package/dist/canvas/SceneCanvas/features.js +1 -2
- package/dist/canvas/SceneCanvas/insertPreviewCommands.js +1 -2
- package/dist/canvas/SceneCanvas/mergeLayers.js +1 -2
- package/dist/canvas/SceneCanvas/namedPresets.js +5 -6
- package/dist/canvas/SceneCanvas/poseGeometry.js +1 -2
- package/dist/canvas/SceneCanvas/poseRegistrars.js +1 -2
- package/dist/canvas/SceneCanvas/presets/arrange.js +2 -3
- package/dist/canvas/SceneCanvas/presets/baseline.js +1 -2
- package/dist/canvas/SceneCanvas/presets/chrome.js +1 -2
- package/dist/canvas/SceneCanvas/presets/composites.js +1 -2
- package/dist/canvas/SceneCanvas/presets/edit.js +4 -5
- package/dist/canvas/SceneCanvas/presets/ingest.js +1 -2
- package/dist/canvas/SceneCanvas/presets/paths.js +3 -4
- package/dist/canvas/SceneCanvas/presets/select.js +1 -2
- package/dist/canvas/SceneCanvas/presets/toolDriven.js +2 -3
- package/dist/canvas/SceneCanvas/presets/tools.js +1 -2
- package/dist/canvas/SceneCanvas/presets/transform.js +2 -3
- package/dist/canvas/SceneCanvas/presets/view.js +2 -3
- package/dist/canvas/SceneCanvas/props.js +1 -2
- package/dist/canvas/SceneCanvas/scenePointQuery.js +2 -3
- package/dist/canvas/SceneCanvas/shapeGeneratorProperties.js +1 -2
- package/dist/canvas/SceneCanvas/toolRegistry.js +2 -3
- package/dist/canvas/SceneCanvas/useActionTunings.js +1 -2
- package/dist/canvas/SceneCanvas/useActionsPropResolver.js +1 -2
- package/dist/canvas/SceneCanvas/useBakedScene.js +2 -3
- package/dist/canvas/SceneCanvas/useBuiltinShapeTools.js +7 -8
- package/dist/canvas/SceneCanvas/useBuiltinTools.js +2 -3
- package/dist/canvas/SceneCanvas/useCanvasCamera.js +2 -3
- package/dist/canvas/SceneCanvas/useCanvasDevtoolsRoot.js +1 -2
- package/dist/canvas/SceneCanvas/useCanvasDispatcher.js +1 -2
- package/dist/canvas/SceneCanvas/useCanvasSelection.js +8 -6
- package/dist/canvas/SceneCanvas/useCanvasSelection.js.map +1 -1
- package/dist/canvas/SceneCanvas/useCanvasTools.js +2 -3
- package/dist/canvas/SceneCanvas/useChromeAffordances.js +2 -3
- package/dist/canvas/SceneCanvas/useContributionRoles.js +1 -2
- package/dist/canvas/SceneCanvas/useDepartureGhostLayer.js +4 -5
- package/dist/canvas/SceneCanvas/useDispatcherOverlayLayer.js +2 -3
- package/dist/canvas/SceneCanvas/useHeldModifiers.js +1 -2
- package/dist/canvas/SceneCanvas/useMagnificationCheck.js +41 -0
- package/dist/canvas/SceneCanvas/useMagnificationCheck.js.map +1 -0
- package/dist/canvas/SceneCanvas/useNodeAtPoint.js +1 -2
- package/dist/canvas/SceneCanvas/useNodeKinds.js +2 -3
- package/dist/canvas/SceneCanvas/usePreviewGhostLayer.js +10 -11
- package/dist/canvas/SceneCanvas/useSceneCanvasHandle.js +1 -2
- package/dist/canvas/SceneCanvas/useSceneCanvasLayers.js +6 -7
- package/dist/canvas/SceneCanvas/useSceneCanvasPathEdit.js +1 -2
- package/dist/canvas/SceneCanvas/useSceneCanvasTools.js +1 -2
- package/dist/canvas/SceneCanvas/useSceneChrome.js +5 -6
- package/dist/canvas/SceneCanvas/useSceneGestureDispatcher.js +6 -7
- package/dist/canvas/SceneCanvas/useScenePicking.js +5 -6
- package/dist/canvas/SceneCanvas/useSceneRedrawSources.js +1 -2
- package/dist/canvas/SceneCanvas/useSceneSelectTool.js +7 -8
- package/dist/canvas/SceneCanvas/useSceneSlotLayers.js +2 -3
- package/dist/canvas/SceneCanvas/useSceneStandardActions.js +26 -18
- package/dist/canvas/SceneCanvas/useSceneStandardActions.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSelectionOverlayLayer.js +2 -3
- package/dist/canvas/SceneCanvas/useSurfaceRouting.js +1 -2
- package/dist/canvas/SceneCanvas/useSurfaceViewInputs.js +1 -2
- package/dist/canvas/SceneCanvas/useToolKeybindings.js +1 -2
- package/dist/canvas/SceneCanvas/useViewportActions.js +3 -4
- package/dist/canvas/SceneCanvas/worldPointAt.js +1 -2
- package/dist/canvas/SceneCanvas.js +18 -17
- package/dist/canvas/SceneCanvas.js.map +1 -1
- package/dist/canvas/SceneViewCanvas.js +2 -3
- package/dist/canvas/SurfaceCanvas.js +1 -2
- package/dist/canvas/ViewMarker.js +1 -2
- package/dist/canvas/accentColor.js +1 -2
- package/dist/canvas/adapterDerivedPath.js +2 -3
- package/dist/canvas/adapterPickSource.js +1 -2
- package/dist/canvas/affordanceAt.js +2 -3
- package/dist/canvas/buildSceneLayer.js +4 -5
- package/dist/canvas/buildSceneTree.js +4 -5
- package/dist/canvas/canvasRenderer.js +1 -2
- package/dist/canvas/colorOverrides.js +1 -2
- package/dist/canvas/contextAttributes.js +1 -2
- package/dist/canvas/copiesAbove.js +1 -2
- package/dist/canvas/defaultDrawOne.js +1 -2
- package/dist/canvas/deps/areaSelect.js +5 -3
- package/dist/canvas/deps/areaSelect.js.map +1 -1
- package/dist/canvas/deps/booleans.js +5 -6
- package/dist/canvas/deps/changes.js +1 -2
- package/dist/canvas/deps/chromeRules.js +1 -2
- package/dist/canvas/deps/debug.js +1 -2
- package/dist/canvas/deps/dispatchSources.js +1 -2
- package/dist/canvas/deps/dispatcher.js +1 -2
- package/dist/canvas/deps/editAnchors.js +3 -4
- package/dist/canvas/deps/enteredGroup.js +1 -2
- package/dist/canvas/deps/geometryProjection.js +1 -2
- package/dist/canvas/deps/hitTestArea.js +4 -5
- package/dist/canvas/deps/ingestion.js +1 -2
- package/dist/canvas/deps/insert.js +3 -4
- package/dist/canvas/deps/insertSite.js +3 -4
- package/dist/canvas/deps/kitSettings.js +1 -2
- package/dist/canvas/deps/lassoSelect.js +5 -3
- package/dist/canvas/deps/lassoSelect.js.map +1 -1
- package/dist/canvas/deps/layout.js +1 -2
- package/dist/canvas/deps/modeDefaultTool.js +1 -2
- package/dist/canvas/deps/nodeAtPoint.js +1 -2
- package/dist/canvas/deps/pathEditCommits.js +4 -5
- package/dist/canvas/deps/pathLeaf.js +1 -2
- package/dist/canvas/deps/pathLeafDeps.js +2 -3
- package/dist/canvas/deps/poseDescriptor.js +1 -2
- package/dist/canvas/deps/previewPaths.js +1 -2
- package/dist/canvas/deps/resizePolicy.js +1 -2
- package/dist/canvas/deps/selectionSnapshot.js +1 -2
- package/dist/canvas/deps/slice.js +5 -6
- package/dist/canvas/deps/snap.js +3 -4
- package/dist/canvas/deps/surface.js +1 -2
- package/dist/canvas/deps/textEdit.js +1 -2
- package/dist/canvas/deps/transformFollowers.js +1 -2
- package/dist/canvas/deps/view.js +1 -2
- package/dist/canvas/derivedPath.js +6 -7
- package/dist/canvas/doubleClickTarget.js +1 -2
- package/dist/canvas/drawEnvelope.js +1 -2
- package/dist/canvas/drawnBounds.js +4 -5
- package/dist/canvas/getNodeAtPoint.js +1 -2
- package/dist/canvas/hostAnchor.js +1 -2
- package/dist/canvas/hud.module.js +1 -2
- package/dist/canvas/inheritedPaints.js +1 -2
- package/dist/canvas/insertPreviewExtent.js +1 -2
- package/dist/canvas/kitRequirements.js +1 -2
- package/dist/canvas/layerHover.js +1 -2
- package/dist/canvas/layerOrder.js +1 -2
- package/dist/canvas/layerSlots.js +1 -2
- package/dist/canvas/mountedCanvases.js +1 -2
- package/dist/canvas/nodeShapes/derivedPainter.js +2 -3
- package/dist/canvas/nodeShapes/imagePainter.js +1 -2
- package/dist/canvas/nodeShapes/measurePainter.js +2 -3
- package/dist/canvas/nodeShapes/memo.js +1 -2
- package/dist/canvas/nodeShapes/nodePaint.js +1 -2
- package/dist/canvas/nodeShapes/pathPainter.js +3 -4
- package/dist/canvas/nodeShapes/poseBox.js +1 -2
- package/dist/canvas/nodeShapes/rectFallbackPainter.js +1 -2
- package/dist/canvas/nodeShapes/shapePainter.js +2 -3
- package/dist/canvas/nodeShapes/strokedBounds.js +1 -2
- package/dist/canvas/nodeShapes/textPainter.js +1 -2
- package/dist/canvas/overChildren.js +1 -2
- package/dist/canvas/overlayRoleStrokes.js +1 -2
- package/dist/canvas/ownClip.js +1 -2
- package/dist/canvas/paintCull.js +1 -2
- package/dist/canvas/paintedCursorLayer.js +1 -2
- package/dist/canvas/pathOverlay.js +1 -2
- package/dist/canvas/pickIndex/nodeBroadBox.js +3 -4
- package/dist/canvas/pickIndex/scenePickIndex.js +3 -4
- package/dist/canvas/pickReach.js +1 -2
- package/dist/canvas/pickWalk.js +2 -3
- package/dist/canvas/planeClips.js +1 -2
- package/dist/canvas/poseRotation.js +1 -2
- package/dist/canvas/publishPreviews.js +1 -2
- package/dist/canvas/rasterReadback.js +1 -2
- package/dist/canvas/rasterToPng.js +1 -2
- package/dist/canvas/renderDebugSnapshot.js +1 -2
- package/dist/canvas/renderNeeds.js +1 -2
- package/dist/canvas/renderSceneToPixels.js +5 -6
- package/dist/canvas/sceneAdapter.js +37 -27
- package/dist/canvas/sceneAdapter.js.map +1 -1
- package/dist/canvas/sceneClipboard.js +19 -7
- package/dist/canvas/sceneClipboard.js.map +1 -1
- package/dist/canvas/sceneLayerPaint.js +1 -2
- package/dist/canvas/scenePickReads.js +1 -2
- package/dist/canvas/scenePickSource.js +5 -6
- package/dist/canvas/sceneSlotWiring.js +2 -3
- package/dist/canvas/sceneViewRender.js +5 -6
- package/dist/canvas/shownNodes.js +1 -2
- package/dist/canvas/slopsDebugLayer.js +1 -2
- package/dist/canvas/surfaceContribution.js +1 -2
- package/dist/canvas/useCanvasElements.js +1 -2
- package/dist/canvas/useCanvasHandle.js +1 -2
- package/dist/canvas/useCanvasPaint.js +2 -3
- package/dist/canvas/useCanvasRenderer.js +1 -2
- package/dist/canvas/useCanvasSurface.js +1 -2
- package/dist/canvas/useCanvasView.js +2 -3
- package/dist/canvas/useClientToWorld.js +1 -2
- package/dist/canvas/useExtraLayers.js +1 -2
- package/dist/canvas/useFrameLoop.js +1 -2
- package/dist/canvas/useHitObserver.js +1 -2
- package/dist/canvas/useHostAnchor.js +1 -2
- package/dist/canvas/useInFlightBounds.js +6 -6
- package/dist/canvas/useInFlightBounds.js.map +1 -1
- package/dist/canvas/useLateContentRedraw.js +1 -2
- package/dist/canvas/useLayerStack.js +2 -3
- package/dist/canvas/usePaintedCursor.js +1 -2
- package/dist/canvas/useRedrawOn.js +1 -2
- package/dist/canvas/useSceneAdapter.js +1 -2
- package/dist/canvas/useSceneLayerList.js +1 -2
- package/dist/canvas/useSurfaceInput.js +1 -2
- package/dist/canvas/useSurfaceSize.js +1 -2
- package/dist/canvas/useToolCursor.js +1 -2
- package/dist/canvas/useViewAim.js +2 -3
- package/dist/canvas/useViewHelpers.js +5 -4
- package/dist/canvas/useViewHelpers.js.map +1 -1
- package/dist/canvas/useViewLayerGate.js +1 -2
- package/dist/canvas/useViewNesting.js +1 -2
- package/dist/canvas/useViewRegistrySurface.js +1 -2
- package/dist/canvas/viewInputs.js +1 -2
- package/dist/canvas/viewMarkers.js +1 -2
- package/dist/canvas/viewRegistry.js +1 -2
- package/dist/canvas/viewSnap.js +1 -2
- package/dist/canvas/watchElementMove.js +1 -2
- package/dist/canvas/wrapNodeOutput.js +1 -2
- package/dist/core/adapters/testing/rootsTree.js +1 -2
- package/dist/core/applyOps.js +1 -2
- package/dist/core/device/targets.js +1 -2
- package/dist/core/device/useDeviceProfile.js +1 -2
- package/dist/core/device/useTargetBasePx.js +1 -2
- package/dist/core/device/watchDevicePixelRatio.js +1 -2
- package/dist/core/geometry/autoPoseDescriptor.js +2 -3
- package/dist/core/geometry/booleanOfPaths.js +1 -2
- package/dist/core/geometry/inkExtents.js +1 -2
- package/dist/core/geometry/pathPoseDescriptor.js +1 -2
- package/dist/core/geometry/poseDescriptor.js +1 -2
- package/dist/core/geometry/regionHit.js +1 -2
- package/dist/core/geometry/targetFrame.js +1 -2
- package/dist/core/geometry/unionBounds.js +1 -2
- package/dist/core/layers/backgroundFill.js +1 -2
- package/dist/core/layers/children.js +1 -2
- package/dist/core/layers/gateLayer.js +1 -2
- package/dist/core/layers/layerGroup.js +1 -2
- package/dist/core/layers/redrawSource.js +1 -2
- package/dist/core/layers/render.js +1 -2
- package/dist/core/layers/retain.js +1 -2
- package/dist/core/ops/arrange.js +1 -2
- package/dist/core/ops/create.js +2 -3
- package/dist/core/ops/createHistory.js +2 -3
- package/dist/core/ops/delete.js +2 -3
- package/dist/core/ops/nodeFlags.js +1 -2
- package/dist/core/ops/registry.js +1 -2
- package/dist/core/ops/reorder/algorithms.js +1 -2
- package/dist/core/ops/reorder/index.js +1 -2
- package/dist/core/ops/reorder/setChildOrder.js +1 -2
- package/dist/core/ops/reparent.js +1 -2
- package/dist/core/ops/select.js +1 -2
- package/dist/core/ops/setData.js +1 -2
- package/dist/core/ops/setDependsOn.js +1 -2
- package/dist/core/ops/setLayer.js +1 -2
- package/dist/core/ops/setLayout.js +1 -2
- package/dist/core/ops/setPath.js +1 -2
- package/dist/core/ops/setText.js +1 -2
- package/dist/core/ops/slot.js +1 -2
- package/dist/core/ops/transform.js +1 -2
- package/dist/core/ops/writtenBy.js +1 -2
- package/dist/core/pages/fitViewToPage.js +1 -2
- package/dist/core/pages/pageEdits.js +3 -4
- package/dist/core/pages/pages.js +1 -2
- package/dist/core/pages/pages.js.map +1 -1
- package/dist/core/pages/pagesLayer.js +1 -2
- package/dist/core/paint/meshKind.js +1 -2
- package/dist/core/paint/meshKindLazy.js +9 -18
- package/dist/core/paint/meshKindLazy.js.map +1 -1
- package/dist/core/paint/paintKindEntry.js +1 -2
- package/dist/core/paint/paintKinds.js +1 -2
- package/dist/core/paint/registerMesh.js +1 -2
- package/dist/core/scene/NodeProperties.js +1 -2
- package/dist/core/scene/NodeRouting.js +1 -2
- package/dist/core/scene/annotation.js +1 -2
- package/dist/core/scene/appliedLog.js +1 -2
- package/dist/core/scene/arrivalWindow.js +2 -3
- package/dist/core/scene/arrivals.js +1 -2
- package/dist/core/scene/booleanGroup.js +1 -2
- package/dist/core/scene/booleanOfChildren.js +1 -2
- package/dist/core/scene/boundOps.js +1 -2
- package/dist/core/scene/carryDescendants.js +2 -3
- package/dist/core/scene/clipNothing.js +1 -2
- package/dist/core/scene/composeFrame.js +1 -2
- package/dist/core/scene/composePose.js +1 -2
- package/dist/core/scene/declaredFieldSetters.js +1 -2
- package/dist/core/scene/depFrame.js +1 -2
- package/dist/core/scene/depMemo.js +1 -2
- package/dist/core/scene/dependents.js +1 -2
- package/dist/core/scene/derivedParts.js +1 -2
- package/dist/core/scene/derivedPath.js +2 -3
- package/dist/core/scene/docValues.js +1 -2
- package/dist/core/scene/documentOf.js +1 -2
- package/dist/core/scene/editMode.js +1 -2
- package/dist/core/scene/editPass.js +1 -2
- package/dist/core/scene/effectivePose.js +3 -4
- package/dist/core/scene/fieldEdits.js +1 -2
- package/dist/core/scene/fontReads.js +1 -2
- package/dist/core/scene/historyFacade.js +1 -2
- package/dist/core/scene/historyForm.js +1 -2
- package/dist/core/scene/inheritedPaint.js +1 -2
- package/dist/core/scene/kitOps.js +16 -15
- package/dist/core/scene/kitOps.js.map +1 -1
- package/dist/core/scene/kitRegistry.js +2 -3
- package/dist/core/scene/layerOps.js +1 -2
- package/dist/core/scene/layerStack.js +1 -2
- package/dist/core/scene/layoutPass.js +4 -5
- package/dist/core/scene/lockGuard.js +1 -2
- package/dist/core/scene/minSize.js +1 -2
- package/dist/core/scene/nestedHit.js +1 -2
- package/dist/core/scene/nodeAsShown.js +1 -2
- package/dist/core/scene/nodeFlags.js +1 -2
- package/dist/core/scene/nodeFnFields.js +1 -2
- package/dist/core/scene/nodeGates.js +1 -2
- package/dist/core/scene/nodeMemo.js +1 -2
- package/dist/core/scene/nodeStore.js +2 -3
- package/dist/core/scene/notifier.js +1 -2
- package/dist/core/scene/opTable.js +1 -2
- package/dist/core/scene/outerOps.js +1 -2
- package/dist/core/scene/pathEffects/blend.js +1 -2
- package/dist/core/scene/pathEffects/derive.js +2 -3
- package/dist/core/scene/pathEffects/effects.js +1 -2
- package/dist/core/scene/pathEffects/foundHidden.js +1 -2
- package/dist/core/scene/pathEffects/textAlong.js +1 -2
- package/dist/core/scene/pathEffects/textAlongBands.js +1 -2
- package/dist/core/scene/plyStacks.js +1 -2
- package/dist/core/scene/poseFeed.js +1 -2
- package/dist/core/scene/poseHold.js +1 -2
- package/dist/core/scene/poseOverrides.js +1 -2
- package/dist/core/scene/posePlies.js +1 -2
- package/dist/core/scene/poseRemovals.js +1 -2
- package/dist/core/scene/poseSnapshot.js +1 -2
- package/dist/core/scene/poseWrites.js +1 -2
- package/dist/core/scene/reconcileSpecs.js +26 -3
- package/dist/core/scene/reconcileSpecs.js.map +1 -1
- package/dist/core/scene/recorder.js +1 -2
- package/dist/core/scene/renderOrder.js +1 -2
- package/dist/core/scene/sameValue.js +1 -2
- package/dist/core/scene/scene.js +11 -12
- package/dist/core/scene/scene.js.map +1 -1
- package/dist/core/scene/sceneChanges.js +1 -2
- package/dist/core/scene/sceneEdits.js +1 -2
- package/dist/core/scene/sceneJournals.js +1 -2
- package/dist/core/scene/sceneMutators.js +2 -3
- package/dist/core/scene/scenePoseAdapter.js +1 -2
- package/dist/core/scene/sceneRecording.js +1 -2
- package/dist/core/scene/sceneSelection.js +8 -5
- package/dist/core/scene/sceneSelection.js.map +1 -1
- package/dist/core/scene/sceneState.js +3 -4
- package/dist/core/scene/scrollOffsets.js +1 -2
- package/dist/core/scene/serialization.js +2 -3
- package/dist/core/scene/staleReplay.js +1 -2
- package/dist/core/scene/statedFields.js +1 -2
- package/dist/core/scene/strategyView.js +1 -2
- package/dist/core/scene/treeEdits.js +2 -3
- package/dist/core/scene/treeOrder.js +1 -2
- package/dist/core/scene/treeReads.js +1 -2
- package/dist/core/scene/treeShape.js +1 -2
- package/dist/core/scene/types.js +1 -2
- package/dist/core/scene/types.js.map +1 -1
- package/dist/core/scene/unionOfChildren.js +1 -2
- package/dist/core/scene/unitScopes.js +20 -4
- package/dist/core/scene/unitScopes.js.map +1 -1
- package/dist/core/scene/useScene.js +2 -3
- package/dist/core/scene/worldSave.js +2 -3
- package/dist/core/selection/chromeState.js +1 -2
- package/dist/core/selection/outermostSelection.js +56 -0
- package/dist/core/selection/outermostSelection.js.map +1 -0
- package/dist/core/selection/readOnlySelection.js +1 -2
- package/dist/core/selection/selectionTarget.js +1 -2
- package/dist/core/selection/usePublishSceneSelection.js +1 -2
- package/dist/core/selection/useSelection.js +1 -2
- package/dist/core/shapeKinds.js +1 -2
- package/dist/core/stableStringify.js +1 -2
- package/dist/core/stylus/stylus.js +1 -2
- package/dist/core/stylus/usePointerStylus.js +1 -2
- package/dist/core/usePaintKinds.js +1 -2
- package/dist/core/viewport/clampView.js +1 -2
- package/dist/core/viewport/clientToWorld.js +1 -2
- package/dist/core/viewport/createVelocityTracker.js +1 -2
- package/dist/core/viewport/fitToBounds.js +1 -2
- package/dist/core/viewport/fitViewToBounds.js +1 -2
- package/dist/core/viewport/interpolateView.js +1 -2
- package/dist/core/viewport/parallax.js +1 -2
- package/dist/core/viewport/sceneNodeClientRect.js +1 -2
- package/dist/core/viewport/screenSlop.js +1 -2
- package/dist/core/viewport/useAutoCenter.js +1 -2
- package/dist/core/viewport/useCanvasSize.js +1 -2
- package/dist/core/viewport/useDecayLoop.js +1 -2
- package/dist/core/viewport/useNodeOverlayFrame.js +1 -2
- package/dist/core/viewport/useVelocityTracker.js +1 -2
- package/dist/core/viewport/useViewAnimation.js +3 -4
- package/dist/core/viewport/view.js +1 -2
- package/dist/core/viewport/viewTransform.js +1 -2
- package/dist/core/viewport/viewportWorldRect.js +1 -2
- package/dist/core/viewport/wheelHandler.js +1 -2
- package/dist/core/viewport/zoomAt.js +2 -3
- package/dist/core/viewport/zoomBounds.js +1 -2
- package/dist/debug/createDebugOverlayLayer.js +1 -2
- package/dist/debug/createDebugSink.js +1 -2
- package/dist/debug/defaultTheme.js +1 -2
- package/dist/debug/features.js +1 -2
- package/dist/debug/frameStats.js +1 -2
- package/dist/debug/overlayPanels.js +1 -2
- package/dist/debug/parseDebugFlags.js +1 -2
- package/dist/debug/useDebugSink.js +2 -3
- package/dist/{depSchema-ChQPzEkW.d.ts → depSchema-C7a_OMt-.d.ts} +61 -52
- package/dist/devtools/handlers.js +1 -2
- package/dist/devtools/history.js +1 -2
- package/dist/devtools/hook.js +1 -2
- package/dist/devtools/label.js +1 -2
- package/dist/devtools/notices.js +1 -2
- package/dist/devtools/protocol.js +1 -2
- package/dist/devtools/registry.js +1 -2
- package/dist/devtools/root.js +1 -2
- package/dist/devtools/serialize.js +1 -2
- package/dist/devtools/session.js +2 -3
- package/dist/devtools/transport.js +1 -2
- package/dist/devtools/useDevtoolsRoot.js +1 -2
- package/dist/devtools-protocol.d.ts +1 -1
- package/dist/devtools-protocol.js +2 -2
- package/dist/devtools.d.ts +1 -1
- package/dist/devtools.js +1 -2
- package/dist/domains/chrome-caps/buildChromeCtx.js +1 -2
- package/dist/domains/chrome-caps/conditions.js +1 -2
- package/dist/domains/chrome-caps/defaults.js +1 -2
- package/dist/domains/chrome-caps/resolve.js +2 -3
- package/dist/domains/chrome-caps/useChromeCaps.js +1 -2
- package/dist/domains/chrome-caps/useHoverTracking.js +1 -2
- package/dist/domains/ingestion/contentHandlers.js +1 -2
- package/dist/domains/ingestion/ghost.js +2 -3
- package/dist/domains/ingestion/imageHandler.js +1 -2
- package/dist/domains/ingestion/kitHandlers.js +2 -3
- package/dist/domains/ingestion/openFilePicker.js +1 -2
- package/dist/domains/ingestion/placement.js +1 -2
- package/dist/domains/ingestion/svgHandler.js +1 -2
- package/dist/domains/ingestion/textHandler.js +1 -2
- package/dist/domains/ingestion/useCanvasIngestion.js +1 -2
- package/dist/domains/ingestion/weaselJsonHandler.js +2 -3
- package/dist/domains/longPress/longPressFeedback.js +1 -2
- package/dist/domains/measure/actionIds.js +1 -2
- package/dist/domains/measure/measureCommands.js +6 -7
- package/dist/domains/measure/measureContribution.js +3 -4
- package/dist/domains/measure/measureEdits.js +3 -4
- package/dist/domains/measure/measureGestures.js +2 -3
- package/dist/domains/measure/measureHit.js +3 -4
- package/dist/domains/measure/measureLayer.js +3 -4
- package/dist/domains/measure/measurement.js +1 -2
- package/dist/domains/measure/measurements.js +1 -2
- package/dist/domains/modes/modeLayers.js +1 -2
- package/dist/domains/modes/modeTriggers.js +1 -2
- package/dist/domains/pathEffects/effectSources.js +2 -3
- package/dist/domains/pathEffects/index.js +1 -2
- package/dist/domains/pathEffects/readSource.js +3 -4
- package/dist/domains/pathEffects/textItems.js +1 -2
- package/dist/domains/pathEffects/useEffectSourcesLayer.js +3 -4
- package/dist/domains/paths/anchorData.js +1 -2
- package/dist/domains/paths/anchorMarkers.js +1 -2
- package/dist/domains/paths/editablePath.js +3 -4
- package/dist/domains/paths/originProjection.js +1 -2
- package/dist/domains/paths/pathEditExtension.js +1 -2
- package/dist/domains/paths/pathEditState.js +1 -2
- package/dist/domains/paths/pathEditingOverlayLayer.js +2 -3
- package/dist/domains/paths/pathLayer.js +1 -2
- package/dist/domains/paths/pathRepresentation.js +1 -2
- package/dist/domains/paths/pathSnap/glyphs.js +1 -2
- package/dist/domains/paths/pathSnap/pathSnapSource.js +1 -2
- package/dist/domains/paths/pathSnap/sceneIndex.js +1 -2
- package/dist/domains/paths/pathSnap/snapGeometry.js +2 -3
- package/dist/domains/paths/penPreviewLayer.js +1 -2
- package/dist/domains/paths/shapeGenerator.js +1 -2
- package/dist/domains/paths/strokeOutline.js +2 -3
- package/dist/domains/paths/useAnchorFields.js +1 -2
- package/dist/domains/paths/usePathEdit.js +2 -3
- package/dist/domains/poseRun/usePoseRun.js +1 -2
- package/dist/domains/selection/enteredGroupFrame.js +1 -2
- package/dist/domains/selection/enteredGroupScope.js +1 -2
- package/dist/domains/selection/enteredOperands.js +1 -2
- package/dist/domains/selection/handleCommands.js +2 -3
- package/dist/domains/selection/overlay.js +6 -7
- package/dist/domains/selection/selectionPose.js +2 -3
- package/dist/domains/snap/angle2d.js +1 -2
- package/dist/domains/snap/debugCandidates.js +1 -2
- package/dist/domains/snap/gather.js +1 -2
- package/dist/domains/snap/inputSubspace.js +2 -3
- package/dist/domains/snap/lazySession.js +1 -2
- package/dist/domains/snap/marks.js +1 -2
- package/dist/domains/snap/outcomeStore.js +1 -2
- package/dist/domains/snap/pointSnap.js +1 -2
- package/dist/domains/snap/probes2d.js +1 -2
- package/dist/domains/snap/readoutDraw.js +1 -2
- package/dist/domains/snap/readoutLayer.js +1 -2
- package/dist/domains/snap/registry.js +1 -2
- package/dist/domains/snap/resizeBox.js +1 -2
- package/dist/domains/snap/roles.js +1 -2
- package/dist/domains/snap/rotationSource.js +1 -2
- package/dist/domains/snap/sceneReads.js +2 -3
- package/dist/domains/snap/sceneSession2d.js +2 -3
- package/dist/domains/snap/screen.js +2 -3
- package/dist/domains/snap/session2d.js +4 -5
- package/dist/domains/snap/spanSnap.js +1 -2
- package/dist/domains/snap/stepAngles.js +1 -2
- package/dist/domains/text/editingDrawOne.js +1 -2
- package/dist/domains/text/hostTextEditors.js +1 -2
- package/dist/domains/text/sceneTextDrafts.js +1 -2
- package/dist/domains/text/textHitAt.js +4 -5
- package/dist/domains/text/textLayer.js +12 -2
- package/dist/domains/text/textLayer.js.map +1 -1
- package/dist/domains/text/useSceneTextEdit.js +4 -5
- package/dist/domains/viewports/aim.js +3 -4
- package/dist/domains/viewports/viewMarker.js +1 -2
- package/dist/domains/viewports/viewMarkerDrag.js +1 -2
- package/dist/domains/viewports/viewResolver.js +1 -2
- package/dist/domains/viewports/viewportLayer.js +1 -2
- package/dist/iconRegistry/IconRegistryProvider.js +1 -2
- package/dist/iconRegistry/useIconGlyph.js +1 -2
- package/dist/iconRegistry/useIconVariant.js +1 -2
- package/dist/icons.table.js +1 -2
- package/dist/icons2.table.js +1 -2
- package/dist/index.d.ts +51 -7
- package/dist/index.js +3 -2
- package/dist/input/keyState.js +1 -2
- package/dist/input/useKeyModifiers.js +1 -2
- package/dist/input/useKeyState.js +1 -2
- package/dist/interactions/actions/admitsChild.js +1 -2
- package/dist/interactions/actions/align/action.js +6 -7
- package/dist/interactions/actions/align/align.js +6 -7
- package/dist/interactions/actions/booleans/action.js +1 -2
- package/dist/interactions/actions/booleans/booleanGroupAction.js +2 -3
- package/dist/interactions/actions/booleans/booleans.js +1 -2
- package/dist/interactions/actions/booleans/commit.js +4 -5
- package/dist/interactions/actions/booleans/custom.js +2 -3
- package/dist/interactions/actions/booleans/keymap.js +1 -2
- package/dist/interactions/actions/booleans/operands.js +1 -2
- package/dist/interactions/actions/booleans/pieces.js +1 -2
- package/dist/interactions/actions/booleans/placement.js +1 -2
- package/dist/interactions/actions/booleans/useBooleans.js +1 -2
- package/dist/interactions/actions/booleans/useBooleansAdapter.js +1 -2
- package/dist/interactions/actions/clipboard/action.js +2 -3
- package/dist/interactions/actions/clipboard/clipboardOps.js +2 -3
- package/dist/interactions/actions/clipboard/materializePaste.js +1 -2
- package/dist/interactions/actions/clipboard/wireFormat.js +1 -2
- package/dist/interactions/actions/clone/action.js +7 -8
- package/dist/interactions/actions/clone/behaviors.js +4 -5
- package/dist/interactions/actions/defaultCommitAdapter.js +2 -3
- package/dist/interactions/actions/defaults/anchorEditing.js +3 -4
- package/dist/interactions/actions/defaults/anchorFields.js +1 -2
- package/dist/interactions/actions/defaults/anchorHandles.js +2 -3
- package/dist/interactions/actions/defaults/anchorJoin.js +2 -3
- package/dist/interactions/actions/defaults/areaSelect.js +6 -6
- package/dist/interactions/actions/defaults/areaSelect.js.map +1 -1
- package/dist/interactions/actions/defaults/bendSegment.js +3 -4
- package/dist/interactions/actions/defaults/cancelGesture.js +1 -2
- package/dist/interactions/actions/defaults/clearSelection.js +1 -2
- package/dist/interactions/actions/defaults/containerScroll.js +4 -5
- package/dist/interactions/actions/defaults/contextMenu.js +6 -7
- package/dist/interactions/actions/defaults/copySubtree.js +2 -3
- package/dist/interactions/actions/defaults/createPaintAction.js +3 -4
- package/dist/interactions/actions/defaults/delete.js +2 -3
- package/dist/interactions/actions/defaults/duplicate.js +5 -6
- package/dist/interactions/actions/defaults/enterGroup.js +2 -3
- package/dist/interactions/actions/defaults/enterPathEdit.js +1 -2
- package/dist/interactions/actions/defaults/enterTextEdit.js +1 -2
- package/dist/interactions/actions/defaults/escape.js +1 -2
- package/dist/interactions/actions/defaults/exitPathEdit.js +1 -2
- package/dist/interactions/actions/defaults/group.js +6 -7
- package/dist/interactions/actions/defaults/ingest.js +3 -4
- package/dist/interactions/actions/defaults/insertPathAnchor.js +2 -3
- package/dist/interactions/actions/defaults/nudge.js +3 -4
- package/dist/interactions/actions/defaults/nudgeSteps.js +2 -3
- package/dist/interactions/actions/defaults/nudgeSteps.js.map +1 -1
- package/dist/interactions/actions/defaults/pathEditMarks.js +1 -2
- package/dist/interactions/actions/defaults/pinchZoom.js +3 -4
- package/dist/interactions/actions/defaults/reorder.js +2 -3
- package/dist/interactions/actions/defaults/requiresSelection.js +1 -2
- package/dist/interactions/actions/defaults/segmentUnder.js +1 -2
- package/dist/interactions/actions/defaults/selectAll.js +1 -2
- package/dist/interactions/actions/defaults/selectDeep.js +1 -2
- package/dist/interactions/actions/defaults/setFill.js +1 -2
- package/dist/interactions/actions/defaults/setFillOpacity.js +1 -2
- package/dist/interactions/actions/defaults/setStroke.js +1 -2
- package/dist/interactions/actions/defaults/setStrokeOpacity.js +1 -2
- package/dist/interactions/actions/defaults/slice.js +1 -2
- package/dist/interactions/actions/defaults/sliceOps.js +1 -2
- package/dist/interactions/actions/defaults/toolActivate.js +1 -2
- package/dist/interactions/actions/defaults/toolResetToDefault.js +1 -2
- package/dist/interactions/actions/defaults/undoRedo.js +1 -2
- package/dist/interactions/actions/defaults/viewportDragPan.js +1 -2
- package/dist/interactions/actions/defaults/viewportWheelPan.js +1 -2
- package/dist/interactions/actions/defaults/viewportZoom.js +3 -4
- package/dist/interactions/actions/distribute/action.js +4 -5
- package/dist/interactions/actions/distribute/distribute.js +5 -6
- package/dist/interactions/actions/distribute/plan.js +1 -2
- package/dist/interactions/actions/drawnBoxes.js +4 -5
- package/dist/interactions/actions/dropVerdict.js +1 -2
- package/dist/interactions/actions/edit-anchors/action.js +4 -5
- package/dist/interactions/actions/edit-anchors/extensionDrags.js +1 -2
- package/dist/interactions/actions/edit-anchors/geometry.js +1 -2
- package/dist/interactions/actions/edit-anchors/handleDrag.js +1 -2
- package/dist/interactions/actions/edit-anchors/handles.js +1 -2
- package/dist/interactions/actions/edit-anchors/params.js +1 -2
- package/dist/interactions/actions/edit-anchors/preview.js +1 -2
- package/dist/interactions/actions/edit-anchors/symmetry.js +1 -2
- package/dist/interactions/actions/flip/action.js +8 -9
- package/dist/interactions/actions/flip/helpers.js +1 -2
- package/dist/interactions/actions/geometryProjection.js +1 -2
- package/dist/interactions/actions/gestureFrames.js +3 -4
- package/dist/interactions/actions/gestureLifecycle.js +1 -2
- package/dist/interactions/actions/hitSelection.js +7 -3
- package/dist/interactions/actions/hitSelection.js.map +1 -1
- package/dist/interactions/actions/insert/action.js +6 -7
- package/dist/interactions/actions/insert/commit.js +2 -3
- package/dist/interactions/actions/insert/extras.js +1 -2
- package/dist/interactions/actions/insert/frame.js +1 -2
- package/dist/interactions/actions/insert/geometry.js +1 -2
- package/dist/interactions/actions/insert/params.js +2 -3
- package/dist/interactions/actions/insert/parent.js +1 -2
- package/dist/interactions/actions/insert/placeAction.js +5 -6
- package/dist/interactions/actions/insert/repositionAction.js +1 -2
- package/dist/interactions/actions/insert/rotateAction.js +1 -2
- package/dist/interactions/actions/insert/session.js +5 -6
- package/dist/interactions/actions/insert/shape.js +2 -3
- package/dist/interactions/actions/lasso-select/action.js +9 -9
- package/dist/interactions/actions/lasso-select/action.js.map +1 -1
- package/dist/interactions/actions/lasso-select/behaviors/selectFromLasso.js +2 -3
- package/dist/interactions/actions/magnification.js +37 -0
- package/dist/interactions/actions/magnification.js.map +1 -0
- package/dist/interactions/actions/move/action.js +2 -3
- package/dist/interactions/actions/move/behaviors/layoutDrop.js +2 -3
- package/dist/interactions/actions/move/behaviors/reparentOnDrop.js +2 -3
- package/dist/interactions/actions/move/behaviors/snapBackOrDelete.js +1 -2
- package/dist/interactions/actions/move/behaviors/snapToContainer.js +2 -3
- package/dist/interactions/actions/move/capture.js +6 -7
- package/dist/interactions/actions/move/commit/index.js +2 -3
- package/dist/interactions/actions/move/commit/layoutDrop.js +4 -5
- package/dist/interactions/actions/move/commit/layoutRelease.js +7 -8
- package/dist/interactions/actions/move/commit/rebase.js +2 -3
- package/dist/interactions/actions/move/commit/reparent.js +5 -6
- package/dist/interactions/actions/move/delta.js +2 -3
- package/dist/interactions/actions/move/frame.js +2 -3
- package/dist/interactions/actions/move/gestureAdapter.js +1 -2
- package/dist/interactions/actions/move/landedDescendants.js +2 -3
- package/dist/interactions/actions/move/layout/container.js +3 -4
- package/dist/interactions/actions/move/layout/dragged.js +2 -3
- package/dist/interactions/actions/move/layout/dropPass.js +5 -6
- package/dist/interactions/actions/move/layout/exits.js +2 -3
- package/dist/interactions/actions/move/layout/glide.js +2 -3
- package/dist/interactions/actions/move/layout/view.js +1 -2
- package/dist/interactions/actions/move/refusal.js +2 -3
- package/dist/interactions/actions/move/session.js +4 -5
- package/dist/interactions/actions/move/translate.js +2 -3
- package/dist/interactions/actions/moveNodes.js +5 -6
- package/dist/interactions/actions/notices.js +1 -2
- package/dist/interactions/actions/outlines/createOutlines.js +1 -2
- package/dist/interactions/actions/outlines/createOutlinesAction.js +2 -3
- package/dist/interactions/actions/outlines/outlineStroke.js +2 -3
- package/dist/interactions/actions/outlines/outlineStrokeAction.js +2 -3
- package/dist/interactions/actions/outlines/replaceWithPaths.js +5 -6
- package/dist/interactions/actions/outlines/strokeRegion.js +1 -2
- package/dist/interactions/actions/outlines/useCreateOutlinesAdapter.js +1 -2
- package/dist/interactions/actions/pathCommands/cutJoin.js +3 -4
- package/dist/interactions/actions/pathCommands/livePathEdit.js +3 -4
- package/dist/interactions/actions/pathCommands/pathNodes.js +3 -4
- package/dist/interactions/actions/pathCommands/simplifyOffset.js +2 -3
- package/dist/interactions/actions/pathGestureTags.js +1 -2
- package/dist/interactions/actions/planeInput.js +2 -3
- package/dist/interactions/actions/pointerState.js +1 -2
- package/dist/interactions/actions/poseDescriptorDep.js +1 -2
- package/dist/interactions/actions/poseFrame.js +3 -4
- package/dist/interactions/actions/resize/action.js +3 -4
- package/dist/interactions/actions/resize/aspect.js +1 -2
- package/dist/interactions/actions/resize/behaviors/clampMinSize.js +1 -2
- package/dist/interactions/actions/resize/boxFrame.js +1 -2
- package/dist/interactions/actions/resize/capture.js +7 -8
- package/dist/interactions/actions/resize/commit.js +3 -4
- package/dist/interactions/actions/resize/cornerHandles.js +1 -2
- package/dist/interactions/actions/resize/frame.js +7 -8
- package/dist/interactions/actions/resize/held.js +2 -3
- package/dist/interactions/actions/resize/minimum.js +1 -2
- package/dist/interactions/actions/resize/replay.js +1 -2
- package/dist/interactions/actions/resize/ruleBounds.js +1 -2
- package/dist/interactions/actions/resize/session.js +9 -10
- package/dist/interactions/actions/resolveOverlays.js +1 -2
- package/dist/interactions/actions/resolvePreviews.js +3 -4
- package/dist/interactions/actions/rotate/action.js +5 -6
- package/dist/interactions/actions/rotate/commit.js +2 -3
- package/dist/interactions/actions/rotate/frame.js +3 -4
- package/dist/interactions/actions/rotate/geometry.js +1 -2
- package/dist/interactions/actions/rotate/handle.js +2 -3
- package/dist/interactions/actions/rotate/replay.js +2 -3
- package/dist/interactions/actions/rotate/session.js +10 -11
- package/dist/interactions/actions/selectionSubtree.js +7 -22
- package/dist/interactions/actions/selectionSubtree.js.map +1 -1
- package/dist/interactions/actions/spatialReference.js +1 -2
- package/dist/interactions/actions/testUtils.js +1 -2
- package/dist/interactions/actions/transform-again/action.js +5 -6
- package/dist/interactions/actions/transform-again/memory.js +1 -2
- package/dist/interactions/actions/transformFinish.js +1 -2
- package/dist/interactions/actions/useActionSet.js +1 -2
- package/dist/interactions/actions/useNotices.js +1 -2
- package/dist/interactions/actions/useStandardActions.js +1 -2
- package/dist/interactions/gestures/dragGesture/dragGesture.js +1 -2
- package/dist/interactions/gestures/dragGesture/dragPointOf.js +1 -2
- package/dist/interactions/gestures/dragRadial/dragRadial.js +2 -3
- package/dist/interactions/gestures/dragRect/dragRect.js +2 -3
- package/dist/interactions/gestures/handleDrag/handleDrag.js +1 -2
- package/dist/interactions/gestures/pointerDrag/pointerDrag.js +1 -2
- package/dist/interactions/gestures/shared/originProjection.js +1 -2
- package/dist/interactions/gestures/shared/screenTolerance.js +1 -2
- package/dist/interactions/gestures/thresholdDrag/thresholdDrag.js +1 -2
- package/dist/kitSettingsSchema.js +4 -5
- package/dist/test-hook/createTestHook.js +1 -2
- package/dist/test-hook/install.js +1 -2
- package/dist/test-hook/useTestHook.js +1 -2
- package/dist/test-seams.d.ts +4 -4
- package/dist/test-seams.js +2 -2
- package/dist/tools/builtin/anchors/anchorsTool.js +1 -2
- package/dist/tools/builtin/ellipse/useEllipseTool.js +2 -3
- package/dist/tools/builtin/eyedropper/useEyedropperTool.js +1 -2
- package/dist/tools/builtin/hand/dragPanContribution.js +1 -2
- package/dist/tools/builtin/hand/useHandTool.js +1 -2
- package/dist/tools/builtin/image/useImageTool.js +1 -2
- package/dist/tools/builtin/lasso/useLassoTool.js +1 -2
- package/dist/tools/builtin/line/useLineTool.js +2 -3
- package/dist/tools/builtin/measure/useMeasureTool.js +2 -3
- package/dist/tools/builtin/pen/penHandle.js +1 -2
- package/dist/tools/builtin/pen/usePenTool.js +6 -7
- package/dist/tools/builtin/pencil/usePencilTool.js +1 -2
- package/dist/tools/builtin/pickTopMostHit.js +1 -2
- package/dist/tools/builtin/polygon/usePolygonTool.js +3 -4
- package/dist/tools/builtin/pressTarget.js +1 -2
- package/dist/tools/builtin/rect/useRectTool.js +2 -3
- package/dist/tools/builtin/select/adapterPointQuery.js +3 -4
- package/dist/tools/builtin/select/collapseDeferred.js +1 -2
- package/dist/tools/builtin/select/groupEntry.js +2 -3
- package/dist/tools/builtin/select/pressDecision.js +3 -4
- package/dist/tools/builtin/select/pressDecision.js.map +1 -1
- package/dist/tools/builtin/select/selectionContributions.js +1 -2
- package/dist/tools/builtin/select/useSelectTool.js +5 -6
- package/dist/tools/builtin/shared/insertToolOptions.js +1 -2
- package/dist/tools/builtin/shared/pointerFollower.js +1 -2
- package/dist/tools/builtin/slice/useSliceTool.js +5 -6
- package/dist/tools/builtin/star/useStarTool.js +3 -4
- package/dist/tools/builtin/sticky/stickyNode.js +1 -2
- package/dist/tools/builtin/sticky/useStickyTool.js +2 -3
- package/dist/tools/builtin/text/useTextTool.js +1 -2
- package/dist/tools/index.js +2 -2
- package/dist/tools/overlayBinding.js +1 -2
- package/dist/tools/toolOptions.js +17 -4
- package/dist/tools/toolOptions.js.map +1 -1
- package/dist/tools/useKeybindings.js +1 -2
- package/dist/{types-DW14eu9B.d.ts → types-BUvUXZe5.d.ts} +3 -3
- package/dist/util/color.js +1 -2
- package/dist/util/paint.js +1 -2
- package/dist/version.js +2 -3
- package/package.json +27 -27
|
@@ -5,7 +5,7 @@ import { useEffect, useRef } from "react";
|
|
|
5
5
|
import { isDev } from "@weasel-js/react";
|
|
6
6
|
import { useActionsRegistry, useMenuHost, useOffhandAction, useOptionalDepRegistry } from "@weasel-js/routing/react";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/canvas/SceneCanvas/useContributionRoles.ts
|
|
9
9
|
/**
|
|
10
10
|
* `useContributionRoles` — installs the roles of every entry in the tools
|
|
11
11
|
* registry that a surface owns rather than the dispatcher: its actions into the
|
|
@@ -138,6 +138,5 @@ function registerDeps(depRegistry, deps) {
|
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
//#endregion
|
|
142
141
|
export { contributionEntries, useContributionRoles };
|
|
143
142
|
//# sourceMappingURL=useContributionRoles.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { deriveParallaxView } from "../../core/viewport/parallax.js";
|
|
2
1
|
import { composeChildFrame, composesFrames } from "../../core/scene/composeFrame.js";
|
|
3
|
-
import { definesFrame, effectivePose } from "../../core/scene/effectivePose.js";
|
|
4
2
|
import { viewPoseAdapter } from "../../core/scene/scrollOffsets.js";
|
|
5
|
-
import {
|
|
3
|
+
import { definesFrame, effectivePose } from "../../core/scene/effectivePose.js";
|
|
4
|
+
import { deriveParallaxView } from "../../core/viewport/parallax.js";
|
|
6
5
|
import { isCustomEntry } from "../layerSlots.js";
|
|
6
|
+
import { wrapWithPoseRotation } from "../poseRotation.js";
|
|
7
7
|
import { useMemo } from "react";
|
|
8
8
|
import { useLatest } from "@weasel-js/react";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/canvas/SceneCanvas/useDepartureGhostLayer.ts
|
|
11
11
|
/**
|
|
12
12
|
* The layer `<SceneCanvas poseTransition exit>` draws removed nodes leaving
|
|
13
13
|
* on: each ghost through the scene slot's `drawOne`, at the pose and opacity
|
|
@@ -60,6 +60,5 @@ function useDepartureGhostLayer(args) {
|
|
|
60
60
|
]);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
//#endregion
|
|
64
63
|
export { useDepartureGhostLayer };
|
|
65
64
|
//# sourceMappingURL=useDepartureGhostLayer.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { viewToTransform } from "../../core/viewport/view.js";
|
|
2
2
|
import { worldToScreen } from "../../core/viewport/viewTransform.js";
|
|
3
|
-
import { OVERLAY_ROLE_STROKES } from "../overlayRoleStrokes.js";
|
|
4
3
|
import { resolveOverlays } from "../../interactions/actions/resolveOverlays.js";
|
|
5
4
|
import { gestureOverlaysFrom, isVisibleFrom } from "../drawEnvelope.js";
|
|
6
5
|
import { insertPreviewCommands } from "./insertPreviewCommands.js";
|
|
6
|
+
import { OVERLAY_ROLE_STROKES } from "../overlayRoleStrokes.js";
|
|
7
7
|
import { brushOverlayCommands } from "./brushOverlay.js";
|
|
8
8
|
import { polygonFromPoints, polylineFromPoints } from "@weasel-js/geom";
|
|
9
9
|
import { useEffect, useMemo, useReducer } from "react";
|
|
10
10
|
import { useLatest } from "@weasel-js/react";
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// src/canvas/SceneCanvas/useDispatcherOverlayLayer.ts
|
|
13
13
|
/**
|
|
14
14
|
* Dispatcher overlay render layer for `<SceneCanvas>`.
|
|
15
15
|
*
|
|
@@ -136,6 +136,5 @@ function useDispatcherOverlayLayer(args) {
|
|
|
136
136
|
}), [styleRef]);
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
//#endregion
|
|
140
139
|
export { useDispatcherOverlayLayer };
|
|
141
140
|
//# sourceMappingURL=useDispatcherOverlayLayer.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useKeyState } from "../../input/useKeyState.js";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/canvas/SceneCanvas/useHeldModifiers.ts
|
|
5
5
|
/** The modifier keys held, for a surface's rule context. */
|
|
6
6
|
/** The modifiers held anywhere in the window, a text field included: a rule
|
|
7
7
|
* is asked about the keyboard, not about where focus is. `subscribe` reports
|
|
@@ -22,6 +22,5 @@ function useHeldModifiers() {
|
|
|
22
22
|
}), [keys]);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
//#endregion
|
|
26
25
|
export { useHeldModifiers };
|
|
27
26
|
//# sourceMappingURL=useHeldModifiers.js.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { undeclaredMagnifications } from "../../interactions/actions/magnification.js";
|
|
2
|
+
import { isDev } from "@weasel-js/registry";
|
|
3
|
+
import { useEffect } from "react";
|
|
4
|
+
|
|
5
|
+
// src/canvas/SceneCanvas/useMagnificationCheck.ts
|
|
6
|
+
var SETTLE_MS = 250;
|
|
7
|
+
var times = (n) => `${Number(n.toFixed(3))}×`;
|
|
8
|
+
/**
|
|
9
|
+
* In development, warns once per container and size when `scene` draws a
|
|
10
|
+
* container's children at a magnification its unit scopes do not declare in
|
|
11
|
+
* `drawnAt`: what silently turned a 20″ cabinet into 30″ of board. Checks
|
|
12
|
+
* after edits settle rather than on every frame of a drag.
|
|
13
|
+
*/
|
|
14
|
+
function useMagnificationCheck(scene) {
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (!isDev()) return;
|
|
17
|
+
const warned = /* @__PURE__ */ new Set();
|
|
18
|
+
let timer = null;
|
|
19
|
+
const check = () => {
|
|
20
|
+
timer = null;
|
|
21
|
+
for (const { id, drawn, declared } of undeclaredMagnifications(scene)) {
|
|
22
|
+
const size = drawn.x === drawn.y ? times(drawn.x) : `${times(drawn.x)} by ${times(drawn.y)}`;
|
|
23
|
+
const key = `${id}:${size}:${declared}`;
|
|
24
|
+
if (warned.has(key)) continue;
|
|
25
|
+
warned.add(key);
|
|
26
|
+
console.warn(`weasel: node "${id}" draws its children at ${size}, but its unit scopes declare ${times(declared)}. Set \`units.drawnAt\` on the node whose transform scales them, or correct the transform.`);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
check();
|
|
30
|
+
const unsubscribe = scene.subscribe(() => {
|
|
31
|
+
timer ??= setTimeout(check, SETTLE_MS);
|
|
32
|
+
});
|
|
33
|
+
return () => {
|
|
34
|
+
unsubscribe();
|
|
35
|
+
if (timer !== null) clearTimeout(timer);
|
|
36
|
+
};
|
|
37
|
+
}, [scene]);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { useMagnificationCheck };
|
|
41
|
+
//# sourceMappingURL=useMagnificationCheck.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMagnificationCheck.js","names":[],"sources":["../../../src/canvas/SceneCanvas/useMagnificationCheck.ts"],"sourcesContent":["import { useEffect } from 'react';\nimport { isDev } from '@weasel-js/registry';\nimport type { Scene } from 'core/scene/types';\nimport { undeclaredMagnifications } from 'interactions/actions/magnification';\n\nconst SETTLE_MS = 250;\nconst times = (n: number): string => `${Number(n.toFixed(3))}×`;\n\n/**\n * In development, warns once per container and size when `scene` draws a\n * container's children at a magnification its unit scopes do not declare in\n * `drawnAt`: what silently turned a 20″ cabinet into 30″ of board. Checks\n * after edits settle rather than on every frame of a drag.\n */\nexport function useMagnificationCheck(scene: Scene<unknown, string, unknown>): void {\n useEffect(() => {\n if (!isDev()) return;\n const warned = new Set<string>();\n let timer: ReturnType<typeof setTimeout> | null = null;\n const check = (): void => {\n timer = null;\n for (const { id, drawn, declared } of undeclaredMagnifications(scene)) {\n const size = drawn.x === drawn.y ? times(drawn.x) : `${times(drawn.x)} by ${times(drawn.y)}`;\n const key = `${id}:${size}:${declared}`;\n if (warned.has(key)) continue;\n warned.add(key);\n console.warn(\n `weasel: node \"${id}\" draws its children at ${size}, but its unit scopes declare ${times(declared)}. `\n + 'Set `units.drawnAt` on the node whose transform scales them, or correct the transform.',\n );\n }\n };\n check();\n const unsubscribe = scene.subscribe(() => {\n timer ??= setTimeout(check, SETTLE_MS);\n });\n return () => {\n unsubscribe();\n if (timer !== null) clearTimeout(timer);\n };\n }, [scene]);\n}\n"],"mappings":";;;;;AAKA,IAAM,YAAY;AAClB,IAAM,SAAS,MAAsB,GAAG,OAAO,EAAE,QAAQ,CAAC,CAAC,EAAE;;;;;;;AAQ7D,SAAgB,sBAAsB,OAA8C;CAClF,gBAAgB;EACd,IAAI,CAAC,MAAM,GAAG;EACd,MAAM,yBAAS,IAAI,IAAY;EAC/B,IAAI,QAA8C;EAClD,MAAM,cAAoB;GACxB,QAAQ;GACR,KAAK,MAAM,EAAE,IAAI,OAAO,cAAc,yBAAyB,KAAK,GAAG;IACrE,MAAM,OAAO,MAAM,MAAM,MAAM,IAAI,MAAM,MAAM,CAAC,IAAI,GAAG,MAAM,MAAM,CAAC,EAAE,MAAM,MAAM,MAAM,CAAC;IACzF,MAAM,MAAM,GAAG,GAAG,GAAG,KAAK,GAAG;IAC7B,IAAI,OAAO,IAAI,GAAG,GAAG;IACrB,OAAO,IAAI,GAAG;IACd,QAAQ,KACN,iBAAiB,GAAG,0BAA0B,KAAK,gCAAgC,MAAM,QAAQ,EAAE,2FAErG;GACF;EACF;EACA,MAAM;EACN,MAAM,cAAc,MAAM,gBAAgB;GACxC,UAAU,WAAW,OAAO,SAAS;EACvC,CAAC;EACD,aAAa;GACX,YAAY;GACZ,IAAI,UAAU,MAAM,aAAa,KAAK;EACxC;CACF,GAAG,CAAC,KAAK,CAAC;AACZ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { makeGetNodeAtPoint } from "../getNodeAtPoint.js";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/canvas/SceneCanvas/useNodeAtPoint.ts
|
|
5
5
|
/**
|
|
6
6
|
* The node under a world point with its routing kind, resolved through the
|
|
7
7
|
* select tool's own single-hit picker, so `onClick`, `onDoubleClick`, hover,
|
|
@@ -23,6 +23,5 @@ function useNodeAtPoint(args) {
|
|
|
23
23
|
]);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
//#endregion
|
|
27
26
|
export { useNodeAtPoint };
|
|
28
27
|
//# sourceMappingURL=useNodeAtPoint.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { inferredNodeRouting } from "./defaultNodeRouting.js";
|
|
2
1
|
import { createNodeRouting } from "../../core/scene/NodeRouting.js";
|
|
2
|
+
import { inferredNodeRouting } from "./defaultNodeRouting.js";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/canvas/SceneCanvas/useNodeKinds.ts
|
|
6
6
|
/**
|
|
7
7
|
* The canvas's routing-trait classifier, by node data and by node id, so
|
|
8
8
|
* `target: 'kind:text'` on a binding speaks the vocabulary of `Hit.kind`.
|
|
@@ -30,6 +30,5 @@ function useNodeKinds(scene, routing) {
|
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
//#endregion
|
|
34
33
|
export { useNodeKinds };
|
|
35
34
|
//# sourceMappingURL=useNodeKinds.js.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { deriveParallaxView } from "../../core/viewport/parallax.js";
|
|
2
|
-
import { inheritedPaintOf, inheritsPaint, sceneAncestors } from "../../core/scene/inheritedPaint.js";
|
|
3
|
-
import { withShownData } from "../../core/scene/nodeAsShown.js";
|
|
4
|
-
import { planeTransform } from "../planeClips.js";
|
|
5
|
-
import { wrapWithPoseRotation } from "../poseRotation.js";
|
|
6
|
-
import { ownClipOf } from "../ownClip.js";
|
|
7
|
-
import { scenePaintedPoseOf } from "../derivedPath.js";
|
|
8
|
-
import { scenePlaneOf } from "../scenePickSource.js";
|
|
9
|
-
import { copiesAbove } from "../copiesAbove.js";
|
|
10
1
|
import { isCustomEntry } from "../layerSlots.js";
|
|
2
|
+
import { ownClipOf } from "../ownClip.js";
|
|
3
|
+
import { wrapWithPoseRotation } from "../poseRotation.js";
|
|
11
4
|
import { previewSourcesFrom } from "../drawEnvelope.js";
|
|
12
5
|
import { flattenPreviews, resolvePreviews } from "../../interactions/actions/resolvePreviews.js";
|
|
6
|
+
import { scenePlaneOf } from "../scenePickSource.js";
|
|
7
|
+
import { planeTransform } from "../planeClips.js";
|
|
8
|
+
import { deriveParallaxView } from "../../core/viewport/parallax.js";
|
|
9
|
+
import { copiesAbove } from "../copiesAbove.js";
|
|
10
|
+
import { scenePaintedPoseOf } from "../derivedPath.js";
|
|
11
|
+
import { inheritedPaintOf, inheritsPaint, sceneAncestors } from "../../core/scene/inheritedPaint.js";
|
|
12
|
+
import { withShownData } from "../../core/scene/nodeAsShown.js";
|
|
13
13
|
import "@weasel-js/renderer";
|
|
14
14
|
import { mat3 as mat3$1 } from "@weasel-js/geom";
|
|
15
15
|
import { useEffect, useMemo, useReducer } from "react";
|
|
16
16
|
import { useLatest } from "@weasel-js/react";
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
// src/canvas/SceneCanvas/usePreviewGhostLayer.ts
|
|
19
19
|
/**
|
|
20
20
|
* Preview-ghost render layer for `<SceneCanvas>`. Renders in-flight gesture
|
|
21
21
|
* poses on top of the committed scene by reusing the scene slot's `drawOne`.
|
|
@@ -110,6 +110,5 @@ function usePreviewGhostLayer(args) {
|
|
|
110
110
|
}), [sceneRef, sceneSlotRef]);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
//#endregion
|
|
114
113
|
export { usePreviewGhostLayer };
|
|
115
114
|
//# sourceMappingURL=usePreviewGhostLayer.js.map
|
|
@@ -2,7 +2,7 @@ import { IDENTITY_VIEW, useOptionalViewRegistry } from "../viewRegistry.js";
|
|
|
2
2
|
import { useCallback, useState } from "react";
|
|
3
3
|
import { assignRef } from "@weasel-js/react";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/canvas/SceneCanvas/useSceneCanvasHandle.ts
|
|
6
6
|
/** Views added through the handle rather than declared as props or children. */
|
|
7
7
|
function useAddedViews() {
|
|
8
8
|
const surfaceViewRegistry = useOptionalViewRegistry();
|
|
@@ -75,6 +75,5 @@ function useSceneCanvasHandle(args) {
|
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
//#endregion
|
|
79
78
|
export { useAddedViews, useSceneCanvasHandle };
|
|
80
79
|
//# sourceMappingURL=useSceneCanvasHandle.js.map
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { targetSizesPx } from "../../core/device/targets.js";
|
|
2
|
-
import { drawnBoundsScene } from "../derivedPath.js";
|
|
3
|
-
import { createSnapOutcomeStore } from "../../domains/snap/outcomeStore.js";
|
|
4
|
-
import { builtLayersOf, isCustomEntry } from "../layerSlots.js";
|
|
5
|
-
import { useTargetBasePx } from "../../core/device/useTargetBasePx.js";
|
|
6
1
|
import { usePathEditOverlayLayer } from "../../domains/paths/usePathEdit.js";
|
|
2
|
+
import { builtLayersOf, isCustomEntry } from "../layerSlots.js";
|
|
7
3
|
import { createSlopsDebugLayer } from "../slopsDebugLayer.js";
|
|
4
|
+
import { useTargetBasePx } from "../../core/device/useTargetBasePx.js";
|
|
5
|
+
import { targetSizesPx } from "../../core/device/targets.js";
|
|
8
6
|
import { layersOverPresets, mergeLayersWithDefaults } from "./mergeLayers.js";
|
|
9
7
|
import { useDispatcherOverlayLayer } from "./useDispatcherOverlayLayer.js";
|
|
10
8
|
import { usePreviewGhostLayer } from "./usePreviewGhostLayer.js";
|
|
@@ -13,11 +11,13 @@ import { useEffectSourcesLayer } from "../../domains/pathEffects/useEffectSource
|
|
|
13
11
|
import { usePoseTransition } from "../../animation/poseTransition.js";
|
|
14
12
|
import { useSceneSlotLayers } from "./useSceneSlotLayers.js";
|
|
15
13
|
import { useSelectionOverlayLayer } from "./useSelectionOverlayLayer.js";
|
|
14
|
+
import { drawnBoundsScene } from "../derivedPath.js";
|
|
16
15
|
import { useEnteredGroupFrameLayer } from "../../domains/selection/enteredGroupFrame.js";
|
|
16
|
+
import { createSnapOutcomeStore } from "../../domains/snap/outcomeStore.js";
|
|
17
17
|
import { createSnapReadoutLayer } from "../../domains/snap/readoutLayer.js";
|
|
18
18
|
import { useMemo, useRef, useState } from "react";
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
// src/canvas/SceneCanvas/useSceneCanvasLayers.ts
|
|
21
21
|
/**
|
|
22
22
|
* The layer map `<SceneCanvas>` hands `<Canvas>`: the caller's `layers` over
|
|
23
23
|
* the kit defaults, with the scene and selection-overlay slots built, and the
|
|
@@ -148,6 +148,5 @@ function useSceneCanvasLayers(args) {
|
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
//#endregion
|
|
152
151
|
export { useSceneCanvasLayers };
|
|
153
152
|
//# sourceMappingURL=useSceneCanvasLayers.js.map
|
|
@@ -2,7 +2,7 @@ import { isSelectedNode } from "../../domains/paths/pathEditState.js";
|
|
|
2
2
|
import { usePathEditState } from "../../domains/paths/usePathEdit.js";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/canvas/SceneCanvas/useSceneCanvasPathEdit.ts
|
|
6
6
|
/**
|
|
7
7
|
* The canvas's path-edit state, and the select tool options that defer shift-click to it while
|
|
8
8
|
* a path is being anchor-edited.
|
|
@@ -25,6 +25,5 @@ function useSceneCanvasPathEdit(args) {
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
//#endregion
|
|
29
28
|
export { useSceneCanvasPathEdit };
|
|
30
29
|
//# sourceMappingURL=useSceneCanvasPathEdit.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCanvasTools, useFeatureBindings } from "./useCanvasTools.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/canvas/SceneCanvas/useSceneCanvasTools.ts
|
|
4
4
|
/** The canvas's tools, and the contributions and standard actions its presets bring. */
|
|
5
5
|
function useSceneCanvasTools(args) {
|
|
6
6
|
const { props, select, enabled } = args;
|
|
@@ -38,6 +38,5 @@ function useSceneCanvasTools(args) {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
//#endregion
|
|
42
41
|
export { useSceneCanvasTools };
|
|
43
42
|
//# sourceMappingURL=useSceneCanvasTools.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { useOptionalViewRegistry } from "../viewRegistry.js";
|
|
2
|
-
import { worldPointAt } from "./worldPointAt.js";
|
|
3
|
-
import { PRESET_OWNED_CHROME } from "./presets/chrome.js";
|
|
4
1
|
import { never } from "../../domains/chrome-caps/conditions.js";
|
|
5
|
-
import { presetChromeRules } from "./features.js";
|
|
6
2
|
import { useHoverTracking } from "../../domains/chrome-caps/useHoverTracking.js";
|
|
7
3
|
import { useChromeCaps } from "../../domains/chrome-caps/useChromeCaps.js";
|
|
4
|
+
import { useOptionalViewRegistry } from "../viewRegistry.js";
|
|
5
|
+
import { presetChromeRules } from "./features.js";
|
|
6
|
+
import { PRESET_OWNED_CHROME } from "./presets/chrome.js";
|
|
7
|
+
import { worldPointAt } from "./worldPointAt.js";
|
|
8
8
|
import { useChromeRulesDep } from "../deps/chromeRules.js";
|
|
9
9
|
import { useCallback, useMemo } from "react";
|
|
10
10
|
import { useLatest } from "@weasel-js/react";
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// src/canvas/SceneCanvas/useSceneChrome.ts
|
|
13
13
|
/**
|
|
14
14
|
* The node under the pointer, for `RuleCtx.hover`. One lookup, not a
|
|
15
15
|
* client-to-world thunk beside a picker: the point and the camera its
|
|
@@ -124,6 +124,5 @@ function useSceneCanvasChrome(args) {
|
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
//#endregion
|
|
128
127
|
export { hiddenChromeOf, useChromeRules, useSceneCanvasChrome, useSceneHover, useSurfaceChromeCaps };
|
|
129
128
|
//# sourceMappingURL=useSceneChrome.js.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { EMPTY_CHROME_STATE } from "../../core/selection/chromeState.js";
|
|
2
|
-
import { anchorStateFrom, buildAffordanceAt, buildClassifyTarget, layerAffordance } from "../affordanceAt.js";
|
|
3
|
-
import { useOptionalViewRegistry } from "../viewRegistry.js";
|
|
4
2
|
import { useDispatchDepSources } from "../deps/dispatchSources.js";
|
|
5
|
-
import {
|
|
6
|
-
import { VIEW_MARKER_ENTRY_ID } from "../../domains/viewports/viewMarkerDrag.js";
|
|
7
|
-
import { useKitSettingsDepSource } from "../deps/kitSettings.js";
|
|
3
|
+
import { anchorStateFrom, buildAffordanceAt, buildClassifyTarget, layerAffordance } from "../affordanceAt.js";
|
|
8
4
|
import { useChromeAffordances } from "./useChromeAffordances.js";
|
|
5
|
+
import { useKitSettingsDepSource } from "../deps/kitSettings.js";
|
|
6
|
+
import { pathFromPlane } from "../planeClips.js";
|
|
7
|
+
import { useOptionalViewRegistry } from "../viewRegistry.js";
|
|
9
8
|
import { useSurfaceRouting } from "./useSurfaceRouting.js";
|
|
10
9
|
import { traceConversion } from "./coordTrace.js";
|
|
10
|
+
import { VIEW_MARKER_ENTRY_ID } from "../../domains/viewports/viewMarkerDrag.js";
|
|
11
11
|
import { useCallback, useEffect, useInsertionEffect, useMemo, useState } from "react";
|
|
12
12
|
import { useLatest } from "@weasel-js/react";
|
|
13
13
|
import { createLongPressStore } from "@weasel-js/routing";
|
|
14
14
|
import { useActionsRegistry, useDepRegistry, useGestureDispatcher } from "@weasel-js/routing/react";
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
// src/canvas/SceneCanvas/useSceneGestureDispatcher.ts
|
|
17
17
|
/** What a press on the canvas grabs: a registered layer's widget, else a piece of the
|
|
18
18
|
* selection chrome. */
|
|
19
19
|
function useAffordanceAt(inputs, depRegistry, viewRegistry) {
|
|
@@ -175,6 +175,5 @@ function useSceneGestureDispatcher(inputs) {
|
|
|
175
175
|
useKitSettingsDepSource();
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
//#endregion
|
|
179
178
|
export { useSceneGestureDispatcher };
|
|
180
179
|
//# sourceMappingURL=useSceneGestureDispatcher.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { useOptionalViewRegistry } from "../viewRegistry.js";
|
|
2
1
|
import { asNodeId } from "../../core/scene/types.js";
|
|
3
|
-
import { useEnteredGroup } from "../deps/enteredGroup.js";
|
|
4
|
-
import { useViewLayerGate } from "../useViewLayerGate.js";
|
|
5
|
-
import { composeAlphaFor } from "../sceneSlotWiring.js";
|
|
6
2
|
import { doubleClickTarget } from "../doubleClickTarget.js";
|
|
3
|
+
import { useEnteredGroup } from "../deps/enteredGroup.js";
|
|
7
4
|
import { createEnteredGroupScope } from "../../domains/selection/enteredGroupScope.js";
|
|
5
|
+
import { composeAlphaFor } from "../sceneSlotWiring.js";
|
|
8
6
|
import { useSceneAdapter } from "../useSceneAdapter.js";
|
|
9
7
|
import { useNodeAtPoint } from "./useNodeAtPoint.js";
|
|
10
8
|
import { useSceneSelectTool } from "./useSceneSelectTool.js";
|
|
9
|
+
import { useOptionalViewRegistry } from "../viewRegistry.js";
|
|
10
|
+
import { useViewLayerGate } from "../useViewLayerGate.js";
|
|
11
11
|
import { useCallback, useMemo } from "react";
|
|
12
12
|
import { useLatest } from "@weasel-js/react";
|
|
13
13
|
import { useOptionalDepRegistry } from "@weasel-js/routing/react";
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
// src/canvas/SceneCanvas/useScenePicking.ts
|
|
16
16
|
/**
|
|
17
17
|
* The canvas's adapter and everything that answers "what is under this point": the select
|
|
18
18
|
* tool's pickers and bounds, the node kinds, and the paint gates picking shares with the painter.
|
|
@@ -85,6 +85,5 @@ function useScenePicking(args) {
|
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
//#endregion
|
|
89
88
|
export { useScenePicking };
|
|
90
89
|
//# sourceMappingURL=useScenePicking.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/canvas/SceneCanvas/useSceneRedrawSources.ts
|
|
4
4
|
/**
|
|
5
5
|
* What repaints a `<SceneCanvas>` besides its own render: the caller's
|
|
6
6
|
* sources, then the canvas's. Neither a scene write nor an override write
|
|
@@ -30,6 +30,5 @@ function useSceneRedrawSources(args) {
|
|
|
30
30
|
]);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
//#endregion
|
|
34
33
|
export { useSceneRedrawSources };
|
|
35
34
|
//# sourceMappingURL=useSceneRedrawSources.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { rectFromPlane } from "../../core/viewport/parallax.js";
|
|
2
|
-
import { AUTO_POSE_DESCRIPTOR } from "../../core/geometry/autoPoseDescriptor.js";
|
|
3
|
-
import { drawnBoundsOf } from "../drawnBounds.js";
|
|
4
|
-
import { asNodeId } from "../../core/scene/types.js";
|
|
5
1
|
import { drawnBoundsScene } from "../derivedPath.js";
|
|
6
|
-
import { scenePickSource, scenePlaneOf } from "../scenePickSource.js";
|
|
7
2
|
import { pickWalk } from "../pickWalk.js";
|
|
8
|
-
import {
|
|
3
|
+
import { rectFromPlane } from "../../core/viewport/parallax.js";
|
|
9
4
|
import { useSelectTool } from "../../tools/builtin/select/useSelectTool.js";
|
|
5
|
+
import { pickTopMostHit } from "../../tools/builtin/pickTopMostHit.js";
|
|
6
|
+
import { scenePickSource, scenePlaneOf } from "../scenePickSource.js";
|
|
7
|
+
import { asNodeId } from "../../core/scene/types.js";
|
|
8
|
+
import { drawnBoundsOf } from "../drawnBounds.js";
|
|
9
|
+
import { AUTO_POSE_DESCRIPTOR } from "../../core/geometry/autoPoseDescriptor.js";
|
|
10
10
|
import { scenePointQuery } from "./scenePointQuery.js";
|
|
11
11
|
import { useMemo } from "react";
|
|
12
12
|
import { useKitSetting, useLatest } from "@weasel-js/react";
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
// src/canvas/SceneCanvas/useSceneSelectTool.ts
|
|
15
15
|
/**
|
|
16
16
|
* Scene-aware select-tool synthesis for `<SceneCanvas>`: a `useSelectTool`
|
|
17
17
|
* over the caller's scene adapter, configured with kit-default pickEvery /
|
|
@@ -166,6 +166,5 @@ function usePointPick(args) {
|
|
|
166
166
|
}, [walk, isPointerInteractive]);
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
//#endregion
|
|
170
169
|
export { DEFAULT_PICK_TOLERANCE_PX, useSceneSelectTool };
|
|
171
170
|
//# sourceMappingURL=useSceneSelectTool.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { isCustomEntry } from "../layerSlots.js";
|
|
2
1
|
import { buildSceneLayers } from "../buildSceneLayer.js";
|
|
2
|
+
import { isCustomEntry } from "../layerSlots.js";
|
|
3
3
|
import { wireSceneSlotToScene } from "../sceneSlotWiring.js";
|
|
4
4
|
import { useSceneLayerList } from "../useSceneLayerList.js";
|
|
5
5
|
import { useMemo } from "react";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/canvas/SceneCanvas/useSceneSlotLayers.ts
|
|
8
8
|
/**
|
|
9
9
|
* The scene slot, built: the caller's config wired to the scene, and the
|
|
10
10
|
* canvas layers it paints as. A hierarchical scene gets one canvas layer per
|
|
@@ -44,6 +44,5 @@ function useSceneSlotLayers(args) {
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
//#endregion
|
|
48
47
|
export { useSceneSlotLayers };
|
|
49
48
|
//# sourceMappingURL=useSceneSlotLayers.js.map
|
|
@@ -1,32 +1,34 @@
|
|
|
1
|
+
import { asNodeId } from "../../core/scene/types.js";
|
|
1
2
|
import { useDecayLoop } from "../../core/viewport/useDecayLoop.js";
|
|
2
|
-
import { drawnBoxes } from "../../interactions/actions/drawnBoxes.js";
|
|
3
|
-
import { useEnteredGroupApiSource } from "../deps/enteredGroup.js";
|
|
4
3
|
import { useActionSet, useStandardDeps } from "../../interactions/actions/useActionSet.js";
|
|
5
|
-
import {
|
|
6
|
-
import { useViewDepSource } from "../deps/view.js";
|
|
4
|
+
import { drawnBoxes } from "../../interactions/actions/drawnBoxes.js";
|
|
7
5
|
import { useAreaSelectDepSource } from "../deps/areaSelect.js";
|
|
8
|
-
import { useNodeAtPointDepSource } from "../deps/nodeAtPoint.js";
|
|
9
|
-
import { useLassoSelectDepSource } from "../deps/lassoSelect.js";
|
|
10
|
-
import { useTextEditDepSource } from "../deps/textEdit.js";
|
|
11
|
-
import { useEditAnchorsDepSource } from "../deps/editAnchors.js";
|
|
12
|
-
import { useSelectionSnapshotDepSource } from "../deps/selectionSnapshot.js";
|
|
13
|
-
import { useInsertDepSource } from "../deps/insert.js";
|
|
14
|
-
import { useSnapDepSource } from "../deps/snap.js";
|
|
15
|
-
import { usePathLeafDepSources } from "../deps/pathLeafDeps.js";
|
|
16
6
|
import { useDebugDepSource } from "../deps/debug.js";
|
|
17
7
|
import { usePreviewPathsDepSource } from "../deps/previewPaths.js";
|
|
18
|
-
import { useSurfaceDepSources } from "../deps/surface.js";
|
|
19
8
|
import { useDepChangeNotices } from "../deps/changes.js";
|
|
20
9
|
import { useDispatcherDepSource } from "../deps/dispatcher.js";
|
|
21
|
-
import {
|
|
10
|
+
import { useEditAnchorsDepSource } from "../deps/editAnchors.js";
|
|
11
|
+
import { useSelectionSnapshotDepSource } from "../deps/selectionSnapshot.js";
|
|
12
|
+
import { useEnteredGroupApiSource } from "../deps/enteredGroup.js";
|
|
22
13
|
import { useIngestionDepSource } from "../deps/ingestion.js";
|
|
14
|
+
import { useInsertDepSource } from "../deps/insert.js";
|
|
15
|
+
import { useLassoSelectDepSource } from "../deps/lassoSelect.js";
|
|
16
|
+
import { useLayoutDepSource } from "../deps/layout.js";
|
|
17
|
+
import { useNodeAtPointDepSource } from "../deps/nodeAtPoint.js";
|
|
18
|
+
import { usePoseDescriptorDepSource } from "../deps/poseDescriptor.js";
|
|
19
|
+
import { usePathLeafDepSources } from "../deps/pathLeafDeps.js";
|
|
20
|
+
import { useSnapDepSource } from "../deps/snap.js";
|
|
21
|
+
import { useSurfaceDepSources } from "../deps/surface.js";
|
|
22
|
+
import { useTextEditDepSource } from "../deps/textEdit.js";
|
|
23
|
+
import { useViewDepSource } from "../deps/view.js";
|
|
24
|
+
import { pressTarget } from "../../tools/builtin/pressTarget.js";
|
|
23
25
|
import { useActionsPropResolver } from "./useActionsPropResolver.js";
|
|
24
26
|
import { useActionTunings, useBindingOverrides } from "./useActionTunings.js";
|
|
25
27
|
import { useViewportActions, viewportZoomOption } from "./useViewportActions.js";
|
|
26
28
|
import { useEffect, useMemo } from "react";
|
|
27
29
|
import { useActionsRegistry, useDepSource } from "@weasel-js/routing/react";
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
// src/canvas/SceneCanvas/useSceneStandardActions.ts
|
|
30
32
|
/**
|
|
31
33
|
* Registers this canvas's standard actions, and the deps they read, into its
|
|
32
34
|
* input scope, then applies the `actions` prop and `tune` over them.
|
|
@@ -69,7 +71,14 @@ function useSceneStandardActions(inputs) {
|
|
|
69
71
|
zoom: viewOn ? viewportZoom : false,
|
|
70
72
|
pinchZoom: viewOn ? viewport?.pinchZoom ?? true : false
|
|
71
73
|
});
|
|
72
|
-
|
|
74
|
+
const regionTargetOf = useMemo(() => {
|
|
75
|
+
const tree = {
|
|
76
|
+
getParent: (id) => scene.get(asNodeId(id))?.parent ?? null,
|
|
77
|
+
getNode: (id) => scene.get(asNodeId(id))
|
|
78
|
+
};
|
|
79
|
+
return (id) => pressTarget(tree, id, enteredGroup.get());
|
|
80
|
+
}, [scene, enteredGroup]);
|
|
81
|
+
useAreaSelectDepSource(scene, selection, poseDescriptor, alphaOf, reachable, regionTargetOf);
|
|
73
82
|
useNodeAtPointDepSource(pickEvery);
|
|
74
83
|
useLayoutDepSource(scene, props.layoutDropTarget, reflowTransition);
|
|
75
84
|
useEnteredGroupApiSource(enteredGroup);
|
|
@@ -96,7 +105,7 @@ function useSceneStandardActions(inputs) {
|
|
|
96
105
|
usePreviewPathsDepSource(canvasApiRef);
|
|
97
106
|
useDepChangeNotices(scene, selection.current, editAnchorsExternalState);
|
|
98
107
|
useIngestionDepSource(canvasRef, () => currentViewRef.current, ingestion?.resolveSrc, ingestion?.svg, ingestionClipboard, ingestionHandlers);
|
|
99
|
-
useLassoSelectDepSource(scene, selection, poseDescriptor, alphaOf, reachable);
|
|
108
|
+
useLassoSelectDepSource(scene, selection, poseDescriptor, alphaOf, reachable, regionTargetOf);
|
|
100
109
|
useTextEditDepSource(scene);
|
|
101
110
|
useEditAnchorsDepSource(scene, selection, adapter, editAnchorsExternalState, tune);
|
|
102
111
|
useSelectionSnapshotDepSource();
|
|
@@ -108,6 +117,5 @@ function useSceneStandardActions(inputs) {
|
|
|
108
117
|
useBindingOverrides(props.bindingOverrides);
|
|
109
118
|
}
|
|
110
119
|
|
|
111
|
-
//#endregion
|
|
112
120
|
export { useSceneStandardActions };
|
|
113
121
|
//# sourceMappingURL=useSceneStandardActions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSceneStandardActions.js","names":[],"sources":["../../../src/canvas/SceneCanvas/useSceneStandardActions.ts"],"sourcesContent":["import type { Action } from '@weasel-js/routing';\nimport type { Dispatcher, WorldPoint } from '@weasel-js/routing';\nimport { useActionsRegistry, useDepSource } from '@weasel-js/routing/react';\nimport type { Scene } from 'core/scene/types';\nimport type { SelectionApi } from 'core/selection/useSelection';\nimport { useDecayLoop } from 'core/viewport/useDecayLoop';\nimport type { ViewAnimationApi } from 'core/viewport/useViewAnimation';\nimport type { View } from 'core/viewport/view';\nimport type { ClipboardIngestCtx } from 'interactions/actions/depSchema';\nimport type { ContentHandlerEntry } from 'domains/ingestion/contentHandlers';\nimport type { PoseDescriptor } from 'interactions/actions/resize/geometry';\nimport { useActionSet, useStandardDeps } from 'interactions/actions/useActionSet';\nimport { drawnBoxes } from 'interactions/actions/drawnBoxes';\nimport type React from 'react';\nimport { useEffect, useMemo } from 'react';\nimport type { ReflowTransition } from '../../layout/types';\nimport type { SnapOutcomeStore } from 'domains/snap/outcomeStore';\nimport type { SnapSourceRegistry } from 'domains/snap/registry';\nimport type { SnapSource } from 'domains/snap/types';\nimport type { CanvasExtensionApi } from '../canvasExtension';\nimport {\n useAreaSelectDepSource,\n useDebugDepSource,\n usePreviewPathsDepSource,\n useDepChangeNotices,\n useDispatcherDepSource,\n useEditAnchorsDepSource,\n useSelectionSnapshotDepSource,\n useEnteredGroupApiSource,\n useIngestionDepSource,\n useInsertDepSource,\n useLassoSelectDepSource,\n useLayoutDepSource,\n useNodeAtPointDepSource,\n usePoseDescriptorDepSource,\n usePathLeafDepSources,\n useSnapDepSource,\n useSurfaceDepSources,\n useTextEditDepSource,\n useViewDepSource,\n} from '../deps';\nimport type { EnteredGroupApi } from '../deps/enteredGroup';\nimport type { BridgeAdapter, SceneCanvasProps } from './props';\nimport { useActionsPropResolver } from './useActionsPropResolver';\nimport { useActionTunings, useBindingOverrides } from './useActionTunings';\nimport { useViewportActions, viewportZoomOption } from './useViewportActions';\n\n/** The `<SceneCanvas>` props the standard actions and their deps read. */\nexport type StandardActionsProps = Pick<\n SceneCanvasProps<unknown, string, unknown>,\n | 'actions' | 'tune' | 'bindingOverrides' | 'geometry' | 'viewport' | 'layoutDropTarget'\n | 'reflowTransition' | 'insertNodeFactories' | 'insertPaint' | 'ingestion' | 'snap'\n>;\n\n/** What `<SceneCanvas>` hands {@link useSceneStandardActions}. */\nexport interface SceneStandardActionsInputs {\n props: StandardActionsProps;\n /** Whether the `view` preset is on; without it the viewport actions are off. */\n viewOn: boolean;\n selection: SelectionApi;\n /** The group a press resolves inside of, shared with the picking that names double-clicks. */\n enteredGroup: EnteredGroupApi;\n scene: Scene<unknown, string, unknown>;\n adapter: BridgeAdapter;\n /** The standard actions this canvas registers: its presets' and the ones\n * its tools bind, in registration order. */\n standardActions: readonly Action[];\n currentViewRef: React.RefObject<View>;\n onViewChange: (v: View) => void;\n /** Wires the `poseDescriptor` dep every built-in pose-touching action reads. */\n poseDescriptor: PoseDescriptor<unknown>;\n /** Forwarded so `cancelGestureAction` and other actions that need to\n * abort in-flight handles can read the dispatcher's control surface. */\n dispatcher: Dispatcher;\n /** World-space picker forwarded so the `nodeAtPoint` dep source can\n * reuse the same hit-test plumbing the tool dispatcher uses. */\n pickEvery: (world: WorldPoint) => string[];\n /** This canvas's own view gate for scene layers, published on the `view`\n * dep and read by the selecting actions. Absent when it hides nothing. */\n layerIsPainted?: (layerId: string) => boolean;\n /** The composed paint alpha, when the consumer fades anything, so a region\n * select passes over what is painted at zero. */\n alphaOf?: (id: string) => number;\n /** Whether a node takes hits: what a region select may take, as a press may. */\n reachable?: (id: string) => boolean;\n /** The canvas's camera runner, published on the `view` dep so\n * `viewport.zoom`'s discrete branches can animate. */\n viewAnimation: ViewAnimationApi;\n /** Lifted edit-mode state so the `pathEditingOverlay` chrome (rendered\n * outside this subtree) can read the same `editingId` the dep does. */\n editAnchorsExternalState: import('../deps/editAnchors').EditAnchorsStateSource;\n /** The snap sources a session asks: the prop's and the presets', then the registry's. */\n snap: { sources: readonly SnapSource[]; registry: SnapSourceRegistry | null; store: SnapOutcomeStore };\n /** The canvas element ref, so `useIngestionDepSource` can compute the\n * visible world rect from the client rect + current view. */\n canvasRef: React.RefObject<HTMLElement | null>;\n /** The canvas handle, whose debug sink backs the `debug` dep. */\n canvasApiRef: React.RefObject<CanvasExtensionApi | null>;\n /** Clipboard-paste ctx (this canvas's adapter + the consumer's reviver)\n * for the kit weasel-JSON handler, from `useCanvasIngestion`; absent\n * when disabled. */\n ingestionClipboard?: ClipboardIngestCtx;\n /** The canvas's own content handlers and the kit's it keeps, from `useCanvasIngestion`. */\n ingestionHandlers?: readonly ContentHandlerEntry[];\n}\n\n/**\n * Registers this canvas's standard actions, and the deps they read, into its\n * input scope, then applies the `actions` prop and `tune` over them.\n *\n * Called from a component ahead of `<SceneCanvas>`'s children, never from the\n * canvas's own body: registrations stack newest-live in effect order, and a\n * parent's effects run after its children's, so a child's override would lose.\n */\nexport function useSceneStandardActions(inputs: SceneStandardActionsInputs): void {\n const {\n props, viewOn, selection, enteredGroup, scene, adapter, standardActions, currentViewRef,\n onViewChange, poseDescriptor, dispatcher, pickEvery, layerIsPainted, alphaOf, reachable, viewAnimation,\n editAnchorsExternalState, snap, canvasRef, canvasApiRef, ingestionClipboard,\n ingestionHandlers,\n } = inputs;\n const { tune, viewport, ingestion } = props;\n const boundsIncludeStroke = props.geometry?.boundsIncludeStroke ?? true;\n const reflowTransition = props.reflowTransition as ReflowTransition<unknown> | null | undefined;\n const viewportZoom = useMemo(\n () => viewportZoomOption(viewport?.zoom, viewport?.animatedZoom),\n [viewport?.zoom, viewport?.animatedZoom],\n );\n const registry = useActionsRegistry();\n\n // Wire the dispatcher into the registry so registry.begin() can delegate\n // to dispatcher.beginUiOngoing() for UI-driven ongoing actions (color,\n // opacity).\n useEffect(() => {\n if (!registry) return;\n return registry.setDispatcher(dispatcher);\n }, [registry, dispatcher]);\n\n // Momentum for `viewport.dragPan`. The loop must be a hook (it owns a\n // `useVisibleRaf`), so it is built here and republished on the view dep.\n const decayLoop = useDecayLoop();\n\n // Build the ViewApi (stable identity, refreshed closures) and hand it to\n // useStandardDeps (which publishes the `view` dep along with selection,\n // scene, history, activeTool). `hostSize` reads the live canvas\n // element so keyboard zoom (Cmd+=/-) can anchor at the visible center.\n const view = useViewDepSource(\n currentViewRef,\n onViewChange,\n viewport?.recenter,\n () => {\n const el = canvasRef.current;\n return el ? { width: el.clientWidth, height: el.clientHeight } : null;\n },\n viewAnimation,\n decayLoop,\n layerIsPainted,\n );\n useStandardDeps({ selection, scene, view, history: scene.history });\n useActionSet(standardActions);\n // A view overlays `view` with its own camera; this name it leaves alone.\n useDepSource('rootView', () => view);\n useSurfaceDepSources(canvasRef, currentViewRef);\n useDepSource('actionParams', () => registry?.paramsOf);\n\n // viewport.pan / viewport.zoom are SceneCanvas-coupled (need the `view` dep\n // published just above), so they're registered here rather than in\n // KIT_STANDARD_DESCRIPTORS. Both default ON; consumer opts out via\n // `viewport={{ pan: false }}` / `viewport={{ zoom: false }}`.\n useViewportActions({\n pan: viewOn ? (viewport?.pan ?? true) : false,\n zoom: viewOn ? viewportZoom : false,\n pinchZoom: viewOn ? (viewport?.pinchZoom ?? true) : false,\n });\n\n // Per-dep wiring modules under `src/canvas/deps/`. See each file for the\n // dep's contract and trade-offs.\n useAreaSelectDepSource(scene, selection, poseDescriptor, alphaOf, reachable);\n useNodeAtPointDepSource(pickEvery);\n useLayoutDepSource(scene, props.layoutDropTarget, reflowTransition);\n useEnteredGroupApiSource(enteredGroup);\n useInsertDepSource(scene, adapter, props.insertNodeFactories, props.insertPaint);\n usePathLeafDepSources(scene, selection, adapter, poseDescriptor);\n useSnapDepSource(\n currentViewRef,\n {\n scene, boxes: () => drawnBoxes({ scene, poseDescriptor, view, boundsIncludeStroke }), sources: snap.sources,\n ...(snap.registry ? { registry: snap.registry } : {}),\n ...(props.snap?.reachPx !== undefined ? { reachPx: props.snap.reachPx } : {}),\n ...(props.snap?.omit ? { omit: props.snap.omit } : {}),\n ...(props.snap?.originProjection ? { originProjection: props.snap.originProjection } : {}),\n ...(props.snap?.anchors ? { anchors: props.snap.anchors } : {}),\n poseDescriptor,\n debug: () => canvasApiRef.current?.getDebug(),\n },\n snap.store,\n );\n useDebugDepSource(canvasApiRef);\n usePreviewPathsDepSource(canvasApiRef);\n useDepChangeNotices(scene, selection.current, editAnchorsExternalState);\n useIngestionDepSource(canvasRef, () => currentViewRef.current, ingestion?.resolveSrc, ingestion?.svg, ingestionClipboard, ingestionHandlers);\n useLassoSelectDepSource(scene, selection, poseDescriptor, alphaOf, reachable);\n useTextEditDepSource(scene);\n useEditAnchorsDepSource(scene, selection, adapter, editAnchorsExternalState, tune);\n useSelectionSnapshotDepSource();\n useDispatcherDepSource(dispatcher);\n usePoseDescriptorDepSource(poseDescriptor);\n useDepSource('boundsIncludeStroke', () => boundsIncludeStroke);\n\n // Keyed on the set too: a re-registration of it would otherwise land over\n // the overrides applied on top of it.\n useActionsPropResolver(props.actions, standardActions.map((a) => a.id).join('|'));\n useActionTunings(tune);\n useBindingOverrides(props.bindingOverrides);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkHA,SAAgB,wBAAwB,QAA0C;CAChF,MAAM,EACJ,OAAO,QAAQ,WAAW,cAAc,OAAO,SAAS,iBAAiB,gBACzE,cAAc,gBAAgB,YAAY,WAAW,gBAAgB,SAAS,WAAW,eACzF,0BAA0B,MAAM,WAAW,cAAc,oBACzD,sBACE;CACJ,MAAM,EAAE,MAAM,UAAU,cAAc;CACtC,MAAM,sBAAsB,MAAM,UAAU,uBAAuB;CACnE,MAAM,mBAAmB,MAAM;CAC/B,MAAM,eAAe,cACb,mBAAmB,UAAU,MAAM,UAAU,YAAY,GAC/D,CAAC,UAAU,MAAM,UAAU,YAAY,CACzC;CACA,MAAM,WAAW,mBAAmB;CAKpC,gBAAgB;EACd,IAAI,CAAC,UAAU;EACf,OAAO,SAAS,cAAc,UAAU;CAC1C,GAAG,CAAC,UAAU,UAAU,CAAC;CAIzB,MAAM,YAAY,aAAa;CAM/B,MAAM,OAAO,iBACX,gBACA,cACA,UAAU,gBACJ;EACJ,MAAM,KAAK,UAAU;EACrB,OAAO,KAAK;GAAE,OAAO,GAAG;GAAa,QAAQ,GAAG;EAAa,IAAI;CACnE,GACA,eACA,WACA,cACF;CACA,gBAAgB;EAAE;EAAW;EAAO;EAAM,SAAS,MAAM;CAAQ,CAAC;CAClE,aAAa,eAAe;CAE5B,aAAa,kBAAkB,IAAI;CACnC,qBAAqB,WAAW,cAAc;CAC9C,aAAa,sBAAsB,UAAU,QAAQ;CAMrD,mBAAmB;EACjB,KAAK,SAAU,UAAU,OAAO,OAAQ;EACxC,MAAM,SAAS,eAAe;EAC9B,WAAW,SAAU,UAAU,aAAa,OAAQ;CACtD,CAAC;CAID,uBAAuB,OAAO,WAAW,gBAAgB,SAAS,SAAS;CAC3E,wBAAwB,SAAS;CACjC,mBAAmB,OAAO,MAAM,kBAAkB,gBAAgB;CAClE,yBAAyB,YAAY;CACrC,mBAAmB,OAAO,SAAS,MAAM,qBAAqB,MAAM,WAAW;CAC/E,sBAAsB,OAAO,WAAW,SAAS,cAAc;CAC/D,iBACE,gBACA;EACE;EAAO,aAAa,WAAW;GAAE;GAAO;GAAgB;GAAM;EAAoB,CAAC;EAAG,SAAS,KAAK;EACpG,GAAI,KAAK,WAAW,EAAE,UAAU,KAAK,SAAS,IAAI,CAAC;EACnD,GAAI,MAAM,MAAM,YAAY,SAAY,EAAE,SAAS,MAAM,KAAK,QAAQ,IAAI,CAAC;EAC3E,GAAI,MAAM,MAAM,OAAO,EAAE,MAAM,MAAM,KAAK,KAAK,IAAI,CAAC;EACpD,GAAI,MAAM,MAAM,mBAAmB,EAAE,kBAAkB,MAAM,KAAK,iBAAiB,IAAI,CAAC;EACxF,GAAI,MAAM,MAAM,UAAU,EAAE,SAAS,MAAM,KAAK,QAAQ,IAAI,CAAC;EAC7D;EACA,aAAa,aAAa,SAAS,SAAS;CAC9C,GACA,KAAK,KACP;CACA,kBAAkB,YAAY;CAC9B,yBAAyB,YAAY;CACrC,oBAAoB,OAAO,UAAU,SAAS,wBAAwB;CACtE,sBAAsB,iBAAiB,eAAe,SAAS,WAAW,YAAY,WAAW,KAAK,oBAAoB,iBAAiB;CAC3I,wBAAwB,OAAO,WAAW,gBAAgB,SAAS,SAAS;CAC5E,qBAAqB,KAAK;CAC1B,wBAAwB,OAAO,WAAW,SAAS,0BAA0B,IAAI;CACjF,8BAA8B;CAC9B,uBAAuB,UAAU;CACjC,2BAA2B,cAAc;CACzC,aAAa,6BAA6B,mBAAmB;CAI7D,uBAAuB,MAAM,SAAS,gBAAgB,KAAK,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,GAAG,CAAC;CAChF,iBAAiB,IAAI;CACrB,oBAAoB,MAAM,gBAAgB;AAC5C"}
|
|
1
|
+
{"version":3,"file":"useSceneStandardActions.js","names":[],"sources":["../../../src/canvas/SceneCanvas/useSceneStandardActions.ts"],"sourcesContent":["import type { Action } from '@weasel-js/routing';\nimport type { Dispatcher, WorldPoint } from '@weasel-js/routing';\nimport { useActionsRegistry, useDepSource } from '@weasel-js/routing/react';\nimport { asNodeId, type Scene } from 'core/scene/types';\nimport type { SelectionApi } from 'core/selection/useSelection';\nimport { useDecayLoop } from 'core/viewport/useDecayLoop';\nimport type { ViewAnimationApi } from 'core/viewport/useViewAnimation';\nimport type { View } from 'core/viewport/view';\nimport type { ClipboardIngestCtx } from 'interactions/actions/depSchema';\nimport type { ContentHandlerEntry } from 'domains/ingestion/contentHandlers';\nimport type { PoseDescriptor } from 'interactions/actions/resize/geometry';\nimport { useActionSet, useStandardDeps } from 'interactions/actions/useActionSet';\nimport { drawnBoxes } from 'interactions/actions/drawnBoxes';\nimport type React from 'react';\nimport { useEffect, useMemo } from 'react';\nimport type { ReflowTransition } from '../../layout/types';\nimport type { SnapOutcomeStore } from 'domains/snap/outcomeStore';\nimport type { SnapSourceRegistry } from 'domains/snap/registry';\nimport type { SnapSource } from 'domains/snap/types';\nimport type { CanvasExtensionApi } from '../canvasExtension';\nimport {\n useAreaSelectDepSource,\n useDebugDepSource,\n usePreviewPathsDepSource,\n useDepChangeNotices,\n useDispatcherDepSource,\n useEditAnchorsDepSource,\n useSelectionSnapshotDepSource,\n useEnteredGroupApiSource,\n useIngestionDepSource,\n useInsertDepSource,\n useLassoSelectDepSource,\n useLayoutDepSource,\n useNodeAtPointDepSource,\n usePoseDescriptorDepSource,\n usePathLeafDepSources,\n useSnapDepSource,\n useSurfaceDepSources,\n useTextEditDepSource,\n useViewDepSource,\n} from '../deps';\nimport type { EnteredGroupApi } from '../deps/enteredGroup';\nimport { pressTarget } from 'tools/builtin/pressTarget';\nimport type { BridgeAdapter, SceneCanvasProps } from './props';\nimport { useActionsPropResolver } from './useActionsPropResolver';\nimport { useActionTunings, useBindingOverrides } from './useActionTunings';\nimport { useViewportActions, viewportZoomOption } from './useViewportActions';\n\n/** The `<SceneCanvas>` props the standard actions and their deps read. */\nexport type StandardActionsProps = Pick<\n SceneCanvasProps<unknown, string, unknown>,\n | 'actions' | 'tune' | 'bindingOverrides' | 'geometry' | 'viewport' | 'layoutDropTarget'\n | 'reflowTransition' | 'insertNodeFactories' | 'insertPaint' | 'ingestion' | 'snap'\n>;\n\n/** What `<SceneCanvas>` hands {@link useSceneStandardActions}. */\nexport interface SceneStandardActionsInputs {\n props: StandardActionsProps;\n /** Whether the `view` preset is on; without it the viewport actions are off. */\n viewOn: boolean;\n selection: SelectionApi;\n /** The group a press resolves inside of, shared with the picking that names double-clicks. */\n enteredGroup: EnteredGroupApi;\n scene: Scene<unknown, string, unknown>;\n adapter: BridgeAdapter;\n /** The standard actions this canvas registers: its presets' and the ones\n * its tools bind, in registration order. */\n standardActions: readonly Action[];\n currentViewRef: React.RefObject<View>;\n onViewChange: (v: View) => void;\n /** Wires the `poseDescriptor` dep every built-in pose-touching action reads. */\n poseDescriptor: PoseDescriptor<unknown>;\n /** Forwarded so `cancelGestureAction` and other actions that need to\n * abort in-flight handles can read the dispatcher's control surface. */\n dispatcher: Dispatcher;\n /** World-space picker forwarded so the `nodeAtPoint` dep source can\n * reuse the same hit-test plumbing the tool dispatcher uses. */\n pickEvery: (world: WorldPoint) => string[];\n /** This canvas's own view gate for scene layers, published on the `view`\n * dep and read by the selecting actions. Absent when it hides nothing. */\n layerIsPainted?: (layerId: string) => boolean;\n /** The composed paint alpha, when the consumer fades anything, so a region\n * select passes over what is painted at zero. */\n alphaOf?: (id: string) => number;\n /** Whether a node takes hits: what a region select may take, as a press may. */\n reachable?: (id: string) => boolean;\n /** The canvas's camera runner, published on the `view` dep so\n * `viewport.zoom`'s discrete branches can animate. */\n viewAnimation: ViewAnimationApi;\n /** Lifted edit-mode state so the `pathEditingOverlay` chrome (rendered\n * outside this subtree) can read the same `editingId` the dep does. */\n editAnchorsExternalState: import('../deps/editAnchors').EditAnchorsStateSource;\n /** The snap sources a session asks: the prop's and the presets', then the registry's. */\n snap: { sources: readonly SnapSource[]; registry: SnapSourceRegistry | null; store: SnapOutcomeStore };\n /** The canvas element ref, so `useIngestionDepSource` can compute the\n * visible world rect from the client rect + current view. */\n canvasRef: React.RefObject<HTMLElement | null>;\n /** The canvas handle, whose debug sink backs the `debug` dep. */\n canvasApiRef: React.RefObject<CanvasExtensionApi | null>;\n /** Clipboard-paste ctx (this canvas's adapter + the consumer's reviver)\n * for the kit weasel-JSON handler, from `useCanvasIngestion`; absent\n * when disabled. */\n ingestionClipboard?: ClipboardIngestCtx;\n /** The canvas's own content handlers and the kit's it keeps, from `useCanvasIngestion`. */\n ingestionHandlers?: readonly ContentHandlerEntry[];\n}\n\n/**\n * Registers this canvas's standard actions, and the deps they read, into its\n * input scope, then applies the `actions` prop and `tune` over them.\n *\n * Called from a component ahead of `<SceneCanvas>`'s children, never from the\n * canvas's own body: registrations stack newest-live in effect order, and a\n * parent's effects run after its children's, so a child's override would lose.\n */\nexport function useSceneStandardActions(inputs: SceneStandardActionsInputs): void {\n const {\n props, viewOn, selection, enteredGroup, scene, adapter, standardActions, currentViewRef,\n onViewChange, poseDescriptor, dispatcher, pickEvery, layerIsPainted, alphaOf, reachable, viewAnimation,\n editAnchorsExternalState, snap, canvasRef, canvasApiRef, ingestionClipboard,\n ingestionHandlers,\n } = inputs;\n const { tune, viewport, ingestion } = props;\n const boundsIncludeStroke = props.geometry?.boundsIncludeStroke ?? true;\n const reflowTransition = props.reflowTransition as ReflowTransition<unknown> | null | undefined;\n const viewportZoom = useMemo(\n () => viewportZoomOption(viewport?.zoom, viewport?.animatedZoom),\n [viewport?.zoom, viewport?.animatedZoom],\n );\n const registry = useActionsRegistry();\n\n // Wire the dispatcher into the registry so registry.begin() can delegate\n // to dispatcher.beginUiOngoing() for UI-driven ongoing actions (color,\n // opacity).\n useEffect(() => {\n if (!registry) return;\n return registry.setDispatcher(dispatcher);\n }, [registry, dispatcher]);\n\n // Momentum for `viewport.dragPan`. The loop must be a hook (it owns a\n // `useVisibleRaf`), so it is built here and republished on the view dep.\n const decayLoop = useDecayLoop();\n\n // Build the ViewApi (stable identity, refreshed closures) and hand it to\n // useStandardDeps (which publishes the `view` dep along with selection,\n // scene, history, activeTool). `hostSize` reads the live canvas\n // element so keyboard zoom (Cmd+=/-) can anchor at the visible center.\n const view = useViewDepSource(\n currentViewRef,\n onViewChange,\n viewport?.recenter,\n () => {\n const el = canvasRef.current;\n return el ? { width: el.clientWidth, height: el.clientHeight } : null;\n },\n viewAnimation,\n decayLoop,\n layerIsPainted,\n );\n useStandardDeps({ selection, scene, view, history: scene.history });\n useActionSet(standardActions);\n // A view overlays `view` with its own camera; this name it leaves alone.\n useDepSource('rootView', () => view);\n useSurfaceDepSources(canvasRef, currentViewRef);\n useDepSource('actionParams', () => registry?.paramsOf);\n\n // viewport.pan / viewport.zoom are SceneCanvas-coupled (need the `view` dep\n // published just above), so they're registered here rather than in\n // KIT_STANDARD_DESCRIPTORS. Both default ON; consumer opts out via\n // `viewport={{ pan: false }}` / `viewport={{ zoom: false }}`.\n useViewportActions({\n pan: viewOn ? (viewport?.pan ?? true) : false,\n zoom: viewOn ? viewportZoom : false,\n pinchZoom: viewOn ? (viewport?.pinchZoom ?? true) : false,\n });\n\n // Per-dep wiring modules under `src/canvas/deps/`. See each file for the\n // dep's contract and trade-offs.\n const regionTargetOf = useMemo(() => {\n const tree = {\n getParent: (id: string) => scene.get(asNodeId(id))?.parent ?? null,\n getNode: (id: string) => scene.get(asNodeId(id)),\n };\n return (id: string) => pressTarget(tree, id, enteredGroup.get());\n }, [scene, enteredGroup]);\n useAreaSelectDepSource(scene, selection, poseDescriptor, alphaOf, reachable, regionTargetOf);\n useNodeAtPointDepSource(pickEvery);\n useLayoutDepSource(scene, props.layoutDropTarget, reflowTransition);\n useEnteredGroupApiSource(enteredGroup);\n useInsertDepSource(scene, adapter, props.insertNodeFactories, props.insertPaint);\n usePathLeafDepSources(scene, selection, adapter, poseDescriptor);\n useSnapDepSource(\n currentViewRef,\n {\n scene, boxes: () => drawnBoxes({ scene, poseDescriptor, view, boundsIncludeStroke }), sources: snap.sources,\n ...(snap.registry ? { registry: snap.registry } : {}),\n ...(props.snap?.reachPx !== undefined ? { reachPx: props.snap.reachPx } : {}),\n ...(props.snap?.omit ? { omit: props.snap.omit } : {}),\n ...(props.snap?.originProjection ? { originProjection: props.snap.originProjection } : {}),\n ...(props.snap?.anchors ? { anchors: props.snap.anchors } : {}),\n poseDescriptor,\n debug: () => canvasApiRef.current?.getDebug(),\n },\n snap.store,\n );\n useDebugDepSource(canvasApiRef);\n usePreviewPathsDepSource(canvasApiRef);\n useDepChangeNotices(scene, selection.current, editAnchorsExternalState);\n useIngestionDepSource(canvasRef, () => currentViewRef.current, ingestion?.resolveSrc, ingestion?.svg, ingestionClipboard, ingestionHandlers);\n useLassoSelectDepSource(scene, selection, poseDescriptor, alphaOf, reachable, regionTargetOf);\n useTextEditDepSource(scene);\n useEditAnchorsDepSource(scene, selection, adapter, editAnchorsExternalState, tune);\n useSelectionSnapshotDepSource();\n useDispatcherDepSource(dispatcher);\n usePoseDescriptorDepSource(poseDescriptor);\n useDepSource('boundsIncludeStroke', () => boundsIncludeStroke);\n\n // Keyed on the set too: a re-registration of it would otherwise land over\n // the overrides applied on top of it.\n useActionsPropResolver(props.actions, standardActions.map((a) => a.id).join('|'));\n useActionTunings(tune);\n useBindingOverrides(props.bindingOverrides);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmHA,SAAgB,wBAAwB,QAA0C;CAChF,MAAM,EACJ,OAAO,QAAQ,WAAW,cAAc,OAAO,SAAS,iBAAiB,gBACzE,cAAc,gBAAgB,YAAY,WAAW,gBAAgB,SAAS,WAAW,eACzF,0BAA0B,MAAM,WAAW,cAAc,oBACzD,sBACE;CACJ,MAAM,EAAE,MAAM,UAAU,cAAc;CACtC,MAAM,sBAAsB,MAAM,UAAU,uBAAuB;CACnE,MAAM,mBAAmB,MAAM;CAC/B,MAAM,eAAe,cACb,mBAAmB,UAAU,MAAM,UAAU,YAAY,GAC/D,CAAC,UAAU,MAAM,UAAU,YAAY,CACzC;CACA,MAAM,WAAW,mBAAmB;CAKpC,gBAAgB;EACd,IAAI,CAAC,UAAU;EACf,OAAO,SAAS,cAAc,UAAU;CAC1C,GAAG,CAAC,UAAU,UAAU,CAAC;CAIzB,MAAM,YAAY,aAAa;CAM/B,MAAM,OAAO,iBACX,gBACA,cACA,UAAU,gBACJ;EACJ,MAAM,KAAK,UAAU;EACrB,OAAO,KAAK;GAAE,OAAO,GAAG;GAAa,QAAQ,GAAG;EAAa,IAAI;CACnE,GACA,eACA,WACA,cACF;CACA,gBAAgB;EAAE;EAAW;EAAO;EAAM,SAAS,MAAM;CAAQ,CAAC;CAClE,aAAa,eAAe;CAE5B,aAAa,kBAAkB,IAAI;CACnC,qBAAqB,WAAW,cAAc;CAC9C,aAAa,sBAAsB,UAAU,QAAQ;CAMrD,mBAAmB;EACjB,KAAK,SAAU,UAAU,OAAO,OAAQ;EACxC,MAAM,SAAS,eAAe;EAC9B,WAAW,SAAU,UAAU,aAAa,OAAQ;CACtD,CAAC;CAID,MAAM,iBAAiB,cAAc;EACnC,MAAM,OAAO;GACX,YAAY,OAAe,MAAM,IAAI,SAAS,EAAE,CAAC,CAAC,EAAE,UAAU;GAC9D,UAAU,OAAe,MAAM,IAAI,SAAS,EAAE,CAAC;EACjD;EACA,QAAQ,OAAe,YAAY,MAAM,IAAI,aAAa,IAAI,CAAC;CACjE,GAAG,CAAC,OAAO,YAAY,CAAC;CACxB,uBAAuB,OAAO,WAAW,gBAAgB,SAAS,WAAW,cAAc;CAC3F,wBAAwB,SAAS;CACjC,mBAAmB,OAAO,MAAM,kBAAkB,gBAAgB;CAClE,yBAAyB,YAAY;CACrC,mBAAmB,OAAO,SAAS,MAAM,qBAAqB,MAAM,WAAW;CAC/E,sBAAsB,OAAO,WAAW,SAAS,cAAc;CAC/D,iBACE,gBACA;EACE;EAAO,aAAa,WAAW;GAAE;GAAO;GAAgB;GAAM;EAAoB,CAAC;EAAG,SAAS,KAAK;EACpG,GAAI,KAAK,WAAW,EAAE,UAAU,KAAK,SAAS,IAAI,CAAC;EACnD,GAAI,MAAM,MAAM,YAAY,SAAY,EAAE,SAAS,MAAM,KAAK,QAAQ,IAAI,CAAC;EAC3E,GAAI,MAAM,MAAM,OAAO,EAAE,MAAM,MAAM,KAAK,KAAK,IAAI,CAAC;EACpD,GAAI,MAAM,MAAM,mBAAmB,EAAE,kBAAkB,MAAM,KAAK,iBAAiB,IAAI,CAAC;EACxF,GAAI,MAAM,MAAM,UAAU,EAAE,SAAS,MAAM,KAAK,QAAQ,IAAI,CAAC;EAC7D;EACA,aAAa,aAAa,SAAS,SAAS;CAC9C,GACA,KAAK,KACP;CACA,kBAAkB,YAAY;CAC9B,yBAAyB,YAAY;CACrC,oBAAoB,OAAO,UAAU,SAAS,wBAAwB;CACtE,sBAAsB,iBAAiB,eAAe,SAAS,WAAW,YAAY,WAAW,KAAK,oBAAoB,iBAAiB;CAC3I,wBAAwB,OAAO,WAAW,gBAAgB,SAAS,WAAW,cAAc;CAC5F,qBAAqB,KAAK;CAC1B,wBAAwB,OAAO,WAAW,SAAS,0BAA0B,IAAI;CACjF,8BAA8B;CAC9B,uBAAuB,UAAU;CACjC,2BAA2B,cAAc;CACzC,aAAa,6BAA6B,mBAAmB;CAI7D,uBAAuB,MAAM,SAAS,gBAAgB,KAAK,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,GAAG,CAAC;CAChF,iBAAiB,IAAI;CACrB,oBAAoB,MAAM,gBAAgB;AAC5C"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { isCustomEntry } from "../layerSlots.js";
|
|
2
1
|
import { createSelectionOverlayLayer, rotationBadgeOf } from "../../domains/selection/overlay.js";
|
|
2
|
+
import { isCustomEntry } from "../layerSlots.js";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/canvas/SceneCanvas/useSelectionOverlayLayer.ts
|
|
6
6
|
/**
|
|
7
7
|
* The selection-overlay slot, built, and where it paints its rotate badge.
|
|
8
8
|
* Both are `null` when the slot is switched off, and a pre-built layer has no badge.
|
|
@@ -46,6 +46,5 @@ function useSelectionOverlayLayer(slot, getOwnSuppressedIds, poseDescriptor, sce
|
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
//#endregion
|
|
50
49
|
export { useSelectionOverlayLayer };
|
|
51
50
|
//# sourceMappingURL=useSelectionOverlayLayer.js.map
|