@sheetxl/react 0.7.25 → 0.7.26

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/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.7.25
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.7.26
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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.7.25
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.7.26
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.
@@ -512,15 +512,15 @@ const Ye = ie((e2) => {
512
512
  if (0 === c2.length) return;
513
513
  const g2 = o3.getVisibleColumnOffsets(), u2 = o3.getVisibleRowOffsets();
514
514
  let h2 = [], m2 = [];
515
- const p2 = o3.getVisibleColumns(), f2 = o3.getVisibleRows(), w2 = [], v2 = [], q2 = [], y2 = (e3, t3, o4, n2, r3, l3, i3) => {
515
+ const p2 = o3.getVisibleColumns(), f2 = o3.getVisibleRows(), w2 = [], v2 = [], q2 = [], y2 = [], C2 = (e3, t3, o4, n2, r3, l3, i3) => {
516
516
  const a3 = { index: n2, stroke: r3, visibleIndex: o4, edge: l3, length: i3 };
517
517
  e3[t3] || (e3[t3] = []), e3[t3].length > 0 && e3[t3][e3[t3].length - 1]?.index === n2 ? e3[t3][e3[t3].length - 1] = a3 : e3[t3].push(a3);
518
- }, C2 = o3.getVisibleRangeCoords(), b2 = c2.length;
519
- for (let t3 = 0; t3 < b2; t3++) {
518
+ }, b2 = o3.getVisibleRangeCoords(), S2 = c2.length;
519
+ for (let t3 = 0; t3 < S2; t3++) {
520
520
  const o4 = c2[t3], r3 = o4.coords;
521
521
  if (!r3) continue;
522
522
  const l3 = o4?.range ?? { rowStart: r3.rowIndex, colStart: r3.colIndex, rowEnd: r3.rowIndex, colEnd: r3.colIndex };
523
- if (!A.isRangesIntersect(l3, C2) && !A.isRangeWithinRange(l3, C2)) continue;
523
+ if (!A.isRangesIntersect(l3, b2) && !A.isRangeWithinRange(l3, b2)) continue;
524
524
  const i3 = r3.colIndex, a3 = r3.rowIndex, s3 = g2[i3], d3 = u2[a3];
525
525
  if (l3.rowEnd !== l3.rowStart) {
526
526
  const e3 = u2[l3.rowStart]?.spanIndex ?? -1, t4 = u2[l3.rowEnd]?.spanIndex ?? u2[f2[f2.length - 1]].spanIndex + 1;
@@ -530,15 +530,15 @@ const Ye = ie((e2) => {
530
530
  const e3 = g2[l3.colStart]?.spanIndex ?? -1, t4 = g2[l3.colEnd]?.spanIndex ?? g2[p2[p2.length - 1]].spanIndex + 1;
531
531
  m2.push({ ...l3, colStart: e3, colEnd: t4 });
532
532
  }
533
- const q3 = o4.value, b3 = e2(q3, t3);
534
- if (!b3 || b3.isEmpty()) continue;
535
- const S2 = b3.getLeft(), x3 = b3.getTop(), k3 = b3.getRight(), T3 = b3.getBottom();
533
+ const q3 = o4.value, y3 = e2(q3, t3);
534
+ if (!y3 || y3.isEmpty()) continue;
535
+ const S3 = y3.getLeft(), x2 = y3.getTop(), k3 = y3.getRight(), T3 = y3.getBottom();
536
536
  let R2 = 1, M3 = 1;
537
537
  if (!s3 || !d3) continue;
538
- const F3 = s3.spanIndex, z2 = d3.spanIndex;
539
- S2.isNone() || y2(w2, F3, z2, a3, S2, n.Edge.Left, R2), x3.isNone() || y2(v2, z2, F3, i3, x3, n.Edge.Top, M3), k3.isNone() || y2(w2, F3 + M3, z2, a3, k3, n.Edge.Right, R2), T3.isNone() || y2(v2, z2 + R2, F3, i3, T3, n.Edge.Bottom, M3);
538
+ const F3 = s3.spanIndex, z3 = d3.spanIndex;
539
+ S3.isNone() || C2(w2, F3, z3, a3, S3, n.Edge.Left, R2), x2.isNone() || C2(v2, z3, F3, i3, x2, n.Edge.Top, M3), k3.isNone() || C2(w2, F3 + M3, z3, a3, k3, n.Edge.Right, R2), T3.isNone() || C2(v2, z3 + R2, F3, i3, T3, n.Edge.Bottom, M3);
540
540
  }
541
- const x2 = (e3, t3, o4) => {
541
+ const k2 = (e3, t3, o4) => {
542
542
  const n2 = [];
543
543
  return e3.forEach((e4, r3) => {
544
544
  let l3 = null;
@@ -570,31 +570,31 @@ const Ye = ie((e2) => {
570
570
  }), n2;
571
571
  };
572
572
  h2 = h2.sort(at), m2 = m2.sort(it);
573
- const k2 = x2(w2, p2, false), T2 = x2(v2, f2, true);
574
- if (0 === k2.length && 0 === T2.length) return null;
575
- const M2 = T2.length;
576
- for (let e3 = 0; e3 < M2; e3++) {
577
- const t3 = T2[e3];
578
- let o4 = R.findEqualOrGreater(k2, t3.from, (e4) => e4.index), n2 = false;
573
+ const T2 = k2(w2, p2, false), M2 = k2(v2, f2, true);
574
+ if (0 === T2.length && 0 === M2.length) return null;
575
+ const F2 = M2.length;
576
+ for (let e3 = 0; e3 < F2; e3++) {
577
+ const t3 = M2[e3];
578
+ let o4 = R.findEqualOrGreater(T2, t3.from, (e4) => e4.index), n2 = false;
579
579
  for (; !n2; ) {
580
- const e4 = k2[o4++];
580
+ const e4 = T2[o4++];
581
581
  e4 && e4.index >= t3.from && e4.index <= t3.to + 1 && e4.from <= t3.index && e4.to + 1 >= t3.index && (t3.intersections.push({ stroke: e4.stroke, range: { rowStart: e4.from, rowEnd: e4.to + 1, colStart: e4.index, colEnd: e4.index } }), e4.intersections.push({ stroke: t3.stroke, range: { rowStart: t3.index, rowEnd: t3.index, colStart: t3.from, colEnd: t3.to + 1 } })), n2 = !e4 || e4.index > t3.to + 1;
582
582
  }
583
583
  }
584
- for (let e3 = 0; e3 < M2; e3++) {
585
- const n2 = T2[e3];
584
+ for (let e3 = 0; e3 < F2; e3++) {
585
+ const n2 = M2[e3];
586
586
  let i3 = n2.stroke;
587
587
  const s3 = `rBorder:${n2.index}:${n2.from}:${n2.to}:${n2.edge}`, d3 = { rowStart: n2.index, rowEnd: n2.index, colStart: n2.from, colEnd: n2.to + 1 }, c3 = o3.getLayout(), g3 = false, u3 = c3.getColOffset(d3.colStart), h3 = c3.getRowOffset(d3.rowStart), m3 = [u3, h3, c3.getColOffset(d3.colEnd), h3];
588
588
  q2.push(t2({ key: s3, points: m3, stroke: i3, darkMode: r2, forceThinBorder: l2, shiftIfWide: a2, range: d3, intersections: n2.intersections, layout: c3, isVertical: g3 }));
589
589
  }
590
- const F2 = k2.length;
591
- for (let e3 = 0; e3 < F2; e3++) {
592
- const n2 = k2[e3];
590
+ const z2 = T2.length;
591
+ for (let e3 = 0; e3 < z2; e3++) {
592
+ const n2 = T2[e3];
593
593
  let i3 = n2.stroke;
594
594
  const s3 = `cBorder:${n2.index}:${n2.from}:${n2.to}:${n2.edge}`, d3 = { rowStart: n2.from, rowEnd: n2.to + 1, colStart: n2.index, colEnd: n2.index }, c3 = o3.getLayout(), g3 = true, u3 = c3.getColOffset(d3.colStart), h3 = [u3, c3.getRowOffset(d3.rowStart), u3, c3.getRowOffset(d3.rowEnd)];
595
- q2.push(t2({ key: s3, stroke: i3, points: h3, darkMode: r2, forceThinBorder: l2, shiftIfWide: a2, range: d3, intersections: n2.intersections, layout: c3, isVertical: g3 }));
595
+ y2.push(t2({ key: s3, stroke: i3, points: h3, darkMode: r2, forceThinBorder: l2, shiftIfWide: a2, range: d3, intersections: n2.intersections, layout: c3, isVertical: g3 }));
596
596
  }
597
- return S("svg", { width: `${d2.width}`, height: `${d2.height}`, viewBox: `0 0 ${d2.width} ${d2.height}`, preserveAspectRatio: "none", shapeRendering: "crispEdges", style: { position: "absolute", left: "0px", top: "0px", width: `${d2.width}px`, height: `${d2.height}px`, pointerEvents: "none", transitionTimingFunction: "linear", transitionDelay: "0", transitionProperty: "left, top, width, height", willChange: "left, top, width, height, stroke-dashoffset", overflow: "visible" }, children: q2 }, "borders");
597
+ return x("svg", { width: `${d2.width}`, height: `${d2.height}`, viewBox: `0 0 ${d2.width} ${d2.height}`, preserveAspectRatio: "none", shapeRendering: "crispEdges", style: { position: "absolute", left: "0px", top: "0px", width: `${d2.width}px`, height: `${d2.height}px`, pointerEvents: "none", transitionTimingFunction: "linear", transitionDelay: "0", transitionProperty: "left, top, width, height", willChange: "left, top, width, height, stroke-dashoffset", overflow: "visible" }, children: [y2, q2] }, "borders");
598
598
  }, [e2, r2]) };
599
599
  }, ct = T.Center, gt = Object.freeze({ horizontal: false, vertical: false }), ut = M.EmptyTopLeft, ht = (e2, t2) => A.EmptyCell, mt = (e2, t2) => new Promise((e3, t3) => {
600
600
  t3("StaticBorderRenderer does not support scrolling");
@@ -2358,7 +2358,7 @@ const Vt = (e2, t2, o2 = null) => {
2358
2358
  Ce2.current = true;
2359
2359
  const e3 = le.lazy(async () => {
2360
2360
  try {
2361
- const e4 = await import("./CNOJ8jvNTSRVp4vY.mjs");
2361
+ const e4 = await import("./CX0U5emV8bnYBcK6.mjs");
2362
2362
  return Ce2.current = false, be2.current = true, k2([...b2]), e4;
2363
2363
  } catch (e4) {
2364
2364
  return console.warn(e4), j2.current?.(false), null;
@@ -3168,7 +3168,7 @@ const Ao = ie(de((e2, t2) => {
3168
3168
  } }), []);
3169
3169
  return x("div", { ...m2, ref: N2, style: { flexDirection: "column", display: "flex", ...D2 }, className: Ie(n2), children: [x("div", { style: { position: "relative", boxSizing: "content-box", whiteSpace: "pre", userSelect: "none", display: "flex", justifyContent: "center" }, onDoubleClick: () => {
3170
3170
  u2 || h2 || v2(true);
3171
- }, onMouseEnter: () => f2(true), onMouseLeave: () => f2(false), children: [S("div", { className: "editable-label-container", style: { textAlign: "center", display: "flex", minHeight: "1em", marginTop: "2px", opacity: w2 ? 0 : 1 }, children: q2 }), z2] }), S("div", { style: { whiteSpace: "pre", position: "relative", maxHeight: "0px", height: "0px", visibility: "hidden", marginLeft: "1px", marginRight: "1px", overflow: "hidden", ...d2 }, children: q2 })] });
3171
+ }, onMouseEnter: () => f2(true), onMouseLeave: () => f2(false), children: [S("div", { className: "editable-label-container", style: { textAlign: "center", display: "flex", minHeight: "1em", opacity: w2 ? 0 : 1 }, children: q2 }), z2] }), S("div", { style: { whiteSpace: "pre", position: "relative", maxHeight: "0px", height: "0px", visibility: "hidden", marginLeft: "1px", marginRight: "1px", overflow: "hidden", ...d2 }, children: q2 })] });
3172
3172
  })), Io = ie(de((e2, t2) => {
3173
3173
  const { children: o2, style: n2, className: r2, index: l2, editing: i2, editable: a2, selectedIndex: s2, background: d2, activeColor: c2, borderColor: g2, borderWidth: u2, dragging: h2, ...m2 } = e2;
3174
3174
  return x("div", { ref: t2, className: Ie(r2), style: { ...n2, display: "flex", flexDirection: "column", background: s2 === l2 ? "white" : d2, minHeight: "0px", fontFamily: "inherit", fontSize: "16px", fontWeight: s2 === l2 ? "700" : "400", lineHeight: "1", letterSpacing: "0px", textTransform: "none", minWidth: "unset" }, ...m2, children: [x("div", { style: { flex: "1 1 100%", display: "flex", flexDirection: "row" }, children: [S("div", { style: { marginLeft: s2 === l2 ? "0px" : "-1px", marginTop: s2 === l2 ? "0px" : "4px", marginBottom: "0px", background: "grey", minWidth: "1px" } }), o2, s2 === l2 ? S("div", { style: { marginLeft: "0px", marginTop: "0px", marginBottom: "0px", background: "grey", minWidth: "1px" } }) : S(k, {})] }), S("div", { style: { flex: "1 1 100%", background: s2 === l2 && c2 ? c2?.toCSS() : "none", minHeight: "2px" } })] });
@@ -3281,7 +3281,7 @@ const qn = (e2) => {
3281
3281
  return ae(() => e2 || t2, [e2]);
3282
3282
  }, Cn = "_script-editor_iy654_5", bn = { lightbulb: { enabled: false }, tabSize: 2, acceptSuggestionOnCommitCharacter: true, acceptSuggestionOnEnter: "on", accessibilitySupport: "auto", automaticLayout: true, autoIndent: false, codeLens: true, colorDecorators: true, contextmenu: true, cursorBlinking: "blink", cursorSmoothCaretAnimation: false, cursorStyle: "line", disableLayerHinting: false, disableMonospaceOptimizations: false, dragAndDrop: true, glyphMargin: true, fixedOverflowWidgets: false, folding: true, foldingStrategy: "auto", fontLigatures: false, formatOnPaste: true, formatOnType: false, hideCursorInOverviewRuler: false, highlightActiveIndentGuide: true, links: true, lineDecorationsWidth: 8, lineNumbersMinChars: 3, mouseWheelZoom: false, multiCursorMergeOverlapping: true, multiCursorModifier: "alt", overviewRulerBorder: true, overviewRulerLanes: 2, quickSuggestions: true, quickSuggestionsDelay: 100, readOnly: false, renderControlCharacters: false, renderFinalNewline: true, renderIndentGuides: true, renderLineHighlight: "all", renderWhitespace: "none", revealHorizontalRightPadding: 30, roundedSelection: true, rulers: [], scrollBeyondLastColumn: 5, scrollBeyondLastLine: true, selectOnLineNumbers: true, selectionClipboard: true, selectionHighlight: true, showLightbulbIconMode: false, showFoldingControls: "mouseover", smoothScrolling: true, suggestOnTriggerCharacters: true, wordBasedSuggestions: true, wordSeparators: `~!@#$%^&*()-=+[{]}|;:'",.<>/?`, wordWrap: "off", wordWrapBreakAfterCharacters: " })]?|&,;", wordWrapBreakBeforeCharacters: "{([+", wordWrapBreakObtrusiveCharacters: ".", wordWrapColumn: 80, wordWrapMinified: true, wrappingIndent: "none" }, Sn = le.lazy(() => import("@monaco-editor/react"));
3283
3283
  let xn, kn, Tn = ["define", "require"], Rn = false;
3284
- let Mn = "@0.7.25";
3284
+ let Mn = "@0.7.26";
3285
3285
  "@local" !== Mn && "@0.0.0" !== Mn || (Mn = "");
3286
3286
  const An = `https://cdn.jsdelivr.net/npm/@sheetxl/sdk${Mn}/types/scripting.d.ts`, Fn = async (e2, t2, o2) => {
3287
3287
  const n2 = e2.getModel();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sheetxl/react",
3
3
  "description": "React - React components needed to build advanced grid and spreadsheet UIs.",
4
- "version": "0.7.25",
4
+ "version": "0.7.26",
5
5
  "license": "SEE LICENSE IN <LICENSE>",
6
6
  "type": "module",
7
7
  "exports": {
@@ -49,10 +49,10 @@
49
49
  "@dnd-kit/sortable": "^10.0.0",
50
50
  "@dnd-kit/utilities": "^3.2.2",
51
51
  "@monaco-editor/react": "^4.6.0",
52
- "@sheetxl/grid-react": "^0.7.25",
53
- "@sheetxl/sdk": "^0.7.25",
54
- "@sheetxl/utils": "^0.7.25",
55
- "@sheetxl/utils-react": "^0.7.25",
52
+ "@sheetxl/grid-react": "^0.7.26",
53
+ "@sheetxl/sdk": "^0.7.26",
54
+ "@sheetxl/utils": "^0.7.26",
55
+ "@sheetxl/utils-react": "^0.7.26",
56
56
  "clsx": "^2.1.1",
57
57
  "monaco-editor-auto-typings": "^0.4.6",
58
58
  "react-merge-refs": "^3.0.2",