react-virtuoso 4.17.0 → 4.18.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/README.md +264 -4
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +819 -50
- package/dist/index.mjs +257 -257
- package/package.json +24 -31
package/dist/index.mjs
CHANGED
|
@@ -89,7 +89,7 @@ function Ft(t) {
|
|
|
89
89
|
}
|
|
90
90
|
function x(t, ...e) {
|
|
91
91
|
const n = Io(...e);
|
|
92
|
-
return (o, r) => {
|
|
92
|
+
return ((o, r) => {
|
|
93
93
|
switch (o) {
|
|
94
94
|
case Jt:
|
|
95
95
|
We(t);
|
|
@@ -97,7 +97,7 @@ function x(t, ...e) {
|
|
|
97
97
|
case At:
|
|
98
98
|
return Y(t, n(r));
|
|
99
99
|
}
|
|
100
|
-
};
|
|
100
|
+
});
|
|
101
101
|
}
|
|
102
102
|
function Lt(t, e) {
|
|
103
103
|
return (n) => (o) => {
|
|
@@ -123,9 +123,9 @@ function $(...t) {
|
|
|
123
123
|
const r = Math.pow(2, t.length) - 1;
|
|
124
124
|
return t.forEach((s, i) => {
|
|
125
125
|
const l = Math.pow(2, i);
|
|
126
|
-
Y(s, (
|
|
126
|
+
Y(s, (u) => {
|
|
127
127
|
const d = n;
|
|
128
|
-
n = n | l, e[i] =
|
|
128
|
+
n = n | l, e[i] = u, d !== r && n === r && o && (o(), o = null);
|
|
129
129
|
});
|
|
130
130
|
}), (s) => (i) => {
|
|
131
131
|
const l = () => {
|
|
@@ -153,7 +153,7 @@ function xo(t) {
|
|
|
153
153
|
function C(t) {
|
|
154
154
|
let e = t;
|
|
155
155
|
const n = U();
|
|
156
|
-
return (o, r) => {
|
|
156
|
+
return ((o, r) => {
|
|
157
157
|
switch (o) {
|
|
158
158
|
case ve:
|
|
159
159
|
e = r;
|
|
@@ -166,14 +166,14 @@ function C(t) {
|
|
|
166
166
|
return e;
|
|
167
167
|
}
|
|
168
168
|
return n(o, r);
|
|
169
|
-
};
|
|
169
|
+
});
|
|
170
170
|
}
|
|
171
171
|
function ht(t, e) {
|
|
172
172
|
return ye(C(e), (n) => F(t, n));
|
|
173
173
|
}
|
|
174
174
|
function U() {
|
|
175
175
|
const t = [];
|
|
176
|
-
return (e, n) => {
|
|
176
|
+
return ((e, n) => {
|
|
177
177
|
switch (e) {
|
|
178
178
|
case ve:
|
|
179
179
|
t.slice().forEach((o) => {
|
|
@@ -189,7 +189,7 @@ function U() {
|
|
|
189
189
|
o > -1 && t.splice(o, 1);
|
|
190
190
|
};
|
|
191
191
|
}
|
|
192
|
-
};
|
|
192
|
+
});
|
|
193
193
|
}
|
|
194
194
|
function bt(t) {
|
|
195
195
|
return ye(U(), (e) => F(t, e));
|
|
@@ -207,7 +207,7 @@ function To(t) {
|
|
|
207
207
|
const e = /* @__PURE__ */ new Map(), n = ({ constructor: o, dependencies: r, id: s, singleton: i }) => {
|
|
208
208
|
if (i && e.has(s))
|
|
209
209
|
return e.get(s);
|
|
210
|
-
const l = o(r.map((
|
|
210
|
+
const l = o(r.map((u) => n(u)));
|
|
211
211
|
return i && e.set(s, l), l;
|
|
212
212
|
};
|
|
213
213
|
return n(t);
|
|
@@ -218,8 +218,8 @@ function ut(...t) {
|
|
|
218
218
|
const r = Math.pow(2, t.length) - 1;
|
|
219
219
|
return t.forEach((s, i) => {
|
|
220
220
|
const l = Math.pow(2, i);
|
|
221
|
-
Y(s, (
|
|
222
|
-
n[i] =
|
|
221
|
+
Y(s, (u) => {
|
|
222
|
+
n[i] = u, o = o | l, o === r && D(e, n);
|
|
223
223
|
});
|
|
224
224
|
}), function(s, i) {
|
|
225
225
|
switch (s) {
|
|
@@ -284,8 +284,8 @@ function _e(t, e, n) {
|
|
|
284
284
|
};
|
|
285
285
|
const s = E.useMemo(() => typeof ResizeObserver < "u" ? new ResizeObserver((i) => {
|
|
286
286
|
const l = () => {
|
|
287
|
-
const
|
|
288
|
-
|
|
287
|
+
const u = i[0].target;
|
|
288
|
+
u.offsetParent !== null && t(u);
|
|
289
289
|
};
|
|
290
290
|
n ? l() : requestAnimationFrame(l);
|
|
291
291
|
}) : null, [t, n]);
|
|
@@ -293,7 +293,7 @@ function _e(t, e, n) {
|
|
|
293
293
|
i && e ? (s == null || s.observe(i), o.current = i) : (o.current && (s == null || s.unobserve(o.current)), o.current = null);
|
|
294
294
|
}, { callbackRef: r, ref: o };
|
|
295
295
|
}
|
|
296
|
-
function Fn(t, e, n, o, r, s, i, l,
|
|
296
|
+
function Fn(t, e, n, o, r, s, i, l, u) {
|
|
297
297
|
const d = E.useCallback(
|
|
298
298
|
(m) => {
|
|
299
299
|
const S = vo(m.children, e, l ? "offsetWidth" : "offsetHeight", r);
|
|
@@ -314,7 +314,7 @@ function Fn(t, e, n, o, r, s, i, l, c) {
|
|
|
314
314
|
},
|
|
315
315
|
[t, e, r, s, i, o, l]
|
|
316
316
|
);
|
|
317
|
-
return _e(d, n,
|
|
317
|
+
return _e(d, n, u);
|
|
318
318
|
}
|
|
319
319
|
function vo(t, e, n, o) {
|
|
320
320
|
const r = t.length;
|
|
@@ -325,11 +325,11 @@ function vo(t, e, n, o) {
|
|
|
325
325
|
const l = t.item(i);
|
|
326
326
|
if (l.dataset.index === void 0)
|
|
327
327
|
continue;
|
|
328
|
-
const
|
|
328
|
+
const u = parseInt(l.dataset.index), d = parseFloat(l.dataset.knownSize), m = e(l, n);
|
|
329
329
|
if (m === 0 && o("Zero-sized element, this should not happen", { child: l }, Ct.ERROR), m === d)
|
|
330
330
|
continue;
|
|
331
331
|
const S = s[s.length - 1];
|
|
332
|
-
s.length === 0 || S.size !== m || S.endIndex !==
|
|
332
|
+
s.length === 0 || S.size !== m || S.endIndex !== u - 1 ? s.push({ endIndex: u, size: m, startIndex: u }) : s[s.length - 1].endIndex++;
|
|
333
333
|
}
|
|
334
334
|
return s;
|
|
335
335
|
}
|
|
@@ -338,10 +338,10 @@ function fn(t, e, n) {
|
|
|
338
338
|
}
|
|
339
339
|
function Ne(t, e, n) {
|
|
340
340
|
const o = E.useRef(null), r = E.useCallback(
|
|
341
|
-
(
|
|
342
|
-
if (!(
|
|
341
|
+
(u) => {
|
|
342
|
+
if (!(u != null && u.offsetParent))
|
|
343
343
|
return;
|
|
344
|
-
const d =
|
|
344
|
+
const d = u.getBoundingClientRect(), m = d.width;
|
|
345
345
|
let S, h;
|
|
346
346
|
if (e) {
|
|
347
347
|
const T = e.getBoundingClientRect(), w = d.top - T.top;
|
|
@@ -362,7 +362,7 @@ function Ne(t, e, n) {
|
|
|
362
362
|
r(i.current);
|
|
363
363
|
}, [r, i]);
|
|
364
364
|
return E.useEffect(() => {
|
|
365
|
-
var
|
|
365
|
+
var u;
|
|
366
366
|
if (e) {
|
|
367
367
|
e.addEventListener("scroll", l);
|
|
368
368
|
const d = new ResizeObserver(() => {
|
|
@@ -372,7 +372,7 @@ function Ne(t, e, n) {
|
|
|
372
372
|
e.removeEventListener("scroll", l), d.unobserve(e);
|
|
373
373
|
};
|
|
374
374
|
} else {
|
|
375
|
-
const d = (
|
|
375
|
+
const d = (u = i.current) == null ? void 0 : u.ownerDocument.defaultView;
|
|
376
376
|
return d == null || d.addEventListener("scroll", l), d == null || d.addEventListener("resize", l), () => {
|
|
377
377
|
d == null || d.removeEventListener("scroll", l), d == null || d.removeEventListener("resize", l);
|
|
378
378
|
};
|
|
@@ -381,7 +381,7 @@ function Ne(t, e, n) {
|
|
|
381
381
|
}
|
|
382
382
|
const It = K(
|
|
383
383
|
() => {
|
|
384
|
-
const t = U(), e = U(), n = C(0), o = U(), r = C(0), s = U(), i = U(), l = C(0),
|
|
384
|
+
const t = U(), e = U(), n = C(0), o = U(), r = C(0), s = U(), i = U(), l = C(0), u = C(0), d = C(0), m = C(0), S = U(), h = U(), T = C(!1), w = C(!1), R = C(!1);
|
|
385
385
|
return F(
|
|
386
386
|
x(
|
|
387
387
|
t,
|
|
@@ -397,7 +397,7 @@ const It = K(
|
|
|
397
397
|
), F(e, r), {
|
|
398
398
|
deviation: n,
|
|
399
399
|
fixedFooterHeight: d,
|
|
400
|
-
fixedHeaderHeight:
|
|
400
|
+
fixedHeaderHeight: u,
|
|
401
401
|
footerHeight: m,
|
|
402
402
|
headerHeight: l,
|
|
403
403
|
horizontalDirection: w,
|
|
@@ -426,8 +426,8 @@ function Ln(t, e) {
|
|
|
426
426
|
let { index: o, value: r } = e(t[0]);
|
|
427
427
|
const s = [];
|
|
428
428
|
for (let i = 1; i < n; i++) {
|
|
429
|
-
const { index: l, value:
|
|
430
|
-
s.push({ end: l - 1, start: o, value: r }), o = l, r =
|
|
429
|
+
const { index: l, value: u } = e(t[i]);
|
|
430
|
+
s.push({ end: l - 1, start: o, value: r }), o = l, r = u;
|
|
431
431
|
}
|
|
432
432
|
return s.push({ end: 1 / 0, start: o, value: r }), s;
|
|
433
433
|
}
|
|
@@ -621,9 +621,9 @@ function Ho(t, e) {
|
|
|
621
621
|
const l = Xt(t, i - 1, r + 1);
|
|
622
622
|
if (l.some(Lo(o)))
|
|
623
623
|
continue;
|
|
624
|
-
let
|
|
624
|
+
let u = !1, d = !1;
|
|
625
625
|
for (const { end: m, start: S, value: h } of l)
|
|
626
|
-
|
|
626
|
+
u ? (r >= S || s === h) && (t = Le(t, S)) : (d = h !== s, u = !0), m > r && r >= S && h !== s && (t = yt(t, r + 1, h));
|
|
627
627
|
d && (t = yt(t, i, s));
|
|
628
628
|
}
|
|
629
629
|
return [t, n];
|
|
@@ -671,11 +671,11 @@ function zo(t, [e, n, o, r]) {
|
|
|
671
671
|
[i, l] = Ho(i, e);
|
|
672
672
|
if (i === s)
|
|
673
673
|
return t;
|
|
674
|
-
const { lastIndex:
|
|
674
|
+
const { lastIndex: u, lastOffset: d, lastSize: m, offsetTree: S } = Ge(t.offsetTree, l, i, r);
|
|
675
675
|
return {
|
|
676
676
|
groupIndices: n,
|
|
677
677
|
groupOffsetTree: n.reduce((h, T) => yt(h, T, ue(T, S, r)), Zt()),
|
|
678
|
-
lastIndex:
|
|
678
|
+
lastIndex: u,
|
|
679
679
|
lastOffset: d,
|
|
680
680
|
lastSize: m,
|
|
681
681
|
offsetTree: S,
|
|
@@ -695,11 +695,11 @@ function pn(t, e) {
|
|
|
695
695
|
return o - (n === t ? 0 : 1);
|
|
696
696
|
}
|
|
697
697
|
function Ge(t, e, n, o) {
|
|
698
|
-
let r = t, s = 0, i = 0, l = 0,
|
|
698
|
+
let r = t, s = 0, i = 0, l = 0, u = 0;
|
|
699
699
|
if (e !== 0) {
|
|
700
|
-
|
|
700
|
+
u = Ce(r, e - 1, $e), l = r[u].offset;
|
|
701
701
|
const m = kt(n, e - 1);
|
|
702
|
-
s = m[0], i = m[1], r.length && r[
|
|
702
|
+
s = m[0], i = m[1], r.length && r[u].size === kt(n, e)[1] && (u -= 1), r = r.slice(0, u + 1);
|
|
703
703
|
} else
|
|
704
704
|
r = [];
|
|
705
705
|
for (const { start: d, value: m } of Xt(n, e, 1 / 0)) {
|
|
@@ -729,31 +729,31 @@ const Vo = {
|
|
|
729
729
|
offsetWidth: "width"
|
|
730
730
|
}, Pt = K(
|
|
731
731
|
([{ log: t }, { recalcInProgress: e }]) => {
|
|
732
|
-
const n = U(), o = U(), r = ht(o, 0), s = U(), i = U(), l = C(0),
|
|
733
|
-
x(n, $(
|
|
732
|
+
const n = U(), o = U(), r = ht(o, 0), s = U(), i = U(), l = C(0), u = C([]), d = C(void 0), m = C(void 0), S = C(void 0), h = C(void 0), T = C((c, p) => zt(c, Vo[p])), w = C(void 0), R = C(0), g = Ro(), f = ht(
|
|
733
|
+
x(n, $(u, t, R), Lt(zo, g), J()),
|
|
734
734
|
g
|
|
735
735
|
), a = ht(
|
|
736
736
|
x(
|
|
737
|
-
|
|
737
|
+
u,
|
|
738
738
|
J(),
|
|
739
|
-
Lt((
|
|
739
|
+
Lt((c, p) => ({ current: p, prev: c.current }), {
|
|
740
740
|
current: [],
|
|
741
741
|
prev: []
|
|
742
742
|
}),
|
|
743
|
-
k(({ prev:
|
|
743
|
+
k(({ prev: c }) => c)
|
|
744
744
|
),
|
|
745
745
|
[]
|
|
746
746
|
);
|
|
747
747
|
F(
|
|
748
748
|
x(
|
|
749
|
-
|
|
750
|
-
P((
|
|
749
|
+
u,
|
|
750
|
+
P((c) => c.length > 0),
|
|
751
751
|
$(f, R),
|
|
752
|
-
k(([
|
|
753
|
-
const O =
|
|
752
|
+
k(([c, p, v]) => {
|
|
753
|
+
const O = c.reduce((B, W, _) => yt(B, W, ue(W, p.offsetTree, v) || _), Zt());
|
|
754
754
|
return {
|
|
755
755
|
...p,
|
|
756
|
-
groupIndices:
|
|
756
|
+
groupIndices: c,
|
|
757
757
|
groupOffsetTree: O
|
|
758
758
|
};
|
|
759
759
|
})
|
|
@@ -763,12 +763,12 @@ const Vo = {
|
|
|
763
763
|
x(
|
|
764
764
|
o,
|
|
765
765
|
$(f),
|
|
766
|
-
P(([
|
|
767
|
-
k(([
|
|
766
|
+
P(([c, { lastIndex: p }]) => c < p),
|
|
767
|
+
k(([c, { lastIndex: p, lastSize: v }]) => [
|
|
768
768
|
{
|
|
769
769
|
endIndex: p,
|
|
770
770
|
size: v,
|
|
771
|
-
startIndex:
|
|
771
|
+
startIndex: c
|
|
772
772
|
}
|
|
773
773
|
])
|
|
774
774
|
),
|
|
@@ -777,32 +777,32 @@ const Vo = {
|
|
|
777
777
|
const I = ht(
|
|
778
778
|
x(
|
|
779
779
|
d,
|
|
780
|
-
k((
|
|
780
|
+
k((c) => c === void 0)
|
|
781
781
|
),
|
|
782
782
|
!0
|
|
783
783
|
);
|
|
784
784
|
F(
|
|
785
785
|
x(
|
|
786
786
|
m,
|
|
787
|
-
P((
|
|
788
|
-
k((
|
|
789
|
-
const p = rt(S), v = rt(
|
|
787
|
+
P((c) => c !== void 0 && X(rt(f).sizeTree)),
|
|
788
|
+
k((c) => {
|
|
789
|
+
const p = rt(S), v = rt(u).length > 0;
|
|
790
790
|
return p ? v ? [
|
|
791
791
|
{ endIndex: 0, size: p, startIndex: 0 },
|
|
792
|
-
{ endIndex: 1, size:
|
|
793
|
-
] : [] : [{ endIndex: 0, size:
|
|
792
|
+
{ endIndex: 1, size: c, startIndex: 1 }
|
|
793
|
+
] : [] : [{ endIndex: 0, size: c, startIndex: 0 }];
|
|
794
794
|
})
|
|
795
795
|
),
|
|
796
796
|
n
|
|
797
797
|
), F(
|
|
798
798
|
x(
|
|
799
799
|
h,
|
|
800
|
-
P((
|
|
801
|
-
k((
|
|
800
|
+
P((c) => c !== void 0 && c.length > 0 && X(rt(f).sizeTree)),
|
|
801
|
+
k((c) => {
|
|
802
802
|
const p = [];
|
|
803
|
-
let v =
|
|
804
|
-
for (let B = 1; B <
|
|
805
|
-
const W =
|
|
803
|
+
let v = c[0], O = 0;
|
|
804
|
+
for (let B = 1; B < c.length; B++) {
|
|
805
|
+
const W = c[B];
|
|
806
806
|
W !== v && (p.push({
|
|
807
807
|
endIndex: B - 1,
|
|
808
808
|
size: v,
|
|
@@ -810,7 +810,7 @@ const Vo = {
|
|
|
810
810
|
}), v = W, O = B);
|
|
811
811
|
}
|
|
812
812
|
return p.push({
|
|
813
|
-
endIndex:
|
|
813
|
+
endIndex: c.length - 1,
|
|
814
814
|
size: v,
|
|
815
815
|
startIndex: O
|
|
816
816
|
}), p;
|
|
@@ -819,13 +819,13 @@ const Vo = {
|
|
|
819
819
|
n
|
|
820
820
|
), F(
|
|
821
821
|
x(
|
|
822
|
-
|
|
822
|
+
u,
|
|
823
823
|
$(S, m),
|
|
824
|
-
P(([,
|
|
825
|
-
k(([
|
|
824
|
+
P(([, c, p]) => c !== void 0 && p !== void 0),
|
|
825
|
+
k(([c, p, v]) => {
|
|
826
826
|
const O = [];
|
|
827
|
-
for (let B = 0; B <
|
|
828
|
-
const W =
|
|
827
|
+
for (let B = 0; B < c.length; B++) {
|
|
828
|
+
const W = c[B], _ = c[B + 1];
|
|
829
829
|
O.push({
|
|
830
830
|
startIndex: W,
|
|
831
831
|
endIndex: W,
|
|
@@ -846,35 +846,35 @@ const Vo = {
|
|
|
846
846
|
n,
|
|
847
847
|
$(f),
|
|
848
848
|
Lt(
|
|
849
|
-
({ sizes:
|
|
850
|
-
changed: v !==
|
|
849
|
+
({ sizes: c }, [p, v]) => ({
|
|
850
|
+
changed: v !== c,
|
|
851
851
|
sizes: v
|
|
852
852
|
}),
|
|
853
853
|
{ changed: !1, sizes: g }
|
|
854
854
|
),
|
|
855
|
-
k((
|
|
855
|
+
k((c) => c.changed)
|
|
856
856
|
)
|
|
857
857
|
);
|
|
858
858
|
Y(
|
|
859
859
|
x(
|
|
860
860
|
l,
|
|
861
861
|
Lt(
|
|
862
|
-
(
|
|
862
|
+
(c, p) => ({ diff: c.prev - p, prev: p }),
|
|
863
863
|
{ diff: 0, prev: 0 }
|
|
864
864
|
),
|
|
865
|
-
k((
|
|
865
|
+
k((c) => c.diff)
|
|
866
866
|
),
|
|
867
|
-
(
|
|
867
|
+
(c) => {
|
|
868
868
|
const { groupIndices: p } = rt(f);
|
|
869
|
-
if (
|
|
870
|
-
D(e, !0), D(s,
|
|
871
|
-
else if (
|
|
869
|
+
if (c > 0)
|
|
870
|
+
D(e, !0), D(s, c + pn(c, p));
|
|
871
|
+
else if (c < 0) {
|
|
872
872
|
const v = rt(a);
|
|
873
|
-
v.length > 0 && (
|
|
873
|
+
v.length > 0 && (c -= pn(-c, v)), D(i, c);
|
|
874
874
|
}
|
|
875
875
|
}
|
|
876
|
-
), Y(x(l, $(t)), ([
|
|
877
|
-
|
|
876
|
+
), Y(x(l, $(t)), ([c, p]) => {
|
|
877
|
+
c < 0 && p(
|
|
878
878
|
"`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",
|
|
879
879
|
{ firstItemIndex: l },
|
|
880
880
|
Ct.ERROR
|
|
@@ -885,12 +885,12 @@ const Vo = {
|
|
|
885
885
|
x(
|
|
886
886
|
s,
|
|
887
887
|
$(f),
|
|
888
|
-
k(([
|
|
888
|
+
k(([c, p]) => {
|
|
889
889
|
const v = p.groupIndices.length > 0, O = [], B = p.lastSize;
|
|
890
890
|
if (v) {
|
|
891
891
|
const W = le(p.sizeTree, 0);
|
|
892
892
|
let _ = 0, j = 0;
|
|
893
|
-
for (; _ <
|
|
893
|
+
for (; _ < c; ) {
|
|
894
894
|
const M = p.groupIndices[j], et = p.groupIndices.length === j + 1 ? 1 / 0 : p.groupIndices[j + 1] - M - 1;
|
|
895
895
|
O.push({
|
|
896
896
|
endIndex: M,
|
|
@@ -903,24 +903,24 @@ const Vo = {
|
|
|
903
903
|
}), j++, _ += et + 1;
|
|
904
904
|
}
|
|
905
905
|
const L = Dt(p.sizeTree);
|
|
906
|
-
return _ !==
|
|
906
|
+
return _ !== c && L.shift(), L.reduce(
|
|
907
907
|
(M, { k: et, v: wt }) => {
|
|
908
908
|
let ft = M.ranges;
|
|
909
909
|
return M.prevSize !== 0 && (ft = [
|
|
910
910
|
...M.ranges,
|
|
911
911
|
{
|
|
912
|
-
endIndex: et +
|
|
912
|
+
endIndex: et + c - 1,
|
|
913
913
|
size: M.prevSize,
|
|
914
914
|
startIndex: M.prevIndex
|
|
915
915
|
}
|
|
916
916
|
]), {
|
|
917
|
-
prevIndex: et +
|
|
917
|
+
prevIndex: et + c,
|
|
918
918
|
prevSize: wt,
|
|
919
919
|
ranges: ft
|
|
920
920
|
};
|
|
921
921
|
},
|
|
922
922
|
{
|
|
923
|
-
prevIndex:
|
|
923
|
+
prevIndex: c,
|
|
924
924
|
prevSize: 0,
|
|
925
925
|
ranges: O
|
|
926
926
|
}
|
|
@@ -928,9 +928,9 @@ const Vo = {
|
|
|
928
928
|
}
|
|
929
929
|
return Dt(p.sizeTree).reduce(
|
|
930
930
|
(W, { k: _, v: j }) => ({
|
|
931
|
-
prevIndex: _ +
|
|
931
|
+
prevIndex: _ + c,
|
|
932
932
|
prevSize: j,
|
|
933
|
-
ranges: [...W.ranges, { endIndex: _ +
|
|
933
|
+
ranges: [...W.ranges, { endIndex: _ + c - 1, size: W.prevSize, startIndex: W.prevIndex }]
|
|
934
934
|
}),
|
|
935
935
|
{
|
|
936
936
|
prevIndex: 0,
|
|
@@ -946,8 +946,8 @@ const Vo = {
|
|
|
946
946
|
x(
|
|
947
947
|
i,
|
|
948
948
|
$(f, R),
|
|
949
|
-
k(([
|
|
950
|
-
const O = -
|
|
949
|
+
k(([c, { offsetTree: p }, v]) => {
|
|
950
|
+
const O = -c;
|
|
951
951
|
return ue(O, p, v);
|
|
952
952
|
})
|
|
953
953
|
)
|
|
@@ -956,22 +956,22 @@ const Vo = {
|
|
|
956
956
|
x(
|
|
957
957
|
i,
|
|
958
958
|
$(f, R),
|
|
959
|
-
k(([
|
|
959
|
+
k(([c, p, v]) => {
|
|
960
960
|
if (p.groupIndices.length > 0) {
|
|
961
961
|
if (X(p.sizeTree))
|
|
962
962
|
return p;
|
|
963
963
|
let B = Zt();
|
|
964
964
|
const W = rt(a);
|
|
965
965
|
let _ = 0, j = 0, L = 0;
|
|
966
|
-
for (; _ < -
|
|
966
|
+
for (; _ < -c; ) {
|
|
967
967
|
L = W[j];
|
|
968
968
|
const M = W[j + 1] - L - 1;
|
|
969
969
|
j++, _ += M + 1;
|
|
970
970
|
}
|
|
971
|
-
if (B = Dt(p.sizeTree).reduce((M, { k: et, v: wt }) => yt(M, Math.max(0, et +
|
|
971
|
+
if (B = Dt(p.sizeTree).reduce((M, { k: et, v: wt }) => yt(M, Math.max(0, et + c), wt), B), _ !== -c) {
|
|
972
972
|
const M = le(p.sizeTree, L);
|
|
973
973
|
B = yt(B, 0, M);
|
|
974
|
-
const et = kt(p.sizeTree, -
|
|
974
|
+
const et = kt(p.sizeTree, -c + 1)[1];
|
|
975
975
|
B = yt(B, 1, et);
|
|
976
976
|
}
|
|
977
977
|
return {
|
|
@@ -980,7 +980,7 @@ const Vo = {
|
|
|
980
980
|
...Ge(p.offsetTree, 0, B, v)
|
|
981
981
|
};
|
|
982
982
|
} else {
|
|
983
|
-
const B = Dt(p.sizeTree).reduce((W, { k: _, v: j }) => yt(W, Math.max(0, _ +
|
|
983
|
+
const B = Dt(p.sizeTree).reduce((W, { k: _, v: j }) => yt(W, Math.max(0, _ + c), j), Zt());
|
|
984
984
|
return {
|
|
985
985
|
...p,
|
|
986
986
|
sizeTree: B,
|
|
@@ -999,7 +999,7 @@ const Vo = {
|
|
|
999
999
|
fixedItemSize: d,
|
|
1000
1000
|
fixedGroupSize: S,
|
|
1001
1001
|
gap: R,
|
|
1002
|
-
groupIndices:
|
|
1002
|
+
groupIndices: u,
|
|
1003
1003
|
heightEstimates: h,
|
|
1004
1004
|
itemSize: T,
|
|
1005
1005
|
listRefresh: b,
|
|
@@ -1032,22 +1032,22 @@ const Dn = K(
|
|
|
1032
1032
|
return F(
|
|
1033
1033
|
x(
|
|
1034
1034
|
l,
|
|
1035
|
-
k((
|
|
1035
|
+
k((u) => u.totalCount)
|
|
1036
1036
|
),
|
|
1037
1037
|
n
|
|
1038
1038
|
), F(
|
|
1039
1039
|
x(
|
|
1040
1040
|
l,
|
|
1041
|
-
k((
|
|
1041
|
+
k((u) => u.groupIndices)
|
|
1042
1042
|
),
|
|
1043
1043
|
t
|
|
1044
1044
|
), F(
|
|
1045
1045
|
x(
|
|
1046
1046
|
ut(r, e, o),
|
|
1047
|
-
P(([
|
|
1048
|
-
k(([
|
|
1047
|
+
P(([u, d]) => be(d)),
|
|
1048
|
+
k(([u, d, m]) => kt(d.groupOffsetTree, Math.max(u - m, 0), "v")[0]),
|
|
1049
1049
|
J(),
|
|
1050
|
-
k((
|
|
1050
|
+
k((u) => [u])
|
|
1051
1051
|
),
|
|
1052
1052
|
i
|
|
1053
1053
|
), { groupCounts: s, topItemsIndexes: i };
|
|
@@ -1081,7 +1081,7 @@ const me = K(
|
|
|
1081
1081
|
fixedHeaderHeight: s,
|
|
1082
1082
|
footerHeight: i,
|
|
1083
1083
|
headerHeight: l,
|
|
1084
|
-
scrollingInProgress:
|
|
1084
|
+
scrollingInProgress: u,
|
|
1085
1085
|
scrollTo: d,
|
|
1086
1086
|
smoothScrollTargetReached: m,
|
|
1087
1087
|
viewportHeight: S
|
|
@@ -1091,7 +1091,7 @@ const me = K(
|
|
|
1091
1091
|
const T = U(), w = U(), R = C(0);
|
|
1092
1092
|
let g = null, f = null, a = null;
|
|
1093
1093
|
function I() {
|
|
1094
|
-
g && (g(), g = null), a && (a(), a = null), f && (clearTimeout(f), f = null), D(
|
|
1094
|
+
g && (g(), g = null), a && (a(), a = null), f && (clearTimeout(f), f = null), D(u, !1);
|
|
1095
1095
|
}
|
|
1096
1096
|
return F(
|
|
1097
1097
|
x(
|
|
@@ -1100,12 +1100,12 @@ const me = K(
|
|
|
1100
1100
|
$(t, s, r),
|
|
1101
1101
|
k(
|
|
1102
1102
|
([
|
|
1103
|
-
[b, y, z,
|
|
1103
|
+
[b, y, z, c, p, v, O, B],
|
|
1104
1104
|
W,
|
|
1105
1105
|
_,
|
|
1106
1106
|
j
|
|
1107
1107
|
]) => {
|
|
1108
|
-
const L = $n(b), { align: xt, behavior: M, offset: et } = L, wt =
|
|
1108
|
+
const L = $n(b), { align: xt, behavior: M, offset: et } = L, wt = c - 1, ft = Nn(L, y, wt);
|
|
1109
1109
|
let St = ue(ft, y.offsetTree, W) + v;
|
|
1110
1110
|
xt === "end" ? (St += _ + kt(y.sizeTree, ft)[1] - z + j, ft === wt && (St += O)) : xt === "center" ? St += (_ + kt(y.sizeTree, ft)[1] - z + j) / 2 : St -= p, et && (St += et);
|
|
1111
1111
|
const Mt = (pt) => {
|
|
@@ -1122,7 +1122,7 @@ const me = K(
|
|
|
1122
1122
|
g = Et(x(e, Mo(150)), Mt);
|
|
1123
1123
|
return f = setTimeout(() => {
|
|
1124
1124
|
I();
|
|
1125
|
-
}, 1200), D(
|
|
1125
|
+
}, 1200), D(u, !0), B("scrolling from index to", { behavior: M, index: ft, top: St }, Ct.DEBUG), { behavior: M, top: St };
|
|
1126
1126
|
}
|
|
1127
1127
|
)
|
|
1128
1128
|
),
|
|
@@ -1157,11 +1157,11 @@ function Ke(t, e) {
|
|
|
1157
1157
|
}
|
|
1158
1158
|
const pe = K(
|
|
1159
1159
|
([{ defaultItemSize: t, listRefresh: e, sizes: n }, { scrollTop: o }, { scrollTargetReached: r, scrollToIndex: s }, { didMount: i }]) => {
|
|
1160
|
-
const l = C(!0),
|
|
1160
|
+
const l = C(!0), u = C(0), d = C(!0);
|
|
1161
1161
|
return F(
|
|
1162
1162
|
x(
|
|
1163
1163
|
i,
|
|
1164
|
-
$(
|
|
1164
|
+
$(u),
|
|
1165
1165
|
P(([m, S]) => !!S),
|
|
1166
1166
|
Ft(!1)
|
|
1167
1167
|
),
|
|
@@ -1169,7 +1169,7 @@ const pe = K(
|
|
|
1169
1169
|
), F(
|
|
1170
1170
|
x(
|
|
1171
1171
|
i,
|
|
1172
|
-
$(
|
|
1172
|
+
$(u),
|
|
1173
1173
|
P(([m, S]) => !!S),
|
|
1174
1174
|
Ft(!1)
|
|
1175
1175
|
),
|
|
@@ -1179,7 +1179,7 @@ const pe = K(
|
|
|
1179
1179
|
ut(e, i),
|
|
1180
1180
|
$(l, n, t, d),
|
|
1181
1181
|
P(([[, m], S, { sizeTree: h }, T, w]) => m && (!X(h) || Ae(T)) && !S && !w),
|
|
1182
|
-
$(
|
|
1182
|
+
$(u)
|
|
1183
1183
|
),
|
|
1184
1184
|
([, m]) => {
|
|
1185
1185
|
Et(r, () => {
|
|
@@ -1192,7 +1192,7 @@ const pe = K(
|
|
|
1192
1192
|
}
|
|
1193
1193
|
), {
|
|
1194
1194
|
initialItemFinalLocationReached: d,
|
|
1195
|
-
initialTopMostItemIndex:
|
|
1195
|
+
initialTopMostItemIndex: u,
|
|
1196
1196
|
scrolledToInitialItem: l
|
|
1197
1197
|
};
|
|
1198
1198
|
},
|
|
@@ -1212,7 +1212,7 @@ const ae = "up", oe = "down", Ao = "none", Wo = {
|
|
|
1212
1212
|
viewportHeight: 0
|
|
1213
1213
|
}
|
|
1214
1214
|
}, _o = 0, he = K(([{ footerHeight: t, headerHeight: e, scrollBy: n, scrollContainerState: o, scrollTop: r, viewportHeight: s }]) => {
|
|
1215
|
-
const i = C(!1), l = C(!0),
|
|
1215
|
+
const i = C(!1), l = C(!0), u = U(), d = U(), m = C(4), S = C(_o), h = ht(
|
|
1216
1216
|
x(
|
|
1217
1217
|
Fe(x(V(r), Kt(1), Ft(!0)), x(V(r), Kt(1), Ft(!1), dn(100))),
|
|
1218
1218
|
J()
|
|
@@ -1233,7 +1233,7 @@ const ae = "up", oe = "down", Ao = "none", Wo = {
|
|
|
1233
1233
|
const w = bt(
|
|
1234
1234
|
x(
|
|
1235
1235
|
ut(o, V(s), V(e), V(t), V(m)),
|
|
1236
|
-
Lt((a, [{ scrollHeight: I, scrollTop: b }, y, z,
|
|
1236
|
+
Lt((a, [{ scrollHeight: I, scrollTop: b }, y, z, c, p]) => {
|
|
1237
1237
|
const v = b + y - I > -p, O = {
|
|
1238
1238
|
scrollHeight: I,
|
|
1239
1239
|
scrollTop: b,
|
|
@@ -1297,7 +1297,7 @@ const ae = "up", oe = "down", Ao = "none", Wo = {
|
|
|
1297
1297
|
k((a) => a.atBottom)
|
|
1298
1298
|
),
|
|
1299
1299
|
i
|
|
1300
|
-
), F(x(i, Gt(50)),
|
|
1300
|
+
), F(x(i, Gt(50)), u);
|
|
1301
1301
|
const g = C(oe);
|
|
1302
1302
|
F(
|
|
1303
1303
|
x(
|
|
@@ -1325,14 +1325,14 @@ const ae = "up", oe = "down", Ao = "none", Wo = {
|
|
|
1325
1325
|
r,
|
|
1326
1326
|
Gt(100),
|
|
1327
1327
|
$(h),
|
|
1328
|
-
P(([a, I]) =>
|
|
1328
|
+
P(([a, I]) => I),
|
|
1329
1329
|
Lt(([a, I], [b]) => [I, b], [0, 0]),
|
|
1330
1330
|
k(([a, I]) => I - a)
|
|
1331
1331
|
),
|
|
1332
1332
|
f
|
|
1333
1333
|
), {
|
|
1334
1334
|
atBottomState: w,
|
|
1335
|
-
atBottomStateChange:
|
|
1335
|
+
atBottomStateChange: u,
|
|
1336
1336
|
atBottomThreshold: m,
|
|
1337
1337
|
atTopStateChange: d,
|
|
1338
1338
|
atTopThreshold: S,
|
|
@@ -1353,14 +1353,14 @@ function In(t, e) {
|
|
|
1353
1353
|
}
|
|
1354
1354
|
const je = K(
|
|
1355
1355
|
([{ deviation: t, fixedHeaderHeight: e, headerHeight: n, scrollTop: o, viewportHeight: r }]) => {
|
|
1356
|
-
const s = U(), i = C(0), l = C(0),
|
|
1356
|
+
const s = U(), i = C(0), l = C(0), u = C(0), d = ht(
|
|
1357
1357
|
x(
|
|
1358
1358
|
ut(
|
|
1359
1359
|
V(o),
|
|
1360
1360
|
V(r),
|
|
1361
1361
|
V(n),
|
|
1362
1362
|
V(s, ce),
|
|
1363
|
-
V(
|
|
1363
|
+
V(u),
|
|
1364
1364
|
V(i),
|
|
1365
1365
|
V(e),
|
|
1366
1366
|
V(t),
|
|
@@ -1379,11 +1379,11 @@ const je = K(
|
|
|
1379
1379
|
I
|
|
1380
1380
|
]) => {
|
|
1381
1381
|
const b = m - a, y = g + f, z = Math.max(h - b, 0);
|
|
1382
|
-
let
|
|
1382
|
+
let c = hn;
|
|
1383
1383
|
const p = In(I, de), v = In(I, fe);
|
|
1384
|
-
return T -= a, T += h + f, w += h + f, w -= a, T > m + y - p && (
|
|
1385
|
-
Math.max(b - h - gn(R, de,
|
|
1386
|
-
b - z - f + S + gn(R, fe,
|
|
1384
|
+
return T -= a, T += h + f, w += h + f, w -= a, T > m + y - p && (c = ae), w < m - z + S + v && (c = oe), c !== hn ? [
|
|
1385
|
+
Math.max(b - h - gn(R, de, c) - p, 0),
|
|
1386
|
+
b - z - f + S + gn(R, fe, c) + v
|
|
1387
1387
|
] : null;
|
|
1388
1388
|
}
|
|
1389
1389
|
),
|
|
@@ -1396,7 +1396,7 @@ const je = K(
|
|
|
1396
1396
|
increaseViewportBy: l,
|
|
1397
1397
|
// input
|
|
1398
1398
|
listBoundary: s,
|
|
1399
|
-
overscan:
|
|
1399
|
+
overscan: u,
|
|
1400
1400
|
topListHeight: i,
|
|
1401
1401
|
// output
|
|
1402
1402
|
visibleRange: d
|
|
@@ -1427,14 +1427,14 @@ const Be = {
|
|
|
1427
1427
|
totalCount: 0
|
|
1428
1428
|
};
|
|
1429
1429
|
function Te(t, e, n, o, r, s) {
|
|
1430
|
-
const { lastIndex: i, lastOffset: l, lastSize:
|
|
1430
|
+
const { lastIndex: i, lastOffset: l, lastSize: u } = r;
|
|
1431
1431
|
let d = 0, m = 0;
|
|
1432
1432
|
if (t.length > 0) {
|
|
1433
1433
|
d = t[0].offset;
|
|
1434
1434
|
const R = t[t.length - 1];
|
|
1435
1435
|
m = R.offset + R.size;
|
|
1436
1436
|
}
|
|
1437
|
-
const S = n - i, h = l + S *
|
|
1437
|
+
const S = n - i, h = l + S * u + (S - 1) * o, T = d, w = h - m;
|
|
1438
1438
|
return {
|
|
1439
1439
|
bottom: m,
|
|
1440
1440
|
firstItemIndex: s,
|
|
@@ -1455,9 +1455,9 @@ function Kn(t, e, n, o, r, s) {
|
|
|
1455
1455
|
break;
|
|
1456
1456
|
i++;
|
|
1457
1457
|
}
|
|
1458
|
-
const l = t + i,
|
|
1459
|
-
data: s[S +
|
|
1460
|
-
index: S +
|
|
1458
|
+
const l = t + i, u = Ke(e, l), d = Array.from({ length: l }).map((m, S) => ({
|
|
1459
|
+
data: s[S + u],
|
|
1460
|
+
index: S + u,
|
|
1461
1461
|
offset: 0,
|
|
1462
1462
|
size: 0
|
|
1463
1463
|
}));
|
|
@@ -1469,16 +1469,16 @@ function xn(t, e, n) {
|
|
|
1469
1469
|
if (!be(e))
|
|
1470
1470
|
return t.map((d) => ({ ...d, index: d.index + n, originalIndex: d.index }));
|
|
1471
1471
|
const o = t[0].index, r = t[t.length - 1].index, s = [], i = Xt(e.groupOffsetTree, o, r);
|
|
1472
|
-
let l,
|
|
1472
|
+
let l, u = 0;
|
|
1473
1473
|
for (const d of t) {
|
|
1474
|
-
(!l || l.end < d.index) && (l = i.shift(),
|
|
1474
|
+
(!l || l.end < d.index) && (l = i.shift(), u = e.groupIndices.indexOf(l.start));
|
|
1475
1475
|
let m;
|
|
1476
1476
|
d.index === l.start ? m = {
|
|
1477
|
-
index:
|
|
1477
|
+
index: u,
|
|
1478
1478
|
type: "group"
|
|
1479
1479
|
} : m = {
|
|
1480
|
-
groupIndex:
|
|
1481
|
-
index: d.index - (
|
|
1480
|
+
groupIndex: u,
|
|
1481
|
+
index: d.index - (u + 1) + n
|
|
1482
1482
|
}, s.push({
|
|
1483
1483
|
...m,
|
|
1484
1484
|
data: d.data,
|
|
@@ -1497,7 +1497,7 @@ const jt = K(
|
|
|
1497
1497
|
([
|
|
1498
1498
|
{ data: t, firstItemIndex: e, gap: n, sizes: o, totalCount: r },
|
|
1499
1499
|
s,
|
|
1500
|
-
{ listBoundary: i, topListHeight: l, visibleRange:
|
|
1500
|
+
{ listBoundary: i, topListHeight: l, visibleRange: u },
|
|
1501
1501
|
{ initialTopMostItemIndex: d, scrolledToInitialItem: m },
|
|
1502
1502
|
{ topListHeight: S },
|
|
1503
1503
|
h,
|
|
@@ -1511,7 +1511,7 @@ const jt = K(
|
|
|
1511
1511
|
ut(
|
|
1512
1512
|
T,
|
|
1513
1513
|
w,
|
|
1514
|
-
V(
|
|
1514
|
+
V(u, ce),
|
|
1515
1515
|
V(r),
|
|
1516
1516
|
V(o),
|
|
1517
1517
|
V(d),
|
|
@@ -1522,15 +1522,15 @@ const jt = K(
|
|
|
1522
1522
|
V(a),
|
|
1523
1523
|
t
|
|
1524
1524
|
),
|
|
1525
|
-
P(([
|
|
1525
|
+
P(([c, p, , v, , , , , , , , O]) => {
|
|
1526
1526
|
const B = O && O.length !== v;
|
|
1527
|
-
return
|
|
1527
|
+
return c && !p && !B;
|
|
1528
1528
|
}),
|
|
1529
1529
|
k(
|
|
1530
1530
|
([
|
|
1531
1531
|
,
|
|
1532
1532
|
,
|
|
1533
|
-
[
|
|
1533
|
+
[c, p],
|
|
1534
1534
|
v,
|
|
1535
1535
|
O,
|
|
1536
1536
|
B,
|
|
@@ -1545,7 +1545,7 @@ const jt = K(
|
|
|
1545
1545
|
const et = O, { offsetTree: wt, sizeTree: ft } = et, St = rt(g);
|
|
1546
1546
|
if (v === 0)
|
|
1547
1547
|
return { ...Be, totalCount: v };
|
|
1548
|
-
if (
|
|
1548
|
+
if (c === 0 && p === 0)
|
|
1549
1549
|
return St === 0 ? { ...Be, totalCount: v } : Kn(St, B, O, j, L, M || []);
|
|
1550
1550
|
if (X(ft))
|
|
1551
1551
|
return St > 0 ? null : Te(
|
|
@@ -1568,7 +1568,7 @@ const jt = K(
|
|
|
1568
1568
|
}
|
|
1569
1569
|
if (!W)
|
|
1570
1570
|
return Te([], Mt, v, L, et, j);
|
|
1571
|
-
const pt = _.length > 0 ? _[_.length - 1] + 1 : 0, qt = ko(wt,
|
|
1571
|
+
const pt = _.length > 0 ? _[_.length - 1] + 1 : 0, qt = ko(wt, c, p, pt);
|
|
1572
1572
|
if (qt.length === 0)
|
|
1573
1573
|
return null;
|
|
1574
1574
|
const ee = v - 1, Ot = ye([], (st) => {
|
|
@@ -1576,8 +1576,8 @@ const jt = K(
|
|
|
1576
1576
|
const mt = it.value;
|
|
1577
1577
|
let lt = mt.offset, Z = it.start;
|
|
1578
1578
|
const nt = mt.size;
|
|
1579
|
-
if (mt.offset <
|
|
1580
|
-
Z += Math.floor((
|
|
1579
|
+
if (mt.offset < c) {
|
|
1580
|
+
Z += Math.floor((c - mt.offset + L) / (nt + L));
|
|
1581
1581
|
const ct = Z - it.start;
|
|
1582
1582
|
lt += ct * nt + ct * L;
|
|
1583
1583
|
}
|
|
@@ -1611,7 +1611,7 @@ const jt = K(
|
|
|
1611
1611
|
}
|
|
1612
1612
|
),
|
|
1613
1613
|
//@ts-expect-error filter needs to be fixed
|
|
1614
|
-
P((
|
|
1614
|
+
P((c) => c !== null),
|
|
1615
1615
|
J()
|
|
1616
1616
|
),
|
|
1617
1617
|
Be
|
|
@@ -1620,59 +1620,59 @@ const jt = K(
|
|
|
1620
1620
|
x(
|
|
1621
1621
|
t,
|
|
1622
1622
|
P(Ae),
|
|
1623
|
-
k((
|
|
1623
|
+
k((c) => c == null ? void 0 : c.length)
|
|
1624
1624
|
),
|
|
1625
1625
|
r
|
|
1626
1626
|
), F(
|
|
1627
1627
|
x(
|
|
1628
1628
|
I,
|
|
1629
|
-
k((
|
|
1629
|
+
k((c) => c.topListHeight)
|
|
1630
1630
|
),
|
|
1631
1631
|
S
|
|
1632
1632
|
), F(S, l), F(
|
|
1633
1633
|
x(
|
|
1634
1634
|
I,
|
|
1635
|
-
k((
|
|
1635
|
+
k((c) => [c.top, c.bottom])
|
|
1636
1636
|
),
|
|
1637
1637
|
i
|
|
1638
1638
|
), F(
|
|
1639
1639
|
x(
|
|
1640
1640
|
I,
|
|
1641
|
-
k((
|
|
1641
|
+
k((c) => c.items)
|
|
1642
1642
|
),
|
|
1643
1643
|
f
|
|
1644
1644
|
);
|
|
1645
1645
|
const b = bt(
|
|
1646
1646
|
x(
|
|
1647
1647
|
I,
|
|
1648
|
-
P(({ items:
|
|
1648
|
+
P(({ items: c }) => c.length > 0),
|
|
1649
1649
|
$(r, t),
|
|
1650
|
-
P(([{ items:
|
|
1651
|
-
k(([,
|
|
1650
|
+
P(([{ items: c }, p]) => c[c.length - 1].originalIndex === p - 1),
|
|
1651
|
+
k(([, c, p]) => [c - 1, p]),
|
|
1652
1652
|
J(ce),
|
|
1653
|
-
k(([
|
|
1653
|
+
k(([c]) => c)
|
|
1654
1654
|
)
|
|
1655
1655
|
), y = bt(
|
|
1656
1656
|
x(
|
|
1657
1657
|
I,
|
|
1658
1658
|
Gt(200),
|
|
1659
|
-
P(({ items:
|
|
1660
|
-
k(({ items:
|
|
1659
|
+
P(({ items: c, topItems: p }) => c.length > 0 && c[0].originalIndex === p.length),
|
|
1660
|
+
k(({ items: c }) => c[0].index),
|
|
1661
1661
|
J()
|
|
1662
1662
|
)
|
|
1663
1663
|
), z = bt(
|
|
1664
1664
|
x(
|
|
1665
1665
|
I,
|
|
1666
|
-
P(({ items:
|
|
1667
|
-
k(({ items:
|
|
1668
|
-
let p = 0, v =
|
|
1669
|
-
for (;
|
|
1666
|
+
P(({ items: c }) => c.length > 0),
|
|
1667
|
+
k(({ items: c }) => {
|
|
1668
|
+
let p = 0, v = c.length - 1;
|
|
1669
|
+
for (; c[p].type === "group" && p < v; )
|
|
1670
1670
|
p++;
|
|
1671
|
-
for (;
|
|
1671
|
+
for (; c[v].type === "group" && v > p; )
|
|
1672
1672
|
v--;
|
|
1673
1673
|
return {
|
|
1674
|
-
endIndex:
|
|
1675
|
-
startIndex:
|
|
1674
|
+
endIndex: c[v].index,
|
|
1675
|
+
startIndex: c[p].index
|
|
1676
1676
|
};
|
|
1677
1677
|
}),
|
|
1678
1678
|
J(An)
|
|
@@ -1706,7 +1706,7 @@ const jt = K(
|
|
|
1706
1706
|
const s = U(), i = ht(
|
|
1707
1707
|
x(
|
|
1708
1708
|
ut(n, t, o, e, r),
|
|
1709
|
-
k(([l,
|
|
1709
|
+
k(([l, u, d, m, S]) => l + u + d + m + S.offsetBottom + S.bottom)
|
|
1710
1710
|
),
|
|
1711
1711
|
0
|
|
1712
1712
|
);
|
|
@@ -1741,24 +1741,24 @@ const jt = K(
|
|
|
1741
1741
|
}) => e < i ? { ...r, align: n != null ? n : "start", behavior: o } : t > s ? { ...r, align: n != null ? n : "end", behavior: o } : null, Yn = K(
|
|
1742
1742
|
([
|
|
1743
1743
|
{ gap: t, sizes: e, totalCount: n },
|
|
1744
|
-
{ fixedFooterHeight: o, fixedHeaderHeight: r, headerHeight: s, scrollingInProgress: i, scrollTop: l, viewportHeight:
|
|
1744
|
+
{ fixedFooterHeight: o, fixedHeaderHeight: r, headerHeight: s, scrollingInProgress: i, scrollTop: l, viewportHeight: u },
|
|
1745
1745
|
{ scrollToIndex: d }
|
|
1746
1746
|
]) => {
|
|
1747
1747
|
const m = U();
|
|
1748
1748
|
return F(
|
|
1749
1749
|
x(
|
|
1750
1750
|
m,
|
|
1751
|
-
$(e,
|
|
1751
|
+
$(e, u, n, s, r, o, l),
|
|
1752
1752
|
$(t),
|
|
1753
1753
|
k(([[S, h, T, w, R, g, f, a], I]) => {
|
|
1754
|
-
const { align: b, behavior: y, calculateViewLocation: z = $o, done:
|
|
1754
|
+
const { align: b, behavior: y, calculateViewLocation: z = $o, done: c, ...p } = S, v = Nn(S, h, w - 1), O = ue(v, h.offsetTree, I) + R + g, B = O + kt(h.sizeTree, v)[1], W = a + g, _ = a + T - f, j = z({
|
|
1755
1755
|
itemBottom: B,
|
|
1756
1756
|
itemTop: O,
|
|
1757
1757
|
locationParams: { align: b, behavior: y, ...p },
|
|
1758
1758
|
viewportBottom: _,
|
|
1759
1759
|
viewportTop: W
|
|
1760
1760
|
});
|
|
1761
|
-
return j ?
|
|
1761
|
+
return j ? c && Et(
|
|
1762
1762
|
x(
|
|
1763
1763
|
i,
|
|
1764
1764
|
P((L) => !L),
|
|
@@ -1766,8 +1766,8 @@ const jt = K(
|
|
|
1766
1766
|
// but if scrollingInProgress is true, we skip the initial publish.
|
|
1767
1767
|
Kt(rt(i) ? 1 : 2)
|
|
1768
1768
|
),
|
|
1769
|
-
|
|
1770
|
-
) :
|
|
1769
|
+
c
|
|
1770
|
+
) : c == null || c(), j;
|
|
1771
1771
|
}),
|
|
1772
1772
|
P((S) => S !== null)
|
|
1773
1773
|
),
|
|
@@ -1788,7 +1788,7 @@ const Uo = (t, e) => typeof t == "function" ? Tn(t(e)) : e && Tn(t), Ko = K(
|
|
|
1788
1788
|
{ atBottomState: r, isAtBottom: s },
|
|
1789
1789
|
{ scrollToIndex: i },
|
|
1790
1790
|
{ scrolledToInitialItem: l },
|
|
1791
|
-
{ didMount:
|
|
1791
|
+
{ didMount: u, propsReady: d },
|
|
1792
1792
|
{ log: m },
|
|
1793
1793
|
{ scrollingInProgress: S },
|
|
1794
1794
|
{ context: h },
|
|
@@ -1805,11 +1805,11 @@ const Uo = (t, e) => typeof t == "function" ? Tn(t(e)) : e && Tn(t), Ko = K(
|
|
|
1805
1805
|
}
|
|
1806
1806
|
Y(
|
|
1807
1807
|
x(
|
|
1808
|
-
ut(x(V(e), Kt(1)),
|
|
1808
|
+
ut(x(V(e), Kt(1)), u),
|
|
1809
1809
|
$(V(w), s, l, S),
|
|
1810
|
-
k(([[y, z],
|
|
1810
|
+
k(([[y, z], c, p, v, O]) => {
|
|
1811
1811
|
let B = z && v, W = "auto";
|
|
1812
|
-
return B && (W = Uo(
|
|
1812
|
+
return B && (W = Uo(c, p || O), B = B && !!W), { followOutputBehavior: W, shouldFollow: B, totalCount: y };
|
|
1813
1813
|
}),
|
|
1814
1814
|
P(({ shouldFollow: y }) => y)
|
|
1815
1815
|
),
|
|
@@ -1822,8 +1822,8 @@ const Uo = (t, e) => typeof t == "function" ? Tn(t(e)) : e && Tn(t), Ko = K(
|
|
|
1822
1822
|
}
|
|
1823
1823
|
);
|
|
1824
1824
|
function a(y) {
|
|
1825
|
-
const z = Et(r, (
|
|
1826
|
-
y && !
|
|
1825
|
+
const z = Et(r, (c) => {
|
|
1826
|
+
y && !c.atBottom && c.notAtBottomBecause === "SIZE_INCREASED" && !g && (rt(m)("scrolling to bottom due to increased size", {}, Ct.DEBUG), f("auto"));
|
|
1827
1827
|
});
|
|
1828
1828
|
setTimeout(z, 100);
|
|
1829
1829
|
}
|
|
@@ -1861,9 +1861,9 @@ const Uo = (t, e) => typeof t == "function" ? Tn(t(e)) : e && Tn(t), Ko = K(
|
|
|
1861
1861
|
b
|
|
1862
1862
|
), Y(
|
|
1863
1863
|
x(
|
|
1864
|
-
ut(x(b, Kt(1)),
|
|
1864
|
+
ut(x(b, Kt(1)), u),
|
|
1865
1865
|
$(V(I), l, S, h),
|
|
1866
|
-
k(([[y, z],
|
|
1866
|
+
k(([[y, z], c, p, v, O]) => z && p && (c == null ? void 0 : c({ context: O, totalCount: y, scrollingInProgress: v }))),
|
|
1867
1867
|
P((y) => !!y),
|
|
1868
1868
|
Gt(0)
|
|
1869
1869
|
),
|
|
@@ -1892,9 +1892,9 @@ const Uo = (t, e) => typeof t == "function" ? Tn(t(e)) : e && Tn(t), Ko = K(
|
|
|
1892
1892
|
x(
|
|
1893
1893
|
l,
|
|
1894
1894
|
$(s),
|
|
1895
|
-
P(([,
|
|
1895
|
+
P(([, u]) => u !== 0),
|
|
1896
1896
|
$(r, o, e, n, t),
|
|
1897
|
-
k(([[,
|
|
1897
|
+
k(([[, u], d, m, S, h, T = []]) => Kn(u, d, m, S, h, T))
|
|
1898
1898
|
),
|
|
1899
1899
|
i
|
|
1900
1900
|
), {}),
|
|
@@ -1939,11 +1939,11 @@ const Uo = (t, e) => typeof t == "function" ? Tn(t(e)) : e && Tn(t), Ko = K(
|
|
|
1939
1939
|
$(o, e, n),
|
|
1940
1940
|
P(([r, s]) => !!s),
|
|
1941
1941
|
k(([r, s, i, l]) => {
|
|
1942
|
-
const { enter:
|
|
1942
|
+
const { enter: u, exit: d } = s;
|
|
1943
1943
|
if (i) {
|
|
1944
1944
|
if (d(r, l))
|
|
1945
1945
|
return !1;
|
|
1946
|
-
} else if (
|
|
1946
|
+
} else if (u(r, l))
|
|
1947
1947
|
return !0;
|
|
1948
1948
|
return i;
|
|
1949
1949
|
}),
|
|
@@ -1964,9 +1964,9 @@ const Uo = (t, e) => typeof t == "function" ? Tn(t(e)) : e && Tn(t), Ko = K(
|
|
|
1964
1964
|
return F(
|
|
1965
1965
|
x(
|
|
1966
1966
|
ut(n, o),
|
|
1967
|
-
k(([{ scrollHeight: l, scrollTop:
|
|
1967
|
+
k(([{ scrollHeight: l, scrollTop: u, viewportHeight: d }, { offsetTop: m }]) => ({
|
|
1968
1968
|
scrollHeight: l,
|
|
1969
|
-
scrollTop: Math.max(0,
|
|
1969
|
+
scrollTop: Math.max(0, u - m),
|
|
1970
1970
|
viewportHeight: d
|
|
1971
1971
|
}))
|
|
1972
1972
|
),
|
|
@@ -1975,9 +1975,9 @@ const Uo = (t, e) => typeof t == "function" ? Tn(t(e)) : e && Tn(t), Ko = K(
|
|
|
1975
1975
|
x(
|
|
1976
1976
|
e,
|
|
1977
1977
|
$(o),
|
|
1978
|
-
k(([l, { offsetTop:
|
|
1978
|
+
k(([l, { offsetTop: u }]) => ({
|
|
1979
1979
|
...l,
|
|
1980
|
-
top: l.top +
|
|
1980
|
+
top: l.top + u
|
|
1981
1981
|
}))
|
|
1982
1982
|
),
|
|
1983
1983
|
r
|
|
@@ -1997,10 +1997,10 @@ const Uo = (t, e) => typeof t == "function" ? Tn(t(e)) : e && Tn(t), Ko = K(
|
|
|
1997
1997
|
{ headerHeight: n, scrollTop: o },
|
|
1998
1998
|
{ initialTopMostItemIndex: r },
|
|
1999
1999
|
{ didMount: s },
|
|
2000
|
-
{ useWindowScroll: i, windowScrollContainerState: l, windowViewportRect:
|
|
2000
|
+
{ useWindowScroll: i, windowScrollContainerState: l, windowViewportRect: u }
|
|
2001
2001
|
]) => {
|
|
2002
2002
|
const d = U(), m = C(void 0), S = C(null), h = C(null);
|
|
2003
|
-
return F(l, S), F(
|
|
2003
|
+
return F(l, S), F(u, h), Y(
|
|
2004
2004
|
x(
|
|
2005
2005
|
d,
|
|
2006
2006
|
$(e, o, i, S, h, n)
|
|
@@ -2041,26 +2041,26 @@ const Xo = K(([{ topItemsIndexes: t }]) => {
|
|
|
2041
2041
|
}, tt(jt));
|
|
2042
2042
|
function Xn(t) {
|
|
2043
2043
|
let e = !1, n;
|
|
2044
|
-
return () => (e || (e = !0, n = t()), n);
|
|
2044
|
+
return (() => (e || (e = !0, n = t()), n));
|
|
2045
2045
|
}
|
|
2046
2046
|
const Jo = Xn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), Qo = K(
|
|
2047
2047
|
([
|
|
2048
2048
|
{ deviation: t, scrollBy: e, scrollingInProgress: n, scrollTop: o },
|
|
2049
2049
|
{ isAtBottom: r, isScrolling: s, lastJumpDueToItemResize: i, scrollDirection: l },
|
|
2050
|
-
{ listState:
|
|
2050
|
+
{ listState: u },
|
|
2051
2051
|
{ beforeUnshiftWith: d, gap: m, shiftWithOffset: S, sizes: h },
|
|
2052
2052
|
{ log: T },
|
|
2053
2053
|
{ recalcInProgress: w }
|
|
2054
2054
|
]) => {
|
|
2055
2055
|
const R = bt(
|
|
2056
2056
|
x(
|
|
2057
|
-
|
|
2057
|
+
u,
|
|
2058
2058
|
$(i),
|
|
2059
2059
|
Lt(
|
|
2060
|
-
([, f, a, I], [{ bottom: b, items: y, offsetBottom: z, totalCount:
|
|
2060
|
+
([, f, a, I], [{ bottom: b, items: y, offsetBottom: z, totalCount: c }, p]) => {
|
|
2061
2061
|
const v = b + z;
|
|
2062
2062
|
let O = 0;
|
|
2063
|
-
return a ===
|
|
2063
|
+
return a === c && f.length > 0 && y.length > 0 && (y[0].originalIndex === 0 && f[0].originalIndex === 0 || (O = v - I, O !== 0 && (O += p))), [O, y, c, v];
|
|
2064
2064
|
},
|
|
2065
2065
|
[0, [], 0, 0]
|
|
2066
2066
|
),
|
|
@@ -2094,21 +2094,21 @@ const Jo = Xn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2094
2094
|
d,
|
|
2095
2095
|
$(h, m),
|
|
2096
2096
|
k(([f, { groupIndices: a, lastSize: I, sizeTree: b }, y]) => {
|
|
2097
|
-
function z(
|
|
2098
|
-
return
|
|
2097
|
+
function z(c) {
|
|
2098
|
+
return c * (I + y);
|
|
2099
2099
|
}
|
|
2100
2100
|
if (a.length === 0)
|
|
2101
2101
|
return z(f);
|
|
2102
2102
|
{
|
|
2103
|
-
let
|
|
2103
|
+
let c = 0;
|
|
2104
2104
|
const p = le(b, 0);
|
|
2105
2105
|
let v = 0, O = 0;
|
|
2106
2106
|
for (; v < f; ) {
|
|
2107
|
-
v++,
|
|
2107
|
+
v++, c += p;
|
|
2108
2108
|
let B = a.length === O + 1 ? 1 / 0 : a[O + 1] - a[O] - 1;
|
|
2109
|
-
v + B > f && (
|
|
2109
|
+
v + B > f && (c -= p, B = f - v + 1), v += B, c += z(B), O++;
|
|
2110
2110
|
}
|
|
2111
|
-
return
|
|
2111
|
+
return c;
|
|
2112
2112
|
}
|
|
2113
2113
|
})
|
|
2114
2114
|
),
|
|
@@ -2132,7 +2132,7 @@ const Jo = Xn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2132
2132
|
s,
|
|
2133
2133
|
i,
|
|
2134
2134
|
l,
|
|
2135
|
-
|
|
2135
|
+
u,
|
|
2136
2136
|
d,
|
|
2137
2137
|
m
|
|
2138
2138
|
]) => ({
|
|
@@ -2144,7 +2144,7 @@ const Jo = Xn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2144
2144
|
...s,
|
|
2145
2145
|
...i,
|
|
2146
2146
|
...l,
|
|
2147
|
-
...
|
|
2147
|
+
...u,
|
|
2148
2148
|
...d,
|
|
2149
2149
|
...m
|
|
2150
2150
|
}),
|
|
@@ -2172,7 +2172,7 @@ const Jo = Xn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2172
2172
|
gap: s,
|
|
2173
2173
|
groupIndices: i,
|
|
2174
2174
|
heightEstimates: l,
|
|
2175
|
-
itemSize:
|
|
2175
|
+
itemSize: u,
|
|
2176
2176
|
sizeRanges: d,
|
|
2177
2177
|
sizes: m,
|
|
2178
2178
|
statefulTotalCount: S,
|
|
@@ -2186,7 +2186,7 @@ const Jo = Xn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2186
2186
|
b,
|
|
2187
2187
|
{ scrollToIndex: y },
|
|
2188
2188
|
z,
|
|
2189
|
-
{ topItemCount:
|
|
2189
|
+
{ topItemCount: c },
|
|
2190
2190
|
{ groupCounts: p },
|
|
2191
2191
|
v
|
|
2192
2192
|
]) => {
|
|
@@ -2210,13 +2210,13 @@ const Jo = Xn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2210
2210
|
initialTopMostItemIndex: R,
|
|
2211
2211
|
scrolledToInitialItem: g,
|
|
2212
2212
|
sizeRanges: d,
|
|
2213
|
-
topItemCount:
|
|
2213
|
+
topItemCount: c,
|
|
2214
2214
|
topItemsIndexes: W,
|
|
2215
2215
|
// input
|
|
2216
2216
|
totalCount: h,
|
|
2217
2217
|
...I,
|
|
2218
2218
|
groupIndices: i,
|
|
2219
|
-
itemSize:
|
|
2219
|
+
itemSize: u,
|
|
2220
2220
|
listState: O,
|
|
2221
2221
|
minOverscanItemCount: B,
|
|
2222
2222
|
scrollToIndex: y,
|
|
@@ -2260,7 +2260,7 @@ function er(t, e) {
|
|
|
2260
2260
|
const Ie = typeof document < "u" ? E.useLayoutEffect : E.useEffect;
|
|
2261
2261
|
function Ye(t, e, n) {
|
|
2262
2262
|
const o = Object.keys(e.required || {}), r = Object.keys(e.optional || {}), s = Object.keys(e.methods || {}), i = Object.keys(e.events || {}), l = E.createContext({});
|
|
2263
|
-
function
|
|
2263
|
+
function u(f, a) {
|
|
2264
2264
|
f.propsReady && D(f.propsReady, !1);
|
|
2265
2265
|
for (const I of o) {
|
|
2266
2266
|
const b = f[e.required[I]];
|
|
@@ -2284,7 +2284,7 @@ function Ye(t, e, n) {
|
|
|
2284
2284
|
}
|
|
2285
2285
|
const S = E.forwardRef((f, a) => {
|
|
2286
2286
|
const { children: I, ...b } = f, [y] = E.useState(() => ye(To(t), (p) => {
|
|
2287
|
-
|
|
2287
|
+
u(p, b);
|
|
2288
2288
|
})), [z] = E.useState(an(m, y));
|
|
2289
2289
|
Ie(() => {
|
|
2290
2290
|
for (const p of i)
|
|
@@ -2293,10 +2293,10 @@ function Ye(t, e, n) {
|
|
|
2293
2293
|
Object.values(z).map(We);
|
|
2294
2294
|
};
|
|
2295
2295
|
}, [b, z, y]), Ie(() => {
|
|
2296
|
-
|
|
2296
|
+
u(y, b);
|
|
2297
2297
|
}), E.useImperativeHandle(a, un(d(y)));
|
|
2298
|
-
const
|
|
2299
|
-
return /* @__PURE__ */ G(l.Provider, { value: y, children: n ? /* @__PURE__ */ G(
|
|
2298
|
+
const c = n;
|
|
2299
|
+
return /* @__PURE__ */ G(l.Provider, { value: y, children: n ? /* @__PURE__ */ G(c, { ...er([...o, ...r, ...i], b), children: I }) : I });
|
|
2300
2300
|
}), h = (f) => {
|
|
2301
2301
|
const a = E.useContext(l);
|
|
2302
2302
|
return E.useCallback(
|
|
@@ -2342,7 +2342,7 @@ function nr(t) {
|
|
|
2342
2342
|
return "body" in t;
|
|
2343
2343
|
}
|
|
2344
2344
|
function eo(t, e, n, o = Qt, r, s) {
|
|
2345
|
-
const i = E.useRef(null), l = E.useRef(null),
|
|
2345
|
+
const i = E.useRef(null), l = E.useRef(null), u = E.useRef(null), d = E.useCallback(
|
|
2346
2346
|
(h) => {
|
|
2347
2347
|
let T, w, R;
|
|
2348
2348
|
const g = h.target;
|
|
@@ -2358,7 +2358,7 @@ function eo(t, e, n, o = Qt, r, s) {
|
|
|
2358
2358
|
viewportHeight: w
|
|
2359
2359
|
});
|
|
2360
2360
|
};
|
|
2361
|
-
h.suppressFlushSync ? f() : fo.flushSync(f), l.current !== null && (R === l.current || R <= 0 || R === T - w) && (l.current = null, e(!0),
|
|
2361
|
+
h.suppressFlushSync ? f() : fo.flushSync(f), l.current !== null && (R === l.current || R <= 0 || R === T - w) && (l.current = null, e(!0), u.current && (clearTimeout(u.current), u.current = null));
|
|
2362
2362
|
},
|
|
2363
2363
|
[t, e, s]
|
|
2364
2364
|
);
|
|
@@ -2383,8 +2383,8 @@ function eo(t, e, n, o = Qt, r, s) {
|
|
|
2383
2383
|
t({ scrollHeight: g, scrollTop: f, viewportHeight: R }), w && e(!0);
|
|
2384
2384
|
return;
|
|
2385
2385
|
}
|
|
2386
|
-
w ? (l.current = h.top,
|
|
2387
|
-
|
|
2386
|
+
w ? (l.current = h.top, u.current && clearTimeout(u.current), u.current = setTimeout(() => {
|
|
2387
|
+
u.current = null, l.current = null, e(!0);
|
|
2388
2388
|
}, 1e3)) : l.current = null, s && (h = { behavior: h.behavior, left: h.top }), T.scrollTo(h);
|
|
2389
2389
|
}
|
|
2390
2390
|
function S(h) {
|
|
@@ -2402,13 +2402,13 @@ function Xe(t) {
|
|
|
2402
2402
|
return t;
|
|
2403
2403
|
}
|
|
2404
2404
|
const or = /* @__PURE__ */ K(() => {
|
|
2405
|
-
const t = C((l) => `Item ${l}`), e = C((l) => `Group ${l}`), n = C({}), o = C(Xe), r = C("div"), s = C(Qt), i = (l,
|
|
2405
|
+
const t = C((l) => `Item ${l}`), e = C((l) => `Group ${l}`), n = C({}), o = C(Xe), r = C("div"), s = C(Qt), i = (l, u = null) => ht(
|
|
2406
2406
|
x(
|
|
2407
2407
|
n,
|
|
2408
2408
|
k((d) => d[l]),
|
|
2409
2409
|
J()
|
|
2410
2410
|
),
|
|
2411
|
-
|
|
2411
|
+
u
|
|
2412
2412
|
);
|
|
2413
2413
|
return {
|
|
2414
2414
|
components: n,
|
|
@@ -2431,11 +2431,11 @@ const or = /* @__PURE__ */ K(() => {
|
|
|
2431
2431
|
([t, e]) => ({ ...t, ...e }),
|
|
2432
2432
|
tt(Jn, or)
|
|
2433
2433
|
), sr = ({ height: t }) => /* @__PURE__ */ G("div", { style: { height: t } }), ir = { overflowAnchor: "none", position: Ze(), zIndex: 1 }, no = { overflowAnchor: "none" }, lr = { ...no, display: "inline-block", height: "100%" }, wn = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
|
|
2434
|
-
const n = A("listState"), o = Rt("sizeRanges"), r = A("useWindowScroll"), s = A("customScrollParent"), i = Rt("windowScrollContainerState"), l = Rt("scrollContainerState"),
|
|
2434
|
+
const n = A("listState"), o = Rt("sizeRanges"), r = A("useWindowScroll"), s = A("customScrollParent"), i = Rt("windowScrollContainerState"), l = Rt("scrollContainerState"), u = s || r ? i : l, d = A("itemContent"), m = A("context"), S = A("groupContent"), h = A("trackItemSizes"), T = A("itemSize"), w = A("log"), R = Rt("gap"), g = A("horizontalDirection"), { callbackRef: f } = Fn(
|
|
2435
2435
|
o,
|
|
2436
2436
|
T,
|
|
2437
2437
|
h,
|
|
2438
|
-
e ? Qt :
|
|
2438
|
+
e ? Qt : u,
|
|
2439
2439
|
w,
|
|
2440
2440
|
R,
|
|
2441
2441
|
s,
|
|
@@ -2445,7 +2445,7 @@ const or = /* @__PURE__ */ K(() => {
|
|
|
2445
2445
|
tn("deviation", (L) => {
|
|
2446
2446
|
a !== L && I(L);
|
|
2447
2447
|
});
|
|
2448
|
-
const b = A("EmptyPlaceholder"), y = A("ScrollSeekPlaceholder") || sr, z = A("ListComponent"),
|
|
2448
|
+
const b = A("EmptyPlaceholder"), y = A("ScrollSeekPlaceholder") || sr, z = A("ListComponent"), c = A("ItemComponent"), p = A("GroupComponent"), v = A("computeItemKey"), O = A("isSeeking"), B = A("groupIndices").length > 0, W = A("alignToBottom"), _ = A("initialItemFinalLocationReached"), j = e ? {} : {
|
|
2449
2449
|
boxSizing: "border-box",
|
|
2450
2450
|
...g ? {
|
|
2451
2451
|
display: "inline-block",
|
|
@@ -2492,10 +2492,10 @@ const or = /* @__PURE__ */ K(() => {
|
|
|
2492
2492
|
},
|
|
2493
2493
|
S(L.index, m)
|
|
2494
2494
|
) : /* @__PURE__ */ $t(
|
|
2495
|
-
|
|
2495
|
+
c,
|
|
2496
2496
|
{
|
|
2497
|
-
...Q(
|
|
2498
|
-
...oo(
|
|
2497
|
+
...Q(c, m),
|
|
2498
|
+
...oo(c, L.data),
|
|
2499
2499
|
"data-index": xt,
|
|
2500
2500
|
"data-item-group-index": L.groupIndex,
|
|
2501
2501
|
"data-item-index": L.index,
|
|
@@ -2563,7 +2563,7 @@ const dr = /* @__PURE__ */ E.memo(function() {
|
|
|
2563
2563
|
return e ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...Q(e, s) }) }) : null;
|
|
2564
2564
|
});
|
|
2565
2565
|
function Je({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
2566
|
-
return E.memo(function({ children: s, style: i, context: l, ...
|
|
2566
|
+
return E.memo(function({ children: s, style: i, context: l, ...u }) {
|
|
2567
2567
|
const d = n("scrollContainerState"), m = e("ScrollerComponent"), S = n("smoothScrollTargetReached"), h = e("scrollerRef"), T = e("horizontalDirection") || !1, { scrollByCallback: w, scrollerRef: R, scrollToCallback: g } = eo(
|
|
2568
2568
|
d,
|
|
2569
2569
|
S,
|
|
@@ -2580,7 +2580,7 @@ function Je({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
|
2580
2580
|
ref: R,
|
|
2581
2581
|
style: { ...T ? ur : cr, ...i },
|
|
2582
2582
|
tabIndex: 0,
|
|
2583
|
-
...
|
|
2583
|
+
...u,
|
|
2584
2584
|
...Q(m, l),
|
|
2585
2585
|
children: s
|
|
2586
2586
|
}
|
|
@@ -2588,7 +2588,7 @@ function Je({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
|
2588
2588
|
});
|
|
2589
2589
|
}
|
|
2590
2590
|
function Qe({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
2591
|
-
return E.memo(function({ children: s, style: i, context: l, ...
|
|
2591
|
+
return E.memo(function({ children: s, style: i, context: l, ...u }) {
|
|
2592
2592
|
const d = n("windowScrollContainerState"), m = e("ScrollerComponent"), S = n("smoothScrollTargetReached"), h = e("totalListHeight"), T = e("deviation"), w = e("customScrollParent"), R = E.useRef(null), g = e("scrollerRef"), { scrollByCallback: f, scrollerRef: a, scrollToCallback: I } = eo(
|
|
2593
2593
|
d,
|
|
2594
2594
|
S,
|
|
@@ -2607,7 +2607,7 @@ function Qe({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
|
2607
2607
|
ref: R,
|
|
2608
2608
|
"data-virtuoso-scroller": !0,
|
|
2609
2609
|
style: { position: "relative", ...i, ...h !== 0 ? { height: h + T } : {} },
|
|
2610
|
-
...
|
|
2610
|
+
...u,
|
|
2611
2611
|
...Q(m, l),
|
|
2612
2612
|
children: s
|
|
2613
2613
|
}
|
|
@@ -2616,7 +2616,7 @@ function Qe({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
|
2616
2616
|
}
|
|
2617
2617
|
const mr = ({ children: t }) => {
|
|
2618
2618
|
const e = E.useContext(Re), n = Rt("viewportHeight"), o = Rt("fixedItemHeight"), r = A("alignToBottom"), s = A("horizontalDirection"), i = E.useMemo(
|
|
2619
|
-
() => se(n, (
|
|
2619
|
+
() => se(n, (u) => zt(u, s ? "width" : "height")),
|
|
2620
2620
|
[n, s]
|
|
2621
2621
|
), l = Vt(i, !0, A("skipAnimationFrameInResizeObserver"));
|
|
2622
2622
|
return E.useEffect(() => {
|
|
@@ -2719,7 +2719,7 @@ const mr = ({ children: t }) => {
|
|
|
2719
2719
|
] })), e = C(null), n = C((d) => /* @__PURE__ */ Ut("td", { colSpan: 1e3, children: [
|
|
2720
2720
|
"Group ",
|
|
2721
2721
|
d
|
|
2722
|
-
] })), o = C(null), r = C(null), s = C({}), i = C(Xe), l = C(Qt),
|
|
2722
|
+
] })), o = C(null), r = C(null), s = C({}), i = C(Xe), l = C(Qt), u = (d, m = null) => ht(
|
|
2723
2723
|
x(
|
|
2724
2724
|
s,
|
|
2725
2725
|
k((S) => S[d]),
|
|
@@ -2731,27 +2731,27 @@ const mr = ({ children: t }) => {
|
|
|
2731
2731
|
components: s,
|
|
2732
2732
|
computeItemKey: i,
|
|
2733
2733
|
context: e,
|
|
2734
|
-
EmptyPlaceholder:
|
|
2735
|
-
FillerRow:
|
|
2734
|
+
EmptyPlaceholder: u("EmptyPlaceholder"),
|
|
2735
|
+
FillerRow: u("FillerRow"),
|
|
2736
2736
|
fixedFooterContent: r,
|
|
2737
2737
|
fixedHeaderContent: o,
|
|
2738
2738
|
itemContent: t,
|
|
2739
2739
|
groupContent: n,
|
|
2740
|
-
ScrollerComponent:
|
|
2740
|
+
ScrollerComponent: u("Scroller", "div"),
|
|
2741
2741
|
scrollerRef: l,
|
|
2742
|
-
ScrollSeekPlaceholder:
|
|
2743
|
-
TableBodyComponent:
|
|
2744
|
-
TableComponent:
|
|
2745
|
-
TableFooterComponent:
|
|
2746
|
-
TableHeadComponent:
|
|
2747
|
-
TableRowComponent:
|
|
2748
|
-
GroupComponent:
|
|
2742
|
+
ScrollSeekPlaceholder: u("ScrollSeekPlaceholder"),
|
|
2743
|
+
TableBodyComponent: u("TableBody", "tbody"),
|
|
2744
|
+
TableComponent: u("Table", "table"),
|
|
2745
|
+
TableFooterComponent: u("TableFoot", "tfoot"),
|
|
2746
|
+
TableHeadComponent: u("TableHead", "thead"),
|
|
2747
|
+
TableRowComponent: u("TableRow", "tr"),
|
|
2748
|
+
GroupComponent: u("Group", "tr")
|
|
2749
2749
|
};
|
|
2750
2750
|
}), Tr = /* @__PURE__ */ K(
|
|
2751
2751
|
([t, e]) => ({ ...t, ...e }),
|
|
2752
2752
|
tt(Jn, Sr)
|
|
2753
2753
|
), Cr = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { height: t } }) }), wr = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { border: 0, height: t, padding: 0 } }) }), vr = { overflowAnchor: "none" }, vn = { position: Ze(), zIndex: 2, overflowAnchor: "none" }, yn = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
|
|
2754
|
-
const n = N("listState"), o = N("computeItemKey"), r = N("firstItemIndex"), s = N("context"), i = N("isSeeking"), l = N("fixedHeaderHeight"),
|
|
2754
|
+
const n = N("listState"), o = N("computeItemKey"), r = N("firstItemIndex"), s = N("context"), i = N("isSeeking"), l = N("fixedHeaderHeight"), u = N("groupIndices").length > 0, d = N("itemContent"), m = N("groupContent"), S = N("ScrollSeekPlaceholder") || Cr, h = N("GroupComponent"), T = N("TableRowComponent"), w = (e ? n.topItems : []).reduce((g, f, a) => (a === 0 ? g.push(f.size) : g.push(g[a - 1] + f.size), g), []), R = (e ? n.topItems : n.items).map((g) => {
|
|
2755
2755
|
const f = g.originalIndex, a = o(f + r, g.data, s), I = e ? f === 0 ? 0 : w[f - 1] : 0;
|
|
2756
2756
|
return i ? /* @__PURE__ */ $t(
|
|
2757
2757
|
S,
|
|
@@ -2788,16 +2788,16 @@ const mr = ({ children: t }) => {
|
|
|
2788
2788
|
key: a,
|
|
2789
2789
|
style: e ? { ...vn, top: l + I } : vr
|
|
2790
2790
|
},
|
|
2791
|
-
|
|
2791
|
+
u ? d(g.index, g.groupIndex, g.data, s) : d(g.index, g.data, s)
|
|
2792
2792
|
);
|
|
2793
2793
|
});
|
|
2794
2794
|
return /* @__PURE__ */ G(ao, { children: R });
|
|
2795
2795
|
}), yr = /* @__PURE__ */ E.memo(function() {
|
|
2796
|
-
const e = N("listState"), n = N("topItemsIndexes").length > 0, o = Bt("sizeRanges"), r = N("useWindowScroll"), s = N("customScrollParent"), i = Bt("windowScrollContainerState"), l = Bt("scrollContainerState"),
|
|
2796
|
+
const e = N("listState"), n = N("topItemsIndexes").length > 0, o = Bt("sizeRanges"), r = N("useWindowScroll"), s = N("customScrollParent"), i = Bt("windowScrollContainerState"), l = Bt("scrollContainerState"), u = s || r ? i : l, d = N("trackItemSizes"), m = N("itemSize"), S = N("log"), { callbackRef: h, ref: T } = Fn(
|
|
2797
2797
|
o,
|
|
2798
2798
|
m,
|
|
2799
2799
|
d,
|
|
2800
|
-
|
|
2800
|
+
u,
|
|
2801
2801
|
S,
|
|
2802
2802
|
void 0,
|
|
2803
2803
|
s,
|
|
@@ -2810,7 +2810,7 @@ const mr = ({ children: t }) => {
|
|
|
2810
2810
|
const g = N("EmptyPlaceholder"), f = N("FillerRow") || wr, a = N("TableBodyComponent"), I = N("paddingTopAddition"), b = N("statefulTotalCount"), y = N("context");
|
|
2811
2811
|
if (b === 0 && g)
|
|
2812
2812
|
return /* @__PURE__ */ G(g, { ...Q(g, y) });
|
|
2813
|
-
const z = (n ? e.topItems : []).reduce((B, W) => B + W.size, 0),
|
|
2813
|
+
const z = (n ? e.topItems : []).reduce((B, W) => B + W.size, 0), c = e.offsetTop + I + w - z, p = e.offsetBottom, v = c > 0 ? /* @__PURE__ */ G(f, { context: y, height: c }, "padding-top") : null, O = p > 0 ? /* @__PURE__ */ G(f, { context: y, height: p }, "padding-bottom") : null;
|
|
2814
2814
|
return /* @__PURE__ */ Ut(a, { "data-testid": "virtuoso-item-list", ref: h, ...Q(a, y), children: [
|
|
2815
2815
|
v,
|
|
2816
2816
|
n && /* @__PURE__ */ G(yn, { showTopList: !0 }),
|
|
@@ -2836,7 +2836,7 @@ const mr = ({ children: t }) => {
|
|
|
2836
2836
|
e && (o(e.itemHeight), n({ offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
|
|
2837
2837
|
}, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: s, style: te(!1), children: t });
|
|
2838
2838
|
}, Hr = /* @__PURE__ */ E.memo(function(e) {
|
|
2839
|
-
const n = N("useWindowScroll"), o = N("customScrollParent"), r = Bt("fixedHeaderHeight"), s = Bt("fixedFooterHeight"), i = N("fixedHeaderContent"), l = N("fixedFooterContent"),
|
|
2839
|
+
const n = N("useWindowScroll"), o = N("customScrollParent"), r = Bt("fixedHeaderHeight"), s = Bt("fixedFooterHeight"), i = N("fixedHeaderContent"), l = N("fixedFooterContent"), u = N("context"), d = Vt(
|
|
2840
2840
|
E.useMemo(() => se(r, (a) => zt(a, "height")), [r]),
|
|
2841
2841
|
!0,
|
|
2842
2842
|
N("skipAnimationFrameInResizeObserver")
|
|
@@ -2849,7 +2849,7 @@ const mr = ({ children: t }) => {
|
|
|
2849
2849
|
{
|
|
2850
2850
|
ref: d,
|
|
2851
2851
|
style: { position: "sticky", top: 0, zIndex: 2 },
|
|
2852
|
-
...Q(w,
|
|
2852
|
+
...Q(w, u),
|
|
2853
2853
|
children: i()
|
|
2854
2854
|
},
|
|
2855
2855
|
"TableHead"
|
|
@@ -2858,12 +2858,12 @@ const mr = ({ children: t }) => {
|
|
|
2858
2858
|
{
|
|
2859
2859
|
ref: m,
|
|
2860
2860
|
style: { bottom: 0, position: "sticky", zIndex: 1 },
|
|
2861
|
-
...Q(R,
|
|
2861
|
+
...Q(R, u),
|
|
2862
2862
|
children: l()
|
|
2863
2863
|
},
|
|
2864
2864
|
"TableFoot"
|
|
2865
2865
|
) : null;
|
|
2866
|
-
return /* @__PURE__ */ G(S, { ...e, ...Q(S,
|
|
2866
|
+
return /* @__PURE__ */ G(S, { ...e, ...Q(S, u), children: /* @__PURE__ */ G(h, { children: /* @__PURE__ */ Ut(T, { style: { borderSpacing: 0, overflowAnchor: "none" }, ...Q(T, u), children: [
|
|
2867
2867
|
g,
|
|
2868
2868
|
/* @__PURE__ */ G(yr, {}, "TableBody"),
|
|
2869
2869
|
f
|
|
@@ -2967,14 +2967,14 @@ function Or(t, e) {
|
|
|
2967
2967
|
const Fr = /* @__PURE__ */ K(
|
|
2968
2968
|
([
|
|
2969
2969
|
{ increaseViewportBy: t, listBoundary: e, overscan: n, visibleRange: o },
|
|
2970
|
-
{ footerHeight: r, headerHeight: s, scrollBy: i, scrollContainerState: l, scrollTo:
|
|
2970
|
+
{ footerHeight: r, headerHeight: s, scrollBy: i, scrollContainerState: l, scrollTo: u, scrollTop: d, smoothScrollTargetReached: m, viewportHeight: S },
|
|
2971
2971
|
h,
|
|
2972
2972
|
T,
|
|
2973
2973
|
{ didMount: w, propsReady: R },
|
|
2974
2974
|
{ customScrollParent: g, useWindowScroll: f, windowScrollContainerState: a, windowScrollTo: I, windowViewportRect: b },
|
|
2975
2975
|
y
|
|
2976
2976
|
]) => {
|
|
2977
|
-
const z = C(0),
|
|
2977
|
+
const z = C(0), c = C(0), p = C(bn), v = C({ height: 0, width: 0 }), O = C({ height: 0, width: 0 }), B = U(), W = U(), _ = C(0), j = C(null), L = C({ column: 0, row: 0 }), xt = U(), M = U(), et = C(!1), wt = C(0), ft = C(!0), St = C(!1), Mt = C(!1);
|
|
2978
2978
|
Y(
|
|
2979
2979
|
x(
|
|
2980
2980
|
w,
|
|
@@ -3002,7 +3002,7 @@ const Fr = /* @__PURE__ */ K(
|
|
|
3002
3002
|
P((H) => H != null && H.scrollTop > 0),
|
|
3003
3003
|
Ft(0)
|
|
3004
3004
|
),
|
|
3005
|
-
|
|
3005
|
+
c
|
|
3006
3006
|
), Y(
|
|
3007
3007
|
x(
|
|
3008
3008
|
w,
|
|
@@ -3012,7 +3012,7 @@ const Fr = /* @__PURE__ */ K(
|
|
|
3012
3012
|
([, H]) => {
|
|
3013
3013
|
H && (D(v, H.viewport), D(O, H.item), D(L, H.gap), H.scrollTop > 0 && (D(et, !0), Et(x(d, Kt(1)), (q) => {
|
|
3014
3014
|
D(et, !1);
|
|
3015
|
-
}), D(
|
|
3015
|
+
}), D(u, { top: H.scrollTop })));
|
|
3016
3016
|
}
|
|
3017
3017
|
), F(
|
|
3018
3018
|
x(
|
|
@@ -3045,7 +3045,7 @@ const Fr = /* @__PURE__ */ K(
|
|
|
3045
3045
|
V(O, xe),
|
|
3046
3046
|
V(v, xe),
|
|
3047
3047
|
V(j),
|
|
3048
|
-
V(
|
|
3048
|
+
V(c),
|
|
3049
3049
|
V(et),
|
|
3050
3050
|
V(ft),
|
|
3051
3051
|
V(wt)
|
|
@@ -3152,7 +3152,7 @@ const Fr = /* @__PURE__ */ K(
|
|
|
3152
3152
|
return it === "end" ? nt = Hn(nt - q.height + at.height) : it === "center" && (nt = Hn(nt - q.height / 2 + at.height / 2)), lt && (nt += lt), { behavior: mt, top: nt };
|
|
3153
3153
|
})
|
|
3154
3154
|
),
|
|
3155
|
-
|
|
3155
|
+
u
|
|
3156
3156
|
);
|
|
3157
3157
|
const ne = ht(
|
|
3158
3158
|
x(
|
|
@@ -3176,14 +3176,14 @@ const Fr = /* @__PURE__ */ K(
|
|
|
3176
3176
|
gap: L,
|
|
3177
3177
|
headerHeight: s,
|
|
3178
3178
|
increaseViewportBy: t,
|
|
3179
|
-
initialItemCount:
|
|
3179
|
+
initialItemCount: c,
|
|
3180
3180
|
itemDimensions: O,
|
|
3181
3181
|
overscan: n,
|
|
3182
3182
|
restoreStateFrom: M,
|
|
3183
3183
|
scrollBy: i,
|
|
3184
3184
|
scrollContainerState: l,
|
|
3185
3185
|
scrollHeight: W,
|
|
3186
|
-
scrollTo:
|
|
3186
|
+
scrollTo: u,
|
|
3187
3187
|
scrollToIndex: B,
|
|
3188
3188
|
scrollTop: d,
|
|
3189
3189
|
smoothScrollTargetReached: m,
|
|
@@ -3226,7 +3226,7 @@ function Me(t, e, n, o) {
|
|
|
3226
3226
|
return i > 0 ? i + e.row : i;
|
|
3227
3227
|
}
|
|
3228
3228
|
const Lr = /* @__PURE__ */ K(() => {
|
|
3229
|
-
const t = C((S) => `Item ${S}`), e = C({}), n = C(null), o = C("virtuoso-grid-item"), r = C("virtuoso-grid-list"), s = C(Xe), i = C("div"), l = C(Qt),
|
|
3229
|
+
const t = C((S) => `Item ${S}`), e = C({}), n = C(null), o = C("virtuoso-grid-item"), r = C("virtuoso-grid-list"), s = C(Xe), i = C("div"), l = C(Qt), u = (S, h = null) => ht(
|
|
3230
3230
|
x(
|
|
3231
3231
|
e,
|
|
3232
3232
|
k((T) => T[S]),
|
|
@@ -3238,25 +3238,25 @@ const Lr = /* @__PURE__ */ K(() => {
|
|
|
3238
3238
|
components: e,
|
|
3239
3239
|
computeItemKey: s,
|
|
3240
3240
|
context: n,
|
|
3241
|
-
FooterComponent:
|
|
3242
|
-
HeaderComponent:
|
|
3241
|
+
FooterComponent: u("Footer"),
|
|
3242
|
+
HeaderComponent: u("Header"),
|
|
3243
3243
|
headerFooterTag: i,
|
|
3244
3244
|
itemClassName: o,
|
|
3245
|
-
ItemComponent:
|
|
3245
|
+
ItemComponent: u("Item", "div"),
|
|
3246
3246
|
itemContent: t,
|
|
3247
3247
|
listClassName: r,
|
|
3248
|
-
ListComponent:
|
|
3248
|
+
ListComponent: u("List", "div"),
|
|
3249
3249
|
readyStateChanged: d,
|
|
3250
3250
|
reportReadyState: m,
|
|
3251
|
-
ScrollerComponent:
|
|
3251
|
+
ScrollerComponent: u("Scroller", "div"),
|
|
3252
3252
|
scrollerRef: l,
|
|
3253
|
-
ScrollSeekPlaceholder:
|
|
3253
|
+
ScrollSeekPlaceholder: u("ScrollSeekPlaceholder", "div")
|
|
3254
3254
|
};
|
|
3255
3255
|
}), Vr = /* @__PURE__ */ K(
|
|
3256
3256
|
([t, e]) => ({ ...t, ...e }),
|
|
3257
3257
|
tt(Fr, Lr)
|
|
3258
3258
|
), Pr = /* @__PURE__ */ E.memo(function() {
|
|
3259
|
-
const e = ot("gridState"), n = ot("listClassName"), o = ot("itemClassName"), r = ot("itemContent"), s = ot("computeItemKey"), i = ot("isSeeking"), l = Ht("scrollHeight"),
|
|
3259
|
+
const e = ot("gridState"), n = ot("listClassName"), o = ot("itemClassName"), r = ot("itemContent"), s = ot("computeItemKey"), i = ot("isSeeking"), l = Ht("scrollHeight"), u = ot("ItemComponent"), d = ot("ListComponent"), m = ot("ScrollSeekPlaceholder"), S = ot("context"), h = Ht("itemDimensions"), T = Ht("gap"), w = ot("log"), R = ot("stateRestoreInProgress"), g = Ht("reportReadyState"), f = Vt(
|
|
3260
3260
|
E.useMemo(
|
|
3261
3261
|
() => (a) => {
|
|
3262
3262
|
const I = a.parentElement.parentElement.scrollHeight;
|
|
@@ -3298,9 +3298,9 @@ const Lr = /* @__PURE__ */ K(() => {
|
|
|
3298
3298
|
},
|
|
3299
3299
|
I
|
|
3300
3300
|
) : /* @__PURE__ */ $t(
|
|
3301
|
-
|
|
3301
|
+
u,
|
|
3302
3302
|
{
|
|
3303
|
-
...Q(
|
|
3303
|
+
...Q(u, S),
|
|
3304
3304
|
className: o,
|
|
3305
3305
|
"data-index": a.index,
|
|
3306
3306
|
key: I
|