Skip to content

v0.1.2

Choose a tag to compare

@alexberce alexberce released this 25 May 18:16
· 24 commits to main since this release

Fixed

  • Position FLIP is now gated by the element's position relative to its
    immediate parent, not its body-relative offset. Previously, any layout
    change that shrank content above a tracked list — a delete in one
    demo, for instance — would shift everything below it in body
    coordinates, and Shift would FLIP every unrelated element down the
    page back to its old absolute position. Now only elements whose
    position within their own parent changes get animated; the body-
    relative delta is still what the FLIP translates by, so bottom-
    anchored layouts (toast stacks) keep working.
  • Cached layouts now refresh on window resize. The MutationObserver
    doesn't fire on a resize, so previously every tracked element's
    __shiftLayout went stale and the next real layout change would FLIP
    against the pre-resize positions — animating the resize delta into
    whatever change came next. A debounced resize listener now remeasures
    every tracked element so the next FLIP starts from the current layout.