@weasel-js/core 1.14.2 → 1.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +251 -0
- package/dist/WeaselProvider.js +4 -5
- package/dist/affordances/composeAffordanceLayer.js +1 -2
- package/dist/affordances/cornerResize.js +4 -5
- package/dist/affordances/hitAffordanceRegions.js +1 -2
- package/dist/affordances/pathAnchors.js +1 -3
- package/dist/affordances/pathAnchors.js.map +1 -1
- package/dist/affordances/rotateCursor.js +1 -2
- package/dist/affordances/rotationHandle.js +2 -3
- package/dist/animation/behaviors/coast.js +1 -2
- package/dist/animation/behaviors/coastByWrite.js +2 -3
- package/dist/animation/behaviors/coastOnTargets.js +2 -3
- package/dist/animation/behaviors/momentum.js +1 -2
- package/dist/animation/clipTargets.js +1 -2
- package/dist/animation/departures.js +2 -3
- package/dist/animation/poseHelpers.js +2 -3
- package/dist/animation/poseTarget.js +2 -3
- package/dist/animation/poseTransition.js +1 -2
- package/dist/animation/reflow.js +2 -3
- package/dist/animation/rewind.js +1 -2
- package/dist/animation/rig/bindRig.js +2 -3
- package/dist/animation/rig/rigNode.js +1 -2
- package/dist/animation/rig/rigSeat.js +1 -2
- package/dist/animation/rig/skinBinding.js +1 -2
- package/dist/animation/rig/useRig.js +2 -3
- package/dist/animation/wrappers/animateLifecycle.js +1 -2
- package/dist/animation/wrappers/animateOnSetPose.js +1 -2
- package/dist/animation/wrappers/instantPose.js +1 -2
- package/dist/animation/writtenPoseTarget.js +1 -2
- package/dist/barrel/interactions.js +2 -1
- package/dist/barrel/paths.js +1 -1
- package/dist/barrel/renderer.js +2 -2
- package/dist/barrel/routing.js +6 -4
- package/dist/barrel/scene.js +2 -2
- package/dist/barrel/text.js +5 -3
- package/dist/canvas/Canvas.js +10 -7
- package/dist/canvas/Canvas.js.map +1 -1
- package/dist/canvas/CanvasView.js +6 -7
- package/dist/canvas/CursorCoordsHud.js +2 -3
- package/dist/canvas/DrawCanvas.js +8 -5
- package/dist/canvas/DrawCanvas.js.map +1 -1
- package/dist/canvas/GestureReason.js +1 -2
- package/dist/canvas/GestureReason.module.js +1 -2
- package/dist/canvas/LeanSceneCanvas.js +2 -3
- package/dist/canvas/ModalityHud.js +2 -3
- package/dist/canvas/NodeShape.js +3 -4
- package/dist/canvas/PickHud.js +2 -3
- package/dist/canvas/SceneCanvas/ActionsProviderIfRoot.js +1 -2
- package/dist/canvas/SceneCanvas/CanvasKitProviders.js +3 -4
- package/dist/canvas/SceneCanvas/DepRegistryProviderIfRoot.js +1 -2
- package/dist/canvas/SceneCanvas/DevHuds.js +1 -2
- package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js +1 -2
- package/dist/canvas/SceneCanvas/SceneCanvasInput.js +8 -5
- package/dist/canvas/SceneCanvas/SceneCanvasInput.js.map +1 -1
- package/dist/canvas/SceneCanvas/SurfaceDeclarations.js +1 -2
- package/dist/canvas/SceneCanvas/brushOverlay.js +1 -2
- package/dist/canvas/SceneCanvas/builtinToolSets.js +7 -5
- package/dist/canvas/SceneCanvas/builtinToolSets.js.map +1 -1
- package/dist/canvas/SceneCanvas/canvasPassThrough.js +1 -2
- package/dist/canvas/SceneCanvas/contributionFrameHooks.js +1 -2
- package/dist/canvas/SceneCanvas/coordTrace.js +1 -2
- package/dist/canvas/SceneCanvas/defaultNodeProperties.js +4 -5
- package/dist/canvas/SceneCanvas/defaultNodeRouting.js +1 -2
- package/dist/canvas/SceneCanvas/defaultTextEditor.js +4 -5
- package/dist/canvas/SceneCanvas/describePresets.js +1 -2
- package/dist/canvas/SceneCanvas/dispatcherGestureBounds.js +1 -2
- package/dist/canvas/SceneCanvas/features.js +1 -2
- package/dist/canvas/SceneCanvas/insertPreviewCommands.js +1 -2
- package/dist/canvas/SceneCanvas/mergeLayers.js +1 -2
- package/dist/canvas/SceneCanvas/namedPresets.js +5 -6
- package/dist/canvas/SceneCanvas/poseGeometry.js +1 -2
- package/dist/canvas/SceneCanvas/poseRegistrars.js +1 -2
- package/dist/canvas/SceneCanvas/presets/arrange.js +2 -3
- package/dist/canvas/SceneCanvas/presets/baseline.js +1 -2
- package/dist/canvas/SceneCanvas/presets/chrome.js +1 -2
- package/dist/canvas/SceneCanvas/presets/composites.js +1 -2
- package/dist/canvas/SceneCanvas/presets/edit.js +4 -5
- package/dist/canvas/SceneCanvas/presets/ingest.js +1 -2
- package/dist/canvas/SceneCanvas/presets/paths.js +9 -10
- package/dist/canvas/SceneCanvas/presets/paths.js.map +1 -1
- package/dist/canvas/SceneCanvas/presets/select.js +1 -2
- package/dist/canvas/SceneCanvas/presets/toolDriven.js +2 -3
- package/dist/canvas/SceneCanvas/presets/tools.js +1 -2
- package/dist/canvas/SceneCanvas/presets/transform.js +2 -3
- package/dist/canvas/SceneCanvas/presets/view.js +2 -3
- package/dist/canvas/SceneCanvas/props.js +1 -2
- package/dist/canvas/SceneCanvas/scenePointQuery.js +2 -3
- package/dist/canvas/SceneCanvas/shapeGeneratorProperties.js +2 -3
- package/dist/canvas/SceneCanvas/shapeGeneratorProperties.js.map +1 -1
- package/dist/canvas/SceneCanvas/toolRegistry.js +2 -3
- package/dist/canvas/SceneCanvas/useActionTunings.js +1 -2
- package/dist/canvas/SceneCanvas/useActionsPropResolver.js +1 -2
- package/dist/canvas/SceneCanvas/useBakedScene.js +2 -3
- package/dist/canvas/SceneCanvas/useBuiltinShapeTools.js +7 -8
- package/dist/canvas/SceneCanvas/useBuiltinTools.js +3 -2
- package/dist/canvas/SceneCanvas/useBuiltinTools.js.map +1 -1
- package/dist/canvas/SceneCanvas/useCanvasCamera.js +2 -3
- package/dist/canvas/SceneCanvas/useCanvasDevtoolsRoot.js +1 -2
- package/dist/canvas/SceneCanvas/useCanvasDispatcher.js +1 -2
- package/dist/canvas/SceneCanvas/useCanvasSelection.js +8 -6
- package/dist/canvas/SceneCanvas/useCanvasSelection.js.map +1 -1
- package/dist/canvas/SceneCanvas/useCanvasTools.js +2 -3
- package/dist/canvas/SceneCanvas/useChromeAffordances.js +2 -3
- package/dist/canvas/SceneCanvas/useContributionRoles.js +3 -2
- package/dist/canvas/SceneCanvas/useContributionRoles.js.map +1 -1
- package/dist/canvas/SceneCanvas/useDepartureGhostLayer.js +4 -5
- package/dist/canvas/SceneCanvas/useDispatcherOverlayLayer.js +2 -3
- package/dist/canvas/SceneCanvas/useHeldModifiers.js +1 -2
- package/dist/canvas/SceneCanvas/useMagnificationCheck.js +41 -0
- package/dist/canvas/SceneCanvas/useMagnificationCheck.js.map +1 -0
- package/dist/canvas/SceneCanvas/useNodeAtPoint.js +1 -2
- package/dist/canvas/SceneCanvas/useNodeKinds.js +2 -3
- package/dist/canvas/SceneCanvas/usePreviewGhostLayer.js +10 -11
- package/dist/canvas/SceneCanvas/useSceneCanvasHandle.js +1 -2
- package/dist/canvas/SceneCanvas/useSceneCanvasLayers.js +6 -7
- package/dist/canvas/SceneCanvas/useSceneCanvasPathEdit.js +1 -2
- package/dist/canvas/SceneCanvas/useSceneCanvasTools.js +1 -2
- package/dist/canvas/SceneCanvas/useSceneChrome.js +22 -11
- package/dist/canvas/SceneCanvas/useSceneChrome.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneGestureDispatcher.js +6 -7
- package/dist/canvas/SceneCanvas/useScenePicking.js +5 -6
- package/dist/canvas/SceneCanvas/useSceneRedrawSources.js +1 -2
- package/dist/canvas/SceneCanvas/useSceneSelectTool.js +7 -8
- package/dist/canvas/SceneCanvas/useSceneSlotLayers.js +2 -3
- package/dist/canvas/SceneCanvas/useSceneStandardActions.js +28 -17
- package/dist/canvas/SceneCanvas/useSceneStandardActions.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSelectionOverlayLayer.js +2 -3
- package/dist/canvas/SceneCanvas/useSurfaceRouting.js +1 -2
- package/dist/canvas/SceneCanvas/useSurfaceViewInputs.js +1 -2
- package/dist/canvas/SceneCanvas/useToolKeybindings.js +1 -2
- package/dist/canvas/SceneCanvas/useViewportActions.js +3 -4
- package/dist/canvas/SceneCanvas/worldPointAt.js +1 -2
- package/dist/canvas/SceneCanvas.js +22 -20
- package/dist/canvas/SceneCanvas.js.map +1 -1
- package/dist/canvas/SceneViewCanvas.js +7 -4
- package/dist/canvas/SceneViewCanvas.js.map +1 -1
- package/dist/canvas/SurfaceCanvas.js +1 -2
- package/dist/canvas/ViewMarker.js +1 -2
- package/dist/canvas/accentColor.js +1 -2
- package/dist/canvas/adapterDerivedPath.js +2 -3
- package/dist/canvas/adapterPickSource.js +1 -2
- package/dist/canvas/affordanceAt.js +2 -4
- package/dist/canvas/affordanceAt.js.map +1 -1
- package/dist/canvas/buildSceneLayer.js +4 -5
- package/dist/canvas/buildSceneTree.js +4 -5
- package/dist/canvas/canvasRenderer.js +1 -2
- package/dist/canvas/colorOverrides.js +1 -2
- package/dist/canvas/contextAttributes.js +1 -2
- package/dist/canvas/copiesAbove.js +1 -2
- package/dist/canvas/defaultDrawOne.js +1 -2
- package/dist/canvas/deps/areaSelect.js +5 -3
- package/dist/canvas/deps/areaSelect.js.map +1 -1
- package/dist/canvas/deps/booleans.js +5 -6
- package/dist/canvas/deps/changes.js +1 -2
- package/dist/canvas/deps/chromeRules.js +36 -0
- package/dist/canvas/deps/chromeRules.js.map +1 -0
- package/dist/canvas/deps/debug.js +1 -2
- package/dist/canvas/deps/dispatchSources.js +1 -2
- package/dist/canvas/deps/dispatcher.js +1 -2
- package/dist/canvas/deps/editAnchors.js +3 -10
- package/dist/canvas/deps/editAnchors.js.map +1 -1
- package/dist/canvas/deps/enteredGroup.js +1 -2
- package/dist/canvas/deps/geometryProjection.js +1 -2
- package/dist/canvas/deps/hitTestArea.js +6 -5
- package/dist/canvas/deps/hitTestArea.js.map +1 -1
- package/dist/canvas/deps/ingestion.js +1 -2
- package/dist/canvas/deps/insert.js +3 -4
- package/dist/canvas/deps/insertSite.js +3 -4
- package/dist/canvas/deps/kitSettings.js +1 -2
- package/dist/canvas/deps/lassoSelect.js +5 -3
- package/dist/canvas/deps/lassoSelect.js.map +1 -1
- package/dist/canvas/deps/layout.js +1 -2
- package/dist/canvas/deps/modeDefaultTool.js +22 -0
- package/dist/canvas/deps/modeDefaultTool.js.map +1 -0
- package/dist/canvas/deps/nodeAtPoint.js +1 -2
- package/dist/canvas/deps/pathEditCommits.js +3 -4
- package/dist/canvas/deps/pathLeaf.js +1 -2
- package/dist/canvas/deps/pathLeafDeps.js +2 -3
- package/dist/canvas/deps/poseDescriptor.js +1 -2
- package/dist/canvas/deps/previewPaths.js +1 -2
- package/dist/canvas/deps/resizePolicy.js +1 -2
- package/dist/canvas/deps/selectionSnapshot.js +22 -0
- package/dist/canvas/deps/selectionSnapshot.js.map +1 -0
- package/dist/canvas/deps/slice.js +5 -6
- package/dist/canvas/deps/snap.js +4 -4
- package/dist/canvas/deps/snap.js.map +1 -1
- package/dist/canvas/deps/surface.js +1 -2
- package/dist/canvas/deps/textEdit.js +1 -2
- package/dist/canvas/deps/transformFollowers.js +1 -2
- package/dist/canvas/deps/view.js +1 -2
- package/dist/canvas/derivedPath.js +6 -7
- package/dist/canvas/doubleClickTarget.js +1 -2
- package/dist/canvas/drawEnvelope.js +1 -2
- package/dist/canvas/drawnBounds.js +4 -5
- package/dist/canvas/getNodeAtPoint.js +1 -2
- package/dist/canvas/hostAnchor.js +1 -2
- package/dist/canvas/hud.module.js +1 -2
- package/dist/canvas/inheritedPaints.js +1 -2
- package/dist/canvas/insertPreviewExtent.js +1 -2
- package/dist/canvas/kitRequirements.js +1 -2
- package/dist/canvas/layerHover.js +1 -2
- package/dist/canvas/layerOrder.js +1 -2
- package/dist/canvas/layerSlots.js +1 -2
- package/dist/canvas/mountedCanvases.js +1 -2
- package/dist/canvas/nodeShapes/derivedPainter.js +2 -3
- package/dist/canvas/nodeShapes/imagePainter.js +1 -2
- package/dist/canvas/nodeShapes/measurePainter.js +2 -3
- package/dist/canvas/nodeShapes/memo.js +1 -2
- package/dist/canvas/nodeShapes/nodePaint.js +1 -2
- package/dist/canvas/nodeShapes/pathPainter.js +3 -4
- package/dist/canvas/nodeShapes/poseBox.js +1 -2
- package/dist/canvas/nodeShapes/rectFallbackPainter.js +1 -2
- package/dist/canvas/nodeShapes/shapePainter.js +2 -3
- package/dist/canvas/nodeShapes/strokedBounds.js +1 -2
- package/dist/canvas/nodeShapes/textPainter.js +1 -2
- package/dist/canvas/overChildren.js +1 -2
- package/dist/canvas/overlayRoleStrokes.js +1 -2
- package/dist/canvas/ownClip.js +1 -2
- package/dist/canvas/paintCull.js +1 -2
- package/dist/canvas/paintedCursorLayer.js +1 -2
- package/dist/canvas/pathOverlay.js +1 -2
- package/dist/canvas/pickIndex/nodeBroadBox.js +3 -4
- package/dist/canvas/pickIndex/scenePickIndex.js +3 -4
- package/dist/canvas/pickReach.js +13 -10
- package/dist/canvas/pickReach.js.map +1 -1
- package/dist/canvas/pickWalk.js +9 -8
- package/dist/canvas/pickWalk.js.map +1 -1
- package/dist/canvas/planeClips.js +1 -2
- package/dist/canvas/poseRotation.js +1 -2
- package/dist/canvas/publishPreviews.js +1 -2
- package/dist/canvas/rasterReadback.js +1 -2
- package/dist/canvas/rasterToPng.js +1 -2
- package/dist/canvas/renderDebugSnapshot.js +1 -2
- package/dist/canvas/renderNeeds.js +1 -2
- package/dist/canvas/renderSceneToPixels.js +5 -6
- package/dist/canvas/sceneAdapter.js +37 -27
- package/dist/canvas/sceneAdapter.js.map +1 -1
- package/dist/canvas/sceneClipboard.js +19 -7
- package/dist/canvas/sceneClipboard.js.map +1 -1
- package/dist/canvas/sceneLayerPaint.js +1 -2
- package/dist/canvas/scenePickReads.js +1 -2
- package/dist/canvas/scenePickSource.js +7 -8
- package/dist/canvas/scenePickSource.js.map +1 -1
- package/dist/canvas/sceneSlotWiring.js +2 -3
- package/dist/canvas/sceneViewRender.js +5 -6
- package/dist/canvas/shownNodes.js +1 -2
- package/dist/canvas/slopsDebugLayer.js +1 -2
- package/dist/canvas/surfaceContribution.js +1 -2
- package/dist/canvas/useCanvasElements.js +1 -2
- package/dist/canvas/useCanvasHandle.js +1 -2
- package/dist/canvas/useCanvasPaint.js +2 -3
- package/dist/canvas/useCanvasRenderer.js +1 -2
- package/dist/canvas/useCanvasSurface.js +22 -5
- package/dist/canvas/useCanvasSurface.js.map +1 -1
- package/dist/canvas/useCanvasView.js +2 -3
- package/dist/canvas/useClientToWorld.js +1 -2
- package/dist/canvas/useExtraLayers.js +1 -2
- package/dist/canvas/useFrameLoop.js +7 -9
- package/dist/canvas/useFrameLoop.js.map +1 -1
- package/dist/canvas/useHitObserver.js +1 -2
- package/dist/canvas/useHostAnchor.js +1 -2
- package/dist/canvas/useInFlightBounds.js +6 -6
- package/dist/canvas/useInFlightBounds.js.map +1 -1
- package/dist/canvas/useLateContentRedraw.js +1 -2
- package/dist/canvas/useLayerStack.js +2 -3
- package/dist/canvas/usePaintedCursor.js +1 -2
- package/dist/canvas/useRedrawOn.js +1 -2
- package/dist/canvas/useSceneAdapter.js +1 -2
- package/dist/canvas/useSceneLayerList.js +1 -2
- package/dist/canvas/useSurfaceInput.js +1 -2
- package/dist/canvas/useSurfaceSize.js +5 -5
- package/dist/canvas/useSurfaceSize.js.map +1 -1
- package/dist/canvas/useToolCursor.js +1 -2
- package/dist/canvas/useViewAim.js +2 -3
- package/dist/canvas/useViewHelpers.js +5 -4
- package/dist/canvas/useViewHelpers.js.map +1 -1
- package/dist/canvas/useViewLayerGate.js +1 -2
- package/dist/canvas/useViewNesting.js +1 -2
- package/dist/canvas/useViewRegistrySurface.js +1 -2
- package/dist/canvas/viewInputs.js +1 -2
- package/dist/canvas/viewMarkers.js +1 -2
- package/dist/canvas/viewRegistry.js +1 -2
- package/dist/canvas/viewSnap.js +1 -2
- package/dist/canvas/watchElementMove.js +1 -2
- package/dist/canvas/wrapNodeOutput.js +1 -2
- package/dist/core/adapters/testing/rootsTree.js +1 -2
- package/dist/core/applyOps.js +1 -2
- package/dist/core/device/targets.js +1 -2
- package/dist/core/device/useDeviceProfile.js +1 -2
- package/dist/core/device/useTargetBasePx.js +1 -2
- package/dist/core/device/watchDevicePixelRatio.js +1 -2
- package/dist/core/geometry/autoPoseDescriptor.js +2 -3
- package/dist/core/geometry/booleanOfPaths.js +1 -2
- package/dist/core/geometry/inkExtents.js +1 -2
- package/dist/core/geometry/pathPoseDescriptor.js +1 -2
- package/dist/core/geometry/poseDescriptor.js +1 -2
- package/dist/core/geometry/regionHit.js +36 -18
- package/dist/core/geometry/regionHit.js.map +1 -1
- package/dist/core/geometry/targetFrame.js +1 -2
- package/dist/core/geometry/unionBounds.js +1 -2
- package/dist/core/layers/backgroundFill.js +1 -2
- package/dist/core/layers/children.js +1 -2
- package/dist/core/layers/gateLayer.js +1 -2
- package/dist/core/layers/layerGroup.js +1 -2
- package/dist/core/layers/redrawSource.js +1 -2
- package/dist/core/layers/render.js +1 -2
- package/dist/core/layers/retain.js +1 -2
- package/dist/core/ops/arrange.js +1 -2
- package/dist/core/ops/create.js +2 -3
- package/dist/core/ops/createHistory.js +2 -3
- package/dist/core/ops/delete.js +2 -3
- package/dist/core/ops/nodeFlags.js +1 -2
- package/dist/core/ops/registry.js +1 -2
- package/dist/core/ops/reorder/algorithms.js +1 -2
- package/dist/core/ops/reorder/index.js +1 -2
- package/dist/core/ops/reorder/setChildOrder.js +1 -2
- package/dist/core/ops/reparent.js +1 -2
- package/dist/core/ops/select.js +1 -2
- package/dist/core/ops/setData.js +1 -2
- package/dist/core/ops/setDependsOn.js +1 -2
- package/dist/core/ops/setLayer.js +1 -2
- package/dist/core/ops/setLayout.js +1 -2
- package/dist/core/ops/setPath.js +1 -2
- package/dist/core/ops/setText.js +1 -2
- package/dist/core/ops/slot.js +1 -2
- package/dist/core/ops/transform.js +1 -2
- package/dist/core/ops/writtenBy.js +1 -2
- package/dist/core/pages/fitViewToPage.js +1 -2
- package/dist/core/pages/pageEdits.js +3 -4
- package/dist/core/pages/pages.js +1 -2
- package/dist/core/pages/pages.js.map +1 -1
- package/dist/core/pages/pagesLayer.js +1 -2
- package/dist/core/paint/meshKind.js +1 -2
- package/dist/core/paint/meshKindLazy.js +9 -18
- package/dist/core/paint/meshKindLazy.js.map +1 -1
- package/dist/core/paint/paintKindEntry.js +1 -2
- package/dist/core/paint/paintKinds.js +1 -2
- package/dist/core/paint/registerMesh.js +1 -2
- package/dist/core/scene/NodeProperties.js +1 -2
- package/dist/core/scene/NodeRouting.js +1 -2
- package/dist/core/scene/annotation.js +1 -2
- package/dist/core/scene/appliedLog.js +1 -2
- package/dist/core/scene/arrivalWindow.js +2 -3
- package/dist/core/scene/arrivals.js +1 -2
- package/dist/core/scene/booleanGroup.js +1 -2
- package/dist/core/scene/booleanOfChildren.js +1 -2
- package/dist/core/scene/boundOps.js +1 -2
- package/dist/core/scene/carryDescendants.js +2 -3
- package/dist/core/scene/clipNothing.js +1 -2
- package/dist/core/scene/composeFrame.js +1 -2
- package/dist/core/scene/composePose.js +1 -2
- package/dist/core/scene/declaredFieldSetters.js +1 -2
- package/dist/core/scene/depFrame.js +1 -2
- package/dist/core/scene/depMemo.js +1 -2
- package/dist/core/scene/dependents.js +1 -2
- package/dist/core/scene/derivedParts.js +1 -2
- package/dist/core/scene/derivedPath.js +2 -3
- package/dist/core/scene/docValues.js +1 -2
- package/dist/core/scene/documentOf.js +1 -2
- package/dist/core/scene/editMode.js +5 -3
- package/dist/core/scene/editMode.js.map +1 -1
- package/dist/core/scene/editPass.js +1 -2
- package/dist/core/scene/effectivePose.js +3 -4
- package/dist/core/scene/fieldEdits.js +1 -2
- package/dist/core/scene/fontReads.js +1 -2
- package/dist/core/scene/historyFacade.js +8 -52
- package/dist/core/scene/historyFacade.js.map +1 -1
- package/dist/core/scene/historyForm.js +1 -2
- package/dist/core/scene/inheritedPaint.js +1 -2
- package/dist/core/scene/kitOps.js +16 -15
- package/dist/core/scene/kitOps.js.map +1 -1
- package/dist/core/scene/kitRegistry.js +2 -3
- package/dist/core/scene/layerOps.js +1 -2
- package/dist/core/scene/layerStack.js +1 -2
- package/dist/core/scene/layoutPass.js +4 -5
- package/dist/core/scene/lockGuard.js +1 -2
- package/dist/core/scene/minSize.js +1 -2
- package/dist/core/scene/nestedHit.js +1 -2
- package/dist/core/scene/nodeAsShown.js +1 -2
- package/dist/core/scene/nodeFlags.js +1 -2
- package/dist/core/scene/nodeFnFields.js +1 -2
- package/dist/core/scene/nodeGates.js +3 -4
- package/dist/core/scene/nodeGates.js.map +1 -1
- package/dist/core/scene/nodeMemo.js +1 -2
- package/dist/core/scene/nodeStore.js +2 -3
- package/dist/core/scene/notifier.js +1 -2
- package/dist/core/scene/opTable.js +9 -10
- package/dist/core/scene/opTable.js.map +1 -1
- package/dist/core/scene/outerOps.js +3 -4
- package/dist/core/scene/outerOps.js.map +1 -1
- package/dist/core/scene/pathEffects/blend.js +1 -2
- package/dist/core/scene/pathEffects/derive.js +2 -3
- package/dist/core/scene/pathEffects/effects.js +1 -2
- package/dist/core/scene/pathEffects/foundHidden.js +1 -2
- package/dist/core/scene/pathEffects/textAlong.js +1 -2
- package/dist/core/scene/pathEffects/textAlongBands.js +1 -2
- package/dist/core/scene/plyStacks.js +1 -2
- package/dist/core/scene/poseFeed.js +1 -2
- package/dist/core/scene/poseHold.js +1 -2
- package/dist/core/scene/poseOverrides.js +1 -2
- package/dist/core/scene/posePlies.js +1 -2
- package/dist/core/scene/poseRemovals.js +1 -2
- package/dist/core/scene/poseSnapshot.js +1 -2
- package/dist/core/scene/poseWrites.js +17 -17
- package/dist/core/scene/poseWrites.js.map +1 -1
- package/dist/core/scene/reconcileSpecs.js +26 -3
- package/dist/core/scene/reconcileSpecs.js.map +1 -1
- package/dist/core/scene/recorder.js +1 -2
- package/dist/core/scene/renderOrder.js +1 -2
- package/dist/core/scene/sameValue.js +1 -2
- package/dist/core/scene/scene.js +11 -12
- package/dist/core/scene/scene.js.map +1 -1
- package/dist/core/scene/sceneChanges.js +1 -2
- package/dist/core/scene/sceneEdits.js +1 -2
- package/dist/core/scene/sceneJournals.js +77 -0
- package/dist/core/scene/sceneJournals.js.map +1 -0
- package/dist/core/scene/sceneMutators.js +2 -3
- package/dist/core/scene/scenePoseAdapter.js +1 -2
- package/dist/core/scene/sceneRecording.js +4 -4
- package/dist/core/scene/sceneRecording.js.map +1 -1
- package/dist/core/scene/sceneSelection.js +8 -5
- package/dist/core/scene/sceneSelection.js.map +1 -1
- package/dist/core/scene/sceneState.js +3 -4
- package/dist/core/scene/scrollOffsets.js +1 -2
- package/dist/core/scene/serialization.js +2 -3
- package/dist/core/scene/staleReplay.js +1 -2
- package/dist/core/scene/statedFields.js +1 -2
- package/dist/core/scene/strategyView.js +1 -2
- package/dist/core/scene/treeEdits.js +2 -3
- package/dist/core/scene/treeOrder.js +1 -2
- package/dist/core/scene/treeReads.js +1 -2
- package/dist/core/scene/treeShape.js +1 -2
- package/dist/core/scene/types.js +1 -2
- package/dist/core/scene/types.js.map +1 -1
- package/dist/core/scene/unionOfChildren.js +1 -2
- package/dist/core/scene/unitScopes.js +20 -4
- package/dist/core/scene/unitScopes.js.map +1 -1
- package/dist/core/scene/useScene.js +2 -3
- package/dist/core/scene/worldSave.js +2 -3
- package/dist/core/selection/chromeState.js +1 -2
- package/dist/core/selection/outermostSelection.js +56 -0
- package/dist/core/selection/outermostSelection.js.map +1 -0
- package/dist/core/selection/readOnlySelection.js +1 -2
- package/dist/core/selection/selectionTarget.js +1 -2
- package/dist/core/selection/usePublishSceneSelection.js +1 -2
- package/dist/core/selection/useSelection.js +1 -2
- package/dist/core/shapeKinds.js +1 -2
- package/dist/core/stableStringify.js +1 -2
- package/dist/core/stylus/stylus.js +1 -2
- package/dist/core/stylus/usePointerStylus.js +1 -2
- package/dist/core/usePaintKinds.js +1 -2
- package/dist/core/viewport/clampView.js +1 -2
- package/dist/core/viewport/clientToWorld.js +1 -2
- package/dist/core/viewport/createVelocityTracker.js +1 -2
- package/dist/core/viewport/fitToBounds.js +1 -2
- package/dist/core/viewport/fitViewToBounds.js +1 -2
- package/dist/core/viewport/interpolateView.js +1 -2
- package/dist/core/viewport/parallax.js +1 -2
- package/dist/core/viewport/sceneNodeClientRect.js +1 -2
- package/dist/core/viewport/screenSlop.js +1 -2
- package/dist/core/viewport/useAutoCenter.js +1 -2
- package/dist/core/viewport/useCanvasSize.js +48 -28
- package/dist/core/viewport/useCanvasSize.js.map +1 -1
- package/dist/core/viewport/useDecayLoop.js +1 -2
- package/dist/core/viewport/useNodeOverlayFrame.js +1 -2
- package/dist/core/viewport/useVelocityTracker.js +1 -2
- package/dist/core/viewport/useViewAnimation.js +3 -4
- package/dist/core/viewport/view.js +1 -2
- package/dist/core/viewport/viewTransform.js +1 -2
- package/dist/core/viewport/viewportWorldRect.js +1 -2
- package/dist/core/viewport/wheelHandler.js +1 -2
- package/dist/core/viewport/zoomAt.js +2 -3
- package/dist/core/viewport/zoomBounds.js +1 -2
- package/dist/debug/createDebugOverlayLayer.js +1 -2
- package/dist/debug/createDebugSink.js +1 -2
- package/dist/debug/defaultTheme.js +1 -2
- package/dist/debug/features.js +1 -2
- package/dist/debug/frameStats.js +1 -2
- package/dist/debug/overlayPanels.js +1 -2
- package/dist/debug/parseDebugFlags.js +1 -2
- package/dist/debug/useDebugSink.js +2 -3
- package/dist/{depSchema-DD9H89gX.d.ts → depSchema-C7a_OMt-.d.ts} +101 -65
- package/dist/devtools/handlers.js +1 -2
- package/dist/devtools/history.js +1 -2
- package/dist/devtools/hook.js +1 -2
- package/dist/devtools/label.js +1 -2
- package/dist/devtools/notices.js +1 -2
- package/dist/devtools/protocol.js +1 -2
- package/dist/devtools/registry.js +1 -2
- package/dist/devtools/root.js +1 -2
- package/dist/devtools/serialize.js +1 -2
- package/dist/devtools/session.js +2 -3
- package/dist/devtools/transport.js +1 -2
- package/dist/devtools/useDevtoolsRoot.js +1 -2
- package/dist/devtools-protocol.d.ts +1 -1
- package/dist/devtools-protocol.js +2 -2
- package/dist/devtools.d.ts +1 -1
- package/dist/devtools.js +1 -2
- package/dist/domains/chrome-caps/buildChromeCtx.js +1 -2
- package/dist/domains/chrome-caps/conditions.js +1 -2
- package/dist/domains/chrome-caps/defaults.js +1 -2
- package/dist/domains/chrome-caps/resolve.js +3 -3
- package/dist/domains/chrome-caps/resolve.js.map +1 -1
- package/dist/domains/chrome-caps/useChromeCaps.js +5 -4
- package/dist/domains/chrome-caps/useChromeCaps.js.map +1 -1
- package/dist/domains/chrome-caps/useHoverTracking.js +1 -2
- package/dist/domains/ingestion/contentHandlers.js +1 -2
- package/dist/domains/ingestion/ghost.js +2 -3
- package/dist/domains/ingestion/imageHandler.js +1 -2
- package/dist/domains/ingestion/kitHandlers.js +2 -3
- package/dist/domains/ingestion/openFilePicker.js +1 -2
- package/dist/domains/ingestion/placement.js +1 -2
- package/dist/domains/ingestion/svgHandler.js +1 -2
- package/dist/domains/ingestion/textHandler.js +1 -2
- package/dist/domains/ingestion/useCanvasIngestion.js +1 -2
- package/dist/domains/ingestion/weaselJsonHandler.js +2 -3
- package/dist/domains/longPress/longPressFeedback.js +1 -2
- package/dist/domains/measure/actionIds.js +1 -2
- package/dist/domains/measure/measureCommands.js +6 -7
- package/dist/domains/measure/measureContribution.js +3 -4
- package/dist/domains/measure/measureEdits.js +3 -4
- package/dist/domains/measure/measureGestures.js +2 -3
- package/dist/domains/measure/measureHit.js +3 -4
- package/dist/domains/measure/measureLayer.js +3 -4
- package/dist/domains/measure/measurement.js +1 -2
- package/dist/domains/measure/measurements.js +1 -2
- package/dist/domains/modes/modeLayers.js +1 -2
- package/dist/domains/modes/modeTriggers.js +1 -2
- package/dist/domains/pathEffects/effectSources.js +2 -3
- package/dist/domains/pathEffects/index.js +1 -2
- package/dist/domains/pathEffects/readSource.js +3 -4
- package/dist/domains/pathEffects/textItems.js +1 -2
- package/dist/domains/pathEffects/useEffectSourcesLayer.js +3 -4
- package/dist/domains/paths/anchorData.js +1 -2
- package/dist/domains/paths/anchorMarkers.js +1 -2
- package/dist/domains/paths/editablePath.js +3 -4
- package/dist/domains/paths/originProjection.js +1 -2
- package/dist/domains/paths/pathEditExtension.js +1 -2
- package/dist/domains/paths/pathEditState.js +1 -26
- package/dist/domains/paths/pathEditState.js.map +1 -1
- package/dist/domains/paths/pathEditingOverlayLayer.js +2 -3
- package/dist/domains/paths/pathLayer.js +1 -2
- package/dist/domains/paths/pathRepresentation.js +1 -2
- package/dist/domains/paths/pathSnap/glyphs.js +1 -2
- package/dist/domains/paths/pathSnap/pathSnapSource.js +1 -2
- package/dist/domains/paths/pathSnap/sceneIndex.js +1 -2
- package/dist/domains/paths/pathSnap/snapGeometry.js +2 -3
- package/dist/domains/paths/penPreviewLayer.js +1 -2
- package/dist/domains/paths/shapeGenerator.js +1 -2
- package/dist/domains/paths/strokeOutline.js +2 -3
- package/dist/domains/paths/useAnchorFields.js +1 -2
- package/dist/domains/paths/usePathEdit.js +2 -3
- package/dist/domains/poseRun/usePoseRun.js +1 -2
- package/dist/domains/selection/enteredGroupFrame.js +1 -2
- package/dist/domains/selection/enteredGroupScope.js +1 -2
- package/dist/domains/selection/enteredOperands.js +1 -2
- package/dist/domains/selection/handleCommands.js +2 -3
- package/dist/domains/selection/overlay.js +6 -7
- package/dist/domains/selection/selectionPose.js +2 -3
- package/dist/domains/snap/angle2d.js +1 -2
- package/dist/domains/snap/debugCandidates.js +1 -2
- package/dist/domains/snap/gather.js +1 -2
- package/dist/domains/snap/inputSubspace.js +2 -3
- package/dist/domains/snap/lazySession.js +1 -2
- package/dist/domains/snap/marks.js +1 -2
- package/dist/domains/snap/outcomeStore.js +1 -2
- package/dist/domains/snap/pointSnap.js +1 -2
- package/dist/domains/snap/probes2d.js +6 -2
- package/dist/domains/snap/probes2d.js.map +1 -1
- package/dist/domains/snap/readoutDraw.js +1 -2
- package/dist/domains/snap/readoutLayer.js +1 -2
- package/dist/domains/snap/registry.js +1 -2
- package/dist/domains/snap/resizeBox.js +1 -2
- package/dist/domains/snap/roles.js +1 -2
- package/dist/domains/snap/rotationSource.js +1 -2
- package/dist/domains/snap/sceneReads.js +13 -4
- package/dist/domains/snap/sceneReads.js.map +1 -1
- package/dist/domains/snap/sceneSession2d.js +6 -5
- package/dist/domains/snap/sceneSession2d.js.map +1 -1
- package/dist/domains/snap/screen.js +2 -3
- package/dist/domains/snap/session2d.js +4 -5
- package/dist/domains/snap/spanSnap.js +1 -2
- package/dist/domains/snap/stepAngles.js +1 -2
- package/dist/domains/text/editingDrawOne.js +1 -2
- package/dist/domains/text/hostTextEditors.js +1 -2
- package/dist/domains/text/index.js +2 -2
- package/dist/domains/text/sceneTextDrafts.js +1 -2
- package/dist/domains/text/textHitAt.js +4 -5
- package/dist/domains/text/textLayer.js +12 -2
- package/dist/domains/text/textLayer.js.map +1 -1
- package/dist/domains/text/useSceneTextEdit.js +4 -5
- package/dist/domains/viewports/aim.js +3 -4
- package/dist/domains/viewports/viewMarker.js +1 -2
- package/dist/domains/viewports/viewMarkerDrag.js +1 -2
- package/dist/domains/viewports/viewResolver.js +1 -2
- package/dist/domains/viewports/viewportLayer.js +1 -2
- package/dist/iconRegistry/IconRegistryProvider.js +1 -2
- package/dist/iconRegistry/useIconGlyph.js +1 -2
- package/dist/iconRegistry/useIconVariant.js +1 -2
- package/dist/icons.table.js +2 -3
- package/dist/icons.table.js.map +1 -1
- package/dist/icons.table.json +5 -0
- package/dist/icons2.table.js +1 -2
- package/dist/index.d.ts +160 -64
- package/dist/index.js +14 -9
- package/dist/input/keyState.js +1 -2
- package/dist/input/useKeyModifiers.js +1 -2
- package/dist/input/useKeyState.js +1 -2
- package/dist/interactions/actions/admitsChild.js +1 -2
- package/dist/interactions/actions/align/action.js +6 -7
- package/dist/interactions/actions/align/align.js +6 -7
- package/dist/interactions/actions/booleans/action.js +5 -4
- package/dist/interactions/actions/booleans/action.js.map +1 -1
- package/dist/interactions/actions/booleans/booleanGroupAction.js +2 -3
- package/dist/interactions/actions/booleans/booleans.js +1 -2
- package/dist/interactions/actions/booleans/commit.js +4 -5
- package/dist/interactions/actions/booleans/custom.js +2 -3
- package/dist/interactions/actions/booleans/keymap.js +1 -2
- package/dist/interactions/actions/booleans/operands.js +1 -2
- package/dist/interactions/actions/booleans/pieces.js +1 -2
- package/dist/interactions/actions/booleans/placement.js +1 -2
- package/dist/interactions/actions/booleans/useBooleans.js +1 -2
- package/dist/interactions/actions/booleans/useBooleansAdapter.js +1 -2
- package/dist/interactions/actions/clipboard/action.js +2 -3
- package/dist/interactions/actions/clipboard/clipboardOps.js +2 -3
- package/dist/interactions/actions/clipboard/materializePaste.js +1 -2
- package/dist/interactions/actions/clipboard/wireFormat.js +1 -2
- package/dist/interactions/actions/clone/action.js +7 -8
- package/dist/interactions/actions/clone/behaviors.js +4 -5
- package/dist/interactions/actions/defaultCommitAdapter.js +2 -3
- package/dist/interactions/actions/defaults/anchorEditing.js +6 -10
- package/dist/interactions/actions/defaults/anchorEditing.js.map +1 -1
- package/dist/interactions/actions/defaults/anchorFields.js +1 -2
- package/dist/interactions/actions/defaults/anchorHandles.js +2 -3
- package/dist/interactions/actions/defaults/anchorJoin.js +2 -3
- package/dist/interactions/actions/defaults/areaSelect.js +6 -6
- package/dist/interactions/actions/defaults/areaSelect.js.map +1 -1
- package/dist/interactions/actions/defaults/bendSegment.js +4 -6
- package/dist/interactions/actions/defaults/bendSegment.js.map +1 -1
- package/dist/interactions/actions/defaults/cancelGesture.js +1 -2
- package/dist/interactions/actions/defaults/clearSelection.js +1 -2
- package/dist/interactions/actions/defaults/containerScroll.js +4 -5
- package/dist/interactions/actions/defaults/contextMenu.js +6 -7
- package/dist/interactions/actions/defaults/copySubtree.js +2 -3
- package/dist/interactions/actions/defaults/createPaintAction.js +3 -4
- package/dist/interactions/actions/defaults/delete.js +2 -3
- package/dist/interactions/actions/defaults/duplicate.js +5 -6
- package/dist/interactions/actions/defaults/enterGroup.js +2 -3
- package/dist/interactions/actions/defaults/enterPathEdit.js +1 -2
- package/dist/interactions/actions/defaults/enterTextEdit.js +1 -2
- package/dist/interactions/actions/defaults/escape.js +1 -2
- package/dist/interactions/actions/defaults/exitPathEdit.js +18 -3
- package/dist/interactions/actions/defaults/exitPathEdit.js.map +1 -1
- package/dist/interactions/actions/defaults/group.js +6 -7
- package/dist/interactions/actions/defaults/ingest.js +3 -4
- package/dist/interactions/actions/defaults/insertPathAnchor.js +2 -3
- package/dist/interactions/actions/defaults/nudge.js +3 -4
- package/dist/interactions/actions/defaults/nudgeSteps.js +2 -3
- package/dist/interactions/actions/defaults/nudgeSteps.js.map +1 -1
- package/dist/interactions/actions/defaults/pathEditMarks.js +1 -2
- package/dist/interactions/actions/defaults/pinchZoom.js +3 -4
- package/dist/interactions/actions/defaults/reorder.js +2 -3
- package/dist/interactions/actions/defaults/requiresSelection.js +1 -2
- package/dist/interactions/actions/defaults/segmentUnder.js +1 -2
- package/dist/interactions/actions/defaults/selectAll.js +1 -2
- package/dist/interactions/actions/defaults/selectDeep.js +1 -2
- package/dist/interactions/actions/defaults/setFill.js +1 -2
- package/dist/interactions/actions/defaults/setFillOpacity.js +1 -2
- package/dist/interactions/actions/defaults/setStroke.js +1 -2
- package/dist/interactions/actions/defaults/setStrokeOpacity.js +1 -2
- package/dist/interactions/actions/defaults/slice.js +1 -2
- package/dist/interactions/actions/defaults/sliceOps.js +1 -2
- package/dist/interactions/actions/defaults/toolActivate.js +1 -2
- package/dist/interactions/actions/defaults/toolResetToDefault.js +1 -2
- package/dist/interactions/actions/defaults/undoRedo.js +1 -2
- package/dist/interactions/actions/defaults/viewportDragPan.js +1 -2
- package/dist/interactions/actions/defaults/viewportWheelPan.js +1 -2
- package/dist/interactions/actions/defaults/viewportZoom.js +3 -4
- package/dist/interactions/actions/distribute/action.js +4 -5
- package/dist/interactions/actions/distribute/distribute.js +5 -6
- package/dist/interactions/actions/distribute/plan.js +1 -2
- package/dist/interactions/actions/drawnBoxes.js +4 -5
- package/dist/interactions/actions/dropVerdict.js +1 -2
- package/dist/interactions/actions/edit-anchors/action.js +7 -9
- package/dist/interactions/actions/edit-anchors/action.js.map +1 -1
- package/dist/interactions/actions/edit-anchors/extensionDrags.js +1 -2
- package/dist/interactions/actions/edit-anchors/geometry.js +1 -2
- package/dist/interactions/actions/edit-anchors/handleDrag.js +1 -2
- package/dist/interactions/actions/edit-anchors/handles.js +1 -2
- package/dist/interactions/actions/edit-anchors/params.js +1 -2
- package/dist/interactions/actions/edit-anchors/preview.js +1 -2
- package/dist/interactions/actions/edit-anchors/symmetry.js +1 -2
- package/dist/interactions/actions/flip/action.js +8 -9
- package/dist/interactions/actions/flip/helpers.js +1 -2
- package/dist/interactions/actions/geometryProjection.js +1 -2
- package/dist/interactions/actions/gestureFrames.js +3 -4
- package/dist/interactions/actions/gestureLifecycle.js +1 -2
- package/dist/interactions/actions/hitSelection.js +7 -3
- package/dist/interactions/actions/hitSelection.js.map +1 -1
- package/dist/interactions/actions/insert/action.js +27 -9
- package/dist/interactions/actions/insert/action.js.map +1 -1
- package/dist/interactions/actions/insert/commit.js +2 -3
- package/dist/interactions/actions/insert/extras.js +1 -2
- package/dist/interactions/actions/insert/frame.js +1 -2
- package/dist/interactions/actions/insert/geometry.js +1 -2
- package/dist/interactions/actions/insert/params.js +42 -0
- package/dist/interactions/actions/insert/params.js.map +1 -0
- package/dist/interactions/actions/insert/parent.js +1 -2
- package/dist/interactions/actions/insert/placeAction.js +5 -6
- package/dist/interactions/actions/insert/repositionAction.js +1 -2
- package/dist/interactions/actions/insert/rotateAction.js +1 -2
- package/dist/interactions/actions/insert/session.js +5 -6
- package/dist/interactions/actions/insert/shape.js +2 -3
- package/dist/interactions/actions/lasso-select/action.js +9 -9
- package/dist/interactions/actions/lasso-select/action.js.map +1 -1
- package/dist/interactions/actions/lasso-select/behaviors/selectFromLasso.js +2 -3
- package/dist/interactions/actions/magnification.js +37 -0
- package/dist/interactions/actions/magnification.js.map +1 -0
- package/dist/interactions/actions/move/action.js +2 -3
- package/dist/interactions/actions/move/behaviors/layoutDrop.js +2 -3
- package/dist/interactions/actions/move/behaviors/reparentOnDrop.js +2 -3
- package/dist/interactions/actions/move/behaviors/snapBackOrDelete.js +1 -2
- package/dist/interactions/actions/move/behaviors/snapToContainer.js +2 -3
- package/dist/interactions/actions/move/capture.js +6 -7
- package/dist/interactions/actions/move/commit/index.js +2 -3
- package/dist/interactions/actions/move/commit/layoutDrop.js +4 -5
- package/dist/interactions/actions/move/commit/layoutRelease.js +7 -8
- package/dist/interactions/actions/move/commit/rebase.js +2 -3
- package/dist/interactions/actions/move/commit/reparent.js +5 -6
- package/dist/interactions/actions/move/delta.js +2 -3
- package/dist/interactions/actions/move/frame.js +2 -3
- package/dist/interactions/actions/move/gestureAdapter.js +1 -2
- package/dist/interactions/actions/move/landedDescendants.js +2 -3
- package/dist/interactions/actions/move/layout/container.js +3 -4
- package/dist/interactions/actions/move/layout/dragged.js +2 -3
- package/dist/interactions/actions/move/layout/dropPass.js +5 -6
- package/dist/interactions/actions/move/layout/exits.js +2 -3
- package/dist/interactions/actions/move/layout/glide.js +2 -3
- package/dist/interactions/actions/move/layout/view.js +1 -2
- package/dist/interactions/actions/move/refusal.js +2 -3
- package/dist/interactions/actions/move/session.js +4 -5
- package/dist/interactions/actions/move/translate.js +2 -3
- package/dist/interactions/actions/moveNodes.js +5 -6
- package/dist/interactions/actions/notices.js +16 -0
- package/dist/interactions/actions/notices.js.map +1 -0
- package/dist/interactions/actions/outlines/createOutlines.js +9 -8
- package/dist/interactions/actions/outlines/createOutlines.js.map +1 -1
- package/dist/interactions/actions/outlines/createOutlinesAction.js +14 -10
- package/dist/interactions/actions/outlines/createOutlinesAction.js.map +1 -1
- package/dist/interactions/actions/outlines/outlineStroke.js +2 -3
- package/dist/interactions/actions/outlines/outlineStrokeAction.js +5 -5
- package/dist/interactions/actions/outlines/outlineStrokeAction.js.map +1 -1
- package/dist/interactions/actions/outlines/replaceWithPaths.js +5 -6
- package/dist/interactions/actions/outlines/strokeRegion.js +1 -2
- package/dist/interactions/actions/outlines/useCreateOutlinesAdapter.js +1 -2
- package/dist/interactions/actions/pathCommands/cutJoin.js +3 -4
- package/dist/interactions/actions/pathCommands/livePathEdit.js +3 -4
- package/dist/interactions/actions/pathCommands/pathNodes.js +2 -3
- package/dist/interactions/actions/pathCommands/simplifyOffset.js +2 -3
- package/dist/interactions/actions/pathGestureTags.js +1 -2
- package/dist/interactions/actions/planeInput.js +2 -3
- package/dist/interactions/actions/pointerState.js +1 -2
- package/dist/interactions/actions/poseDescriptorDep.js +1 -2
- package/dist/interactions/actions/poseFrame.js +3 -4
- package/dist/interactions/actions/resize/action.js +3 -4
- package/dist/interactions/actions/resize/aspect.js +1 -2
- package/dist/interactions/actions/resize/behaviors/clampMinSize.js +1 -2
- package/dist/interactions/actions/resize/boxFrame.js +1 -2
- package/dist/interactions/actions/resize/capture.js +7 -8
- package/dist/interactions/actions/resize/commit.js +3 -4
- package/dist/interactions/actions/resize/cornerHandles.js +1 -2
- package/dist/interactions/actions/resize/frame.js +7 -8
- package/dist/interactions/actions/resize/held.js +2 -3
- package/dist/interactions/actions/resize/minimum.js +1 -2
- package/dist/interactions/actions/resize/replay.js +1 -2
- package/dist/interactions/actions/resize/ruleBounds.js +1 -2
- package/dist/interactions/actions/resize/session.js +9 -10
- package/dist/interactions/actions/resolveOverlays.js +1 -2
- package/dist/interactions/actions/resolvePreviews.js +3 -4
- package/dist/interactions/actions/rotate/action.js +5 -6
- package/dist/interactions/actions/rotate/commit.js +2 -3
- package/dist/interactions/actions/rotate/frame.js +3 -4
- package/dist/interactions/actions/rotate/geometry.js +1 -2
- package/dist/interactions/actions/rotate/handle.js +2 -3
- package/dist/interactions/actions/rotate/replay.js +2 -3
- package/dist/interactions/actions/rotate/session.js +10 -11
- package/dist/interactions/actions/selectionSubtree.js +7 -22
- package/dist/interactions/actions/selectionSubtree.js.map +1 -1
- package/dist/interactions/actions/spatialReference.js +1 -2
- package/dist/interactions/actions/testUtils.js +1 -9
- package/dist/interactions/actions/testUtils.js.map +1 -1
- package/dist/interactions/actions/transform-again/action.js +5 -6
- package/dist/interactions/actions/transform-again/memory.js +1 -2
- package/dist/interactions/actions/transformFinish.js +1 -2
- package/dist/interactions/actions/useActionSet.js +1 -2
- package/dist/interactions/actions/useNotices.js +12 -0
- package/dist/interactions/actions/useNotices.js.map +1 -0
- package/dist/interactions/actions/useStandardActions.js +1 -2
- package/dist/interactions/gestures/dragGesture/dragGesture.js +1 -2
- package/dist/interactions/gestures/dragGesture/dragPointOf.js +1 -2
- package/dist/interactions/gestures/dragRadial/dragRadial.js +2 -3
- package/dist/interactions/gestures/dragRect/dragRect.js +2 -3
- package/dist/interactions/gestures/handleDrag/handleDrag.js +1 -2
- package/dist/interactions/gestures/pointerDrag/pointerDrag.js +1 -2
- package/dist/interactions/gestures/shared/originProjection.js +1 -2
- package/dist/interactions/gestures/shared/screenTolerance.js +1 -2
- package/dist/interactions/gestures/thresholdDrag/thresholdDrag.js +1 -2
- package/dist/kitSettingsSchema.js +4 -5
- package/dist/test-hook/createTestHook.js +1 -2
- package/dist/test-hook/install.js +1 -2
- package/dist/test-hook/useTestHook.js +1 -2
- package/dist/test-seams.d.ts +7 -14
- package/dist/test-seams.js +2 -2
- package/dist/tools/builtin/anchors/anchorsTool.js +30 -0
- package/dist/tools/builtin/anchors/anchorsTool.js.map +1 -0
- package/dist/tools/builtin/ellipse/useEllipseTool.js +2 -3
- package/dist/tools/builtin/eyedropper/useEyedropperTool.js +1 -2
- package/dist/tools/builtin/hand/dragPanContribution.js +1 -2
- package/dist/tools/builtin/hand/useHandTool.js +1 -2
- package/dist/tools/builtin/image/useImageTool.js +1 -2
- package/dist/tools/builtin/lasso/useLassoTool.js +1 -2
- package/dist/tools/builtin/line/useLineTool.js +2 -3
- package/dist/tools/builtin/measure/useMeasureTool.js +2 -3
- package/dist/tools/builtin/pen/penHandle.js +1 -2
- package/dist/tools/builtin/pen/usePenTool.js +6 -7
- package/dist/tools/builtin/pencil/usePencilTool.js +1 -2
- package/dist/tools/builtin/pickTopMostHit.js +1 -2
- package/dist/tools/builtin/polygon/usePolygonTool.js +2 -3
- package/dist/tools/builtin/pressTarget.js +1 -2
- package/dist/tools/builtin/rect/useRectTool.js +2 -3
- package/dist/tools/builtin/select/adapterPointQuery.js +3 -4
- package/dist/tools/builtin/select/collapseDeferred.js +1 -2
- package/dist/tools/builtin/select/groupEntry.js +2 -3
- package/dist/tools/builtin/select/pressDecision.js +3 -4
- package/dist/tools/builtin/select/pressDecision.js.map +1 -1
- package/dist/tools/builtin/select/selectionContributions.js +1 -2
- package/dist/tools/builtin/select/useSelectTool.js +5 -6
- package/dist/tools/builtin/shared/insertToolOptions.js +1 -2
- package/dist/tools/builtin/shared/pointerFollower.js +1 -2
- package/dist/tools/builtin/slice/useSliceTool.js +5 -6
- package/dist/tools/builtin/star/useStarTool.js +2 -3
- package/dist/tools/builtin/sticky/stickyNode.js +1 -2
- package/dist/tools/builtin/sticky/useStickyTool.js +2 -3
- package/dist/tools/builtin/text/useTextTool.js +1 -2
- package/dist/tools/index.js +4 -2
- package/dist/tools/overlayBinding.js +1 -2
- package/dist/tools/toolOptions.js +60 -0
- package/dist/tools/toolOptions.js.map +1 -0
- package/dist/tools/useKeybindings.js +1 -2
- package/dist/{types-DW14eu9B.d.ts → types-BUvUXZe5.d.ts} +3 -3
- package/dist/util/color.js +1 -2
- package/dist/util/paint.js +1 -2
- package/dist/version.js +2 -3
- package/package.json +27 -27
- package/dist/interactions/actions/defaults/pathEditTools.js +0 -60
- package/dist/interactions/actions/defaults/pathEditTools.js.map +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// src/canvas/GestureReason.module.css
|
|
2
2
|
var reason = "_reason_0cabc7";
|
|
3
3
|
var GestureReason_module_default = { reason };
|
|
4
4
|
|
|
5
|
-
//#endregion
|
|
6
5
|
export { GestureReason_module_default as default, reason };
|
|
7
6
|
//# sourceMappingURL=GestureReason.module.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { renderSceneCanvas } from "./SceneCanvas.js";
|
|
1
2
|
import { toolDrivenActions } from "./SceneCanvas/presets/toolDriven.js";
|
|
2
3
|
import { BASELINE_ACTIONS } from "./SceneCanvas/presets/baseline.js";
|
|
3
|
-
import { renderSceneCanvas } from "./SceneCanvas.js";
|
|
4
4
|
import { forwardRef } from "react";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/canvas/LeanSceneCanvas.tsx
|
|
7
7
|
var LEAN_SOURCE = {
|
|
8
8
|
named: null,
|
|
9
9
|
pool: toolDrivenActions,
|
|
@@ -20,6 +20,5 @@ function LeanSceneCanvasWrapper(props, ref) {
|
|
|
20
20
|
*/
|
|
21
21
|
var LeanSceneCanvas = forwardRef(LeanSceneCanvasWrapper);
|
|
22
22
|
|
|
23
|
-
//#endregion
|
|
24
23
|
export { LeanSceneCanvas };
|
|
25
24
|
//# sourceMappingURL=LeanSceneCanvas.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import hud_module_default from "./hud.module.js";
|
|
2
1
|
import { useHostAnchor } from "./useHostAnchor.js";
|
|
2
|
+
import hud_module_default from "./hud.module.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { useOptionalActiveToolContext } from "@weasel-js/routing/react";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/canvas/ModalityHud.tsx
|
|
7
7
|
/**
|
|
8
8
|
* Dev HUD reporting the modality state: active mode, active-slot tool, and
|
|
9
9
|
* the hotkey-engaged tool stack. Anchors below `PickHud` in the canvas's
|
|
@@ -76,6 +76,5 @@ function ModalityHud({ canvasRef, anchorRef, modeId, offset }) {
|
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
//#endregion
|
|
80
79
|
export { ModalityHud };
|
|
81
80
|
//# sourceMappingURL=ModalityHud.js.map
|
package/dist/canvas/NodeShape.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { bumpNodeMemoGeneration, nodeMemo } from "../core/scene/nodeMemo.js";
|
|
2
2
|
import { setDepOutlineReader } from "../core/scene/booleanOfChildren.js";
|
|
3
3
|
import { hasSlop, slopForStrokeHit, widenSlop } from "../core/viewport/screenSlop.js";
|
|
4
|
-
import { derivesPath } from "./nodeShapes/memo.js";
|
|
5
4
|
import { DERIVED_PAINTER } from "./nodeShapes/derivedPainter.js";
|
|
6
|
-
import { paintsPose } from "./nodeShapes/poseBox.js";
|
|
7
5
|
import { IMAGE_PAINTER } from "./nodeShapes/imagePainter.js";
|
|
8
6
|
import { MEASURE_PAINTER } from "./nodeShapes/measurePainter.js";
|
|
7
|
+
import { derivesPath } from "./nodeShapes/memo.js";
|
|
9
8
|
import { PATH_PAINTER } from "./nodeShapes/pathPainter.js";
|
|
9
|
+
import { paintsPose } from "./nodeShapes/poseBox.js";
|
|
10
10
|
import { RECT_FALLBACK_PAINTER } from "./nodeShapes/rectFallbackPainter.js";
|
|
11
11
|
import { SHAPE_PAINTER } from "./nodeShapes/shapePainter.js";
|
|
12
12
|
import { TEXT_PAINTER } from "./nodeShapes/textPainter.js";
|
|
13
13
|
import { pathContainsPoint, pathThroughPoseFrame, strokeHitTest } from "@weasel-js/geom";
|
|
14
14
|
import { glyphGeneration } from "@weasel-js/font";
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
// src/canvas/NodeShape.ts
|
|
17
17
|
/**
|
|
18
18
|
* NodeShape — the **shape trait's** registry: the per-kind `paint` + `silhouette` used by
|
|
19
19
|
* `defaultDrawOne`, clipping, non-rect hit-testing, and lasso/area-select. Teaching the kit
|
|
@@ -159,6 +159,5 @@ function registerBuiltInShapePainters() {
|
|
|
159
159
|
registerNodeShape(RECT_FALLBACK_PAINTER);
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
//#endregion
|
|
163
162
|
export { DEFAULT_INK, findNodeShape, findShapeBounds, findShapeInk, findShapeSilhouette, getNodeShapes, registerNodeShape, shapeCoversPoint };
|
|
164
163
|
//# sourceMappingURL=NodeShape.js.map
|
package/dist/canvas/PickHud.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { clientToWorld } from "../core/viewport/clientToWorld.js";
|
|
2
|
-
import hud_module_default from "./hud.module.js";
|
|
3
2
|
import { useHostAnchor } from "./useHostAnchor.js";
|
|
3
|
+
import hud_module_default from "./hud.module.js";
|
|
4
4
|
import { useEffect, useState } from "react";
|
|
5
5
|
import { useLatest } from "@weasel-js/react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/canvas/PickHud.tsx
|
|
9
9
|
/**
|
|
10
10
|
* Dev HUD listing the ids returned by `pickEvery(world)` under the cursor.
|
|
11
11
|
*
|
|
@@ -113,6 +113,5 @@ function PickHud({ canvasRef, anchorRef, viewRef, toWorld, pickEvery, pickBest,
|
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
//#endregion
|
|
117
116
|
export { PickHud };
|
|
118
117
|
//# sourceMappingURL=PickHud.js.map
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ActionsProvider, useActionsRegistry } from "@weasel-js/routing/react";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/canvas/SceneCanvas/ActionsProviderIfRoot.tsx
|
|
5
5
|
/** Mount an `<ActionsProvider>` only when none is already in scope. */
|
|
6
6
|
function ActionsProviderIfRoot({ children }) {
|
|
7
7
|
if (useActionsRegistry()) return /* @__PURE__ */ jsx(Fragment, { children });
|
|
8
8
|
return /* @__PURE__ */ jsx(ActionsProvider, { children });
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
//#endregion
|
|
12
11
|
export { ActionsProviderIfRoot };
|
|
13
12
|
//# sourceMappingURL=ActionsProviderIfRoot.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ViewInputsProvider } from "../viewInputs.js";
|
|
2
|
-
import { PointerProviderIfRoot } from "./PointerProviderIfRoot.js";
|
|
3
1
|
import { SnapSourceRegistryContext, createSnapSourceRegistry } from "../../domains/snap/registry.js";
|
|
4
2
|
import { IconRegistryProviderIfRoot } from "../../iconRegistry/IconRegistryProvider.js";
|
|
3
|
+
import { ViewInputsProvider } from "../viewInputs.js";
|
|
4
|
+
import { PointerProviderIfRoot } from "./PointerProviderIfRoot.js";
|
|
5
5
|
import { useState } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/canvas/SceneCanvas/CanvasKitProviders.tsx
|
|
9
9
|
/** The kit providers a canvas mounts around its surface: view inputs and the
|
|
10
10
|
* snap source registry, then the icon registry and pointer context where none
|
|
11
11
|
* is already in scope. */
|
|
@@ -20,6 +20,5 @@ function CanvasKitProviders({ viewInputs, children }) {
|
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
//#endregion
|
|
24
23
|
export { CanvasKitProviders };
|
|
25
24
|
//# sourceMappingURL=CanvasKitProviders.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { DepRegistryProvider, useOptionalDepRegistry } from "@weasel-js/routing/react";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/canvas/SceneCanvas/DepRegistryProviderIfRoot.tsx
|
|
5
5
|
/** Mount a `<DepRegistryProvider>` only when none is already in scope, so a
|
|
6
6
|
* consumer's dep sources are not shadowed by a nested canvas. */
|
|
7
7
|
function DepRegistryProviderIfRoot({ children }) {
|
|
@@ -9,6 +9,5 @@ function DepRegistryProviderIfRoot({ children }) {
|
|
|
9
9
|
return /* @__PURE__ */ jsx(DepRegistryProvider, { children });
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
//#endregion
|
|
13
12
|
export { DepRegistryProviderIfRoot };
|
|
14
13
|
//# sourceMappingURL=DepRegistryProviderIfRoot.js.map
|
|
@@ -5,7 +5,7 @@ import { useCallback } from "react";
|
|
|
5
5
|
import { useLatest } from "@weasel-js/react";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/canvas/SceneCanvas/DevHuds.tsx
|
|
9
9
|
/**
|
|
10
10
|
* `<SceneCanvas>`'s dev HUDs: the cursor readout, the pick list, and the
|
|
11
11
|
* modality panel, each a fixed-position widget pinned to the canvas.
|
|
@@ -50,6 +50,5 @@ function canvasDebug(debug) {
|
|
|
50
50
|
return rest;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
//#endregion
|
|
54
53
|
export { DevHuds, canvasDebug };
|
|
55
54
|
//# sourceMappingURL=DevHuds.js.map
|
|
@@ -5,7 +5,7 @@ import { heldPointers } from "@weasel-js/gestures";
|
|
|
5
5
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
6
6
|
import { PointerContextProvider, usePointerContext } from "@weasel-js/routing/react";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/canvas/SceneCanvas/PointerProviderIfRoot.tsx
|
|
9
9
|
/**
|
|
10
10
|
* Conditional `<PointerContextProvider>` wrapper. Mounts a provider only
|
|
11
11
|
* when no parent provider is in scope — otherwise renders children unwrapped
|
|
@@ -80,6 +80,5 @@ function usePointerPublisher(canvasRef, canvasApiRef) {
|
|
|
80
80
|
]);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
//#endregion
|
|
84
83
|
export { PointerProviderIfRoot, usePointerPublisher };
|
|
85
84
|
//# sourceMappingURL=PointerProviderIfRoot.js.map
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { useDeviceProfile } from "../../core/device/useDeviceProfile.js";
|
|
2
|
-
import { dlog } from "../../debug/flag.js";
|
|
3
|
-
import { usePointerPublisher } from "./PointerProviderIfRoot.js";
|
|
4
1
|
import { SnapSourceRegistryContext } from "../../domains/snap/registry.js";
|
|
2
|
+
import { dlog } from "../../debug/flag.js";
|
|
3
|
+
import { useDeviceProfile } from "../../core/device/useDeviceProfile.js";
|
|
5
4
|
import { useTestHook } from "../../test-hook/useTestHook.js";
|
|
5
|
+
import { useModeDefaultToolDepSource } from "../deps/modeDefaultTool.js";
|
|
6
6
|
import { useHitObserver } from "../useHitObserver.js";
|
|
7
7
|
import { GeometryProjectionRegistrar, ResizePolicyRegistrar } from "./poseRegistrars.js";
|
|
8
|
+
import { usePointerPublisher } from "./PointerProviderIfRoot.js";
|
|
8
9
|
import { useSceneGestureDispatcher } from "./useSceneGestureDispatcher.js";
|
|
9
10
|
import { useCanvasDevtoolsRoot } from "./useCanvasDevtoolsRoot.js";
|
|
10
11
|
import { useSceneStandardActions } from "./useSceneStandardActions.js";
|
|
@@ -12,8 +13,9 @@ import { useToolKeybindings } from "./useToolKeybindings.js";
|
|
|
12
13
|
import { useContext, useEffect } from "react";
|
|
13
14
|
import { useLatest } from "@weasel-js/react";
|
|
14
15
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
+
import { useDepSource } from "@weasel-js/routing/react";
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
// src/canvas/SceneCanvas/SceneCanvasInput.tsx
|
|
17
19
|
/**
|
|
18
20
|
* The canvas's input wiring: the pointer publisher, the standard actions and their deps, the
|
|
19
21
|
* gesture dispatcher, and the tool keybindings, in that order, then the test hook.
|
|
@@ -32,6 +34,8 @@ function SceneCanvasInput(p) {
|
|
|
32
34
|
return () => dlog("scene-canvas", "unmount");
|
|
33
35
|
}, []);
|
|
34
36
|
usePointerPublisher(canvas.elementRef, canvas.apiRef);
|
|
37
|
+
useDepSource("chromeRules", () => chrome.chromeRules);
|
|
38
|
+
useModeDefaultToolDepSource(props.modes, p.tools.tools);
|
|
35
39
|
useSceneStandardActions({
|
|
36
40
|
props,
|
|
37
41
|
viewOn: p.viewOn,
|
|
@@ -123,6 +127,5 @@ function SceneCanvasInput(p) {
|
|
|
123
127
|
return /* @__PURE__ */ jsxs(Fragment, { children: [selectTool?.resize ? /* @__PURE__ */ jsx(ResizePolicyRegistrar, { options: selectTool.resize }) : null, props.geometryProjection ? /* @__PURE__ */ jsx(GeometryProjectionRegistrar, { projection: props.geometryProjection }) : null] });
|
|
124
128
|
}
|
|
125
129
|
|
|
126
|
-
//#endregion
|
|
127
130
|
export { SceneCanvasInput };
|
|
128
131
|
//# sourceMappingURL=SceneCanvasInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneCanvasInput.js","names":["_Fragment"],"sources":["../../../src/canvas/SceneCanvas/SceneCanvasInput.tsx"],"sourcesContent":["import type { ResizeHandleLayout } from 'interactions/actions/resize/cornerHandles';\nimport { useLatest } from '@weasel-js/react';\nimport type { Dispatcher } from '@weasel-js/routing';\nimport type { Scene } from 'core/scene/types';\nimport type { SelectionApi } from 'core/selection/useSelection';\nimport type { RuleCtx } from 'domains/chrome-caps';\nimport type { Affordance } from 'affordances/types';\nimport type { PoseDescriptor } from 'interactions/actions/resize/geometry';\nimport type { UseResizeOptions } from 'interactions/actions/resize/options';\nimport { useContext, useEffect, type MutableRefObject, type RefObject } from 'react';\nimport { SnapSourceRegistryContext } from 'domains/snap/registry';\nimport type { SnapOutcomeStore } from 'domains/snap/outcomeStore';\nimport type { SnapSource } from 'domains/snap/types';\nimport { dlog } from '../../debug/flag';\nimport { useDeviceProfile } from '../../core/device/useDeviceProfile';\nimport { useTestHook } from '../../test-hook/useTestHook';\nimport type { CanvasExtensionApi } from '../canvasExtension';\nimport { useHitObserver } from '../useHitObserver';\nimport type { CanvasViewState } from '../useCanvasView';\nimport { GeometryProjectionRegistrar, ResizePolicyRegistrar } from './poseRegistrars';\nimport { usePointerPublisher } from './PointerProviderIfRoot';\nimport type { BridgeAdapter, SceneCanvasProps } from './props';\nimport type { NodeAtPoint } from './useNodeAtPoint';\nimport type { useSceneCanvasTools } from './useSceneCanvasTools';\nimport { useSceneGestureDispatcher } from './useSceneGestureDispatcher';\nimport { useCanvasDevtoolsRoot, type CanvasDevtools } from './useCanvasDevtoolsRoot';\nimport type { useScenePicking } from './useScenePicking';\nimport {\n useSceneStandardActions, type SceneStandardActionsInputs, type StandardActionsProps,\n} from './useSceneStandardActions';\nimport { useToolKeybindings } from './useToolKeybindings';\n\ntype Props = SceneCanvasProps<unknown, string, unknown>;\ntype Picking = ReturnType<typeof useScenePicking<unknown, string, unknown>>;\n\n/** The `<SceneCanvas>` props its input wiring reads. */\nexport type SceneCanvasInputOptions = StandardActionsProps & Pick<\n Props,\n | 'selectTool' | 'geometryProjection' | 'enableGestureDispatcher' | 'enableKeybindings'\n | 'claimKeys' | 'longPress' | 'modes' | 'versionCheck' | 'onClick' | 'onDoubleClick' | 'routing'\n>;\n\n/** What `<SceneCanvas>` hands {@link SceneCanvasInput}. */\nexport interface SceneCanvasInputProps {\n props: SceneCanvasInputOptions;\n scene: Scene<unknown, string, unknown>;\n selection: SelectionApi;\n descriptor: PoseDescriptor<unknown>;\n picking: Pick<\n Picking, 'pickEvery' | 'pickBest' | 'boundsOf' | 'planeOfNode' | 'kindOfNode' | 'doubleClickNames' | 'viewLayerGate' | 'alphaOf' | 'enteredGroup' | 'reachable'\n > & { adapter: BridgeAdapter };\n /** The node a hit resolves to, for the `onClick` / `onDoubleClick` observers. */\n nodeAtPointRef: MutableRefObject<NodeAtPoint | undefined>;\n tools: ReturnType<typeof useSceneCanvasTools>;\n viewOn: boolean;\n camera: { viewState: CanvasViewState; viewAnimation: SceneStandardActionsInputs['viewAnimation'] };\n dispatcher: Dispatcher;\n pathEdit: {\n state: SceneStandardActionsInputs['editAnchorsExternalState'];\n };\n chrome: { getIsVisible: () => (id: string) => boolean; getRuleCtx: () => RuleCtx | undefined };\n /** The selection overlay's rotate badge, and where the dispatcher reports the affordances\n * it hit-tests, for the slops overlay. */\n overlay: {\n rotationBadge: { distancePx: number; sizePx: number } | null | undefined;\n /** The resize-handle layout the overlay paints, so the hit-test grabs exactly those. */\n resizeHandles: ResizeHandleLayout;\n chromeAffordancesRef: MutableRefObject<readonly Affordance[]>;\n };\n canvas: {\n elementRef: MutableRefObject<HTMLElement | null>;\n apiRef: RefObject<CanvasExtensionApi | null>;\n ready: boolean;\n };\n ingestionClipboard: SceneStandardActionsInputs['ingestionClipboard'];\n ingestionHandlers: SceneStandardActionsInputs['ingestionHandlers'];\n /** The enabled presets' snap sources. */\n snapSources: readonly SnapSource[];\n /** The outcome store the canvas's readout layer draws. */\n snapStore: SnapOutcomeStore;\n devtools: CanvasDevtools;\n}\n\n/**\n * The canvas's input wiring: the pointer publisher, the standard actions and their deps, the\n * gesture dispatcher, and the tool keybindings, in that order, then the test hook.\n *\n * A component of its own, mounted ahead of `<SceneCanvas>`'s children, rather than hooks in the\n * canvas's body: dep sources and actions stack newest-live in effect order, and a parent's\n * effects run after its children's, so a child overriding a kit dep would lose to it.\n */\nexport function SceneCanvasInput(p: SceneCanvasInputProps) {\n const { props, scene, selection, picking, chrome, overlay, canvas } = p;\n const { viewState } = p.camera;\n const { selectTool, enableKeybindings = true } = props;\n const snapRegistry = useContext(SnapSourceRegistryContext);\n useEffect(() => {\n dlog('scene-canvas', 'mount');\n return () => dlog('scene-canvas', 'unmount');\n }, []);\n usePointerPublisher(canvas.elementRef, canvas.apiRef);\n useSceneStandardActions({\n props, viewOn: p.viewOn,\n selection, enteredGroup: picking.enteredGroup, scene, adapter: picking.adapter, standardActions: p.tools.standardActions,\n currentViewRef: viewState.viewRef, onViewChange: viewState.setViewFromInput,\n poseDescriptor: p.descriptor, dispatcher: p.dispatcher,\n pickEvery: picking.pickEvery, layerIsPainted: picking.viewLayerGate, alphaOf: picking.alphaOf, reachable: picking.reachable,\n viewAnimation: p.camera.viewAnimation, editAnchorsExternalState: p.pathEdit.state,\n canvasRef: canvas.elementRef, canvasApiRef: canvas.apiRef, ingestionClipboard: p.ingestionClipboard,\n ingestionHandlers: p.ingestionHandlers,\n snap: { sources: [...(props.snap?.sources ?? []), ...p.snapSources], registry: snapRegistry, store: p.snapStore },\n });\n\n // Rides the gesture dispatcher as an OBSERVER rather than an Action binding because the\n // prop is a notification, not a behavior: as a binding it would lose first-match-wins to\n // `enterPathEdit` on every body hit and silently stop firing.\n const onDoubleClick = useHitObserver(props.onDoubleClick, p.nodeAtPointRef);\n const onClick = useHitObserver(props.onClick, p.nodeAtPointRef);\n const selectionRef = useLatest(selection);\n const { targetScale } = useDeviceProfile();\n const { root, traces } = useCanvasDevtoolsRoot({\n scene, selection, viewState, tools: p.tools.tools, contributions: p.tools.contributions, routing: props.routing,\n element: canvas.elementRef, api: canvas.apiRef, devtools: p.devtools,\n });\n useSceneGestureDispatcher({\n canvasRef: canvas.elementRef, canvasApiRef: canvas.apiRef,\n tools: p.tools.tools, contributions: p.tools.contributions,\n enabled: props.enableGestureDispatcher ?? true, keyboard: enableKeybindings,\n claimKeys: props.claimKeys ?? false,\n selectionRef,\n boundsOf: picking.boundsOf, planeOfNode: picking.planeOfNode,\n pickEvery: picking.pickEvery, pickBest: picking.pickBest, kindOfNode: picking.kindOfNode,\n doubleClickNames: picking.doubleClickNames,\n viewRef: viewState.viewRef, dispatcher: p.dispatcher, traces,\n getIsVisibleForCanvas: chrome.getIsVisible, getRuleCtx: chrome.getRuleCtx,\n targetScale, handleHitRadius: overlay.resizeHandles.hitRadiusPx,\n edgeHandles: overlay.resizeHandles.edges,\n rotationBadge: overlay.rotationBadge, chromeAffordancesRef: overlay.chromeAffordancesRef,\n onDoubleClick, onClick, longPress: props.longPress,\n });\n useToolKeybindings({\n internalTools: p.tools.internal,\n toolsTakeover: p.tools.takeover ?? undefined,\n surface: p.tools.surface,\n enableKeybindings,\n modes: props.modes,\n canvasApi: canvas.ready ? canvas.apiRef.current : null,\n versionCheck: props.versionCheck,\n });\n useTestHook({\n getScene: () => scene as never,\n getSelectionIds: () => (selection.current as readonly string[] | undefined) ?? [],\n getView: () => viewState.viewRef.current,\n getActiveToolId: () => p.tools.tools.active ?? null,\n probes: root.probes,\n });\n\n // Mounted only when passed: an empty default registered with the deps above would land\n // after, and over, a dep one of these registered (child effects run first). Absent\n // `geometryProjection` leaves the dep undefined.\n return (\n <>\n {selectTool?.resize\n ? <ResizePolicyRegistrar options={selectTool.resize as UseResizeOptions<unknown>} />\n : null}\n {props.geometryProjection ? <GeometryProjectionRegistrar projection={props.geometryProjection} /> : null}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA2FA,SAAgB,iBAAiB,GAA0B;CACzD,MAAM,EAAE,OAAO,OAAO,WAAW,SAAS,QAAQ,SAAS,WAAW;CACtE,MAAM,EAAE,cAAc,EAAE;CACxB,MAAM,EAAE,YAAY,oBAAoB,SAAS;CACjD,MAAM,eAAe,WAAW,yBAAyB;CACzD,gBAAgB;EACd,KAAK,gBAAgB,OAAO;EAC5B,aAAa,KAAK,gBAAgB,SAAS;CAC7C,GAAG,CAAC,CAAC;CACL,oBAAoB,OAAO,YAAY,OAAO,MAAM;CACpD,wBAAwB;EACtB;EAAO,QAAQ,EAAE;EACjB;EAAW,cAAc,QAAQ;EAAc;EAAO,SAAS,QAAQ;EAAS,iBAAiB,EAAE,MAAM;EACzG,gBAAgB,UAAU;EAAS,cAAc,UAAU;EAC3D,gBAAgB,EAAE;EAAY,YAAY,EAAE;EAC5C,WAAW,QAAQ;EAAW,gBAAgB,QAAQ;EAAe,SAAS,QAAQ;EAAS,WAAW,QAAQ;EAClH,eAAe,EAAE,OAAO;EAAe,0BAA0B,EAAE,SAAS;EAC5E,WAAW,OAAO;EAAY,cAAc,OAAO;EAAQ,oBAAoB,EAAE;EACjF,mBAAmB,EAAE;EACrB,MAAM;GAAE,SAAS,CAAC,GAAI,MAAM,MAAM,WAAW,CAAC,GAAI,GAAG,EAAE,WAAW;GAAG,UAAU;GAAc,OAAO,EAAE;EAAU;CAClH,CAAC;CAKD,MAAM,gBAAgB,eAAe,MAAM,eAAe,EAAE,cAAc;CAC1E,MAAM,UAAU,eAAe,MAAM,SAAS,EAAE,cAAc;CAC9D,MAAM,eAAe,UAAU,SAAS;CACxC,MAAM,EAAE,gBAAgB,iBAAiB;CACzC,MAAM,EAAE,MAAM,WAAW,sBAAsB;EAC7C;EAAO;EAAW;EAAW,OAAO,EAAE,MAAM;EAAO,eAAe,EAAE,MAAM;EAAe,SAAS,MAAM;EACxG,SAAS,OAAO;EAAY,KAAK,OAAO;EAAQ,UAAU,EAAE;CAC9D,CAAC;CACD,0BAA0B;EACxB,WAAW,OAAO;EAAY,cAAc,OAAO;EACnD,OAAO,EAAE,MAAM;EAAO,eAAe,EAAE,MAAM;EAC7C,SAAS,MAAM,2BAA2B;EAAM,UAAU;EAC1D,WAAW,MAAM,aAAa;EAC9B;EACA,UAAU,QAAQ;EAAU,aAAa,QAAQ;EACjD,WAAW,QAAQ;EAAW,UAAU,QAAQ;EAAU,YAAY,QAAQ;EAC9E,kBAAkB,QAAQ;EAC1B,SAAS,UAAU;EAAS,YAAY,EAAE;EAAY;EACtD,uBAAuB,OAAO;EAAc,YAAY,OAAO;EAC/D;EAAa,iBAAiB,QAAQ,cAAc;EACpD,aAAa,QAAQ,cAAc;EACnC,eAAe,QAAQ;EAAe,sBAAsB,QAAQ;EACpE;EAAe;EAAS,WAAW,MAAM;CAC3C,CAAC;CACD,mBAAmB;EACjB,eAAe,EAAE,MAAM;EACvB,eAAe,EAAE,MAAM,YAAY;EACnC,SAAS,EAAE,MAAM;EACjB;EACA,OAAO,MAAM;EACb,WAAW,OAAO,QAAQ,OAAO,OAAO,UAAU;EAClD,cAAc,MAAM;CACtB,CAAC;CACD,YAAY;EACV,gBAAgB;EAChB,uBAAwB,UAAU,WAA6C,CAAC;EAChF,eAAe,UAAU,QAAQ;EACjC,uBAAuB,EAAE,MAAM,MAAM,UAAU;EAC/C,QAAQ,KAAK;CACf,CAAC;CAKD,OACE,qBAAAA,UAAA,EAAA,UAAA,CACG,YAAY,SACT,oBAAC,uBAAD,EAAuB,SAAS,WAAW,OAAsC,CAAA,IACjF,MACH,MAAM,qBAAqB,oBAAC,6BAAD,EAA6B,YAAY,MAAM,mBAAqB,CAAA,IAAI,IACpG,EAAA,CAAA;AAEN"}
|
|
1
|
+
{"version":3,"file":"SceneCanvasInput.js","names":["_Fragment"],"sources":["../../../src/canvas/SceneCanvas/SceneCanvasInput.tsx"],"sourcesContent":["import type { ResizeHandleLayout } from 'interactions/actions/resize/cornerHandles';\nimport { useLatest } from '@weasel-js/react';\nimport type { Dispatcher } from '@weasel-js/routing';\nimport { useDepSource } from '@weasel-js/routing/react';\nimport type { Scene } from 'core/scene/types';\nimport type { SelectionApi } from 'core/selection/useSelection';\nimport type { RuleCtx } from 'domains/chrome-caps';\nimport type { Affordance } from 'affordances/types';\nimport type { PoseDescriptor } from 'interactions/actions/resize/geometry';\nimport type { UseResizeOptions } from 'interactions/actions/resize/options';\nimport { useContext, useEffect, type MutableRefObject, type RefObject } from 'react';\nimport { SnapSourceRegistryContext } from 'domains/snap/registry';\nimport type { SnapOutcomeStore } from 'domains/snap/outcomeStore';\nimport type { SnapSource } from 'domains/snap/types';\nimport { dlog } from '../../debug/flag';\nimport { useDeviceProfile } from '../../core/device/useDeviceProfile';\nimport { useTestHook } from '../../test-hook/useTestHook';\nimport type { CanvasExtensionApi } from '../canvasExtension';\nimport type { ChromeRulesDep } from '../deps/chromeRules';\nimport { useModeDefaultToolDepSource } from '../deps/modeDefaultTool';\nimport { useHitObserver } from '../useHitObserver';\nimport type { CanvasViewState } from '../useCanvasView';\nimport { GeometryProjectionRegistrar, ResizePolicyRegistrar } from './poseRegistrars';\nimport { usePointerPublisher } from './PointerProviderIfRoot';\nimport type { BridgeAdapter, SceneCanvasProps } from './props';\nimport type { NodeAtPoint } from './useNodeAtPoint';\nimport type { useSceneCanvasTools } from './useSceneCanvasTools';\nimport { useSceneGestureDispatcher } from './useSceneGestureDispatcher';\nimport { useCanvasDevtoolsRoot, type CanvasDevtools } from './useCanvasDevtoolsRoot';\nimport type { useScenePicking } from './useScenePicking';\nimport {\n useSceneStandardActions, type SceneStandardActionsInputs, type StandardActionsProps,\n} from './useSceneStandardActions';\nimport { useToolKeybindings } from './useToolKeybindings';\n\ntype Props = SceneCanvasProps<unknown, string, unknown>;\ntype Picking = ReturnType<typeof useScenePicking<unknown, string, unknown>>;\n\n/** The `<SceneCanvas>` props its input wiring reads. */\nexport type SceneCanvasInputOptions = StandardActionsProps & Pick<\n Props,\n | 'selectTool' | 'geometryProjection' | 'enableGestureDispatcher' | 'enableKeybindings'\n | 'claimKeys' | 'longPress' | 'modes' | 'versionCheck' | 'onClick' | 'onDoubleClick' | 'routing'\n>;\n\n/** What `<SceneCanvas>` hands {@link SceneCanvasInput}. */\nexport interface SceneCanvasInputProps {\n props: SceneCanvasInputOptions;\n scene: Scene<unknown, string, unknown>;\n selection: SelectionApi;\n descriptor: PoseDescriptor<unknown>;\n picking: Pick<\n Picking, 'pickEvery' | 'pickBest' | 'boundsOf' | 'planeOfNode' | 'kindOfNode' | 'doubleClickNames' | 'viewLayerGate' | 'alphaOf' | 'enteredGroup' | 'reachable'\n > & { adapter: BridgeAdapter };\n /** The node a hit resolves to, for the `onClick` / `onDoubleClick` observers. */\n nodeAtPointRef: MutableRefObject<NodeAtPoint | undefined>;\n tools: ReturnType<typeof useSceneCanvasTools>;\n viewOn: boolean;\n camera: { viewState: CanvasViewState; viewAnimation: SceneStandardActionsInputs['viewAnimation'] };\n dispatcher: Dispatcher;\n pathEdit: {\n state: SceneStandardActionsInputs['editAnchorsExternalState'];\n };\n chrome: {\n getIsVisible: () => (id: string) => boolean;\n getRuleCtx: () => RuleCtx | undefined;\n chromeRules: ChromeRulesDep;\n };\n /** The selection overlay's rotate badge, and where the dispatcher reports the affordances\n * it hit-tests, for the slops overlay. */\n overlay: {\n rotationBadge: { distancePx: number; sizePx: number } | null | undefined;\n /** The resize-handle layout the overlay paints, so the hit-test grabs exactly those. */\n resizeHandles: ResizeHandleLayout;\n chromeAffordancesRef: MutableRefObject<readonly Affordance[]>;\n };\n canvas: {\n elementRef: MutableRefObject<HTMLElement | null>;\n apiRef: RefObject<CanvasExtensionApi | null>;\n ready: boolean;\n };\n ingestionClipboard: SceneStandardActionsInputs['ingestionClipboard'];\n ingestionHandlers: SceneStandardActionsInputs['ingestionHandlers'];\n /** The enabled presets' snap sources. */\n snapSources: readonly SnapSource[];\n /** The outcome store the canvas's readout layer draws. */\n snapStore: SnapOutcomeStore;\n devtools: CanvasDevtools;\n}\n\n/**\n * The canvas's input wiring: the pointer publisher, the standard actions and their deps, the\n * gesture dispatcher, and the tool keybindings, in that order, then the test hook.\n *\n * A component of its own, mounted ahead of `<SceneCanvas>`'s children, rather than hooks in the\n * canvas's body: dep sources and actions stack newest-live in effect order, and a parent's\n * effects run after its children's, so a child overriding a kit dep would lose to it.\n */\nexport function SceneCanvasInput(p: SceneCanvasInputProps) {\n const { props, scene, selection, picking, chrome, overlay, canvas } = p;\n const { viewState } = p.camera;\n const { selectTool, enableKeybindings = true } = props;\n const snapRegistry = useContext(SnapSourceRegistryContext);\n useEffect(() => {\n dlog('scene-canvas', 'mount');\n return () => dlog('scene-canvas', 'unmount');\n }, []);\n usePointerPublisher(canvas.elementRef, canvas.apiRef);\n useDepSource('chromeRules', () => chrome.chromeRules);\n useModeDefaultToolDepSource(props.modes, p.tools.tools);\n useSceneStandardActions({\n props, viewOn: p.viewOn,\n selection, enteredGroup: picking.enteredGroup, scene, adapter: picking.adapter, standardActions: p.tools.standardActions,\n currentViewRef: viewState.viewRef, onViewChange: viewState.setViewFromInput,\n poseDescriptor: p.descriptor, dispatcher: p.dispatcher,\n pickEvery: picking.pickEvery, layerIsPainted: picking.viewLayerGate, alphaOf: picking.alphaOf, reachable: picking.reachable,\n viewAnimation: p.camera.viewAnimation, editAnchorsExternalState: p.pathEdit.state,\n canvasRef: canvas.elementRef, canvasApiRef: canvas.apiRef, ingestionClipboard: p.ingestionClipboard,\n ingestionHandlers: p.ingestionHandlers,\n snap: { sources: [...(props.snap?.sources ?? []), ...p.snapSources], registry: snapRegistry, store: p.snapStore },\n });\n\n // Rides the gesture dispatcher as an OBSERVER rather than an Action binding because the\n // prop is a notification, not a behavior: as a binding it would lose first-match-wins to\n // `enterPathEdit` on every body hit and silently stop firing.\n const onDoubleClick = useHitObserver(props.onDoubleClick, p.nodeAtPointRef);\n const onClick = useHitObserver(props.onClick, p.nodeAtPointRef);\n const selectionRef = useLatest(selection);\n const { targetScale } = useDeviceProfile();\n const { root, traces } = useCanvasDevtoolsRoot({\n scene, selection, viewState, tools: p.tools.tools, contributions: p.tools.contributions, routing: props.routing,\n element: canvas.elementRef, api: canvas.apiRef, devtools: p.devtools,\n });\n useSceneGestureDispatcher({\n canvasRef: canvas.elementRef, canvasApiRef: canvas.apiRef,\n tools: p.tools.tools, contributions: p.tools.contributions,\n enabled: props.enableGestureDispatcher ?? true, keyboard: enableKeybindings,\n claimKeys: props.claimKeys ?? false,\n selectionRef,\n boundsOf: picking.boundsOf, planeOfNode: picking.planeOfNode,\n pickEvery: picking.pickEvery, pickBest: picking.pickBest, kindOfNode: picking.kindOfNode,\n doubleClickNames: picking.doubleClickNames,\n viewRef: viewState.viewRef, dispatcher: p.dispatcher, traces,\n getIsVisibleForCanvas: chrome.getIsVisible, getRuleCtx: chrome.getRuleCtx,\n targetScale, handleHitRadius: overlay.resizeHandles.hitRadiusPx,\n edgeHandles: overlay.resizeHandles.edges,\n rotationBadge: overlay.rotationBadge, chromeAffordancesRef: overlay.chromeAffordancesRef,\n onDoubleClick, onClick, longPress: props.longPress,\n });\n useToolKeybindings({\n internalTools: p.tools.internal,\n toolsTakeover: p.tools.takeover ?? undefined,\n surface: p.tools.surface,\n enableKeybindings,\n modes: props.modes,\n canvasApi: canvas.ready ? canvas.apiRef.current : null,\n versionCheck: props.versionCheck,\n });\n useTestHook({\n getScene: () => scene as never,\n getSelectionIds: () => (selection.current as readonly string[] | undefined) ?? [],\n getView: () => viewState.viewRef.current,\n getActiveToolId: () => p.tools.tools.active ?? null,\n probes: root.probes,\n });\n\n // Mounted only when passed: an empty default registered with the deps above would land\n // after, and over, a dep one of these registered (child effects run first). Absent\n // `geometryProjection` leaves the dep undefined.\n return (\n <>\n {selectTool?.resize\n ? <ResizePolicyRegistrar options={selectTool.resize as UseResizeOptions<unknown>} />\n : null}\n {props.geometryProjection ? <GeometryProjectionRegistrar projection={props.geometryProjection} /> : null}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAkGA,SAAgB,iBAAiB,GAA0B;CACzD,MAAM,EAAE,OAAO,OAAO,WAAW,SAAS,QAAQ,SAAS,WAAW;CACtE,MAAM,EAAE,cAAc,EAAE;CACxB,MAAM,EAAE,YAAY,oBAAoB,SAAS;CACjD,MAAM,eAAe,WAAW,yBAAyB;CACzD,gBAAgB;EACd,KAAK,gBAAgB,OAAO;EAC5B,aAAa,KAAK,gBAAgB,SAAS;CAC7C,GAAG,CAAC,CAAC;CACL,oBAAoB,OAAO,YAAY,OAAO,MAAM;CACpD,aAAa,qBAAqB,OAAO,WAAW;CACpD,4BAA4B,MAAM,OAAO,EAAE,MAAM,KAAK;CACtD,wBAAwB;EACtB;EAAO,QAAQ,EAAE;EACjB;EAAW,cAAc,QAAQ;EAAc;EAAO,SAAS,QAAQ;EAAS,iBAAiB,EAAE,MAAM;EACzG,gBAAgB,UAAU;EAAS,cAAc,UAAU;EAC3D,gBAAgB,EAAE;EAAY,YAAY,EAAE;EAC5C,WAAW,QAAQ;EAAW,gBAAgB,QAAQ;EAAe,SAAS,QAAQ;EAAS,WAAW,QAAQ;EAClH,eAAe,EAAE,OAAO;EAAe,0BAA0B,EAAE,SAAS;EAC5E,WAAW,OAAO;EAAY,cAAc,OAAO;EAAQ,oBAAoB,EAAE;EACjF,mBAAmB,EAAE;EACrB,MAAM;GAAE,SAAS,CAAC,GAAI,MAAM,MAAM,WAAW,CAAC,GAAI,GAAG,EAAE,WAAW;GAAG,UAAU;GAAc,OAAO,EAAE;EAAU;CAClH,CAAC;CAKD,MAAM,gBAAgB,eAAe,MAAM,eAAe,EAAE,cAAc;CAC1E,MAAM,UAAU,eAAe,MAAM,SAAS,EAAE,cAAc;CAC9D,MAAM,eAAe,UAAU,SAAS;CACxC,MAAM,EAAE,gBAAgB,iBAAiB;CACzC,MAAM,EAAE,MAAM,WAAW,sBAAsB;EAC7C;EAAO;EAAW;EAAW,OAAO,EAAE,MAAM;EAAO,eAAe,EAAE,MAAM;EAAe,SAAS,MAAM;EACxG,SAAS,OAAO;EAAY,KAAK,OAAO;EAAQ,UAAU,EAAE;CAC9D,CAAC;CACD,0BAA0B;EACxB,WAAW,OAAO;EAAY,cAAc,OAAO;EACnD,OAAO,EAAE,MAAM;EAAO,eAAe,EAAE,MAAM;EAC7C,SAAS,MAAM,2BAA2B;EAAM,UAAU;EAC1D,WAAW,MAAM,aAAa;EAC9B;EACA,UAAU,QAAQ;EAAU,aAAa,QAAQ;EACjD,WAAW,QAAQ;EAAW,UAAU,QAAQ;EAAU,YAAY,QAAQ;EAC9E,kBAAkB,QAAQ;EAC1B,SAAS,UAAU;EAAS,YAAY,EAAE;EAAY;EACtD,uBAAuB,OAAO;EAAc,YAAY,OAAO;EAC/D;EAAa,iBAAiB,QAAQ,cAAc;EACpD,aAAa,QAAQ,cAAc;EACnC,eAAe,QAAQ;EAAe,sBAAsB,QAAQ;EACpE;EAAe;EAAS,WAAW,MAAM;CAC3C,CAAC;CACD,mBAAmB;EACjB,eAAe,EAAE,MAAM;EACvB,eAAe,EAAE,MAAM,YAAY;EACnC,SAAS,EAAE,MAAM;EACjB;EACA,OAAO,MAAM;EACb,WAAW,OAAO,QAAQ,OAAO,OAAO,UAAU;EAClD,cAAc,MAAM;CACtB,CAAC;CACD,YAAY;EACV,gBAAgB;EAChB,uBAAwB,UAAU,WAA6C,CAAC;EAChF,eAAe,UAAU,QAAQ;EACjC,uBAAuB,EAAE,MAAM,MAAM,UAAU;EAC/C,QAAQ,KAAK;CACf,CAAC;CAKD,OACE,qBAAAA,UAAA,EAAA,UAAA,CACG,YAAY,SACT,oBAAC,uBAAD,EAAuB,SAAS,WAAW,OAAsC,CAAA,IACjF,MACH,MAAM,qBAAqB,oBAAC,6BAAD,EAA6B,YAAY,MAAM,mBAAqB,CAAA,IAAI,IACpG,EAAA,CAAA;AAEN"}
|
|
@@ -2,7 +2,7 @@ import { CanvasView } from "../CanvasView.js";
|
|
|
2
2
|
import { ViewMarker } from "../ViewMarker.js";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/canvas/SceneCanvas/SurfaceDeclarations.tsx
|
|
6
6
|
/** The views and markers a `<SceneCanvas>` declares on its surface: its
|
|
7
7
|
* `views` prop, its contributions' views, views added through the handle,
|
|
8
8
|
* then its contributions' markers. */
|
|
@@ -18,6 +18,5 @@ function SurfaceDeclarations({ views, entries, added }) {
|
|
|
18
18
|
] });
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
//#endregion
|
|
22
21
|
export { SurfaceDeclarations };
|
|
23
22
|
//# sourceMappingURL=SurfaceDeclarations.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { circlePath, polylineFromPoints } from "@weasel-js/geom";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/canvas/SceneCanvas/brushOverlay.ts
|
|
4
4
|
/**
|
|
5
5
|
* A `brush` overlay as screen-space commands: the area swept so far, and the
|
|
6
6
|
* brush's rim where it is now. `points` are already on screen.
|
|
@@ -31,6 +31,5 @@ function brushOverlayCommands(points, radiusPx, style) {
|
|
|
31
31
|
}];
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
//#endregion
|
|
35
34
|
export { brushOverlayCommands };
|
|
36
35
|
//# sourceMappingURL=brushOverlay.js.map
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { KIT_SHAPE_KINDS, kitShapeKindsOf } from "../../core/shapeKinds.js";
|
|
2
2
|
import { toolIdsOf, toolSet } from "@weasel-js/routing";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/canvas/SceneCanvas/builtinToolSets.ts
|
|
5
5
|
/** The selection tools: click and marquee, and the lasso. */
|
|
6
6
|
var SELECT_TOOLS = toolSet("select", ["select", ...kitShapeKindsOf("select")]);
|
|
7
|
+
/** Path edit's anchor editing. Path-edit tools of other packages join this group. */
|
|
8
|
+
var ANCHOR_TOOLS = toolSet("path-edit", ["anchors"]);
|
|
7
9
|
/** The view tools. */
|
|
8
10
|
var VIEW_TOOLS = toolSet("view", ["hand"]);
|
|
9
11
|
/** The tools that drag out a closed or open primitive. */
|
|
@@ -14,10 +16,11 @@ var DRAW_TOOLS = toolSet("draw", kitShapeKindsOf("draw"));
|
|
|
14
16
|
var TYPE_TOOLS = toolSet("type", kitShapeKindsOf("type"));
|
|
15
17
|
/** The tools that cut the page itself. */
|
|
16
18
|
var PAGE_TOOLS = toolSet("page", ["slice"]);
|
|
17
|
-
/** The built-in tool sets in palette order: selection, then navigation, then
|
|
18
|
-
* things. Each set is named for the presentation group its tools sit in. */
|
|
19
|
+
/** The built-in tool sets in palette order: selection and anchor editing, then navigation, then
|
|
20
|
+
* the tools that make things. Each set is named for the presentation group its tools sit in. */
|
|
19
21
|
var BUILTIN_TOOL_GROUPS = [
|
|
20
22
|
SELECT_TOOLS,
|
|
23
|
+
ANCHOR_TOOLS,
|
|
21
24
|
VIEW_TOOLS,
|
|
22
25
|
SHAPE_TOOLS,
|
|
23
26
|
DRAW_TOOLS,
|
|
@@ -33,6 +36,5 @@ var BUILTIN_TOOLS = toolSet("builtin", [...BUILTIN_TOOL_GROUPS, ...KIT_SHAPE_KIN
|
|
|
33
36
|
* tools within each group by it. */
|
|
34
37
|
var BUILTIN_TOOL_IDS = toolIdsOf([BUILTIN_TOOLS]);
|
|
35
38
|
|
|
36
|
-
|
|
37
|
-
export { BUILTIN_TOOLS, BUILTIN_TOOL_GROUPS, BUILTIN_TOOL_IDS, DRAW_TOOLS, PAGE_TOOLS, SELECT_TOOLS, SHAPE_TOOLS, TOOL_GROUP_ORDER, TYPE_TOOLS, VIEW_TOOLS };
|
|
39
|
+
export { ANCHOR_TOOLS, BUILTIN_TOOLS, BUILTIN_TOOL_GROUPS, BUILTIN_TOOL_IDS, DRAW_TOOLS, PAGE_TOOLS, SELECT_TOOLS, SHAPE_TOOLS, TOOL_GROUP_ORDER, TYPE_TOOLS, VIEW_TOOLS };
|
|
38
40
|
//# sourceMappingURL=builtinToolSets.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtinToolSets.js","names":[],"sources":["../../../src/canvas/SceneCanvas/builtinToolSets.ts"],"sourcesContent":["import { KIT_SHAPE_KINDS, kitShapeKindsOf, type BuiltinShapeToolId } from 'core/shapeKinds';\nimport { toolIdsOf, toolSet, type ToolSet } from '@weasel-js/routing';\n\n/** Built-in tool ids SceneCanvas knows how to mount, through `defaultTools` or a preset. */\nexport type BuiltinToolId = 'select' | 'hand' | BuiltinShapeToolId | 'slice';\n\n/** The selection tools: click and marquee, and the lasso. */\nexport const SELECT_TOOLS: ToolSet<BuiltinToolId> = toolSet('select', ['select', ...kitShapeKindsOf('select')]);\n/** The view tools. */\nexport const VIEW_TOOLS: ToolSet<BuiltinToolId> = toolSet('view', ['hand']);\n/** The tools that drag out a closed or open primitive. */\nexport const SHAPE_TOOLS: ToolSet<BuiltinToolId> = toolSet('shape', kitShapeKindsOf('shape'));\n/** The freehand and bezier path tools. */\nexport const DRAW_TOOLS: ToolSet<BuiltinToolId> = toolSet('draw', kitShapeKindsOf('draw'));\n/** The text tools: text and the sticky note. */\nexport const TYPE_TOOLS: ToolSet<BuiltinToolId> = toolSet('type', kitShapeKindsOf('type'));\n/** The tools that cut the page itself. */\nexport const PAGE_TOOLS: ToolSet<BuiltinToolId> = toolSet('page', ['slice']);\n\n/** The built-in tool sets in palette order: selection, then navigation, then the tools that make
|
|
1
|
+
{"version":3,"file":"builtinToolSets.js","names":[],"sources":["../../../src/canvas/SceneCanvas/builtinToolSets.ts"],"sourcesContent":["import { KIT_SHAPE_KINDS, kitShapeKindsOf, type BuiltinShapeToolId } from 'core/shapeKinds';\nimport { toolIdsOf, toolSet, type ToolSet } from '@weasel-js/routing';\n\n/** Built-in tool ids SceneCanvas knows how to mount, through `defaultTools` or a preset. */\nexport type BuiltinToolId = 'select' | 'anchors' | 'hand' | BuiltinShapeToolId | 'slice';\n\n/** The selection tools: click and marquee, and the lasso. */\nexport const SELECT_TOOLS: ToolSet<BuiltinToolId> = toolSet('select', ['select', ...kitShapeKindsOf('select')]);\n/** Path edit's anchor editing. Path-edit tools of other packages join this group. */\nexport const ANCHOR_TOOLS: ToolSet<BuiltinToolId> = toolSet('path-edit', ['anchors']);\n/** The view tools. */\nexport const VIEW_TOOLS: ToolSet<BuiltinToolId> = toolSet('view', ['hand']);\n/** The tools that drag out a closed or open primitive. */\nexport const SHAPE_TOOLS: ToolSet<BuiltinToolId> = toolSet('shape', kitShapeKindsOf('shape'));\n/** The freehand and bezier path tools. */\nexport const DRAW_TOOLS: ToolSet<BuiltinToolId> = toolSet('draw', kitShapeKindsOf('draw'));\n/** The text tools: text and the sticky note. */\nexport const TYPE_TOOLS: ToolSet<BuiltinToolId> = toolSet('type', kitShapeKindsOf('type'));\n/** The tools that cut the page itself. */\nexport const PAGE_TOOLS: ToolSet<BuiltinToolId> = toolSet('page', ['slice']);\n\n/** The built-in tool sets in palette order: selection and anchor editing, then navigation, then\n * the tools that make things. Each set is named for the presentation group its tools sit in. */\nexport const BUILTIN_TOOL_GROUPS: readonly ToolSet<BuiltinToolId>[] = [\n SELECT_TOOLS, ANCHOR_TOOLS, VIEW_TOOLS, SHAPE_TOOLS, DRAW_TOOLS, TYPE_TOOLS, PAGE_TOOLS,\n];\n\n/** The natural order of palette groups, which `ToolPalette` follows unless given its own. */\nexport const TOOL_GROUP_ORDER: readonly string[] = BUILTIN_TOOL_GROUPS.map((set) => set.id);\n\n/** Every built-in tool, in palette order: {@link BUILTIN_TOOL_GROUPS} one after another, then any\n * shape kind in no family. */\nexport const BUILTIN_TOOLS: ToolSet<BuiltinToolId> = toolSet('builtin', [...BUILTIN_TOOL_GROUPS, ...KIT_SHAPE_KINDS]);\n\n/** Every built-in tool id, in palette order: {@link BUILTIN_TOOLS} opened. A palette orders the\n * tools within each group by it. */\nexport const BUILTIN_TOOL_IDS: readonly BuiltinToolId[] = toolIdsOf([BUILTIN_TOOLS]);\n"],"mappings":";;;;;AAOA,IAAa,eAAuC,QAAQ,UAAU,CAAC,UAAU,GAAG,gBAAgB,QAAQ,CAAC,CAAC;;AAE9G,IAAa,eAAuC,QAAQ,aAAa,CAAC,SAAS,CAAC;;AAEpF,IAAa,aAAqC,QAAQ,QAAQ,CAAC,MAAM,CAAC;;AAE1E,IAAa,cAAsC,QAAQ,SAAS,gBAAgB,OAAO,CAAC;;AAE5F,IAAa,aAAqC,QAAQ,QAAQ,gBAAgB,MAAM,CAAC;;AAEzF,IAAa,aAAqC,QAAQ,QAAQ,gBAAgB,MAAM,CAAC;;AAEzF,IAAa,aAAqC,QAAQ,QAAQ,CAAC,OAAO,CAAC;;;AAI3E,IAAa,sBAAyD;CACpE;CAAc;CAAc;CAAY;CAAa;CAAY;CAAY;AAC/E;;AAGA,IAAa,mBAAsC,oBAAoB,KAAK,QAAQ,IAAI,EAAE;;;AAI1F,IAAa,gBAAwC,QAAQ,WAAW,CAAC,GAAG,qBAAqB,GAAG,eAAe,CAAC;;;AAIpH,IAAa,mBAA6C,UAAU,CAAC,aAAa,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/canvas/SceneCanvas/canvasPassThrough.ts
|
|
2
2
|
/** Every prop `<SceneCanvas>` reads itself instead of handing to `<Canvas>`. */
|
|
3
3
|
var OWN_PROPS = [
|
|
4
4
|
"scene",
|
|
@@ -70,6 +70,5 @@ function canvasPassThrough(props) {
|
|
|
70
70
|
return rest;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
//#endregion
|
|
74
73
|
export { canvasPassThrough };
|
|
75
74
|
//# sourceMappingURL=canvasPassThrough.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, useRef } from "react";
|
|
2
2
|
import { useLatest } from "@weasel-js/react";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/canvas/SceneCanvas/contributionFrameHooks.ts
|
|
5
5
|
/**
|
|
6
6
|
* Runs contributions' `beforePaint` / `afterPaint` on the surface's own frame
|
|
7
7
|
* loop. One subscription per phase serves every entry, and only while some
|
|
@@ -59,6 +59,5 @@ function useContributionFrameHooks(entries, api, deps) {
|
|
|
59
59
|
]);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
//#endregion
|
|
63
62
|
export { runContributionFrameHooks, useContributionFrameHooks };
|
|
64
63
|
//# sourceMappingURL=contributionFrameHooks.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/canvas/SceneCanvas/coordTrace.ts
|
|
2
2
|
/** Record one conversion against the rect and view it was made under. A null
|
|
3
3
|
* `canvas` or a missing `view` records the identity fallback. */
|
|
4
4
|
function traceConversion(ring, clientX, clientY, canvas, view, world) {
|
|
@@ -37,6 +37,5 @@ function traceConversion(ring, clientX, clientY, canvas, view, world) {
|
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
//#endregion
|
|
41
40
|
export { traceConversion };
|
|
42
41
|
//# sourceMappingURL=coordTrace.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { inferredNodeRouting } from "./defaultNodeRouting.js";
|
|
2
2
|
import { KIT_SHAPE_KINDS, shapeKindInfo } from "../../core/shapeKinds.js";
|
|
3
|
+
import { minSizeOf } from "../../core/scene/minSize.js";
|
|
3
4
|
import { settleShapeGenerator } from "../../domains/paths/shapeGenerator.js";
|
|
4
|
-
import { inferredNodeRouting } from "./defaultNodeRouting.js";
|
|
5
5
|
import { SHAPE_GENERATOR_SECTIONS } from "./shapeGeneratorProperties.js";
|
|
6
6
|
import { poseLinearOf } from "@weasel-js/geom";
|
|
7
7
|
import { dashForStrokeStyle, strokeDashStyleOf } from "@weasel-js/paint";
|
|
8
8
|
import { listMarkers, markerGeneration } from "@weasel-js/stroke";
|
|
9
|
-
import { ANGLE_RADIANS, decimal } from "@weasel-js/quantity";
|
|
10
9
|
import { prefUnit } from "@weasel-js/prefs";
|
|
10
|
+
import { ANGLE_RADIANS, decimal } from "@weasel-js/quantity";
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// src/canvas/SceneCanvas/defaultNodeProperties.ts
|
|
13
13
|
/** Radians-stored / degrees-shown conversion for `pose.rotation` leaves.
|
|
14
14
|
* Display rounds to 0.1° so a canonical radian value doesn't render as
|
|
15
15
|
* a 15-digit float. */
|
|
@@ -867,6 +867,5 @@ var defaultNodeProperties = KIT_SHAPE_KINDS.map(shapeEntry);
|
|
|
867
867
|
*/
|
|
868
868
|
var inferredNodeProperties = inferredNodeRouting.map((e) => shapeEntry(e.name));
|
|
869
869
|
|
|
870
|
-
//#endregion
|
|
871
870
|
export { defaultNodeProperties, inferredNodeProperties, rotationDegreesUnit };
|
|
872
871
|
//# sourceMappingURL=defaultNodeProperties.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { KIT_SHAPE_KINDS } from "../../core/shapeKinds.js";
|
|
2
2
|
import { isTextData } from "@weasel-js/text";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/canvas/SceneCanvas/defaultNodeRouting.ts
|
|
5
5
|
function isObj(d) {
|
|
6
6
|
return typeof d === "object" && d !== null;
|
|
7
7
|
}
|
|
@@ -54,6 +54,5 @@ var inferredNodeRouting = [
|
|
|
54
54
|
}
|
|
55
55
|
];
|
|
56
56
|
|
|
57
|
-
//#endregion
|
|
58
57
|
export { booleanGroupRouting, defaultNodeRouting, groupNodeRouting, inferredNodeRouting };
|
|
59
58
|
//# sourceMappingURL=defaultNodeRouting.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import { useSceneTextEditor } from "../../domains/text/useSceneTextEdit.js";
|
|
2
|
+
import { hostTextEditorHolds } from "../../domains/text/hostTextEditors.js";
|
|
3
|
+
import { drawOneEditing } from "../../domains/text/editingDrawOne.js";
|
|
1
4
|
import { defaultDrawOne, defaultPaintBounds, paintBoundsFor } from "../defaultDrawOne.js";
|
|
2
5
|
import { isCustomEntry } from "../layerSlots.js";
|
|
3
|
-
import { drawOneEditing } from "../../domains/text/editingDrawOne.js";
|
|
4
|
-
import { hostTextEditorHolds } from "../../domains/text/hostTextEditors.js";
|
|
5
|
-
import { useSceneTextEditor } from "../../domains/text/useSceneTextEdit.js";
|
|
6
6
|
import { useEffect, useLayoutEffect, useMemo, useState } from "react";
|
|
7
7
|
import { useLatest } from "@weasel-js/react";
|
|
8
8
|
import { useDepRegistry, useDepSource } from "@weasel-js/routing/react";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/canvas/SceneCanvas/defaultTextEditor.tsx
|
|
11
11
|
/**
|
|
12
12
|
* `<SceneCanvas>`'s own text editor: the one a text or sticky tool's
|
|
13
13
|
* `enterTextEdit` reaches, and a double-click on a text node opens, when the
|
|
@@ -103,6 +103,5 @@ function layersWhileEditing(layers, editingId) {
|
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
//#endregion
|
|
107
106
|
export { DefaultTextEditDep, layersWhileEditing, useCanvasTextEditor, useDefaultTextEditor };
|
|
108
107
|
//# sourceMappingURL=defaultTextEditor.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { namesBuiltins, presetToolIds } from "./features.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/canvas/SceneCanvas/describePresets.ts
|
|
4
4
|
var ATOM_ROLES = [
|
|
5
5
|
"ambient",
|
|
6
6
|
"moveBehaviors",
|
|
@@ -42,6 +42,5 @@ function describePresets(sources) {
|
|
|
42
42
|
return out;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
//#endregion
|
|
46
45
|
export { describePresets, isAtom };
|
|
47
46
|
//# sourceMappingURL=describePresets.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { insertPreviewExtent } from "../insertPreviewExtent.js";
|
|
2
2
|
import { overlaysOf } from "@weasel-js/routing";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/canvas/SceneCanvas/dispatcherGestureBounds.ts
|
|
5
5
|
/**
|
|
6
6
|
* The dispatcher side of `<Canvas>`'s {@link GestureSource} seam: `<Canvas>`
|
|
7
7
|
* knows nothing about the gesture dispatcher, so `<SceneCanvas>` wires its
|
|
@@ -100,6 +100,5 @@ function createDispatcherPreviewSources(getDispatcher) {
|
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
//#endregion
|
|
104
103
|
export { createDispatcherPreviewSources, createGestureSource, dispatcherGestureIds, dispatcherInsertBounds };
|
|
105
104
|
//# sourceMappingURL=dispatcherGestureBounds.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { never } from "../../domains/chrome-caps/conditions.js";
|
|
2
2
|
import { toolIdsOf } from "@weasel-js/routing";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/canvas/SceneCanvas/features.ts
|
|
5
5
|
/**
|
|
6
6
|
* The behavior presets `<SceneCanvas features>` composes. A bare canvas renders
|
|
7
7
|
* its scene, keeps a selection nothing sets, and undoes and redoes whatever
|
|
@@ -181,6 +181,5 @@ function presetChromeRules(enabled, owned) {
|
|
|
181
181
|
return rules;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
//#endregion
|
|
185
184
|
export { SCENE_CANVAS_FEATURES, namesBuiltins, presetActions, presetAmbient, presetBuiltinTools, presetChromeRules, presetContributions, presetOwnTools, presetToolIds, resolveFeatures };
|
|
186
185
|
//# sourceMappingURL=features.js.map
|
|
@@ -3,7 +3,7 @@ import { worldToScreen } from "../../core/viewport/viewTransform.js";
|
|
|
3
3
|
import { getImageBitmap } from "@weasel-js/renderer";
|
|
4
4
|
import { ellipsePath, invert, linePath, mat3 as mat3$1, multiply, polylineFromPoints, rectPath, regularPolygonPath, starPath } from "@weasel-js/geom";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/canvas/SceneCanvas/insertPreviewCommands.ts
|
|
7
7
|
/** Alpha for content previewed inside an in-flight gesture. Matches the
|
|
8
8
|
* preview-ghost layer, so a dragged node and an uncommitted insert read as
|
|
9
9
|
* equally provisional. */
|
|
@@ -110,6 +110,5 @@ function insertPreviewCommands(ov, view, cfg) {
|
|
|
110
110
|
return out;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
//#endregion
|
|
114
113
|
export { insertPreviewCommands };
|
|
115
114
|
//# sourceMappingURL=insertPreviewCommands.js.map
|
|
@@ -2,7 +2,7 @@ import { targetSizesPx } from "../../core/device/targets.js";
|
|
|
2
2
|
import { defaultDrawOne, defaultPaintBounds, paintBoundsFor } from "../defaultDrawOne.js";
|
|
3
3
|
import { isCustomEntry } from "../layerSlots.js";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/canvas/SceneCanvas/mergeLayers.ts
|
|
6
6
|
/** `<SceneCanvas layers>` laid over the enabled presets' layers: a slot the
|
|
7
7
|
* consumer names, `null` included, is theirs, and the rest are the presets'. */
|
|
8
8
|
function layersOverPresets(presetLayers, user) {
|
|
@@ -47,6 +47,5 @@ function mergeLayersWithDefaults(user, targetScale = 1, baseSizes = {}) {
|
|
|
47
47
|
return result;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
//#endregion
|
|
51
50
|
export { layersOverPresets, mergeLayersWithDefaults };
|
|
52
51
|
//# sourceMappingURL=mergeLayers.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { alignPreset, arrangePreset, distributePreset, flipPreset, reorderPreset } from "./presets/arrange.js";
|
|
2
|
+
import { drawPreset, pickPreset, transformPreset } from "./presets/composites.js";
|
|
2
3
|
import { clipboardPreset, contextMenuPreset, deletePreset, duplicatePreset, editPreset, escapePreset, groupPreset, nudgePreset, selectAllPreset, stylePreset } from "./presets/edit.js";
|
|
3
4
|
import { ingestPreset } from "./presets/ingest.js";
|
|
4
5
|
import { anchorKeysPreset, outlinesPreset, pathCommandsPreset, pathEditPreset, pathfinderPreset, pathsPreset } from "./presets/paths.js";
|
|
5
|
-
import { drawToolsPreset, pageToolsPreset, selectToolsPreset, shapeToolsPreset, typeToolsPreset, viewToolsPreset } from "./presets/tools.js";
|
|
6
6
|
import { selectPreset } from "./presets/select.js";
|
|
7
|
-
import { movePreset, outlinePreset, resizePreset, rotatePreset } from "./presets/transform.js";
|
|
8
|
-
import { viewPreset } from "./presets/view.js";
|
|
9
|
-
import { drawPreset, pickPreset, transformPreset } from "./presets/composites.js";
|
|
10
7
|
import { toolDrivenActions } from "./presets/toolDriven.js";
|
|
8
|
+
import { drawToolsPreset, pageToolsPreset, selectToolsPreset, shapeToolsPreset, typeToolsPreset, viewToolsPreset } from "./presets/tools.js";
|
|
11
9
|
import { BASELINE_ACTIONS } from "./presets/baseline.js";
|
|
10
|
+
import { movePreset, outlinePreset, resizePreset, rotatePreset } from "./presets/transform.js";
|
|
11
|
+
import { viewPreset } from "./presets/view.js";
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// src/canvas/SceneCanvas/namedPresets.ts
|
|
14
14
|
/** Each core preset by name, in the order `SCENE_CANVAS_FEATURES` lists them. */
|
|
15
15
|
var FEATURE_PRESETS = {
|
|
16
16
|
"tools:select": selectToolsPreset,
|
|
@@ -79,6 +79,5 @@ var CORE_PRESET_SOURCE = {
|
|
|
79
79
|
baseline: BASELINE_ACTIONS
|
|
80
80
|
};
|
|
81
81
|
|
|
82
|
-
//#endregion
|
|
83
82
|
export { BASELINE_ACTION_IDS, CORE_NAMED_PRESETS, CORE_PRESET_SOURCE, FEATURE_ACTION_IDS, FEATURE_PRESETS, KIT_STANDARD_ACTIONS, TOOL_DRIVEN_ACTION_IDS };
|
|
84
83
|
//# sourceMappingURL=namedPresets.js.map
|
|
@@ -3,7 +3,7 @@ import { AUTO_POSE_DESCRIPTOR, isPathLike } from "../../core/geometry/autoPoseDe
|
|
|
3
3
|
import { hasSlop, slopForStrokeHit } from "../../core/viewport/screenSlop.js";
|
|
4
4
|
import { applyToPoint, pointInPath, poseFrameInverseOf, poseFrameOf, poseLinearOf, strokeHitTest } from "@weasel-js/geom";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/canvas/SceneCanvas/poseGeometry.ts
|
|
7
7
|
function aabbOfPose(pose, descriptor = AUTO_POSE_DESCRIPTOR) {
|
|
8
8
|
return descriptor.getBounds(pose);
|
|
9
9
|
}
|
|
@@ -73,6 +73,5 @@ function containsInFrame(pose, x, y, tolerance, descriptor, frame, stretched) {
|
|
|
73
73
|
return hasSlop(screen) && strokeHitTest(grown, x, y, 0, opts);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
//#endregion
|
|
77
76
|
export { aabbOfPose, isPathLike, poseContains, poseContainsRotated };
|
|
78
77
|
//# sourceMappingURL=poseGeometry.js.map
|