@extend-ai/react-xlsx 0.8.1 → 0.8.3

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/dist/index.js CHANGED
@@ -6261,6 +6261,84 @@ function resizeImageRect(rect, handle, deltaX, deltaY, minimumSize = 16) {
6261
6261
  return { height, left, top, width };
6262
6262
  }
6263
6263
 
6264
+ // src/safe-calculate.ts
6265
+ var SHEET_REF_REGEX = /'((?:[^']|'')+)'!|([A-Za-z_\u0080-\uFFFF][\w.\u0080-\uFFFF]*)!/g;
6266
+ function collectReferencedSheetNames(workbook) {
6267
+ const referenced = /* @__PURE__ */ new Set();
6268
+ for (let sheetIdx = 0; sheetIdx < workbook.sheetCount; sheetIdx += 1) {
6269
+ let sheet;
6270
+ try {
6271
+ sheet = workbook.getSheet(sheetIdx);
6272
+ } catch {
6273
+ continue;
6274
+ }
6275
+ const cells = sheet.formulaCells;
6276
+ if (!Array.isArray(cells)) {
6277
+ continue;
6278
+ }
6279
+ for (const cell of cells) {
6280
+ const formula = cell?.formula;
6281
+ if (!formula) {
6282
+ continue;
6283
+ }
6284
+ SHEET_REF_REGEX.lastIndex = 0;
6285
+ let match;
6286
+ while ((match = SHEET_REF_REGEX.exec(formula)) !== null) {
6287
+ const raw = match[1] ?? match[2];
6288
+ if (!raw) {
6289
+ continue;
6290
+ }
6291
+ referenced.add(raw.replace(/''/g, "'"));
6292
+ }
6293
+ }
6294
+ }
6295
+ return referenced;
6296
+ }
6297
+ function hasUnresolvedSheetReferences(workbook) {
6298
+ let names;
6299
+ try {
6300
+ names = workbook.sheetNames;
6301
+ } catch {
6302
+ return false;
6303
+ }
6304
+ const known = new Set(names);
6305
+ const referenced = collectReferencedSheetNames(workbook);
6306
+ for (const name of referenced) {
6307
+ if (!known.has(name)) {
6308
+ return true;
6309
+ }
6310
+ }
6311
+ return false;
6312
+ }
6313
+ function safeCalculate(workbook, options = {}) {
6314
+ if (hasUnresolvedSheetReferences(workbook)) {
6315
+ return { workbook, calculated: false, skipReason: "unresolved-sheet-refs" };
6316
+ }
6317
+ try {
6318
+ workbook.calculate();
6319
+ return { workbook, calculated: true, skipReason: null };
6320
+ } catch (err) {
6321
+ console.warn("[react-xlsx] workbook.calculate() trapped; falling back to cached formula values", err);
6322
+ if (options.reparse) {
6323
+ try {
6324
+ return { workbook: options.reparse(), calculated: false, skipReason: "calculate-trapped" };
6325
+ } catch (reparseErr) {
6326
+ console.warn("[react-xlsx] workbook reparse after calculate trap failed", reparseErr);
6327
+ }
6328
+ }
6329
+ return { workbook, calculated: false, skipReason: "calculate-trapped" };
6330
+ }
6331
+ }
6332
+ function tryRecalculate(workbook) {
6333
+ try {
6334
+ workbook.calculate();
6335
+ return { calculated: true, error: null };
6336
+ } catch (err) {
6337
+ console.warn("[react-xlsx] workbook.calculate() trapped during recalculation", err);
6338
+ return { calculated: false, error: err };
6339
+ }
6340
+ }
6341
+
6264
6342
  // src/wasm.ts
6265
6343
  var wasmModulePromise = null;
6266
6344
  function getSheetsWasmModule() {
@@ -7068,18 +7146,21 @@ async function resolveWorkbookBuffer({ file, src }, signal) {
7068
7146
  }
7069
7147
  async function parseWorkbookBuffer(buffer) {
7070
7148
  const wasmModule = await getSheetsWasmModule();
7071
- const workbook = wasmModule.Workbook.fromBytes(new Uint8Array(buffer));
7149
+ const initialWorkbook = wasmModule.Workbook.fromBytes(new Uint8Array(buffer));
7072
7150
  let totalFormulas = 0;
7073
- for (let index = 0; index < workbook.sheetCount; index += 1) {
7074
- totalFormulas += workbook.getSheet(index).formulaCount;
7151
+ for (let index = 0; index < initialWorkbook.sheetCount; index += 1) {
7152
+ totalFormulas += initialWorkbook.getSheet(index).formulaCount;
7075
7153
  }
7076
7154
  const shouldAutoCalculate = totalFormulas <= FORMULA_COUNT_THRESHOLD;
7077
- if (shouldAutoCalculate) {
7078
- workbook.calculate();
7155
+ if (!shouldAutoCalculate) {
7156
+ return { shouldAutoCalculate, workbook: initialWorkbook };
7079
7157
  }
7158
+ const result = safeCalculate(initialWorkbook, {
7159
+ reparse: () => wasmModule.Workbook.fromBytes(new Uint8Array(buffer))
7160
+ });
7080
7161
  return {
7081
- shouldAutoCalculate,
7082
- workbook
7162
+ shouldAutoCalculate: result.calculated,
7163
+ workbook: result.workbook
7083
7164
  };
7084
7165
  }
7085
7166
  function scheduleLowPriorityTask(task) {
@@ -8320,7 +8401,10 @@ function useXlsxViewerController(options) {
8320
8401
  if (!shouldAutoCalculate) {
8321
8402
  return;
8322
8403
  }
8323
- targetWorkbook.calculate();
8404
+ const result = tryRecalculate(targetWorkbook);
8405
+ if (!result.calculated) {
8406
+ setShouldAutoCalculate(false);
8407
+ }
8324
8408
  }, [shouldAutoCalculate]);
8325
8409
  const getActiveWorksheet = React.useCallback(() => {
8326
8410
  if (!workbook || !activeSheet) {
@@ -8957,8 +9041,12 @@ function useXlsxViewerController(options) {
8957
9041
  if (!workbook) {
8958
9042
  return;
8959
9043
  }
8960
- workbook.calculate();
8961
- refreshWorkbookState(workbook);
9044
+ const result = tryRecalculate(workbook);
9045
+ if (result.calculated) {
9046
+ refreshWorkbookState(workbook);
9047
+ return;
9048
+ }
9049
+ setShouldAutoCalculate(false);
8962
9050
  }, [refreshWorkbookState, workbook]);
8963
9051
  const resizeColumn = React.useCallback((col, widthPx) => {
8964
9052
  if (readOnly && !canResizeReadOnly || !workbook || !activeSheet) {
@@ -20459,6 +20547,7 @@ function GridRow({
20459
20547
  actualRow,
20460
20548
  editingCell,
20461
20549
  editingValue,
20550
+ frozenRowHeaderZIndex,
20462
20551
  getCellData,
20463
20552
  headerLabelLiveScale,
20464
20553
  leadingSpacerWidth,
@@ -20475,6 +20564,7 @@ function GridRow({
20475
20564
  readOnly,
20476
20565
  renderCellAdornment,
20477
20566
  rowHeight,
20567
+ rowHeaderZIndex,
20478
20568
  rowHeaderWidth,
20479
20569
  stickyLeftByCol,
20480
20570
  stickyTop,
@@ -20507,7 +20597,7 @@ function GridRow({
20507
20597
  textAlign: "center",
20508
20598
  userSelect: "none",
20509
20599
  width: rowHeaderWidth,
20510
- zIndex: stickyTop !== void 0 ? 45 : 35
20600
+ zIndex: stickyTop !== void 0 ? frozenRowHeaderZIndex : rowHeaderZIndex
20511
20601
  },
20512
20602
  children: /* @__PURE__ */ jsxs3("div", { style: { position: "relative" }, children: [
20513
20603
  /* @__PURE__ */ jsx3(
@@ -20866,7 +20956,7 @@ function XlsxGrid({
20866
20956
  renderImageSelection,
20867
20957
  renderTableHeaderMenu,
20868
20958
  enableGestureZoom = true,
20869
- experimentalCanvas = false,
20959
+ experimentalCanvas = true,
20870
20960
  selectionColor,
20871
20961
  selectionFillColor,
20872
20962
  selectionHeaderColor,
@@ -22306,16 +22396,16 @@ function XlsxGrid({
22306
22396
  }, []);
22307
22397
  const resolvePointerCellFromClient = React4.useCallback((clientX, clientY) => {
22308
22398
  const geometryCell = resolvePointerCellFromGeometry(clientX, clientY);
22309
- if (geometryCell && !worksheet?.isMergedSecondary(geometryCell.row, geometryCell.col)) {
22310
- return resolveMergeAnchorCell(geometryCell);
22399
+ if (geometryCell) {
22400
+ return geometryCell;
22311
22401
  }
22312
- const resolvedCell = resolvePointerCellFromHitTest(clientX, clientY) ?? geometryCell;
22402
+ const resolvedCell = resolvePointerCellFromHitTest(clientX, clientY);
22313
22403
  return resolvedCell ? resolveMergeAnchorCell(resolvedCell) : null;
22314
- }, [resolveMergeAnchorCell, resolvePointerCellFromGeometry, resolvePointerCellFromHitTest, worksheet]);
22404
+ }, [resolveMergeAnchorCell, resolvePointerCellFromGeometry, resolvePointerCellFromHitTest]);
22315
22405
  const resolveDraggedSelectionCell = React4.useCallback((dragState, clientX, clientY) => {
22316
22406
  const geometryCell = resolvePointerCellFromGeometry(clientX, clientY);
22317
22407
  const hitCell = resolvePointerCellFromHitTest(clientX, clientY);
22318
- const actualRow = hitCell && rowIndexByActual.has(hitCell.row) ? hitCell.row : geometryCell?.row;
22408
+ const actualRow = geometryCell?.row ?? (hitCell && rowIndexByActual.has(hitCell.row) ? hitCell.row : void 0);
22319
22409
  const actualCol = geometryCell?.col ?? hitCell?.col;
22320
22410
  if (actualRow === void 0 || actualCol === void 0) {
22321
22411
  return null;
@@ -22326,8 +22416,8 @@ function XlsxGrid({
22326
22416
  if (dragState.axis === "column") {
22327
22417
  return { row: dragState.originCell.row, col: actualCol };
22328
22418
  }
22329
- return resolveMergeAnchorCell({ row: actualRow, col: actualCol });
22330
- }, [resolveMergeAnchorCell, resolvePointerCellFromGeometry, resolvePointerCellFromHitTest, rowIndexByActual]);
22419
+ return { row: actualRow, col: actualCol };
22420
+ }, [resolvePointerCellFromGeometry, resolvePointerCellFromHitTest, rowIndexByActual]);
22331
22421
  const resolveCellPointerOrigin = React4.useCallback((cell, rect, clientX, clientY) => {
22332
22422
  const rowIndex = rowIndexByActual.get(cell.row);
22333
22423
  const colIndex = colIndexByActual.get(cell.col);
@@ -22345,6 +22435,40 @@ function XlsxGrid({
22345
22435
  originContentY: (rowPrefixSums[rowIndex] ?? 0) + clampContentOffset((clientY - rect.top) / contentScaleY, displayHeight)
22346
22436
  };
22347
22437
  }, [colIndexByActual, colPrefixSums, displayDefaultColWidth, displayDefaultRowHeight, displayEffectiveColWidths, displayEffectiveRowHeights, rowIndexByActual, rowPrefixSums]);
22438
+ const resolveCellPointerOriginFromClient = React4.useCallback((cell, clientX, clientY) => {
22439
+ const scroller = scrollRef.current;
22440
+ const rowIndex = rowIndexByActual.get(cell.row);
22441
+ const colIndex = colIndexByActual.get(cell.col);
22442
+ if (!scroller || rowIndex === void 0 || colIndex === void 0) {
22443
+ return null;
22444
+ }
22445
+ const scrollerRect = cachedScrollerRectRef.current ?? scroller.getBoundingClientRect();
22446
+ const pointerOffsetX = clientX - scrollerRect.left;
22447
+ const pointerOffsetY = clientY - scrollerRect.top;
22448
+ const localX = pointerOffsetX + (pointerOffsetX >= frozenPaneRight ? scroller.scrollLeft : 0);
22449
+ const localY = pointerOffsetY + (pointerOffsetY >= frozenPaneBottom ? scroller.scrollTop : 0);
22450
+ const displayWidth = displayEffectiveColWidths[colIndex] ?? displayDefaultColWidth;
22451
+ const displayHeight = displayEffectiveRowHeights[rowIndex] ?? displayDefaultRowHeight;
22452
+ return {
22453
+ contentScaleX: 1,
22454
+ contentScaleY: 1,
22455
+ originContentX: (colPrefixSums[colIndex] ?? 0) + clampContentOffset(localX - displayRowHeaderWidth - (colPrefixSums[colIndex] ?? 0), displayWidth),
22456
+ originContentY: (rowPrefixSums[rowIndex] ?? 0) + clampContentOffset(localY - displayHeaderHeight - (rowPrefixSums[rowIndex] ?? 0), displayHeight)
22457
+ };
22458
+ }, [
22459
+ colIndexByActual,
22460
+ colPrefixSums,
22461
+ displayDefaultColWidth,
22462
+ displayDefaultRowHeight,
22463
+ displayEffectiveColWidths,
22464
+ displayEffectiveRowHeights,
22465
+ displayHeaderHeight,
22466
+ displayRowHeaderWidth,
22467
+ frozenPaneBottom,
22468
+ frozenPaneRight,
22469
+ rowIndexByActual,
22470
+ rowPrefixSums
22471
+ ]);
22348
22472
  const resolveRowPointerOrigin = React4.useCallback((actualRow, rect, clientY) => {
22349
22473
  const rowIndex = rowIndexByActual.get(actualRow);
22350
22474
  if (rowIndex === void 0) {
@@ -23093,10 +23217,11 @@ function XlsxGrid({
23093
23217
  }, [resolveMountedCellOverlayRect]);
23094
23218
  const resolveGeometryOverlayRect = React4.useCallback((range) => {
23095
23219
  const normalized = normalizeRange2(range);
23096
- const startCell = resolveMergeAnchorCell(normalized.start);
23097
23220
  const isSingleCellSelection = normalized.start.row === normalized.end.row && normalized.start.col === normalized.end.col;
23098
- const merge = isSingleCellSelection ? worksheet?.getMergeSpan(startCell.row, startCell.col) : null;
23099
- const endCell = isSingleCellSelection ? {
23221
+ const isMergedSecondarySelection = isSingleCellSelection ? worksheet?.isMergedSecondary(normalized.start.row, normalized.start.col) === true : false;
23222
+ const startCell = isSingleCellSelection && !isMergedSecondarySelection ? resolveMergeAnchorCell(normalized.start) : normalized.start;
23223
+ const merge = isSingleCellSelection && !isMergedSecondarySelection ? worksheet?.getMergeSpan(startCell.row, startCell.col) : null;
23224
+ const endCell = isSingleCellSelection && !isMergedSecondarySelection ? {
23100
23225
  row: startCell.row + Math.max(1, merge?.rowSpan ?? 1) - 1,
23101
23226
  col: startCell.col + Math.max(1, merge?.colSpan ?? 1) - 1
23102
23227
  } : normalized.end;
@@ -23728,13 +23853,14 @@ function XlsxGrid({
23728
23853
  }
23729
23854
  event.preventDefault();
23730
23855
  focusGrid();
23856
+ const targetCell = event.currentTarget.colSpan > 1 || event.currentTarget.rowSpan > 1 ? resolvePointerCellFromGeometry(event.clientX, event.clientY) ?? cell : cell;
23731
23857
  const currentSelection = selectionRef.current;
23732
- const anchor = event.shiftKey && currentSelection ? currentSelection.start : cell;
23733
- const initialRange = normalizeRange2({ start: anchor, end: cell });
23734
- const isActive = isSameCell(activeCellRef.current, cell);
23858
+ const anchor = event.shiftKey && currentSelection ? currentSelection.start : targetCell;
23859
+ const initialRange = normalizeRange2({ start: anchor, end: targetCell });
23860
+ const isActive = isSameCell(activeCellRef.current, targetCell);
23735
23861
  const committedOnPointerDown = !isActive || !editingCellRef.current;
23736
- const pointerOrigin = resolveCellPointerOrigin(cell, event.currentTarget.getBoundingClientRect(), event.clientX, event.clientY);
23737
- const originOverlayRect = resolveMountedCellOverlayRect(event.currentTarget);
23862
+ const pointerOrigin = targetCell.row === cell.row && targetCell.col === cell.col ? resolveCellPointerOrigin(cell, event.currentTarget.getBoundingClientRect(), event.clientX, event.clientY) : resolveCellPointerOriginFromClient(targetCell, event.clientX, event.clientY);
23863
+ const originOverlayRect = targetCell.row === cell.row && targetCell.col === cell.col ? resolveMountedCellOverlayRect(event.currentTarget) : resolveOverlayRect(initialRange);
23738
23864
  if (!pointerOrigin) {
23739
23865
  return;
23740
23866
  }
@@ -23742,7 +23868,7 @@ function XlsxGrid({
23742
23868
  event.pointerId,
23743
23869
  anchor,
23744
23870
  "cell",
23745
- cell,
23871
+ targetCell,
23746
23872
  pointerOrigin,
23747
23873
  originOverlayRect,
23748
23874
  committedOnPointerDown,
@@ -23750,11 +23876,25 @@ function XlsxGrid({
23750
23876
  event.clientX,
23751
23877
  event.clientY
23752
23878
  );
23753
- applyPreviewOverlayFromElement(event.currentTarget, initialRange);
23879
+ if (targetCell.row === cell.row && targetCell.col === cell.col) {
23880
+ applyPreviewOverlayFromElement(event.currentTarget, initialRange);
23881
+ } else {
23882
+ applyPreviewOverlay(initialRange);
23883
+ }
23754
23884
  if (committedOnPointerDown) {
23755
23885
  commitSelectionRange(initialRange);
23756
23886
  }
23757
- }, [applyPreviewOverlayFromElement, commitSelectionRange, focusGrid, resolveCellPointerOrigin, resolveMountedCellOverlayRect]);
23887
+ }, [
23888
+ applyPreviewOverlay,
23889
+ applyPreviewOverlayFromElement,
23890
+ commitSelectionRange,
23891
+ focusGrid,
23892
+ resolveCellPointerOrigin,
23893
+ resolveCellPointerOriginFromClient,
23894
+ resolveMountedCellOverlayRect,
23895
+ resolveOverlayRect,
23896
+ resolvePointerCellFromGeometry
23897
+ ]);
23758
23898
  const handleRowPointerDown = React4.useCallback((event, actualRow) => {
23759
23899
  if (event.button !== 0 || firstVisibleCol === void 0 || lastVisibleCol === void 0) {
23760
23900
  return;
@@ -24971,7 +25111,7 @@ function XlsxGrid({
24971
25111
  paneContext.textBaseline = "middle";
24972
25112
  paneContext.fillText(`${row.actualRow + 1}`, rowHeaderWidth / 2, row.localTop + row.height / 2);
24973
25113
  }
24974
- cornerContext.fillStyle = palette.rowHeaderSurface;
25114
+ cornerContext.fillStyle = palette.headerSurface;
24975
25115
  cornerContext.fillRect(0, 0, rowHeaderWidth, headerHeight);
24976
25116
  cornerContext.strokeStyle = palette.border;
24977
25117
  cornerContext.lineWidth = 1;
@@ -25254,7 +25394,18 @@ function XlsxGrid({
25254
25394
  const canvasSelectionTransition = shouldAnimateCanvasSelection ? "left 120ms cubic-bezier(0.22, 1, 0.36, 1), top 120ms cubic-bezier(0.22, 1, 0.36, 1), width 120ms cubic-bezier(0.22, 1, 0.36, 1), height 120ms cubic-bezier(0.22, 1, 0.36, 1), opacity 100ms linear" : "none";
25255
25395
  const rowColSpan = renderedCols.length + 1 + (leadingColumnSpacerWidth > 0 ? 1 : 0) + (trailingColumnSpacerWidth > 0 ? 1 : 0);
25256
25396
  const gutterSeparatorShadow = `inset -1px 0 0 ${palette.border}, inset 0 -1px 0 ${palette.border}`;
25257
- const canvasHeaderOverlayZIndex = 1e5;
25397
+ const maxDrawingOverlayZIndex = Math.max(
25398
+ 0,
25399
+ ...shapes.map((shape) => shape.zIndex + 20),
25400
+ ...formControls.map((control) => control.zIndex + 20),
25401
+ ...images.map((image) => image.zIndex + 22),
25402
+ ...charts.map((chart) => chart.zIndex + 22)
25403
+ );
25404
+ const rowHeaderOverlayZIndex = Math.max(35, maxDrawingOverlayZIndex + 1);
25405
+ const canvasHeaderOverlayZIndex = Math.max(50, rowHeaderOverlayZIndex + 1);
25406
+ const stickyHeaderOverlayZIndex = canvasHeaderOverlayZIndex + 1;
25407
+ const cornerHeaderOverlayZIndex = canvasHeaderOverlayZIndex + 2;
25408
+ const frozenRowHeaderOverlayZIndex = rowHeaderOverlayZIndex;
25258
25409
  const headerCellStyle = scaleCssProperties({
25259
25410
  backgroundColor: palette.headerSurface,
25260
25411
  borderBottom: "none",
@@ -25271,7 +25422,7 @@ function XlsxGrid({
25271
25422
  top: 0,
25272
25423
  userSelect: "none",
25273
25424
  whiteSpace: "nowrap",
25274
- zIndex: 50
25425
+ zIndex: canvasHeaderOverlayZIndex
25275
25426
  }, zoomFactor);
25276
25427
  const columnResizeHandleStyle = scaleCssProperties({
25277
25428
  backgroundColor: "transparent",
@@ -25360,7 +25511,7 @@ function XlsxGrid({
25360
25511
  display: topFrozenHeaderCanvasWidth > 0 && drawingViewport.height > 0 ? "block" : "none",
25361
25512
  left: displayRowHeaderWidth,
25362
25513
  top: 0,
25363
- zIndex: canvasHeaderOverlayZIndex + 1
25514
+ zIndex: stickyHeaderOverlayZIndex
25364
25515
  };
25365
25516
  const canvasTopScrollHeaderStyle = {
25366
25517
  ...canvasHeaderBaseStyle,
@@ -25374,7 +25525,7 @@ function XlsxGrid({
25374
25525
  display: leftFrozenHeaderCanvasHeight > 0 && drawingViewport.width > 0 ? "block" : "none",
25375
25526
  left: 0,
25376
25527
  top: displayHeaderHeight,
25377
- zIndex: canvasHeaderOverlayZIndex + 1
25528
+ zIndex: stickyHeaderOverlayZIndex
25378
25529
  };
25379
25530
  const canvasLeftScrollHeaderStyle = {
25380
25531
  ...canvasHeaderBaseStyle,
@@ -25390,7 +25541,7 @@ function XlsxGrid({
25390
25541
  position: "absolute",
25391
25542
  top: 0,
25392
25543
  transformOrigin: "0 0",
25393
- zIndex: canvasHeaderOverlayZIndex + 1
25544
+ zIndex: cornerHeaderOverlayZIndex
25394
25545
  };
25395
25546
  const editingOverlayRect = experimentalCanvas && editingCell ? resolveCellDisplayRect(editingCell) : null;
25396
25547
  const activeCellAdornment = experimentalCanvas && activeCell ? renderCellAdornment(activeCell) : null;
@@ -26724,7 +26875,7 @@ function XlsxGrid({
26724
26875
  )),
26725
26876
  trailingColumnSpacerWidth > 0 ? /* @__PURE__ */ jsx3("col", { style: { width: trailingColumnSpacerWidth } }) : null
26726
26877
  ] }),
26727
- /* @__PURE__ */ jsx3("thead", { style: { position: "sticky", top: 0, zIndex: 50 }, children: /* @__PURE__ */ jsxs3("tr", { children: [
26878
+ /* @__PURE__ */ jsx3("thead", { style: { position: "sticky", top: 0, zIndex: canvasHeaderOverlayZIndex }, children: /* @__PURE__ */ jsxs3("tr", { children: [
26728
26879
  /* @__PURE__ */ jsx3(
26729
26880
  "th",
26730
26881
  {
@@ -26733,7 +26884,7 @@ function XlsxGrid({
26733
26884
  backgroundColor: palette.headerSurface,
26734
26885
  left: 0,
26735
26886
  width: displayRowHeaderWidth,
26736
- zIndex: 60
26887
+ zIndex: cornerHeaderOverlayZIndex
26737
26888
  }
26738
26889
  }
26739
26890
  ),
@@ -26747,7 +26898,7 @@ function XlsxGrid({
26747
26898
  style: {
26748
26899
  ...headerCellStyle,
26749
26900
  left: stickyLeftByCol.get(column.actualCol),
26750
- zIndex: stickyLeftByCol.has(column.actualCol) ? 55 : headerCellStyle.zIndex
26901
+ zIndex: stickyLeftByCol.has(column.actualCol) ? stickyHeaderOverlayZIndex : headerCellStyle.zIndex
26751
26902
  },
26752
26903
  children: /* @__PURE__ */ jsxs3("div", { style: { position: "relative" }, children: [
26753
26904
  /* @__PURE__ */ jsx3(
@@ -26802,6 +26953,7 @@ function XlsxGrid({
26802
26953
  actualRow,
26803
26954
  editingCell,
26804
26955
  editingValue,
26956
+ frozenRowHeaderZIndex: frozenRowHeaderOverlayZIndex,
26805
26957
  getCellData,
26806
26958
  leadingSpacerWidth: leadingColumnSpacerWidth,
26807
26959
  onCellClick: handleCellClick,
@@ -26818,6 +26970,7 @@ function XlsxGrid({
26818
26970
  readOnly,
26819
26971
  renderCellAdornment,
26820
26972
  rowHeight: virtualRow.size,
26973
+ rowHeaderZIndex: rowHeaderOverlayZIndex,
26821
26974
  rowHeaderWidth: displayRowHeaderWidth,
26822
26975
  stickyLeftByCol,
26823
26976
  stickyTop: stickyTopByRow.get(actualRow),
@@ -26986,7 +27139,7 @@ function XlsxViewerInner({
26986
27139
  enableCanvasSelectionAnimation = true,
26987
27140
  enableGestureZoom = true,
26988
27141
  errorState,
26989
- experimentalCanvas = false,
27142
+ experimentalCanvas = true,
26990
27143
  fileTooLargeState,
26991
27144
  height,
26992
27145
  isDark = false,