virtua 0.52.0 → 0.52.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.cjs CHANGED
@@ -821,49 +821,51 @@ t.jsx)("div", {
821
821
  let $ = 0, R = !e.H(o) && null, T = o + 1, M = !1;
822
822
  for (let e = 0; e < F; e++) {
823
823
  const r = J[e], i = r < v, c = r >= z, f = c || r >= I && r <= b, d = G.get(u + r);
824
- if (d ? d.rowIndex !== o || d.colIndex !== r : !(s && f || n || a || i)) continue;
825
- const S = d ? L(d, m) : o + 1, _ = d ? q(d, w) : r + 1, x = S - o > 1, y = _ - r > 1, k = x || y, C = k ? S - o : void 0, O = k ? _ - r : void 0;
826
- let E, A;
827
- T = l(T, S);
828
- const W = i ? t.u(r) : null, B = c ? t.t() - t.u(_ - 1) - t.h(_ - 1) : null;
829
- !1 !== R || x || (E = o, R = !0), !1 !== Q[e] || y || (A = r, Q[e] = !0);
830
- const D = n ? "columnheader" : r === H && (i || a) ? "rowheader" : "cell", j = "cell" !== D && p && p.rowIndex === o && p.colIndex === r ? p.order : void 0;
831
- let P;
832
- if (h) {
833
- for (;$ < h.length && h[$].le < r; ) $++;
834
- $ < h.length && (P = h[$]);
835
- }
836
- if (!P || P.le !== r || P.ie !== C || P.ce !== O || P.xe !== W || P.ye !== B || P.ae !== E || P.fe !== A || P.ue !== D || P.de !== j) {
837
- const e = {
838
- contain: "layout style",
839
- display: "grid",
840
- gridArea: k ? "1/l" + r + "/l" + S + "/l" + _ : "1/l" + r
841
- };
842
- x && (e.height = "0px", e.minHeight = "100%", e.zIndex = 1), y && (e.width = "0px",
843
- e.minWidth = "100%"), (i || c) && (i ? e.insetInlineStart = W + "px" : e.insetInlineEnd = B + "px",
844
- e.position = "sticky", e.zIndex = 2), P = {
845
- le: r,
846
- ie: C,
847
- ce: O,
848
- ae: E,
849
- fe: A,
850
- ue: D,
851
- de: j,
852
- he: e,
853
- xe: W,
854
- ye: B
855
- }, M = !0;
824
+ if (d ? d.rowIndex === o && d.colIndex === r : s && f || n || a || i) {
825
+ const s = d ? L(d, m) : o + 1, f = d ? q(d, w) : r + 1, u = s - o > 1, S = f - r > 1, _ = u || S, v = _ ? s - o : void 0, z = _ ? f - r : void 0;
826
+ let x, y;
827
+ T = l(T, s);
828
+ const I = i ? t.u(r) : null, b = c ? t.t() - t.u(f - 1) - t.h(f - 1) : null;
829
+ !1 !== R || u || (x = o, R = !0), !1 !== Q[e] || S || (y = r, Q[e] = !0);
830
+ const k = n ? "columnheader" : r === H && (i || a) ? "rowheader" : "cell", C = "cell" !== k && p && p.rowIndex === o && p.colIndex === r ? p.order : void 0;
831
+ let O;
832
+ if (h) {
833
+ for (;$ < h.length && h[$].le < r; ) $++;
834
+ $ < h.length && (O = h[$]);
835
+ }
836
+ if (!O || O.le !== r || O.ie !== v || O.ce !== z || O.xe !== I || O.ye !== b || O.ae !== x || O.fe !== y || O.ue !== k || O.de !== C) {
837
+ const e = {
838
+ contain: "layout style",
839
+ display: "grid",
840
+ gridArea: _ ? "1/l" + r + "/l" + s + "/l" + f : "1/l" + r
841
+ };
842
+ u && (e.height = "0px", e.minHeight = "100%", e.zIndex = 1), S && (e.width = "0px",
843
+ e.minWidth = "100%"), (i || c) && (i ? e.insetInlineStart = I + "px" : e.insetInlineEnd = b + "px",
844
+ e.position = "sticky", e.zIndex = 2), O = {
845
+ le: r,
846
+ ie: v,
847
+ ce: z,
848
+ ae: x,
849
+ fe: y,
850
+ ue: k,
851
+ de: C,
852
+ he: e,
853
+ xe: I,
854
+ ye: b
855
+ }, M = !0;
856
+ }
857
+ g.push(O);
856
858
  }
857
- g.push(P);
858
859
  }
859
- if (Z.push(R), !g.length) continue;
860
- const O = d && !M && d.we.length === g.length && d.Ie === f ? d : {
861
- me: o,
862
- we: g,
863
- he: W(o, T, f, "top", 3),
864
- Ie: f
865
- };
866
- re.set(o, O), oe.push(O);
860
+ if (Z.push(R), g.length) {
861
+ const e = d && !M && d.we.length === g.length && d.Ie === f ? d : {
862
+ me: o,
863
+ we: g,
864
+ he: W(o, T, f, "top", 3),
865
+ Ie: f
866
+ };
867
+ re.set(o, e), oe.push(e);
868
+ }
867
869
  }
868
870
  return R.set(e, re), {
869
871
  be: A(e, Y, Z, f(K), "max-content", m),