@office-open/core 0.8.1 → 0.9.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 +32 -60
- package/dist/chart/index.d.mts +2 -2
- package/dist/chart/index.mjs +2 -2
- package/dist/chart-DNpai28f.mjs +365 -0
- package/dist/descriptor/index.d.mts +2 -0
- package/dist/descriptor/index.mjs +2 -0
- package/dist/descriptor-DKmR7pw-.mjs +282 -0
- package/dist/drawingml/index.d.mts +2 -2
- package/dist/drawingml/index.mjs +2 -2
- package/dist/index-BI-1SKm5.d.mts +153 -0
- package/dist/{index-Cj2Yf5mk.d.mts → index-DByjp6ug.d.mts} +10 -7
- package/dist/index-DNH2sizc.d.mts +137 -0
- package/dist/{index-DEvpdl1o.d.mts → index-RWXzxibP.d.mts} +1416 -1837
- package/dist/{index-D0N5Bw2M.d.mts → index-eu1aFQCm.d.mts} +39 -28
- package/dist/index.d.mts +7 -557
- package/dist/index.mjs +7 -2091
- package/dist/smartart/index.d.mts +2 -2
- package/dist/smartart/index.mjs +2 -2
- package/dist/{smartart-9ZpWgmIy.mjs → smartart-DCY-Vdv7.mjs} +120 -204
- package/dist/src-CU2AFKyt.mjs +7413 -0
- package/dist/theme/index.d.mts +2 -2
- package/dist/theme/index.mjs +2 -2
- package/dist/{theme-FWD_20fH.mjs → theme-CiNzdl-9.mjs} +117 -22
- package/dist/{values.d.mts → util/values.d.mts} +1 -1
- package/dist/{values.mjs → util/values.mjs} +1 -1
- package/dist/{values-BOWpTgBE.mjs → values-CVIZcTRw.mjs} +1 -1
- package/dist/{values-COjPGYkS.d.mts → values-Dqj8cbcy.d.mts} +1 -1
- package/package.json +12 -7
- package/dist/chart-CigYrDhf.mjs +0 -1242
- package/dist/drawingml-B-2eEHAF.mjs +0 -7109
- package/dist/index-Bh6s66Up.d.mts +0 -381
- package/dist/index-CoTp4wVf.d.mts +0 -202
- package/dist/xml-components-BuFdDxHN.mjs +0 -322
|
@@ -1,381 +0,0 @@
|
|
|
1
|
-
import { b as XmlComponent } from "./index-CoTp4wVf.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/chart/axes.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* c:catAx — category axis.
|
|
6
|
-
*
|
|
7
|
-
* XSD sequence: EG_AxShared (axId, scaling, delete, axPos, ..., crossAx, crosses)
|
|
8
|
-
* then: auto, lblAlgn, lblOffset, tickLblSkip, tickMarkSkip, noMultiLvlLbl
|
|
9
|
-
*/
|
|
10
|
-
declare class CatAx extends XmlComponent {
|
|
11
|
-
constructor(axId: number, crossAx: number);
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* c:valAx — value axis.
|
|
15
|
-
*
|
|
16
|
-
* XSD sequence: EG_AxShared (axId, scaling, delete, axPos, ..., spPr, ..., crossAx, crosses)
|
|
17
|
-
* then: crossBetween, majorUnit, minorUnit, dispUnits
|
|
18
|
-
*/
|
|
19
|
-
declare class ValAx extends XmlComponent {
|
|
20
|
-
constructor(axId: number, crossAx: number);
|
|
21
|
-
}
|
|
22
|
-
declare class SerAx extends XmlComponent {
|
|
23
|
-
constructor(axId: number, crossAx: number);
|
|
24
|
-
}
|
|
25
|
-
//#endregion
|
|
26
|
-
//#region src/chart/chart-types/bubble-chart.d.ts
|
|
27
|
-
interface BubbleSeriesData {
|
|
28
|
-
readonly name: string;
|
|
29
|
-
readonly xValues: readonly number[];
|
|
30
|
-
readonly yValues: readonly number[];
|
|
31
|
-
readonly bubbleSize: readonly number[];
|
|
32
|
-
}
|
|
33
|
-
interface BubbleChartOptions$1 {
|
|
34
|
-
readonly series: readonly BubbleSeriesData[];
|
|
35
|
-
}
|
|
36
|
-
declare class BubbleChart extends XmlComponent {
|
|
37
|
-
constructor(options: BubbleChartOptions$1);
|
|
38
|
-
}
|
|
39
|
-
//#endregion
|
|
40
|
-
//#region src/chart/extensions.d.ts
|
|
41
|
-
declare const TrendlineType: {
|
|
42
|
-
readonly EXP: "exp";
|
|
43
|
-
readonly LINEAR: "linear";
|
|
44
|
-
readonly LOG: "log";
|
|
45
|
-
readonly MOVING_AVG: "movingAvg";
|
|
46
|
-
readonly POLY: "poly";
|
|
47
|
-
readonly POWER: "power";
|
|
48
|
-
};
|
|
49
|
-
type TrendlineType = (typeof TrendlineType)[keyof typeof TrendlineType];
|
|
50
|
-
interface TrendlineOptions {
|
|
51
|
-
/** Trendline type (default: "linear") */
|
|
52
|
-
readonly type?: TrendlineType;
|
|
53
|
-
/** Custom name for the trendline */
|
|
54
|
-
readonly name?: string;
|
|
55
|
-
/** Order for polynomial trendlines (default: 2) */
|
|
56
|
-
readonly order?: number;
|
|
57
|
-
/** Period for moving average trendlines (default: 2) */
|
|
58
|
-
readonly period?: number;
|
|
59
|
-
/** Forward forecast periods */
|
|
60
|
-
readonly forward?: number;
|
|
61
|
-
/** Backward forecast periods */
|
|
62
|
-
readonly backward?: number;
|
|
63
|
-
/** Intercept value */
|
|
64
|
-
readonly intercept?: number;
|
|
65
|
-
/** Display R-squared value */
|
|
66
|
-
readonly dispRSqr?: boolean;
|
|
67
|
-
/** Display equation */
|
|
68
|
-
readonly dispEq?: boolean;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* c:trendline — a trendline on a chart series.
|
|
72
|
-
*
|
|
73
|
-
* XSD: CT_Trendline (dml-chart.xsd)
|
|
74
|
-
*/
|
|
75
|
-
declare class Trendline extends XmlComponent {
|
|
76
|
-
constructor(options: TrendlineOptions);
|
|
77
|
-
}
|
|
78
|
-
declare const ErrorBarDirection: {
|
|
79
|
-
readonly BOTH: "both";
|
|
80
|
-
readonly X: "x";
|
|
81
|
-
readonly Y: "y";
|
|
82
|
-
};
|
|
83
|
-
type ErrorBarDirection = (typeof ErrorBarDirection)[keyof typeof ErrorBarDirection];
|
|
84
|
-
declare const ErrorBarType: {
|
|
85
|
-
readonly BOTH: "both";
|
|
86
|
-
readonly MINUS: "minus";
|
|
87
|
-
readonly PLUS: "plus";
|
|
88
|
-
};
|
|
89
|
-
type ErrorBarType = (typeof ErrorBarType)[keyof typeof ErrorBarType];
|
|
90
|
-
declare const ErrorValueType: {
|
|
91
|
-
readonly CUST: "cust";
|
|
92
|
-
readonly FIXED: "fixedVal";
|
|
93
|
-
readonly PERCENTAGE: "percentage";
|
|
94
|
-
readonly STD_DEV: "stdDev";
|
|
95
|
-
readonly STD_ERR: "stdErr";
|
|
96
|
-
};
|
|
97
|
-
type ErrorValueType = (typeof ErrorValueType)[keyof typeof ErrorValueType];
|
|
98
|
-
interface ErrorBarOptions {
|
|
99
|
-
/** Error bar direction (default: "y") */
|
|
100
|
-
readonly direction?: ErrorBarDirection;
|
|
101
|
-
/** Error bar type — both/minus/plus (required) */
|
|
102
|
-
readonly barType?: ErrorBarType;
|
|
103
|
-
/** Error value type (default: "stdErr") */
|
|
104
|
-
readonly valueType?: ErrorValueType;
|
|
105
|
-
/** Error value (for fixed/percentage/stdDev/stdErr) */
|
|
106
|
-
readonly value?: number;
|
|
107
|
-
/** No end cap */
|
|
108
|
-
readonly noEndCap?: boolean;
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* c:errBars — error bars on a chart series.
|
|
112
|
-
*
|
|
113
|
-
* XSD: CT_ErrBars (dml-chart.xsd)
|
|
114
|
-
*/
|
|
115
|
-
declare class ErrorBars extends XmlComponent {
|
|
116
|
-
constructor(options: ErrorBarOptions);
|
|
117
|
-
}
|
|
118
|
-
declare const DataLabelPosition: {
|
|
119
|
-
readonly BEST_FIT: "bestFit";
|
|
120
|
-
readonly BOTTOM: "b";
|
|
121
|
-
readonly CENTER: "ctr";
|
|
122
|
-
readonly IN_BASE: "inBase";
|
|
123
|
-
readonly IN_END: "inEnd";
|
|
124
|
-
readonly LEFT: "l";
|
|
125
|
-
readonly OUT_END: "outEnd";
|
|
126
|
-
readonly RIGHT: "r";
|
|
127
|
-
readonly TOP: "t";
|
|
128
|
-
};
|
|
129
|
-
type DataLabelPosition = (typeof DataLabelPosition)[keyof typeof DataLabelPosition];
|
|
130
|
-
interface DataLabelsOptions {
|
|
131
|
-
/** Data label position */
|
|
132
|
-
readonly position?: DataLabelPosition;
|
|
133
|
-
/** Show value */
|
|
134
|
-
readonly showVal?: boolean;
|
|
135
|
-
/** Show category name */
|
|
136
|
-
readonly showCatName?: boolean;
|
|
137
|
-
/** Show series name */
|
|
138
|
-
readonly showSerName?: boolean;
|
|
139
|
-
/** Show percentage */
|
|
140
|
-
readonly showPercent?: boolean;
|
|
141
|
-
/** Show legend key */
|
|
142
|
-
readonly showLegendKey?: boolean;
|
|
143
|
-
/** Show bubble size */
|
|
144
|
-
readonly showBubbleSize?: boolean;
|
|
145
|
-
/** Separator character */
|
|
146
|
-
readonly separator?: string;
|
|
147
|
-
/** Number format */
|
|
148
|
-
readonly numFmt?: string;
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* c:dLbls — data labels settings for a chart series.
|
|
152
|
-
*
|
|
153
|
-
* Implements EG_DLblShared group from dml-chart.xsd.
|
|
154
|
-
*/
|
|
155
|
-
declare class DataLabels extends XmlComponent {
|
|
156
|
-
constructor(options: DataLabelsOptions);
|
|
157
|
-
}
|
|
158
|
-
declare const TimeUnit: {
|
|
159
|
-
readonly DAYS: "days";
|
|
160
|
-
readonly MONTHS: "months";
|
|
161
|
-
readonly YEARS: "years";
|
|
162
|
-
};
|
|
163
|
-
type TimeUnit = (typeof TimeUnit)[keyof typeof TimeUnit];
|
|
164
|
-
/**
|
|
165
|
-
* c:dateAx — date axis for time-series data.
|
|
166
|
-
*
|
|
167
|
-
* XSD: CT_DateAx (dml-chart.xsd)
|
|
168
|
-
*/
|
|
169
|
-
declare class DateAx extends XmlComponent {
|
|
170
|
-
constructor(axId: number, crossAx: number);
|
|
171
|
-
}
|
|
172
|
-
interface View3DOptions {
|
|
173
|
-
/** X rotation in degrees (-90 to 90, default: 30) */
|
|
174
|
-
readonly rotX?: number;
|
|
175
|
-
/** Y rotation in degrees (0 to 360, default: 0) */
|
|
176
|
-
readonly rotY?: number;
|
|
177
|
-
/** Height percentage (5 to 500) */
|
|
178
|
-
readonly heightPercent?: number;
|
|
179
|
-
/** Depth percentage (20 to 2000, default: 100) */
|
|
180
|
-
readonly depthPercent?: number;
|
|
181
|
-
/** Right angle axes */
|
|
182
|
-
readonly rightAngleAxes?: boolean;
|
|
183
|
-
/** Perspective (0 to 240) */
|
|
184
|
-
readonly perspective?: number;
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* c:view3D — 3D view properties for 3D charts.
|
|
188
|
-
*
|
|
189
|
-
* XSD: CT_View3D (dml-chart.xsd)
|
|
190
|
-
*/
|
|
191
|
-
declare class View3D extends XmlComponent {
|
|
192
|
-
constructor(options?: View3DOptions);
|
|
193
|
-
}
|
|
194
|
-
//#endregion
|
|
195
|
-
//#region src/chart/create-chart-type.d.ts
|
|
196
|
-
interface ChartSeriesData {
|
|
197
|
-
readonly name: string;
|
|
198
|
-
readonly values: readonly number[];
|
|
199
|
-
/** Trendlines for this series */
|
|
200
|
-
readonly trendlines?: readonly TrendlineOptions[];
|
|
201
|
-
/** Error bars for this series */
|
|
202
|
-
readonly errorBars?: ErrorBarOptions;
|
|
203
|
-
/** Data labels for this series */
|
|
204
|
-
readonly dataLabels?: DataLabelsOptions;
|
|
205
|
-
}
|
|
206
|
-
type ChartType = "column" | "bar" | "line" | "pie" | "area" | "scatter" | "bubble" | "doughnut" | "radar" | "stock" | "surface";
|
|
207
|
-
type AxisChartType = Exclude<ChartType, "bubble">;
|
|
208
|
-
interface ChartTypeOptions {
|
|
209
|
-
readonly type: AxisChartType;
|
|
210
|
-
readonly series: readonly ChartSeriesData[];
|
|
211
|
-
readonly categories: readonly string[];
|
|
212
|
-
readonly threeD?: boolean;
|
|
213
|
-
}
|
|
214
|
-
type BubbleChartOptions = {
|
|
215
|
-
readonly type: "bubble";
|
|
216
|
-
readonly series: readonly BubbleSeriesData[];
|
|
217
|
-
};
|
|
218
|
-
type AllChartTypeOptions = ChartTypeOptions | BubbleChartOptions;
|
|
219
|
-
declare const createChartType: (options: AllChartTypeOptions) => XmlComponent;
|
|
220
|
-
//#endregion
|
|
221
|
-
//#region src/chart/chart-space.d.ts
|
|
222
|
-
interface ChartSpaceOptions {
|
|
223
|
-
readonly title?: string;
|
|
224
|
-
readonly type: ChartType;
|
|
225
|
-
readonly categories?: readonly string[];
|
|
226
|
-
readonly series: readonly ChartSeriesData[] | readonly BubbleSeriesData[];
|
|
227
|
-
readonly showLegend?: boolean;
|
|
228
|
-
readonly style?: number;
|
|
229
|
-
readonly threeD?: boolean;
|
|
230
|
-
}
|
|
231
|
-
/**
|
|
232
|
-
* c:chartSpace — root element for chart XML parts.
|
|
233
|
-
*/
|
|
234
|
-
declare class ChartSpace extends XmlComponent {
|
|
235
|
-
constructor(options: ChartSpaceOptions);
|
|
236
|
-
}
|
|
237
|
-
//#endregion
|
|
238
|
-
//#region src/chart/chart-collection.d.ts
|
|
239
|
-
interface ChartData {
|
|
240
|
-
readonly key: string;
|
|
241
|
-
readonly chartSpace: XmlComponent;
|
|
242
|
-
}
|
|
243
|
-
declare class ChartCollection {
|
|
244
|
-
private readonly map;
|
|
245
|
-
constructor();
|
|
246
|
-
addChart(key: string, chartData: ChartData): void;
|
|
247
|
-
get array(): readonly ChartData[];
|
|
248
|
-
}
|
|
249
|
-
//#endregion
|
|
250
|
-
//#region src/chart/series/series-data.d.ts
|
|
251
|
-
declare const createStrRef: (values: string | readonly string[]) => XmlComponent;
|
|
252
|
-
declare const createNumRef: (values: readonly number[]) => XmlComponent;
|
|
253
|
-
//#endregion
|
|
254
|
-
//#region src/chart/title.d.ts
|
|
255
|
-
declare class ChartTitle extends XmlComponent {
|
|
256
|
-
constructor(title: string);
|
|
257
|
-
}
|
|
258
|
-
//#endregion
|
|
259
|
-
//#region src/chart/chart-types/area-chart.d.ts
|
|
260
|
-
interface AreaChartOptions {
|
|
261
|
-
readonly categories: readonly string[];
|
|
262
|
-
readonly series: readonly ChartSeriesData[];
|
|
263
|
-
}
|
|
264
|
-
declare class AreaChart extends XmlComponent {
|
|
265
|
-
constructor(options: AreaChartOptions);
|
|
266
|
-
}
|
|
267
|
-
//#endregion
|
|
268
|
-
//#region src/chart/chart-types/area3d-chart.d.ts
|
|
269
|
-
interface Area3DChartOptions {
|
|
270
|
-
readonly categories: readonly string[];
|
|
271
|
-
readonly series: readonly ChartSeriesData[];
|
|
272
|
-
}
|
|
273
|
-
declare class Area3DChart extends XmlComponent {
|
|
274
|
-
constructor(options: Area3DChartOptions);
|
|
275
|
-
}
|
|
276
|
-
//#endregion
|
|
277
|
-
//#region src/chart/chart-types/bar-chart.d.ts
|
|
278
|
-
interface BarChartOptions {
|
|
279
|
-
readonly barDirection: "col" | "bar";
|
|
280
|
-
readonly categories: readonly string[];
|
|
281
|
-
readonly series: readonly ChartSeriesData[];
|
|
282
|
-
}
|
|
283
|
-
declare class BarChart extends XmlComponent {
|
|
284
|
-
constructor(options: BarChartOptions);
|
|
285
|
-
}
|
|
286
|
-
//#endregion
|
|
287
|
-
//#region src/chart/chart-types/bar3d-chart.d.ts
|
|
288
|
-
interface Bar3DChartOptions {
|
|
289
|
-
readonly barDirection: "col" | "bar";
|
|
290
|
-
readonly categories: readonly string[];
|
|
291
|
-
readonly series: readonly ChartSeriesData[];
|
|
292
|
-
}
|
|
293
|
-
declare class Bar3DChart extends XmlComponent {
|
|
294
|
-
constructor(options: Bar3DChartOptions);
|
|
295
|
-
}
|
|
296
|
-
//#endregion
|
|
297
|
-
//#region src/chart/chart-types/doughnut-chart.d.ts
|
|
298
|
-
interface DoughnutChartOptions {
|
|
299
|
-
readonly holeSize?: number;
|
|
300
|
-
readonly series: readonly ChartSeriesData[];
|
|
301
|
-
readonly categories: readonly string[];
|
|
302
|
-
}
|
|
303
|
-
declare class DoughnutChart extends XmlComponent {
|
|
304
|
-
constructor(options: DoughnutChartOptions);
|
|
305
|
-
}
|
|
306
|
-
//#endregion
|
|
307
|
-
//#region src/chart/chart-types/line-chart.d.ts
|
|
308
|
-
interface LineChartOptions {
|
|
309
|
-
readonly categories: readonly string[];
|
|
310
|
-
readonly series: readonly ChartSeriesData[];
|
|
311
|
-
}
|
|
312
|
-
declare class LineChart extends XmlComponent {
|
|
313
|
-
constructor(options: LineChartOptions);
|
|
314
|
-
}
|
|
315
|
-
//#endregion
|
|
316
|
-
//#region src/chart/chart-types/line3d-chart.d.ts
|
|
317
|
-
interface Line3DChartOptions {
|
|
318
|
-
readonly categories: readonly string[];
|
|
319
|
-
readonly series: readonly ChartSeriesData[];
|
|
320
|
-
}
|
|
321
|
-
declare class Line3DChart extends XmlComponent {
|
|
322
|
-
constructor(options: Line3DChartOptions);
|
|
323
|
-
}
|
|
324
|
-
//#endregion
|
|
325
|
-
//#region src/chart/chart-types/pie-chart.d.ts
|
|
326
|
-
interface PieChartOptions {
|
|
327
|
-
readonly categories: readonly string[];
|
|
328
|
-
readonly series: readonly ChartSeriesData[];
|
|
329
|
-
}
|
|
330
|
-
declare class PieChart extends XmlComponent {
|
|
331
|
-
constructor(options: PieChartOptions);
|
|
332
|
-
}
|
|
333
|
-
//#endregion
|
|
334
|
-
//#region src/chart/chart-types/pie3d-chart.d.ts
|
|
335
|
-
interface Pie3DChartOptions {
|
|
336
|
-
readonly categories: readonly string[];
|
|
337
|
-
readonly series: readonly ChartSeriesData[];
|
|
338
|
-
}
|
|
339
|
-
declare class Pie3DChart extends XmlComponent {
|
|
340
|
-
constructor(options: Pie3DChartOptions);
|
|
341
|
-
}
|
|
342
|
-
//#endregion
|
|
343
|
-
//#region src/chart/chart-types/radar-chart.d.ts
|
|
344
|
-
interface RadarChartOptions {
|
|
345
|
-
readonly radarStyle?: "filled" | "marker" | "line";
|
|
346
|
-
readonly categories: readonly string[];
|
|
347
|
-
readonly series: readonly ChartSeriesData[];
|
|
348
|
-
}
|
|
349
|
-
declare class RadarChart extends XmlComponent {
|
|
350
|
-
constructor(options: RadarChartOptions);
|
|
351
|
-
}
|
|
352
|
-
//#endregion
|
|
353
|
-
//#region src/chart/chart-types/scatter-chart.d.ts
|
|
354
|
-
interface ScatterChartOptions {
|
|
355
|
-
readonly categories: readonly string[];
|
|
356
|
-
readonly series: readonly ChartSeriesData[];
|
|
357
|
-
}
|
|
358
|
-
declare class ScatterChart extends XmlComponent {
|
|
359
|
-
constructor(options: ScatterChartOptions);
|
|
360
|
-
}
|
|
361
|
-
//#endregion
|
|
362
|
-
//#region src/chart/chart-types/stock-chart.d.ts
|
|
363
|
-
interface StockChartOptions {
|
|
364
|
-
readonly categories: readonly string[];
|
|
365
|
-
readonly series: readonly ChartSeriesData[];
|
|
366
|
-
}
|
|
367
|
-
declare class StockChart extends XmlComponent {
|
|
368
|
-
constructor(options: StockChartOptions);
|
|
369
|
-
}
|
|
370
|
-
//#endregion
|
|
371
|
-
//#region src/chart/chart-types/surface-chart.d.ts
|
|
372
|
-
interface SurfaceChartOptions {
|
|
373
|
-
readonly wireframe?: boolean;
|
|
374
|
-
readonly categories: readonly string[];
|
|
375
|
-
readonly series: readonly ChartSeriesData[];
|
|
376
|
-
}
|
|
377
|
-
declare class SurfaceChart extends XmlComponent {
|
|
378
|
-
constructor(options: SurfaceChartOptions);
|
|
379
|
-
}
|
|
380
|
-
//#endregion
|
|
381
|
-
export { DataLabelsOptions as A, TrendlineType as B, BubbleChartOptions as C, createChartType as D, ChartTypeOptions as E, ErrorBars as F, CatAx as G, View3DOptions as H, ErrorValueType as I, SerAx as K, TimeUnit as L, ErrorBarDirection as M, ErrorBarOptions as N, DataLabelPosition as O, ErrorBarType as P, Trendline as R, AxisChartType as S, ChartType as T, BubbleChart as U, View3D as V, BubbleSeriesData as W, ChartCollection as _, Pie3DChart as a, ChartSpaceOptions as b, LineChart as c, BarChart as d, Area3DChart as f, createStrRef as g, createNumRef as h, RadarChart as i, DateAx as j, DataLabels as k, DoughnutChart as l, ChartTitle as m, StockChart as n, PieChart as o, AreaChart as p, ValAx as q, ScatterChart as r, Line3DChart as s, SurfaceChart as t, Bar3DChart as u, ChartData as v, ChartSeriesData as w, AllChartTypeOptions as x, ChartSpace as y, TrendlineOptions as z };
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
import { r as PositiveUniversalMeasure } from "./values-COjPGYkS.mjs";
|
|
2
|
-
import { Attributes, Element } from "@office-open/xml";
|
|
3
|
-
|
|
4
|
-
//#region src/xml-components/types.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* XML-serializable object types for OOXML document generation.
|
|
7
|
-
*
|
|
8
|
-
* @module
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* Attributes for an XML element.
|
|
12
|
-
*/
|
|
13
|
-
type IXmlAttribute = Readonly<Record<string, string | number | boolean>>;
|
|
14
|
-
/**
|
|
15
|
-
* Object that can be serialized to XML.
|
|
16
|
-
*
|
|
17
|
-
* Uses `unknown` values (instead of `any`) for type safety at call sites,
|
|
18
|
-
* while remaining compatible with the dynamic XML serialization pipeline.
|
|
19
|
-
*/
|
|
20
|
-
type IXmlableObject = Readonly<Record<string, unknown>>;
|
|
21
|
-
//#endregion
|
|
22
|
-
//#region src/xml-components/base.d.ts
|
|
23
|
-
/**
|
|
24
|
-
* Context object passed through the XML tree during serialization.
|
|
25
|
-
*
|
|
26
|
-
* @typeParam TFileData - The type of the root file data object (format-specific)
|
|
27
|
-
*/
|
|
28
|
-
interface Context<TFileData = unknown> {
|
|
29
|
-
/** The root file data object being serialized (format-specific). */
|
|
30
|
-
readonly fileData?: TFileData;
|
|
31
|
-
/** Current traversal stack of components (mutable for performance). */
|
|
32
|
-
readonly stack: BaseXmlComponent[];
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Abstract base class for all XML components.
|
|
36
|
-
*/
|
|
37
|
-
declare abstract class BaseXmlComponent {
|
|
38
|
-
/** The XML element name for this component (e.g., "w:p" for paragraph). */
|
|
39
|
-
protected readonly rootKey: string;
|
|
40
|
-
constructor(rootKey: string);
|
|
41
|
-
/**
|
|
42
|
-
* Direct XML serialization. Override in subclasses for zero-allocation output.
|
|
43
|
-
*/
|
|
44
|
-
toXml(_context: Context): string;
|
|
45
|
-
}
|
|
46
|
-
//#endregion
|
|
47
|
-
//#region src/xml-components/component.d.ts
|
|
48
|
-
/**
|
|
49
|
-
* Empty object singleton used for empty XML elements.
|
|
50
|
-
*
|
|
51
|
-
* @internal
|
|
52
|
-
*/
|
|
53
|
-
declare const EMPTY_OBJECT: {};
|
|
54
|
-
/**
|
|
55
|
-
* Base class for all XML components in OOXML documents.
|
|
56
|
-
*
|
|
57
|
-
* `toXml()` traverses the `root` array and calls `toXml()` on each
|
|
58
|
-
* `BaseXmlComponent` child — this avoids building the intermediate
|
|
59
|
-
* `IXmlableObject` tree. Inline `IXmlableObject` children fall back to
|
|
60
|
-
* `xml()` for serialization.
|
|
61
|
-
*/
|
|
62
|
-
declare abstract class XmlComponent extends BaseXmlComponent {
|
|
63
|
-
/**
|
|
64
|
-
* Array of child components, text nodes, and attributes.
|
|
65
|
-
*/
|
|
66
|
-
root: (BaseXmlComponent | IXmlableObject | string)[];
|
|
67
|
-
constructor(rootKey: string);
|
|
68
|
-
/**
|
|
69
|
-
* Direct XML serialization — traverses `root` and calls `toXml()` on
|
|
70
|
-
* each child, concatenating the results into a single string.
|
|
71
|
-
*/
|
|
72
|
-
toXml(context: Context): string;
|
|
73
|
-
/**
|
|
74
|
-
* @internal
|
|
75
|
-
*/
|
|
76
|
-
addChildElement(child: BaseXmlComponent | string): XmlComponent;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* XML component that is excluded from output if it has no meaningful content.
|
|
80
|
-
*/
|
|
81
|
-
declare abstract class IgnoreIfEmptyXmlComponent extends XmlComponent {
|
|
82
|
-
private readonly includeIfEmpty;
|
|
83
|
-
constructor(rootKey: string, includeIfEmpty?: boolean);
|
|
84
|
-
/**
|
|
85
|
-
* Suppress empty elements — super.toXml() produces a self-closing tag
|
|
86
|
-
* (`<tag/>`) when there are no child elements; IgnoreIfEmpty returns ""
|
|
87
|
-
* in that case. Child components that already override toXml() (e.g.
|
|
88
|
-
* Worksheet) are unaffected.
|
|
89
|
-
*/
|
|
90
|
-
toXml(context: Context): string;
|
|
91
|
-
}
|
|
92
|
-
//#endregion
|
|
93
|
-
//#region src/xml-components/attributes.d.ts
|
|
94
|
-
/**
|
|
95
|
-
* XML attribute types for OOXML document generation.
|
|
96
|
-
*
|
|
97
|
-
* @module
|
|
98
|
-
*/
|
|
99
|
-
/**
|
|
100
|
-
* Structured attribute payload with explicit key-value mapping.
|
|
101
|
-
*/
|
|
102
|
-
type AttributePayload<T> = { readonly [P in keyof T]: {
|
|
103
|
-
readonly key: string;
|
|
104
|
-
readonly value: T[P];
|
|
105
|
-
} };
|
|
106
|
-
//#endregion
|
|
107
|
-
//#region src/xml-components/elements.d.ts
|
|
108
|
-
/**
|
|
109
|
-
* Build an XML element with arbitrary attributes, filtering out undefined values.
|
|
110
|
-
*/
|
|
111
|
-
declare function attrObj(name: string, attrs: Record<string, string | number | boolean | undefined>): IXmlableObject;
|
|
112
|
-
/**
|
|
113
|
-
* Build a CT_OnOff XML object without allocating any XmlComponent.
|
|
114
|
-
* `val=true` returns a frozen singleton (cached per name).
|
|
115
|
-
*/
|
|
116
|
-
declare function onOffObj(name: string, val?: boolean | undefined): IXmlableObject;
|
|
117
|
-
/**
|
|
118
|
-
* Build a CT_HpsMeasure XML object (half-point size) without allocation.
|
|
119
|
-
*/
|
|
120
|
-
declare function hpsMeasureObj(name: string, val: number | PositiveUniversalMeasure): IXmlableObject;
|
|
121
|
-
/**
|
|
122
|
-
* Build a CT_String XML object (string value attribute) without allocation.
|
|
123
|
-
*/
|
|
124
|
-
declare function stringValObj(name: string, val: string): IXmlableObject;
|
|
125
|
-
/**
|
|
126
|
-
* Build a numeric value attribute XML object without allocation.
|
|
127
|
-
*/
|
|
128
|
-
declare function numberValObj(name: string, val: number): IXmlableObject;
|
|
129
|
-
/**
|
|
130
|
-
* Build a string enum value attribute XML object without allocation.
|
|
131
|
-
*/
|
|
132
|
-
declare function stringEnumValObj<T extends string>(name: string, val: T): IXmlableObject;
|
|
133
|
-
/**
|
|
134
|
-
* Build an element wrapping a text string without allocation.
|
|
135
|
-
*/
|
|
136
|
-
declare function stringContainerObj(name: string, val: string): IXmlableObject;
|
|
137
|
-
/**
|
|
138
|
-
* XML element representing an empty element (CT_Empty).
|
|
139
|
-
*/
|
|
140
|
-
declare class EmptyElement extends XmlComponent {}
|
|
141
|
-
/**
|
|
142
|
-
* Flexible XML element builder with explicit attribute and child configuration.
|
|
143
|
-
*/
|
|
144
|
-
declare class BuilderElement<T = {}> extends XmlComponent {
|
|
145
|
-
constructor({
|
|
146
|
-
name,
|
|
147
|
-
attributes,
|
|
148
|
-
children
|
|
149
|
-
}: {
|
|
150
|
-
readonly name: string;
|
|
151
|
-
readonly attributes?: AttributePayload<T>;
|
|
152
|
-
readonly children?: readonly (BaseXmlComponent | IXmlableObject | string)[];
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Builds an attribute-only IXmlableObject from a plain key-value record.
|
|
157
|
-
*/
|
|
158
|
-
declare function buildAttrObject(attrs: Record<string, string | number | boolean>): IXmlableObject;
|
|
159
|
-
/**
|
|
160
|
-
* Creates an attribute IXmlableObject for chart elements.
|
|
161
|
-
*/
|
|
162
|
-
declare const chartAttr: (attrs: Record<string, string | number | boolean>) => IXmlableObject;
|
|
163
|
-
/**
|
|
164
|
-
* Wraps a component in a named XmlComponent element.
|
|
165
|
-
*/
|
|
166
|
-
declare function wrapEl(elementName: string, child: BaseXmlComponent | IXmlableObject): XmlComponent;
|
|
167
|
-
//#endregion
|
|
168
|
-
//#region src/xml-components/imported.d.ts
|
|
169
|
-
/**
|
|
170
|
-
* Converts an xml-js Element into an XmlComponent tree.
|
|
171
|
-
*/
|
|
172
|
-
declare const convertToXmlComponent: (element: Element) => ImportedXmlComponent | string | undefined;
|
|
173
|
-
/**
|
|
174
|
-
* XML component representing imported XML content.
|
|
175
|
-
*/
|
|
176
|
-
declare class ImportedXmlComponent extends XmlComponent {
|
|
177
|
-
protected _sourceXml?: string;
|
|
178
|
-
static fromXmlString(importedContent: string): ImportedXmlComponent;
|
|
179
|
-
get sourceXml(): string | undefined;
|
|
180
|
-
toXml(_context: Context): string;
|
|
181
|
-
constructor(rootKey: string, _attr?: Attributes);
|
|
182
|
-
push(xmlComponent: XmlComponent | string): void;
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* Represents attributes for imported root elements.
|
|
186
|
-
* The { _attr } in root is consumed by the parent's toXml() serialization.
|
|
187
|
-
*/
|
|
188
|
-
declare class ImportedRootElementAttributes extends XmlComponent {
|
|
189
|
-
private readonly _attr?;
|
|
190
|
-
constructor(_attr?: Attributes | undefined);
|
|
191
|
-
toXml(_context: Context): string;
|
|
192
|
-
}
|
|
193
|
-
//#endregion
|
|
194
|
-
//#region src/xml-components/initializable.d.ts
|
|
195
|
-
/**
|
|
196
|
-
* XML component that can be initialized from another component.
|
|
197
|
-
*/
|
|
198
|
-
declare abstract class InitializableXmlComponent extends XmlComponent {
|
|
199
|
-
constructor(rootKey: string, initComponent?: XmlComponent);
|
|
200
|
-
}
|
|
201
|
-
//#endregion
|
|
202
|
-
export { IXmlAttribute as C, Context as S, AttributePayload as _, BuilderElement as a, XmlComponent as b, buildAttrObject as c, numberValObj as d, onOffObj as f, wrapEl as g, stringValObj as h, convertToXmlComponent as i, chartAttr as l, stringEnumValObj as m, ImportedRootElementAttributes as n, EmptyElement as o, stringContainerObj as p, ImportedXmlComponent as r, attrObj as s, InitializableXmlComponent as t, hpsMeasureObj as u, EMPTY_OBJECT as v, IXmlableObject as w, BaseXmlComponent as x, IgnoreIfEmptyXmlComponent as y };
|