@weasel-js/core 1.7.0 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +794 -0
- package/README.md +14 -8
- package/dist/WeaselProvider.js +15 -0
- package/dist/WeaselProvider.js.map +1 -0
- package/dist/affordances/composeAffordanceLayer.js +224 -0
- package/dist/affordances/composeAffordanceLayer.js.map +1 -0
- package/dist/affordances/cornerResize.js +69 -0
- package/dist/affordances/cornerResize.js.map +1 -0
- package/dist/affordances/hitAffordanceRegions.js +138 -0
- package/dist/affordances/hitAffordanceRegions.js.map +1 -0
- package/dist/affordances/pathAnchors.js +66 -0
- package/dist/affordances/pathAnchors.js.map +1 -0
- package/dist/affordances/rotationHandle.js +103 -0
- package/dist/affordances/rotationHandle.js.map +1 -0
- package/dist/animation/behaviors/momentum.js +118 -0
- package/dist/animation/behaviors/momentum.js.map +1 -0
- package/dist/animation/colorHelpers.js +135 -0
- package/dist/animation/colorHelpers.js.map +1 -0
- package/dist/animation/colorRegistry.js +37 -0
- package/dist/animation/colorRegistry.js.map +1 -0
- package/dist/animation/index.js +20 -0
- package/dist/animation/loop.js +62 -0
- package/dist/animation/loop.js.map +1 -0
- package/dist/animation/observe.js +23 -0
- package/dist/animation/observe.js.map +1 -0
- package/dist/animation/poseHelpers.js +50 -0
- package/dist/animation/poseHelpers.js.map +1 -0
- package/dist/animation/reflow.js +121 -0
- package/dist/animation/reflow.js.map +1 -0
- package/dist/animation/rig/bindRig.js +74 -0
- package/dist/animation/rig/bindRig.js.map +1 -0
- package/dist/animation/rig/blendPoses.js +43 -0
- package/dist/animation/rig/blendPoses.js.map +1 -0
- package/dist/animation/rig/mirrorPose.js +19 -0
- package/dist/animation/rig/mirrorPose.js.map +1 -0
- package/dist/animation/rig/resolveSkeleton.js +33 -0
- package/dist/animation/rig/resolveSkeleton.js.map +1 -0
- package/dist/animation/rig/solveIk.js +103 -0
- package/dist/animation/rig/solveIk.js.map +1 -0
- package/dist/animation/rig/types.js +12 -0
- package/dist/animation/rig/types.js.map +1 -0
- package/dist/animation/rig/useRig.js +23 -0
- package/dist/animation/rig/useRig.js.map +1 -0
- package/dist/animation/slew.js +27 -0
- package/dist/animation/slew.js.map +1 -0
- package/dist/animation/stagger.js +138 -0
- package/dist/animation/stagger.js.map +1 -0
- package/dist/animation/timeline/booking.js +106 -0
- package/dist/animation/timeline/booking.js.map +1 -0
- package/dist/animation/timeline/createTimeline.js +116 -0
- package/dist/animation/timeline/createTimeline.js.map +1 -0
- package/dist/animation/timeline/sampleTrack.js +29 -0
- package/dist/animation/timeline/sampleTrack.js.map +1 -0
- package/dist/animation/useAnimator.js +329 -0
- package/dist/animation/useAnimator.js.map +1 -0
- package/dist/animation/wrappers/animateLifecycle.js +40 -0
- package/dist/animation/wrappers/animateLifecycle.js.map +1 -0
- package/dist/animation/wrappers/animateOnSetPose.js +44 -0
- package/dist/animation/wrappers/animateOnSetPose.js.map +1 -0
- package/dist/{autoPoseDescriptor-_XOyF7t4.d.ts → autoPoseDescriptor-vCdt55xm.d.ts} +2 -2
- package/dist/{builtins-DLn2lCr_.d.ts → builtins-C-gRyVRx.d.ts} +742 -513
- package/dist/canvas/Canvas.js +608 -0
- package/dist/canvas/Canvas.js.map +1 -0
- package/dist/canvas/CanvasView.js +255 -0
- package/dist/canvas/CanvasView.js.map +1 -0
- package/dist/canvas/CursorCoordsHud.js +102 -0
- package/dist/canvas/CursorCoordsHud.js.map +1 -0
- package/dist/canvas/DrawCanvas.js +67 -0
- package/dist/canvas/DrawCanvas.js.map +1 -0
- package/dist/canvas/MinimapCanvas.js +139 -0
- package/dist/canvas/MinimapCanvas.js.map +1 -0
- package/dist/canvas/ModalityHud.js +66 -0
- package/dist/canvas/ModalityHud.js.map +1 -0
- package/dist/canvas/NodeShape.js +391 -0
- package/dist/canvas/NodeShape.js.map +1 -0
- package/dist/canvas/PickHud.js +93 -0
- package/dist/canvas/PickHud.js.map +1 -0
- package/dist/canvas/SceneCanvas/ActionsProviderIfRoot.js +10 -0
- package/dist/canvas/SceneCanvas/ActionsProviderIfRoot.js.map +1 -0
- package/dist/canvas/SceneCanvas/DepRegistryProviderIfRoot.js +10 -0
- package/dist/canvas/SceneCanvas/DepRegistryProviderIfRoot.js.map +1 -0
- package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js +51 -0
- package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js.map +1 -0
- package/dist/canvas/SceneCanvas/contributionFrameHooks.js +42 -0
- package/dist/canvas/SceneCanvas/contributionFrameHooks.js.map +1 -0
- package/dist/canvas/SceneCanvas/defaultNodeProperties.js +549 -0
- package/dist/canvas/SceneCanvas/defaultNodeProperties.js.map +1 -0
- package/dist/canvas/SceneCanvas/defaultNodeRouting.js +26 -0
- package/dist/canvas/SceneCanvas/defaultNodeRouting.js.map +1 -0
- package/dist/canvas/SceneCanvas/dispatcherGestureBounds.js +69 -0
- package/dist/canvas/SceneCanvas/dispatcherGestureBounds.js.map +1 -0
- package/dist/canvas/SceneCanvas/features.js +97 -0
- package/dist/canvas/SceneCanvas/features.js.map +1 -0
- package/dist/canvas/SceneCanvas/poseGeometry.js +46 -0
- package/dist/canvas/SceneCanvas/poseGeometry.js.map +1 -0
- package/dist/canvas/SceneCanvas/useActionsPropResolver.js +48 -0
- package/dist/canvas/SceneCanvas/useActionsPropResolver.js.map +1 -0
- package/dist/canvas/SceneCanvas/useBuiltinShapeTools.js +70 -0
- package/dist/canvas/SceneCanvas/useBuiltinShapeTools.js.map +1 -0
- package/dist/canvas/SceneCanvas/useContributionRoles.js +75 -0
- package/dist/canvas/SceneCanvas/useContributionRoles.js.map +1 -0
- package/dist/canvas/SceneCanvas/useDispatcherOverlayLayer.js +172 -0
- package/dist/canvas/SceneCanvas/useDispatcherOverlayLayer.js.map +1 -0
- package/dist/canvas/SceneCanvas/usePreviewGhostLayer.js +69 -0
- package/dist/canvas/SceneCanvas/usePreviewGhostLayer.js.map +1 -0
- package/dist/canvas/SceneCanvas/useSceneSelectTool.js +127 -0
- package/dist/canvas/SceneCanvas/useSceneSelectTool.js.map +1 -0
- package/dist/canvas/SceneCanvas/useViewportActions.js +30 -0
- package/dist/canvas/SceneCanvas/useViewportActions.js.map +1 -0
- package/dist/canvas/SceneCanvas.js +992 -0
- package/dist/canvas/SceneCanvas.js.map +1 -0
- package/dist/canvas/SceneViewCanvas.js +54 -0
- package/dist/canvas/SceneViewCanvas.js.map +1 -0
- package/dist/canvas/accentColor.js +9 -0
- package/dist/canvas/accentColor.js.map +1 -0
- package/dist/canvas/affordanceAt.js +63 -0
- package/dist/canvas/affordanceAt.js.map +1 -0
- package/dist/canvas/buildSceneTree.js +65 -0
- package/dist/canvas/buildSceneTree.js.map +1 -0
- package/dist/canvas/canvasRenderer.js +89 -0
- package/dist/canvas/canvasRenderer.js.map +1 -0
- package/dist/canvas/colorOverrides.js +16 -0
- package/dist/canvas/colorOverrides.js.map +1 -0
- package/dist/canvas/defaultDrawOne.js +43 -0
- package/dist/canvas/defaultDrawOne.js.map +1 -0
- package/dist/canvas/deps/areaSelect.js +19 -0
- package/dist/canvas/deps/areaSelect.js.map +1 -0
- package/dist/canvas/deps/debug.js +9 -0
- package/dist/canvas/deps/debug.js.map +1 -0
- package/dist/canvas/deps/dispatcher.js +11 -0
- package/dist/canvas/deps/dispatcher.js.map +1 -0
- package/dist/canvas/deps/editAnchors.js +101 -0
- package/dist/canvas/deps/editAnchors.js.map +1 -0
- package/dist/canvas/deps/geometryProjection.js +11 -0
- package/dist/canvas/deps/geometryProjection.js.map +1 -0
- package/dist/canvas/deps/hitTestArea.js +51 -0
- package/dist/canvas/deps/hitTestArea.js.map +1 -0
- package/dist/canvas/deps/ingestion.js +31 -0
- package/dist/canvas/deps/ingestion.js.map +1 -0
- package/dist/canvas/deps/insert.js +116 -0
- package/dist/canvas/deps/insert.js.map +1 -0
- package/dist/canvas/deps/lassoSelect.js +20 -0
- package/dist/canvas/deps/lassoSelect.js.map +1 -0
- package/dist/canvas/deps/layout.js +34 -0
- package/dist/canvas/deps/layout.js.map +1 -0
- package/dist/canvas/deps/nodeAtPoint.js +19 -0
- package/dist/canvas/deps/nodeAtPoint.js.map +1 -0
- package/dist/canvas/deps/poseComposition.js +11 -0
- package/dist/canvas/deps/poseComposition.js.map +1 -0
- package/dist/canvas/deps/poseDescriptor.js +12 -0
- package/dist/canvas/deps/poseDescriptor.js.map +1 -0
- package/dist/canvas/deps/resizePolicy.js +35 -0
- package/dist/canvas/deps/resizePolicy.js.map +1 -0
- package/dist/canvas/deps/slice.js +99 -0
- package/dist/canvas/deps/slice.js.map +1 -0
- package/dist/canvas/deps/snap.js +11 -0
- package/dist/canvas/deps/snap.js.map +1 -0
- package/dist/canvas/deps/textEdit.js +21 -0
- package/dist/canvas/deps/textEdit.js.map +1 -0
- package/dist/canvas/deps/view.js +43 -0
- package/dist/canvas/deps/view.js.map +1 -0
- package/dist/canvas/derivedPath.js +47 -0
- package/dist/canvas/derivedPath.js.map +1 -0
- package/dist/canvas/drawEnvelope.js +22 -0
- package/dist/canvas/drawEnvelope.js.map +1 -0
- package/dist/canvas/getNodeAtPoint.js +18 -0
- package/dist/canvas/getNodeAtPoint.js.map +1 -0
- package/dist/canvas/hostAnchor.js +29 -0
- package/dist/canvas/hostAnchor.js.map +1 -0
- package/dist/canvas/hud.module.js +18 -0
- package/dist/canvas/hud.module.js.map +1 -0
- package/dist/canvas/insertPreviewExtent.js +103 -0
- package/dist/canvas/insertPreviewExtent.js.map +1 -0
- package/dist/canvas/kitRequirements.js +177 -0
- package/dist/canvas/kitRequirements.js.map +1 -0
- package/dist/canvas/layerOrder.js +66 -0
- package/dist/canvas/layerOrder.js.map +1 -0
- package/dist/canvas/layerSlots.js +14 -0
- package/dist/canvas/layerSlots.js.map +1 -0
- package/dist/canvas/minimapMath.js +80 -0
- package/dist/canvas/minimapMath.js.map +1 -0
- package/dist/canvas/mountedCanvases.js +20 -0
- package/dist/canvas/mountedCanvases.js.map +1 -0
- package/dist/canvas/overlayRoleStrokes.js +17 -0
- package/dist/canvas/overlayRoleStrokes.js.map +1 -0
- package/dist/canvas/paintCull.js +20 -0
- package/dist/canvas/paintCull.js.map +1 -0
- package/dist/canvas/pickWalk.js +158 -0
- package/dist/canvas/pickWalk.js.map +1 -0
- package/dist/canvas/planeClips.js +30 -0
- package/dist/canvas/planeClips.js.map +1 -0
- package/dist/canvas/poseRotation.js +35 -0
- package/dist/canvas/poseRotation.js.map +1 -0
- package/dist/canvas/rasterToPng.js +21 -0
- package/dist/canvas/rasterToPng.js.map +1 -0
- package/dist/canvas/renderDebugSnapshot.js +32 -0
- package/dist/canvas/renderDebugSnapshot.js.map +1 -0
- package/dist/canvas/renderNeeds.js +25 -0
- package/dist/canvas/renderNeeds.js.map +1 -0
- package/dist/canvas/renderSceneToPixels.js +143 -0
- package/dist/canvas/renderSceneToPixels.js.map +1 -0
- package/dist/canvas/sceneAdapter.js +270 -0
- package/dist/canvas/sceneAdapter.js.map +1 -0
- package/dist/canvas/sceneLayerPaint.js +37 -0
- package/dist/canvas/sceneLayerPaint.js.map +1 -0
- package/dist/canvas/sceneSlotWiring.js +20 -0
- package/dist/canvas/sceneSlotWiring.js.map +1 -0
- package/dist/canvas/sceneViewRender.js +72 -0
- package/dist/canvas/sceneViewRender.js.map +1 -0
- package/dist/canvas/slopsDebugLayer.js +61 -0
- package/dist/canvas/slopsDebugLayer.js.map +1 -0
- package/dist/canvas/surfaceContribution.js +15 -0
- package/dist/canvas/surfaceContribution.js.map +1 -0
- package/dist/canvas/toolPreview.js +39 -0
- package/dist/canvas/toolPreview.js.map +1 -0
- package/dist/canvas/useCanvasRenderer.js +11 -0
- package/dist/canvas/useCanvasRenderer.js.map +1 -0
- package/dist/canvas/useFrameLoop.js +60 -0
- package/dist/canvas/useFrameLoop.js.map +1 -0
- package/dist/canvas/useHostAnchor.js +71 -0
- package/dist/canvas/useHostAnchor.js.map +1 -0
- package/dist/canvas/useLateContentRedraw.js +21 -0
- package/dist/canvas/useLateContentRedraw.js.map +1 -0
- package/dist/canvas/useRedrawOn.js +21 -0
- package/dist/canvas/useRedrawOn.js.map +1 -0
- package/dist/canvas/useViewHelpers.js +120 -0
- package/dist/canvas/useViewHelpers.js.map +1 -0
- package/dist/canvas/viewInputs.js +17 -0
- package/dist/canvas/viewInputs.js.map +1 -0
- package/dist/canvas/viewRegistry.js +61 -0
- package/dist/canvas/viewRegistry.js.map +1 -0
- package/dist/canvas/wrapNodeOutput.js +14 -0
- package/dist/canvas/wrapNodeOutput.js.map +1 -0
- package/dist/clipboard.d.ts +10 -5
- package/dist/clipboard.js +3 -5
- package/dist/clone.d.ts +3 -3
- package/dist/clone.js +2 -5
- package/dist/core/adapters/arrayAdapter.js +85 -0
- package/dist/core/adapters/arrayAdapter.js.map +1 -0
- package/dist/core/adapters/useArrayAdapter.js +13 -0
- package/dist/core/adapters/useArrayAdapter.js.map +1 -0
- package/dist/core/applyOps.js +12 -0
- package/dist/core/applyOps.js.map +1 -0
- package/dist/core/device/index.js +4 -0
- package/dist/core/device/targets.js +17 -0
- package/dist/core/device/targets.js.map +1 -0
- package/dist/core/device/useDeviceProfile.js +75 -0
- package/dist/core/device/useDeviceProfile.js.map +1 -0
- package/dist/core/fillInPoseFrame.js +102 -0
- package/dist/core/fillInPoseFrame.js.map +1 -0
- package/dist/core/geometry/poseDescriptor.js +93 -0
- package/dist/core/geometry/poseDescriptor.js.map +1 -0
- package/dist/core/geometry/poseRotation.js +58 -0
- package/dist/core/geometry/poseRotation.js.map +1 -0
- package/dist/core/geometry/regionHit.js +102 -0
- package/dist/core/geometry/regionHit.js.map +1 -0
- package/dist/core/geometry/unionBounds.js +60 -0
- package/dist/core/geometry/unionBounds.js.map +1 -0
- package/dist/core/gradient.js +136 -0
- package/dist/core/gradient.js.map +1 -0
- package/dist/core/isPlainObject.js +11 -0
- package/dist/core/isPlainObject.js.map +1 -0
- package/dist/core/layers/render.js +150 -0
- package/dist/core/layers/render.js.map +1 -0
- package/dist/core/markerInset.js +24 -0
- package/dist/core/markerInset.js.map +1 -0
- package/dist/core/mixed.js +6 -0
- package/dist/core/mixed.js.map +1 -0
- package/dist/core/ops/arrange.js +31 -0
- package/dist/core/ops/arrange.js.map +1 -0
- package/dist/core/ops/create.js +32 -0
- package/dist/core/ops/create.js.map +1 -0
- package/dist/core/ops/createHistory.js +20 -0
- package/dist/core/ops/createHistory.js.map +1 -0
- package/dist/core/ops/delete.js +89 -0
- package/dist/core/ops/delete.js.map +1 -0
- package/dist/core/ops/registry.js +17 -0
- package/dist/core/ops/registry.js.map +1 -0
- package/dist/core/ops/reorder/algorithms.js +55 -0
- package/dist/core/ops/reorder/algorithms.js.map +1 -0
- package/dist/core/ops/reorder/index.js +140 -0
- package/dist/core/ops/reorder/index.js.map +1 -0
- package/dist/core/ops/reparent.js +52 -0
- package/dist/core/ops/reparent.js.map +1 -0
- package/dist/core/ops/select.js +34 -0
- package/dist/core/ops/select.js.map +1 -0
- package/dist/core/ops/setData.js +34 -0
- package/dist/core/ops/setData.js.map +1 -0
- package/dist/core/ops/setLayer.js +34 -0
- package/dist/core/ops/setLayer.js.map +1 -0
- package/dist/core/ops/setLayout.js +31 -0
- package/dist/core/ops/setLayout.js.map +1 -0
- package/dist/core/ops/setPath.js +57 -0
- package/dist/core/ops/setPath.js.map +1 -0
- package/dist/core/ops/setText.js +34 -0
- package/dist/core/ops/setText.js.map +1 -0
- package/dist/core/ops/slot.js +37 -0
- package/dist/core/ops/slot.js.map +1 -0
- package/dist/core/ops/transform.js +42 -0
- package/dist/core/ops/transform.js.map +1 -0
- package/dist/core/paintKinds.js +156 -0
- package/dist/core/paintKinds.js.map +1 -0
- package/dist/core/scene/NodeProperties.js +20 -0
- package/dist/core/scene/NodeProperties.js.map +1 -0
- package/dist/core/scene/NodeRouting.js +24 -0
- package/dist/core/scene/NodeRouting.js.map +1 -0
- package/dist/core/scene/arrivals.js +12 -0
- package/dist/core/scene/arrivals.js.map +1 -0
- package/dist/core/scene/composeFrame.js +29 -0
- package/dist/core/scene/composeFrame.js.map +1 -0
- package/dist/core/scene/depMemo.js +18 -0
- package/dist/core/scene/depMemo.js.map +1 -0
- package/dist/core/scene/dependents.js +66 -0
- package/dist/core/scene/dependents.js.map +1 -0
- package/dist/core/scene/derivedPath.js +31 -0
- package/dist/core/scene/derivedPath.js.map +1 -0
- package/dist/core/scene/effectivePose.js +78 -0
- package/dist/core/scene/effectivePose.js.map +1 -0
- package/dist/core/scene/kitRegistry.js +33 -0
- package/dist/core/scene/kitRegistry.js.map +1 -0
- package/dist/core/scene/layoutPass.js +96 -0
- package/dist/core/scene/layoutPass.js.map +1 -0
- package/dist/core/scene/nodeFnFields.js +83 -0
- package/dist/core/scene/nodeFnFields.js.map +1 -0
- package/dist/core/scene/nodeMemo.js +28 -0
- package/dist/core/scene/nodeMemo.js.map +1 -0
- package/dist/core/scene/poseFeed.js +87 -0
- package/dist/core/scene/poseFeed.js.map +1 -0
- package/dist/core/scene/poseOverrides.js +52 -0
- package/dist/core/scene/poseOverrides.js.map +1 -0
- package/dist/core/scene/poseSnapshot.js +54 -0
- package/dist/core/scene/poseSnapshot.js.map +1 -0
- package/dist/core/scene/scene.js +1271 -0
- package/dist/core/scene/scene.js.map +1 -0
- package/dist/core/scene/types.js +6 -0
- package/dist/core/scene/types.js.map +1 -0
- package/dist/core/scene/useScene.js +32 -0
- package/dist/core/scene/useScene.js.map +1 -0
- package/dist/core/selection/chromeState.js +31 -0
- package/dist/core/selection/chromeState.js.map +1 -0
- package/dist/core/selection/selectionTarget.js +6 -0
- package/dist/core/selection/selectionTarget.js.map +1 -0
- package/dist/core/selection/useSelection.js +71 -0
- package/dist/core/selection/useSelection.js.map +1 -0
- package/dist/core/shapeKinds.js +54 -0
- package/dist/core/shapeKinds.js.map +1 -0
- package/dist/core/strokeMarkerShapes.js +139 -0
- package/dist/core/strokeMarkerShapes.js.map +1 -0
- package/dist/core/strokeMarkers.js +28 -0
- package/dist/core/strokeMarkers.js.map +1 -0
- package/dist/core/stylus/stylus.js +39 -0
- package/dist/core/stylus/stylus.js.map +1 -0
- package/dist/core/stylus/usePointerStylus.js +51 -0
- package/dist/core/stylus/usePointerStylus.js.map +1 -0
- package/dist/core/usePaintKinds.js +17 -0
- package/dist/core/usePaintKinds.js.map +1 -0
- package/dist/core/viewport/clampView.js +24 -0
- package/dist/core/viewport/clampView.js.map +1 -0
- package/dist/core/viewport/clientToWorld.js +8 -0
- package/dist/core/viewport/clientToWorld.js.map +1 -0
- package/dist/core/viewport/createVelocityTracker.js +39 -0
- package/dist/core/viewport/createVelocityTracker.js.map +1 -0
- package/dist/core/viewport/fitToBounds.js +18 -0
- package/dist/core/viewport/fitToBounds.js.map +1 -0
- package/dist/core/viewport/fitViewToBounds.js +36 -0
- package/dist/core/viewport/fitViewToBounds.js.map +1 -0
- package/dist/core/viewport/interpolateView.js +34 -0
- package/dist/core/viewport/interpolateView.js.map +1 -0
- package/dist/core/viewport/meanScale.js +8 -0
- package/dist/core/viewport/meanScale.js.map +1 -0
- package/dist/core/viewport/parallax.js +111 -0
- package/dist/core/viewport/parallax.js.map +1 -0
- package/dist/core/viewport/pxExtent.js +42 -0
- package/dist/core/viewport/pxExtent.js.map +1 -0
- package/dist/core/viewport/sceneNodeClientRect.js +18 -0
- package/dist/core/viewport/sceneNodeClientRect.js.map +1 -0
- package/dist/core/viewport/screenSlop.js +27 -0
- package/dist/core/viewport/screenSlop.js.map +1 -0
- package/dist/core/viewport/useAutoCenter.js +32 -0
- package/dist/core/viewport/useAutoCenter.js.map +1 -0
- package/dist/core/viewport/useCanvasSize.js +29 -0
- package/dist/core/viewport/useCanvasSize.js.map +1 -0
- package/dist/core/viewport/useDecayLoop.js +63 -0
- package/dist/core/viewport/useDecayLoop.js.map +1 -0
- package/dist/core/viewport/useVelocityTracker.js +10 -0
- package/dist/core/viewport/useVelocityTracker.js.map +1 -0
- package/dist/core/viewport/useViewAnimation.js +63 -0
- package/dist/core/viewport/useViewAnimation.js.map +1 -0
- package/dist/core/viewport/view.js +37 -0
- package/dist/core/viewport/view.js.map +1 -0
- package/dist/core/viewport/viewTransform.js +11 -0
- package/dist/core/viewport/viewTransform.js.map +1 -0
- package/dist/core/viewport/viewportWorldRect.js +13 -0
- package/dist/core/viewport/viewportWorldRect.js.map +1 -0
- package/dist/core/viewport/wheelHandler.js +30 -0
- package/dist/core/viewport/wheelHandler.js.map +1 -0
- package/dist/core/viewport/zoomAt.js +22 -0
- package/dist/core/viewport/zoomAt.js.map +1 -0
- package/dist/core/viewport/zoomBounds.js +20 -0
- package/dist/core/viewport/zoomBounds.js.map +1 -0
- package/dist/{pointSnapToGrid-Dp2IxLGb.d.ts → cornerHandles-BCrDp_mH.d.ts} +3 -13
- package/dist/debug/createDebugOverlayLayer.js +358 -0
- package/dist/debug/createDebugOverlayLayer.js.map +1 -0
- package/dist/debug/createDebugSink.js +83 -0
- package/dist/debug/createDebugSink.js.map +1 -0
- package/dist/debug/defaultTheme.js +31 -0
- package/dist/debug/defaultTheme.js.map +1 -0
- package/dist/debug/flag.js +41 -0
- package/dist/debug/flag.js.map +1 -0
- package/dist/debug/frameStats.js +16 -0
- package/dist/debug/frameStats.js.map +1 -0
- package/dist/debug/parseDebugFlags.js +32 -0
- package/dist/debug/parseDebugFlags.js.map +1 -0
- package/dist/features/chrome-caps/buildChromeCtx.js +16 -0
- package/dist/features/chrome-caps/buildChromeCtx.js.map +1 -0
- package/dist/features/chrome-caps/conditions.js +36 -0
- package/dist/features/chrome-caps/conditions.js.map +1 -0
- package/dist/features/chrome-caps/defaults.js +26 -0
- package/dist/features/chrome-caps/defaults.js.map +1 -0
- package/dist/features/chrome-caps/index.js +7 -0
- package/dist/features/chrome-caps/resolve.js +23 -0
- package/dist/features/chrome-caps/resolve.js.map +1 -0
- package/dist/features/chrome-caps/useHoverTracking.js +27 -0
- package/dist/features/chrome-caps/useHoverTracking.js.map +1 -0
- package/dist/features/cursor/paintedCursorLayer.js +60 -0
- package/dist/features/cursor/paintedCursorLayer.js.map +1 -0
- package/dist/features/focus/gateLayer.js +14 -0
- package/dist/features/focus/gateLayer.js.map +1 -0
- package/dist/features/focus/useCanvasFocus.js +29 -0
- package/dist/features/focus/useCanvasFocus.js.map +1 -0
- package/dist/features/groups/children.js +23 -0
- package/dist/features/groups/children.js.map +1 -0
- package/dist/features/groups/composePose.js +67 -0
- package/dist/features/groups/composePose.js.map +1 -0
- package/dist/features/groups/nestedHit.js +40 -0
- package/dist/features/groups/nestedHit.js.map +1 -0
- package/dist/features/groups/unionOfChildren.js +15 -0
- package/dist/features/groups/unionOfChildren.js.map +1 -0
- package/dist/features/images/imageCache.js +94 -0
- package/dist/features/images/imageCache.js.map +1 -0
- package/dist/features/ingestion/contentHandlers.js +37 -0
- package/dist/features/ingestion/contentHandlers.js.map +1 -0
- package/dist/features/ingestion/imageHandler.js +45 -0
- package/dist/features/ingestion/imageHandler.js.map +1 -0
- package/dist/features/ingestion/index.js +8 -0
- package/dist/features/ingestion/openFilePicker.js +15 -0
- package/dist/features/ingestion/openFilePicker.js.map +1 -0
- package/dist/features/ingestion/registerKitHandlers.js +26 -0
- package/dist/features/ingestion/registerKitHandlers.js.map +1 -0
- package/dist/features/ingestion/svgHandler.js +58 -0
- package/dist/features/ingestion/svgHandler.js.map +1 -0
- package/dist/features/ingestion/weaselJsonHandler.js +39 -0
- package/dist/features/ingestion/weaselJsonHandler.js.map +1 -0
- package/dist/features/longPress/longPressFeedback.js +96 -0
- package/dist/features/longPress/longPressFeedback.js.map +1 -0
- package/dist/features/meshPaint/bake.js +79 -0
- package/dist/features/meshPaint/bake.js.map +1 -0
- package/dist/features/meshPaint/bakeCache.js +59 -0
- package/dist/features/meshPaint/bakeCache.js.map +1 -0
- package/dist/features/meshPaint/handles.js +86 -0
- package/dist/features/meshPaint/handles.js.map +1 -0
- package/dist/features/meshPaint/lazyKind.js +1298 -0
- package/dist/features/meshPaint/lazyKind.js.map +1 -0
- package/dist/features/meshPaint/meshPaint.js +236 -0
- package/dist/features/meshPaint/meshPaint.js.map +1 -0
- package/dist/features/meshPaint/meshShader.js +6 -0
- package/dist/features/meshPaint/meshShader.js.map +1 -0
- package/dist/features/meshPaint/register.js +7 -0
- package/dist/features/meshPaint/register.js.map +1 -0
- package/dist/features/meshPaint/surface.js +110 -0
- package/dist/features/meshPaint/surface.js.map +1 -0
- package/dist/features/minimap/actions.js +53 -0
- package/dist/features/minimap/actions.js.map +1 -0
- package/dist/features/minimap/createMinimapContribution.js +96 -0
- package/dist/features/minimap/createMinimapContribution.js.map +1 -0
- package/dist/features/minimap/layers.js +103 -0
- package/dist/features/minimap/layers.js.map +1 -0
- package/dist/features/modes/modeLayers.js +113 -0
- package/dist/features/modes/modeLayers.js.map +1 -0
- package/dist/features/overlays/useNodeOverlayFrame.js +103 -0
- package/dist/features/overlays/useNodeOverlayFrame.js.map +1 -0
- package/dist/features/parallax/createParallaxLayer.js +26 -0
- package/dist/features/parallax/createParallaxLayer.js.map +1 -0
- package/dist/features/parallax/createParallaxPlane.js +26 -0
- package/dist/features/parallax/createParallaxPlane.js.map +1 -0
- package/dist/features/paths/anchorEdits.js +156 -0
- package/dist/features/paths/anchorEdits.js.map +1 -0
- package/dist/features/paths/anchors.js +154 -0
- package/dist/features/paths/anchors.js.map +1 -0
- package/dist/features/paths/booleans.js +2 -0
- package/dist/features/paths/index.js +15 -0
- package/dist/features/paths/markerCommands.js +116 -0
- package/dist/features/paths/markerCommands.js.map +1 -0
- package/dist/features/paths/markerSites.js +59 -0
- package/dist/features/paths/markerSites.js.map +1 -0
- package/dist/features/paths/markers.js +95 -0
- package/dist/features/paths/markers.js.map +1 -0
- package/dist/features/paths/nearestAnchor.js +36 -0
- package/dist/features/paths/nearestAnchor.js.map +1 -0
- package/dist/features/paths/originProjection.js +16 -0
- package/dist/features/paths/originProjection.js.map +1 -0
- package/dist/features/paths/pathEditingOverlayLayer.js +137 -0
- package/dist/features/paths/pathEditingOverlayLayer.js.map +1 -0
- package/dist/features/paths/pathInWorld.js +41 -0
- package/dist/features/paths/pathInWorld.js.map +1 -0
- package/dist/features/paths/pathLayer.js +44 -0
- package/dist/features/paths/pathLayer.js.map +1 -0
- package/dist/features/paths/penPreviewLayer.js +220 -0
- package/dist/features/paths/penPreviewLayer.js.map +1 -0
- package/dist/features/paths/poseDescriptor.js +39 -0
- package/dist/features/paths/poseDescriptor.js.map +1 -0
- package/dist/features/paths/tessellate/stroke.js +230 -0
- package/dist/features/paths/tessellate/stroke.js.map +1 -0
- package/dist/features/patterns/index.js +23 -0
- package/dist/features/patterns/index.js.map +1 -0
- package/dist/features/patterns/patterns-builtin.js +38 -0
- package/dist/features/patterns/patterns-builtin.js.map +1 -0
- package/dist/features/patterns/resolveSpec.js +57 -0
- package/dist/features/patterns/resolveSpec.js.map +1 -0
- package/dist/features/patterns/tileGeometry.js +158 -0
- package/dist/features/patterns/tileGeometry.js.map +1 -0
- package/dist/features/pointer/PointerContext.js +45 -0
- package/dist/features/pointer/PointerContext.js.map +1 -0
- package/dist/features/poseRun/usePoseRun.js +70 -0
- package/dist/features/poseRun/usePoseRun.js.map +1 -0
- package/dist/features/selection/SelectionContext.js +46 -0
- package/dist/features/selection/SelectionContext.js.map +1 -0
- package/dist/features/selection/overlay.js +442 -0
- package/dist/features/selection/overlay.js.map +1 -0
- package/dist/features/simulation/createSimulation.js +61 -0
- package/dist/features/simulation/createSimulation.js.map +1 -0
- package/dist/features/simulation/types.js +6 -0
- package/dist/features/simulation/types.js.map +1 -0
- package/dist/features/simulation/useSimulation.js +74 -0
- package/dist/features/simulation/useSimulation.js.map +1 -0
- package/dist/features/text/domRuns.js +258 -0
- package/dist/features/text/domRuns.js.map +1 -0
- package/dist/features/text/fitTextPose.js +38 -0
- package/dist/features/text/fitTextPose.js.map +1 -0
- package/dist/features/text/hitTest.js +45 -0
- package/dist/features/text/hitTest.js.map +1 -0
- package/dist/features/text/renderLabel.js +14 -0
- package/dist/features/text/renderLabel.js.map +1 -0
- package/dist/features/text/runs/effectiveRangeStyle.js +66 -0
- package/dist/features/text/runs/effectiveRangeStyle.js.map +1 -0
- package/dist/features/text/runs/flagRange.js +53 -0
- package/dist/features/text/runs/flagRange.js.map +1 -0
- package/dist/features/text/runs/rangeStyle.js +135 -0
- package/dist/features/text/runs/rangeStyle.js.map +1 -0
- package/dist/features/text/textCommand.js +59 -0
- package/dist/features/text/textCommand.js.map +1 -0
- package/dist/features/text/textLayer.js +35 -0
- package/dist/features/text/textLayer.js.map +1 -0
- package/dist/features/text/textToPath.js +181 -0
- package/dist/features/text/textToPath.js.map +1 -0
- package/dist/features/text/useSceneTextEdit.js +138 -0
- package/dist/features/text/useSceneTextEdit.js.map +1 -0
- package/dist/features/text/useTextEdit.js +465 -0
- package/dist/features/text/useTextEdit.js.map +1 -0
- package/dist/features/tiling/createTiledLayer.js +63 -0
- package/dist/features/tiling/createTiledLayer.js.map +1 -0
- package/dist/features/tiling/tiledProject.js +14 -0
- package/dist/features/tiling/tiledProject.js.map +1 -0
- package/dist/features/viewports/viewResolver.js +59 -0
- package/dist/features/viewports/viewResolver.js.map +1 -0
- package/dist/features/viewports/viewportLayer.js +58 -0
- package/dist/features/viewports/viewportLayer.js.map +1 -0
- package/dist/icons/ArrowIcon.js +23 -0
- package/dist/icons/ArrowIcon.js.map +1 -0
- package/dist/icons/EllipseIcon.js +21 -0
- package/dist/icons/EllipseIcon.js.map +1 -0
- package/dist/icons/EyedropperIcon.js +49 -0
- package/dist/icons/EyedropperIcon.js.map +1 -0
- package/dist/icons/HandIcon.js +59 -0
- package/dist/icons/HandIcon.js.map +1 -0
- package/dist/icons/ImageIcon.js +34 -0
- package/dist/icons/ImageIcon.js.map +1 -0
- package/dist/icons/LassoIcon.js +22 -0
- package/dist/icons/LassoIcon.js.map +1 -0
- package/dist/icons/LineIcon.js +22 -0
- package/dist/icons/LineIcon.js.map +1 -0
- package/dist/icons/PenIcon.js +36 -0
- package/dist/icons/PenIcon.js.map +1 -0
- package/dist/icons/PencilIcon.js +25 -0
- package/dist/icons/PencilIcon.js.map +1 -0
- package/dist/icons/PolygonIcon.js +19 -0
- package/dist/icons/PolygonIcon.js.map +1 -0
- package/dist/icons/RectIcon.js +37 -0
- package/dist/icons/RectIcon.js.map +1 -0
- package/dist/icons/SelectIcon.js +20 -0
- package/dist/icons/SelectIcon.js.map +1 -0
- package/dist/icons/StarIcon.js +19 -0
- package/dist/icons/StarIcon.js.map +1 -0
- package/dist/icons/TextIcon.js +19 -0
- package/dist/icons/TextIcon.js.map +1 -0
- package/dist/icons/UnknownIcon.js +33 -0
- package/dist/icons/UnknownIcon.js.map +1 -0
- package/dist/icons/_base.js +12 -0
- package/dist/icons/_base.js.map +1 -0
- package/dist/index.d.ts +1960 -1891
- package/dist/index.js +312 -13
- package/dist/input/keyState.js +76 -0
- package/dist/input/keyState.js.map +1 -0
- package/dist/input/useKeyState.js +22 -0
- package/dist/input/useKeyState.js.map +1 -0
- package/dist/interactions/actions/actionShortcuts.js +32 -0
- package/dist/interactions/actions/actionShortcuts.js.map +1 -0
- package/dist/interactions/actions/align/align.js +81 -0
- package/dist/interactions/actions/align/align.js.map +1 -0
- package/dist/interactions/actions/booleans/booleans.js +120 -0
- package/dist/interactions/actions/booleans/booleans.js.map +1 -0
- package/dist/interactions/actions/booleans/useBooleans.js +20 -0
- package/dist/interactions/actions/booleans/useBooleans.js.map +1 -0
- package/dist/interactions/actions/booleans/useBooleansAdapter.js +9 -0
- package/dist/interactions/actions/booleans/useBooleansAdapter.js.map +1 -0
- package/dist/interactions/actions/clipboard/clipboardOps.js +94 -0
- package/dist/interactions/actions/clipboard/clipboardOps.js.map +1 -0
- package/dist/interactions/actions/clipboard/materializePaste.js +25 -0
- package/dist/interactions/actions/clipboard/materializePaste.js.map +1 -0
- package/dist/interactions/actions/clipboard/wireFormat.js +43 -0
- package/dist/interactions/actions/clipboard/wireFormat.js.map +1 -0
- package/dist/interactions/actions/clone/behaviors/cloneByAltDrag.js +26 -0
- package/dist/interactions/actions/clone/behaviors/cloneByAltDrag.js.map +1 -0
- package/dist/interactions/actions/defaultCommitAdapter.js +42 -0
- package/dist/interactions/actions/defaultCommitAdapter.js.map +1 -0
- package/dist/interactions/actions/defaults/align.js +71 -0
- package/dist/interactions/actions/defaults/align.js.map +1 -0
- package/dist/interactions/actions/defaults/anchorEditing.js +235 -0
- package/dist/interactions/actions/defaults/anchorEditing.js.map +1 -0
- package/dist/interactions/actions/defaults/areaSelect.js +75 -0
- package/dist/interactions/actions/defaults/areaSelect.js.map +1 -0
- package/dist/interactions/actions/defaults/booleans.js +52 -0
- package/dist/interactions/actions/defaults/booleans.js.map +1 -0
- package/dist/interactions/actions/defaults/cancelGesture.js +24 -0
- package/dist/interactions/actions/defaults/cancelGesture.js.map +1 -0
- package/dist/interactions/actions/defaults/clearSelection.js +19 -0
- package/dist/interactions/actions/defaults/clearSelection.js.map +1 -0
- package/dist/interactions/actions/defaults/clipboard.js +78 -0
- package/dist/interactions/actions/defaults/clipboard.js.map +1 -0
- package/dist/interactions/actions/defaults/clone.js +107 -0
- package/dist/interactions/actions/defaults/clone.js.map +1 -0
- package/dist/interactions/actions/defaults/createOutlines.js +47 -0
- package/dist/interactions/actions/defaults/createOutlines.js.map +1 -0
- package/dist/interactions/actions/defaults/createPaintAction.js +85 -0
- package/dist/interactions/actions/defaults/createPaintAction.js.map +1 -0
- package/dist/interactions/actions/defaults/delete.js +61 -0
- package/dist/interactions/actions/defaults/delete.js.map +1 -0
- package/dist/interactions/actions/defaults/distribute.js +66 -0
- package/dist/interactions/actions/defaults/distribute.js.map +1 -0
- package/dist/interactions/actions/defaults/duplicate.js +83 -0
- package/dist/interactions/actions/defaults/duplicate.js.map +1 -0
- package/dist/interactions/actions/defaults/editAnchors.js +100 -0
- package/dist/interactions/actions/defaults/editAnchors.js.map +1 -0
- package/dist/interactions/actions/defaults/enterPathEdit.js +29 -0
- package/dist/interactions/actions/defaults/enterPathEdit.js.map +1 -0
- package/dist/interactions/actions/defaults/enterTextEdit.js +20 -0
- package/dist/interactions/actions/defaults/enterTextEdit.js.map +1 -0
- package/dist/interactions/actions/defaults/escape.js +26 -0
- package/dist/interactions/actions/defaults/escape.js.map +1 -0
- package/dist/interactions/actions/defaults/exitPathEdit.js +22 -0
- package/dist/interactions/actions/defaults/exitPathEdit.js.map +1 -0
- package/dist/interactions/actions/defaults/flip.js +119 -0
- package/dist/interactions/actions/defaults/flip.js.map +1 -0
- package/dist/interactions/actions/defaults/freshNodeId.js +10 -0
- package/dist/interactions/actions/defaults/freshNodeId.js.map +1 -0
- package/dist/interactions/actions/defaults/group.js +131 -0
- package/dist/interactions/actions/defaults/group.js.map +1 -0
- package/dist/interactions/actions/defaults/icons/actionGlyphIcons.js +40 -0
- package/dist/interactions/actions/defaults/icons/actionGlyphIcons.js.map +1 -0
- package/dist/interactions/actions/defaults/icons/actionGlyphs.js +10 -0
- package/dist/interactions/actions/defaults/icons/actionGlyphs.js.map +1 -0
- package/dist/interactions/actions/defaults/icons/alignIcons.js +173 -0
- package/dist/interactions/actions/defaults/icons/alignIcons.js.map +1 -0
- package/dist/interactions/actions/defaults/icons/booleanIcons.js +171 -0
- package/dist/interactions/actions/defaults/icons/booleanIcons.js.map +1 -0
- package/dist/interactions/actions/defaults/icons/distributeIcons.js +63 -0
- package/dist/interactions/actions/defaults/icons/distributeIcons.js.map +1 -0
- package/dist/interactions/actions/defaults/icons/editIcons.js +280 -0
- package/dist/interactions/actions/defaults/icons/editIcons.js.map +1 -0
- package/dist/interactions/actions/defaults/icons/outlineIcons.js +53 -0
- package/dist/interactions/actions/defaults/icons/outlineIcons.js.map +1 -0
- package/dist/interactions/actions/defaults/ingest.js +58 -0
- package/dist/interactions/actions/defaults/ingest.js.map +1 -0
- package/dist/interactions/actions/defaults/insert.js +288 -0
- package/dist/interactions/actions/defaults/insert.js.map +1 -0
- package/dist/interactions/actions/defaults/insertPathAnchor.js +50 -0
- package/dist/interactions/actions/defaults/insertPathAnchor.js.map +1 -0
- package/dist/interactions/actions/defaults/lassoSelect.js +156 -0
- package/dist/interactions/actions/defaults/lassoSelect.js.map +1 -0
- package/dist/interactions/actions/defaults/move.js +760 -0
- package/dist/interactions/actions/defaults/move.js.map +1 -0
- package/dist/interactions/actions/defaults/nudge.js +110 -0
- package/dist/interactions/actions/defaults/nudge.js.map +1 -0
- package/dist/interactions/actions/defaults/pinchZoom.js +63 -0
- package/dist/interactions/actions/defaults/pinchZoom.js.map +1 -0
- package/dist/interactions/actions/defaults/reorder.js +143 -0
- package/dist/interactions/actions/defaults/reorder.js.map +1 -0
- package/dist/interactions/actions/defaults/requiresSelection.js +10 -0
- package/dist/interactions/actions/defaults/requiresSelection.js.map +1 -0
- package/dist/interactions/actions/defaults/resize.js +335 -0
- package/dist/interactions/actions/defaults/resize.js.map +1 -0
- package/dist/interactions/actions/defaults/rotate.js +184 -0
- package/dist/interactions/actions/defaults/rotate.js.map +1 -0
- package/dist/interactions/actions/defaults/selectAll.js +27 -0
- package/dist/interactions/actions/defaults/selectAll.js.map +1 -0
- package/dist/interactions/actions/defaults/setFill.js +27 -0
- package/dist/interactions/actions/defaults/setFill.js.map +1 -0
- package/dist/interactions/actions/defaults/setFillOpacity.js +15 -0
- package/dist/interactions/actions/defaults/setFillOpacity.js.map +1 -0
- package/dist/interactions/actions/defaults/setStroke.js +36 -0
- package/dist/interactions/actions/defaults/setStroke.js.map +1 -0
- package/dist/interactions/actions/defaults/setStrokeOpacity.js +21 -0
- package/dist/interactions/actions/defaults/setStrokeOpacity.js.map +1 -0
- package/dist/interactions/actions/defaults/slice.js +39 -0
- package/dist/interactions/actions/defaults/slice.js.map +1 -0
- package/dist/interactions/actions/defaults/sliceOps.js +60 -0
- package/dist/interactions/actions/defaults/sliceOps.js.map +1 -0
- package/dist/interactions/actions/defaults/toolActivate.js +35 -0
- package/dist/interactions/actions/defaults/toolActivate.js.map +1 -0
- package/dist/interactions/actions/defaults/toolResetToDefault.js +26 -0
- package/dist/interactions/actions/defaults/toolResetToDefault.js.map +1 -0
- package/dist/interactions/actions/defaults/undoRedo.js +51 -0
- package/dist/interactions/actions/defaults/undoRedo.js.map +1 -0
- package/dist/interactions/actions/defaults/viewportDragPan.js +88 -0
- package/dist/interactions/actions/defaults/viewportDragPan.js.map +1 -0
- package/dist/interactions/actions/defaults/viewportWheelPan.js +57 -0
- package/dist/interactions/actions/defaults/viewportWheelPan.js.map +1 -0
- package/dist/interactions/actions/defaults/viewportZoom.js +143 -0
- package/dist/interactions/actions/defaults/viewportZoom.js.map +1 -0
- package/dist/interactions/actions/distribute/distribute.js +42 -0
- package/dist/interactions/actions/distribute/distribute.js.map +1 -0
- package/dist/interactions/actions/distribute/plan.js +29 -0
- package/dist/interactions/actions/distribute/plan.js.map +1 -0
- package/dist/interactions/actions/edit-anchors/geometry.js +61 -0
- package/dist/interactions/actions/edit-anchors/geometry.js.map +1 -0
- package/dist/interactions/actions/edit-anchors/handles.js +43 -0
- package/dist/interactions/actions/edit-anchors/handles.js.map +1 -0
- package/dist/interactions/actions/flip/helpers.js +35 -0
- package/dist/interactions/actions/flip/helpers.js.map +1 -0
- package/dist/interactions/actions/geometryProjection.js +18 -0
- package/dist/interactions/actions/geometryProjection.js.map +1 -0
- package/dist/interactions/actions/gestureLifecycle.js +44 -0
- package/dist/interactions/actions/gestureLifecycle.js.map +1 -0
- package/dist/interactions/actions/lasso-select/behaviors/selectFromLasso.js +39 -0
- package/dist/interactions/actions/lasso-select/behaviors/selectFromLasso.js.map +1 -0
- package/dist/interactions/actions/move/behaviors/snapBackOrDelete.js +36 -0
- package/dist/interactions/actions/move/behaviors/snapBackOrDelete.js.map +1 -0
- package/dist/interactions/actions/move/behaviors/snapToContainer.js +67 -0
- package/dist/interactions/actions/move/behaviors/snapToContainer.js.map +1 -0
- package/dist/interactions/actions/move/gestureAdapter.js +37 -0
- package/dist/interactions/actions/move/gestureAdapter.js.map +1 -0
- package/dist/interactions/actions/outlines/createOutlines.js +84 -0
- package/dist/interactions/actions/outlines/createOutlines.js.map +1 -0
- package/dist/interactions/actions/outlines/useCreateOutlinesAdapter.js +9 -0
- package/dist/interactions/actions/outlines/useCreateOutlinesAdapter.js.map +1 -0
- package/dist/interactions/actions/planeInput.js +181 -0
- package/dist/interactions/actions/planeInput.js.map +1 -0
- package/dist/interactions/actions/poseDescriptorDep.js +9 -0
- package/dist/interactions/actions/poseDescriptorDep.js.map +1 -0
- package/dist/interactions/actions/poseFrame.js +38 -0
- package/dist/interactions/actions/poseFrame.js.map +1 -0
- package/dist/interactions/actions/previewOverrides.js +25 -0
- package/dist/interactions/actions/previewOverrides.js.map +1 -0
- package/dist/interactions/actions/resize/autoPoseDescriptor.js +31 -0
- package/dist/interactions/actions/resize/autoPoseDescriptor.js.map +1 -0
- package/dist/interactions/actions/resize/behaviors/clampMinSize.js +18 -0
- package/dist/interactions/actions/resize/behaviors/clampMinSize.js.map +1 -0
- package/dist/interactions/actions/resize/behaviors/index.js +8 -0
- package/dist/interactions/actions/resize/behaviors/index.js.map +1 -0
- package/dist/interactions/actions/resize/behaviors/lockAspect.js +24 -0
- package/dist/interactions/actions/resize/behaviors/lockAspect.js.map +1 -0
- package/dist/interactions/actions/resize/cornerHandles.js +72 -0
- package/dist/interactions/actions/resize/cornerHandles.js.map +1 -0
- package/dist/interactions/actions/resolveOverlays.js +60 -0
- package/dist/interactions/actions/resolveOverlays.js.map +1 -0
- package/dist/interactions/actions/resolvePreviews.js +61 -0
- package/dist/interactions/actions/resolvePreviews.js.map +1 -0
- package/dist/interactions/actions/rotate/geometry.js +46 -0
- package/dist/interactions/actions/rotate/geometry.js.map +1 -0
- package/dist/interactions/actions/rotate/handle.js +27 -0
- package/dist/interactions/actions/rotate/handle.js.map +1 -0
- package/dist/interactions/actions/spatialReference.js +42 -0
- package/dist/interactions/actions/spatialReference.js.map +1 -0
- package/dist/interactions/actions/useStandardActions.js +142 -0
- package/dist/interactions/actions/useStandardActions.js.map +1 -0
- package/dist/interactions/gestures/dragGesture/dragGesture.js +111 -0
- package/dist/interactions/gestures/dragGesture/dragGesture.js.map +1 -0
- package/dist/interactions/gestures/dragRadial/dragRadial.js +117 -0
- package/dist/interactions/gestures/dragRadial/dragRadial.js.map +1 -0
- package/dist/interactions/gestures/dragRect/dragRect.js +164 -0
- package/dist/interactions/gestures/dragRect/dragRect.js.map +1 -0
- package/dist/interactions/gestures/handleDrag/handleDrag.js +46 -0
- package/dist/interactions/gestures/handleDrag/handleDrag.js.map +1 -0
- package/dist/interactions/gestures/pointerDrag/pointerDrag.js +118 -0
- package/dist/interactions/gestures/pointerDrag/pointerDrag.js.map +1 -0
- package/dist/interactions/gestures/shared/originProjection.js +42 -0
- package/dist/interactions/gestures/shared/originProjection.js.map +1 -0
- package/dist/interactions/gestures/shared/screenTolerance.js +21 -0
- package/dist/interactions/gestures/shared/screenTolerance.js.map +1 -0
- package/dist/interactions/gestures/shared/snap.js +24 -0
- package/dist/interactions/gestures/shared/snap.js.map +1 -0
- package/dist/interactions/gestures/thresholdDrag/thresholdDrag.js +30 -0
- package/dist/interactions/gestures/thresholdDrag/thresholdDrag.js.map +1 -0
- package/dist/layout/arrivals.js +36 -0
- package/dist/layout/arrivals.js.map +1 -0
- package/dist/{math-MCQcf_gc.d.ts → math-Drrw4ewZ.d.ts} +8 -116
- package/dist/math.d.ts +4 -5
- package/dist/math.js +6 -4
- package/dist/mesh.d.ts +268 -0
- package/dist/mesh.js +7 -0
- package/dist/move.d.ts +7 -49
- package/dist/move.js +3 -142
- package/dist/originProjection-DEklpDc_.d.ts +57 -0
- package/dist/patterns-builtin.js +3 -3
- package/dist/{poseDescriptor-rZa9W5hJ.d.ts → poseDescriptor-D-OH-tu5.d.ts} +0 -4
- package/dist/registerProgram-ateHDGjw.d.ts +193 -0
- package/dist/renderer/DrawCommand.js +6 -0
- package/dist/renderer/DrawCommand.js.map +1 -0
- package/dist/renderer/WeaselRenderer.js +328 -0
- package/dist/renderer/WeaselRenderer.js.map +1 -0
- package/dist/renderer/cache/GLImageCache.js +64 -0
- package/dist/renderer/cache/GLImageCache.js.map +1 -0
- package/dist/renderer/cache/GLMeshCache.js +102 -0
- package/dist/renderer/cache/GLMeshCache.js.map +1 -0
- package/dist/renderer/cache/GLTextureCache.js +51 -0
- package/dist/renderer/cache/GLTextureCache.js.map +1 -0
- package/dist/renderer/cache/GradientRampAtlas.js +82 -0
- package/dist/renderer/cache/GradientRampAtlas.js.map +1 -0
- package/dist/renderer/cache/cache.js +13 -0
- package/dist/renderer/cache/cache.js.map +1 -0
- package/dist/renderer/cache/markerCommandCache.js +59 -0
- package/dist/renderer/cache/markerCommandCache.js.map +1 -0
- package/dist/renderer/cache/outlineMeshCache.js +15 -0
- package/dist/renderer/cache/outlineMeshCache.js.map +1 -0
- package/dist/renderer/cache/outlineStrokeMeshCache.js +31 -0
- package/dist/renderer/cache/outlineStrokeMeshCache.js.map +1 -0
- package/dist/renderer/cache/strokeMeshCache.js +44 -0
- package/dist/renderer/cache/strokeMeshCache.js.map +1 -0
- package/dist/renderer/cullDrawCommands.js +89 -0
- package/dist/renderer/cullDrawCommands.js.map +1 -0
- package/dist/renderer/draw.js +1109 -0
- package/dist/renderer/draw.js.map +1 -0
- package/dist/renderer/drawBatch.js +168 -0
- package/dist/renderer/drawBatch.js.map +1 -0
- package/dist/renderer/effects/EffectTargets.js +45 -0
- package/dist/renderer/effects/EffectTargets.js.map +1 -0
- package/dist/renderer/effects/builtins.js +31 -0
- package/dist/renderer/effects/builtins.js.map +1 -0
- package/dist/renderer/effects/composite.js +9 -0
- package/dist/renderer/effects/composite.js.map +1 -0
- package/dist/renderer/effects/effectPrelude.js +10 -0
- package/dist/renderer/effects/effectPrelude.js.map +1 -0
- package/dist/renderer/effects/types.js +10 -0
- package/dist/renderer/effects/types.js.map +1 -0
- package/dist/renderer/index.js +19 -0
- package/dist/renderer/math/color.js +341 -0
- package/dist/renderer/math/color.js.map +1 -0
- package/dist/renderer/math/mat3.js +71 -0
- package/dist/renderer/math/mat3.js.map +1 -0
- package/dist/renderer/math/patternSpace.js +22 -0
- package/dist/renderer/math/patternSpace.js.map +1 -0
- package/dist/renderer/math/viewToMat3.js +19 -0
- package/dist/renderer/math/viewToMat3.js.map +1 -0
- package/dist/renderer/paintResources.js +18 -0
- package/dist/renderer/paintResources.js.map +1 -0
- package/dist/renderer/paintScratch.js +37 -0
- package/dist/renderer/paintScratch.js.map +1 -0
- package/dist/renderer/shaders/ShaderProgram.js +74 -0
- package/dist/renderer/shaders/ShaderProgram.js.map +1 -0
- package/dist/renderer/shaders/batchFill.js +118 -0
- package/dist/renderer/shaders/batchFill.js.map +1 -0
- package/dist/renderer/shaders/customPrelude.js +34 -0
- package/dist/renderer/shaders/customPrelude.js.map +1 -0
- package/dist/renderer/shaders/extractUniformNames.js +184 -0
- package/dist/renderer/shaders/extractUniformNames.js.map +1 -0
- package/dist/renderer/shaders/glyphPaint.js +61 -0
- package/dist/renderer/shaders/glyphPaint.js.map +1 -0
- package/dist/renderer/shaders/gradFill.js +30 -0
- package/dist/renderer/shaders/gradFill.js.map +1 -0
- package/dist/renderer/shaders/imageFill.js +14 -0
- package/dist/renderer/shaders/imageFill.js.map +1 -0
- package/dist/renderer/shaders/pathFill.js +13 -0
- package/dist/renderer/shaders/pathFill.js.map +1 -0
- package/dist/renderer/shaders/patternFill.js +24 -0
- package/dist/renderer/shaders/patternFill.js.map +1 -0
- package/dist/renderer/shaders/registerProgram.js +18 -0
- package/dist/renderer/shaders/registerProgram.js.map +1 -0
- package/dist/renderer/spriteSheet.js +14 -0
- package/dist/renderer/spriteSheet.js.map +1 -0
- package/dist/renderer/state/GroupState.js +77 -0
- package/dist/renderer/state/GroupState.js.map +1 -0
- package/dist/renderer/syntheticItalic.js +6 -0
- package/dist/renderer/syntheticItalic.js.map +1 -0
- package/dist/renderer/textures/registerTexture.js +14 -0
- package/dist/renderer/textures/registerTexture.js.map +1 -0
- package/dist/renderer.d.ts +11 -21
- package/dist/renderer.js +18 -13
- package/dist/resize.d.ts +10 -46
- package/dist/resize.js +7 -5
- package/dist/routing.js +2 -3
- package/dist/scheduling/useVisibleRaf.js +69 -0
- package/dist/scheduling/useVisibleRaf.js.map +1 -0
- package/dist/style.css +2 -0
- package/dist/test-hook/createTestHook.js +39 -0
- package/dist/test-hook/createTestHook.js.map +1 -0
- package/dist/test-hook/install.js +12 -0
- package/dist/test-hook/install.js.map +1 -0
- package/dist/test-seams-fYf6m5pu.d.ts +356 -0
- package/dist/test-seams.d.ts +6 -0
- package/dist/test-seams.js +3 -0
- package/dist/tools/builtin/ellipse/useEllipseTool.js +33 -0
- package/dist/tools/builtin/ellipse/useEllipseTool.js.map +1 -0
- package/dist/tools/builtin/eyedropper/useEyedropperTool.js +55 -0
- package/dist/tools/builtin/eyedropper/useEyedropperTool.js.map +1 -0
- package/dist/tools/builtin/hand/dragPanContribution.js +17 -0
- package/dist/tools/builtin/hand/dragPanContribution.js.map +1 -0
- package/dist/tools/builtin/hand/useHandTool.js +31 -0
- package/dist/tools/builtin/hand/useHandTool.js.map +1 -0
- package/dist/tools/builtin/image/useImageTool.js +41 -0
- package/dist/tools/builtin/image/useImageTool.js.map +1 -0
- package/dist/tools/builtin/lasso/useLassoTool.js +42 -0
- package/dist/tools/builtin/lasso/useLassoTool.js.map +1 -0
- package/dist/tools/builtin/line/useLineTool.js +33 -0
- package/dist/tools/builtin/line/useLineTool.js.map +1 -0
- package/dist/tools/builtin/pen/usePenTool.js +414 -0
- package/dist/tools/builtin/pen/usePenTool.js.map +1 -0
- package/dist/tools/builtin/pencil/usePencilTool.js +36 -0
- package/dist/tools/builtin/pencil/usePencilTool.js.map +1 -0
- package/dist/tools/builtin/pickTopMostHit.js +45 -0
- package/dist/tools/builtin/pickTopMostHit.js.map +1 -0
- package/dist/tools/builtin/polygon/usePolygonTool.js +81 -0
- package/dist/tools/builtin/polygon/usePolygonTool.js.map +1 -0
- package/dist/tools/builtin/rect/useRectTool.js +32 -0
- package/dist/tools/builtin/rect/useRectTool.js.map +1 -0
- package/dist/tools/builtin/select/selectionContributions.js +109 -0
- package/dist/tools/builtin/select/selectionContributions.js.map +1 -0
- package/dist/tools/builtin/select/useSelectTool.js +162 -0
- package/dist/tools/builtin/select/useSelectTool.js.map +1 -0
- package/dist/tools/builtin/shared/insertToolOptions.js +8 -0
- package/dist/tools/builtin/shared/insertToolOptions.js.map +1 -0
- package/dist/tools/builtin/slice/useSliceTool.js +263 -0
- package/dist/tools/builtin/slice/useSliceTool.js.map +1 -0
- package/dist/tools/builtin/star/useStarTool.js +82 -0
- package/dist/tools/builtin/star/useStarTool.js.map +1 -0
- package/dist/tools/builtin/text/useTextTool.js +177 -0
- package/dist/tools/builtin/text/useTextTool.js.map +1 -0
- package/dist/tools/overlayBinding.js +8 -0
- package/dist/tools/overlayBinding.js.map +1 -0
- package/dist/tools/prefs.js +47 -0
- package/dist/tools/prefs.js.map +1 -0
- package/dist/tools/useKeybindings.js +66 -0
- package/dist/tools/useKeybindings.js.map +1 -0
- package/dist/{types-D-9QWBy5.d.ts → types-A37hYkeR.d.ts} +185 -15
- package/dist/{types-qYpyTAiZ.d.ts → types-B_9g6hMM.d.ts} +32 -6
- package/dist/util/color.js +26 -0
- package/dist/util/color.js.map +1 -0
- package/dist/util/constrainTo45.js +17 -0
- package/dist/util/constrainTo45.js.map +1 -0
- package/dist/util/paint.js +72 -0
- package/dist/util/paint.js.map +1 -0
- package/dist/version.js +6 -0
- package/dist/version.js.map +1 -0
- package/package.json +31 -19
- package/dist/chunk-3TY6FHAF.js +0 -170
- package/dist/chunk-3TY6FHAF.js.map +0 -1
- package/dist/chunk-DGWNNKGD.js +0 -248
- package/dist/chunk-DGWNNKGD.js.map +0 -1
- package/dist/chunk-G4ZGQMY7.js +0 -33372
- package/dist/chunk-G4ZGQMY7.js.map +0 -1
- package/dist/chunk-L5YNZYEG.js +0 -648
- package/dist/chunk-L5YNZYEG.js.map +0 -1
- package/dist/chunk-LU4IJ52W.js +0 -111
- package/dist/chunk-LU4IJ52W.js.map +0 -1
- package/dist/chunk-M24CLARN.js +0 -28
- package/dist/chunk-M24CLARN.js.map +0 -1
- package/dist/chunk-NE27EOLP.js +0 -146
- package/dist/chunk-NE27EOLP.js.map +0 -1
- package/dist/chunk-PNNZSYRD.js +0 -318
- package/dist/chunk-PNNZSYRD.js.map +0 -1
- package/dist/chunk-UPZY4ART.js +0 -29
- package/dist/chunk-UPZY4ART.js.map +0 -1
- package/dist/chunk-WPNA6L5O.js +0 -250
- package/dist/chunk-WPNA6L5O.js.map +0 -1
- package/dist/chunk-XMAWPGTK.js +0 -128
- package/dist/chunk-XMAWPGTK.js.map +0 -1
- package/dist/clipboard.js.map +0 -1
- package/dist/clone.js.map +0 -1
- package/dist/grid-CY5UKlZh.d.ts +0 -98
- package/dist/index.css +0 -62
- package/dist/index.css.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/insert.d.ts +0 -36
- package/dist/insert.js +0 -81
- package/dist/insert.js.map +0 -1
- package/dist/math.js.map +0 -1
- package/dist/move.js.map +0 -1
- package/dist/path-JEV2c5If.d.ts +0 -48
- package/dist/patterns-builtin.js.map +0 -1
- package/dist/renderer.css +0 -62
- package/dist/renderer.css.map +0 -1
- package/dist/renderer.js.map +0 -1
- package/dist/resize.js.map +0 -1
- package/dist/routing.js.map +0 -1
- package/dist/types-D2tTKEU0.d.ts +0 -18
|
@@ -1,18 +1,85 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { G as GlMat3, a as ShaderProgramHandle, b as ShaderUniform, c as ShaderProgram } from './registerProgram-ateHDGjw.js';
|
|
2
|
+
import { Mesh } from '@weasel-js/geom/tessellate';
|
|
3
|
+
import { GradStop, ColorSpace, FillStyle, Stroke, ScreenLength } from '@weasel-js/paint';
|
|
4
|
+
import { NodeId, Bounds, View, ModifierState, SelectionApi, ActionDeps, IngestItem, DragSample, DebugSink, Point2, LongPressState, AnyToolOf, Contribution as Contribution$1, ContributionChrome as ContributionChrome$1, Tool as Tool$1, ToolDef as ToolDef$1 } from '@weasel-js/routing';
|
|
5
|
+
import { Path, EasingSpec, SpringPresetName, PolygonPath, Rect, Mat3 } from '@weasel-js/geom';
|
|
4
6
|
import { ReactNode } from 'react';
|
|
5
7
|
import * as _weasel_js_history from '@weasel-js/history';
|
|
6
8
|
import { Op, History, SerializedHistory } from '@weasel-js/history';
|
|
7
|
-
import { a as
|
|
8
|
-
import {
|
|
9
|
+
import { L as LayoutStrategy, a as ParallaxOpts, C as ContainerBounds, b as SceneAdapter, P as PlaneMap, R as RegionPickView, c as LayoutDropTargetMode, d as ReflowTransition, I as InsertAdapter } from './types-A37hYkeR.js';
|
|
10
|
+
import { FontStyle } from '@weasel-js/font';
|
|
11
|
+
import { ResolvedRun, TextStyle, TextVerticalAlign, StyledRun } from '@weasel-js/text';
|
|
12
|
+
import { P as PoseDescriptor } from './poseDescriptor-D-OH-tu5.js';
|
|
9
13
|
import { ActiveToolContextValue, ToolsApi as ToolsApi$1, UseToolsOptions as UseToolsOptions$1 } from '@weasel-js/routing/react';
|
|
10
|
-
import { B as BoundsConstraint, P as PointSnapBehavior } from './types-
|
|
11
|
-
import { Mat3 } from '@weasel-js/geom';
|
|
12
|
-
import { ResolvedRun, TextStyle, TextVerticalAlign } from '@weasel-js/text';
|
|
14
|
+
import { B as BoundsConstraint, P as PointSnapBehavior } from './types-B_9g6hMM.js';
|
|
13
15
|
import { CursorSpec } from '@weasel-js/cursor';
|
|
14
16
|
import { ClaimableGesture } from '@weasel-js/gestures';
|
|
15
|
-
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Folding a node's pose up its parent chain to world, and back down. Lives
|
|
20
|
+
* under `core/` so the scene can lay out in world without reaching up into
|
|
21
|
+
* `features/`; `features/groups/composePose` re-exports all of it.
|
|
22
|
+
*/
|
|
23
|
+
/** Minimal adapter needed by `composeWorldPose` and friends — pose lookup plus parent walk. */
|
|
24
|
+
interface PoseAdapter<TPose> {
|
|
25
|
+
getPose(id: string): TPose;
|
|
26
|
+
getParent(id: string): string | null;
|
|
27
|
+
/** Whether `id`'s pose is a frame its children are expressed in. Absent
|
|
28
|
+
* means every node is one. A container whose pose derives from its children
|
|
29
|
+
* is not: its children share its frame, so the fold passes over it. */
|
|
30
|
+
definesFrame?(id: string): boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The transforms a `compose` represents **exactly**. A parent transform wider
|
|
34
|
+
* than its strategy's closure is rounded to the nearest pose — for `'rigid'`
|
|
35
|
+
* that means an anisotropically scaled parent turns a rotated child into a
|
|
36
|
+
* parallelogram, which `{x, y, width, height, rotation}` cannot hold, so the
|
|
37
|
+
* shear is dropped.
|
|
38
|
+
*
|
|
39
|
+
* Measured over 50,000 random parent/child pairs: rotation and translation
|
|
40
|
+
* compose to within 5.7e-13, anisotropic scale to a right-angle error of 0.99.
|
|
41
|
+
* See `docs/superpowers/specs/2026-09-10-group-as-frame-design.md`.
|
|
42
|
+
*/
|
|
43
|
+
type PoseClosure = 'identity' | 'translation' | 'rigid';
|
|
44
|
+
/** Consumer's pose-composition strategy for hierarchical scenes. `compose`
|
|
45
|
+
* folds a child's pose (in parent's frame) up to the next frame; `decompose`
|
|
46
|
+
* is its inverse. Default is IDENTITY — an absolute-pose scene where every
|
|
47
|
+
* node already stores world coords (parent is grouping-only, no transform). */
|
|
48
|
+
interface PoseComposition<TPose> {
|
|
49
|
+
compose: (parent: TPose, child: TPose) => TPose;
|
|
50
|
+
decompose: (parent: TPose, world: TPose) => TPose;
|
|
51
|
+
closure: PoseClosure;
|
|
52
|
+
}
|
|
53
|
+
/** Default pose-composition strategy: IDENTITY. Both `compose` and
|
|
54
|
+
* `decompose` return the child/world pose unchanged, modeling an
|
|
55
|
+
* absolute-pose scene where every node stores world coords and parents are
|
|
56
|
+
* grouping-only (no transform). With this strategy `composeWorldPose`
|
|
57
|
+
* returns a node's own raw pose and `rebaseLocalPose` is a no-op. */
|
|
58
|
+
declare const IDENTITY_POSE_COMPOSITION: PoseComposition<unknown>;
|
|
59
|
+
/**
|
|
60
|
+
* Walk `id`'s parent chain (root first to id last) and fold local poses into
|
|
61
|
+
* a world pose via `compose`. Returns the world pose for `id`. Cycle-safe:
|
|
62
|
+
* a visited-set guard breaks if the chain ever loops back to itself.
|
|
63
|
+
*
|
|
64
|
+
* `compose(parent, child)` interprets `child` as expressed *in `parent`'s
|
|
65
|
+
* local frame* and returns the equivalent pose in the next frame up. For a
|
|
66
|
+
* standard translation-only rect: `world = { x: p.x + c.x, y: p.y + c.y,
|
|
67
|
+
* width: c.width, height: c.height }`.
|
|
68
|
+
*/
|
|
69
|
+
declare function composeWorldPose<TPose>(adapter: PoseAdapter<TPose>, id: string, compose: (parent: TPose, child: TPose) => TPose): TPose;
|
|
70
|
+
/**
|
|
71
|
+
* Convert `worldPose` into a local pose expressed under `newParentId`'s
|
|
72
|
+
* frame. Used when reparenting so the child's visual world position is
|
|
73
|
+
* preserved despite the change of frame. Inverse of one `compose` step.
|
|
74
|
+
*
|
|
75
|
+
* `decompose(parent, world)` returns the local pose `child` such that
|
|
76
|
+
* `compose(parent, child) === world`. For axis-aligned rects:
|
|
77
|
+
* `child = { ...world, x: world.x - parent.x, y: world.y - parent.y }`.
|
|
78
|
+
*
|
|
79
|
+
* Pass `newParentId === null` for the root frame; the function returns
|
|
80
|
+
* `worldPose` unchanged.
|
|
81
|
+
*/
|
|
82
|
+
declare function rebaseLocalPose<TPose>(adapter: PoseAdapter<TPose>, worldPose: TPose, newParentId: string | null, compose: (parent: TPose, child: TPose) => TPose, decompose: (parent: TPose, world: TPose) => TPose): TPose;
|
|
16
83
|
|
|
17
84
|
/**
|
|
18
85
|
* Axis-aligned rectangle pose with optional rotation. The canonical pose
|
|
@@ -59,6 +126,12 @@ interface DerivedDep<TPose> {
|
|
|
59
126
|
* about costs nothing. */
|
|
60
127
|
readonly path: Path | null;
|
|
61
128
|
}
|
|
129
|
+
/** Computes a node's path from its dependencies: the type of a node's
|
|
130
|
+
* `derivePath` and of each entry in `SceneRegistry.derivePath`. */
|
|
131
|
+
type DerivePathFn<TPose> = (node: Node<unknown, string, TPose>, deps: readonly (DerivedDep<TPose> | undefined)[]) => Path | null;
|
|
132
|
+
/** Computes a node's pose from its dependencies: the type of a node's
|
|
133
|
+
* `derivePose` and of each entry in `SceneRegistry.derivePose`. */
|
|
134
|
+
type DerivePoseFn<TPose> = (node: Node<unknown, string, TPose>, deps: readonly (DerivedDep<TPose> | undefined)[]) => TPose | null;
|
|
62
135
|
interface NodeBase<TData, TLayer extends string, TPose> {
|
|
63
136
|
id: NodeId;
|
|
64
137
|
layer: TLayer;
|
|
@@ -96,7 +169,7 @@ interface NodeBase<TData, TLayer extends string, TPose> {
|
|
|
96
169
|
* `node` is deliberately widened: naming `TData`/`TLayer` here puts them in
|
|
97
170
|
* a contravariant position, making `Scene` invariant in both and breaking
|
|
98
171
|
* assignment kit-wide. The cost is that a `derivePath` casts to read `node.data`. */
|
|
99
|
-
derivePath?:
|
|
172
|
+
derivePath?: DerivePathFn<TPose>;
|
|
100
173
|
/** Computes this node's pose from its dependencies' poses, the same way
|
|
101
174
|
* `derivePath` computes its path — same `dependsOn` list, same widened
|
|
102
175
|
* `node`, same registry-keyed serialization.
|
|
@@ -110,7 +183,7 @@ interface NodeBase<TData, TLayer extends string, TPose> {
|
|
|
110
183
|
* Returning `null` means "I have nothing to derive from right now", and
|
|
111
184
|
* the node falls back to its authored `pose`. `setPose` on a derived node
|
|
112
185
|
* still writes that authored pose; it is simply not what anything reads. */
|
|
113
|
-
derivePose?:
|
|
186
|
+
derivePose?: DerivePoseFn<TPose>;
|
|
114
187
|
}
|
|
115
188
|
/** A node with no children — a shape, a label, an image. */
|
|
116
189
|
interface LeafNode<TData, TLayer extends string, TPose = RectPose> extends NodeBase<TData, TLayer, TPose> {
|
|
@@ -128,6 +201,33 @@ interface ContainerNode<TData, TLayer extends string, TPose = RectPose> extends
|
|
|
128
201
|
* renderer rasterizes the returned path into the stencil buffer and
|
|
129
202
|
* paints descendants only where it covers. */
|
|
130
203
|
clipFromPose?: (pose: TPose) => Path | null;
|
|
204
|
+
/** How this container arranges its children. Whenever the container's
|
|
205
|
+
* child set or order changes, or its bounds change size, the scene hands
|
|
206
|
+
* the change to the strategy — `depart` for children that left it,
|
|
207
|
+
* `arrive` for children that joined it, `childPoses` otherwise — and records the poses it writes in the same
|
|
208
|
+
* undo entry as the change. A drag reads it too: it is the layout `move`
|
|
209
|
+
* reflows and drops against. */
|
|
210
|
+
layout?: LayoutStrategy<TPose>;
|
|
211
|
+
}
|
|
212
|
+
/** A pose a container's layout wrote — reported by {@link Scene.onReflow} —
|
|
213
|
+
* in the node's stored frame. */
|
|
214
|
+
interface LayoutMove<TPose> {
|
|
215
|
+
id: NodeId;
|
|
216
|
+
from: TPose;
|
|
217
|
+
to: TPose;
|
|
218
|
+
}
|
|
219
|
+
/** How a scene reads a laid-out container's bounds and folds poses to the
|
|
220
|
+
* world frame a {@link LayoutStrategy} works in. */
|
|
221
|
+
interface LayoutFrame<TPose> {
|
|
222
|
+
/** The container's bounds, from its world pose. Default: the pose's own
|
|
223
|
+
* `x`/`y`/`width`/`height`; a pose without them is not laid out. */
|
|
224
|
+
bounds?(pose: TPose): ContainerBounds | null;
|
|
225
|
+
/** `pose` resized from bounds `from` to `to`, for a layout that grows its
|
|
226
|
+
* container. Default: `to`'s fields written over the pose. */
|
|
227
|
+
remap?(pose: TPose, from: ContainerBounds, to: ContainerBounds): TPose;
|
|
228
|
+
/** Omit for the absolute-pose model. A scene whose canvas composes poses
|
|
229
|
+
* (`<SceneCanvas poseComposition>`) passes the same strategy here. */
|
|
230
|
+
composition?: PoseComposition<TPose>;
|
|
131
231
|
}
|
|
132
232
|
/** A node in the scene tree: either a leaf or a container. Re-exported
|
|
133
233
|
* publicly as `SceneNode`, to avoid colliding with the DOM's `Node`. */
|
|
@@ -136,6 +236,10 @@ interface LayerRecordBase<TLayer extends string> {
|
|
|
136
236
|
id: TLayer;
|
|
137
237
|
visible: boolean;
|
|
138
238
|
locked: boolean;
|
|
239
|
+
/** Draw this layer as a parallax plane: through a view derived from the
|
|
240
|
+
* camera's (see `deriveParallaxView`), and picked through the same one.
|
|
241
|
+
* Absent means the layer moves with the camera. */
|
|
242
|
+
parallax?: ParallaxOpts;
|
|
139
243
|
}
|
|
140
244
|
/** A layer declared when the scene was created. Fixed set, no display name —
|
|
141
245
|
* these are the kit's own render bands, not something a user manages. */
|
|
@@ -171,9 +275,11 @@ interface AddNodeSpec<TData, TLayer extends string, TPose = RectPose> {
|
|
|
171
275
|
dependsOn?: readonly NodeId[] | 'children';
|
|
172
276
|
/** Mirrors `SceneNode.derivePath`. Taken as a live function; its registry key is
|
|
173
277
|
* looked up from it, never passed in. */
|
|
174
|
-
derivePath?:
|
|
278
|
+
derivePath?: DerivePathFn<TPose>;
|
|
175
279
|
/** Mirrors `SceneNode.derivePose`, on the same terms as `derivePath`. */
|
|
176
|
-
derivePose?:
|
|
280
|
+
derivePose?: DerivePoseFn<TPose>;
|
|
281
|
+
/** Mirrors `ContainerNode.layout`; ignored for leaves. */
|
|
282
|
+
layout?: LayoutStrategy<TPose>;
|
|
177
283
|
}
|
|
178
284
|
/** A custom scene mutation registered with `Scene.registerOp`: how to apply
|
|
179
285
|
* it and how to undo it. The pair is what makes it participate in history. */
|
|
@@ -186,6 +292,8 @@ interface SystemLayerSpec<TLayer extends string> {
|
|
|
186
292
|
id: TLayer;
|
|
187
293
|
visible?: boolean;
|
|
188
294
|
locked?: boolean;
|
|
295
|
+
/** See `LayerRecord.parallax`. */
|
|
296
|
+
parallax?: ParallaxOpts;
|
|
189
297
|
}
|
|
190
298
|
/** Argument to `Scene.addLayer`. Always produces a `UserLayerRecord`
|
|
191
299
|
* (`kind: 'user'`). */
|
|
@@ -196,6 +304,8 @@ interface AddLayerSpec<TLayer extends string> {
|
|
|
196
304
|
visible?: boolean;
|
|
197
305
|
/** Default `false`. */
|
|
198
306
|
locked?: boolean;
|
|
307
|
+
/** See `LayerRecord.parallax`. */
|
|
308
|
+
parallax?: ParallaxOpts;
|
|
199
309
|
/** Render-stack position. Default: top of stack (highest render index). */
|
|
200
310
|
index?: number;
|
|
201
311
|
}
|
|
@@ -240,6 +350,8 @@ interface SerializedNode<TData, TLayer extends string, TPose> {
|
|
|
240
350
|
derivePathKey?: string;
|
|
241
351
|
/** Registry key for the node's `derivePose` function. Omitted when it has none. */
|
|
242
352
|
derivePoseKey?: string;
|
|
353
|
+
/** Registry key for the container's layout strategy. Omitted when it has none. */
|
|
354
|
+
layoutKey?: string;
|
|
243
355
|
}
|
|
244
356
|
/** Per-scene registry mapping string keys to live function references.
|
|
245
357
|
* Passed to `createScene({ ..., registry })` and `sceneFromJSON(json, { registry })`.
|
|
@@ -248,10 +360,33 @@ interface SceneRegistry<TPose> {
|
|
|
248
360
|
/** Maps registry keys to `clipFromPose` factory functions for container nodes. */
|
|
249
361
|
clipFromPose?: Readonly<Record<string, (pose: TPose) => Path | null>>;
|
|
250
362
|
/** Maps registry keys to `derivePath` functions for nodes with `dependsOn`. */
|
|
251
|
-
derivePath?: Readonly<Record<string,
|
|
363
|
+
derivePath?: Readonly<Record<string, DerivePathFn<TPose>>>;
|
|
252
364
|
/** Maps registry keys to `derivePose` functions for nodes with `dependsOn`. */
|
|
253
|
-
derivePose?: Readonly<Record<string,
|
|
365
|
+
derivePose?: Readonly<Record<string, DerivePoseFn<TPose>>>;
|
|
366
|
+
/** Maps registry keys to container layout strategies. */
|
|
367
|
+
layout?: Readonly<Record<string, LayoutStrategy<TPose>>>;
|
|
254
368
|
}
|
|
369
|
+
/**
|
|
370
|
+
* Decides what one edit's changes to containers do to their children.
|
|
371
|
+
* `arrivals` maps each container to the ids that joined it — by an `add`
|
|
372
|
+
* under it or a `move` into it, whatever op or call made them — in the order
|
|
373
|
+
* they arrived. `changed` names every container whose child set or order
|
|
374
|
+
* changed, or whose pose changed size, arrivals included. Both are read once
|
|
375
|
+
* the edit's other mutations have landed.
|
|
376
|
+
*
|
|
377
|
+
* Return the poses to write, in each node's stored frame; they become part of
|
|
378
|
+
* the same edit, and so of the same undo step. An empty map writes nothing.
|
|
379
|
+
* Return `null` to refuse: the whole edit is reverted (see
|
|
380
|
+
* `SceneArrivalRefused`).
|
|
381
|
+
*
|
|
382
|
+
* Runs only for live edits. Undo, redo and a restored history replay the
|
|
383
|
+
* arrangement that was decided the first time. With none installed, a scene
|
|
384
|
+
* holding declared layouts (`ContainerNode.layout`) runs its own.
|
|
385
|
+
*/
|
|
386
|
+
type SceneArrivalHandler<TPose> = (arrivals: ReadonlyMap<NodeId, readonly NodeId[]>, changed: ReadonlySet<NodeId>,
|
|
387
|
+
/** The nodes that left each container in the edit, by the container they
|
|
388
|
+
* left — removed, or moved out. */
|
|
389
|
+
departures: ReadonlyMap<NodeId, readonly NodeId[]>) => ReadonlyMap<NodeId, TPose> | null;
|
|
255
390
|
/** Options for `useScene` — the layers the scene has, what it starts out
|
|
256
391
|
* holding, and how its history behaves. */
|
|
257
392
|
interface UseSceneOptions<TData, TLayer extends string, TPose = RectPose> {
|
|
@@ -271,6 +406,8 @@ interface UseSceneOptions<TData, TLayer extends string, TPose = RectPose> {
|
|
|
271
406
|
/** Per-scene registry for non-serializable function fields (clipFromPose, etc.).
|
|
272
407
|
* Required only when serializing/deserializing scenes that use function fields. */
|
|
273
408
|
registry?: SceneRegistry<TPose>;
|
|
409
|
+
/** How laid-out containers are measured. See {@link LayoutFrame}. */
|
|
410
|
+
layoutFrame?: LayoutFrame<TPose>;
|
|
274
411
|
/** When supplied, `scene.applyOps(ops, label)` consults this on every call.
|
|
275
412
|
* If it returns a non-null `Journal`, ops are routed to the journal's
|
|
276
413
|
* `applyBatch` instead of recording a new parent-history entry. The journal
|
|
@@ -360,6 +497,13 @@ interface Scene<TData, TLayer extends string, TPose = RectPose> {
|
|
|
360
497
|
* entries over the kit's. */
|
|
361
498
|
readonly registry: SceneRegistry<TPose>;
|
|
362
499
|
get(id: NodeId): Node<TData, TLayer, TPose> | undefined;
|
|
500
|
+
/** A token for the node `id` names right now, for telling one node from a
|
|
501
|
+
* later one that reuses its id. It holds for as long as the node stays in
|
|
502
|
+
* the scene, whatever edits it takes, and is different every time the id
|
|
503
|
+
* enters the scene — by `add`, by an undo or redo that brings it back, or
|
|
504
|
+
* by `loadState`. `undefined` when `id` is not in the scene. Compare tokens
|
|
505
|
+
* for equality only; their order means nothing. */
|
|
506
|
+
incarnation(id: NodeId): number | undefined;
|
|
363
507
|
childrenOf(id: NodeId): readonly NodeId[];
|
|
364
508
|
ancestorsOf(id: NodeId): readonly NodeId[];
|
|
365
509
|
renderOrder(): Iterable<NodeId>;
|
|
@@ -427,6 +571,16 @@ interface Scene<TData, TLayer extends string, TPose = RectPose> {
|
|
|
427
571
|
* **No-op elision** — declaring what the node already declares does nothing
|
|
428
572
|
* and pushes no history entry. */
|
|
429
573
|
setDependsOn(id: NodeId, dependsOn: readonly NodeId[] | 'children' | undefined): void;
|
|
574
|
+
/** Give container `id` a different layout — a strategy, its key in
|
|
575
|
+
* `SceneRegistry.layout`, or `null` for none — and re-arrange its children
|
|
576
|
+
* under it, as one undoable step. Throws for a leaf, or a key the registry
|
|
577
|
+
* does not hold. A registered layout is recorded by its key, so a
|
|
578
|
+
* serialized history restores it; an unregistered one lives only as long
|
|
579
|
+
* as the session.
|
|
580
|
+
*
|
|
581
|
+
* **No-op elision** — setting the layout a container already has does
|
|
582
|
+
* nothing and pushes no history entry. */
|
|
583
|
+
setLayout(id: NodeId, layout: LayoutStrategy<TPose> | string | null): void;
|
|
430
584
|
/** Reparent `id` under `parent` (or to a root when `parent` is `null`) at
|
|
431
585
|
* `index` within the new sibling list, appending when `index` is omitted.
|
|
432
586
|
* Siblings are reindexed. Recorded as one undoable step.
|
|
@@ -450,6 +604,10 @@ interface Scene<TData, TLayer extends string, TPose = RectPose> {
|
|
|
450
604
|
* drops them, and every node mutation on them throws. Locking is never
|
|
451
605
|
* blocked by the lock, and neither are the other layer operations. */
|
|
452
606
|
setLayerLocked(layer: TLayer, locked: boolean): void;
|
|
607
|
+
/** Set or clear (`undefined`) a layer's parallax — see
|
|
608
|
+
* `LayerRecord.parallax`. Undoable; an animation tweening it writes inside
|
|
609
|
+
* {@link Scene.untracked} so no frame becomes an undo step. */
|
|
610
|
+
setLayerParallax(layer: TLayer, parallax: ParallaxOpts | undefined): void;
|
|
453
611
|
/** Whether `id` sits on a locked layer or under a container that does.
|
|
454
612
|
* A container's lock covers its whole subtree, whatever layers the
|
|
455
613
|
* descendants are tagged to. An id not in the scene is not locked. */
|
|
@@ -477,6 +635,11 @@ interface Scene<TData, TLayer extends string, TPose = RectPose> {
|
|
|
477
635
|
* Pass `null` to detach. Overrides any `getActiveJournal` set in
|
|
478
636
|
* `UseSceneOptions`. */
|
|
479
637
|
setActiveJournalAccessor(fn: (() => _weasel_js_history.Journal | null) | null): void;
|
|
638
|
+
/** Install what the scene does when nodes join a container, replacing any
|
|
639
|
+
* handler installed before; `null` removes it. Returns a function that
|
|
640
|
+
* removes this handler, and does nothing once another has replaced it.
|
|
641
|
+
* See {@link SceneArrivalHandler}. */
|
|
642
|
+
setArrivalHandler(handler: SceneArrivalHandler<TPose> | null): () => void;
|
|
480
643
|
/** Apply a batch of ops with journal-aware routing.
|
|
481
644
|
*
|
|
482
645
|
* - **Without active journal** (or no `getActiveJournal` in options):
|
|
@@ -520,6 +683,13 @@ interface Scene<TData, TLayer extends string, TPose = RectPose> {
|
|
|
520
683
|
canUndo(): boolean;
|
|
521
684
|
canRedo(): boolean;
|
|
522
685
|
batch<T>(label: string, fn: () => T): T;
|
|
686
|
+
/** The layout container `id` declares, or `null` for a leaf or a
|
|
687
|
+
* container that declares none. */
|
|
688
|
+
layoutOf(id: NodeId): LayoutStrategy<TPose> | null;
|
|
689
|
+
/** Called with the poses each live edit's layout pass wrote, after the
|
|
690
|
+
* edit lands — never for an undo or redo, which restore poses rather than
|
|
691
|
+
* arrange them. What a reflow animation glides from. */
|
|
692
|
+
onReflow(listener: (moves: readonly LayoutMove<TPose>[]) => void): () => void;
|
|
523
693
|
/** Run `fn` with every mutation applied but none recorded — for writes
|
|
524
694
|
* that are not edits, such as a simulation stepping poses each frame.
|
|
525
695
|
* Undo and redo move between recorded states and never restore an
|
|
@@ -634,64 +804,6 @@ interface FitViewToBoundsOptions {
|
|
|
634
804
|
*/
|
|
635
805
|
declare function fitViewToBounds(bounds: Bounds, viewportDims: ViewportDims, currentView: View, opts?: FitViewToBoundsOptions): View;
|
|
636
806
|
|
|
637
|
-
/**
|
|
638
|
-
* Minimal compile/link/lookup wrapper for a GL program. Throws
|
|
639
|
-
* `ShaderCompileError` on compile or link failure with the GL info log
|
|
640
|
-
* embedded in the error message — never returns a half-initialized program.
|
|
641
|
-
*
|
|
642
|
-
* Designed so test code can stub `getShaderParameter` / `getProgramParameter`
|
|
643
|
-
* via the recorder Proxy without further special-casing.
|
|
644
|
-
*/
|
|
645
|
-
type Stage = 'vertex' | 'fragment' | 'link';
|
|
646
|
-
/** Thrown when a shader fails to compile or link, carrying which stage failed
|
|
647
|
-
* and the driver's log. */
|
|
648
|
-
declare class ShaderCompileError extends Error {
|
|
649
|
-
readonly stage: Stage;
|
|
650
|
-
readonly log: string;
|
|
651
|
-
constructor(stage: Stage, log: string);
|
|
652
|
-
}
|
|
653
|
-
declare class ShaderProgram {
|
|
654
|
-
private readonly gl;
|
|
655
|
-
readonly handle: WebGLProgram;
|
|
656
|
-
private readonly uniforms;
|
|
657
|
-
private readonly attributes;
|
|
658
|
-
constructor(gl: WebGL2RenderingContext, vertSrc: string, fragSrc: string);
|
|
659
|
-
private compile;
|
|
660
|
-
lookupUniforms(names: readonly string[]): void;
|
|
661
|
-
lookupAttributes(names: readonly string[]): void;
|
|
662
|
-
uniform(name: string): WebGLUniformLocation | undefined;
|
|
663
|
-
attribute(name: string): number | undefined;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
/**
|
|
667
|
-
* A tessellated representation of a Path, ready to upload to GL.
|
|
668
|
-
*
|
|
669
|
-
* - `vertices` is interleaved x,y in path-local coordinates (`Float32Array`
|
|
670
|
-
* of length `2 * vertexCount`).
|
|
671
|
-
* - `indices` are triangle indices into `vertices` (`Uint32Array`, length
|
|
672
|
-
* `3 * triangleCount`).
|
|
673
|
-
* - `requiresStencil` is set for paths whose fillRule is `'evenodd'` and
|
|
674
|
-
* whose triangulation is a *naive* per-contour fan rather than a clean
|
|
675
|
-
* inside/outside triangulation. The renderer must use a stencil
|
|
676
|
-
* two-pass when this flag is true. Single-contour paths and `'nonzero'`
|
|
677
|
-
* multi-contour paths leave it false.
|
|
678
|
-
* - `anchorA` / `anchorB` / `anchorT` parameterize each mesh vertex by
|
|
679
|
-
* the two consecutive path anchors it lies between and the arc-length
|
|
680
|
-
* fraction along that segment (0 = at A, 1 = at B). Vertices that fall
|
|
681
|
-
* exactly on an anchor set A === B and t = 0. Used at draw time when
|
|
682
|
-
* the DrawCommand supplies per-anchor colors so the renderer can lerp
|
|
683
|
-
* per mesh vertex. Optional — emitted by the path tessellators; absent
|
|
684
|
-
* on meshes built by other paths (e.g. text glyphs).
|
|
685
|
-
*/
|
|
686
|
-
interface Mesh {
|
|
687
|
-
readonly vertices: Float32Array;
|
|
688
|
-
readonly indices: Uint32Array;
|
|
689
|
-
readonly requiresStencil?: boolean;
|
|
690
|
-
readonly anchorA?: Uint32Array;
|
|
691
|
-
readonly anchorB?: Uint32Array;
|
|
692
|
-
readonly anchorT?: Float32Array;
|
|
693
|
-
}
|
|
694
|
-
|
|
695
807
|
interface GLMeshHandle {
|
|
696
808
|
readonly vao: WebGLVertexArrayObject;
|
|
697
809
|
readonly indexCount: number;
|
|
@@ -741,7 +853,10 @@ declare class GLMeshCache {
|
|
|
741
853
|
/** Meshes this context has drawn at least once; see `uploadRecurring`. */
|
|
742
854
|
private readonly seen;
|
|
743
855
|
private readonly finalizer;
|
|
856
|
+
/** Every persistent upload not yet freed, so `dispose` can reach them. */
|
|
857
|
+
private readonly persistent;
|
|
744
858
|
private readonly pendingDeletes;
|
|
859
|
+
private disposed;
|
|
745
860
|
/** Transient resources allocated this frame; freed at end of render(). */
|
|
746
861
|
private readonly transientThisFrame;
|
|
747
862
|
constructor(gl: WebGL2RenderingContext, aPositionLoc: number);
|
|
@@ -775,6 +890,13 @@ declare class GLMeshCache {
|
|
|
775
890
|
* Called by the renderer at the top of each `render()`, before any draws.
|
|
776
891
|
*/
|
|
777
892
|
drainPendingDeletes(): void;
|
|
893
|
+
/**
|
|
894
|
+
* Free every GL resource this cache holds — persistent, pending and
|
|
895
|
+
* transient — and ignore finalizers from here on. Idempotent. Unlike the
|
|
896
|
+
* other paths this does not wait on GC, which is what lets a renderer on a
|
|
897
|
+
* context it does not own give back everything it uploaded.
|
|
898
|
+
*/
|
|
899
|
+
dispose(): void;
|
|
778
900
|
/** @internal — for tests asserting the queue size. */
|
|
779
901
|
_pendingDeleteCount(): number;
|
|
780
902
|
/** @internal — for tests that need to simulate the finalizer firing. */
|
|
@@ -833,7 +955,7 @@ declare class GLTextureCache {
|
|
|
833
955
|
* Key: ImageBitmap (or pattern source object) identity (WeakMap) — lets GC
|
|
834
956
|
* reclaim unreferenced bitmaps. The GL textures are NOT freed when the source
|
|
835
957
|
* is gc'd; a source's owner that knows it will never be drawn again frees them
|
|
836
|
-
* with {@link releaseImageSource}.
|
|
958
|
+
* with {@link releaseImageSource}, and `dispose` frees them all.
|
|
837
959
|
*
|
|
838
960
|
* Wrapping is set once at upload time per the `repetition` parameter:
|
|
839
961
|
* - undefined / 'no-repeat' → CLAMP_TO_EDGE
|
|
@@ -853,6 +975,9 @@ declare class GLImageCache {
|
|
|
853
975
|
/** This context's `MAX_TEXTURE_SIZE`. */
|
|
854
976
|
readonly maxTextureSide: number;
|
|
855
977
|
private readonly map;
|
|
978
|
+
/** Every texture `map` holds, so `dispose` can reach them — a WeakMap
|
|
979
|
+
* cannot be enumerated. */
|
|
980
|
+
private readonly textures;
|
|
856
981
|
/**
|
|
857
982
|
* MAG_FILTER each texture currently carries, so a redundant write can be
|
|
858
983
|
* skipped.
|
|
@@ -879,9 +1004,12 @@ declare class GLImageCache {
|
|
|
879
1004
|
constructor(gl: WebGL2RenderingContext, minification?: ImageMinification);
|
|
880
1005
|
/** Delete `key`'s texture, if it has one. */
|
|
881
1006
|
release(key: object): void;
|
|
882
|
-
/**
|
|
883
|
-
*
|
|
1007
|
+
/** Delete every texture this cache uploaded and stop answering
|
|
1008
|
+
* {@link releaseImageSource} and {@link maxImageTextureSide}. Idempotent. */
|
|
884
1009
|
dispose(): void;
|
|
1010
|
+
/** {@link dispose} without the deletes, for a cache whose context was lost:
|
|
1011
|
+
* its textures died with it. */
|
|
1012
|
+
abandon(): void;
|
|
885
1013
|
upload(key: object, source: TexSource, repetition?: PatternRepetition): WebGLTexture;
|
|
886
1014
|
bind(key: object, unit: number): void;
|
|
887
1015
|
/** Set `key`'s MAG_FILTER, skipping the call when it already holds that
|
|
@@ -970,70 +1098,6 @@ declare class GradientRampAtlas {
|
|
|
970
1098
|
private writeRow;
|
|
971
1099
|
}
|
|
972
1100
|
|
|
973
|
-
/**
|
|
974
|
-
* 2D affine matrix utilities. Column-major 9-element Float32Array, matching
|
|
975
|
-
* `WebGL2RenderingContext.uniformMatrix3fv` byte order so we can pass the
|
|
976
|
-
* array directly without a transpose flag.
|
|
977
|
-
*
|
|
978
|
-
* Layout (column-major):
|
|
979
|
-
* [m00, m10, 0,
|
|
980
|
-
* m01, m11, 0,
|
|
981
|
-
* tx, ty, 1]
|
|
982
|
-
*
|
|
983
|
-
* `apply(m, x, y)` returns `[m * (x, y, 1)] = [m00*x + m01*y + tx,
|
|
984
|
-
* m10*x + m11*y + ty]`.
|
|
985
|
-
*/
|
|
986
|
-
|
|
987
|
-
type GlMat3 = Float32Array;
|
|
988
|
-
declare function identity(): GlMat3;
|
|
989
|
-
declare function multiply(out: GlMat3, m: GlMat3): GlMat3;
|
|
990
|
-
/** `m · T(tx, ty)`: composes onto `m`, where `@weasel-js/geom`'s `translate`
|
|
991
|
-
* constructs a fresh matrix. */
|
|
992
|
-
declare function translated(m: GlMat3, tx: number, ty: number): GlMat3;
|
|
993
|
-
/** `m · S(sx, sy)`: composes onto `m`, where geom's `scale` constructs one. */
|
|
994
|
-
declare function scaled(m: GlMat3, sx: number, sy: number): GlMat3;
|
|
995
|
-
/** This layout read as the kernel's 6-element affine. The two carry the same
|
|
996
|
-
* logical order, so the conversion is a repack and nothing else — it exists
|
|
997
|
-
* so the repack has a name instead of appearing inline at each crossing. */
|
|
998
|
-
declare function toAffine(m: GlMat3): Mat3;
|
|
999
|
-
/** The kernel's affine in this layout. The inverse of {@link toAffine}, and
|
|
1000
|
-
* what an `SvgGroupNode.transform` (also a kernel affine) becomes on its way
|
|
1001
|
-
* to a `GroupDrawCommand`. */
|
|
1002
|
-
declare function fromAffine(a: Mat3): GlMat3;
|
|
1003
|
-
/** Inverse of an affine matrix, or `null` when `@weasel-js/geom`'s `invert`
|
|
1004
|
-
* finds it singular — the same rule, read through this layout. */
|
|
1005
|
-
declare function invert(m: GlMat3): GlMat3 | null;
|
|
1006
|
-
declare function apply(m: GlMat3, x: number, y: number): [number, number];
|
|
1007
|
-
/**
|
|
1008
|
-
* Map screen pixel coords (0..width on X, 0..height on Y, top-left origin)
|
|
1009
|
-
* into clip space (-1..1 on X, 1..-1 on Y — note Y flip so screen-down
|
|
1010
|
-
* matches clip-down).
|
|
1011
|
-
*/
|
|
1012
|
-
declare function screenToClip(width: number, height: number): GlMat3;
|
|
1013
|
-
/**
|
|
1014
|
-
* Uniform-equivalent scale factor: the square root of the absolute
|
|
1015
|
-
* determinant of the linear part, i.e. the geometric mean of the two axis
|
|
1016
|
-
* scales. Rotation-invariant. Under non-uniform scale it is between the two
|
|
1017
|
-
* axes and exact on neither — the same compromise `meanScale` documents.
|
|
1018
|
-
*/
|
|
1019
|
-
declare function meanScaleOf(m: GlMat3): number;
|
|
1020
|
-
/** The renderer's 3x3 matrix operations, as one namespace. These work on the
|
|
1021
|
-
* 9-element `Float32Array` form the GL uniform upload wants — distinct from
|
|
1022
|
-
* `@weasel-js/geom`'s 6-element affine `GlMat3`, though the logical element
|
|
1023
|
-
* order is the same. */
|
|
1024
|
-
declare const mat3: {
|
|
1025
|
-
identity: typeof identity;
|
|
1026
|
-
toAffine: typeof toAffine;
|
|
1027
|
-
fromAffine: typeof fromAffine;
|
|
1028
|
-
multiply: typeof multiply;
|
|
1029
|
-
translated: typeof translated;
|
|
1030
|
-
scaled: typeof scaled;
|
|
1031
|
-
invert: typeof invert;
|
|
1032
|
-
apply: typeof apply;
|
|
1033
|
-
screenToClip: typeof screenToClip;
|
|
1034
|
-
meanScaleOf: typeof meanScaleOf;
|
|
1035
|
-
};
|
|
1036
|
-
|
|
1037
1101
|
/** Row-major 4×5 color matrix identity. */
|
|
1038
1102
|
declare const IDENTITY_COLOR_MATRIX: Float32Array<ArrayBuffer>;
|
|
1039
1103
|
interface GroupFrame {
|
|
@@ -1072,72 +1136,6 @@ declare class GroupState {
|
|
|
1072
1136
|
pop(): void;
|
|
1073
1137
|
}
|
|
1074
1138
|
|
|
1075
|
-
/**
|
|
1076
|
-
* registerProgram — public API for registering custom shader programs.
|
|
1077
|
-
*
|
|
1078
|
-
* Stores raw GLSL source strings in a module-level registry. GL compilation
|
|
1079
|
-
* happens on each WeaselRenderer via WeaselRenderer.registerProgram(), which
|
|
1080
|
-
* calls getProgramSource() and compiles the result. This keeps registerProgram
|
|
1081
|
-
* GL-context-agnostic — identical pattern to registerFont storing ImageBitmap.
|
|
1082
|
-
*
|
|
1083
|
-
* Module-level state = source strings only; compiled GL
|
|
1084
|
-
* programs live on each renderer's programRegistry (Map<id, ShaderProgram>).
|
|
1085
|
-
*
|
|
1086
|
-
* Lifecycle: program sources live for the module lifetime. No unregister in v1.
|
|
1087
|
-
*/
|
|
1088
|
-
|
|
1089
|
-
/** Opaque handle to a compiled custom shader program. */
|
|
1090
|
-
interface ShaderProgramHandle {
|
|
1091
|
-
readonly id: string;
|
|
1092
|
-
}
|
|
1093
|
-
/**
|
|
1094
|
-
* Scalar and vector uniform types accepted by the custom shader uniform binder.
|
|
1095
|
-
*
|
|
1096
|
-
* | TS type | GL call |
|
|
1097
|
-
* |-------------------------|--------------------------------------|
|
|
1098
|
-
* | number | uniform1f |
|
|
1099
|
-
* | [n, n] | uniform2fv |
|
|
1100
|
-
* | [n, n, n] | uniform3fv |
|
|
1101
|
-
* | [n, n, n, n] | uniform4fv |
|
|
1102
|
-
* | Float32Array length 9 | uniformMatrix3fv (column-major) |
|
|
1103
|
-
* | Float32Array length 16 | uniformMatrix4fv (column-major) |
|
|
1104
|
-
* | TextureHandle | bind to next tex unit + uniform1i |
|
|
1105
|
-
*/
|
|
1106
|
-
type ShaderUniform = number | [number, number] | [number, number, number] | [number, number, number, number] | Float32Array | TextureHandle;
|
|
1107
|
-
interface ProgramSource {
|
|
1108
|
-
vert: string;
|
|
1109
|
-
frag: string;
|
|
1110
|
-
}
|
|
1111
|
-
/** Every registered program's GLSL source, keyed by program id. */
|
|
1112
|
-
declare const programSourceRegistry: Reflection<ProgramSource>;
|
|
1113
|
-
/**
|
|
1114
|
-
* Register a custom shader program by id.
|
|
1115
|
-
*
|
|
1116
|
-
* Pass an empty string for `vert` to use the kit's default vertex shader
|
|
1117
|
-
* (recommended). The kit's vertex shader exposes `v_uv`, `v_screen`, and
|
|
1118
|
-
* `v_world` varyings plus `u_bounds` and `u_view` uniforms.
|
|
1119
|
-
*
|
|
1120
|
-
* **IMPORTANT — Premultiplied alpha:**
|
|
1121
|
-
* Your fragment shader MUST output premultiplied alpha:
|
|
1122
|
-
* `outColor = vec4(rgb * a, a);` ← correct
|
|
1123
|
-
* `outColor = vec4(rgb, a);` ← WRONG — over-brightens translucent regions
|
|
1124
|
-
*
|
|
1125
|
-
* The renderer uses `gl.blendFunc(ONE, ONE_MINUS_SRC_ALPHA)` to match.
|
|
1126
|
-
* Opaque fragments (a=1) are unaffected; only fragments with a < 1 differ.
|
|
1127
|
-
*
|
|
1128
|
-
* **Re-registration behavior:**
|
|
1129
|
-
* - Dev mode (`NODE_ENV !== 'production'`): calling with an existing id replaces
|
|
1130
|
-
* the source (hot-reload). Each renderer must call `WeaselRenderer.registerProgram(handle)`
|
|
1131
|
-
* again to pick up the new source.
|
|
1132
|
-
* - Prod mode: calling with an existing id throws.
|
|
1133
|
-
*
|
|
1134
|
-
* Actual GL compilation and `ShaderCompileError` throwing happen in
|
|
1135
|
-
* `WeaselRenderer.registerProgram()`, not here.
|
|
1136
|
-
*
|
|
1137
|
-
* @experimental API may break before v2.
|
|
1138
|
-
*/
|
|
1139
|
-
declare function registerProgram(id: string, vert: string, frag: string): ShaderProgramHandle;
|
|
1140
|
-
|
|
1141
1139
|
/**
|
|
1142
1140
|
* One full-screen pass over what a group has already drawn.
|
|
1143
1141
|
*
|
|
@@ -1257,6 +1255,9 @@ interface TextDrawCommand {
|
|
|
1257
1255
|
/** Wrap width. Absent never wraps. */
|
|
1258
1256
|
maxWidth?: number;
|
|
1259
1257
|
align?: 'left' | 'center' | 'right';
|
|
1258
|
+
/** Spread each wrapped line across `width` — see `LayoutRunsOpts.justify`.
|
|
1259
|
+
* `align` then sets only the lines it does not spread. Default `false`. */
|
|
1260
|
+
justify?: boolean;
|
|
1260
1261
|
/** Box width `align` resolves within, from `x`. Default `maxWidth`; with
|
|
1261
1262
|
* neither, `x` is the line's left edge, midpoint or right edge. */
|
|
1262
1263
|
width?: number;
|
|
@@ -1514,11 +1515,43 @@ declare class DrawBatch {
|
|
|
1514
1515
|
/** How to construct a `WeaselRenderer`: the GL context or canvas to draw
|
|
1515
1516
|
* into, the output size, and the quality knobs that separate screen
|
|
1516
1517
|
* rendering from print. */
|
|
1518
|
+
/** A run of top-level commands, `[start, end)` by index, that
|
|
1519
|
+
* {@link WeaselRenderer.lastFrameStats} accounts for separately — one render
|
|
1520
|
+
* layer's commands, say. Spans are in order and do not overlap. */
|
|
1521
|
+
interface RenderSpan {
|
|
1522
|
+
id: string;
|
|
1523
|
+
start: number;
|
|
1524
|
+
end: number;
|
|
1525
|
+
}
|
|
1526
|
+
/** Per-frame options for {@link WeaselRenderer.render}. */
|
|
1527
|
+
interface RenderOptions {
|
|
1528
|
+
spans?: readonly RenderSpan[];
|
|
1529
|
+
}
|
|
1530
|
+
/** What one span cost. A batched run is drawn when something closes it, so
|
|
1531
|
+
* its draw call counts toward the span that closed it. */
|
|
1532
|
+
interface RenderSpanStats {
|
|
1533
|
+
id: string;
|
|
1534
|
+
drawCalls: number;
|
|
1535
|
+
ms: number;
|
|
1536
|
+
}
|
|
1537
|
+
/** What one `render()` cost. See {@link WeaselRenderer.lastFrameStats}. */
|
|
1538
|
+
interface RenderStats {
|
|
1539
|
+
drawCalls: number;
|
|
1540
|
+
ms: number;
|
|
1541
|
+
spans: RenderSpanStats[];
|
|
1542
|
+
}
|
|
1543
|
+
/** Construction options for {@link WeaselRenderer}. Pass `gl` or `canvas`;
|
|
1544
|
+
* a context passed in must have a stencil buffer. */
|
|
1517
1545
|
interface WeaselRendererOptions {
|
|
1546
|
+
/** A WebGL2 context to draw with. Wins over `canvas`. */
|
|
1518
1547
|
gl?: WebGL2RenderingContext;
|
|
1548
|
+
/** A canvas to open a stencil-backed WebGL2 context on, when `gl` is absent. */
|
|
1519
1549
|
canvas?: HTMLCanvasElement;
|
|
1550
|
+
/** Drawing size in CSS pixels. */
|
|
1520
1551
|
width: number;
|
|
1552
|
+
/** Drawing size in CSS pixels. */
|
|
1521
1553
|
height: number;
|
|
1554
|
+
/** Device pixels per CSS pixel. */
|
|
1522
1555
|
dpr: number;
|
|
1523
1556
|
/** MIN_FILTER strategy for image/pattern textures (`GLImageCache`).
|
|
1524
1557
|
* Default `'linear'` — the existing screen behavior. The headless
|
|
@@ -1575,17 +1608,23 @@ interface RenderTarget {
|
|
|
1575
1608
|
*/
|
|
1576
1609
|
declare class WeaselRenderer {
|
|
1577
1610
|
private readonly gl;
|
|
1611
|
+
private stats;
|
|
1578
1612
|
private pathFill;
|
|
1579
1613
|
private pathFillVColor;
|
|
1580
1614
|
private imageFill;
|
|
1581
1615
|
private batchFill;
|
|
1582
1616
|
private gradFill;
|
|
1583
1617
|
private patternFill;
|
|
1618
|
+
/** Compiled on first use: only atlas text under a texture paint needs one. */
|
|
1619
|
+
private glyphPaintPrograms;
|
|
1584
1620
|
private meshCache;
|
|
1585
1621
|
private textureCache;
|
|
1586
1622
|
private imageCache;
|
|
1587
1623
|
private gradRamps;
|
|
1588
1624
|
private programRegistry;
|
|
1625
|
+
/** The source each compiled custom program was built from — or, after a
|
|
1626
|
+
* failed recompile, the source that failed, so it is not retried every frame. */
|
|
1627
|
+
private programSources;
|
|
1589
1628
|
private quadVbo;
|
|
1590
1629
|
private quadIbo;
|
|
1591
1630
|
private drawBatch;
|
|
@@ -1601,6 +1640,7 @@ declare class WeaselRenderer {
|
|
|
1601
1640
|
/** Offscreen buffers for group effects. Allocates nothing until a group
|
|
1602
1641
|
* with effects asks, so a canvas without them pays no memory. */
|
|
1603
1642
|
private readonly effectTargets;
|
|
1643
|
+
private readonly paintScratch;
|
|
1604
1644
|
private readonly imageMinification;
|
|
1605
1645
|
private flattenTolerance?;
|
|
1606
1646
|
private readonly bakeBudget;
|
|
@@ -1611,6 +1651,9 @@ declare class WeaselRenderer {
|
|
|
1611
1651
|
/** True after `dispose()`. A disposed renderer ignores further `render()`
|
|
1612
1652
|
* calls and `registerProgram()` calls. */
|
|
1613
1653
|
private disposed;
|
|
1654
|
+
/** What registered paint kinds hang their GPU state on. One per context
|
|
1655
|
+
* generation: a restore releases it and opens the next. */
|
|
1656
|
+
private paintResources;
|
|
1614
1657
|
constructor(opts: WeaselRendererOptions);
|
|
1615
1658
|
private uploadQuadGeometry;
|
|
1616
1659
|
/**
|
|
@@ -1624,6 +1667,10 @@ declare class WeaselRenderer {
|
|
|
1624
1667
|
* @experimental
|
|
1625
1668
|
*/
|
|
1626
1669
|
registerProgram(handle: ShaderProgramHandle): void;
|
|
1670
|
+
private installProgram;
|
|
1671
|
+
/** Recompile every program whose module-level source was re-registered
|
|
1672
|
+
* since it was compiled. A source that fails keeps the old program drawing. */
|
|
1673
|
+
private refreshPrograms;
|
|
1627
1674
|
/**
|
|
1628
1675
|
* The compiled program for `id`, compiling it against this context on first
|
|
1629
1676
|
* use. Unlike {@link registerProgram} this neither throws on a missing
|
|
@@ -1631,6 +1678,7 @@ declare class WeaselRenderer {
|
|
|
1631
1678
|
* never registered must decline the paint, not take down the frame.
|
|
1632
1679
|
*/
|
|
1633
1680
|
private ensureProgram;
|
|
1681
|
+
private glyphPaintProgram;
|
|
1634
1682
|
/** The GL state every frame assumes. Applied per `render()` rather than once
|
|
1635
1683
|
* at construction because a co-tenant sharing this context moves all of it
|
|
1636
1684
|
* between our frames. */
|
|
@@ -1645,27 +1693,15 @@ declare class WeaselRenderer {
|
|
|
1645
1693
|
isContextLost(): boolean;
|
|
1646
1694
|
private onContextLost;
|
|
1647
1695
|
private onContextRestored;
|
|
1648
|
-
/** Free
|
|
1696
|
+
/** Free every GL resource this renderer created and detach context-loss
|
|
1649
1697
|
* listeners when a canvas was supplied. Idempotent.
|
|
1650
1698
|
*
|
|
1651
|
-
*
|
|
1652
|
-
* shared quad
|
|
1653
|
-
*
|
|
1654
|
-
*
|
|
1655
|
-
*
|
|
1656
|
-
*
|
|
1657
|
-
* persistent per-Path mesh cache are keyed by `WeakMap`, not enumerable,
|
|
1658
|
-
* and are only reclaimed when the GL context itself goes away (cf.
|
|
1659
|
-
* `GLImageCache`'s own "deferred to v2" note). On a caller-owned
|
|
1660
|
-
* long-lived context — the headless render-to-pixels path hands the same
|
|
1661
|
-
* `gl` to many short-lived renderers — the image/pattern textures and
|
|
1662
|
-
* persistent Path meshes each renderer uploads DO accumulate across
|
|
1663
|
-
* renderer instances until the caller recycles the context.
|
|
1664
|
-
*
|
|
1665
|
-
* Also: a Mesh that gets GC'd after `dispose()` still lands in
|
|
1666
|
-
* `GLMeshCache`'s `pendingDeletes` queue via its `FinalizationRegistry`,
|
|
1667
|
-
* but nothing drains that queue post-dispose (only `render()` does) —
|
|
1668
|
-
* those GL resources leak until the context goes away too.
|
|
1699
|
+
* That covers the built-in and consumer-registered programs (their shaders
|
|
1700
|
+
* go with them), the shared quad geometry, the batch, the effect targets,
|
|
1701
|
+
* and every cache: atlas and gradient-ramp textures, bitmap and pattern
|
|
1702
|
+
* textures, and meshes — transient, persistent, and those whose Path was
|
|
1703
|
+
* already collected. The context itself is left alone, so a caller-owned
|
|
1704
|
+
* context can host renderer after renderer without accumulating anything.
|
|
1669
1705
|
*
|
|
1670
1706
|
* A disposed renderer ignores further `render()` and `registerProgram()`
|
|
1671
1707
|
* calls. */
|
|
@@ -1678,7 +1714,11 @@ declare class WeaselRenderer {
|
|
|
1678
1714
|
* it — every other command carries its own transform in the stream, so
|
|
1679
1715
|
* callers with no view concept can keep calling `render(commands)`.
|
|
1680
1716
|
*/
|
|
1681
|
-
render(commands: DrawCommand[], viewMatrix?: GlMat3): void;
|
|
1717
|
+
render(commands: DrawCommand[], viewMatrix?: GlMat3, opts?: RenderOptions): void;
|
|
1718
|
+
/** What the last `render()` cost: GL draw calls issued and CPU milliseconds
|
|
1719
|
+
* spent issuing them, in total and per requested span. GPU time is not
|
|
1720
|
+
* measured; the GPU runs asynchronously. */
|
|
1721
|
+
lastFrameStats(): RenderStats;
|
|
1682
1722
|
/** Change the curve-flattening tolerance after construction. `undefined`
|
|
1683
1723
|
* restores the cached `DEFAULT_FLATTEN_TOLERANCE` route. */
|
|
1684
1724
|
setFlattenTolerance(tolerance: number | undefined): void;
|
|
@@ -1783,6 +1823,11 @@ interface CullRect {
|
|
|
1783
1823
|
*/
|
|
1784
1824
|
declare function cullDrawCommands(cmds: DrawCommand[], transform: GlMat3, rect: CullRect): DrawCommand[];
|
|
1785
1825
|
|
|
1826
|
+
/**
|
|
1827
|
+
* Read-only state that affordances consult on every render and hit-test
|
|
1828
|
+
* call. Built via `buildChromeState` and held across renders, so affordances
|
|
1829
|
+
* must not cache anything they read from it.
|
|
1830
|
+
*/
|
|
1786
1831
|
interface ChromeState {
|
|
1787
1832
|
/** Currently selected ids. Live; reflects useSelection's React state. */
|
|
1788
1833
|
readonly selection: readonly NodeId[];
|
|
@@ -1854,7 +1899,11 @@ interface AffordanceRegion<TScratch = unknown> {
|
|
|
1854
1899
|
targetId: string | null;
|
|
1855
1900
|
/** Region geometry, expressed in the target's local frame.
|
|
1856
1901
|
*
|
|
1857
|
-
* - `point` —
|
|
1902
|
+
* - `point` — square hit of half-extent `hitRadiusPx` screen pixels,
|
|
1903
|
+
* axis-aligned on screen unless `turned`. `standoff` pushes the anchor `px`
|
|
1904
|
+
* screen pixels off the edge whose outward normal (target-local) is
|
|
1905
|
+
* `normal`, measured along that normal as it lands on screen — for
|
|
1906
|
+
* chrome that floats a fixed distance off an edge at any zoom.
|
|
1858
1907
|
* - `rect` — axis-aligned rect (target rotation applies).
|
|
1859
1908
|
* - `annulus` — outer ellipse minus inner rect cutout. Used for
|
|
1860
1909
|
* invisible zones that sit *around* the AABB (e.g. rotate-on-
|
|
@@ -1867,6 +1916,16 @@ interface AffordanceRegion<TScratch = unknown> {
|
|
|
1867
1916
|
x: number;
|
|
1868
1917
|
y: number;
|
|
1869
1918
|
hitRadiusPx: number;
|
|
1919
|
+
standoff?: {
|
|
1920
|
+
px: number;
|
|
1921
|
+
normal: {
|
|
1922
|
+
x: number;
|
|
1923
|
+
y: number;
|
|
1924
|
+
};
|
|
1925
|
+
};
|
|
1926
|
+
/** Turn the square to the target, at the angle the target's x axis
|
|
1927
|
+
* lands on screen (`screenAngleOf`) — for handles painted turned. */
|
|
1928
|
+
turned?: boolean;
|
|
1870
1929
|
} | {
|
|
1871
1930
|
kind: 'rect';
|
|
1872
1931
|
x: number;
|
|
@@ -1889,8 +1948,8 @@ interface AffordanceRegion<TScratch = unknown> {
|
|
|
1889
1948
|
innerHeight: number;
|
|
1890
1949
|
/** Minimum band thickness outside the inner rect, in **screen**
|
|
1891
1950
|
* pixels. The framework widens `rx`/`ry` to at least
|
|
1892
|
-
* `innerHalfExtent + minBandPx
|
|
1893
|
-
* paint and hit-test.
|
|
1951
|
+
* `innerHalfExtent + pxExtent(minBandPx, view.scale)` on each axis
|
|
1952
|
+
* for both paint and hit-test.
|
|
1894
1953
|
*
|
|
1895
1954
|
* This exists because the clamp has to know the view and the
|
|
1896
1955
|
* affordance doesn't: `ChromeState` carries no scale. Expressing the
|
|
@@ -2122,6 +2181,8 @@ declare function subscribeToSources(sources: readonly {
|
|
|
2122
2181
|
}[] | (() => readonly {
|
|
2123
2182
|
subscribe?: RedrawSource['subscribe'];
|
|
2124
2183
|
}[])): RedrawSource['subscribe'];
|
|
2184
|
+
/** One layer of a canvas: `draw` turns `data` and the view into draw commands;
|
|
2185
|
+
* the other fields control caching, visibility, coordinate space and hit-testing. */
|
|
2125
2186
|
interface RenderLayer<TData> {
|
|
2126
2187
|
/** Unique identifier used in visibility maps and ordering arrays. When a
|
|
2127
2188
|
* cache is in use, an id must identify the same logical layer across
|
|
@@ -2235,6 +2296,15 @@ interface RenderLayer<TData> {
|
|
|
2235
2296
|
*/
|
|
2236
2297
|
onUncapturedLeave?: () => void;
|
|
2237
2298
|
}
|
|
2299
|
+
/** Where one layer's commands landed in {@link drawLayers}' output,
|
|
2300
|
+
* `[start, end)`, and the CPU milliseconds its `draw` took. A layer group's
|
|
2301
|
+
* run is one span under the group's id. */
|
|
2302
|
+
interface LayerDrawSpan {
|
|
2303
|
+
id: string;
|
|
2304
|
+
start: number;
|
|
2305
|
+
end: number;
|
|
2306
|
+
buildMs: number;
|
|
2307
|
+
}
|
|
2238
2308
|
/**
|
|
2239
2309
|
* Walk visible layers and concatenate their emitted DrawCommand arrays into
|
|
2240
2310
|
* one flat list, ready to feed to `WeaselRenderer.render(commands)`.
|
|
@@ -2255,8 +2325,10 @@ interface RenderLayer<TData> {
|
|
|
2255
2325
|
* `groups` brackets runs of consecutive layers so they composite as one — see
|
|
2256
2326
|
* `LayerGroup`. A layer named by no group is emitted exactly as it was before
|
|
2257
2327
|
* groups existed, and a frame that declares none allocates nothing.
|
|
2328
|
+
*
|
|
2329
|
+
* `spans`, when passed, receives one {@link LayerDrawSpan} per layer drawn.
|
|
2258
2330
|
*/
|
|
2259
|
-
declare function drawLayers<TData>(layers: RenderLayer<TData>[], data: TData, visibility: Record<string, boolean>, order: string[] | undefined, view: View | undefined, dims: Dims, cache?: LayerCommandCache, onLayerError?: (failure: LayerDrawFailure) => void, groups?: readonly LayerGroup[]): DrawCommand[];
|
|
2331
|
+
declare function drawLayers<TData>(layers: RenderLayer<TData>[], data: TData, visibility: Record<string, boolean>, order: string[] | undefined, view: View | undefined, dims: Dims, cache?: LayerCommandCache, onLayerError?: (failure: LayerDrawFailure) => void, groups?: readonly LayerGroup[], spans?: LayerDrawSpan[]): DrawCommand[];
|
|
2260
2332
|
/**
|
|
2261
2333
|
* Resolve one layer's visibility: `alwaysOn` wins, then an explicit entry in
|
|
2262
2334
|
* `visibility`, then `defaultVisible`, defaulting to shown.
|
|
@@ -2288,6 +2360,9 @@ declare function isLayerPainted<TData>(layer: RenderLayer<TData>, visibility: Re
|
|
|
2288
2360
|
* real re-attempt rather than a stale tree served under fresh deps.
|
|
2289
2361
|
*/
|
|
2290
2362
|
declare function drawOneLayer<TData>(layer: RenderLayer<TData>, data: TData, view: View, dims: Dims, cache?: LayerCommandCache, onLayerError?: (failure: LayerDrawFailure) => void): DrawCommand[];
|
|
2363
|
+
/** Whether `b` matches `a` entry for entry under `Object.is` — how
|
|
2364
|
+
* `RenderLayer.deps` is compared, and any cache keyed the same way. */
|
|
2365
|
+
declare function depsUnchanged(a: readonly unknown[], b: readonly unknown[]): boolean;
|
|
2291
2366
|
|
|
2292
2367
|
/** Per-axis limits on a view's position. Any side may be left open. */
|
|
2293
2368
|
interface PanBounds {
|
|
@@ -2406,7 +2481,9 @@ interface TimelineClock {
|
|
|
2406
2481
|
interface EventBookingHandle {
|
|
2407
2482
|
stop(): void;
|
|
2408
2483
|
}
|
|
2484
|
+
/** One entry on an `EventTrack`. Give it `fire`, `book`, or both. */
|
|
2409
2485
|
interface TimelineEvent {
|
|
2486
|
+
/** Time within the track's timeline, in ms. */
|
|
2410
2487
|
t: number;
|
|
2411
2488
|
/** Runs on the frame that crosses the edge, told how far behind the frame it
|
|
2412
2489
|
* was crossed, in ms — never negative, and measured against `duration` on
|
|
@@ -2428,6 +2505,7 @@ interface EventTrack {
|
|
|
2428
2505
|
/** Sorted ascending by `t`. */
|
|
2429
2506
|
events: TimelineEvent[];
|
|
2430
2507
|
}
|
|
2508
|
+
/** How a timeline books its events against an outside clock. */
|
|
2431
2509
|
interface EventBooking {
|
|
2432
2510
|
clock: TimelineClock;
|
|
2433
2511
|
/** How far ahead of the playhead to book, in clock ms. Default 100. An event
|
|
@@ -2445,6 +2523,7 @@ interface TimelineTrack {
|
|
|
2445
2523
|
at: number;
|
|
2446
2524
|
timeline: NestedTimeline;
|
|
2447
2525
|
}
|
|
2526
|
+
/** Any track a timeline can hold. */
|
|
2448
2527
|
type Track = SampledTrack<any> | EventTrack | TimelineTrack;
|
|
2449
2528
|
/** What a child timeline may declare. The parent owns playback, so `loop`,
|
|
2450
2529
|
* `autoplay`, `onDone` and `cancelKey` have no meaning below the root. */
|
|
@@ -2453,18 +2532,24 @@ interface NestedTimeline {
|
|
|
2453
2532
|
/** Defaults to the largest end time across `tracks`. */
|
|
2454
2533
|
duration?: number;
|
|
2455
2534
|
}
|
|
2535
|
+
/** What `animator.timeline` takes: a root timeline, which owns playback. */
|
|
2456
2536
|
interface TimelineOptions extends NestedTimeline {
|
|
2457
2537
|
/** `true` loops forever, `n` loops n additional times. Default false. */
|
|
2458
2538
|
loop?: boolean | number;
|
|
2459
2539
|
/** Default true. When false the timeline registers but holds at t=0 until resumed. */
|
|
2460
2540
|
autoplay?: boolean;
|
|
2541
|
+
/** Called when playback reaches the end of its last lap. */
|
|
2461
2542
|
onDone?: () => void;
|
|
2543
|
+
/** Any new animation passed the same `cancelKey` cancels this one. */
|
|
2462
2544
|
cancelKey?: string;
|
|
2545
|
+
/** Names this timeline in `animator.watch` events and `animator.live()`. */
|
|
2546
|
+
label?: string;
|
|
2463
2547
|
/** Books each event's `book` against a clock the timeline does not own, so a
|
|
2464
2548
|
* consumer on that clock lands it at its true sub-frame time. The frame
|
|
2465
2549
|
* clock's mapping onto it is smoothed each frame and resynced on a jump. */
|
|
2466
2550
|
booking?: EventBooking;
|
|
2467
2551
|
}
|
|
2552
|
+
/** What `animator.timeline` returns: playback control plus live editing. */
|
|
2468
2553
|
interface TimelineHandle extends AnimationHandle {
|
|
2469
2554
|
/** Move the playhead. Never fires event tracks, at any depth. */
|
|
2470
2555
|
seek(t: number): void;
|
|
@@ -2489,144 +2574,6 @@ interface TimelineHandle extends AnimationHandle {
|
|
|
2489
2574
|
subscribe(cb: () => void): () => void;
|
|
2490
2575
|
}
|
|
2491
2576
|
|
|
2492
|
-
/** No easing: constant rate from start to finish. */
|
|
2493
|
-
declare const linear: EasingFn;
|
|
2494
|
-
/** Accelerates from a standstill, gently. */
|
|
2495
|
-
declare const easeInQuad: EasingFn;
|
|
2496
|
-
/** Decelerates to a stop, gently. The safe default for UI motion. */
|
|
2497
|
-
declare const easeOutQuad: EasingFn;
|
|
2498
|
-
/** Accelerates then decelerates, gently. */
|
|
2499
|
-
declare const easeInOutQuad: EasingFn;
|
|
2500
|
-
/** Accelerates from a standstill, moderately. */
|
|
2501
|
-
declare const easeInCubic: EasingFn;
|
|
2502
|
-
/** Decelerates to a stop, moderately. */
|
|
2503
|
-
declare const easeOutCubic: EasingFn;
|
|
2504
|
-
/** Accelerates then decelerates, moderately. */
|
|
2505
|
-
declare const easeInOutCubic: EasingFn;
|
|
2506
|
-
/** Accelerates from a standstill, sharply. */
|
|
2507
|
-
declare const easeInQuart: EasingFn;
|
|
2508
|
-
/** Decelerates to a stop, sharply. */
|
|
2509
|
-
declare const easeOutQuart: EasingFn;
|
|
2510
|
-
/** Accelerates then decelerates, sharply. */
|
|
2511
|
-
declare const easeInOutQuart: EasingFn;
|
|
2512
|
-
/** Accelerates from a standstill, very sharply. */
|
|
2513
|
-
declare const easeInQuint: EasingFn;
|
|
2514
|
-
/** Decelerates to a stop, very sharply. */
|
|
2515
|
-
declare const easeOutQuint: EasingFn;
|
|
2516
|
-
/** Accelerates then decelerates, very sharply. */
|
|
2517
|
-
declare const easeInOutQuint: EasingFn;
|
|
2518
|
-
/** Accelerates from a standstill along a sine curve — the mildest
|
|
2519
|
-
* acceleration of the built-ins. */
|
|
2520
|
-
declare const easeInSine: EasingFn;
|
|
2521
|
-
/** Decelerates to a stop along a sine curve — the mildest
|
|
2522
|
-
* deceleration of the built-ins. */
|
|
2523
|
-
declare const easeOutSine: EasingFn;
|
|
2524
|
-
/** Accelerates then decelerates along a sine curve. */
|
|
2525
|
-
declare const easeInOutSine: EasingFn;
|
|
2526
|
-
/** Accelerates exponentially: barely moves at first, then rushes. */
|
|
2527
|
-
declare const easeInExpo: EasingFn;
|
|
2528
|
-
/** Decelerates exponentially: leaps away, then creeps in. */
|
|
2529
|
-
declare const easeOutExpo: EasingFn;
|
|
2530
|
-
/** Exponential at both ends — a very fast middle between two
|
|
2531
|
-
* near-still extremes. */
|
|
2532
|
-
declare const easeInOutExpo: EasingFn;
|
|
2533
|
-
/** Accelerates along a circular arc: slow start, abrupt arrival. */
|
|
2534
|
-
declare const easeInCirc: EasingFn;
|
|
2535
|
-
/** Decelerates along a circular arc: abrupt start, slow arrival. */
|
|
2536
|
-
declare const easeOutCirc: EasingFn;
|
|
2537
|
-
/** Circular arcs at both ends. */
|
|
2538
|
-
declare const easeInOutCirc: EasingFn;
|
|
2539
|
-
/** Pulls back past the start before moving forward. Overshoots below 0. */
|
|
2540
|
-
declare const easeInBack: EasingFn;
|
|
2541
|
-
/** Overshoots the target, then settles back onto it. Exceeds 1. */
|
|
2542
|
-
declare const easeOutBack: EasingFn;
|
|
2543
|
-
/** Overshoots at both ends. Leaves the 0–1 range on each side. */
|
|
2544
|
-
declare const easeInOutBack: EasingFn;
|
|
2545
|
-
/** Oscillates around the start with growing amplitude, then snaps away. */
|
|
2546
|
-
declare const easeInElastic: EasingFn;
|
|
2547
|
-
/** Springs past the target and wobbles into it. Exceeds 1. */
|
|
2548
|
-
declare const easeOutElastic: EasingFn;
|
|
2549
|
-
/** Wobbles at both ends. Leaves the 0–1 range on each side. */
|
|
2550
|
-
declare const easeInOutElastic: EasingFn;
|
|
2551
|
-
/** Lands on the target and bounces, in hops of decreasing height. */
|
|
2552
|
-
declare const easeOutBounce: EasingFn;
|
|
2553
|
-
/** Bounces up to the start before departing — `easeOutBounce` reversed. */
|
|
2554
|
-
declare const easeInBounce: EasingFn;
|
|
2555
|
-
/** Bounces at both ends. */
|
|
2556
|
-
declare const easeInOutBounce: EasingFn;
|
|
2557
|
-
/** Alias for `easeInQuad`, kept for call sites that predate the
|
|
2558
|
-
* named-curve library. */
|
|
2559
|
-
declare const easeIn: EasingFn;
|
|
2560
|
-
/** Alias for `easeOutQuad`, kept for call sites that predate the
|
|
2561
|
-
* named-curve library. */
|
|
2562
|
-
declare const easeOut: EasingFn;
|
|
2563
|
-
/** Alias for `easeInOutQuad`, kept for call sites that predate the
|
|
2564
|
-
* named-curve library. */
|
|
2565
|
-
declare const easeInOut: EasingFn;
|
|
2566
|
-
/** All easings in one bag — useful for demos / pickers. */
|
|
2567
|
-
declare const EASINGS: {
|
|
2568
|
-
readonly linear: EasingFn;
|
|
2569
|
-
readonly easeInQuad: EasingFn;
|
|
2570
|
-
readonly easeOutQuad: EasingFn;
|
|
2571
|
-
readonly easeInOutQuad: EasingFn;
|
|
2572
|
-
readonly easeInCubic: EasingFn;
|
|
2573
|
-
readonly easeOutCubic: EasingFn;
|
|
2574
|
-
readonly easeInOutCubic: EasingFn;
|
|
2575
|
-
readonly easeInQuart: EasingFn;
|
|
2576
|
-
readonly easeOutQuart: EasingFn;
|
|
2577
|
-
readonly easeInOutQuart: EasingFn;
|
|
2578
|
-
readonly easeInQuint: EasingFn;
|
|
2579
|
-
readonly easeOutQuint: EasingFn;
|
|
2580
|
-
readonly easeInOutQuint: EasingFn;
|
|
2581
|
-
readonly easeInSine: EasingFn;
|
|
2582
|
-
readonly easeOutSine: EasingFn;
|
|
2583
|
-
readonly easeInOutSine: EasingFn;
|
|
2584
|
-
readonly easeInExpo: EasingFn;
|
|
2585
|
-
readonly easeOutExpo: EasingFn;
|
|
2586
|
-
readonly easeInOutExpo: EasingFn;
|
|
2587
|
-
readonly easeInCirc: EasingFn;
|
|
2588
|
-
readonly easeOutCirc: EasingFn;
|
|
2589
|
-
readonly easeInOutCirc: EasingFn;
|
|
2590
|
-
readonly easeInBack: EasingFn;
|
|
2591
|
-
readonly easeOutBack: EasingFn;
|
|
2592
|
-
readonly easeInOutBack: EasingFn;
|
|
2593
|
-
readonly easeInElastic: EasingFn;
|
|
2594
|
-
readonly easeOutElastic: EasingFn;
|
|
2595
|
-
readonly easeInOutElastic: EasingFn;
|
|
2596
|
-
readonly easeInBounce: EasingFn;
|
|
2597
|
-
readonly easeOutBounce: EasingFn;
|
|
2598
|
-
readonly easeInOutBounce: EasingFn;
|
|
2599
|
-
};
|
|
2600
|
-
/** The name of one of the built-in easing curves. */
|
|
2601
|
-
type EasingName = keyof typeof EASINGS;
|
|
2602
|
-
/** Named spring tunings, from softest to firmest. Springs settle on a target
|
|
2603
|
-
* rather than running for a fixed duration, so these are an alternative to an
|
|
2604
|
-
* easing curve, not a modifier on one. */
|
|
2605
|
-
declare const SPRING_PRESETS: Record<SpringPresetName, SpringPreset>;
|
|
2606
|
-
|
|
2607
|
-
/** Cubic-bezier control points, CSS `cubic-bezier()` order. The curve's two
|
|
2608
|
-
* endpoints are implicit at (0,0) and (1,1). */
|
|
2609
|
-
interface BezierEasing {
|
|
2610
|
-
/** `readonly` so an `as const` preset is assignable; nothing ever writes it. */
|
|
2611
|
-
bezier: readonly [number, number, number, number];
|
|
2612
|
-
}
|
|
2613
|
-
/** An easing curve as a value: a function, the name of a built-in, or control
|
|
2614
|
-
* points. Anything an editor has to name, show or serialize must not be a bare
|
|
2615
|
-
* function, which is why the union exists. */
|
|
2616
|
-
type EasingSpec = EasingFn | EasingName | BezierEasing;
|
|
2617
|
-
/** Build the easing curve for four cubic-bezier control points. `x1`/`x2` are
|
|
2618
|
-
* clamped to [0,1] — CSS `cubic-bezier()`'s constraint for a monotone x(t),
|
|
2619
|
-
* which both `solveForX` root-finders assume. `y1`/`y2` are unclamped: an
|
|
2620
|
-
* overshoot easing (back, elastic) needs them outside 0..1. */
|
|
2621
|
-
declare function cubicBezierEasing(x1: number, y1: number, x2: number, y2: number): EasingFn;
|
|
2622
|
-
/** Resolve a spec to the function that shapes progress. `undefined` is linear. */
|
|
2623
|
-
declare function resolveEasing(spec?: EasingSpec): EasingFn;
|
|
2624
|
-
|
|
2625
|
-
/** An easing curve: maps normalized progress `t ∈ [0, 1]` to eased progress.
|
|
2626
|
-
* Curves may leave the 0–1 range in the middle (back, elastic) but should
|
|
2627
|
-
* pass through 0 at 0 and 1 at 1. */
|
|
2628
|
-
type EasingFn = (t: number) => number;
|
|
2629
|
-
|
|
2630
2577
|
/** Blends two `T` values at eased progress `t`. Called once per frame; see
|
|
2631
2578
|
* {@link InterpolatorFactory} when the blend has setup worth hoisting. */
|
|
2632
2579
|
type Interpolate<T> = (from: T, to: T, t: number) => T;
|
|
@@ -2636,15 +2583,6 @@ type Interpolate<T> = (from: T, to: T, t: number) => T;
|
|
|
2636
2583
|
* shape exactly. For cheap interpolations the per-tick `Interpolate<T>` form is
|
|
2637
2584
|
* fine; this is the escape hatch when setup-per-tick is wasteful. */
|
|
2638
2585
|
type InterpolatorFactory<T> = (from: T, to: T) => (t: number) => T;
|
|
2639
|
-
/** A spring's physical parameters. Higher stiffness settles faster, higher
|
|
2640
|
-
* damping overshoots less, higher mass makes both sluggish. */
|
|
2641
|
-
interface SpringPreset {
|
|
2642
|
-
stiffness: number;
|
|
2643
|
-
damping: number;
|
|
2644
|
-
mass: number;
|
|
2645
|
-
}
|
|
2646
|
-
/** One of the tunings in `SPRING_PRESETS`. */
|
|
2647
|
-
type SpringPresetName = 'gentle' | 'wobbly' | 'stiff' | 'slow';
|
|
2648
2586
|
/** A running animation. Cancel it, or bend its time — pausing and time-scaling
|
|
2649
2587
|
* act on this animation's own virtual clock, independent of the animator's. */
|
|
2650
2588
|
interface AnimationHandle {
|
|
@@ -2684,6 +2622,8 @@ interface TweenOptions<T> {
|
|
|
2684
2622
|
onDone?: () => void;
|
|
2685
2623
|
/** Any new animation passed the same cancelKey cancels the prior one in flight. */
|
|
2686
2624
|
cancelKey?: string;
|
|
2625
|
+
/** Names this animation in {@link AnimatorEvent}s and `animator.live()`. */
|
|
2626
|
+
label?: string;
|
|
2687
2627
|
}
|
|
2688
2628
|
/** A spring animation: runs until the value settles on `to` rather than for a
|
|
2689
2629
|
* set duration, so it absorbs an initial velocity naturally. Non-numeric `T`
|
|
@@ -2708,6 +2648,8 @@ interface SpringOptions<T> {
|
|
|
2708
2648
|
onTick: (value: T) => void;
|
|
2709
2649
|
onDone?: () => void;
|
|
2710
2650
|
cancelKey?: string;
|
|
2651
|
+
/** Names this animation in {@link AnimatorEvent}s and `animator.live()`. */
|
|
2652
|
+
label?: string;
|
|
2711
2653
|
}
|
|
2712
2654
|
/** Spring and decay as one animation. With a `to`, a spring pulls toward it;
|
|
2713
2655
|
* with `to: null`, the value coasts on its velocity. Either can become the
|
|
@@ -2731,6 +2673,8 @@ interface PhysicsOptions<T> {
|
|
|
2731
2673
|
onTick: (value: T) => void;
|
|
2732
2674
|
onDone?: () => void;
|
|
2733
2675
|
cancelKey?: string;
|
|
2676
|
+
/** Names this animation in {@link AnimatorEvent}s and `animator.live()`. */
|
|
2677
|
+
label?: string;
|
|
2734
2678
|
}
|
|
2735
2679
|
/** An `AnimationHandle` that can also be steered while it runs — the point of
|
|
2736
2680
|
* the physics primitive. */
|
|
@@ -2755,6 +2699,8 @@ interface DecayOptions<T> {
|
|
|
2755
2699
|
onTick: (value: T) => void;
|
|
2756
2700
|
onDone?: () => void;
|
|
2757
2701
|
cancelKey?: string;
|
|
2702
|
+
/** Names this animation in {@link AnimatorEvent}s and `animator.live()`. */
|
|
2703
|
+
label?: string;
|
|
2758
2704
|
}
|
|
2759
2705
|
/** Options for `useAnimator`. Everything here is an injection seam for tests;
|
|
2760
2706
|
* the defaults are the real clock, rAF, and `setTimeout`. */
|
|
@@ -2889,7 +2835,82 @@ interface Animator {
|
|
|
2889
2835
|
* stop firing even though the override is still installed.
|
|
2890
2836
|
*/
|
|
2891
2837
|
keepAlive(): () => void;
|
|
2838
|
+
/**
|
|
2839
|
+
* Subscribe to the lifecycle of every animation this animator runs, the
|
|
2840
|
+
* composites and timelines included. Returns an unsubscribe. Events arrive
|
|
2841
|
+
* synchronously, as each thing happens — see {@link AnimatorEvent} for the
|
|
2842
|
+
* order. With no listener attached nothing is built or delivered, so an
|
|
2843
|
+
* unwatched animator pays nothing for this.
|
|
2844
|
+
*/
|
|
2845
|
+
watch(listener: AnimatorListener): () => void;
|
|
2846
|
+
/** What is running right now, in registration order: a fresh snapshot per
|
|
2847
|
+
* call, for a debug overlay to draw. */
|
|
2848
|
+
live(): LiveAnimation[];
|
|
2892
2849
|
}
|
|
2850
|
+
/** Which animator call started an animation. A loop, tween loop or stagger is
|
|
2851
|
+
* an entry of its own beside the children it runs; `keepAlive` holds the
|
|
2852
|
+
* frame loop open and animates nothing. */
|
|
2853
|
+
type AnimationKind = 'tween' | 'spring' | 'decay' | 'physics' | 'timeline' | 'loop' | 'tweenLoop' | 'stagger' | 'keepAlive';
|
|
2854
|
+
/** Who an {@link AnimatorEvent} is about. One object per registration, so the
|
|
2855
|
+
* same animation's events share it by identity. */
|
|
2856
|
+
interface AnimationInfo {
|
|
2857
|
+
/** The id on the animation's handle. */
|
|
2858
|
+
readonly id: number;
|
|
2859
|
+
readonly kind: AnimationKind;
|
|
2860
|
+
/** The animation's `cancelKey`. Pose helpers key by node, as `pose:<id>`. */
|
|
2861
|
+
readonly key?: string;
|
|
2862
|
+
/** The animation's `label` option. */
|
|
2863
|
+
readonly label?: string;
|
|
2864
|
+
}
|
|
2865
|
+
/** One row of `animator.live()`. */
|
|
2866
|
+
interface LiveAnimation extends AnimationInfo {
|
|
2867
|
+
/** Paused on its own handle. The animator-wide pause is `animator.isPaused()`. */
|
|
2868
|
+
readonly paused: boolean;
|
|
2869
|
+
/** Its own time scale; the animator's multiplies on top. */
|
|
2870
|
+
readonly timeScale: number;
|
|
2871
|
+
/** Virtual ms its clock has advanced since it started. */
|
|
2872
|
+
readonly elapsed: number;
|
|
2873
|
+
/** 0 to 1, for a tween or a timeline (the playhead over its duration).
|
|
2874
|
+
* Absent where there is no end to measure against: physics, composites. */
|
|
2875
|
+
readonly progress?: number;
|
|
2876
|
+
}
|
|
2877
|
+
/**
|
|
2878
|
+
* One thing happening to an animation, as `animator.watch` delivers it.
|
|
2879
|
+
*
|
|
2880
|
+
* - `start` — registered. A finished timeline that `seek` or `edit` revives
|
|
2881
|
+
* starts again, under the same id.
|
|
2882
|
+
* - `end` — finished on its own. Delivered once every animation has ticked
|
|
2883
|
+
* that frame, in registration order.
|
|
2884
|
+
* - `cancel` — stopped by its handle, `cancel`, `cancelKey` or `cancelAll`.
|
|
2885
|
+
* - `interrupt` — stopped because `by` claimed its `cancelKey`. Delivered
|
|
2886
|
+
* before `by`'s `start`.
|
|
2887
|
+
* - `lap` — a looping timeline wrapped; `lap` counts wraps since it started.
|
|
2888
|
+
* - `fire` — an event on a timeline's event track was crossed, at any depth.
|
|
2889
|
+
* `path` indexes from the root timeline's `tracks()` down through each
|
|
2890
|
+
* nested timeline to the event track. Delivered after the event's own `fire`.
|
|
2891
|
+
*/
|
|
2892
|
+
type AnimatorEvent = {
|
|
2893
|
+
readonly type: 'start' | 'end' | 'cancel';
|
|
2894
|
+
readonly animation: AnimationInfo;
|
|
2895
|
+
} | {
|
|
2896
|
+
readonly type: 'interrupt';
|
|
2897
|
+
readonly animation: AnimationInfo;
|
|
2898
|
+
readonly by: AnimationInfo;
|
|
2899
|
+
} | {
|
|
2900
|
+
readonly type: 'lap';
|
|
2901
|
+
readonly animation: AnimationInfo;
|
|
2902
|
+
readonly lap: number;
|
|
2903
|
+
} | {
|
|
2904
|
+
readonly type: 'fire';
|
|
2905
|
+
readonly animation: AnimationInfo;
|
|
2906
|
+
readonly track: EventTrack;
|
|
2907
|
+
readonly path: readonly number[];
|
|
2908
|
+
readonly event: TimelineEvent;
|
|
2909
|
+
/** As the event's own `fire` is told: ms behind the frame it was crossed. */
|
|
2910
|
+
readonly lateBy: number;
|
|
2911
|
+
};
|
|
2912
|
+
/** Receives what `animator.watch` delivers. */
|
|
2913
|
+
type AnimatorListener = (event: AnimatorEvent) => void;
|
|
2893
2914
|
/** Options for `Animator.loop`. */
|
|
2894
2915
|
interface LoopOptions {
|
|
2895
2916
|
/** Maximum number of iterations. Default Infinity. */
|
|
@@ -2899,13 +2920,18 @@ interface LoopOptions {
|
|
|
2899
2920
|
/** Any new animation passed the same cancelKey cancels the prior one in flight.
|
|
2900
2921
|
* Also enables `animator.cancelKey` / `animator.isActive(key)` for this loop. */
|
|
2901
2922
|
cancelKey?: string;
|
|
2923
|
+
/** Names this loop in {@link AnimatorEvent}s and `animator.live()`. */
|
|
2924
|
+
label?: string;
|
|
2902
2925
|
}
|
|
2903
|
-
/**
|
|
2926
|
+
/** A stagger run's own options: the factory form's fourth argument, and part
|
|
2927
|
+
* of every fluent builder method's options. */
|
|
2904
2928
|
interface StaggerOptions {
|
|
2905
2929
|
/** Cancel-key for the supervising registration. `animator.cancelKey(key)`
|
|
2906
2930
|
* cancels the whole stagger; `animator.isActive(key)` returns true while
|
|
2907
2931
|
* any timer or child is alive. */
|
|
2908
2932
|
cancelKey?: string;
|
|
2933
|
+
/** Names this stagger in {@link AnimatorEvent}s and `animator.live()`. */
|
|
2934
|
+
label?: string;
|
|
2909
2935
|
}
|
|
2910
2936
|
/** Produces one iteration of a loop. Must arrange for `next` to be called when
|
|
2911
2937
|
* the animation it returns finishes, or the loop stalls after one pass. */
|
|
@@ -2920,8 +2946,9 @@ type StaggerFactory<TItem> = (item: TItem, index: number) => AnimationHandle;
|
|
|
2920
2946
|
* vary an option (e.g. `to: (_item, i) => (i + 1) * 10`). */
|
|
2921
2947
|
type StaggerPerItem<T, TItem> = T | ((item: TItem, index: number) => T);
|
|
2922
2948
|
/** Options for the stagger builder's `.tween`: a tween per item, where
|
|
2923
|
-
* `from`, `to` and `ms` may each vary by item.
|
|
2924
|
-
|
|
2949
|
+
* `from`, `to` and `ms` may each vary by item. `cancelKey` and `label` belong
|
|
2950
|
+
* to the stagger as a whole, as in {@link StaggerOptions}. */
|
|
2951
|
+
interface StaggerTweenOptions<T, TItem> extends StaggerOptions {
|
|
2925
2952
|
from: StaggerPerItem<T, TItem>;
|
|
2926
2953
|
to: StaggerPerItem<T, TItem>;
|
|
2927
2954
|
ms: StaggerPerItem<number, TItem>;
|
|
@@ -2931,8 +2958,10 @@ interface StaggerTweenOptions<T, TItem> {
|
|
|
2931
2958
|
onDone?: (item: TItem, index: number) => void;
|
|
2932
2959
|
}
|
|
2933
2960
|
/** Options for the stagger builder's `.springPose`: the spring tuning, and
|
|
2934
|
-
* whether each item's settle is recorded as an undoable op.
|
|
2935
|
-
|
|
2961
|
+
* whether each item's settle is recorded as an undoable op. `cancelKey` and
|
|
2962
|
+
* `label` belong to the stagger as a whole, as in {@link StaggerOptions};
|
|
2963
|
+
* each item's spring keeps its own per-node key. */
|
|
2964
|
+
interface StaggerSpringPoseOptions<TPose> extends StaggerOptions {
|
|
2936
2965
|
preset?: SpringPresetName;
|
|
2937
2966
|
stiffness?: number;
|
|
2938
2967
|
damping?: number;
|
|
@@ -2945,7 +2974,7 @@ interface StaggerSpringPoseOptions<TPose> {
|
|
|
2945
2974
|
* items and the delay schedule are already fixed. */
|
|
2946
2975
|
interface StaggerBuilder<TItem> {
|
|
2947
2976
|
/** Run an arbitrary per-item factory. */
|
|
2948
|
-
each(factory: StaggerFactory<TItem
|
|
2977
|
+
each(factory: StaggerFactory<TItem>, opts?: StaggerOptions): AnimationHandle;
|
|
2949
2978
|
/** Sugar: per-item `animator.tween` with per-item-varying options. */
|
|
2950
2979
|
tween<T>(opts: StaggerTweenOptions<T, TItem>): AnimationHandle;
|
|
2951
2980
|
/** Sugar: per-item `springPose` against an adapter. `poseFn` returns the
|
|
@@ -2973,6 +3002,8 @@ interface TweenLoopOptions<T> {
|
|
|
2973
3002
|
onTick: (value: T) => void;
|
|
2974
3003
|
onDone?: () => void;
|
|
2975
3004
|
cancelKey?: string;
|
|
3005
|
+
/** Names this animation in {@link AnimatorEvent}s and `animator.live()`. */
|
|
3006
|
+
label?: string;
|
|
2976
3007
|
}
|
|
2977
3008
|
|
|
2978
3009
|
/** Cancel-key prefix. Each hook instance appends its own id, so two runners
|
|
@@ -3091,144 +3122,275 @@ declare function usePointerContext(): PointerContextValue | null;
|
|
|
3091
3122
|
declare function usePointerPosition(): PointerWorldPos;
|
|
3092
3123
|
|
|
3093
3124
|
/**
|
|
3094
|
-
*
|
|
3125
|
+
* Project a leaf path from its source frame into world coordinates given a
|
|
3126
|
+
* `{x, y, width, height, rotation?}` pose. Two transforms compose, in this
|
|
3127
|
+
* order:
|
|
3095
3128
|
*
|
|
3096
|
-
*
|
|
3097
|
-
*
|
|
3098
|
-
*
|
|
3099
|
-
*
|
|
3100
|
-
*
|
|
3129
|
+
* 1. Translate so the path's source AABB origin lands at `pose.x, pose.y`.
|
|
3130
|
+
* 2. If `pose.rotation` is nonzero, rotate every coord about the unrotated
|
|
3131
|
+
* AABB center — i.e. `(pose.x + pose.width/2, pose.y + pose.height/2)`,
|
|
3132
|
+
* matching `SceneCanvas.rotateAroundAABBCenter` so the baked geometry
|
|
3133
|
+
* lines up with what the renderer draws.
|
|
3101
3134
|
*
|
|
3102
|
-
*
|
|
3103
|
-
*
|
|
3104
|
-
*
|
|
3105
|
-
*
|
|
3135
|
+
* RectPaths can't carry rotation as-is (they're axis-aligned by definition);
|
|
3136
|
+
* a non-zero `pose.rotation` on a rect promotes the result to a polygon so
|
|
3137
|
+
* the four corners are baked into world coords. Callers that need to keep
|
|
3138
|
+
* the rect fast-path can pre-check `pose.rotation` themselves.
|
|
3106
3139
|
*
|
|
3107
|
-
*
|
|
3108
|
-
*
|
|
3109
|
-
* world position of a child is preserved across the parent change.
|
|
3140
|
+
* Used by adapters that need true world geometry — most notably boolean ops,
|
|
3141
|
+
* where operating on the unrotated source path produces wrong shapes.
|
|
3110
3142
|
*/
|
|
3111
|
-
/** Re-exported; the declaration lives in `core/scene/types.ts`, which names
|
|
3112
|
-
* it and may not import from features. */
|
|
3113
3143
|
|
|
3114
|
-
/**
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3144
|
+
/** Subset of pose fields this helper consumes. Matches the kit's auto-rotate
|
|
3145
|
+
* convention (`SceneCanvas.defaultDrawOne`): `x/y/width/height` define an
|
|
3146
|
+
* AABB whose unrotated center is the rotation pivot. */
|
|
3147
|
+
interface PathInWorldPose {
|
|
3148
|
+
x: number;
|
|
3149
|
+
y: number;
|
|
3150
|
+
width: number;
|
|
3151
|
+
height: number;
|
|
3152
|
+
rotation?: number;
|
|
3122
3153
|
}
|
|
3123
3154
|
/**
|
|
3124
|
-
*
|
|
3125
|
-
*
|
|
3126
|
-
*
|
|
3127
|
-
*
|
|
3128
|
-
*
|
|
3155
|
+
* Project a stored path into the pose's **local frame** — translate (and, for
|
|
3156
|
+
* rects, rebase to the pose's `width`/`height`) so the path's AABB origin sits
|
|
3157
|
+
* at the pose origin. This is translate-only: it does NOT apply
|
|
3158
|
+
* `pose.rotation`. Callers that want the fully world-positioned (rotated) path
|
|
3159
|
+
* should use `pathInWorld`, which composes this with the rotation wrap.
|
|
3129
3160
|
*
|
|
3130
|
-
*
|
|
3131
|
-
*
|
|
3132
|
-
*
|
|
3161
|
+
* Rects rebase onto the pose's `width`/`height` because resize updates the pose,
|
|
3162
|
+
* not the stored `RectPath` — so the live size lives on the pose. Honoring it
|
|
3163
|
+
* here keeps this in lockstep with the renderer (`SceneCanvas` paints the rect
|
|
3164
|
+
* at `pose.width/height`); otherwise world-space consumers (slice, booleans,
|
|
3165
|
+
* release-compound) would operate on the stale pre-resize dimensions.
|
|
3166
|
+
*
|
|
3167
|
+
* Used by the local seams: the default painter (paint + silhouette), and as the
|
|
3168
|
+
* building block `pathInWorld`/`findShapeSilhouette` rotate on top of.
|
|
3133
3169
|
*/
|
|
3134
|
-
|
|
3135
|
-
/** Consumer's pose-composition strategy for hierarchical scenes. `compose`
|
|
3136
|
-
* folds a child's pose (in parent's frame) up to the next frame; `decompose`
|
|
3137
|
-
* is its inverse. Default is IDENTITY — an absolute-pose scene where every
|
|
3138
|
-
* node already stores world coords (parent is grouping-only, no transform). */
|
|
3139
|
-
interface PoseComposition<TPose> {
|
|
3140
|
-
compose: (parent: TPose, child: TPose) => TPose;
|
|
3141
|
-
decompose: (parent: TPose, world: TPose) => TPose;
|
|
3142
|
-
closure: PoseClosure;
|
|
3143
|
-
}
|
|
3144
|
-
/** Default pose-composition strategy: IDENTITY. Both `compose` and
|
|
3145
|
-
* `decompose` return the child/world pose unchanged, modeling an
|
|
3146
|
-
* absolute-pose scene where every node stores world coords and parents are
|
|
3147
|
-
* grouping-only (no transform). With this strategy `composeWorldPose`
|
|
3148
|
-
* returns a node's own raw pose and `rebaseLocalPose` is a no-op. */
|
|
3149
|
-
declare const IDENTITY_POSE_COMPOSITION: PoseComposition<unknown>;
|
|
3170
|
+
declare function pathInPoseFrame(path: Path, pose: PathInWorldPose): Path;
|
|
3150
3171
|
/**
|
|
3151
|
-
*
|
|
3152
|
-
*
|
|
3153
|
-
* a visited-set guard breaks if the chain ever loops back to itself.
|
|
3154
|
-
*
|
|
3155
|
-
* `compose(parent, child)` interprets `child` as expressed *in `parent`'s
|
|
3156
|
-
* local frame* and returns the equivalent pose in the next frame up. For a
|
|
3157
|
-
* standard translation-only rect: `world = { x: p.x + c.x, y: p.y + c.y,
|
|
3158
|
-
* width: c.width, height: c.height }`.
|
|
3172
|
+
* Bake `pose` into `path`'s coordinates so the returned path is positioned
|
|
3173
|
+
* in world space. Returns a fresh `Path` instance; never mutates inputs.
|
|
3159
3174
|
*/
|
|
3160
|
-
declare function
|
|
3175
|
+
declare function pathInWorld(path: Path, pose: PathInWorldPose): Path;
|
|
3161
3176
|
/**
|
|
3162
|
-
*
|
|
3163
|
-
*
|
|
3164
|
-
*
|
|
3177
|
+
* Inverse of `pathInWorld` for a path in **world** space: the unrotated
|
|
3178
|
+
* stored path plus the pose that draws it there. Inverse-rotates about the
|
|
3179
|
+
* pose's AABB center, so the stored path is unrotated and the pose's
|
|
3180
|
+
* `rotation` is preserved, then fits the pose's AABB fields to the result.
|
|
3181
|
+
* The new box's center is placed where the old rotation carries it, since
|
|
3182
|
+
* the pivot moves with the box: `pathInWorld(result.path, result.pose)`
|
|
3183
|
+
* reproduces `worldPath` whether or not its bounds changed.
|
|
3165
3184
|
*
|
|
3166
|
-
* Generic
|
|
3167
|
-
*
|
|
3168
|
-
*
|
|
3185
|
+
* Generic in the pose type so consumer-defined pose fields (including
|
|
3186
|
+
* `rotation`) survive the round-trip. Used by the anchor-edit commit, its
|
|
3187
|
+
* live preview, and the default slice dep.
|
|
3169
3188
|
*/
|
|
3170
|
-
declare function
|
|
3189
|
+
declare function worldEditToStorage<P extends PathInWorldPose>(pose: P, worldPath: PolygonPath): {
|
|
3190
|
+
pose: P;
|
|
3191
|
+
path: PolygonPath;
|
|
3192
|
+
};
|
|
3193
|
+
declare function worldEditToStorage<P extends PathInWorldPose>(pose: P, worldPath: Path): {
|
|
3194
|
+
pose: P;
|
|
3195
|
+
path: Path;
|
|
3196
|
+
};
|
|
3197
|
+
|
|
3171
3198
|
/**
|
|
3172
|
-
*
|
|
3173
|
-
*
|
|
3174
|
-
*
|
|
3199
|
+
* Text as path geometry: the glyph outlines a text node draws, placed in
|
|
3200
|
+
* world space and composed into one `Path`. What "Create Outlines" replaces a
|
|
3201
|
+
* text node with, and what a Boolean op reads when a text node is an operand.
|
|
3202
|
+
*
|
|
3203
|
+
* The walk is `layoutRuns`', so the glyphs land exactly where the renderer's
|
|
3204
|
+
* outline tier puts them — same pen positions, same baselines, same synthetic
|
|
3205
|
+
* italic shear — but with the tier forced on for every glyph whatever its
|
|
3206
|
+
* size, and with paint set aside: unfilled text has outlines too.
|
|
3207
|
+
* `textToPathsByPaint` is the same walk, split by the paint each glyph wears.
|
|
3175
3208
|
*/
|
|
3176
|
-
|
|
3209
|
+
|
|
3210
|
+
/** The fields of a text node's data that decide its glyph geometry, and the
|
|
3211
|
+
* paint `textToPathsByPaint` splits it by. Paint never changes the geometry. */
|
|
3212
|
+
interface TextOutlineSource {
|
|
3213
|
+
text: string;
|
|
3214
|
+
runs?: readonly StyledRun[];
|
|
3215
|
+
style?: TextStyle;
|
|
3216
|
+
verticalAlign?: TextVerticalAlign;
|
|
3217
|
+
/** The node's `data.fill`: `null` is no fill, absent the default black. */
|
|
3218
|
+
fill?: FillStyle | null;
|
|
3219
|
+
/** The node's `data.stroke`: absent or `null` is no stroke. */
|
|
3220
|
+
stroke?: Stroke | null;
|
|
3221
|
+
}
|
|
3222
|
+
/** One paint's share of a text node's outlines — see {@link textToPathsByPaint}. */
|
|
3223
|
+
interface TextPaintPath {
|
|
3224
|
+
/** The resolved fill these glyphs wear: the run's own, else the node's.
|
|
3225
|
+
* `null` for unfilled text, painted by its stroke alone. */
|
|
3226
|
+
fill: FillStyle | null;
|
|
3227
|
+
/** The resolved stroke — the run's own, else the node's — or absent. */
|
|
3228
|
+
stroke?: Stroke;
|
|
3229
|
+
/** World-space outlines, as {@link textToPath} builds them. */
|
|
3230
|
+
path: PolygonPath;
|
|
3231
|
+
}
|
|
3232
|
+
/** A text node as {@link textToPath} reads it: its data and its pose. */
|
|
3233
|
+
interface TextNodeSource {
|
|
3234
|
+
data: TextOutlineSource;
|
|
3235
|
+
pose: PathInWorldPose;
|
|
3236
|
+
}
|
|
3237
|
+
/** Options for {@link textToPath}. */
|
|
3238
|
+
interface TextToPathOptions {
|
|
3239
|
+
/** The view scale a `{ px }` `fontSize` or `letterSpacing` resolves
|
|
3240
|
+
* against, as for `textCommandFromPose`. Default 1. */
|
|
3241
|
+
scale?: number;
|
|
3242
|
+
}
|
|
3177
3243
|
/**
|
|
3178
|
-
*
|
|
3179
|
-
* frame. Used when reparenting so the child's visual world position is
|
|
3180
|
-
* preserved despite the change of frame. Inverse of one `compose` step.
|
|
3244
|
+
* Why a text node has no outline geometry to give:
|
|
3181
3245
|
*
|
|
3182
|
-
*
|
|
3183
|
-
*
|
|
3184
|
-
* `
|
|
3185
|
-
*
|
|
3186
|
-
*
|
|
3187
|
-
* `
|
|
3246
|
+
* - `'no-outlines'` — the face that serves it has no outlines registered
|
|
3247
|
+
* (`registerFontOutlines`), so there is no geometry to read.
|
|
3248
|
+
* - `'outlines-loading'` — registered but not parsed yet. `loadTextOutlines`
|
|
3249
|
+
* waits for it; the call has already started the load.
|
|
3250
|
+
* - `'outlines-failed'` — registered, and the bytes did not load or parse.
|
|
3251
|
+
* - `'synthetic-bold'` — the requested weight is faked from a lighter face.
|
|
3252
|
+
* The renderer thickens the distance field for that, and a path has no
|
|
3253
|
+
* field to thicken; emboldening geometry needs outline offsetting, which
|
|
3254
|
+
* the kit does not have. Converting would silently lighten the text.
|
|
3188
3255
|
*/
|
|
3189
|
-
|
|
3190
|
-
/**
|
|
3191
|
-
|
|
3256
|
+
type TextOutlinesFailure = 'no-outlines' | 'outlines-loading' | 'outlines-failed' | 'synthetic-bold';
|
|
3257
|
+
/** Thrown by {@link textToPath} when some run of the text has no outline
|
|
3258
|
+
* geometry. Names the run's requested face. */
|
|
3259
|
+
declare class TextOutlinesError extends Error {
|
|
3260
|
+
readonly reason: TextOutlinesFailure;
|
|
3261
|
+
readonly family: string;
|
|
3262
|
+
readonly weight: number;
|
|
3263
|
+
readonly style: FontStyle;
|
|
3264
|
+
constructor(reason: TextOutlinesFailure, family: string, weight: number, style: FontStyle, detail: string);
|
|
3265
|
+
}
|
|
3192
3266
|
/**
|
|
3193
|
-
*
|
|
3194
|
-
*
|
|
3195
|
-
*
|
|
3267
|
+
* The outline geometry of a text node, in world space: every glyph and every
|
|
3268
|
+
* underline, strikethrough and overline rule it draws, as one `'nonzero'`
|
|
3269
|
+
* compound path whose filled region is their union. Glyphs keep the font's
|
|
3270
|
+
* curves; overlapping contours are not merged — run the result through
|
|
3271
|
+
* `pathUnion` for that, at the cost of flattening the curves.
|
|
3196
3272
|
*
|
|
3197
|
-
*
|
|
3198
|
-
*
|
|
3199
|
-
*
|
|
3200
|
-
*
|
|
3201
|
-
* this can express — see `PoseClosure`.
|
|
3273
|
+
* `pose` is the node's box and rotation. Synthetic italic is sheared exactly
|
|
3274
|
+
* as the renderer shears it. Throws {@link TextOutlinesError} when any run's
|
|
3275
|
+
* face cannot supply outlines — never returns a partial or empty path for
|
|
3276
|
+
* that. Text with no ink (empty, or only spaces) returns an empty path.
|
|
3202
3277
|
*/
|
|
3203
|
-
declare function
|
|
3204
|
-
/** Inverse of `composeRigidPose` — un-turns about the parent's center, then
|
|
3205
|
-
* subtracts the parent's offset. */
|
|
3206
|
-
declare function decomposeRigidPose<TPose extends RectPose>(parent: TPose, world: TPose): TPose;
|
|
3207
|
-
/** Translation-only composition over `RectPose`. What a scene wants when a
|
|
3208
|
-
* container groups its children but never turns them. */
|
|
3209
|
-
declare const RECT_POSE_COMPOSITION: PoseComposition<RectPose>;
|
|
3210
|
-
/** Composition over `RectPose` where a container's pose is a frame: rotating
|
|
3211
|
-
* the container rotates its contents. */
|
|
3212
|
-
declare const RIGID_POSE_COMPOSITION: PoseComposition<RectPose>;
|
|
3278
|
+
declare function textToPath(data: TextOutlineSource, pose: PathInWorldPose, opts?: TextToPathOptions): PolygonPath;
|
|
3213
3279
|
/**
|
|
3214
|
-
*
|
|
3215
|
-
*
|
|
3216
|
-
*
|
|
3217
|
-
*
|
|
3280
|
+
* {@link textToPath}, split by paint: one path per distinct resolved fill and
|
|
3281
|
+
* stroke, each gathering the glyphs and decoration rules that wear it — a
|
|
3282
|
+
* rule takes the fill of the run it underlines. Groups come in the order
|
|
3283
|
+
* their paint first appears in the text; a paint whose runs put down no ink
|
|
3284
|
+
* has none. Together the paths cover exactly what `textToPath` covers.
|
|
3218
3285
|
*
|
|
3219
|
-
*
|
|
3220
|
-
*
|
|
3221
|
-
*
|
|
3286
|
+
* Paint resolves as the renderer resolves it: a run's `fill` / `stroke`, else
|
|
3287
|
+
* the node's `data.fill` / `data.stroke` from `data`, else the default black
|
|
3288
|
+
* fill and no stroke. Throws as `textToPath` does.
|
|
3289
|
+
*/
|
|
3290
|
+
declare function textToPathsByPaint(data: TextOutlineSource, pose: PathInWorldPose, opts?: TextToPathOptions): TextPaintPath[];
|
|
3291
|
+
/**
|
|
3292
|
+
* Load the outlines of every face `data` is set in — the requested faces and
|
|
3293
|
+
* the ones they resolve to — so a following {@link textToPath} does not fail
|
|
3294
|
+
* with `'outlines-loading'`. Resolves once each has loaded or failed.
|
|
3295
|
+
*/
|
|
3296
|
+
declare function loadTextOutlines(data: TextOutlineSource, opts?: TextToPathOptions): Promise<void>;
|
|
3297
|
+
|
|
3298
|
+
/**
|
|
3299
|
+
* Create Outlines: replace each selected text node with path nodes carrying
|
|
3300
|
+
* its glyph outlines, giving up editability for geometry — the destructive
|
|
3301
|
+
* conversion every vector editor has. One path per paint the text wears; one
|
|
3302
|
+
* undoable batch; the replacement takes the text node's slot, so stacking
|
|
3303
|
+
* order is unchanged.
|
|
3222
3304
|
*/
|
|
3223
|
-
|
|
3305
|
+
|
|
3306
|
+
/** What a path minted by Create Outlines must carry — see
|
|
3307
|
+
* {@link CreateOutlinesAdapter.createPathNode}. */
|
|
3308
|
+
interface OutlinePathSpec {
|
|
3309
|
+
/** The fill these glyphs wear, resolved: their run's, else the node's,
|
|
3310
|
+
* else the default text fill. `null` is no fill. */
|
|
3311
|
+
fill: FillStyle | null;
|
|
3312
|
+
/** The stroke they wear, resolved the same way; absent for none. */
|
|
3313
|
+
stroke?: Stroke;
|
|
3314
|
+
/** The parent the path goes under: the text's own, or the container
|
|
3315
|
+
* minted to hold a multi-paint text's paths. */
|
|
3316
|
+
parent: string | null;
|
|
3317
|
+
}
|
|
3318
|
+
/** What `applyCreateOutlines` reads and writes through. */
|
|
3319
|
+
interface CreateOutlinesAdapter {
|
|
3320
|
+
getSelection(): readonly NodeId[] | readonly string[];
|
|
3321
|
+
/** The text node behind `id`, or `undefined` for anything else. */
|
|
3322
|
+
getTextSource(id: NodeId): TextNodeSource | undefined;
|
|
3323
|
+
/**
|
|
3324
|
+
* Mint one path node of text node `sourceId`'s outlines. `path` is in world
|
|
3325
|
+
* space. The node must wear `spec`'s fill and stroke — a text whose runs
|
|
3326
|
+
* differ in paint gets one path per paint — and sit under `spec.parent`.
|
|
3327
|
+
* The kit places it; only the consumer knows its data shape.
|
|
3328
|
+
*/
|
|
3329
|
+
createPathNode(path: PolygonPath, sourceId: NodeId, spec: OutlinePathSpec): {
|
|
3330
|
+
id: string;
|
|
3331
|
+
};
|
|
3332
|
+
/**
|
|
3333
|
+
* Mint the container that holds a multi-paint text's paths, under `parent`.
|
|
3334
|
+
* `bounds` is the world envelope of the paths. The kit puts the container in
|
|
3335
|
+
* the text's slot and the paths inside it, in the text's order. Without
|
|
3336
|
+
* this, the paths are laid flat in that slot instead.
|
|
3337
|
+
*/
|
|
3338
|
+
createContainerNode?(sourceId: NodeId, spec: {
|
|
3339
|
+
parent: string | null;
|
|
3340
|
+
bounds: Rect;
|
|
3341
|
+
}): {
|
|
3342
|
+
id: string;
|
|
3343
|
+
};
|
|
3344
|
+
/** Full node for `id`, so undo restores the text node whole. Without it the
|
|
3345
|
+
* delete captures an `{ id }` stub. */
|
|
3346
|
+
getNode?(id: string): {
|
|
3347
|
+
id: string;
|
|
3348
|
+
} | undefined | null;
|
|
3349
|
+
/** Parent and sibling order — the reorder contract. With both, each path is
|
|
3350
|
+
* inserted at its text node's index; without, where `insertNode` defaults. */
|
|
3351
|
+
getParent?(id: string): string | null;
|
|
3352
|
+
getChildren?(parentId: string | null): readonly string[];
|
|
3353
|
+
applyOps?(ops: Op[], label?: string): void;
|
|
3354
|
+
setSelection?(ids: NodeId[]): void;
|
|
3355
|
+
insertNode?(node: {
|
|
3356
|
+
id: string;
|
|
3357
|
+
}, index?: number): void;
|
|
3358
|
+
removeNode?(id: string): void;
|
|
3359
|
+
}
|
|
3360
|
+
/** Outcome of {@link applyCreateOutlines}. */
|
|
3361
|
+
type CreateOutlinesResult =
|
|
3362
|
+
/** `resultIds` are what replaced the text nodes at their level — a path,
|
|
3363
|
+
* a container, or a run of flat paths each — which is also what is now
|
|
3364
|
+
* selected in the text nodes' place. */
|
|
3365
|
+
{
|
|
3366
|
+
kind: 'applied';
|
|
3367
|
+
resultIds: string[];
|
|
3368
|
+
}
|
|
3369
|
+
/** Nothing selected is text with ink. */
|
|
3370
|
+
| {
|
|
3371
|
+
kind: 'noop';
|
|
3372
|
+
reason: 'no-text';
|
|
3373
|
+
}
|
|
3374
|
+
/** Some selected text has no outline geometry; nothing was changed. */
|
|
3375
|
+
| {
|
|
3376
|
+
kind: 'failed';
|
|
3377
|
+
reason: 'text-outlines';
|
|
3378
|
+
error: TextOutlinesError;
|
|
3379
|
+
};
|
|
3380
|
+
/**
|
|
3381
|
+
* Convert every text node in the selection to outlines, as one batch labeled
|
|
3382
|
+
* "Create Outlines". Other selected nodes are left alone and stay selected.
|
|
3383
|
+
* All or nothing: if any text node's face cannot supply outlines the scene is
|
|
3384
|
+
* untouched and the error comes back in the result.
|
|
3385
|
+
*/
|
|
3386
|
+
declare function applyCreateOutlines(adapter: CreateOutlinesAdapter): CreateOutlinesResult;
|
|
3224
3387
|
|
|
3225
3388
|
/** Boolean op identifiers — five Pathfinder primaries plus Crop. */
|
|
3226
3389
|
type BooleanOp = 'union' | 'intersect' | 'subtract' | 'exclude' | 'divide' | 'crop';
|
|
3227
3390
|
/**
|
|
3228
3391
|
* z-position descriptor for a path node. `parentId` is the direct parent
|
|
3229
3392
|
* (or `null` for a top-level node); `index` is the position within that
|
|
3230
|
-
* parent's child order
|
|
3231
|
-
* reposition the result of a boolean op at the topmost source's slot.
|
|
3393
|
+
* parent's child order — never a global render index.
|
|
3232
3394
|
*/
|
|
3233
3395
|
/** @internal */
|
|
3234
3396
|
interface BooleanZOrder {
|
|
@@ -3237,15 +3399,23 @@ interface BooleanZOrder {
|
|
|
3237
3399
|
}
|
|
3238
3400
|
/** Adapter the hook and the pure core both consume. */
|
|
3239
3401
|
interface BooleansAdapter {
|
|
3240
|
-
getSelection(): NodeId[];
|
|
3402
|
+
getSelection(): readonly NodeId[] | readonly string[];
|
|
3241
3403
|
getWorldPath(id: NodeId): Path | undefined;
|
|
3404
|
+
/**
|
|
3405
|
+
* Optional: the text node behind `id`, for an id `getWorldPath` has no path
|
|
3406
|
+
* for. Its glyph outlines (`textToPath`) become the operand, so text can be
|
|
3407
|
+
* cut, united or intersected like any shape.
|
|
3408
|
+
*/
|
|
3409
|
+
getTextSource?(id: NodeId): TextNodeSource | undefined;
|
|
3242
3410
|
compareZ(a: NodeId, b: NodeId): number;
|
|
3243
3411
|
/**
|
|
3244
3412
|
* Mint a new node from a boolean-op result `Path`. `producedBy` names the
|
|
3245
3413
|
* op that synthesized it — adapters that store provenance (e.g. for a
|
|
3246
|
-
* layer-panel icon) record it; others ignore the arg.
|
|
3414
|
+
* layer-panel icon) record it; others ignore the arg. `sourceId` is the
|
|
3415
|
+
* topmost source, whose slot the result takes: give the node that source's
|
|
3416
|
+
* parent, or the kit's reorder cannot find it there.
|
|
3247
3417
|
*/
|
|
3248
|
-
createPathNode(path: Path, producedBy: BooleanOp): {
|
|
3418
|
+
createPathNode(path: Path, producedBy: BooleanOp, sourceId: NodeId): {
|
|
3249
3419
|
id: string;
|
|
3250
3420
|
};
|
|
3251
3421
|
/**
|
|
@@ -3260,12 +3430,22 @@ interface BooleansAdapter {
|
|
|
3260
3430
|
id: string;
|
|
3261
3431
|
} | undefined | null;
|
|
3262
3432
|
/**
|
|
3263
|
-
* Optional:
|
|
3264
|
-
*
|
|
3265
|
-
*
|
|
3266
|
-
*
|
|
3267
|
-
*
|
|
3268
|
-
|
|
3433
|
+
* Optional: the reorder contract. With `getChildren` (and `getParent`, or
|
|
3434
|
+
* every node reads as top-level) the kit reads each source's slot among its
|
|
3435
|
+
* siblings, and with `setChildOrder` as well it moves the result into the
|
|
3436
|
+
* topmost source's slot. Without them the result lands wherever
|
|
3437
|
+
* `insertNode` defaults to. `defaultCommitAdapter` supplies all three.
|
|
3438
|
+
*/
|
|
3439
|
+
getParent?(id: string): string | null;
|
|
3440
|
+
getChildren?(parentId: string | null): readonly string[];
|
|
3441
|
+
setChildOrder?(parentId: string | null, ids: string[]): void;
|
|
3442
|
+
/**
|
|
3443
|
+
* Optional override for the slot the kit otherwise reads through
|
|
3444
|
+
* `getParent` / `getChildren`: `id`'s parent and its index in that
|
|
3445
|
+
* parent's child order.
|
|
3446
|
+
*
|
|
3447
|
+
* @deprecated Supply `getParent` and `getChildren` instead, and the kit
|
|
3448
|
+
* derives this.
|
|
3269
3449
|
*/
|
|
3270
3450
|
getZOrder?(id: NodeId): BooleanZOrder | undefined;
|
|
3271
3451
|
applyOps?(ops: Op[], label?: string): void;
|
|
@@ -3282,6 +3462,13 @@ type BooleanOpResult = {
|
|
|
3282
3462
|
} | {
|
|
3283
3463
|
kind: 'noop';
|
|
3284
3464
|
reason: 'no-paths' | 'too-few-for-subtract' | 'empty-result';
|
|
3465
|
+
}
|
|
3466
|
+
/** A text operand had no outline geometry. Nothing was changed: an op that
|
|
3467
|
+
* quietly dropped the operand would commit a different shape than asked. */
|
|
3468
|
+
| {
|
|
3469
|
+
kind: 'failed';
|
|
3470
|
+
reason: 'text-outlines';
|
|
3471
|
+
error: TextOutlinesError;
|
|
3285
3472
|
};
|
|
3286
3473
|
/**
|
|
3287
3474
|
* Run one Boolean operation over the selected paths and commit the result as a
|
|
@@ -3402,6 +3589,14 @@ interface GeometryProjection {
|
|
|
3402
3589
|
interface ViewApi {
|
|
3403
3590
|
get(): View;
|
|
3404
3591
|
set(v: View): void;
|
|
3592
|
+
/** How this camera's world maps into the world the invocation edits in,
|
|
3593
|
+
* when that is a parallax plane — set by `inPlane` on the view it hands a
|
|
3594
|
+
* wrapped action. Absent or null: the camera's own world. */
|
|
3595
|
+
plane?(): PlaneMap | null;
|
|
3596
|
+
/** How the world the invocation edits in maps into the world `layer`'s
|
|
3597
|
+
* nodes are stored in, read now — set by `inPlane` alongside `plane`.
|
|
3598
|
+
* Absent or null: the same world. */
|
|
3599
|
+
planeOf?(layer: string): PlaneMap | null;
|
|
3405
3600
|
/** Optional recenter callback. When wired, `viewportZoomAction`'s `reset`
|
|
3406
3601
|
* branch (Cmd-0) calls this instead of resetting to identity — letting
|
|
3407
3602
|
* consumers re-fit the page (or other reference bounds) into the workspace.
|
|
@@ -3434,8 +3629,9 @@ interface ViewApi {
|
|
|
3434
3629
|
* pass over what the asking view does not paint. */
|
|
3435
3630
|
layerIsPainted?(layerId: string): boolean;
|
|
3436
3631
|
}
|
|
3437
|
-
/** The part of the asking view a region hit-test consults.
|
|
3438
|
-
|
|
3632
|
+
/** The part of the asking view a region hit-test consults. `get` is its
|
|
3633
|
+
* camera, which a parallax layer is picked through. */
|
|
3634
|
+
type HitTestView = RegionPickView;
|
|
3439
3635
|
/**
|
|
3440
3636
|
* Adapter dep for `areaSelectAction`.
|
|
3441
3637
|
*
|
|
@@ -3764,6 +3960,10 @@ interface InsertDep {
|
|
|
3764
3960
|
width: number;
|
|
3765
3961
|
height: number;
|
|
3766
3962
|
}, extras: InsertExtras): NodeId | null;
|
|
3963
|
+
/** The scene layer `commit` puts the node on. An insert on a layer carrying
|
|
3964
|
+
* `parallax` is dragged out in that plane's world, so `bounds` arrive
|
|
3965
|
+
* there too. Omitted: the camera's world. */
|
|
3966
|
+
layer?(): string;
|
|
3767
3967
|
}
|
|
3768
3968
|
/**
|
|
3769
3969
|
* Adapter dep for `resizeAction`.
|
|
@@ -3771,7 +3971,7 @@ interface InsertDep {
|
|
|
3771
3971
|
* Carries the behavior-shaping options the legacy `useResize` hook
|
|
3772
3972
|
* exposed through `UseResizeOptions`: bounds-frame behaviors (e.g.
|
|
3773
3973
|
* `lockAspectWithModifier`), world-space anchor-point snap behaviors (e.g.
|
|
3774
|
-
* `pointSnapToGrid`), and group-expansion (`expandIds`).
|
|
3974
|
+
* `@weasel-js/guides`' `pointSnapToGrid`), and group-expansion (`expandIds`).
|
|
3775
3975
|
*
|
|
3776
3976
|
* Optional in `DepSchema`: when absent, `resizeAction` falls back to
|
|
3777
3977
|
* identity defaults (no behaviors, identity expandIds). Consumers wire the
|
|
@@ -3803,6 +4003,8 @@ interface LayoutDep {
|
|
|
3803
4003
|
/** Which container wins when several contain the drop point. Default
|
|
3804
4004
|
* `'innermost'`. */
|
|
3805
4005
|
dropTarget?: LayoutDropTargetMode;
|
|
4006
|
+
/** Carries displaced siblings to their slots over time. Absent, they snap. */
|
|
4007
|
+
reflow?: ReflowTransition<unknown> | null;
|
|
3806
4008
|
}
|
|
3807
4009
|
/**
|
|
3808
4010
|
* Dep for `enterTextEditAction`.
|
|
@@ -3849,12 +4051,15 @@ interface ClipboardDep {
|
|
|
3849
4051
|
isEmpty(): boolean;
|
|
3850
4052
|
}
|
|
3851
4053
|
/**
|
|
3852
|
-
*
|
|
3853
|
-
*
|
|
3854
|
-
*
|
|
4054
|
+
* The commit behind the Slice action. `commit` receives the cut as a polyline
|
|
4055
|
+
* of at least two points (world coords): the drag's two ends for a straight
|
|
4056
|
+
* cut, its whole trail for a freehand one, the placed points for a
|
|
4057
|
+
* click-by-click one, whose last point equals its first when it closes into
|
|
4058
|
+
* a loop. `<SceneCanvas>` publishes one over its scene (`useSliceDepSource`);
|
|
4059
|
+
* a consumer replaces it with `useSliceDep`.
|
|
3855
4060
|
*/
|
|
3856
4061
|
interface SliceDep {
|
|
3857
|
-
commit(
|
|
4062
|
+
commit(cut: ReadonlyArray<Point2>): void;
|
|
3858
4063
|
}
|
|
3859
4064
|
/**
|
|
3860
4065
|
* The names an action may declare in `requires`, and what each resolves to.
|
|
@@ -3862,7 +4067,7 @@ interface SliceDep {
|
|
|
3862
4067
|
* This is the whole vocabulary of things an action can reach — selection,
|
|
3863
4068
|
* scene, view, history, and the rest. The interface itself is declared empty
|
|
3864
4069
|
* in `@weasel-js/routing`, which knows that an action names its dependencies
|
|
3865
|
-
* but not what any of them are; these
|
|
4070
|
+
* but not what any of them are; these entries are the kit's, merged in from
|
|
3866
4071
|
* outside exactly the way a consumer merges its own
|
|
3867
4072
|
* (`declare module '@weasel-js/core'`).
|
|
3868
4073
|
*/
|
|
@@ -3914,6 +4119,12 @@ declare module '@weasel-js/routing' {
|
|
|
3914
4119
|
* absent means no snapping (identity).
|
|
3915
4120
|
*/
|
|
3916
4121
|
snap?: SnapDep;
|
|
4122
|
+
/**
|
|
4123
|
+
* The canvas's debug sink — the one tools reach as `ToolCtx.debug`.
|
|
4124
|
+
* Sourced by `<SceneCanvas>`; absent while its `debug` overlay is off.
|
|
4125
|
+
* Actions report what they did here, and the overlay draws it.
|
|
4126
|
+
*/
|
|
4127
|
+
debug?: DebugSink;
|
|
3917
4128
|
/**
|
|
3918
4129
|
* Lasso-select dep — polygon hit-test + selection read/write.
|
|
3919
4130
|
*
|
|
@@ -3970,6 +4181,13 @@ declare module '@weasel-js/routing' {
|
|
|
3970
4181
|
* invoker reads `deps.booleansAdapter` to execute the op.
|
|
3971
4182
|
*/
|
|
3972
4183
|
booleansAdapter?: BooleansAdapter;
|
|
4184
|
+
/**
|
|
4185
|
+
* Create Outlines adapter — read selection ids, resolve text nodes, and
|
|
4186
|
+
* mint the path nodes that replace them. Consumers wire it with
|
|
4187
|
+
* `useCreateOutlinesAdapter(adapter)`; the `createOutlines` action reads it
|
|
4188
|
+
* in both its `enabled` predicate and its invoker.
|
|
4189
|
+
*/
|
|
4190
|
+
createOutlinesAdapter?: CreateOutlinesAdapter;
|
|
3973
4191
|
/**
|
|
3974
4192
|
* Gesture dispatcher control surface — exposes `cancelAll(reason)` so
|
|
3975
4193
|
* actions that need to abort an in-flight handle (Escape cancels a
|
|
@@ -3985,11 +4203,8 @@ declare module '@weasel-js/routing' {
|
|
|
3985
4203
|
*/
|
|
3986
4204
|
layout?: LayoutDep;
|
|
3987
4205
|
/**
|
|
3988
|
-
* Slice dep —
|
|
3989
|
-
*
|
|
3990
|
-
* Receives the finite slice segment in world coordinates; the consumer
|
|
3991
|
-
* scans the scene, splits crossed paths via `splitPathBySegment`, and
|
|
3992
|
-
* applies the result as one undoable batch.
|
|
4206
|
+
* Slice dep — the commit for the Slice action. `<SceneCanvas>` publishes
|
|
4207
|
+
* `useSliceDepSource`; a consumer overrides it with `useSliceDep`.
|
|
3993
4208
|
*
|
|
3994
4209
|
* Optional: when absent, `sliceAction` is a no-op.
|
|
3995
4210
|
*/
|
|
@@ -4052,6 +4267,12 @@ declare module '@weasel-js/routing' {
|
|
|
4052
4267
|
* by every surface under one `<PointerContextProvider>`.
|
|
4053
4268
|
*/
|
|
4054
4269
|
pointer?: PointerContextValue;
|
|
4270
|
+
/**
|
|
4271
|
+
* The touch or pen long-press being held, if any: where, since when, how
|
|
4272
|
+
* far through, and whether any binding would fire on it. Sourced by
|
|
4273
|
+
* `<SceneCanvas>` from its gesture dispatcher; press feedback reads it.
|
|
4274
|
+
*/
|
|
4275
|
+
longPress?: LongPressState;
|
|
4055
4276
|
}
|
|
4056
4277
|
}
|
|
4057
4278
|
|
|
@@ -4072,13 +4293,21 @@ declare module '@weasel-js/routing' {
|
|
|
4072
4293
|
overlay: RenderLayer<unknown>;
|
|
4073
4294
|
}
|
|
4074
4295
|
}
|
|
4296
|
+
/** Routing's `Contribution`, with overlays typed as `RenderLayer`. */
|
|
4075
4297
|
type Contribution = Contribution$1<Overlay>;
|
|
4298
|
+
/** Routing's `ContributionChrome`, with overlays typed as `RenderLayer`. */
|
|
4076
4299
|
type ContributionChrome = ContributionChrome$1<Overlay>;
|
|
4300
|
+
/** Routing's `Tool`, with overlays typed as `RenderLayer`. */
|
|
4077
4301
|
type Tool<TScratch = unknown> = Tool$1<TScratch, Overlay>;
|
|
4302
|
+
/** A `Tool` of any scratch type: the element type for a list of mixed tools. */
|
|
4078
4303
|
type AnyTool = AnyToolOf<Overlay>;
|
|
4304
|
+
/** Routing's `ToolDef` (what `defineTool` takes), with overlays typed as `RenderLayer`. */
|
|
4079
4305
|
type ToolDef<TScratch = void> = ToolDef$1<TScratch, Overlay>;
|
|
4306
|
+
/** Routing's `ToolsApi`, with overlays typed as `RenderLayer`. */
|
|
4080
4307
|
type ToolsApi = ToolsApi$1<Overlay>;
|
|
4308
|
+
/** Routing's `UseToolsOptions`, with overlays typed as `RenderLayer`. */
|
|
4081
4309
|
type UseToolsOptions = UseToolsOptions$1<Overlay>;
|
|
4310
|
+
/** Routing's `useTools`, typed for `RenderLayer` overlays. */
|
|
4082
4311
|
declare const useTools: (opts: UseToolsOptions) => ToolsApi;
|
|
4083
4312
|
|
|
4084
4313
|
/** Options for stroke tessellation. */
|
|
@@ -4140,4 +4369,4 @@ declare function vignette({ amount, feather }: {
|
|
|
4140
4369
|
feather?: number;
|
|
4141
4370
|
}): Effect[];
|
|
4142
4371
|
|
|
4143
|
-
export { type
|
|
4372
|
+
export { type SvgIngestOptions as $, type PoseComposition as A, type PoseAdapter as B, type CullRect as C, type DrawCommand as D, type Effect as E, type GestureLifecycleOptions as F, type GroupDrawCommand as G, type SliceDep as H, IDENTITY_COLOR_MATRIX as I, type ToolsApi as J, type Tool as K, type Contribution as L, type LayerHit as M, type Node as N, type ChromeState as O, type PathDrawCommand as P, type VertexColorChannel as Q, type RenderOptions as R, SPRITE_STRIDE as S, type TextDrawCommand as T, type LayerGroup as U, type ViewAnimationOptions as V, WeaselRenderer as W, type InsertExtras as X, type SerializedScene as Y, type GeometryProjection as Z, type ContentHandlerEntry as _, type ImageDrawCommand as a, type LayoutMove as a$, type AnyTool as a0, type PanBounds as a1, type Animator as a2, ColorOverrideRegistry as a3, type UseSceneOptions as a4, type SceneRegistry as a5, type RegisteredOp as a6, type PoseOverrides as a7, type DerivedDep as a8, type ViewportDims as a9, type ContainerNode as aA, type ContributionChrome as aB, type CreateOutlinesResult as aC, type CustomPaintContext as aD, type DecayLoopConfig as aE, type DecayOptions as aF, type DerivePathFn as aG, type EditAnchorsDep as aH, type EventBooking as aI, type EventBookingHandle as aJ, type EventTrack as aK, type FitViewToBoundsOptions as aL, type HitTestView as aM, IDENTITY_POSE_COMPOSITION as aN, type IngestCtx as aO, type IngestionDep as aP, type InsertDep as aQ, type Interpolate as aR, type InterpolatorFactory as aS, type Keyframe as aT, type LassoSelectDep as aU, type LayerCommandCache as aV, type LayerDrawFailure as aW, type LayerDrawSpan as aX, type LayerRecord as aY, type LayoutDep as aZ, type LayoutFrame as a_, type ViewApi as aa, type Affordance as ab, type AffordanceRegion as ac, type AffordanceBinding as ad, type CommonAffordanceScratch as ae, type DerivePoseFn as af, type BooleansAdapter as ag, type CreateOutlinesAdapter as ah, type UseAnimatorOptions as ai, type AnimationHandle as aj, type SampledTrack as ak, type SceneArrivalHandler as al, type AddLayerSpec as am, type AddNodeSpec as an, type AnimateToBoundsOptions as ao, type AnimationInfo as ap, type AnimationKind as aq, type AnimatorEvent as ar, type AnimatorListener as as, type AreaSelectDep as at, type BooleanOp as au, type BooleanOpResult as av, type ClipboardDep as aw, type ClipboardIngestCtx as ax, type ColorOverride as ay, type ColorOverrideFn as az, type ImageMinification as b, loadTextOutlines as b$, type LeafNode as b0, type LiveAnimation as b1, type LoopFactory as b2, type LoopOptions as b3, type NestedTimeline as b4, type NodeAtPointDep as b5, type OutlinePathSpec as b6, type Overlay as b7, type PathInWorldPose as b8, type PhysicsHandle as b9, type TextPaintPath as bA, type TextToPathOptions as bB, type TimelineClock as bC, type TimelineEvent as bD, type TimelineHandle as bE, type TimelineOptions as bF, type TimelineTrack as bG, type ToolDef as bH, type Track as bI, type TweenLoopOptions as bJ, type TweenOptions as bK, type UseToolsOptions as bL, type UserLayerRecord as bM, VIEW_ANIMATION_KEY as bN, type ViewAnimationApi as bO, type ViewChannel as bP, applyBooleanOp as bQ, applyCreateOutlines as bR, asNodeId as bS, composeWorldPose as bT, createPointerStore as bU, depsUnchanged as bV, drawLayers as bW, drawOneLayer as bX, fitViewToBounds as bY, isLayerPainted as bZ, isLayerVisible as b_, type PhysicsOptions as ba, PointerContextProvider as bb, type PointerContextValue as bc, type PointerWorldPos as bd, type PoseClosure as be, type PoseOverride as bf, type ResizePolicy as bg, type SerializedLayer as bh, type SerializedNode as bi, type SnapDep as bj, type SpringOptions as bk, type StaggerBuilder as bl, type StaggerDelay as bm, type StaggerFactory as bn, type StaggerOptions as bo, type StaggerPerItem as bp, type StaggerSpringPoseOptions as bq, type StaggerTweenOptions as br, type SvgUnpacker as bs, type SystemLayerRecord as bt, type SystemLayerSpec as bu, type TextEditDep as bv, type TextNodeSource as bw, type TextOutlineSource as bx, TextOutlinesError as by, type TextOutlinesFailure as bz, type RenderSpan as c, pathInPoseFrame as c0, pathInWorld as c1, rebaseLocalPose as c2, registerContentHandler as c3, resolveStrokeWidth as c4, subscribeToSources as c5, textToPath as c6, textToPathsByPaint as c7, useDecayLoop as c8, usePointerContext as c9, usePointerPosition as ca, useTools as cb, useViewAnimation as cc, useViewAnimationOn as cd, worldEditToStorage as ce, type RenderSpanStats as d, type RenderStats as e, type RenderTarget as f, type ShaderDrawCommand as g, type SolidPaint as h, type SpriteSheet as i, type SpritesDrawCommand as j, type StrokeOptions as k, type WeaselRendererOptions as l, blur as m, buildGradientRamp as n, cullDrawCommands as o, frameRect as p, vignette as q, registerEffect as r, type RenderLayer as s, tessellateStroke as t, type Dims as u, viewToMat3 as v, type RedrawSource as w, type Scene as x, type RectPose as y, type InertiaConfig as z };
|