@shbernal/ts-pptx 0.0.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 (81) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +238 -0
  3. package/dist/autopage-tmfjRzL4.js +420 -0
  4. package/dist/autopage-tmfjRzL4.js.map +1 -0
  5. package/dist/browser.d.ts +23 -0
  6. package/dist/browser.d.ts.map +1 -0
  7. package/dist/browser.js +103 -0
  8. package/dist/browser.js.map +1 -0
  9. package/dist/diagnostics-DYQC7xLV.js +0 -0
  10. package/dist/diagnostics-DYQC7xLV.js.map +1 -0
  11. package/dist/diagnostics-DzY9Tyfm.d.ts +693 -0
  12. package/dist/diagnostics-DzY9Tyfm.d.ts.map +1 -0
  13. package/dist/embedded-fonts-MaynAHa9.js +94 -0
  14. package/dist/embedded-fonts-MaynAHa9.js.map +1 -0
  15. package/dist/enums-D3aF4QGb.d.ts +452 -0
  16. package/dist/enums-D3aF4QGb.d.ts.map +1 -0
  17. package/dist/errors-DGE9zh3U.js +93 -0
  18. package/dist/errors-DGE9zh3U.js.map +1 -0
  19. package/dist/errors-DRLpOpgQ.d.ts +160 -0
  20. package/dist/errors-DRLpOpgQ.d.ts.map +1 -0
  21. package/dist/fit-CbxyHN69.js +0 -0
  22. package/dist/fit-CbxyHN69.js.map +1 -0
  23. package/dist/html-dom-wVa3TiG7.js +666 -0
  24. package/dist/html-dom-wVa3TiG7.js.map +1 -0
  25. package/dist/html.d.ts +26 -0
  26. package/dist/html.d.ts.map +1 -0
  27. package/dist/html.js +60 -0
  28. package/dist/html.js.map +1 -0
  29. package/dist/image-size-C5Z1sKof.js +252 -0
  30. package/dist/image-size-C5Z1sKof.js.map +1 -0
  31. package/dist/index.d.ts +24 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +75 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/inspect.d.ts +173 -0
  36. package/dist/inspect.d.ts.map +1 -0
  37. package/dist/inspect.js +285 -0
  38. package/dist/inspect.js.map +1 -0
  39. package/dist/math.d.ts +37 -0
  40. package/dist/math.d.ts.map +1 -0
  41. package/dist/math.js +106 -0
  42. package/dist/math.js.map +1 -0
  43. package/dist/measure.d.ts +223 -0
  44. package/dist/measure.d.ts.map +1 -0
  45. package/dist/measure.js +3 -0
  46. package/dist/node.d.ts +12 -0
  47. package/dist/node.d.ts.map +1 -0
  48. package/dist/node.js +60 -0
  49. package/dist/node.js.map +1 -0
  50. package/dist/package-CaOLXSNi.d.ts +193 -0
  51. package/dist/package-CaOLXSNi.d.ts.map +1 -0
  52. package/dist/pres-5x1bjCzk.d.ts +202 -0
  53. package/dist/pres-5x1bjCzk.d.ts.map +1 -0
  54. package/dist/presentation-B0JWdTN1.js +4286 -0
  55. package/dist/presentation-B0JWdTN1.js.map +1 -0
  56. package/dist/presentation-RGOiun5P.d.ts +3249 -0
  57. package/dist/presentation-RGOiun5P.d.ts.map +1 -0
  58. package/dist/presentation-types-BVw0EknS.d.ts +538 -0
  59. package/dist/presentation-types-BVw0EknS.d.ts.map +1 -0
  60. package/dist/read.d.ts +73 -0
  61. package/dist/read.d.ts.map +1 -0
  62. package/dist/read.js +4 -0
  63. package/dist/script.d.ts +553 -0
  64. package/dist/script.d.ts.map +1 -0
  65. package/dist/script.js +0 -0
  66. package/dist/script.js.map +1 -0
  67. package/dist/shapes-BZU8UTW2.js +5365 -0
  68. package/dist/shapes-BZU8UTW2.js.map +1 -0
  69. package/dist/slide-B6mDaM-P.d.ts +3396 -0
  70. package/dist/slide-B6mDaM-P.d.ts.map +1 -0
  71. package/dist/text-WRUbOy2r.js +11238 -0
  72. package/dist/text-WRUbOy2r.js.map +1 -0
  73. package/dist/units-B-JUKwCS.js +144 -0
  74. package/dist/units-B-JUKwCS.js.map +1 -0
  75. package/dist/units-internal-7JcMfYti.js +723 -0
  76. package/dist/units-internal-7JcMfYti.js.map +1 -0
  77. package/dist/zip.d.ts +68 -0
  78. package/dist/zip.d.ts.map +1 -0
  79. package/dist/zip.js +163 -0
  80. package/dist/zip.js.map +1 -0
  81. package/package.json +214 -0
@@ -0,0 +1,3396 @@
1
+ import { _ as TextAnchor, f as SHAPE_NAME, g as TableStyle, h as SlideObjectType, i as CHART_NAME, l as PLACEHOLDER_TYPE, t as AlignH } from "./enums-D3aF4QGb.js";
2
+ //#region src/types/text.d.ts
3
+ interface TextBaseProps {
4
+ /**
5
+ * Horizontal alignment
6
+ * @default 'left'
7
+ */
8
+ align?: HAlign;
9
+ /**
10
+ * Bold style
11
+ * @default false
12
+ */
13
+ bold?: boolean;
14
+ /**
15
+ * Add a line-break
16
+ * @default false
17
+ */
18
+ breakLine?: boolean;
19
+ /**
20
+ * Preset text warp / WordArt shape (`<a:bodyPr><a:prstTxWarp prst="..">`), which
21
+ * bends the text along a preset path (arch, circle, wave, …). The value is an
22
+ * OOXML `ST_TextShapeType` preset name.
23
+ * @example 'textArchUp' // bend text along an upward arch (e.g. a label following a ring/arc)
24
+ * @example 'textCircle'
25
+ */
26
+ textWarp?: string;
27
+ /**
28
+ * Add standard or custom bullet
29
+ * - use `true` for standard bullet
30
+ * - pass object options for custom bullet
31
+ * @default false
32
+ */
33
+ bullet?: boolean | {
34
+ /**
35
+ * Bullet type
36
+ * @default bullet
37
+ */
38
+ type?: 'bullet' | 'number';
39
+ /**
40
+ * Bullet character code (unicode)
41
+ * @example '25BA' // 'BLACK RIGHT-POINTING POINTER' (U+25BA)
42
+ */
43
+ characterCode?: string;
44
+ /**
45
+ * Bullet glyph font typeface (`<a:buFont/>`), e.g. for symbol-font bullets
46
+ * @example 'Wingdings' // render `characterCode` using the Wingdings font
47
+ */
48
+ fontFace?: string;
49
+ /**
50
+ * Bullet glyph size as a percentage of the run's text size (25–400)
51
+ * @default 100
52
+ * @example 80 // bullet glyph is 80% of the text size
53
+ */
54
+ size?: number;
55
+ /**
56
+ * Indentation (space between bullet and text) (points)
57
+ * @default 27 // DEF_BULLET_MARGIN
58
+ * @example 10 // Indents text 10 points from bullet
59
+ */
60
+ indent?: number;
61
+ /**
62
+ * Number type
63
+ * @example 'romanLcParenR' // roman numerals lower-case with paranthesis right
64
+ */
65
+ numberType?: 'alphaLcParenBoth' | 'alphaLcParenR' | 'alphaLcPeriod' | 'alphaUcParenBoth' | 'alphaUcParenR' | 'alphaUcPeriod' | 'arabicParenBoth' | 'arabicParenR' | 'arabicPeriod' | 'arabicPlain' | 'romanLcParenBoth' | 'romanLcParenR' | 'romanLcPeriod' | 'romanUcParenBoth' | 'romanUcParenR' | 'romanUcPeriod';
66
+ /**
67
+ * Number bullets start at
68
+ * @default 1
69
+ * @example 10 // numbered bullets start with 10
70
+ */
71
+ numberStartAt?: number;
72
+ /**
73
+ * Image to use as the bullet glyph ("picture bullet", `<a:buBlip>`)
74
+ * - supply an image `path` (filesystem/URL) or base64 `data` (same forms as `addImage()`)
75
+ * - raster formats (PNG/JPG/GIF) and SVG are supported; use `size` to scale relative to the text height
76
+ * - SVG bullets embed a PNG preview plus the SVG (the same dual-rel handling as `addImage()`)
77
+ * - takes precedence over `type`/`characterCode` when set
78
+ * @example image: { path: 'images/star.png' }
79
+ * @example image: { data: 'image/png;base64,iVBOR...' }
80
+ * @example image: { path: 'images/star.svg' }
81
+ */
82
+ image?: {
83
+ path?: string;
84
+ data?: string;
85
+ };
86
+ /**
87
+ * Relationship id assigned to a picture-bullet image (`<a:blip r:embed>`)
88
+ * - for SVG bullets this is the PNG-preview rel; the SVG rel is `_rIdSvg`
89
+ * @internal populated by `addText()`; do not set directly
90
+ */
91
+ _rId?: number;
92
+ /**
93
+ * Relationship id of the SVG image for an SVG picture bullet (`<asvg:svgBlip r:embed>`)
94
+ * @internal populated by `addText()`; do not set directly
95
+ */
96
+ _rIdSvg?: number;
97
+ /**
98
+ * Bullet glyph color (separate from the text run color)
99
+ * @example 'FF0000' // red bullet
100
+ */
101
+ color?: HexColor;
102
+ };
103
+ /**
104
+ * Text capitalization
105
+ * - `'all'` = ALL CAPS
106
+ * - `'small'` = Small Caps
107
+ * - `'none'` = no override (default)
108
+ * - PowerPoint: Font > Effects > All Caps / Small Caps
109
+ */
110
+ caps?: 'none' | 'small' | 'all';
111
+ /**
112
+ * Text color
113
+ * - `HexColor` or `ThemeColor`
114
+ * - MS-PPT > Format Shape > Text Options > Text Fill & Outline > Text Fill > Color
115
+ * @example 'FF0000' // hex color (red)
116
+ * @example SchemeColor.text1 // Theme color (Text1)
117
+ */
118
+ color?: Color;
119
+ /**
120
+ * Font face name
121
+ *
122
+ * Applied to the Latin (`<a:latin>`) and complex-script (`<a:cs>`) font slots, matching
123
+ * how PowerPoint writes a font picked from the UI. The East Asian slot (`<a:ea>`) is left
124
+ * to inherit from the theme unless `fontFaceEA` is set — forcing a Latin-only face into the
125
+ * East Asian slot duplicates/ghosts text in Office 365.
126
+ * @example 'Arial' // Arial font
127
+ */
128
+ fontFace?: string;
129
+ /**
130
+ * East Asian font face name (`<a:ea>` slot), used to render CJK (Chinese/Japanese/Korean) glyphs
131
+ *
132
+ * Set this when the East Asian font differs from `fontFace`. When omitted, `<a:ea>` inherits the
133
+ * theme East Asian font, which is what PowerPoint does for Latin fonts.
134
+ * @example '微軟正黑體' // render East Asian glyphs with Microsoft JhengHei
135
+ */
136
+ fontFaceEA?: string;
137
+ /**
138
+ * Font size
139
+ * @example 12 // Font size 12
140
+ */
141
+ fontSize?: number;
142
+ /**
143
+ * Text highlight color (hex format)
144
+ * @example 'FFFF00' // yellow
145
+ */
146
+ highlight?: HexColor;
147
+ /**
148
+ * italic style
149
+ * @default false
150
+ */
151
+ italic?: boolean;
152
+ /**
153
+ * language
154
+ * - ISO 639-1 standard language code
155
+ * @default 'en-US' // english US
156
+ * @example 'fr-CA' // french Canadian
157
+ */
158
+ lang?: string;
159
+ /**
160
+ * Add a soft line-break (shift+enter) before line text content
161
+ * @default false
162
+ */
163
+ softBreakBefore?: boolean;
164
+ /**
165
+ * tab stops
166
+ * - PowerPoint: Paragraph > Tabs > Tab stop position
167
+ * @example [{ position:1 }, { position:3 }] // Set first tab stop to 1 inch, set second tab stop to 3 inches
168
+ */
169
+ tabStops?: Array<{
170
+ position: number;
171
+ alignment?: 'l' | 'r' | 'ctr' | 'dec';
172
+ }>;
173
+ /**
174
+ * text direction
175
+ * `horz` = horizontal
176
+ * `vert` = rotate 90^
177
+ * `vert270` = rotate 270^
178
+ * `wordArtVert` = stacked
179
+ * @default 'horz'
180
+ */
181
+ textDirection?: 'horz' | 'vert' | 'vert270' | 'wordArtVert';
182
+ /**
183
+ * Transparency (percent)
184
+ * - MS-PPT > Format Shape > Text Options > Text Fill & Outline > Text Fill > Transparency
185
+ * - range: 0-100
186
+ * @default 0
187
+ */
188
+ transparency?: number;
189
+ /**
190
+ * underline properties
191
+ * - PowerPoint: Font > Color & Underline > Underline Style/Underline Color
192
+ * @default (none)
193
+ */
194
+ underline?: {
195
+ style?: 'dash' | 'dashHeavy' | 'dashLong' | 'dashLongHeavy' | 'dbl' | 'dotDash' | 'dotDashHeave' | 'dotDotDash' | 'dotDotDashHeavy' | 'dotted' | 'dottedHeavy' | 'heavy' | 'none' | 'sng' | 'wavy' | 'wavyDbl' | 'wavyHeavy';
196
+ color?: Color;
197
+ };
198
+ /**
199
+ * vertical alignment
200
+ * @default 'top'
201
+ */
202
+ valign?: VAlign;
203
+ }
204
+ interface TextGlowProps {
205
+ /**
206
+ * Border color (hex format)
207
+ * @example 'FF3399'
208
+ */
209
+ color?: HexColor;
210
+ /**
211
+ * opacity (0.0 - 1.0)
212
+ * @example 0.5
213
+ * 50% opaque
214
+ */
215
+ opacity?: number;
216
+ /**
217
+ * size (points)
218
+ */
219
+ size: number;
220
+ }
221
+ interface TextFitShrinkProps {
222
+ /**
223
+ * Shrink text on overflow (`<a:normAutofit>`)
224
+ */
225
+ type: 'shrink';
226
+ /**
227
+ * Font scale as a percent (0-100), mapped to `<a:normAutofit fontScale="..">`.
228
+ *
229
+ * PowerPoint normally calculates this dynamically when text overflows; set it
230
+ * explicitly to bake the scale into the generated file.
231
+ * @example 85 // render text at 85% of its nominal size
232
+ * @default undefined // attribute omitted (PowerPoint defaults to 100%)
233
+ */
234
+ fontScale?: number;
235
+ /**
236
+ * Line-space reduction as a percent (0-100), mapped to `<a:normAutofit lnSpcReduction="..">`.
237
+ * @example 20 // reduce line spacing by 20%
238
+ * @default undefined // attribute omitted (PowerPoint defaults to 0%)
239
+ */
240
+ lnSpcReduction?: number;
241
+ }
242
+ interface TextPropsOptions extends PositionProps, DataOrPathProps, TextBaseProps, ObjectNameProps {
243
+ _bodyProp?: {
244
+ align?: AlignH;
245
+ anchor?: TextAnchor;
246
+ lIns?: number;
247
+ rIns?: number;
248
+ tIns?: number;
249
+ bIns?: number;
250
+ numCol?: number;
251
+ spcCol?: number;
252
+ vert?: TextVertType;
253
+ wrap?: boolean;
254
+ prstTxWarp?: string;
255
+ };
256
+ _lineIdx?: number;
257
+ baseline?: number;
258
+ /**
259
+ * Character spacing
260
+ */
261
+ charSpacing?: number;
262
+ /**
263
+ * Number of text columns in the text body
264
+ * - PowerPoint: Format Shape > Shape Options > Size & Properties > Text Box > Columns > "Number"
265
+ * - range: 1-16
266
+ * @default 1
267
+ * @example 2 // flow text into two columns
268
+ */
269
+ columns?: number;
270
+ /**
271
+ * Spacing between text columns (points)
272
+ * - PowerPoint: Format Shape > Shape Options > Size & Properties > Text Box > Columns > "Spacing"
273
+ * - only applies when `columns` > 1
274
+ * @default 0
275
+ * @example 10 // 10pt gap between columns
276
+ */
277
+ columnSpacing?: number;
278
+ /**
279
+ * Text fit options
280
+ *
281
+ * MS-PPT > Format Shape > Shape Options > Text Box > "[unlabeled group]": [3 options below]
282
+ * - 'none' = Do not Autofit
283
+ * - 'shrink' = Shrink text on overflow
284
+ * - 'resize' = Resize shape to fit text
285
+ *
286
+ * **Measured fit:** if you register the box's font with
287
+ * {@link TsPptx.registerFontMetrics}, both `'shrink'` and `'resize'` are
288
+ * **measured at export time**, so the text renders correctly in headless renderers
289
+ * and on plain file-open (no edit/resize needed):
290
+ * - `'shrink'` computes the largest `fontScale` at which the wrapped text fits and
291
+ * bakes `<a:normAutofit fontScale=…/>`.
292
+ * - `'resize'` computes the height the text needs and bakes it into the shape's
293
+ * `a:ext/@cy` (adjusting `a:off/@y` per vertical anchor), the marker being
294
+ * `<a:spAutoFit/>`.
295
+ * Without registered metrics they fall back to the bare flag (`<a:normAutofit/>` /
296
+ * `<a:spAutoFit/>`, which only PowerPoint recomputes on edit) and warn once.
297
+ *
298
+ * **Note** Bare `'shrink'`/`'resize'` (no metrics) only take effect after editing
299
+ * text / resizing the shape; PowerPoint calculates the result then. The object form
300
+ * of `'shrink'` always bakes the explicit values you pass.
301
+ * @example 'shrink' // measured when metrics are registered; else bare <a:normAutofit/>
302
+ * @example 'resize' // measured when metrics are registered; else bare <a:spAutoFit/>
303
+ * @example { type: 'shrink', fontScale: 85, lnSpcReduction: 20 } // pre-shrink with explicit values
304
+ * @default "none"
305
+ */
306
+ fit?: 'none' | 'shrink' | 'resize' | TextFitShrinkProps;
307
+ /**
308
+ * Shape fill
309
+ * @example { color:'FF0000' } // hex color (red)
310
+ * @example { color:'0088CC', transparency:50 } // hex color, 50% transparent
311
+ * @example { color:SchemeColor.accent1 } // theme color Accent1
312
+ */
313
+ fill?: ShapeFillProps;
314
+ /**
315
+ * Flip shape horizontally?
316
+ * @default false
317
+ */
318
+ flipH?: boolean;
319
+ /**
320
+ * Flip shape vertical?
321
+ * @default false
322
+ */
323
+ flipV?: boolean;
324
+ glow?: TextGlowProps;
325
+ hyperlink?: HyperlinkProps;
326
+ indentLevel?: number;
327
+ isTextBox?: boolean;
328
+ line?: ShapeLineProps;
329
+ /**
330
+ * Line spacing (pt)
331
+ * - PowerPoint: Paragraph > Indents and Spacing > Line Spacing: > "Exactly"
332
+ * @example 28 // 28pt
333
+ */
334
+ lineSpacing?: number;
335
+ /**
336
+ * line spacing multiple (percent)
337
+ * - range: 0.0-9.99
338
+ * - PowerPoint: Paragraph > Indents and Spacing > Line Spacing: > "Multiple"
339
+ * @example 1.5 // 1.5X line spacing
340
+ */
341
+ lineSpacingMultiple?: number;
342
+ /**
343
+ * Margin (inches) — the text-frame internal margin/padding
344
+ * - PowerPoint: Format Shape > Shape Options > Size & Properties > Text Box > Left/Right/Top/Bottom margin (shown in inches)
345
+ * - array order is `[top, right, bottom, left]`
346
+ * - a value `>= 1` is honored as inches but warns once (it is likely a legacy points value; divide by 72)
347
+ * @default (unset) PowerPoint's "Normal" internal margin [0.05", 0.1", 0.05", 0.1"]
348
+ * @example 0 // Top/Right/Bottom/Left margin 0
349
+ * @example 0.1 // Top/Right/Bottom/Left margin 0.1 inch
350
+ * @example [0.05, 0.1, 0.05, 0.1] // top 0.05", right 0.1", bottom 0.05", left 0.1"
351
+ */
352
+ margin?: Margin;
353
+ outline?: {
354
+ color: Color;
355
+ size: number;
356
+ };
357
+ paraSpaceAfter?: number;
358
+ paraSpaceBefore?: number;
359
+ /**
360
+ * Placeholder type
361
+ * - when the value matches a placeholder defined on the slide layout/master, this text
362
+ * inherits that placeholder's position and formatting
363
+ * - otherwise the text shape is promoted to a standalone placeholder of this type, emitting
364
+ * a real `<p:ph type="...">`. Use `placeholder: 'title'` to give a slide an accessible
365
+ * title (PowerPoint's accessibility checker otherwise reports "Missing Slide Title")
366
+ * - values: 'title' | 'body' | et. al.
367
+ * @example 'title'
368
+ * @see https://learn.microsoft.com/en-us/office/vba/api/powerpoint.ppplaceholdertype
369
+ */
370
+ placeholder?: string;
371
+ /**
372
+ * Rounded rectangle radius (only for ShapeType.roundRect)
373
+ * - values: 0.0 to 1.0
374
+ * @default 0
375
+ */
376
+ rectRadius?: number;
377
+ /**
378
+ * Rotation (degrees)
379
+ * - range: -360 to 360
380
+ * @default 0
381
+ * @example 180 // rotate 180 degrees
382
+ */
383
+ rotate?: number;
384
+ /**
385
+ * Whether to enable right-to-left mode
386
+ * @default false
387
+ */
388
+ rtlMode?: boolean;
389
+ shadow?: ShadowProps;
390
+ shape?: SHAPE_NAME;
391
+ strike?: boolean | 'dblStrike' | 'sngStrike';
392
+ subscript?: boolean;
393
+ superscript?: boolean;
394
+ /**
395
+ * Vertical alignment
396
+ * @default middle
397
+ */
398
+ valign?: VAlign;
399
+ /**
400
+ * Advanced/legacy escape hatch for the full `ST_TextVerticalType` range (e.g. `eaVert`,
401
+ * `mongolianVert`, `wordArtVert`). Prefer {@link TextBaseProps.textDirection} for the common
402
+ * cases; both map to `a:bodyPr@vert`.
403
+ */
404
+ vert?: TextVertType;
405
+ /**
406
+ * Text wrap
407
+ * @default true
408
+ */
409
+ wrap?: boolean;
410
+ }
411
+ interface TextProps {
412
+ text?: string | number;
413
+ options?: TextPropsOptions;
414
+ /**
415
+ * Raw OMML (Office MathML) for a native, editable PowerPoint equation. By default it is emitted
416
+ * as its own centered display-math paragraph (`<a14:m><m:oMathPara><m:oMath>…`) and `text` is
417
+ * ignored; set `inline` to instead flow it as an equation run mid-paragraph. Accepts either the
418
+ * inner OMML (children of `<m:oMath>`), a full `<m:oMath>…</m:oMath>`, or a full
419
+ * `<m:oMathPara>…</m:oMathPara>`; the `m:` prefix is resolved by the wrapper, so the markup does
420
+ * not need its own namespace declarations.
421
+ * This is the raw-OMML entry point. To author from LaTeX or MathML, convert with
422
+ * `latexToOmml()` / `mathmlToOmml()` from the `@shbernal/ts-pptx/math` subpath.
423
+ * @example { math: '<m:r><m:t>x^2+1=y</m:t></m:r>' } // raw OMML
424
+ * @example import { latexToOmml } from '@shbernal/ts-pptx/math'; ({ math: latexToOmml('x^2+1=y') })
425
+ */
426
+ math?: string;
427
+ /**
428
+ * Emit this item's `math` equation *inline* — an `<a14:m><m:oMath>` run flowing mid-paragraph
429
+ * between the surrounding plain text runs — instead of as its own centered display-math
430
+ * paragraph. Has no effect unless `math` is set. Pair with the bare-`<m:oMath>` inline form of
431
+ * the equation: `latexToOmml(tex, { display: false })` or `mathmlToOmml(mathml)`.
432
+ * @example addText([{ text: 'where ' }, { math: latexToOmml('x^2+1=y', { display: false }), inline: true }, { text: ' holds' }])
433
+ */
434
+ inline?: boolean;
435
+ }
436
+ /**
437
+ * Options for layout-time text measurement ({@link TsPptx.measureText}).
438
+ * Inches for width, points for type/spacing — the consumer-facing units. The
439
+ * measured face must have metrics registered via {@link TsPptx.registerFontMetrics}
440
+ * (a named face without exact metrics uses a conservative heuristic; an unnamed
441
+ * theme-default face is unmeasurable).
442
+ */
443
+ interface MeasureTextOptions {
444
+ /** Available text width in inches (the box width minus L/R inset, unless `insetIn` is given). */
445
+ wIn: number;
446
+ /** Font size in points. */
447
+ fontSize: number;
448
+ /** Font family name, as used in `fontFace`. Required for an exact measure; an unnamed face is unmeasurable. */
449
+ fontFace?: string;
450
+ bold?: boolean;
451
+ italic?: boolean;
452
+ /** Character spacing in points. */
453
+ charSpacing?: number;
454
+ /** Exact line spacing in points (overrides `lineSpacingMultiple`). */
455
+ lineSpacing?: number;
456
+ /** Line spacing as a multiple of single (e.g. `1.5`). */
457
+ lineSpacingMultiple?: number;
458
+ /** Space before each paragraph, in points. */
459
+ paraSpaceBefore?: number;
460
+ /** Space after each paragraph, in points. */
461
+ paraSpaceAfter?: number;
462
+ /** L/R text inset in inches; when set, subtracted from `wIn` on both sides (pass a raw box width). */
463
+ insetIn?: number;
464
+ }
465
+ /**
466
+ * Result of {@link TsPptx.measureText}. Heights err **tall** (conservative) —
467
+ * they match the value the export-time autofit bake uses, so the laid-out height is
468
+ * ≥ what PowerPoint/LibreOffice render. Use it to grow a container; for an overflow
469
+ * check it may slightly over-report (good for a warning, not a hard gate).
470
+ */
471
+ interface TextMeasurement {
472
+ /** Laid-out height in inches at the given `fontSize` (conservative/tall). */
473
+ heightIn: number;
474
+ /** Number of wrapped lines (conservative — the model wraps marginally early). */
475
+ lineCount: number;
476
+ /**
477
+ * Width in inches of the widest laid-out line (conservative — the model wraps
478
+ * marginally early, so this errs slightly wide). With an unconstrained `wIn` it
479
+ * is the natural single-line width; constrained, it is the widest wrapped line.
480
+ * A box set to this width will not re-wrap the text.
481
+ */
482
+ widestLineIn: number;
483
+ /** `false` only for an unnamed theme-default face that could not be measured. */
484
+ measurable: boolean;
485
+ /**
486
+ * The **named** faces laid out with the conservative average-advance heuristic
487
+ * instead of their real metrics — i.e. faces with no registered metrics. Empty
488
+ * when every run was measured exactly (and for an unmeasurable result, which
489
+ * guessed nothing). The numbers stay conservative (they err tall/wide), but a
490
+ * non-empty list means they are an approximation, not a measurement; register
491
+ * the face via {@link TsPptx.registerFontMetrics} for an exact result.
492
+ */
493
+ approximatedFaces: string[];
494
+ /** True if the text fits a box of inner height `hIn` (inches) at full size. */
495
+ fitsBox: (hIn: number) => boolean;
496
+ /** The `fontScale` (percent) that fits inner height `hIn`; `100` if it already fits, never below the shrink floor. */
497
+ shrinkScaleFor: (hIn: number) => number;
498
+ }
499
+ /** Options for {@link TsPptx.overflowsBox}: a measure plus the box inner height to test against. */
500
+ interface OverflowBoxOptions extends MeasureTextOptions {
501
+ /** Box inner height in inches to test for overflow. */
502
+ hIn: number;
503
+ }
504
+ /**
505
+ * One cell's computed rectangle from {@link TsPptx.tableLayout}. All values are
506
+ * inches; `x`/`y` are absolute (offset from the table's `x`/`y`). For a merged cell,
507
+ * `row`/`col` are the top-left origin and `wIn`/`hIn` cover the whole span; the
508
+ * cells it covers are not emitted separately.
509
+ */
510
+ interface TableCellLayout {
511
+ /** Zero-based grid row of the cell's top-left origin. */
512
+ row: number;
513
+ /** Zero-based grid column of the cell's top-left origin. */
514
+ col: number;
515
+ /** Number of rows the cell spans (1 if not merged). */
516
+ rowSpan: number;
517
+ /** Number of columns the cell spans (1 if not merged). */
518
+ colSpan: number;
519
+ /** Left edge in inches (absolute). */
520
+ xIn: number;
521
+ /** Top edge in inches (absolute). */
522
+ yIn: number;
523
+ /** Outer cell width in inches (sum of spanned column widths). */
524
+ wIn: number;
525
+ /** Outer cell height in inches (sum of spanned row heights). */
526
+ hIn: number;
527
+ /**
528
+ * `true` when `hIn`/`yIn` are pinned by an explicit `rowH` (array or scalar) or
529
+ * table `h`; `false` when the row is auto-height and the value is a conservative
530
+ * (tall) estimate from the same text model as {@link TsPptx.measureText}.
531
+ */
532
+ heightExact: boolean;
533
+ }
534
+ /**
535
+ * Result of {@link TsPptx.tableLayout}: per-cell geometry plus overall table
536
+ * bounds, for placing images/shapes over a table without rendering it. Geometry is
537
+ * for a single, un-paginated table laid out at `opts.x`/`y`/`w`; `autoPage` paging
538
+ * is not modeled. Widths are exact; auto-height row heights are conservative
539
+ * estimates (see {@link TableCellLayout.heightExact}).
540
+ */
541
+ interface TableLayoutResult {
542
+ /** One entry per non-merged origin cell, in row-major order. */
543
+ cells: TableCellLayout[];
544
+ /** Overall table width in inches (sum of column widths). */
545
+ widthIn: number;
546
+ /** Overall table height in inches (sum of row heights; may include estimates). */
547
+ heightIn: number;
548
+ /** `false` if any row height was estimated (the total errs tall, like `measureText`). */
549
+ heightExact: boolean;
550
+ }
551
+ /**
552
+ * Per-run options for a speaker-notes text run.
553
+ * A focused subset of `TextPropsOptions`: inline formatting plus an (external URL) hyperlink.
554
+ * Notes hyperlinks support `url` only; `slide` targets are not yet supported.
555
+ */
556
+ type NotesTextOptions = Pick<TextPropsOptions, 'hyperlink' | 'bold' | 'italic' | 'underline' | 'color' | 'fontSize' | 'fontFace'>;
557
+ /** A single speaker-notes text run: text plus optional inline formatting / hyperlink. */
558
+ interface NotesProps {
559
+ text: string;
560
+ options?: NotesTextOptions;
561
+ }
562
+ /**
563
+ * A review comment attached to a slide (legacy ISO/IEC 29500 §13 comment).
564
+ */
565
+ interface CommentProps {
566
+ /** Author display name (required). Comments sharing the same `author`+`initials` are grouped under one author entry. */
567
+ author: string;
568
+ /** Author initials shown in the comment marker. Defaults to letters derived from `author`. */
569
+ initials?: string;
570
+ /** Comment body text (required). */
571
+ text: string;
572
+ /** Comment marker X position in inches. @default 0.5 */
573
+ x?: number;
574
+ /** Comment marker Y position in inches. @default 0.5 */
575
+ y?: number;
576
+ /** Authored date/time as a `Date` or ISO-8601 string. Omitted from the XML when not provided. */
577
+ date?: Date | string;
578
+ }
579
+ /** Internal normalized comment stored on a slide (`_comments`). x/y are inches; `date` is ISO-8601 when present. */
580
+ interface SlideComment {
581
+ author: string;
582
+ initials: string;
583
+ text: string;
584
+ x: number;
585
+ y: number;
586
+ date?: string;
587
+ }
588
+ /** Resolved presentation-level comment author, emitted to `commentAuthors.xml`. */
589
+ interface ResolvedCommentAuthor {
590
+ id: number;
591
+ name: string;
592
+ initials: string;
593
+ lastIdx: number;
594
+ clrIdx: number;
595
+ }
596
+ /** Factory for a single inline text run. Prevents `as never` casts when building mixed-style run arrays. */
597
+ declare function textRun(text: string | number, options?: TextPropsOptions): TextProps;
598
+ /** Wraps a run array so TypeScript accepts it as `TextProps[]` without a cast. */
599
+ declare function textRuns(runs: TextProps[]): TextProps[];
600
+ //#endregion
601
+ //#region src/types/object.d.ts
602
+ interface PlaceholderProps extends PositionProps, TextBaseProps, ObjectNameProps {
603
+ name: string;
604
+ type: PLACEHOLDER_TYPE;
605
+ /**
606
+ * margin (inches) — text-frame internal margin; a value `>= 1` warns as a likely legacy points value
607
+ */
608
+ margin?: Margin;
609
+ /**
610
+ * Preset shape geometry for this placeholder (e.g. `'roundRect'`)
611
+ * @default 'rect'
612
+ */
613
+ shape?: SHAPE_NAME;
614
+ /**
615
+ * Rounded rectangle corner radius (inches) when `shape: 'roundRect'`
616
+ * - range: 0.0 to slide height/2
617
+ */
618
+ rectRadius?: number;
619
+ }
620
+ interface ObjectNameProps {
621
+ /**
622
+ * Object name
623
+ * - used instead of default "Object N" name
624
+ * - PowerPoint: Home > Arrange > Selection Pane...
625
+ * @default 'Object 1'
626
+ * @example 'Antenna Design 9'
627
+ */
628
+ objectName?: string;
629
+ /**
630
+ * Alt Text value ("How would you describe this object and its contents to someone who is blind?")
631
+ * - serialized to the generated object's `p:cNvPr` `descr` attribute
632
+ * - PowerPoint: [right-click on the object] > "Edit Alt Text..."
633
+ * @example 'Quarterly revenue bar chart'
634
+ */
635
+ altText?: string;
636
+ /**
637
+ * Object lock flags (DrawingML `a:spLocks` / `a:picLocks` / `a:graphicFrameLocks`)
638
+ * - restrict how the object can be manipulated in PowerPoint (e.g. prevent moving, resizing, or grouping)
639
+ * - each flag maps 1:1 to the OOXML attribute of the same name; only flags set to `true` are emitted
640
+ * - PowerPoint UI: Selection Pane / right-click protections (most locks are honored at edit time, not as a password)
641
+ * - flags only apply to the object types that support them (see each flag); flags set on an unsupported
642
+ * object type are ignored with a console warning
643
+ * @example { noMove: true, noResize: true } // pin an object in place
644
+ * @example { noGrp: true } // exclude from grouping
645
+ */
646
+ objectLock?: ObjectLockProps;
647
+ }
648
+ /**
649
+ * Object lock flags. Maps to DrawingML locking elements:
650
+ * - shapes / text boxes / placeholders → `a:spLocks`
651
+ * - images / media → `a:picLocks`
652
+ * - tables → `a:graphicFrameLocks`
653
+ *
654
+ * Each property mirrors the OOXML attribute name. A flag is only serialized for object types whose
655
+ * locking element defines it (noted per-flag); setting an unsupported flag logs a warning and is ignored.
656
+ */
657
+ interface ObjectLockProps {
658
+ /** Disallow grouping/ungrouping with other objects. (shapes, images, tables) */
659
+ noGrp?: boolean;
660
+ /** Disallow selecting the object. (shapes, images, tables) */
661
+ noSelect?: boolean;
662
+ /** Disallow moving the object. (shapes, images, tables) */
663
+ noMove?: boolean;
664
+ /** Disallow resizing the object. (shapes, images, tables) */
665
+ noResize?: boolean;
666
+ /** Disallow changing the aspect ratio. (shapes, images, tables) */
667
+ noChangeAspect?: boolean;
668
+ /** Disallow rotating the object. (shapes, images) */
669
+ noRot?: boolean;
670
+ /** Disallow editing the freeform/custom-geometry points. (shapes, images) */
671
+ noEditPoints?: boolean;
672
+ /** Disallow moving the shape's adjustment handles. (shapes, images) */
673
+ noAdjustHandles?: boolean;
674
+ /** Disallow changing arrowheads. (shapes, images) */
675
+ noChangeArrowheads?: boolean;
676
+ /** Disallow changing the shape type (preset geometry). (shapes, images) */
677
+ noChangeShapeType?: boolean;
678
+ /** Disallow editing the text body. (shapes / text boxes) */
679
+ noTextEdit?: boolean;
680
+ /** Disallow cropping the picture. (images) */
681
+ noCrop?: boolean;
682
+ /** Disallow drilling down into the graphical object (e.g. chart data). (tables) */
683
+ noDrilldown?: boolean;
684
+ }
685
+ //#endregion
686
+ //#region src/types/chart.d.ts
687
+ type ChartAxisTickMark = 'none' | 'inside' | 'outside' | 'cross';
688
+ /**
689
+ * Line end cap style. Maps to the OOXML `cap` attribute on `<a:ln>` (`flat`/`sq`/`rnd`).
690
+ */
691
+ type LineCap = 'flat' | 'round' | 'square';
692
+ type ChartLineDash = 'dash' | 'dashDot' | 'lgDash' | 'lgDashDot' | 'lgDashDotDot' | 'solid' | 'sysDash' | 'sysDot';
693
+ interface OptsChartData {
694
+ /**
695
+ * category labels
696
+ * @example ['Year 2000', 'Year 2010', 'Year 2020'] // single-level category axes labels
697
+ * @example [['Year 2000', 'Year 2010', 'Year 2020'], ['Decades', '', '']] // multi-level category axes labels
698
+ */
699
+ labels?: string[] | string[][];
700
+ /**
701
+ * series name
702
+ * @example 'Locations'
703
+ */
704
+ name?: string;
705
+ /**
706
+ * bubble sizes
707
+ * @example [5, 1, 5, 1]
708
+ */
709
+ sizes?: number[];
710
+ /**
711
+ * category values
712
+ * @example [2000, 2010, 2020]
713
+ */
714
+ values?: number[];
715
+ /**
716
+ * Custom text label per data point, replacing the auto-generated value label.
717
+ * Index aligns with `values[]`. Empty string or missing entries fall back to the chart-level label settings.
718
+ * Supported for BAR, LINE, AREA, RADAR, PIE, and DOUGHNUT chart types.
719
+ * @example ['Low', '', 'High'] // only points 0 and 2 get custom labels
720
+ */
721
+ customLabels?: string[];
722
+ /**
723
+ * Per-data-point visual overrides (border / fill), index-aligned with `values[]`.
724
+ * Empty (`{}`) or missing entries fall back to series/chart styling.
725
+ * Supported for BAR, LINE, AREA, SCATTER, PIE, and DOUGHNUT chart types.
726
+ * @example
727
+ * pointStyles: [
728
+ * { border: { width: 2, color: 'FF0000' } }, // point 0: red 2pt border
729
+ * {}, // point 1: default
730
+ * { fill: '00B050', border: { type: 'dash', color: '404040' } }, // point 2
731
+ * ]
732
+ */
733
+ pointStyles?: ChartDataPointStyle[];
734
+ /**
735
+ * Error bars for this series (`<c:errBars>`).
736
+ * - Supported for BAR, BAR3D, LINE, AREA, and SCATTER chart types (RADAR has no error bars in the schema).
737
+ * - Pass a single config, or an array to draw both X and Y error bars (SCATTER/AREA only; BAR/LINE use the first entry).
738
+ * @example { valueType: 'percentage', value: 5 } // ±5% error bars
739
+ * @example { valueType: 'fixedVal', value: 2, barType: 'plus', noEndCap: true }
740
+ * @example { valueType: 'cust', plusValues: [1, 2, 1], minusValues: [0.5, 1, 0.5] }
741
+ */
742
+ errorBars?: ChartErrorBarOptions | ChartErrorBarOptions[];
743
+ }
744
+ /**
745
+ * Per-data-point style override for a chart series.
746
+ * Each entry applies to the data point at the same index in `values[]`.
747
+ * Unset fields fall back to the series/chart-level styling.
748
+ */
749
+ interface ChartDataPointStyle {
750
+ /**
751
+ * Data-point border (line). Reuses {@link BorderProps}.
752
+ * - `type: 'none'` hides the border; `'dash'` draws a dashed border.
753
+ * @example { width: 2, color: 'FF0000' }
754
+ */
755
+ border?: BorderProps;
756
+ /**
757
+ * Data-point fill color (hex), overriding `chartColors[idx]`.
758
+ * Most meaningful on fill-based charts (BAR, AREA, PIE, DOUGHNUT).
759
+ * @example '00B050'
760
+ */
761
+ fill?: HexColor;
762
+ /**
763
+ * Data-point pattern fill (`<a:pattFill>`), e.g. diagonal hatching, for the
764
+ * BAR/BAR3D and SCATTER charts that emit per-point `c:dPt`. Takes precedence
765
+ * over `fill` (OOXML allows only one fill per data point).
766
+ *
767
+ * When `pattern.fgColor` is omitted it defaults to this point's resolved fill
768
+ * color (`fill` or the varied `chartColors[idx]`), giving a hatched version of
769
+ * the bar color; if no point color is resolvable it falls back to black.
770
+ * `pattern.bgColor` defaults to white.
771
+ * @example { preset: 'ltUpDiag' }
772
+ * @example { preset: 'diagCross', fgColor: 'C00000', bgColor: 'FFFFFF' }
773
+ */
774
+ pattern?: PatternFillProps;
775
+ }
776
+ /**
777
+ * Error-bar configuration for a chart series (`<c:errBars>`).
778
+ * Maps onto OOXML `CT_ErrBars` (errDir / errBarType / errValType / noEndCap / plus / minus / val).
779
+ */
780
+ interface ChartErrorBarOptions {
781
+ /**
782
+ * Axis the error bars measure along.
783
+ * - `'y'` (the value axis) for BAR/BAR3D/LINE/AREA; SCATTER may also use `'x'`.
784
+ * @default 'y'
785
+ */
786
+ direction?: 'x' | 'y';
787
+ /**
788
+ * Which sides of each marker draw a bar.
789
+ * @default 'both'
790
+ */
791
+ barType?: 'both' | 'minus' | 'plus';
792
+ /**
793
+ * How `value` (or `plusValues`/`minusValues`) is interpreted.
794
+ * - `'fixedVal'` — fixed amount in axis units
795
+ * - `'percentage'` — percent of each value (e.g. `value: 5` → ±5%)
796
+ * - `'stdDev'` — `value` standard deviations
797
+ * - `'stdErr'` — standard error (ignores `value`)
798
+ * - `'cust'` — explicit per-point amounts via `plusValues`/`minusValues`
799
+ * @default 'fixedVal'
800
+ */
801
+ valueType?: 'cust' | 'fixedVal' | 'percentage' | 'stdDev' | 'stdErr';
802
+ /**
803
+ * Magnitude for `'fixedVal'`, `'percentage'`, or `'stdDev'`. Ignored for `'stdErr'` and `'cust'`.
804
+ * @default 1
805
+ */
806
+ value?: number;
807
+ /** Per-point positive magnitudes; required when `valueType === 'cust'` (unless `barType: 'minus'`). Index-aligned with `values[]`. */
808
+ plusValues?: number[];
809
+ /** Per-point negative magnitudes; required when `valueType === 'cust'` (unless `barType: 'plus'`). Index-aligned with `values[]`. */
810
+ minusValues?: number[];
811
+ /**
812
+ * Hide the perpendicular end caps.
813
+ * @default false
814
+ */
815
+ noEndCap?: boolean;
816
+ /** Error-bar line color (hex, e.g. `'FF0000'`). */
817
+ color?: HexColor;
818
+ /** Error-bar line width (points). */
819
+ size?: number;
820
+ }
821
+ interface OptsChartGridLine {
822
+ /**
823
+ * MS-PPT > Chart format > Format Major Gridlines > Line > Cap type
824
+ * - line cap type
825
+ * @default flat
826
+ */
827
+ cap?: LineCap;
828
+ /**
829
+ * Gridline color
830
+ * - `HexColor` or `ThemeColor`
831
+ * @example 'FF3399'
832
+ * @example SchemeColor.accent1 // theme color Accent1
833
+ */
834
+ color?: Color;
835
+ /**
836
+ * Gridline size (points)
837
+ */
838
+ size?: number;
839
+ /**
840
+ * Gridline style
841
+ */
842
+ style?: 'solid' | 'dash' | 'dot' | 'none';
843
+ }
844
+ interface ChartMulti {
845
+ type: CHART_NAME;
846
+ data: OptsChartData[];
847
+ options: ChartOpts;
848
+ }
849
+ interface ChartPropsFillLine {
850
+ /**
851
+ * PowerPoint: Format Chart Area/Plot > Border ["Line"]
852
+ * @example border: {color: 'FF0000', width: 1} // hex RGB color, 1 pt line
853
+ */
854
+ border?: BorderProps;
855
+ /**
856
+ * PowerPoint: Format Chart Area/Plot Area > Fill
857
+ * @example fill: {color: '696969'} // hex RGB color value
858
+ * @example fill: {color: SchemeColor.background2} // Theme color value
859
+ * @example fill: {transparency: 50} // 50% transparency
860
+ */
861
+ fill?: ShapeFillProps;
862
+ }
863
+ interface ChartAreaProps extends ChartPropsFillLine {
864
+ /**
865
+ * Whether the chart area has rounded corners
866
+ * - only applies when either `fill` or `border` is used
867
+ * @default true
868
+ */
869
+ roundedCorners?: boolean;
870
+ }
871
+ interface ChartPropsBase {
872
+ /**
873
+ * Axis position
874
+ */
875
+ axisPos?: 'b' | 'l' | 'r' | 't';
876
+ chartColors?: HexColor[];
877
+ /**
878
+ * opacity (0 - 100)
879
+ * @example 50 // 50% opaque
880
+ */
881
+ chartColorsOpacity?: number;
882
+ dataBorder?: BorderProps;
883
+ displayBlanksAs?: 'gap' | 'span' | 'zero';
884
+ invertedColors?: HexColor[];
885
+ lang?: string;
886
+ layout?: PositionProps;
887
+ shadow?: ShadowProps;
888
+ /**
889
+ * Show each bubble's size value as a data label (bubble / bubble3D charts only).
890
+ * Has no effect on other chart types.
891
+ * @default false
892
+ */
893
+ showBubbleSize?: boolean;
894
+ /**
895
+ * Enable data labels, with a meaning that is **overloaded per plot type** — it is not a
896
+ * plain duplicate of {@link ChartPropsBase.showValue}:
897
+ * - pie / doughnut: shows the **category name** (`c:showCatName`);
898
+ * - scatter: shows **both** the value and the category name;
899
+ * - chartEx (waterfall/funnel/…): OR-combined with `showValue` to show the **value** label.
900
+ *
901
+ * For the common "show the numeric value" case on standard plots, prefer `showValue`.
902
+ * @default false
903
+ */
904
+ showLabel?: boolean;
905
+ showLeaderLines?: boolean;
906
+ /**
907
+ * Leader line color (pie/doughnut data labels). Requires `showLeaderLines: true`.
908
+ * When omitted, PowerPoint applies its automatic leader-line color.
909
+ * @example 'FF0000' // red leader lines
910
+ */
911
+ leaderLineColor?: HexColor;
912
+ /**
913
+ * Leader line width, in points (pie/doughnut data labels). Requires `showLeaderLines: true`.
914
+ * @default 0.75
915
+ * @example 1.5
916
+ */
917
+ leaderLineSize?: number;
918
+ /**
919
+ * @default false
920
+ */
921
+ showLegend?: boolean;
922
+ /**
923
+ * @default false
924
+ */
925
+ showPercent?: boolean;
926
+ /**
927
+ * @default false
928
+ */
929
+ showSerName?: boolean;
930
+ /**
931
+ * @default false
932
+ */
933
+ showTitle?: boolean;
934
+ /**
935
+ * @default false
936
+ */
937
+ showValue?: boolean;
938
+ /**
939
+ * 3D Perspecitve
940
+ * - range: 0-120
941
+ * @default 30
942
+ */
943
+ v3DPerspective?: number;
944
+ /**
945
+ * Right Angle Axes
946
+ * - Shows chart from first-person perspective
947
+ * - Overrides `v3DPerspective` when true
948
+ * - PowerPoint: Chart Options > 3-D Rotation
949
+ * @default false
950
+ */
951
+ v3DRAngAx?: boolean;
952
+ /**
953
+ * X Rotation
954
+ * - PowerPoint: Chart Options > 3-D Rotation
955
+ * - range: 0-359.9
956
+ * @default 30
957
+ */
958
+ v3DRotX?: number;
959
+ /**
960
+ * Y Rotation
961
+ * - range: 0-359.9
962
+ * @default 30
963
+ */
964
+ v3DRotY?: number;
965
+ /**
966
+ * PowerPoint: Format Chart Area (Fill & Border/Line)
967
+ */
968
+ chartArea?: ChartAreaProps;
969
+ /**
970
+ * PowerPoint: Format Plot Area (Fill & Border/Line)
971
+ */
972
+ plotArea?: ChartPropsFillLine;
973
+ /**
974
+ * Per-series style overrides.
975
+ * Element at index N applies to the series at data[N].
976
+ * Missing indices or unset fields fall back to the chart-level option.
977
+ */
978
+ seriesOptions?: ChartSeriesOpts[];
979
+ }
980
+ interface ChartPropsAxisCat {
981
+ /**
982
+ * Multi-Chart prop: array of cat axes
983
+ */
984
+ catAxes?: ChartPropsAxisCat[];
985
+ catAxisBaseTimeUnit?: string;
986
+ catAxisCrossesAt?: number | 'autoZero';
987
+ catAxisHidden?: boolean;
988
+ catAxisLabelColor?: string;
989
+ catAxisLabelFontBold?: boolean;
990
+ catAxisLabelFontFace?: string;
991
+ catAxisLabelFontItalic?: boolean;
992
+ catAxisLabelFontSize?: number;
993
+ /**
994
+ * Number format code for the category (X) axis labels on scatter and bubble charts.
995
+ * Falls back to `valAxisLabelFormatCode` when not set.
996
+ * - Example: `'0.00'`, `'#,##0'`, `'mmm yyyy'`
997
+ * - PowerPoint: Format Axis > Number > Format Code
998
+ */
999
+ catAxisLabelFormatCode?: string;
1000
+ catAxisLabelFrequency?: string;
1001
+ catAxisLabelPos?: 'none' | 'low' | 'high' | 'nextTo';
1002
+ catAxisLabelRotate?: number;
1003
+ catAxisLineColor?: string;
1004
+ catAxisLineShow?: boolean;
1005
+ catAxisLineSize?: number;
1006
+ catAxisLineStyle?: 'solid' | 'dash' | 'dot';
1007
+ catAxisMajorTickMark?: ChartAxisTickMark;
1008
+ catAxisMajorTimeUnit?: string;
1009
+ catAxisMajorUnit?: number;
1010
+ catAxisMaxVal?: number;
1011
+ catAxisMinorTickMark?: ChartAxisTickMark;
1012
+ catAxisMinorTimeUnit?: string;
1013
+ catAxisMinorUnit?: number;
1014
+ catAxisMinVal?: number;
1015
+ catAxisMultiLevelLabels?: boolean;
1016
+ catAxisOrientation?: 'minMax' | 'maxMin';
1017
+ catAxisTitle?: string;
1018
+ catAxisTitleColor?: string;
1019
+ catAxisTitleFontFace?: string;
1020
+ catAxisTitleFontSize?: number;
1021
+ catAxisTitleRotate?: number;
1022
+ catGridLine?: OptsChartGridLine;
1023
+ catLabelFormatCode?: string;
1024
+ /**
1025
+ * Whether data should use secondary category axis (instead of primary)
1026
+ * @default false
1027
+ */
1028
+ secondaryCatAxis?: boolean;
1029
+ showCatAxisTitle?: boolean;
1030
+ }
1031
+ interface ChartPropsAxisSer {
1032
+ serAxisBaseTimeUnit?: string;
1033
+ serAxisHidden?: boolean;
1034
+ serAxisLabelColor?: string;
1035
+ serAxisLabelFontBold?: boolean;
1036
+ serAxisLabelFontFace?: string;
1037
+ serAxisLabelFontItalic?: boolean;
1038
+ serAxisLabelFontSize?: number;
1039
+ serAxisLabelFrequency?: string;
1040
+ serAxisLabelPos?: 'none' | 'low' | 'high' | 'nextTo';
1041
+ serAxisLineColor?: string;
1042
+ serAxisLineShow?: boolean;
1043
+ serAxisMajorTimeUnit?: string;
1044
+ serAxisMajorUnit?: number;
1045
+ serAxisMinorTimeUnit?: string;
1046
+ serAxisMinorUnit?: number;
1047
+ serAxisOrientation?: string;
1048
+ serAxisTitle?: string;
1049
+ serAxisTitleColor?: string;
1050
+ serAxisTitleFontFace?: string;
1051
+ serAxisTitleFontSize?: number;
1052
+ serAxisTitleRotate?: number;
1053
+ serGridLine?: OptsChartGridLine;
1054
+ serLabelFormatCode?: string;
1055
+ showSerAxisTitle?: boolean;
1056
+ }
1057
+ interface ChartPropsAxisVal {
1058
+ /**
1059
+ * Whether data should use secondary value axis (instead of primary)
1060
+ * @default false
1061
+ */
1062
+ secondaryValAxis?: boolean;
1063
+ showValAxisTitle?: boolean;
1064
+ /**
1065
+ * Multi-Chart prop: array of val axes
1066
+ */
1067
+ valAxes?: ChartPropsAxisVal[];
1068
+ valAxisCrossesAt?: number | 'autoZero';
1069
+ /**
1070
+ * Controls where axis values are plotted relative to tick marks
1071
+ * - `'between'` = values plotted between tick marks (default for bar/column/line)
1072
+ * - `'midCat'` = values plotted on tick marks (default for scatter/area)
1073
+ * - PowerPoint: Format Axis > Axis Options > Axis crosses > On tick marks / Between tick marks
1074
+ */
1075
+ valAxisCrossBetween?: 'between' | 'midCat';
1076
+ valAxisDisplayUnit?: 'billions' | 'hundredMillions' | 'hundreds' | 'hundredThousands' | 'millions' | 'tenMillions' | 'tenThousands' | 'thousands' | 'trillions';
1077
+ valAxisDisplayUnitLabel?: boolean;
1078
+ valAxisHidden?: boolean;
1079
+ valAxisLabelColor?: string;
1080
+ valAxisLabelFontBold?: boolean;
1081
+ valAxisLabelFontFace?: string;
1082
+ valAxisLabelFontItalic?: boolean;
1083
+ valAxisLabelFontSize?: number;
1084
+ valAxisLabelFormatCode?: string;
1085
+ valAxisLabelPos?: 'none' | 'low' | 'high' | 'nextTo';
1086
+ valAxisLabelRotate?: number;
1087
+ valAxisLineColor?: string;
1088
+ valAxisLineShow?: boolean;
1089
+ valAxisLineSize?: number;
1090
+ valAxisLineStyle?: 'solid' | 'dash' | 'dot';
1091
+ /**
1092
+ * PowerPoint: Format Axis > Axis Options > Logarithmic scale - Base
1093
+ * - range: 2-99
1094
+ */
1095
+ valAxisLogScaleBase?: number;
1096
+ valAxisMajorTickMark?: ChartAxisTickMark;
1097
+ valAxisMajorUnit?: number;
1098
+ valAxisMaxVal?: number;
1099
+ valAxisMinorTickMark?: ChartAxisTickMark;
1100
+ valAxisMinVal?: number;
1101
+ valAxisOrientation?: 'minMax' | 'maxMin';
1102
+ valAxisTitle?: string;
1103
+ valAxisTitleColor?: string;
1104
+ valAxisTitleFontFace?: string;
1105
+ valAxisTitleFontSize?: number;
1106
+ valAxisTitleRotate?: number;
1107
+ valGridLine?: OptsChartGridLine;
1108
+ /**
1109
+ * Value label format code
1110
+ * - this also directs Data Table formatting
1111
+ * @example '#%' // round percent
1112
+ * @example '0.00%' // shows values as '0.00%'
1113
+ * @example '$0.00' // shows values as '$0.00'
1114
+ */
1115
+ valLabelFormatCode?: string;
1116
+ }
1117
+ interface ChartPropsChartBar {
1118
+ bar3DShape?: string;
1119
+ barDir?: string;
1120
+ barGapDepthPct?: number;
1121
+ /**
1122
+ * MS-PPT > Format chart > Format Data Point > Series Options > "Gap Width"
1123
+ * - width (percent)
1124
+ * - range: `0`-`500`
1125
+ * @default 150
1126
+ */
1127
+ barGapWidthPct?: number;
1128
+ barGrouping?: string;
1129
+ /**
1130
+ * MS-PPT > Format chart > Format Data Point > Series Options > "Series Overlap"
1131
+ * - overlap (percent)
1132
+ * - range: `-100`-`100`
1133
+ * @default 0
1134
+ */
1135
+ barOverlapPct?: number;
1136
+ /**
1137
+ * Draw connector lines between data points across stacked bar/column series
1138
+ * ("Series Lines" in PowerPoint). Emits `<c:serLines>` in the bar chart.
1139
+ *
1140
+ * - `true` uses PowerPoint's automatic line styling.
1141
+ * - An {@link OptsChartGridLine} object customizes color/size/style/cap.
1142
+ * - Omit (or pass an object with `style: 'none'`) to disable.
1143
+ *
1144
+ * Bar (`bar`) charts only; ignored for 3D bar charts.
1145
+ * @default undefined
1146
+ * @example true
1147
+ * @example { color: '777777', size: 1, style: 'dash' }
1148
+ */
1149
+ barSeriesLine?: boolean | OptsChartGridLine;
1150
+ }
1151
+ interface ChartPropsChartDoughnut {
1152
+ dataNoEffects?: boolean;
1153
+ holeSize?: number;
1154
+ }
1155
+ interface ChartPropsChartLine {
1156
+ /**
1157
+ * MS-PPT > Chart format > Format Data Series > Line > Cap type
1158
+ * - line cap type
1159
+ * @default flat
1160
+ */
1161
+ lineCap?: LineCap;
1162
+ /**
1163
+ * MS-PPT > Chart format > Format Data Series > Line > Dash type (chart-level default)
1164
+ * - applies to every series that has no entry in `lineDashValues`
1165
+ * @default solid
1166
+ */
1167
+ lineDash?: ChartLineDash;
1168
+ /**
1169
+ * Per-series dash type overrides; index matches the series order in the `data` array.
1170
+ * - entries shorter than the series count fall back to `lineDash`
1171
+ * - example: `['solid', 'dash', 'lgDash']` gives each series its own dash pattern
1172
+ */
1173
+ lineDashValues?: ChartLineDash[];
1174
+ /**
1175
+ * MS-PPT > Chart format > Format Data Series > Marker Options > Built-in > Type
1176
+ * - marker type
1177
+ * @default circle
1178
+ */
1179
+ lineDataSymbol?: 'circle' | 'dash' | 'diamond' | 'dot' | 'none' | 'square' | 'triangle';
1180
+ /**
1181
+ * MS-PPT > Chart format > Format Data Series > [Marker Options] > Border > Color
1182
+ * - border color
1183
+ * @default circle
1184
+ */
1185
+ lineDataSymbolLineColor?: string;
1186
+ /**
1187
+ * MS-PPT > Chart format > Format Data Series > [Marker Options] > Border > Width
1188
+ * - border width (points)
1189
+ * @default 0.75
1190
+ */
1191
+ lineDataSymbolLineSize?: number;
1192
+ /**
1193
+ * MS-PPT > Chart format > Format Data Series > Marker Options > Built-in > Size
1194
+ * - marker size
1195
+ * - range: 2-72
1196
+ * @default 6
1197
+ */
1198
+ lineDataSymbolSize?: number;
1199
+ /**
1200
+ * MS-PPT > Chart format > Format Data Series > Line > Width
1201
+ * - line width (points)
1202
+ * - range: 0-1584
1203
+ * @default 2
1204
+ */
1205
+ lineSize?: number;
1206
+ /**
1207
+ * MS-PPT > Chart format > Format Data Series > Line > Smoothed line
1208
+ * - "Smoothed line"
1209
+ * @default false
1210
+ */
1211
+ lineSmooth?: boolean;
1212
+ }
1213
+ interface ChartPropsChartPie {
1214
+ dataNoEffects?: boolean;
1215
+ /**
1216
+ * MS-PPT > Format chart > Format Data Series > Series Options > "Angle of first slice"
1217
+ * - angle (degrees)
1218
+ * - range: 0-359
1219
+ * @default 0
1220
+ */
1221
+ firstSliceAng?: number;
1222
+ }
1223
+ interface ChartPropsChartRadar {
1224
+ /**
1225
+ * Radar chart sub-type, named to match the PowerPoint UI ("Radar", "Radar with
1226
+ * Markers", "Filled Radar").
1227
+ * @default radar
1228
+ */
1229
+ radarStyle?: 'radar' | 'markers' | 'filled';
1230
+ }
1231
+ /**
1232
+ * Options for the modern (Office 2016) chartEx chart types.
1233
+ *
1234
+ * NOTE: chartEx charts (currently `waterfall`) render only in PowerPoint 2016+/Microsoft 365.
1235
+ * In older Office, Google Slides, Keynote and LibreOffice a fallback placeholder shows instead.
1236
+ */
1237
+ interface ChartPropsChartWaterfall {
1238
+ /**
1239
+ * Zero-based category indices to render as **subtotal/total** columns in a `waterfall` chart
1240
+ * (columns anchored to the axis baseline rather than floating from the running cumulative
1241
+ * value). Out-of-range or non-integer entries are dropped with a console warning.
1242
+ * @example [0, 4] // first and fifth categories are totals
1243
+ */
1244
+ subtotals?: number[];
1245
+ }
1246
+ /**
1247
+ * Bin configuration for a `histogram` chart. A histogram is fed **raw observations** (one series of
1248
+ * `values`, no `labels`); PowerPoint groups them into bins automatically. The only control wired
1249
+ * today is which side of each bin interval is closed.
1250
+ *
1251
+ * NOTE: explicit bin geometry (fixed bin width / bin count / overflow / underflow) is not yet
1252
+ * supported — PowerPoint desktop rejects the decks those settings produce, so they are deferred.
1253
+ */
1254
+ interface ChartExBinning {
1255
+ /** Which side of each bin interval is closed: `'r'` (right, the default) or `'l'` (left). */
1256
+ intervalClosed?: 'l' | 'r';
1257
+ }
1258
+ interface ChartPropsChartHistogram {
1259
+ /**
1260
+ * Bin configuration for a `histogram` chart. Omit for PowerPoint's automatic binning.
1261
+ * @example { intervalClosed: 'l' }
1262
+ */
1263
+ binning?: ChartExBinning;
1264
+ }
1265
+ /**
1266
+ * Statistics configuration for a `boxWhisker` (box-and-whisker) chart. Each value series is
1267
+ * summarized into a box (quartiles + median) with whiskers; these flags mirror the toggles
1268
+ * PowerPoint exposes in the *Format Data Series* pane. All fields are optional and default to
1269
+ * PowerPoint's own defaults (inclusive of the outlier points and the mean marker).
1270
+ */
1271
+ interface ChartExStatistics {
1272
+ /**
1273
+ * How the first/third quartiles are computed: `'exclusive'` (PowerPoint's default — the median
1274
+ * is excluded when splitting the halves) or `'inclusive'`.
1275
+ */
1276
+ quartileMethod?: 'inclusive' | 'exclusive';
1277
+ /** Draw a line connecting the mean of each box across categories. Default `false`. */
1278
+ meanLine?: boolean;
1279
+ /** Mark the mean of each box with a marker. Default `true`. */
1280
+ meanMarker?: boolean;
1281
+ /** Plot outlier points (values beyond the whiskers) individually. Default `true`. */
1282
+ outliers?: boolean;
1283
+ /** Plot every non-outlier point alongside the box, not just the box itself. Default `false`. */
1284
+ nonoutliers?: boolean;
1285
+ }
1286
+ interface ChartPropsChartBoxWhisker {
1287
+ /**
1288
+ * Statistics configuration for a `boxWhisker` chart. Omit for PowerPoint's defaults
1289
+ * (exclusive quartiles, mean marker shown, outliers shown).
1290
+ * @example { quartileMethod: 'inclusive', meanLine: true }
1291
+ */
1292
+ statistics?: ChartExStatistics;
1293
+ }
1294
+ /**
1295
+ * Geography configuration for a `regionMap` (filled-map) chart. A region map colors each geographic
1296
+ * area by its value; the category labels are region names (countries, states, provinces, …) that
1297
+ * PowerPoint resolves against its Bing-backed geography database when the deck is opened.
1298
+ *
1299
+ * These fields tell PowerPoint how to interpret ambiguous region names (e.g. "Georgia" the country
1300
+ * vs. the US state). They do NOT change what ts-pptx writes beyond the `<cx:geography>` hint —
1301
+ * the actual map is resolved and rendered by PowerPoint 2016+/Microsoft 365 at open time, so the
1302
+ * region names must match PowerPoint's geography database or the map renders blank.
1303
+ */
1304
+ interface ChartExGeography {
1305
+ /** BCP-47 language used to interpret the region names, e.g. `'en-US'` (the default). */
1306
+ cultureLanguage?: string;
1307
+ /** ISO region the names are scoped to, e.g. `'US'` (the default) or `'FR'`. */
1308
+ cultureRegion?: string;
1309
+ }
1310
+ interface ChartPropsChartRegionMap {
1311
+ /**
1312
+ * Geography configuration for a `regionMap` chart. Omit for PowerPoint's defaults
1313
+ * (`cultureLanguage: 'en-US'`, `cultureRegion: 'US'`).
1314
+ * @example { cultureLanguage: 'en-US', cultureRegion: 'FR' }
1315
+ */
1316
+ geography?: ChartExGeography;
1317
+ }
1318
+ interface ChartPropsChartStock {
1319
+ /**
1320
+ * Stock (high-low-close) chart style — selects how many value series the chart expects and how
1321
+ * they are drawn. The data series must be supplied in the exact order implied by the style:
1322
+ * - `'hlc'` — High, Low, Close (3 series). The close is marked with a dot.
1323
+ * - `'ohlc'` — Open, High, Low, Close (4 series). Open→close is drawn as up/down bars.
1324
+ * - `'vhlc'` — Volume, High, Low, Close (4 series). Volume is a column on its own axis.
1325
+ * - `'vohlc'` — Volume, Open, High, Low, Close (5 series). Volume column + up/down bars.
1326
+ *
1327
+ * `<c:hiLowLines>` connect the high/low of each category in every style.
1328
+ * @default 'hlc'
1329
+ */
1330
+ stockStyle?: 'hlc' | 'ohlc' | 'vhlc' | 'vohlc';
1331
+ }
1332
+ interface ChartPropsChartSurface {
1333
+ /**
1334
+ * Draw a 3-D surface (`<c:surface3DChart>`) rather than a 2-D contour / top view
1335
+ * (`<c:surfaceChart>`). The 3-D surface tilts the scene; the contour looks straight down.
1336
+ * @default true
1337
+ */
1338
+ surface3D?: boolean;
1339
+ /**
1340
+ * Draw the surface as a wireframe mesh (`<c:wireframe val="1"/>`) instead of a filled sheet.
1341
+ * Applies to both the 3-D surface and the 2-D contour.
1342
+ * @default false
1343
+ */
1344
+ surfaceWireframe?: boolean;
1345
+ }
1346
+ /**
1347
+ * Per-series style overrides for a chart.
1348
+ * Each entry applies to the series at the same index in the data array.
1349
+ * Unset fields fall back to the chart-level option.
1350
+ */
1351
+ interface ChartSeriesOpts {
1352
+ /** Series fill / line color (hex, e.g. `'FF0000'`) */
1353
+ color?: HexColor;
1354
+ /** Data-label font color */
1355
+ dataLabelColor?: string;
1356
+ /** Data-label font bold */
1357
+ dataLabelFontBold?: boolean;
1358
+ /** Data-label typeface */
1359
+ dataLabelFontFace?: string;
1360
+ /** Data-label font italic */
1361
+ dataLabelFontItalic?: boolean;
1362
+ /** Data-label font size (points) */
1363
+ dataLabelFontSize?: number;
1364
+ /**
1365
+ * Data-label number format code for this series.
1366
+ * Overrides the chart-level `dataLabelFormatCode` for this series only.
1367
+ * @example '#,##0' // thousands separator
1368
+ * @example '0.00%' // shows values as '0.00%'
1369
+ * @example '$0.00' // shows values as '$0.00'
1370
+ */
1371
+ dataLabelFormatCode?: string;
1372
+ /**
1373
+ * Line/radar series line width (points).
1374
+ * Pass `0` to hide the line.
1375
+ */
1376
+ lineSize?: number;
1377
+ }
1378
+ interface ChartPropsDataLabel {
1379
+ dataLabelBkgrdColors?: boolean;
1380
+ dataLabelColor?: string;
1381
+ dataLabelFontBold?: boolean;
1382
+ dataLabelFontFace?: string;
1383
+ dataLabelFontItalic?: boolean;
1384
+ dataLabelFontSize?: number;
1385
+ /**
1386
+ * Data label format code
1387
+ * @example '#%' // round percent
1388
+ * @example '0.00%' // shows values as '0.00%'
1389
+ * @example '$0.00' // shows values as '$0.00'
1390
+ */
1391
+ dataLabelFormatCode?: string;
1392
+ dataLabelFormatScatter?: 'custom' | 'customXY' | 'XY';
1393
+ dataLabelPosition?: 'b' | 'bestFit' | 'ctr' | 'l' | 'r' | 't' | 'inEnd' | 'outEnd';
1394
+ }
1395
+ interface ChartPropsDataTable {
1396
+ dataTableFontSize?: number;
1397
+ /**
1398
+ * Data table format code
1399
+ * @example '#%' // round percent
1400
+ * @example '0.00%' // shows values as '0.00%'
1401
+ * @example '$0.00' // shows values as '$0.00'
1402
+ */
1403
+ dataTableFormatCode?: string;
1404
+ /**
1405
+ * Whether to show a data table adjacent to the chart
1406
+ * @default false
1407
+ */
1408
+ showDataTable?: boolean;
1409
+ showDataTableHorzBorder?: boolean;
1410
+ showDataTableKeys?: boolean;
1411
+ showDataTableOutline?: boolean;
1412
+ showDataTableVertBorder?: boolean;
1413
+ }
1414
+ interface ChartPropsLegend {
1415
+ legendColor?: string;
1416
+ legendFontFace?: string;
1417
+ legendFontSize?: number;
1418
+ /**
1419
+ * Manual legend placement within the chart area.
1420
+ *
1421
+ * Each of `x`/`y`/`w`/`h` is a fraction (0-1) of the chart's width/height.
1422
+ * `x`/`y` position the legend's top-left corner relative to the chart edge;
1423
+ * `w`/`h` set its size. Each axis is independent: provide only `x` to move the
1424
+ * legend horizontally while leaving vertical placement and size automatic.
1425
+ * Setting this overrides the automatic placement implied by `legendPos`.
1426
+ *
1427
+ * Has no effect unless `showLegend` is `true`.
1428
+ *
1429
+ * @example { x: 0.7, y: 0.3, w: 0.25, h: 0.4 }
1430
+ */
1431
+ legendLayout?: PositionProps;
1432
+ legendPos?: 'b' | 'l' | 'r' | 't' | 'tr';
1433
+ }
1434
+ interface ChartPropsTitle extends TextBaseProps {
1435
+ title?: string;
1436
+ titleAlign?: string;
1437
+ titleBold?: boolean;
1438
+ titleColor?: string;
1439
+ titleFontFace?: string;
1440
+ titleFontSize?: number;
1441
+ titleItalic?: boolean;
1442
+ titleUnderline?: boolean;
1443
+ /**
1444
+ * Manual title position (inches), relative to the chart.
1445
+ * Each axis is independent: omit `x` to keep automatic horizontal centering,
1446
+ * or omit `y` to keep automatic vertical placement. Provide at least one.
1447
+ */
1448
+ titlePos?: {
1449
+ x?: number;
1450
+ y?: number;
1451
+ };
1452
+ titleRotate?: number;
1453
+ }
1454
+ interface ChartOpts extends ChartPropsAxisCat, ChartPropsAxisSer, ChartPropsAxisVal, ChartPropsBase, ChartPropsChartBar, ChartPropsChartDoughnut, ChartPropsChartLine, ChartPropsChartPie, ChartPropsChartRadar, ChartPropsChartWaterfall, ChartPropsChartHistogram, ChartPropsChartBoxWhisker, ChartPropsChartRegionMap, ChartPropsChartStock, ChartPropsChartSurface, ChartPropsDataLabel, ChartPropsDataTable, ChartPropsLegend, ChartPropsTitle, ObjectNameProps, OptsChartGridLine, PositionProps {
1455
+ /**
1456
+ * Chart type — required when using the canonical `addChart(data, options)` signature.
1457
+ * - Omit only for multi-type (combo) charts, where each `ChartMulti` entry carries its own `type`.
1458
+ */
1459
+ type?: CHART_NAME;
1460
+ /**
1461
+ * Alt Text value ("How would you describe this object and its contents to someone who is blind?")
1462
+ * - PowerPoint: [right-click on a chart] > "Edit Alt Text..."
1463
+ */
1464
+ altText?: string;
1465
+ /**
1466
+ * Custom chart-level metadata, emitted as a schema-valid extension on the chart space
1467
+ * (`c:chartSpace/c:extLst`) under a stable ts-pptx vendor GUID.
1468
+ * - Use for round-trippable, machine-readable annotations a consumer wants to travel with the
1469
+ * chart (e.g. a source-data id, a generator tag, a semantic role). PowerPoint preserves the
1470
+ * extension untouched and ignores it for rendering.
1471
+ * - Keys must be non-empty strings; values must be strings. Invalid entries are dropped with a
1472
+ * console warning rather than emitting degenerate XML.
1473
+ * @example { sourceId: 'q3-revenue', generator: 'my-deck-tool' }
1474
+ */
1475
+ metadata?: Record<string, string>;
1476
+ }
1477
+ //#endregion
1478
+ //#region src/types/style.d.ts
1479
+ interface BorderProps {
1480
+ /**
1481
+ * Border type
1482
+ * @default solid
1483
+ */
1484
+ type?: 'none' | 'dash' | 'solid';
1485
+ /**
1486
+ * Border color (hex)
1487
+ * @example 'FF3399'
1488
+ * @default '666666'
1489
+ */
1490
+ color?: HexColor;
1491
+ /**
1492
+ * Border width (points)
1493
+ * - MS-PPT > Format Shape > Fill & Line > Line > Width
1494
+ * @default 1
1495
+ */
1496
+ width?: number;
1497
+ /**
1498
+ * Border transparency (percent)
1499
+ * - MS-PPT > Format Shape > Fill & Line > Line > Transparency
1500
+ * - range: 0-100
1501
+ * @default 0
1502
+ */
1503
+ transparency?: number;
1504
+ /**
1505
+ * Line end cap style
1506
+ * @default 'flat'
1507
+ */
1508
+ cap?: LineCap;
1509
+ }
1510
+ /**
1511
+ * Slide-show navigation action for action-button shapes. Each value maps 1:1 onto
1512
+ * `ppaction://hlinkshowjump?jump=<value>`. A specific numbered slide is reached via
1513
+ * `HyperlinkProps.slide` instead (which emits `ppaction://hlinksldjump`).
1514
+ */
1515
+ type HyperlinkActionJump = 'firstslide' | 'previousslide' | 'nextslide' | 'lastslide' | 'lastslideviewed' | 'endshow';
1516
+ interface HyperlinkProps {
1517
+ _rId?: number;
1518
+ /**
1519
+ * Slide number to link to
1520
+ */
1521
+ slide?: number;
1522
+ /**
1523
+ * Url to link to
1524
+ */
1525
+ url?: string;
1526
+ /**
1527
+ * Hyperlink Tooltip
1528
+ */
1529
+ tooltip?: string;
1530
+ /**
1531
+ * Slide-show navigation action for action-button shapes. Emits a relationship-less
1532
+ * `<a:hlinkClick action="ppaction://hlinkshowjump?jump=…"/>` on the shape.
1533
+ * @example hyperlink: { action: 'nextslide' }
1534
+ */
1535
+ action?: HyperlinkActionJump;
1536
+ }
1537
+ interface ShadowProps {
1538
+ /**
1539
+ * shadow type
1540
+ * @default 'none'
1541
+ */
1542
+ type: 'outer' | 'inner' | 'none';
1543
+ /**
1544
+ * shadow transparency (percent)
1545
+ * - MS-PPT > Format Shape > Effects > Shadow > Transparency
1546
+ * - range: 0-100 (0 = fully opaque, 100 = fully transparent)
1547
+ * @example 25 // 25% transparent
1548
+ */
1549
+ transparency?: number;
1550
+ /**
1551
+ * blur (points)
1552
+ * - range: 0-100
1553
+ * @default 0
1554
+ */
1555
+ blur?: number;
1556
+ /**
1557
+ * angle (degrees)
1558
+ * - range: 0-359
1559
+ * @default 0
1560
+ */
1561
+ angle?: number;
1562
+ /**
1563
+ * shadow offset (points)
1564
+ * - range: 0-200
1565
+ * @default 0
1566
+ */
1567
+ offset?: number;
1568
+ /**
1569
+ * shadow color (hex format)
1570
+ * @example 'FF3399'
1571
+ */
1572
+ color?: HexColor;
1573
+ /**
1574
+ * whether to rotate shadow with shape
1575
+ * @default false
1576
+ */
1577
+ rotateWithShape?: boolean;
1578
+ }
1579
+ interface ShapeFillProps {
1580
+ /**
1581
+ * Fill color
1582
+ * - `HexColor` or `ThemeColor`
1583
+ * @example 'FF0000' // hex color (red)
1584
+ * @example SchemeColor.text1 // Theme color (Text1)
1585
+ */
1586
+ color?: Color;
1587
+ /**
1588
+ * Transparency (percent)
1589
+ * - MS-PPT > Format Shape > Fill & Line > Fill > Transparency
1590
+ * - range: 0-100
1591
+ * @default 0
1592
+ */
1593
+ transparency?: number;
1594
+ /**
1595
+ * Fill type
1596
+ * @default 'solid'
1597
+ */
1598
+ type?: 'none' | 'solid' | 'gradient' | 'pattern' | 'image';
1599
+ /**
1600
+ * Native PPTX gradient fill options.
1601
+ */
1602
+ gradient?: GradientFillProps;
1603
+ /**
1604
+ * Native PPTX pattern fill options.
1605
+ */
1606
+ pattern?: PatternFillProps;
1607
+ /**
1608
+ * Native PPTX picture fill options. Setting this (or `type: 'image'`) fills the
1609
+ * shape interior with a stretched bitmap instead of a color.
1610
+ */
1611
+ image?: ImageFillProps;
1612
+ /**
1613
+ * Resolved media relationship id for an image fill, assigned at add-time.
1614
+ * @internal
1615
+ */
1616
+ _imgRid?: number;
1617
+ }
1618
+ /**
1619
+ * Line (stroke) options.
1620
+ *
1621
+ * A stroke is painted like a fill: in addition to a solid `color`, it accepts the
1622
+ * inherited `gradient`/`pattern`/`image` fill options (DrawingML allows the same
1623
+ * fill group inside `<a:ln>`). Setting `gradient` (or `type: 'gradient'`) paints a
1624
+ * gradient stroke, e.g. `line: { width: 1, gradient: { kind: 'linear', angle: 0,
1625
+ * stops: [{ position: 0, color: 'accent3' }, { position: 100, color: 'accent4' }] } }`.
1626
+ */
1627
+ interface ShapeLineProps extends ShapeFillProps {
1628
+ /**
1629
+ * Line width (pt)
1630
+ * @default 1
1631
+ */
1632
+ width?: number;
1633
+ /**
1634
+ * Dash type
1635
+ * @default 'solid'
1636
+ */
1637
+ dashType?: 'solid' | 'dash' | 'dashDot' | 'lgDash' | 'lgDashDot' | 'lgDashDotDot' | 'sysDash' | 'sysDot';
1638
+ /**
1639
+ * Line end cap style
1640
+ * @default 'flat'
1641
+ */
1642
+ cap?: LineCap;
1643
+ /**
1644
+ * Begin arrow type
1645
+ */
1646
+ beginArrowType?: 'none' | 'arrow' | 'diamond' | 'oval' | 'stealth' | 'triangle';
1647
+ /**
1648
+ * End arrow type
1649
+ */
1650
+ endArrowType?: 'none' | 'arrow' | 'diamond' | 'oval' | 'stealth' | 'triangle';
1651
+ }
1652
+ /**
1653
+ * Connector routing style. Maps to a connector preset geometry. The exact preset
1654
+ * also depends on `bends` (number of jogs):
1655
+ * `straight`→`straightConnector1`; `elbow`→`bentConnector{3,4,5}`;
1656
+ * `curved`→`curvedConnector{3,4,5}`.
1657
+ */
1658
+ type ConnectorType = 'straight' | 'elbow' | 'curved';
1659
+ /**
1660
+ * A connector is a line drawn between two points, emitted as a PowerPoint connector
1661
+ * (`<p:cxnSp>`) so the app treats it as a connector (selectable/reroutable) rather than a
1662
+ * plain line shape. Endpoints are given directly; the bounding box and flip flags are derived.
1663
+ */
1664
+ interface ConnectorProps {
1665
+ /**
1666
+ * Routing style
1667
+ * @default 'straight'
1668
+ */
1669
+ type?: ConnectorType;
1670
+ /**
1671
+ * Number of adjustable bends (jogs) for an `elbow` / `curved` connector. Selects the
1672
+ * preset variant and how many `adj` values it accepts:
1673
+ * - `1` → `bentConnector3` / `curvedConnector3` (one jog) — the default
1674
+ * - `2` → `bentConnector4` / `curvedConnector4` (two jogs)
1675
+ * - `3` → `bentConnector5` / `curvedConnector5` (three jogs)
1676
+ *
1677
+ * Ignored for `type: 'straight'` (a straight connector has no bends).
1678
+ * @default 1
1679
+ */
1680
+ bends?: 1 | 2 | 3;
1681
+ /**
1682
+ * Bend position(s) as a percent of the connector box (`0`–`100`), one value per bend.
1683
+ * A single number sets the sole jog of a one-bend `elbow` / `curved`; an array sets each
1684
+ * jog of a multi-bend connector and its length must equal `bends`. Values outside `0`–`100`
1685
+ * are allowed (they place the bend beyond the endpoint box, as PowerPoint itself does when
1686
+ * endpoints flip). When omitted, PowerPoint uses the preset default (50%).
1687
+ *
1688
+ * Emitted as `<a:gd name="adj1…" fmla="val …"/>` adjust guides (OOXML 1000ths-of-a-percent).
1689
+ */
1690
+ adj?: number | number[];
1691
+ /**
1692
+ * Bind the connector's start point to a shape on the **same slide**, referenced by that
1693
+ * shape's `objectName`. Emits `<a:stCxn id=… idx=…>`, so PowerPoint treats the endpoint as
1694
+ * attached: it reroutes when the shape moves and its elbow auto-router can engage.
1695
+ * The shape's `objectName` must be set and unique on the slide. `x1`/`y1` remain the static
1696
+ * fallback geometry (and are used if the name can't be resolved).
1697
+ *
1698
+ * A shape inside a group is a valid target — group children are named on the same slide — though
1699
+ * the connector itself cannot be a group child (see {@link Slide.addGroup}).
1700
+ */
1701
+ startShape?: string;
1702
+ /**
1703
+ * Connection-site index on `startShape` (0-based; the valid range is preset-dependent — a
1704
+ * shape's `<a:cxnLst>` enumerates its sites). Ignored without `startShape`.
1705
+ * @default 0
1706
+ */
1707
+ startShapeIdx?: number;
1708
+ /** Bind the connector's end point to a shape on the same slide (by `objectName`). Emits `<a:endCxn>`. See {@link startShape}. */
1709
+ endShape?: string;
1710
+ /**
1711
+ * Connection-site index on `endShape`. Ignored without `endShape`.
1712
+ * @default 0
1713
+ */
1714
+ endShapeIdx?: number;
1715
+ /** Start point X — inches, or a `Coord` such as `'50%'` / `'2in'` */
1716
+ x1: Coord;
1717
+ /** Start point Y */
1718
+ y1: Coord;
1719
+ /** End point X */
1720
+ x2: Coord;
1721
+ /** End point Y */
1722
+ y2: Coord;
1723
+ /**
1724
+ * Line color (6-digit hex, no `#`)
1725
+ * @default '000000'
1726
+ */
1727
+ color?: HexColor;
1728
+ /**
1729
+ * Line width (pt)
1730
+ * @default 1
1731
+ */
1732
+ width?: number;
1733
+ /** Dash style */
1734
+ dashType?: ShapeLineProps['dashType'];
1735
+ /** Arrowhead at the start point */
1736
+ beginArrowType?: ShapeLineProps['beginArrowType'];
1737
+ /** Arrowhead at the end point */
1738
+ endArrowType?: ShapeLineProps['endArrowType'];
1739
+ /** Selection Pane object name */
1740
+ objectName?: string;
1741
+ /** Accessibility alt text */
1742
+ altText?: string;
1743
+ }
1744
+ //#endregion
1745
+ //#region src/types/core.d.ts
1746
+ /**
1747
+ * Coordinate value. A bare `number` is **always inches** — there is no magnitude-based unit
1748
+ * guessing. For other units use an explicit string suffix:
1749
+ * - `number` → inches (e.g. `10.25`)
1750
+ * - `"<n>%"` → percentage of the slide axis (e.g. `"75%"`)
1751
+ * - `"<n>in"` → inches (e.g. `"10.25in"`)
1752
+ * - `"<n>pt"` → points (e.g. `"72pt"` = 1 inch)
1753
+ * - `"<n>px"` → CSS reference pixels at 96 px/inch (e.g. `"96px"` = 1 inch), for authoring against
1754
+ * a known web/source canvas size
1755
+ * - `"<n>emu"` → raw EMU, the escape hatch for exact OOXML units (e.g. `"914400emu"` = 1 inch)
1756
+ *
1757
+ * @example 10.25 // inches
1758
+ * @example '75%' // percentage of slide size
1759
+ * @example '72pt' // points
1760
+ * @example '960px' // pixels at 96 DPI = 10 inches
1761
+ * @example '914400emu' // raw EMU
1762
+ */
1763
+ type Coord = number | `${number}%` | `${number}in` | `${number}pt` | `${number}px` | `${number}emu`;
1764
+ interface PositionProps {
1765
+ /**
1766
+ * Horizontal position
1767
+ * - inches or percentage
1768
+ * @example 10.25 // position in inches
1769
+ * @example '75%' // position as percentage of slide size
1770
+ */
1771
+ x?: Coord;
1772
+ /**
1773
+ * Vertical position
1774
+ * - inches or percentage
1775
+ * @example 10.25 // position in inches
1776
+ * @example '75%' // position as percentage of slide size
1777
+ */
1778
+ y?: Coord;
1779
+ /**
1780
+ * Height
1781
+ * - inches or percentage
1782
+ * @example 10.25 // height in inches
1783
+ * @example '75%' // height as percentage of slide size
1784
+ */
1785
+ h?: Coord;
1786
+ /**
1787
+ * Width
1788
+ * - inches or percentage
1789
+ * @example 10.25 // width in inches
1790
+ * @example '75%' // width as percentage of slide size
1791
+ */
1792
+ w?: Coord;
1793
+ }
1794
+ /**
1795
+ * Reusable optional data/path fields.
1796
+ * Use `DataOrPathRequiredProps` for APIs that require at least one source.
1797
+ */
1798
+ interface DataOrPathProps {
1799
+ /**
1800
+ * URL or relative path
1801
+ *
1802
+ * @example 'https://onedrives.com/myimg.png` // retrieve image via URL
1803
+ * @example '/home/user/images/myimg.png` // retrieve image via local path
1804
+ */
1805
+ path?: string;
1806
+ /**
1807
+ * base64-encoded string
1808
+ * - Useful for avoiding potential path/server issues
1809
+ *
1810
+ * @example 'image/png;base64,iVtDafDrBF[...]=' // pre-encoded image in base-64
1811
+ */
1812
+ data?: string;
1813
+ }
1814
+ type DataOrPathRequiredProps = (DataOrPathProps & {
1815
+ data: string;
1816
+ }) | (DataOrPathProps & {
1817
+ path: string;
1818
+ });
1819
+ interface BackgroundProps extends DataOrPathProps, ShapeFillProps {}
1820
+ /**
1821
+ * Color in Hex format
1822
+ * @example 'FF3399'
1823
+ */
1824
+ type HexColor = string;
1825
+ type ThemeColor = 'tx1' | 'tx2' | 'bg1' | 'bg2' | 'accent1' | 'accent2' | 'accent3' | 'accent4' | 'accent5' | 'accent6';
1826
+ type Color = HexColor | ThemeColor;
1827
+ interface GradientStopProps {
1828
+ /**
1829
+ * Stop position as a percentage.
1830
+ * - range: 0-100
1831
+ */
1832
+ position: number;
1833
+ /**
1834
+ * Stop color.
1835
+ * - `HexColor` or `ThemeColor`
1836
+ */
1837
+ color: Color;
1838
+ /**
1839
+ * Transparency (percent)
1840
+ * - range: 0-100
1841
+ * @default 0
1842
+ */
1843
+ transparency?: number;
1844
+ }
1845
+ interface LinearGradientFillProps {
1846
+ /**
1847
+ * Gradient type.
1848
+ */
1849
+ kind: 'linear';
1850
+ /**
1851
+ * Gradient angle in degrees. Values are normalized into 0-359.999...
1852
+ * @default 0
1853
+ */
1854
+ angle?: number;
1855
+ /**
1856
+ * Whether the gradient angle scales with the fill region.
1857
+ */
1858
+ scaled?: boolean;
1859
+ /**
1860
+ * Whether the fill rotates with the shape.
1861
+ * @default true
1862
+ */
1863
+ rotateWithShape?: boolean;
1864
+ /**
1865
+ * Gradient stops. Stops are serialized in ascending `position` order.
1866
+ */
1867
+ stops: GradientStopProps[];
1868
+ }
1869
+ interface RadialGradientFillProps {
1870
+ /**
1871
+ * Gradient type. A circular gradient radiating from a focus point: the stop at
1872
+ * `position: 0` sits at the center and later stops fan outward to the edges.
1873
+ */
1874
+ kind: 'radial';
1875
+ /**
1876
+ * Focus point of the radial gradient as percentages of the fill box, where
1877
+ * `{ x: 50, y: 50 }` (the default) centers it. Lower/higher values push the
1878
+ * bright center toward an edge.
1879
+ * @default { x: 50, y: 50 }
1880
+ */
1881
+ center?: {
1882
+ x: number;
1883
+ y: number;
1884
+ };
1885
+ /**
1886
+ * Whether the fill rotates with the shape.
1887
+ * @default true
1888
+ */
1889
+ rotateWithShape?: boolean;
1890
+ /**
1891
+ * Gradient stops. Stops are serialized in ascending `position` order; the
1892
+ * first (`position: 0`) is the center color.
1893
+ */
1894
+ stops: GradientStopProps[];
1895
+ }
1896
+ type GradientFillProps = LinearGradientFillProps | RadialGradientFillProps;
1897
+ /** OOXML ST_PresetPatternVal — preset pattern names for `<a:pattFill prst="...">` */
1898
+ type PatternPreset = 'pct5' | 'pct10' | 'pct20' | 'pct25' | 'pct30' | 'pct40' | 'pct50' | 'pct60' | 'pct70' | 'pct75' | 'pct80' | 'pct90' | 'horz' | 'vert' | 'ltHorz' | 'ltVert' | 'dkHorz' | 'dkVert' | 'narHorz' | 'narVert' | 'dashHorz' | 'dashVert' | 'cross' | 'dnDiag' | 'upDiag' | 'ltDnDiag' | 'ltUpDiag' | 'dkDnDiag' | 'dkUpDiag' | 'wdDnDiag' | 'wdUpDiag' | 'dashDnDiag' | 'dashUpDiag' | 'diagCross' | 'smCheck' | 'lgCheck' | 'smGrid' | 'lgGrid' | 'dotGrid' | 'smConfetti' | 'lgConfetti' | 'horzBrick' | 'diagBrick' | 'solidDmnd' | 'openDmnd' | 'dotDmnd' | 'plaid' | 'sphere' | 'weave' | 'divot' | 'shingle' | 'wave' | 'trellis' | 'zigZag';
1899
+ interface PatternFillProps {
1900
+ /** OOXML preset pattern (`prst` attribute on `<a:pattFill>`). */
1901
+ preset: PatternPreset;
1902
+ /** Foreground color. Defaults to black (`000000`) if omitted. */
1903
+ fgColor?: Color;
1904
+ /** Background color. Defaults to white (`FFFFFF`) if omitted. */
1905
+ bgColor?: Color;
1906
+ }
1907
+ /**
1908
+ * Native PPTX picture (image) fill — fills a shape's interior with a bitmap
1909
+ * (`<a:blipFill>`). Provide exactly one of `path` or `data`; raster formats only
1910
+ * (PNG/JPEG/GIF/BMP/WebP). SVG is not yet supported as a fill source.
1911
+ */
1912
+ interface ImageFillProps {
1913
+ /** Image file path (Node filesystem path or URL). */
1914
+ path?: string;
1915
+ /** Pre-encoded base64 data URI, e.g. `'image/png;base64,iVBOR...'`. */
1916
+ data?: string;
1917
+ }
1918
+ type Margin = number | [number, number, number, number];
1919
+ type HAlign = 'left' | 'center' | 'right' | 'justify';
1920
+ type VAlign = 'top' | 'middle' | 'bottom';
1921
+ /**
1922
+ * Text body `vert` attribute — flow/rotation direction of the text within its box.
1923
+ * Maps to `<a:bodyPr vert="…">` (ECMA-376 `ST_TextVerticalType`).
1924
+ */
1925
+ type TextVertType = 'eaVert' | 'horz' | 'mongolianVert' | 'vert' | 'vert270' | 'wordArtVert' | 'wordArtVertRtl';
1926
+ /**
1927
+ * A single node of a freeform (`custGeom`) path.
1928
+ * - coordinates are authored in the object's own inch/EMU space (0..width, 0..height), not slide-relative and not normalized
1929
+ * - used by shapes (`ShapeType.custGeom`) and by images (clips the picture to the path)
1930
+ *
1931
+ * The `arc` node carries no `x`/`y`: an `<a:arcTo>` has no explicit end point. The renderer
1932
+ * derives it from the current pen position, the radii and the swept angle, so an end point
1933
+ * authored here would be discarded (a warning is emitted if one is supplied).
1934
+ */
1935
+ type GeometryPoint = {
1936
+ x: Coord;
1937
+ y: Coord;
1938
+ moveTo?: boolean;
1939
+ } | {
1940
+ curve: {
1941
+ type: 'arc';
1942
+ hR: Coord;
1943
+ wR: Coord;
1944
+ stAng: number;
1945
+ swAng: number;
1946
+ };
1947
+ } | {
1948
+ x: Coord;
1949
+ y: Coord;
1950
+ curve: {
1951
+ type: 'cubic';
1952
+ x1: Coord;
1953
+ y1: Coord;
1954
+ x2: Coord;
1955
+ y2: Coord;
1956
+ };
1957
+ } | {
1958
+ x: Coord;
1959
+ y: Coord;
1960
+ curve: {
1961
+ type: 'quadratic';
1962
+ x1: Coord;
1963
+ y1: Coord;
1964
+ };
1965
+ } | {
1966
+ close: true;
1967
+ };
1968
+ //#endregion
1969
+ //#region src/types/shape.d.ts
1970
+ /**
1971
+ * A single preset-geometry adjustment guide (`<a:gd>` inside `<a:avLst>`).
1972
+ * - `name` is the guide name the preset defines, e.g. `'adj'`, `'adj1'`, `'adj2'`.
1973
+ * PowerPoint shows these handles as the yellow drag dots on a selected shape.
1974
+ * - `value` is a fraction `0.0–1.0` of the handle's range, emitted as a percentage
1975
+ * guide formula (`val`, in 1/100000 units, so `0.25` → `fmla="val 25000"`).
1976
+ * Most adjustment handles (corner radius, chevron point, callout depth, bevel
1977
+ * width, …) are percentage-based and map directly; some shapes accept values
1978
+ * beyond `1.0`. For angle-based handles, prefer the `angleRange` shortcut.
1979
+ */
1980
+ interface ShapeAdjustValue {
1981
+ name: string;
1982
+ value: number;
1983
+ }
1984
+ /**
1985
+ * A geometry guide (`<a:gd>` inside a `custGeom`'s `<a:gdLst>`): a named construction formula
1986
+ * that connection sites, adjust handles, and the text rect can reference by name.
1987
+ * - `name` is a `ST_GeomGuideName` token, e.g. `'w2'`.
1988
+ * - `formula` is a `ST_GeomGuideFormula` — a space-delimited op + args string emitted verbatim,
1989
+ * e.g. the multiply-divide op `"* / w 1 2"` written without the inner space (w × 1 ÷ 2), or
1990
+ * `'val 10800'`. This is an advanced escape hatch: the arguments are not interpreted, only
1991
+ * escaped. The leading operation *is* checked against the 17 ECMA-376 §20.1.9.11 operations
1992
+ * (multiply-divide, add-subtract, add-divide, if-else, `abs`, `at2`, `cat2`, `cos`, `max`,
1993
+ * `min`, `mod`, `pin`, `sat2`, `sin`, `sqrt`, `tan`, `val` — see `GEOM_GUIDE_OPS` in
1994
+ * `src/gen/drawingml/geometry.ts` for the literal tokens), because an unknown one emits
1995
+ * schema-shaped but semantically dead geometry that PowerPoint answers with a repair prompt;
1996
+ * such a guide is warned about and skipped.
1997
+ * @see http://www.datypic.com/sc/ooxml/e-a_gd-1.html
1998
+ */
1999
+ interface ShapeGuide {
2000
+ name: string;
2001
+ formula: string;
2002
+ }
2003
+ /**
2004
+ * A connection site (`<a:cxn>` inside a `custGeom`'s `<a:cxnLst>`): a point a connector can attach
2005
+ * to. A connector's `startShapeIdx`/`endShapeIdx` index into the target shape's connection sites.
2006
+ */
2007
+ interface ShapeConnectionSite {
2008
+ /** Incoming-connector angle in degrees (emitted to `ang`, `ST_AdjAngle` 60000ths). */
2009
+ ang: number;
2010
+ /** X in the object's own space (like `points`), or a guide-name string emitted verbatim. */
2011
+ x: Coord | string;
2012
+ /** Y in the object's own space (like `points`), or a guide-name string emitted verbatim. */
2013
+ y: Coord | string;
2014
+ }
2015
+ /** An XY adjust handle (`<a:ahXY>`) — a draggable handle, optionally bound to guides. */
2016
+ interface ShapeAdjustHandleXY {
2017
+ x: Coord | string;
2018
+ y: Coord | string;
2019
+ gdRefX?: string;
2020
+ minX?: Coord | string;
2021
+ maxX?: Coord | string;
2022
+ gdRefY?: string;
2023
+ minY?: Coord | string;
2024
+ maxY?: Coord | string;
2025
+ }
2026
+ /** A polar adjust handle (`<a:ahPolar>`) — radius/angle rather than XY. */
2027
+ interface ShapeAdjustHandlePolar {
2028
+ x: Coord | string;
2029
+ y: Coord | string;
2030
+ gdRefR?: string;
2031
+ minR?: Coord | string;
2032
+ maxR?: Coord | string;
2033
+ gdRefAng?: string;
2034
+ minAng?: number;
2035
+ maxAng?: number;
2036
+ }
2037
+ type ShapeAdjustHandle = ShapeAdjustHandleXY | ShapeAdjustHandlePolar;
2038
+ interface ShapeProps extends PositionProps, ObjectNameProps {
2039
+ /**
2040
+ * Horizontal alignment
2041
+ * @default 'left'
2042
+ */
2043
+ align?: HAlign;
2044
+ /**
2045
+ * Radius (only for ShapeType.pie, ShapeType.arc, ShapeType.blockArc)
2046
+ * - In the case of ShapeType.blockArc you have to setup the arcThicknessRatio
2047
+ * - values: [0-359, 0-359]
2048
+ * @default [270, 0]
2049
+ */
2050
+ angleRange?: [number, number];
2051
+ /**
2052
+ * Preset-geometry adjustment handles (`<a:avLst>` guides) for any preset shape.
2053
+ * - Use this to tune adjustment handles that lack a dedicated shortcut option,
2054
+ * e.g. chevron/arrow point depth, callout pointer, bevel/frame thickness.
2055
+ * - Accepts a single guide or an array; each `value` is a `0.0–1.0` fraction of
2056
+ * the handle's range (see {@link ShapeAdjustValue}).
2057
+ * - `rectRadius` / `angleRange` remain friendly shortcuts; any `shapeAdjust`
2058
+ * guide that does not collide with a shortcut name is emitted in addition.
2059
+ * @example { name: 'adj', value: 0.25 } // set the single adjust handle to 25%
2060
+ * @example [{ name: 'adj1', value: 0.5 }, { name: 'adj2', value: 0.25 }] // two handles
2061
+ */
2062
+ shapeAdjust?: ShapeAdjustValue | ShapeAdjustValue[];
2063
+ /**
2064
+ * Radius (only for ShapeType.blockArc)
2065
+ * - You have to setup the angleRange values too
2066
+ * - values: 0.0-1.0
2067
+ * @default 0.5
2068
+ */
2069
+ arcThicknessRatio?: number;
2070
+ /**
2071
+ * Shape fill color properties
2072
+ * @example { color:'FF0000' } // hex color (red)
2073
+ * @example { color:'0088CC', transparency:50 } // hex color, 50% transparent
2074
+ * @example { color:SchemeColor.accent1 } // Theme color Accent1
2075
+ */
2076
+ fill?: ShapeFillProps;
2077
+ /**
2078
+ * Flip shape horizontally?
2079
+ * @default false
2080
+ */
2081
+ flipH?: boolean;
2082
+ /**
2083
+ * Flip shape vertical?
2084
+ * @default false
2085
+ */
2086
+ flipV?: boolean;
2087
+ /**
2088
+ * Add hyperlink to shape
2089
+ * @example hyperlink: { url: "https://example.com", tooltip: "Visit Homepage" },
2090
+ */
2091
+ hyperlink?: HyperlinkProps;
2092
+ /**
2093
+ * Line options
2094
+ */
2095
+ line?: ShapeLineProps;
2096
+ /**
2097
+ * Points (only for ShapeType.custGeom)
2098
+ * - type: 'arc' (no end point — it is computed from the pen position, radii and sweep)
2099
+ * - `hR` Shape Arc Height Radius
2100
+ * - `wR` Shape Arc Width Radius
2101
+ * - `stAng` Shape Arc Start Angle (degrees, not wrapped into 0..360)
2102
+ * - `swAng` Shape Arc Swing Angle (degrees, not wrapped into 0..360)
2103
+ * @see http://www.datypic.com/sc/ooxml/e-a_arcTo-1.html
2104
+ * @example [{ x: 0, y: 0 }, { x: 10, y: 10 }] // draw a line between those two points
2105
+ */
2106
+ points?: GeometryPoint[];
2107
+ /**
2108
+ * Geometry guides (`<a:gdLst>`) for a `custGeom` shape — named construction formulas that
2109
+ * connection sites / adjust handles can reference. Advanced: each `formula` is emitted verbatim.
2110
+ * @example [{ name: 'w2', formula: 'val 10800' }]
2111
+ */
2112
+ guides?: ShapeGuide[];
2113
+ /**
2114
+ * Connection sites (`<a:cxnLst>`) for a `custGeom` shape — the points a connector can attach to.
2115
+ * Positions are absolute in the object's own space (like `points`); a `startShapeIdx`/`endShapeIdx`
2116
+ * on an `addConnector` indexes into this list.
2117
+ * @example [{ ang: 0, x: 1, y: 0 }, { ang: 180, x: 0, y: 1 }]
2118
+ */
2119
+ connectionSites?: ShapeConnectionSite[];
2120
+ /**
2121
+ * Adjust handles (`<a:ahLst>`) for a `custGeom` shape — draggable handles (XY or polar),
2122
+ * optionally bound to guides via `gdRef*`.
2123
+ */
2124
+ adjustHandles?: ShapeAdjustHandle[];
2125
+ /**
2126
+ * Rounded rectangle radius (only for ShapeType.roundRect)
2127
+ * - values: 0.0 to 1.0
2128
+ * @default 0
2129
+ */
2130
+ rectRadius?: number;
2131
+ /**
2132
+ * Rotation (degrees)
2133
+ * - range: -360 to 360
2134
+ * @default 0
2135
+ * @example 180 // rotate 180 degrees
2136
+ */
2137
+ rotate?: number;
2138
+ /**
2139
+ * Shadow options
2140
+ */
2141
+ shadow?: ShadowProps;
2142
+ }
2143
+ //#endregion
2144
+ //#region src/types/media.d.ts
2145
+ type MediaType = 'audio' | 'online' | 'video';
2146
+ interface ImageBaseProps extends PositionProps, ObjectNameProps {
2147
+ /**
2148
+ * Sizing note (`w`/`h` inherited from {@link PositionProps}):
2149
+ * - When a `data` (base64) image is supplied and `w`/`h` are omitted, the natural pixel
2150
+ * size is read from the image header (PNG/JPEG/GIF/BMP/WebP) and used at 96 DPI
2151
+ * (natural pixels / 96 = inches).
2152
+ * - When only one of `w`/`h` is given, the other is derived from the natural aspect ratio.
2153
+ * - `path` images and vector (SVG) data cannot be measured synchronously, so an omitted
2154
+ * dimension falls back to 1 inch.
2155
+ */
2156
+ /**
2157
+ * Alt Text value ("How would you describe this object and its contents to someone who is blind?")
2158
+ * - PowerPoint: [right-click on an image] > "Edit Alt Text..."
2159
+ */
2160
+ altText?: string;
2161
+ /**
2162
+ * Flip horizontally?
2163
+ * @default false
2164
+ */
2165
+ flipH?: boolean;
2166
+ /**
2167
+ * Flip vertical?
2168
+ * @default false
2169
+ */
2170
+ flipV?: boolean;
2171
+ hyperlink?: HyperlinkProps;
2172
+ /**
2173
+ * Border line (`<a:ln>` outline) drawn around the image
2174
+ * - same options as a shape outline; a picture supports a single outline, not per-side borders
2175
+ * - MS-PPT: Format Picture > Line
2176
+ * @example { color: '0088CC', width: 2 } // 2pt blue border
2177
+ * @example { color: '666666', width: 1, dashType: 'dash' } // dashed gray border
2178
+ */
2179
+ line?: ShapeLineProps;
2180
+ /**
2181
+ * Name of a picture placeholder defined on the slide layout/master to populate
2182
+ * - when it matches a layout/master placeholder, the image inherits that placeholder's
2183
+ * position and size for any of `x`/`y`/`w`/`h` not supplied explicitly;
2184
+ * explicit values always win
2185
+ * @example 'picph'
2186
+ * @see https://docs.microsoft.com/en-us/office/vba/api/powerpoint.ppplaceholdertype
2187
+ */
2188
+ placeholder?: string;
2189
+ /**
2190
+ * Image rotation (degrees)
2191
+ * - range: -360 to 360
2192
+ * @default 0
2193
+ * @example 180 // rotate image 180 degrees
2194
+ */
2195
+ rotate?: number;
2196
+ /**
2197
+ * Enable image rounding (clips the image to a circle/ellipse)
2198
+ * - shorthand for `shape: 'ellipse'`; `shape` takes precedence when both are set
2199
+ * @default false
2200
+ */
2201
+ rounding?: boolean;
2202
+ /**
2203
+ * Clip the image to a preset shape geometry ("fit image into shape")
2204
+ * - accepts any PowerPoint preset geometry name, e.g. `'roundRect'`, `'hexagon'`, `'ellipse'`
2205
+ * - combine with `sizing: { type: 'cover', ... }` for an aspect-correct fill of the shape box
2206
+ * - use `rectRadius` to set the corner radius for `'roundRect'`
2207
+ * @example 'roundRect' // rounded-rectangle avatar
2208
+ * @example 'hexagon' // hexagonal photo
2209
+ */
2210
+ shape?: SHAPE_NAME;
2211
+ /**
2212
+ * Clip the image to an arbitrary freeform path (`custGeom`)
2213
+ * - takes precedence over `shape` / `rounding` when present
2214
+ * - coordinates are authored in the image's own inch/EMU space (0..w, 0..h), not slide-relative and not normalized
2215
+ * - supports the same path DSL as freeform shapes: `moveTo` / `lnTo` / `cubicBezTo` / `quadBezTo` / `arcTo` / `close`
2216
+ * @example [{ x: 1, y: 0 }, { x: 2, y: 2 }, { x: 0, y: 2 }, { close: true }] // triangular photo clip
2217
+ */
2218
+ points?: GeometryPoint[];
2219
+ /**
2220
+ * Rounded rectangle corner radius (inches) when `shape: 'roundRect'`
2221
+ * - values: 0.0 to 1.0
2222
+ * @default 0
2223
+ */
2224
+ rectRadius?: number;
2225
+ /**
2226
+ * Preset-geometry adjustment handles (`<a:avLst>` guides) for the clip `shape`.
2227
+ * - tune adjustment handles that lack a dedicated option, e.g. chevron point depth
2228
+ * - accepts a single guide or an array; each `value` is a `0.0–1.0` fraction (see {@link ShapeAdjustValue})
2229
+ * @example { name: 'adj', value: 0.25 }
2230
+ */
2231
+ shapeAdjust?: ShapeAdjustValue | ShapeAdjustValue[];
2232
+ /**
2233
+ * Shadow Props
2234
+ * - MS-PPT > Format Picture > Shadow
2235
+ * @example
2236
+ * { type: 'outer', color: '000000', transparency: 50, blur: 20, offset: 20, angle: 270 }
2237
+ */
2238
+ shadow?: ShadowProps;
2239
+ /**
2240
+ * Crop the source image to a sub-region by percentage edge insets, emitted verbatim
2241
+ * as OOXML `<a:srcRect>`.
2242
+ * - each value is the percent (0–100) trimmed off that edge of the *source* image, the
2243
+ * same model PowerPoint's Picture Format > Crop uses; `l`+`r` and `t`+`b` must each be < 100
2244
+ * - the remaining sub-region is stretched to fill the picture's displayed `w`×`h` box, so this
2245
+ * is the faithful way to reproduce a deck that maps several icons out of one composite raster
2246
+ * - operates on the source image directly (independent of natural-pixel measurement), so unlike
2247
+ * `sizing: 'crop'` (which crops in *displayed inches*) it works for SVG and unmeasurable formats
2248
+ * - mutually exclusive with {@link sizing}; if both are set `crop` wins and `sizing` is ignored
2249
+ * @example { l: 0, t: 0, r: 50, b: 50 } // keep the top-left quadrant of the source image
2250
+ */
2251
+ crop?: {
2252
+ /** Percent (0–100) trimmed from the left edge of the source image. @default 0 */
2253
+ l?: number;
2254
+ /** Percent (0–100) trimmed from the top edge of the source image. @default 0 */
2255
+ t?: number;
2256
+ /** Percent (0–100) trimmed from the right edge of the source image. @default 0 */
2257
+ r?: number;
2258
+ /** Percent (0–100) trimmed from the bottom edge of the source image. @default 0 */
2259
+ b?: number;
2260
+ };
2261
+ /**
2262
+ * Image sizing options
2263
+ */
2264
+ sizing?: {
2265
+ /**
2266
+ * Sizing type
2267
+ * - `cover` / `contain` fit the image into the `w`×`h` box using the image's *natural*
2268
+ * pixel aspect ratio (read from the embedded PNG/JPEG/GIF/BMP/WebP header). If the
2269
+ * natural size cannot be determined (e.g. SVG or an unrecognized format) the displayed
2270
+ * `w`/`h` ratio is used as a fallback and a warning is logged.
2271
+ * - `crop` cuts a window out of the displayed image using the `x`/`y`/`w`/`h` offsets.
2272
+ */
2273
+ type: 'contain' | 'cover' | 'crop';
2274
+ /**
2275
+ * Image width
2276
+ * - inches or percentage
2277
+ * @example 10.25 // position in inches
2278
+ * @example '75%' // position as percentage of slide size
2279
+ */
2280
+ w: Coord;
2281
+ /**
2282
+ * Image height
2283
+ * - inches or percentage
2284
+ * @example 10.25 // position in inches
2285
+ * @example '75%' // position as percentage of slide size
2286
+ */
2287
+ h: Coord;
2288
+ /**
2289
+ * Offset from left to crop image
2290
+ * - `crop` only
2291
+ * - inches or percentage
2292
+ * @example 10.25 // position in inches
2293
+ * @example '75%' // position as percentage of slide size
2294
+ */
2295
+ x?: Coord;
2296
+ /**
2297
+ * Offset from top to crop image
2298
+ * - `crop` only
2299
+ * - inches or percentage
2300
+ * @example 10.25 // position in inches
2301
+ * @example '75%' // position as percentage of slide size
2302
+ */
2303
+ y?: Coord;
2304
+ };
2305
+ /**
2306
+ * Transparency (percent)
2307
+ * - MS-PPT > Format Picture > Picture > Picture Transparency > Transparency
2308
+ * - range: 0-100
2309
+ * @default 0
2310
+ * @example 25 // 25% transparent
2311
+ */
2312
+ transparency?: number;
2313
+ /**
2314
+ * Recolor the image as a two-tone (duotone) effect
2315
+ * - maps the image's shadows to `shadow` and its highlights to `highlight`
2316
+ * - serializes `<a:duotone>` inside the picture's `<a:blip>` (MS-PPT > Format Picture > Picture Color > Recolor)
2317
+ * - colors accept `HexColor` or `ThemeColor`, same as fills
2318
+ * - the classic brand treatment: tint stock photography into a single brand hue
2319
+ * @example { shadow: '250F6B', highlight: 'FFFFFF' } // deep-blue duotone
2320
+ */
2321
+ duotone?: {
2322
+ /** Color mapped to the image's dark/shadow tones. */
2323
+ shadow: Color;
2324
+ /** Color mapped to the image's light/highlight tones. */
2325
+ highlight: Color;
2326
+ };
2327
+ /**
2328
+ * Recolor the image to grayscale (`<a:grayscl/>`)
2329
+ * - maps every pixel to its luminance grey (MS-PPT > Format Picture > Picture Color > Recolor > Grayscale)
2330
+ * - the cheapest recolour: no payload
2331
+ * - mutually exclusive with the other recolour modes (`duotone`/`biLevel`/`clrChange`); if several are set,
2332
+ * the first present in document order wins on read-back
2333
+ * @default false
2334
+ * @example true // desaturate the image
2335
+ */
2336
+ grayscale?: boolean;
2337
+ /**
2338
+ * Recolor the image to two-level black & white (`<a:biLevel thresh="…"/>`)
2339
+ * - every pixel at/above the luminance threshold becomes white, everything below it black
2340
+ * (MS-PPT > Format Picture > Picture Color > Recolor > Black and White …%)
2341
+ * @example { threshold: 0.5 } // split at 50% luminance
2342
+ */
2343
+ biLevel?: {
2344
+ /** Luminance split point as a `0.0–1.0` fraction (serialized to `thresh`, the 0–1 fraction ×100000). */
2345
+ threshold: number;
2346
+ };
2347
+ /**
2348
+ * Recolor the image by mapping one source color to another (`<a:clrChange>`)
2349
+ * - every pixel matching `from` is repainted `to` — the classic "swap the flat background out" recolour
2350
+ * (MS-PPT > Format Picture > Picture Color > Set Transparent Color is the single-colour sibling)
2351
+ * - colors accept `HexColor` or `ThemeColor`, same as fills / `duotone`
2352
+ * @example { from: '000000', to: 'FF0000' } // turn black pixels red
2353
+ */
2354
+ clrChange?: {
2355
+ /** Source color to replace (`<a:clrFrom>`). */
2356
+ from: Color;
2357
+ /** Replacement color (`<a:clrTo>`). */
2358
+ to: Color;
2359
+ };
2360
+ /**
2361
+ * Raw SVG markup to embed as the image source
2362
+ * - convenience for `data: 'data:image/svg+xml;base64,...'`; ts-pptx encodes it for you
2363
+ * - ignored when `data` or `path` is also provided
2364
+ * @example '<svg viewBox="0 0 24 24">...</svg>'
2365
+ */
2366
+ svg?: string;
2367
+ }
2368
+ type ImageProps = ImageBaseProps & (DataOrPathRequiredProps | (DataOrPathProps & {
2369
+ svg: string;
2370
+ }));
2371
+ /**
2372
+ * Add media (audio/video) to slide
2373
+ * Requires either `data` or `path`; online media requires `link`.
2374
+ */
2375
+ interface MediaBaseProps extends PositionProps, ObjectNameProps {
2376
+ /**
2377
+ * Cover image
2378
+ * @default "play button" image, gray background
2379
+ */
2380
+ cover?: string;
2381
+ /**
2382
+ * media file extension
2383
+ * - use when the media file path does not already have an extension, ex: "/folder/SomeSong"
2384
+ * @default extension from file provided
2385
+ */
2386
+ extn?: string;
2387
+ /**
2388
+ * Loop playback indefinitely (PowerPoint "Playback > Loop until Stopped")
2389
+ * - emits a slide timing tree so the embedded audio/video repeats when played
2390
+ * - not supported for `type: 'online'` (e.g. YouTube) embeds
2391
+ * @default false
2392
+ */
2393
+ loop?: boolean;
2394
+ /**
2395
+ * Total number of times to play the media (a finite loop), ex: `3` plays it three times
2396
+ * - ignored when `loop` is `true` (which repeats forever)
2397
+ * - not supported for `type: 'online'` (e.g. YouTube) embeds
2398
+ */
2399
+ loopCount?: number;
2400
+ }
2401
+ /**
2402
+ * Add an embedded OLE object (PowerPoint's Insert ▸ Object ▸ Create from File) to a slide.
2403
+ *
2404
+ * The payload's bytes travel inside the `.pptx` (in `ppt/embeddings/`), so double-clicking the
2405
+ * object in PowerPoint opens the source document in place. Requires either `data` or `path`.
2406
+ * Linked objects (`<p:link>` to a file outside the package) are not supported.
2407
+ */
2408
+ interface OleObjectBaseProps extends PositionProps, ObjectNameProps {
2409
+ /**
2410
+ * Picture of the embedded document shown on the slide — a raster image `path` (Node/local)
2411
+ * or base64 `data:` URI.
2412
+ * - the library is Node-first and cannot render an Office document, so when this is omitted a
2413
+ * neutral gray placeholder is embedded; PowerPoint draws the live object over it, but every
2414
+ * other consumer (and PowerPoint's own `mc:Fallback` path) shows exactly what is supplied here
2415
+ * - supply a real screenshot whenever the deck is meant to read correctly outside PowerPoint
2416
+ * @example { path: 'assets/budget-preview.png' }
2417
+ */
2418
+ cover?: {
2419
+ path?: string;
2420
+ data?: string;
2421
+ };
2422
+ /**
2423
+ * Payload file extension, used to name the embedded part and to pick the content type,
2424
+ * relationship type, and default `progId`.
2425
+ * - inferred from `data`'s MIME, else `path`'s extension, else `progId`
2426
+ * - anything that is not a known Office package extension (`xlsx`/`xlsm`/`docx`/`docm`/`pptx`/`pptm`)
2427
+ * is embedded as a generic OLE blob part named `.bin`
2428
+ * @example 'xlsx'
2429
+ */
2430
+ extn?: string;
2431
+ /**
2432
+ * OLE server ProgID — what PowerPoint launches on double-click.
2433
+ * - defaults from the resolved extension (`xlsx` → `Excel.Sheet.12`, `docx` → `Word.Document.12`,
2434
+ * `pptx` → `PowerPoint.Show.12`, anything else → `Package`)
2435
+ * @example 'Excel.Sheet.12'
2436
+ */
2437
+ progId?: string;
2438
+ /**
2439
+ * Display the object as its application icon instead of a document preview (`showAsIcon`).
2440
+ * - the `cover` image is still what gets drawn, so supply an icon-looking preview to match
2441
+ * @default false
2442
+ */
2443
+ showAsIcon?: boolean;
2444
+ /**
2445
+ * Native size of the preview image in EMU (`imgW`/`imgH`), which PowerPoint uses to keep the
2446
+ * object's aspect ratio when it re-renders the embedded document.
2447
+ * - defaults to the object's own `w`/`h` converted to EMU
2448
+ */
2449
+ imgW?: number;
2450
+ /** @see {@link imgW} */
2451
+ imgH?: number;
2452
+ }
2453
+ /**
2454
+ * Options for `slide.addOleObject()`. Requires either `data` (base64, with or without a
2455
+ * `data:...;base64,` header) or `path` (a local/remote file read at export time).
2456
+ *
2457
+ * Sizing note: `w`/`h` default to 4 × 3 inches rather than being measured, since the library
2458
+ * does not open the embedded document.
2459
+ */
2460
+ type OleObjectProps = OleObjectBaseProps & DataOrPathRequiredProps;
2461
+ type MediaProps = MediaBaseProps & ((DataOrPathRequiredProps & {
2462
+ /**
2463
+ * Media type
2464
+ */
2465
+ type: Exclude<MediaType, 'online'>;
2466
+ /**
2467
+ * Optional video embed link metadata.
2468
+ */
2469
+ link?: string;
2470
+ }) | (DataOrPathProps & {
2471
+ /**
2472
+ * Use 'online' to embed a YouTube video (only supported in recent versions of PowerPoint)
2473
+ */
2474
+ type: 'online';
2475
+ /**
2476
+ * video embed link
2477
+ * - works with YouTube
2478
+ * - other sites may not show correctly in PowerPoint
2479
+ * @example 'https://www.youtube.com/embed/Dph6ynRVyUc' // embed a youtube video
2480
+ */
2481
+ link: string;
2482
+ }));
2483
+ //#endregion
2484
+ //#region src/types/table.d.ts
2485
+ /**
2486
+ * A `<table>` element, from whatever DOM implementation the caller has.
2487
+ *
2488
+ * Deliberately *not* `lib.dom`'s `Element`. `lib.dom`'s types are built for a browser, and a
2489
+ * non-browser DOM's element type — happy-dom's, jsdom's — declares its own members and does
2490
+ * not satisfy them, so demanding `Element` would reject from TypeScript exactly the
2491
+ * implementations `ts-pptx/html` exists to accept. Requiring the three members the conversion
2492
+ * actually calls keeps a mistyped argument an error while letting every real DOM through.
2493
+ */
2494
+ interface TableToSlidesElement {
2495
+ getAttribute: (name: string) => string | null;
2496
+ querySelector: (selectors: string) => unknown;
2497
+ querySelectorAll: (selectors: string) => unknown;
2498
+ }
2499
+ /**
2500
+ * The one thing `tableToSlides` asks a document for. Structural for the same reason
2501
+ * {@link TableToSlidesElement} is.
2502
+ */
2503
+ interface TableToSlidesDocument {
2504
+ getElementById: (elementId: string) => TableToSlidesElement | null;
2505
+ }
2506
+ interface TableToSlidesProps extends TableProps {
2507
+ _arrObjTabHeadRows?: TableRow[];
2508
+ /**
2509
+ * Add an image to slide(s) created during autopaging
2510
+ * - `image` prop requires either `path` or `data`
2511
+ * - see `DataOrPathProps` for details on `image` props
2512
+ * - see `PositionProps` for details on `options` props
2513
+ */
2514
+ addImage?: {
2515
+ image: DataOrPathProps;
2516
+ options: PositionProps;
2517
+ };
2518
+ /**
2519
+ * Add a shape to slide(s) created during autopaging
2520
+ */
2521
+ addShape?: {
2522
+ shapeName: SHAPE_NAME;
2523
+ options: ShapeProps;
2524
+ };
2525
+ /**
2526
+ * Add a table to slide(s) created during autopaging
2527
+ */
2528
+ addTable?: {
2529
+ rows: TableRow[];
2530
+ options: TableProps;
2531
+ };
2532
+ /**
2533
+ * Add a text object to slide(s) created during autopaging
2534
+ */
2535
+ addText?: {
2536
+ text: TextProps[];
2537
+ options: TextPropsOptions;
2538
+ };
2539
+ /**
2540
+ * Whether to enable auto-paging
2541
+ * - auto-paging creates new slides as content overflows a slide
2542
+ * @default true
2543
+ */
2544
+ autoPage?: boolean;
2545
+ /**
2546
+ * Auto-paging character weight
2547
+ * - adjusts how many characters are used before lines wrap
2548
+ * - range: -1.0 to 1.0
2549
+ * @default 0.0
2550
+ * @example 0.5 // lines are longer (increases the number of characters that can fit on a given line)
2551
+ */
2552
+ autoPageCharWeight?: number;
2553
+ /**
2554
+ * Auto-paging line weight
2555
+ * - adjusts how many lines are used before slides wrap
2556
+ * - range: -1.0 to 1.0
2557
+ * @default 0.0
2558
+ * @example 0.5 // tables are taller (increases the number of lines that can fit on a given slide)
2559
+ */
2560
+ autoPageLineWeight?: number;
2561
+ /**
2562
+ * Whether to repeat head row(s) on new tables created by autopaging
2563
+ * @default false
2564
+ */
2565
+ autoPageRepeatHeader?: boolean;
2566
+ /**
2567
+ * The `y` location to use on subsequent slides created by autopaging
2568
+ * @default (top margin of Slide)
2569
+ */
2570
+ autoPageSlideStartY?: number;
2571
+ /**
2572
+ * Column widths (inches)
2573
+ */
2574
+ colW?: number | number[];
2575
+ /**
2576
+ * Document to resolve a table *id* against.
2577
+ * - only consulted when the table is identified by string id; passing the element itself
2578
+ * needs no document, since one is reached through the element's `ownerDocument`
2579
+ * - defaults to the global `document`, which is what a browser caller gets
2580
+ * - supply this to convert a table outside a browser (any DOM implementation will do)
2581
+ */
2582
+ document?: TableToSlidesDocument;
2583
+ /**
2584
+ * Title of the slide master to use for the auto-paged slides (the `title` passed to
2585
+ * `defineSlideMaster`). Matches the `masterTitle` option of `addSlide`.
2586
+ * - define a master slide to have your auto-paged slides carry a corporate design, etc.
2587
+ */
2588
+ masterTitle?: string;
2589
+ /**
2590
+ * Slide margin
2591
+ * - this margin will be across all slides created by auto-paging
2592
+ */
2593
+ slideMargin?: Margin;
2594
+ }
2595
+ interface TableCellProps extends TextBaseProps {
2596
+ /**
2597
+ * Auto-paging character weight
2598
+ * - adjusts how many characters are used before lines wrap
2599
+ * - range: -1.0 to 1.0
2600
+ * @default 0.0
2601
+ * @example 0.5 // lines are longer (increases the number of characters that can fit on a given line)
2602
+ */
2603
+ autoPageCharWeight?: number;
2604
+ /**
2605
+ * Auto-paging line weight
2606
+ * - adjusts how many lines are used before slides wrap
2607
+ * - range: -1.0 to 1.0
2608
+ * @default 0.0
2609
+ * @example 0.5 // tables are taller (increases the number of lines that can fit on a given slide)
2610
+ */
2611
+ autoPageLineWeight?: number;
2612
+ /**
2613
+ * Cell border
2614
+ */
2615
+ border?: BorderProps | [BorderProps, BorderProps, BorderProps, BorderProps];
2616
+ /**
2617
+ * Cell colspan
2618
+ */
2619
+ colspan?: number;
2620
+ /**
2621
+ * Cell fill — a solid color, or a picture that fills the cell (`a:blipFill` in
2622
+ * the cell's `a:tcPr`, stretched to the cell box). A picture fill embeds the
2623
+ * image as slide media; identical sources are embedded once. Raster only —
2624
+ * an SVG source warns and is ignored, matching shape fills.
2625
+ * @example { color:'FF0000' } // hex color (red)
2626
+ * @example { color:'0088CC', transparency:50 } // hex color, 50% transparent
2627
+ * @example { color:SchemeColor.accent1 } // theme color Accent1
2628
+ * @example { type:'image', image:{ path:'logo.png' } } // picture fill
2629
+ * @example { image:{ data:'image/png;base64,…' } } // picture fill, `type` inferred
2630
+ */
2631
+ fill?: ShapeFillProps;
2632
+ hyperlink?: HyperlinkProps;
2633
+ /**
2634
+ * Cell margin (inches)
2635
+ * @default 0
2636
+ */
2637
+ margin?: Margin;
2638
+ /**
2639
+ * Cell rowspan
2640
+ */
2641
+ rowspan?: number;
2642
+ /**
2643
+ * Shrink cell text to fit when it would overflow the cell's fixed height.
2644
+ * - `'shrink'` measures the wrapped text and bakes a **reduced literal font size**
2645
+ * onto the cell's runs so the text fits — PowerPoint does not support text
2646
+ * autofit (`normAutofit`) inside table cells, so there is no font-scale flag to
2647
+ * set; the size itself is lowered, which both PowerPoint and LibreOffice render
2648
+ * identically with no edit/resize.
2649
+ * - Requires the cell font registered via {@link TsPptx.registerFontMetrics};
2650
+ * without metrics it is a no-op (the cell keeps its authored size) and warns once.
2651
+ * - Only triggers when the cell's row has a **fixed** height that the text exceeds.
2652
+ * With auto-height rows (no `rowH`/`h`), the row simply grows, so nothing shrinks.
2653
+ * - Only `'shrink'` is acted on for cells. `'resize'` and the object form are ignored
2654
+ * here: a table row already auto-grows to fit its tallest cell (the cell equivalent
2655
+ * of `spAutoFit`), so there is nothing to bake. (The wider union is shared with
2656
+ * {@link TextPropsOptions.fit} so table-level `fit` can cascade to cells.)
2657
+ * @example 'shrink' // measured when the cell font is registered; else no-op
2658
+ */
2659
+ fit?: 'none' | 'shrink' | 'resize' | TextFitShrinkProps;
2660
+ }
2661
+ /**
2662
+ * Styling for one region of a custom table style (maps to a `CT_TablePartStyle`).
2663
+ * A region (e.g. the header row or banded rows) is shown only when the matching
2664
+ * `TableProps` flag is set — `firstRow` needs `hasHeader`, `band1H`/`band2H` need
2665
+ * `hasBandedRows`, and so on.
2666
+ * @see TableStyleProps
2667
+ */
2668
+ interface TableStyleRegionProps {
2669
+ /**
2670
+ * Solid cell fill color (hex).
2671
+ * - `HexColor` only; theme references are not supported in custom styles
2672
+ * @example '1A2B3C'
2673
+ */
2674
+ fill?: HexColor;
2675
+ /**
2676
+ * Text color (hex).
2677
+ * @example 'FFFFFF'
2678
+ */
2679
+ color?: HexColor;
2680
+ /** Bold text. */
2681
+ bold?: boolean;
2682
+ /** Italic text. */
2683
+ italic?: boolean;
2684
+ /**
2685
+ * Cell border(s).
2686
+ * - single value is applied to all four sides plus the interior grid lines
2687
+ * - array of values in TRBL order styles only the four outer sides
2688
+ */
2689
+ border?: BorderProps | [BorderProps, BorderProps, BorderProps, BorderProps];
2690
+ }
2691
+ /**
2692
+ * A reusable custom table style written to `ppt/tableStyles.xml`.
2693
+ * Pass to `pptx.defineTableStyle()`, which registers it and returns a GUID to use
2694
+ * as `TableProps.tableStyle`. Unlike the fixed built-in `TableStyle` set, a custom
2695
+ * style can use arbitrary brand colors, is editable in PowerPoint's Table Styles
2696
+ * gallery, and bands correctly across any row/column count (including auto-paged tables).
2697
+ * @example
2698
+ * const brand = pptx.defineTableStyle({
2699
+ * name: 'Brand Banded',
2700
+ * wholeTbl: { border: { type:'solid', color:'D9D9D9', width:0.5 } },
2701
+ * firstRow: { fill:'1A2B3C', color:'FFFFFF', bold:true },
2702
+ * band1H: { fill:'EAF1F8' },
2703
+ * band2H: { fill:'FFFFFF' },
2704
+ * })
2705
+ * slide.addTable(rows, { tableStyle: brand, hasHeader:true, hasBandedRows:true })
2706
+ */
2707
+ interface TableStyleProps {
2708
+ /** Display name shown in PowerPoint's Table Styles gallery. */
2709
+ name: string;
2710
+ /** Base styling applied to every cell. */
2711
+ wholeTbl?: TableStyleRegionProps;
2712
+ /** Header (first) row — activated by `TableProps.hasHeader`. */
2713
+ firstRow?: TableStyleRegionProps;
2714
+ /** Footer (last) row — activated by `TableProps.hasFooter`. */
2715
+ lastRow?: TableStyleRegionProps;
2716
+ /** First column — activated by `TableProps.hasFirstColumn`. */
2717
+ firstCol?: TableStyleRegionProps;
2718
+ /** Last column — activated by `TableProps.hasLastColumn`. */
2719
+ lastCol?: TableStyleRegionProps;
2720
+ /** Odd horizontal band — activated by `TableProps.hasBandedRows`. */
2721
+ band1H?: TableStyleRegionProps;
2722
+ /** Even horizontal band — activated by `TableProps.hasBandedRows`. */
2723
+ band2H?: TableStyleRegionProps;
2724
+ /** Odd vertical band — activated by `TableProps.hasBandedColumns`. */
2725
+ band1V?: TableStyleRegionProps;
2726
+ /** Even vertical band — activated by `TableProps.hasBandedColumns`. */
2727
+ band2V?: TableStyleRegionProps;
2728
+ }
2729
+ interface TableProps extends PositionProps, TextBaseProps, ObjectNameProps {
2730
+ _arrObjTabHeadRows?: TableRow[];
2731
+ /**
2732
+ * Name of a table/content placeholder defined on the slide layout/master to bind this table to.
2733
+ * - when it matches a layout/master placeholder, the table's `<p:graphicFrame>` emits that
2734
+ * placeholder's `<p:ph>` (idx/type) so PowerPoint treats the table as filling the placeholder
2735
+ * (e.g. a "Title and Content" content placeholder)
2736
+ * - the table also inherits the placeholder's position/size for any of x/y/w/h left unset
2737
+ * @example 'body' // bind to the layout placeholder named 'body'
2738
+ */
2739
+ placeholder?: string;
2740
+ /**
2741
+ * Whether to enable auto-paging
2742
+ * - auto-paging creates new slides as content overflows a slide
2743
+ * @default false
2744
+ */
2745
+ autoPage?: boolean;
2746
+ /**
2747
+ * Auto-paging character weight
2748
+ * - adjusts how many characters are used before lines wrap
2749
+ * - range: -1.0 to 1.0
2750
+ * @default 0.0
2751
+ * @example 0.5 // lines are longer (increases the number of characters that can fit on a given line)
2752
+ */
2753
+ autoPageCharWeight?: number;
2754
+ /**
2755
+ * Auto-paging line weight
2756
+ * - adjusts how many lines are used before slides wrap
2757
+ * - range: -1.0 to 1.0
2758
+ * @default 0.0
2759
+ * @example 0.5 // tables are taller (increases the number of lines that can fit on a given slide)
2760
+ */
2761
+ autoPageLineWeight?: number;
2762
+ /**
2763
+ * Whether table header row(s) should be repeated on each new slide creating by autoPage.
2764
+ * Use `autoPageHeaderRows` to designate how many rows comprise the table header (1+).
2765
+ * @default false
2766
+ */
2767
+ autoPageRepeatHeader?: boolean;
2768
+ /**
2769
+ * Number of rows that comprise table headers
2770
+ * - required when `autoPageRepeatHeader` is set to true.
2771
+ * @example 2 - repeats the first two table rows on each new slide created
2772
+ * @default 1
2773
+ */
2774
+ autoPageHeaderRows?: number;
2775
+ /**
2776
+ * The `y` location to use on subsequent slides created by autopaging
2777
+ * @default (top margin of Slide)
2778
+ */
2779
+ autoPageSlideStartY?: number;
2780
+ /**
2781
+ * Whether populated placeholders on the source slide (e.g. a title set via
2782
+ * `addText(text, { placeholder })`) are copied onto each overflow slide created by autoPage.
2783
+ * - new slides otherwise inherit only the layout's empty placeholders, so a title set on the
2784
+ * first slide would not appear on continuation slides.
2785
+ * @default false
2786
+ */
2787
+ autoPagePlaceholder?: boolean;
2788
+ /**
2789
+ * Table border
2790
+ * - single value is applied to all 4 sides
2791
+ * - array of values in TRBL order for individual sides
2792
+ */
2793
+ border?: BorderProps | [BorderProps, BorderProps, BorderProps, BorderProps];
2794
+ /**
2795
+ * Width of table columns (inches)
2796
+ * - single value is applied to every column equally based upon `w`
2797
+ * - array of values in applied to each column in order
2798
+ * @default columns of equal width based upon `w`
2799
+ */
2800
+ colW?: number | number[];
2801
+ /**
2802
+ * Shrink columns proportionally so a too-wide table fits the slide.
2803
+ * - `'shrink'`: if the total column width exceeds the space available between
2804
+ * the table's `x` and the right slide margin, scale every column down by the
2805
+ * same factor so the whole table fits. Columns that already fit are untouched.
2806
+ * - applies to an explicit `colW` array (the common "too many columns" case) and
2807
+ * to a `w` wider than the slide; never grows columns and never enforces a
2808
+ * minimum width, so a very high column count can still become thin.
2809
+ * - opt-in: explicit widths are otherwise emitted as-is and may run off the slide.
2810
+ * @default undefined (no scaling)
2811
+ */
2812
+ fitColumns?: 'shrink';
2813
+ /**
2814
+ * Table-level text-fit policy, cascaded to every cell that does not set its own
2815
+ * {@link TableCellProps.fit}.
2816
+ * - `'shrink'`: each cell whose row has a **fixed** height that its wrapped text
2817
+ * would exceed gets a reduced literal font size baked onto its runs so the text
2818
+ * fits (see {@link TableCellProps.fit} for the full semantics and the font-metrics
2819
+ * requirement). Cells that set their own `fit` win over this table default.
2820
+ * - `'none'` / `'resize'` / the object form are accepted for parity with
2821
+ * {@link TextPropsOptions.fit} but only `'shrink'` is acted on for table cells.
2822
+ * @default undefined (cells keep their authored size)
2823
+ * @example 'shrink'
2824
+ */
2825
+ fit?: 'none' | 'shrink' | 'resize' | TextFitShrinkProps;
2826
+ /**
2827
+ * Mark the first row as a header row.
2828
+ * Emits `firstRow="1"` on `<a:tblPr>`, activating the first-row style region of
2829
+ * the table style and satisfying the PowerPoint accessibility checker's "table header" rule.
2830
+ * @default false
2831
+ */
2832
+ hasHeader?: boolean;
2833
+ /**
2834
+ * Mark the last row as a footer row.
2835
+ * Emits `lastRow="1"` on `<a:tblPr>`, activating the last-row style region.
2836
+ * Requires `tableStyle` to have a visible effect.
2837
+ * @default false
2838
+ */
2839
+ hasFooter?: boolean;
2840
+ /**
2841
+ * Enable alternating row (band) shading.
2842
+ * Emits `bandRow="1"` on `<a:tblPr>`, activating band1H/band2H style regions.
2843
+ * Requires `tableStyle` to have a visible effect.
2844
+ * @default false
2845
+ */
2846
+ hasBandedRows?: boolean;
2847
+ /**
2848
+ * Enable alternating column (band) shading.
2849
+ * Emits `bandCol="1"` on `<a:tblPr>`, activating band1V/band2V style regions.
2850
+ * Requires `tableStyle` to have a visible effect.
2851
+ * @default false
2852
+ */
2853
+ hasBandedColumns?: boolean;
2854
+ /**
2855
+ * Apply special styling to the first column.
2856
+ * Emits `firstCol="1"` on `<a:tblPr>`, activating the firstCol style region.
2857
+ * Requires `tableStyle` to have a visible effect.
2858
+ * @default false
2859
+ */
2860
+ hasFirstColumn?: boolean;
2861
+ /**
2862
+ * Apply special styling to the last column.
2863
+ * Emits `lastCol="1"` on `<a:tblPr>`, activating the lastCol style region.
2864
+ * Requires `tableStyle` to have a visible effect.
2865
+ * @default false
2866
+ */
2867
+ hasLastColumn?: boolean;
2868
+ /**
2869
+ * Lay the table out right-to-left.
2870
+ * Emits `rtl="1"` on `<a:tblPr>`, which mirrors the column order so the first
2871
+ * column renders on the right — the correct layout for RTL scripts (Arabic, Hebrew).
2872
+ * This controls only the table/column direction; per-cell text direction is set
2873
+ * with each cell's `rtlMode` option.
2874
+ * @default false
2875
+ */
2876
+ rtl?: boolean;
2877
+ /**
2878
+ * Table style to apply, either a built-in `TableStyle` member or the GUID
2879
+ * returned by `pptx.defineTableStyle()` for a custom style.
2880
+ * Emits `<a:tableStyleId>` inside `<a:tblPr>` with the corresponding GUID.
2881
+ * Style flags (`hasHeader`, `hasFooter`, `hasBandedRows`, etc.) select which
2882
+ * regions of the chosen style are activated; they have no visible effect without
2883
+ * a `tableStyle` set.
2884
+ *
2885
+ * @example tableStyle: pptx.TableStyle.MEDIUM_STYLE_2_ACCENT_1 // built-in
2886
+ * @example const brand = pptx.defineTableStyle({ name:'Brand', firstRow:{ fill:'1A2B3C', color:'FFFFFF', bold:true } }); tableStyle: brand
2887
+ */
2888
+ tableStyle?: TableStyle | string;
2889
+ /**
2890
+ * Inline styling for the header (first) row, applied as direct per-cell formatting.
2891
+ *
2892
+ * Convenience shortcut for styling a header distinctly from the body **without** first
2893
+ * registering a custom style via `pptx.defineTableStyle({ firstRow })`. Each property is
2894
+ * merged onto every cell of row 0 (`fill`, `color`, `bold`, `align`, `border`, etc.).
2895
+ *
2896
+ * Precedence (highest wins), matching how PowerPoint resolves styling — direct cell
2897
+ * formatting overrides a table-style region:
2898
+ * 1. explicit per-cell `options` on a row-0 cell
2899
+ * 2. this `headerRow`
2900
+ * 3. the `firstRow` region of any `tableStyle`
2901
+ * 4. `wholeTbl` / defaults
2902
+ *
2903
+ * Setting `headerRow` also implies `hasHeader: true` (emits `firstRow="1"` for the
2904
+ * accessibility "table header" marker) unless `hasHeader` is explicitly set to `false`.
2905
+ * @example headerRow: { fill: { color:'1A2B3C' }, color:'FFFFFF', bold:true, align:'center' }
2906
+ */
2907
+ headerRow?: TableCellProps;
2908
+ /**
2909
+ * Per-column default cell styling, applied as direct per-cell formatting.
2910
+ *
2911
+ * `columns[i]` is merged onto every cell that starts in column `i` (`fill`, `color`,
2912
+ * `bold`, `align`, `valign`, `border`, `margin`, …), so a wide **colored** matrix —
2913
+ * per-column fills, maturity-gradient headers — does not require hand-writing a fill
2914
+ * onto every cell. Entries may be sparse (`columns[2]` alone styles only column 2);
2915
+ * an `undefined`/omitted entry leaves that column untouched. The whole option is
2916
+ * optional and degrades cleanly to today's text-on-white when not given.
2917
+ *
2918
+ * Precedence (highest wins), matching how PowerPoint resolves styling — direct cell
2919
+ * formatting overrides a table-style region:
2920
+ * 1. explicit per-cell `options`
2921
+ * 2. `headerRow` (row 0 only)
2922
+ * 3. this `columns[colIdx]`
2923
+ * 4. `wholeTbl` / `tableStyle` / defaults
2924
+ *
2925
+ * The merge is property-level, so a header cell keeps `headerRow`'s typography **and**
2926
+ * takes its column's `fill` when they set different properties. For a graduated header
2927
+ * band, put shared header typography (bold/white/centered, **no fill**) in `headerRow`
2928
+ * and let each `columns[i].fill` supply that column's fill.
2929
+ *
2930
+ * Column index counts each cell's `colspan` (default 1) within a row, so merged cells
2931
+ * map to the correct column; it does not track `rowspan`s inherited from earlier rows.
2932
+ *
2933
+ * There is deliberately no built-in "group bracket" annotation. Label a span of columns
2934
+ * by composing existing primitives: `addShape('rightBrace', …)` (or `'bracePair'`) plus
2935
+ * `addText`, positioned from the table's `x` and `colW` (a span's `x`/`w` is the running
2936
+ * sum of the preceding/covered column widths).
2937
+ *
2938
+ * @example columns: [{}, { fill: { color:'E8F0FE' } }, { fill: { color:'C6DAFC' } }] // per-column solid fills
2939
+ * @example // gradient header: shared typography on headerRow, graduated fills per column
2940
+ * headerRow: { color:'FFFFFF', bold:true, align:'center' },
2941
+ * columns: [{}, { fill:{color:'BBD3FB'} }, { fill:{color:'89AEF6'} }, { fill:{color:'4B7BE5'} }]
2942
+ */
2943
+ columns?: TableCellProps[];
2944
+ /**
2945
+ * Default cell background for every cell in the table — a solid color or a
2946
+ * picture fill. Superseded per cell by `options.fill`, `headerRow`, and
2947
+ * `columns[i]`. A picture fill is embedded once and shared by every cell that
2948
+ * inherits it.
2949
+ * @example { color:'FF0000' } // hex color (red)
2950
+ * @example { color:'0088CC', transparency:50 } // hex color, 50% transparent
2951
+ * @example { color:SchemeColor.accent1 } // theme color Accent1
2952
+ * @example { type:'image', image:{ path:'watermark.png' } } // picture fill
2953
+ */
2954
+ fill?: ShapeFillProps;
2955
+ /**
2956
+ * Cell margin (inches)
2957
+ * - affects all table cells, is superceded by cell options
2958
+ */
2959
+ margin?: Margin;
2960
+ /**
2961
+ * Height of table rows (inches)
2962
+ * - single value is applied to every row equally based upon `h`
2963
+ * - array of values in applied to each row in order
2964
+ * @default rows of equal height based upon `h`
2965
+ */
2966
+ rowH?: number | number[];
2967
+ /**
2968
+ * DEV-ONLY diagnostic flag: when `true`, logs a verbose trace of the auto-paging
2969
+ * calculations to the console. Intended for debugging table layout only; leave unset
2970
+ * in production. Inherited by {@link TableToSlidesProps}.
2971
+ * @default false
2972
+ */
2973
+ verbose?: boolean;
2974
+ }
2975
+ interface TableCell {
2976
+ _type?: SlideObjectType.tablecell;
2977
+ /** lines in this cell (autoPage) */
2978
+ _lines?: TableCell[][];
2979
+ /** `text` prop but guaranteed to hold "TableCell[]" */
2980
+ _tableCells?: TableCell[];
2981
+ /** height in EMU */
2982
+ _lineHeight?: number;
2983
+ _hmerge?: boolean;
2984
+ _vmerge?: boolean;
2985
+ _rowContinue?: number;
2986
+ /** origin cell of a colspan/rowspan span, set on the dummy `_hmerge`/`_vmerge` cells so they can
2987
+ * inherit the origin's border/fill and render the merged region's outer edges */
2988
+ _spanOrigin?: TableCell;
2989
+ /**
2990
+ * Cell content: a plain string, or an array of `TableCell` runs for mixed formatting.
2991
+ * (A `number` is still coerced to a string at runtime for plain-JS callers, but is no
2992
+ * longer part of the type — pass `String(n)` from TypeScript.)
2993
+ */
2994
+ text?: string | TableCell[];
2995
+ options?: TableCellProps;
2996
+ }
2997
+ interface TableRowSlide {
2998
+ rows: TableRow[];
2999
+ /**
3000
+ * Per-row height (inches) aligned 1:1 with `rows`, derived from the original `rowH` array.
3001
+ * Auto-paging splits/reorders rows across slides and inserts repeated headers, so the caller's
3002
+ * `rowH[i]` (keyed by *original* row index) can no longer be applied by physical row index on
3003
+ * each generated slide. This carries each output row's resolved height so a configured height
3004
+ * follows its source row instead of being re-applied to whatever lands at that index.
3005
+ * Entries are `undefined` where no explicit height was configured (auto-distributed height).
3006
+ */
3007
+ rowH?: Array<number | undefined>;
3008
+ }
3009
+ type TableRow = TableCell[];
3010
+ //#endregion
3011
+ //#region src/types/animation.d.ts
3012
+ /**
3013
+ * Slide transition and animation types.
3014
+ *
3015
+ * Re-exported by `./index.js`, which is the import site for the rest of `src/`.
3016
+ */
3017
+ /**
3018
+ * Base ECMA-376 slide-transition type (`p:transition`'s single type child). Each
3019
+ * maps to a `<p:TYPE/>` element; type-specific variants (e.g. direction) go in
3020
+ * {@link TransitionProps.variant}. Modern PowerPoint-only transitions (Morph,
3021
+ * Vortex, …) live in the `p14`/`p15`/`p159` namespaces and are out of authoring
3022
+ * scope for now. See `docs/animations-and-transitions.md`.
3023
+ */
3024
+ type TransitionType = 'blinds' | 'checker' | 'circle' | 'comb' | 'cover' | 'cut' | 'diamond' | 'dissolve' | 'fade' | 'newsflash' | 'plus' | 'pull' | 'push' | 'random' | 'randomBar' | 'split' | 'strips' | 'wedge' | 'wheel' | 'wipe' | 'zoom';
3025
+ /**
3026
+ * Slide-show transition applied between slides (`p:transition`). Assign to
3027
+ * {@link Slide.transition}. Setting `durationMs` emits PowerPoint's
3028
+ * `mc:AlternateContent` form (a `p14` Choice carrying `p14:dur` plus a base
3029
+ * `mc:Fallback`); otherwise only the coarse `speed` bucket is written.
3030
+ * @example slide.transition = { type: 'push', durationMs: 1250, variant: { dir: 'd' } }
3031
+ */
3032
+ interface TransitionProps {
3033
+ /** Transition type (the `<p:TYPE/>` element), e.g. `fade`, `push`, `wipe`, `cut`, `dissolve`. */
3034
+ type: TransitionType;
3035
+ /** Exact duration in milliseconds (`p14:dur`); emits the `mc:AlternateContent` form. */
3036
+ durationMs?: number;
3037
+ /** Coarse speed bucket (`spd`); derived from `durationMs` when omitted, else defaults to `fast`. */
3038
+ speed?: 'slow' | 'med' | 'fast';
3039
+ /** Advance on mouse click (`advClick`). @default true */
3040
+ advanceOnClick?: boolean;
3041
+ /** Auto-advance after this many milliseconds (`advTm`). */
3042
+ advanceAfterMs?: number;
3043
+ /** Type-specific variant attributes, e.g. `{ dir: 'd' }` for push, `{ spokes: '2' }` for wheel. */
3044
+ variant?: Record<string, string>;
3045
+ /** Sound played with the transition (`p:sndAc`): a start sound (embedded WAV) or the stop-previous form. */
3046
+ sound?: TransitionSoundProps;
3047
+ /**
3048
+ * Internal: the slide relationship id assigned to the embedded sound part, stamped
3049
+ * by the export-time registration pass. Not part of the authoring surface.
3050
+ */
3051
+ _sndRId?: number;
3052
+ }
3053
+ /**
3054
+ * A transition sound (`p:sndAc`). Either a **start sound** — an embedded WAV played
3055
+ * when the transition runs (`p:stSnd` → `p:snd`), optionally looped — or the
3056
+ * **stop-previous** form (`p:endSnd`) that silences a still-playing transition
3057
+ * sound. Built-in PowerPoint sounds embed identically to a custom file, so there is
3058
+ * no separate built-in path: supply the WAV bytes via `data` or `path`.
3059
+ * See `docs/animations-and-transitions.md`.
3060
+ */
3061
+ interface TransitionSoundProps {
3062
+ /** Embedded sound bytes as a base64 data URI (e.g. `data:audio/wav;base64,…`) or raw base64. */
3063
+ data?: string;
3064
+ /** Path to a sound file, read at export time (alternative to `data`). */
3065
+ path?: string;
3066
+ /** Display name emitted on `<p:snd @name>` (e.g. `ding.wav`); defaults to the file name. */
3067
+ name?: string;
3068
+ /** Loop the sound until the next sound starts (`<p:stSnd loop="1">`). @default false */
3069
+ loop?: boolean;
3070
+ /** Emit the stop-previous form (`<p:endSnd/>`) instead of a start sound. Mutually exclusive with `data`/`path`. */
3071
+ stopPrevious?: boolean;
3072
+ }
3073
+ /**
3074
+ * A preset build-animation effect. The supported set is fixed (each is a verbatim
3075
+ * template captured from PowerPoint); adding one means adding a fixture + template,
3076
+ * not a new code path. See `docs/animations-and-transitions.md`.
3077
+ */
3078
+ type PresetEffect = 'fadeIn' | 'flyIn' | 'appear' | 'wipe' | 'grow' | 'spin' | 'fadeOut' | 'flyOut';
3079
+ /** When a build-animation effect starts relative to the preceding one. */
3080
+ type AnimationTrigger = 'onClick' | 'withPrevious' | 'afterPrevious';
3081
+ /**
3082
+ * A preset build animation on a shape (entrance/emphasis/exit), added via
3083
+ * {@link Slide.addAnimation}. Target the shape by its 0-based add order
3084
+ * (`shapeIndex`, mapping to the generated `spid = shapeIndex + 2`) or by
3085
+ * `objectName`. Effects play in the order added, grouped into click steps by
3086
+ * `trigger`.
3087
+ */
3088
+ interface AnimationProps {
3089
+ /** The preset effect to play. */
3090
+ preset: PresetEffect;
3091
+ /**
3092
+ * 0-based add order of the target shape on the slide (`spid = shapeIndex + 2`).
3093
+ * Counts top-level objects only; use `objectName` to target a shape inside a group.
3094
+ */
3095
+ shapeIndex?: number;
3096
+ /**
3097
+ * Target shape by its `objectName` (alternative to `shapeIndex`). Any shape on the slide,
3098
+ * including one inside a group; an unresolved name warns and drops the effect.
3099
+ */
3100
+ objectName?: string;
3101
+ /** Trigger relative to the previous effect. @default 'onClick' */
3102
+ trigger?: AnimationTrigger;
3103
+ /** Effect duration in milliseconds; preset-specific default when omitted. */
3104
+ durationMs?: number;
3105
+ }
3106
+ //#endregion
3107
+ //#region src/types/master.d.ts
3108
+ interface SlideNumberProps extends PositionProps, TextBaseProps {
3109
+ /**
3110
+ * margin (inches) — text-frame internal margin; a value `>= 1` warns as a likely legacy points value
3111
+ */
3112
+ margin?: Margin;
3113
+ }
3114
+ interface SlideMasterChartProps {
3115
+ type: CHART_NAME | ChartMulti[];
3116
+ data: OptsChartData[];
3117
+ options?: ChartOpts;
3118
+ opts?: ChartOpts;
3119
+ }
3120
+ type SlideMasterObject = {
3121
+ chart: SlideMasterChartProps;
3122
+ } | {
3123
+ image: ImageProps;
3124
+ } | {
3125
+ line: ShapeProps;
3126
+ } | {
3127
+ rect: ShapeProps;
3128
+ } | {
3129
+ roundRect: ShapeProps;
3130
+ } |
3131
+ /**
3132
+ * Any preset shape, addressed by `SHAPE_NAME` (e.g. `ShapeType.ellipse`).
3133
+ * Generalizes the `line`/`rect`/`roundRect` shortcuts to every preset the
3134
+ * `addShape()` serializer supports (ellipse, triangle, chevron, …).
3135
+ * @example { shape: { type: 'ellipse', options: { x: 1, y: 1, w: 2, h: 2, fill: { color: 'FF0000' } } } }
3136
+ */
3137
+ {
3138
+ shape: {
3139
+ type: SHAPE_NAME;
3140
+ options?: ShapeProps;
3141
+ };
3142
+ } | {
3143
+ text: {
3144
+ text: string | number | TextProps[];
3145
+ options?: TextPropsOptions;
3146
+ };
3147
+ } | {
3148
+ placeholder: {
3149
+ options: PlaceholderProps;
3150
+ /**
3151
+ * Text to be shown in placeholder (shown until user focuses textbox or adds text)
3152
+ * - Leave blank to have powerpoint show default phrase (ex: "Click to add title")
3153
+ */
3154
+ text?: string;
3155
+ };
3156
+ };
3157
+ /**
3158
+ * Bullet configuration for one slide-master text-style level (`a:buChar`/`a:buAutoNum`/`a:buNone`).
3159
+ * A focused subset of the run-level bullet model — picture bullets and per-glyph sizing are not
3160
+ * supported in master defaults (those require slide rels). Set `bullet: false` to suppress the
3161
+ * level's bullet entirely.
3162
+ */
3163
+ interface MasterBulletProps {
3164
+ /** `'bullet'` emits a character bullet (`a:buChar`); `'number'` emits an auto-number (`a:buAutoNum`). @default 'bullet' */
3165
+ type?: 'bullet' | 'number';
3166
+ /** Bullet character (unicode code point hex), e.g. `'2022'` for •. Used when `type` is `'bullet'`. */
3167
+ characterCode?: string;
3168
+ /** Glyph font typeface for the bullet character (`a:buFont`), e.g. `'Arial'` or `'Wingdings'`. */
3169
+ fontFace?: string;
3170
+ /** Auto-number scheme (`a:buAutoNum@type`) when `type` is `'number'`, e.g. `'arabicPeriod'`. @default 'arabicPeriod' */
3171
+ numberType?: string;
3172
+ /** Starting value for auto-numbered bullets (`a:buAutoNum@startAt`). @default 1 */
3173
+ numberStartAt?: number;
3174
+ }
3175
+ /**
3176
+ * Styling for one paragraph level (`a:lvlNpPr`) of a slide-master text style. Every field is
3177
+ * optional; an unset field keeps PowerPoint's built-in default for that level. Configure via
3178
+ * {@link SlideMasterProps.textStyles}.
3179
+ */
3180
+ interface MasterTextStyleLevel {
3181
+ /** Font size in points (`a:defRPr@sz`), e.g. `24`. */
3182
+ fontSize?: number;
3183
+ /** Font face (`a:defRPr/a:latin@typeface`). Unset keeps the theme font (`+mn-lt`/`+mj-lt`). */
3184
+ fontFace?: string;
3185
+ /** Text color — hex (`'C00000'`) or theme slot (`'tx1'`) — emitted as `a:defRPr/a:solidFill`. */
3186
+ color?: Color;
3187
+ /** Bold text (`a:defRPr@b`). */
3188
+ bold?: boolean;
3189
+ /** Italic text (`a:defRPr@i`). */
3190
+ italic?: boolean;
3191
+ /** Horizontal alignment (`a:lvlNpPr@algn`). */
3192
+ align?: HAlign;
3193
+ /** Left margin in inches (`a:lvlNpPr@marL`); for a hanging bullet this is the text indent. */
3194
+ marginLeft?: number;
3195
+ /** First-line indent in inches (`a:lvlNpPr@indent`); negative produces a hanging bullet. */
3196
+ indent?: number;
3197
+ /** Bullet config: `false` emits `a:buNone`; an object configures a char/number bullet. Unset keeps the level default. */
3198
+ bullet?: boolean | MasterBulletProps;
3199
+ }
3200
+ /**
3201
+ * Per-level slide-master text styles, written to `slideMaster1.xml`'s `<p:txStyles>`.
3202
+ * Because a deck has a single shared slide master, these styles are **deck-wide**: when set on more
3203
+ * than one `defineSlideMaster()` call the last value for each group (`title`/`body`/`other`) wins.
3204
+ */
3205
+ interface MasterTextStyleProps {
3206
+ /** Title placeholder style (`p:titleStyle`, single level). */
3207
+ title?: MasterTextStyleLevel;
3208
+ /** Body placeholder per-level styles (`p:bodyStyle`, levels 1–9; index 0 is `lvl1`). */
3209
+ body?: MasterTextStyleLevel[];
3210
+ /** Other/default placeholder per-level styles (`p:otherStyle`, levels 1–9). */
3211
+ other?: MasterTextStyleLevel[];
3212
+ }
3213
+ interface SlideMasterProps {
3214
+ /**
3215
+ * Unique name for this master
3216
+ */
3217
+ title: string;
3218
+ background?: BackgroundProps;
3219
+ margin?: Margin;
3220
+ slideNumber?: SlideNumberProps;
3221
+ objects?: SlideMasterObject[];
3222
+ /**
3223
+ * Per-level master text styles (title / body / other) written to the shared slide master's
3224
+ * `<p:txStyles>`. Configure nested bullet character, font size, color, alignment, and indent
3225
+ * for each of the nine list levels. Deck-wide (see {@link MasterTextStyleProps}).
3226
+ * @example textStyles: { body: [{ fontSize: 24, color: 'C00000', bullet: { characterCode: '25AA' } }] }
3227
+ */
3228
+ textStyles?: MasterTextStyleProps;
3229
+ }
3230
+ //#endregion
3231
+ //#region src/types/slide.d.ts
3232
+ /**
3233
+ * A child object that can be placed inside a group via `slide.addGroup()`.
3234
+ *
3235
+ * Uses the same key-tagged descriptor shape as `SlideMasterObject`, but limited to the
3236
+ * object types `addGroup` supports. A `group` child nests another group (an identity child
3237
+ * coordinate space is kept at every depth, so descendants keep their slide-absolute
3238
+ * coordinates). Charts, media, tables, and placeholders are intentionally excluded (see
3239
+ * `addGroup`); passing one logs a warning and skips it.
3240
+ */
3241
+ type GroupChildProps = {
3242
+ image: ImageProps;
3243
+ } | {
3244
+ line: ShapeProps;
3245
+ } | {
3246
+ rect: ShapeProps;
3247
+ } | {
3248
+ roundRect: ShapeProps;
3249
+ } | {
3250
+ shape: {
3251
+ type: SHAPE_NAME;
3252
+ options?: ShapeProps;
3253
+ };
3254
+ } | {
3255
+ text: {
3256
+ text: string | number | TextProps[];
3257
+ options?: TextPropsOptions;
3258
+ };
3259
+ } | {
3260
+ group: {
3261
+ children: GroupChildProps[];
3262
+ options?: GroupProps;
3263
+ };
3264
+ };
3265
+ /**
3266
+ * Options for `slide.addGroup()`.
3267
+ *
3268
+ * The group keeps an identity child coordinate space (`chOff/chExt == off/ext`) at every depth:
3269
+ * children — including nested groups — keep their slide-absolute `x/y/w/h`. A consequence worth
3270
+ * knowing: a group's own frame never moves or scales its children, it only places the selection
3271
+ * handle and the rotate pivot.
3272
+ *
3273
+ * The frame is all-or-nothing. Pass all four of `x/y/w/h` to set it explicitly, or none to have it
3274
+ * auto-computed as the bounding box of the children. A partial frame is ambiguous, so it warns and
3275
+ * falls back to auto-bounds on every axis.
3276
+ */
3277
+ interface GroupProps extends PositionProps, ObjectNameProps {
3278
+ /** Rotation in degrees (applied to the whole group) */
3279
+ rotate?: number;
3280
+ /** Flip the group horizontally */
3281
+ flipH?: boolean;
3282
+ /** Flip the group vertically */
3283
+ flipV?: boolean;
3284
+ }
3285
+ interface ObjectOptions extends ImageBaseProps, PositionProps, ShapeProps, TableCellProps, TextPropsOptions {
3286
+ _placeholderIdx?: number;
3287
+ _placeholderType?: PLACEHOLDER_TYPE;
3288
+ /** Connector adjust-guide values (OOXML 1000ths-of-a-percent), one per bend; emitted as `<a:gd name="adjN">` */
3289
+ _connectorAdj?: number[];
3290
+ /** Connector start-point binding: target shape `objectName` (raw, as the caller spelled it) + connection-site index; resolved to `<a:stCxn>` at serialize time */
3291
+ _startCxn?: {
3292
+ name: string;
3293
+ idx: number;
3294
+ };
3295
+ /** Connector end-point binding: target shape `objectName` (raw, as the caller spelled it) + connection-site index; resolved to `<a:endCxn>` at serialize time */
3296
+ _endCxn?: {
3297
+ name: string;
3298
+ idx: number;
3299
+ };
3300
+ /**
3301
+ * Image: which dimensions were omitted by the user and should be derived from the image's
3302
+ * natural pixel size at serialize time. Path-based images can't be measured synchronously in
3303
+ * `addImage()` (bytes are loaded async during export), so the missing extent is backfilled
3304
+ * once `_relsMedia[].data` is populated. `{ w, h }` true means "derive this side from the
3305
+ * natural ratio". Base64 `data` images are measured eagerly in `addImage()` and never set this.
3306
+ */
3307
+ _szAuto?: {
3308
+ w: boolean;
3309
+ h: boolean;
3310
+ };
3311
+ cx?: Coord;
3312
+ cy?: Coord;
3313
+ margin?: Margin;
3314
+ colW?: number | number[];
3315
+ rowH?: number | number[];
3316
+ hasHeader?: boolean;
3317
+ hasFooter?: boolean;
3318
+ hasBandedRows?: boolean;
3319
+ hasBandedColumns?: boolean;
3320
+ hasFirstColumn?: boolean;
3321
+ hasLastColumn?: boolean;
3322
+ rtl?: boolean;
3323
+ tableStyle?: TableStyle | string;
3324
+ }
3325
+ interface SlideLayout {
3326
+ background?: BackgroundProps;
3327
+ }
3328
+ interface Slide {
3329
+ addChart(data: OptsChartData[], options: ChartOpts & {
3330
+ type: CHART_NAME;
3331
+ }): Slide;
3332
+ addChart(charts: ChartMulti[], options?: ChartOpts): Slide;
3333
+ addConnector: (options: ConnectorProps) => Slide;
3334
+ addImage: (options: ImageProps) => Slide;
3335
+ addMedia: (options: MediaProps) => Slide;
3336
+ /** Embed an OLE object (Insert ▸ Object) whose bytes travel inside the `.pptx`. */
3337
+ addOleObject: (options: OleObjectProps) => Slide;
3338
+ addComment: (options: CommentProps) => Slide;
3339
+ addNotes: (notes: string | NotesProps | NotesProps[]) => Slide;
3340
+ addShape: (shapeName: SHAPE_NAME, options?: ShapeProps) => Slide;
3341
+ addTable: (tableRows: TableRow[], options?: TableProps) => Slide;
3342
+ addText: (text: string | number | TextProps[], options?: TextPropsOptions) => Slide;
3343
+ addAnimation: (options: AnimationProps) => Slide;
3344
+ /** Group child object descriptors into a single PowerPoint group (`<p:grpSp>`). */
3345
+ addGroup: (children: GroupChildProps[], options?: GroupProps) => Slide;
3346
+ /** Group objects already on this slide, addressed by their `objectName`, into a single group. */
3347
+ groupObjects: (objectNames: string[], options?: GroupProps) => Slide;
3348
+ readonly newAutoPagedSlides?: Slide[];
3349
+ /**
3350
+ * Slide-show transition played when advancing to this slide (`p:transition`).
3351
+ * @example slide.transition = { type: 'fade', durationMs: 1500 }
3352
+ */
3353
+ transition?: TransitionProps;
3354
+ /**
3355
+ * Slide width in inches, resolved from the active presentation layout.
3356
+ * Use for coordinate math instead of hard-coding layout dimensions.
3357
+ * @example slide.addText('Centered', { x: 0, w: slide.width, align: 'center' })
3358
+ */
3359
+ readonly width?: number;
3360
+ /**
3361
+ * Slide height in inches, resolved from the active presentation layout.
3362
+ */
3363
+ readonly height?: number;
3364
+ /**
3365
+ * Background color or image (`color` | `path` | `data`)
3366
+ * @example { color: 'FF3399' } - hex color
3367
+ * @example { color: 'FF3399', transparency:50 } - hex color with 50% transparency
3368
+ * @example { path: 'https://onedrives.com/myimg.png` } - retrieve image via URL
3369
+ * @example { path: '/home/user/images/myimg.png` } - retrieve image via local path
3370
+ * @example { data: 'image/png;base64,iVtDaDrF[...]=' } - base64 string
3371
+ */
3372
+ background?: BackgroundProps;
3373
+ /**
3374
+ * Default text color (hex format)
3375
+ * @example 'FF3399'
3376
+ * @default '000000' (DEF_FONT_COLOR)
3377
+ */
3378
+ color?: HexColor;
3379
+ /**
3380
+ * Whether slide is hidden
3381
+ * @default false
3382
+ */
3383
+ hidden?: boolean;
3384
+ /**
3385
+ * Slide number options
3386
+ */
3387
+ slideNumber?: SlideNumberProps;
3388
+ }
3389
+ interface AddSlideProps {
3390
+ /** Title of the slide master to use for the new slide (the `title` passed to {@link SlideMasterProps} via `defineSlideMaster`). */
3391
+ masterTitle?: string;
3392
+ sectionTitle?: string;
3393
+ }
3394
+ //#endregion
3395
+ export { LinearGradientFillProps as $, CommentProps as $t, ImageBaseProps as A, ChartPropsChartBar as At, ShapeGuide as B, ChartPropsChartWaterfall as Bt, TableRow as C, ChartLineDash as Ct, TableToSlidesDocument as D, ChartPropsAxisSer as Dt, TableStyleRegionProps as E, ChartPropsAxisCat as Et, ShapeAdjustHandle as F, ChartPropsChartPie as Ft, DataOrPathProps as G, ChartPropsTitle as Gt, BackgroundProps as H, ChartPropsDataTable as Ht, ShapeAdjustHandlePolar as I, ChartPropsChartRadar as It, GradientFillProps as J, OptsChartData as Jt, DataOrPathRequiredProps as K, ChartSeriesOpts as Kt, ShapeAdjustHandleXY as L, ChartPropsChartRegionMap as Lt, MediaProps as M, ChartPropsChartDoughnut as Mt, MediaType as N, ChartPropsChartHistogram as Nt, TableToSlidesElement as O, ChartPropsAxisVal as Ot, OleObjectProps as P, ChartPropsChartLine as Pt, ImageFillProps as Q, PlaceholderProps as Qt, ShapeAdjustValue as R, ChartPropsChartStock as Rt, TableProps as S, ChartExStatistics as St, TableStyleProps as T, ChartOpts as Tt, Color as U, ChartPropsFillLine as Ut, ShapeProps as V, ChartPropsDataLabel as Vt, Coord as W, ChartPropsLegend as Wt, HAlign as X, ObjectLockProps as Xt, GradientStopProps as Y, OptsChartGridLine as Yt, HexColor as Z, ObjectNameProps as Zt, TransitionProps as _, ChartAxisTickMark as _t, Slide as a, SlideComment as an, TextVertType as at, TableCell as b, ChartExBinning as bt, MasterTextStyleLevel as c, TextBaseProps as cn, BorderProps as ct, SlideMasterObject as d, TextMeasurement as dn, HyperlinkActionJump as dt, MeasureTextOptions as en, Margin as et, SlideMasterProps as f, TextProps as fn, HyperlinkProps as ft, PresetEffect as g, ChartAreaProps as gt, AnimationTrigger as h, textRuns as hn, ShapeLineProps as ht, ObjectOptions as i, ResolvedCommentAuthor as in, RadialGradientFillProps as it, ImageProps as j, ChartPropsChartBoxWhisker as jt, TableToSlidesProps as k, ChartPropsBase as kt, MasterTextStyleProps as l, TextFitShrinkProps as ln, ConnectorProps as lt, AnimationProps as m, textRun as mn, ShapeFillProps as mt, GroupChildProps as n, NotesTextOptions as nn, PatternPreset as nt, SlideLayout as o, TableCellLayout as on, ThemeColor as ot, SlideNumberProps as p, TextPropsOptions as pn, ShadowProps as pt, GeometryPoint as q, LineCap as qt, GroupProps as r, OverflowBoxOptions as rn, PositionProps as rt, MasterBulletProps as s, TableLayoutResult as sn, VAlign as st, AddSlideProps as t, NotesProps as tn, PatternFillProps as tt, SlideMasterChartProps as u, TextGlowProps as un, ConnectorType as ut, TransitionSoundProps as v, ChartDataPointStyle as vt, TableRowSlide as w, ChartMulti as wt, TableCellProps as x, ChartExGeography as xt, TransitionType as y, ChartErrorBarOptions as yt, ShapeConnectionSite as z, ChartPropsChartSurface as zt };
3396
+ //# sourceMappingURL=slide-B6mDaM-P.d.ts.map