ooxml-core 1.9.0 → 1.11.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 (202) hide show
  1. package/dist/PptxHandler-DNZHAHUY.cjs +12 -0
  2. package/dist/PptxHandler-E44KDHMQ.mjs +3 -0
  3. package/dist/{PptxHandler-EX4WBIQQ.mjs → PptxHandler-NROFYT2N.mjs} +2 -2
  4. package/dist/automation/index.cjs +3236 -2258
  5. package/dist/automation/index.mjs +3236 -2258
  6. package/dist/{chunk-SWF7KVL5.cjs → chunk-2UVH6RHI.cjs} +1608 -1163
  7. package/dist/{chunk-M76PHYRR.mjs → chunk-7DSZI7S6.mjs} +1 -1
  8. package/dist/{chunk-AT66SA5M.cjs → chunk-7QZGRB3T.cjs} +28 -10
  9. package/dist/chunk-ANZ4Q6I3.cjs +21 -0
  10. package/dist/{chunk-CPKNMQLX.cjs → chunk-AWIDASUW.cjs} +25 -2
  11. package/dist/{chunk-SVQZXP3F.mjs → chunk-CBNKBVX5.mjs} +25 -2
  12. package/dist/{chunk-FIELY5PI.mjs → chunk-EC2W2MDY.mjs} +30 -2
  13. package/dist/chunk-EGTRL3QJ.mjs +19 -0
  14. package/dist/chunk-GXHKNSZX.mjs +9 -0
  15. package/dist/{chunk-OXHMZS7B.mjs → chunk-HCXUI5UC.mjs} +943 -273
  16. package/dist/chunk-HDQXPSHY.cjs +17 -0
  17. package/dist/chunk-KTYBFGEY.mjs +14 -0
  18. package/dist/chunk-QOO36KG4.cjs +42 -0
  19. package/dist/chunk-R2KZXD6U.mjs +39 -0
  20. package/dist/{chunk-IGOA57LE.mjs → chunk-U2DF3EGK.mjs} +1 -1
  21. package/dist/{chunk-OB277ZGE.mjs → chunk-UAY26XOI.mjs} +27 -9
  22. package/dist/{chunk-WSO4T2LJ.mjs → chunk-W5ARCUJB.mjs} +26 -3
  23. package/dist/chunk-XZPZHXV4.cjs +12 -0
  24. package/dist/{chunk-LCS3J3QI.mjs → chunk-YB5SRNFS.mjs} +717 -272
  25. package/dist/docx/layout/adapt-table.d.ts +2 -2
  26. package/dist/docx/layout/adapt-table.d.ts.map +1 -1
  27. package/dist/docx/layout/flow-table.d.ts.map +1 -1
  28. package/dist/docx/layout/index.cjs +554 -83
  29. package/dist/docx/layout/index.mjs +554 -84
  30. package/dist/docx/layout/nested-fragment-edges.d.ts +9 -0
  31. package/dist/docx/layout/nested-fragment-edges.d.ts.map +1 -0
  32. package/dist/docx/layout/nested-frame-profile.d.ts +9 -0
  33. package/dist/docx/layout/nested-frame-profile.d.ts.map +1 -0
  34. package/dist/docx/layout/page-cursor.d.ts +2 -0
  35. package/dist/docx/layout/page-cursor.d.ts.map +1 -1
  36. package/dist/docx/layout/result.d.ts +20 -0
  37. package/dist/docx/layout/result.d.ts.map +1 -1
  38. package/dist/docx/layout/table-border-layout.d.ts +16 -0
  39. package/dist/docx/layout/table-border-layout.d.ts.map +1 -0
  40. package/dist/docx/layout/table-cell-layout.d.ts +3 -2
  41. package/dist/docx/layout/table-cell-layout.d.ts.map +1 -1
  42. package/dist/docx/layout/table-content.d.ts +4 -0
  43. package/dist/docx/layout/table-content.d.ts.map +1 -0
  44. package/dist/docx/layout/table-footnotes.d.ts +5 -0
  45. package/dist/docx/layout/table-footnotes.d.ts.map +1 -1
  46. package/dist/docx/layout/table-frames.d.ts +4 -0
  47. package/dist/docx/layout/table-frames.d.ts.map +1 -0
  48. package/dist/docx/layout/table-layout.d.ts +8 -3
  49. package/dist/docx/layout/table-layout.d.ts.map +1 -1
  50. package/dist/docx/layout/table-note-completion.d.ts +5 -0
  51. package/dist/docx/layout/table-note-completion.d.ts.map +1 -0
  52. package/dist/docx/layout/table-note-stories.d.ts +6 -0
  53. package/dist/docx/layout/table-note-stories.d.ts.map +1 -0
  54. package/dist/pptx/automation/index.cjs +801 -296
  55. package/dist/pptx/automation/index.d.ts +5 -4
  56. package/dist/pptx/automation/index.d.ts.map +1 -1
  57. package/dist/pptx/automation/index.mjs +5 -5
  58. package/dist/pptx/chunks/{text-operations-BLodkuXE.d.ts → elements-DD3UGOMd.d.ts} +27 -3248
  59. package/dist/pptx/chunks/elements-DD3UGOMd.d.ts.map +1 -0
  60. package/dist/pptx/chunks/{index-B4cnSPNz.d.ts → index-BZrFyNtU.d.ts} +113 -5
  61. package/dist/pptx/chunks/index-BZrFyNtU.d.ts.map +1 -0
  62. package/dist/pptx/chunks/{index-BZh-IMkN.d.ts → index-DdX02BSm.d.ts} +19 -3
  63. package/dist/pptx/chunks/index-DdX02BSm.d.ts.map +1 -0
  64. package/dist/pptx/chunks/smart-art-ENMMEbmW.d.ts +1512 -0
  65. package/dist/pptx/chunks/smart-art-ENMMEbmW.d.ts.map +1 -0
  66. package/dist/pptx/chunks/text-D49FKllA.d.ts +1473 -0
  67. package/dist/pptx/chunks/text-D49FKllA.d.ts.map +1 -0
  68. package/dist/pptx/chunks/text-operations-CyMTMfID.d.ts +3261 -0
  69. package/dist/pptx/chunks/text-operations-CyMTMfID.d.ts.map +1 -0
  70. package/dist/pptx/cli/index.cjs +801 -296
  71. package/dist/pptx/cli/index.d.ts +1 -1
  72. package/dist/pptx/cli/index.mjs +4 -4
  73. package/dist/pptx/converter/index.cjs +1 -0
  74. package/dist/pptx/converter/index.d.ts +1 -1
  75. package/dist/pptx/converter/index.mjs +2 -2
  76. package/dist/pptx/editor/render/collaboration-live-patch-target.cjs +2 -2
  77. package/dist/pptx/editor/render/collaboration-live-patch-target.mjs +1 -1
  78. package/dist/pptx/editor/render/find-replace.cjs +19 -18
  79. package/dist/pptx/editor/render/find-replace.d.ts +2 -2
  80. package/dist/pptx/editor/render/find-replace.mjs +3 -2
  81. package/dist/pptx/editor/render/font-family-update.cjs +14 -0
  82. package/dist/pptx/editor/render/font-family-update.d.ts +17 -0
  83. package/dist/pptx/editor/render/font-family-update.d.ts.map +1 -0
  84. package/dist/pptx/editor/render/font-family-update.mjs +1 -0
  85. package/dist/pptx/editor/render/paragraph-geometry-overrides.cjs +14 -0
  86. package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts +17 -0
  87. package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts.map +1 -0
  88. package/dist/pptx/editor/render/paragraph-geometry-overrides.mjs +12 -0
  89. package/dist/pptx/editor/render/remap-text.cjs +2 -2
  90. package/dist/pptx/editor/render/remap-text.d.ts.map +1 -1
  91. package/dist/pptx/editor/render/remap-text.mjs +1 -1
  92. package/dist/pptx/editor/render/slide-operations.cjs +9 -8
  93. package/dist/pptx/editor/render/slide-operations.mjs +3 -2
  94. package/dist/pptx/editor/render/table-data-grid-ops.cjs +1 -1
  95. package/dist/pptx/editor/render/table-data-grid-ops.mjs +1 -1
  96. package/dist/pptx/editor/render/text-content-style.cjs +18 -0
  97. package/dist/pptx/editor/render/text-content-style.d.ts +9 -0
  98. package/dist/pptx/editor/render/text-content-style.d.ts.map +1 -0
  99. package/dist/pptx/editor/render/text-content-style.mjs +5 -0
  100. package/dist/pptx/editor/render/text-runs-style-patch.cjs +17 -0
  101. package/dist/pptx/editor/render/text-runs-style-patch.d.ts +7 -0
  102. package/dist/pptx/editor/render/text-runs-style-patch.d.ts.map +1 -0
  103. package/dist/pptx/editor/render/text-runs-style-patch.mjs +15 -0
  104. package/dist/pptx/editor/render/text-style-scope.cjs +173 -0
  105. package/dist/pptx/editor/render/text-style-scope.d.ts +76 -0
  106. package/dist/pptx/editor/render/text-style-scope.d.ts.map +1 -0
  107. package/dist/pptx/editor/render/text-style-scope.mjs +164 -0
  108. package/dist/pptx/editor/render/theme-editor-model.cjs +1 -1
  109. package/dist/pptx/editor/render/theme-editor-model.mjs +1 -1
  110. package/dist/pptx/editor/render/update-text-segment-style.cjs +11 -0
  111. package/dist/pptx/editor/render/update-text-segment-style.d.ts +14 -0
  112. package/dist/pptx/editor/render/update-text-segment-style.d.ts.map +1 -0
  113. package/dist/pptx/editor/render/update-text-segment-style.mjs +2 -0
  114. package/dist/pptx/index.cjs +1091 -296
  115. package/dist/pptx/index.d.ts +7 -5
  116. package/dist/pptx/index.mjs +5 -5
  117. package/dist/pptx/smartart-layouts/index.d.ts +1 -1
  118. package/dist/teams/index.cjs +590 -122
  119. package/dist/teams/index.mjs +590 -122
  120. package/dist/visio/date-cache.d.ts +3 -0
  121. package/dist/visio/date-cache.d.ts.map +1 -0
  122. package/dist/visio/edit-commands.d.ts +3 -3
  123. package/dist/visio/edit-commands.d.ts.map +1 -1
  124. package/dist/visio/edit-formatting-scope.d.ts.map +1 -1
  125. package/dist/visio/edit-recalculate-index.d.ts.map +1 -1
  126. package/dist/visio/edit-text-field-commands.d.ts +15 -0
  127. package/dist/visio/edit-text-field-commands.d.ts.map +1 -1
  128. package/dist/visio/edit-text-field.d.ts +2 -2
  129. package/dist/visio/edit-text-field.d.ts.map +1 -1
  130. package/dist/visio/edit.d.ts +1 -1
  131. package/dist/visio/edit.d.ts.map +1 -1
  132. package/dist/visio/index.cjs +501 -220
  133. package/dist/visio/index.d.ts +1 -1
  134. package/dist/visio/index.d.ts.map +1 -1
  135. package/dist/visio/index.mjs +501 -220
  136. package/dist/visio/model.d.ts +6 -0
  137. package/dist/visio/model.d.ts.map +1 -1
  138. package/dist/visio/shape-metadata.d.ts.map +1 -1
  139. package/dist/visio/shapes.d.ts.map +1 -1
  140. package/dist/visio/style.d.ts +1 -1
  141. package/dist/visio/style.d.ts.map +1 -1
  142. package/dist/visio/text-field-display.d.ts +3 -0
  143. package/dist/visio/text-field-display.d.ts.map +1 -1
  144. package/dist/visio/text-field-editability.d.ts +6 -0
  145. package/dist/visio/text-field-editability.d.ts.map +1 -0
  146. package/dist/visio/text-field-fraction.d.ts +3 -0
  147. package/dist/visio/text-field-fraction.d.ts.map +1 -0
  148. package/dist/visio/text-field-independent.d.ts +4 -0
  149. package/dist/visio/text-field-independent.d.ts.map +1 -0
  150. package/dist/visio/text-field-numeric.d.ts +1 -1
  151. package/dist/visio/text-field-numeric.d.ts.map +1 -1
  152. package/dist/visio/text-field-source.d.ts +6 -0
  153. package/dist/visio/text-field-source.d.ts.map +1 -0
  154. package/dist/visio/text-field-system-date.d.ts +4 -0
  155. package/dist/visio/text-field-system-date.d.ts.map +1 -0
  156. package/dist/visio/text-fields.d.ts +1 -0
  157. package/dist/visio/text-fields.d.ts.map +1 -1
  158. package/dist/visio/ui/edit-commands.d.ts.map +1 -1
  159. package/dist/visio/ui/index.cjs +514 -221
  160. package/dist/visio/ui/index.mjs +514 -221
  161. package/dist/visio/ui/snapshot-scene.d.ts.map +1 -1
  162. package/dist/visio/ui/text-field-catalog.d.ts.map +1 -1
  163. package/dist/xlsx/edit/pivots.d.ts.map +1 -1
  164. package/dist/xlsx/index.cjs +1362 -659
  165. package/dist/xlsx/index.mjs +1361 -660
  166. package/dist/xlsx/load/index.cjs +1091 -430
  167. package/dist/xlsx/load/index.mjs +1091 -430
  168. package/dist/xlsx/model-pivots.d.ts +31 -2
  169. package/dist/xlsx/model-pivots.d.ts.map +1 -1
  170. package/dist/xlsx/pivot/admission.d.ts.map +1 -1
  171. package/dist/xlsx/pivot/aggregate.d.ts +3 -1
  172. package/dist/xlsx/pivot/aggregate.d.ts.map +1 -1
  173. package/dist/xlsx/pivot/data.d.ts +2 -2
  174. package/dist/xlsx/pivot/data.d.ts.map +1 -1
  175. package/dist/xlsx/pivot/hierarchy-first.d.ts +21 -0
  176. package/dist/xlsx/pivot/hierarchy-first.d.ts.map +1 -0
  177. package/dist/xlsx/pivot/hierarchy.d.ts +2 -4
  178. package/dist/xlsx/pivot/hierarchy.d.ts.map +1 -1
  179. package/dist/xlsx/pivot/index.d.ts +2 -0
  180. package/dist/xlsx/pivot/index.d.ts.map +1 -1
  181. package/dist/xlsx/pivot/measures.d.ts +13 -0
  182. package/dist/xlsx/pivot/measures.d.ts.map +1 -0
  183. package/dist/xlsx/pivot/page-filter-admission.d.ts +5 -0
  184. package/dist/xlsx/pivot/page-filter-admission.d.ts.map +1 -0
  185. package/dist/xlsx/pivot/page-filter.d.ts +11 -0
  186. package/dist/xlsx/pivot/page-filter.d.ts.map +1 -0
  187. package/dist/xlsx/pivot/read.d.ts.map +1 -1
  188. package/dist/xlsx/pivot/table-xml.d.ts.map +1 -1
  189. package/dist/xlsx/pivot/values-axis.d.ts +12 -0
  190. package/dist/xlsx/pivot/values-axis.d.ts.map +1 -0
  191. package/dist/xlsx/ui/commands/i18n/navigation.d.ts.map +1 -1
  192. package/dist/xlsx/ui/commands/i18n/pivots.d.ts.map +1 -1
  193. package/dist/xlsx/ui/index.cjs +640 -137
  194. package/dist/xlsx/ui/index.mjs +640 -137
  195. package/package.json +2 -2
  196. package/dist/PptxHandler-AT7FVG5Q.mjs +0 -2
  197. package/dist/PptxHandler-VFSCECPL.cjs +0 -11
  198. package/dist/pptx/chunks/index-B4cnSPNz.d.ts.map +0 -1
  199. package/dist/pptx/chunks/index-BZh-IMkN.d.ts.map +0 -1
  200. package/dist/pptx/chunks/smart-art-Q2kZQtHh.d.ts +0 -2970
  201. package/dist/pptx/chunks/smart-art-Q2kZQtHh.d.ts.map +0 -1
  202. package/dist/pptx/chunks/text-operations-BLodkuXE.d.ts.map +0 -1
@@ -0,0 +1,1473 @@
1
+ import { t as PptxThemeColorRef } from "./color-ref-DT599vEx.js";
2
+ //#region pptx/core/types/common.d.ts
3
+ /**
4
+ * Shared value types used across the entire PPTX editor type system.
5
+ *
6
+ * Contains primitive enums, small interfaces, and the XML object alias
7
+ * that almost every other type file imports.
8
+ *
9
+ * @module pptx-types/common
10
+ */
11
+ /**
12
+ * Underline style tokens from OOXML `a:rPr/@u`.
13
+ *
14
+ * These map directly to the OpenXML `ST_TextUnderlineType` simple type.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * const style: UnderlineStyle = "wavy";
19
+ * // => "wavy" — one of: sng | dbl | heavy | dotted | dash | wavy | none | ...
20
+ * ```
21
+ */
22
+ type UnderlineStyle = 'sng' | 'dbl' | 'heavy' | 'dotted' | 'dottedHeavy' | 'dash' | 'dashHeavy' | 'dashLong' | 'dashLongHeavy' | 'dotDash' | 'dotDashHeavy' | 'dotDotDash' | 'dotDotDashHeavy' | 'wavy' | 'wavyHeavy' | 'wavyDbl' | 'words' | 'none';
23
+ /**
24
+ * Connector connection point reference — links a connector endpoint to a
25
+ * specific shape on the slide.
26
+ *
27
+ * When both `shapeId` and `connectionSiteIndex` are set, the connector
28
+ * end snaps to that shapes’s connection site and “follows” the shape when
29
+ * it is moved.
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const start: ConnectorConnectionPoint = {
34
+ * shapeId: "shape_1",
35
+ * connectionSiteIndex: 2,
36
+ * };
37
+ * // => { shapeId: "shape_1", connectionSiteIndex: 2 } satisfies ConnectorConnectionPoint
38
+ * ```
39
+ */
40
+ interface ConnectorConnectionPoint {
41
+ /** ID of the shape this connector endpoint is attached to. */
42
+ shapeId?: string;
43
+ /** Connection site index on the target shape (0-based). */
44
+ connectionSiteIndex?: number;
45
+ }
46
+ /**
47
+ * Arrow head types for connector start/end.
48
+ *
49
+ * Maps to `a:headEnd/@type` and `a:tailEnd/@type` in OOXML.
50
+ *
51
+ * @example
52
+ * ```ts
53
+ * const arrow: ConnectorArrowType = "triangle";
54
+ * // => "triangle" — one of: none | triangle | stealth | diamond | oval | arrow
55
+ * ```
56
+ */
57
+ type ConnectorArrowType = 'none' | 'triangle' | 'stealth' | 'diamond' | 'oval' | 'arrow';
58
+ /**
59
+ * Stroke dash pattern types for lines and shape outlines.
60
+ *
61
+ * Maps to `a:ln/a:prstDash/@val` in OOXML. Use `"custom"` for
62
+ * user-defined dash/space arrays.
63
+ *
64
+ * @example
65
+ * ```ts
66
+ * const dash: StrokeDashType = "dashDot";
67
+ * // => "dashDot" — one of: solid | dot | dash | lgDash | dashDot | custom | ...
68
+ * ```
69
+ */
70
+ type StrokeDashType = 'solid' | 'dot' | 'dash' | 'lgDash' | 'dashDot' | 'lgDashDot' | 'lgDashDotDot' | 'sysDot' | 'sysDash' | 'sysDashDot' | 'sysDashDotDot' | 'custom';
71
+ /**
72
+ * Shadow effect properties for a single shadow layer.
73
+ *
74
+ * Represents parsed values from an `<a:outerShdw>` node. Multiple instances
75
+ * can be stored in {@link ShapeStyle.shadows} for compound shadow effects.
76
+ *
77
+ * @example
78
+ * ```ts
79
+ * const shadow: ShadowEffect = {
80
+ * color: "#000000",
81
+ * opacity: 0.4,
82
+ * blur: 6,
83
+ * angle: 315,
84
+ * distance: 4,
85
+ * };
86
+ * // => { color: "#000000", opacity: 0.4, blur: 6, angle: 315, distance: 4 } satisfies ShadowEffect
87
+ * ```
88
+ */
89
+ interface ShadowEffect {
90
+ /** Shadow color as hex string. */
91
+ color: string;
92
+ /** Shadow opacity (0-1). */
93
+ opacity: number;
94
+ /** Blur radius in pixels. */
95
+ blur: number;
96
+ /** Shadow angle in degrees (0-360). */
97
+ angle: number;
98
+ /** Shadow distance in pixels. */
99
+ distance: number;
100
+ /** Whether shadow rotates with shape. */
101
+ rotateWithShape?: boolean;
102
+ }
103
+ /**
104
+ * Strongly-typed parsed XML node from fast-xml-parser.
105
+ *
106
+ * The parser is configured with `attributeNamePrefix: '@_'`,
107
+ * `parseAttributeValue: false`, and `parseTagValue: false`, so attribute and
108
+ * text values are always strings at runtime. This type encodes that:
109
+ *
110
+ * - **Attributes** — keys matching `` `@_${string}` `` return
111
+ * `string | undefined` directly.
112
+ * - **Text content** — `#text` returns `string | undefined`.
113
+ * - **Child elements** — any other string key returns
114
+ * `XmlObject | XmlObject[] | string | undefined`. The union reflects that
115
+ * fast-xml-parser may emit an object (single child), an array (repeated
116
+ * children), or a bare string (text-only element collapsed by the parser).
117
+ *
118
+ * For traversal, prefer the helpers in {@link ./../utils/xml-access} —
119
+ * `xmlChild` / `xmlChildren` / `xmlAttr` / `xmlText` / `xmlPath` — which
120
+ * narrow the union and normalize the single-vs-array duality. Direct
121
+ * indexing works for attributes (typed as string) but chained child access
122
+ * (`obj['p:spPr']?.['a:xfrm']`) requires the helpers or a narrowing cast
123
+ * because TypeScript cannot index into the `XmlObject[] | string` part of
124
+ * the union.
125
+ */
126
+ interface XmlObject {
127
+ /** Attributes (`@_`-prefixed keys) are always strings at runtime. */
128
+ [attr: `@_${string}`]: string | undefined;
129
+ /** Element text content surfaces under `#text` when present. */
130
+ '#text'?: string;
131
+ /**
132
+ * Child elements keyed by their (namespaced) tag name. fast-xml-parser
133
+ * emits a single object for unique elements, an array for repeated ones,
134
+ * and a bare string for elements collapsed to their text content. Use
135
+ * the helpers in `utils/xml-access` to narrow this union.
136
+ */
137
+ [child: string]: XmlObject | XmlObject[] | string | undefined;
138
+ }
139
+ /**
140
+ * Lock attributes from an element's non-visual properties node.
141
+ *
142
+ * When a flag is `true` the corresponding user interaction is disabled
143
+ * in the editor (e.g. `noRotation` prevents free rotation of the shape).
144
+ *
145
+ * One bag covers every family, but the families are NOT interchangeable in
146
+ * the file: `a:spLocks` (`CT_ShapeLocking`), `a:picLocks`, `a:cxnSpLocks`,
147
+ * `a:grpSpLocks` (`CT_GroupLocking`) and `a:graphicFrameLocks`
148
+ * (`CT_GraphicalObjectFrameLocking`) each declare their own attribute subset.
149
+ * `runtime/shape-lock-containers` holds that table and is what decides which
150
+ * of these fields may be written for a given element.
151
+ *
152
+ * @example
153
+ * ```ts
154
+ * const locks: PptxShapeLocks = { noMove: true, noResize: true };
155
+ * // => { noMove: true, noResize: true } satisfies PptxShapeLocks
156
+ * ```
157
+ */
158
+ interface PptxShapeLocks {
159
+ noGrouping?: boolean;
160
+ noRotation?: boolean;
161
+ noMove?: boolean;
162
+ noResize?: boolean;
163
+ noTextEdit?: boolean;
164
+ noSelect?: boolean;
165
+ noChangeAspect?: boolean;
166
+ noEditPoints?: boolean;
167
+ noAdjustHandles?: boolean;
168
+ noChangeArrowheads?: boolean;
169
+ noChangeShapeType?: boolean;
170
+ /**
171
+ * `a:graphicFrameLocks/@noDrilldown`: forbids selecting the individual
172
+ * parts inside a graphic frame (a chart series, a SmartArt node). Declared
173
+ * ONLY by `CT_GraphicalObjectFrameLocking`, so it is written for tables,
174
+ * charts, SmartArt, OLE objects and graphic-frame media, and never onto
175
+ * `a:spLocks` / `a:picLocks` / `a:cxnSpLocks` / `a:grpSpLocks`.
176
+ */
177
+ noDrilldown?: boolean;
178
+ /**
179
+ * `a:picLocks/@noCrop`: forbids cropping the picture. Declared ONLY by
180
+ * `CT_PictureLocking`, so it is written for pictures (and media authored as
181
+ * a `p:pic`) and never onto the other lock elements.
182
+ */
183
+ noCrop?: boolean;
184
+ /**
185
+ * Text-box flag from `p:cNvSpPr/@txBox`. Not a lock in the strict sense,
186
+ * but it lives on the same non-visual-properties node as `a:spLocks`, so
187
+ * it is captured here to round-trip through the model. When `true` the
188
+ * shape is a plain text box (no fill/line by default).
189
+ */
190
+ txBox?: boolean;
191
+ }
192
+ /**
193
+ * A drawing guide parsed from OOXML extension lists.
194
+ *
195
+ * Slide-level and presentation-level guides are shown as thin coloured
196
+ * lines that help users align elements.
197
+ *
198
+ * @example
199
+ * ```ts
200
+ * const guide: PptxDrawingGuide = {
201
+ * id: "g1",
202
+ * orientation: "horz",
203
+ * positionEmu: 457200,
204
+ * color: "#FF0000",
205
+ * };
206
+ * // => { id: "g1", orientation: "horz", positionEmu: 457200, color: "#FF0000" } satisfies PptxDrawingGuide
207
+ * ```
208
+ */
209
+ interface PptxDrawingGuide {
210
+ /** Unique identifier (from `@_id` attribute or generated). */
211
+ id: string;
212
+ /** Orientation: horizontal or vertical. */
213
+ orientation: 'horz' | 'vert';
214
+ /** Position in EMU (converted from pos attribute). */
215
+ positionEmu: number;
216
+ /** Optional guide colour as hex string (e.g. "#FF0000"). */
217
+ color?: string;
218
+ }
219
+ //#endregion
220
+ //#region pptx/core/types/three-d.d.ts
221
+ /**
222
+ * 3-D effect properties, text warp (WordArt) presets, and scene/shape bevel
223
+ * definitions parsed from OOXML `a:sp3d`, `a:scene3d`, and `a:bodyPr/a:prstTxWarp`.
224
+ *
225
+ * @module pptx-types/three-d
226
+ */
227
+ /**
228
+ * Bevel preset type tokens from OOXML `a:bevelT/@prst` / `a:bevelB/@prst`.
229
+ *
230
+ * @example
231
+ * ```ts
232
+ * const bevel: BevelPresetType = "circle";
233
+ * // => "circle" — one of: "circle" | "relaxedInset" | "cross" | "coolSlant" | "angle" | …
234
+ * ```
235
+ */
236
+ type BevelPresetType = 'circle' | 'relaxedInset' | 'cross' | 'coolSlant' | 'angle' | 'softRound' | 'convex' | 'slope' | 'divot' | 'riblet' | 'hardEdge' | 'artDeco' | 'none';
237
+ /**
238
+ * Material preset type tokens from OOXML `a:sp3d/@prstMaterial`.
239
+ *
240
+ * @example
241
+ * ```ts
242
+ * const mat: MaterialPresetType = "plastic";
243
+ * // => "plastic" — one of: "matte" | "warmMatte" | "plastic" | "metal" | "dkEdge" | …
244
+ * ```
245
+ */
246
+ type MaterialPresetType = 'matte' | 'warmMatte' | 'plastic' | 'metal' | 'dkEdge' | 'softEdge' | 'flat' | 'softmetal' | 'clear' | 'powder' | 'translucentPowder' | 'legacyMatte' | 'legacyPlastic' | 'legacyMetal' | 'legacyWireframe';
247
+ /**
248
+ * 3D text body extrusion/bevel from `a:bodyPr/a:sp3d`.
249
+ *
250
+ * @example
251
+ * ```ts
252
+ * const text3d: Text3DStyle = {
253
+ * extrusionHeight: 57150,
254
+ * presetMaterial: "plastic",
255
+ * bevelTopType: "circle",
256
+ * bevelTopWidth: 25400,
257
+ * bevelTopHeight: 25400,
258
+ * };
259
+ * // => satisfies Text3DStyle
260
+ * ```
261
+ */
262
+ interface Text3DStyle {
263
+ /** Extrusion height (depth) in EMU. */
264
+ extrusionHeight?: number;
265
+ /** Extrusion colour as hex string. */
266
+ extrusionColor?: string;
267
+ /** Preset material, e.g. "matte", "plastic", "metal". */
268
+ presetMaterial?: MaterialPresetType;
269
+ /** Top bevel preset type. */
270
+ bevelTopType?: BevelPresetType;
271
+ /** Top bevel width in EMU. */
272
+ bevelTopWidth?: number;
273
+ /** Top bevel height in EMU. */
274
+ bevelTopHeight?: number;
275
+ /** Bottom bevel preset type. */
276
+ bevelBottomType?: BevelPresetType;
277
+ /** Bottom bevel width in EMU. */
278
+ bevelBottomWidth?: number;
279
+ /** Bottom bevel height in EMU. */
280
+ bevelBottomHeight?: number;
281
+ }
282
+ /**
283
+ * 3D scene/camera properties from `a:scene3d`.
284
+ *
285
+ * @example
286
+ * ```ts
287
+ * const scene: Pptx3DScene = {
288
+ * cameraPreset: "perspectiveFront",
289
+ * lightRigType: "threePt",
290
+ * lightRigDirection: "t",
291
+ * };
292
+ * // => satisfies Pptx3DScene
293
+ * ```
294
+ */
295
+ interface Pptx3DScene {
296
+ /** Camera preset type, e.g. "orthographicFront", "perspectiveFront". */
297
+ cameraPreset?: string;
298
+ /** Camera field of view in 1/60000 degrees (`a:camera/@fov`). */
299
+ cameraFieldOfView?: number;
300
+ /** Camera zoom as an OOXML percentage fraction (`a:camera/@zoom`, 1 = 100%). */
301
+ cameraZoom?: number;
302
+ /** Camera rotation around X axis in 1/60000 degrees. */
303
+ cameraRotX?: number;
304
+ /** Camera rotation around Y axis in 1/60000 degrees. */
305
+ cameraRotY?: number;
306
+ /** Camera rotation around Z axis in 1/60000 degrees. */
307
+ cameraRotZ?: number;
308
+ /** Light rig type, e.g. "threePt", "balanced", "harsh". */
309
+ lightRigType?: string;
310
+ /** Light rig direction, e.g. "t", "b", "l", "r", "tl". */
311
+ lightRigDirection?: string;
312
+ /** Light-rig rotation latitude in 1/60000 degrees. */
313
+ lightRigRotX?: number;
314
+ /** Light-rig rotation longitude in 1/60000 degrees. */
315
+ lightRigRotY?: number;
316
+ /** Light-rig rotation revolution in 1/60000 degrees. */
317
+ lightRigRotZ?: number;
318
+ /** Whether a 3D backdrop plane is present (`a:backdrop`). */
319
+ hasBackdrop?: boolean;
320
+ /** Backdrop plane anchor X in EMU. */
321
+ backdropAnchorX?: number;
322
+ /** Backdrop plane anchor Y in EMU. */
323
+ backdropAnchorY?: number;
324
+ /** Backdrop plane anchor Z in EMU. */
325
+ backdropAnchorZ?: number;
326
+ /** Backdrop normal vector X component. */
327
+ backdropNormalX?: number;
328
+ /** Backdrop normal vector Y component. */
329
+ backdropNormalY?: number;
330
+ /** Backdrop normal vector Z component. */
331
+ backdropNormalZ?: number;
332
+ /** Backdrop up vector X component. */
333
+ backdropUpX?: number;
334
+ /** Backdrop up vector Y component. */
335
+ backdropUpY?: number;
336
+ /** Backdrop up vector Z component. */
337
+ backdropUpZ?: number;
338
+ }
339
+ /**
340
+ * 3D shape extrusion/bevel from `a:sp3d`.
341
+ *
342
+ * @example
343
+ * ```ts
344
+ * const shape3d: Pptx3DShape = {
345
+ * extrusionHeight: 76200,
346
+ * extrusionColor: "#4F81BD",
347
+ * presetMaterial: "metal",
348
+ * bevelTopType: "circle",
349
+ * bevelTopWidth: 12700,
350
+ * bevelTopHeight: 12700,
351
+ * };
352
+ * // => satisfies Pptx3DShape
353
+ * ```
354
+ */
355
+ interface Pptx3DShape {
356
+ /**
357
+ * Position of the shape along the Z axis, in EMU (`a:sp3d/@z`, default 0).
358
+ * Independent of {@link extrusionHeight}: it moves the whole shape forward
359
+ * or back in 3D space rather than adding depth to it, most commonly used to
360
+ * stack several shapes at different depths under one `a:scene3d` camera.
361
+ */
362
+ positionZ?: number;
363
+ /** Extrusion height in EMU. */
364
+ extrusionHeight?: number;
365
+ /** Extrusion colour. */
366
+ extrusionColor?: string;
367
+ /** Contour width in EMU. */
368
+ contourWidth?: number;
369
+ /** Contour colour. */
370
+ contourColor?: string;
371
+ /** Preset material, e.g. "matte", "warmMatte", "metal". */
372
+ presetMaterial?: string;
373
+ /** Top bevel type, e.g. "circle", "relaxedInset". */
374
+ bevelTopType?: string;
375
+ /** Top bevel width in EMU. */
376
+ bevelTopWidth?: number;
377
+ /** Top bevel height in EMU. */
378
+ bevelTopHeight?: number;
379
+ /** Bottom bevel type, e.g. "circle", "relaxedInset". */
380
+ bevelBottomType?: string;
381
+ /** Bottom bevel width in EMU. */
382
+ bevelBottomWidth?: number;
383
+ /** Bottom bevel height in EMU. */
384
+ bevelBottomHeight?: number;
385
+ }
386
+ /**
387
+ * Known OOXML preset text warp types (WordArt transforms).
388
+ *
389
+ * Falls back to `string` for unknown presets not yet catalogued.
390
+ *
391
+ * @example
392
+ * ```ts
393
+ * const warp: PptxTextWarpPreset = "textArchUp";
394
+ * // => "textArchUp" — one of: "textNoShape" | "textPlain" | "textStop" | "textArchUp" | …
395
+ * ```
396
+ */
397
+ type PptxTextWarpPreset = 'textNoShape' | 'textPlain' | 'textStop' | 'textTriangle' | 'textTriangleInverted' | 'textChevron' | 'textChevronInverted' | 'textRingInside' | 'textRingOutside' | 'textArchUp' | 'textArchDown' | 'textCircle' | 'textButton' | 'textArchUpPour' | 'textArchDownPour' | 'textCirclePour' | 'textButtonPour' | 'textCurveUp' | 'textCurveDown' | 'textCanUp' | 'textCanDown' | 'textWave1' | 'textWave2' | 'textWave4' | 'textDoubleWave1' | 'textInflate' | 'textDeflate' | 'textInflateBottom' | 'textDeflateBottom' | 'textInflateTop' | 'textDeflateTop' | 'textFadeRight' | 'textFadeLeft' | 'textFadeUp' | 'textFadeDown' | 'textSlantUp' | 'textSlantDown' | 'textCascadeUp' | 'textCascadeDown' | 'textDeflateInflate' | 'textDeflateInflateDeflate' | string;
398
+ //#endregion
399
+ //#region pptx/core/types/effect-dag.d.ts
400
+ type EffectDagBlendMode = 'darken' | 'lighten' | 'mult' | 'over' | 'screen';
401
+ type EffectDagContainerType = 'sib' | 'tree';
402
+ type EffectDagNode = EffectDagContainer | EffectDagBlend | EffectDagXfrm | EffectDagRelOff | EffectDagBlur | EffectDagAlphaOutset | EffectDagPresetShadow | EffectDagRawLeaf;
403
+ interface EffectDagContainer {
404
+ kind: 'cont';
405
+ type: EffectDagContainerType;
406
+ name?: string;
407
+ children: EffectDagNode[];
408
+ }
409
+ interface EffectDagBlend {
410
+ kind: 'blend';
411
+ mode: EffectDagBlendMode;
412
+ container: EffectDagContainer;
413
+ }
414
+ interface EffectDagXfrm {
415
+ kind: 'xfrmEffect';
416
+ sx?: number;
417
+ sy?: number;
418
+ kx?: number;
419
+ ky?: number;
420
+ tx?: number;
421
+ ty?: number;
422
+ }
423
+ interface EffectDagRelOff {
424
+ kind: 'relOff';
425
+ tx?: number;
426
+ ty?: number;
427
+ }
428
+ /** Typed CT_BlurEffect with its original payload retained for lossless edits. */
429
+ interface EffectDagBlur {
430
+ kind: 'blur';
431
+ radiusEmu?: number;
432
+ grow?: boolean;
433
+ xml: XmlObject;
434
+ }
435
+ /** Typed CT_AlphaOutsetEffect with original XML retained for lossless edits. */
436
+ interface EffectDagAlphaOutset {
437
+ kind: 'alphaOutset';
438
+ radiusEmu?: number;
439
+ xml: XmlObject;
440
+ }
441
+ /** Typed CT_PresetShadowEffect with colour and extension XML retained verbatim. */
442
+ interface EffectDagPresetShadow {
443
+ kind: 'prstShdw';
444
+ preset?: `shdw${number}`;
445
+ distanceEmu?: number;
446
+ direction?: number;
447
+ xml: XmlObject;
448
+ }
449
+ interface EffectDagRawLeaf {
450
+ kind: 'raw';
451
+ tag: string;
452
+ xml: Record<string, unknown>;
453
+ }
454
+ //#endregion
455
+ //#region pptx/core/types/text.d.ts
456
+ /**
457
+ * Rich text style properties for a text run or paragraph.
458
+ *
459
+ * Combines character-level formatting (font, bold, colour …),
460
+ * paragraph-level controls (alignment, spacing, indentation), and
461
+ * body-level properties (autofit, insets, text direction). All
462
+ * fields are optional — unset properties inherit from layout/master
463
+ * placeholders or theme defaults.
464
+ *
465
+ * @remarks
466
+ * Font sizes are stored in **points**. Spatial measurements (insets,
467
+ * margins) are in **pixels** (pre-converted from EMU during parsing).
468
+ *
469
+ * @example
470
+ * ```ts
471
+ * const heading: TextStyle = {
472
+ * fontFamily: "Montserrat",
473
+ * fontSize: 36,
474
+ * bold: true,
475
+ * color: "#1A1A2E",
476
+ * align: "center",
477
+ * lineSpacing: 1.15,
478
+ * };
479
+ *
480
+ * const body: TextStyle = {
481
+ * fontFamily: "Open Sans",
482
+ * fontSize: 14,
483
+ * color: "#444444",
484
+ * align: "left",
485
+ * paragraphSpacingAfter: 8,
486
+ * };
487
+ * // => both satisfy the TextStyle interface
488
+ * ```
489
+ */
490
+ /** 2D linear transform matrix `[a, b, c, d]` for inherited group orientation. */
491
+ type TextOrientationMatrix = [number, number, number, number];
492
+ interface TextStyle {
493
+ /**
494
+ * Combined rotation/flip matrix inherited from ancestor groups.
495
+ * Used only to keep descendant text readable after nested group mirrors.
496
+ */
497
+ ancestorGroupTransform?: TextOrientationMatrix;
498
+ /** Original `a:rPr` XML retained by projections that share the shape-text model. */
499
+ runPropertiesXml?: XmlObject;
500
+ /**
501
+ * The properties this run's OWN `a:rPr` authored, and nothing else.
502
+ *
503
+ * A run style is assembled as
504
+ * `{...inheritedRunStyle, ...authoredRunStyle}`, so the flat style is a
505
+ * fully RESOLVED view: it cannot say whether `fontSize: 60` came from the
506
+ * run, from the shape's `a:lstStyle`, from the layout placeholder, from the
507
+ * master `p:txStyles` or from the theme. Omission is meaningful in OOXML
508
+ * (§21.1.2.3), so a writer that re-emits the resolved view converts every
509
+ * inherited value into an authored one and the deck stops being
510
+ * theme-driven after one save.
511
+ *
512
+ * This is the run-scope twin of {@link TextSegment.paragraphProperties},
513
+ * which is parsed strictly from the paragraph's own `a:pPr` for the same
514
+ * reason. Present only for runs that came from a parsed deck; absent for
515
+ * SDK-built text, where the flat style IS the only description and must be
516
+ * written out in full.
517
+ */
518
+ authoredRunStyle?: TextStyle;
519
+ /**
520
+ * The resolved inheritance baseline {@link authoredRunStyle} was layered
521
+ * on top of (shape `a:lstStyle` -> placeholder -> layout -> master
522
+ * `p:txStyles` -> theme -> `p:defaultTextStyle`).
523
+ *
524
+ * Kept alongside the authored half because the two answer different
525
+ * questions. The authored half says "the source pinned this"; the baseline
526
+ * says "this value is what inheritance already produces", which is how an
527
+ * EDIT is told apart from an inherited value: an editor mutates the flat
528
+ * style without knowing about either field, so a property that now differs
529
+ * from the baseline was either authored or edited and must be written,
530
+ * while one that still matches can be left to inherit.
531
+ *
532
+ * Holds a reference to the per-paragraph baseline object rather than a
533
+ * copy, so carrying it costs one pointer per run.
534
+ */
535
+ inheritedRunStyle?: TextStyle;
536
+ /**
537
+ * Snapshot of the ELEMENT-scope paragraph geometry (alignment, margins,
538
+ * indent, line and paragraph spacing, tab stops, rtl, line-break flags) as
539
+ * the load pipeline resolved it.
540
+ *
541
+ * Present only on an `element.textStyle` that came from a parsed deck, and
542
+ * populated only with the geometry keys. It exists so the save path can
543
+ * answer one question it otherwise cannot: has the user CHANGED the body's
544
+ * alignment or indent, or is the value simply what the shape's
545
+ * `a:lstStyle`, its layout placeholder and the master already produce?
546
+ * Element-level text panels (`textAdvancedPatch`, `alignPatch` and friends
547
+ * in `pptx-viewer-shared`) write `element.textStyle` and never touch
548
+ * `segment.paragraphProperties`, so a diff against this snapshot is the
549
+ * only way to tell an edit from an inheritance artefact.
550
+ *
551
+ * @see element-paragraph-geometry.ts
552
+ */
553
+ resolvedParagraphGeometry?: TextStyle;
554
+ /** Inherited paragraph spacing by outline level, excluding direct sibling formatting. */
555
+ inheritedParagraphSpacing?: Record<number, TextStyle>;
556
+ /**
557
+ * Snapshot of the ELEMENT-scope `a:bodyPr` properties (vertical anchor,
558
+ * text direction, columns, overflow, autofit, body insets, text wrap, and
559
+ * the boolean/rotation attributes) as the load pipeline resolved them.
560
+ *
561
+ * A shape's own `a:bodyPr` is parsed first, then whatever it left
562
+ * `undefined` is back-filled from the placeholder / layout / master
563
+ * defaults (`applyPlaceholderBodyDefaults`), and a placeholder shape with
564
+ * no `a:bodyPr` of its own has the INHERITED one parsed as if it were its
565
+ * own. None of those three sources is distinguishable at
566
+ * `element.textStyle` once the cascade finishes, so a writer that
567
+ * re-emits every defined field turns an inherited anchor, inset, autofit
568
+ * mode or `rtlCol` into a value pinned on the slide forever (and an
569
+ * inherited `a:normAutofit` with no scale gets written back as
570
+ * `a:spAutoFit`, flipping AutoSize from "shrink text" to "resize shape").
571
+ *
572
+ * Present only on an `element.textStyle` that came from a parsed deck.
573
+ * The save path diffs the live style against this snapshot: a field that
574
+ * still matches is an inheritance artefact and the writer leaves the
575
+ * underlying `a:bodyPr` attribute untouched (whatever it already is,
576
+ * present or absent); a field that differs was authored or has since
577
+ * been edited and is written out.
578
+ *
579
+ * @see element-body-properties.ts
580
+ */
581
+ resolvedBodyProperties?: TextStyle;
582
+ fontFamily?: string;
583
+ fontSize?: number;
584
+ /** When true, some form of autofit is in effect; see {@link autoFitMode} for which. */
585
+ autoFit?: boolean;
586
+ /** Explicit autofit mode from OOXML body properties.
587
+ * - 'shrink': `a:spAutoFit` - resize the SHAPE to fit the text (never the font)
588
+ * - 'normal': `a:normAutofit` - shrink the TEXT to fit the shape (via `fontScale`/`lnSpcReduction`)
589
+ * - 'none': `a:noAutofit` - explicitly no auto-fit (text overflows)
590
+ * - undefined: no autofit element present (inherit from layout/master)
591
+ */
592
+ autoFitMode?: 'shrink' | 'normal' | 'none';
593
+ /** Font scale percentage for normAutofit (e.g. 0.9 = 90%). Only meaningful when autoFit is true. */
594
+ autoFitFontScale?: number;
595
+ /** Line spacing reduction for normAutofit (e.g. 0.2 = reduce by 20%). Only meaningful when autoFit is true. */
596
+ autoFitLineSpacingReduction?: number;
597
+ bold?: boolean;
598
+ italic?: boolean;
599
+ underline?: boolean;
600
+ /** Specific underline style (e.g. "sng", "dbl", "wavy"). Falls back to "sng" when `underline` is true. */
601
+ underlineStyle?: UnderlineStyle;
602
+ /** Underline colour as hex string (`a:uFill` / `a:uLn`). When absent, inherits text colour. */
603
+ underlineColor?: string;
604
+ /**
605
+ * When true, the source authored `<a:u val="none"/>` to explicitly suppress
606
+ * underline (rather than omitting the attribute entirely). Preserved so the
607
+ * writer can re-emit the explicit `none` token instead of dropping it.
608
+ */
609
+ underlineExplicitNone?: boolean;
610
+ /**
611
+ * Underline line properties parsed from `<a:rPr><a:uLn>` — width, dash
612
+ * preset, and end caps. Captured as a typed object so the writer can
613
+ * round-trip the line styling that previously was dropped (only the
614
+ * solidFill colour was carried before).
615
+ */
616
+ underlineLine?: {
617
+ /** Line width in EMU (raw OOXML) for `a:uLn/@w`. */
618
+ widthEmu?: number;
619
+ /** Compound line type (`a:uLn/@cmpd`). */
620
+ compound?: string;
621
+ /** Cap style (`a:uLn/@cap`). */
622
+ cap?: string;
623
+ /** Pen alignment (`a:uLn/@algn`). */
624
+ algn?: string;
625
+ /** Preset dash value (`a:uLn/a:prstDash/@val`). */
626
+ prstDash?: string;
627
+ /** Raw `a:uLn/a:headEnd` XML preserved verbatim. */
628
+ headEndXml?: XmlObject;
629
+ /** Raw `a:uLn/a:tailEnd` XML preserved verbatim. */
630
+ tailEndXml?: XmlObject;
631
+ };
632
+ /** When `<a:uLnTx/>` is present — underline line follows the text run line. */
633
+ underlineLineFollowsText?: boolean;
634
+ /** When `<a:uFillTx/>` is present — underline fill follows the text run fill. */
635
+ underlineFillFollowsText?: boolean;
636
+ strikethrough?: boolean;
637
+ /** Specific strike type: single or double from `a:rPr/@strike`. */
638
+ strikeType?: 'sngStrike' | 'dblStrike';
639
+ /** Text outline width in px (`a:rPr > a:ln/@w` in EMU). */
640
+ textOutlineWidth?: number;
641
+ /** Text outline colour as hex string (`a:rPr > a:ln > a:solidFill`). */
642
+ textOutlineColor?: string;
643
+ /** Text outline dash preset (`a:rPr > a:ln > a:prstDash/@val`), e.g. `dash`; absent for solid. */
644
+ textOutlineDash?: string;
645
+ /** When true, the text body has no fill (`a:rPr > a:noFill`), producing hollow/outline-only text. */
646
+ textFillNone?: boolean;
647
+ /**
648
+ * When true, the run authored an EMPTY `<a:effectLst/>`: an explicit "no
649
+ * effects" override that blocks an inherited shadow or glow. Kept so a
650
+ * rewrite re-emits it instead of letting the inherited effect return.
651
+ */
652
+ textEffectsExplicitNone?: boolean;
653
+ /** Superscript/subscript baseline shift as percentage (`a:rPr/@baseline`). Positive = super, negative = sub. */
654
+ baseline?: number;
655
+ /** Character spacing in hundredths of a point (`a:rPr/@spc`). */
656
+ characterSpacing?: number;
657
+ /** Kerning threshold in hundredths of a point (`a:rPr/@kern`). 0 = none. */
658
+ kerning?: number;
659
+ /** Text highlight colour as hex string (`a:highlight`). */
660
+ highlightColor?: string;
661
+ /**
662
+ * Raw colour-choice XML preserved from `a:highlight` so a themed highlight
663
+ * (`a:schemeClr` / `a:sysClr` / `a:prstClr`) re-emits with its original
664
+ * identity rather than being flattened to `<a:srgbClr/>` on save. On save we
665
+ * re-emit verbatim when the resolved {@link highlightColor} still matches.
666
+ */
667
+ highlightColorXml?: XmlObject;
668
+ /** Text-level gradient fill CSS string (from `a:rPr > a:gradFill`). */
669
+ textFillGradient?: string;
670
+ /** Structured gradient stops for text fill round-trip serialization. */
671
+ textFillGradientStops?: Array<{
672
+ color: string;
673
+ position: number;
674
+ opacity?: number;
675
+ }>;
676
+ /** Gradient angle in degrees for text fill round-trip. */
677
+ textFillGradientAngle?: number;
678
+ /** Gradient type for text fill round-trip ('linear' | 'radial'). */
679
+ textFillGradientType?: 'linear' | 'radial';
680
+ /** Text-level pattern fill preset (from `a:rPr > a:pattFill`). */
681
+ textFillPattern?: string;
682
+ /** Text-level pattern foreground colour. */
683
+ textFillPatternForeground?: string;
684
+ /** Text-level pattern background colour. */
685
+ textFillPatternBackground?: string;
686
+ /**
687
+ * Raw `a:rPr > a:blipFill` XML, preserved verbatim for round-trip
688
+ * serialization AND as the input to the image resolution pass that fills
689
+ * in {@link textFillBlipUrl} (parsing a run's fill happens synchronously,
690
+ * with no zip/relationship access at that point; resolving the blip to a
691
+ * displayable URL needs both, so it happens in a later async pass over
692
+ * the slide's parsed elements, mirroring how a shape's OWN image fill is
693
+ * resolved). A picture-filled text run (`a:rPr > a:blipFill`) was
694
+ * documented as handled ("Handles gradient fills, pattern fills, and
695
+ * image fills on text runs") but never actually parsed, so it silently
696
+ * fell through to the run's plain `color` and rendered solid black
697
+ * (COM-verified: `audit-text` slide 13's "PICTURE FILL" run shows the
698
+ * fill image through the glyphs in PowerPoint).
699
+ */
700
+ textFillBlipXml?: XmlObject;
701
+ /** Resolved displayable URL for {@link textFillBlipXml}, or the archive-relative path when unresolved (lazy decode). */
702
+ textFillBlipUrl?: string;
703
+ /** Tiling mode for {@link textFillBlipUrl} (`a:blipFill/a:tile` present -> 'tile', else 'stretch'). */
704
+ textFillBlipMode?: 'stretch' | 'tile';
705
+ hyperlink?: string;
706
+ /** Relationship ID for the hyperlink (`a:hlinkClick/@r:id`) — preserved for round-trip serialization. */
707
+ hyperlinkRId?: string;
708
+ /** Hyperlink tooltip text (`a:hlinkClick/@tooltip`). */
709
+ hyperlinkTooltip?: string;
710
+ /** Hyperlink action type (`a:hlinkClick/@action`). */
711
+ hyperlinkAction?: string;
712
+ /** Whether the hyperlink target is an internal slide jump (targetSlideIndex style). */
713
+ hyperlinkTargetSlideIndex?: number;
714
+ color?: string;
715
+ /**
716
+ * Raw XML colour-choice node preserved from `a:rPr/a:solidFill` for
717
+ * round-trip serialisation. Captures `a:schemeClr` / `a:sysClr` /
718
+ * `a:prstClr` / `a:srgbClr` plus colour transforms. On save we re-emit
719
+ * verbatim when the resolved {@link color} still matches this node.
720
+ */
721
+ colorXml?: XmlObject;
722
+ /**
723
+ * Typed theme colour reference for the run's text colour, set when
724
+ * {@link colorXml} is a plain `a:schemeClr` (see
725
+ * `themeColorRefFromColorChoice`). When present it WINS on save: the
726
+ * writer emits `<a:schemeClr>` from this ref instead of the resolved
727
+ * {@link color}, so the text keeps following the theme palette after a
728
+ * later theme change.
729
+ */
730
+ colorRef?: PptxThemeColorRef;
731
+ align?: 'left' | 'center' | 'right' | 'justify' | 'justLow' | 'dist' | 'thaiDist';
732
+ /**
733
+ * Vertical text-box anchor (`a:bodyPr/@anchor`, `ST_TextAnchoringType`).
734
+ * `distributed`/`justified` (`dist`/`just`) stretch line spacing so the
735
+ * paragraph block fills the box's full vertical extent, distinct from true
736
+ * centering (`middle`/`ctr`); both approximate to a middle-anchored render
737
+ * (see `text-body-layout.ts`) since CSS has no native vertical-justify
738
+ * primitive, but round-trip losslessly through parse/save.
739
+ */
740
+ vAlign?: 'top' | 'middle' | 'bottom' | 'distributed' | 'justified';
741
+ /** Right-to-left paragraph/run direction (`a:pPr/@rtl`, `a:rPr/@rtl`). */
742
+ rtl?: boolean;
743
+ /** Body text direction (`a:bodyPr/@vert`).
744
+ *
745
+ * Values map to OOXML `a:bodyPr/@vert` attribute values:
746
+ * - `"horizontal"` — default horizontal text (`horz`)
747
+ * - `"vertical"` — standard vertical text, right-to-left columns (`vert`)
748
+ * - `"vertical270"` — text rotated 270 degrees (`vert270`)
749
+ * - `"eaVert"` — East Asian vertical text with CJK glyphs upright (`eaVert`)
750
+ * - `"wordArtVert"` — WordArt vertical, each character upright stacked (`wordArtVert`)
751
+ * - `"wordArtVertRtl"` — WordArt vertical, right-to-left direction (`wordArtVertRtl`)
752
+ * - `"mongolianVert"` — Mongolian vertical text, left-to-right columns (`mongolianVert`)
753
+ */
754
+ textDirection?: 'horizontal' | 'vertical' | 'vertical270' | 'eaVert' | 'wordArtVert' | 'wordArtVertRtl' | 'mongolianVert';
755
+ /** Body column count (`a:bodyPr/@numCol`). */
756
+ columnCount?: number;
757
+ /** Column spacing in px (`a:bodyPr/@spcCol` in EMU). */
758
+ columnSpacing?: number;
759
+ /** Horizontal overflow mode from `a:bodyPr/@hOverflow`. */
760
+ hOverflow?: 'overflow' | 'clip';
761
+ /** Vertical overflow mode from `a:bodyPr/@vertOverflow`. */
762
+ vertOverflow?: 'overflow' | 'clip' | 'ellipsis';
763
+ /** Body text left inset in px (`a:bodyPr/@lIns` in EMU). */
764
+ bodyInsetLeft?: number;
765
+ /** Body text top inset in px (`a:bodyPr/@tIns` in EMU). */
766
+ bodyInsetTop?: number;
767
+ /** Body text right inset in px (`a:bodyPr/@rIns` in EMU). */
768
+ bodyInsetRight?: number;
769
+ /** Body text bottom inset in px (`a:bodyPr/@bIns` in EMU). */
770
+ bodyInsetBottom?: number;
771
+ /** Paragraph spacing before in px. */
772
+ paragraphSpacingBefore?: number;
773
+ /** Paragraph spacing after in px. */
774
+ paragraphSpacingAfter?: number;
775
+ /** Line spacing multiplier (e.g. 1.2 = 120%). Used when mode is proportional (spcPct). */
776
+ lineSpacing?: number;
777
+ /** Exact line spacing in points (from `a:lnSpc > a:spcPts`). Takes priority over `lineSpacing` when set. */
778
+ lineSpacingExactPt?: number;
779
+ /** Paragraph left margin in px (`a:pPr/@marL` in EMU). */
780
+ paragraphMarginLeft?: number;
781
+ /** Paragraph right margin in px (`a:pPr/@marR` in EMU). */
782
+ paragraphMarginRight?: number;
783
+ /** Paragraph first-line indent in px (`a:pPr/@indent` in EMU). */
784
+ paragraphIndent?: number;
785
+ /** Tab stop positions and alignments (`a:pPr/a:tabLst/a:tab`). */
786
+ tabStops?: Array<{
787
+ position: number;
788
+ align: 'l' | 'ctr' | 'r' | 'dec';
789
+ leader?: 'none' | 'dot' | 'hyphen' | 'underscore';
790
+ /**
791
+ * True when the source spelled out the schema-default `@algn="l"`, so the
792
+ * writer re-emits it instead of treating it as an omitted default.
793
+ */
794
+ alignAuthored?: boolean;
795
+ /** True when the source spelled out the schema-default `@leader="none"`. */
796
+ leaderAuthored?: boolean;
797
+ }>;
798
+ /**
799
+ * True when the paragraph's own `a:pPr` authored an EMPTY `<a:tabLst/>`
800
+ * (explicitly "no tab stops", overriding whatever the cascade would
801
+ * otherwise supply) rather than omitting the element entirely (inherit).
802
+ * fast-xml-parser gives a childless element as the empty string, so
803
+ * `tabLst` and no-`tabLst` are otherwise indistinguishable once `tabStops`
804
+ * comes back empty either way. Paragraph-scope only; not part of the
805
+ * element-level geometry cascade.
806
+ */
807
+ tabStopsExplicitEmpty?: boolean;
808
+ /** Body text wrapping mode from `a:bodyPr/@wrap`. */
809
+ textWrap?: 'square' | 'none';
810
+ /** Preset text warp type from `a:bodyPr/a:prstTxWarp`. */
811
+ textWarpPreset?: PptxTextWarpPreset;
812
+ /** Primary adjustment value for text warp (from `a:prstTxWarp/a:avLst/a:gd` with name "adj").
813
+ * Stored as raw OOXML 1/60000th units (e.g. 50000 = default for many presets). */
814
+ textWarpAdj?: number;
815
+ /** Secondary adjustment value for text warp (from `a:prstTxWarp/a:avLst/a:gd` with name "adj2").
816
+ * Stored as raw OOXML 1/60000th units. */
817
+ textWarpAdj2?: number;
818
+ /** Text capitalization style from `a:rPr/@cap`. */
819
+ textCaps?: 'all' | 'small' | 'none';
820
+ /**
821
+ * When true, the source authored `<a:rPr cap="none"/>` explicitly. This
822
+ * differs from {@link textCaps} = `"none"` only because the writer must
823
+ * preserve the explicit token rather than collapse it to omission.
824
+ */
825
+ textCapsExplicitNone?: boolean;
826
+ /** Symbol font family from `a:sym`. */
827
+ symbolFont?: string;
828
+ /** East Asian font family from `a:ea`. */
829
+ eastAsiaFont?: string;
830
+ /** Complex Script font family from `a:cs`. */
831
+ complexScriptFont?: string;
832
+ /**
833
+ * Theme-font token (`+mj-lt` / `+mn-lt` / ...) authored on `a:latin`, when
834
+ * present. {@link fontFamily} holds the resolved concrete face for
835
+ * rendering; this preserves the token linkage so the writer re-emits the
836
+ * token rather than the flattened face (see #84).
837
+ */
838
+ latinFontThemeToken?: string;
839
+ /** Theme-font token authored on `a:ea` (e.g. `+mn-ea`), when present. */
840
+ eastAsiaFontThemeToken?: string;
841
+ /** Theme-font token authored on `a:cs` (e.g. `+mn-cs`), when present. */
842
+ complexScriptFontThemeToken?: string;
843
+ /**
844
+ * Automatic per-script fallback face resolved from the theme's
845
+ * `<a:font script="...">` overrides for a run whose text is dominantly
846
+ * CJK / Arabic / Hebrew / Thai (see #83). A rendering hint only: it is not
847
+ * serialised back on save, so it never disturbs the round-trip typefaces.
848
+ */
849
+ scriptFallbackFont?: string;
850
+ /**
851
+ * Set alongside {@link scriptFallbackFont} when the resolved {@link fontFamily}
852
+ * came only from the paragraph/list-style/theme CASCADE (the run's own
853
+ * `a:rPr` authored no `a:latin`/`a:ea`/`a:cs` of its own). A run always
854
+ * inherits SOME font this way (typically the theme's `+mn-lt`), so without
855
+ * this flag `fontFamily` was indistinguishable from a run that genuinely
856
+ * chose that font itself, and the renderer never applied the theme's
857
+ * per-script override (see #83): `+mn-lt` names only the LATIN member of
858
+ * the font scheme and was never meant to cover text in a different
859
+ * dominant script. An explicit `a:latin`/`a:ea`/`a:cs` authored on the run
860
+ * itself still always wins; only the cascade default yields to the
861
+ * script-specific override.
862
+ */
863
+ fontFamilyIsCascadeDefault?: boolean;
864
+ /** Text language from `a:rPr/@lang`. */
865
+ language?: string;
866
+ /** Hyperlink mouse-over target from `a:hlinkMouseOver`. */
867
+ hyperlinkMouseOver?: string;
868
+ /**
869
+ * Raw `a:snd` (embedded WAV audio) child of `a:hlinkClick`, preserved
870
+ * verbatim (carries `@r:embed` + `@name`). Round-tripped on save so the
871
+ * click sound survives instead of being dropped.
872
+ */
873
+ hyperlinkSoundXml?: XmlObject;
874
+ /** Raw `a:snd` child of `a:hlinkMouseOver`, preserved verbatim for round-trip. */
875
+ hyperlinkMouseOverSoundXml?: XmlObject;
876
+ /** Hyperlink invalidUrl attribute (`a:hlinkClick/@invalidUrl`). */
877
+ hyperlinkInvalidUrl?: string;
878
+ /** Hyperlink target frame (`a:hlinkClick/@tgtFrame`). */
879
+ hyperlinkTargetFrame?: string;
880
+ /** Whether hyperlink history is tracked (`a:hlinkClick/@history`). */
881
+ hyperlinkHistory?: boolean;
882
+ /** Whether hyperlink uses highlight-click effect (`a:hlinkClick/@highlightClick`). */
883
+ hyperlinkHighlightClick?: boolean;
884
+ /** Whether hyperlink ends a sound (`a:hlinkClick/@endSnd`). */
885
+ hyperlinkEndSound?: boolean;
886
+ /**
887
+ * Raw `a:hlinkClick/a:extLst` child, preserved verbatim for round-trip.
888
+ * Carries vendor extensions this engine does not interpret, most commonly
889
+ * `ahyp:hlinkClr` (Microsoft's "hyperlink color" extension,
890
+ * `{A12FA001-AC4F-418D-AE19-62706E023703}`), which records whether a
891
+ * hyperlink run should paint with the theme's text colour instead of the
892
+ * hyperlink colour. Dropping the whole `a:extLst` silently reverted such a
893
+ * run to the default (themed) hyperlink colour on save.
894
+ */
895
+ hyperlinkExtensionXml?: XmlObject;
896
+ /** Kumimoji (ideographic text combining) flag for vertical CJK text (`a:rPr/@kumimoji`). */
897
+ kumimoji?: boolean;
898
+ /** Normalize height flag (`a:rPr/@normalizeH`). */
899
+ normalizeHeight?: boolean;
900
+ /** No proofing flag (`a:rPr/@noProof`). */
901
+ noProof?: boolean;
902
+ /** Dirty flag indicating run has been edited (`a:rPr/@dirty`). */
903
+ dirty?: boolean;
904
+ /** Error flag indicating spelling error (`a:rPr/@err`). */
905
+ spellingError?: boolean;
906
+ /** Smart tag clean flag (`a:rPr/@smtClean`). */
907
+ smartTagClean?: boolean;
908
+ /** Bookmark link target (`a:rPr/@bmk`). */
909
+ bookmark?: string;
910
+ /** Alternative language for the run (`a:rPr/@altLang`). Populated for runs
911
+ * authored in mixed-script documents (e.g. Asian/Latin combined). */
912
+ altLanguage?: string;
913
+ /** SmartTag (Office grammar tag) GUID id (`a:rPr/@smtId`). Round-tripped
914
+ * verbatim — the engine doesn't interpret it. */
915
+ smartTagId?: number;
916
+ /** Latin font PANOSE classification string from `a:rPr > a:latin/@panose`. */
917
+ latinFontPanose?: string;
918
+ /** Latin font pitch + family flag from `a:rPr > a:latin/@pitchFamily`. */
919
+ latinFontPitchFamily?: number;
920
+ /** Latin font character set id from `a:rPr > a:latin/@charset`. */
921
+ latinFontCharset?: number;
922
+ /** East-Asian font PANOSE from `a:rPr > a:ea/@panose`. */
923
+ eastAsiaFontPanose?: string;
924
+ /** East-Asian font pitch + family flag from `a:rPr > a:ea/@pitchFamily`. */
925
+ eastAsiaFontPitchFamily?: number;
926
+ /** East-Asian font character set id from `a:rPr > a:ea/@charset`. */
927
+ eastAsiaFontCharset?: number;
928
+ /** Complex-script font PANOSE from `a:rPr > a:cs/@panose`. */
929
+ complexScriptFontPanose?: string;
930
+ /** Complex-script font pitch + family flag from `a:rPr > a:cs/@pitchFamily`. */
931
+ complexScriptFontPitchFamily?: number;
932
+ /** Complex-script font character set id from `a:rPr > a:cs/@charset`. */
933
+ complexScriptFontCharset?: number;
934
+ /** Symbol-font PANOSE from `a:rPr > a:sym/@panose`. */
935
+ symbolFontPanose?: string;
936
+ /** Symbol-font pitch + family flag from `a:rPr > a:sym/@pitchFamily`. */
937
+ symbolFontPitchFamily?: number;
938
+ /** Symbol-font character set id from `a:rPr > a:sym/@charset`. */
939
+ symbolFontCharset?: number;
940
+ /** Paragraph list type for toggling bullet / numbered lists via the toolbar.
941
+ * - `'bullet'` — character bullet (default "•")
942
+ * - `'numbered'` — auto-numbered list (arabicPeriod)
943
+ * - `'none'` — explicitly no list
944
+ */
945
+ listType?: 'bullet' | 'numbered' | 'none';
946
+ /** Default tab size in px (`a:pPr/@defTabSz` in EMU). */
947
+ defaultTabSize?: number;
948
+ /** East Asian line break flag (`a:pPr/@eaLnBrk`). */
949
+ eaLineBreak?: boolean;
950
+ /** Latin line break flag (`a:pPr/@latinLnBrk`). */
951
+ latinLineBreak?: boolean;
952
+ /** Font alignment (`a:pPr/@fontAlgn`): 'auto' | 'base' | 'ctr' | 't' | 'b'. */
953
+ fontAlignment?: string;
954
+ /** Hanging punctuation flag (`a:pPr/@hangingPunct`). */
955
+ hangingPunctuation?: boolean;
956
+ /** Whether to space first and last paragraph from body edges (`a:bodyPr/@spcFirstLastPara`). */
957
+ spaceFirstLastParagraph?: boolean;
958
+ /** Right-to-left column flow (`a:bodyPr/@rtlCol`). */
959
+ rtlColumns?: boolean;
960
+ /** Whether text originates from WordArt (`a:bodyPr/@fromWordArt`). */
961
+ fromWordArt?: boolean;
962
+ /** Whether text anchoring is centered (`a:bodyPr/@anchorCtr`). */
963
+ anchorCenter?: boolean;
964
+ /** Force anti-aliasing (`a:bodyPr/@forceAA`). */
965
+ forceAntiAlias?: boolean;
966
+ /** Upright text in 3D views (`a:bodyPr/@upright`). */
967
+ upright?: boolean;
968
+ /** Compatible line spacing flag (`a:bodyPr/@compatLnSpc`). */
969
+ compatibleLineSpacing?: boolean;
970
+ /**
971
+ * Text body rotation in **degrees** (`a:bodyPr/@rot`).
972
+ *
973
+ * OOXML stores the value as 60000ths of a degree. Positive values rotate
974
+ * the body clockwise. When undefined, the attribute is omitted on save
975
+ * (PowerPoint treats absent `rot` as inherit/none).
976
+ */
977
+ textBodyRotation?: number;
978
+ /** Text shadow colour as hex string (`a:outerShdw`). */
979
+ textShadowColor?: string;
980
+ /** Text shadow blur radius in px. */
981
+ textShadowBlur?: number;
982
+ /** Text shadow horizontal offset in px. */
983
+ textShadowOffsetX?: number;
984
+ /** Text shadow vertical offset in px. */
985
+ textShadowOffsetY?: number;
986
+ /** Text shadow opacity (0-1). */
987
+ textShadowOpacity?: number;
988
+ /** Text inner shadow colour (`a:innerShdw`). */
989
+ textInnerShadowColor?: string;
990
+ /** Text inner shadow opacity (0-1). */
991
+ textInnerShadowOpacity?: number;
992
+ /** Text inner shadow blur radius in px. */
993
+ textInnerShadowBlur?: number;
994
+ /** Text inner shadow horizontal offset in px. */
995
+ textInnerShadowOffsetX?: number;
996
+ /** Text inner shadow vertical offset in px. */
997
+ textInnerShadowOffsetY?: number;
998
+ /**
999
+ * Original inner-shadow colour-choice XML (`a:innerShdw`'s
1000
+ * `a:prstClr`/`a:schemeClr`/`a:srgbClr`/… child), preserved verbatim so an
1001
+ * authored preset or theme colour round-trips instead of always being
1002
+ * re-serialized as a resolved `a:srgbClr`. Mirrors {@link textGlowColorXml}.
1003
+ */
1004
+ textInnerShadowColorXml?: XmlObject;
1005
+ /** Theme colour slot the inner shadow colour resolved from, when it is `a:schemeClr`. */
1006
+ textInnerShadowColorRef?: PptxThemeColorRef;
1007
+ /** Preset shadow type from `a:prstShdw/@prst` (e.g. "shdw1"..."shdw20"). */
1008
+ textPresetShadowName?: string;
1009
+ /** Preset shadow colour as hex string. */
1010
+ textPresetShadowColor?: string;
1011
+ /** Preset shadow opacity (0-1). */
1012
+ textPresetShadowOpacity?: number;
1013
+ /** Preset shadow distance in px. */
1014
+ textPresetShadowDistance?: number;
1015
+ /** Preset shadow direction in degrees. */
1016
+ textPresetShadowDirection?: number;
1017
+ /** Text blur effect radius in px (`a:blur`). */
1018
+ textBlurRadius?: number;
1019
+ /**
1020
+ * Text soft-edge radius in px (`a:softEdge/@rad`).
1021
+ *
1022
+ * Feathers the glyph's own edges (a uniform blur of the alpha silhouette,
1023
+ * the same effect a shape's `a:softEdge` gives its fill), unrelated to
1024
+ * `a:blur` (which blurs the whole run, colour included) or a shadow. Never
1025
+ * parsed before this field existed, so `a:softEdge` on a run was silently
1026
+ * dropped: PowerPoint fades the glyphs to near-transparent at their
1027
+ * outline (COM-verified, `audit-text` slide 14's "SOFTEDGE" run), while
1028
+ * the viewer painted them fully crisp.
1029
+ */
1030
+ textSoftEdgeRadius?: number;
1031
+ /**
1032
+ * Raw `a:effectDag` XML node from `a:rPr`, preserved verbatim for
1033
+ * round-trip serialisation. Mirrors the shape-level
1034
+ * {@link import('./shape-style').ShapeStyle.effectDagXml} field.
1035
+ */
1036
+ textEffectDagXml?: XmlObject;
1037
+ /**
1038
+ * Typed effect graph parsed from `textEffectDagXml`. The four structural
1039
+ * container nodes (`a:cont`, `a:blend`, `a:xfrmEffect`, `a:relOff`) are
1040
+ * fully typed; any other leaf effect is captured as
1041
+ * {@link import('./effect-dag').EffectDagRawLeaf} so we never have to
1042
+ * recurse into the full effect taxonomy.
1043
+ */
1044
+ textEffectDagTree?: EffectDagContainer;
1045
+ /** Text alpha modulation fixed (0-100) from `a:alphaModFix`. */
1046
+ textAlphaModFix?: number;
1047
+ /** Text alpha modulation from `a:alphaMod` (0-100 percentage). */
1048
+ textAlphaMod?: number;
1049
+ /** Text hue shift in degrees from `a:hsl/@hue`. */
1050
+ textHslHue?: number;
1051
+ /** Text saturation adjustment from `a:hsl/@sat`. */
1052
+ textHslSaturation?: number;
1053
+ /** Text luminance adjustment from `a:hsl/@lum`. */
1054
+ textHslLuminance?: number;
1055
+ /** Text colour change from colour as hex string (`a:clrChange`). */
1056
+ textClrChangeFrom?: string;
1057
+ /** Text colour change to colour as hex string. */
1058
+ textClrChangeTo?: string;
1059
+ /** Text duotone colour pair (`a:duotone`). */
1060
+ textDuotone?: {
1061
+ color1: string;
1062
+ color2: string;
1063
+ };
1064
+ /** Text glow colour as hex string (`a:glow`). */
1065
+ textGlowColor?: string;
1066
+ /** Text glow radius in px. */
1067
+ textGlowRadius?: number;
1068
+ /** Text glow opacity (0-1). */
1069
+ textGlowOpacity?: number;
1070
+ /**
1071
+ * Original glow colour-choice XML (`a:glow`'s `a:schemeClr`/`a:srgbClr`/…
1072
+ * child), preserved verbatim so a theme colour reference round-trips
1073
+ * instead of always being re-serialized as a resolved `a:srgbClr` (which
1074
+ * cuts the glow off from theme/Recolor changes).
1075
+ */
1076
+ textGlowColorXml?: XmlObject;
1077
+ /** Theme colour slot the glow colour resolved from, when it is `a:schemeClr`. */
1078
+ textGlowColorRef?: PptxThemeColorRef;
1079
+ /** Text reflection enabled flag. */
1080
+ textReflection?: boolean;
1081
+ /** Text reflection blur radius in px. */
1082
+ textReflectionBlur?: number;
1083
+ /** Text reflection start opacity (0-1). */
1084
+ textReflectionStartOpacity?: number;
1085
+ /** Text reflection end opacity (0-1). */
1086
+ textReflectionEndOpacity?: number;
1087
+ /** Text reflection offset distance in px. */
1088
+ textReflectionOffset?: number;
1089
+ /**
1090
+ * Text reflection end position (`@endPos`) as a 0-1 fraction of the text
1091
+ * height the fade reaches. Mirrors `ShapeStyle.reflectionEndPosition`.
1092
+ */
1093
+ textReflectionEndPosition?: number;
1094
+ /**
1095
+ * Text reflection offset direction (`@dir`) in degrees. Mirrors
1096
+ * `ShapeStyle.reflectionDirection`.
1097
+ */
1098
+ textReflectionDirection?: number;
1099
+ /**
1100
+ * Text reflection fade direction (`a:rPr/a:effectLst/a:reflection/@fadeDir`)
1101
+ * in degrees. Mirrors `ShapeStyle.reflectionFadeDirection`.
1102
+ */
1103
+ textReflectionFadeDirection?: number;
1104
+ /**
1105
+ * Text reflection horizontal scaling (`@sx`), same units as
1106
+ * `ShapeStyle.reflectionScaleX` (1000ths of a percent, e.g. 100000 = 100%).
1107
+ */
1108
+ textReflectionScaleX?: number;
1109
+ /** Text reflection vertical scaling (`@sy`). See `ShapeStyle.reflectionScaleY`. */
1110
+ textReflectionScaleY?: number;
1111
+ /**
1112
+ * Text reflection horizontal skew (`@kx`) in 60000ths of a degree. See
1113
+ * `ShapeStyle.reflectionSkewX`.
1114
+ */
1115
+ textReflectionSkewX?: number;
1116
+ /** Text reflection vertical skew (`@ky`). See `ShapeStyle.reflectionSkewY`. */
1117
+ textReflectionSkewY?: number;
1118
+ /**
1119
+ * Text reflection independent rotation (`@rot`) in degrees. See
1120
+ * `ShapeStyle.reflectionRotation`.
1121
+ */
1122
+ textReflectionRotation?: number;
1123
+ /** Text reflection anchor (`@algn`). See `ShapeStyle.reflectionAlignment`. */
1124
+ textReflectionAlignment?: 'tl' | 't' | 'tr' | 'l' | 'ctr' | 'r' | 'bl' | 'b' | 'br';
1125
+ /** 3D extrusion/bevel settings on the text body. */
1126
+ text3d?: Text3DStyle;
1127
+ /** 3D scene (camera + light rig) settings on the text body (`a:bodyPr/a:scene3d`). */
1128
+ textBodyScene3d?: Pptx3DScene;
1129
+ /** Raw `a:scene3d` subtree used to preserve extensions and unmodelled children. */
1130
+ textBodyScene3dXml?: XmlObject;
1131
+ /**
1132
+ * `a:bodyPr/a:flatTx` - an explicit "render this text flat" marker. `sp3d`
1133
+ * and `flatTx` are a mutually exclusive OOXML choice (`EG_Text3D`), so a
1134
+ * shape/run that overrides an inherited 3D text body with `<a:flatTx/>`
1135
+ * carries no `text3d` of its own; without this explicit flag a later
1136
+ * inheritance merge has no signal to stop `text3d`/`textBodyScene3d` from
1137
+ * an ancestor (layout/master) leaking back in, the way `noFill` stops an
1138
+ * inherited fill. A renderer must short-circuit 3D-text application
1139
+ * whenever this is `true`, regardless of what `text3d`/`textBodyScene3d`
1140
+ * otherwise hold.
1141
+ */
1142
+ flatText?: boolean;
1143
+ /**
1144
+ * Raw `<a:extLst>` subtree captured from `<a:bodyPr>`. Preserved verbatim so
1145
+ * authored extensions (e.g. content placeholders, custom application data)
1146
+ * survive a round-trip even though the engine doesn't interpret them.
1147
+ */
1148
+ bodyPropertiesExtLstXml?: XmlObject;
1149
+ /**
1150
+ * Raw `<a:extLst>` subtree captured from `<a:pPr>`. Only meaningful on the
1151
+ * paragraph-level style (paragraphs propagate this via the first segment).
1152
+ */
1153
+ paragraphPropertiesExtLstXml?: XmlObject;
1154
+ /**
1155
+ * Raw `<a:extLst>` subtree captured from `<a:rPr>`. Persisted verbatim on
1156
+ * save when present — covers run-level extensions the typed model doesn't
1157
+ * model (e.g. `a14:hiddenFill` and similar).
1158
+ */
1159
+ runPropertiesExtLstXml?: XmlObject;
1160
+ /**
1161
+ * Raw `<a:defRPr>` XML node captured from `<a:pPr>`. The schema permits
1162
+ * `defRPr` directly inside `pPr` so that paragraph defaults can specify the
1163
+ * end-paragraph run formatting; previously this was dropped on save. We
1164
+ * persist the parsed XML object so it round-trips verbatim.
1165
+ *
1166
+ * Only meaningful on the *first* segment of each paragraph (matches the
1167
+ * convention used for {@link bulletInfo} / {@link endParaRunProperties}).
1168
+ */
1169
+ paragraphDefaultRunPropertiesXml?: XmlObject;
1170
+ /**
1171
+ * The bullet colour / size / typeface children (`a:buClrTx`, `a:buClr`,
1172
+ * `a:buSzTx`, `a:buSzPct`, `a:buSzPts`, `a:buFontTx`, `a:buFont`) a
1173
+ * paragraph authored in its own `<a:pPr>` WITHOUT a bullet type
1174
+ * (`a:buNone` / `a:buChar` / `a:buAutoNum` / `a:buBlip`), captured
1175
+ * verbatim in source order. Such a paragraph restyles an inherited bullet
1176
+ * rather than declaring one, so its {@link BulletInfo} resolves from the
1177
+ * cascade and is (correctly) not written back; without this capture the
1178
+ * paragraph's own override vanished on every rewrite.
1179
+ *
1180
+ * Only meaningful on a paragraph's own authored properties.
1181
+ */
1182
+ paragraphBulletPropertiesXml?: XmlObject;
1183
+ }
1184
+ /**
1185
+ * Structured bullet metadata attached to the first {@link TextSegment}
1186
+ * of each paragraph.
1187
+ *
1188
+ * Describes how the paragraph bullet should render: character bullets
1189
+ * (`char`), auto-numbered lists (`autoNumType`), or picture bullets
1190
+ * (`imageRelId` / `imageDataUrl`). Set `none: true` when `a:buNone`
1191
+ * explicitly suppresses the bullet.
1192
+ *
1193
+ * @example
1194
+ * ```ts
1195
+ * // Simple character bullet:
1196
+ * const bullet: BulletInfo = { char: "•", color: "#333333" };
1197
+ *
1198
+ * // Auto-numbered list starting at 1:
1199
+ * const numbered: BulletInfo = {
1200
+ * autoNumType: "arabicPeriod",
1201
+ * autoNumStartAt: 1,
1202
+ * };
1203
+ * // => { char: "•", color: "#333333" } and { autoNumType: "arabicPeriod", autoNumStartAt: 1 }
1204
+ * ```
1205
+ */
1206
+ interface BulletInfo {
1207
+ /** Bullet character (e.g. "•", "-", "»") from `a:buChar`. */
1208
+ char?: string;
1209
+ /** Auto-numbering type (e.g. "arabicPeriod", "romanUcPeriod") from `a:buAutoNum`. */
1210
+ autoNumType?: string;
1211
+ /** Auto-numbering start value. */
1212
+ autoNumStartAt?: number;
1213
+ /**
1214
+ * Auto-numbering ORDINAL OFFSET: the zero-based distance of this paragraph
1215
+ * within its own numbered list, such that
1216
+ * `autoNumStartAt + paragraphIndex` is the ordinal to render. Despite the
1217
+ * name it is NOT the paragraph's position in the text body; the two agree
1218
+ * only for a list that starts at the first paragraph and is never
1219
+ * interrupted.
1220
+ *
1221
+ * It has to be the offset rather than the raw position because every
1222
+ * consumer that re-derives a marker from `BulletInfo` alone (the renderer's
1223
+ * `resolveParagraphBullet`, the Markdown converter's `resolveListMarker`)
1224
+ * computes `autoNumStartAt + paragraphIndex`. The load path resolves the
1225
+ * real sequence itself, restarting the count after any paragraph that
1226
+ * interrupts the list, and publishes the offset here so those consumers
1227
+ * land on the same number. With the raw position they did not, and BOTH
1228
+ * markers were painted ("3.1. Item"), because the paragraph builder drops
1229
+ * the parsed marker segment only when the two strings agree.
1230
+ *
1231
+ * Runtime-only: derived at parse time and never serialized. OOXML has no
1232
+ * counterpart (`a:buAutoNum` carries only `@type` and `@startAt`), so the
1233
+ * writer neither reads nor emits it.
1234
+ */
1235
+ paragraphIndex?: number;
1236
+ /** Bullet font family from `a:buFont`. */
1237
+ fontFamily?: string;
1238
+ /**
1239
+ * PANOSE font-matching hint from `a:buFont/@panose`. `a:buFont` is a
1240
+ * CT_TextFont, the same complex type as `a:latin`/`a:ea`/`a:cs`/`a:sym`
1241
+ * (which carry the equivalent `TextStyle.latinFontPanose` etc.), so a
1242
+ * bullet's own PANOSE/pitch-family/charset decide the fallback glyph
1243
+ * PowerPoint substitutes when the named typeface is missing.
1244
+ */
1245
+ fontPanose?: string;
1246
+ /** Font pitch-and-family byte from `a:buFont/@pitchFamily`. */
1247
+ fontPitchFamily?: number;
1248
+ /** Font character-set byte from `a:buFont/@charset`. */
1249
+ fontCharset?: number;
1250
+ /** Bullet size as percentage of text font size from `a:buSzPct`. */
1251
+ sizePercent?: number;
1252
+ /** Bullet size in points from `a:buSzPts`. */
1253
+ sizePts?: number;
1254
+ /** Bullet color as hex string from `a:buClr`. */
1255
+ color?: string;
1256
+ /**
1257
+ * Raw colour-choice XML captured from `<a:buClr>` so that themed bullets
1258
+ * (`a:schemeClr`, `a:sysClr`, `a:prstClr`) round-trip with their original
1259
+ * identity rather than being flattened to `<a:srgbClr/>` on save.
1260
+ */
1261
+ colorXml?: XmlObject;
1262
+ /**
1263
+ * Typed theme colour reference for the bullet colour, set when
1264
+ * {@link colorXml} is a plain `a:schemeClr`. Wins on save, same as
1265
+ * {@link TextStyle.colorRef}.
1266
+ */
1267
+ colorRef?: PptxThemeColorRef;
1268
+ /** True when `a:buNone` explicitly suppresses bullets. */
1269
+ none?: boolean;
1270
+ /** Picture bullet: relationship ID from `a:buBlip` → `a:blip[@r:embed]`. */
1271
+ imageRelId?: string;
1272
+ /** Picture bullet: data URL of the embedded image. */
1273
+ imageDataUrl?: string;
1274
+ /**
1275
+ * Raw `<a:buBlip>` XML captured at parse time. Carries the full blipFill
1276
+ * subtree (`a:tile`, `a:stretch`, `a:srcRect`, `a:blip > a:extLst`) so the
1277
+ * writer can emit the complete original definition rather than the bare
1278
+ * `a:blip[@r:embed]` mapping. When set, the writer prefers it over
1279
+ * {@link imageRelId} for emission.
1280
+ */
1281
+ imageBlipFillXml?: XmlObject;
1282
+ /** When true, `<a:buFontTx/>` was specified — inherit the bullet font from
1283
+ * the run text, not from a buFont declaration. */
1284
+ fontInherit?: boolean;
1285
+ /** When true, `<a:buClrTx/>` was specified — inherit the bullet colour from
1286
+ * the run text. */
1287
+ colorInherit?: boolean;
1288
+ /** When true, `<a:buSzTx/>` was specified — inherit the bullet size from
1289
+ * the run text font size. */
1290
+ sizeInherit?: boolean;
1291
+ /**
1292
+ * True when this bullet resolution came from the paragraph's OWN `a:pPr`
1293
+ * rather than the shape's `a:lstStyle`, an inherited placeholder, or the
1294
+ * master's `a:defPPr` / `p:txStyles`. `resolveParagraphBulletInfo` walks
1295
+ * that cascade and returns the first match, so without this flag a
1296
+ * writer that re-emits every resolved `BulletInfo` in full pins an
1297
+ * inherited bullet (e.g. a master `buFont="Arial"` / `buChar="•"`) onto
1298
+ * every paragraph's own `a:pPr` the moment the slide is rewritten. The
1299
+ * save path only writes the bullet group when this is `true`, mirroring
1300
+ * how `paragraphProperties` gates every other per-paragraph field.
1301
+ */
1302
+ ownedByParagraph?: boolean;
1303
+ }
1304
+ /**
1305
+ * A single text run within a paragraph.
1306
+ *
1307
+ * A text body is decomposed into an array of `TextSegment` objects,
1308
+ * each with its own style. Paragraph breaks are represented as
1309
+ * segments with `isParagraphBreak: true`.
1310
+ *
1311
+ * @example
1312
+ * ```ts
1313
+ * const segments: TextSegment[] = [
1314
+ * { text: "Bold intro ", style: { bold: true, fontSize: 16 } },
1315
+ * { text: "and normal text.", style: { fontSize: 16 } },
1316
+ * { text: "", style: {}, isParagraphBreak: true },
1317
+ * { text: "Second paragraph.", style: { fontSize: 14 } },
1318
+ * ];
1319
+ * // => 4 segments: 2 styled runs, 1 paragraph break, 1 normal run
1320
+ * ```
1321
+ */
1322
+ interface TextSegment {
1323
+ text: string;
1324
+ style: TextStyle;
1325
+ /** When this segment originated from an `a:fld` element, stores the field type (e.g. "slidenum", "datetime"). */
1326
+ fieldType?: string;
1327
+ /** When this segment originated from an `a:fld` element, stores the field GUID. */
1328
+ fieldGuid?: string;
1329
+ /**
1330
+ * Original attribute name used to author the field GUID — `'uuid'` for the
1331
+ * `a:fld/@uuid` form authored by some legacy producers, `'id'` for the
1332
+ * canonical `a:fld/@id` form. Preserved so the writer round-trips whichever
1333
+ * spelling the source used (PowerPoint accepts both). Defaults to `'id'`
1334
+ * on save when undefined.
1335
+ */
1336
+ fieldGuidAttr?: 'uuid' | 'id';
1337
+ /**
1338
+ * Raw per-field paragraph properties (`a:fld > a:pPr`). The schema permits
1339
+ * `pPr` inside an `a:fld` so the field can carry its own paragraph-level
1340
+ * formatting; preserved verbatim on save when present.
1341
+ */
1342
+ fieldParagraphPropertiesXml?: XmlObject;
1343
+ /** Raw OMML XML node for equation segments (from `a14:m` / `m:oMathPara`). */
1344
+ equationXml?: Record<string, unknown>;
1345
+ /**
1346
+ * The ORIGINAL top-level paragraph child that carried this equation,
1347
+ * captured verbatim at parse time and keyed by its own tag: `{ 'a14:m':
1348
+ * ... }`, `{ 'm:oMathPara': ... }`, `{ 'm:oMath': ... }`, or `{
1349
+ * 'mc:AlternateContent': ... }` for an equation authored behind a
1350
+ * Choice/Fallback switch. `equationXml` above is the resolved math content
1351
+ * used for rendering (unwrapped one level for `a14:m`/`mc:AlternateContent`
1352
+ * sources); this field exists solely so the writer can re-emit an UNTOUCHED
1353
+ * equation byte-for-byte, Choice and Fallback both, instead of collapsing
1354
+ * it to a bare math element PowerPoint's own writer never produces.
1355
+ * `undefined` for a freshly inserted or edited equation, which the writer
1356
+ * instead reconstructs from `equationXml` (always `{ 'm:oMathPara': ... }`
1357
+ * or `{ 'm:oMath': ... }` for those cases). Any code that replaces
1358
+ * `equationXml` on an existing segment must drop this field, or the writer
1359
+ * would keep re-emitting the equation's OLD XML instead of the edit.
1360
+ */
1361
+ equationSourceXml?: Record<string, unknown>;
1362
+ /**
1363
+ * Optional equation number for numbered equations (e.g. "(1)", "(2.3)").
1364
+ * When present, the equation is rendered centered with the number right-aligned.
1365
+ */
1366
+ equationNumber?: string;
1367
+ /** Whether this segment represents a paragraph break rather than renderable text. */
1368
+ isParagraphBreak?: boolean;
1369
+ /**
1370
+ * Whether this segment represents a soft line break (`a:br`) rather than
1371
+ * a paragraph terminator. Soft line breaks remain inside the same paragraph
1372
+ * but force a line wrap and may carry their own run properties.
1373
+ *
1374
+ * The renderer should treat the segment text as `"\n"` when present.
1375
+ */
1376
+ isLineBreak?: true;
1377
+ /**
1378
+ * Raw `a:rPr` XML for an `a:br` (soft line break) segment, captured verbatim
1379
+ * during parse so the writer can re-emit attributes/colours/fonts that the
1380
+ * typed model doesn't represent. Only meaningful when {@link isLineBreak}
1381
+ * is `true`.
1382
+ */
1383
+ breakRunProperties?: Record<string, unknown>;
1384
+ /** Structured bullet info for the first segment of a paragraph. */
1385
+ bulletInfo?: BulletInfo;
1386
+ /**
1387
+ * Outline level for the paragraph this segment starts (`a:p/@lvl`).
1388
+ *
1389
+ * Only meaningful on the first segment of a paragraph (matching the
1390
+ * convention used for {@link bulletInfo}). Stored as the raw OOXML
1391
+ * value (0 = top level, 1-8 = nested) and serialised back when non-zero.
1392
+ */
1393
+ paragraphLevel?: number;
1394
+ /**
1395
+ * Raw `a:endParaRPr` XML node for the paragraph this segment starts.
1396
+ *
1397
+ * Captured verbatim on parse so attributes and child colours/fonts that
1398
+ * the typed model doesn't represent survive a round-trip. Only meaningful
1399
+ * on the first segment of a paragraph.
1400
+ */
1401
+ endParaRunProperties?: Record<string, unknown>;
1402
+ /**
1403
+ * Resolved body defaults and optional `a:endParaRPr` of a runless paragraph.
1404
+ * Carried on its first segment (or terminator), separately from marker
1405
+ * styling. Absent when the source contains an authored run or field.
1406
+ */
1407
+ paragraphInsertionStyle?: TextStyle;
1408
+ /**
1409
+ * Per-paragraph properties (alignment, spacing, margins, indent, tab stops,
1410
+ * rtl) authored on this paragraph's own `a:pPr` (#69). Only meaningful on
1411
+ * the first segment of a paragraph. When present, the writer emits these
1412
+ * per paragraph instead of collapsing one shape-level pPr onto every
1413
+ * paragraph. Only the paragraph-geometry keys of {@link TextStyle} are
1414
+ * populated; unrelated fields fall back to the shape-level style.
1415
+ */
1416
+ paragraphProperties?: TextStyle;
1417
+ /**
1418
+ * The paragraph this segment starts authored an EMPTY `<a:pPr/>`. Only
1419
+ * meaningful on the first segment of a paragraph. The writer re-emits the
1420
+ * empty element when it has no paragraph property of its own to write, so
1421
+ * a rewritten slide keeps the markup PowerPoint wrote.
1422
+ */
1423
+ emptyParagraphPropertiesAuthored?: boolean;
1424
+ /**
1425
+ * The paragraph this segment starts has no run content and authored no
1426
+ * `a:endParaRPr` (a bare `<a:p/>`, possibly with an `a:pPr`). Only
1427
+ * meaningful on the first segment of a paragraph. It stops the writer
1428
+ * inventing an empty run or an `<a:endParaRPr lang="en-US"/>` stub for a
1429
+ * paragraph that still has no content when saved.
1430
+ */
1431
+ bareParagraph?: boolean;
1432
+ /**
1433
+ * Phonetic annotation text from `a:ruby > a:rt` (e.g. furigana, pinyin).
1434
+ * When present, the renderer should wrap the base text with an HTML `<ruby>` tag.
1435
+ */
1436
+ rubyText?: string;
1437
+ /**
1438
+ * Ruby text alignment from `a:rubyPr > @val` attribute.
1439
+ * Values: "ctr" (center), "l" (left), "r" (right), "dist" (distribute), "distCat", "distLetter".
1440
+ * @default "ctr"
1441
+ */
1442
+ rubyAlignment?: string;
1443
+ /**
1444
+ * Ruby text font size as a percentage of the base text font size
1445
+ * from `a:rubyPr/@hps` (half-point size) or inferred from rt run font size.
1446
+ * Stored in **points** for consistency with `TextStyle.fontSize`.
1447
+ */
1448
+ rubyFontSize?: number;
1449
+ /**
1450
+ * Style for the ruby (phonetic) text run, parsed from `a:rt > a:r > a:rPr`.
1451
+ * Used by the renderer to apply font family, colour, etc. to the `<rt>` element.
1452
+ */
1453
+ rubyStyle?: TextStyle;
1454
+ /**
1455
+ * The parsed `a:rubyPr` node, kept verbatim so its attributes (`hps`,
1456
+ * `hpsRaise`, `hpsBaseText`, `lid`, ...) round-trip exactly; only an
1457
+ * edited {@link rubyAlignment} is written over it on save.
1458
+ */
1459
+ rubyPropertiesXml?: XmlObject;
1460
+ /**
1461
+ * What each of a ruby run's two base-side `a:rPr`s authored on its own:
1462
+ * `outer` is the containing `a:r`'s, `base` the `a:rubyBase` run's. The
1463
+ * flat {@link style} merges both for rendering; these let the writer give
1464
+ * each `a:rPr` back only its own properties (plus any later edit).
1465
+ */
1466
+ rubyRunAuthoredStyles?: {
1467
+ outer?: TextStyle;
1468
+ base?: TextStyle;
1469
+ };
1470
+ }
1471
+ //#endregion
1472
+ export { ConnectorConnectionPoint as C, StrokeDashType as D, ShadowEffect as E, UnderlineStyle as O, ConnectorArrowType as S, PptxShapeLocks as T, MaterialPresetType as _, EffectDagAlphaOutset as a, PptxTextWarpPreset as b, EffectDagBlur as c, EffectDagNode as d, EffectDagPresetShadow as f, BevelPresetType as g, EffectDagXfrm as h, TextStyle as i, XmlObject as k, EffectDagContainer as l, EffectDagRelOff as m, TextOrientationMatrix as n, EffectDagBlend as o, EffectDagRawLeaf as p, TextSegment as r, EffectDagBlendMode as s, BulletInfo as t, EffectDagContainerType as u, Pptx3DScene as v, PptxDrawingGuide as w, Text3DStyle as x, Pptx3DShape as y };
1473
+ //# sourceMappingURL=text-D49FKllA.d.ts.map