virtua 0.49.0 → 0.49.1
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 +46 -46
- package/lib/core/index.cjs.map +1 -1
- package/lib/core/index.js +46 -46
- package/lib/core/index.js.map +1 -1
- package/lib/index.cjs +101 -101
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +101 -101
- package/lib/index.js.map +1 -1
- package/lib/solid/index.cjs +80 -80
- package/lib/solid/index.cjs.map +1 -1
- package/lib/solid/index.js +79 -79
- package/lib/solid/index.js.map +1 -1
- package/lib/vue/VList.d.ts +3 -0
- package/lib/vue/Virtualizer.d.ts +3 -0
- package/lib/vue/WindowVirtualizer.d.ts +6 -3
- package/lib/vue/index.cjs +69 -69
- package/lib/vue/index.cjs.map +1 -1
- package/lib/vue/index.js +69 -69
- package/lib/vue/index.js.map +1 -1
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -5,13 +5,13 @@ import { useLayoutEffect as t, useEffect as o, useRef as n, memo as r, useMemo a
|
|
|
5
5
|
|
|
6
6
|
import { flushSync as u } from "react-dom";
|
|
7
7
|
|
|
8
|
-
const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o, h(t, e)), m = e => [ ...e ].sort((
|
|
8
|
+
const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o, h(t, e)), m = e => [ ...e ].sort((e, t) => e - t), _ = "function" == typeof queueMicrotask ? queueMicrotask : e => {
|
|
9
9
|
Promise.resolve().then(e);
|
|
10
10
|
}, w = () => {
|
|
11
11
|
let e;
|
|
12
|
-
return [ new Promise(
|
|
12
|
+
return [ new Promise(t => {
|
|
13
13
|
e = t;
|
|
14
|
-
})
|
|
14
|
+
}), e ];
|
|
15
15
|
}, S = e => {
|
|
16
16
|
let t;
|
|
17
17
|
return () => (e && (t = e(), e = void 0), t);
|
|
@@ -42,8 +42,8 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
42
42
|
}, I = (e, t, o) => {
|
|
43
43
|
const n = t - e.l;
|
|
44
44
|
return e.i = o ? -1 : a(t - 1, e.i), e.l = t, n > 0 ? ($(e.u, n), $(e.t, n, o),
|
|
45
|
-
e.o * n) : (e.u.splice(n), (o ? e.t.splice(0, -n) : e.t.splice(n)).reduce((
|
|
46
|
-
}, k = "undefined" != typeof window, R = e => e.documentElement, T = e => e.ownerDocument, C = e => e.defaultView, M = /*#__PURE__*/ S((
|
|
45
|
+
e.o * n) : (e.u.splice(n), (o ? e.t.splice(0, -n) : e.t.splice(n)).reduce((t, o) => t - (-1 === o ? e.o : o), 0));
|
|
46
|
+
}, k = "undefined" != typeof window, R = e => e.documentElement, T = e => e.ownerDocument, C = e => e.defaultView, M = /*#__PURE__*/ S(() => !!/iP(hone|od|ad)/.test(navigator.userAgent) || "MacIntel" === navigator.platform && navigator.maxTouchPoints > 0), O = /*#__PURE__*/ S(() => "scrollBehavior" in R(document).style), E = e => h(e.h(), e.p()), H = (e, t = 40, o = 0, n, r = !1) => {
|
|
47
47
|
let i = !!o, s = 1, l = 0, c = 0, f = 0, u = 0, g = 0, v = 0, _ = 0, w = 0, S = d, k = [ 0, i ? h(o - 1, 0) : -1 ], R = 0, T = !1;
|
|
48
48
|
const C = ((e, t, o) => ({
|
|
49
49
|
o: t,
|
|
@@ -120,16 +120,16 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
120
120
|
|
|
121
121
|
case 3:
|
|
122
122
|
{
|
|
123
|
-
const e = t.filter((
|
|
123
|
+
const e = t.filter(([e, t]) => !L(e, t));
|
|
124
124
|
if (!e.length) break;
|
|
125
|
-
N(e.reduce((
|
|
125
|
+
N(e.reduce((e, [t, o]) => {
|
|
126
126
|
let n;
|
|
127
127
|
if (2 === w) n = !0; else if (S && 1 === w) n = t < S[0]; else {
|
|
128
128
|
const e = E(), o = J(t), r = A(t);
|
|
129
129
|
n = 1 !== _ && 0 === w ? o + r < e : o < e && o + r < e + l;
|
|
130
130
|
}
|
|
131
131
|
return n && (e += o - A(t)), e;
|
|
132
|
-
}
|
|
132
|
+
}, 0));
|
|
133
133
|
for (const [t, o] of e) {
|
|
134
134
|
const e = A(t), n = y(C, t, o);
|
|
135
135
|
r && (R += n ? o : o - e);
|
|
@@ -137,9 +137,9 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
137
137
|
r && l && R > l && (N(((e, t) => {
|
|
138
138
|
let o = 0;
|
|
139
139
|
const n = [];
|
|
140
|
-
e.t.forEach((
|
|
140
|
+
e.t.forEach((e, r) => {
|
|
141
141
|
-1 !== e && (n.push(e), r < t && o++);
|
|
142
|
-
})
|
|
142
|
+
}), e.i = -1;
|
|
143
143
|
const r = m(n), i = r.length, s = i / 2 | 0, l = i % 2 == 0 ? (r[s - 1] + r[s]) / 2 : r[s], c = e.o;
|
|
144
144
|
return ((e.o = l) - c) * h(t - o, 0);
|
|
145
145
|
})(C, x(C, H()))), r = !1), a = 3, n = !0;
|
|
@@ -165,9 +165,9 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
165
165
|
case 8:
|
|
166
166
|
S = W(t, t + l), a = 1;
|
|
167
167
|
}
|
|
168
|
-
a && (s = 1 + (2147483647 & s), o && g && (u += g, g = 0), O.forEach((
|
|
168
|
+
a && (s = 1 + (2147483647 & s), o && g && (u += g, g = 0), O.forEach(([e, t]) => {
|
|
169
169
|
a & e && t(n);
|
|
170
|
-
}))
|
|
170
|
+
}));
|
|
171
171
|
}
|
|
172
172
|
};
|
|
173
173
|
}, W = setTimeout, B = (e, t) => t ? -e : e, J = (e, t, o, n, r, i) => {
|
|
@@ -178,12 +178,12 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
178
178
|
const o = () => {
|
|
179
179
|
t != d && clearTimeout(t);
|
|
180
180
|
}, n = () => {
|
|
181
|
-
o(), t = W((
|
|
181
|
+
o(), t = W(() => {
|
|
182
182
|
t = d, (() => {
|
|
183
183
|
if (c || f) return c = !1, void h();
|
|
184
184
|
u = !1, e.B(2);
|
|
185
185
|
})();
|
|
186
|
-
}
|
|
186
|
+
}, 150);
|
|
187
187
|
};
|
|
188
188
|
return n.J = o, n;
|
|
189
189
|
})(), p = () => {
|
|
@@ -222,11 +222,11 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
222
222
|
const [t, o] = w();
|
|
223
223
|
return n = () => {
|
|
224
224
|
o(!1);
|
|
225
|
-
}, e.p() && W(n, 150), [ t, e.W(2, (
|
|
225
|
+
}, e.p() && W(n, 150), [ t, e.W(2, () => {
|
|
226
226
|
o(!0);
|
|
227
|
-
})
|
|
227
|
+
}) ];
|
|
228
228
|
};
|
|
229
|
-
if (i && O()) e.B(8, r()), _(
|
|
229
|
+
if (i && O()) e.B(8, r()), _(async () => {
|
|
230
230
|
for (;;) {
|
|
231
231
|
let t = !0;
|
|
232
232
|
for (let [o, n] = e.S(); o <= n; o++) if (e.I(o)) {
|
|
@@ -242,7 +242,7 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
e.B(7), o(r(), i);
|
|
245
|
-
})
|
|
245
|
+
}); else for (;;) {
|
|
246
246
|
const [t, n] = s();
|
|
247
247
|
try {
|
|
248
248
|
if (e.B(7), o(r()), !await t) return;
|
|
@@ -255,33 +255,33 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
255
255
|
} ];
|
|
256
256
|
}, L = (e, t) => {
|
|
257
257
|
let o, n, r = w(), i = !1;
|
|
258
|
-
const s = t ? "scrollLeft" : "scrollTop", l = t ? "overflowX" : "overflowY", [c, f] = A(e, (
|
|
258
|
+
const s = t ? "scrollLeft" : "scrollTop", l = t ? "overflowX" : "overflowY", [c, f] = A(e, () => r[0], (e, n) => {
|
|
259
259
|
e = B(e, i), n ? o.scrollTo({
|
|
260
260
|
[t ? "left" : "top"]: e,
|
|
261
261
|
behavior: "smooth"
|
|
262
262
|
}) : o[s] = e;
|
|
263
|
-
})
|
|
263
|
+
});
|
|
264
264
|
return {
|
|
265
265
|
N(c, u) {
|
|
266
|
-
o = u, t && (i = "rtl" === getComputedStyle(u).direction), n = J(e, u, t, (
|
|
266
|
+
o = u, t && (i = "rtl" === getComputedStyle(u).direction), n = J(e, u, t, () => B(u[s], i), (t, o, n) => {
|
|
267
267
|
if (n) {
|
|
268
268
|
const e = u.style, t = e[l];
|
|
269
|
-
e[l] = "hidden", W((
|
|
269
|
+
e[l] = "hidden", W(() => {
|
|
270
270
|
e[l] = t;
|
|
271
|
-
})
|
|
271
|
+
});
|
|
272
272
|
}
|
|
273
273
|
u[s] = B(e.C() + t, i), o && f();
|
|
274
|
-
})
|
|
274
|
+
}), r[1](!0);
|
|
275
275
|
},
|
|
276
276
|
v() {
|
|
277
277
|
n && n.A(), r[1](!1), r = w();
|
|
278
278
|
},
|
|
279
279
|
P: () => i,
|
|
280
280
|
V(e) {
|
|
281
|
-
c((
|
|
281
|
+
c(() => e);
|
|
282
282
|
},
|
|
283
283
|
X(t) {
|
|
284
|
-
t += e.C(), c((
|
|
284
|
+
t += e.C(), c(() => t);
|
|
285
285
|
},
|
|
286
286
|
Y(t, {align: o, smooth: n, offset: r = 0} = {}) {
|
|
287
287
|
if (t = v(t, 0, e.T() - 1), "nearest" === o) {
|
|
@@ -291,7 +291,7 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
291
291
|
o = "end";
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
|
-
c((
|
|
294
|
+
c(() => r + e.O() + e.k(t) + ("end" === o ? e.R(t) - e.p() : "center" === o ? (e.R(t) - e.p()) / 2 : 0), n);
|
|
295
295
|
},
|
|
296
296
|
q: () => {
|
|
297
297
|
n && n.L();
|
|
@@ -299,7 +299,7 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
299
299
|
};
|
|
300
300
|
}, N = (e, t) => {
|
|
301
301
|
let o, n, r = w(), i = !1;
|
|
302
|
-
const s = t ? "left" : "top", [l] = A(e, (
|
|
302
|
+
const s = t ? "left" : "top", [l] = A(e, () => r[0], (e, t) => {
|
|
303
303
|
e = B(e, i);
|
|
304
304
|
const n = C(T(o));
|
|
305
305
|
t ? n.scroll({
|
|
@@ -308,7 +308,7 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
308
308
|
}) : n.scroll({
|
|
309
309
|
[s]: e
|
|
310
310
|
});
|
|
311
|
-
})
|
|
311
|
+
}), c = (e, t, o, n, r = 0) => {
|
|
312
312
|
const s = n ? "offsetLeft" : "offsetTop", l = r + (n && i ? o.innerWidth - e[s] - e.offsetWidth : e[s]), f = e.offsetParent;
|
|
313
313
|
return e !== t && f ? c(f, t, o, n, l) : l;
|
|
314
314
|
};
|
|
@@ -316,13 +316,13 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
316
316
|
N(l) {
|
|
317
317
|
o = l;
|
|
318
318
|
const f = t ? "scrollX" : "scrollY", u = T(l), d = C(u);
|
|
319
|
-
t && (i = "rtl" === getComputedStyle(R(u)).direction), n = J(e, d, t, (
|
|
319
|
+
t && (i = "rtl" === getComputedStyle(R(u)).direction), n = J(e, d, t, () => B(d[f], i), (t, o) => {
|
|
320
320
|
o ? d.scroll({
|
|
321
321
|
[s]: B(e.C() + t, i)
|
|
322
322
|
}) : d.scrollBy({
|
|
323
323
|
[s]: B(t, i)
|
|
324
324
|
});
|
|
325
|
-
}
|
|
325
|
+
}, () => c(l, u.body, d, t)), r[1](!0);
|
|
326
326
|
},
|
|
327
327
|
v() {
|
|
328
328
|
n && n.A(), o = void 0, r[1](!1), r = w();
|
|
@@ -341,7 +341,7 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
const f = T(o), u = C(f), d = R(f), a = () => e.p() - (t ? d.clientWidth : d.clientHeight);
|
|
344
|
-
l((
|
|
344
|
+
l(() => s + c(o, f.body, u, t) + e.k(n) + ("end" === r ? e.R(n) - (e.p() - a()) : "center" === r ? (e.R(n) - (e.p() - a())) / 2 : 0), i);
|
|
345
345
|
}
|
|
346
346
|
};
|
|
347
347
|
}, P = (e, t) => {
|
|
@@ -382,14 +382,14 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
382
382
|
};
|
|
383
383
|
}, X = (e, t) => {
|
|
384
384
|
let o;
|
|
385
|
-
const n = t ? "width" : "height", r = new WeakMap, i = V(
|
|
385
|
+
const n = t ? "width" : "height", r = new WeakMap, i = V(t => {
|
|
386
386
|
const i = [];
|
|
387
387
|
for (const {target: s, contentRect: l} of t) if (s.offsetParent) if (s === o) e.B(4, l[n]); else {
|
|
388
388
|
const e = r.get(s);
|
|
389
389
|
e != d && i.push([ e, l[n] ]);
|
|
390
390
|
}
|
|
391
391
|
i.length && e.B(3, i);
|
|
392
|
-
})
|
|
392
|
+
});
|
|
393
393
|
return {
|
|
394
394
|
G(e) {
|
|
395
395
|
i.D(o = e);
|
|
@@ -400,7 +400,7 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
400
400
|
v: i.A
|
|
401
401
|
};
|
|
402
402
|
}, Y = (e, t) => {
|
|
403
|
-
const o = t ? "width" : "height", n = t ? "innerWidth" : "innerHeight", r = new WeakMap, i = V(
|
|
403
|
+
const o = t ? "width" : "height", n = t ? "innerWidth" : "innerHeight", r = new WeakMap, i = V(t => {
|
|
404
404
|
const n = [];
|
|
405
405
|
for (const {target: e, contentRect: i} of t) {
|
|
406
406
|
if (!e.offsetParent) continue;
|
|
@@ -408,7 +408,7 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
408
408
|
t != d && n.push([ t, i[o] ]);
|
|
409
409
|
}
|
|
410
410
|
n.length && e.B(3, n);
|
|
411
|
-
})
|
|
411
|
+
});
|
|
412
412
|
let s;
|
|
413
413
|
return {
|
|
414
414
|
G(t) {
|
|
@@ -428,7 +428,7 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
428
428
|
};
|
|
429
429
|
}, q = (e, t) => {
|
|
430
430
|
let o;
|
|
431
|
-
const n = new WeakMap, r = new Set, i = new Set, s = new Map, l = (e, t) => `${e}-${t}`, c = V(
|
|
431
|
+
const n = new WeakMap, r = new Set, i = new Set, s = new Map, l = (e, t) => `${e}-${t}`, c = V(c => {
|
|
432
432
|
const f = new Set, u = new Set;
|
|
433
433
|
for (const {target: r, contentRect: {width: i, height: d}} of c) if (r.offsetParent) if (r === o) e.B(4, d),
|
|
434
434
|
t.B(4, i); else {
|
|
@@ -442,25 +442,25 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
442
442
|
}
|
|
443
443
|
if (f.size) {
|
|
444
444
|
const t = [];
|
|
445
|
-
f.forEach(
|
|
445
|
+
f.forEach(e => {
|
|
446
446
|
let o = 0;
|
|
447
|
-
i.forEach(
|
|
447
|
+
i.forEach(t => {
|
|
448
448
|
const n = s.get(l(e, t));
|
|
449
449
|
n && (o = h(o, n[0]));
|
|
450
|
-
})
|
|
451
|
-
})
|
|
450
|
+
}), o && t.push([ e, o ]);
|
|
451
|
+
}), e.B(3, t);
|
|
452
452
|
}
|
|
453
453
|
if (u.size) {
|
|
454
454
|
const e = [];
|
|
455
|
-
u.forEach(
|
|
455
|
+
u.forEach(t => {
|
|
456
456
|
let o = 0;
|
|
457
|
-
r.forEach(
|
|
457
|
+
r.forEach(e => {
|
|
458
458
|
const n = s.get(l(e, t));
|
|
459
459
|
n && (o = h(o, n[1]));
|
|
460
|
-
})
|
|
461
|
-
})
|
|
460
|
+
}), o && e.push([ t, o ]);
|
|
461
|
+
}), t.B(3, e);
|
|
462
462
|
}
|
|
463
|
-
})
|
|
463
|
+
});
|
|
464
464
|
return {
|
|
465
465
|
G(e) {
|
|
466
466
|
c.D(o = e);
|
|
@@ -488,13 +488,13 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
488
488
|
return t[j] || (t[j] = e());
|
|
489
489
|
}, K = e => {
|
|
490
490
|
const t = n(e);
|
|
491
|
-
return D((
|
|
491
|
+
return D(() => {
|
|
492
492
|
t[j] = e;
|
|
493
|
-
}
|
|
494
|
-
}, Q = /*#__PURE__*/ r((
|
|
493
|
+
}, [ e ]), t;
|
|
494
|
+
}, Q = /*#__PURE__*/ r(({Z: t, ee: o, te: r, oe: s, ne: l, re: c, ie: f, se: u}) => {
|
|
495
495
|
const d = n(null);
|
|
496
|
-
D((
|
|
497
|
-
const a = i((
|
|
496
|
+
D(() => o(d[j], r), [ r ]);
|
|
497
|
+
const a = i(() => {
|
|
498
498
|
const e = {
|
|
499
499
|
contain: "layout style",
|
|
500
500
|
position: l && u ? void 0 : "absolute",
|
|
@@ -504,7 +504,7 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
504
504
|
visibility: !l || u ? void 0 : "hidden"
|
|
505
505
|
};
|
|
506
506
|
return f && (e.display = "inline-flex"), e;
|
|
507
|
-
}
|
|
507
|
+
}, [ s, l, u, f ]);
|
|
508
508
|
return e(c, "string" == typeof c ? {
|
|
509
509
|
ref: d,
|
|
510
510
|
style: a,
|
|
@@ -515,18 +515,18 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
515
515
|
index: r,
|
|
516
516
|
children: t
|
|
517
517
|
});
|
|
518
|
-
})
|
|
518
|
+
}), Z = (e, t) => i(() => {
|
|
519
519
|
if ("function" == typeof e) return [ o => e(t[o], o), t.length ];
|
|
520
520
|
const o = (e => {
|
|
521
521
|
const t = [];
|
|
522
522
|
return G(e, t), t;
|
|
523
523
|
})(e);
|
|
524
524
|
return [ e => o[e], o.length ];
|
|
525
|
-
}
|
|
526
|
-
const [y, b] = Z(t, o), x = n(null), I = n(!!p), k = K(S), R = K($), [T, C, M, O] = F((
|
|
525
|
+
}, [ e, t ]), ee = /*#__PURE__*/ s(({children: t, data: o, bufferSize: r, itemSize: i, shift: s, horizontal: f, keepMounted: d, cache: a, startMargin: h = 0, ssrCount: p, as: g = "div", item: v = "div", scrollRef: w, onScroll: S, onScrollEnd: $}, z) => {
|
|
526
|
+
const [y, b] = Z(t, o), x = n(null), I = n(!!p), k = K(S), R = K($), [T, C, M, O] = F(() => {
|
|
527
527
|
const e = !!f, t = H(b, i, p, a, !i);
|
|
528
528
|
return [ t, X(t, e), L(t, e), e ];
|
|
529
|
-
})
|
|
529
|
+
});
|
|
530
530
|
b !== T.T() && T.B(5, [ b, s ]), h !== T.O() && T.B(6, h);
|
|
531
531
|
const [W, B] = l(T.m, void 0, T.m), J = T.M(), A = T.h(), N = M.P(), P = [], V = t => {
|
|
532
532
|
const o = y(t);
|
|
@@ -541,25 +541,25 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
541
541
|
se: I[j]
|
|
542
542
|
}, U(o, t));
|
|
543
543
|
};
|
|
544
|
-
if (D((
|
|
545
|
-
I[j] = !1, T.W(1,
|
|
544
|
+
if (D(() => {
|
|
545
|
+
I[j] = !1, T.W(1, e => {
|
|
546
546
|
e ? u(B) : B();
|
|
547
|
-
})
|
|
547
|
+
}), T.W(4, () => {
|
|
548
548
|
k[j] && k[j](T.C());
|
|
549
|
-
})
|
|
549
|
+
}), T.W(8, () => {
|
|
550
550
|
R[j] && R[j]();
|
|
551
|
-
})
|
|
551
|
+
});
|
|
552
552
|
const e = x[j], t = t => {
|
|
553
553
|
C.G(t), M.N(e, t);
|
|
554
554
|
};
|
|
555
|
-
return w ? _((
|
|
555
|
+
return w ? _(() => {
|
|
556
556
|
w[j] && t(w[j]);
|
|
557
|
-
})
|
|
557
|
+
}) : t(e.parentElement), () => {
|
|
558
558
|
T.v(), C.v(), M.v();
|
|
559
559
|
};
|
|
560
|
-
}
|
|
560
|
+
}, []), D(() => {
|
|
561
561
|
M.q();
|
|
562
|
-
}
|
|
562
|
+
}, [ W ]), c(z, () => ({
|
|
563
563
|
get cache() {
|
|
564
564
|
return T._();
|
|
565
565
|
},
|
|
@@ -578,12 +578,12 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
578
578
|
scrollToIndex: M.Y,
|
|
579
579
|
scrollTo: M.V,
|
|
580
580
|
scrollBy: M.X
|
|
581
|
-
})
|
|
581
|
+
}), []), d) {
|
|
582
582
|
const e = new Set(d);
|
|
583
583
|
for (let [t, o] = T.S(r); t <= o; t++) e.add(t);
|
|
584
|
-
m([ ...e ]).forEach(
|
|
584
|
+
m([ ...e ]).forEach(e => {
|
|
585
585
|
P.push(V(e));
|
|
586
|
-
})
|
|
586
|
+
});
|
|
587
587
|
} else for (let [e, t] = T.S(r); e <= t; e++) P.push(V(e));
|
|
588
588
|
return e(g, {
|
|
589
589
|
ref: x,
|
|
@@ -598,7 +598,7 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
598
598
|
},
|
|
599
599
|
children: P
|
|
600
600
|
});
|
|
601
|
-
})
|
|
601
|
+
}), te = /*#__PURE__*/ s(({children: t, data: o, bufferSize: n, itemSize: r, shift: i, horizontal: s, keepMounted: l, cache: c, ssrCount: f, item: u, onScroll: d, onScrollEnd: a, style: h, ...p}, g) => e("div", {
|
|
602
602
|
...p,
|
|
603
603
|
style: {
|
|
604
604
|
display: s ? "inline-block" : "block",
|
|
@@ -623,28 +623,28 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
623
623
|
onScrollEnd: a,
|
|
624
624
|
children: t
|
|
625
625
|
})
|
|
626
|
-
}))
|
|
627
|
-
const [_, w] = Z(t, o), S = n(null), $ = K(g), z = K(v), y = n(!!a), [b, x, I, k] = F((
|
|
626
|
+
})), oe = /*#__PURE__*/ s(({children: t, data: o, bufferSize: r, itemSize: i, shift: s, horizontal: f, cache: d, ssrCount: a, as: h = "div", item: p = "div", onScroll: g, onScrollEnd: v}, m) => {
|
|
627
|
+
const [_, w] = Z(t, o), S = n(null), $ = K(g), z = K(v), y = n(!!a), [b, x, I, k] = F(() => {
|
|
628
628
|
const e = !!f, t = H(w, i, a, d, !i);
|
|
629
629
|
return [ t, Y(t, e), N(t, e), e ];
|
|
630
|
-
})
|
|
630
|
+
});
|
|
631
631
|
w !== b.T() && b.B(5, [ w, s ]);
|
|
632
632
|
const [R, T] = l(b.m, void 0, b.m), C = b.M(), M = b.h(), O = I.P(), E = [];
|
|
633
|
-
D((
|
|
634
|
-
y[j] = !1, b.W(1,
|
|
633
|
+
D(() => {
|
|
634
|
+
y[j] = !1, b.W(1, e => {
|
|
635
635
|
e ? u(T) : T();
|
|
636
|
-
})
|
|
636
|
+
}), b.W(4, () => {
|
|
637
637
|
$[j] && $[j]();
|
|
638
|
-
})
|
|
638
|
+
}), b.W(8, () => {
|
|
639
639
|
z[j] && z[j]();
|
|
640
|
-
})
|
|
640
|
+
});
|
|
641
641
|
const e = S[j];
|
|
642
642
|
return x.G(e), I.N(e), () => {
|
|
643
643
|
b.v(), x.v(), I.v();
|
|
644
644
|
};
|
|
645
|
-
}
|
|
645
|
+
}, []), D(() => {
|
|
646
646
|
I.q();
|
|
647
|
-
}
|
|
647
|
+
}, [ R ]), c(m, () => ({
|
|
648
648
|
get cache() {
|
|
649
649
|
return b._();
|
|
650
650
|
},
|
|
@@ -658,7 +658,7 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
658
658
|
getItemOffset: b.k,
|
|
659
659
|
getItemSize: b.R,
|
|
660
660
|
scrollToIndex: I.Y
|
|
661
|
-
})
|
|
661
|
+
}), []);
|
|
662
662
|
for (let [t, o] = b.S(r); t <= o; t++) {
|
|
663
663
|
const o = _(t);
|
|
664
664
|
E.push(e(Q, {
|
|
@@ -685,11 +685,11 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
685
685
|
},
|
|
686
686
|
children: E
|
|
687
687
|
});
|
|
688
|
-
})
|
|
688
|
+
}), ne = (e, t) => `${e}-${t}`, re = /*#__PURE__*/ r(({Z: t, ee: o, le: r, ce: s, fe: l, ue: c, de: f, ae: u, ne: d, he: a}) => {
|
|
689
689
|
const h = n(null);
|
|
690
|
-
return D((
|
|
690
|
+
return D(() => o.U(h[j], r, s), [ s, r ]), e(a, {
|
|
691
691
|
ref: h,
|
|
692
|
-
style: i((
|
|
692
|
+
style: i(() => ({
|
|
693
693
|
contain: "layout style",
|
|
694
694
|
display: "grid",
|
|
695
695
|
position: "absolute",
|
|
@@ -698,33 +698,33 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
698
698
|
visibility: d ? "hidden" : void 0,
|
|
699
699
|
minHeight: f,
|
|
700
700
|
minWidth: u
|
|
701
|
-
})
|
|
701
|
+
}), [ l, c, u, f, d ]),
|
|
702
702
|
children: t
|
|
703
703
|
});
|
|
704
|
-
})
|
|
705
|
-
const [y, b, x, I] = F((
|
|
704
|
+
}), ie = /*#__PURE__*/ s(({children: t, row: o, col: r, cellHeight: s = 40, cellWidth: d = 100, bufferSize: a, ssrRowCount: h, ssrColCount: p, item: g = "div", domRef: v, innerDomRef: m, onScroll: _, onScrollEnd: w, style: S, ...$}, z) => {
|
|
705
|
+
const [y, b, x, I] = F(() => {
|
|
706
706
|
const e = H(o, s, h), t = H(r, d, p);
|
|
707
707
|
return [ e, t, q(e, t), P(e, t) ];
|
|
708
|
-
})
|
|
708
|
+
});
|
|
709
709
|
o !== y.T() && y.B(5, [ o ]), r !== b.T() && b.B(5, [ r ]);
|
|
710
710
|
const [k, R] = l(y.m, void 0, y.m), [T, C] = l(b.m, void 0, b.m), M = y.M(), O = b.M(), W = E(y), B = E(b), J = n(null), A = K(_), L = K(w);
|
|
711
|
-
D((
|
|
712
|
-
y.W(1,
|
|
711
|
+
D(() => {
|
|
712
|
+
y.W(1, e => {
|
|
713
713
|
e ? u(R) : R();
|
|
714
|
-
})
|
|
714
|
+
}), b.W(1, e => {
|
|
715
715
|
e ? u(C) : C();
|
|
716
|
-
})
|
|
716
|
+
}), y.W(4, () => {
|
|
717
717
|
A[j] && A[j](y.C());
|
|
718
|
-
})
|
|
718
|
+
}), y.W(8, () => {
|
|
719
719
|
L[j] && L[j]();
|
|
720
|
-
})
|
|
720
|
+
});
|
|
721
721
|
const e = J[j], t = e.parentElement;
|
|
722
722
|
return x.G(t), I.N(e, t), () => {
|
|
723
723
|
y.v(), b.v(), x.v(), I.v();
|
|
724
724
|
};
|
|
725
|
-
}
|
|
725
|
+
}, []), D(() => {
|
|
726
726
|
I.q();
|
|
727
|
-
}
|
|
727
|
+
}, [ k, T ]), c(z, () => ({
|
|
728
728
|
get scrollTop() {
|
|
729
729
|
return y.C();
|
|
730
730
|
},
|
|
@@ -758,8 +758,8 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
758
758
|
scrollToIndex: I.Y,
|
|
759
759
|
scrollTo: I.V,
|
|
760
760
|
scrollBy: I.X
|
|
761
|
-
})
|
|
762
|
-
const N = i((
|
|
761
|
+
}), []);
|
|
762
|
+
const N = i(() => {
|
|
763
763
|
const e = new Map;
|
|
764
764
|
return (o, n) => {
|
|
765
765
|
let r = e.get(ne(o, n));
|
|
@@ -768,7 +768,7 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
768
768
|
colIndex: n
|
|
769
769
|
})), r;
|
|
770
770
|
};
|
|
771
|
-
}
|
|
771
|
+
}, [ t ]), V = I.P(), [X, Y] = y.S(a), [G, U] = b.S(a), Q = [];
|
|
772
772
|
for (let t = X; t <= Y; t++) for (let o = G; o <= U; o++) Q.push(e(re, {
|
|
773
773
|
ee: x,
|
|
774
774
|
le: t,
|
|
@@ -792,9 +792,9 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
792
792
|
...S
|
|
793
793
|
},
|
|
794
794
|
children: e("div", {
|
|
795
|
-
ref: (Z = [ J, m ], f(
|
|
795
|
+
ref: (Z = [ J, m ], f(e => {
|
|
796
796
|
for (const t of Z) t && ("function" == typeof t ? t(e) : t && (t.current = e));
|
|
797
|
-
}
|
|
797
|
+
}, Z)),
|
|
798
798
|
style: {
|
|
799
799
|
contain: "size style",
|
|
800
800
|
overflowAnchor: "none",
|
|
@@ -808,7 +808,7 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
|
|
|
808
808
|
})
|
|
809
809
|
});
|
|
810
810
|
var Z;
|
|
811
|
-
})
|
|
811
|
+
});
|
|
812
812
|
|
|
813
813
|
export { te as VList, ee as Virtualizer, oe as WindowVirtualizer, ie as experimental_VGrid };
|
|
814
814
|
//# sourceMappingURL=index.js.map
|