@extend-ai/react-xlsx 0.16.4 → 0.16.5

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
@@ -11744,6 +11744,12 @@ function resolveCellTextClipOverscan(overscan, usesWrappedText) {
11744
11744
  };
11745
11745
  }
11746
11746
 
11747
+ // src/scroll-display-limit.ts
11748
+ function growScrollDisplayLimit(current, growth, maximum, readOnly) {
11749
+ const nextLimit = current + growth;
11750
+ return readOnly ? Math.max(current, Math.min(maximum, nextLimit)) : nextLimit;
11751
+ }
11752
+
11747
11753
  // src/chart-renderer.tsx
11748
11754
  import { hierarchy as d3Hierarchy, partition as d3Partition, treemap as d3Treemap, treemapBinary, treemapDice } from "d3-hierarchy";
11749
11755
  import { geoIdentity, geoMercator, geoNaturalEarth1, geoPath } from "d3-geo";
@@ -25510,16 +25516,14 @@ function XlsxGrid({
25510
25516
  const shouldSyncDrawingViewportImmediately = Math.abs(currentScroller.scrollLeft - paintedViewport.left) > CANVAS_IMMEDIATE_VIEWPORT_SYNC_THRESHOLD_PX || Math.abs(currentScroller.scrollTop - paintedViewport.top) > CANVAS_IMMEDIATE_VIEWPORT_SYNC_THRESHOLD_PX;
25511
25517
  syncDrawingViewport(currentScroller, { immediate: shouldSyncDrawingViewportImmediately });
25512
25518
  if (currentScroller.scrollHeight - (currentScroller.scrollTop + currentScroller.clientHeight) < OPEN_GRID_VERTICAL_EDGE_PX) {
25513
- setDisplayRowLimit((current) => {
25514
- const nextLimit = current + OPEN_GRID_ROW_GROWTH;
25515
- return readOnly && current < maxRowDisplayLimit ? Math.min(maxRowDisplayLimit, nextLimit) : nextLimit;
25516
- });
25519
+ setDisplayRowLimit(
25520
+ (current) => growScrollDisplayLimit(current, OPEN_GRID_ROW_GROWTH, maxRowDisplayLimit, readOnly)
25521
+ );
25517
25522
  }
25518
25523
  if (currentScroller.scrollWidth - (currentScroller.scrollLeft + currentScroller.clientWidth) < OPEN_GRID_HORIZONTAL_EDGE_PX) {
25519
- setDisplayColLimit((current) => {
25520
- const nextLimit = current + OPEN_GRID_COL_GROWTH;
25521
- return readOnly && current < maxColDisplayLimit ? Math.min(maxColDisplayLimit, nextLimit) : nextLimit;
25522
- });
25524
+ setDisplayColLimit(
25525
+ (current) => growScrollDisplayLimit(current, OPEN_GRID_COL_GROWTH, maxColDisplayLimit, readOnly)
25526
+ );
25523
25527
  }
25524
25528
  }, [maxColDisplayLimit, maxRowDisplayLimit, readOnly, syncDrawingViewport]);
25525
25529
  React4.useEffect(() => {