@shbernal/ts-pptx 4.0.1 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/README.md +147 -114
  2. package/dist/anim-presets-Qbgh8uut.js +55 -0
  3. package/dist/anim-presets-Qbgh8uut.js.map +1 -0
  4. package/dist/{autopage-odPz7zZO.js → autopage-DqZ37VpL.js} +11 -12
  5. package/dist/autopage-DqZ37VpL.js.map +1 -0
  6. package/dist/{binary-string-CKVAYI3M.js → binary-string-Ba8VM3b9.js} +3 -4
  7. package/dist/binary-string-Ba8VM3b9.js.map +1 -0
  8. package/dist/{body-insets-Dw_BeWD_.js → body-insets-BDHymJvz.js} +7 -9
  9. package/dist/body-insets-BDHymJvz.js.map +1 -0
  10. package/dist/browser.d.ts +24 -16
  11. package/dist/browser.d.ts.map +1 -1
  12. package/dist/browser.js +19 -19
  13. package/dist/browser.js.map +1 -1
  14. package/dist/{image-size-CvN2iCA4.js → chart-metadata-CwiTTcJq.js} +634 -537
  15. package/dist/chart-metadata-CwiTTcJq.js.map +1 -0
  16. package/dist/{clip-Bl01BPcN.d.ts → clip-ISfCMtWA.d.ts} +6 -10
  17. package/dist/clip-ISfCMtWA.d.ts.map +1 -0
  18. package/dist/{notes-Dh12JAbn.js → comments-CKIZYRbZ.js} +530 -401
  19. package/dist/comments-CKIZYRbZ.js.map +1 -0
  20. package/dist/{diagnostics-D8ot4Ei7.d.ts → diagnostics-MoA4MBq5.d.ts} +55 -53
  21. package/dist/diagnostics-MoA4MBq5.d.ts.map +1 -0
  22. package/dist/{embedded-fonts-DarT9aoa.d.ts → embedded-fonts-U7HIIhPO.d.ts} +4 -6
  23. package/dist/embedded-fonts-U7HIIhPO.d.ts.map +1 -0
  24. package/dist/{entry-compose-DCnvBZz2.d.ts → entry-compose-CiakSt-f.d.ts} +62 -81
  25. package/dist/entry-compose-CiakSt-f.d.ts.map +1 -0
  26. package/dist/{errors-C4oENPcu.js → entry-errors-JMthgJ2g.js} +45 -29
  27. package/dist/entry-errors-JMthgJ2g.js.map +1 -0
  28. package/dist/{table-cell-margins-EVg0EwxT.js → enums-BP9wsb9Q.js} +44 -47
  29. package/dist/enums-BP9wsb9Q.js.map +1 -0
  30. package/dist/{enums-BUKTUB6V.d.ts → enums-PcXr3o3J.d.ts} +13 -14
  31. package/dist/{enums-BUKTUB6V.d.ts.map → enums-PcXr3o3J.d.ts.map} +1 -1
  32. package/dist/families.d.ts +24 -26
  33. package/dist/families.d.ts.map +1 -1
  34. package/dist/families.js +3 -4
  35. package/dist/{fit-Cb7naFj6.js → fit-Bpmzep6O.js} +64 -56
  36. package/dist/fit-Bpmzep6O.js.map +1 -0
  37. package/dist/{font-metrics-v5fn7s7e.d.ts → font-metrics-DTppw4t3.d.ts} +62 -38
  38. package/dist/font-metrics-DTppw4t3.d.ts.map +1 -0
  39. package/dist/{grid-DikTjFey.js → grid-DUIMxjfl.js} +23 -26
  40. package/dist/grid-DUIMxjfl.js.map +1 -0
  41. package/dist/{html-dom-Iuog2wdK.js → html-dom-LZCgntnJ.js} +46 -47
  42. package/dist/html-dom-LZCgntnJ.js.map +1 -0
  43. package/dist/html.d.ts +53 -9
  44. package/dist/html.d.ts.map +1 -1
  45. package/dist/html.js +12 -13
  46. package/dist/html.js.map +1 -1
  47. package/dist/index.d.ts +21 -13
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +15 -15
  50. package/dist/index.js.map +1 -1
  51. package/dist/inspect.d.ts +16 -18
  52. package/dist/inspect.d.ts.map +1 -1
  53. package/dist/inspect.js +18 -19
  54. package/dist/inspect.js.map +1 -1
  55. package/dist/{text-anchor-CrYXAfUu.js → lock-attrs-CSQnFDHP.js} +62 -12
  56. package/dist/lock-attrs-CSQnFDHP.js.map +1 -0
  57. package/dist/math.d.ts +2 -4
  58. package/dist/math.d.ts.map +1 -1
  59. package/dist/math.js +12 -13
  60. package/dist/math.js.map +1 -1
  61. package/dist/measure.d.ts +23 -12
  62. package/dist/measure.d.ts.map +1 -1
  63. package/dist/measure.js +3 -3
  64. package/dist/node.d.ts +21 -13
  65. package/dist/node.d.ts.map +1 -1
  66. package/dist/node.js +12 -12
  67. package/dist/node.js.map +1 -1
  68. package/dist/{options-internal-WqgMf720.js → options-internal-BWgmLPdx.js} +4 -5
  69. package/dist/options-internal-BWgmLPdx.js.map +1 -0
  70. package/dist/{package-J49Ck6S2.d.ts → package-CANBWuSm.d.ts} +9 -13
  71. package/dist/package-CANBWuSm.d.ts.map +1 -0
  72. package/dist/{playbtn-CUqQdoDf.js → playbtn-BQZFJir9.js} +4 -5
  73. package/dist/playbtn-BQZFJir9.js.map +1 -0
  74. package/dist/{pres-C6qgOFAa.d.ts → pres-BkEkUAEM.d.ts} +410 -237
  75. package/dist/pres-BkEkUAEM.d.ts.map +1 -0
  76. package/dist/{presentation-DGYlAWhl.js → presentation-4Ggq0_Xa.js} +470 -315
  77. package/dist/presentation-4Ggq0_Xa.js.map +1 -0
  78. package/dist/{presentation-types-8jLQHI4M.d.ts → presentation-types-BgnZR-0a.d.ts} +1119 -468
  79. package/dist/presentation-types-BgnZR-0a.d.ts.map +1 -0
  80. package/dist/read.d.ts +18 -13
  81. package/dist/read.d.ts.map +1 -1
  82. package/dist/read.js +4 -4
  83. package/dist/script.d.ts +116 -65
  84. package/dist/script.d.ts.map +1 -1
  85. package/dist/script.js +2700 -780
  86. package/dist/script.js.map +1 -1
  87. package/dist/{shapes-re0KyQk_.js → shapes-CAPOjU0Q.js} +1564 -491
  88. package/dist/shapes-CAPOjU0Q.js.map +1 -0
  89. package/dist/{slide-Dx2ZeVZ6.d.ts → slide-BmT4kMoO.d.ts} +102 -89
  90. package/dist/slide-BmT4kMoO.d.ts.map +1 -0
  91. package/dist/{slide-size-BalTjFuv.js → slide-size-SkScz1ig.js} +2 -3
  92. package/dist/{slide-size-BalTjFuv.js.map → slide-size-SkScz1ig.js.map} +1 -1
  93. package/dist/{table-dom-BTDP3lEP.js → table-dom-BYga4FYY.js} +4 -5
  94. package/dist/{table-dom-BTDP3lEP.js.map → table-dom-BYga4FYY.js.map} +1 -1
  95. package/dist/{text-sN64Otf_.js → text-CU08xJGs.js} +393 -344
  96. package/dist/text-CU08xJGs.js.map +1 -0
  97. package/dist/{transition-speed-kUEWDWTx.js → transition-speed-CNJ0fSpQ.js} +2 -3
  98. package/dist/{transition-speed-kUEWDWTx.js.map → transition-speed-CNJ0fSpQ.js.map} +1 -1
  99. package/dist/{units-internal-XJlf-hOl.js → units-internal-BR3a4cIi.js} +34 -32
  100. package/dist/units-internal-BR3a4cIi.js.map +1 -0
  101. package/dist/{zip-CKd8ihcf.js → zip-7JTh61LX.js} +8 -10
  102. package/dist/zip-7JTh61LX.js.map +1 -0
  103. package/dist/{zip-C0leZZMj.d.ts → zip-uUjs9Cqx.d.ts} +4 -6
  104. package/dist/zip-uUjs9Cqx.d.ts.map +1 -0
  105. package/dist/zip.d.ts +3 -3
  106. package/dist/zip.js +3 -3
  107. package/dist/{zoom-DPUHh85d.js → zoom-CSSeOwM8.js} +1204 -620
  108. package/dist/zoom-CSSeOwM8.js.map +1 -0
  109. package/package.json +27 -28
  110. package/skills/{ts-pptx-upstream → pptx-ts-upstream}/SKILL.md +37 -84
  111. package/dist/autopage-odPz7zZO.js.map +0 -1
  112. package/dist/binary-string-CKVAYI3M.js.map +0 -1
  113. package/dist/body-insets-Dw_BeWD_.js.map +0 -1
  114. package/dist/clip-Bl01BPcN.d.ts.map +0 -1
  115. package/dist/diagnostics-D8ot4Ei7.d.ts.map +0 -1
  116. package/dist/embedded-fonts-DarT9aoa.d.ts.map +0 -1
  117. package/dist/entry-compose-DCnvBZz2.d.ts.map +0 -1
  118. package/dist/errors-C4oENPcu.js.map +0 -1
  119. package/dist/fit-Cb7naFj6.js.map +0 -1
  120. package/dist/font-metrics-v5fn7s7e.d.ts.map +0 -1
  121. package/dist/grid-DikTjFey.js.map +0 -1
  122. package/dist/html-dom-Iuog2wdK.js.map +0 -1
  123. package/dist/image-size-CvN2iCA4.js.map +0 -1
  124. package/dist/notes-Dh12JAbn.js.map +0 -1
  125. package/dist/options-internal-WqgMf720.js.map +0 -1
  126. package/dist/package-J49Ck6S2.d.ts.map +0 -1
  127. package/dist/playbtn-CUqQdoDf.js.map +0 -1
  128. package/dist/pres-C6qgOFAa.d.ts.map +0 -1
  129. package/dist/presentation-DGYlAWhl.js.map +0 -1
  130. package/dist/presentation-types-8jLQHI4M.d.ts.map +0 -1
  131. package/dist/shapes-re0KyQk_.js.map +0 -1
  132. package/dist/slide-Dx2ZeVZ6.d.ts.map +0 -1
  133. package/dist/table-cell-margins-EVg0EwxT.js.map +0 -1
  134. package/dist/text-anchor-CrYXAfUu.js.map +0 -1
  135. package/dist/text-sN64Otf_.js.map +0 -1
  136. package/dist/units-internal-XJlf-hOl.js.map +0 -1
  137. package/dist/zip-C0leZZMj.d.ts.map +0 -1
  138. package/dist/zip-CKd8ihcf.js.map +0 -1
  139. package/dist/zoom-DPUHh85d.js.map +0 -1
@@ -1,5 +1,4 @@
1
- import { c as PLACEHOLDER_TYPE, d as SHAPE_NAME, i as CHART_NAME, v as WRITE_OUTPUT_TYPE } from "./enums-BUKTUB6V.js";
2
- //#region src/ooxml/st-enums.d.ts
1
+ import { c as PLACEHOLDER_TYPE, d as SHAPE_NAME, i as CHART_NAME, v as WRITE_OUTPUT_TYPE } from "./enums-PcXr3o3J.js";
3
2
  /**
4
3
  * `ST_` simple-type enumerations from ECMA-376, declared once as the single source of both the
5
4
  * TypeScript union a caller is checked against and the runtime list a value is validated against.
@@ -12,7 +11,7 @@ import { c as PLACEHOLDER_TYPE, d as SHAPE_NAME, i as CHART_NAME, v as WRITE_OUT
12
11
  * which is harmless, but nothing would have caught a divergence in *content*.
13
12
  *
14
13
  * **The shape.** Every entry is a `readonly` tuple declared `as const`, with its union derived via
15
- * `(typeof X)[number]`. Widening the tuple widens the union in the same edit — they cannot drift.
14
+ * `(typeof X)[number]`. Widening the tuple widens the union in the same edit, so they cannot drift.
16
15
  * This is the idiom `EXTRA_SHAPE_PRESETS` already used; this module brings the stragglers onto it,
17
16
  * and holds a few closed schema lists that are not `ST_` types, such as `EMBEDDED_FONT_SLOTS`.
18
17
  *
@@ -30,19 +29,19 @@ import { c as PLACEHOLDER_TYPE, d as SHAPE_NAME, i as CHART_NAME, v as WRITE_OUT
30
29
  * unfinished for a while. `src/types/chart.ts`
31
30
  * hand-wrote four of those unions beside the option that takes them and typed the other three as
32
31
  * bare `string`, so `barDir` carried no compile-time check at all, and `dataLabelPosition`'s
33
- * hand-written union was missing `inBase` — a value the validator accepts on a stacked bar, so
32
+ * hand-written union was missing `inBase`, a value the validator accepts on a stacked bar, so
34
33
  * the two spellings had already diverged in content. Both are gone: for every option here, the
35
34
  * type a caller is checked against and the tuple the validator checks are one declaration.
36
35
  */
37
- /** `ST_TextAutonumberScheme` — the numbering an auto-numbered bullet counts in (`a:buAutoNum/@type`). */
36
+ /** `ST_TextAutonumberScheme`: the numbering an auto-numbered bullet counts in (`a:buAutoNum/@type`). */
38
37
  declare const TEXT_AUTONUM_SCHEMES: readonly ['alphaLcParenBoth', 'alphaUcParenBoth', 'alphaLcParenR', 'alphaUcParenR', 'alphaLcPeriod', 'alphaUcPeriod', 'arabicParenBoth', 'arabicParenR', 'arabicPeriod', 'arabicPlain', 'romanLcParenBoth', 'romanUcParenBoth', 'romanLcParenR', 'romanUcParenR', 'romanLcPeriod', 'romanUcPeriod', 'circleNumDbPlain', 'circleNumWdBlackPlain', 'circleNumWdWhitePlain', 'arabicDbPeriod', 'arabicDbPlain', 'ea1ChsPeriod', 'ea1ChsPlain', 'ea1ChtPeriod', 'ea1ChtPlain', 'ea1JpnChsDbPeriod', 'ea1JpnKorPlain', 'ea1JpnKorPeriod', 'arabic1Minus', 'arabic2Minus', 'hebrew2Minus', 'thaiAlphaPeriod', 'thaiAlphaParenR', 'thaiAlphaParenBoth', 'thaiNumPeriod', 'thaiNumParenR', 'thaiNumParenBoth', 'hindiAlphaPeriod', 'hindiNumPeriod', 'hindiNumParenR', 'hindiAlpha1Period'];
39
- /** `ST_TextStrikeType` — a run's strikethrough (`a:rPr/@strike`). */
38
+ /** `ST_TextStrikeType`: a run's strikethrough (`a:rPr/@strike`). */
40
39
  declare const TEXT_STRIKE_TYPES: readonly ['noStrike', 'sngStrike', 'dblStrike'];
41
- /** `ST_TextCapsType` — a run's capitalization (`a:rPr/@cap`). */
40
+ /** `ST_TextCapsType`: a run's capitalization (`a:rPr/@cap`). */
42
41
  declare const TEXT_CAPS_TYPES: readonly ['none', 'small', 'all'];
43
- /** `ST_TextUnderlineType` — a run's underline (`a:rPr/@u`). */
42
+ /** `ST_TextUnderlineType`: a run's underline (`a:rPr/@u`). */
44
43
  declare const TEXT_UNDERLINE_TYPES: readonly ['none', 'words', 'sng', 'dbl', 'heavy', 'dotted', 'dottedHeavy', 'dash', 'dashHeavy', 'dashLong', 'dashLongHeavy', 'dotDash', 'dotDashHeavy', 'dotDotDash', 'dotDotDashHeavy', 'wavy', 'wavyHeavy', 'wavyDbl'];
45
- /** `ST_TextTabAlignType` — a tab stop's alignment (`a:tab/@algn`). */
44
+ /** `ST_TextTabAlignType`: a tab stop's alignment (`a:tab/@algn`). */
46
45
  declare const TEXT_TAB_ALIGN_TYPES: readonly ['l', 'ctr', 'r', 'dec'];
47
46
  /**
48
47
  * The base slide transitions: the `p:` type elements of `CT_SlideTransition`'s choice, in its
@@ -53,43 +52,47 @@ declare const TEXT_TAB_ALIGN_TYPES: readonly ['l', 'ctr', 'r', 'dec'];
53
52
  */
54
53
  declare const TRANSITION_TYPES: readonly ['blinds', 'checker', 'circle', 'dissolve', 'comb', 'cover', 'cut', 'diamond', 'fade', 'newsflash', 'plus', 'pull', 'push', 'random', 'randomBar', 'split', 'strips', 'wedge', 'wheel', 'wipe', 'zoom'];
55
54
  /**
56
- * `ST_BevelPresetType` — the bevel profile applied to a 3-D edge.
55
+ * `ST_BevelPresetType`: the bevel profile applied to a 3-D edge.
57
56
  * @see ECMA-376 Part 1 §20.1.10.9
58
57
  */
59
58
  declare const BEVEL_PRESETS: readonly ['relaxedInset', 'circle', 'slope', 'cross', 'angle', 'softRound', 'convex', 'coolSlant', 'divot', 'riblet', 'hardEdge', 'artDeco'];
60
59
  type BevelPresetType = (typeof BEVEL_PRESETS)[number];
61
60
  /**
62
- * `ST_PresetMaterialType` — how a 3-D surface responds to light.
61
+ * `ST_PresetMaterialType`: how a 3-D surface responds to light.
63
62
  * @see ECMA-376 Part 1 §20.1.10.50
64
63
  */
65
64
  declare const PRESET_MATERIALS: readonly ['legacyMatte', 'legacyPlastic', 'legacyMetal', 'legacyWireframe', 'matte', 'plastic', 'metal', 'warmMatte', 'translucentPowder', 'powder', 'dkEdge', 'softEdge', 'clear', 'flat', 'softmetal'];
66
65
  type PresetMaterialType = (typeof PRESET_MATERIALS)[number];
67
66
  /**
68
- * `ST_LightRigType` — the preset lighting scene.
67
+ * `ST_LightRigType`: the preset lighting scene.
69
68
  * @see ECMA-376 Part 1 §20.1.10.35
70
69
  */
71
70
  declare const LIGHT_RIGS: readonly ['legacyFlat1', 'legacyFlat2', 'legacyFlat3', 'legacyFlat4', 'legacyNormal1', 'legacyNormal2', 'legacyNormal3', 'legacyNormal4', 'legacyHarsh1', 'legacyHarsh2', 'legacyHarsh3', 'legacyHarsh4', 'threePt', 'balanced', 'soft', 'harsh', 'flood', 'contrasting', 'morning', 'sunrise', 'sunset', 'chilly', 'freezing', 'flat', 'twoPt', 'glow', 'brightRoom'];
72
71
  type LightRigType = (typeof LIGHT_RIGS)[number];
73
72
  /**
74
- * `ST_LightRigDirection` — where the light rig sits relative to the scene.
73
+ * `ST_LightRigDirection`: where the light rig sits relative to the scene.
75
74
  * @see ECMA-376 Part 1 §20.1.10.33
76
75
  */
77
76
  declare const LIGHT_RIG_DIRECTIONS: readonly ['tl', 't', 'tr', 'l', 'r', 'bl', 'b', 'br'];
78
77
  type LightRigDirection = (typeof LIGHT_RIG_DIRECTIONS)[number];
79
78
  /**
80
- * `ST_TextHorzOverflowType` — `a:bodyPr/@horzOverflow` and `a:tcPr/@horzOverflow`.
79
+ * `ST_TextHorzOverflowType`: `a:bodyPr/@horzOverflow` and `a:tcPr/@horzOverflow`.
81
80
  * @see ECMA-376 Part 1 §20.1.10.68
82
81
  */
83
82
  declare const TEXT_HORZ_OVERFLOW: readonly ['clip', 'overflow'];
84
83
  type TextHorzOverflowType = (typeof TEXT_HORZ_OVERFLOW)[number];
85
84
  /**
86
- * `ST_TextVerticalType` — `a:bodyPr/@vert` and `a:tcPr/@vert`.
85
+ * `ST_PresetPatternVal`: `a:pattFill/@prst`, the hatch a pattern fill draws.
86
+ */
87
+ declare const PATTERN_PRESETS: readonly ['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'];
88
+ /**
89
+ * `ST_TextVerticalType`: `a:bodyPr/@vert` and `a:tcPr/@vert`.
87
90
  * @see ECMA-376 Part 1 §20.1.10.83
88
91
  */
89
92
  declare const TEXT_VERTICAL: readonly ['horz', 'vert', 'vert270', 'wordArtVert', 'eaVert', 'mongolianVert', 'wordArtVertRtl'];
90
93
  type TextVerticalType = (typeof TEXT_VERTICAL)[number];
91
94
  /**
92
- * `ST_LineEndType` — the arrowhead at either end of a stroke (`a:headEnd/@type`,
95
+ * `ST_LineEndType`: the arrowhead at either end of a stroke (`a:headEnd/@type`,
93
96
  * `a:tailEnd/@type`).
94
97
  * @see ECMA-376 Part 1 §20.1.10.33
95
98
  */
@@ -105,17 +108,24 @@ declare const LINE_END_TYPES: readonly ['none', 'triangle', 'stealth', 'diamond'
105
108
  declare const EMBEDDED_FONT_SLOTS: readonly ['regular', 'bold', 'italic', 'boldItalic'];
106
109
  type LineEndType = (typeof LINE_END_TYPES)[number];
107
110
  /**
108
- * `ST_TextShapeType` — the preset path text is bent along (`a:prstTxWarp/@prst`), which
111
+ * `ST_PlaceholderType`: the kind of placeholder a `p:ph` fills (`p:ph/@type`). Absent, it means
112
+ * `obj`.
113
+ * @see ECMA-376 Part 1 §19.7.10
114
+ */
115
+ declare const PLACEHOLDER_TYPES: readonly ['title', 'body', 'ctrTitle', 'subTitle', 'dt', 'sldNum', 'ftr', 'hdr', 'obj', 'chart', 'tbl', 'clipArt', 'dgm', 'media', 'sldImg', 'pic'];
116
+ type PlaceholderXmlType = (typeof PLACEHOLDER_TYPES)[number];
117
+ /**
118
+ * `ST_TextShapeType`: the preset path text is bent along (`a:prstTxWarp/@prst`), which
109
119
  * PowerPoint calls WordArt.
110
120
  *
111
121
  * `textNoShape` is the identity member: it is legal, and it warps nothing. The library does not
112
- * narrow this set — every member is a shape PowerPoint draws.
122
+ * narrow this set: every member is a shape PowerPoint draws.
113
123
  * @see ECMA-376 Part 1 §20.1.10.76
114
124
  */
115
125
  declare const TEXT_SHAPE_TYPES: readonly ['textNoShape', 'textPlain', 'textStop', 'textTriangle', 'textTriangleInverted', 'textChevron', 'textChevronInverted', 'textRingInside', 'textRingOutside', 'textArchUp', 'textArchDown', 'textCircle', 'textButton', 'textArchUpPour', 'textArchDownPour', 'textCirclePour', 'textButtonPour', 'textCurveUp', 'textCurveDown', 'textCanUp', 'textCanDown', 'textWave1', 'textWave2', 'textDoubleWave1', 'textWave4', 'textInflate', 'textDeflate', 'textInflateBottom', 'textDeflateBottom', 'textInflateTop', 'textDeflateTop', 'textDeflateInflate', 'textDeflateInflateDeflate', 'textFadeRight', 'textFadeLeft', 'textFadeUp', 'textFadeDown', 'textSlantUp', 'textSlantDown', 'textCascadeUp', 'textCascadeDown'];
116
126
  type TextShapeType = (typeof TEXT_SHAPE_TYPES)[number];
117
127
  /**
118
- * `ST_PresetLineDashVal` — the dash pattern of a line or border (`a:prstDash/@val`).
128
+ * `ST_PresetLineDashVal`: the dash pattern of a line or border (`a:prstDash/@val`).
119
129
  *
120
130
  * The `sys*` members are the "system" dashes whose exact dot/gap ratio the renderer picks; the
121
131
  * rest are defined by the spec. Both `BorderProps.dashType` and `ShapeLineProps.dashType` accept
@@ -125,26 +135,26 @@ type TextShapeType = (typeof TEXT_SHAPE_TYPES)[number];
125
135
  declare const PRESET_LINE_DASHES: readonly ['solid', 'dot', 'dash', 'lgDash', 'dashDot', 'lgDashDot', 'lgDashDotDot', 'sysDash', 'sysDot', 'sysDashDot', 'sysDashDotDot'];
126
136
  type PresetLineDashVal = (typeof PRESET_LINE_DASHES)[number];
127
137
  /**
128
- * `ST_BarDir` — whether a bar/column plot runs horizontally or vertically (`c:barDir/@val`).
138
+ * `ST_BarDir`: whether a bar/column plot runs horizontally or vertically (`c:barDir/@val`).
129
139
  * @see ECMA-376 Part 1 §21.2.3.3
130
140
  */
131
141
  declare const BAR_DIRECTIONS: readonly ['bar', 'col'];
132
142
  type BarDirection = (typeof BAR_DIRECTIONS)[number];
133
143
  /**
134
- * `ST_BarGrouping` — how a bar/column plot stacks its series (`c:grouping/@val` inside
144
+ * `ST_BarGrouping`: how a bar/column plot stacks its series (`c:grouping/@val` inside
135
145
  * `c:barChart`/`c:bar3DChart`).
136
146
  * @see ECMA-376 Part 1 §21.2.3.4
137
147
  */
138
148
  declare const BAR_GROUPINGS: readonly ['percentStacked', 'clustered', 'standard', 'stacked'];
139
149
  type BarGrouping = (typeof BAR_GROUPINGS)[number];
140
150
  /**
141
- * `ST_Shape` — the solid a 3-D bar is drawn as (`c:shape/@val`).
151
+ * `ST_Shape`: the solid a 3-D bar is drawn as (`c:shape/@val`).
142
152
  * @see ECMA-376 Part 1 §21.2.3.35
143
153
  */
144
154
  declare const BAR_3D_SHAPES: readonly ['cone', 'coneToMax', 'box', 'cylinder', 'pyramid', 'pyramidToMax'];
145
155
  type Bar3DShape = (typeof BAR_3D_SHAPES)[number];
146
156
  /**
147
- * `ST_RadarStyle` — how a radar plot is drawn (`c:radarStyle/@val`).
157
+ * `ST_RadarStyle`: how a radar plot is drawn (`c:radarStyle/@val`).
148
158
  * @see ECMA-376 Part 1 §21.2.3.33
149
159
  */
150
160
  declare const RADAR_STYLES: readonly ['standard', 'marker', 'filled'];
@@ -156,8 +166,8 @@ type RadarStyle = (typeof RADAR_STYLES)[number];
156
166
  * what made the other two read as typos rather than as a second vocabulary.
157
167
  *
158
168
  * Both spellings are accepted on the public option and normalized to the wire one at definition
159
- * time. Before that, `radarStyle: 'marker'` — the schema's word, and the obvious guess for anyone
160
- * reading a chart part — failed the enum check and silently fell back to `standard`, so a caller
169
+ * time. Before that, `radarStyle: 'marker'` (the schema's word, and the obvious guess for anyone
170
+ * reading a chart part) failed the enum check and silently fell back to `standard`, so a caller
161
171
  * asking for markers got a plain radar.
162
172
  */
163
173
  declare const RADAR_STYLE_ALIASES: {
@@ -166,21 +176,21 @@ declare const RADAR_STYLE_ALIASES: {
166
176
  };
167
177
  type RadarStyleAlias = keyof typeof RADAR_STYLE_ALIASES;
168
178
  /**
169
- * `ST_LegendPos` — where the legend sits relative to the plot area (`c:legendPos/@val`).
179
+ * `ST_LegendPos`: where the legend sits relative to the plot area (`c:legendPos/@val`).
170
180
  * @see ECMA-376 Part 1 §21.2.3.24
171
181
  */
172
182
  declare const LEGEND_POSITIONS: readonly ['b', 'tr', 'l', 'r', 't'];
173
183
  type LegendPosition = (typeof LEGEND_POSITIONS)[number];
174
184
  /**
175
- * `ST_DispBlanksAs` — what a plot draws where a value is missing (`c:dispBlanksAs/@val`).
185
+ * `ST_DispBlanksAs`: what a plot draws where a value is missing (`c:dispBlanksAs/@val`).
176
186
  * @see ECMA-376 Part 1 §21.2.3.10
177
187
  */
178
188
  declare const DISPLAY_BLANKS_AS: readonly ['span', 'gap', 'zero'];
179
189
  type DisplayBlanksAs = (typeof DISPLAY_BLANKS_AS)[number];
180
190
  /**
181
- * `ST_DLblPos` — where a data label sits relative to its point (`c:dLblPos/@val`).
191
+ * `ST_DLblPos`: where a data label sits relative to its point (`c:dLblPos/@val`).
182
192
  *
183
- * The whole set is legal on the attribute, but only a subset of it is legal *per plot type* —
193
+ * The whole set is legal on the attribute, but only a subset of it is legal *per plot type*:
184
194
  * PowerPoint offers a pie chart `bestFit`/`ctr`/`inEnd`/`outEnd` and nothing else. Those subsets
185
195
  * are a fact about the chart types rather than about the attribute, so they live beside the
186
196
  * chart definer that applies them; this is the value space they are drawn from.
@@ -193,43 +203,43 @@ type DataLabelPosition = (typeof DATA_LABEL_POSITIONS)[number];
193
203
  *
194
204
  * The schema also has `plus`, `star`, `x`, `picture` and `auto`. Neither PowerPoint 2013 nor
195
205
  * PowerPoint Online draws the first three, `picture` needs a `c:spPr` blip this API has no
196
- * spelling for, and `auto` is what leaving the option off already means — so the accepted set is
206
+ * spelling for, and `auto` is what leaving the option off already means, so the accepted set is
197
207
  * deliberately smaller than the type. Widen it only with evidence that the member renders.
198
208
  * @see ECMA-376 Part 1 §21.2.3.27
199
209
  */
200
210
  declare const LINE_DATA_SYMBOLS: readonly ['circle', 'dash', 'diamond', 'dot', 'none', 'square', 'triangle'];
201
211
  type LineDataSymbol = (typeof LINE_DATA_SYMBOLS)[number];
202
- /** `ST_TickLblPos` — where an axis draws its tick labels (`c:tickLblPos/@val`). */
212
+ /** `ST_TickLblPos`: where an axis draws its tick labels (`c:tickLblPos/@val`). */
203
213
  declare const TICK_LABEL_POSITIONS: readonly ['high', 'low', 'nextTo', 'none'];
204
214
  type TickLabelPosition = (typeof TICK_LABEL_POSITIONS)[number];
205
- /** `ST_Orientation` — which way an axis runs (`c:orientation/@val`). */
215
+ /** `ST_Orientation`: which way an axis runs (`c:orientation/@val`). */
206
216
  declare const AXIS_ORIENTATIONS: readonly ['maxMin', 'minMax'];
207
217
  type AxisOrientation = (typeof AXIS_ORIENTATIONS)[number];
208
- /** `ST_TickMark` — an axis' major or minor tick marks (`c:majorTickMark/@val`, `c:minorTickMark/@val`). */
218
+ /** `ST_TickMark`: an axis' major or minor tick marks (`c:majorTickMark/@val`, `c:minorTickMark/@val`). */
209
219
  declare const TICK_MARKS: readonly ['cross', 'in', 'none', 'out'];
210
220
  type TickMark = (typeof TICK_MARKS)[number];
211
- /** `ST_CrossBetween` — whether a value axis crosses its category axis between or on categories (`c:crossBetween/@val`). */
221
+ /** `ST_CrossBetween`: whether a value axis crosses its category axis between or on categories (`c:crossBetween/@val`). */
212
222
  declare const CROSS_BETWEEN: readonly ['between', 'midCat'];
213
223
  type CrossBetween = (typeof CROSS_BETWEEN)[number];
214
- /** `ST_BuiltInUnit` — the unit a value axis displays its labels in (`c:builtInUnit/@val`). */
224
+ /** `ST_BuiltInUnit`: the unit a value axis displays its labels in (`c:builtInUnit/@val`). */
215
225
  declare const BUILT_IN_UNITS: readonly ['hundreds', 'thousands', 'tenThousands', 'hundredThousands', 'millions', 'tenMillions', 'hundredMillions', 'billions', 'trillions'];
216
226
  type BuiltInUnit = (typeof BUILT_IN_UNITS)[number];
217
- /** `ST_TimeUnit` — a date axis' base, major or minor time unit (`c:baseTimeUnit/@val` and its two siblings). */
227
+ /** `ST_TimeUnit`: a date axis' base, major or minor time unit (`c:baseTimeUnit/@val` and its two siblings). */
218
228
  declare const TIME_UNITS: readonly ['days', 'months', 'years'];
219
229
  type TimeUnit = (typeof TIME_UNITS)[number];
220
- /** `ST_ErrDir` — the axis an error bar measures along (`c:errDir/@val`). */
230
+ /** `ST_ErrDir`: the axis an error bar measures along (`c:errDir/@val`). */
221
231
  declare const ERROR_BAR_DIRECTIONS: readonly ['x', 'y'];
222
232
  type ErrorBarDirection = (typeof ERROR_BAR_DIRECTIONS)[number];
223
- /** `ST_ErrBarType` — which sides of a point draw an error bar (`c:errBarType/@val`). */
233
+ /** `ST_ErrBarType`: which sides of a point draw an error bar (`c:errBarType/@val`). */
224
234
  declare const ERROR_BAR_TYPES: readonly ['both', 'minus', 'plus'];
225
235
  type ErrorBarType = (typeof ERROR_BAR_TYPES)[number];
226
- /** `ST_ErrValType` — how an error bar's amount is read (`c:errValType/@val`). */
236
+ /** `ST_ErrValType`: how an error bar's amount is read (`c:errValType/@val`). */
227
237
  declare const ERROR_BAR_VALUE_TYPES: readonly ['cust', 'fixedVal', 'percentage', 'stdDev', 'stdErr'];
228
238
  type ErrorBarValueType = (typeof ERROR_BAR_VALUE_TYPES)[number];
229
239
  /**
230
240
  * The twelve theme colour slots (`a:clrScheme` children) a `p:clrMap` token can point at.
231
241
  *
232
- * Not an `ST_` type — these are element names inside `a:CT_ColorScheme`, which the schema
242
+ * Not an `ST_` type: these are element names inside `a:CT_ColorScheme`, which the schema
233
243
  * declares as a fixed sequence rather than an enumeration. The effect is the same: a closed,
234
244
  * ordered set of twelve names, in the order the scheme declares them.
235
245
  * @see ECMA-376 Part 1 §20.1.6.2
@@ -241,13 +251,11 @@ type ThemeColorSlot = (typeof THEME_COLOR_SLOTS)[number];
241
251
  *
242
252
  * A slide's `schemeClr val="tx1"` names a *token*, not a slot: the master's `p:clrMap` is the
243
253
  * indirection that sends it to a {@link ThemeColorSlot}. Which is why the two lists look alike
244
- * and are not the same list — `bg1`/`tx1` are tokens, `lt1`/`dk1` are slots.
254
+ * and are not the same list: `bg1`/`tx1` are tokens, `lt1`/`dk1` are slots.
245
255
  * @see ECMA-376 Part 1 §19.3.1.6
246
256
  */
247
257
  declare const COLOR_MAP_TOKENS: readonly ['bg1', 'tx1', 'bg2', 'tx2', 'accent1', 'accent2', 'accent3', 'accent4', 'accent5', 'accent6', 'hlink', 'folHlink'];
248
258
  type ColorMapToken = (typeof COLOR_MAP_TOKENS)[number];
249
- //#endregion
250
- //#region src/types/shape.d.ts
251
259
  /**
252
260
  * A single preset-geometry adjustment guide (`<a:gd>` inside `<a:avLst>`).
253
261
  * - `name` is the guide name the preset defines, e.g. `'adj'`, `'adj1'`, `'adj2'`.
@@ -266,12 +274,12 @@ interface ShapeAdjustValue {
266
274
  * A geometry guide (`<a:gd>` inside a `custGeom`'s `<a:gdLst>`): a named construction formula
267
275
  * that connection sites, adjust handles, and the text rect can reference by name.
268
276
  * - `name` is a `ST_GeomGuideName` token, e.g. `'w2'`.
269
- * - `formula` is a `ST_GeomGuideFormula` — a space-delimited op + args string emitted verbatim,
277
+ * - `formula` is a `ST_GeomGuideFormula`: a space-delimited op + args string emitted verbatim,
270
278
  * e.g. the multiply-divide op `"* / w 1 2"` written without the inner space (w × 1 ÷ 2), or
271
279
  * `'val 10800'`. This is an advanced escape hatch: the arguments are not interpreted, only
272
280
  * escaped. The leading operation *is* checked against the 17 ECMA-376 §20.1.9.11 operations
273
281
  * (multiply-divide, add-subtract, add-divide, if-else, `abs`, `at2`, `cat2`, `cos`, `max`,
274
- * `min`, `mod`, `pin`, `sat2`, `sin`, `sqrt`, `tan`, `val` — see `GEOM_GUIDE_OPS` in
282
+ * `min`, `mod`, `pin`, `sat2`, `sin`, `sqrt`, `tan`, `val`; see `GEOM_GUIDE_OPS` in
275
283
  * `src/gen/drawingml/geometry.ts` for the literal tokens), because an unknown one emits
276
284
  * schema-shaped but semantically dead geometry that PowerPoint answers with a repair prompt;
277
285
  * such a guide is warned about and skipped.
@@ -293,7 +301,7 @@ interface ShapeConnectionSite {
293
301
  /** Y in the object's own space (like `points`), or a guide-name string emitted verbatim. */
294
302
  y: Coord | string;
295
303
  }
296
- /** An XY adjust handle (`<a:ahXY>`) — a draggable handle, optionally bound to guides. */
304
+ /** An XY adjust handle (`<a:ahXY>`): a draggable handle, optionally bound to guides. */
297
305
  interface ShapeAdjustHandleXY {
298
306
  x: Coord | string;
299
307
  y: Coord | string;
@@ -304,7 +312,7 @@ interface ShapeAdjustHandleXY {
304
312
  minY?: Coord | string;
305
313
  maxY?: Coord | string;
306
314
  }
307
- /** A polar adjust handle (`<a:ahPolar>`) — radius/angle rather than XY. */
315
+ /** A polar adjust handle (`<a:ahPolar>`): radius/angle rather than XY. */
308
316
  interface ShapeAdjustHandlePolar {
309
317
  x: Coord | string;
310
318
  y: Coord | string;
@@ -378,7 +386,7 @@ interface ShapeProps extends PositionProps, ObjectNameProps {
378
386
  line?: ShapeLineProps;
379
387
  /**
380
388
  * Points (only for ShapeType.custGeom)
381
- * - type: 'arc' (no end point — it is computed from the pen position, radii and sweep)
389
+ * - type: 'arc' (no end point; it is computed from the pen position, radii and sweep)
382
390
  * - `hR` Shape Arc Height Radius
383
391
  * - `wR` Shape Arc Width Radius
384
392
  * - `stAng` Shape Arc Start Angle (degrees, not wrapped into 0..360)
@@ -388,20 +396,20 @@ interface ShapeProps extends PositionProps, ObjectNameProps {
388
396
  */
389
397
  points?: GeometryPoint[];
390
398
  /**
391
- * Geometry guides (`<a:gdLst>`) for a `custGeom` shape — named construction formulas that
399
+ * Geometry guides (`<a:gdLst>`) for a `custGeom` shape: named construction formulas that
392
400
  * connection sites / adjust handles can reference. Advanced: each `formula` is emitted verbatim.
393
401
  * @example [{ name: 'w2', formula: 'val 10800' }]
394
402
  */
395
403
  guides?: ShapeGuide[];
396
404
  /**
397
- * Connection sites (`<a:cxnLst>`) for a `custGeom` shape — the points a connector can attach to.
405
+ * Connection sites (`<a:cxnLst>`) for a `custGeom` shape: the points a connector can attach to.
398
406
  * Positions are absolute in the object's own space (like `points`); a `startShapeIdx`/`endShapeIdx`
399
407
  * on an `addConnector` indexes into this list.
400
408
  * @example [{ ang: 0, x: 1, y: 0 }, { ang: 180, x: 0, y: 1 }]
401
409
  */
402
410
  connectionSites?: ShapeConnectionSite[];
403
411
  /**
404
- * Adjust handles (`<a:ahLst>`) for a `custGeom` shape — draggable handles (XY or polar),
412
+ * Adjust handles (`<a:ahLst>`) for a `custGeom` shape: draggable handles (XY or polar),
405
413
  * optionally bound to guides via `gdRef*`.
406
414
  */
407
415
  adjustHandles?: ShapeAdjustHandle[];
@@ -424,16 +432,14 @@ interface ShapeProps extends PositionProps, ObjectNameProps {
424
432
  */
425
433
  shadow?: ShadowProps;
426
434
  }
427
- //#endregion
428
- //#region src/types/media.d.ts
429
435
  type MediaType = 'audio' | 'online' | 'video';
430
- interface ImageBaseProps extends PositionProps, ObjectNameProps {
436
+ interface ImageBaseProps extends PlaceholderPositionProps, ObjectNameProps {
431
437
  /**
432
- * Sizing note (`w`/`h` inherited from {@link PositionProps}):
438
+ * Sizing note (`w`/`h` inherited from {@link PlaceholderPositionProps}):
433
439
  * - When a `data` (base64) image is supplied and `w`/`h` are omitted, the natural pixel
434
440
  * size is read from the image header (PNG/JPEG/GIF/BMP/WebP) and used at 96 DPI
435
441
  * (natural pixels / 96 = inches).
436
- * - When only one of `w`/`h` is given, the other is derived from the natural aspect ratio —
442
+ * - When only one of `w`/`h` is given, the other is derived from the natural aspect ratio,
437
443
  * for an SVG too, from its `width`/`height` or `viewBox`.
438
444
  * - A `path` image is measured at export time (its bytes are not available synchronously);
439
445
  * an omitted dimension falls back to 1 inch if it stays unmeasurable.
@@ -469,14 +475,17 @@ interface ImageBaseProps extends PositionProps, ObjectNameProps {
469
475
  */
470
476
  line?: ShapeLineProps;
471
477
  /**
472
- * Name of a picture placeholder defined on the slide layout/master to populate
478
+ * Name of a picture placeholder defined on the slide layout/master to populate, or a
479
+ * {@link PlaceholderBinding} that states the `p:ph` to write
473
480
  * - when it matches a layout/master placeholder, the image inherits that placeholder's
474
481
  * position and size for any of `x`/`y`/`w`/`h` not supplied explicitly;
475
482
  * explicit values always win
483
+ * - a name that matches none writes no `p:ph`; a binding's `idx` or `type` writes one regardless
476
484
  * @example 'picph'
485
+ * @example { type: 'pic', idx: 13 }
477
486
  * @see https://docs.microsoft.com/en-us/office/vba/api/powerpoint.ppplaceholdertype
478
487
  */
479
- placeholder?: string;
488
+ placeholder?: PlaceholderOption;
480
489
  /**
481
490
  * Image rotation (degrees)
482
491
  * - range: -360 to 360
@@ -531,8 +540,10 @@ interface ImageBaseProps extends PositionProps, ObjectNameProps {
531
540
  /**
532
541
  * Crop the source image to a sub-region by percentage edge insets, emitted verbatim
533
542
  * as OOXML `<a:srcRect>`.
534
- * - each value is the percent (0–100) trimmed off that edge of the *source* image, the
543
+ * - each value is the percent (at most 100) trimmed off that edge of the *source* image, the
535
544
  * same model PowerPoint's Picture Format > Crop uses; `l`+`r` and `t`+`b` must each be < 100
545
+ * - a negative value pads that edge with empty space instead, as PowerPoint's Fit crop and
546
+ * `sizing: 'contain'` do
536
547
  * - the remaining sub-region is stretched to fill the picture's displayed `w`×`h` box, so this
537
548
  * is the faithful way to reproduce a deck that maps several icons out of one composite raster
538
549
  * - operates on the source image directly (independent of natural-pixel measurement), so unlike
@@ -541,13 +552,13 @@ interface ImageBaseProps extends PositionProps, ObjectNameProps {
541
552
  * @example { l: 0, t: 0, r: 50, b: 50 } // keep the top-left quadrant of the source image
542
553
  */
543
554
  crop?: {
544
- /** Percent (0–100) trimmed from the left edge of the source image. @default 0 */
555
+ /** Percent trimmed from the left edge of the source image; negative pads it. @default 0 */
545
556
  l?: number;
546
- /** Percent (0–100) trimmed from the top edge of the source image. @default 0 */
557
+ /** Percent trimmed from the top edge of the source image; negative pads it. @default 0 */
547
558
  t?: number;
548
- /** Percent (0–100) trimmed from the right edge of the source image. @default 0 */
559
+ /** Percent trimmed from the right edge of the source image; negative pads it. @default 0 */
549
560
  r?: number;
550
- /** Percent (0–100) trimmed from the bottom edge of the source image. @default 0 */
561
+ /** Percent trimmed from the bottom edge of the source image; negative pads it. @default 0 */
551
562
  b?: number;
552
563
  };
553
564
  /**
@@ -559,7 +570,7 @@ interface ImageBaseProps extends PositionProps, ObjectNameProps {
559
570
  /**
560
571
  * Sizing type
561
572
  * - `cover` / `contain` fit the image into the `w`×`h` box using the image's *natural*
562
- * aspect ratio — read from the embedded PNG/JPEG/GIF/BMP/WebP header, or from an SVG's
573
+ * aspect ratio, read from the embedded PNG/JPEG/GIF/BMP/WebP header, or from an SVG's
563
574
  * `width`/`height` or `viewBox`. If the natural size cannot be determined (an
564
575
  * unrecognized format, or an SVG carrying neither) the displayed `w`/`h` ratio is used
565
576
  * as a fallback and a warning is logged.
@@ -645,7 +656,7 @@ interface ImageBaseProps extends PositionProps, ObjectNameProps {
645
656
  };
646
657
  /**
647
658
  * Recolor the image by mapping one source color to another (`<a:clrChange>`)
648
- * - every pixel matching `from` is repainted `to` — the classic "swap the flat background out" recolour
659
+ * - every pixel matching `from` is repainted `to`: the classic "swap the flat background out" recolour
649
660
  * (MS-PPT > Format Picture > Picture Color > Set Transparent Color is the single-colour sibling)
650
661
  * - colors accept `HexColor` or `ThemeColor`, same as fills / `duotone`
651
662
  * @example { from: '000000', to: 'FF0000' } // turn black pixels red
@@ -658,7 +669,7 @@ interface ImageBaseProps extends PositionProps, ObjectNameProps {
658
669
  };
659
670
  /**
660
671
  * Raw SVG markup to embed as the image source
661
- * - convenience for `data: 'data:image/svg+xml;base64,...'`; ts-pptx encodes it for you
672
+ * - convenience for `data: 'data:image/svg+xml;base64,...'`; pptx-ts encodes it for you
662
673
  * - ignored when `data` or `path` is also provided
663
674
  * @example '<svg viewBox="0 0 24 24">...</svg>'
664
675
  */
@@ -706,7 +717,7 @@ interface MediaBaseProps extends PositionProps, ObjectNameProps {
706
717
  */
707
718
  interface OleObjectBaseProps extends PositionProps, ObjectNameProps {
708
719
  /**
709
- * Picture of the embedded document shown on the slide — a raster image `path` (Node/local)
720
+ * Picture of the embedded document shown on the slide: a raster image `path` (Node/local)
710
721
  * or base64 `data:` URI.
711
722
  * - the library is Node-first and cannot render an Office document, so when this is omitted a
712
723
  * neutral gray placeholder is embedded; PowerPoint draws the live object over it, but every
@@ -728,7 +739,7 @@ interface OleObjectBaseProps extends PositionProps, ObjectNameProps {
728
739
  */
729
740
  extn?: string;
730
741
  /**
731
- * OLE server ProgID — what PowerPoint launches on double-click.
742
+ * OLE server ProgID: what PowerPoint launches on double-click.
732
743
  * - defaults from the resolved extension (`xlsx` → `Excel.Sheet.12`, `docx` → `Word.Document.12`,
733
744
  * `pptx` → `PowerPoint.Show.12`, anything else → `Package`)
734
745
  * @example 'Excel.Sheet.12'
@@ -763,7 +774,9 @@ type MediaProps = MediaBaseProps & ((DataOrPathRequiredProps & {
763
774
  */
764
775
  type: Exclude<MediaType, 'online'>;
765
776
  /**
766
- * Optional video embed link metadata.
777
+ * Not written for embedded media: only `type: 'online'` reads `link`. An embedded
778
+ * clip links its own media part, so an outside link has nowhere to go, and setting
779
+ * it warns `media/option-not-supported`.
767
780
  */
768
781
  link?: string;
769
782
  }) | (DataOrPathProps & {
@@ -779,8 +792,6 @@ type MediaProps = MediaBaseProps & ((DataOrPathRequiredProps & {
779
792
  */
780
793
  link: string;
781
794
  }));
782
- //#endregion
783
- //#region src/types/text.d.ts
784
795
  /**
785
796
  * A drawn bullet: the object arm of {@link TextPropsOptions.bullet}.
786
797
  *
@@ -855,7 +866,7 @@ interface TextBaseProps {
855
866
  * {@link breakLine} is not the only paragraph boundary: two adjacent runs whose `align`
856
867
  * differs start a new one, so stating it on the opening run alone splits the paragraph in
857
868
  * two. That is the mirror of {@link bullet}, {@link paraMarginLeft} and {@link paraIndent},
858
- * which are read from the opening run only. Neither mistake changes the run count — the
869
+ * which are read from the opening run only. Neither mistake changes the run count: the
859
870
  * only symptom is a differently shaped paragraph, with no error.
860
871
  * @default 'left'
861
872
  */
@@ -872,7 +883,7 @@ interface TextBaseProps {
872
883
  breakLine?: boolean;
873
884
  /**
874
885
  * Preset text warp / WordArt shape (`<a:bodyPr><a:prstTxWarp prst="..">`), which
875
- * bends the text along a preset path (arch, circle, wave, …) — the whole
886
+ * bends the text along a preset path (arch, circle, wave, …): the whole
876
887
  * `ST_TextShapeType` set.
877
888
  * @example 'textArchUp' // bend text along an upward arch (e.g. a label following a ring/arc)
878
889
  * @example 'textCircle'
@@ -882,22 +893,23 @@ interface TextBaseProps {
882
893
  * Add standard or custom bullet
883
894
  * - use `true` for standard bullet
884
895
  * - pass object options for custom bullet
885
- * - `false` (and omitting the option) is the *explicit off*: it writes `<a:buNone/>`
886
- * plus `marL="0" indent="0"`, which overrides whatever bullet the layout's or
887
- * master's list style sets for this level
888
- * - `'inherit'` states nothing at all — no bullet child and no margin attributes — so
889
- * the list style keeps reaching the paragraph. This is the one state omission
890
- * cannot spell, because omitting the option means `false` here for compatibility
896
+ * - `false` is the *explicit off*: it writes `<a:buNone/>` plus `marL="0" indent="0"`,
897
+ * which overrides whatever bullet the layout's or master's list style sets for this level
898
+ * - `'inherit'` states nothing at all (no bullet child and no margin attributes), so
899
+ * the list style keeps reaching the paragraph
900
+ * - omitting the option means `'inherit'` on a placeholder definition
901
+ * (`defineSlideMaster({ objects })`), and on text filling a placeholder the layout
902
+ * defines, which takes the definition's bullet. Anywhere else it means `false`
891
903
  *
892
904
  * The margins are only a *default* of the bullet state: {@link paraMarginLeft} and
893
905
  * {@link paraIndent} state `@marL`/`@indent` independently in any of the three, including
894
906
  * an inherited margin under a drawn bullet.
895
907
  *
896
908
  * When a shape's text is an array of runs, state this on the **opening run only**. A run
897
- * that draws a bullet starts a new paragraph by itself, so repeating it — the placement
898
- * that {@link align} requires — turns one three-run paragraph into three one-run
909
+ * that draws a bullet starts a new paragraph by itself, so repeating it (the placement
910
+ * that {@link align} requires) turns one three-run paragraph into three one-run
899
911
  * paragraphs. A paragraph takes its properties from its first run.
900
- * @default false
912
+ * @default false, or `'inherit'` on a placeholder
901
913
  */
902
914
  bullet?: boolean | 'inherit' | TextBulletProps;
903
915
  /**
@@ -924,7 +936,7 @@ interface TextBaseProps {
924
936
  *
925
937
  * Applied to the Latin (`<a:latin>`) and complex-script (`<a:cs>`) font slots, matching
926
938
  * how PowerPoint writes a font picked from the UI. The East Asian slot (`<a:ea>`) is left
927
- * to inherit from the theme unless `fontFaceEA` is set — forcing a Latin-only face into the
939
+ * to inherit from the theme unless `fontFaceEA` is set. Forcing a Latin-only face into the
928
940
  * East Asian slot duplicates/ghosts text in Office 365.
929
941
  * @example 'Arial' // Arial font
930
942
  */
@@ -932,8 +944,9 @@ interface TextBaseProps {
932
944
  /**
933
945
  * East Asian font face name (`<a:ea>` slot), used to render CJK (Chinese/Japanese/Korean) glyphs
934
946
  *
935
- * Set this when the East Asian font differs from `fontFace`. When omitted, `<a:ea>` inherits the
936
- * theme East Asian font, which is what PowerPoint does for Latin fonts.
947
+ * Independent of `fontFace`: set alone, it writes only `<a:ea>` and the Latin and complex-script
948
+ * slots keep inheriting. When omitted, `<a:ea>` inherits the theme East Asian font, which is what
949
+ * PowerPoint does for Latin fonts.
937
950
  * @example '微軟正黑體' // render East Asian glyphs with Microsoft JhengHei
938
951
  */
939
952
  fontFaceEA?: string;
@@ -960,12 +973,12 @@ interface TextBaseProps {
960
973
  */
961
974
  lang?: string;
962
975
  /**
963
- * First-line indent (points) — `a:pPr/@indent`, the offset of the paragraph's FIRST line
976
+ * First-line indent (points): `a:pPr/@indent`, the offset of the paragraph's FIRST line
964
977
  * from {@link paraMarginLeft}. Negative hangs the first line to the left of the body, which
965
978
  * is what a bulleted paragraph does; positive indents it to the right, the "first line
966
979
  * indented" prose form. PowerPoint: Paragraph > Indentation > Special.
967
980
  * - `'inherit'` writes no `@indent` at all, so the paragraph takes whatever its list style
968
- * (`a:lstStyle` → placeholder → layout → master) sets — the same third state
981
+ * (`a:lstStyle` → placeholder → layout → master) sets: the same third state
969
982
  * {@link bullet} spells, on the attribute beside it
970
983
  * - omitting the option keeps the bullet-derived default: a drawn bullet hangs the first
971
984
  * line by its margin, `bullet: false` writes `indent="0"`, `bullet: 'inherit'` writes
@@ -979,12 +992,12 @@ interface TextBaseProps {
979
992
  */
980
993
  paraIndent?: number | 'inherit';
981
994
  /**
982
- * Left margin of the paragraph (points) — `a:pPr/@marL`, where the paragraph's body text
995
+ * Left margin of the paragraph (points): `a:pPr/@marL`, where the paragraph's body text
983
996
  * starts. This is the paragraph's own margin, not the text frame's internal padding
984
997
  * (`margin`) and not the discrete outline level (`indentLevel`, which writes `a:p/@lvl`).
985
998
  * PowerPoint: Paragraph > Indentation > Before text.
986
999
  * - `'inherit'` writes no `@marL` at all, so the paragraph takes whatever its list style
987
- * (`a:lstStyle` → placeholder → layout → master) sets — the third state that omission
1000
+ * (`a:lstStyle` → placeholder → layout → master) sets, the third state that omission
988
1001
  * cannot spell, since omitting it writes the bullet-derived default
989
1002
  * - omitting the option keeps that default: a drawn bullet writes its own margin (see
990
1003
  * `bullet.indent`), `bullet: false` writes `marL="0"`, `bullet: 'inherit'` writes nothing
@@ -1031,11 +1044,15 @@ interface TextBaseProps {
1031
1044
  * - `style` is the full `ST_TextUnderlineType` enumeration (ECMA-376 §20.1.10.81)
1032
1045
  * - `'none'` is the *explicit off*: it writes `a:rPr/@u="none"`, which overrides an
1033
1046
  * underline the run would otherwise inherit from its list style, placeholder, layout or
1034
- * master. Omitting the option instead states nothing and lets that inheritance stand —
1035
- * the two are different facts, not two spellings of one.
1047
+ * master. Omitting the option instead states nothing and lets that inheritance stand.
1048
+ * The two are different facts, not two spellings of one.
1049
+ * - `true` is shorthand for `{ style: 'sng' }`, a single line. `false` states nothing, as omitting
1050
+ * the option does, so an inherited underline stands; `{ style: 'none' }` is the explicit off.
1036
1051
  * @default (unset) inherit
1052
+ * @example underline: true // single underline
1053
+ * @example underline: { style: 'dbl', color: 'FF0000' } // red double underline
1037
1054
  */
1038
- underline?: {
1055
+ underline?: boolean | {
1039
1056
  style?: (typeof TEXT_UNDERLINE_TYPES)[number];
1040
1057
  color?: Color;
1041
1058
  };
@@ -1083,10 +1100,10 @@ interface TextFitShrinkProps {
1083
1100
  */
1084
1101
  lnSpcReduction?: number;
1085
1102
  }
1086
- interface TextPropsOptions extends PositionProps, DataOrPathProps, TextBaseProps, ObjectNameProps {
1103
+ interface TextPropsOptions extends PlaceholderPositionProps, DataOrPathProps, TextBaseProps, ObjectNameProps {
1087
1104
  /**
1088
1105
  * Preset-geometry start/end angles for text frames (`shape` + these build `<a:prstGeom>`
1089
- * adjustment guides through the shared emitter — `genXmlPresetGeom` reads them whether
1106
+ * adjustment guides through the shared emitter, and `genXmlPresetGeom` reads them whether
1090
1107
  * the object is a shape or a styled text frame).
1091
1108
  */
1092
1109
  angleRange?: [number, number];
@@ -1096,11 +1113,28 @@ interface TextPropsOptions extends PositionProps, DataOrPathProps, TextBaseProps
1096
1113
  points?: GeometryPoint[];
1097
1114
  /** Preset-geometry adjustment guides for text frames. */
1098
1115
  shapeAdjust?: ShapeAdjustValue | ShapeAdjustValue[];
1116
+ /**
1117
+ * Baseline shift (`a:rPr/@baseline`): above zero raises the text, below zero lowers it.
1118
+ *
1119
+ * A percent of the font size, so `30` raises the text by 30% (what `superscript` writes) and
1120
+ * `-40` lowers it by 40% (what `subscript` writes). It is written in thousandths of a percent,
1121
+ * rounded. `0`, like leaving the option out, states no shift. Wins over `superscript` and
1122
+ * `subscript` when both are set.
1123
+ */
1099
1124
  baseline?: number;
1100
1125
  /**
1101
1126
  * Character spacing
1102
1127
  */
1103
1128
  charSpacing?: number;
1129
+ /**
1130
+ * Kerning (`a:rPr/@kern`): the smallest font size, in points, that gets pair kerning. Text at
1131
+ * this size or larger is kerned, smaller text is not, and `0` turns kerning off.
1132
+ * - PowerPoint: Font > Character Spacing > "Kerning for fonts: _ Points and above"
1133
+ * - range: 0-4000
1134
+ * @example 12 // kern text set at 12pt or larger, PowerPoint's own default
1135
+ * @default undefined // no `kern`, except that a non-zero `charSpacing` writes `kern="0"`
1136
+ */
1137
+ kerning?: number;
1104
1138
  /**
1105
1139
  * Number of text columns in the text body
1106
1140
  * - PowerPoint: Format Shape > Shape Options > Size & Properties > Text Box > Columns > "Number"
@@ -1126,7 +1160,7 @@ interface TextPropsOptions extends PositionProps, DataOrPathProps, TextBaseProps
1126
1160
  * - 'resize' = Resize shape to fit text
1127
1161
  *
1128
1162
  * **Measured fit:** if you register the box's font with
1129
- * {@link TsPptx.registerFontMetrics}, both `'shrink'` and `'resize'` are
1163
+ * {@link PptxTs.registerFontMetrics}, both `'shrink'` and `'resize'` are
1130
1164
  * **measured at export time**, so the text renders correctly in headless renderers
1131
1165
  * and on plain file-open (no edit/resize needed):
1132
1166
  * - `'shrink'` computes the largest `fontScale` at which the wrapped text fits and
@@ -1170,7 +1204,7 @@ interface TextPropsOptions extends PositionProps, DataOrPathProps, TextBaseProps
1170
1204
  glow?: TextGlowProps;
1171
1205
  hyperlink?: HyperlinkProps;
1172
1206
  /**
1173
- * Outline level of the paragraph (`a:p/@lvl`) — which of the list style's nine levels the
1207
+ * Outline level of the paragraph (`a:p/@lvl`): which of the list style's nine levels the
1174
1208
  * paragraph takes its bullet, indent and typography from.
1175
1209
  * - range: 0-8, whole numbers only (`ST_TextIndentLevelType`); anything else is reported
1176
1210
  * under `text/invalid-indent-level` and ignored
@@ -1196,7 +1230,7 @@ interface TextPropsOptions extends PositionProps, DataOrPathProps, TextBaseProps
1196
1230
  */
1197
1231
  lineSpacingMultiple?: number;
1198
1232
  /**
1199
- * Margin (inches) — the text-frame internal margin/padding
1233
+ * Margin (inches): the text-frame internal margin/padding
1200
1234
  * - PowerPoint: Format Shape > Shape Options > Size & Properties > Text Box > Left/Right/Top/Bottom margin (shown in inches)
1201
1235
  * - array order is `[top, right, bottom, left]`
1202
1236
  * - a value `>= 1` is honored as inches but warns once (it is likely a legacy points value; divide by 72)
@@ -1220,6 +1254,9 @@ interface TextPropsOptions extends PositionProps, DataOrPathProps, TextBaseProps
1220
1254
  * a real `<p:ph type="...">`. Use `placeholder: 'title'` to give a slide an accessible
1221
1255
  * title (PowerPoint's accessibility checker otherwise reports "Missing Slide Title")
1222
1256
  * - values: 'title' | 'body' | et. al.
1257
+ * - a {@link PlaceholderBinding} states the `p:ph` in full: its `name` binds as the string
1258
+ * does, and its `type` and `idx` are written whether or not a layout placeholder matches,
1259
+ * which is how text fills a placeholder of a layout this deck does not define
1223
1260
  *
1224
1261
  * **The placeholder supplies, it does not impose.** Every option this bag states wins; the
1225
1262
  * layout placeholder fills in the ones it leaves out. So `{ placeholder: 'body' }` alone
@@ -1232,9 +1269,10 @@ interface TextPropsOptions extends PositionProps, DataOrPathProps, TextBaseProps
1232
1269
  * inheritance runs: a value this library defaults on the way past does not count as the
1233
1270
  * caller stating one, and does not beat the layout.
1234
1271
  * @example 'title'
1272
+ * @example { type: 'body', idx: 1 }
1235
1273
  * @see https://learn.microsoft.com/en-us/office/vba/api/powerpoint.ppplaceholdertype
1236
1274
  */
1237
- placeholder?: string;
1275
+ placeholder?: PlaceholderOption;
1238
1276
  /**
1239
1277
  * Corner radius (inches) of the text box's `shape`, for `'roundRect'` and the other rounded presets
1240
1278
  * - resolved against the shorter side of the box and written as the preset's corner guide
@@ -1258,7 +1296,7 @@ interface TextPropsOptions extends PositionProps, DataOrPathProps, TextBaseProps
1258
1296
  * Shadow options. **Which shadow depends on which bag it is on**, and the two are different
1259
1297
  * effects rather than two spellings of one:
1260
1298
  *
1261
- * - on the options passed to `addText` — the *shape's* bag — it is the shape's drop shadow
1299
+ * - on the options passed to `addText` (the *shape's* bag), it is the shape's drop shadow
1262
1300
  * (`p:spPr/a:effectLst`), PowerPoint's Shape Effects ▸ Shadow;
1263
1301
  * - on a run's own `options` inside the text array, it is the *text* shadow
1264
1302
  * (`a:rPr/a:effectLst`), PowerPoint's Text Effects ▸ Shadow.
@@ -1272,13 +1310,13 @@ interface TextPropsOptions extends PositionProps, DataOrPathProps, TextBaseProps
1272
1310
  shadow?: ShadowProps;
1273
1311
  shape?: SHAPE_NAME;
1274
1312
  /**
1275
- * Strikethrough (`a:rPr/@strike`, `ST_TextStrikeType` — ECMA-376 §20.1.10.78)
1313
+ * Strikethrough (`a:rPr/@strike`, `ST_TextStrikeType`, ECMA-376 §20.1.10.78)
1276
1314
  * - `true` is `'sngStrike'`; `'dblStrike'` is the double rule
1277
1315
  * - `'noStrike'` is the *explicit off*: it writes `strike="noStrike"`, which overrides a
1278
1316
  * strikethrough the run would otherwise inherit from its list style, placeholder, layout
1279
1317
  * or master
1280
1318
  * - `false`, like leaving the option out, writes no attribute at all and so states
1281
- * *nothing* — the run keeps whatever it inherits. This matches `bold`/`italic`, whose
1319
+ * *nothing*: the run keeps whatever it inherits. This matches `bold`/`italic`, whose
1282
1320
  * falsy arm is likewise an omission; reach for `'noStrike'` when the intent is "not
1283
1321
  * struck" rather than "unspecified"
1284
1322
  * @default (unset) inherit
@@ -1320,8 +1358,8 @@ interface TextProps {
1320
1358
  */
1321
1359
  math?: string;
1322
1360
  /**
1323
- * Emit this item's `math` equation *inline* — an `<a14:m><m:oMath>` run flowing mid-paragraph
1324
- * between the surrounding plain text runs — instead of as its own centered display-math
1361
+ * Emit this item's `math` equation *inline* (an `<a14:m><m:oMath>` run flowing mid-paragraph
1362
+ * between the surrounding plain text runs) instead of as its own centered display-math
1325
1363
  * paragraph. Has no effect unless `math` is set. Pair with the bare-`<m:oMath>` inline form of
1326
1364
  * the equation: `latexToOmml(tex, { display: false })` or `mathmlToOmml(mathml)`.
1327
1365
  * @example addText([{ text: 'where ' }, { math: latexToOmml('x^2+1=y', { display: false }), inline: true }, { text: ' holds' }])
@@ -1329,9 +1367,9 @@ interface TextProps {
1329
1367
  inline?: boolean;
1330
1368
  }
1331
1369
  /**
1332
- * Options for layout-time text measurement ({@link TsPptx.measureText}).
1333
- * Inches for width, points for type/spacing — the consumer-facing units. The
1334
- * measured face must have metrics registered via {@link TsPptx.registerFontMetrics}
1370
+ * Options for layout-time text measurement ({@link PptxTs.measureText}).
1371
+ * Inches for width, points for type/spacing: the consumer-facing units. The
1372
+ * measured face must have metrics registered via {@link PptxTs.registerFontMetrics}
1335
1373
  * (a named face without exact metrics uses a conservative heuristic; an unnamed
1336
1374
  * theme-default face is unmeasurable).
1337
1375
  */
@@ -1358,7 +1396,7 @@ interface MeasureTextOptions {
1358
1396
  insetIn?: number;
1359
1397
  }
1360
1398
  /**
1361
- * Result of {@link TsPptx.measureText}. Heights err **tall** (conservative) —
1399
+ * Result of {@link PptxTs.measureText}. Heights err **tall** (conservative):
1362
1400
  * they match the value the export-time autofit bake uses, so the laid-out height is
1363
1401
  * ≥ what PowerPoint/LibreOffice render. Use it to grow a container; for an overflow
1364
1402
  * check it may slightly over-report (good for a warning, not a hard gate).
@@ -1366,10 +1404,10 @@ interface MeasureTextOptions {
1366
1404
  interface TextMeasurement {
1367
1405
  /** Laid-out height in inches at the given `fontSize` (conservative/tall). */
1368
1406
  heightIn: number;
1369
- /** Number of wrapped lines (conservative — the model wraps marginally early). */
1407
+ /** Number of wrapped lines (conservative: the model wraps marginally early). */
1370
1408
  lineCount: number;
1371
1409
  /**
1372
- * Width in inches of the widest laid-out line (conservative — the model wraps
1410
+ * Width in inches of the widest laid-out line (conservative: the model wraps
1373
1411
  * marginally early, so this errs slightly wide). With an unconstrained `wIn` it
1374
1412
  * is the natural single-line width; constrained, it is the widest wrapped line.
1375
1413
  * A box set to this width will not re-wrap the text.
@@ -1379,15 +1417,15 @@ interface TextMeasurement {
1379
1417
  measurable: boolean;
1380
1418
  /**
1381
1419
  * The **named** faces laid out with the conservative average-advance heuristic
1382
- * instead of their real metrics — i.e. faces with no registered metrics. Empty
1420
+ * instead of their real metrics, i.e. faces with no registered metrics. Empty
1383
1421
  * when every run was measured exactly (and for an unmeasurable result, which
1384
1422
  * guessed nothing). The numbers stay conservative (they err tall/wide), but a
1385
1423
  * non-empty list means they are an approximation, not a measurement; register
1386
- * the face via {@link TsPptx.registerFontMetrics} for an exact result.
1424
+ * the face via {@link PptxTs.registerFontMetrics} for an exact result.
1387
1425
  */
1388
1426
  approximatedFaces: string[];
1389
1427
  /**
1390
- * Code points in the measured text — sorted, deduplicated — whose run resolved to a
1428
+ * Code points in the measured text (sorted, deduplicated) whose run resolved to a
1391
1429
  * **registered** face that has no glyph for them. Empty for fully covered text.
1392
1430
  *
1393
1431
  * Unlike everything else here, a non-empty list means the numbers are **not reliably
@@ -1399,7 +1437,7 @@ interface TextMeasurement {
1399
1437
  * and the text overflow. Register a face that covers them (or set an explicit
1400
1438
  * `fontFace` on those runs) before trusting the height.
1401
1439
  *
1402
- * Faces with no registered metrics are not audited — they measure through the
1440
+ * Faces with no registered metrics are not audited: they measure through the
1403
1441
  * cmap-less heuristic and are reported in {@link approximatedFaces} instead.
1404
1442
  * `String.fromCodePoint(...uncoveredCodepoints)` renders the list.
1405
1443
  */
@@ -1409,13 +1447,13 @@ interface TextMeasurement {
1409
1447
  /** The `fontScale` (percent) that fits inner height `hIn`; `100` if it already fits, never below the shrink floor. */
1410
1448
  shrinkScaleFor: (hIn: number) => number;
1411
1449
  }
1412
- /** Options for {@link TsPptx.overflowsBox}: a measure plus the box inner height to test against. */
1450
+ /** Options for {@link PptxTs.overflowsBox}: a measure plus the box inner height to test against. */
1413
1451
  interface OverflowBoxOptions extends MeasureTextOptions {
1414
1452
  /** Box inner height in inches to test for overflow. */
1415
1453
  hIn: number;
1416
1454
  }
1417
1455
  /**
1418
- * One cell's computed rectangle from {@link TsPptx.tableLayout}. All values are
1456
+ * One cell's computed rectangle from {@link PptxTs.tableLayout}. All values are
1419
1457
  * inches; `x`/`y` are absolute (offset from the table's `x`/`y`). For a merged cell,
1420
1458
  * `row`/`col` are the top-left origin and `wIn`/`hIn` cover the whole span; the
1421
1459
  * cells it covers are not emitted separately.
@@ -1440,12 +1478,12 @@ interface TableCellLayout {
1440
1478
  /**
1441
1479
  * `true` when `hIn`/`yIn` are pinned by an explicit `rowH` (array or scalar) or
1442
1480
  * table `h`; `false` when the row is auto-height and the value is a conservative
1443
- * (tall) estimate from the same text model as {@link TsPptx.measureText}.
1481
+ * (tall) estimate from the same text model as {@link PptxTs.measureText}.
1444
1482
  */
1445
1483
  heightExact: boolean;
1446
1484
  }
1447
1485
  /**
1448
- * Result of {@link TsPptx.tableLayout}: per-cell geometry plus overall table
1486
+ * Result of {@link PptxTs.tableLayout}: per-cell geometry plus overall table
1449
1487
  * bounds, for placing images/shapes over a table without rendering it. Geometry is
1450
1488
  * for a single, un-paginated table laid out at `opts.x`/`y`/`w`; `autoPage` paging
1451
1489
  * is not modeled. Widths are exact; auto-height row heights are conservative
@@ -1463,8 +1501,8 @@ interface TableLayoutResult {
1463
1501
  }
1464
1502
  /**
1465
1503
  * Per-run options for a speaker-notes text run.
1466
- * A focused subset of `TextPropsOptions`: inline formatting plus an (external URL) hyperlink.
1467
- * Notes hyperlinks support `url` only; `slide` targets are not yet supported.
1504
+ * A focused subset of `TextPropsOptions`: inline formatting plus a hyperlink, which takes a
1505
+ * `url`, a `slide` or an `action` as on a slide.
1468
1506
  */
1469
1507
  type NotesTextOptions = Pick<TextPropsOptions, 'hyperlink' | 'bold' | 'italic' | 'underline' | 'color' | 'fontSize' | 'fontFace'>;
1470
1508
  /** A single speaker-notes text run: text plus optional inline formatting / hyperlink. */
@@ -1510,18 +1548,29 @@ interface ResolvedCommentAuthor {
1510
1548
  declare function textRun(text: string | number, options?: TextPropsOptions): TextProps;
1511
1549
  /** Wraps a run array so TypeScript accepts it as `TextProps[]` without a cast. */
1512
1550
  declare function textRuns(runs: TextProps[]): TextProps[];
1513
- //#endregion
1514
- //#region src/types/object.d.ts
1515
1551
  /**
1516
1552
  * A layout placeholder's options. They reach the slide objects that fill the placeholder as text
1517
1553
  * options, so beside the text formatting a placeholder takes the shape `fill` (an image fill
1518
1554
  * included) and the `hyperlink` a text box does, and `bullet` through {@link TextBaseProps}.
1555
+ *
1556
+ * A definition states no bullet, left margin or first-line indent unless given one, so the
1557
+ * master's `textStyles` reach its slides; `bullet: false` turns the bullet off on this layout.
1519
1558
  */
1520
1559
  interface PlaceholderProps extends PositionProps, TextBaseProps, ObjectNameProps, Pick<TextPropsOptions, 'fill' | 'hyperlink'> {
1521
1560
  name: string;
1522
- type: PLACEHOLDER_TYPE;
1523
1561
  /**
1524
- * margin (inches) — text-frame internal margin; a value `>= 1` warns as a likely legacy points value
1562
+ * `p:ph/@type`: one of the six friendly types, or any `ST_PlaceholderType` value (`ctrTitle`,
1563
+ * `subTitle`, `obj`, `dt`, `ftr`, `sldNum`, …).
1564
+ */
1565
+ type: PLACEHOLDER_TYPE | PlaceholderXmlType;
1566
+ /**
1567
+ * `p:ph/@idx`, a non-negative integer a slide object binds to by stating the same `idx`.
1568
+ * Omitted, it is 100 plus the object's position in `objects`. `0` writes none, as PowerPoint
1569
+ * writes for a title.
1570
+ */
1571
+ idx?: number;
1572
+ /**
1573
+ * margin (inches): text-frame internal margin; a value `>= 1` warns as a likely legacy points value
1525
1574
  */
1526
1575
  margin?: Margin;
1527
1576
  /**
@@ -1537,6 +1586,36 @@ interface PlaceholderProps extends PositionProps, TextBaseProps, ObjectNameProps
1537
1586
  */
1538
1587
  rectRadius?: number;
1539
1588
  }
1589
+ /**
1590
+ * A slide object's placeholder binding stated in full: the `p:ph` it writes, with or without a
1591
+ * layout placeholder of that name in the same deck.
1592
+ *
1593
+ * The string form of `placeholder` binds only to a placeholder the deck's own layout defines by
1594
+ * name, and takes its `idx` from there. A slide that fills a placeholder of a layout the deck does
1595
+ * not define, such as one from a template it is appended to, needs the `idx` stated, because
1596
+ * PowerPoint matches a slide placeholder to its layout's by `idx`.
1597
+ * @example { idx: 1 } // the content placeholder of PowerPoint's "Title and Content" layout
1598
+ * @example { type: 'ctrTitle' } // the title of a title slide
1599
+ */
1600
+ interface PlaceholderBinding {
1601
+ /**
1602
+ * Name of a layout placeholder defined in this deck, as the string form takes it. The object
1603
+ * inherits its options and frame, and its `type` and `idx` unless they are stated here too.
1604
+ */
1605
+ name?: string;
1606
+ /**
1607
+ * `p:ph/@type`. Omitted, it is the named layout placeholder's type, else none, which
1608
+ * PowerPoint reads as `obj`.
1609
+ */
1610
+ type?: PlaceholderXmlType;
1611
+ /**
1612
+ * `p:ph/@idx`, a non-negative integer. Omitted, it is the named layout placeholder's index,
1613
+ * else none, which PowerPoint reads as `0`.
1614
+ */
1615
+ idx?: number;
1616
+ }
1617
+ /** A slide object's `placeholder`: a layout placeholder's name, or a {@link PlaceholderBinding}. */
1618
+ type PlaceholderOption = string | PlaceholderBinding;
1540
1619
  interface ObjectNameProps {
1541
1620
  /**
1542
1621
  * Object name
@@ -1577,6 +1656,8 @@ interface ObjectNameProps {
1577
1656
  interface ObjectLockProps {
1578
1657
  /** Disallow grouping/ungrouping with other objects. (shapes, images, tables) */
1579
1658
  noGrp?: boolean;
1659
+ /** Disallow ungrouping the group (`a:grpSpLocks/@noUngrp`). (groups only) */
1660
+ noUngrp?: boolean;
1580
1661
  /** Disallow selecting the object. (shapes, images, tables) */
1581
1662
  noSelect?: boolean;
1582
1663
  /** Disallow moving the object. (shapes, images, tables) */
@@ -1605,14 +1686,14 @@ interface ObjectLockProps {
1605
1686
  /**
1606
1687
  * The object descriptors a slide master and a group child both accept.
1607
1688
  *
1608
- * Both surfaces take a key-tagged descriptor — one key naming the object kind, its value the
1609
- * options for that kind — and both accepted the same six. They were written out twice, and the
1689
+ * Both surfaces take a key-tagged descriptor (one key naming the object kind, its value the
1690
+ * options for that kind), and both accepted the same six. They were written out twice, and the
1610
1691
  * doc on `GroupChildProps` said as much in as many words: "Uses the same key-tagged descriptor
1611
1692
  * shape as `SlideMasterObject`". That coupling was real and maintained by hand, which meant a
1612
1693
  * seventh descriptor added to one was silently missing from the other.
1613
1694
  *
1614
- * Each union is now this plus what is genuinely its own — a master adds `chart` and
1615
- * `placeholder`, a group child adds `group` — so the difference between them is the part you
1695
+ * Each union is now this plus what is genuinely its own (a master adds `chart` and
1696
+ * `placeholder`, a group child adds `group`), so the difference between them is the part you
1616
1697
  * read, and the shared vocabulary is stated once.
1617
1698
  */
1618
1699
  type CommonObjectDescriptor = {
@@ -1643,8 +1724,6 @@ type CommonObjectDescriptor = {
1643
1724
  options?: TextPropsOptions;
1644
1725
  };
1645
1726
  };
1646
- //#endregion
1647
- //#region src/types/chart.d.ts
1648
1727
  /**
1649
1728
  * An axis' tick marks (`ST_TickMark`): `in` and `out` of the axis line, `cross` through it, or `none`.
1650
1729
  *
@@ -1675,10 +1754,13 @@ interface OptsChartData {
1675
1754
  */
1676
1755
  sizes?: number[];
1677
1756
  /**
1678
- * category values
1757
+ * category values. A `null` is a gap: the point has no value, and the embedded workbook
1758
+ * holds an empty cell for it. How a line or area chart draws across one is
1759
+ * `displayBlanksAs`.
1679
1760
  * @example [2000, 2010, 2020]
1761
+ * @example [5, null, 7] // no value for the second category
1680
1762
  */
1681
- values?: number[];
1763
+ values?: Array<number | null>;
1682
1764
  /**
1683
1765
  * Custom text label per data point, replacing the auto-generated value label.
1684
1766
  * Index aligns with `values[]`. Empty string or missing entries fall back to the chart-level label settings.
@@ -1758,11 +1840,11 @@ interface ChartErrorBarOptions extends StrokeProps {
1758
1840
  barType?: ErrorBarType;
1759
1841
  /**
1760
1842
  * How `value` (or `plusValues`/`minusValues`) is interpreted.
1761
- * - `'fixedVal'` — fixed amount in axis units
1762
- * - `'percentage'` — percent of each value (e.g. `value: 5` → ±5%)
1763
- * - `'stdDev'` — `value` standard deviations
1764
- * - `'stdErr'` — standard error (ignores `value`)
1765
- * - `'cust'` — explicit per-point amounts via `plusValues`/`minusValues`
1843
+ * - `'fixedVal'`: fixed amount in axis units
1844
+ * - `'percentage'`: percent of each value (e.g. `value: 5` → ±5%)
1845
+ * - `'stdDev'`: `value` standard deviations
1846
+ * - `'stdErr'`: standard error (ignores `value`)
1847
+ * - `'cust'`: explicit per-point amounts via `plusValues`/`minusValues`
1766
1848
  * @default 'fixedVal'
1767
1849
  */
1768
1850
  valueType?: ErrorBarValueType;
@@ -1807,7 +1889,7 @@ interface OptsChartGridLine extends StrokeProps {
1807
1889
  *
1808
1890
  * `'none'` omits the gridlines entirely and is the same statement as `type: 'none'`;
1809
1891
  * `'solid'`, `'dash'` and `'dot'` are `a:prstDash` presets and map onto `dashType`
1810
- * unchanged — note that this `'dash'` is the literal `dash` preset, where
1892
+ * unchanged. Note that this `'dash'` is the literal `dash` preset, where
1811
1893
  * {@link StrokeProps.type}`: 'dash'` means `sysDash`.
1812
1894
  * @deprecated Use {@link StrokeProps.dashType} (or `type: 'none'`). `dashType` and an
1813
1895
  * explicit `type` both win when set.
@@ -1817,7 +1899,11 @@ interface OptsChartGridLine extends StrokeProps {
1817
1899
  interface ChartMulti {
1818
1900
  type: CHART_NAME;
1819
1901
  data: OptsChartData[];
1820
- options: ChartOpts;
1902
+ /**
1903
+ * This subchart's options, merged over the combo chart's own. Omitted, the subchart takes the
1904
+ * chart's options as they are.
1905
+ */
1906
+ options?: ChartOpts;
1821
1907
  }
1822
1908
  interface ChartPropsFillLine {
1823
1909
  /**
@@ -1829,16 +1915,17 @@ interface ChartPropsFillLine {
1829
1915
  * PowerPoint: Format Chart Area/Plot Area > Fill
1830
1916
  *
1831
1917
  * Omitting `fill` leaves the area transparent (`<a:noFill/>`), as does a `fill` that
1832
- * states neither a `color` nor a `type` — `transparency` alone is not a fill, since
1918
+ * states neither a `color` nor a `type`: `transparency` alone is not a fill, since
1833
1919
  * there is no colour for the alpha to apply to.
1834
1920
  *
1835
- * `type: 'image'` is not supported here and falls back to no fill with a warning: a
1836
- * blip fill needs a media relationship on the chart part, which nothing registers.
1921
+ * `type: 'image'` paints a picture, which the chart part references through a relationship of
1922
+ * its own. A chartEx chart (waterfall, funnel, …) writes no area fill at all.
1837
1923
  * @example fill: '696969' // hex RGB color value, shorthand for {color: '696969'}
1838
1924
  * @example fill: {color: '696969'} // hex RGB color value
1839
1925
  * @example fill: {color: SchemeColor.background2} // Theme color value
1840
1926
  * @example fill: {color: '696969', transparency: 50} // 50% transparent grey
1841
1927
  * @example fill: {type: 'gradient', gradient: {kind: 'linear', angle: 90, stops: [{position: 0, color: '0088CC'}, {position: 100, color: 'FFFFFF'}]}}
1928
+ * @example fill: {type: 'image', image: {path: 'paper.png'}} // a picture, stretched over the area
1842
1929
  * @example fill: {type: 'inherit'} // no fill child at all -- take the chart style's fill
1843
1930
  */
1844
1931
  fill?: FillOption;
@@ -1856,7 +1943,7 @@ interface ChartPropsBase {
1856
1943
  * Series colours, cycled: series (or, on a pie/doughnut, data point) `n` takes
1857
1944
  * `chartColors[n % chartColors.length]`, so a shorter list repeats rather than running out.
1858
1945
  *
1859
- * Omitting it, or passing an empty array, both mean the same thing — the built-in default
1946
+ * Omitting it, or passing an empty array, both mean the same thing: the built-in default
1860
1947
  * palette for the chart type. Two spellings of "I named no colours"; there is no third state
1861
1948
  * that suppresses the fills.
1862
1949
  */
@@ -1887,7 +1974,7 @@ interface ChartPropsBase {
1887
1974
  */
1888
1975
  showBubbleSize?: boolean;
1889
1976
  /**
1890
- * Enable data labels, with a meaning that is **overloaded per plot type** — it is not a
1977
+ * Enable data labels, with a meaning that is **overloaded per plot type**. It is not a
1891
1978
  * plain duplicate of {@link ChartPropsBase.showValue}:
1892
1979
  * - pie / doughnut: shows the **category name** (`c:showCatName`);
1893
1980
  * - scatter: turns on the labels {@link ChartPropsDataLabel.dataLabelFormatScatter} describes,
@@ -1970,7 +2057,7 @@ interface ChartPropsBase {
1970
2057
  /**
1971
2058
  * Per-series style overrides.
1972
2059
  *
1973
- * Element at index N applies to the **Nth series of the chart** — the same number the series
2060
+ * Element at index N applies to the **Nth series of the chart**, the same number the series
1974
2061
  * carries in `<c:idx>`/`<c:order>`. For most plots that is its position in `data`; on a combo
1975
2062
  * it counts across every subchart in order, so a bar(2) + line(1) combo reaches the line at
1976
2063
  * index 2. A scatter or bubble series counts one lower than its position, because the X row in
@@ -2026,9 +2113,9 @@ interface ChartPropsAxisCat {
2026
2113
  * Show every Nth category label (`c:tickLblSkip`, `ST_Skip`), e.g. `2` for every other one.
2027
2114
  * - a whole number of at least 1; anything else warns and leaves the element off
2028
2115
  *
2029
- * Pass a number. The `string` half is a compatibility hangover — this was typed as a
2116
+ * Pass a number. The `string` half is a compatibility hangover (this was typed as a
2030
2117
  * free-form string and emitted verbatim, which both rejected the natural `2` and let
2031
- * `'every other'` reach the attribute — and is read with `Number()` like any other.
2118
+ * `'every other'` reach the attribute), and is read with `Number()` like any other.
2032
2119
  */
2033
2120
  catAxisLabelFrequency?: number | string;
2034
2121
  catAxisLabelPos?: TickLabelPosition;
@@ -2111,6 +2198,13 @@ interface ChartPropsAxisCat {
2111
2198
  catAxisTitleFontSize?: number;
2112
2199
  catAxisTitleRotate?: number;
2113
2200
  catGridLine?: OptsChartGridLine;
2201
+ /**
2202
+ * Date format for the category labels, which makes the category axis a date axis (`c:dateAx`).
2203
+ * - Example: `'yyyy-mm-dd'`, `'mmm yyyy'`
2204
+ * - labels: ISO dates or date-times (`'2026-01-01'`, `'2026-01-01T12:00'`) or date serial numbers;
2205
+ * ISO ones are written as their serials. A label that is neither warns and the categories stay text.
2206
+ * - PowerPoint: Format Axis > Number > Format Code
2207
+ */
2114
2208
  catLabelFormatCode?: string;
2115
2209
  /**
2116
2210
  * Whether data should use secondary category axis (instead of primary)
@@ -2139,7 +2233,7 @@ interface ChartPropsAxisSer {
2139
2233
  serAxisLabelFrequency?: number | string;
2140
2234
  serAxisLabelPos?: TickLabelPosition;
2141
2235
  /**
2142
- * The series axis line, as a stroke — the same {@link StrokeProps} the other two axes and
2236
+ * The series axis line, as a stroke: the same {@link StrokeProps} the other two axes and
2143
2237
  * every gridline take. See {@link ChartPropsAxisCat.catAxisLine}.
2144
2238
  *
2145
2239
  * The series axis is the third axis of a 3-D chart, and it was the one axis whose line
@@ -2215,7 +2309,7 @@ interface ChartPropsAxisVal {
2215
2309
  valAxisLabelPos?: TickLabelPosition;
2216
2310
  valAxisLabelRotate?: number;
2217
2311
  /**
2218
- * The value axis line, as a stroke — the same {@link StrokeProps} the other two axes and
2312
+ * The value axis line, as a stroke: the same {@link StrokeProps} the other two axes and
2219
2313
  * every gridline take. See {@link ChartPropsAxisCat.catAxisLine}.
2220
2314
  */
2221
2315
  valAxisLine?: StrokeProps;
@@ -2256,7 +2350,7 @@ interface ChartPropsAxisVal {
2256
2350
  valAxisMaxVal?: number;
2257
2351
  valAxisMinorTickMark?: ChartAxisTickMark;
2258
2352
  /**
2259
- * Spacing between minor tick marks on the value axis (`c:minorUnit`) — the sibling
2353
+ * Spacing between minor tick marks on the value axis (`c:minorUnit`), the sibling
2260
2354
  * `valAxisMajorUnit` had had for years, while the category and series axes carried both.
2261
2355
  * - PowerPoint: Format Axis > Axis Options > Units > Minor
2262
2356
  */
@@ -2345,7 +2439,7 @@ interface ChartPropsChartLine {
2345
2439
  */
2346
2440
  lineDash?: ChartLineDash;
2347
2441
  /**
2348
- * Per-series dash type overrides; index matches the series order in the `data` array — and on a
2442
+ * Per-series dash type overrides; index matches the series order in the `data` array, and on a
2349
2443
  * combo, the order across every subchart, the same index `seriesOptions` uses.
2350
2444
  * - entries shorter than the series count fall back to `lineDash`
2351
2445
  * - example: `['solid', 'dash', 'lgDash']` gives each series its own dash pattern
@@ -2431,7 +2525,7 @@ interface ChartPropsChartWaterfall {
2431
2525
  * today is which side of each bin interval is closed.
2432
2526
  *
2433
2527
  * NOTE: explicit bin geometry (fixed bin width / bin count / overflow / underflow) is not yet
2434
- * supported — PowerPoint desktop rejects the decks those settings produce, so they are deferred.
2528
+ * supported: PowerPoint desktop rejects the decks those settings produce, so they are deferred.
2435
2529
  */
2436
2530
  interface ChartExBinning {
2437
2531
  /** Which side of each bin interval is closed: `'r'` (right, the default) or `'l'` (left). */
@@ -2452,7 +2546,7 @@ interface ChartPropsChartHistogram {
2452
2546
  */
2453
2547
  interface ChartExStatistics {
2454
2548
  /**
2455
- * How the first/third quartiles are computed: `'exclusive'` (PowerPoint's default — the median
2549
+ * How the first/third quartiles are computed: `'exclusive'` (PowerPoint's default: the median
2456
2550
  * is excluded when splitting the halves) or `'inclusive'`.
2457
2551
  */
2458
2552
  quartileMethod?: 'inclusive' | 'exclusive';
@@ -2479,7 +2573,7 @@ interface ChartPropsChartBoxWhisker {
2479
2573
  * PowerPoint resolves against its Bing-backed geography database when the deck is opened.
2480
2574
  *
2481
2575
  * These fields tell PowerPoint how to interpret ambiguous region names (e.g. "Georgia" the country
2482
- * vs. the US state). They do NOT change what ts-pptx writes beyond the `<cx:geography>` hint —
2576
+ * vs. the US state). They do NOT change what pptx-ts writes beyond the `<cx:geography>` hint:
2483
2577
  * the actual map is resolved and rendered by PowerPoint 2016+/Microsoft 365 at open time, so the
2484
2578
  * region names must match PowerPoint's geography database or the map renders blank.
2485
2579
  */
@@ -2499,12 +2593,12 @@ interface ChartPropsChartRegionMap {
2499
2593
  }
2500
2594
  interface ChartPropsChartStock {
2501
2595
  /**
2502
- * Stock (high-low-close) chart style — selects how many value series the chart expects and how
2596
+ * Stock (high-low-close) chart style: selects how many value series the chart expects and how
2503
2597
  * they are drawn. The data series must be supplied in the exact order implied by the style:
2504
- * - `'hlc'` — High, Low, Close (3 series). The close is marked with a dot.
2505
- * - `'ohlc'` — Open, High, Low, Close (4 series). Open→close is drawn as up/down bars.
2506
- * - `'vhlc'` — Volume, High, Low, Close (4 series). Volume is a column on its own axis.
2507
- * - `'vohlc'` — Volume, Open, High, Low, Close (5 series). Volume column + up/down bars.
2598
+ * - `'hlc'`: High, Low, Close (3 series). The close is marked with a dot.
2599
+ * - `'ohlc'`: Open, High, Low, Close (4 series). Open→close is drawn as up/down bars.
2600
+ * - `'vhlc'`: Volume, High, Low, Close (4 series). Volume is a column on its own axis.
2601
+ * - `'vohlc'`: Volume, Open, High, Low, Close (5 series). Volume column + up/down bars.
2508
2602
  *
2509
2603
  * `<c:hiLowLines>` connect the high/low of each category in every style.
2510
2604
  * @default 'hlc'
@@ -2658,9 +2752,9 @@ interface ChartPropsTitle extends TextBaseProps {
2658
2752
  };
2659
2753
  titleRotate?: number;
2660
2754
  }
2661
- interface ChartOpts extends ChartPropsAxisCat, ChartPropsAxisSer, ChartPropsAxisVal, ChartPropsBase, ChartPropsChartBar, ChartPropsChartDoughnut, ChartPropsChartLine, ChartPropsChartPie, ChartPropsChartRadar, ChartPropsChartWaterfall, ChartPropsChartHistogram, ChartPropsChartBoxWhisker, ChartPropsChartRegionMap, ChartPropsChartStock, ChartPropsChartSurface, ChartPropsDataLabel, ChartPropsDataTable, ChartPropsLegend, ChartPropsTitle, ObjectNameProps, PositionProps {
2755
+ interface ChartOpts extends ChartPropsAxisCat, ChartPropsAxisSer, ChartPropsAxisVal, ChartPropsBase, ChartPropsChartBar, ChartPropsChartDoughnut, ChartPropsChartLine, ChartPropsChartPie, ChartPropsChartRadar, ChartPropsChartWaterfall, ChartPropsChartHistogram, ChartPropsChartBoxWhisker, ChartPropsChartRegionMap, ChartPropsChartStock, ChartPropsChartSurface, ChartPropsDataLabel, ChartPropsDataTable, ChartPropsLegend, ChartPropsTitle, ObjectNameProps, PlaceholderPositionProps {
2662
2756
  /**
2663
- * Chart type — required when using the canonical `addChart(data, options)` signature.
2757
+ * Chart type. Required when using the canonical `addChart(data, options)` signature.
2664
2758
  * - Omit only for multi-type (combo) charts, where each `ChartMulti` entry carries its own `type`.
2665
2759
  */
2666
2760
  type?: CHART_NAME;
@@ -2669,9 +2763,19 @@ interface ChartOpts extends ChartPropsAxisCat, ChartPropsAxisSer, ChartPropsAxis
2669
2763
  * - PowerPoint: [right-click on a chart] > "Edit Alt Text..."
2670
2764
  */
2671
2765
  altText?: string;
2766
+ /**
2767
+ * Name of a placeholder defined on the slide layout/master to fill, or a
2768
+ * {@link PlaceholderBinding} that states the `p:ph` to write
2769
+ * - when it matches a layout/master placeholder, the chart takes that placeholder's position
2770
+ * and size for any of `x`/`y`/`w`/`h` not supplied explicitly; explicit values always win
2771
+ * - a name that matches none writes no `p:ph`; a binding's `idx` or `type` writes one regardless
2772
+ * @example 'chartph'
2773
+ * @example { type: 'chart', idx: 13 }
2774
+ */
2775
+ placeholder?: PlaceholderOption;
2672
2776
  /**
2673
2777
  * Custom chart-level metadata, emitted as a schema-valid extension on the chart space
2674
- * (`c:chartSpace/c:extLst`) under a stable ts-pptx vendor GUID.
2778
+ * (`c:chartSpace/c:extLst`) under a stable pptx-ts vendor GUID.
2675
2779
  * - Use for round-trippable, machine-readable annotations a consumer wants to travel with the
2676
2780
  * chart (e.g. a source-data id, a generator tag, a semantic role). PowerPoint preserves the
2677
2781
  * extension untouched and ignores it for rendering.
@@ -2681,8 +2785,6 @@ interface ChartOpts extends ChartPropsAxisCat, ChartPropsAxisSer, ChartPropsAxis
2681
2785
  */
2682
2786
  metadata?: Record<string, string>;
2683
2787
  }
2684
- //#endregion
2685
- //#region src/types/style.d.ts
2686
2788
  /**
2687
2789
  * A stroke, stated once.
2688
2790
  *
@@ -2692,8 +2794,8 @@ interface ChartOpts extends ChartPropsAxisCat, ChartPropsAxisSer, ChartPropsAxis
2692
2794
  * paint. This is that vocabulary; {@link BorderProps} is an alias of it, and the chart
2693
2795
  * option bag now takes it wherever it used to spell a stroke by hand.
2694
2796
  *
2695
- * Defaults are **per site**, not per interface — a table border's absent `width` is 1 pt, a
2696
- * chart gridline's is whatever `DEF_CHART_GRIDLINE` says — so each consumer documents its own
2797
+ * Defaults are **per site**, not per interface (a table border's absent `width` is 1 pt, a
2798
+ * chart gridline's is whatever `DEF_CHART_GRIDLINE` says), so each consumer documents its own
2697
2799
  * rather than this type claiming one for all of them.
2698
2800
  *
2699
2801
  * {@link ShapeLineProps} is deliberately *not* an alias: a shape stroke is a **paint**, so its
@@ -2714,7 +2816,7 @@ interface StrokeProps {
2714
2816
  * onto `sysDash`. Set this to pick the exact `a:prstDash` preset instead:
2715
2817
  * `dashType: 'lgDashDot'` emits `<a:prstDash val="lgDashDot"/>`.
2716
2818
  *
2717
- * **Precedence.** When both are set, `dashType` wins over `type` for the dash pattern —
2819
+ * **Precedence.** When both are set, `dashType` wins over `type` for the dash pattern:
2718
2820
  * `{ type: 'solid', dashType: 'sysDot' }` draws a dotted rule. The one exception is
2719
2821
  * `type: 'none'`, which suppresses the stroke entirely and is decided before any dash
2720
2822
  * pattern is chosen. An unrecognized value warns and falls back to what `type` implies.
@@ -2722,7 +2824,7 @@ interface StrokeProps {
2722
2824
  */
2723
2825
  dashType?: PresetLineDashVal;
2724
2826
  /**
2725
- * Stroke colour — a 6-digit hex RGB or a `SchemeColor` token.
2827
+ * Stroke colour: a 6-digit hex RGB or a `SchemeColor` token.
2726
2828
  * @example 'FF3399'
2727
2829
  * @example SchemeColor.accent1
2728
2830
  */
@@ -2757,26 +2859,50 @@ type BorderProps = StrokeProps;
2757
2859
  * `HyperlinkProps.slide` instead (which emits `ppaction://hlinksldjump`).
2758
2860
  */
2759
2861
  type HyperlinkActionJump = 'firstslide' | 'previousslide' | 'nextslide' | 'lastslide' | 'lastslideviewed' | 'endshow';
2760
- interface HyperlinkProps {
2862
+ /** What every {@link HyperlinkProps} takes beside its one destination. */
2863
+ interface HyperlinkBaseProps {
2761
2864
  /**
2762
- * The 1-based number of the slide to link to. The deck has to have that slide when it is written.
2865
+ * Hyperlink Tooltip
2763
2866
  */
2764
- slide?: number;
2867
+ tooltip?: string;
2868
+ }
2869
+ /** A hyperlink to a URL. */
2870
+ interface UrlHyperlinkProps extends HyperlinkBaseProps {
2765
2871
  /**
2766
2872
  * Url to link to
2767
2873
  */
2768
- url?: string;
2874
+ url: string;
2875
+ slide?: never;
2876
+ action?: never;
2877
+ }
2878
+ /** A hyperlink to another slide of the deck. */
2879
+ interface SlideHyperlinkProps extends HyperlinkBaseProps {
2769
2880
  /**
2770
- * Hyperlink Tooltip
2881
+ * The 1-based number of the slide to link to. The deck has to have that slide when it is written.
2771
2882
  */
2772
- tooltip?: string;
2883
+ slide: number;
2884
+ url?: never;
2885
+ action?: never;
2886
+ }
2887
+ /** A slide-show navigation action, such as "next slide". */
2888
+ interface ActionHyperlinkProps extends HyperlinkBaseProps {
2773
2889
  /**
2774
- * Slide-show navigation action for action-button shapes. Emits a relationship-less
2775
- * `<a:hlinkClick action="ppaction://hlinkshowjump?jump=…"/>` on the shape.
2890
+ * Slide-show navigation action. Emits a relationship-less
2891
+ * `<a:hlinkClick action="ppaction://hlinkshowjump?jump=…"/>` on the shape when the shape states
2892
+ * it (an action button), or on the run when a text run states it, as PowerPoint writes a jump
2893
+ * set on selected text. A shape's action is not repeated on its runs.
2776
2894
  * @example hyperlink: { action: 'nextslide' }
2777
2895
  */
2778
- action?: HyperlinkActionJump;
2896
+ action: HyperlinkActionJump;
2897
+ url?: never;
2898
+ slide?: never;
2779
2899
  }
2900
+ /**
2901
+ * A click hyperlink, which names exactly one destination: a `url`, a `slide` or an `action`.
2902
+ * @example hyperlink: { url: 'https://github.com', tooltip: 'GitHub' }
2903
+ * @example hyperlink: { slide: 3 }
2904
+ */
2905
+ type HyperlinkProps = UrlHyperlinkProps | SlideHyperlinkProps | ActionHyperlinkProps;
2780
2906
  interface ShadowProps {
2781
2907
  /**
2782
2908
  * shadow type
@@ -2830,7 +2956,7 @@ interface ShadowProps {
2830
2956
  * shorthand for a solid fill in that colour.
2831
2957
  *
2832
2958
  * `'FF0000'` and `{ color: 'FF0000' }` are the same statement and emit the same
2833
- * `<a:solidFill>` — the shorthand is lossless, not a lesser spelling, and every other key on
2959
+ * `<a:solidFill>`. The shorthand is lossless, not a lesser spelling, and every other key on
2834
2960
  * the object (`transparency`, `gradient`, `pattern`, `image`) is simply one the shorthand has
2835
2961
  * no way to say. Reach for the object as soon as you need any of them.
2836
2962
  *
@@ -2864,7 +2990,7 @@ interface ShapeFillProps {
2864
2990
  * `'none'` and `'inherit'` are different states, and both have to be spelled out
2865
2991
  * because omitting `fill` is not one of them: the shape/text-box emitter defaults a
2866
2992
  * missing `fill` to `<a:noFill/>`.
2867
- * - `'none'` emits `<a:noFill/>` — an explicit transparent interior.
2993
+ * - `'none'` emits `<a:noFill/>`, an explicit transparent interior.
2868
2994
  * - `'inherit'` emits no fill child at all, leaving the interior to
2869
2995
  * `p:style/a:fillRef` or the placeholder. This is the only way to author that
2870
2996
  * state from `addShape`/`addText`.
@@ -2874,7 +3000,7 @@ interface ShapeFillProps {
2874
3000
  * inherit, so `'inherit'` is merely the explicit form of the default.
2875
3001
  *
2876
3002
  * **Omitting `type` is not the same as omitting the fill.** Setting `gradient`,
2877
- * `pattern` or `image` selects that kind on its own — the sub-object is the statement,
3003
+ * `pattern` or `image` selects that kind on its own: the sub-object is the statement,
2878
3004
  * and `type` is how you say something the sub-objects cannot. Where both are given and
2879
3005
  * they disagree, **the explicit `type` wins** and the sub-object is ignored, because
2880
3006
  * that is the only rule under which `{ type: 'none', gradient }` can still mean
@@ -2909,33 +3035,38 @@ interface ShapeFillProps {
2909
3035
  *
2910
3036
  * **A picture stroke is not one of them**, which is why `image` and `type: 'image'` are
2911
3037
  * subtracted from the inherited fill props rather than carried. `<a:ln>`'s paint child is
2912
- * `EG_LineFillProperties` — `a:noFill`, `a:solidFill`, `a:gradFill`, `a:pattFill` and
2913
- * nothing else — so unlike a shape interior a stroke has no `a:blipFill` slot to put a
3038
+ * `EG_LineFillProperties` (`a:noFill`, `a:solidFill`, `a:gradFill`, `a:pattFill` and
3039
+ * nothing else), so unlike a shape interior a stroke has no `a:blipFill` slot to put a
2914
3040
  * bitmap in, and a package that emitted one is what PowerPoint answers with a repair
2915
3041
  * prompt. The interface carried `image` from `ShapeFillProps` regardless, and no call site
2916
3042
  * ever registered the media for it, so a picture stroke reached the emitter with no rel and
2917
3043
  * painted nothing. It is now spelled out as unsupported: a JS caller who sets it anyway
2918
3044
  * gets `line/image-fill-unsupported`.
2919
3045
  *
2920
- * A stroke also does not take the bare-colour shorthand a fill does — see {@link FillOption}
2921
- * for why. Spell it `line: { color: 'FF0000' }`.
3046
+ * A stroke also does not take the bare-colour shorthand a fill does (see {@link FillOption}
3047
+ * for why). Spell it `line: { color: 'FF0000' }`.
2922
3048
  */
2923
3049
  interface ShapeLineProps extends Omit<ShapeFillProps, 'type' | 'image'> {
2924
3050
  /**
2925
3051
  * Stroke paint kind. The same vocabulary as {@link ShapeFillProps.type} minus
2926
3052
  * `'image'`, which `<a:ln>` cannot express (see the note on this interface).
3053
+ *
3054
+ * `'inherit'` leaves the whole outline to `p:style/a:lnRef` or the placeholder: no paint,
3055
+ * and no 1pt or solid defaults for `width` and `dashType`. A width, dash, cap or arrowhead
3056
+ * you state is still written over what is inherited.
3057
+ * @example { type: 'inherit' } // an empty <a:ln>: paint, width and dash all inherited
2927
3058
  * @default 'solid'
2928
3059
  */
2929
3060
  type?: 'none' | 'inherit' | 'solid' | 'gradient' | 'pattern';
2930
3061
  /**
2931
3062
  * Line width (pt)
2932
- * @default 1
3063
+ * @default 1, or inherited when `type` is `'inherit'`
2933
3064
  */
2934
3065
  width?: number;
2935
3066
  /**
2936
- * Dash type — the full `ST_PresetLineDashVal` set, so any dash a source deck can
3067
+ * Dash type: the full `ST_PresetLineDashVal` set, so any dash a source deck can
2937
3068
  * carry can also be authored and replicated.
2938
- * @default 'solid'
3069
+ * @default 'solid', or inherited when `type` is `'inherit'`
2939
3070
  */
2940
3071
  dashType?: PresetLineDashVal;
2941
3072
  /**
@@ -2944,11 +3075,11 @@ interface ShapeLineProps extends Omit<ShapeFillProps, 'type' | 'image'> {
2944
3075
  */
2945
3076
  cap?: LineCap;
2946
3077
  /**
2947
- * Begin arrow type — the `ST_LineEndType` set (`a:headEnd/@type`).
3078
+ * Begin arrow type: the `ST_LineEndType` set (`a:headEnd/@type`).
2948
3079
  */
2949
3080
  beginArrowType?: LineEndType;
2950
3081
  /**
2951
- * End arrow type — the `ST_LineEndType` set (`a:tailEnd/@type`).
3082
+ * End arrow type: the `ST_LineEndType` set (`a:tailEnd/@type`).
2952
3083
  */
2953
3084
  endArrowType?: LineEndType;
2954
3085
  }
@@ -2973,7 +3104,7 @@ interface ConnectorProps {
2973
3104
  /**
2974
3105
  * Number of adjustable bends (jogs) for an `elbow` / `curved` connector. Selects the
2975
3106
  * preset variant and how many `adj` values it accepts:
2976
- * - `1` → `bentConnector3` / `curvedConnector3` (one jog) — the default
3107
+ * - `1` → `bentConnector3` / `curvedConnector3` (one jog), the default
2977
3108
  * - `2` → `bentConnector4` / `curvedConnector4` (two jogs)
2978
3109
  * - `3` → `bentConnector5` / `curvedConnector5` (three jogs)
2979
3110
  *
@@ -2998,13 +3129,13 @@ interface ConnectorProps {
2998
3129
  * The shape's `objectName` must be set and unique on the slide. `x1`/`y1` remain the static
2999
3130
  * fallback geometry (and are used if the name can't be resolved).
3000
3131
  *
3001
- * A shape inside a group is a valid target — group children are named on the same slide. The
3132
+ * A shape inside a group is a valid target: group children are named on the same slide. The
3002
3133
  * connector itself is not an {@link Slide.addGroup} child, but {@link Slide.groupObjects} can
3003
3134
  * group one that is already on the slide.
3004
3135
  */
3005
3136
  startShape?: string;
3006
3137
  /**
3007
- * Connection-site index on `startShape` (0-based; the valid range is preset-dependent — a
3138
+ * Connection-site index on `startShape` (0-based; the valid range is preset-dependent: a
3008
3139
  * shape's `<a:cxnLst>` enumerates its sites). Ignored without `startShape`.
3009
3140
  * @default 0
3010
3141
  */
@@ -3016,7 +3147,7 @@ interface ConnectorProps {
3016
3147
  * @default 0
3017
3148
  */
3018
3149
  endShapeIdx?: number;
3019
- /** Start point X — inches, or a `Coord` such as `'50%'` / `'2in'` */
3150
+ /** Start point X: inches, or a `Coord` such as `'50%'` / `'2in'` */
3020
3151
  x1: Coord;
3021
3152
  /** Start point Y */
3022
3153
  y1: Coord;
@@ -3045,10 +3176,8 @@ interface ConnectorProps {
3045
3176
  /** Accessibility alt text */
3046
3177
  altText?: string;
3047
3178
  }
3048
- //#endregion
3049
- //#region src/types/core.d.ts
3050
3179
  /**
3051
- * Coordinate value. A bare `number` is **always inches** — there is no magnitude-based unit
3180
+ * Coordinate value. A bare `number` is **always inches**; there is no magnitude-based unit
3052
3181
  * guessing. For other units use an explicit string suffix:
3053
3182
  * - `number` → inches (e.g. `10.25`)
3054
3183
  * - `"<n>%"` → percentage of the slide axis (e.g. `"75%"`)
@@ -3095,6 +3224,36 @@ interface PositionProps {
3095
3224
  */
3096
3225
  w?: Coord;
3097
3226
  }
3227
+ /**
3228
+ * {@link PositionProps} for an object that can fill a layout placeholder: text, an image, a table
3229
+ * or a chart. Each axis also takes `null`, which leaves it unstated, as omitting it does. With
3230
+ * `placeholder`, an unstated axis comes from the layout placeholder; without one, it takes the
3231
+ * object's default. `null` is how a computed value says "unset" where `exactOptionalPropertyTypes`
3232
+ * refuses `undefined`.
3233
+ * @example { placeholder: 'body', x: indent ?? null } // the placeholder's left edge unless indented
3234
+ */
3235
+ interface PlaceholderPositionProps {
3236
+ /**
3237
+ * Horizontal position, as {@link PositionProps.x}. `null` leaves it unstated: the layout
3238
+ * placeholder's, with `placeholder`.
3239
+ */
3240
+ x?: Coord | null;
3241
+ /**
3242
+ * Vertical position, as {@link PositionProps.y}. `null` leaves it unstated: the layout
3243
+ * placeholder's, with `placeholder`.
3244
+ */
3245
+ y?: Coord | null;
3246
+ /**
3247
+ * Height, as {@link PositionProps.h}. `null` leaves it unstated: the layout placeholder's, with
3248
+ * `placeholder`.
3249
+ */
3250
+ h?: Coord | null;
3251
+ /**
3252
+ * Width, as {@link PositionProps.w}. `null` leaves it unstated: the layout placeholder's, with
3253
+ * `placeholder`.
3254
+ */
3255
+ w?: Coord | null;
3256
+ }
3098
3257
  /**
3099
3258
  * Reusable optional data/path fields.
3100
3259
  * Use `DataOrPathRequiredProps` for APIs that require at least one source.
@@ -3123,7 +3282,7 @@ type DataOrPathRequiredProps = (DataOrPathProps & {
3123
3282
  interface BackgroundProps extends DataOrPathProps, ShapeFillProps {}
3124
3283
  /**
3125
3284
  * What a `background` option accepts: a {@link BackgroundProps} object, or a bare
3126
- * {@link Color} as shorthand for a solid background in that colour — the same shorthand
3285
+ * {@link Color} as shorthand for a solid background in that colour, the same shorthand
3127
3286
  * every other fill site takes (see `FillOption`).
3128
3287
  * @example background: 'FF3399' // shorthand for { color: 'FF3399' }
3129
3288
  */
@@ -3205,8 +3364,8 @@ interface RadialGradientFillProps {
3205
3364
  stops: GradientStopProps[];
3206
3365
  }
3207
3366
  type GradientFillProps = LinearGradientFillProps | RadialGradientFillProps;
3208
- /** OOXML ST_PresetPatternVal — preset pattern names for `<a:pattFill prst="...">` */
3209
- 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';
3367
+ /** OOXML ST_PresetPatternVal: preset pattern names for `<a:pattFill prst="...">` */
3368
+ type PatternPreset = (typeof PATTERN_PRESETS)[number];
3210
3369
  interface PatternFillProps {
3211
3370
  /** OOXML preset pattern (`prst` attribute on `<a:pattFill>`). */
3212
3371
  preset: PatternPreset;
@@ -3216,7 +3375,7 @@ interface PatternFillProps {
3216
3375
  bgColor?: Color;
3217
3376
  }
3218
3377
  /**
3219
- * Native PPTX picture (image) fill — fills a shape's interior with a bitmap
3378
+ * Native PPTX picture (image) fill: fills a shape's interior with a bitmap
3220
3379
  * (`<a:blipFill>`). Provide exactly one of `path` or `data`; raster formats only
3221
3380
  * (PNG/JPEG/GIF/BMP/WebP). SVG is not yet supported as a fill source.
3222
3381
  */
@@ -3228,7 +3387,8 @@ interface ImageFillProps {
3228
3387
  /**
3229
3388
  * Crop the source image to a sub-region by percentage edge insets, emitted as
3230
3389
  * DrawingML `<a:srcRect>`.
3231
- * - each value is the percent (0–100) trimmed from that edge of the source image
3390
+ * - each value is the percent (at most 100) trimmed from that edge of the source image;
3391
+ * a negative value pads that edge with empty space instead
3232
3392
  * - `l` + `r` and `t` + `b` must each be less than 100
3233
3393
  * - omitted edges default to 0
3234
3394
  *
@@ -3237,13 +3397,13 @@ interface ImageFillProps {
3237
3397
  * clipped by the shape geometry.
3238
3398
  */
3239
3399
  crop?: {
3240
- /** Percent trimmed from the left edge of the source image. @default 0 */
3400
+ /** Percent trimmed from the left edge of the source image; negative pads it. @default 0 */
3241
3401
  l?: number;
3242
- /** Percent trimmed from the top edge of the source image. @default 0 */
3402
+ /** Percent trimmed from the top edge of the source image; negative pads it. @default 0 */
3243
3403
  t?: number;
3244
- /** Percent trimmed from the right edge of the source image. @default 0 */
3404
+ /** Percent trimmed from the right edge of the source image; negative pads it. @default 0 */
3245
3405
  r?: number;
3246
- /** Percent trimmed from the bottom edge of the source image. @default 0 */
3406
+ /** Percent trimmed from the bottom edge of the source image; negative pads it. @default 0 */
3247
3407
  b?: number;
3248
3408
  };
3249
3409
  }
@@ -3251,7 +3411,7 @@ type Margin = number | [number, number, number, number];
3251
3411
  type HAlign = 'left' | 'center' | 'right' | 'justify';
3252
3412
  type VAlign = 'top' | 'middle' | 'bottom';
3253
3413
  /**
3254
- * Text body `vert` attribute — flow/rotation direction of the text within its box.
3414
+ * Text body `vert` attribute: flow/rotation direction of the text within its box.
3255
3415
  * Maps to `<a:bodyPr vert="…">` (ECMA-376 `ST_TextVerticalType`).
3256
3416
  */
3257
3417
  type TextVertType = TextVerticalType;
@@ -3263,42 +3423,45 @@ type TextVertType = TextVerticalType;
3263
3423
  * The `arc` node carries no `x`/`y`: an `<a:arcTo>` has no explicit end point. The renderer
3264
3424
  * derives it from the current pen position, the radii and the swept angle, so an end point
3265
3425
  * authored here would be discarded (a warning is emitted if one is supplied).
3426
+ *
3427
+ * Any coordinate, radius or angle may instead name a guide, which is written verbatim (the
3428
+ * `ST_AdjCoordinate` / `ST_AdjAngle` string form): one declared in the shape's `guides`, or a
3429
+ * built-in such as `'w'`, `'hc'` or `'cd4'`. A coordinate counts as a name when it starts with a
3430
+ * letter or `_`; an angle, when it is a string at all.
3266
3431
  */
3267
3432
  type GeometryPoint = {
3268
- x: Coord;
3269
- y: Coord;
3433
+ x: Coord | string;
3434
+ y: Coord | string;
3270
3435
  moveTo?: boolean;
3271
3436
  } | {
3272
3437
  curve: {
3273
3438
  type: 'arc';
3274
- hR: Coord;
3275
- wR: Coord;
3276
- stAng: number;
3277
- swAng: number;
3439
+ hR: Coord | string;
3440
+ wR: Coord | string;
3441
+ stAng: number | string;
3442
+ swAng: number | string;
3278
3443
  };
3279
3444
  } | {
3280
- x: Coord;
3281
- y: Coord;
3445
+ x: Coord | string;
3446
+ y: Coord | string;
3282
3447
  curve: {
3283
3448
  type: 'cubic';
3284
- x1: Coord;
3285
- y1: Coord;
3286
- x2: Coord;
3287
- y2: Coord;
3449
+ x1: Coord | string;
3450
+ y1: Coord | string;
3451
+ x2: Coord | string;
3452
+ y2: Coord | string;
3288
3453
  };
3289
3454
  } | {
3290
- x: Coord;
3291
- y: Coord;
3455
+ x: Coord | string;
3456
+ y: Coord | string;
3292
3457
  curve: {
3293
3458
  type: 'quadratic';
3294
- x1: Coord;
3295
- y1: Coord;
3459
+ x1: Coord | string;
3460
+ y1: Coord | string;
3296
3461
  };
3297
3462
  } | {
3298
3463
  close: true;
3299
3464
  };
3300
- //#endregion
3301
- //#region src/types/theme.d.ts
3302
3465
  /**
3303
3466
  * Theme color scheme overrides. Each slot maps to one `<a:clrScheme>` entry in `theme1.xml`;
3304
3467
  * any slot left unset keeps the default Office value. Provide 6-digit hex (no `#`).
@@ -3348,28 +3511,28 @@ interface ThemeProps {
3348
3511
  */
3349
3512
  bodyFontFace?: string;
3350
3513
  /**
3351
- * Headings East Asian font face — theme `<a:ea>` slot of the major font.
3514
+ * Headings East Asian font face: theme `<a:ea>` slot of the major font.
3352
3515
  * Used for CJK (Chinese/Japanese/Korean) runs that fall back to the theme font.
3353
3516
  * - leave unset to keep PowerPoint's empty default (auto-resolved per script)
3354
3517
  * @example 'Yu Gothic'
3355
3518
  */
3356
3519
  headFontFaceEA?: string;
3357
3520
  /**
3358
- * Body East Asian font face — theme `<a:ea>` slot of the minor font.
3521
+ * Body East Asian font face: theme `<a:ea>` slot of the minor font.
3359
3522
  * Used for CJK (Chinese/Japanese/Korean) runs that fall back to the theme font.
3360
3523
  * - leave unset to keep PowerPoint's empty default (auto-resolved per script)
3361
3524
  * @example 'Yu Gothic'
3362
3525
  */
3363
3526
  bodyFontFaceEA?: string;
3364
3527
  /**
3365
- * Headings complex-script font face — theme `<a:cs>` slot of the major font.
3528
+ * Headings complex-script font face: theme `<a:cs>` slot of the major font.
3366
3529
  * Used for complex scripts such as Arabic, Hebrew, Thai, and Devanagari.
3367
3530
  * - leave unset to keep PowerPoint's empty default (auto-resolved per script)
3368
3531
  * @example 'Arial'
3369
3532
  */
3370
3533
  headFontFaceCS?: string;
3371
3534
  /**
3372
- * Body complex-script font face — theme `<a:cs>` slot of the minor font.
3535
+ * Body complex-script font face: theme `<a:cs>` slot of the minor font.
3373
3536
  * Used for complex scripts such as Arabic, Hebrew, Thai, and Devanagari.
3374
3537
  * - leave unset to keep PowerPoint's empty default (auto-resolved per script)
3375
3538
  * @example 'Arial'
@@ -3383,8 +3546,6 @@ interface ThemeProps {
3383
3546
  */
3384
3547
  colorScheme?: ThemeColorScheme;
3385
3548
  }
3386
- //#endregion
3387
- //#region src/types/pres.d.ts
3388
3549
  interface WriteBaseProps {
3389
3550
  /**
3390
3551
  * Whether to DEFLATE-compress the package (PowerPoint itself always compresses;
@@ -3414,13 +3575,26 @@ interface WriteBaseProps {
3414
3575
  */
3415
3576
  onMediaError?: 'throw' | 'placeholder';
3416
3577
  }
3417
- interface WriteProps extends WriteBaseProps {
3578
+ interface WriteProps<T extends WRITE_OUTPUT_TYPE = WRITE_OUTPUT_TYPE> extends WriteBaseProps {
3418
3579
  /**
3419
- * Output type
3580
+ * Output type. `write()` resolves to the matching {@link WriteOutputMap} entry.
3420
3581
  * - values: 'arraybuffer' | 'base64' | 'binarystring' | 'blob' | 'nodebuffer' | 'uint8array'
3421
3582
  * @default 'blob'
3422
3583
  */
3423
- outputType?: WRITE_OUTPUT_TYPE;
3584
+ outputType?: T;
3585
+ }
3586
+ /**
3587
+ * What `write()` resolves to for each {@link WriteProps.outputType}. `'nodebuffer'` is a Node
3588
+ * `Buffer` at run time, typed as the `Uint8Array` it extends so the declaration does not need
3589
+ * Node's types.
3590
+ */
3591
+ interface WriteOutputMap {
3592
+ arraybuffer: ArrayBuffer;
3593
+ base64: string;
3594
+ binarystring: string;
3595
+ blob: Blob;
3596
+ nodebuffer: Uint8Array;
3597
+ uint8array: Uint8Array;
3424
3598
  }
3425
3599
  interface WriteFileProps extends WriteBaseProps {
3426
3600
  /**
@@ -3431,7 +3605,7 @@ interface WriteFileProps extends WriteBaseProps {
3431
3605
  }
3432
3606
  /**
3433
3607
  * One emitted OOXML package part: its full slash-path and already-encoded bytes. Returned by
3434
- * {@link TsPptx.toParts} for callers that want the raw parts of the `.pptx` OPC package without
3608
+ * {@link PptxTs.toParts} for callers that want the raw parts of the `.pptx` OPC package without
3435
3609
  * zipping (custom containers, streaming, part-level inspection). The bytes are byte-identical to
3436
3610
  * what `write()` would compress for the same part;
3437
3611
  * XML parts are UTF-8 (decode with `new TextDecoder().decode(part.data)`), media/font parts are
@@ -3444,7 +3618,7 @@ interface PackagePart {
3444
3618
  readonly data: Uint8Array;
3445
3619
  }
3446
3620
  /**
3447
- * Options for {@link TsPptx.toParts}. A deliberately narrow subset of {@link WriteProps}:
3621
+ * Options for {@link PptxTs.toParts}. A deliberately narrow subset of {@link WriteProps}:
3448
3622
  * `compression` and `outputType` are zip concerns and do not apply when parts are returned
3449
3623
  * unzipped, so only media-error handling is exposed.
3450
3624
  */
@@ -3519,6 +3693,5 @@ interface PresentationProps {
3519
3693
  theme: ThemeProps;
3520
3694
  title: string;
3521
3695
  }
3522
- //#endregion
3523
- export { ChartPropsAxisCat as $, ShapeAdjustValue as $t, TextVertType as A, NotesTextOptions as At, ShapeFillProps as B, TextMeasurement as Bt, ImageFillProps as C, TimeUnit as Cn, CommonObjectDescriptor as Ct, PatternPreset as D, CommentProps as Dt, PatternFillProps as E, PlaceholderProps as Et, ConnectorType as F, TableLayoutResult as Ft, ChartDataPointStyle as G, ImageBaseProps as Gt, StrokeProps as H, TextPropsOptions as Ht, FillOption as I, TextBaseProps as It, ChartExGeography as J, MediaType as Jt, ChartErrorBarOptions as K, ImageProps as Kt, HyperlinkActionJump as L, TextBulletProps as Lt, VAlign as M, ResolvedCommentAuthor as Mt, BorderProps as N, SlideComment as Nt, PositionProps as O, MeasureTextOptions as Ot, ConnectorProps as P, TableCellLayout as Pt, ChartOpts as Q, ShapeAdjustHandleXY as Qt, HyperlinkProps as R, TextFitShrinkProps as Rt, HexColor as S, ThemeColorSlot as Sn, OptsChartGridLine as St, Margin as T, ObjectNameProps as Tt, ChartAreaProps as U, textRun as Ut, ShapeLineProps as V, TextProps as Vt, ChartAxisTickMark as W, textRuns as Wt, ChartLineDash as X, ShapeAdjustHandle as Xt, ChartExStatistics as Y, OleObjectProps as Yt, ChartMulti as Z, ShapeAdjustHandlePolar as Zt, DataOrPathRequiredProps as _, RadarStyleAlias as _n, ChartPropsLegend as _t, PresentationProps as a, BarGrouping as an, ChartPropsChartDoughnut as at, GradientStopProps as b, TextHorzOverflowType as bn, LineCap as bt, WriteFileProps as c, DataLabelPosition as cn, ChartPropsChartPie as ct, ThemeProps as d, LegendPosition as dn, ChartPropsChartStock as dt, ShapeConnectionSite as en, ChartPropsAxisSer as et, BackgroundOption as f, LightRigDirection as fn, ChartPropsChartSurface as ft, DataOrPathProps as g, RadarStyle as gn, ChartPropsFillLine as gt, Coord as h, PresetMaterialType as hn, ChartPropsDataTable as ht, PresLayout as i, BarDirection as in, ChartPropsChartBoxWhisker as it, ThemeColor as j, OverflowBoxOptions as jt, RadialGradientFillProps as k, NotesProps as kt, WriteProps as l, DisplayBlanksAs as ln, ChartPropsChartRadar as lt, Color as m, LineDataSymbol as mn, ChartPropsDataLabel as mt, PackagePart as n, ShapeProps as nn, ChartPropsBase as nt, SectionProps as o, BevelPresetType as on, ChartPropsChartHistogram as ot, BackgroundProps as p, LightRigType as pn, ChartPropsChartWaterfall as pt, ChartExBinning as q, MediaProps as qt, PartsProps as r, Bar3DShape as rn, ChartPropsChartBar as rt, WriteBaseProps as s, ColorMapToken as sn, ChartPropsChartLine as st, CustomPropertyValue as t, ShapeGuide as tn, ChartPropsAxisVal as tt, ThemeColorScheme as u, EMBEDDED_FONT_SLOTS as un, ChartPropsChartRegionMap as ut, GeometryPoint as v, TEXT_AUTONUM_SCHEMES as vn, ChartPropsTitle as vt, LinearGradientFillProps as w, ObjectLockProps as wt, HAlign as x, TextShapeType as xn, OptsChartData as xt, GradientFillProps as y, TRANSITION_TYPES as yn, ChartSeriesOpts as yt, ShadowProps as z, TextGlowProps as zt };
3524
- //# sourceMappingURL=pres-C6qgOFAa.d.ts.map
3696
+ export { ChartExBinning as $, ImageBaseProps as $t, PositionProps as A, TextShapeType as An, ObjectLockProps as At, HyperlinkActionJump as B, ResolvedCommentAuthor as Bt, HexColor as C, PlaceholderXmlType as Cn, ChartPropsLegend as Ct, PatternFillProps as D, TEXT_AUTONUM_SCHEMES as Dn, OptsChartData as Dt, Margin as E, RadarStyleAlias as En, LineCap as Et, ActionHyperlinkProps as F, CommentProps as Ft, ShapeLineProps as G, TextBulletProps as Gt, HyperlinkProps as H, TableCellLayout as Ht, BorderProps as I, MeasureTextOptions as It, UrlHyperlinkProps as J, TextMeasurement as Jt, SlideHyperlinkProps as K, TextFitShrinkProps as Kt, ConnectorProps as L, NotesProps as Lt, TextVertType as M, TimeUnit as Mn, PlaceholderBinding as Mt, ThemeColor as N, PlaceholderOption as Nt, PatternPreset as O, TRANSITION_TYPES as On, OptsChartGridLine as Ot, VAlign as P, PlaceholderProps as Pt, ChartErrorBarOptions as Q, textRuns as Qt, ConnectorType as R, NotesTextOptions as Rt, HAlign as S, LineDataSymbol as Sn, ChartPropsFillLine as St, LinearGradientFillProps as T, RadarStyle as Tn, ChartSeriesOpts as Tt, ShadowProps as U, TableLayoutResult as Ut, HyperlinkBaseProps as V, SlideComment as Vt, ShapeFillProps as W, TextBaseProps as Wt, ChartAxisTickMark as X, TextPropsOptions as Xt, ChartAreaProps as Y, TextProps as Yt, ChartDataPointStyle as Z, textRun as Zt, DataOrPathProps as _, DisplayBlanksAs as _n, ChartPropsChartStock as _t, PresentationProps as a, ShapeAdjustHandlePolar as an, ChartPropsAxisCat as at, GradientFillProps as b, LightRigDirection as bn, ChartPropsDataLabel as bt, WriteFileProps as c, ShapeConnectionSite as cn, ChartPropsBase as ct, ThemeColorScheme as d, Bar3DShape as dn, ChartPropsChartDoughnut as dt, ImageProps as en, ChartExGeography as et, ThemeProps as f, BarDirection as fn, ChartPropsChartHistogram as ft, Coord as g, DataLabelPosition as gn, ChartPropsChartRegionMap as gt, Color as h, ColorMapToken as hn, ChartPropsChartRadar as ht, PresLayout as i, ShapeAdjustHandle as in, ChartOpts as it, RadialGradientFillProps as j, ThemeColorSlot as jn, ObjectNameProps as jt, PlaceholderPositionProps as k, TextHorzOverflowType as kn, CommonObjectDescriptor as kt, WriteOutputMap as l, ShapeGuide as ln, ChartPropsChartBar as lt, BackgroundProps as m, BevelPresetType as mn, ChartPropsChartPie as mt, PackagePart as n, MediaType as nn, ChartLineDash as nt, SectionProps as o, ShapeAdjustHandleXY as on, ChartPropsAxisSer as ot, BackgroundOption as p, BarGrouping as pn, ChartPropsChartLine as pt, StrokeProps as q, TextGlowProps as qt, PartsProps as r, OleObjectProps as rn, ChartMulti as rt, WriteBaseProps as s, ShapeAdjustValue as sn, ChartPropsAxisVal as st, CustomPropertyValue as t, MediaProps as tn, ChartExStatistics as tt, WriteProps as u, ShapeProps as un, ChartPropsChartBoxWhisker as ut, DataOrPathRequiredProps as v, EMBEDDED_FONT_SLOTS as vn, ChartPropsChartSurface as vt, ImageFillProps as w, PresetMaterialType as wn, ChartPropsTitle as wt, GradientStopProps as x, LightRigType as xn, ChartPropsDataTable as xt, GeometryPoint as y, LegendPosition as yn, ChartPropsChartWaterfall as yt, FillOption as z, OverflowBoxOptions as zt };
3697
+ //# sourceMappingURL=pres-BkEkUAEM.d.ts.map