@silurus/ooxml 0.5.0 → 0.7.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 +12 -7
- package/dist/docx-5SgqrF74.cjs +1 -0
- package/dist/docx-BdQTKYcj.js +827 -0
- package/dist/docx.cjs +1 -1
- package/dist/docx.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +3 -3
- package/dist/pptx-BGtPXrb6.cjs +1 -0
- package/dist/pptx-CsVDY5Ej.js +23787 -0
- package/dist/pptx.cjs +1 -1
- package/dist/pptx.mjs +1 -1
- package/dist/renderer-B8QsMFSc.cjs +1 -0
- package/dist/renderer-BrgdtBit.js +564 -0
- package/dist/types/docx.d.ts +11 -0
- package/dist/types/index.d.ts +54 -0
- package/dist/types/pptx.d.ts +26 -0
- package/dist/types/xlsx.d.ts +17 -0
- package/dist/xlsx-5xusOvzv.js +1203 -0
- package/dist/xlsx-DZYw6i9i.cjs +4 -0
- package/dist/xlsx.cjs +1 -1
- package/dist/xlsx.mjs +1 -1
- package/package.json +1 -1
- package/dist/docx-CGvCIxpo.cjs +0 -1
- package/dist/docx-DUycjjDQ.js +0 -809
- package/dist/pptx-BHGTs5zW.js +0 -1682
- package/dist/pptx-CYYMOWs4.cjs +0 -1
- package/dist/renderer-CpJhtczQ.js +0 -494
- package/dist/renderer-ckRjuWz0.cjs +0 -1
- package/dist/xlsx-BAksLJGU.js +0 -1191
- package/dist/xlsx-Cz9qI8c9.cjs +0 -4
package/dist/types/index.d.ts
CHANGED
|
@@ -219,6 +219,20 @@ declare interface ChartData {
|
|
|
219
219
|
catAxisTitle?: string | null;
|
|
220
220
|
/** Value axis title (c:valAx/c:title). */
|
|
221
221
|
valAxisTitle?: string | null;
|
|
222
|
+
/** True when <c:legend> is present. Absence means the legend is hidden. */
|
|
223
|
+
showLegend?: boolean;
|
|
224
|
+
/** `<c:legendPos val>` — "r"|"l"|"t"|"b"|"tr". null/undefined = default ("r"). */
|
|
225
|
+
legendPos?: 'r' | 'l' | 't' | 'b' | 'tr' | null;
|
|
226
|
+
/** Chart title font size in OOXML hundredths of a point (e.g. 1400 = 14pt). */
|
|
227
|
+
titleFontSizeHpt?: number | null;
|
|
228
|
+
/** Chart title font color as a hex string without '#' (srgbClr only). */
|
|
229
|
+
titleFontColor?: string | null;
|
|
230
|
+
/** Chart title font family from `<a:latin typeface>` (ECMA-376 §20.1.4.2.24). */
|
|
231
|
+
titleFontFace?: string | null;
|
|
232
|
+
/** Category axis tick-label font size in hpt (ECMA-376 §21.2.2.17 c:txPr). */
|
|
233
|
+
catAxisFontSizeHpt?: number | null;
|
|
234
|
+
/** Value axis tick-label font size in hpt. */
|
|
235
|
+
valAxisFontSizeHpt?: number | null;
|
|
222
236
|
}
|
|
223
237
|
|
|
224
238
|
/**
|
|
@@ -255,6 +269,10 @@ declare interface ChartElement {
|
|
|
255
269
|
catAxisMajorTickMark: 'cross' | 'out' | 'in' | 'none' | string;
|
|
256
270
|
/** Title font size in OOXML hundredths of a point (1600 = 16pt). null = default. */
|
|
257
271
|
titleFontSizeHpt: number | null;
|
|
272
|
+
/** Title font color as a hex string without '#'. null = default/theme. */
|
|
273
|
+
titleFontColor?: string | null;
|
|
274
|
+
/** Title font family (`<a:latin typeface>`). null = default/theme. */
|
|
275
|
+
titleFontFace?: string | null;
|
|
258
276
|
/** `<c:catAx><c:txPr>` font size (hpt). null = proportional default. */
|
|
259
277
|
catAxisFontSizeHpt: number | null;
|
|
260
278
|
/** `<c:valAx><c:txPr>` font size (hpt). null = proportional default. */
|
|
@@ -284,6 +302,14 @@ declare interface ChartSeries {
|
|
|
284
302
|
* `ChartModel.categories` as X.
|
|
285
303
|
*/
|
|
286
304
|
categories?: string[] | null;
|
|
305
|
+
/**
|
|
306
|
+
* Resolved marker visibility for line/scatter series. ECMA-376 §21.2.2.32
|
|
307
|
+
* `<c:marker><c:symbol>` defaults to "none" for line charts unless the
|
|
308
|
+
* chart-level `<c:marker val="1"/>` or a per-series symbol opts in. When
|
|
309
|
+
* undefined/null the renderer uses its own default (visible) so callers
|
|
310
|
+
* that don't parse markers (e.g. pptx today) keep their existing behavior.
|
|
311
|
+
*/
|
|
312
|
+
showMarker?: boolean | null;
|
|
287
313
|
}
|
|
288
314
|
|
|
289
315
|
declare interface ConditionalFormat {
|
|
@@ -589,6 +615,11 @@ declare interface LineBreak {
|
|
|
589
615
|
declare interface LineSpacing {
|
|
590
616
|
value: number;
|
|
591
617
|
rule: 'auto' | 'exact' | 'atLeast';
|
|
618
|
+
/** True when `w:spacing/@w:line` was set on the paragraph's own pPr or on a
|
|
619
|
+
* named style (not inherited solely from docDefault). Per ECMA-376 §17.6.5,
|
|
620
|
+
* an inherited-only paragraph in a docGrid section snaps to one grid pitch
|
|
621
|
+
* per line, ignoring the multiplier. Defaults to false on JSON parse. */
|
|
622
|
+
explicit?: boolean;
|
|
592
623
|
}
|
|
593
624
|
|
|
594
625
|
/** Options for {@link PptxPresentation.load}. */
|
|
@@ -870,6 +901,7 @@ declare class PptxViewer {
|
|
|
870
901
|
private engine;
|
|
871
902
|
private readonly opts;
|
|
872
903
|
private currentSlide;
|
|
904
|
+
private handle;
|
|
873
905
|
constructor(container: HTMLElement, opts?: PptxViewerOptions);
|
|
874
906
|
/** Load a PPTX from URL or ArrayBuffer and render the first slide. */
|
|
875
907
|
load(source: string | ArrayBuffer): Promise<void>;
|
|
@@ -896,6 +928,14 @@ declare interface PptxViewerOptions extends RenderOptions {
|
|
|
896
928
|
* default — see {@link PptxPresentation.load} for privacy implications.
|
|
897
929
|
*/
|
|
898
930
|
useGoogleFonts?: boolean;
|
|
931
|
+
/**
|
|
932
|
+
* Enable interactive audio/video playback. When true, slides are rendered
|
|
933
|
+
* via {@link PptxPresentation.presentSlide} so media elements become
|
|
934
|
+
* clickable and the viewer draws its own play/pause chrome. When false
|
|
935
|
+
* (default) the viewer renders a static slide with a non-interactive play
|
|
936
|
+
* badge over media posters.
|
|
937
|
+
*/
|
|
938
|
+
enableMediaPlayback?: boolean;
|
|
899
939
|
}
|
|
900
940
|
|
|
901
941
|
declare interface Presentation {
|
|
@@ -1012,6 +1052,12 @@ declare interface SectionProps {
|
|
|
1012
1052
|
footerDistance: number;
|
|
1013
1053
|
titlePage: boolean;
|
|
1014
1054
|
evenAndOddHeaders: boolean;
|
|
1055
|
+
/** ECMA-376 §17.6.5 w:docGrid/@w:type — "default" | "lines" | "linesAndChars" | "snapToChars". */
|
|
1056
|
+
docGridType?: string | null;
|
|
1057
|
+
/** ECMA-376 §17.6.5 w:docGrid/@w:linePitch in pt. When docGridType is "lines" or
|
|
1058
|
+
* "linesAndChars", auto line spacing multiplies against this pitch instead of
|
|
1059
|
+
* the font's natural line height. */
|
|
1060
|
+
docGridLinePitch?: number | null;
|
|
1015
1061
|
}
|
|
1016
1062
|
|
|
1017
1063
|
declare interface Shadow {
|
|
@@ -1053,6 +1099,11 @@ declare interface ShapeElement {
|
|
|
1053
1099
|
adj3: number | null;
|
|
1054
1100
|
/** Fourth adjustment value from prstGeom avLst (e.g. callout tip y). Range 0–100000. */
|
|
1055
1101
|
adj4: number | null;
|
|
1102
|
+
/** adj5-adj8: extra polyline vertices for callouts like accentBorderCallout3. */
|
|
1103
|
+
adj5: number | null;
|
|
1104
|
+
adj6: number | null;
|
|
1105
|
+
adj7: number | null;
|
|
1106
|
+
adj8: number | null;
|
|
1056
1107
|
/** Drop shadow from effectLst > outerShdw (null if not present). */
|
|
1057
1108
|
shadow: Shadow | null;
|
|
1058
1109
|
}
|
|
@@ -1346,6 +1397,9 @@ declare interface XlsxChartSeries {
|
|
|
1346
1397
|
values: (number | null)[];
|
|
1347
1398
|
/** Explicit fill color hex (from c:spPr). Undefined = use palette. */
|
|
1348
1399
|
color?: string | null;
|
|
1400
|
+
/** Marker visibility resolved from `<c:marker>`/chart-level default
|
|
1401
|
+
* (ECMA-376 §21.2.2.32). */
|
|
1402
|
+
showMarker?: boolean;
|
|
1349
1403
|
}
|
|
1350
1404
|
|
|
1351
1405
|
declare class XlsxViewer {
|
package/dist/types/pptx.d.ts
CHANGED
|
@@ -82,6 +82,10 @@ declare interface ChartElement {
|
|
|
82
82
|
catAxisMajorTickMark: 'cross' | 'out' | 'in' | 'none' | string;
|
|
83
83
|
/** Title font size in OOXML hundredths of a point (1600 = 16pt). null = default. */
|
|
84
84
|
titleFontSizeHpt: number | null;
|
|
85
|
+
/** Title font color as a hex string without '#'. null = default/theme. */
|
|
86
|
+
titleFontColor?: string | null;
|
|
87
|
+
/** Title font family (`<a:latin typeface>`). null = default/theme. */
|
|
88
|
+
titleFontFace?: string | null;
|
|
85
89
|
/** `<c:catAx><c:txPr>` font size (hpt). null = proportional default. */
|
|
86
90
|
catAxisFontSizeHpt: number | null;
|
|
87
91
|
/** `<c:valAx><c:txPr>` font size (hpt). null = proportional default. */
|
|
@@ -111,6 +115,14 @@ declare interface ChartSeries {
|
|
|
111
115
|
* `ChartModel.categories` as X.
|
|
112
116
|
*/
|
|
113
117
|
categories?: string[] | null;
|
|
118
|
+
/**
|
|
119
|
+
* Resolved marker visibility for line/scatter series. ECMA-376 §21.2.2.32
|
|
120
|
+
* `<c:marker><c:symbol>` defaults to "none" for line charts unless the
|
|
121
|
+
* chart-level `<c:marker val="1"/>` or a per-series symbol opts in. When
|
|
122
|
+
* undefined/null the renderer uses its own default (visible) so callers
|
|
123
|
+
* that don't parse markers (e.g. pptx today) keep their existing behavior.
|
|
124
|
+
*/
|
|
125
|
+
showMarker?: boolean | null;
|
|
114
126
|
}
|
|
115
127
|
|
|
116
128
|
export declare type Fill = SolidFill | NoFill | GradientFill;
|
|
@@ -314,6 +326,7 @@ export declare class PptxViewer {
|
|
|
314
326
|
private engine;
|
|
315
327
|
private readonly opts;
|
|
316
328
|
private currentSlide;
|
|
329
|
+
private handle;
|
|
317
330
|
constructor(container: HTMLElement, opts?: PptxViewerOptions);
|
|
318
331
|
/** Load a PPTX from URL or ArrayBuffer and render the first slide. */
|
|
319
332
|
load(source: string | ArrayBuffer): Promise<void>;
|
|
@@ -340,6 +353,14 @@ export declare interface PptxViewerOptions extends RenderOptions {
|
|
|
340
353
|
* default — see {@link PptxPresentation.load} for privacy implications.
|
|
341
354
|
*/
|
|
342
355
|
useGoogleFonts?: boolean;
|
|
356
|
+
/**
|
|
357
|
+
* Enable interactive audio/video playback. When true, slides are rendered
|
|
358
|
+
* via {@link PptxPresentation.presentSlide} so media elements become
|
|
359
|
+
* clickable and the viewer draws its own play/pause chrome. When false
|
|
360
|
+
* (default) the viewer renders a static slide with a non-interactive play
|
|
361
|
+
* badge over media posters.
|
|
362
|
+
*/
|
|
363
|
+
enableMediaPlayback?: boolean;
|
|
343
364
|
}
|
|
344
365
|
|
|
345
366
|
export declare interface Presentation {
|
|
@@ -440,6 +461,11 @@ export declare interface ShapeElement {
|
|
|
440
461
|
adj3: number | null;
|
|
441
462
|
/** Fourth adjustment value from prstGeom avLst (e.g. callout tip y). Range 0–100000. */
|
|
442
463
|
adj4: number | null;
|
|
464
|
+
/** adj5-adj8: extra polyline vertices for callouts like accentBorderCallout3. */
|
|
465
|
+
adj5: number | null;
|
|
466
|
+
adj6: number | null;
|
|
467
|
+
adj7: number | null;
|
|
468
|
+
adj8: number | null;
|
|
443
469
|
/** Drop shadow from effectLst > outerShdw (null if not present). */
|
|
444
470
|
shadow: Shadow | null;
|
|
445
471
|
}
|
package/dist/types/xlsx.d.ts
CHANGED
|
@@ -173,6 +173,20 @@ declare interface ChartData {
|
|
|
173
173
|
catAxisTitle?: string | null;
|
|
174
174
|
/** Value axis title (c:valAx/c:title). */
|
|
175
175
|
valAxisTitle?: string | null;
|
|
176
|
+
/** True when <c:legend> is present. Absence means the legend is hidden. */
|
|
177
|
+
showLegend?: boolean;
|
|
178
|
+
/** `<c:legendPos val>` — "r"|"l"|"t"|"b"|"tr". null/undefined = default ("r"). */
|
|
179
|
+
legendPos?: 'r' | 'l' | 't' | 'b' | 'tr' | null;
|
|
180
|
+
/** Chart title font size in OOXML hundredths of a point (e.g. 1400 = 14pt). */
|
|
181
|
+
titleFontSizeHpt?: number | null;
|
|
182
|
+
/** Chart title font color as a hex string without '#' (srgbClr only). */
|
|
183
|
+
titleFontColor?: string | null;
|
|
184
|
+
/** Chart title font family from `<a:latin typeface>` (ECMA-376 §20.1.4.2.24). */
|
|
185
|
+
titleFontFace?: string | null;
|
|
186
|
+
/** Category axis tick-label font size in hpt (ECMA-376 §21.2.2.17 c:txPr). */
|
|
187
|
+
catAxisFontSizeHpt?: number | null;
|
|
188
|
+
/** Value axis tick-label font size in hpt. */
|
|
189
|
+
valAxisFontSizeHpt?: number | null;
|
|
176
190
|
}
|
|
177
191
|
|
|
178
192
|
declare interface ConditionalFormat {
|
|
@@ -367,6 +381,9 @@ declare interface XlsxChartSeries {
|
|
|
367
381
|
values: (number | null)[];
|
|
368
382
|
/** Explicit fill color hex (from c:spPr). Undefined = use palette. */
|
|
369
383
|
color?: string | null;
|
|
384
|
+
/** Marker visibility resolved from `<c:marker>`/chart-level default
|
|
385
|
+
* (ECMA-376 §21.2.2.32). */
|
|
386
|
+
showMarker?: boolean;
|
|
370
387
|
}
|
|
371
388
|
|
|
372
389
|
export declare class XlsxViewer {
|