ooxml-core 1.48.0 → 1.48.1

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.
Files changed (208) hide show
  1. package/dist/pptx/automation/index.d.ts +5 -12
  2. package/dist/pptx/automation/index.d.ts.map +1 -1
  3. package/dist/pptx/automation/schemas/chart-formatting-schemas.d.ts +1 -1
  4. package/dist/pptx/automation/schemas/chart-formatting-schemas.d.ts.map +1 -1
  5. package/dist/pptx/automation/schemas/chart-schemas.d.ts +1 -1
  6. package/dist/pptx/automation/schemas/chart-schemas.d.ts.map +1 -1
  7. package/dist/pptx/automation/schemas/chart-user-shape-schemas.d.ts +1 -1
  8. package/dist/pptx/automation/schemas/chart-user-shape-schemas.d.ts.map +1 -1
  9. package/dist/pptx/automation/schemas/element-schemas.d.ts +1 -1
  10. package/dist/pptx/automation/schemas/element-schemas.d.ts.map +1 -1
  11. package/dist/pptx/automation/schemas/export-schemas.d.ts +1 -1
  12. package/dist/pptx/automation/schemas/export-schemas.d.ts.map +1 -1
  13. package/dist/pptx/automation/schemas/geometry-schemas.d.ts +1 -1
  14. package/dist/pptx/automation/schemas/geometry-schemas.d.ts.map +1 -1
  15. package/dist/pptx/automation/schemas/hyperlink-schemas.d.ts +1 -1
  16. package/dist/pptx/automation/schemas/hyperlink-schemas.d.ts.map +1 -1
  17. package/dist/pptx/automation/schemas/index.d.ts +8 -8
  18. package/dist/pptx/automation/schemas/index.d.ts.map +1 -1
  19. package/dist/pptx/automation/schemas/json-schemas.d.ts +1 -1
  20. package/dist/pptx/automation/schemas/json-schemas.d.ts.map +1 -1
  21. package/dist/pptx/automation/schemas/layout-schemas.d.ts +1 -1
  22. package/dist/pptx/automation/schemas/layout-schemas.d.ts.map +1 -1
  23. package/dist/pptx/automation/schemas/lock-schemas.d.ts +1 -1
  24. package/dist/pptx/automation/schemas/lock-schemas.d.ts.map +1 -1
  25. package/dist/pptx/automation/schemas/metadata-schemas.d.ts +1 -1
  26. package/dist/pptx/automation/schemas/metadata-schemas.d.ts.map +1 -1
  27. package/dist/pptx/automation/schemas/ole-schemas.d.ts +1 -1
  28. package/dist/pptx/automation/schemas/ole-schemas.d.ts.map +1 -1
  29. package/dist/pptx/automation/schemas/presentation-schemas.d.ts +1 -1
  30. package/dist/pptx/automation/schemas/presentation-schemas.d.ts.map +1 -1
  31. package/dist/pptx/automation/schemas/section-schemas.d.ts +1 -1
  32. package/dist/pptx/automation/schemas/section-schemas.d.ts.map +1 -1
  33. package/dist/pptx/automation/schemas/slide-schemas.d.ts +1 -1
  34. package/dist/pptx/automation/schemas/slide-schemas.d.ts.map +1 -1
  35. package/dist/pptx/automation/schemas/smartart-schemas.d.ts +1 -1
  36. package/dist/pptx/automation/schemas/smartart-schemas.d.ts.map +1 -1
  37. package/dist/pptx/automation/schemas/table-style-schemas.d.ts +1 -1
  38. package/dist/pptx/automation/schemas/table-style-schemas.d.ts.map +1 -1
  39. package/dist/pptx/automation/schemas/template-schemas.d.ts +1 -1
  40. package/dist/pptx/automation/schemas/template-schemas.d.ts.map +1 -1
  41. package/dist/pptx/automation/schemas/theme-schemas.d.ts +1 -1
  42. package/dist/pptx/automation/schemas/theme-schemas.d.ts.map +1 -1
  43. package/dist/pptx/automation/schemas/validation-schemas.d.ts +1 -1
  44. package/dist/pptx/automation/schemas/validation-schemas.d.ts.map +1 -1
  45. package/dist/pptx/chunks/color-primitives-DHyz14D9.d.ts +151 -0
  46. package/dist/pptx/chunks/color-primitives-DHyz14D9.d.ts.map +1 -0
  47. package/dist/pptx/chunks/{index-ClHCBGOf.d.ts → index-7tA9HqRL.d.ts} +10057 -1222
  48. package/dist/pptx/chunks/index-7tA9HqRL.d.ts.map +1 -0
  49. package/dist/pptx/chunks/{index-DqkBjVqR.d.ts → index-CAzt1jbx.d.ts} +4 -5
  50. package/dist/pptx/chunks/index-CAzt1jbx.d.ts.map +1 -0
  51. package/dist/pptx/chunks/{schemas-LHsDbVOw.d.ts → index-CyAgQ2zG.d.ts} +6 -2
  52. package/dist/pptx/chunks/index-CyAgQ2zG.d.ts.map +1 -0
  53. package/dist/pptx/chunks/index-cJSPBkU1.d.ts +185 -0
  54. package/dist/pptx/chunks/index-cJSPBkU1.d.ts.map +1 -0
  55. package/dist/pptx/chunks/index-cr_sgz1w.d.ts +94 -0
  56. package/dist/pptx/chunks/index-cr_sgz1w.d.ts.map +1 -0
  57. package/dist/pptx/chunks/presentation-Be108jrz.d.ts +12521 -0
  58. package/dist/pptx/chunks/presentation-Be108jrz.d.ts.map +1 -0
  59. package/dist/pptx/chunks/{inspection-status-TKac7eqb.d.ts → signature-inspection-status-TKac7eqb.d.ts} +1 -1
  60. package/dist/pptx/chunks/signature-inspection-status-TKac7eqb.d.ts.map +1 -0
  61. package/dist/pptx/chunks/text-operations-a1cqBYk9.d.ts +111 -0
  62. package/dist/pptx/chunks/text-operations-a1cqBYk9.d.ts.map +1 -0
  63. package/dist/pptx/cli/index.d.ts +17 -1
  64. package/dist/pptx/cli/index.d.ts.map +1 -1
  65. package/dist/pptx/converter/index.d.ts +1 -1
  66. package/dist/pptx/editor/ai/table-merge.d.ts +16 -0
  67. package/dist/pptx/editor/ai/table-merge.d.ts.map +1 -1
  68. package/dist/pptx/editor/loader/element-patch-walker.d.ts +15 -0
  69. package/dist/pptx/editor/loader/element-patch-walker.d.ts.map +1 -1
  70. package/dist/pptx/editor/loader/lazy-image-resolution.d.ts +15 -0
  71. package/dist/pptx/editor/loader/lazy-image-resolution.d.ts.map +1 -1
  72. package/dist/pptx/editor/loader/load-content-helpers.d.ts +7 -0
  73. package/dist/pptx/editor/loader/load-content-helpers.d.ts.map +1 -1
  74. package/dist/pptx/editor/loader/table-style-image-paths.d.ts +20 -0
  75. package/dist/pptx/editor/loader/table-style-image-paths.d.ts.map +1 -1
  76. package/dist/pptx/editor/loader/text-fill-image-paths.d.ts +19 -0
  77. package/dist/pptx/editor/loader/text-fill-image-paths.d.ts.map +1 -1
  78. package/dist/pptx/editor/render/bullet-autonum.d.ts +14 -0
  79. package/dist/pptx/editor/render/bullet-list.d.ts +8 -0
  80. package/dist/pptx/editor/render/bullet-list.d.ts.map +1 -1
  81. package/dist/pptx/editor/render/bullet-toggle.d.ts +4 -0
  82. package/dist/pptx/editor/render/bullet-toggle.d.ts.map +1 -1
  83. package/dist/pptx/editor/render/chart-user-shape-edit.d.ts +12 -0
  84. package/dist/pptx/editor/render/chart-user-shape-edit.d.ts.map +1 -1
  85. package/dist/pptx/editor/render/clone.d.ts +20 -0
  86. package/dist/pptx/editor/render/clone.d.ts.map +1 -1
  87. package/dist/pptx/editor/render/collaboration-assets.d.ts +17 -0
  88. package/dist/pptx/editor/render/collaboration-live-patch-target.d.ts +9 -0
  89. package/dist/pptx/editor/render/collaboration-live-patch-target.d.ts.map +1 -1
  90. package/dist/pptx/editor/render/collaboration-reconcile.d.ts +21 -0
  91. package/dist/pptx/editor/render/collaboration-reconcile.d.ts.map +1 -1
  92. package/dist/pptx/editor/render/collaboration-sync.d.ts +32 -4
  93. package/dist/pptx/editor/render/collaboration-sync.d.ts.map +1 -1
  94. package/dist/pptx/editor/render/collaboration-text-codec.d.ts +33 -2
  95. package/dist/pptx/editor/render/collaboration-text-codec.d.ts.map +1 -0
  96. package/dist/pptx/editor/render/collaboration-text-merge.d.ts +36 -2
  97. package/dist/pptx/editor/render/collaboration-text-merge.d.ts.map +1 -0
  98. package/dist/pptx/editor/render/collaboration-text-native-edit.d.ts +2 -2
  99. package/dist/pptx/editor/render/collaboration-text-positions.d.ts +34 -2
  100. package/dist/pptx/editor/render/collaboration-text-positions.d.ts.map +1 -0
  101. package/dist/pptx/editor/render/collaboration-text-projection.d.ts +1 -1
  102. package/dist/pptx/editor/render/collaboration-text-session-apply.d.ts +3 -3
  103. package/dist/pptx/editor/render/collaboration-text-session-delta.d.ts +36 -2
  104. package/dist/pptx/editor/render/collaboration-text-session-delta.d.ts.map +1 -0
  105. package/dist/pptx/editor/render/collaboration-text-session-paragraph.d.ts +1 -1
  106. package/dist/pptx/editor/render/collaboration-text-session.d.ts +40 -2
  107. package/dist/pptx/editor/render/collaboration-text-session.d.ts.map +1 -0
  108. package/dist/pptx/editor/render/collaboration-text-snapshot-positions.d.ts +2 -2
  109. package/dist/pptx/editor/render/custom-show-operations.d.ts +14 -0
  110. package/dist/pptx/editor/render/custom-show-operations.d.ts.map +1 -1
  111. package/dist/pptx/editor/render/deck-save-encryption.d.ts +24 -0
  112. package/dist/pptx/editor/render/deck-save-encryption.d.ts.map +1 -1
  113. package/dist/pptx/editor/render/element-locks.d.ts +25 -0
  114. package/dist/pptx/editor/render/element-locks.d.ts.map +1 -1
  115. package/dist/pptx/editor/render/element-operations.d.ts +11 -0
  116. package/dist/pptx/editor/render/element-operations.d.ts.map +1 -1
  117. package/dist/pptx/editor/render/element.d.ts +12 -0
  118. package/dist/pptx/editor/render/element.d.ts.map +1 -1
  119. package/dist/pptx/editor/render/find-replace.d.ts +8 -2
  120. package/dist/pptx/editor/render/find-replace.d.ts.map +1 -1
  121. package/dist/pptx/editor/render/font-family-update.d.ts +32 -1
  122. package/dist/pptx/editor/render/font-family-update.d.ts.map +1 -1
  123. package/dist/pptx/editor/render/group-drill.d.ts +26 -0
  124. package/dist/pptx/editor/render/group-drill.d.ts.map +1 -1
  125. package/dist/pptx/editor/render/group-ops.d.ts +24 -0
  126. package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts +21 -1
  127. package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts.map +1 -1
  128. package/dist/pptx/editor/render/remap-text.d.ts +5 -0
  129. package/dist/pptx/editor/render/remap-text.d.ts.map +1 -1
  130. package/dist/pptx/editor/render/section-operations.d.ts +14 -0
  131. package/dist/pptx/editor/render/section-operations.d.ts.map +1 -1
  132. package/dist/pptx/editor/render/slide-background-patch.d.ts +15 -0
  133. package/dist/pptx/editor/render/slide-background-patch.d.ts.map +1 -1
  134. package/dist/pptx/editor/render/slide-operations.d.ts +12 -0
  135. package/dist/pptx/editor/render/slide-operations.d.ts.map +1 -1
  136. package/dist/pptx/editor/render/slide-search.d.ts +6 -0
  137. package/dist/pptx/editor/render/slide-search.d.ts.map +1 -1
  138. package/dist/pptx/editor/render/slide-size-rescale.d.ts +18 -0
  139. package/dist/pptx/editor/render/slide-size-rescale.d.ts.map +1 -1
  140. package/dist/pptx/editor/render/slide-transition-edits.d.ts +15 -0
  141. package/dist/pptx/editor/render/slide-transition-edits.d.ts.map +1 -1
  142. package/dist/pptx/editor/render/table-cell-edit.d.ts +8 -0
  143. package/dist/pptx/editor/render/table-cell-edit.d.ts.map +1 -1
  144. package/dist/pptx/editor/render/table-cell-merge.d.ts +15 -0
  145. package/dist/pptx/editor/render/table-cell-merge.d.ts.map +1 -1
  146. package/dist/pptx/editor/render/table-data-grid-ops.d.ts +26 -0
  147. package/dist/pptx/editor/render/table-data-grid-ops.d.ts.map +1 -1
  148. package/dist/pptx/editor/render/table-layout.d.ts +3 -1
  149. package/dist/pptx/editor/render/table-layout.d.ts.map +1 -1
  150. package/dist/pptx/editor/render/table-merge.d.ts +16 -0
  151. package/dist/pptx/editor/render/table-merge.d.ts.map +1 -1
  152. package/dist/pptx/editor/render/table-style-editor-descriptor.d.ts +13 -0
  153. package/dist/pptx/editor/render/table-style-editor-descriptor.d.ts.map +1 -1
  154. package/dist/pptx/editor/render/table-style-editor-edit.d.ts +13 -0
  155. package/dist/pptx/editor/render/table-style-editor-edit.d.ts.map +1 -1
  156. package/dist/pptx/editor/render/table-style-editor-parts.d.ts +10 -0
  157. package/dist/pptx/editor/render/table-style-editor-parts.d.ts.map +1 -1
  158. package/dist/pptx/editor/render/table-style-map-edits.d.ts +20 -0
  159. package/dist/pptx/editor/render/table-style-map-edits.d.ts.map +1 -1
  160. package/dist/pptx/editor/render/text-content-style.d.ts +2 -1
  161. package/dist/pptx/editor/render/text-content-style.d.ts.map +1 -1
  162. package/dist/pptx/editor/render/text-runs-style-patch.d.ts +2 -2
  163. package/dist/pptx/editor/render/text-segment-paragraph-break.d.ts +23 -0
  164. package/dist/pptx/editor/render/text-segment-paragraph-break.d.ts.map +1 -1
  165. package/dist/pptx/editor/render/text-style-scope.d.ts +20 -2
  166. package/dist/pptx/editor/render/text-style-scope.d.ts.map +1 -1
  167. package/dist/pptx/editor/render/text-theme.d.ts +11 -0
  168. package/dist/pptx/editor/render/text-theme.d.ts.map +1 -1
  169. package/dist/pptx/editor/render/theme-editor-presets.d.ts +9 -0
  170. package/dist/pptx/editor/render/theme-editor-presets.d.ts.map +1 -1
  171. package/dist/pptx/editor/render/update-text-segment-style.d.ts +2 -1
  172. package/dist/pptx/editor/render/update-text-segment-style.d.ts.map +1 -1
  173. package/dist/pptx/index.d.ts +23 -9
  174. package/dist/pptx/node/index.d.ts +17 -1
  175. package/dist/pptx/node/index.d.ts.map +1 -1
  176. package/dist/pptx/signature-node/index.d.ts +8 -1
  177. package/dist/pptx/signature-node/index.d.ts.map +1 -1
  178. package/dist/pptx/smartart-layouts/index.d.ts +8 -1
  179. package/dist/pptx/smartart-layouts/index.d.ts.map +1 -1
  180. package/dist/pptx/ui/index.d.ts +2 -0
  181. package/dist/pptx/ui/index.d.ts.map +1 -1
  182. package/package.json +8 -8
  183. package/dist/pptx/chunks/collaboration-text-codec-1VmwD3yq.d.ts +0 -34
  184. package/dist/pptx/chunks/collaboration-text-codec-1VmwD3yq.d.ts.map +0 -1
  185. package/dist/pptx/chunks/collaboration-text-merge-B-tth-0W.d.ts +0 -19
  186. package/dist/pptx/chunks/collaboration-text-merge-B-tth-0W.d.ts.map +0 -1
  187. package/dist/pptx/chunks/collaboration-text-positions-D-1Jo1Fz.d.ts +0 -34
  188. package/dist/pptx/chunks/collaboration-text-positions-D-1Jo1Fz.d.ts.map +0 -1
  189. package/dist/pptx/chunks/collaboration-text-session-CWHTaWF4.d.ts +0 -41
  190. package/dist/pptx/chunks/collaboration-text-session-CWHTaWF4.d.ts.map +0 -1
  191. package/dist/pptx/chunks/collaboration-text-session-delta-Dxzybssp.d.ts +0 -37
  192. package/dist/pptx/chunks/collaboration-text-session-delta-Dxzybssp.d.ts.map +0 -1
  193. package/dist/pptx/chunks/elements-CValElsy.d.ts +0 -3568
  194. package/dist/pptx/chunks/elements-CValElsy.d.ts.map +0 -1
  195. package/dist/pptx/chunks/index-BaBgJR8i.d.ts +0 -9913
  196. package/dist/pptx/chunks/index-BaBgJR8i.d.ts.map +0 -1
  197. package/dist/pptx/chunks/index-ClHCBGOf.d.ts.map +0 -1
  198. package/dist/pptx/chunks/index-DqkBjVqR.d.ts.map +0 -1
  199. package/dist/pptx/chunks/inspection-status-TKac7eqb.d.ts.map +0 -1
  200. package/dist/pptx/chunks/schemas-LHsDbVOw.d.ts.map +0 -1
  201. package/dist/pptx/chunks/smart-art-DB37AsFP.d.ts +0 -1817
  202. package/dist/pptx/chunks/smart-art-DB37AsFP.d.ts.map +0 -1
  203. package/dist/pptx/chunks/table-DUO1H9-r.d.ts +0 -1798
  204. package/dist/pptx/chunks/table-DUO1H9-r.d.ts.map +0 -1
  205. package/dist/pptx/chunks/text-operations-B3lZjvs_.d.ts +0 -3363
  206. package/dist/pptx/chunks/text-operations-B3lZjvs_.d.ts.map +0 -1
  207. package/dist/pptx/chunks/text-t_wJ2OwM.d.ts +0 -1452
  208. package/dist/pptx/chunks/text-t_wJ2OwM.d.ts.map +0 -1
@@ -1,3568 +0,0 @@
1
- import { T as PptxShapeLocks, i as TextStyle, k as XmlObject, r as TextSegment } from "./text-t_wJ2OwM.js";
2
- import { Gt as PptxCustomPathProperties, Wt as GeometryAdjustmentHandle, n as PptxSmartArtData } from "./smart-art-DB37AsFP.js";
3
- import { E as ShapeStyle, N as PptxImageProperties, v as PptxTableData } from "./table-DUO1H9-r.js";
4
- /** Format-neutral CT_ManualLayout values. Raw extensions stay with the source XML model. */
5
- interface ChartManualLayout {
6
- layoutTarget?: 'inner' | 'outer';
7
- xMode?: 'edge' | 'factor';
8
- yMode?: 'edge' | 'factor';
9
- widthMode?: 'edge' | 'factor';
10
- heightMode?: 'edge' | 'factor';
11
- x?: number;
12
- y?: number;
13
- width?: number;
14
- height?: number;
15
- }
16
- /** The readable name of a trendline type (`exp` -> `exponential`). */
17
- type ChartTrendlineKind = 'linear' | 'exponential' | 'logarithmic' | 'polynomial' | 'power' | 'movingAvg';
18
- /** ST_ErrDir. */
19
- type ChartErrorBarDirection = 'x' | 'y';
20
- /** ST_ErrBarType: both sides, the negative side or the positive side. */
21
- type ChartErrorBarType = 'both' | 'minus' | 'plus';
22
- /** ST_ErrValType: how the error amount is calculated. */
23
- type ChartErrorValueType = 'cust' | 'fixedVal' | 'percentage' | 'stdDev' | 'stdErr';
24
- /** Tick-mark placement from ChartML `ST_TickMark`. */
25
- type PptxChartTickMark = 'cross' | 'in' | 'none' | 'out';
26
- /** Typed axis tick and category/date label controls. */
27
- interface PptxChartAxisLabelFormatting {
28
- /** Primary and secondary tick-mark placement. */
29
- majorTickMark?: PptxChartTickMark;
30
- minorTickMark?: PptxChartTickMark;
31
- /** Tick-label position from ChartML `ST_TickLblPos`. */
32
- tickLblPos?: 'high' | 'low' | 'nextTo' | 'none';
33
- /** Automatic category/date axis behavior (`c:auto`). */
34
- auto?: boolean;
35
- /** Category-axis label alignment (`c:lblAlgn`). */
36
- labelAlignment?: 'ctr' | 'l' | 'r';
37
- /** Category/date label distance, from 0 through 1000 percent. */
38
- labelOffset?: number;
39
- /** Number of category/date labels between rendered labels. */
40
- tickLabelSkip?: number;
41
- /** Number of category/date tick positions between major tick marks. */
42
- tickMarkSkip?: number;
43
- /** Suppress multi-level category labels (`c:noMultiLvlLbl`). */
44
- noMultiLevelLabels?: boolean;
45
- }
46
- /** OOXML `a:fillToRect`, as 0-1 insets from each edge. */
47
- interface RectPathGradientFillToRect {
48
- l: number;
49
- t: number;
50
- r: number;
51
- b: number;
52
- }
53
- interface ChartGradientFill {
54
- type: 'linear' | 'radial';
55
- stops: Array<{
56
- color: string;
57
- position: number;
58
- opacity?: number;
59
- }>;
60
- angle?: number;
61
- scaled?: boolean;
62
- interpolation?: 'sigma-gamma22';
63
- focalPoint?: {
64
- x: number;
65
- y: number;
66
- };
67
- path?: string;
68
- fillToRect?: RectPathGradientFillToRect;
69
- }
70
- /**
71
- * Chart-formatting types that don't fit an existing, owned type module for
72
- * this wave (`types/chart.ts` is owned elsewhere; see its own module doc).
73
- * Despite the file name, `PptxChartDataPointPicture` is a CLASSIC (`c:`)
74
- * construct, not ChartEx (`cx:`) - it landed here only because it needs a
75
- * home outside `chart.ts`.
76
- *
77
- * @module pptx-types/chart-ex
78
- */
79
- /** `c:dPt/c:pictureOptions/c:pictureFormat/@val` (ST_PictureFormat). */
80
- type PptxChartPictureFormat = 'stretch' | 'stack' | 'stackScale';
81
- /**
82
- * Per-data-point picture-fill flags (`c:dPt/c:pictureOptions`): PowerPoint's
83
- * "Picture or texture fill" with "Stack"/"Stretch" semantics on a bar/column
84
- * data point, distinct from the point's plain `c:spPr` solid/gradient fill.
85
- *
86
- * `c:pictureOptions` is optional: a point/series whose `c:spPr` carries a bare
87
- * `a:blipFill` with NO `c:pictureOptions` sibling at all is still a fully
88
- * legal, common picture fill (PowerPoint's own default "stretch, no stack"
89
- * when the format pane never touched the stack settings); `parseChartDataPointPicture`
90
- * synthesizes this descriptor (`pictureFormat: 'stretch'`) in that case so the
91
- * SAME render pipeline resolves it, rather than silently dropping the fill.
92
- *
93
- * The flags parse purely (`parseChartDataPointPicture` in
94
- * `utils/chart-datapoint-serializer.ts`); {@link imageUrl} is a separate,
95
- * later addition populated by the runtime (`PptxHandlerRuntimeChartParsing.ts`)
96
- * once the sibling `c:spPr/a:blipFill/a:blip`'s `r:embed`/`r:link` is resolved
97
- * against the chart part's relationships, since that resolution needs zip/file
98
- * access the pure parser does not have.
99
- */
100
- interface PptxChartDataPointPicture {
101
- /** Apply the picture to the front face of a 3-D bar/column (`c:applyToFront`). */
102
- applyToFront?: boolean;
103
- /** Apply the picture to the side faces of a 3-D bar/column (`c:applyToSides`). */
104
- applyToSides?: boolean;
105
- /** Apply the picture to the end face of a 3-D bar/column (`c:applyToEnd`). */
106
- applyToEnd?: boolean;
107
- /** Stretch, or stack repeated tiles at their natural size (or scaled). */
108
- pictureFormat?: PptxChartPictureFormat;
109
- /** Height, in points, of one repeated picture tile for "stack"/"stackScale" (`c:pictureStackUnit/@val`). */
110
- pictureStackUnit?: number;
111
- /**
112
- * Resolved picture source (a `data:`/`blob:` URL) for the point's sibling
113
- * `c:spPr/a:blipFill/a:blip`. Populated by the runtime after relationship
114
- * resolution (C2-G9 render half); absent until then, and absent entirely
115
- * when the point has no picture fill or the image could not be resolved.
116
- */
117
- imageUrl?: string;
118
- /**
119
- * Effective opacity (0-1) from the blip's `a:alphaModFix/@amt` (a
120
- * thousandths-of-a-percent value, so `amt="60000"` is `0.6`). `undefined`
121
- * when the blip carries no `alphaModFix`, meaning fully opaque.
122
- */
123
- opacity?: number;
124
- }
125
- type ChartFormatTarget = {
126
- kind: 'chartArea';
127
- } | {
128
- kind: 'plotArea';
129
- } | {
130
- kind: 'title';
131
- } | {
132
- kind: 'legend';
133
- } | {
134
- kind: 'axis';
135
- axisIndex: number;
136
- } | {
137
- kind: 'majorGridlines';
138
- axisIndex: number;
139
- } | {
140
- kind: 'minorGridlines';
141
- axisIndex: number;
142
- } | {
143
- kind: 'series';
144
- seriesIndex: number;
145
- } | {
146
- kind: 'dataLabels';
147
- seriesIndex?: number;
148
- };
149
- /** A {@link ChartFormatTarget} as a stable string. */
150
- type ChartFormatTargetKey = string;
151
- /** The key of `target`. */
152
- declare function chartFormatTargetKey(target: ChartFormatTarget): ChartFormatTargetKey;
153
- /** Parses a key back into a target, or `undefined` for an unknown key. */
154
- declare function parseChartFormatTargetKey(key: ChartFormatTargetKey): ChartFormatTarget | undefined;
155
- /**
156
- * The chart element a Format pane targets.
157
- *
158
- * Axis and gridline targets name the axis by its index in
159
- * `PptxChartData.axes`; series and data-label targets by the series index in
160
- * `PptxChartData.series`. A data-label target without a series index covers
161
- * every series (the chart-level "Data Labels" entry of the element picker).
162
- */
163
- type PptxChartFormatTarget = ChartFormatTarget;
164
- /**
165
- * A {@link PptxChartFormatTarget} as a stable string (`chartArea`, `axis:1`,
166
- * `series:0`, `dataLabels`, `dataLabels:2`, ...), used as the record key.
167
- */
168
- type PptxChartFormatTargetKey = ChartFormatTargetKey;
169
- /** `a:pattFill`: a preset pattern (`ST_PresetPatternVal`) in two colours. */
170
- interface PptxChartPatternFill {
171
- /** `@prst`, e.g. `pct20`, `ltUpDiag`, `smGrid`. */
172
- preset: string;
173
- /** Foreground (`a:fgClr`), `#RRGGBB`. */
174
- foreground: string;
175
- /** Background (`a:bgClr`), `#RRGGBB`. */
176
- background: string;
177
- }
178
- /** `a:blipFill`: a picture fill. */
179
- interface PptxChartPictureFill {
180
- /**
181
- * The image as a `data:` URL, what the renderer paints and what the save
182
- * path embeds as a new media part. Absent until a loaded picture's
183
- * relationship has been resolved.
184
- */
185
- src?: string;
186
- /**
187
- * The chart part's relationship id (`a:blip/@r:embed`) of a loaded picture.
188
- * A picture chosen in the pane has none until it is saved.
189
- */
190
- relId?: string;
191
- /** `a:tile` instead of `a:stretch` (PowerPoint's "Tile picture as texture"). */
192
- tile?: boolean;
193
- /** 0 through 100, written as `a:blip/a:alphaModFix/@amt`. */
194
- transparency?: number;
195
- }
196
- /** Fill of a chart element (Fill section). */
197
- interface PptxChartElementFill {
198
- /**
199
- * `none`: `a:noFill`. `solid`: `a:solidFill`. `gradient`: `a:gradFill`.
200
- * `pattern`: `a:pattFill`. `picture`: `a:blipFill`. `automatic`: no fill
201
- * element, so the chart style decides (PowerPoint's "Automatic").
202
- */
203
- kind: 'none' | 'solid' | 'gradient' | 'pattern' | 'picture' | 'automatic';
204
- /** `#RRGGBB`, for `solid`. */
205
- color?: string;
206
- /** 0 (opaque) through 100 (clear), written as `a:alpha`. */
207
- transparency?: number;
208
- /** For `gradient`. */
209
- gradient?: ChartGradientFill;
210
- /** For `pattern`. */
211
- pattern?: PptxChartPatternFill;
212
- /** For `picture`. */
213
- picture?: PptxChartPictureFill;
214
- }
215
- /** Line end decoration (`a:headEnd` / `a:tailEnd` `@type`). */
216
- type PptxChartLineEndType = 'none' | 'triangle' | 'stealth' | 'diamond' | 'oval' | 'arrow';
217
- /** Border or line of a chart element (Border / Line section). */
218
- interface PptxChartElementLine {
219
- /**
220
- * `none`: `a:ln/a:noFill`. `solid`: `a:ln/a:solidFill`. `gradient`:
221
- * `a:ln/a:gradFill`. `automatic`: no line fill.
222
- */
223
- kind: 'none' | 'solid' | 'gradient' | 'automatic';
224
- color?: string;
225
- /** For `gradient`. */
226
- gradient?: ChartGradientFill;
227
- /** 0 through 100, written as `a:alpha`. */
228
- transparency?: number;
229
- /** Width in points (`a:ln/@w`, EMU on disk). */
230
- width?: number;
231
- /** `a:prstDash/@val` (`solid`, `dash`, `sysDot`, `lgDashDot`, ...). */
232
- dash?: string;
233
- /** `a:ln/@cmpd`. */
234
- compound?: 'sng' | 'dbl' | 'thickThin' | 'thinThick' | 'tri';
235
- /** `a:ln/@cap`. */
236
- cap?: 'rnd' | 'sq' | 'flat';
237
- /** `a:round` / `a:bevel` / `a:miter`. */
238
- join?: 'round' | 'bevel' | 'miter';
239
- /** `a:headEnd/@type`. */
240
- beginArrow?: PptxChartLineEndType;
241
- /** `a:tailEnd/@type`. */
242
- endArrow?: PptxChartLineEndType;
243
- }
244
- /** `a:outerShdw`. */
245
- interface PptxChartElementShadow {
246
- color: string;
247
- /** 0 through 100. */
248
- transparency?: number;
249
- /** Blur radius in points. */
250
- blur: number;
251
- /** Distance in points. */
252
- distance: number;
253
- /** Direction in degrees, clockwise from the positive x axis. */
254
- angle: number;
255
- }
256
- /** `a:glow`. */
257
- interface PptxChartElementGlow {
258
- color: string;
259
- /** 0 through 100. */
260
- transparency?: number;
261
- /** Radius (size) in points. */
262
- radius: number;
263
- }
264
- /** Effects section: each `null` removes the effect, `undefined` leaves it as authored. */
265
- interface PptxChartElementEffects {
266
- shadow?: PptxChartElementShadow | null;
267
- glow?: PptxChartElementGlow | null;
268
- /** Soft-edge radius in points (`a:softEdge/@rad`). */
269
- softEdge?: number | null;
270
- }
271
- /** `ST_BevelPresetType`. */
272
- type PptxChartBevelType = 'relaxedInset' | 'circle' | 'slope' | 'cross' | 'angle' | 'softRound' | 'convex' | 'coolSlant' | 'divot' | 'riblet' | 'hardEdge' | 'artDeco';
273
- /** `a:bevelT` / `a:bevelB`. */
274
- interface PptxChartBevel {
275
- type: PptxChartBevelType;
276
- /** Width in points (`@w`). */
277
- width: number;
278
- /** Height in points (`@h`). */
279
- height: number;
280
- }
281
- /**
282
- * 3-D Format section: `a:sp3d` (bevels, depth, contour, material) and the
283
- * lighting rig of `a:scene3d`. Each `null` removes the setting, `undefined`
284
- * leaves it as authored.
285
- */
286
- interface PptxChartElementThreeD {
287
- bevelTop?: PptxChartBevel | null;
288
- bevelBottom?: PptxChartBevel | null;
289
- /** Depth (`@extrusionH`, points) and its colour (`a:extrusionClr`). */
290
- depth?: {
291
- size: number;
292
- color?: string;
293
- } | null;
294
- /** Contour (`@contourW`, points) and its colour (`a:contourClr`). */
295
- contour?: {
296
- size: number;
297
- color?: string;
298
- } | null;
299
- /** `@prstMaterial` (`ST_PresetMaterialType`, e.g. `warmMatte`, `metal`, `plastic`). */
300
- material?: string | null;
301
- /** `a:scene3d/a:lightRig/@rig` (`ST_LightRigType`, e.g. `threePt`, `balanced`). */
302
- lighting?: string | null;
303
- }
304
- /** Text fill of the Text Options pane (`a:defRPr` / `a:rPr` fill). */
305
- interface PptxChartTextFill {
306
- kind: 'none' | 'solid' | 'gradient' | 'automatic';
307
- color?: string;
308
- transparency?: number;
309
- gradient?: ChartGradientFill;
310
- }
311
- /** Text outline (`a:defRPr/a:ln`). */
312
- interface PptxChartTextOutline {
313
- kind: 'none' | 'solid' | 'automatic';
314
- color?: string;
315
- transparency?: number;
316
- /** Width in points. */
317
- width?: number;
318
- dash?: string;
319
- }
320
- /**
321
- * Text Options of an element with text (title, legend, axis labels, data
322
- * labels, or the chart area for every chart text): `c:txPr` (and a title's
323
- * rich text runs). Each `null` removes the setting, `undefined` leaves it.
324
- */
325
- interface PptxChartElementText {
326
- fill?: PptxChartTextFill;
327
- outline?: PptxChartTextOutline;
328
- /** Text shadow and glow (`a:defRPr/a:effectLst`). */
329
- effects?: Pick<PptxChartElementEffects, 'shadow' | 'glow'>;
330
- /** Custom angle in degrees (`a:bodyPr/@rot`). */
331
- rotation?: number | null;
332
- /** Text direction (`a:bodyPr/@vert`). */
333
- direction?: 'horz' | 'vert' | 'vert270' | 'wordArtVert' | null;
334
- /** Vertical alignment (`a:bodyPr/@anchor`). */
335
- anchor?: 't' | 'ctr' | 'b' | null;
336
- }
337
- /**
338
- * The pane edits recorded for one element. Each section present replaces
339
- * that part of the element's `c:spPr`; an absent section is left as authored.
340
- * `reset` (Reset to Match Style) drops the element's `c:spPr` so the chart
341
- * style draws it again; later edits recorded after a reset apply on top.
342
- */
343
- interface PptxChartElementFormat {
344
- fill?: PptxChartElementFill;
345
- line?: PptxChartElementLine;
346
- effects?: PptxChartElementEffects;
347
- threeD?: PptxChartElementThreeD;
348
- text?: PptxChartElementText;
349
- reset?: boolean;
350
- }
351
- /** Element formats by target key. */
352
- type PptxChartElementFormats = Record<PptxChartFormatTargetKey, PptxChartElementFormat>;
353
- interface PptxChartPivotFormat {
354
- index: number;
355
- /**
356
- * Typed projection of `spPr` (fill/stroke colour, stroke width, dash
357
- * style). When the parser is given a colour resolver (the normal case: the
358
- * runtime always supplies one), both a literal `a:srgbClr` and an
359
- * `a:schemeClr` theme reference (with its `lumMod`/`lumOff`/`tint`/`shade`
360
- * modifiers) resolve to a hex colour here, the same theme +
361
- * `c:clrMapOvr` chain the rest of chart parsing uses. Without a resolver
362
- * (e.g. a hand-built `PptxChartPivotFormat` with no theme to resolve
363
- * against), only the literal case resolves. Either way the authored node
364
- * is byte-preserved through {@link shapePropertiesXml} until this field is
365
- * set to something that no longer matches what re-parses off the current
366
- * XML; setting it then re-derives `shapePropertiesXml` on save (merged
367
- * onto whatever was already authored, keeping an unrelated schemeClr
368
- * reference alive when the colour itself is unchanged) unless
369
- * `shapePropertiesXml` is set explicitly, which wins.
370
- */
371
- shapeProperties?: PptxChartShapeProps;
372
- /**
373
- * Typed projection of `txPr`'s `a:p/a:pPr/a:defRPr` (size/bold/italic/
374
- * colour/family), the same shape a legend entry or data-table's text
375
- * override models. Colour resolution mirrors {@link shapeProperties}
376
- * (theme-resolved `schemeClr` when a colour resolver is supplied, literal
377
- * `srgbClr` otherwise). See {@link txPrXml} for the raw fallback.
378
- */
379
- textStyle?: PptxChartLegendTextStyle;
380
- /**
381
- * Typed projection of `marker` (symbol/size/spPr). See {@link markerXml}
382
- * for the raw fallback.
383
- */
384
- marker?: PptxChartMarker;
385
- shapePropertiesXml?: XmlObject | null;
386
- txPrXml?: XmlObject | null;
387
- markerXml?: XmlObject | null;
388
- dataLabelXml?: XmlObject | null;
389
- extensionListXml?: XmlObject | null;
390
- rawXml?: XmlObject;
391
- }
392
- /** Editable classic ChartML `c:pivotFmts` collection. */
393
- interface PptxChartPivotFormats {
394
- formats: PptxChartPivotFormat[];
395
- rawXml?: XmlObject;
396
- }
397
- /** Editable classic ChartML `c:pivotSource` metadata. */
398
- interface PptxChartPivotSource {
399
- /** Pivot table reference stored as `c:name` text. */
400
- name: string;
401
- /** Required unsigned format identifier stored in `c:fmtId/@val`. */
402
- formatId: number;
403
- /** Internal source subtree used to preserve extensions and foreign markup. */
404
- rawXml?: XmlObject;
405
- }
406
- /** Headers and footers used when a classic ChartML chart is printed. */
407
- interface PptxChartPrintHeaderFooter {
408
- oddHeader?: string;
409
- oddFooter?: string;
410
- evenHeader?: string;
411
- evenFooter?: string;
412
- firstHeader?: string;
413
- firstFooter?: string;
414
- alignWithMargins?: boolean;
415
- differentOddEven?: boolean;
416
- differentFirst?: boolean;
417
- /** Original subtree retained for foreign attributes and extension children. */
418
- rawXml?: unknown;
419
- }
420
- /** Required page margins from ChartML `c:pageMargins`, measured in inches. */
421
- interface PptxChartPageMargins {
422
- left: number;
423
- right: number;
424
- top: number;
425
- bottom: number;
426
- header: number;
427
- footer: number;
428
- /** Original leaf retained for foreign attributes. */
429
- rawXml?: unknown;
430
- }
431
- /** Printer page configuration from ChartML `c:pageSetup`. */
432
- interface PptxChartPageSetup {
433
- paperSize?: number;
434
- firstPageNumber?: number;
435
- orientation?: 'default' | 'portrait' | 'landscape';
436
- blackAndWhite?: boolean;
437
- draft?: boolean;
438
- useFirstPageNumber?: boolean;
439
- horizontalDpi?: number;
440
- verticalDpi?: number;
441
- copies?: number;
442
- /**
443
- * Custom paper height, used when {@link paperSize} is `0`
444
- * (`c:pageSetup/@paperHeight`, ST_PositiveUniversalMeasure, e.g. `"297mm"`).
445
- * Kept as the raw measure string rather than converted, matching how the
446
- * schema stores it.
447
- */
448
- paperHeight?: string;
449
- /** Custom paper width, used when {@link paperSize} is `0` (`@paperWidth`). */
450
- paperWidth?: string;
451
- /** Original leaf retained for foreign attributes. */
452
- rawXml?: unknown;
453
- }
454
- /** Editable `c:printSettings` content from a classic ChartML chart space. */
455
- interface PptxChartPrintSettings {
456
- headerFooter?: PptxChartPrintHeaderFooter | null;
457
- pageMargins?: PptxChartPageMargins | null;
458
- pageSetup?: PptxChartPageSetup | null;
459
- /** `null` removes the legacy header/footer drawing relationship element. */
460
- legacyDrawingHeaderFooterRelationshipId?: string | null;
461
- /** Original subtree retained for unknown and extension content. */
462
- rawXml?: unknown;
463
- }
464
- /** Editable classic ChartML `c:protection` settings. */
465
- interface PptxChartProtection {
466
- /** Prevent editing the chart object. */
467
- chartObject?: boolean | null;
468
- /** Prevent editing the chart data. */
469
- data?: boolean | null;
470
- /** Prevent editing chart formatting. */
471
- formatting?: boolean | null;
472
- /** Prevent selecting chart elements. */
473
- selection?: boolean | null;
474
- /** Prevent chart user-interface operations. */
475
- userInterface?: boolean | null;
476
- /** Internal source subtree used to preserve foreign markup during edits. */
477
- rawXml?: XmlObject;
478
- }
479
- /** Chart elements consumed by the current Office chart painters. */
480
- declare const CHART_STYLE_PARTS: readonly ['title', 'axisTitle', 'categoryAxis', 'valueAxis', 'legend', 'dataLabel', 'dataPoint', 'dataPointLine', 'gridlineMajor', 'gridlineMinor', 'chartArea', 'plotArea'];
481
- type ChartStylePart = (typeof CHART_STYLE_PARTS)[number];
482
- /** Resolved subset consumed by existing chart painters, with sizes and widths in points. */
483
- interface ResolvedChartStyleEntry {
484
- fontSize?: number;
485
- bold?: boolean;
486
- italic?: boolean;
487
- underline?: boolean;
488
- color?: string;
489
- lineColor?: string;
490
- lineWidth?: number;
491
- fillColor?: string;
492
- }
493
- type ResolvedChartStyleDefinition = Partial<Record<ChartStylePart, ResolvedChartStyleEntry>>;
494
- /**
495
- * Chart title rich-text run type, split out of `types/chart.ts` (already at
496
- * the repo's file-size limit) to keep that module from growing further.
497
- *
498
- * @module pptx-types/chart-title
499
- */
500
- /**
501
- * One run of a chart title's rich text (`c:title/c:tx/c:rich/a:p/a:r`).
502
- *
503
- * The flat `PptxChartData.title` field only ever captured the FIRST run's
504
- * text with no per-run formatting; `titleRuns` (when present) is the
505
- * lossless, multi-run replacement parsed from the same `c:rich` body. Absent
506
- * when the title has no rich text at all (an empty/auto title, or one
507
- * authored as a linked-cell reference).
508
- */
509
- interface PptxChartTitleRun {
510
- /** This run's text (`a:t`). */
511
- text: string;
512
- /** `a:rPr/@_b`. */
513
- bold?: boolean;
514
- /** `a:rPr/@_i`. */
515
- italic?: boolean;
516
- /**
517
- * Font size in POINTS (`a:rPr/@_sz`, hundredths of a point / 100), matching
518
- * `PptxChartLegendTextStyle.fontSize`'s convention rather than the pixel
519
- * convention `TextStyle.fontSize` uses for slide text.
520
- */
521
- fontSize?: number;
522
- /** Resolved hex colour (e.g. `"#FF0000"`) from `a:rPr/a:solidFill`. */
523
- color?: string;
524
- }
525
- /** A single paragraph of overlay-shape text with light formatting. */
526
- interface PptxChartUserShapeParagraph {
527
- /** Joined run text of the paragraph. */
528
- text: string;
529
- /** Font size in points (`a:rPr/@sz` divided by 100), when present. */
530
- fontSize?: number;
531
- /** Whether the first run is bold (`a:rPr/@b`). */
532
- bold?: boolean;
533
- /** Whether the first run is italic (`a:rPr/@i`). */
534
- italic?: boolean;
535
- /** Resolved run colour hex (e.g. `"#FF0000"`), when present. */
536
- color?: string;
537
- /** Paragraph alignment (`a:pPr/@algn`): left / centre / right. */
538
- align?: 'l' | 'ctr' | 'r';
539
- }
540
- /**
541
- * The DrawingML 2D group transform (`a:xfrm` inside `cdr:grpSpPr`) that
542
- * anchors a `grpSp`'s own box ({@link off}/{@link ext}) and establishes the
543
- * coordinate space its children are expressed in ({@link chOff}/{@link
544
- * chExt}), all in EMU. A child's position within the group is mapped into
545
- * the group's own box via
546
- * `frac = (child.off - chOff) / chExt`, then applied to the enclosing
547
- * anchor's box; see `flattenChartUserShapes` in
548
- * `chart-user-shapes-parser.ts`.
549
- */
550
- interface PptxChartUserShapeGroupTransform {
551
- /** The group's own position in its parent's coordinate space, in EMU. */
552
- off: {
553
- x: number;
554
- y: number;
555
- };
556
- /** The group's own size in its parent's coordinate space, in EMU. */
557
- ext: {
558
- cx: number;
559
- cy: number;
560
- };
561
- /** Origin of the child coordinate space (`a:chOff`), in EMU. */
562
- chOff: {
563
- x: number;
564
- y: number;
565
- };
566
- /** Size of the child coordinate space (`a:chExt`), in EMU. */
567
- chExt: {
568
- cx: number;
569
- cy: number;
570
- };
571
- /**
572
- * The group's own rotation in degrees (`a:xfrm/@rot`, stored in 60,000ths
573
- * of a degree), when present. Rotates the whole group, and everything
574
- * grouped inside it, as a rigid body about the CENTRE of the group's own
575
- * box ({@link off}/{@link ext}); see `flattenChartUserShapes` in
576
- * `chart-user-shapes-parser.ts` for how this composes onto each contained
577
- * leaf's own {@link PptxChartUserShapeGroupChild.rotation}. Verified
578
- * against real PowerPoint (COM): a `cdr:grpSp`'s `cdr:grpSpPr/a:xfrm` does
579
- * carry `rot` the same way an ordinary shape's does.
580
- */
581
- rotation?: number;
582
- /** The group's own horizontal flip (`a:xfrm/@flipH`), when present; composes onto children by XOR, see {@link rotation}'s doc. */
583
- flipH?: boolean;
584
- /** The group's own vertical flip (`a:xfrm/@flipV`), when present; composes onto children by XOR, see {@link rotation}'s doc. */
585
- flipV?: boolean;
586
- }
587
- /**
588
- * One shape grouped inside a `cdr:grpSp` (or a nested `cdr:grpSp` itself).
589
- * Unlike a top-level {@link PptxChartUserShape}, a group child has no
590
- * drawing anchor of its own: its position is expressed in its parent
591
- * group's child coordinate space via {@link off}/{@link ext} (EMU, read
592
- * from the child's own `a:xfrm`), not as a chart-relative fraction.
593
- */
594
- interface PptxChartUserShapeGroupChild {
595
- /** Shape kind, same vocabulary as {@link PptxChartUserShape.kind}. */
596
- kind: 'sp' | 'cxnSp' | 'pic' | 'grpSp' | 'graphicFrame';
597
- /** Position within the parent group's child coordinate space, in EMU. */
598
- off: {
599
- x: number;
600
- y: number;
601
- };
602
- /** Size within the parent group's child coordinate space, in EMU. */
603
- ext: {
604
- cx: number;
605
- cy: number;
606
- };
607
- /** Preset geometry name (`a:prstGeom/@prst`), defaulting to `"rect"`. */
608
- prst?: string;
609
- /** Resolved solid-fill hex colour, when present. */
610
- fill?: string;
611
- /** Resolved line/stroke hex colour, when present. */
612
- stroke?: string;
613
- /** Line width in points (`a:ln/@w` divided by 12700), when present. */
614
- strokeWidth?: number;
615
- /** Text paragraphs of the shape's `txBody`, when present. */
616
- paragraphs?: PptxChartUserShapeParagraph[];
617
- /**
618
- * A `pic` child's alt text (`cdr:nvPicPr/cdr:cNvPr/@descr`), when present.
619
- * Editable independently of {@link rawXml}'s otherwise-verbatim content:
620
- * the serializer patches only this attribute onto the cloned raw node.
621
- */
622
- altText?: string;
623
- /**
624
- * This child's OWN rotation in degrees (`a:xfrm/@rot`), when present.
625
- * Composes with every enclosing group's own
626
- * {@link PptxChartUserShapeGroupTransform.rotation} (added) to produce the
627
- * leaf's final on-screen rotation; see `flattenChartUserShapes`.
628
- */
629
- rotation?: number;
630
- /** This child's OWN horizontal flip (`a:xfrm/@flipH`); composes with an ancestor group's flip by XOR. */
631
- flipH?: boolean;
632
- /** This child's OWN vertical flip (`a:xfrm/@flipV`); composes with an ancestor group's flip by XOR. */
633
- flipV?: boolean;
634
- /**
635
- * Verbatim source XML of a `pic`/`graphicFrame` child, or of this node
636
- * itself when `kind === 'grpSp'` and the nested group is untouched since
637
- * parse. See {@link PptxChartUserShape.rawXml}'s doc for the same
638
- * contract one level up.
639
- */
640
- rawXml?: XmlObject;
641
- /** Present when `kind === 'grpSp'`: this nested group's own transform. */
642
- transform?: PptxChartUserShapeGroupTransform;
643
- /** Present when `kind === 'grpSp'`: this nested group's own children. */
644
- children?: PptxChartUserShapeGroupChild[];
645
- }
646
- /**
647
- * A parsed chart-overlay shape positioned by a drawing anchor.
648
- *
649
- * Position is expressed as chart-relative fractions in {@link from}. For a
650
- * `relSizeAnchor` the opposite corner is {@link to} (also fractional); for an
651
- * `absSizeAnchor` the extent is {@link ext} in EMU.
652
- */
653
- interface PptxChartUserShape {
654
- /**
655
- * Shape kind: text/preset shape, connector, picture, a group of the
656
- * above (`grpSp`, with its own {@link transform} and {@link children},
657
- * nested arbitrarily; use `flattenChartUserShapes` from
658
- * `chart-user-shapes-parser.ts` to get a flat, render-ready leaf list
659
- * with the group transform already applied), or a bare placeholder for
660
- * a `graphicFrame` anchor child (deep content such as a nested chart or
661
- * table is out of scope; it only keeps the anchor's space accounted for
662
- * instead of the whole overlay disappearing).
663
- */
664
- kind: 'sp' | 'cxnSp' | 'pic' | 'grpSp' | 'graphicFrame';
665
- /** Anchor kind that positioned the shape. */
666
- anchor: 'rel' | 'abs';
667
- /** Top-left corner as chart-relative fractions (0-1). */
668
- from: {
669
- x: number;
670
- y: number;
671
- };
672
- /** Bottom-right corner as chart-relative fractions (0-1); relSizeAnchor only. */
673
- to?: {
674
- x: number;
675
- y: number;
676
- };
677
- /** Extent in EMU (cx, cy); absSizeAnchor only. */
678
- ext?: {
679
- cx: number;
680
- cy: number;
681
- };
682
- /** Preset geometry name (`a:prstGeom/@prst`), defaulting to `"rect"`. */
683
- prst?: string;
684
- /** Resolved solid-fill hex colour, when present. */
685
- fill?: string;
686
- /** Resolved line/stroke hex colour, when present. */
687
- stroke?: string;
688
- /** Line width in points (`a:ln/@w` divided by 12700), when present. */
689
- strokeWidth?: number;
690
- /** Text paragraphs of the shape's `txBody`, when present. */
691
- paragraphs?: PptxChartUserShapeParagraph[];
692
- /**
693
- * A `pic` anchor's alt text (`cdr:nvPicPr/cdr:cNvPr/@descr`), when
694
- * present. Editable independently of {@link rawXml}'s otherwise-verbatim
695
- * content: the serializer patches only this attribute onto the cloned
696
- * raw node, so a picture's blip and other markup are untouched.
697
- */
698
- altText?: string;
699
- /**
700
- * This shape's OWN rotation in degrees (`a:xfrm/@rot`, on `spPr/a:xfrm`
701
- * for `sp`/`cxnSp`/`pic`, or directly on a top-level `graphicFrame`'s own
702
- * `a:xfrm`), when present. A top-level anchor's position/size is governed
703
- * by {@link from}/{@link to}/{@link ext}, never by this `a:xfrm`'s own
704
- * `off`/`ext` (see {@link rawXml}'s doc), but `rot`/`flipH`/`flipV` on that
705
- * same `a:xfrm` DO apply visually: verified against real PowerPoint (COM),
706
- * which writes e.g. `<a:xfrm rot="1800000"><a:off .../><a:ext .../></a:xfrm>`
707
- * on a rotated overlay shape's `spPr`, with the `off`/`ext` values
708
- * unrelated to the anchor's own `cdr:from`/`cdr:to`.
709
- */
710
- rotation?: number;
711
- /** This shape's OWN horizontal flip (`a:xfrm/@flipH`); see {@link rotation}'s doc. */
712
- flipH?: boolean;
713
- /** This shape's OWN vertical flip (`a:xfrm/@flipV`); see {@link rotation}'s doc. */
714
- flipV?: boolean;
715
- /**
716
- * Verbatim source XML of a `pic` or `graphicFrame` anchor child (the
717
- * `cdr:pic` / `cdr:graphicFrame` node itself, not the enclosing anchor),
718
- * or of the `cdr:grpSp` node itself when `kind === 'grpSp'` and the
719
- * group is untouched since parse (byte-identical passthrough). None of
720
- * these three kinds have a reconstructable typed representation that is
721
- * guaranteed lossless (a picture's blip reference, a nested chart/table's
722
- * graphic content, or a group's exact child ordering/ids), so the
723
- * serializer re-emits this verbatim when present instead of a lossy
724
- * rebuild. Editing a shape inside a group (via the SDK's path-based
725
- * overlay operations) clears the group's `rawXml` so the serializer
726
- * regenerates it from {@link transform}/{@link children} instead. Absent
727
- * for `sp`/`cxnSp`, which round-trip losslessly through their typed
728
- * fields above.
729
- */
730
- rawXml?: XmlObject;
731
- /** Present when `kind === 'grpSp'`: the group's own transform. */
732
- transform?: PptxChartUserShapeGroupTransform;
733
- /** Present when `kind === 'grpSp'`: the grouped children, nested arbitrarily. */
734
- children?: PptxChartUserShapeGroupChild[];
735
- }
736
- /**
737
- * Supported chart type discriminators.
738
- *
739
- * @example
740
- * ```ts
741
- * const type: PptxChartType = "bar";
742
- * // => "bar": one of: "bar" | "line" | "pie" | "doughnut" | "area" | "scatter" | …
743
- * ```
744
- */
745
- type PptxChartType = 'bar' | 'line' | 'pie' | 'ofPie' | 'doughnut' | 'area' | 'scatter' | 'bubble' | 'radar' | 'stock' | 'bar3D' | 'line3D' | 'pie3D' | 'area3D' | 'surface' | 'histogram' | 'waterfall' | 'funnel' | 'treemap' | 'sunburst' | 'boxWhisker' | 'regionMap' | 'combo' | 'unknown';
746
- /**
747
- * Bar series direction (OOXML `ST_BarDir`): `"col"` is a vertical column
748
- * chart, `"bar"` a horizontal bar chart.
749
- *
750
- * @example
751
- * ```ts
752
- * const dir: PptxChartBarDirection = "col";
753
- * // => "col" - one of: "col" | "bar"
754
- * ```
755
- */
756
- type PptxChartBarDirection = 'col' | 'bar';
757
- /**
758
- * 3-D bar/column shape (OOXML `ST_Shape`, `c:bar3DChart/c:shape/@val` or a
759
- * per-series `c:ser/c:shape` override). `coneToMax` / `pyramidToMax` scale
760
- * the cone/pyramid so it reaches full height at the value axis maximum,
761
- * appearing truncated below it; the plain `cone`/`pyramid` always come to a
762
- * full point at the bar's own value.
763
- *
764
- * @example
765
- * ```ts
766
- * const shape: PptxBar3DShape = "cylinder";
767
- * // => "cylinder", one of: "box" | "cone" | "coneToMax" | "cylinder" | "pyramid" | "pyramidToMax"
768
- * ```
769
- */
770
- type PptxBar3DShape = 'box' | 'cone' | 'coneToMax' | 'cylinder' | 'pyramid' | 'pyramidToMax';
771
- /**
772
- * Supported trendline regression types: the neutral chart model's readable
773
- * trendline kinds (`ChartTrendlineKind` in `ooxml-core/chart`).
774
- *
775
- * @example
776
- * ```ts
777
- * const type: PptxChartTrendlineType = "linear";
778
- * // => "linear": one of: "linear" | "exponential" | "logarithmic" | "polynomial" | "power" | "movingAvg"
779
- * ```
780
- */
781
- type PptxChartTrendlineType = ChartTrendlineKind;
782
- /**
783
- * Configuration for a chart trendline (regression line).
784
- *
785
- * @example
786
- * ```ts
787
- * const trendline: PptxChartTrendline = {
788
- * trendlineType: "linear",
789
- * displayEq: true,
790
- * displayRSq: true,
791
- * color: "#FF0000",
792
- * };
793
- * // => satisfies PptxChartTrendline
794
- * ```
795
- */
796
- interface PptxChartTrendline {
797
- trendlineType: PptxChartTrendlineType;
798
- name?: string;
799
- order?: number;
800
- period?: number;
801
- forward?: number;
802
- backward?: number;
803
- intercept?: number;
804
- displayRSq?: boolean;
805
- displayEq?: boolean;
806
- color?: string;
807
- /** Trendline width in points (`c:trendline/c:spPr/a:ln/@w`, EMU / 12700). */
808
- lineWidth?: number;
809
- /** Trendline dash style (`c:trendline/c:spPr/a:ln/a:prstDash/@val`). */
810
- lineDashStyle?: string;
811
- label?: PptxChartTrendlineLabel | null;
812
- }
813
- /** Typed, commonly edited properties of `c:trendlineLbl`. */
814
- interface PptxChartTrendlineLabel {
815
- layout?: PptxChartManualLayout;
816
- numberFormatCode?: string;
817
- sourceLinked?: boolean;
818
- }
819
- /** Error-bar direction axis (`ChartErrorBarDirection` in `ooxml-core/chart`). */
820
- type PptxChartErrBarDir = ChartErrorBarDirection;
821
- /** Error-bar display type: both sides, negative only, or positive only (`ChartErrorBarType`). */
822
- type PptxChartErrBarType = ChartErrorBarType;
823
- /**
824
- * How the error-bar value is calculated (`ChartErrorValueType` in `ooxml-core/chart`).
825
- *
826
- * @example
827
- * ```ts
828
- * const valType: PptxChartErrValType = "percentage";
829
- * // => "percentage": one of: "cust" | "fixedVal" | "percentage" | "stdDev" | "stdErr"
830
- * ```
831
- */
832
- type PptxChartErrValType = ChartErrorValueType;
833
- /**
834
- * Error bars for a chart series.
835
- *
836
- * @example
837
- * ```ts
838
- * const bars: PptxChartErrBars = {
839
- * direction: "y",
840
- * barType: "both",
841
- * valType: "percentage",
842
- * val: 5,
843
- * };
844
- * // => satisfies PptxChartErrBars
845
- * ```
846
- */
847
- interface PptxChartErrBars {
848
- direction: PptxChartErrBarDir;
849
- barType: PptxChartErrBarType;
850
- valType: PptxChartErrValType;
851
- val?: number;
852
- customPlus?: number[];
853
- customMinus?: number[];
854
- noEndCap?: boolean;
855
- color?: string;
856
- /** Error-bar line width in points (`c:errBars/c:spPr/a:ln/@w`, EMU / 12700). */
857
- width?: number;
858
- /** Error-bar line dash style (`c:errBars/c:spPr/a:ln/a:prstDash/@val`). */
859
- dashStyle?: string;
860
- }
861
- /**
862
- * Visibility flags for the chart data table (axes + legend keys).
863
- *
864
- * @example
865
- * ```ts
866
- * const dt: PptxChartDataTable = {
867
- * showHorzBorder: true,
868
- * showVertBorder: true,
869
- * showOutline: true,
870
- * showKeys: true,
871
- * };
872
- * // => satisfies PptxChartDataTable
873
- * ```
874
- */
875
- interface PptxChartDataTable {
876
- showHorzBorder?: boolean;
877
- showVertBorder?: boolean;
878
- showOutline?: boolean;
879
- showKeys?: boolean;
880
- /** Table border/fill formatting (`c:dTable/c:spPr`). */
881
- spPr?: PptxChartShapeProps;
882
- /**
883
- * Cell text defaults (`c:dTable/c:txPr/a:p/a:pPr/a:defRPr`). Reuses the same
884
- * shape as a legend entry's text override since both are a flat paragraph
885
- * default-run-property style (size/bold/italic/font/colour).
886
- */
887
- txPr?: PptxChartLegendTextStyle;
888
- }
889
- /**
890
- * Line appearance for chart helper lines (drop lines, hi-low lines).
891
- *
892
- * @example
893
- * ```ts
894
- * const style: PptxChartLineStyle = {
895
- * color: "#AAAAAA",
896
- * width: 1,
897
- * dashStyle: "dash",
898
- * };
899
- * // => satisfies PptxChartLineStyle
900
- * ```
901
- */
902
- interface PptxChartLineStyle {
903
- color?: string;
904
- width?: number;
905
- dashStyle?: string;
906
- }
907
- /** Marker symbol types for line/scatter chart data points. */
908
- type PptxChartMarkerSymbol = 'circle' | 'dash' | 'diamond' | 'dot' | 'none' | 'picture' | 'plus' | 'square' | 'star' | 'triangle' | 'x' | 'auto';
909
- /**
910
- * `ST_ScatterStyle` (ECMA-376 §21.2.3.40): how a scatter chart joins its points.
911
- * `line`/`lineMarker` connect them with straight segments, `smooth`/
912
- * `smoothMarker` with a bezier, `marker`/`none` not at all.
913
- */
914
- type PptxChartScatterStyle = 'none' | 'line' | 'lineMarker' | 'marker' | 'smooth' | 'smoothMarker';
915
- /** Shape properties extracted from c:spPr for chart formatting. */
916
- /**
917
- * A gradient fill from a chart `c:spPr/a:gradFill` (chart area, plot area,
918
- * series or data point). Positions are 0..100 and stop `opacity` 0..1 (absent
919
- * means opaque); a linear gradient's `angle` is in degrees clockwise from
920
- * left-to-right (`a:lin/@ang`, so 90 is top to bottom); a radial (`a:path`)
921
- * gradient centres on `focalPoint` (0..1 fractions of the box), the middle
922
- * when absent.
923
- */
924
- type PptxChartGradientFill = ChartGradientFill;
925
- interface PptxChartShapeProps {
926
- fillColor?: string;
927
- strokeColor?: string;
928
- strokeWidth?: number;
929
- /** Line dash style (a:prstDash/@val), e.g. 'solid', 'dash', 'dot', 'lgDash'. */
930
- strokeDashStyle?: string;
931
- /**
932
- * `a:ln/a:noFill`: the line is explicitly not drawn. Not the same as having
933
- * no line formatting, which leaves the renderer's default line in place.
934
- */
935
- lineNoFill?: boolean;
936
- }
937
- /** Up/down bar formatting on line and stock charts (`c:upDownBars`). */
938
- interface PptxChartUpDownBars {
939
- /** Gap between bars as a percentage, constrained to 0 through 500. */
940
- gapWidth?: number;
941
- upBars?: PptxChartShapeProps;
942
- downBars?: PptxChartShapeProps;
943
- }
944
- /** Marker appearance on a chart series or data point. */
945
- interface PptxChartMarker {
946
- symbol: PptxChartMarkerSymbol;
947
- /** Marker size in points, constrained by ST_MarkerSize to 2 through 72. */
948
- size?: number;
949
- spPr?: PptxChartShapeProps;
950
- }
951
- /** Per-data-point formatting override (c:dPt). */
952
- interface PptxChartDataPoint {
953
- idx: number;
954
- spPr?: PptxChartShapeProps;
955
- /**
956
- * Per-point gradient fill (`c:dPt/c:spPr/a:gradFill`): one bar, column or
957
- * slice painted with its own gradient. Takes precedence over
958
- * `spPr.fillColor` and round-trips with the same lossless rules as
959
- * {@link PptxChartSeries.gradientFill}; ignored for line-drawn series. Set
960
- * it through `setChartDataPointGradient`.
961
- */
962
- gradientFill?: PptxChartGradientFill;
963
- explosion?: number;
964
- invertIfNegative?: boolean;
965
- marker?: PptxChartMarker;
966
- /** Render a bubble-chart point with a 3-D appearance. */
967
- bubble3D?: boolean;
968
- /** Per-point picture-fill flags (`c:dPt/c:pictureOptions`). */
969
- picture?: PptxChartDataPointPicture;
970
- /**
971
- * A picture fill implied by a bare `c:dPt/c:spPr/a:blipFill` with NO
972
- * sibling `c:pictureOptions` at all: still a fully legal "stretch, no
973
- * stack" picture fill, just one PowerPoint's format pane never touched the
974
- * stack settings for. Render-derived only: unlike {@link picture}, this is
975
- * never written back on save (the original, untouched `c:spPr` already
976
- * round-trips verbatim), so populating it can never desync the saved file
977
- * from what was authored. See `chart-datapoint-picture.ts`'s
978
- * `parseImplicitBlipPictureFill`.
979
- */
980
- impliedPicture?: PptxChartDataPointPicture;
981
- /**
982
- * This point's identity GUID (`c:dPt/c:extLst/c:ext/c16:uniqueId/@val`,
983
- * the Office 2014+ `{C3380CC4-5D6E-409C-BE32-E72D297353CC}` chart
984
- * extension), read-only here: an edited point keeps its existing
985
- * `c:extLst` as passthrough (see `chart-datapoint-serializer.ts`), so this
986
- * field exists for introspection rather than round-trip.
987
- */
988
- uniqueId?: string;
989
- }
990
- /** Schema values accepted by `c:dLblPos`. */
991
- type PptxChartDataLabelPosition = 'bestFit' | 'b' | 'ctr' | 'inBase' | 'inEnd' | 'l' | 'outEnd' | 'r' | 't';
992
- /**
993
- * `c15:dlblRangeCache`/`c15:datalabelsRange` (CT_SeriesDataLabelsRange):
994
- * PowerPoint 2013+'s "Value From Cells" custom label source, one cell range
995
- * supplying every label in a group (chart-type or series `c:dLbls`), with a
996
- * cache aligned to point order. See `utils/chart-data-labels-range.ts`.
997
- */
998
- interface PptxChartDataLabelsRange {
999
- /** `c15:f`: the cell range formula (e.g. `Sheet1!$D$2:$D$5`). */
1000
- formula: string;
1001
- /** `c15:dlblRangeCache`: cached label text, index-aligned with data points. */
1002
- cache: string[];
1003
- }
1004
- /** Individual data label override (c:dLbl). */
1005
- interface PptxChartDataLabel {
1006
- idx: number;
1007
- /** Suppress this data point's automatically generated label. */
1008
- deleted?: boolean;
1009
- showVal?: boolean;
1010
- showCatName?: boolean;
1011
- showSerName?: boolean;
1012
- showPercent?: boolean;
1013
- showLegendKey?: boolean;
1014
- showBubbleSize?: boolean;
1015
- position?: PptxChartDataLabelPosition;
1016
- text?: string;
1017
- /**
1018
- * {@link text} was read from the cells of a "Value From Cells" range, not
1019
- * from a literal `c:tx`. The save path keeps such a label linked to its
1020
- * cells and writes no `c:tx`; clear this to save the text as literal.
1021
- */
1022
- textFromCells?: boolean;
1023
- separator?: string;
1024
- showLeaderLines?: boolean;
1025
- /**
1026
- * Per-label number-format override (`c:dLbl/c:numFmt/@formatCode`), taking
1027
- * precedence over the chart-level {@link PptxChartDataLabelOptions.numberFormat}
1028
- * and the series' own {@link PptxChartSeries.numberFormat} when set.
1029
- */
1030
- numberFormat?: string;
1031
- /**
1032
- * Manually dragged label position (`c:dLbl/c:layout/c:manualLayout`), the
1033
- * same CT_ManualLayout shape used for title/legend/plotArea. `null`
1034
- * explicitly clears a drag back to the automatic position.
1035
- */
1036
- layout?: PptxChartManualLayout | null;
1037
- /**
1038
- * This label's own font (`c:dLbl/c:txPr/a:p/a:pPr/a:defRPr`, or ChartEx
1039
- * `cx:dataLabel/cx:txPr`), taking precedence over the chart/series-level
1040
- * {@link PptxChartDataLabelOptions.txPr} when set. Reuses the legend
1041
- * entry's flat text-style shape since both are the same
1042
- * `.../a:p/a:pPr/a:defRPr` default-run-property style.
1043
- */
1044
- txPr?: PptxChartLegendTextStyle;
1045
- /**
1046
- * Font of this label's literal rich text (`c:dLbl/c:tx/c:rich`): the first
1047
- * run's `a:rPr` over its paragraph's `a:pPr/a:defRPr`. PowerPoint draws
1048
- * {@link text} with these run properties, so each field set here wins over
1049
- * the same field of {@link txPr}. Parsed for drawing only; saving does not
1050
- * write it back from here.
1051
- */
1052
- richTextStyle?: PptxChartLegendTextStyle;
1053
- /**
1054
- * This label's own shape formatting (`c:dLbl/c:spPr`): fill/line colour,
1055
- * width, and dash style for the label's callout box, taking precedence
1056
- * over any chart/series-level default when set.
1057
- */
1058
- spPr?: PptxChartShapeProps;
1059
- /**
1060
- * `c15:xForSave`: this override exists only so its properties survive a
1061
- * save/reload round trip; PowerPoint merges it back onto the series'
1062
- * default label on load. Round-tripped as-is (an edited chart keeps an
1063
- * existing point's whole `extLst`, this flag included); introspection
1064
- * only otherwise. See `utils/chart-data-labels-range.ts`.
1065
- */
1066
- savedForCompatibilityOnly?: boolean;
1067
- }
1068
- /** Axis number format. */
1069
- interface PptxChartAxisNumFmt {
1070
- formatCode: string;
1071
- sourceLinked?: boolean;
1072
- }
1073
- /** Typed contents of a value-axis display-unit label (`c:dispUnitsLbl`). */
1074
- interface PptxChartDisplayUnitsLabel {
1075
- /** Literal label text. Omit to preserve the source text subtree. */
1076
- text?: string;
1077
- /** Manual label placement. `null` removes only the manual layout. */
1078
- layout?: PptxChartManualLayout | null;
1079
- /** Label shape formatting. `null` removes `c:spPr`. */
1080
- spPr?: PptxChartShapeProps | null;
1081
- /**
1082
- * The label's own run font, when it carries a distinct `txPr` from the
1083
- * axis's own (ChartEx `cx:unitsLabel/cx:txPr`; classic `c:dispUnitsLbl`
1084
- * has no equivalent child, so this is only ever populated from a ChartEx
1085
- * axis).
1086
- */
1087
- fontFamily?: string;
1088
- fontSize?: number;
1089
- fontBold?: boolean;
1090
- fontColor?: string;
1091
- }
1092
- /** Axis formatting for category, value, or date axes. */
1093
- interface PptxChartAxisFormatting extends PptxChartAxisLabelFormatting {
1094
- axisType: 'catAx' | 'valAx' | 'dateAx' | 'serAx';
1095
- /** Axis position: "b" (bottom), "l" (left), "r" (right), "t" (top). */
1096
- axPos?: 'b' | 'l' | 'r' | 't';
1097
- /** Unique axis identifier (c:axId/@val) used to link series to axes. */
1098
- axisId?: number;
1099
- /** Cross-axis identifier: the axis this axis crosses. */
1100
- crossAxisId?: number;
1101
- /** Automatic crossing mode (`c:crosses`). Mutually exclusive with `crossesAt`. */
1102
- crosses?: 'autoZero' | 'min' | 'max';
1103
- /** Explicit crossing value (`c:crossesAt`). Units depend on the axis type. */
1104
- crossesAt?: number;
1105
- /** Whether a value axis crosses between or at category tick marks. */
1106
- crossBetween?: 'between' | 'midCat';
1107
- numFmt?: PptxChartAxisNumFmt;
1108
- titleText?: string;
1109
- spPr?: PptxChartShapeProps;
1110
- fontFamily?: string;
1111
- /** East Asian typeface of the axis text (`a:ea/@typeface`). */
1112
- eastAsiaFontFamily?: string;
1113
- fontSize?: number;
1114
- fontBold?: boolean;
1115
- fontColor?: string;
1116
- /** Whether major gridlines are present (`c:majorGridlines`). */
1117
- majorGridlines?: boolean;
1118
- /** Whether minor gridlines are present (`c:minorGridlines`). */
1119
- minorGridlines?: boolean;
1120
- majorGridlinesSpPr?: PptxChartShapeProps;
1121
- minorGridlinesSpPr?: PptxChartShapeProps;
1122
- /** Minimum axis value override (c:min/@val). */
1123
- min?: number;
1124
- /** Maximum axis value override (c:max/@val). */
1125
- max?: number;
1126
- /** Axis value direction (`c:scaling/c:orientation/@val`). */
1127
- orientation?: 'minMax' | 'maxMin';
1128
- /**
1129
- * Whether the axis is deleted/hidden (c:delete/@val). Written for generated
1130
- * charts (absent means shown) and reconciled on save for loaded ones.
1131
- */
1132
- deleted?: boolean;
1133
- /**
1134
- * Display units for value axis (c:dispUnits/c:builtInUnit/@val).
1135
- * When set to 'custom', the actual divisor is in {@link displayUnitsValue}.
1136
- */
1137
- displayUnits?: 'hundreds' | 'thousands' | 'tenThousands' | 'hundredThousands' | 'millions' | 'tenMillions' | 'hundredMillions' | 'billions' | 'trillions' | 'custom';
1138
- /** Custom display unit divisor value (c:dispUnits/c:custUnit/@val). Only used when displayUnits is 'custom'. */
1139
- displayUnitsValue?: number;
1140
- /**
1141
- * Display-unit label contents (`c:dispUnits/c:dispUnitsLbl`). A string is
1142
- * retained as a compatibility shorthand for `{ text: string }`; `null`
1143
- * explicitly removes the label.
1144
- */
1145
- displayUnitsLabel?: string | PptxChartDisplayUnitsLabel | null;
1146
- /** Whether logarithmic scaling is enabled (presence of c:scaling/c:logBase). */
1147
- logScale?: boolean;
1148
- /** Logarithmic base value (c:scaling/c:logBase/@val), typically 10 or e. */
1149
- logBase?: number;
1150
- /** Major-unit interval between primary tick marks (c:majorUnit/@val). */
1151
- majorUnit?: number;
1152
- /** Minor-unit interval between secondary tick marks (c:minorUnit/@val). */
1153
- minorUnit?: number;
1154
- /** Calendar unit used to interpret date-axis serial values. */
1155
- baseTimeUnit?: 'days' | 'months' | 'years';
1156
- majorTimeUnit?: 'days' | 'months' | 'years';
1157
- minorTimeUnit?: 'days' | 'months' | 'years';
1158
- }
1159
- /** 3D wall or floor element formatting. */
1160
- interface PptxChart3DSurface {
1161
- thickness?: number;
1162
- spPr?: PptxChartShapeProps;
1163
- }
1164
- /**
1165
- * One colour band for a surface chart (`c:bandFmts/c:bandFmt`,
1166
- * ECMA-376 §21.2.2.19 / CT_BandFmt). `index` is the band's position
1167
- * (`c:idx/@val`) among the value axis's major-unit bands, in authored order.
1168
- */
1169
- interface PptxChartBandFmt {
1170
- index: number;
1171
- spPr?: PptxChartShapeProps;
1172
- }
1173
- /** Office 2016 ChartEx box-and-whisker series layout options. */
1174
- interface PptxChartBoxWhiskerOptions {
1175
- quartileMethod?: 'inclusive' | 'exclusive';
1176
- showMeanLine?: boolean;
1177
- showMeanMarker?: boolean;
1178
- /** Show non-outlier (inner) data points. */
1179
- showInnerPoints?: boolean;
1180
- showOutlierPoints?: boolean;
1181
- }
1182
- /** Office 2016 ChartEx histogram and Pareto series layout options. */
1183
- interface PptxChartHistogramOptions {
1184
- /** Maps to `clusteredColumn` for histogram columns or `paretoLine`. */
1185
- layout?: 'histogram' | 'pareto';
1186
- /** Exactly one of binSize and binCount is emitted by the ChartEx writer. */
1187
- binSize?: number;
1188
- binCount?: number;
1189
- intervalClosed?: 'l' | 'r';
1190
- underflow?: number | 'auto';
1191
- overflow?: number | 'auto';
1192
- /**
1193
- * `c:layoutPr/cx:aggregation` was authored instead of `cx:binning`: the
1194
- * raw rows are CATEGORICAL (a Pareto chart's `clusteredColumn` series
1195
- * counting occurrences of each authored category, COM-verified against
1196
- * charts-com.pptx slide 31 / chartEx6.xml), not a numeric range to bin.
1197
- * Mutually exclusive with `binSize`/`binCount`/`intervalClosed`, which
1198
- * only apply to a true numeric-value histogram.
1199
- */
1200
- aggregateByCategory?: boolean;
1201
- }
1202
- /** Office 2016 ChartEx waterfall series layout options. */
1203
- interface PptxChartWaterfallOptions {
1204
- /** Zero-based data point indexes rendered as absolute subtotal or total bars. */
1205
- subtotalIndices?: number[];
1206
- /** Whether connector lines are visible between adjacent bars. */
1207
- connectorLines?: boolean;
1208
- }
1209
- /**
1210
- * A single breakpoint in a ChartEx colour-by-value scale
1211
- * (`cx:valueColorPositions/cx:colorPosition`). `kind` selects which of
1212
- * CT_ColorPosition's union members was authored; `value` is absent for
1213
- * `min`/`max` (they are implicit endpoints) and required otherwise.
1214
- */
1215
- interface PptxCxValueColorPosition {
1216
- kind: 'min' | 'max' | 'number' | 'percent';
1217
- value?: number;
1218
- }
1219
- /** Office 2016 ChartEx geographic series dimensions and layout options. */
1220
- interface PptxChartRegionMapOptions {
1221
- fixedColor?: string;
1222
- /**
1223
- * Colour-by-value gradient stops (`cx:valueColors/cx:colors/cx:color`),
1224
- * resolved to hex, 2 or 3 entries (matching PowerPoint's two- and
1225
- * three-colour scale UI). Paired index-for-index with
1226
- * {@link valueColorPositions} when both are present.
1227
- */
1228
- valueColors?: string[];
1229
- /** Gradient breakpoints for {@link valueColors} (`cx:valueColorPositions`). */
1230
- valueColorPositions?: PptxCxValueColorPosition[];
1231
- /** Optional provider entity identifiers aligned with categories and values. */
1232
- entityIds?: string[];
1233
- /** Original `cx:pt/@idx` values for category points. */
1234
- categorySourceIndices?: number[];
1235
- /** Original `cx:pt/@idx` values for colour-value points. */
1236
- valueSourceIndices?: number[];
1237
- /** Original `cx:pt/@idx` values for entity-ID points. */
1238
- entityIdSourceIndices?: number[];
1239
- regionLabelLayout?: 'none' | 'bestFitOnly' | 'showAll';
1240
- projectionType?: 'mercator' | 'miller' | 'robinson' | 'albers';
1241
- viewedRegionType?: 'dataOnly' | 'postalCode' | 'county' | 'state' | 'countryRegion' | 'countryRegionList' | 'world';
1242
- cultureLanguage?: string;
1243
- /** ISO-3166-1 alpha-2 region code. */
1244
- cultureRegion?: string;
1245
- attribution?: string;
1246
- /** Opaque authored provider cache under `cx:geography/cx:geoCache`. */
1247
- geographyCache?: XmlObject;
1248
- /** Neutral raw source cache retained for the shared renderer. */
1249
- geographyCacheXml?: string;
1250
- }
1251
- /** Layout for parent category labels in a hierarchical ChartEx treemap. */
1252
- type PptxChartParentLabelLayout = 'none' | 'banner' | 'overlapping';
1253
- /** Per-series layout options for an Office 2016+ ChartEx treemap. */
1254
- interface PptxChartTreemapOptions {
1255
- parentLabelLayout?: PptxChartParentLabelLayout;
1256
- }
1257
- /**
1258
- * A single data series within a chart.
1259
- *
1260
- * @example
1261
- * ```ts
1262
- * const series: PptxChartSeries = {
1263
- * name: "Revenue",
1264
- * values: [100, 120, 140],
1265
- * color: "#4F81BD",
1266
- * trendlines: [{ trendlineType: "linear" }],
1267
- * };
1268
- * // => satisfies PptxChartSeries
1269
- * ```
1270
- */
1271
- interface PptxChartSeries {
1272
- name: string;
1273
- /**
1274
- * This series' own `c:ser/c:idx/@val`. PowerPoint keys per-series identity
1275
- * (data-point picking, and the automatic marker-symbol cycle when no
1276
- * `c:marker/c:symbol` is authored) off this value, NOT off the series'
1277
- * position in this array: a series can be reordered (`c:order`) without its
1278
- * `idx` changing, and a chart with a deleted/filtered series leaves a gap
1279
- * (e.g. idx 1, 2 with no idx 0). Absent only for chart kinds this parser
1280
- * does not tag (rare); render code that needs it should fall back to the
1281
- * array position.
1282
- */
1283
- idx?: number;
1284
- values: number[];
1285
- /**
1286
- * Series gradient fill (`c:ser/c:spPr/a:gradFill`), painted on every mark
1287
- * of the series that has no per-point override.
1288
- *
1289
- * Written back on save for area-filled chart types (bar, area, pie,
1290
- * doughnut, ofPie, bubble, surface and their 3-D variants, and such series
1291
- * inside a combo): when set it takes precedence over {@link color} and
1292
- * replaces the series' fill choice; clearing it removes the authored
1293
- * `a:gradFill`. A loaded gradient the model still describes round-trips
1294
- * byte-for-byte, theme colours included. Ignored for line-drawn series
1295
- * (line, line3D, scatter, radar, stock), which have no fillable area. Set
1296
- * it through `setChartSeriesGradient` to get validation and the
1297
- * colour/gradient "last action wins" behaviour.
1298
- */
1299
- gradientFill?: PptxChartGradientFill;
1300
- /**
1301
- * Outline gradient of a line-drawn series (`c:ser/c:spPr/a:ln/a:gradFill`),
1302
- * the stroke PowerPoint paints along the series line. Read for rendering
1303
- * only (the viewer paints linear ones); the authored `a:ln` is left as
1304
- * loaded on save.
1305
- */
1306
- lineGradientFill?: PptxChartGradientFill;
1307
- /**
1308
- * Per-series x values from `c:ser/c:xVal` (scatter and bubble series only).
1309
- *
1310
- * Every `CT_ScatterSer` / `CT_BubbleSer` carries its OWN `c:xVal`, so two
1311
- * series in one scatter chart routinely plot against different x ranges (the
1312
- * normal case for measurement data). Reading the x values off the first
1313
- * series and reusing them everywhere plotted every series against series 1's
1314
- * x axis. Absent for category-axis chart kinds, where
1315
- * {@link PptxChartData.categories} is the x axis.
1316
- */
1317
- xValues?: number[];
1318
- /**
1319
- * Per-series bubble sizes from `c:ser/c:bubbleSize` (bubble series only),
1320
- * aligned index-for-index with {@link values}.
1321
- *
1322
- * `CT_BubbleSer` carries x, y AND size, so a one-series bubble chart is fully
1323
- * specified. Absent when the source omits `c:bubbleSize`.
1324
- */
1325
- bubbleSizes?: number[];
1326
- /**
1327
- * Series-level data-label content flags from `c:ser/c:dLbls`.
1328
- *
1329
- * PowerPoint writes the flags a user picks in "Format Data Labels" onto the
1330
- * SERIES, and leaves the chart-type-level `c:dLbls` all-zero, so reading only
1331
- * the chart-level group reports "show nothing" for a chart that visibly shows
1332
- * percentages. These override {@link PptxChartStyle.dataLabels}.
1333
- */
1334
- dataLabelOptions?: PptxChartDataLabelOptions;
1335
- /**
1336
- * Whether the series line is explicitly suppressed
1337
- * (`c:ser/c:spPr/a:ln/a:noFill`). Line-drawn kinds (line, scatter, radar)
1338
- * use this to decide whether to draw a connecting line at all; a marker-only
1339
- * scatter is authored as `scatterStyle="lineMarker"` PLUS this flag, never by
1340
- * changing the scatter style.
1341
- */
1342
- lineNoFill?: boolean;
1343
- /**
1344
- * Series line width in points (`c:ser/c:spPr/a:ln/@w`, EMU / 12700).
1345
- * `undefined` when the series authors none; the renderer then keeps its
1346
- * own default width.
1347
- */
1348
- lineWidth?: number;
1349
- /**
1350
- * Series line preset dash (`c:ser/c:spPr/a:ln/a:prstDash/@val`, e.g.
1351
- * `sysDot`, `dash`). `undefined` (or `solid`) draws a solid line.
1352
- */
1353
- lineDashStyle?: string;
1354
- /**
1355
- * Blank-value mask aligned index-for-index with {@link values}: `true` marks
1356
- * a category whose numeric cache point (`c:numCache/c:pt`) was absent or
1357
- * empty, i.e. a genuine blank rather than a real `0`. Present only when the
1358
- * source series actually contains blanks; when set, blank slots in
1359
- * {@link values} carry `0` as a placeholder. Renderers honour
1360
- * `c:dispBlanksAs` (gap / zero / span) using this mask.
1361
- */
1362
- blanks?: boolean[];
1363
- /**
1364
- * ECMA-376 number-format code for this series' values, resolved from
1365
- * `c:ser/c:dLbls/c:numFmt/@formatCode` and falling back to the value cache's
1366
- * own `c:numCache/c:formatCode` (which is what `@sourceLinked="1"` means).
1367
- * Data labels render through it: a percentage series caches fractions, so
1368
- * without the code `0.52` reaches the label where PowerPoint shows `52%`.
1369
- */
1370
- numberFormat?: string;
1371
- color?: string;
1372
- trendlines?: PptxChartTrendline[];
1373
- errBars?: PptxChartErrBars[];
1374
- dataPoints?: PptxChartDataPoint[];
1375
- marker?: PptxChartMarker;
1376
- dataLabels?: PptxChartDataLabel[];
1377
- explosion?: number;
1378
- /**
1379
- * Series-level `c:invertIfNegative`: when true, bar/column data points with a
1380
- * negative value are drawn with an inverted (lightened) fill. A per-point
1381
- * `c:dPt/c:invertIfNegative` overrides this for that point. Absent when the
1382
- * source XML omits the flag.
1383
- */
1384
- invertIfNegative?: boolean;
1385
- /**
1386
- * Whether this line/scatter series is drawn with bezier smoothing
1387
- * (`c:ser/c:smooth/@val`). Absent when the source XML omits `c:smooth`.
1388
- */
1389
- smooth?: boolean;
1390
- /** Axis ID this series is plotted against (links to PptxChartAxisFormatting.axisId). */
1391
- axisId?: number;
1392
- /**
1393
- * Per-series chart type, used for combo charts where individual series are
1394
- * plotted with different chart types (e.g. a bar series and a line series in
1395
- * the same chart). Maps to the OOXML chart-type container that holds the
1396
- * series (`c:barChart`, `c:lineChart`, etc.). Omitted for single-type charts,
1397
- * where the chart-level {@link PptxChartData.chartType} applies to every
1398
- * series.
1399
- */
1400
- seriesChartType?: PptxChartType;
1401
- /**
1402
- * Per-series 3-D bar/column shape override (`c:ser/c:shape`), legal only
1403
- * inside a bar3D chart-type container. Overrides {@link PptxChartData.barShape}
1404
- * for this series alone.
1405
- */
1406
- shape?: PptxBar3DShape;
1407
- boxWhiskerOptions?: PptxChartBoxWhiskerOptions;
1408
- histogramOptions?: PptxChartHistogramOptions;
1409
- waterfallOptions?: PptxChartWaterfallOptions;
1410
- regionMapOptions?: PptxChartRegionMapOptions;
1411
- treemapOptions?: PptxChartTreemapOptions;
1412
- /**
1413
- * Series-level picture-fill flags (`c:ser/c:pictureOptions`), legal
1414
- * wherever a per-point `c:dPt/c:pictureOptions` is (CT_BarSer): paints
1415
- * EVERY point in the series with one picture unless a `c:dPt` overrides it
1416
- * for that point alone. A point's own {@link PptxChartDataPoint.picture}
1417
- * takes precedence entirely (not merged field-by-field) when it resolves
1418
- * its own image; renderers fall back to this series-level picture only
1419
- * when the point has none of its own.
1420
- */
1421
- picture?: PptxChartDataPointPicture;
1422
- /**
1423
- * A picture fill implied by a bare `c:ser/c:spPr/a:blipFill` with NO
1424
- * sibling `c:pictureOptions` at all. See
1425
- * {@link PptxChartDataPoint.impliedPicture}'s doc comment: same
1426
- * render-only, never-serialized-back convention, at the series level.
1427
- */
1428
- impliedPicture?: PptxChartDataPointPicture;
1429
- /**
1430
- * This series' identity GUID (`c:ser/c:extLst/c:ext/c16:uniqueId/@val`,
1431
- * the Office 2014+ `{C3380CC4-5D6E-409C-BE32-E72D297353CC}` chart
1432
- * extension). PowerPoint uses it to track a series across edits and
1433
- * collaborators independent of its `c:idx`/`c:order` position (the same
1434
- * role animation targeting and CRDT reconciliation need). An edited
1435
- * existing series keeps its own `c:extLst` as passthrough; a NEW series
1436
- * added by cloning an existing one as a template is given a freshly
1437
- * generated id rather than duplicating the template's (see
1438
- * `regenerateClonedUniqueId` in `chart-series-identity.ts`), since two
1439
- * series sharing one identity is exactly what this extension exists to
1440
- * prevent.
1441
- */
1442
- uniqueId?: string;
1443
- }
1444
- /**
1445
- * A series PowerPoint's "Chart Filters" feature hid from the plot while
1446
- * keeping it in the workbook (`c:<type>Chart/c:extLst/c:ext
1447
- * [@uri={02D57815-91ED-43cb-92C2-25804820EDAC}]/c15:filtered<Type>Series
1448
- * /c15:ser`). Read-mostly: {@link PptxChartData.filteredSeries} exists for
1449
- * introspection (AI tools, "unhide filtered series" UI) and round-trips as
1450
- * passthrough through the preserved chart XML when untouched. See
1451
- * `utils/chart-filtered-series.ts` for the parse rules and the idx-collision
1452
- * fix this modelling enables on save.
1453
- */
1454
- interface PptxChartFilteredSeries {
1455
- /** `c15:ser/c:idx/@val`, the workbook column position this series still occupies. */
1456
- idx: number;
1457
- /** `c15:ser/c:order/@val`, defaulting to {@link idx} when absent. */
1458
- order: number;
1459
- /** Series name, from the hidden series' own `c:tx` cache. */
1460
- name?: string;
1461
- /** Category labels, from the hidden series' own `c:cat` cache. */
1462
- categories?: string[];
1463
- /** Data values, from the hidden series' own `c:val` cache. */
1464
- values?: number[];
1465
- /** This hidden series' own identity GUID (`c16:uniqueId`), when present. */
1466
- uniqueId?: string;
1467
- /**
1468
- * A full snapshot of the series as it looked the moment it was hidden
1469
- * (`render/chart-ext-editor-actions.ts`'s `hideChartSeries`), so
1470
- * `restoreFilteredSeries` can bring it back exactly as it was: full fill/
1471
- * line formatting, marker, data-label options, everything, not just the
1472
- * bare name/values/idx the other fields above capture.
1473
- *
1474
- * NOT derived from XML and NEVER written to disk (the save writer,
1475
- * `chart-filtered-series-writer.ts`, only reads the named fields above):
1476
- * this exists purely for the live "Chart Filters" hide/show round-trip
1477
- * within one editing session. A filtered series read from an actually
1478
- * parsed file (one that was already hidden when opened) has no snapshot
1479
- * to draw on, since real PowerPoint's `c15:ser` node is parsed only for
1480
- * the fields above (`chart-filtered-series.ts`'s `parseOneFilteredSeries`);
1481
- * `restoreFilteredSeries` falls back to reconstructing a bare series from
1482
- * those for that case, same as before this field existed.
1483
- */
1484
- originalSeries?: PptxChartSeries;
1485
- }
1486
- /**
1487
- * Chart-level data-label options (`c:dLbls` directly under a chart-type
1488
- * container, applying to every series). Mirrors the OOXML `c:show*` flags
1489
- * and `c:dLblPos`.
1490
- */
1491
- interface PptxChartDataLabelOptions {
1492
- /** Label box fill/outline (`c:dLbls/c:spPr`), see `chart-data-label-box.ts`. */
1493
- labelShape?: PptxChartShapeProps;
1494
- /** Callout geometry of the label box (`c15:spPr/a:prstGeom/@prst`, e.g. `wedgeRectCallout`). */
1495
- calloutShape?: string;
1496
- /** The chart15 extension's `c15:showLeaderLines`, which wins for a moved label's leader line. */
1497
- extLeaderLines?: boolean;
1498
- /** Show the numeric value (`c:showVal`). */
1499
- showValue?: boolean;
1500
- /** Show the category name (`c:showCatName`). */
1501
- showCategory?: boolean;
1502
- /** Show the series name (`c:showSerName`). */
1503
- showSeriesName?: boolean;
1504
- /** Show the percentage (`c:showPercent`, pie/doughnut). */
1505
- showPercent?: boolean;
1506
- /** Show the legend key swatch (`c:showLegendKey`). */
1507
- showLegendKey?: boolean;
1508
- /** Show bubble size (`c:showBubbleSize`). */
1509
- showBubbleSize?: boolean;
1510
- /** Text placed between combined label components (`c:separator`). */
1511
- separator?: string;
1512
- /** Show leader lines where supported (`c:showLeaderLines`). */
1513
- showLeaderLines?: boolean;
1514
- /**
1515
- * Leader-line stroke styling for offset (pie/doughnut `outEnd`/`bestFit`)
1516
- * labels. Resolved from the base `c:leaderLines/c:spPr` when present, else
1517
- * falling back to the Office 2013+ chart15 extension's mirror
1518
- * (`c:extLst/c:ext/c15:leaderLines/c:spPr`, uri
1519
- * `{CE6537A1-D6FC-4f65-9D91-7224C49458BB}`), which is the one PowerPoint
1520
- * itself treats as authoritative when both are present. Confirmed against
1521
- * `e2e/fixtures/issue-132-gradient-fill.pptx` and
1522
- * `e2e/fixtures/issue-132-hr-deck.pptx`, both of which write only the
1523
- * extension form. `undefined` leaves the renderer's own default leader-line
1524
- * stroke.
1525
- */
1526
- leaderLineStyle?: PptxChartShapeProps;
1527
- /**
1528
- * Label position (`c:dLblPos`). Valid values depend on the chart type
1529
- * (`ctr`, `inEnd`, `inBase`, `outEnd`, `bestFit`, `l`, `r`, `t`, `b`).
1530
- * Omit to let PowerPoint use the type default.
1531
- */
1532
- position?: PptxChartDataLabelPosition;
1533
- /**
1534
- * Chart-level number-format override (`c:dLbls/c:numFmt/@formatCode`),
1535
- * applied to every label of the series/chart-type unless a per-point
1536
- * {@link PptxChartDataLabel.numberFormat} overrides it.
1537
- */
1538
- numberFormat?: string;
1539
- /**
1540
- * Default font for every label at this level (`c:dLbls/c:txPr`, or
1541
- * ChartEx `cx:dataLabels/cx:txPr`), overridden by a per-point
1542
- * {@link PptxChartDataLabel.txPr} when set. `c:dLbls` at the chart-type
1543
- * level and the series level cascade the same way the show flags do
1544
- * (point > series > chart-type).
1545
- */
1546
- txPr?: PptxChartLegendTextStyle;
1547
- /**
1548
- * PowerPoint 2013+ "Value From Cells", series-wide form
1549
- * (`c15:datalabelsRange`, chart15 uri `{CE6537A1-...}`): one cell range
1550
- * supplies every label in this group, aligned by point index. A
1551
- * SERIES-WIDE alternative to the per-point `c15:dlblFieldTable` mechanism
1552
- * (already resolved into {@link PptxChartDataLabel.text} at parse time).
1553
- * See `utils/chart-data-labels-range.ts`.
1554
- */
1555
- dataLabelsRange?: PptxChartDataLabelsRange;
1556
- /**
1557
- * `c15:showDataLabelsRange` at the SAME level as {@link dataLabelsRange}:
1558
- * whether every label in this group resolves through the range's cache.
1559
- * Distinct from the per-point {@link PptxChartDataLabel} flag of the same
1560
- * XML name. Only meaningful when {@link dataLabelsRange} is set.
1561
- */
1562
- showDataLabelsRange?: boolean;
1563
- }
1564
- /** Typed text defaults for a single chart legend entry. */
1565
- interface PptxChartLegendTextStyle {
1566
- fontFamily?: string;
1567
- /**
1568
- * East Asian typeface (`a:ea/@typeface`). PowerPoint draws CJK characters
1569
- * in this face and everything else in {@link fontFamily}.
1570
- */
1571
- eastAsiaFontFamily?: string;
1572
- fontSize?: number;
1573
- bold?: boolean;
1574
- italic?: boolean;
1575
- color?: string;
1576
- }
1577
- /** Per-series legend entry override (`c:legendEntry`). */
1578
- interface PptxChartLegendEntry {
1579
- index: number;
1580
- deleted?: boolean;
1581
- textStyle?: PptxChartLegendTextStyle;
1582
- }
1583
- /**
1584
- * Style / formatting metadata for a chart.
1585
- *
1586
- * @example
1587
- * ```ts
1588
- * const style: PptxChartStyle = {
1589
- * styleId: 2,
1590
- * hasLegend: true,
1591
- * legendPosition: "b",
1592
- * hasDataLabels: true,
1593
- * };
1594
- * // => satisfies PptxChartStyle
1595
- * ```
1596
- */
1597
- interface PptxChartStyle {
1598
- /** Chart style index from `c:style/@val`. */
1599
- styleId?: number;
1600
- /** Whether the chart has a visible legend. */
1601
- hasLegend?: boolean;
1602
- /**
1603
- * Legend position (t, b, l, r, tr), exactly as written. Absent when the
1604
- * legend declares none, which PowerPoint draws on the right; the default is
1605
- * left to the renderer so a save never adds a `c:legendPos` the source lacked.
1606
- */
1607
- legendPosition?: string;
1608
- /**
1609
- * Whether the legend floats over the plot instead of reserving space beside
1610
- * it. Classic charts read `c:legend/c:overlay`, and PowerPoint treats a
1611
- * missing element as an overlay for every position (measured with
1612
- * PowerPoint 16: `IncludeInLayout` is false). ChartEx charts read
1613
- * `cx:legend/@overlay` only when present. Absent when unknown.
1614
- */
1615
- legendOverlay?: boolean;
1616
- /** Per-series visibility and text-style overrides. */
1617
- legendEntries?: PptxChartLegendEntry[];
1618
- /**
1619
- * The legend's own default text style (`c:legend/c:txPr`), falling back to
1620
- * the chart-wide default (`c:chartSpace/c:txPr`) when the legend has none
1621
- * of its own. Applies to every legend entry that has no per-entry
1622
- * `c:legendEntry/c:txPr` override (see {@link PptxChartLegendEntry.textStyle}),
1623
- * which always wins over this chart-level default.
1624
- */
1625
- legendTextStyle?: PptxChartLegendTextStyle;
1626
- /**
1627
- * The chart-wide default text style: `c:chartSpace/c:txPr` over the theme's
1628
- * minor (body) fonts. PowerPoint uses it for any chart text whose own
1629
- * `txPr` leaves a field unset, such as axis labels and data labels. Not
1630
- * written back on save: the authored `c:txPr` is kept as it is.
1631
- */
1632
- textStyle?: PptxChartLegendTextStyle;
1633
- /** Whether the chart has a title. */
1634
- hasTitle?: boolean;
1635
- /** Whether gridlines are visible. */
1636
- hasGridlines?: boolean;
1637
- /**
1638
- * Chart-area fill from `c:chartSpace/c:spPr`: a resolved colour, or the
1639
- * literal `'none'` when the source declares `<a:noFill/>`. Absent when the
1640
- * chart says nothing, in which case the renderer picks its own default.
1641
- * PowerPoint decks routinely set `a:noFill` so the chart floats on the slide
1642
- * background; painting a panel behind it boxes the chart in.
1643
- */
1644
- chartAreaFill?: string;
1645
- /** Plot-area fill from `c:plotArea/c:spPr`. See {@link chartAreaFill}. */
1646
- plotAreaFill?: string;
1647
- /** Chart-area gradient (`c:chartSpace/c:spPr/a:gradFill`); wins over {@link chartAreaFill}. */
1648
- chartAreaGradient?: PptxChartGradientFill;
1649
- /** Plot-area gradient (`c:plotArea/c:spPr/a:gradFill`); wins over {@link plotAreaFill}. */
1650
- plotAreaGradient?: PptxChartGradientFill;
1651
- /**
1652
- * Chart-area border from `c:chartSpace/c:spPr/a:ln`: a resolved colour, or
1653
- * `'none'` for `a:ln/a:noFill`. Absent when the chart says nothing.
1654
- * Written for generated charts and reconciled on save for loaded ones,
1655
- * together with {@link chartAreaFill} and {@link chartAreaGradient}.
1656
- */
1657
- chartAreaBorder?: string;
1658
- /** Plot-area border from `c:plotArea/c:spPr/a:ln`. See {@link chartAreaBorder}. */
1659
- plotAreaBorder?: string;
1660
- /** Whether data labels are shown. */
1661
- hasDataLabels?: boolean;
1662
- /** Chart-level data-label content/position options (when `hasDataLabels`). */
1663
- dataLabels?: PptxChartDataLabelOptions;
1664
- /**
1665
- * Font styling for the chart's own title (`c:title/c:txPr`), edited via
1666
- * `applyChartTitleStyleToXml` (chart-title-style-serializer.ts). Distinct
1667
- * from an axis title's styling (`PptxChartAxisFormatting.fontFamily` etc.).
1668
- */
1669
- titleFontFamily?: string;
1670
- /** East Asian typeface of the title (`a:ea/@typeface`). */
1671
- titleEastAsiaFontFamily?: string;
1672
- titleFontSize?: number;
1673
- titleFontBold?: boolean;
1674
- titleFontColor?: string;
1675
- /** Title text-box fill/border (`c:title/c:spPr`). `null` removes it. */
1676
- titleSpPr?: PptxChartShapeProps | null;
1677
- }
1678
- /**
1679
- * External data source reference for a chart (c:externalData).
1680
- *
1681
- * Charts can reference an external Excel workbook via a relationship ID
1682
- * that points to an external file (TargetMode="External"). The
1683
- * `autoUpdate` flag indicates whether the chart should refresh its
1684
- * cached data from the external source on open.
1685
- *
1686
- * @example
1687
- * ```ts
1688
- * const ext: PptxExternalData = {
1689
- * relId: "rId2",
1690
- * targetPath: "file:///C:/Data/budget.xlsx",
1691
- * autoUpdate: true,
1692
- * };
1693
- * // => satisfies PptxExternalData
1694
- * ```
1695
- */
1696
- interface PptxExternalData {
1697
- /** Whether the relationship has TargetMode="External". */
1698
- isExternal?: boolean;
1699
- /** Relationship ID referencing the external data source in the chart .rels. */
1700
- relId: string;
1701
- /** Resolved external file path or URL from the relationship target. */
1702
- targetPath?: string;
1703
- /** Whether to auto-update data from the external source on open. */
1704
- autoUpdate?: boolean;
1705
- /** Raw binary data of the embedded xlsx workbook (from ppt/embeddings/). */
1706
- embeddedWorkbookData?: Uint8Array;
1707
- }
1708
- /**
1709
- * Options specific to the OOXML "Pie of Pie" / "Bar of Pie" chart
1710
- * (`c:ofPieChart`, ECMA-376 §21.2.2.126 / CT_OfPieChart).
1711
- *
1712
- * The primary discriminator is {@link ofPieType}: `"pie"` produces a
1713
- * pie-of-pie chart whose secondary plot is itself a pie, while `"bar"`
1714
- * produces a bar-of-pie chart whose secondary plot is a horizontal bar.
1715
- *
1716
- * - {@link splitType} chooses the split rule.
1717
- * - {@link splitPos} is the threshold value used by `pos`/`val`/`percent`.
1718
- * - {@link secondPieSize} controls the secondary plot's size (5–200%).
1719
- * - {@link serLines} toggles the leader lines connecting the plots.
1720
- * - {@link gapWidth} is the gap between the plots in percent (0–500).
1721
- */
1722
- interface PptxChartOfPieOptions {
1723
- ofPieType: 'pie' | 'bar';
1724
- splitType?: 'auto' | 'cust' | 'percent' | 'pos' | 'val';
1725
- splitPos?: number;
1726
- custSplit?: number[];
1727
- secondPieSize?: number;
1728
- serLines?: boolean;
1729
- gapWidth?: number;
1730
- }
1731
- /** Classic `c:bubbleChart` options from CT_BubbleChart. */
1732
- interface PptxBubbleChartOptions {
1733
- bubble3D?: boolean;
1734
- /** Bubble diameter scale in percent, constrained to 0 through 300. */
1735
- bubbleScale?: number;
1736
- showNegativeBubbles?: boolean;
1737
- sizeRepresents?: 'area' | 'w';
1738
- }
1739
- /**
1740
- * 3D viewing parameters for a chart (`c:view3D`, ECMA-376 §21.2.2.228 /
1741
- * CT_View3D).
1742
- *
1743
- * All fields are optional and round-trip verbatim.
1744
- *
1745
- * - {@link rotX}: X-axis rotation in degrees (-90…90).
1746
- * - {@link rotY}: Y-axis rotation in degrees (0…360).
1747
- * - {@link depthPercent}: chart depth as a percentage of base width.
1748
- * - {@link rAngAx}: `true` if axes meet at right angles.
1749
- * - {@link perspective}: perspective angle in degrees (0…240).
1750
- * - {@link hPercent}: height as a percentage of chart width.
1751
- */
1752
- interface PptxChartView3D {
1753
- rotX?: number;
1754
- rotY?: number;
1755
- depthPercent?: number;
1756
- rAngAx?: boolean;
1757
- perspective?: number;
1758
- hPercent?: number;
1759
- }
1760
- /**
1761
- * Chart "chrome" flags from `c:chart` that round-trip cleanly even when
1762
- * rendering ignores them.
1763
- *
1764
- * - {@link autoTitleDeleted}: `c:autoTitleDeleted/@val`. Suppresses the
1765
- * auto-generated title for single-series charts.
1766
- * - {@link dispBlanksAs}: `c:dispBlanksAs/@val`. How blank cells
1767
- * render: `"gap"`, `"zero"`, or `"span"`.
1768
- * - {@link showDLblsOverMax}: `c:showDLblsOverMax/@val`. Keeps data
1769
- * labels visible for points exceeding the value-axis maximum.
1770
- * - {@link dispNaAsBlank}: the Office 2017+ chart extension
1771
- * `c:extLst/c:ext/c16r3:dataDisplayOptions16/c16r3:dispNaAsBlank/@val`
1772
- * (uri `{56B9EC1D-385E-4148-901F-78D8002777C0}`), PowerPoint's "Show #N/A
1773
- * as an empty cell" chart option. Confirmed against real corpus markup
1774
- * (`e2e/fixtures/chart-data-fidelity.pptx`).
1775
- *
1776
- * `c:plotVisOnly` lives on {@link PptxChartData.plotVisibleOnly} and is
1777
- * intentionally not duplicated here.
1778
- */
1779
- interface PptxChartChrome {
1780
- autoTitleDeleted?: boolean;
1781
- dispBlanksAs?: 'gap' | 'zero' | 'span';
1782
- showDLblsOverMax?: boolean;
1783
- dispNaAsBlank?: boolean;
1784
- }
1785
- /** Manual chart placement from `c:layout/c:manualLayout` (CT_ManualLayout). */
1786
- interface PptxChartManualLayout extends ChartManualLayout {
1787
- /**
1788
- * Raw `c:extLst` (CT_ExtensionList) of the `c:manualLayout`, captured
1789
- * verbatim so it round-trips through the typed model. Without this, a dirty
1790
- * write of an edited layout would drop the extension list (the manual node
1791
- * is rebuilt from the typed fields). Emitted as the trailing child, matching
1792
- * the CT_ManualLayout schema order.
1793
- */
1794
- ext?: XmlObject;
1795
- }
1796
- /**
1797
- * Typed manual layouts for chart regions that accept `c:layout`.
1798
- * A `null` region removes its manual layout without removing extensions.
1799
- */
1800
- interface PptxChartLayouts {
1801
- title?: PptxChartManualLayout | null;
1802
- plotArea?: PptxChartManualLayout | null;
1803
- legend?: PptxChartManualLayout | null;
1804
- }
1805
- /** Parsed data extracted from an embedded xlsx workbook. */
1806
- interface PptxEmbeddedWorkbookData {
1807
- /** Category labels from the first column/row. */
1808
- categories: string[];
1809
- /** Data series extracted from worksheet cells. */
1810
- series: Array<{
1811
- name: string;
1812
- values: number[];
1813
- }>;
1814
- /** Whether the workbook uses the 1904 date system. */
1815
- date1904?: boolean;
1816
- }
1817
- /** Raw numeric category cache used by a classic ChartML date axis. */
1818
- interface PptxChartDateCategories {
1819
- values: number[];
1820
- /** False/default uses Excel's 1900 date system; true uses the 1904 system. */
1821
- date1904?: boolean;
1822
- /** Number format copied from the numeric category cache. */
1823
- formatCode?: string;
1824
- }
1825
- /**
1826
- * Complete parsed chart data for a {@link ChartPptxElement}.
1827
- *
1828
- * @example
1829
- * ```ts
1830
- * const chart: PptxChartData = {
1831
- * title: "Q4 Sales",
1832
- * chartType: "bar",
1833
- * categories: ["Jan", "Feb", "Mar"],
1834
- * series: [
1835
- * { name: "Revenue", values: [100, 120, 140] },
1836
- * ],
1837
- * grouping: "clustered",
1838
- * style: { hasLegend: true, legendPosition: "b" },
1839
- * };
1840
- * // => satisfies PptxChartData
1841
- * ```
1842
- */
1843
- interface PptxChartData {
1844
- /** ChartEx category-axis gap as a percentage of funnel bar height; absent uses Office's 33. */
1845
- funnelGapWidth?: number;
1846
- title?: string;
1847
- /**
1848
- * Rich-text runs of the title, parsed from `c:title/c:tx/c:rich` (issue:
1849
- * chart title rich text). Lossless multi-run alternative to the flat
1850
- * {@link title}: when present, the writer serialises every run's own
1851
- * bold/italic/size/color; when absent, save falls back to the flat
1852
- * `title` path as before. Only populated for a classic (`c:`) chart's
1853
- * rich (typed) title, not a ChartEx (`cx:`) title or one authored as a
1854
- * linked-cell reference.
1855
- */
1856
- titleRuns?: PptxChartTitleRun[];
1857
- /** Whether parsed title text can be replaced without changing its source or paragraph structure. */
1858
- titleTextEditable?: boolean;
1859
- /** Label sources passed atomic embedded-workbook preflight at load. */
1860
- dataLabelTextEditable?: boolean;
1861
- /** Source dimensions captured by label preflight, invalidated by structural edits. */
1862
- dataLabelSourceShape?: {
1863
- categoryCount: number;
1864
- seriesValueCounts: number[];
1865
- };
1866
- /** Require transactional workbook write-back for label search edits. */
1867
- dataLabelTextOnly?: boolean;
1868
- /** A text-only title edit: retain the authored rich XML and change only run text on save. */
1869
- titleTextOnly?: boolean;
1870
- /** Run-style snapshot used to stop a text-only edit from masking later formatting changes. */
1871
- titleTextOnlyStyles?: Omit<PptxChartTitleRun, 'text'>[];
1872
- chartType: PptxChartType;
1873
- categories: string[];
1874
- /**
1875
- * Hierarchical category levels in source XML order, for both ChartEx
1876
- * hierarchy charts (`cx:multiLvlStrRef`) and classic multi-level category
1877
- * axes (`c:cat/c:multiLvlStrRef`, e.g. a PowerPoint Quarter > Month
1878
- * grouping). Level 0 contains the leaf labels and remains mirrored by
1879
- * {@link categories} for consumers that only understand a flat category
1880
- * axis. Parent (grouping) levels are forward-filled: a blank cache slot
1881
- * continues the previous group's label, matching how the source stores a
1882
- * merged category header sparsely.
1883
- */
1884
- categoryLevels?: string[][];
1885
- dateCategories?: PptxChartDateCategories;
1886
- series: PptxChartSeries[];
1887
- /**
1888
- * Series hidden from the plot by PowerPoint's "Chart Filters" feature
1889
- * (Series tab) but still present in the workbook, aggregated across every
1890
- * chart-type container (combo charts can carry more than one). Absent
1891
- * when the chart has no such extension. See {@link PptxChartFilteredSeries}.
1892
- */
1893
- filteredSeries?: PptxChartFilteredSeries[];
1894
- /**
1895
- * `c15:filteredSeriesTitle`: the auto-generated series title text (e.g.
1896
- * "Series 3") PowerPoint preserved when the chart filter hid the series
1897
- * whose data would otherwise have supplied it. See
1898
- * `utils/chart-ext-titles.ts`. Read-mostly like {@link filteredSeries}.
1899
- */
1900
- filteredSeriesTitle?: string;
1901
- /**
1902
- * `c15:filteredCategoryTitle`: the auto-numbered category labels ("1",
1903
- * "2", "3", ...) PowerPoint preserved when the chart filter hid the
1904
- * category axis source entirely. See `utils/chart-ext-titles.ts`.
1905
- */
1906
- filteredCategoryTitle?: string[];
1907
- /** Chart style/formatting metadata. */
1908
- style?: PptxChartStyle;
1909
- /** Grouping mode for bar/area/line charts: 'clustered' | 'stacked' | 'percentStacked' */
1910
- grouping?: 'clustered' | 'stacked' | 'percentStacked';
1911
- /**
1912
- * The source `c:grouping` was `standard`, which {@link grouping} folds into
1913
- * `'clustered'` (a 2D bar chart draws the two the same). A 3D chart draws
1914
- * `standard` differently: each series on its own depth row. The writer
1915
- * emits `standard` again while `grouping` is still `'clustered'`, so the
1916
- * chart round-trips unchanged.
1917
- */
1918
- groupingStandard?: boolean;
1919
- /**
1920
- * Whether the first (or only) series varies its point colours
1921
- * (`c:varyColors/@val`). Pie/doughnut default this on; single-series
1922
- * bar/column honour it by giving each point a distinct palette colour.
1923
- * Absent when the source XML omits `c:varyColors`.
1924
- */
1925
- varyColors?: boolean;
1926
- /**
1927
- * Pie/doughnut start angle in degrees clockwise from 12 o'clock
1928
- * (`c:firstSliceAng/@val`, `ST_FirstSliceAng`, 0 through 360). Absent uses
1929
- * the default 0. Written for generated pie and doughnut charts and
1930
- * reconciled on save for loaded ones (see `utils/chart-group-options.ts`).
1931
- */
1932
- firstSliceAngle?: number;
1933
- /**
1934
- * Doughnut hole diameter as a percentage of the outer diameter
1935
- * (`c:holeSize/@val`, `ST_HoleSize`, 1 through 90). Absent uses the
1936
- * renderer default; a generated doughnut writes 50. Reconciled on save for
1937
- * loaded charts.
1938
- */
1939
- doughnutHoleSize?: number;
1940
- /**
1941
- * Bar series direction (`c:barDir/@val`): `"col"` draws vertical columns,
1942
- * `"bar"` draws horizontal bars. Absent means `"col"` (PowerPoint's own
1943
- * default), so only horizontal bar charts need to carry the field.
1944
- */
1945
- barDirection?: PptxChartBarDirection;
1946
- /**
1947
- * 3-D bar/column shape (`c:bar3DChart/c:shape/@val`). Bar3D only; a plain
1948
- * bar chart has no `c:shape` element. A per-series `c:ser/c:shape`
1949
- * ({@link PptxChartSeries.shape}) overrides this for that series.
1950
- */
1951
- barShape?: PptxBar3DShape;
1952
- /**
1953
- * Radar chart drawing style (`c:radarChart/c:radarStyle/@val`). `standard`
1954
- * draws an outline only, `marker` adds markers at each vertex (PowerPoint's
1955
- * own default for every radar chart it authors), and `filled` paints the
1956
- * enclosed polygon with the series fill and omits markers. Radar only.
1957
- */
1958
- radarStyle?: 'standard' | 'marker' | 'filled';
1959
- /**
1960
- * Whether a surface chart renders as a wireframe grid rather than a solid
1961
- * coloured surface (`c:surfaceChart/c:wireframe/@val` or
1962
- * `c:surface3DChart/c:wireframe/@val`, both modeled as chart type
1963
- * `"surface"`). A `CT_Boolean` element: absent from the source XML
1964
- * defaults to `true` per schema, so `undefined` here means "not present in
1965
- * the source" and callers should treat it as `true`. Surface only.
1966
- */
1967
- wireframe?: boolean;
1968
- /**
1969
- * Whether the surface chart is the 2-D "top view" projection
1970
- * (`c:surfaceChart`, PowerPoint's "Contour" / "Wireframe Contour" types)
1971
- * rather than the 3-D isometric one (`c:surface3DChart`, "3-D Surface" /
1972
- * "3-D Surface (Wireframe)"). Both element names map to chart type
1973
- * `"surface"`; this bit is the only thing that tells the renderer which
1974
- * of the two projections PowerPoint actually drew, since a top-view
1975
- * surface has no Z-axis at all (only category and series axes) while the
1976
- * 3-D one draws all three. Surface only; `undefined` for every other
1977
- * chart type.
1978
- */
1979
- surfaceTopView?: boolean;
1980
- /**
1981
- * Scatter presentation mode (`c:scatterChart/c:scatterStyle/@val`).
1982
- *
1983
- * `lineMarker` (PowerPoint's own default for every scatter it writes) and
1984
- * `smoothMarker` draw a connecting line; `marker` and `none` do not. Whether
1985
- * the MARKERS appear is decided separately by `c:marker/c:symbol`, and
1986
- * whether the LINE appears is further gated by
1987
- * {@link PptxChartSeries.lineNoFill} - PowerPoint expresses "markers only" as
1988
- * `lineMarker` plus an `a:ln/a:noFill`, not as `marker`.
1989
- */
1990
- scatterStyle?: PptxChartScatterStyle;
1991
- /**
1992
- * Bar/column gap between category clusters as a percentage of bar width
1993
- * (`c:gapWidth/@val`, `ST_GapAmount`, 0 through 500). Absent uses the
1994
- * renderer default; a generated bar chart writes 150. Reconciled on save
1995
- * for loaded charts.
1996
- */
1997
- barGapWidth?: number;
1998
- /**
1999
- * Clustered bar/column overlap between series within a category as a
2000
- * percentage (`c:overlap/@val`, `ST_Overlap`, -100 through 100). Absent
2001
- * uses 0. `c:bar3DChart` has no overlap. Written for generated charts and
2002
- * reconciled on save for loaded ones.
2003
- */
2004
- barOverlap?: number;
2005
- /** Internal: path to the chart XML part in the PPTX archive (for round-trip save). */
2006
- chartPartPath?: string;
2007
- /** Internal: relationship ID linking the graphic frame to the chart part. */
2008
- chartRelationshipId?: string;
2009
- /** `null` explicitly removes an existing ChartML data table. */
2010
- dataTable?: PptxChartDataTable | null;
2011
- /** `null` explicitly removes an existing `c:dropLines` element. */
2012
- dropLines?: PptxChartLineStyle | null;
2013
- /** `null` explicitly removes an existing `c:hiLowLines` element. */
2014
- hiLowLines?: PptxChartLineStyle | null;
2015
- /** `null` explicitly removes an existing up/down-bars container. */
2016
- upDownBars?: PptxChartUpDownBars | null;
2017
- axes?: PptxChartAxisFormatting[];
2018
- floor?: PptxChart3DSurface;
2019
- sideWall?: PptxChart3DSurface;
2020
- backWall?: PptxChart3DSurface;
2021
- /** Per-band surface-chart colour overrides (`c:surfaceChart/c:bandFmts`). */
2022
- bandFmts?: PptxChartBandFmt[];
2023
- /** External data source reference (c:externalData) linking to an external workbook. */
2024
- externalData?: PptxExternalData;
2025
- /**
2026
- * Parsed data from the embedded xlsx workbook (from ppt/embeddings/).
2027
- *
2028
- * When a chart references an embedded Excel workbook via `c:externalData`,
2029
- * the xlsx is parsed to extract categories and series. This data serves as
2030
- * a fallback when the chart XML's cached series data is empty or incomplete.
2031
- */
2032
- embeddedWorkbookData?: PptxEmbeddedWorkbookData;
2033
- /**
2034
- * Pivot table data source reference (c:pivotSource).
2035
- *
2036
- * When present, the chart's data originates from a PivotTable.
2037
- * The chart still renders using its cached series data; this field
2038
- * is metadata about the data origin, preserved for round-trip fidelity.
2039
- */
2040
- pivotSource?: PptxChartPivotSource | null;
2041
- /**
2042
- * Whether only visible cells are plotted (c:plotVisOnly).
2043
- * When `true` (the default), hidden cells are excluded from the chart.
2044
- * When `false`, hidden data IS plotted.
2045
- */
2046
- plotVisibleOnly?: boolean;
2047
- /**
2048
- * Color palette extracted from the chart's Office 2013+ color style part
2049
- * (`chartColorStyle*.xml`). When present, this palette takes priority over
2050
- * the `c:style/@val`-derived palette in `getChartStylePalette`.
2051
- *
2052
- * Each entry is a resolved hex colour string (e.g. `"#4472C4"`).
2053
- */
2054
- colorPalette?: string[];
2055
- /**
2056
- * The deck theme's `accent1` to `accent6` as resolved hex colours (`#RRGGBB`),
2057
- * recorded at load for rendering only and never written on save. A chart with
2058
- * no colour-style part paints its `c:style` palette over these accents, as
2059
- * PowerPoint does; absent when the theme does not define all six.
2060
- */
2061
- themeAccentColors?: string[];
2062
- /**
2063
- * Color cycling method from the chart color style part's `meth` attribute.
2064
- *
2065
- * - `"cycle"`: repeat the palette colours in order (default)
2066
- * - `"withinLinear"`: gradient within each series
2067
- * - `"acrossLinear"`: gradient across series
2068
- */
2069
- colorMethod?: 'cycle' | 'withinLinear' | 'acrossLinear';
2070
- /** Internal source color-style part path used for lossless dirty saves. */
2071
- colorStylePartPath?: string;
2072
- /** Internal parsed palette snapshot used to detect actual edits. */
2073
- colorStyleOriginalPalette?: string[];
2074
- /** Internal parsed method snapshot used to detect actual edits. */
2075
- colorStyleOriginalMethod?: 'cycle' | 'withinLinear' | 'acrossLinear';
2076
- /**
2077
- * Pie-of-pie / Bar-of-pie options (`c:ofPieChart`, CT_OfPieChart).
2078
- *
2079
- * Present only when {@link chartType} is `"ofPie"`. Carries the split
2080
- * configuration, secondary plot size, and serLines flag so that an
2081
- * `ofPieChart` element can be re-emitted on save with full fidelity.
2082
- */
2083
- ofPieOptions?: PptxChartOfPieOptions;
2084
- /** Classic bubble-chart display options (`c:bubbleChart`). */
2085
- bubbleOptions?: PptxBubbleChartOptions;
2086
- /**
2087
- * 3D viewing parameters (`c:view3D`, CT_View3D).
2088
- *
2089
- * Parsed from and emitted to `c:chart/c:view3D`. Absent when the
2090
- * chart XML has no `c:view3D` element.
2091
- */
2092
- view3D?: PptxChartView3D;
2093
- /**
2094
- * Top-level chart chrome flags (`c:autoTitleDeleted`,
2095
- * `c:dispBlanksAs`, `c:showDLblsOverMax`).
2096
- *
2097
- * Each flag is omitted from the emitted XML when absent on the
2098
- * source data, so absence does not produce empty `<c:…/>` placeholders.
2099
- */
2100
- chartChrome?: PptxChartChrome;
2101
- /** `c:chartSpace/c:printSettings`; `null` removes the container on save. */
2102
- printSettings?: PptxChartPrintSettings | null;
2103
- /** `c:chartSpace/c:protection`; `null` removes the container on save. */
2104
- protection?: PptxChartProtection | null;
2105
- /** Editable manual placement for the title, plot area, and legend. */
2106
- layouts?: PptxChartLayouts;
2107
- /**
2108
- * Raw `c:userShapes` XML subtree (a drawing tree) preserved verbatim.
2109
- *
2110
- * `c:userShapes` references a separate drawing part containing
2111
- * shapes drawn over the chart. The reference is preserved as-is so
2112
- * that round-trip save re-emits the original element without
2113
- * attempting to parse the nested drawing tree.
2114
- */
2115
- userShapesXml?: unknown;
2116
- /**
2117
- * Parsed, renderable drawing-overlay shapes resolved from the separate
2118
- * drawing part referenced by `c:userShapes/@r:id`
2119
- * (`ppt/drawings/drawingN.xml`). Each entry carries chart-relative anchor
2120
- * geometry plus light shape/text formatting so the viewer can render an
2121
- * overlay on top of the chart plot. Render-only: {@link userShapesXml}
2122
- * remains the source of truth for round-trip save.
2123
- */
2124
- userShapes?: PptxChartUserShape[];
2125
- /**
2126
- * Raw `c:pivotFmts` XML subtree preserved verbatim.
2127
- *
2128
- * `c:pivotFmts` carries a list of `c:pivotFmt` formatting overrides
2129
- * for charts whose data originates from a PivotTable. Preserved
2130
- * verbatim for round-trip fidelity.
2131
- */
2132
- /** Typed pivot-chart format persistence; `null` removes `c:pivotFmts`. */
2133
- pivotFormats?: PptxChartPivotFormats | null;
2134
- /**
2135
- * Color-map override (`c:clrMapOvr`) carrying 12 attributes that
2136
- * remap theme colour roles for this chart only. Modeled as a flat
2137
- * `attribute -> value` map (e.g. `{ bg1: 'lt1', accent1: 'accent2' }`)
2138
- * so unknown/future attributes round-trip without code changes.
2139
- * `null` explicitly removes an existing `c:clrMapOvr`; an empty object
2140
- * is treated the same as `null` on save.
2141
- */
2142
- clrMapOvr?: Record<string, string> | null;
2143
- /**
2144
- * Whether the chart's own cached numeric values use the 1904 date epoch
2145
- * (`c:chartSpace/c:date1904/@val`). Independent of, and authoritative over,
2146
- * any embedded workbook's `workbookPr/@date1904` (a chart can lack an
2147
- * embedded workbook entirely, or its cache can legitimately differ from the
2148
- * workbook's current setting). Absent when the source XML omits the
2149
- * element, in which case the 1900 system applies (the schema default).
2150
- */
2151
- date1904?: boolean;
2152
- /**
2153
- * PowerPoint's "Rounded corners" chart-area option
2154
- * (`c:chartSpace/c:roundedCorners/@val`). Absent when the source XML omits
2155
- * the element; PowerPoint then draws rounded corners, so square corners
2156
- * need an explicit `false`. Written for generated charts when set, and
2157
- * reconciled on save for loaded ones.
2158
- */
2159
- roundedCorners?: boolean;
2160
- /**
2161
- * 3-D chart depth/spacing along the series axis, as a percentage
2162
- * (`c:gapDepth/@val`, `ST_GapAmount`, 0 through 500). Legal on
2163
- * `bar3D`/`area3D`/`line3D`/`surface` chart-type containers only. Read-only
2164
- * for rendering: save round-trips it via the preserved chart XML rather
2165
- * than a typed edit path.
2166
- */
2167
- gapDepth?: number;
2168
- /**
2169
- * Parsed Office 2013+ chart-style part (`ppt/charts/style#.xml`,
2170
- * `cs:chartStyle`), providing per-element font/line/fill defaults for
2171
- * whichever built-in "Chart Styles" gallery entry ({@link PptxChartStyle.styleId})
2172
- * is active. Absent when the chart has no such part (common for
2173
- * automation-authored charts, where PowerPoint still implies style 2's
2174
- * look via its own bundled defaults).
2175
- */
2176
- chartStyleDefinition?: ResolvedChartStyleDefinition;
2177
- /**
2178
- * Format-pane edits per chart element (fill transparency, line details,
2179
- * effects, legend/axis/data-label boxes), written into each element's
2180
- * `c:spPr` on save. Absent on a chart the panes never touched. See
2181
- * `types/chart-element-format.ts`.
2182
- */
2183
- elementFormats?: PptxChartElementFormats;
2184
- }
2185
- /**
2186
- * Discriminator for embedded media element types.
2187
- *
2188
- * @example
2189
- * ```ts
2190
- * const kind: PptxMediaType = "video";
2191
- * // => "video" — one of: "video" | "audio" | "unknown"
2192
- * ```
2193
- */
2194
- type PptxMediaType = 'video' | 'audio' | 'unknown';
2195
- type PptxMediaReferenceKind = 'audioCd' | 'wavAudioFile' | 'audioFile' | 'videoFile' | 'quickTimeFile';
2196
- interface PptxAudioCdPosition {
2197
- track: number;
2198
- time?: number;
2199
- /** Original `st` or `end` node, retained for lossless edits. */
2200
- rawXml?: XmlObject;
2201
- }
2202
- /**
2203
- * A named bookmark within a media clip timeline.
2204
- *
2205
- * @example
2206
- * ```ts
2207
- * const bm: MediaBookmark = {
2208
- * id: "bm1",
2209
- * time: 12.5,
2210
- * label: "Intro ends",
2211
- * };
2212
- * // => satisfies MediaBookmark
2213
- * ```
2214
- */
2215
- interface MediaBookmark {
2216
- id: string;
2217
- /** Position in seconds from the start of the clip. */
2218
- time: number;
2219
- /** User-visible label for this bookmark. */
2220
- label: string;
2221
- }
2222
- /**
2223
- * Runtime-extracted metadata about a media clip (populated from HTMLMediaElement).
2224
- *
2225
- * @example
2226
- * ```ts
2227
- * const meta: MediaMetadata = {
2228
- * duration: 120.5,
2229
- * videoWidth: 1920,
2230
- * videoHeight: 1080,
2231
- * codecInfo: "video/mp4; codecs=\"avc1.640028\"",
2232
- * };
2233
- * // => satisfies MediaMetadata
2234
- * ```
2235
- */
2236
- interface MediaMetadata {
2237
- /** Duration in seconds. */
2238
- duration?: number;
2239
- /** Video width in pixels (video only). */
2240
- videoWidth?: number;
2241
- /** Video height in pixels (video only). */
2242
- videoHeight?: number;
2243
- /** MIME type / codec string reported by the browser. */
2244
- codecInfo?: string;
2245
- }
2246
- /**
2247
- * A closed-caption / subtitle track associated with a media element.
2248
- *
2249
- * @example
2250
- * ```ts
2251
- * const track: MediaCaptionTrack = {
2252
- * id: "t1",
2253
- * label: "English",
2254
- * language: "en",
2255
- * kind: "subtitles",
2256
- * isDefault: true,
2257
- * };
2258
- * // => satisfies MediaCaptionTrack
2259
- * ```
2260
- */
2261
- interface MediaCaptionTrack {
2262
- /** Unique ID for this track. */
2263
- id: string;
2264
- /** Human-readable label (e.g. "English", "Spanish"). */
2265
- label: string;
2266
- /** BCP-47 language code (e.g. "en", "es"). */
2267
- language: string;
2268
- /** Track kind: subtitles, captions, or descriptions. */
2269
- kind: 'subtitles' | 'captions' | 'descriptions';
2270
- /** Data URL or path to the VTT/SRT content within the PPTX archive. */
2271
- src?: string;
2272
- /** Inline VTT content (for embedded captions). */
2273
- content?: string;
2274
- /** Whether this track is the default/active one. */
2275
- isDefault?: boolean;
2276
- }
2277
- /**
2278
- * Action types: hyperlinks, slide jumps, macros, and action buttons.
2279
- *
2280
- * @module pptx-types/actions
2281
- */
2282
- /**
2283
- * A parsed shape-level action from `a:hlinkClick` or `a:hlinkHover`.
2284
- *
2285
- * @example
2286
- * ```ts
2287
- * const link: PptxAction = {
2288
- * url: "https://example.com",
2289
- * tooltip: "Visit Example",
2290
- * highlightClick: true,
2291
- * };
2292
- *
2293
- * const slideJump: PptxAction = {
2294
- * action: "ppaction://hlinksldjump",
2295
- * targetSlideIndex: 3,
2296
- * };
2297
- * // => satisfies PptxAction
2298
- * ```
2299
- */
2300
- interface PptxAction {
2301
- /** Relationship ID referencing the action target. */
2302
- rId?: string;
2303
- /** OOXML action string (e.g. `ppaction://hlinksldjump`). */
2304
- action?: string;
2305
- /** Tooltip text shown on hover. */
2306
- tooltip?: string;
2307
- /** Whether the shape should highlight on click. */
2308
- highlightClick?: boolean;
2309
- /** Resolved URL or file path from the slide relationship map. */
2310
- url?: string;
2311
- /** Zero-based index into the slides array for internal slide jumps. */
2312
- targetSlideIndex?: number;
2313
- /** Relationship ID of an optional click sound (`a:snd/@r:embed`). */
2314
- soundRId?: string;
2315
- /** Resolved media target path for the optional click sound. */
2316
- soundPath?: string;
2317
- /**
2318
- * `CT_Hyperlink/@endSnd` (ECMA-376 20.1.2.2.23): PowerPoint's Action
2319
- * Settings "Stop previous sound" checkbox. Round-tripped for now (issue
2320
- * G14); not yet wired into playback.
2321
- */
2322
- endSnd?: boolean;
2323
- }
2324
- /**
2325
- * High-level action type for the action settings UI.
2326
- * Maps to OOXML `ppaction://` verbs + external URLs.
2327
- *
2328
- * @example
2329
- * ```ts
2330
- * const type: ElementActionType = "slide";
2331
- * // => "slide": one of: "none" | "url" | "slide" | "firstSlide" | "lastSlide" | "prevSlide" | "nextSlide" | "endShow" | "lastViewed" | "customShow" | "openFile" | "openPresentation" | "playMedia" | "oleVerb"
2332
- * ```
2333
- */
2334
- type ElementActionType = 'none' | 'url' | 'slide' | 'firstSlide' | 'lastSlide' | 'prevSlide' | 'nextSlide' | 'endShow' |
2335
- /** `ppaction://hlinkshowjump?jump=lastslideviewed` - back to the last slide the audience saw. */
2336
- 'lastViewed' |
2337
- /** `ppaction://customshow?id=N[&return=true]` - jump into a named custom show. */
2338
- 'customShow' |
2339
- /** `ppaction://hlinkfile` - open an external file via the action's `r:id`. */
2340
- 'openFile' |
2341
- /** `ppaction://hlinkpres` - open another presentation via the action's `r:id`. */
2342
- 'openPresentation' |
2343
- /** `ppaction://media` - play (or toggle) the element's own embedded media. */
2344
- 'playMedia' |
2345
- /** `ppaction://ole?verb=N` - run a numbered OLE verb on an embedded object. */
2346
- 'oleVerb' |
2347
- /**
2348
- * `ppaction://program` - PowerPoint's "Run program:" action; the program
2349
- * path resolves via the hyperlink's `r:id` relationship, the same shape
2350
- * as `hlinkfile` (issue G15).
2351
- */
2352
- 'runProgram';
2353
- /**
2354
- * User-facing action configuration stored on an element.
2355
- * This is a convenience wrapper around the lower-level `PptxAction` that maps
2356
- * to/from OOXML hyperlink/action attributes.
2357
- *
2358
- * @example
2359
- * ```ts
2360
- * const action: ElementAction = {
2361
- * trigger: "click",
2362
- * type: "url",
2363
- * url: "https://example.com",
2364
- * };
2365
- *
2366
- * const jumpToSlide: ElementAction = {
2367
- * trigger: "click",
2368
- * type: "slide",
2369
- * slideIndex: 5,
2370
- * };
2371
- * // => satisfies ElementAction
2372
- * ```
2373
- */
2374
- interface ElementAction {
2375
- /** When the action fires. */
2376
- trigger: 'click' | 'hover';
2377
- /** What kind of action to perform. */
2378
- type: ElementActionType;
2379
- /** External URL (for 'url' type), or the resolved external target (for 'openFile' / 'openPresentation'). */
2380
- url?: string;
2381
- /** Zero-based slide index (for 'slide' type). */
2382
- slideIndex?: number;
2383
- /** Custom show identifier (for 'customShow' type), from `ppaction://customshow?id=`. */
2384
- customShowId?: string;
2385
- /** Whether the show returns to its origin after the custom show ends (`&return=true`), for 'customShow'. */
2386
- returnAfter?: boolean;
2387
- /** OLE verb number (for 'oleVerb' type), from `ppaction://ole?verb=`. */
2388
- oleVerb?: number;
2389
- }
2390
- /**
2391
- * Preset action button definition (OOXML built-in action button shapes).
2392
- *
2393
- * @example
2394
- * ```ts
2395
- * const btn: ActionButtonPreset = {
2396
- * shapeType: "actionButtonBackPrevious",
2397
- * label: "Back",
2398
- * defaultAction: "prevSlide",
2399
- * iconPath: "M 0 0 L 10 5 L 0 10 Z",
2400
- * };
2401
- * // => satisfies ActionButtonPreset
2402
- * ```
2403
- */
2404
- interface ActionButtonPreset {
2405
- /** OOXML preset geometry name (e.g. 'actionButtonBackPrevious'). */
2406
- shapeType: string;
2407
- /** Human-readable label. */
2408
- label: string;
2409
- /** Default action type pre-configured on the button. */
2410
- defaultAction: ElementActionType;
2411
- /** SVG path data for the icon rendered inside the button. */
2412
- iconPath: string;
2413
- }
2414
- /**
2415
- * Properties shared by **every** element on a slide.
2416
- *
2417
- * Position and size are in pixels (converted from EMU at parse time).
2418
- * Optional properties apply to subsets of elements or may be absent in
2419
- * the original OOXML.
2420
- *
2421
- * @example
2422
- * ```ts
2423
- * const base: PptxElementBase = {
2424
- * id: "el_001",
2425
- * x: 100, y: 50,
2426
- * width: 400, height: 200,
2427
- * rotation: 15,
2428
- * opacity: 0.9,
2429
- * };
2430
- * // => satisfies PptxElementBase
2431
- * ```
2432
- */
2433
- interface PptxElementBase {
2434
- id: string;
2435
- /**
2436
- * The shape's native OOXML id from `p:cNvPr/@id` (an unsigned integer, as a
2437
- * string), captured on load. Distinct from {@link id}, which is a synthetic
2438
- * positional identity (`${slidePath}-shape-${index}`) the loader assigns for
2439
- * selection / undo / template tracking. Animations target shapes by this
2440
- * native id (`p:spTgt/@spid`), so it is the stable key used to reconcile an
2441
- * animation to the element it animates across a save/reload round trip.
2442
- * Absent on SDK-created elements until one is minted at save time.
2443
- */
2444
- shapeId?: string;
2445
- /** Element name from `cNvPr/@name`. Used for morph transition matching via the `!!` naming convention. */
2446
- name?: string;
2447
- /**
2448
- * `p:nvSpPr/p:nvPr/p:ph/@type` (lower-cased) when the shape is a placeholder:
2449
- * `title`, `ctrtitle`, `body`, `subtitle`, `ftr`, `dt`, `sldnum`, ...
2450
- *
2451
- * Captured on load so consumers can tell a footer placeholder from a text box
2452
- * without re-walking `rawXml`. Absent on non-placeholder shapes and on
2453
- * SDK-created elements.
2454
- */
2455
- placeholderType?: string;
2456
- /**
2457
- * `p:nvSpPr/p:nvPr/p:ph/@sz` (lower-cased): `"full"`, `"half"`, or
2458
- * `"quarter"`. Captured on load for round-trip completeness. Per
2459
- * ECMA-376 §19.3.1.36 (CT_Placeholder) this size hint is only meaningful
2460
- * when NO `a:xfrm` exists anywhere in the placeholder's inheritance
2461
- * chain (slide -> layout -> master); every real-world corpus placeholder
2462
- * that carries `@sz` already has an explicit `a:xfrm` at the master
2463
- * level, so no renderer currently derives a size from this field.
2464
- */
2465
- placeholderSz?: string;
2466
- /**
2467
- * `p:nvSpPr/p:nvPr/p:ph/@orient` (only `"vert"` is meaningful per
2468
- * `ST_Direction`). Captured on load for round-trip completeness. In
2469
- * practice every placeholder observed with `orient="vert"` also carries
2470
- * an explicit `a:bodyPr/@vert`, which already drives vertical-text
2471
- * rendering, so this field is not currently read by any renderer.
2472
- */
2473
- placeholderOrient?: 'vert';
2474
- x: number;
2475
- y: number;
2476
- width: number;
2477
- height: number;
2478
- /**
2479
- * The exact EMU integer `x` was parsed from (the `a:off/@_x` this
2480
- * element's own `a:xfrm` carried on load), when the parser could resolve
2481
- * one. `x` itself is always `Math.round(xEmu / EMU_PER_PX)` at parse
2482
- * time, but that rounding is lossy: re-deriving EMU from `x` on save
2483
- * (`Math.round(x * EMU_PER_PX)`) can drift from the original value by up
2484
- * to half a pixel's worth of EMU on every load/save cycle even when
2485
- * nothing touched this element. Kept alongside `x` (not instead of it) so
2486
- * every consumer that only cares about on-screen position is unaffected;
2487
- * only the save-side xfrm writer (`resolveXfrmEmu` in
2488
- * `xfrm-emu-resolution.ts`) reads this, and only when `x` still equals
2489
- * `Math.round(xEmu / EMU_PER_PX)` (i.e. nothing moved this element since
2490
- * load) does it re-emit `xEmu` verbatim instead of re-quantizing `x`.
2491
- * `undefined` for an SDK-created element or one whose transform could not
2492
- * be resolved to a usable `a:off` on load.
2493
- */
2494
- xEmu?: number;
2495
- /** The exact EMU integer `y` was parsed from (`a:off/@_y`). See {@link xEmu}. */
2496
- yEmu?: number;
2497
- /** The exact EMU integer `width` was parsed from (`a:ext/@_cx`). See {@link xEmu}. */
2498
- widthEmu?: number;
2499
- /** The exact EMU integer `height` was parsed from (`a:ext/@_cy`). See {@link xEmu}. */
2500
- heightEmu?: number;
2501
- /** Resolved load-time transform for a shape with no own a:xfrm. Used only to detect edits. */
2502
- inheritedTransform?: Pick<PptxElementBase, 'x' | 'y' | 'width' | 'height' | 'rotation' | 'skewX' | 'skewY' | 'flipHorizontal' | 'flipVertical'>;
2503
- rotation?: number;
2504
- /** Skew along the X axis in degrees (parsed from `@_skewX` in 1/60000ths of a degree). */
2505
- skewX?: number;
2506
- /** Skew along the Y axis in degrees (parsed from `@_skewY` in 1/60000ths of a degree). */
2507
- skewY?: number;
2508
- flipHorizontal?: boolean;
2509
- flipVertical?: boolean;
2510
- /** Whether this element is hidden (used by the Elements Panel visibility toggle). */
2511
- hidden?: boolean;
2512
- /** Element-level opacity (0-1). */
2513
- opacity?: number;
2514
- rawXml?: XmlObject;
2515
- /** Shape-level click action (from `a:hlinkClick` on `p:cNvPr`). */
2516
- actionClick?: PptxAction;
2517
- /** Shape-level hover action (from `a:hlinkHover` on `p:cNvPr`). */
2518
- actionHover?: PptxAction;
2519
- /** Shape lock attributes parsed from `p:cNvSpPr/a:spLocks`. */
2520
- locks?: PptxShapeLocks;
2521
- /**
2522
- * Opaque `<a:ext>` children captured from the shape's `<a:extLst>` whose
2523
- * URI is not recognised by a typed extractor (hidden fill/line, image
2524
- * effects, …). Preserved verbatim and re-emitted on save so unknown
2525
- * vendor extensions survive a round-trip.
2526
- *
2527
- * Mirrors the existing `effectDagXml` / `endParaRunProperties` raw-XML
2528
- * preservation pattern.
2529
- */
2530
- extLstXml?: XmlObject[];
2531
- }
2532
- /**
2533
- * Text content mixin — present on text boxes and shapes.
2534
- *
2535
- * Shapes can contain text overlaid on the shape geometry, so both
2536
- * `TextPptxElement` and `ShapePptxElement` extend this interface.
2537
- *
2538
- * @example
2539
- * ```ts
2540
- * const props: PptxTextProperties = {
2541
- * text: "Hello World",
2542
- * textStyle: { fontSize: 24, bold: true, color: "#333333" },
2543
- * };
2544
- * // => satisfies PptxTextProperties
2545
- * ```
2546
- */
2547
- interface PptxTextProperties {
2548
- text?: string;
2549
- textStyle?: TextStyle;
2550
- /** Rich text segments with individual styling. */
2551
- textSegments?: TextSegment[];
2552
- /** Per-paragraph indentation (marginLeft, indent) for multi-level bullet support. */
2553
- paragraphIndents?: Array<{
2554
- marginLeft?: number;
2555
- indent?: number;
2556
- }>;
2557
- /** Placeholder prompt text inherited from layout/master (e.g. "Click to add title"). Shown as a greyed-out hint when the shape has no user-entered text. */
2558
- promptText?: string;
2559
- /**
2560
- * The string {@link text} was INHERITED from, when this is a header / footer /
2561
- * date / slide-number placeholder whose own body the file leaves empty.
2562
- *
2563
- * PowerPoint keeps the footer string on the slide master and writes each
2564
- * slide's copy of the `ftr` placeholder empty, so the empty body means
2565
- * "render the master's footer here". Rendering needs the resolved string, but
2566
- * SAVING it into the slide would pin that slide to today's master text and
2567
- * silently detach it from the Header & Footer dialog. The save writer
2568
- * therefore leaves the authored empty body alone while `text` still equals
2569
- * this value, and writes a genuine per-slide override once it does not.
2570
- */
2571
- inheritedPlaceholderText?: string;
2572
- /** Linked text box chain ID from `a:bodyPr > a:linkedTxbx/@id` or `a:txbx > a:linkedTxbx/@id`. Text overflows from one linked frame to the next. */
2573
- linkedTxbxId?: number;
2574
- /** Sequence number within a linked text box chain (0-based). */
2575
- linkedTxbxSeq?: number;
2576
- }
2577
- /**
2578
- * Shape styling & geometry mixin — present on shapes, connectors, and images.
2579
- *
2580
- * @example
2581
- * ```ts
2582
- * const props: PptxShapeProperties = {
2583
- * shapeType: "roundRect",
2584
- * shapeStyle: { fillColor: "#0055AA", strokeWidth: 2 },
2585
- * shapeAdjustments: { adj: 16667 },
2586
- * };
2587
- * // => satisfies PptxShapeProperties
2588
- * ```
2589
- */
2590
- interface PptxShapeProperties {
2591
- shapeStyle?: ShapeStyle;
2592
- /** Preset geometry name, e.g. "rect", "ellipse", "roundRect". */
2593
- shapeType?: string;
2594
- /** Geometry adjustment values, e.g. `{ adj: 16667 }`. */
2595
- shapeAdjustments?: Record<string, number>;
2596
- /** Adjustment handles for interactive shape modification (yellow diamond handles). */
2597
- adjustmentHandles?: GeometryAdjustmentHandle[];
2598
- }
2599
- /**
2600
- * Text styling for a single indent level (0–8) inside a placeholder’s
2601
- * `a:lstStyle`.
2602
- *
2603
- * Used during placeholder inheritance to fill in defaults for font,
2604
- * bullet, and spacing properties the slide element does not override.
2605
- *
2606
- * @example
2607
- * ```ts
2608
- * const level0: PlaceholderTextLevelStyle = {
2609
- * fontSize: 32,
2610
- * bold: true,
2611
- * bulletChar: "•",
2612
- * };
2613
- * // => satisfies PlaceholderTextLevelStyle
2614
- * ```
2615
- */
2616
- interface PlaceholderTextLevelStyle {
2617
- fontFamily?: string;
2618
- /**
2619
- * The RAW `a:defRPr/a:latin/@typeface` string (verbatim: a theme alias
2620
- * such as `+mj-lt`/`+mn-lt`, or a literal face name) {@link fontFamily}
2621
- * was resolved from. Master/layout text styles are parsed once and
2622
- * cached, so `fontFamily` is a resolved-for-display snapshot; re-emitting
2623
- * it as the literal name on every save (the master-level analogue of
2624
- * `colorChoiceXml` below) flattens the theme alias the moment ANYTHING
2625
- * about the deck is rewritten, even when this level was never touched.
2626
- * Absent when the level declares no `a:latin`.
2627
- */
2628
- fontTypefaceXml?: string;
2629
- /**
2630
- * Snapshot of {@link fontFamily} exactly as parsed, before any edit. The
2631
- * save path diffs the live value against this: unchanged means re-emit
2632
- * {@link fontTypefaceXml} verbatim (preserve the alias); different means
2633
- * a genuine edit, so the new literal name is written instead.
2634
- */
2635
- resolvedFontFamily?: string;
2636
- fontSize?: number;
2637
- bold?: boolean;
2638
- italic?: boolean;
2639
- color?: string;
2640
- /**
2641
- * The `a:defRPr/a:solidFill` node this level's {@link color} came from.
2642
- *
2643
- * Master and layout text styles are parsed and cached before any slide is,
2644
- * so a scheme alias such as `tx1` was resolved through the map that was
2645
- * active then. A slide carrying `p:clrMapOvr` routes the same alias
2646
- * somewhere else, so the alias has to be resolved again against the slide
2647
- * that is inheriting it; {@link color} is only the reading taken at parse
2648
- * time. Absent when the level declares no colour, or declares a literal one.
2649
- */
2650
- colorChoiceXml?: XmlObject;
2651
- bulletChar?: string;
2652
- bulletAutoNumType?: string;
2653
- bulletFontFamily?: string;
2654
- bulletSizePercent?: number;
2655
- /** Bullet colour from `a:buClr` as hex string. */
2656
- bulletColor?: string;
2657
- /**
2658
- * The colour-choice node inside `a:buClr` this level's {@link bulletColor}
2659
- * resolved from (`a:schemeClr` / `a:sysClr` / `a:prstClr` / `a:srgbClr`,
2660
- * transforms included), mirroring `BulletInfo.colorXml`. Re-emitted
2661
- * verbatim on save so a themed bullet is not downgraded to a literal
2662
- * `a:srgbClr`. Absent when the level declares no bullet colour.
2663
- */
2664
- bulletColorXml?: XmlObject;
2665
- /** Bullet size in points from `a:buSzPts`. */
2666
- bulletSizePts?: number;
2667
- /** True when `a:buNone` is present at this level. */
2668
- bulletNone?: boolean;
2669
- marginLeft?: number;
2670
- /** Paragraph right margin in px (from `@_marR` EMU). */
2671
- marginRight?: number;
2672
- indent?: number;
2673
- /**
2674
- * Paragraph alignment as a `TextStyle['align']` token (`left`, `center`,
2675
- * `right`, `justify`, `justLow`, `dist`, `thaiDist`), never the raw OOXML
2676
- * `@algn` value.
2677
- */
2678
- alignment?: string;
2679
- /** Right-to-left paragraph direction (`@rtl`). */
2680
- rtl?: boolean;
2681
- /** Tab stops from `a:tabLst/a:tab` (positions in px). */
2682
- tabStops?: TextStyle['tabStops'];
2683
- lineSpacing?: number;
2684
- lineSpacingExactPt?: number;
2685
- /**
2686
- * Space before the paragraph in px, resolved from EITHER `a:spcPts`
2687
- * (absolute) or `a:spcPct` (a percentage of this level's own `a:defRPr`
2688
- * font size) - the OOXML source is not distinguishable from this field
2689
- * alone. See {@link spaceBeforePercent} / {@link resolvedSpaceBefore}.
2690
- */
2691
- spaceBefore?: number;
2692
- spaceAfter?: number;
2693
- /**
2694
- * Snapshot of {@link spaceBefore} / {@link spaceAfter} exactly as parsed.
2695
- * Diffed the same way as {@link resolvedFontFamily}: unchanged means the
2696
- * writer re-emits the ORIGINAL form (`a:spcPct` when
2697
- * {@link spaceBeforePercent} / {@link spaceAfterPercent} is set); a value
2698
- * that has since moved away from the snapshot is a genuine edit and is
2699
- * always written as `a:spcPts`, since an editor works in absolute units.
2700
- */
2701
- resolvedSpaceBefore?: number;
2702
- resolvedSpaceAfter?: number;
2703
- /**
2704
- * The raw `a:spcPct` fraction (e.g. `0.2` for 20%) {@link spaceBefore} /
2705
- * {@link spaceAfter} was resolved from, when the source used percentage
2706
- * spacing rather than `a:spcPts`. Absent when the source used `a:spcPts`
2707
- * (or authored no spacing at all).
2708
- */
2709
- spaceBeforePercent?: number;
2710
- spaceAfterPercent?: number;
2711
- /** Default tab interval in CSS pixels (`a:lvlXpPr/@defTabSz`). */
2712
- defaultTabSize?: number;
2713
- /** Whether East Asian line-breaking rules are enabled. */
2714
- eaLineBreak?: boolean;
2715
- /** Whether Latin line-breaking rules are enabled. */
2716
- latinLineBreak?: boolean;
2717
- /** Font vertical alignment within the text line. */
2718
- fontAlignment?: string;
2719
- /** Whether end punctuation may hang outside the text frame. */
2720
- hangingPunctuation?: boolean;
2721
- }
2722
- /**
2723
- * Pre-parsed placeholder defaults extracted from a layout or master shape
2724
- * that carries a `<p:ph>` element.
2725
- *
2726
- * Used to fill in inherited text styles, bullet definitions, font sizes,
2727
- * and body properties that the slide shape does not explicitly override.
2728
- *
2729
- * @example
2730
- * ```ts
2731
- * const defaults: PlaceholderDefaults = {
2732
- * type: "title",
2733
- * levelStyles: {
2734
- * 0: { fontSize: 36, bold: true, alignment: "left" },
2735
- * },
2736
- * };
2737
- * // => satisfies PlaceholderDefaults
2738
- * ```
2739
- */
2740
- interface PlaceholderDefaults {
2741
- /** Placeholder type: 'title', 'body', 'ctrTitle', 'subTitle', 'dt', 'ftr', 'sldNum', etc. */
2742
- type: string;
2743
- /** Placeholder index (when present). */
2744
- idx?: number;
2745
- bodyInsetLeft?: number;
2746
- bodyInsetTop?: number;
2747
- bodyInsetRight?: number;
2748
- bodyInsetBottom?: number;
2749
- textAnchor?: string;
2750
- autoFit?: boolean;
2751
- /** Explicit autofit mode from OOXML body properties. See {@link TextStyle.autoFitMode}. */
2752
- autoFitMode?: 'shrink' | 'normal' | 'none';
2753
- /** Font scale percentage for normAutofit (e.g. 0.9 = 90%). Only meaningful when autoFit is true. */
2754
- autoFitFontScale?: number;
2755
- /** Line spacing reduction for normAutofit (e.g. 0.2 = reduce by 20%). Only meaningful when autoFit is true. */
2756
- autoFitLineSpacingReduction?: number;
2757
- textWrap?: string;
2758
- /** Level-specific text styles keyed 0-8. */
2759
- levelStyles?: Record<number, PlaceholderTextLevelStyle>;
2760
- /** Prompt text extracted from the layout/master placeholder (e.g. "Click to add title"). */
2761
- promptText?: string;
2762
- }
2763
- /**
2764
- * Authored scene data of a PowerPoint 3D model (`am3d:model3d`, namespace
2765
- * `http://schemas.microsoft.com/office/drawing/2017/model3d`).
2766
- *
2767
- * This is a read-only parsed view: the untouched XML stays on the element's
2768
- * `rawXml`, so the camera, transform and lights round-trip on save.
2769
- */
2770
- /** A 3D point or vector. Points are in EMU; direction vectors are unit-less. */
2771
- interface Model3DVec3 {
2772
- x: number;
2773
- y: number;
2774
- z: number;
2775
- }
2776
- /** `am3d:camera`. Positions are EMU, `fovDeg` is in degrees. */
2777
- interface Model3DCamera {
2778
- position?: Model3DVec3;
2779
- /** Up vector (`am3d:up`), unit-less. */
2780
- up?: Model3DVec3;
2781
- /** Look-at target point (`am3d:lookAt`), EMU. */
2782
- lookAt?: Model3DVec3;
2783
- projection: 'perspective' | 'orthographic';
2784
- /** Vertical field of view in degrees (perspective only). */
2785
- fovDeg?: number;
2786
- /** Orthographic view scale (orthographic only), when authored. */
2787
- orthoScale?: number;
2788
- }
2789
- /** `am3d:trans`: how the model sits in the scene. Offsets are EMU. */
2790
- interface Model3DTransformData {
2791
- /** `meterPerModelUnit` as a plain ratio. */
2792
- meterPerModelUnit?: number;
2793
- preTranslate?: Model3DVec3;
2794
- scale?: Model3DVec3;
2795
- /** Euler rotation in degrees about each axis (`am3d:rot`). */
2796
- rotationDeg?: Model3DVec3;
2797
- postTranslate?: Model3DVec3;
2798
- }
2799
- /** One authored light (`am3d:ambientLight`, `ptLight`, `spotLight`, `dirLight`). */
2800
- interface Model3DLightData {
2801
- kind: 'ambient' | 'point' | 'spot' | 'directional';
2802
- /** `#rrggbb`, when the light has an authored colour. */
2803
- color?: string;
2804
- /** `am3d:illuminance` as a plain ratio. */
2805
- illuminance?: number;
2806
- position?: Model3DVec3;
2807
- direction?: Model3DVec3;
2808
- /** Spot cone angle in degrees, when authored. */
2809
- spotAngleDeg?: number;
2810
- }
2811
- /** Everything parsed from an `am3d:model3d` scene. */
2812
- interface Model3DSceneData {
2813
- camera?: Model3DCamera;
2814
- transform?: Model3DTransformData;
2815
- lights: Model3DLightData[];
2816
- /** `am3d:objViewport/@viewportSz` in EMU. */
2817
- viewportSizeEmu?: number;
2818
- }
2819
- /**
2820
- * Accessibility metadata from `p:cNvPr/a:extLst`'s "Mark as decorative"
2821
- * vendor extension (issue G16). PowerPoint's Alt Text pane writes
2822
- * `a:ext[@uri='{C183D7F6-B498-43B3-948B-1728B52AA6E4}']/adec:decorative
2823
- * val="1"` when a shape or image is marked decorative; mixed into the
2824
- * element variants whose `p:cNvPr` that pane covers.
2825
- */
2826
- interface PptxAccessibilityProperties {
2827
- /**
2828
- * Whether the element is marked decorative. When true, alt text /
2829
- * aria-label / Markdown export should skip describing the element even
2830
- * when {@link PptxImageProperties.altText} (or similar) is present.
2831
- */
2832
- isDecorative?: boolean;
2833
- }
2834
- /**
2835
- * Accessibility description/title from `p:cNvPr/@descr` / `@title` on a
2836
- * plain shape, text box or connector (`p:sp` / `p:cxnSp`). The same pair of
2837
- * attributes already round-trips for a graphic frame (see
2838
- * {@link TablePptxElement.altText}) and, `descr` only, for a picture
2839
- * ({@link PptxImageProperties.altText}); this mixin extends it to the three
2840
- * element kinds whose PowerPoint Alt Text pane data was previously dropped
2841
- * on load because neither field existed on the model.
2842
- */
2843
- interface PptxNonVisualDescription {
2844
- /** `p:cNvPr/@descr`. */
2845
- altText?: string;
2846
- /** `p:cNvPr/@title`. */
2847
- title?: string;
2848
- }
2849
- /**
2850
- * `a:cNvPicPr/@preferRelativeResize` (issue G13), a picture-only non-visual
2851
- * property distinct from `a:picLocks`.
2852
- */
2853
- interface PptxPictureNonVisualProperties {
2854
- /**
2855
- * `a:cNvPicPr/@preferRelativeResize` (ST_Boolean, defaults to `true` when
2856
- * absent). Controls whether a picture's crop rectangle is reinterpreted
2857
- * relative to the picture's ORIGINAL dimensions or its CURRENT
2858
- * (already-resized) dimensions when it is resized again after being
2859
- * cropped. Parsed and round-tripped for now; not yet wired into
2860
- * resize-after-crop arithmetic (this app always uses current-size
2861
- * semantics, which only diverges from `preferRelativeResize="0"` on a
2862
- * second resize after a crop).
2863
- */
2864
- preferRelativeResize?: boolean;
2865
- }
2866
- /**
2867
- * A text box — a plain rectangle containing text, typically with no
2868
- * visible fill or stroke.
2869
- *
2870
- * @example
2871
- * ```ts
2872
- * const title: TextPptxElement = {
2873
- * type: "text",
2874
- * id: "txt_1", x: 50, y: 30, width: 800, height: 60,
2875
- * text: "Welcome",
2876
- * textStyle: { fontSize: 36, bold: true },
2877
- * };
2878
- * // => satisfies TextPptxElement
2879
- * ```
2880
- */
2881
- interface TextPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxNonVisualDescription {
2882
- type: 'text';
2883
- }
2884
- /**
2885
- * A shape — may contain text and custom geometry (preset or freeform).
2886
- *
2887
- * @example
2888
- * ```ts
2889
- * const rect: ShapePptxElement = {
2890
- * type: "shape",
2891
- * id: "shp_1", x: 100, y: 200, width: 300, height: 150,
2892
- * shapeType: "roundRect",
2893
- * shapeStyle: { fillColor: "#00AA55" },
2894
- * text: "OK",
2895
- * };
2896
- * // => satisfies ShapePptxElement
2897
- * ```
2898
- */
2899
- interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxCustomPathProperties, PptxAccessibilityProperties, PptxNonVisualDescription {
2900
- type: 'shape';
2901
- }
2902
- /**
2903
- * A connector (straight, bent, or curved line between shapes).
2904
- *
2905
- * Connector endpoints can snap to specific shapes via
2906
- * `shapeStyle.connectorStartConnection` / `connectorEndConnection`.
2907
- *
2908
- * @example
2909
- * ```ts
2910
- * const line: ConnectorPptxElement = {
2911
- * type: "connector",
2912
- * id: "cxn_1", x: 100, y: 100, width: 200, height: 0,
2913
- * shapeStyle: {
2914
- * strokeColor: "#333",
2915
- * connectorEndArrow: "triangle",
2916
- * },
2917
- * };
2918
- * // => satisfies ConnectorPptxElement
2919
- * ```
2920
- */
2921
- interface ConnectorPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxNonVisualDescription {
2922
- type: 'connector';
2923
- }
2924
- /**
2925
- * An image element from an OOXML `<p:pic>` node with `type: "image"`.
2926
- *
2927
- * @example
2928
- * ```ts
2929
- * const img: ImagePptxElement = {
2930
- * type: "image",
2931
- * id: "img_1", x: 0, y: 0, width: 960, height: 540,
2932
- * imagePath: "ppt/media/image1.png",
2933
- * altText: "Background scenery",
2934
- * };
2935
- * // => satisfies ImagePptxElement
2936
- * ```
2937
- */
2938
- interface ImagePptxElement extends PptxElementBase, PptxShapeProperties, PptxCustomPathProperties, PptxImageProperties, PptxAccessibilityProperties, PptxPictureNonVisualProperties {
2939
- type: 'image';
2940
- }
2941
- /**
2942
- * A picture element from an OOXML `<p:pic>` node with `type: "picture"`.
2943
- *
2944
- * Functionally identical to {@link ImagePptxElement} but distinguished by
2945
- * the `type` discriminant for semantic clarity.
2946
- */
2947
- interface PicturePptxElement extends PptxElementBase, PptxShapeProperties, PptxCustomPathProperties, PptxImageProperties, PptxAccessibilityProperties, PptxPictureNonVisualProperties {
2948
- type: 'picture';
2949
- }
2950
- /**
2951
- * A single unrecognised `<a:graphicData>/<a:extLst>/<a:ext>` extension on a
2952
- * graphicFrame, captured verbatim so the round-trip can preserve future or
2953
- * vendor-specific markup that the parser doesn't yet understand.
2954
- *
2955
- * The XML is preserved as a fast-xml-parser object tree (the same shape as
2956
- * `rawXml` on other elements) so the save layer can re-emit it through the
2957
- * existing builder without lossy string manipulation.
2958
- */
2959
- interface PptxGraphicFrameExtension {
2960
- /** The `@_uri` attribute identifying the extension (e.g. `{C3CD43...}`). */
2961
- uri: string;
2962
- /** Parsed XML payload of the extension, suitable for re-serialization. */
2963
- xml: XmlObject;
2964
- }
2965
- /**
2966
- * A table embedded via a `<p:graphicFrame>`.
2967
- *
2968
- * @example
2969
- * ```ts
2970
- * const tbl: TablePptxElement = {
2971
- * type: "table",
2972
- * id: "tbl_1", x: 50, y: 200, width: 860, height: 300,
2973
- * tableData: {
2974
- * rows: [
2975
- * { cells: [{ text: "Name" }, { text: "Score" }] },
2976
- * { cells: [{ text: "Alice" }, { text: "95" }] },
2977
- * ],
2978
- * },
2979
- * };
2980
- * // => satisfies TablePptxElement
2981
- * ```
2982
- */
2983
- interface TablePptxElement extends PptxElementBase {
2984
- type: 'table';
2985
- /** Parsed table cell data for editing. */
2986
- tableData?: PptxTableData;
2987
- /**
2988
- * Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`, the
2989
- * same non-visual-properties attribute a picture's alt text comes from.
2990
- */
2991
- altText?: string;
2992
- /** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
2993
- title?: string;
2994
- /**
2995
- * Unrecognised extensions captured from `a:graphicData/a:extLst` so they
2996
- * round-trip losslessly. See {@link PptxGraphicFrameExtension}.
2997
- */
2998
- extensionXml?: PptxGraphicFrameExtension[];
2999
- }
3000
- /**
3001
- * A chart embedded via a `<p:graphicFrame>`.
3002
- *
3003
- * Chart data is parsed from the related `chartN.xml` / `chartExN.xml`
3004
- * parts inside the PPTX archive.
3005
- */
3006
- interface ChartPptxElement extends PptxElementBase {
3007
- type: 'chart';
3008
- chartData?: PptxChartData;
3009
- /** Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`. */
3010
- altText?: string;
3011
- /** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
3012
- title?: string;
3013
- /** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
3014
- extensionXml?: PptxGraphicFrameExtension[];
3015
- }
3016
- /**
3017
- * A SmartArt diagram embedded via a `<p:graphicFrame>`.
3018
- *
3019
- * SmartArt data is extracted from `dgm:dataModel` parts. The editor
3020
- * supports real structural editing (adding, removing and reordering nodes,
3021
- * editing node text, and switching layout presets) with a lossless
3022
- * `ptLst` round-trip. When the file carries PowerPoint's own pre-computed
3023
- * drawing part, that exact layout is used; otherwise an algorithmic layout
3024
- * engine approximates it, so complex custom layouts may not match
3025
- * PowerPoint pixel-for-pixel.
3026
- */
3027
- interface SmartArtPptxElement extends PptxElementBase {
3028
- type: 'smartArt';
3029
- smartArtData?: PptxSmartArtData;
3030
- /** Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`. */
3031
- altText?: string;
3032
- /** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
3033
- title?: string;
3034
- /** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
3035
- extensionXml?: PptxGraphicFrameExtension[];
3036
- }
3037
- /**
3038
- * Recognised OLE object application types derived from `progId` / `clsId`.
3039
- *
3040
- * Used to show type-specific icons and previews in the editor.
3041
- */
3042
- type OleObjectType = 'excel' | 'word' | 'powerpoint' | 'pdf' | 'visio' | 'mathtype' | 'package' | 'unknown';
3043
- /**
3044
- * An OLE (Object Linking and Embedding) object.
3045
- *
3046
- * OLE objects can be embedded Excel sheets, Word documents, PDFs, Visio
3047
- * diagrams, MathType equations, or generic "packages". They carry a
3048
- * preview image for display and optional binary data for extraction.
3049
- *
3050
- * @example
3051
- * ```ts
3052
- * const ole: OlePptxElement = {
3053
- * type: "ole",
3054
- * id: "ole_1", x: 100, y: 200, width: 400, height: 300,
3055
- * oleObjectType: "excel",
3056
- * oleProgId: "Excel.Sheet.12",
3057
- * fileName: "budget.xlsx",
3058
- * };
3059
- * // => satisfies OlePptxElement
3060
- * ```
3061
- */
3062
- interface OlePptxElement extends PptxElementBase {
3063
- type: 'ole';
3064
- oleTarget?: string;
3065
- oleProgId?: string;
3066
- oleName?: string;
3067
- /** CLSID of the OLE object (from `@_classid`). */
3068
- oleClsId?: string;
3069
- /** Detected application type (excel, word, pdf, etc.). */
3070
- oleObjectType?: OleObjectType;
3071
- /** File extension for the embedded binary (e.g. "xlsx", "docx"). */
3072
- oleFileExtension?: string;
3073
- /** Original file name when available. */
3074
- fileName?: string;
3075
- /** Whether this is a linked (vs. embedded) object. */
3076
- isLinked?: boolean;
3077
- /** External file path for linked OLE objects (TargetMode="External"). */
3078
- externalPath?: string;
3079
- /** Data-URL or path for the OLE preview image. */
3080
- previewImage?: string;
3081
- /** Decoded preview image as a data-URL. */
3082
- previewImageData?: string;
3083
- /** Whether the OLE object is shown as an icon (`p:oleObj/@showAsIcon`). */
3084
- oleShowAsIcon?: boolean;
3085
- /** Authored display width of the OLE object preview, in EMU (`@imgW`). */
3086
- oleImgW?: number;
3087
- /** Authored display height of the OLE object preview, in EMU (`@imgH`). */
3088
- oleImgH?: number;
3089
- /**
3090
- * The recovered embedded payload as a data-URL (e.g.
3091
- * `data:application/vnd...;base64,...`), suitable for download or
3092
- * open-in-new-tab. For a generic "Package" OLE object this is the unwrapped
3093
- * inner file; for a plain embedded file (e.g. `.xlsx`) it is that file
3094
- * directly. Undefined when the embedding is missing or unreadable.
3095
- *
3096
- * Stored as a data-URL string to mirror how images store decoded bytes
3097
- * ({@link ImagePptxElement.imageData}) and to stay serialization-safe.
3098
- */
3099
- oleEmbeddedData?: string;
3100
- /** Original file name of the embedded payload when recoverable. */
3101
- oleEmbeddedFileName?: string;
3102
- /** MIME type of the embedded payload, derived from its extension/ProgID. */
3103
- oleEmbeddedMimeType?: string;
3104
- /** Size of the embedded payload in bytes. */
3105
- oleEmbeddedByteSize?: number;
3106
- /**
3107
- * `p:link/@followColorScheme` (`ST_OleObjectFollowColorScheme`): whether a
3108
- * LINKED OLE object's icon recolours to match the presentation theme.
3109
- * Only meaningful when {@link isLinked} is `true`. ECMA-376 §19.3.1.28.
3110
- */
3111
- oleFollowColorScheme?: 'none' | 'full' | 'textAndBackground';
3112
- /**
3113
- * `p:link/@updateAutomatic` (`CT_OleObjectLink`, ECMA-376 §19.3.2.4):
3114
- * whether a LINKED OLE object refreshes automatically from its source
3115
- * (PowerPoint's Edit Links dialog "Automatic" vs. "Manual" radio buttons).
3116
- * Only meaningful when {@link isLinked} is `true`. The schema default is
3117
- * `false`; `undefined` means the source authored no explicit value.
3118
- */
3119
- oleUpdateAutomatic?: boolean;
3120
- /**
3121
- * Set by the in-viewer OLE content editors (`ole-edit-api.ts`) whenever
3122
- * `oleEmbeddedData` and/or `previewImageData` have been changed in memory
3123
- * and still need to be written back into the saved package. Never
3124
- * authored from a parsed file; purely an in-memory save signal, mirroring
3125
- * `PptxSlide.isDirty`. The save writer clears it once the pending write
3126
- * has been queued.
3127
- */
3128
- oleContentDirty?: boolean;
3129
- /** Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`. */
3130
- altText?: string;
3131
- /** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
3132
- title?: string;
3133
- /** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
3134
- extensionXml?: PptxGraphicFrameExtension[];
3135
- }
3136
- /**
3137
- * An audio or video media element.
3138
- *
3139
- * Media elements reference files inside the PPTX archive
3140
- * (`mediaPath`) and may include trim points, poster frames, and
3141
- * playback settings for presentation mode.
3142
- *
3143
- * @example
3144
- * ```ts
3145
- * const video: MediaPptxElement = {
3146
- * type: "media",
3147
- * id: "vid_1", x: 50, y: 100, width: 640, height: 360,
3148
- * mediaType: "video",
3149
- * mediaPath: "ppt/media/media1.mp4",
3150
- * autoPlay: true,
3151
- * volume: 0.8,
3152
- * };
3153
- * // => satisfies MediaPptxElement
3154
- * ```
3155
- */
3156
- interface MediaPptxElement extends PptxElementBase {
3157
- type: 'media';
3158
- mediaType?: PptxMediaType;
3159
- mediaPath?: string;
3160
- mediaData?: string;
3161
- mediaMimeType?: string;
3162
- mediaReferenceKind?: PptxMediaReferenceKind;
3163
- mediaReferenceName?: string;
3164
- /** Explicit DrawingML `audioFile/@contentType` value when present. */
3165
- mediaReferenceContentType?: string;
3166
- audioCdStart?: PptxAudioCdPosition;
3167
- audioCdEnd?: PptxAudioCdPosition;
3168
- rawMediaReferenceXml?: XmlObject;
3169
- /** Trim start in milliseconds (from p:cMediaNode p:cTn @st). */
3170
- trimStartMs?: number;
3171
- /** Trim end in milliseconds (from p:cMediaNode p:cTn @end). */
3172
- trimEndMs?: number;
3173
- /** Path to the poster/preview image inside the ZIP. */
3174
- posterFramePath?: string;
3175
- /** Base64 data-URL for the poster frame image. */
3176
- posterFrameData?: string;
3177
- /** Poster source crop from the left edge as a 0..1 fraction. */
3178
- cropLeft?: number;
3179
- /** Poster source crop from the top edge as a 0..1 fraction. */
3180
- cropTop?: number;
3181
- /** Poster source crop from the right edge as a 0..1 fraction. */
3182
- cropRight?: number;
3183
- /** Poster source crop from the bottom edge as a 0..1 fraction. */
3184
- cropBottom?: number;
3185
- /** Poster stretch-target inset from the left frame edge. */
3186
- fillRectLeft?: number;
3187
- /** Poster stretch-target inset from the top frame edge. */
3188
- fillRectTop?: number;
3189
- /** Poster stretch-target inset from the right frame edge. */
3190
- fillRectRight?: number;
3191
- /** Poster stretch-target inset from the bottom frame edge. */
3192
- fillRectBottom?: number;
3193
- /** Whether media should play full-screen during presentation. */
3194
- fullScreen?: boolean;
3195
- /** Whether media should loop continuously. */
3196
- loop?: boolean;
3197
- /** Fade-in duration in seconds. */
3198
- fadeInDuration?: number;
3199
- /** Fade-out duration in seconds. */
3200
- fadeOutDuration?: number;
3201
- /** Playback volume (0 to 1). */
3202
- volume?: number;
3203
- /** Whether media auto-plays on slide entry. */
3204
- autoPlay?: boolean;
3205
- /** Whether audio continues playing across slide transitions (presentation mode). */
3206
- playAcrossSlides?: boolean;
3207
- /** Hide the element when media is not actively playing. */
3208
- hideWhenNotPlaying?: boolean;
3209
- /** Named time bookmarks within the clip. */
3210
- bookmarks?: MediaBookmark[];
3211
- /** Playback speed multiplier (1 = normal, 2 = double, 0.5 = half). */
3212
- playbackSpeed?: number;
3213
- /** Runtime-extracted metadata (duration, resolution, codec). */
3214
- metadata?: MediaMetadata;
3215
- /** Closed caption / subtitle tracks. */
3216
- captionTracks?: MediaCaptionTrack[];
3217
- /** Whether the media source is missing/broken (file not found in archive). */
3218
- mediaMissing?: boolean;
3219
- /**
3220
- * Whether the media is linked (external `r:link`) rather than embedded
3221
- * (`r:embed`). Defaults to embedded when undefined.
3222
- */
3223
- isLinked?: boolean;
3224
- /**
3225
- * Accessibility description. Read from `p:nvGraphicFramePr/p:cNvPr/@descr`
3226
- * for the `p:graphicFrame`-shaped (SDK-created) media form, or from
3227
- * `p:nvPicPr/p:cNvPr/@descr` for the `p:pic`-shaped media form (real
3228
- * PowerPoint's usual authoring shape for a video/audio placeholder); see
3229
- * `PptxHandlerRuntimePictureParsing.ts`.
3230
- */
3231
- altText?: string;
3232
- /** Accessibility title, from the same `@title` attribute on whichever `p:cNvPr` the media form uses. Same scope note as {@link altText}. */
3233
- title?: string;
3234
- /** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
3235
- extensionXml?: PptxGraphicFrameExtension[];
3236
- }
3237
- /**
3238
- * A group container that holds child elements.
3239
- *
3240
- * Children inherit the group’s transform, so moving/resizing the group
3241
- * affects all children proportionally.
3242
- *
3243
- * @example
3244
- * ```ts
3245
- * const group: GroupPptxElement = {
3246
- * type: "group",
3247
- * id: "grp_1", x: 0, y: 0, width: 960, height: 540,
3248
- * children: [textEl, shapeEl],
3249
- * };
3250
- * // => satisfies GroupPptxElement
3251
- * ```
3252
- */
3253
- interface GroupPptxElement extends PptxElementBase {
3254
- type: 'group';
3255
- /** Child elements contained within this group. */
3256
- children: PptxElement[];
3257
- /** Fill style extracted from the group's `p:grpSpPr`, used for `a:grpFill` inheritance. */
3258
- groupFill?: ShapeStyle;
3259
- /**
3260
- * The SAME `p:grpSpPr` extraction as {@link groupFill}, kept whenever the
3261
- * group carries a `p:grpSpPr` at all, regardless of whether it resolved to
3262
- * a paintable fill.
3263
- *
3264
- * `groupFill` is `undefined` unless the group has a real fill, because
3265
- * `getGroupChildParentFill`/`groupChildInheritedFill` (the `a:grpFill`
3266
- * inheritance chain) must keep chaining through an ancestor's fill when
3267
- * THIS group has none of its own. A group whose `p:grpSpPr` authors only
3268
- * `a:effectLst` (shadow/glow/soft-edge/reflection, no fill) needs those
3269
- * effects to still reach the renderer, so they are kept here under a name
3270
- * that carries no fill-inheritance meaning. Currently only reflection is
3271
- * read from it (`getComputedEffectStyle`); the rest of `a:effectLst` on a
3272
- * group remains unsupported.
3273
- */
3274
- groupEffectStyle?: ShapeStyle;
3275
- /**
3276
- * Exact EMU the group's own `a:chOff`/`a:chExt` (the coordinate space its
3277
- * CHILDREN are authored in) were parsed from, alongside {@link
3278
- * PptxElementBase.xEmu} etc for the group's own placement in its PARENT's
3279
- * space. `undefined` when the source carried no usable `a:chOff`/`a:chExt`
3280
- * (an SDK-created group, or one whose `a:xfrm` had no child-space data).
3281
- *
3282
- * Used by `group-xfrm-preservation.ts`'s `hasCapturedChildSpace` to decide
3283
- * whether this group's original `a:chOff`/`a:chExt` can be re-emitted
3284
- * verbatim (always true once captured, regardless of whether anything in
3285
- * the subtree has moved or resized - only its DIRECT children's
3286
- * `a:off`/`a:ext` are recomputed, via `invertChildIntoGroupSpace`, when
3287
- * something changed), instead of the normalized `chOff 0,0` / `chExt ==
3288
- * ext` space the writer falls back to when this is `undefined` (or
3289
- * degenerate). See `group-shape-geometry.ts`'s module doc for why a group
3290
- * needs two coordinate systems at all.
3291
- */
3292
- chOffXEmu?: number;
3293
- /** See {@link chOffXEmu}. */
3294
- chOffYEmu?: number;
3295
- /** See {@link chOffXEmu}. */
3296
- chExtWidthEmu?: number;
3297
- /** See {@link chOffXEmu}. */
3298
- chExtHeightEmu?: number;
3299
- }
3300
- /**
3301
- * A freehand ink / drawing stroke captured with a stylus or mouse.
3302
- *
3303
- * Ink strokes are stored as SVG path data strings. Each path may
3304
- * have independent colour, width, and opacity.
3305
- */
3306
- interface InkPptxElement extends PptxElementBase {
3307
- type: 'ink';
3308
- /** SVG path data for ink strokes. */
3309
- inkPaths: string[];
3310
- /** Per-path stroke colours. */
3311
- inkColors?: string[];
3312
- /** Per-path stroke widths. */
3313
- inkWidths?: number[];
3314
- /** Per-path opacities (0-1). */
3315
- inkOpacities?: number[];
3316
- /** Drawing tool used: pen, highlighter, or eraser. */
3317
- inkTool?: 'pen' | 'highlighter' | 'eraser';
3318
- /**
3319
- * Per-path arrays of per-point pressure values (0-1).
3320
- *
3321
- * Each entry corresponds to the path at the same index in `inkPaths`.
3322
- * Each inner array contains one pressure value per sampled point along
3323
- * the stroke. When present, the renderer uses these values to produce
3324
- * variable-width strokes that reflect stylus/pen pressure.
3325
- */
3326
- inkPointPressures?: number[][];
3327
- /**
3328
- * Per-path arrays of per-point pen-tilt lean direction (degrees, straight
3329
- * from `PointerEvent.tiltX` on supporting hardware).
3330
- *
3331
- * Each entry corresponds to the path at the same index in `inkPaths`, and
3332
- * is paired positionally with {@link inkPointTiltY}. Present only when at
3333
- * least one point in the stroke reported a genuinely non-zero tilt: a
3334
- * device that never reports tilt (a mouse, or a stylus with no tilt
3335
- * sensor) leaves both arrays absent, the same way `inkPointPressures` is
3336
- * omitted when pressure never varies. When present, the renderer converts
3337
- * the raw `(tiltX, tiltY)` vector into a lean angle + magnitude (see
3338
- * `pptx-viewer-shared`'s `tiltChannelsFromVectors`) and widens the stroke
3339
- * perpendicular to the lean direction, approximating a chisel-tip
3340
- * calligraphy nib.
3341
- */
3342
- inkPointTiltX?: number[][];
3343
- /** Per-path, per-point pen-tilt lean direction (degrees), paired with {@link inkPointTiltX}. */
3344
- inkPointTiltY?: number[][];
3345
- /** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
3346
- extensionXml?: PptxGraphicFrameExtension[];
3347
- }
3348
- /**
3349
- * A single ink stroke within a {@link ContentPartPptxElement}.
3350
- */
3351
- interface ContentPartInkStroke {
3352
- path: string;
3353
- color: string;
3354
- width: number;
3355
- opacity: number;
3356
- /**
3357
- * Per-point pressure values (0-1) for this stroke.
3358
- *
3359
- * When present, the renderer uses these values to produce
3360
- * variable-width strokes that reflect stylus/pen pressure.
3361
- */
3362
- pressures?: number[];
3363
- /**
3364
- * Per-point pen-tilt lean direction (radians), decoded from the source
3365
- * InkML's `OTx`/`OTy` tilt-offset channels or its `AZIMUTH` channel.
3366
- *
3367
- * When present (paired with {@link tiltMagnitudes}), the renderer widens
3368
- * each point perpendicular to the lean direction, approximating a
3369
- * calligraphic (chisel-tip) nib. Absent when the source declared no tilt
3370
- * channel, in which case rendering is unaffected.
3371
- */
3372
- tiltAngles?: number[];
3373
- /**
3374
- * Per-point pen-tilt strength (0 upright, 1 maximally leaned), paired with
3375
- * {@link tiltAngles}.
3376
- */
3377
- tiltMagnitudes?: number[];
3378
- /**
3379
- * Which InkML channel pair {@link tiltAngles}/{@link tiltMagnitudes} were
3380
- * decoded from: `'azimuthAltitude'` when the source declared `AZIMUTH`
3381
- * (optionally paired with `ALTITUDE`); omitted (implying `OTx`/`OTy`, i.e.
3382
- * `'vector'`) otherwise, including for tilt this library itself captured
3383
- * from the Draw tool's `PointerEvent.tiltX`/`tiltY`.
3384
- *
3385
- * A save that has to rewrite this content part's InkML (see
3386
- * `inkml-content-part-writer.ts`) uses this to re-declare the SAME channel
3387
- * pair the file already used, rather than always converting to `OTx`/`OTy`;
3388
- * the rendered lean is identical either way; only the written channel
3389
- * NAMES differ.
3390
- */
3391
- tiltEncoding?: 'vector' | 'azimuthAltitude';
3392
- /**
3393
- * Per-point timestamps (milliseconds), decoded from the source InkML
3394
- * trace's `T` channel when it declared one.
3395
- *
3396
- * Absent for the overwhelming majority of real decks: PowerPoint's own
3397
- * SaveAs output declares only `X`/`Y` and has no per-point time channel at
3398
- * all (see `contentpart-real-ink-roundtrip.test.ts`'s fixture), so this is
3399
- * populated only for InkML sources that genuinely author one (a captured
3400
- * digitizer session, OneNote, a Surface Hub export). When present, ink
3401
- * replay ("watch the ink get drawn") uses each stroke's own first/last
3402
- * timestamp to time its reveal instead of the fixed per-stroke cascade; see
3403
- * `pptx-viewer-shared`'s `render/ink-replay-timeline.ts`.
3404
- */
3405
- pointTimestamps?: number[];
3406
- }
3407
- /**
3408
- * A content-part element wrapped in `mc:AlternateContent`.
3409
- *
3410
- * Typically contains ink strokes from modern PowerPoint pen/highlighter.
3411
- */
3412
- interface ContentPartPptxElement extends PptxElementBase {
3413
- type: 'contentPart';
3414
- /** Ink strokes contained in this content part. */
3415
- inkStrokes?: ContentPartInkStroke[];
3416
- /** Package path of the related InkML part. */
3417
- inkPartPath?: string;
3418
- /** Parsed InkML root retained for unknown-node preservation on dirty save. */
3419
- inkPartRawXml?: XmlObject;
3420
- }
3421
- /**
3422
- * A Slide Zoom or Section Zoom element (PowerPoint Zoom Object).
3423
- *
3424
- * Zoom elements display a live thumbnail of the target slide and
3425
- * navigate to it on click during presentation mode.
3426
- *
3427
- * @example
3428
- * ```ts
3429
- * const zoom: ZoomPptxElement = {
3430
- * type: "zoom",
3431
- * id: "zm_1", x: 300, y: 200, width: 200, height: 120,
3432
- * zoomType: "slide",
3433
- * targetSlideIndex: 5,
3434
- * };
3435
- * // => satisfies ZoomPptxElement
3436
- * ```
3437
- */
3438
- interface ZoomPptxElement extends PptxElementBase, PptxImageProperties {
3439
- type: 'zoom';
3440
- /** Type of zoom: slide-level, section-level, or a multi-section summary. */
3441
- zoomType: 'slide' | 'section' | 'summary';
3442
- /** Zero-based index of the target slide. */
3443
- targetSlideIndex: number;
3444
- /** Section ID for section zoom. */
3445
- targetSectionId?: string;
3446
- /** Ordered section tiles in a Summary Zoom container. */
3447
- summaryTargets?: SummaryZoomTarget[];
3448
- /** Layout mode authored on the Summary Zoom container. */
3449
- summaryLayout?: 'grid' | 'fixed';
3450
- /**
3451
- * `zmPr/@returnToParent` (MS-PPTX `CT_ZoomObjectProperties`, shared by all
3452
- * three Zoom kinds): whether continuing forward from the destination slide
3453
- * during a live show returns to this Zoom's origin slide instead of
3454
- * advancing linearly through the deck. The schema declares `<xsd:attribute
3455
- * name="returnToParent" type="xsd:boolean" use="optional" default="true"/>`,
3456
- * so an ABSENT attribute means `true`, not `false`. This codebase still
3457
- * leaves the field `undefined` (rather than fabricating `true`) when the
3458
- * source XML omits it, so a round-trip never invents an attribute the
3459
- * source never had; a CONSUMER of this field (playback, e.g.
3460
- * `pptx-viewer-shared`'s `resolveZoomNavigationTarget`) must read
3461
- * `returnToParent !== false`, not `Boolean(returnToParent)`, to get the
3462
- * spec-correct effective value. For `zoomType: 'summary'`, this mirrors the
3463
- * first tile's own value; see {@link SummaryZoomTarget.returnToParent} for
3464
- * the per-tile value.
3465
- */
3466
- returnToParent?: boolean;
3467
- /**
3468
- * `zmPr/@transitionDur` (MS-PPTX `CT_ZoomObjectProperties`): the
3469
- * zoom-transition length in milliseconds. PowerPoint's own writer emits a
3470
- * unitless decimal-millisecond value for every OOXML `ST_UniversalTimeOffset`
3471
- * this codebase has observed (see the media-trim/-fade parsers), so this
3472
- * follows the same convention rather than the full TIMEOFFSET grammar's
3473
- * unit suffixes. Undefined uses the destination slide's own transition.
3474
- * For `zoomType: 'summary'`, this mirrors the first tile's own value; see
3475
- * {@link SummaryZoomTarget.transitionDurationMs} for the per-tile value.
3476
- */
3477
- transitionDurationMs?: number;
3478
- }
3479
- /** A single section tile within a PowerPoint Summary Zoom container. */
3480
- interface SummaryZoomTarget extends PptxImageProperties {
3481
- sectionId: string;
3482
- targetSlideIndex: number;
3483
- x: number;
3484
- y: number;
3485
- width: number;
3486
- height: number;
3487
- title?: string;
3488
- description?: string;
3489
- offsetFactorX?: number;
3490
- offsetFactorY?: number;
3491
- scaleFactorX?: number;
3492
- scaleFactorY?: number;
3493
- /** This tile's own `zmPr/@returnToParent`; see {@link ZoomPptxElement.returnToParent}. */
3494
- returnToParent?: boolean;
3495
- /** This tile's own `zmPr/@transitionDur` in milliseconds; see {@link ZoomPptxElement.transitionDurationMs}. */
3496
- transitionDurationMs?: number;
3497
- rawXml?: XmlObject;
3498
- }
3499
- /**
3500
- * A 3D model object embedded via `p16:model3D` inside an
3501
- * `mc:AlternateContent` block (PowerPoint 365+).
3502
- *
3503
- * The element carries the path to the `.glb`/`.gltf` binary inside
3504
- * the ZIP and a poster/fallback image for rendering in viewers that
3505
- * do not support interactive 3D.
3506
- */
3507
- interface Model3DPptxElement extends PptxElementBase, PptxImageProperties {
3508
- type: 'model3d';
3509
- /** Path to the 3D model file inside the ZIP. */
3510
- modelPath?: string;
3511
- /** Base64 data URL of the 3D model binary. */
3512
- modelData?: string;
3513
- /** MIME type of the model (e.g. "model/gltf-binary"). */
3514
- modelMimeType?: string;
3515
- /** Poster/preview image shown when 3D rendering is unavailable. */
3516
- posterImage?: string;
3517
- /**
3518
- * Authored camera, model transform and lights (`am3d:camera`, `am3d:trans`,
3519
- * lights). Read-only view: the XML round-trips via `rawXml`.
3520
- */
3521
- scene?: Model3DSceneData;
3522
- /** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
3523
- extensionXml?: PptxGraphicFrameExtension[];
3524
- }
3525
- /** An element whose type is not recognised by the parser. */
3526
- interface UnknownPptxElement extends PptxElementBase {
3527
- type: 'unknown';
3528
- /** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
3529
- extensionXml?: PptxGraphicFrameExtension[];
3530
- }
3531
- /**
3532
- * A single element on a PPTX slide.
3533
- *
3534
- * This is a **discriminated union**: narrow on `element.type` to access
3535
- * variant-specific properties like `imageData` (image/picture), `pathData`
3536
- * (shape), or `textSegments` (text/shape).
3537
- */
3538
- type PptxElement = TextPptxElement | ShapePptxElement | ConnectorPptxElement | ImagePptxElement | PicturePptxElement | TablePptxElement | ChartPptxElement | SmartArtPptxElement | OlePptxElement | MediaPptxElement | GroupPptxElement | InkPptxElement | ContentPartPptxElement | ZoomPptxElement | Model3DPptxElement | UnknownPptxElement;
3539
- /**
3540
- * Discriminant values for the `type` field on {@link PptxElement}.
3541
- *
3542
- * DERIVED from the union on purpose. This alias used to be a hand-written list
3543
- * of string literals living in `types/common.ts`, and it drifted: two element
3544
- * types (`contentPart` and `model3d`) were added to {@link PptxElement} without
3545
- * being added to the list, so every consumer that keyed a registry or a switch
3546
- * off the alias was silently blind to ink content parts and 3D models while
3547
- * still type-checking. Deriving it makes that class of drift impossible, at the
3548
- * cost of nothing: the resolved type is identical.
3549
- *
3550
- * Narrow on this type to access variant-specific properties.
3551
- *
3552
- * @example
3553
- * ```ts
3554
- * function isImage(el: PptxElement): el is ImagePptxElement {
3555
- * return el.type === "image";
3556
- * }
3557
- * // => type guard narrowing PptxElement to ImagePptxElement
3558
- * ```
3559
- */
3560
- type PptxElementType = PptxElement['type'];
3561
- /** Elements that can contain text content (text boxes, shapes, and connectors). */
3562
- type PptxElementWithText = TextPptxElement | ShapePptxElement | ConnectorPptxElement;
3563
- /** Elements that carry shape styling (fill, stroke, geometry). */
3564
- type PptxElementWithShapeStyle = TextPptxElement | ShapePptxElement | ConnectorPptxElement | ImagePptxElement | PicturePptxElement;
3565
- /** Elements that hold raster image data. */
3566
- type PptxImageLikeElement = ImagePptxElement | PicturePptxElement;
3567
- export { PptxChartAxisNumFmt as $, PptxChartPageMargins as $t, Model3DLightData as A, PptxChartScatterStyle as At, ElementAction as B, PptxChartView3D as Bt, SmartArtPptxElement as C, PptxChartTextOutline as Cn, PptxChartLineStyle as Ct, UnknownPptxElement as D, PptxChartPictureFormat as Dn, PptxChartOfPieOptions as Dt, TextPptxElement as E, PptxChartDataPointPicture as En, PptxChartMarkerSymbol as Et, PlaceholderTextLevelStyle as F, PptxChartTrendline as Ft, MediaMetadata as G, PptxChartUserShape as Gt, PptxAction as H, PptxCxValueColorPosition as Ht, PptxElementBase as I, PptxChartTrendlineLabel as It, PptxMediaType as J, PptxChartUserShapeParagraph as Jt, PptxAudioCdPosition as K, PptxChartUserShapeGroupChild as Kt, PptxShapeProperties as L, PptxChartTrendlineType as Lt, Model3DTransformData as M, PptxChartShapeProps as Mt, Model3DVec3 as N, PptxChartStyle as Nt, ZoomPptxElement as O, PptxChartAxisLabelFormatting as On, PptxChartParentLabelLayout as Ot, PlaceholderDefaults as P, PptxChartTreemapOptions as Pt, PptxChartAxisFormatting as Q, PptxChartProtection as Qt, PptxTextProperties as R, PptxChartType as Rt, ShapePptxElement as S, PptxChartTextFill as Sn, PptxChartLegendTextStyle as St, TablePptxElement as T, parseChartFormatTargetKey as Tn, PptxChartMarker as Tt, MediaBookmark as U, PptxEmbeddedWorkbookData as Ut, ElementActionType as V, PptxChartWaterfallOptions as Vt, MediaCaptionTrack as W, PptxExternalData as Wt, PptxBubbleChartOptions as X, ResolvedChartStyleDefinition as Xt, PptxBar3DShape as Y, PptxChartTitleRun as Yt, PptxChart3DSurface as Z, ResolvedChartStyleEntry as Zt, PptxElementWithText as _, PptxChartFormatTarget as _n, PptxChartFilteredSeries as _t, GroupPptxElement as a, PptxChartPivotFormats as an, PptxChartDataLabel as at, PptxNonVisualDescription as b, PptxChartPatternFill as bn, PptxChartLayouts as bt, MediaPptxElement as c, PptxChartElementEffects as cn, PptxChartDataLabelsRange as ct, OlePptxElement as d, PptxChartElementFormats as dn, PptxChartDateCategories as dt, PptxChartPageSetup as en, PptxChartBandFmt as et, PicturePptxElement as f, PptxChartElementGlow as fn, PptxChartDisplayUnitsLabel as ft, PptxElementWithShapeStyle as g, PptxChartElementThreeD as gn, PptxChartErrValType as gt, PptxElementType as h, PptxChartElementText as hn, PptxChartErrBars as ht, ContentPartPptxElement as i, PptxChartPivotFormat as in, PptxChartData as it, Model3DSceneData as j, PptxChartSeries as jt, Model3DCamera as k, PptxChartTickMark as kn, PptxChartRegionMapOptions as kt, Model3DPptxElement as l, PptxChartElementFill as ln, PptxChartDataPoint as lt, PptxElement as m, PptxChartElementShadow as mn, PptxChartErrBarType as mt, ConnectorPptxElement as n, PptxChartPrintSettings as nn, PptxChartBoxWhiskerOptions as nt, ImagePptxElement as o, PptxChartBevel as on, PptxChartDataLabelOptions as ot, PptxAccessibilityProperties as p, PptxChartElementLine as pn, PptxChartErrBarDir as pt, PptxMediaReferenceKind as q, PptxChartUserShapeGroupTransform as qt, ContentPartInkStroke as r, PptxChartPivotSource as rn, PptxChartChrome as rt, InkPptxElement as s, PptxChartBevelType as sn, PptxChartDataLabelPosition as st, ChartPptxElement as t, PptxChartPrintHeaderFooter as tn, PptxChartBarDirection as tt, OleObjectType as u, PptxChartElementFormat as un, PptxChartDataTable as ut, PptxGraphicFrameExtension as v, PptxChartFormatTargetKey as vn, PptxChartGradientFill as vt, SummaryZoomTarget as w, chartFormatTargetKey as wn, PptxChartManualLayout as wt, PptxPictureNonVisualProperties as x, PptxChartPictureFill as xn, PptxChartLegendEntry as xt, PptxImageLikeElement as y, PptxChartLineEndType as yn, PptxChartHistogramOptions as yt, ActionButtonPreset as z, PptxChartUpDownBars as zt };
3568
- //# sourceMappingURL=elements-CValElsy.d.ts.map