@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,799 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.7.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 06ee1e6: Core's stylesheet is now published as `@weasel-js/core/style.css`. Through 1.7.1 it shipped in the tarball as `dist/index.css` with no export and no import, so an installed core drew its debug HUDs with class names and no rules behind them — unpositioned, unbackgrounded text. Import it once if you turn on `cursorCoordsHud`, `pickHud` or `modalityHud`. labkit's `styles.css` now includes it.
|
|
8
|
+
|
|
9
|
+
`cursorCoordsHud` lays its readings out as a label column and a value column, set in the numeric face, instead of padding a monospace line with spaces. World coordinates write negatives with U+2212. The face is built into core's stylesheet, so installing core still brings no theme dependency. The pick and modality HUDs list ids and stay monospace.
|
|
10
|
+
- 88e298e: Remove `PoseDescriptor.intersectsRect`. Nothing in the kit has read it since marquee and lasso began testing a node's drawn outline, so the built-in descriptors (`RECT_POSE_DESCRIPTOR`, `ROTATED_POSE_DESCRIPTOR`, `pathPoseDescriptor`, the auto descriptor, and kernel3d's) no longer implement it. This is a breaking removal of a public field for anyone implementing a custom `PoseDescriptor`: an object literal typed as `PoseDescriptor` that still declares `intersectsRect` now fails the excess-property check. Delete the method; nothing called it.
|
|
11
|
+
- 0756a82: A child dragged out of its layout container and released where no container
|
|
12
|
+
takes it now leaves that container, landing under the plain container beneath
|
|
13
|
+
the drop or at the top level, at the position it was dropped. It used to stay
|
|
14
|
+
the container's child and draw clipped to it, out of sight. A container whose
|
|
15
|
+
`releaseDrop` returns ops still decides the release, and a drop back inside the
|
|
16
|
+
container keeps the child where it is.
|
|
17
|
+
- b18ef4a: Editing a selection that spans parallax planes lands every node where it was drawn. Move, resize, rotate and clone used to measure the whole selection in one plane — the handle's target's, else the first selected node's — so a node on a plane that scales differently drifted off the pointer. Each node is now carried into that plane as the gesture starts and back into its own as it lands. A move that reparents a node onto another plane's layer, or drops it into a layout container there, carries its pose across, so it lands where it was drawn.
|
|
18
|
+
|
|
19
|
+
`ViewApi` gains an optional `planeOf(layer)`, which `inPlane` sets: how the world an invocation edits in maps into the world a layer's nodes are stored in. `inPlane` now wraps an action whenever the scene has any parallax layer, not only when the edited layer has one.
|
|
20
|
+
- @weasel-js/cursor@1.7.2
|
|
21
|
+
- @weasel-js/font@1.7.2
|
|
22
|
+
- @weasel-js/geom@1.7.2
|
|
23
|
+
- @weasel-js/gestures@1.7.2
|
|
24
|
+
- @weasel-js/history@1.7.2
|
|
25
|
+
- @weasel-js/modes@1.7.2
|
|
26
|
+
- @weasel-js/paint@1.7.2
|
|
27
|
+
- @weasel-js/quantity@1.7.2
|
|
28
|
+
- @weasel-js/react@1.7.2
|
|
29
|
+
- @weasel-js/registry@1.7.2
|
|
30
|
+
- @weasel-js/routing@1.7.2
|
|
31
|
+
- @weasel-js/text@1.7.2
|
|
32
|
+
|
|
33
|
+
## 1.7.1
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- 6f59206: The `align.*` actions take a `to` param and `flip` takes new `pivot` values,
|
|
38
|
+
naming what the selection lines up against: `'union'` (the selection itself —
|
|
39
|
+
align's default), `'pointer'` (the click's world point, else the `pointer`
|
|
40
|
+
dep's latest position), a world point or rect `{ x, y, width?, height? }`, or a
|
|
41
|
+
key node `{ node: id }`. Bind `{ to: 'pointer' }` to a key and the selection
|
|
42
|
+
aligns to wherever the cursor is. `useAlign`'s `align(edge, to?)` takes the same
|
|
43
|
+
reference. New exports: `AlignReference`, `alignTargetBounds`,
|
|
44
|
+
`SpatialReference`, `SpatialReferenceSources`, `resolveSpatialReference`,
|
|
45
|
+
`FlipAxis`, `FlipPivot`.
|
|
46
|
+
|
|
47
|
+
The align actions are now enabled with one item selected, since any reference
|
|
48
|
+
but `'union'` can align a single item; with `'union'` and one item they do
|
|
49
|
+
nothing, as before.
|
|
50
|
+
- 716ea36: `alignResizeBehavior` now snaps a rotated node by where its corners are drawn.
|
|
51
|
+
Before, it matched the node's unrotated box, so on a rotated node it snapped to
|
|
52
|
+
lines nothing visible was near and missed the ones the handle was on. A corner
|
|
53
|
+
handle now snaps the dragged corner to guides on both world axes; an edge
|
|
54
|
+
handle slides its edge along the node until one of its two corners meets a
|
|
55
|
+
guide. Unrotated nodes snap exactly as before.
|
|
56
|
+
|
|
57
|
+
It takes an optional `poseDescriptor` (its options are now `AlignMoveArgs`),
|
|
58
|
+
used to read the node's box and rotation; pass the same one the resize action
|
|
59
|
+
uses when your poses are not rect-shaped.
|
|
60
|
+
- 2d7003a: Layout reflow can animate. `useAnimatedReflow(scene, animator, { ms, easing } | { spring })` returns a `ReflowTransition`; pass it to `<SceneCanvas reflowTransition>` (or set `LayoutDep.reflow`) and the siblings a drag's layout reflow displaces glide to their slots through the animator instead of snapping. Each node's glide runs under the cancel-key `reflow:<id>`, so a new target mid-glide interrupts the old one and continues from the pose on screen; when a sibling stops reflowing, or the drag commits or cancels, it glides onto its document pose and its override is dropped. Glides are published through the scene's pose overrides, so the document and undo history are untouched. `null` turns it off. `createReflowTransition` is the non-hook form. Additive.
|
|
61
|
+
- e17fe2c: Add animator observability. `animator.watch(listener)` delivers a lifecycle event for every animation the animator runs — `start`, `end`, `cancel`, and `interrupt` when a new animation claims a `cancelKey` — plus a timeline's `lap`s and its event-track crossings at any nesting depth, each carrying the animation's id, kind, cancel-key and label. `animator.live()` returns a snapshot of what is running, with each animation's pause state, time scale, elapsed virtual time and, for tweens and timelines, progress. Every animation option set, timelines included, takes an optional `label`. With no listener attached nothing is built or delivered. Additive.
|
|
62
|
+
- f457e7c: `arrayAdapter`'s marquee and lasso now take a node by its outline, as `sceneToAdapter`'s do, instead of by its bounding box. A marquee over the empty corner of a triangle, or past the tip of a rotated rect, no longer selects it, and `enclosed` lasso mode takes a shape the lasso fits around even when its box pokes out. A polygon pose is its own outline; any other pose is its rect, rotated by `rotation`. The new `silhouette` option supplies what the painters draw — pass `findShapeSilhouette` when the items are scene nodes. The descriptor's `intersectsRect` is no longer consulted.
|
|
63
|
+
|
|
64
|
+
`@weasel-js/geom` now holds path hit-testing: `pointInPath`, `strokeHitTest`, `pathContainsPoint`, `pathContainsRect`, `pathIntersectsRect`, `pathContainsPolygon`, `pathIntersectsPolygon`, `polygonContainsPath` and `polygonIntersectsPath`. Core's exports of the same names are unchanged.
|
|
65
|
+
- 8635031: Every text tier now places its baseline from the ascent and descent a browser
|
|
66
|
+
sets the face with, and centers the face in its line the way CSS does: half
|
|
67
|
+
the leading above the ascent. A face taller than its line box, such as Papyrus
|
|
68
|
+
at `lineHeight: 1.2`, gets negative leading and overflows the box, which keeps
|
|
69
|
+
its height. Before, a line hung its baseline one ascent below the line top
|
|
70
|
+
with no leading, so glyphs sat half the leading away from where CSS puts
|
|
71
|
+
them: high in a roomy line, low in a tight one, where a tall face overflowed
|
|
72
|
+
only at the bottom.
|
|
73
|
+
|
|
74
|
+
The ascent rule is `verticalMetricsFromTables` (new, additive, in
|
|
75
|
+
`@weasel-js/font`): `OS/2` typo metrics when the font sets
|
|
76
|
+
`USE_TYPO_METRICS`, otherwise `hhea`. Firefox and every Linux engine follow it;
|
|
77
|
+
Chromium and WebKit on macOS read `hhea` regardless, and the edit overlay's
|
|
78
|
+
measured correction covers the difference there. `gen-font` bakes the result
|
|
79
|
+
into the atlas's `faceMetrics` block as `ascent` / `descent`, the outline
|
|
80
|
+
parser reads the same values (and reports them as `OutlineFace.ascender`), and
|
|
81
|
+
the canvas tier records the browser's own, measured at a 1000px em rather than
|
|
82
|
+
at the 48px bake size. An atlas or custom parser that states no ascent and
|
|
83
|
+
descent keeps the previous placement.
|
|
84
|
+
|
|
85
|
+
Rendering changes: text in the bundled Inter at `lineHeight: 1.2` moves up by
|
|
86
|
+
0.005 em. Canvas-tier faces move down by half their leading: Georgia by 1.3px
|
|
87
|
+
and Arial by 1.7px at 40px. The committed Inter atlases are rebaked; the PNG is
|
|
88
|
+
byte-identical.
|
|
89
|
+
- 276bad1: Types that public exports already referenced can now be imported by name from `@weasel-js/core`: `Overlay`, `SHAPE_KINDS`, `ShapeKindDescriptor`, `ShapeKindsWhere`, `KitInsertShape`, `ShaderProgram`, `ToolPrefBase`, `BaseFeature`, `MeshBox`, `PenContinuation`, `SerializedLayer`, `SelectionStore`, `Polyline`, `Scale2`, `WeaselProviderProps`, `HitTestView`, `StyleToggle`, `DEFAULT_INK`, `CURSOR_ANGLE_STEPS`, `CURSOR_MAX_CSS_PX`, and the dispatch-record types `Dispatcher.explain` returns (`DispatchRecord` and its parts, also still on `@weasel-js/core/routing`). A node's `derivePath` / `derivePose` now have named types, `DerivePathFn` and `DerivePoseFn`, which `unionOfChildrenVia` returns.
|
|
90
|
+
|
|
91
|
+
Breaking for test code: `_resetPaintKindsForTests` and `_resetMarkersForTests` moved off core's barrel to a new `@weasel-js/core/test-seams` entry, and `@weasel-js/routing` no longer exports its internal dispatcher helpers `publishLiveDispatch`, `filterEligible` and `preferContextual`.
|
|
92
|
+
- efc5727: Action behaviors get an `onCancel` hook. When a move, resize, rotate, insert or lasso gesture is canceled (Esc, pointercancel), every behavior's `onCancel` runs in place of `onEnd`, which still runs only on commit. `alignMoveBehavior`, `alignInsertBehavior` and `alignResizeBehavior` clear their published guides there, so Esc mid-drag no longer leaves the last matched alignment line on screen, and `snapToContainer` drops its pending dwell timer.
|
|
93
|
+
- 108551d: On a committed move, resize, rotate, insert or lasso gesture, every behavior's `onEnd` now runs, in order; the first one to answer still decides the commit and later answers are ignored. Previously the behaviors after the one that answered never ran, so `[snapBackOrDelete(…), alignMoveBehavior(…)]` left its alignment guides on screen after a snap-back release.
|
|
94
|
+
|
|
95
|
+
`onEnd` takes a second argument, `BehaviorEnd`, whose `answered` flag says an earlier behavior already decided. A behavior that acts on the scene itself from `onEnd` should only clean up when it is set: `momentum` now does, so `[snapBackOrDelete(…), momentum(…)]` no longer flings a node that snapped back. Code calling a behavior's `onEnd` directly must pass the second argument.
|
|
96
|
+
- a5bc201: A boolean op's result takes its topmost source's slot among that source's siblings, read through the reorder contract. `BooleansAdapter` gains optional `getParent`, `getChildren` and `setChildOrder` — `defaultCommitAdapter(scene)` supplies all three — and the kit derives each source's sibling index from them, the same read Create Outlines uses. `createPathNode` now receives a third argument, the topmost source's id: give the new node that source's parent. `getZOrder` still works as an override but is deprecated; an implementation returning a render-order index (as WeaselDraw's did) put results in the wrong slot inside a container. `getSelection` may return `string[]`. Additive.
|
|
97
|
+
- 4e18c9f: `<Canvas paintInto>` now follows its target: when `paintInto.canvas` moves to another element, the next frame paints there and the old element's renderer, with every GL program, buffer and texture it made, is freed. Before, every later frame went to the first element it painted and that renderer lived until unmount; a change of `paintInto.x`/`y` alone also did not repaint. `<Canvas>` now holds its renderer through the same lease as `<SceneViewCanvas>`, `<MinimapCanvas>` and `<DrawCanvas>`, so every surface in core has one renderer setup and teardown. No public API changed.
|
|
98
|
+
- 112c781: `<SceneCanvas>` no longer takes `selectionMode`, and `CanvasSelectionMode` is gone. Its `'multi'` only reached the selection the canvas built for itself, so a canvas handed `useSelection()` still replaced on shift-click. Click policy now has one home, the selection: `useSelection({ mode: 'multi' })`, or `selectionOptions={{ mode: 'multi' }}` for the canvas's own. `selectionMode="none"` is now `selectable={false}`, with the same meaning. Breaking: drop `selectionMode="single"`, move `"multi"` to the selection, and rename `"none"`.
|
|
99
|
+
- ac2e76e: A labkit annotation capture of a text mark no longer comes out without its
|
|
100
|
+
glyphs when the default font was registered `{ lazy: true }` and nothing had
|
|
101
|
+
drawn text yet: the raster route now waits for fonts and paint kinds to load
|
|
102
|
+
before it renders.
|
|
103
|
+
|
|
104
|
+
Additive: core exports `warmRender(opts?)`, which runs `warmFonts` and
|
|
105
|
+
`warmPaintKinds` together — the one call to await before a synchronous
|
|
106
|
+
`renderSceneToPixels`, `RasterSession.render` or `renderDebugSnapshot`.
|
|
107
|
+
`opts.families` and `opts.paintKinds` narrow each half.
|
|
108
|
+
- 9c164e2: A promised `produceFlavors` flavor that rejects now costs only itself. Chromium writes nothing when any flavor in a `ClipboardItem` rejects, and `useClipboardOps` then fell back to the well-known types alone, so a failed SVG export also lost the `application/x-weasel-clipboard+json` flavor, and a rejected `text/plain` lost everything. The copy now retries without the rejected flavors before falling back. Behavior fix, not breaking: a copy whose flavors all resolve writes exactly what it did before.
|
|
109
|
+
- 85d62a7: A `SurfaceContribution` can run on the surface's frame loop and say which kit versions it was written against. `beforePaint(ctx)` runs on every frame before it paints and `afterPaint(ctx)` once its pixels land, each handed the frame's `time`, the surface `view`, `requestFrame()` and the surface's `deps`. Hooks run in the order the surface lists its entries, and one that throws is reported once and skipped without stopping the frame; a surface whose entries declare no hooks subscribes to nothing. `requires: { core: '^1.7' }` is checked on install: a mismatch warns in development, and `<SceneCanvas versionCheck="strict">` throws instead (`"off"` skips it). The matcher is exported as `satisfiesRange` and `checkRequirements`, with `KIT_VERSIONS`. The default long-press feedback now animates from `afterPaint`.
|
|
110
|
+
|
|
111
|
+
`CanvasExtensionApi` gains `subscribeBeforePaint(fn)`, and `subscribeFrame` subscribers now receive the frame time. Additive for callers; breaking for code that implements `CanvasExtensionApi` by hand, which must add `subscribeBeforePaint`.
|
|
112
|
+
- dfd926f: `@weasel-js/core` now tree-shakes for consumers. Its `dist` is now one file
|
|
113
|
+
per source module instead of shared chunks, so importing one symbol ships that
|
|
114
|
+
symbol's modules rather than the whole kit: `import { asNodeId }` goes from
|
|
115
|
+
about 620 kB minified to under 100 bytes with vite's production bundler.
|
|
116
|
+
- 3d80c9f: Text can become path geometry. `textToPath(data, pose)` returns a text node's
|
|
117
|
+
glyph outlines and decoration rules in world space, as one `'nonzero'`
|
|
118
|
+
compound path whose filled region is their union. Glyphs keep the font's
|
|
119
|
+
curves, and each glyph is re-wound so faces that disagree on winding still
|
|
120
|
+
fill their overlaps. It works at any size, not only above the outline-tier
|
|
121
|
+
threshold, and applies synthetic italic the way the renderer does. When some
|
|
122
|
+
run has no outline geometry it throws a `TextOutlinesError` whose `reason` is
|
|
123
|
+
`'no-outlines'`, `'outlines-loading'`, `'outlines-failed'` or
|
|
124
|
+
`'synthetic-bold'`. Faux bold is refused rather than drawn at the regular
|
|
125
|
+
weight, because a path has no distance field to thicken.
|
|
126
|
+
`loadTextOutlines(data)` waits for the faces a text is set in.
|
|
127
|
+
|
|
128
|
+
The new `createOutlines` action (Shift+Mod+O, group `'text'`, under the
|
|
129
|
+
`paths` feature) replaces each selected text node with a path node in one
|
|
130
|
+
undoable batch. Each path takes its text node's slot in the stacking order.
|
|
131
|
+
Consumers publish a `CreateOutlinesAdapter` with `useCreateOutlinesAdapter`;
|
|
132
|
+
its `createPathNode(path, sourceId)` carries the text's fill and stroke. The
|
|
133
|
+
pure core is `applyCreateOutlines`, and the icon is `CreateOutlinesIcon`.
|
|
134
|
+
|
|
135
|
+
Boolean ops take text operands: `BooleansAdapter` gains an optional
|
|
136
|
+
`getTextSource(id)`, consulted when `getWorldPath` has no path. This change is
|
|
137
|
+
additive, with one exception: `BooleanOpResult` has a new
|
|
138
|
+
`{ kind: 'failed', reason: 'text-outlines' }` variant, and a text operand
|
|
139
|
+
without outlines now leaves the scene untouched. Code that switches
|
|
140
|
+
exhaustively over `BooleanOpResult` needs a case for it.
|
|
141
|
+
|
|
142
|
+
Also new: `loadFontOutlines(family, variant?)` in `@weasel-js/font` (also
|
|
143
|
+
re-exported from core) resolves once a registered face has loaded or failed.
|
|
144
|
+
`@weasel-js/geom` adds `pathSignedArea` and `reversePath`.
|
|
145
|
+
- a1ecaac: The scene slot's `cull` option now skips painting nodes the view cannot see, rather than painting every node and dropping the off-screen commands afterward. It decides from the new scene-slot `paintBounds(node, pose, view)`, which `<SceneCanvas>` fills in with the new `defaultPaintBounds` whenever `drawOne` is `defaultDrawOne`. With any other `drawOne`, pass a `paintBounds` that encloses everything it paints — stroke spikes and markers included — or culling still only trims commands after painting. Nodes with no cheap bound are always painted: text, derived-path nodes, nodes with a `data.label` overlay, and any painter that does not declare one. `postProcess` now sees an empty group where a culled node would have painted.
|
|
146
|
+
|
|
147
|
+
A painter registered with `registerNodeShape` can declare `bounds(node, pose, ctx)`, the box its paint fits in before pose rotation; `findShapeBounds` reads it. The built-in shape, path, image and rect-fallback painters declare one.
|
|
148
|
+
|
|
149
|
+
`<SceneViewCanvas>` and `renderSceneToCanvas` take `cull` and `paintBounds` to do the same for a detached view, and `buildSceneViewCommands` takes a trailing `SceneViewCull`. `<MinimapCanvas>` shows the whole scene and does not cull.
|
|
150
|
+
- 886fefd: `<SceneCanvas debug>` now reaches the overlay. It had been swallowed, so only the `?debug=` URL flag ever turned the overlay on through `SceneCanvas`; the prop takes `<Canvas debug>`'s `DebugConfig` plus SceneCanvas's own `slops`. `<Canvas>` also keys its debug sink on the config's content, so an inline `debug={{ … }}` no longer throws away what the sink recorded on every render.
|
|
151
|
+
|
|
152
|
+
New `viewport` debug feature: the last pan or zoom, drawn as the viewport it started from (outlined in the current view), the world point it held fixed, and a readout of the pan delta or zoom factor. `DebugSink` gains `recordViewport(kind, from, to, anchor?)`; a hand-written sink must add it. Actions reach the sink through a new `debug` dep that `<SceneCanvas>` provides, and `viewport.dragPan`, `viewport.wheelPan`, `viewport.zoom` and `viewport.pinchZoom` record into it. `SceneCanvasApi` / `CanvasExtensionApi` gain `getDebug()`, which returns the sink, or null while `debug` is off.
|
|
153
|
+
|
|
154
|
+
The `fps` panel now shows the frame interval and, per paint, CPU time and GL draw calls in total and per render layer, in decimal-aligned columns. The numbers come from new renderer seams: `WeaselRenderer.render(commands, viewMatrix, { spans })` and `lastFrameStats()`, and a `spans` out-parameter on `drawLayers`. `?debug=` now parses `ids`, `fps` and `viewport`, and `?debug=all` turns them on.
|
|
155
|
+
|
|
156
|
+
`renderDebugSnapshot({ scene, view, size, pixelRatio, debug, config, … })` rasterizes the scene and the debug overlay into one image, the way the canvas showed them, for a bug report; `rasterToPng(image)` encodes any `RasterImage` as a PNG `Blob`. It is built on `renderSceneToPixels`, which gains an `overlay` option: commands drawn over the scene in output-pixel space. `buildDebugOverlayCommands` exposes the overlay's commands for a snapshot.
|
|
157
|
+
- 04b0b96: `<DrawCanvas>`, additive: a sized, DPR-correct WebGL2 canvas that paints a `DrawCommand` list with no scene, tools or dispatcher behind it.
|
|
158
|
+
|
|
159
|
+
`draw` takes a command array, which repaints on the next frame when it changes, or a function called on every paint with the surface's CSS size. `view` sets a camera over the commands (identity by default), `background` fills the surface beneath them, `redrawOn` repaints on external sources as it does on `<SceneCanvas>`, and `dpr`, `className` and `canvasRef` behave as they do on `<SceneViewCanvas>`. It paints through the same per-canvas renderer as `<SceneViewCanvas>`, runs its frames behind the visibility gate, and frees its GL objects on unmount.
|
|
160
|
+
|
|
161
|
+
`<SceneViewCanvas>` and `<MinimapCanvas>` now repaint when an image finishes decoding, a deferred glyph bake or font load lands, or a paint kind registers late, as `<SceneCanvas>` already did. Before, text or images that were not ready on a detached view's first frame stayed blank until something else repainted it.
|
|
162
|
+
- 27bcf57: Every op factory's argument type can now be imported by name from `@weasel-js/core`: `InsertArgs`, `DeleteArgs`, `TransformArgs`, `ReparentArgs`, `SetDataArgs`, `SetLayerArgs`, `SetPathArgs`, `SetTextArgs`, `SetSelectionArgs`, `ReorderArgs` and `MoveToIndexArgs`, with the shapes they reference, `SiblingSlot`, `PlacedNode` and `ReorderRestoreEntry`. Core also exports `KeyBinding` (the parameter of `matchesKeyBinding`), `rangeWeight` and `unboldPatch`. `@weasel-js/diagram` exports `ForceBody`, the element type of `ForceRelaxation.bodies`.
|
|
163
|
+
|
|
164
|
+
The default align, distribute, boolean and edit icons are now marked `@experimental` on each component; the tag had sat on a file header where it marked nothing.
|
|
165
|
+
|
|
166
|
+
Breaking: `DispatcherViewTarget` and `ViewIdResolver` are off `@weasel-js/routing/react`. They moved to `@weasel-js/routing/internal`, which is not public API. `rectsEqual` is off `@weasel-js/labkit/surface`.
|
|
167
|
+
- a7f2103: Underline, strikethrough and super/subscript now follow the font's own metrics
|
|
168
|
+
instead of fixed constants. `gen-font` bakes `post.underlinePosition` /
|
|
169
|
+
`underlineThickness`, `OS/2.yStrikeoutPosition` / `yStrikeoutSize` and the
|
|
170
|
+
`OS/2` super/subscript size and offset into a new optional `faceMetrics` block
|
|
171
|
+
in the atlas JSON, and the outline parser reads the same values onto
|
|
172
|
+
`OutlineFace.faceMetrics`, through one shared function, so an atlas and a TTF
|
|
173
|
+
of one font place rules and scripts identically. The overline keeps its
|
|
174
|
+
default offset and takes the underline's weight. A face with no metrics
|
|
175
|
+
(older atlases, the canvas tier, custom parsers) keeps the previous constants.
|
|
176
|
+
|
|
177
|
+
This changes rendering for the bundled Inter: its underline sits lower
|
|
178
|
+
(0.170 em, was 0.10) and heavier (0.068 em, was 0.05), and `script: 'sub'`
|
|
179
|
+
drops by 0.075 em instead of 0.333 em, with scripts at 60.0% size. The
|
|
180
|
+
committed atlases are rebaked; the PNG is byte-identical.
|
|
181
|
+
|
|
182
|
+
Additive API: `faceMetricsFromTables`, `faceMetricsOf`, `faceMetricsFor` and
|
|
183
|
+
the `FaceMetrics` types in `@weasel-js/font`; `scriptMetrics`,
|
|
184
|
+
`scriptMetricsFor`, `decorationMetrics` and `DEFAULT_DECORATION_METRICS` in
|
|
185
|
+
`@weasel-js/text` (re-exported from core); an optional `faceOf` argument to
|
|
186
|
+
`layoutMarkdown` and an optional `face` on `PositionedRun`. `SCRIPT_METRICS`
|
|
187
|
+
remains, now documented as the fallback rather than what every run gets.
|
|
188
|
+
|
|
189
|
+
Fix: `resolveFontVariant` called from inside the glyph-ready notification of
|
|
190
|
+
an atlas that just landed returned a pending miss, because the load was still
|
|
191
|
+
marked in flight. A subscriber that re-resolves synchronously, as
|
|
192
|
+
`useSyncExternalStore` does, now sees the face.
|
|
193
|
+
- b2fd89a: geom adds `boxContainsBox(outer, inner)`, the edge-inclusive test for one box
|
|
194
|
+
wholly holding another. Core's region hit test, labkit's `fracEncloses`,
|
|
195
|
+
`fracContains` and drop-over-canvas check, and labkit's internal point bounds now
|
|
196
|
+
go through geom's box functions instead of their own copies. labkit's `WorldRect`
|
|
197
|
+
is now an alias of geom's `Rect`, which has the same shape. Badge's
|
|
198
|
+
`ChamferedRect` base uses the shared `polygonSampler` rather than a copy of it.
|
|
199
|
+
- 4212d2d: The path data model, the pure math over it, and the easing curves moved from `@weasel-js/core` into `@weasel-js/geom`. Core re-exports every name it exported before, so code importing from `@weasel-js/core` or `@weasel-js/core/math` needs no change.
|
|
200
|
+
|
|
201
|
+
`@weasel-js/geom` now exports `Path`, `PolygonPath`, `RectPath` and `PathFillRule`; the builders (`PathBuilder`, `rectPath`, `ellipsePath`, `polygonFromPoints` and the rest); `pathFromD`, `boundsOfPath`, `unionBoundsPath`, `translatePath`, `scalePathToBounds`, `transformPath`, `composePath`, `decomposePath`, `splitSubpaths`, `pointAlongPath`, `pathDistanceToPoint`, `splitCubicAtT`, `fitCubicThroughDeletion`, `cubicPointAt`, `schneiderFit` and the `Point` type; and every easing curve with `EASINGS`, `SPRING_PRESETS`, `cubicBezierEasing` and `resolveEasing`. Three subpaths are new or grow: `@weasel-js/geom/curves` (Bezier, NURBS and Spiro representations, `CURVE_REPS`), `@weasel-js/geom/tessellate` (`tessellate`, `extractPolylines`, `trimPolyline`, the `Mesh` type), and `@weasel-js/geom/booleans`, which adds `splitPathBySegment`, `splitPathByPolyline` and `snipPathByPolyline`. `earcut` is a new optional peer of geom, needed only by `./tessellate`.
|
|
202
|
+
|
|
203
|
+
Breaking for direct `@weasel-js/geom` users: `GeomPath` and `GeomPolygonPath` are gone, replaced by `Path` and `PolygonPath`. Hit-testing and booleans now take the typed-array `Path` — `commands` a `Uint8Array`, `coords` a `Float32Array`, `fillRule` required — rather than any array-like.
|
|
204
|
+
- 12263bc: Guide and alignment snapping reads its tolerance in screen pixels at every zoom,
|
|
205
|
+
through the camera of the view the drag landed in — a `<CanvasView>`'s own when the
|
|
206
|
+
drag started in one. `GestureContext` now carries that camera as `view` (`null` where
|
|
207
|
+
no view dep answers), refreshed each frame for move, resize, rotate and lasso-select
|
|
208
|
+
behaviors.
|
|
209
|
+
|
|
210
|
+
Breaking: the `getView` option is gone from `alignMoveBehavior`,
|
|
211
|
+
`alignInsertBehavior`, `alignResizeBehavior`, the move, resize and insert
|
|
212
|
+
`snapToGuides`, and `guideSnapStrategy`. Drop it; `tolerance` is always screen
|
|
213
|
+
pixels. Code that builds a `GestureContext` by hand must now supply `view`.
|
|
214
|
+
- b5cc59f: Small atlas text no longer loses stems narrower than a pixel. The shader used
|
|
215
|
+
to size its antialiasing band from the derivative of the distance field. That
|
|
216
|
+
derivative reads flat when a 2x2 pixel quad straddles a thin stem, so the band
|
|
217
|
+
collapsed and the stem disappeared. A 12px superscript `H` in Inter rendered at
|
|
218
|
+
DPR 1 without its left stem. The band now comes from the screen derivatives of
|
|
219
|
+
the texture coordinate, scaled by each atlas's page size and field range.
|
|
220
|
+
|
|
221
|
+
Additive: `glyphFieldScale(source, family, weight, style)` is exported from
|
|
222
|
+
`@weasel-js/font`, and `BmFont` gains an optional `distanceRange` read from
|
|
223
|
+
msdf-bmfont-xml's `distanceField.distanceRange`. `GLYPH_COVERAGE_GLSL`'s
|
|
224
|
+
`glyphCoverage` now takes two more arguments, `uv` and `fieldPerUv`. That breaks
|
|
225
|
+
any custom program that pastes the snippet in and calls it.
|
|
226
|
+
- e2f1968: New package `@weasel-js/guides`: placement aids, built on top of core. It holds what used to be core's grid, guide and layout-strategy code:
|
|
227
|
+
|
|
228
|
+
- the grid: `createGridLayer`, `createCellHighlightLayer`, `useGridCellHover`, `roundToCell`, `gridSnapStrategy`, `pointToGridCell`;
|
|
229
|
+
- guides and alignment: `useGuides`, `createGuidesLayer`, `guideSnapStrategy`, `DEFAULT_GUIDE_TOLERANCE_PX`, `deriveAlignmentGuides`, `matchAlignment`, `MOVE_ANCHORS`, `alignMoveBehavior`, `alignResizeBehavior`, `alignInsertBehavior`, and the `Guide` type;
|
|
230
|
+
- snap behaviors: `snapToGrid` and `snapToGuides` from `@weasel-js/guides/move`, `/resize` and `/insert`, and `pointSnapToGrid` from the root or `/resize`;
|
|
231
|
+
- layout strategies: `freeform`, `tileGrid`, `snapPoint`, and the drop-target pickers `none`, `nearest`, `nearestWithin`, `containedThenNearest` and `cellAt`.
|
|
232
|
+
|
|
233
|
+
Breaking for `@weasel-js/core`. Core no longer exports any of those names, and does not re-export them, so import them from `@weasel-js/guides` instead. The `@weasel-js/core/insert` subpath is gone, since everything it held moved. `@weasel-js/core/move` keeps `snapToContainer` and `snapBackOrDelete`, and `@weasel-js/core/resize` keeps `clampMinSize` and `lockAspectWithModifier`.
|
|
234
|
+
|
|
235
|
+
The canvas's `grid` layer slot now takes a pre-built layer, like `cellHighlight` and any custom slot, instead of grid options. `GridSlotConfig` and the `grid.highlight` sub-option are gone. Write `layers={{ grid: { layer: createGridLayer({ spacing: 20, bounds }) } }}`, and pass a cell highlight as `cellHighlight: { layer: createCellHighlightLayer(...) }`.
|
|
236
|
+
|
|
237
|
+
Core keeps the seams the package plugs into: the `SnapStrategy`, `MoveBehavior`, `BoundsConstraint`, `InsertBehavior` and `PointSnap*` types, `snap()`, `OriginProjection` with `RECT_ORIGIN_PROJECTION`, the `snap` dep, `selectTool.snap`, `toolOptions.snapPoint`, and the `LayoutStrategy` contract. It now also exports `AUTO_ORIGIN_PROJECTION`, the default projection for rects and paths, and three helpers for writing a snap behavior: `screenTolerance`, which converts a screen-pixel tolerance to world units through the gesture's camera; `gestureViewReader`, which reads that camera; and `gesturePlaneReader`, which reads the parallax plane being edited.
|
|
238
|
+
- 1524403: Text now ends a line at every UAX #14 hard break, not only at `\n`: CR, CRLF
|
|
239
|
+
(one break, not two), VT, FF, NEL, U+2028 LINE SEPARATOR and U+2029 PARAGRAPH
|
|
240
|
+
SEPARATOR. This applies to `layoutRuns`, `layoutMarkdown` and the edit overlay,
|
|
241
|
+
wrapped or not. None of them lays out a cell, and a caret offset on either side
|
|
242
|
+
of a CRLF stays exact. As with `\n`, and as with a forced break in CSS, the
|
|
243
|
+
line a hard break ends is never spread by `justify`; U+2028 and U+2029 behave
|
|
244
|
+
the same way here. This is a behavior change: text holding those characters
|
|
245
|
+
lays out on more lines than before.
|
|
246
|
+
|
|
247
|
+
The edit overlay writes each hard break the browser would not break at as a
|
|
248
|
+
`<span data-break>` holding a newline, and reads the original character back
|
|
249
|
+
on commit, so an edit no longer turns U+2028 into a space or a lone CR into a
|
|
250
|
+
newline. A node without runs is now seeded with text nodes instead of through
|
|
251
|
+
`innerText`, which also puts the caret at the right offset on any line after
|
|
252
|
+
the first.
|
|
253
|
+
|
|
254
|
+
Additive: `isHardLineBreak(codePoint)` in `@weasel-js/text`.
|
|
255
|
+
- bfc4b21: `attachHud` reuses a widget's draw commands across repaints until something
|
|
256
|
+
it draws from changes, instead of asking every widget for fresh commands on
|
|
257
|
+
every repaint. A static 10-glyph text widget used to rebuild its command, and so
|
|
258
|
+
re-lay out its glyphs, on every frame.
|
|
259
|
+
|
|
260
|
+
Additive. A widget opts in with the new `Widget.deps(ctx)`, which works like
|
|
261
|
+
`RenderLayer.deps`: the HUD reuses the previous commands while every entry is
|
|
262
|
+
`Object.is`-equal to the last call's, and also rebuilds when the widget's
|
|
263
|
+
bounds, the theme, the default font, the canvas size or the widget's focus
|
|
264
|
+
change. Every kit widget declares it, invalidated by its own setters and
|
|
265
|
+
pointer state. A hand-written widget without `deps` is drawn on every repaint,
|
|
266
|
+
as before; a widget declaring it must treat the commands it returned as
|
|
267
|
+
immutable. A window's `content` painter is still called on every repaint.
|
|
268
|
+
A text widget that only moved keeps its runs array, so its layout stays cached.
|
|
269
|
+
|
|
270
|
+
`@weasel-js/core` exports `depsUnchanged`, the comparison `RenderLayer.deps`
|
|
271
|
+
uses.
|
|
272
|
+
- f046160: `insertAction` now runs `InsertBehavior`s, so `snapToGrid`, `snapToGuides` and `alignInsertBehavior` finally reach a drag. They ride the insert binding's `opts.behaviors`: pass `behaviors` to any drag-to-insert tool hook (`useRectTool({ behaviors })`, and the same on ellipse, line, polygon, star, pencil, text and image), or `toolOptions={{ insert: { behaviors } }}` on `<SceneCanvas>` for all of its built-in ones. Each behavior shapes the start and current point after Shift-constrain and the `snap` dep, and the live preview draws what it returns. On release the first `onEnd` to answer wins, as for move: `null` aborts the insert, `Op[]` commits in its place.
|
|
273
|
+
- 9f83b33: A grown `tileGrid({ overflow: 'grow' })` shrinks back when children leave it. Deleting a child, or moving or dragging one out, gives back each line of cells that empties — never below the declared `rows` (or `cols` for `flow: 'column'`) — and the rest keep their cell size instead of stretching over the grown container. The shrink lands in the same undo step as the departure.
|
|
274
|
+
|
|
275
|
+
This rides on a new optional `LayoutStrategy.depart(container, children, departed)`: the scene's layout pass hands it the children that stay and the ids that left, and it returns poses plus optional new container bounds, as `arrive` does. An edit that both removes and adds children runs `depart` first, then `arrive`. `SceneArrivalHandler` gains a third argument, `departures`, the nodes each container lost in the edit; `layoutArrivalHandler` and `useLayoutArrivals` pass it through. Additive: a strategy without `depart` is rearranged by `childPoses`, as before.
|
|
276
|
+
- 3c1def2: `registerFont` takes a fifth argument, `{ lazy: true }`, which fetches nothing
|
|
277
|
+
until text first lays out in that family — so a scene with no text never
|
|
278
|
+
downloads the atlas. Until the atlas lands, a run set in the family lays out as
|
|
279
|
+
nothing rather than in a fallback face's metrics, and `<SceneCanvas>` repaints
|
|
280
|
+
it when the atlas arrives. The returned promise settles with that load, so it
|
|
281
|
+
never settles for a face no text uses; don't `await` it at startup. New type:
|
|
282
|
+
`RegisterFontOptions`.
|
|
283
|
+
|
|
284
|
+
A family whose atlas is still fetching, eagerly or lazily, now outranks the
|
|
285
|
+
outline tier and the `'substitute'` fallback while it loads: text waits for the
|
|
286
|
+
real face instead of laying out in another one and reflowing when it arrives.
|
|
287
|
+
The same holds for a registered-but-unloaded exact variant, which is no longer
|
|
288
|
+
faked from a sibling weight in the meantime. `listFonts` and `listFontWeights`
|
|
289
|
+
report lazily registered faces before they load.
|
|
290
|
+
|
|
291
|
+
`@weasel-js/hud` registers its bundled Inter lazily, so attaching a HUD whose
|
|
292
|
+
widgets draw no text no longer downloads it. `registerDefaultFont`'s promise now
|
|
293
|
+
settles when a widget first lays out text.
|
|
294
|
+
- ae6e8ac: A touch or pen long-press now shows that it is registering. While a press is
|
|
295
|
+
held and some binding would fire on it — a `longPress` binding, or a
|
|
296
|
+
`contextMenu` one through the fallback — `<SceneCanvas>` draws a ring in the
|
|
297
|
+
theme accent that fills around the press point over the hold. It appears
|
|
298
|
+
after 120ms, so a tap shows nothing, and disappears when the press fires,
|
|
299
|
+
moves past the drag threshold, lifts or is canceled. Under
|
|
300
|
+
`prefers-reduced-motion` it is a static ring. A press nothing is bound to
|
|
301
|
+
shows nothing. When the long-press fires and a binding handles it, touch and
|
|
302
|
+
pen pointers get a short `navigator.vibrate` pulse where the API exists.
|
|
303
|
+
|
|
304
|
+
Additive. `<SceneCanvas longPress={{ feedback, haptics, duration }}>` controls
|
|
305
|
+
it: `feedback: false` turns the ring off, a `SurfaceContribution` replaces it,
|
|
306
|
+
`haptics: false` turns off the pulse, and `duration` sets the hold time
|
|
307
|
+
(default `LONG_PRESS_MS`, 500ms). Under a `tools` takeover, add
|
|
308
|
+
`createLongPressFeedbackContribution()` to your own ambient entries.
|
|
309
|
+
|
|
310
|
+
The press being held is observable state: the `longPress` dep is a
|
|
311
|
+
`LongPressState` whose `get()` returns where the press landed (client,
|
|
312
|
+
canvas-local and world), the view it routed to, when it started, its duration
|
|
313
|
+
and whether it is `armed`, and whose `progress()` returns 0→1.
|
|
314
|
+
`useGestureDispatcher` takes the same controls as `longPress: { state,
|
|
315
|
+
haptics, duration }`, with `createLongPressStore()` making the state. New
|
|
316
|
+
exports: `createLongPressStore`, `LONG_PRESS_MS`, `PendingLongPress`,
|
|
317
|
+
`LongPressState`, `LongPressStore`, `LongPressOptions`,
|
|
318
|
+
`createLongPressFeedbackContribution`, `LongPressFeedbackOptions`,
|
|
319
|
+
`LONG_PRESS_FEEDBACK_ID`, `SceneCanvasLongPress`.
|
|
320
|
+
- 4b570e5: A mesh-gradient paint now bakes at a resolution fitting the device pixels it covers, in power-of-two buckets from 32 to 2048 texels (and never above the context's `MAX_TEXTURE_SIZE`), instead of a fixed 256. A mesh filling a poster, zoomed in on screen, or printed through `renderSceneToPixels` at a high scale no longer shows its texels. Bakes are cached per paint and bucket in a bounded least-recently-used cache (64 MiB or 256 bakes per renderer), and their textures are freed on eviction, on `WeaselRenderer.dispose()`, and on a context restore.
|
|
321
|
+
|
|
322
|
+
Additive: `PaintBindContext` gains `spaceToDevice(units)`, `maxTextureSize` and `resources`, a `PaintResources` lifetime a registered paint kind keys its GPU caches on and frees them through `onRelease`. `PaintResources` is exported from `@weasel-js/core`; `meshBakeSize`, `MESH_BAKE_MIN` and `MESH_BAKE_MAX` from `@weasel-js/core/mesh`. Code that constructs a `PaintBindContext` itself, such as a test double, has to supply the three new members.
|
|
323
|
+
- 251fb64: Mesh gradients get on-canvas handles. `MeshHandles` (`@weasel-js/ui`) draws every patch corner, edge control and tensor interior point over the patch outlines, previews through `onInput` and commits once per drag; dragging a corner carries its controls, and points two patches share move as one handle so the seam does not tear. `SceneGradientHandles` now shows them for a node whose slot holds a mesh, committing through `setFill` / `setStroke` in the bounds frame like the three gradients. The geometry is public on `@weasel-js/core/mesh` as `meshHandles`, `moveMeshHandle` and `meshGuides`. Additive; `GradientHandles`' behavior is unchanged.
|
|
324
|
+
- 9bfdda9: **Breaking:** the mesh-gradient exports moved off `@weasel-js/core` onto a new
|
|
325
|
+
subpath, `@weasel-js/core/mesh`: `MESH_GRADIENT_KIND`, `MESH_BAKE_SIZE`,
|
|
326
|
+
`bakeMesh`, `cornerWeights`, `evalPatch`, `isMeshGradientFill`,
|
|
327
|
+
`isTensorPatch`, `isValidPatch`, `meshBounds`, `meshFromStops`,
|
|
328
|
+
`meshGradientXml`, `meshStops`, `patchBounds`, `patchCorner`, `seedMeshPatch`,
|
|
329
|
+
and the types `BakedMesh`, `MeshBox`, `MeshGradientFill`, `MeshPatch` and
|
|
330
|
+
`MeshPoint`. Change the import path; nothing else about them changed. Any
|
|
331
|
+
import from the subpath registers the kind, as importing them from the root
|
|
332
|
+
did.
|
|
333
|
+
|
|
334
|
+
With esbuild and code splitting on, importing one symbol from
|
|
335
|
+
`@weasel-js/core` no longer ships the mesh paint: `import { asNodeId }`
|
|
336
|
+
bundled to 19,814 B and now bundles to 133 B. The lazily loaded mesh kind now
|
|
337
|
+
ships as one self-contained file that shares no module with the root barrel,
|
|
338
|
+
which is what esbuild needed.
|
|
339
|
+
|
|
340
|
+
New: a `PaintKindEntry` can declare its shader programs as `programs`, keyed
|
|
341
|
+
by program id; registering the kind registers them, and re-registering the
|
|
342
|
+
same source is not a duplicate. New root type export: `ProgramSource`.
|
|
343
|
+
- b554ee0: Create Outlines keeps every run's paint. A text node whose runs wear different
|
|
344
|
+
fills or strokes now becomes one path per paint, each gathering the glyphs and
|
|
345
|
+
decoration rules that share it, instead of one path in the node's color.
|
|
346
|
+
|
|
347
|
+
Additive API: `textToPathsByPaint(data, pose)` returns `{ fill, stroke?, path }`
|
|
348
|
+
per distinct resolved paint, built on the same glyph walk as `textToPath`, and
|
|
349
|
+
their union is `textToPath`'s outline. `TextOutlineSource` takes optional
|
|
350
|
+
`fill` / `stroke` (the node's own), which only `textToPathsByPaint` reads.
|
|
351
|
+
`CreateOutlinesAdapter.createPathNode` receives a third argument,
|
|
352
|
+
`OutlinePathSpec` `{ fill, stroke?, parent }`: the paint the path must wear and
|
|
353
|
+
the parent it goes under. The new optional `createContainerNode(sourceId,
|
|
354
|
+
{ parent, bounds })` mints a container that takes the text's slot and holds its
|
|
355
|
+
paths; without it the paths are laid flat in that slot. Either way it is one
|
|
356
|
+
undo step, and the replacement is what ends up selected.
|
|
357
|
+
|
|
358
|
+
Behavior change for existing adapters: one that ignores the new argument still
|
|
359
|
+
works, but a multi-paint text now yields several flat paths painted however that
|
|
360
|
+
adapter paints them, and `resultIds` can hold more than one id per text node.
|
|
361
|
+
- 702829d: The text edit overlay now lands on the glyphs the canvas drew, in Chromium,
|
|
362
|
+
WebKit and Firefox at any device pixel ratio. It used to shift itself by a fixed
|
|
363
|
+
1px right and 1px up, tuned by eye on one machine; the real offset is that the
|
|
364
|
+
canvas hangs its baseline one ascent below the line top while CSS adds half the
|
|
365
|
+
leading first, which varies with the face, the size and each engine's rounding.
|
|
366
|
+
The overlay now measures both baselines and closes the gap: across Inter,
|
|
367
|
+
Georgia and Arial at 12–72px the mean offset is under 0.2px, and the worst is
|
|
368
|
+
under 1px at DPR 2 and about 1px at DPR 1 (2px for the 7px glyphs of a
|
|
369
|
+
12px superscript). Text with a node-level `script` was
|
|
370
|
+
several pixels off (13px at 72px) and now matches like the rest; its rise is
|
|
371
|
+
applied to the overlay's `top` rather than a `translate`.
|
|
372
|
+
- 9cad63b: The text edit overlay now sets its glyphs in the face the canvas draws. A family
|
|
373
|
+
the canvas draws from a baked atlas or from outlines — `sans-serif` registered
|
|
374
|
+
to Inter, say — used to reach the overlay as a bare CSS name, which the browser
|
|
375
|
+
resolved to its own face (Helvetica on macOS), so "Hxgd" at 72px ended 12px
|
|
376
|
+
short of the canvas. New `cssFontFamily(family, variant)` answers the CSS
|
|
377
|
+
`font-family` for whatever the canvas draws: a private `FontFace` built from the
|
|
378
|
+
family's `registerFontOutlines` file, with the family name as fallback. A family
|
|
379
|
+
drawn through the browser (`registerCanvasFont`) comes back unchanged. An atlas
|
|
380
|
+
with no font file cannot give the DOM its face, and says so once in the console;
|
|
381
|
+
register the file it was baked from with `registerFontOutlines`.
|
|
382
|
+
`OutlineFontOptions.cssSrc` names the `@font-face` source where the bytes won't
|
|
383
|
+
do, and `enableLocalFontOutlines` sets it to `local(<PostScript name>)`.
|
|
384
|
+
|
|
385
|
+
The bundled Inter atlas carries the font's own advances and kerning. It used to
|
|
386
|
+
lay out on whole-pixel advances at its 32px bake size with no kerning at all, so
|
|
387
|
+
"Hxgd" at 72px set 182.25px wide against the 179.44px every browser gives the
|
|
388
|
+
same face, and "AVATAR" 22px wide of it. `gen:font` now writes advances at full
|
|
389
|
+
precision and kerning pairs read from the font's GPOS table, and the atlas is
|
|
390
|
+
rebaked from `inter.ttf`. Text set in it changes width slightly.
|
|
391
|
+
|
|
392
|
+
Outline faces kern like a browser too. opentype.js skips GPOS extension
|
|
393
|
+
lookups, which is where Inter keeps nearly all its kerning; the outline tier now
|
|
394
|
+
reads pair kerning from GPOS itself.
|
|
395
|
+
- b228015: The text edit overlay no longer opens in the fallback font and then reflows. `@weasel-js/font` builds the overlay's DOM face as soon as the outline file's bytes are in hand: at `registerFontOutlines` for an `ArrayBuffer` source, and when the canvas first reads a URL or thunk source, reusing those bytes instead of fetching again. Registering a URL or thunk still fetches nothing. New `cssFontFamilyLoading(family, variant)` returns the load still in flight for the face `cssFontFamily` names, or `null` when there is nothing to wait for. An edit whose face is still loading keeps the overlay hidden until the face lands or for at most `fontHold` ms (new option on `useTextEdit` and `useSceneTextEdit`; default `TEXT_EDIT_FONT_HOLD`, 100ms), then shows the fallback. `0` restores the old behavior. Additive.
|
|
396
|
+
- 53cdd41: New hooks `usePaintKinds()`, `useGradientKinds()` and `usePaintKind(id)` read
|
|
397
|
+
the paint-kind registry and re-render when a kind is registered or removed.
|
|
398
|
+
`PaintInput`, `GradientEditor` and `PaintField` use them, so a kind registered
|
|
399
|
+
after they mount — a consumer's own, or one arriving through
|
|
400
|
+
`registerPaintKindLoader` such as the lazily loaded mesh gradient — shows in the
|
|
401
|
+
kind bar and gets its label and editor without waiting for an unrelated
|
|
402
|
+
re-render. `listPaintKinds()` and `listGradientKinds()` now return the same
|
|
403
|
+
array until the registry changes.
|
|
404
|
+
|
|
405
|
+
`<Canvas>` no longer acts on a render React abandoned: a `startTransition`
|
|
406
|
+
that suspends used to leave its layers, size, controlled `view`, paint target,
|
|
407
|
+
layer helpers (and the consumer's `helpersRef`), preview extras and event
|
|
408
|
+
callbacks such as `onViewChange` behind, for the next redraw, hit test or
|
|
409
|
+
pointer event to use. `<CanvasView>`, `<SceneViewCanvas>`, the preview-ghost
|
|
410
|
+
and dispatcher-overlay layers, and `<SceneCanvas>`'s `view` dep under a
|
|
411
|
+
controlled `view` get the same treatment. A `syncPaint` redraw requested from a layout
|
|
412
|
+
effect that runs before the canvas's own — an earlier sibling's — now paints
|
|
413
|
+
that commit's inputs rather than bailing until the canvas's effect ran.
|
|
414
|
+
- 33b7ac2: The `mesh-gradient` paint kind now loads on demand instead of shipping with
|
|
415
|
+
every import of `@weasel-js/core` (about 19 kB minified). A mesh fill that
|
|
416
|
+
arrives as data — a loaded document, an SVG import — draws nothing on the
|
|
417
|
+
first frame that meets it, starts the load, and `<SceneCanvas>` repaints it
|
|
418
|
+
when it lands. Importing anything from `@weasel-js/core/mesh` (`seedMeshPatch`,
|
|
419
|
+
`isMeshGradientFill`, `MeshEditor` in `@weasel-js/ui`, …) still registers it
|
|
420
|
+
at once.
|
|
421
|
+
|
|
422
|
+
New: `warmPaintKinds(kinds?)` loads kinds ahead of their first use and
|
|
423
|
+
resolves once they are registered; with no list it loads every kind that has
|
|
424
|
+
a loader. Await it before `renderSceneToPixels` or `serializeSvg` on a
|
|
425
|
+
document that may hold a mesh paint — both are synchronous and cannot wait for
|
|
426
|
+
a load. `registerPaintKindLoader(id, load)` declares a kind of your own the
|
|
427
|
+
same way: `load` resolves with its `PaintKindEntry`, and it runs the first
|
|
428
|
+
time the kind is looked up. New type: `PaintKindLoader`.
|
|
429
|
+
|
|
430
|
+
`<SceneCanvas>` now repaints whenever a paint kind registers, so a kind
|
|
431
|
+
registered after the canvas mounts draws without other help.
|
|
432
|
+
`serializeSvg` warns that an unregistered kind may only need loading, rather
|
|
433
|
+
than that it has no vector form.
|
|
434
|
+
- fa67cbf: Paint kinds registered through `registerPaintKind`, `mesh-gradient` among
|
|
435
|
+
them, now paint on text below the outline-tier threshold instead of drawing
|
|
436
|
+
it black. The kind's own `bind` renders its paint over the glyphs' screen box
|
|
437
|
+
into an offscreen buffer the renderer keeps, and the glyphs sample that buffer
|
|
438
|
+
with their distance-field coverage as the mask, so the same world point reads
|
|
439
|
+
the same color on either side of the threshold. Underline, strikethrough and
|
|
440
|
+
overline rules under such a paint take it too. A kind needs nothing new to get
|
|
441
|
+
this, which covers kinds registered outside the kit. A fix; nothing is
|
|
442
|
+
removed.
|
|
443
|
+
|
|
444
|
+
One behavior change: atlas-tier text under a kind that is not registered, or
|
|
445
|
+
whose `bind` declines the paint, now draws nothing rather than black, which
|
|
446
|
+
is what the outline tier already did.
|
|
447
|
+
- 8f68fa8: `<SceneCanvas>` draws the selection box for a node on a parallax scene layer where the plane draws the node. It used to land offset by the plane's lead or lag once the camera had panned. The chrome now reads the same bounds the picker does, so a `geometry.boundsOf` override also reaches the selection box, which it did not before.
|
|
448
|
+
- 25448ee: Nodes on a parallax scene layer can be edited where they are drawn, zooming planes included.
|
|
449
|
+
|
|
450
|
+
- Move, resize, rotate, clone, insert and path-anchor editing (drag, click, marquee, cut, insert anchor) pair the pointer with the node's pose in its plane's world: the kit's descriptors are wrapped by the new `inPlane(action, layerOf)` (with `selectionLayer`, `insertLayer` and `editingLayer`), which carries the drag, the trail, a click's `worldX` / `worldY`, a handle's pivot and the camera the action reads screen pixels through into the plane, converts the `nodeAtPoint` and `snap` deps at its boundary, and returns overlays in the camera's world. A custom editing action takes the same wrapper. `EditedLayerOf` receives the deps and the grabbed affordance. Nudge and align move a node in its own world's units, as they always have.
|
|
451
|
+
- Snapping on a plane compares like with like. Guides and the grid are the camera's, so `guideSnapStrategy` carries each guide line into the plane and `gridSnapStrategy` rounds the pose's origin on the camera's lattice and carries it back; `GestureContext.plane` (read from the new `ViewApi.plane`) is the map they use. A resize's point snaps (`pointSnapToGrid`) see their points in the camera's world.
|
|
452
|
+
- Path-edit chrome — the anchor and handle markers, the anchor marquee, the slops overlay — and the anchor hit-test read a plane node's path in the drawing camera's world. `createPathEditingOverlayLayer`'s `getPose` and `getMarquee` receive the drawing view; `anchorStateFrom` takes an optional path carrier.
|
|
453
|
+
- `InsertDep` gains an optional `layer()`, the layer `commit` puts a node on; the default dep reports its first layer.
|
|
454
|
+
- The preview ghost, and the selection box mid-gesture, follow a plane node through its plane.
|
|
455
|
+
- A second `<CanvasView>` boxes a plane node through its own camera: the surface's bounds resolver takes the asking view.
|
|
456
|
+
- A container's clip reaches a child on another plane in that child's world, in both painting and picking. New `planeToPlane` and `planeMatrix` helpers compose plane maps.
|
|
457
|
+
- `useSelectTool` takes `getView`, and `sceneToAdapter`'s `hitTestArea` / `hitTestLasso` take the asking view, so a bare adapter picks plane nodes too. `AreaSelectAdapter.hitTestArea` and `LassoSelectAdapter.hitTestLasso` accept that view (`RegionPickView`, which `HitTestView` now aliases).
|
|
458
|
+
|
|
459
|
+
Still open: a selection spanning planes that scale differently — see "Interactive parallax planes" in `docs/TODO.md`.
|
|
460
|
+
- 88c1ae3: Scene layers can be parallax planes, and every plane can be animated.
|
|
461
|
+
|
|
462
|
+
- A scene layer takes `parallax` (`systemLayers`, `addLayer`, and the new undoable `scene.setLayerParallax(layer, opts | undefined)`), and it round-trips through `toJSON`. `<SceneCanvas>`, `SceneViewCanvas` and `renderSceneToPixels` draw that layer's nodes through the derived view, with no wiring by the consumer.
|
|
463
|
+
- Nodes on such a layer are picked where they are drawn: a click, a marquee, a lasso and the selection box all go through the plane.
|
|
464
|
+
- **Breaking:** `createParallaxLayer` takes its factors as `parallax: { pan, zoom, anchor }` instead of top-level `pan` / `zoom` / `anchor`. `parallax` also accepts a `ParallaxPlane` from `createParallaxPlane(opts)`, whose `set(patch)` repaints the layer — write it from an animator's `onTick` to tween a plane.
|
|
465
|
+
- New pure helpers for crossing between the camera and a plane: `planeMap(camera, opts)`, `toPlane`, `fromPlane`, `rectToPlane`, `rectFromPlane`, and the `PlaneMap` type.
|
|
466
|
+
- `HitTestView` gains an optional `get`: a custom `areaSelect` / `lassoSelect` dep reads the asking view's camera from it.
|
|
467
|
+
- dcc9834: Patterns and gradients now paint on text below the outline-tier threshold.
|
|
468
|
+
Atlas glyphs under a texture paint draw through a program of their own that
|
|
469
|
+
uses the distance-field coverage as a mask over the paint, sampled at the same
|
|
470
|
+
paint-space point the outline tier's path program uses, so text no longer
|
|
471
|
+
changes color when zoom carries it across the threshold. Underline,
|
|
472
|
+
strikethrough and overline rules under such a paint take it too, rather than
|
|
473
|
+
drawing black. Solid text is unchanged and still batches; each atlas-tier
|
|
474
|
+
group under a texture paint is its own draw, as a pattern-filled path is.
|
|
475
|
+
|
|
476
|
+
`textCommandFromPose` — and so `kit:text` nodes and `createTextLayer` — now
|
|
477
|
+
resolves each run's fill and stroke paint against the pose box the way every
|
|
478
|
+
other node's paint is resolved: a `units: 'bounds'` paint is mapped onto the
|
|
479
|
+
box, and a `TilePatternSpec` is swapped for its texture. Before this, a
|
|
480
|
+
pattern set on a text node from the paint panel drew nothing at either tier,
|
|
481
|
+
and a `'bounds'` gradient was measured in screen space. A fix; nothing is
|
|
482
|
+
removed.
|
|
483
|
+
- 365c762: A pattern paint takes a `transform`: the tile's rotation, scale and skew about
|
|
484
|
+
its `origin`, as a `PatternTransform` `[a, b, c, d]` in SVG `matrix()` order.
|
|
485
|
+
`composePatternTransform({ rotation, scaleX, scaleY, skewX })` builds one and
|
|
486
|
+
`decomposePatternTransform` reads one back into those parts; both are exported
|
|
487
|
+
from `@weasel-js/paint` and `@weasel-js/core`. The GL renderer samples the tile
|
|
488
|
+
through it, and a transform with no inverse draws nothing.
|
|
489
|
+
|
|
490
|
+
`@weasel-js/svg` writes the transform as `patternTransform="matrix(…)"`, with
|
|
491
|
+
the origin as its translation, and reads any `patternTransform` list back into
|
|
492
|
+
`origin` and `transform`.
|
|
493
|
+
|
|
494
|
+
`PatternPicker` (and so `PaintInput`'s pattern mode) has a Rotation field that
|
|
495
|
+
edits the rotation and leaves scale and skew alone; picking another tile keeps
|
|
496
|
+
the rotation.
|
|
497
|
+
|
|
498
|
+
Additive: a paint without `transform` paints and serializes as before.
|
|
499
|
+
- 941e941: New `createRasterSession()` keeps one renderer and its GPU caches across any
|
|
500
|
+
number of headless renders, for rendering thumbnails or pages in bulk: shader
|
|
501
|
+
programs compile once and a bitmap uploads once for the whole batch rather than
|
|
502
|
+
per render. `session.render(args)` takes what `renderSceneToPixels` takes minus
|
|
503
|
+
`gl`/`createCanvas`, which go to `createRasterSession({ gl?, createCanvas? })`;
|
|
504
|
+
scenes, source rects and scales may differ per render, and a session that owns
|
|
505
|
+
its canvas grows it to the largest render so far. `session.dispose()` frees
|
|
506
|
+
every GL object the session created and leaves a caller-owned context open.
|
|
507
|
+
Additive; new exports `createRasterSession`, `RasterSession`,
|
|
508
|
+
`RasterSessionOptions`, `RasterRenderArgs`.
|
|
509
|
+
|
|
510
|
+
`renderSceneToPixels` is now a session opened for one render. Behavior is
|
|
511
|
+
unchanged, except that it no longer leaks on a caller-owned context: each call
|
|
512
|
+
used to leave 12 shader objects and every uploaded bitmap texture behind.
|
|
513
|
+
`WeaselRenderer.dispose()` now frees bitmap and pattern textures and persistent
|
|
514
|
+
meshes too, and compiled shaders are freed with their program.
|
|
515
|
+
- b20df31: `<SceneCanvas>`, `<Canvas>`, `<MinimapCanvas>`, `useHostAnchor` and the
|
|
516
|
+
canvas's dep sources (`areaSelect`, `editAnchors`, `insert`, `view` and the
|
|
517
|
+
rest) no longer act on a render React abandoned. A `startTransition` that
|
|
518
|
+
suspends used to leave its props behind for the next event, dep read or frame:
|
|
519
|
+
a double click could reach the abandoned `onDoubleClick`, chrome could resolve
|
|
520
|
+
against the abandoned `chromeVisibility`, `selection`, `getFocused` or
|
|
521
|
+
`selectTool.resize.resizable`, and a dep could hand an action the abandoned
|
|
522
|
+
scene, adapter or selection. They now see the last committed render's values.
|
|
523
|
+
|
|
524
|
+
A function-form tool cursor's `ToolCtx` carries the selection, adapter,
|
|
525
|
+
`setView` and debug sink of the render resolving it; its `applyOps` writes
|
|
526
|
+
through the committed adapter.
|
|
527
|
+
- 55ef61f: Core's hooks outside the canvas no longer write refs during render, so a render
|
|
528
|
+
React abandons (a transition that suspends) can no longer leave its options,
|
|
529
|
+
adapter or callbacks behind for the next event or frame to use. Mirrors now go
|
|
530
|
+
through `useLatest`. A few hooks change shape where something read the ref
|
|
531
|
+
during render:
|
|
532
|
+
|
|
533
|
+
- `useSelection` keeps a local selection in an internal store, so writes are
|
|
534
|
+
synchronous and no longer deferred inside a transition. The returned object
|
|
535
|
+
is now stable only for as long as `scene` is the same store.
|
|
536
|
+
- `useDragRect` and `useDragRadial` return `overlay` and `isActive` as values,
|
|
537
|
+
so the controller gets a new identity when the overlay changes; its methods
|
|
538
|
+
stay stable.
|
|
539
|
+
- `useArrayAdapter` builds its adapter over that render's `items` instead of a
|
|
540
|
+
ref.
|
|
541
|
+
- `useSimulation` starts its loop in a layout effect on mount rather than during
|
|
542
|
+
render, and restarts it after StrictMode's simulated remount.
|
|
543
|
+
- `useCanvasFocus` returns a `focusProps` object that is stable until `tabIndex`
|
|
544
|
+
changes; it used to be new every render.
|
|
545
|
+
- 712de19: A drag under a `reflowTransition` now lands the dragged node the way its siblings move: on release it glides from where it was let go onto its committed slot (or back home on a cancel) instead of jumping there. A node grabbed while still gliding is held where it is shown, and the drag starts from there rather than from its document pose; a free drop of it commits where it was shown under the pointer. The drop is still one undo step. To support this, `ReflowTransition.glide` and `settle` take an optional `{ from }` (`ReflowGlideOptions`): `glide` restarts from that pose, and `settle` with `from` takes over a node the transition was not moving. Additive; a custom `ReflowTransition` that ignores the new argument still type-checks, and its dragged nodes snap as before.
|
|
546
|
+
- 67d95c8: Add `solveIk`, a 2D inverse-kinematics solver for the rig. Given a skeleton, a pose, a chain of joints and a target, it returns the pose with the chain's rotations replaced so the chain's tip reaches the target — an ordinary `Pose`, so it blends with `blendPoses`, samples on a `SampledTrack<Pose>` and drives `Rig.pose`. It solves by cyclic coordinate descent, with per-joint angle limits, an iteration cap and a tolerance; a two-joint chain is solved analytically first, bending toward an optional `pole`. A target out of reach leaves the chain pointing straight at it, and the result says whether the target was reached. New types: `SolveIkOptions`, `IkResult`, `IkLimit`, `IkPoint`. Additive.
|
|
547
|
+
- 8a68b6c: New `mirrorPose(skeleton, pose)` reflects a rig pose across the rig's y axis and returns it as ordinary deltas against the same skeleton, so a character can face the other way without a negative scale — which a scene pose such as `RectPose` cannot hold. Every joint resolves to exactly the reflection of the original, including joints the pose leaves at their bind, and mirroring twice returns the original pose.
|
|
548
|
+
- 16a0476: Text runs carry a numeric weight. `StyledRun.fontWeight` (100–900) overrides the node's weight and the `bold` flag, which is now a preset over it: writing either one to a range drops the other. `numericWeight` and `isBoldWeight` (600 and up) are exported as the one reading of a weight.
|
|
549
|
+
|
|
550
|
+
Taking bold off part of a bold node now writes `fontWeight: 400` over that part and leaves the node alone, instead of lowering the node and re-bolding the rest — so it works at any node weight, including 900, where it used to be refused. `SetFlagResult.applied` is gone, since the edit can no longer be declined. `effectiveRangeStyle` reports the `fontWeight` that renders and reads `bold` off it; `patchRangeStyle` lays an armed style over a range the way a write would.
|
|
551
|
+
|
|
552
|
+
`listFontWeights(family)` in `@weasel-js/font` reports the weights a family has on the atlas and outline tiers. A new `font-weight` pref kind draws `FontWeightSelect`, which lists those weights (the nine CSS weights for a family with none on file) and reads the family from the `fontFamily` leaf beside it. The text tool's character options and the node panel's Weight field both use it. The overlay and SVG round-trip a run's weight; a tspan `font-weight` other than 700 now reads as the run's weight rather than being dropped.
|
|
553
|
+
- 6f03bf7: A container can declare its layout on the scene: `scene.add({ kind: 'container',
|
|
554
|
+
layout: tileGrid(...) })`, or `layoutKey` in a snapshot, resolved through the new
|
|
555
|
+
`SceneRegistry.layout`. Layouts now answer to every change to a container's
|
|
556
|
+
children, not only arrivals: a delete, reorder or resize re-runs the strategy's
|
|
557
|
+
`childPoses`, and the writes land in the same undo step as the change, so undo
|
|
558
|
+
restores the whole arrangement at once. A child that joins goes to `arrive` as
|
|
559
|
+
before, and to `childPoses` when the strategy has no `arrive`.
|
|
560
|
+
|
|
561
|
+
This runs through the scene's existing arrival window and `arrange` op; there is
|
|
562
|
+
one layout pass (`core/scene/layoutPass.ts`) whether the layout is declared on
|
|
563
|
+
the node or supplied by `<SceneCanvas layouts>` / `useLayoutArrivals`, and a
|
|
564
|
+
declared layout wins. With no handler installed, a scene holding declared
|
|
565
|
+
layouts runs that pass itself, measured by the new
|
|
566
|
+
`UseSceneOptions.layoutFrame` (also a `sceneFromJSON` option).
|
|
567
|
+
|
|
568
|
+
Breaking edges: `SceneArrivalHandler` gains a second argument, `changed`, and is
|
|
569
|
+
now also called for edits with no arrivals. While layouts are active, a bare
|
|
570
|
+
`scene.remove`, `scene.reorder`, or a `setPose` that resizes a container is
|
|
571
|
+
recorded as a one-mutation batch, like `add` and `move` already were. The
|
|
572
|
+
`arrange` op's coalesce key now names the nodes it moved.
|
|
573
|
+
|
|
574
|
+
Also new: `scene.layoutOf(id)` and `scene.onReflow(listener)`, which reports each
|
|
575
|
+
live edit's layout writes; `<SceneCanvas reflowTransition>` uses it to glide
|
|
576
|
+
those reflows as it does a drag's. New exports: `LayoutFrame`, `LayoutMove`.
|
|
577
|
+
- 72379f6: `Scene.incarnation(id)` returns a token for the node an id names right now. It
|
|
578
|
+
holds through every edit to that node and changes whenever the id enters the
|
|
579
|
+
scene again — a fresh `add`, an undo or redo that brings it back, or
|
|
580
|
+
`loadState` — so something holding an id across frames can tell whether it
|
|
581
|
+
still names the same node.
|
|
582
|
+
|
|
583
|
+
`@weasel-js/d3` transitions use it: a node removed and re-added under the same
|
|
584
|
+
id between two frames is now treated like a removed node. Its transition stops
|
|
585
|
+
for that node, the node taking the id is left alone, and a `.remove()` no longer
|
|
586
|
+
deletes it.
|
|
587
|
+
- 7f7d153: A container's layout can be changed after `add`, undoably. `scene.setLayout(id, layout)` takes a `LayoutStrategy`, its key in `SceneRegistry.layout`, or `null` for none, and re-arranges the container's children under the new layout in the same undo step. A registered layout is recorded by its key, so a serialized history restores it. `createSetLayoutOp({ id, from, to })` is the same change as an op, applied through the new `setLayout` method on `sceneToAdapter`'s and `defaultCommitAdapter`'s adapters; name the layouts by key for an op that has to survive a persisted history. Additive.
|
|
588
|
+
- d9cdff1: `<SceneViewCanvas>` and `<MinimapCanvas>` now free their renderer and every GL program, buffer and texture it made when they unmount; before, each mount leaked them. All three detached canvas surfaces (those two and `<DrawCanvas>`) now share one renderer lifetime, so their setup and teardown cannot drift apart. Additive: `releaseCanvasRenderer(canvas)` is exported, freeing the renderer `renderSceneToCanvas` created for a canvas.
|
|
589
|
+
- 63d0ece: Picking and selection chrome now hold their screen-pixel sizes exactly under
|
|
590
|
+
non-uniform zoom, rotated nodes included. Before, both divided by the mean of
|
|
591
|
+
the two axis scales, so at 4:1 a 4px pick slop was 8px on one axis and 2px on
|
|
592
|
+
the other, and on a turned node the selection outline, handles and rotate
|
|
593
|
+
badge were drawn as a rotated screen rectangle beside the parallelogram the
|
|
594
|
+
node actually painted.
|
|
595
|
+
|
|
596
|
+
- `<SceneCanvas>` picks within `pickTolerancePx` of a node measured on screen.
|
|
597
|
+
`strokeHitTest` takes a `slop: { px, transform }` for this, and
|
|
598
|
+
`shapeCoversPoint`'s `tolerance` accepts `{ px, scale }` alongside a world
|
|
599
|
+
number.
|
|
600
|
+
- The selection outline traces the node's projected corners, handles sit on
|
|
601
|
+
them, and the rotate badge sits its `distance` in pixels off the top edge,
|
|
602
|
+
along that edge's normal as it lands on screen. `rotationHandle` takes the
|
|
603
|
+
view's `scale` to do this and now also returns the badge's screen `angle`;
|
|
604
|
+
`standoff` (exported) is the placement both it and the grab
|
|
605
|
+
region use.
|
|
606
|
+
- A painted rotate badge is grabbable where it is drawn:
|
|
607
|
+
`createRotationAffordance` takes `handle: { distancePx, hitRadiusPx }`, and
|
|
608
|
+
`<SceneCanvas>` / `<CanvasView>` turn it on when the selection overlay
|
|
609
|
+
paints one. An affordance `point` region takes a `standoff` for chrome that
|
|
610
|
+
floats a fixed distance off an edge.
|
|
611
|
+
- The rotate ring's minimum band, and its paint inset, are measured on screen
|
|
612
|
+
for a turned target (`pxExtent` and `annulusSemiAxes` take a rotation).
|
|
613
|
+
- Grid lines stay 1px on screen on both axes.
|
|
614
|
+
- Resize handles on a turned target are grabbable across the turned square
|
|
615
|
+
they are painted as, not a screen-aligned one. A `point` region takes
|
|
616
|
+
`turned: true` for this; `pointRegionFrame` is the one placement the
|
|
617
|
+
hit-test, the region's square paint and the debug hitbox all read, and
|
|
618
|
+
`screenAngleOf` the one angle the overlay turns its handles by.
|
|
619
|
+
- The `debug.slops` overlay draws the regions the hit-test walks — the same
|
|
620
|
+
affordance list, each region's square from `pointRegionFrame` — instead of
|
|
621
|
+
recomputing corner and anchor positions, so it now shows a custom
|
|
622
|
+
`selectTool.handleHitRadius`, turned handles, and anchors on every selected
|
|
623
|
+
path the hit-test offers them on.
|
|
624
|
+
- The hitbox debug overlay draws a world circle as the ellipse it lands as, a
|
|
625
|
+
rotated rect turned, and the new `polygon` `HitShape` a point region now
|
|
626
|
+
records.
|
|
627
|
+
- f8bde12: A scene that has never had a layout now arranges a container as soon as it is given one, whichever way the layout arrives: a `createSetLayoutOp` run through `applyBatch` (or `scene.history.apply` / a journal), and a `scene.setLayout` call inside `scene.batch` or `scene.untracked`, each lay the children out in the same undo step, as a bare `scene.setLayout` call already did. Before, they set the layout and left the children where they were until the container's next change. Undo, redo and a restored history replay the arrangement. A bug fix; no API changes.
|
|
628
|
+
- 685a086: Additive. A `ShaderDrawCommand` can fill an array uniform from one value: key
|
|
629
|
+
it by the array's bare name and pass a flat `number[]`, `Float32Array`,
|
|
630
|
+
`Int32Array` or `Uint32Array` — `u_ripples: [x, y, t, x, y, t]` fills
|
|
631
|
+
`uniform vec3 u_ripples[8]` from slot 0 in one `uniform3fv` call. The call is
|
|
632
|
+
picked from the declared element type (`float`/`vecN`, `int`/`ivecN`,
|
|
633
|
+
`bool`/`bvecN`, `uint`/`uvecN`, and every `matN`/`matNxM`). A value that is not
|
|
634
|
+
a whole number of elements, or is longer than the declaration, throws in dev; a
|
|
635
|
+
shorter one leaves the remaining slots as they were. Per-slot keys
|
|
636
|
+
(`u_ripples[2]`) keep working. Effects passes take the same values.
|
|
637
|
+
`ShaderUniform` widens to include those array types.
|
|
638
|
+
|
|
639
|
+
Re-registering a program id with new source in dev now reaches every renderer
|
|
640
|
+
that compiled it: the renderer recompiles on its next frame, deletes the
|
|
641
|
+
program it replaces and looks its uniforms up again. If the new source fails to
|
|
642
|
+
compile, it logs the error once and keeps drawing the previous program. A
|
|
643
|
+
`<Canvas shaders>` naming the id repaints when its source changes, so the edit
|
|
644
|
+
shows up without anything else asking for a frame.
|
|
645
|
+
- 90a4686: The default `slice` dep now cuts a path under any pose the pose descriptor can read, not only one with top-level `x`/`y`/`width`/`height`: `useSliceDepSource` takes the canvas's `poseDescriptor` as a new optional last argument, and `<SceneCanvas>` passes it. A rotated shape's pieces keep its rotation in their own poses instead of having it baked into their paths, when the descriptor can write a rotation (`withRotation`); otherwise the rotation is baked in as before. `computeSliceOps`'s `placePiece` now receives the world-space piece and returns `{ pose, path }` (the new `SlicePiece` type) rather than mapping a pose alone, and `SliceBounds` is no longer exported — breaking for callers of that hook, which has not yet been released.
|
|
646
|
+
|
|
647
|
+
`worldEditToStorage` now places a rotated pose's box so the edited path stays where it was drawn when its bounds change. Before, the rotation pivot moved with the box, so dragging an anchor of a rotated shape past its bounds shifted the whole shape. It also accepts any `Path`, not only a polygon.
|
|
648
|
+
- 7e08265: `<SceneCanvas>` now publishes a default `slice` dep, so `useSliceTool` cuts with nothing else wired. Each cut swaps every path it crosses for its pieces in one undo step: an open path is snipped, a closed one is knifed, and a closed loop cuts the region it encloses out as its own piece. The pieces of a selected shape stay selected. Paths are cut where they are drawn and the pieces are stored in their parent's frame under `poseComposition`. Nodes on locked layers and nodes with derived geometry are skipped. Additive: `useSliceDepSource` and the pure `computeSliceOps` are new exports, and a consumer's own `useSliceDep` still replaces the default. The WeaselDraw copy is gone.
|
|
649
|
+
- d60a422: Cuts along a polyline, and scissors. `splitPathByPolyline(path, cut)` is the knife along an open polyline: the new edges follow the cut through every bend, a loop the cut draws inside the fill is dropped, and chords that cross each other are all cut. `splitPathBySegment` is now the two-point case of it. `snipPathByPolyline(path, cut)` splits a path's stroke wherever the cut crosses it, leaving every piece open instead of closing it the way a fill does; curves keep their segment types in both. `sliceAction` takes the binding param `cut: 'freehand'` to cut along the whole drag trail rather than a straight line. Breaking: `SliceDep.commit` now receives the cut as one polyline, `commit(cut)`, instead of `commit(a, b)`; a straight cut arrives as `[a, b]`.
|
|
650
|
+
- dde2315: The slice tool moves into the kit as `useSliceTool`, and cuts click by click. Clicks place the cut one point at a time, with a live preview trailing to the pointer; Enter or a double-click cuts, Escape discards, Backspace takes back the last point, and a click on the first point closes the cut into a loop and cuts. A drag still cuts straight, and an Alt-drag along its trail. The tool registers `sliceAction` itself, so a consumer passes it `tools={{ slice }}` and publishes a `slice` dep, and no longer needs `actions={{ slice: sliceAction }}`. Additive.
|
|
651
|
+
|
|
652
|
+
`splitPathByPolyline` now cuts out the region a loop in the cut encloses, instead of dropping the loop: a loop inside the fill becomes its own piece, taking any hole it surrounds, and leaves a hole in the piece around it. A closed cut counts as a loop, or, where it crosses the boundary, is cut as the chords it makes. A cut with a loop in it now returns one more piece than it did.
|
|
653
|
+
- 4cb55b7: Text can be set in small caps. `StyledRun` and `TextStyle` take
|
|
654
|
+
`fontVariantCaps: 'normal' | 'small-caps'`. A run overrides the node, and
|
|
655
|
+
`'normal'` on a run turns off small caps it would inherit. Lowercase letters
|
|
656
|
+
are drawn as capitals at a smaller size. The run's `text` is not rewritten, so
|
|
657
|
+
carets, selections and hit tests address what was typed. The small-caps
|
|
658
|
+
reading is applied after `textTransform`, as CSS does it.
|
|
659
|
+
|
|
660
|
+
This is a synthesis, not the font's `smcp` feature. The small size is the
|
|
661
|
+
face's x-height over its cap height (`smallCapsScaleFor`). A face that states
|
|
662
|
+
neither height gets `SMALL_CAPS_SCALE`, 0.7, which is the factor Chromium and
|
|
663
|
+
WebKit use. `FaceMetrics` gains `xHeight` and `capHeight`, read from `OS/2`
|
|
664
|
+
on both tiers. The bundled Inter atlas carries them now.
|
|
665
|
+
|
|
666
|
+
`ResolvedRun` gains an optional `sizeMap`, which holds the size each unit of
|
|
667
|
+
its text is drawn at. `fontSize` still sets the line height and the rules, so
|
|
668
|
+
a small-caps word keeps its line and gets one underline. The layout cache keys
|
|
669
|
+
on the size map. The outline-tier size gate reads the run's size, so one word
|
|
670
|
+
is never split across tiers.
|
|
671
|
+
|
|
672
|
+
The edit overlay sets the lowercase letters of a small-caps run in
|
|
673
|
+
`<span data-small-caps>` pieces. It sizes them at the canvas scale, because a
|
|
674
|
+
browser's own synthesis uses a fixed factor. It re-splits the pieces as you
|
|
675
|
+
type. A plain-text edit now commits the overlay's DOM text instead of
|
|
676
|
+
`innerText`. `innerText` applies `text-transform`, so a node shown in capitals
|
|
677
|
+
committed the capitals as its text. `@weasel-js/svg` writes
|
|
678
|
+
`font-variant="small-caps"`, and `normal` on a tspan, and reads either back.
|
|
679
|
+
|
|
680
|
+
All of this is additive.
|
|
681
|
+
- fb21799: The fluent stagger form takes a `cancelKey` and a `label`, as the factory form already did. `.tween` and `.springPose` accept both in their options, and `.each` takes a `StaggerOptions` second argument. The label names the stagger's `start`, `end`, `cancel` and `interrupt` events and its `animator.live()` row; the cancel-key lets `animator.cancelKey` and `isActive` reach a fluent run, and a second run under the same key interrupts the first. Additive.
|
|
682
|
+
- fe9a91e: Add `warmSvg(nodes)` and `svgNeeds(nodes)` to `@weasel-js/svg`. `serializeSvg` is synchronous, and its missing-def warning used to point at `warmPaintKinds()`, which loads every lazily registered kind and fails when any unrelated one does. `svgNeeds` reads the serializer's own paint pre-pass, so it lists exactly the paint kinds the export writes as paint servers — fills and strokes, text and run paints, through nested groups — plus the faces whose font metrics size a sub- or superscript run with its own `baselineShift`. `warmSvg` loads only those. Core now exports `isPaintKindKnown`, and `@weasel-js/text` (re-exported by core) adds `resolveRunFace(run, style)`, the family, weight and style a run is set in, read without touching the font registry. Additive.
|
|
683
|
+
- 3a68365: Add justified text. `TextAlign` gains `'justify'`: every line that wraps is
|
|
684
|
+
spread across the box by widening its word gaps equally, and a paragraph's last
|
|
685
|
+
line, or a line with no gap, sits at the start edge. `resolveAlign` maps
|
|
686
|
+
`justify` to that start edge. `LayoutRunsOpts.justify` and
|
|
687
|
+
`TextDrawCommand.justify` carry justification apart from the edge, so
|
|
688
|
+
`justify: true` with `align: 'center'` centers the last lines instead (CSS
|
|
689
|
+
`text-align-last`). The edit overlay sets `text-align: justify` and pins
|
|
690
|
+
`text-align-last` to the same edge, and the property panel's Align bar gets a
|
|
691
|
+
Justify segment with a new `textAlignJustify` icon. SVG export writes a
|
|
692
|
+
justified node at its start edge and records `data-weasel-align="justify"`,
|
|
693
|
+
which the reader turns back into `align: 'justify'`.
|
|
694
|
+
|
|
695
|
+
This is additive. Code that switches over `TextAlign` exhaustively has a new
|
|
696
|
+
value to handle.
|
|
697
|
+
- 43ad590: `tileGrid` takes an `overflow` policy, and it holds however a child arrives — dragged in, inserted, reparented, duplicated or grouped inside the grid. Before, only a drop was checked: a child that arrived by an op past `cols * rows` was skipped by the layout and left wherever its pose put it.
|
|
698
|
+
|
|
699
|
+
- `'reject'` (the default) refuses the child by every route. A drop finds no free cell, as before. An insert or reparent that would overfill the grid is now reverted whole, so nothing lands and no undo entry is recorded. **This is a behavior change:** such an op used to add the child and leave it unplaced.
|
|
700
|
+
- `'grow'` adds a row when the last one fills (a column, under `flow: 'column'`), and the container grows by one cell pitch to hold it, in the same undo step.
|
|
701
|
+
- `'scroll'` keeps the container's size and runs the extra children on past its last visible row at the same pitch. `LayoutStrategy.contentExtent` reports the region they cover.
|
|
702
|
+
|
|
703
|
+
Also new on `tileGrid`: `flow: 'row' | 'column'` sets the fill order. Every child now gets a cell from `childPoses`; one past the grid is placed past it rather than skipped. A child that joins a non-full grid by an op is placed in the free cell nearest to where it was put. Before, it stayed where its pose put it.
|
|
704
|
+
|
|
705
|
+
Underneath, the scene has an arrival hook. `scene.setArrivalHandler(fn)` hears every node that joins a container during one live edit. It returns poses to write as part of that edit, or `null` to refuse the edit. A refused `applyBatch` (or `history.applyOps`, or a journal's `applyBatch`) is reverted and does not throw. A refused `scene.batch`, `untracked`, or bare `add` / `move` is reverted and throws `SceneArrivalRefused`. Redo and a restored history replay the arrangement recorded the first time, through the new `'arrange'` op (`createArrangeOp`). `LayoutStrategy` gains the optional `arrive` and `contentExtent`. `layoutArrivalHandler(scene, { layouts })` connects a scene's layouts to the hook, and `<SceneCanvas layouts>` installs it. A canvas wired by hand through `sceneToAdapter({ layouts })` calls `useLayoutArrivals`. A reparent-on-drop the container refuses now leaves the drag uncommitted instead of throwing.
|
|
706
|
+
|
|
707
|
+
Mostly additive, with these breaking edges. The default-policy change above. `Scene` gains a required `setArrivalHandler`, so a hand-written `Scene` implementation has to add it. While a handler is installed, a bare `scene.add` / `scene.move` into a container is recorded as a one-mutation batch.
|
|
708
|
+
- 4cef954: New `useLatest(value)` (`@weasel-js/react`, re-exported by
|
|
709
|
+
`@weasel-js/core`): a ref holding the value of the last committed render, for
|
|
710
|
+
event handlers and frame loops that must not re-subscribe when it changes.
|
|
711
|
+
Unlike writing `ref.current = value` in the render body, a render React throws
|
|
712
|
+
away never lands, and the value is in place before any layout effect of the
|
|
713
|
+
commit runs. List the returned ref in dependency arrays; `exhaustive-deps` only
|
|
714
|
+
treats `useRef` as stable.
|
|
715
|
+
- c4cc60f: `useSelection` now returns the same object for the life of the component. A memo or effect keyed on `selection` used to rerun every render, so tools built from it were rebuilt every render, and with `onToolsCreated={setTools}` that looped ("Maximum update depth exceeded"). `current` still reads the live selection and the calling component still re-renders when it changes, but anything derived from the ids must now be keyed on `selection.current`, not `selection`: a memo keyed only on the api no longer reruns when the selection changes. A changed `mode` or `extend` takes effect without a new object.
|
|
716
|
+
- 6df279e: `ViewportLayer.reproject` and `viewportsAt` are gone. They were the click-probe prototype from before views; a viewport that takes input is now a `<CanvasView>` (or a `views` entry, or `SceneCanvasApi.addView`), and the canvas routes pointer events into its camera through the gesture dispatcher. `createViewportLayer` stays as the paint primitive, and `layer.resolvable(outer, dims)` fed to `createViewResolver` is the seam for routing a raw viewport yourself — `clientToWorld(x, y, target.origin, target.view)` then lands where `reproject` did. Breaking: replace `reproject`/`viewportsAt` calls with a `<CanvasView>`, or with `createViewResolver` over the layers' `resolvable`.
|
|
717
|
+
- 09ff2c1: New `warmFonts(families?)`, additive: loads registered MSDF atlases ahead of their
|
|
718
|
+
first use and resolves once they land, the font counterpart of `warmPaintKinds`.
|
|
719
|
+
With no list it loads every family passed to `registerFont`, starting lazily
|
|
720
|
+
declared variants and joining fetches already running. It rejects when a load
|
|
721
|
+
fails, or for a family that was never registered.
|
|
722
|
+
|
|
723
|
+
`renderSceneToPixels` and a `RasterSession` render synchronously, so text set in
|
|
724
|
+
a face registered `{ lazy: true }` draws nothing until its atlas has been
|
|
725
|
+
fetched — and nothing fetches it until text first asks. `await warmFonts()`
|
|
726
|
+
before a headless render that contains text.
|
|
727
|
+
- 637945e: `warmRender` can load just what one render needs. Pass it the render,
|
|
728
|
+
`warmRender({ render: args })` with the args `renderSceneToPixels` or
|
|
729
|
+
`RasterSession.render` will take, or `{ commands }` already built. It builds
|
|
730
|
+
the commands the way the render does and loads only the font faces their text
|
|
731
|
+
is set in and the paint kinds they name. A capture no longer loads the mesh
|
|
732
|
+
chunk when it draws no mesh, and no longer fails because some unrelated lazy
|
|
733
|
+
font failed to load. It still rejects when a face the render needs fails.
|
|
734
|
+
`families` and `paintKinds` still override, and `warmRender()` with no render
|
|
735
|
+
still loads everything.
|
|
736
|
+
|
|
737
|
+
labkit's raster capture and the RenderToPixels and DebugOverlay demos now warm
|
|
738
|
+
only what they are about to render.
|
|
739
|
+
|
|
740
|
+
Additive: core exports `renderNeeds(commands)`, which returns the fonts and
|
|
741
|
+
paint kinds a command list draws with, and `debugSnapshotArgs(args)`, which
|
|
742
|
+
returns the `renderSceneToPixels` args behind `renderDebugSnapshot`.
|
|
743
|
+
`warmFonts` also takes a `FontRequest` (`{ family, weight?, style? }`, exported
|
|
744
|
+
from `@weasel-js/font` and core). A request loads what resolving that one
|
|
745
|
+
variant draws with: the exact variant, or the whole family when that variant
|
|
746
|
+
was never registered, the substitute family when the policy would swap one in,
|
|
747
|
+
and the variant's outline face. Unlike a bare family name, a request for a
|
|
748
|
+
family nothing registered resolves instead of rejecting.
|
|
749
|
+
- 5308126: `useClipboardOps`'s `produceFlavors` may now return a promise for any flavor's text (the new `ClipboardFlavors` type). The OS write is still issued inside the copy, and the clipboard takes the text once it resolves, so an SVG flavor can `await warmSvg(nodes)` before it serializes without the copy losing its gesture. Additive: a producer returning plain strings behaves as before.
|
|
750
|
+
- Updated dependencies [f457e7c]
|
|
751
|
+
- Updated dependencies [8635031]
|
|
752
|
+
- Updated dependencies [276bad1]
|
|
753
|
+
- Updated dependencies [3d80c9f]
|
|
754
|
+
- Updated dependencies [886fefd]
|
|
755
|
+
- Updated dependencies [27bcf57]
|
|
756
|
+
- Updated dependencies [a7f2103]
|
|
757
|
+
- Updated dependencies [edabd62]
|
|
758
|
+
- Updated dependencies [7be3713]
|
|
759
|
+
- Updated dependencies [b2fd89a]
|
|
760
|
+
- Updated dependencies [4212d2d]
|
|
761
|
+
- Updated dependencies [b5cc59f]
|
|
762
|
+
- Updated dependencies [1524403]
|
|
763
|
+
- Updated dependencies [3c1def2]
|
|
764
|
+
- Updated dependencies [ae6e8ac]
|
|
765
|
+
- Updated dependencies [b94d2ca]
|
|
766
|
+
- Updated dependencies [8d0493a]
|
|
767
|
+
- Updated dependencies [9cad63b]
|
|
768
|
+
- Updated dependencies [b228015]
|
|
769
|
+
- Updated dependencies [365c762]
|
|
770
|
+
- Updated dependencies [51eb721]
|
|
771
|
+
- Updated dependencies [d175c0c]
|
|
772
|
+
- Updated dependencies [3755e17]
|
|
773
|
+
- Updated dependencies [16a0476]
|
|
774
|
+
- Updated dependencies [63d0ece]
|
|
775
|
+
- Updated dependencies [dde2315]
|
|
776
|
+
- Updated dependencies [4cb55b7]
|
|
777
|
+
- Updated dependencies [fe9a91e]
|
|
778
|
+
- Updated dependencies [3a68365]
|
|
779
|
+
- Updated dependencies [351271a]
|
|
780
|
+
- Updated dependencies [59f4365]
|
|
781
|
+
- Updated dependencies [4cef954]
|
|
782
|
+
- Updated dependencies [09ff2c1]
|
|
783
|
+
- Updated dependencies [637945e]
|
|
784
|
+
- @weasel-js/geom@1.7.1
|
|
785
|
+
- @weasel-js/font@1.7.1
|
|
786
|
+
- @weasel-js/text@1.7.1
|
|
787
|
+
- @weasel-js/routing@1.7.1
|
|
788
|
+
- @weasel-js/paint@1.7.1
|
|
789
|
+
- @weasel-js/quantity@1.7.1
|
|
790
|
+
- @weasel-js/react@1.7.1
|
|
791
|
+
- @weasel-js/cursor@1.7.1
|
|
792
|
+
- @weasel-js/gestures@1.7.1
|
|
793
|
+
- @weasel-js/history@1.7.1
|
|
794
|
+
- @weasel-js/modes@1.7.1
|
|
795
|
+
- @weasel-js/registry@1.7.1
|
|
796
|
+
|
|
3
797
|
## 1.7.0
|
|
4
798
|
|
|
5
799
|
### Patch Changes
|