@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.
- package/README.md +5 -0
- package/bin/motion-kit.mjs +0 -0
- package/dist/auto/index.js +2 -2
- package/dist/{chunk-PEDYJ2TV.js → chunk-LIXSOGS2.js} +2 -2
- package/dist/chunk-LIXSOGS2.js.map +1 -0
- package/dist/{chunk-Y4GIBTRG.js → chunk-NCGNIPJE.js} +9 -2
- package/dist/{chunk-Y4GIBTRG.js.map → chunk-NCGNIPJE.js.map} +1 -1
- package/dist/{chunk-KDIJX6G4.js → chunk-PVN7YVKV.js} +2 -2
- package/dist/css/components/pill-button.css +7 -5
- package/dist/css/components/scroll-island.css +6 -0
- package/dist/elements/index.js +2 -2
- package/dist/index.css +13 -5
- package/dist/index.js +3 -3
- package/dist/react/index.js +3 -3
- package/package.json +16 -9
- package/src/components/pill-button/engine.ts +1 -1
- package/src/components/pill-button/pill-button.css +7 -5
- package/src/components/scroll-island/engine.ts +10 -1
- package/src/components/scroll-island/scroll-island.css +6 -0
- package/dist/chunk-PEDYJ2TV.js.map +0 -1
- /package/dist/{chunk-KDIJX6G4.js.map → chunk-PVN7YVKV.js.map} +0 -0
|
@@ -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
|
-
|
|
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-
|
|
25805
|
+
//# sourceMappingURL=chunk-NCGNIPJE.js.map
|