@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/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
- function i() {
73744
- const o = window.visualViewport;
73745
- if (!o) return;
73746
- t.value = o.height, n.value = o.offsetTop;
73747
- const u = Math.max(0, window.innerHeight - o.height);
73748
- r.value = u, a.value = u > 120;
73749
- }
73750
- return e && (i(), window.visualViewport.addEventListener("resize", i), window.visualViewport.addEventListener("scroll", i), i3(() => {
73751
- window.visualViewport.removeEventListener("resize", i), window.visualViewport.removeEventListener("scroll", i);
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 } = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluepic/embed",
3
- "version": "0.4.0-next.172",
3
+ "version": "0.4.0-next.173",
4
4
  "description": "Bluepic embed sdk",
5
5
  "type": "module",
6
6
  "sideEffects": false,