@silurus/ooxml 0.76.2 → 0.77.1

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 (34) hide show
  1. package/README.md +144 -32
  2. package/dist/{canvas-viewer-mechanics-CwVSOYke.js → canvas-viewer-mechanics-D5zXbOrS.js} +319 -153
  3. package/dist/{document-pull-client-B-3_7_YS.js → document-pull-client-CC8pPuzi.js} +2361 -2253
  4. package/dist/{docx-C6B98B4-.js → docx-Dg9N9OX4.js} +623 -202
  5. package/dist/docx.mjs +4 -4
  6. package/dist/docx_parser_bg.wasm +0 -0
  7. package/dist/index.mjs +3 -3
  8. package/dist/{line-distribute-C1r2zvji.js → line-distribute-BtfPlM2A.js} +133 -72
  9. package/dist/{line-metrics-BdCACYlq.js → line-metrics-B66x33iy.js} +1446 -1340
  10. package/dist/node.mjs +7 -7
  11. package/dist/pptx-BFP7Isgf.js +2123 -0
  12. package/dist/pptx.mjs +5 -5
  13. package/dist/pptx_parser_bg.wasm +0 -0
  14. package/dist/{render-CLcpSi0m.js → render-D-cOpMLV.js} +1 -1
  15. package/dist/render-worker-host-BzpMoFRr.js +27 -0
  16. package/dist/render-worker-host-CdZ5hW2X.js +27 -0
  17. package/dist/render-worker-host-quqYq02i.js +27 -0
  18. package/dist/{resource-measurement-E_S_iau4.js → resource-measurement-CVfVTQrt.js} +1 -1
  19. package/dist/{session-B4Y54cbT.js → session-DxAVpIP-.js} +2 -2
  20. package/dist/{slide-pull-client-WCuYCjio.js → slide-pull-client-Lag44QA8.js} +1173 -876
  21. package/dist/types/docx.d.ts +172 -28
  22. package/dist/types/index.d.ts +498 -88
  23. package/dist/types/node.d.ts +133 -22
  24. package/dist/types/pptx.d.ts +166 -10
  25. package/dist/types/xlsx.d.ts +248 -54
  26. package/dist/{worksheet-pull-client-YzjJMOns.js → worksheet-pull-client-D74b_23i.js} +2 -2
  27. package/dist/{xlsx-EykJ9tPV.js → xlsx-Bik59Raj.js} +2090 -1224
  28. package/dist/xlsx.mjs +5 -5
  29. package/dist/xlsx_parser_bg.wasm +0 -0
  30. package/package.json +1 -1
  31. package/dist/pptx-CKAk5e-J.js +0 -1735
  32. package/dist/render-worker-host-Bkf1jUcW.js +0 -27
  33. package/dist/render-worker-host-CKOmXdyr.js +0 -27
  34. package/dist/render-worker-host-Dpv-nKHY.js +0 -27
@@ -10,7 +10,7 @@ interface MathRenderer {
10
10
  mathMLToSvg(mathml: string): Promise<MathSvg>;
11
11
  }
12
12
  //#endregion
13
- //#region dist/.types-work/hyperlink-BnJnsq2_.d.ts
13
+ //#region dist/.types-work/hyperlink-JmvHU-7y.d.ts
14
14
  type MathStyle = 'roman' | 'italic' | 'bold' | 'boldItalic';
15
15
  interface MathRun {
16
16
  kind: 'run';
@@ -115,6 +115,68 @@ interface MathBorderBox {
115
115
  base: MathNode[];
116
116
  }
117
117
  type MathNode = MathRun | MathFraction | MathScript | MathNary | MathDelimiter | MathRadical | MathLimit | MathArray | MathGroupChr | MathBar | MathAccent | MathFunc | MathGroup | MathPhant | MathSPre | MathBox | MathBorderBox;
118
+ interface Duotone$1 {
119
+ clr1: string;
120
+ clr2: string;
121
+ }
122
+ type Fill = SolidFill | NoFill | GradientFill | PatternFill | ImageFill;
123
+ interface SolidFill {
124
+ fillType: 'solid';
125
+ color: string;
126
+ }
127
+ interface NoFill {
128
+ fillType: 'none';
129
+ }
130
+ interface GradientStop {
131
+ position: number;
132
+ color: string;
133
+ }
134
+ interface GradientFill {
135
+ fillType: 'gradient';
136
+ stops: GradientStop[];
137
+ angle: number;
138
+ gradType: string;
139
+ scaled?: boolean;
140
+ path?: 'shape' | 'circle' | 'rect' | string;
141
+ fillToRect?: FillRect;
142
+ tileRect?: FillRect;
143
+ flip?: 'none' | 'x' | 'y' | 'xy' | string;
144
+ rotWithShape?: boolean;
145
+ }
146
+ interface PatternFill {
147
+ fillType: 'pattern';
148
+ fg: string;
149
+ bg: string;
150
+ preset: string;
151
+ }
152
+ interface FillRect {
153
+ l?: number;
154
+ t?: number;
155
+ r?: number;
156
+ b?: number;
157
+ }
158
+ interface TileInfo {
159
+ tx: number;
160
+ ty: number;
161
+ sx: number;
162
+ sy: number;
163
+ flip: string;
164
+ algn?: string;
165
+ }
166
+ interface ImageFill {
167
+ fillType: 'image';
168
+ imagePath: string;
169
+ mimeType: string;
170
+ fillRect?: FillRect;
171
+ tile?: TileInfo;
172
+ alpha?: number;
173
+ duotone?: Duotone$1;
174
+ }
175
+ interface ArrowEnd {
176
+ type: string;
177
+ w: string;
178
+ len: string;
179
+ }
118
180
  type SpaceLine = {
119
181
  type: 'pct';
120
182
  val: number;
@@ -372,9 +434,14 @@ interface LegendManualLayout {
372
434
  w: number;
373
435
  h: number;
374
436
  }
437
+ interface ChartRect {
438
+ x: number;
439
+ y: number;
440
+ w: number;
441
+ h: number;
442
+ }
375
443
  type OoxmlErrorCode = 'encrypted' | 'invalid-password' | 'unsupported-encryption' | 'legacy-binary-format' | 'not-ooxml';
376
444
  type OoxmlErrorStage = 'container' | 'decompression' | 'parsing' | 'serialization' | 'layout' | 'rendering' | 'worker';
377
- type OoxmlErrorSource = 'container' | 'zip-part' | 'parser' | 'serializer' | 'layout' | 'renderer' | 'worker';
378
445
  declare class OoxmlError extends Error {
379
446
  readonly code: OoxmlErrorCode;
380
447
  constructor(code: OoxmlErrorCode, message: string);
@@ -475,7 +542,11 @@ type HyperlinkTarget = {
475
542
  };
476
543
  declare function openExternalHyperlink(url: string, allowed?: readonly string[], win?: Pick<Window, 'open'> | undefined): boolean;
477
544
  //#endregion
478
- //#region dist/.types-work/find-highlight-DkZhNxUb.d.ts
545
+ //#region dist/.types-work/find-highlight-DcNlrW8O.d.ts
546
+ interface ViewerContextMenuEvent<TContext> {
547
+ readonly originalEvent: MouseEvent;
548
+ getContext(): Promise<TContext | null>;
549
+ }
479
550
  interface AutoResizeOptions {
480
551
  pauseWhenHidden?: boolean;
481
552
  }
@@ -501,7 +572,12 @@ interface FindHighlightColors {
501
572
  active?: string;
502
573
  }
503
574
  //#endregion
504
- //#region dist/.types-work/xlsx-DrRsBH8s.d.ts
575
+ //#region dist/.types-work/xlsx-3u8ip-lC.d.ts
576
+ type ShapeFill = Exclude<Fill, {
577
+ fillType: 'image';
578
+ } | {
579
+ fillType: 'none';
580
+ }>;
505
581
  interface Workbook {
506
582
  sheets: SheetMeta[];
507
583
  date1904?: boolean;
@@ -543,7 +619,7 @@ interface Worksheet {
543
619
  rightToLeft?: boolean;
544
620
  outlinePr?: OutlinePr;
545
621
  tabColor?: string | null;
546
- autoFilter?: CellRange$1 | null;
622
+ autoFilter?: WorksheetCellRange | null;
547
623
  hyperlinks?: Hyperlink[];
548
624
  commentRefs?: string[];
549
625
  comments?: XlsxComment[];
@@ -574,7 +650,7 @@ interface PivotTableMetadata {
574
650
  status: PivotMetadataStatus;
575
651
  extensionUris?: string[];
576
652
  }
577
- interface PivotLocation extends CellRange$1 {
653
+ interface PivotLocation extends WorksheetCellRange {
578
654
  firstHeaderRow: number;
579
655
  firstDataRow: number;
580
656
  firstDataCol: number;
@@ -717,7 +793,7 @@ interface SlicerElementStyle {
717
793
  borderColor?: string;
718
794
  }
719
795
  interface TableInfo {
720
- range: CellRange$1;
796
+ range: WorksheetCellRange;
721
797
  styleName: string;
722
798
  headerRowCount: number;
723
799
  totalsRowCount: number;
@@ -762,12 +838,6 @@ interface DataValidation {
762
838
  errorTitle?: string;
763
839
  errorMessage?: string;
764
840
  }
765
- type XlsxChartSeries = ChartSeries;
766
- type SeriesDataLabels = ChartSeriesDataLabels;
767
- type DataLabelOverride = ChartDataLabelOverride;
768
- type DataPointOverride = ChartDataPointOverride;
769
- type ErrBars = ChartErrBars;
770
- type ManualLayout = ChartManualLayout;
771
841
  interface ChartAnchor {
772
842
  fromCol: number;
773
843
  fromColOff: number;
@@ -802,8 +872,26 @@ interface ShapeInfo {
802
872
  flipH?: boolean;
803
873
  flipV?: boolean;
804
874
  fillColor?: string;
875
+ fill?: ShapeFill;
805
876
  strokeColor?: string;
806
877
  strokeWidth: number;
878
+ strokeFill?: Exclude<Fill, {
879
+ fillType: 'image';
880
+ } | {
881
+ fillType: 'none';
882
+ }>;
883
+ strokeDashStyle?: string;
884
+ strokeCustomDash?: Array<{
885
+ dash: number;
886
+ space: number;
887
+ }>;
888
+ strokeLineCap?: 'butt' | 'round' | 'square';
889
+ strokeLineJoin?: 'round' | 'bevel' | 'miter';
890
+ strokeMiterLimit?: number;
891
+ strokeAlignment?: 'ctr' | 'in';
892
+ strokeCmpd?: string;
893
+ strokeHeadEnd?: ArrowEnd;
894
+ strokeTailEnd?: ArrowEnd;
807
895
  geom: ShapeGeom;
808
896
  text?: ShapeText;
809
897
  }
@@ -932,7 +1020,7 @@ interface ImageAnchor {
932
1020
  alpha?: number;
933
1021
  duotone?: Duotone;
934
1022
  }
935
- interface CellRange$1 {
1023
+ interface WorksheetCellRange {
936
1024
  top: number;
937
1025
  left: number;
938
1026
  bottom: number;
@@ -946,7 +1034,7 @@ interface Hyperlink {
946
1034
  display?: string | null;
947
1035
  }
948
1036
  interface ConditionalFormat {
949
- sqref: CellRange$1[];
1037
+ sqref: WorksheetCellRange[];
950
1038
  rules: CfRule[];
951
1039
  }
952
1040
  type CfRule = {
@@ -1181,7 +1269,7 @@ interface XlsxTextRunInfo {
1181
1269
  row: number;
1182
1270
  col: number;
1183
1271
  }
1184
- interface RenderViewportOptions {
1272
+ interface XlsxRenderViewportOptions {
1185
1273
  width?: number;
1186
1274
  height?: number;
1187
1275
  dpr?: number;
@@ -1192,8 +1280,6 @@ interface RenderViewportOptions {
1192
1280
  freezeRows?: number;
1193
1281
  freezeCols?: number;
1194
1282
  cellScale?: number;
1195
- loadedImages?: Map<string, CanvasImageSource | null>;
1196
- fetchImage?: (path: string, mimeType: string) => Promise<Blob>;
1197
1283
  onTextRun?: (info: XlsxTextRunInfo) => void;
1198
1284
  selectedRowRange?: {
1199
1285
  start: number;
@@ -1213,12 +1299,9 @@ type ResolvedList = {
1213
1299
  kind: 'formula';
1214
1300
  formula: string;
1215
1301
  };
1216
- interface WireSizeOverrides {
1217
- rows?: Record<number, number | null>;
1218
- cols?: Record<number, number | null>;
1219
- }
1220
- type WireRenderViewportOptions = Omit<RenderViewportOptions, 'onTextRun' | 'loadedImages' | 'fetchImage'> & {
1221
- sizeOverrides?: WireSizeOverrides;
1302
+ type RenderViewportToBitmapOptions = Omit<XlsxRenderViewportOptions, 'onTextRun'> & {
1303
+ width: number;
1304
+ height: number;
1222
1305
  };
1223
1306
  interface LoadOptions extends LoadOptions$1 {
1224
1307
  mode?: 'main' | 'worker';
@@ -1267,16 +1350,97 @@ declare class XlsxWorkbook {
1267
1350
  toMarkdown(): Promise<string>;
1268
1351
  resolveValidationList(sheetIndex: number, formula1: string | undefined): Promise<ResolvedList>;
1269
1352
  cellText(ws: Worksheet, cell: Cell): string;
1270
- renderViewport(target: HTMLCanvasElement | OffscreenCanvas, sheetIndex: number, viewport: ViewportRange, opts?: RenderViewportOptions): Promise<void>;
1271
- renderViewportToBitmap(sheetIndex: number, viewport: ViewportRange, opts: WireRenderViewportOptions & {
1272
- width: number;
1273
- height: number;
1274
- }): Promise<ImageBitmap>;
1353
+ renderViewport(target: HTMLCanvasElement | OffscreenCanvas, sheetIndex: number, viewport: ViewportRange, opts?: XlsxRenderViewportOptions): Promise<void>;
1354
+ renderViewportToBitmap(sheetIndex: number, viewport: ViewportRange, opts: RenderViewportToBitmapOptions): Promise<ImageBitmap>;
1275
1355
  private withWorksheetArchiveOperation;
1276
1356
  destroy(): void;
1277
1357
  private assertResourceHealthy;
1278
1358
  }
1279
1359
  type CanvasViewerRenderMode = 'main' | 'worker';
1360
+ interface CellAddress {
1361
+ row: number;
1362
+ col: number;
1363
+ }
1364
+ type XlsxSelectionArea = Readonly<{
1365
+ kind: 'cells';
1366
+ top: number;
1367
+ left: number;
1368
+ bottom: number;
1369
+ right: number;
1370
+ }> | Readonly<{
1371
+ kind: 'rows';
1372
+ firstRow: number;
1373
+ lastRow: number;
1374
+ }> | Readonly<{
1375
+ kind: 'columns';
1376
+ firstColumn: number;
1377
+ lastColumn: number;
1378
+ }> | Readonly<{
1379
+ kind: 'sheet';
1380
+ }>;
1381
+ interface XlsxSelectionState {
1382
+ readonly areas: readonly XlsxSelectionArea[];
1383
+ readonly activeAreaIndex: number;
1384
+ readonly activeCell: CellAddress;
1385
+ readonly extensionAnchor: CellAddress;
1386
+ }
1387
+ type XlsxSelectionInput = string | XlsxSelectionState | null;
1388
+ interface XlsxSelectionContextOptions {
1389
+ readonly maxCells?: number;
1390
+ readonly maxTextCharacters?: number;
1391
+ }
1392
+ interface XlsxSelectionContextCell {
1393
+ readonly address: CellAddress;
1394
+ readonly displayText: string;
1395
+ readonly valueType: 'empty' | 'text' | 'number' | 'bool' | 'error' | 'shared';
1396
+ readonly value: string | number | boolean | null;
1397
+ readonly formula?: string;
1398
+ }
1399
+ interface XlsxRangeSelectionContext {
1400
+ readonly format: 'xlsx';
1401
+ readonly kind: 'range';
1402
+ readonly sheetIndex: number;
1403
+ readonly sheetName: string;
1404
+ readonly selection: XlsxSelectionState;
1405
+ readonly coordinateCountUpperBound: number;
1406
+ readonly cells: readonly XlsxSelectionContextCell[];
1407
+ readonly truncated: boolean;
1408
+ readonly truncationReasons: readonly ('cells' | 'text')[];
1409
+ readonly maxCells: number;
1410
+ readonly textCharacters: number;
1411
+ readonly maxTextCharacters: number;
1412
+ }
1413
+ interface XlsxElementAnchorMarker {
1414
+ readonly row: number;
1415
+ readonly col: number;
1416
+ readonly offsetX: number;
1417
+ readonly offsetY: number;
1418
+ }
1419
+ interface XlsxElementContext {
1420
+ readonly format: 'xlsx';
1421
+ readonly kind: 'element';
1422
+ readonly sheetIndex: number;
1423
+ readonly sheetName: string;
1424
+ readonly elementType: 'chart' | 'image' | 'shape';
1425
+ readonly elementIndex: number;
1426
+ readonly shapeIndex?: number;
1427
+ readonly anchor: Readonly<{
1428
+ from: XlsxElementAnchorMarker;
1429
+ to: XlsxElementAnchorMarker;
1430
+ }>;
1431
+ readonly text?: string;
1432
+ readonly mimeType?: string;
1433
+ readonly seriesCount?: number;
1434
+ readonly shapeCount?: number;
1435
+ readonly truncated: boolean;
1436
+ readonly truncationReasons: readonly ('text')[];
1437
+ readonly textCharacters: number;
1438
+ readonly maxTextCharacters: number;
1439
+ }
1440
+ type XlsxSelectionContext = XlsxRangeSelectionContext | XlsxElementContext;
1441
+ declare const MAX_SELECTION_AREAS = 128;
1442
+ declare const MAX_SELECTION_CONTEXT_CELLS = 10000;
1443
+ declare const MAX_SELECTION_CONTEXT_TEXT_CHARACTERS: number;
1280
1444
  interface XlsxMatchLocation {
1281
1445
  sheet: number;
1282
1446
  sheetName: string;
@@ -1285,7 +1449,7 @@ interface XlsxMatchLocation {
1285
1449
  col: number;
1286
1450
  }
1287
1451
  type HiddenSheetMode = 'show' | 'skip' | 'dim';
1288
- interface XlsxSheetViewerOptions extends LoadOptions$1 {
1452
+ interface XlsxSheetViewerOptions extends LoadOptions {
1289
1453
  cellScale?: number;
1290
1454
  resizable?: boolean;
1291
1455
  showScrollbars?: boolean;
@@ -1295,12 +1459,14 @@ interface XlsxSheetViewerOptions extends LoadOptions$1 {
1295
1459
  onReady?: (sheetNames: string[]) => void;
1296
1460
  onSheetChange?: (index: number, total: number) => void;
1297
1461
  onError?: (err: Error) => void;
1298
- onSelectionChange?: (selection: CellRange | null) => void;
1462
+ onSelectionStateChange?: (selection: XlsxSelectionState | null) => void;
1463
+ onSelectionContextChange?: (context: XlsxSelectionContext | null) => void;
1464
+ onContextMenu?: (event: ViewerContextMenuEvent<XlsxSelectionContext>) => void;
1465
+ enableElementSelection?: boolean;
1299
1466
  onHyperlinkClick?: (target: HyperlinkTarget) => void;
1300
1467
  enableHyperlinks?: boolean;
1301
1468
  selectionColor?: string;
1302
1469
  findHighlightColors?: FindHighlightColors;
1303
- mode?: 'main' | 'worker';
1304
1470
  hiddenSheetMode?: HiddenSheetMode;
1305
1471
  onViewportChange?: (offset: XlsxViewportOffset) => void;
1306
1472
  }
@@ -1314,16 +1480,22 @@ interface XlsxViewportOffset {
1314
1480
  interface XlsxScrollToCellOptions {
1315
1481
  readonly align?: 'nearest' | 'start' | 'center' | 'end';
1316
1482
  }
1317
- interface CellAddress {
1318
- row: number;
1319
- col: number;
1320
- }
1321
- type SelectionMode = 'cells' | 'rows' | 'cols' | 'all';
1322
- interface CellRange {
1323
- anchor: CellAddress;
1324
- active: CellAddress;
1325
- mode: SelectionMode;
1326
- }
1483
+ type XlsxCopyResult = Readonly<{
1484
+ status: 'copied';
1485
+ cellCount: number;
1486
+ utf16CodeUnits: number;
1487
+ }> | Readonly<{
1488
+ status: 'empty-selection';
1489
+ }> | Readonly<{
1490
+ status: 'unsupported-multiple-areas';
1491
+ }> | Readonly<{
1492
+ status: 'too-large';
1493
+ limit: 'cells' | 'text';
1494
+ }> | Readonly<{
1495
+ status: 'clipboard-unavailable';
1496
+ }> | Readonly<{
1497
+ status: 'clipboard-denied';
1498
+ }>;
1327
1499
  type XlsxViewerMount = {
1328
1500
  readonly kind: 'composite';
1329
1501
  } | {
@@ -1383,22 +1555,30 @@ declare class XlsxViewerEngine implements ZoomableViewer {
1383
1555
  private resizeObserver;
1384
1556
  private _lastViewportNotification;
1385
1557
  private get anchorCell();
1386
- private set anchorCell(value);
1387
1558
  private get activeCell();
1388
- private set activeCell(value);
1389
1559
  private get selectionMode();
1390
- private set selectionMode(value);
1391
1560
  private get isSelecting();
1392
1561
  private get selectionPointerId();
1393
1562
  private beginSelectionDrag;
1394
1563
  private _pendingZoomAnchor;
1395
1564
  private readonly selectionController;
1565
+ private lastNotifiedSelectionState;
1566
+ private emittingSelectionChange;
1567
+ private pendingSelectionChange;
1568
+ private selectionNotificationScheduled;
1569
+ private selectionNotificationCount;
1570
+ private selectionContextNotificationFrame;
1571
+ private selectionContextNotificationMicrotask;
1572
+ private readonly selectionContextRows;
1573
+ private readonly selectionContextCells;
1574
+ private elementContext;
1396
1575
  private selectionOverlay;
1397
1576
  private findOverlay;
1398
1577
  private _find;
1399
1578
  private keydownHandler;
1400
1579
  private pendingTap;
1401
1580
  private pendingClick;
1581
+ private pendingElementClick;
1402
1582
  private resizeDrag;
1403
1583
  private selectionAutoScrollPointer;
1404
1584
  private selectionAutoScrollFrame;
@@ -1423,7 +1603,7 @@ declare class XlsxViewerEngine implements ZoomableViewer {
1423
1603
  private get workbook();
1424
1604
  private get wb();
1425
1605
  private set wb(value);
1426
- showSheet(index: number): Promise<void>;
1606
+ private showSheet;
1427
1607
  private isCurrentSheetRequest;
1428
1608
  private buildOutline;
1429
1609
  private layoutGutters;
@@ -1466,9 +1646,18 @@ declare class XlsxViewerEngine implements ZoomableViewer {
1466
1646
  private _stepSheet;
1467
1647
  private _initialSheet;
1468
1648
  getCellAt(clientX: number, clientY: number): CellAddress | null;
1649
+ private elementContextViewport;
1650
+ private elementContextAt;
1469
1651
  private getCellRect;
1470
- get selection(): CellRange | null;
1471
- select(ref: string): void;
1652
+ get selectionState(): XlsxSelectionState | null;
1653
+ setSelection(input: XlsxSelectionInput): void;
1654
+ getSelectionContext(options?: XlsxSelectionContextOptions): XlsxSelectionContext | null;
1655
+ private commitSelection;
1656
+ private setElementContext;
1657
+ private scheduleSelectionContextNotification;
1658
+ private emitSelectionChange;
1659
+ private scheduleSelectionNotification;
1660
+ private finishSelectionNotificationChain;
1472
1661
  private getHeaderHit;
1473
1662
  private getResizeTarget;
1474
1663
  private applyResize;
@@ -1476,8 +1665,9 @@ declare class XlsxViewerEngine implements ZoomableViewer {
1476
1665
  setHiddenSheetMode(mode: HiddenSheetMode): Promise<void>;
1477
1666
  get hiddenSheetMode(): HiddenSheetMode;
1478
1667
  get visibleSheetCount(): number;
1479
- private copySelection;
1668
+ copySelection(): Promise<XlsxCopyResult>;
1480
1669
  private updateSelectionOverlay;
1670
+ private drawElementContextOverlay;
1481
1671
  private maybeDrawValidationDropdown;
1482
1672
  private updateFindOverlay;
1483
1673
  findText(query: string, opts?: FindMatchesOptions): Promise<FindMatch<XlsxMatchLocation>[]>;
@@ -1508,6 +1698,8 @@ declare class XlsxViewerEngine implements ZoomableViewer {
1508
1698
  private trackSelectionAutoScroll;
1509
1699
  private runSelectionAutoScroll;
1510
1700
  private stopSelectionAutoScroll;
1701
+ private contextMenuTargetIsSelected;
1702
+ private resolveContextMenuContext;
1511
1703
  private setupSelectionEvents;
1512
1704
  private buildTabs;
1513
1705
  private makeNavButton;
@@ -1542,7 +1734,7 @@ declare class XlsxViewerEngine implements ZoomableViewer {
1542
1734
  private destroyedError;
1543
1735
  }
1544
1736
  declare class XlsxViewer extends XlsxViewerEngine {
1545
- static fromWorkbook(container: HTMLElement, workbook: XlsxWorkbook, opts?: Omit<XlsxViewerOptions, keyof LoadOptions$1>): Omit<XlsxViewer, 'load'>;
1737
+ static fromWorkbook(container: HTMLElement, workbook: XlsxWorkbook, opts?: Omit<XlsxViewerOptions, keyof LoadOptions>): Omit<XlsxViewer, 'load'>;
1546
1738
  constructor(container: HTMLElement, opts?: XlsxViewerOptions);
1547
1739
  }
1548
1740
  declare class XlsxSheetViewer implements ZoomableViewer {
@@ -1552,7 +1744,7 @@ declare class XlsxSheetViewer implements ZoomableViewer {
1552
1744
  private destroyed;
1553
1745
  private snapshot;
1554
1746
  private lastMetrics;
1555
- static fromWorkbook(canvasElement: HTMLCanvasElement, workbook: XlsxWorkbook, options?: Omit<XlsxSheetViewerOptions, keyof LoadOptions$1>): Omit<XlsxSheetViewer, 'load'>;
1747
+ static fromWorkbook(canvasElement: HTMLCanvasElement, workbook: XlsxWorkbook, options?: Omit<XlsxSheetViewerOptions, keyof LoadOptions>): Omit<XlsxSheetViewer, 'load'>;
1556
1748
  constructor(canvasElement: HTMLCanvasElement, options?: XlsxSheetViewerOptions);
1557
1749
  load(source: string | ArrayBuffer): Promise<void>;
1558
1750
  get sheetIndex(): number;
@@ -1572,8 +1764,10 @@ declare class XlsxSheetViewer implements ZoomableViewer {
1572
1764
  fitWidth(): void;
1573
1765
  fitPage(): void;
1574
1766
  getCellAt(clientX: number, clientY: number): CellAddress | null;
1575
- get selection(): CellRange | null;
1576
- select(ref: string): void;
1767
+ get selectionState(): XlsxSelectionState | null;
1768
+ setSelection(selection: XlsxSelectionInput): void;
1769
+ getSelectionContext(options?: XlsxSelectionContextOptions): XlsxSelectionContext | null;
1770
+ copySelection(): Promise<XlsxCopyResult>;
1577
1771
  setSelectionColor(color: string): void;
1578
1772
  setHiddenSheetMode(mode: HiddenSheetMode): Promise<void>;
1579
1773
  get hiddenSheetMode(): HiddenSheetMode;
@@ -1590,4 +1784,4 @@ declare class XlsxSheetViewer implements ZoomableViewer {
1590
1784
  }
1591
1785
  declare function resolveSharedStrings(ws: Worksheet, sharedStrings: SharedString[]): Worksheet;
1592
1786
  //#endregion
1593
- export { type AutoResizeOptions, type Border, type BorderEdge, type Cell, type CellAddress, type CellFill, type CellFont, type CellRange, type CellValue, type CellXf, type CfIcon, type CfRule, type CfStop, type CfValue, type ChartAnchor, type ChartDataLabelOverride, type ChartDataPointOverride, type ChartErrBars, type ChartManualLayout, type ChartModel, type ChartSeries, type ChartSeriesDataLabels, type ConditionalFormat, type DataLabelOverride, type DataPointOverride, type DataValidation, type DefinedName, type Duotone, type Dxf, type ErrBars, type FindHighlightColors, type FindMatch, type FindMatchesOptions, type GradientFillSpec, type HiddenSheetMode, type Hyperlink, type HyperlinkTarget, type ImageAnchor, type LegendManualLayout, type LoadOptions, type ManualLayout, type MergeCell, type NumFmt, OoxmlDecodedImageLimitError, type OoxmlDecodedImageLimitMetric, OoxmlError, type OoxmlErrorCode, type OoxmlErrorSource, type OoxmlErrorStage, type OoxmlFormat, type OoxmlResourceLimit, OoxmlResourceLimitError, type OoxmlResourceLimitErrorDetails, type OoxmlResourceLimits, type OoxmlResourceMetric, type OoxmlResourceMetrics, type OoxmlResourceMetricsCheckpoint, type OoxmlResourceName, type OoxmlResourcePolicySnapshot, type OoxmlResourceUsageSnapshot, type OoxmlResourceViolation, type OutlinePr, type ParsedWorkbook, type PathCmd, type PathInfo, type PhoneticAlignment, type PhoneticProperties, type PhoneticRun, type PhoneticType, type PivotCacheSource, type PivotDataField, type PivotDiagnostic, type PivotLocation, type PivotMetadataStatus, type PivotPageField, type PivotPartialReason, type PivotTableMetadata, type RenderViewportOptions, type ResolvedList, type Row, type Run, type RunFont, type SelectionMode, type SeriesDataLabels, type ShapeAnchor, type ShapeGeom, type ShapeInfo, type ShapeParagraph, type ShapeText, type ShapeTextRun, type SharedString, type SheetMeta, type SheetVisibility, type SlicerAnchor, type SlicerElementStyle, type SlicerItem, type SlicerStyle, type Sparkline, type SparklineGroup, type Styles, type TableColumnInfo, type TableInfo, type ViewportRange, type WireRenderViewportOptions, type WireSizeOverrides, type Workbook, type Worksheet, type XlsxChartSeries, type XlsxComment, type XlsxMatchLocation, type XlsxScrollToCellOptions, XlsxSheetViewer, type XlsxSheetViewerOptions, type XlsxTextRunInfo, XlsxViewer, type XlsxViewerOptions, type XlsxViewportOffset, XlsxWorkbook, autoResize, isOoxmlDecodedImageLimitError, openExternalHyperlink, resolveSharedStrings };
1787
+ export { type ArrowEnd, type AutoResizeOptions, type Border, type BorderEdge, type Cell, type CellAddress, type CellFill, type CellFont, type CellValue, type CellXf, type CfIcon, type CfRule, type CfStop, type CfValue, type ChartAnchor, type ChartDataLabelOverride, type ChartDataPointOverride, type ChartErrBars, type ChartLabelBox, type ChartManualLayout, type ChartModel, type ChartRect, type ChartSeries, type ChartSeriesDataLabels, type ChartTrendline, type ChartType, type ChartexBoxSeries, type ChartexBoxWhisker, type ChartexSunburst, type ChartexSunburstRow, type ConditionalFormat, type DataValidation, type DefinedName, type Duotone, type Dxf, type FillRect, type FindHighlightColors, type FindMatch, type FindMatchesOptions, type GradientFill, type GradientFillSpec, type GradientStop, type HiddenSheetMode, type Hyperlink, type HyperlinkTarget, type ImageAnchor, type LegendManualLayout, type LoadOptions, MAX_SELECTION_AREAS, MAX_SELECTION_CONTEXT_CELLS, MAX_SELECTION_CONTEXT_TEXT_CHARACTERS, type MathAccent, type MathArray, type MathBar, type MathBorderBox, type MathBox, type MathDelimiter, type MathFraction, type MathFunc, type MathGroup, type MathGroupChr, type MathLimit, type MathNary, type MathNode, type MathPhant, type MathRadical, type MathRenderer, type MathRun, type MathSPre, type MathScript, type MathStyle, type MathSvg, type MergeCell, type NumFmt, OoxmlDecodedImageLimitError, type OoxmlDecodedImageLimitMetric, OoxmlError, type OoxmlErrorCode, type OoxmlErrorStage, type OoxmlFormat, type OoxmlResourceLimit, OoxmlResourceLimitError, type OoxmlResourceLimitErrorDetails, type OoxmlResourceLimits, type OoxmlResourceMetric, type OoxmlResourceMetrics, type OoxmlResourceMetricsCheckpoint, type OoxmlResourceName, type OoxmlResourcePolicySnapshot, type OoxmlResourceUsageSnapshot, type OoxmlResourceViolation, type OutlinePr, type ParsedWorkbook, type PathCmd, type PathInfo, type PatternFill, type PhoneticAlignment, type PhoneticProperties, type PhoneticRun, type PhoneticType, type PivotCacheSource, type PivotDataField, type PivotDiagnostic, type PivotLocation, type PivotMetadataStatus, type PivotPageField, type PivotPartialReason, type PivotTableMetadata, type RenderViewportToBitmapOptions, type ResolvedList, type Row, type Run, type RunFont, type SecondaryValueAxis, type ShapeAnchor, type ShapeFill, type ShapeGeom, type ShapeInfo, type ShapeParagraph, type ShapeText, type ShapeTextRun, type SharedString, type SheetMeta, type SheetVisibility, type SlicerAnchor, type SlicerElementStyle, type SlicerItem, type SlicerStyle, type SolidFill, type SpaceLine, type Sparkline, type SparklineGroup, type Styles, type TableColumnInfo, type TableInfo, type ViewerContextMenuEvent, type ViewportRange, type Workbook, type Worksheet, type WorksheetCellRange, type XlsxComment, type XlsxCopyResult, type XlsxElementAnchorMarker, type XlsxElementContext, type XlsxMatchLocation, type XlsxRangeSelectionContext, type XlsxRenderViewportOptions, type XlsxScrollToCellOptions, type XlsxSelectionArea, type XlsxSelectionContext, type XlsxSelectionContextCell, type XlsxSelectionContextOptions, type XlsxSelectionInput, type XlsxSelectionState, XlsxSheetViewer, type XlsxSheetViewerOptions, type XlsxTextRunInfo, XlsxViewer, type XlsxViewerOptions, type XlsxViewportOffset, XlsxWorkbook, type ZoomableViewer, autoResize, isOoxmlDecodedImageLimitError, openExternalHyperlink, resolveSharedStrings };
@@ -1,5 +1,5 @@
1
- import { $ as e, F as t, I as n, N as r, P as i, Q as a, X as o, Y as s, Z as c, et as l, hn as u, nt as d, ot as f, rt as p, tt as m } from "./line-metrics-BdCACYlq.js";
2
- import { n as h, r as g, t as _ } from "./resource-measurement-E_S_iau4.js";
1
+ import { $ as e, F as t, I as n, N as r, P as i, Q as a, X as o, Y as s, Z as c, et as l, gn as u, nt as d, ot as f, rt as p, tt as m } from "./line-metrics-B66x33iy.js";
2
+ import { n as h, r as g, t as _ } from "./resource-measurement-CVfVTQrt.js";
3
3
  import { t as v } from "./transfer-DCu4c2BL.js";
4
4
  //#region packages/xlsx/src/worksheet-resource-limits.ts
5
5
  var y = d, b = e, x = l, S = m, C = a, w = s, T = o, E = c, D = Object.freeze({