@silurus/ooxml 0.10.0 → 0.12.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.
- package/README.md +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{pptx-CsVDY5Ej.js → pptx-VEtxsakL.js} +1 -1
- package/dist/{pptx-BGtPXrb6.cjs → pptx-f3apnG_M.cjs} +1 -1
- package/dist/pptx.cjs +1 -1
- package/dist/pptx.mjs +1 -1
- package/dist/renderer-DB-DghvA.cjs +1 -0
- package/dist/renderer-rSBto6l5.js +683 -0
- package/dist/types/index.d.ts +201 -1
- package/dist/types/pptx.d.ts +6 -0
- package/dist/types/xlsx.d.ts +194 -0
- package/dist/xlsx-BWBXfR7z.js +2232 -0
- package/dist/xlsx-eilavpD_.cjs +9 -0
- package/dist/xlsx.cjs +1 -1
- package/dist/xlsx.mjs +1 -1
- package/package.json +1 -1
- package/dist/renderer-B8QsMFSc.cjs +0 -1
- package/dist/renderer-BrgdtBit.js +0 -564
- package/dist/xlsx-BJUBRQc-.cjs +0 -5
- package/dist/xlsx-CLl6pKA0.js +0 -1911
package/dist/types/index.d.ts
CHANGED
|
@@ -47,6 +47,12 @@ declare interface Border {
|
|
|
47
47
|
bottom: BorderEdge | null;
|
|
48
48
|
diagonalUp?: BorderEdge | null;
|
|
49
49
|
diagonalDown?: BorderEdge | null;
|
|
50
|
+
/** Inner horizontal rule between rows inside a region
|
|
51
|
+
* (ECMA-376 §18.8.40 `tableStyleElement/border/horizontal`).
|
|
52
|
+
* Only set on table-style dxfs; absent on cell-level borders. */
|
|
53
|
+
horizontal?: BorderEdge | null;
|
|
54
|
+
/** Inner vertical rule between columns inside a region. */
|
|
55
|
+
vertical?: BorderEdge | null;
|
|
50
56
|
}
|
|
51
57
|
|
|
52
58
|
declare interface BorderEdge {
|
|
@@ -135,6 +141,11 @@ declare interface CellXf {
|
|
|
135
141
|
shrinkToFit?: boolean;
|
|
136
142
|
}
|
|
137
143
|
|
|
144
|
+
declare interface CfIcon {
|
|
145
|
+
iconSet: string;
|
|
146
|
+
iconId: number;
|
|
147
|
+
}
|
|
148
|
+
|
|
138
149
|
declare type CfRule = {
|
|
139
150
|
type: 'cellIs';
|
|
140
151
|
operator: string;
|
|
@@ -176,6 +187,7 @@ declare type CfRule = {
|
|
|
176
187
|
cfvos: CfValue[];
|
|
177
188
|
reverse: boolean;
|
|
178
189
|
priority: number;
|
|
190
|
+
customIcons?: CfIcon[];
|
|
179
191
|
} | {
|
|
180
192
|
type: 'other';
|
|
181
193
|
kind: string;
|
|
@@ -240,6 +252,36 @@ declare interface ChartData {
|
|
|
240
252
|
catAxisFontSizeHpt?: number | null;
|
|
241
253
|
/** Value axis tick-label font size in hpt. */
|
|
242
254
|
valAxisFontSizeHpt?: number | null;
|
|
255
|
+
/** Outer chartSpace background (ECMA-376 §21.2.2.5 `<c:spPr>`). Hex without
|
|
256
|
+
* '#' for a solid fill, undefined for `<a:noFill/>` or an absent spPr.
|
|
257
|
+
* Combine with `hasChartSpPr` to distinguish explicit-transparent from
|
|
258
|
+
* default-opaque-white. */
|
|
259
|
+
chartBg?: string | null;
|
|
260
|
+
/** True when the parser saw a `<c:chartSpace><c:spPr>` element. Lets the
|
|
261
|
+
* adapter tell "spec said noFill → transparent" from "no spPr → default". */
|
|
262
|
+
hasChartSpPr?: boolean;
|
|
263
|
+
/** `<c:legend><c:manualLayout>` fractions of chart space (§21.2.2.31). */
|
|
264
|
+
legendManualLayout?: LegendManualLayout | null;
|
|
265
|
+
/** `<c:catAx><c:delete val="1"/>` — hide the category axis (§21.2.2.40). */
|
|
266
|
+
catAxisHidden?: boolean;
|
|
267
|
+
/** `<c:valAx><c:delete val="1"/>` — hide the value axis (§21.2.2.40). */
|
|
268
|
+
valAxisHidden?: boolean;
|
|
269
|
+
/** `<c:valAx><c:numFmt@formatCode>` — number format for value-axis tick
|
|
270
|
+
* labels (ECMA-376 §21.2.2.21). */
|
|
271
|
+
valAxisFormatCode?: string | null;
|
|
272
|
+
/** `<c:barChart><c:gapWidth>` — space between category groups as a percent
|
|
273
|
+
* of bar width (§21.2.2.13). */
|
|
274
|
+
barGapWidth?: number | null;
|
|
275
|
+
/** `<c:barChart><c:overlap>` — signed percent overlap between bars in a
|
|
276
|
+
* cluster (§21.2.2.25). Negative = gap. */
|
|
277
|
+
barOverlap?: number | null;
|
|
278
|
+
/** `<c:dLbls><c:dLblPos>` — data label position (§21.2.2.16). */
|
|
279
|
+
dataLabelPosition?: string | null;
|
|
280
|
+
/** Hex (no `#`) for data label text color, resolved from `<c:dLbls><c:txPr>`. */
|
|
281
|
+
dataLabelFontColor?: string | null;
|
|
282
|
+
/** `<c:dLbls><c:numFmt@formatCode>` — chart-level override for data label
|
|
283
|
+
* number format (§21.2.2.35). */
|
|
284
|
+
dataLabelFormatCode?: string | null;
|
|
243
285
|
}
|
|
244
286
|
|
|
245
287
|
/**
|
|
@@ -317,6 +359,12 @@ declare interface ChartSeries {
|
|
|
317
359
|
* that don't parse markers (e.g. pptx today) keep their existing behavior.
|
|
318
360
|
*/
|
|
319
361
|
showMarker?: boolean | null;
|
|
362
|
+
/**
|
|
363
|
+
* Excel number-format code for this series' values (ECMA-376 §21.2.2.37,
|
|
364
|
+
* `<c:val>/<c:numRef>/<c:formatCode>`). Used to format data labels when the
|
|
365
|
+
* chart-level `<c:dLbls><c:numFmt>` is not set. null = no series-level code.
|
|
366
|
+
*/
|
|
367
|
+
valFormatCode?: string | null;
|
|
320
368
|
}
|
|
321
369
|
|
|
322
370
|
declare interface ConditionalFormat {
|
|
@@ -464,6 +512,11 @@ declare interface Dxf {
|
|
|
464
512
|
font: Font | null;
|
|
465
513
|
fill: Fill_2 | null;
|
|
466
514
|
border: Border | null;
|
|
515
|
+
/** Number format override from the dxf (ECMA-376 §18.8.17). When a
|
|
516
|
+
* conditional-formatting rule matches, this numFmt replaces the cell's own
|
|
517
|
+
* style numFmt for rendering — e.g. switching a calendar cell from `d` to
|
|
518
|
+
* `m"月"d"日"` on the first day of each month. */
|
|
519
|
+
numFmt?: NumFmt | null;
|
|
467
520
|
}
|
|
468
521
|
|
|
469
522
|
declare interface FieldRun {
|
|
@@ -620,6 +673,15 @@ declare interface ImageRun {
|
|
|
620
673
|
wrapSide?: string;
|
|
621
674
|
}
|
|
622
675
|
|
|
676
|
+
declare interface LegendManualLayout {
|
|
677
|
+
xMode: string;
|
|
678
|
+
yMode: string;
|
|
679
|
+
x: number;
|
|
680
|
+
y: number;
|
|
681
|
+
w: number;
|
|
682
|
+
h: number;
|
|
683
|
+
}
|
|
684
|
+
|
|
623
685
|
declare interface LineBreak {
|
|
624
686
|
type: 'break';
|
|
625
687
|
}
|
|
@@ -766,6 +828,41 @@ declare type PathCmd = {
|
|
|
766
828
|
};
|
|
767
829
|
|
|
768
830
|
declare type PathCmd_2 = {
|
|
831
|
+
op: 'moveTo';
|
|
832
|
+
x: number;
|
|
833
|
+
y: number;
|
|
834
|
+
} | {
|
|
835
|
+
op: 'lineTo';
|
|
836
|
+
x: number;
|
|
837
|
+
y: number;
|
|
838
|
+
} | {
|
|
839
|
+
op: 'cubicBezTo';
|
|
840
|
+
x1: number;
|
|
841
|
+
y1: number;
|
|
842
|
+
x2: number;
|
|
843
|
+
y2: number;
|
|
844
|
+
x3: number;
|
|
845
|
+
y3: number;
|
|
846
|
+
} | {
|
|
847
|
+
op: 'quadBezTo';
|
|
848
|
+
x1: number;
|
|
849
|
+
y1: number;
|
|
850
|
+
x2: number;
|
|
851
|
+
y2: number;
|
|
852
|
+
}
|
|
853
|
+
/** ECMA-376 §20.1.9.3. stAng/swAng in 60000ths of a degree. wr/hr in
|
|
854
|
+
* the path's own coordinate units. Pen position is the arc start. */
|
|
855
|
+
| {
|
|
856
|
+
op: 'arcTo';
|
|
857
|
+
wr: number;
|
|
858
|
+
hr: number;
|
|
859
|
+
stAng: number;
|
|
860
|
+
swAng: number;
|
|
861
|
+
} | {
|
|
862
|
+
op: 'close';
|
|
863
|
+
};
|
|
864
|
+
|
|
865
|
+
declare type PathCmd_3 = {
|
|
769
866
|
cmd: 'moveTo';
|
|
770
867
|
x: number;
|
|
771
868
|
y: number;
|
|
@@ -791,6 +888,12 @@ declare type PathCmd_2 = {
|
|
|
791
888
|
cmd: 'close';
|
|
792
889
|
};
|
|
793
890
|
|
|
891
|
+
declare interface PathInfo {
|
|
892
|
+
w: number;
|
|
893
|
+
h: number;
|
|
894
|
+
commands: PathCmd_2[];
|
|
895
|
+
}
|
|
896
|
+
|
|
794
897
|
declare interface PictureElement {
|
|
795
898
|
type: 'picture';
|
|
796
899
|
x: number;
|
|
@@ -1081,6 +1184,18 @@ declare interface Shadow {
|
|
|
1081
1184
|
dir: number;
|
|
1082
1185
|
}
|
|
1083
1186
|
|
|
1187
|
+
declare interface ShapeAnchor {
|
|
1188
|
+
fromCol: number;
|
|
1189
|
+
fromColOff: number;
|
|
1190
|
+
fromRow: number;
|
|
1191
|
+
fromRowOff: number;
|
|
1192
|
+
toCol: number;
|
|
1193
|
+
toColOff: number;
|
|
1194
|
+
toRow: number;
|
|
1195
|
+
toRowOff: number;
|
|
1196
|
+
shapes: ShapeInfo[];
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1084
1199
|
declare interface ShapeElement {
|
|
1085
1200
|
type: 'shape';
|
|
1086
1201
|
x: number;
|
|
@@ -1130,6 +1245,36 @@ declare type ShapeFill = {
|
|
|
1130
1245
|
gradType: string;
|
|
1131
1246
|
};
|
|
1132
1247
|
|
|
1248
|
+
declare type ShapeGeom = {
|
|
1249
|
+
type: 'preset';
|
|
1250
|
+
name: string;
|
|
1251
|
+
} | {
|
|
1252
|
+
type: 'custom';
|
|
1253
|
+
paths: PathInfo[];
|
|
1254
|
+
}
|
|
1255
|
+
/** Bitmap picture leaf inside a `<xdr:grpSp>`. `dataUrl` is a pre-encoded
|
|
1256
|
+
* `data:<mime>;base64,…` produced by the Rust parser from the drawing's
|
|
1257
|
+
* relationship target. */
|
|
1258
|
+
| {
|
|
1259
|
+
type: 'image';
|
|
1260
|
+
dataUrl: string;
|
|
1261
|
+
};
|
|
1262
|
+
|
|
1263
|
+
declare interface ShapeInfo {
|
|
1264
|
+
/** Normalized [0,1] position/size relative to the anchor rect. */
|
|
1265
|
+
x: number;
|
|
1266
|
+
y: number;
|
|
1267
|
+
w: number;
|
|
1268
|
+
h: number;
|
|
1269
|
+
/** Rotation in degrees, clockwise. */
|
|
1270
|
+
rot: number;
|
|
1271
|
+
fillColor?: string;
|
|
1272
|
+
strokeColor?: string;
|
|
1273
|
+
/** Stroke width in EMU. 0 = no stroke. */
|
|
1274
|
+
strokeWidth: number;
|
|
1275
|
+
geom: ShapeGeom;
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1133
1278
|
declare interface ShapeRun {
|
|
1134
1279
|
widthPt: number;
|
|
1135
1280
|
heightPt: number;
|
|
@@ -1144,7 +1289,7 @@ declare interface ShapeRun {
|
|
|
1144
1289
|
/** Document-order index within a group; lower values render first. */
|
|
1145
1290
|
zOrder: number;
|
|
1146
1291
|
/** Normalized [0,1] custom-geometry sub-paths */
|
|
1147
|
-
subpaths:
|
|
1292
|
+
subpaths: PathCmd_3[][];
|
|
1148
1293
|
fill: ShapeFill | null;
|
|
1149
1294
|
stroke: string | null;
|
|
1150
1295
|
strokeWidth?: number;
|
|
@@ -1163,6 +1308,24 @@ declare interface SheetMeta {
|
|
|
1163
1308
|
rId: string;
|
|
1164
1309
|
}
|
|
1165
1310
|
|
|
1311
|
+
declare interface SlicerAnchor {
|
|
1312
|
+
fromCol: number;
|
|
1313
|
+
fromColOff: number;
|
|
1314
|
+
fromRow: number;
|
|
1315
|
+
fromRowOff: number;
|
|
1316
|
+
toCol: number;
|
|
1317
|
+
toColOff: number;
|
|
1318
|
+
toRow: number;
|
|
1319
|
+
toRowOff: number;
|
|
1320
|
+
caption: string;
|
|
1321
|
+
items: SlicerItem[];
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
declare interface SlicerItem {
|
|
1325
|
+
name: string;
|
|
1326
|
+
selected: boolean;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1166
1329
|
declare interface Slide {
|
|
1167
1330
|
index: number;
|
|
1168
1331
|
/** 1-based slide number (index + 1); used to render slidenum fields */
|
|
@@ -1248,6 +1411,27 @@ declare interface TableElement {
|
|
|
1248
1411
|
rows: TableRow[];
|
|
1249
1412
|
}
|
|
1250
1413
|
|
|
1414
|
+
declare interface TableInfo {
|
|
1415
|
+
range: CellRange;
|
|
1416
|
+
styleName: string;
|
|
1417
|
+
headerRowCount: number;
|
|
1418
|
+
totalsRowCount: number;
|
|
1419
|
+
showRowStripes: boolean;
|
|
1420
|
+
showColumnStripes: boolean;
|
|
1421
|
+
showFirstColumn: boolean;
|
|
1422
|
+
showLastColumn: boolean;
|
|
1423
|
+
/** Accent color resolved by the parser from the built-in style name against
|
|
1424
|
+
* the file's theme accents (e.g. `TableStyleLight18` → accent3). */
|
|
1425
|
+
accentColor: string;
|
|
1426
|
+
/** Dxf index for the `wholeTable` element of a custom `<tableStyle>`
|
|
1427
|
+
* (ECMA-376 §18.8.40). When set, its border/fill apply to every cell of
|
|
1428
|
+
* the table as a base layer. Undefined for built-in style names. */
|
|
1429
|
+
wholeTableDxf?: number;
|
|
1430
|
+
/** Dxf index for the `headerRow` element of a custom `<tableStyle>` —
|
|
1431
|
+
* provides header background, font color/weight, and vertical separators. */
|
|
1432
|
+
headerRowDxf?: number;
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1251
1435
|
declare interface TableRow {
|
|
1252
1436
|
/** Row height in EMU */
|
|
1253
1437
|
height: number;
|
|
@@ -1357,6 +1541,10 @@ declare interface Worksheet {
|
|
|
1357
1541
|
conditionalFormats: ConditionalFormat[];
|
|
1358
1542
|
images: ImageAnchor[];
|
|
1359
1543
|
charts: ChartAnchor[];
|
|
1544
|
+
/** Grouped shapes from `<xdr:grpSp>` inside twoCellAnchors
|
|
1545
|
+
* (ECMA-376 §20.5.2.17). Each anchor holds leaf shapes pre-flattened
|
|
1546
|
+
* with normalized [0,1] geometry relative to the anchor rect. */
|
|
1547
|
+
shapeGroups?: ShapeAnchor[];
|
|
1360
1548
|
/** Whether to display zero values (ECMA-376 §18.3.1.94). Defaults to true. */
|
|
1361
1549
|
showZeros?: boolean;
|
|
1362
1550
|
/** Whether to draw default grid lines (ECMA-376 §18.3.1.83
|
|
@@ -1376,6 +1564,13 @@ declare interface Worksheet {
|
|
|
1376
1564
|
* conditional-formatting `expression` rules that call named ranges
|
|
1377
1565
|
* (e.g. `task_start`, `today`). */
|
|
1378
1566
|
definedNames?: DefinedName[];
|
|
1567
|
+
/** Excel Tables on this sheet (ECMA-376 §18.5). The renderer overlays a
|
|
1568
|
+
* built-in style (bold header, banded rows) on the given ranges. */
|
|
1569
|
+
tables?: TableInfo[];
|
|
1570
|
+
/** Pivot / table slicers (Office 2010+ extension). Each anchor carries a
|
|
1571
|
+
* caption and the saved item list (with selection flags) so the renderer
|
|
1572
|
+
* can draw a static button bank without the live pivot engine. */
|
|
1573
|
+
slicers?: SlicerAnchor[];
|
|
1379
1574
|
}
|
|
1380
1575
|
|
|
1381
1576
|
export declare namespace xlsx {
|
|
@@ -1420,6 +1615,11 @@ declare interface XlsxChartSeries {
|
|
|
1420
1615
|
/** Marker visibility resolved from `<c:marker>`/chart-level default
|
|
1421
1616
|
* (ECMA-376 §21.2.2.32). */
|
|
1422
1617
|
showMarker?: boolean;
|
|
1618
|
+
/** `<c:val>/<c:numRef>/<c:formatCode>` — Excel number format for series
|
|
1619
|
+
* values (ECMA-376 §21.2.2.37). */
|
|
1620
|
+
valFormatCode?: string | null;
|
|
1621
|
+
/** `<c:ser><c:order>` — stacking/legend display order (§21.2.2.28). */
|
|
1622
|
+
order?: number;
|
|
1423
1623
|
}
|
|
1424
1624
|
|
|
1425
1625
|
declare class XlsxViewer {
|
package/dist/types/pptx.d.ts
CHANGED
|
@@ -123,6 +123,12 @@ declare interface ChartSeries {
|
|
|
123
123
|
* that don't parse markers (e.g. pptx today) keep their existing behavior.
|
|
124
124
|
*/
|
|
125
125
|
showMarker?: boolean | null;
|
|
126
|
+
/**
|
|
127
|
+
* Excel number-format code for this series' values (ECMA-376 §21.2.2.37,
|
|
128
|
+
* `<c:val>/<c:numRef>/<c:formatCode>`). Used to format data labels when the
|
|
129
|
+
* chart-level `<c:dLbls><c:numFmt>` is not set. null = no series-level code.
|
|
130
|
+
*/
|
|
131
|
+
valFormatCode?: string | null;
|
|
126
132
|
}
|
|
127
133
|
|
|
128
134
|
export declare type Fill = SolidFill | NoFill | GradientFill;
|
package/dist/types/xlsx.d.ts
CHANGED
|
@@ -30,6 +30,12 @@ export declare interface Border {
|
|
|
30
30
|
bottom: BorderEdge | null;
|
|
31
31
|
diagonalUp?: BorderEdge | null;
|
|
32
32
|
diagonalDown?: BorderEdge | null;
|
|
33
|
+
/** Inner horizontal rule between rows inside a region
|
|
34
|
+
* (ECMA-376 §18.8.40 `tableStyleElement/border/horizontal`).
|
|
35
|
+
* Only set on table-style dxfs; absent on cell-level borders. */
|
|
36
|
+
horizontal?: BorderEdge | null;
|
|
37
|
+
/** Inner vertical rule between columns inside a region. */
|
|
38
|
+
vertical?: BorderEdge | null;
|
|
33
39
|
}
|
|
34
40
|
|
|
35
41
|
export declare interface BorderEdge {
|
|
@@ -89,6 +95,11 @@ export declare interface CellXf {
|
|
|
89
95
|
shrinkToFit?: boolean;
|
|
90
96
|
}
|
|
91
97
|
|
|
98
|
+
declare interface CfIcon {
|
|
99
|
+
iconSet: string;
|
|
100
|
+
iconId: number;
|
|
101
|
+
}
|
|
102
|
+
|
|
92
103
|
declare type CfRule = {
|
|
93
104
|
type: 'cellIs';
|
|
94
105
|
operator: string;
|
|
@@ -130,6 +141,7 @@ declare type CfRule = {
|
|
|
130
141
|
cfvos: CfValue[];
|
|
131
142
|
reverse: boolean;
|
|
132
143
|
priority: number;
|
|
144
|
+
customIcons?: CfIcon[];
|
|
133
145
|
} | {
|
|
134
146
|
type: 'other';
|
|
135
147
|
kind: string;
|
|
@@ -194,6 +206,36 @@ declare interface ChartData {
|
|
|
194
206
|
catAxisFontSizeHpt?: number | null;
|
|
195
207
|
/** Value axis tick-label font size in hpt. */
|
|
196
208
|
valAxisFontSizeHpt?: number | null;
|
|
209
|
+
/** Outer chartSpace background (ECMA-376 §21.2.2.5 `<c:spPr>`). Hex without
|
|
210
|
+
* '#' for a solid fill, undefined for `<a:noFill/>` or an absent spPr.
|
|
211
|
+
* Combine with `hasChartSpPr` to distinguish explicit-transparent from
|
|
212
|
+
* default-opaque-white. */
|
|
213
|
+
chartBg?: string | null;
|
|
214
|
+
/** True when the parser saw a `<c:chartSpace><c:spPr>` element. Lets the
|
|
215
|
+
* adapter tell "spec said noFill → transparent" from "no spPr → default". */
|
|
216
|
+
hasChartSpPr?: boolean;
|
|
217
|
+
/** `<c:legend><c:manualLayout>` fractions of chart space (§21.2.2.31). */
|
|
218
|
+
legendManualLayout?: LegendManualLayout | null;
|
|
219
|
+
/** `<c:catAx><c:delete val="1"/>` — hide the category axis (§21.2.2.40). */
|
|
220
|
+
catAxisHidden?: boolean;
|
|
221
|
+
/** `<c:valAx><c:delete val="1"/>` — hide the value axis (§21.2.2.40). */
|
|
222
|
+
valAxisHidden?: boolean;
|
|
223
|
+
/** `<c:valAx><c:numFmt@formatCode>` — number format for value-axis tick
|
|
224
|
+
* labels (ECMA-376 §21.2.2.21). */
|
|
225
|
+
valAxisFormatCode?: string | null;
|
|
226
|
+
/** `<c:barChart><c:gapWidth>` — space between category groups as a percent
|
|
227
|
+
* of bar width (§21.2.2.13). */
|
|
228
|
+
barGapWidth?: number | null;
|
|
229
|
+
/** `<c:barChart><c:overlap>` — signed percent overlap between bars in a
|
|
230
|
+
* cluster (§21.2.2.25). Negative = gap. */
|
|
231
|
+
barOverlap?: number | null;
|
|
232
|
+
/** `<c:dLbls><c:dLblPos>` — data label position (§21.2.2.16). */
|
|
233
|
+
dataLabelPosition?: string | null;
|
|
234
|
+
/** Hex (no `#`) for data label text color, resolved from `<c:dLbls><c:txPr>`. */
|
|
235
|
+
dataLabelFontColor?: string | null;
|
|
236
|
+
/** `<c:dLbls><c:numFmt@formatCode>` — chart-level override for data label
|
|
237
|
+
* number format (§21.2.2.35). */
|
|
238
|
+
dataLabelFormatCode?: string | null;
|
|
197
239
|
}
|
|
198
240
|
|
|
199
241
|
declare interface ConditionalFormat {
|
|
@@ -210,6 +252,11 @@ declare interface Dxf {
|
|
|
210
252
|
font: Font | null;
|
|
211
253
|
fill: Fill | null;
|
|
212
254
|
border: Border | null;
|
|
255
|
+
/** Number format override from the dxf (ECMA-376 §18.8.17). When a
|
|
256
|
+
* conditional-formatting rule matches, this numFmt replaces the cell's own
|
|
257
|
+
* style numFmt for rendering — e.g. switching a calendar cell from `d` to
|
|
258
|
+
* `m"月"d"日"` on the first day of each month. */
|
|
259
|
+
numFmt?: NumFmt | null;
|
|
213
260
|
}
|
|
214
261
|
|
|
215
262
|
export declare interface Fill {
|
|
@@ -269,6 +316,15 @@ declare interface ImageAnchor {
|
|
|
269
316
|
dataUrl: string;
|
|
270
317
|
}
|
|
271
318
|
|
|
319
|
+
declare interface LegendManualLayout {
|
|
320
|
+
xMode: string;
|
|
321
|
+
yMode: string;
|
|
322
|
+
x: number;
|
|
323
|
+
y: number;
|
|
324
|
+
w: number;
|
|
325
|
+
h: number;
|
|
326
|
+
}
|
|
327
|
+
|
|
272
328
|
export declare interface MergeCell {
|
|
273
329
|
top: number;
|
|
274
330
|
left: number;
|
|
@@ -287,6 +343,47 @@ export declare interface ParsedWorkbook {
|
|
|
287
343
|
sharedStrings: SharedString[];
|
|
288
344
|
}
|
|
289
345
|
|
|
346
|
+
declare type PathCmd = {
|
|
347
|
+
op: 'moveTo';
|
|
348
|
+
x: number;
|
|
349
|
+
y: number;
|
|
350
|
+
} | {
|
|
351
|
+
op: 'lineTo';
|
|
352
|
+
x: number;
|
|
353
|
+
y: number;
|
|
354
|
+
} | {
|
|
355
|
+
op: 'cubicBezTo';
|
|
356
|
+
x1: number;
|
|
357
|
+
y1: number;
|
|
358
|
+
x2: number;
|
|
359
|
+
y2: number;
|
|
360
|
+
x3: number;
|
|
361
|
+
y3: number;
|
|
362
|
+
} | {
|
|
363
|
+
op: 'quadBezTo';
|
|
364
|
+
x1: number;
|
|
365
|
+
y1: number;
|
|
366
|
+
x2: number;
|
|
367
|
+
y2: number;
|
|
368
|
+
}
|
|
369
|
+
/** ECMA-376 §20.1.9.3. stAng/swAng in 60000ths of a degree. wr/hr in
|
|
370
|
+
* the path's own coordinate units. Pen position is the arc start. */
|
|
371
|
+
| {
|
|
372
|
+
op: 'arcTo';
|
|
373
|
+
wr: number;
|
|
374
|
+
hr: number;
|
|
375
|
+
stAng: number;
|
|
376
|
+
swAng: number;
|
|
377
|
+
} | {
|
|
378
|
+
op: 'close';
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
declare interface PathInfo {
|
|
382
|
+
w: number;
|
|
383
|
+
h: number;
|
|
384
|
+
commands: PathCmd[];
|
|
385
|
+
}
|
|
386
|
+
|
|
290
387
|
export declare interface RenderViewportOptions {
|
|
291
388
|
width?: number;
|
|
292
389
|
height?: number;
|
|
@@ -324,6 +421,48 @@ declare interface RunFont {
|
|
|
324
421
|
name?: string | null;
|
|
325
422
|
}
|
|
326
423
|
|
|
424
|
+
declare interface ShapeAnchor {
|
|
425
|
+
fromCol: number;
|
|
426
|
+
fromColOff: number;
|
|
427
|
+
fromRow: number;
|
|
428
|
+
fromRowOff: number;
|
|
429
|
+
toCol: number;
|
|
430
|
+
toColOff: number;
|
|
431
|
+
toRow: number;
|
|
432
|
+
toRowOff: number;
|
|
433
|
+
shapes: ShapeInfo[];
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
declare type ShapeGeom = {
|
|
437
|
+
type: 'preset';
|
|
438
|
+
name: string;
|
|
439
|
+
} | {
|
|
440
|
+
type: 'custom';
|
|
441
|
+
paths: PathInfo[];
|
|
442
|
+
}
|
|
443
|
+
/** Bitmap picture leaf inside a `<xdr:grpSp>`. `dataUrl` is a pre-encoded
|
|
444
|
+
* `data:<mime>;base64,…` produced by the Rust parser from the drawing's
|
|
445
|
+
* relationship target. */
|
|
446
|
+
| {
|
|
447
|
+
type: 'image';
|
|
448
|
+
dataUrl: string;
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
declare interface ShapeInfo {
|
|
452
|
+
/** Normalized [0,1] position/size relative to the anchor rect. */
|
|
453
|
+
x: number;
|
|
454
|
+
y: number;
|
|
455
|
+
w: number;
|
|
456
|
+
h: number;
|
|
457
|
+
/** Rotation in degrees, clockwise. */
|
|
458
|
+
rot: number;
|
|
459
|
+
fillColor?: string;
|
|
460
|
+
strokeColor?: string;
|
|
461
|
+
/** Stroke width in EMU. 0 = no stroke. */
|
|
462
|
+
strokeWidth: number;
|
|
463
|
+
geom: ShapeGeom;
|
|
464
|
+
}
|
|
465
|
+
|
|
327
466
|
declare interface SharedString {
|
|
328
467
|
text: string;
|
|
329
468
|
runs?: Run[];
|
|
@@ -335,6 +474,24 @@ export declare interface SheetMeta {
|
|
|
335
474
|
rId: string;
|
|
336
475
|
}
|
|
337
476
|
|
|
477
|
+
declare interface SlicerAnchor {
|
|
478
|
+
fromCol: number;
|
|
479
|
+
fromColOff: number;
|
|
480
|
+
fromRow: number;
|
|
481
|
+
fromRowOff: number;
|
|
482
|
+
toCol: number;
|
|
483
|
+
toColOff: number;
|
|
484
|
+
toRow: number;
|
|
485
|
+
toRowOff: number;
|
|
486
|
+
caption: string;
|
|
487
|
+
items: SlicerItem[];
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
declare interface SlicerItem {
|
|
491
|
+
name: string;
|
|
492
|
+
selected: boolean;
|
|
493
|
+
}
|
|
494
|
+
|
|
338
495
|
export declare interface Styles {
|
|
339
496
|
fonts: Font[];
|
|
340
497
|
fills: Fill[];
|
|
@@ -344,6 +501,27 @@ export declare interface Styles {
|
|
|
344
501
|
dxfs: Dxf[];
|
|
345
502
|
}
|
|
346
503
|
|
|
504
|
+
declare interface TableInfo {
|
|
505
|
+
range: CellRange;
|
|
506
|
+
styleName: string;
|
|
507
|
+
headerRowCount: number;
|
|
508
|
+
totalsRowCount: number;
|
|
509
|
+
showRowStripes: boolean;
|
|
510
|
+
showColumnStripes: boolean;
|
|
511
|
+
showFirstColumn: boolean;
|
|
512
|
+
showLastColumn: boolean;
|
|
513
|
+
/** Accent color resolved by the parser from the built-in style name against
|
|
514
|
+
* the file's theme accents (e.g. `TableStyleLight18` → accent3). */
|
|
515
|
+
accentColor: string;
|
|
516
|
+
/** Dxf index for the `wholeTable` element of a custom `<tableStyle>`
|
|
517
|
+
* (ECMA-376 §18.8.40). When set, its border/fill apply to every cell of
|
|
518
|
+
* the table as a base layer. Undefined for built-in style names. */
|
|
519
|
+
wholeTableDxf?: number;
|
|
520
|
+
/** Dxf index for the `headerRow` element of a custom `<tableStyle>` —
|
|
521
|
+
* provides header background, font color/weight, and vertical separators. */
|
|
522
|
+
headerRowDxf?: number;
|
|
523
|
+
}
|
|
524
|
+
|
|
347
525
|
export declare interface ViewportRange {
|
|
348
526
|
row: number;
|
|
349
527
|
col: number;
|
|
@@ -368,6 +546,10 @@ export declare interface Worksheet {
|
|
|
368
546
|
conditionalFormats: ConditionalFormat[];
|
|
369
547
|
images: ImageAnchor[];
|
|
370
548
|
charts: ChartAnchor[];
|
|
549
|
+
/** Grouped shapes from `<xdr:grpSp>` inside twoCellAnchors
|
|
550
|
+
* (ECMA-376 §20.5.2.17). Each anchor holds leaf shapes pre-flattened
|
|
551
|
+
* with normalized [0,1] geometry relative to the anchor rect. */
|
|
552
|
+
shapeGroups?: ShapeAnchor[];
|
|
371
553
|
/** Whether to display zero values (ECMA-376 §18.3.1.94). Defaults to true. */
|
|
372
554
|
showZeros?: boolean;
|
|
373
555
|
/** Whether to draw default grid lines (ECMA-376 §18.3.1.83
|
|
@@ -387,6 +569,13 @@ export declare interface Worksheet {
|
|
|
387
569
|
* conditional-formatting `expression` rules that call named ranges
|
|
388
570
|
* (e.g. `task_start`, `today`). */
|
|
389
571
|
definedNames?: DefinedName[];
|
|
572
|
+
/** Excel Tables on this sheet (ECMA-376 §18.5). The renderer overlays a
|
|
573
|
+
* built-in style (bold header, banded rows) on the given ranges. */
|
|
574
|
+
tables?: TableInfo[];
|
|
575
|
+
/** Pivot / table slicers (Office 2010+ extension). Each anchor carries a
|
|
576
|
+
* caption and the saved item list (with selection flags) so the renderer
|
|
577
|
+
* can draw a static button bank without the live pivot engine. */
|
|
578
|
+
slicers?: SlicerAnchor[];
|
|
390
579
|
}
|
|
391
580
|
|
|
392
581
|
/**
|
|
@@ -404,6 +593,11 @@ declare interface XlsxChartSeries {
|
|
|
404
593
|
/** Marker visibility resolved from `<c:marker>`/chart-level default
|
|
405
594
|
* (ECMA-376 §21.2.2.32). */
|
|
406
595
|
showMarker?: boolean;
|
|
596
|
+
/** `<c:val>/<c:numRef>/<c:formatCode>` — Excel number format for series
|
|
597
|
+
* values (ECMA-376 §21.2.2.37). */
|
|
598
|
+
valFormatCode?: string | null;
|
|
599
|
+
/** `<c:ser><c:order>` — stacking/legend display order (§21.2.2.28). */
|
|
600
|
+
order?: number;
|
|
407
601
|
}
|
|
408
602
|
|
|
409
603
|
export declare class XlsxViewer {
|