@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.
- package/README.md +144 -32
- package/dist/{canvas-viewer-mechanics-CwVSOYke.js → canvas-viewer-mechanics-D5zXbOrS.js} +319 -153
- package/dist/{document-pull-client-B-3_7_YS.js → document-pull-client-CC8pPuzi.js} +2361 -2253
- package/dist/{docx-C6B98B4-.js → docx-Dg9N9OX4.js} +623 -202
- package/dist/docx.mjs +4 -4
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/index.mjs +3 -3
- package/dist/{line-distribute-C1r2zvji.js → line-distribute-BtfPlM2A.js} +133 -72
- package/dist/{line-metrics-BdCACYlq.js → line-metrics-B66x33iy.js} +1446 -1340
- package/dist/node.mjs +7 -7
- package/dist/pptx-BFP7Isgf.js +2123 -0
- package/dist/pptx.mjs +5 -5
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/{render-CLcpSi0m.js → render-D-cOpMLV.js} +1 -1
- package/dist/render-worker-host-BzpMoFRr.js +27 -0
- package/dist/render-worker-host-CdZ5hW2X.js +27 -0
- package/dist/render-worker-host-quqYq02i.js +27 -0
- package/dist/{resource-measurement-E_S_iau4.js → resource-measurement-CVfVTQrt.js} +1 -1
- package/dist/{session-B4Y54cbT.js → session-DxAVpIP-.js} +2 -2
- package/dist/{slide-pull-client-WCuYCjio.js → slide-pull-client-Lag44QA8.js} +1173 -876
- package/dist/types/docx.d.ts +172 -28
- package/dist/types/index.d.ts +498 -88
- package/dist/types/node.d.ts +133 -22
- package/dist/types/pptx.d.ts +166 -10
- package/dist/types/xlsx.d.ts +248 -54
- package/dist/{worksheet-pull-client-YzjJMOns.js → worksheet-pull-client-D74b_23i.js} +2 -2
- package/dist/{xlsx-EykJ9tPV.js → xlsx-Bik59Raj.js} +2090 -1224
- package/dist/xlsx.mjs +5 -5
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +1 -1
- package/dist/pptx-CKAk5e-J.js +0 -1735
- package/dist/render-worker-host-Bkf1jUcW.js +0 -27
- package/dist/render-worker-host-CKOmXdyr.js +0 -27
- package/dist/render-worker-host-Dpv-nKHY.js +0 -27
package/dist/types/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ interface MathRenderer {
|
|
|
10
10
|
mathMLToSvg(mathml: string): Promise<MathSvg>;
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
|
-
//#region dist/.types-work/hyperlink-
|
|
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';
|
|
@@ -135,6 +135,12 @@ type PathCmd$2 = {
|
|
|
135
135
|
y2: number;
|
|
136
136
|
x: number;
|
|
137
137
|
y: number;
|
|
138
|
+
} | {
|
|
139
|
+
cmd: 'quadBezTo';
|
|
140
|
+
x1: number;
|
|
141
|
+
y1: number;
|
|
142
|
+
x: number;
|
|
143
|
+
y: number;
|
|
138
144
|
} | {
|
|
139
145
|
cmd: 'arcTo';
|
|
140
146
|
wr: number;
|
|
@@ -161,6 +167,12 @@ interface GradientFill {
|
|
|
161
167
|
stops: GradientStop$1[];
|
|
162
168
|
angle: number;
|
|
163
169
|
gradType: string;
|
|
170
|
+
scaled?: boolean;
|
|
171
|
+
path?: 'shape' | 'circle' | 'rect' | string;
|
|
172
|
+
fillToRect?: FillRect;
|
|
173
|
+
tileRect?: FillRect;
|
|
174
|
+
flip?: 'none' | 'x' | 'y' | 'xy' | string;
|
|
175
|
+
rotWithShape?: boolean;
|
|
164
176
|
}
|
|
165
177
|
interface PatternFill {
|
|
166
178
|
fillType: 'pattern';
|
|
@@ -197,6 +209,12 @@ interface Shadow {
|
|
|
197
209
|
blur: number;
|
|
198
210
|
dist: number;
|
|
199
211
|
dir: number;
|
|
212
|
+
sx?: number;
|
|
213
|
+
sy?: number;
|
|
214
|
+
kx?: number;
|
|
215
|
+
ky?: number;
|
|
216
|
+
algn?: 'tl' | 't' | 'tr' | 'l' | 'ctr' | 'r' | 'bl' | 'b' | 'br';
|
|
217
|
+
rotWithShape?: boolean;
|
|
200
218
|
}
|
|
201
219
|
interface Glow {
|
|
202
220
|
color: string;
|
|
@@ -231,7 +249,14 @@ interface Stroke {
|
|
|
231
249
|
fillType: 'none';
|
|
232
250
|
}>;
|
|
233
251
|
dashStyle?: string;
|
|
234
|
-
|
|
252
|
+
customDash?: ReadonlyArray<{
|
|
253
|
+
dash: number;
|
|
254
|
+
space: number;
|
|
255
|
+
}>;
|
|
256
|
+
lineCap?: 'butt' | 'round' | 'square';
|
|
257
|
+
lineJoin?: 'round' | 'bevel' | 'miter';
|
|
258
|
+
miterLimit?: number;
|
|
259
|
+
alignment?: 'ctr' | 'in';
|
|
235
260
|
headEnd?: ArrowEnd;
|
|
236
261
|
tailEnd?: ArrowEnd;
|
|
237
262
|
cmpd?: string;
|
|
@@ -277,6 +302,9 @@ type Bullet$1 = {
|
|
|
277
302
|
numType: string;
|
|
278
303
|
startAt: number | null;
|
|
279
304
|
color: string | null;
|
|
305
|
+
sizePct?: number | null;
|
|
306
|
+
sizePts?: number;
|
|
307
|
+
fontFamily?: string | null;
|
|
280
308
|
};
|
|
281
309
|
interface TabStop$1 {
|
|
282
310
|
pos: number;
|
|
@@ -331,6 +359,7 @@ interface TextRunData {
|
|
|
331
359
|
hyperlink?: string;
|
|
332
360
|
hyperlinkAction?: string;
|
|
333
361
|
shadow?: Shadow;
|
|
362
|
+
reflection?: Reflection;
|
|
334
363
|
outline?: TextOutline;
|
|
335
364
|
highlight?: string;
|
|
336
365
|
}
|
|
@@ -602,9 +631,14 @@ interface LegendManualLayout {
|
|
|
602
631
|
w: number;
|
|
603
632
|
h: number;
|
|
604
633
|
}
|
|
634
|
+
interface ChartRect {
|
|
635
|
+
x: number;
|
|
636
|
+
y: number;
|
|
637
|
+
w: number;
|
|
638
|
+
h: number;
|
|
639
|
+
}
|
|
605
640
|
type OoxmlErrorCode = 'encrypted' | 'invalid-password' | 'unsupported-encryption' | 'legacy-binary-format' | 'not-ooxml';
|
|
606
641
|
type OoxmlErrorStage = 'container' | 'decompression' | 'parsing' | 'serialization' | 'layout' | 'rendering' | 'worker';
|
|
607
|
-
type OoxmlErrorSource = 'container' | 'zip-part' | 'parser' | 'serializer' | 'layout' | 'renderer' | 'worker';
|
|
608
642
|
declare class OoxmlError extends Error {
|
|
609
643
|
readonly code: OoxmlErrorCode;
|
|
610
644
|
constructor(code: OoxmlErrorCode, message: string);
|
|
@@ -705,7 +739,15 @@ type HyperlinkTarget = {
|
|
|
705
739
|
};
|
|
706
740
|
declare function openExternalHyperlink(url: string, allowed?: readonly string[], win?: Pick<Window, 'open'> | undefined): boolean;
|
|
707
741
|
//#endregion
|
|
708
|
-
//#region dist/.types-work/find-highlight-
|
|
742
|
+
//#region dist/.types-work/find-highlight-DcNlrW8O.d.ts
|
|
743
|
+
interface TextSelectionContextOptions {
|
|
744
|
+
readonly maxTextCharacters?: number;
|
|
745
|
+
readonly maxRunLocators?: number;
|
|
746
|
+
}
|
|
747
|
+
interface ViewerContextMenuEvent<TContext> {
|
|
748
|
+
readonly originalEvent: MouseEvent;
|
|
749
|
+
getContext(): Promise<TContext | null>;
|
|
750
|
+
}
|
|
709
751
|
interface AutoResizeOptions {
|
|
710
752
|
pauseWhenHidden?: boolean;
|
|
711
753
|
}
|
|
@@ -736,7 +778,7 @@ interface FindHighlightColors {
|
|
|
736
778
|
active?: string;
|
|
737
779
|
}
|
|
738
780
|
//#endregion
|
|
739
|
-
//#region dist/.types-work/docx-
|
|
781
|
+
//#region dist/.types-work/docx-BEg7kh7t.d.ts
|
|
740
782
|
interface DocxDocumentModel {
|
|
741
783
|
section: SectionProps;
|
|
742
784
|
body: BodyElement[];
|
|
@@ -1048,6 +1090,12 @@ type PathCmd$1 = {
|
|
|
1048
1090
|
y2: number;
|
|
1049
1091
|
x: number;
|
|
1050
1092
|
y: number;
|
|
1093
|
+
} | {
|
|
1094
|
+
cmd: 'quadBezTo';
|
|
1095
|
+
x1: number;
|
|
1096
|
+
y1: number;
|
|
1097
|
+
x: number;
|
|
1098
|
+
y: number;
|
|
1051
1099
|
} | {
|
|
1052
1100
|
cmd: 'arcTo';
|
|
1053
1101
|
wr: number;
|
|
@@ -1089,11 +1137,20 @@ interface ShapeRun {
|
|
|
1089
1137
|
subpaths: PathCmd$1[][];
|
|
1090
1138
|
presetGeometry?: string | null;
|
|
1091
1139
|
adjValues?: Array<number | null>;
|
|
1092
|
-
fill: ShapeFill | null;
|
|
1140
|
+
fill: ShapeFill$1 | null;
|
|
1093
1141
|
stroke: string | null;
|
|
1094
1142
|
strokeWidth?: number;
|
|
1143
|
+
strokeFill?: ShapeStrokeFill | null;
|
|
1095
1144
|
strokeDash?: string | null;
|
|
1096
|
-
|
|
1145
|
+
strokeCustomDash?: Array<{
|
|
1146
|
+
dash: number;
|
|
1147
|
+
space: number;
|
|
1148
|
+
}>;
|
|
1149
|
+
strokeCap?: 'butt' | 'round' | 'square' | null;
|
|
1150
|
+
strokeJoin?: 'round' | 'bevel' | 'miter' | null;
|
|
1151
|
+
strokeMiterLimit?: number | null;
|
|
1152
|
+
strokeAlignment?: 'ctr' | 'in' | null;
|
|
1153
|
+
strokeCompound?: string | null;
|
|
1097
1154
|
headEnd?: LineEnd | null;
|
|
1098
1155
|
tailEnd?: LineEnd | null;
|
|
1099
1156
|
rotation?: number;
|
|
@@ -1166,7 +1223,7 @@ interface ShapeText$1 {
|
|
|
1166
1223
|
imageWidthPt?: number;
|
|
1167
1224
|
imageHeightPt?: number;
|
|
1168
1225
|
}
|
|
1169
|
-
type ShapeFill = {
|
|
1226
|
+
type ShapeFill$1 = {
|
|
1170
1227
|
fillType: 'solid';
|
|
1171
1228
|
color: string;
|
|
1172
1229
|
} | {
|
|
@@ -1174,6 +1231,17 @@ type ShapeFill = {
|
|
|
1174
1231
|
stops: GradientStop[];
|
|
1175
1232
|
angle: number;
|
|
1176
1233
|
gradType: string;
|
|
1234
|
+
scaled?: boolean;
|
|
1235
|
+
path?: string;
|
|
1236
|
+
fillToRect?: FillRect;
|
|
1237
|
+
tileRect?: FillRect;
|
|
1238
|
+
flip?: string;
|
|
1239
|
+
rotWithShape?: boolean;
|
|
1240
|
+
} | {
|
|
1241
|
+
fillType: 'pattern';
|
|
1242
|
+
fg: string;
|
|
1243
|
+
bg: string;
|
|
1244
|
+
preset: string;
|
|
1177
1245
|
} | {
|
|
1178
1246
|
fillType: 'image';
|
|
1179
1247
|
imagePath: string;
|
|
@@ -1190,6 +1258,23 @@ type ShapeFill = {
|
|
|
1190
1258
|
alpha?: number;
|
|
1191
1259
|
duotone?: Duotone$1;
|
|
1192
1260
|
};
|
|
1261
|
+
type ShapeStrokeFill = {
|
|
1262
|
+
fillType: 'gradient';
|
|
1263
|
+
stops: GradientStop[];
|
|
1264
|
+
angle: number;
|
|
1265
|
+
gradType: string;
|
|
1266
|
+
scaled?: boolean;
|
|
1267
|
+
path?: string;
|
|
1268
|
+
fillToRect?: FillRect;
|
|
1269
|
+
tileRect?: FillRect;
|
|
1270
|
+
flip?: string;
|
|
1271
|
+
rotWithShape?: boolean;
|
|
1272
|
+
} | {
|
|
1273
|
+
fillType: 'pattern';
|
|
1274
|
+
fg: string;
|
|
1275
|
+
bg: string;
|
|
1276
|
+
preset: string;
|
|
1277
|
+
};
|
|
1193
1278
|
interface GradientStop {
|
|
1194
1279
|
position: number;
|
|
1195
1280
|
color: string;
|
|
@@ -1388,24 +1473,12 @@ interface CellBorders {
|
|
|
1388
1473
|
insideH: BorderSpec | null;
|
|
1389
1474
|
insideV: BorderSpec | null;
|
|
1390
1475
|
}
|
|
1391
|
-
interface RenderPageOptions {
|
|
1392
|
-
width?: number;
|
|
1393
|
-
dpr?: number;
|
|
1394
|
-
defaultTextColor?: string;
|
|
1395
|
-
onTextRun?: (run: {
|
|
1396
|
-
text: string;
|
|
1397
|
-
x: number;
|
|
1398
|
-
y: number;
|
|
1399
|
-
w: number;
|
|
1400
|
-
h: number;
|
|
1401
|
-
fontSize: number;
|
|
1402
|
-
font: string;
|
|
1403
|
-
transform?: string;
|
|
1404
|
-
}) => void;
|
|
1405
|
-
showTrackChanges?: boolean;
|
|
1406
|
-
currentDate?: Date | number;
|
|
1407
|
-
}
|
|
1408
1476
|
interface DocxTextRunInfo {
|
|
1477
|
+
source?: Readonly<{
|
|
1478
|
+
story: 'body' | 'header' | 'footer' | 'footnote' | 'endnote' | 'textbox';
|
|
1479
|
+
storyInstance: string;
|
|
1480
|
+
path: readonly number[];
|
|
1481
|
+
}>;
|
|
1409
1482
|
paragraphId?: string;
|
|
1410
1483
|
text: string;
|
|
1411
1484
|
x: number;
|
|
@@ -1419,12 +1492,74 @@ interface DocxTextRunInfo {
|
|
|
1419
1492
|
hyperlink?: HyperlinkTarget;
|
|
1420
1493
|
eastAsianVert?: boolean;
|
|
1421
1494
|
}
|
|
1422
|
-
|
|
1495
|
+
interface RenderPageOptions {
|
|
1496
|
+
width?: number;
|
|
1497
|
+
dpr?: number;
|
|
1498
|
+
defaultTextColor?: string;
|
|
1499
|
+
onTextRun?: (run: DocxTextRunInfo) => void;
|
|
1500
|
+
currentDate?: Date | number;
|
|
1501
|
+
}
|
|
1502
|
+
type DocxSelectionContextOptions = TextSelectionContextOptions;
|
|
1503
|
+
interface DocxSelectionSourceLocator {
|
|
1504
|
+
readonly story: 'body' | 'header' | 'footer' | 'footnote' | 'endnote' | 'textbox';
|
|
1505
|
+
readonly storyInstance: string;
|
|
1506
|
+
readonly path: readonly number[];
|
|
1507
|
+
}
|
|
1508
|
+
interface DocxSelectionRunLocator {
|
|
1509
|
+
readonly pageIndex: number;
|
|
1510
|
+
readonly runIndex: number;
|
|
1511
|
+
readonly paragraphId?: string;
|
|
1512
|
+
readonly source?: DocxSelectionSourceLocator;
|
|
1513
|
+
}
|
|
1514
|
+
interface DocxTextSelectionContext {
|
|
1515
|
+
readonly format: 'docx';
|
|
1516
|
+
readonly kind: 'text';
|
|
1517
|
+
readonly text: string;
|
|
1518
|
+
readonly pageIndexes: readonly number[];
|
|
1519
|
+
readonly paragraphIds: readonly string[];
|
|
1520
|
+
readonly runs: readonly DocxSelectionRunLocator[];
|
|
1521
|
+
readonly truncated: boolean;
|
|
1522
|
+
readonly truncationReasons: readonly ('text' | 'runs')[];
|
|
1523
|
+
readonly textCharacters: number;
|
|
1524
|
+
readonly maxTextCharacters: number;
|
|
1525
|
+
readonly maxRunLocators: number;
|
|
1526
|
+
}
|
|
1527
|
+
interface DocxPagePoint {
|
|
1528
|
+
readonly xPt: number;
|
|
1529
|
+
readonly yPt: number;
|
|
1530
|
+
}
|
|
1531
|
+
interface DocxElementContext {
|
|
1532
|
+
readonly format: 'docx';
|
|
1533
|
+
readonly kind: 'element';
|
|
1534
|
+
readonly pageIndex: number;
|
|
1535
|
+
readonly elementIndex: number;
|
|
1536
|
+
readonly elementType: 'chart' | 'image' | 'shape';
|
|
1537
|
+
readonly point: DocxPagePoint;
|
|
1538
|
+
readonly bounds: Readonly<DocxPagePoint & {
|
|
1539
|
+
widthPt: number;
|
|
1540
|
+
heightPt: number;
|
|
1541
|
+
}>;
|
|
1542
|
+
readonly source: DocxSelectionSourceLocator;
|
|
1543
|
+
readonly text?: string;
|
|
1544
|
+
readonly mimeType?: string;
|
|
1545
|
+
readonly seriesCount?: number;
|
|
1546
|
+
readonly truncated: boolean;
|
|
1547
|
+
readonly truncationReasons: readonly ('text')[];
|
|
1548
|
+
readonly textCharacters: number;
|
|
1549
|
+
readonly maxTextCharacters: number;
|
|
1550
|
+
}
|
|
1551
|
+
type DocxSelectionContext = DocxTextSelectionContext | DocxElementContext;
|
|
1552
|
+
declare function readDocxTextSelectionContext(root: HTMLElement, selection: Selection | null, options?: DocxSelectionContextOptions): DocxTextSelectionContext | null;
|
|
1553
|
+
interface DocxElementContextOptions {
|
|
1554
|
+
readonly maxTextCharacters?: number;
|
|
1555
|
+
readonly currentDate?: Date | number;
|
|
1556
|
+
}
|
|
1423
1557
|
interface LoadOptions$2 extends LoadOptions$3 {
|
|
1424
1558
|
math?: MathRenderer;
|
|
1425
1559
|
mode?: 'main' | 'worker';
|
|
1426
1560
|
}
|
|
1427
|
-
type
|
|
1561
|
+
type CollectPageRunsOptions = Pick<RenderPageOptions, 'width' | 'currentDate'>;
|
|
1562
|
+
type RenderPageToBitmapOptions = Omit<RenderPageOptions, 'onTextRun'> & {
|
|
1428
1563
|
onTextRun?: (run: DocxTextRunInfo) => void;
|
|
1429
1564
|
};
|
|
1430
1565
|
declare class DocxDocument {
|
|
@@ -1465,14 +1600,18 @@ declare class DocxDocument {
|
|
|
1465
1600
|
};
|
|
1466
1601
|
renderPage(target: HTMLCanvasElement | OffscreenCanvas, pageIndex: number, opts?: RenderPageOptions): Promise<void>;
|
|
1467
1602
|
renderPageToBitmap(pageIndex: number, opts?: RenderPageToBitmapOptions): Promise<ImageBitmap>;
|
|
1468
|
-
collectPageRuns(pageIndex: number, opts?:
|
|
1603
|
+
collectPageRuns(pageIndex: number, opts?: CollectPageRunsOptions): Promise<DocxTextRunInfo[]>;
|
|
1604
|
+
getElementContextAt(pageIndex: number, point: DocxPagePoint, opts?: DocxElementContextOptions): Promise<DocxElementContext | null>;
|
|
1469
1605
|
}
|
|
1470
1606
|
interface DocxMatchLocation {
|
|
1471
1607
|
page: number;
|
|
1472
1608
|
}
|
|
1473
|
-
interface DocxViewerOptions extends RenderPageOptions, LoadOptions$2 {
|
|
1609
|
+
interface DocxViewerOptions extends Omit<RenderPageOptions, 'onTextRun'>, LoadOptions$2 {
|
|
1474
1610
|
container?: HTMLElement;
|
|
1475
1611
|
enableTextSelection?: boolean;
|
|
1612
|
+
enableElementSelection?: boolean;
|
|
1613
|
+
onSelectionContextChange?: (context: DocxSelectionContext | null) => void;
|
|
1614
|
+
onContextMenu?: (event: ViewerContextMenuEvent<DocxSelectionContext>) => void;
|
|
1476
1615
|
findHighlightColors?: FindHighlightColors;
|
|
1477
1616
|
onPageChange?: (index: number, total: number) => void;
|
|
1478
1617
|
zoomMin?: number;
|
|
@@ -1494,6 +1633,7 @@ declare class DocxViewer implements ZoomableViewer {
|
|
|
1494
1633
|
private readonly _canvasMount;
|
|
1495
1634
|
private _textLayer;
|
|
1496
1635
|
private _highlightLayer;
|
|
1636
|
+
private _elementLayer;
|
|
1497
1637
|
private _find;
|
|
1498
1638
|
private _measureCtx;
|
|
1499
1639
|
private _opts;
|
|
@@ -1501,6 +1641,12 @@ declare class DocxViewer implements ZoomableViewer {
|
|
|
1501
1641
|
private readonly _renderDispatcher;
|
|
1502
1642
|
private readonly _errorRouter;
|
|
1503
1643
|
private _destroyed;
|
|
1644
|
+
private _selectionChangeListener;
|
|
1645
|
+
private _selectionContextKey;
|
|
1646
|
+
private _elementContext;
|
|
1647
|
+
private _elementHitGeneration;
|
|
1648
|
+
private _elementClickListener;
|
|
1649
|
+
private _contextMenuListener;
|
|
1504
1650
|
static fromDocument(canvas: HTMLCanvasElement, document: DocxDocument, opts?: Omit<DocxViewerOptions, keyof LoadOptions$2>): Omit<DocxViewer, 'load'>;
|
|
1505
1651
|
constructor(canvas: HTMLCanvasElement, opts?: DocxViewerOptions);
|
|
1506
1652
|
load(source: string | ArrayBuffer): Promise<void>;
|
|
@@ -1529,6 +1675,14 @@ declare class DocxViewer implements ZoomableViewer {
|
|
|
1529
1675
|
private _activateMatch;
|
|
1530
1676
|
private _redrawHighlights;
|
|
1531
1677
|
getResourceMetrics(): Promise<OoxmlResourceMetrics>;
|
|
1678
|
+
getSelectionContext(options?: DocxSelectionContextOptions): DocxSelectionContext | null;
|
|
1679
|
+
private _emitSelectionContextChange;
|
|
1680
|
+
private _setElementContext;
|
|
1681
|
+
private _invalidateElementContext;
|
|
1682
|
+
private _redrawElementOutline;
|
|
1683
|
+
private _onElementClick;
|
|
1684
|
+
private _onContextMenu;
|
|
1685
|
+
private _resolveContextAt;
|
|
1532
1686
|
destroy(): void;
|
|
1533
1687
|
private _render;
|
|
1534
1688
|
private _reportRenderError;
|
|
@@ -1549,6 +1703,9 @@ interface DocxScrollViewerOptions extends Omit<RenderPageOptions, 'onTextRun'>,
|
|
|
1549
1703
|
paddingRight?: number;
|
|
1550
1704
|
overscan?: number;
|
|
1551
1705
|
enableTextSelection?: boolean;
|
|
1706
|
+
enableElementSelection?: boolean;
|
|
1707
|
+
onSelectionContextChange?: (context: DocxSelectionContext | null) => void;
|
|
1708
|
+
onContextMenu?: (event: ViewerContextMenuEvent<DocxSelectionContext>) => void;
|
|
1552
1709
|
findHighlightColors?: FindHighlightColors;
|
|
1553
1710
|
zoomMin?: number;
|
|
1554
1711
|
zoomMax?: number;
|
|
@@ -1581,6 +1738,12 @@ declare class DocxScrollViewer implements ZoomableViewer {
|
|
|
1581
1738
|
private _lastRange;
|
|
1582
1739
|
private _lastTopIndex;
|
|
1583
1740
|
private _scrollListener;
|
|
1741
|
+
private _selectionChangeListener;
|
|
1742
|
+
private _selectionContextKey;
|
|
1743
|
+
private _elementClickListener;
|
|
1744
|
+
private _contextMenuListener;
|
|
1745
|
+
private _elementContext;
|
|
1746
|
+
private _elementHitGeneration;
|
|
1584
1747
|
private _destroyed;
|
|
1585
1748
|
private _measureCtx;
|
|
1586
1749
|
private readonly _bitmapInFlight;
|
|
@@ -1603,6 +1766,7 @@ declare class DocxScrollViewer implements ZoomableViewer {
|
|
|
1603
1766
|
private _fitWidthPx;
|
|
1604
1767
|
private _baseScale;
|
|
1605
1768
|
relayout(): void;
|
|
1769
|
+
private _relayout;
|
|
1606
1770
|
private _recomputeHeights;
|
|
1607
1771
|
private _gap;
|
|
1608
1772
|
private _overscan;
|
|
@@ -1652,9 +1816,18 @@ declare class DocxScrollViewer implements ZoomableViewer {
|
|
|
1652
1816
|
private _onResize;
|
|
1653
1817
|
get topVisiblePage(): number;
|
|
1654
1818
|
getResourceMetrics(): Promise<OoxmlResourceMetrics>;
|
|
1819
|
+
getSelectionContext(options?: DocxSelectionContextOptions): DocxSelectionContext | null;
|
|
1820
|
+
private _emitSelectionContextChange;
|
|
1821
|
+
private _setElementContext;
|
|
1822
|
+
private _invalidateElementContext;
|
|
1823
|
+
private _redrawElementOutlines;
|
|
1824
|
+
private _redrawElementOutlineForSlot;
|
|
1825
|
+
private _onElementClick;
|
|
1826
|
+
private _onContextMenu;
|
|
1827
|
+
private _resolveContextAt;
|
|
1655
1828
|
destroy(): void;
|
|
1656
1829
|
}
|
|
1657
|
-
declare function buildDocxTextLayer(layer: HTMLDivElement, runs: DocxTextRunInfo[], cssWidth: number, cssHeight: number, onHyperlinkClick?: (target: HyperlinkTarget) => void, measureForFont?: (font: string) => (s: string) => number): void;
|
|
1830
|
+
declare function buildDocxTextLayer(layer: HTMLDivElement, runs: DocxTextRunInfo[], cssWidth: number, cssHeight: number, onHyperlinkClick?: (target: HyperlinkTarget) => void, measureForFont?: (font: string) => (s: string) => number, pageIndex?: number): void;
|
|
1658
1831
|
interface DocxHighlightMatch {
|
|
1659
1832
|
slices: MatchRunSlice[];
|
|
1660
1833
|
active: boolean;
|
|
@@ -1662,10 +1835,10 @@ interface DocxHighlightMatch {
|
|
|
1662
1835
|
type DocxHighlightColors = FindHighlightColors;
|
|
1663
1836
|
declare function buildDocxHighlightLayer(layer: HTMLDivElement, runs: DocxTextRunInfo[], matches: DocxHighlightMatch[], cssWidth: number, cssHeight: number, measureForFont: (font: string) => (s: string) => number, colors?: DocxHighlightColors): void;
|
|
1664
1837
|
declare namespace docx_d_exports {
|
|
1665
|
-
export { AnchorHostMetrics, AutoResizeOptions, BodyElement, BorderSpec, CellBorders, CellElement, ChartRun, ColSpec, ColumnsSpec, DocComment, DocNote, DocParagraph, DocRevision, DocRun, DocSettings, DocTable, DocTableCell, DocTableRow, DocxDocument, DocxDocumentModel, DocxHighlightColors, DocxHighlightMatch, DocxMatchLocation, DocxRunBorder, DocxScrollViewer, DocxScrollViewerOptions, DocxTextRun, DocxTextRunInfo, DocxViewer, DocxViewerOptions, EmbeddedFontRef, FieldRun, FindHighlightColors, FindMatch, FindMatchesOptions, FramePr, GradientStop, HeaderFooter, HeadersFooters, HyperlinkTarget, ImageRun, LineEnd, LineNumbering, LineSpacing, LoadOptions$2 as LoadOptions, NoteRef, NumberingInfo, OoxmlDecodedImageLimitError, OoxmlDecodedImageLimitMetric, OoxmlError, OoxmlErrorCode,
|
|
1838
|
+
export { AnchorHostMetrics, AutoResizeOptions, BodyElement, BorderSpec, CellBorders, CellElement, ChartDataLabelOverride, ChartDataPointOverride, ChartErrBars, ChartLabelBox, ChartManualLayout, ChartModel, ChartRect, ChartRun, ChartSeries, ChartSeriesDataLabels, ChartTrendline, ChartType, ChartexBoxSeries, ChartexBoxWhisker, ChartexSunburst, ChartexSunburstRow, ColSpec, CollectPageRunsOptions, ColumnsSpec, DocComment, DocNote, DocParagraph, DocRevision, DocRun, DocSettings, DocTable, DocTableCell, DocTableRow, DocxDocument, DocxDocumentModel, DocxElementContext, DocxElementContextOptions, DocxHighlightColors, DocxHighlightMatch, DocxMatchLocation, DocxPagePoint, DocxRunBorder, DocxScrollViewer, DocxScrollViewerOptions, DocxSelectionContext, DocxSelectionContextOptions, DocxSelectionRunLocator, DocxSelectionSourceLocator, DocxTextRun, DocxTextRunInfo, DocxTextSelectionContext, DocxViewer, DocxViewerOptions, Duotone$1 as Duotone, EmbeddedFontRef, FieldRun, FillRect, FindHighlightColors, FindMatch, FindMatchesOptions, FramePr, GradientStop, HeaderFooter, HeadersFooters, HyperlinkTarget, ImageRun, LegendManualLayout, LineEnd, LineNumbering, LineSpacing, LoadOptions$2 as LoadOptions, MatchRunSlice, MathAccent, MathArray, MathBar, MathBorderBox, MathBox, MathDelimiter, MathFraction, MathFunc, MathGroup, MathGroupChr, MathLimit, MathNary, MathNode, MathPhant, MathRadical, MathRenderer, MathRun, MathSPre, MathScript, MathStyle, MathSvg, NoteRef, NumberingInfo, OoxmlDecodedImageLimitError, OoxmlDecodedImageLimitMetric, OoxmlError, OoxmlErrorCode, OoxmlErrorStage, OoxmlFormat, OoxmlResourceLimit, OoxmlResourceLimitError, OoxmlResourceLimitErrorDetails, OoxmlResourceLimits, OoxmlResourceMetric, OoxmlResourceMetrics, OoxmlResourceMetricsCheckpoint, OoxmlResourceName, OoxmlResourcePolicySnapshot, OoxmlResourceUsageSnapshot, OoxmlResourceViolation, PTabRun, PageBorderEdge, PageBorders, PageNumType, ParaBorderEdge, ParagraphBorders, PathCmd$1 as PathCmd, RenderPageOptions, RenderPageToBitmapOptions, RubyAnnotation, RunRevision, SecondaryValueAxis, SectionGeom, SectionProps, ShapeFill$1 as ShapeFill, ShapeRun, ShapeStrokeFill, ShapeText$1 as ShapeText, ShapeTextRun$1 as ShapeTextRun, TabStop, TableBorders, TblpPr, TextPath, TextSelectionContextOptions, TileInfo, ViewerContextMenuEvent, ZoomableViewer, autoResize, buildDocxHighlightLayer, buildDocxTextLayer, isOoxmlDecodedImageLimitError, noteText, openExternalHyperlink, readDocxTextSelectionContext };
|
|
1666
1839
|
}
|
|
1667
1840
|
//#endregion
|
|
1668
|
-
//#region dist/.types-work/pptx-
|
|
1841
|
+
//#region dist/.types-work/pptx-DjMlRXaq.d.ts
|
|
1669
1842
|
interface BlipBullet {
|
|
1670
1843
|
type: 'blip';
|
|
1671
1844
|
imagePath: string;
|
|
@@ -1702,11 +1875,16 @@ interface Slide {
|
|
|
1702
1875
|
partName?: string;
|
|
1703
1876
|
background: Fill | null;
|
|
1704
1877
|
elements: SlideElement[];
|
|
1878
|
+
elementSources?: SlideElementSource[];
|
|
1705
1879
|
notes?: string;
|
|
1706
1880
|
comments?: PptxComment[];
|
|
1707
1881
|
hidden?: boolean;
|
|
1708
1882
|
parseError?: string;
|
|
1709
1883
|
}
|
|
1884
|
+
type SlideElementOrigin = 'master' | 'layout' | 'slide';
|
|
1885
|
+
interface SlideElementSource {
|
|
1886
|
+
origin: SlideElementOrigin;
|
|
1887
|
+
}
|
|
1710
1888
|
interface DimOptions {
|
|
1711
1889
|
color: string;
|
|
1712
1890
|
opacity: number;
|
|
@@ -1804,6 +1982,7 @@ interface Sp3d {
|
|
|
1804
1982
|
extrusionH?: number;
|
|
1805
1983
|
contourW?: number;
|
|
1806
1984
|
contourClr?: string;
|
|
1985
|
+
extrusionClr?: string;
|
|
1807
1986
|
prstMaterial: string;
|
|
1808
1987
|
bevelT?: Bevel3d;
|
|
1809
1988
|
bevelB?: Bevel3d;
|
|
@@ -1886,6 +2065,8 @@ interface PictureElement {
|
|
|
1886
2065
|
sp3d?: Sp3d;
|
|
1887
2066
|
}
|
|
1888
2067
|
interface PptxTextRunInfo {
|
|
2068
|
+
elementIndex?: number;
|
|
2069
|
+
origin?: SlideElementOrigin;
|
|
1889
2070
|
shapeId?: string;
|
|
1890
2071
|
text: string;
|
|
1891
2072
|
inShapeX: number;
|
|
@@ -1916,6 +2097,68 @@ interface PresentationHandle {
|
|
|
1916
2097
|
pause(mediaPath?: string): void;
|
|
1917
2098
|
destroy(): void;
|
|
1918
2099
|
}
|
|
2100
|
+
interface PptxSelectionRunLocator {
|
|
2101
|
+
readonly slideIndex: number;
|
|
2102
|
+
readonly runIndex: number;
|
|
2103
|
+
readonly shapeId?: string;
|
|
2104
|
+
readonly elementIndex?: number;
|
|
2105
|
+
readonly origin?: SlideElementOrigin;
|
|
2106
|
+
}
|
|
2107
|
+
interface PptxTextSelectionContext {
|
|
2108
|
+
readonly format: 'pptx';
|
|
2109
|
+
readonly kind: 'text';
|
|
2110
|
+
readonly text: string;
|
|
2111
|
+
readonly slideIndexes: readonly number[];
|
|
2112
|
+
readonly shapeIds: readonly string[];
|
|
2113
|
+
readonly runs: readonly PptxSelectionRunLocator[];
|
|
2114
|
+
readonly truncated: boolean;
|
|
2115
|
+
readonly truncationReasons: readonly ('text' | 'runs')[];
|
|
2116
|
+
readonly textCharacters: number;
|
|
2117
|
+
readonly maxTextCharacters: number;
|
|
2118
|
+
readonly maxRunLocators: number;
|
|
2119
|
+
}
|
|
2120
|
+
declare function readPptxTextSelectionContext(root: HTMLElement, selection: Selection | null, options?: TextSelectionContextOptions): PptxTextSelectionContext | null;
|
|
2121
|
+
type PptxSelectionContextOptions = TextSelectionContextOptions;
|
|
2122
|
+
interface PptxSlidePoint {
|
|
2123
|
+
readonly x: number;
|
|
2124
|
+
readonly y: number;
|
|
2125
|
+
}
|
|
2126
|
+
interface PptxElementContextOptions {
|
|
2127
|
+
readonly tolerance?: number;
|
|
2128
|
+
readonly maxTextCharacters?: number;
|
|
2129
|
+
}
|
|
2130
|
+
interface PptxElementContext {
|
|
2131
|
+
readonly format: 'pptx';
|
|
2132
|
+
readonly kind: 'element';
|
|
2133
|
+
readonly slideIndex: number;
|
|
2134
|
+
readonly elementIndex: number;
|
|
2135
|
+
readonly origin: SlideElementOrigin | 'unknown';
|
|
2136
|
+
readonly elementType: SlideElement['type'];
|
|
2137
|
+
readonly point: PptxSlidePoint;
|
|
2138
|
+
readonly bounds: Readonly<{
|
|
2139
|
+
x: number;
|
|
2140
|
+
y: number;
|
|
2141
|
+
width: number;
|
|
2142
|
+
height: number;
|
|
2143
|
+
rotation: number;
|
|
2144
|
+
flipH: boolean;
|
|
2145
|
+
flipV: boolean;
|
|
2146
|
+
}>;
|
|
2147
|
+
readonly shapeId?: string;
|
|
2148
|
+
readonly name?: string;
|
|
2149
|
+
readonly geometry?: string;
|
|
2150
|
+
readonly text?: string;
|
|
2151
|
+
readonly mimeType?: string;
|
|
2152
|
+
readonly mediaKind?: 'audio' | 'video';
|
|
2153
|
+
readonly rowCount?: number;
|
|
2154
|
+
readonly columnCount?: number;
|
|
2155
|
+
readonly seriesCount?: number;
|
|
2156
|
+
readonly truncated: boolean;
|
|
2157
|
+
readonly truncationReasons: readonly ('text')[];
|
|
2158
|
+
readonly textCharacters: number;
|
|
2159
|
+
readonly maxTextCharacters: number;
|
|
2160
|
+
}
|
|
2161
|
+
type PptxSelectionContext = PptxTextSelectionContext | PptxElementContext;
|
|
1919
2162
|
type LoadOptions$1 = LoadOptions$3 & {
|
|
1920
2163
|
mode?: 'main' | 'worker';
|
|
1921
2164
|
};
|
|
@@ -1931,6 +2174,8 @@ interface RenderSlideOptions {
|
|
|
1931
2174
|
onTextRun?: TextRunCallback;
|
|
1932
2175
|
skipMediaControls?: boolean;
|
|
1933
2176
|
dim?: DimOptions;
|
|
2177
|
+
}
|
|
2178
|
+
interface PresentSlideOptions extends Omit<RenderSlideOptions, 'skipMediaControls'> {
|
|
1934
2179
|
onError?: (error: Error) => void;
|
|
1935
2180
|
}
|
|
1936
2181
|
declare class PptxPresentation {
|
|
@@ -1966,16 +2211,17 @@ declare class PptxPresentation {
|
|
|
1966
2211
|
renderSlide(canvas: HTMLCanvasElement | OffscreenCanvas, slideIndex: number, opts?: RenderSlideOptions): Promise<void>;
|
|
1967
2212
|
renderSlideToBitmap(slideIndex: number, opts?: RenderSlideToBitmapOptions): Promise<ImageBitmap>;
|
|
1968
2213
|
collectSlideRuns(slideIndex: number, width?: number): Promise<PptxTextRunInfo[]>;
|
|
2214
|
+
getElementContextAt(slideIndex: number, point: PptxSlidePoint, options?: PptxElementContextOptions): Promise<PptxElementContext | null>;
|
|
1969
2215
|
getMedia(mediaPath: string): Promise<Blob>;
|
|
1970
2216
|
private _findMimeTypeForPath;
|
|
1971
2217
|
getImage(imagePath: string, mimeType: string): Promise<Blob>;
|
|
1972
2218
|
getResourceMetrics(): Promise<OoxmlResourceMetrics>;
|
|
1973
2219
|
toMarkdown(): Promise<string>;
|
|
1974
|
-
presentSlide(canvas: HTMLCanvasElement, slideIndex: number, opts?:
|
|
2220
|
+
presentSlide(canvas: HTMLCanvasElement, slideIndex: number, opts?: PresentSlideOptions): Promise<PresentationHandle>;
|
|
1975
2221
|
destroy(): void;
|
|
1976
2222
|
}
|
|
1977
2223
|
type HiddenSlideMode = 'show' | 'skip' | 'dim';
|
|
1978
|
-
interface PptxViewerOptions extends RenderOptions, LoadOptions$1 {
|
|
2224
|
+
interface PptxViewerOptions extends Pick<RenderOptions, 'width' | 'dpr'>, LoadOptions$1 {
|
|
1979
2225
|
onSlideChange?: (index: number, total: number) => void;
|
|
1980
2226
|
onError?: (err: Error) => void;
|
|
1981
2227
|
zoomMin?: number;
|
|
@@ -1983,6 +2229,10 @@ interface PptxViewerOptions extends RenderOptions, LoadOptions$1 {
|
|
|
1983
2229
|
onScaleChange?: (scale: number) => void;
|
|
1984
2230
|
enableMediaPlayback?: boolean;
|
|
1985
2231
|
enableTextSelection?: boolean;
|
|
2232
|
+
enableElementSelection?: boolean;
|
|
2233
|
+
elementHitTolerance?: number;
|
|
2234
|
+
onSelectionContextChange?: (context: PptxSelectionContext | null) => void;
|
|
2235
|
+
onContextMenu?: (event: ViewerContextMenuEvent<PptxSelectionContext>) => void;
|
|
1986
2236
|
findHighlightColors?: FindHighlightColors;
|
|
1987
2237
|
hiddenSlideMode?: HiddenSlideMode;
|
|
1988
2238
|
hiddenSlideDim?: Partial<DimOptions>;
|
|
@@ -1996,6 +2246,7 @@ declare class PptxViewer implements ZoomableViewer {
|
|
|
1996
2246
|
private _scale;
|
|
1997
2247
|
private textLayer;
|
|
1998
2248
|
private highlightLayer;
|
|
2249
|
+
private elementLayer;
|
|
1999
2250
|
private _find;
|
|
2000
2251
|
private _measureCtx;
|
|
2001
2252
|
private readonly presentationOwner;
|
|
@@ -2010,6 +2261,13 @@ declare class PptxViewer implements ZoomableViewer {
|
|
|
2010
2261
|
private readonly renderDispatcher;
|
|
2011
2262
|
private readonly errorRouter;
|
|
2012
2263
|
private destroyed;
|
|
2264
|
+
private selectionChangeListener;
|
|
2265
|
+
private selectionContextKey;
|
|
2266
|
+
private elementClickListener;
|
|
2267
|
+
private contextMenuListener;
|
|
2268
|
+
private elementContext;
|
|
2269
|
+
private elementHitGeneration;
|
|
2270
|
+
private readonly elementHitTolerance;
|
|
2013
2271
|
static fromPresentation(canvas: HTMLCanvasElement, presentation: PptxPresentation, opts?: Omit<PptxViewerOptions, keyof LoadOptions$1>): Omit<PptxViewer, 'load'>;
|
|
2014
2272
|
constructor(canvas: HTMLCanvasElement, opts?: PptxViewerOptions);
|
|
2015
2273
|
load(source: string | ArrayBuffer): Promise<void>;
|
|
@@ -2053,9 +2311,17 @@ declare class PptxViewer implements ZoomableViewer {
|
|
|
2053
2311
|
private _resolveInternalSlideIndex;
|
|
2054
2312
|
private _reportRenderError;
|
|
2055
2313
|
getResourceMetrics(): Promise<OoxmlResourceMetrics>;
|
|
2314
|
+
getSelectionContext(options?: PptxSelectionContextOptions): PptxSelectionContext | null;
|
|
2315
|
+
private _emitSelectionContextChange;
|
|
2316
|
+
private _setElementContext;
|
|
2317
|
+
private _invalidateElementSelection;
|
|
2318
|
+
private _redrawElementOutline;
|
|
2319
|
+
private _onElementClick;
|
|
2320
|
+
private _onContextMenu;
|
|
2321
|
+
private _resolveContextAt;
|
|
2056
2322
|
destroy(): void;
|
|
2057
2323
|
}
|
|
2058
|
-
interface PptxScrollViewerOptions extends
|
|
2324
|
+
interface PptxScrollViewerOptions extends Pick<RenderSlideOptions, 'width' | 'dpr'>, LoadOptions$1 {
|
|
2059
2325
|
width?: number;
|
|
2060
2326
|
gap?: number;
|
|
2061
2327
|
paddingTop?: number;
|
|
@@ -2064,6 +2330,10 @@ interface PptxScrollViewerOptions extends Omit<RenderSlideOptions, 'onTextRun'>,
|
|
|
2064
2330
|
paddingRight?: number;
|
|
2065
2331
|
overscan?: number;
|
|
2066
2332
|
enableTextSelection?: boolean;
|
|
2333
|
+
enableElementSelection?: boolean;
|
|
2334
|
+
elementHitTolerance?: number;
|
|
2335
|
+
onSelectionContextChange?: (context: PptxSelectionContext | null) => void;
|
|
2336
|
+
onContextMenu?: (event: ViewerContextMenuEvent<PptxSelectionContext>) => void;
|
|
2067
2337
|
findHighlightColors?: FindHighlightColors;
|
|
2068
2338
|
enableMediaPlayback?: boolean;
|
|
2069
2339
|
mediaOverscan?: number;
|
|
@@ -2098,6 +2368,13 @@ declare class PptxScrollViewer implements ZoomableViewer {
|
|
|
2098
2368
|
private _lastRange;
|
|
2099
2369
|
private _lastTopIndex;
|
|
2100
2370
|
private _scrollListener;
|
|
2371
|
+
private _selectionChangeListener;
|
|
2372
|
+
private _selectionContextKey;
|
|
2373
|
+
private _elementClickListener;
|
|
2374
|
+
private _contextMenuListener;
|
|
2375
|
+
private _elementContext;
|
|
2376
|
+
private _elementHitGeneration;
|
|
2377
|
+
private readonly _elementHitTolerance;
|
|
2101
2378
|
private _destroyed;
|
|
2102
2379
|
private readonly _slideInFlight;
|
|
2103
2380
|
private _renderEpoch;
|
|
@@ -2120,6 +2397,7 @@ declare class PptxScrollViewer implements ZoomableViewer {
|
|
|
2120
2397
|
private _fitWidthPx;
|
|
2121
2398
|
private _baseScale;
|
|
2122
2399
|
relayout(): void;
|
|
2400
|
+
private _relayout;
|
|
2123
2401
|
private _recomputeHeights;
|
|
2124
2402
|
private _gap;
|
|
2125
2403
|
private _overscan;
|
|
@@ -2176,9 +2454,18 @@ declare class PptxScrollViewer implements ZoomableViewer {
|
|
|
2176
2454
|
private _onResize;
|
|
2177
2455
|
get topVisibleSlide(): number;
|
|
2178
2456
|
getResourceMetrics(): Promise<OoxmlResourceMetrics>;
|
|
2457
|
+
getSelectionContext(options?: PptxSelectionContextOptions): PptxSelectionContext | null;
|
|
2458
|
+
private _emitSelectionContextChange;
|
|
2459
|
+
private _setElementContext;
|
|
2460
|
+
private _invalidateElementSelection;
|
|
2461
|
+
private _redrawElementOutlines;
|
|
2462
|
+
private _redrawElementOutlineForSlot;
|
|
2463
|
+
private _onElementClick;
|
|
2464
|
+
private _onContextMenu;
|
|
2465
|
+
private _resolveContextAt;
|
|
2179
2466
|
destroy(): void;
|
|
2180
2467
|
}
|
|
2181
|
-
declare function buildPptxTextLayer(layer: HTMLDivElement, runs: PptxTextRunInfo[], cssWidth: number, cssHeight: number, onHyperlinkClick?: (target: HyperlinkTarget) => void): void;
|
|
2468
|
+
declare function buildPptxTextLayer(layer: HTMLDivElement, runs: PptxTextRunInfo[], cssWidth: number, cssHeight: number, onHyperlinkClick?: (target: HyperlinkTarget) => void, slideIndex?: number): void;
|
|
2182
2469
|
interface PptxHighlightMatch {
|
|
2183
2470
|
slices: MatchRunSlice[];
|
|
2184
2471
|
active: boolean;
|
|
@@ -2186,10 +2473,15 @@ interface PptxHighlightMatch {
|
|
|
2186
2473
|
type PptxHighlightColors = FindHighlightColors;
|
|
2187
2474
|
declare function buildPptxHighlightLayer(layer: HTMLDivElement, runs: PptxTextRunInfo[], matches: PptxHighlightMatch[], cssWidth: number, cssHeight: number, measureForFont: (font: string) => (s: string) => number, colors?: PptxHighlightColors): void;
|
|
2188
2475
|
declare namespace pptx_d_exports {
|
|
2189
|
-
export { AutoResizeOptions, Bevel3d, BlipBullet, Bullet, Camera3d, ChartElement, ChartModel, ChartSeries, DimOptions, Fill, FillRect, FindHighlightColors, FindMatch, FindMatchesOptions, Glow, GradientFill, GradientStop$1 as GradientStop, HiddenSlideMode, HyperlinkTarget, ImageFill, LightRig, LineBreak, LoadOptions$1 as LoadOptions, MediaElement, NoFill, OoxmlDecodedImageLimitError, OoxmlDecodedImageLimitMetric, OoxmlError, OoxmlErrorCode,
|
|
2476
|
+
export { ArrowEnd, AutoResizeOptions, Bevel3d, BlipBullet, Bullet, Camera3d, ChartDataLabelOverride, ChartDataPointOverride, ChartElement, ChartErrBars, ChartLabelBox, ChartManualLayout, ChartModel, ChartRect, ChartSeries, ChartSeriesDataLabels, ChartTrendline, ChartType, ChartexBoxSeries, ChartexBoxWhisker, ChartexSunburst, ChartexSunburstRow, DimOptions, Duotone$1 as Duotone, EquationRun, Fill, FillRect, FindHighlightColors, FindMatch, FindMatchesOptions, Glow, GradientFill, GradientStop$1 as GradientStop, HiddenSlideMode, HyperlinkTarget, ImageFill, LegendManualLayout, LightRig, LineBreak, LoadOptions$1 as LoadOptions, MatchRunSlice, MathAccent, MathArray, MathBar, MathBorderBox, MathBox, MathDelimiter, MathFraction, MathFunc, MathGroup, MathGroupChr, MathLimit, MathNary, MathNode, MathPhant, MathRadical, MathRenderer, MathRun, MathSPre, MathScript, MathStyle, MathSvg, MediaElement, NoFill, OoxmlDecodedImageLimitError, OoxmlDecodedImageLimitMetric, OoxmlError, OoxmlErrorCode, OoxmlErrorStage, OoxmlFormat, OoxmlResourceLimit, OoxmlResourceLimitError, OoxmlResourceLimitErrorDetails, OoxmlResourceLimits, OoxmlResourceMetric, OoxmlResourceMetrics, OoxmlResourceMetricsCheckpoint, OoxmlResourceName, OoxmlResourcePolicySnapshot, OoxmlResourceUsageSnapshot, OoxmlResourceViolation, Paragraph, PathCmd$2 as PathCmd, PatternFill, PictureElement, PptxComment, PptxElementContext, PptxElementContextOptions, PptxHighlightColors, PptxHighlightMatch, PptxMatchLocation, PptxPresentation, PptxScrollViewer, PptxScrollViewerOptions, PptxSelectionContext, PptxSelectionContextOptions, PptxSelectionRunLocator, PptxSlidePoint, PptxTextRunInfo, PptxTextSelectionContext, PptxViewer, PptxViewerOptions, PresentSlideOptions, Presentation, PresentationHandle, Reflection, RenderOptions, RenderSlideOptions, RenderSlideToBitmapOptions, Rot3d, Scene3d, SecondaryValueAxis, Shadow, ShapeElement, Slide, SlideElement, SlideElementOrigin, SlideElementSource, SlideRenderOptions, SoftEdge, SolidFill, Sp3d, SpaceLine, Stroke, TabStop$1 as TabStop, TableCell, TableElement, TableRow, TextBody, TextOutline, TextRect, TextRun, TextRunCallback, TextRunData, TextSelectionContextOptions, TileInfo, ViewerContextMenuEvent, ZoomableViewer, autoResize, buildPptxHighlightLayer, buildPptxTextLayer, isOoxmlDecodedImageLimitError, openExternalHyperlink, readPptxTextSelectionContext, renderSlide };
|
|
2190
2477
|
}
|
|
2191
2478
|
//#endregion
|
|
2192
|
-
//#region dist/.types-work/xlsx-
|
|
2479
|
+
//#region dist/.types-work/xlsx-3u8ip-lC.d.ts
|
|
2480
|
+
type ShapeFill = Exclude<Fill, {
|
|
2481
|
+
fillType: 'image';
|
|
2482
|
+
} | {
|
|
2483
|
+
fillType: 'none';
|
|
2484
|
+
}>;
|
|
2193
2485
|
interface Workbook {
|
|
2194
2486
|
sheets: SheetMeta[];
|
|
2195
2487
|
date1904?: boolean;
|
|
@@ -2231,7 +2523,7 @@ interface Worksheet {
|
|
|
2231
2523
|
rightToLeft?: boolean;
|
|
2232
2524
|
outlinePr?: OutlinePr;
|
|
2233
2525
|
tabColor?: string | null;
|
|
2234
|
-
autoFilter?:
|
|
2526
|
+
autoFilter?: WorksheetCellRange | null;
|
|
2235
2527
|
hyperlinks?: Hyperlink[];
|
|
2236
2528
|
commentRefs?: string[];
|
|
2237
2529
|
comments?: XlsxComment[];
|
|
@@ -2262,7 +2554,7 @@ interface PivotTableMetadata {
|
|
|
2262
2554
|
status: PivotMetadataStatus;
|
|
2263
2555
|
extensionUris?: string[];
|
|
2264
2556
|
}
|
|
2265
|
-
interface PivotLocation extends
|
|
2557
|
+
interface PivotLocation extends WorksheetCellRange {
|
|
2266
2558
|
firstHeaderRow: number;
|
|
2267
2559
|
firstDataRow: number;
|
|
2268
2560
|
firstDataCol: number;
|
|
@@ -2405,7 +2697,7 @@ interface SlicerElementStyle {
|
|
|
2405
2697
|
borderColor?: string;
|
|
2406
2698
|
}
|
|
2407
2699
|
interface TableInfo {
|
|
2408
|
-
range:
|
|
2700
|
+
range: WorksheetCellRange;
|
|
2409
2701
|
styleName: string;
|
|
2410
2702
|
headerRowCount: number;
|
|
2411
2703
|
totalsRowCount: number;
|
|
@@ -2450,12 +2742,6 @@ interface DataValidation {
|
|
|
2450
2742
|
errorTitle?: string;
|
|
2451
2743
|
errorMessage?: string;
|
|
2452
2744
|
}
|
|
2453
|
-
type XlsxChartSeries = ChartSeries;
|
|
2454
|
-
type SeriesDataLabels = ChartSeriesDataLabels;
|
|
2455
|
-
type DataLabelOverride = ChartDataLabelOverride;
|
|
2456
|
-
type DataPointOverride = ChartDataPointOverride;
|
|
2457
|
-
type ErrBars = ChartErrBars;
|
|
2458
|
-
type ManualLayout = ChartManualLayout;
|
|
2459
2745
|
interface ChartAnchor {
|
|
2460
2746
|
fromCol: number;
|
|
2461
2747
|
fromColOff: number;
|
|
@@ -2490,8 +2776,26 @@ interface ShapeInfo {
|
|
|
2490
2776
|
flipH?: boolean;
|
|
2491
2777
|
flipV?: boolean;
|
|
2492
2778
|
fillColor?: string;
|
|
2779
|
+
fill?: ShapeFill;
|
|
2493
2780
|
strokeColor?: string;
|
|
2494
2781
|
strokeWidth: number;
|
|
2782
|
+
strokeFill?: Exclude<Fill, {
|
|
2783
|
+
fillType: 'image';
|
|
2784
|
+
} | {
|
|
2785
|
+
fillType: 'none';
|
|
2786
|
+
}>;
|
|
2787
|
+
strokeDashStyle?: string;
|
|
2788
|
+
strokeCustomDash?: Array<{
|
|
2789
|
+
dash: number;
|
|
2790
|
+
space: number;
|
|
2791
|
+
}>;
|
|
2792
|
+
strokeLineCap?: 'butt' | 'round' | 'square';
|
|
2793
|
+
strokeLineJoin?: 'round' | 'bevel' | 'miter';
|
|
2794
|
+
strokeMiterLimit?: number;
|
|
2795
|
+
strokeAlignment?: 'ctr' | 'in';
|
|
2796
|
+
strokeCmpd?: string;
|
|
2797
|
+
strokeHeadEnd?: ArrowEnd;
|
|
2798
|
+
strokeTailEnd?: ArrowEnd;
|
|
2495
2799
|
geom: ShapeGeom;
|
|
2496
2800
|
text?: ShapeText;
|
|
2497
2801
|
}
|
|
@@ -2620,7 +2924,7 @@ interface ImageAnchor {
|
|
|
2620
2924
|
alpha?: number;
|
|
2621
2925
|
duotone?: Duotone;
|
|
2622
2926
|
}
|
|
2623
|
-
interface
|
|
2927
|
+
interface WorksheetCellRange {
|
|
2624
2928
|
top: number;
|
|
2625
2929
|
left: number;
|
|
2626
2930
|
bottom: number;
|
|
@@ -2634,7 +2938,7 @@ interface Hyperlink {
|
|
|
2634
2938
|
display?: string | null;
|
|
2635
2939
|
}
|
|
2636
2940
|
interface ConditionalFormat {
|
|
2637
|
-
sqref:
|
|
2941
|
+
sqref: WorksheetCellRange[];
|
|
2638
2942
|
rules: CfRule[];
|
|
2639
2943
|
}
|
|
2640
2944
|
type CfRule = {
|
|
@@ -2869,7 +3173,7 @@ interface XlsxTextRunInfo {
|
|
|
2869
3173
|
row: number;
|
|
2870
3174
|
col: number;
|
|
2871
3175
|
}
|
|
2872
|
-
interface
|
|
3176
|
+
interface XlsxRenderViewportOptions {
|
|
2873
3177
|
width?: number;
|
|
2874
3178
|
height?: number;
|
|
2875
3179
|
dpr?: number;
|
|
@@ -2880,8 +3184,6 @@ interface RenderViewportOptions {
|
|
|
2880
3184
|
freezeRows?: number;
|
|
2881
3185
|
freezeCols?: number;
|
|
2882
3186
|
cellScale?: number;
|
|
2883
|
-
loadedImages?: Map<string, CanvasImageSource | null>;
|
|
2884
|
-
fetchImage?: (path: string, mimeType: string) => Promise<Blob>;
|
|
2885
3187
|
onTextRun?: (info: XlsxTextRunInfo) => void;
|
|
2886
3188
|
selectedRowRange?: {
|
|
2887
3189
|
start: number;
|
|
@@ -2901,12 +3203,9 @@ type ResolvedList = {
|
|
|
2901
3203
|
kind: 'formula';
|
|
2902
3204
|
formula: string;
|
|
2903
3205
|
};
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
}
|
|
2908
|
-
type WireRenderViewportOptions = Omit<RenderViewportOptions, 'onTextRun' | 'loadedImages' | 'fetchImage'> & {
|
|
2909
|
-
sizeOverrides?: WireSizeOverrides;
|
|
3206
|
+
type RenderViewportToBitmapOptions = Omit<XlsxRenderViewportOptions, 'onTextRun'> & {
|
|
3207
|
+
width: number;
|
|
3208
|
+
height: number;
|
|
2910
3209
|
};
|
|
2911
3210
|
interface LoadOptions extends LoadOptions$3 {
|
|
2912
3211
|
mode?: 'main' | 'worker';
|
|
@@ -2955,16 +3254,97 @@ declare class XlsxWorkbook {
|
|
|
2955
3254
|
toMarkdown(): Promise<string>;
|
|
2956
3255
|
resolveValidationList(sheetIndex: number, formula1: string | undefined): Promise<ResolvedList>;
|
|
2957
3256
|
cellText(ws: Worksheet, cell: Cell): string;
|
|
2958
|
-
renderViewport(target: HTMLCanvasElement | OffscreenCanvas, sheetIndex: number, viewport: ViewportRange, opts?:
|
|
2959
|
-
renderViewportToBitmap(sheetIndex: number, viewport: ViewportRange, opts:
|
|
2960
|
-
width: number;
|
|
2961
|
-
height: number;
|
|
2962
|
-
}): Promise<ImageBitmap>;
|
|
3257
|
+
renderViewport(target: HTMLCanvasElement | OffscreenCanvas, sheetIndex: number, viewport: ViewportRange, opts?: XlsxRenderViewportOptions): Promise<void>;
|
|
3258
|
+
renderViewportToBitmap(sheetIndex: number, viewport: ViewportRange, opts: RenderViewportToBitmapOptions): Promise<ImageBitmap>;
|
|
2963
3259
|
private withWorksheetArchiveOperation;
|
|
2964
3260
|
destroy(): void;
|
|
2965
3261
|
private assertResourceHealthy;
|
|
2966
3262
|
}
|
|
2967
3263
|
type CanvasViewerRenderMode = 'main' | 'worker';
|
|
3264
|
+
interface CellAddress {
|
|
3265
|
+
row: number;
|
|
3266
|
+
col: number;
|
|
3267
|
+
}
|
|
3268
|
+
type XlsxSelectionArea = Readonly<{
|
|
3269
|
+
kind: 'cells';
|
|
3270
|
+
top: number;
|
|
3271
|
+
left: number;
|
|
3272
|
+
bottom: number;
|
|
3273
|
+
right: number;
|
|
3274
|
+
}> | Readonly<{
|
|
3275
|
+
kind: 'rows';
|
|
3276
|
+
firstRow: number;
|
|
3277
|
+
lastRow: number;
|
|
3278
|
+
}> | Readonly<{
|
|
3279
|
+
kind: 'columns';
|
|
3280
|
+
firstColumn: number;
|
|
3281
|
+
lastColumn: number;
|
|
3282
|
+
}> | Readonly<{
|
|
3283
|
+
kind: 'sheet';
|
|
3284
|
+
}>;
|
|
3285
|
+
interface XlsxSelectionState {
|
|
3286
|
+
readonly areas: readonly XlsxSelectionArea[];
|
|
3287
|
+
readonly activeAreaIndex: number;
|
|
3288
|
+
readonly activeCell: CellAddress;
|
|
3289
|
+
readonly extensionAnchor: CellAddress;
|
|
3290
|
+
}
|
|
3291
|
+
type XlsxSelectionInput = string | XlsxSelectionState | null;
|
|
3292
|
+
interface XlsxSelectionContextOptions {
|
|
3293
|
+
readonly maxCells?: number;
|
|
3294
|
+
readonly maxTextCharacters?: number;
|
|
3295
|
+
}
|
|
3296
|
+
interface XlsxSelectionContextCell {
|
|
3297
|
+
readonly address: CellAddress;
|
|
3298
|
+
readonly displayText: string;
|
|
3299
|
+
readonly valueType: 'empty' | 'text' | 'number' | 'bool' | 'error' | 'shared';
|
|
3300
|
+
readonly value: string | number | boolean | null;
|
|
3301
|
+
readonly formula?: string;
|
|
3302
|
+
}
|
|
3303
|
+
interface XlsxRangeSelectionContext {
|
|
3304
|
+
readonly format: 'xlsx';
|
|
3305
|
+
readonly kind: 'range';
|
|
3306
|
+
readonly sheetIndex: number;
|
|
3307
|
+
readonly sheetName: string;
|
|
3308
|
+
readonly selection: XlsxSelectionState;
|
|
3309
|
+
readonly coordinateCountUpperBound: number;
|
|
3310
|
+
readonly cells: readonly XlsxSelectionContextCell[];
|
|
3311
|
+
readonly truncated: boolean;
|
|
3312
|
+
readonly truncationReasons: readonly ('cells' | 'text')[];
|
|
3313
|
+
readonly maxCells: number;
|
|
3314
|
+
readonly textCharacters: number;
|
|
3315
|
+
readonly maxTextCharacters: number;
|
|
3316
|
+
}
|
|
3317
|
+
interface XlsxElementAnchorMarker {
|
|
3318
|
+
readonly row: number;
|
|
3319
|
+
readonly col: number;
|
|
3320
|
+
readonly offsetX: number;
|
|
3321
|
+
readonly offsetY: number;
|
|
3322
|
+
}
|
|
3323
|
+
interface XlsxElementContext {
|
|
3324
|
+
readonly format: 'xlsx';
|
|
3325
|
+
readonly kind: 'element';
|
|
3326
|
+
readonly sheetIndex: number;
|
|
3327
|
+
readonly sheetName: string;
|
|
3328
|
+
readonly elementType: 'chart' | 'image' | 'shape';
|
|
3329
|
+
readonly elementIndex: number;
|
|
3330
|
+
readonly shapeIndex?: number;
|
|
3331
|
+
readonly anchor: Readonly<{
|
|
3332
|
+
from: XlsxElementAnchorMarker;
|
|
3333
|
+
to: XlsxElementAnchorMarker;
|
|
3334
|
+
}>;
|
|
3335
|
+
readonly text?: string;
|
|
3336
|
+
readonly mimeType?: string;
|
|
3337
|
+
readonly seriesCount?: number;
|
|
3338
|
+
readonly shapeCount?: number;
|
|
3339
|
+
readonly truncated: boolean;
|
|
3340
|
+
readonly truncationReasons: readonly ('text')[];
|
|
3341
|
+
readonly textCharacters: number;
|
|
3342
|
+
readonly maxTextCharacters: number;
|
|
3343
|
+
}
|
|
3344
|
+
type XlsxSelectionContext = XlsxRangeSelectionContext | XlsxElementContext;
|
|
3345
|
+
declare const MAX_SELECTION_AREAS = 128;
|
|
3346
|
+
declare const MAX_SELECTION_CONTEXT_CELLS = 10000;
|
|
3347
|
+
declare const MAX_SELECTION_CONTEXT_TEXT_CHARACTERS: number;
|
|
2968
3348
|
interface XlsxMatchLocation {
|
|
2969
3349
|
sheet: number;
|
|
2970
3350
|
sheetName: string;
|
|
@@ -2973,7 +3353,7 @@ interface XlsxMatchLocation {
|
|
|
2973
3353
|
col: number;
|
|
2974
3354
|
}
|
|
2975
3355
|
type HiddenSheetMode = 'show' | 'skip' | 'dim';
|
|
2976
|
-
interface XlsxSheetViewerOptions extends LoadOptions
|
|
3356
|
+
interface XlsxSheetViewerOptions extends LoadOptions {
|
|
2977
3357
|
cellScale?: number;
|
|
2978
3358
|
resizable?: boolean;
|
|
2979
3359
|
showScrollbars?: boolean;
|
|
@@ -2983,12 +3363,14 @@ interface XlsxSheetViewerOptions extends LoadOptions$3 {
|
|
|
2983
3363
|
onReady?: (sheetNames: string[]) => void;
|
|
2984
3364
|
onSheetChange?: (index: number, total: number) => void;
|
|
2985
3365
|
onError?: (err: Error) => void;
|
|
2986
|
-
|
|
3366
|
+
onSelectionStateChange?: (selection: XlsxSelectionState | null) => void;
|
|
3367
|
+
onSelectionContextChange?: (context: XlsxSelectionContext | null) => void;
|
|
3368
|
+
onContextMenu?: (event: ViewerContextMenuEvent<XlsxSelectionContext>) => void;
|
|
3369
|
+
enableElementSelection?: boolean;
|
|
2987
3370
|
onHyperlinkClick?: (target: HyperlinkTarget) => void;
|
|
2988
3371
|
enableHyperlinks?: boolean;
|
|
2989
3372
|
selectionColor?: string;
|
|
2990
3373
|
findHighlightColors?: FindHighlightColors;
|
|
2991
|
-
mode?: 'main' | 'worker';
|
|
2992
3374
|
hiddenSheetMode?: HiddenSheetMode;
|
|
2993
3375
|
onViewportChange?: (offset: XlsxViewportOffset) => void;
|
|
2994
3376
|
}
|
|
@@ -3002,16 +3384,22 @@ interface XlsxViewportOffset {
|
|
|
3002
3384
|
interface XlsxScrollToCellOptions {
|
|
3003
3385
|
readonly align?: 'nearest' | 'start' | 'center' | 'end';
|
|
3004
3386
|
}
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3387
|
+
type XlsxCopyResult = Readonly<{
|
|
3388
|
+
status: 'copied';
|
|
3389
|
+
cellCount: number;
|
|
3390
|
+
utf16CodeUnits: number;
|
|
3391
|
+
}> | Readonly<{
|
|
3392
|
+
status: 'empty-selection';
|
|
3393
|
+
}> | Readonly<{
|
|
3394
|
+
status: 'unsupported-multiple-areas';
|
|
3395
|
+
}> | Readonly<{
|
|
3396
|
+
status: 'too-large';
|
|
3397
|
+
limit: 'cells' | 'text';
|
|
3398
|
+
}> | Readonly<{
|
|
3399
|
+
status: 'clipboard-unavailable';
|
|
3400
|
+
}> | Readonly<{
|
|
3401
|
+
status: 'clipboard-denied';
|
|
3402
|
+
}>;
|
|
3015
3403
|
type XlsxViewerMount = {
|
|
3016
3404
|
readonly kind: 'composite';
|
|
3017
3405
|
} | {
|
|
@@ -3071,22 +3459,30 @@ declare class XlsxViewerEngine implements ZoomableViewer {
|
|
|
3071
3459
|
private resizeObserver;
|
|
3072
3460
|
private _lastViewportNotification;
|
|
3073
3461
|
private get anchorCell();
|
|
3074
|
-
private set anchorCell(value);
|
|
3075
3462
|
private get activeCell();
|
|
3076
|
-
private set activeCell(value);
|
|
3077
3463
|
private get selectionMode();
|
|
3078
|
-
private set selectionMode(value);
|
|
3079
3464
|
private get isSelecting();
|
|
3080
3465
|
private get selectionPointerId();
|
|
3081
3466
|
private beginSelectionDrag;
|
|
3082
3467
|
private _pendingZoomAnchor;
|
|
3083
3468
|
private readonly selectionController;
|
|
3469
|
+
private lastNotifiedSelectionState;
|
|
3470
|
+
private emittingSelectionChange;
|
|
3471
|
+
private pendingSelectionChange;
|
|
3472
|
+
private selectionNotificationScheduled;
|
|
3473
|
+
private selectionNotificationCount;
|
|
3474
|
+
private selectionContextNotificationFrame;
|
|
3475
|
+
private selectionContextNotificationMicrotask;
|
|
3476
|
+
private readonly selectionContextRows;
|
|
3477
|
+
private readonly selectionContextCells;
|
|
3478
|
+
private elementContext;
|
|
3084
3479
|
private selectionOverlay;
|
|
3085
3480
|
private findOverlay;
|
|
3086
3481
|
private _find;
|
|
3087
3482
|
private keydownHandler;
|
|
3088
3483
|
private pendingTap;
|
|
3089
3484
|
private pendingClick;
|
|
3485
|
+
private pendingElementClick;
|
|
3090
3486
|
private resizeDrag;
|
|
3091
3487
|
private selectionAutoScrollPointer;
|
|
3092
3488
|
private selectionAutoScrollFrame;
|
|
@@ -3111,7 +3507,7 @@ declare class XlsxViewerEngine implements ZoomableViewer {
|
|
|
3111
3507
|
private get workbook();
|
|
3112
3508
|
private get wb();
|
|
3113
3509
|
private set wb(value);
|
|
3114
|
-
showSheet
|
|
3510
|
+
private showSheet;
|
|
3115
3511
|
private isCurrentSheetRequest;
|
|
3116
3512
|
private buildOutline;
|
|
3117
3513
|
private layoutGutters;
|
|
@@ -3154,9 +3550,18 @@ declare class XlsxViewerEngine implements ZoomableViewer {
|
|
|
3154
3550
|
private _stepSheet;
|
|
3155
3551
|
private _initialSheet;
|
|
3156
3552
|
getCellAt(clientX: number, clientY: number): CellAddress | null;
|
|
3553
|
+
private elementContextViewport;
|
|
3554
|
+
private elementContextAt;
|
|
3157
3555
|
private getCellRect;
|
|
3158
|
-
get
|
|
3159
|
-
|
|
3556
|
+
get selectionState(): XlsxSelectionState | null;
|
|
3557
|
+
setSelection(input: XlsxSelectionInput): void;
|
|
3558
|
+
getSelectionContext(options?: XlsxSelectionContextOptions): XlsxSelectionContext | null;
|
|
3559
|
+
private commitSelection;
|
|
3560
|
+
private setElementContext;
|
|
3561
|
+
private scheduleSelectionContextNotification;
|
|
3562
|
+
private emitSelectionChange;
|
|
3563
|
+
private scheduleSelectionNotification;
|
|
3564
|
+
private finishSelectionNotificationChain;
|
|
3160
3565
|
private getHeaderHit;
|
|
3161
3566
|
private getResizeTarget;
|
|
3162
3567
|
private applyResize;
|
|
@@ -3164,8 +3569,9 @@ declare class XlsxViewerEngine implements ZoomableViewer {
|
|
|
3164
3569
|
setHiddenSheetMode(mode: HiddenSheetMode): Promise<void>;
|
|
3165
3570
|
get hiddenSheetMode(): HiddenSheetMode;
|
|
3166
3571
|
get visibleSheetCount(): number;
|
|
3167
|
-
|
|
3572
|
+
copySelection(): Promise<XlsxCopyResult>;
|
|
3168
3573
|
private updateSelectionOverlay;
|
|
3574
|
+
private drawElementContextOverlay;
|
|
3169
3575
|
private maybeDrawValidationDropdown;
|
|
3170
3576
|
private updateFindOverlay;
|
|
3171
3577
|
findText(query: string, opts?: FindMatchesOptions): Promise<FindMatch<XlsxMatchLocation>[]>;
|
|
@@ -3196,6 +3602,8 @@ declare class XlsxViewerEngine implements ZoomableViewer {
|
|
|
3196
3602
|
private trackSelectionAutoScroll;
|
|
3197
3603
|
private runSelectionAutoScroll;
|
|
3198
3604
|
private stopSelectionAutoScroll;
|
|
3605
|
+
private contextMenuTargetIsSelected;
|
|
3606
|
+
private resolveContextMenuContext;
|
|
3199
3607
|
private setupSelectionEvents;
|
|
3200
3608
|
private buildTabs;
|
|
3201
3609
|
private makeNavButton;
|
|
@@ -3230,7 +3638,7 @@ declare class XlsxViewerEngine implements ZoomableViewer {
|
|
|
3230
3638
|
private destroyedError;
|
|
3231
3639
|
}
|
|
3232
3640
|
declare class XlsxViewer extends XlsxViewerEngine {
|
|
3233
|
-
static fromWorkbook(container: HTMLElement, workbook: XlsxWorkbook, opts?: Omit<XlsxViewerOptions, keyof LoadOptions
|
|
3641
|
+
static fromWorkbook(container: HTMLElement, workbook: XlsxWorkbook, opts?: Omit<XlsxViewerOptions, keyof LoadOptions>): Omit<XlsxViewer, 'load'>;
|
|
3234
3642
|
constructor(container: HTMLElement, opts?: XlsxViewerOptions);
|
|
3235
3643
|
}
|
|
3236
3644
|
declare class XlsxSheetViewer implements ZoomableViewer {
|
|
@@ -3240,7 +3648,7 @@ declare class XlsxSheetViewer implements ZoomableViewer {
|
|
|
3240
3648
|
private destroyed;
|
|
3241
3649
|
private snapshot;
|
|
3242
3650
|
private lastMetrics;
|
|
3243
|
-
static fromWorkbook(canvasElement: HTMLCanvasElement, workbook: XlsxWorkbook, options?: Omit<XlsxSheetViewerOptions, keyof LoadOptions
|
|
3651
|
+
static fromWorkbook(canvasElement: HTMLCanvasElement, workbook: XlsxWorkbook, options?: Omit<XlsxSheetViewerOptions, keyof LoadOptions>): Omit<XlsxSheetViewer, 'load'>;
|
|
3244
3652
|
constructor(canvasElement: HTMLCanvasElement, options?: XlsxSheetViewerOptions);
|
|
3245
3653
|
load(source: string | ArrayBuffer): Promise<void>;
|
|
3246
3654
|
get sheetIndex(): number;
|
|
@@ -3260,8 +3668,10 @@ declare class XlsxSheetViewer implements ZoomableViewer {
|
|
|
3260
3668
|
fitWidth(): void;
|
|
3261
3669
|
fitPage(): void;
|
|
3262
3670
|
getCellAt(clientX: number, clientY: number): CellAddress | null;
|
|
3263
|
-
get
|
|
3264
|
-
|
|
3671
|
+
get selectionState(): XlsxSelectionState | null;
|
|
3672
|
+
setSelection(selection: XlsxSelectionInput): void;
|
|
3673
|
+
getSelectionContext(options?: XlsxSelectionContextOptions): XlsxSelectionContext | null;
|
|
3674
|
+
copySelection(): Promise<XlsxCopyResult>;
|
|
3265
3675
|
setSelectionColor(color: string): void;
|
|
3266
3676
|
setHiddenSheetMode(mode: HiddenSheetMode): Promise<void>;
|
|
3267
3677
|
get hiddenSheetMode(): HiddenSheetMode;
|
|
@@ -3278,7 +3688,7 @@ declare class XlsxSheetViewer implements ZoomableViewer {
|
|
|
3278
3688
|
}
|
|
3279
3689
|
declare function resolveSharedStrings(ws: Worksheet, sharedStrings: SharedString[]): Worksheet;
|
|
3280
3690
|
declare namespace xlsx_d_exports {
|
|
3281
|
-
export { AutoResizeOptions, Border, BorderEdge, Cell, CellAddress, CellFill, CellFont,
|
|
3691
|
+
export { ArrowEnd, AutoResizeOptions, Border, BorderEdge, Cell, CellAddress, CellFill, CellFont, CellValue, CellXf, CfIcon, CfRule, CfStop, CfValue, ChartAnchor, ChartDataLabelOverride, ChartDataPointOverride, ChartErrBars, ChartLabelBox, ChartManualLayout, ChartModel, ChartRect, ChartSeries, ChartSeriesDataLabels, ChartTrendline, ChartType, ChartexBoxSeries, ChartexBoxWhisker, ChartexSunburst, ChartexSunburstRow, ConditionalFormat, DataValidation, DefinedName, Duotone, Dxf, FillRect, FindHighlightColors, FindMatch, FindMatchesOptions, GradientFill, GradientFillSpec, GradientStop$1 as GradientStop, HiddenSheetMode, Hyperlink, HyperlinkTarget, ImageAnchor, LegendManualLayout, LoadOptions, MAX_SELECTION_AREAS, MAX_SELECTION_CONTEXT_CELLS, MAX_SELECTION_CONTEXT_TEXT_CHARACTERS, MathAccent, MathArray, MathBar, MathBorderBox, MathBox, MathDelimiter, MathFraction, MathFunc, MathGroup, MathGroupChr, MathLimit, MathNary, MathNode, MathPhant, MathRadical, MathRenderer, MathRun, MathSPre, MathScript, MathStyle, MathSvg, MergeCell, NumFmt, OoxmlDecodedImageLimitError, OoxmlDecodedImageLimitMetric, OoxmlError, OoxmlErrorCode, OoxmlErrorStage, OoxmlFormat, OoxmlResourceLimit, OoxmlResourceLimitError, OoxmlResourceLimitErrorDetails, OoxmlResourceLimits, OoxmlResourceMetric, OoxmlResourceMetrics, OoxmlResourceMetricsCheckpoint, OoxmlResourceName, OoxmlResourcePolicySnapshot, OoxmlResourceUsageSnapshot, OoxmlResourceViolation, OutlinePr, ParsedWorkbook, PathCmd, PathInfo, PatternFill, PhoneticAlignment, PhoneticProperties, PhoneticRun, PhoneticType, PivotCacheSource, PivotDataField, PivotDiagnostic, PivotLocation, PivotMetadataStatus, PivotPageField, PivotPartialReason, PivotTableMetadata, RenderViewportToBitmapOptions, ResolvedList, Row, Run, RunFont, SecondaryValueAxis, ShapeAnchor, ShapeFill, ShapeGeom, ShapeInfo, ShapeParagraph, ShapeText, ShapeTextRun, SharedString, SheetMeta, SheetVisibility, SlicerAnchor, SlicerElementStyle, SlicerItem, SlicerStyle, SolidFill, SpaceLine, Sparkline, SparklineGroup, Styles, TableColumnInfo, TableInfo, ViewerContextMenuEvent, ViewportRange, Workbook, Worksheet, WorksheetCellRange, XlsxComment, XlsxCopyResult, XlsxElementAnchorMarker, XlsxElementContext, XlsxMatchLocation, XlsxRangeSelectionContext, XlsxRenderViewportOptions, XlsxScrollToCellOptions, XlsxSelectionArea, XlsxSelectionContext, XlsxSelectionContextCell, XlsxSelectionContextOptions, XlsxSelectionInput, XlsxSelectionState, XlsxSheetViewer, XlsxSheetViewerOptions, XlsxTextRunInfo, XlsxViewer, XlsxViewerOptions, XlsxViewportOffset, XlsxWorkbook, ZoomableViewer, autoResize, isOoxmlDecodedImageLimitError, openExternalHyperlink, resolveSharedStrings };
|
|
3282
3692
|
}
|
|
3283
3693
|
//#endregion
|
|
3284
3694
|
export { docx_d_exports as docx, pptx_d_exports as pptx, xlsx_d_exports as xlsx };
|