@weasel-js/core 1.5.1 → 1.6.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 (41) hide show
  1. package/CHANGELOG.md +273 -0
  2. package/dist/{autoPoseDescriptor-Dr6CwNZK.d.ts → autoPoseDescriptor-_XOyF7t4.d.ts} +2 -1
  3. package/dist/{chunk-P6MGECVO.js → chunk-44EWMJV2.js} +3 -3
  4. package/dist/{chunk-P6MGECVO.js.map → chunk-44EWMJV2.js.map} +1 -1
  5. package/dist/{chunk-XXQ6FLCJ.js → chunk-H6N2JSZ3.js} +3 -3
  6. package/dist/{chunk-XXQ6FLCJ.js.map → chunk-H6N2JSZ3.js.map} +1 -1
  7. package/dist/{chunk-HAGOFNP5.js → chunk-HPFJUUTF.js} +25 -20
  8. package/dist/chunk-HPFJUUTF.js.map +1 -0
  9. package/dist/{chunk-3LPQ2XZG.js → chunk-L5YNZYEG.js} +8 -13
  10. package/dist/chunk-L5YNZYEG.js.map +1 -0
  11. package/dist/{chunk-LXJDWBEL.js → chunk-PNNZSYRD.js} +2 -2
  12. package/dist/{chunk-LXJDWBEL.js.map → chunk-PNNZSYRD.js.map} +1 -1
  13. package/dist/{chunk-GREL4MVO.js → chunk-THCSDHII.js} +2084 -1344
  14. package/dist/chunk-THCSDHII.js.map +1 -0
  15. package/dist/clipboard.d.ts +2 -1
  16. package/dist/clone.d.ts +3 -2
  17. package/dist/{depSchema-BubKMv-2.d.ts → depSchema-BhgZc0-Q.d.ts} +79 -55
  18. package/dist/{grid-Z_Af3vTl.d.ts → grid-Dx2gQbNv.d.ts} +22 -6
  19. package/dist/index.d.ts +374 -92
  20. package/dist/index.js +6 -6
  21. package/dist/insert.d.ts +4 -3
  22. package/dist/insert.js +2 -2
  23. package/dist/{math-E3rZn4bR.d.ts → math-DRa6HBBs.d.ts} +7 -21
  24. package/dist/math.d.ts +5 -4
  25. package/dist/math.js +2 -2
  26. package/dist/move.d.ts +5 -4
  27. package/dist/move.js +3 -3
  28. package/dist/{options-BPcmwYk7.d.ts → options-CzjxFoYZ.d.ts} +1 -1
  29. package/dist/path-JEV2c5If.d.ts +48 -0
  30. package/dist/{pointSnapToGrid-CgcK2R_I.d.ts → pointSnapToGrid-7mCcm6qG.d.ts} +1 -1
  31. package/dist/{poseDescriptor-PgfVKfa0.d.ts → poseDescriptor-rZa9W5hJ.d.ts} +1 -48
  32. package/dist/renderer.d.ts +8 -7
  33. package/dist/renderer.js +6 -6
  34. package/dist/resize.d.ts +6 -5
  35. package/dist/resize.js +3 -3
  36. package/dist/{types-BdaK9PcP.d.ts → types-CxC8P6W0.d.ts} +27 -1
  37. package/dist/{types-BHGdrOcu.d.ts → types-D_74YlWs.d.ts} +1 -1
  38. package/package.json +10 -10
  39. package/dist/chunk-3LPQ2XZG.js.map +0 -1
  40. package/dist/chunk-GREL4MVO.js.map +0 -1
  41. package/dist/chunk-HAGOFNP5.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- export { ALWAYS, ANCHOR_HIT_BASE_PX, ActionDisabledReason, ActionsProvider, ActionsProviderIfRoot, ActionsScope, ActiveToolContextProvider, ActiveToolContextProviderIfRoot, ArrowIcon, BUILTIN_MARKERS, BUNDLE_TOOLS, COARSE_TARGET_SCALE, CURVE_REPS, CanvasView, ColorOverrideRegistry, CropIcon, CursorCoordsHud, DEFAULT_ALLOWED_CAPABILITIES, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_DEVICE_PROFILE, DEFAULT_FILL_COLOR, DEFAULT_HANDLE_SIZE, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SHAPE_FILL, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_STYLE, DepRegistryProvider, DepRegistryProviderIfRoot, DeviceProfileProvider, DivideIcon, EASINGS, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, GHOST_STROKE, HANDLE_BASE_PX, HandIcon, IDENTITY_JOINT, IDENTITY_POSE_COMPOSITION, ImageIcon, IntersectIcon, KIT_SHAPE_KINDS, KIT_STANDARD_ACTION_IDS, LassoIcon, LineIcon, MARKDOWN_RUN_GRAMMAR, MESH_BAKE_SIZE, MESH_GRADIENT_KIND, MIXED, MOVE_ANCHORS, MinimapCanvas, NEVER, PAINTED_CURSOR_LAYER_ID, PATH_ANCHOR_CHROME_ID, PenIcon, PencilIcon, PickHud, PointerProviderIfRoot, PolygonIcon, RECT_POSE_COMPOSITION, RIGID_POSE_COMPOSITION, ROTATION_HANDLE_BASE_PX, RectIcon, SCRIPT_METRICS, SPRING_PRESETS, SPRITE_STRIDE, STROKE_DASH_RATIOS, SceneCanvas, SceneViewCanvas, SelectIcon, SelectionContextProvider, SelectionContextProviderIfRoot, StarIcon, SubtractIcon, TOOL_PREF_KINDS, TextIcon, UNION_OF_CHILDREN, UnionIcon, UnknownIcon, VERSION, VIEW_ANIMATION_KEY, WHEEL_ZOOM_STEP, WeaselProvider, ZOOM_FLOOR, _resetMarkersForTests, _resetPaintKindsForTests, actionBindings, actionIs, actionShortcuts, alignDeltaFor, alignInsertBehavior, alignMoveBehavior, alignResizeBehavior, alignedStrokeRect, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyBooleanOp, applyStyleToRange, areaSelectAction, arrayAdapter, asNodeId, asPaint, bakeCursor, bakeMesh, bezierCubic, bezierQuadratic, bindRig, blendPoses, blur, buildChromeCtx, buildRuleCtx, buildSceneViewCommands, cachedLayoutRuns, canBringForward, canHover, canQueryLocalFonts2 as canQueryLocalFonts, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, caretIndexAt, cellAt, charOffsetToDomPosition, circlePath, clampView, clearSelectionAction, clientToCanvas, clipboardCopyAction, clipboardCutAction, cloneAction, coarsePointer, composeAffordanceLayer, composePath, composeRectPose, composeRigidPose, composeSelectionPose, composeWorldPose, computeFitView, computeFitViewport, computeIndicatorCommand, computeWheelAction, cond, constrainTo45, containedThenNearest, cornerWeights, countPathAnchors, createCellHighlightLayer, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDispatcher, createGridLayer, createGuidesLayer, createHistory, createKeyState, createMarkdownRenderer, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createPaintedCursorState, createParallaxLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createPoseFeed, createPoseOverrides, createReorderOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetPathOp, createSetTextOp, createSlew, createTextLayer, createTiledLayer, createVelocityTracker, createViewResolver, createViewportLayer, cubicBezierEasing, cullDrawCommands, cursorFor, cycleVertexColors, dashForStrokeStyle, decomposePath, decomposeRectPose, decomposeRigidPose, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultVisibilityRules, defineTool, defineViewportTool, deleteScratch, deriveAlignmentGuides, deriveParallaxView, derivedDepOf, derivedPose, describeRule, documentPose, domPositionToCharOffset, domToRuns, drawLayers, drawOneLayer, 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, effectivePose, effectiveRangeStyle, enableLocalFontOutlines2 as enableLocalFontOutlines, enterTextEditAction, enumerateAnchors, evalPatch, evaluate, evaluateEnabled, fillInPoseFrame, fillToBoundsFrame, findNodeShape, findShapeInk, findShapeSilhouette, fitTextPose, fitToBounds, fitViewToBounds, fitZoom, flattenPreviews, focused, fontString, forEachCoalesced, frameRect, freeform, gateLayer, gesturing, getAlpha01, getImageBitmap, getMarker, getNodeShapes, getPaintKind, getScratch, getStylusData, gradientForBounds, gradientGeometry, hasFontOutlines2 as hasFontOutlines, hexToRgba, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, imageStatus, inferredNodeProperties, inferredNodeRouting, insertAction, insertPreviewExtent, interpolateView, isBuiltinToolPref, isCanvasFont2 as isCanvasFont, isEditableTarget, isGradientFill, isLayerPainted, isLayerVisible, isMeshGradientFill, isPatternSpec, isTensorPatch, isValidPatch, keySpecShortcut, lassoSelectAction, layoutMarkdown, layoutRuns, layoutTextPose, lerpColorArray, lerpOklab, lerpOklch, linear, listFontOutlines2 as listFontOutlines, listMarkers, listPaintKinds, liveScope, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markdownToRuns, markerDrawCommands, markerInset, markerKeyOf, markerSites, mat3, matchAlignment, matchesKeyBinding, meanScale, measureText, measureTextBounds, measuredWidth, mergeAlphaFromPrev, mergeContributions, meshBounds, meshGradientXml, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nearest, nearestWithin, nestedHitTester, never, nodeHasFlag, none, normalizeHex, normalizeView, normalizeZoom, not, nurbs, oklabToOklch, oklabToSrgbU8, oklchToOklab, openFilePicker, openPointerSession, or, outlineStatus2 as outlineStatus, paintAlpha, paintKindOf, paintWithAlpha, paintWithColor, parseColor, parseColorToRgba255, parseDebugFlags, patchBounds, patchCorner, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathDistanceToPoint, pathDivide, pathExclude, pathFromD, pathInPoseFrame, pathInWorld, pathIntersect, pathIntersectsPolygon, pathIntersectsRect, pathOriginProjection, pathSubtract, pathToAnchors, pathUnion, pickTopMostHit, pinchZoomAction, planPixelRender, pointInTextPose, poseRotationOf, prefUnit, pressureToWidth, rainbowVertexColors, rebaseLocalPose, rectMarkerPath, registerCanvasFont2 as registerCanvasFont, registerContentHandler, registerEffect, registerFont2 as registerFont, registerFontOutlines2 as registerFontOutlines, registerMarker, registerNodeShape, registerPaintKind, renderLabel, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveAlign, resolveColor, resolveCursor, resolveCursorTier, resolveDeviceProfile, resolveEasing, resolveFillPattern, resolveMarkerSize, resolveOverlays, resolveParams, resolvePatternSpec, resolvePreviews, resolveRuns, resolveScreenLength, resolveSkeleton, resolveStrokeWidth, resolveTextStyle, resolveVisibility, rgbaToHex, rigidRigApply, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotationDegreesUnit, rotationHandle, roundRectPath, roundToCell, runsToDom, runsToMarkdown, runsToPlainText, sampleGradientStops, sampleTrack, sceneFromJSON, sceneNodeClientRect, sceneSelectionStore, sceneToAdapter, scopeBindings, scratchKey, screenToWorld, seedMeshPatch, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, setFlagOverRange, setScratch, shapeCoversPoint, slewToward, sliceAction, snapPoint, solid, solidVertexColors, specificity, spiro, splitPathByLine, splitSubpaths, springPose, springVertexColors, squarePath, srgbU8ToOklab, staggerVertexColors, startThresholdDrag, strokeDashStyleOf, strokeInsets, strokeOf, strokeWith, styleAtRange, subscribeGlyphReady2 as subscribeGlyphReady, subscribeImageReady, textCommand, textCommandFromPose, textCommandFromRuns, textLineBoxes, textPoseLayoutInput, tileGrid, tiledProject, toHex8, toRuns, translateRectPose, trimPolyline, tweenPose, tweenVertexColors, unionBoundsPath, unionOfChildren, unionOfChildrenVia, unregisterCanvasFont2 as unregisterCanvasFont, unregisterFontOutlines2 as unregisterFontOutlines, useAction, useActionsRegistry, useActiveToolContext, useAlign, useAnimator, useArrayAdapter, useAutoCenter, useBooleans, useBooleansAdapter, useCanvasFocus, useCanvasSize, useDecayLoop, useDepRegistry, useDepSource, useDeviceProfile, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGestureDispatcher, useGridCellHover, useGuides, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useImageTool, useKeyState, useKeybindings, useLassoTool, useLineTool, useNodeOverlayFrame, useOptionalActiveToolContext, useOptionalDepRegistry, usePenTool, usePencilTool, usePinchGesture, usePointerStylus, usePolygonTool, usePoseCompositionDepSource, usePoseDescriptorDepSource, usePoseRun, usePublishSelection, useRectTool, useResizePolicy, useRig, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSelectionContext, useSimulation, useSliceDep, useStandardActions, useStarTool, useTextEdit, useTextTool, useTools, useVelocityTracker, useViewAnimation, useViewAnimationOn, useVisibleRaf, verticalAlignOffset, viewToMat3, viewToTransform, viewZoom, viewportDragPanAction, viewportWheelPanAction, viewportZoomAction, viewportsAt, vignette, wheelPan, wheelZoom, wheelZoomFactor, when, withAlpha01, withCoord, withGradientKind, worldEditToStorage, worldPoseLookup, worldToScreen, zoomAt, zoomAtLeast } from './chunk-GREL4MVO.js';
2
- export { DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_VELOCITY_DECAY, aabbCenter, createSimulation, pointAlongPath, pointInRotatedRect, rectCorners, rotatePoint, rotatedRectCorners } from './chunk-LXJDWBEL.js';
3
- export { createReparentOp, createTransformOp, snap } from './chunk-P6MGECVO.js';
4
- export { CORNER_ANCHORS, cornerPoint, cornerResizeHandles, hitCornerHandle, pointSnapToGrid } from './chunk-XXQ6FLCJ.js';
5
- export { ANGLE_RADIANS, DEFAULT_GUIDE_TOLERANCE_PX, IMPERIAL_INCHES, METRIC_MM, PIXELS, RECT_ORIGIN_PROJECTION, formatUnit, gridSnapStrategy, guideSnapStrategy, pointToGridCell, pxExtent, resolveUnit, scaleDelta, withinPxBox, withinPxRadius } from './chunk-HAGOFNP5.js';
6
- export { AUTO_POSE_DESCRIPTOR, DEFAULT_FLATTEN_TOLERANCE, PATH_C, PATH_CMD_LENGTHS, PATH_L, PATH_M, PATH_Q, PATH_Z, PathBuilder, RECT_POSE_DESCRIPTOR, ROTATED_POSE_DESCRIPTOR, axisAlignedBounds, boundsOfPath, ellipsePath, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, isPathLike, isRectPose, linePath, pathCommandCoordCount, pathPoseDescriptor, pointInPath, polygonFromPoints, polylineFromPoints, poseDescriptorForNode, rectPath, regularPolygonPath, scalePathToBounds, starPath, transformPath, translatePath, translatePolygonInPlace, translatePoseViaDescriptor, unionAABB, unionBounds, visualBoundsViaDescriptor } from './chunk-3LPQ2XZG.js';
1
+ export { ACTION_GLYPHS, ALWAYS, ANCHOR_HIT_BASE_PX, ActionDisabledReason, ActionsProvider, ActionsProviderIfRoot, ActionsScope, ActiveToolContextProvider, ActiveToolContextProviderIfRoot, AlignBottomIcon, AlignCenterXIcon, AlignCenterYIcon, AlignLeftIcon, AlignRightIcon, AlignTopIcon, ArrowIcon, BUILTIN_MARKERS, BUNDLE_TOOLS, BringForwardIcon, BringToFrontIcon, COARSE_TARGET_SCALE, CURVE_REPS, CanvasView, ColorOverrideRegistry, CopyIcon, CropIcon, CursorCoordsHud, CutIcon, DEFAULT_ALLOWED_CAPABILITIES, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_DEVICE_PROFILE, DEFAULT_FILL_COLOR, DEFAULT_HANDLE_SIZE, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SHAPE_FILL, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_STYLE, DeleteIcon, DepRegistryProvider, DepRegistryProviderIfRoot, DeviceProfileProvider, DistributeHorizontalIcon, DistributeVerticalIcon, DivideIcon, DuplicateIcon, EASINGS, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, FlipXIcon, FlipYIcon, GHOST_STROKE, GroupIcon, HANDLE_BASE_PX, HandIcon, IDENTITY_JOINT, IDENTITY_POSE_COMPOSITION, ImageIcon, IntersectIcon, KIT_SHAPE_KINDS, KIT_STANDARD_ACTION_IDS, LassoIcon, LineIcon, MARKDOWN_RUN_GRAMMAR, MESH_BAKE_SIZE, MESH_GRADIENT_KIND, MIXED, MOVE_ANCHORS, MinimapCanvas, NEVER, PAINTED_CURSOR_LAYER_ID, PATH_ANCHOR_CHROME_ID, PasteIcon, PenIcon, PencilIcon, PickHud, PointerProviderIfRoot, PolygonIcon, RECT_POSE_COMPOSITION, RIGID_POSE_COMPOSITION, ROTATION_HANDLE_BASE_PX, RectIcon, RedoIcon, SCRIPT_METRICS, SPRING_PRESETS, SPRITE_STRIDE, STROKE_DASH_RATIOS, SceneCanvas, SceneViewCanvas, SelectIcon, SelectionContextProvider, SelectionContextProviderIfRoot, SendBackwardIcon, SendToBackIcon, StarIcon, SubtractIcon, TOOL_PREF_KINDS, TextIcon, UNION_OF_CHILDREN, UndoIcon, UngroupIcon, UnionIcon, UnknownIcon, VERSION, VIEW_ANIMATION_KEY, WHEEL_ZOOM_STEP, WeaselProvider, ZOOM_FLOOR, _resetMarkersForTests, _resetPaintKindsForTests, actionBindings, actionIs, actionItems, actionShortcuts, alignDeltaFor, alignInsertBehavior, alignMoveBehavior, alignResizeBehavior, alignedStrokeRect, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyBooleanOp, applyStyleToRange, areaSelectAction, arrayAdapter, asNodeId, asPaint, bakeCursor, bakeMesh, bezierCubic, bezierQuadratic, bindRig, blendPoses, blur, buildChromeCtx, buildDepsFromRequires, buildRuleCtx, buildSceneViewCommands, cachedLayoutRuns, canBringForward, canHover, canQueryLocalFonts2 as canQueryLocalFonts, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, caretIndexAt, cellAt, charOffsetToDomPosition, circlePath, clampView, clearSelectionAction, clientToCanvas, clipboardCopyAction, clipboardCutAction, clipboardPasteAction, cloneAction, coarsePointer, composeAffordanceLayer, composePath, composeRectPose, composeRigidPose, composeSelectionPose, composeWorldPose, computeFitView, computeFitViewport, computeIndicatorCommand, computeWheelAction, cond, constrainTo45, containedThenNearest, contrastLineColor, cornerWeights, countPathAnchors, createCellHighlightLayer, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDispatcher, createGridLayer, createGuidesLayer, createHistory, createKeyState, createMarkdownRenderer, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createPaintedCursorState, createParallaxLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createPoseFeed, createPoseOverrides, createReorderOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetPathOp, createSetTextOp, createSlew, createTextLayer, createTiledLayer, createVelocityTracker, createViewResolver, createViewportLayer, cubicBezierEasing, cullDrawCommands, cursorFor, cycleFill, cycleVertexColors, dashForStrokeStyle, decomposePath, decomposeRectPose, decomposeRigidPose, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultVisibilityRules, defineTool, defineViewportTool, definesFrame, deleteScratch, deriveAlignmentGuides, deriveParallaxView, derivedDepOf, derivedPose, describeRule, documentPose, domPositionToCharOffset, domToRuns, drawLayers, drawOneLayer, 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, effectivePose, effectiveRangeStyle, enableLocalFontOutlines2 as enableLocalFontOutlines, enterTextEditAction, enumerateAnchors, evalPatch, evaluate, evaluateEnabled, fillInPoseFrame, fillToBoundsFrame, findNodeShape, findShapeInk, findShapeSilhouette, fitTextPose, fitToBounds, fitViewToBounds, fitZoom, flattenPreviews, focused, fontString, forEachCoalesced, frameRect, freeform, gateLayer, gesturing, getAlpha01, getImageBitmap, getMarker, getNodeShapes, getPaintKind, getScratch, getStylusData, gradientForBounds, gradientGeometry, hasFontOutlines2 as hasFontOutlines, hexToOklchDeg, hexToRgba, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, hslToSrgb, imageStatus, inferredNodeProperties, inferredNodeRouting, insertAction, insertPreviewExtent, interpolateSrgb, interpolateView, isBuiltinToolPref, isCanvasFont2 as isCanvasFont, isEditableTarget, isGradientFill, isLayerPainted, isLayerVisible, isMeshGradientFill, isPatternSpec, isTensorPatch, isValidPatch, isVectorImageSrc, keySpecShortcut, lassoSelectAction, layoutMarkdown, layoutRuns, layoutTextPose, lerpColorArray, lerpOklab, lerpOklch, linear, linearSrgbToOklab, linearToSrgb, listFontOutlines2 as listFontOutlines, listMarkers, listPaintKinds, liveScope, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markdownToRuns, markerDrawCommands, markerInset, markerKeyOf, markerSites, mat3, matchAlignment, matchesKeyBinding, meanScale, measureText, measureTextBounds, measuredWidth, mergeAlphaFromPrev, mergeContributions, meshBounds, meshGradientXml, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nearest, nearestWithin, nestedHitTester, never, nodeHasFlag, none, normalizeHex, normalizeView, normalizeZoom, not, nurbs, oklabToLinearSrgb, oklabToOklch, oklabToSrgbU8, oklchDegToHex, oklchToOklab, openFilePicker, openPointerSession, or, outlineStatus2 as outlineStatus, paintAlpha, paintKindOf, paintWithAlpha, paintWithColor, parseColor, parseColorToRgba255, parseDebugFlags, patchBounds, patchCorner, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathDistanceToPoint, pathDivide, pathExclude, pathFromD, pathInPoseFrame, pathInWorld, pathIntersect, pathIntersectsPolygon, pathIntersectsRect, pathOriginProjection, pathSubtract, pathToAnchors, pathUnion, pickTopMostHit, pinchZoomAction, planPixelRender, pointInTextPose, poseRotationOf, prefUnit, pressureToWidth, rainbowVertexColors, rebaseLocalPose, rectMarkerPath, registerCanvasFont2 as registerCanvasFont, registerContentHandler, registerEffect, registerFont2 as registerFont, registerFontOutlines2 as registerFontOutlines, registerMarker, registerNodeShape, registerPaintKind, renderLabel, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveAlign, resolveColor, resolveCursor, resolveCursorTier, resolveDeviceProfile, resolveEasing, resolveFillPattern, resolveMarkerSize, resolveOverlays, resolveParams, resolvePatternSpec, resolvePreviews, resolveRuns, resolveScreenLength, resolveSkeleton, resolveStrokeWidth, resolveTextStyle, resolveVisibility, rgbaToHex, rigidRigApply, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotationDegreesUnit, rotationHandle, roundRectPath, roundToCell, runsToDom, runsToMarkdown, runsToPlainText, sampleGradientStops, sampleTrack, sceneFromJSON, sceneNodeClientRect, sceneSelectionStore, sceneToAdapter, scopeBindings, scratchKey, screenToWorld, seedMeshPatch, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, setFlagOverRange, setScratch, shapeCoversPoint, slewToward, sliceAction, snapPoint, solid, solidVertexColors, specificity, spiro, splitPathByLine, splitSubpaths, springPose, springVertexColors, squarePath, srgbFloatToOklab, srgbToHsl, srgbToLinear, srgbU8ToOklab, staggerVertexColors, startThresholdDrag, strokeDashStyleOf, strokeInsets, strokeOf, strokeWith, styleAtRange, subscribeGlyphReady2 as subscribeGlyphReady, subscribeImageReady, textCommand, textCommandFromPose, textCommandFromRuns, textLineBoxes, textPoseLayoutInput, tileGrid, tiledProject, toHex8, toRuns, transformRunTexts, translateRectPose, trimPolyline, tweenPose, tweenVertexColors, unionBoundsPath, unionOfChildren, unionOfChildrenVia, unregisterCanvasFont2 as unregisterCanvasFont, unregisterFontOutlines2 as unregisterFontOutlines, useAction, useActionsRegistry, useActiveToolContext, useAlign, useAnimator, useArrayAdapter, useAutoCenter, useBooleans, useBooleansAdapter, useCanvasFocus, useCanvasSize, useDecayLoop, useDepRegistry, useDepSource, useDeviceProfile, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGestureDispatcher, useGridCellHover, useGuides, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useImageTool, useKeyState, useKeybindings, useLassoTool, useLineTool, useNodeOverlayFrame, useOngoingAction, useOptionalActiveToolContext, useOptionalDepRegistry, usePenTool, usePencilTool, usePinchGesture, usePointerStylus, usePolygonTool, usePoseCompositionDepSource, usePoseDescriptorDepSource, usePoseRun, usePublishSelection, useRectTool, useResizePolicy, useRig, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSelectionContext, useSimulation, useSliceDep, useStandardActions, useStarTool, useTextEdit, useTextTool, useTools, useVelocityTracker, useViewAnimation, useViewAnimationOn, useVisibleRaf, verticalAlignOffset, viewToMat3, viewToTransform, viewZoom, viewportDragPanAction, viewportWheelPanAction, viewportZoomAction, viewportsAt, vignette, wheelPan, wheelZoom, wheelZoomFactor, when, withAlpha01, withCoord, withGradientKind, worldEditToStorage, worldPoseLookup, worldToScreen, zoomAt, zoomAtLeast } from './chunk-THCSDHII.js';
2
+ export { DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_VELOCITY_DECAY, aabbCenter, createSimulation, pointAlongPath, pointInRotatedRect, rectCorners, rotatePoint, rotatedRectCorners } from './chunk-PNNZSYRD.js';
3
+ export { createReparentOp, createTransformOp, snap } from './chunk-44EWMJV2.js';
4
+ export { CORNER_ANCHORS, cornerPoint, cornerResizeHandles, hitCornerHandle, pointSnapToGrid } from './chunk-H6N2JSZ3.js';
5
+ export { ANGLE_RADIANS, DEFAULT_GUIDE_TOLERANCE_PX, IMPERIAL_INCHES, METRIC_MM, PIXELS, RECT_ORIGIN_PROJECTION, formatUnit, gridSnapStrategy, guideSnapStrategy, pointToGridCell, pxExtent, resolveUnit, scaleDelta, unitScale, withinPxBox, withinPxRadius } from './chunk-HPFJUUTF.js';
6
+ export { AUTO_POSE_DESCRIPTOR, DEFAULT_FLATTEN_TOLERANCE, PATH_C, PATH_CMD_LENGTHS, PATH_L, PATH_M, PATH_Q, PATH_Z, PathBuilder, RECT_POSE_DESCRIPTOR, ROTATED_POSE_DESCRIPTOR, axisAlignedBounds, boundsOfPath, ellipsePath, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, isPathLike, isRectPose, linePath, pathCommandCoordCount, pathPoseDescriptor, pointInPath, polygonFromPoints, polylineFromPoints, poseDescriptorForNode, rectPath, regularPolygonPath, scalePathToBounds, starPath, transformPath, translatePath, translatePoseViaDescriptor, unionAABB, unionBounds, visualBoundsViaDescriptor } from './chunk-L5YNZYEG.js';
7
7
  export { PointerContextProvider, WEASEL_CLIPBOARD_MIME, WEASEL_CLIPBOARD_MIME_WEB, applyOpsTo, buildWeaselClipboardText, dispatchApplyBatch, dlog, dwarn, embedWeaselMetadataInSvg, extractWeaselClipboardFromSvg, isDebugEnabled, parseWeaselClipboardText, sniffWeaselClipboardText, useClipboardOps, usePointerContext } from './chunk-T3UQ3F6R.js';
8
8
  export { cloneByAltDrag } from './chunk-D4AAWR64.js';
9
9
  export { createSetSelectionOp } from './chunk-DOBSZOPR.js';
package/dist/insert.d.ts CHANGED
@@ -1,9 +1,10 @@
1
- export { U as UseInsertOptions } from './options-BPcmwYk7.js';
2
- import { I as InsertBehavior } from './types-BHGdrOcu.js';
1
+ export { U as UseInsertOptions } from './options-CzjxFoYZ.js';
2
+ import { I as InsertBehavior } from './types-D_74YlWs.js';
3
3
  import { ModifierState, View } from '@weasel-js/routing';
4
4
  import { G as Guide } from './types-D2tTKEU0.js';
5
5
  import '@weasel-js/history';
6
- import './types-BdaK9PcP.js';
6
+ import './types-CxC8P6W0.js';
7
+ import './path-JEV2c5If.js';
7
8
 
8
9
  type ModKey$1 = keyof ModifierState;
9
10
  /** Insert behavior that rounds the insertion point to a grid, so a shape
package/dist/insert.js CHANGED
@@ -1,5 +1,5 @@
1
- import { DEFAULT_GUIDE_TOLERANCE_PX, pxExtent } from './chunk-HAGOFNP5.js';
2
- import './chunk-3LPQ2XZG.js';
1
+ import { DEFAULT_GUIDE_TOLERANCE_PX, pxExtent } from './chunk-HPFJUUTF.js';
2
+ import './chunk-L5YNZYEG.js';
3
3
 
4
4
  // src/interactions/actions/insert/behaviors/snapToGrid.ts
5
5
  function snapToGrid(args) {
@@ -1,7 +1,8 @@
1
- import { c as PolygonPath, f as PathFillRule, e as RectPath, a as Path, d as RotatedPose } from './poseDescriptor-PgfVKfa0.js';
1
+ import { a as PolygonPath, b as PathFillRule, R as RectPath, P as Path } from './path-JEV2c5If.js';
2
+ import { Point2, Bounds } from '@weasel-js/routing';
3
+ import { b as RotatedPose } from './poseDescriptor-rZa9W5hJ.js';
2
4
  import '@weasel-js/geom';
3
- import './autoPoseDescriptor-Dr6CwNZK.js';
4
- import { Bounds } from '@weasel-js/routing';
5
+ import './autoPoseDescriptor-_XOyF7t4.js';
5
6
 
6
7
  /**
7
8
  * Minimal node interface for the simulation primitive. Matches d3-force's
@@ -209,21 +210,6 @@ declare function linePath(a: {
209
210
  y: number;
210
211
  }): PolygonPath;
211
212
 
212
- /**
213
- * Polygon-vs-axis-aligned-rect tests. Pure functions; no React/kit deps.
214
- *
215
- * `polygon` is a closed polyline given as an ordered vertex array; the
216
- * closing edge from `polygon[N-1]` to `polygon[0]` is implicit. Even-odd fill
217
- * rule, and one contour only — a path with holes or curves goes through
218
- * `pathHitTest`, which reads its `fillRule`.
219
- */
220
-
221
- /** A 2D point or vector. */
222
- interface Vec2 {
223
- x: number;
224
- y: number;
225
- }
226
-
227
213
  /**
228
214
  * A station along a path: where it is at a fraction of its length, and which
229
215
  * way it is heading there.
@@ -235,9 +221,9 @@ interface Vec2 {
235
221
  */
236
222
 
237
223
  interface PathStation {
238
- point: Vec2;
224
+ point: Point2;
239
225
  /** Unit vector along the path at `point`, pointing toward the end. */
240
- tangent: Vec2;
226
+ tangent: Point2;
241
227
  }
242
228
  interface PointAlongPathOptions {
243
229
  /** Curve flattening tolerance, in world units. Default 0.5. */
@@ -279,4 +265,4 @@ declare function rotatedRectCorners(pose: RotatedPose): {
279
265
  * rect's local frame. */
280
266
  declare function pointInRotatedRect(pose: RotatedPose, worldX: number, worldY: number): boolean;
281
267
 
282
- export { DEFAULT_ALPHA_DECAY as D, PathBuilder as P, type SimulationNode as S, type UseSimulationOptions as U, type Vec2 as V, type Simulation as a, DEFAULT_ALPHA_MIN as b, DEFAULT_VELOCITY_DECAY as c, type PathStation as d, type PointAlongPathOptions as e, type SimulationCore as f, type SimulationForce as g, type SimulationOptions as h, aabbCenter as i, createSimulation as j, ellipsePath as k, linePath as l, pointInRotatedRect as m, polygonFromPoints as n, polylineFromPoints as o, pointAlongPath as p, rectPath as q, rectCorners as r, regularPolygonPath as s, rotatePoint as t, rotatedRectCorners as u, starPath as v };
268
+ export { DEFAULT_ALPHA_DECAY as D, PathBuilder as P, type SimulationNode as S, type UseSimulationOptions as U, type Simulation as a, DEFAULT_ALPHA_MIN as b, DEFAULT_VELOCITY_DECAY as c, type PathStation as d, type PointAlongPathOptions as e, type SimulationCore as f, type SimulationForce as g, type SimulationOptions as h, aabbCenter as i, createSimulation as j, ellipsePath as k, linePath as l, pointInRotatedRect as m, polygonFromPoints as n, polylineFromPoints as o, pointAlongPath as p, rectPath as q, rectCorners as r, regularPolygonPath as s, rotatePoint as t, rotatedRectCorners as u, starPath as v };
package/dist/math.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- export { a as Path, f as PathFillRule, c as PolygonPath, P as PoseDescriptor, e as RectPath, t as translatePoseViaDescriptor } from './poseDescriptor-PgfVKfa0.js';
2
- export { P as PathBuilder, a as Simulation, f as SimulationCore, g as SimulationForce, S as SimulationNode, h as SimulationOptions, V as Vec2, j as createSimulation, p as pointAlongPath, n as polygonFromPoints, o as polylineFromPoints, q as rectPath, t as rotatePoint } from './math-E3rZn4bR.js';
1
+ export { P as Path, b as PathFillRule, a as PolygonPath, R as RectPath } from './path-JEV2c5If.js';
2
+ export { Point2 as Vec2 } from '@weasel-js/routing';
3
+ export { P as PoseDescriptor, t as translatePoseViaDescriptor } from './poseDescriptor-rZa9W5hJ.js';
4
+ export { P as PathBuilder, a as Simulation, f as SimulationCore, g as SimulationForce, S as SimulationNode, h as SimulationOptions, j as createSimulation, p as pointAlongPath, n as polygonFromPoints, o as polylineFromPoints, q as rectPath, t as rotatePoint } from './math-DRa6HBBs.js';
3
5
  export { DEFAULT_FLATTEN_TOLERANCE, PATH_C, PATH_CMD_LENGTHS, PATH_L, PATH_M, PATH_Q, PATH_Z, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, pathCommandCoordCount } from '@weasel-js/geom';
4
- export { A as AUTO_POSE_DESCRIPTOR } from './autoPoseDescriptor-Dr6CwNZK.js';
5
- import '@weasel-js/routing';
6
+ export { A as AUTO_POSE_DESCRIPTOR } from './autoPoseDescriptor-_XOyF7t4.js';
package/dist/math.js CHANGED
@@ -1,4 +1,4 @@
1
- export { createSimulation, pointAlongPath, rotatePoint } from './chunk-LXJDWBEL.js';
2
- export { AUTO_POSE_DESCRIPTOR, DEFAULT_FLATTEN_TOLERANCE, PATH_C, PATH_CMD_LENGTHS, PATH_L, PATH_M, PATH_Q, PATH_Z, PathBuilder, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, pathCommandCoordCount, polygonFromPoints, polylineFromPoints, rectPath, translatePoseViaDescriptor } from './chunk-3LPQ2XZG.js';
1
+ export { createSimulation, pointAlongPath, rotatePoint } from './chunk-PNNZSYRD.js';
2
+ export { AUTO_POSE_DESCRIPTOR, DEFAULT_FLATTEN_TOLERANCE, PATH_C, PATH_CMD_LENGTHS, PATH_L, PATH_M, PATH_Q, PATH_Z, PathBuilder, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, pathCommandCoordCount, polygonFromPoints, polylineFromPoints, rectPath, translatePoseViaDescriptor } from './chunk-L5YNZYEG.js';
3
3
  //# sourceMappingURL=math.js.map
4
4
  //# sourceMappingURL=math.js.map
package/dist/move.d.ts CHANGED
@@ -1,10 +1,11 @@
1
- import { O as OriginProjection } from './grid-Z_Af3vTl.js';
2
- export { U as UseMoveOptions } from './grid-Z_Af3vTl.js';
3
- import { M as MoveBehavior } from './types-BHGdrOcu.js';
1
+ import { O as OriginProjection } from './grid-Dx2gQbNv.js';
2
+ export { U as UseMoveOptions } from './grid-Dx2gQbNv.js';
3
+ import { M as MoveBehavior } from './types-D_74YlWs.js';
4
4
  import { ModifierState, View } from '@weasel-js/routing';
5
- import { S as SnapTarget } from './types-BdaK9PcP.js';
5
+ import { S as SnapTarget } from './types-CxC8P6W0.js';
6
6
  import { G as Guide } from './types-D2tTKEU0.js';
7
7
  import '@weasel-js/history';
8
+ import './path-JEV2c5If.js';
8
9
 
9
10
  type ModKey$1 = keyof ModifierState;
10
11
  /** Move behavior that snaps the dragged pose's origin to a grid. Hold
package/dist/move.js CHANGED
@@ -1,6 +1,6 @@
1
- import { snap, createTransformOp, createReparentOp } from './chunk-P6MGECVO.js';
2
- import { gridSnapStrategy, RECT_ORIGIN_PROJECTION, guideSnapStrategy } from './chunk-HAGOFNP5.js';
3
- import './chunk-3LPQ2XZG.js';
1
+ import { snap, createTransformOp, createReparentOp } from './chunk-44EWMJV2.js';
2
+ import { gridSnapStrategy, RECT_ORIGIN_PROJECTION, guideSnapStrategy } from './chunk-HPFJUUTF.js';
3
+ import './chunk-L5YNZYEG.js';
4
4
  import { createDeleteOp } from './chunk-4RJP2N2L.js';
5
5
  import { scratchKey, getScratch, setScratch } from '@weasel-js/routing';
6
6
 
@@ -1,5 +1,5 @@
1
1
  import { Op } from '@weasel-js/history';
2
- import { I as InsertBehavior } from './types-BHGdrOcu.js';
2
+ import { I as InsertBehavior } from './types-D_74YlWs.js';
3
3
  import { Bounds } from '@weasel-js/routing';
4
4
 
5
5
  /** Option surface for the `insert` action.
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Path data model. Vector-graphics primitive used kit-wide as the canonical
3
+ * shape (replacing per-shape ad-hoc poses). SVG-style command stream so we
4
+ * cover lines, polygons, beziers, and multi-contour shapes (think the inner
5
+ * hole of an "O") under one type.
6
+ *
7
+ * Storage: command codes in a `Uint8Array`, parameters in a `Float32Array`.
8
+ * Each command consumes a fixed number of float coords from the parameter
9
+ * array; the parser walks both arrays in lockstep. This keeps interaction
10
+ * hot loops monomorphic and keeps GC pressure low under heavy edits.
11
+ *
12
+ * Two path subtypes are distinguished at the type level so common-case
13
+ * machinery (selection AABBs, area-select intersection, hit-testing rect
14
+ * silhouettes) can short-circuit on `RectPath` without paying the polygon
15
+ * kernel cost. Polymorphic kernels accept either via the `Path` union and
16
+ * dispatch on `kind`.
17
+ */
18
+
19
+ /** Fill rule used by polygon path hit-testing and `ctx.fill()`. */
20
+ type PathFillRule = 'nonzero' | 'evenodd';
21
+ /**
22
+ * Polygon path with arbitrary contours and optional bezier segments.
23
+ * Multi-contour: each `M` opens a new subpath; `Z` closes the current one.
24
+ * Open subpaths (no `Z`) render as polylines and don't contribute to fills.
25
+ */
26
+ interface PolygonPath {
27
+ kind: 'polygon';
28
+ commands: Uint8Array;
29
+ coords: Float32Array;
30
+ fillRule: PathFillRule;
31
+ }
32
+ /**
33
+ * Axis-aligned rectangle. Fast path for the (very common) case where the
34
+ * shape is just a rect — preserves O(1) bounds and hit-test, avoids the
35
+ * polygon kernel entirely. Promote to `PolygonPath` only when the shape
36
+ * grows beyond what a rect can express.
37
+ */
38
+ interface RectPath {
39
+ kind: 'rect';
40
+ x: number;
41
+ y: number;
42
+ width: number;
43
+ height: number;
44
+ }
45
+ /** Canonical path shape — either an axis-aligned rect (fast path) or a polygon command stream. */
46
+ type Path = PolygonPath | RectPath;
47
+
48
+ export type { Path as P, RectPath as R, PolygonPath as a, PathFillRule as b };
@@ -1,5 +1,5 @@
1
1
  import { ResizeAnchor, Bounds, DebugSink, ModifierState } from '@weasel-js/routing';
2
- import { B as BoundsConstraint, P as PointSnapBehavior, a as PointSnapFrame } from './types-BHGdrOcu.js';
2
+ import { B as BoundsConstraint, P as PointSnapBehavior, a as PointSnapFrame } from './types-D_74YlWs.js';
3
3
 
4
4
  /** Corner resize-handle: world-space center plus the anchor that pins the opposite corner during resize. */
5
5
  interface CornerHandle {
@@ -1,52 +1,5 @@
1
1
  import { Bounds } from '@weasel-js/routing';
2
2
 
3
- /**
4
- * Path data model. Vector-graphics primitive used kit-wide as the canonical
5
- * shape (replacing per-shape ad-hoc poses). SVG-style command stream so we
6
- * cover lines, polygons, beziers, and multi-contour shapes (think the inner
7
- * hole of an "O") under one type.
8
- *
9
- * Storage: command codes in a `Uint8Array`, parameters in a `Float32Array`.
10
- * Each command consumes a fixed number of float coords from the parameter
11
- * array; the parser walks both arrays in lockstep. This keeps interaction
12
- * hot loops monomorphic and keeps GC pressure low under heavy edits.
13
- *
14
- * Two path subtypes are distinguished at the type level so common-case
15
- * machinery (selection AABBs, area-select intersection, hit-testing rect
16
- * silhouettes) can short-circuit on `RectPath` without paying the polygon
17
- * kernel cost. Polymorphic kernels accept either via the `Path` union and
18
- * dispatch on `kind`.
19
- */
20
-
21
- /** Fill rule used by polygon path hit-testing and `ctx.fill()`. */
22
- type PathFillRule = 'nonzero' | 'evenodd';
23
- /**
24
- * Polygon path with arbitrary contours and optional bezier segments.
25
- * Multi-contour: each `M` opens a new subpath; `Z` closes the current one.
26
- * Open subpaths (no `Z`) render as polylines and don't contribute to fills.
27
- */
28
- interface PolygonPath {
29
- kind: 'polygon';
30
- commands: Uint8Array;
31
- coords: Float32Array;
32
- fillRule: PathFillRule;
33
- }
34
- /**
35
- * Axis-aligned rectangle. Fast path for the (very common) case where the
36
- * shape is just a rect — preserves O(1) bounds and hit-test, avoids the
37
- * polygon kernel entirely. Promote to `PolygonPath` only when the shape
38
- * grows beyond what a rect can express.
39
- */
40
- interface RectPath {
41
- kind: 'rect';
42
- x: number;
43
- y: number;
44
- width: number;
45
- height: number;
46
- }
47
- /** Canonical path shape — either an axis-aligned rect (fast path) or a polygon command stream. */
48
- type Path = PolygonPath | RectPath;
49
-
50
3
  /** `Bounds` with a required rotation angle (radians). Pivot is the AABB
51
4
  * center of the unrotated `{x, y, width, height}`. */
52
5
  interface RotatedPose extends Bounds {
@@ -131,4 +84,4 @@ declare function visualBoundsViaDescriptor<TPose>(pose: TPose, geometry: PoseDes
131
84
  * copy of the pose's own bounds when the descriptor has none. */
132
85
  declare function translatePoseViaDescriptor<TPose>(pose: TPose, dx: number, dy: number, geometry: PoseDescriptor<TPose>): TPose;
133
86
 
134
- export { type PoseDescriptor as P, RECT_POSE_DESCRIPTOR as R, type Path as a, ROTATED_POSE_DESCRIPTOR as b, type PolygonPath as c, type RotatedPose as d, type RectPath as e, type PathFillRule as f, poseDescriptorForNode as p, translatePoseViaDescriptor as t, visualBoundsViaDescriptor as v };
87
+ export { type PoseDescriptor as P, RECT_POSE_DESCRIPTOR as R, ROTATED_POSE_DESCRIPTOR as a, type RotatedPose as b, poseDescriptorForNode as p, translatePoseViaDescriptor as t, visualBoundsViaDescriptor as v };
@@ -1,16 +1,17 @@
1
- import { M as Mesh } from './depSchema-BubKMv-2.js';
2
- export { C as CullRect, D as DrawCommand, E as Effect, G as GroupDrawCommand, I as IDENTITY_COLOR_MATRIX, a as ImageDrawCommand, b as ImageMinification, c as Mat3, P as PathDrawCommand, R as RenderTarget, S as SPRITE_STRIDE, d as ShaderCompileError, e as ShaderDrawCommand, f as ShaderProgramHandle, g as ShaderUniform, h as SolidPaint, i as SpriteSheet, j as SpritesDrawCommand, k as StrokeOptions, T as TextDrawCommand, V as ViewLike, W as WeaselRenderer, l as WeaselRendererOptions, m as blur, n as buildGradientRamp, o as cullDrawCommands, p as frameRect, q as mat3, r as registerEffect, s as registerProgram, t as tessellateStroke, v as viewToMat3, u as vignette } from './depSchema-BubKMv-2.js';
3
- import { a as Path } from './poseDescriptor-PgfVKfa0.js';
1
+ import { M as Mesh } from './depSchema-BhgZc0-Q.js';
2
+ export { C as CullRect, D as DrawCommand, E as Effect, G as GlMat3, a as GroupDrawCommand, I as IDENTITY_COLOR_MATRIX, b as ImageDrawCommand, c as ImageMinification, P as PathDrawCommand, R as RenderTarget, S as SPRITE_STRIDE, d as ShaderCompileError, e as ShaderDrawCommand, f as ShaderProgramHandle, g as ShaderUniform, h as SolidPaint, i as SpriteSheet, j as SpritesDrawCommand, k as StrokeOptions, T as TextDrawCommand, W as WeaselRenderer, l as WeaselRendererOptions, m as blur, n as buildGradientRamp, o as cullDrawCommands, p as frameRect, q as mat3, r as registerEffect, s as registerProgram, t as tessellateStroke, v as viewToMat3, u as vignette } from './depSchema-BhgZc0-Q.js';
3
+ import { P as Path } from './path-JEV2c5If.js';
4
4
  export { canQueryLocalFonts, enableLocalFontOutlines, hasFontOutlines, isCanvasFont, listFontOutlines, outlineStatus, registerCanvasFont, registerFont, registerFontOutlines, subscribeGlyphReady, unregisterCanvasFont, unregisterFontOutlines } from '@weasel-js/font';
5
5
  import { TextureHandle } from '@weasel-js/paint';
6
6
  export { TextureHandle } from '@weasel-js/paint';
7
+ export { View as ViewLike } from '@weasel-js/routing';
7
8
  import '@weasel-js/text';
9
+ import '@weasel-js/geom';
8
10
  import '@weasel-js/history';
9
- import '@weasel-js/routing';
10
- import './types-BdaK9PcP.js';
11
+ import './types-CxC8P6W0.js';
12
+ import './poseDescriptor-rZa9W5hJ.js';
11
13
  import '@weasel-js/routing/react';
12
- import './types-BHGdrOcu.js';
13
- import '@weasel-js/geom';
14
+ import './types-D_74YlWs.js';
14
15
 
15
16
  /**
16
17
  * registerTexture — accepts an image source, assigns an opaque id, stores in
package/dist/renderer.js CHANGED
@@ -1,9 +1,9 @@
1
- export { EFFECT_KIT_UNIFORMS, EFFECT_VERT_SRC, IDENTITY_COLOR_MATRIX, OUTLINE_MIN_SCREEN_PX, SPRITE_STRIDE, ShaderCompileError, WeaselRenderer, blur, buildGradientRamp, canQueryLocalFonts, cullDrawCommands, enableLocalFontOutlines, frameRect, hasFontOutlines, isCanvasFont, listFontOutlines, mat3, outlineStatus, registerCanvasFont, registerEffect, registerFont, registerFontOutlines, registerProgram, subscribeGlyphReady, tessellate, tessellateStroke, unregisterCanvasFont, unregisterFontOutlines, viewToMat3, vignette } from './chunk-GREL4MVO.js';
2
- import './chunk-LXJDWBEL.js';
3
- import './chunk-P6MGECVO.js';
4
- import './chunk-XXQ6FLCJ.js';
5
- import './chunk-HAGOFNP5.js';
6
- import './chunk-3LPQ2XZG.js';
1
+ export { EFFECT_KIT_UNIFORMS, EFFECT_VERT_SRC, IDENTITY_COLOR_MATRIX, OUTLINE_MIN_SCREEN_PX, SPRITE_STRIDE, ShaderCompileError, WeaselRenderer, blur, buildGradientRamp, canQueryLocalFonts, cullDrawCommands, enableLocalFontOutlines, frameRect, hasFontOutlines, isCanvasFont, listFontOutlines, mat3, outlineStatus, registerCanvasFont, registerEffect, registerFont, registerFontOutlines, registerProgram, subscribeGlyphReady, tessellate, tessellateStroke, unregisterCanvasFont, unregisterFontOutlines, viewToMat3, vignette } from './chunk-THCSDHII.js';
2
+ import './chunk-PNNZSYRD.js';
3
+ import './chunk-44EWMJV2.js';
4
+ import './chunk-H6N2JSZ3.js';
5
+ import './chunk-HPFJUUTF.js';
6
+ import './chunk-L5YNZYEG.js';
7
7
  import './chunk-T3UQ3F6R.js';
8
8
  import './chunk-D4AAWR64.js';
9
9
  import './chunk-DOBSZOPR.js';
package/dist/resize.d.ts CHANGED
@@ -1,11 +1,12 @@
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-CgcK2R_I.js';
2
- export { P as PoseDescriptor, R as RECT_POSE_DESCRIPTOR, b as ROTATED_POSE_DESCRIPTOR, p as poseDescriptorForNode } from './poseDescriptor-PgfVKfa0.js';
3
- import { B as BoundsConstraint } from './types-BHGdrOcu.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-7mCcm6qG.js';
2
+ export { P as PoseDescriptor, R as RECT_POSE_DESCRIPTOR, a as ROTATED_POSE_DESCRIPTOR, p as poseDescriptorForNode } from './poseDescriptor-rZa9W5hJ.js';
3
+ import { B as BoundsConstraint } from './types-D_74YlWs.js';
4
4
  import { Bounds, ModifierState, View } from '@weasel-js/routing';
5
- export { A as AUTO_POSE_DESCRIPTOR, i as isPathLike, a as isRectPose } from './autoPoseDescriptor-Dr6CwNZK.js';
5
+ export { A as AUTO_POSE_DESCRIPTOR, i as isPathLike, a as isRectPose } from './autoPoseDescriptor-_XOyF7t4.js';
6
6
  import { G as Guide } from './types-D2tTKEU0.js';
7
7
  import '@weasel-js/history';
8
- import './types-BdaK9PcP.js';
8
+ import './types-CxC8P6W0.js';
9
+ import './path-JEV2c5If.js';
9
10
 
10
11
  /** Resize constraint that stops a node shrinking past a minimum. The anchored
11
12
  * edge stays put, so clamping pushes the dragged edge back rather than moving
package/dist/resize.js CHANGED
@@ -1,5 +1,5 @@
1
- export { CORNER_ANCHORS, DEFAULT_RESIZE_BEHAVIORS, clampMinSize, cornerPoint, cornerResizeHandles, fixedCornerOf, hitCornerHandle, lockAspectWithModifier, pointSnapToGrid, snapToGrid, snapToGuides } from './chunk-XXQ6FLCJ.js';
2
- import './chunk-HAGOFNP5.js';
3
- export { AUTO_POSE_DESCRIPTOR, RECT_POSE_DESCRIPTOR, ROTATED_POSE_DESCRIPTOR, isPathLike, isRectPose, poseDescriptorForNode } from './chunk-3LPQ2XZG.js';
1
+ export { CORNER_ANCHORS, DEFAULT_RESIZE_BEHAVIORS, clampMinSize, cornerPoint, cornerResizeHandles, fixedCornerOf, hitCornerHandle, lockAspectWithModifier, pointSnapToGrid, snapToGrid, snapToGuides } from './chunk-H6N2JSZ3.js';
2
+ import './chunk-HPFJUUTF.js';
3
+ export { AUTO_POSE_DESCRIPTOR, RECT_POSE_DESCRIPTOR, ROTATED_POSE_DESCRIPTOR, isPathLike, isRectPose, poseDescriptorForNode } from './chunk-L5YNZYEG.js';
4
4
  //# sourceMappingURL=resize.js.map
5
5
  //# sourceMappingURL=resize.js.map
@@ -1,4 +1,5 @@
1
1
  import { Op } from '@weasel-js/history';
2
+ import { P as Path } from './path-JEV2c5If.js';
2
3
 
3
4
  /** A layout container's extent in world units. */
4
5
  type ContainerBounds = {
@@ -47,6 +48,25 @@ interface LayoutSnap<TPose> {
47
48
  y: number;
48
49
  }): DropTarget<TPose> | null;
49
50
  }
51
+ /** A container's drop region, in its local frame: the origin is the top-left
52
+ * of the container's world bounds. A path (a `RectPath` for a plain rect) is
53
+ * filled-region tested; a predicate is handed the local point. */
54
+ type DropRegion = Path | ((point: {
55
+ x: number;
56
+ y: number;
57
+ }) => boolean);
58
+ /**
59
+ * Which layout container a drag lands in when more than one contains the
60
+ * point being dropped.
61
+ *
62
+ * - `'innermost'` (default) — the deepest container in the tree, whatever is
63
+ * painted over it; ties at one depth go to the one painted later.
64
+ * - `'topmost'` — the container painted last, in the scene's render order
65
+ * across the whole tree, so a shallow container drawn over a deep one wins.
66
+ * - `'region'` — only containers whose strategy declares a `dropRegion`, and
67
+ * only when the point is inside it; ties are broken as for `'innermost'`.
68
+ */
69
+ type LayoutDropTargetMode = 'innermost' | 'topmost' | 'region';
50
70
  /** The container a layout strategy is arranging children within. */
51
71
  interface LayoutContainer {
52
72
  id: string;
@@ -86,6 +106,12 @@ interface LayoutStrategy<TPose> {
86
106
  x: number;
87
107
  y: number;
88
108
  }): boolean;
109
+ /** Optional: where this container takes drops. When it returns a region,
110
+ * the region replaces the container body (and `contains`) as the hit area
111
+ * for choosing a drop container — it may be smaller than the body or reach
112
+ * past it — and it is what makes the container a candidate at all under
113
+ * `LayoutDropTargetMode` `'region'`. `null` or absent keeps the body. */
114
+ dropRegion?(container: LayoutContainer): DropRegion | null;
89
115
  /** Optional: reject a drag before any drop-target work happens. A type-aware
90
116
  * container (a palette that only takes swatches, say) returns `false` and
91
117
  * the drag falls through to whatever container is under it next. When
@@ -382,4 +408,4 @@ interface OrderedAdapter {
382
408
  setChildOrder?(parentId: string | null, ids: string[]): void;
383
409
  }
384
410
 
385
- export type { AreaSelectAdapter as A, ClipboardSnapshot as C, DropTarget as D, InsertAdapter as I, LayoutStrategy as L, MoveAdapter as M, OrderedAdapter as O, ResizeAdapter as R, SnapTarget as S, SceneAdapter as a, LassoHitMode as b, LassoSelectAdapter as c, RotateAdapter as d, LayerEnumerableAdapter as e, LayoutSnap as f, ContainerBounds as g, LayoutChild as h, LayoutContainer as i, LayoutDragged as j };
411
+ export type { AreaSelectAdapter as A, ClipboardSnapshot as C, DropRegion as D, InsertAdapter as I, LayoutStrategy as L, MoveAdapter as M, OrderedAdapter as O, ResizeAdapter as R, SnapTarget as S, SceneAdapter as a, LayoutDropTargetMode as b, LassoHitMode as c, LassoSelectAdapter as d, RotateAdapter as e, LayerEnumerableAdapter as f, LayoutSnap as g, ContainerBounds as h, DropTarget as i, LayoutChild as j, LayoutContainer as k, LayoutDragged as l };
@@ -1,5 +1,5 @@
1
1
  import { Op } from '@weasel-js/history';
2
- import { S as SnapTarget, M as MoveAdapter, I as InsertAdapter } from './types-BdaK9PcP.js';
2
+ import { S as SnapTarget, M as MoveAdapter, I as InsertAdapter } from './types-CxC8P6W0.js';
3
3
  import { Bounds, ModifierState, ResizeAnchor } from '@weasel-js/routing';
4
4
 
5
5
  /** Pointer position in both world and client coords. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weasel-js/core",
3
- "version": "1.5.1",
3
+ "version": "1.6.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",
@@ -76,16 +76,16 @@
76
76
  },
77
77
  "peerDependencies": {
78
78
  "react": ">=18",
79
- "@weasel-js/font": "1.5.1"
79
+ "@weasel-js/font": "1.6.0"
80
80
  },
81
81
  "dependencies": {
82
- "@weasel-js/cursor": "1.5.1",
83
- "@weasel-js/geom": "1.5.1",
84
- "@weasel-js/gestures": "1.5.1",
85
- "@weasel-js/history": "1.5.1",
86
- "@weasel-js/paint": "1.5.1",
87
- "@weasel-js/routing": "1.5.1",
88
- "@weasel-js/text": "1.5.1",
82
+ "@weasel-js/cursor": "1.6.0",
83
+ "@weasel-js/geom": "1.6.0",
84
+ "@weasel-js/gestures": "1.6.0",
85
+ "@weasel-js/history": "1.6.0",
86
+ "@weasel-js/paint": "1.6.0",
87
+ "@weasel-js/routing": "1.6.0",
88
+ "@weasel-js/text": "1.6.0",
89
89
  "earcut": "2.2.4",
90
90
  "polygon-clipping": "^0.15.7"
91
91
  },
@@ -103,6 +103,6 @@
103
103
  "2d"
104
104
  ],
105
105
  "devDependencies": {
106
- "@weasel-js/modes": "1.5.1"
106
+ "@weasel-js/modes": "1.6.0"
107
107
  }
108
108
  }