@weasel-js/core 0.5.1 → 0.7.0

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.
Files changed (35) hide show
  1. package/CHANGELOG.md +148 -0
  2. package/dist/{DrawCommand-Dl0bXNfS.d.ts → DrawCommand-CJtqqt8H.d.ts} +26 -2
  3. package/dist/{chunk-7V6JEOXE.js → chunk-7F3SDUJ4.js} +7884 -9167
  4. package/dist/chunk-7F3SDUJ4.js.map +1 -0
  5. package/dist/chunk-FSZEXVCR.js +171 -0
  6. package/dist/chunk-FSZEXVCR.js.map +1 -0
  7. package/dist/clone.d.ts +1 -1
  8. package/dist/geometry-D9BDMiQi.d.ts +114 -0
  9. package/dist/{grid-Cf87knjU.d.ts → grid-CaSK9bHV.d.ts} +1 -1
  10. package/dist/index-D31EADQG.d.ts +2847 -0
  11. package/dist/index.css +0 -35
  12. package/dist/index.css.map +1 -1
  13. package/dist/index.d.ts +913 -2546
  14. package/dist/index.js +2 -2
  15. package/dist/insert.d.ts +2 -2
  16. package/dist/move.d.ts +3 -3
  17. package/dist/{options-BPPBWMa7.d.ts → options-DMWeTELe.d.ts} +1 -1
  18. package/dist/{pointSnapToGrid-D7s7QmOF.d.ts → pointSnapToGrid-C3EruUwt.d.ts} +3 -54
  19. package/dist/renderer.css +0 -35
  20. package/dist/renderer.css.map +1 -1
  21. package/dist/renderer.d.ts +5 -4
  22. package/dist/renderer.js +2 -2
  23. package/dist/resize.d.ts +3 -3
  24. package/dist/routing.d.ts +10 -8
  25. package/dist/routing.js +1 -1
  26. package/dist/{types-BjUi2vA-.d.ts → types-Dcaa0tPq.d.ts} +1 -25
  27. package/dist/{registerFont-CP-wCsrz.d.ts → viewToMat3-D4lrBigW.d.ts} +2 -44
  28. package/package.json +6 -5
  29. package/dist/chunk-7V6JEOXE.js.map +0 -1
  30. package/dist/chunk-AM6ARSPN.js +0 -517
  31. package/dist/chunk-AM6ARSPN.js.map +0 -1
  32. package/dist/fitViewToBounds-evGsnR8Q.d.ts +0 -62
  33. package/dist/index-DZBYMsHI.d.ts +0 -1555
  34. package/dist/routing.css +0 -35
  35. package/dist/routing.css.map +0 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- export { ALWAYS, ActionDisabledReason, ActionsProvider, ActionsProviderIfRoot, ActiveToolContextProvider, ActiveToolContextProviderIfRoot, BUNDLE_TOOLS, CURVE_REPS, ColorOverrideRegistry, CropIcon, CursorCoordsHud, DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_DEBUG_THEME, DEFAULT_FILL_COLOR, DEFAULT_HANDLE_SIZE, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_STYLE, DEFAULT_VELOCITY_DECAY, DepRegistryProvider, DepRegistryProviderIfRoot, DivideIcon, EASINGS, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, GHOST_STROKE, HandIcon, IDENTITY_POSE_COMPOSITION, IntersectIcon, KIT_SHAPE_KINDS, LassoIcon, LineIcon, MOVE_ANCHORS, MinimapCanvas, NEVER, PenIcon, PencilIcon, PickHud, PointerProviderIfRoot, PolygonIcon, RECT_ALIGN_PROJECTION, RectIcon, SPRING_PRESETS, SceneCanvas, SceneViewCanvas, SelectIcon, SelectionContextProvider, SelectionContextProviderIfRoot, StarIcon, SubtractIcon, TextIcon, UnionIcon, UnknownIcon, WeaselProvider, aabbCenter, actionIs, alignDeltaFor, alignInsertBehavior, alignMoveBehavior, alignResizeBehavior, alignedStrokeRect, always, and, animateLifecycle, animateOnSetPose, applyBooleanOp, applyHitExistingGate, areaSelectAction, arrayAdapter, asNodeId, bezierCubic, bezierQuadratic, buildChromeCtx, buildRuleCtx, buildSceneViewCommands, canBringForward, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, caretIndexAt, cellAt, charOffsetToDomPosition, clampView, clearSelectionAction, clientToCanvas, cloneAction, composeAffordanceLayer, composePath, composeRectPose, composeSelectionPose, composeWorldPose, computeFitView, computeIndicatorCommand, computeWheelAction, cond, constrainTo45, containedThenNearest, countPathAnchors, createAnchorEditOverlayLayer, createCellHighlightLayer, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDispatcher, createGridLayer, createGuidesLayer, createHistory, createMarkdownRenderer, createMoveToIndexOp, createNodeProperties, createNodeRouting, createParallaxLayer, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createReorderOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetPathOp, createSetTextOp, createTextLayer, createToolsDispatcher, createViewportLayer, cycleVertexColors, decomposePath, decomposeRectPose, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultVisibilityRules, defineTool, deriveAlignmentGuides, deriveParallaxView, domPositionToCharOffset, domToRuns, drawLayers, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, editAnchorsAction, enterTextEditAction, enumerateAnchors, evaluate, evaluateEnabled, findNodeShape, findShapeSilhouette, fitTextPose, fitToBounds, fitViewToBounds, fitZoom, focused, fontString, forEachCoalesced, freeform, gateLayer, gesturing, getAlpha01, getImageBitmap, getNodeShapes, getStylusData, hexToRgba, hitAnchor, hitRotationHandle, hovering, hoveringSelected, imageStatus, inferredNodeProperties, inferredNodeRouting, insertAction, isCanvasFont, isEditableTarget, lassoSelectAction, layoutMarkdown, lerpColorArray, lerpOklab, lerpOklch, linear, makeViewportZoomAction, markdownToRuns, matchAlignment, matchesKeyBinding, measureText, measureTextBounds, mergeAlphaFromPrev, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nearest, nearestWithin, nestedHitTester, never, none, normalizeHex, not, nurbs, oklabToOklch, oklabToSrgbU8, oklchToOklab, openFilePicker, or, parseColor, parseColorToRgba255, parseDebugFlags, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathDistanceToPoint, pathDivide, pathExclude, pathFromD, pathInPoseFrame, pathInWorld, pathIntersect, pathIntersectsPolygon, pathIntersectsRect, pathOriginProjection, pathSubtract, pathToAnchors, pathUnion, pickTopMostHit, pinchZoomAction, planPixelRender, pointInRotatedRect, pointInTextPose, poseRotationOf, pressureToWidth, rainbowVertexColors, rebaseLocalPose, rectCorners, registerCanvasFont, registerContentHandler, registerFont, registerNodeShape, renderLabel, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveColor, resolveRuns, resolveTextStyle, resolveVisibility, rgbaToHex, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotatePoint, rotatedRectCorners, rotationDegreesUnit, rotationHandle, roundToCell, runsToDom, runsToMarkdown, runsToPlainText, sceneFromJSON, sceneNodeClientRect, sceneToAdapter, screenToWorld, selectFromLasso, selectFromMarquee, selectionAtLeast, selectionEmpty, selectionIs, sliceAction, snapPoint, solidVertexColors, spiro, splitPathByLine, splitSubpaths, springPose, springVertexColors, srgbU8ToOklab, staggerVertexColors, startThresholdDrag, subscribeGlyphReady, subscribeImageReady, textCommand, tileGrid, toHex8, toRuns, translatePoseViaDescriptor, translateRectPose, tweenPose, tweenVertexColors, unionBounds, unionBoundsPath, unregisterCanvasFont, useAction, useActionsRegistry, useActiveToolContext, useAlign, useAnimator, useArrayAdapter, useAutoCenter, useBooleans, useBooleansAdapter, useCanvasFocus, useCanvasSize, useDecayLoop, useDepRegistry, useDepSource, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGestureDispatcher, useGridCellHover, useGuides, useHandTool, useHandleDrag, useHoverTracking, useImageTool, useInsertTool, useKeybindings, useLassoTool, useLineTool, useNestedSelectTool, useOptionalActiveToolContext, useOptionalDepRegistry, usePenTool, usePencilTool, usePinchGesture, usePinchZoomTool, usePointerGestures, usePointerStylus, usePolygonTool, usePublishSelection, useRectTool, useResizePolicy, useRotateTool, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSelectionContext, useSimulation, useSliceDep, useStandardActions, useStarTool, useTextEdit, useTextTool, useTools, useVelocityTracker, useViewAnimation, useViewTween, useZoom, verticalAlignOffset, viewToMat3, viewToTransform, viewportDragPanAction, viewportZoomAction, when, withAlpha01, withCoord, worldEditToStorage, worldPoseLookup, worldToScreen, zoomAt, zoomAtLeast } from './chunk-7V6JEOXE.js';
2
- export { routing_exports as routing } from './chunk-AM6ARSPN.js';
1
+ export { ALWAYS, ActionDisabledReason, ActionsProvider, ActionsProviderIfRoot, ActiveToolContextProvider, ActiveToolContextProviderIfRoot, BUNDLE_TOOLS, CURVE_REPS, ColorOverrideRegistry, CropIcon, CursorCoordsHud, DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_DEBUG_THEME, DEFAULT_FILL_COLOR, DEFAULT_HANDLE_SIZE, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_STYLE, DEFAULT_VELOCITY_DECAY, DepRegistryProvider, DepRegistryProviderIfRoot, DivideIcon, EASINGS, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, GHOST_STROKE, HandIcon, IDENTITY_POSE_COMPOSITION, IntersectIcon, KIT_SHAPE_KINDS, LassoIcon, LineIcon, MIXED, MOVE_ANCHORS, MinimapCanvas, NEVER, PenIcon, PencilIcon, PickHud, PointerProviderIfRoot, PolygonIcon, RECT_ALIGN_PROJECTION, RectIcon, SPRING_PRESETS, SceneCanvas, SceneViewCanvas, SelectIcon, SelectionContextProvider, SelectionContextProviderIfRoot, StarIcon, SubtractIcon, TextIcon, UnionIcon, UnknownIcon, WeaselProvider, aabbCenter, actionIs, alignDeltaFor, alignInsertBehavior, alignMoveBehavior, alignResizeBehavior, alignedStrokeRect, always, and, animateLifecycle, animateOnSetPose, applyBooleanOp, applyHitExistingGate, applyStyleToRange, areaSelectAction, arrayAdapter, asNodeId, bezierCubic, bezierQuadratic, buildChromeCtx, buildRuleCtx, buildSceneViewCommands, canBringForward, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, caretIndexAt, cellAt, charOffsetToDomPosition, clampView, clearSelectionAction, clientToCanvas, cloneAction, composeAffordanceLayer, composePath, composeRectPose, composeSelectionPose, composeWorldPose, computeFitView, computeIndicatorCommand, computeWheelAction, cond, constrainTo45, containedThenNearest, countPathAnchors, createCellHighlightLayer, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDispatcher, createGridLayer, createGuidesLayer, createHistory, createMarkdownRenderer, createMoveToIndexOp, createNodeProperties, createNodeRouting, createParallaxLayer, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createReorderOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetPathOp, createSetTextOp, createTextLayer, createViewportLayer, cycleVertexColors, decomposePath, decomposeRectPose, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultVisibilityRules, deriveAlignmentGuides, deriveParallaxView, describeRule, domPositionToCharOffset, domToRuns, drawLayers, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, editAnchorsAction, enterTextEditAction, enumerateAnchors, evaluate, evaluateEnabled, findNodeShape, findShapeSilhouette, fitTextPose, fitToBounds, fitViewToBounds, fitZoom, focused, fontString, forEachCoalesced, freeform, gateLayer, gesturing, getAlpha01, getImageBitmap, getNodeShapes, getStylusData, hexToRgba, hitAnchor, hitRotationHandle, hovering, hoveringSelected, imageStatus, inferredNodeProperties, inferredNodeRouting, insertAction, isCanvasFont2 as isCanvasFont, isEditableTarget, lassoSelectAction, layoutMarkdown, lerpColorArray, lerpOklab, lerpOklch, linear, makeViewportZoomAction, markdownToRuns, matchAlignment, matchesKeyBinding, measureText, measureTextBounds, measuredWidth, mergeAlphaFromPrev, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nearest, nearestWithin, nestedHitTester, never, none, normalizeHex, not, nurbs, oklabToOklch, oklabToSrgbU8, oklchToOklab, openFilePicker, or, parseColor, parseColorToRgba255, parseDebugFlags, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathDistanceToPoint, pathDivide, pathExclude, pathFromD, pathInPoseFrame, pathInWorld, pathIntersect, pathIntersectsPolygon, pathIntersectsRect, pathOriginProjection, pathSubtract, pathToAnchors, pathUnion, pickTopMostHit, pinchZoomAction, planPixelRender, pointInRotatedRect, pointInTextPose, poseRotationOf, pressureToWidth, rainbowVertexColors, rebaseLocalPose, rectCorners, registerCanvasFont2 as registerCanvasFont, registerContentHandler, registerFont2 as registerFont, registerNodeShape, renderLabel, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveColor, resolveRuns, resolveTextStyle, resolveVisibility, rgbaToHex, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotatePoint, rotatedRectCorners, rotationDegreesUnit, rotationHandle, roundToCell, runsToDom, runsToMarkdown, runsToPlainText, sceneFromJSON, sceneNodeClientRect, sceneToAdapter, screenToWorld, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, sliceAction, snapPoint, solidVertexColors, specificity, spiro, splitPathByLine, splitSubpaths, springPose, springVertexColors, srgbU8ToOklab, staggerVertexColors, startThresholdDrag, styleAtRange, subscribeGlyphReady2 as subscribeGlyphReady, subscribeImageReady, textCommand, tileGrid, toHex8, toRuns, translatePoseViaDescriptor, translateRectPose, tweenPose, tweenVertexColors, unionBounds, unionBoundsPath, unregisterCanvasFont2 as unregisterCanvasFont, useAction, useActionsRegistry, useActiveToolContext, useAlign, useAnimator, useArrayAdapter, useAutoCenter, useBooleans, useBooleansAdapter, useCanvasFocus, useCanvasSize, useDecayLoop, useDepRegistry, useDepSource, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGestureDispatcher, useGridCellHover, useGuides, useHandTool, useHandleDrag, useHoverTracking, useImageTool, useKeybindings, useLassoTool, useLineTool, useOptionalActiveToolContext, useOptionalDepRegistry, usePenTool, usePencilTool, usePinchGesture, usePinchZoomTool, usePointerStylus, usePolygonTool, usePublishSelection, useRectTool, useResizePolicy, useRotateTool, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSelectionContext, useSimulation, useSliceDep, useStandardActions, useStarTool, useTextEdit, useTextTool, useTools, useVelocityTracker, useViewAnimation, useViewTween, useZoom, verticalAlignOffset, viewToMat3, viewToTransform, viewportDragPanAction, viewportZoomAction, when, withAlpha01, withCoord, worldEditToStorage, worldPoseLookup, worldToScreen, zoomAt, zoomAtLeast } from './chunk-7F3SDUJ4.js';
2
+ export { routing_exports as routing } from './chunk-FSZEXVCR.js';
3
3
  export { createReparentOp, createTransformOp, deleteScratch, getScratch, scratchKey, setScratch, snap } from './chunk-VOVKONXA.js';
4
4
  export { CORNER_ANCHORS, cornerPoint, cornerResizeHandles, hitCornerHandle, pointSnapToGrid } from './chunk-BGGZ4CVF.js';
5
5
  export { DEFAULT_FLATTEN_TOLERANCE, DEFAULT_GUIDE_TOLERANCE_PX, IMPERIAL_INCHES, METRIC_MM, PATH_C, PATH_CMD_LENGTHS, PATH_L, PATH_M, PATH_Q, PATH_Z, PIXELS, PathBuilder, RECT_ORIGIN_PROJECTION, RECT_POSE_DESCRIPTOR, ROTATED_POSE_DESCRIPTOR, boundsOfPath, ellipsePath, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, formatUnit, gridSnapStrategy, guideSnapStrategy, linePath, meanScale, pathPoseDescriptor, pointInPath, pointToGridCell, polygonFromPoints, rectPath, regularPolygonPath, resolveUnit, scalePathToBounds, starPath, transformPath, translatePath, translatePolygonInPlace } from './chunk-CQNKCG34.js';
package/dist/insert.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export { U as UseInsertOptions } from './options-BPPBWMa7.js';
2
- import { M as ModifierState, I as InsertBehavior } from './types-BjUi2vA-.js';
1
+ export { U as UseInsertOptions } from './options-DMWeTELe.js';
2
+ import { M as ModifierState, I as InsertBehavior } from './types-Dcaa0tPq.js';
3
3
  import { G as Guide } from './types-D2tTKEU0.js';
4
4
  import { V as View } from './view-DSQgxBJB.js';
5
5
  import '@weasel-js/history';
package/dist/move.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { O as OriginProjection } from './grid-Cf87knjU.js';
2
- export { U as UseMoveOptions } from './grid-Cf87knjU.js';
3
- import { M as ModifierState, a as MoveBehavior } from './types-BjUi2vA-.js';
1
+ import { O as OriginProjection } from './grid-CaSK9bHV.js';
2
+ export { U as UseMoveOptions } from './grid-CaSK9bHV.js';
3
+ import { M as ModifierState, b as MoveBehavior } from './types-Dcaa0tPq.js';
4
4
  import { S as SnapTarget } from './types-B_-khFM0.js';
5
5
  import { G as Guide } from './types-D2tTKEU0.js';
6
6
  import { V as View } from './view-DSQgxBJB.js';
@@ -1,5 +1,5 @@
1
1
  import { Op } from '@weasel-js/history';
2
- import { I as InsertBehavior, R as ResizePose } from './types-BjUi2vA-.js';
2
+ import { I as InsertBehavior, R as ResizePose } from './types-Dcaa0tPq.js';
3
3
 
4
4
  /** Option surface for the `insert` action.
5
5
  *
@@ -1,58 +1,7 @@
1
- import { R as ResizePose, b as RotatedPose, c as ResizeAnchor, B as BoundsConstraint, P as PointSnapBehavior, d as PointSnapFrame, M as ModifierState } from './types-BjUi2vA-.js';
2
- import { B as Bounds } from './fitViewToBounds-evGsnR8Q.js';
1
+ import { c as ResizeAnchor, R as ResizePose, B as BoundsConstraint, P as PointSnapBehavior, d as PointSnapFrame, M as ModifierState } from './types-Dcaa0tPq.js';
2
+ import { B as Bounds, P as PoseProjection } from './geometry-D9BDMiQi.js';
3
3
  import { D as DebugSink } from './types-BJ8_cyT7.js';
4
4
 
5
- /**
6
- * Bridges arbitrary `TPose` shapes into the resize hook's bounds-driven math.
7
- * The hook reads bounds via `getBounds`, runs anchor-relative math on those
8
- * bounds, then asks `remapBounds` to project the result back into TPose.
9
- *
10
- * `remapBounds(pose, src, dst)` is a single operation that subsumes both
11
- * "set my own AABB to dst" (single-leaf resize) and "scale me as a leaf
12
- * inside parent's src→dst rect" (group resize) — they're the same affine
13
- * map. For rect-shaped poses the default geometry interprets the pose as
14
- * its own bounds; for Path or polygon poses the consumer supplies a
15
- * projection that knows how to read and rewrite the underlying geometry.
16
- */
17
- interface PoseProjection<TPose> {
18
- getBounds(pose: TPose): ResizePose;
19
- remapBounds(pose: TPose, src: ResizePose, dst: ResizePose): TPose;
20
- /** Translate the pose by (dx, dy). Optional — when omitted, callers fall
21
- * back to a translation derived from `remapBounds` (origin shifted, no
22
- * scale). Path-shaped poses should provide this for performance. */
23
- translate?(pose: TPose, dx: number, dy: number): TPose;
24
- /** True iff any portion of the pose's geometry intersects `rect`. Optional
25
- * — when omitted, area-select and similar callers test against `getBounds`
26
- * AABB (looser, but correct for axis-aligned rect poses). */
27
- intersectsRect?(pose: TPose, rect: ResizePose): boolean;
28
- /** Interpolate between two poses. Optional — animation helpers fall back to
29
- * rect-shape lerp when omitted (which fails for non-rect poses). */
30
- lerp?(a: TPose, b: TPose, t: number): TPose;
31
- /** Read the pose's rotation in radians. Pivot is the AABB center
32
- * (`getBounds(pose)` center). Default 0 when omitted — descriptor
33
- * declares "this pose has no rotation." When supplied and non-zero,
34
- * `useResize` projects the drag delta into the leaf's local frame,
35
- * runs anchor math there, and translates the resulting pose so the
36
- * diagonally opposite world-space corner is pinned. */
37
- getRotation?(pose: TPose): number;
38
- /** True iff this pose shape can carry a rotation. Consulted by the
39
- * rotation affordance to decide whether to render the rotate cursor /
40
- * drag-band over a selection. When omitted, the kit assumes `true` for
41
- * back-compat — descriptors whose poses lack `x/y/width/height/rotation`
42
- * fields (e.g. polygon Paths) should return `false` so the affordance
43
- * hides instead of exposing a non-functional rotate cursor. */
44
- supportsRotation?(pose: TPose): boolean;
45
- }
46
- /** Identity geometry for `TPose extends ResizePose`. Treats the pose as its
47
- * own bounds and remaps via affine scale against `src`/`dst`. */
48
- declare const RECT_POSE_DESCRIPTOR: PoseProjection<ResizePose>;
49
- /** Identity geometry for `RotatedPose`. Inherits rect-shape projection
50
- * from `RECT_POSE_DESCRIPTOR` (the `RotatedPose extends ResizePose`
51
- * subtype lets the rect descriptor's methods apply directly; `remapBounds`
52
- * preserves the `rotation` field via `...p` spread). Adds `getRotation` so
53
- * `useResize` knows to take the rotation-aware math path. */
54
- declare const ROTATED_POSE_DESCRIPTOR: PoseProjection<RotatedPose>;
55
-
56
5
  /** Corner resize-handle: world-space center plus the anchor that pins the opposite corner during resize. */
57
6
  interface CornerHandle {
58
7
  cx: number;
@@ -182,4 +131,4 @@ declare function pointSnapToGrid<TPose extends ResizePose>(args: {
182
131
  bypassKey?: keyof ModifierState;
183
132
  }): PointSnapBehavior<TPose>;
184
133
 
185
- export { CORNER_ANCHORS as C, type PoseProjection as P, RECT_POSE_DESCRIPTOR as R, type UseResizeOptions as U, type CornerAnchor as a, type CornerHandle as b, ROTATED_POSE_DESCRIPTOR as c, cornerPoint as d, cornerResizeHandles as e, fixedCornerOf as f, type CornerEdge as g, hitCornerHandle as h, pointSnapToGrid as p };
134
+ export { CORNER_ANCHORS as C, type UseResizeOptions as U, type CornerAnchor as a, type CornerHandle as b, cornerPoint as c, cornerResizeHandles as d, type CornerEdge as e, fixedCornerOf as f, hitCornerHandle as h, pointSnapToGrid as p };
package/dist/renderer.css CHANGED
@@ -1,38 +1,3 @@
1
- /* src/tools/routing/reflection/ToolDebugOverlay.module.css */
2
- .overlay {
3
- position: absolute;
4
- bottom: 12px;
5
- right: 12px;
6
- min-width: 180px;
7
- padding: 8px 10px;
8
- background: rgba(20, 20, 24, 0.86);
9
- color: #eaeaea;
10
- font:
11
- 11px/1.4 ui-monospace,
12
- "SF Mono",
13
- Menlo,
14
- monospace;
15
- border: 1px solid rgba(255, 255, 255, 0.1);
16
- border-radius: 4px;
17
- pointer-events: none;
18
- user-select: none;
19
- }
20
- .row {
21
- display: flex;
22
- justify-content: space-between;
23
- gap: 12px;
24
- }
25
- .label {
26
- color: #888;
27
- }
28
- .value {
29
- color: #f5f5f5;
30
- }
31
- .empty {
32
- color: #888;
33
- font-style: italic;
34
- }
35
-
36
1
  /* src/canvas/PickHud.module.css */
37
2
  .hud {
38
3
  position: fixed;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/tools/routing/reflection/ToolDebugOverlay.module.css","../src/canvas/PickHud.module.css","../src/canvas/ModalityHud.module.css"],"sourcesContent":["/* src/tools/routing/reflection/ToolDebugOverlay.module.css */\n.overlay {\n position: absolute;\n bottom: 12px;\n right: 12px;\n min-width: 180px;\n padding: 8px 10px;\n background: rgba(20, 20, 24, 0.86);\n color: #eaeaea;\n font: 11px/1.4 ui-monospace, \"SF Mono\", Menlo, monospace;\n border: 1px solid rgba(255, 255, 255, 0.1);\n border-radius: 4px;\n pointer-events: none;\n user-select: none;\n}\n\n.row {\n display: flex;\n justify-content: space-between;\n gap: 12px;\n}\n\n.label {\n color: #888;\n}\n\n.value {\n color: #f5f5f5;\n}\n\n.empty {\n color: #888;\n font-style: italic;\n}\n",".hud {\n position: fixed;\n z-index: 10000;\n background: rgba(0, 0, 0, 0.7);\n color: #e8e8e8;\n font: 11px ui-monospace, SFMono-Regular, Menlo, monospace;\n padding: 6px 8px;\n border-radius: 4px;\n pointer-events: none;\n line-height: 1.4;\n text-align: right;\n min-width: 120px;\n max-width: 260px;\n}\n\n.header {\n color: #888;\n margin-bottom: 2px;\n}\n\n.empty {\n color: #888;\n font-style: italic;\n}\n\n.list {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 1px;\n}\n\n.item {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.itemBest {\n font-weight: 700;\n}\n",".hud {\n position: fixed;\n z-index: 10000;\n background: rgba(0, 0, 0, 0.7);\n color: #e8e8e8;\n font: 11px ui-monospace, SFMono-Regular, Menlo, monospace;\n padding: 6px 8px;\n border-radius: 4px;\n pointer-events: none;\n line-height: 1.4;\n text-align: right;\n min-width: 120px;\n max-width: 260px;\n}\n\n.row {\n display: flex;\n gap: 8px;\n justify-content: flex-end;\n white-space: nowrap;\n}\n\n.label {\n color: #888;\n}\n\n.value {\n color: #e8e8e8;\n}\n\n.valueMuted {\n color: #888;\n font-style: italic;\n}\n\n.stack {\n display: flex;\n flex-direction: column;\n gap: 0;\n align-items: flex-end;\n}\n"],"mappings":";AACA,CAAC;AACC,YAAU;AACV,UAAQ;AACR,SAAO;AACP,aAAW;AACX,WAAS,IAAI;AACb,cAAY,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;AAC7B,SAAO;AACP;AAAA,IAAM,IAAI,CAAC,IAAI,YAAY;AAAA,IAAE,SAAS;AAAA,IAAE,KAAK;AAAA,IAAE;AAC/C,UAAQ,IAAI,MAAM,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;AACtC,iBAAe;AACf,kBAAgB;AAChB,eAAa;AACf;AAEA,CAAC;AACC,WAAS;AACT,mBAAiB;AACjB,OAAK;AACP;AAEA,CAAC;AACC,SAAO;AACT;AAEA,CAAC;AACC,SAAO;AACT;AAEA,CAAC;AACC,SAAO;AACP,cAAY;AACd;;;ACjCA,CAAC;AACC,YAAU;AACV,WAAS;AACT,cAAY,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AAC1B,SAAO;AACP;AAAA,IAAM,KAAK,YAAY;AAAA,IAAE,cAAc;AAAA,IAAE,KAAK;AAAA,IAAE;AAChD,WAAS,IAAI;AACb,iBAAe;AACf,kBAAgB;AAChB,eAAa;AACb,cAAY;AACZ,aAAW;AACX,aAAW;AACb;AAEA,CAAC;AACC,SAAO;AACP,iBAAe;AACjB;AAEA,CAAC;AACC,SAAO;AACP,cAAY;AACd;AAEA,CAAC;AACC,cAAY;AACZ,UAAQ;AACR,WAAS;AACT,WAAS;AACT,kBAAgB;AAChB,OAAK;AACP;AAEA,CAAC;AACC,eAAa;AACb,YAAU;AACV,iBAAe;AACjB;AAEA,CAAC;AACC,eAAa;AACf;;;AC1CA,CAAC;AACC,YAAU;AACV,WAAS;AACT,cAAY,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AAC1B,SAAO;AACP;AAAA,IAAM,KAAK,YAAY;AAAA,IAAE,cAAc;AAAA,IAAE,KAAK;AAAA,IAAE;AAChD,WAAS,IAAI;AACb,iBAAe;AACf,kBAAgB;AAChB,eAAa;AACb,cAAY;AACZ,aAAW;AACX,aAAW;AACb;AAEA,CAAC;AACC,WAAS;AACT,OAAK;AACL,mBAAiB;AACjB,eAAa;AACf;AAEA,CAAC;AACC,SAAO;AACT;AAEA,CAAC;AACC,SAAO;AACT;AAEA,CAAC;AACC,SAAO;AACP,cAAY;AACd;AAEA,CAAC;AACC,WAAS;AACT,kBAAgB;AAChB,OAAK;AACL,eAAa;AACf;","names":[]}
1
+ {"version":3,"sources":["../src/canvas/PickHud.module.css","../src/canvas/ModalityHud.module.css"],"sourcesContent":[".hud {\n position: fixed;\n z-index: 10000;\n background: rgba(0, 0, 0, 0.7);\n color: #e8e8e8;\n font: 11px ui-monospace, SFMono-Regular, Menlo, monospace;\n padding: 6px 8px;\n border-radius: 4px;\n pointer-events: none;\n line-height: 1.4;\n text-align: right;\n min-width: 120px;\n max-width: 260px;\n}\n\n.header {\n color: #888;\n margin-bottom: 2px;\n}\n\n.empty {\n color: #888;\n font-style: italic;\n}\n\n.list {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 1px;\n}\n\n.item {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.itemBest {\n font-weight: 700;\n}\n",".hud {\n position: fixed;\n z-index: 10000;\n background: rgba(0, 0, 0, 0.7);\n color: #e8e8e8;\n font: 11px ui-monospace, SFMono-Regular, Menlo, monospace;\n padding: 6px 8px;\n border-radius: 4px;\n pointer-events: none;\n line-height: 1.4;\n text-align: right;\n min-width: 120px;\n max-width: 260px;\n}\n\n.row {\n display: flex;\n gap: 8px;\n justify-content: flex-end;\n white-space: nowrap;\n}\n\n.label {\n color: #888;\n}\n\n.value {\n color: #e8e8e8;\n}\n\n.valueMuted {\n color: #888;\n font-style: italic;\n}\n\n.stack {\n display: flex;\n flex-direction: column;\n gap: 0;\n align-items: flex-end;\n}\n"],"mappings":";AAAA,CAAC;AACC,YAAU;AACV,WAAS;AACT,cAAY,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AAC1B,SAAO;AACP;AAAA,IAAM,KAAK,YAAY;AAAA,IAAE,cAAc;AAAA,IAAE,KAAK;AAAA,IAAE;AAChD,WAAS,IAAI;AACb,iBAAe;AACf,kBAAgB;AAChB,eAAa;AACb,cAAY;AACZ,aAAW;AACX,aAAW;AACb;AAEA,CAAC;AACC,SAAO;AACP,iBAAe;AACjB;AAEA,CAAC;AACC,SAAO;AACP,cAAY;AACd;AAEA,CAAC;AACC,cAAY;AACZ,UAAQ;AACR,WAAS;AACT,WAAS;AACT,kBAAgB;AAChB,OAAK;AACP;AAEA,CAAC;AACC,eAAa;AACb,YAAU;AACV,iBAAe;AACjB;AAEA,CAAC;AACC,eAAa;AACf;;;AC1CA,CAAC;AACC,YAAU;AACV,WAAS;AACT,cAAY,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AAC1B,SAAO;AACP;AAAA,IAAM,KAAK,YAAY;AAAA,IAAE,cAAc;AAAA,IAAE,KAAK;AAAA,IAAE;AAChD,WAAS,IAAI;AACb,iBAAe;AACf,kBAAgB;AAChB,eAAa;AACb,cAAY;AACZ,aAAW;AACX,aAAW;AACb;AAEA,CAAC;AACC,WAAS;AACT,OAAK;AACL,mBAAiB;AACjB,eAAa;AACf;AAEA,CAAC;AACC,SAAO;AACT;AAEA,CAAC;AACC,SAAO;AACT;AAEA,CAAC;AACC,SAAO;AACP,cAAY;AACd;AAEA,CAAC;AACC,WAAS;AACT,kBAAgB;AAChB,OAAK;AACL,eAAa;AACf;","names":[]}
@@ -1,8 +1,9 @@
1
- import { I as ImageMinification, G as GLImageCache } from './registerFont-CP-wCsrz.js';
2
- export { V as ViewLike, i as isCanvasFont, r as registerCanvasFont, a as registerFont, s as subscribeGlyphReady, u as unregisterCanvasFont, v as viewToMat3 } from './registerFont-CP-wCsrz.js';
3
- import { G as GradStop, M as Mat3, S as ShaderProgramHandle, D as DrawCommand, a as Stroke } from './DrawCommand-Dl0bXNfS.js';
4
- export { b as GroupDrawCommand, I as ImageDrawCommand, P as PathDrawCommand, c as ShaderDrawCommand, d as ShaderUniform, e as SolidPaint, T as TextDrawCommand, m as mat3, r as registerProgram } from './DrawCommand-Dl0bXNfS.js';
1
+ import { I as ImageMinification, G as GLImageCache } from './viewToMat3-D4lrBigW.js';
2
+ export { V as ViewLike, v as viewToMat3 } from './viewToMat3-D4lrBigW.js';
3
+ import { G as GradStop, M as Mat3, S as ShaderProgramHandle, D as DrawCommand, a as Stroke } from './DrawCommand-CJtqqt8H.js';
4
+ export { b as GroupDrawCommand, I as ImageDrawCommand, P as PathDrawCommand, c as ShaderDrawCommand, d as ShaderUniform, e as SolidPaint, T as TextDrawCommand, m as mat3, r as registerProgram } from './DrawCommand-CJtqqt8H.js';
5
5
  import { P as Path } from './types-B6MMiodD.js';
6
+ export { isCanvasFont, registerCanvasFont, registerFont, subscribeGlyphReady, unregisterCanvasFont } from '@weasel-js/font';
6
7
  export { T as TextureHandle, r as registerTexture } from './registerTexture-BzHTLhD9.js';
7
8
 
8
9
  /**
package/dist/renderer.js CHANGED
@@ -1,5 +1,5 @@
1
- export { IDENTITY_COLOR_MATRIX, ShaderCompileError, WeaselRenderer, buildGradientRamp, isCanvasFont, mat3, registerCanvasFont, registerFont, registerProgram, subscribeGlyphReady, tessellate, tessellateStroke, unregisterCanvasFont, viewToMat3 } from './chunk-7V6JEOXE.js';
2
- import './chunk-AM6ARSPN.js';
1
+ export { IDENTITY_COLOR_MATRIX, ShaderCompileError, WeaselRenderer, buildGradientRamp, isCanvasFont, mat3, registerCanvasFont, registerFont, registerProgram, subscribeGlyphReady, tessellate, tessellateStroke, unregisterCanvasFont, viewToMat3 } from './chunk-7F3SDUJ4.js';
2
+ import './chunk-FSZEXVCR.js';
3
3
  import './chunk-VOVKONXA.js';
4
4
  import './chunk-BGGZ4CVF.js';
5
5
  import './chunk-CQNKCG34.js';
package/dist/resize.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export { C as CORNER_ANCHORS, a as CornerAnchor, b as CornerHandle, P as PoseProjection, R as RECT_POSE_DESCRIPTOR, c as ROTATED_POSE_DESCRIPTOR, U as UseResizeOptions, d as cornerPoint, e as cornerResizeHandles, f as fixedCornerOf, h as hitCornerHandle, p as pointSnapToGrid } from './pointSnapToGrid-D7s7QmOF.js';
2
- import { R as ResizePose, B as BoundsConstraint, M as ModifierState } from './types-BjUi2vA-.js';
1
+ export { C as CORNER_ANCHORS, a as CornerAnchor, b as CornerHandle, U as UseResizeOptions, c as cornerPoint, d as cornerResizeHandles, f as fixedCornerOf, h as hitCornerHandle, p as pointSnapToGrid } from './pointSnapToGrid-C3EruUwt.js';
2
+ export { P as PoseProjection, R as RECT_POSE_DESCRIPTOR, a as ROTATED_POSE_DESCRIPTOR } from './geometry-D9BDMiQi.js';
3
+ import { R as ResizePose, B as BoundsConstraint, M as ModifierState } from './types-Dcaa0tPq.js';
3
4
  import { G as Guide } from './types-D2tTKEU0.js';
4
5
  import { V as View } from './view-DSQgxBJB.js';
5
- import './fitViewToBounds-evGsnR8Q.js';
6
6
  import './types-BJ8_cyT7.js';
7
7
  import '@weasel-js/history';
8
8
  import './types-B_-khFM0.js';
package/dist/routing.d.ts CHANGED
@@ -1,14 +1,16 @@
1
- export { N as ActionFn, Q as AffordanceHit, V as BeginSpec, X as Conflict, Y as EmptyHit, Z as HitResult, _ as ModifierRoute, $ as NodeHit, a0 as NodeRef, a1 as NodeRefHit, a2 as PhaseDef, a3 as RegistryEntry, a4 as Result, a5 as RouteEntry, a6 as RouteGesture, a7 as RoutePhase, a8 as RouteResolvedInfo, a9 as RouteTable, aa as ToolDebugOverlay, ab as ToolDebugOverlayProps, ac as ToolDef, f as ToolKeybinding, ad as ViewportPhaseDef, ae as ViewportToolDef, af as apply, ag as begin, ah as buildActionRegistry, ai as cancel, aj as claim, ak as commit, al as defineTool, am as defineViewportTool, an as findConflicts, ao as formatRouteResolved, ap as forwardActionTo, aq as hold, ar as none, as as resolveRoute, at as useToolDebugInfo } from './index-DZBYMsHI.js';
2
- export { ChannelRef, DescribeRouteOptions, GESTURE_DESCRIPTORS, GestureArgSpec, GestureDescriptor, GestureName, ModRequirement, ModifierCombo, ModifierKey, ParsedModifiers, ParsedRoute, PhaseAtom, RESERVED_ID_NAMES, RESERVED_ID_PREFIXES, ROUTE_FIELD_DEFINITIONS, ROUTE_TERMS, RouteDescriptionPart, RouteFieldName, RouteTermLabel, canonicalModifiers, collapseShiftPairs, describeRoute, describeRouteParts, formatPhaseAtom, formatRoute, getGestureDescriptor, isKnownGestureName, mods, parseRoute } from '@weasel-js/gestures';
1
+ export { aW as Conflict, aX as PREDICATE_TARGET, aY as RegistryEntry, aZ as ToolDef, k as ToolKeybinding, a_ as ViewportToolDef, a$ as buildRouteRegistry, b0 as defineTool, b1 as defineViewportTool, b2 as findConflicts } from './index-D31EADQG.js';
2
+ export { ChannelRef, DescribeRouteOptions, GESTURE_DESCRIPTORS, GestureArgSpec, GestureDescriptor, GestureName, ModRequirement, ModifierKey, ParsedModifiers, ParsedRoute, PhaseAtom, RESERVED_ID_NAMES, RESERVED_ID_PREFIXES, ROUTE_FIELD_DEFINITIONS, ROUTE_TERMS, RouteDescriptionPart, RouteFieldName, RouteTermLabel, canonicalModifiers, collapseShiftPairs, describeRoute, describeRouteParts, formatPhaseAtom, formatRoute, getGestureDescriptor, isKnownGestureName, parseRoute } from '@weasel-js/gestures';
3
3
  import './types-Cpb4hii1.js';
4
4
  import '@weasel-js/history';
5
5
  import './types-B6MMiodD.js';
6
- import 'react';
7
- import './view-DSQgxBJB.js';
8
- import './types-BjUi2vA-.js';
6
+ import './types-Dcaa0tPq.js';
9
7
  import './types-B_-khFM0.js';
10
- import './fitViewToBounds-evGsnR8Q.js';
11
- import './DrawCommand-Dl0bXNfS.js';
8
+ import './view-DSQgxBJB.js';
9
+ import '@weasel-js/modes';
10
+ import 'react';
11
+ import './DrawCommand-CJtqqt8H.js';
12
12
  import './registerTexture-BzHTLhD9.js';
13
+ import 'react/jsx-runtime';
14
+ import './geometry-D9BDMiQi.js';
15
+ import '@weasel-js/geom';
13
16
  import './types-BJ8_cyT7.js';
14
- import '@weasel-js/modes';
package/dist/routing.js CHANGED
@@ -1,4 +1,4 @@
1
- export { GESTURE_DESCRIPTORS, RESERVED_ID_NAMES, RESERVED_ID_PREFIXES, ROUTE_FIELD_DEFINITIONS, ROUTE_TERMS, ToolDebugOverlay, apply, begin, buildActionRegistry, cancel, canonicalModifiers, claim, collapseShiftPairs, commit, defineTool, defineViewportTool, describeRoute, describeRouteParts, findConflicts, formatPhaseAtom, formatRoute, formatRouteResolved, forwardActionTo, getGestureDescriptor, hold, isKnownGestureName, mods, none, parseRoute, resolveRoute, useToolDebugInfo } from './chunk-AM6ARSPN.js';
1
+ export { GESTURE_DESCRIPTORS, PREDICATE_TARGET, RESERVED_ID_NAMES, RESERVED_ID_PREFIXES, ROUTE_FIELD_DEFINITIONS, ROUTE_TERMS, buildRouteRegistry, canonicalModifiers, collapseShiftPairs, defineTool, defineViewportTool, describeRoute, describeRouteParts, findConflicts, formatPhaseAtom, formatRoute, getGestureDescriptor, isKnownGestureName, parseRoute } from './chunk-FSZEXVCR.js';
2
2
  import './chunk-PZ5AY32C.js';
3
3
  //# sourceMappingURL=routing.js.map
4
4
  //# sourceMappingURL=routing.js.map
@@ -217,30 +217,6 @@ interface InsertOverlay<TPose> {
217
217
  /** TPose constructed from `bounds` via the hook's `posefromBounds`. */
218
218
  pose: TPose;
219
219
  }
220
- /** Pose carried through area-select gestures: the world point under the
221
- * cursor at gesture start, plus the shift-key state at start. */
222
- interface AreaSelectPose {
223
- worldX: number;
224
- worldY: number;
225
- shiftHeld: boolean;
226
- }
227
- /** Per-frame proposed area-select state: start point, current point, and shift policy. */
228
- interface AreaSelectProposed {
229
- start: {
230
- worldX: number;
231
- worldY: number;
232
- };
233
- current: {
234
- worldX: number;
235
- worldY: number;
236
- };
237
- shiftHeld: boolean;
238
- }
239
- /** onMove for area-select doesn't shape ops; behaviors only need to react in
240
- * onEnd. We return void from onMove. */
241
- type AreaSelectMoveResult = void;
242
- /** A behavior plugged into `useAreaSelect`. */
243
- type AreaSelectBehavior = ActionBehavior<AreaSelectPose, AreaSelectProposed, AreaSelectMoveResult>;
244
220
  /** Live overlay state exposed by `useAreaSelect` for rendering the marquee. */
245
221
  interface AreaSelectOverlay {
246
222
  start: {
@@ -352,4 +328,4 @@ interface CloneBehavior {
352
328
  }) => Op[];
353
329
  }
354
330
 
355
- export type { ActionBehavior as A, BoundsConstraint as B, CloneBehavior as C, ResizeMoveResult as D, ResizeOverlay as E, ResizeProposed as F, GestureContext as G, RotateMoveResult as H, InsertBehavior as I, RotateOverlay as J, RotateProposed as K, LassoSelectBehavior as L, ModifierState as M, PointSnapBehavior as P, ResizePose as R, SnapStrategy as S, MoveBehavior as a, RotatedPose as b, ResizeAnchor as c, PointSnapFrame as d, RotateBehavior as e, AreaSelectBehavior as f, AreaSelectMoveResult as g, AreaSelectOverlay as h, AreaSelectPose as i, AreaSelectProposed as j, BehaviorMoveResult as k, BehaviorResult as l, CloneLayer as m, ClonePose as n, GroupTransform as o, InsertMoveResult as p, InsertOverlay as q, InsertPoint as r, InsertProposed as s, LassoSelectMoveResult as t, LassoSelectOverlay as u, LassoSelectPose as v, LassoSelectProposed as w, PointSnapContext as x, PointSnapResult as y, PointerState as z };
331
+ export type { ActionBehavior as A, BoundsConstraint as B, CloneBehavior as C, RotateOverlay as D, RotateProposed as E, GestureContext as G, InsertBehavior as I, LassoSelectBehavior as L, ModifierState as M, PointSnapBehavior as P, ResizePose as R, SnapStrategy as S, RotatedPose as a, MoveBehavior as b, ResizeAnchor as c, PointSnapFrame as d, RotateBehavior as e, AreaSelectOverlay as f, BehaviorMoveResult as g, BehaviorResult as h, CloneLayer as i, ClonePose as j, GroupTransform as k, InsertMoveResult as l, InsertOverlay as m, InsertPoint as n, InsertProposed as o, LassoSelectMoveResult as p, LassoSelectOverlay as q, LassoSelectPose as r, LassoSelectProposed as s, PointSnapContext as t, PointSnapResult as u, PointerState as v, ResizeMoveResult as w, ResizeOverlay as x, ResizeProposed as y, RotateMoveResult as z };
@@ -1,4 +1,4 @@
1
- import { M as Mat3 } from './DrawCommand-Dl0bXNfS.js';
1
+ import { M as Mat3 } from './DrawCommand-CJtqqt8H.js';
2
2
 
3
3
  /**
4
4
  * GL texture upload cache for ImageBitmap objects.
@@ -64,46 +64,4 @@ interface View {
64
64
  */
65
65
  declare function viewToMat3(view: View): Mat3;
66
66
 
67
- /**
68
- * DynamicGlyphAtlas — runtime single-channel SDF glyphs for canvas-sourced
69
- * (installed machine) fonts. TinySDF technique: canvas fillText at 48 px →
70
- * Euclidean distance transform → shelf-packed R8 pages (1024², max 4).
71
- *
72
- * Baked MSDF atlases always win: this tier only serves families registered
73
- * via `registerCanvasFont` that have no baked entry (see resolveFontVariant).
74
- *
75
- * Faces expose a BmFont-shaped `font` whose charMap grows as glyphs are
76
- * requested, so `layoutRuns` consumes them through the same code path as
77
- * baked atlases. A char's advance is valid immediately (measureText); its
78
- * atlas rect fills in when the bake lands (width 0 / page -1 until then, so
79
- * layout advances the pen but emits no quad).
80
- */
81
-
82
- /** Mark `family` as canvas-sourced: when no baked atlas covers it,
83
- * resolveFontVariant serves it from this dynamic atlas. */
84
- declare function registerCanvasFont(family: string): void;
85
- declare function isCanvasFont(family: string): boolean;
86
- /** Remove a canvas family. Its faces are dropped; already-baked glyph
87
- * pixels stay in their pages (no eviction in v1). */
88
- declare function unregisterCanvasFont(family: string): void;
89
- /** Subscribe to deferred-bake completion (fires after each flush batch).
90
- * `<SceneCanvas>` subscribes and requests a redraw, mirroring
91
- * `subscribeImageReady`. Returns an unsubscribe. */
92
- declare function subscribeGlyphReady(cb: () => void): () => void;
93
-
94
- /**
95
- * FontRegistry and registerFont() public API.
96
- *
97
- * Variants are keyed by (family, weight, style). registerFont() takes a
98
- * FontVariant alongside the family and the two URLs; the registry stores
99
- * entries in a two-level Map so resolveFontVariant() can iterate a family's
100
- * variants for the fallback chain.
101
- */
102
-
103
- interface FontVariant {
104
- weight?: number;
105
- style?: 'normal' | 'italic';
106
- }
107
- declare function registerFont(family: string, variant: FontVariant, metricsUrl: string, atlasUrl: string): Promise<void>;
108
-
109
- export { type FontVariant as F, GLImageCache as G, type ImageMinification as I, type View as V, registerFont as a, isCanvasFont as i, registerCanvasFont as r, subscribeGlyphReady as s, unregisterCanvasFont as u, viewToMat3 as v };
67
+ export { GLImageCache as G, type ImageMinification as I, type View as V, viewToMat3 as v };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weasel-js/core",
3
- "version": "0.5.1",
3
+ "version": "0.7.0",
4
4
  "description": "Domain-agnostic 2D scene graph primitives for React: viewport math, drag/resize/insert/clone interactions, layered canvas rendering.",
5
5
  "license": "MIT",
6
6
  "author": "orochi235",
@@ -70,10 +70,11 @@
70
70
  "react": ">=18"
71
71
  },
72
72
  "dependencies": {
73
- "@weasel-js/geom": "0.5.1",
74
- "@weasel-js/gestures": "0.5.1",
75
- "@weasel-js/history": "0.5.1",
76
- "@weasel-js/modes": "0.5.1",
73
+ "@weasel-js/font": "0.7.0",
74
+ "@weasel-js/geom": "0.7.0",
75
+ "@weasel-js/gestures": "0.7.0",
76
+ "@weasel-js/history": "0.7.0",
77
+ "@weasel-js/modes": "0.7.0",
77
78
  "earcut": "2.2.4",
78
79
  "polygon-clipping": "^0.15.7"
79
80
  },