adverich-kun-ui 0.1.649 → 0.1.651

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.
@@ -23,10 +23,11 @@ function n(n, r, i, a) {
23
23
  v();
24
24
  let t = e?.$el || e;
25
25
  if (!(t instanceof HTMLElement)) return;
26
- let n = g(t), r = () => {
27
- p ||= requestAnimationFrame(() => {
26
+ let n = g(t), r = (e) => {
27
+ let t = e?.target;
28
+ t instanceof HTMLElement && s.value?.contains(t) || (p ||= requestAnimationFrame(() => {
28
29
  p = null, y();
29
- });
30
+ }));
30
31
  }, i = {
31
32
  capture: !0,
32
33
  passive: !0
@@ -58,8 +59,8 @@ function n(n, r, i, a) {
58
59
  return;
59
60
  }
60
61
  {
61
- let e = window.innerHeight, t = n.hideDetails ? 0 : 19, r = e - i.bottom + t - 8;
62
- l.value = Math.max(0, Math.round(r));
62
+ let e = window.innerHeight, t = n.hideDetails ? 0 : 19, r = e - i.bottom + t - 8, a = i.top - 8, o = u.value === "top" ? a : r;
63
+ l.value = Math.max(0, Math.round(o));
63
64
  }
64
65
  requestAnimationFrame(() => {
65
66
  let t = r.getBoundingClientRect();
@@ -67,7 +68,7 @@ function n(n, r, i, a) {
67
68
  requestAnimationFrame(() => y(e + 1));
68
69
  return;
69
70
  }
70
- let a = window.innerHeight, s = window.innerWidth, c = n.hideDetails ? 0 : 19, d = r.offsetHeight, f = n.width === "w-full" ? i.width : r.offsetWidth, p = a - i.bottom + c - 8, m = i.top - 8, h = !(p >= d) && (m >= d || m > p);
71
+ let a = window.innerHeight, s = window.innerWidth, c = n.hideDetails ? 0 : 19, d = Math.max(r.scrollHeight, r.offsetHeight), f = n.width === "w-full" ? i.width : r.offsetWidth, p = a - i.bottom + c - 8, m = i.top - 8, h = !(p >= d) && (m >= d || m > p);
71
72
  u.value = h ? "top" : "bottom";
72
73
  let [, g] = (n.origin && n.origin !== "auto" ? n.origin : b(n.location)).split(" "), _ = 0;
73
74
  _ = g === "right" ? i.right - f : g === "center" ? i.left + i.width / 2 - f / 2 : i.left, n.width !== "w-full" && (_ + f > s - 8 && (_ = s - f - 8), _ < 8 && (_ = 8));
@@ -192,7 +193,7 @@ function n(n, r, i, a) {
192
193
  let e = s.value;
193
194
  if (!(e instanceof HTMLElement)) return;
194
195
  let t = e.getBoundingClientRect();
195
- (t.bottom > window.innerHeight - 8 || t.top < 8) && y();
196
+ (t.bottom > window.innerHeight - 4 || t.top < 4) && y();
196
197
  });
197
198
  }), D.observe(e));
198
199
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.649",
3
+ "version": "0.1.651",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",