@office-kit/pptx 0.20.0 → 0.22.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.
@@ -192,6 +192,11 @@ interface XmlDocument {
192
192
  //#endregion
193
193
  //#region src/internal/enum-values.d.ts
194
194
  declare const PLACEHOLDER_TYPES: readonly ["title", "body", "ctrTitle", "subTitle", "dt", "sldNum", "ftr", "hdr", "obj", "chart", "tbl", "clipArt", "dgm", "media", "sldImg", "pic"];
195
+ declare const CAMERA_PRESETS: readonly ["legacyObliqueTopLeft", "legacyObliqueTop", "legacyObliqueTopRight", "legacyObliqueLeft", "legacyObliqueFront", "legacyObliqueRight", "legacyObliqueBottomLeft", "legacyObliqueBottom", "legacyObliqueBottomRight", "legacyPerspectiveTopLeft", "legacyPerspectiveTop", "legacyPerspectiveTopRight", "legacyPerspectiveLeft", "legacyPerspectiveFront", "legacyPerspectiveRight", "legacyPerspectiveBottomLeft", "legacyPerspectiveBottom", "legacyPerspectiveBottomRight", "orthographicFront", "isometricTopUp", "isometricTopDown", "isometricBottomUp", "isometricBottomDown", "isometricLeftUp", "isometricLeftDown", "isometricRightUp", "isometricRightDown", "isometricOffAxis1Left", "isometricOffAxis1Right", "isometricOffAxis1Top", "isometricOffAxis2Left", "isometricOffAxis2Right", "isometricOffAxis2Top", "isometricOffAxis3Left", "isometricOffAxis3Right", "isometricOffAxis3Bottom", "isometricOffAxis4Left", "isometricOffAxis4Right", "isometricOffAxis4Bottom", "obliqueTopLeft", "obliqueTop", "obliqueTopRight", "obliqueLeft", "obliqueRight", "obliqueBottomLeft", "obliqueBottom", "obliqueBottomRight", "perspectiveFront", "perspectiveLeft", "perspectiveRight", "perspectiveAbove", "perspectiveBelow", "perspectiveAboveLeftFacing", "perspectiveAboveRightFacing", "perspectiveContrastingLeftFacing", "perspectiveContrastingRightFacing", "perspectiveHeroicLeftFacing", "perspectiveHeroicRightFacing", "perspectiveHeroicExtremeLeftFacing", "perspectiveHeroicExtremeRightFacing", "perspectiveRelaxed", "perspectiveRelaxedModerately"];
196
+ declare const LIGHT_RIG_TYPES: readonly ["legacyFlat1", "legacyFlat2", "legacyFlat3", "legacyFlat4", "legacyNormal1", "legacyNormal2", "legacyNormal3", "legacyNormal4", "legacyHarsh1", "legacyHarsh2", "legacyHarsh3", "legacyHarsh4", "threePt", "balanced", "soft", "harsh", "flood", "contrasting", "morning", "sunrise", "sunset", "chilly", "freezing", "flat", "twoPt", "glow", "brightRoom"];
197
+ declare const LIGHT_RIG_DIRECTIONS: readonly ["tl", "t", "tr", "l", "r", "bl", "b", "br"];
198
+ declare const BEVEL_PRESETS: readonly ["relaxedInset", "circle", "slope", "cross", "angle", "softRound", "convex", "coolSlant", "divot", "riblet", "hardEdge", "artDeco"];
199
+ declare const PRESET_MATERIALS: readonly ["legacyMatte", "legacyPlastic", "legacyMetal", "legacyWireframe", "matte", "plastic", "metal", "warmMatte", "translucentPowder", "powder", "dkEdge", "softEdge", "clear", "flat", "softmetal"];
195
200
  //#endregion
196
201
  //#region src/internal/presentationml/slide-part.d.ts
197
202
  type ShapeKind = 'shape' | 'picture' | 'group' | 'graphicFrame' | 'connector';
@@ -260,6 +265,15 @@ interface SlideLayoutPart {
260
265
  */
261
266
  type PresetShape = 'rect' | 'roundRect' | 'ellipse' | 'triangle' | 'rtTriangle' | 'diamond' | 'parallelogram' | 'trapezoid' | 'pentagon' | 'hexagon' | 'heptagon' | 'octagon' | 'decagon' | 'star4' | 'star5' | 'star6' | 'star7' | 'star8' | 'star10' | 'star12' | 'star16' | 'star24' | 'star32' | 'rightArrow' | 'leftArrow' | 'upArrow' | 'downArrow' | 'leftRightArrow' | 'upDownArrow' | 'bentArrow' | 'curvedRightArrow' | 'curvedLeftArrow' | 'curvedUpArrow' | 'curvedDownArrow' | 'cloud' | 'heart' | 'lightningBolt' | 'sun' | 'moon' | 'bracketPair' | 'bracePair' | 'leftBracket' | 'rightBracket' | 'leftBrace' | 'rightBrace' | 'cube' | 'can' | 'donut' | 'noSmoking' | 'plus' | 'mathPlus' | 'mathMinus' | 'mathMultiply' | 'mathDivide' | 'mathEqual' | 'mathNotEqual';
262
267
  //#endregion
268
+ //#region src/internal/drawingml/color-transforms.d.ts
269
+ /** Ordered DrawingML color adjustments. Percentages are fractions; hue angles are degrees. */
270
+ type ColorTransform = {
271
+ readonly kind: 'comp' | 'inv' | 'gray' | 'gamma' | 'invGamma';
272
+ } | {
273
+ readonly kind: 'tint' | 'shade' | 'alpha' | 'alphaOff' | 'alphaMod' | 'hue' | 'hueOff' | 'hueMod' | 'sat' | 'satOff' | 'satMod' | 'lum' | 'lumOff' | 'lumMod' | 'red' | 'redOff' | 'redMod' | 'green' | 'greenOff' | 'greenMod' | 'blue' | 'blueOff' | 'blueMod';
274
+ readonly value: number;
275
+ };
276
+ //#endregion
263
277
  //#region src/internal/drawingml/color.d.ts
264
278
  declare const SCHEME_COLOR_TOKENS: readonly ["bg1", "tx1", "bg2", "tx2", "accent1", "accent2", "accent3", "accent4", "accent5", "accent6", "hlink", "folHlink", "phClr", "lt1", "dk1", "lt2", "dk2"];
265
279
  /** A theme color slot (`<a:schemeClr val="..."/>`). */
@@ -290,6 +304,178 @@ type Color = HexColor | SchemeColorToken | `scheme:${SchemeColorToken}`;
290
304
  */
291
305
  declare const asColor: (value: string) => Color | null;
292
306
  //#endregion
307
+ //#region src/internal/drawingml/effects.d.ts
308
+ interface ShadowOptions {
309
+ /** `#RRGGBB`, bare `RRGGBB`, or scheme token. Defaults to black. */
310
+ readonly color?: Color;
311
+ /**
312
+ * Ordered adjustments to `color` (`<a:lumMod>`, `<a:tint>`, ...), written
313
+ * as its children — the same field gradient stops take. Requires `color`.
314
+ * An `opacity` that differs from the one these transforms state wins.
315
+ */
316
+ readonly colorTransforms?: readonly ColorTransform[];
317
+ /** Edge blur in EMU. Defaults to 50800 (4pt). */
318
+ readonly blurEmu?: number;
319
+ /** Offset distance in EMU. Defaults to 38100 (3pt). */
320
+ readonly offsetEmu?: number;
321
+ /**
322
+ * Direction in degrees, measured clockwise from the right (3 o'clock).
323
+ * Defaults to 45° (down-right).
324
+ */
325
+ readonly angleDeg?: number;
326
+ /** Opacity (0–1). Defaults to fully opaque. */
327
+ readonly opacity?: number;
328
+ /** Transform anchor; defaults to top left (`tl`) for authored shadows. */
329
+ readonly alignment?: 'tl' | 't' | 'tr' | 'l' | 'ctr' | 'r' | 'bl' | 'b' | 'br';
330
+ /** Whether the shadow rotates with its shape; defaults to false. */
331
+ readonly rotateWithShape?: boolean;
332
+ }
333
+ /** Character or shape inner-shadow parameters from `<a:innerShdw>`. */
334
+ interface InnerShadowOptions {
335
+ /** `#RRGGBB`, bare `RRGGBB`, or scheme token. Defaults to black. */
336
+ readonly color?: Color;
337
+ /**
338
+ * Ordered adjustments to `color` (`<a:lumMod>`, `<a:tint>`, ...), written
339
+ * as its children — the same field gradient stops take. Requires `color`.
340
+ * An `opacity` that differs from the one these transforms state wins.
341
+ */
342
+ readonly colorTransforms?: readonly ColorTransform[];
343
+ /** Edge blur in EMU. Defaults to 50800 (4pt). */
344
+ readonly blurEmu?: number;
345
+ /** Offset distance in EMU. Defaults to 38100 (3pt). */
346
+ readonly offsetEmu?: number;
347
+ /** Direction in degrees, measured clockwise from the right. Defaults to 45°. */
348
+ readonly angleDeg?: number;
349
+ /** Opacity (0–1). Defaults to fully opaque. */
350
+ readonly opacity?: number;
351
+ }
352
+ interface GlowOptions {
353
+ /** `#RRGGBB`, bare `RRGGBB`, or scheme token. */
354
+ readonly color: Color;
355
+ /**
356
+ * Ordered adjustments to `color` (`<a:lumMod>`, `<a:tint>`, ...), written
357
+ * as its children — the same field gradient stops take. Requires `color`.
358
+ * An `opacity` that differs from the one these transforms state wins.
359
+ */
360
+ readonly colorTransforms?: readonly ColorTransform[];
361
+ /** Glow radius in EMU. Defaults to 63500 (5pt). */
362
+ readonly radiusEmu?: number;
363
+ /** Opacity (0–1). Defaults to fully opaque. */
364
+ readonly opacity?: number;
365
+ }
366
+ /** Character reflection parameters from DrawingML's `<a:reflection>`. */
367
+ interface ReflectionOptions {
368
+ /** Blur radius in EMU; defaults to zero. */
369
+ readonly blurEmu?: number;
370
+ /** Offset distance in EMU; defaults to zero. */
371
+ readonly offsetEmu?: number;
372
+ /** Offset direction in clockwise degrees from right; defaults to zero. */
373
+ readonly angleDeg?: number;
374
+ /** Ending opacity (0–1); defaults to zero (`endA`). */
375
+ readonly opacity?: number;
376
+ /** Starting opacity (0–1); defaults to one. */
377
+ readonly startOpacity?: number;
378
+ /** Starting fade position (0–1); defaults to zero. */
379
+ readonly startPosition?: number;
380
+ /** Ending fade position (0–1); defaults to one. */
381
+ readonly endPosition?: number;
382
+ /** Fade direction in clockwise degrees from right; defaults to 90. */
383
+ readonly fadeDirection?: number;
384
+ /** Horizontal scale; defaults to one. Negative values mirror horizontally. */
385
+ readonly scaleX?: number;
386
+ /** Vertical scale; defaults to one. Negative values mirror vertically. */
387
+ readonly scaleY?: number;
388
+ /** Horizontal skew in degrees, strictly between -90 and 90. */
389
+ readonly skewX?: number;
390
+ /** Vertical skew in degrees, strictly between -90 and 90. */
391
+ readonly skewY?: number;
392
+ /** Transform anchor; defaults to bottom center (`b`). */
393
+ readonly alignment?: 'tl' | 't' | 'tr' | 'l' | 'ctr' | 'r' | 'bl' | 'b' | 'br';
394
+ /** Whether the effect rotates with its shape; defaults to true. */
395
+ readonly rotateWithShape?: boolean;
396
+ }
397
+ //#endregion
398
+ //#region src/internal/drawingml/fill.d.ts
399
+ /** One stop in a linear gradient. */
400
+ interface GradientStop {
401
+ /** Position on the gradient axis, 0-1. */
402
+ readonly offset: number;
403
+ /** `#RRGGBB`, the `#RGB` shorthand, or a theme color token. */
404
+ readonly color: Color;
405
+ /** Ordered imported color adjustments. Brightness and opacity override their corresponding transforms when changed. */
406
+ readonly colorTransforms?: readonly ColorTransform[];
407
+ /** Opacity from 0 (transparent) to 1 (opaque). */
408
+ readonly opacity?: number;
409
+ /** PowerPoint brightness from -1 (black) to 1 (white); 0 leaves the color unchanged. */
410
+ readonly brightness?: number;
411
+ }
412
+ interface GradientFillOptions {
413
+ /** Two or more color stops along the axis. */
414
+ readonly stops: ReadonlyArray<GradientStop>;
415
+ /**
416
+ * Gradient axis angle, in degrees. ECMA-376 measures clockwise from
417
+ * the right (3 o'clock); `0` is a left-to-right gradient, `90` is
418
+ * top-to-bottom, `180` right-to-left, `270` bottom-to-top. Defaults
419
+ * to `90` (top → bottom). Only meaningful for linear gradients.
420
+ */
421
+ readonly angleDeg?: number;
422
+ /** Rotate the gradient with the shape. Defaults to true. */
423
+ readonly rotateWithShape?: boolean;
424
+ /** Scale a linear gradient with the shape's aspect ratio. Defaults to false. */
425
+ readonly scaled?: boolean;
426
+ /**
427
+ * Non-linear gradient path. `circle` paints concentric circles,
428
+ * `rect` paints nested rectangles, `shape` follows the shape's
429
+ * outline. Absent / `'linear'` → linear gradient using `angleDeg`.
430
+ * Mirrors ECMA-376 §20.1.8.33 `<a:path path="…"/>`.
431
+ */
432
+ readonly path?: 'linear' | 'circle' | 'rect' | 'shape';
433
+ /**
434
+ * Focus rectangle for non-linear gradients, expressed as fractional insets
435
+ * from each corresponding edge (1 = 100%). Four 0.5 insets describe
436
+ * a point at the center; left/top 1 and right/bottom 0 describe the
437
+ * bottom-right corner. Mirrors `<a:fillToRect>`.
438
+ */
439
+ readonly focus?: {
440
+ readonly left: number;
441
+ readonly top: number;
442
+ readonly right: number;
443
+ readonly bottom: number;
444
+ };
445
+ /**
446
+ * Gradient tile bounds as fractional insets from the shape's edges.
447
+ * Negative values extend the tile beyond that edge. Mac PowerPoint uses
448
+ * right/bottom -1 for its bottom-right radial direction. Mirrors `<a:tileRect>`.
449
+ */
450
+ readonly tileRect?: GradientFillOptions['focus'];
451
+ }
452
+ /**
453
+ * A gradient read back from a deck. Stop colors widen to `string`: the
454
+ * readers surface a scheme token verbatim, including one outside the theme,
455
+ * rather than dropping it.
456
+ */
457
+ type ReadGradientStop = Omit<GradientStop, 'color'> & {
458
+ readonly color: string; /** Theme- and transform-resolved color, supplied by the effective shape reader. */
459
+ readonly resolvedColor?: string;
460
+ };
461
+ type ReadGradientFill = Omit<GradientFillOptions, 'stops'> & {
462
+ readonly stops: ReadonlyArray<ReadGradientStop>;
463
+ };
464
+ /** Every `ST_PresetPatternVal` token (ECMA-376 dml-main.xsd). */
465
+ declare const PATTERN_PRESETS: readonly ["pct5", "pct10", "pct20", "pct25", "pct30", "pct40", "pct50", "pct60", "pct70", "pct75", "pct80", "pct90", "horz", "vert", "ltHorz", "ltVert", "dkHorz", "dkVert", "narHorz", "narVert", "dashHorz", "dashVert", "cross", "dnDiag", "upDiag", "ltDnDiag", "ltUpDiag", "dkDnDiag", "dkUpDiag", "wdDnDiag", "wdUpDiag", "dashDnDiag", "dashUpDiag", "diagCross", "smCheck", "lgCheck", "smGrid", "lgGrid", "dotGrid", "smConfetti", "lgConfetti", "horzBrick", "diagBrick", "solidDmnd", "openDmnd", "dotDmnd", "plaid", "sphere", "weave", "divot", "shingle", "wave", "trellis", "zigZag"];
466
+ /** One of ECMA-376's `ST_PresetPatternVal` tokens (`pct50`, `dkUpDiag`, ...). */
467
+ type PatternPreset = (typeof PATTERN_PRESETS)[number];
468
+ interface PatternFillOptions {
469
+ /** Preset pattern token, e.g. `'pct50'`, `'dkUpDiag'`, `'wave'`. */
470
+ readonly preset: PatternPreset;
471
+ /** Foreground (pattern stroke) color. `#RRGGBB`, bare `RRGGBB`, or scheme token. */
472
+ readonly foreground: string;
473
+ /** Background (fill behind the pattern) color. */
474
+ readonly background: string;
475
+ readonly foregroundTransforms?: readonly ColorTransform[];
476
+ readonly backgroundTransforms?: readonly ColorTransform[];
477
+ }
478
+ //#endregion
293
479
  //#region src/internal/drawingml/text-format.d.ts
294
480
  interface TextFormat {
295
481
  /** Latin font family (`Calibri`, `Arial`, ...). Sets `<a:latin>`. */
@@ -314,6 +500,18 @@ interface TextFormat {
314
500
  * (`tx1`, `accent1`, ...), or `null` to clear.
315
501
  */
316
502
  color?: Color | null;
503
+ /**
504
+ * Ordered adjustments to `color` (`<a:lumMod>`, `<a:tint>`, `<a:alpha>`,
505
+ * ...), written as children of its color element — PowerPoint's theme
506
+ * tints, such as Accent 2 Lighter 60%. Same field as on gradient stops;
507
+ * requires `color`, and replaces any transforms the run's color had.
508
+ */
509
+ colorTransforms?: readonly ColorTransform[];
510
+ /**
511
+ * Non-solid glyph fill. The `color` field remains the shorthand for a solid
512
+ * fill. Both are the same OOXML fill choice, so supplying both is rejected.
513
+ */
514
+ textFill?: TextFill;
317
515
  bold?: boolean;
318
516
  italic?: boolean;
319
517
  /**
@@ -322,6 +520,12 @@ interface TextFormat {
322
520
  * `'dash'`, ...).
323
521
  */
324
522
  underline?: boolean | string;
523
+ /**
524
+ * Underline color. `null` explicitly follows the run's text color via
525
+ * `<a:uFillTx>`; omit the property to leave an existing underline fill
526
+ * untouched.
527
+ */
528
+ underlineColor?: Color | null;
325
529
  /**
326
530
  * Strikethrough style. `true` is shorthand for `'sngStrike'` (single
327
531
  * line). Pass the exact `ST_TextStrikeType` token (`'sngStrike'`,
@@ -336,9 +540,12 @@ interface TextFormat {
336
540
  /**
337
541
  * Kerning threshold in 1/100 points (`ST_TextNonNegativePoint`, the same
338
542
  * unit as `spc`): `0` disables kerning, `1200` = apply kerning for runs
339
- * ≥12pt. Mirrors `<a:rPr kern="…"/>`.
543
+ * ≥12pt. Mirrors `<a:rPr kern="…"/>`. Mac PowerPoint was observed to
544
+ * save the value as `kern="0"` when its Use kerning checkbox is cleared.
340
545
  */
341
546
  kern?: number;
547
+ /** Normalize character heights (`<a:rPr normalizeH>`; PowerPoint's Equalize character height). */
548
+ normalizeHeight?: boolean;
342
549
  /**
343
550
  * Baseline offset as a fraction of 1 (`0.3` = superscript ~30% up,
344
551
  * `-0.25` = subscript). PowerPoint emits ST_Percentage; this getter
@@ -355,16 +562,85 @@ interface TextFormat {
355
562
  * format as `color`. Mirrors `<a:rPr><a:highlight>…</a:highlight></a:rPr>`.
356
563
  */
357
564
  highlight?: Color | null;
565
+ /**
566
+ * Outline drawn around the glyphs — `<a:rPr><a:ln>`, the character-level
567
+ * twin of `setShapeStroke`. `null` removes it, which is not the same as
568
+ * an outline of width 0: removing restores what the run inherits.
569
+ */
570
+ outline?: TextOutline | null;
571
+ /**
572
+ * Drop shadow behind the glyphs — `<a:outerShdw>` in the run's own
573
+ * `<a:effectLst>`. `null` removes it.
574
+ */
575
+ shadow?: ShadowOptions | null;
576
+ /** Inner shadow inside the glyphs — `<a:innerShdw>` in the run's effect list. */
577
+ innerShadow?: InnerShadowOptions | null;
578
+ /**
579
+ * Glow around the glyphs — `<a:glow>` in the run's own `<a:effectLst>`.
580
+ * `null` removes it.
581
+ */
582
+ glow?: GlowOptions | null;
583
+ /** Reflection below the glyphs — `<a:reflection>` in the run's effect list. */
584
+ reflection?: ReflectionOptions | null;
585
+ }
586
+ type TextFill = ({
587
+ readonly kind: 'gradient';
588
+ } & GradientFillOptions) | ({
589
+ readonly kind: 'pattern';
590
+ } & PatternFillOptions);
591
+ type ReadTextFill = ({
592
+ readonly kind: 'gradient';
593
+ } & ReadGradientFill) | {
594
+ readonly kind: 'pattern';
595
+ readonly preset: PatternFillOptions['preset'];
596
+ readonly foreground: string;
597
+ readonly background: string;
598
+ readonly foregroundTransforms?: PatternFillOptions['foregroundTransforms'];
599
+ readonly backgroundTransforms?: PatternFillOptions['backgroundTransforms'];
600
+ };
601
+ /** A run's outline: `CT_LineProperties` as far as text uses it. */
602
+ interface TextOutline {
603
+ /** Same accepted forms as `TextFormat.color`. */
604
+ readonly color?: Color;
605
+ /** Ordered adjustments to `color`, as on `TextFormat.colorTransforms`. Requires `color`. */
606
+ readonly colorTransforms?: readonly ColorTransform[];
607
+ /** Line width in EMU. PowerPoint's thinnest visible text outline is 9525 (0.75pt). */
608
+ readonly widthEmu?: number;
358
609
  }
359
610
  /**
360
611
  * A run format read back from a deck. `color` and `highlight` widen to
361
612
  * `string`: when no theme is supplied, or a token is not in the scheme, the
362
613
  * readers surface the raw `<a:schemeClr val>` token as-is.
363
614
  */
364
- type ReadTextFormat = Omit<TextFormat, 'color' | 'highlight'> & {
615
+ type ReadTextFormat = Omit<TextFormat, 'color' | 'textFill' | 'underlineColor' | 'highlight' | 'outline' | 'shadow' | 'innerShadow' | 'glow' | 'reflection'> & {
365
616
  color?: string | null;
617
+ underlineColor?: string | null;
366
618
  highlight?: string | null;
619
+ outline?: ReadTextOutline | null;
620
+ shadow?: (Omit<ShadowOptions, 'color'> & {
621
+ readonly color?: string;
622
+ }) | null;
623
+ innerShadow?: (Omit<InnerShadowOptions, 'color'> & {
624
+ readonly color?: string;
625
+ }) | null;
626
+ glow?: (Omit<GlowOptions, 'color'> & {
627
+ readonly color: string;
628
+ }) | null;
629
+ reflection?: ReflectionOptions | null;
630
+ textFill?: ReadTextFill;
631
+ };
632
+ /** A run outline read back from a deck. `color` widens for the same reason. */
633
+ type ReadTextOutline = Omit<TextOutline, 'color'> & {
634
+ readonly color?: string;
367
635
  };
636
+ /**
637
+ * Converts a format read back from a deck into one a writer accepts. The
638
+ * readers widen every color to `string`, because a deck can hold a scheme
639
+ * token that is not in its theme; this checks each one and drops the property
640
+ * (or, for a glow, the whole effect) when the writer would reject it, so the
641
+ * round trip never writes a color the schema has no room for.
642
+ */
643
+ declare const toWritableTextFormat: (format: ReadTextFormat) => TextFormat;
368
644
  //#endregion
369
645
  //#region src/internal/drawingml/text-body-mutation.d.ts
370
646
  /**
@@ -418,89 +694,63 @@ interface ParagraphSpec {
418
694
  readonly endFormat?: TextFormat;
419
695
  }
420
696
  //#endregion
421
- //#region src/internal/drawingml/fill.d.ts
422
- /** One stop in a linear gradient. */
423
- interface GradientStop {
424
- /** Position on the gradient axis, 0-1. */
425
- readonly offset: number;
426
- /** `#RRGGBB`, the `#RGB` shorthand, or a theme color token. */
427
- readonly color: Color;
697
+ //#region src/internal/drawingml/text-3d.d.ts
698
+ /** ECMA-376 `ST_PresetCameraType`; PowerPoint's flat WordArt uses `'orthographicFront'`. */
699
+ type CameraPreset = (typeof CAMERA_PRESETS)[number];
700
+ /** ECMA-376 `ST_LightRigType` (`'threePt'`, `'soft'`, `'harsh'`, ...). */
701
+ type LightRigType = (typeof LIGHT_RIG_TYPES)[number];
702
+ /** ECMA-376 `ST_LightRigDirection`: where the light rig sits relative to the scene. */
703
+ type LightRigDirection = (typeof LIGHT_RIG_DIRECTIONS)[number];
704
+ /** ECMA-376 `ST_BevelPresetType` (`'circle'`, `'angle'`, `'softRound'`, ...). */
705
+ type BevelPreset = (typeof BEVEL_PRESETS)[number];
706
+ /** ECMA-376 `ST_PresetMaterialType` (`'matte'`, `'softEdge'`, `'metal'`, ...). */
707
+ type PresetMaterial = (typeof PRESET_MATERIALS)[number];
708
+ /** `CT_SphereCoords`: a rotation in degrees, each in `[0, 360)`. */
709
+ interface Rotation3D {
710
+ readonly latitudeDeg: number;
711
+ readonly longitudeDeg: number;
712
+ readonly revolutionDeg: number;
428
713
  }
429
- interface GradientFillOptions {
430
- /** Two or more color stops along the axis. */
431
- readonly stops: ReadonlyArray<GradientStop>;
432
- /**
433
- * Gradient axis angle, in degrees. ECMA-376 measures clockwise from
434
- * the right (3 o'clock); `0` is a left-to-right gradient, `90` is
435
- * top-to-bottom, `180` right-to-left, `270` bottom-to-top. Defaults
436
- * to `90` (top → bottom). Only meaningful for linear gradients.
437
- */
438
- readonly angleDeg?: number;
439
- /**
440
- * Non-linear gradient path. `circle` paints concentric circles,
441
- * `rect` paints nested rectangles, `shape` follows the shape's
442
- * outline. Absent / `'linear'` → linear gradient using `angleDeg`.
443
- * Mirrors ECMA-376 §20.1.8.33 `<a:path path="…"/>`.
444
- */
445
- readonly path?: 'linear' | 'circle' | 'rect' | 'shape';
446
- /**
447
- * Focus rectangle for non-linear gradients, in unit coordinates
448
- * (0 = left/top, 1 = right/bottom). When omitted, defaults to a
449
- * single point at the rectangle's center. Mirrors `<a:fillToRect>`.
450
- */
451
- readonly focus?: {
452
- readonly left: number;
453
- readonly top: number;
454
- readonly right: number;
455
- readonly bottom: number;
456
- };
714
+ /** `<a:lightRig>`. */
715
+ interface LightRig {
716
+ readonly type: LightRigType;
717
+ readonly direction: LightRigDirection;
718
+ /** `<a:rot>`; omitted, the rig keeps its preset orientation. */
719
+ readonly rotation?: Rotation3D;
457
720
  }
458
- /**
459
- * A gradient read back from a deck. Stop colors widen to `string`: the
460
- * readers surface a scheme token verbatim, including one outside the theme,
461
- * rather than dropping it.
462
- */
463
- type ReadGradientStop = Omit<GradientStop, 'color'> & {
464
- readonly color: string;
465
- };
466
- type ReadGradientFill = Omit<GradientFillOptions, 'stops'> & {
467
- readonly stops: ReadonlyArray<ReadGradientStop>;
468
- };
469
- /** Every `ST_PresetPatternVal` token (ECMA-376 dml-main.xsd). */
470
- declare const PATTERN_PRESETS: readonly ["pct5", "pct10", "pct20", "pct25", "pct30", "pct40", "pct50", "pct60", "pct70", "pct75", "pct80", "pct90", "horz", "vert", "ltHorz", "ltVert", "dkHorz", "dkVert", "narHorz", "narVert", "dashHorz", "dashVert", "cross", "dnDiag", "upDiag", "ltDnDiag", "ltUpDiag", "dkDnDiag", "dkUpDiag", "wdDnDiag", "wdUpDiag", "dashDnDiag", "dashUpDiag", "diagCross", "smCheck", "lgCheck", "smGrid", "lgGrid", "dotGrid", "smConfetti", "lgConfetti", "horzBrick", "diagBrick", "solidDmnd", "openDmnd", "dotDmnd", "plaid", "sphere", "weave", "divot", "shingle", "wave", "trellis", "zigZag"];
471
- /** One of ECMA-376's `ST_PresetPatternVal` tokens (`pct50`, `dkUpDiag`, ...). */
472
- type PatternPreset = (typeof PATTERN_PRESETS)[number];
473
- interface PatternFillOptions {
474
- /** Preset pattern token, e.g. `'pct50'`, `'dkUpDiag'`, `'wave'`. */
475
- readonly preset: PatternPreset;
476
- /** Foreground (pattern stroke) color. `#RRGGBB`, bare `RRGGBB`, or scheme token. */
477
- readonly foreground: string;
478
- /** Background (fill behind the pattern) color. */
479
- readonly background: string;
721
+ /** `<a:scene3d>`: the camera and light the 3-D text is rendered with. */
722
+ interface Scene3D {
723
+ readonly camera: CameraPreset;
724
+ readonly lightRig: LightRig;
480
725
  }
481
- //#endregion
482
- //#region src/internal/drawingml/effects.d.ts
483
- interface ShadowOptions {
484
- /** `#RRGGBB`, bare `RRGGBB`, or scheme token. Defaults to black. */
485
- readonly color?: Color;
486
- /** Edge blur in EMU. Defaults to 50800 (4pt). */
487
- readonly blurEmu?: number;
488
- /** Offset distance in EMU. Defaults to 38100 (3pt). */
489
- readonly offsetEmu?: number;
490
- /**
491
- * Direction in degrees, measured clockwise from the right (3 o'clock).
492
- * Defaults to 45° (down-right).
493
- */
494
- readonly angleDeg?: number;
495
- /** Opacity (0–1). Defaults to fully opaque. */
496
- readonly opacity?: number;
726
+ /** `CT_Bevel`. Omitted fields take the schema defaults: `circle`, 76200 × 76200 EMU. */
727
+ interface Bevel {
728
+ readonly preset?: BevelPreset;
729
+ readonly widthEmu?: number;
730
+ readonly heightEmu?: number;
497
731
  }
498
- interface GlowOptions {
499
- /** `#RRGGBB`, bare `RRGGBB`, or scheme token. */
500
- readonly color: Color;
501
- /** Glow radius in EMU. Defaults to 63500 (5pt). */
502
- readonly radiusEmu?: number;
732
+ /**
733
+ * 3-D on a text body — what PowerPoint writes for WordArt bevels. `scene`
734
+ * becomes `<a:scene3d>`; the other fields become `<a:sp3d>`, written when any
735
+ * of them is set.
736
+ */
737
+ interface Text3D {
738
+ readonly scene?: Scene3D;
739
+ /** Top bevel (`<a:bevelT>`). */
740
+ readonly bevelTop?: Bevel;
741
+ /** Extrusion depth (`extrusionH`) in EMU. */
742
+ readonly extrusionHeightEmu?: number;
743
+ /** Surface material (`prstMaterial`). */
744
+ readonly material?: PresetMaterial;
745
+ /** Contour color (`<a:contourClr>`). Same accepted forms as `TextFormat.color`. */
746
+ readonly contourColor?: Color;
747
+ /** Ordered adjustments to `contourColor`. Requires `contourColor`. */
748
+ readonly contourColorTransforms?: readonly ColorTransform[];
503
749
  }
750
+ /** A text body's 3-D read back from a deck; `contourColor` is the raw `#RRGGBB` or scheme token. */
751
+ type ReadText3D = Omit<Text3D, 'contourColor'> & {
752
+ readonly contourColor?: string;
753
+ };
504
754
  //#endregion
505
755
  //#region src/internal/drawingml/stroke.d.ts
506
756
  /**
@@ -567,8 +817,24 @@ interface GeomPath {
567
817
  readonly stroke: boolean;
568
818
  readonly commands: readonly GeomCommand[];
569
819
  }
820
+ /**
821
+ * `<a:rect>` (§20.1.9.22) — the rectangle a shape lays its text into,
822
+ * in EMU from the shape's own top-left corner.
823
+ *
824
+ * Unlike the path commands above, this is written in the guide coordinate
825
+ * space rather than a path's, so a value is either a literal EMU number or a
826
+ * guide name; both are already resolved here. Custom shapes that omit it lay
827
+ * text into the whole box, which is what `null` means.
828
+ */
829
+ interface GeomTextRect {
830
+ readonly l: number;
831
+ readonly t: number;
832
+ readonly r: number;
833
+ readonly b: number;
834
+ }
570
835
  interface CustomGeometry {
571
836
  readonly paths: readonly GeomPath[];
837
+ readonly textRect: GeomTextRect | null;
572
838
  }
573
839
  //#endregion
574
840
  //#region src/internal/drawingml/geometry.d.ts
@@ -615,6 +881,8 @@ interface TransitionOptions {
615
881
  * `direction` is ignored.
616
882
  */
617
883
  direction?: string;
884
+ /** For `wheel`: number of spokes (unsigned integer). Omitted means 4. */
885
+ spokes?: number;
618
886
  /** For `split`: orientation token (`horz` / `vert`). */
619
887
  orientation?: 'horz' | 'vert';
620
888
  /** For `fade`: pass `true` to fade through black. */
@@ -626,6 +894,13 @@ interface TransitionOptions {
626
894
  * advance.
627
895
  */
628
896
  advanceAfterMs?: number;
897
+ /**
898
+ * Effect duration in milliseconds (PowerPoint 2010's `p14:dur`). ECMA-376
899
+ * only has the three `speed` steps, so the transition is written as
900
+ * PowerPoint writes it: an `mc:AlternateContent` whose `p14` choice carries
901
+ * the duration and whose fallback carries the nearest `speed`.
902
+ */
903
+ durationMs?: number;
629
904
  }
630
905
  /**
631
906
  * A transition read back from a deck. `effect` widens to `string` because a
@@ -637,13 +912,55 @@ type SlideTransition = Omit<TransitionOptions, 'effect'> & {
637
912
  };
638
913
  //#endregion
639
914
  //#region src/internal/presentationml/animation-builder.d.ts
640
- /** What kind of effect to apply. v1 covers the four most-used presets. */
641
- type AnimationEffect = 'fadeIn' | 'fadeOut' | 'appear' | 'disappear';
915
+ /**
916
+ * What kind of effect to apply.
917
+ *
918
+ * Entrance effects put the shape on the slide and exit effects take it off.
919
+ * `spin` is the one emphasis effect modelled here: it turns a shape that is
920
+ * already on the slide and leaves it exactly where it was, so it never decides
921
+ * whether the shape is shown.
922
+ */
923
+ type AnimationEffect = 'appear' | 'fadeIn' | 'flyIn' | 'zoomIn' | 'disappear' | 'fadeOut' | 'flyOut' | 'zoomOut' | 'spin';
924
+ /**
925
+ * Which edge of the slide a `flyIn` comes from, or a `flyOut` leaves by —
926
+ * PowerPoint's "From Bottom" / Google Slides' "Fly in from bottom".
927
+ */
928
+ type AnimationDirection = 'top' | 'right' | 'bottom' | 'left';
929
+ /** When an effect runs relative to the one before it. */
930
+ type AnimationStartCondition = 'click' | 'withPrevious' | 'afterPrevious';
642
931
  interface AnimationOptions {
643
932
  /** Which preset effect to apply. */
644
933
  readonly effect: AnimationEffect;
645
- /** Animation length in milliseconds. Defaults to 500ms. */
934
+ /**
935
+ * Which edge of the slide a `'flyIn'` comes from, or a `'flyOut'` leaves by.
936
+ * Defaults to `'bottom'`, PowerPoint's own default for the preset. Passing it
937
+ * for an effect that does not fly is an error rather than a no-op: it would
938
+ * otherwise read as a direction the file never records.
939
+ */
940
+ readonly direction?: AnimationDirection;
941
+ /**
942
+ * Animation length in milliseconds. Defaults to 500ms. `'appear'` and
943
+ * `'disappear'` are instantaneous by definition of the preset and write no
944
+ * timed behaviour at all, so it does not reach them.
945
+ */
646
946
  readonly durationMs?: number;
947
+ /**
948
+ * What starts the effect. Defaults to `'click'` — the effect waits for the
949
+ * viewer's next click. `'withPrevious'` runs it alongside the effect before
950
+ * it, `'afterPrevious'` once that effect has finished. When the effect is
951
+ * the slide's first, neither has a predecessor to follow, so both start as
952
+ * soon as the slide appears instead of waiting for a click.
953
+ */
954
+ readonly start?: AnimationStartCondition;
955
+ /** How long to wait once the start condition is met. Defaults to 0ms. */
956
+ readonly delayMs?: number;
957
+ /**
958
+ * Reveal the shape's text one paragraph at a time instead of animating the
959
+ * shape as a whole — PowerPoint's "By paragraph", Google Slides' "By
960
+ * paragraph". Each paragraph gets its own effect with the same `start`, so
961
+ * the default `'click'` advances one paragraph per click.
962
+ */
963
+ readonly byParagraph?: boolean;
647
964
  }
648
965
  //#endregion
649
966
  //#region src/internal/presentationml/comments-part.d.ts
@@ -662,6 +979,10 @@ interface CommentPosition {
662
979
  readonly y: number;
663
980
  }
664
981
  interface SlideComment {
982
+ readonly parent?: {
983
+ readonly authorId: number;
984
+ readonly idx: number;
985
+ };
665
986
  /** Author id (matches `CommentAuthor.id`). */
666
987
  readonly authorId: number;
667
988
  /** Per-author monotonic index. */
@@ -672,6 +993,11 @@ interface SlideComment {
672
993
  readonly position: CommentPosition | null;
673
994
  }
674
995
  //#endregion
996
+ //#region src/internal/presentationml/modern-comments-part.d.ts
997
+ /** `ST_CommentStatus` — the three states a thread can be in. */
998
+ type CommentStatus = 'active' | 'resolved' | 'closed';
999
+ declare const COMMENT_STATUSES: readonly CommentStatus[];
1000
+ //#endregion
675
1001
  //#region src/api/_internal-symbols.d.ts
676
1002
  declare const INTERNAL_PACKAGE: unique symbol;
677
1003
  declare const SLIDE_PART_NAME: unique symbol;
@@ -683,8 +1009,11 @@ declare const SHAPE_ELEMENT: unique symbol;
683
1009
  declare const SHAPE_SNAPSHOT: unique symbol;
684
1010
  declare const LAYOUT_PART_NAME: unique symbol;
685
1011
  declare const LAYOUT_PART: unique symbol;
1012
+ declare const LAYOUT_DOCUMENT: unique symbol;
1013
+ declare const COMMENT_PARENT: unique symbol;
686
1014
  declare const COMMENT_SLIDE: unique symbol;
687
1015
  declare const COMMENT_SNAPSHOT: unique symbol;
1016
+ declare const COMMENT_MODERN: unique symbol;
688
1017
  declare const CELL_TABLE: unique symbol;
689
1018
  declare const CELL_ELEMENT: unique symbol;
690
1019
  declare const CELL_ROW: unique symbol;
@@ -713,18 +1042,44 @@ interface SlideShapeData {
713
1042
  [SHAPE_ELEMENT]: XmlElement;
714
1043
  [SHAPE_SNAPSHOT]: SlidePart['shapes'][number];
715
1044
  }
716
- /** Data shape backing every `SlideLayout` value. */
1045
+ /**
1046
+ * Data shape backing every `SlideLayout` value. Carries the parsed
1047
+ * document, not just the typed view, so a layout handle can be edited
1048
+ * and written back the way a slide handle can.
1049
+ */
717
1050
  interface SlideLayoutData {
1051
+ readonly [INTERNAL_PACKAGE]: OpcPackage;
718
1052
  readonly [LAYOUT_PART_NAME]: PartName;
719
- readonly [LAYOUT_PART]: SlideLayoutPart;
1053
+ [LAYOUT_DOCUMENT]: XmlDocument;
1054
+ [LAYOUT_PART]: SlideLayoutPart;
1055
+ }
1056
+ /** Where a modern comment handle points: its thread, and itself within it. */
1057
+ interface ModernCommentRef {
1058
+ /** Id of the `<p188:cm>`; equal to `id` when the handle is the thread itself. */
1059
+ readonly threadId: string;
1060
+ readonly id: string;
1061
+ readonly status: CommentStatus | null;
1062
+ readonly authorId: string;
720
1063
  }
721
1064
  /**
722
1065
  * Opaque handle for one comment on a slide. The `author` is resolved
723
- * on read against the package-level `commentAuthors.xml`.
1066
+ * on read: against the package-level `commentAuthors.xml` for an
1067
+ * ECMA-376 `<p:cm>`, and against `authors.xml` for a modern one.
724
1068
  */
725
1069
  interface SlideCommentData {
1070
+ [COMMENT_PARENT]: SlideCommentData | null;
726
1071
  readonly [COMMENT_SLIDE]: SlideData;
727
- readonly [COMMENT_SNAPSHOT]: SlideComment;
1072
+ /**
1073
+ * For a modern comment this is a projection, not what is on disk: `text`,
1074
+ * `dt` (the thread's `created`) and `position` are real, while `authorId`
1075
+ * and `idx` are the author's place in the modern author list and the
1076
+ * comment's place in its part. They exist so the deck-wide queries read
1077
+ * one shape whatever the file uses; nothing is ever written back through
1078
+ * them. `COMMENT_MODERN` is what every modern mutation goes through.
1079
+ */
1080
+ [COMMENT_SNAPSHOT]: SlideComment;
1081
+ /** Set for a modern comment; `null` for an ECMA-376 one. */
1082
+ [COMMENT_MODERN]: ModernCommentRef | null;
728
1083
  readonly author: CommentAuthor;
729
1084
  }
730
1085
  /**
@@ -813,8 +1168,7 @@ declare const getShapeId: (shape: SlideShapeData) => number;
813
1168
  * `'rightArrow'`, ...) for shapes whose body carries a
814
1169
  * `<a:prstGeom prst="…"/>`. Returns `null` for:
815
1170
  *
816
- * - non-`'shape'` kinds (pictures, connectors, group shapes, tables,
817
- * charts — they have their own geometry tags or no geometry),
1171
+ * - group shapes, tables, and charts (they have no preset geometry),
818
1172
  * - shapes using custom geometry (`<a:custGeom>`),
819
1173
  * - shapes whose preset is missing (malformed but possible).
820
1174
  *
@@ -895,15 +1249,14 @@ declare const getSlideMasterCount: (pres: PresentationData) => number;
895
1249
  * are missing.
896
1250
  */
897
1251
  /**
898
- * Returns the part name of the slide master a slide inherits from
899
- * (`/ppt/slideMasters/slideMaster1.xml`), or `null` when the slide
900
- * has no layout or its layout has no master rel.
1252
+ * Returns the part name of the slide master a slide or layout inherits from
1253
+ * (`/ppt/slideMasters/slideMaster1.xml`), or `null` when it has no master rel.
901
1254
  *
902
1255
  * Useful for multi-master decks where different slides live under
903
1256
  * different brand templates and the caller needs to scope theme /
904
1257
  * fontScheme / clrMap lookups to the correct master.
905
1258
  */
906
- declare const getSlideMasterPartName: (slide: SlideData) => string | null;
1259
+ declare const getSlideMasterPartName: (value: SlideData | SlideLayoutData) => string | null;
907
1260
  declare const getSlideMasterPartNames: (pres: PresentationData) => ReadonlyArray<string>;
908
1261
  /**
909
1262
  * Histogram of master part name → number of slides whose layout chains
@@ -963,7 +1316,8 @@ declare const isShapeHidden: (shape: SlideShapeData) => boolean;
963
1316
  * Sets or clears `<p:cNvPr hidden="...">` on the shape. Hidden
964
1317
  * shapes remain in the document but PowerPoint doesn't render them.
965
1318
  */
966
- declare const setShapeHidden: (shape: SlideShapeData, hidden: boolean) => void;
1319
+ declare function setShapeHidden(shape: SlideShapeData, hidden: boolean): void;
1320
+ declare function setShapeHidden(shapes: readonly SlideShapeData[], hidden: boolean): void;
967
1321
  declare const renameShape: (shape: SlideShapeData, newName: string) => void;
968
1322
  declare const getShapePlaceholderType: (shape: SlideShapeData) => string | null;
969
1323
  declare const getShapePlaceholderIdx: (shape: SlideShapeData) => number | null;
@@ -1281,6 +1635,8 @@ type ShapeFill = {
1281
1635
  readonly kind: 'pattern';
1282
1636
  } | {
1283
1637
  readonly kind: 'image';
1638
+ } | {
1639
+ readonly kind: 'background';
1284
1640
  } | {
1285
1641
  readonly kind: 'none';
1286
1642
  } | {
@@ -1334,25 +1690,25 @@ declare const getShapeStrokeColorResolved: (pres: PresentationData, shape: Slide
1334
1690
  * alpha transform (PowerPoint draws it fully opaque). Companion to
1335
1691
  * `getShapeStrokeColorResolved`, which never carries the alpha channel.
1336
1692
  */
1337
- declare const getShapeStrokeOpacity: (shape: SlideShapeData) => number | null;
1693
+ declare const getShapeStrokeOpacity: (shape: SlideShapeData, pres?: PresentationData) => number | null;
1338
1694
  /**
1339
1695
  * Reads the stroke's line cap style — `'rnd'` (round), `'sq'` (square),
1340
1696
  * `'flat'`, or `null` when the attribute isn't set. Per ECMA-376
1341
1697
  * §20.1.2.3.10 (`ST_LineCap`).
1342
1698
  */
1343
- declare const getShapeStrokeCap: (shape: SlideShapeData) => "rnd" | "sq" | "flat" | null;
1699
+ declare const getShapeStrokeCap: (shape: SlideShapeData, pres?: PresentationData) => "rnd" | "sq" | "flat" | null;
1344
1700
  /**
1345
1701
  * Reads the stroke's line join style — `'round'` / `'bevel'` / `'miter'`,
1346
1702
  * or `null` when no explicit join element is present. Maps from the
1347
1703
  * three child-element variants `<a:round/>`, `<a:bevel/>`, `<a:miter/>`.
1348
1704
  */
1349
- declare const getShapeStrokeJoin: (shape: SlideShapeData) => "round" | "bevel" | "miter" | null;
1705
+ declare const getShapeStrokeJoin: (shape: SlideShapeData, pres?: PresentationData) => "round" | "bevel" | "miter" | null;
1350
1706
  /**
1351
1707
  * Reads the stroke's compound-line style (`<a:ln cmpd="…">`) — single,
1352
1708
  * double, triple, or thick/thin / thin/thick parallel lines. ECMA-376
1353
1709
  * §20.1.2.3.11 (`ST_CompoundLine`).
1354
1710
  */
1355
- declare const getShapeStrokeCompound: (shape: SlideShapeData) => "sng" | "dbl" | "thickThin" | "thinThick" | "tri" | null;
1711
+ declare const getShapeStrokeCompound: (shape: SlideShapeData, pres?: PresentationData) => "sng" | "dbl" | "thickThin" | "thinThick" | "tri" | null;
1356
1712
  /**
1357
1713
  * Same as `getShapeStroke` but walks the layout → master placeholder
1358
1714
  * cascade when the shape itself reports `'inherit'`. First non-inherit
@@ -1381,14 +1737,15 @@ declare const getShapeFillColor: (shape: SlideShapeData) => string | null;
1381
1737
  */
1382
1738
  declare const getShapeFillColorResolved: (pres: PresentationData, shape: SlideShapeData) => string | null;
1383
1739
  /**
1384
- * Returns the opacity (`0`–`1`) of the shape's own solid fill, read from
1740
+ * Returns the opacity (`0`–`1`) of the shape's solid fill, read from
1385
1741
  * the `<a:alpha>` / `<a:alphaMod>` / `<a:alphaOff>` children of its color
1386
1742
  * element, or `null` when the fill isn't solid or carries no alpha
1387
1743
  * transform (PowerPoint paints it fully opaque). Companion to
1388
1744
  * `getShapeFillColorResolved`, which never carries the alpha channel —
1389
- * OOXML encodes color and alpha independently.
1745
+ * OOXML encodes color and alpha independently. Pass `pres` to resolve the
1746
+ * shape's theme fill reference when no direct fill is present.
1390
1747
  */
1391
- declare const getShapeFillOpacity: (shape: SlideShapeData) => number | null;
1748
+ declare const getShapeFillOpacity: (shape: SlideShapeData, pres?: PresentationData) => number | null;
1392
1749
  /**
1393
1750
  * Same as `getShapeFill` but walks the layout → master placeholder
1394
1751
  * cascade when the shape itself reports `'inherit'`. Returns the first
@@ -1399,6 +1756,105 @@ declare const getShapeFillOpacity: (shape: SlideShapeData) => number | null;
1399
1756
  declare const getShapeFillEffective: (pres: PresentationData, shape: SlideShapeData) => ShapeFill;
1400
1757
  declare const getShapeFill: (shape: SlideShapeData) => ShapeFill;
1401
1758
  //#endregion
1759
+ //#region src/api/fn/theme.d.ts
1760
+ /**
1761
+ * The named color scheme on a presentation's theme. Each slot is a
1762
+ * `#RRGGBB` string — `sysClr` slots are flattened to their cached
1763
+ * `lastClr` value.
1764
+ */
1765
+ interface PresentationTheme {
1766
+ readonly name: string;
1767
+ readonly dark1: string;
1768
+ readonly light1: string;
1769
+ readonly dark2: string;
1770
+ readonly light2: string;
1771
+ readonly accent1: string;
1772
+ readonly accent2: string;
1773
+ readonly accent3: string;
1774
+ readonly accent4: string;
1775
+ readonly accent5: string;
1776
+ readonly accent6: string;
1777
+ readonly hyperlink: string;
1778
+ readonly followedHyperlink: string;
1779
+ }
1780
+ /**
1781
+ * Returns the deck's color scheme as `#RRGGBB` strings, or `null` if
1782
+ * the package carries no theme. Each accent slot maps directly to the
1783
+ * `accent1`–`accent6` chart palette defaults.
1784
+ *
1785
+ * The deck's theme is the one its first slide master references. A
1786
+ * package usually holds more themes than that — notes and handout
1787
+ * masters carry their own, and Google Slides exports name the notes
1788
+ * theme `theme1.xml` ahead of the slide theme `theme2.xml` — so the
1789
+ * slide master relationship decides, not the part name. Multi-master
1790
+ * decks surface the first master's theme only; per-master theme lookup
1791
+ * will land if a concrete user need shows up.
1792
+ */
1793
+ declare const getPresentationTheme: (pres: PresentationData) => PresentationTheme | null;
1794
+ /**
1795
+ * The theme's font scheme, flattened to the typefaces the runs in a
1796
+ * deck inherit by default. `major*` is the heading font (slide
1797
+ * titles, chart titles); `minor*` is the body font.
1798
+ *
1799
+ * Each field carries the Latin / East-Asian / Complex-Script
1800
+ * typeface name as written on the theme. Empty values are
1801
+ * normalized to `null`.
1802
+ */
1803
+ interface PresentationFonts {
1804
+ readonly majorLatin: string | null;
1805
+ readonly majorEastAsian: string | null;
1806
+ readonly majorComplexScript: string | null;
1807
+ readonly minorLatin: string | null;
1808
+ readonly minorEastAsian: string | null;
1809
+ readonly minorComplexScript: string | null;
1810
+ }
1811
+ /**
1812
+ * Returns the deck theme's font scheme, or `null` when the package
1813
+ * carries no theme. This is the presentation-level fallback; shape text
1814
+ * resolution uses `fontsFromThemeRoot` with the shape's owning master theme.
1815
+ */
1816
+ declare const getPresentationFonts: (pres: PresentationData) => PresentationFonts | null;
1817
+ /**
1818
+ * Overwrites the named slots of the deck theme's color
1819
+ * scheme (`<a:clrScheme>`), leaving every other slot untouched. Slot
1820
+ * values are `#RRGGBB` (or 3-digit `#RGB`) strings; every branded
1821
+ * `srgbClr`/`sysClr` slot is normalized to a plain `<a:srgbClr>` on
1822
+ * write, since a theme slot is never a scheme-color reference.
1823
+ *
1824
+ * As with `getPresentationTheme`, multi-master decks are branded via
1825
+ * their first slide master's theme only.
1826
+ *
1827
+ * Throws if the presentation has no theme part, or if a provided color
1828
+ * isn't a valid `#RRGGBB` string.
1829
+ */
1830
+ declare const setPresentationTheme: (pres: PresentationData, theme: Partial<Omit<PresentationTheme, "name">> & {
1831
+ name?: string;
1832
+ }) => void;
1833
+ /**
1834
+ * Typeface overrides for {@link setPresentationFonts}. Unlike
1835
+ * `PresentationFonts` (the read side, where an empty typeface value
1836
+ * flattens to `null`), every field here is a plain string — the
1837
+ * underlying `<a:latin>` / `<a:ea>` / `<a:cs>` elements are mandatory on
1838
+ * a valid theme, so there's no "clear this typeface" operation.
1839
+ */
1840
+ interface PresentationFontsInput {
1841
+ readonly majorLatin?: string;
1842
+ readonly majorEastAsian?: string;
1843
+ readonly majorComplexScript?: string;
1844
+ readonly minorLatin?: string;
1845
+ readonly minorEastAsian?: string;
1846
+ readonly minorComplexScript?: string;
1847
+ }
1848
+ /**
1849
+ * Overwrites the named typefaces of the deck theme's font scheme
1850
+ * (major = headings, minor = body), leaving unset fields untouched. As
1851
+ * with `setPresentationTheme`, only the first slide master's theme is
1852
+ * branded.
1853
+ *
1854
+ * Throws if the presentation has no theme part.
1855
+ */
1856
+ declare const setPresentationFonts: (pres: PresentationData, fonts: PresentationFontsInput) => void;
1857
+ //#endregion
1402
1858
  //#region src/api/fn/shape-gradient-read.d.ts
1403
1859
  /**
1404
1860
  * Returns the full gradient definition (`stops` + `angleDeg`) when the
@@ -1409,19 +1865,25 @@ declare const getShapeFill: (shape: SlideShapeData) => ShapeFill;
1409
1865
  declare const getShapeGradientFill: (shape: SlideShapeData) => ReadGradientFill | null;
1410
1866
  /**
1411
1867
  * Same as `getShapeGradientFill` but walks the layout → master
1412
- * placeholder cascade when the shape itself carries no `<a:gradFill>`.
1413
- * Returns the first gradient found, or `null` when neither the shape
1414
- * nor its inherited placeholder defines one.
1868
+ * placeholder cascade when the shape carries no explicit fill choice.
1869
+ * Stop `resolvedColor` values include the theme, color map, and color transforms.
1870
+ * Returns the first gradient in the placeholder cascade, or `null` when an
1871
+ * explicit non-gradient fill masks the cascade or no layer defines one.
1415
1872
  *
1416
- * Resolves only gradients authored as a literal `<a:gradFill>` on the
1417
- * shape or its placeholder ancestors. Gradients referenced through the
1418
- * theme style matrix (`<p:style><a:fillRef>` → `<a:fillStyleLst>`) are
1419
- * not modelled by the core yet, so those still report `inherit` and
1420
- * fall through here.
1873
+ * Resolves literal gradients on the shape or its placeholder ancestors, and
1874
+ * the shape's own theme style-matrix fill reference. Style references on
1875
+ * placeholder ancestors are not resolved.
1421
1876
  */
1422
1877
  declare const getShapeGradientFillEffective: (pres: PresentationData, shape: SlideShapeData) => ReadGradientFill | null;
1423
1878
  //#endregion
1424
1879
  //#region src/api/fn/shape-fill-stroke.d.ts
1880
+ /**
1881
+ * Replace the preset or custom geometry of a shape, picture, or connector.
1882
+ * Picture geometry clips the image without modifying its bytes or crop.
1883
+ * Existing adjust guides are removed; use `setShapeAdjustValues` afterward
1884
+ * to customize the new preset. Position, size, fill, and effects are preserved.
1885
+ */
1886
+ declare const setShapePreset: (shape: SlideShapeData, preset: PresetShape) => void;
1425
1887
  /** Sets the shape's position in EMU. Companion to `setShapeSize`. */
1426
1888
  declare const setShapePosition: (shape: SlideShapeData, x: Emu, y: Emu) => void;
1427
1889
  /** Sets the shape's size in EMU. */
@@ -1452,8 +1914,22 @@ declare const setShapeFlip: (shape: SlideShapeData, options: {
1452
1914
  horizontal?: boolean;
1453
1915
  vertical?: boolean;
1454
1916
  }) => void;
1455
- /** Sets a solid fill on the shape (color in `#RRGGBB` or scheme token). */
1456
- declare const setShapeFill: (shape: SlideShapeData, color: Color) => void;
1917
+ /**
1918
+ * Paints a shape with the slide background at its position, covering objects
1919
+ * behind it. This is different from a transparent fill. Only ordinary shapes
1920
+ * support the PresentationML `useBgFill` attribute; other kinds throw.
1921
+ */
1922
+ declare const setShapeSlideBackgroundFill: (shape: SlideShapeData) => void;
1923
+ /**
1924
+ * Sets a solid fill. A color string replaces the fill; an options object edits
1925
+ * only supplied properties and preserves existing opacity when changing color.
1926
+ * Opacity ranges from 0 (transparent) to 1 (opaque). Opacity-only edits require
1927
+ * an existing solid fill and preserve its theme reference and color transforms.
1928
+ */
1929
+ declare const setShapeFill: (shape: SlideShapeData, color: Color | {
1930
+ color?: Color;
1931
+ opacity?: number;
1932
+ }) => void;
1457
1933
  /**
1458
1934
  * Sets a linear gradient fill on the shape. Stops must lie in `[0, 1]`;
1459
1935
  * `angleDeg` defaults to `90` (top → bottom).
@@ -1471,20 +1947,28 @@ declare const setShapeGradientFill: (shape: SlideShapeData, options: GradientFil
1471
1947
  *
1472
1948
  * `foreground` is the pattern stroke color; `background` fills behind
1473
1949
  * the pattern. Both accept `#RRGGBB`, bare `RRGGBB`, or scheme tokens
1474
- * (`accent1`, `bg1`, ...).
1950
+ * (`accent1`, `bg1`, ...). Omitted settings preserve existing pattern XML,
1951
+ * including theme references and color transforms. A new pattern defaults to
1952
+ * `pct5`, foreground `accent1` and background `bg1`, as in Mac PowerPoint.
1475
1953
  */
1476
- declare const setShapePatternFill: (shape: SlideShapeData, options: PatternFillOptions) => void;
1954
+ declare const setShapePatternFill: (shape: SlideShapeData, options: Partial<PatternFillOptions>) => void;
1477
1955
  /**
1478
1956
  * Reads back the pattern fill on a shape: returns the preset token
1479
1957
  * plus the foreground / background colors resolved against the theme.
1958
+ * With `preserveTheme`, untransformed scheme colors remain theme tokens.
1959
+ * Transformed colors still resolve to RGB to preserve their appearance.
1480
1960
  * Returns `null` when the shape has no `<a:pattFill>`.
1481
1961
  *
1482
- * The preset string is the literal `ST_PresetPatternVal` token from
1483
- * §20.1.10.49 — e.g. `'pct50'`, `'dkUpDiag'`, `'cross'`, `'wave'`.
1484
- * Renderers can map it onto an SVG `<pattern>` definition.
1962
+ * The preset is the literal `ST_PresetPatternVal` token from §20.1.10.49 —
1963
+ * e.g. `'pct50'`, `'dkUpDiag'`, `'cross'`, `'wave'`. Renderers can map it onto
1964
+ * an SVG `<pattern>` definition, and the result can be handed straight back to
1965
+ * `setShapePatternFill`. A missing or unrecognised `prst` reads as `'pct50'`,
1966
+ * which is what PowerPoint paints when the attribute is absent.
1485
1967
  */
1486
- declare const getShapePatternFill: (pres: PresentationData, shape: SlideShapeData) => {
1487
- preset: string;
1968
+ declare const getShapePatternFill: (pres: PresentationData, shape: SlideShapeData, options?: {
1969
+ readonly preserveTheme?: boolean;
1970
+ }) => {
1971
+ preset: PatternPreset;
1488
1972
  foreground: string;
1489
1973
  background: string;
1490
1974
  } | null;
@@ -1509,20 +1993,25 @@ declare const setShapeNoFill: (shape: SlideShapeData) => void;
1509
1993
  * from the layout / master placeholder it descends from.
1510
1994
  */
1511
1995
  declare const clearShapeFill: (shape: SlideShapeData) => void;
1512
- /** Sets a solid-color outline on the shape. */
1996
+ /** Updates outline color, width and/or opacity (0–1); omitted properties are preserved. */
1513
1997
  declare const setShapeStroke: (shape: SlideShapeData, options: {
1514
1998
  color?: Color;
1515
1999
  widthEmu?: number;
2000
+ opacity?: number;
1516
2001
  }) => void;
1517
2002
  /** Sets an explicit "no outline" on the shape. */
1518
2003
  declare const setShapeNoStroke: (shape: SlideShapeData) => void;
1519
- /** Reads back the shape's stroke dash style, or `null` if none. */
1520
- declare const getShapeStrokeDash: (shape: SlideShapeData) => LineDash | null;
2004
+ /**
2005
+ * Reads back the shape's stroke dash style, or `null` if none. When `pres` is
2006
+ * supplied, a direct partial line is overlaid on the shape's `lnRef` style.
2007
+ */
2008
+ declare const getShapeStrokeDash: (shape: SlideShapeData, pres?: PresentationData) => LineDash | null;
1521
2009
  /**
1522
2010
  * Reads back the shape's arrowhead on one end of `<a:ln>`, or `null`
1523
- * when no `<a:headEnd>` / `<a:tailEnd>` is present.
2011
+ * when no `<a:headEnd>` / `<a:tailEnd>` is present. When `pres` is supplied,
2012
+ * a direct partial line is overlaid on the shape's `lnRef` style.
1524
2013
  */
1525
- declare const getShapeStrokeArrow: (shape: SlideShapeData, end: "head" | "tail") => ArrowOptions | null;
2014
+ declare const getShapeStrokeArrow: (shape: SlideShapeData, end: "head" | "tail", pres?: PresentationData) => ArrowOptions | null;
1526
2015
  /**
1527
2016
  * Sets the dash pattern for the shape's outline (`<a:prstDash>`). One
1528
2017
  * of ECMA-376's `ST_PresetLineDashVal` tokens:
@@ -1609,6 +2098,8 @@ type ShapeEffect = {
1609
2098
  */
1610
2099
  type ShapeEffectAny = {
1611
2100
  readonly kind: 'outerShdw';
2101
+ readonly alignment?: ShadowOptions['alignment'];
2102
+ readonly rotateWithShape?: boolean;
1612
2103
  readonly color: string;
1613
2104
  readonly opacity?: number;
1614
2105
  readonly blurEmu: number;
@@ -1630,7 +2121,15 @@ type ShapeEffectAny = {
1630
2121
  readonly kind: 'reflection';
1631
2122
  readonly opacity?: number;
1632
2123
  readonly startOpacity?: number;
2124
+ readonly startPosition?: number;
2125
+ readonly endPosition?: number;
2126
+ readonly fadeDirection?: number;
2127
+ readonly scaleX?: number;
2128
+ readonly alignment?: 'tl' | 't' | 'tr' | 'l' | 'ctr' | 'r' | 'bl' | 'b' | 'br';
2129
+ readonly rotateWithShape?: boolean;
1633
2130
  readonly scaleY?: number;
2131
+ readonly skewX?: number;
2132
+ readonly skewY?: number;
1634
2133
  readonly blurEmu: number;
1635
2134
  readonly distEmu: number;
1636
2135
  readonly angleDeg: number;
@@ -1642,6 +2141,15 @@ type ShapeEffectAny = {
1642
2141
  readonly radiusEmu: number;
1643
2142
  };
1644
2143
  declare const getShapeEffect: (shape: SlideShapeData) => ShapeEffect | null;
2144
+ /**
2145
+ * Returns every effect attached to the shape's `<a:effectLst>` in
2146
+ * document order — outer shadow, inner shadow, glow, reflection,
2147
+ * soft edge, blur. Empty array when no effects apply.
2148
+ *
2149
+ * Companion to `getShapeEffect`, which is the v1 "first effect only"
2150
+ * helper. `getShapeEffects` is what renderers want because PowerPoint
2151
+ * composes multiple effects in a single filter (shadow + glow, etc.).
2152
+ */
1645
2153
  declare const getShapeEffects: (pres: PresentationData, shape: SlideShapeData) => readonly ShapeEffectAny[];
1646
2154
  /**
1647
2155
  * Every shape on the slide whose `<a:effectLst>` carries an effect
@@ -1663,27 +2171,67 @@ declare const getShapeEffectsEffective: (pres: PresentationData, shape: SlideSha
1663
2171
  /**
1664
2172
  * Sets an outer drop shadow on the shape. Defaults: black, 4pt blur,
1665
2173
  * 3pt offset, 45° (down-right). Pass `opacity` (0–1) to soften the
1666
- * shadow.
2174
+ * shadow. Replaces an existing drop shadow and leaves the shape's other
2175
+ * effects in place; `clearShapeEffects` is the way to remove them all.
1667
2176
  */
1668
2177
  declare const setShapeShadow: (shape: SlideShapeData, options?: ShadowOptions) => void;
1669
2178
  /**
1670
2179
  * Sets a glow around the shape. The radius is in EMU (default 5pt =
1671
- * 63500). Mutually exclusive with `setShapeShadow` in v1 — calling
1672
- * either replaces the prior `<a:effectLst>` entirely.
2180
+ * 63500). Replaces an existing glow and composes with a shadow, in the
2181
+ * order `CT_EffectList` states.
1673
2182
  */
1674
2183
  declare const setShapeGlow: (shape: SlideShapeData, options: GlowOptions) => void;
1675
2184
  /** Removes any effects (shadow / glow / future presets) from the shape. */
1676
2185
  declare const clearShapeEffects: (shape: SlideShapeData) => void;
1677
2186
  //#endregion
2187
+ //#region src/internal/drawingml/text-body-edit.d.ts
2188
+ type TextCase = 'sentence' | 'lower' | 'upper' | 'title' | 'toggle';
2189
+ //#endregion
1678
2190
  //#region src/api/fn/shape-text.d.ts
1679
2191
  /**
1680
2192
  * Replaces the shape's visible text with `value`. Newlines start a new
1681
- * paragraph. Existing run/paragraph properties are preserved so font,
1682
- * color, size, alignment, and bullet style stay intact. The paragraph-end
1683
- * format (`<a:endParaRPr>`) is not kept; author it with `setShapeParagraphs`.
1684
- */
1685
- declare const setShapeText: (shape: SlideShapeData, value: string, options?: {
2193
+ * paragraph by default; `newlines: 'break'` inserts paragraph-internal `<a:br>` instead.
2194
+ * By default, new paragraphs inherit the first existing run and
2195
+ * paragraph properties (font, color, size, alignment and bullets). The paragraph-end
2196
+ * format (`<a:endParaRPr>`) is not kept by default; author it with `setShapeParagraphs`.
2197
+ * Set `preserveFormatting` for incremental editing: unchanged prefix/suffix runs
2198
+ * and paragraphs retain their XML; inserted text inherits the insertion point's
2199
+ * format. Multiple disjoint changes should be applied separately to retain the
2200
+ * formatting between them. With `range`, `value` replaces exactly that UTF-16
2201
+ * selection and unaffected formatting is always preserved.
2202
+ * Pass `{ case: 'upper' | 'lower' | 'sentence' | 'title' | 'toggle' }` to apply
2203
+ * PowerPoint-style Change Case to the whole text or to `options.range`.
2204
+ */
2205
+ declare const setShapeText: (shape: SlideShapeData, value: string | {
2206
+ case: TextCase;
2207
+ }, options?: {
2208
+ newlines?: "paragraph" | "break";
1686
2209
  bullets?: BulletStyle;
2210
+ preserveFormatting?: boolean;
2211
+ range?: {
2212
+ start: number;
2213
+ end: number;
2214
+ };
2215
+ }) => void;
2216
+ /**
2217
+ * Replaces the shape's text with a single field — text PowerPoint fills in
2218
+ * when it opens the deck, rather than text the file states. `type` is an
2219
+ * ECMA-376 `ST_TextFieldType` token: `'slidenum'` for the slide's number,
2220
+ * `'datetime'` (and its `datetime1`…`datetime13` variants) for the current
2221
+ * date, `'footer'`, `'headerfooter'`, … Unrecognised tokens are written
2222
+ * through, since the list is open and renderers differ on what they honour.
2223
+ *
2224
+ * `options.text` is the cached value stored in `<a:t>`, which is what a reader
2225
+ * that does not evaluate fields shows — PowerPoint overwrites it on open, so
2226
+ * it matters only for other consumers. The shape's first run's formatting is
2227
+ * carried onto the field, the way PowerPoint keeps a placeholder's look when
2228
+ * it inserts one.
2229
+ *
2230
+ * This replaces the whole text body: a field placeholder holds the field and
2231
+ * nothing else, which is how PowerPoint writes slide numbers and dates.
2232
+ */
2233
+ declare const setShapeTextField: (shape: SlideShapeData, type: string, options?: {
2234
+ text?: string;
1687
2235
  }) => void;
1688
2236
  /**
1689
2237
  * Appends `value` to the shape's existing text on a new line. The
@@ -1736,6 +2284,23 @@ declare const getShapeTextWrap: (shape: SlideShapeData) => TextWrap | null;
1736
2284
  * non-text-bearing shape kinds.
1737
2285
  */
1738
2286
  declare const setShapeTextAutoFit: (shape: SlideShapeData, mode: TextAutoFit) => void;
2287
+ /**
2288
+ * Sets the 3-D on the shape's text body — `<a:scene3d>` and `<a:sp3d>` in
2289
+ * `<a:bodyPr>`, where PowerPoint writes its WordArt bevels. `value.scene`
2290
+ * writes the camera and light rig; `bevelTop`, `extrusionHeightEmu`,
2291
+ * `material` and `contourColor` write `<a:sp3d>` (replacing `<a:flatTx>`).
2292
+ * A field left out removes what it describes; settings this API does not
2293
+ * model (camera field of view, bottom bevel, extrusion color, ...) are kept
2294
+ * while their element remains. `null` removes both elements. Throws for
2295
+ * non-text-bearing shape kinds.
2296
+ */
2297
+ declare const setShapeText3D: (shape: SlideShapeData, value: Text3D | null) => void;
2298
+ /**
2299
+ * Reads the 3-D on the shape's own text body (see `setShapeText3D`), or
2300
+ * `null` when its `<a:bodyPr>` has neither `<a:scene3d>` nor `<a:sp3d>`.
2301
+ * Inherited body properties are not consulted.
2302
+ */
2303
+ declare const getShapeText3D: (shape: SlideShapeData) => ReadText3D | null;
1739
2304
  /**
1740
2305
  * Reads back the bodyPr auto-fit child, or `null` when none is
1741
2306
  * present (PowerPoint applies a layout-inherited default in that case).
@@ -1786,9 +2351,9 @@ declare const getShapeTextColumns: (shape: SlideShapeData) => {
1786
2351
  /**
1787
2352
  * Sets the multi-column layout on the shape's text body — writes
1788
2353
  * `<a:bodyPr numCol="N" [spcCol="EMU"]/>`. Pass `null` to clear both
1789
- * attributes so the text body falls back to PowerPoint's default
1790
- * single column. `count` must be in `2..16` (ST_TextColumnCount caps at
1791
- * 16, and single column is the `null` default). `gapEmu`, when omitted,
2354
+ * attributes so the text body inherits its column settings (one column
2355
+ * when no layout/master supplies them). `count` must be in `1..16`;
2356
+ * use `1` to override inherited columns explicitly. `gapEmu`, when omitted,
1792
2357
  * removes any prior `spcCol`. Throws for non-text-bearing shape kinds.
1793
2358
  */
1794
2359
  declare const setShapeTextColumns: (shape: SlideShapeData, columns: {
@@ -1823,7 +2388,7 @@ declare const setShapeTextBodyRotationDeg: (shape: SlideShapeData, rotationDeg:
1823
2388
  *
1824
2389
  * - `horz` — default left-to-right, top-to-bottom (returns `null`).
1825
2390
  * - `vert` — 90° rotation, lines run top-to-bottom, columns right-to-left.
1826
- * - `vert270` — 270° rotation, lines top-to-bottom, columns left-to-right.
2391
+ * - `vert270` — 270° rotation, lines bottom-to-top, columns left-to-right.
1827
2392
  * - `wordArtVert` — characters not rotated, stacked vertically.
1828
2393
  * - `eaVert` — East-Asian vertical: characters upright, columns right-to-left.
1829
2394
  * - `mongolianVert` — Mongolian: rotated 90°, columns left-to-right.
@@ -1836,8 +2401,8 @@ declare const getShapeTextDirection: (shape: SlideShapeData) => "vert" | "vert27
1836
2401
  /**
1837
2402
  * Sets the shape's text-direction via `<a:bodyPr vert="…"/>`. See
1838
2403
  * `getShapeTextDirection` for the meaning of each value. Passing `null`
1839
- * (or `'horz'`) clears the attribute so the shape uses the default
1840
- * horizontal direction. Throws for non-text-bearing shape kinds.
2404
+ * clears the attribute, restoring layout/master inheritance. `'horz'` writes
2405
+ * an explicit horizontal override. Throws for non-text-bearing shape kinds.
1841
2406
  */
1842
2407
  declare const setShapeTextDirection: (shape: SlideShapeData, direction: "horz" | "vert" | "vert270" | "wordArtVert" | "eaVert" | "mongolianVert" | "wordArtVertRtl" | null) => void;
1843
2408
  declare const getShapeTextMargins: (shape: SlideShapeData) => {
@@ -1848,7 +2413,7 @@ declare const getShapeTextMargins: (shape: SlideShapeData) => {
1848
2413
  } | null;
1849
2414
  /**
1850
2415
  * Resolves the effective `<a:bodyPr>` properties — anchor, wrap, vertical
1851
- * direction, and inset margins — by walking the layout / master cascade
2416
+ * direction, inset margins, columns and autofit — by walking the layout / master cascade
1852
2417
  * the same way `getShapeRunFormatEffective` walks rPr. Returns the
1853
2418
  * innermost value that the cascade supplies, or `null` for properties
1854
2419
  * neither the shape nor any inherited placeholder authors.
@@ -1859,6 +2424,10 @@ declare const getShapeTextMargins: (shape: SlideShapeData) => {
1859
2424
  */
1860
2425
  declare const getShapeBodyPrEffective: (pres: PresentationData, shape: SlideShapeData) => {
1861
2426
  anchor: TextAnchor | null;
2427
+ anchorCentered: boolean | null;
2428
+ autoFit: TextAutoFit | null;
2429
+ autoFitParams: ReturnType<typeof getShapeTextAutoFitParams>;
2430
+ columns: ReturnType<typeof getShapeTextColumns>;
1862
2431
  wrap: TextWrap | null;
1863
2432
  vert: ReturnType<typeof getShapeTextDirection>;
1864
2433
  margins: {
@@ -1868,41 +2437,244 @@ declare const getShapeBodyPrEffective: (pres: PresentationData, shape: SlideShap
1868
2437
  bottom: number | null;
1869
2438
  };
1870
2439
  };
1871
- declare const setShapeTextAnchor: (shape: SlideShapeData, anchor: TextAnchor) => void;
1872
2440
  /**
1873
- * Sets the internal margins of the shape's text frame in EMU. Each
1874
- * side is independent; omitted sides keep their current value (or the
1875
- * layout-inherited default when the attribute is absent).
2441
+ * Sets vertical anchoring. `centered` centers the text block without changing
2442
+ * paragraph alignment (PowerPoint's Top / Middle / Bottom Centered options).
2443
+ * Omit it to preserve centering; pass null to restore inherited centering.
2444
+ */
2445
+ declare const setShapeTextAnchor: (shape: SlideShapeData, anchor: TextAnchor, options?: {
2446
+ centered?: boolean | null;
2447
+ }) => void;
2448
+ /**
2449
+ * Sets the internal margins of the shape's text frame in EMU. Each
2450
+ * side is independent; omitted sides keep their current value (or the
2451
+ * layout-inherited default when the attribute is absent).
2452
+ *
2453
+ * PowerPoint's defaults for a textbox: left/right 91440 (0.1in),
2454
+ * top/bottom 45720 (0.05in).
2455
+ *
2456
+ * setShapeTextMargins(shape, { left: 0, right: 0 }); // flush-left text
2457
+ */
2458
+ declare const setShapeTextMargins: (shape: SlideShapeData, margins: {
2459
+ left?: number;
2460
+ top?: number;
2461
+ right?: number;
2462
+ bottom?: number;
2463
+ }) => void;
2464
+ /** Sets the bullet style on every paragraph in the shape's text body. */
2465
+ declare const setShapeBulletStyle: (shape: SlideShapeData, style: BulletStyle) => void;
2466
+ /** Sets the horizontal alignment of every paragraph in the shape's text. */
2467
+ declare const setShapeAlignment: (shape: SlideShapeData, align: ParagraphAlignment) => void;
2468
+ /**
2469
+ * Applies `format` to every run in the shape's text. Run-property
2470
+ * attributes not addressed by `format` are preserved, so partial
2471
+ * updates compose. Optional `range` selects UTF-16 offsets in `getShapeText`,
2472
+ * with an exclusive end. Paragraph separators and line breaks each count as one
2473
+ * character. Empty ranges do nothing; invalid or split-surrogate boundaries throw.
2474
+ * Partially selected fields become literal runs; fully selected fields stay fields.
2475
+ * Pass a zero-based `paragraphEnd` instead of `range` to update a paragraph's end mark
2476
+ * without rebuilding its runs or paragraph properties.
2477
+ * With `reset`, clears direct visual run properties before applying `format`,
2478
+ * restoring inherited fonts and appearance while keeping links and language.
2479
+ * Without either target, also clears text-body and paragraph run-format defaults.
2480
+ * Blank autoshapes receive a text body and paragraph-end formatting for future input.
2481
+ */
2482
+ declare const setShapeTextFormat: (shape: SlideShapeData, format: TextFormat, options?: {
2483
+ range?: {
2484
+ start: number;
2485
+ end: number;
2486
+ };
2487
+ reset?: boolean;
2488
+ paragraphEnd?: never;
2489
+ } | {
2490
+ paragraphEnd: number;
2491
+ reset?: boolean;
2492
+ range?: never;
2493
+ }) => void;
2494
+ /**
2495
+ * Replaces the shape's text with explicitly structured paragraphs, each
2496
+ * carrying its own runs and per-run formats. `setShapeText` yields one run
2497
+ * per paragraph; use this when a paragraph mixes formats (a bold lead-in
2498
+ * followed by plain text, for example). Read back with
2499
+ * `getShapeParagraphElements`.
2500
+ * Pass `{ source, range? }` to copy existing paragraph XML, including fields,
2501
+ * run formatting, bullets and remapped relationships. The optional range uses
2502
+ * UTF-16 offsets with an exclusive end; omitted range copies all source text.
2503
+ * Pass an array of targets and `{ source, ranges }` to distribute ranges in one
2504
+ * batch. All ranges are read before any target changes, including when the source
2505
+ * is a target. Each target must have a corresponding range.
2506
+ * Pass `{ sources }` to concatenate complete paragraph sequences in order,
2507
+ * preserving fields, paragraph properties and relationships across slides.
2508
+ * A single target with `{ source, ranges }` concatenates those ranges in order.
2509
+ * Target body properties and list styles remain unchanged.
2510
+ */
2511
+ declare function setShapeParagraphs(shape: SlideShapeData, paragraphs: ReadonlyArray<ParagraphSpec> | {
2512
+ source: SlideShapeData;
2513
+ range?: {
2514
+ start: number;
2515
+ end: number;
2516
+ };
2517
+ } | {
2518
+ sources: ReadonlyArray<SlideShapeData>;
2519
+ } | {
2520
+ source: SlideShapeData;
2521
+ ranges: ReadonlyArray<{
2522
+ start: number;
2523
+ end: number;
2524
+ }>;
2525
+ }): void;
2526
+ declare function setShapeParagraphs(shapes: ReadonlyArray<SlideShapeData>, paragraphs: {
2527
+ source: SlideShapeData;
2528
+ ranges: ReadonlyArray<{
2529
+ start: number;
2530
+ end: number;
2531
+ }>;
2532
+ }): void;
2533
+ //#endregion
2534
+ //#region src/api/fn/shape-paragraph.d.ts
2535
+ /**
2536
+ * Resolves a run's effective character properties by walking the
2537
+ * ECMA-376 §21.1.2.4.7 inheritance chain — run rPr →
2538
+ * pPr defRPr → text-body lstStyle → shape Quick Style → layout placeholder
2539
+ * lstStyle → master placeholder lstStyle + master txStyles → owning theme
2540
+ * fontScheme.
2541
+ *
2542
+ * Each property (font, size, color, bold, italic, underline) is
2543
+ * resolved independently: the innermost layer that supplies a value
2544
+ * wins for that one property.
2545
+ *
2546
+ * Returns a non-null `TextFormat`; fields the cascade couldn't
2547
+ * resolve are simply absent (the renderer falls back to placeholder
2548
+ * defaults).
2549
+ *
2550
+ * Use `getShapeRunFormat` if you only want the literal `<a:rPr>` on
2551
+ * the run without inheritance. Numeric indices count only regular runs;
2552
+ * `{ fieldIndex }` and `{ breakIndex }` count fields and line breaks separately;
2553
+ * null resolves the paragraph end mark.
2554
+ * `inheritanceSource` supplies the original
2555
+ * placeholder and slide context when reading a detached editing preview;
2556
+ * paragraph and run properties are still read from `shape`.
2557
+ */
2558
+ declare const getShapeRunFormatEffective: (pres: PresentationData, shape: SlideShapeData, paragraphIndex: number, runIndex: number | null | {
2559
+ readonly fieldIndex: number;
2560
+ } | {
2561
+ readonly breakIndex: number;
2562
+ }, options?: {
2563
+ inheritanceSource?: SlideShapeData;
2564
+ }) => ReadTextFormat;
2565
+ /** A custom paragraph tab stop. */
2566
+ interface ParagraphTabStop {
2567
+ /** Position relative to the left margin, in EMU. */
2568
+ positionEmu: number;
2569
+ alignment: 'left' | 'center' | 'right' | 'decimal';
2570
+ }
2571
+ /** Effective bullet detail returned by `getParagraphPropertiesEffective`. */
2572
+ interface ParagraphBulletDetail {
2573
+ color: string | null;
2574
+ colorFollowText: boolean;
2575
+ sizePct: number | null;
2576
+ sizePts: number | null;
2577
+ sizeFollowText: boolean;
2578
+ font: string | null;
2579
+ fontFollowText: boolean;
2580
+ }
2581
+ /** Effective paragraph properties returned by `getParagraphPropertiesEffective`. */
2582
+ interface ParagraphProperties {
2583
+ /** Custom tab stops; an empty list explicitly clears inherited stops. */
2584
+ tabStops?: ParagraphTabStop[];
2585
+ /** Distance between automatic tab stops, in EMU. */
2586
+ defaultTabSizeEmu?: number;
2587
+ /** Horizontal alignment per `ParagraphAlignment`. */
2588
+ align: ParagraphAlignment | null;
2589
+ /** East Asian line-breaking rules; absent when not authored or inherited. */
2590
+ asianLineBreak?: boolean;
2591
+ /** Allow a Latin word to break across lines. */
2592
+ latinLineBreak?: boolean;
2593
+ /** Allow punctuation to extend beyond the text margin. */
2594
+ hangingPunctuation?: boolean;
2595
+ /** Vertical alignment of differently sized characters within a line. */
2596
+ fontAlignment?: 'auto' | 'top' | 'center' | 'baseline' | 'bottom';
2597
+ /** Outline level (0..8). 0 = top-level paragraph. */
2598
+ level: number;
2599
+ /** Left indent in EMU. */
2600
+ marL: number | null;
2601
+ /** Right indent in EMU. */
2602
+ marR: number | null;
2603
+ /** First-line indent in EMU; negative for hanging indents. */
2604
+ indent: number | null;
2605
+ /** Line spacing — either a percent multiplier or a fixed point value. */
2606
+ lineSpacing: {
2607
+ readonly kind: 'pct';
2608
+ readonly value: number;
2609
+ } | {
2610
+ readonly kind: 'pts';
2611
+ readonly value: number;
2612
+ } | null;
2613
+ /** Space before the paragraph in points. */
2614
+ spcBefPts: number | null;
2615
+ /** Space after the paragraph in points. */
2616
+ spcAftPts: number | null;
2617
+ /** Right-to-left paragraph (`<a:pPr rtl="1"/>`). */
2618
+ rtl: boolean | null;
2619
+ /**
2620
+ * Bullet resolved through the cascade (`<a:buChar>` / `<a:buAutoNum>` /
2621
+ * `<a:buNone>`). Master `bodyStyle` levels author the PowerPoint default
2622
+ * "•", so body placeholders get their bullet from here even when no
2623
+ * slide-level `<a:pPr>` carries one.
2624
+ */
2625
+ bullet: BulletStyle | null;
2626
+ /** Bullet color, size, and font after paragraph/layout/master inheritance. */
2627
+ bulletDetail?: ParagraphBulletDetail;
2628
+ }
2629
+ /**
2630
+ * Resolves a paragraph's effective properties by walking the same
2631
+ * inheritance chain `getShapeRunFormatEffective` uses, but for the
2632
+ * paragraph-level surface:
2633
+ *
2634
+ * - alignment, indent (left / right / first-line), line spacing,
2635
+ * paragraph spacing (before / after), rtl.
2636
+ *
2637
+ * Each property is resolved independently; the innermost layer that
2638
+ * sets it wins. Fields the cascade can't resolve come through as `null`
2639
+ * so renderers know to fall back to their own defaults.
2640
+ *
2641
+ * Companion to `getParagraphAlignment` / `getParagraphLineSpacing` /
2642
+ * `getParagraphIndent` / `getParagraphSpacing`, which only surface the
2643
+ * literal `<a:pPr>` and skip the layout / master cascade.
2644
+ * `inheritanceSource` preserves the original placeholder and slide context
2645
+ * when resolving a detached shape preview. Table cells use their own text body.
2646
+ */
2647
+ declare const getParagraphPropertiesEffective: (pres: PresentationData, shape: SlideShapeData | TableCellData, paragraphIndex: number, options?: {
2648
+ inheritanceSource?: SlideShapeData;
2649
+ }) => ParagraphProperties;
2650
+ /**
2651
+ * Applies `format` to a single run. Run-property attributes not
2652
+ * addressed by `format` are preserved — partial updates compose.
1876
2653
  *
1877
- * PowerPoint's defaults for a textbox: left/right 91440 (0.1in),
1878
- * top/bottom 45720 (0.05in).
2654
+ * Example: bold the second word of the first paragraph:
1879
2655
  *
1880
- * setShapeTextMargins(shape, { left: 0, right: 0 }); // flush-left text
2656
+ * setShapeRunFormat(shape, 0, 1, { bold: true, color: '#FF0000' });
1881
2657
  */
1882
- declare const setShapeTextMargins: (shape: SlideShapeData, margins: {
1883
- left?: number;
1884
- top?: number;
1885
- right?: number;
1886
- bottom?: number;
1887
- }) => void;
1888
- /** Sets the bullet style on every paragraph in the shape's text body. */
1889
- declare const setShapeBulletStyle: (shape: SlideShapeData, style: BulletStyle) => void;
1890
- /** Sets the horizontal alignment of every paragraph in the shape's text. */
1891
- declare const setShapeAlignment: (shape: SlideShapeData, align: ParagraphAlignment) => void;
2658
+ declare const setShapeRunFormat: (shape: SlideShapeData, paragraphIndex: number, runIndex: number, format: TextFormat) => void;
1892
2659
  /**
1893
- * Applies `format` to every run in the shape's text. Run-property
1894
- * attributes not addressed by `format` are preserved, so partial
1895
- * updates compose.
2660
+ * Reads the external URL the first run in the shape's text-body links
2661
+ * to (set via `setShapeHyperlink`). Returns `null` when no run carries
2662
+ * an `<a:hlinkClick r:id=…/>` or the rId resolves to a non-hyperlink
2663
+ * target.
1896
2664
  */
1897
- declare const setShapeTextFormat: (shape: SlideShapeData, format: TextFormat) => void;
2665
+ declare const getShapeHyperlink: (shape: SlideShapeData) => string | null;
1898
2666
  /**
1899
- * Replaces the shape's text with explicitly structured paragraphs, each
1900
- * carrying its own runs and per-run formats. `setShapeText` yields one run
1901
- * per paragraph; use this when a paragraph mixes formats (a bold lead-in
1902
- * followed by plain text, for example). Read back with
1903
- * `getShapeParagraphElements`.
2667
+ * Sets an external hyperlink on every run in the shape's text. Allocates
2668
+ * (or reuses) a `hyperlink` relationship on the slide's `.rels`. Pass
2669
+ * `null` to clear. Optional `range` limits the change to UTF-16 offsets in
2670
+ * getShapeText, preserving text and formatting outside the selection.
1904
2671
  */
1905
- declare const setShapeParagraphs: (shape: SlideShapeData, paragraphs: ReadonlyArray<ParagraphSpec>) => void;
2672
+ declare const setShapeHyperlink: (shape: SlideShapeData, url: string | null, tooltip?: string, options?: {
2673
+ range?: {
2674
+ start: number;
2675
+ end: number;
2676
+ };
2677
+ }) => void;
1906
2678
  //#endregion
1907
2679
  //#region src/api/fn/comments.d.ts
1908
2680
  /**
@@ -1990,22 +2762,13 @@ declare const getCommentsSortedByDate: (pres: PresentationData) => ReadonlyArray
1990
2762
  declare const getSlideCommentAuthors: (slide: SlideData) => ReadonlyArray<CommentAuthor>;
1991
2763
  /**
1992
2764
  * Returns every comment attached to the slide, with the author already
1993
- * resolved. The list is read-only — use `addSlideComment` /
2765
+ * resolved. Both formats are read: the ECMA-376 `<p:cm>` list first, then
2766
+ * the modern threads. The list is read-only — use `addSlideComment` /
1994
2767
  * `removeSlideComment` to mutate.
1995
2768
  */
1996
2769
  declare const getSlideComments: (slide: SlideData) => ReadonlyArray<SlideCommentData>;
1997
- /**
1998
- * Adds a comment to the slide. Returns the new comment handle.
1999
- *
2000
- * Author handling: if an author with the given `name`+`initials` already
2001
- * exists in `commentAuthors.xml`, the existing record is reused (and its
2002
- * `lastIdx` is bumped). Otherwise a new author is allocated. `initials`
2003
- * defaults to the first character of `name`.
2004
- *
2005
- * `position` is in EMU; pass `null` to omit the `<p:pos>` element.
2006
- * `date` defaults to the current time.
2007
- */
2008
- declare const addSlideComment: (slide: SlideData, opts: {
2770
+ /** Options shared by both comment formats. */
2771
+ interface AddCommentOptions {
2009
2772
  author: {
2010
2773
  name: string;
2011
2774
  initials?: string;
@@ -2013,9 +2776,35 @@ declare const addSlideComment: (slide: SlideData, opts: {
2013
2776
  text: string;
2014
2777
  position?: CommentPosition | null;
2015
2778
  date?: Date;
2016
- }) => SlideCommentData;
2779
+ /** Existing comment on this slide to reply to. */
2780
+ replyTo?: SlideCommentData;
2781
+ }
2782
+ /**
2783
+ * Adds a comment to the slide. Returns the new comment handle.
2784
+ *
2785
+ * Which format it is written in follows the file rather than the caller: a
2786
+ * reply joins its own thread, and a new thread goes where the slide — or,
2787
+ * failing that, the deck — already keeps its comments. Only a deck with no
2788
+ * comments at all starts an ECMA-376 `<p:cm>` list, which everything can
2789
+ * read.
2790
+ *
2791
+ * Author handling: if an author with the given `name`+`initials` already
2792
+ * exists in the relevant author list, the existing record is reused (and, in
2793
+ * the legacy list, its `lastIdx` is bumped). Otherwise a new author is
2794
+ * allocated. `initials` defaults to the first character of `name`.
2795
+ *
2796
+ * `position` is the comment pin, in EMU. The legacy schema makes `<p:pos>`
2797
+ * mandatory, so a legacy comment added without one is pinned to the slide's
2798
+ * origin rather than written without the element; the modern schema makes it
2799
+ * optional, so a modern comment added without one has no pin.
2800
+ *
2801
+ * `date` defaults to the current time.
2802
+ */
2803
+ declare const addSlideComment: (slide: SlideData, opts: AddCommentOptions) => SlideCommentData;
2804
+ /** Updates comment text while retaining author, date, position, and extension XML. */
2805
+ declare const setCommentText: (comment: SlideCommentData, text: string) => void;
2017
2806
  /**
2018
- * Removes the comment from its slide's comments part. If the comment
2807
+ * Removes the comment and all its replies from its slide's comments part. If the comment
2019
2808
  * was the last one on the slide, the comments part and the
2020
2809
  * slide → comments rel are also removed. The author entry in
2021
2810
  * `commentAuthors.xml` is left intact (an author may have comments on
@@ -2025,7 +2814,7 @@ declare const removeSlideComment: (comment: SlideCommentData) => void;
2025
2814
  /**
2026
2815
  * Strips every comment from every slide in the deck. Returns the
2027
2816
  * number of comments removed. Built on `writeCommentsForSlide`,
2028
- * so each slide's modern comment part is rewritten with an empty
2817
+ * so each slide's legacy comment part is rewritten with an empty
2029
2818
  * list. The `commentAuthors.xml` registry is left intact for any
2030
2819
  * caller that still needs author identity.
2031
2820
  *
@@ -2049,6 +2838,30 @@ declare const getCommentPosition: (comment: SlideCommentData) => CommentPosition
2049
2838
  * slide each hit came from.
2050
2839
  */
2051
2840
  declare const getCommentSlide: (comment: SlideCommentData) => SlideData;
2841
+ /** Parent handle from the same read, or null for roots and missing parents. */
2842
+ declare const getCommentParent: (comment: SlideCommentData) => SlideCommentData | null;
2843
+ /**
2844
+ * Which of the two comment formats this handle came from. `'legacy'` is the
2845
+ * ECMA-376 `<p:cm>` list every reader understands; `'modern'` is the
2846
+ * `<p188:cm>` thread PowerPoint 2021 and Microsoft 365 write.
2847
+ */
2848
+ declare const getCommentFormat: (comment: SlideCommentData) => "legacy" | "modern";
2849
+ /**
2850
+ * Whether the thread has been resolved. `null` where the question does not
2851
+ * apply or cannot be answered: a legacy comment, which has nowhere to record
2852
+ * it, or a modern one whose file states a status this schema version does not
2853
+ * define.
2854
+ */
2855
+ declare const getCommentStatus: (comment: SlideCommentData) => CommentStatus | null;
2856
+ /**
2857
+ * Resolves a thread, reopens it (`'active'`), or closes it. Replies carry a
2858
+ * status of their own, so this works on any modern comment.
2859
+ *
2860
+ * Throws for a legacy comment: the ECMA-376 schema has no place to put it,
2861
+ * and quietly doing nothing would leave the caller believing a thread had
2862
+ * been resolved.
2863
+ */
2864
+ declare const setCommentStatus: (comment: SlideCommentData, status: CommentStatus) => void;
2052
2865
  //#endregion
2053
2866
  //#region src/api/fn/shape-image.d.ts
2054
2867
  /**
@@ -2061,9 +2874,9 @@ declare const getCommentSlide: (comment: SlideCommentData) => SlideData;
2061
2874
  */
2062
2875
  type ImageFit = 'fill' | 'contain';
2063
2876
  /**
2064
- * Replaces a picture's media with `bytes`. Same-format replacements
2065
- * write in place; cross-format replacements allocate a new media part
2066
- * and repoint the rel. The geometry — crop, transform — is preserved.
2877
+ * Replaces only this picture's media with `bytes`, detaching shared media
2878
+ * or relationships when necessary. Unshared same-format media is updated
2879
+ * in place. The geometry — crop, transform — is preserved.
2067
2880
  *
2068
2881
  * Pass `options.fit: 'contain'` to re-fit the picture's extent to the
2069
2882
  * replacement image's aspect ratio, inscribed and centered in the shape's
@@ -2092,6 +2905,14 @@ type ShapeClickAction = {
2092
2905
  readonly kind: 'firstSlide';
2093
2906
  } | {
2094
2907
  readonly kind: 'lastSlide';
2908
+ } | {
2909
+ readonly kind: 'lastSlideViewed';
2910
+ } | {
2911
+ readonly kind: 'endShow';
2912
+ } | {
2913
+ readonly kind: 'customShow';
2914
+ readonly id: number;
2915
+ readonly returnToShow: boolean;
2095
2916
  };
2096
2917
  /**
2097
2918
  * Reads the click action attached to the shape's cNvPr, or `null` if
@@ -2101,6 +2922,7 @@ type ShapeClickAction = {
2101
2922
  * - `{ kind: 'slide', slide }` — `slide` rel + `ppaction://hlinksldjump`
2102
2923
  * - `{ kind: 'nextSlide' | 'prevSlide' | 'firstSlide' | 'lastSlide' }`
2103
2924
  * — preset show-navigation `ppaction`.
2925
+ * - `{ kind: 'customShow', id, returnToShow }` — a named custom show.
2104
2926
  *
2105
2927
  * For `kind: 'slide'`, the matching slide is resolved by part name.
2106
2928
  * Returns `null` for unknown `ppaction` strings.
@@ -2115,14 +2937,24 @@ declare const getShapeClickAction: (shape: SlideShapeData) => ShapeClickAction |
2115
2937
  * - For `kind: 'slide'`, a `slide` rel is added pointing at the
2116
2938
  * target slide's part. The `<a:hlinkClick>` carries
2117
2939
  * `action="ppaction://hlinksldjump"`.
2118
- * - For the preset navigations (`nextSlide`, `prevSlide`, ...), no rel
2119
- * is allocated; just the `action` attribute carries the preset.
2940
+ * - For preset navigations and `customShow`, no rel is allocated; just the
2941
+ * `action` attribute carries the destination.
2120
2942
  * - `null` removes any existing `<a:hlinkClick>`.
2121
2943
  *
2944
+ * Optional `range` applies the action to selected UTF-16 text offsets instead
2945
+ * of the whole shape, preserving links and formatting outside the range.
2946
+ * Optional `tooltip` sets the link description; omission clears an old description.
2947
+ *
2122
2948
  * The shape must be one of `shape | picture | connector | graphicFrame`.
2123
2949
  * Groups don't carry their own click action in our model.
2124
2950
  */
2125
- declare const setShapeClickAction: (shape: SlideShapeData, action: ShapeClickAction | null) => void;
2951
+ declare const setShapeClickAction: (shape: SlideShapeData, action: ShapeClickAction | null, options?: {
2952
+ range?: {
2953
+ start: number;
2954
+ end: number;
2955
+ };
2956
+ tooltip?: string;
2957
+ }) => void;
2126
2958
  //#endregion
2127
2959
  //#region src/internal/chartml/types.d.ts
2128
2960
  /**
@@ -2673,8 +3505,13 @@ interface ChartSecondaryValueAxis {
2673
3505
  readonly tickLabelPos?: 'none' | 'low' | 'high' | 'nextTo';
2674
3506
  readonly crossBetween?: 'between' | 'midCat';
2675
3507
  }
2676
- /** Full chart specification. */
2677
- interface ChartSpec {
3508
+ /**
3509
+ * Every field a chart can carry, with no cross-field rules applied — the
3510
+ * shape `readChartSpec` returns. A deck authored elsewhere can combine
3511
+ * fields that this library would never write together, so the read type
3512
+ * stays permissive; `ChartSpec` is the closed, write-side domain.
3513
+ */
3514
+ interface ReadChartSpec {
2678
3515
  readonly kind: ChartKind;
2679
3516
  /** Category labels along the x-axis (or pie slice labels for `kind: 'pie'`). */
2680
3517
  readonly categories: ReadonlyArray<string>;
@@ -3143,6 +3980,182 @@ interface ChartSpec {
3143
3980
  readonly categoryAxisLineHidden?: boolean;
3144
3981
  }
3145
3982
  //#endregion
3983
+ //#region src/internal/chartml/chart-spec.d.ts
3984
+ /** Field of a chart whose availability depends on the kind. */
3985
+ type SpecField = Exclude<keyof ReadChartSpec, 'kind' | 'series'>;
3986
+ /**
3987
+ * A kind's field set: `K` as declared on `ReadChartSpec`, and every other
3988
+ * field closed off. The `?: never` arms are what turn a field the kind
3989
+ * cannot draw into a compile error.
3990
+ */
3991
+ type Fields<K extends SpecField> = Pick<ReadChartSpec, K> & { readonly [P in Exclude<SpecField, K>]?: never };
3992
+ /** Per-variant field sets; the variant types below are derived from these. */
3993
+ declare const VARIANT_FIELDS: {
3994
+ readonly combo: readonly ["categories", "title", "titleStyle", "titleOverlay", "titleLayout", "dataLabels", "legend", "plotAreaLayout", "plotAreaFill", "plotAreaStrokeColor", "chartAreaFill", "chartAreaStrokeColor", "plotVisibleCellsOnly", "dispBlanksAs", "date1904", "language", "roundedCorners", "chartStyle", "varyColors", "valueAxis", "valueAxisTitle", "valueAxisTitleStyle", "valueAxisTitleRotationDeg", "valueAxisLabelStyle", "valueAxisLabelRotationDeg", "valueAxisHidden", "valueAxisMajorGridlines", "valueAxisMinorGridlines", "valueAxisMajorGridlineColor", "valueAxisMinorGridlineColor", "valueAxisMajorGridlineWidthEmu", "valueAxisMinorGridlineWidthEmu", "valueAxisMajorTickMark", "valueAxisMinorTickMark", "valueAxisTickLabelPos", "valueAxisLineColor", "valueAxisLineWidthEmu", "valueAxisLineHidden", "valueAxisOrientation", "valueAxisCrosses", "valueAxisCrossBetween", "categoryAxisTitle", "categoryAxisTitleStyle", "categoryAxisTitleRotationDeg", "categoryAxisLabelStyle", "categoryAxisLabelRotationDeg", "categoryAxisHidden", "categoryAxisMajorGridlines", "categoryAxisMinorGridlines", "categoryAxisMajorGridlineColor", "categoryAxisMinorGridlineColor", "categoryAxisMajorGridlineWidthEmu", "categoryAxisMinorGridlineWidthEmu", "categoryAxisMajorTickMark", "categoryAxisMinorTickMark", "categoryAxisTickLabelPos", "categoryAxisLineColor", "categoryAxisLineWidthEmu", "categoryAxisLineHidden", "categoryAxisOrientation", "categoryAxisNumberFormat", "categoryAxisTickLabelSkip", "categoryAxisTickMarkSkip", "categoryAxisLabelOffset", "categoryAxisLabelAlign", "categoryAxisNoMultiLevelLabel", "categoryAxisDate", "categoryAxisScaling", "categoryGroupLevels", "dataTable", "grouping", "gapWidthPct", "overlapPct", "dropLines", "hiLowLines", "lineMarkers", "upDownBars", "secondaryValueAxis"];
3995
+ readonly bar3D: readonly ["categories", "title", "titleStyle", "titleOverlay", "titleLayout", "dataLabels", "legend", "plotAreaLayout", "plotAreaFill", "plotAreaStrokeColor", "chartAreaFill", "chartAreaStrokeColor", "plotVisibleCellsOnly", "dispBlanksAs", "date1904", "language", "roundedCorners", "chartStyle", "varyColors", "valueAxis", "valueAxisTitle", "valueAxisTitleStyle", "valueAxisTitleRotationDeg", "valueAxisLabelStyle", "valueAxisLabelRotationDeg", "valueAxisHidden", "valueAxisMajorGridlines", "valueAxisMinorGridlines", "valueAxisMajorGridlineColor", "valueAxisMinorGridlineColor", "valueAxisMajorGridlineWidthEmu", "valueAxisMinorGridlineWidthEmu", "valueAxisMajorTickMark", "valueAxisMinorTickMark", "valueAxisTickLabelPos", "valueAxisLineColor", "valueAxisLineWidthEmu", "valueAxisLineHidden", "valueAxisOrientation", "valueAxisCrosses", "valueAxisCrossBetween", "categoryAxisTitle", "categoryAxisTitleStyle", "categoryAxisTitleRotationDeg", "categoryAxisLabelStyle", "categoryAxisLabelRotationDeg", "categoryAxisHidden", "categoryAxisMajorGridlines", "categoryAxisMinorGridlines", "categoryAxisMajorGridlineColor", "categoryAxisMinorGridlineColor", "categoryAxisMajorGridlineWidthEmu", "categoryAxisMinorGridlineWidthEmu", "categoryAxisMajorTickMark", "categoryAxisMinorTickMark", "categoryAxisTickLabelPos", "categoryAxisLineColor", "categoryAxisLineWidthEmu", "categoryAxisLineHidden", "categoryAxisOrientation", "categoryAxisNumberFormat", "categoryAxisTickLabelSkip", "categoryAxisTickMarkSkip", "categoryAxisLabelOffset", "categoryAxisLabelAlign", "categoryAxisNoMultiLevelLabel", "categoryAxisDate", "categoryAxisScaling", "categoryGroupLevels", "dataTable", "grouping", "gapWidthPct", "gapDepthPct", "bar3DShape", "seriesAxis", "view3D"];
3996
+ readonly lineArea3D: readonly ["categories", "title", "titleStyle", "titleOverlay", "titleLayout", "dataLabels", "legend", "plotAreaLayout", "plotAreaFill", "plotAreaStrokeColor", "chartAreaFill", "chartAreaStrokeColor", "plotVisibleCellsOnly", "dispBlanksAs", "date1904", "language", "roundedCorners", "chartStyle", "varyColors", "valueAxis", "valueAxisTitle", "valueAxisTitleStyle", "valueAxisTitleRotationDeg", "valueAxisLabelStyle", "valueAxisLabelRotationDeg", "valueAxisHidden", "valueAxisMajorGridlines", "valueAxisMinorGridlines", "valueAxisMajorGridlineColor", "valueAxisMinorGridlineColor", "valueAxisMajorGridlineWidthEmu", "valueAxisMinorGridlineWidthEmu", "valueAxisMajorTickMark", "valueAxisMinorTickMark", "valueAxisTickLabelPos", "valueAxisLineColor", "valueAxisLineWidthEmu", "valueAxisLineHidden", "valueAxisOrientation", "valueAxisCrosses", "valueAxisCrossBetween", "categoryAxisTitle", "categoryAxisTitleStyle", "categoryAxisTitleRotationDeg", "categoryAxisLabelStyle", "categoryAxisLabelRotationDeg", "categoryAxisHidden", "categoryAxisMajorGridlines", "categoryAxisMinorGridlines", "categoryAxisMajorGridlineColor", "categoryAxisMinorGridlineColor", "categoryAxisMajorGridlineWidthEmu", "categoryAxisMinorGridlineWidthEmu", "categoryAxisMajorTickMark", "categoryAxisMinorTickMark", "categoryAxisTickLabelPos", "categoryAxisLineColor", "categoryAxisLineWidthEmu", "categoryAxisLineHidden", "categoryAxisOrientation", "categoryAxisNumberFormat", "categoryAxisTickLabelSkip", "categoryAxisTickMarkSkip", "categoryAxisLabelOffset", "categoryAxisLabelAlign", "categoryAxisNoMultiLevelLabel", "categoryAxisDate", "categoryAxisScaling", "categoryGroupLevels", "dataTable", "grouping", "dropLines", "gapDepthPct", "seriesAxis", "view3D"];
3997
+ readonly pie: readonly ["categories", "title", "titleStyle", "titleOverlay", "titleLayout", "dataLabels", "legend", "plotAreaLayout", "plotAreaFill", "plotAreaStrokeColor", "chartAreaFill", "chartAreaStrokeColor", "plotVisibleCellsOnly", "dispBlanksAs", "date1904", "language", "roundedCorners", "chartStyle", "varyColors", "firstSliceAngleDeg"];
3998
+ readonly ofPie: readonly ["categories", "title", "titleStyle", "titleOverlay", "titleLayout", "dataLabels", "legend", "plotAreaLayout", "plotAreaFill", "plotAreaStrokeColor", "chartAreaFill", "chartAreaStrokeColor", "plotVisibleCellsOnly", "dispBlanksAs", "date1904", "language", "roundedCorners", "chartStyle", "varyColors", "ofPie"];
3999
+ readonly pie3D: readonly ["categories", "title", "titleStyle", "titleOverlay", "titleLayout", "dataLabels", "legend", "plotAreaLayout", "plotAreaFill", "plotAreaStrokeColor", "chartAreaFill", "chartAreaStrokeColor", "plotVisibleCellsOnly", "dispBlanksAs", "date1904", "language", "roundedCorners", "chartStyle", "varyColors", "view3D"];
4000
+ readonly doughnut: readonly ["categories", "title", "titleStyle", "titleOverlay", "titleLayout", "dataLabels", "legend", "plotAreaLayout", "plotAreaFill", "plotAreaStrokeColor", "chartAreaFill", "chartAreaStrokeColor", "plotVisibleCellsOnly", "dispBlanksAs", "date1904", "language", "roundedCorners", "chartStyle", "varyColors", "firstSliceAngleDeg", "holeSizePct"];
4001
+ readonly scatter: readonly ["categories", "title", "titleStyle", "titleOverlay", "titleLayout", "dataLabels", "legend", "plotAreaLayout", "plotAreaFill", "plotAreaStrokeColor", "chartAreaFill", "chartAreaStrokeColor", "plotVisibleCellsOnly", "dispBlanksAs", "date1904", "language", "roundedCorners", "chartStyle", "varyColors", "valueAxis", "valueAxisTitle", "valueAxisTitleStyle", "valueAxisTitleRotationDeg", "valueAxisLabelStyle", "valueAxisLabelRotationDeg", "valueAxisHidden", "valueAxisMajorGridlines", "valueAxisMinorGridlines", "valueAxisMajorGridlineColor", "valueAxisMinorGridlineColor", "valueAxisMajorGridlineWidthEmu", "valueAxisMinorGridlineWidthEmu", "valueAxisMajorTickMark", "valueAxisMinorTickMark", "valueAxisTickLabelPos", "valueAxisLineColor", "valueAxisLineWidthEmu", "valueAxisLineHidden", "valueAxisOrientation", "valueAxisCrosses", "valueAxisCrossBetween", "categoryAxisTitle", "categoryAxisTitleStyle", "categoryAxisTitleRotationDeg", "categoryAxisLabelStyle", "categoryAxisLabelRotationDeg", "categoryAxisHidden", "categoryAxisMajorGridlines", "categoryAxisMinorGridlines", "categoryAxisMajorGridlineColor", "categoryAxisMinorGridlineColor", "categoryAxisMajorGridlineWidthEmu", "categoryAxisMinorGridlineWidthEmu", "categoryAxisMajorTickMark", "categoryAxisMinorTickMark", "categoryAxisTickLabelPos", "categoryAxisLineColor", "categoryAxisLineWidthEmu", "categoryAxisLineHidden", "categoryAxisOrientation", "categoryAxisNumberFormat", "categoryAxisScaling", "scatterStyle"];
4002
+ readonly bubble: readonly ["categories", "title", "titleStyle", "titleOverlay", "titleLayout", "dataLabels", "legend", "plotAreaLayout", "plotAreaFill", "plotAreaStrokeColor", "chartAreaFill", "chartAreaStrokeColor", "plotVisibleCellsOnly", "dispBlanksAs", "date1904", "language", "roundedCorners", "chartStyle", "varyColors", "valueAxis", "valueAxisTitle", "valueAxisTitleStyle", "valueAxisTitleRotationDeg", "valueAxisLabelStyle", "valueAxisLabelRotationDeg", "valueAxisHidden", "valueAxisMajorGridlines", "valueAxisMinorGridlines", "valueAxisMajorGridlineColor", "valueAxisMinorGridlineColor", "valueAxisMajorGridlineWidthEmu", "valueAxisMinorGridlineWidthEmu", "valueAxisMajorTickMark", "valueAxisMinorTickMark", "valueAxisTickLabelPos", "valueAxisLineColor", "valueAxisLineWidthEmu", "valueAxisLineHidden", "valueAxisOrientation", "valueAxisCrosses", "valueAxisCrossBetween", "categoryAxisTitle", "categoryAxisTitleStyle", "categoryAxisTitleRotationDeg", "categoryAxisLabelStyle", "categoryAxisLabelRotationDeg", "categoryAxisHidden", "categoryAxisMajorGridlines", "categoryAxisMinorGridlines", "categoryAxisMajorGridlineColor", "categoryAxisMinorGridlineColor", "categoryAxisMajorGridlineWidthEmu", "categoryAxisMinorGridlineWidthEmu", "categoryAxisMajorTickMark", "categoryAxisMinorTickMark", "categoryAxisTickLabelPos", "categoryAxisLineColor", "categoryAxisLineWidthEmu", "categoryAxisLineHidden", "categoryAxisOrientation", "categoryAxisNumberFormat", "categoryAxisScaling", "bubbleScale", "bubbleSizeRepresents", "bubble3D", "showNegativeBubbles"];
4003
+ readonly radar: readonly ["categories", "title", "titleStyle", "titleOverlay", "titleLayout", "dataLabels", "legend", "plotAreaLayout", "plotAreaFill", "plotAreaStrokeColor", "chartAreaFill", "chartAreaStrokeColor", "plotVisibleCellsOnly", "dispBlanksAs", "date1904", "language", "roundedCorners", "chartStyle", "varyColors", "valueAxis", "valueAxisTitle", "valueAxisTitleStyle", "valueAxisTitleRotationDeg", "valueAxisLabelStyle", "valueAxisLabelRotationDeg", "valueAxisHidden", "valueAxisMajorGridlines", "valueAxisMinorGridlines", "valueAxisMajorGridlineColor", "valueAxisMinorGridlineColor", "valueAxisMajorGridlineWidthEmu", "valueAxisMinorGridlineWidthEmu", "valueAxisMajorTickMark", "valueAxisMinorTickMark", "valueAxisTickLabelPos", "valueAxisLineColor", "valueAxisLineWidthEmu", "valueAxisLineHidden", "valueAxisOrientation", "valueAxisCrosses", "valueAxisCrossBetween", "categoryAxisTitle", "categoryAxisTitleStyle", "categoryAxisTitleRotationDeg", "categoryAxisLabelStyle", "categoryAxisLabelRotationDeg", "categoryAxisHidden", "categoryAxisMajorGridlines", "categoryAxisMinorGridlines", "categoryAxisMajorGridlineColor", "categoryAxisMinorGridlineColor", "categoryAxisMajorGridlineWidthEmu", "categoryAxisMinorGridlineWidthEmu", "categoryAxisMajorTickMark", "categoryAxisMinorTickMark", "categoryAxisTickLabelPos", "categoryAxisLineColor", "categoryAxisLineWidthEmu", "categoryAxisLineHidden", "categoryAxisOrientation", "categoryAxisNumberFormat", "categoryAxisTickLabelSkip", "categoryAxisTickMarkSkip", "categoryAxisLabelOffset", "categoryAxisLabelAlign", "categoryAxisNoMultiLevelLabel", "categoryAxisDate", "categoryAxisScaling", "categoryGroupLevels", "dataTable", "radarStyle"];
4004
+ readonly stock: readonly ["categories", "title", "titleStyle", "titleOverlay", "titleLayout", "dataLabels", "legend", "plotAreaLayout", "plotAreaFill", "plotAreaStrokeColor", "chartAreaFill", "chartAreaStrokeColor", "plotVisibleCellsOnly", "dispBlanksAs", "date1904", "language", "roundedCorners", "chartStyle", "varyColors", "valueAxis", "valueAxisTitle", "valueAxisTitleStyle", "valueAxisTitleRotationDeg", "valueAxisLabelStyle", "valueAxisLabelRotationDeg", "valueAxisHidden", "valueAxisMajorGridlines", "valueAxisMinorGridlines", "valueAxisMajorGridlineColor", "valueAxisMinorGridlineColor", "valueAxisMajorGridlineWidthEmu", "valueAxisMinorGridlineWidthEmu", "valueAxisMajorTickMark", "valueAxisMinorTickMark", "valueAxisTickLabelPos", "valueAxisLineColor", "valueAxisLineWidthEmu", "valueAxisLineHidden", "valueAxisOrientation", "valueAxisCrosses", "valueAxisCrossBetween", "categoryAxisTitle", "categoryAxisTitleStyle", "categoryAxisTitleRotationDeg", "categoryAxisLabelStyle", "categoryAxisLabelRotationDeg", "categoryAxisHidden", "categoryAxisMajorGridlines", "categoryAxisMinorGridlines", "categoryAxisMajorGridlineColor", "categoryAxisMinorGridlineColor", "categoryAxisMajorGridlineWidthEmu", "categoryAxisMinorGridlineWidthEmu", "categoryAxisMajorTickMark", "categoryAxisMinorTickMark", "categoryAxisTickLabelPos", "categoryAxisLineColor", "categoryAxisLineWidthEmu", "categoryAxisLineHidden", "categoryAxisOrientation", "categoryAxisNumberFormat", "categoryAxisTickLabelSkip", "categoryAxisTickMarkSkip", "categoryAxisLabelOffset", "categoryAxisLabelAlign", "categoryAxisNoMultiLevelLabel", "categoryAxisDate", "categoryAxisScaling", "categoryGroupLevels", "dataTable", "dropLines", "hiLowLines"];
4005
+ readonly candlestick: readonly ["categories", "title", "titleStyle", "titleOverlay", "titleLayout", "dataLabels", "legend", "plotAreaLayout", "plotAreaFill", "plotAreaStrokeColor", "chartAreaFill", "chartAreaStrokeColor", "plotVisibleCellsOnly", "dispBlanksAs", "date1904", "language", "roundedCorners", "chartStyle", "varyColors", "valueAxis", "valueAxisTitle", "valueAxisTitleStyle", "valueAxisTitleRotationDeg", "valueAxisLabelStyle", "valueAxisLabelRotationDeg", "valueAxisHidden", "valueAxisMajorGridlines", "valueAxisMinorGridlines", "valueAxisMajorGridlineColor", "valueAxisMinorGridlineColor", "valueAxisMajorGridlineWidthEmu", "valueAxisMinorGridlineWidthEmu", "valueAxisMajorTickMark", "valueAxisMinorTickMark", "valueAxisTickLabelPos", "valueAxisLineColor", "valueAxisLineWidthEmu", "valueAxisLineHidden", "valueAxisOrientation", "valueAxisCrosses", "valueAxisCrossBetween", "categoryAxisTitle", "categoryAxisTitleStyle", "categoryAxisTitleRotationDeg", "categoryAxisLabelStyle", "categoryAxisLabelRotationDeg", "categoryAxisHidden", "categoryAxisMajorGridlines", "categoryAxisMinorGridlines", "categoryAxisMajorGridlineColor", "categoryAxisMinorGridlineColor", "categoryAxisMajorGridlineWidthEmu", "categoryAxisMinorGridlineWidthEmu", "categoryAxisMajorTickMark", "categoryAxisMinorTickMark", "categoryAxisTickLabelPos", "categoryAxisLineColor", "categoryAxisLineWidthEmu", "categoryAxisLineHidden", "categoryAxisOrientation", "categoryAxisNumberFormat", "categoryAxisTickLabelSkip", "categoryAxisTickMarkSkip", "categoryAxisLabelOffset", "categoryAxisLabelAlign", "categoryAxisNoMultiLevelLabel", "categoryAxisDate", "categoryAxisScaling", "categoryGroupLevels", "dataTable", "dropLines", "hiLowLines", "upDownBars"];
4006
+ readonly surface: readonly ["categories", "title", "titleStyle", "titleOverlay", "titleLayout", "dataLabels", "legend", "plotAreaLayout", "plotAreaFill", "plotAreaStrokeColor", "chartAreaFill", "chartAreaStrokeColor", "plotVisibleCellsOnly", "dispBlanksAs", "date1904", "language", "roundedCorners", "chartStyle", "varyColors", "valueAxis", "valueAxisTitle", "valueAxisTitleStyle", "valueAxisTitleRotationDeg", "valueAxisLabelStyle", "valueAxisLabelRotationDeg", "valueAxisHidden", "valueAxisMajorGridlines", "valueAxisMinorGridlines", "valueAxisMajorGridlineColor", "valueAxisMinorGridlineColor", "valueAxisMajorGridlineWidthEmu", "valueAxisMinorGridlineWidthEmu", "valueAxisMajorTickMark", "valueAxisMinorTickMark", "valueAxisTickLabelPos", "valueAxisLineColor", "valueAxisLineWidthEmu", "valueAxisLineHidden", "valueAxisOrientation", "valueAxisCrosses", "valueAxisCrossBetween", "categoryAxisTitle", "categoryAxisTitleStyle", "categoryAxisTitleRotationDeg", "categoryAxisLabelStyle", "categoryAxisLabelRotationDeg", "categoryAxisHidden", "categoryAxisMajorGridlines", "categoryAxisMinorGridlines", "categoryAxisMajorGridlineColor", "categoryAxisMinorGridlineColor", "categoryAxisMajorGridlineWidthEmu", "categoryAxisMinorGridlineWidthEmu", "categoryAxisMajorTickMark", "categoryAxisMinorTickMark", "categoryAxisTickLabelPos", "categoryAxisLineColor", "categoryAxisLineWidthEmu", "categoryAxisLineHidden", "categoryAxisOrientation", "categoryAxisNumberFormat", "categoryAxisTickLabelSkip", "categoryAxisTickMarkSkip", "categoryAxisLabelOffset", "categoryAxisLabelAlign", "categoryAxisNoMultiLevelLabel", "categoryAxisDate", "categoryAxisScaling", "categoryGroupLevels", "dataTable", "surfaceContour", "surfaceWireframe", "view3D", "seriesAxis"];
4007
+ };
4008
+ /** Name of one arm of {@link ChartSpec}. */
4009
+ type ChartVariant = keyof typeof VARIANT_FIELDS;
4010
+ type VariantField<V extends ChartVariant> = (typeof VARIANT_FIELDS)[V][number];
4011
+ /**
4012
+ * Series channels and combo placement are the only parts of a series that
4013
+ * depend on the chart kind; name, styling and per-point overrides are shared.
4014
+ */
4015
+ type ChartSeriesCommon = Omit<ChartSeries, 'xValues' | 'bubbleSizes' | 'chartKind' | 'secondaryAxis'>;
4016
+ /** A series plotted as one value channel against the categories. */
4017
+ type PlainChartSeries = ChartSeriesCommon & {
4018
+ readonly xValues?: never;
4019
+ readonly bubbleSizes?: never;
4020
+ readonly chartKind?: never;
4021
+ readonly secondaryAxis?: never;
4022
+ };
4023
+ /**
4024
+ * A series on a bar / column / line / area chart. Those four share a plot
4025
+ * area, so a series can be drawn as another of them (`chartKind`) or moved
4026
+ * to the secondary value axis.
4027
+ */
4028
+ type ComboChartSeries = ChartSeriesCommon & {
4029
+ readonly xValues?: never;
4030
+ readonly bubbleSizes?: never;
4031
+ readonly chartKind?: 'bar' | 'column' | 'line' | 'area';
4032
+ readonly secondaryAxis?: boolean;
4033
+ };
4034
+ /** A scatter series: an x channel paired with the y channel. */
4035
+ type ScatterChartSeries = ChartSeriesCommon & {
4036
+ readonly xValues: ReadonlyArray<number | null>;
4037
+ readonly bubbleSizes?: never;
4038
+ readonly chartKind?: never;
4039
+ readonly secondaryAxis?: never;
4040
+ };
4041
+ /** A bubble series: x, y, and the size channel that scales each bubble. */
4042
+ type BubbleChartSeries = ChartSeriesCommon & {
4043
+ readonly xValues: ReadonlyArray<number | null>;
4044
+ readonly bubbleSizes: ReadonlyArray<number | null>;
4045
+ readonly chartKind?: never;
4046
+ readonly secondaryAxis?: never;
4047
+ };
4048
+ /**
4049
+ * A category axis is either discrete — optionally grouped into outer
4050
+ * levels — or a date axis. Only a numeric axis has a scale, so
4051
+ * `categoryAxisScaling` rides with the date form.
4052
+ */
4053
+ type CategoryAxisMode = {
4054
+ readonly categoryAxisDate: ChartDateAxis; /** Date-serial range of the axis; only `min` / `max` apply. */
4055
+ readonly categoryAxisScaling?: ChartAxisScaling;
4056
+ readonly categoryGroupLevels?: never;
4057
+ } | {
4058
+ readonly categoryAxisDate?: never;
4059
+ readonly categoryAxisScaling?: never;
4060
+ readonly categoryGroupLevels?: ReadonlyArray<ReadonlyArray<string>>;
4061
+ };
4062
+ /**
4063
+ * A bar / column / line / area chart. Because the four share a plot area,
4064
+ * every series-level and group-level control of the family is available
4065
+ * whichever of them is the base kind — that is what makes a combo chart.
4066
+ */
4067
+ type ComboChartSpec = Fields<VariantField<'combo'>> & CategoryAxisMode & {
4068
+ readonly kind: 'bar' | 'column' | 'line' | 'area';
4069
+ readonly series: ReadonlyArray<ComboChartSeries>;
4070
+ };
4071
+ /** A 3-D bar / column chart (`<c:bar3DChart>`). */
4072
+ type Bar3DChartSpec = Fields<VariantField<'bar3D'>> & CategoryAxisMode & {
4073
+ readonly kind: 'bar' | 'column';
4074
+ readonly series: ReadonlyArray<PlainChartSeries>; /** Its presence is what selects the 3-D element; a combo cannot be 3-D. */
4075
+ readonly view3D: ChartView3D;
4076
+ };
4077
+ /**
4078
+ * A 3-D line / area chart. High-low lines, up/down bars and point markers
4079
+ * have no 3-D element to live in.
4080
+ */
4081
+ type LineArea3DChartSpec = Fields<VariantField<'lineArea3D'>> & CategoryAxisMode & {
4082
+ readonly kind: 'line' | 'area';
4083
+ readonly series: ReadonlyArray<PlainChartSeries>;
4084
+ readonly view3D: ChartView3D;
4085
+ };
4086
+ /** A pie chart. One series, one slice per category. */
4087
+ type PieChartSpec = Fields<VariantField<'pie'>> & {
4088
+ readonly kind: 'pie';
4089
+ readonly series: readonly [PlainChartSeries];
4090
+ };
4091
+ /** A pie-of-pie / bar-of-pie chart (`<c:ofPieChart>`). */
4092
+ type OfPieChartSpec = Fields<VariantField<'ofPie'>> & {
4093
+ readonly kind: 'pie';
4094
+ readonly series: readonly [PlainChartSeries];
4095
+ readonly ofPie: ChartOfPie;
4096
+ };
4097
+ /** A 3-D pie (`<c:pie3DChart>`), which turns with the camera rather than `firstSliceAngleDeg`. */
4098
+ type Pie3DChartSpec = Fields<VariantField<'pie3D'>> & {
4099
+ readonly kind: 'pie';
4100
+ readonly series: readonly [PlainChartSeries];
4101
+ readonly view3D: ChartView3D;
4102
+ };
4103
+ /** A doughnut chart. */
4104
+ type DoughnutChartSpec = Fields<VariantField<'doughnut'>> & {
4105
+ readonly kind: 'doughnut';
4106
+ readonly series: readonly [PlainChartSeries];
4107
+ };
4108
+ /** A scatter chart: both axes are numeric, so there are no categories to group. */
4109
+ type ScatterChartSpec = Fields<VariantField<'scatter'>> & {
4110
+ readonly kind: 'scatter';
4111
+ readonly series: ReadonlyArray<ScatterChartSeries>;
4112
+ };
4113
+ /** A bubble chart: a scatter chart whose third channel scales each marker. */
4114
+ type BubbleChartSpec = Fields<VariantField<'bubble'>> & {
4115
+ readonly kind: 'bubble';
4116
+ readonly series: ReadonlyArray<BubbleChartSeries>;
4117
+ };
4118
+ /** A radar chart. */
4119
+ type RadarChartSpec = Fields<VariantField<'radar'>> & CategoryAxisMode & {
4120
+ readonly kind: 'radar';
4121
+ readonly series: ReadonlyArray<PlainChartSeries>;
4122
+ };
4123
+ /** A stock chart plotted from high, low and close. */
4124
+ type StockChartSpec = Fields<VariantField<'stock'>> & CategoryAxisMode & {
4125
+ readonly kind: 'stock';
4126
+ readonly series: readonly [PlainChartSeries, PlainChartSeries, PlainChartSeries];
4127
+ };
4128
+ /**
4129
+ * A candlestick chart: a stock chart with an open series, whose up / down
4130
+ * bars span open → close.
4131
+ */
4132
+ type CandlestickChartSpec = Fields<VariantField<'candlestick'>> & CategoryAxisMode & {
4133
+ readonly kind: 'stock';
4134
+ readonly series: readonly [PlainChartSeries, PlainChartSeries, PlainChartSeries, PlainChartSeries];
4135
+ };
4136
+ /** A surface chart. Its three axes make `view3D` a camera, not a subtype switch. */
4137
+ type SurfaceChartSpec = Fields<VariantField<'surface'>> & CategoryAxisMode & {
4138
+ readonly kind: 'surface';
4139
+ readonly series: ReadonlyArray<PlainChartSeries>;
4140
+ };
4141
+ /**
4142
+ * A chart this library can draw. Each kind carries only the fields its
4143
+ * OOXML element has, so a field the chart cannot show is a compile error
4144
+ * rather than a value that serializes into nothing — or into a deck
4145
+ * PowerPoint offers to repair.
4146
+ *
4147
+ * `readChartSpec` returns the permissive `ReadChartSpec` instead, because a
4148
+ * deck authored elsewhere can combine fields no kind allows; narrow one back
4149
+ * with {@link isChartSpec}.
4150
+ */
4151
+ type ChartSpec = ComboChartSpec | Bar3DChartSpec | LineArea3DChartSpec | PieChartSpec | OfPieChartSpec | Pie3DChartSpec | DoughnutChartSpec | ScatterChartSpec | BubbleChartSpec | RadarChartSpec | StockChartSpec | CandlestickChartSpec | SurfaceChartSpec;
4152
+ /**
4153
+ * Whether a spec read back from a deck also inhabits the write-side
4154
+ * {@link ChartSpec}. A deck authored elsewhere can combine fields no kind
4155
+ * draws, so a read-modify-write pass has to narrow before it writes.
4156
+ */
4157
+ declare const isChartSpec: (spec: ReadChartSpec) => spec is ChartSpec;
4158
+ //#endregion
3146
4159
  //#region src/api/fn/charts.d.ts
3147
4160
  declare const addSlideChart: (slide: SlideData, opts: {
3148
4161
  spec: ChartSpec;
@@ -3160,7 +4173,7 @@ declare const addSlideChart: (slide: SlideData, opts: {
3160
4173
  */
3161
4174
  interface SlideChartData {
3162
4175
  readonly shape: SlideShapeData;
3163
- readonly spec: ChartSpec | null;
4176
+ readonly spec: ReadChartSpec | null;
3164
4177
  }
3165
4178
  /**
3166
4179
  * Replaces the chart definition on an existing graphic-frame chart
@@ -3221,7 +4234,7 @@ declare const getShapeChartSeriesNames: (shape: SlideShapeData) => ReadonlyArray
3221
4234
  * `series[].bubbleSizes`).
3222
4235
  */
3223
4236
  declare const getShapeChartSeriesValues: (shape: SlideShapeData, seriesName: string) => ReadonlyArray<number | null> | null;
3224
- declare const getShapeChartSpec: (shape: SlideShapeData) => ChartSpec | null;
4237
+ declare const getShapeChartSpec: (shape: SlideShapeData) => ReadChartSpec | null;
3225
4238
  /**
3226
4239
  * Returns every chart on the slide that carries a series whose name
3227
4240
  * equals `seriesName` exactly. Useful for "find the revenue chart"
@@ -3417,10 +4430,25 @@ declare const setTableRowHeight: (table: SlideShapeData, row: number, height: Em
3417
4430
  */
3418
4431
  declare const getTableCell: (table: SlideShapeData, row: number, col: number) => TableCellData;
3419
4432
  /**
3420
- * Replaces a cell's text. `\n` starts a new paragraph. The paragraph-end
3421
- * format (`<a:endParaRPr>`) is not kept; author it with `setTableCellParagraphs`.
3422
- */
3423
- declare const setTableCellText: (cell: TableCellData, text: string) => void;
4433
+ * Replaces a cell's text. `\n` starts a new paragraph unless `newlines: 'break'`
4434
+ * requests paragraph-internal `<a:br>` elements. The paragraph-end
4435
+ * format (`<a:endParaRPr>`) is not kept unless `preserveFormatting` is enabled.
4436
+ * That option preserves unaffected runs and paragraph properties during editing.
4437
+ * With `range`, `text` replaces exactly that UTF-16 selection, always preserving
4438
+ * the formatting of unaffected text. Pass `{ case: 'upper' | 'lower' | 'sentence' |
4439
+ * 'title' | 'toggle' }` to change case in the whole cell or `options.range`
4440
+ * without rebuilding its runs, fields, or paragraph properties.
4441
+ */
4442
+ declare const setTableCellText: (cell: TableCellData, text: string | {
4443
+ case: TextCase;
4444
+ }, options?: {
4445
+ newlines?: "paragraph" | "break";
4446
+ preserveFormatting?: boolean;
4447
+ range?: {
4448
+ start: number;
4449
+ end: number;
4450
+ };
4451
+ }) => void;
3424
4452
  /**
3425
4453
  * Replaces the cell's text with explicitly structured paragraphs and runs —
3426
4454
  * the table counterpart of `setShapeParagraphs`. Read back with
@@ -3468,7 +4496,8 @@ declare const getTableCellSpan: (cell: TableCellData) => {
3468
4496
  * leaves each covered cell's `<a:txBody>` in the XML; `'drop'` removes it,
3469
4497
  * so the covered cells carry no `<a:txBody>` at all (CT_TableCell allows
3470
4498
  * that), which is how PptxGenJS writes a merge; `getTableCellParagraphs`
3471
- * reads them as `[]`.
4499
+ * reads them as `[]`. `'append'` moves covered paragraphs into the anchor in
4500
+ * row-major order, preserving their formatting and leaving covered cells empty.
3472
4501
  */
3473
4502
  declare const mergeTableCells: (table: SlideShapeData, block: {
3474
4503
  readonly row: number;
@@ -3476,8 +4505,14 @@ declare const mergeTableCells: (table: SlideShapeData, block: {
3476
4505
  readonly rowSpan: number;
3477
4506
  readonly colSpan: number;
3478
4507
  }, options?: {
3479
- readonly coveredText?: "keep" | "drop";
4508
+ readonly coveredText?: "keep" | "drop" | "append";
3480
4509
  }) => void;
4510
+ /**
4511
+ * Splits the merged region containing `cell`, including a covered cell.
4512
+ * Retains each cell's text and properties; text removed during merging stays empty.
4513
+ * An unmerged cell is unchanged. Malformed regions throw before any mutation.
4514
+ */
4515
+ declare const splitTableCell: (cell: TableCellData) => void;
3481
4516
  /**
3482
4517
  * One side of a cell's border, as read from `<a:tcPr><a:ln{L|R|T|B}>`.
3483
4518
  * `widthEmu` is the line width in EMU; `color` is `#RRGGBB` or `null`
@@ -3585,7 +4620,10 @@ interface TableCellParagraph {
3585
4620
  */
3586
4621
  readonly align: ParagraphAlignment | null;
3587
4622
  /** Runs / fields / breaks in document order, with their literal `<a:rPr>` format. */
3588
- readonly elements: ReadonlyArray<ShapeParagraphElement>;
4623
+ readonly elements: ReadonlyArray<ShapeParagraphElement & {
4624
+ readonly clickAction?: ShapeClickAction;
4625
+ readonly tooltip?: string;
4626
+ }>;
3589
4627
  /**
3590
4628
  * Literal format of the paragraph-end mark (`<a:endParaRPr>`), or `null`
3591
4629
  * when absent — the only format a paragraph with no `elements` carries.
@@ -3607,6 +4645,20 @@ interface TableCellParagraph {
3607
4645
  * `undefined` for the caller to resolve.
3608
4646
  */
3609
4647
  declare const getTableCellParagraphs: (cell: TableCellData) => ReadonlyArray<TableCellParagraph>;
4648
+ /**
4649
+ * Reads a table-cell run's effective character format. The literal
4650
+ * `getTableCellParagraphs` format only contains properties authored on the
4651
+ * run; this resolver also applies the cell text body's paragraph defaults and
4652
+ * outline-level defaults (`a:pPr/defRPr` and `a:lstStyle`). Pass `null` as
4653
+ * `runIndex` to resolve the paragraph end mark, including empty paragraphs.
4654
+ * Pass `{ fieldIndex }` for a zero-based `a:fld` index; numeric indices count
4655
+ * regular `a:r` runs only. Pass `{ breakIndex }` for a zero-based `a:br` index.
4656
+ */
4657
+ declare const getTableCellRunFormatEffective: (pres: PresentationData, cell: TableCellData, paragraphIndex: number, runIndex: number | null | {
4658
+ readonly fieldIndex: number;
4659
+ } | {
4660
+ readonly breakIndex: number;
4661
+ }) => ReadTextFormat;
3610
4662
  /** Sets a solid background color on a cell (`<a:tcPr><a:solidFill>`). */
3611
4663
  declare const setTableCellFill: (cell: TableCellData, color: Color) => void;
3612
4664
  /** Removes any background fill from a cell. */
@@ -3618,8 +4670,44 @@ declare const clearTableCellFill: (cell: TableCellData) => void;
3618
4670
  * (gradient / pattern / image).
3619
4671
  */
3620
4672
  declare const getTableCellFill: (cell: TableCellData) => string | null;
3621
- /** Applies a TextFormat to every run in the cell's text. */
3622
- declare const setTableCellTextFormat: (cell: TableCellData, format: TextFormat) => void;
4673
+ /** Effective cell appearance after table-style and cell-property inheritance. */
4674
+ interface TableCellAppearanceEffective {
4675
+ readonly fill: ShapeFill;
4676
+ readonly borders: TableCellBorders;
4677
+ }
4678
+ /** Resolves table-style `tcStyle` fills and borders, then overlays local `tcPr`. */
4679
+ declare const getTableCellAppearanceEffective: (pres: PresentationData, cell: TableCellData) => TableCellAppearanceEffective;
4680
+ /** Applies a TextFormat to the cell's text, optionally within UTF-16 offsets
4681
+ * in getTableCellText (exclusive end). Breaks count as one character; invalid
4682
+ * ranges and split-surrogate boundaries throw without changing the text.
4683
+ * `reset` restores inherited run appearance before applying `format`, retaining
4684
+ * links and language. Without either target, run-format defaults are also cleared.
4685
+ * Pass a zero-based `paragraphEnd` instead of `range` to update a paragraph's end mark. */
4686
+ declare const setTableCellTextFormat: (cell: TableCellData, format: TextFormat, options?: {
4687
+ range?: {
4688
+ start: number;
4689
+ end: number;
4690
+ };
4691
+ reset?: boolean;
4692
+ paragraphEnd?: never;
4693
+ } | {
4694
+ paragraphEnd: number;
4695
+ reset?: boolean;
4696
+ range?: never;
4697
+ }) => void;
4698
+ /**
4699
+ * Sets or removes a click link on cell text. Omitting range covers the whole
4700
+ * cell; otherwise offsets are UTF-16 positions in getTableCellText, with an
4701
+ * exclusive end. Formatting and links outside the range are preserved.
4702
+ * Omitting tooltip clears the selected link's previous description.
4703
+ */
4704
+ declare const setTableCellClickAction: (cell: TableCellData, action: ShapeClickAction | null, options?: {
4705
+ range?: {
4706
+ start: number;
4707
+ end: number;
4708
+ };
4709
+ tooltip?: string;
4710
+ }) => void;
3623
4711
  /** Sets horizontal alignment on every paragraph in the cell. */
3624
4712
  declare const setTableCellAlignment: (cell: TableCellData, align: ParagraphAlignment) => void;
3625
4713
  /** Zero-based (row, col) of the cell. */
@@ -3799,13 +4887,28 @@ interface PresentationSummary {
3799
4887
  declare const getPresentationSummary: (pres: PresentationData) => PresentationSummary;
3800
4888
  //#endregion
3801
4889
  //#region src/api/fn/shape-image-effects.d.ts
4890
+ /** A color used by a two-color image recolor, with optional DrawingML transforms. */
4891
+ type ImageRecolorColor = Color | {
4892
+ readonly color: Color;
4893
+ readonly colorTransforms?: readonly ColorTransform[];
4894
+ };
3802
4895
  /**
3803
- * Sets the picture's opacity (0–1 fraction; `1` is fully opaque, `0`
3804
- * fully transparent). Pass `null` to remove an existing opacity
3805
- * override and restore PowerPoint's default behavior.
3806
- *
3807
- * Throws for non-picture shapes and on opacities outside `[0, 1]`.
4896
+ * A PowerPoint image recolor operation. Threshold is expressed as a percent
4897
+ * (0..100), matching `getShapeImageBiLevelThreshold` and PowerPoint's UI.
3808
4898
  */
4899
+ type ImageRecolor = {
4900
+ readonly kind: 'none';
4901
+ } | {
4902
+ readonly kind: 'grayscale';
4903
+ } | {
4904
+ readonly kind: 'duotone';
4905
+ readonly colors: readonly [ImageRecolorColor, ImageRecolorColor];
4906
+ } | {
4907
+ readonly kind: 'threshold';
4908
+ readonly threshold: number;
4909
+ } | {
4910
+ readonly kind: 'washout';
4911
+ };
3809
4912
  /**
3810
4913
  * Returns the embedded image bytes for a picture shape, or `null`
3811
4914
  * when the shape isn't a picture or has no `r:embed` reference
@@ -3925,12 +5028,36 @@ declare const getShapeImageBiLevelThreshold: (shape: SlideShapeData) => number |
3925
5028
  * Reads the picture's duotone color transform from `<a:blip><a:duotone>`.
3926
5029
  * PowerPoint emits two `<a:srgbClr>` (or scheme color) children for a
3927
5030
  * two-color duotone effect — typical "Picture Tools › Recolor".
3928
- * Returns `null` when no duotone is set.
3929
- */
3930
- declare const getShapeImageDuotone: (pres: PresentationData, shape: SlideShapeData) => {
5031
+ * By default colors are resolved to RGB for rendering. Pass
5032
+ * `{ resolveColors: false }` to preserve authoring color models and
5033
+ * transforms for a read-edit-write cycle. Only sRGB and scheme colors can
5034
+ * retain their authoring model; other DrawingML models are returned as their
5035
+ * resolved base color with the original transforms. Returns `null` when no
5036
+ * duotone is set.
5037
+ */
5038
+ declare function getShapeImageDuotone(pres: PresentationData, shape: SlideShapeData): {
5039
+ firstColor: string | null;
5040
+ secondColor: string | null;
5041
+ } | null;
5042
+ declare function getShapeImageDuotone(pres: PresentationData, shape: SlideShapeData, options: {
5043
+ readonly resolveColors: false;
5044
+ }): Extract<ImageRecolor, {
5045
+ kind: 'duotone';
5046
+ }> | null;
5047
+ declare function getShapeImageDuotone(pres: PresentationData, shape: SlideShapeData, options: {
5048
+ readonly resolveColors: true;
5049
+ }): {
3931
5050
  firstColor: string | null;
3932
5051
  secondColor: string | null;
3933
5052
  } | null;
5053
+ declare function getShapeImageDuotone(pres: PresentationData, shape: SlideShapeData, options: {
5054
+ readonly resolveColors: boolean;
5055
+ }): {
5056
+ firstColor: string | null;
5057
+ secondColor: string | null;
5058
+ } | Extract<ImageRecolor, {
5059
+ kind: 'duotone';
5060
+ }> | null;
3934
5061
  declare const getShapeImageLinkUrl: (shape: SlideShapeData) => string | null;
3935
5062
  declare const getShapeImagePartName: (shape: SlideShapeData) => string | null;
3936
5063
  /**
@@ -3951,19 +5078,19 @@ declare const getShapeImageFillBytes: (shape: SlideShapeData) => Uint8Array | nu
3951
5078
  */
3952
5079
  declare const getShapeImageFormat: (shape: SlideShapeData) => ImageFormat | null;
3953
5080
  /**
3954
- * Reads the picture's opacity (0–1 fraction). Returns `null` when no
5081
+ * Reads the picture or image fill's opacity (0–1 fraction). Returns `null` when no
3955
5082
  * `<a:alphaModFix>` is present (PowerPoint treats absence as fully
3956
5083
  * opaque); returns `1` when an explicit alphaModFix sets full opacity.
3957
5084
  */
3958
5085
  declare const getShapeImageOpacity: (shape: SlideShapeData) => number | null;
3959
5086
  /**
3960
- * Reads the picture's crop fractions. Returns `null` when no
5087
+ * Reads a picture or image fill's crop fractions. Returns `null` when no
3961
5088
  * `<a:srcRect>` is present; otherwise returns a fully-populated object
3962
5089
  * with every side filled in (0 for omitted sides on disk).
3963
5090
  */
3964
5091
  declare const getShapeImageCrop: (shape: SlideShapeData) => ImageCrop | null;
3965
5092
  /**
3966
- * Adjusts the picture's brightness via `<a:blip><a:lum bright="…"/>`. The value
5093
+ * Adjusts a picture or image fill's brightness via `<a:blip><a:lum bright="…"/>`. The value
3967
5094
  * is a -1..1 fraction:
3968
5095
  *
3969
5096
  * - `1` → +100% brightness
@@ -3971,11 +5098,11 @@ declare const getShapeImageCrop: (shape: SlideShapeData) => ImageCrop | null;
3971
5098
  * - `-1` → -100% brightness
3972
5099
  *
3973
5100
  * Brightness and contrast share the one `<a:lum>` element, so setting one keeps
3974
- * the other. Throws for non-picture shapes and on values outside [-1, 1].
5101
+ * the other. Throws for shapes without an image and on values outside [-1, 1].
3975
5102
  */
3976
5103
  declare const setShapeImageBrightness: (shape: SlideShapeData, value: number | null) => void;
3977
5104
  /**
3978
- * Adjusts the picture's contrast via `<a:blip><a:lum contrast="…"/>`. The value
5105
+ * Adjusts a picture or image fill's contrast via `<a:blip><a:lum contrast="…"/>`. The value
3979
5106
  * is a -1..1 fraction (ECMA-376 `ST_FixedPercentage`):
3980
5107
  *
3981
5108
  * - `0` or `null` → no contrast change (the `contrast` attribute is removed)
@@ -3983,19 +5110,37 @@ declare const setShapeImageBrightness: (shape: SlideShapeData, value: number | n
3983
5110
  * - `-0.5` → -50% contrast (washed out)
3984
5111
  *
3985
5112
  * Brightness and contrast share the one `<a:lum>` element, so setting one keeps
3986
- * the other. Throws on non-picture shapes and on values outside [-1, 1].
5113
+ * the other. Throws for shapes without an image and on values outside [-1, 1].
3987
5114
  */
3988
5115
  declare const setShapeImageContrast: (shape: SlideShapeData, value: number | null) => void;
3989
5116
  /**
3990
- * Reads the picture's contrast (the `<a:lum contrast>` fraction in [-1, 1]).
5117
+ * Reads a picture or image fill's contrast (the `<a:lum contrast>` fraction in [-1, 1]).
3991
5118
  * Returns `null` when no contrast adjustment is present.
3992
5119
  */
3993
5120
  declare const getShapeImageContrast: (shape: SlideShapeData) => number | null;
3994
5121
  /**
3995
- * Reads the picture's brightness (the `<a:lum bright>` fraction in [-1, 1]).
5122
+ * Reads a picture or image fill's brightness (the `<a:lum bright>` fraction in [-1, 1]).
3996
5123
  * Returns `null` when no brightness adjustment is present.
3997
5124
  */
3998
5125
  declare const getShapeImageBrightness: (shape: SlideShapeData) => number | null;
5126
+ /**
5127
+ * Clears PowerPoint's image color corrections from a picture or image fill.
5128
+ * This removes grayscale (`grayscl`), duotone, bi-level recolor, and
5129
+ * brightness/contrast (`lum`) effects while preserving opacity, media
5130
+ * references, and all other known or extension effects.
5131
+ */
5132
+ declare const resetShapeImageColorEffects: (shape: SlideShapeData) => void;
5133
+ /**
5134
+ * Applies a PowerPoint image recolor to a picture or image-filled shape.
5135
+ * `none` removes the recolor while preserving opacity, media references, and
5136
+ * unrelated DrawingML effects. Threshold is a percentage from 0 to 100.
5137
+ */
5138
+ declare const setShapeImageRecolor: (shape: SlideShapeData, recolor: ImageRecolor) => void;
5139
+ /**
5140
+ * Sets picture or image-fill opacity (0–1; `1` is fully opaque).
5141
+ * Pass `null` to restore PowerPoint's default opacity.
5142
+ * Rejects shapes without an image and values outside `[0, 1]` without changing them.
5143
+ */
3999
5144
  declare const setShapeImageOpacity: (shape: SlideShapeData, opacity: number | null) => void;
4000
5145
  /** Crop a picture by fraction of each side. Omitted sides default to 0. */
4001
5146
  interface ImageCrop {
@@ -4005,45 +5150,182 @@ interface ImageCrop {
4005
5150
  readonly bottom?: number;
4006
5151
  }
4007
5152
  /**
4008
- * Sets (or clears) a `<a:srcRect>` on a picture shape, cropping the
5153
+ * Sets (or clears) a `<a:srcRect>` on a picture or image-filled shape, cropping the
4009
5154
  * embedded image by the given fraction on each side. Pass `null` to
4010
5155
  * remove an existing crop.
4011
5156
  *
4012
- * Fractions are in `[0, 1)` per side. `{ left: 0.25 }` clips 25% off
4013
- * the left edge; the visible image stretches to fill the original
4014
- * frame. The shape's geometry (`<a:xfrm>`) is unchanged.
5157
+ * Fractions use the signed `ST_Percentage` range per side. `{ left: 0.25 }`
5158
+ * clips 25% off the left edge; negative values extend the source rectangle.
5159
+ * Stretch fills fit the remaining image to the frame;
5160
+ * tiled fills repeat the remaining image. The shape's geometry (`<a:xfrm>`) is unchanged.
4015
5161
  */
4016
5162
  declare const setShapeImageCrop: (shape: SlideShapeData, crop: ImageCrop | null) => void;
4017
5163
  //#endregion
5164
+ //#region src/api/fn/_animation-timing.d.ts
5165
+ /** When a step runs relative to the one before it. */
5166
+ type AnimationStart = 'click' | 'withPrevious' | 'afterPrevious' | 'unknown';
5167
+ /**
5168
+ * What becomes of the value an effect animates once it has run, from the
5169
+ * `fill` on its behaviours (ST_TLTimeNodeFillType: `remove | freeze | hold |
5170
+ * transition`). `'unstated'` is not `'held'`: the schema gives the attribute
5171
+ * no default, so a tree that omits it has not said.
5172
+ */
5173
+ type AnimationValueAfterEnd = 'held' | 'removed' | 'unstated';
5174
+ /**
5175
+ * What an effect animates. `unsupported` covers targets this library does not
5176
+ * model — charts, OLE parts, sub-shapes, and composite effects whose
5177
+ * behaviours do not all animate the same thing. The step is still listed so a
5178
+ * caller can show it, but it cannot be edited.
5179
+ */
5180
+ type AnimationTarget = {
5181
+ readonly kind: 'shape';
5182
+ readonly shapeId: number;
5183
+ } | {
5184
+ readonly kind: 'paragraphs';
5185
+ readonly shapeId: number;
5186
+ readonly firstParagraph: number;
5187
+ readonly lastParagraph: number;
5188
+ } | {
5189
+ readonly kind: 'unsupported';
5190
+ readonly shapeId: number | null;
5191
+ };
5192
+ /** One animation effect on a slide, as read from `<p:timing>`. */
5193
+ interface SlideAnimationStep {
5194
+ /**
5195
+ * How the editing APIs address this step: the effect's `<p:cTn id>`.
5196
+ * `null` when the node carries no id, the id is not a plain integer, or the
5197
+ * same id appears more than once in the tree — none of which is a safe
5198
+ * handle, so such a step is read-only.
5199
+ */
5200
+ readonly id: number | null;
5201
+ readonly target: AnimationTarget;
5202
+ /**
5203
+ * Every shape any of the step's behaviours animates, in document order.
5204
+ * A composite effect that drives two shapes reports both here even though
5205
+ * `target` refuses to name one of them as *the* target.
5206
+ */
5207
+ readonly targetShapeIds: readonly number[];
5208
+ /** `null` for a preset outside the `AnimationEffect` tokens. */
5209
+ readonly effect: AnimationEffect | null;
5210
+ /**
5211
+ * Which edge of the slide a fly comes from or leaves by. `null` for every
5212
+ * other effect — the preset states no direction, so neither does this.
5213
+ */
5214
+ readonly direction: AnimationDirection | null;
5215
+ readonly presetId: number | null;
5216
+ readonly presetClass: string | null;
5217
+ /** `'unknown'` when the node type is not one this library models. */
5218
+ readonly start: AnimationStart;
5219
+ /** `null` when the tree does not state one — never defaulted. */
5220
+ readonly durationMs: number | null;
5221
+ /** `null` when the tree does not state one, or the delay is indefinite. */
5222
+ readonly delayMs: number | null;
5223
+ /**
5224
+ * What the tree says becomes of the value this effect animates once it has
5225
+ * run. It decides nothing on its own — `playable` already requires that the
5226
+ * behaviour saying whether the shape is on the slide keeps its value — but
5227
+ * it is what two effects animating one object at the same time turn on: the
5228
+ * one that ends first either stays above the other or gives way to it. A
5229
+ * player that finds `'unstated'` there must not choose for the file.
5230
+ */
5231
+ readonly valueAfterEnd: AnimationValueAfterEnd;
5232
+ /** `<p:bldP build="p">` — the text body is revealed paragraph by paragraph. */
5233
+ readonly buildByParagraph: boolean;
5234
+ readonly buildLevel: number | null;
5235
+ /**
5236
+ * Which `<p:seq>` the step lives in, named after its `nodeType`. Only
5237
+ * `'mainSeq'` advances on the slide's own clicks: an `'interactiveSeq'`
5238
+ * sequence fires when the viewer clicks the shape it is bound to, so a
5239
+ * player that folded one into the click order would run it at the wrong
5240
+ * time — and swallow a click the slide owes its main sequence.
5241
+ */
5242
+ readonly sequence: AnimationSequenceKind;
5243
+ /**
5244
+ * `true` when a player can run this step as part of the slide's click
5245
+ * order: it is in the main sequence, starts in a way we model, animates a
5246
+ * single target we model, and uses a preset we know how to render. A step
5247
+ * that is not playable must be shown as such, never folded into the normal
5248
+ * progression.
5249
+ */
5250
+ readonly playable: boolean;
5251
+ /**
5252
+ * `true` when this library can safely move, remove or retime the step:
5253
+ * `playable`, plus a unique handle to address it by. Editability is not
5254
+ * playability — a step can be one without the other as either side grows.
5255
+ */
5256
+ readonly editable: boolean;
5257
+ }
5258
+ /**
5259
+ * Which `<p:seq>` an effect belongs to, named after its `nodeType`. The two
5260
+ * tokens are ST_TLTimeNodeType values; `'other'` covers a sequence whose node
5261
+ * type is absent or something else again.
5262
+ */
5263
+ type AnimationSequenceKind = 'mainSeq' | 'interactiveSeq' | 'other';
5264
+ //#endregion
4018
5265
  //#region src/api/fn/shape-animation.d.ts
4019
5266
  /**
4020
- * Sets a single click-triggered animation effect on the given shape.
5267
+ * Adds a single animation effect to the given shape.
4021
5268
  *
4022
5269
  * The effect is *merged* into any existing `<p:timing>` on the slide rather
4023
5270
  * than replacing it: animating a second shape (or re-running on a template that
4024
- * already has authored animations) preserves the existing effects and appends
4025
- * this one as the next click stop, with cTn ids renumbered to stay unique. To
4026
- * clear every animation first, call `clearSlideAnimations`.
5271
+ * already has authored animations) preserves the existing effects, with cTn ids
5272
+ * renumbered to stay unique. To clear every animation first, call
5273
+ * `clearSlideAnimations`.
4027
5274
  *
4028
5275
  * Supported `effect` tokens:
4029
5276
  *
4030
- * - `'fadeIn'` entrance fade
4031
- * - `'fadeOut'` exit fade
4032
- * - `'appear'` instant entrance
4033
- * - `'disappear'` instant exit
4034
- *
4035
- * `durationMs` defaults to 500ms (fades only — `appear`/`disappear`
4036
- * are instantaneous).
5277
+ * - `'appear'` / `'disappear'` — instant entrance and exit
5278
+ * - `'fadeIn'` / `'fadeOut'` — entrance and exit fade
5279
+ * - `'flyIn'` / `'flyOut'` — entrance and exit that travel in from, or out
5280
+ * to, one edge of the slide. `direction` picks the edge (`'top'`,
5281
+ * `'right'`, `'bottom'` — the default — or `'left'`) and is an error for
5282
+ * any other effect.
5283
+ * - `'zoomIn'` / `'zoomOut'` — entrance that grows from nothing, exit that
5284
+ * shrinks back to it, both about the shape's centre
5285
+ * - `'spin'` — emphasis: one clockwise turn about the shape's centre,
5286
+ * leaving it exactly where it was. It never puts the shape on the slide or
5287
+ * takes it off, so a shape that is not already shown stays unshown.
5288
+ *
5289
+ * `durationMs` defaults to 500ms. `appear` and `disappear` are instantaneous by
5290
+ * definition of the preset and write no timed behaviour at all.
5291
+ *
5292
+ * `start` decides where the effect lands. The default `'click'` gives it a
5293
+ * click stop of its own, so the viewer sees it on the next click.
5294
+ * `'withPrevious'` and `'afterPrevious'` join the stop the last effect is in,
5295
+ * running alongside it or once it has finished — both off the same click. As
5296
+ * the slide's first effect neither has a predecessor, so both run when the
5297
+ * slide appears. `delayMs` waits that long once the start condition is met.
5298
+ *
5299
+ * `'afterPrevious'` throws when the slide's timing does not say when the effect
5300
+ * before it ends — it runs indefinitely, states no duration, repeats, or starts
5301
+ * from another node rather than at a fixed offset. The slide is left untouched;
5302
+ * `'click'` and `'withPrevious'` need no such measurement.
5303
+ *
5304
+ * `byParagraph` reveals the shape's text one paragraph at a time rather than
5305
+ * animating the shape as a whole: one effect per paragraph, each with the same
5306
+ * `start`, so the default `'click'` advances a paragraph per click. They share
5307
+ * a single `<p:bldP build="p">`, which is how PowerPoint and Google Slides both
5308
+ * present the build as one animation. `getSlideAnimations` reports each
5309
+ * paragraph as its own step, targeting a paragraph range.
5310
+ *
5311
+ * Reading the result back, including the order and start condition of every
5312
+ * effect on the slide, is `getSlideAnimations`.
4037
5313
  */
4038
5314
  declare const setShapeAnimation: (shape: SlideShapeData, opts: AnimationOptions) => void;
4039
5315
  /**
4040
5316
  * Returns the animation effect bound to this shape via the slide's
4041
- * `<p:timing>` tree, or `null` if the shape has no animation in the
4042
- * v1 single-effect schema we model. Unknown presets are reported as a
4043
- * raw `null` rather than guessing.
5317
+ * `<p:timing>` tree, or `null` when the shape has none. A shape carrying
5318
+ * several effects reports the first one in document order. Presets outside
5319
+ * the four `AnimationEffect` tokens are reported as `null` rather than
5320
+ * guessed at.
4044
5321
  */
4045
5322
  declare const getShapeAnimation: (shape: SlideShapeData) => AnimationEffect | null;
4046
- /** Removes the slide's `<p:timing>` element entirely. */
5323
+ /**
5324
+ * Every animation effect on the slide, in document order — the click order a
5325
+ * viewer sees. Effects this library cannot author are still listed, with
5326
+ * `editable: false`, so a caller can show them instead of losing them.
5327
+ */
5328
+ declare const getSlideAnimations: (slide: SlideData) => readonly SlideAnimationStep[];
4047
5329
  /**
4048
5330
  * Returns every shape on the slide that has an authored animation
4049
5331
  * effect (i.e. `getShapeAnimation(shape)` is not `null`). Pair to
@@ -4052,6 +5334,7 @@ declare const getShapeAnimation: (shape: SlideShapeData) => AnimationEffect | nu
4052
5334
  * that doesn't honor PowerPoint's timing tree.
4053
5335
  */
4054
5336
  declare const findShapesWithAnimation: (slide: SlideData) => ReadonlyArray<SlideShapeData>;
5337
+ /** Removes every animation on the slide, keeping its media play controls. */
4055
5338
  declare const clearSlideAnimations: (slide: SlideData) => void;
4056
5339
  //#endregion
4057
5340
  //#region src/api/fn/slide-title.d.ts
@@ -4093,7 +5376,7 @@ declare const setSlidePlaceholders: (slide: SlideData, byType: Readonly<Partial<
4093
5376
  declare const setSlideBody: (slide: SlideData, text: string) => void;
4094
5377
  //#endregion
4095
5378
  //#region src/api/fn/shape-runs.d.ts
4096
- /** Number of paragraphs in the shape's text body. Throws for non-text shapes. */
5379
+ /** Number of paragraphs; zero for an autoshape without a text body. Throws for non-text shapes. */
4097
5380
  declare const getShapeParagraphCount: (shape: SlideShapeData) => number;
4098
5381
  /**
4099
5382
  * One inline element in a paragraph as ordered: a literal text run
@@ -4128,9 +5411,11 @@ type ShapeParagraphElement = {
4128
5411
  * Returns the inline children of a paragraph in document order — runs,
4129
5412
  * field placeholders, and line breaks. Used by renderers that need to
4130
5413
  * reproduce the paragraph faithfully (the `<a:r>`-only run accessors
4131
- * silently drop fields and breaks).
5414
+ * silently drop fields and breaks). Omit the index to read all paragraphs in
5415
+ * one pass.
4132
5416
  */
4133
- declare const getShapeParagraphElements: (shape: SlideShapeData, paragraphIndex: number) => ReadonlyArray<ShapeParagraphElement>;
5417
+ declare function getShapeParagraphElements(shape: SlideShapeData): ReadonlyArray<ReadonlyArray<ShapeParagraphElement>>;
5418
+ declare function getShapeParagraphElements(shape: SlideShapeData, paragraphIndex: number): ReadonlyArray<ShapeParagraphElement>;
4134
5419
  /**
4135
5420
  * Reads the literal format of a paragraph's end mark (`<a:endParaRPr>`), or
4136
5421
  * `null` when the paragraph carries none. It is the only format a paragraph
@@ -4193,7 +5478,7 @@ declare const getShapeRunClickAction: (shape: SlideShapeData, paragraphIndex: nu
4193
5478
  * Sets the horizontal alignment of a single paragraph. Same token set
4194
5479
  * as `setShapeAlignment`. Other paragraphs are untouched.
4195
5480
  */
4196
- declare const setParagraphAlignment: (shape: SlideShapeData, paragraphIndex: number, align: ParagraphAlignment) => void;
5481
+ declare const setParagraphAlignment: (shape: SlideShapeData | TableCellData, paragraphIndex: number, align: ParagraphAlignment) => void;
4197
5482
  /**
4198
5483
  * Sets the paragraph's nesting level (`<a:pPr lvl="N"/>`). Levels are
4199
5484
  * 0-indexed; PowerPoint accepts 0 through 8. Pass `0` to clear an
@@ -4201,13 +5486,22 @@ declare const setParagraphAlignment: (shape: SlideShapeData, paragraphIndex: num
4201
5486
  * Indents matching the previous level's default bullet pair follow the level;
4202
5487
  * other indent values are preserved.
4203
5488
  *
5489
+ * A UTF-16 range selects all touched paragraphs (exclusive end; a caret selects
5490
+ * its paragraph). Pass `{ offset }` to shift their existing levels, clamped to
5491
+ * 0 through 8. Range updates preserve run XML and commit the text body once.
5492
+ *
4204
5493
  * Used in tandem with bullets to author nested lists:
4205
5494
  *
4206
5495
  * setShapeText(shape, 'Item 1\nNested\nItem 2');
4207
5496
  * setShapeBulletStyle(shape, 'bullet');
4208
5497
  * setParagraphLevel(shape, 1, 1); // indent the second line
4209
5498
  */
4210
- declare const setParagraphLevel: (shape: SlideShapeData, paragraphIndex: number, level: number) => void;
5499
+ declare const setParagraphLevel: (shape: SlideShapeData | TableCellData, paragraphIndex: number | {
5500
+ start: number;
5501
+ end: number;
5502
+ }, level: number | {
5503
+ offset: number;
5504
+ }) => void;
4211
5505
  /**
4212
5506
  * Reads the paragraph's own `algn` as its spec token (`l`, `ctr`, `r`,
4213
5507
  * `just`, `dist`, `justLow`, `thaiDist`) — so `setParagraphAlignment(…,
@@ -4216,13 +5510,17 @@ declare const setParagraphLevel: (shape: SlideShapeData, paragraphIndex: number,
4216
5510
  * valid token. For the inherited value under a plain-English name, use
4217
5511
  * `getParagraphPropertiesEffective`.
4218
5512
  */
4219
- declare const getParagraphAlignment: (shape: SlideShapeData, paragraphIndex: number) => ParagraphAlignmentToken | null;
5513
+ declare const getParagraphAlignment: (shape: SlideShapeData | TableCellData, paragraphIndex: number) => ParagraphAlignmentToken | null;
4220
5514
  /**
4221
5515
  * Reads the paragraph's nesting level (`lvl` attribute), or `0` when
4222
- * absent — PowerPoint's default. Returns `null` for non-existent
4223
- * paragraphs.
5516
+ * absent — PowerPoint's default. A UTF-16 range returns the levels of all
5517
+ * touched paragraphs in order. Invalid indices or ranges throw RangeError.
4224
5518
  */
4225
- declare const getParagraphLevel: (shape: SlideShapeData, paragraphIndex: number) => number;
5519
+ declare function getParagraphLevel(shape: SlideShapeData | TableCellData, paragraphIndex: number): number;
5520
+ declare function getParagraphLevel(shape: SlideShapeData | TableCellData, range: {
5521
+ start: number;
5522
+ end: number;
5523
+ }): number[];
4226
5524
  /**
4227
5525
  * Sets the spacing before and/or after a paragraph, in points (where
4228
5526
  * a "point" is 1/72 inch). PowerPoint stores these as hundredths of a
@@ -4234,7 +5532,7 @@ declare const getParagraphLevel: (shape: SlideShapeData, paragraphIndex: number)
4234
5532
  * Omitting a side keeps the existing value (or layout default).
4235
5533
  * Passing a side as `null` removes that spacing element.
4236
5534
  */
4237
- declare const setParagraphSpacing: (shape: SlideShapeData, paragraphIndex: number, opts: {
5535
+ declare const setParagraphSpacing: (shape: SlideShapeData | TableCellData, paragraphIndex: number, opts: {
4238
5536
  beforePts?: number | null;
4239
5537
  afterPts?: number | null;
4240
5538
  }) => void;
@@ -4244,7 +5542,7 @@ declare const setParagraphSpacing: (shape: SlideShapeData, paragraphIndex: numbe
4244
5542
  * is present or when the inner element isn't `<a:spcPts>` (percentage
4245
5543
  * spacing is reported as `null` for now).
4246
5544
  */
4247
- declare const getParagraphSpacing: (shape: SlideShapeData, paragraphIndex: number) => {
5545
+ declare const getParagraphSpacing: (shape: SlideShapeData | TableCellData, paragraphIndex: number) => {
4248
5546
  readonly beforePts: number | null;
4249
5547
  readonly afterPts: number | null;
4250
5548
  };
@@ -4257,11 +5555,22 @@ declare const getParagraphSpacing: (shape: SlideShapeData, paragraphIndex: numbe
4257
5555
  * Returns `null` for sides the paragraph doesn't set (those inherit
4258
5556
  * from the layout / master).
4259
5557
  */
4260
- declare const getParagraphIndent: (shape: SlideShapeData, paragraphIndex: number) => {
5558
+ declare const getParagraphIndent: (shape: SlideShapeData | TableCellData, paragraphIndex: number) => {
4261
5559
  leftEmu: number | null;
4262
5560
  rightEmu: number | null;
4263
5561
  firstLineEmu: number | null;
4264
5562
  };
5563
+ /**
5564
+ * Sets paragraph indents in EMU. The first-line offset is relative to the
5565
+ * left indent; negative values create a hanging indent. Omitted sides are
5566
+ * preserved, and `null` removes an override to restore inheritance.
5567
+ * Values are rounded to whole EMU and must satisfy the OOXML text bounds.
5568
+ */
5569
+ declare const setParagraphIndent: (shape: SlideShapeData | TableCellData, paragraphIndex: number, opts: {
5570
+ leftEmu?: number | null;
5571
+ rightEmu?: number | null;
5572
+ firstLineEmu?: number | null;
5573
+ }) => void;
4265
5574
  /**
4266
5575
  * Reads the paragraph's `<a:lnSpc>` line spacing. PowerPoint stores
4267
5576
  * line spacing two ways:
@@ -4275,7 +5584,7 @@ declare const getParagraphIndent: (shape: SlideShapeData, paragraphIndex: number
4275
5584
  * Returns `null` when no `<a:lnSpc>` is present (the paragraph
4276
5585
  * inherits line spacing from the layout / master).
4277
5586
  */
4278
- declare const getParagraphLineSpacing: (shape: SlideShapeData, paragraphIndex: number) => {
5587
+ declare const getParagraphLineSpacing: (shape: SlideShapeData | TableCellData, paragraphIndex: number) => {
4279
5588
  readonly kind: "pct";
4280
5589
  readonly value: number;
4281
5590
  } | {
@@ -4293,7 +5602,7 @@ declare const getParagraphLineSpacing: (shape: SlideShapeData, paragraphIndex: n
4293
5602
  * Pass `null` to clear the override (the paragraph then inherits line
4294
5603
  * spacing from the layout / master).
4295
5604
  */
4296
- declare const setParagraphLineSpacing: (shape: SlideShapeData, paragraphIndex: number, spacing: {
5605
+ declare const setParagraphLineSpacing: (shape: SlideShapeData | TableCellData, paragraphIndex: number, spacing: {
4297
5606
  readonly kind: "pct";
4298
5607
  readonly value: number;
4299
5608
  } | {
@@ -4305,7 +5614,7 @@ declare const setParagraphLineSpacing: (shape: SlideShapeData, paragraphIndex: n
4305
5614
  * no `<a:buChar>` / `<a:buAutoNum>` / `<a:buNone>` is present (the
4306
5615
  * paragraph inherits its bullet from the layout / master).
4307
5616
  */
4308
- declare const getParagraphBullet: (shape: SlideShapeData, paragraphIndex: number) => BulletStyle | null;
5617
+ declare const getParagraphBullet: (shape: SlideShapeData | TableCellData, paragraphIndex: number) => BulletStyle | null;
4309
5618
  /**
4310
5619
  * Returns `true` when the paragraph uses an image as its bullet
4311
5620
  * (`<a:pPr><a:buBlip r:embed="…"/>`). Renderers without image
@@ -4316,7 +5625,7 @@ declare const getParagraphBullet: (shape: SlideShapeData, paragraphIndex: number
4316
5625
  * inherits from, which can be cumbersome. Knowing that the bullet
4317
5626
  * *is* an image is usually enough for the UI to pick a fallback.
4318
5627
  */
4319
- declare const isParagraphBulletPicture: (shape: SlideShapeData, paragraphIndex: number) => boolean;
5628
+ declare const isParagraphBulletPicture: (shape: SlideShapeData | TableCellData, paragraphIndex: number) => boolean;
4320
5629
  /**
4321
5630
  * Returns the embedded image bytes backing a paragraph's picture bullet
4322
5631
  * (`<a:pPr><a:buBlip><a:blip r:embed="…"/>`), or `null` when the
@@ -4328,7 +5637,7 @@ declare const isParagraphBulletPicture: (shape: SlideShapeData, paragraphIndex:
4328
5637
  * layout/master paragraph isn't followed. The returned `Uint8Array` is a
4329
5638
  * live view into the package media part; treat it as read-only.
4330
5639
  */
4331
- declare const getParagraphBulletImageBytes: (shape: SlideShapeData, paragraphIndex: number) => Uint8Array | null;
5640
+ declare const getParagraphBulletImageBytes: (shape: SlideShapeData | TableCellData, paragraphIndex: number) => Uint8Array | null;
4332
5641
  /**
4333
5642
  * Reads the bullet's per-paragraph color, size, and font overrides —
4334
5643
  * `<a:buClr>` (theme-resolved hex), `<a:buSzPct>` / `<a:buSzPts>`
@@ -4338,7 +5647,7 @@ declare const getParagraphBulletImageBytes: (shape: SlideShapeData, paragraphInd
4338
5647
  * when the paragraph doesn't override any of them (the bullet inherits
4339
5648
  * from the run / layout).
4340
5649
  */
4341
- declare const getParagraphBulletStyle: (pres: PresentationData, shape: SlideShapeData, paragraphIndex: number) => {
5650
+ declare const getParagraphBulletStyle: (pres: PresentationData, shape: SlideShapeData | TableCellData, paragraphIndex: number) => {
4342
5651
  color: string | null;
4343
5652
  sizePct: number | null;
4344
5653
  sizePts: number | null;
@@ -4349,111 +5658,27 @@ declare const getParagraphBulletStyle: (pres: PresentationData, shape: SlideShap
4349
5658
  * as `setShapeBulletStyle` — pass `'bullet'` / `'number'` / `'none'` or an
4350
5659
  * object like `{ char: '◆' }` / `{ autoNum: 'romanLcPeriod' }`.
4351
5660
  */
4352
- declare const setParagraphBullet: (shape: SlideShapeData, paragraphIndex: number, style: BulletStyle) => void;
5661
+ declare const setParagraphBullet: (shape: SlideShapeData | TableCellData, paragraphIndex: number, style: BulletStyle) => void;
4353
5662
  /**
4354
5663
  * Sets the text of a single run. Existing rPr (font, size, color, ...)
4355
5664
  * is preserved — only the visible characters change.
4356
5665
  */
4357
- declare const setShapeRunText: (shape: SlideShapeData, paragraphIndex: number, runIndex: number, text: string) => void;
4358
- //#endregion
4359
- //#region src/api/fn/theme.d.ts
4360
- /**
4361
- * The named color scheme on a presentation's theme. Each slot is a
4362
- * `#RRGGBB` string — `sysClr` slots are flattened to their cached
4363
- * `lastClr` value.
4364
- */
4365
- interface PresentationTheme {
4366
- readonly name: string;
4367
- readonly dark1: string;
4368
- readonly light1: string;
4369
- readonly dark2: string;
4370
- readonly light2: string;
4371
- readonly accent1: string;
4372
- readonly accent2: string;
4373
- readonly accent3: string;
4374
- readonly accent4: string;
4375
- readonly accent5: string;
4376
- readonly accent6: string;
4377
- readonly hyperlink: string;
4378
- readonly followedHyperlink: string;
4379
- }
4380
- /**
4381
- * Returns the deck's color scheme as `#RRGGBB` strings, or `null` if
4382
- * the package carries no theme. Each accent slot maps directly to the
4383
- * `accent1`–`accent6` chart palette defaults.
4384
- *
4385
- * The deck's theme is the one its first slide master references. A
4386
- * package usually holds more themes than that — notes and handout
4387
- * masters carry their own, and Google Slides exports name the notes
4388
- * theme `theme1.xml` ahead of the slide theme `theme2.xml` — so the
4389
- * slide master relationship decides, not the part name. Multi-master
4390
- * decks surface the first master's theme only; per-master theme lookup
4391
- * will land if a concrete user need shows up.
4392
- */
4393
- declare const getPresentationTheme: (pres: PresentationData) => PresentationTheme | null;
4394
- /**
4395
- * The theme's font scheme, flattened to the typefaces the runs in a
4396
- * deck inherit by default. `major*` is the heading font (slide
4397
- * titles, chart titles); `minor*` is the body font.
4398
- *
4399
- * Each field carries the Latin / East-Asian / Complex-Script
4400
- * typeface name as written on the theme. Empty values are
4401
- * normalized to `null`.
4402
- */
4403
- interface PresentationFonts {
4404
- readonly majorLatin: string | null;
4405
- readonly majorEastAsian: string | null;
4406
- readonly majorComplexScript: string | null;
4407
- readonly minorLatin: string | null;
4408
- readonly minorEastAsian: string | null;
4409
- readonly minorComplexScript: string | null;
4410
- }
4411
- /**
4412
- * Returns the deck theme's font scheme, or `null` when the package
4413
- * carries no theme. As with `getPresentationTheme`, the deck theme is
4414
- * the first slide master's; per-master font lookup will land if needed.
4415
- */
4416
- declare const getPresentationFonts: (pres: PresentationData) => PresentationFonts | null;
4417
- /**
4418
- * Overwrites the named slots of the deck theme's color
4419
- * scheme (`<a:clrScheme>`), leaving every other slot untouched. Slot
4420
- * values are `#RRGGBB` (or 3-digit `#RGB`) strings; every branded
4421
- * `srgbClr`/`sysClr` slot is normalized to a plain `<a:srgbClr>` on
4422
- * write, since a theme slot is never a scheme-color reference.
4423
- *
4424
- * As with `getPresentationTheme`, multi-master decks are branded via
4425
- * their first slide master's theme only.
4426
- *
4427
- * Throws if the presentation has no theme part, or if a provided color
4428
- * isn't a valid `#RRGGBB` string.
4429
- */
4430
- declare const setPresentationTheme: (pres: PresentationData, theme: Partial<Omit<PresentationTheme, "name">> & {
4431
- name?: string;
4432
- }) => void;
4433
- /**
4434
- * Typeface overrides for {@link setPresentationFonts}. Unlike
4435
- * `PresentationFonts` (the read side, where an empty typeface value
4436
- * flattens to `null`), every field here is a plain string — the
4437
- * underlying `<a:latin>` / `<a:ea>` / `<a:cs>` elements are mandatory on
4438
- * a valid theme, so there's no "clear this typeface" operation.
4439
- */
4440
- interface PresentationFontsInput {
4441
- readonly majorLatin?: string;
4442
- readonly majorEastAsian?: string;
4443
- readonly majorComplexScript?: string;
4444
- readonly minorLatin?: string;
4445
- readonly minorEastAsian?: string;
4446
- readonly minorComplexScript?: string;
4447
- }
5666
+ declare const setShapeRunText: (shape: SlideShapeData, paragraphIndex: number, runIndex: number, text: string) => void;
4448
5667
  /**
4449
- * Overwrites the named typefaces of the deck theme's font scheme
4450
- * (major = headings, minor = body), leaving unset fields untouched. As
4451
- * with `setPresentationTheme`, only the first slide master's theme is
4452
- * branded.
4453
- *
4454
- * Throws if the presentation has no theme part.
5668
+ * Update paragraph line-breaking rules and character alignment. Omitted fields
5669
+ * are preserved; null removes the local override so the style can inherit.
4455
5670
  */
4456
- declare const setPresentationFonts: (pres: PresentationData, fonts: PresentationFontsInput) => void;
5671
+ declare const setParagraphTypography: (shape: SlideShapeData | TableCellData, paragraphIndex: number, settings: {
5672
+ asianLineBreak?: boolean | null;
5673
+ latinLineBreak?: boolean | null;
5674
+ hangingPunctuation?: boolean | null;
5675
+ fontAlignment?: "auto" | "top" | "center" | "baseline" | "bottom" | null;
5676
+ }) => void;
5677
+ /** Set custom and automatic tab stops. Null restores inheritance; [] clears custom stops. */
5678
+ declare const setParagraphTabs: (shape: SlideShapeData | TableCellData, paragraphIndex: number, settings: {
5679
+ tabStops?: readonly ParagraphTabStop[] | null;
5680
+ defaultTabSizeEmu?: number | null;
5681
+ }) => void;
4457
5682
  //#endregion
4458
5683
  //#region src/api/fn/shape-color.d.ts
4459
5684
  /**
@@ -4492,123 +5717,40 @@ declare const resolveDrawingColorOpacity: (colorEl: XmlElement) => number | null
4492
5717
  */
4493
5718
  declare const getShapeRunFormat: (shape: SlideShapeData, paragraphIndex: number, runIndex: number) => ReadTextFormat | null;
4494
5719
  //#endregion
4495
- //#region src/api/fn/shape-paragraph.d.ts
4496
- declare const getShapeRunFormatEffective: (pres: PresentationData, shape: SlideShapeData, paragraphIndex: number, runIndex: number) => ReadTextFormat;
4497
- /** Effective paragraph properties returned by `getParagraphPropertiesEffective`. */
4498
- interface ParagraphProperties {
4499
- /** Horizontal alignment per `ParagraphAlignment`. */
4500
- align: ParagraphAlignment | null;
4501
- /** Outline level (0..8). 0 = top-level paragraph. */
4502
- level: number;
4503
- /** Left indent in EMU. */
4504
- marL: number | null;
4505
- /** Right indent in EMU. */
4506
- marR: number | null;
4507
- /** First-line indent in EMU; negative for hanging indents. */
4508
- indent: number | null;
4509
- /** Line spacing — either a percent multiplier or a fixed point value. */
4510
- lineSpacing: {
4511
- readonly kind: 'pct';
4512
- readonly value: number;
4513
- } | {
4514
- readonly kind: 'pts';
4515
- readonly value: number;
4516
- } | null;
4517
- /** Space before the paragraph in points. */
4518
- spcBefPts: number | null;
4519
- /** Space after the paragraph in points. */
4520
- spcAftPts: number | null;
4521
- /** Right-to-left paragraph (`<a:pPr rtl="1"/>`). */
4522
- rtl: boolean | null;
4523
- /**
4524
- * Bullet resolved through the cascade (`<a:buChar>` / `<a:buAutoNum>` /
4525
- * `<a:buNone>`). Master `bodyStyle` levels author the PowerPoint default
4526
- * "•", so body placeholders get their bullet from here even when no
4527
- * slide-level `<a:pPr>` carries one.
4528
- */
4529
- bullet: BulletStyle | null;
4530
- }
4531
- /**
4532
- * Resolves a paragraph's effective properties by walking the same
4533
- * inheritance chain `getShapeRunFormatEffective` uses, but for the
4534
- * paragraph-level surface:
4535
- *
4536
- * - alignment, indent (left / right / first-line), line spacing,
4537
- * paragraph spacing (before / after), rtl.
4538
- *
4539
- * Each property is resolved independently; the innermost layer that
4540
- * sets it wins. Fields the cascade can't resolve come through as `null`
4541
- * so renderers know to fall back to their own defaults.
4542
- *
4543
- * Companion to `getParagraphAlignment` / `getParagraphLineSpacing` /
4544
- * `getParagraphIndent` / `getParagraphSpacing`, which only surface the
4545
- * literal `<a:pPr>` and skip the layout / master cascade.
4546
- */
4547
- declare const getParagraphPropertiesEffective: (pres: PresentationData, shape: SlideShapeData, paragraphIndex: number) => ParagraphProperties;
4548
- /**
4549
- * Applies `format` to a single run. Run-property attributes not
4550
- * addressed by `format` are preserved — partial updates compose.
4551
- *
4552
- * Example: bold the second word of the first paragraph:
4553
- *
4554
- * setShapeRunFormat(shape, 0, 1, { bold: true, color: '#FF0000' });
4555
- */
4556
- declare const setShapeRunFormat: (shape: SlideShapeData, paragraphIndex: number, runIndex: number, format: TextFormat) => void;
4557
- /**
4558
- * Reads the external URL the first run in the shape's text-body links
4559
- * to (set via `setShapeHyperlink`). Returns `null` when no run carries
4560
- * an `<a:hlinkClick r:id=…/>` or the rId resolves to a non-hyperlink
4561
- * target.
4562
- */
4563
- declare const getShapeHyperlink: (shape: SlideShapeData) => string | null;
4564
- /**
4565
- * Sets an external hyperlink on every run in the shape's text. Allocates
4566
- * (or reuses) a `hyperlink` relationship on the slide's `.rels`. Pass
4567
- * `null` to clear.
4568
- */
4569
- declare const setShapeHyperlink: (shape: SlideShapeData, url: string | null, tooltip?: string) => void;
4570
- //#endregion
4571
5720
  //#region src/api/fn/shape-removal-zorder.d.ts
4572
5721
  /**
4573
- * Copies a shape into `targetSlide`. The source XML is cloned and
4574
- * appended to the target's `<p:spTree>`. Image rels on the source
4575
- * shape are followed: the linked media part is referenced from the
4576
- * target slide via a freshly allocated rId (no media bytes are
4577
- * copied — both slides share the underlying part).
4578
- *
4579
- * v1 requires source and target to live in the same package
4580
- * (`sourceShape`'s slide and `targetSlide` must share the same
4581
- * `OpcPackage`). Cross-package copy is `importSlide` territory.
4582
- *
4583
- * Returns the new `SlideShapeData` on `targetSlide`.
4584
- */
4585
- declare const copyShape: (targetSlide: SlideData, sourceShape: SlideShapeData) => SlideShapeData;
4586
- /** Move `shape` to the end of its spTree (render in front of all others). */
4587
- declare const bringShapeToFront: (shape: SlideShapeData) => void;
4588
- /**
4589
- * Move `shape` behind every other shape on the slide. The
4590
- * `<p:nvGrpSpPr>` / `<p:grpSpPr>` preface — required by the schema —
4591
- * stays at the top.
5722
+ * Copies a shape into `targetSlide`, including nested shapes and relationships.
5723
+ * Within a presentation, media and other referenced parts remain shared.
5724
+ * Across presentations, dependencies are cloned with collision-free part names,
5725
+ * retaining embedded workbooks, unknown parts and external links.
5726
+ * With `preserveGroupTransform`, a nested source retains its ancestor group
5727
+ * transforms as wrappers, excluding sibling objects. Returns the outermost
5728
+ * copied shape on the target slide.
4592
5729
  */
4593
- declare const sendShapeToBack: (shape: SlideShapeData) => void;
4594
- /** Swap `shape` with the next shape sibling (move one step forward). */
4595
- declare const bringShapeForward: (shape: SlideShapeData) => void;
4596
- /**
4597
- * Returns the shape's z-index among the slide's "real" shape children
5730
+ declare const copyShape: (targetSlide: SlideData, sourceShape: SlideShapeData, opts?: {
5731
+ readonly preserveGroupTransform?: boolean;
5732
+ }) => SlideShapeData;
5733
+ /** Move one shape or a selection in front of all siblings, preserving their stacking order. */
5734
+ declare const bringShapeToFront: (shape: SlideShapeData | readonly SlideShapeData[]) => void;
5735
+ /** Move one shape or a selection behind all siblings, preserving their stacking order. */
5736
+ declare const sendShapeToBack: (shape: SlideShapeData | readonly SlideShapeData[]) => void;
5737
+ /** Move one shape or a selection one step forward among siblings. */
5738
+ declare const bringShapeForward: (shape: SlideShapeData | readonly SlideShapeData[]) => void;
5739
+ /**
5740
+ * Returns the shape's z-index among its parent container's "real" shape children
4598
5741
  * (`<p:sp>` / `<p:pic>` / `<p:cxnSp>` / `<p:graphicFrame>` / `<p:grpSp>`),
4599
5742
  * skipping the required `<p:nvGrpSpPr>` / `<p:grpSpPr>` preface.
4600
5743
  * Higher numbers render in front.
4601
5744
  */
4602
5745
  declare const getShapeZIndex: (shape: SlideShapeData) => number;
4603
5746
  /**
4604
- * Moves the shape to a specific z-index among the slide's "real"
4605
- * shape children. Index is clamped to the available range. Higher
4606
- * numbers render in front. The required preface elements stay at the
4607
- * top of `<p:spTree>`.
5747
+ * Moves a shape or an ordered batch of siblings to a specific z-index.
5748
+ * A batch is inserted contiguously in the supplied order, back to front.
5749
+ * Index is clamped to the available range. Non-shape XML stays in place.
4608
5750
  */
4609
- declare const setShapeZIndex: (shape: SlideShapeData, toIndex: number) => void;
4610
- /** Swap `shape` with the previous shape sibling (move one step backward). */
4611
- declare const sendShapeBackward: (shape: SlideShapeData) => void;
5751
+ declare const setShapeZIndex: (shape: SlideShapeData | readonly SlideShapeData[], toIndex: number) => void;
5752
+ /** Move one shape or a selection one step backward among siblings. */
5753
+ declare const sendShapeBackward: (shape: SlideShapeData | readonly SlideShapeData[]) => void;
4612
5754
  /**
4613
5755
  * Removes the shape from its slide's shape tree. Subsequent property
4614
5756
  * reads on this handle reflect the stale snapshot — discard it after.
@@ -4722,6 +5864,38 @@ declare const addSlideImage: (slide: SlideData, bytes: Uint8Array, opts: {
4722
5864
  fit?: ImageFit;
4723
5865
  }) => SlideShapeData;
4724
5866
  //#endregion
5867
+ //#region src/api/fn/layout-edit.d.ts
5868
+ /**
5869
+ * Renames the layout. This is the name PowerPoint shows in the
5870
+ * "New Slide" gallery and in the layout pane, so it is what an author
5871
+ * picks a layout by — it is not an identifier, and nothing references
5872
+ * it.
5873
+ */
5874
+ declare const setSlideLayoutName: (layout: SlideLayoutData, name: string) => void;
5875
+ /**
5876
+ * Gives the layout a solid background, replacing whatever it had.
5877
+ * Every slide on this layout that does not set a background of its own
5878
+ * follows.
5879
+ *
5880
+ * `color` takes the same forms as `setSlideBackground`: `#RRGGBB` or
5881
+ * `scheme:accent1`.
5882
+ */
5883
+ declare const setSlideLayoutBackground: (layout: SlideLayoutData, color: string) => void;
5884
+ /**
5885
+ * Drops the layout's own background so it inherits the master's again.
5886
+ */
5887
+ declare const clearSlideLayoutBackground: (layout: SlideLayoutData) => void;
5888
+ /**
5889
+ * Moves and resizes one of the layout's placeholder slots, identified by
5890
+ * its position in `getSlideLayoutPlaceholders`.
5891
+ *
5892
+ * Slides inherit the new box wherever they have not pushed the
5893
+ * placeholder around themselves: a slide placeholder carrying its own
5894
+ * `<a:xfrm>` keeps it, exactly as PowerPoint behaves when you edit a
5895
+ * layout under slides that were already nudged.
5896
+ */
5897
+ declare const setSlideLayoutPlaceholderBounds: (layout: SlideLayoutData, index: number, bounds: ShapeBounds) => void;
5898
+ //#endregion
4725
5899
  //#region src/api/fn/layouts.d.ts
4726
5900
  /** PowerPoint's user-visible layout name. */
4727
5901
  declare const getSlideLayoutName: (layout: SlideLayoutData) => string;
@@ -5198,11 +6372,24 @@ declare const getAllShapes: (pres: PresentationData) => ReadonlyArray<AllShapesE
5198
6372
  * but keeps them in the editing surface.
5199
6373
  */
5200
6374
  declare const isSlideHidden: (slide: SlideData) => boolean;
6375
+ /** Whether inherited master and layout decoration is hidden on this slide. */
6376
+ declare const isSlideBackgroundGraphicsHidden: (slide: SlideData) => boolean;
6377
+ /** Whether a layout suppresses its master's decoration, keeping its own shapes. */
6378
+ declare const isSlideLayoutBackgroundGraphicsHidden: (layout: SlideLayoutData) => boolean;
6379
+ /**
6380
+ * Hide inherited decoration without removing shapes or changing background fills.
6381
+ * PowerPoint's Hide Background Graphics suppresses layout decoration as well as
6382
+ * master shapes, despite the attribute's name. Slide placeholders remain visible.
6383
+ */
6384
+ declare const setSlideBackgroundGraphicsHidden: (slide: SlideData, hidden: boolean) => void;
5201
6385
  /**
5202
- * Returns `true` when the slide carries a `<p:timing>` block — i.e.,
5203
- * has at least one authored animation effect. Per-slide complement to
5204
- * `getPresentationSummary().hasAnimations`, which only reports a
5205
- * deck-wide flag.
6386
+ * Returns `true` when the slide has at least one authored animation effect.
6387
+ * Per-slide complement to `getPresentationSummary().hasAnimations`, which only
6388
+ * reports a deck-wide flag.
6389
+ *
6390
+ * A slide holding only a video / audio clip also carries a `<p:timing>` block
6391
+ * — that is where the clip's play controls live — so the element's presence
6392
+ * alone is not an animation.
5206
6393
  */
5207
6394
  declare const slideHasAnimations: (slide: SlideData) => boolean;
5208
6395
  /**
@@ -5219,7 +6406,10 @@ declare const replaceTokensInPresentation: (pres: PresentationData, tokens: Reco
5219
6406
  /**
5220
6407
  * Replaces every occurrence of `from` in every slide's text with `to`.
5221
6408
  * `from` may be a string (treated as a literal) or a `RegExp`. Returns
5222
- * the number of `<a:t>` elements mutated across the whole deck.
6409
+ * the number of `<a:t>` elements mutated across the whole deck. Matches can
6410
+ * span formatting runs within a paragraph, but not explicit line breaks.
6411
+ * Inserted text inherits the first matched run’s formatting. `to` follows
6412
+ * JavaScript replacement-string rules (`$$`, `$&`, capture groups).
5223
6413
  *
5224
6414
  * Use this for the broad "rename product X to Y" pattern; for
5225
6415
  * `{{token}}` style substitutions, prefer
@@ -5228,20 +6418,29 @@ declare const replaceTokensInPresentation: (pres: PresentationData, tokens: Reco
5228
6418
  declare const replaceTextInPresentation: (pres: PresentationData, from: string | RegExp, to: string) => number;
5229
6419
  /**
5230
6420
  * Replaces every occurrence of `from` in the slide's text with `to`.
5231
- * Returns the number of `<a:t>` elements mutated on this slide.
6421
+ * Matches span adjacent formatting runs, bounded by paragraphs and explicit
6422
+ * line breaks. Inserted text inherits the first matched run’s formatting;
6423
+ * `to` follows JavaScript replacement-string rules. Returns the number of
6424
+ * `<a:t>` elements mutated on this slide.
5232
6425
  */
5233
6426
  declare const replaceTextInSlide: (slide: SlideData, from: string | RegExp, to: string) => number;
5234
6427
  //#endregion
5235
- //#region src/api/fn/slide-deck.d.ts
6428
+ //#region src/api/fn/custom-shows.d.ts
6429
+ /** A named slide sequence. Repeated slides and empty sequences are supported. */
6430
+ interface CustomShow {
6431
+ readonly id: number;
6432
+ readonly name: string;
6433
+ readonly slides: readonly SlideData[];
6434
+ }
6435
+ /** Reads custom shows in list order. Missing slide references are omitted. */
6436
+ declare function getCustomShows(pres: PresentationData): CustomShow[];
5236
6437
  /**
5237
- * Adds a new slide bound to `layout`. Returns the new `SlideData`.
5238
- *
5239
- * Allocates a fresh part name, sldId, and rId; clones layout
5240
- * placeholders into the slide; writes `[Content_Types].xml`, the
5241
- * slide's `.rels`, presentation's `.rels`, and `<p:sldIdLst>`. The
5242
- * deck-cache on `pres` is invalidated so the next `getSlides` call
5243
- * sees the new entry.
6438
+ * Replaces the custom-show list atomically, retaining metadata on surviving IDs.
6439
+ * Slide handles must belong to this presentation. IDs are stable unsigned integers.
5244
6440
  */
6441
+ declare function setCustomShows(pres: PresentationData, shows: readonly CustomShow[]): void;
6442
+ //#endregion
6443
+ //#region src/api/fn/slide-deck.d.ts
5245
6444
  /**
5246
6445
  * Convenience over `addSlide` that picks a layout automatically:
5247
6446
  *
@@ -5280,12 +6479,23 @@ declare const addSectionHeaderSlide: (pres: PresentationData, title: string) =>
5280
6479
  * Throws when the package carries no layouts at all.
5281
6480
  */
5282
6481
  declare const addTitleSlide: (pres: PresentationData, title: string) => SlideData;
6482
+ /**
6483
+ * Adds a new slide bound to `layout`. Returns the new `SlideData`.
6484
+ *
6485
+ * Allocates a fresh part name, sldId, and rId; clones layout
6486
+ * placeholders into the slide; writes `[Content_Types].xml`, the
6487
+ * slide's `.rels`, presentation's `.rels`, and `<p:sldIdLst>`. The
6488
+ * deck cache is updated while existing slide handles remain valid.
6489
+ * The layout must belong to this presentation.
6490
+ */
5283
6491
  declare const addSlide: (pres: PresentationData, options: {
5284
6492
  layout: SlideLayoutData;
5285
6493
  }) => SlideData;
5286
6494
  /**
5287
6495
  * Removes the given slide from the deck. Removes the `<p:sldId>`, the
5288
6496
  * `presentation.xml.rels` entry, and the slide part + its `.rels` part.
6497
+ * Links to this slide from other slides are cleared to prevent accidental
6498
+ * retargeting when a slide part name is reused.
5289
6499
  *
5290
6500
  * Media parts are intentionally NOT cleaned up — they may be shared
5291
6501
  * with other slides. The freed `sldId` is NOT reused on subsequent
@@ -5329,39 +6539,35 @@ declare const moveSlide: (pres: PresentationData, slide: SlideData, toIndex: num
5329
6539
  */
5330
6540
  declare const duplicateSlide: (pres: PresentationData, slide: SlideData) => SlideData;
5331
6541
  /**
5332
- * Convenience over `addSlide` + `moveSlide`. Inserts the new slide
5333
- * at the given 0-based index (clamped to `[0, getSlides(pres).length]`).
6542
+ * Inserts slides at a 0-based index, clamped to the presentation bounds.
6543
+ * A list of layout options inserts a contiguous batch in the same order,
6544
+ * allocating IDs and updating shared package parts once. Existing slide handles
6545
+ * remain valid. All layouts must belong to the target presentation.
5334
6546
  */
5335
- declare const addSlideAt: (pres: PresentationData, atIndex: number, options: {
6547
+ declare function addSlideAt(pres: PresentationData, atIndex: number, options: ReadonlyArray<{
5336
6548
  layout: SlideLayoutData;
5337
- }) => SlideData;
6549
+ }>): SlideData[];
6550
+ declare function addSlideAt(pres: PresentationData, atIndex: number, options: {
6551
+ layout: SlideLayoutData;
6552
+ }): SlideData;
5338
6553
  /**
5339
6554
  * Convenience over `duplicateSlide` + `moveSlide`. Duplicates `slide`
5340
6555
  * and inserts the duplicate at `atIndex` instead of at the end.
5341
6556
  */
5342
6557
  declare const duplicateSlideAt: (pres: PresentationData, atIndex: number, slide: SlideData) => SlideData;
5343
6558
  /**
5344
- * Imports a slide from another presentation into `targetPres`. The
5345
- * slide's part bytes are copied verbatim; image rels are followed and
5346
- * the linked media is copied into the target package with fresh part
5347
- * names. The new slide is bound to the supplied `targetLayout` so it
5348
- * still renders without the original deck's layouts.
5349
- *
5350
- * Limitations (v1):
5351
- *
5352
- * - Only image / video / audio rels are copied across. Other rels (charts,
5353
- * embedded workbooks, oleObjects, comments) are dropped from the imported
5354
- * slide. A diagnostic message is appended for each dropped rel.
5355
- * - Hyperlinks (external URLs) are preserved.
5356
- * - Slide → notesSlide is dropped (notes don't follow imports).
5357
- *
5358
- * Returns the new `SlideData` appended to `targetPres`.
6559
+ * Imports a slide into `targetPres`. When `targetLayout` is supplied, rebinds
6560
+ * the slide to it. Otherwise preserves the source layout, master and theme.
6561
+ * Copies the complete relationship graph, including charts, workbooks, notes,
6562
+ * media and unknown extension parts. Shared dependencies and cycles retain
6563
+ * their relationships; external hyperlinks are preserved. Missing dependencies
6564
+ * fail before writing any imported parts.
6565
+ * Returns the new slide appended to the target presentation.
5359
6566
  */
5360
- declare const importSlide: (targetPres: PresentationData, sourceSlide: SlideData, targetLayout: SlideLayoutData) => SlideData;
6567
+ declare const importSlide: (targetPres: PresentationData, sourceSlide: SlideData, targetLayout?: SlideLayoutData) => SlideData;
5361
6568
  /**
5362
6569
  * Appends every slide from `sourcePres` into `targetPres`, in source
5363
- * order. Built on top of `importSlide`: media is propagated, charts
5364
- * are dropped (not yet supported across decks), and the slide's
6570
+ * order. Built on top of `importSlide`: dependencies are preserved, and the slide's
5365
6571
  * layout is rebound to `targetLayout` on the target side.
5366
6572
  *
5367
6573
  * `targetLayout` can be a single layout used for every imported
@@ -5372,38 +6578,177 @@ declare const importSlide: (targetPres: PresentationData, sourceSlide: SlideData
5372
6578
  */
5373
6579
  declare const mergePresentations: (targetPres: PresentationData, sourcePres: PresentationData, targetLayout: SlideLayoutData | ((sourceSlide: SlideData, index: number) => SlideLayoutData)) => ReadonlyArray<SlideData>;
5374
6580
  //#endregion
6581
+ //#region src/api/fn/slide-placeholder-geometry.d.ts
6582
+ /**
6583
+ * Restore top-level placeholders' position, size, rotation and flips from the
6584
+ * current layout (or its master when the layout inherits its geometry).
6585
+ * Text, formatting, IDs, relationships and other shapes are preserved. Slots
6586
+ * without matching layout geometry are left intact; deleted placeholders are
6587
+ * not recreated.
6588
+ *
6589
+ * A placeholder inside a group is left where it is. The layout states a
6590
+ * rectangle on the slide, while a grouped shape's own geometry is written in
6591
+ * its group's coordinate space — so restoring it would mean either tearing the
6592
+ * shape out of the arrangement it was grouped into, or inventing a rectangle
6593
+ * the layout never described. Its formatting and appearance are still reset by
6594
+ * the two functions below.
6595
+ *
6596
+ * Returns the number of placeholders restored.
6597
+ */
6598
+ declare const resetSlidePlaceholderGeometry: (slide: SlideData) => number;
6599
+ /**
6600
+ * Restore missing slide placeholders using the current layout.
6601
+ * Existing content, geometry and formatting are untouched, including grouped
6602
+ * placeholders. New slots inherit their layout's geometry and text style;
6603
+ * layout prompt text and layout-only relationships are not copied.
6604
+ * Returns the number of added placeholders. Repeated calls do not add duplicates.
6605
+ */
6606
+ declare const addMissingSlidePlaceholders: (slide: SlideData) => number;
6607
+ /**
6608
+ * Adds the single placeholder of `type` that the layout defines and the slide
6609
+ * is missing — how an editor inserts a slide number, date or footer into a
6610
+ * slide without also restoring every other slot the author deleted.
6611
+ *
6612
+ * `type` is an ECMA-376 `ST_PlaceholderType` token (`sldNum`, `dt`, `ftr`,
6613
+ * `title`, `body`, …), matched as `findSlidePlaceholder` matches it. Returns
6614
+ * the slide's placeholder of that type — the one just added or the one already
6615
+ * there — or `null` when the layout reserves no such slot. Like the added slots
6616
+ * of `addMissingSlidePlaceholders`, it starts empty and inherits its geometry
6617
+ * and text style from the layout and master.
6618
+ * Pass `source: 'master'` to create an unmatched slot that inherits directly
6619
+ * from the master, without changing the layout (as PowerPoint does when
6620
+ * demoting outline text into a Title Only slide). Returns null if absent there.
6621
+ */
6622
+ declare const addSlidePlaceholder: (slide: SlideData, type: PlaceholderType, options?: {
6623
+ source?: "layout" | "master";
6624
+ }) => SlideShapeData | null;
6625
+ /**
6626
+ * Restore inherited text formatting on placeholders bound to the current
6627
+ * layout, including placeholders inside a group. Clears direct run, paragraph
6628
+ * and text-body appearance while preserving text, fields, hyperlinks,
6629
+ * language, outline levels and unknown extensions. Geometry and shape
6630
+ * appearance remain unchanged.
6631
+ * Returns the number of matching text placeholders processed.
6632
+ */
6633
+ declare const resetSlidePlaceholderTextFormatting: (slide: SlideData) => number;
6634
+ /**
6635
+ * Reset the current slide's layout: restore deleted slots, reset top-level
6636
+ * placeholder geometry and clear direct shape/text appearance to inherit the
6637
+ * layout again. Content, picture crops, relationships, IDs and unrelated shapes
6638
+ * remain intact.
6639
+ *
6640
+ * A placeholder inside a group has its appearance and text formatting reset
6641
+ * like any other, but keeps its geometry: where it sits is a statement about
6642
+ * the group's arrangement, and the layout has nothing to say about that.
6643
+ *
6644
+ * Returns the number of layout placeholders processed, including new slots.
6645
+ */
6646
+ declare const resetSlideLayout: (slide: SlideData) => number;
6647
+ //#endregion
6648
+ //#region src/api/fn/shape-locks.d.ts
6649
+ /** Whether the object's movement and resizing are both locked, as in PowerPoint's Selection Pane. */
6650
+ declare const isShapeLocked: (shape: SlideShapeData) => boolean;
6651
+ /** Whether PowerPoint preserves this object's aspect ratio while resizing it. */
6652
+ declare const isShapeAspectRatioLocked: (shape: SlideShapeData) => boolean;
6653
+ /**
6654
+ * Locks or unlocks object geometry like PowerPoint's Selection Pane. Text,
6655
+ * selection, aspect-ratio constraints and extension data remain unchanged.
6656
+ * Group children keep their own locks; pass all descendants for Lock All.
6657
+ * Arrays are committed once per slide, including selections across slides.
6658
+ */
6659
+ declare const setShapeLocked: (shapes: SlideShapeData | readonly SlideShapeData[], locked: boolean) => void;
6660
+ /**
6661
+ * Sets the DrawingML `noChangeAspect` constraint without disturbing other
6662
+ * nonvisual properties. An absent constraint and an explicit false value both
6663
+ * read as unlocked; disabling the constraint removes only this attribute.
6664
+ */
6665
+ declare const setShapeAspectRatioLocked: (shapes: SlideShapeData | readonly SlideShapeData[], locked: boolean) => void;
6666
+ //#endregion
6667
+ //#region src/api/fn/shape-custom-geometry.d.ts
6668
+ /** One path to write; `fill` defaults to `'norm'` and `stroke` to `true`, as in the schema. */
6669
+ interface CustomGeometryPathInput {
6670
+ /** Path coordinate-space width and height (`ST_PositiveCoordinate`). */
6671
+ readonly w: number;
6672
+ readonly h: number;
6673
+ readonly fill?: PathFillMode;
6674
+ readonly stroke?: boolean;
6675
+ readonly commands: readonly GeomCommand[];
6676
+ }
6677
+ interface CustomGeometryInput {
6678
+ readonly paths: readonly CustomGeometryPathInput[];
6679
+ }
6680
+ /**
6681
+ * Replaces the shape's geometry (preset or custom) with the given paths. The
6682
+ * text rectangle is the whole shape, as PowerPoint writes for freeforms.
6683
+ * Coordinates are rounded to integers, which the schema requires.
6684
+ */
6685
+ declare const setShapeCustomGeometry: (shape: SlideShapeData, geometry: CustomGeometryInput) => void;
6686
+ //#endregion
6687
+ //#region src/api/fn/shape-text-language.d.ts
6688
+ /** Marks every run in the shape's text (and the end-of-paragraph marks) as `lang`, e.g. `en-US`. */
6689
+ declare const setShapeTextLanguage: (shape: SlideShapeData, lang: string) => void;
6690
+ /** The language of the shape's first run that names one, or `null`. */
6691
+ declare const getShapeTextLanguage: (shape: SlideShapeData) => string | null;
6692
+ //#endregion
6693
+ //#region src/api/fn/shape-style.d.ts
6694
+ /** One DrawingML style-list reference used by a shape quick style. */
6695
+ interface ShapeStyleReference {
6696
+ /** 0 clears the reference; positive values index the theme format scheme. */
6697
+ readonly idx: number;
6698
+ /** Theme slot or sRGB color replacing the style list's `phClr`. */
6699
+ readonly color?: Color;
6700
+ /** Ordered DrawingML color transforms (for example PowerPoint's shade). */
6701
+ readonly colorTransforms?: readonly ColorTransform[];
6702
+ }
6703
+ interface ShapeStyleFontReference {
6704
+ readonly idx: 'major' | 'minor' | 'none';
6705
+ readonly color?: Color;
6706
+ readonly colorTransforms?: readonly ColorTransform[];
6707
+ }
6708
+ /** Complete OOXML shape style. Direct text runs and geometry are untouched. */
6709
+ interface ShapeStyleOptions {
6710
+ readonly line: ShapeStyleReference;
6711
+ readonly fill: ShapeStyleReference;
6712
+ readonly effect: ShapeStyleReference;
6713
+ readonly font: ShapeStyleFontReference;
6714
+ }
6715
+ /** Apply a complete native OOXML shape style while preserving geometry/text. */
6716
+ declare const setShapeStyle: (shape: SlideShapeData, options: ShapeStyleOptions) => void;
6717
+ //#endregion
5375
6718
  //#region src/api/fn/shape-grouping.d.ts
5376
6719
  /**
5377
- * Groups two or more top-level shapes into a single `<p:grpSp>`,
6720
+ * Groups two or more sibling shapes into a single `<p:grpSp>`,
5378
6721
  * returning the new group as a `SlideShapeData`. The group's
5379
- * slide-space bounds are the union of its members' bounds; the members
6722
+ * parent-space bounds are the union of its members' bounds; the members
5380
6723
  * keep their own relative position/size (nothing is rescaled). The
5381
6724
  * target slide is taken from the first shape — every shape must belong
5382
6725
  * to the same slide.
5383
6726
  *
5384
6727
  * Every shape must:
5385
6728
  * - belong to the same slide as the others,
5386
- * - be a direct child of the slide's shape tree (not already nested
5387
- * inside another group — ungroup first, then re-group),
6729
+ * - share the same immediate parent (the slide or a group),
5388
6730
  * - have an explicit `<a:xfrm>` (placeholders that inherit position
5389
6731
  * from the layout have none and can't be grouped),
5390
6732
  * - appear at most once in `shapes` (grouping the same shape twice
5391
6733
  * would duplicate its id).
5392
6734
  *
5393
6735
  * The group replaces its members at the position of the earliest one in
5394
- * z-order, so grouping doesn't change how the selection stacks against
5395
- * shapes that weren't part of it.
6736
+ * z-order, preserving member order regardless of selection order. Members
6737
+ * become one contiguous block, which can change interleaving with unselected shapes.
5396
6738
  */
5397
6739
  declare const groupShapes: (shapes: ReadonlyArray<SlideShapeData>, opts?: {
5398
6740
  name?: string;
5399
6741
  }) => SlideShapeData;
5400
6742
  /**
5401
6743
  * Reverses `groupShapes`: removes the `<p:grpSp>` and re-inserts its
5402
- * immediate children as top-level shapes at the group's former position,
6744
+ * immediate children into its parent at the group's former position,
5403
6745
  * rescaling each child's own transform so it keeps its on-slide position
5404
6746
  * and size (matters when the group was moved/resized after creation, so
5405
6747
  * its `off`/`ext` diverged from its `chOff`/`chExt`). Returns the
5406
6748
  * children as fresh `SlideShapeData` handles, in their original order.
6749
+ * Group rotation and flips are composed with each child transform. Exact
6750
+ * preservation of rotated children requires uniform group scaling; anisotropic
6751
+ * scaling can introduce shear, which a child shape transform cannot represent.
5407
6752
  *
5408
6753
  * Throws if `group` isn't a group shape, or its `<p:grpSpPr>` carries no
5409
6754
  * `<a:xfrm>` (malformed — every authored group has one).
@@ -5467,6 +6812,162 @@ declare const addSlideMedia: (slide: SlideData, opts: SlideMediaOptions) => Slid
5467
6812
  declare const getShapeMedia: (shape: SlideShapeData) => ShapeMedia | null;
5468
6813
  /** Every shape on the slide that `getShapeMedia` reports a clip for. */
5469
6814
  declare const findShapesWithMedia: (slide: SlideData) => ReadonlyArray<SlideShapeData>;
6815
+ /** Durations removed from the source clip, in milliseconds. */
6816
+ interface MediaTrim {
6817
+ readonly startMs: number;
6818
+ /** Duration removed from the end of the source clip. */
6819
+ readonly endMs: number;
6820
+ }
6821
+ interface MediaFade {
6822
+ readonly inMs: number;
6823
+ readonly outMs: number;
6824
+ }
6825
+ /** A named position in an embedded media clip, measured from its beginning. */
6826
+ interface MediaBookmark {
6827
+ readonly name: string;
6828
+ readonly timeMs: number;
6829
+ }
6830
+ /**
6831
+ * How a clip plays in the slide show — the attributes of its
6832
+ * `<p:cMediaNode>` and the start condition of its time node.
6833
+ *
6834
+ * Trimming and fades are stored in the PowerPoint 2010 `p14:media` extension.
6835
+ * `trim.endMs` is the duration removed from the end of the clip, matching the
6836
+ * OOXML `p14:trim@end` meaning (it is not the playback end position).
6837
+ */
6838
+ interface MediaPlayback {
6839
+ /** Starts with the slide instead of waiting for a click. */
6840
+ readonly autoplay: boolean;
6841
+ /** Milliseconds to wait after the slide starts before automatic playback. */
6842
+ readonly delayMs?: number;
6843
+ /** Plays again from the beginning until the slide moves on. */
6844
+ readonly loop: boolean;
6845
+ /** Playback volume, 0–1. PowerPoint's own default is 0.8. */
6846
+ readonly volume: number;
6847
+ readonly muted: boolean;
6848
+ /** Video only: plays filling the screen. */
6849
+ readonly fullScreen: boolean;
6850
+ /** Hides the clip once it has played (`showWhenStopped="0"`). */
6851
+ readonly hideWhenStopped: boolean;
6852
+ /** Number of slides across which the clip should keep playing (`numSld`).
6853
+ * When absent, OOXML defaults to one slide. */
6854
+ readonly slideCount?: number;
6855
+ /** Returns playback to the beginning after natural completion (`fill="remove"`). */
6856
+ readonly rewindAfterPlaying?: boolean;
6857
+ readonly trim?: MediaTrim;
6858
+ readonly fade?: MediaFade;
6859
+ /** Named positions in the clip, in the order stored in the media extension. */
6860
+ readonly bookmarks?: readonly MediaBookmark[];
6861
+ }
6862
+ /**
6863
+ * Reads how the shape's clip plays, or `null` when the shape carries no media
6864
+ * time node — which is what a picture that is not a clip looks like, and also
6865
+ * what a clip pasted in without its node looks like (it shows no controls).
6866
+ */
6867
+ declare const getShapeMediaPlayback: (shape: SlideShapeData) => MediaPlayback | null;
6868
+ /**
6869
+ * Updates how the shape's clip plays. Omitted properties keep their current
6870
+ * value. Throws when the shape has no media time node — `addSlideMedia` writes
6871
+ * one, and a picture that is not a clip never plays.
6872
+ *
6873
+ * `delayMs` is a nonnegative safe integer and requires automatic playback.
6874
+ * Setting `autoplay: true` alone preserves an existing automatic delay;
6875
+ * switching from event playback starts immediately unless `delayMs` is supplied.
6876
+ *
6877
+ * `fullScreen` is a video attribute (`CT_TLMediaNodeVideo`); asking for it on
6878
+ * an audio clip throws rather than writing an attribute the schema rejects.
6879
+ */
6880
+ declare const setShapeMediaPlayback: (shape: SlideShapeData, options: Partial<MediaPlayback>) => void;
6881
+ //#endregion
6882
+ //#region src/api/fn/shape-video.d.ts
6883
+ /**
6884
+ * Restores a video to PowerPoint's default shape formatting.
6885
+ *
6886
+ * This is deliberately restricted to video media pictures. It clears the
6887
+ * image recolor/correction elements and the shape-level fill, line, effects,
6888
+ * and 3-D style children, while preserving the poster/media relationship,
6889
+ * crop, transform, and unknown extension XML.
6890
+ */
6891
+ declare const resetShapeVideoFormatting: (shape: SlideShapeData) => void;
6892
+ //#endregion
6893
+ //#region src/api/fn/slide-animation-edit.d.ts
6894
+ /**
6895
+ * What to change about an effect. Every field is optional; the ones left out
6896
+ * keep what the slide already says.
6897
+ *
6898
+ * `byParagraph` is not an attribute flip: turning it on replaces the effect
6899
+ * with one per paragraph of the shape's text, and turning it off replaces the
6900
+ * whole build with a single effect on the shape. In both directions the id you
6901
+ * passed stays on the effect that takes the original's place in the click
6902
+ * order, and the other effects of a build are new — so a caller holding several
6903
+ * handles into one build keeps only the one it addressed.
6904
+ */
6905
+ interface AnimationPatch {
6906
+ readonly effect?: AnimationEffect;
6907
+ /**
6908
+ * Which edge a fly comes from or leaves by. Changing it rewrites the effect
6909
+ * the same way changing the preset does, because the direction is part of
6910
+ * what the preset says. Passing it for an effect that does not fly is an
6911
+ * error — including one this patch is turning into such an effect.
6912
+ */
6913
+ readonly direction?: AnimationDirection;
6914
+ readonly durationMs?: number;
6915
+ readonly start?: AnimationStartCondition;
6916
+ readonly delayMs?: number;
6917
+ readonly byParagraph?: boolean;
6918
+ }
6919
+ /**
6920
+ * Changes one effect: its preset, how long it runs, when it starts, and whether
6921
+ * the shape's text is revealed a paragraph at a time.
6922
+ *
6923
+ * The effect keeps the id it was addressed by. Everything after it in the click
6924
+ * order is laid out again, because a longer effect moves what follows it and a
6925
+ * new start condition moves the effect itself between click stops.
6926
+ *
6927
+ * An effect whose duration the slide never stated gets this library's default
6928
+ * when it is rewritten; pass `durationMs` to say what it should be.
6929
+ */
6930
+ declare const updateSlideAnimation: (slide: SlideData, id: number, patch: AnimationPatch) => void;
6931
+ /**
6932
+ * Removes one effect. The effects after it move one place earlier in the click
6933
+ * order and are retimed to match.
6934
+ *
6935
+ * A paragraph of a build is removed on its own: the build entry the rest of the
6936
+ * paragraphs share stays, and goes only once the last of them is gone.
6937
+ */
6938
+ declare const removeSlideAnimation: (slide: SlideData, id: number) => void;
6939
+ /**
6940
+ * Moves one effect to `index` in the click order, counting only the slide's
6941
+ * main sequence — the order `getSlideAnimations` reports for steps whose
6942
+ * `sequence` is `'mainSeq'`.
6943
+ *
6944
+ * Each effect keeps the start condition it had, so moving a `'withPrevious'`
6945
+ * effect to the front does not turn it into a click: it becomes the first thing
6946
+ * that runs as the slide appears, which is what it already meant.
6947
+ */
6948
+ declare const moveSlideAnimation: (slide: SlideData, id: number, index: number) => void;
6949
+ //#endregion
6950
+ //#region src/api/fn/_image-fill-layout.d.ts
6951
+ type ImageTileAlignment = 'tl' | 't' | 'tr' | 'l' | 'ctr' | 'r' | 'bl' | 'b' | 'br';
6952
+ type ImageTileFlip = 'none' | 'x' | 'y' | 'xy';
6953
+ /** Image placement inside its fill area; percentages use fractions (0.25 = 25%). */
6954
+ type ImageFillLayout = {
6955
+ /** Omitted on write preserves the existing rotation setting. */rotateWithShape?: boolean;
6956
+ } & ({
6957
+ mode: 'stretch';
6958
+ left?: number;
6959
+ top?: number;
6960
+ right?: number;
6961
+ bottom?: number;
6962
+ } | {
6963
+ mode: 'tile';
6964
+ offsetX?: Emu;
6965
+ offsetY?: Emu;
6966
+ scaleX?: number;
6967
+ scaleY?: number;
6968
+ alignment?: ImageTileAlignment;
6969
+ flip?: ImageTileFlip;
6970
+ });
5470
6971
  //#endregion
5471
6972
  //#region src/api/fn/slide-background.d.ts
5472
6973
  /**
@@ -5478,6 +6979,7 @@ declare const findShapesWithMedia: (slide: SlideData) => ReadonlyArray<SlideShap
5478
6979
  type SlideBackground = {
5479
6980
  readonly kind: 'solid';
5480
6981
  readonly color: string;
6982
+ readonly opacity?: number;
5481
6983
  } | {
5482
6984
  readonly kind: 'gradient';
5483
6985
  } | {
@@ -5564,7 +7066,9 @@ declare const getSlideMasterShapes: (pres: PresentationData, layout: SlideLayout
5564
7066
  * `<p:bgPr><a:pattFill>`. Same shape as `getSlideBackgroundPatternFill`
5565
7067
  * for slides.
5566
7068
  */
5567
- declare const getSlideLayoutBackgroundPatternFill: (pres: PresentationData, layout: SlideLayoutData) => {
7069
+ declare const getSlideLayoutBackgroundPatternFill: (pres: PresentationData, layout: SlideLayoutData, options?: {
7070
+ readonly preserveTheme?: boolean;
7071
+ }) => {
5568
7072
  preset: string;
5569
7073
  foreground: string;
5570
7074
  background: string;
@@ -5573,15 +7077,18 @@ declare const getSlideLayoutBackgroundPatternFill: (pres: PresentationData, layo
5573
7077
  * Reads the slide master's pattern background. Companion to
5574
7078
  * `getSlideLayoutBackgroundPatternFill`.
5575
7079
  */
5576
- declare const getSlideMasterBackgroundPatternFill: (pres: PresentationData, layout: SlideLayoutData) => {
7080
+ declare const getSlideMasterBackgroundPatternFill: (pres: PresentationData, layout: SlideLayoutData, options?: {
7081
+ readonly preserveTheme?: boolean;
7082
+ }) => {
5577
7083
  preset: string;
5578
7084
  foreground: string;
5579
7085
  background: string;
5580
7086
  } | null;
5581
7087
  /**
5582
- * Reads the slide layout's gradient background when its `<p:bg>` is a
5583
- * `<p:bgPr><a:gradFill>`. Same shape as `getSlideBackgroundGradientFill`
5584
- * for slides.
7088
+ * Reads the slide layout's gradient background from either `<p:bgPr><a:gradFill>`
7089
+ * or a theme style referenced by `<p:bgRef>`. Same shape as `getSlideBackgroundGradientFill`
7090
+ * for slides. Stop `resolvedColor` values include the presentation theme
7091
+ * and DrawingML color transforms.
5585
7092
  */
5586
7093
  declare const getSlideLayoutBackgroundGradientFill: (layout: SlideLayoutData) => ReadGradientFill | null;
5587
7094
  /**
@@ -5590,6 +7097,7 @@ declare const getSlideLayoutBackgroundGradientFill: (layout: SlideLayoutData) =>
5590
7097
  * background kind. Useful for closing the bg cascade — slides that
5591
7098
  * report `'gradient'` inherit can now get the master's gradient
5592
7099
  * projected via `gradientDef`.
7100
+ * Stop `resolvedColor` values include the presentation theme and color transforms.
5593
7101
  */
5594
7102
  declare const getSlideMasterBackgroundGradientFill: (pres: PresentationData, layout: SlideLayoutData) => ReadGradientFill | null;
5595
7103
  /**
@@ -5606,9 +7114,12 @@ declare const getSlideMasterBackground: (pres: PresentationData, layout: SlideLa
5606
7114
  declare const getSlideLayoutBackground: (layout: SlideLayoutData) => SlideBackground;
5607
7115
  /**
5608
7116
  * Returns the gradient stops + path when the slide carries a
5609
- * `<p:bgPr><a:gradFill>` background. Returns `null` for any other
7117
+ * literal `<p:bgPr><a:gradFill>` or theme-referenced `<p:bgRef>` gradient.
7118
+ * Returns `null` for any other
5610
7119
  * background kind. Shape identical to `getShapeGradientFill` so renderers
5611
7120
  * can use the same projection logic for slide backgrounds.
7121
+ * Stop `resolvedColor` values include the presentation theme, slide color map
7122
+ * and DrawingML color transforms; `color` retains the authored token.
5612
7123
  */
5613
7124
  declare const getSlideBackgroundGradientFill: (slide: SlideData) => ReadGradientFill | null;
5614
7125
  /**
@@ -5616,7 +7127,9 @@ declare const getSlideBackgroundGradientFill: (slide: SlideData) => ReadGradient
5616
7127
  * carries a `<p:bgPr><a:pattFill>` background. Returns `null` for any
5617
7128
  * other background kind. Shape mirrors `getShapePatternFill`.
5618
7129
  */
5619
- declare const getSlideBackgroundPatternFill: (pres: PresentationData, slide: SlideData) => {
7130
+ declare const getSlideBackgroundPatternFill: (pres: PresentationData, slide: SlideData, options?: {
7131
+ readonly preserveTheme?: boolean;
7132
+ }) => {
5620
7133
  preset: string;
5621
7134
  foreground: string;
5622
7135
  background: string;
@@ -5643,8 +7156,58 @@ declare const getSlideLayoutBackgroundImageBytes: (pres: PresentationData, layou
5643
7156
  * master rel). Companion to `getSlideLayoutBackgroundImageBytes`.
5644
7157
  */
5645
7158
  declare const getSlideMasterBackgroundImageBytes: (pres: PresentationData, layout: SlideLayoutData) => Uint8Array | null;
5646
- /** Sets a solid fill on the slide's background. */
5647
- declare const setSlideBackground: (slide: SlideData, color: Color) => void;
7159
+ /** Sets a solid background; optional opacity is 0 (transparent) to 1 (opaque). */
7160
+ declare const setSlideBackground: (slide: SlideData, color: Color, opacity?: number) => void;
7161
+ /**
7162
+ * Replaces the slide background with a gradient. Uses the same stop and direction
7163
+ * settings as `setShapeGradientFill`; offsets and opacity range from 0 to 1.
7164
+ * Invalid settings leave the previous background unchanged.
7165
+ */
7166
+ declare const setSlideBackgroundGradientFill: (slide: SlideData, options: GradientFillOptions) => void;
7167
+ /** Natural background image size in EMUs, using fill DPI and embedded PNG/JPEG resolution.
7168
+ * Reads inherited backgrounds. Returns null for missing or unsupported image bytes.
7169
+ */
7170
+ declare const getSlideBackgroundImageIntrinsicSize: (slide: SlideData) => {
7171
+ width: Emu;
7172
+ height: Emu;
7173
+ } | null;
7174
+ /** Reads direct or inherited background image crop fractions, including negative outsets.
7175
+ * Returns null when no source rectangle is specified or the background is not an image.
7176
+ */
7177
+ declare const getSlideBackgroundImageCrop: (slide: SlideData) => ImageCrop | null;
7178
+ /** Reads direct or inherited image background placement; returns null for other fills. */
7179
+ declare const getSlideBackgroundImageFillLayout: (slide: SlideData) => ImageFillLayout | null;
7180
+ /**
7181
+ * Changes background image placement while preserving media, crop and effects.
7182
+ * An inherited image becomes a slide override, leaving its layout/master unchanged.
7183
+ * Invalid settings or missing relationships leave the presentation unchanged.
7184
+ */
7185
+ declare const setSlideBackgroundImageFillLayout: (slide: SlideData, layout: ImageFillLayout) => void;
7186
+ /** Reads direct or inherited background picture opacity; null means no explicit opacity. */
7187
+ declare const getSlideBackgroundImageOpacity: (slide: SlideData) => number | null;
7188
+ /** Sets background image opacity (0–1), preserving media and placement. Null restores the default.
7189
+ * Inherited images become slide overrides. Invalid values leave the deck unchanged.
7190
+ */
7191
+ declare const setSlideBackgroundImageOpacity: (slide: SlideData, opacity: number | null) => void;
7192
+ /**
7193
+ * Updates a slide pattern background, preserving unspecified colors and transforms.
7194
+ * Inherited patterns become a slide override; the layout and master stay unchanged.
7195
+ * A new pattern uses Mac PowerPoint's defaults: pct5, accent1 foreground, bg1 background.
7196
+ */
7197
+ declare const setSlideBackgroundPatternFill: (slide: SlideData, options: Partial<PatternFillOptions>) => void;
7198
+ /**
7199
+ * Copies the source's effective background into a target slide, retaining its XML
7200
+ * and referenced parts. Inherited fills become explicit on the target. Theme
7201
+ * references use the target's theme; background graphics visibility is unchanged.
7202
+ * Across presentations, dependencies are copied with collision-free names.
7203
+ */
7204
+ declare const copySlideBackground: (targetSlide: SlideData, sourceSlide: SlideData) => void;
7205
+ /**
7206
+ * Applies the source slide's effective background throughout its presentation.
7207
+ * Like Mac PowerPoint, stores the fill on masters and clears slide/layout overrides.
7208
+ * Theme colors and image relationships are preserved without flattening the fill.
7209
+ */
7210
+ declare const applySlideBackgroundToAll: (pres: PresentationData, slide: SlideData) => void;
5648
7211
  /**
5649
7212
  * Sets a picture as the slide's background. Embeds `bytes` as a new
5650
7213
  * media part, wires a slide → image rel, and replaces any prior
@@ -5660,10 +7223,34 @@ declare const setSlideBackgroundImage: (slide: SlideData, bytes: Uint8Array, opt
5660
7223
  /** Clears any explicit slide background, restoring layout inheritance. */
5661
7224
  declare const clearSlideBackground: (slide: SlideData) => void;
5662
7225
  //#endregion
7226
+ //#region src/api/fn/master-background-style.d.ts
7227
+ /**
7228
+ * Choose one of PowerPoint's twelve Background Styles (numbered row by row).
7229
+ * Changes the owning master, so every slide using that master inherits the
7230
+ * style. Existing slide and layout background overrides remain in place.
7231
+ * The theme must provide the referenced background fill style.
7232
+ */
7233
+ declare const setSlideMasterBackgroundStyle: (slide: SlideData, style: number) => void;
7234
+ /** A theme background preset; complex fill kinds without a gradient retain their kind. */
7235
+ interface SlideMasterBackgroundStyle {
7236
+ readonly style: number;
7237
+ readonly selected: boolean;
7238
+ readonly fill: SlideBackground;
7239
+ readonly gradient: ReadGradientFill | null;
7240
+ }
7241
+ /**
7242
+ * Read the owning master's available Background Styles without changing the
7243
+ * presentation. Solid colors and gradient stop resolvedColor values include
7244
+ * the preset's color mapping and theme transforms. Missing theme rows are omitted.
7245
+ * Selection describes the master, independently of slide/layout overrides.
7246
+ */
7247
+ declare const getSlideMasterBackgroundStyles: (slide: SlideData) => SlideMasterBackgroundStyle[];
7248
+ //#endregion
5663
7249
  //#region src/api/fn/color-map.d.ts
5664
7250
  /**
5665
7251
  * The slide's effective color map: the master's `<p:clrMap>`, overlaid by a
5666
- * per-slide `<p:clrMapOvr><a:overrideClrMapping>` when present. Falls back to
7252
+ * layout or slide `<p:clrMapOvr><a:overrideClrMapping>` when present. An explicit
7253
+ * slide `masterClrMapping` bypasses the layout override. Falls back to
5667
7254
  * the standard map for decks that omit it.
5668
7255
  *
5669
7256
  * Pass the result to color resolution / renderers so `schemeClr` tokens map to
@@ -5691,17 +7278,84 @@ declare const resolveDeckBodyTextColor: (slide: SlideData) => string | null;
5691
7278
  * `setSlideTransition` accepts.
5692
7279
  */
5693
7280
  declare const getSlideTransition: (slide: SlideData) => SlideTransition | null;
5694
- /** Sets the slide's transition effect. */
7281
+ /**
7282
+ * Sets the slide's transition effect. A sound set with
7283
+ * `setSlideTransitionSound` is kept, as PowerPoint keeps it when the effect
7284
+ * changes.
7285
+ */
5695
7286
  declare const setSlideTransition: (slide: SlideData, options: TransitionOptions) => void;
5696
- /** Removes any existing transition on the slide. */
7287
+ /** Removes any existing transition on the slide, including its sound. */
5697
7288
  declare const clearSlideTransition: (slide: SlideData) => void;
7289
+ /** What plays when the slide's transition starts. */
7290
+ type TransitionSound = {
7291
+ readonly kind: 'stop';
7292
+ } | {
7293
+ readonly kind: 'play';
7294
+ readonly name: string;
7295
+ readonly loop: boolean;
7296
+ };
7297
+ /**
7298
+ * `stop` ends any sound still playing from an earlier slide ("Stop Previous
7299
+ * Sound"); `play` embeds a WAV file, the only format `p:snd` allows
7300
+ * (ECMA-376 §19.5.66, CT_EmbeddedWAVAudioFile).
7301
+ */
7302
+ type TransitionSoundInput = {
7303
+ readonly kind: 'stop';
7304
+ } | {
7305
+ readonly kind: 'play';
7306
+ readonly data: Uint8Array;
7307
+ readonly name: string;
7308
+ readonly loop?: boolean;
7309
+ };
7310
+ /** Reads the transition's sound, or `null` when it has none. */
7311
+ declare const getSlideTransitionSound: (slide: SlideData) => TransitionSound | null;
7312
+ /**
7313
+ * Sets (or with `null` removes) the sound played when the slide's transition
7314
+ * starts. A slide without a transition gets one with no effect, which is how
7315
+ * PowerPoint stores a sound on a "None" transition.
7316
+ */
7317
+ declare const setSlideTransitionSound: (slide: SlideData, sound: TransitionSoundInput | null) => void;
5698
7318
  //#endregion
5699
7319
  //#region src/api/fn/slide-notes.d.ts
7320
+ interface SlideNotesTextFormatOptions {
7321
+ /** Resolve scheme colors through the notes master theme and color map. */
7322
+ readonly resolveColors?: boolean;
7323
+ }
7324
+ /** Resolve a notes text color token through the notes master theme and map.
7325
+ * Literal tokens remain unchanged in the notes format readers; this helper is
7326
+ * for transient editor display state (such as a pending typing format).
7327
+ */
7328
+ declare const resolveSlideNotesTextColor: (slide: SlideData, color: string) => string | null;
5700
7329
  /**
5701
7330
  * Returns the slide's speaker notes (`null` if none). Pulls plain text
5702
7331
  * from the `body` placeholder; multi-line notes use `\n`.
5703
7332
  */
5704
7333
  declare const getSlideNotes: (slide: SlideData) => string | null;
7334
+ /** Returns the kind and UTF-16 position of each visible notes line separator. */
7335
+ declare const getSlideNotesLineBreaks: (slide: SlideData) => ReadonlyArray<{
7336
+ readonly position: number;
7337
+ readonly kind: "paragraph" | "break";
7338
+ }>;
7339
+ /** A direct character-format range in a slide's speaker notes. */
7340
+ interface SlideNotesTextFormatRange {
7341
+ readonly start: number;
7342
+ readonly end: number;
7343
+ readonly format: ReadTextFormat;
7344
+ }
7345
+ /**
7346
+ * Reads run formatting from the notes body using the same UTF-16 offsets as
7347
+ * `setSlideNotesFormat`. By default scheme colors remain literal references;
7348
+ * pass `resolveColors` to resolve them through the notes master theme and
7349
+ * color map. Paragraph and line-break separators are included in the offsets
7350
+ * but are not returned as formatted ranges.
7351
+ */
7352
+ declare const getSlideNotesTextFormats: (slide: SlideData, options?: SlideNotesTextFormatOptions) => ReadonlyArray<SlideNotesTextFormatRange>;
7353
+ /**
7354
+ * Reads the paragraph-end character format used for typing at a notes caret.
7355
+ * By default scheme colors remain literal references; pass `resolveColors` to
7356
+ * resolve them through the notes master theme and color map.
7357
+ */
7358
+ declare const getSlideNotesParagraphEndFormat: (slide: SlideData, paragraphIndex: number, options?: SlideNotesTextFormatOptions) => ReadTextFormat;
5705
7359
  /**
5706
7360
  * Sets the slide's speaker notes. Creates the `notesSlide` part and
5707
7361
  * wires up the rels (slide ↔ notesSlide ↔ notesMaster) on first call;
@@ -5963,7 +7617,50 @@ declare const getEmptySlides: (pres: PresentationData) => ReadonlyArray<SlideDat
5963
7617
  * minus the leading newline when there were no notes yet.
5964
7618
  */
5965
7619
  declare const appendSlideNotes: (slide: SlideData, text: string) => void;
5966
- declare const setSlideNotes: (slide: SlideData, value: string) => void;
7620
+ /**
7621
+ * Replaces speaker notes. With `range`, replaces that UTF-16 selection while
7622
+ * retaining untouched run/paragraph XML and inheriting the insertion format.
7623
+ * When inserting line-feed characters through a ranged edit, `newlines`
7624
+ * selects whether those inserted separators become paragraph breaks
7625
+ * (`'paragraph'`, the default) or paragraph-internal soft breaks (`'break'`).
7626
+ * Existing separators outside the edited range keep their original OOXML
7627
+ * kind; the option does not normalize the rest of the notes.
7628
+ * `preserveFormatting` infers one changed range from the common prefix/suffix;
7629
+ * apply disjoint edits separately to retain the formatting between them.
7630
+ */
7631
+ declare const setSlideNotes: (slide: SlideData, value: string, options?: {
7632
+ preserveFormatting?: boolean;
7633
+ range?: {
7634
+ start: number;
7635
+ end: number;
7636
+ };
7637
+ newlines?: "paragraph" | "break";
7638
+ }) => void;
7639
+ /** Applies PowerPoint-style Change Case to a speaker-notes range. */
7640
+ declare const transformSlideNotesCase: (slide: SlideData, value: TextCase, options?: {
7641
+ range?: {
7642
+ start: number;
7643
+ end: number;
7644
+ };
7645
+ }) => void;
7646
+ /**
7647
+ * Applies direct run formatting to a UTF-16 range in the slide's speaker notes.
7648
+ * Unselected runs and paragraph XML are preserved. An empty range is a no-op.
7649
+ * Use `paragraphEnd` instead of `range` to update the paragraph-end character
7650
+ * formatting for subsequent typing, including in an empty notes body.
7651
+ */
7652
+ declare const setSlideNotesFormat: (slide: SlideData, format: TextFormat, options: {
7653
+ range: {
7654
+ start: number;
7655
+ end: number;
7656
+ };
7657
+ reset?: boolean;
7658
+ paragraphEnd?: never;
7659
+ } | {
7660
+ paragraphEnd: number;
7661
+ reset?: boolean;
7662
+ range?: never;
7663
+ }) => void;
5967
7664
  /**
5968
7665
  * Removes the slide's speaker-notes part entirely. Drops the
5969
7666
  * `notesSlide` part + its `.rels`, and unwires the slide → notesSlide
@@ -5994,14 +7691,27 @@ interface SlideSize {
5994
7691
  }
5995
7692
  /** Returns the slide canvas size, or `null` if `presentation.xml` omits it. */
5996
7693
  declare const getSlideSize: (pres: PresentationData) => SlideSize | null;
7694
+ /**
7695
+ * The number PowerPoint prints on the first slide — `<p:presentation
7696
+ * firstSlideNum="N"/>`, or `1` when the deck does not say. A `slidenum` field
7697
+ * on the n-th slide shows this plus n − 1, so a renderer that substitutes live
7698
+ * field values has to start counting here rather than at one.
7699
+ */
7700
+ declare const getPresentationFirstSlideNumber: (pres: PresentationData) => number;
5997
7701
  /**
5998
7702
  * Sets the slide canvas size. Creates `<p:sldSz>` when absent, replaces
5999
- * its attributes when present. The `type` hint is preserved as given.
7703
+ * its attributes when present. Dimensions must be 1–56 inches in EMU;
7704
+ * invalid dimensions throw before changing the presentation.
7705
+ * The `type` hint is preserved as given. `content: 'fit'` uniformly scales
7706
+ * content to fit the new page and centers it, including layout/master artwork
7707
+ * and physical text formatting. The default keeps existing content unchanged.
6000
7708
  *
6001
7709
  * Schema ordering: `<p:sldSz>` follows `<p:sldIdLst>` per ECMA-376
6002
7710
  * §19.2.1.26; we insert at the correct position when bootstrapping.
6003
7711
  */
6004
- declare const setSlideSize: (pres: PresentationData, opts: SlideSize) => void;
7712
+ declare const setSlideSize: (pres: PresentationData, opts: SlideSize, options?: {
7713
+ content?: "keep" | "fit";
7714
+ }) => void;
6005
7715
  /** 10in × 7.5in (`screen4x3`). */
6006
7716
  declare const SLIDE_SIZE_4_3: SlideSize;
6007
7717
  /** 13.333in × 7.5in (`screen16x9`) — Office 2013+ default. */
@@ -6009,8 +7719,93 @@ declare const SLIDE_SIZE_16_9: SlideSize;
6009
7719
  /** 13.333in × 8.33in (`screen16x10`). */
6010
7720
  declare const SLIDE_SIZE_16_10: SlideSize;
6011
7721
  //#endregion
7722
+ //#region src/api/fn/guides.d.ts
7723
+ /** A presentation-level drawing guide. Position is in EMU from the left/top edge. */
7724
+ interface DrawingGuide {
7725
+ id: number;
7726
+ axis: 'x' | 'y';
7727
+ position: number;
7728
+ color: string;
7729
+ }
7730
+ /** Returns null when the presentation has no explicit guide list; [] means cleared. */
7731
+ declare function getDrawingGuides(presentation: PresentationData): DrawingGuide[] | null;
7732
+ /** Replaces presentation guides, retaining metadata/extensions on surviving guide IDs. */
7733
+ declare const setDrawingGuides: (presentation: PresentationData, guides: readonly DrawingGuide[]) => void;
7734
+ /** Whether drawing guides are visible in the presentation's slide editing view. */
7735
+ declare function getDrawingGuidesVisible(presentation: PresentationData): boolean;
7736
+ /** Persists slide-view guide visibility without changing other view preferences. */
7737
+ declare const setDrawingGuidesVisible: (presentation: PresentationData, visible: boolean) => void;
7738
+ /** Document grid snapping; null means no slide-view preferences are stored. */
7739
+ declare function getSnapToGrid(presentation: PresentationData): boolean | null;
7740
+ declare const setSnapToGrid: (presentation: PresentationData, enabled: boolean) => void;
7741
+ /** Grid spacing in EMU, or null when no document spacing is specified. */
7742
+ declare function getGridSpacing(presentation: PresentationData): {
7743
+ x: number;
7744
+ y: number;
7745
+ } | null;
7746
+ declare const setGridSpacing: (presentation: PresentationData, spacing: {
7747
+ x: number;
7748
+ y: number;
7749
+ }) => void;
7750
+ /** Slides whose bodies are collapsed in PowerPoint's outline view, in deck order. */
7751
+ declare function getCollapsedOutlineSlides(presentation: PresentationData): readonly SlideData[];
7752
+ /** Persists outline collapse and retains other view settings. */
7753
+ declare const setSlideOutlineCollapsed: (slide: SlideData | readonly SlideData[], collapsed: boolean) => void;
7754
+ //#endregion
7755
+ //#region src/api/fn/shape-image-fill-layout.d.ts
7756
+ /** Reads direct picture/image-fill placement; returns null when there is no image fill. */
7757
+ declare const getShapeImageFillLayout: (shape: SlideShapeData) => ImageFillLayout | null;
7758
+ /** Changes placement without replacing media, crop, or effects. Invalid inputs leave the shape unchanged. */
7759
+ declare const setShapeImageFillLayout: (shape: SlideShapeData, layout: ImageFillLayout) => void;
7760
+ /**
7761
+ * Natural image-fill size before tile scaling, in EMUs. Reads PNG/JPEG dimensions,
7762
+ * the fill's DPI override, and PNG pHYs/JPEG JFIF resolution. Missing resolution
7763
+ * uses 96 DPI. Returns null for unavailable bytes or unsupported image headers.
7764
+ */
7765
+ declare const getShapeImageIntrinsicSize: (shape: SlideShapeData) => {
7766
+ width: Emu;
7767
+ height: Emu;
7768
+ } | null;
7769
+ //#endregion
7770
+ //#region src/api/fn/show-properties.d.ts
7771
+ interface SlideShowProperties {
7772
+ mode: {
7773
+ kind: 'present';
7774
+ } | {
7775
+ kind: 'browse';
7776
+ showScrollbar: boolean;
7777
+ } | {
7778
+ kind: 'kiosk';
7779
+ restart: number;
7780
+ };
7781
+ slides: {
7782
+ kind: 'all';
7783
+ } | {
7784
+ kind: 'range';
7785
+ start: number;
7786
+ end: number;
7787
+ } | {
7788
+ kind: 'customShow';
7789
+ id: number;
7790
+ };
7791
+ loop: boolean;
7792
+ showNarration: boolean;
7793
+ showAnimation: boolean;
7794
+ useTimings: boolean;
7795
+ /**
7796
+ * Show Media Controls: whether hovering a video or audio clip in the show
7797
+ * reveals its play bar. PowerPoint 2010 stores it as `p14:showMediaCtrls`
7798
+ * in the show properties' extension list; omit it to leave the file as is.
7799
+ */
7800
+ showMediaControls?: boolean;
7801
+ }
7802
+ /** Reads presentation-wide slideshow settings using the OOXML defaults. */
7803
+ declare function getSlideShowProperties(pres: PresentationData): SlideShowProperties;
7804
+ /** Replaces slideshow settings while preserving print/web options, pen color, and extensions. */
7805
+ declare function setSlideShowProperties(pres: PresentationData, settings: SlideShowProperties): void;
7806
+ //#endregion
6012
7807
  //#region src/api/index.d.ts
6013
7808
  declare const VERSION: string;
6014
7809
  //#endregion
6015
- export { SlideBackground as $, getShapeChartSeriesValues as $a, getShapeCustomGeometry as $c, TableCellBorders as $i, PathFillMode as $l, addSlideLine as $n, appendShapeText as $o, setShapeRunText as $r, getShapeGradientFillEffective as $s, getPresentationShapeCountsBySlide as $t, getPresentationHyperlinkCountsBySlide as A, setTableCellAnchor as Aa, getShapeIndex as Ac, isShapeImageGrayscale as Ai, PresentationInput as Al, ExtendedProperties as An, clearSlideComments as Ao, getParagraphBullet as Ar, clearShapeFill as As, addSectionHeaderSlide as At, emu as Au, getSlidesWithNotes as B, setTableStyleFlags as Ba, ShapeBounds as Bc, getMediaParts as Bi, TableCellData as Bl, findLayoutsWithPlaceholderType as Bn, getCommentPosition as Bo, getShapeParagraphElements as Br, setShapeNoFill as Bs, reverseSlides as Bt, getAllHyperlinks as C, insertTableRow as Ca, findShapesByName as Cc, getShapeImageFillBytes as Ci, setShapeBounds as Cl, setSlideHidden as Cn, ShapeClickAction as Co, PresentationTheme as Cr, clearShapeEffects as Cs, addSlideMedia as Ct, PresetShape as Cu, getDistinctHyperlinkUrls as D, removeTableColumn as Da, findSlidePlaceholder as Dc, getShapeImagePartName as Di, SlideSection as Dl, removeThumbnail as Dn, setShapeImage as Do, setPresentationTheme as Dr, getShapeEffectsEffective as Ds, ungroupShapes as Dt, ImageFormat as Du, getAllTables as E, mergeTableCells as Ea, findShapesWithHyperlinks as Ec, getShapeImageOpacity as Ei, shapesOverlap as El, getThumbnail as En, ImageFit as Eo, setPresentationFonts as Er, getShapeEffects as Es, groupShapes as Et, VideoFormat as Eu, getSlideNotesLength as F, setTableCellText as Fa, getSlideShapes as Fc, MediaPart as Fi, PresentationData as Fl, incrementRevision as Fn, findCommentsByText as Fo, getParagraphLevel as Fr, setShapeAdjustValues as Fs, duplicateSlideAt as Ft, removeSlideNotes as G, findChartsBySeriesName as Ga, getGroupTransform as Gc, listPackageParts as Gi, AnimationOptions as Gl, getSlideLayoutPartName as Gn, getPresentationCommentCountsBySlide as Go, getShapeRunText as Gr, setShapeSize as Gs, SlideOutlineEntry as Gt, getSlidesWithTables as H, SlideChartData as Ha, findShapesAtPoint as Hc, getPackageSize as Hi, CommentPosition as Hl, findSlideLayoutByPartName as Hn, getCommentText as Ho, getShapeRunCount as Hr, setShapePatternFill as Hs, swapSlides as Ht, getSlidesWithCharts as I, setTableCellTextDirection as Ia, getSlidesWithEmptyPlaceholders as Ic, PackagePartInfo as Ii, SlideCommentData as Il, setCoreProperties as In, findSlidesWithCommentsByAuthor as Io, getParagraphLineSpacing as Ir, setShapeFill as Is, importSlide as It, clearSlideTransition as J, getPresentationChartCountsBySlide as Ja, getShapeAdjustValues as Jc, slidesUsingMediaPart as Ji, TransitionOptions as Jl, getSlideLayoutUsageCounts as Jn, getSlideComments as Jo, setParagraphBullet as Jr, setShapeStrokeCap as Js, findSlideByTitle as Jt, replaceHyperlink as K, findChartsWithDataLabels as Ka, getMaxShapeId as Kc, readPackagePart as Ki, SlideTransition as Kl, getSlideLayoutPlaceholders as Kn, getPresentationCommenters as Ko, isParagraphBulletPicture as Kr, setShapeStroke as Ks, findSlideByPartName as Kt, getSlidesWithComments as L, setTableCellTextFormat as La, replaceTokensInSlide as Lc, PresentationSummary as Li, SlideData as Ll, setExtendedProperties as Ln, getCommentAuthor as Lo, getParagraphSpacing as Lr, setShapeFlip as Ls, mergePresentations as Lt, getPresentationNotesLengthsBySlide as M, setTableCellFill as Ma, getShapeXmlString as Mc, setShapeImageContrast as Mi, createPresentation as Ml, getExtendedProperties as Mn, findCommentsAfter as Mo, getParagraphBulletStyle as Mr, getShapePatternFill as Ms, addSlideAt as Mt, mm as Mu, getPresentationNotesText as N, setTableCellMargins as Na, getShapesBounds as Nc, setShapeImageCrop as Ni, loadPresentation as Nl, getPresentationCreated as Nn, findCommentsBefore as No, getParagraphEndFormat as Nr, getShapeStrokeArrow as Ns, addTitleSlide as Nt, pt as Nu, getEmptySlides as O, removeTableRow as Oa, findSlidePlaceholderByIdx as Oc, hasShapeImage as Oi, getSlideSections as Ol, setThumbnail as On, addSlideComment as Oo, ShapeParagraphElement as Or, setShapeGlow as Os, addBlankSlide as Ot, Emu as Ou, getSlideNotes as P, setTableCellParagraphs as Pa, getSlideLayout as Pc, setShapeImageOpacity as Pi, savePresentation as Pl, getPresentationModified as Pn, findCommentsByAuthor as Po, getParagraphIndent as Pr, getShapeStrokeDash as Ps, duplicateSlide as Pt, resolveDeckBodyTextColor as Q, getShapeChartSeriesNames as Qa, getShapeCenter as Qc, TableCellBorder as Qi, GeomPoint as Ql, addSlideImage as Qn, TextWrap as Qo, setShapeRunHyperlink as Qr, getShapeGradientFill as Qs, getOutlineText as Qt, getSlidesWithHyperlinks as R, setTableColumnWidth as Ra, setSlideLayout as Rc, _internalPackageOf as Ri, SlideLayoutData as Rl, touchModified as Rn, getCommentAuthors as Ro, getShapeHyperlinkTooltip as Rr, setShapeGradientFill as Rs, moveSlide as Rt, getAllComments as S, insertTableColumn as Sa, findShapesByKind as Sc, getShapeImageDuotone as Si, setShapeAltTitle as Sl, searchSlides as Sn, ChartView3D as So, PresentationFontsInput as Sr, ShapeEffectAny as Ss, SlideMediaSource as St, asColor as Su, getAllNotes as T, isTableShape as Ta, findShapesByText as Tc, getShapeImageLinkUrl as Ti, setShapeHidden as Tl, PresentationThumbnail as Tn, setShapeClickAction as To, getPresentationTheme as Tr, getShapeEffect as Ts, getShapeMedia as Tt, AudioFormat as Tu, getVisibleSlides as U, addSlideChart as Ua, findShapesInRect as Uc, getPresentationSummary as Ui, SlideComment as Ul, findSlideLayoutByType as Un, getCommentsSortedByDate as Uo, getShapeRunHyperlink as Ur, setShapePosition as Us, AllShapesEntry as Ut, getSlidesWithOverlap as V, setTableStyleId as Va, centerShapeOnSlide as Vc, getOrphanMediaPartNames as Vi, CommentAuthor as Vl, findSlideLayout as Vn, getCommentSlide as Vo, getShapeRunClickAction as Vr, setShapeNoStroke as Vs, sortSlides as Vt, hasSlideNotes as W, findChartByKind as Wa, getGroupChildren as Wc, getSlideMediaPartNames as Wi, AnimationEffect as Wl, getSlideLayoutName as Wn, getPresentationCommentCountsByAuthor as Wo, getShapeRunHyperlinkTooltip as Wr, setShapeRotation as Ws, SlideInfo as Wt, setSlideTransition as X, getShapeChartCategories as Xa, getShapeBounds as Xc, IssueSeverity as Xi, GeomCommand as Xl, getSlideLayouts as Xn, TextAnchor as Xo, setParagraphLineSpacing as Xr, setShapeStrokeDash as Xs, findSlidesByText as Xt, getSlideTransition as Y, getPresentationChartKindCounts as Ya, getShapeAltTitle as Yc, validatePresentation as Yi, CustomGeometry as Yl, getSlideLayoutUsageCountsByType as Yn, removeSlideComment as Yo, setParagraphLevel as Yr, setShapeStrokeCompound as Ys, findSlidesByNotes as Yt, getEffectiveColorMap as Z, getShapeChartKind as Za, getShapeBoundsResolved as Zc, ValidationIssue as Zi, GeomPath as Zl, getUnusedSlideLayouts as Zn, TextAutoFit as Zo, setParagraphSpacing as Zr, setShapeStrokeJoin as Zs, getAllShapes as Zt, clearSlideHyperlinks as _, getTableDimensions as _a, findShapeById as _c, getShapeImageBiLevelThreshold as _i, isShapeHidden as _l, replaceTextInNotes as _n, ChartSpec as _o, setShapeRunFormat as _r, setShapeTextDirection as _s, getSlideMasterShapes as _t, ReadTextFormat as _u, SlideSize as a, getTableCellAlignment as aa, getShapeFillEffective as ac, clearSlideAnimations as ai, getShapePlaceholderIdx as al, getSlideCount as an, ChartDataLabels as ao, clearSlideShapes as ar, getShapeTextColumns as as, getSlideBackgroundPatternFill as at, ShadowOptions as au, findSlidesWithChartTrendlines as b, getTableStyleFlags as ba, findShapeInPresentation as bc, getShapeImageContrast as bi, pointInShape as bl, replaceTextInSlideNotes as bn, ChartTrendline as bo, resolveDrawingColorOpacity as br, setShapeTextWrap as bs, ShapeMedia as bt, HexColor as bu, PresentationChartEntry as c, getTableCellFill as ca, getShapeStrokeCap as cc, setShapeAnimation as ci, getShapePreset as cl, getSlideLayoutCount as cn, ChartErrorBarAmount as co, removeShape as cr, getShapeTextWrap as cs, getSlideLayoutBackgroundGradientFill as ct, PatternFillOptions as cu, PresentationImageEntry as d, getTableCellPosition as da, getShapeStrokeCompound as dc, findOverlappingShapePairs as di, getShapeText as dl, getSlideText as dn, ChartKind as do, setShapeZIndex as dr, setShapeParagraphs as ds, getSlideLayoutBackgroundShapes as dt, ReadGradientStop as du, TableCellParagraph as ea, ShapeFill as ec, getSlideBody as ei, getShapeDescription as el, getPresentationText as en, getShapeChartSpec as eo, addSlideShape as er, getShapeBodyPrEffective as es, SlideLayoutBackgroundShape as et, ArrowOptions as eu, PresentationNotesEntry as f, getTableCellSpan as fa, getShapeStrokeEffective as fc, findShapesOutsideCanvas as fi, getSlideMasterCount as fl, getSlideTextLength as fn, ChartManualLayout as fo, ParagraphProperties as fr, setShapeText as fs, getSlideLayoutShapes as ft, BulletStyle as fu, clearAllSlideNotes as g, getTableColumnWidths as ga, findEmptyPlaceholders as gc, getPresentationImageCountsBySlide as gi, getUnusedSlideMasters as gl, isSlideHidden as gn, ChartSeriesAxis as go, setShapeHyperlink as gr, setShapeTextColumns as gs, getSlideMasterBackgroundPatternFill as gt, RunSpec as gu, clearAllHyperlinks as h, getTableCells as ha, getShapeStrokeWidth as hc, findSlidesByLayoutType as hi, getSlideMasterUsageCounts as hl, getSlidesByLayout as hn, ChartSeries as ho, getShapeRunFormatEffective as hr, setShapeTextBodyRotationDeg as hs, getSlideMasterBackgroundImageBytes as ht, ParagraphSpec as hu, SLIDE_SIZE_4_3 as i, getTableCell as ia, getShapeFillColorResolved as ic, setSlideTitle as ii, getShapeName as il, getSlideAt as in, ChartDataLabelPosition as io, bringShapeToFront as ir, getShapeTextBodyRotationDeg as is, getSlideBackgroundImageBytes as it, GlowOptions as iu, getPresentationNotesLength as j, setTableCellBorders as ja, getShapeSlide as jc, setShapeImageBrightness as ji, PresentationSize as jl, getCoreProperties as jn, findCommentAuthorByName as jo, getParagraphBulletImageBytes as jr, clearShapeStroke as js, addSlide as jt, inches as ju, getHiddenSlides as k, setTableCellAlignment as ka, findSlidePlaceholders as kc, hasShapeText as ki, setSlideSections as kl, CoreProperties as kn, clearAllSlideComments as ko, getParagraphAlignment as kr, setShapeShadow as ks, addContentSlide as kt, cm as ku, PresentationCommentEntry as l, getTableCellMargins as la, getShapeStrokeColor as lc, ImageCrop as li, getShapeRotation as ll, getSlideOutline as ln, ChartErrorBars as lo, sendShapeBackward as lr, setShapeAlignment as ls, getSlideLayoutBackgroundImageBytes as lt, PatternPreset as lu, appendSlideNotes as m, getTableCellTextDirection as ma, getShapeStrokeOpacity as mc, findSlidesByLayoutPartName as mi, getSlideMasterPartNames as ml, getSlides as mn, ChartSecondaryValueAxis as mo, getShapeHyperlink as mr, setShapeTextAutoFit as ms, getSlideMasterBackgroundGradientFill as mt, ParagraphAlignmentToken as mu, SLIDE_SIZE_16_10 as n, getPresentationTableCountsBySlide as na, getShapeFill as nc, setSlideBody as ni, getShapeId as nl, getPresentationTextLengthsBySlide as nn, setChartSpec as no, addSlideTextBox as nr, getShapeTextAutoFit as ns, getSlideBackground as nt, LineEndSize as nu, getSlideSize as o, getTableCellAnchor as oa, getShapeFillOpacity as oc, findShapesWithAnimation as oi, getShapePlaceholderType as ol, getSlideIndex as on, ChartDataTable as oo, copyShape as or, getShapeTextDirection as os, getSlideColorMapOverride as ot, GradientFillOptions as ou, PresentationTableEntry as p, getTableCellText as pa, getShapeStrokeJoin as pc, findSlidesByLayoutName as pi, getSlideMasterPartName as pl, getSlideXmlString as pn, ChartOfPie as po, getParagraphPropertiesEffective as pr, setShapeTextAnchor as ps, getSlideMasterBackground as pt, ParagraphAlignment as pu, setSlideNotes as q, findChartsWithTrendlines as qa, getMaxShapeIdInPresentation as qc, setMediaPartBytes as qi, TransitionEffect as ql, getSlideLayoutType as qn, getSlideCommentAuthors as qo, setParagraphAlignment as qr, setShapeStrokeArrow as qs, findSlideByText as qt, SLIDE_SIZE_16_9 as r, getSlideTables as ra, getShapeFillColor as rc, setSlidePlaceholders as ri, getShapeKind as rl, getShapeAt as rn, ChartAxisScaling as ro, bringShapeForward as rr, getShapeTextAutoFitParams as rs, getSlideBackgroundGradientFill as rt, LineEndType as ru, setSlideSize as s, getTableCellBorders as sa, getShapeStroke as sc, getShapeAnimation as si, getShapePosition as sl, getSlideInfo as sn, ChartDateAxis as so, getShapeZIndex as sr, getShapeTextMargins as ss, getSlideLayoutBackground as st, GradientStop as su, VERSION as t, clearTableCellFill as ta, ShapeStroke as tc, getSlideTitle as ti, getShapeFlip as tl, getPresentationTextLength as tn, getSlideCharts as to, addSlideTable as tr, getShapeTextAnchor as ts, clearSlideBackground as tt, LineDash as tu, PresentationHyperlinkEntry as u, getTableCellParagraphs as ua, getShapeStrokeColorResolved as uc, findFlippedShapes as ui, getShapeSize as ul, getSlidePartName as un, ChartGrouping as uo, sendShapeToBack as ur, setShapeBulletStyle as us, getSlideLayoutBackgroundPatternFill as ut, ReadGradientFill as uu, findSlidesByHyperlink as v, getTableRowHeights as va, findShapeByName as vc, getShapeImageBrightness as vi, isShapePlaceholder as vl, replaceTextInPresentation as vn, ChartTextStyle as vo, getShapeRunFormat as vr, setShapeTextFormat as vs, setSlideBackground as vt, TextFormat as vu, getAllImages as w, isChartShape as wa, findShapesByPreset as wc, getShapeImageFormat as wi, setShapeDescription as wl, slideHasAnimations as wn, getShapeClickAction as wo, getPresentationFonts as wr, findShapesByEffect as ws, findShapesWithMedia as wt, PlaceholderType as wu, getAllCharts as x, getTableStyleId as xa, findShapesByHyperlink as xc, getShapeImageCrop as xi, renameShape as xl, replaceTokensInPresentation as xn, ChartUpDownBars as xo, PresentationFonts as xr, ShapeEffect as xs, SlideMediaOptions as xt, SchemeColorToken as xu, findSlidesWithChartKind as y, getTableSize as ya, findShapeByText as yc, getShapeImageBytes as yi, isShapeTextBox as yl, replaceTextInSlide as yn, ChartTimeUnit as yo, resolveDrawingColor as yr, setShapeTextMargins as ys, setSlideBackgroundImage as yt, Color as yu, getSlidesWithImages as z, setTableRowHeight as za, translateShapes as zc, compactPackage as zi, SlideShapeData as zl, SlideLayoutPlaceholder as zn, getCommentDate as zo, getShapeParagraphCount as zr, setShapeImageFill as zs, removeSlide as zt };
6016
- //# sourceMappingURL=index-CfANfMvY.d.ts.map
7810
+ export { getSlideNotes as $, getShapeImageLinkUrl as $a, removeSlideComment as $c, shapesOverlap as $d, TextFill as $f, getParagraphLineSpacing as $i, setShapeAdjustValues as $l, addTitleSlide as $n, getTableStyleFlags as $o, removeThumbnail as $r, ScatterChartSeries as $s, getSlideMasterBackgroundImageBytes as $t, findShapesWithHyperlinks as $u, PresentationNotesEntry as A, AnimationSequenceKind as Aa, clearAllSlideComments as Ac, getShapeKind as Ad, PathFillMode as Af, addSlideShape as Ai, setShapeTextAutoFit as Al, ShapeStyleFontReference as An, TableCellBorders as Ao, getSlideInfo as Ar, getPresentationChartKindCounts as As, setSlideMasterBackgroundStyle as At, getShapeFillColor as Au, getAllCharts as B, findShapesOutsideCanvas as Ba, getCommentDate as Bc, getSlideMasterPartName as Bd, LightRigType as Bf, sendShapeToBack as Bi, ShapeEffectAny as Bl, isShapeLocked as Bn, getTableCellFill as Bo, isSlideHidden as Br, BubbleChartSpec as Bs, getSlideBackgroundImageFillLayout as Bt, getShapeStrokeJoin as Bu, getPresentationFirstSlideNumber as C, setSlidePlaceholders as Ca, ReadChartSpec as Cc, getShapeBounds as Cd, SlideTransition as Cf, getUnusedSlideLayouts as Ci, getShapeTextWrap as Cl, addSlideMedia as Cn, setMediaPartBytes as Co, Emu as Cp, getPresentationText as Cr, SlideChartData as Cs, getSlideTransitionSound as Ct, getPresentationFonts as Cu, PresentationCommentEntry as D, getShapeAnimation as Da, ImageFit as Dc, getShapeDescription as Dd, GeomCommand as Df, setSlideLayoutPlaceholderBounds as Di, setShapeText as Dl, setShapeMediaPlayback as Dn, ValidationIssue as Do, mm as Dp, getSlideAt as Dr, findChartsWithDataLabels as Ds, resolveDeckBodyTextColor as Dt, ShapeFill as Du, PresentationChartEntry as E, findShapesWithAnimation as Ea, setShapeClickAction as Ec, getShapeCustomGeometry as Ed, CustomGeometry as Ef, setSlideLayoutName as Ei, setShapeParagraphs as El, getShapeMediaPlayback as En, IssueSeverity as Eo, inches as Ep, getShapeAt as Er, findChartsBySeriesName as Es, getEffectiveColorMap as Et, setPresentationTheme as Eu, clearAllSlideNotes as F, ImageCrop as Fa, findCommentsByAuthor as Fc, getShapePreset as Fd, Bevel as Ff, clearSlideShapes as Fi, setShapeTextFormat as Fl, setShapeTextLanguage as Fn, getTableCell as Fo, getSlideTextLength as Fr, getShapeChartSpec as Fs, copySlideBackground as Ft, getShapeStrokeCap as Fu, getAllTables as G, getShapeImageBiLevelThreshold as Ga, getCommentStatus as Gc, isShapePlaceholder as Gd, Text3D as Gf, ShapeParagraphElement as Gi, getShapeEffectsEffective as Gl, resetSlideLayout as Gn, getTableCellSpan as Go, replaceTextInSlideNotes as Gr, ComboChartSpec as Gs, getSlideLayoutBackground as Gt, findShapeByName as Gu, getAllHyperlinks as H, findSlidesByLayoutPartName as Ha, getCommentParent as Hc, getSlideMasterUsageCounts as Hd, ReadText3D as Hf, getShapeRunFormat as Hi, findShapesByEffect as Hl, setShapeLocked as Hn, getTableCellParagraphs as Ho, replaceTextInNotes as Hr, ChartSpec as Hs, getSlideBackgroundImageOpacity as Ht, getShapeStrokeWidth as Hu, clearSlideHyperlinks as I, ImageRecolor as Ia, findCommentsByText as Ic, getShapeRotation as Id, BevelPreset as If, copyShape as Ii, setShapeTextMargins as Il, CustomGeometryInput as In, getTableCellAlignment as Io, getSlideXmlString as Ir, getSlideCharts as Is, getSlideBackground as It, getShapeStrokeColor as Iu, getHiddenSlides as J, getShapeImageContrast as Ja, getPresentationCommentCountsByAuthor as Jc, renameShape as Jd, ParagraphAlignmentToken as Jf, getParagraphBulletImageBytes as Ji, clearShapeFill as Jl, addBlankSlide as Jn, getTableCells as Jo, setSlideBackgroundGraphicsHidden as Jr, OfPieChartSpec as Js, getSlideLayoutBackgroundPatternFill as Jt, findShapesByHyperlink as Ju, getDistinctHyperlinkUrls as K, getShapeImageBrightness as Ka, getCommentText as Kc, isShapeTextBox as Kd, BulletStyle as Kf, getParagraphAlignment as Ki, setShapeGlow as Kl, resetSlidePlaceholderGeometry as Kn, getTableCellText as Ko, replaceTokensInPresentation as Kr, DoughnutChartSpec as Ks, getSlideLayoutBackgroundGradientFill as Kt, findShapeByText as Ku, findSlidesByHyperlink as L, ImageRecolorColor as La, findSlidesWithCommentsByAuthor as Lc, getShapeSize as Ld, CameraPreset as Lf, getShapeZIndex as Li, setShapeTextWrap as Ll, CustomGeometryPathInput as Ln, getTableCellAnchor as Lo, getSlides as Lr, setChartSpec as Ls, getSlideBackgroundGradientFill as Lt, getShapeStrokeColorResolved as Lu, SlideNotesTextFormatOptions as M, AnimationTarget as Ma, findCommentAuthorByName as Mc, getShapePlaceholderIdx as Md, LineDash as Mf, addSlideTextBox as Mi, setShapeTextColumns as Ml, ShapeStyleReference as Mn, clearTableCellFill as Mo, getSlideOutline as Mr, getShapeChartKind as Ms, SlideLayoutBackgroundShape as Mt, getShapeFillEffective as Mu, appendSlideNotes as N, AnimationValueAfterEnd as Na, findCommentsAfter as Nc, getShapePlaceholderType as Nd, LineEndSize as Nf, bringShapeForward as Ni, setShapeTextDirection as Nl, setShapeStyle as Nn, getPresentationTableCountsBySlide as No, getSlidePartName as Nr, getShapeChartSeriesNames as Ns, applySlideBackgroundToAll as Nt, getShapeFillOpacity as Nu, PresentationHyperlinkEntry as O, getSlideAnimations as Oa, setShapeImage as Oc, getShapeFlip as Od, GeomPath as Of, addSlideImage as Oi, setShapeText3D as Ol, groupShapes as On, TableCellAppearanceEffective as Oo, pt as Op, getSlideCount as Or, findChartsWithTrendlines as Os, SlideMasterBackgroundStyle as Ot, ShapeStroke as Ou, clearAllHyperlinks as P, SlideAnimationStep as Pa, findCommentsBefore as Pc, getShapePosition as Pd, LineEndType as Pf, bringShapeToFront as Pi, setShapeTextField as Pl, getShapeTextLanguage as Pn, getSlideTables as Po, getSlideText as Pr, getShapeChartSeriesValues as Ps, clearSlideBackground as Pt, getShapeStroke as Pu, getPresentationNotesText as Q, getShapeImageFormat as Qa, getSlideComments as Qc, setShapeHidden as Qd, ReadTextFormat as Qf, getParagraphLevel as Qi, getShapeStrokeDash as Ql, addSlideAt as Qn, getTableSize as Qo, getThumbnail as Qr, RadarChartSpec as Qs, getSlideMasterBackgroundGradientFill as Qt, findShapesByText as Qu, findSlidesWithChartKind as R, findFlippedShapes as Ra, getCommentAuthor as Rc, getShapeText as Rd, LightRig as Rf, removeShape as Ri, TextCase as Rl, setShapeCustomGeometry as Rn, getTableCellAppearanceEffective as Ro, getSlidesByLayout as Rr, Bar3DChartSpec as Rs, getSlideBackgroundImageBytes as Rt, getShapeStrokeCompound as Ru, SlideSize as S, setSlideBody as Sa, ChartView3D as Sc, getShapeAltTitle as Sd, AnimationStartCondition as Sf, getSlideLayouts as Si, getShapeTextMargins as Sl, SlideMediaSource as Sn, readPackagePart as So, ImageFormat as Sp, getPresentationShapeCountsBySlide as Sr, splitTableCell as Ss, getSlideTransition as St, PresentationTheme as Su, setSlideSize as T, clearSlideAnimations as Ta, getShapeClickAction as Tc, getShapeCenter as Td, TransitionOptions as Tf, setSlideLayoutBackground as Ti, setShapeBulletStyle as Tl, getShapeMedia as Tn, validatePresentation as To, emu as Tp, getPresentationTextLengthsBySlide as Tr, findChartByKind as Ts, setSlideTransitionSound as Tt, setPresentationFonts as Tu, getAllImages as U, findSlidesByLayoutType as Ua, getCommentPosition as Uc, getUnusedSlideMasters as Ud, Rotation3D as Uf, resolveDrawingColor as Ui, getShapeEffect as Ul, addMissingSlidePlaceholders as Un, getTableCellPosition as Uo, replaceTextInPresentation as Ur, ChartVariant as Us, getSlideBackgroundPatternFill as Ut, findEmptyPlaceholders as Uu, getAllComments as V, findSlidesByLayoutName as Va, getCommentFormat as Vc, getSlideMasterPartNames as Vd, PresetMaterial as Vf, setShapeZIndex as Vi, clearShapeEffects as Vl, setShapeAspectRatioLocked as Vn, getTableCellMargins as Vo, isSlideLayoutBackgroundGraphicsHidden as Vr, CandlestickChartSpec as Vs, getSlideBackgroundImageIntrinsicSize as Vt, getShapeStrokeOpacity as Vu, getAllNotes as W, getPresentationImageCountsBySlide as Wa, getCommentSlide as Wc, isShapeHidden as Wd, Scene3D as Wf, resolveDrawingColorOpacity as Wi, getShapeEffects as Wl, addSlidePlaceholder as Wn, getTableCellRunFormatEffective as Wo, replaceTextInSlide as Wr, ComboChartSeries as Ws, getSlideColorMapOverride as Wt, findShapeById as Wu, getPresentationNotesLength as X, getShapeImageDuotone as Xa, getPresentationCommenters as Xc, setShapeBounds as Xd, RunSpec as Xf, getParagraphEndFormat as Xi, getShapePatternFill as Xl, addSectionHeaderSlide as Xn, getTableDimensions as Xo, slideHasAnimations as Xr, PieChartSpec as Xs, getSlideLayoutShapes as Xt, findShapesByName as Xu, getPresentationHyperlinkCountsBySlide as Y, getShapeImageCrop as Ya, getPresentationCommentCountsBySlide as Yc, setShapeAltTitle as Yd, ParagraphSpec as Yf, getParagraphBulletStyle as Yi, clearShapeStroke as Yl, addContentSlide as Yn, getTableColumnWidths as Yo, setSlideHidden as Yr, Pie3DChartSpec as Ys, getSlideLayoutBackgroundShapes as Yt, findShapesByKind as Yu, getPresentationNotesLengthsBySlide as Z, getShapeImageFillBytes as Za, getSlideCommentAuthors as Zc, setShapeDescription as Zd, ReadTextFill as Zf, getParagraphIndent as Zi, getShapeStrokeArrow as Zl, addSlide as Zn, getTableRowHeights as Zo, PresentationThumbnail as Zr, PlainChartSeries as Zs, getSlideMasterBackground as Zt, findShapesByPreset as Zu, setSlideOutlineCollapsed as _, setParagraphTypography as _a, ChartSeriesAxis as _c, getGroupChildren as _d, CommentPosition as _f, getSlideLayoutPartName as _i, getShapeTextAutoFit as _l, MediaFade as _n, getOrphanMediaPartNames as _o, ColorTransform as _p, findSlideByTitle as _r, setTableCellTextFormat as _s, setSlideNotesFormat as _t, setShapeStrokeJoin as _u, getShapeImageFillLayout as a, getShapeRunCount as aa, ChartDataLabelPosition as ac, getShapeXmlString as ad, createPresentation as af, getPresentationCreated as ai, getParagraphPropertiesEffective as al, setSlideBackgroundImageFillLayout as an, resetShapeImageColorEffects as ao, PatternFillOptions as ap, removeSlide as ar, mergeTableCells as as, getSlidesWithComments as at, setShapeNoStroke as au, SLIDE_SIZE_16_9 as b, getSlideBody as ba, ChartTrendline as bc, getMaxShapeIdInPresentation as bd, AnimationEffect as bf, getSlideLayoutUsageCounts as bi, getShapeTextColumns as bl, ShapeMedia as bn, getSlideMediaPartNames as bo, AudioFormat as bp, getAllShapes as br, setTableStyleFlags as bs, TransitionSoundInput as bt, PresentationFonts as bu, DrawingGuide as c, getShapeRunText as ca, ChartDateAxis as cc, getSlideShapes as cd, PresentationData as cf, setCoreProperties as ci, setShapeHyperlink as cl, ImageFillLayout as cn, setShapeImageCrop as co, ReadGradientStop as cp, swapSlides as cr, setTableCellAlignment as cs, getSlidesWithNotes as ct, setShapePreset as cu, getDrawingGuidesVisible as d, setParagraphBullet as da, ChartGrouping as dc, setSlideLayout as dd, SlideLayoutData as df, SlideLayoutPlaceholder as di, TextAutoFit as dl, AnimationPatch as dn, MediaPart as do, ReflectionOptions as dp, setCustomShows as dr, setTableCellClickAction as ds, getVisibleSlides as dt, setShapeSlideBackgroundFill as du, getParagraphSpacing as ea, ScatterChartSpec as ec, findSlidePlaceholder as ed, SlideSection as ef, setThumbnail as ei, setCommentStatus as el, getSlideMasterBackgroundPatternFill as en, getShapeImageOpacity as eo, TextFormat as ep, duplicateSlide as er, getTableStyleId as es, getSlideNotesLength as et, setShapeFill as eu, getGridSpacing as f, setParagraphIndent as fa, ChartKind as fc, translateShapes as fd, SlideShapeData as ff, findLayoutsWithPlaceholderType as fi, TextWrap as fl, moveSlideAnimation as fn, PackagePartInfo as fo, ShadowOptions as fp, AllShapesEntry as fr, setTableCellFill as fs, hasSlideNotes as ft, setShapeStroke as fu, setGridSpacing as g, setParagraphTabs as ga, ChartSeries as gc, findShapesInRect as gd, CommentAuthor as gf, getSlideLayoutName as gi, getShapeTextAnchor as gl, MediaBookmark as gn, getMediaParts as go, asColor as gp, findSlideByText as gr, setTableCellTextDirection as gs, setSlideNotes as gt, setShapeStrokeDash as gu, setDrawingGuidesVisible as h, setParagraphSpacing as ha, ChartSecondaryValueAxis as hc, findShapesAtPoint as hd, CommentStatus as hf, findSlideLayoutByType as hi, getShapeText3D as hl, resetShapeVideoFormatting as hn, compactPackage as ho, SchemeColorToken as hp, findSlideByPartName as hr, setTableCellText as hs, resolveSlideNotesTextColor as ht, setShapeStrokeCompound as hu, setSlideShowProperties as i, getShapeRunClickAction as ia, ChartAxisScaling as ic, getShapeSlide as id, PresentationSize as if, getExtendedProperties as ii, ParagraphTabStop as il, setSlideBackgroundImage as in, isShapeImageGrayscale as io, GradientStop as ip, moveSlide as ir, isTableShape as is, getSlidesWithCharts as it, setShapeNoFill as iu, PresentationTableEntry as j, AnimationStart as ja, clearSlideComments as jc, getShapeName as jd, ArrowOptions as jf, addSlideTable as ji, setShapeTextBodyRotationDeg as jl, ShapeStyleOptions as jn, TableCellParagraph as jo, getSlideLayoutCount as jr, getShapeChartCategories as js, SlideBackground as jt, getShapeFillColorResolved as ju, PresentationImageEntry as k, setShapeAnimation as ka, addSlideComment as kc, getShapeId as kd, GeomPoint as kf, addSlideLine as ki, setShapeTextAnchor as kl, ungroupShapes as kn, TableCellBorder as ko, getSlideIndex as kr, getPresentationChartCountsBySlide as ks, getSlideMasterBackgroundStyles as kt, getShapeFill as ku, getCollapsedOutlineSlides as l, isParagraphBulletPicture as la, ChartErrorBarAmount as lc, getSlidesWithEmptyPlaceholders as ld, SlideCommentData as lf, setExtendedProperties as li, setShapeRunFormat as ll, ImageTileAlignment as ln, setShapeImageOpacity as lo, GlowOptions as lp, CustomShow as lr, setTableCellAnchor as ls, getSlidesWithOverlap as lt, setShapeRotation as lu, setDrawingGuides as m, setParagraphLineSpacing as ma, ChartOfPie as mc, centerShapeOnSlide as md, COMMENT_STATUSES as mf, findSlideLayoutByPartName as mi, getShapeBodyPrEffective as ml, updateSlideAnimation as mn, _internalPackageOf as mo, HexColor as mp, SlideOutlineEntry as mr, setTableCellParagraphs as ms, replaceHyperlink as mt, setShapeStrokeCap as mu, SlideShowProperties as n, getShapeParagraphCount as na, SurfaceChartSpec as nc, findSlidePlaceholders as nd, setSlideSections as nf, ExtendedProperties as ni, ParagraphBulletDetail as nl, setSlideBackground as nn, hasShapeImage as no, toWritableTextFormat as np, importSlide as nr, insertTableRow as ns, getSlideNotesParagraphEndFormat as nt, setShapeGradientFill as nu, getShapeImageIntrinsicSize as o, getShapeRunHyperlink as oa, ChartDataLabels as oc, getShapesBounds as od, loadPresentation as of, getPresentationModified as oi, getShapeHyperlink as ol, setSlideBackgroundImageOpacity as on, setShapeImageBrightness as oo, PatternPreset as op, reverseSlides as or, removeTableColumn as os, getSlidesWithHyperlinks as ot, setShapePatternFill as ou, getSnapToGrid as p, setParagraphLevel as pa, ChartManualLayout as pc, ShapeBounds as pd, TableCellData as pf, findSlideLayout as pi, appendShapeText as pl, removeSlideAnimation as pn, PresentationSummary as po, Color as pp, SlideInfo as pr, setTableCellMargins as ps, removeSlideNotes as pt, setShapeStrokeArrow as pu, getEmptySlides as q, getShapeImageBytes as qa, getCommentsSortedByDate as qc, pointInShape as qd, ParagraphAlignment as qf, getParagraphBullet as qi, setShapeShadow as ql, resetSlidePlaceholderTextFormatting as qn, getTableCellTextDirection as qo, searchSlides as qr, LineArea3DChartSpec as qs, getSlideLayoutBackgroundImageBytes as qt, findShapeInPresentation as qu, getSlideShowProperties as r, getShapeParagraphElements as ra, isChartSpec as rc, getShapeIndex as rd, PresentationInput as rf, getCoreProperties as ri, ParagraphProperties as rl, setSlideBackgroundGradientFill as rn, hasShapeText as ro, GradientFillOptions as rp, mergePresentations as rr, isChartShape as rs, getSlideNotesTextFormats as rt, setShapeImageFill as ru, setShapeImageFillLayout as s, getShapeRunHyperlinkTooltip as sa, ChartDataTable as sc, getSlideLayout as sd, savePresentation as sf, incrementRevision as si, getShapeRunFormatEffective as sl, setSlideBackgroundPatternFill as sn, setShapeImageContrast as so, ReadGradientFill as sp, sortSlides as sr, removeTableRow as ss, getSlidesWithImages as st, setShapePosition as su, VERSION as t, getShapeHyperlinkTooltip as ta, StockChartSpec as tc, findSlidePlaceholderByIdx as td, getSlideSections as tf, CoreProperties as ti, setCommentText as tl, getSlideMasterShapes as tn, getShapeImagePartName as to, TextOutline as tp, duplicateSlideAt as tr, insertTableColumn as ts, getSlideNotesLineBreaks as tt, setShapeFlip as tu, getDrawingGuides as u, setParagraphAlignment as ua, ChartErrorBars as uc, replaceTokensInSlide as ud, SlideData as uf, touchModified as ui, TextAnchor as ul, ImageTileFlip as un, setShapeImageRecolor as uo, InnerShadowOptions as up, getCustomShows as ur, setTableCellBorders as us, getSlidesWithTables as ut, setShapeSize as uu, setSnapToGrid as v, setShapeRunHyperlink as va, ChartTextStyle as vc, getGroupTransform as vd, SlideComment as vf, getSlideLayoutPlaceholders as vi, getShapeTextAutoFitParams as vl, MediaPlayback as vn, getPackageSize as vo, PresetShape as vp, findSlidesByNotes as vr, setTableColumnWidth as vs, transformSlideNotesCase as vt, getShapeGradientFill as vu, getSlideSize as w, setSlideTitle as wa, ShapeClickAction as wc, getShapeBoundsResolved as wd, TransitionEffect as wf, clearSlideLayoutBackground as wi, setShapeAlignment as wl, findShapesWithMedia as wn, slidesUsingMediaPart as wo, cm as wp, getPresentationTextLength as wr, addSlideChart as ws, setSlideTransition as wt, getPresentationTheme as wu, SLIDE_SIZE_4_3 as x, getSlideTitle as xa, ChartUpDownBars as xc, getShapeAdjustValues as xd, AnimationOptions as xf, getSlideLayoutUsageCountsByType as xi, getShapeTextDirection as xl, SlideMediaOptions as xn, listPackageParts as xo, VideoFormat as xp, getOutlineText as xr, setTableStyleId as xs, clearSlideTransition as xt, PresentationFontsInput as xu, SLIDE_SIZE_16_10 as y, setShapeRunText as ya, ChartTimeUnit as yc, getMaxShapeId as yd, AnimationDirection as yf, getSlideLayoutType as yi, getShapeTextBodyRotationDeg as yl, MediaTrim as yn, getPresentationSummary as yo, PlaceholderType as yp, findSlidesByText as yr, setTableRowHeight as ys, TransitionSound as yt, getShapeGradientFillEffective as yu, findSlidesWithChartTrendlines as z, findOverlappingShapePairs as za, getCommentAuthors as zc, getSlideMasterCount as zd, LightRigDirection as zf, sendShapeBackward as zi, ShapeEffect as zl, isShapeAspectRatioLocked as zn, getTableCellBorders as zo, isSlideBackgroundGraphicsHidden as zr, BubbleChartSeries as zs, getSlideBackgroundImageCrop as zt, getShapeStrokeEffective as zu };
7811
+ //# sourceMappingURL=index-Dnzhy4tZ.d.ts.map