@weasel-js/core 1.9.3 → 1.9.4
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 +356 -0
- package/README.md +2 -2
- package/dist/WeaselProvider.js +5 -5
- package/dist/affordances/composeAffordanceLayer.js +10 -20
- package/dist/affordances/composeAffordanceLayer.js.map +1 -1
- package/dist/affordances/cornerResize.js +25 -17
- package/dist/affordances/cornerResize.js.map +1 -1
- package/dist/affordances/hitAffordanceRegions.js +27 -20
- package/dist/affordances/hitAffordanceRegions.js.map +1 -1
- package/dist/affordances/rotationHandle.js +18 -18
- package/dist/affordances/rotationHandle.js.map +1 -1
- package/dist/animation/behaviors/momentum.js +93 -55
- package/dist/animation/behaviors/momentum.js.map +1 -1
- package/dist/animation/loop.js +10 -12
- package/dist/animation/loop.js.map +1 -1
- package/dist/animation/reflow.js +8 -8
- package/dist/animation/reflow.js.map +1 -1
- package/dist/animation/stagger.js +64 -56
- package/dist/animation/stagger.js.map +1 -1
- package/dist/animation/timeline/booking.js +62 -54
- package/dist/animation/timeline/booking.js.map +1 -1
- package/dist/animation/timeline/createTimeline.js +85 -76
- package/dist/animation/timeline/createTimeline.js.map +1 -1
- package/dist/animation/timeline/sampleTrack.js +13 -5
- package/dist/animation/timeline/sampleTrack.js.map +1 -1
- package/dist/animation/useAnimator.js +45 -35
- package/dist/animation/useAnimator.js.map +1 -1
- package/dist/animation/wrappers/animateLifecycle.js +31 -24
- package/dist/animation/wrappers/animateLifecycle.js.map +1 -1
- package/dist/animation/wrappers/animateOnSetPose.js +28 -26
- package/dist/animation/wrappers/animateOnSetPose.js.map +1 -1
- package/dist/animation/wrappers/instantPose.js +13 -0
- package/dist/animation/wrappers/instantPose.js.map +1 -0
- package/dist/{poseDescriptor-D-OH-tu5.d.ts → autoPoseDescriptor-Ct7yqivU.d.ts} +28 -3
- package/dist/barrel/chrome.js +16 -0
- package/dist/barrel/input.js +19 -0
- package/dist/barrel/interactions.js +42 -0
- package/dist/barrel/paint.js +18 -0
- package/dist/barrel/paths.js +19 -0
- package/dist/barrel/renderer.js +20 -0
- package/dist/barrel/routing.js +51 -0
- package/dist/barrel/text.js +18 -0
- package/dist/barrel/viewport.js +52 -0
- package/dist/builtins-DPcdghtB.d.ts +1223 -0
- package/dist/canvas/Canvas.js +363 -448
- package/dist/canvas/Canvas.js.map +1 -1
- package/dist/canvas/CanvasView.js +164 -165
- package/dist/canvas/CanvasView.js.map +1 -1
- package/dist/canvas/CursorCoordsHud.js +37 -32
- package/dist/canvas/CursorCoordsHud.js.map +1 -1
- package/dist/canvas/DrawCanvas.js +49 -43
- package/dist/canvas/DrawCanvas.js.map +1 -1
- package/dist/canvas/MinimapCanvas.js +26 -25
- package/dist/canvas/MinimapCanvas.js.map +1 -1
- package/dist/canvas/NodeShape.js +59 -377
- package/dist/canvas/NodeShape.js.map +1 -1
- package/dist/canvas/PickHud.js +50 -47
- package/dist/canvas/PickHud.js.map +1 -1
- package/dist/canvas/SceneCanvas/GestureDispatcherMounter.js +167 -0
- package/dist/canvas/SceneCanvas/GestureDispatcherMounter.js.map +1 -0
- package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js +13 -13
- package/dist/canvas/SceneCanvas/StandardActionsRegistrar.js +67 -0
- package/dist/canvas/SceneCanvas/StandardActionsRegistrar.js.map +1 -0
- package/dist/canvas/SceneCanvas/ToolKeybindingsMounter.js +16 -0
- package/dist/canvas/SceneCanvas/ToolKeybindingsMounter.js.map +1 -0
- package/dist/canvas/SceneCanvas/coordTrace.js +10 -0
- package/dist/canvas/SceneCanvas/coordTrace.js.map +1 -0
- package/dist/canvas/SceneCanvas/defaultNodeProperties.js +112 -70
- package/dist/canvas/SceneCanvas/defaultNodeProperties.js.map +1 -1
- package/dist/canvas/SceneCanvas/defaultNodeRouting.js +9 -8
- package/dist/canvas/SceneCanvas/defaultNodeRouting.js.map +1 -1
- package/dist/canvas/SceneCanvas/features.js +1 -0
- package/dist/canvas/SceneCanvas/features.js.map +1 -1
- package/dist/canvas/SceneCanvas/isDev.js +12 -0
- package/dist/canvas/SceneCanvas/isDev.js.map +1 -0
- package/dist/canvas/SceneCanvas/poseGeometry.js +29 -28
- package/dist/canvas/SceneCanvas/poseGeometry.js.map +1 -1
- package/dist/canvas/SceneCanvas/poseRegistrars.js +13 -0
- package/dist/canvas/SceneCanvas/poseRegistrars.js.map +1 -0
- package/dist/canvas/SceneCanvas/props.js +38 -0
- package/dist/canvas/SceneCanvas/props.js.map +1 -0
- package/dist/canvas/SceneCanvas/useBuiltinShapeTools.js +21 -62
- package/dist/canvas/SceneCanvas/useBuiltinShapeTools.js.map +1 -1
- package/dist/canvas/SceneCanvas/useDispatcherOverlayLayer.js.map +1 -1
- package/dist/canvas/SceneCanvas/usePreviewGhostLayer.js +46 -48
- package/dist/canvas/SceneCanvas/usePreviewGhostLayer.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneSelectTool.js +33 -33
- package/dist/canvas/SceneCanvas/useSceneSelectTool.js.map +1 -1
- package/dist/canvas/SceneCanvas.js +534 -788
- package/dist/canvas/SceneCanvas.js.map +1 -1
- package/dist/canvas/SceneViewCanvas.js +45 -43
- package/dist/canvas/SceneViewCanvas.js.map +1 -1
- package/dist/canvas/buildSceneLayer.js +91 -0
- package/dist/canvas/buildSceneLayer.js.map +1 -0
- package/dist/canvas/buildSceneTree.js +16 -19
- package/dist/canvas/buildSceneTree.js.map +1 -1
- package/dist/canvas/canvasRenderer.js +68 -52
- package/dist/canvas/canvasRenderer.js.map +1 -1
- package/dist/canvas/deps/changes.js +13 -0
- package/dist/canvas/deps/changes.js.map +1 -0
- package/dist/canvas/deps/editAnchors.js +28 -28
- package/dist/canvas/deps/insert.js +119 -91
- package/dist/canvas/deps/insert.js.map +1 -1
- package/dist/canvas/deps/slice.js +46 -45
- package/dist/canvas/deps/slice.js.map +1 -1
- package/dist/canvas/deps/textEdit.js +10 -9
- package/dist/canvas/deps/textEdit.js.map +1 -1
- package/dist/canvas/derivedPath.js +46 -23
- package/dist/canvas/derivedPath.js.map +1 -1
- package/dist/canvas/getNodeAtPoint.js +7 -7
- package/dist/canvas/getNodeAtPoint.js.map +1 -1
- package/dist/canvas/hud.module.js +1 -1
- package/dist/canvas/hud.module.js.map +1 -1
- package/dist/canvas/kitRequirements.js +2 -2
- package/dist/canvas/kitRequirements.js.map +1 -1
- package/dist/canvas/layerOrder.js +13 -6
- package/dist/canvas/layerOrder.js.map +1 -1
- package/dist/canvas/minimapMath.js +12 -10
- package/dist/canvas/minimapMath.js.map +1 -1
- package/dist/canvas/nodeShapes/derivedPainter.js +34 -0
- package/dist/canvas/nodeShapes/derivedPainter.js.map +1 -0
- package/dist/canvas/nodeShapes/imagePainter.js +87 -0
- package/dist/canvas/nodeShapes/imagePainter.js.map +1 -0
- package/dist/canvas/nodeShapes/memo.js +9 -0
- package/dist/canvas/nodeShapes/memo.js.map +1 -0
- package/dist/canvas/nodeShapes/nodePaint.js +57 -0
- package/dist/canvas/nodeShapes/nodePaint.js.map +1 -0
- package/dist/canvas/nodeShapes/pathPainter.js +38 -0
- package/dist/canvas/nodeShapes/pathPainter.js.map +1 -0
- package/dist/canvas/nodeShapes/poseBox.js +20 -0
- package/dist/canvas/nodeShapes/poseBox.js.map +1 -0
- package/dist/canvas/nodeShapes/rectFallbackPainter.js +38 -0
- package/dist/canvas/nodeShapes/rectFallbackPainter.js.map +1 -0
- package/dist/canvas/nodeShapes/shapePainter.js +72 -0
- package/dist/canvas/nodeShapes/shapePainter.js.map +1 -0
- package/dist/canvas/nodeShapes/textPainter.js +55 -0
- package/dist/canvas/nodeShapes/textPainter.js.map +1 -0
- package/dist/canvas/overlayRoleStrokes.js.map +1 -1
- package/dist/canvas/paintCull.js +10 -11
- package/dist/canvas/paintCull.js.map +1 -1
- package/dist/canvas/pickWalk.js +52 -63
- package/dist/canvas/pickWalk.js.map +1 -1
- package/dist/canvas/poseRotation.js +11 -23
- package/dist/canvas/poseRotation.js.map +1 -1
- package/dist/canvas/renderDebugSnapshot.js +5 -5
- package/dist/canvas/renderSceneToPixels.js +3 -1
- package/dist/canvas/renderSceneToPixels.js.map +1 -1
- package/dist/canvas/sceneAdapter.js +66 -148
- package/dist/canvas/sceneAdapter.js.map +1 -1
- package/dist/canvas/sceneClipboard.js +112 -0
- package/dist/canvas/sceneClipboard.js.map +1 -0
- package/dist/canvas/sceneSlotWiring.js +4 -4
- package/dist/canvas/sceneSlotWiring.js.map +1 -1
- package/dist/canvas/sceneViewRender.js +39 -40
- package/dist/canvas/sceneViewRender.js.map +1 -1
- package/dist/canvas/useCanvasRenderer.js +14 -6
- package/dist/canvas/useCanvasRenderer.js.map +1 -1
- package/dist/canvas/useCanvasView.js +58 -0
- package/dist/canvas/useCanvasView.js.map +1 -0
- package/dist/canvas/useFrameLoop.js +35 -26
- package/dist/canvas/useFrameLoop.js.map +1 -1
- package/dist/canvas/useSceneLayerList.js +21 -0
- package/dist/canvas/useSceneLayerList.js.map +1 -0
- package/dist/clipboard.d.ts +10 -6
- package/dist/clone.d.ts +4 -3
- package/dist/core/adapters/arrayAdapter.js +48 -39
- package/dist/core/adapters/arrayAdapter.js.map +1 -1
- package/dist/core/device/index.js +5 -4
- package/dist/core/device/useDeviceProfile.js +38 -44
- package/dist/core/device/useDeviceProfile.js.map +1 -1
- package/dist/core/device/watchDevicePixelRatio.js +17 -0
- package/dist/core/device/watchDevicePixelRatio.js.map +1 -0
- package/dist/core/fillInPoseFrame.js.map +1 -1
- package/dist/core/geometry/poseDescriptor.js +21 -19
- package/dist/core/geometry/poseDescriptor.js.map +1 -1
- package/dist/core/geometry/poseFrame.js +44 -0
- package/dist/core/geometry/poseFrame.js.map +1 -0
- package/dist/core/geometry/poseRotation.js.map +1 -1
- package/dist/core/geometry/regionHit.js +9 -10
- package/dist/core/geometry/regionHit.js.map +1 -1
- package/dist/core/geometry/unionBounds.js +31 -29
- package/dist/core/geometry/unionBounds.js.map +1 -1
- package/dist/core/isPlainObject.js +2 -11
- package/dist/core/ops/arrange.js +1 -0
- package/dist/core/ops/arrange.js.map +1 -1
- package/dist/core/ops/create.js +10 -5
- package/dist/core/ops/create.js.map +1 -1
- package/dist/core/ops/delete.js +12 -24
- package/dist/core/ops/delete.js.map +1 -1
- package/dist/core/ops/reorder/index.js +43 -40
- package/dist/core/ops/reorder/index.js.map +1 -1
- package/dist/core/ops/reorder/setChildOrder.js +34 -0
- package/dist/core/ops/reorder/setChildOrder.js.map +1 -0
- package/dist/core/paintKinds.js +5 -5
- package/dist/core/paintKinds.js.map +1 -1
- package/dist/core/scene/NodeProperties.js.map +1 -1
- package/dist/core/scene/appliedLog.js +37 -0
- package/dist/core/scene/appliedLog.js.map +1 -0
- package/dist/core/scene/arrivalWindow.js +101 -0
- package/dist/core/scene/arrivalWindow.js.map +1 -0
- package/dist/core/scene/derivedPath.js.map +1 -1
- package/dist/core/scene/historyFacade.js +84 -0
- package/dist/core/scene/historyFacade.js.map +1 -0
- package/dist/core/scene/kitOps.js +173 -0
- package/dist/core/scene/kitOps.js.map +1 -0
- package/dist/core/scene/layerStack.js +38 -0
- package/dist/core/scene/layerStack.js.map +1 -0
- package/dist/core/scene/lockGuard.js +37 -0
- package/dist/core/scene/lockGuard.js.map +1 -0
- package/dist/core/scene/nodeFnFields.js +5 -6
- package/dist/core/scene/nodeFnFields.js.map +1 -1
- package/dist/core/scene/nodeMemo.js +45 -19
- package/dist/core/scene/nodeMemo.js.map +1 -1
- package/dist/core/scene/nodeStore.js +126 -0
- package/dist/core/scene/nodeStore.js.map +1 -0
- package/dist/core/scene/pickability.js +6 -0
- package/dist/core/scene/pickability.js.map +1 -0
- package/dist/core/scene/poseFeed.js +38 -38
- package/dist/core/scene/poseFeed.js.map +1 -1
- package/dist/core/scene/poseOverrides.js +34 -38
- package/dist/core/scene/poseOverrides.js.map +1 -1
- package/dist/core/scene/renderOrder.js +84 -0
- package/dist/core/scene/renderOrder.js.map +1 -0
- package/dist/core/scene/scene.js +289 -866
- package/dist/core/scene/scene.js.map +1 -1
- package/dist/core/scene/serialization.js +68 -0
- package/dist/core/scene/serialization.js.map +1 -0
- package/dist/core/scene/treeOrder.js +13 -0
- package/dist/core/scene/treeOrder.js.map +1 -0
- package/dist/core/scene/types.js.map +1 -1
- package/dist/core/viewport/meanScale.js +1 -1
- package/dist/core/viewport/meanScale.js.map +1 -1
- package/dist/core/viewport/view.js +12 -12
- package/dist/core/viewport/view.js.map +1 -1
- package/dist/core/viewport/zoomBounds.js +10 -8
- package/dist/core/viewport/zoomBounds.js.map +1 -1
- package/dist/{cornerHandles-BCrDp_mH.d.ts → cornerHandles-CtCb8a3G.d.ts} +1 -1
- package/dist/debug/createDebugOverlayLayer.js +14 -14
- package/dist/debug/createDebugOverlayLayer.js.map +1 -1
- package/dist/debug/flag.js +2 -41
- package/dist/features/chrome-caps/useHoverTracking.js +22 -17
- package/dist/features/chrome-caps/useHoverTracking.js.map +1 -1
- package/dist/features/focus/gateLayer.js +3 -4
- package/dist/features/focus/gateLayer.js.map +1 -1
- package/dist/features/images/imageCache.js +19 -9
- package/dist/features/images/imageCache.js.map +1 -1
- package/dist/features/ingestion/contentHandlers.js +14 -11
- package/dist/features/ingestion/contentHandlers.js.map +1 -1
- package/dist/features/ingestion/index.js +1 -1
- package/dist/features/ingestion/registerKitHandlers.js +7 -7
- package/dist/features/ingestion/weaselJsonHandler.js +17 -14
- package/dist/features/ingestion/weaselJsonHandler.js.map +1 -1
- package/dist/features/meshPaint/lazyKind.js +201 -35
- package/dist/features/meshPaint/lazyKind.js.map +1 -1
- package/dist/features/meshPaint/meshPaint.js +82 -79
- package/dist/features/meshPaint/meshPaint.js.map +1 -1
- package/dist/features/minimap/createMinimapContribution.js +42 -42
- package/dist/features/minimap/layers.js +44 -62
- package/dist/features/minimap/layers.js.map +1 -1
- package/dist/features/parallax/createParallaxPlane.js +10 -14
- package/dist/features/parallax/createParallaxPlane.js.map +1 -1
- package/dist/features/paths/anchorEdits.js +19 -8
- package/dist/features/paths/anchorEdits.js.map +1 -1
- package/dist/features/paths/anchors.js +31 -26
- package/dist/features/paths/anchors.js.map +1 -1
- package/dist/features/paths/booleans.js +2 -2
- package/dist/features/paths/index.js +13 -11
- package/dist/features/paths/markerCommands.js +37 -36
- package/dist/features/paths/markerCommands.js.map +1 -1
- package/dist/features/paths/pathInWorld.js +19 -19
- package/dist/features/paths/pathInWorld.js.map +1 -1
- package/dist/features/paths/pathLayer.js.map +1 -1
- package/dist/features/paths/strokeToPath.js +40 -0
- package/dist/features/paths/strokeToPath.js.map +1 -0
- package/dist/features/paths/tessellate/stroke.js.map +1 -1
- package/dist/features/patterns/commandPaint.js +18 -0
- package/dist/features/patterns/commandPaint.js.map +1 -0
- package/dist/features/patterns/index.js +5 -17
- package/dist/features/patterns/index.js.map +1 -1
- package/dist/features/patterns/rasterizeTile.js +17 -0
- package/dist/features/patterns/rasterizeTile.js.map +1 -0
- package/dist/features/patterns/resolveSpec.js +52 -44
- package/dist/features/patterns/resolveSpec.js.map +1 -1
- package/dist/features/poseRun/usePoseRun.js +8 -3
- package/dist/features/poseRun/usePoseRun.js.map +1 -1
- package/dist/features/selection/SelectionContext.js +5 -0
- package/dist/features/selection/SelectionContext.js.map +1 -1
- package/dist/features/selection/overlay.js +18 -18
- package/dist/features/selection/overlay.js.map +1 -1
- package/dist/features/text/domOffsets.js +82 -0
- package/dist/features/text/domOffsets.js.map +1 -0
- package/dist/features/text/domRuns.js +103 -131
- package/dist/features/text/domRuns.js.map +1 -1
- package/dist/features/text/hitTest.js +5 -2
- package/dist/features/text/hitTest.js.map +1 -1
- package/dist/features/text/isTextData.js +8 -0
- package/dist/features/text/isTextData.js.map +1 -0
- package/dist/features/text/overlayDirection.js +15 -0
- package/dist/features/text/overlayDirection.js.map +1 -0
- package/dist/features/text/runs/rangeStyle.js +32 -34
- package/dist/features/text/runs/rangeStyle.js.map +1 -1
- package/dist/features/text/textCommand.js +34 -33
- package/dist/features/text/textCommand.js.map +1 -1
- package/dist/features/text/textToPath.js +40 -40
- package/dist/features/text/textToPath.js.map +1 -1
- package/dist/features/text/useSceneTextEdit.js +76 -82
- package/dist/features/text/useSceneTextEdit.js.map +1 -1
- package/dist/features/text/useTextEdit.js +184 -160
- package/dist/features/text/useTextEdit.js.map +1 -1
- package/dist/features/tiling/createTiledLayer.js +24 -22
- package/dist/features/tiling/createTiledLayer.js.map +1 -1
- package/dist/index.d.ts +11033 -7749
- package/dist/index.js +316 -309
- package/dist/input/keyState.js +42 -43
- package/dist/input/keyState.js.map +1 -1
- package/dist/input/useKeyModifiers.js +11 -0
- package/dist/input/useKeyModifiers.js.map +1 -0
- package/dist/interactions/actions/align/align.js +8 -8
- package/dist/interactions/actions/clipboard/clipboardOps.js +34 -32
- package/dist/interactions/actions/clipboard/clipboardOps.js.map +1 -1
- package/dist/interactions/actions/clipboard/materializePaste.js +10 -7
- package/dist/interactions/actions/clipboard/materializePaste.js.map +1 -1
- package/dist/interactions/actions/clipboard/wireFormat.js.map +1 -1
- package/dist/interactions/actions/clone/behaviors/cloneByAltDrag.js.map +1 -1
- package/dist/interactions/actions/defaultCommitAdapter.js +20 -18
- package/dist/interactions/actions/defaultCommitAdapter.js.map +1 -1
- package/dist/interactions/actions/defaults/align.js +9 -10
- package/dist/interactions/actions/defaults/align.js.map +1 -1
- package/dist/interactions/actions/defaults/anchorEditing.js +59 -81
- package/dist/interactions/actions/defaults/anchorEditing.js.map +1 -1
- package/dist/interactions/actions/defaults/areaSelect.js +35 -38
- package/dist/interactions/actions/defaults/areaSelect.js.map +1 -1
- package/dist/interactions/actions/defaults/clipboard.js +26 -10
- package/dist/interactions/actions/defaults/clipboard.js.map +1 -1
- package/dist/interactions/actions/defaults/clone.js +44 -60
- package/dist/interactions/actions/defaults/clone.js.map +1 -1
- package/dist/interactions/actions/defaults/copySubtree.js +40 -0
- package/dist/interactions/actions/defaults/copySubtree.js.map +1 -0
- package/dist/interactions/actions/defaults/distribute.js +14 -13
- package/dist/interactions/actions/defaults/distribute.js.map +1 -1
- package/dist/interactions/actions/defaults/duplicate.js +17 -57
- package/dist/interactions/actions/defaults/duplicate.js.map +1 -1
- package/dist/interactions/actions/defaults/editAnchors.js +18 -18
- package/dist/interactions/actions/defaults/enterTextEdit.js.map +1 -1
- package/dist/interactions/actions/defaults/flip.js +52 -46
- package/dist/interactions/actions/defaults/flip.js.map +1 -1
- package/dist/interactions/actions/defaults/group.js +43 -48
- package/dist/interactions/actions/defaults/group.js.map +1 -1
- package/dist/interactions/actions/defaults/ingest.js +35 -33
- package/dist/interactions/actions/defaults/ingest.js.map +1 -1
- package/dist/interactions/actions/defaults/insert.js +50 -51
- package/dist/interactions/actions/defaults/insert.js.map +1 -1
- package/dist/interactions/actions/defaults/insertPathAnchor.js +7 -7
- package/dist/interactions/actions/defaults/lassoSelect.js +67 -70
- package/dist/interactions/actions/defaults/lassoSelect.js.map +1 -1
- package/dist/interactions/actions/defaults/move.js +267 -249
- package/dist/interactions/actions/defaults/move.js.map +1 -1
- package/dist/interactions/actions/defaults/nudge.js +40 -68
- package/dist/interactions/actions/defaults/nudge.js.map +1 -1
- package/dist/interactions/actions/defaults/nudgeSteps.js +37 -0
- package/dist/interactions/actions/defaults/nudgeSteps.js.map +1 -0
- package/dist/interactions/actions/defaults/reorder.js +2 -0
- package/dist/interactions/actions/defaults/reorder.js.map +1 -1
- package/dist/interactions/actions/defaults/resize.js +104 -98
- package/dist/interactions/actions/defaults/resize.js.map +1 -1
- package/dist/interactions/actions/defaults/rotate.js +111 -110
- package/dist/interactions/actions/defaults/rotate.js.map +1 -1
- package/dist/interactions/actions/defaults/setFill.js +7 -7
- package/dist/interactions/actions/defaults/setFillOpacity.js +4 -4
- package/dist/interactions/actions/defaults/setStroke.js +12 -12
- package/dist/interactions/actions/defaults/setStrokeOpacity.js +6 -6
- package/dist/interactions/actions/defaults/sliceOps.js +19 -19
- package/dist/interactions/actions/defaults/viewportDragPan.js +37 -26
- package/dist/interactions/actions/defaults/viewportDragPan.js.map +1 -1
- package/dist/interactions/actions/edit-anchors/geometry.js +28 -23
- package/dist/interactions/actions/edit-anchors/geometry.js.map +1 -1
- package/dist/interactions/actions/flip/helpers.js +30 -17
- package/dist/interactions/actions/flip/helpers.js.map +1 -1
- package/dist/interactions/actions/hitSelection.js +8 -0
- package/dist/interactions/actions/hitSelection.js.map +1 -0
- package/dist/interactions/actions/lasso-select/behaviors/selectFromLasso.js +14 -18
- package/dist/interactions/actions/lasso-select/behaviors/selectFromLasso.js.map +1 -1
- package/dist/interactions/actions/move/behaviors/snapBackOrDelete.js +5 -5
- package/dist/interactions/actions/move/behaviors/snapBackOrDelete.js.map +1 -1
- package/dist/interactions/actions/move/behaviors/snapToContainer.js +32 -21
- package/dist/interactions/actions/move/behaviors/snapToContainer.js.map +1 -1
- package/dist/interactions/actions/move/gestureAdapter.js +32 -15
- package/dist/interactions/actions/move/gestureAdapter.js.map +1 -1
- package/dist/interactions/actions/move/landedDescendants.js +33 -0
- package/dist/interactions/actions/move/landedDescendants.js.map +1 -0
- package/dist/interactions/actions/outlines/createOutlines.js +18 -18
- package/dist/interactions/actions/poseDescriptorDep.js +16 -4
- package/dist/interactions/actions/poseDescriptorDep.js.map +1 -1
- package/dist/interactions/actions/poseFrame.js +11 -6
- package/dist/interactions/actions/poseFrame.js.map +1 -1
- package/dist/interactions/actions/previewOverrides.js +5 -5
- package/dist/interactions/actions/previewOverrides.js.map +1 -1
- package/dist/interactions/actions/selectionSubtree.js +69 -0
- package/dist/interactions/actions/selectionSubtree.js.map +1 -0
- package/dist/interactions/actions/useStandardActions.js +66 -62
- package/dist/interactions/actions/useStandardActions.js.map +1 -1
- package/dist/interactions/gestures/dragGesture/dragGesture.js +4 -7
- package/dist/interactions/gestures/dragGesture/dragGesture.js.map +1 -1
- package/dist/interactions/gestures/dragGesture/dragPointOf.js +23 -0
- package/dist/interactions/gestures/dragGesture/dragPointOf.js.map +1 -0
- package/dist/interactions/gestures/handleDrag/handleDrag.js +21 -26
- package/dist/interactions/gestures/handleDrag/handleDrag.js.map +1 -1
- package/dist/interactions/gestures/pointerDrag/pointerDrag.js +8 -6
- package/dist/interactions/gestures/pointerDrag/pointerDrag.js.map +1 -1
- package/dist/interactions/gestures/thresholdDrag/thresholdDrag.js +8 -4
- package/dist/interactions/gestures/thresholdDrag/thresholdDrag.js.map +1 -1
- package/dist/{math-Drrw4ewZ.d.ts → math-J-ACHyEg.d.ts} +1 -2
- package/dist/math.d.ts +2 -3
- package/dist/move.d.ts +12 -11
- package/dist/{originProjection-DEklpDc_.d.ts → originProjection-gHnOup4e.d.ts} +1 -1
- package/dist/{registerProgram-BMZRDgrh.d.ts → registerProgram-T9S_PfAX.d.ts} +18 -7
- package/dist/renderer/DrawCommand.js.map +1 -1
- package/dist/renderer/WeaselRenderer.js +75 -73
- package/dist/renderer/WeaselRenderer.js.map +1 -1
- package/dist/renderer/cache/GLImageCache.js +15 -5
- package/dist/renderer/cache/GLImageCache.js.map +1 -1
- package/dist/renderer/cache/GLMeshCache.js +23 -23
- package/dist/renderer/cache/GLMeshCache.js.map +1 -1
- package/dist/renderer/cache/GLTextureCache.js +18 -1
- package/dist/renderer/cache/GLTextureCache.js.map +1 -1
- package/dist/renderer/cache/cache.js.map +1 -1
- package/dist/renderer/cache/markerCommandCache.js.map +1 -1
- package/dist/renderer/cache/strokeMeshCache.js.map +1 -1
- package/dist/renderer/cullDrawCommands.js +11 -11
- package/dist/renderer/draw/batch.js +133 -0
- package/dist/renderer/draw/batch.js.map +1 -0
- package/dist/renderer/draw/clip.js +89 -0
- package/dist/renderer/draw/clip.js.map +1 -0
- package/dist/renderer/draw/customShader.js +230 -0
- package/dist/renderer/draw/customShader.js.map +1 -0
- package/dist/renderer/draw/drawTriangles.js +8 -0
- package/dist/renderer/draw/drawTriangles.js.map +1 -0
- package/dist/renderer/draw/effects.js +28 -0
- package/dist/renderer/draw/effects.js.map +1 -0
- package/dist/renderer/draw/flushBatch.js +35 -0
- package/dist/renderer/draw/flushBatch.js.map +1 -0
- package/dist/renderer/draw/gradient.js +90 -0
- package/dist/renderer/draw/gradient.js.map +1 -0
- package/dist/renderer/draw/image.js +38 -0
- package/dist/renderer/draw/image.js.map +1 -0
- package/dist/renderer/draw/mesh.js +16 -0
- package/dist/renderer/draw/mesh.js.map +1 -0
- package/dist/renderer/draw/paintBind.js +70 -0
- package/dist/renderer/draw/paintBind.js.map +1 -0
- package/dist/renderer/draw/pathPaint.js +142 -0
- package/dist/renderer/draw/pathPaint.js.map +1 -0
- package/dist/renderer/draw/scratchPass.js +83 -0
- package/dist/renderer/draw/scratchPass.js.map +1 -0
- package/dist/renderer/draw/stencil.js +28 -0
- package/dist/renderer/draw/stencil.js.map +1 -0
- package/dist/renderer/draw/text.js +167 -0
- package/dist/renderer/draw/text.js.map +1 -0
- package/dist/renderer/draw/uniforms.js +77 -0
- package/dist/renderer/draw/uniforms.js.map +1 -0
- package/dist/renderer/draw.js +60 -1116
- package/dist/renderer/draw.js.map +1 -1
- package/dist/renderer/effects/EffectTargets.js +3 -0
- package/dist/renderer/effects/EffectTargets.js.map +1 -1
- package/dist/renderer/effects/composite.js +7 -5
- package/dist/renderer/effects/composite.js.map +1 -1
- package/dist/renderer/index.js +18 -17
- package/dist/renderer/math/color.js +63 -83
- package/dist/renderer/math/color.js.map +1 -1
- package/dist/renderer/math/mat3.js +15 -11
- package/dist/renderer/math/mat3.js.map +1 -1
- package/dist/renderer/math/viewToMat3.js +1 -1
- package/dist/renderer/math/viewToMat3.js.map +1 -1
- package/dist/renderer/shaders/ShaderProgram.js +13 -13
- package/dist/renderer/shaders/ShaderProgram.js.map +1 -1
- package/dist/renderer/shaders/glyphPaint.js +3 -3
- package/dist/renderer/shaders/glyphPaint.js.map +1 -1
- package/dist/renderer/shaders/gradFill.js +2 -1
- package/dist/renderer/shaders/gradFill.js.map +1 -1
- package/dist/renderer/shaders/pathFill.js +2 -1
- package/dist/renderer/shaders/pathFill.js.map +1 -1
- package/dist/renderer/shaders/patternFill.js +2 -1
- package/dist/renderer/shaders/patternFill.js.map +1 -1
- package/dist/renderer/shaders/registerProgram.js.map +1 -1
- package/dist/renderer/strokeLengths.js.map +1 -1
- package/dist/renderer/textures/registerTexture.js +25 -5
- package/dist/renderer/textures/registerTexture.js.map +1 -1
- package/dist/renderer.d.ts +16 -15
- package/dist/renderer.js +17 -16
- package/dist/resize.d.ts +5 -6
- package/dist/resize.js +5 -5
- package/dist/style.css +1 -1
- package/dist/test-hook/install.js +12 -6
- package/dist/test-hook/install.js.map +1 -1
- package/dist/{test-seams-CuIxe0xY.d.ts → test-seams-DM2B87-g.d.ts} +4 -4
- package/dist/test-seams.d.ts +2 -2
- package/dist/tools/builtin/ellipse/useEllipseTool.js +1 -0
- package/dist/tools/builtin/ellipse/useEllipseTool.js.map +1 -1
- package/dist/tools/builtin/hand/useHandTool.js +1 -0
- package/dist/tools/builtin/hand/useHandTool.js.map +1 -1
- package/dist/tools/builtin/lasso/useLassoTool.js +11 -11
- package/dist/tools/builtin/lasso/useLassoTool.js.map +1 -1
- package/dist/tools/builtin/line/useLineTool.js +1 -0
- package/dist/tools/builtin/line/useLineTool.js.map +1 -1
- package/dist/tools/builtin/pen/usePenTool.js +153 -103
- package/dist/tools/builtin/pen/usePenTool.js.map +1 -1
- package/dist/tools/builtin/pencil/usePencilTool.js +1 -0
- package/dist/tools/builtin/pencil/usePencilTool.js.map +1 -1
- package/dist/tools/builtin/polygon/usePolygonTool.js +13 -8
- package/dist/tools/builtin/polygon/usePolygonTool.js.map +1 -1
- package/dist/tools/builtin/rect/useRectTool.js +1 -0
- package/dist/tools/builtin/rect/useRectTool.js.map +1 -1
- package/dist/tools/builtin/select/selectionContributions.js +24 -23
- package/dist/tools/builtin/select/selectionContributions.js.map +1 -1
- package/dist/tools/builtin/select/useSelectTool.js +51 -48
- package/dist/tools/builtin/select/useSelectTool.js.map +1 -1
- package/dist/tools/builtin/shared/pointerFollower.js +17 -0
- package/dist/tools/builtin/shared/pointerFollower.js.map +1 -0
- package/dist/tools/builtin/slice/useSliceTool.js +49 -54
- package/dist/tools/builtin/slice/useSliceTool.js.map +1 -1
- package/dist/tools/builtin/star/useStarTool.js +22 -16
- package/dist/tools/builtin/star/useStarTool.js.map +1 -1
- package/dist/tools/builtin/text/useTextTool.js +1 -0
- package/dist/tools/builtin/text/useTextTool.js.map +1 -1
- package/dist/tools/useKeybindings.js +14 -30
- package/dist/tools/useKeybindings.js.map +1 -1
- package/dist/{types-B_9g6hMM.d.ts → types-B4iJRHC3.d.ts} +5 -1
- package/dist/{types-A37hYkeR.d.ts → types-k-5Oqh-U.d.ts} +31 -7
- package/dist/util/color.js +3 -3
- package/dist/util/color.js.map +1 -1
- package/dist/util/paint.js.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +20 -18
- package/dist/autoPoseDescriptor-vCdt55xm.d.ts +0 -27
- package/dist/builtins-C-VgUlWI.d.ts +0 -4514
- package/dist/core/isPlainObject.js.map +0 -1
- package/dist/debug/flag.js.map +0 -1
- package/dist/interactions/actions/defaults/freshNodeId.js +0 -10
- package/dist/interactions/actions/defaults/freshNodeId.js.map +0 -1
- package/dist/renderer/shaders/imageFill.js +0 -14
- package/dist/renderer/shaders/imageFill.js.map +0 -1
- package/dist/tools/prefs.js +0 -62
- package/dist/tools/prefs.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animateOnSetPose.js","names":["animateOnSetPose","ms","opts","skipPredicate","id","from","to","adapter","pose","animator","springPose","tweenPose"],"sources":["../../../src/animation/wrappers/animateOnSetPose.ts"],"sourcesContent":["import { tweenPose, springPose } from '../poseHelpers';\nimport type { PoseDescriptor } from 'interactions/actions/resize/geometry';\nimport type { SceneAdapter } from 'core/adapters/types';\nimport type { Animator, EasingSpec, SpringPresetName } from '../types';\n\n/** Options for `animateOnSetPose`. */\nexport interface AnimateOnSetPoseOptions<TPose> {\n /** Default: 200ms tween with easeOut. */\n ms?: number;\n easing?: EasingSpec;\n /** Use a spring instead of a duration tween. Mutually exclusive with ms/easing. */\n spring?: {\n preset?: SpringPresetName;\n stiffness?: number;\n damping?: number;\n mass?: number;\n };\n geometry?: PoseDescriptor<TPose>;\n /** Predicate: return false to skip animation and write through immediately. */\n shouldAnimate?: (id: string, from: TPose, to: TPose) => boolean;\n /** Convenience: when true, auto-skip animation if the id is currently being\n * manipulated by an active gesture. Implementation: see `gestureScope` —\n * the wrapper consults a shared \"in-flight ids\" Set if one is provided,\n * otherwise this option is a no-op (treat as `shouldAnimate` returning true).\n * Mutually exclusive with `shouldAnimate`. */\n skipDuringGesture?: boolean;\n /** Optional: a Set the kit (or app) populates with ids currently being\n * manipulated by a gesture. When `skipDuringGesture` is true and the id\n * is in this Set, the wrapper writes through immediately. */\n gestureScope?: ReadonlySet<string>;\n /** Op label for the recorded transform op. Default: `'animate'`. */\n opLabel?: string;\n}\n\n/**\n * Wrap an adapter so every `setPose` animates to the new pose instead of\n * jumping to it. Anything that moves a node — a layout strategy, an action, a\n * consumer's own code — is animated without knowing it, since the adapter is\n * the single write path.\n *\n * Poses written from inside another animation's tick, and (optionally) poses\n * written for a node currently under a gesture, are passed straight through:\n * animating those would fight whatever is already driving the node.\n */\nexport function animateOnSetPose<TNode extends { id: string }, TPose>(\n adapter: SceneAdapter<TNode, TPose>,\n animator: Animator,\n opts: AnimateOnSetPoseOptions<TPose> = {},\n): SceneAdapter<TNode, TPose> {\n const ms = opts.ms ?? 200;\n const skipPredicate = (id: string, from: TPose, to: TPose): boolean => {\n if (opts.shouldAnimate) return !opts.shouldAnimate(id, from, to);\n if (opts.skipDuringGesture && opts.gestureScope?.has(id)) return true;\n return false;\n };\n\n return {\n ...adapter,\n setPose(id: string, pose: TPose): void {\n const from = adapter.getPose(id);\n if (skipPredicate(id, from, pose)) {\n adapter.setPose(id, pose);\n return;\n }\n // Re-entrant short-circuit (a): the caller IS another animation's tick\n // (momentum decay, in-flight tween, spring) writing setPose ~60×/sec.\n // Wrapping each call in a fresh 250ms tween fights the caller — the\n // new tween's t=0 sample writes back the previous `from`, undoing\n // this onTick — and when each wrap-tween settles, the very next\n // caller-tick spawns another, looping visibly forever (cards never\n // stop after a flick). Detect via animator.isTicking() and write\n // through.\n if (animator.isTicking()) {\n adapter.setPose(id, pose);\n return;\n }\n
|
|
1
|
+
{"version":3,"file":"animateOnSetPose.js","names":["animateOnSetPose","ms","opts","skipPredicate","id","from","to","adapter","instantPoseWrite","pose","animator","springPose","tweenPose"],"sources":["../../../src/animation/wrappers/animateOnSetPose.ts"],"sourcesContent":["import { tweenPose, springPose } from '../poseHelpers';\nimport { instantPoseWrite } from './instantPose';\nimport type { PoseDescriptor } from 'interactions/actions/resize/geometry';\nimport type { SceneAdapter } from 'core/adapters/types';\nimport type { Animator, EasingSpec, SpringPresetName } from '../types';\n\n/** Options for `animateOnSetPose`. */\nexport interface AnimateOnSetPoseOptions<TPose> {\n /** Default: 200ms tween with easeOut. */\n ms?: number;\n easing?: EasingSpec;\n /** Use a spring instead of a duration tween. Mutually exclusive with ms/easing. */\n spring?: {\n preset?: SpringPresetName;\n stiffness?: number;\n damping?: number;\n mass?: number;\n };\n geometry?: PoseDescriptor<TPose>;\n /** Predicate: return false to skip animation and write through immediately. */\n shouldAnimate?: (id: string, from: TPose, to: TPose) => boolean;\n /** Convenience: when true, auto-skip animation if the id is currently being\n * manipulated by an active gesture. Implementation: see `gestureScope` —\n * the wrapper consults a shared \"in-flight ids\" Set if one is provided,\n * otherwise this option is a no-op (treat as `shouldAnimate` returning true).\n * Mutually exclusive with `shouldAnimate`. */\n skipDuringGesture?: boolean;\n /** Optional: a Set the kit (or app) populates with ids currently being\n * manipulated by a gesture. When `skipDuringGesture` is true and the id\n * is in this Set, the wrapper writes through immediately. */\n gestureScope?: ReadonlySet<string>;\n /** Op label for the recorded transform op. Default: `'animate'`. */\n opLabel?: string;\n}\n\n/**\n * Wrap an adapter so every `setPose` animates to the new pose instead of\n * jumping to it. Anything that moves a node — a layout strategy, an action, a\n * consumer's own code — is animated without knowing it, since the adapter is\n * the single write path.\n *\n * Poses written from inside another animation's tick, and (optionally) poses\n * written for a node currently under a gesture, are passed straight through:\n * animating those would fight whatever is already driving the node.\n *\n * Writing a node again while its glide is still running ends the glide: the\n * new pose is written at once and stands.\n */\nexport function animateOnSetPose<TNode extends { id: string }, TPose>(\n adapter: SceneAdapter<TNode, TPose>,\n animator: Animator,\n opts: AnimateOnSetPoseOptions<TPose> = {},\n): SceneAdapter<TNode, TPose> {\n const ms = opts.ms ?? 200;\n const skipPredicate = (id: string, from: TPose, to: TPose): boolean => {\n if (opts.shouldAnimate) return !opts.shouldAnimate(id, from, to);\n if (opts.skipDuringGesture && opts.gestureScope?.has(id)) return true;\n return false;\n };\n\n return {\n ...adapter,\n ...instantPoseWrite(adapter),\n setPose(id: string, pose: TPose): void {\n const from = adapter.getPose(id);\n if (skipPredicate(id, from, pose)) {\n adapter.setPose(id, pose);\n return;\n }\n // Re-entrant short-circuit (a): the caller IS another animation's tick\n // (momentum decay, in-flight tween, spring) writing setPose ~60×/sec.\n // Wrapping each call in a fresh 250ms tween fights the caller — the\n // new tween's t=0 sample writes back the previous `from`, undoing\n // this onTick — and when each wrap-tween settles, the very next\n // caller-tick spawns another, looping visibly forever (cards never\n // stop after a flick). Detect via animator.isTicking() and write\n // through.\n if (animator.isTicking()) {\n adapter.setPose(id, pose);\n return;\n }\n if (animator.isActive('pose:' + id)) {\n animator.cancelKey('pose:' + id);\n adapter.setPose(id, pose);\n return;\n }\n if (opts.spring) {\n springPose(animator, adapter as never, {\n id,\n to: pose,\n preset: opts.spring.preset,\n stiffness: opts.spring.stiffness,\n damping: opts.spring.damping,\n mass: opts.spring.mass,\n geometry: opts.geometry,\n opLabel: opts.opLabel,\n });\n } else {\n tweenPose(animator, adapter as never, {\n id,\n to: pose,\n ms,\n easing: opts.easing,\n geometry: opts.geometry,\n opLabel: opts.opLabel,\n });\n }\n },\n };\n}\n"],"mappings":";;;AAgDA,SAAgBA,EACd,GACA,GACA,IAAuC,CAAC,GACZ;CAC5B,IAAMC,IAAKC,EAAK,MAAM,KAChBC,KAAiB,GAAY,GAAa,MAC1CD,EAAK,gBAAsB,CAACA,EAAK,cAAcE,GAAIC,GAAMC,CAAE,IAC/D,GAAIJ,EAAK,qBAAqBA,EAAK,cAAc,IAAIE,CAAE;CAIzD,OAAO;EACL,GAAGG;EACH,GAAGC,EAAiBD,CAAO;EAC3B,QAAQ,GAAY,GAAmB;GACrC,IAAMF,IAAOE,EAAQ,QAAQH,CAAE;GAC/B,IAAID,EAAcC,GAAIC,GAAMI,CAAI,GAAG;IACjC,EAAQ,QAAQL,GAAIK,CAAI;IACxB;GACF;GASA,IAAIC,EAAS,UAAU,GAAG;IACxB,EAAQ,QAAQN,GAAIK,CAAI;IACxB;GACF;GACA,IAAIC,EAAS,SAAS,UAAUN,CAAE,GAAG;IAEnC,AADAM,EAAS,UAAU,UAAUN,CAAE,GAC/BG,EAAQ,QAAQH,GAAIK,CAAI;IACxB;GACF;GACA,AAAIP,EAAK,SACPS,EAAWD,GAAUH,GAAkB;IACrC;IACA,IAAIE;IACJ,QAAQP,EAAK,OAAO;IACpB,WAAWA,EAAK,OAAO;IACvB,SAASA,EAAK,OAAO;IACrB,MAAMA,EAAK,OAAO;IAClB,UAAUA,EAAK;IACf,SAASA,EAAK;GAChB,CAAC,IAEDU,EAAUF,GAAUH,GAAkB;IACpC;IACA,IAAIE;IACJ;IACA,QAAQP,EAAK;IACb,UAAUA,EAAK;IACf,SAASA,EAAK;GAChB,CAAC;EAEL;CACF;AACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/animation/wrappers/instantPose.ts
|
|
2
|
+
var e = Symbol("weasel.setPoseInstant");
|
|
3
|
+
function t(t) {
|
|
4
|
+
return { [e]: (e, r) => n(t, e, r) };
|
|
5
|
+
}
|
|
6
|
+
function n(t, n, r) {
|
|
7
|
+
let i = t[e];
|
|
8
|
+
i ? i(n, r) : t.setPose(n, r);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t as instantPoseWrite, n as setPoseInstant };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=instantPose.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instantPose.js","names":["INSTANT","instantPoseWrite","setPoseInstant","inner","id","pose","instant","adapter"],"sources":["../../../src/animation/wrappers/instantPose.ts"],"sourcesContent":["import type { SceneAdapter } from 'core/adapters/types';\n\nconst INSTANT = Symbol('weasel.setPoseInstant');\n\ntype PoseWrite<TPose> = (id: string, pose: TPose) => void;\ntype WithInstant<TPose> = { [INSTANT]?: PoseWrite<TPose> };\n\n/** The member an adapter wrapper that animates `setPose` spreads into what it\n * returns, so the write that does not animate survives any wrapper above it\n * that copies the adapter. */\nexport function instantPoseWrite<TNode extends { id: string }, TPose>(\n inner: SceneAdapter<TNode, TPose>,\n): object {\n return { [INSTANT]: (id: string, pose: TPose) => setPoseInstant(inner, id, pose) };\n}\n\n/** Write a pose at once, past every wrapper that would animate it. */\nexport function setPoseInstant<TNode extends { id: string }, TPose>(\n adapter: SceneAdapter<TNode, TPose>,\n id: string,\n pose: TPose,\n): void {\n const instant = (adapter as WithInstant<TPose>)[INSTANT];\n if (instant) instant(id, pose);\n else adapter.setPose(id, pose);\n}\n"],"mappings":";AAEA,IAAMA,IAAU,OAAO,uBAAuB;AAQ9C,SAAgBC,EACd,GACQ;CACR,OAAO,GAAGD,KAAW,GAAY,MAAgBE,EAAeC,GAAOC,GAAIC,CAAI,EAAE;AACnF;AAGA,SAAgBH,EACd,GACA,GACA,GACM;CACN,IAAMI,IAAWC,EAA+BP;CAChD,AAAIM,IAASA,EAAQF,GAAIC,CAAI,IACxBE,EAAQ,QAAQH,GAAIC,CAAI;AAC/B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Path } from '@weasel-js/geom';
|
|
1
2
|
import { Bounds } from '@weasel-js/routing';
|
|
2
3
|
|
|
3
4
|
/** `Bounds` with a required rotation angle (radians). Pivot is the AABB
|
|
@@ -73,11 +74,35 @@ declare const RECT_POSE_DESCRIPTOR: PoseDescriptor<Bounds>;
|
|
|
73
74
|
* preserves the `rotation` field via `...p` spread). Adds `getRotation` so
|
|
74
75
|
* `useResize` knows to take the rotation-aware math path. */
|
|
75
76
|
declare const ROTATED_POSE_DESCRIPTOR: PoseDescriptor<RotatedPose>;
|
|
76
|
-
/** The pose's visual bounds: its
|
|
77
|
-
*
|
|
77
|
+
/** The pose's visual bounds: its box expanded to cover the box as drawn
|
|
78
|
+
* under its rotation and `transform`, so a turned or skewed shape reports
|
|
79
|
+
* the extent of its ink. */
|
|
78
80
|
declare function visualBoundsViaDescriptor<TPose>(pose: TPose, geometry: PoseDescriptor<TPose>): Bounds;
|
|
79
81
|
/** Translate through `geometry.translate`, or via `remapBounds` onto a shifted
|
|
80
82
|
* copy of the pose's own bounds when the descriptor has none. */
|
|
81
83
|
declare function translatePoseViaDescriptor<TPose>(pose: TPose, dx: number, dy: number, geometry: PoseDescriptor<TPose>): TPose;
|
|
82
84
|
|
|
83
|
-
|
|
85
|
+
/** True for Path-shaped poses (`{kind: 'polygon' | 'rect'}`). Useful for
|
|
86
|
+
* callers that need to fork between `pathPoseDescriptor` and
|
|
87
|
+
* `RECT_POSE_DESCRIPTOR` without forcing the consumer to wire
|
|
88
|
+
* `poseDescriptor` explicitly. */
|
|
89
|
+
declare function isPathLike(p: unknown): p is Path;
|
|
90
|
+
/** True for a pose with numeric top-level `x`/`y`/`width`/`height` — the only
|
|
91
|
+
* shape the rect descriptor and the kit's built-in painters can read. */
|
|
92
|
+
declare function isRectPose(p: unknown): p is {
|
|
93
|
+
x: number;
|
|
94
|
+
y: number;
|
|
95
|
+
width: number;
|
|
96
|
+
height: number;
|
|
97
|
+
rotation?: number;
|
|
98
|
+
};
|
|
99
|
+
/** Per-call dispatch: if the pose looks like a Path, route to
|
|
100
|
+
* `pathPoseDescriptor`; otherwise treat as a plain rect pose. Avoids forcing
|
|
101
|
+
* demos with Path TPose to wire `poseDescriptor={pathPoseDescriptor}`
|
|
102
|
+
* explicitly. `getRotation` surfaces a `pose.rotation` field on non-Path poses
|
|
103
|
+
* so demos using rect-with-rotation shapes (e.g. `RotatedPose`) don't have to
|
|
104
|
+
* wire `poseDescriptor={ROTATED_POSE_DESCRIPTOR}` just to get rotated
|
|
105
|
+
* selection chrome and rotation-aware corner hit-tests. */
|
|
106
|
+
declare const AUTO_POSE_DESCRIPTOR: PoseDescriptor<unknown>;
|
|
107
|
+
|
|
108
|
+
export { AUTO_POSE_DESCRIPTOR as A, type PoseDescriptor as P, RECT_POSE_DESCRIPTOR as R, ROTATED_POSE_DESCRIPTOR as a, isRectPose as b, type RotatedPose as c, isPathLike as i, poseDescriptorForNode as p, translatePoseViaDescriptor as t, visualBoundsViaDescriptor as v };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useSelection as e } from "../core/selection/useSelection.js";
|
|
2
|
+
import { annulusSemiAxes as t, hitAffordanceRegions as n, pointRegionFrame as r } from "../affordances/hitAffordanceRegions.js";
|
|
3
|
+
import { createCornerResizeAffordance as i } from "../affordances/cornerResize.js";
|
|
4
|
+
import { createRotationAffordance as a } from "../affordances/rotationHandle.js";
|
|
5
|
+
import { PATH_ANCHOR_CHROME_ID as o, createPathAnchorAffordances as s } from "../affordances/pathAnchors.js";
|
|
6
|
+
import { actionIs as c, always as l, and as u, canHover as d, capabilityAll as f, capabilityIn as p, capabilityIs as m, capabilityNot as h, coarsePointer as g, cond as _, focused as v, gesturing as y, hovering as b, hoveringSelected as x, modeIn as S, modeIs as C, modeNot as w, modifierHeld as T, multiActive as E, never as D, not as O, or as k, selectionAtLeast as A, selectionEmpty as j, selectionIs as M, when as N, zoomAtLeast as P } from "../features/chrome-caps/conditions.js";
|
|
7
|
+
import { defaultVisibilityRules as F } from "../features/chrome-caps/defaults.js";
|
|
8
|
+
import { resolveVisibility as I } from "../features/chrome-caps/resolve.js";
|
|
9
|
+
import { buildChromeCtx as L } from "../features/chrome-caps/buildChromeCtx.js";
|
|
10
|
+
import { useHoverTracking as R } from "../features/chrome-caps/useHoverTracking.js";
|
|
11
|
+
import { ALWAYS as z, DEFAULT_ALLOWED_CAPABILITIES as B, NEVER as V, buildRuleCtx as H, describeRule as U, evaluate as W } from "../features/chrome-caps/index.js";
|
|
12
|
+
import { SelectionContextProvider as G, SelectionContextProviderIfRoot as K, usePublishSelection as q, useSelectionContext as J } from "../features/selection/SelectionContext.js";
|
|
13
|
+
import { composeSelectionPose as Y, createSelectionHandlesLayer as X, createSelectionOutlineLayer as Z, createSelectionOverlayLayer as Q } from "../features/selection/overlay.js";
|
|
14
|
+
import { composeAffordanceLayer as $ } from "../affordances/composeAffordanceLayer.js";
|
|
15
|
+
import { ANGLE_RADIANS as ee, IMPERIAL_INCHES as te, METRIC_MM as ne, PIXELS as re, formatUnit as ie, resolveUnit as ae, unitScale as oe } from "@weasel-js/quantity";
|
|
16
|
+
export { z as ALWAYS, ee as ANGLE_RADIANS, B as DEFAULT_ALLOWED_CAPABILITIES, te as IMPERIAL_INCHES, ne as METRIC_MM, V as NEVER, o as PATH_ANCHOR_CHROME_ID, re as PIXELS, G as SelectionContextProvider, K as SelectionContextProviderIfRoot, c as actionIs, l as always, u as and, t as annulusSemiAxes, L as buildChromeCtx, H as buildRuleCtx, d as canHover, f as capabilityAll, p as capabilityIn, m as capabilityIs, h as capabilityNot, g as coarsePointer, $ as composeAffordanceLayer, Y as composeSelectionPose, _ as cond, i as createCornerResizeAffordance, s as createPathAnchorAffordances, a as createRotationAffordance, X as createSelectionHandlesLayer, Z as createSelectionOutlineLayer, Q as createSelectionOverlayLayer, F as defaultVisibilityRules, U as describeRule, W as evaluate, v as focused, ie as formatUnit, y as gesturing, n as hitAffordanceRegions, b as hovering, x as hoveringSelected, S as modeIn, C as modeIs, w as modeNot, T as modifierHeld, E as multiActive, D as never, O as not, k as or, r as pointRegionFrame, ae as resolveUnit, I as resolveVisibility, A as selectionAtLeast, j as selectionEmpty, M as selectionIs, oe as unitScale, R as useHoverTracking, q as usePublishSelection, e as useSelection, J as useSelectionContext, N as when, P as zoomAtLeast };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { releaseCanvasRenderer as e } from "../canvas/canvasRenderer.js";
|
|
2
|
+
import { buildSceneViewCommands as t, renderSceneToCanvas as n } from "../canvas/sceneViewRender.js";
|
|
3
|
+
import { PointerContextProvider as r, createPointerStore as i, usePointerContext as a, usePointerPosition as o } from "../features/pointer/PointerContext.js";
|
|
4
|
+
import { PointerProviderIfRoot as s } from "../canvas/SceneCanvas/PointerProviderIfRoot.js";
|
|
5
|
+
import { FALLBACK_FIT_VIEW as c, computeFitView as l, computeIndicatorCommand as u } from "../canvas/minimapMath.js";
|
|
6
|
+
import { forEachCoalesced as d, getStylusData as f, pressureToWidth as p } from "../core/stylus/stylus.js";
|
|
7
|
+
import { usePointerStylus as m } from "../core/stylus/usePointerStylus.js";
|
|
8
|
+
import { createKeyState as h } from "../input/keyState.js";
|
|
9
|
+
import { useKeyState as g } from "../input/useKeyState.js";
|
|
10
|
+
import { useKeyModifiers as _ } from "../input/useKeyModifiers.js";
|
|
11
|
+
import { LONG_PRESS_FEEDBACK_ID as v, createLongPressFeedbackContribution as y } from "../features/longPress/longPressFeedback.js";
|
|
12
|
+
import { renderNeeds as b } from "../canvas/renderNeeds.js";
|
|
13
|
+
import { createRasterSession as x, planPixelRender as S, renderSceneToPixels as C, warmRender as w } from "../canvas/renderSceneToPixels.js";
|
|
14
|
+
import { debugSnapshotArgs as T, renderDebugSnapshot as E } from "../canvas/renderDebugSnapshot.js";
|
|
15
|
+
import { rasterToPng as D } from "../canvas/rasterToPng.js";
|
|
16
|
+
import { ActionsProviderIfRoot as O } from "../canvas/SceneCanvas/ActionsProviderIfRoot.js";
|
|
17
|
+
import { DepRegistryProviderIfRoot as k } from "../canvas/SceneCanvas/DepRegistryProviderIfRoot.js";
|
|
18
|
+
import { LONG_PRESS_MS as A, activatesFocusedControl as j, createLongPressStore as M, historyKey as N, isEditableTarget as P, matchesKeyBinding as F } from "@weasel-js/routing";
|
|
19
|
+
export { O as ActionsProviderIfRoot, k as DepRegistryProviderIfRoot, c as FALLBACK_FIT_VIEW, v as LONG_PRESS_FEEDBACK_ID, A as LONG_PRESS_MS, r as PointerContextProvider, s as PointerProviderIfRoot, j as activatesFocusedControl, t as buildSceneViewCommands, l as computeFitView, u as computeIndicatorCommand, h as createKeyState, y as createLongPressFeedbackContribution, M as createLongPressStore, i as createPointerStore, x as createRasterSession, T as debugSnapshotArgs, d as forEachCoalesced, f as getStylusData, N as historyKey, P as isEditableTarget, F as matchesKeyBinding, S as planPixelRender, p as pressureToWidth, D as rasterToPng, e as releaseCanvasRenderer, E as renderDebugSnapshot, b as renderNeeds, n as renderSceneToCanvas, C as renderSceneToPixels, _ as useKeyModifiers, g as useKeyState, a as usePointerContext, o as usePointerPosition, m as usePointerStylus, w as warmRender };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import "../interactions/gestures/handleDrag/handleDrag.js";
|
|
2
|
+
import "../interactions/gestures/thresholdDrag/thresholdDrag.js";
|
|
3
|
+
import { RECT_POSE_DESCRIPTOR as e, ROTATED_POSE_DESCRIPTOR as t, poseDescriptorForNode as n, translatePoseViaDescriptor as r, visualBoundsViaDescriptor as i } from "../core/geometry/poseDescriptor.js";
|
|
4
|
+
import { springPose as a, tweenPose as o } from "../animation/poseHelpers.js";
|
|
5
|
+
import { sampleTrack as s } from "../animation/timeline/sampleTrack.js";
|
|
6
|
+
import { ColorOverrideRegistry as c } from "../animation/colorRegistry.js";
|
|
7
|
+
import { useAnimator as l } from "../animation/useAnimator.js";
|
|
8
|
+
import { AUTO_POSE_DESCRIPTOR as u, isPathLike as d, isRectPose as f } from "../interactions/actions/resize/autoPoseDescriptor.js";
|
|
9
|
+
import { cornerResizeHandles as p, fixedCornerOf as m, hitCornerHandle as h } from "../interactions/actions/resize/cornerHandles.js";
|
|
10
|
+
import { enumerateAnchors as g, withCoord as _ } from "../interactions/actions/edit-anchors/geometry.js";
|
|
11
|
+
import { aabbCenter as v, pointInRotatedRect as y, rectCorners as b, rotatePoint as x, rotatedRectCorners as S } from "../interactions/actions/rotate/geometry.js";
|
|
12
|
+
import { gesturePlaneReader as C, gestureViewReader as w, screenTolerance as T } from "../interactions/gestures/shared/screenTolerance.js";
|
|
13
|
+
import { WEASEL_CLIPBOARD_MIME as E, WEASEL_CLIPBOARD_MIME_WEB as D, buildWeaselClipboardText as O, embedWeaselMetadataInSvg as k, extractWeaselClipboardFromSvg as A, parseWeaselClipboardText as j, sniffWeaselClipboardText as M } from "../interactions/actions/clipboard/wireFormat.js";
|
|
14
|
+
import { resolveSpatialReference as N } from "../interactions/actions/spatialReference.js";
|
|
15
|
+
import { alignDeltaFor as P, alignTargetBounds as F, useAlign as I } from "../interactions/actions/align/align.js";
|
|
16
|
+
import { DEFAULT_ROTATION_HANDLE_DISTANCE as L, hitRotationHandle as R, rotationHandle as z } from "../interactions/actions/rotate/handle.js";
|
|
17
|
+
import { AUTO_ORIGIN_PROJECTION as B, RECT_ORIGIN_PROJECTION as V } from "../interactions/gestures/shared/originProjection.js";
|
|
18
|
+
import { snap as H } from "../interactions/gestures/shared/snap.js";
|
|
19
|
+
import { useDragGesture as U } from "../interactions/gestures/dragGesture/dragGesture.js";
|
|
20
|
+
import { dragPointOf as W } from "../interactions/gestures/dragGesture/dragPointOf.js";
|
|
21
|
+
import { useDragRect as G } from "../interactions/gestures/dragRect/dragRect.js";
|
|
22
|
+
import { useDragRadial as K } from "../interactions/gestures/dragRadial/dragRadial.js";
|
|
23
|
+
import { hitAnchor as q } from "../interactions/actions/edit-anchors/handles.js";
|
|
24
|
+
import { useClipboardOps as J } from "../interactions/actions/clipboard/clipboardOps.js";
|
|
25
|
+
import { useDistribute as Y } from "../interactions/actions/distribute/distribute.js";
|
|
26
|
+
import { cloneByAltDrag as X } from "../interactions/actions/clone/behaviors/cloneByAltDrag.js";
|
|
27
|
+
import { animateOnSetPose as Z } from "../animation/wrappers/animateOnSetPose.js";
|
|
28
|
+
import { animateLifecycle as Q } from "../animation/wrappers/animateLifecycle.js";
|
|
29
|
+
import { createReflowTransition as $, useAnimatedReflow as ee } from "../animation/reflow.js";
|
|
30
|
+
import { momentum as te } from "../animation/behaviors/momentum.js";
|
|
31
|
+
import { createSlew as ne, slewToward as re } from "../animation/slew.js";
|
|
32
|
+
import { cycleVertexColors as ie, rainbowVertexColors as ae, solidVertexColors as oe, springVertexColors as se, staggerVertexColors as ce, tweenVertexColors as le } from "../animation/colorHelpers.js";
|
|
33
|
+
import { IDENTITY_JOINT as ue } from "../animation/rig/types.js";
|
|
34
|
+
import { blendPoses as de } from "../animation/rig/blendPoses.js";
|
|
35
|
+
import { mirrorPose as fe } from "../animation/rig/mirrorPose.js";
|
|
36
|
+
import { resolveSkeleton as pe } from "../animation/rig/resolveSkeleton.js";
|
|
37
|
+
import { bindRig as me, rigidRigApply as he } from "../animation/rig/bindRig.js";
|
|
38
|
+
import { solveIk as ge } from "../animation/rig/solveIk.js";
|
|
39
|
+
import { useRig as _e } from "../animation/rig/useRig.js";
|
|
40
|
+
import { EASINGS as ve, SPRING_PRESETS as ye, cubicBezierEasing as be, easeIn as xe, easeInBack as Se, easeInBounce as Ce, easeInCirc as we, easeInCubic as Te, easeInElastic as Ee, easeInExpo as De, easeInOut as Oe, easeInOutBack as ke, easeInOutBounce as Ae, easeInOutCirc as je, easeInOutCubic as Me, easeInOutElastic as Ne, easeInOutExpo as Pe, easeInOutQuad as Fe, easeInOutQuart as Ie, easeInOutQuint as Le, easeInOutSine as Re, easeInQuad as ze, easeInQuart as Be, easeInQuint as Ve, easeInSine as He, easeOut as Ue, easeOutBack as We, easeOutBounce as Ge, easeOutCirc as Ke, easeOutCubic as qe, easeOutElastic as Je, easeOutExpo as Ye, easeOutQuad as Xe, easeOutQuart as Ze, easeOutQuint as Qe, easeOutSine as $e, hexToOklchDeg as et, hslToSrgb as tt, interpolateSrgb as nt, lerpColorArray as rt, lerpOklab as it, lerpOklch as at, linear as ot, linearSrgbToOklab as st, linearToSrgb as ct, oklabToLinearSrgb as lt, oklabToOklch as ut, oklabToSrgbU8 as dt, oklchDegToHex as ft, oklchToOklab as pt, resolveEasing as mt, srgbFloatToOklab as ht, srgbToHsl as gt, srgbToLinear as _t, srgbU8ToOklab as vt } from "../animation/index.js";
|
|
41
|
+
import { CONTROL_SELECTOR as yt, DRAG_THRESHOLD_PX as bt, isInControlWithin as xt, openPointerSession as St, pastDragThreshold as Ct } from "@weasel-js/routing";
|
|
42
|
+
export { B as AUTO_ORIGIN_PROJECTION, u as AUTO_POSE_DESCRIPTOR, yt as CONTROL_SELECTOR, c as ColorOverrideRegistry, L as DEFAULT_ROTATION_HANDLE_DISTANCE, bt as DRAG_THRESHOLD_PX, ve as EASINGS, ue as IDENTITY_JOINT, V as RECT_ORIGIN_PROJECTION, e as RECT_POSE_DESCRIPTOR, t as ROTATED_POSE_DESCRIPTOR, ye as SPRING_PRESETS, E as WEASEL_CLIPBOARD_MIME, D as WEASEL_CLIPBOARD_MIME_WEB, v as aabbCenter, P as alignDeltaFor, F as alignTargetBounds, Q as animateLifecycle, Z as animateOnSetPose, me as bindRig, de as blendPoses, O as buildWeaselClipboardText, X as cloneByAltDrag, p as cornerResizeHandles, $ as createReflowTransition, ne as createSlew, be as cubicBezierEasing, ie as cycleVertexColors, W as dragPointOf, xe as easeIn, Se as easeInBack, Ce as easeInBounce, we as easeInCirc, Te as easeInCubic, Ee as easeInElastic, De as easeInExpo, Oe as easeInOut, ke as easeInOutBack, Ae as easeInOutBounce, je as easeInOutCirc, Me as easeInOutCubic, Ne as easeInOutElastic, Pe as easeInOutExpo, Fe as easeInOutQuad, Ie as easeInOutQuart, Le as easeInOutQuint, Re as easeInOutSine, ze as easeInQuad, Be as easeInQuart, Ve as easeInQuint, He as easeInSine, Ue as easeOut, We as easeOutBack, Ge as easeOutBounce, Ke as easeOutCirc, qe as easeOutCubic, Je as easeOutElastic, Ye as easeOutExpo, Xe as easeOutQuad, Ze as easeOutQuart, Qe as easeOutQuint, $e as easeOutSine, k as embedWeaselMetadataInSvg, g as enumerateAnchors, A as extractWeaselClipboardFromSvg, m as fixedCornerOf, C as gesturePlaneReader, w as gestureViewReader, et as hexToOklchDeg, q as hitAnchor, h as hitCornerHandle, R as hitRotationHandle, tt as hslToSrgb, nt as interpolateSrgb, xt as isInControlWithin, d as isPathLike, f as isRectPose, rt as lerpColorArray, it as lerpOklab, at as lerpOklch, ot as linear, st as linearSrgbToOklab, ct as linearToSrgb, fe as mirrorPose, te as momentum, lt as oklabToLinearSrgb, ut as oklabToOklch, dt as oklabToSrgbU8, ft as oklchDegToHex, pt as oklchToOklab, St as openPointerSession, j as parseWeaselClipboardText, Ct as pastDragThreshold, y as pointInRotatedRect, n as poseDescriptorForNode, ae as rainbowVertexColors, b as rectCorners, mt as resolveEasing, pe as resolveSkeleton, N as resolveSpatialReference, he as rigidRigApply, x as rotatePoint, S as rotatedRectCorners, z as rotationHandle, s as sampleTrack, T as screenTolerance, re as slewToward, H as snap, M as sniffWeaselClipboardText, oe as solidVertexColors, ge as solveIk, a as springPose, se as springVertexColors, ht as srgbFloatToOklab, gt as srgbToHsl, _t as srgbToLinear, vt as srgbU8ToOklab, ce as staggerVertexColors, r as translatePoseViaDescriptor, o as tweenPose, le as tweenVertexColors, I as useAlign, ee as useAnimatedReflow, l as useAnimator, J as useClipboardOps, Y as useDistribute, U as useDragGesture, K as useDragRadial, G as useDragRect, _e as useRig, i as visualBoundsViaDescriptor, _ as withCoord };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { hexToRgba as e, normalizeHex as t, parseColor as n, parseColorToRgba255 as r, resolveColor as i, rgbaToHex as a } from "../renderer/math/color.js";
|
|
2
|
+
import { gradientForBounds as o, gradientGeometry as s, isGradientFill as c, sampleGradientStops as l, withGradientKind as u } from "../core/gradient.js";
|
|
3
|
+
import { asPaint as d, getPaintKind as f, isPaintKindKnown as p, listGradientKinds as m, listPaintKinds as h, paintKindOf as g, paintKindRegistry as _, registerPaintKind as v, registerPaintKindLoader as y, switchGradientKind as b, warmPaintKinds as x } from "../core/paintKinds.js";
|
|
4
|
+
import { resolveStrokeWidth as S } from "../features/paths/tessellate/stroke.js";
|
|
5
|
+
import { BUILTIN_MARKERS as C } from "../core/strokeMarkerShapes.js";
|
|
6
|
+
import { getMarker as w, listMarkers as T, markerRegistry as E, registerMarker as D } from "../core/strokeMarkers.js";
|
|
7
|
+
import { markerInset as O, markerKeyOf as k, resolveMarkerSize as A, strokeInsets as j } from "../core/markerInset.js";
|
|
8
|
+
import { markerSites as M } from "../features/paths/markerSites.js";
|
|
9
|
+
import { fillInPoseFrame as N, fillToBoundsFrame as P } from "../core/fillInPoseFrame.js";
|
|
10
|
+
import { isPatternSpec as F, resolveFillPattern as I, resolvePatternSpec as L } from "../features/patterns/resolveSpec.js";
|
|
11
|
+
import { commandFill as R, commandStroke as z } from "../features/patterns/commandPaint.js";
|
|
12
|
+
import { getAlpha01 as B, mergeAlphaFromPrev as V, toHex8 as H, withAlpha01 as U } from "../util/color.js";
|
|
13
|
+
import { DEFAULT_FILL_COLOR as W, DEFAULT_PALETTE as G, DEFAULT_SHAPE_FILL as K, DEFAULT_STROKE_COLOR as q, GHOST_STROKE as J, cycleFill as Y, paintAlpha as X, paintWithAlpha as Z, paintWithColor as Q, solid as $, strokeOf as ee, strokeWith as te } from "../util/paint.js";
|
|
14
|
+
import { createTilePattern as ne } from "../features/patterns/index.js";
|
|
15
|
+
import { useGradientKinds as re, usePaintKind as ie, usePaintKinds as ae } from "../core/usePaintKinds.js";
|
|
16
|
+
import { STROKE_DASH_RATIOS as oe, alignedStrokeRect as se, composePatternTransform as ce, contrastLineColor as le, dashForStrokeStyle as ue, decomposePatternTransform as de, hexToRgbBytes as fe, parseHexBytes as pe, resolveScreenLength as me, strokeDashStyleOf as he } from "@weasel-js/paint";
|
|
17
|
+
import { trimPolyline as ge } from "@weasel-js/geom/tessellate";
|
|
18
|
+
export { C as BUILTIN_MARKERS, W as DEFAULT_FILL_COLOR, G as DEFAULT_PALETTE, K as DEFAULT_SHAPE_FILL, q as DEFAULT_STROKE_COLOR, J as GHOST_STROKE, oe as STROKE_DASH_RATIOS, se as alignedStrokeRect, d as asPaint, R as commandFill, z as commandStroke, ce as composePatternTransform, le as contrastLineColor, ne as createTilePattern, Y as cycleFill, ue as dashForStrokeStyle, de as decomposePatternTransform, N as fillInPoseFrame, P as fillToBoundsFrame, B as getAlpha01, w as getMarker, f as getPaintKind, o as gradientForBounds, s as gradientGeometry, fe as hexToRgbBytes, e as hexToRgba, c as isGradientFill, p as isPaintKindKnown, F as isPatternSpec, m as listGradientKinds, T as listMarkers, h as listPaintKinds, O as markerInset, k as markerKeyOf, E as markerRegistry, M as markerSites, V as mergeAlphaFromPrev, t as normalizeHex, X as paintAlpha, g as paintKindOf, _ as paintKindRegistry, Z as paintWithAlpha, Q as paintWithColor, n as parseColor, r as parseColorToRgba255, pe as parseHexBytes, D as registerMarker, v as registerPaintKind, y as registerPaintKindLoader, i as resolveColor, I as resolveFillPattern, A as resolveMarkerSize, L as resolvePatternSpec, me as resolveScreenLength, S as resolveStrokeWidth, a as rgbaToHex, l as sampleGradientStops, $ as solid, he as strokeDashStyleOf, j as strokeInsets, ee as strokeOf, te as strokeWith, b as switchGradientKind, H as toHex8, ge as trimPolyline, re as useGradientKinds, ie as usePaintKind, ae as usePaintKinds, x as warmPaintKinds, U as withAlpha01, u as withGradientKind };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { poseRotationOf as e, rotatePathAround as t } from "../core/geometry/poseRotation.js";
|
|
2
|
+
import { pathThroughPoseFrame as n, poseFrameInverseOf as r, poseFrameOf as i, poseLinearOf as a } from "../core/geometry/poseFrame.js";
|
|
3
|
+
import { pathPoseDescriptor as o } from "../features/paths/poseDescriptor.js";
|
|
4
|
+
import { countPathAnchors as s, pathToAnchors as c } from "../features/paths/anchors.js";
|
|
5
|
+
import { pathInPoseFrame as l, pathInWorld as u, worldEditToStorage as d } from "../features/paths/pathInWorld.js";
|
|
6
|
+
import { pathDivide as f, pathExclude as p, pathIntersect as m, pathSubtract as h, pathUnion as g, trianglesToPath as _ } from "../features/paths/booleans.js";
|
|
7
|
+
import { applyBooleanOp as v } from "../interactions/actions/booleans/booleans.js";
|
|
8
|
+
import { constrainTo45 as y } from "../util/constrainTo45.js";
|
|
9
|
+
import { circlePath as b, rectMarkerPath as x, roundRectPath as S, squarePath as C } from "../features/paths/markers.js";
|
|
10
|
+
import { createPathEditingOverlayLayer as w } from "../features/paths/pathEditingOverlayLayer.js";
|
|
11
|
+
import { createPenPreviewLayer as T } from "../features/paths/penPreviewLayer.js";
|
|
12
|
+
import { createPathLayer as E } from "../features/paths/pathLayer.js";
|
|
13
|
+
import { pathOriginProjection as D } from "../features/paths/originProjection.js";
|
|
14
|
+
import { strokeToPath as O } from "../features/paths/strokeToPath.js";
|
|
15
|
+
import { DEFAULT_FLATTEN_TOLERANCE as k, PATH_C as A, PATH_CMD_LENGTHS as j, PATH_L as M, PATH_M as N, PATH_Q as P, PATH_Z as F, PathBuilder as I, boundsOfPath as L, composePath as R, decomposePath as z, ellipsePath as B, flattenCubic as V, flattenCubicWithArcLen as H, flattenQuadratic as U, flattenQuadraticWithArcLen as W, linePath as G, pathCommandCoordCount as K, pathContainsPoint as q, pathContainsPolygon as J, pathContainsRect as Y, pathDistanceToPoint as X, pathFromD as Z, pathIntersectsPolygon as Q, pathIntersectsRect as $, pathSignedArea as ee, pointAlongPath as te, pointInPath as ne, polygonFromPoints as re, polylineFromPoints as ie, rectPath as ae, regularPolygonPath as oe, reversePath as se, scalePathToBounds as ce, snipPathByPolyline as le, splitPathByPolyline as ue, splitPathBySegment as de, splitSubpaths as fe, starPath as pe, transformPath as me, translatePath as he, unionBoundsPath as ge } from "../features/paths/index.js";
|
|
16
|
+
import { useBooleans as _e } from "../interactions/actions/booleans/useBooleans.js";
|
|
17
|
+
import { useBooleansAdapter as ve } from "../interactions/actions/booleans/useBooleansAdapter.js";
|
|
18
|
+
import { CURVE_REPS as ye, bezierCubic as be, bezierQuadratic as xe, nurbs as Se, spiro as Ce } from "@weasel-js/geom/curves";
|
|
19
|
+
export { ye as CURVE_REPS, k as DEFAULT_FLATTEN_TOLERANCE, A as PATH_C, j as PATH_CMD_LENGTHS, M as PATH_L, N as PATH_M, P as PATH_Q, F as PATH_Z, I as PathBuilder, v as applyBooleanOp, be as bezierCubic, xe as bezierQuadratic, L as boundsOfPath, b as circlePath, R as composePath, y as constrainTo45, s as countPathAnchors, w as createPathEditingOverlayLayer, E as createPathLayer, T as createPenPreviewLayer, z as decomposePath, B as ellipsePath, V as flattenCubic, H as flattenCubicWithArcLen, U as flattenQuadratic, W as flattenQuadraticWithArcLen, G as linePath, Se as nurbs, K as pathCommandCoordCount, q as pathContainsPoint, J as pathContainsPolygon, Y as pathContainsRect, X as pathDistanceToPoint, f as pathDivide, p as pathExclude, Z as pathFromD, l as pathInPoseFrame, u as pathInWorld, m as pathIntersect, Q as pathIntersectsPolygon, $ as pathIntersectsRect, D as pathOriginProjection, o as pathPoseDescriptor, ee as pathSignedArea, h as pathSubtract, n as pathThroughPoseFrame, c as pathToAnchors, g as pathUnion, te as pointAlongPath, ne as pointInPath, re as polygonFromPoints, ie as polylineFromPoints, r as poseFrameInverseOf, i as poseFrameOf, a as poseLinearOf, e as poseRotationOf, x as rectMarkerPath, ae as rectPath, oe as regularPolygonPath, se as reversePath, t as rotatePathAround, S as roundRectPath, ce as scalePathToBounds, le as snipPathByPolyline, Ce as spiro, ue as splitPathByPolyline, de as splitPathBySegment, fe as splitSubpaths, C as squarePath, pe as starPath, O as strokeToPath, me as transformPath, he as translatePath, _ as trianglesToPath, ge as unionBoundsPath, _e as useBooleans, ve as useBooleansAdapter, d as worldEditToStorage };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { mat3 as e } from "../renderer/math/mat3.js";
|
|
2
|
+
import { SPRITE_STRIDE as t } from "../renderer/DrawCommand.js";
|
|
3
|
+
import { frameRect as n } from "../renderer/spriteSheet.js";
|
|
4
|
+
import { viewToMat3 as r } from "../renderer/math/viewToMat3.js";
|
|
5
|
+
import { cullDrawCommands as i } from "../renderer/cullDrawCommands.js";
|
|
6
|
+
import { registerEffect as a } from "../renderer/effects/types.js";
|
|
7
|
+
import { blur as o, vignette as s } from "../renderer/effects/builtins.js";
|
|
8
|
+
import { rotateAroundAABBCenter as c } from "../canvas/poseRotation.js";
|
|
9
|
+
import { KIT_SHAPE_KINDS as l, SHAPE_KINDS as u } from "../core/shapeKinds.js";
|
|
10
|
+
import { PAINTED_CURSOR_LAYER_ID as d, createPaintedCursorLayer as f } from "../features/cursor/paintedCursorLayer.js";
|
|
11
|
+
import { paletteInsertPaint as p } from "../canvas/deps/insert.js";
|
|
12
|
+
import { KIT_VERSIONS as m, checkRequirements as h, satisfiesRange as g } from "../canvas/kitRequirements.js";
|
|
13
|
+
import { COMPOSITE_FEATURES as _, FEATURE_ACTION_IDS as v, SCENE_CANVAS_FEATURES as y, TOOL_DRIVEN_ACTION_IDS as b } from "../canvas/SceneCanvas/features.js";
|
|
14
|
+
import { BUILTIN_TOOL_IDS as x } from "../canvas/SceneCanvas/props.js";
|
|
15
|
+
import { mergeContributions as S } from "../canvas/surfaceContribution.js";
|
|
16
|
+
import { canQueryLocalFonts as C, cssFamilyName as w, cssFontFamily as T, cssFontFamilyLoading as E, enableLocalFontOutlines as D, fontOutlineRegistry as O, fontRegistry as k, hasFontOutlines as A, isCanvasFont as j, listFontOutlines as M, loadFontOutlines as N, outlineStatus as P, registerCanvasFont as F, registerFont as I, registerFontOutlines as L, subscribeGlyphReady as R, unregisterCanvasFont as z, unregisterFontOutlines as B, warmFonts as V } from "@weasel-js/font";
|
|
17
|
+
import { createReflectable as H } from "@weasel-js/registry";
|
|
18
|
+
import { assembleEntries as U, liveScope as W, modeShortcutSpec as G, modeShortcuts as K, scopeBindings as q } from "@weasel-js/routing";
|
|
19
|
+
import { CURSOR_ANGLE_STEPS as J, CURSOR_MAX_CSS_PX as Y, bakeCursor as X, createPaintedCursorState as Z, cursorFor as Q, resolveCursor as $, resolveCursorTier as ee } from "@weasel-js/cursor";
|
|
20
|
+
export { x as BUILTIN_TOOL_IDS, _ as COMPOSITE_FEATURES, J as CURSOR_ANGLE_STEPS, Y as CURSOR_MAX_CSS_PX, v as FEATURE_ACTION_IDS, l as KIT_SHAPE_KINDS, m as KIT_VERSIONS, d as PAINTED_CURSOR_LAYER_ID, y as SCENE_CANVAS_FEATURES, u as SHAPE_KINDS, t as SPRITE_STRIDE, b as TOOL_DRIVEN_ACTION_IDS, U as assembleEntries, X as bakeCursor, o as blur, C as canQueryLocalFonts, h as checkRequirements, f as createPaintedCursorLayer, Z as createPaintedCursorState, H as createReflectable, w as cssFamilyName, T as cssFontFamily, E as cssFontFamilyLoading, i as cullDrawCommands, Q as cursorFor, D as enableLocalFontOutlines, O as fontOutlineRegistry, k as fontRegistry, n as frameRect, A as hasFontOutlines, j as isCanvasFont, M as listFontOutlines, W as liveScope, N as loadFontOutlines, e as mat3, S as mergeContributions, G as modeShortcutSpec, K as modeShortcuts, P as outlineStatus, p as paletteInsertPaint, F as registerCanvasFont, a as registerEffect, I as registerFont, L as registerFontOutlines, $ as resolveCursor, ee as resolveCursorTier, c as rotateAroundAABBCenter, g as satisfiesRange, q as scopeBindings, R as subscribeGlyphReady, z as unregisterCanvasFont, B as unregisterFontOutlines, r as viewToMat3, s as vignette, V as warmFonts };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { CORNER_ANCHORS as e, cornerPoint as t } from "../interactions/actions/resize/cornerHandles.js";
|
|
2
|
+
import { actionShortcuts as n, keySpecShortcut as r } from "../interactions/actions/actionShortcuts.js";
|
|
3
|
+
import { editingLayer as i, inPlane as a, insertLayer as o, selectionLayer as s } from "../interactions/actions/planeInput.js";
|
|
4
|
+
import { moveAction as c } from "../interactions/actions/defaults/move.js";
|
|
5
|
+
import { defaultCommitAdapter as l } from "../interactions/actions/defaultCommitAdapter.js";
|
|
6
|
+
import { resizeAction as u } from "../interactions/actions/defaults/resize.js";
|
|
7
|
+
import { rotateAction as d } from "../interactions/actions/defaults/rotate.js";
|
|
8
|
+
import { areaSelectAction as f } from "../interactions/actions/defaults/areaSelect.js";
|
|
9
|
+
import { insertAction as p } from "../interactions/actions/defaults/insert.js";
|
|
10
|
+
import { clearSelectionAction as m } from "../interactions/actions/defaults/clearSelection.js";
|
|
11
|
+
import { cloneAction as h } from "../interactions/actions/defaults/clone.js";
|
|
12
|
+
import { viewportDragPanAction as g } from "../interactions/actions/defaults/viewportDragPan.js";
|
|
13
|
+
import { makeViewportZoomAction as _, viewportZoomAction as v } from "../interactions/actions/defaults/viewportZoom.js";
|
|
14
|
+
import { makeViewportWheelPanAction as y, viewportWheelPanAction as b } from "../interactions/actions/defaults/viewportWheelPan.js";
|
|
15
|
+
import { editAnchorsAction as x } from "../interactions/actions/defaults/editAnchors.js";
|
|
16
|
+
import { selectFromLasso as S } from "../interactions/actions/lasso-select/behaviors/selectFromLasso.js";
|
|
17
|
+
import { lassoSelectAction as C } from "../interactions/actions/defaults/lassoSelect.js";
|
|
18
|
+
import { sliceAction as w } from "../interactions/actions/defaults/slice.js";
|
|
19
|
+
import { makePinchZoomAction as T, pinchZoomAction as E } from "../interactions/actions/defaults/pinchZoom.js";
|
|
20
|
+
import { clipboardCopyAction as D, clipboardCutAction as O, clipboardPasteAction as k, clipboardPasteEventAction as A } from "../interactions/actions/defaults/clipboard.js";
|
|
21
|
+
import { enterTextEditAction as j } from "../interactions/actions/defaults/enterTextEdit.js";
|
|
22
|
+
import { KIT_STANDARD_ACTION_IDS as M, useStandardActions as N } from "../interactions/actions/useStandardActions.js";
|
|
23
|
+
import { useResizePolicy as P } from "../canvas/deps/resizePolicy.js";
|
|
24
|
+
import { usePoseDescriptorDepSource as F } from "../canvas/deps/poseDescriptor.js";
|
|
25
|
+
import { usePoseCompositionDepSource as I } from "../canvas/deps/poseComposition.js";
|
|
26
|
+
import { computeSliceOps as L } from "../interactions/actions/defaults/sliceOps.js";
|
|
27
|
+
import { useSliceDep as R, useSliceDepSource as z } from "../canvas/deps/slice.js";
|
|
28
|
+
import { defineTool as B, useTools as V } from "../tools/overlayBinding.js";
|
|
29
|
+
import { useKeybindings as H } from "../tools/useKeybindings.js";
|
|
30
|
+
import { pickTopMostHit as U } from "../tools/builtin/pickTopMostHit.js";
|
|
31
|
+
import { AREA_SELECT_ID as W, SELECTION_MOVE_ID as G, SELECTION_RESIZE_ID as K, SELECTION_ROTATE_ID as q, SELECTION_TRANSFORM_ID as J, areaSelectContribution as Y, onEmptyCanvas as X, selectionMoveBindings as Z, selectionMoveContribution as Q, selectionResizeBindings as $, selectionResizeContribution as ee, selectionRotateBindings as te, selectionRotateContribution as ne, selectionTransformBindings as re, selectionTransformContribution as ie } from "../tools/builtin/select/selectionContributions.js";
|
|
32
|
+
import { useSelectTool as ae } from "../tools/builtin/select/useSelectTool.js";
|
|
33
|
+
import { useHandTool as oe } from "../tools/builtin/hand/useHandTool.js";
|
|
34
|
+
import { DRAG_PAN_ID as se, dragPanContribution as ce } from "../tools/builtin/hand/dragPanContribution.js";
|
|
35
|
+
import { useTextTool as le } from "../tools/builtin/text/useTextTool.js";
|
|
36
|
+
import { usePenTool as ue } from "../tools/builtin/pen/usePenTool.js";
|
|
37
|
+
import { useRectTool as de } from "../tools/builtin/rect/useRectTool.js";
|
|
38
|
+
import { useEllipseTool as fe } from "../tools/builtin/ellipse/useEllipseTool.js";
|
|
39
|
+
import { useImageTool as pe } from "../tools/builtin/image/useImageTool.js";
|
|
40
|
+
import { useEyedropperTool as me } from "../tools/builtin/eyedropper/useEyedropperTool.js";
|
|
41
|
+
import { useLineTool as he } from "../tools/builtin/line/useLineTool.js";
|
|
42
|
+
import { useLassoTool as ge } from "../tools/builtin/lasso/useLassoTool.js";
|
|
43
|
+
import { usePolygonTool as _e } from "../tools/builtin/polygon/usePolygonTool.js";
|
|
44
|
+
import { useStarTool as ve } from "../tools/builtin/star/useStarTool.js";
|
|
45
|
+
import { usePencilTool as ye } from "../tools/builtin/pencil/usePencilTool.js";
|
|
46
|
+
import { useSliceTool as be } from "../tools/builtin/slice/useSliceTool.js";
|
|
47
|
+
import { useLatest as xe } from "@weasel-js/react";
|
|
48
|
+
import { ActionDisabledReason as Se, actionBindings as Ce, actionItems as we, buildDepsFromRequires as Te, createDepRegistry as Ee, createDispatcher as De, deleteScratch as Oe, evaluateActive as ke, evaluateEnabled as Ae, getScratch as je, heldKeySpec as Me, resolveParams as Ne, scratchKey as Pe, setScratch as Fe, specificity as Ie } from "@weasel-js/routing";
|
|
49
|
+
import { ActionsProvider as Le, ActiveToolContextProvider as Re, ActiveToolContextProviderIfRoot as ze, DepRegistryProvider as Be, InputScope as Ve, Yoke as He, useAction as Ue, useActionsRegistry as We, useActiveToolContext as Ge, useDepRegistry as Ke, useDepSource as qe, useGestureDispatcher as Je, useOngoingAction as Ye, useOptionalActiveToolContext as Xe, useOptionalDepRegistry as Ze, useYoke as Qe } from "@weasel-js/routing/react";
|
|
50
|
+
import { bodyPredicate as $e, hitPredicate as et } from "@weasel-js/gestures";
|
|
51
|
+
export { W as AREA_SELECT_ID, Se as ActionDisabledReason, Le as ActionsProvider, Re as ActiveToolContextProvider, ze as ActiveToolContextProviderIfRoot, e as CORNER_ANCHORS, se as DRAG_PAN_ID, Be as DepRegistryProvider, Ve as InputScope, M as KIT_STANDARD_ACTION_IDS, G as SELECTION_MOVE_ID, K as SELECTION_RESIZE_ID, q as SELECTION_ROTATE_ID, J as SELECTION_TRANSFORM_ID, He as Yoke, Ce as actionBindings, we as actionItems, n as actionShortcuts, f as areaSelectAction, Y as areaSelectContribution, $e as bodyPredicate, Te as buildDepsFromRequires, m as clearSelectionAction, D as clipboardCopyAction, O as clipboardCutAction, k as clipboardPasteAction, A as clipboardPasteEventAction, h as cloneAction, L as computeSliceOps, t as cornerPoint, Ee as createDepRegistry, De as createDispatcher, l as defaultCommitAdapter, B as defineTool, Oe as deleteScratch, ce as dragPanContribution, x as editAnchorsAction, i as editingLayer, j as enterTextEditAction, ke as evaluateActive, Ae as evaluateEnabled, je as getScratch, Me as heldKeySpec, et as hitPredicate, a as inPlane, p as insertAction, o as insertLayer, r as keySpecShortcut, C as lassoSelectAction, T as makePinchZoomAction, y as makeViewportWheelPanAction, _ as makeViewportZoomAction, c as moveAction, X as onEmptyCanvas, U as pickTopMostHit, E as pinchZoomAction, u as resizeAction, Ne as resolveParams, d as rotateAction, Pe as scratchKey, S as selectFromLasso, s as selectionLayer, Z as selectionMoveBindings, Q as selectionMoveContribution, $ as selectionResizeBindings, ee as selectionResizeContribution, te as selectionRotateBindings, ne as selectionRotateContribution, re as selectionTransformBindings, ie as selectionTransformContribution, Fe as setScratch, w as sliceAction, Ie as specificity, Ue as useAction, We as useActionsRegistry, Ge as useActiveToolContext, Ke as useDepRegistry, qe as useDepSource, fe as useEllipseTool, me as useEyedropperTool, Je as useGestureDispatcher, oe as useHandTool, pe as useImageTool, H as useKeybindings, ge as useLassoTool, xe as useLatest, he as useLineTool, Ye as useOngoingAction, Xe as useOptionalActiveToolContext, Ze as useOptionalDepRegistry, ue as usePenTool, ye as usePencilTool, _e as usePolygonTool, I as usePoseCompositionDepSource, F as usePoseDescriptorDepSource, de as useRectTool, P as useResizePolicy, ae as useSelectTool, R as useSliceDep, z as useSliceDepSource, be as useSliceTool, N as useStandardActions, ve as useStarTool, le as useTextTool, V as useTools, Qe as useYoke, g as viewportDragPanAction, b as viewportWheelPanAction, v as viewportZoomAction };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { textCommand as e, textCommandFromPose as t, textCommandFromRuns as n } from "../features/text/textCommand.js";
|
|
2
|
+
import { TextOutlinesError as r, loadTextOutlines as i, textToPath as a, textToPathsByPaint as o } from "../features/text/textToPath.js";
|
|
3
|
+
import { applyCreateOutlines as s } from "../interactions/actions/outlines/createOutlines.js";
|
|
4
|
+
import { isTextData as c } from "../features/text/isTextData.js";
|
|
5
|
+
import { defaultLabelTextRenderer as l, renderLabel as u } from "../features/text/renderLabel.js";
|
|
6
|
+
import { createTextLayer as d } from "../features/text/textLayer.js";
|
|
7
|
+
import { caretIndexAt as f, pointInTextPose as p } from "../features/text/hitTest.js";
|
|
8
|
+
import { fitTextPose as m } from "../features/text/fitTextPose.js";
|
|
9
|
+
import { charOffsetToDomPosition as h, domPositionToCharOffset as g } from "../features/text/domOffsets.js";
|
|
10
|
+
import { domToRuns as _, runsToDom as v } from "../features/text/domRuns.js";
|
|
11
|
+
import { applyStyleToRange as y, patchRangeStyle as b, styleAtRange as x } from "../features/text/runs/rangeStyle.js";
|
|
12
|
+
import { nodeHasFlag as S, setFlagOverRange as C, unboldPatch as w } from "../features/text/runs/flagRange.js";
|
|
13
|
+
import { effectiveRangeStyle as T, rangeWeight as E } from "../features/text/runs/effectiveRangeStyle.js";
|
|
14
|
+
import { TEXT_EDIT_FONT_HOLD as D, useTextEdit as O } from "../features/text/useTextEdit.js";
|
|
15
|
+
import { useSceneTextEdit as k } from "../features/text/useSceneTextEdit.js";
|
|
16
|
+
import { useCreateOutlinesAdapter as A } from "../interactions/actions/outlines/useCreateOutlinesAdapter.js";
|
|
17
|
+
import { DEFAULT_DECORATION_METRICS as j, DEFAULT_TEXT_STYLE as M, MARKDOWN_RUN_GRAMMAR as N, SCRIPT_METRICS as P, SMALL_CAPS_SCALE as F, cachedLayoutRuns as I, createMarkdownRenderer as L, decorationMetrics as R, fontString as z, isBoldWeight as B, isSmallCapsLetter as V, layoutMarkdown as H, layoutRuns as U, layoutTextPose as W, markdownToRuns as G, measureText as K, measureTextBounds as q, measuredWidth as J, numericWeight as Y, paragraphDirection as X, registerBidi as Z, resolveAlign as Q, resolveRunFace as $, resolveRuns as ee, resolveTextStyle as te, runsToMarkdown as ne, runsToPlainText as re, scriptMetrics as ie, scriptMetricsFor as ae, smallCapsScale as oe, smallCapsScaleFor as se, smallCapsText as ce, textLineBoxes as le, textPoseLayoutInput as ue, toRuns as de, transformRunTexts as fe, verticalAlignOffset as pe } from "@weasel-js/text";
|
|
18
|
+
export { j as DEFAULT_DECORATION_METRICS, M as DEFAULT_TEXT_STYLE, N as MARKDOWN_RUN_GRAMMAR, P as SCRIPT_METRICS, F as SMALL_CAPS_SCALE, D as TEXT_EDIT_FONT_HOLD, r as TextOutlinesError, s as applyCreateOutlines, y as applyStyleToRange, I as cachedLayoutRuns, f as caretIndexAt, h as charOffsetToDomPosition, L as createMarkdownRenderer, d as createTextLayer, R as decorationMetrics, l as defaultLabelTextRenderer, g as domPositionToCharOffset, _ as domToRuns, T as effectiveRangeStyle, m as fitTextPose, z as fontString, B as isBoldWeight, V as isSmallCapsLetter, c as isTextData, H as layoutMarkdown, U as layoutRuns, W as layoutTextPose, i as loadTextOutlines, G as markdownToRuns, K as measureText, q as measureTextBounds, J as measuredWidth, S as nodeHasFlag, Y as numericWeight, X as paragraphDirection, b as patchRangeStyle, p as pointInTextPose, E as rangeWeight, Z as registerBidi, u as renderLabel, Q as resolveAlign, $ as resolveRunFace, ee as resolveRuns, te as resolveTextStyle, v as runsToDom, ne as runsToMarkdown, re as runsToPlainText, ie as scriptMetrics, ae as scriptMetricsFor, C as setFlagOverRange, oe as smallCapsScale, se as smallCapsScaleFor, ce as smallCapsText, x as styleAtRange, e as textCommand, t as textCommandFromPose, n as textCommandFromRuns, le as textLineBoxes, ue as textPoseLayoutInput, a as textToPath, o as textToPathsByPaint, de as toRuns, fe as transformRunTexts, w as unboldPatch, A as useCreateOutlinesAdapter, k as useSceneTextEdit, O as useTextEdit, pe as verticalAlignOffset };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { VERSION as e } from "../version.js";
|
|
2
|
+
import { meanScale as t } from "../core/viewport/meanScale.js";
|
|
3
|
+
import { DEFAULT_MAX_ZOOM as n, DEFAULT_MIN_ZOOM as r, ZOOM_FLOOR as i, normalizeZoom as a } from "../core/viewport/zoomBounds.js";
|
|
4
|
+
import { normalizeView as o, viewToTransform as s, viewZoom as c } from "../core/viewport/view.js";
|
|
5
|
+
import { createViewportLayer as l } from "../features/viewports/viewportLayer.js";
|
|
6
|
+
import { createViewResolver as u } from "../features/viewports/viewResolver.js";
|
|
7
|
+
import { deriveParallaxView as d, fromPlane as f, planeMap as p, planeMatrix as m, planeToPlane as h, rectFromPlane as g, rectToPlane as _, toPlane as v } from "../core/viewport/parallax.js";
|
|
8
|
+
import { createParallaxPlane as y } from "../features/parallax/createParallaxPlane.js";
|
|
9
|
+
import { createParallaxLayer as b } from "../features/parallax/createParallaxLayer.js";
|
|
10
|
+
import { tiledProject as x } from "../features/tiling/tiledProject.js";
|
|
11
|
+
import { createTiledLayer as S } from "../features/tiling/createTiledLayer.js";
|
|
12
|
+
import { DEFAULT_ALPHA_DECAY as C, DEFAULT_ALPHA_MIN as w, DEFAULT_VELOCITY_DECAY as T } from "../features/simulation/types.js";
|
|
13
|
+
import { createSimulation as E } from "../features/simulation/createSimulation.js";
|
|
14
|
+
import { useVisibleRaf as D } from "../scheduling/useVisibleRaf.js";
|
|
15
|
+
import { useSimulation as O } from "../features/simulation/useSimulation.js";
|
|
16
|
+
import { usePoseRun as k } from "../features/poseRun/usePoseRun.js";
|
|
17
|
+
import { watchDevicePixelRatio as A } from "../core/device/watchDevicePixelRatio.js";
|
|
18
|
+
import { DeviceProfileProvider as j, useDeviceProfile as M } from "../core/device/useDeviceProfile.js";
|
|
19
|
+
import { useCanvasSize as N } from "../core/viewport/useCanvasSize.js";
|
|
20
|
+
import { isPlainObject as P } from "../core/isPlainObject.js";
|
|
21
|
+
import { useNodeOverlayFrame as F } from "../features/overlays/useNodeOverlayFrame.js";
|
|
22
|
+
import { screenToWorld as I, worldToScreen as L } from "../core/viewport/viewTransform.js";
|
|
23
|
+
import { stableStringify as R } from "../core/stableStringify.js";
|
|
24
|
+
import { pxExtent as z, scaleDelta as B, screenAngleOf as V, standoff as H, withinPxBox as U, withinPxRadius as W } from "../core/viewport/pxExtent.js";
|
|
25
|
+
import { useHandleDrag as G } from "../interactions/gestures/handleDrag/handleDrag.js";
|
|
26
|
+
import { useDragHandle as K, useDropZone as q } from "../interactions/gestures/pointerDrag/pointerDrag.js";
|
|
27
|
+
import { startThresholdDrag as J } from "../interactions/gestures/thresholdDrag/thresholdDrag.js";
|
|
28
|
+
import { ANCHOR_HIT_BASE_PX as Y, HANDLE_BASE_PX as X, ROTATION_HANDLE_BASE_PX as Z } from "../core/device/targets.js";
|
|
29
|
+
import { COARSE_TARGET_SCALE as Q, DEFAULT_DEVICE_PROFILE as $, resolveDeviceProfile as ee } from "../core/device/index.js";
|
|
30
|
+
import { fitToBounds as te, fitZoom as ne } from "../core/viewport/fitToBounds.js";
|
|
31
|
+
import { fitViewToBounds as re } from "../core/viewport/fitViewToBounds.js";
|
|
32
|
+
import { zoomAt as ie } from "../core/viewport/zoomAt.js";
|
|
33
|
+
import { clampView as ae } from "../core/viewport/clampView.js";
|
|
34
|
+
import { sceneNodeClientRect as oe } from "../core/viewport/sceneNodeClientRect.js";
|
|
35
|
+
import { computeFitViewport as se, useAutoCenter as ce } from "../core/viewport/useAutoCenter.js";
|
|
36
|
+
import { WHEEL_ZOOM_STEP as le, computeWheelAction as ue, wheelPan as de, wheelZoom as fe, wheelZoomFactor as pe } from "../core/viewport/wheelHandler.js";
|
|
37
|
+
import { createVelocityTracker as me } from "../core/viewport/createVelocityTracker.js";
|
|
38
|
+
import { useVelocityTracker as he } from "../core/viewport/useVelocityTracker.js";
|
|
39
|
+
import { useDecayLoop as ge } from "../core/viewport/useDecayLoop.js";
|
|
40
|
+
import { interpolateView as _e } from "../core/viewport/interpolateView.js";
|
|
41
|
+
import { VIEW_ANIMATION_KEY as ve, useViewAnimation as ye, useViewAnimationOn as be } from "../core/viewport/useViewAnimation.js";
|
|
42
|
+
import { CanvasView as xe } from "../canvas/CanvasView.js";
|
|
43
|
+
import { SceneViewCanvas as Se } from "../canvas/SceneViewCanvas.js";
|
|
44
|
+
import { DrawCanvas as Ce } from "../canvas/DrawCanvas.js";
|
|
45
|
+
import { MINIMAP_CENTER as we, MINIMAP_PAN as Te, centerRootOn as Ee, minimapCenterAction as De, minimapPanAction as Oe } from "../features/minimap/actions.js";
|
|
46
|
+
import { CROSSHAIR_HALO as ke, crosshairRects as Ae } from "../features/minimap/layers.js";
|
|
47
|
+
import { MinimapCanvas as je } from "../canvas/MinimapCanvas.js";
|
|
48
|
+
import { createLinkedCursorContribution as Me, createMinimapContribution as Ne } from "../features/minimap/createMinimapContribution.js";
|
|
49
|
+
import { useCanvasFocus as Pe } from "../features/focus/useCanvasFocus.js";
|
|
50
|
+
import { gateLayer as Fe } from "../features/focus/gateLayer.js";
|
|
51
|
+
import { clientToCanvas as Ie } from "@weasel-js/routing";
|
|
52
|
+
export { Y as ANCHOR_HIT_BASE_PX, Q as COARSE_TARGET_SCALE, ke as CROSSHAIR_HALO, xe as CanvasView, C as DEFAULT_ALPHA_DECAY, w as DEFAULT_ALPHA_MIN, $ as DEFAULT_DEVICE_PROFILE, n as DEFAULT_MAX_ZOOM, r as DEFAULT_MIN_ZOOM, T as DEFAULT_VELOCITY_DECAY, j as DeviceProfileProvider, Ce as DrawCanvas, X as HANDLE_BASE_PX, we as MINIMAP_CENTER, Te as MINIMAP_PAN, je as MinimapCanvas, Z as ROTATION_HANDLE_BASE_PX, Se as SceneViewCanvas, e as VERSION, ve as VIEW_ANIMATION_KEY, le as WHEEL_ZOOM_STEP, i as ZOOM_FLOOR, Ee as centerRootOn, ae as clampView, Ie as clientToCanvas, se as computeFitViewport, ue as computeWheelAction, Me as createLinkedCursorContribution, Ne as createMinimapContribution, b as createParallaxLayer, y as createParallaxPlane, E as createSimulation, S as createTiledLayer, me as createVelocityTracker, u as createViewResolver, l as createViewportLayer, Ae as crosshairRects, d as deriveParallaxView, te as fitToBounds, re as fitViewToBounds, ne as fitZoom, f as fromPlane, Fe as gateLayer, _e as interpolateView, P as isPlainObject, t as meanScale, De as minimapCenterAction, Oe as minimapPanAction, o as normalizeView, a as normalizeZoom, p as planeMap, m as planeMatrix, h as planeToPlane, z as pxExtent, g as rectFromPlane, _ as rectToPlane, ee as resolveDeviceProfile, B as scaleDelta, oe as sceneNodeClientRect, V as screenAngleOf, I as screenToWorld, R as stableStringify, H as standoff, J as startThresholdDrag, x as tiledProject, v as toPlane, ce as useAutoCenter, Pe as useCanvasFocus, N as useCanvasSize, ge as useDecayLoop, M as useDeviceProfile, K as useDragHandle, q as useDropZone, G as useHandleDrag, F as useNodeOverlayFrame, k as usePoseRun, O as useSimulation, he as useVelocityTracker, ye as useViewAnimation, be as useViewAnimationOn, D as useVisibleRaf, s as viewToTransform, c as viewZoom, A as watchDevicePixelRatio, de as wheelPan, fe as wheelZoom, pe as wheelZoomFactor, U as withinPxBox, W as withinPxRadius, L as worldToScreen, ie as zoomAt };
|