virtua 0.49.2 → 0.50.0
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/README.md +39 -5
- package/lib/angular/ListItem.d.ts +1 -0
- package/lib/angular/VList.d.ts +85 -0
- package/lib/angular/Virtualizer.d.ts +141 -0
- package/lib/angular/WindowVirtualizer.d.ts +103 -0
- package/lib/angular/index.d.ts +6 -0
- package/lib/angular/index.js +1148 -0
- package/lib/angular/index.js.map +1 -0
- package/lib/angular/utils.d.ts +19 -0
- package/lib/core/index.cjs +237 -233
- package/lib/core/index.cjs.map +1 -1
- package/lib/core/index.d.ts +6 -6
- package/lib/core/index.js +272 -272
- package/lib/core/index.js.map +1 -1
- package/lib/index.cjs +529 -499
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +321 -315
- package/lib/index.js.map +1 -1
- package/lib/react/VGrid.d.ts +2 -2
- package/lib/react/VList.d.ts +3 -3
- package/lib/react/Virtualizer.d.ts +3 -3
- package/lib/react/WindowVirtualizer.d.ts +3 -3
- package/lib/react/index.d.ts +9 -9
- package/lib/react/types.d.ts +1 -1
- package/lib/solid/VList.d.ts +3 -6
- package/lib/solid/Virtualizer.d.ts +2 -5
- package/lib/solid/WindowVirtualizer.d.ts +2 -5
- package/lib/solid/index.cjs +331 -323
- package/lib/solid/index.cjs.map +1 -1
- package/lib/solid/index.d.ts +7 -7
- package/lib/solid/index.js +249 -257
- package/lib/solid/index.js.map +1 -1
- package/lib/solid/index.jsx +1224 -1566
- package/lib/solid/index.jsx.map +1 -1
- package/lib/solid/types.d.ts +1 -1
- package/lib/svelte/ListItem.svelte +12 -2
- package/lib/svelte/VList.svelte +2 -0
- package/lib/svelte/VList.type.d.ts +3 -3
- package/lib/svelte/Virtualizer.svelte +2 -0
- package/lib/svelte/Virtualizer.type.d.ts +8 -3
- package/lib/svelte/WindowVirtualizer.type.d.ts +2 -2
- package/lib/svelte/index.d.ts +6 -6
- package/lib/svelte/index.js +4 -4
- package/lib/svelte/types.d.ts +1 -1
- package/lib/svelte/utils.d.ts +7 -0
- package/lib/svelte/utils.js +11 -11
- package/lib/svelte/utils.js.map +1 -1
- package/lib/vue/VList.d.ts +2 -3
- package/lib/vue/Virtualizer.d.ts +3 -4
- package/lib/vue/WindowVirtualizer.d.ts +2 -3
- package/lib/vue/index.cjs +327 -317
- package/lib/vue/index.cjs.map +1 -1
- package/lib/vue/index.d.ts +6 -6
- package/lib/vue/index.js +284 -284
- package/lib/vue/index.js.map +1 -1
- package/lib/vue/utils.d.ts +1 -1
- package/package.json +40 -17
- package/lib/svelte/index.js.map +0 -1
package/lib/vue/index.cjs
CHANGED
|
@@ -1,227 +1,231 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, {
|
|
2
|
+
value: "Module"
|
|
3
|
+
});
|
|
4
|
+
|
|
5
|
+
let e = require("vue");
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
var {min: t, max: r, abs: o, floor: n} = Math, s = (e, o, n) => t(n, r(o, e)), i = e => [ ...e ].sort((e, t) => e - t), l = "function" == typeof queueMicrotask ? queueMicrotask : e => {
|
|
4
8
|
Promise.resolve().then(e);
|
|
5
|
-
},
|
|
9
|
+
}, c = () => {
|
|
6
10
|
let e;
|
|
7
11
|
return [ new Promise(t => {
|
|
8
12
|
e = t;
|
|
9
13
|
}), e ];
|
|
10
|
-
},
|
|
14
|
+
}, a = e => {
|
|
11
15
|
let t;
|
|
12
16
|
return () => (e && (t = e(), e = void 0), t);
|
|
13
|
-
},
|
|
17
|
+
}, u = (e, t, r) => {
|
|
14
18
|
const o = r ? "unshift" : "push";
|
|
15
19
|
for (let r = 0; r < t; r++) e[o](-1);
|
|
16
20
|
return e;
|
|
17
|
-
},
|
|
21
|
+
}, f = (e, t) => {
|
|
18
22
|
const r = e.t[t];
|
|
19
23
|
return -1 === r ? e.o : r;
|
|
20
|
-
},
|
|
21
|
-
const n = -1 === e.t[
|
|
22
|
-
return e.t[
|
|
23
|
-
},
|
|
24
|
+
}, d = (e, r, o) => {
|
|
25
|
+
const n = -1 === e.t[r];
|
|
26
|
+
return e.t[r] = o, e.i = t(r, e.i), n;
|
|
27
|
+
}, p = (e, t) => {
|
|
24
28
|
if (!e.l) return 0;
|
|
25
29
|
if (e.i >= t) return e.u[t];
|
|
26
30
|
e.i < 0 && (e.u[0] = 0, e.i = 0);
|
|
27
31
|
let r = e.i, o = e.u[r];
|
|
28
|
-
for (;r < t; ) o +=
|
|
32
|
+
for (;r < t; ) o += f(e, r), e.u[++r] = o;
|
|
29
33
|
return e.i = t, o;
|
|
30
|
-
},
|
|
31
|
-
let
|
|
34
|
+
}, m = (e, t, r = 0, o = e.l - 1) => {
|
|
35
|
+
let i = r;
|
|
32
36
|
for (;r <= o; ) {
|
|
33
|
-
const
|
|
34
|
-
|
|
37
|
+
const s = n((r + o) / 2);
|
|
38
|
+
p(e, s) <= t ? (i = s, r = s + 1) : o = s - 1;
|
|
35
39
|
}
|
|
36
|
-
return i
|
|
37
|
-
},
|
|
38
|
-
const n =
|
|
39
|
-
return e.i = o ? -1 : r
|
|
40
|
+
return s(i, 0, e.l - 1);
|
|
41
|
+
}, h = (e, r, o) => {
|
|
42
|
+
const n = r - e.l;
|
|
43
|
+
return e.i = o ? -1 : t(r - 1, e.i), e.l = r, n > 0 ? (u(e.u, n), u(e.t, n, o),
|
|
40
44
|
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
|
-
},
|
|
42
|
-
let
|
|
43
|
-
const
|
|
44
|
-
o
|
|
45
|
-
t: n ?
|
|
45
|
+
}, _ = e => e.documentElement, b = e => e.ownerDocument, g = e => e.defaultView, v = /*#__PURE__*/ a(() => !!/iP(hone|od|ad)/.test(navigator.userAgent) || "MacIntel" === navigator.platform && navigator.maxTouchPoints > 0), y = /*#__PURE__*/ a(() => "scrollBehavior" in _(document).style), S = (e, n = 40, s = 0, l, c = !1) => {
|
|
46
|
+
let a = !!s, _ = 1, b = 0, g = 0, y = 0, S = 0, z = 0, x = 0, $ = 0, w = 0, I = null, O = [ 0, a ? r(s - 1, 0) : -1 ], k = 0, j = !1;
|
|
47
|
+
const N = ((e, o, n) => ({
|
|
48
|
+
o,
|
|
49
|
+
t: n ? u(n.slice(0, t(e, n.length)), r(0, e - n.length)) : u([], e),
|
|
46
50
|
l: e,
|
|
47
51
|
i: -1,
|
|
48
|
-
u:
|
|
49
|
-
}))(e,
|
|
50
|
-
if (n =
|
|
51
|
-
const
|
|
52
|
-
return [
|
|
52
|
+
u: u([], e + 1)
|
|
53
|
+
}))(e, l ? l[1] : n, l && l[0]), q = /* @__PURE__ */ new Set, B = () => y - g, T = () => B() + z + S, M = (e, r) => ((e, r, o, n) => {
|
|
54
|
+
if (n = t(n, e.l - 1), p(e, n) <= r) {
|
|
55
|
+
const t = m(e, o, n);
|
|
56
|
+
return [ m(e, r, n, t), t ];
|
|
53
57
|
}
|
|
54
58
|
{
|
|
55
|
-
const
|
|
56
|
-
return [
|
|
59
|
+
const t = m(e, r, void 0, n);
|
|
60
|
+
return [ t, m(e, o, t) ];
|
|
57
61
|
}
|
|
58
|
-
})(
|
|
59
|
-
const r =
|
|
60
|
-
return t ?
|
|
61
|
-
},
|
|
62
|
-
e && (
|
|
62
|
+
})(N, e, r, O[0]), E = () => p(N, N.l), P = (e, t) => {
|
|
63
|
+
const r = p(N, e) - z;
|
|
64
|
+
return t ? E() - r - R(e) : r;
|
|
65
|
+
}, R = e => f(N, e), A = (e, t = -1) => N.t[e] === t, C = e => {
|
|
66
|
+
e && (v() && 0 !== $ || I && 1 === w ? z += e : S += e);
|
|
63
67
|
};
|
|
64
68
|
return {
|
|
65
69
|
p: () => {
|
|
66
|
-
|
|
70
|
+
q.clear();
|
|
67
71
|
},
|
|
68
|
-
m: () =>
|
|
69
|
-
h: () => (e => [ e.t.slice(), e.o ])(
|
|
72
|
+
m: () => _,
|
|
73
|
+
h: () => (e => [ e.t.slice(), e.o ])(N),
|
|
70
74
|
v: (e = 200) => {
|
|
71
|
-
if (!
|
|
72
|
-
let
|
|
73
|
-
if (
|
|
74
|
-
let s =
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
if (!j || a) return O;
|
|
76
|
+
let o, n;
|
|
77
|
+
if (x) [o, n] = O; else {
|
|
78
|
+
let s = r(0, T()), i = s + b;
|
|
79
|
+
c || (e = r(0, e), 1 !== $ && (s -= e), 2 !== $ && (i += e)), [o, n] = O = M(r(0, s), r(0, i)),
|
|
80
|
+
I && (o = t(o, I[0]), n = r(n, I[1]));
|
|
77
81
|
}
|
|
78
|
-
return [ o
|
|
82
|
+
return [ r(o, 0), t(n, N.l - 1) ];
|
|
79
83
|
},
|
|
80
|
-
S: e =>
|
|
81
|
-
I:
|
|
82
|
-
O:
|
|
83
|
-
k:
|
|
84
|
-
j: () =>
|
|
85
|
-
N: () =>
|
|
86
|
-
q: () => 0 !==
|
|
87
|
-
B: () =>
|
|
88
|
-
T: () =>
|
|
89
|
-
M:
|
|
90
|
-
P: () => (
|
|
84
|
+
S: e => m(N, e - g),
|
|
85
|
+
I: A,
|
|
86
|
+
O: P,
|
|
87
|
+
k: R,
|
|
88
|
+
j: () => N.l,
|
|
89
|
+
N: () => y,
|
|
90
|
+
q: () => 0 !== $,
|
|
91
|
+
B: () => b,
|
|
92
|
+
T: () => g,
|
|
93
|
+
M: E,
|
|
94
|
+
P: () => (x = S, S = 0, [ x, 2 === w ]),
|
|
91
95
|
R: (e, t) => {
|
|
92
96
|
const r = [ e, t ];
|
|
93
|
-
return
|
|
94
|
-
|
|
97
|
+
return q.add(r), () => {
|
|
98
|
+
q.delete(r);
|
|
95
99
|
};
|
|
96
100
|
},
|
|
97
|
-
A: (e,
|
|
98
|
-
let
|
|
101
|
+
A: (e, t) => {
|
|
102
|
+
let n, s, l = 0;
|
|
99
103
|
switch (e) {
|
|
100
104
|
case 1:
|
|
101
105
|
{
|
|
102
|
-
if (
|
|
103
|
-
const e =
|
|
104
|
-
|
|
105
|
-
const
|
|
106
|
-
e &&
|
|
107
|
-
const
|
|
108
|
-
|
|
106
|
+
if (t === y && 0 === w) break;
|
|
107
|
+
const e = x;
|
|
108
|
+
x = 0;
|
|
109
|
+
const r = t - y, n = o(r);
|
|
110
|
+
e && n < o(e) + 1 || 0 !== w || ($ = r < 0 ? 2 : 1), a && (a = !1), y = t, l = 4;
|
|
111
|
+
const i = B();
|
|
112
|
+
i >= -b && i <= E() && (l += 1, s = n > b);
|
|
109
113
|
break;
|
|
110
114
|
}
|
|
111
115
|
|
|
112
116
|
case 2:
|
|
113
|
-
|
|
117
|
+
l = 8, 0 !== $ && (n = !0, l += 1), $ = 0, w = 0, I = null;
|
|
114
118
|
break;
|
|
115
119
|
|
|
116
120
|
case 3:
|
|
117
121
|
{
|
|
118
|
-
const e =
|
|
122
|
+
const e = t.filter(([e, t]) => !A(e, t));
|
|
119
123
|
if (!e.length) break;
|
|
120
|
-
|
|
124
|
+
C(e.reduce((e, [t, r]) => {
|
|
121
125
|
let o;
|
|
122
|
-
if (2 ===
|
|
123
|
-
const e =
|
|
124
|
-
o = 1 !==
|
|
126
|
+
if (2 === w) o = !0; else if (I && 1 === w) o = t < I[0]; else {
|
|
127
|
+
const e = B(), r = P(t), n = R(t);
|
|
128
|
+
o = 1 !== $ && 0 === w ? r + n <= e : r < e && r + n < e + b;
|
|
125
129
|
}
|
|
126
|
-
return o && (e += r -
|
|
130
|
+
return o && (e += r - R(t)), e;
|
|
127
131
|
}, 0));
|
|
128
132
|
for (const [t, r] of e) {
|
|
129
|
-
const e =
|
|
130
|
-
|
|
133
|
+
const e = R(t), o = d(N, t, r);
|
|
134
|
+
c && (k += o ? r : r - e);
|
|
131
135
|
}
|
|
132
|
-
|
|
133
|
-
let
|
|
136
|
+
c && b && k > b && (C(((e, t) => {
|
|
137
|
+
let o = 0;
|
|
134
138
|
const n = [];
|
|
135
|
-
e.t.forEach((e,
|
|
136
|
-
-1 !== e && (n.push(e),
|
|
139
|
+
e.t.forEach((e, r) => {
|
|
140
|
+
-1 !== e && (n.push(e), r < t && o++);
|
|
137
141
|
}), e.i = -1;
|
|
138
|
-
const s =
|
|
139
|
-
return ((e.o = a) - u) *
|
|
140
|
-
})(
|
|
142
|
+
const s = i(n), l = s.length, c = l / 2 | 0, a = l % 2 == 0 ? (s[c - 1] + s[c]) / 2 : s[c], u = e.o;
|
|
143
|
+
return ((e.o = a) - u) * r(t - o, 0);
|
|
144
|
+
})(N, m(N, T()))), c = !1), l = 3, s = !0;
|
|
141
145
|
break;
|
|
142
146
|
}
|
|
143
147
|
|
|
144
148
|
case 4:
|
|
145
|
-
|
|
149
|
+
b !== t && (b || (j = s = !0), b = t, l = 3);
|
|
146
150
|
break;
|
|
147
151
|
|
|
148
152
|
case 5:
|
|
149
|
-
|
|
153
|
+
t[1] ? (C(h(N, t[0], !0)), w = 2, l = 1) : (h(N, t[0]), l = 1);
|
|
150
154
|
break;
|
|
151
155
|
|
|
152
156
|
case 6:
|
|
153
|
-
|
|
157
|
+
g = t;
|
|
154
158
|
break;
|
|
155
159
|
|
|
156
160
|
case 7:
|
|
157
|
-
|
|
161
|
+
w = 1;
|
|
158
162
|
break;
|
|
159
163
|
|
|
160
164
|
case 8:
|
|
161
|
-
|
|
165
|
+
I = M(t, t + b), l = 1;
|
|
162
166
|
}
|
|
163
|
-
|
|
164
|
-
|
|
167
|
+
l && (_ = 1 + (2147483647 & _), n && z && (S += z, z = 0), q.forEach(([e, t]) => {
|
|
168
|
+
l & e && t(s);
|
|
165
169
|
}));
|
|
166
170
|
}
|
|
167
171
|
};
|
|
168
|
-
},
|
|
169
|
-
const
|
|
170
|
-
let
|
|
171
|
-
const
|
|
172
|
-
let
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
},
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
if (
|
|
179
|
-
|
|
172
|
+
}, z = setTimeout, x = (e, t) => t ? -e : e, $ = (e, t, r, o, n, s) => {
|
|
173
|
+
const i = Date.now;
|
|
174
|
+
let l = 0, c = !1, a = !1, u = !1, f = !1;
|
|
175
|
+
const d = (() => {
|
|
176
|
+
let t;
|
|
177
|
+
const r = () => {
|
|
178
|
+
null != t && clearTimeout(t);
|
|
179
|
+
}, o = () => {
|
|
180
|
+
r(), t = z(() => {
|
|
181
|
+
t = null, (() => {
|
|
182
|
+
if (c || a) return c = !1, void d();
|
|
183
|
+
u = !1, e.A(2);
|
|
180
184
|
})();
|
|
181
185
|
}, 150);
|
|
182
186
|
};
|
|
183
|
-
return
|
|
184
|
-
})(),
|
|
185
|
-
|
|
186
|
-
},
|
|
187
|
-
if (
|
|
188
|
-
const
|
|
189
|
-
150 >
|
|
187
|
+
return o.C = r, o;
|
|
188
|
+
})(), p = () => {
|
|
189
|
+
l = i(), u && (f = !0), s && e.A(6, s()), e.A(1, o()), d();
|
|
190
|
+
}, m = t => {
|
|
191
|
+
if (c || !e.q() || t.ctrlKey) return;
|
|
192
|
+
const o = i() - l;
|
|
193
|
+
150 > o && 50 < o && (r ? t.deltaX : t.deltaY) && (c = !0);
|
|
194
|
+
}, h = () => {
|
|
195
|
+
a = !0, u = f = !1;
|
|
190
196
|
}, _ = () => {
|
|
191
|
-
|
|
192
|
-
}, b = () => {
|
|
193
|
-
u = !1, y() && (f = !0);
|
|
197
|
+
a = !1, v() && (u = !0);
|
|
194
198
|
};
|
|
195
|
-
return
|
|
199
|
+
return t.addEventListener("scroll", p), t.addEventListener("wheel", m, {
|
|
196
200
|
passive: !0
|
|
197
|
-
}),
|
|
201
|
+
}), t.addEventListener("touchstart", h, {
|
|
198
202
|
passive: !0
|
|
199
|
-
}),
|
|
203
|
+
}), t.addEventListener("touchend", _, {
|
|
200
204
|
passive: !0
|
|
201
205
|
}), {
|
|
202
206
|
H: () => {
|
|
203
|
-
|
|
204
|
-
|
|
207
|
+
t.removeEventListener("scroll", p), t.removeEventListener("wheel", m), t.removeEventListener("touchstart", h),
|
|
208
|
+
t.removeEventListener("touchend", _), d.C();
|
|
205
209
|
},
|
|
206
210
|
V: () => {
|
|
207
211
|
const [t, r] = e.P();
|
|
208
|
-
t && (
|
|
212
|
+
t && (n(t, r, f), f = !1, r && e.B() > e.M() && e.A(1, o()));
|
|
209
213
|
}
|
|
210
214
|
};
|
|
211
|
-
},
|
|
215
|
+
}, w = (e, t, r) => {
|
|
212
216
|
let o;
|
|
213
217
|
return [ async (n, s) => {
|
|
214
218
|
if (!await t()) return;
|
|
215
219
|
o && o();
|
|
216
220
|
const i = () => {
|
|
217
|
-
const [t, r] =
|
|
221
|
+
const [t, r] = c();
|
|
218
222
|
return o = () => {
|
|
219
223
|
r(!1);
|
|
220
|
-
}, e.B() &&
|
|
224
|
+
}, e.B() && z(o, 150), [ t, e.R(2, () => {
|
|
221
225
|
r(!0);
|
|
222
226
|
}) ];
|
|
223
227
|
};
|
|
224
|
-
if (s &&
|
|
228
|
+
if (s && y()) e.A(8, n()), l(async () => {
|
|
225
229
|
for (;;) {
|
|
226
230
|
let t = !0;
|
|
227
231
|
for (let [r, o] = e.v(); r <= o; r++) if (e.I(r)) {
|
|
@@ -248,11 +252,11 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
248
252
|
}, () => {
|
|
249
253
|
o && o();
|
|
250
254
|
} ];
|
|
251
|
-
},
|
|
255
|
+
}, I = e => {
|
|
252
256
|
let t;
|
|
253
257
|
return {
|
|
254
258
|
F(r) {
|
|
255
|
-
(t || (t = new (
|
|
259
|
+
(t || (t = new (g(b(r)).ResizeObserver)(e))).observe(r);
|
|
256
260
|
},
|
|
257
261
|
J(e) {
|
|
258
262
|
t.unobserve(e);
|
|
@@ -261,7 +265,7 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
261
265
|
t && t.disconnect();
|
|
262
266
|
}
|
|
263
267
|
};
|
|
264
|
-
},
|
|
268
|
+
}, O = /*#__PURE__*/ /*#__PURE__*/ (0, e.defineComponent)({
|
|
265
269
|
props: {
|
|
266
270
|
L: {
|
|
267
271
|
type: Object,
|
|
@@ -299,8 +303,9 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
299
303
|
ee: Object
|
|
300
304
|
},
|
|
301
305
|
setup(t) {
|
|
302
|
-
const r = e.ref(), o = e.computed(() => t.L.value && t.W.O(t.D, t.K)), n =
|
|
303
|
-
|
|
306
|
+
const r = (0, e.ref)(), o = (0, e.computed)(() => t.L.value && t.W.O(t.D, t.K)), n = (0,
|
|
307
|
+
e.computed)(() => t.L.value && t.W.I(t.D));
|
|
308
|
+
return (0, e.watch)(() => r.value && t.D, (e, o, n) => {
|
|
304
309
|
n(t.Y(r.value, t.D));
|
|
305
310
|
}, {
|
|
306
311
|
flush: "post"
|
|
@@ -314,23 +319,25 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
314
319
|
visibility: !a || l ? void 0 : "hidden",
|
|
315
320
|
...u
|
|
316
321
|
};
|
|
317
|
-
return i && (d.display = "inline-flex"), e.createVNode(c, e.mergeProps({
|
|
322
|
+
return i && (d.display = "inline-flex"), (0, e.createVNode)(c, (0, e.mergeProps)({
|
|
318
323
|
ref: r,
|
|
319
324
|
style: d
|
|
320
|
-
}, f), "function" == typeof (p = s) || "[object Object]" === Object.prototype.toString.call(p) && !
|
|
325
|
+
}, f), "function" == typeof (p = s) || "[object Object]" === Object.prototype.toString.call(p) && !(0,
|
|
326
|
+
e.isVNode)(p) ? s : {
|
|
321
327
|
default: () => [ s ],
|
|
322
328
|
_: 2
|
|
323
329
|
}, 16, [ "style" ]);
|
|
324
330
|
var p;
|
|
325
331
|
};
|
|
326
332
|
}
|
|
327
|
-
}),
|
|
333
|
+
}), k = (e, t) => {
|
|
328
334
|
if (1 === e.length) {
|
|
329
335
|
const t = e[0].key;
|
|
330
336
|
if (null != t) return t;
|
|
331
337
|
}
|
|
332
338
|
return "_" + t;
|
|
333
|
-
},
|
|
339
|
+
}, j = (e, t) => e[0] === t[0] && e[1] === t[1], N = /*#__PURE__*/ /*#__PURE__*/ (0,
|
|
340
|
+
e.defineComponent)({
|
|
334
341
|
props: {
|
|
335
342
|
data: {
|
|
336
343
|
type: Array,
|
|
@@ -359,51 +366,51 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
359
366
|
cache: Object
|
|
360
367
|
},
|
|
361
368
|
emits: [ "scroll", "scrollEnd" ],
|
|
362
|
-
setup(
|
|
363
|
-
let
|
|
364
|
-
const
|
|
365
|
-
let
|
|
366
|
-
const
|
|
367
|
-
const
|
|
368
|
-
for (const {target:
|
|
369
|
-
const e =
|
|
370
|
-
|
|
369
|
+
setup(t, {emit: o, expose: n, slots: l}) {
|
|
370
|
+
let a = !!t.ssrCount;
|
|
371
|
+
const u = t.horizontal, f = (0, e.ref)(), d = S(t.data.length, t.itemSize, t.ssrCount, t.cache, !t.itemSize), p = ((e, t) => {
|
|
372
|
+
let r;
|
|
373
|
+
const o = t ? "width" : "height", n = /* @__PURE__ */ new WeakMap, s = I(t => {
|
|
374
|
+
const s = [];
|
|
375
|
+
for (const {target: i, contentRect: l} of t) if (i.offsetParent) if (i === r) e.A(4, l[o]); else {
|
|
376
|
+
const e = n.get(i);
|
|
377
|
+
null != e && s.push([ e, l[o] ]);
|
|
371
378
|
}
|
|
372
|
-
|
|
379
|
+
s.length && e.A(3, s);
|
|
373
380
|
});
|
|
374
381
|
return {
|
|
375
382
|
te(e) {
|
|
376
|
-
|
|
383
|
+
s.F(r = e);
|
|
377
384
|
},
|
|
378
|
-
re: (e, t) => (
|
|
379
|
-
|
|
385
|
+
re: (e, t) => (n.set(e, t), s.F(e), () => {
|
|
386
|
+
n.delete(e), s.J(e);
|
|
380
387
|
}),
|
|
381
|
-
p:
|
|
388
|
+
p: s.H
|
|
382
389
|
};
|
|
383
|
-
})(
|
|
384
|
-
let r, o, n =
|
|
385
|
-
const l = t ? "scrollLeft" : "scrollTop",
|
|
386
|
-
e =
|
|
390
|
+
})(d, u), m = ((e, t) => {
|
|
391
|
+
let r, o, n = c(), i = !1;
|
|
392
|
+
const l = t ? "scrollLeft" : "scrollTop", a = t ? "overflowX" : "overflowY", [u, f] = w(e, () => n[0], (e, o) => {
|
|
393
|
+
e = x(e, i), o ? r.scrollTo({
|
|
387
394
|
[t ? "left" : "top"]: e,
|
|
388
395
|
behavior: "smooth"
|
|
389
396
|
}) : r[l] = e;
|
|
390
397
|
});
|
|
391
398
|
return {
|
|
392
|
-
oe(
|
|
393
|
-
r =
|
|
399
|
+
oe(s, c) {
|
|
400
|
+
r = c, t && (i = "rtl" === getComputedStyle(c).direction), o = $(e, c, t, () => x(c[l], i), (t, r, o) => {
|
|
394
401
|
if (o) {
|
|
395
|
-
const e =
|
|
396
|
-
e[
|
|
397
|
-
e[
|
|
402
|
+
const e = c.style, t = e[a];
|
|
403
|
+
e[a] = "hidden", z(() => {
|
|
404
|
+
e[a] = t;
|
|
398
405
|
});
|
|
399
406
|
}
|
|
400
|
-
|
|
407
|
+
c[l] = x(e.N() + t, i), r && f();
|
|
401
408
|
}), n[1](!0);
|
|
402
409
|
},
|
|
403
410
|
p() {
|
|
404
|
-
o && o.H(), n[1](!1), n =
|
|
411
|
+
o && o.H(), n[1](!1), n = c();
|
|
405
412
|
},
|
|
406
|
-
ne: () =>
|
|
413
|
+
ne: () => i,
|
|
407
414
|
se(e) {
|
|
408
415
|
u(() => e);
|
|
409
416
|
},
|
|
@@ -411,7 +418,7 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
411
418
|
t += e.N(), u(() => t);
|
|
412
419
|
},
|
|
413
420
|
le(t, {align: r, smooth: o, offset: n = 0} = {}) {
|
|
414
|
-
if (t =
|
|
421
|
+
if (t = s(t, 0, e.j() - 1), "nearest" === r) {
|
|
415
422
|
const o = e.O(t), n = e.N();
|
|
416
423
|
if (o < n) r = "start"; else {
|
|
417
424
|
if (!(o + e.k(t) > n + e.B())) return;
|
|
@@ -424,110 +431,111 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
424
431
|
o && o.V();
|
|
425
432
|
}
|
|
426
433
|
};
|
|
427
|
-
})(
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
}),
|
|
431
|
-
|
|
432
|
-
}),
|
|
433
|
-
|
|
434
|
+
})(d, u), h = (0, e.ref)(d.m());
|
|
435
|
+
d.R(1, () => {
|
|
436
|
+
h.value = d.m();
|
|
437
|
+
}), d.R(4, () => {
|
|
438
|
+
o("scroll", d.N());
|
|
439
|
+
}), d.R(8, () => {
|
|
440
|
+
o("scrollEnd");
|
|
434
441
|
});
|
|
435
|
-
const
|
|
436
|
-
|
|
437
|
-
const
|
|
438
|
-
return e &&
|
|
439
|
-
}),
|
|
440
|
-
return e.onMounted(() => {
|
|
441
|
-
|
|
442
|
-
const
|
|
442
|
+
const _ = (0, e.computed)(e => {
|
|
443
|
+
h.value;
|
|
444
|
+
const r = d.v(t.bufferSize);
|
|
445
|
+
return e && j(e, r) ? e : r;
|
|
446
|
+
}), b = (0, e.computed)(() => h.value && d.q()), g = (0, e.computed)(() => h.value && d.M());
|
|
447
|
+
return (0, e.onMounted)(() => {
|
|
448
|
+
a = !1;
|
|
449
|
+
const r = f.value, o = requestAnimationFrame(() => {
|
|
443
450
|
const e = e => {
|
|
444
|
-
|
|
451
|
+
p.te(e), m.oe(r, e);
|
|
445
452
|
};
|
|
446
|
-
|
|
453
|
+
t.scrollRef ? e(t.scrollRef) : e(r.parentElement);
|
|
447
454
|
});
|
|
448
|
-
e.onUnmounted(() => {
|
|
455
|
+
(0, e.onUnmounted)(() => {
|
|
449
456
|
cancelAnimationFrame(o);
|
|
450
457
|
});
|
|
451
|
-
}), e.onUnmounted(() => {
|
|
452
|
-
|
|
453
|
-
}), e.watch(() =>
|
|
454
|
-
|
|
455
|
-
}), e.watch(() =>
|
|
456
|
-
|
|
458
|
+
}), (0, e.onUnmounted)(() => {
|
|
459
|
+
d.p(), p.p(), m.p();
|
|
460
|
+
}), (0, e.watch)(() => t.data.length, e => {
|
|
461
|
+
d.A(5, [ e, t.shift ]);
|
|
462
|
+
}), (0, e.watch)(() => t.startMargin, e => {
|
|
463
|
+
d.A(6, e);
|
|
457
464
|
}, {
|
|
458
465
|
immediate: !0
|
|
459
|
-
}), e.watch([
|
|
460
|
-
|
|
466
|
+
}), (0, e.watch)([ h ], () => {
|
|
467
|
+
m.ce();
|
|
461
468
|
}, {
|
|
462
469
|
flush: "post"
|
|
463
|
-
}),
|
|
470
|
+
}), n({
|
|
464
471
|
get cache() {
|
|
465
|
-
return
|
|
472
|
+
return d.h();
|
|
466
473
|
},
|
|
467
474
|
get scrollOffset() {
|
|
468
|
-
return
|
|
475
|
+
return d.N();
|
|
469
476
|
},
|
|
470
477
|
get scrollSize() {
|
|
471
|
-
return (e =>
|
|
478
|
+
return (e => r(e.M(), e.B()))(d);
|
|
472
479
|
},
|
|
473
480
|
get viewportSize() {
|
|
474
|
-
return
|
|
481
|
+
return d.B();
|
|
475
482
|
},
|
|
476
|
-
findItemIndex:
|
|
477
|
-
getItemOffset:
|
|
478
|
-
getItemSize:
|
|
479
|
-
scrollToIndex:
|
|
480
|
-
scrollTo:
|
|
481
|
-
scrollBy:
|
|
483
|
+
findItemIndex: d.S,
|
|
484
|
+
getItemOffset: d.O,
|
|
485
|
+
getItemSize: d.k,
|
|
486
|
+
scrollToIndex: m.le,
|
|
487
|
+
scrollTo: m.se,
|
|
488
|
+
scrollBy: m.ie
|
|
482
489
|
}), () => {
|
|
483
|
-
const
|
|
484
|
-
const n =
|
|
485
|
-
item:
|
|
486
|
-
index:
|
|
490
|
+
const r = t.as, o = t.item, n = g.value, s = m.ne(), c = [], v = r => {
|
|
491
|
+
const n = l.default({
|
|
492
|
+
item: t.data[r],
|
|
493
|
+
index: r
|
|
487
494
|
});
|
|
488
|
-
return e.createVNode(
|
|
489
|
-
key:
|
|
490
|
-
L:
|
|
491
|
-
W:
|
|
492
|
-
Y:
|
|
493
|
-
D:
|
|
495
|
+
return (0, e.createVNode)(O, {
|
|
496
|
+
key: k(n, r),
|
|
497
|
+
L: h,
|
|
498
|
+
W: d,
|
|
499
|
+
Y: p.re,
|
|
500
|
+
D: r,
|
|
494
501
|
X: n,
|
|
495
|
-
U:
|
|
502
|
+
U: u,
|
|
496
503
|
K: s,
|
|
497
|
-
G:
|
|
504
|
+
G: a,
|
|
498
505
|
Z: o,
|
|
499
|
-
ee:
|
|
500
|
-
item:
|
|
501
|
-
index:
|
|
506
|
+
ee: t.itemProps?.({
|
|
507
|
+
item: t.data[r],
|
|
508
|
+
index: r
|
|
502
509
|
})
|
|
503
510
|
}, null, 8, [ "_stateVersion", "_store", "_resizer", "_index", "_children", "_isHorizontal", "_isNegative", "_isSSR", "_as", "_itemProps" ]);
|
|
504
511
|
};
|
|
505
|
-
if (
|
|
506
|
-
const e = new Set(
|
|
507
|
-
for (let [t, r] =
|
|
508
|
-
|
|
509
|
-
|
|
512
|
+
if (t.keepMounted) {
|
|
513
|
+
const e = new Set(t.keepMounted);
|
|
514
|
+
for (let [t, r] = _.value; t <= r; t++) e.add(t);
|
|
515
|
+
i([ ...e ]).forEach(e => {
|
|
516
|
+
c.push(v(e));
|
|
510
517
|
});
|
|
511
|
-
} else for (let [e, t] =
|
|
512
|
-
return e.createVNode(
|
|
513
|
-
ref:
|
|
518
|
+
} else for (let [e, t] = _.value; e <= t; e++) c.push(v(e));
|
|
519
|
+
return (0, e.createVNode)(r, {
|
|
520
|
+
ref: f,
|
|
514
521
|
style: {
|
|
515
522
|
contain: "size style",
|
|
516
523
|
overflowAnchor: "none",
|
|
517
524
|
flex: "none",
|
|
518
525
|
position: "relative",
|
|
519
|
-
width:
|
|
520
|
-
height:
|
|
521
|
-
pointerEvents:
|
|
526
|
+
width: u ? n + "px" : "100%",
|
|
527
|
+
height: u ? "100%" : n + "px",
|
|
528
|
+
pointerEvents: b.value ? "none" : void 0
|
|
522
529
|
}
|
|
523
|
-
}, "function" == typeof (y =
|
|
524
|
-
|
|
530
|
+
}, "function" == typeof (y = c) || "[object Object]" === Object.prototype.toString.call(y) && !(0,
|
|
531
|
+
e.isVNode)(y) ? c : {
|
|
532
|
+
default: () => [ c ],
|
|
525
533
|
_: 2
|
|
526
534
|
}, 8, [ "style" ]);
|
|
527
535
|
var y;
|
|
528
536
|
};
|
|
529
537
|
}
|
|
530
|
-
}),
|
|
538
|
+
}), q = /*#__PURE__*/ /*#__PURE__*/ (0, e.defineComponent)({
|
|
531
539
|
props: {
|
|
532
540
|
data: {
|
|
533
541
|
type: Array,
|
|
@@ -548,7 +556,7 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
548
556
|
r("scroll", e);
|
|
549
557
|
}, l = () => {
|
|
550
558
|
r("scrollEnd");
|
|
551
|
-
}, c = e.ref();
|
|
559
|
+
}, c = (0, e.ref)();
|
|
552
560
|
return o({
|
|
553
561
|
get cache() {
|
|
554
562
|
return c.value.cache;
|
|
@@ -569,7 +577,7 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
569
577
|
scrollTo: (...e) => c.value.scrollTo(...e),
|
|
570
578
|
scrollBy: (...e) => c.value.scrollBy(...e)
|
|
571
579
|
}), () => {
|
|
572
|
-
return e.createVNode("div", {
|
|
580
|
+
return (0, e.createVNode)("div", {
|
|
573
581
|
style: {
|
|
574
582
|
display: s ? "inline-block" : "block",
|
|
575
583
|
[s ? "overflowX" : "overflowY"]: "auto",
|
|
@@ -577,7 +585,7 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
577
585
|
width: "100%",
|
|
578
586
|
height: "100%"
|
|
579
587
|
}
|
|
580
|
-
}, [ e.createVNode(
|
|
588
|
+
}, [ (0, e.createVNode)(N, {
|
|
581
589
|
ref: c,
|
|
582
590
|
data: t.data,
|
|
583
591
|
bufferSize: t.bufferSize,
|
|
@@ -590,14 +598,15 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
590
598
|
cache: t.cache,
|
|
591
599
|
onScroll: i,
|
|
592
600
|
onScrollEnd: l
|
|
593
|
-
}, (r = n, "function" == typeof r || "[object Object]" === Object.prototype.toString.call(r) && !
|
|
601
|
+
}, (r = n, "function" == typeof r || "[object Object]" === Object.prototype.toString.call(r) && !(0,
|
|
602
|
+
e.isVNode)(r) ? n : {
|
|
594
603
|
default: () => [ n ],
|
|
595
604
|
_: 2
|
|
596
605
|
}), 8, [ "data", "bufferSize", "itemSize", "itemProps", "shift", "ssrCount", "horizontal", "keepMounted", "cache", "onScroll", "onScrollEnd" ]) ], 4);
|
|
597
606
|
var r;
|
|
598
607
|
};
|
|
599
608
|
}
|
|
600
|
-
}),
|
|
609
|
+
}), B = /*#__PURE__*/ /*#__PURE__*/ (0, e.defineComponent)({
|
|
601
610
|
props: {
|
|
602
611
|
data: {
|
|
603
612
|
type: Array,
|
|
@@ -618,39 +627,39 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
618
627
|
cache: Object
|
|
619
628
|
},
|
|
620
629
|
emits: [ "scroll", "scrollEnd" ],
|
|
621
|
-
setup(
|
|
622
|
-
const
|
|
623
|
-
const
|
|
624
|
-
const
|
|
625
|
-
for (const {target: e, contentRect:
|
|
630
|
+
setup(t, {emit: r, slots: o, expose: n}) {
|
|
631
|
+
const i = t.horizontal, a = (0, e.ref)(), u = S(t.data.length, t.itemSize, void 0, t.cache, !t.itemSize), f = ((e, t) => {
|
|
632
|
+
const r = t ? "width" : "height", o = t ? "innerWidth" : "innerHeight", n = /* @__PURE__ */ new WeakMap, s = I(t => {
|
|
633
|
+
const o = [];
|
|
634
|
+
for (const {target: e, contentRect: s} of t) {
|
|
626
635
|
if (!e.offsetParent) continue;
|
|
627
|
-
const
|
|
628
|
-
|
|
636
|
+
const t = n.get(e);
|
|
637
|
+
null != t && o.push([ t, s[r] ]);
|
|
629
638
|
}
|
|
630
|
-
|
|
639
|
+
o.length && e.A(3, o);
|
|
631
640
|
});
|
|
632
|
-
let
|
|
641
|
+
let i;
|
|
633
642
|
return {
|
|
634
643
|
te(t) {
|
|
635
|
-
const r =
|
|
636
|
-
e.A(4, r[
|
|
644
|
+
const r = g(b(t)), n = () => {
|
|
645
|
+
e.A(4, r[o]);
|
|
637
646
|
};
|
|
638
|
-
r.addEventListener("resize",
|
|
639
|
-
r.removeEventListener("resize",
|
|
647
|
+
r.addEventListener("resize", n), l(n), i = () => {
|
|
648
|
+
r.removeEventListener("resize", n);
|
|
640
649
|
};
|
|
641
650
|
},
|
|
642
|
-
re: (e, t) => (
|
|
643
|
-
|
|
651
|
+
re: (e, t) => (n.set(e, t), s.F(e), () => {
|
|
652
|
+
n.delete(e), s.J(e);
|
|
644
653
|
}),
|
|
645
654
|
p() {
|
|
646
|
-
|
|
655
|
+
i && i(), s.H();
|
|
647
656
|
}
|
|
648
657
|
};
|
|
649
|
-
})(
|
|
650
|
-
let r, o, n =
|
|
651
|
-
const l = t ? "left" : "top", [
|
|
652
|
-
e =
|
|
653
|
-
const o =
|
|
658
|
+
})(u, i), d = ((e, t) => {
|
|
659
|
+
let r, o, n = c(), i = !1;
|
|
660
|
+
const l = t ? "left" : "top", [a] = w(e, () => n[0], (e, t) => {
|
|
661
|
+
e = x(e, i);
|
|
662
|
+
const o = g(b(r));
|
|
654
663
|
t ? o.scroll({
|
|
655
664
|
[l]: e,
|
|
656
665
|
behavior: "smooth"
|
|
@@ -658,117 +667,118 @@ const t = null, {min: r, max: o, abs: n, floor: s} = Math, i = (e, t, n) => r(n,
|
|
|
658
667
|
[l]: e
|
|
659
668
|
});
|
|
660
669
|
}), u = (e, t, r, o, n = 0) => {
|
|
661
|
-
const
|
|
670
|
+
const s = o ? "offsetLeft" : "offsetTop", l = n + (o && i ? r.innerWidth - e[s] - e.offsetWidth : e[s]), c = e.offsetParent;
|
|
662
671
|
return e !== t && c ? u(c, t, r, o, l) : l;
|
|
663
672
|
};
|
|
664
673
|
return {
|
|
665
|
-
oe(
|
|
666
|
-
r =
|
|
667
|
-
const c = t ? "scrollX" : "scrollY", a =
|
|
668
|
-
t && (
|
|
674
|
+
oe(s) {
|
|
675
|
+
r = s;
|
|
676
|
+
const c = t ? "scrollX" : "scrollY", a = b(s), f = g(a);
|
|
677
|
+
t && (i = "rtl" === getComputedStyle(_(a)).direction), o = $(e, f, t, () => x(f[c], i), (t, r) => {
|
|
669
678
|
r ? f.scroll({
|
|
670
|
-
[l]:
|
|
679
|
+
[l]: x(e.N() + t, i)
|
|
671
680
|
}) : f.scrollBy({
|
|
672
|
-
[l]:
|
|
681
|
+
[l]: x(t, i)
|
|
673
682
|
});
|
|
674
|
-
}, () => u(
|
|
683
|
+
}, () => u(s, a.body, f, t)), n[1](!0);
|
|
675
684
|
},
|
|
676
685
|
p() {
|
|
677
|
-
o && o.H(), r = void 0, n[1](!1), n =
|
|
686
|
+
o && o.H(), r = void 0, n[1](!1), n = c();
|
|
678
687
|
},
|
|
679
|
-
ne: () =>
|
|
688
|
+
ne: () => i,
|
|
680
689
|
ce: () => {
|
|
681
690
|
o && o.V();
|
|
682
691
|
},
|
|
683
|
-
le(o, {align: n, smooth:
|
|
692
|
+
le(o, {align: n, smooth: i, offset: l = 0} = {}) {
|
|
684
693
|
if (!r) return;
|
|
685
|
-
if (o =
|
|
694
|
+
if (o = s(o, 0, e.j() - 1), "nearest" === n) {
|
|
686
695
|
const t = e.O(o), r = e.N();
|
|
687
696
|
if (t < r) n = "start"; else {
|
|
688
697
|
if (!(t + e.k(o) > r + e.B())) return;
|
|
689
698
|
n = "end";
|
|
690
699
|
}
|
|
691
700
|
}
|
|
692
|
-
const
|
|
693
|
-
|
|
701
|
+
const c = b(r), f = g(c), d = _(c), p = () => e.B() - (t ? d.clientWidth : d.clientHeight);
|
|
702
|
+
a(() => l + u(r, c.body, f, t) + e.O(o) + ("end" === n ? e.k(o) - (e.B() - p()) : "center" === n ? (e.k(o) - (e.B() - p())) / 2 : 0), i);
|
|
694
703
|
}
|
|
695
704
|
};
|
|
696
|
-
})(
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
}),
|
|
700
|
-
|
|
701
|
-
}),
|
|
702
|
-
|
|
705
|
+
})(u, i), p = (0, e.ref)(u.m());
|
|
706
|
+
u.R(1, () => {
|
|
707
|
+
p.value = u.m();
|
|
708
|
+
}), u.R(4, () => {
|
|
709
|
+
r("scroll");
|
|
710
|
+
}), u.R(8, () => {
|
|
711
|
+
r("scrollEnd");
|
|
703
712
|
});
|
|
704
|
-
const
|
|
705
|
-
|
|
706
|
-
const
|
|
707
|
-
return e &&
|
|
708
|
-
}),
|
|
709
|
-
return e.onMounted(() => {
|
|
710
|
-
const e =
|
|
711
|
-
e && (
|
|
712
|
-
}), e.onUnmounted(() => {
|
|
713
|
-
|
|
714
|
-
}), e.watch(() =>
|
|
715
|
-
|
|
716
|
-
}), e.watch([
|
|
717
|
-
|
|
713
|
+
const m = (0, e.computed)(e => {
|
|
714
|
+
p.value;
|
|
715
|
+
const r = u.v(t.bufferSize);
|
|
716
|
+
return e && j(e, r) ? e : r;
|
|
717
|
+
}), h = (0, e.computed)(() => p.value && u.q()), v = (0, e.computed)(() => p.value && u.M());
|
|
718
|
+
return (0, e.onMounted)(() => {
|
|
719
|
+
const e = a.value;
|
|
720
|
+
e && (f.te(e), d.oe(e));
|
|
721
|
+
}), (0, e.onUnmounted)(() => {
|
|
722
|
+
u.p(), f.p(), d.p();
|
|
723
|
+
}), (0, e.watch)(() => t.data.length, e => {
|
|
724
|
+
u.A(5, [ e, t.shift ]);
|
|
725
|
+
}), (0, e.watch)([ p ], () => {
|
|
726
|
+
d.ce();
|
|
718
727
|
}, {
|
|
719
728
|
flush: "post"
|
|
720
|
-
}),
|
|
729
|
+
}), n({
|
|
721
730
|
get cache() {
|
|
722
|
-
return
|
|
731
|
+
return u.h();
|
|
723
732
|
},
|
|
724
733
|
get scrollOffset() {
|
|
725
|
-
return
|
|
734
|
+
return u.N();
|
|
726
735
|
},
|
|
727
736
|
get viewportSize() {
|
|
728
|
-
return
|
|
737
|
+
return u.B();
|
|
729
738
|
},
|
|
730
|
-
findItemIndex:
|
|
731
|
-
getItemOffset:
|
|
732
|
-
getItemSize:
|
|
733
|
-
scrollToIndex:
|
|
739
|
+
findItemIndex: u.S,
|
|
740
|
+
getItemOffset: u.O,
|
|
741
|
+
getItemSize: u.k,
|
|
742
|
+
scrollToIndex: d.le
|
|
734
743
|
}), () => {
|
|
735
|
-
const
|
|
736
|
-
for (let [
|
|
737
|
-
const s =
|
|
738
|
-
item:
|
|
739
|
-
index:
|
|
744
|
+
const r = t.as, n = t.item, s = v.value, l = d.ne(), c = [];
|
|
745
|
+
for (let [r, s] = m.value; r <= s; r++) {
|
|
746
|
+
const s = o.default({
|
|
747
|
+
item: t.data[r],
|
|
748
|
+
index: r
|
|
740
749
|
});
|
|
741
|
-
c.push(e.createVNode(
|
|
742
|
-
key:
|
|
743
|
-
L:
|
|
744
|
-
W:
|
|
745
|
-
Y:
|
|
746
|
-
D:
|
|
750
|
+
c.push((0, e.createVNode)(O, {
|
|
751
|
+
key: k(s, r),
|
|
752
|
+
L: p,
|
|
753
|
+
W: u,
|
|
754
|
+
Y: f.re,
|
|
755
|
+
D: r,
|
|
747
756
|
X: s,
|
|
748
|
-
U:
|
|
749
|
-
K:
|
|
750
|
-
Z:
|
|
757
|
+
U: i,
|
|
758
|
+
K: l,
|
|
759
|
+
Z: n
|
|
751
760
|
}, null, 8, [ "_stateVersion", "_store", "_resizer", "_index", "_children", "_isHorizontal", "_isNegative", "_as" ]));
|
|
752
761
|
}
|
|
753
|
-
return e.createVNode(
|
|
754
|
-
ref:
|
|
762
|
+
return (0, e.createVNode)(r, {
|
|
763
|
+
ref: a,
|
|
755
764
|
style: {
|
|
756
765
|
contain: "size style",
|
|
757
766
|
overflowAnchor: "none",
|
|
758
767
|
flex: "none",
|
|
759
768
|
position: "relative",
|
|
760
|
-
width:
|
|
761
|
-
height:
|
|
762
|
-
pointerEvents:
|
|
769
|
+
width: i ? s + "px" : "100%",
|
|
770
|
+
height: i ? "100%" : s + "px",
|
|
771
|
+
pointerEvents: h.value ? "none" : void 0
|
|
763
772
|
}
|
|
764
|
-
}, "function" == typeof (
|
|
773
|
+
}, "function" == typeof (_ = c) || "[object Object]" === Object.prototype.toString.call(_) && !(0,
|
|
774
|
+
e.isVNode)(_) ? c : {
|
|
765
775
|
default: () => [ c ],
|
|
766
776
|
_: 2
|
|
767
777
|
}, 8, [ "style" ]);
|
|
768
|
-
var
|
|
778
|
+
var _;
|
|
769
779
|
};
|
|
770
780
|
}
|
|
771
781
|
});
|
|
772
782
|
|
|
773
|
-
exports.VList =
|
|
774
|
-
//# sourceMappingURL=index.cjs.map
|
|
783
|
+
exports.VList = q, exports.Virtualizer = N, exports.WindowVirtualizer = B;
|
|
784
|
+
//# sourceMappingURL=index.cjs.map
|