@silurus/ooxml 0.61.0 → 0.63.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.
@@ -769,6 +769,9 @@ export declare interface NumberingInfo {
769
769
  text: string;
770
770
  indentLeft: number;
771
771
  tab: number;
772
+ /** ECMA-376 §17.9.28 `<w:suff>` — "tab" (default) | "space" | "nothing".
773
+ * Where body text starts after the marker on the first line. */
774
+ suff: string;
772
775
  }
773
776
 
774
777
  export declare interface ParaBorderEdge {
@@ -312,6 +312,19 @@ declare interface ChartData {
312
312
  catAxisTitle?: string | null;
313
313
  /** Value axis title (c:valAx/c:title). */
314
314
  valAxisTitle?: string | null;
315
+ /** `<c:catAx><c:title>` run-prop font size (hpt), from the parser's
316
+ * catAxisTitleSize. Distinct from `catAxisFontSizeHpt` (tick labels). */
317
+ catAxisTitleSize?: number | null;
318
+ /** `<c:catAx><c:title>` run-prop bold flag. */
319
+ catAxisTitleBold?: boolean | null;
320
+ /** `<c:catAx><c:title>` run-prop color (hex without '#'). */
321
+ catAxisTitleColor?: string | null;
322
+ /** `<c:valAx><c:title>` run-prop font size (hpt). */
323
+ valAxisTitleSize?: number | null;
324
+ /** `<c:valAx><c:title>` run-prop bold flag. */
325
+ valAxisTitleBold?: boolean | null;
326
+ /** `<c:valAx><c:title>` run-prop color (hex without '#'). */
327
+ valAxisTitleColor?: string | null;
315
328
  /** True when <c:legend> is present. Absence means the legend is hidden. */
316
329
  showLegend?: boolean;
317
330
  /** `<c:legendPos val>` — "r"|"l"|"t"|"b"|"tr". null/undefined = default ("r"). */
@@ -384,6 +397,12 @@ declare interface ChartData {
384
397
  catAxisLineWidthEmu?: number;
385
398
  valAxisLineColor?: string;
386
399
  valAxisLineWidthEmu?: number;
400
+ /** Explicit chart border color (hex without '#') from
401
+ * `<c:chartSpace><c:spPr><a:ln><a:solidFill><a:srgbClr>`. Only set when the
402
+ * XML explicitly declares a paintable line (no default border). */
403
+ chartBorderColor?: string | null;
404
+ /** `<c:chartSpace><c:spPr><a:ln@w>` border width in EMU. */
405
+ chartBorderWidthEmu?: number | null;
387
406
  /** `<c:catAx | valAx><c:majorTickMark val>` / `<c:minorTickMark val>` —
388
407
  * one of `none`/`out`/`in`/`cross` (ECMA-376 §21.2.2.49). */
389
408
  catAxisMajorTickMark?: string;
@@ -510,6 +529,38 @@ declare interface ChartElement {
510
529
  scatterStyle?: string | null;
511
530
  /** `<c:radarChart><c:radarStyle val>` (ECMA-376 §21.2.3.10). */
512
531
  radarStyle?: string | null;
532
+ /** `<c:catAx><c:title>` plain text (ECMA-376 §21.2.2.6). For scatter the
533
+ * bottom `<c:valAx>` (axPos b/t) feeds this. null = no title. */
534
+ catAxisTitle?: string | null;
535
+ /** `<c:valAx><c:title>` plain text. For scatter the left `<c:valAx>`
536
+ * (axPos l/r) feeds this. null = no title. */
537
+ valAxisTitle?: string | null;
538
+ /** `<c:catAx><c:title>` run-prop font size (hpt). Distinct from
539
+ * `catAxisFontSizeHpt` (tick labels). null = renderer default. */
540
+ catAxisTitleSize?: number | null;
541
+ /** `<c:catAx><c:title>` run-prop bold flag. null = not bold. */
542
+ catAxisTitleBold?: boolean | null;
543
+ /** `<c:catAx><c:title>` run-prop color (hex without '#'). null = default. */
544
+ catAxisTitleColor?: string | null;
545
+ /** `<c:valAx><c:title>` run-prop font size (hpt). null = renderer default. */
546
+ valAxisTitleSize?: number | null;
547
+ /** `<c:valAx><c:title>` run-prop bold flag. null = not bold. */
548
+ valAxisTitleBold?: boolean | null;
549
+ /** `<c:valAx><c:title>` run-prop color (hex without '#'). null = default. */
550
+ valAxisTitleColor?: string | null;
551
+ /** `<c:title>...defRPr@b` chart title bold flag. null = not bold. */
552
+ titleFontBold?: boolean | null;
553
+ /** `<c:catAx><c:txPr>...defRPr@b` X-axis tick-label bold flag. null = not bold. */
554
+ catAxisFontBold?: boolean | null;
555
+ /** `<c:valAx><c:txPr>...defRPr@b` Y-axis tick-label bold flag. null = not bold. */
556
+ valAxisFontBold?: boolean | null;
557
+ /** Explicit chart border color (hex without '#') from
558
+ * `<c:chartSpace><c:spPr><a:ln><a:solidFill><a:srgbClr>`. Only set when the
559
+ * XML explicitly declares a paintable line; null otherwise (no default border). */
560
+ chartBorderColor?: string | null;
561
+ /** `<c:chartSpace><c:spPr><a:ln@w>` border width in EMU. null = 1px hairline
562
+ * when a color is present. */
563
+ chartBorderWidthEmu?: number | null;
513
564
  }
514
565
 
515
566
  declare interface ChartErrBars {
@@ -644,6 +695,27 @@ declare interface ChartModel {
644
695
  catAxisFontBold?: boolean | null;
645
696
  /** `<c:valAx><c:txPr>...defRPr@b>` Y-axis tick label bold flag. */
646
697
  valAxisFontBold?: boolean | null;
698
+ /** `<c:catAx><c:title>` run-prop font size (hpt). Distinct from
699
+ * `catAxisFontSizeHpt` (tick labels). null = renderer default. */
700
+ catAxisTitleFontSizeHpt?: number | null;
701
+ /** `<c:catAx><c:title>` run-prop bold flag. null = not bold. */
702
+ catAxisTitleFontBold?: boolean | null;
703
+ /** `<c:catAx><c:title>` run-prop color (hex without '#'). null = default. */
704
+ catAxisTitleFontColor?: string | null;
705
+ /** `<c:valAx><c:title>` run-prop font size (hpt). null = renderer default. */
706
+ valAxisTitleFontSizeHpt?: number | null;
707
+ /** `<c:valAx><c:title>` run-prop bold flag. null = not bold. */
708
+ valAxisTitleFontBold?: boolean | null;
709
+ /** `<c:valAx><c:title>` run-prop color (hex without '#'). null = default. */
710
+ valAxisTitleFontColor?: string | null;
711
+ /** Explicit chart border color (hex without '#') from
712
+ * `<c:chartSpace><c:spPr><a:ln><a:solidFill><a:srgbClr>`. Only set when the
713
+ * XML explicitly declares a paintable line; null otherwise (no default
714
+ * border is drawn). */
715
+ chartBorderColor?: string | null;
716
+ /** `<c:chartSpace><c:spPr><a:ln@w>` border width in EMU. null = 1px hairline
717
+ * when a color is present. */
718
+ chartBorderWidthEmu?: number | null;
647
719
  /**
648
720
  * `<c:catAx><c:crosses val>` (`autoZero` | `min` | `max`). Drives the Y
649
721
  * coordinate where the X axis is drawn. Default `autoZero` puts the X
@@ -1896,6 +1968,9 @@ declare interface NumberingInfo {
1896
1968
  text: string;
1897
1969
  indentLeft: number;
1898
1970
  tab: number;
1971
+ /** ECMA-376 §17.9.28 `<w:suff>` — "tab" (default) | "space" | "nothing".
1972
+ * Where body text starts after the marker on the first line. */
1973
+ suff: string;
1899
1974
  }
1900
1975
 
1901
1976
  declare interface NumFmt {
@@ -1943,6 +2018,23 @@ declare interface Paragraph {
1943
2018
  runs: TextRun[];
1944
2019
  }
1945
2020
 
2021
+ /**
2022
+ * PPTX paragraph. Extends the shared core `Paragraph` with the PPTX-only
2023
+ * `eaLnBrk` flag that the pptx parser emits but the shared core model does not
2024
+ * carry (docx/xlsx paragraphs don't surface it). Mirrors the Rust
2025
+ * `Paragraph` struct's `ea_ln_brk` field 1:1.
2026
+ */
2027
+ declare interface Paragraph_2 extends Paragraph {
2028
+ /**
2029
+ * `<a:pPr eaLnBrk>` (ECMA-376 §21.1.2.2.7, xsd:boolean, default true). When
2030
+ * true, East Asian text may break at character boundaries (kinsoku rules);
2031
+ * when false, an East Asian word must not be split mid-character. The parser
2032
+ * resolves the paragraph → body/list-style → layout/master cascade and always
2033
+ * emits an effective boolean.
2034
+ */
2035
+ eaLnBrk: boolean;
2036
+ }
2037
+
1946
2038
  declare interface ParagraphBorders {
1947
2039
  top: ParaBorderEdge | null;
1948
2040
  bottom: ParaBorderEdge | null;
@@ -2075,6 +2167,16 @@ declare interface PictureElement {
2075
2167
  flipV: boolean;
2076
2168
  /** Data URL, e.g. "data:image/png;base64,..." */
2077
2169
  dataUrl: string;
2170
+ /**
2171
+ * Microsoft 2016 SVG extension (`<a:blip><a:extLst><a:ext
2172
+ * uri="{96DAC541-7B7A-43D3-8B79-37D633B846F1}"><asvg:svgBlip r:embed>`). When
2173
+ * PowerPoint embeds an SVG image, `dataUrl` above is only the PNG fallback it
2174
+ * rasterizes for compatibility; this is the original vector image as a
2175
+ * `data:image/svg+xml;base64,…` URL. The renderer prefers this and falls back
2176
+ * to `dataUrl` if the SVG fails to decode. Omitted when the picture has no
2177
+ * svgBlip extension (the common case).
2178
+ */
2179
+ svgDataUrl?: string;
2078
2180
  /**
2079
2181
  * Border line from `<p:pic><p:spPr><a:ln>` (ECMA-376 §20.1.2.2.24). A
2080
2182
  * `p:pic`'s spPr is `CT_ShapeProperties` (§19.3.1.37), so a picture carries
@@ -2192,7 +2294,7 @@ export declare namespace pptx {
2192
2294
  SpaceLine,
2193
2295
  TabStop,
2194
2296
  TextBody,
2195
- Paragraph,
2297
+ Paragraph_2 as Paragraph,
2196
2298
  TextRun,
2197
2299
  TextRunData,
2198
2300
  LineBreak,
@@ -3259,6 +3361,12 @@ declare interface TextBody extends TextBody_2 {
3259
3361
  * omitted from JSON when false. Only meaningful when `numCol > 1`.
3260
3362
  */
3261
3363
  rtlCol?: boolean;
3364
+ /**
3365
+ * Narrow the inherited `paragraphs` to the PPTX `Paragraph` so consumers see
3366
+ * the PPTX-only `eaLnBrk` flag. PPTX `Paragraph extends CoreParagraph`, so
3367
+ * this is a covariant refinement of `CoreTextBody.paragraphs`.
3368
+ */
3369
+ paragraphs: Paragraph_2[];
3262
3370
  }
3263
3371
 
3264
3372
  declare interface TextBody_2 {
@@ -3361,6 +3469,13 @@ declare interface TextRunData {
3361
3469
  * present; absent means CJK falls back to fontFamily.
3362
3470
  */
3363
3471
  fontFamilyEa?: string;
3472
+ /**
3473
+ * Symbol font family from rPr > a:sym (ECMA-376 §21.1.2.3.10), resolved
3474
+ * through the theme. PowerPoint stores symbol-font glyphs as Private-Use
3475
+ * codepoints U+F020–U+F0FF; the renderer uses this font to resolve them.
3476
+ * Absent means no symbol font was declared.
3477
+ */
3478
+ fontFamilySym?: string;
3364
3479
  /** Baseline shift in thousandths of a point. Positive = superscript, negative = subscript. */
3365
3480
  baseline?: number;
3366
3481
  /**
@@ -181,6 +181,38 @@ export declare interface ChartElement {
181
181
  scatterStyle?: string | null;
182
182
  /** `<c:radarChart><c:radarStyle val>` (ECMA-376 §21.2.3.10). */
183
183
  radarStyle?: string | null;
184
+ /** `<c:catAx><c:title>` plain text (ECMA-376 §21.2.2.6). For scatter the
185
+ * bottom `<c:valAx>` (axPos b/t) feeds this. null = no title. */
186
+ catAxisTitle?: string | null;
187
+ /** `<c:valAx><c:title>` plain text. For scatter the left `<c:valAx>`
188
+ * (axPos l/r) feeds this. null = no title. */
189
+ valAxisTitle?: string | null;
190
+ /** `<c:catAx><c:title>` run-prop font size (hpt). Distinct from
191
+ * `catAxisFontSizeHpt` (tick labels). null = renderer default. */
192
+ catAxisTitleSize?: number | null;
193
+ /** `<c:catAx><c:title>` run-prop bold flag. null = not bold. */
194
+ catAxisTitleBold?: boolean | null;
195
+ /** `<c:catAx><c:title>` run-prop color (hex without '#'). null = default. */
196
+ catAxisTitleColor?: string | null;
197
+ /** `<c:valAx><c:title>` run-prop font size (hpt). null = renderer default. */
198
+ valAxisTitleSize?: number | null;
199
+ /** `<c:valAx><c:title>` run-prop bold flag. null = not bold. */
200
+ valAxisTitleBold?: boolean | null;
201
+ /** `<c:valAx><c:title>` run-prop color (hex without '#'). null = default. */
202
+ valAxisTitleColor?: string | null;
203
+ /** `<c:title>...defRPr@b` chart title bold flag. null = not bold. */
204
+ titleFontBold?: boolean | null;
205
+ /** `<c:catAx><c:txPr>...defRPr@b` X-axis tick-label bold flag. null = not bold. */
206
+ catAxisFontBold?: boolean | null;
207
+ /** `<c:valAx><c:txPr>...defRPr@b` Y-axis tick-label bold flag. null = not bold. */
208
+ valAxisFontBold?: boolean | null;
209
+ /** Explicit chart border color (hex without '#') from
210
+ * `<c:chartSpace><c:spPr><a:ln><a:solidFill><a:srgbClr>`. Only set when the
211
+ * XML explicitly declares a paintable line; null otherwise (no default border). */
212
+ chartBorderColor?: string | null;
213
+ /** `<c:chartSpace><c:spPr><a:ln@w>` border width in EMU. null = 1px hairline
214
+ * when a color is present. */
215
+ chartBorderWidthEmu?: number | null;
184
216
  }
185
217
 
186
218
  declare interface ChartErrBars {
@@ -315,6 +347,27 @@ export declare interface ChartModel {
315
347
  catAxisFontBold?: boolean | null;
316
348
  /** `<c:valAx><c:txPr>...defRPr@b>` Y-axis tick label bold flag. */
317
349
  valAxisFontBold?: boolean | null;
350
+ /** `<c:catAx><c:title>` run-prop font size (hpt). Distinct from
351
+ * `catAxisFontSizeHpt` (tick labels). null = renderer default. */
352
+ catAxisTitleFontSizeHpt?: number | null;
353
+ /** `<c:catAx><c:title>` run-prop bold flag. null = not bold. */
354
+ catAxisTitleFontBold?: boolean | null;
355
+ /** `<c:catAx><c:title>` run-prop color (hex without '#'). null = default. */
356
+ catAxisTitleFontColor?: string | null;
357
+ /** `<c:valAx><c:title>` run-prop font size (hpt). null = renderer default. */
358
+ valAxisTitleFontSizeHpt?: number | null;
359
+ /** `<c:valAx><c:title>` run-prop bold flag. null = not bold. */
360
+ valAxisTitleFontBold?: boolean | null;
361
+ /** `<c:valAx><c:title>` run-prop color (hex without '#'). null = default. */
362
+ valAxisTitleFontColor?: string | null;
363
+ /** Explicit chart border color (hex without '#') from
364
+ * `<c:chartSpace><c:spPr><a:ln><a:solidFill><a:srgbClr>`. Only set when the
365
+ * XML explicitly declares a paintable line; null otherwise (no default
366
+ * border is drawn). */
367
+ chartBorderColor?: string | null;
368
+ /** `<c:chartSpace><c:spPr><a:ln@w>` border width in EMU. null = 1px hairline
369
+ * when a color is present. */
370
+ chartBorderWidthEmu?: number | null;
318
371
  /**
319
372
  * `<c:catAx><c:crosses val>` (`autoZero` | `min` | `max`). Drives the Y
320
373
  * coordinate where the X axis is drawn. Default `autoZero` puts the X
@@ -810,7 +863,24 @@ export declare interface NoFill {
810
863
  fillType: 'none';
811
864
  }
812
865
 
813
- export declare interface Paragraph {
866
+ /**
867
+ * PPTX paragraph. Extends the shared core `Paragraph` with the PPTX-only
868
+ * `eaLnBrk` flag that the pptx parser emits but the shared core model does not
869
+ * carry (docx/xlsx paragraphs don't surface it). Mirrors the Rust
870
+ * `Paragraph` struct's `ea_ln_brk` field 1:1.
871
+ */
872
+ export declare interface Paragraph extends Paragraph_2 {
873
+ /**
874
+ * `<a:pPr eaLnBrk>` (ECMA-376 §21.1.2.2.7, xsd:boolean, default true). When
875
+ * true, East Asian text may break at character boundaries (kinsoku rules);
876
+ * when false, an East Asian word must not be split mid-character. The parser
877
+ * resolves the paragraph → body/list-style → layout/master cascade and always
878
+ * emits an effective boolean.
879
+ */
880
+ eaLnBrk: boolean;
881
+ }
882
+
883
+ declare interface Paragraph_2 {
814
884
  /** Alignment: "l" | "ctr" | "r" | "just" */
815
885
  alignment: string;
816
886
  /** Left margin in EMU */
@@ -892,6 +962,16 @@ export declare interface PictureElement {
892
962
  flipV: boolean;
893
963
  /** Data URL, e.g. "data:image/png;base64,..." */
894
964
  dataUrl: string;
965
+ /**
966
+ * Microsoft 2016 SVG extension (`<a:blip><a:extLst><a:ext
967
+ * uri="{96DAC541-7B7A-43D3-8B79-37D633B846F1}"><asvg:svgBlip r:embed>`). When
968
+ * PowerPoint embeds an SVG image, `dataUrl` above is only the PNG fallback it
969
+ * rasterizes for compatibility; this is the original vector image as a
970
+ * `data:image/svg+xml;base64,…` URL. The renderer prefers this and falls back
971
+ * to `dataUrl` if the SVG fails to decode. Omitted when the picture has no
972
+ * svgBlip extension (the common case).
973
+ */
974
+ svgDataUrl?: string;
895
975
  /**
896
976
  * Border line from `<p:pic><p:spPr><a:ln>` (ECMA-376 §20.1.2.2.24). A
897
977
  * `p:pic`'s spPr is `CT_ShapeProperties` (§19.3.1.37), so a picture carries
@@ -1514,12 +1594,18 @@ export declare interface TextBody extends TextBody_2 {
1514
1594
  * omitted from JSON when false. Only meaningful when `numCol > 1`.
1515
1595
  */
1516
1596
  rtlCol?: boolean;
1597
+ /**
1598
+ * Narrow the inherited `paragraphs` to the PPTX `Paragraph` so consumers see
1599
+ * the PPTX-only `eaLnBrk` flag. PPTX `Paragraph extends CoreParagraph`, so
1600
+ * this is a covariant refinement of `CoreTextBody.paragraphs`.
1601
+ */
1602
+ paragraphs: Paragraph[];
1517
1603
  }
1518
1604
 
1519
1605
  declare interface TextBody_2 {
1520
1606
  /** Vertical anchor: "t" | "ctr" | "b" */
1521
1607
  verticalAnchor: string;
1522
- paragraphs: Paragraph[];
1608
+ paragraphs: Paragraph_2[];
1523
1609
  /** Default pt size from lstStyle (overrides renderer default when present) */
1524
1610
  defaultFontSize: number | null;
1525
1611
  /** Inherited bold from layout/master defRPr (null = not set, use false as final default) */
@@ -1616,6 +1702,13 @@ export declare interface TextRunData {
1616
1702
  * present; absent means CJK falls back to fontFamily.
1617
1703
  */
1618
1704
  fontFamilyEa?: string;
1705
+ /**
1706
+ * Symbol font family from rPr > a:sym (ECMA-376 §21.1.2.3.10), resolved
1707
+ * through the theme. PowerPoint stores symbol-font glyphs as Private-Use
1708
+ * codepoints U+F020–U+F0FF; the renderer uses this font to resolve them.
1709
+ * Absent means no symbol font was declared.
1710
+ */
1711
+ fontFamilySym?: string;
1619
1712
  /** Baseline shift in thousandths of a point. Positive = superscript, negative = subscript. */
1620
1713
  baseline?: number;
1621
1714
  /**
@@ -230,6 +230,19 @@ export declare interface ChartData {
230
230
  catAxisTitle?: string | null;
231
231
  /** Value axis title (c:valAx/c:title). */
232
232
  valAxisTitle?: string | null;
233
+ /** `<c:catAx><c:title>` run-prop font size (hpt), from the parser's
234
+ * catAxisTitleSize. Distinct from `catAxisFontSizeHpt` (tick labels). */
235
+ catAxisTitleSize?: number | null;
236
+ /** `<c:catAx><c:title>` run-prop bold flag. */
237
+ catAxisTitleBold?: boolean | null;
238
+ /** `<c:catAx><c:title>` run-prop color (hex without '#'). */
239
+ catAxisTitleColor?: string | null;
240
+ /** `<c:valAx><c:title>` run-prop font size (hpt). */
241
+ valAxisTitleSize?: number | null;
242
+ /** `<c:valAx><c:title>` run-prop bold flag. */
243
+ valAxisTitleBold?: boolean | null;
244
+ /** `<c:valAx><c:title>` run-prop color (hex without '#'). */
245
+ valAxisTitleColor?: string | null;
233
246
  /** True when <c:legend> is present. Absence means the legend is hidden. */
234
247
  showLegend?: boolean;
235
248
  /** `<c:legendPos val>` — "r"|"l"|"t"|"b"|"tr". null/undefined = default ("r"). */
@@ -302,6 +315,12 @@ export declare interface ChartData {
302
315
  catAxisLineWidthEmu?: number;
303
316
  valAxisLineColor?: string;
304
317
  valAxisLineWidthEmu?: number;
318
+ /** Explicit chart border color (hex without '#') from
319
+ * `<c:chartSpace><c:spPr><a:ln><a:solidFill><a:srgbClr>`. Only set when the
320
+ * XML explicitly declares a paintable line (no default border). */
321
+ chartBorderColor?: string | null;
322
+ /** `<c:chartSpace><c:spPr><a:ln@w>` border width in EMU. */
323
+ chartBorderWidthEmu?: number | null;
305
324
  /** `<c:catAx | valAx><c:majorTickMark val>` / `<c:minorTickMark val>` —
306
325
  * one of `none`/`out`/`in`/`cross` (ECMA-376 §21.2.2.49). */
307
326
  catAxisMajorTickMark?: string;