@extend-ai/react-xlsx 0.16.5 → 0.16.6

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/README.md CHANGED
@@ -385,6 +385,22 @@ export function CustomWorkbook({ file }: { file: ArrayBuffer }) {
385
385
 
386
386
  Apply `triggerProps` to the table-header trigger button so clicks do not leak into grid selection.
387
387
 
388
+ Use `renderActiveCellOverlay` to render your own content over the active cell. The returned node sits in a container that exactly covers the cell (the full merge for merged cells) and moves with scrolling and zoom, so you can attach classes, data attributes, or a ref and measure it with `getBoundingClientRect()`. The container ignores pointer events; set `pointerEvents: "auto"` on your own elements to make them interactive.
389
+
390
+ ```tsx
391
+ <XlsxViewer
392
+ file={file}
393
+ renderActiveCellOverlay={({ cell }) => (
394
+ <div
395
+ ref={activeCellRef}
396
+ className="active-cell-anchor"
397
+ data-active-cell={`${cell.row}:${cell.col}`}
398
+ style={{ height: "100%", width: "100%" }}
399
+ />
400
+ )}
401
+ />
402
+ ```
403
+
388
404
  Use `renderFormControl` to replace the built-in worksheet widgets. The callback receives the parsed `control`, resolved `items` and `label`, calculated `style`, read-only state, and `activate`, `setState`, `setSelected`, and `setValue` helpers. Apply `style` to the custom root and call `stopPropagation` from pointer/click handlers. The helpers keep Duke mutations, linked cells, undo/redo, export, and `onFormControlChange` in sync.
389
405
 
390
406
  ```tsx
@@ -491,6 +507,7 @@ Common rendering props:
491
507
  - `renderChartLoading?: (props: XlsxChartLoadingRenderProps) => React.ReactNode`
492
508
  - `renderFormControl?: (props: XlsxFormControlRenderProps) => React.ReactNode`
493
509
  - `renderTableHeaderMenu?: (props: XlsxTableHeaderMenuRenderProps) => React.ReactNode`
510
+ - `renderActiveCellOverlay?: (props: XlsxActiveCellOverlayRenderProps) => React.ReactNode`
494
511
  - `renderScroller?: (props: XlsxScrollerRenderProps) => React.ReactNode`
495
512
 
496
513
  ### Persisted Cell Styling
@@ -662,6 +679,7 @@ The package exports the main types you are likely to use for custom integrations
662
679
  - `XlsxImage`, `XlsxImageRect`, `XlsxImageRenderProps`, `XlsxImageSelectionRenderProps`
663
680
  - `XlsxFormControl`, `XlsxFormControlInput`, `XlsxFormControlCaption`, `XlsxFormControlCaptionInput`, `XlsxFormControlCaptionRun`, `XlsxFormControlRenderProps`
664
681
  - `XlsxTable`, `XlsxTableColumn`, `XlsxTableHeaderMenuRenderProps`
682
+ - `XlsxActiveCellOverlayRenderProps`
665
683
  - `XlsxWorkbookTab`, `XlsxCellAddress`, `XlsxCellRange`
666
684
 
667
685
  ## License