@yewdiel21/motion-kit 0.19.0 → 0.19.1

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.
@@ -21540,7 +21540,10 @@ function createScrollIsland(root, options = {}) {
21540
21540
  const size = as === "island" ? ISLAND_HEIGHT : Math.max(MIN_BAR, Math.min(height, height * (scroller.clientHeight / Math.max(1, scroller.scrollHeight))));
21541
21541
  const top = (height - size) * progress();
21542
21542
  if (as !== "island") return { top, height: size, width: BAR_WIDTH, borderRadius: BAR_WIDTH / 2 };
21543
- return { top, height: size, width: Math.min(Math.max(ISLAND_HEIGHT, track().right - track().left - INSET * 2), Math.max(ISLAND_HEIGHT, content.scrollWidth + 28)), borderRadius: size / 2 };
21543
+ content.style.maxWidth = "none";
21544
+ const width = content.offsetWidth;
21545
+ content.style.removeProperty("max-width");
21546
+ return { top, height: size, width: Math.min(Math.max(ISLAND_HEIGHT, track().right - track().left - INSET * 2), Math.max(ISLAND_HEIGHT, width)), borderRadius: size / 2 };
21544
21547
  };
21545
21548
  const place3 = () => {
21546
21549
  const box = track();
@@ -21592,6 +21595,10 @@ function createScrollIsland(root, options = {}) {
21592
21595
  if (!page) scope.on(window, "scroll", () => state !== "hidden" && place3(), { passive: true, capture: true });
21593
21596
  scope.on(window, "resize", () => go(state, true));
21594
21597
  const near = (x, y) => {
21598
+ if (state === "island") {
21599
+ const capsule = thumb.getBoundingClientRect();
21600
+ if (x >= capsule.left && x <= capsule.right && y >= capsule.top && y <= capsule.bottom) return true;
21601
+ }
21595
21602
  const box = track();
21596
21603
  return y >= box.top - INSET && y <= box.top + box.height + INSET && x <= box.right && box.right - x <= reach;
21597
21604
  };
@@ -25795,4 +25802,4 @@ export {
25795
25802
  createMorphingPageDots,
25796
25803
  createNotFound
25797
25804
  };
25798
- //# sourceMappingURL=chunk-Y4GIBTRG.js.map
25805
+ //# sourceMappingURL=chunk-NCGNIPJE.js.map