@sheetxl/grid-react 0.7.8 → 0.7.9

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/grid-react - Grid React - Advanced grid component for React - v0.7.8
2
+ * @license @sheetxl/grid-react - Grid React - Advanced grid component for React - v0.7.9
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1603,54 +1603,54 @@ const Ce = -10, Ie = Object.freeze({ rowStart: 0, colStart: 0, rowEnd: 0, colEnd
1603
1603
  return je2.current = t2, n2;
1604
1604
  }, [Me2, a2, d2, rt, lt, z2, pe2, F2, oe2, re2, te2, ee2, de2]), zt = (t2, n2, o2, r3, l3) => {
1605
1605
  if (!t2) return;
1606
- const c3 = t2.getLayout();
1606
+ const c3 = t2.getLayout(), s3 = window.devicePixelRatio || 1, a3 = String(1 / s3);
1607
1607
  if (n2) {
1608
1608
  const e2 = `view:${t2.getAnchor()}:hl:`, n3 = t2.getVisibleRows();
1609
1609
  if (0 === (n3 ? n3.length : 0)) return;
1610
- const s3 = l3.sort(k.rowFirstRangeComparator), a3 = t2.getVisibleRangeCoords(), d3 = 0, u3 = Math.min(t2.getBounds().width, c3.getColOffset(a3.colEnd + 1));
1611
- let h3 = [];
1612
- for (let t3 = 0; t3 < n3.length && n3[t3] <= a3.rowEnd; t3++) {
1610
+ const s4 = l3.sort(k.rowFirstRangeComparator), d3 = t2.getVisibleRangeCoords(), u3 = 0, h3 = Math.min(t2.getBounds().width, c3.getColOffset(d3.colEnd + 1));
1611
+ let g2 = [];
1612
+ for (let t3 = 0; t3 < n3.length && n3[t3] <= d3.rowEnd; t3++) {
1613
1613
  const l4 = n3[t3];
1614
- if (l4 < a3.rowStart) continue;
1615
- let g2 = false;
1616
- for (; s3.length > 0 && s3[0].rowStart <= l4; ) {
1617
- const e3 = s3.shift();
1618
- e3.rowEnd > l4 && (h3.push(e3), g2 = true);
1614
+ if (l4 < d3.rowStart) continue;
1615
+ let f3 = false;
1616
+ for (; s4.length > 0 && s4[0].rowStart <= l4; ) {
1617
+ const e3 = s4.shift();
1618
+ e3.rowEnd > l4 && (g2.push(e3), f3 = true);
1619
1619
  }
1620
- g2 && (h3 = h3.sort(k.columnFirstRangeComparator));
1621
- const f3 = c3.getRowOffset(l4 + 1);
1622
- let w2 = d3;
1623
- const x2 = h3.length;
1624
- for (let t4 = 0; t4 < x2 + 1; t4++) {
1625
- let n4 = w2, s4 = u3;
1626
- const a4 = h3[t4];
1627
- t4 < x2 && (s4 = Math.min(u3, c3.getColOffset(a4.colStart)), w2 = Math.min(u3, c3.getColOffset(a4.colEnd + 1))), r3.push(I("path", { d: `M ${i.boundPixel(n4)} ${i.boundPixel(f3, false, o2)} L ${i.boundPixel(s4)} ${i.boundPixel(f3, false, o2)}`, stroke: L2, strokeWidth: 1, vectorEffect: "non-scaling-stroke", ...$2, key: e2 + l4 + ":" + t4 }));
1620
+ f3 && (g2 = g2.sort(k.columnFirstRangeComparator));
1621
+ const w2 = c3.getRowOffset(l4 + 1);
1622
+ let x2 = u3;
1623
+ const p2 = g2.length;
1624
+ for (let t4 = 0; t4 < p2 + 1; t4++) {
1625
+ let n4 = x2, s5 = h3;
1626
+ const d4 = g2[t4];
1627
+ t4 < p2 && (s5 = Math.min(h3, c3.getColOffset(d4.colStart)), x2 = Math.min(h3, c3.getColOffset(d4.colEnd + 1))), r3.push(I("path", { d: `M ${i.boundPixel(n4)} ${i.boundPixel(w2, false, o2)} L ${i.boundPixel(s5)} ${i.boundPixel(w2, false, o2)}`, stroke: L2, strokeWidth: a3, vectorEffect: "non-scaling-stroke", ...$2, key: e2 + l4 + ":" + t4 }));
1628
1628
  }
1629
- for (let e3 = x2 - 1; e3 >= 0; e3--) h3[e3].rowEnd <= n3[t3 + 1] && h3.splice(e3, 1);
1629
+ for (let e3 = p2 - 1; e3 >= 0; e3--) g2[e3].rowEnd <= n3[t3 + 1] && g2.splice(e3, 1);
1630
1630
  }
1631
1631
  } else {
1632
- const n3 = `view:${t2.getAnchor()}:vl:`, s3 = t2.getVisibleColumns(), a3 = s3 ? s3.length : 0;
1633
- if (0 === a3) return;
1634
- const d3 = l3.sort(k.columnFirstRangeComparator), u3 = t2.getVisibleRangeCoords(), h3 = 0, g2 = Math.min(t2.getBounds().height, c3.getRowOffset(u3.rowEnd + 1));
1635
- let f3 = [];
1636
- for (let t3 = 0; t3 < a3 && s3[t3] <= u3.colEnd; t3++) {
1637
- const l4 = s3[t3];
1638
- if (l4 < u3.colStart) continue;
1639
- let a4 = false;
1640
- for (; d3.length > 0 && d3[0].colStart <= l4; ) {
1641
- const e2 = d3.shift();
1642
- e2.colEnd > l4 && (f3.push(e2), a4 = true);
1632
+ const n3 = `view:${t2.getAnchor()}:vl:`, s4 = t2.getVisibleColumns(), d3 = s4 ? s4.length : 0;
1633
+ if (0 === d3) return;
1634
+ const u3 = l3.sort(k.columnFirstRangeComparator), h3 = t2.getVisibleRangeCoords(), g2 = 0, f3 = Math.min(t2.getBounds().height, c3.getRowOffset(h3.rowEnd + 1));
1635
+ let w2 = [];
1636
+ for (let t3 = 0; t3 < d3 && s4[t3] <= h3.colEnd; t3++) {
1637
+ const l4 = s4[t3];
1638
+ if (l4 < h3.colStart) continue;
1639
+ let d4 = false;
1640
+ for (; u3.length > 0 && u3[0].colStart <= l4; ) {
1641
+ const e2 = u3.shift();
1642
+ e2.colEnd > l4 && (w2.push(e2), d4 = true);
1643
1643
  }
1644
- a4 && (f3 = f3.sort(k.rowFirstRangeComparator));
1645
- const w2 = c3.getColOffset(l4 + 1);
1646
- let x2 = h3;
1647
- const p2 = f3.length;
1648
- for (let t4 = 0; t4 < p2 + 1; t4++) {
1649
- let s4 = x2, a5 = g2;
1650
- const d4 = f3[t4];
1651
- t4 < p2 && (a5 = Math.min(g2, c3.getRowOffset(d4.rowStart)), x2 = Math.min(g2, c3.getRowOffset(d4.rowEnd + 1))), r3.push(e("path", { d: `M ${i.boundPixel(w2, false, o2)} ${i.boundPixel(s4)} L ${i.boundPixel(w2, false, o2)} ${i.boundPixel(a5)}`, stroke: L2, strokeWidth: 1, vectorEffect: "non-scaling-stroke", ...B2 }, n3 + l4 + ":" + t4));
1644
+ d4 && (w2 = w2.sort(k.rowFirstRangeComparator));
1645
+ const x2 = c3.getColOffset(l4 + 1);
1646
+ let p2 = g2;
1647
+ const m2 = w2.length;
1648
+ for (let t4 = 0; t4 < m2 + 1; t4++) {
1649
+ let s5 = p2, d5 = f3;
1650
+ const u4 = w2[t4];
1651
+ t4 < m2 && (d5 = Math.min(f3, c3.getRowOffset(u4.rowStart)), p2 = Math.min(f3, c3.getRowOffset(u4.rowEnd + 1))), r3.push(e("path", { d: `M ${i.boundPixel(x2, false, o2)} ${i.boundPixel(s5)} L ${i.boundPixel(x2, false, o2)} ${i.boundPixel(d5)}`, stroke: L2, strokeWidth: a3, vectorEffect: "non-scaling-stroke", ...B2 }, n3 + l4 + ":" + t4));
1652
1652
  }
1653
- for (let e2 = p2 - 1; e2 >= 0; e2--) f3[e2].colEnd <= s3[t3 + 1] && f3.splice(e2, 1);
1653
+ for (let e2 = m2 - 1; e2 >= 0; e2--) w2[e2].colEnd <= s4[t3 + 1] && w2.splice(e2, 1);
1654
1654
  }
1655
1655
  }
1656
1656
  }, Lt = (t2) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sheetxl/grid-react",
3
3
  "description": "Grid React - Advanced grid component for React",
4
- "version": "0.7.8",
4
+ "version": "0.7.9",
5
5
  "license": "SEE LICENSE IN <LICENSE>",
6
6
  "type": "module",
7
7
  "exports": {
@@ -41,8 +41,8 @@
41
41
  "table"
42
42
  ],
43
43
  "dependencies": {
44
- "@sheetxl/utils": "^0.7.8",
45
- "@sheetxl/utils-react": "^0.7.8",
44
+ "@sheetxl/utils": "^0.7.9",
45
+ "@sheetxl/utils-react": "^0.7.9",
46
46
  "clsx": "^2.1.1",
47
47
  "react-merge-refs": "^3.0.2",
48
48
  "react-use": "^17.6.0",