@extend-ai/react-xlsx 0.18.1 → 0.20.0

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.
Files changed (72) hide show
  1. package/README.md +154 -6
  2. package/dist/chart-renderer-AAVZ34BF.cjs +5048 -0
  3. package/dist/chart-renderer-AAVZ34BF.cjs.map +1 -0
  4. package/dist/{chart-renderer-HQSQHDCB.js → chart-renderer-KGLAI4DN.js} +25 -20
  5. package/dist/chart-renderer-KGLAI4DN.js.map +1 -0
  6. package/dist/{chart-renderer-ZUWRNNZT.cjs → chart-renderer-NM5UVCTO.cjs} +44 -39
  7. package/dist/chart-renderer-NM5UVCTO.cjs.map +1 -0
  8. package/dist/chart-renderer-RXO7WP4Q.js +5047 -0
  9. package/dist/chart-renderer-RXO7WP4Q.js.map +1 -0
  10. package/dist/chunk-2YBG7XQ3.cjs +26981 -0
  11. package/dist/chunk-2YBG7XQ3.cjs.map +1 -0
  12. package/dist/chunk-3JTCYAUX.js +50 -0
  13. package/dist/{chunk-OZLJPZUX.js.map → chunk-3JTCYAUX.js.map} +1 -1
  14. package/dist/chunk-6K3NSKDJ.cjs +50 -0
  15. package/dist/chunk-6K3NSKDJ.cjs.map +1 -0
  16. package/dist/chunk-CJBI5F6V.cjs +816 -0
  17. package/dist/chunk-CJBI5F6V.cjs.map +1 -0
  18. package/dist/{chunk-WFQGZI2Z.cjs → chunk-MCFUTO4J.cjs} +12 -8
  19. package/dist/chunk-MCFUTO4J.cjs.map +1 -0
  20. package/dist/chunk-NBH72POD.js +816 -0
  21. package/dist/chunk-NBH72POD.js.map +1 -0
  22. package/dist/{chunk-E2VSYCP2.cjs → chunk-O3V2MCOC.cjs} +18 -2
  23. package/dist/chunk-O3V2MCOC.cjs.map +1 -0
  24. package/dist/chunk-QN3D3JS2.js +26978 -0
  25. package/dist/chunk-QN3D3JS2.js.map +1 -0
  26. package/dist/{chunk-FO6MIHX4.cjs → chunk-T5WZHPIN.cjs} +2 -2
  27. package/dist/{chunk-FO6MIHX4.cjs.map → chunk-T5WZHPIN.cjs.map} +1 -1
  28. package/dist/{chunk-BAAMDEDS.js → chunk-VXBNYHW5.js} +18 -2
  29. package/dist/{chunk-BAAMDEDS.js.map → chunk-VXBNYHW5.js.map} +1 -1
  30. package/dist/{chunk-OZLJPZUX.js → chunk-WSQDFXDW.js} +10 -6
  31. package/dist/chunk-WSQDFXDW.js.map +1 -0
  32. package/dist/index.cjs +600 -11270
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.d.cts +5 -14
  35. package/dist/index.d.ts +5 -14
  36. package/dist/index.js +479 -11149
  37. package/dist/index.js.map +1 -1
  38. package/dist/internal-DrXSHYJZ.d.cts +1498 -0
  39. package/dist/internal-DrXSHYJZ.d.ts +1498 -0
  40. package/dist/internal.cjs +24 -0
  41. package/dist/internal.cjs.map +1 -0
  42. package/dist/internal.d.cts +3 -0
  43. package/dist/internal.d.ts +3 -0
  44. package/dist/internal.js +23 -0
  45. package/dist/internal.js.map +1 -0
  46. package/dist/{region-map-geography-5E5SVPGS.cjs → region-map-geography-6TGXBY3V.cjs} +2 -2
  47. package/dist/{region-map-geography-5E5SVPGS.cjs.map → region-map-geography-6TGXBY3V.cjs.map} +1 -1
  48. package/dist/{spreadsheet-font-assets-7QMV43XD.cjs → spreadsheet-font-assets-4AHYDTAQ.cjs} +2 -2
  49. package/dist/{spreadsheet-font-assets-7QMV43XD.cjs.map → spreadsheet-font-assets-4AHYDTAQ.cjs.map} +1 -1
  50. package/dist/{surface-regl-WVLW3SEA.cjs → surface-regl-5Z6IVOID.cjs} +18 -15
  51. package/dist/surface-regl-5Z6IVOID.cjs.map +1 -0
  52. package/dist/{surface-regl-NWR5ZZ5D.js → surface-regl-7CDGGVDG.js} +10 -7
  53. package/dist/surface-regl-7CDGGVDG.js.map +1 -0
  54. package/dist/surface-regl-AY7JZVYY.cjs +727 -0
  55. package/dist/surface-regl-AY7JZVYY.cjs.map +1 -0
  56. package/dist/surface-regl-TJUWTLAZ.js +726 -0
  57. package/dist/surface-regl-TJUWTLAZ.js.map +1 -0
  58. package/dist/vanilla.cjs +20 -0
  59. package/dist/vanilla.cjs.map +1 -0
  60. package/dist/vanilla.d.cts +9 -0
  61. package/dist/vanilla.d.ts +9 -0
  62. package/dist/vanilla.js +19 -0
  63. package/dist/vanilla.js.map +1 -0
  64. package/dist/xlsx-worker.js +2888 -34
  65. package/dist/xlsx-worker.js.map +1 -1
  66. package/package.json +23 -3
  67. package/dist/chart-renderer-HQSQHDCB.js.map +0 -1
  68. package/dist/chart-renderer-ZUWRNNZT.cjs.map +0 -1
  69. package/dist/chunk-E2VSYCP2.cjs.map +0 -1
  70. package/dist/chunk-WFQGZI2Z.cjs.map +0 -1
  71. package/dist/surface-regl-NWR5ZZ5D.js.map +0 -1
  72. package/dist/surface-regl-WVLW3SEA.cjs.map +0 -1
@@ -0,0 +1,1498 @@
1
+ import * as _dukelib_sheets_wasm from '@dukelib/sheets-wasm';
2
+ import { Workbook, Worksheet } from '@dukelib/sheets-wasm';
3
+ import { Properties } from 'csstype';
4
+
5
+ interface XlsxThemePalette {
6
+ colorsByIndex: Record<number, string>;
7
+ majorLatinFont?: string;
8
+ minorLatinFont?: string;
9
+ }
10
+ interface XlsxResolvedCellStyle {
11
+ [key: string]: unknown;
12
+ alignment?: Record<string, unknown>;
13
+ border?: Record<string, Record<string, unknown>>;
14
+ cellControl?: {
15
+ kind: "checkbox";
16
+ };
17
+ fill?: Record<string, unknown>;
18
+ font?: Record<string, unknown>;
19
+ tableStyleOverrides?: XlsxResolvedCellStyle;
20
+ }
21
+ interface XlsxTableStyleDefinition {
22
+ [elementType: string]: XlsxResolvedCellStyle;
23
+ }
24
+ interface XlsxConditionalFormatValueObject {
25
+ type: string;
26
+ value?: number;
27
+ }
28
+ interface XlsxConditionalDataBarRule {
29
+ axisColor?: Record<string, unknown>;
30
+ border?: boolean;
31
+ color?: Record<string, unknown>;
32
+ borderColor?: Record<string, unknown>;
33
+ cfvos: XlsxConditionalFormatValueObject[];
34
+ gradient?: boolean;
35
+ kind: "dataBar";
36
+ maxLength?: number;
37
+ minLength?: number;
38
+ negativeBarBorderColorSameAsPositive?: boolean;
39
+ negativeBorderColor?: Record<string, unknown>;
40
+ negativeFillColor?: Record<string, unknown>;
41
+ priority: number;
42
+ ranges: XlsxCellRange[];
43
+ showValue?: boolean;
44
+ }
45
+ interface XlsxConditionalColorScaleRule {
46
+ cfvos: XlsxConditionalFormatValueObject[];
47
+ colors: Record<string, unknown>[];
48
+ kind: "colorScale";
49
+ priority: number;
50
+ ranges: XlsxCellRange[];
51
+ }
52
+ interface XlsxConditionalFormatIcon {
53
+ iconId: number;
54
+ iconSet: string;
55
+ }
56
+ interface XlsxConditionalIconSetRule {
57
+ cfvos: XlsxConditionalFormatValueObject[];
58
+ icons: XlsxConditionalFormatIcon[];
59
+ kind: "iconSet";
60
+ priority: number;
61
+ ranges: XlsxCellRange[];
62
+ reverse?: boolean;
63
+ showValue?: boolean;
64
+ }
65
+ interface XlsxConditionalStyledRule {
66
+ aboveAverage?: boolean;
67
+ bottom?: boolean;
68
+ equalAverage?: boolean;
69
+ formulas: string[];
70
+ kind: "styled";
71
+ operator?: string;
72
+ percent?: boolean;
73
+ priority: number;
74
+ rank?: number;
75
+ ranges: XlsxCellRange[];
76
+ ruleType: string;
77
+ stdDev?: number;
78
+ stopIfTrue?: boolean;
79
+ style: XlsxResolvedCellStyle;
80
+ text?: string;
81
+ timePeriod?: string;
82
+ }
83
+ type XlsxConditionalFormatRule = XlsxConditionalColorScaleRule | XlsxConditionalStyledRule | XlsxConditionalDataBarRule | XlsxConditionalIconSetRule;
84
+ interface XlsxDataValidation {
85
+ allowBlank?: boolean;
86
+ errorMessage?: string;
87
+ errorStyle?: string;
88
+ inputMessage?: string;
89
+ listSource?: string;
90
+ ranges: XlsxCellRange[];
91
+ showDropdown?: boolean;
92
+ showErrorAlert?: boolean;
93
+ showInputMessage?: boolean;
94
+ validationType: string;
95
+ }
96
+ interface XlsxFreezePanes {
97
+ col: number;
98
+ row: number;
99
+ }
100
+ type XlsxSheetVisibility = "hidden" | "veryHidden" | "visible";
101
+ interface XlsxSheetData {
102
+ cellStyleIds?: Record<string, number>;
103
+ autoFilterRanges: XlsxCellRange[];
104
+ cachedFormulaValues: Record<string, string>;
105
+ colWidthOverridesPx: Record<number, number>;
106
+ colStyleIds: Record<number, number>;
107
+ hiddenCols?: number[];
108
+ hiddenRows?: number[];
109
+ conditionalFormatRules: XlsxConditionalFormatRule[];
110
+ dataValidations: XlsxDataValidation[];
111
+ name: string;
112
+ visibility: XlsxSheetVisibility;
113
+ columnWidthCharacterWidthPx?: number;
114
+ defaultColWidthPx: number;
115
+ defaultRowHeightPx: number;
116
+ freezePanes: XlsxFreezePanes | null;
117
+ hasHorizontalMerges: boolean;
118
+ hasVerticalMerges: boolean;
119
+ maxHorizontalMergeEndCol: number;
120
+ maxVerticalMergeEndRow: number;
121
+ mergedRanges?: XlsxCellRange[];
122
+ minUsedCol: number;
123
+ minUsedRow: number;
124
+ maxUsedCol: number;
125
+ maxUsedRow: number;
126
+ rowCount: number;
127
+ colCount: number;
128
+ rowHeightOverridesPx: Record<number, number>;
129
+ rowStyleIds: Record<number, number>;
130
+ namedCellStyleByName: Record<string, XlsxResolvedCellStyle>;
131
+ styleById: Record<number, XlsxResolvedCellStyle>;
132
+ tableStyleByName: Record<string, XlsxTableStyleDefinition>;
133
+ visibleRows: number[];
134
+ visibleCols: number[];
135
+ colWidths: number[];
136
+ rowHeights: number[];
137
+ showGridLines: boolean;
138
+ sparklines: XlsxSparkline[];
139
+ themePalette: XlsxThemePalette;
140
+ workbookSheetIndex: number;
141
+ zoomScale?: number;
142
+ }
143
+ interface XlsxCellAddress {
144
+ col: number;
145
+ row: number;
146
+ }
147
+ interface XlsxCellRange {
148
+ end: XlsxCellAddress;
149
+ start: XlsxCellAddress;
150
+ }
151
+ type XlsxMergeMode = "cells" | "center" | "across";
152
+ interface XlsxParsedRange {
153
+ kind: "cells" | "rows" | "columns";
154
+ range: XlsxCellRange;
155
+ sheetName: string | null;
156
+ }
157
+ interface XlsxHighlightRangeOptions {
158
+ /** Navigates to the worksheet and reveals the first range. Defaults to true. */
159
+ autoScroll?: boolean;
160
+ /** Visible worksheet index for an unqualified reference. Defaults to the active worksheet. */
161
+ sheetIndex?: number;
162
+ }
163
+ interface XlsxRangeHighlight extends XlsxParsedRange {
164
+ /** Whether this entry is the navigation target for the current highlight update. */
165
+ autoScroll: boolean;
166
+ sheetName: string;
167
+ workbookSheetIndex: number;
168
+ }
169
+ /**
170
+ * Color value accepted by persisted workbook style mutation APIs.
171
+ *
172
+ * Use `rgb` with a six-character `hex` value such as `"2563EB"` for the
173
+ * simplest browser-to-Excel mapping. `argb`, `theme`, and `indexed` are
174
+ * available for callers that need to preserve Excel-native color references.
175
+ */
176
+ interface XlsxCellStyleColorInput {
177
+ /** Excel color representation to write. Defaults are handled by the workbook engine. */
178
+ colorType?: "auto" | "rgb" | "argb" | "theme" | "indexed";
179
+ /** Hex color string, for example `"2563EB"` for RGB or `"FF2563EB"` for ARGB. */
180
+ hex?: string;
181
+ /** Red channel, 0-255. */
182
+ r?: number;
183
+ /** Green channel, 0-255. */
184
+ g?: number;
185
+ /** Blue channel, 0-255. */
186
+ b?: number;
187
+ /** Alpha channel, 0-255, used by ARGB colors. */
188
+ a?: number;
189
+ /** Theme color index for Excel theme colors. */
190
+ themeIndex?: number;
191
+ /** Theme tint/shade adjustment. */
192
+ tint?: number;
193
+ /** Indexed color palette entry. */
194
+ paletteIndex?: number;
195
+ }
196
+ /** Font styling to persist on a cell or range. */
197
+ interface XlsxCellFontStyleInput {
198
+ /** Font face name, such as `"Aptos"` or `"Calibri"`. */
199
+ name?: string;
200
+ /** Font size in points. */
201
+ size?: number;
202
+ /** Whether the font is bold. */
203
+ bold?: boolean;
204
+ /** Whether the font is italic. */
205
+ italic?: boolean;
206
+ /** Underline style. */
207
+ underline?: "none" | "single" | "double" | "singleAccounting" | "doubleAccounting";
208
+ /** Whether the font is struck through. */
209
+ strikethrough?: boolean;
210
+ /** Font color. */
211
+ color?: XlsxCellStyleColorInput;
212
+ /** Baseline, superscript, or subscript positioning. */
213
+ verticalAlign?: "baseline" | "superscript" | "subscript";
214
+ /** Excel font family classification. */
215
+ family?: number;
216
+ /** Font charset identifier. */
217
+ charset?: number;
218
+ /** Excel font scheme value. */
219
+ scheme?: string;
220
+ }
221
+ /** A color stop used by gradient fills. */
222
+ interface XlsxCellGradientStopInput {
223
+ /** Stop position from 0 to 1. */
224
+ position: number;
225
+ /** Stop color. */
226
+ color: XlsxCellStyleColorInput;
227
+ }
228
+ /** Fill styling to persist on a cell or range. */
229
+ interface XlsxCellFillStyleInput {
230
+ /** Fill type. Use `"solid"` with `color` for typical Excel fill color. */
231
+ fillType?: "none" | "solid" | "pattern" | "gradient";
232
+ /** Primary fill color. */
233
+ color?: XlsxCellStyleColorInput;
234
+ /** Excel pattern name for pattern fills. */
235
+ pattern?: string;
236
+ /** Foreground color for pattern fills. */
237
+ foreground?: XlsxCellStyleColorInput;
238
+ /** Background color for pattern fills. */
239
+ background?: XlsxCellStyleColorInput;
240
+ /** Gradient type for gradient fills. */
241
+ gradientType?: "linear" | "path";
242
+ /** Gradient angle in degrees. */
243
+ angle?: number;
244
+ /** Gradient color stops. */
245
+ stops?: XlsxCellGradientStopInput[];
246
+ }
247
+ /** A single border edge style. */
248
+ interface XlsxCellBorderEdgeInput {
249
+ /** Excel border line style. */
250
+ style?: "none" | "thin" | "medium" | "thick" | "dashed" | "dotted" | "double" | "hair" | "mediumDashed" | "dashDot" | "mediumDashDot" | "dashDotDot" | "mediumDashDotDot" | "slantDashDot";
251
+ /** Border line color. */
252
+ color?: XlsxCellStyleColorInput;
253
+ }
254
+ /** Border styling to persist on a cell or range. */
255
+ interface XlsxCellBorderStyleInput {
256
+ /** Left border edge. */
257
+ left?: XlsxCellBorderEdgeInput;
258
+ /** Right border edge. */
259
+ right?: XlsxCellBorderEdgeInput;
260
+ /** Top border edge. */
261
+ top?: XlsxCellBorderEdgeInput;
262
+ /** Bottom border edge. */
263
+ bottom?: XlsxCellBorderEdgeInput;
264
+ /** Diagonal border edge. */
265
+ diagonal?: XlsxCellBorderEdgeInput;
266
+ /** Diagonal border direction. */
267
+ diagonalDirection?: "none" | "down" | "up" | "both";
268
+ }
269
+ /** Alignment styling to persist on a cell or range. */
270
+ interface XlsxCellAlignmentInput {
271
+ /** Horizontal alignment. */
272
+ horizontal?: "general" | "left" | "center" | "right" | "fill" | "justify" | "centerContinuous" | "distributed";
273
+ /** Vertical alignment. */
274
+ vertical?: "top" | "center" | "bottom" | "justify" | "distributed";
275
+ /** Whether text wraps inside the cell. */
276
+ wrapText?: boolean;
277
+ /** Whether text shrinks to fit the cell. */
278
+ shrinkToFit?: boolean;
279
+ /** Indentation level. */
280
+ indent?: number;
281
+ /** Text rotation in degrees. */
282
+ rotation?: number;
283
+ /** Text reading order. */
284
+ readingOrder?: "contextDependent" | "leftToRight" | "rightToLeft";
285
+ }
286
+ /** Number format styling to persist on a cell or range. */
287
+ interface XlsxCellNumberFormatInput {
288
+ /** Number format source. Use `"custom"` with `formatString` for custom Excel formats. */
289
+ formatType?: "general" | "builtin" | "custom";
290
+ /** Built-in Excel number format id. */
291
+ id?: number;
292
+ /** Excel number format string, for example `"$#,##0.00"` or `"m/d/yyyy"`. */
293
+ formatString?: string;
294
+ }
295
+ /** Protection flags to persist on a cell or range. */
296
+ interface XlsxCellProtectionInput {
297
+ /** Whether the cell is locked when sheet protection is enabled. */
298
+ locked?: boolean;
299
+ /** Whether the cell formula is hidden when sheet protection is enabled. */
300
+ hidden?: boolean;
301
+ }
302
+ /**
303
+ * Persisted Excel cell style patch.
304
+ *
305
+ * Passing a partial style updates the supplied style groups on the target cell
306
+ * or range. Unlike the `getCellStyle` render override prop, this mutates the
307
+ * workbook and is included in exported XLSX bytes.
308
+ */
309
+ interface XlsxCellStyleInput {
310
+ /** Font formatting such as bold, italic, size, family, and font color. */
311
+ font?: XlsxCellFontStyleInput;
312
+ /** Cell fill formatting such as background color or gradient fill. */
313
+ fill?: XlsxCellFillStyleInput;
314
+ /** Border formatting for cell edges. */
315
+ border?: XlsxCellBorderStyleInput;
316
+ /** Alignment, wrapping, indentation, rotation, and reading order. */
317
+ alignment?: XlsxCellAlignmentInput;
318
+ /** Excel number/date/currency/percent format metadata. */
319
+ numberFormat?: XlsxCellNumberFormatInput;
320
+ /** Cell protection flags. */
321
+ protection?: XlsxCellProtectionInput;
322
+ }
323
+ interface XlsxSparkline {
324
+ color?: string;
325
+ firstColor?: string;
326
+ highColor?: string;
327
+ lastColor?: string;
328
+ lowColor?: string;
329
+ markerColor?: string;
330
+ markers?: boolean;
331
+ negative?: boolean;
332
+ negativeColor?: string;
333
+ range: XlsxCellRange;
334
+ sheetName?: string;
335
+ target: XlsxCellAddress;
336
+ type: "column" | "line" | "winLoss";
337
+ }
338
+ interface XlsxClipboardData {
339
+ html: string;
340
+ structured: string;
341
+ text: string;
342
+ }
343
+ interface XlsxTableColumn {
344
+ id: number;
345
+ index: number;
346
+ name: string;
347
+ }
348
+ interface XlsxTableStyleInfo {
349
+ name?: string;
350
+ showColumnStripes?: boolean;
351
+ showFirstColumn?: boolean;
352
+ showLastColumn?: boolean;
353
+ showRowStripes?: boolean;
354
+ }
355
+ interface XlsxTable {
356
+ columns: XlsxTableColumn[];
357
+ displayName: string;
358
+ end: XlsxCellAddress;
359
+ headerRowCount: number;
360
+ headerRowCellStyle?: string;
361
+ name: string;
362
+ reference: string;
363
+ start: XlsxCellAddress;
364
+ styleInfo?: XlsxTableStyleInfo;
365
+ totalsRowCount: number;
366
+ totalsRowShown: boolean;
367
+ }
368
+ type XlsxTableSortDirection = "ascending" | "descending";
369
+ interface XlsxTableSortState {
370
+ columnIndex: number;
371
+ direction: XlsxTableSortDirection;
372
+ tableName: string;
373
+ }
374
+ interface XlsxImageMarker {
375
+ col: number;
376
+ colOffsetEmu: number;
377
+ row: number;
378
+ rowOffsetEmu: number;
379
+ }
380
+ type XlsxImageAnchor = {
381
+ from: XlsxImageMarker;
382
+ kind: "one-cell";
383
+ sizeEmu: {
384
+ cx: number;
385
+ cy: number;
386
+ };
387
+ } | {
388
+ kind: "absolute";
389
+ positionEmu: {
390
+ x: number;
391
+ y: number;
392
+ };
393
+ sizeEmu: {
394
+ cx: number;
395
+ cy: number;
396
+ };
397
+ } | {
398
+ from: XlsxImageMarker;
399
+ kind: "two-cell";
400
+ to: XlsxImageMarker;
401
+ };
402
+ interface XlsxImage {
403
+ anchor: XlsxImageAnchor;
404
+ description?: string;
405
+ editable?: boolean;
406
+ hyperlink?: string;
407
+ id: string;
408
+ mediaPath?: string;
409
+ mimeType: string;
410
+ name?: string;
411
+ sheetIndex: number;
412
+ src: string;
413
+ workbookSheetIndex: number;
414
+ zIndex: number;
415
+ }
416
+ interface XlsxShapeFill {
417
+ color?: string;
418
+ none?: boolean;
419
+ opacity?: number;
420
+ }
421
+ interface XlsxShapeStroke {
422
+ color?: string;
423
+ dash?: string;
424
+ headEndType?: string;
425
+ none?: boolean;
426
+ opacity?: number;
427
+ tailEndType?: string;
428
+ widthPx?: number;
429
+ }
430
+ interface XlsxShapeTextRun {
431
+ bold?: boolean;
432
+ color?: string;
433
+ fontFamily?: string;
434
+ fontSizePt?: number;
435
+ italic?: boolean;
436
+ text: string;
437
+ underline?: boolean;
438
+ }
439
+ interface XlsxShapeParagraph {
440
+ align?: "center" | "justify" | "left" | "right";
441
+ runs: XlsxShapeTextRun[];
442
+ }
443
+ interface XlsxShapeTextBox {
444
+ horizontalAlign?: "center" | "left";
445
+ insetPx?: {
446
+ bottom: number;
447
+ left: number;
448
+ right: number;
449
+ top: number;
450
+ };
451
+ verticalAlign?: "bottom" | "middle" | "top";
452
+ }
453
+ interface XlsxShape {
454
+ anchor: XlsxImageAnchor;
455
+ description?: string;
456
+ fill?: XlsxShapeFill;
457
+ flipH?: boolean;
458
+ flipV?: boolean;
459
+ geometry: string;
460
+ geometryAdjustments?: Record<string, number>;
461
+ hidden?: boolean;
462
+ hyperlink?: string;
463
+ id: string;
464
+ name?: string;
465
+ paragraphs: XlsxShapeParagraph[];
466
+ rotationDeg?: number;
467
+ scaleX?: number;
468
+ scaleY?: number;
469
+ sheetIndex: number;
470
+ svgPath?: string;
471
+ svgViewBox?: {
472
+ height: number;
473
+ width: number;
474
+ };
475
+ stroke?: XlsxShapeStroke;
476
+ textBox?: XlsxShapeTextBox;
477
+ workbookSheetIndex: number;
478
+ zIndex: number;
479
+ }
480
+ type XlsxFormControlKind = "button" | "checkbox" | "dropdown" | "editbox" | "group-box" | "label" | "listbox" | "radio" | "scrollbar" | "spinner" | "unknown";
481
+ type XlsxFormControlState = "unchecked" | "checked" | "mixed";
482
+ type XlsxFormControlSelectionMode = "single" | "multi" | "extend";
483
+ interface XlsxFormControlCaptionRun {
484
+ font?: XlsxCellFontStyleInput;
485
+ text: string;
486
+ }
487
+ interface XlsxFormControlCaption {
488
+ horizontalAlignment?: "general" | "left" | "center" | "right" | "fill" | "justify" | "centerContinuous" | "distributed";
489
+ runs: XlsxFormControlCaptionRun[];
490
+ verticalAlignment?: "top" | "center" | "bottom" | "justify" | "distributed";
491
+ }
492
+ type XlsxFormControlCaptionInput = string | XlsxFormControlCaption;
493
+ type XlsxFormControlKindInput = {
494
+ kind: "button";
495
+ caption: XlsxFormControlCaptionInput;
496
+ } | {
497
+ kind: "checkbox";
498
+ caption: XlsxFormControlCaptionInput;
499
+ state: XlsxFormControlState;
500
+ cellLink?: string;
501
+ no3D?: boolean;
502
+ } | {
503
+ kind: "optionButton";
504
+ caption: XlsxFormControlCaptionInput;
505
+ state: Exclude<XlsxFormControlState, "mixed">;
506
+ cellLink?: string;
507
+ no3D?: boolean;
508
+ } | {
509
+ kind: "label";
510
+ caption: XlsxFormControlCaptionInput;
511
+ } | {
512
+ kind: "groupBox";
513
+ caption: XlsxFormControlCaptionInput;
514
+ no3D?: boolean;
515
+ } | {
516
+ kind: "listBox";
517
+ inputRange?: string;
518
+ cellLink?: string;
519
+ selection: XlsxFormControlSelectionMode;
520
+ selected?: number[];
521
+ no3D?: boolean;
522
+ } | {
523
+ kind: "dropdown";
524
+ inputRange?: string;
525
+ cellLink?: string;
526
+ selected?: number;
527
+ lines: number;
528
+ no3D?: boolean;
529
+ } | {
530
+ kind: "editbox";
531
+ caption: XlsxFormControlCaptionInput;
532
+ legacyObjectType?: number;
533
+ rawObj?: Uint8Array | number[];
534
+ rawProperties?: Array<[string, string]>;
535
+ } | {
536
+ kind: "scrollbar";
537
+ value: number;
538
+ min: number;
539
+ max: number;
540
+ increment: number;
541
+ page: number;
542
+ horizontal?: boolean;
543
+ cellLink?: string;
544
+ } | {
545
+ kind: "spinner";
546
+ value: number;
547
+ min: number;
548
+ max: number;
549
+ increment: number;
550
+ cellLink?: string;
551
+ } | {
552
+ kind: "unknown";
553
+ objectType: string;
554
+ legacyObjectType?: number;
555
+ caption?: XlsxFormControlCaptionInput;
556
+ rawObj?: Uint8Array | number[];
557
+ rawProperties?: Array<[string, string]>;
558
+ };
559
+ interface XlsxFormControlMetadataInput {
560
+ altText?: string;
561
+ hidden?: boolean;
562
+ kind: XlsxFormControlKindInput;
563
+ locked?: boolean;
564
+ macroName?: string;
565
+ name?: string;
566
+ printable?: boolean;
567
+ rawClientData?: Array<Uint8Array | number[]>;
568
+ title?: string;
569
+ }
570
+ type XlsxFormControlInput = XlsxFormControlMetadataInput & ({
571
+ anchor: Extract<XlsxImageAnchor, {
572
+ kind: "two-cell";
573
+ }>;
574
+ editAs?: "twoCell" | "oneCell" | "absolute";
575
+ } | {
576
+ anchor: Exclude<XlsxImageAnchor, {
577
+ kind: "two-cell";
578
+ }>;
579
+ editAs?: never;
580
+ });
581
+ type XlsxFormControlPatch = Partial<Omit<XlsxFormControlMetadataInput, "kind">> & {
582
+ anchor?: XlsxImageAnchor;
583
+ editAs?: "twoCell" | "oneCell" | "absolute";
584
+ kind?: XlsxFormControlKindInput;
585
+ };
586
+ interface XlsxFormControl {
587
+ anchor: XlsxImageAnchor;
588
+ altText?: string;
589
+ /** Original rich caption reported by Duke Sheets. */
590
+ caption?: XlsxFormControlCaption;
591
+ checked?: boolean;
592
+ /** Duke Sheets' stable zero-based index for this worksheet load. */
593
+ controlIndex?: number;
594
+ /** Original two-cell anchor behavior. */
595
+ editAs?: "twoCell" | "oneCell" | "absolute";
596
+ firstInGroup?: boolean;
597
+ fontFamily?: string;
598
+ fontSizePt?: number;
599
+ hidden?: boolean;
600
+ horizontal?: boolean;
601
+ id: string;
602
+ increment?: number;
603
+ inputRange?: string;
604
+ /** Current formatted labels resolved from a dropdown or list box input range. */
605
+ items?: string[];
606
+ kind: XlsxFormControlKind;
607
+ label?: string;
608
+ lines?: number;
609
+ linkedCell?: string;
610
+ locked?: boolean;
611
+ macroName?: string;
612
+ max?: number;
613
+ min?: number;
614
+ name?: string;
615
+ no3D?: boolean;
616
+ page?: number;
617
+ printable?: boolean;
618
+ objectType?: string;
619
+ legacyObjectType?: number;
620
+ rawClientData?: number[][];
621
+ rawObj?: number[];
622
+ rawProperties?: Array<[string, string]>;
623
+ /** Zero-based selected item index or indexes, matching Duke Sheets. */
624
+ selected?: number | number[];
625
+ selection?: XlsxFormControlSelectionMode;
626
+ sheetIndex: number;
627
+ state?: XlsxFormControlState;
628
+ textAlign?: "center" | "left" | "right";
629
+ textColor?: string;
630
+ title?: string;
631
+ value?: number;
632
+ workbookSheetIndex: number;
633
+ zIndex: number;
634
+ }
635
+ interface XlsxFormControlActionEvent {
636
+ control: XlsxFormControl;
637
+ type: "activate";
638
+ }
639
+ interface XlsxFormControlChangeEvent {
640
+ control: XlsxFormControl;
641
+ previousControl: XlsxFormControl;
642
+ type: "change";
643
+ }
644
+ interface XlsxChartReference {
645
+ formula?: string;
646
+ refType?: string;
647
+ values?: Array<number | string | null>;
648
+ }
649
+ interface XlsxChartDataLabels {
650
+ pointLabels?: XlsxChartPointDataLabel[];
651
+ raw?: Record<string, unknown>;
652
+ showBubbleSize?: boolean;
653
+ showCategoryName?: boolean;
654
+ showLegendKey?: boolean;
655
+ showPercent?: boolean;
656
+ showSeriesName?: boolean;
657
+ showValue?: boolean;
658
+ }
659
+ interface XlsxChartPointDataLabel {
660
+ deleted?: boolean;
661
+ fontSizePt?: number;
662
+ index: number;
663
+ showBubbleSize?: boolean;
664
+ showCategoryName?: boolean;
665
+ showPercent?: boolean;
666
+ showSeriesName?: boolean;
667
+ showValue?: boolean;
668
+ x?: number;
669
+ y?: number;
670
+ }
671
+ interface XlsxChartLegend {
672
+ overlay?: boolean;
673
+ position?: string;
674
+ raw?: Record<string, unknown>;
675
+ }
676
+ interface XlsxChartAxis {
677
+ crossId?: number;
678
+ crosses?: string;
679
+ crossBetween?: string;
680
+ delete?: boolean;
681
+ id?: number;
682
+ labelPosition?: string;
683
+ logBase?: number;
684
+ orientation?: string;
685
+ majorUnit?: number;
686
+ max?: number;
687
+ min?: number;
688
+ majorGridlines?: boolean;
689
+ majorGridlineColor?: string;
690
+ majorTickMark?: string;
691
+ minorUnit?: number;
692
+ minorGridlines?: boolean;
693
+ minorTickMark?: string;
694
+ numberFormat?: {
695
+ formatCode?: string;
696
+ sourceLinked?: boolean;
697
+ };
698
+ position?: string;
699
+ raw?: Record<string, unknown>;
700
+ shapeProperties?: Record<string, unknown>;
701
+ tickLabelSkip?: number;
702
+ tickMarkSkip?: number;
703
+ }
704
+ interface XlsxChartPointStyle {
705
+ color?: string;
706
+ explosion?: number;
707
+ index: number;
708
+ lineColor?: string;
709
+ }
710
+ interface XlsxChartSeries {
711
+ bubbleSizeRef?: XlsxChartReference | null;
712
+ bubbleSizes?: Array<number | null>;
713
+ categories: Array<number | string | null>;
714
+ categoriesRef?: XlsxChartReference | null;
715
+ color?: string;
716
+ dataPoints: unknown[];
717
+ dataPointStyles?: XlsxChartPointStyle[];
718
+ formatIdx?: number;
719
+ hidden?: boolean;
720
+ id: string;
721
+ invertIfNegative?: boolean;
722
+ lineColor?: string;
723
+ lineWidthPx?: number;
724
+ marker?: Record<string, unknown>;
725
+ markerColor?: string;
726
+ markerLineColor?: string;
727
+ markerSize?: number;
728
+ markerSymbol?: string;
729
+ name?: string;
730
+ negativeColor?: string;
731
+ negativeLineColor?: string;
732
+ raw?: Record<string, unknown>;
733
+ shapeProperties?: Record<string, unknown>;
734
+ smooth?: boolean;
735
+ values: Array<number | null>;
736
+ valuesRef?: XlsxChartReference | null;
737
+ }
738
+ type XlsxChartElementSelection = {
739
+ kind: "chart";
740
+ chartId: string;
741
+ } | {
742
+ kind: "series";
743
+ chartId: string;
744
+ seriesId: string;
745
+ seriesIndex: number;
746
+ } | {
747
+ kind: "point";
748
+ chartId: string;
749
+ seriesId: string;
750
+ seriesIndex: number;
751
+ pointIndex: number;
752
+ } | {
753
+ kind: "legendEntry";
754
+ chartId: string;
755
+ seriesId: string;
756
+ seriesIndex: number;
757
+ };
758
+ type XlsxFormulaTarget = {
759
+ kind: "cell";
760
+ cell: XlsxCellAddress | null;
761
+ } | {
762
+ kind: "chartSeries";
763
+ chartId: string;
764
+ seriesId: string;
765
+ seriesIndex: number;
766
+ } | null;
767
+ interface XlsxChartTypeGroup {
768
+ axisIds?: number[];
769
+ chartType: string;
770
+ dataLabels?: XlsxChartDataLabels | null;
771
+ gapWidth?: number;
772
+ is3d?: boolean;
773
+ overlap?: number;
774
+ raw?: Record<string, unknown>;
775
+ series: XlsxChartSeries[];
776
+ varyColors?: boolean;
777
+ }
778
+ interface XlsxChartWall {
779
+ fillColor?: string;
780
+ hidden?: boolean;
781
+ lineColor?: string;
782
+ thickness?: number;
783
+ }
784
+ interface XlsxChart {
785
+ anchor: XlsxImageAnchor;
786
+ autoTitleDeleted?: boolean;
787
+ axes: XlsxChartAxis[];
788
+ axisLabelColor?: string;
789
+ axisLineColor?: string;
790
+ categoryAxis?: XlsxChartAxis | null;
791
+ chartExLayout?: string;
792
+ chartAreaBorderColor?: string;
793
+ chartAreaFillColor?: string;
794
+ chartColorPalette?: string[];
795
+ chartColorPaletteOffset?: number;
796
+ chartPath?: string;
797
+ chartStyleId?: number;
798
+ chartType: string;
799
+ dataLabels?: XlsxChartDataLabels | null;
800
+ displayBlanksAs?: string;
801
+ editable?: boolean;
802
+ firstSliceAngle?: number;
803
+ fontFamily?: string;
804
+ gapWidth?: number;
805
+ holeSize?: number;
806
+ id: string;
807
+ is3d?: boolean;
808
+ legend?: XlsxChartLegend | null;
809
+ name?: string;
810
+ overlap?: number;
811
+ plotVisibleOnly?: boolean;
812
+ raw?: Record<string, unknown>;
813
+ radarStyle?: string;
814
+ scatterStyle?: string;
815
+ roundedCorners?: boolean;
816
+ shape3d?: string;
817
+ seriesAxis?: XlsxChartAxis | null;
818
+ series: XlsxChartSeries[];
819
+ sheetIndex: number;
820
+ showDlblsOverMax?: boolean;
821
+ sideWall?: XlsxChartWall | null;
822
+ backWall?: XlsxChartWall | null;
823
+ bubbleScale?: number;
824
+ bubble3d?: boolean;
825
+ floor?: XlsxChartWall | null;
826
+ surfaceMaterial?: string;
827
+ textColor?: string;
828
+ title?: string;
829
+ titleColor?: string;
830
+ titleFontFamily?: string;
831
+ typeGroups?: XlsxChartTypeGroup[];
832
+ valueAxis?: XlsxChartAxis | null;
833
+ varyColors?: boolean;
834
+ view3d?: {
835
+ depthPercent?: number;
836
+ heightPercent?: number;
837
+ perspective?: number;
838
+ rAngAx?: boolean;
839
+ rotX?: number;
840
+ rotY?: number;
841
+ };
842
+ wireframe?: boolean;
843
+ workbookSheetIndex: number;
844
+ zIndex: number;
845
+ }
846
+ interface XlsxChartsheet {
847
+ chartIds: string[];
848
+ chartPath?: string;
849
+ id: string;
850
+ index: number;
851
+ name: string;
852
+ raw?: Record<string, unknown>;
853
+ workbookSheetIndex?: number;
854
+ }
855
+ interface XlsxWorkbookTab {
856
+ chartsheetIndex?: number;
857
+ id: string;
858
+ index: number;
859
+ kind: "chartsheet" | "sheet";
860
+ name: string;
861
+ sheetIndex?: number;
862
+ visibility?: XlsxSheetVisibility;
863
+ workbookSheetIndex?: number;
864
+ }
865
+ interface XlsxImageRect {
866
+ height: number;
867
+ left: number;
868
+ top: number;
869
+ width: number;
870
+ }
871
+ /** Rendered column widths and row heights in logical pixels, indexed by worksheet coordinates. */
872
+ interface XlsxDrawingLayout {
873
+ columnWidths: readonly number[];
874
+ rowHeights: readonly number[];
875
+ }
876
+ type XlsxImageResizeHandlePosition = "n" | "s" | "e" | "w" | "ne" | "nw" | "se" | "sw";
877
+ interface UseXlsxViewerControllerOptions {
878
+ /**
879
+ * Allows row and column resizing even while editing is disabled by `readOnly`.
880
+ *
881
+ * @default false
882
+ */
883
+ allowResizeInReadOnly?: boolean;
884
+ /**
885
+ * Defers loading until `continueDeferredLoad()` is called when the file is larger than this byte threshold.
886
+ * Set to `0` to parse immediately.
887
+ *
888
+ * @default 0
889
+ * @example
890
+ * ```tsx
891
+ * useXlsxViewerController({ file, deferLoadingAboveBytes: 10 * 1024 * 1024 })
892
+ * ```
893
+ */
894
+ deferLoadingAboveBytes?: number;
895
+ /**
896
+ * Local workbook bytes to load. Use either `file` or `src`.
897
+ *
898
+ * @example
899
+ * ```tsx
900
+ * <XlsxViewer file={await uploadedFile.arrayBuffer()} fileName={uploadedFile.name} />
901
+ * ```
902
+ */
903
+ file?: ArrayBuffer;
904
+ /**
905
+ * Optional display and download name for the workbook.
906
+ *
907
+ * @example
908
+ * ```tsx
909
+ * <XlsxViewer file={buffer} fileName="forecast.xlsx" />
910
+ * ```
911
+ */
912
+ fileName?: string;
913
+ /**
914
+ * Rejects files larger than this byte limit and renders `fileTooLargeState`.
915
+ *
916
+ * @default 25 * 1024 * 1024
917
+ */
918
+ maxFileSizeBytes?: number;
919
+ /**
920
+ * Disables workbook edits, paste, fill, undo/redo, and other mutation actions.
921
+ *
922
+ * @default false
923
+ */
924
+ readOnly?: boolean;
925
+ /**
926
+ * Automatically enables read-only mode for files larger than this byte threshold.
927
+ * Set to `0` to disable the automatic switch.
928
+ *
929
+ * @default 0
930
+ */
931
+ readOnlyAboveBytes?: number;
932
+ /**
933
+ * Includes hidden and very hidden workbook sheets in the sheet tabs and controller state.
934
+ *
935
+ * @default false
936
+ */
937
+ showHiddenSheets?: boolean;
938
+ /**
939
+ * Skips OOXML ZIP/XML parsing and relies on `@dukelib/sheets-wasm` metadata only.
940
+ * This is automatically used for legacy `.xls` files.
941
+ *
942
+ * @default false
943
+ */
944
+ skipXmlParsing?: boolean;
945
+ /**
946
+ * Remote workbook URL to fetch and load. Use either `src` or `file`.
947
+ *
948
+ * @example
949
+ * ```tsx
950
+ * <XlsxViewer src="/workbooks/report.xlsx" />
951
+ * ```
952
+ */
953
+ src?: string;
954
+ /**
955
+ * Parses supported workbook data in a Web Worker so large files do not block React rendering.
956
+ *
957
+ * @default true
958
+ */
959
+ useWorker?: boolean;
960
+ }
961
+ interface XlsxViewerController {
962
+ activeCell: XlsxCellAddress | null;
963
+ activeCellAddress: string | null;
964
+ activeSheet: XlsxSheetData | null;
965
+ activeSheetIndex: number;
966
+ activeTab: XlsxWorkbookTab | null;
967
+ activeTabIndex: number;
968
+ canDownload: boolean;
969
+ canExport: boolean;
970
+ canLoadDeferred: boolean;
971
+ canRedo: boolean;
972
+ canUndo: boolean;
973
+ canZoomIn: boolean;
974
+ canZoomOut: boolean;
975
+ /** Adds a Duke-supported form control to a visible worksheet and returns its worksheet-local index. */
976
+ addFormControl: (input: XlsxFormControlInput, sheetIndex?: number) => number | null;
977
+ clearSelectedCells: () => void;
978
+ clearSelection: () => void;
979
+ /** Removes all render-only range highlights. */
980
+ clearHighlightedRanges: () => void;
981
+ /** Replaces the highlights with validated A1 ranges. Returns false without changing state if any reference cannot be resolved. */
982
+ highlightRanges: (references: string | readonly string[], options?: XlsxHighlightRangeOptions) => boolean;
983
+ highlightedRanges: XlsxRangeHighlight[];
984
+ continueDeferredLoad: () => void;
985
+ copySelectionToClipboard: () => Promise<boolean>;
986
+ defaultZoomScale: number;
987
+ deferredLoadFileSize: number | null;
988
+ defineNamedRange: (name: string, range?: XlsxCellRange | null) => void;
989
+ displayFileName: string;
990
+ download: () => void;
991
+ charts: XlsxChart[];
992
+ chartsheets: XlsxChartsheet[];
993
+ exportCsv: () => void;
994
+ exportXlsx: () => void;
995
+ /** The current workbook as XLSX bytes, the same bytes `exportXlsx()` downloads; `null` before a workbook loads. */
996
+ getXlsxBytes: () => Uint8Array | null;
997
+ error: Error | null;
998
+ file?: ArrayBuffer;
999
+ fillSelection: (targetRange: XlsxCellRange) => void;
1000
+ clearSelectedChart: () => void;
1001
+ clearSelectedChartElement: () => void;
1002
+ clearSelectedImage: () => void;
1003
+ getChartById: (id: string) => XlsxChart | null;
1004
+ getChartSeriesFormula: (chartId: string, seriesIndex: number) => string;
1005
+ getChartsheetById: (id: string) => XlsxChartsheet | null;
1006
+ formControls: XlsxFormControl[];
1007
+ getSheetCharts: (sheetIndex?: number) => XlsxChart[];
1008
+ getSheetFormControls: (sheetIndex?: number) => XlsxFormControl[];
1009
+ /** Resolves a list/dropdown input range to its current formatted item labels. */
1010
+ getFormControlItems: (controlIndex: number, sheetIndex?: number) => string[];
1011
+ getImageById: (id: string) => XlsxImage | null;
1012
+ getSheetImages: (sheetIndex?: number) => XlsxImage[];
1013
+ getSheetShapes: (sheetIndex?: number) => XlsxShape[];
1014
+ getClipboardData: () => XlsxClipboardData | null;
1015
+ getCellDisplayValue: (cell?: XlsxCellAddress | null) => string;
1016
+ getCellFormula: (cell?: XlsxCellAddress | null) => string;
1017
+ getCellSnapshotAsync?: (workbookSheetIndex: number, row: number, col: number) => Promise<{
1018
+ displayValue: string;
1019
+ formula: string;
1020
+ }>;
1021
+ isLoadDeferred: boolean;
1022
+ isLoading: boolean;
1023
+ isChartsLoading: boolean;
1024
+ isWorkerBacked?: boolean;
1025
+ images: XlsxImage[];
1026
+ moveChartBy: (id: string, deltaX: number, deltaY: number) => void;
1027
+ shapes: XlsxShape[];
1028
+ /** Merges the selection; defaults to preserving its existing alignment. */
1029
+ mergeSelection: (mode?: XlsxMergeMode) => void;
1030
+ maxZoomScale: number;
1031
+ minZoomScale: number;
1032
+ moveImageBy: (id: string, deltaX: number, deltaY: number) => void;
1033
+ removeActiveSheet: () => void;
1034
+ /** Removes a Duke-supported control by its worksheet-local index. */
1035
+ removeFormControl: (controlIndex: number, sheetIndex?: number) => boolean;
1036
+ readOnly: boolean;
1037
+ recalculate: () => void;
1038
+ revision: number;
1039
+ resetZoom: () => void;
1040
+ resizeChartBy: (id: string, handle: XlsxImageResizeHandlePosition, deltaX: number, deltaY: number) => void;
1041
+ resizeImageBy: (id: string, handle: XlsxImageResizeHandlePosition, deltaX: number, deltaY: number) => void;
1042
+ resizeColumn: (col: number, widthPx: number) => void;
1043
+ resizeRow: (row: number, heightPx: number) => void;
1044
+ redo: () => void;
1045
+ pasteFromClipboard: () => Promise<boolean>;
1046
+ pasteStructuredClipboardData: (payload: string) => boolean;
1047
+ pasteText: (text: string) => boolean;
1048
+ selectedRangeAddress: string | null;
1049
+ selectedValue: string;
1050
+ selectedFormula: string;
1051
+ /**
1052
+ * Sets the formula for a cell in the active worksheet.
1053
+ *
1054
+ * Pass an A1-style formula body or formula string, for example `"SUM(A1:A3)"`
1055
+ * or `"=SUM(A1:A3)"`. The mutation is recorded in undo history and is included
1056
+ * in exported workbook bytes.
1057
+ *
1058
+ * @param cell Zero-based row and column address in the active worksheet.
1059
+ * @param formula Formula text to write. Pass an empty string to clear the formula.
1060
+ */
1061
+ setCellFormula: (cell: XlsxCellAddress, formula: string) => void;
1062
+ /**
1063
+ * Applies persisted Excel style properties to a cell in the active worksheet.
1064
+ *
1065
+ * This mutates workbook data, records undo history, refreshes the viewer, and
1066
+ * is included in exported XLSX bytes. Use the `getCellStyle` viewer prop only
1067
+ * for render-time CSS overrides that should not modify the workbook.
1068
+ *
1069
+ * @param cell Zero-based row and column address in the active worksheet.
1070
+ * @param style Partial Excel style patch to apply to the target cell.
1071
+ */
1072
+ setCellStyle: (cell: XlsxCellAddress, style: XlsxCellStyleInput) => void;
1073
+ /**
1074
+ * Sets the value for a cell in the active worksheet.
1075
+ *
1076
+ * User-entered strings are coerced to booleans or numbers when they match
1077
+ * Excel-like input. Prefix text with an apostrophe to force literal text.
1078
+ *
1079
+ * @param cell Zero-based row and column address in the active worksheet.
1080
+ * @param value Text entered by the user.
1081
+ */
1082
+ setCellValue: (cell: XlsxCellAddress, value: string) => void;
1083
+ /**
1084
+ * Applies persisted Excel style properties to every cell in a range.
1085
+ *
1086
+ * This mutates workbook data, records undo history, refreshes the viewer, and
1087
+ * is included in exported XLSX bytes.
1088
+ *
1089
+ * @param range Zero-based cell range in the active worksheet.
1090
+ * @param style Partial Excel style patch to apply to the target range.
1091
+ */
1092
+ setRangeStyle: (range: XlsxCellRange, style: XlsxCellStyleInput) => void;
1093
+ setZoomScale: (zoomScale: number) => void;
1094
+ selectCell: (cell: XlsxCellAddress, options?: {
1095
+ extend?: boolean;
1096
+ }) => void;
1097
+ selectChart: (id: string | null) => void;
1098
+ selectChartElement: (selection: XlsxChartElementSelection | null) => void;
1099
+ selectRange: (range: XlsxCellRange) => void;
1100
+ selection: XlsxCellRange | null;
1101
+ setActiveSheetIndex: (index: number) => void;
1102
+ setActiveTabIndex: (index: number) => void;
1103
+ selectedChart: XlsxChart | null;
1104
+ selectedChartElement: XlsxChartElementSelection | null;
1105
+ selectedChartFormula: string | null;
1106
+ selectedChartId: string | null;
1107
+ selectedCellFormula: string;
1108
+ selectedFormulaTarget: XlsxFormulaTarget;
1109
+ selectedImage: XlsxImage | null;
1110
+ selectedImageId: string | null;
1111
+ setSelectedFormula: (formula: string) => boolean;
1112
+ setSelectedCellFormula: (formula: string) => void;
1113
+ /**
1114
+ * Applies persisted Excel style properties to the active cell.
1115
+ *
1116
+ * No-ops when there is no active cell, when editing is disabled, or when no
1117
+ * workbook is loaded. The mutation is recorded in undo history and is included
1118
+ * in exported XLSX bytes.
1119
+ *
1120
+ * @param style Partial Excel style patch to apply to the active cell.
1121
+ */
1122
+ setSelectedCellStyle: (style: XlsxCellStyleInput) => void;
1123
+ setSelectedCellValue: (value: string) => void;
1124
+ sheets: XlsxSheetData[];
1125
+ src?: string;
1126
+ sortState: XlsxTableSortState | null;
1127
+ sortTable: (tableName: string, columnIndex: number, direction: XlsxTableSortDirection) => void;
1128
+ setChartSeriesFormula: (chartId: string, seriesIndex: number, formula: string) => boolean;
1129
+ selectImage: (id: string | null) => void;
1130
+ setChartRect: (id: string, rect: XlsxImageRect, layout?: XlsxDrawingLayout) => void;
1131
+ setImageRect: (id: string, rect: XlsxImageRect, layout?: XlsxDrawingLayout) => void;
1132
+ getRowsBatchAsync?: (workbookSheetIndex: number, startRow: number, rowCount: number) => Promise<unknown[] | null>;
1133
+ tables: XlsxTable[];
1134
+ tabs: XlsxWorkbookTab[];
1135
+ undo: () => void;
1136
+ unmergeSelection: () => void;
1137
+ updateChart: (id: string, patch: Partial<XlsxChart>) => void;
1138
+ /** Updates a Duke-supported control and participates in undo/redo and export. */
1139
+ updateFormControl: (controlIndex: number, patch: XlsxFormControlPatch, sheetIndex?: number) => boolean;
1140
+ workbook: Workbook | null;
1141
+ zoomIn: () => void;
1142
+ zoomOut: () => void;
1143
+ zoomScale: number;
1144
+ getActiveWorksheet: () => Worksheet | null;
1145
+ addSheet: (name?: string) => void;
1146
+ }
1147
+ interface XlsxViewerSelection {
1148
+ activeCell: XlsxCellAddress | null;
1149
+ activeCellAddress: string | null;
1150
+ clearSelection: () => void;
1151
+ selectedRangeAddress: string | null;
1152
+ selectCell: (cell: XlsxCellAddress, options?: {
1153
+ extend?: boolean;
1154
+ }) => void;
1155
+ selectRange: (range: XlsxCellRange) => void;
1156
+ selection: XlsxCellRange | null;
1157
+ }
1158
+ interface XlsxViewerZoom {
1159
+ canZoomIn: boolean;
1160
+ canZoomOut: boolean;
1161
+ defaultZoomScale: number;
1162
+ maxZoomScale: number;
1163
+ minZoomScale: number;
1164
+ resetZoom: () => void;
1165
+ setZoomScale: (zoomScale: number) => void;
1166
+ zoomIn: () => void;
1167
+ zoomOut: () => void;
1168
+ zoomScale: number;
1169
+ }
1170
+ type XlsxContextMenuActionId = "cut" | "copy" | "paste" | "clearContents" | "editCell" | "undo" | "redo" | "mergeCells" | "mergeAndCenter" | "mergeAcross" | "unmergeCells" | "sortAscending" | "sortDescending" | "selectRow" | "selectColumn" | "selectAll";
1171
+ interface XlsxContextMenuAction {
1172
+ id: XlsxContextMenuActionId;
1173
+ label: string;
1174
+ shortcut?: string;
1175
+ disabled?: boolean;
1176
+ destructive?: boolean;
1177
+ separatorBefore?: boolean;
1178
+ }
1179
+ interface XlsxContextMenuContext {
1180
+ kind: "cell" | "row" | "column" | "sheet";
1181
+ cell: XlsxCellAddress;
1182
+ selection: XlsxCellRange;
1183
+ sheetIndex: number;
1184
+ sheetName: string;
1185
+ readOnly: boolean;
1186
+ }
1187
+ interface XlsxViewerEditing {
1188
+ addSheet: (name?: string) => void;
1189
+ addFormControl: (input: XlsxFormControlInput, sheetIndex?: number) => number | null;
1190
+ canRedo: boolean;
1191
+ canUndo: boolean;
1192
+ clearSelectedCells: () => void;
1193
+ copySelectionToClipboard: () => Promise<boolean>;
1194
+ defineNamedRange: (name: string, range?: XlsxCellRange | null) => void;
1195
+ fillSelection: (targetRange: XlsxCellRange) => void;
1196
+ formControls: XlsxFormControl[];
1197
+ getClipboardData: () => XlsxClipboardData | null;
1198
+ getCellDisplayValue: (cell?: XlsxCellAddress | null) => string;
1199
+ getCellFormula: (cell?: XlsxCellAddress | null) => string;
1200
+ getFormControlItems: (controlIndex: number, sheetIndex?: number) => string[];
1201
+ getSheetFormControls: (sheetIndex?: number) => XlsxFormControl[];
1202
+ mergeSelection: (mode?: XlsxMergeMode) => void;
1203
+ pasteFromClipboard: () => Promise<boolean>;
1204
+ pasteStructuredClipboardData: (payload: string) => boolean;
1205
+ pasteText: (text: string) => boolean;
1206
+ removeActiveSheet: () => void;
1207
+ removeFormControl: (controlIndex: number, sheetIndex?: number) => boolean;
1208
+ readOnly: boolean;
1209
+ redo: () => void;
1210
+ selectedCellFormula: string;
1211
+ selectedChartFormula: string | null;
1212
+ selectedFormula: string;
1213
+ selectedFormulaTarget: XlsxFormulaTarget;
1214
+ selectedValue: string;
1215
+ /**
1216
+ * Sets the formula for a cell in the active worksheet.
1217
+ *
1218
+ * @param cell Zero-based row and column address in the active worksheet.
1219
+ * @param formula Formula text to write. Pass an empty string to clear the formula.
1220
+ */
1221
+ setCellFormula: (cell: XlsxCellAddress, formula: string) => void;
1222
+ /**
1223
+ * Applies persisted Excel style properties to a cell in the active worksheet.
1224
+ *
1225
+ * The mutation is recorded in undo history and is included in exported XLSX
1226
+ * bytes. This is different from the `getCellStyle` render override prop.
1227
+ *
1228
+ * @param cell Zero-based row and column address in the active worksheet.
1229
+ * @param style Partial Excel style patch to apply to the target cell.
1230
+ */
1231
+ setCellStyle: (cell: XlsxCellAddress, style: XlsxCellStyleInput) => void;
1232
+ /**
1233
+ * Sets the value for a cell in the active worksheet.
1234
+ *
1235
+ * @param cell Zero-based row and column address in the active worksheet.
1236
+ * @param value Text entered by the user.
1237
+ */
1238
+ setCellValue: (cell: XlsxCellAddress, value: string) => void;
1239
+ /**
1240
+ * Applies persisted Excel style properties to every cell in a range.
1241
+ *
1242
+ * @param range Zero-based cell range in the active worksheet.
1243
+ * @param style Partial Excel style patch to apply to the target range.
1244
+ */
1245
+ setRangeStyle: (range: XlsxCellRange, style: XlsxCellStyleInput) => void;
1246
+ setSelectedFormula: (formula: string) => boolean;
1247
+ setSelectedCellFormula: (formula: string) => void;
1248
+ /**
1249
+ * Applies persisted Excel style properties to the active cell.
1250
+ *
1251
+ * @param style Partial Excel style patch to apply to the active cell.
1252
+ */
1253
+ setSelectedCellStyle: (style: XlsxCellStyleInput) => void;
1254
+ setSelectedCellValue: (value: string) => void;
1255
+ undo: () => void;
1256
+ unmergeSelection: () => void;
1257
+ updateFormControl: (controlIndex: number, patch: XlsxFormControlPatch, sheetIndex?: number) => boolean;
1258
+ }
1259
+ interface XlsxViewerTables {
1260
+ sortState: XlsxTableSortState | null;
1261
+ sortTable: (tableName: string, columnIndex: number, direction: XlsxTableSortDirection) => void;
1262
+ tables: XlsxTable[];
1263
+ }
1264
+ interface XlsxViewerImages {
1265
+ charts: XlsxChart[];
1266
+ clearSelectedChart: () => void;
1267
+ clearSelectedChartElement: () => void;
1268
+ clearSelectedImage: () => void;
1269
+ getChartById: (id: string) => XlsxChart | null;
1270
+ getChartSeriesFormula: (chartId: string, seriesIndex: number) => string;
1271
+ getSheetCharts: (sheetIndex?: number) => XlsxChart[];
1272
+ getImageById: (id: string) => XlsxImage | null;
1273
+ getSheetImages: (sheetIndex?: number) => XlsxImage[];
1274
+ images: XlsxImage[];
1275
+ moveChartBy: (id: string, deltaX: number, deltaY: number) => void;
1276
+ moveImageBy: (id: string, deltaX: number, deltaY: number) => void;
1277
+ isChartsLoading: boolean;
1278
+ readOnly: boolean;
1279
+ resizeChartBy: (id: string, handle: XlsxImageResizeHandlePosition, deltaX: number, deltaY: number) => void;
1280
+ resizeImageBy: (id: string, handle: XlsxImageResizeHandlePosition, deltaX: number, deltaY: number) => void;
1281
+ selectedChart: XlsxChart | null;
1282
+ selectedChartElement: XlsxChartElementSelection | null;
1283
+ selectedChartFormula: string | null;
1284
+ selectedChartId: string | null;
1285
+ selectedImage: XlsxImage | null;
1286
+ selectedImageId: string | null;
1287
+ selectChart: (id: string | null) => void;
1288
+ selectChartElement: (selection: XlsxChartElementSelection | null) => void;
1289
+ selectImage: (id: string | null) => void;
1290
+ setChartSeriesFormula: (chartId: string, seriesIndex: number, formula: string) => boolean;
1291
+ setChartRect: (id: string, rect: XlsxImageRect, layout?: XlsxDrawingLayout) => void;
1292
+ setImageRect: (id: string, rect: XlsxImageRect, layout?: XlsxDrawingLayout) => void;
1293
+ updateChart: (id: string, patch: Partial<XlsxChart>) => void;
1294
+ }
1295
+ interface XlsxViewerCharts {
1296
+ activeTab: XlsxWorkbookTab | null;
1297
+ activeTabIndex: number;
1298
+ charts: XlsxChart[];
1299
+ chartsheets: XlsxChartsheet[];
1300
+ clearSelectedChart: () => void;
1301
+ clearSelectedChartElement: () => void;
1302
+ getChartById: (id: string) => XlsxChart | null;
1303
+ getChartSeriesFormula: (chartId: string, seriesIndex: number) => string;
1304
+ getChartsheetById: (id: string) => XlsxChartsheet | null;
1305
+ getSheetCharts: (sheetIndex?: number) => XlsxChart[];
1306
+ isChartsLoading: boolean;
1307
+ moveChartBy: (id: string, deltaX: number, deltaY: number) => void;
1308
+ readOnly: boolean;
1309
+ resizeChartBy: (id: string, handle: XlsxImageResizeHandlePosition, deltaX: number, deltaY: number) => void;
1310
+ selectChart: (id: string | null) => void;
1311
+ selectedChart: XlsxChart | null;
1312
+ selectedChartElement: XlsxChartElementSelection | null;
1313
+ selectedChartFormula: string | null;
1314
+ selectedChartId: string | null;
1315
+ selectChartElement: (selection: XlsxChartElementSelection | null) => void;
1316
+ setChartSeriesFormula: (chartId: string, seriesIndex: number, formula: string) => boolean;
1317
+ setActiveTabIndex: (index: number) => void;
1318
+ setChartRect: (id: string, rect: XlsxImageRect, layout?: XlsxDrawingLayout) => void;
1319
+ tabs: XlsxWorkbookTab[];
1320
+ updateChart: (id: string, patch: Partial<XlsxChart>) => void;
1321
+ }
1322
+ type XlsxSheetThumbnailResolution = number | {
1323
+ maxHeight?: number;
1324
+ maxWidth?: number;
1325
+ };
1326
+ interface UseXlsxViewerThumbnailsOptions {
1327
+ includeHeaders?: boolean;
1328
+ resolution?: XlsxSheetThumbnailResolution;
1329
+ }
1330
+ interface XlsxSheetThumbnail {
1331
+ aspectRatio: number;
1332
+ contentHeight: number;
1333
+ contentWidth: number;
1334
+ height: number;
1335
+ paint: (canvas: HTMLCanvasElement | null) => boolean;
1336
+ sheet: XlsxSheetData;
1337
+ sheetIndex: number;
1338
+ sourceRange: XlsxCellRange;
1339
+ width: number;
1340
+ workbookSheetIndex: number;
1341
+ }
1342
+ interface XlsxViewerThumbnails {
1343
+ paintThumbnail: (sheetIndex: number, canvas: HTMLCanvasElement | null) => boolean;
1344
+ thumbnails: XlsxSheetThumbnail[];
1345
+ }
1346
+ interface XlsxActiveCellOverlayRenderProps {
1347
+ /** Address of the active cell. For merged cells this is the merge anchor. */
1348
+ cell: XlsxCellAddress;
1349
+ /**
1350
+ * Pixel rect of the active cell (spanning the full merge) within the grid's scroll content,
1351
+ * at the current zoom. The rendered node is already positioned to fill this rect.
1352
+ */
1353
+ rect: XlsxImageRect;
1354
+ }
1355
+
1356
+ type XlsxVanillaContent = Node | string | number | null;
1357
+ type XlsxVanillaStyle = Properties<string | number>;
1358
+ interface XlsxVanillaChartLoadingRenderProps {
1359
+ chart: XlsxChart;
1360
+ rect: XlsxImageRect;
1361
+ stage?: "metadata" | "renderer" | "map";
1362
+ }
1363
+ interface XlsxVanillaContextMenuRenderProps {
1364
+ context: XlsxContextMenuContext;
1365
+ actions: XlsxContextMenuAction[];
1366
+ runAction: (actionId: XlsxContextMenuActionId) => Promise<boolean>;
1367
+ closeMenu: () => void;
1368
+ position: {
1369
+ x: number;
1370
+ y: number;
1371
+ };
1372
+ isDark: boolean;
1373
+ busy: boolean;
1374
+ error: string | null;
1375
+ }
1376
+ interface XlsxVanillaFileTooLargeRenderProps {
1377
+ displayFileName: string;
1378
+ fileSizeBytes: number;
1379
+ maxFileSizeBytes: number;
1380
+ }
1381
+ interface XlsxVanillaImageRenderProps {
1382
+ image: XlsxImage;
1383
+ rect: XlsxImageRect;
1384
+ style: XlsxVanillaStyle;
1385
+ }
1386
+ interface XlsxVanillaFormControlRenderProps {
1387
+ activate: () => void;
1388
+ checked: boolean;
1389
+ control: XlsxFormControl;
1390
+ disabled: boolean;
1391
+ items: string[];
1392
+ label: string;
1393
+ mixed: boolean;
1394
+ readOnly: boolean;
1395
+ rect: XlsxImageRect;
1396
+ setSelected: (selected: number | number[] | undefined) => boolean;
1397
+ setState: (state: XlsxFormControlState) => boolean;
1398
+ setValue: (value: number) => boolean;
1399
+ stopPropagation: (event: Event) => void;
1400
+ style: XlsxVanillaStyle;
1401
+ zoomFactor: number;
1402
+ }
1403
+ interface XlsxVanillaCellStyleContext {
1404
+ cell: XlsxCellAddress;
1405
+ hasChartHighlight: boolean;
1406
+ hasConditionalFormat: boolean;
1407
+ hasHyperlink: boolean;
1408
+ hasValidation: boolean;
1409
+ isMerged: boolean;
1410
+ isTableHeader: boolean;
1411
+ resolvedStyle: XlsxVanillaStyle;
1412
+ sheetName: string;
1413
+ value: string;
1414
+ workbookSheetIndex: number;
1415
+ }
1416
+ interface XlsxVanillaViewerOptions extends UseXlsxViewerControllerOptions {
1417
+ highlightedRanges?: string | readonly string[] | null;
1418
+ autoScrollToHighlightedRanges?: boolean;
1419
+ highlightClassName?: string;
1420
+ className?: string;
1421
+ emptyState?: XlsxVanillaContent;
1422
+ enableCanvasSelectionAnimation?: boolean;
1423
+ enableGestureZoom?: boolean;
1424
+ experimentalCanvas?: boolean;
1425
+ errorState?: XlsxVanillaContent | ((error: Error) => XlsxVanillaContent);
1426
+ fileTooLargeState?: XlsxVanillaContent | ((props: XlsxVanillaFileTooLargeRenderProps) => XlsxVanillaContent);
1427
+ getCellStyle?: (context: XlsxVanillaCellStyleContext) => XlsxVanillaStyle | null | undefined;
1428
+ headerBackgroundColor?: string;
1429
+ headerTextColor?: string;
1430
+ height?: XlsxVanillaStyle["height"];
1431
+ isDark?: boolean;
1432
+ loadingState?: XlsxVanillaContent;
1433
+ onFormControlAction?: (event: XlsxFormControlActionEvent) => void;
1434
+ onFormControlChange?: (event: XlsxFormControlChangeEvent) => void;
1435
+ renderChartLoading?: (props: XlsxVanillaChartLoadingRenderProps) => XlsxVanillaContent;
1436
+ renderContextMenu?: (props: XlsxVanillaContextMenuRenderProps) => XlsxVanillaContent;
1437
+ enableContextMenu?: boolean;
1438
+ contextMenuClassName?: string;
1439
+ contextMenuStyle?: XlsxVanillaStyle & {
1440
+ [property: `--${string}`]: string | number | undefined;
1441
+ };
1442
+ renderFormControl?: (props: XlsxVanillaFormControlRenderProps) => XlsxVanillaContent;
1443
+ renderImage?: (props: XlsxVanillaImageRenderProps) => XlsxVanillaContent;
1444
+ rounded?: boolean;
1445
+ selectionColor?: string;
1446
+ selectionFillColor?: string;
1447
+ selectionHeaderColor?: string;
1448
+ renderActiveCellOverlay?: (props: XlsxActiveCellOverlayRenderProps) => XlsxVanillaContent;
1449
+ showImages?: boolean;
1450
+ showDefaultToolbar?: boolean;
1451
+ toolbar?: XlsxVanillaContent | ((controller: XlsxViewerController) => XlsxVanillaContent);
1452
+ }
1453
+ interface XlsxVanillaViewer {
1454
+ readonly element: HTMLElement;
1455
+ getController(): XlsxViewerController | null;
1456
+ reload(): void;
1457
+ setOptions(options: Partial<XlsxVanillaViewerOptions>): void;
1458
+ subscribe(listener: (controller: XlsxViewerController) => void): () => void;
1459
+ destroy(): void;
1460
+ }
1461
+
1462
+ declare function formatBinaryBytes(bytes: number): string;
1463
+ declare class XlsxFileSizeLimitExceededError extends Error {
1464
+ fileSizeBytes: number;
1465
+ maxFileSizeBytes: number;
1466
+ constructor(fileSizeBytes: number, maxFileSizeBytes: number);
1467
+ }
1468
+
1469
+ type XlsxWasmSource = string | URL | Request | Response | BufferSource | WebAssembly.Module;
1470
+ type WorkerWasmSource = string | ArrayBuffer | WebAssembly.Module;
1471
+ declare function setWasmSource(source: XlsxWasmSource): void;
1472
+ declare function initWasm(source?: XlsxWasmSource): Promise<typeof _dukelib_sheets_wasm>;
1473
+ declare function canUseConfiguredWasmSourceInWorker(): boolean;
1474
+ declare function getConfiguredWorkerWasmSource(): WorkerWasmSource | undefined;
1475
+ declare function getSheetsWasmModule(): Promise<typeof _dukelib_sheets_wasm>;
1476
+
1477
+ declare class XlsxViewer implements XlsxVanillaViewer {
1478
+ readonly element: HTMLElement;
1479
+ private readonly viewer;
1480
+ constructor(container: Element | DocumentFragment, options?: XlsxVanillaViewerOptions);
1481
+ getController(): XlsxViewerController | null;
1482
+ setOptions(options: Partial<XlsxVanillaViewerOptions>): void;
1483
+ reload(): void;
1484
+ subscribe(listener: (controller: XlsxViewerController) => void): () => void;
1485
+ destroy(): void;
1486
+ }
1487
+ declare function createXlsxViewer(container: Element | DocumentFragment, options?: XlsxVanillaViewerOptions): XlsxViewer;
1488
+ declare function __createControlledViewer(container: Element | DocumentFragment): {
1489
+ update(props: unknown): void;
1490
+ destroy(): void;
1491
+ };
1492
+ declare function __createContentNode(node: Node): unknown;
1493
+ declare function __createContentRoot(container: Element): {
1494
+ update(content: unknown): void;
1495
+ destroy(): void;
1496
+ };
1497
+
1498
+ export { type XlsxFormControlState as $, type XlsxClipboardData as A, type XlsxConditionalColorScaleRule as B, type XlsxConditionalDataBarRule as C, type XlsxConditionalFormatIcon as D, type XlsxConditionalFormatRule as E, type XlsxConditionalFormatValueObject as F, type XlsxConditionalIconSetRule as G, type XlsxConditionalStyledRule as H, type XlsxContextMenuAction as I, type XlsxContextMenuActionId as J, type XlsxContextMenuContext as K, type XlsxDataValidation as L, type XlsxDrawingLayout as M, XlsxFileSizeLimitExceededError as N, type XlsxFormControl as O, type XlsxFormControlActionEvent as P, type XlsxFormControlCaption as Q, type XlsxFormControlCaptionInput as R, type XlsxFormControlCaptionRun as S, type XlsxFormControlChangeEvent as T, type UseXlsxViewerControllerOptions as U, type XlsxFormControlInput as V, type XlsxFormControlKind as W, type XlsxParsedRange as X, type XlsxFormControlKindInput as Y, type XlsxFormControlPatch as Z, type XlsxFormControlSelectionMode as _, type UseXlsxViewerThumbnailsOptions as a, type XlsxFormulaTarget as a0, type XlsxFreezePanes as a1, type XlsxHighlightRangeOptions as a2, type XlsxImage as a3, type XlsxImageAnchor as a4, type XlsxImageMarker as a5, type XlsxImageRect as a6, type XlsxImageResizeHandlePosition as a7, type XlsxMergeMode as a8, type XlsxRangeHighlight as a9, type XlsxVanillaStyle as aA, type XlsxVanillaViewer as aB, type XlsxVanillaViewerOptions as aC, XlsxViewer as aD, type XlsxViewerCharts as aE, type XlsxViewerController as aF, type XlsxViewerEditing as aG, type XlsxViewerImages as aH, type XlsxViewerSelection as aI, type XlsxViewerTables as aJ, type XlsxViewerThumbnails as aK, type XlsxViewerZoom as aL, type XlsxWasmSource as aM, type XlsxWorkbookTab as aN, createXlsxViewer as aO, initWasm as aP, setWasmSource as aQ, type WorkerWasmSource as aR, __createContentNode as aS, __createContentRoot as aT, __createControlledViewer as aU, canUseConfiguredWasmSourceInWorker as aV, formatBinaryBytes as aW, getConfiguredWorkerWasmSource as aX, getSheetsWasmModule as aY, type XlsxResolvedCellStyle as aa, type XlsxShape as ab, type XlsxShapeFill as ac, type XlsxShapeParagraph as ad, type XlsxShapeStroke as ae, type XlsxShapeTextBox as af, type XlsxShapeTextRun as ag, type XlsxSheetData as ah, type XlsxSheetThumbnail as ai, type XlsxSheetThumbnailResolution as aj, type XlsxSheetVisibility as ak, type XlsxSparkline as al, type XlsxTable as am, type XlsxTableColumn as an, type XlsxTableSortDirection as ao, type XlsxTableSortState as ap, type XlsxTableStyleDefinition as aq, type XlsxTableStyleInfo as ar, type XlsxThemePalette as as, type XlsxVanillaCellStyleContext as at, type XlsxVanillaChartLoadingRenderProps as au, type XlsxVanillaContent as av, type XlsxVanillaContextMenuRenderProps as aw, type XlsxVanillaFileTooLargeRenderProps as ax, type XlsxVanillaFormControlRenderProps as ay, type XlsxVanillaImageRenderProps as az, type XlsxActiveCellOverlayRenderProps as b, type XlsxCellAddress as c, type XlsxCellAlignmentInput as d, type XlsxCellBorderEdgeInput as e, type XlsxCellBorderStyleInput as f, type XlsxCellFillStyleInput as g, type XlsxCellFontStyleInput as h, type XlsxCellGradientStopInput as i, type XlsxCellNumberFormatInput as j, type XlsxCellProtectionInput as k, type XlsxCellRange as l, type XlsxCellStyleColorInput as m, type XlsxCellStyleInput as n, type XlsxChart as o, type XlsxChartAxis as p, type XlsxChartDataLabels as q, type XlsxChartElementSelection as r, type XlsxChartLegend as s, type XlsxChartPointDataLabel as t, type XlsxChartPointStyle as u, type XlsxChartReference as v, type XlsxChartSeries as w, type XlsxChartTypeGroup as x, type XlsxChartWall as y, type XlsxChartsheet as z };