@silurus/ooxml 0.75.5 → 0.76.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 +66 -28
- package/dist/bounded-raw-part-cache-C6ro6Ezf.js +254 -0
- package/dist/{find-cursor-Dc5iM6s7.js → canvas-viewer-mechanics-CwVSOYke.js} +192 -64
- package/dist/{document-pull-client-BcNYhoAG.js → document-pull-client-DQNen8c4.js} +3620 -3597
- package/dist/docx-DYRguRRi.js +1301 -0
- package/dist/docx.mjs +4 -6
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/index.mjs +3 -3
- package/dist/{line-distribute-B8sqT8kC.js → line-distribute-C1r2zvji.js} +141 -141
- package/dist/{line-metrics-D9gqQWHl.js → line-metrics-BdCACYlq.js} +4026 -1170
- package/dist/math.mjs +1 -1
- package/dist/node.mjs +779 -465
- package/dist/pptx-B-EJp83T.js +1735 -0
- package/dist/pptx.mjs +5 -7
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/{render-CalC7GX4.js → render-CLcpSi0m.js} +11 -18
- package/dist/render-worker-host-Bkf1jUcW.js +27 -0
- package/dist/render-worker-host-CKOmXdyr.js +27 -0
- package/dist/render-worker-host-DWLyqwI3.js +27 -0
- package/dist/resource-measurement-E_S_iau4.js +119 -0
- package/dist/session-B4Y54cbT.js +730 -0
- package/dist/{renderer-B9R6F_QY.js → slide-pull-client-WCuYCjio.js} +973 -820
- package/dist/types/docx.d.ts +1181 -3994
- package/dist/types/index.d.ts +2733 -8171
- package/dist/types/math.d.ts +8 -33
- package/dist/types/node.d.ts +1852 -4433
- package/dist/types/pptx.d.ts +1030 -3678
- package/dist/types/xlsx.d.ts +1291 -3262
- package/dist/worksheet-pull-client-YzjJMOns.js +455 -0
- package/dist/xlsx-BBmmZNQn.js +6362 -0
- package/dist/xlsx.mjs +5 -7
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +14 -7
- package/dist/bounded-raw-part-cache-BTfZD_Sz.js +0 -1248
- package/dist/docx-DjF8FgoP.js +0 -1274
- package/dist/duotone-bitmap-by-path-CWsSJkJu.js +0 -28
- package/dist/hyperlink-D85FexTa.js +0 -27
- package/dist/pptx-C17xP8AV.js +0 -1705
- package/dist/pptx-Dl8tOSmP.js +0 -822
- package/dist/preload-BEouWnlI.js +0 -132
- package/dist/render-worker-host-BG3a7brz.js +0 -27
- package/dist/render-worker-host-CsB-dPJv.js +0 -27
- package/dist/render-worker-host-Cyv5Hkbh.js +0 -27
- package/dist/resource-measurement-6aReN3K0.js +0 -93
- package/dist/slide-pull-client-D_T0AIoX.js +0 -175
- package/dist/svg-image-by-path-C1M3N2pT.js +0 -1623
- package/dist/worksheet-pull-worker-DCei8u-4.js +0 -347
- package/dist/xlsx-BaH9irS0.js +0 -5515
- /package/dist/{highlight-rect-cCvVU-MW.js → highlight-rect-CAkCWJ37.js} +0 -0
- /package/dist/{mathjax-Dqo857oC.js → mathjax-CMjda8Ip.js} +0 -0
- /package/dist/{transfer-3QEJrsJa.js → transfer-DCu4c2BL.js} +0 -0
- /package/dist/{visible-index-CKvgpUrf.js → visible-index-CgyJLAS_.js} +0 -0
package/dist/types/xlsx.d.ts
CHANGED
|
@@ -1,3552 +1,1581 @@
|
|
|
1
|
-
//#region dist/.types-work/mathjax-
|
|
2
|
-
//#region packages/core/src/math/mathjax.d.ts
|
|
1
|
+
//#region dist/.types-work/mathjax-CKU2W8zq.d.ts
|
|
3
2
|
interface MathSvg {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
descentEm: number;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* The math engine contract a viewer needs to render equations. Satisfied by the
|
|
13
|
-
* `math` named export of the separate `@silurus/ooxml/math` entry point, which
|
|
14
|
-
* the consumer opts into:
|
|
15
|
-
*
|
|
16
|
-
* ```ts
|
|
17
|
-
* import { DocxViewer } from '@silurus/ooxml/docx';
|
|
18
|
-
* import { math } from '@silurus/ooxml/math';
|
|
19
|
-
* new DocxViewer(canvas, { math });
|
|
20
|
-
* ```
|
|
21
|
-
*
|
|
22
|
-
* Omit it and the equation engine (MathJax + STIX Two Math, ~3 MB) is never
|
|
23
|
-
* imported, so a bundler drops it entirely.
|
|
24
|
-
*/
|
|
3
|
+
svg: string;
|
|
4
|
+
widthEm: number;
|
|
5
|
+
ascentEm: number;
|
|
6
|
+
descentEm: number;
|
|
7
|
+
}
|
|
25
8
|
interface MathRenderer {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/** MathML string → standalone SVG + baseline-relative em extents. */
|
|
29
|
-
mathMLToSvg(mathml: string): Promise<MathSvg>;
|
|
9
|
+
loadMathJax(): Promise<void>;
|
|
10
|
+
mathMLToSvg(mathml: string): Promise<MathSvg>;
|
|
30
11
|
}
|
|
31
12
|
//#endregion
|
|
32
|
-
//#region dist/.types-work/hyperlink-
|
|
33
|
-
//#region packages/core/src/types/math.d.ts
|
|
13
|
+
//#region dist/.types-work/hyperlink-BnJnsq2_.d.ts
|
|
34
14
|
type MathStyle = 'roman' | 'italic' | 'bold' | 'boldItalic';
|
|
35
15
|
interface MathRun {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
16
|
+
kind: 'run';
|
|
17
|
+
text: string;
|
|
18
|
+
style: MathStyle;
|
|
39
19
|
}
|
|
40
20
|
interface MathFraction {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
bar?: boolean;
|
|
21
|
+
kind: 'fraction';
|
|
22
|
+
num: MathNode[];
|
|
23
|
+
den: MathNode[];
|
|
24
|
+
bar?: boolean;
|
|
46
25
|
}
|
|
47
26
|
interface MathScript {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
27
|
+
kind: 'sup' | 'sub' | 'subSup';
|
|
28
|
+
base: MathNode[];
|
|
29
|
+
sup?: MathNode[];
|
|
30
|
+
sub?: MathNode[];
|
|
52
31
|
}
|
|
53
32
|
interface MathNary {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
sub?: MathNode[];
|
|
61
|
-
sup?: MathNode[];
|
|
62
|
-
body: MathNode[];
|
|
33
|
+
kind: 'nary';
|
|
34
|
+
op: string;
|
|
35
|
+
limLoc?: string;
|
|
36
|
+
sub?: MathNode[];
|
|
37
|
+
sup?: MathNode[];
|
|
38
|
+
body: MathNode[];
|
|
63
39
|
}
|
|
64
40
|
interface MathDelimiter {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
endChar: string;
|
|
70
|
-
/** separated groups (e.g. for cases / multiple args). */
|
|
71
|
-
items: MathNode[][];
|
|
41
|
+
kind: 'delimiter';
|
|
42
|
+
begChar: string;
|
|
43
|
+
endChar: string;
|
|
44
|
+
items: MathNode[][];
|
|
72
45
|
}
|
|
73
46
|
interface MathRadical {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
radicand: MathNode[];
|
|
47
|
+
kind: 'radical';
|
|
48
|
+
index?: MathNode[];
|
|
49
|
+
radicand: MathNode[];
|
|
78
50
|
}
|
|
79
|
-
/** Lower/upper limit (`m:limLow` / `m:limUpp`), e.g. lim under n→∞. */
|
|
80
51
|
interface MathLimit {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
52
|
+
kind: 'limit';
|
|
53
|
+
base: MathNode[];
|
|
54
|
+
lower?: MathNode[];
|
|
55
|
+
upper?: MathNode[];
|
|
85
56
|
}
|
|
86
|
-
/** Matrix (`m:m`) or aligned equation array (`m:eqArr`). rows → cells → nodes. */
|
|
87
57
|
interface MathArray {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
align: 'eq' | 'center' | 'left';
|
|
58
|
+
kind: 'array';
|
|
59
|
+
rows: MathNode[][][];
|
|
60
|
+
align: 'eq' | 'center' | 'left';
|
|
92
61
|
}
|
|
93
|
-
/** Group character (`m:groupChr`), e.g. under/over brace. */
|
|
94
62
|
interface MathGroupChr {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
63
|
+
kind: 'groupChr';
|
|
64
|
+
char: string;
|
|
65
|
+
pos: 'top' | 'bot';
|
|
66
|
+
base: MathNode[];
|
|
99
67
|
}
|
|
100
|
-
/** Over/under bar (`m:bar`). */
|
|
101
68
|
interface MathBar {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
69
|
+
kind: 'bar';
|
|
70
|
+
pos: 'top' | 'bot';
|
|
71
|
+
base: MathNode[];
|
|
105
72
|
}
|
|
106
|
-
/** Accent (`m:acc`), e.g. hat, bar, vector arrow over the base. */
|
|
107
73
|
interface MathAccent {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
74
|
+
kind: 'accent';
|
|
75
|
+
char: string;
|
|
76
|
+
base: MathNode[];
|
|
111
77
|
}
|
|
112
78
|
interface MathFunc {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
79
|
+
kind: 'func';
|
|
80
|
+
name: MathNode[];
|
|
81
|
+
arg: MathNode[];
|
|
116
82
|
}
|
|
117
83
|
interface MathGroup {
|
|
118
|
-
|
|
119
|
-
|
|
84
|
+
kind: 'group';
|
|
85
|
+
items: MathNode[];
|
|
120
86
|
}
|
|
121
|
-
/** Phantom object (`m:phant`, §22.1.2.81): contributes the spacing of `base`
|
|
122
|
-
* while optionally hiding it and/or zeroing individual dimensions. */
|
|
123
87
|
interface MathPhant {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
zeroWid?: boolean;
|
|
132
|
-
zeroAsc?: boolean;
|
|
133
|
-
zeroDesc?: boolean;
|
|
134
|
-
base: MathNode[];
|
|
135
|
-
}
|
|
136
|
-
/** Pre-sub-superscript object (`m:sPre`, §22.1.2.99): sub + sup to the LEFT of
|
|
137
|
-
* the base (e.g. ²₁A). */
|
|
88
|
+
kind: 'phant';
|
|
89
|
+
show: boolean;
|
|
90
|
+
zeroWid?: boolean;
|
|
91
|
+
zeroAsc?: boolean;
|
|
92
|
+
zeroDesc?: boolean;
|
|
93
|
+
base: MathNode[];
|
|
94
|
+
}
|
|
138
95
|
interface MathSPre {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
96
|
+
kind: 'sPre';
|
|
97
|
+
sub: MathNode[];
|
|
98
|
+
sup: MathNode[];
|
|
99
|
+
base: MathNode[];
|
|
143
100
|
}
|
|
144
|
-
/** Box object (`m:box`, §22.1.2.13): a logical grouping (operator emulator /
|
|
145
|
-
* line-break control). Draws NO border — a transparent group around `base`. */
|
|
146
101
|
interface MathBox {
|
|
147
|
-
|
|
148
|
-
|
|
102
|
+
kind: 'box';
|
|
103
|
+
base: MathNode[];
|
|
149
104
|
}
|
|
150
|
-
/** Border-box object (`m:borderBox`, §22.1.2.11): a border/strikes around the
|
|
151
|
-
* base. Absent flags ⇒ a full rectangular box. */
|
|
152
105
|
interface MathBorderBox {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
strikeBltr?: boolean;
|
|
164
|
-
strikeTlbr?: boolean;
|
|
165
|
-
base: MathNode[];
|
|
106
|
+
kind: 'borderBox';
|
|
107
|
+
hideTop?: boolean;
|
|
108
|
+
hideBot?: boolean;
|
|
109
|
+
hideLeft?: boolean;
|
|
110
|
+
hideRight?: boolean;
|
|
111
|
+
strikeH?: boolean;
|
|
112
|
+
strikeV?: boolean;
|
|
113
|
+
strikeBltr?: boolean;
|
|
114
|
+
strikeTlbr?: boolean;
|
|
115
|
+
base: MathNode[];
|
|
166
116
|
}
|
|
167
117
|
type MathNode = MathRun | MathFraction | MathScript | MathNary | MathDelimiter | MathRadical | MathLimit | MathArray | MathGroupChr | MathBar | MathAccent | MathFunc | MathGroup | MathPhant | MathSPre | MathBox | MathBorderBox;
|
|
168
118
|
type SpaceLine = {
|
|
169
|
-
|
|
170
|
-
|
|
119
|
+
type: 'pct';
|
|
120
|
+
val: number;
|
|
171
121
|
} | {
|
|
172
|
-
|
|
173
|
-
|
|
122
|
+
type: 'pts';
|
|
123
|
+
val: number;
|
|
174
124
|
};
|
|
175
|
-
//#endregion
|
|
176
|
-
//#region packages/core/src/types/chart.d.ts
|
|
177
125
|
interface ChartSeries {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
labelColor?: string | null;
|
|
203
|
-
/**
|
|
204
|
-
* Mixed chart: per-series chart type override. Currently only "line" (XLSX
|
|
205
|
-
* and PPTX combo charts) is honoured; other values are treated as the
|
|
206
|
-
* chart's primary type.
|
|
207
|
-
*/
|
|
208
|
-
seriesType?: string | null;
|
|
209
|
-
/**
|
|
210
|
-
* Combo chart: this series is plotted against the SECONDARY value axis
|
|
211
|
-
* (`ChartModel.secondaryValAxis`) — the `<c:valAx>` with `axPos="r"` /
|
|
212
|
-
* `<c:crosses val="max">`. When false/absent the series uses the primary
|
|
213
|
-
* (left) value-axis scale. PowerPoint's "Revenue vs. gross margin" combo
|
|
214
|
-
* (sample-14 slide-8) puts the margin line on a 0–100% secondary axis.
|
|
215
|
-
*/
|
|
216
|
-
useSecondaryAxis?: boolean | null;
|
|
217
|
-
/**
|
|
218
|
-
* Scatter-only X values (as strings). When null the series uses
|
|
219
|
-
* `ChartModel.categories` as X.
|
|
220
|
-
*/
|
|
221
|
-
categories?: string[] | null;
|
|
222
|
-
/**
|
|
223
|
-
* Resolved marker visibility for line/scatter series. ECMA-376 §21.2.2.32
|
|
224
|
-
* `<c:marker><c:symbol>` defaults to "none" for line charts unless the
|
|
225
|
-
* chart-level `<c:marker val="1"/>` or a per-series symbol opts in. When
|
|
226
|
-
* undefined/null the renderer uses its own default (visible) so callers
|
|
227
|
-
* that don't parse markers (e.g. pptx today) keep their existing behavior.
|
|
228
|
-
*/
|
|
229
|
-
showMarker?: boolean | null;
|
|
230
|
-
/**
|
|
231
|
-
* Excel number-format code for this series' values (ECMA-376 §21.2.2.37,
|
|
232
|
-
* `<c:val>/<c:numRef>/<c:formatCode>`). Used to format data labels when the
|
|
233
|
-
* chart-level `<c:dLbls><c:numFmt>` is not set. null = no series-level code.
|
|
234
|
-
*/
|
|
235
|
-
valFormatCode?: string | null;
|
|
236
|
-
/**
|
|
237
|
-
* `<c:marker><c:symbol val>` (ECMA-376 §21.2.2.32) — point marker shape.
|
|
238
|
-
* One of "circle"|"square"|"diamond"|"triangle"|"x"|"plus"|"star"|
|
|
239
|
-
* "dot"|"dash"|"picture"|"none". null = renderer default (circle when
|
|
240
|
-
* showMarker is true).
|
|
241
|
-
*/
|
|
242
|
-
markerSymbol?: string | null;
|
|
243
|
-
/**
|
|
244
|
-
* `<c:marker><c:size val>` (ECMA-376 §21.2.2.34) — marker side length in
|
|
245
|
-
* points. null = renderer default (~5 pt).
|
|
246
|
-
*/
|
|
247
|
-
markerSize?: number | null;
|
|
248
|
-
/** `<c:marker><c:spPr><a:solidFill>` resolved hex (no `#`). */
|
|
249
|
-
markerFill?: string | null;
|
|
250
|
-
/** `<c:marker><c:spPr><a:ln><a:solidFill>` resolved hex (no `#`). */
|
|
251
|
-
markerLine?: string | null;
|
|
252
|
-
/**
|
|
253
|
-
* Per-data-point overrides (ECMA-376 §21.2.2.39 `<c:dPt>`). Keyed by point
|
|
254
|
-
* index. Any unset field falls back to the series-level value.
|
|
255
|
-
*/
|
|
256
|
-
dataPointOverrides?: ChartDataPointOverride[] | null;
|
|
257
|
-
/**
|
|
258
|
-
* Per-data-point custom labels (ECMA-376 §21.2.2.45 `<c:dLbl idx>`).
|
|
259
|
-
* `text` is the resolved plain string — `<a:fld type="CELLRANGE">`
|
|
260
|
-
* placeholders are already substituted at parse time. An empty string
|
|
261
|
-
* means the point's label was deleted with `<c:delete val="1"/>` and
|
|
262
|
-
* the renderer should skip it.
|
|
263
|
-
*/
|
|
264
|
-
dataLabelOverrides?: ChartDataLabelOverride[] | null;
|
|
265
|
-
/**
|
|
266
|
-
* Series-level `<c:dLbls>` block (showVal / showSerName / position).
|
|
267
|
-
* Applied to every point lacking its own `<c:dLbl>` override.
|
|
268
|
-
*/
|
|
269
|
-
seriesDataLabels?: ChartSeriesDataLabels | null;
|
|
270
|
-
/**
|
|
271
|
-
* `<c:errBars>` per-series error bars (ECMA-376 §21.2.2.20). Up to two
|
|
272
|
-
* (one per direction). Plus / minus deltas are absolute per-point values
|
|
273
|
-
* regardless of `errValType`.
|
|
274
|
-
*/
|
|
275
|
-
errBars?: ChartErrBars[] | null;
|
|
276
|
-
/**
|
|
277
|
-
* `<c:bubbleSize>` per-point sizes for bubble charts (ECMA-376 §21.2.2.4).
|
|
278
|
-
* Drives marker radius — renderer treats the values as areas (radius
|
|
279
|
-
* scales by sqrt) so visual area is proportional to value, matching
|
|
280
|
-
* Excel. null / empty array = uniform marker size. Ignored for non-bubble
|
|
281
|
-
* series.
|
|
282
|
-
*/
|
|
283
|
-
bubbleSizes?: (number | null)[] | null;
|
|
284
|
-
/**
|
|
285
|
-
* `<c:ser><c:smooth val>` (ECMA-376 §21.2.2.194) — line/area series flag
|
|
286
|
-
* requesting a smoothed (spline) curve through the points instead of straight
|
|
287
|
-
* segments. Only consulted for the line and area families (scatter carries its
|
|
288
|
-
* smoothing in `ChartModel.scatterStyle`). null/undefined/false = straight
|
|
289
|
-
* polyline (the default; byte-stable for series that never set it).
|
|
290
|
-
*/
|
|
291
|
-
smooth?: boolean | null;
|
|
292
|
-
/**
|
|
293
|
-
* `<c:ser><c:trendline>` per-series trendlines (ECMA-376 §21.2.2.211,
|
|
294
|
-
* `CT_Trendline`). A series can carry several (e.g. a linear fit + a moving
|
|
295
|
-
* average). null/undefined/empty = no trendline (the default; byte-stable for
|
|
296
|
-
* series that never declare one).
|
|
297
|
-
*/
|
|
298
|
-
trendLines?: ChartTrendline[] | null;
|
|
299
|
-
/**
|
|
300
|
-
* `<c:ser><c:spPr><a:ln><a:noFill/>` (ECMA-376 §21.2.2.198 CT_ShapeProperties
|
|
301
|
-
* → DrawingML §20.1.2.2.24 CT_LineProperties). true when the series connecting
|
|
302
|
-
* line is explicitly turned OFF. For a scatter/line series this OVERRIDES the
|
|
303
|
-
* chart-group `<c:scatterStyle>` (§21.2.2.42) / line default — Excel and
|
|
304
|
-
* PowerPoint draw markers only (no connecting line) even when the group style
|
|
305
|
-
* is `lineMarker`. null/undefined = no explicit line-off, so the group default
|
|
306
|
-
* governs (byte-stable for series that carry a paintable line).
|
|
307
|
-
*/
|
|
308
|
-
lineHidden?: boolean | null;
|
|
309
|
-
}
|
|
310
|
-
/**
|
|
311
|
-
* `<c:ser><c:trendline>` (ECMA-376 §21.2.2.211). A regression/smoothing curve
|
|
312
|
-
* fitted to the series' data points.
|
|
313
|
-
*/
|
|
126
|
+
name: string;
|
|
127
|
+
color: string | null;
|
|
128
|
+
values: (number | null)[];
|
|
129
|
+
dataPointColors?: (string | null)[] | null;
|
|
130
|
+
dataLabelColors?: (string | null)[] | null;
|
|
131
|
+
labelColor?: string | null;
|
|
132
|
+
seriesType?: string | null;
|
|
133
|
+
useSecondaryAxis?: boolean | null;
|
|
134
|
+
categories?: string[] | null;
|
|
135
|
+
showMarker?: boolean | null;
|
|
136
|
+
valFormatCode?: string | null;
|
|
137
|
+
markerSymbol?: string | null;
|
|
138
|
+
markerSize?: number | null;
|
|
139
|
+
markerFill?: string | null;
|
|
140
|
+
markerLine?: string | null;
|
|
141
|
+
dataPointOverrides?: ChartDataPointOverride[] | null;
|
|
142
|
+
dataLabelOverrides?: ChartDataLabelOverride[] | null;
|
|
143
|
+
seriesDataLabels?: ChartSeriesDataLabels | null;
|
|
144
|
+
errBars?: ChartErrBars[] | null;
|
|
145
|
+
bubbleSizes?: (number | null)[] | null;
|
|
146
|
+
smooth?: boolean | null;
|
|
147
|
+
trendLines?: ChartTrendline[] | null;
|
|
148
|
+
lineHidden?: boolean | null;
|
|
149
|
+
}
|
|
314
150
|
interface ChartTrendline {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
period?: number | null;
|
|
326
|
-
/** `<c:forward val>` — units to extend the line past the last point. */
|
|
327
|
-
forward?: number | null;
|
|
328
|
-
/** `<c:backward val>` — units to extend the line before the first point. */
|
|
329
|
-
backward?: number | null;
|
|
330
|
-
/** `<c:intercept val>` — forced y-intercept (linear/exp). null = free fit. */
|
|
331
|
-
intercept?: number | null;
|
|
332
|
-
/** `<c:dispRSqr val="1">` — show the R² value (label; not yet rendered). */
|
|
333
|
-
dispRSqr?: boolean | null;
|
|
334
|
-
/** `<c:dispEq val="1">` — show the fit equation (label; not yet rendered). */
|
|
335
|
-
dispEq?: boolean | null;
|
|
336
|
-
/** `<c:spPr><a:ln><a:solidFill>` trendline color (hex without '#'). null =
|
|
337
|
-
* inherit the series color. */
|
|
338
|
-
lineColor?: string | null;
|
|
339
|
-
/** `<c:spPr><a:ln w>` trendline width in EMU. */
|
|
340
|
-
lineWidthEmu?: number | null;
|
|
151
|
+
trendlineType: string;
|
|
152
|
+
order?: number | null;
|
|
153
|
+
period?: number | null;
|
|
154
|
+
forward?: number | null;
|
|
155
|
+
backward?: number | null;
|
|
156
|
+
intercept?: number | null;
|
|
157
|
+
dispRSqr?: boolean | null;
|
|
158
|
+
dispEq?: boolean | null;
|
|
159
|
+
lineColor?: string | null;
|
|
160
|
+
lineWidthEmu?: number | null;
|
|
341
161
|
}
|
|
342
162
|
interface ChartDataPointOverride {
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
/**
|
|
351
|
-
* `<c:dPt><c:explosion val>` (ECMA-376 §21.2.2.61) — the amount this
|
|
352
|
-
* pie/doughnut slice is moved out from the center. The schema type is
|
|
353
|
-
* `CT_UnsignedInt` (unbounded `xsd:unsignedInt`); the spec text only says
|
|
354
|
-
* "the amount the data point shall be moved from the center of the pie"
|
|
355
|
-
* and does not itself define units or a 0–100 range. We treat it as a
|
|
356
|
-
* de-facto percentage of the outer radius (0–100 typical), matching
|
|
357
|
-
* Office's UI (the Point Explosion slider caps at 100%) rather than a
|
|
358
|
-
* spec-mandated bound. undefined/absent = 0 (no explosion, flush with the
|
|
359
|
-
* ring). Only consulted by the pie/doughnut renderer.
|
|
360
|
-
*/
|
|
361
|
-
explosion?: number;
|
|
163
|
+
idx: number;
|
|
164
|
+
color?: string;
|
|
165
|
+
markerSymbol?: string;
|
|
166
|
+
markerSize?: number;
|
|
167
|
+
markerFill?: string;
|
|
168
|
+
markerLine?: string;
|
|
169
|
+
explosion?: number;
|
|
362
170
|
}
|
|
363
171
|
interface ChartDataLabelOverride {
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
* Per-point label-content flags (`<c:dLbl>` §21.2.2.47 carries the same
|
|
378
|
-
* show-flag group as the series `<c:dLbls>` §21.2.2.49: §21.2.2.189
|
|
379
|
-
* `<c:showVal>`, §21.2.2.177 `<c:showCatName>`, §21.2.2.180 `<c:showSerName>`,
|
|
380
|
-
* §21.2.2.187 `<c:showPercent>`). When present they OVERRIDE the series-level
|
|
381
|
-
* defaults for that one point (e.g. sample-14 slide-7's pie sets
|
|
382
|
-
* `showCatName=0 showPercent=1` per slice while the series default is
|
|
383
|
-
* `showCatName=1`, so each label is percent only). undefined = inherit the
|
|
384
|
-
* series default for that flag.
|
|
385
|
-
*/
|
|
386
|
-
showVal?: boolean;
|
|
387
|
-
showCatName?: boolean;
|
|
388
|
-
showSerName?: boolean;
|
|
389
|
-
showPercent?: boolean;
|
|
390
|
-
/**
|
|
391
|
-
* `<c:dLbl><c:delete val="1"/>` (ECMA-376 §21.2.2.43) — the point's label is
|
|
392
|
-
* removed. Distinguishes a genuine delete from a `<c:dLbl>` that only carries
|
|
393
|
-
* style / flag overrides with no `<c:tx>` (both otherwise present as
|
|
394
|
-
* `text === ''`). true = skip the label; undefined/absent = not deleted.
|
|
395
|
-
*/
|
|
396
|
-
deleted?: boolean;
|
|
397
|
-
}
|
|
398
|
-
/** Callout-box style for a pie/doughnut data label — the white (or themed)
|
|
399
|
-
* rounded rectangle with a thin border Word draws around a `bestFit` label
|
|
400
|
-
* placed outside its slice. From the label's `<c:spPr>` (§21.2.2.197). All
|
|
401
|
-
* fields optional: absent → transparent / unbordered. Mirror of Rust
|
|
402
|
-
* `ChartLabelBox`. */
|
|
172
|
+
idx: number;
|
|
173
|
+
text: string;
|
|
174
|
+
position?: string;
|
|
175
|
+
fontColor?: string;
|
|
176
|
+
fontSizeHpt?: number;
|
|
177
|
+
fontBold?: boolean;
|
|
178
|
+
labelBox?: ChartLabelBox;
|
|
179
|
+
showVal?: boolean;
|
|
180
|
+
showCatName?: boolean;
|
|
181
|
+
showSerName?: boolean;
|
|
182
|
+
showPercent?: boolean;
|
|
183
|
+
deleted?: boolean;
|
|
184
|
+
}
|
|
403
185
|
interface ChartLabelBox {
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
borderColor?: string;
|
|
408
|
-
/** `<a:ln w>` border width in EMU (12700 EMU = 1 pt). */
|
|
409
|
-
borderWidthEmu?: number;
|
|
186
|
+
fill?: string;
|
|
187
|
+
borderColor?: string;
|
|
188
|
+
borderWidthEmu?: number;
|
|
410
189
|
}
|
|
411
190
|
interface ChartSeriesDataLabels {
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
* callout layout (box + optional leader line) instead of plain text. */
|
|
426
|
-
labelBox?: ChartLabelBox;
|
|
427
|
-
/** `<c:dLbls><c:showLeaderLines val>` (§21.2.2.183) — draw leader lines from
|
|
428
|
-
* a pulled-away label back to its slice. Default false. */
|
|
429
|
-
showLeaderLines?: boolean;
|
|
430
|
-
/** `<c:leaderLines><c:spPr><a:ln><a:solidFill>` (§21.2.2.92) resolved hex
|
|
431
|
-
* (no `#`). undefined → renderer uses a neutral grey. */
|
|
432
|
-
leaderLineColor?: string;
|
|
433
|
-
/** `<c:leaderLines><c:spPr><a:ln w>` leader-line width in EMU. */
|
|
434
|
-
leaderLineWidthEmu?: number;
|
|
191
|
+
showVal: boolean;
|
|
192
|
+
showCatName: boolean;
|
|
193
|
+
showSerName: boolean;
|
|
194
|
+
showPercent: boolean;
|
|
195
|
+
position?: string;
|
|
196
|
+
fontColor?: string;
|
|
197
|
+
formatCode?: string;
|
|
198
|
+
fontBold?: boolean;
|
|
199
|
+
fontSizeHpt?: number;
|
|
200
|
+
labelBox?: ChartLabelBox;
|
|
201
|
+
showLeaderLines?: boolean;
|
|
202
|
+
leaderLineColor?: string;
|
|
203
|
+
leaderLineWidthEmu?: number;
|
|
435
204
|
}
|
|
436
205
|
interface ChartErrBars {
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
lineWidthEmu?: number;
|
|
447
|
-
/** "solid"|"dash"|"dot"|"dashDot"|... */
|
|
448
|
-
dash?: string;
|
|
449
|
-
}
|
|
450
|
-
/**
|
|
451
|
-
* Canonical chart type vocabulary. Embeds direction (`H` = horizontal) and
|
|
452
|
-
* grouping (`Pct` = percent-stacked) so renderers do not need to inspect
|
|
453
|
-
* separate `barDir`/`grouping` fields.
|
|
454
|
-
*/
|
|
206
|
+
dir: string;
|
|
207
|
+
barType: string;
|
|
208
|
+
plus: (number | null)[];
|
|
209
|
+
minus: (number | null)[];
|
|
210
|
+
noEndCap: boolean;
|
|
211
|
+
color?: string;
|
|
212
|
+
lineWidthEmu?: number;
|
|
213
|
+
dash?: string;
|
|
214
|
+
}
|
|
455
215
|
type ChartType = 'line' | 'stackedLine' | 'stackedLinePct' | 'clusteredBar' | 'clusteredBarH' | 'stackedBar' | 'stackedBarH' | 'stackedBarPct' | 'stackedBarHPct' | 'area' | 'stackedArea' | 'stackedAreaPct' | 'pie' | 'doughnut' | 'scatter' | 'bubble' | 'radar' | 'waterfall' | 'stock' | 'boxWhisker' | 'sunburst' | string;
|
|
456
216
|
interface ChartModel {
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
/** `<c:title>...defRPr@b>` chart title bold flag. */
|
|
561
|
-
titleFontBold?: boolean | null;
|
|
562
|
-
/** `<c:catAx><c:txPr>...defRPr@b>` X-axis tick label bold flag. */
|
|
563
|
-
catAxisFontBold?: boolean | null;
|
|
564
|
-
/** `<c:valAx><c:txPr>...defRPr@b>` Y-axis tick label bold flag. */
|
|
565
|
-
valAxisFontBold?: boolean | null;
|
|
566
|
-
/** `<c:catAx><c:title>` run-prop font size (hpt). Distinct from
|
|
567
|
-
* `catAxisFontSizeHpt` (tick labels). null = renderer default. */
|
|
568
|
-
catAxisTitleFontSizeHpt?: number | null;
|
|
569
|
-
/** `<c:catAx><c:title>` run-prop bold flag. null = not bold. */
|
|
570
|
-
catAxisTitleFontBold?: boolean | null;
|
|
571
|
-
/** `<c:catAx><c:title>` run-prop color (hex without '#'). null = default. */
|
|
572
|
-
catAxisTitleFontColor?: string | null;
|
|
573
|
-
/** `<c:valAx><c:title>` run-prop font size (hpt). null = renderer default. */
|
|
574
|
-
valAxisTitleFontSizeHpt?: number | null;
|
|
575
|
-
/** `<c:valAx><c:title>` run-prop bold flag. null = not bold. */
|
|
576
|
-
valAxisTitleFontBold?: boolean | null;
|
|
577
|
-
/** `<c:valAx><c:title>` run-prop color (hex without '#'). null = default. */
|
|
578
|
-
valAxisTitleFontColor?: string | null;
|
|
579
|
-
/** `<c:catAx><c:txPr>…<a:latin typeface>` tick-label font. */
|
|
580
|
-
catAxisFontFace?: string | null;
|
|
581
|
-
/** `<c:valAx><c:txPr>…<a:latin typeface>` tick-label font. */
|
|
582
|
-
valAxisFontFace?: string | null;
|
|
583
|
-
/** `<c:catAx><c:title>…<a:latin typeface>` axis-title font. */
|
|
584
|
-
catAxisTitleFontFace?: string | null;
|
|
585
|
-
/** `<c:valAx><c:title>…<a:latin typeface>` axis-title font. */
|
|
586
|
-
valAxisTitleFontFace?: string | null;
|
|
587
|
-
/** `<c:dLbls><c:txPr>…<a:latin typeface>` data-label font. */
|
|
588
|
-
dataLabelFontFace?: string | null;
|
|
589
|
-
/** `<c:legend><c:txPr>…<a:latin typeface>` legend font. */
|
|
590
|
-
legendFontFace?: string | null;
|
|
591
|
-
/** `<c:legend><c:txPr>…<a:solidFill>` legend text color (hex without '#'). */
|
|
592
|
-
legendFontColor?: string | null;
|
|
593
|
-
/** `<c:legend><c:txPr>` legend font size (OOXML hundredths of a point). */
|
|
594
|
-
legendFontSizeHpt?: number | null;
|
|
595
|
-
/** `<c:legend><c:txPr>…defRPr@b` legend bold flag. */
|
|
596
|
-
legendFontBold?: boolean | null;
|
|
597
|
-
/**
|
|
598
|
-
* Theme font-scheme faces (`<a:fontScheme>`, ECMA-376 §20.1.4.2). Latin
|
|
599
|
-
* heading (majorFont) and body (minorFont) typefaces, used as the fallback
|
|
600
|
-
* for any chart text element whose own `<c:txPr>` supplies no `<a:latin>`.
|
|
601
|
-
* null when the theme is not threaded to the chart (then the renderer's
|
|
602
|
-
* built-in sans-serif remains, byte-stable). Axis titles / chart title use
|
|
603
|
-
* the major (heading) face; tick labels / data labels / legend use the
|
|
604
|
-
* minor (body) face — matching Office's default chart text styling.
|
|
605
|
-
*/
|
|
606
|
-
themeMajorFontLatin?: string | null;
|
|
607
|
-
themeMinorFontLatin?: string | null;
|
|
608
|
-
/** Explicit chart border color (hex without '#') from
|
|
609
|
-
* `<c:chartSpace><c:spPr><a:ln><a:solidFill><a:srgbClr>`. Only set when the
|
|
610
|
-
* XML explicitly declares a paintable line; null otherwise (no default
|
|
611
|
-
* border is drawn). */
|
|
612
|
-
chartBorderColor?: string | null;
|
|
613
|
-
/** `<c:chartSpace><c:spPr><a:ln@w>` border width in EMU. null = 1px hairline
|
|
614
|
-
* when a color is present. */
|
|
615
|
-
chartBorderWidthEmu?: number | null;
|
|
616
|
-
/**
|
|
617
|
-
* `<c:catAx><c:crosses val>` (`autoZero` | `min` | `max`). Drives the Y
|
|
618
|
-
* coordinate where the X axis is drawn. Default `autoZero` puts the X
|
|
619
|
-
* axis at y=0 — that's how Excel "Project Timeline" templates split
|
|
620
|
-
* milestones (positive Y) above and tasks (negative Y) below the axis.
|
|
621
|
-
*/
|
|
622
|
-
catAxisCrosses?: string | null;
|
|
623
|
-
/** `<c:catAx><c:crossesAt val>` — explicit numeric override for the
|
|
624
|
-
* crossing point. Takes precedence over `catAxisCrosses`. */
|
|
625
|
-
catAxisCrossesAt?: number | null;
|
|
626
|
-
valAxisCrosses?: string | null;
|
|
627
|
-
valAxisCrossesAt?: number | null;
|
|
628
|
-
/** Axis line color (hex without `#`) and width in EMU from
|
|
629
|
-
* `<c:catAx|valAx><c:spPr><a:ln>`. */
|
|
630
|
-
catAxisLineColor?: string | null;
|
|
631
|
-
catAxisLineWidthEmu?: number | null;
|
|
632
|
-
valAxisLineColor?: string | null;
|
|
633
|
-
valAxisLineWidthEmu?: number | null;
|
|
634
|
-
/**
|
|
635
|
-
* `<c:catAx><c:numFmt@formatCode>` (or scatter X-axis valAx). When set,
|
|
636
|
-
* the renderer formats X-axis tick labels with this code (e.g. dates).
|
|
637
|
-
*/
|
|
638
|
-
catAxisFormatCode?: string | null;
|
|
639
|
-
/**
|
|
640
|
-
* `<c:catAx><c:scaling><c:min/max>` — explicit X-axis range. Used by
|
|
641
|
-
* scatter / bubble charts whose X axis is numeric. null = derive from
|
|
642
|
-
* data extents.
|
|
643
|
-
*/
|
|
644
|
-
catAxisMin?: number | null;
|
|
645
|
-
catAxisMax?: number | null;
|
|
646
|
-
/**
|
|
647
|
-
* `<c:title><c:layout><c:manualLayout>` (ECMA-376 §21.2.2.27) absolute
|
|
648
|
-
* placement for the chart title.
|
|
649
|
-
*/
|
|
650
|
-
titleManualLayout?: ChartManualLayout | null;
|
|
651
|
-
/**
|
|
652
|
-
* `<c:plotArea><c:layout><c:manualLayout>` absolute placement for the
|
|
653
|
-
* plot area. `layoutTarget="inner"` (default) describes the inner plot
|
|
654
|
-
* rect (no axes / labels); `outer` describes the outer rect (axes
|
|
655
|
-
* included).
|
|
656
|
-
*/
|
|
657
|
-
plotAreaManualLayout?: ChartManualLayout | null;
|
|
658
|
-
/**
|
|
659
|
-
* `<c:scatterChart><c:scatterStyle val>` (ECMA-376 §21.2.2.42). Drives
|
|
660
|
-
* whether scatter charts connect points with lines and whether those
|
|
661
|
-
* lines are smoothed. Values: "marker" (markers only — Excel default
|
|
662
|
-
* "Scatter"), "line" / "lineMarker" (straight segments), "smooth" /
|
|
663
|
-
* "smoothMarker" (cubic Bézier through points), "lineNoMarker",
|
|
664
|
-
* "smoothNoMarker". null = renderer default ("marker"). Only consulted
|
|
665
|
-
* for `chartType === "scatter"`; bubble ignores it.
|
|
666
|
-
*/
|
|
667
|
-
scatterStyle?: string | null;
|
|
668
|
-
/**
|
|
669
|
-
* `<c:radarChart><c:radarStyle val>` (ECMA-376 §21.2.3.10). Controls
|
|
670
|
-
* whether radar series render as line + markers ("standard" / "marker")
|
|
671
|
-
* or as a closed polygon with area fill ("filled"). null = default
|
|
672
|
-
* ("standard" — line, no fill). Only consulted for `chartType === "radar"`.
|
|
673
|
-
*/
|
|
674
|
-
radarStyle?: string | null;
|
|
675
|
-
/**
|
|
676
|
-
* Secondary value axis for combo charts (bar + line). When present, series
|
|
677
|
-
* with `useSecondaryAxis` are plotted against this axis's independent scale
|
|
678
|
-
* and the axis is drawn on the right edge of the plot. null/absent = single
|
|
679
|
-
* value axis (the common case). See {@link SecondaryValueAxis}.
|
|
680
|
-
*/
|
|
681
|
-
secondaryValAxis?: SecondaryValueAxis | null;
|
|
682
|
-
/**
|
|
683
|
-
* `<c:date1904>` (ECMA-376 §21.2.2.38). When true the chart's serial
|
|
684
|
-
* date-times resolve against the 1904 date system (base 1904-01-01) instead
|
|
685
|
-
* of the default 1900 system. Threaded to the date formatters for date-axis
|
|
686
|
-
* category labels and value-axis tick labels. Omitted/false ⇒ 1900 system.
|
|
687
|
-
* Note: per §21.2.2.38 the element's `val` defaults to true when present but
|
|
688
|
-
* the attribute is omitted, so `<c:date1904/>` alone means date1904=true.
|
|
689
|
-
*/
|
|
690
|
-
date1904?: boolean;
|
|
691
|
-
/**
|
|
692
|
-
* `<c:doughnutChart><c:holeSize val>` (ECMA-376 §21.2.2.60,
|
|
693
|
-
* `ST_HoleSizePercent` §21.2.3.55) — the doughnut hole diameter as a
|
|
694
|
-
* percentage 1–90 of the outer diameter. Ignored for pie (which has no
|
|
695
|
-
* hole). null/undefined = use the renderer's doughnut default when the
|
|
696
|
-
* element is absent. Note the ECMA `CT_HoleSize` schema default is 10%, but
|
|
697
|
-
* a real doughnut file always writes an explicit `<c:holeSize>` (Excel /
|
|
698
|
-
* PowerPoint emit 50–75%); the renderer falls back to 50% only for the
|
|
699
|
-
* pathological absent case.
|
|
700
|
-
*/
|
|
701
|
-
holeSize?: number | null;
|
|
702
|
-
/**
|
|
703
|
-
* `<c:pieChart | doughnutChart><c:firstSliceAng val>` (ECMA-376 §21.2.2.52,
|
|
704
|
-
* `ST_FirstSliceAng` §21.2.3.15) — the angle in degrees (0–360, clockwise
|
|
705
|
-
* from the 12 o'clock position) at which the first slice begins.
|
|
706
|
-
* null/undefined = 0 (start at 12 o'clock), which matches the renderer's
|
|
707
|
-
* historical fixed −90° (canvas up) start.
|
|
708
|
-
*/
|
|
709
|
-
firstSliceAngle?: number | null;
|
|
710
|
-
/**
|
|
711
|
-
* `<c:chartSpace><c:chart><c:dispBlanksAs val>` (ECMA-376 §21.2.2.42,
|
|
712
|
-
* `ST_DispBlanksAs` §21.2.3.10) — how blank (null) cells are plotted on
|
|
713
|
-
* line/area charts:
|
|
714
|
-
* - "gap" → leave a gap (break the line). The renderer's historical
|
|
715
|
-
* behavior and the model default when the element is absent.
|
|
716
|
-
* - "zero" → plot the blank as the value 0 (the point drops to the axis).
|
|
717
|
-
* - "span" → skip the blank but connect its neighbours with a straight
|
|
718
|
-
* line (bridge the gap).
|
|
719
|
-
* Note the XSD `@val` default is "zero" (applies when `<c:dispBlanksAs/>` is
|
|
720
|
-
* present but the attribute is omitted); when the ELEMENT is absent entirely
|
|
721
|
-
* Office falls back to "gap", which is what we model as the default. Only
|
|
722
|
-
* consulted for the line and area families. null/undefined = "gap".
|
|
723
|
-
*/
|
|
724
|
-
dispBlanksAs?: string | null;
|
|
725
|
-
/**
|
|
726
|
-
* `<c:valAx><c:majorGridlines>` presence (ECMA-376 §21.2.2.100). `false` when
|
|
727
|
-
* the value axis exists but omits the element (Office suppresses value
|
|
728
|
-
* gridlines). null/undefined ⇒ the renderer's historical always-on value
|
|
729
|
-
* gridlines (byte-stable). `true` is redundant with the default but honored.
|
|
730
|
-
*/
|
|
731
|
-
valAxisMajorGridlines?: boolean | null;
|
|
732
|
-
/**
|
|
733
|
-
* `<c:catAx><c:majorGridlines>` presence (§21.2.2.100). `true` turns on
|
|
734
|
-
* category-axis gridlines (Office omits them by default). null/undefined/false
|
|
735
|
-
* ⇒ no category gridlines (the historical default, byte-stable).
|
|
736
|
-
*/
|
|
737
|
-
catAxisMajorGridlines?: boolean | null;
|
|
738
|
-
/**
|
|
739
|
-
* `<c:valAx><c:majorGridlines><c:spPr><a:ln><a:solidFill>` resolved gridline
|
|
740
|
-
* color (hex without `#`) — ECMA-376 §21.2.2.100. When set, the value-axis
|
|
741
|
-
* major gridlines are stroked in this color instead of the renderer's faint
|
|
742
|
-
* `#e0e0e0` default (e.g. sample-1 slide 5's `accent3` gridlines). null/absent
|
|
743
|
-
* ⇒ the historical default (byte-stable).
|
|
744
|
-
*/
|
|
745
|
-
valAxisGridlineColor?: string | null;
|
|
746
|
-
/**
|
|
747
|
-
* `<c:valAx><c:majorGridlines><c:spPr><a:ln w>` gridline width in EMU. When
|
|
748
|
-
* set, the value-axis gridline stroke width is derived from this (floored so a
|
|
749
|
-
* hairline stays visible). null/absent ⇒ the renderer's 0.5 px default.
|
|
750
|
-
*/
|
|
751
|
-
valAxisGridlineWidthEmu?: number | null;
|
|
752
|
-
/**
|
|
753
|
-
* `<c:catAx><c:majorGridlines><c:spPr><a:ln><a:solidFill>` resolved gridline
|
|
754
|
-
* color (hex without `#`). Only meaningful when {@link catAxisMajorGridlines}
|
|
755
|
-
* is on. null/absent ⇒ the faint default.
|
|
756
|
-
*/
|
|
757
|
-
catAxisGridlineColor?: string | null;
|
|
758
|
-
/** `<c:catAx><c:majorGridlines><c:spPr><a:ln w>` gridline width in EMU. */
|
|
759
|
-
catAxisGridlineWidthEmu?: number | null;
|
|
760
|
-
/** `<c:valAx><c:minorGridlines>` presence (§21.2.2.109). Only drawn when a
|
|
761
|
-
* minor step is resolvable (see {@link valAxisMinorUnit}). */
|
|
762
|
-
valAxisMinorGridlines?: boolean | null;
|
|
763
|
-
/**
|
|
764
|
-
* `<c:valAx><c:majorUnit val>` (§21.2.2.103) — explicit distance between major
|
|
765
|
-
* gridlines/ticks, overriding the Excel-style auto "nice" step. null/undefined
|
|
766
|
-
* ⇒ auto step (byte-stable).
|
|
767
|
-
*/
|
|
768
|
-
valAxisMajorUnit?: number | null;
|
|
769
|
-
/** `<c:valAx><c:minorUnit val>` (§21.2.2.112) — explicit minor step. Drives
|
|
770
|
-
* minor gridlines/ticks when present. null ⇒ no minor divisions. */
|
|
771
|
-
valAxisMinorUnit?: number | null;
|
|
772
|
-
/**
|
|
773
|
-
* `<c:valAx><c:scaling><c:logBase val>` (§21.2.2.98, `ST_LogBase` §21.2.3.25)
|
|
774
|
-
* — logarithmic value-axis base (>= 2). When set, values map to pixels in log
|
|
775
|
-
* space and gridlines fall on powers of the base. null/undefined ⇒ linear
|
|
776
|
-
* (byte-stable).
|
|
777
|
-
*/
|
|
778
|
-
valAxisLogBase?: number | null;
|
|
779
|
-
/**
|
|
780
|
-
* `<c:valAx><c:scaling><c:orientation val>` (§21.2.2.130, `ST_Orientation`
|
|
781
|
-
* §21.2.3.30) — "minMax" (normal) | "maxMin" (reversed, so the value axis runs
|
|
782
|
-
* top→bottom max→min). null/undefined/"minMax" ⇒ normal (byte-stable).
|
|
783
|
-
*/
|
|
784
|
-
valAxisOrientation?: 'minMax' | 'maxMin' | string | null;
|
|
785
|
-
/** `<c:catAx><c:scaling><c:orientation val>` — "maxMin" reverses the category
|
|
786
|
-
* axis left↔right. null/"minMax" ⇒ normal. */
|
|
787
|
-
catAxisOrientation?: 'minMax' | 'maxMin' | string | null;
|
|
788
|
-
/**
|
|
789
|
-
* `<c:catAx><c:tickLblPos val>` (§21.2.2.207, `ST_TickLblPos` §21.2.3.47) —
|
|
790
|
-
* "nextTo" (default) | "low" | "high" | "none". "none" hides the category tick
|
|
791
|
-
* labels. null/undefined ⇒ nextTo (byte-stable).
|
|
792
|
-
*/
|
|
793
|
-
catAxisTickLabelPos?: string | null;
|
|
794
|
-
/** `<c:valAx><c:tickLblPos val>` (§21.2.2.207). "none" hides value tick labels. */
|
|
795
|
-
valAxisTickLabelPos?: string | null;
|
|
796
|
-
/**
|
|
797
|
-
* `<c:catAx><c:txPr><a:bodyPr rot>` (DrawingML `ST_Angle`, 60000ths of a
|
|
798
|
-
* degree) — category tick-label rotation. e.g. -2700000 = -45°. null/undefined
|
|
799
|
-
* /0 ⇒ horizontal labels (byte-stable).
|
|
800
|
-
*/
|
|
801
|
-
catAxisLabelRotation?: number | null;
|
|
802
|
-
/**
|
|
803
|
-
* `<c:stockChart><c:hiLowLines>` presence (ECMA-376 §21.2.2.60). When true
|
|
804
|
-
* the stock renderer draws a vertical line spanning each category's low↔high
|
|
805
|
-
* value. Only set for `chartType === "stock"`; null/undefined on every other
|
|
806
|
-
* chart type (byte-stable).
|
|
807
|
-
*/
|
|
808
|
-
stockHiLowLines?: boolean | null;
|
|
809
|
-
/**
|
|
810
|
-
* `<c:hiLowLines><c:spPr><a:ln><a:solidFill>` resolved color (hex, no `#`).
|
|
811
|
-
* null = the renderer's default gray hi-lo line.
|
|
812
|
-
*/
|
|
813
|
-
stockHiLowLineColor?: string | null;
|
|
814
|
-
/**
|
|
815
|
-
* `<c:stockChart><c:upDownBars>` presence (ECMA-376 §21.2.2.227). Parsed so a
|
|
816
|
-
* stock file carrying open-close up/down bars is recognized; the renderer does
|
|
817
|
-
* NOT yet draw them (tracked follow-up). null/undefined when absent.
|
|
818
|
-
*/
|
|
819
|
-
stockUpDownBars?: boolean | null;
|
|
820
|
-
/**
|
|
821
|
-
* Structured box-and-whisker data (`chartType === 'boxWhisker'`). Present
|
|
822
|
-
* ONLY for boxWhisker charts; null/absent otherwise so the flat
|
|
823
|
-
* `categories`/`series` model the other chartEx renderers consume is
|
|
824
|
-
* untouched. The renderer computes quartiles / mean / whiskers / outliers.
|
|
825
|
-
*/
|
|
826
|
-
chartexBox?: ChartexBoxWhisker | null;
|
|
827
|
-
/**
|
|
828
|
-
* Structured sunburst hierarchy (`chartType === 'sunburst'`). Present ONLY
|
|
829
|
-
* for sunburst charts; null/absent otherwise.
|
|
830
|
-
*/
|
|
831
|
-
chartexSunburst?: ChartexSunburst | null;
|
|
832
|
-
/**
|
|
833
|
-
* Theme accent palette (`accent1..6`, hex without '#') for chartEx charts
|
|
834
|
-
* that color by branch/series index (boxWhisker series, sunburst branches).
|
|
835
|
-
* null/absent when the resolver supplies no default palette (pptx); the
|
|
836
|
-
* renderer then falls back to its own `CHART_PALETTE`.
|
|
837
|
-
*/
|
|
838
|
-
chartexAccents?: string[] | null;
|
|
839
|
-
}
|
|
840
|
-
/**
|
|
841
|
-
* One box-and-whisker series (chartEx `boxWhisker`, MS 2014 chartex ext). Each
|
|
842
|
-
* `<cx:series>` references its own raw sample points via `<cx:dataId>`; the
|
|
843
|
-
* parser groups them by category and threads the `<cx:layoutPr>` flags. The
|
|
844
|
-
* renderer derives the statistics.
|
|
845
|
-
*/
|
|
217
|
+
chartType: ChartType;
|
|
218
|
+
title: string | null;
|
|
219
|
+
categories: string[];
|
|
220
|
+
series: ChartSeries[];
|
|
221
|
+
varyColors?: boolean | null;
|
|
222
|
+
showDataLabels: boolean;
|
|
223
|
+
valMin: number | null;
|
|
224
|
+
valMax: number | null;
|
|
225
|
+
catAxisTitle: string | null;
|
|
226
|
+
valAxisTitle: string | null;
|
|
227
|
+
catAxisHidden: boolean;
|
|
228
|
+
valAxisHidden: boolean;
|
|
229
|
+
catAxisLineHidden: boolean;
|
|
230
|
+
valAxisLineHidden: boolean;
|
|
231
|
+
plotAreaBg: string | null;
|
|
232
|
+
chartBg: string | null;
|
|
233
|
+
showLegend: boolean;
|
|
234
|
+
legendPos: 'r' | 'l' | 't' | 'b' | 'tr' | null;
|
|
235
|
+
catAxisCrossBetween: 'between' | 'midCat' | string;
|
|
236
|
+
valAxisMajorTickMark: 'cross' | 'out' | 'in' | 'none' | string;
|
|
237
|
+
catAxisMajorTickMark: 'cross' | 'out' | 'in' | 'none' | string;
|
|
238
|
+
valAxisMinorTickMark?: 'cross' | 'out' | 'in' | 'none' | string | null;
|
|
239
|
+
catAxisMinorTickMark?: 'cross' | 'out' | 'in' | 'none' | string | null;
|
|
240
|
+
titleFontSizeHpt: number | null;
|
|
241
|
+
titleFontColor: string | null;
|
|
242
|
+
titleFontFace: string | null;
|
|
243
|
+
catAxisFontSizeHpt: number | null;
|
|
244
|
+
valAxisFontSizeHpt: number | null;
|
|
245
|
+
catAxisFontColor?: string | null;
|
|
246
|
+
valAxisFontColor?: string | null;
|
|
247
|
+
dataLabelFontSizeHpt: number | null;
|
|
248
|
+
subtotalIndices: number[];
|
|
249
|
+
legendManualLayout?: LegendManualLayout | null;
|
|
250
|
+
valAxisFormatCode?: string | null;
|
|
251
|
+
barGapWidth?: number | null;
|
|
252
|
+
barOverlap?: number | null;
|
|
253
|
+
dataLabelPosition?: string | null;
|
|
254
|
+
dataLabelFontColor?: string | null;
|
|
255
|
+
dataLabelFormatCode?: string | null;
|
|
256
|
+
titleFontBold?: boolean | null;
|
|
257
|
+
catAxisFontBold?: boolean | null;
|
|
258
|
+
valAxisFontBold?: boolean | null;
|
|
259
|
+
catAxisTitleFontSizeHpt?: number | null;
|
|
260
|
+
catAxisTitleFontBold?: boolean | null;
|
|
261
|
+
catAxisTitleFontColor?: string | null;
|
|
262
|
+
valAxisTitleFontSizeHpt?: number | null;
|
|
263
|
+
valAxisTitleFontBold?: boolean | null;
|
|
264
|
+
valAxisTitleFontColor?: string | null;
|
|
265
|
+
catAxisFontFace?: string | null;
|
|
266
|
+
valAxisFontFace?: string | null;
|
|
267
|
+
catAxisTitleFontFace?: string | null;
|
|
268
|
+
valAxisTitleFontFace?: string | null;
|
|
269
|
+
dataLabelFontFace?: string | null;
|
|
270
|
+
legendFontFace?: string | null;
|
|
271
|
+
legendFontColor?: string | null;
|
|
272
|
+
legendFontSizeHpt?: number | null;
|
|
273
|
+
legendFontBold?: boolean | null;
|
|
274
|
+
themeMajorFontLatin?: string | null;
|
|
275
|
+
themeMinorFontLatin?: string | null;
|
|
276
|
+
chartBorderColor?: string | null;
|
|
277
|
+
chartBorderWidthEmu?: number | null;
|
|
278
|
+
catAxisCrosses?: string | null;
|
|
279
|
+
catAxisCrossesAt?: number | null;
|
|
280
|
+
valAxisCrosses?: string | null;
|
|
281
|
+
valAxisCrossesAt?: number | null;
|
|
282
|
+
catAxisLineColor?: string | null;
|
|
283
|
+
catAxisLineWidthEmu?: number | null;
|
|
284
|
+
valAxisLineColor?: string | null;
|
|
285
|
+
valAxisLineWidthEmu?: number | null;
|
|
286
|
+
catAxisFormatCode?: string | null;
|
|
287
|
+
catAxisMin?: number | null;
|
|
288
|
+
catAxisMax?: number | null;
|
|
289
|
+
titleManualLayout?: ChartManualLayout | null;
|
|
290
|
+
plotAreaManualLayout?: ChartManualLayout | null;
|
|
291
|
+
scatterStyle?: string | null;
|
|
292
|
+
radarStyle?: string | null;
|
|
293
|
+
secondaryValAxis?: SecondaryValueAxis | null;
|
|
294
|
+
date1904?: boolean;
|
|
295
|
+
holeSize?: number | null;
|
|
296
|
+
firstSliceAngle?: number | null;
|
|
297
|
+
dispBlanksAs?: string | null;
|
|
298
|
+
valAxisMajorGridlines?: boolean | null;
|
|
299
|
+
catAxisMajorGridlines?: boolean | null;
|
|
300
|
+
valAxisGridlineColor?: string | null;
|
|
301
|
+
valAxisGridlineWidthEmu?: number | null;
|
|
302
|
+
catAxisGridlineColor?: string | null;
|
|
303
|
+
catAxisGridlineWidthEmu?: number | null;
|
|
304
|
+
valAxisMinorGridlines?: boolean | null;
|
|
305
|
+
valAxisMajorUnit?: number | null;
|
|
306
|
+
valAxisMinorUnit?: number | null;
|
|
307
|
+
valAxisLogBase?: number | null;
|
|
308
|
+
valAxisOrientation?: 'minMax' | 'maxMin' | string | null;
|
|
309
|
+
catAxisOrientation?: 'minMax' | 'maxMin' | string | null;
|
|
310
|
+
catAxisTickLabelPos?: string | null;
|
|
311
|
+
valAxisTickLabelPos?: string | null;
|
|
312
|
+
catAxisLabelRotation?: number | null;
|
|
313
|
+
stockHiLowLines?: boolean | null;
|
|
314
|
+
stockHiLowLineColor?: string | null;
|
|
315
|
+
stockUpDownBars?: boolean | null;
|
|
316
|
+
chartexBox?: ChartexBoxWhisker | null;
|
|
317
|
+
chartexSunburst?: ChartexSunburst | null;
|
|
318
|
+
chartexAccents?: string[] | null;
|
|
319
|
+
}
|
|
846
320
|
interface ChartexBoxSeries {
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
meanMarker: boolean;
|
|
857
|
-
/** `<cx:visibility meanLine>` — draw a mean connector line across categories. */
|
|
858
|
-
meanLine: boolean;
|
|
859
|
-
/** `<cx:visibility outliers>` — draw outlier points. */
|
|
860
|
-
showOutliers: boolean;
|
|
861
|
-
/** `<cx:visibility nonoutliers>` — draw the interior (non-outlier) sample
|
|
862
|
-
* points as jittered dots on top of the box. Flag parsed; interior-dot
|
|
863
|
-
* rendering is pending a fixture that enables it (every sample-24 series
|
|
864
|
-
* ships `nonoutliers="0"`, so there is nothing to verify against yet). */
|
|
865
|
-
showNonoutliers: boolean;
|
|
866
|
-
/** `<cx:statistics quartileMethod>` — "exclusive" (Excel default) | "inclusive". */
|
|
867
|
-
quartileMethod: string;
|
|
868
|
-
}
|
|
869
|
-
/** A chartEx box-and-whisker chart: unique categories + one series per column. */
|
|
321
|
+
name: string;
|
|
322
|
+
color?: string | null;
|
|
323
|
+
valuesByCategory: number[][];
|
|
324
|
+
meanMarker: boolean;
|
|
325
|
+
meanLine: boolean;
|
|
326
|
+
showOutliers: boolean;
|
|
327
|
+
showNonoutliers: boolean;
|
|
328
|
+
quartileMethod: string;
|
|
329
|
+
}
|
|
870
330
|
interface ChartexBoxWhisker {
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
series: ChartexBoxSeries[];
|
|
875
|
-
}
|
|
876
|
-
/**
|
|
877
|
-
* One row of a chartEx `sunburst`: the branch→…→leaf label chain (empty
|
|
878
|
-
* trailing segments trimmed) and its size value.
|
|
879
|
-
*/
|
|
331
|
+
categories: string[];
|
|
332
|
+
series: ChartexBoxSeries[];
|
|
333
|
+
}
|
|
880
334
|
interface ChartexSunburstRow {
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
/** `<cx:numDim type="size">` value attaching to the deepest node in `path`. */
|
|
884
|
-
size: number;
|
|
335
|
+
path: string[];
|
|
336
|
+
size: number;
|
|
885
337
|
}
|
|
886
|
-
/** A chartEx sunburst: the flat rows the renderer folds into a ring tree. */
|
|
887
338
|
interface ChartexSunburst {
|
|
888
|
-
|
|
889
|
-
}
|
|
890
|
-
/**
|
|
891
|
-
* A secondary value axis (combo charts). Mirrors the primary value-axis
|
|
892
|
-
* properties but lives in its own object so the flat primary-axis fields stay
|
|
893
|
-
* untouched. Parsed from the right-hand `<c:valAx>` (`axPos="r"`,
|
|
894
|
-
* `<c:crosses val="max">`).
|
|
895
|
-
*/
|
|
339
|
+
rows: ChartexSunburstRow[];
|
|
340
|
+
}
|
|
896
341
|
interface SecondaryValueAxis {
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
/** `<c:spPr><a:ln w>` axis-line width in EMU. */
|
|
914
|
-
lineWidthEmu?: number | null;
|
|
915
|
-
/** `<c:spPr><a:ln><a:noFill>` — hide just the axis rule. */
|
|
916
|
-
lineHidden: boolean;
|
|
917
|
-
/** `<c:majorTickMark>` — "cross" (default) | "out" | "in" | "none". */
|
|
918
|
-
majorTickMark: string;
|
|
919
|
-
/**
|
|
920
|
-
* `<c:valAx><c:majorUnit val>` (§21.2.2.103) — explicit distance between
|
|
921
|
-
* major ticks/gridlines on THIS secondary axis, overriding the Excel-style
|
|
922
|
-
* auto "nice" step. null/undefined ⇒ auto step (byte-stable). Symmetric with
|
|
923
|
-
* {@link ChartModel.valAxisMajorUnit} on the primary axis.
|
|
924
|
-
*/
|
|
925
|
-
majorUnit?: number | null;
|
|
926
|
-
/** `<c:title>` run-prop font size (hpt). */
|
|
927
|
-
titleFontSizeHpt?: number | null;
|
|
928
|
-
/** `<c:title>` run-prop bold flag. */
|
|
929
|
-
titleFontBold?: boolean | null;
|
|
930
|
-
/** `<c:title>` run-prop color (hex without '#'). */
|
|
931
|
-
titleFontColor?: string | null;
|
|
932
|
-
}
|
|
933
|
-
/**
|
|
934
|
-
* `<c:manualLayout>` block. Fractions are of the chart-space rect.
|
|
935
|
-
* `xMode`/`yMode`: "edge" = absolute fraction from top-left, "factor" =
|
|
936
|
-
* fraction offset from default position.
|
|
937
|
-
*/
|
|
342
|
+
min: number | null;
|
|
343
|
+
max: number | null;
|
|
344
|
+
title: string | null;
|
|
345
|
+
hidden: boolean;
|
|
346
|
+
formatCode?: string | null;
|
|
347
|
+
fontColor?: string | null;
|
|
348
|
+
fontSizeHpt?: number | null;
|
|
349
|
+
lineColor?: string | null;
|
|
350
|
+
lineWidthEmu?: number | null;
|
|
351
|
+
lineHidden: boolean;
|
|
352
|
+
majorTickMark: string;
|
|
353
|
+
majorUnit?: number | null;
|
|
354
|
+
titleFontSizeHpt?: number | null;
|
|
355
|
+
titleFontBold?: boolean | null;
|
|
356
|
+
titleFontColor?: string | null;
|
|
357
|
+
}
|
|
938
358
|
interface ChartManualLayout {
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
359
|
+
xMode: string;
|
|
360
|
+
yMode: string;
|
|
361
|
+
layoutTarget?: string;
|
|
362
|
+
x: number;
|
|
363
|
+
y: number;
|
|
364
|
+
w?: number;
|
|
365
|
+
h?: number;
|
|
946
366
|
}
|
|
947
367
|
interface LegendManualLayout {
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
y: number;
|
|
955
|
-
w: number;
|
|
956
|
-
h: number;
|
|
368
|
+
xMode: string;
|
|
369
|
+
yMode: string;
|
|
370
|
+
x: number;
|
|
371
|
+
y: number;
|
|
372
|
+
w: number;
|
|
373
|
+
h: number;
|
|
957
374
|
}
|
|
958
|
-
//#endregion
|
|
959
|
-
//#region packages/core/src/errors/ooxml-error.d.ts
|
|
960
|
-
/**
|
|
961
|
-
* Machine-readable code for a typed load-time failure.
|
|
962
|
-
*
|
|
963
|
-
* The container-level failures the `load()` factories detect on the main thread
|
|
964
|
-
* before handing bytes to the parser worker (see `sniffCfb` / `decryptOoxml`).
|
|
965
|
-
* This is the seed of the broader typed-error surface tracked as PD4 (OoxmlError
|
|
966
|
-
* typed errors). Add codes here rather than throwing bare `Error(string)`, so
|
|
967
|
-
* callers can `switch` on `err.code` instead of matching message text.
|
|
968
|
-
*
|
|
969
|
-
* - `'encrypted'` — password-protected, but no `password` was
|
|
970
|
-
* supplied (pass `LoadOptions.password` to decrypt).
|
|
971
|
-
* - `'invalid-password'` — a `password` was supplied but did not match.
|
|
972
|
-
* - `'unsupported-encryption'`— encrypted with a scheme other than Agile
|
|
973
|
-
* (Standard / Extensible / a legacy binary encryptor), which this library
|
|
974
|
-
* cannot decrypt (PD8 implements Agile only).
|
|
975
|
-
* - `'legacy-binary-format'` — a raw .doc / .xls / .ppt (not OOXML).
|
|
976
|
-
* - `'not-ooxml'` — a CFB of an unrecognised kind, or otherwise
|
|
977
|
-
* not an OOXML ZIP.
|
|
978
|
-
*/
|
|
979
375
|
type OoxmlErrorCode = 'encrypted' | 'invalid-password' | 'unsupported-encryption' | 'legacy-binary-format' | 'not-ooxml';
|
|
980
376
|
type OoxmlErrorStage = 'container' | 'decompression' | 'parsing' | 'serialization' | 'layout' | 'rendering' | 'worker';
|
|
981
|
-
/**
|
|
982
|
-
* @deprecated Use {@link OoxmlErrorStage}. Retained as a compatibility alias
|
|
983
|
-
* for the short-lived resource-governance API that exposed this vocabulary;
|
|
984
|
-
* scheduled for removal in a future breaking release.
|
|
985
|
-
*/
|
|
986
377
|
type OoxmlErrorSource = 'container' | 'zip-part' | 'parser' | 'serializer' | 'layout' | 'renderer' | 'worker';
|
|
987
|
-
/**
|
|
988
|
-
* Typed error thrown by the docx / pptx / xlsx `load()` factories for failures
|
|
989
|
-
* that carry a stable, programmatic {@link OoxmlErrorCode} (e.g. a
|
|
990
|
-
* password-protected or legacy-binary file detected from its container magic).
|
|
991
|
-
*
|
|
992
|
-
* Note on workers: `instanceof OoxmlError` does not survive a structured-clone
|
|
993
|
-
* across the worker boundary. Detection that needs a typed error is therefore
|
|
994
|
-
* done on the main thread (before the worker is involved) so a genuine
|
|
995
|
-
* `OoxmlError` instance is thrown to the caller. Errors that must cross the
|
|
996
|
-
* worker boundary should carry the `code` string and be reconstructed on the
|
|
997
|
-
* main side.
|
|
998
|
-
*/
|
|
999
378
|
declare class OoxmlError extends Error {
|
|
1000
|
-
|
|
1001
|
-
|
|
379
|
+
readonly code: OoxmlErrorCode;
|
|
380
|
+
constructor(code: OoxmlErrorCode, message: string);
|
|
1002
381
|
}
|
|
1003
382
|
type OoxmlFormat = 'docx' | 'xlsx' | 'pptx';
|
|
1004
383
|
interface OoxmlResourceUsageSnapshot {
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
readonly operationInflatedBytes: number;
|
|
384
|
+
readonly archiveEntryCount: number;
|
|
385
|
+
readonly declaredInflatedBytes: number;
|
|
386
|
+
readonly largestInflatedEntryBytes?: number;
|
|
387
|
+
readonly distinctInflatedBytes: number;
|
|
388
|
+
readonly operationInflatedBytes: number;
|
|
1011
389
|
}
|
|
1012
390
|
type ExtensibleLiteral<Known extends string> = Known | (string & Record<never, never>);
|
|
1013
|
-
/**
|
|
1014
|
-
* Resource family reported by a policy or hard-quota violation.
|
|
1015
|
-
*
|
|
1016
|
-
* The known literals provide editor completion. The string tail is deliberate:
|
|
1017
|
-
* adding a future format-owned unit must not break exhaustive switches compiled
|
|
1018
|
-
* against an older host while a newer worker is already able to report it.
|
|
1019
|
-
*/
|
|
1020
391
|
type OoxmlResourceName = ExtensibleLiteral<'archive' | 'archive-entry' | 'xml-event' | 'xml-context' | 'xml-tree' | 'worksheet-row' | 'worksheet-shell'>;
|
|
1021
|
-
/** Measurement axis used by an OOXML resource violation. Extensible by design. */
|
|
1022
392
|
type OoxmlResourceMetric = ExtensibleLiteral<'declared-inflated-bytes' | 'actual-inflated-bytes' | 'entry-count' | 'central-directory-bytes' | 'distinct-inflated-bytes' | 'bytes' | 'depth' | 'projected-bytes'>;
|
|
1023
|
-
/** Stable public violation record. Valid resource/metric pairings are enforced
|
|
1024
|
-
* by the emitting parser and the worker decoder rather than by a closed public
|
|
1025
|
-
* union that would require a breaking expansion for every new hard quota. */
|
|
1026
393
|
interface OoxmlResourceViolation {
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
394
|
+
readonly format: OoxmlFormat;
|
|
395
|
+
readonly operation: string;
|
|
396
|
+
readonly resource: OoxmlResourceName;
|
|
397
|
+
readonly metric: OoxmlResourceMetric;
|
|
398
|
+
readonly part?: string;
|
|
399
|
+
readonly limit: number;
|
|
400
|
+
readonly observed: number;
|
|
401
|
+
readonly configurable: boolean;
|
|
402
|
+
readonly usage: OoxmlResourceUsageSnapshot;
|
|
1036
403
|
}
|
|
1037
404
|
interface OoxmlResourceLimitErrorDetails {
|
|
1038
|
-
|
|
1039
|
-
|
|
405
|
+
readonly stage: OoxmlErrorStage;
|
|
406
|
+
readonly violation: OoxmlResourceViolation;
|
|
1040
407
|
}
|
|
1041
|
-
/** Deterministic rejection caused by a measured OOXML resource-policy breach. */
|
|
1042
408
|
declare class OoxmlResourceLimitError extends Error {
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
409
|
+
readonly code: 'ooxml-resource-limit';
|
|
410
|
+
readonly details: OoxmlResourceLimitErrorDetails;
|
|
411
|
+
constructor(message: string, details: OoxmlResourceLimitErrorDetails);
|
|
1046
412
|
}
|
|
1047
|
-
//#endregion
|
|
1048
|
-
//#region packages/core/src/types/resource-metrics.d.ts
|
|
1049
|
-
/** Configured public admission policy used for one measured operation. */
|
|
1050
413
|
interface OoxmlResourcePolicySnapshot {
|
|
1051
|
-
|
|
1052
|
-
|
|
414
|
+
readonly maxArchiveEntryBytes: number | null;
|
|
415
|
+
readonly maxTotalInflatedBytes: number | null;
|
|
416
|
+
readonly maxArchiveEntries: number | null;
|
|
1053
417
|
}
|
|
1054
418
|
interface OoxmlResourceMetricsCheckpoint {
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
}
|
|
1059
|
-
/**
|
|
1060
|
-
* Content-free, machine-readable resource report for an OOXML load or bounded
|
|
1061
|
-
* Node session. Byte counters describe measured package work, not the JavaScript
|
|
1062
|
-
* heap, WASM allocator overhead, decoded images, canvas, or GPU. Browser engines
|
|
1063
|
-
* and Viewers can return a newer snapshot after lazy package access.
|
|
1064
|
-
*
|
|
1065
|
-
* No source URL, filename, OOXML part name, document text, password, or raw
|
|
1066
|
-
* error message is included. Sizes, counts, and timings are still
|
|
1067
|
-
* document-derived metadata; applications apply their own consent, retention,
|
|
1068
|
-
* and telemetry policy.
|
|
1069
|
-
*/
|
|
419
|
+
readonly name: string;
|
|
420
|
+
readonly elapsedMs: number;
|
|
421
|
+
readonly usage?: OoxmlResourceUsageSnapshot;
|
|
422
|
+
}
|
|
1070
423
|
interface OoxmlResourceMetrics {
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
readonly
|
|
1084
|
-
readonly
|
|
1085
|
-
|
|
1086
|
-
readonly
|
|
1087
|
-
|
|
1088
|
-
readonly outcome?: Readonly<Record<string, number>>;
|
|
1089
|
-
readonly error?: Readonly<{
|
|
1090
|
-
readonly code?: string;
|
|
1091
|
-
readonly stage?: string;
|
|
1092
|
-
readonly resource?: string;
|
|
1093
|
-
readonly metric?: string;
|
|
1094
|
-
}>;
|
|
424
|
+
readonly schemaVersion: 1;
|
|
425
|
+
readonly scope: 'load' | 'session';
|
|
426
|
+
readonly format: OoxmlFormat;
|
|
427
|
+
readonly mode: 'main' | 'worker' | 'node';
|
|
428
|
+
readonly status: 'ok' | 'error';
|
|
429
|
+
readonly sourceBytes?: number;
|
|
430
|
+
readonly elapsedMs: number;
|
|
431
|
+
readonly policy: Readonly<OoxmlResourcePolicySnapshot>;
|
|
432
|
+
readonly usage?: OoxmlResourceUsageSnapshot;
|
|
433
|
+
readonly checkpoints: readonly OoxmlResourceMetricsCheckpoint[];
|
|
434
|
+
readonly outcome?: Readonly<Record<string, number>>;
|
|
435
|
+
readonly error?: Readonly<{
|
|
436
|
+
readonly code?: string;
|
|
437
|
+
readonly stage?: string;
|
|
438
|
+
readonly resource?: string;
|
|
439
|
+
readonly metric?: string;
|
|
440
|
+
}>;
|
|
1095
441
|
}
|
|
1096
|
-
//#endregion
|
|
1097
|
-
//#region packages/core/src/types/load-options.d.ts
|
|
1098
|
-
/** A positive safe-integer byte count, or `null` to disable one public limit. */
|
|
1099
442
|
type OoxmlResourceLimit = number | null;
|
|
1100
|
-
/** Admission limits for the inflated contents of one OOXML package session. */
|
|
1101
443
|
interface OoxmlResourceLimits {
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
maxArchiveEntryBytes?: OoxmlResourceLimit;
|
|
1107
|
-
/** Maximum actual inflated bytes across distinct entries in the session. */
|
|
1108
|
-
maxTotalInflatedBytes?: OoxmlResourceLimit;
|
|
1109
|
-
}
|
|
1110
|
-
/**
|
|
1111
|
-
* Common load-time options shared by the docx / pptx / xlsx
|
|
1112
|
-
* `Document.load` / `Presentation.load` / `Workbook.load` factories and their
|
|
1113
|
-
* viewer wrappers.
|
|
1114
|
-
*
|
|
1115
|
-
* This is the single source of truth — each package re-exports this exact type
|
|
1116
|
-
* as its `LoadOptions` so application code can pass one options object to any
|
|
1117
|
-
* of the three.
|
|
1118
|
-
*/
|
|
444
|
+
maxArchiveEntryBytes?: OoxmlResourceLimit;
|
|
445
|
+
maxTotalInflatedBytes?: OoxmlResourceLimit;
|
|
446
|
+
maxArchiveEntries?: OoxmlResourceLimit;
|
|
447
|
+
}
|
|
1119
448
|
interface LoadOptions$1 {
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
*/
|
|
1130
|
-
useGoogleFonts?: boolean;
|
|
1131
|
-
/**
|
|
1132
|
-
* Password for an encrypted OOXML file ([MS-OFFCRYPTO] Agile Encryption).
|
|
1133
|
-
*
|
|
1134
|
-
* Password-protected Office documents are CFB (OLE2) containers, not ZIPs.
|
|
1135
|
-
* When this is set and the input is Agile-encrypted, `load()` decrypts it on
|
|
1136
|
-
* the main thread (via WebCrypto) and parses the recovered plaintext ZIP.
|
|
1137
|
-
*
|
|
1138
|
-
* Errors (thrown as {@link import('../errors/ooxml-error').OoxmlError}):
|
|
1139
|
-
* - no `password` on an encrypted file → code `'encrypted'`
|
|
1140
|
-
* - wrong `password` → code `'invalid-password'`
|
|
1141
|
-
* - a non-Agile scheme (Standard / Extensible / legacy) → code
|
|
1142
|
-
* `'unsupported-encryption'`
|
|
1143
|
-
*
|
|
1144
|
-
* Note: Agile Encryption uses a high password-hash spin count (commonly
|
|
1145
|
-
* 100,000), so decryption of a protected file adds roughly a second of
|
|
1146
|
-
* WebCrypto work before parsing begins.
|
|
1147
|
-
*
|
|
1148
|
-
* Security notes:
|
|
1149
|
-
* - This value is held as an ordinary JS `string` in memory for the
|
|
1150
|
-
* duration of key derivation. The library does not zero it, and does
|
|
1151
|
-
* not wrap it in a `SecureString`-equivalent — it becomes eligible for
|
|
1152
|
-
* garbage collection like any other string once nothing references it,
|
|
1153
|
-
* but no explicit wipe is performed. It is never logged or included in
|
|
1154
|
-
* thrown errors.
|
|
1155
|
-
* - Decryption recovers the plaintext but does not verify the file's HMAC
|
|
1156
|
-
* data-integrity tag ([MS-OFFCRYPTO] §2.3.4.14), so ciphertext tampering
|
|
1157
|
-
* is not detected — see "Security & Privacy" in the README.
|
|
1158
|
-
*/
|
|
1159
|
-
password?: string;
|
|
1160
|
-
/**
|
|
1161
|
-
* Override the URL the parser worker fetches the WebAssembly module from.
|
|
1162
|
-
*
|
|
1163
|
-
* By default each format resolves the `.wasm` asset that ships next to its
|
|
1164
|
-
* bundle (relative to the module URL), so no configuration is needed. Set
|
|
1165
|
-
* this to serve the parser WASM from a CDN or a self-hosted path instead — a
|
|
1166
|
-
* relative value is resolved against the current document URL. The same
|
|
1167
|
-
* dependency-injection contract across docx / pptx / xlsx.
|
|
1168
|
-
*
|
|
1169
|
-
* The referenced file must be the matching format's `*_parser_bg.wasm`
|
|
1170
|
-
* artifact (the one wasm-bindgen emitted for that parser); pointing it at a
|
|
1171
|
-
* mismatched or missing file makes `load()` reject when the worker
|
|
1172
|
-
* instantiates it.
|
|
1173
|
-
*/
|
|
1174
|
-
wasmUrl?: string | URL;
|
|
1175
|
-
/**
|
|
1176
|
-
* @deprecated Use `resourceLimits.maxArchiveEntryBytes`. Scheduled for
|
|
1177
|
-
* removal in a future breaking release.
|
|
1178
|
-
*
|
|
1179
|
-
* Existing positive safe-integer values remain an all-entry inflated-byte
|
|
1180
|
-
* limit. Zero, negative, and NaN values retain their historical fallback
|
|
1181
|
-
* behavior; other invalid positive values reject during `load()`.
|
|
1182
|
-
*/
|
|
1183
|
-
maxZipEntryBytes?: number;
|
|
1184
|
-
/**
|
|
1185
|
-
* Inflated archive admission limits for one document session. Omitted fields
|
|
1186
|
-
* use the library defaults. A positive safe integer overrides a default;
|
|
1187
|
-
* `null` disables that configurable limit only. Limits are admission policy,
|
|
1188
|
-
* not guarantees of exact browser-process memory use.
|
|
1189
|
-
*/
|
|
1190
|
-
resourceLimits?: OoxmlResourceLimits;
|
|
1191
|
-
/**
|
|
1192
|
-
* Emit one content-free resource-usage card after load succeeds or fails.
|
|
1193
|
-
* Includes observed archive counters and configured limits, but never source
|
|
1194
|
-
* URLs, part names, document text, passwords, or error messages.
|
|
1195
|
-
*/
|
|
1196
|
-
debug?: boolean;
|
|
1197
|
-
/**
|
|
1198
|
-
* Receive the initial content-free, machine-readable report that powers the
|
|
1199
|
-
* debug card, without enabling console output. After resource options validate,
|
|
1200
|
-
* the callback runs once when the current load settles, including failed loads
|
|
1201
|
-
* for which no renderer instance is returned. The callback is not awaited;
|
|
1202
|
-
* synchronous exceptions and rejected promises are ignored and never change
|
|
1203
|
-
* load results.
|
|
1204
|
-
*
|
|
1205
|
-
* A browser report covers the underlying document/workbook/presentation
|
|
1206
|
-
* factory. It does not wait for a Viewer's first canvas paint; that paint and
|
|
1207
|
-
* later lazy worksheet, slide, image, or media access may increase counters or
|
|
1208
|
-
* surface a separate render error. Successfully opened packages include the
|
|
1209
|
-
* declared package total and source byte size in the report. On a successful
|
|
1210
|
-
* load, call `getResourceMetrics()` on the returned engine or Viewer for a fresh
|
|
1211
|
-
* snapshot that includes subsequently observed lazy package work.
|
|
1212
|
-
*/
|
|
1213
|
-
onResourceMetrics?: (metrics: OoxmlResourceMetrics) => void;
|
|
1214
|
-
/**
|
|
1215
|
-
* Reject the parse request if the parser worker does not answer within this
|
|
1216
|
-
* many milliseconds. Opt-in safety net for a wedged or crashed worker that
|
|
1217
|
-
* would otherwise leave `load()` pending forever. **Default: unlimited** —
|
|
1218
|
-
* parsing a large document with heavy embedded media can legitimately take
|
|
1219
|
-
* tens of seconds, so no timeout is imposed unless you set one. A worker that
|
|
1220
|
-
* throws or fails to load already rejects immediately regardless of this
|
|
1221
|
-
* value; this bound only covers the "silent, never-responds" case.
|
|
1222
|
-
*/
|
|
1223
|
-
workerTimeoutMs?: number;
|
|
1224
|
-
/**
|
|
1225
|
-
* Opt-in OMML equation engine (MathJax + STIX Two Math, ~3 MB). Inject it
|
|
1226
|
-
* **once** here and every render of this document / presentation / workbook
|
|
1227
|
-
* uses it — the same dependency-injection contract across all three formats
|
|
1228
|
-
* and their viewers. Import it from the separate `@silurus/ooxml/math` entry
|
|
1229
|
-
* (`import { math } from '@silurus/ooxml/math'`). Omit it and equations are
|
|
1230
|
-
* skipped and the engine tree-shakes away entirely (no network, no bundle
|
|
1231
|
-
* cost).
|
|
1232
|
-
*/
|
|
1233
|
-
math?: MathRenderer;
|
|
449
|
+
useGoogleFonts?: boolean;
|
|
450
|
+
password?: string;
|
|
451
|
+
wasmUrl?: string | URL;
|
|
452
|
+
maxZipEntryBytes?: number;
|
|
453
|
+
resourceLimits?: OoxmlResourceLimits;
|
|
454
|
+
debug?: boolean;
|
|
455
|
+
onResourceMetrics?: (metrics: OoxmlResourceMetrics) => void;
|
|
456
|
+
workerTimeoutMs?: number;
|
|
457
|
+
math?: MathRenderer;
|
|
1234
458
|
}
|
|
1235
|
-
//#endregion
|
|
1236
|
-
//#region packages/core/src/image/pixel-budget.d.ts
|
|
1237
459
|
type OoxmlDecodedImageLimitMetric = 'image-pixels' | 'active-decoded-bytes';
|
|
1238
|
-
/** Catchable hard-quota crossing for decoded image surfaces. */
|
|
1239
460
|
declare class OoxmlDecodedImageLimitError extends RangeError {
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
461
|
+
readonly metric: OoxmlDecodedImageLimitMetric;
|
|
462
|
+
readonly limit: number;
|
|
463
|
+
readonly observed: number;
|
|
464
|
+
readonly code: 'ooxml-decoded-image-limit';
|
|
465
|
+
constructor(metric: OoxmlDecodedImageLimitMetric, limit: number, observed: number);
|
|
1245
466
|
}
|
|
1246
467
|
declare function isOoxmlDecodedImageLimitError(error: unknown): error is OoxmlDecodedImageLimitError;
|
|
1247
|
-
//#endregion
|
|
1248
|
-
//#region packages/core/src/interaction/hyperlink.d.ts
|
|
1249
|
-
/**
|
|
1250
|
-
* Shared hyperlink model + URL sanitisation for docx / pptx / xlsx (IX1).
|
|
1251
|
-
*
|
|
1252
|
-
* All three formats carry the same two ECMA-376 concepts:
|
|
1253
|
-
* - an **external** hyperlink — an absolute URL resolved from a relationship
|
|
1254
|
-
* part target (`document.xml.rels` for docx §17.16.22, the slide rels for
|
|
1255
|
-
* pptx §21.1.2.3.5, the worksheet rels for xlsx §18.3.1.47), with
|
|
1256
|
-
* `TargetMode="External"`.
|
|
1257
|
-
* - an **internal** hyperlink — a jump within the document itself:
|
|
1258
|
-
* docx `w:anchor` -> a `<w:bookmarkStart w:name>` (§17.16.23), pptx
|
|
1259
|
-
* `action="ppaction://hlinksldjump"` -> a slide, xlsx `location` -> a defined
|
|
1260
|
-
* name or a `Sheet!A1` cell reference.
|
|
1261
|
-
*
|
|
1262
|
-
* The parsers (Rust, one per format) do the format-specific rels lookup and hand
|
|
1263
|
-
* each run / shape / cell a {@link HyperlinkTarget}. Everything downstream — the
|
|
1264
|
-
* text-layer overlay, the viewer default click behaviour, and any integrator
|
|
1265
|
-
* callback — is format-agnostic and consumes this one shape. Keeping the type +
|
|
1266
|
-
* the pure `sanitizeHyperlinkUrl` predicate here (not duplicated per package)
|
|
1267
|
-
* follows the cross-package unification principle: a scheme-allowlist bug fixed
|
|
1268
|
-
* once is fixed everywhere.
|
|
1269
|
-
*/
|
|
1270
|
-
/**
|
|
1271
|
-
* A resolved hyperlink attached to a run, shape, or cell.
|
|
1272
|
-
*
|
|
1273
|
-
* - `external` — `url` is the raw target as authored in the file. It is NOT
|
|
1274
|
-
* guaranteed safe; run it through {@link sanitizeHyperlinkUrl} before
|
|
1275
|
-
* navigating. It is kept verbatim here so an integrator can apply its own
|
|
1276
|
-
* policy (e.g. allow `file:` on a trusted intranet viewer).
|
|
1277
|
-
* - `internal` — `ref` is the in-document destination, verbatim from the file:
|
|
1278
|
-
* docx: the bookmark name (`w:anchor`).
|
|
1279
|
-
* pptx: the internal action (e.g. `ppaction://hlinksldjump`), with the
|
|
1280
|
-
* resolved 0-based `slideIndex` when the rels target names a slide.
|
|
1281
|
-
* xlsx: the `location` string (a defined name or `Sheet1!A1`).
|
|
1282
|
-
*/
|
|
1283
468
|
type HyperlinkTarget = {
|
|
1284
|
-
|
|
1285
|
-
|
|
469
|
+
kind: 'external';
|
|
470
|
+
url: string;
|
|
1286
471
|
} | {
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
472
|
+
kind: 'internal';
|
|
473
|
+
ref: string;
|
|
474
|
+
slideIndex?: number;
|
|
1290
475
|
};
|
|
1291
|
-
/**
|
|
1292
|
-
* The default action a viewer takes for an **external** hyperlink click when
|
|
1293
|
-
* the integrator supplies no `onHyperlinkClick` handler: sanitise the URL and,
|
|
1294
|
-
* if allowed, open it in a new tab with `noopener,noreferrer` so the opened page
|
|
1295
|
-
* gets no `window.opener` handle back into this document. A blocked scheme is a
|
|
1296
|
-
* silent no-op (returns `false`) — the click does nothing rather than navigate
|
|
1297
|
-
* somewhere dangerous.
|
|
1298
|
-
*
|
|
1299
|
-
* Internal targets are intentionally NOT handled here: the in-document jump
|
|
1300
|
-
* (page / slide / cell) is format-specific and lives in each viewer.
|
|
1301
|
-
*
|
|
1302
|
-
* Split out (not inlined in three viewers) so the "open in new tab, drop opener,
|
|
1303
|
-
* refuse unsafe schemes" policy is defined once. `win` is injected for tests;
|
|
1304
|
-
* defaults to the ambient `window`.
|
|
1305
|
-
*
|
|
1306
|
-
* @returns `true` if navigation was initiated, `false` if the URL was blocked.
|
|
1307
|
-
*/
|
|
1308
476
|
declare function openExternalHyperlink(url: string, allowed?: readonly string[], win?: Pick<Window, 'open'> | undefined): boolean;
|
|
1309
477
|
//#endregion
|
|
1310
|
-
//#region dist/.types-work/find-highlight-
|
|
1311
|
-
//#region packages/core/src/autoResize.d.ts
|
|
478
|
+
//#region dist/.types-work/find-highlight-DkZhNxUb.d.ts
|
|
1312
479
|
interface AutoResizeOptions {
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
* observed size when the tab becomes visible again. Default: true.
|
|
1316
|
-
*/
|
|
1317
|
-
pauseWhenHidden?: boolean;
|
|
1318
|
-
}
|
|
1319
|
-
/**
|
|
1320
|
-
* Observe an element's size and invoke a render callback, coalescing bursts to
|
|
1321
|
-
* one call per animation frame and serializing overlapping async renders.
|
|
1322
|
-
*
|
|
1323
|
-
* Framework-agnostic: call from any mount/setup hook and invoke the returned
|
|
1324
|
-
* disposer in the corresponding teardown hook.
|
|
1325
|
-
*
|
|
1326
|
-
* @example
|
|
1327
|
-
* const detach = autoResize(
|
|
1328
|
-
* (width) => pres.renderSlide(canvas, 0, { width }),
|
|
1329
|
-
* canvas,
|
|
1330
|
-
* );
|
|
1331
|
-
* // later
|
|
1332
|
-
* detach();
|
|
1333
|
-
*/
|
|
480
|
+
pauseWhenHidden?: boolean;
|
|
481
|
+
}
|
|
1334
482
|
declare function autoResize(render: (width: number, height: number) => void | Promise<void>, element: Element, opts?: AutoResizeOptions): () => void;
|
|
1335
|
-
//#endregion
|
|
1336
|
-
//#region packages/core/src/interaction/zoomable.d.ts
|
|
1337
|
-
/**
|
|
1338
|
-
* IX9 — the shared zoom API contract for every viewer (DocxViewer, PptxViewer,
|
|
1339
|
-
* DocxScrollViewer, PptxScrollViewer, XlsxViewer).
|
|
1340
|
-
*
|
|
1341
|
-
* This module owns ONLY the pure, DOM-free pieces of the contract: the type
|
|
1342
|
-
* ({@link ZoomableViewer}), the discrete zoom-step ladder ({@link nextZoomStep} /
|
|
1343
|
-
* {@link prevZoomStep}), the fit-to-content scale math ({@link fitScale}), and the
|
|
1344
|
-
* range clamp ({@link clampScale}). Each viewer implements the interface with its
|
|
1345
|
-
* own scale field and re-render path; this keeps ONE definition of "what a zoom
|
|
1346
|
-
* factor means" and "what the +/- steps are" across all five, so a host can drive
|
|
1347
|
-
* any viewer through the same six calls without special-casing the format.
|
|
1348
|
-
*
|
|
1349
|
-
* SCALE SEMANTICS (the contract): a scale of `1` means 100% — the content at its
|
|
1350
|
-
* natural size (a docx page at `widthPt × PT_TO_PX`, a pptx slide at
|
|
1351
|
-
* `slideWidth / EMU_PER_PX`, an xlsx grid at `cellScale` 1). `getScale()` and
|
|
1352
|
-
* `setScale(n)` speak this user-facing factor for EVERY viewer.
|
|
1353
|
-
*
|
|
1354
|
-
* KNOWN FAMILY DIFFERENCE — the INITIAL scale right after load (deliberate,
|
|
1355
|
-
* documented rather than papered over): the single-canvas viewers (DocxViewer /
|
|
1356
|
-
* PptxViewer) and XlsxViewer start at `1` (or the effective factor implied by an
|
|
1357
|
-
* explicit `width` option); the continuous-scroll viewers (DocxScrollViewer /
|
|
1358
|
-
* PptxScrollViewer) AUTO-FIT to the container on first layout, so their
|
|
1359
|
-
* `getScale()` right after load reports the fit-to-width BASE factor (≠ 1 unless
|
|
1360
|
-
* the container happens to match the natural width). The unit is identical — only
|
|
1361
|
-
* the starting point differs, because fit-to-width is the natural resting state
|
|
1362
|
-
* of a continuous document viewer.
|
|
1363
|
-
*
|
|
1364
|
-
* PRE-LOAD `setScale` (family-unified, IX9 F1): a `setScale` called before the
|
|
1365
|
-
* content is loaded / before the layout is established is LATCHED — never
|
|
1366
|
-
* silently dropped — and applied once the viewer establishes its scale (the
|
|
1367
|
-
* single-canvas viewers honour it on the first render; the scroll viewers apply
|
|
1368
|
-
* it right after the base fit establishes, firing `onScaleChange` at application
|
|
1369
|
-
* time). `getScale()` reports the latched factor while it is pending.
|
|
1370
|
-
*
|
|
1371
|
-
* API SHAPE (idiomatic default — the integrator MAY veto; see the IX9 PR): a
|
|
1372
|
-
* six-method surface plus one change notification (`onScaleChange`). Deliberately
|
|
1373
|
-
* NO new UI here — the contract is API only (design decision IX9 §4). Touch-pinch
|
|
1374
|
-
* (IX8) is out of scope.
|
|
1375
|
-
*/
|
|
1376
|
-
/**
|
|
1377
|
-
* The zoom contract every viewer satisfies. All scales are the user-facing factor
|
|
1378
|
-
* where `1` = 100% (see the module note). `fitWidth`/`fitPage` are async because a
|
|
1379
|
-
* fit re-renders at the new scale; the getters/steppers resolve synchronously.
|
|
1380
|
-
*/
|
|
1381
483
|
interface ZoomableViewer {
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
* loaded / the layout is established, the (clamped) factor is LATCHED and
|
|
1390
|
-
* applied once the viewer establishes its scale — family-unified semantics
|
|
1391
|
-
* (IX9 F1): never silently dropped by any viewer. */
|
|
1392
|
-
setScale(scale: number): void | Promise<void>;
|
|
1393
|
-
/** Step up to the next larger rung of the shared zoom ladder (25 %→400 %),
|
|
1394
|
-
* clamped to `zoomMax`. Equivalent to `setScale(nextZoomStep(getScale()))`. */
|
|
1395
|
-
zoomIn(): void | Promise<void>;
|
|
1396
|
-
/** Step down to the next smaller ladder rung, clamped to `zoomMin`. */
|
|
1397
|
-
zoomOut(): void | Promise<void>;
|
|
1398
|
-
/** Fit the content's WIDTH to the container (the common "fit width" / "fit
|
|
1399
|
-
* page width" verb). Sets the scale so one page/slide/sheet-column-run spans
|
|
1400
|
-
* the available width, then re-renders. Resolves once the fit render settles.
|
|
1401
|
-
*
|
|
1402
|
-
* PERSISTENCE is viewer-implementation-dependent (deliberate, by family): the
|
|
1403
|
-
* single-canvas viewers (DocxViewer / PptxViewer) and XlsxViewer apply the fit
|
|
1404
|
-
* ONE-SHOT — they observe no container resizes, so a later resize does NOT
|
|
1405
|
-
* re-fit (call `fitWidth()` again after a layout change). The continuous-
|
|
1406
|
-
* scroll viewers (DocxScrollViewer / PptxScrollViewer) re-fit their width-fit
|
|
1407
|
-
* base on every container resize, so a `fitWidth()` there effectively
|
|
1408
|
-
* PERSISTS across resizes (the resize re-fit preserves the width-fit state). */
|
|
1409
|
-
fitWidth(): void | Promise<void>;
|
|
1410
|
-
/** Fit the WHOLE content (width AND height) inside the container, so an entire
|
|
1411
|
-
* page/slide is visible without scrolling. Sets the scale to the smaller of the
|
|
1412
|
-
* width- and height-fit factors, then re-renders.
|
|
1413
|
-
*
|
|
1414
|
-
* PERSISTENCE is viewer-implementation-dependent, and — unlike `fitWidth` —
|
|
1415
|
-
* a page fit does NOT persist across container resizes on ANY viewer: the
|
|
1416
|
-
* single-canvas viewers and XlsxViewer observe no resizes at all (one-shot),
|
|
1417
|
-
* and the continuous-scroll viewers' resize handler re-applies the WIDTH fit
|
|
1418
|
-
* (preserving the zoom multiplier), not the page fit. Re-invoke `fitPage()`
|
|
1419
|
-
* after a layout change to re-fit. */
|
|
1420
|
-
fitPage(): void | Promise<void>;
|
|
1421
|
-
}
|
|
1422
|
-
/** Options for {@link findMatches}. */
|
|
484
|
+
getScale(): number;
|
|
485
|
+
setScale(scale: number): void | Promise<void>;
|
|
486
|
+
zoomIn(): void | Promise<void>;
|
|
487
|
+
zoomOut(): void | Promise<void>;
|
|
488
|
+
fitWidth(): void | Promise<void>;
|
|
489
|
+
fitPage(): void | Promise<void>;
|
|
490
|
+
}
|
|
1423
491
|
interface FindMatchesOptions {
|
|
1424
|
-
|
|
1425
|
-
* Match case exactly. Default `false` (case-insensitive, like a browser's
|
|
1426
|
-
* find-in-page). IX2 default — an integrator can pass `true`.
|
|
1427
|
-
*/
|
|
1428
|
-
caseSensitive?: boolean;
|
|
492
|
+
caseSensitive?: boolean;
|
|
1429
493
|
}
|
|
1430
|
-
//#endregion
|
|
1431
|
-
//#region packages/core/src/search/find-match.d.ts
|
|
1432
|
-
/**
|
|
1433
|
-
* IX2 public find-result shape, shared by all three viewers.
|
|
1434
|
-
*
|
|
1435
|
-
* `findText` returns an ordered list of {@link FindMatch}. Every match carries
|
|
1436
|
-
* its ordinal position (`matchIndex`, 0-based, document order — the same index
|
|
1437
|
-
* `findNext` / `findPrev` cycle through), the matched `text`, and a
|
|
1438
|
-
* format-specific `location`. The location is where the three formats
|
|
1439
|
-
* legitimately differ — a docx match lives on a page, a pptx match on a slide,
|
|
1440
|
-
* an xlsx match in a sheet cell — so `FindMatch` is generic over it rather than
|
|
1441
|
-
* forcing an artificial common shape. Each viewer instantiates it with its own
|
|
1442
|
-
* location type:
|
|
1443
|
-
*
|
|
1444
|
-
* - `DocxViewer.findText` → `FindMatch<DocxMatchLocation>` ({ page })
|
|
1445
|
-
* - `PptxViewer.findText` → `FindMatch<PptxMatchLocation>` ({ slide })
|
|
1446
|
-
* - `XlsxViewer.findText` → `FindMatch<XlsxMatchLocation>` ({ sheet, ref, … })
|
|
1447
|
-
*
|
|
1448
|
-
* The generic default is `unknown` so `FindMatch` can be referenced without a
|
|
1449
|
-
* type argument (e.g. in generic UI code) while each viewer's return type stays
|
|
1450
|
-
* precise.
|
|
1451
|
-
*/
|
|
1452
494
|
interface FindMatch<Loc = unknown> {
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
matchIndex: number;
|
|
1457
|
-
/** The text that matched (the query as it appears in the document — its
|
|
1458
|
-
* original case, not the folded form used for case-insensitive matching). */
|
|
1459
|
-
text: string;
|
|
1460
|
-
/** Where the match is, in the format's own coordinates. */
|
|
1461
|
-
location: Loc;
|
|
495
|
+
matchIndex: number;
|
|
496
|
+
text: string;
|
|
497
|
+
location: Loc;
|
|
1462
498
|
}
|
|
1463
|
-
//#endregion
|
|
1464
|
-
//#region packages/core/src/search/find-highlight.d.ts
|
|
1465
|
-
/**
|
|
1466
|
-
* CSS colours used by in-document search overlays.
|
|
1467
|
-
*
|
|
1468
|
-
* The values are applied as the overlay backgrounds verbatim. Use an alpha
|
|
1469
|
-
* colour (`rgba(...)`, 8-digit hex, or `color-mix(...)`) when the rendered text
|
|
1470
|
-
* should remain visible through the highlight.
|
|
1471
|
-
*/
|
|
1472
499
|
interface FindHighlightColors {
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
/** Background for the match selected by findNext/findPrev. */
|
|
1476
|
-
active?: string;
|
|
500
|
+
match?: string;
|
|
501
|
+
active?: string;
|
|
1477
502
|
}
|
|
1478
503
|
//#endregion
|
|
1479
|
-
//#region dist/.types-work/xlsx-
|
|
1480
|
-
//#region packages/xlsx/src/types.d.ts
|
|
504
|
+
//#region dist/.types-work/xlsx-D1NhipZN.d.ts
|
|
1481
505
|
interface Workbook {
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
* parser JSON when false (default 1900 date system). */
|
|
1487
|
-
date1904?: boolean;
|
|
1488
|
-
/** #773 partial degradation: a WORKBOOK-LEVEL degradation that leaves every
|
|
1489
|
-
* sheet openable. Set when a shared workbook part was PRESENT but corrupt —
|
|
1490
|
-
* most commonly `xl/sharedStrings.xml` (§18.4.9): a broken shared-string table
|
|
1491
|
-
* silently blanks every string cell across ALL sheets, so unlike a per-sheet
|
|
1492
|
-
* break it can't be attributed to one placeholder sheet. Tagged with the
|
|
1493
|
-
* offending part (e.g. `"xl/sharedStrings.xml: <detail>"`) so the loss is
|
|
1494
|
-
* surfaced instead of silent, while every sheet still renders its non-string
|
|
1495
|
-
* content. Absent (`undefined`) when every shared part read cleanly. Also set
|
|
1496
|
-
* (`"(zip container): <detail>"`) for a whole-container degradation (#774). */
|
|
1497
|
-
parseError?: string;
|
|
1498
|
-
}
|
|
1499
|
-
/** Sheet visibility (`<sheet state>`, ECMA-376 §18.2.19 `ST_SheetState`). */
|
|
506
|
+
sheets: SheetMeta[];
|
|
507
|
+
date1904?: boolean;
|
|
508
|
+
parseError?: string;
|
|
509
|
+
}
|
|
1500
510
|
type SheetVisibility = 'visible' | 'hidden' | 'veryHidden';
|
|
1501
511
|
interface SheetMeta {
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
* Absent when the sheet declares no tab color. */
|
|
1508
|
-
tabColor?: string | null;
|
|
1509
|
-
/** Sheet visibility (`<sheet state>`, ECMA-376 §18.2.19 `ST_SheetState`).
|
|
1510
|
-
* Absent ⇒ visible. `'veryHidden'` sheets are revealable only
|
|
1511
|
-
* programmatically in Excel. Read via `XlsxWorkbook.isHidden` /
|
|
1512
|
-
* `XlsxWorkbook.sheetVisibility`. */
|
|
1513
|
-
visibility?: 'hidden' | 'veryHidden';
|
|
512
|
+
name: string;
|
|
513
|
+
sheetId: number;
|
|
514
|
+
rId: string;
|
|
515
|
+
tabColor?: string | null;
|
|
516
|
+
visibility?: 'hidden' | 'veryHidden';
|
|
1514
517
|
}
|
|
1515
518
|
interface MergeCell {
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
519
|
+
top: number;
|
|
520
|
+
left: number;
|
|
521
|
+
bottom: number;
|
|
522
|
+
right: number;
|
|
1520
523
|
}
|
|
1521
524
|
interface Worksheet {
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
rightToLeft?: boolean;
|
|
1559
|
-
/** Outline display flags from `<sheetPr><outlinePr>` (ECMA-376 §18.3.1.61).
|
|
1560
|
-
* Absent when the sheet declares no `<outlinePr>`; consumers apply the
|
|
1561
|
-
* schema defaults (`summaryBelow` / `summaryRight` both `true`). Decides
|
|
1562
|
-
* which side of a group the summary row/column (and its +/- toggle) sits. */
|
|
1563
|
-
outlinePr?: OutlinePr;
|
|
1564
|
-
/** Sheet tab color (ECMA-376 §18.3.1.79). */
|
|
1565
|
-
tabColor?: string | null;
|
|
1566
|
-
/** AutoFilter header range (ECMA-376 §18.3.1.2). */
|
|
1567
|
-
autoFilter?: CellRange$1 | null;
|
|
1568
|
-
/** Hyperlinks in this worksheet (ECMA-376 §18.3.1.47). */
|
|
1569
|
-
hyperlinks?: Hyperlink[];
|
|
1570
|
-
/** A1-style cell refs of commented cells (ECMA-376 §18.7.3). Rendered as a
|
|
1571
|
-
* small red triangle in each cell's top-right corner. */
|
|
1572
|
-
commentRefs?: string[];
|
|
1573
|
-
/** Full-fidelity comment bodies (cell ref + author + plain text) for every
|
|
1574
|
-
* `<comment>` in `xl/commentsN.xml` (ECMA-376 §18.7). Parallel to
|
|
1575
|
-
* {@link commentRefs} (one entry per ref). Consume this to read the note
|
|
1576
|
-
* text; the renderer uses {@link commentRefs} for the red indicator and the
|
|
1577
|
-
* viewer surfaces these bodies in an Excel-style hover popup. */
|
|
1578
|
-
comments?: XlsxComment[];
|
|
1579
|
-
/** Data-validation rules on this sheet (ECMA-376 §18.3.1.32–33). Exposed for
|
|
1580
|
-
* tooling. The viewer draws a list-dropdown arrow on the active cell when the
|
|
1581
|
-
* selection intersects a `list`-type rule's `sqref` (display only — opening
|
|
1582
|
-
* the list / picking a value is out of scope for a viewer). */
|
|
1583
|
-
dataValidations?: DataValidation[];
|
|
1584
|
-
/** Defined names in scope for this sheet (ECMA-376 §18.2.5). Used by
|
|
1585
|
-
* conditional-formatting `expression` rules that call named ranges
|
|
1586
|
-
* (e.g. `task_start`, `today`). */
|
|
1587
|
-
definedNames?: DefinedName[];
|
|
1588
|
-
/** Excel Tables on this sheet (ECMA-376 §18.5). The renderer overlays a
|
|
1589
|
-
* built-in style (bold header, banded rows) on the given ranges. */
|
|
1590
|
-
tables?: TableInfo[];
|
|
1591
|
-
/** Pivot / table slicers (Office 2010+ extension). Each anchor carries a
|
|
1592
|
-
* caption and the saved item list (with selection flags) so the renderer
|
|
1593
|
-
* can draw a static button bank without the live pivot engine. */
|
|
1594
|
-
slicers?: SlicerAnchor[];
|
|
1595
|
-
/** Metadata-only pivot facts (ECMA-376 §18.10). Consumers must treat saved
|
|
1596
|
-
* worksheet cell values and styles as authoritative. */
|
|
1597
|
-
pivotTables?: PivotTableMetadata[];
|
|
1598
|
-
/** Pivot parts skipped because their XML, identity, or location was invalid. */
|
|
1599
|
-
pivotDiagnostics?: PivotDiagnostic[];
|
|
1600
|
-
/** Sparkline groups (Office 2010+ extension `x14:sparklineGroup`).
|
|
1601
|
-
* Cross-sheet `<xm:f>` data references are resolved to numeric values at
|
|
1602
|
-
* parse time, and theme + tint colors are flattened to `#RRGGBB`. */
|
|
1603
|
-
sparklineGroups?: SparklineGroup[];
|
|
1604
|
-
/** Family name of the workbook's Normal-style font, resolved by the parser
|
|
1605
|
-
* from `<cellStyleXfs>[0].fontId` → `<fonts>[fontId].name.val`. The
|
|
1606
|
-
* renderer uses this together with `defaultFontSize` to compute the Max
|
|
1607
|
-
* Digit Width for column-width pixel conversion (ECMA-376 §18.3.1.13).
|
|
1608
|
-
* Workbook-wide value, denormalized onto every worksheet. */
|
|
1609
|
-
defaultFontFamily?: string;
|
|
1610
|
-
/** Point size of the workbook's Normal-style font (`<fonts>[N].sz.val`). */
|
|
1611
|
-
defaultFontSize?: number;
|
|
1612
|
-
/** Workbook date system (`<workbookPr date1904>`, ECMA-376 §18.2.28),
|
|
1613
|
-
* denormalized onto every worksheet by the parser so the cell formatter can
|
|
1614
|
-
* resolve serial dates (§18.17.4.1) without a workbook back-reference.
|
|
1615
|
-
* `true` = 1904 date system. Omitted (⇒ false) for the default 1900 system. */
|
|
1616
|
-
date1904?: boolean;
|
|
1617
|
-
/** RB7 partial degradation: set when THIS sheet's part could not be
|
|
1618
|
-
* read/parsed. The workbook still opens with the OTHER sheets intact; this one
|
|
1619
|
-
* is an empty placeholder (`rows` empty) whose `parseError` names the offending
|
|
1620
|
-
* part (e.g. `"xl/worksheets/sheet3.xml: <detail>"`). Absent (`undefined`) for
|
|
1621
|
-
* every healthy sheet. The renderer paints a visible error overlay. */
|
|
1622
|
-
parseError?: string;
|
|
525
|
+
name: string;
|
|
526
|
+
rows: Row[];
|
|
527
|
+
colWidths: Record<number, number>;
|
|
528
|
+
rowHeights: Record<number, number>;
|
|
529
|
+
colOutlineLevels?: Record<number, number>;
|
|
530
|
+
colCollapsed?: Record<number, boolean>;
|
|
531
|
+
colHidden?: Record<number, boolean>;
|
|
532
|
+
defaultColWidth: number;
|
|
533
|
+
defaultRowHeight: number;
|
|
534
|
+
mergeCells: MergeCell[];
|
|
535
|
+
freezeRows: number;
|
|
536
|
+
freezeCols: number;
|
|
537
|
+
conditionalFormats: ConditionalFormat[];
|
|
538
|
+
images: ImageAnchor[];
|
|
539
|
+
charts: ChartAnchor[];
|
|
540
|
+
shapeGroups?: ShapeAnchor[];
|
|
541
|
+
showZeros?: boolean;
|
|
542
|
+
showGridlines?: boolean;
|
|
543
|
+
rightToLeft?: boolean;
|
|
544
|
+
outlinePr?: OutlinePr;
|
|
545
|
+
tabColor?: string | null;
|
|
546
|
+
autoFilter?: CellRange$1 | null;
|
|
547
|
+
hyperlinks?: Hyperlink[];
|
|
548
|
+
commentRefs?: string[];
|
|
549
|
+
comments?: XlsxComment[];
|
|
550
|
+
dataValidations?: DataValidation[];
|
|
551
|
+
definedNames?: DefinedName[];
|
|
552
|
+
tables?: TableInfo[];
|
|
553
|
+
slicers?: SlicerAnchor[];
|
|
554
|
+
pivotTables?: PivotTableMetadata[];
|
|
555
|
+
pivotDiagnostics?: PivotDiagnostic[];
|
|
556
|
+
sparklineGroups?: SparklineGroup[];
|
|
557
|
+
defaultFontFamily?: string;
|
|
558
|
+
defaultFontSize?: number;
|
|
559
|
+
date1904?: boolean;
|
|
560
|
+
parseError?: string;
|
|
1623
561
|
}
|
|
1624
562
|
interface PivotTableMetadata {
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
cacheDefinitionPart?: string;
|
|
1639
|
-
cacheSource?: PivotCacheSource;
|
|
1640
|
-
status: PivotMetadataStatus;
|
|
1641
|
-
extensionUris?: string[];
|
|
563
|
+
name: string;
|
|
564
|
+
cacheId: number;
|
|
565
|
+
location: PivotLocation;
|
|
566
|
+
rowFields: number[];
|
|
567
|
+
columnFields: number[];
|
|
568
|
+
pageFields: PivotPageField[];
|
|
569
|
+
dataFields: PivotDataField[];
|
|
570
|
+
refreshOnLoad?: boolean;
|
|
571
|
+
cacheInvalid?: boolean;
|
|
572
|
+
cacheDefinitionPart?: string;
|
|
573
|
+
cacheSource?: PivotCacheSource;
|
|
574
|
+
status: PivotMetadataStatus;
|
|
575
|
+
extensionUris?: string[];
|
|
1642
576
|
}
|
|
1643
577
|
interface PivotLocation extends CellRange$1 {
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
578
|
+
firstHeaderRow: number;
|
|
579
|
+
firstDataRow: number;
|
|
580
|
+
firstDataCol: number;
|
|
1647
581
|
}
|
|
1648
582
|
interface PivotPageField {
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
583
|
+
field: number;
|
|
584
|
+
item?: number;
|
|
585
|
+
name?: string;
|
|
1652
586
|
}
|
|
1653
587
|
interface PivotDataField {
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
588
|
+
field: number;
|
|
589
|
+
subtotal?: string;
|
|
590
|
+
rawSubtotal?: string;
|
|
591
|
+
name?: string;
|
|
1658
592
|
}
|
|
1659
593
|
type PivotCacheSource = {
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
594
|
+
kind: 'worksheet';
|
|
595
|
+
sheet?: string;
|
|
596
|
+
reference?: string;
|
|
597
|
+
name?: string;
|
|
598
|
+
relationshipId?: string;
|
|
1665
599
|
} | {
|
|
1666
|
-
|
|
600
|
+
kind: 'external';
|
|
1667
601
|
} | {
|
|
1668
|
-
|
|
602
|
+
kind: 'consolidation';
|
|
1669
603
|
} | {
|
|
1670
|
-
|
|
604
|
+
kind: 'scenario';
|
|
1671
605
|
};
|
|
1672
606
|
type PivotMetadataStatus = {
|
|
1673
|
-
|
|
607
|
+
state: 'complete';
|
|
1674
608
|
} | {
|
|
1675
|
-
|
|
1676
|
-
|
|
609
|
+
state: 'partial';
|
|
610
|
+
reasons: PivotPartialReason[];
|
|
1677
611
|
};
|
|
1678
612
|
type PivotPartialReason = {
|
|
1679
|
-
|
|
613
|
+
kind: 'missingCacheRelationship';
|
|
1680
614
|
} | {
|
|
1681
|
-
|
|
615
|
+
kind: 'malformedCacheRelationships';
|
|
1682
616
|
} | {
|
|
1683
|
-
|
|
617
|
+
kind: 'unreadableCacheRelationships';
|
|
1684
618
|
} | {
|
|
1685
|
-
|
|
619
|
+
kind: 'externalCacheRelationship';
|
|
1686
620
|
} | {
|
|
1687
|
-
|
|
621
|
+
kind: 'ambiguousCacheRelationship';
|
|
1688
622
|
} | {
|
|
1689
|
-
|
|
623
|
+
kind: 'unreadableCacheDefinition';
|
|
1690
624
|
} | {
|
|
1691
|
-
|
|
625
|
+
kind: 'malformedCacheDefinition';
|
|
1692
626
|
} | {
|
|
1693
|
-
|
|
1694
|
-
|
|
627
|
+
kind: 'malformedField';
|
|
628
|
+
field: string;
|
|
1695
629
|
} | {
|
|
1696
|
-
|
|
1697
|
-
|
|
630
|
+
kind: 'unsupportedCacheSource';
|
|
631
|
+
sourceType: string;
|
|
1698
632
|
} | {
|
|
1699
|
-
|
|
633
|
+
kind: 'unresolvedWorksheetSourceRelationship';
|
|
1700
634
|
} | {
|
|
1701
|
-
|
|
1702
|
-
|
|
635
|
+
kind: 'unsupportedSemanticFeature';
|
|
636
|
+
feature: string;
|
|
1703
637
|
};
|
|
1704
638
|
interface PivotDiagnostic {
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
639
|
+
part: string;
|
|
640
|
+
reason: {
|
|
641
|
+
kind: 'unreadableWorksheetRelationships';
|
|
642
|
+
} | {
|
|
643
|
+
kind: 'malformedWorksheetRelationships';
|
|
644
|
+
} | {
|
|
645
|
+
kind: 'malformedPivotRelationship';
|
|
646
|
+
} | {
|
|
647
|
+
kind: 'externalPivotRelationship';
|
|
648
|
+
} | {
|
|
649
|
+
kind: 'unreadablePart';
|
|
650
|
+
} | {
|
|
651
|
+
kind: 'malformedXml';
|
|
652
|
+
} | {
|
|
653
|
+
kind: 'missingIdentity';
|
|
654
|
+
} | {
|
|
655
|
+
kind: 'invalidLocation';
|
|
656
|
+
};
|
|
1723
657
|
}
|
|
1724
658
|
interface SparklineGroup {
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
colorMarkers?: string;
|
|
1749
|
-
colorFirst?: string;
|
|
1750
|
-
colorLast?: string;
|
|
1751
|
-
colorHigh?: string;
|
|
1752
|
-
colorLow?: string;
|
|
1753
|
-
sparklines: Sparkline[];
|
|
659
|
+
kind: 'line' | 'column' | 'stem';
|
|
660
|
+
markers: boolean;
|
|
661
|
+
high: boolean;
|
|
662
|
+
low: boolean;
|
|
663
|
+
first: boolean;
|
|
664
|
+
last: boolean;
|
|
665
|
+
negative: boolean;
|
|
666
|
+
displayXAxis: boolean;
|
|
667
|
+
displayEmptyCellsAs: string;
|
|
668
|
+
minAxisType: string;
|
|
669
|
+
maxAxisType: string;
|
|
670
|
+
manualMin?: number;
|
|
671
|
+
manualMax?: number;
|
|
672
|
+
lineWeight: number;
|
|
673
|
+
colorSeries?: string;
|
|
674
|
+
colorNegative?: string;
|
|
675
|
+
colorAxis?: string;
|
|
676
|
+
colorMarkers?: string;
|
|
677
|
+
colorFirst?: string;
|
|
678
|
+
colorLast?: string;
|
|
679
|
+
colorHigh?: string;
|
|
680
|
+
colorLow?: string;
|
|
681
|
+
sparklines: Sparkline[];
|
|
1754
682
|
}
|
|
1755
683
|
interface Sparkline {
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
col: number;
|
|
1760
|
-
/** Numeric values resolved from the `<xm:f>` range. `null` for empty
|
|
1761
|
-
* / non-numeric cells; honored as gaps at render time. */
|
|
1762
|
-
values: (number | null)[];
|
|
684
|
+
row: number;
|
|
685
|
+
col: number;
|
|
686
|
+
values: (number | null)[];
|
|
1763
687
|
}
|
|
1764
688
|
interface SlicerAnchor {
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
style?: SlicerStyle;
|
|
689
|
+
fromCol: number;
|
|
690
|
+
fromColOff: number;
|
|
691
|
+
fromRow: number;
|
|
692
|
+
fromRowOff: number;
|
|
693
|
+
toCol: number;
|
|
694
|
+
toColOff: number;
|
|
695
|
+
toRow: number;
|
|
696
|
+
toRowOff: number;
|
|
697
|
+
caption: string;
|
|
698
|
+
items: SlicerItem[];
|
|
699
|
+
style?: SlicerStyle;
|
|
1777
700
|
}
|
|
1778
701
|
interface SlicerItem {
|
|
1779
|
-
|
|
1780
|
-
|
|
702
|
+
name: string;
|
|
703
|
+
selected: boolean;
|
|
1781
704
|
}
|
|
1782
705
|
interface SlicerStyle {
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
706
|
+
whole?: SlicerElementStyle;
|
|
707
|
+
header?: SlicerElementStyle;
|
|
708
|
+
selectedItemWithData?: SlicerElementStyle;
|
|
709
|
+
unselectedItemWithData?: SlicerElementStyle;
|
|
1787
710
|
}
|
|
1788
711
|
interface SlicerElementStyle {
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
712
|
+
fontColor?: string;
|
|
713
|
+
fontSize?: number;
|
|
714
|
+
fontBold?: boolean;
|
|
715
|
+
fontFamily?: string;
|
|
716
|
+
fillColor?: string;
|
|
717
|
+
borderColor?: string;
|
|
1795
718
|
}
|
|
1796
719
|
interface TableInfo {
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
* the table as a base layer. Undefined for built-in style names. */
|
|
1817
|
-
wholeTableDxf?: number;
|
|
1818
|
-
/** Dxf index for the `headerRow` element of a custom `<tableStyle>` —
|
|
1819
|
-
* provides header background, font color/weight, and vertical separators. */
|
|
1820
|
-
headerRowDxf?: number;
|
|
1821
|
-
/** Dxf index for the `totalRow` element (ECMA-376 §18.18.93). */
|
|
1822
|
-
totalRowDxf?: number;
|
|
1823
|
-
/** Dxf index for the `firstColumn` element. */
|
|
1824
|
-
firstColumnDxf?: number;
|
|
1825
|
-
/** Dxf index for the `lastColumn` element. */
|
|
1826
|
-
lastColumnDxf?: number;
|
|
1827
|
-
/** Dxf index for `firstRowStripe` (band1 horizontal) — odd banded-row stripe. */
|
|
1828
|
-
band1HorizontalDxf?: number;
|
|
1829
|
-
/** Dxf index for `secondRowStripe` (band2 horizontal) — even banded-row stripe. */
|
|
1830
|
-
band2HorizontalDxf?: number;
|
|
1831
|
-
/** Per-column DXF references (ECMA-376 §18.5.1.3 `tableColumn`). Index by
|
|
1832
|
-
* `cellCol - range.left`. The renderer can use these to apply column-level
|
|
1833
|
-
* overlays for named-style tables; for files where Excel pre-bakes the
|
|
1834
|
-
* column DXF result into the cell `xf` (the common case), reading `xf` is
|
|
1835
|
-
* sufficient and these fields are informational. */
|
|
1836
|
-
columns: TableColumnInfo[];
|
|
1837
|
-
}
|
|
1838
|
-
/** Per-column DXF references inside a `<table>` element
|
|
1839
|
-
* (ECMA-376 §18.5.1.3 `tableColumn`). */
|
|
720
|
+
range: CellRange$1;
|
|
721
|
+
styleName: string;
|
|
722
|
+
headerRowCount: number;
|
|
723
|
+
totalsRowCount: number;
|
|
724
|
+
showRowStripes: boolean;
|
|
725
|
+
showColumnStripes: boolean;
|
|
726
|
+
showFirstColumn: boolean;
|
|
727
|
+
showLastColumn: boolean;
|
|
728
|
+
accentColor: string;
|
|
729
|
+
isCustom?: boolean;
|
|
730
|
+
wholeTableDxf?: number;
|
|
731
|
+
headerRowDxf?: number;
|
|
732
|
+
totalRowDxf?: number;
|
|
733
|
+
firstColumnDxf?: number;
|
|
734
|
+
lastColumnDxf?: number;
|
|
735
|
+
band1HorizontalDxf?: number;
|
|
736
|
+
band2HorizontalDxf?: number;
|
|
737
|
+
columns: TableColumnInfo[];
|
|
738
|
+
}
|
|
1840
739
|
interface TableColumnInfo {
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
headerRowDxfId?: number;
|
|
1845
|
-
/** `<tableColumn totalsRowDxfId>` — applied to the totals cell of this column. */
|
|
1846
|
-
totalsRowDxfId?: number;
|
|
740
|
+
dataDxfId?: number;
|
|
741
|
+
headerRowDxfId?: number;
|
|
742
|
+
totalsRowDxfId?: number;
|
|
1847
743
|
}
|
|
1848
744
|
interface DefinedName {
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
}
|
|
1852
|
-
/** One cell comment. Sourced from the classic notes file `xl/commentsN.xml`
|
|
1853
|
-
* (ECMA-376 §18.7) when present, otherwise from the Office-365 threaded
|
|
1854
|
-
* comments part `xl/threadedComments/` (MS-XLSX schema
|
|
1855
|
-
* `…/spreadsheetml/2018/threadedcomments`, `personId` resolved via
|
|
1856
|
-
* `xl/persons/`). `text` is the joined plain text — every `<r><t>` run for
|
|
1857
|
-
* classic notes, every reply in the thread (newline-joined) for threaded
|
|
1858
|
-
* comments; rich-text formatting is dropped. 1:1 with the Rust `XlsxComment`
|
|
1859
|
-
* (serde camelCase). */
|
|
745
|
+
name: string;
|
|
746
|
+
formula: string;
|
|
747
|
+
}
|
|
1860
748
|
interface XlsxComment {
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
author?: string;
|
|
1866
|
-
/** Concatenated plain text of every run / threaded reply. */
|
|
1867
|
-
text: string;
|
|
1868
|
-
}
|
|
1869
|
-
/** One `<dataValidation>` rule (ECMA-376 §18.3.1.33). `type` is the constraint
|
|
1870
|
-
* class (`list` | `whole` | `decimal` | `date` | `time` | `textLength` |
|
|
1871
|
-
* `custom`); `operator` qualifies it (`between` | `notBetween` | `equal` | …).
|
|
1872
|
-
* `formula1` / `formula2` are the operands (for `list`, `formula1` is the
|
|
1873
|
-
* comma-separated literal list or a range/named reference). 1:1 with the Rust
|
|
1874
|
-
* `DataValidation` (serde camelCase). */
|
|
749
|
+
cellRef: string;
|
|
750
|
+
author?: string;
|
|
751
|
+
text: string;
|
|
752
|
+
}
|
|
1875
753
|
interface DataValidation {
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
errorTitle?: string;
|
|
1888
|
-
errorMessage?: string;
|
|
1889
|
-
}
|
|
1890
|
-
/**
|
|
1891
|
-
* @deprecated Chart series are now the core {@link ChartModel}'s `ChartSeries`.
|
|
1892
|
-
* Kept as an alias for backward-compatible imports; scheduled for removal in a
|
|
1893
|
-
* future breaking release.
|
|
1894
|
-
*/
|
|
754
|
+
sqref: string;
|
|
755
|
+
validationType?: string;
|
|
756
|
+
operator?: string;
|
|
757
|
+
formula1?: string;
|
|
758
|
+
formula2?: string;
|
|
759
|
+
allowBlank?: boolean;
|
|
760
|
+
promptTitle?: string;
|
|
761
|
+
prompt?: string;
|
|
762
|
+
errorTitle?: string;
|
|
763
|
+
errorMessage?: string;
|
|
764
|
+
}
|
|
1895
765
|
type XlsxChartSeries = ChartSeries;
|
|
1896
|
-
/** @deprecated Use `ChartSeriesDataLabels` from @silurus/ooxml-core. Scheduled
|
|
1897
|
-
* for removal in a future breaking release. */
|
|
1898
766
|
type SeriesDataLabels = ChartSeriesDataLabels;
|
|
1899
|
-
/** @deprecated Use `ChartDataLabelOverride` from @silurus/ooxml-core. Scheduled
|
|
1900
|
-
* for removal in a future breaking release. */
|
|
1901
767
|
type DataLabelOverride = ChartDataLabelOverride;
|
|
1902
|
-
/** @deprecated Use `ChartDataPointOverride` from @silurus/ooxml-core. Scheduled
|
|
1903
|
-
* for removal in a future breaking release. */
|
|
1904
768
|
type DataPointOverride = ChartDataPointOverride;
|
|
1905
|
-
/** @deprecated Use `ChartErrBars` from @silurus/ooxml-core. Scheduled for
|
|
1906
|
-
* removal in a future breaking release. */
|
|
1907
769
|
type ErrBars = ChartErrBars;
|
|
1908
|
-
/** @deprecated Use `ChartManualLayout` from @silurus/ooxml-core. Scheduled for
|
|
1909
|
-
* removal in a future breaking release. */
|
|
1910
770
|
type ManualLayout = ChartManualLayout;
|
|
1911
771
|
interface ChartAnchor {
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
* Rust parser emits. The parser adapts its internal parse structure into
|
|
1922
|
-
* `ChartModel` (formerly the TS `adaptChartData`); this is passed straight
|
|
1923
|
-
* to `renderChart`. */
|
|
1924
|
-
chart: ChartModel;
|
|
772
|
+
fromCol: number;
|
|
773
|
+
fromColOff: number;
|
|
774
|
+
fromRow: number;
|
|
775
|
+
fromRowOff: number;
|
|
776
|
+
toCol: number;
|
|
777
|
+
toColOff: number;
|
|
778
|
+
toRow: number;
|
|
779
|
+
toRowOff: number;
|
|
780
|
+
chart: ChartModel;
|
|
1925
781
|
}
|
|
1926
782
|
interface ShapeAnchor {
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
editAs?: string;
|
|
1940
|
-
/** Saved EMU extent of the top-level grpSp (or the stand-alone sp/pic).
|
|
1941
|
-
* Authoritative when `editAs === "oneCell"`. 0 = unavailable. */
|
|
1942
|
-
nativeExtCx: number;
|
|
1943
|
-
nativeExtCy: number;
|
|
1944
|
-
shapes: ShapeInfo[];
|
|
783
|
+
fromCol: number;
|
|
784
|
+
fromColOff: number;
|
|
785
|
+
fromRow: number;
|
|
786
|
+
fromRowOff: number;
|
|
787
|
+
toCol: number;
|
|
788
|
+
toColOff: number;
|
|
789
|
+
toRow: number;
|
|
790
|
+
toRowOff: number;
|
|
791
|
+
editAs?: string;
|
|
792
|
+
nativeExtCx: number;
|
|
793
|
+
nativeExtCy: number;
|
|
794
|
+
shapes: ShapeInfo[];
|
|
1945
795
|
}
|
|
1946
796
|
interface ShapeInfo {
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
/** Stroke width in EMU. 0 = no stroke. */
|
|
1960
|
-
strokeWidth: number;
|
|
1961
|
-
geom: ShapeGeom;
|
|
1962
|
-
/** Optional text body (`<xdr:txBody>`, ECMA-376 §20.5.2.34). Present for
|
|
1963
|
-
* text boxes (`txBox="1"`) and any other shape that carries visible text. */
|
|
1964
|
-
text?: ShapeText;
|
|
797
|
+
x: number;
|
|
798
|
+
y: number;
|
|
799
|
+
w: number;
|
|
800
|
+
h: number;
|
|
801
|
+
rot: number;
|
|
802
|
+
flipH?: boolean;
|
|
803
|
+
flipV?: boolean;
|
|
804
|
+
fillColor?: string;
|
|
805
|
+
strokeColor?: string;
|
|
806
|
+
strokeWidth: number;
|
|
807
|
+
geom: ShapeGeom;
|
|
808
|
+
text?: ShapeText;
|
|
1965
809
|
}
|
|
1966
810
|
interface ShapeText {
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
* `fontScale="62500"`). Null/absent when unset. Modeled for parity with
|
|
1978
|
-
* pptx; the xlsx renderer does not currently apply it. */
|
|
1979
|
-
fontScale?: number | null;
|
|
1980
|
-
/** `<a:normAutofit@lnSpcReduction>` — stored line-spacing reduction fraction
|
|
1981
|
-
* (e.g. 0.20 for `lnSpcReduction="20000"`). Null/absent when unset. */
|
|
1982
|
-
lnSpcReduction?: number | null;
|
|
1983
|
-
/** `<a:bodyPr@lIns>` — left text inset in EMU (ECMA-376 §21.1.2.1.1). Always
|
|
1984
|
-
* present; the spec default 91440 EMU (7.2 pt) when the attribute is absent.
|
|
1985
|
-
* Same EMU convention as `ShapeParagraph.marL`. */
|
|
1986
|
-
lIns: number;
|
|
1987
|
-
/** `<a:bodyPr@tIns>` — top text inset in EMU. Default 45720 (3.6 pt). */
|
|
1988
|
-
tIns: number;
|
|
1989
|
-
/** `<a:bodyPr@rIns>` — right text inset in EMU. Default 91440 (7.2 pt). */
|
|
1990
|
-
rIns: number;
|
|
1991
|
-
/** `<a:bodyPr@bIns>` — bottom text inset in EMU. Default 45720 (3.6 pt). */
|
|
1992
|
-
bIns: number;
|
|
1993
|
-
paragraphs: ShapeParagraph[];
|
|
811
|
+
anchor: string;
|
|
812
|
+
wrap: string;
|
|
813
|
+
autoFit?: string;
|
|
814
|
+
fontScale?: number | null;
|
|
815
|
+
lnSpcReduction?: number | null;
|
|
816
|
+
lIns: number;
|
|
817
|
+
tIns: number;
|
|
818
|
+
rIns: number;
|
|
819
|
+
bIns: number;
|
|
820
|
+
paragraphs: ShapeParagraph[];
|
|
1994
821
|
}
|
|
1995
822
|
interface ShapeParagraph {
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
marL?: number;
|
|
2005
|
-
/** `<a:pPr@marR>` — right margin in EMU (ECMA-376 §21.1.2.2.7).
|
|
2006
|
-
* Omitted (undefined) when unset. */
|
|
2007
|
-
marR?: number;
|
|
2008
|
-
/** `<a:pPr@indent>` — first-line indent in EMU (negative = hanging),
|
|
2009
|
-
* ECMA-376 §21.1.2.2.7. Omitted (undefined) when unset. */
|
|
2010
|
-
indent?: number;
|
|
2011
|
-
/** `<a:pPr>/<a:lnSpc>` line spacing (ECMA-376 §21.1.2.2.5). Direct-only;
|
|
2012
|
-
* omitted when unset. */
|
|
2013
|
-
spaceLine?: SpaceLine | null;
|
|
2014
|
-
runs: ShapeTextRun[];
|
|
2015
|
-
}
|
|
2016
|
-
/** A run within a shape paragraph — tagged union mirroring the Rust enum
|
|
2017
|
-
* (matches the pptx `TextRun` shape): styled text, a soft line break, or an
|
|
2018
|
-
* OMML equation. Excel stores "Insert > Equation" as OMML inside the shared
|
|
2019
|
-
* DrawingML `<xdr:txBody>` grammar (ECMA-376 §22.1), like PowerPoint. */
|
|
823
|
+
align: string;
|
|
824
|
+
rtl?: boolean;
|
|
825
|
+
marL?: number;
|
|
826
|
+
marR?: number;
|
|
827
|
+
indent?: number;
|
|
828
|
+
spaceLine?: SpaceLine | null;
|
|
829
|
+
runs: ShapeTextRun[];
|
|
830
|
+
}
|
|
2020
831
|
type ShapeTextRun = {
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
/** East-Asian typeface (`<a:ea@typeface>`, ECMA-376 §21.1.2.3.1). The
|
|
2031
|
-
* common Japanese encoding sets Meiryo here while leaving `<a:latin>`
|
|
2032
|
-
* default; the renderer floors the line box by this face's design line
|
|
2033
|
-
* too (see `drawShapeText`). Undefined when the run declares no `<a:ea>`. */
|
|
2034
|
-
fontFaceEa?: string;
|
|
2035
|
-
/** Complex-script typeface (`<a:cs@typeface>`, ECMA-376 §21.1.2.3.1).
|
|
2036
|
-
* Parsed/modeled but NOT used in the line-box floor: the cs face renders
|
|
2037
|
-
* only complex-script glyphs (Arabic/Hebrew/Thai), so flooring the whole
|
|
2038
|
-
* line box by it would over-grow Latin/CJK runs (deferred to per-glyph
|
|
2039
|
-
* handling — see `drawShapeText`). Undefined when the run declares no
|
|
2040
|
-
* `<a:cs>`. */
|
|
2041
|
-
fontFaceCs?: string;
|
|
832
|
+
type: 'text';
|
|
833
|
+
text: string;
|
|
834
|
+
bold: boolean;
|
|
835
|
+
italic: boolean;
|
|
836
|
+
size: number;
|
|
837
|
+
color?: string;
|
|
838
|
+
fontFace?: string;
|
|
839
|
+
fontFaceEa?: string;
|
|
840
|
+
fontFaceCs?: string;
|
|
2042
841
|
} | {
|
|
2043
|
-
|
|
842
|
+
type: 'break';
|
|
2044
843
|
} | {
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
/** Point size when the run carries an explicit `rPr@sz`; else inherit. */
|
|
2051
|
-
fontSize?: number;
|
|
2052
|
-
color?: string;
|
|
844
|
+
type: 'math';
|
|
845
|
+
nodes: MathNode[];
|
|
846
|
+
display: boolean;
|
|
847
|
+
fontSize?: number;
|
|
848
|
+
color?: string;
|
|
2053
849
|
};
|
|
2054
850
|
type ShapeGeom = {
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
adj?: (number | null)[];
|
|
851
|
+
type: 'preset';
|
|
852
|
+
name: string;
|
|
853
|
+
adj?: (number | null)[];
|
|
854
|
+
} | {
|
|
855
|
+
type: 'custom';
|
|
856
|
+
paths: PathInfo[];
|
|
2062
857
|
} | {
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
mimeType: string;
|
|
2076
|
-
/** Vector original from the Microsoft `asvg:svgBlip` extension
|
|
2077
|
-
* (MS-ODRAWXML), as a zip path. Prefer this over `imagePath` (the raster
|
|
2078
|
-
* fallback, or the SVG itself when no raster blip is embedded). Absent
|
|
2079
|
-
* when the picture carries no svgBlip extension. Its MIME is always
|
|
2080
|
-
* `image/svg+xml` and is owned by the SVG decoder. */
|
|
2081
|
-
svgImagePath?: string;
|
|
2082
|
-
/** ECMA-376 §20.1.8.55 `<a:srcRect>` source-image crop on the leaf pic
|
|
2083
|
-
* (signed fractions from each edge; visible region `[l, t, 1-r,
|
|
2084
|
-
* 1-b]`). Absent ⇒ the whole blip fills the leaf rect. Honored identically
|
|
2085
|
-
* to the top-level {@link ImageAnchor.srcRect} (raster only). */
|
|
2086
|
-
srcRect?: {
|
|
2087
|
-
l: number;
|
|
2088
|
-
t: number;
|
|
2089
|
-
r: number;
|
|
2090
|
-
b: number;
|
|
2091
|
-
};
|
|
2092
|
-
/** ECMA-376 §20.1.8.6 `<a:alphaModFix@amt>` opacity fraction (0..1) on the
|
|
2093
|
-
* leaf pic. Absent ⇒ opaque. Applied via `globalAlpha`. */
|
|
2094
|
-
alpha?: number;
|
|
2095
|
-
/** ECMA-376 §20.1.8.23 `<a:duotone>` recolour on the leaf pic. Absent ⇒
|
|
2096
|
-
* no effect. */
|
|
2097
|
-
duotone?: Duotone;
|
|
858
|
+
type: 'image';
|
|
859
|
+
imagePath: string;
|
|
860
|
+
mimeType: string;
|
|
861
|
+
svgImagePath?: string;
|
|
862
|
+
srcRect?: {
|
|
863
|
+
l: number;
|
|
864
|
+
t: number;
|
|
865
|
+
r: number;
|
|
866
|
+
b: number;
|
|
867
|
+
};
|
|
868
|
+
alpha?: number;
|
|
869
|
+
duotone?: Duotone;
|
|
2098
870
|
};
|
|
2099
|
-
/** ECMA-376 §20.1.8.23 `<a:duotone>` image effect, resolved to its two endpoint
|
|
2100
|
-
* colours (mirrors the shared Rust `ooxml_common::blip::Duotone`). `clr1` is the
|
|
2101
|
-
* dark endpoint (luminance 0), `clr2` the light endpoint (luminance 1); both are
|
|
2102
|
-
* 6-char uppercase hex WITHOUT a leading `#`, with per-colour transforms already
|
|
2103
|
-
* applied by the parser. */
|
|
2104
871
|
interface Duotone {
|
|
2105
|
-
|
|
2106
|
-
|
|
872
|
+
clr1: string;
|
|
873
|
+
clr2: string;
|
|
2107
874
|
}
|
|
2108
875
|
interface PathInfo {
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
876
|
+
w: number;
|
|
877
|
+
h: number;
|
|
878
|
+
commands: PathCmd[];
|
|
2112
879
|
}
|
|
2113
880
|
type PathCmd = {
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
881
|
+
op: 'moveTo';
|
|
882
|
+
x: number;
|
|
883
|
+
y: number;
|
|
2117
884
|
} | {
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
885
|
+
op: 'lineTo';
|
|
886
|
+
x: number;
|
|
887
|
+
y: number;
|
|
2121
888
|
} | {
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
889
|
+
op: 'cubicBezTo';
|
|
890
|
+
x1: number;
|
|
891
|
+
y1: number;
|
|
892
|
+
x2: number;
|
|
893
|
+
y2: number;
|
|
894
|
+
x3: number;
|
|
895
|
+
y3: number;
|
|
2129
896
|
} | {
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
} |
|
|
2136
|
-
/** ECMA-376 §20.1.9.3. stAng/swAng in 60000ths of a degree. wr/hr in
|
|
2137
|
-
* the path's own coordinate units. Pen position is the arc start. */
|
|
2138
|
-
{
|
|
2139
|
-
op: 'arcTo';
|
|
2140
|
-
wr: number;
|
|
2141
|
-
hr: number;
|
|
2142
|
-
stAng: number;
|
|
2143
|
-
swAng: number;
|
|
897
|
+
op: 'quadBezTo';
|
|
898
|
+
x1: number;
|
|
899
|
+
y1: number;
|
|
900
|
+
x2: number;
|
|
901
|
+
y2: number;
|
|
2144
902
|
} | {
|
|
2145
|
-
|
|
903
|
+
op: 'arcTo';
|
|
904
|
+
wr: number;
|
|
905
|
+
hr: number;
|
|
906
|
+
stAng: number;
|
|
907
|
+
swAng: number;
|
|
908
|
+
} | {
|
|
909
|
+
op: 'close';
|
|
2146
910
|
};
|
|
2147
|
-
/**
|
|
2148
|
-
* Image anchored to a rectangle of cells (EMU offsets within the anchor cells).
|
|
2149
|
-
* 914400 EMU = 1 inch, 9525 EMU = 1 px @ 96 DPI.
|
|
2150
|
-
*/
|
|
2151
911
|
interface ImageAnchor {
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
/** MIME type of the blip at {@link ImageAnchor.imagePath} (e.g. `image/png`,
|
|
2175
|
-
* or `image/svg+xml` for the SVG-only fallback). */
|
|
2176
|
-
mimeType: string;
|
|
2177
|
-
/** Vector original from the Microsoft `asvg:svgBlip` extension (MS-ODRAWXML),
|
|
2178
|
-
* as a zip path. Preferred over `imagePath` (the raster fallback, or the SVG
|
|
2179
|
-
* itself when no raster blip is embedded). Absent when the picture carries no
|
|
2180
|
-
* svgBlip extension. Its MIME is always `image/svg+xml` and is owned by the
|
|
2181
|
-
* SVG decoder. */
|
|
2182
|
-
svgImagePath?: string;
|
|
2183
|
-
/** ECMA-376 §20.1.8.55 `<a:srcRect>` source-image crop. Each edge inset is a
|
|
2184
|
-
* signed fraction of the source bitmap, measured from its edge, so the visible
|
|
2185
|
-
* source region is `[l, t, 1-r, 1-b]`. Absent (the common case) ⇒ the whole
|
|
2186
|
-
* blip fills the anchor rect; when present, the renderer draws only the
|
|
2187
|
-
* cropped sub-rectangle (raster only — a metafile is rasterized to the
|
|
2188
|
-
* display box, so its crop can't be honored faithfully and is skipped). */
|
|
2189
|
-
srcRect?: {
|
|
2190
|
-
l: number;
|
|
2191
|
-
t: number;
|
|
2192
|
-
r: number;
|
|
2193
|
-
b: number;
|
|
2194
|
-
};
|
|
2195
|
-
/** ECMA-376 §20.1.8.6 `<a:alphaModFix@amt>` — the blip's overall opacity as a
|
|
2196
|
-
* fraction (0..1). Absent ⇒ opaque. The renderer sets `ctx.globalAlpha` so the
|
|
2197
|
-
* picture composites over the cells beneath it (e.g. a pink translucent photo
|
|
2198
|
-
* over a matching cell fill). */
|
|
2199
|
-
alpha?: number;
|
|
2200
|
-
/** ECMA-376 §20.1.8.23 `<a:duotone>` recolour effect. Absent (the common case)
|
|
2201
|
-
* ⇒ no effect. When present, the renderer remaps the image along the
|
|
2202
|
-
* `clr1`→`clr2` luminance ramp before drawing. */
|
|
2203
|
-
duotone?: Duotone;
|
|
912
|
+
fromCol: number;
|
|
913
|
+
fromColOff: number;
|
|
914
|
+
fromRow: number;
|
|
915
|
+
fromRowOff: number;
|
|
916
|
+
toCol: number;
|
|
917
|
+
toColOff: number;
|
|
918
|
+
toRow: number;
|
|
919
|
+
toRowOff: number;
|
|
920
|
+
editAs?: string;
|
|
921
|
+
nativeExtCx: number;
|
|
922
|
+
nativeExtCy: number;
|
|
923
|
+
imagePath: string;
|
|
924
|
+
mimeType: string;
|
|
925
|
+
svgImagePath?: string;
|
|
926
|
+
srcRect?: {
|
|
927
|
+
l: number;
|
|
928
|
+
t: number;
|
|
929
|
+
r: number;
|
|
930
|
+
b: number;
|
|
931
|
+
};
|
|
932
|
+
alpha?: number;
|
|
933
|
+
duotone?: Duotone;
|
|
2204
934
|
}
|
|
2205
935
|
interface CellRange$1 {
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
936
|
+
top: number;
|
|
937
|
+
left: number;
|
|
938
|
+
bottom: number;
|
|
939
|
+
right: number;
|
|
2210
940
|
}
|
|
2211
941
|
interface Hyperlink {
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
/** Internal target (§18.3.1.47 `location`): a defined name or a cell reference
|
|
2218
|
-
* such as `Sheet1!A1`. Present when the hyperlink navigates within the
|
|
2219
|
-
* workbook rather than to an external URL. */
|
|
2220
|
-
location?: string | null;
|
|
2221
|
-
/** Optional display text (§18.3.1.47 `display`). Not used for rendering. */
|
|
2222
|
-
display?: string | null;
|
|
942
|
+
col: number;
|
|
943
|
+
row: number;
|
|
944
|
+
url: string | null;
|
|
945
|
+
location?: string | null;
|
|
946
|
+
display?: string | null;
|
|
2223
947
|
}
|
|
2224
948
|
interface ConditionalFormat {
|
|
2225
|
-
|
|
2226
|
-
|
|
949
|
+
sqref: CellRange$1[];
|
|
950
|
+
rules: CfRule[];
|
|
2227
951
|
}
|
|
2228
952
|
type CfRule = {
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
953
|
+
type: 'cellIs';
|
|
954
|
+
operator: string;
|
|
955
|
+
formulas: string[];
|
|
956
|
+
dxfId: number | null;
|
|
957
|
+
priority: number;
|
|
2234
958
|
} | {
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
959
|
+
type: 'expression';
|
|
960
|
+
formula: string;
|
|
961
|
+
dxfId: number | null;
|
|
962
|
+
priority: number;
|
|
963
|
+
stopIfTrue: boolean;
|
|
2240
964
|
} | {
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
965
|
+
type: 'colorScale';
|
|
966
|
+
stops: CfStop[];
|
|
967
|
+
priority: number;
|
|
2244
968
|
} | {
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
969
|
+
type: 'dataBar';
|
|
970
|
+
color: string;
|
|
971
|
+
min: CfValue;
|
|
972
|
+
max: CfValue;
|
|
973
|
+
priority: number;
|
|
974
|
+
gradient: boolean;
|
|
2251
975
|
} | {
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
976
|
+
type: 'top10';
|
|
977
|
+
top: boolean;
|
|
978
|
+
percent: boolean;
|
|
979
|
+
rank: number;
|
|
980
|
+
dxfId: number | null;
|
|
981
|
+
priority: number;
|
|
2258
982
|
} | {
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
983
|
+
type: 'aboveAverage';
|
|
984
|
+
aboveAverage: boolean;
|
|
985
|
+
equalAverage?: boolean;
|
|
986
|
+
stdDev?: number;
|
|
987
|
+
dxfId: number | null;
|
|
988
|
+
priority: number;
|
|
2265
989
|
} | {
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
990
|
+
type: 'iconSet';
|
|
991
|
+
iconSet: string;
|
|
992
|
+
cfvos: CfValue[];
|
|
993
|
+
reverse: boolean;
|
|
994
|
+
priority: number;
|
|
995
|
+
customIcons?: CfIcon[];
|
|
2272
996
|
} | {
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
997
|
+
type: 'other';
|
|
998
|
+
kind: string;
|
|
999
|
+
priority: number;
|
|
2276
1000
|
};
|
|
2277
1001
|
interface CfIcon {
|
|
2278
|
-
|
|
2279
|
-
|
|
1002
|
+
iconSet: string;
|
|
1003
|
+
iconId: number;
|
|
2280
1004
|
}
|
|
2281
1005
|
interface CfStop {
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
1006
|
+
kind: string;
|
|
1007
|
+
value: string | null;
|
|
1008
|
+
color: string;
|
|
2285
1009
|
}
|
|
2286
1010
|
interface CfValue {
|
|
2287
|
-
|
|
2288
|
-
|
|
1011
|
+
kind: string;
|
|
1012
|
+
value: string | null;
|
|
2289
1013
|
}
|
|
2290
1014
|
interface Row {
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
* one-level-deeper detail rows are collapsed. Omitted when false. */
|
|
2299
|
-
collapsed?: boolean;
|
|
2300
|
-
/** `<row hidden>` (§18.3.1.73): `true` when the row is hidden — most often
|
|
2301
|
-
* because a collapsed outline hides its detail rows. Distinct from
|
|
2302
|
-
* `height === 0`. Omitted on the wire when false. */
|
|
2303
|
-
hidden?: boolean;
|
|
2304
|
-
}
|
|
2305
|
-
/** `<sheetPr><outlinePr>` flags (ECMA-376 §18.3.1.61). Both default to `true`. */
|
|
1015
|
+
index: number;
|
|
1016
|
+
height: number | null;
|
|
1017
|
+
cells: Cell[];
|
|
1018
|
+
outlineLevel?: number;
|
|
1019
|
+
collapsed?: boolean;
|
|
1020
|
+
hidden?: boolean;
|
|
1021
|
+
}
|
|
2306
1022
|
interface OutlinePr {
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
summaryBelow: boolean;
|
|
2310
|
-
/** `true` (default) ⇒ a group's summary column sits to the *right* of its
|
|
2311
|
-
* detail columns; `false` ⇒ to the left. */
|
|
2312
|
-
summaryRight: boolean;
|
|
1023
|
+
summaryBelow: boolean;
|
|
1024
|
+
summaryRight: boolean;
|
|
2313
1025
|
}
|
|
2314
1026
|
interface Cell {
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
/** Raw `<f>` formula text (ECMA-376 §18.3.1.40), when present. The renderer
|
|
2322
|
-
* uses this to recompute volatile functions (TODAY, NOW) at display time
|
|
2323
|
-
* so the cached `<v>` — frozen when the file was last saved — doesn't
|
|
2324
|
-
* show a stale date. */
|
|
2325
|
-
formula?: string;
|
|
2326
|
-
/** Whether this cell displays its phonetic hint (furigana). The parser
|
|
2327
|
-
* resolves it as `cell/@ph ?? row/@ph ?? false` — the per-cell `<c ph>`
|
|
2328
|
-
* (ECMA-376 §18.3.1.4) wins when present (an explicit `ph="0"` overrides an
|
|
2329
|
-
* enabled row), otherwise the row-level `<row ph>` (§18.3.1.73) is inherited,
|
|
2330
|
-
* otherwise the schema default (false). Omitted on the wire when false, so
|
|
2331
|
-
* read as `showPhonetic ?? false`. A cell whose String Item carries `<rPh>`
|
|
2332
|
-
* runs still shows NO furigana unless the resolved value is true. */
|
|
2333
|
-
showPhonetic?: boolean;
|
|
1027
|
+
col: number;
|
|
1028
|
+
row: number;
|
|
1029
|
+
value: CellValue;
|
|
1030
|
+
styleIndex?: number;
|
|
1031
|
+
formula?: string;
|
|
1032
|
+
showPhonetic?: boolean;
|
|
2334
1033
|
}
|
|
2335
1034
|
type CellValue = {
|
|
2336
|
-
|
|
1035
|
+
type: 'empty';
|
|
1036
|
+
} | {
|
|
1037
|
+
type: 'text';
|
|
1038
|
+
text: string;
|
|
1039
|
+
runs?: Run[];
|
|
1040
|
+
phoneticRuns?: PhoneticRun[];
|
|
1041
|
+
phoneticPr?: PhoneticProperties;
|
|
2337
1042
|
} | {
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
runs?: Run[];
|
|
2341
|
-
/** ECMA-376 §18.4.6 phonetic runs (furigana) carried over from the
|
|
2342
|
-
* resolved String Item. Present for inline strings, and populated by
|
|
2343
|
-
* {@link resolveSharedStrings} for shared-string cells. Absent when the
|
|
2344
|
-
* string has no furigana. */
|
|
2345
|
-
phoneticRuns?: PhoneticRun[];
|
|
2346
|
-
/** ECMA-376 §18.4.3 phonetic display properties (font index / char set /
|
|
2347
|
-
* alignment) for the furigana above. Absent when the `<si>` had no
|
|
2348
|
-
* `<phoneticPr>`. */
|
|
2349
|
-
phoneticPr?: PhoneticProperties;
|
|
1043
|
+
type: 'number';
|
|
1044
|
+
number: number;
|
|
2350
1045
|
} | {
|
|
2351
|
-
|
|
2352
|
-
|
|
1046
|
+
type: 'bool';
|
|
1047
|
+
bool: boolean;
|
|
2353
1048
|
} | {
|
|
2354
|
-
|
|
2355
|
-
|
|
1049
|
+
type: 'error';
|
|
1050
|
+
error: string;
|
|
2356
1051
|
} | {
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
} |
|
|
2360
|
-
/** Shared-string reference into `ParsedWorkbook.sharedStrings` (ECMA-376
|
|
2361
|
-
* §18.4.8). Resolved to `{ type: 'text', ... }` by the workbook before the
|
|
2362
|
-
* renderer (or any other consumer) sees it, so downstream code never
|
|
2363
|
-
* encounters this variant. */
|
|
2364
|
-
{
|
|
2365
|
-
type: 'shared';
|
|
2366
|
-
si: number;
|
|
1052
|
+
type: 'shared';
|
|
1053
|
+
si: number;
|
|
2367
1054
|
};
|
|
2368
|
-
/** ECMA-376 §18.4.6 `<rPh sb=".." eb="..">` — one furigana run. `sb`/`eb` are
|
|
2369
|
-
* zero-based character offsets into the base text; the hint `text` is shown
|
|
2370
|
-
* over base characters `[sb, eb)`. */
|
|
2371
1055
|
interface PhoneticRun {
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
/** The phonetic hint text (e.g. the katakana reading). */
|
|
2377
|
-
text: string;
|
|
2378
|
-
}
|
|
2379
|
-
/** ECMA-376 §18.18.57 ST_PhoneticType — the East-Asian character set the
|
|
2380
|
-
* furigana is displayed in. Absent on {@link PhoneticProperties} defaults to
|
|
2381
|
-
* `'fullwidthKatakana'` per the CT_PhoneticPr schema. */
|
|
1056
|
+
sb: number;
|
|
1057
|
+
eb: number;
|
|
1058
|
+
text: string;
|
|
1059
|
+
}
|
|
2382
1060
|
type PhoneticType = 'fullwidthKatakana' | 'halfwidthKatakana' | 'Hiragana' | 'noConversion';
|
|
2383
|
-
/** ECMA-376 §18.18.56 ST_PhoneticAlignment — how the furigana is aligned over
|
|
2384
|
-
* the base text. Absent on {@link PhoneticProperties} defaults to `'left'`. */
|
|
2385
1061
|
type PhoneticAlignment = 'left' | 'center' | 'distributed' | 'noControl';
|
|
2386
|
-
/** ECMA-376 §18.4.3 `<phoneticPr>` — phonetic display properties. */
|
|
2387
1062
|
interface PhoneticProperties {
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
/** §18.18.57 — absent means `'fullwidthKatakana'` (schema default). */
|
|
2392
|
-
type?: PhoneticType;
|
|
2393
|
-
/** §18.18.56 — absent means `'left'` (schema default). */
|
|
2394
|
-
alignment?: PhoneticAlignment;
|
|
1063
|
+
fontId: number;
|
|
1064
|
+
type?: PhoneticType;
|
|
1065
|
+
alignment?: PhoneticAlignment;
|
|
2395
1066
|
}
|
|
2396
1067
|
interface Run {
|
|
2397
|
-
|
|
2398
|
-
|
|
1068
|
+
text: string;
|
|
1069
|
+
font?: RunFont;
|
|
2399
1070
|
}
|
|
2400
1071
|
interface RunFont {
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
* (`ST_UnderlineValues`): "double" | "singleAccounting" | "doubleAccounting".
|
|
2411
|
-
* Absent means single (when `underline` is true) or no underline.
|
|
2412
|
-
*/
|
|
2413
|
-
underlineStyle?: string;
|
|
2414
|
-
/**
|
|
2415
|
-
* ECMA-376 §18.4.6 (`ST_VerticalAlignRun`): "superscript" | "subscript".
|
|
2416
|
-
* Absent leaves the run on the baseline.
|
|
2417
|
-
*/
|
|
2418
|
-
vertAlign?: 'superscript' | 'subscript';
|
|
1072
|
+
bold: boolean;
|
|
1073
|
+
italic: boolean;
|
|
1074
|
+
underline: boolean;
|
|
1075
|
+
strike: boolean;
|
|
1076
|
+
size?: number;
|
|
1077
|
+
color?: string | null;
|
|
1078
|
+
name?: string | null;
|
|
1079
|
+
underlineStyle?: string;
|
|
1080
|
+
vertAlign?: 'superscript' | 'subscript';
|
|
2419
1081
|
}
|
|
2420
1082
|
interface SharedString {
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
phoneticRuns?: PhoneticRun[];
|
|
2426
|
-
/** ECMA-376 §18.4.3 phonetic display properties. Absent when the `<si>` has
|
|
2427
|
-
* no `<phoneticPr>`. */
|
|
2428
|
-
phoneticPr?: PhoneticProperties;
|
|
1083
|
+
text: string;
|
|
1084
|
+
runs?: Run[];
|
|
1085
|
+
phoneticRuns?: PhoneticRun[];
|
|
1086
|
+
phoneticPr?: PhoneticProperties;
|
|
2429
1087
|
}
|
|
2430
1088
|
interface NumFmt {
|
|
2431
|
-
|
|
2432
|
-
|
|
1089
|
+
numFmtId: number;
|
|
1090
|
+
formatCode: string;
|
|
2433
1091
|
}
|
|
2434
1092
|
interface Styles {
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
1093
|
+
fonts: CellFont[];
|
|
1094
|
+
fills: CellFill[];
|
|
1095
|
+
borders: Border[];
|
|
1096
|
+
cellXfs: CellXf[];
|
|
1097
|
+
numFmts: NumFmt[];
|
|
1098
|
+
dxfs: Dxf[];
|
|
2441
1099
|
}
|
|
2442
1100
|
interface Dxf {
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
* conditional-formatting rule matches, this numFmt replaces the cell's own
|
|
2448
|
-
* style numFmt for rendering — e.g. switching a calendar cell from `d` to
|
|
2449
|
-
* `m"月"d"日"` on the first day of each month. */
|
|
2450
|
-
numFmt?: NumFmt | null;
|
|
1101
|
+
font: CellFont | null;
|
|
1102
|
+
fill: CellFill | null;
|
|
1103
|
+
border: Border | null;
|
|
1104
|
+
numFmt?: NumFmt | null;
|
|
2451
1105
|
}
|
|
2452
1106
|
interface CellFont {
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
/** ECMA-376 §18.4.6 ST_VerticalAlignRun on a cell-level <font>. */
|
|
2463
|
-
vertAlign?: 'superscript' | 'subscript';
|
|
1107
|
+
bold: boolean;
|
|
1108
|
+
italic: boolean;
|
|
1109
|
+
underline: boolean;
|
|
1110
|
+
strike: boolean;
|
|
1111
|
+
size: number;
|
|
1112
|
+
color: string | null;
|
|
1113
|
+
name: string | null;
|
|
1114
|
+
underlineStyle?: string;
|
|
1115
|
+
vertAlign?: 'superscript' | 'subscript';
|
|
2464
1116
|
}
|
|
2465
1117
|
interface CellFill {
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
gradient?: GradientFillSpec | null;
|
|
1118
|
+
patternType: string;
|
|
1119
|
+
fgColor: string | null;
|
|
1120
|
+
bgColor: string | null;
|
|
1121
|
+
gradient?: GradientFillSpec | null;
|
|
2471
1122
|
}
|
|
2472
1123
|
interface GradientFillSpec {
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
position: number;
|
|
2484
|
-
color: string;
|
|
2485
|
-
}[];
|
|
1124
|
+
gradientType: string;
|
|
1125
|
+
degree: number;
|
|
1126
|
+
left: number;
|
|
1127
|
+
right: number;
|
|
1128
|
+
top: number;
|
|
1129
|
+
bottom: number;
|
|
1130
|
+
stops: {
|
|
1131
|
+
position: number;
|
|
1132
|
+
color: string;
|
|
1133
|
+
}[];
|
|
2486
1134
|
}
|
|
2487
1135
|
interface Border {
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
* Only set on table-style dxfs; absent on cell-level borders. */
|
|
2497
|
-
horizontal?: BorderEdge | null;
|
|
2498
|
-
/** Inner vertical rule between columns inside a region. */
|
|
2499
|
-
vertical?: BorderEdge | null;
|
|
1136
|
+
left: BorderEdge | null;
|
|
1137
|
+
right: BorderEdge | null;
|
|
1138
|
+
top: BorderEdge | null;
|
|
1139
|
+
bottom: BorderEdge | null;
|
|
1140
|
+
diagonalUp?: BorderEdge | null;
|
|
1141
|
+
diagonalDown?: BorderEdge | null;
|
|
1142
|
+
horizontal?: BorderEdge | null;
|
|
1143
|
+
vertical?: BorderEdge | null;
|
|
2500
1144
|
}
|
|
2501
1145
|
interface BorderEdge {
|
|
2502
|
-
|
|
2503
|
-
|
|
1146
|
+
style: string;
|
|
1147
|
+
color: string | null;
|
|
2504
1148
|
}
|
|
2505
1149
|
interface CellXf {
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
shrinkToFit?: boolean;
|
|
2518
|
-
/** `<alignment readingOrder>` (ECMA-376 §18.8.1) — 0 = context (default),
|
|
2519
|
-
* 1 = LTR, 2 = RTL. Drives canvas `direction`. */
|
|
2520
|
-
readingOrder?: number;
|
|
1150
|
+
fontId: number;
|
|
1151
|
+
fillId: number;
|
|
1152
|
+
borderId: number;
|
|
1153
|
+
numFmtId: number;
|
|
1154
|
+
alignH: string | null;
|
|
1155
|
+
alignV: string | null;
|
|
1156
|
+
wrapText: boolean;
|
|
1157
|
+
indent?: number;
|
|
1158
|
+
textRotation?: number;
|
|
1159
|
+
shrinkToFit?: boolean;
|
|
1160
|
+
readingOrder?: number;
|
|
2521
1161
|
}
|
|
2522
1162
|
interface ParsedWorkbook {
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
1163
|
+
workbook: Workbook;
|
|
1164
|
+
styles: Styles;
|
|
1165
|
+
sharedStrings: SharedString[];
|
|
2526
1166
|
}
|
|
2527
1167
|
interface ViewportRange {
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
1168
|
+
row: number;
|
|
1169
|
+
col: number;
|
|
1170
|
+
rows: number;
|
|
1171
|
+
cols: number;
|
|
2532
1172
|
}
|
|
2533
|
-
/** Emitted once per cell that has text, with the cell's canvas-pixel bounds. */
|
|
2534
1173
|
interface XlsxTextRunInfo {
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
/** Cell width in canvas CSS pixels. */
|
|
2545
|
-
width: number;
|
|
2546
|
-
/** Cell height in canvas CSS pixels. */
|
|
2547
|
-
height: number;
|
|
2548
|
-
row: number;
|
|
2549
|
-
col: number;
|
|
1174
|
+
sheetName: string;
|
|
1175
|
+
cellRef: string;
|
|
1176
|
+
text: string;
|
|
1177
|
+
x: number;
|
|
1178
|
+
y: number;
|
|
1179
|
+
width: number;
|
|
1180
|
+
height: number;
|
|
1181
|
+
row: number;
|
|
1182
|
+
col: number;
|
|
2550
1183
|
}
|
|
2551
1184
|
interface RenderViewportOptions {
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
* `strong: true` → light blue + blue border (rows / cols / all selection modes).
|
|
2576
|
-
* `strong: false` → slightly darker grey (cells selection mode). */
|
|
2577
|
-
selectedRowRange?: {
|
|
2578
|
-
start: number;
|
|
2579
|
-
end: number;
|
|
2580
|
-
strong: boolean;
|
|
2581
|
-
} | null;
|
|
2582
|
-
/** Same shape as selectedRowRange, for column headers. */
|
|
2583
|
-
selectedColRange?: {
|
|
2584
|
-
start: number;
|
|
2585
|
-
end: number;
|
|
2586
|
-
strong: boolean;
|
|
2587
|
-
} | null;
|
|
1185
|
+
width?: number;
|
|
1186
|
+
height?: number;
|
|
1187
|
+
dpr?: number;
|
|
1188
|
+
defaultFontFamily?: string;
|
|
1189
|
+
defaultFontSize?: number;
|
|
1190
|
+
scrollOffsetX?: number;
|
|
1191
|
+
scrollOffsetY?: number;
|
|
1192
|
+
freezeRows?: number;
|
|
1193
|
+
freezeCols?: number;
|
|
1194
|
+
cellScale?: number;
|
|
1195
|
+
loadedImages?: Map<string, CanvasImageSource | null>;
|
|
1196
|
+
fetchImage?: (path: string, mimeType: string) => Promise<Blob>;
|
|
1197
|
+
onTextRun?: (info: XlsxTextRunInfo) => void;
|
|
1198
|
+
selectedRowRange?: {
|
|
1199
|
+
start: number;
|
|
1200
|
+
end: number;
|
|
1201
|
+
strong: boolean;
|
|
1202
|
+
} | null;
|
|
1203
|
+
selectedColRange?: {
|
|
1204
|
+
start: number;
|
|
1205
|
+
end: number;
|
|
1206
|
+
strong: boolean;
|
|
1207
|
+
} | null;
|
|
2588
1208
|
}
|
|
2589
|
-
//#endregion
|
|
2590
|
-
//#region packages/xlsx/src/validation-list.d.ts
|
|
2591
|
-
/**
|
|
2592
|
-
* Resolved allowed-value set for a list validation. Either concrete display
|
|
2593
|
-
* `values` (inline list or expanded range), or — when the operand is a defined
|
|
2594
|
-
* name / complex formula we cannot expand — the raw `formula` text so the panel
|
|
2595
|
-
* can disclose it instead of showing nothing.
|
|
2596
|
-
*/
|
|
2597
1209
|
type ResolvedList = {
|
|
2598
|
-
|
|
2599
|
-
|
|
1210
|
+
kind: 'values';
|
|
1211
|
+
values: string[];
|
|
2600
1212
|
} | {
|
|
2601
|
-
|
|
2602
|
-
|
|
1213
|
+
kind: 'formula';
|
|
1214
|
+
formula: string;
|
|
2603
1215
|
};
|
|
2604
|
-
//#endregion
|
|
2605
|
-
//#region packages/xlsx/src/worker-protocol.d.ts
|
|
2606
|
-
/**
|
|
2607
|
-
* View-only per-band size overrides for one sheet, carried with every worker
|
|
2608
|
-
* `renderViewport` request. The render worker draws from its own worker-local
|
|
2609
|
-
* parsed-sheet cache, so main-thread Worksheet mutations (outline
|
|
2610
|
-
* collapse/expand via the size-0 hidden encoding, drag-to-resize #567) never
|
|
2611
|
-
* reach it on their own — without this channel the gutter/overlays update but
|
|
2612
|
-
* the grid bitmap stays stale.
|
|
2613
|
-
*
|
|
2614
|
-
* Semantics: keys are 1-based band indices; a number is the band's current
|
|
2615
|
-
* `rowHeights` / `colWidths` model value, `null` means "no entry — fall back
|
|
2616
|
-
* to the sheet default". The main thread accumulates every band the user has
|
|
2617
|
-
* touched this session (entries are updated in place, never removed), so
|
|
2618
|
-
* re-applying the full map is idempotent and converges the worker's cached
|
|
2619
|
-
* sheet to the main model even across worker-side re-parses.
|
|
2620
|
-
*/
|
|
2621
1216
|
interface WireSizeOverrides {
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
}
|
|
2625
|
-
/** Serializable subset of RenderViewportOptions: drop the callback, the image
|
|
2626
|
-
* cache, and the `fetchImage` loader (all non-cloneable; the worker owns its
|
|
2627
|
-
* own cache and supplies its own in-worker fetchImage). Extended with the
|
|
2628
|
-
* optional {@link WireSizeOverrides} so view-only size mutations reach the
|
|
2629
|
-
* worker's local sheet copy; absent (the common case) when nothing has been
|
|
2630
|
-
* resized or collapsed, keeping the wire payload unchanged. */
|
|
1217
|
+
rows?: Record<number, number | null>;
|
|
1218
|
+
cols?: Record<number, number | null>;
|
|
1219
|
+
}
|
|
2631
1220
|
type WireRenderViewportOptions = Omit<RenderViewportOptions, 'onTextRun' | 'loadedImages' | 'fetchImage'> & {
|
|
2632
|
-
|
|
1221
|
+
sizeOverrides?: WireSizeOverrides;
|
|
2633
1222
|
};
|
|
2634
|
-
//#endregion
|
|
2635
|
-
//#region packages/xlsx/src/workbook.d.ts
|
|
2636
|
-
/** Options for {@link XlsxWorkbook.load}. Extends the shared load-options type
|
|
2637
|
-
* from `@silurus/ooxml-core` (`useGoogleFonts`, `resourceLimits`, the
|
|
2638
|
-
* deprecated `maxZipEntryBytes` alias, and `math`) with worker rendering. */
|
|
2639
1223
|
interface LoadOptions extends LoadOptions$1 {
|
|
2640
|
-
|
|
2641
|
-
* 'main' (default): parse in a worker, render on the main thread (current
|
|
2642
|
-
* behaviour). 'worker': parse AND render inside the worker; use
|
|
2643
|
-
* {@link XlsxWorkbook.renderViewportToBitmap} and paint the returned
|
|
2644
|
-
* ImageBitmap via an `ImageBitmapRenderingContext`. Requires OffscreenCanvas.
|
|
2645
|
-
* The math engine is unavailable in this mode (equations are skipped).
|
|
2646
|
-
*/
|
|
2647
|
-
mode?: 'main' | 'worker';
|
|
1224
|
+
mode?: 'main' | 'worker';
|
|
2648
1225
|
}
|
|
2649
1226
|
declare class XlsxWorkbook {
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
get tabColors(): (string | null)[];
|
|
2702
|
-
/**
|
|
2703
|
-
* Full visibility fact for the sheet at `sheetIndex` (0-based):
|
|
2704
|
-
* `'visible'` | `'hidden'` | `'veryHidden'` (`<sheet state>`, ECMA-376
|
|
2705
|
-
* §18.2.19). NOT clamped — out-of-range / non-integer ⇒ `'visible'`. This is a
|
|
2706
|
-
* *fact*; deciding what to do with a hidden sheet (hide/skip/dim its tab) is
|
|
2707
|
-
* {@link XlsxViewer}'s policy. `'veryHidden'` is revealable only
|
|
2708
|
-
* programmatically in Excel; it is surfaced distinctly here.
|
|
2709
|
-
*/
|
|
2710
|
-
sheetVisibility(sheetIndex: number): SheetVisibility;
|
|
2711
|
-
/**
|
|
2712
|
-
* Whether the sheet at `sheetIndex` is hidden or veryHidden. Convenience over
|
|
2713
|
-
* {@link sheetVisibility}; mirrors {@link PptxPresentation.isHidden} (non-
|
|
2714
|
-
* clamped: out-of-range / non-integer ⇒ `false`).
|
|
2715
|
-
*/
|
|
2716
|
-
isHidden(sheetIndex: number): boolean;
|
|
2717
|
-
getWorksheet(sheetIndex: number): Promise<Worksheet>;
|
|
2718
|
-
/** Return a fresh content-free metrics snapshot, including lazy worksheet and
|
|
2719
|
-
* media work completed since load. */
|
|
2720
|
-
getResourceMetrics(): Promise<OoxmlResourceMetrics>;
|
|
2721
|
-
private loadWorksheet;
|
|
2722
|
-
private loadWorksheetStream;
|
|
2723
|
-
private runArchiveOperation;
|
|
2724
|
-
/**
|
|
2725
|
-
* Fetch an embedded image's bytes by zip path (e.g. `xl/media/image1.png`),
|
|
2726
|
-
* wrapped in a Blob of the given MIME. The bytes are pulled through the
|
|
2727
|
-
* persistent worker via the `extractImage` message (twin of pptx/docx's
|
|
2728
|
-
* `getImage`/`getMedia`); results are cached by path for the lifetime of this
|
|
2729
|
-
* instance. The renderer's `fetchImage` option points here so image bytes are
|
|
2730
|
-
* extracted lazily rather than inlined as base64 at parse time.
|
|
2731
|
-
*
|
|
2732
|
-
* Routed through the persistent worker so all WASM `extract_image` decoding
|
|
2733
|
-
* stays with the archive owner.
|
|
2734
|
-
*/
|
|
2735
|
-
getImage(imagePath: string, mimeType: string): Promise<Blob>;
|
|
2736
|
-
private getImageWithinArchiveOperation;
|
|
2737
|
-
private requestImage;
|
|
2738
|
-
/**
|
|
2739
|
-
* Project the workbook to GitHub-flavoured markdown: each sheet becomes a
|
|
2740
|
-
* `## SheetName` section followed by a pipe table of its populated bounding
|
|
2741
|
-
* box (fully-empty middle rows trimmed, ULP noise masked). Styling, charts,
|
|
2742
|
-
* and drawings are discarded — the projection is meant for AI ingestion and
|
|
2743
|
-
* full-text search, not layout.
|
|
2744
|
-
*
|
|
2745
|
-
* Runs entirely in the worker off the archive opened at {@link load} (no
|
|
2746
|
-
* re-copy of the file, no re-parse of the model on the main thread), so it
|
|
2747
|
-
* works in BOTH `mode: 'main'` and `mode: 'worker'`.
|
|
2748
|
-
*
|
|
2749
|
-
* @example
|
|
2750
|
-
* const wb = await XlsxWorkbook.load(buffer);
|
|
2751
|
-
* const md = await wb.toMarkdown();
|
|
2752
|
-
*/
|
|
2753
|
-
toMarkdown(): Promise<string>;
|
|
2754
|
-
/**
|
|
2755
|
-
* Resolve a `list`-type data-validation `formula1` (ECMA-376 §18.3.1.32) into
|
|
2756
|
-
* the set of allowed values to display, evaluated relative to `sheetIndex`
|
|
2757
|
-
* (the sheet that owns the validation, used to resolve unqualified ranges):
|
|
2758
|
-
*
|
|
2759
|
-
* - Inline quoted list `"A,B,C"` → the literal values.
|
|
2760
|
-
* - Range ref `$B$2:$B$5` → each non-empty cell's *display
|
|
2761
|
-
* string* (the same formatted text the grid shows, via {@link formatCellValue}),
|
|
2762
|
-
* walked row-major. `Sheet2!$A$1:$A$9` resolves against the named sheet
|
|
2763
|
-
* (lazily parsed via {@link getWorksheet}, hence async).
|
|
2764
|
-
* - Named range / complex formula → `{ kind: 'formula' }` carrying the
|
|
2765
|
-
* raw text so the caller can disclose it rather than blanking it.
|
|
2766
|
-
*
|
|
2767
|
-
* Read-only: this only reads cell values for display; it never writes.
|
|
2768
|
-
*/
|
|
2769
|
-
resolveValidationList(sheetIndex: number, formula1: string | undefined): Promise<ResolvedList>;
|
|
2770
|
-
/**
|
|
2771
|
-
* IX2 — the display string a cell shows on the grid, i.e. exactly what
|
|
2772
|
-
* {@link renderViewport} would draw (number formats, dates, booleans, rich
|
|
2773
|
-
* text flattened). Used by {@link XlsxViewer.findText} to search the *rendered*
|
|
2774
|
-
* text rather than the raw stored value, so a search matches what the user
|
|
2775
|
-
* sees. Threads the workbook styles + the sheet's date system through the
|
|
2776
|
-
* shared {@link formatCellValue} (the same call the renderer and
|
|
2777
|
-
* validation-list expansion use). Returns `''` before the workbook is loaded.
|
|
2778
|
-
*/
|
|
2779
|
-
cellText(ws: Worksheet, cell: Cell): string;
|
|
2780
|
-
/**
|
|
2781
|
-
* Render a sheet viewport into `target`. Note: `opts.fetchImage` is ignored
|
|
2782
|
-
* here — image bytes always come from this workbook's own archive through its
|
|
2783
|
-
* stable per-instance loader, whose closure identity keys the shared decoded
|
|
2784
|
-
* caches, the render-pass lease, and {@link destroy}'s cache drops. Callers
|
|
2785
|
-
* needing a custom byte source should use the standalone
|
|
2786
|
-
* `renderWorksheetViewport` orchestrator directly.
|
|
2787
|
-
*/
|
|
2788
|
-
renderViewport(target: HTMLCanvasElement | OffscreenCanvas, sheetIndex: number, viewport: ViewportRange, opts?: RenderViewportOptions): Promise<void>;
|
|
2789
|
-
/**
|
|
2790
|
-
* Render a sheet viewport and return it as an ImageBitmap (both modes; in
|
|
2791
|
-
* worker mode the render runs entirely off the main thread). `opts.width` /
|
|
2792
|
-
* `opts.height` are required: there is no DOM element to measure in a worker
|
|
2793
|
-
* or on an OffscreenCanvas. Paint with
|
|
2794
|
-
* `canvas.getContext('bitmaprenderer').transferFromImageBitmap(bitmap)`.
|
|
2795
|
-
*
|
|
2796
|
-
* The returned ImageBitmap is owned by the caller: pass it to
|
|
2797
|
-
* `transferFromImageBitmap` (which consumes it) or call `bitmap.close()`
|
|
2798
|
-
* when done, or its backing memory is held until GC.
|
|
2799
|
-
*/
|
|
2800
|
-
renderViewportToBitmap(sheetIndex: number, viewport: ViewportRange, opts: WireRenderViewportOptions & {
|
|
2801
|
-
width: number;
|
|
2802
|
-
height: number;
|
|
2803
|
-
}): Promise<ImageBitmap>;
|
|
2804
|
-
private withWorksheetArchiveOperation;
|
|
2805
|
-
destroy(): void;
|
|
2806
|
-
private assertResourceHealthy;
|
|
1227
|
+
private metrics;
|
|
1228
|
+
private worker;
|
|
1229
|
+
private bridge;
|
|
1230
|
+
private parsedWorkbook;
|
|
1231
|
+
private sheetCache;
|
|
1232
|
+
private sheetLoads;
|
|
1233
|
+
private readonly rawParts;
|
|
1234
|
+
private queuedImageLoads;
|
|
1235
|
+
private readonly _fetchImage;
|
|
1236
|
+
private resourcePolicy;
|
|
1237
|
+
private math;
|
|
1238
|
+
private googleFontNames;
|
|
1239
|
+
private readonly retainedFontSets;
|
|
1240
|
+
private fontsDestroyed;
|
|
1241
|
+
private _mode;
|
|
1242
|
+
private generation;
|
|
1243
|
+
private archiveOperationTail;
|
|
1244
|
+
private worksheetPullClient;
|
|
1245
|
+
private workerTimeoutMs;
|
|
1246
|
+
private retainedSheetUsage;
|
|
1247
|
+
private resourceFailure;
|
|
1248
|
+
private constructor();
|
|
1249
|
+
get mode(): 'main' | 'worker';
|
|
1250
|
+
static load(source: string | ArrayBuffer, opts?: LoadOptions): Promise<XlsxWorkbook>;
|
|
1251
|
+
private _load;
|
|
1252
|
+
private retainFontsInSet;
|
|
1253
|
+
get sheetNames(): string[];
|
|
1254
|
+
get sheetCount(): number;
|
|
1255
|
+
get tabColors(): (string | null)[];
|
|
1256
|
+
sheetVisibility(sheetIndex: number): SheetVisibility;
|
|
1257
|
+
isHidden(sheetIndex: number): boolean;
|
|
1258
|
+
getWorksheet(sheetIndex: number): Promise<Worksheet>;
|
|
1259
|
+
getResourceMetrics(): Promise<OoxmlResourceMetrics>;
|
|
1260
|
+
private loadWorksheet;
|
|
1261
|
+
private loadWorksheetStream;
|
|
1262
|
+
private ensureWorksheetPullClient;
|
|
1263
|
+
private runArchiveOperation;
|
|
1264
|
+
getImage(imagePath: string, mimeType: string): Promise<Blob>;
|
|
1265
|
+
private getImageWithinArchiveOperation;
|
|
1266
|
+
private requestImage;
|
|
1267
|
+
toMarkdown(): Promise<string>;
|
|
1268
|
+
resolveValidationList(sheetIndex: number, formula1: string | undefined): Promise<ResolvedList>;
|
|
1269
|
+
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>;
|
|
1275
|
+
private withWorksheetArchiveOperation;
|
|
1276
|
+
destroy(): void;
|
|
1277
|
+
private assertResourceHealthy;
|
|
2807
1278
|
}
|
|
2808
|
-
|
|
2809
|
-
//#region packages/xlsx/src/find.d.ts
|
|
2810
|
-
/** Where an xlsx match lives: the sheet, its name, and the cell (A1 + row/col). */
|
|
1279
|
+
type CanvasViewerRenderMode = 'main' | 'worker';
|
|
2811
1280
|
interface XlsxMatchLocation {
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
ref: string;
|
|
2818
|
-
/** 1-based row. */
|
|
2819
|
-
row: number;
|
|
2820
|
-
/** 1-based column. */
|
|
2821
|
-
col: number;
|
|
1281
|
+
sheet: number;
|
|
1282
|
+
sheetName: string;
|
|
1283
|
+
ref: string;
|
|
1284
|
+
row: number;
|
|
1285
|
+
col: number;
|
|
2822
1286
|
}
|
|
2823
|
-
//#endregion
|
|
2824
|
-
//#region packages/xlsx/src/viewer.d.ts
|
|
2825
|
-
/** How {@link XlsxViewer} presents hidden sheets (`<sheet state>`, §18.2.19). */
|
|
2826
1287
|
type HiddenSheetMode = 'show' | 'skip' | 'dim';
|
|
2827
|
-
interface
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
onScaleChange?: (scale: number) => void;
|
|
2855
|
-
onReady?: (sheetNames: string[]) => void;
|
|
2856
|
-
/**
|
|
2857
|
-
* Called when the active sheet changes, with the new sheet's zero-based
|
|
2858
|
-
* `index` and the `total` number of sheets in the workbook. This mirrors the
|
|
2859
|
-
* docx `onPageChange` and pptx `onSlideChange` contracts so all three viewers
|
|
2860
|
-
* share one callback shape. To get the sheet *name*, look it up by index from
|
|
2861
|
-
* `viewer.sheetNames[index]` (or the `sheetNames` array delivered to
|
|
2862
|
-
* `onReady`).
|
|
2863
|
-
*/
|
|
2864
|
-
onSheetChange?: (index: number, total: number) => void;
|
|
2865
|
-
/**
|
|
2866
|
-
* Receives load failures and asynchronous render failures handled by the
|
|
2867
|
-
* Viewer. Supplying this callback changes load-failure delivery: `load()`
|
|
2868
|
-
* invokes it and resolves; without it, the same load/parse failure rejects
|
|
2869
|
-
* `load()`. Viewer-managed render failures invoke it, or fall back to
|
|
2870
|
-
* `console.error` when omitted.
|
|
2871
|
-
*
|
|
2872
|
-
* Stable cases can be narrowed with `OoxmlError`,
|
|
2873
|
-
* `OoxmlResourceLimitError`, or `OoxmlDecodedImageLimitError` re-exported by
|
|
2874
|
-
* this package. Other failures remain `Error` values; do not parse message
|
|
2875
|
-
* text as an API. A `code` of `parser-crashed` identifies a recognized WASM
|
|
2876
|
-
* trap, not a reliably classified OOM.
|
|
2877
|
-
*/
|
|
2878
|
-
onError?: (err: Error) => void;
|
|
2879
|
-
/** Called when the selected cell range changes. null means no selection. */
|
|
2880
|
-
onSelectionChange?: (selection: CellRange | null) => void;
|
|
2881
|
-
/**
|
|
2882
|
-
* IX1 (design decision — NOT user-confirmed, integrator may veto). Fires when a
|
|
2883
|
-
* cell carrying a hyperlink (ECMA-376 §18.3.1.47) is clicked. Default when
|
|
2884
|
-
* omitted: external → {@link openExternalHyperlink} (new tab, sanitised,
|
|
2885
|
-
* noopener); internal (`location`) → navigate to the referenced sheet/cell
|
|
2886
|
-
* when resolvable. When supplied, this callback fully owns the behaviour and
|
|
2887
|
-
* receives the raw {@link HyperlinkTarget} verbatim (URL sanitisation is the
|
|
2888
|
-
* default handler's job, so a blocked scheme still reaches a custom callback).
|
|
2889
|
-
*/
|
|
2890
|
-
onHyperlinkClick?: (target: HyperlinkTarget) => void;
|
|
2891
|
-
/** IX1 — master switch for hyperlink interactivity. Default `true`. When
|
|
2892
|
-
* `false`, the cell hit-test reports no hyperlink under any cell, so hyperlink
|
|
2893
|
-
* interactivity is disabled entirely: no pointer cursor over a link, no default
|
|
2894
|
-
* navigation (external new-tab / internal sheet jump), and `onHyperlinkClick`
|
|
2895
|
-
* is never called. Hyperlinked cells still render exactly as authored but are
|
|
2896
|
-
* inert. */
|
|
2897
|
-
enableHyperlinks?: boolean;
|
|
2898
|
-
/**
|
|
2899
|
-
* Color of the cell-selection highlight. A single CSS color drives both the
|
|
2900
|
-
* selection rectangle's border (drawn in this color) and its fill (the same
|
|
2901
|
-
* color made translucent — see {@link selectionOverlayStyle}), so callers pick
|
|
2902
|
-
* one accent color instead of a separate border + background. Any CSS color
|
|
2903
|
-
* string works (`#1a73e8`, `rgb(...)`, `tomato`, …). Default `#1a73e8`
|
|
2904
|
-
* (Google blue), matching the historical look. Can also be changed at runtime
|
|
2905
|
-
* via {@link XlsxViewer.setSelectionColor}.
|
|
2906
|
-
*/
|
|
2907
|
-
selectionColor?: string;
|
|
2908
|
-
/** CSS backgrounds for ordinary and active in-document search matches. */
|
|
2909
|
-
findHighlightColors?: FindHighlightColors;
|
|
2910
|
-
/**
|
|
2911
|
-
* `'main'` (default): parse in a worker, render on the main thread. `'worker'`:
|
|
2912
|
-
* parse AND render entirely inside the worker and paint the returned
|
|
2913
|
-
* ImageBitmap onto the viewer's canvas, so document rendering never blocks the
|
|
2914
|
-
* UI thread. All interaction (scroll, sheet tabs, frozen panes, zoom, cell
|
|
2915
|
-
* selection) is unchanged. Requires `Worker` + `OffscreenCanvas`. Equations
|
|
2916
|
-
* require `'main'` (the math engine cannot cross the worker boundary).
|
|
2917
|
-
*/
|
|
2918
|
-
mode?: 'main' | 'worker';
|
|
2919
|
-
/**
|
|
2920
|
-
* How hidden / veryHidden sheets (`<sheet state>`, ECMA-376 §18.2.19) are
|
|
2921
|
-
* presented:
|
|
2922
|
-
* - `'show'` (default): every sheet gets a tab — current behavior.
|
|
2923
|
-
* - `'skip'`: hidden/veryHidden sheets get no tab and are jumped over by
|
|
2924
|
-
* `nextSheet`/`prevSheet` and initial load; absolute indices are unchanged,
|
|
2925
|
-
* and an explicit `goToSheet(i)` to a hidden sheet is still honored.
|
|
2926
|
-
* - `'dim'`: hidden/veryHidden tabs are shown greyed but stay selectable.
|
|
2927
|
-
*
|
|
2928
|
-
* Named to match the {@link XlsxViewer.hiddenSheetMode} getter and
|
|
2929
|
-
* {@link XlsxViewer.setHiddenSheetMode} setter. Mirrors pptx `hiddenSlideMode`.
|
|
2930
|
-
*/
|
|
2931
|
-
hiddenSheetMode?: HiddenSheetMode;
|
|
1288
|
+
interface XlsxSheetViewerOptions extends LoadOptions$1 {
|
|
1289
|
+
cellScale?: number;
|
|
1290
|
+
resizable?: boolean;
|
|
1291
|
+
zoomMin?: number;
|
|
1292
|
+
zoomMax?: number;
|
|
1293
|
+
onScaleChange?: (scale: number) => void;
|
|
1294
|
+
onReady?: (sheetNames: string[]) => void;
|
|
1295
|
+
onSheetChange?: (index: number, total: number) => void;
|
|
1296
|
+
onError?: (err: Error) => void;
|
|
1297
|
+
onSelectionChange?: (selection: CellRange | null) => void;
|
|
1298
|
+
onHyperlinkClick?: (target: HyperlinkTarget) => void;
|
|
1299
|
+
enableHyperlinks?: boolean;
|
|
1300
|
+
selectionColor?: string;
|
|
1301
|
+
findHighlightColors?: FindHighlightColors;
|
|
1302
|
+
mode?: 'main' | 'worker';
|
|
1303
|
+
hiddenSheetMode?: HiddenSheetMode;
|
|
1304
|
+
onViewportChange?: (offset: XlsxViewportOffset) => void;
|
|
1305
|
+
}
|
|
1306
|
+
interface XlsxViewerOptions extends XlsxSheetViewerOptions {
|
|
1307
|
+
showZoomSlider?: boolean;
|
|
1308
|
+
}
|
|
1309
|
+
interface XlsxViewportOffset {
|
|
1310
|
+
readonly x: number;
|
|
1311
|
+
readonly y: number;
|
|
1312
|
+
}
|
|
1313
|
+
interface XlsxScrollToCellOptions {
|
|
1314
|
+
readonly align?: 'nearest' | 'start' | 'center' | 'end';
|
|
2932
1315
|
}
|
|
2933
1316
|
interface CellAddress {
|
|
2934
|
-
|
|
2935
|
-
|
|
1317
|
+
row: number;
|
|
1318
|
+
col: number;
|
|
2936
1319
|
}
|
|
2937
1320
|
type SelectionMode = 'cells' | 'rows' | 'cols' | 'all';
|
|
2938
1321
|
interface CellRange {
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
}
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
/** Rebuild only the layout + band lists (not the stashes) after a collapse
|
|
3196
|
-
* state change, so the +/- glyphs and bracket set stay in sync. */
|
|
3197
|
-
private buildOutlineLayoutOnly;
|
|
3198
|
-
/** True when the current sheet's grid is laid out right-to-left. */
|
|
3199
|
-
private get isRtl();
|
|
3200
|
-
/** Maximum horizontal scroll offset the native scroll host allows (≥ 0). */
|
|
3201
|
-
private get maxScrollLeft();
|
|
3202
|
-
/**
|
|
3203
|
-
* The logical horizontal scroll position used to find the start-of-sheet
|
|
3204
|
-
* (col A) edge, in *scaled* CSS pixels — the same unit as
|
|
3205
|
-
* `scrollHost.scrollLeft`. The renderer always lays the grid out LTR and then
|
|
3206
|
-
* mirrors it (ECMA-376 §18.3.1.87), so the viewer must hand it a position
|
|
3207
|
-
* where 0 = the START of the sheet (col A) and increasing values reveal later
|
|
3208
|
-
* columns.
|
|
3209
|
-
*
|
|
3210
|
-
* For LTR that is exactly the native `scrollLeft`. For RTL the sheet starts at
|
|
3211
|
-
* the RIGHT, so the native scrollbar runs the opposite way: thumb fully right
|
|
3212
|
-
* (`scrollLeft = maxScrollLeft`) is the start, thumb left is the far columns.
|
|
3213
|
-
* Inverting here makes wheel/trackpad follow the finger and aligns the
|
|
3214
|
-
* thumb↔page mapping with Excel, without depending on browser-specific RTL
|
|
3215
|
-
* `scrollLeft` sign conventions.
|
|
3216
|
-
*/
|
|
3217
|
-
private get effectiveScrollLeft();
|
|
3218
|
-
/**
|
|
3219
|
-
* Map between the logical-LTR x used by all the cell-geometry math and the
|
|
3220
|
-
* on-screen (canvasArea CSS-pixel) x, applying the RTL mirror (ECMA-376
|
|
3221
|
-
* §18.3.1.87) via the same {@link rtlMirrorX} the renderer uses. For LTR this
|
|
3222
|
-
* is the identity. The mirror is an involution, so this one method serves
|
|
3223
|
-
* both cell→px (overlay draw, `w` = cell width) and px→cell (pointer
|
|
3224
|
-
* hit-testing, `w` = 0 for a point) — guaranteeing the overlay sits exactly
|
|
3225
|
-
* where the cell is drawn and a click resolves to that same cell at every
|
|
3226
|
-
* scroll offset. `canvasArea.clientWidth` equals the renderer's `canvasW`.
|
|
3227
|
-
*/
|
|
3228
|
-
private screenX;
|
|
3229
|
-
/** Park the scrollbar at the sheet's natural start: scrollLeft=0 for LTR,
|
|
3230
|
-
* the right end for RTL (so col A shows first). */
|
|
3231
|
-
private resetHorizontalScroll;
|
|
3232
|
-
/** Re-derive the native scrollLeft from the tracked start-anchored
|
|
3233
|
-
* position after the scroll host's size changes. Only RTL needs this:
|
|
3234
|
-
* for LTR the native scrollLeft *is* start-anchored and the browser
|
|
3235
|
-
* already clamps it sensibly on resize. */
|
|
3236
|
-
private reanchorHorizontalScroll;
|
|
3237
|
-
/** 0-based index of the currently displayed sheet. */
|
|
3238
|
-
get sheetIndex(): number;
|
|
3239
|
-
/** Total number of sheets in the loaded workbook. */
|
|
3240
|
-
get sheetCount(): number;
|
|
3241
|
-
/**
|
|
3242
|
-
* Navigate to a sheet by index, clamped to range. Canonical navigation verb
|
|
3243
|
-
* matching {@link PptxViewer.goToSlide} / {@link DocxViewer.goToPage};
|
|
3244
|
-
* {@link showSheet} is the lower-level form that assumes a valid index.
|
|
3245
|
-
*/
|
|
3246
|
-
goToSheet(index: number): Promise<void>;
|
|
3247
|
-
nextSheet(): Promise<void>;
|
|
3248
|
-
prevSheet(): Promise<void>;
|
|
3249
|
-
/** Next sheet index for sequential nav: skip mode jumps over hidden sheets. */
|
|
3250
|
-
private _stepSheet;
|
|
3251
|
-
/** Initial sheet for load() / entering skip mode: land on a visible sheet. */
|
|
3252
|
-
private _initialSheet;
|
|
3253
|
-
/** Returns the cell at canvas-client coordinates, or null if outside the cell grid. */
|
|
3254
|
-
getCellAt(clientX: number, clientY: number): CellAddress | null;
|
|
3255
|
-
/** Returns the CSS-pixel rect of a cell within canvasArea, or null if not
|
|
3256
|
-
* computable. Mirrors the renderer's per-cell rounding (Math.round(px * cs))
|
|
3257
|
-
* so the selection overlay sits exactly on the canvas's drawn cell borders;
|
|
3258
|
-
* multiplying logical accumulators by `cs` once at the end (the previous
|
|
3259
|
-
* approach) drifted by up to 1 px per cell at non-integer scales.
|
|
3260
|
-
*/
|
|
3261
|
-
private getCellRect;
|
|
3262
|
-
/** Returns the current selection, including mode. */
|
|
3263
|
-
get selection(): CellRange | null;
|
|
3264
|
-
/**
|
|
3265
|
-
* Programmatically select a single cell by A1 reference (e.g. `"B2"`), as if
|
|
3266
|
-
* the user had clicked it: updates the active/anchor cell, redraws the
|
|
3267
|
-
* selection overlay (including any list-validation dropdown arrow), and fires
|
|
3268
|
-
* `onSelectionChange`. A no-op for malformed refs. Closes any open validation
|
|
3269
|
-
* panel, matching the click path.
|
|
3270
|
-
*/
|
|
3271
|
-
select(ref: string): void;
|
|
3272
|
-
/**
|
|
3273
|
-
* Returns what the header area contains at the given client coordinates.
|
|
3274
|
-
* Returns null when the point is in the cell grid (not a header).
|
|
3275
|
-
*/
|
|
3276
|
-
private getHeaderHit;
|
|
3277
|
-
/**
|
|
3278
|
-
* If the pointer sits on a column/row-header border (within {@link
|
|
3279
|
-
* RESIZE_GRAB_PX}), return the resize target: which index to resize and the
|
|
3280
|
-
* fixed LTR edge it grows from (in canvasArea CSS px). Excel resizes the band
|
|
3281
|
-
* whose *trailing* border you grab — the column to the left of a vertical
|
|
3282
|
-
* border, the row above a horizontal one — so both that band and its
|
|
3283
|
-
* neighbour-to-the-far-side are checked. Geometry comes straight from {@link
|
|
3284
|
-
* getCellRect}, so the grab line always coincides with the drawn border at any
|
|
3285
|
-
* scroll offset / zoom / RTL. Returns null off the header borders.
|
|
3286
|
-
*/
|
|
3287
|
-
private getResizeTarget;
|
|
3288
|
-
/**
|
|
3289
|
-
* Apply a live resize drag: size the band from its fixed origin edge to the
|
|
3290
|
-
* current pointer, clamp to {@link RESIZE_MIN_PX}, and write the result back
|
|
3291
|
-
* into the in-memory worksheet model in its native unit (Excel column widths /
|
|
3292
|
-
* points). This is a *view-only* mutation — the file is never written. The
|
|
3293
|
-
* memoized axis cache for this sheet is invalidated so every geometry read
|
|
3294
|
-
* (spacer, hit-test, overlay, renderer) sees the new size on the next frame.
|
|
3295
|
-
*/
|
|
3296
|
-
private applyResize;
|
|
3297
|
-
/**
|
|
3298
|
-
* Change the cell-selection highlight color at runtime (see {@link
|
|
3299
|
-
* XlsxViewerOptions.selectionColor}). The border takes the color as-is and the
|
|
3300
|
-
* fill becomes a translucent shade of it; the current selection repaints
|
|
3301
|
-
* immediately.
|
|
3302
|
-
*/
|
|
3303
|
-
setSelectionColor(color: string): void;
|
|
3304
|
-
/**
|
|
3305
|
-
* Switch the hidden-sheet mode at runtime: restyle the tabs and re-render.
|
|
3306
|
-
* Entering `'skip'` while on a hidden sheet advances to the nearest visible.
|
|
3307
|
-
*/
|
|
3308
|
-
setHiddenSheetMode(mode: HiddenSheetMode): Promise<void>;
|
|
3309
|
-
/** The current hidden-sheet mode. */
|
|
3310
|
-
get hiddenSheetMode(): HiddenSheetMode;
|
|
3311
|
-
/** Number of non-hidden sheets (absolute `sheetCount` is unchanged). */
|
|
3312
|
-
get visibleSheetCount(): number;
|
|
3313
|
-
/** Copy the selected cell range as tab-separated text to the clipboard. */
|
|
3314
|
-
private copySelection;
|
|
3315
|
-
private updateSelectionOverlay;
|
|
3316
|
-
/** Draw the Excel list-validation dropdown button just outside the
|
|
3317
|
-
* bottom-right corner of the *active* cell when that cell is covered by a
|
|
3318
|
-
* `list` data-validation rule. Anchored to the single active cell (not the
|
|
3319
|
-
* whole range) to mirror Excel, which attaches the button to the active
|
|
3320
|
-
* cell of the selection. */
|
|
3321
|
-
private maybeDrawValidationDropdown;
|
|
3322
|
-
/**
|
|
3323
|
-
* Redraw the find-highlight overlay: one translucent box per matched cell on
|
|
3324
|
-
* the current sheet, the active match in a stronger colour. Uses the SAME
|
|
3325
|
-
* `getCellRect` + `screenX` + header/frozen clamp the selection overlay uses,
|
|
3326
|
-
* so a box lands exactly on the drawn cell at any scroll offset / zoom / RTL.
|
|
3327
|
-
* Rebuilt on every render and scroll (cheap DOM geometry, no canvas paint).
|
|
3328
|
-
*/
|
|
3329
|
-
private updateFindOverlay;
|
|
3330
|
-
/**
|
|
3331
|
-
* IX2 — find every occurrence of `query` across every sheet and highlight the
|
|
3332
|
-
* matched cells. Returns every match in document order (sheet ascending, then
|
|
3333
|
-
* row-major within a sheet), each tagged with its
|
|
3334
|
-
* `{ sheet, sheetName, ref, row, col }`. A cell is the search unit: search
|
|
3335
|
-
* runs over each cell's *rendered* display text (number formats, dates, rich
|
|
3336
|
-
* text flattened), so a query matches what the grid shows. Case-insensitive by
|
|
3337
|
-
* default; pass `{ caseSensitive: true }` for an exact match. An empty query
|
|
3338
|
-
* clears the find.
|
|
3339
|
-
*/
|
|
3340
|
-
findText(query: string, opts?: FindMatchesOptions): Promise<FindMatch<XlsxMatchLocation>[]>;
|
|
3341
|
-
/**
|
|
3342
|
-
* IX2 — move to the next match (wrap-around), switching sheets and scrolling
|
|
3343
|
-
* the matched cell into view as needed, and highlight it as the active match.
|
|
3344
|
-
* Returns the now-active match, or `null` when there are none. Call
|
|
3345
|
-
* {@link findText} first.
|
|
3346
|
-
*/
|
|
3347
|
-
findNext(): Promise<FindMatch<XlsxMatchLocation> | null>;
|
|
3348
|
-
/** IX2 — move to the previous match (wrap-around). */
|
|
3349
|
-
findPrev(): Promise<FindMatch<XlsxMatchLocation> | null>;
|
|
3350
|
-
/** IX2 — clear all highlights and reset the find state. */
|
|
3351
|
-
clearFind(): void;
|
|
3352
|
-
private _activateMatch;
|
|
3353
|
-
/**
|
|
3354
|
-
* Scroll the grid so cell (row, col) is comfortably in view. Computes the
|
|
3355
|
-
* cell's absolute logical offset from the axis metrics (the same the renderer
|
|
3356
|
-
* uses) and nudges `scrollHost.scrollTop` / start-anchored horizontal scroll
|
|
3357
|
-
* only when the cell is outside the scrollable viewport — an in-view cell is
|
|
3358
|
-
* left where it is (Excel's find behaviour). Frozen cells are always visible,
|
|
3359
|
-
* so they need no scroll.
|
|
3360
|
-
*/
|
|
3361
|
-
private _scrollCellIntoView;
|
|
3362
|
-
/** Toggle the dropdown panel for the active cell's list validation. Called
|
|
3363
|
-
* from pointerdown when the arrow rect is hit. Re-clicking the same arrow
|
|
3364
|
-
* closes it. */
|
|
3365
|
-
private toggleValidationPanel;
|
|
3366
|
-
/** Resolve the allowed values for `formula1` (relative to the current sheet)
|
|
3367
|
-
* and render them in the panel anchored below the active cell. Async because
|
|
3368
|
-
* cross-sheet range references may need a lazily-parsed worksheet. */
|
|
3369
|
-
private openValidationPanel;
|
|
3370
|
-
/** Build the panel's children. Uses textContent throughout (no HTML injection
|
|
3371
|
-
* from cell values). Items highlight on hover but are NOT selectable —
|
|
3372
|
-
* this is a read-only viewer, so clicking a value must not change the cell. */
|
|
3373
|
-
private renderValidationPanel;
|
|
3374
|
-
/** Position the (already-populated, visible-or-becoming-visible) panel below
|
|
3375
|
-
* the dropdown arrow / active cell using the pure geometry calculator. */
|
|
3376
|
-
private positionValidationPanel;
|
|
3377
|
-
/** Install a document-level pointerdown listener that closes the panel on a
|
|
3378
|
-
* click outside it (and outside the arrow, which toggles via its own path).
|
|
3379
|
-
* Removed by {@link hideValidationPanel}. */
|
|
3380
|
-
private installValidationOutsideHandler;
|
|
3381
|
-
/** Hide the panel and detach its outside-click listener. Called on re-click,
|
|
3382
|
-
* outside click, Esc, scroll, selection change, sheet switch and destroy. */
|
|
3383
|
-
private hideValidationPanel;
|
|
3384
|
-
/** Build the `"row:col"` → comment index for the given sheet. Parses each
|
|
3385
|
-
* `XlsxComment.cellRef` with the shared {@link parseA1}; later refs win on a
|
|
3386
|
-
* collision (Excel allows at most one note per cell, so this is moot in
|
|
3387
|
-
* practice). */
|
|
3388
|
-
private buildCommentMap;
|
|
3389
|
-
/** IX1 — index the current sheet's hyperlinks by `"row:col"` (1-based, first
|
|
3390
|
-
* cell of the `ref` range) so a clicked/hovered cell resolves in O(1). Keys
|
|
3391
|
-
* match the renderer's `hyperlinkMap` exactly (`${hl.row}:${hl.col}`). */
|
|
3392
|
-
private buildHyperlinkMap;
|
|
3393
|
-
/** IX1 — the hyperlink at a cell, or null. `getCellAt` returns 1-based
|
|
3394
|
-
* {row,col}, matching the parser/renderer keying.
|
|
3395
|
-
*
|
|
3396
|
-
* Returns null unconditionally when `enableHyperlinks` is `false`: this is the
|
|
3397
|
-
* single gate that disables hyperlink interactivity. Both consumers — the
|
|
3398
|
-
* pointermove pointer-cursor affordance and the click dispatch
|
|
3399
|
-
* ({@link dispatchHyperlink}) — funnel through this hit-test, so a null result
|
|
3400
|
-
* means no cursor change, no default navigation, and no `onHyperlinkClick`. */
|
|
3401
|
-
private hyperlinkAtCell;
|
|
3402
|
-
/**
|
|
3403
|
-
* IX1 — dispatch a click on a hyperlinked cell. Builds a
|
|
3404
|
-
* {@link HyperlinkTarget} from the parsed hyperlink (external `url` wins over
|
|
3405
|
-
* internal `location`, matching Excel: a `<hyperlink>` carrying both navigates
|
|
3406
|
-
* to the external target) and routes it to the caller's `onHyperlinkClick`
|
|
3407
|
-
* (which fully owns behaviour) or the built-in default. Returns true when a
|
|
3408
|
-
* hyperlink was found and dispatched.
|
|
3409
|
-
*/
|
|
3410
|
-
private dispatchHyperlink;
|
|
3411
|
-
/**
|
|
3412
|
-
* IX1 default handler for an internal `location` target (§18.3.1.47): a defined
|
|
3413
|
-
* name or a cell ref like `Sheet1!A1`. Best-effort: if the part before `!`
|
|
3414
|
-
* names a sheet in the workbook, switch to it. There is no scroll-to-cell
|
|
3415
|
-
* primitive on this viewer, so the cell part is not yet honoured (switching the
|
|
3416
|
-
* sheet already lands the user on the right surface). A bare defined name that
|
|
3417
|
-
* does not resolve to a sheet is a documented no-op.
|
|
3418
|
-
*/
|
|
3419
|
-
private navigateInternalHyperlink;
|
|
3420
|
-
/** Show the popup for the comment on `cell` after the hover dwell, anchored to
|
|
3421
|
-
* the cell's current on-screen rect. No-op when the cell carries no comment.
|
|
3422
|
-
* Re-hovering the same cell does not restart the timer. */
|
|
3423
|
-
private scheduleCommentPopup;
|
|
3424
|
-
/** Immediately render the popup for `comment` anchored to `cell` (used by the
|
|
3425
|
-
* hover-dwell timer and by touch selection, which has no hover). */
|
|
3426
|
-
private renderCommentPopup;
|
|
3427
|
-
/** Hide the popup and cancel any pending show. Called on cell-out, scroll,
|
|
3428
|
-
* sheet switch and destroy. */
|
|
3429
|
-
private hideCommentPopup;
|
|
3430
|
-
private applyPointerSelection;
|
|
3431
|
-
private setupSelectionEvents;
|
|
3432
|
-
private buildTabs;
|
|
3433
|
-
private makeNavButton;
|
|
3434
|
-
private navButtonStyle;
|
|
3435
|
-
private scrollTabs;
|
|
3436
|
-
private updateNavButtons;
|
|
3437
|
-
private updateTabActive;
|
|
3438
|
-
private tabStyle;
|
|
3439
|
-
/**
|
|
3440
|
-
* Full inline style for the tab of sheet `i`, honoring the hidden-sheet mode:
|
|
3441
|
-
* `'skip'` hides the tab of a hidden/veryHidden sheet (`display:none`); `'dim'`
|
|
3442
|
-
* greys it but leaves it clickable; `'show'` styles every tab normally. Used
|
|
3443
|
-
* by both buildTabs and updateTabActive so navigation never wipes the styling.
|
|
3444
|
-
*/
|
|
3445
|
-
private tabCss;
|
|
3446
|
-
/** Excel-style zoom control pinned to the right end of the tab bar:
|
|
3447
|
-
* `− [────slider────] + 100%`. Live-updates the cell scale on input. */
|
|
3448
|
-
private buildZoomControl;
|
|
3449
|
-
/** Map a slider position [0,100] to a scale factor. 50 → 1.0 (100%), with a
|
|
3450
|
-
* separate linear segment on each side so the center is always 100%. */
|
|
3451
|
-
private zoomPosToScale;
|
|
3452
|
-
/** Inverse of {@link zoomPosToScale}: scale factor → slider position [0,100]. */
|
|
3453
|
-
private zoomScaleToPos;
|
|
3454
|
-
/**
|
|
3455
|
-
* IX9 {@link ZoomableViewer} — set the cell/header scale (`1` = 100%; the
|
|
3456
|
-
* viewer's `cellScale`) and re-lay-out the current sheet. Clamped to the zoom
|
|
3457
|
-
* bounds and snapped to whole percent; keeps the slider thumb, percentage label
|
|
3458
|
-
* in sync, and fires `onScaleChange` when the resolved scale actually changes.
|
|
3459
|
-
*/
|
|
3460
|
-
setScale(scale: number): void;
|
|
3461
|
-
/** IX9 {@link ZoomableViewer} — the current zoom factor (`1` = 100%). This is
|
|
3462
|
-
* the viewer's `cellScale`; `1` before anything is set. */
|
|
3463
|
-
getScale(): number;
|
|
3464
|
-
/** IX9 {@link ZoomableViewer} — step up to the next rung of the shared zoom
|
|
3465
|
-
* ladder (clamped to `zoomMax` by {@link setScale}). */
|
|
3466
|
-
zoomIn(): void;
|
|
3467
|
-
/** IX9 {@link ZoomableViewer} — step down to the next lower ladder rung. */
|
|
3468
|
-
zoomOut(): void;
|
|
3469
|
-
/**
|
|
3470
|
-
* IX9 {@link ZoomableViewer} — fit the used data range's WIDTH to the canvas
|
|
3471
|
-
* area. The "content" is the natural (100%) width of the row header plus the
|
|
3472
|
-
* used columns; the container is `canvasArea.clientWidth`. A no-op (defers) when
|
|
3473
|
-
* nothing is loaded or the container is unlaid-out. Routes through
|
|
3474
|
-
* {@link setScale}, so the result is clamped/snapped and fires `onScaleChange`.
|
|
3475
|
-
*/
|
|
3476
|
-
fitWidth(): void;
|
|
3477
|
-
/**
|
|
3478
|
-
* IX9 {@link ZoomableViewer} — fit the used data range's WIDTH AND HEIGHT inside
|
|
3479
|
-
* the canvas area (header + used columns/rows), so the whole used range is
|
|
3480
|
-
* visible without scrolling. Takes the tighter of the width- and height-fit
|
|
3481
|
-
* factors. Defers when unloaded / unlaid-out; routes through {@link setScale}.
|
|
3482
|
-
*/
|
|
3483
|
-
fitPage(): void;
|
|
3484
|
-
/** Shared fit implementation for {@link fitWidth} / {@link fitPage}: derive the
|
|
3485
|
-
* natural (cs=1) content extent of the used data range, ask core's pure
|
|
3486
|
-
* {@link fitScale} for the factor, and apply it via {@link setScale}. */
|
|
3487
|
-
private _fit;
|
|
3488
|
-
/** Natural (unscaled, cs=1) CSS-px extent of a worksheet's used data range:
|
|
3489
|
-
* the row/column header plus every used column width / row height. Mirrors
|
|
3490
|
-
* {@link updateSpacerSize} at cs=1 (same used-range detection) so the fit
|
|
3491
|
-
* targets exactly the region the spacer/scroll extent covers. */
|
|
3492
|
-
private _naturalContentExtent;
|
|
3493
|
-
private updateSpacerSize;
|
|
3494
|
-
/**
|
|
3495
|
-
* Coalesce a re-render into the next animation frame. Called from the
|
|
3496
|
-
* high-frequency event-driven paths (scroll, live column/row resize, drag-
|
|
3497
|
-
* selection, container resize); a burst of these within one frame schedules a
|
|
3498
|
-
* single {@link renderCurrentSheet}, avoiding the previous behavior where every
|
|
3499
|
-
* scroll event forced its own synchronous full redraw. Already-scheduled frames
|
|
3500
|
-
* are not re-scheduled — the one pending render reads the live scroll/scale
|
|
3501
|
-
* state when it runs, so the most recent position always wins without threading
|
|
3502
|
-
* a coordinate through. Falls back to a synchronous render when
|
|
3503
|
-
* `requestAnimationFrame` is unavailable (e.g. a non-DOM host), preserving the
|
|
3504
|
-
* old semantics there.
|
|
3505
|
-
*/
|
|
3506
|
-
private scheduleRender;
|
|
3507
|
-
private renderCurrentSheet;
|
|
3508
|
-
/** Route a render failure to `onError`, or `console.error` when none is given
|
|
3509
|
-
* (never fully silent), and never after teardown. Mirrors the scroll viewers'
|
|
3510
|
-
* `_reportRenderError`. */
|
|
3511
|
-
private _reportRenderError;
|
|
3512
|
-
private _renderCurrentSheet;
|
|
3513
|
-
private computeHeaderHighlight;
|
|
3514
|
-
get sheetNames(): string[];
|
|
3515
|
-
/** The underlying <canvas> element the grid is drawn on. */
|
|
3516
|
-
get canvasElement(): HTMLCanvasElement;
|
|
3517
|
-
/** Latest content-free resource metrics for the loaded workbook. */
|
|
3518
|
-
getResourceMetrics(): Promise<OoxmlResourceMetrics>;
|
|
3519
|
-
/**
|
|
3520
|
-
* Tear down the viewer and release resources.
|
|
3521
|
-
*
|
|
3522
|
-
* The caller's container is returned to the state it had before construction
|
|
3523
|
-
* (empty): the entire wrapper subtree the constructor appended is removed.
|
|
3524
|
-
* All document-level listeners are detached — the keydown handler here, and
|
|
3525
|
-
* the validation-panel outside-click handler via {@link hideValidationPanel}.
|
|
3526
|
-
* Listeners on elements inside the wrapper (scrollHost, tabs, …) need no
|
|
3527
|
-
* explicit removal: removing the subtree makes them unreachable and eligible
|
|
3528
|
-
* for GC. Safe to call more than once.
|
|
3529
|
-
*
|
|
3530
|
-
* NOTE: the shared `<style>` in `document.head` is intentionally NOT removed —
|
|
3531
|
-
* it is a class constant that any still-live viewer may depend on, and one
|
|
3532
|
-
* leftover sheet is a bounded, harmless cost (see {@link ensureViewerStyleInjected}).
|
|
3533
|
-
*/
|
|
3534
|
-
destroy(): void;
|
|
1322
|
+
anchor: CellAddress;
|
|
1323
|
+
active: CellAddress;
|
|
1324
|
+
mode: SelectionMode;
|
|
1325
|
+
}
|
|
1326
|
+
type XlsxViewerMount = {
|
|
1327
|
+
readonly kind: 'composite';
|
|
1328
|
+
} | {
|
|
1329
|
+
readonly kind: 'sheet';
|
|
1330
|
+
readonly canvas: HTMLCanvasElement;
|
|
1331
|
+
readonly mode: CanvasViewerRenderMode;
|
|
1332
|
+
};
|
|
1333
|
+
declare class XlsxViewerEngine implements ZoomableViewer {
|
|
1334
|
+
private readonly hostDocument;
|
|
1335
|
+
private readonly hostWindow;
|
|
1336
|
+
private readonly acquisition;
|
|
1337
|
+
private readonly viewport;
|
|
1338
|
+
private readonly renderDispatcher;
|
|
1339
|
+
private wrapper;
|
|
1340
|
+
private canvas;
|
|
1341
|
+
private gridRegion;
|
|
1342
|
+
private rowGutter;
|
|
1343
|
+
private colGutter;
|
|
1344
|
+
private cornerGutter;
|
|
1345
|
+
private gutter;
|
|
1346
|
+
private rowOutline;
|
|
1347
|
+
private colOutline;
|
|
1348
|
+
private rowOutlineBands;
|
|
1349
|
+
private colOutlineBands;
|
|
1350
|
+
private stashedRowHeights;
|
|
1351
|
+
private stashedColWidths;
|
|
1352
|
+
private sizeOverrideStore;
|
|
1353
|
+
private readonly projectionId;
|
|
1354
|
+
private canvasArea;
|
|
1355
|
+
private scrollHost;
|
|
1356
|
+
private spacer;
|
|
1357
|
+
private readonly surface;
|
|
1358
|
+
private readonly overlayHost;
|
|
1359
|
+
private tabBar;
|
|
1360
|
+
private tabStrip;
|
|
1361
|
+
private tabList;
|
|
1362
|
+
private navPrev;
|
|
1363
|
+
private navNext;
|
|
1364
|
+
private tabs;
|
|
1365
|
+
private tabColors;
|
|
1366
|
+
private zoomSlider;
|
|
1367
|
+
private zoomLabel;
|
|
1368
|
+
private currentSheet;
|
|
1369
|
+
private sheetRequestGeneration;
|
|
1370
|
+
private fontBindingGeneration;
|
|
1371
|
+
private fontBinding;
|
|
1372
|
+
private _hiddenSheetMode;
|
|
1373
|
+
private currentWorksheet;
|
|
1374
|
+
private sheetViews;
|
|
1375
|
+
private opts;
|
|
1376
|
+
private readonly _mountKind;
|
|
1377
|
+
private readonly _mode;
|
|
1378
|
+
private _borrowed;
|
|
1379
|
+
private preparedWorkbook;
|
|
1380
|
+
private _destroyed;
|
|
1381
|
+
private resizeObserver;
|
|
1382
|
+
private _lastViewportNotification;
|
|
1383
|
+
private get anchorCell();
|
|
1384
|
+
private set anchorCell(value);
|
|
1385
|
+
private get activeCell();
|
|
1386
|
+
private set activeCell(value);
|
|
1387
|
+
private get selectionMode();
|
|
1388
|
+
private set selectionMode(value);
|
|
1389
|
+
private get isSelecting();
|
|
1390
|
+
private set isSelecting(value);
|
|
1391
|
+
private _pendingZoomAnchor;
|
|
1392
|
+
private readonly selectionController;
|
|
1393
|
+
private selectionOverlay;
|
|
1394
|
+
private findOverlay;
|
|
1395
|
+
private _find;
|
|
1396
|
+
private keydownHandler;
|
|
1397
|
+
private pendingTap;
|
|
1398
|
+
private pendingClick;
|
|
1399
|
+
private resizeDrag;
|
|
1400
|
+
private commentPopup;
|
|
1401
|
+
private commentMap;
|
|
1402
|
+
private hyperlinkMap;
|
|
1403
|
+
private commentPopupKey;
|
|
1404
|
+
private commentPopupTimer;
|
|
1405
|
+
private validationPanel;
|
|
1406
|
+
private validationPanelKey;
|
|
1407
|
+
private validationRequestGeneration;
|
|
1408
|
+
private validationArrowRect;
|
|
1409
|
+
private validationOutsideHandler;
|
|
1410
|
+
constructor(container: HTMLElement, opts: XlsxViewerOptions | XlsxSheetViewerOptions | undefined, mount: XlsxViewerMount);
|
|
1411
|
+
private _collectSheetCells;
|
|
1412
|
+
load(source: string | ArrayBuffer): Promise<void>;
|
|
1413
|
+
private activateWorkbook;
|
|
1414
|
+
private ensureHostFonts;
|
|
1415
|
+
private releaseHostFonts;
|
|
1416
|
+
private prepareWorkbook;
|
|
1417
|
+
private get workbook();
|
|
1418
|
+
private get wb();
|
|
1419
|
+
private set wb(value);
|
|
1420
|
+
showSheet(index: number): Promise<void>;
|
|
1421
|
+
private isCurrentSheetRequest;
|
|
1422
|
+
private buildOutline;
|
|
1423
|
+
private layoutGutters;
|
|
1424
|
+
private renderGutters;
|
|
1425
|
+
private paintAxisGutter;
|
|
1426
|
+
private drawToggleBox;
|
|
1427
|
+
private drawLevelButton;
|
|
1428
|
+
private paintCornerGutter;
|
|
1429
|
+
private onGutterPointerDown;
|
|
1430
|
+
private applyGroupToggle;
|
|
1431
|
+
private applyLevelButton;
|
|
1432
|
+
private setBandHidden;
|
|
1433
|
+
private recordSizeOverride;
|
|
1434
|
+
private wireSizeOverrides;
|
|
1435
|
+
private setBandCollapsed;
|
|
1436
|
+
private afterOutlineMutation;
|
|
1437
|
+
private buildOutlineLayoutOnly;
|
|
1438
|
+
private get isRtl();
|
|
1439
|
+
private updateFooterDirection;
|
|
1440
|
+
private get maxScrollLeft();
|
|
1441
|
+
private get maxScrollTop();
|
|
1442
|
+
private syncNativeViewportExtent;
|
|
1443
|
+
private get viewportTop();
|
|
1444
|
+
private set viewportTop(value);
|
|
1445
|
+
private get effectiveScrollLeft();
|
|
1446
|
+
private setViewportLeft;
|
|
1447
|
+
private screenX;
|
|
1448
|
+
private resetHorizontalScroll;
|
|
1449
|
+
private reanchorHorizontalScroll;
|
|
1450
|
+
get sheetIndex(): number;
|
|
1451
|
+
get sheetCount(): number;
|
|
1452
|
+
goToSheet(index: number): Promise<void>;
|
|
1453
|
+
nextSheet(): Promise<void>;
|
|
1454
|
+
prevSheet(): Promise<void>;
|
|
1455
|
+
getViewportOffset(): XlsxViewportOffset;
|
|
1456
|
+
private emitViewportChange;
|
|
1457
|
+
setViewportOffset(offset: XlsxViewportOffset): Promise<void>;
|
|
1458
|
+
relayout(): Promise<void>;
|
|
1459
|
+
scrollToCell(ref: string, options?: XlsxScrollToCellOptions): Promise<void>;
|
|
1460
|
+
private _stepSheet;
|
|
1461
|
+
private _initialSheet;
|
|
1462
|
+
getCellAt(clientX: number, clientY: number): CellAddress | null;
|
|
1463
|
+
private getCellRect;
|
|
1464
|
+
get selection(): CellRange | null;
|
|
1465
|
+
select(ref: string): void;
|
|
1466
|
+
private getHeaderHit;
|
|
1467
|
+
private getResizeTarget;
|
|
1468
|
+
private applyResize;
|
|
1469
|
+
setSelectionColor(color: string): void;
|
|
1470
|
+
setHiddenSheetMode(mode: HiddenSheetMode): Promise<void>;
|
|
1471
|
+
get hiddenSheetMode(): HiddenSheetMode;
|
|
1472
|
+
get visibleSheetCount(): number;
|
|
1473
|
+
private copySelection;
|
|
1474
|
+
private updateSelectionOverlay;
|
|
1475
|
+
private maybeDrawValidationDropdown;
|
|
1476
|
+
private updateFindOverlay;
|
|
1477
|
+
findText(query: string, opts?: FindMatchesOptions): Promise<FindMatch<XlsxMatchLocation>[]>;
|
|
1478
|
+
findNext(): Promise<FindMatch<XlsxMatchLocation> | null>;
|
|
1479
|
+
findPrev(): Promise<FindMatch<XlsxMatchLocation> | null>;
|
|
1480
|
+
clearFind(): void;
|
|
1481
|
+
private _activateMatch;
|
|
1482
|
+
private _scrollCellIntoView;
|
|
1483
|
+
private toggleValidationPanel;
|
|
1484
|
+
private openValidationPanel;
|
|
1485
|
+
private isCurrentValidationRequest;
|
|
1486
|
+
private renderValidationPanel;
|
|
1487
|
+
private positionValidationPanel;
|
|
1488
|
+
private installValidationOutsideHandler;
|
|
1489
|
+
private hideValidationPanel;
|
|
1490
|
+
private buildCommentMap;
|
|
1491
|
+
private buildHyperlinkMap;
|
|
1492
|
+
private hyperlinkAtCell;
|
|
1493
|
+
private dispatchHyperlink;
|
|
1494
|
+
private navigateInternalHyperlink;
|
|
1495
|
+
private scheduleCommentPopup;
|
|
1496
|
+
private renderCommentPopup;
|
|
1497
|
+
private hideCommentPopup;
|
|
1498
|
+
private applyPointerSelection;
|
|
1499
|
+
private setupSelectionEvents;
|
|
1500
|
+
private buildTabs;
|
|
1501
|
+
private makeNavButton;
|
|
1502
|
+
private navButtonStyle;
|
|
1503
|
+
private scrollTabs;
|
|
1504
|
+
private updateNavButtons;
|
|
1505
|
+
private updateTabActive;
|
|
1506
|
+
private tabStyle;
|
|
1507
|
+
private tabCss;
|
|
1508
|
+
private buildZoomControl;
|
|
1509
|
+
private zoomPosToScale;
|
|
1510
|
+
private zoomScaleToPos;
|
|
1511
|
+
setScale(scale: number): void;
|
|
1512
|
+
getScale(): number;
|
|
1513
|
+
zoomIn(): void;
|
|
1514
|
+
zoomOut(): void;
|
|
1515
|
+
fitWidth(): void;
|
|
1516
|
+
fitPage(): void;
|
|
1517
|
+
private _fit;
|
|
1518
|
+
private _naturalContentExtent;
|
|
1519
|
+
private updateSpacerSize;
|
|
1520
|
+
private scheduleRender;
|
|
1521
|
+
private renderCurrentSheet;
|
|
1522
|
+
private _reportRenderError;
|
|
1523
|
+
private _renderCurrentSheet;
|
|
1524
|
+
private computeHeaderHighlight;
|
|
1525
|
+
get sheetNames(): string[];
|
|
1526
|
+
get canvasElement(): HTMLCanvasElement;
|
|
1527
|
+
getResourceMetrics(): Promise<OoxmlResourceMetrics>;
|
|
1528
|
+
destroy(): void;
|
|
1529
|
+
private assertOpen;
|
|
1530
|
+
private destroyedError;
|
|
1531
|
+
}
|
|
1532
|
+
declare class XlsxViewer extends XlsxViewerEngine {
|
|
1533
|
+
static fromWorkbook(container: HTMLElement, workbook: XlsxWorkbook, opts?: Omit<XlsxViewerOptions, keyof LoadOptions$1>): Omit<XlsxViewer, 'load'>;
|
|
1534
|
+
constructor(container: HTMLElement, opts?: XlsxViewerOptions);
|
|
1535
|
+
}
|
|
1536
|
+
declare class XlsxSheetViewer implements ZoomableViewer {
|
|
1537
|
+
readonly canvasElement: HTMLCanvasElement;
|
|
1538
|
+
private readonly engine;
|
|
1539
|
+
private readonly canvasMount;
|
|
1540
|
+
private destroyed;
|
|
1541
|
+
private snapshot;
|
|
1542
|
+
private lastMetrics;
|
|
1543
|
+
static fromWorkbook(canvasElement: HTMLCanvasElement, workbook: XlsxWorkbook, options?: Omit<XlsxSheetViewerOptions, keyof LoadOptions$1>): Omit<XlsxSheetViewer, 'load'>;
|
|
1544
|
+
constructor(canvasElement: HTMLCanvasElement, options?: XlsxSheetViewerOptions);
|
|
1545
|
+
load(source: string | ArrayBuffer): Promise<void>;
|
|
1546
|
+
get sheetIndex(): number;
|
|
1547
|
+
get sheetCount(): number;
|
|
1548
|
+
get sheetNames(): string[];
|
|
1549
|
+
goToSheet(index: number): Promise<void>;
|
|
1550
|
+
nextSheet(): Promise<void>;
|
|
1551
|
+
prevSheet(): Promise<void>;
|
|
1552
|
+
getViewportOffset(): XlsxViewportOffset;
|
|
1553
|
+
setViewportOffset(offset: XlsxViewportOffset): Promise<void>;
|
|
1554
|
+
scrollToCell(ref: string, options?: XlsxScrollToCellOptions): Promise<void>;
|
|
1555
|
+
relayout(): Promise<void>;
|
|
1556
|
+
getScale(): number;
|
|
1557
|
+
setScale(scale: number): void;
|
|
1558
|
+
zoomIn(): void;
|
|
1559
|
+
zoomOut(): void;
|
|
1560
|
+
fitWidth(): void;
|
|
1561
|
+
fitPage(): void;
|
|
1562
|
+
getCellAt(clientX: number, clientY: number): CellAddress | null;
|
|
1563
|
+
get selection(): CellRange | null;
|
|
1564
|
+
select(ref: string): void;
|
|
1565
|
+
setSelectionColor(color: string): void;
|
|
1566
|
+
setHiddenSheetMode(mode: HiddenSheetMode): Promise<void>;
|
|
1567
|
+
get hiddenSheetMode(): HiddenSheetMode;
|
|
1568
|
+
get visibleSheetCount(): number;
|
|
1569
|
+
findText(query: string, options?: FindMatchesOptions): Promise<FindMatch<XlsxMatchLocation>[]>;
|
|
1570
|
+
findNext(): Promise<FindMatch<XlsxMatchLocation> | null>;
|
|
1571
|
+
findPrev(): Promise<FindMatch<XlsxMatchLocation> | null>;
|
|
1572
|
+
clearFind(): void;
|
|
1573
|
+
getResourceMetrics(): Promise<OoxmlResourceMetrics>;
|
|
1574
|
+
destroy(): void;
|
|
1575
|
+
private captureSnapshot;
|
|
1576
|
+
private assertOpen;
|
|
1577
|
+
private destroyedError;
|
|
3535
1578
|
}
|
|
3536
|
-
//#endregion
|
|
3537
|
-
//#region packages/xlsx/src/shared-strings.d.ts
|
|
3538
|
-
/**
|
|
3539
|
-
* Resolve every `{ type: 'shared', si }` cell in `ws` to a concrete
|
|
3540
|
-
* `{ type: 'text', text, runs? }` by looking `si` up in the workbook
|
|
3541
|
-
* `sharedStrings` table (ECMA-376 §18.4.8). Mutates cells in place and returns
|
|
3542
|
-
* `ws` for chaining. Out-of-range / missing `si` resolves to empty text —
|
|
3543
|
-
* matching the parser's historical fallback. Idempotent: a `Worksheet` with no
|
|
3544
|
-
* `shared` cells is returned unchanged.
|
|
3545
|
-
*
|
|
3546
|
-
* This keeps the dedup win on the wire (each shared string ships ONCE in the
|
|
3547
|
-
* workbook) while every downstream consumer — renderer, formula engine, number
|
|
3548
|
-
* formatter, markdown — still sees fully-resolved cell text.
|
|
3549
|
-
*/
|
|
3550
1579
|
declare function resolveSharedStrings(ws: Worksheet, sharedStrings: SharedString[]): Worksheet;
|
|
3551
1580
|
//#endregion
|
|
3552
|
-
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 XlsxTextRunInfo, XlsxViewer, type XlsxViewerOptions, XlsxWorkbook, autoResize, isOoxmlDecodedImageLimitError, openExternalHyperlink, resolveSharedStrings };
|
|
1581
|
+
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 };
|