virtua 0.48.6 → 0.48.7
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/core/index.cjs +1 -1
- package/lib/core/index.cjs.map +1 -1
- package/lib/core/index.js +1 -1
- package/lib/core/index.js.map +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/solid/index.cjs +119 -123
- package/lib/solid/index.cjs.map +1 -1
- package/lib/solid/index.js +99 -103
- package/lib/solid/index.js.map +1 -1
- package/lib/solid/index.jsx +11 -14
- package/lib/solid/index.jsx.map +1 -1
- package/lib/vue/index.cjs +37 -39
- package/lib/vue/index.cjs.map +1 -1
- package/lib/vue/index.js +60 -62
- package/lib/vue/index.js.map +1 -1
- package/package.json +12 -9
package/lib/vue/index.cjs
CHANGED
|
@@ -38,15 +38,15 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
38
38
|
const n = t - e.l;
|
|
39
39
|
return e.i = o ? -1 : r(t - 1, e.i), e.l = t, n > 0 ? (f(e.u, n), f(e.t, n, o),
|
|
40
40
|
e.o * n) : (e.u.splice(n), (o ? e.t.splice(0, -n) : e.t.splice(n)).reduce(((t, r) => t - (-1 === r ? e.o : r)), 0));
|
|
41
|
-
}, b = e => e.documentElement,
|
|
42
|
-
let u = !!i, b = 1,
|
|
41
|
+
}, b = e => e.documentElement, g = e => e.ownerDocument, v = e => e.defaultView, y = /*#__PURE__*/ u((() => !!/iP(hone|od|ad)/.test(navigator.userAgent) || "MacIntel" === navigator.platform && navigator.maxTouchPoints > 0)), S = /*#__PURE__*/ u((() => "scrollBehavior" in b(document).style)), z = (e, s = 40, i = 0, c, a = !1) => {
|
|
42
|
+
let u = !!i, b = 1, g = 0, v = 0, S = 0, z = 0, x = 0, $ = 0, w = 0, I = 0, O = t, k = [ 0, u ? o(i - 1, 0) : -1 ], j = 0, N = !1;
|
|
43
43
|
const q = ((e, t, n) => ({
|
|
44
44
|
o: t,
|
|
45
45
|
t: n ? f(n.slice(0, r(e, n.length)), o(0, e - n.length)) : f([], e),
|
|
46
46
|
l: e,
|
|
47
47
|
i: -1,
|
|
48
48
|
u: f([], e + 1)
|
|
49
|
-
}))(e, c ? c[1] : s, c && c[0]), B = new Set, T = () => S -
|
|
49
|
+
}))(e, c ? c[1] : s, c && c[0]), B = new Set, T = () => S - v, M = () => T() + x + z, E = (e, t) => ((e, t, o, n) => {
|
|
50
50
|
if (n = r(n, e.l - 1), m(e, n) <= t) {
|
|
51
51
|
const r = h(e, o, n);
|
|
52
52
|
return [ h(e, t, n, r), r ];
|
|
@@ -71,21 +71,21 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
71
71
|
if (!N || u) return k;
|
|
72
72
|
let t, n;
|
|
73
73
|
if ($) [t, n] = k; else {
|
|
74
|
-
let s = o(0, M()), i = s +
|
|
74
|
+
let s = o(0, M()), i = s + g;
|
|
75
75
|
a || (e = o(0, e), 1 !== w && (s -= e), 2 !== w && (i += e)), [t, n] = k = E(o(0, s), o(0, i)),
|
|
76
76
|
O && (t = r(t, O[0]), n = o(n, O[1]));
|
|
77
77
|
}
|
|
78
78
|
return [ o(t, 0), r(n, q.l - 1) ];
|
|
79
79
|
},
|
|
80
|
-
S: e => h(q, e -
|
|
80
|
+
S: e => h(q, e - v),
|
|
81
81
|
I: C,
|
|
82
82
|
O: R,
|
|
83
83
|
k: A,
|
|
84
84
|
j: () => q.l,
|
|
85
85
|
N: () => S,
|
|
86
86
|
q: () => 0 !== w,
|
|
87
|
-
B: () =>
|
|
88
|
-
T: () =>
|
|
87
|
+
B: () => g,
|
|
88
|
+
T: () => v,
|
|
89
89
|
M: P,
|
|
90
90
|
P: () => ($ = z, z = 0, [ $, 2 === I ]),
|
|
91
91
|
R: (e, t) => {
|
|
@@ -105,7 +105,7 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
105
105
|
const t = r - S, o = n(t);
|
|
106
106
|
e && o < n(e) + 1 || 0 !== I || (w = t < 0 ? 2 : 1), u && (u = !1), S = r, c = 4;
|
|
107
107
|
const s = T();
|
|
108
|
-
s >= -
|
|
108
|
+
s >= -g && s <= P() && (c += 1, i = o > g);
|
|
109
109
|
break;
|
|
110
110
|
}
|
|
111
111
|
|
|
@@ -117,13 +117,13 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
117
117
|
{
|
|
118
118
|
const e = r.filter((([e, t]) => !C(e, t)));
|
|
119
119
|
if (!e.length) break;
|
|
120
|
-
H(e.reduce(((e, [t, r]) => ((2 === I || (O && 1 === I ? t < O[0] : R(
|
|
120
|
+
H(e.reduce(((e, [t, r]) => ((2 === I || (O && 1 === I ? t < O[0] : R(1 !== w && 0 === I ? t + 1 : t) < T())) && (e += r - A(t)),
|
|
121
121
|
e)), 0));
|
|
122
122
|
for (const [t, r] of e) {
|
|
123
123
|
const e = A(t), o = p(q, t, r);
|
|
124
124
|
a && (j += o ? r : r - e);
|
|
125
125
|
}
|
|
126
|
-
a &&
|
|
126
|
+
a && g && j > g && (H(((e, t) => {
|
|
127
127
|
let r = 0;
|
|
128
128
|
const n = [];
|
|
129
129
|
e.t.forEach(((e, o) => {
|
|
@@ -136,7 +136,7 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
case 4:
|
|
139
|
-
|
|
139
|
+
g !== r && (g || (N = i = !0), g = r, c = 3);
|
|
140
140
|
break;
|
|
141
141
|
|
|
142
142
|
case 5:
|
|
@@ -144,7 +144,7 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
144
144
|
break;
|
|
145
145
|
|
|
146
146
|
case 6:
|
|
147
|
-
|
|
147
|
+
v = r;
|
|
148
148
|
break;
|
|
149
149
|
|
|
150
150
|
case 7:
|
|
@@ -152,7 +152,7 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
152
152
|
break;
|
|
153
153
|
|
|
154
154
|
case 8:
|
|
155
|
-
O = E(r, r +
|
|
155
|
+
O = E(r, r + g), c = 1;
|
|
156
156
|
}
|
|
157
157
|
c && (b = 1 + (2147483647 & b), s && x && (z += x, x = 0), B.forEach((([e, t]) => {
|
|
158
158
|
c & e && t(i);
|
|
@@ -246,7 +246,7 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
246
246
|
let t;
|
|
247
247
|
return {
|
|
248
248
|
F(r) {
|
|
249
|
-
(t || (t = new (g(
|
|
249
|
+
(t || (t = new (v(g(r)).ResizeObserver)(e))).observe(r);
|
|
250
250
|
},
|
|
251
251
|
J(e) {
|
|
252
252
|
t.unobserve(e);
|
|
@@ -299,24 +299,23 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
299
299
|
}), {
|
|
300
300
|
flush: "post"
|
|
301
301
|
}), () => {
|
|
302
|
-
|
|
303
|
-
const {X: i, U: l, G: c, Z: a} = t, u = n.value, {style: f, ...d} = null !== (s = t.ee) && void 0 !== s ? s : {}, p = {
|
|
302
|
+
const {X: s, U: i, G: l, Z: c} = t, a = n.value, {style: u, ...f} = t.ee ?? {}, d = {
|
|
304
303
|
contain: "layout style",
|
|
305
|
-
position:
|
|
306
|
-
[
|
|
307
|
-
[
|
|
308
|
-
[
|
|
309
|
-
visibility: !
|
|
310
|
-
...
|
|
304
|
+
position: a && l ? void 0 : "absolute",
|
|
305
|
+
[i ? "height" : "width"]: "100%",
|
|
306
|
+
[i ? "top" : "left"]: "0px",
|
|
307
|
+
[i ? "left" : "top"]: o.value + "px",
|
|
308
|
+
visibility: !a || l ? void 0 : "hidden",
|
|
309
|
+
...u
|
|
311
310
|
};
|
|
312
|
-
return
|
|
311
|
+
return i && (d.display = "inline-flex"), e.createVNode(c, e.mergeProps({
|
|
313
312
|
ref: r,
|
|
314
|
-
style:
|
|
315
|
-
},
|
|
316
|
-
default: () => [
|
|
313
|
+
style: d
|
|
314
|
+
}, f), "function" == typeof (p = s) || "[object Object]" === Object.prototype.toString.call(p) && !e.isVNode(p) ? s : {
|
|
315
|
+
default: () => [ s ],
|
|
317
316
|
_: 2
|
|
318
317
|
}, 16, [ "style" ]);
|
|
319
|
-
var
|
|
318
|
+
var p;
|
|
320
319
|
};
|
|
321
320
|
}
|
|
322
321
|
}), j = (e, t) => {
|
|
@@ -431,7 +430,7 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
431
430
|
_.value;
|
|
432
431
|
const t = p.v(r.bufferSize);
|
|
433
432
|
return e && N(e, t) ? e : t;
|
|
434
|
-
})),
|
|
433
|
+
})), g = e.computed((() => _.value && p.q())), v = e.computed((() => _.value && p.M()));
|
|
435
434
|
return e.onMounted((() => {
|
|
436
435
|
u = !1;
|
|
437
436
|
const t = d.value, o = requestAnimationFrame((() => {
|
|
@@ -475,24 +474,23 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
475
474
|
scrollTo: h.se,
|
|
476
475
|
scrollBy: h.ie
|
|
477
476
|
}), () => {
|
|
478
|
-
const t = r.as, o = r.item, n =
|
|
479
|
-
|
|
480
|
-
const i = c.default({
|
|
477
|
+
const t = r.as, o = r.item, n = v.value, s = h.ne(), i = [], a = t => {
|
|
478
|
+
const n = c.default({
|
|
481
479
|
item: r.data[t],
|
|
482
480
|
index: t
|
|
483
481
|
});
|
|
484
482
|
return e.createVNode(k, {
|
|
485
|
-
key: j(
|
|
483
|
+
key: j(n, t),
|
|
486
484
|
L: _,
|
|
487
485
|
W: p,
|
|
488
486
|
Y: m.re,
|
|
489
487
|
D: t,
|
|
490
|
-
X:
|
|
488
|
+
X: n,
|
|
491
489
|
U: f,
|
|
492
490
|
K: s,
|
|
493
491
|
G: u,
|
|
494
492
|
Z: o,
|
|
495
|
-
ee:
|
|
493
|
+
ee: r.itemProps?.({
|
|
496
494
|
item: r.data[t],
|
|
497
495
|
index: t
|
|
498
496
|
})
|
|
@@ -514,7 +512,7 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
514
512
|
position: "relative",
|
|
515
513
|
width: f ? n + "px" : "100%",
|
|
516
514
|
height: f ? "100%" : n + "px",
|
|
517
|
-
pointerEvents:
|
|
515
|
+
pointerEvents: g.value ? "none" : void 0
|
|
518
516
|
}
|
|
519
517
|
}, "function" == typeof (y = i) || "[object Object]" === Object.prototype.toString.call(y) && !e.isVNode(y) ? i : {
|
|
520
518
|
default: () => [ i ],
|
|
@@ -628,7 +626,7 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
628
626
|
let l;
|
|
629
627
|
return {
|
|
630
628
|
te(t) {
|
|
631
|
-
const r = g(
|
|
629
|
+
const r = v(g(t)), o = () => {
|
|
632
630
|
e.A(4, r[n]);
|
|
633
631
|
};
|
|
634
632
|
r.addEventListener("resize", o), c(o), l = () => {
|
|
@@ -646,7 +644,7 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
646
644
|
let r, o, n = a(), s = !1;
|
|
647
645
|
const l = t ? "left" : "top", [c] = I(e, (() => n[0]), ((e, t) => {
|
|
648
646
|
e = $(e, s);
|
|
649
|
-
const o = g(
|
|
647
|
+
const o = v(g(r));
|
|
650
648
|
t ? o.scroll({
|
|
651
649
|
[l]: e,
|
|
652
650
|
behavior: "smooth"
|
|
@@ -660,7 +658,7 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
660
658
|
return {
|
|
661
659
|
oe(i) {
|
|
662
660
|
r = i;
|
|
663
|
-
const c = t ? "scrollX" : "scrollY", a =
|
|
661
|
+
const c = t ? "scrollX" : "scrollY", a = g(i), f = v(a);
|
|
664
662
|
t && (s = "rtl" === getComputedStyle(b(a)).direction), o = w(e, f, t, (() => $(f[c], s)), ((t, r) => {
|
|
665
663
|
r ? f.scroll({
|
|
666
664
|
[l]: $(e.N() + t, s)
|
|
@@ -685,7 +683,7 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
685
683
|
n = "end";
|
|
686
684
|
}
|
|
687
685
|
}
|
|
688
|
-
const a =
|
|
686
|
+
const a = g(r), f = v(a), d = b(a), p = () => e.B() - (t ? d.clientWidth : d.clientHeight);
|
|
689
687
|
c((() => l + u(r, a.body, f, t) + e.O(o) + ("end" === n ? e.k(o) - (e.B() - p()) : "center" === n ? (e.k(o) - (e.B() - p())) / 2 : 0)), s);
|
|
690
688
|
}
|
|
691
689
|
};
|