@bluepic/embed 0.4.0-next.172 → 0.4.0-next.173
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/dist/bluepic-embed.iife.js +1 -1
- package/dist/bluepic-embed.umd.js +1 -1
- package/dist/main.cjs +1 -1
- package/dist/main.mjs +15 -9
- package/package.json +1 -1
package/dist/main.mjs
CHANGED
|
@@ -73740,15 +73740,21 @@ function Vpe(e) {
|
|
|
73740
73740
|
}
|
|
73741
73741
|
function Hpe() {
|
|
73742
73742
|
const e = typeof window < "u" && !!window.visualViewport, t = oe(typeof window > "u" ? 0 : window.innerHeight), n = oe(0), r = oe(0), a = oe(!1);
|
|
73743
|
-
|
|
73744
|
-
|
|
73745
|
-
|
|
73746
|
-
|
|
73747
|
-
|
|
73748
|
-
|
|
73749
|
-
|
|
73750
|
-
|
|
73751
|
-
|
|
73743
|
+
let i = 0;
|
|
73744
|
+
function o() {
|
|
73745
|
+
const d = window.visualViewport;
|
|
73746
|
+
if (!d) return;
|
|
73747
|
+
t.value = d.height, n.value = d.offsetTop, i = Math.max(i, d.height);
|
|
73748
|
+
const f = Math.max(window.innerHeight, i), l = Math.max(0, f - d.height);
|
|
73749
|
+
r.value = l, a.value = l > 120;
|
|
73750
|
+
}
|
|
73751
|
+
const u = [0, 60, 160, 320, 600, 1e3];
|
|
73752
|
+
let s = [];
|
|
73753
|
+
function c() {
|
|
73754
|
+
s.forEach(clearTimeout), s = u.map((d) => setTimeout(o, d));
|
|
73755
|
+
}
|
|
73756
|
+
return e && (o(), window.visualViewport.addEventListener("resize", c), window.visualViewport.addEventListener("scroll", c), document.addEventListener("focusin", c), document.addEventListener("focusout", c), i3(() => {
|
|
73757
|
+
s.forEach(clearTimeout), window.visualViewport.removeEventListener("resize", c), window.visualViewport.removeEventListener("scroll", c), document.removeEventListener("focusin", c), document.removeEventListener("focusout", c);
|
|
73752
73758
|
})), { supported: e, height: t, offsetTop: n, keyboardInset: r, keyboardOpen: a };
|
|
73753
73759
|
}
|
|
73754
73760
|
function qpe(e, { margin: t = 16, hardStopMs: n = 1200 } = {}) {
|