virtua 0.53.0 → 0.53.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.
@@ -1186,7 +1186,7 @@ _), B = e => k(e.l(), e.u()), A = ({h: e, p: t, $: r, v: n, m: o, l: s, S: i, _:
1186
1186
  var s;
1187
1187
  }, Oe = e => {
1188
1188
  let s;
1189
- const {itemSize: l, cache: a} = e, [, f] = x(e, [ "ref", "data", "children", "lanes", "gap", "itemSize", "bufferSize", "cache", "onScroll", "onScrollEnd", "style" ]), m = ((e, t, r = 0, n, o) => {
1189
+ const {itemSize: l, cache: a} = e, [, f] = x(e, [ "ref", "data", "children", "lanes", "gap", "itemSize", "bufferSize", "keepMounted", "cache", "onScroll", "onScrollEnd", "style" ]), m = ((e, t, r = 0, n, o) => {
1190
1190
  let s = k(t, 1), i = s, l = r, c = o && o[1] || n || 40, u = -1, a = n ? void 0 : /* @__PURE__ */ new Set, f = !n;
1191
1191
  const g = o && o[0], d = g ? V(g.slice(0, b(e, g.length)), k(0, e - g.length)) : V([], e), h = [], p = [], $ = [], v = e => {
1192
1192
  const t = d[e];
@@ -1309,7 +1309,13 @@ _), B = e => k(e.l(), e.u()), A = ({h: e, p: t, $: r, v: n, m: o, l: s, S: i, _:
1309
1309
  t !== _.L() && _.A(5, [ t ]);
1310
1310
  });
1311
1311
  const r = [], n = [];
1312
- for (let [t, o] = R(); t <= o; t++) r.push(e.data[t]), n.push(t);
1312
+ if (e.keepMounted) {
1313
+ const o = new Set(e.keepMounted);
1314
+ for (let [e, t] = R(); e <= t; e++) o.add(e);
1315
+ M([ ...o ]).forEach(o => {
1316
+ o < t && (r.push(e.data[o]), n.push(o));
1317
+ });
1318
+ } else for (let [t, o] = R(); t <= o; t++) r.push(e.data[t]), n.push(t);
1313
1319
  return {
1314
1320
  de: r,
1315
1321
  he: n