github chakra-ui/zag @zag-js/floating-panel@2.0.0-next.0

latest releases: @zag-js/dnd@2.0.0-next.0, @zag-js/dismissable@2.0.0-next.0, @zag-js/popper@2.0.0-next.0...
pre-release8 hours ago

Minor Changes

  • #3061
    2d8aae2 Thanks
    @github-actions! - Add shared resize/move engine to @zag-js/rect-utils.
    Both floating panel and image cropper now delegate all constrained rect manipulation to this engine.

    New @zag-js/rect-utils exports:

    • applyMove, applyResize — pointer-driven move and resize with boundary, size limits, aspect ratio, grid snap, and
      center-origin support
    • clampPointInRange, centerInRect, centerOnPoint — point/rect positioning helpers
    • getDirectionDelta, getArrowKeyDelta, getKeyboardResizeDelta — keyboard interaction helpers
    • getCenterPoint, getMidpoint, isVisibleSize, scaleRect, scaleSize, roundRect, ZERO_POINT — general
      rect/point utilities
    • isLeftHandle, isRightHandle, isTopHandle, isBottomHandle, isCornerHandle, isHorizontalHandle,
      isVerticalHandle — handle direction helpers
    • HandlePosition type

    Breaking: Removed from @zag-js/rect-utils:

    • resizeRect, AffineTransform, compassDirectionMap, oppositeDirectionMap, ScalingOptions

    Breaking: Unified handle naming across floating panel and image cropper:

    • Floating panel: ResizeTriggerProps.axis.placement, data-axisdata-placement, ResizeTriggerAxis
      removed (use HandlePosition), resizeTriggerAxesresizeTriggerPlacements
    • Image cropper: HandleProps.position.placement, data-positiondata-placement, handlesplacements

Patch Changes

  • Updated dependencies [5820feb,
    2d8aae2]:
    • @zag-js/anatomy@2.0.0-next.0
    • @zag-js/types@2.0.0-next.0
    • @zag-js/rect-utils@2.0.0-next.0
    • @zag-js/dom-query@2.0.0-next.0
    • @zag-js/core@2.0.0-next.0
    • @zag-js/popper@2.0.0-next.0
    • @zag-js/store@2.0.0-next.0
    • @zag-js/utils@2.0.0-next.0

Don't miss a new zag release

NewReleases is sending notifications on new releases.