virtua 0.51.2 → 0.51.3

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/lib/vue/index.js CHANGED
@@ -338,28 +338,28 @@ a), y = ({t: e, o: t, i: r, l: o, u: n, m: s, p: i, h: l, S: c, v: a}, m = 0) =>
338
338
  let d = !!r.ssrCount;
339
339
  const m = r.horizontal, p = l(), _ = w(r.data.length, r.itemSize, r.cache), S = y(_, r.ssrCount), z = ((e, t) => {
340
340
  let r, o, n = b();
341
- const s = t ? "width" : "height", i = /* @__PURE__ */ new WeakMap, l = O(t => {
342
- const o = [];
343
- for (const {target: n, contentRect: l} of t) if (n.offsetParent) if (n === r) e.q(4, l[s]); else {
344
- const e = i.get(n);
345
- null != e && o.push([ e, l[s] ]);
341
+ const s = /* @__PURE__ */ new WeakMap, i = O(o => {
342
+ const n = [];
343
+ for (const {target: i, contentRect: {width: l, height: c}} of o) if (i === r) (l || c) && e.q(4, t ? l : c); else if (i.offsetParent) {
344
+ const e = s.get(i);
345
+ null != e && n.push([ e, t ? l : c ]);
346
346
  }
347
- o.length && e.q(3, o);
347
+ n.length && e.q(3, n);
348
348
  });
349
349
  return {
350
- ne(s, i = s.parentElement) {
351
- l.L(r = i), o = k(e, i, i, t, t && "rtl" === getComputedStyle(i).direction, () => {
352
- const e = t ? "overflowX" : "overflowY", r = i.style, o = r[e];
350
+ ne(s, l = s.parentElement) {
351
+ i.L(r = l), o = k(e, l, l, t, t && "rtl" === getComputedStyle(l).direction, () => {
352
+ const e = t ? "overflowX" : "overflowY", r = l.style, o = r[e];
353
353
  r[e] = "hidden", h(() => {
354
354
  r[e] = o;
355
355
  });
356
356
  }), n[1](!0);
357
357
  },
358
358
  I() {
359
- l.H(), o && o.H(), n[1](!1), n = b();
359
+ i.H(), o && o.H(), n[1](!1), n = b();
360
360
  },
361
- se: (e, t) => (i.set(e, t), l.L(e), () => {
362
- i.delete(e), l.V(e);
361
+ se: (e, t) => (s.set(e, t), i.L(e), () => {
362
+ s.delete(e), i.V(e);
363
363
  }),
364
364
  async J(e, t) {
365
365
  await n[0] && o.D(e, t);
@@ -564,36 +564,31 @@ a), y = ({t: e, o: t, i: r, l: o, u: n, m: s, p: i, h: l, S: c, v: a}, m = 0) =>
564
564
  let f = !!r.ssrCount;
565
565
  const d = r.horizontal, m = l(), p = w(r.data.length, r.itemSize, r.cache), g = y(p, r.ssrCount), h = ((e, t) => {
566
566
  let r, o, n, s, i, l = b();
567
- const c = t ? "width" : "height", a = /* @__PURE__ */ new WeakMap, u = O(t => {
568
- const o = [];
569
- for (const {target: e, contentRect: n} of t) {
570
- if (e === r) {
571
- i && i();
572
- continue;
573
- }
574
- if (!e.offsetParent) continue;
575
- const t = a.get(e);
576
- null != t && o.push([ t, n[c] ]);
567
+ const c = /* @__PURE__ */ new WeakMap, a = O(o => {
568
+ const n = [];
569
+ for (const {target: e, contentRect: {width: s, height: l}} of o) if (e === r) i && i(); else if (e.offsetParent) {
570
+ const r = c.get(e);
571
+ null != r && n.push([ r, t ? s : l ]);
577
572
  }
578
- o.length && e.q(3, o);
573
+ n.length && e.q(3, n);
579
574
  });
580
575
  return {
581
576
  ne(c) {
582
- const a = z(c), f = $(a), d = r = a.scrollingElement, m = t && "rtl" === getComputedStyle(d).direction, p = (e, t, r, o, n = 0) => {
577
+ const u = z(c), f = $(u), d = r = u.scrollingElement, m = t && "rtl" === getComputedStyle(d).direction, p = (e, t, r, o, n = 0) => {
583
578
  const s = o ? "offsetLeft" : "offsetTop", i = n + (m ? t.clientWidth - e[s] - e.offsetWidth : e[s]), l = e.offsetParent;
584
579
  return e !== r && l ? p(l, t, r, o, i) : i;
585
- }, g = s = () => p(c, d, a.body, t), h = i = () => {
580
+ }, g = s = () => p(c, d, u.body, t), h = i = () => {
586
581
  e.q(4, d[t ? "clientWidth" : "clientHeight"]);
587
582
  };
588
- f.addEventListener("resize", h), u.L(d), n = () => {
583
+ f.addEventListener("resize", h), a.L(d), n = () => {
589
584
  f.removeEventListener("resize", h);
590
585
  }, o = k(e, f, d, t, m, null, g), l[1](!0);
591
586
  },
592
587
  I() {
593
- n && n(), u.H(), o && o.H(), l[1](!1), l = b();
588
+ n && n(), a.H(), o && o.H(), l[1](!1), l = b();
594
589
  },
595
- se: (e, t) => (a.set(e, t), u.L(e), () => {
596
- a.delete(e), u.V(e);
590
+ se: (e, t) => (c.set(e, t), a.L(e), () => {
591
+ c.delete(e), a.V(e);
597
592
  }),
598
593
  async J(e, t) {
599
594
  await l[0] && o.D(e, t);