virtua 0.52.2 → 0.52.4
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 +1 -1
- package/lib/angular/index.js +113 -124
- package/lib/angular/index.js.map +1 -1
- package/lib/core/index.cjs +112 -123
- package/lib/core/index.cjs.map +1 -1
- package/lib/core/index.js +90 -101
- package/lib/core/index.js.map +1 -1
- package/lib/index.cjs +155 -166
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +167 -178
- package/lib/index.js.map +1 -1
- package/lib/solid/index.cjs +173 -184
- package/lib/solid/index.cjs.map +1 -1
- package/lib/solid/index.js +181 -192
- package/lib/solid/index.js.map +1 -1
- package/lib/solid/index.jsx +32 -53
- package/lib/solid/index.jsx.map +1 -1
- package/lib/vue/index.cjs +101 -112
- package/lib/vue/index.cjs.map +1 -1
- package/lib/vue/index.js +101 -112
- package/lib/vue/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -247,11 +247,7 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
247
247
|
t.q(r, s), i !== e.T() && e.W(5, [ i ]);
|
|
248
248
|
const c = t.V(o, n, e.M() - e.u(0), l);
|
|
249
249
|
null != c && e.W(9, c);
|
|
250
|
-
}, A = /*#__PURE__*/ new WeakMap, W = (e, t, o, n, r, s,
|
|
251
|
-
if (t < n || $(t, r) < d(o, s + 1) || l < o) return !0;
|
|
252
|
-
for (const n of e) if (n >= t && n < o) return !0;
|
|
253
|
-
return !1;
|
|
254
|
-
}, H = (e, t, o) => {
|
|
250
|
+
}, A = /*#__PURE__*/ new WeakMap, W = (e, t, o, n, r, s) => e < o || $(e, n) < d(t, r + 1) || s < t, H = (e, t, o) => {
|
|
255
251
|
const n = [];
|
|
256
252
|
for (const r of e) r >= t && r < o && n.push(r);
|
|
257
253
|
return m(n);
|
|
@@ -263,25 +259,22 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
263
259
|
e[o] <= t ? n = o + 1 : r = o;
|
|
264
260
|
}
|
|
265
261
|
return n - 1;
|
|
266
|
-
}, q = (e, t, o, n) => {
|
|
267
|
-
const r = P(t, o, n);
|
|
268
|
-
r >= 0 && e.push(t[r]);
|
|
269
|
-
}, B = (e, t, o, n, r) => {
|
|
262
|
+
}, q = (e, t, o, n, r) => {
|
|
270
263
|
const s = t.length;
|
|
271
264
|
for (;o < s && t[o] < n; o++) {
|
|
272
265
|
const n = t[o];
|
|
273
266
|
n > r && (e.push(n), r = n);
|
|
274
267
|
}
|
|
275
268
|
return o;
|
|
276
|
-
},
|
|
269
|
+
}, B = (e, t, o, n, r, s) => {
|
|
277
270
|
const l = [];
|
|
278
271
|
for (let e = 0; e < o; e++) l.push(e);
|
|
279
|
-
const i =
|
|
272
|
+
const i = q(l, e, 0, n, o - 1);
|
|
280
273
|
for (let e = n; e <= r; e++) l.push(e);
|
|
281
|
-
|
|
274
|
+
q(l, e, i, s, r);
|
|
282
275
|
for (let e = s; e < t; e++) l.push(e);
|
|
283
276
|
return l;
|
|
284
|
-
},
|
|
277
|
+
}, D = (e, t) => d(e.rowIndex + (e.rowSpan || 1), t), V = (e, t) => d(e.colIndex + (e.colSpan || 1), t), X = (e, t, o, n, r, s) => {
|
|
285
278
|
const l = t.length, i = n.length;
|
|
286
279
|
let c = "[l0]", a = 0, f = 0, u = 0;
|
|
287
280
|
for (;a < s; ) {
|
|
@@ -296,7 +289,7 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
296
289
|
c += " " + h + " [l" + g + "]", a = g;
|
|
297
290
|
}
|
|
298
291
|
return c;
|
|
299
|
-
},
|
|
292
|
+
}, Y = (e, t, o, n, r) => {
|
|
300
293
|
const s = {
|
|
301
294
|
display: "grid",
|
|
302
295
|
gridTemplateRows: "subgrid",
|
|
@@ -305,7 +298,7 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
305
298
|
gridRow: "l" + e + "/l" + t
|
|
306
299
|
};
|
|
307
300
|
return null != o && (s.position = "sticky", s[n] = o + "px", s.zIndex = r), s;
|
|
308
|
-
},
|
|
301
|
+
}, j = e => {
|
|
309
302
|
let t;
|
|
310
303
|
return {
|
|
311
304
|
X(o) {
|
|
@@ -318,7 +311,7 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
318
311
|
t && t.disconnect();
|
|
319
312
|
}
|
|
320
313
|
};
|
|
321
|
-
},
|
|
314
|
+
}, J = (e, t, o, n, r, s, l) => {
|
|
322
315
|
let i, c, a = 0, f = !1, u = !1, d = !1, $ = !1;
|
|
323
316
|
const g = Date.now, h = n ? "scrollLeft" : "scrollTop", p = n ? "left" : "top", m = e => r ? -e : e, v = () => m(o[h]), z = (e, t) => {
|
|
324
317
|
o.scrollTo({
|
|
@@ -387,9 +380,9 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
387
380
|
o ? (e.W(8, t()), _(a)) : a();
|
|
388
381
|
}
|
|
389
382
|
};
|
|
390
|
-
},
|
|
383
|
+
}, U = (e, t) => {
|
|
391
384
|
let o, n, r = v();
|
|
392
|
-
const s = /* @__PURE__ */ new WeakMap, l =
|
|
385
|
+
const s = /* @__PURE__ */ new WeakMap, l = j(n => {
|
|
393
386
|
const r = [];
|
|
394
387
|
for (const {target: l, contentRect: {width: i, height: c}} of n) if (l === o) (i || c) && e.W(4, t ? i : c); else if (l.offsetParent) {
|
|
395
388
|
const e = s.get(l);
|
|
@@ -399,7 +392,7 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
399
392
|
});
|
|
400
393
|
return {
|
|
401
394
|
F(s, i = s.parentElement) {
|
|
402
|
-
l.X(o = i), n =
|
|
395
|
+
l.X(o = i), n = J(e, i, i, t, t && "rtl" === getComputedStyle(i).direction, () => {
|
|
403
396
|
const e = t ? "overflowX" : "overflowY", o = i.style, n = o[e];
|
|
404
397
|
o[e] = "hidden", w(() => {
|
|
405
398
|
o[e] = n;
|
|
@@ -420,9 +413,9 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
420
413
|
},
|
|
421
414
|
Z: e.O
|
|
422
415
|
};
|
|
423
|
-
},
|
|
416
|
+
}, F = (e, t) => {
|
|
424
417
|
let o, n, r, s, l, i = v();
|
|
425
|
-
const c = /* @__PURE__ */ new WeakMap, a =
|
|
418
|
+
const c = /* @__PURE__ */ new WeakMap, a = j(n => {
|
|
426
419
|
const r = [];
|
|
427
420
|
for (const {target: e, contentRect: {width: s, height: i}} of n) if (e === o) l && l(); else if (e.offsetParent) {
|
|
428
421
|
const o = c.get(e);
|
|
@@ -440,7 +433,7 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
440
433
|
};
|
|
441
434
|
u.addEventListener("resize", p), a.X(d), r = () => {
|
|
442
435
|
u.removeEventListener("resize", p);
|
|
443
|
-
}, n =
|
|
436
|
+
}, n = J(e, u, d, t, $, null, h), i[1](!0);
|
|
444
437
|
},
|
|
445
438
|
v() {
|
|
446
439
|
r && r(), a.j(), n && n.j(), i[1](!1), i = v();
|
|
@@ -456,9 +449,9 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
456
449
|
},
|
|
457
450
|
Z: () => s()
|
|
458
451
|
};
|
|
459
|
-
},
|
|
452
|
+
}, G = (e, t) => {
|
|
460
453
|
let o, n, r, s = v();
|
|
461
|
-
const l = /* @__PURE__ */ new WeakMap, i = /* @__PURE__ */ new WeakMap, c =
|
|
454
|
+
const l = /* @__PURE__ */ new WeakMap, i = /* @__PURE__ */ new WeakMap, c = j(n => {
|
|
462
455
|
const r = [], s = [];
|
|
463
456
|
for (const {target: c, contentRect: {width: a, height: f}} of n) if (c === o) (a || f) && (e.W(4, f),
|
|
464
457
|
t.W(4, a)); else if (c.offsetParent) {
|
|
@@ -474,7 +467,7 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
474
467
|
F(l) {
|
|
475
468
|
const i = o = l.parentElement;
|
|
476
469
|
c.X(i);
|
|
477
|
-
const a = (e, t) =>
|
|
470
|
+
const a = (e, t) => J(e, i, i, t, t && "rtl" === getComputedStyle(i).direction, () => {
|
|
478
471
|
const e = t ? "overflowX" : "overflowY", o = i.style, n = o[e];
|
|
479
472
|
o[e] = "hidden", w(() => {
|
|
480
473
|
o[e] = n;
|
|
@@ -492,9 +485,9 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
492
485
|
n && n.J(), r && r.J();
|
|
493
486
|
}
|
|
494
487
|
};
|
|
495
|
-
},
|
|
488
|
+
}, K = (e, t) => {
|
|
496
489
|
e.K(() => t);
|
|
497
|
-
},
|
|
490
|
+
}, N = (e, t, o, {align: n, smooth: r, offset: s = 0} = {}) => {
|
|
498
491
|
if (o = p(o, 0, t.T() - 1), "nearest" === n) {
|
|
499
492
|
const e = t.u(o), r = t.M();
|
|
500
493
|
if (e < r) n = "start"; else {
|
|
@@ -503,10 +496,10 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
503
496
|
}
|
|
504
497
|
}
|
|
505
498
|
e.K(() => s + e.Z() + t.u(o) + ("end" === n ? t.$(o) - t.o() : "center" === n ? (t.$(o) - t.o()) / 2 : 0), r);
|
|
506
|
-
},
|
|
499
|
+
}, Q = (e, t, o, n, r, s, l) => {
|
|
507
500
|
const i = t.T(), c = o.B(), a = o.D();
|
|
508
501
|
r = p(r, 0, i - 1);
|
|
509
|
-
const f = H(n, c, a), u = P(f, r, a), g = u < 0 ? -1 : f[u], h = () => o.u(c) + (g < 0 || g === r ? 0 :
|
|
502
|
+
const f = H(n, c, a), u = P(f, r, a), g = u < 0 ? -1 : f[u], h = () => o.u(c) + (g < 0 || g === r ? 0 : o.u(g + 1) - o.u(g)), m = () => o.u(i) - o.u(a);
|
|
510
503
|
if ("nearest" === s) {
|
|
511
504
|
if (r < c || r >= a) return;
|
|
512
505
|
const e = h(), o = t.M() + e, n = t.o() - e - m(), l = t.$(r);
|
|
@@ -524,22 +517,22 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
524
517
|
const e = h(), o = t.$(r) - (t.o() - e - m());
|
|
525
518
|
return t.u(r) - e + ("end" === s ? o : "center" === s ? o / 2 : 0);
|
|
526
519
|
});
|
|
527
|
-
},
|
|
528
|
-
if (Array.isArray(e)) for (const o of e)
|
|
529
|
-
},
|
|
520
|
+
}, Z = z ? r : o, ee = "current", te = (e, t) => {
|
|
521
|
+
if (Array.isArray(e)) for (const o of e) te(o, t); else null == e || "boolean" == typeof e || t.push(e);
|
|
522
|
+
}, oe = (e, t) => {
|
|
530
523
|
const o = e.key;
|
|
531
524
|
return null != o ? o : "_" + t;
|
|
532
|
-
},
|
|
525
|
+
}, ne = e => {
|
|
533
526
|
const t = i(null);
|
|
534
527
|
return t.current || (t.current = e());
|
|
535
|
-
},
|
|
528
|
+
}, re = e => {
|
|
536
529
|
const t = i(e);
|
|
537
|
-
return
|
|
538
|
-
t[
|
|
530
|
+
return Z(() => {
|
|
531
|
+
t[ee] = e;
|
|
539
532
|
}, [ e ]), t;
|
|
540
|
-
},
|
|
533
|
+
}, se = /*#__PURE__*/ t(({ee: e, te: t, oe: o, ne: n, re: r, se: l, le: a, ie: f}) => {
|
|
541
534
|
const u = i(null);
|
|
542
|
-
|
|
535
|
+
Z(() => t(u[ee], o), [ o ]);
|
|
543
536
|
const d = s(() => {
|
|
544
537
|
const e = {
|
|
545
538
|
contain: "layout style",
|
|
@@ -562,23 +555,23 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
562
555
|
index: o,
|
|
563
556
|
children: e
|
|
564
557
|
});
|
|
565
|
-
}),
|
|
558
|
+
}), le = (e, t) => s(() => {
|
|
566
559
|
if ("function" == typeof e) return [ o => e(t[o], o), t.length ];
|
|
567
560
|
const o = (e => {
|
|
568
561
|
const t = [];
|
|
569
|
-
return
|
|
562
|
+
return te(e, t), t;
|
|
570
563
|
})(e);
|
|
571
564
|
return [ e => o[e], o.length ];
|
|
572
|
-
}, [ e, t ]),
|
|
573
|
-
const [y, I] =
|
|
565
|
+
}, [ e, t ]), ie = /*#__PURE__*/ e(({children: e, data: t, bufferSize: o, itemSize: r, shift: s, horizontal: f, keepMounted: u, cache: d, startMargin: $ = 0, ssrCount: g, as: h = "div", item: p = "div", scrollRef: w, onScroll: S, onScrollEnd: v}, z) => {
|
|
566
|
+
const [y, I] = le(e, t), x = i(null), R = i(!!g), T = re(S), C = re(v), [O, E, L, A] = ne(() => {
|
|
574
567
|
const e = !!f, t = M(I, r, d), o = k(t, g);
|
|
575
|
-
return [ o, t,
|
|
568
|
+
return [ o, t, U(o, e), e ];
|
|
576
569
|
});
|
|
577
570
|
I !== O.T() && O.W(5, [ I, s ]), $ !== O.O() && O.W(6, $);
|
|
578
571
|
const [W, H] = l(O.I, void 0, O.I), P = O.C(), q = O.t(), B = [], D = e => {
|
|
579
572
|
const t = y(e);
|
|
580
573
|
/* @__PURE__ */
|
|
581
|
-
return c(
|
|
574
|
+
return c(se, {
|
|
582
575
|
te: L.G,
|
|
583
576
|
oe: e,
|
|
584
577
|
ne: O.u(e),
|
|
@@ -586,24 +579,24 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
586
579
|
se: p,
|
|
587
580
|
ee: t,
|
|
588
581
|
le: A,
|
|
589
|
-
ie: R[
|
|
590
|
-
},
|
|
582
|
+
ie: R[ee]
|
|
583
|
+
}, oe(t, e));
|
|
591
584
|
};
|
|
592
|
-
if (
|
|
593
|
-
R[
|
|
585
|
+
if (Z(() => {
|
|
586
|
+
R[ee] = !1, O.A(1, e => {
|
|
594
587
|
e ? a(H) : H();
|
|
595
588
|
}), O.A(4, () => {
|
|
596
589
|
T.current && T.current(O.M());
|
|
597
590
|
}), O.A(8, () => {
|
|
598
591
|
C.current && C.current();
|
|
599
592
|
});
|
|
600
|
-
const e = x[
|
|
593
|
+
const e = x[ee];
|
|
601
594
|
return w ? _(() => {
|
|
602
|
-
w.current && L.F(e, w[
|
|
595
|
+
w.current && L.F(e, w[ee]);
|
|
603
596
|
}) : L.F(e), () => {
|
|
604
597
|
O.v(), L.v();
|
|
605
598
|
};
|
|
606
|
-
}, []),
|
|
599
|
+
}, []), Z(() => {
|
|
607
600
|
L.N();
|
|
608
601
|
}, [ W ]), n(z, () => ({
|
|
609
602
|
get cache() {
|
|
@@ -621,10 +614,10 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
621
614
|
findItemIndex: O.k,
|
|
622
615
|
getItemOffset: O.u,
|
|
623
616
|
getItemSize: O.$,
|
|
624
|
-
scrollToIndex: (e, t) =>
|
|
625
|
-
scrollTo: e =>
|
|
617
|
+
scrollToIndex: (e, t) => N(L, O, e, t),
|
|
618
|
+
scrollTo: e => K(L, e),
|
|
626
619
|
scrollBy: e => ((e, t, o) => {
|
|
627
|
-
|
|
620
|
+
K(e, o + t.M());
|
|
628
621
|
})(L, O, e)
|
|
629
622
|
}), []), u) {
|
|
630
623
|
const e = new Set(u);
|
|
@@ -647,7 +640,7 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
647
640
|
},
|
|
648
641
|
children: B
|
|
649
642
|
});
|
|
650
|
-
}),
|
|
643
|
+
}), ce = /*#__PURE__*/ e(({children: e, data: t, bufferSize: o, itemSize: n, shift: r, horizontal: s, keepMounted: l, cache: i, ssrCount: a, item: f, onScroll: u, onScrollEnd: d, style: $, ...g}, h) => /* @__PURE__ */ c("div", {
|
|
651
644
|
...g,
|
|
652
645
|
style: {
|
|
653
646
|
display: s ? "inline-block" : "block",
|
|
@@ -657,7 +650,7 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
657
650
|
height: "100%",
|
|
658
651
|
...$
|
|
659
652
|
},
|
|
660
|
-
children: /* @__PURE__ */ c(
|
|
653
|
+
children: /* @__PURE__ */ c(ie, {
|
|
661
654
|
ref: h,
|
|
662
655
|
data: t,
|
|
663
656
|
bufferSize: o,
|
|
@@ -672,22 +665,22 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
672
665
|
onScrollEnd: d,
|
|
673
666
|
children: e
|
|
674
667
|
})
|
|
675
|
-
})),
|
|
676
|
-
const [w, S] =
|
|
668
|
+
})), ae = /*#__PURE__*/ e(({children: e, data: t, bufferSize: o, itemSize: r, shift: s, horizontal: f, cache: u, ssrCount: d, as: $ = "div", item: g = "div", onScroll: h, onScrollEnd: p}, m) => {
|
|
669
|
+
const [w, S] = le(e, t), _ = i(null), v = re(h), z = re(p), y = i(!!d), [I, x, b, R] = ne(() => {
|
|
677
670
|
const e = !!f, t = M(S, r, u), o = k(t, d);
|
|
678
|
-
return [ o, t,
|
|
671
|
+
return [ o, t, F(o, e), e ];
|
|
679
672
|
});
|
|
680
673
|
S !== I.T() && I.W(5, [ S, s ]);
|
|
681
674
|
const [T, C] = l(I.I, void 0, I.I), O = I.C(), E = I.t(), L = [];
|
|
682
|
-
|
|
675
|
+
Z(() => (y[ee] = !1, I.A(1, e => {
|
|
683
676
|
e ? a(C) : C();
|
|
684
677
|
}), I.A(4, () => {
|
|
685
678
|
v.current && v.current();
|
|
686
679
|
}), I.A(8, () => {
|
|
687
680
|
z.current && z.current();
|
|
688
|
-
}), b.F(_[
|
|
681
|
+
}), b.F(_[ee]), () => {
|
|
689
682
|
I.v(), b.v();
|
|
690
|
-
}), []),
|
|
683
|
+
}), []), Z(() => {
|
|
691
684
|
b.N();
|
|
692
685
|
}, [ T ]), n(m, () => ({
|
|
693
686
|
get cache() {
|
|
@@ -702,11 +695,11 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
702
695
|
findItemIndex: I.k,
|
|
703
696
|
getItemOffset: I.u,
|
|
704
697
|
getItemSize: I.$,
|
|
705
|
-
scrollToIndex: (e, t) =>
|
|
698
|
+
scrollToIndex: (e, t) => N(b, I, e, t)
|
|
706
699
|
}), []);
|
|
707
700
|
for (let [e, t] = I.l(o); e <= t; e++) {
|
|
708
701
|
const t = w(e);
|
|
709
|
-
L.push(/* @__PURE__ */ c(
|
|
702
|
+
L.push(/* @__PURE__ */ c(se, {
|
|
710
703
|
te: b.G,
|
|
711
704
|
oe: e,
|
|
712
705
|
ne: I.u(e),
|
|
@@ -714,8 +707,8 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
714
707
|
se: g,
|
|
715
708
|
ee: t,
|
|
716
709
|
le: R,
|
|
717
|
-
ie: y[
|
|
718
|
-
},
|
|
710
|
+
ie: y[ee]
|
|
711
|
+
}, oe(t, e)));
|
|
719
712
|
}
|
|
720
713
|
/* @__PURE__ */
|
|
721
714
|
return c($, {
|
|
@@ -731,10 +724,10 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
731
724
|
},
|
|
732
725
|
children: L
|
|
733
726
|
});
|
|
734
|
-
}),
|
|
727
|
+
}), fe = /*#__PURE__*/ t(({ce: {ae: e, fe: t, ue: o, de: n, $e: r, ge: s, he: l, pe: a}, ee: f, me: u, we: d, Se: $, te: g}) => {
|
|
735
728
|
const h = i(null);
|
|
736
|
-
return
|
|
737
|
-
if (null != n || null != r) return g(h[
|
|
729
|
+
return Z(() => {
|
|
730
|
+
if (null != n || null != r) return g(h[ee], n, r);
|
|
738
731
|
}, [ n, r, g ]), /* @__PURE__ */ c("div", {
|
|
739
732
|
ref: h,
|
|
740
733
|
role: s,
|
|
@@ -748,11 +741,11 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
748
741
|
colIndex: e
|
|
749
742
|
})
|
|
750
743
|
});
|
|
751
|
-
}),
|
|
744
|
+
}), ue = /*#__PURE__*/ t(({ce: {_e: e, ve: t, pe: o}, ee: n, me: r, ze: s, te: l}) => /* @__PURE__ */ c("div", {
|
|
752
745
|
role: "row",
|
|
753
746
|
"aria-rowindex": e + 1,
|
|
754
747
|
style: o,
|
|
755
|
-
children: t.map(t => /* @__PURE__ */ c(
|
|
748
|
+
children: t.map(t => /* @__PURE__ */ c(fe, {
|
|
756
749
|
ce: t,
|
|
757
750
|
ee: n,
|
|
758
751
|
me: r,
|
|
@@ -760,183 +753,179 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
760
753
|
Se: e,
|
|
761
754
|
te: l
|
|
762
755
|
}, t.ae))
|
|
763
|
-
})),
|
|
756
|
+
})), de = ({ce: {ye: e, pe: t}, ee: o, Ie: n, ze: r, te: s}) => /* @__PURE__ */ c("div", {
|
|
764
757
|
role: "rowgroup",
|
|
765
758
|
style: t,
|
|
766
|
-
children: e.map(e => /* @__PURE__ */ c(
|
|
759
|
+
children: e.map(e => /* @__PURE__ */ c(ue, {
|
|
767
760
|
ce: e,
|
|
768
761
|
ee: o,
|
|
769
762
|
me: O(n, e._e),
|
|
770
763
|
ze: r,
|
|
771
764
|
te: s
|
|
772
765
|
}, e._e))
|
|
773
|
-
}),
|
|
774
|
-
const
|
|
766
|
+
}), $e = /*#__PURE__*/ e(({children: e, rows: t, cols: o, rowHeight: r, colWidth: s, headerRows: f, sectionRows: g, footerRows: h, headerCols: w, footerCols: S, spans: _, keepMounted: v, bufferSize: z, gap: y = 0, ariaSort: I, onVerticalScroll: x, onHorizontalScroll: R, onScrollEnd: T, style: M, ...C}, q) => {
|
|
767
|
+
const j = i(null), J = re(x), U = re(R), F = re(T), [K, N, te, oe, se] = ne(() => {
|
|
775
768
|
const e = E(t, r, y), n = E(o, s, y), l = k(e), i = k(n);
|
|
776
|
-
return [ l, i, e, n,
|
|
769
|
+
return [ l, i, e, n, G(l, i) ];
|
|
777
770
|
});
|
|
778
|
-
L(
|
|
779
|
-
const
|
|
771
|
+
L(K, te, t, r, f, h), L(N, oe, o, s, w, S);
|
|
772
|
+
const le = () => K.I() + N.I(), [ie, ce] = l(le, void 0, le), ae = K.C() || N.C(), fe = K.u(0), $e = N.u(0), ge = K.T(), he = N.T(), pe = ((e, t, o, n, r = u, s = u, l = u, i) => {
|
|
780
773
|
const c = e.m(), a = t.m(), f = e.B(), g = e.D(), h = t.B(), w = t.D(), S = p(o[0], f, g), _ = d(o[1], g - 1), v = p(n[0], h, w), z = d(n[1], w - 1), y = H(r, f, g), I = $(h - 1, 0), x = [], b = [], k = [];
|
|
781
774
|
for (const e of l) e.rowIndex < c && e.colIndex < a && k.push(e);
|
|
782
|
-
const R = y.length;
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
for (const t of T) {
|
|
792
|
-
const o = t.rowIndex, n = t.colIndex, r = V(t, c), s = X(t, a);
|
|
793
|
-
if (o < c && n < a && (r - o > 1 || s - n > 1)) {
|
|
794
|
-
const l = W(x, o, r, f, S, _, g);
|
|
795
|
-
if (l && W(b, n, s, h, v, z, w)) k.push(t); else if (l) {
|
|
796
|
-
const n = P(y, r - 1, g);
|
|
797
|
-
(o < f || n >= 0 && y[n] >= o) && e.push(t);
|
|
798
|
-
} else n < h && e.push(t);
|
|
775
|
+
const R = k.length, T = y.length, M = P(y, S, g), C = M < 0 ? -1 : y[M];
|
|
776
|
+
C >= 0 && x.push(C);
|
|
777
|
+
for (const e of s) {
|
|
778
|
+
const t = e.rowIndex, o = e.colIndex, n = D(e, c), r = V(e, a);
|
|
779
|
+
if (t < c && o < a && (n - t > 1 || r - o > 1)) {
|
|
780
|
+
let s = (W(t, n, f, S, _, g) || C >= t && C < n) && W(o, r, h, v, z, w);
|
|
781
|
+
for (let e = 0; !s && e < R; e++) {
|
|
782
|
+
const {rowIndex: l, colIndex: i} = k[e];
|
|
783
|
+
s = l >= t && l < n && i >= o && i < r;
|
|
799
784
|
}
|
|
785
|
+
s && k.push(e);
|
|
800
786
|
}
|
|
801
|
-
|
|
802
|
-
|
|
787
|
+
}
|
|
788
|
+
for (const {rowIndex: e, colIndex: t} of k) {
|
|
789
|
+
const o = P(y, e, g);
|
|
790
|
+
x.push(e), o >= 0 && x.push(y[o]), b.push(t);
|
|
791
|
+
}
|
|
803
792
|
m(x), m(b);
|
|
804
|
-
const
|
|
793
|
+
const O = B(x, c, f, S, _, g), E = B(b, a, h, v, z, w), L = O.length, q = E.length, j = /* @__PURE__ */ new Map, J = [], U = [];
|
|
805
794
|
for (const e of k) {
|
|
806
|
-
const t =
|
|
795
|
+
const t = D(e, c), o = V(e, a);
|
|
807
796
|
J.push(t), U.push(o);
|
|
808
|
-
const n =
|
|
809
|
-
for (let r =
|
|
810
|
-
const t =
|
|
811
|
-
for (let r = n; r <
|
|
797
|
+
const n = E.indexOf(e.colIndex);
|
|
798
|
+
for (let r = O.indexOf(e.rowIndex); r < L && O[r] < t; r++) {
|
|
799
|
+
const t = O[r] * a;
|
|
800
|
+
for (let r = n; r < q && E[r] < o; r++) j.set(t + E[r], e);
|
|
812
801
|
}
|
|
813
802
|
}
|
|
814
803
|
const F = [];
|
|
815
|
-
for (const e of
|
|
804
|
+
for (const e of E) F.push(!t.P(e) && null);
|
|
816
805
|
const G = [], K = e.u(f), N = [];
|
|
817
806
|
let Q = N;
|
|
818
807
|
const Z = A.get(e), ee = /* @__PURE__ */ new Map;
|
|
819
|
-
for (const o of
|
|
820
|
-
const n = o < f, r = o >= g, s =
|
|
821
|
-
if (o ===
|
|
822
|
-
const e = n ? f : r ? c :
|
|
808
|
+
for (const o of O) {
|
|
809
|
+
const n = o < f, r = o >= g, s = P(y, o, g), l = n ? 0 : r ? g : s < 0 ? -1 : y[s];
|
|
810
|
+
if (o === l) {
|
|
811
|
+
const e = n ? f : r ? c : s + 1 < T ? y[s + 1] : g;
|
|
823
812
|
J.push(e);
|
|
824
813
|
const t = [];
|
|
825
814
|
N.push({
|
|
826
|
-
xe: n ? -1 : r ? -2 : -3 -
|
|
815
|
+
xe: n ? -1 : r ? -2 : -3 - l,
|
|
827
816
|
ye: t,
|
|
828
|
-
pe:
|
|
817
|
+
pe: Y(l, e, n || r ? 0 : null, r ? "bottom" : "top", 4)
|
|
829
818
|
}), Q = t;
|
|
830
|
-
} else
|
|
831
|
-
const
|
|
832
|
-
let
|
|
833
|
-
for (let e = 0; e <
|
|
834
|
-
const r =
|
|
835
|
-
if (g ? g.rowIndex === o && g.colIndex === r :
|
|
836
|
-
const
|
|
819
|
+
} else l < 0 && (Q = N);
|
|
820
|
+
const u = s >= 0 && o === l, d = n || r || o === C || o >= S && o <= _, p = u ? K : null, m = o * a, x = Z && Z.get(o), b = x && x.ve, k = [];
|
|
821
|
+
let R = 0, M = !e.P(o) && null, O = o + 1, L = !1;
|
|
822
|
+
for (let e = 0; e < q; e++) {
|
|
823
|
+
const r = E[e], s = r < h, l = r >= w, f = s || l || r >= v && r <= z, g = j.get(m + r);
|
|
824
|
+
if (g ? g.rowIndex === o && g.colIndex === r : d && f) {
|
|
825
|
+
const f = g ? D(g, c) : o + 1, d = g ? V(g, a) : r + 1, h = f - o, p = d - r, m = h > 1, w = p > 1, S = m || w;
|
|
837
826
|
let _, v;
|
|
838
|
-
|
|
839
|
-
const z =
|
|
827
|
+
O = $(O, f);
|
|
828
|
+
const z = s ? t.u(r) : null, y = l ? t.t() - t.u(d - 1) - t.$(d - 1) : null;
|
|
840
829
|
!1 !== M || m || (_ = o, M = !0), !1 !== F[e] || w || (v = r, F[e] = !0);
|
|
841
|
-
const x = n ? "columnheader" : r === I && (
|
|
830
|
+
const x = n ? "columnheader" : r === I && (s || u) ? "rowheader" : "cell", T = S ? h : void 0, C = S ? p : void 0, E = "cell" !== x && i && i.rowIndex === o && i.colIndex === r ? i.order : void 0;
|
|
842
831
|
let A;
|
|
843
832
|
if (b) {
|
|
844
833
|
const e = b.length;
|
|
845
|
-
for (;
|
|
846
|
-
|
|
834
|
+
for (;R < e && b[R].ae < r; ) R++;
|
|
835
|
+
R < e && b[R].ae === r && (A = b[R]);
|
|
847
836
|
}
|
|
848
|
-
if (!A || A.fe !==
|
|
837
|
+
if (!A || A.fe !== T || A.ue !== C || A.be !== z || A.ke !== y || A.de !== _ || A.$e !== v || A.ge !== x || A.he !== E) {
|
|
849
838
|
let e = "1/l" + r;
|
|
850
|
-
S && (e += "/l" +
|
|
839
|
+
S && (e += "/l" + f + "/l" + d);
|
|
851
840
|
const t = {
|
|
852
841
|
contain: "layout style",
|
|
853
842
|
display: "grid",
|
|
854
843
|
gridArea: e
|
|
855
844
|
};
|
|
856
845
|
m && (t.height = "0px", t.minHeight = "100%", t.zIndex = 1), w && (t.width = "0px",
|
|
857
|
-
t.minWidth = "100%"), (
|
|
846
|
+
t.minWidth = "100%"), (s || l) && (t[s ? "insetInlineStart" : "insetInlineEnd"] = (s ? z : y) + "px",
|
|
858
847
|
t.position = "sticky", t.zIndex = 2), A = {
|
|
859
848
|
ae: r,
|
|
860
|
-
fe:
|
|
861
|
-
ue:
|
|
849
|
+
fe: T,
|
|
850
|
+
ue: C,
|
|
862
851
|
de: _,
|
|
863
852
|
$e: v,
|
|
864
853
|
ge: x,
|
|
865
|
-
he:
|
|
854
|
+
he: E,
|
|
866
855
|
pe: t,
|
|
867
856
|
be: z,
|
|
868
857
|
ke: y
|
|
869
|
-
},
|
|
858
|
+
}, L = !0;
|
|
870
859
|
}
|
|
871
860
|
k.push(A);
|
|
872
861
|
}
|
|
873
862
|
}
|
|
874
863
|
if (G.push(M), k.length) {
|
|
875
|
-
const e = x && !
|
|
864
|
+
const e = x && !L && x.ve.length === k.length && x.Re === p ? x : {
|
|
876
865
|
_e: o,
|
|
877
866
|
ve: k,
|
|
878
|
-
pe:
|
|
867
|
+
pe: Y(o, O, p, "top", 3),
|
|
879
868
|
Re: p
|
|
880
869
|
};
|
|
881
870
|
ee.set(o, e), Q.push(e);
|
|
882
871
|
}
|
|
883
872
|
}
|
|
884
873
|
return A.set(e, ee), {
|
|
885
|
-
Te:
|
|
886
|
-
Me:
|
|
874
|
+
Te: X(e, O, G, m(J), "max-content", c),
|
|
875
|
+
Me: X(t, E, F, m(U), "minmax(max-content,auto)", a),
|
|
887
876
|
Ce: N
|
|
888
877
|
};
|
|
889
|
-
})(
|
|
890
|
-
null != l &&
|
|
891
|
-
})(
|
|
892
|
-
return
|
|
878
|
+
})(te, oe, K.l(z), N.l(z), g, _, v, I), me = re(e => ((e, t, o, n, r, s = u, {rowIndex: l, colIndex: i, rowAlign: c, colAlign: a}) => {
|
|
879
|
+
null != l && Q(e, t, n, s, l, c, !1), null != i && Q(e, o, r, u, i, a, !0);
|
|
880
|
+
})(se, K, N, te, oe, g, e));
|
|
881
|
+
return Z(() => {
|
|
893
882
|
const e = e => {
|
|
894
|
-
e ? a(
|
|
883
|
+
e ? a(ce) : ce();
|
|
895
884
|
};
|
|
896
|
-
|
|
885
|
+
K.A(1, e), N.A(1, e);
|
|
897
886
|
let t = !1;
|
|
898
|
-
|
|
887
|
+
K.A(4, () => {
|
|
888
|
+
t = !0, J.current && J.current(K.M());
|
|
889
|
+
}), N.A(4, () => {
|
|
899
890
|
t = !0, U.current && U.current(N.M());
|
|
900
|
-
}), Q.A(4, () => {
|
|
901
|
-
t = !0, F.current && F.current(Q.M());
|
|
902
891
|
});
|
|
903
892
|
const o = () => {
|
|
904
|
-
!t ||
|
|
893
|
+
!t || K.C() || N.C() || (t = !1, F.current && F.current());
|
|
905
894
|
};
|
|
906
|
-
return
|
|
907
|
-
|
|
895
|
+
return K.A(8, o), N.A(8, o), se.F(j[ee]), () => {
|
|
896
|
+
K.v(), N.v(), se.v();
|
|
908
897
|
};
|
|
909
|
-
}, []),
|
|
910
|
-
|
|
911
|
-
}, [
|
|
898
|
+
}, []), Z(() => {
|
|
899
|
+
se.N();
|
|
900
|
+
}, [ ie ]), n(q, () => ({
|
|
912
901
|
get verticalScrollOffset() {
|
|
913
|
-
return
|
|
902
|
+
return K.M();
|
|
914
903
|
},
|
|
915
904
|
get horizontalScrollOffset() {
|
|
916
|
-
return
|
|
905
|
+
return N.M();
|
|
917
906
|
},
|
|
918
907
|
get scrollHeight() {
|
|
919
|
-
return b(
|
|
908
|
+
return b(K);
|
|
920
909
|
},
|
|
921
910
|
get scrollWidth() {
|
|
922
|
-
return b(
|
|
911
|
+
return b(N);
|
|
923
912
|
},
|
|
924
913
|
get viewportHeight() {
|
|
925
|
-
return
|
|
914
|
+
return K.o();
|
|
926
915
|
},
|
|
927
916
|
get viewportWidth() {
|
|
928
|
-
return
|
|
929
|
-
},
|
|
930
|
-
findRowIndex:
|
|
931
|
-
findColIndex:
|
|
932
|
-
getRowOffset:
|
|
933
|
-
getColOffset:
|
|
934
|
-
getRowSize:
|
|
935
|
-
getColSize:
|
|
936
|
-
scrollToIndex: e =>
|
|
917
|
+
return N.o();
|
|
918
|
+
},
|
|
919
|
+
findRowIndex: K.k,
|
|
920
|
+
findColIndex: N.k,
|
|
921
|
+
getRowOffset: K.u,
|
|
922
|
+
getColOffset: N.u,
|
|
923
|
+
getRowSize: K.$,
|
|
924
|
+
getColSize: N.$,
|
|
925
|
+
scrollToIndex: e => me[ee](e),
|
|
937
926
|
scrollTo: ({vertical: e, horizontal: t}) => ((e, t, o) => {
|
|
938
927
|
null != t && e.K(!1, () => t), null != o && e.K(!0, () => o);
|
|
939
|
-
})(
|
|
928
|
+
})(se, e, t),
|
|
940
929
|
scrollBy: ({vertical: e, horizontal: t}) => ((e, t, o, n, r) => {
|
|
941
930
|
if (null != n) {
|
|
942
931
|
const o = n + t.M();
|
|
@@ -946,11 +935,11 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
946
935
|
const t = r + o.M();
|
|
947
936
|
e.K(!0, () => t);
|
|
948
937
|
}
|
|
949
|
-
})(
|
|
938
|
+
})(se, K, N, e, t)
|
|
950
939
|
}), []), /* @__PURE__ */ c("div", {
|
|
951
940
|
role: "table",
|
|
952
|
-
"aria-rowcount":
|
|
953
|
-
"aria-colcount":
|
|
941
|
+
"aria-rowcount": ge,
|
|
942
|
+
"aria-colcount": he,
|
|
954
943
|
...C,
|
|
955
944
|
style: {
|
|
956
945
|
overflow: "auto",
|
|
@@ -960,36 +949,36 @@ f), b = e => $(e.t(), e.o()), k = ({l: e, i: t, u: o, $: n, h: r, p: s, t: l, m:
|
|
|
960
949
|
...M
|
|
961
950
|
},
|
|
962
951
|
children: /* @__PURE__ */ c("div", {
|
|
963
|
-
ref:
|
|
952
|
+
ref: j,
|
|
964
953
|
style: {
|
|
965
954
|
contain: "size style",
|
|
966
955
|
overflowAnchor: "none",
|
|
967
956
|
flex: "none",
|
|
968
957
|
display: "grid",
|
|
969
|
-
gridTemplateRows:
|
|
970
|
-
gridTemplateColumns:
|
|
958
|
+
gridTemplateRows: pe.Te,
|
|
959
|
+
gridTemplateColumns: pe.Me,
|
|
971
960
|
gap: y,
|
|
972
|
-
marginTop:
|
|
973
|
-
marginInlineStart:
|
|
974
|
-
height: b(
|
|
975
|
-
pointerEvents:
|
|
961
|
+
marginTop: fe,
|
|
962
|
+
marginInlineStart: $e,
|
|
963
|
+
height: b(K) - fe,
|
|
964
|
+
pointerEvents: ae ? "none" : void 0
|
|
976
965
|
},
|
|
977
|
-
children:
|
|
966
|
+
children: pe.Ce.map(n => "ye" in n ? /* @__PURE__ */ c(de, {
|
|
978
967
|
ce: n,
|
|
979
968
|
ee: e,
|
|
980
969
|
Ie: t,
|
|
981
970
|
ze: o,
|
|
982
|
-
te:
|
|
983
|
-
}, n.xe) : /* @__PURE__ */ c(
|
|
971
|
+
te: se.G
|
|
972
|
+
}, n.xe) : /* @__PURE__ */ c(ue, {
|
|
984
973
|
ce: n,
|
|
985
974
|
ee: e,
|
|
986
975
|
me: O(t, n._e),
|
|
987
976
|
ze: o,
|
|
988
|
-
te:
|
|
977
|
+
te: se.G
|
|
989
978
|
}, n._e))
|
|
990
979
|
})
|
|
991
980
|
});
|
|
992
981
|
});
|
|
993
982
|
|
|
994
|
-
export {
|
|
983
|
+
export { $e as VGrid, ce as VList, ie as Virtualizer, ae as WindowVirtualizer };
|
|
995
984
|
//# sourceMappingURL=index.js.map
|