ooxml-core 0.22.1 → 0.23.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.
@@ -1,1472 +1,5 @@
1
+ import { Dt as PptxShapeLocks, Et as PptxDrawingGuide, Ot as ShadowEffect, Tt as ConnectorConnectionPoint, at as TextSegment, bt as Pptx3DScene, dt as EffectDagContainer, jt as XmlObject, kt as StrokeDashType, n as PptxSmartArtData, nt as PptxCustomPathProperties, ot as TextStyle, tt as GeometryAdjustmentHandle, wt as ConnectorArrowType, xt as Pptx3DShape } from "./smart-art-CO2jmJFf.js";
1
2
  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
- /**
555
- * Snapshot of the ELEMENT-scope `a:bodyPr` properties (vertical anchor,
556
- * text direction, columns, overflow, autofit, body insets, text wrap, and
557
- * the boolean/rotation attributes) as the load pipeline resolved them.
558
- *
559
- * A shape's own `a:bodyPr` is parsed first, then whatever it left
560
- * `undefined` is back-filled from the placeholder / layout / master
561
- * defaults (`applyPlaceholderBodyDefaults`), and a placeholder shape with
562
- * no `a:bodyPr` of its own has the INHERITED one parsed as if it were its
563
- * own. None of those three sources is distinguishable at
564
- * `element.textStyle` once the cascade finishes, so a writer that
565
- * re-emits every defined field turns an inherited anchor, inset, autofit
566
- * mode or `rtlCol` into a value pinned on the slide forever (and an
567
- * inherited `a:normAutofit` with no scale gets written back as
568
- * `a:spAutoFit`, flipping AutoSize from "shrink text" to "resize shape").
569
- *
570
- * Present only on an `element.textStyle` that came from a parsed deck.
571
- * The save path diffs the live style against this snapshot: a field that
572
- * still matches is an inheritance artefact and the writer leaves the
573
- * underlying `a:bodyPr` attribute untouched (whatever it already is,
574
- * present or absent); a field that differs was authored or has since
575
- * been edited and is written out.
576
- *
577
- * @see element-body-properties.ts
578
- */
579
- resolvedBodyProperties?: TextStyle;
580
- fontFamily?: string;
581
- fontSize?: number;
582
- /** When true, some form of autofit is in effect; see {@link autoFitMode} for which. */
583
- autoFit?: boolean;
584
- /** Explicit autofit mode from OOXML body properties.
585
- * - 'shrink': `a:spAutoFit` - resize the SHAPE to fit the text (never the font)
586
- * - 'normal': `a:normAutofit` - shrink the TEXT to fit the shape (via `fontScale`/`lnSpcReduction`)
587
- * - 'none': `a:noAutofit` - explicitly no auto-fit (text overflows)
588
- * - undefined: no autofit element present (inherit from layout/master)
589
- */
590
- autoFitMode?: 'shrink' | 'normal' | 'none';
591
- /** Font scale percentage for normAutofit (e.g. 0.9 = 90%). Only meaningful when autoFit is true. */
592
- autoFitFontScale?: number;
593
- /** Line spacing reduction for normAutofit (e.g. 0.2 = reduce by 20%). Only meaningful when autoFit is true. */
594
- autoFitLineSpacingReduction?: number;
595
- bold?: boolean;
596
- italic?: boolean;
597
- underline?: boolean;
598
- /** Specific underline style (e.g. "sng", "dbl", "wavy"). Falls back to "sng" when `underline` is true. */
599
- underlineStyle?: UnderlineStyle;
600
- /** Underline colour as hex string (`a:uFill` / `a:uLn`). When absent, inherits text colour. */
601
- underlineColor?: string;
602
- /**
603
- * When true, the source authored `<a:u val="none"/>` to explicitly suppress
604
- * underline (rather than omitting the attribute entirely). Preserved so the
605
- * writer can re-emit the explicit `none` token instead of dropping it.
606
- */
607
- underlineExplicitNone?: boolean;
608
- /**
609
- * Underline line properties parsed from `<a:rPr><a:uLn>` — width, dash
610
- * preset, and end caps. Captured as a typed object so the writer can
611
- * round-trip the line styling that previously was dropped (only the
612
- * solidFill colour was carried before).
613
- */
614
- underlineLine?: {
615
- /** Line width in EMU (raw OOXML) for `a:uLn/@w`. */
616
- widthEmu?: number;
617
- /** Compound line type (`a:uLn/@cmpd`). */
618
- compound?: string;
619
- /** Cap style (`a:uLn/@cap`). */
620
- cap?: string;
621
- /** Pen alignment (`a:uLn/@algn`). */
622
- algn?: string;
623
- /** Preset dash value (`a:uLn/a:prstDash/@val`). */
624
- prstDash?: string;
625
- /** Raw `a:uLn/a:headEnd` XML preserved verbatim. */
626
- headEndXml?: XmlObject;
627
- /** Raw `a:uLn/a:tailEnd` XML preserved verbatim. */
628
- tailEndXml?: XmlObject;
629
- };
630
- /** When `<a:uLnTx/>` is present — underline line follows the text run line. */
631
- underlineLineFollowsText?: boolean;
632
- /** When `<a:uFillTx/>` is present — underline fill follows the text run fill. */
633
- underlineFillFollowsText?: boolean;
634
- strikethrough?: boolean;
635
- /** Specific strike type: single or double from `a:rPr/@strike`. */
636
- strikeType?: 'sngStrike' | 'dblStrike';
637
- /** Text outline width in px (`a:rPr > a:ln/@w` in EMU). */
638
- textOutlineWidth?: number;
639
- /** Text outline colour as hex string (`a:rPr > a:ln > a:solidFill`). */
640
- textOutlineColor?: string;
641
- /** Text outline dash preset (`a:rPr > a:ln > a:prstDash/@val`), e.g. `dash`; absent for solid. */
642
- textOutlineDash?: string;
643
- /** When true, the text body has no fill (`a:rPr > a:noFill`), producing hollow/outline-only text. */
644
- textFillNone?: boolean;
645
- /**
646
- * When true, the run authored an EMPTY `<a:effectLst/>`: an explicit "no
647
- * effects" override that blocks an inherited shadow or glow. Kept so a
648
- * rewrite re-emits it instead of letting the inherited effect return.
649
- */
650
- textEffectsExplicitNone?: boolean;
651
- /** Superscript/subscript baseline shift as percentage (`a:rPr/@baseline`). Positive = super, negative = sub. */
652
- baseline?: number;
653
- /** Character spacing in hundredths of a point (`a:rPr/@spc`). */
654
- characterSpacing?: number;
655
- /** Kerning threshold in hundredths of a point (`a:rPr/@kern`). 0 = none. */
656
- kerning?: number;
657
- /** Text highlight colour as hex string (`a:highlight`). */
658
- highlightColor?: string;
659
- /**
660
- * Raw colour-choice XML preserved from `a:highlight` so a themed highlight
661
- * (`a:schemeClr` / `a:sysClr` / `a:prstClr`) re-emits with its original
662
- * identity rather than being flattened to `<a:srgbClr/>` on save. On save we
663
- * re-emit verbatim when the resolved {@link highlightColor} still matches.
664
- */
665
- highlightColorXml?: XmlObject;
666
- /** Text-level gradient fill CSS string (from `a:rPr > a:gradFill`). */
667
- textFillGradient?: string;
668
- /** Structured gradient stops for text fill round-trip serialization. */
669
- textFillGradientStops?: Array<{
670
- color: string;
671
- position: number;
672
- opacity?: number;
673
- }>;
674
- /** Gradient angle in degrees for text fill round-trip. */
675
- textFillGradientAngle?: number;
676
- /** Gradient type for text fill round-trip ('linear' | 'radial'). */
677
- textFillGradientType?: 'linear' | 'radial';
678
- /** Text-level pattern fill preset (from `a:rPr > a:pattFill`). */
679
- textFillPattern?: string;
680
- /** Text-level pattern foreground colour. */
681
- textFillPatternForeground?: string;
682
- /** Text-level pattern background colour. */
683
- textFillPatternBackground?: string;
684
- /**
685
- * Raw `a:rPr > a:blipFill` XML, preserved verbatim for round-trip
686
- * serialization AND as the input to the image resolution pass that fills
687
- * in {@link textFillBlipUrl} (parsing a run's fill happens synchronously,
688
- * with no zip/relationship access at that point; resolving the blip to a
689
- * displayable URL needs both, so it happens in a later async pass over
690
- * the slide's parsed elements, mirroring how a shape's OWN image fill is
691
- * resolved). A picture-filled text run (`a:rPr > a:blipFill`) was
692
- * documented as handled ("Handles gradient fills, pattern fills, and
693
- * image fills on text runs") but never actually parsed, so it silently
694
- * fell through to the run's plain `color` and rendered solid black
695
- * (COM-verified: `audit-text` slide 13's "PICTURE FILL" run shows the
696
- * fill image through the glyphs in PowerPoint).
697
- */
698
- textFillBlipXml?: XmlObject;
699
- /** Resolved displayable URL for {@link textFillBlipXml}, or the archive-relative path when unresolved (lazy decode). */
700
- textFillBlipUrl?: string;
701
- /** Tiling mode for {@link textFillBlipUrl} (`a:blipFill/a:tile` present -> 'tile', else 'stretch'). */
702
- textFillBlipMode?: 'stretch' | 'tile';
703
- hyperlink?: string;
704
- /** Relationship ID for the hyperlink (`a:hlinkClick/@r:id`) — preserved for round-trip serialization. */
705
- hyperlinkRId?: string;
706
- /** Hyperlink tooltip text (`a:hlinkClick/@tooltip`). */
707
- hyperlinkTooltip?: string;
708
- /** Hyperlink action type (`a:hlinkClick/@action`). */
709
- hyperlinkAction?: string;
710
- /** Whether the hyperlink target is an internal slide jump (targetSlideIndex style). */
711
- hyperlinkTargetSlideIndex?: number;
712
- color?: string;
713
- /**
714
- * Raw XML colour-choice node preserved from `a:rPr/a:solidFill` for
715
- * round-trip serialisation. Captures `a:schemeClr` / `a:sysClr` /
716
- * `a:prstClr` / `a:srgbClr` plus colour transforms. On save we re-emit
717
- * verbatim when the resolved {@link color} still matches this node.
718
- */
719
- colorXml?: XmlObject;
720
- /**
721
- * Typed theme colour reference for the run's text colour, set when
722
- * {@link colorXml} is a plain `a:schemeClr` (see
723
- * `themeColorRefFromColorChoice`). When present it WINS on save: the
724
- * writer emits `<a:schemeClr>` from this ref instead of the resolved
725
- * {@link color}, so the text keeps following the theme palette after a
726
- * later theme change.
727
- */
728
- colorRef?: PptxThemeColorRef;
729
- align?: 'left' | 'center' | 'right' | 'justify' | 'justLow' | 'dist' | 'thaiDist';
730
- /**
731
- * Vertical text-box anchor (`a:bodyPr/@anchor`, `ST_TextAnchoringType`).
732
- * `distributed`/`justified` (`dist`/`just`) stretch line spacing so the
733
- * paragraph block fills the box's full vertical extent, distinct from true
734
- * centering (`middle`/`ctr`); both approximate to a middle-anchored render
735
- * (see `text-body-layout.ts`) since CSS has no native vertical-justify
736
- * primitive, but round-trip losslessly through parse/save.
737
- */
738
- vAlign?: 'top' | 'middle' | 'bottom' | 'distributed' | 'justified';
739
- /** Right-to-left paragraph/run direction (`a:pPr/@rtl`, `a:rPr/@rtl`). */
740
- rtl?: boolean;
741
- /** Body text direction (`a:bodyPr/@vert`).
742
- *
743
- * Values map to OOXML `a:bodyPr/@vert` attribute values:
744
- * - `"horizontal"` — default horizontal text (`horz`)
745
- * - `"vertical"` — standard vertical text, right-to-left columns (`vert`)
746
- * - `"vertical270"` — text rotated 270 degrees (`vert270`)
747
- * - `"eaVert"` — East Asian vertical text with CJK glyphs upright (`eaVert`)
748
- * - `"wordArtVert"` — WordArt vertical, each character upright stacked (`wordArtVert`)
749
- * - `"wordArtVertRtl"` — WordArt vertical, right-to-left direction (`wordArtVertRtl`)
750
- * - `"mongolianVert"` — Mongolian vertical text, left-to-right columns (`mongolianVert`)
751
- */
752
- textDirection?: 'horizontal' | 'vertical' | 'vertical270' | 'eaVert' | 'wordArtVert' | 'wordArtVertRtl' | 'mongolianVert';
753
- /** Body column count (`a:bodyPr/@numCol`). */
754
- columnCount?: number;
755
- /** Column spacing in px (`a:bodyPr/@spcCol` in EMU). */
756
- columnSpacing?: number;
757
- /** Horizontal overflow mode from `a:bodyPr/@hOverflow`. */
758
- hOverflow?: 'overflow' | 'clip';
759
- /** Vertical overflow mode from `a:bodyPr/@vertOverflow`. */
760
- vertOverflow?: 'overflow' | 'clip' | 'ellipsis';
761
- /** Body text left inset in px (`a:bodyPr/@lIns` in EMU). */
762
- bodyInsetLeft?: number;
763
- /** Body text top inset in px (`a:bodyPr/@tIns` in EMU). */
764
- bodyInsetTop?: number;
765
- /** Body text right inset in px (`a:bodyPr/@rIns` in EMU). */
766
- bodyInsetRight?: number;
767
- /** Body text bottom inset in px (`a:bodyPr/@bIns` in EMU). */
768
- bodyInsetBottom?: number;
769
- /** Paragraph spacing before in px. */
770
- paragraphSpacingBefore?: number;
771
- /** Paragraph spacing after in px. */
772
- paragraphSpacingAfter?: number;
773
- /** Line spacing multiplier (e.g. 1.2 = 120%). Used when mode is proportional (spcPct). */
774
- lineSpacing?: number;
775
- /** Exact line spacing in points (from `a:lnSpc > a:spcPts`). Takes priority over `lineSpacing` when set. */
776
- lineSpacingExactPt?: number;
777
- /** Paragraph left margin in px (`a:pPr/@marL` in EMU). */
778
- paragraphMarginLeft?: number;
779
- /** Paragraph right margin in px (`a:pPr/@marR` in EMU). */
780
- paragraphMarginRight?: number;
781
- /** Paragraph first-line indent in px (`a:pPr/@indent` in EMU). */
782
- paragraphIndent?: number;
783
- /** Tab stop positions and alignments (`a:pPr/a:tabLst/a:tab`). */
784
- tabStops?: Array<{
785
- position: number;
786
- align: 'l' | 'ctr' | 'r' | 'dec';
787
- leader?: 'none' | 'dot' | 'hyphen' | 'underscore';
788
- /**
789
- * True when the source spelled out the schema-default `@algn="l"`, so the
790
- * writer re-emits it instead of treating it as an omitted default.
791
- */
792
- alignAuthored?: boolean;
793
- /** True when the source spelled out the schema-default `@leader="none"`. */
794
- leaderAuthored?: boolean;
795
- }>;
796
- /**
797
- * True when the paragraph's own `a:pPr` authored an EMPTY `<a:tabLst/>`
798
- * (explicitly "no tab stops", overriding whatever the cascade would
799
- * otherwise supply) rather than omitting the element entirely (inherit).
800
- * fast-xml-parser gives a childless element as the empty string, so
801
- * `tabLst` and no-`tabLst` are otherwise indistinguishable once `tabStops`
802
- * comes back empty either way. Paragraph-scope only; not part of the
803
- * element-level geometry cascade.
804
- */
805
- tabStopsExplicitEmpty?: boolean;
806
- /** Body text wrapping mode from `a:bodyPr/@wrap`. */
807
- textWrap?: 'square' | 'none';
808
- /** Preset text warp type from `a:bodyPr/a:prstTxWarp`. */
809
- textWarpPreset?: PptxTextWarpPreset;
810
- /** Primary adjustment value for text warp (from `a:prstTxWarp/a:avLst/a:gd` with name "adj").
811
- * Stored as raw OOXML 1/60000th units (e.g. 50000 = default for many presets). */
812
- textWarpAdj?: number;
813
- /** Secondary adjustment value for text warp (from `a:prstTxWarp/a:avLst/a:gd` with name "adj2").
814
- * Stored as raw OOXML 1/60000th units. */
815
- textWarpAdj2?: number;
816
- /** Text capitalization style from `a:rPr/@cap`. */
817
- textCaps?: 'all' | 'small' | 'none';
818
- /**
819
- * When true, the source authored `<a:rPr cap="none"/>` explicitly. This
820
- * differs from {@link textCaps} = `"none"` only because the writer must
821
- * preserve the explicit token rather than collapse it to omission.
822
- */
823
- textCapsExplicitNone?: boolean;
824
- /** Symbol font family from `a:sym`. */
825
- symbolFont?: string;
826
- /** East Asian font family from `a:ea`. */
827
- eastAsiaFont?: string;
828
- /** Complex Script font family from `a:cs`. */
829
- complexScriptFont?: string;
830
- /**
831
- * Theme-font token (`+mj-lt` / `+mn-lt` / ...) authored on `a:latin`, when
832
- * present. {@link fontFamily} holds the resolved concrete face for
833
- * rendering; this preserves the token linkage so the writer re-emits the
834
- * token rather than the flattened face (see #84).
835
- */
836
- latinFontThemeToken?: string;
837
- /** Theme-font token authored on `a:ea` (e.g. `+mn-ea`), when present. */
838
- eastAsiaFontThemeToken?: string;
839
- /** Theme-font token authored on `a:cs` (e.g. `+mn-cs`), when present. */
840
- complexScriptFontThemeToken?: string;
841
- /**
842
- * Automatic per-script fallback face resolved from the theme's
843
- * `<a:font script="...">` overrides for a run whose text is dominantly
844
- * CJK / Arabic / Hebrew / Thai (see #83). A rendering hint only: it is not
845
- * serialised back on save, so it never disturbs the round-trip typefaces.
846
- */
847
- scriptFallbackFont?: string;
848
- /**
849
- * Set alongside {@link scriptFallbackFont} when the resolved {@link fontFamily}
850
- * came only from the paragraph/list-style/theme CASCADE (the run's own
851
- * `a:rPr` authored no `a:latin`/`a:ea`/`a:cs` of its own). A run always
852
- * inherits SOME font this way (typically the theme's `+mn-lt`), so without
853
- * this flag `fontFamily` was indistinguishable from a run that genuinely
854
- * chose that font itself, and the renderer never applied the theme's
855
- * per-script override (see #83): `+mn-lt` names only the LATIN member of
856
- * the font scheme and was never meant to cover text in a different
857
- * dominant script. An explicit `a:latin`/`a:ea`/`a:cs` authored on the run
858
- * itself still always wins; only the cascade default yields to the
859
- * script-specific override.
860
- */
861
- fontFamilyIsCascadeDefault?: boolean;
862
- /** Text language from `a:rPr/@lang`. */
863
- language?: string;
864
- /** Hyperlink mouse-over target from `a:hlinkMouseOver`. */
865
- hyperlinkMouseOver?: string;
866
- /**
867
- * Raw `a:snd` (embedded WAV audio) child of `a:hlinkClick`, preserved
868
- * verbatim (carries `@r:embed` + `@name`). Round-tripped on save so the
869
- * click sound survives instead of being dropped.
870
- */
871
- hyperlinkSoundXml?: XmlObject;
872
- /** Raw `a:snd` child of `a:hlinkMouseOver`, preserved verbatim for round-trip. */
873
- hyperlinkMouseOverSoundXml?: XmlObject;
874
- /** Hyperlink invalidUrl attribute (`a:hlinkClick/@invalidUrl`). */
875
- hyperlinkInvalidUrl?: string;
876
- /** Hyperlink target frame (`a:hlinkClick/@tgtFrame`). */
877
- hyperlinkTargetFrame?: string;
878
- /** Whether hyperlink history is tracked (`a:hlinkClick/@history`). */
879
- hyperlinkHistory?: boolean;
880
- /** Whether hyperlink uses highlight-click effect (`a:hlinkClick/@highlightClick`). */
881
- hyperlinkHighlightClick?: boolean;
882
- /** Whether hyperlink ends a sound (`a:hlinkClick/@endSnd`). */
883
- hyperlinkEndSound?: boolean;
884
- /**
885
- * Raw `a:hlinkClick/a:extLst` child, preserved verbatim for round-trip.
886
- * Carries vendor extensions this engine does not interpret, most commonly
887
- * `ahyp:hlinkClr` (Microsoft's "hyperlink color" extension,
888
- * `{A12FA001-AC4F-418D-AE19-62706E023703}`), which records whether a
889
- * hyperlink run should paint with the theme's text colour instead of the
890
- * hyperlink colour. Dropping the whole `a:extLst` silently reverted such a
891
- * run to the default (themed) hyperlink colour on save.
892
- */
893
- hyperlinkExtensionXml?: XmlObject;
894
- /** Kumimoji (ideographic text combining) flag for vertical CJK text (`a:rPr/@kumimoji`). */
895
- kumimoji?: boolean;
896
- /** Normalize height flag (`a:rPr/@normalizeH`). */
897
- normalizeHeight?: boolean;
898
- /** No proofing flag (`a:rPr/@noProof`). */
899
- noProof?: boolean;
900
- /** Dirty flag indicating run has been edited (`a:rPr/@dirty`). */
901
- dirty?: boolean;
902
- /** Error flag indicating spelling error (`a:rPr/@err`). */
903
- spellingError?: boolean;
904
- /** Smart tag clean flag (`a:rPr/@smtClean`). */
905
- smartTagClean?: boolean;
906
- /** Bookmark link target (`a:rPr/@bmk`). */
907
- bookmark?: string;
908
- /** Alternative language for the run (`a:rPr/@altLang`). Populated for runs
909
- * authored in mixed-script documents (e.g. Asian/Latin combined). */
910
- altLanguage?: string;
911
- /** SmartTag (Office grammar tag) GUID id (`a:rPr/@smtId`). Round-tripped
912
- * verbatim — the engine doesn't interpret it. */
913
- smartTagId?: number;
914
- /** Latin font PANOSE classification string from `a:rPr > a:latin/@panose`. */
915
- latinFontPanose?: string;
916
- /** Latin font pitch + family flag from `a:rPr > a:latin/@pitchFamily`. */
917
- latinFontPitchFamily?: number;
918
- /** Latin font character set id from `a:rPr > a:latin/@charset`. */
919
- latinFontCharset?: number;
920
- /** East-Asian font PANOSE from `a:rPr > a:ea/@panose`. */
921
- eastAsiaFontPanose?: string;
922
- /** East-Asian font pitch + family flag from `a:rPr > a:ea/@pitchFamily`. */
923
- eastAsiaFontPitchFamily?: number;
924
- /** East-Asian font character set id from `a:rPr > a:ea/@charset`. */
925
- eastAsiaFontCharset?: number;
926
- /** Complex-script font PANOSE from `a:rPr > a:cs/@panose`. */
927
- complexScriptFontPanose?: string;
928
- /** Complex-script font pitch + family flag from `a:rPr > a:cs/@pitchFamily`. */
929
- complexScriptFontPitchFamily?: number;
930
- /** Complex-script font character set id from `a:rPr > a:cs/@charset`. */
931
- complexScriptFontCharset?: number;
932
- /** Symbol-font PANOSE from `a:rPr > a:sym/@panose`. */
933
- symbolFontPanose?: string;
934
- /** Symbol-font pitch + family flag from `a:rPr > a:sym/@pitchFamily`. */
935
- symbolFontPitchFamily?: number;
936
- /** Symbol-font character set id from `a:rPr > a:sym/@charset`. */
937
- symbolFontCharset?: number;
938
- /** Paragraph list type for toggling bullet / numbered lists via the toolbar.
939
- * - `'bullet'` — character bullet (default "•")
940
- * - `'numbered'` — auto-numbered list (arabicPeriod)
941
- * - `'none'` — explicitly no list
942
- */
943
- listType?: 'bullet' | 'numbered' | 'none';
944
- /** Default tab size in px (`a:pPr/@defTabSz` in EMU). */
945
- defaultTabSize?: number;
946
- /** East Asian line break flag (`a:pPr/@eaLnBrk`). */
947
- eaLineBreak?: boolean;
948
- /** Latin line break flag (`a:pPr/@latinLnBrk`). */
949
- latinLineBreak?: boolean;
950
- /** Font alignment (`a:pPr/@fontAlgn`): 'auto' | 'base' | 'ctr' | 't' | 'b'. */
951
- fontAlignment?: string;
952
- /** Hanging punctuation flag (`a:pPr/@hangingPunct`). */
953
- hangingPunctuation?: boolean;
954
- /** Whether to space first and last paragraph from body edges (`a:bodyPr/@spcFirstLastPara`). */
955
- spaceFirstLastParagraph?: boolean;
956
- /** Right-to-left column flow (`a:bodyPr/@rtlCol`). */
957
- rtlColumns?: boolean;
958
- /** Whether text originates from WordArt (`a:bodyPr/@fromWordArt`). */
959
- fromWordArt?: boolean;
960
- /** Whether text anchoring is centered (`a:bodyPr/@anchorCtr`). */
961
- anchorCenter?: boolean;
962
- /** Force anti-aliasing (`a:bodyPr/@forceAA`). */
963
- forceAntiAlias?: boolean;
964
- /** Upright text in 3D views (`a:bodyPr/@upright`). */
965
- upright?: boolean;
966
- /** Compatible line spacing flag (`a:bodyPr/@compatLnSpc`). */
967
- compatibleLineSpacing?: boolean;
968
- /**
969
- * Text body rotation in **degrees** (`a:bodyPr/@rot`).
970
- *
971
- * OOXML stores the value as 60000ths of a degree. Positive values rotate
972
- * the body clockwise. When undefined, the attribute is omitted on save
973
- * (PowerPoint treats absent `rot` as inherit/none).
974
- */
975
- textBodyRotation?: number;
976
- /** Text shadow colour as hex string (`a:outerShdw`). */
977
- textShadowColor?: string;
978
- /** Text shadow blur radius in px. */
979
- textShadowBlur?: number;
980
- /** Text shadow horizontal offset in px. */
981
- textShadowOffsetX?: number;
982
- /** Text shadow vertical offset in px. */
983
- textShadowOffsetY?: number;
984
- /** Text shadow opacity (0-1). */
985
- textShadowOpacity?: number;
986
- /** Text inner shadow colour (`a:innerShdw`). */
987
- textInnerShadowColor?: string;
988
- /** Text inner shadow opacity (0-1). */
989
- textInnerShadowOpacity?: number;
990
- /** Text inner shadow blur radius in px. */
991
- textInnerShadowBlur?: number;
992
- /** Text inner shadow horizontal offset in px. */
993
- textInnerShadowOffsetX?: number;
994
- /** Text inner shadow vertical offset in px. */
995
- textInnerShadowOffsetY?: number;
996
- /**
997
- * Original inner-shadow colour-choice XML (`a:innerShdw`'s
998
- * `a:prstClr`/`a:schemeClr`/`a:srgbClr`/… child), preserved verbatim so an
999
- * authored preset or theme colour round-trips instead of always being
1000
- * re-serialized as a resolved `a:srgbClr`. Mirrors {@link textGlowColorXml}.
1001
- */
1002
- textInnerShadowColorXml?: XmlObject;
1003
- /** Theme colour slot the inner shadow colour resolved from, when it is `a:schemeClr`. */
1004
- textInnerShadowColorRef?: PptxThemeColorRef;
1005
- /** Preset shadow type from `a:prstShdw/@prst` (e.g. "shdw1"..."shdw20"). */
1006
- textPresetShadowName?: string;
1007
- /** Preset shadow colour as hex string. */
1008
- textPresetShadowColor?: string;
1009
- /** Preset shadow opacity (0-1). */
1010
- textPresetShadowOpacity?: number;
1011
- /** Preset shadow distance in px. */
1012
- textPresetShadowDistance?: number;
1013
- /** Preset shadow direction in degrees. */
1014
- textPresetShadowDirection?: number;
1015
- /** Text blur effect radius in px (`a:blur`). */
1016
- textBlurRadius?: number;
1017
- /**
1018
- * Text soft-edge radius in px (`a:softEdge/@rad`).
1019
- *
1020
- * Feathers the glyph's own edges (a uniform blur of the alpha silhouette,
1021
- * the same effect a shape's `a:softEdge` gives its fill), unrelated to
1022
- * `a:blur` (which blurs the whole run, colour included) or a shadow. Never
1023
- * parsed before this field existed, so `a:softEdge` on a run was silently
1024
- * dropped: PowerPoint fades the glyphs to near-transparent at their
1025
- * outline (COM-verified, `audit-text` slide 14's "SOFTEDGE" run), while
1026
- * the viewer painted them fully crisp.
1027
- */
1028
- textSoftEdgeRadius?: number;
1029
- /**
1030
- * Raw `a:effectDag` XML node from `a:rPr`, preserved verbatim for
1031
- * round-trip serialisation. Mirrors the shape-level
1032
- * {@link import('./shape-style').ShapeStyle.effectDagXml} field.
1033
- */
1034
- textEffectDagXml?: XmlObject;
1035
- /**
1036
- * Typed effect graph parsed from `textEffectDagXml`. The four structural
1037
- * container nodes (`a:cont`, `a:blend`, `a:xfrmEffect`, `a:relOff`) are
1038
- * fully typed; any other leaf effect is captured as
1039
- * {@link import('./effect-dag').EffectDagRawLeaf} so we never have to
1040
- * recurse into the full effect taxonomy.
1041
- */
1042
- textEffectDagTree?: EffectDagContainer;
1043
- /** Text alpha modulation fixed (0-100) from `a:alphaModFix`. */
1044
- textAlphaModFix?: number;
1045
- /** Text alpha modulation from `a:alphaMod` (0-100 percentage). */
1046
- textAlphaMod?: number;
1047
- /** Text hue shift in degrees from `a:hsl/@hue`. */
1048
- textHslHue?: number;
1049
- /** Text saturation adjustment from `a:hsl/@sat`. */
1050
- textHslSaturation?: number;
1051
- /** Text luminance adjustment from `a:hsl/@lum`. */
1052
- textHslLuminance?: number;
1053
- /** Text colour change from colour as hex string (`a:clrChange`). */
1054
- textClrChangeFrom?: string;
1055
- /** Text colour change to colour as hex string. */
1056
- textClrChangeTo?: string;
1057
- /** Text duotone colour pair (`a:duotone`). */
1058
- textDuotone?: {
1059
- color1: string;
1060
- color2: string;
1061
- };
1062
- /** Text glow colour as hex string (`a:glow`). */
1063
- textGlowColor?: string;
1064
- /** Text glow radius in px. */
1065
- textGlowRadius?: number;
1066
- /** Text glow opacity (0-1). */
1067
- textGlowOpacity?: number;
1068
- /**
1069
- * Original glow colour-choice XML (`a:glow`'s `a:schemeClr`/`a:srgbClr`/…
1070
- * child), preserved verbatim so a theme colour reference round-trips
1071
- * instead of always being re-serialized as a resolved `a:srgbClr` (which
1072
- * cuts the glow off from theme/Recolor changes).
1073
- */
1074
- textGlowColorXml?: XmlObject;
1075
- /** Theme colour slot the glow colour resolved from, when it is `a:schemeClr`. */
1076
- textGlowColorRef?: PptxThemeColorRef;
1077
- /** Text reflection enabled flag. */
1078
- textReflection?: boolean;
1079
- /** Text reflection blur radius in px. */
1080
- textReflectionBlur?: number;
1081
- /** Text reflection start opacity (0-1). */
1082
- textReflectionStartOpacity?: number;
1083
- /** Text reflection end opacity (0-1). */
1084
- textReflectionEndOpacity?: number;
1085
- /** Text reflection offset distance in px. */
1086
- textReflectionOffset?: number;
1087
- /**
1088
- * Text reflection end position (`@endPos`) as a 0-1 fraction of the text
1089
- * height the fade reaches. Mirrors `ShapeStyle.reflectionEndPosition`.
1090
- */
1091
- textReflectionEndPosition?: number;
1092
- /**
1093
- * Text reflection offset direction (`@dir`) in degrees. Mirrors
1094
- * `ShapeStyle.reflectionDirection`.
1095
- */
1096
- textReflectionDirection?: number;
1097
- /**
1098
- * Text reflection fade direction (`a:rPr/a:effectLst/a:reflection/@fadeDir`)
1099
- * in degrees. Mirrors `ShapeStyle.reflectionFadeDirection`.
1100
- */
1101
- textReflectionFadeDirection?: number;
1102
- /**
1103
- * Text reflection horizontal scaling (`@sx`), same units as
1104
- * `ShapeStyle.reflectionScaleX` (1000ths of a percent, e.g. 100000 = 100%).
1105
- */
1106
- textReflectionScaleX?: number;
1107
- /** Text reflection vertical scaling (`@sy`). See `ShapeStyle.reflectionScaleY`. */
1108
- textReflectionScaleY?: number;
1109
- /**
1110
- * Text reflection horizontal skew (`@kx`) in 60000ths of a degree. See
1111
- * `ShapeStyle.reflectionSkewX`.
1112
- */
1113
- textReflectionSkewX?: number;
1114
- /** Text reflection vertical skew (`@ky`). See `ShapeStyle.reflectionSkewY`. */
1115
- textReflectionSkewY?: number;
1116
- /**
1117
- * Text reflection independent rotation (`@rot`) in degrees. See
1118
- * `ShapeStyle.reflectionRotation`.
1119
- */
1120
- textReflectionRotation?: number;
1121
- /** Text reflection anchor (`@algn`). See `ShapeStyle.reflectionAlignment`. */
1122
- textReflectionAlignment?: 'tl' | 't' | 'tr' | 'l' | 'ctr' | 'r' | 'bl' | 'b' | 'br';
1123
- /** 3D extrusion/bevel settings on the text body. */
1124
- text3d?: Text3DStyle;
1125
- /** 3D scene (camera + light rig) settings on the text body (`a:bodyPr/a:scene3d`). */
1126
- textBodyScene3d?: Pptx3DScene;
1127
- /** Raw `a:scene3d` subtree used to preserve extensions and unmodelled children. */
1128
- textBodyScene3dXml?: XmlObject;
1129
- /**
1130
- * `a:bodyPr/a:flatTx` - an explicit "render this text flat" marker. `sp3d`
1131
- * and `flatTx` are a mutually exclusive OOXML choice (`EG_Text3D`), so a
1132
- * shape/run that overrides an inherited 3D text body with `<a:flatTx/>`
1133
- * carries no `text3d` of its own; without this explicit flag a later
1134
- * inheritance merge has no signal to stop `text3d`/`textBodyScene3d` from
1135
- * an ancestor (layout/master) leaking back in, the way `noFill` stops an
1136
- * inherited fill. A renderer must short-circuit 3D-text application
1137
- * whenever this is `true`, regardless of what `text3d`/`textBodyScene3d`
1138
- * otherwise hold.
1139
- */
1140
- flatText?: boolean;
1141
- /**
1142
- * Raw `<a:extLst>` subtree captured from `<a:bodyPr>`. Preserved verbatim so
1143
- * authored extensions (e.g. content placeholders, custom application data)
1144
- * survive a round-trip even though the engine doesn't interpret them.
1145
- */
1146
- bodyPropertiesExtLstXml?: XmlObject;
1147
- /**
1148
- * Raw `<a:extLst>` subtree captured from `<a:pPr>`. Only meaningful on the
1149
- * paragraph-level style (paragraphs propagate this via the first segment).
1150
- */
1151
- paragraphPropertiesExtLstXml?: XmlObject;
1152
- /**
1153
- * Raw `<a:extLst>` subtree captured from `<a:rPr>`. Persisted verbatim on
1154
- * save when present — covers run-level extensions the typed model doesn't
1155
- * model (e.g. `a14:hiddenFill` and similar).
1156
- */
1157
- runPropertiesExtLstXml?: XmlObject;
1158
- /**
1159
- * Raw `<a:defRPr>` XML node captured from `<a:pPr>`. The schema permits
1160
- * `defRPr` directly inside `pPr` so that paragraph defaults can specify the
1161
- * end-paragraph run formatting; previously this was dropped on save. We
1162
- * persist the parsed XML object so it round-trips verbatim.
1163
- *
1164
- * Only meaningful on the *first* segment of each paragraph (matches the
1165
- * convention used for {@link bulletInfo} / {@link endParaRunProperties}).
1166
- */
1167
- paragraphDefaultRunPropertiesXml?: XmlObject;
1168
- /**
1169
- * The bullet colour / size / typeface children (`a:buClrTx`, `a:buClr`,
1170
- * `a:buSzTx`, `a:buSzPct`, `a:buSzPts`, `a:buFontTx`, `a:buFont`) a
1171
- * paragraph authored in its own `<a:pPr>` WITHOUT a bullet type
1172
- * (`a:buNone` / `a:buChar` / `a:buAutoNum` / `a:buBlip`), captured
1173
- * verbatim in source order. Such a paragraph restyles an inherited bullet
1174
- * rather than declaring one, so its {@link BulletInfo} resolves from the
1175
- * cascade and is (correctly) not written back; without this capture the
1176
- * paragraph's own override vanished on every rewrite.
1177
- *
1178
- * Only meaningful on a paragraph's own authored properties.
1179
- */
1180
- paragraphBulletPropertiesXml?: XmlObject;
1181
- }
1182
- /**
1183
- * Structured bullet metadata attached to the first {@link TextSegment}
1184
- * of each paragraph.
1185
- *
1186
- * Describes how the paragraph bullet should render: character bullets
1187
- * (`char`), auto-numbered lists (`autoNumType`), or picture bullets
1188
- * (`imageRelId` / `imageDataUrl`). Set `none: true` when `a:buNone`
1189
- * explicitly suppresses the bullet.
1190
- *
1191
- * @example
1192
- * ```ts
1193
- * // Simple character bullet:
1194
- * const bullet: BulletInfo = { char: "•", color: "#333333" };
1195
- *
1196
- * // Auto-numbered list starting at 1:
1197
- * const numbered: BulletInfo = {
1198
- * autoNumType: "arabicPeriod",
1199
- * autoNumStartAt: 1,
1200
- * };
1201
- * // => { char: "•", color: "#333333" } and { autoNumType: "arabicPeriod", autoNumStartAt: 1 }
1202
- * ```
1203
- */
1204
- interface BulletInfo {
1205
- /** Bullet character (e.g. "•", "-", "»") from `a:buChar`. */
1206
- char?: string;
1207
- /** Auto-numbering type (e.g. "arabicPeriod", "romanUcPeriod") from `a:buAutoNum`. */
1208
- autoNumType?: string;
1209
- /** Auto-numbering start value. */
1210
- autoNumStartAt?: number;
1211
- /**
1212
- * Auto-numbering ORDINAL OFFSET: the zero-based distance of this paragraph
1213
- * within its own numbered list, such that
1214
- * `autoNumStartAt + paragraphIndex` is the ordinal to render. Despite the
1215
- * name it is NOT the paragraph's position in the text body; the two agree
1216
- * only for a list that starts at the first paragraph and is never
1217
- * interrupted.
1218
- *
1219
- * It has to be the offset rather than the raw position because every
1220
- * consumer that re-derives a marker from `BulletInfo` alone (the renderer's
1221
- * `resolveParagraphBullet`, the Markdown converter's `resolveListMarker`)
1222
- * computes `autoNumStartAt + paragraphIndex`. The load path resolves the
1223
- * real sequence itself, restarting the count after any paragraph that
1224
- * interrupts the list, and publishes the offset here so those consumers
1225
- * land on the same number. With the raw position they did not, and BOTH
1226
- * markers were painted ("3.1. Item"), because the paragraph builder drops
1227
- * the parsed marker segment only when the two strings agree.
1228
- *
1229
- * Runtime-only: derived at parse time and never serialized. OOXML has no
1230
- * counterpart (`a:buAutoNum` carries only `@type` and `@startAt`), so the
1231
- * writer neither reads nor emits it.
1232
- */
1233
- paragraphIndex?: number;
1234
- /** Bullet font family from `a:buFont`. */
1235
- fontFamily?: string;
1236
- /**
1237
- * PANOSE font-matching hint from `a:buFont/@panose`. `a:buFont` is a
1238
- * CT_TextFont, the same complex type as `a:latin`/`a:ea`/`a:cs`/`a:sym`
1239
- * (which carry the equivalent `TextStyle.latinFontPanose` etc.), so a
1240
- * bullet's own PANOSE/pitch-family/charset decide the fallback glyph
1241
- * PowerPoint substitutes when the named typeface is missing.
1242
- */
1243
- fontPanose?: string;
1244
- /** Font pitch-and-family byte from `a:buFont/@pitchFamily`. */
1245
- fontPitchFamily?: number;
1246
- /** Font character-set byte from `a:buFont/@charset`. */
1247
- fontCharset?: number;
1248
- /** Bullet size as percentage of text font size from `a:buSzPct`. */
1249
- sizePercent?: number;
1250
- /** Bullet size in points from `a:buSzPts`. */
1251
- sizePts?: number;
1252
- /** Bullet color as hex string from `a:buClr`. */
1253
- color?: string;
1254
- /**
1255
- * Raw colour-choice XML captured from `<a:buClr>` so that themed bullets
1256
- * (`a:schemeClr`, `a:sysClr`, `a:prstClr`) round-trip with their original
1257
- * identity rather than being flattened to `<a:srgbClr/>` on save.
1258
- */
1259
- colorXml?: XmlObject;
1260
- /**
1261
- * Typed theme colour reference for the bullet colour, set when
1262
- * {@link colorXml} is a plain `a:schemeClr`. Wins on save, same as
1263
- * {@link TextStyle.colorRef}.
1264
- */
1265
- colorRef?: PptxThemeColorRef;
1266
- /** True when `a:buNone` explicitly suppresses bullets. */
1267
- none?: boolean;
1268
- /** Picture bullet: relationship ID from `a:buBlip` → `a:blip[@r:embed]`. */
1269
- imageRelId?: string;
1270
- /** Picture bullet: data URL of the embedded image. */
1271
- imageDataUrl?: string;
1272
- /**
1273
- * Raw `<a:buBlip>` XML captured at parse time. Carries the full blipFill
1274
- * subtree (`a:tile`, `a:stretch`, `a:srcRect`, `a:blip > a:extLst`) so the
1275
- * writer can emit the complete original definition rather than the bare
1276
- * `a:blip[@r:embed]` mapping. When set, the writer prefers it over
1277
- * {@link imageRelId} for emission.
1278
- */
1279
- imageBlipFillXml?: XmlObject;
1280
- /** When true, `<a:buFontTx/>` was specified — inherit the bullet font from
1281
- * the run text, not from a buFont declaration. */
1282
- fontInherit?: boolean;
1283
- /** When true, `<a:buClrTx/>` was specified — inherit the bullet colour from
1284
- * the run text. */
1285
- colorInherit?: boolean;
1286
- /** When true, `<a:buSzTx/>` was specified — inherit the bullet size from
1287
- * the run text font size. */
1288
- sizeInherit?: boolean;
1289
- /**
1290
- * True when this bullet resolution came from the paragraph's OWN `a:pPr`
1291
- * rather than the shape's `a:lstStyle`, an inherited placeholder, or the
1292
- * master's `a:defPPr` / `p:txStyles`. `resolveParagraphBulletInfo` walks
1293
- * that cascade and returns the first match, so without this flag a
1294
- * writer that re-emits every resolved `BulletInfo` in full pins an
1295
- * inherited bullet (e.g. a master `buFont="Arial"` / `buChar="•"`) onto
1296
- * every paragraph's own `a:pPr` the moment the slide is rewritten. The
1297
- * save path only writes the bullet group when this is `true`, mirroring
1298
- * how `paragraphProperties` gates every other per-paragraph field.
1299
- */
1300
- ownedByParagraph?: boolean;
1301
- }
1302
- /**
1303
- * A single text run within a paragraph.
1304
- *
1305
- * A text body is decomposed into an array of `TextSegment` objects,
1306
- * each with its own style. Paragraph breaks are represented as
1307
- * segments with `isParagraphBreak: true`.
1308
- *
1309
- * @example
1310
- * ```ts
1311
- * const segments: TextSegment[] = [
1312
- * { text: "Bold intro ", style: { bold: true, fontSize: 16 } },
1313
- * { text: "and normal text.", style: { fontSize: 16 } },
1314
- * { text: "", style: {}, isParagraphBreak: true },
1315
- * { text: "Second paragraph.", style: { fontSize: 14 } },
1316
- * ];
1317
- * // => 4 segments: 2 styled runs, 1 paragraph break, 1 normal run
1318
- * ```
1319
- */
1320
- interface TextSegment {
1321
- text: string;
1322
- style: TextStyle;
1323
- /** When this segment originated from an `a:fld` element, stores the field type (e.g. "slidenum", "datetime"). */
1324
- fieldType?: string;
1325
- /** When this segment originated from an `a:fld` element, stores the field GUID. */
1326
- fieldGuid?: string;
1327
- /**
1328
- * Original attribute name used to author the field GUID — `'uuid'` for the
1329
- * `a:fld/@uuid` form authored by some legacy producers, `'id'` for the
1330
- * canonical `a:fld/@id` form. Preserved so the writer round-trips whichever
1331
- * spelling the source used (PowerPoint accepts both). Defaults to `'id'`
1332
- * on save when undefined.
1333
- */
1334
- fieldGuidAttr?: 'uuid' | 'id';
1335
- /**
1336
- * Raw per-field paragraph properties (`a:fld > a:pPr`). The schema permits
1337
- * `pPr` inside an `a:fld` so the field can carry its own paragraph-level
1338
- * formatting; preserved verbatim on save when present.
1339
- */
1340
- fieldParagraphPropertiesXml?: XmlObject;
1341
- /** Raw OMML XML node for equation segments (from `a14:m` / `m:oMathPara`). */
1342
- equationXml?: Record<string, unknown>;
1343
- /**
1344
- * The ORIGINAL top-level paragraph child that carried this equation,
1345
- * captured verbatim at parse time and keyed by its own tag: `{ 'a14:m':
1346
- * ... }`, `{ 'm:oMathPara': ... }`, `{ 'm:oMath': ... }`, or `{
1347
- * 'mc:AlternateContent': ... }` for an equation authored behind a
1348
- * Choice/Fallback switch. `equationXml` above is the resolved math content
1349
- * used for rendering (unwrapped one level for `a14:m`/`mc:AlternateContent`
1350
- * sources); this field exists solely so the writer can re-emit an UNTOUCHED
1351
- * equation byte-for-byte, Choice and Fallback both, instead of collapsing
1352
- * it to a bare math element PowerPoint's own writer never produces.
1353
- * `undefined` for a freshly inserted or edited equation, which the writer
1354
- * instead reconstructs from `equationXml` (always `{ 'm:oMathPara': ... }`
1355
- * or `{ 'm:oMath': ... }` for those cases). Any code that replaces
1356
- * `equationXml` on an existing segment must drop this field, or the writer
1357
- * would keep re-emitting the equation's OLD XML instead of the edit.
1358
- */
1359
- equationSourceXml?: Record<string, unknown>;
1360
- /**
1361
- * Optional equation number for numbered equations (e.g. "(1)", "(2.3)").
1362
- * When present, the equation is rendered centered with the number right-aligned.
1363
- */
1364
- equationNumber?: string;
1365
- /** Whether this segment represents a paragraph break rather than renderable text. */
1366
- isParagraphBreak?: boolean;
1367
- /**
1368
- * Whether this segment represents a soft line break (`a:br`) rather than
1369
- * a paragraph terminator. Soft line breaks remain inside the same paragraph
1370
- * but force a line wrap and may carry their own run properties.
1371
- *
1372
- * The renderer should treat the segment text as `"\n"` when present.
1373
- */
1374
- isLineBreak?: true;
1375
- /**
1376
- * Raw `a:rPr` XML for an `a:br` (soft line break) segment, captured verbatim
1377
- * during parse so the writer can re-emit attributes/colours/fonts that the
1378
- * typed model doesn't represent. Only meaningful when {@link isLineBreak}
1379
- * is `true`.
1380
- */
1381
- breakRunProperties?: Record<string, unknown>;
1382
- /** Structured bullet info for the first segment of a paragraph. */
1383
- bulletInfo?: BulletInfo;
1384
- /**
1385
- * Outline level for the paragraph this segment starts (`a:p/@lvl`).
1386
- *
1387
- * Only meaningful on the first segment of a paragraph (matching the
1388
- * convention used for {@link bulletInfo}). Stored as the raw OOXML
1389
- * value (0 = top level, 1-8 = nested) and serialised back when non-zero.
1390
- */
1391
- paragraphLevel?: number;
1392
- /**
1393
- * Raw `a:endParaRPr` XML node for the paragraph this segment starts.
1394
- *
1395
- * Captured verbatim on parse so attributes and child colours/fonts that
1396
- * the typed model doesn't represent survive a round-trip. Only meaningful
1397
- * on the first segment of a paragraph.
1398
- */
1399
- endParaRunProperties?: Record<string, unknown>;
1400
- /**
1401
- * Resolved body defaults and optional `a:endParaRPr` of a runless paragraph.
1402
- * Carried on its first segment (or terminator), separately from marker
1403
- * styling. Absent when the source contains an authored run or field.
1404
- */
1405
- paragraphInsertionStyle?: TextStyle;
1406
- /**
1407
- * Per-paragraph properties (alignment, spacing, margins, indent, tab stops,
1408
- * rtl) authored on this paragraph's own `a:pPr` (#69). Only meaningful on
1409
- * the first segment of a paragraph. When present, the writer emits these
1410
- * per paragraph instead of collapsing one shape-level pPr onto every
1411
- * paragraph. Only the paragraph-geometry keys of {@link TextStyle} are
1412
- * populated; unrelated fields fall back to the shape-level style.
1413
- */
1414
- paragraphProperties?: TextStyle;
1415
- /**
1416
- * The paragraph this segment starts authored an EMPTY `<a:pPr/>`. Only
1417
- * meaningful on the first segment of a paragraph. The writer re-emits the
1418
- * empty element when it has no paragraph property of its own to write, so
1419
- * a rewritten slide keeps the markup PowerPoint wrote.
1420
- */
1421
- emptyParagraphPropertiesAuthored?: boolean;
1422
- /**
1423
- * The paragraph this segment starts has no run content and authored no
1424
- * `a:endParaRPr` (a bare `<a:p/>`, possibly with an `a:pPr`). Only
1425
- * meaningful on the first segment of a paragraph. It stops the writer
1426
- * inventing an empty run or an `<a:endParaRPr lang="en-US"/>` stub for a
1427
- * paragraph that still has no content when saved.
1428
- */
1429
- bareParagraph?: boolean;
1430
- /**
1431
- * Phonetic annotation text from `a:ruby > a:rt` (e.g. furigana, pinyin).
1432
- * When present, the renderer should wrap the base text with an HTML `<ruby>` tag.
1433
- */
1434
- rubyText?: string;
1435
- /**
1436
- * Ruby text alignment from `a:rubyPr > @val` attribute.
1437
- * Values: "ctr" (center), "l" (left), "r" (right), "dist" (distribute), "distCat", "distLetter".
1438
- * @default "ctr"
1439
- */
1440
- rubyAlignment?: string;
1441
- /**
1442
- * Ruby text font size as a percentage of the base text font size
1443
- * from `a:rubyPr/@hps` (half-point size) or inferred from rt run font size.
1444
- * Stored in **points** for consistency with `TextStyle.fontSize`.
1445
- */
1446
- rubyFontSize?: number;
1447
- /**
1448
- * Style for the ruby (phonetic) text run, parsed from `a:rt > a:r > a:rPr`.
1449
- * Used by the renderer to apply font family, colour, etc. to the `<rt>` element.
1450
- */
1451
- rubyStyle?: TextStyle;
1452
- /**
1453
- * The parsed `a:rubyPr` node, kept verbatim so its attributes (`hps`,
1454
- * `hpsRaise`, `hpsBaseText`, `lid`, ...) round-trip exactly; only an
1455
- * edited {@link rubyAlignment} is written over it on save.
1456
- */
1457
- rubyPropertiesXml?: XmlObject;
1458
- /**
1459
- * What each of a ruby run's two base-side `a:rPr`s authored on its own:
1460
- * `outer` is the containing `a:r`'s, `base` the `a:rubyBase` run's. The
1461
- * flat {@link style} merges both for rendering; these let the writer give
1462
- * each `a:rPr` back only its own properties (plus any later edit).
1463
- */
1464
- rubyRunAuthoredStyles?: {
1465
- outer?: TextStyle;
1466
- base?: TextStyle;
1467
- };
1468
- }
1469
- //#endregion
1470
3
  //#region pptx/core/types/shape-style.d.ts
1471
4
  interface PptxCustomDashSegment {
1472
5
  /** Dash length as a non-negative percentage in thousandths of one percent. */
@@ -2329,345 +862,43 @@ interface PptxImageProperties {
2329
862
  */
2330
863
  fillRectLeft?: number;
2331
864
  /** Stretch target inset from the top frame edge (`a:fillRect/@t`). */
2332
- fillRectTop?: number;
2333
- /** Stretch target inset from the right frame edge (`a:fillRect/@r`). */
2334
- fillRectRight?: number;
2335
- /** Stretch target inset from the bottom frame edge (`a:fillRect/@b`). */
2336
- fillRectBottom?: number;
2337
- /** Image tiling offset X in px. */
2338
- tileOffsetX?: number;
2339
- /** Image tiling offset Y in px. */
2340
- tileOffsetY?: number;
2341
- /** Image tiling scale X as percentage (100 = 100%). */
2342
- tileScaleX?: number;
2343
- /** Image tiling scale Y as percentage (100 = 100%). */
2344
- tileScaleY?: number;
2345
- /** Image tiling flip mode. */
2346
- tileFlip?: 'none' | 'x' | 'y' | 'xy';
2347
- /** Image tiling alignment. */
2348
- tileAlignment?: string;
2349
- /**
2350
- * Print-resolution hint in DPI (`a:blipFill/@dpi`). PowerPoint records this
2351
- * when it downsamples an embedded image for a target print quality; it has
2352
- * no on-screen rendering effect (a `0`/absent value means "use the source
2353
- * image's native resolution"). Parsed for round-trip / API fidelity only.
2354
- */
2355
- dpi?: number;
2356
- /** Image recolour/artistic effect properties. */
2357
- imageEffects?: PptxImageEffects;
2358
- /**
2359
- * Crop-to-shape (CSS clip-path shape name).
2360
- *
2361
- * PowerPoint implements "Crop to Shape" by writing the picture's own
2362
- * `a:prstGeom`, so this is a typed view over `shapeType`: on load it is
2363
- * derived from the preset (`ellipse` -> `'ellipse'`, `roundRect` ->
2364
- * `'roundedRect'`, `star5` -> `'star'`, ...; see
2365
- * `utils/crop-shape-geometry`), and on save a changed value rewrites the
2366
- * preset. `'none'` / `undefined` leaves the geometry alone.
2367
- */
2368
- cropShape?: PptxCropShape;
2369
- }
2370
- //#endregion
2371
- //#region pptx/core/types/geometry.d.ts
2372
- /**
2373
- * Geometry types: adjustment handles, custom geometry points, segments,
2374
- * paths, and custom path properties.
2375
- *
2376
- * @module pptx-types/geometry
2377
- */
2378
- /**
2379
- * Defines an adjustment handle position for a shape geometry.
2380
- *
2381
- * Adjustment handles allow users to interactively reshape preset shapes
2382
- * (e.g. rounding a rectangle corner or adjusting arrow head width).
2383
- *
2384
- * @example
2385
- * ```ts
2386
- * const handle: GeometryAdjustmentHandle = {
2387
- * guideName: "adj",
2388
- * xFraction: 0.25,
2389
- * minValue: 0,
2390
- * maxValue: 50000,
2391
- * };
2392
- * // => satisfies GeometryAdjustmentHandle
2393
- * ```
2394
- */
2395
- interface GeometryAdjustmentHandle {
2396
- /** Name of the adjustment guide this handle controls (e.g. "adj", "adj1"). */
2397
- guideName: string;
2398
- /** X position as a fraction of shape width (0..1), or undefined if the handle only moves vertically. */
2399
- xFraction?: number;
2400
- /** Y position as a fraction of shape height (0..1), or undefined if the handle only moves horizontally. */
2401
- yFraction?: number;
2402
- /** Minimum allowed value for the adjustment guide. */
2403
- minValue?: number;
2404
- /** Maximum allowed value for the adjustment guide. */
2405
- maxValue?: number;
2406
- }
2407
- /**
2408
- * A single point in a custom geometry path.
2409
- *
2410
- * @example
2411
- * ```ts
2412
- * const pt: CustomGeometryPoint = { x: 100, y: 200 };
2413
- * // => satisfies CustomGeometryPoint
2414
- * ```
2415
- */
2416
- interface CustomGeometryPoint {
2417
- x: number;
2418
- y: number;
2419
- }
2420
- /**
2421
- * A segment within a custom geometry path.
2422
- *
2423
- * Discriminated union over `type` — can be a moveTo, lineTo,
2424
- * cubic Bézier, quadratic Bézier, or close command.
2425
- *
2426
- * @example
2427
- * ```ts
2428
- * const segments: CustomGeometrySegment[] = [
2429
- * { type: "moveTo", pt: { x: 0, y: 0 } },
2430
- * { type: "lineTo", pt: { x: 100, y: 0 } },
2431
- * { type: "lineTo", pt: { x: 100, y: 100 } },
2432
- * { type: "close" },
2433
- * ];
2434
- * // => satisfies CustomGeometrySegment[]
2435
- * ```
2436
- */
2437
- type CustomGeometrySegment = {
2438
- type: 'moveTo';
2439
- pt: CustomGeometryPoint;
2440
- } | {
2441
- type: 'lineTo';
2442
- pt: CustomGeometryPoint;
2443
- } | {
2444
- type: 'cubicBezTo';
2445
- pts: [CustomGeometryPoint, CustomGeometryPoint, CustomGeometryPoint];
2446
- } | {
2447
- type: 'quadBezTo';
2448
- pts: [CustomGeometryPoint, CustomGeometryPoint];
2449
- } | {
2450
- type: 'arcTo';
2451
- /** Horizontal radius of the ellipse. */
2452
- wR: number;
2453
- /** Vertical radius of the ellipse. */
2454
- hR: number;
2455
- /** Start angle in 60000ths of a degree. */
2456
- stAng: number;
2457
- /** Sweep angle in 60000ths of a degree. */
2458
- swAng: number;
2459
- } | {
2460
- type: 'close';
2461
- };
2462
- /**
2463
- * A single sub-path in a custom geometry definition (maps to one `a:path`).
2464
- *
2465
- * @example
2466
- * ```ts
2467
- * const path: CustomGeometryPath = {
2468
- * width: 100,
2469
- * height: 100,
2470
- * segments: [
2471
- * { type: "moveTo", pt: { x: 0, y: 0 } },
2472
- * { type: "lineTo", pt: { x: 100, y: 100 } },
2473
- * ],
2474
- * };
2475
- * // => satisfies CustomGeometryPath
2476
- * ```
2477
- */
2478
- interface CustomGeometryPath {
2479
- /** Coordinate-space width for this sub-path. */
2480
- width: number;
2481
- /** Coordinate-space height for this sub-path. */
2482
- height: number;
2483
- /** Ordered list of drawing segments. */
2484
- segments: CustomGeometrySegment[];
2485
- /** Path fill mode (`a:path/@fill`): norm, lighten, lightenLess, darken, darkenLess, none. */
2486
- fillMode?: 'norm' | 'lighten' | 'lightenLess' | 'darken' | 'darkenLess' | 'none';
2487
- /** Whether the path is stroked (`a:path/@stroke`). */
2488
- stroke?: boolean;
2489
- /** 3D extrusion compatibility (`a:path/@extrusionOk`). */
2490
- extrusionOk?: boolean;
2491
- }
2492
- /**
2493
- * Auxiliary raw XML preserved from `a:custGeom` for round-trip serialization.
2494
- * These are stored opaquely so adjustment guides, handles, connection sites,
2495
- * and the text rectangle are not lost when a custGeom is edited and saved.
2496
- */
2497
- interface CustomGeometryRawData {
2498
- /** Raw `a:avLst` XML content (adjustment value list). */
2499
- avLstXml?: unknown;
2500
- /** Raw `a:gdLst` XML content (guide list). */
2501
- gdLstXml?: unknown;
2502
- /** Raw `a:ahLst` XML content (adjustment handles). */
2503
- ahLstXml?: unknown;
2504
- /** Raw `a:cxnLst` XML content (connection sites). */
2505
- cxnLstXml?: unknown;
2506
- /** Raw `a:rect` XML content (text rectangle). */
2507
- rectXml?: unknown;
2508
- /**
2509
- * Raw `a:pathLst` XML content: every `a:path`'s formula-bearing `a:pt`
2510
- * x/y attributes, `a:arcTo` params, `a:close`, and per-path `@w`/`@h`/
2511
- * `@fill`/`@stroke`/`@extrusionOk`, preserved verbatim (not the
2512
- * parse-time-resolved numbers in `customGeometryPaths`). Lets a live
2513
- * `shapeAdjustments` drag re-evaluate the outline against the CURRENT
2514
- * guide values instead of the ones baked in at parse time; see
2515
- * `geometry/custom-geometry-live-eval.ts`.
2516
- */
2517
- pathLstXml?: unknown;
2518
- }
2519
- /**
2520
- * XY-style adjustment handle (`a:ahXY`) on a custom geometry.
2521
- *
2522
- * Allows interactive editing of one or two guide values constrained to a
2523
- * rectangular range. Coordinates are formula references (e.g. `"adj1"`,
2524
- * `"w/2"`, `"0"`) preserved verbatim so they can re-emit unchanged.
2525
- *
2526
- * @example
2527
- * ```ts
2528
- * const handle: AdjustHandleXY = {
2529
- * gdRefX: "adj1",
2530
- * minX: "0",
2531
- * maxX: "w",
2532
- * posX: "adj1",
2533
- * posY: "h/2",
2534
- * };
2535
- * // => satisfies AdjustHandleXY
2536
- * ```
2537
- */
2538
- interface AdjustHandleXY {
2539
- /** Guide reference for the X axis (`@_gdRefX`). */
2540
- gdRefX?: string;
2541
- /** Guide reference for the Y axis (`@_gdRefY`). */
2542
- gdRefY?: string;
2543
- /** Minimum X value, as a formula reference (`@_minX`). */
2544
- minX?: string;
2545
- /** Maximum X value (`@_maxX`). */
2546
- maxX?: string;
2547
- /** Minimum Y value (`@_minY`). */
2548
- minY?: string;
2549
- /** Maximum Y value (`@_maxY`). */
2550
- maxY?: string;
2551
- /** Handle position X (formula or literal) from `a:pos/@_x`. */
2552
- posX?: string;
2553
- /** Handle position Y from `a:pos/@_y`. */
2554
- posY?: string;
2555
- }
2556
- /**
2557
- * Polar-style adjustment handle (`a:ahPolar`) on a custom geometry.
2558
- *
2559
- * Drives a guide via radial distance and angle rather than XY coordinates.
2560
- *
2561
- * @example
2562
- * ```ts
2563
- * const handle: AdjustHandlePolar = {
2564
- * gdRefR: "adj1",
2565
- * gdRefAng: "adj2",
2566
- * posX: "wd2",
2567
- * posY: "hd2",
2568
- * };
2569
- * // => satisfies AdjustHandlePolar
2570
- * ```
2571
- */
2572
- interface AdjustHandlePolar {
2573
- /** Guide reference for the radial distance (`@_gdRefR`). */
2574
- gdRefR?: string;
2575
- /** Guide reference for the angle (`@_gdRefAng`). */
2576
- gdRefAng?: string;
2577
- /** Minimum radial value (`@_minR`). */
2578
- minR?: string;
2579
- /** Maximum radial value (`@_maxR`). */
2580
- maxR?: string;
2581
- /** Minimum angle (`@_minAng`). */
2582
- minAng?: string;
2583
- /** Maximum angle (`@_maxAng`). */
2584
- maxAng?: string;
2585
- /** Handle position X from `a:pos/@_x`. */
2586
- posX?: string;
2587
- /** Handle position Y from `a:pos/@_y`. */
2588
- posY?: string;
2589
- }
2590
- /**
2591
- * Connection site (`a:cxn`) on a custom geometry.
2592
- *
2593
- * Defines a point on a custom shape that connectors may snap to.
2594
- *
2595
- * @example
2596
- * ```ts
2597
- * const cxn: ConnectionSite = { ang: "0", posX: "0", posY: "hd2" };
2598
- * // => satisfies ConnectionSite
2599
- * ```
2600
- */
2601
- interface ConnectionSite {
2602
- /** Approach angle (`@_ang`) — formula or literal degree-1/60000 value. */
2603
- ang?: string;
2604
- /** Site position X from `a:pos/@_x`. */
2605
- posX?: string;
2606
- /** Site position Y from `a:pos/@_y`. */
2607
- posY?: string;
2608
- }
2609
- /**
2610
- * Typed text rectangle (`a:rect`) on a custom geometry.
2611
- *
2612
- * Each edge is the formula or literal string preserved from the source XML
2613
- * (`"l"`, `"t"`, `"r"`, `"b"`, or any guide name / formula).
2614
- */
2615
- interface CustomGeometryTextRect {
2616
- /** Left edge formula reference (`@_l`). */
2617
- l?: string;
2618
- /** Top edge (`@_t`). */
2619
- t?: string;
2620
- /** Right edge (`@_r`). */
2621
- r?: string;
2622
- /** Bottom edge (`@_b`). */
2623
- b?: string;
2624
- }
2625
- /**
2626
- * Custom (non-preset) geometry path — only on shapes and pictures.
2627
- *
2628
- * Contains SVG path data and/or structured custom geometry paths
2629
- * parsed from `a:custGeom/a:pathLst`.
2630
- *
2631
- * @example
2632
- * ```ts
2633
- * const custom: PptxCustomPathProperties = {
2634
- * pathData: "M 0 0 L 100 0 L 100 100 Z",
2635
- * pathWidth: 100,
2636
- * pathHeight: 100,
2637
- * };
2638
- * // => satisfies PptxCustomPathProperties
2639
- * ```
2640
- */
2641
- interface PptxCustomPathProperties {
2642
- /** SVG path data for custom shapes. */
2643
- pathData?: string;
2644
- /** Coordinate-space width for the custom path. */
2645
- pathWidth?: number;
2646
- /** Coordinate-space height for the custom path. */
2647
- pathHeight?: number;
2648
- /** Structured custom geometry paths for editing (maps to a:custGeom/a:pathLst). */
2649
- customGeometryPaths?: CustomGeometryPath[];
2650
- /** Raw adjustment/guide/handle/connection/text-rectangle XML preserved for serialization. */
2651
- customGeometryRawData?: CustomGeometryRawData;
2652
- /**
2653
- * Typed XY adjustment handles parsed from `a:custGeom/a:ahLst/a:ahXY`.
2654
- * SDK-built shapes can populate this and the writer will emit `<a:ahXY>` entries
2655
- * even when no raw XML was preserved.
2656
- */
2657
- customGeometryAdjustHandlesXY?: AdjustHandleXY[];
2658
- /**
2659
- * Typed polar adjustment handles parsed from `a:custGeom/a:ahLst/a:ahPolar`.
2660
- */
2661
- customGeometryAdjustHandlesPolar?: AdjustHandlePolar[];
865
+ fillRectTop?: number;
866
+ /** Stretch target inset from the right frame edge (`a:fillRect/@r`). */
867
+ fillRectRight?: number;
868
+ /** Stretch target inset from the bottom frame edge (`a:fillRect/@b`). */
869
+ fillRectBottom?: number;
870
+ /** Image tiling offset X in px. */
871
+ tileOffsetX?: number;
872
+ /** Image tiling offset Y in px. */
873
+ tileOffsetY?: number;
874
+ /** Image tiling scale X as percentage (100 = 100%). */
875
+ tileScaleX?: number;
876
+ /** Image tiling scale Y as percentage (100 = 100%). */
877
+ tileScaleY?: number;
878
+ /** Image tiling flip mode. */
879
+ tileFlip?: 'none' | 'x' | 'y' | 'xy';
880
+ /** Image tiling alignment. */
881
+ tileAlignment?: string;
2662
882
  /**
2663
- * Typed connection sites parsed from `a:custGeom/a:cxnLst/a:cxn`.
883
+ * Print-resolution hint in DPI (`a:blipFill/@dpi`). PowerPoint records this
884
+ * when it downsamples an embedded image for a target print quality; it has
885
+ * no on-screen rendering effect (a `0`/absent value means "use the source
886
+ * image's native resolution"). Parsed for round-trip / API fidelity only.
2664
887
  */
2665
- customGeometryConnectionSites?: ConnectionSite[];
888
+ dpi?: number;
889
+ /** Image recolour/artistic effect properties. */
890
+ imageEffects?: PptxImageEffects;
2666
891
  /**
2667
- * Typed text rectangle parsed from `a:custGeom/a:rect`. When present this is
2668
- * preferred over {@link customGeometryRawData}'s `rectXml` on save.
892
+ * Crop-to-shape (CSS clip-path shape name).
893
+ *
894
+ * PowerPoint implements "Crop to Shape" by writing the picture's own
895
+ * `a:prstGeom`, so this is a typed view over `shapeType`: on load it is
896
+ * derived from the preset (`ellipse` -> `'ellipse'`, `roundRect` ->
897
+ * `'roundedRect'`, `star5` -> `'star'`, ...; see
898
+ * `utils/crop-shape-geometry`), and on save a changed value rewrites the
899
+ * preset. `'none'` / `undefined` leaves the geometry alone.
2669
900
  */
2670
- customGeometryTextRect?: CustomGeometryTextRect;
901
+ cropShape?: PptxCropShape;
2671
902
  }
2672
903
  //#endregion
2673
904
  //#region pptx/core/types/chart-axis.d.ts
@@ -4295,1422 +2526,292 @@ interface PptxChartData {
4295
2526
  * continues the previous group's label, matching how the source stores a
4296
2527
  * merged category header sparsely.
4297
2528
  */
4298
- categoryLevels?: string[][];
4299
- dateCategories?: PptxChartDateCategories;
4300
- series: PptxChartSeries[];
4301
- /**
4302
- * Series hidden from the plot by PowerPoint's "Chart Filters" feature
4303
- * (Series tab) but still present in the workbook, aggregated across every
4304
- * chart-type container (combo charts can carry more than one). Absent
4305
- * when the chart has no such extension. See {@link PptxChartFilteredSeries}.
4306
- */
4307
- filteredSeries?: PptxChartFilteredSeries[];
4308
- /**
4309
- * `c15:filteredSeriesTitle`: the auto-generated series title text (e.g.
4310
- * "Series 3") PowerPoint preserved when the chart filter hid the series
4311
- * whose data would otherwise have supplied it. See
4312
- * `utils/chart-ext-titles.ts`. Read-mostly like {@link filteredSeries}.
4313
- */
4314
- filteredSeriesTitle?: string;
4315
- /**
4316
- * `c15:filteredCategoryTitle`: the auto-numbered category labels ("1",
4317
- * "2", "3", ...) PowerPoint preserved when the chart filter hid the
4318
- * category axis source entirely. See `utils/chart-ext-titles.ts`.
4319
- */
4320
- filteredCategoryTitle?: string[];
4321
- /** Chart style/formatting metadata. */
4322
- style?: PptxChartStyle;
4323
- /** Grouping mode for bar/area/line charts: 'clustered' | 'stacked' | 'percentStacked' */
4324
- grouping?: 'clustered' | 'stacked' | 'percentStacked';
4325
- /**
4326
- * The source `c:grouping` was `standard`, which {@link grouping} folds into
4327
- * `'clustered'` (a 2D bar chart draws the two the same). A 3D chart draws
4328
- * `standard` differently: each series on its own depth row. The writer
4329
- * emits `standard` again while `grouping` is still `'clustered'`, so the
4330
- * chart round-trips unchanged.
4331
- */
4332
- groupingStandard?: boolean;
4333
- /**
4334
- * Whether the first (or only) series varies its point colours
4335
- * (`c:varyColors/@val`). Pie/doughnut default this on; single-series
4336
- * bar/column honour it by giving each point a distinct palette colour.
4337
- * Absent when the source XML omits `c:varyColors`.
4338
- */
4339
- varyColors?: boolean;
4340
- /**
4341
- * Pie/doughnut start angle in degrees clockwise from 12 o'clock
4342
- * (`c:firstSliceAng/@val`, `ST_FirstSliceAng`, 0 through 360). Absent uses
4343
- * the default 0. Written for generated pie and doughnut charts and
4344
- * reconciled on save for loaded ones (see `utils/chart-group-options.ts`).
4345
- */
4346
- firstSliceAngle?: number;
4347
- /**
4348
- * Doughnut hole diameter as a percentage of the outer diameter
4349
- * (`c:holeSize/@val`, `ST_HoleSize`, 1 through 90). Absent uses the
4350
- * renderer default; a generated doughnut writes 50. Reconciled on save for
4351
- * loaded charts.
4352
- */
4353
- doughnutHoleSize?: number;
4354
- /**
4355
- * Bar series direction (`c:barDir/@val`): `"col"` draws vertical columns,
4356
- * `"bar"` draws horizontal bars. Absent means `"col"` (PowerPoint's own
4357
- * default), so only horizontal bar charts need to carry the field.
4358
- */
4359
- barDirection?: PptxChartBarDirection;
4360
- /**
4361
- * 3-D bar/column shape (`c:bar3DChart/c:shape/@val`). Bar3D only; a plain
4362
- * bar chart has no `c:shape` element. A per-series `c:ser/c:shape`
4363
- * ({@link PptxChartSeries.shape}) overrides this for that series.
4364
- */
4365
- barShape?: PptxBar3DShape;
4366
- /**
4367
- * Radar chart drawing style (`c:radarChart/c:radarStyle/@val`). `standard`
4368
- * draws an outline only, `marker` adds markers at each vertex (PowerPoint's
4369
- * own default for every radar chart it authors), and `filled` paints the
4370
- * enclosed polygon with the series fill and omits markers. Radar only.
4371
- */
4372
- radarStyle?: 'standard' | 'marker' | 'filled';
4373
- /**
4374
- * Whether a surface chart renders as a wireframe grid rather than a solid
4375
- * coloured surface (`c:surfaceChart/c:wireframe/@val` or
4376
- * `c:surface3DChart/c:wireframe/@val`, both modeled as chart type
4377
- * `"surface"`). A `CT_Boolean` element: absent from the source XML
4378
- * defaults to `true` per schema, so `undefined` here means "not present in
4379
- * the source" and callers should treat it as `true`. Surface only.
4380
- */
4381
- wireframe?: boolean;
4382
- /**
4383
- * Whether the surface chart is the 2-D "top view" projection
4384
- * (`c:surfaceChart`, PowerPoint's "Contour" / "Wireframe Contour" types)
4385
- * rather than the 3-D isometric one (`c:surface3DChart`, "3-D Surface" /
4386
- * "3-D Surface (Wireframe)"). Both element names map to chart type
4387
- * `"surface"`; this bit is the only thing that tells the renderer which
4388
- * of the two projections PowerPoint actually drew, since a top-view
4389
- * surface has no Z-axis at all (only category and series axes) while the
4390
- * 3-D one draws all three. Surface only; `undefined` for every other
4391
- * chart type.
4392
- */
4393
- surfaceTopView?: boolean;
4394
- /**
4395
- * Scatter presentation mode (`c:scatterChart/c:scatterStyle/@val`).
4396
- *
4397
- * `lineMarker` (PowerPoint's own default for every scatter it writes) and
4398
- * `smoothMarker` draw a connecting line; `marker` and `none` do not. Whether
4399
- * the MARKERS appear is decided separately by `c:marker/c:symbol`, and
4400
- * whether the LINE appears is further gated by
4401
- * {@link PptxChartSeries.lineNoFill} - PowerPoint expresses "markers only" as
4402
- * `lineMarker` plus an `a:ln/a:noFill`, not as `marker`.
4403
- */
4404
- scatterStyle?: PptxChartScatterStyle;
4405
- /**
4406
- * Bar/column gap between category clusters as a percentage of bar width
4407
- * (`c:gapWidth/@val`, `ST_GapAmount`, 0 through 500). Absent uses the
4408
- * renderer default; a generated bar chart writes 150. Reconciled on save
4409
- * for loaded charts.
4410
- */
4411
- barGapWidth?: number;
4412
- /**
4413
- * Clustered bar/column overlap between series within a category as a
4414
- * percentage (`c:overlap/@val`, `ST_Overlap`, -100 through 100). Absent
4415
- * uses 0. `c:bar3DChart` has no overlap. Written for generated charts and
4416
- * reconciled on save for loaded ones.
4417
- */
4418
- barOverlap?: number;
4419
- /** Internal: path to the chart XML part in the PPTX archive (for round-trip save). */
4420
- chartPartPath?: string;
4421
- /** Internal: relationship ID linking the graphic frame to the chart part. */
4422
- chartRelationshipId?: string;
4423
- /** `null` explicitly removes an existing ChartML data table. */
4424
- dataTable?: PptxChartDataTable | null;
4425
- /** `null` explicitly removes an existing `c:dropLines` element. */
4426
- dropLines?: PptxChartLineStyle | null;
4427
- /** `null` explicitly removes an existing `c:hiLowLines` element. */
4428
- hiLowLines?: PptxChartLineStyle | null;
4429
- /** `null` explicitly removes an existing up/down-bars container. */
4430
- upDownBars?: PptxChartUpDownBars | null;
4431
- axes?: PptxChartAxisFormatting[];
4432
- floor?: PptxChart3DSurface;
4433
- sideWall?: PptxChart3DSurface;
4434
- backWall?: PptxChart3DSurface;
4435
- /** Per-band surface-chart colour overrides (`c:surfaceChart/c:bandFmts`). */
4436
- bandFmts?: PptxChartBandFmt[];
4437
- /** External data source reference (c:externalData) linking to an external workbook. */
4438
- externalData?: PptxExternalData;
4439
- /**
4440
- * Parsed data from the embedded xlsx workbook (from ppt/embeddings/).
4441
- *
4442
- * When a chart references an embedded Excel workbook via `c:externalData`,
4443
- * the xlsx is parsed to extract categories and series. This data serves as
4444
- * a fallback when the chart XML's cached series data is empty or incomplete.
4445
- */
4446
- embeddedWorkbookData?: PptxEmbeddedWorkbookData;
4447
- /**
4448
- * Pivot table data source reference (c:pivotSource).
4449
- *
4450
- * When present, the chart's data originates from a PivotTable.
4451
- * The chart still renders using its cached series data; this field
4452
- * is metadata about the data origin, preserved for round-trip fidelity.
4453
- */
4454
- pivotSource?: PptxChartPivotSource | null;
4455
- /**
4456
- * Whether only visible cells are plotted (c:plotVisOnly).
4457
- * When `true` (the default), hidden cells are excluded from the chart.
4458
- * When `false`, hidden data IS plotted.
4459
- */
4460
- plotVisibleOnly?: boolean;
4461
- /**
4462
- * Color palette extracted from the chart's Office 2013+ color style part
4463
- * (`chartColorStyle*.xml`). When present, this palette takes priority over
4464
- * the `c:style/@val`-derived palette in `getChartStylePalette`.
4465
- *
4466
- * Each entry is a resolved hex colour string (e.g. `"#4472C4"`).
4467
- */
4468
- colorPalette?: string[];
4469
- /**
4470
- * Color cycling method from the chart color style part's `meth` attribute.
4471
- *
4472
- * - `"cycle"`: repeat the palette colours in order (default)
4473
- * - `"withinLinear"`: gradient within each series
4474
- * - `"acrossLinear"`: gradient across series
4475
- */
4476
- colorMethod?: 'cycle' | 'withinLinear' | 'acrossLinear';
4477
- /** Internal source color-style part path used for lossless dirty saves. */
4478
- colorStylePartPath?: string;
4479
- /** Internal parsed palette snapshot used to detect actual edits. */
4480
- colorStyleOriginalPalette?: string[];
4481
- /** Internal parsed method snapshot used to detect actual edits. */
4482
- colorStyleOriginalMethod?: 'cycle' | 'withinLinear' | 'acrossLinear';
4483
- /**
4484
- * Pie-of-pie / Bar-of-pie options (`c:ofPieChart`, CT_OfPieChart).
4485
- *
4486
- * Present only when {@link chartType} is `"ofPie"`. Carries the split
4487
- * configuration, secondary plot size, and serLines flag so that an
4488
- * `ofPieChart` element can be re-emitted on save with full fidelity.
4489
- */
4490
- ofPieOptions?: PptxChartOfPieOptions;
4491
- /** Classic bubble-chart display options (`c:bubbleChart`). */
4492
- bubbleOptions?: PptxBubbleChartOptions;
4493
- /**
4494
- * 3D viewing parameters (`c:view3D`, CT_View3D).
4495
- *
4496
- * Parsed from and emitted to `c:chart/c:view3D`. Absent when the
4497
- * chart XML has no `c:view3D` element.
4498
- */
4499
- view3D?: PptxChartView3D;
4500
- /**
4501
- * Top-level chart chrome flags (`c:autoTitleDeleted`,
4502
- * `c:dispBlanksAs`, `c:showDLblsOverMax`).
4503
- *
4504
- * Each flag is omitted from the emitted XML when absent on the
4505
- * source data, so absence does not produce empty `<c:…/>` placeholders.
4506
- */
4507
- chartChrome?: PptxChartChrome;
4508
- /** `c:chartSpace/c:printSettings`; `null` removes the container on save. */
4509
- printSettings?: PptxChartPrintSettings | null;
4510
- /** `c:chartSpace/c:protection`; `null` removes the container on save. */
4511
- protection?: PptxChartProtection | null;
4512
- /** Editable manual placement for the title, plot area, and legend. */
4513
- layouts?: PptxChartLayouts;
4514
- /**
4515
- * Raw `c:userShapes` XML subtree (a drawing tree) preserved verbatim.
4516
- *
4517
- * `c:userShapes` references a separate drawing part containing
4518
- * shapes drawn over the chart. The reference is preserved as-is so
4519
- * that round-trip save re-emits the original element without
4520
- * attempting to parse the nested drawing tree.
2529
+ categoryLevels?: string[][];
2530
+ dateCategories?: PptxChartDateCategories;
2531
+ series: PptxChartSeries[];
2532
+ /**
2533
+ * Series hidden from the plot by PowerPoint's "Chart Filters" feature
2534
+ * (Series tab) but still present in the workbook, aggregated across every
2535
+ * chart-type container (combo charts can carry more than one). Absent
2536
+ * when the chart has no such extension. See {@link PptxChartFilteredSeries}.
4521
2537
  */
4522
- userShapesXml?: unknown;
2538
+ filteredSeries?: PptxChartFilteredSeries[];
4523
2539
  /**
4524
- * Parsed, renderable drawing-overlay shapes resolved from the separate
4525
- * drawing part referenced by `c:userShapes/@r:id`
4526
- * (`ppt/drawings/drawingN.xml`). Each entry carries chart-relative anchor
4527
- * geometry plus light shape/text formatting so the viewer can render an
4528
- * overlay on top of the chart plot. Render-only: {@link userShapesXml}
4529
- * remains the source of truth for round-trip save.
2540
+ * `c15:filteredSeriesTitle`: the auto-generated series title text (e.g.
2541
+ * "Series 3") PowerPoint preserved when the chart filter hid the series
2542
+ * whose data would otherwise have supplied it. See
2543
+ * `utils/chart-ext-titles.ts`. Read-mostly like {@link filteredSeries}.
4530
2544
  */
4531
- userShapes?: PptxChartUserShape[];
2545
+ filteredSeriesTitle?: string;
4532
2546
  /**
4533
- * Raw `c:pivotFmts` XML subtree preserved verbatim.
4534
- *
4535
- * `c:pivotFmts` carries a list of `c:pivotFmt` formatting overrides
4536
- * for charts whose data originates from a PivotTable. Preserved
4537
- * verbatim for round-trip fidelity.
2547
+ * `c15:filteredCategoryTitle`: the auto-numbered category labels ("1",
2548
+ * "2", "3", ...) PowerPoint preserved when the chart filter hid the
2549
+ * category axis source entirely. See `utils/chart-ext-titles.ts`.
4538
2550
  */
4539
- /** Typed pivot-chart format persistence; `null` removes `c:pivotFmts`. */
4540
- pivotFormats?: PptxChartPivotFormats | null;
2551
+ filteredCategoryTitle?: string[];
2552
+ /** Chart style/formatting metadata. */
2553
+ style?: PptxChartStyle;
2554
+ /** Grouping mode for bar/area/line charts: 'clustered' | 'stacked' | 'percentStacked' */
2555
+ grouping?: 'clustered' | 'stacked' | 'percentStacked';
4541
2556
  /**
4542
- * Color-map override (`c:clrMapOvr`) carrying 12 attributes that
4543
- * remap theme colour roles for this chart only. Modeled as a flat
4544
- * `attribute -> value` map (e.g. `{ bg1: 'lt1', accent1: 'accent2' }`)
4545
- * so unknown/future attributes round-trip without code changes.
4546
- * `null` explicitly removes an existing `c:clrMapOvr`; an empty object
4547
- * is treated the same as `null` on save.
2557
+ * The source `c:grouping` was `standard`, which {@link grouping} folds into
2558
+ * `'clustered'` (a 2D bar chart draws the two the same). A 3D chart draws
2559
+ * `standard` differently: each series on its own depth row. The writer
2560
+ * emits `standard` again while `grouping` is still `'clustered'`, so the
2561
+ * chart round-trips unchanged.
4548
2562
  */
4549
- clrMapOvr?: Record<string, string> | null;
2563
+ groupingStandard?: boolean;
4550
2564
  /**
4551
- * Whether the chart's own cached numeric values use the 1904 date epoch
4552
- * (`c:chartSpace/c:date1904/@val`). Independent of, and authoritative over,
4553
- * any embedded workbook's `workbookPr/@date1904` (a chart can lack an
4554
- * embedded workbook entirely, or its cache can legitimately differ from the
4555
- * workbook's current setting). Absent when the source XML omits the
4556
- * element, in which case the 1900 system applies (the schema default).
2565
+ * Whether the first (or only) series varies its point colours
2566
+ * (`c:varyColors/@val`). Pie/doughnut default this on; single-series
2567
+ * bar/column honour it by giving each point a distinct palette colour.
2568
+ * Absent when the source XML omits `c:varyColors`.
4557
2569
  */
4558
- date1904?: boolean;
2570
+ varyColors?: boolean;
4559
2571
  /**
4560
- * PowerPoint's "Rounded corners" chart-area option
4561
- * (`c:chartSpace/c:roundedCorners/@val`). Absent when the source XML omits
4562
- * the element; PowerPoint then draws rounded corners, so square corners
4563
- * need an explicit `false`. Written for generated charts when set, and
4564
- * reconciled on save for loaded ones.
2572
+ * Pie/doughnut start angle in degrees clockwise from 12 o'clock
2573
+ * (`c:firstSliceAng/@val`, `ST_FirstSliceAng`, 0 through 360). Absent uses
2574
+ * the default 0. Written for generated pie and doughnut charts and
2575
+ * reconciled on save for loaded ones (see `utils/chart-group-options.ts`).
4565
2576
  */
4566
- roundedCorners?: boolean;
2577
+ firstSliceAngle?: number;
4567
2578
  /**
4568
- * 3-D chart depth/spacing along the series axis, as a percentage
4569
- * (`c:gapDepth/@val`, `ST_GapAmount`, 0 through 500). Legal on
4570
- * `bar3D`/`area3D`/`line3D`/`surface` chart-type containers only. Read-only
4571
- * for rendering: save round-trips it via the preserved chart XML rather
4572
- * than a typed edit path.
2579
+ * Doughnut hole diameter as a percentage of the outer diameter
2580
+ * (`c:holeSize/@val`, `ST_HoleSize`, 1 through 90). Absent uses the
2581
+ * renderer default; a generated doughnut writes 50. Reconciled on save for
2582
+ * loaded charts.
4573
2583
  */
4574
- gapDepth?: number;
2584
+ doughnutHoleSize?: number;
4575
2585
  /**
4576
- * Parsed Office 2013+ chart-style part (`ppt/charts/style#.xml`,
4577
- * `cs:chartStyle`), providing per-element font/line/fill defaults for
4578
- * whichever built-in "Chart Styles" gallery entry ({@link PptxChartStyle.styleId})
4579
- * is active. Absent when the chart has no such part (common for
4580
- * automation-authored charts, where PowerPoint still implies style 2's
4581
- * look via its own bundled defaults).
2586
+ * Bar series direction (`c:barDir/@val`): `"col"` draws vertical columns,
2587
+ * `"bar"` draws horizontal bars. Absent means `"col"` (PowerPoint's own
2588
+ * default), so only horizontal bar charts need to carry the field.
4582
2589
  */
4583
- chartStyleDefinition?: PptxChartStyleDefinition;
4584
- }
4585
- //#endregion
4586
- //#region diagram/types.d.ts
4587
- /** Resolved SmartArt layout family. */
4588
- type DiagramLayoutType = 'list' | 'process' | 'cycle' | 'hierarchy' | 'relationship' | 'matrix' | 'pyramid' | 'funnel' | 'gear' | 'target' | 'timeline' | 'venn' | 'chevron' | 'bending' | 'unknown';
4589
- /** SmartArt colour scheme presets. */
4590
- type DiagramColorScheme = 'colorful1' | 'colorful2' | 'colorful3' | 'monochromatic1' | 'monochromatic2';
4591
- /** SmartArt visual style intensity. */
4592
- type DiagramStyleIntensity = 'flat' | 'moderate' | 'intense';
4593
- /** A connection (`dgm:cxn`) between two data-model points. */
4594
- interface DiagramConnection {
4595
- /** Stable CT_Cxn model identifier. */
4596
- modelId?: string | null;
4597
- sourceId: string;
4598
- destId: string;
4599
- /** `parOf` (the schema default when omitted), `presOf`, `presParOf`, `unknownRelationship`. */
4600
- type?: string;
4601
- srcOrd?: number;
4602
- destOrd?: number;
4603
- /** Model ID of the parent transition point associated with this edge. */
4604
- parentTransitionId?: string | null;
4605
- /** Model ID of the sibling transition point associated with this edge. */
4606
- siblingTransitionId?: string | null;
4607
- /** Layout presentation identifier used by presentation connections. */
4608
- presentationId?: string | null;
4609
- /** Text typed onto the linked `parTrans`/`sibTrans` transition point, when it carries any. */
4610
- label?: string;
4611
- }
4612
- /** Manual layout overrides (`dgm:prSet/@cust*`) a user applied to a presentation point. */
4613
- interface DiagramNodeCustomLayout {
4614
- /** `custAng`: additional rotation in degrees. */
4615
- angle?: number;
4616
- scaleX?: number;
4617
- scaleY?: number;
4618
- sizeX?: number;
4619
- sizeY?: number;
4620
- flipHorizontal?: boolean;
4621
- flipVertical?: boolean;
4622
- linearFactorX?: number;
4623
- linearFactorY?: number;
4624
- linearFactorNeighborX?: number;
4625
- linearFactorNeighborY?: number;
4626
- radialScaleRadius?: number;
4627
- radialScaleIncrement?: number;
4628
- hasCustomTransform?: boolean;
4629
- }
4630
- //#endregion
4631
- //#region pptx/core/types/smart-art-chrome.d.ts
4632
- /**
4633
- * Background / outline extracted from `dgm:bg` and `dgm:whole`.
4634
- *
4635
- * @example
4636
- * ```ts
4637
- * const chrome: PptxSmartArtChrome = {
4638
- * backgroundColor: "#F0F0F0",
4639
- * outlineColor: "#333333",
4640
- * outlineWidth: 1,
4641
- * };
4642
- * // => satisfies PptxSmartArtChrome
4643
- * ```
4644
- */
4645
- interface PptxSmartArtChrome {
2590
+ barDirection?: PptxChartBarDirection;
4646
2591
  /**
4647
- * Background fill colour (hex). When the real `dgm:bg` fill is a gradient
4648
- * or pattern (see {@link PptxSmartArtChrome.backgroundFillXml}), this is an
4649
- * APPROXIMATION (the gradient's first stop, or the pattern's foreground
4650
- * colour) for a consumer that only wants one display colour, not the full fill.
2592
+ * 3-D bar/column shape (`c:bar3DChart/c:shape/@val`). Bar3D only; a plain
2593
+ * bar chart has no `c:shape` element. A per-series `c:ser/c:shape`
2594
+ * ({@link PptxChartSeries.shape}) overrides this for that series.
4651
2595
  */
4652
- backgroundColor?: string;
2596
+ barShape?: PptxBar3DShape;
4653
2597
  /**
4654
- * Raw `dgm:bg` fill XML, present only when the background is a gradient or
4655
- * pattern fill (a solid fill is fully captured by {@link PptxSmartArtChrome.backgroundColor}
4656
- * alone). Round-trip only: `smartart-save-chrome.ts` re-emits this verbatim
4657
- * instead of flattening the fill to a solid colour on save.
2598
+ * Radar chart drawing style (`c:radarChart/c:radarStyle/@val`). `standard`
2599
+ * draws an outline only, `marker` adds markers at each vertex (PowerPoint's
2600
+ * own default for every radar chart it authors), and `filled` paints the
2601
+ * enclosed polygon with the series fill and omits markers. Radar only.
4658
2602
  */
4659
- backgroundFillXml?: PptxSmartArtRawBackgroundFill;
4660
- /** Outline stroke colour (hex). */
4661
- outlineColor?: string;
4662
- /** Outline stroke width in points. */
4663
- outlineWidth?: number;
4664
- }
4665
- /**
4666
- * A `dgm:bg` fill this viewer doesn't fully model as first-class chrome
4667
- * (gradient or pattern), preserved verbatim for round-trip. See
4668
- * {@link PptxSmartArtChrome.backgroundFillXml}.
4669
- */
4670
- interface PptxSmartArtRawBackgroundFill {
4671
- /** Local element name of the fill under `dgm:bg` (`gradFill` or `pattFill`). */
4672
- localName: 'gradFill' | 'pattFill';
4673
- /** The fill element's own attributes/children, as parsed. */
4674
- xml: XmlObject;
4675
- }
4676
- //#endregion
4677
- //#region pptx/core/types/smart-art-constraint-rules.d.ts
4678
- type PptxSmartArtConstraintRelationship = 'self' | 'ch' | 'des';
4679
- type PptxSmartArtConstraintOperator = 'none' | 'equ' | 'gte' | 'lte';
4680
- type PptxSmartArtConstraintPointType = 'all' | 'doc' | 'node' | 'norm' | 'nonNorm' | 'asst' | 'nonAsst' | 'parTrans' | 'pres' | 'sibTrans';
4681
- interface PptxSmartArtConstraintTarget {
4682
- for?: PptxSmartArtConstraintRelationship;
4683
- forName?: string;
4684
- pointType?: PptxSmartArtConstraintPointType;
4685
- }
4686
- /** Editable DiagramML CT_Constraint. */
4687
- interface PptxSmartArtConstraint extends PptxSmartArtConstraintTarget {
4688
- type: string;
4689
- referenceType?: string;
4690
- referenceFor?: PptxSmartArtConstraintRelationship;
4691
- referenceForName?: string;
4692
- referencePointType?: PptxSmartArtConstraintPointType;
4693
- operator?: PptxSmartArtConstraintOperator;
4694
- value?: number;
4695
- factor?: number;
4696
- /** Original constraint retained for foreign attributes and extension content. */
4697
- rawXml?: XmlObject;
4698
- }
4699
- /** Editable DiagramML CT_NumericRule. */
4700
- interface PptxSmartArtNumericRule extends PptxSmartArtConstraintTarget {
4701
- type: string;
4702
- value?: number;
4703
- factor?: number;
4704
- max?: number;
4705
- /** Original rule retained for foreign attributes and extension content. */
4706
- rawXml?: XmlObject;
4707
- }
4708
- //#endregion
4709
- //#region pptx/core/types/smart-art-layout-primitives.d.ts
4710
- interface PptxSmartArtLocalizedText {
4711
- value: string;
4712
- language?: string;
4713
- }
4714
- interface PptxSmartArtLayoutCategory {
4715
- type: string;
4716
- priority: number;
4717
- }
4718
- interface PptxSmartArtAlgorithmParameter {
4719
- type: string;
4720
- value?: string;
4721
- }
4722
- /** Typed DiagramML CT_Algorithm data attached to a layout node. */
4723
- interface PptxSmartArtLayoutAlgorithm {
4724
- type: string;
4725
- revision?: number;
4726
- parameters?: PptxSmartArtAlgorithmParameter[];
4727
- }
4728
- interface PptxSmartArtIteratorAttributes {
4729
- name?: string;
4730
- reference?: string;
4731
- axis?: string[];
4732
- pointTypes?: string[];
4733
- hideLastTransition?: boolean[];
4734
- start?: number[];
4735
- count?: number[];
4736
- step?: number[];
4737
- }
4738
- interface PptxSmartArtForEach extends PptxSmartArtIteratorAttributes {
4739
- rawXml?: XmlObject;
4740
- }
4741
- interface PptxSmartArtWhen extends PptxSmartArtIteratorAttributes {
4742
- function: string;
4743
- argument?: string;
4744
- operator: string;
4745
- value: string;
4746
- rawXml?: XmlObject;
4747
- }
4748
- interface PptxSmartArtChoose {
4749
- name?: string;
4750
- when: PptxSmartArtWhen[];
4751
- otherwise?: {
4752
- name?: string;
4753
- rawXml?: XmlObject;
4754
- } | null;
4755
- rawXml?: XmlObject;
4756
- }
4757
- /** A single `dgm:adj/@val` adjustment, keyed by its `@idx` (1-based, like `a:gd`). */
4758
- interface PptxSmartArtShapeAdjustment {
4759
- index: number;
4760
- value: number;
4761
- }
4762
- /**
4763
- * Typed DiagramML CT_Shape data (`dgm:shape`) attached to a layout node: the
4764
- * per-node preset geometry override real (and third-party/custom) layout
4765
- * definitions use so a layoutNode can be e.g. an ellipse or a chevron instead
4766
- * of the arranger family's hardcoded default shape.
4767
- */
4768
- interface PptxSmartArtLayoutNodeShape {
4769
- /** `dgm:shape/@type`: a preset geometry name (`roundRect`, `ellipse`, `chevron`, `conn`, ...). */
4770
- presetGeometry?: string;
4771
- /** `dgm:adjLst/dgm:adj` entries (adjustment index -> value, as authored). */
4772
- adjustments?: PptxSmartArtShapeAdjustment[];
4773
- /** `dgm:shape/@hideGeom`: the shape is present only to size text, never painted. */
4774
- hideGeometry?: boolean;
2603
+ radarStyle?: 'standard' | 'marker' | 'filled';
4775
2604
  /**
4776
- * `dgm:shape/@lkTxEntry` (CT_Shape, boolean, default false): this node is a
4777
- * decorative shape that should mirror its paired content node's text
4778
- * rather than always rendering blank. See `smartart-layout-interpreter-
4779
- * pyramid.ts`'s `arrangePyramid`, the interpreter's one existing
4780
- * synthesized-decorative-shape call site.
2605
+ * Whether a surface chart renders as a wireframe grid rather than a solid
2606
+ * coloured surface (`c:surfaceChart/c:wireframe/@val` or
2607
+ * `c:surface3DChart/c:wireframe/@val`, both modeled as chart type
2608
+ * `"surface"`). A `CT_Boolean` element: absent from the source XML
2609
+ * defaults to `true` per schema, so `undefined` here means "not present in
2610
+ * the source" and callers should treat it as `true`. Surface only.
4781
2611
  */
4782
- lkTxEntry?: boolean;
4783
- }
4784
- //#endregion
4785
- //#region pptx/core/types/smart-art-layout-definition.d.ts
4786
- /** Identity and ordering metadata from DiagramML CT_LayoutNode. */
4787
- interface PptxSmartArtLayoutNode {
4788
- name?: string;
4789
- styleLabel?: string;
4790
- childOrder?: 'b' | 't';
4791
- moveWith?: string;
4792
- algorithm?: PptxSmartArtLayoutAlgorithm;
4793
- forEach?: PptxSmartArtForEach[];
4794
- choose?: PptxSmartArtChoose[];
4795
- constraints?: PptxSmartArtConstraint[];
4796
- rules?: PptxSmartArtNumericRule[];
4797
- /** `dgm:shape`: this node's own preset geometry override, when present. */
4798
- shape?: PptxSmartArtLayoutNodeShape;
4799
- /**
4800
- * `dgm:presOf` (CT_PresentationOf, same iterator shape as `dgm:forEach`):
4801
- * which data-model point(s) this node's OWN text/geometry binds to -
4802
- * `axis: ['self']` the point currently being iterated, `['des']` all of
4803
- * its descendants, `['ch']` its direct children, and so on. Absent or
4804
- * empty `axis` (including a bare `<dgm:presOf/>`) means the node carries
4805
- * no text of its own (a pure positioning/decoration wrapper - `composite`,
4806
- * `sp` spacer, connector cap). See `smartart-layout-interpreter-item-
4807
- * roles.ts`, the one consumer: it is what lets the interpreter tell a
4808
- * text-bearing per-item role (a list layout's `childText`, a card
4809
- * layout's `roleText`/`bodyText`) apart from a same-generation sibling
4810
- * that positions or decorates instead.
4811
- */
4812
- presentationOf?: PptxSmartArtIteratorAttributes;
4813
- /**
4814
- * EVERY `dgm:constr` reachable from this node, including ones declared
4815
- * inside a `dgm:choose`/`dgm:if`/`dgm:else` that wraps THIS layoutNode's
4816
- * `constrLst` (a genuinely conditional constraint set, e.g. one branch
4817
- * per data-point count - `gear`'s composite positions its `gear1`/
4818
- * `gear2`/`gear3` slots this way, so its plain, direct-child-only
4819
- * `constraints` above is empty for it). Stops at a nested `dgm:layoutNode`
4820
- * boundary: that child's own conditional constrLst becomes ITS
4821
- * `allConstraints`, not folded into the parent's. Read-only /
4822
- * interpretation-only - `constraints` above (this node's own DIRECT
4823
- * constrLst) remains the one `applySmartArtLayoutDefinition` round-trips,
4824
- * so editing an unrelated property can never collapse a genuinely
4825
- * conditional constrLst into a single branch. `undefined` when this node
4826
- * declares no constrLst at all, in or out of a choose (the common case);
4827
- * otherwise a superset of `constraints` (every branch, blindly unioned -
4828
- * this interpreter does not evaluate `dgm:choose` conditions when
4829
- * indexing constraints, matching the same "flatten both branches"
4830
- * convention `nestedLayoutNodes` already uses for `children`). See
4831
- * `smartart-constraint-solver.ts`'s `buildConstraintIndex`, the only
4832
- * consumer.
4833
- */
4834
- allConstraints?: PptxSmartArtConstraint[];
4835
- children?: PptxSmartArtLayoutNode[];
4836
- /**
4837
- * The iterator attributes of the ENCLOSING `dgm:forEach` this node was
4838
- * found through, when `nestedLayoutNodes` (`smartart-layout-definition
4839
- * .ts`) reached it by walking one - as opposed to being a direct child of
4840
- * its parent layoutNode, or reached only through a `dgm:choose` wrapper
4841
- * (a condition, not an iteration, leaves this `undefined`).
4842
- *
4843
- * `forEach` above records a node's OWN direct `dgm:forEach` children
4844
- * (which wrap ITS descendants); this is the opposite direction - the
4845
- * forEach that wraps the node ITSELF, one level up. A layoutNode can sit
4846
- * inside more than one enclosing forEach only via nesting, so this is
4847
- * always the SINGLE nearest one, not a list.
4848
- *
4849
- * This is what tells a genuinely repeated per-child template
4850
- * (`axis="ch"`, `ptType` absent or `"node"`) apart from a once-only or
4851
- * transition-only sibling that merely happens to sit inside SOME
4852
- * `dgm:forEach` (a `ptType="parTrans"`/`"sibTrans"` connector, or
4853
- * `axis="followSib" cnt="1"`) - both can be direct siblings under the
4854
- * SAME parent layoutNode (`lProcess1`'s `vertFlow` has one forEach for
4855
- * its `parTrans` connector and a SEPARATE one, `axis="ch"`, for its
4856
- * repeated `child` items; `vertFlow.forEach` bundles both, but only
4857
- * `child.forEachOrigin` says which ONE produced it). See
4858
- * `smartart-layout-interpreter-item-roles-recursive.ts`, the one
4859
- * consumer. Read-only / interpretation-only, like `allConstraints`:
4860
- * never round-tripped by `applySmartArtLayoutDefinition`.
4861
- */
4862
- forEachOrigin?: PptxSmartArtIteratorAttributes;
4863
- /**
4864
- * The conditions of EVERY enclosing `dgm:if` this node was found through,
4865
- * outermost first, when `nestedLayoutNodes` (`smartart-layout-
4866
- * definition.ts`) reached it via one or more `dgm:choose`'s `if` branches
4867
- * (as opposed to a direct child, a `dgm:else` branch contributing no
4868
- * condition of its own - see below - or a `dgm:forEach`, which sets
4869
- * {@link forEachOrigin} instead). ALL must hold (evaluate `!== false`,
4870
- * per {@link chooseGuard}'s own AND semantics - see `evaluateWhen`) for
4871
- * this node's branch to be genuinely live. A caller that already has the
4872
- * data-model node list can use this instead of treating every
4873
- * choose-flattened branch as unconditionally present
4874
- * (`nestedLayoutNodes`' pre-existing "flatten every branch" convention,
4875
- * still the default when this is absent or a caller does not evaluate
4876
- * it) - e.g. `cycle-matrix--fallback-n2.pptx`'s `child1group`..
4877
- * `child4group`, each gated on a DIFFERENT top-level point existing and
4878
- * having its own child (`axis="ch ch" st="N 1" cnt="1 0" func="cnt"
4879
- * op="gte" val="1"`).
4880
- *
4881
- * A CHAIN, not a single condition, because a node can sit inside NESTED
4882
- * `dgm:choose`s whose OWN conditions are each individually necessary -
4883
- * `sub-step-process--hier5.pptx`'s `chLin1`..`chLin7` each sit inside
4884
- * BOTH an outer `dgm:if func="pos" op="equ" val="N"` (which one of the
4885
- * 7 hand-duplicated per-position templates this is) AND an inner,
4886
- * nearly-vacuous `dgm:if func="cnt" op="gte" val="1"` (has >= 1 point at
4887
- * all) - keeping only the NEAREST (inner) one, as an earlier single-
4888
- * condition design did, loses the ONE piece of information (the outer
4889
- * `pos` guard) that actually discriminates `chLin1` from `chLin2`.
4890
- *
4891
- * A `dgm:else` branch contributes NO condition of its own (ECMA-376
4892
- * defines it as "none of the sibling ifs matched", which would need the
4893
- * FULL sibling list's conditions negated and ANDed together, not a
4894
- * single condition - no gallery fixture measured needs an else branch's
4895
- * own guard yet, so it is left unconditional, matching the pre-existing
4896
- * flatten-everything behaviour) but does NOT clear any OUTER ancestor
4897
- * guard already accumulated before it. Evaluate with `smartart-layout-
4898
- * interpreter-when.ts`'s `evaluateWhen`, once per entry, ANDed.
4899
- */
4900
- chooseGuard?: PptxSmartArtWhen[];
4901
- /**
4902
- * ROUND 42: the forEach iterator active WHEN EACH ENTRY of {@link
4903
- * chooseGuard} was declared (index-parallel with it, `undefined` per
4904
- * entry when no forEach was active at that point) - NOT the same as
4905
- * {@link forEachOrigin}, which is always this NODE's own single nearest
4906
- * enclosing forEach, however deep. A `dgm:if` declared ABOVE a `dgm:forEach`
4907
- * that this node's own branch happens to descend through afterwards needs
4908
- * ITS OWN, SHALLOWER anchor for a `func="cnt"`/`"maxDepth"`-family
4909
- * `@axis` condition, not this node's deeper one - `funnel--flat3.pptx`'s
4910
- * `item1`/`item2`/`item3` (`chooseGuard: [Name5's axis="ch" func="cnt"
4911
- * op="gte" val="1"]`, declared directly under the composite root, BEFORE
4912
- * each item's own per-item `dgm:forEach axis="ch" st="2"/"3"/"4" cnt="1"`)
4913
- * is exactly this shape: evaluating Name5's condition anchored to item1's
4914
- * OWN forEach binding (one specific data point, with no children of its
4915
- * own in a flat dataset) wrongly resolves its `axis="ch"` child count to
4916
- * 0 instead of the diagram's real top-level count, dropping the item
4917
- * entirely - `chooseGuardOrigins[i]` for that entry is `undefined`
4918
- * (Name5 sits above ANY forEach), so the guard correctly stays
4919
- * root-relative. See `smartart-layout-interpreter-composite-
4920
- * candidates.ts`'s `guardAllows`, the one production consumer.
4921
- * `undefined` whenever {@link chooseGuard} itself is (no enclosing
4922
- * choose at all).
4923
- */
4924
- chooseGuardOrigins?: (PptxSmartArtIteratorAttributes | undefined)[];
4925
- /**
4926
- * The chain of every enclosing `dgm:choose`'s own GROUP identity + this
4927
- * node's ordinal position within it + THAT branch's own condition,
4928
- * outermost first - identifies WHICH `dgm:choose` instance and WHERE
4929
- * within its own `dgm:if`/`dgm:else` list this node's branch sits, unlike
4930
- * {@link chooseGuard} (a flat AND-chain of every condition with no group/
4931
- * position identity, and no entry at all for a `dgm:else` branch, which
4932
- * has no condition of its own - see that field's doc comment). `id` is a
4933
- * synthetic, process-unique identifier assigned per `dgm:choose` instance
4934
- * during flattening (`smartart-layout-definition-nesting.ts`'s
4935
- * `nestedLayoutNodes`, a monotonic counter - NOT round-tripped, NOT the
4936
- * choose's own `@_name`, which is not guaranteed unique across a whole
4937
- * layoutDef); `ordinal` is 0-based document order within that ONE choose
4938
- * (every `dgm:if` in order, then `dgm:else` last, if present); `guard` is
4939
- * that branch's OWN condition (`undefined` for a `dgm:else` entry, which
4940
- * has none - deliberately kept PER-ENTRY rather than cross-referenced by
4941
- * index against {@link chooseGuard}, whose own length can diverge from
4942
- * this chain's whenever an ancestor `dgm:else` contributed a group
4943
- * position but no guard).
4944
- *
4945
- * Lets a consumer recover ECMA-376's real `dgm:choose` semantics - "the
4946
- * FIRST branch whose condition holds wins, siblings never coexist" -
4947
- * from the flattened `.children` array, where that grouping would
4948
- * otherwise be lost: `balance--hier5.pptx`'s `balance_NN`/`left_NN_M`/
4949
- * `right_NN_M` family (127 members across ~30 NESTED `dgm:choose`
4950
- * instances, not one flat 127-branch choose) needs first-match-wins
4951
- * WITHIN each individual choose to resolve to the single genuinely-live
4952
- * arrangement, not the "every guard-true node is an independent
4953
- * candidate" reading `smartart-layout-interpreter-composite-choose.ts`'s
4954
- * `collectRawCandidates` used before this field existed - see that
4955
- * module's own consumer of this field for the actual selection rule.
4956
- * `undefined` (or an empty array) for a node reached without any
4957
- * enclosing choose (a direct child, or a `dgm:forEach`-only path) -
4958
- * every PRE-EXISTING caller that does not consult this field is
4959
- * unaffected by its mere presence.
4960
- *
4961
- * ROUND 42: `origin` is the forEach iterator active when THIS branch's
4962
- * own `dgm:if`/`dgm:else` was declared (the SAME "declaration time, not
4963
- * whatever descendant ends up carrying it" concept {@link
4964
- * chooseGuardOrigins} exists for) - the anchor a `func="cnt"`/`"maxDepth"`
4965
- * -family condition in `guard` needs, NOT a representative member's own
4966
- * (possibly deeper) `forEachOrigin`. See `smartart-layout-interpreter-
4967
- * composite-choose-groups.ts`'s `winningOrdinalFor`, the one consumer.
4968
- */
4969
- chooseGroups?: {
4970
- id: string;
4971
- ordinal: number;
4972
- guard?: PptxSmartArtWhen;
4973
- origin?: PptxSmartArtIteratorAttributes;
4974
- }[];
4975
- /**
4976
- * Every `dgm:presOf` candidate reachable through a `dgm:choose`/`dgm:if`/
4977
- * `dgm:else` wrapping THIS node's OWN presOf (as opposed to
4978
- * {@link chooseGuard}, which gates the layoutNode's own EXISTENCE), each
4979
- * tagged with the FULL chain of enclosing `dgm:if` conditions that select
4980
- * it (`guard`, empty for an unconditional or `dgm:else`-reached
4981
- * candidate), in document order (every `dgm:if` then `dgm:else` last).
4982
- * `undefined` when this node's presOf is not choose-guarded at all (the
4983
- * overwhelmingly common case) - {@link presentationOf} already carries
4984
- * the one-and-only value then. Exists for a genuinely conditional presOf
4985
- * where TWO OR MORE branches each declare a real, DIFFERENT axis
4986
- * (`funnel--flat3.pptx`'s `item1`/`item2`/`item3`, one literal axis per
4987
- * data-point count): `smartart-layout-definition-constraints.ts`'s
4988
- * `choosePresentationOf` (feeding {@link presentationOf}) can only ever
4989
- * guess ONE branch statically, at parse time, with no diagram to
4990
- * evaluate against; this field lets an interpret-time caller with the
4991
- * actual diagram (`smartart-layout-interpreter-when.ts`'s
4992
- * `resolvePresentationOf`, the one consumer) pick the branch PowerPoint's
4993
- * own runtime would, first-match-wins.
4994
- */
4995
- presentationOfCandidates?: {
4996
- guard: PptxSmartArtWhen[];
4997
- presentationOf: PptxSmartArtIteratorAttributes;
4998
- }[];
4999
- /**
5000
- * SESSION 17: every `dgm:rule` reachable through a `dgm:choose`/`dgm:if`/
5001
- * `dgm:else` wrapping THIS node's `ruleLst` (a genuinely count-gated rule
5002
- * set, e.g. `diverging-radial`'s own `w for="ch" forName="node"` ceiling:
5003
- * 6 `dgm:if cnt<=N` branches, each its own `fact`), tagged with its guard
5004
- * chain - the SAME shape {@link presentationOfCandidates} uses for
5005
- * choose-guarded `presOf`, applied to `dgm:rule`. `undefined` when not
5006
- * choose-guarded (`rules` above then carries the one set, the common
5007
- * case). See `smartart-layout-interpreter-cycle-hub-ratio.ts`'s
5008
- * `resolveHubToNodeRatio` (COM-verified live mechanism, not a guess) for
5009
- * how the guard is evaluated against the real satellite count.
5010
- */
5011
- ruleCandidates?: {
5012
- guard: PptxSmartArtWhen[];
5013
- rule: PptxSmartArtNumericRule;
5014
- }[];
5015
- /**
5016
- * ROUND 39: every `dgm:constr` reachable through a `dgm:choose`/`dgm:if`/
5017
- * `dgm:else` wrapping THIS node's `constrLst` (a genuinely count/position
5018
- * -branched constraint set, e.g. `basic-venn--flat3.pptx`'s composite
5019
- * `Name9` choose, one `ctrX`/`ctrY`/`w`/`h` per data-point-count branch
5020
- * for `circ1`/`circ1Tx`/...), each tagged with its guard chain - the SAME
5021
- * shape {@link presentationOfCandidates}/{@link ruleCandidates} use,
5022
- * applied to `dgm:constr`. `undefined` when not choose-guarded
5023
- * (`allConstraints`/`constraints` above then carry the one set, the
5024
- * common case). See `smartart-constraint-branch-index.ts`'s
5025
- * `selectConstraints` for how the guard is evaluated against the real
5026
- * diagram, and that module's own doc comment for why `allConstraints`'s
5027
- * pre-existing blind union of every branch is not enough on its own.
5028
- */
5029
- constraintCandidates?: {
5030
- guard: PptxSmartArtWhen[];
5031
- constraint: PptxSmartArtConstraint;
5032
- }[];
5033
- }
5034
- /** Metadata and root node from DiagramML CT_DiagramDefinition. */
5035
- interface PptxSmartArtLayoutDefinition {
5036
- uniqueId?: string;
5037
- minimumVersion?: string;
5038
- defaultStyle?: string;
5039
- titles?: PptxSmartArtLocalizedText[];
5040
- descriptions?: PptxSmartArtLocalizedText[];
5041
- categories?: PptxSmartArtLayoutCategory[];
5042
- rootNode: PptxSmartArtLayoutNode;
5043
- /** Original definition retained for constraint evaluation and foreign rules. */
5044
- rawXml?: XmlObject;
2612
+ wireframe?: boolean;
5045
2613
  /**
5046
- * The un-parsed layout-definition part text (starting at `<dgm:layoutDef>`,
5047
- * XML declaration included). `rawXml` above loses the document order of
5048
- * differently-named siblings (the package-wide `fast-xml-parser`
5049
- * configuration groups children into one array per tag), which the
5050
- * per-point DiagramML engine (`core/utils/smartart-engine/`) needs to
5051
- * execute a `layoutNode` body's `forEach`/`choose`/`constrLst` statements
5052
- * in their real declared sequence - see that package's `ordered-xml.ts`.
5053
- * `undefined` when the part could not be read (matches `rawXml`'s own
5054
- * optionality); the engine falls back to the legacy interpreter then.
2614
+ * Whether the surface chart is the 2-D "top view" projection
2615
+ * (`c:surfaceChart`, PowerPoint's "Contour" / "Wireframe Contour" types)
2616
+ * rather than the 3-D isometric one (`c:surface3DChart`, "3-D Surface" /
2617
+ * "3-D Surface (Wireframe)"). Both element names map to chart type
2618
+ * `"surface"`; this bit is the only thing that tells the renderer which
2619
+ * of the two projections PowerPoint actually drew, since a top-view
2620
+ * surface has no Z-axis at all (only category and series axes) while the
2621
+ * 3-D one draws all three. Surface only; `undefined` for every other
2622
+ * chart type.
5055
2623
  */
5056
- rawXmlText?: string;
5057
- }
5058
- //#endregion
5059
- //#region pptx/core/types/smart-art-node.d.ts
5060
- /**
5061
- * A single run of text inside a SmartArt node, capturing the run text and the
5062
- * raw `a:rPr` run-properties object verbatim so per-run formatting (bold,
5063
- * colour, size, etc.) survives a load -> edit -> save round-trip instead of
5064
- * collapsing to a single unstyled run.
5065
- *
5066
- * @example
5067
- * ```ts
5068
- * const run: PptxSmartArtTextRun = {
5069
- * text: "Bold",
5070
- * rPr: { "@_b": "1", "@_lang": "en-US" },
5071
- * };
5072
- * // => satisfies PptxSmartArtTextRun
5073
- * ```
5074
- */
5075
- interface PptxSmartArtTextRun {
5076
- /** Run text content. */
5077
- text: string;
2624
+ surfaceTopView?: boolean;
5078
2625
  /**
5079
- * Raw parsed `a:rPr` run-properties object, preserved verbatim for
5080
- * round-trip. Untyped XML, hence the loose record shape.
2626
+ * Scatter presentation mode (`c:scatterChart/c:scatterStyle/@val`).
2627
+ *
2628
+ * `lineMarker` (PowerPoint's own default for every scatter it writes) and
2629
+ * `smoothMarker` draw a connecting line; `marker` and `none` do not. Whether
2630
+ * the MARKERS appear is decided separately by `c:marker/c:symbol`, and
2631
+ * whether the LINE appears is further gated by
2632
+ * {@link PptxChartSeries.lineNoFill} - PowerPoint expresses "markers only" as
2633
+ * `lineMarker` plus an `a:ln/a:noFill`, not as `marker`.
5081
2634
  */
5082
- rPr?: Record<string, unknown>;
5083
- /** Resolved standard shape-text style derived from {@link rPr}. */
5084
- style?: TextStyle;
5085
- /** Raw run XML used to retain unmodelled extension children on save. */
5086
- rawXml?: Record<string, unknown>;
5087
- /** Original direct-child order, including unmodelled extension children. */
5088
- childOrder?: string[];
5089
- }
5090
- /** An ordered item within a SmartArt text paragraph. */
5091
- type PptxSmartArtTextParagraphItem = {
5092
- kind: 'run';
5093
- run: PptxSmartArtTextRun;
5094
- } | {
5095
- kind: 'break';
5096
- rPr?: Record<string, unknown>;
5097
- style?: TextStyle;
5098
- rawXml?: Record<string, unknown>;
5099
- childOrder?: string[];
5100
- } | {
5101
- kind: 'field';
5102
- id?: string;
5103
- fieldType?: string;
5104
- text: string;
5105
- rPr?: Record<string, unknown>;
5106
- style?: TextStyle;
5107
- pPr?: Record<string, unknown>;
5108
- rawXml?: Record<string, unknown>;
5109
- childOrder?: string[];
5110
- } | {
5111
- kind: 'tab';
5112
- rawXml?: Record<string, unknown>;
5113
- childOrder?: string[];
5114
- } | {
5115
- kind: 'raw';
5116
- name: string;
5117
- value: unknown;
5118
- };
5119
- /** A complete `a:p` paragraph in a SmartArt data-model text body. */
5120
- interface PptxSmartArtTextParagraph {
5121
- /** Paragraph properties (`a:pPr`) preserved verbatim. */
5122
- pPr?: Record<string, unknown>;
5123
- /** Text children in source order. */
5124
- items: PptxSmartArtTextParagraphItem[];
5125
- /** End-paragraph run properties (`a:endParaRPr`) preserved verbatim. */
5126
- endParaRPr?: Record<string, unknown>;
5127
- /** Resolved style for the paragraph terminator. */
5128
- endParaStyle?: TextStyle;
5129
- /** Raw paragraph XML used to retain unmodelled extension children on save. */
5130
- rawXml?: Record<string, unknown>;
5131
- }
5132
- /**
5133
- * Per-node visual override for a SmartArt node.
5134
- *
5135
- * Captures the individual fill / line / font colour and the bold / italic
5136
- * emphasis a user has set on one specific node, independent of the diagram's
5137
- * colour scheme and quick style. All colours are hex strings (e.g. "#FF0000").
5138
- * Every field is optional: only the overridden aspects are carried, so an
5139
- * empty object means "no per-node override".
5140
- *
5141
- * The parser reads these from the data point's `spPr` solid fill / line colour
5142
- * and the first run's `rPr` (b / i / solidFill) when present, and the save path
5143
- * writes them back so the override survives a load -> edit -> save round-trip.
5144
- *
5145
- * @example
5146
- * ```ts
5147
- * const style: PptxSmartArtNodeStyle = {
5148
- * fillColor: "#FF0000",
5149
- * fontColor: "#FFFFFF",
5150
- * bold: true,
5151
- * };
5152
- * // => satisfies PptxSmartArtNodeStyle
5153
- * ```
5154
- */
5155
- interface PptxSmartArtNodeStyle {
5156
- /** Solid fill colour override (hex, e.g. "#4F81BD"). */
5157
- fillColor?: string;
5158
- /** Outline / line colour override (hex). */
5159
- lineColor?: string;
5160
- /** Text (font) colour override (hex). */
5161
- fontColor?: string;
5162
- /** Bold emphasis override for the node's runs. */
5163
- bold?: boolean;
5164
- /** Italic emphasis override for the node's runs. */
5165
- italic?: boolean;
5166
- }
5167
- /**
5168
- * Manual layout override for a `type="pres"` presentation point, read from its
5169
- * `dgm:prSet` attributes. PowerPoint writes these when the user drags, resizes,
5170
- * rotates, or flips a SmartArt node by hand in its own diagram editor; without
5171
- * them the node silently reverts to its algorithmic position whenever there is
5172
- * no cached `dsp:` drawing part to fall back on.
5173
- *
5174
- * Every field is optional: only the attributes actually present on `prSet` are
5175
- * populated. Angle and scale/factor units are already normalised to degrees and
5176
- * plain ratios (a `custScaleX="150000"` becomes `scaleX: 1.5`), so a consumer
5177
- * never has to know the raw `60000ths-of-a-degree` / `100000ths-of-a-percent`
5178
- * XML encodings.
5179
- *
5180
- * @example
5181
- * ```ts
5182
- * const custom: SmartArtNodeCustomLayout = { angle: 15, scaleX: 1.2 };
5183
- * // => a node manually rotated 15 degrees and widened 20% in PowerPoint
5184
- * ```
5185
- */
5186
- type SmartArtNodeCustomLayout = DiagramNodeCustomLayout;
5187
- /**
5188
- * A single node in the SmartArt data model.
5189
- *
5190
- * @example
5191
- * ```ts
5192
- * const node: PptxSmartArtNode = {
5193
- * id: "1",
5194
- * text: "CEO",
5195
- * children: [
5196
- * { id: "2", text: "VP Marketing", parentId: "1" },
5197
- * { id: "3", text: "VP Engineering", parentId: "1" },
5198
- * ],
5199
- * };
5200
- * // => satisfies PptxSmartArtNode
5201
- * ```
5202
- */
5203
- interface PptxSmartArtNode {
5204
- id: string;
5205
- text: string;
5206
- /** CT_Pt connection identifier, when the point references a connection. */
5207
- connectionId?: string | null;
5208
- parentId?: string;
5209
- children?: PptxSmartArtNode[];
5210
- /** Node type from `@_type` attribute (e.g. "doc", "node", "asst", "pres"). */
5211
- nodeType?: string;
2635
+ scatterStyle?: PptxChartScatterStyle;
5212
2636
  /**
5213
- * The node's own quick-style role (`dgm:prSet/@presStyleLbl` from its
5214
- * paired `type="pres"` presentation point, resolved via a `presOf`
5215
- * connection back to this content point). Structural names like `node1`,
5216
- * `asst2`, `bgShp`, `revTx`; distinct from {@link nodeType}, which is the
5217
- * data-model `@_type` ("node"/"asst"/...). Used to pick this node's own
5218
- * colour list from a colour transform's per-role palettes instead of the
5219
- * generic cycled palette (see `applySmartArtRoleColors`).
2637
+ * Bar/column gap between category clusters as a percentage of bar width
2638
+ * (`c:gapWidth/@val`, `ST_GapAmount`, 0 through 500). Absent uses the
2639
+ * renderer default; a generated bar chart writes 150. Reconciled on save
2640
+ * for loaded charts.
5220
2641
  */
5221
- styleRole?: string;
2642
+ barGapWidth?: number;
5222
2643
  /**
5223
- * `dgm:prSet/@coherent3DOff` (`CT_ElemPropSet`) resolved from the node's
5224
- * paired presentation point: when true, this node opts out of the
5225
- * diagram's overall coherent-3D scene rotation (a `dgm:scene3d`/`dgm:sp3d`
5226
- * quick-style variation) applied to every other node.
2644
+ * Clustered bar/column overlap between series within a category as a
2645
+ * percentage (`c:overlap/@val`, `ST_Overlap`, -100 through 100). Absent
2646
+ * uses 0. `c:bar3DChart` has no overlap. Written for generated charts and
2647
+ * reconciled on save for loaded ones.
5227
2648
  */
5228
- coherent3DOff?: boolean;
2649
+ barOverlap?: number;
2650
+ /** Internal: path to the chart XML part in the PPTX archive (for round-trip save). */
2651
+ chartPartPath?: string;
2652
+ /** Internal: relationship ID linking the graphic frame to the chart part. */
2653
+ chartRelationshipId?: string;
2654
+ /** `null` explicitly removes an existing ChartML data table. */
2655
+ dataTable?: PptxChartDataTable | null;
2656
+ /** `null` explicitly removes an existing `c:dropLines` element. */
2657
+ dropLines?: PptxChartLineStyle | null;
2658
+ /** `null` explicitly removes an existing `c:hiLowLines` element. */
2659
+ hiLowLines?: PptxChartLineStyle | null;
2660
+ /** `null` explicitly removes an existing up/down-bars container. */
2661
+ upDownBars?: PptxChartUpDownBars | null;
2662
+ axes?: PptxChartAxisFormatting[];
2663
+ floor?: PptxChart3DSurface;
2664
+ sideWall?: PptxChart3DSurface;
2665
+ backWall?: PptxChart3DSurface;
2666
+ /** Per-band surface-chart colour overrides (`c:surfaceChart/c:bandFmts`). */
2667
+ bandFmts?: PptxChartBandFmt[];
2668
+ /** External data source reference (c:externalData) linking to an external workbook. */
2669
+ externalData?: PptxExternalData;
5229
2670
  /**
5230
- * The layout variables PowerPoint recorded for each presentation node
5231
- * this point drives (`dgm:prSet/@presName` -> `dgm:presLayoutVars`
5232
- * variable -> `@val`), e.g. `{ hierRoot1: { hierBranch: 'l' } }` for an
5233
- * org-chart manager set to "Left Hanging". Read-only: the presentation
5234
- * points themselves round-trip verbatim.
2671
+ * Parsed data from the embedded xlsx workbook (from ppt/embeddings/).
2672
+ *
2673
+ * When a chart references an embedded Excel workbook via `c:externalData`,
2674
+ * the xlsx is parsed to extract categories and series. This data serves as
2675
+ * a fallback when the chart XML's cached series data is empty or incomplete.
5235
2676
  */
5236
- presLayoutVarsByName?: Record<string, Record<string, string>>;
2677
+ embeddedWorkbookData?: PptxEmbeddedWorkbookData;
5237
2678
  /**
5238
- * Per-run text + run-properties for the node's first paragraph, captured at
5239
- * parse time. When the joined run text still equals {@link text} (the node
5240
- * was not edited, or was edited only in ways that preserve the run split),
5241
- * the save path rebuilds the paragraph from these runs so per-run rich text
5242
- * is not flattened. When {@link text} diverges, the runs are ignored.
2679
+ * Pivot table data source reference (c:pivotSource).
2680
+ *
2681
+ * When present, the chart's data originates from a PivotTable.
2682
+ * The chart still renders using its cached series data; this field
2683
+ * is metadata about the data origin, preserved for round-trip fidelity.
5243
2684
  */
5244
- runs?: PptxSmartArtTextRun[];
2685
+ pivotSource?: PptxChartPivotSource | null;
5245
2686
  /**
5246
- * Complete typed paragraph model. Unlike {@link runs}, this retains every
5247
- * paragraph and the ordered run, field, break, and tab children within it.
2687
+ * Whether only visible cells are plotted (c:plotVisOnly).
2688
+ * When `true` (the default), hidden cells are excluded from the chart.
2689
+ * When `false`, hidden data IS plotted.
5248
2690
  */
5249
- paragraphs?: PptxSmartArtTextParagraph[];
2691
+ plotVisibleOnly?: boolean;
5250
2692
  /**
5251
- * Optional per-node visual override (fill / line / font colour, bold /
5252
- * italic). Read at parse time from the point's `spPr` / first-run `rPr`, set
5253
- * by the editing op, honoured by the render path, and written back on save so
5254
- * it round-trips.
2693
+ * Color palette extracted from the chart's Office 2013+ color style part
2694
+ * (`chartColorStyle*.xml`). When present, this palette takes priority over
2695
+ * the `c:style/@val`-derived palette in `getChartStylePalette`.
2696
+ *
2697
+ * Each entry is a resolved hex colour string (e.g. `"#4472C4"`).
5255
2698
  */
5256
- style?: PptxSmartArtNodeStyle;
2699
+ colorPalette?: string[];
5257
2700
  /**
5258
- * Manual layout override read from the node's `dgm:prSet` `cust*`
5259
- * attributes (drag/resize/rotate/flip performed in PowerPoint's own diagram
5260
- * editor). Applied as a final transform after algorithmic layout by
5261
- * {@link module:smartart-layout-interpreter-custom} so it survives even
5262
- * when there is no cached `dsp:` drawing to fall back on.
2701
+ * Color cycling method from the chart color style part's `meth` attribute.
2702
+ *
2703
+ * - `"cycle"`: repeat the palette colours in order (default)
2704
+ * - `"withinLinear"`: gradient within each series
2705
+ * - `"acrossLinear"`: gradient across series
5263
2706
  */
5264
- customLayout?: SmartArtNodeCustomLayout;
5265
- }
5266
- //#endregion
5267
- //#region pptx/core/types/smart-art-style-definition.d.ts
5268
- interface PptxSmartArtDefinitionText {
5269
- value: string;
5270
- language?: string;
5271
- }
5272
- interface PptxSmartArtDefinitionCategory {
5273
- type: string;
5274
- priority: number;
5275
- }
5276
- type PptxSmartArtColorApplicationMethod = 'span' | 'cycle' | 'repeat';
5277
- type PptxSmartArtHueDirection = 'cw' | 'ccw';
5278
- /** CT_Colors application metadata. Color-choice children remain preserved XML. */
5279
- interface PptxSmartArtColorListMetadata {
5280
- method?: PptxSmartArtColorApplicationMethod;
5281
- hueDirection?: PptxSmartArtHueDirection;
5282
- }
5283
- /**
5284
- * A quick-style label's `a:lnRef`/`a:fillRef`/`a:effectRef`/`a:fontRef`
5285
- * (`CT_ShapeStyle`, the same complex type an ordinary shape's `p:style`
5286
- * uses), resolved against the theme's `fmtScheme` at parse time instead of
5287
- * the coarse subtle/moderate/intense enum ({@link PptxSmartArtQuickStyle.effectIntensity}).
5288
- * Only populated when a theme format scheme was available when the quick
5289
- * style was parsed. See G13 in the 2026-09 diagram audit.
5290
- */
5291
- interface PptxSmartArtResolvedStyleRef {
5292
- fillColor?: string;
5293
- fillMode?: 'solid' | 'gradient' | 'pattern' | 'none' | 'theme';
5294
- strokeColor?: string;
5295
- strokeWidth?: number;
5296
- /** `a:effectRef`'s theme-resolved outer shadow colour, when the style has one. */
5297
- shadowColor?: string;
5298
- /** `a:fontRef`'s theme-resolved typeface (`+mn-lt`/`+mj-lt` -> the theme's actual font). */
5299
- fontTypeface?: string;
5300
- }
5301
- /** CT_StyleLabel metadata from a quick-style definition. */
5302
- interface PptxSmartArtQuickStyleLabel {
5303
- name: string;
5304
- /** Theme-resolved `dgm:style` refs for this label's role, when available. */
5305
- resolvedStyle?: PptxSmartArtResolvedStyleRef;
2707
+ colorMethod?: 'cycle' | 'withinLinear' | 'acrossLinear';
2708
+ /** Internal source color-style part path used for lossless dirty saves. */
2709
+ colorStylePartPath?: string;
2710
+ /** Internal parsed palette snapshot used to detect actual edits. */
2711
+ colorStyleOriginalPalette?: string[];
2712
+ /** Internal parsed method snapshot used to detect actual edits. */
2713
+ colorStyleOriginalMethod?: 'cycle' | 'withinLinear' | 'acrossLinear';
5306
2714
  /**
5307
- * The label's own `dgm:scene3d` (per-shape camera + light rig). PowerPoint
5308
- * copies it onto a shape's cached `a:scene3d` unless it is the default
5309
- * front camera with a `threePt` light (see `applySmartArtQuickStyle3d`).
2715
+ * Pie-of-pie / Bar-of-pie options (`c:ofPieChart`, CT_OfPieChart).
2716
+ *
2717
+ * Present only when {@link chartType} is `"ofPie"`. Carries the split
2718
+ * configuration, secondary plot size, and serLines flag so that an
2719
+ * `ofPieChart` element can be re-emitted on save with full fidelity.
5310
2720
  */
5311
- scene3d?: Pptx3DScene;
5312
- /** The label's own `dgm:sp3d` (bevel / extrusion / contour / material); absent when empty. */
5313
- shape3d?: Pptx3DShape;
5314
- /** The label's `dgm:txPr/a:sp3d` label-text extrusion (Bird's Eye Scene). */
5315
- text3d?: Text3DStyle;
5316
- }
5317
- /** CT_CTStyleLabel metadata from a color-transform definition. */
5318
- interface PptxSmartArtColorStyleLabel {
5319
- name: string;
5320
- fill?: PptxSmartArtColorListMetadata;
5321
- line?: PptxSmartArtColorListMetadata;
5322
- effect?: PptxSmartArtColorListMetadata;
5323
- textLine?: PptxSmartArtColorListMetadata;
5324
- textFill?: PptxSmartArtColorListMetadata;
5325
- textEffect?: PptxSmartArtColorListMetadata;
5326
- }
5327
- interface PptxSmartArtDefinitionMetadata {
5328
- uniqueId?: string;
5329
- minimumVersion?: string;
5330
- titles?: PptxSmartArtDefinitionText[];
5331
- descriptions?: PptxSmartArtDefinitionText[];
5332
- categories?: PptxSmartArtDefinitionCategory[];
5333
- }
5334
- /** Typed CT_ColorTransform metadata and the resolved legacy color palette. */
5335
- interface PptxSmartArtColorTransform extends PptxSmartArtDefinitionMetadata {
5336
- /** Legacy resolved display name. */
5337
- name?: string;
5338
- /** Ordered resolved fill colors for rendering. */
5339
- fillColors: string[];
5340
- /** Ordered resolved line colors for rendering. */
5341
- lineColors: string[];
5342
- /** Ordered resolved text-fill colors (primary styleLbl `txFillClrLst`). */
5343
- textFillColors?: string[];
5344
- /** Ordered resolved text-line colors (primary styleLbl `txLinClrLst`). */
5345
- textLineColors?: string[];
5346
- /** Ordered resolved effect colors (primary styleLbl `effectClrLst`). */
5347
- effectColors?: string[];
5348
- /** Ordered resolved text-effect colors (primary styleLbl `txEffectClrLst`). */
5349
- textEffectColors?: string[];
5350
- /** Fill-list span/cycle + hue-direction interpolation of the primary styleLbl. */
5351
- fillInterpolation?: PptxSmartArtColorListMetadata;
5352
- /** Line-list span/cycle + hue-direction interpolation of the primary styleLbl. */
5353
- lineInterpolation?: PptxSmartArtColorListMetadata;
5354
- /** Ordered CT_CTStyleLabel metadata. */
5355
- labels?: PptxSmartArtColorStyleLabel[];
5356
- /**
5357
- * Every `styleLbl`'s own resolved fill/line colour list, keyed by name
5358
- * (e.g. `node1`, `asst0`, `bgShp`, `revTx`). Unlike {@link fillColors} /
5359
- * {@link lineColors} (which collapse to ONE "primary" node-role list),
5360
- * this keeps every role so a node can be coloured from its OWN role's
5361
- * palette (see `PptxSmartArtNode.styleRole` and `applySmartArtRoleColors`)
5362
- * instead of a generic cycled colour.
5363
- */
5364
- roleColors?: Record<string, SmartArtRoleColorList>;
5365
- }
5366
- /** One colour-transform `styleLbl`'s resolved colour lists. */
5367
- interface SmartArtRoleColorList {
5368
- fill: string[];
5369
- line: string[];
5370
- /**
5371
- * `txFillClrLst`, when the label declares one (`revTx` -> `tx1`). A text
5372
- * node's colour comes from here; see `smartart-merged-text-label`.
5373
- */
5374
- textFill?: string[];
5375
- }
5376
- /** Typed CT_StyleDefinition metadata and legacy rendering hint. */
5377
- interface PptxSmartArtQuickStyle extends PptxSmartArtDefinitionMetadata {
5378
- /** Legacy resolved display name. */
5379
- name?: string;
5380
- /** Legacy effect-intensity rendering hint. */
5381
- effectIntensity?: string;
5382
- /** Ordered CT_StyleLabel metadata. Complex style payload remains preserved XML. */
5383
- labels?: PptxSmartArtQuickStyleLabel[];
5384
- /**
5385
- * Whole-diagram 3D scene (camera preset/rotation/zoom/fov, light rig,
5386
- * backdrop) from the quick style's own `dgm:styleDef/dgm:scene3d`, present
5387
- * for the "Scene" quick styles (Brick, Flat, Metallic, Sunset, Bird's Eye
5388
- * Scene). One camera renders the whole diagram; per-shape `a:scene3d` is
5389
- * absent for those styles (see `PptxSmartArtDrawingShape.scene3d`). Each
5390
- * `dgm:styleLbl` also carries its own per-label `dgm:scene3d`/`dgm:sp3d`
5391
- * ({@link PptxSmartArtQuickStyleLabel.scene3d} / `shape3d` / `text3d`),
5392
- * which PowerPoint bakes onto each cached shape; they are re-applied when a
5393
- * structural edit regenerates the shapes.
2721
+ ofPieOptions?: PptxChartOfPieOptions;
2722
+ /** Classic bubble-chart display options (`c:bubbleChart`). */
2723
+ bubbleOptions?: PptxBubbleChartOptions;
2724
+ /**
2725
+ * 3D viewing parameters (`c:view3D`, CT_View3D).
2726
+ *
2727
+ * Parsed from and emitted to `c:chart/c:view3D`. Absent when the
2728
+ * chart XML has no `c:view3D` element.
5394
2729
  */
5395
- scene3d?: Pptx3DScene;
5396
- }
5397
- //#endregion
5398
- //#region pptx/core/types/smart-art.d.ts
5399
- /**
5400
- * Resolved SmartArt layout category.
5401
- *
5402
- * @example
5403
- * ```ts
5404
- * const cat: SmartArtLayoutType = "hierarchy";
5405
- * // => "hierarchy" — one of: "list" | "process" | "cycle" | "hierarchy" | "relationship" | …
5406
- * ```
5407
- */
5408
- type SmartArtLayoutType = DiagramLayoutType;
5409
- /**
5410
- * Named SmartArt layout presets for creation (subset of PowerPoint layouts).
5411
- *
5412
- * @example
5413
- * ```ts
5414
- * const layout: SmartArtLayout = "hierarchy";
5415
- * // => "hierarchy" — one of: "basicBlockList" | "alternatingHexagons" | "hierarchy" | …
5416
- * ```
5417
- */
5418
- type SmartArtLayout = 'basicBlockList' | 'alternatingHexagons' | 'basicChevronProcess' | 'basicCycle' | 'basicPie' | 'basicRadial' | 'basicVenn' | 'continuousBlockProcess' | 'convergingRadial' | 'hierarchy' | 'horizontalBulletList' | 'linearVenn' | 'segmentedProcess' | 'stackedList' | 'tableList' | 'trapezoidList' | 'upwardArrow' | 'basicFunnel' | 'basicTarget' | 'interlockingGears' | 'basicTimeline' | 'basicMatrix' | 'basicPyramid' | 'invertedPyramid' | 'bendingProcess' | 'stepDownProcess' | 'alternatingFlow' | 'descendingProcess' | 'pictureAccentList' | 'verticalBlockList' | 'groupedList' | 'pyramidList' | 'horizontalPictureList' | 'accentProcess' | 'verticalChevronList';
5419
- /**
5420
- * SmartArt colour scheme presets.
5421
- *
5422
- * @example
5423
- * ```ts
5424
- * const scheme: SmartArtColorScheme = "colorful1";
5425
- * // => "colorful1" — one of: "colorful1" | "colorful2" | "colorful3" | "monochromatic1" | "monochromatic2"
5426
- * ```
5427
- */
5428
- type SmartArtColorScheme = DiagramColorScheme;
5429
- /**
5430
- * SmartArt visual style intensity.
5431
- *
5432
- * @example
5433
- * ```ts
5434
- * const style: SmartArtStyle = "moderate";
5435
- * // => "moderate" — one of: "flat" | "moderate" | "intense"
5436
- * ```
5437
- */
5438
- type SmartArtStyle = DiagramStyleIntensity;
5439
- /**
5440
- * A connection between two SmartArt data-model nodes.
5441
- *
5442
- * @example
5443
- * ```ts
5444
- * const conn: PptxSmartArtConnection = {
5445
- * sourceId: "1",
5446
- * destId: "2",
5447
- * type: "parOf",
5448
- * };
5449
- * // => satisfies PptxSmartArtConnection
5450
- * ```
5451
- */
5452
- type PptxSmartArtConnection = DiagramConnection;
5453
- /**
5454
- * A pre-computed shape from `ppt/diagrams/drawing*.xml`.
5455
- *
5456
- * @example
5457
- * ```ts
5458
- * const shape: PptxSmartArtDrawingShape = {
5459
- * id: "s1",
5460
- * shapeType: "roundRect",
5461
- * x: 100, y: 50, width: 200, height: 80,
5462
- * fillColor: "#4F81BD",
5463
- * text: "CEO",
5464
- * };
5465
- * // => satisfies PptxSmartArtDrawingShape
5466
- * ```
5467
- */
5468
- interface PptxSmartArtDrawingShape extends PptxCustomPathProperties {
5469
- /** Shape ID within the drawing. */
5470
- id: string;
5471
- /** Preset geometry type (e.g. "roundRect", "ellipse"). */
5472
- shapeType?: string;
5473
- /** Position and size in EMU-based pixels. */
5474
- x: number;
5475
- y: number;
5476
- width: number;
5477
- height: number;
5478
- /** Rotation in degrees. */
5479
- rotation?: number;
5480
- /** Horizontal/vertical mirrors declared on the cached drawing transform. */
5481
- flipHorizontal?: boolean;
5482
- flipVertical?: boolean;
5483
- /** Skew along the X axis in degrees. */
5484
- skewX?: number;
5485
- /** Skew along the Y axis in degrees. */
5486
- skewY?: number;
5487
- /** Preset-geometry adjustment values from `a:prstGeom/a:avLst`. */
5488
- shapeAdjustments?: Record<string, number>;
2730
+ view3D?: PptxChartView3D;
5489
2731
  /**
5490
- * The cached shape declares `a:noFill`. Renderers must leave it unpainted
5491
- * rather than substituting a palette colour, because these shapes usually sit
5492
- * on top of a painted shape whose fill has to stay visible.
2732
+ * Top-level chart chrome flags (`c:autoTitleDeleted`,
2733
+ * `c:dispBlanksAs`, `c:showDLblsOverMax`).
2734
+ *
2735
+ * Each flag is omitted from the emitted XML when absent on the
2736
+ * source data, so absence does not produce empty `<c:…/>` placeholders.
5493
2737
  */
5494
- fillNone?: boolean;
5495
- /** Solid fill colour (hex). */
5496
- fillColor?: string;
2738
+ chartChrome?: PptxChartChrome;
2739
+ /** `c:chartSpace/c:printSettings`; `null` removes the container on save. */
2740
+ printSettings?: PptxChartPrintSettings | null;
2741
+ /** `c:chartSpace/c:protection`; `null` removes the container on save. */
2742
+ protection?: PptxChartProtection | null;
2743
+ /** Editable manual placement for the title, plot area, and legend. */
2744
+ layouts?: PptxChartLayouts;
5497
2745
  /**
5498
- * Opacity (0..1) of the solid fill, from the colour's `a:alpha` (Basic Venn
5499
- * paints its circles at 50% so overlaps blend). Absent when opaque.
2746
+ * Raw `c:userShapes` XML subtree (a drawing tree) preserved verbatim.
2747
+ *
2748
+ * `c:userShapes` references a separate drawing part containing
2749
+ * shapes drawn over the chart. The reference is preserved as-is so
2750
+ * that round-trip save re-emits the original element without
2751
+ * attempting to parse the nested drawing tree.
5500
2752
  */
5501
- fillOpacity?: number;
2753
+ userShapesXml?: unknown;
5502
2754
  /**
5503
- * Gradient fill stops when the cached shape uses `a:gradFill`. Positions are
5504
- * 0..100 (percent). Renderers emit an SVG/CSS gradient instead of a flat box.
2755
+ * Parsed, renderable drawing-overlay shapes resolved from the separate
2756
+ * drawing part referenced by `c:userShapes/@r:id`
2757
+ * (`ppt/drawings/drawingN.xml`). Each entry carries chart-relative anchor
2758
+ * geometry plus light shape/text formatting so the viewer can render an
2759
+ * overlay on top of the chart plot. Render-only: {@link userShapesXml}
2760
+ * remains the source of truth for round-trip save.
5505
2761
  */
5506
- fillGradientStops?: Array<{
5507
- color: string;
5508
- position: number;
5509
- opacity?: number;
5510
- }>;
5511
- /** Gradient geometry type (`linear` for `a:lin`, `radial` for `a:path`). */
5512
- fillGradientType?: 'linear' | 'radial';
5513
- /** Linear gradient angle in degrees (0..360). */
5514
- fillGradientAngle?: number;
5515
- /** Pattern fill preset name from `a:pattFill/@prst` (e.g. "pct50", "cross"). */
5516
- fillPatternPreset?: string;
5517
- /** Pattern fill foreground colour (hex) from `a:pattFill/a:fgClr`. */
5518
- fillPatternForegroundColor?: string;
5519
- /** Pattern fill background colour (hex) from `a:pattFill/a:bgClr`. */
5520
- fillPatternBackgroundColor?: string;
2762
+ userShapes?: PptxChartUserShape[];
5521
2763
  /**
5522
- * Relationship id of a picture (blip) fill's embedded image, from
5523
- * `a:blipFill/a:blip/@r:embed`. The image bytes are resolved separately; see
5524
- * {@link fillImageUrl}.
2764
+ * Raw `c:pivotFmts` XML subtree preserved verbatim.
2765
+ *
2766
+ * `c:pivotFmts` carries a list of `c:pivotFmt` formatting overrides
2767
+ * for charts whose data originates from a PivotTable. Preserved
2768
+ * verbatim for round-trip fidelity.
5525
2769
  */
5526
- fillBlipEmbedId?: string;
2770
+ /** Typed pivot-chart format persistence; `null` removes `c:pivotFmts`. */
2771
+ pivotFormats?: PptxChartPivotFormats | null;
5527
2772
  /**
5528
- * Resolved data-URI/URL for a picture (blip) fill, when the embedded image
5529
- * part could be resolved. Absent when only {@link fillBlipEmbedId} is known.
2773
+ * Color-map override (`c:clrMapOvr`) carrying 12 attributes that
2774
+ * remap theme colour roles for this chart only. Modeled as a flat
2775
+ * `attribute -> value` map (e.g. `{ bg1: 'lt1', accent1: 'accent2' }`)
2776
+ * so unknown/future attributes round-trip without code changes.
2777
+ * `null` explicitly removes an existing `c:clrMapOvr`; an empty object
2778
+ * is treated the same as `null` on save.
5530
2779
  */
5531
- fillImageUrl?: string;
5532
- /** Whether the cached shape carries an outer-shadow effect (`a:effectLst`). */
5533
- hasShadow?: boolean;
5534
- /** Resolved outer-shadow colour (hex), when present. */
5535
- shadowColor?: string;
5536
- /** Stroke colour (hex). */
5537
- strokeColor?: string;
5538
- /** Stroke width in points. */
5539
- strokeWidth?: number;
5540
- /** Text content of the shape. */
5541
- text?: string;
5542
- /** Standard rich-text segments projected from the associated SmartArt node. */
5543
- textSegments?: TextSegment[];
5544
- /** Font size in CSS pixels. */
5545
- fontSize?: number;
5546
- /** Font colour (hex). */
5547
- fontColor?: string;
5548
- /** Authored font family from the first styled run. */
5549
- fontFamily?: string;
5550
- /** Authored font weight (400 or 700). */
5551
- fontWeight?: number;
5552
- /** Authored font style. */
5553
- fontStyle?: 'normal' | 'italic';
5554
- /** Absolute line height in CSS pixels from `a:spcPts`. */
5555
- lineHeight?: number;
5556
- /** Relative line height from `a:spcPct`. */
5557
- lineHeightRatio?: number;
5558
- /** Absolute spacing after a paragraph in CSS pixels. */
5559
- lineSpacingAfter?: number;
5560
- /** Relative spacing after a paragraph. */
5561
- lineSpacingAfterRatio?: number;
5562
- /** Text-body insets in CSS pixels. */
5563
- textInsetLeft?: number;
5564
- textInsetTop?: number;
5565
- textInsetRight?: number;
5566
- textInsetBottom?: number;
5567
- /** DiagramML text vertical anchor (`t`, `ctr`, or `b`). */
5568
- textVerticalAnchor?: string;
5569
- /** Independent DiagramML text-frame geometry from `dsp:txXfrm`. */
5570
- textFrameX?: number;
5571
- textFrameY?: number;
5572
- textFrameWidth?: number;
5573
- textFrameHeight?: number;
5574
- /**
5575
- * 3D scene (camera/light rig/backdrop) from `dsp:spPr/a:scene3d`, when this
5576
- * cached shape carries its own per-shape camera. Bevel quick styles
5577
- * (Polished, Inset, Cartoon, Powder) cache one per shape (always
5578
- * `orthographicFront`, so the 2D layout stays undistorted). Scene quick
5579
- * styles (Brick, Flat, Metallic, Sunset, Bird's Eye) instead put ONE camera
5580
- * on the whole diagram (see `PptxSmartArtQuickStyle.scene3d`) and leave this
5581
- * undefined on every shape.
2780
+ clrMapOvr?: Record<string, string> | null;
2781
+ /**
2782
+ * Whether the chart's own cached numeric values use the 1904 date epoch
2783
+ * (`c:chartSpace/c:date1904/@val`). Independent of, and authoritative over,
2784
+ * any embedded workbook's `workbookPr/@date1904` (a chart can lack an
2785
+ * embedded workbook entirely, or its cache can legitimately differ from the
2786
+ * workbook's current setting). Absent when the source XML omits the
2787
+ * element, in which case the 1900 system applies (the schema default).
5582
2788
  */
5583
- scene3d?: Pptx3DScene;
2789
+ date1904?: boolean;
5584
2790
  /**
5585
- * 3D extrusion/bevel/contour/material from `dsp:spPr/a:sp3d`. PowerPoint
5586
- * caches this fully resolved (from the quick style's per-label `dgm:sp3d`)
5587
- * on every shape for every non-flat quick style, bevel or scene alike.
2791
+ * PowerPoint's "Rounded corners" chart-area option
2792
+ * (`c:chartSpace/c:roundedCorners/@val`). Absent when the source XML omits
2793
+ * the element; PowerPoint then draws rounded corners, so square corners
2794
+ * need an explicit `false`. Written for generated charts when set, and
2795
+ * reconciled on save for loaded ones.
5588
2796
  */
5589
- shape3d?: Pptx3DShape;
2797
+ roundedCorners?: boolean;
5590
2798
  /**
5591
- * Text-body 3D extrusion/bevel from `dsp:txBody/a:bodyPr/a:sp3d`. Rare:
5592
- * present when a quick style extrudes the label text itself off the shape
5593
- * face (e.g. Bird's Eye Scene: `extrusionH="28000"`), rather than only the
5594
- * shape body.
2799
+ * 3-D chart depth/spacing along the series axis, as a percentage
2800
+ * (`c:gapDepth/@val`, `ST_GapAmount`, 0 through 500). Legal on
2801
+ * `bar3D`/`area3D`/`line3D`/`surface` chart-type containers only. Read-only
2802
+ * for rendering: save round-trips it via the preserved chart XML rather
2803
+ * than a typed edit path.
5595
2804
  */
5596
- text3d?: Text3DStyle;
2805
+ gapDepth?: number;
5597
2806
  /**
5598
- * The presentation style label (`presStyleLbl`: `node1`, `revTx`,
5599
- * `sibTrans2D1`, ...) of the layout node a REGENERATED shape was laid out
5600
- * from, when the layout engine reports it. Picks the quick-style label
5601
- * whose 3D the shape takes; `undefined` on cached (parsed) shapes.
2807
+ * Parsed Office 2013+ chart-style part (`ppt/charts/style#.xml`,
2808
+ * `cs:chartStyle`), providing per-element font/line/fill defaults for
2809
+ * whichever built-in "Chart Styles" gallery entry ({@link PptxChartStyle.styleId})
2810
+ * is active. Absent when the chart has no such part (common for
2811
+ * automation-authored charts, where PowerPoint still implies style 2's
2812
+ * look via its own bundled defaults).
5602
2813
  */
5603
- styleLabel?: string;
5604
- }
5605
- /**
5606
- * Presentation layout variables from `dgm:prSet/dgm:presLayoutVars` (data model)
5607
- * or `dgm:varLst` (layout definition defaults).
5608
- *
5609
- * These drive how the DiagramML layout interpreter arranges points: flow
5610
- * direction, hierarchy branch style, org-chart mode, and child count limits.
5611
- * The fallback layout engine can consult them for direction/org-chart hints.
5612
- *
5613
- * @example
5614
- * ```ts
5615
- * const vars: PptxSmartArtPresLayoutVars = { direction: "rev", orgChart: true };
5616
- * // => satisfies PptxSmartArtPresLayoutVars
5617
- * ```
5618
- */
5619
- interface PptxSmartArtPresLayoutVars {
5620
- /** Flow direction (`dgm:dir`): "norm" (default) or "rev" (reversed/RTL). */
5621
- direction?: 'norm' | 'rev';
5622
- /** Hierarchy branch style (`dgm:hierBranch`): std/init/l/r/hang. */
5623
- hierarchyBranch?: 'std' | 'init' | 'l' | 'r' | 'hang';
5624
- /** Org-chart mode enabled (`dgm:orgChart`). */
5625
- orgChart?: boolean;
5626
- /** Maximum children per node (`dgm:chMax`, -1 = unbounded). */
5627
- childMax?: number;
5628
- /** Preferred children per node (`dgm:chPref`, -1 = unbounded). */
5629
- childPreferred?: number;
5630
- /** Whether bullets are enabled (`dgm:bulletEnabled`). */
5631
- bulletEnabled?: boolean;
5632
- /** Animation-by-level setting (`dgm:animLvl`). */
5633
- animationLevel?: string;
5634
- /** Animate-one setting (`dgm:animOne`). */
5635
- animateOne?: string;
5636
- /** Allowed resize handles (`dgm:resizeHandles`). */
5637
- resizeHandles?: string;
5638
- }
5639
- /**
5640
- * Complete parsed SmartArt data for a {@link SmartArtPptxElement}.
5641
- *
5642
- * @example
5643
- * ```ts
5644
- * const data: PptxSmartArtData = {
5645
- * resolvedLayoutType: "hierarchy",
5646
- * layout: "hierarchy",
5647
- * colorScheme: "colorful1",
5648
- * style: "moderate",
5649
- * nodes: [
5650
- * { id: "1", text: "CEO", children: [
5651
- * { id: "2", text: "VP Marketing", parentId: "1" },
5652
- * ]},
5653
- * ],
5654
- * };
5655
- * // => satisfies PptxSmartArtData
5656
- * ```
5657
- */
5658
- interface PptxSmartArtData {
5659
- layoutType?: string;
5660
- resolvedLayoutType?: SmartArtLayoutType;
5661
- /** Named layout preset (used when creating new SmartArt). */
5662
- layout?: SmartArtLayout;
5663
- /** Colour scheme for the SmartArt graphic. */
5664
- colorScheme?: SmartArtColorScheme;
5665
- /** Visual style intensity. */
5666
- style?: SmartArtStyle;
5667
- nodes: PptxSmartArtNode[];
5668
- /** Connections between data-model nodes. */
5669
- connections?: PptxSmartArtConnection[];
5670
- /** Pre-computed shapes from `ppt/diagrams/drawing*.xml`. */
5671
- drawingShapes?: PptxSmartArtDrawingShape[];
5672
- /** Background and outline chrome from `dgm:bg` / `dgm:whole`. */
5673
- chrome?: PptxSmartArtChrome;
5674
- /** Colour transform from `ppt/diagrams/colors*.xml`. */
5675
- colorTransform?: PptxSmartArtColorTransform;
5676
- /** Quick style from `ppt/diagrams/quickStyles*.xml`. */
5677
- quickStyle?: PptxSmartArtQuickStyle;
5678
- /** Editable metadata from the related DiagramML layout definition. */
5679
- layoutDefinition?: PptxSmartArtLayoutDefinition;
5680
- /**
5681
- * Presentation layout variables (direction, hierarchy branch, org-chart,
5682
- * child limits, bullets) from `dgm:presLayoutVars` / layout `dgm:varLst`.
5683
- * Consulted by the fallback layout engine for direction/org-chart hints.
5684
- */
5685
- presLayoutVars?: PptxSmartArtPresLayoutVars;
5686
- /**
5687
- * The deck's own theme minor-Latin font (`a:fontScheme/a:minorFont/a:latin/
5688
- * @typeface`): what SmartArt text actually renders in when no per-run
5689
- * `a:latin` override is present (the common case - see
5690
- * `smartart-layout-item-font-size.ts`'s font-fit, the one consumer).
5691
- * Undefined when the theme carries no font scheme at all.
5692
- */
5693
- themeMinorFont?: string;
5694
- /** Relationship ID for the diagram data part (for round-trip save). */
5695
- dataRelId?: string;
5696
- /** Relationship ID for the diagram layout part. */
5697
- layoutRelId?: string;
5698
- /** Relationship ID for the drawing part. */
5699
- drawingRelId?: string;
5700
- /** Relationship ID for the colours part. */
5701
- colorsRelId?: string;
5702
- /** Relationship ID for the quick-styles part. */
5703
- styleRelId?: string;
5704
- /** Internal save hint: the layout definition changed in the editor. */
5705
- layoutDirty?: boolean;
5706
- /** Internal save hint: typed layout-definition metadata changed. */
5707
- layoutDefinitionDirty?: boolean;
5708
- /** Internal save hint: quick-style definition metadata changed. */
5709
- quickStyleDirty?: boolean;
5710
- /** Internal save hint: color-transform definition metadata changed. */
5711
- colorTransformDirty?: boolean;
5712
- /** Internal save hint: cached drawing geometry or text changed in the editor. */
5713
- drawingDirty?: boolean;
2814
+ chartStyleDefinition?: PptxChartStyleDefinition;
5714
2815
  }
5715
2816
  //#endregion
5716
2817
  //#region pptx/core/types/table-style-edit.d.ts
@@ -11129,5 +8230,5 @@ declare function replaceTextInSlide(slide: PptxSlide, search: string | RegExp, r
11129
8230
  */
11130
8231
  declare function replaceText(slides: PptxSlide[], search: string | RegExp, replacement: string): number;
11131
8232
  //#endregion
11132
- export { PptxThemeOption as $, PptxCustomDashSegment as $a, PptxChartMarkerSymbol as $i, PptxSplitDirection as $n, PptxSmartArtTextParagraphItem as $r, PptxCustomProperty as $t, PptxNormalViewProperties as A, PptxChartPivotSource as Aa, PptxChartChrome as Ai, PptxAttributeAnimation as An, XmlObject as Ao, PptxSmartArtConnection as Ar, PptxPictureNonVisualProperties as At, PptxEmbeddedFontDescriptor as B, CustomGeometryPath as Ba, PptxChartErrBarDir as Bi, PptxTextBuildType as Bn, PptxSmartArtColorStyleLabel as Br, Model3DSceneData as Bt, PptxSlide as C, PptxChartStyleDefinition as Ca, PptxBubbleChartOptions as Ci, PptxAnimationPreset as Cn, ConnectorArrowType as Co, PptxTableCellTextRun as Cr, PptxElement as Ct, PptxSmartTagsReference as D, PptxChartPageSetup as Da, PptxChartBandFmt as Di, PptxAnimationTimelineAnchor as Dn, ShadowEffect as Do, ParsedTableFillRef as Dr, PptxGraphicFrameExtension as Dt, PptxSlideSyncProperties as E, PptxChartPageMargins as Ea, PptxChartAxisNumFmt as Ei, PptxAnimationTarget as En, PptxShapeLocks as Eo, CreateTableStyleOptions as Er, PptxElementWithText as Et, PptxViewScale as F, PptxChartAxisLabelFormatting as Fa, PptxChartDataLabelsRange as Fi, PptxMediaBookmarkTarget as Fn, SmartArtLayout as Fr, TextPptxElement as Ft, PptxHeaderFooterFlags as G, GeometryAdjustmentHandle as Ga, PptxChartGradientFill as Gi, PptxAnimRotBehavior as Gn, PptxSmartArtHueDirection as Gr, PptxElementBase as Gt, PptxEmbeddedFontListEntry as H, CustomGeometryRawData as Ha, PptxChartErrBars as Hi, PptxAnimBehavior as Hn, PptxSmartArtDefinitionCategory as Hr, Model3DVec3 as Ht, PptxPresentationPrintProperties as I, PptxChartTickMark as Ia, PptxChartDataPoint as Ii, PptxNativeAnimation as In, SmartArtLayoutType as Ir, UnknownPptxElement as It, PptxNotesMaster as J, PptxBackgroundRemovalMark as Ja, PptxChartLegendEntry as Ji, PptxAnimationBehaviorTiming as Jn, PptxSmartArtResolvedStyleRef as Jr, PptxAppProperties as Jt, PptxLayoutPreview as K, PptxCustomPathProperties as Ka, PptxChartHistogramOptions as Ki, PptxAnimScaleBehavior as Kn, PptxSmartArtQuickStyle as Kr, PptxShapeProperties as Kt, PptxPrintColorMode as L, AdjustHandlePolar as La, PptxChartDataTable as Li, PptxNativeAnimationKind as Ln, SmartArtStyle as Lr, ZoomPptxElement as Lt, PptxViewGuide as M, PptxChartPivotFormats as Ma, PptxChartDataLabel as Mi, PptxElementAnimation as Mn, PptxSmartArtDrawingShape as Mr, SmartArtPptxElement as Mt, PptxViewOrigin as N, PptxChartDataPointPicture as Na, PptxChartDataLabelOptions as Ni, PptxGraphicBuild as Nn, PptxSmartArtPresLayoutVars as Nr, SummaryZoomTarget as Nt, PptxCommonSlideViewProperties as O, PptxChartPrintHeaderFooter as Oa, PptxChartBarDirection as Oi, PptxAnimationTimingCurve as On, StrokeDashType as Oo, ParsedTableStyleEffect as Or, PptxImageLikeElement as Ot, PptxViewProperties as P, PptxChartPictureFormat as Pa, PptxChartDataLabelPosition as Pi, PptxHslColorDelta as Pn, SmartArtColorScheme as Pr, TablePptxElement as Pt, PptxTextStyleLevels as Q, PptxImageProperties as Qa, PptxChartMarker as Qi, PptxSlideTransition as Qn, PptxSmartArtTextParagraph as Qr, PptxCoreProperties as Qt, PptxPrintOutput as R, AdjustHandleXY as Ra, PptxChartDateCategories as Ri, PptxSetAnimation as Rn, PptxSmartArtColorApplicationMethod as Rr, Model3DCamera as Rt, PptxSection as S, PptxChartTitleRun as Sa, PptxBar3DShape as Si, PptxAnimationOleChartElementTarget as Sn, Text3DStyle as So, PptxTableCellStyle as Sr, PptxAccessibilityProperties as St, PptxSlideSize as T, PptxChartProtection as Ta, PptxChartAxisFormatting as Ti, PptxAnimationSequence as Tn, PptxDrawingGuide as To, PptxTableRow as Tr, PptxElementWithShapeStyle as Tt, MasterViewTab as U, CustomGeometrySegment as Ua, PptxChartErrValType as Ui, PptxAnimEffectBehavior as Un, PptxSmartArtDefinitionMetadata as Ur, PlaceholderDefaults as Ut, PptxEmbeddedFontList as V, CustomGeometryPoint as Va, PptxChartErrBarType as Vi, PptxTimingTemplate as Vn, PptxSmartArtColorTransform as Vr, Model3DTransformData as Vt, PptxHandoutMaster as W, CustomGeometryTextRect as Wa, PptxChartFilteredSeries as Wi, PptxAnimMotionBehavior as Wn, PptxSmartArtDefinitionText as Wr, PlaceholderTextLevelStyle as Wt, PptxSlideLayout as X, PptxImageEffects as Xa, PptxChartLineStyle as Xi, PptxSetBehavior as Xn, PptxSmartArtNode as Xr, PptxCommentAuthor as Xt, PptxPlaceholderFrame as Y, PptxCropShape as Ya, PptxChartLegendTextStyle as Yi, PptxBehaviorPoint as Yn, SmartArtRoleColorList as Yr, PptxComment as Yt, PptxSlideMaster as Z, PptxImagePrerenderedCorrections as Za, PptxChartManualLayout as Zi, PptxMorphOption as Zn, PptxSmartArtNodeStyle as Zr, PptxCompatibilityWarning as Zt, PptxLayoutOption as _, PptxExternalData as _a, PptxSmartArtConstraintRelationship as _i, PptxAnimationDirection as _n, BevelPresetType as _o, ParsedTableStyleMap as _r, MediaPptxElement as _t, MergeOptions as a, PptxChartShapeProps as aa, PptxSmartArtChoose as ai, ElementAction as an, TextStyle as ao, PptxTransitionType as ar, PptxThemeFontScheme as at, PptxPhotoAlbum as b, PptxChartUserShapeGroupTransform as ba, PptxSmartArtChrome as bi, PptxAnimationIterate as bn, Pptx3DShape as bo, PptxTableCell as br, OlePptxElement as bt, PptxCustomShow as c, PptxChartTrendline as ca, PptxSmartArtLayoutAlgorithm as ci, MediaBookmark as cn, EffectDagBlendMode as co, TRANSITION_VALID_DIRECTIONS as cr, PptxThemeObjectDefaults as ct, PptxData as d, PptxChartType as da, PptxSmartArtLocalizedText as di, PptxAudioCdPosition as dn, EffectDagContainerType as do, ParsedTableStyleBorders as dr, ConnectorPptxElement as dt, PptxChartOfPieOptions as ea, PptxSmartArtTextRun as ei, PptxModernCommentAuthor as en, ResolvedStyleMatrix as eo, PptxSplitOrientation as er, PptxTheme as et, PptxEmbeddedFont as f, PptxChartUpDownBars as fa, PptxSmartArtShapeAdjustment as fi, PptxMediaReferenceKind as fn, EffectDagNode as fo, ParsedTableStyleEntry as fr, ContentPartInkStroke as ft, PptxKinsoku as g, PptxEmbeddedWorkbookData as ga, PptxSmartArtConstraintPointType as gi, PptxAfterAnimationAction as gn, EffectDagXfrm as go, ParsedTableStyleImage as gr, InkPptxElement as gt, PptxHeaderFooter as h, PptxCxValueColorPosition as ha, PptxSmartArtConstraintOperator as hi, AnimationConditionEvent as hn, EffectDagRelOff as ho, ParsedTableStyleGradientStop as hr, ImagePptxElement as ht, replaceTextInSlide as i, PptxChartSeries as ia, PptxSmartArtAlgorithmParameter as ii, ActionButtonPreset as in, TextSegment as io, PptxTransitionSpeed as ir, PptxThemeFontGroup as it, PptxRestoredRegion as j, PptxChartPivotFormat as ja, PptxChartData as ji, PptxColorAnimation as jn, PptxSmartArtData as jr, ShapePptxElement as jt, PptxGridSpacing as k, PptxChartPrintSettings as ka, PptxChartBoxWhiskerOptions as ki, PptxAnimationTrigger as kn, UnderlineStyle as ko, TableStyleSectionPatch as kr, PptxNonVisualDescription as kt, PptxCustomXmlPart as l, PptxChartTrendlineLabel as la, PptxSmartArtLayoutCategory as li, MediaCaptionTrack as ln, EffectDagBlur as lo, ParsedTableBackground as lr, THEME_COLOR_SCHEME_KEYS as lt, PptxExportOptions as m, PptxChartWaterfallOptions as ma, PptxSmartArtConstraint as mi, AnimationCondition as mn, EffectDagRawLeaf as mo, ParsedTableStyleGradient as mr, GroupPptxElement as mt, findText as n, PptxChartRegionMapOptions as na, PptxSmartArtLayoutDefinition as ni, PptxTagCollection as nn, BulletInfo as no, PptxTransitionDirection4 as nr, PptxThemeEffectStyle as nt, mergePresentation as o, PptxChartStyle as oa, PptxSmartArtForEach as oi, ElementActionType as on, EffectDagAlphaOutset as oo, TRANSITION_PATTERN_OPTIONS as or, PptxThemeFormatScheme as ot, PptxExportFormat as p, PptxChartView3D as pa, PptxSmartArtWhen as pi, PptxMediaType as pn, EffectDagPresetShadow as po, ParsedTableStyleFill as pr, ContentPartPptxElement as pt, PptxMasterTextStyles as q, PptxBackgroundRemoval as qa, PptxChartLayouts as qi, PptxAnimationBehavior as qn, PptxSmartArtQuickStyleLabel as qr, PptxTextProperties as qt, replaceText as r, PptxChartScatterStyle as ra, PptxSmartArtLayoutNode as ri, PptxCommentMention as rn, TextOrientationMatrix as ro, PptxTransitionDirection8 as rr, PptxThemeFillStyle as rt, PptxActiveXControl as s, PptxChartTreemapOptions as sa, PptxSmartArtIteratorAttributes as si, PptxAction as sn, EffectDagBlend as so, TRANSITION_THRUBLK_TYPES as sr, PptxThemeLineStyle as st, FindResult as t, PptxChartParentLabelLayout as ta, SmartArtNodeCustomLayout as ti, PptxTag as tn, ShapeStyle as to, PptxStripDirection as tr, PptxThemeColorScheme as tt, PptxCustomerData as u, PptxChartTrendlineType as ua, PptxSmartArtLayoutNodeShape as ui, MediaMetadata as un, EffectDagContainer as uo, ParsedTableStyleBorder as ur, ChartPptxElement as ut, PptxModernCommentPart as v, PptxChartUserShape as va, PptxSmartArtConstraintTarget as vi, PptxAnimationEffectFilter as vn, MaterialPresetType as vo, ParsedTableStylePattern as vr, Model3DPptxElement as vt, PptxSlideBackgroundPattern as w, PptxChartStylePartEntry as wa, PptxChart3DSurface as wi, PptxAnimationRepeatMode as wn, ConnectorConnectionPoint as wo, PptxTableData as wr, PptxElementType as wt, PptxPresentationProperties as x, PptxChartUserShapeParagraph as xa, PptxSmartArtRawBackgroundFill as xi, PptxAnimationKeyframe as xn, PptxTextWarpPreset as xo, PptxTableCell3D as xr, PicturePptxElement as xt, PptxModifyVerifier as y, PptxChartUserShapeGroupChild as ya, PptxSmartArtNumericRule as yi, PptxAnimationGraphicElementTarget as yn, Pptx3DScene as yo, ParsedTableStyleText as yr, OleObjectType as yt, PptxEmbeddedFontDataId as z, ConnectionSite as za, PptxChartDisplayUnitsLabel as zi, PptxTextAnimationTarget as zn, PptxSmartArtColorListMetadata as zr, Model3DLightData as zt };
11133
- //# sourceMappingURL=text-operations-CR3pUJi-.d.ts.map
8233
+ export { PptxThemeOption as $, ShapeStyle as $i, PptxSplitDirection as $n, PptxChartGradientFill as $r, PptxCustomProperty as $t, PptxNormalViewProperties as A, PptxChartTitleRun as Ai, PptxAttributeAnimation as An, PptxBar3DShape as Ar, PptxPictureNonVisualProperties as At, PptxEmbeddedFontDescriptor as B, PptxChartPivotFormats as Bi, PptxTextBuildType as Bn, PptxChartDataLabel as Br, Model3DSceneData as Bt, PptxSlide as C, PptxCxValueColorPosition as Ci, PptxAnimationPreset as Cn, PptxTableCellTextRun as Cr, PptxElement as Ct, PptxSmartTagsReference as D, PptxChartUserShapeGroupChild as Di, PptxAnimationTimelineAnchor as Dn, ParsedTableFillRef as Dr, PptxGraphicFrameExtension as Dt, PptxSlideSyncProperties as E, PptxChartUserShape as Ei, PptxAnimationTarget as En, CreateTableStyleOptions as Er, PptxElementWithText as Et, PptxViewScale as F, PptxChartPageSetup as Fi, PptxMediaBookmarkTarget as Fn, PptxChartBandFmt as Fr, TextPptxElement as Ft, PptxHeaderFooterFlags as G, PptxBackgroundRemoval as Gi, PptxAnimRotBehavior as Gn, PptxChartDataTable as Gr, PptxElementBase as Gt, PptxEmbeddedFontListEntry as H, PptxChartPictureFormat as Hi, PptxAnimBehavior as Hn, PptxChartDataLabelPosition as Hr, Model3DVec3 as Ht, PptxPresentationPrintProperties as I, PptxChartPrintHeaderFooter as Ii, PptxNativeAnimation as In, PptxChartBarDirection as Ir, UnknownPptxElement as It, PptxNotesMaster as J, PptxImageEffects as Ji, PptxAnimationBehaviorTiming as Jn, PptxChartErrBarDir as Jr, PptxAppProperties as Jt, PptxLayoutPreview as K, PptxBackgroundRemovalMark as Ki, PptxAnimScaleBehavior as Kn, PptxChartDateCategories as Kr, PptxShapeProperties as Kt, PptxPrintColorMode as L, PptxChartPrintSettings as Li, PptxNativeAnimationKind as Ln, PptxChartBoxWhiskerOptions as Lr, ZoomPptxElement as Lt, PptxViewGuide as M, PptxChartStylePartEntry as Mi, PptxElementAnimation as Mn, PptxChart3DSurface as Mr, SmartArtPptxElement as Mt, PptxViewOrigin as N, PptxChartProtection as Ni, PptxGraphicBuild as Nn, PptxChartAxisFormatting as Nr, SummaryZoomTarget as Nt, PptxCommonSlideViewProperties as O, PptxChartUserShapeGroupTransform as Oi, PptxAnimationTimingCurve as On, ParsedTableStyleEffect as Or, PptxImageLikeElement as Ot, PptxViewProperties as P, PptxChartPageMargins as Pi, PptxHslColorDelta as Pn, PptxChartAxisNumFmt as Pr, TablePptxElement as Pt, PptxTextStyleLevels as Q, ResolvedStyleMatrix as Qi, PptxSlideTransition as Qn, PptxChartFilteredSeries as Qr, PptxCoreProperties as Qt, PptxPrintOutput as R, PptxChartPivotSource as Ri, PptxSetAnimation as Rn, PptxChartChrome as Rr, Model3DCamera as Rt, PptxSection as S, PptxChartWaterfallOptions as Si, PptxAnimationOleChartElementTarget as Sn, PptxTableCellStyle as Sr, PptxAccessibilityProperties as St, PptxSlideSize as T, PptxExternalData as Ti, PptxAnimationSequence as Tn, PptxTableRow as Tr, PptxElementWithShapeStyle as Tt, MasterViewTab as U, PptxChartAxisLabelFormatting as Ui, PptxAnimEffectBehavior as Un, PptxChartDataLabelsRange as Ur, PlaceholderDefaults as Ut, PptxEmbeddedFontList as V, PptxChartDataPointPicture as Vi, PptxTimingTemplate as Vn, PptxChartDataLabelOptions as Vr, Model3DTransformData as Vt, PptxHandoutMaster as W, PptxChartTickMark as Wi, PptxAnimMotionBehavior as Wn, PptxChartDataPoint as Wr, PlaceholderTextLevelStyle as Wt, PptxSlideLayout as X, PptxImageProperties as Xi, PptxSetBehavior as Xn, PptxChartErrBars as Xr, PptxCommentAuthor as Xt, PptxPlaceholderFrame as Y, PptxImagePrerenderedCorrections as Yi, PptxBehaviorPoint as Yn, PptxChartErrBarType as Yr, PptxComment as Yt, PptxSlideMaster as Z, PptxCustomDashSegment as Zi, PptxMorphOption as Zn, PptxChartErrValType as Zr, PptxCompatibilityWarning as Zt, PptxLayoutOption as _, PptxChartTrendlineLabel as _i, PptxAnimationDirection as _n, ParsedTableStyleMap as _r, MediaPptxElement as _t, MergeOptions as a, PptxChartManualLayout as ai, ElementAction as an, PptxTransitionType as ar, PptxThemeFontScheme as at, PptxPhotoAlbum as b, PptxChartUpDownBars as bi, PptxAnimationIterate as bn, PptxTableCell as br, OlePptxElement as bt, PptxCustomShow as c, PptxChartOfPieOptions as ci, MediaBookmark as cn, TRANSITION_VALID_DIRECTIONS as cr, PptxThemeObjectDefaults as ct, PptxData as d, PptxChartScatterStyle as di, PptxAudioCdPosition as dn, ParsedTableStyleBorders as dr, ConnectorPptxElement as dt, PptxChartHistogramOptions as ei, PptxModernCommentAuthor as en, PptxSplitOrientation as er, PptxTheme as et, PptxEmbeddedFont as f, PptxChartSeries as fi, PptxMediaReferenceKind as fn, ParsedTableStyleEntry as fr, ContentPartInkStroke as ft, PptxKinsoku as g, PptxChartTrendline as gi, PptxAfterAnimationAction as gn, ParsedTableStyleImage as gr, InkPptxElement as gt, PptxHeaderFooter as h, PptxChartTreemapOptions as hi, AnimationConditionEvent as hn, ParsedTableStyleGradientStop as hr, ImagePptxElement as ht, replaceTextInSlide as i, PptxChartLineStyle as ii, ActionButtonPreset as in, PptxTransitionSpeed as ir, PptxThemeFontGroup as it, PptxRestoredRegion as j, PptxChartStyleDefinition as ji, PptxColorAnimation as jn, PptxBubbleChartOptions as jr, ShapePptxElement as jt, PptxGridSpacing as k, PptxChartUserShapeParagraph as ki, PptxAnimationTrigger as kn, TableStyleSectionPatch as kr, PptxNonVisualDescription as kt, PptxCustomXmlPart as l, PptxChartParentLabelLayout as li, MediaCaptionTrack as ln, ParsedTableBackground as lr, THEME_COLOR_SCHEME_KEYS as lt, PptxExportOptions as m, PptxChartStyle as mi, AnimationCondition as mn, ParsedTableStyleGradient as mr, GroupPptxElement as mt, findText as n, PptxChartLegendEntry as ni, PptxTagCollection as nn, PptxTransitionDirection4 as nr, PptxThemeEffectStyle as nt, mergePresentation as o, PptxChartMarker as oi, ElementActionType as on, TRANSITION_PATTERN_OPTIONS as or, PptxThemeFormatScheme as ot, PptxExportFormat as p, PptxChartShapeProps as pi, PptxMediaType as pn, ParsedTableStyleFill as pr, ContentPartPptxElement as pt, PptxMasterTextStyles as q, PptxCropShape as qi, PptxAnimationBehavior as qn, PptxChartDisplayUnitsLabel as qr, PptxTextProperties as qt, replaceText as r, PptxChartLegendTextStyle as ri, PptxCommentMention as rn, PptxTransitionDirection8 as rr, PptxThemeFillStyle as rt, PptxActiveXControl as s, PptxChartMarkerSymbol as si, PptxAction as sn, TRANSITION_THRUBLK_TYPES as sr, PptxThemeLineStyle as st, FindResult as t, PptxChartLayouts as ti, PptxTag as tn, PptxStripDirection as tr, PptxThemeColorScheme as tt, PptxCustomerData as u, PptxChartRegionMapOptions as ui, MediaMetadata as un, ParsedTableStyleBorder as ur, ChartPptxElement as ut, PptxModernCommentPart as v, PptxChartTrendlineType as vi, PptxAnimationEffectFilter as vn, ParsedTableStylePattern as vr, Model3DPptxElement as vt, PptxSlideBackgroundPattern as w, PptxEmbeddedWorkbookData as wi, PptxAnimationRepeatMode as wn, PptxTableData as wr, PptxElementType as wt, PptxPresentationProperties as x, PptxChartView3D as xi, PptxAnimationKeyframe as xn, PptxTableCell3D as xr, PicturePptxElement as xt, PptxModifyVerifier as y, PptxChartType as yi, PptxAnimationGraphicElementTarget as yn, ParsedTableStyleText as yr, OleObjectType as yt, PptxEmbeddedFontDataId as z, PptxChartPivotFormat as zi, PptxTextAnimationTarget as zn, PptxChartData as zr, Model3DLightData as zt };
8234
+ //# sourceMappingURL=text-operations-DM2_DC-I.d.ts.map