@office-kit/pptx 0.21.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.
- package/CHANGELOG.md +495 -0
- package/README.md +146 -40
- package/dist/{api-On7UeTT-.js → api-aCDzQshv.js} +16729 -7481
- package/dist/api-aCDzQshv.js.map +1 -0
- package/dist/{index-VCK9yZV2.d.ts → index-Dnzhy4tZ.d.ts} +2147 -533
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/node.d.ts +2 -2
- package/dist/node.js +2 -2
- package/package.json +1 -1
- package/dist/api-On7UeTT-.js.map +0 -1
|
@@ -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;
|
|
367
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;
|
|
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/
|
|
422
|
-
/**
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
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
|
-
|
|
430
|
-
|
|
431
|
-
readonly
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
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
|
-
|
|
460
|
-
|
|
461
|
-
|
|
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
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
readonly
|
|
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
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
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
|
-
/**
|
|
641
|
-
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
* -
|
|
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
|
|
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: (
|
|
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
|
|
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
|
|
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
|
|
1413
|
-
*
|
|
1414
|
-
*
|
|
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
|
|
1417
|
-
* shape
|
|
1418
|
-
*
|
|
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
|
-
/**
|
|
1456
|
-
|
|
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
|
|
1483
|
-
*
|
|
1484
|
-
*
|
|
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
|
-
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
1520
|
-
|
|
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).
|
|
1672
|
-
*
|
|
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
|
|
1682
|
-
*
|
|
1683
|
-
*
|
|
1684
|
-
|
|
1685
|
-
|
|
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
|
|
1790
|
-
*
|
|
1791
|
-
*
|
|
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
|
|
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
|
-
*
|
|
1840
|
-
* horizontal
|
|
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) => {
|
|
@@ -1847,62 +2412,269 @@ declare const getShapeTextMargins: (shape: SlideShapeData) => {
|
|
|
1847
2412
|
readonly bottom: number | null;
|
|
1848
2413
|
} | null;
|
|
1849
2414
|
/**
|
|
1850
|
-
* Resolves the effective `<a:bodyPr>` properties — anchor, wrap, vertical
|
|
1851
|
-
* direction,
|
|
1852
|
-
* the same way `getShapeRunFormatEffective` walks rPr. Returns the
|
|
1853
|
-
* innermost value that the cascade supplies, or `null` for properties
|
|
1854
|
-
* neither the shape nor any inherited placeholder authors.
|
|
2415
|
+
* Resolves the effective `<a:bodyPr>` properties — anchor, wrap, vertical
|
|
2416
|
+
* direction, inset margins, columns and autofit — by walking the layout / master cascade
|
|
2417
|
+
* the same way `getShapeRunFormatEffective` walks rPr. Returns the
|
|
2418
|
+
* innermost value that the cascade supplies, or `null` for properties
|
|
2419
|
+
* neither the shape nor any inherited placeholder authors.
|
|
2420
|
+
*
|
|
2421
|
+
* Companion to `getShapeTextAnchor` / `getShapeTextWrap` /
|
|
2422
|
+
* `getShapeTextDirection` / `getShapeTextMargins`, which only report the
|
|
2423
|
+
* literal value on the shape itself.
|
|
2424
|
+
*/
|
|
2425
|
+
declare const getShapeBodyPrEffective: (pres: PresentationData, shape: SlideShapeData) => {
|
|
2426
|
+
anchor: TextAnchor | null;
|
|
2427
|
+
anchorCentered: boolean | null;
|
|
2428
|
+
autoFit: TextAutoFit | null;
|
|
2429
|
+
autoFitParams: ReturnType<typeof getShapeTextAutoFitParams>;
|
|
2430
|
+
columns: ReturnType<typeof getShapeTextColumns>;
|
|
2431
|
+
wrap: TextWrap | null;
|
|
2432
|
+
vert: ReturnType<typeof getShapeTextDirection>;
|
|
2433
|
+
margins: {
|
|
2434
|
+
left: number | null;
|
|
2435
|
+
top: number | null;
|
|
2436
|
+
right: number | null;
|
|
2437
|
+
bottom: number | null;
|
|
2438
|
+
};
|
|
2439
|
+
};
|
|
2440
|
+
/**
|
|
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:
|
|
1855
2633
|
*
|
|
1856
|
-
*
|
|
1857
|
-
*
|
|
1858
|
-
*
|
|
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.
|
|
1859
2646
|
*/
|
|
1860
|
-
declare const
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
vert: ReturnType<typeof getShapeTextDirection>;
|
|
1864
|
-
margins: {
|
|
1865
|
-
left: number | null;
|
|
1866
|
-
top: number | null;
|
|
1867
|
-
right: number | null;
|
|
1868
|
-
bottom: number | null;
|
|
1869
|
-
};
|
|
1870
|
-
};
|
|
1871
|
-
declare const setShapeTextAnchor: (shape: SlideShapeData, anchor: TextAnchor) => void;
|
|
2647
|
+
declare const getParagraphPropertiesEffective: (pres: PresentationData, shape: SlideShapeData | TableCellData, paragraphIndex: number, options?: {
|
|
2648
|
+
inheritanceSource?: SlideShapeData;
|
|
2649
|
+
}) => ParagraphProperties;
|
|
1872
2650
|
/**
|
|
1873
|
-
*
|
|
1874
|
-
*
|
|
1875
|
-
* layout-inherited default when the attribute is absent).
|
|
2651
|
+
* Applies `format` to a single run. Run-property attributes not
|
|
2652
|
+
* addressed by `format` are preserved — partial updates compose.
|
|
1876
2653
|
*
|
|
1877
|
-
*
|
|
1878
|
-
* top/bottom 45720 (0.05in).
|
|
2654
|
+
* Example: bold the second word of the first paragraph:
|
|
1879
2655
|
*
|
|
1880
|
-
*
|
|
2656
|
+
* setShapeRunFormat(shape, 0, 1, { bold: true, color: '#FF0000' });
|
|
1881
2657
|
*/
|
|
1882
|
-
declare const
|
|
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
|
-
*
|
|
1894
|
-
*
|
|
1895
|
-
*
|
|
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
|
|
2665
|
+
declare const getShapeHyperlink: (shape: SlideShapeData) => string | null;
|
|
1898
2666
|
/**
|
|
1899
|
-
*
|
|
1900
|
-
*
|
|
1901
|
-
*
|
|
1902
|
-
*
|
|
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
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
2065
|
-
*
|
|
2066
|
-
*
|
|
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
|
|
2119
|
-
*
|
|
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
|
|
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
|
/**
|
|
@@ -3598,10 +4430,25 @@ declare const setTableRowHeight: (table: SlideShapeData, row: number, height: Em
|
|
|
3598
4430
|
*/
|
|
3599
4431
|
declare const getTableCell: (table: SlideShapeData, row: number, col: number) => TableCellData;
|
|
3600
4432
|
/**
|
|
3601
|
-
* Replaces a cell's text. `\n` starts a new paragraph
|
|
3602
|
-
*
|
|
3603
|
-
|
|
3604
|
-
|
|
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;
|
|
3605
4452
|
/**
|
|
3606
4453
|
* Replaces the cell's text with explicitly structured paragraphs and runs —
|
|
3607
4454
|
* the table counterpart of `setShapeParagraphs`. Read back with
|
|
@@ -3649,7 +4496,8 @@ declare const getTableCellSpan: (cell: TableCellData) => {
|
|
|
3649
4496
|
* leaves each covered cell's `<a:txBody>` in the XML; `'drop'` removes it,
|
|
3650
4497
|
* so the covered cells carry no `<a:txBody>` at all (CT_TableCell allows
|
|
3651
4498
|
* that), which is how PptxGenJS writes a merge; `getTableCellParagraphs`
|
|
3652
|
-
* 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.
|
|
3653
4501
|
*/
|
|
3654
4502
|
declare const mergeTableCells: (table: SlideShapeData, block: {
|
|
3655
4503
|
readonly row: number;
|
|
@@ -3657,8 +4505,14 @@ declare const mergeTableCells: (table: SlideShapeData, block: {
|
|
|
3657
4505
|
readonly rowSpan: number;
|
|
3658
4506
|
readonly colSpan: number;
|
|
3659
4507
|
}, options?: {
|
|
3660
|
-
readonly coveredText?: "keep" | "drop";
|
|
4508
|
+
readonly coveredText?: "keep" | "drop" | "append";
|
|
3661
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;
|
|
3662
4516
|
/**
|
|
3663
4517
|
* One side of a cell's border, as read from `<a:tcPr><a:ln{L|R|T|B}>`.
|
|
3664
4518
|
* `widthEmu` is the line width in EMU; `color` is `#RRGGBB` or `null`
|
|
@@ -3766,7 +4620,10 @@ interface TableCellParagraph {
|
|
|
3766
4620
|
*/
|
|
3767
4621
|
readonly align: ParagraphAlignment | null;
|
|
3768
4622
|
/** Runs / fields / breaks in document order, with their literal `<a:rPr>` format. */
|
|
3769
|
-
readonly elements: ReadonlyArray<ShapeParagraphElement
|
|
4623
|
+
readonly elements: ReadonlyArray<ShapeParagraphElement & {
|
|
4624
|
+
readonly clickAction?: ShapeClickAction;
|
|
4625
|
+
readonly tooltip?: string;
|
|
4626
|
+
}>;
|
|
3770
4627
|
/**
|
|
3771
4628
|
* Literal format of the paragraph-end mark (`<a:endParaRPr>`), or `null`
|
|
3772
4629
|
* when absent — the only format a paragraph with no `elements` carries.
|
|
@@ -3788,6 +4645,20 @@ interface TableCellParagraph {
|
|
|
3788
4645
|
* `undefined` for the caller to resolve.
|
|
3789
4646
|
*/
|
|
3790
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;
|
|
3791
4662
|
/** Sets a solid background color on a cell (`<a:tcPr><a:solidFill>`). */
|
|
3792
4663
|
declare const setTableCellFill: (cell: TableCellData, color: Color) => void;
|
|
3793
4664
|
/** Removes any background fill from a cell. */
|
|
@@ -3799,8 +4670,44 @@ declare const clearTableCellFill: (cell: TableCellData) => void;
|
|
|
3799
4670
|
* (gradient / pattern / image).
|
|
3800
4671
|
*/
|
|
3801
4672
|
declare const getTableCellFill: (cell: TableCellData) => string | null;
|
|
3802
|
-
/**
|
|
3803
|
-
|
|
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;
|
|
3804
4711
|
/** Sets horizontal alignment on every paragraph in the cell. */
|
|
3805
4712
|
declare const setTableCellAlignment: (cell: TableCellData, align: ParagraphAlignment) => void;
|
|
3806
4713
|
/** Zero-based (row, col) of the cell. */
|
|
@@ -3980,13 +4887,28 @@ interface PresentationSummary {
|
|
|
3980
4887
|
declare const getPresentationSummary: (pres: PresentationData) => PresentationSummary;
|
|
3981
4888
|
//#endregion
|
|
3982
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
|
+
};
|
|
3983
4895
|
/**
|
|
3984
|
-
*
|
|
3985
|
-
*
|
|
3986
|
-
* override and restore PowerPoint's default behavior.
|
|
3987
|
-
*
|
|
3988
|
-
* 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.
|
|
3989
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
|
+
};
|
|
3990
4912
|
/**
|
|
3991
4913
|
* Returns the embedded image bytes for a picture shape, or `null`
|
|
3992
4914
|
* when the shape isn't a picture or has no `r:embed` reference
|
|
@@ -4106,12 +5028,36 @@ declare const getShapeImageBiLevelThreshold: (shape: SlideShapeData) => number |
|
|
|
4106
5028
|
* Reads the picture's duotone color transform from `<a:blip><a:duotone>`.
|
|
4107
5029
|
* PowerPoint emits two `<a:srgbClr>` (or scheme color) children for a
|
|
4108
5030
|
* two-color duotone effect — typical "Picture Tools › Recolor".
|
|
4109
|
-
*
|
|
4110
|
-
|
|
4111
|
-
|
|
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
|
+
}): {
|
|
4112
5050
|
firstColor: string | null;
|
|
4113
5051
|
secondColor: string | null;
|
|
4114
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;
|
|
4115
5061
|
declare const getShapeImageLinkUrl: (shape: SlideShapeData) => string | null;
|
|
4116
5062
|
declare const getShapeImagePartName: (shape: SlideShapeData) => string | null;
|
|
4117
5063
|
/**
|
|
@@ -4132,19 +5078,19 @@ declare const getShapeImageFillBytes: (shape: SlideShapeData) => Uint8Array | nu
|
|
|
4132
5078
|
*/
|
|
4133
5079
|
declare const getShapeImageFormat: (shape: SlideShapeData) => ImageFormat | null;
|
|
4134
5080
|
/**
|
|
4135
|
-
* 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
|
|
4136
5082
|
* `<a:alphaModFix>` is present (PowerPoint treats absence as fully
|
|
4137
5083
|
* opaque); returns `1` when an explicit alphaModFix sets full opacity.
|
|
4138
5084
|
*/
|
|
4139
5085
|
declare const getShapeImageOpacity: (shape: SlideShapeData) => number | null;
|
|
4140
5086
|
/**
|
|
4141
|
-
* Reads
|
|
5087
|
+
* Reads a picture or image fill's crop fractions. Returns `null` when no
|
|
4142
5088
|
* `<a:srcRect>` is present; otherwise returns a fully-populated object
|
|
4143
5089
|
* with every side filled in (0 for omitted sides on disk).
|
|
4144
5090
|
*/
|
|
4145
5091
|
declare const getShapeImageCrop: (shape: SlideShapeData) => ImageCrop | null;
|
|
4146
5092
|
/**
|
|
4147
|
-
* Adjusts
|
|
5093
|
+
* Adjusts a picture or image fill's brightness via `<a:blip><a:lum bright="…"/>`. The value
|
|
4148
5094
|
* is a -1..1 fraction:
|
|
4149
5095
|
*
|
|
4150
5096
|
* - `1` → +100% brightness
|
|
@@ -4152,11 +5098,11 @@ declare const getShapeImageCrop: (shape: SlideShapeData) => ImageCrop | null;
|
|
|
4152
5098
|
* - `-1` → -100% brightness
|
|
4153
5099
|
*
|
|
4154
5100
|
* Brightness and contrast share the one `<a:lum>` element, so setting one keeps
|
|
4155
|
-
* the other. Throws for
|
|
5101
|
+
* the other. Throws for shapes without an image and on values outside [-1, 1].
|
|
4156
5102
|
*/
|
|
4157
5103
|
declare const setShapeImageBrightness: (shape: SlideShapeData, value: number | null) => void;
|
|
4158
5104
|
/**
|
|
4159
|
-
* Adjusts
|
|
5105
|
+
* Adjusts a picture or image fill's contrast via `<a:blip><a:lum contrast="…"/>`. The value
|
|
4160
5106
|
* is a -1..1 fraction (ECMA-376 `ST_FixedPercentage`):
|
|
4161
5107
|
*
|
|
4162
5108
|
* - `0` or `null` → no contrast change (the `contrast` attribute is removed)
|
|
@@ -4164,19 +5110,37 @@ declare const setShapeImageBrightness: (shape: SlideShapeData, value: number | n
|
|
|
4164
5110
|
* - `-0.5` → -50% contrast (washed out)
|
|
4165
5111
|
*
|
|
4166
5112
|
* Brightness and contrast share the one `<a:lum>` element, so setting one keeps
|
|
4167
|
-
* the other. Throws
|
|
5113
|
+
* the other. Throws for shapes without an image and on values outside [-1, 1].
|
|
4168
5114
|
*/
|
|
4169
5115
|
declare const setShapeImageContrast: (shape: SlideShapeData, value: number | null) => void;
|
|
4170
5116
|
/**
|
|
4171
|
-
* Reads
|
|
5117
|
+
* Reads a picture or image fill's contrast (the `<a:lum contrast>` fraction in [-1, 1]).
|
|
4172
5118
|
* Returns `null` when no contrast adjustment is present.
|
|
4173
5119
|
*/
|
|
4174
5120
|
declare const getShapeImageContrast: (shape: SlideShapeData) => number | null;
|
|
4175
5121
|
/**
|
|
4176
|
-
* Reads
|
|
5122
|
+
* Reads a picture or image fill's brightness (the `<a:lum bright>` fraction in [-1, 1]).
|
|
4177
5123
|
* Returns `null` when no brightness adjustment is present.
|
|
4178
5124
|
*/
|
|
4179
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
|
+
*/
|
|
4180
5144
|
declare const setShapeImageOpacity: (shape: SlideShapeData, opacity: number | null) => void;
|
|
4181
5145
|
/** Crop a picture by fraction of each side. Omitted sides default to 0. */
|
|
4182
5146
|
interface ImageCrop {
|
|
@@ -4186,45 +5150,182 @@ interface ImageCrop {
|
|
|
4186
5150
|
readonly bottom?: number;
|
|
4187
5151
|
}
|
|
4188
5152
|
/**
|
|
4189
|
-
* 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
|
|
4190
5154
|
* embedded image by the given fraction on each side. Pass `null` to
|
|
4191
5155
|
* remove an existing crop.
|
|
4192
5156
|
*
|
|
4193
|
-
* Fractions
|
|
4194
|
-
* the left edge;
|
|
4195
|
-
*
|
|
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.
|
|
4196
5161
|
*/
|
|
4197
5162
|
declare const setShapeImageCrop: (shape: SlideShapeData, crop: ImageCrop | null) => void;
|
|
4198
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
|
|
4199
5265
|
//#region src/api/fn/shape-animation.d.ts
|
|
4200
5266
|
/**
|
|
4201
|
-
*
|
|
5267
|
+
* Adds a single animation effect to the given shape.
|
|
4202
5268
|
*
|
|
4203
5269
|
* The effect is *merged* into any existing `<p:timing>` on the slide rather
|
|
4204
5270
|
* than replacing it: animating a second shape (or re-running on a template that
|
|
4205
|
-
* already has authored animations) preserves the existing effects
|
|
4206
|
-
*
|
|
4207
|
-
*
|
|
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`.
|
|
4208
5274
|
*
|
|
4209
5275
|
* Supported `effect` tokens:
|
|
4210
5276
|
*
|
|
4211
|
-
* - `'
|
|
4212
|
-
* - `'fadeOut'`
|
|
4213
|
-
* - `'
|
|
4214
|
-
*
|
|
4215
|
-
*
|
|
4216
|
-
*
|
|
4217
|
-
*
|
|
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`.
|
|
4218
5313
|
*/
|
|
4219
5314
|
declare const setShapeAnimation: (shape: SlideShapeData, opts: AnimationOptions) => void;
|
|
4220
5315
|
/**
|
|
4221
5316
|
* Returns the animation effect bound to this shape via the slide's
|
|
4222
|
-
* `<p:timing>` tree, or `null`
|
|
4223
|
-
*
|
|
4224
|
-
*
|
|
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.
|
|
4225
5321
|
*/
|
|
4226
5322
|
declare const getShapeAnimation: (shape: SlideShapeData) => AnimationEffect | null;
|
|
4227
|
-
/**
|
|
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[];
|
|
4228
5329
|
/**
|
|
4229
5330
|
* Returns every shape on the slide that has an authored animation
|
|
4230
5331
|
* effect (i.e. `getShapeAnimation(shape)` is not `null`). Pair to
|
|
@@ -4233,6 +5334,7 @@ declare const getShapeAnimation: (shape: SlideShapeData) => AnimationEffect | nu
|
|
|
4233
5334
|
* that doesn't honor PowerPoint's timing tree.
|
|
4234
5335
|
*/
|
|
4235
5336
|
declare const findShapesWithAnimation: (slide: SlideData) => ReadonlyArray<SlideShapeData>;
|
|
5337
|
+
/** Removes every animation on the slide, keeping its media play controls. */
|
|
4236
5338
|
declare const clearSlideAnimations: (slide: SlideData) => void;
|
|
4237
5339
|
//#endregion
|
|
4238
5340
|
//#region src/api/fn/slide-title.d.ts
|
|
@@ -4274,7 +5376,7 @@ declare const setSlidePlaceholders: (slide: SlideData, byType: Readonly<Partial<
|
|
|
4274
5376
|
declare const setSlideBody: (slide: SlideData, text: string) => void;
|
|
4275
5377
|
//#endregion
|
|
4276
5378
|
//#region src/api/fn/shape-runs.d.ts
|
|
4277
|
-
/** Number of paragraphs
|
|
5379
|
+
/** Number of paragraphs; zero for an autoshape without a text body. Throws for non-text shapes. */
|
|
4278
5380
|
declare const getShapeParagraphCount: (shape: SlideShapeData) => number;
|
|
4279
5381
|
/**
|
|
4280
5382
|
* One inline element in a paragraph as ordered: a literal text run
|
|
@@ -4309,9 +5411,11 @@ type ShapeParagraphElement = {
|
|
|
4309
5411
|
* Returns the inline children of a paragraph in document order — runs,
|
|
4310
5412
|
* field placeholders, and line breaks. Used by renderers that need to
|
|
4311
5413
|
* reproduce the paragraph faithfully (the `<a:r>`-only run accessors
|
|
4312
|
-
* silently drop fields and breaks).
|
|
5414
|
+
* silently drop fields and breaks). Omit the index to read all paragraphs in
|
|
5415
|
+
* one pass.
|
|
4313
5416
|
*/
|
|
4314
|
-
declare
|
|
5417
|
+
declare function getShapeParagraphElements(shape: SlideShapeData): ReadonlyArray<ReadonlyArray<ShapeParagraphElement>>;
|
|
5418
|
+
declare function getShapeParagraphElements(shape: SlideShapeData, paragraphIndex: number): ReadonlyArray<ShapeParagraphElement>;
|
|
4315
5419
|
/**
|
|
4316
5420
|
* Reads the literal format of a paragraph's end mark (`<a:endParaRPr>`), or
|
|
4317
5421
|
* `null` when the paragraph carries none. It is the only format a paragraph
|
|
@@ -4374,7 +5478,7 @@ declare const getShapeRunClickAction: (shape: SlideShapeData, paragraphIndex: nu
|
|
|
4374
5478
|
* Sets the horizontal alignment of a single paragraph. Same token set
|
|
4375
5479
|
* as `setShapeAlignment`. Other paragraphs are untouched.
|
|
4376
5480
|
*/
|
|
4377
|
-
declare const setParagraphAlignment: (shape: SlideShapeData, paragraphIndex: number, align: ParagraphAlignment) => void;
|
|
5481
|
+
declare const setParagraphAlignment: (shape: SlideShapeData | TableCellData, paragraphIndex: number, align: ParagraphAlignment) => void;
|
|
4378
5482
|
/**
|
|
4379
5483
|
* Sets the paragraph's nesting level (`<a:pPr lvl="N"/>`). Levels are
|
|
4380
5484
|
* 0-indexed; PowerPoint accepts 0 through 8. Pass `0` to clear an
|
|
@@ -4382,13 +5486,22 @@ declare const setParagraphAlignment: (shape: SlideShapeData, paragraphIndex: num
|
|
|
4382
5486
|
* Indents matching the previous level's default bullet pair follow the level;
|
|
4383
5487
|
* other indent values are preserved.
|
|
4384
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
|
+
*
|
|
4385
5493
|
* Used in tandem with bullets to author nested lists:
|
|
4386
5494
|
*
|
|
4387
5495
|
* setShapeText(shape, 'Item 1\nNested\nItem 2');
|
|
4388
5496
|
* setShapeBulletStyle(shape, 'bullet');
|
|
4389
5497
|
* setParagraphLevel(shape, 1, 1); // indent the second line
|
|
4390
5498
|
*/
|
|
4391
|
-
declare const setParagraphLevel: (shape: SlideShapeData
|
|
5499
|
+
declare const setParagraphLevel: (shape: SlideShapeData | TableCellData, paragraphIndex: number | {
|
|
5500
|
+
start: number;
|
|
5501
|
+
end: number;
|
|
5502
|
+
}, level: number | {
|
|
5503
|
+
offset: number;
|
|
5504
|
+
}) => void;
|
|
4392
5505
|
/**
|
|
4393
5506
|
* Reads the paragraph's own `algn` as its spec token (`l`, `ctr`, `r`,
|
|
4394
5507
|
* `just`, `dist`, `justLow`, `thaiDist`) — so `setParagraphAlignment(…,
|
|
@@ -4397,13 +5510,17 @@ declare const setParagraphLevel: (shape: SlideShapeData, paragraphIndex: number,
|
|
|
4397
5510
|
* valid token. For the inherited value under a plain-English name, use
|
|
4398
5511
|
* `getParagraphPropertiesEffective`.
|
|
4399
5512
|
*/
|
|
4400
|
-
declare const getParagraphAlignment: (shape: SlideShapeData, paragraphIndex: number) => ParagraphAlignmentToken | null;
|
|
5513
|
+
declare const getParagraphAlignment: (shape: SlideShapeData | TableCellData, paragraphIndex: number) => ParagraphAlignmentToken | null;
|
|
4401
5514
|
/**
|
|
4402
5515
|
* Reads the paragraph's nesting level (`lvl` attribute), or `0` when
|
|
4403
|
-
* absent — PowerPoint's default.
|
|
4404
|
-
* 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.
|
|
4405
5518
|
*/
|
|
4406
|
-
declare
|
|
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[];
|
|
4407
5524
|
/**
|
|
4408
5525
|
* Sets the spacing before and/or after a paragraph, in points (where
|
|
4409
5526
|
* a "point" is 1/72 inch). PowerPoint stores these as hundredths of a
|
|
@@ -4415,7 +5532,7 @@ declare const getParagraphLevel: (shape: SlideShapeData, paragraphIndex: number)
|
|
|
4415
5532
|
* Omitting a side keeps the existing value (or layout default).
|
|
4416
5533
|
* Passing a side as `null` removes that spacing element.
|
|
4417
5534
|
*/
|
|
4418
|
-
declare const setParagraphSpacing: (shape: SlideShapeData, paragraphIndex: number, opts: {
|
|
5535
|
+
declare const setParagraphSpacing: (shape: SlideShapeData | TableCellData, paragraphIndex: number, opts: {
|
|
4419
5536
|
beforePts?: number | null;
|
|
4420
5537
|
afterPts?: number | null;
|
|
4421
5538
|
}) => void;
|
|
@@ -4425,7 +5542,7 @@ declare const setParagraphSpacing: (shape: SlideShapeData, paragraphIndex: numbe
|
|
|
4425
5542
|
* is present or when the inner element isn't `<a:spcPts>` (percentage
|
|
4426
5543
|
* spacing is reported as `null` for now).
|
|
4427
5544
|
*/
|
|
4428
|
-
declare const getParagraphSpacing: (shape: SlideShapeData, paragraphIndex: number) => {
|
|
5545
|
+
declare const getParagraphSpacing: (shape: SlideShapeData | TableCellData, paragraphIndex: number) => {
|
|
4429
5546
|
readonly beforePts: number | null;
|
|
4430
5547
|
readonly afterPts: number | null;
|
|
4431
5548
|
};
|
|
@@ -4438,11 +5555,22 @@ declare const getParagraphSpacing: (shape: SlideShapeData, paragraphIndex: numbe
|
|
|
4438
5555
|
* Returns `null` for sides the paragraph doesn't set (those inherit
|
|
4439
5556
|
* from the layout / master).
|
|
4440
5557
|
*/
|
|
4441
|
-
declare const getParagraphIndent: (shape: SlideShapeData, paragraphIndex: number) => {
|
|
5558
|
+
declare const getParagraphIndent: (shape: SlideShapeData | TableCellData, paragraphIndex: number) => {
|
|
4442
5559
|
leftEmu: number | null;
|
|
4443
5560
|
rightEmu: number | null;
|
|
4444
5561
|
firstLineEmu: number | null;
|
|
4445
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;
|
|
4446
5574
|
/**
|
|
4447
5575
|
* Reads the paragraph's `<a:lnSpc>` line spacing. PowerPoint stores
|
|
4448
5576
|
* line spacing two ways:
|
|
@@ -4456,7 +5584,7 @@ declare const getParagraphIndent: (shape: SlideShapeData, paragraphIndex: number
|
|
|
4456
5584
|
* Returns `null` when no `<a:lnSpc>` is present (the paragraph
|
|
4457
5585
|
* inherits line spacing from the layout / master).
|
|
4458
5586
|
*/
|
|
4459
|
-
declare const getParagraphLineSpacing: (shape: SlideShapeData, paragraphIndex: number) => {
|
|
5587
|
+
declare const getParagraphLineSpacing: (shape: SlideShapeData | TableCellData, paragraphIndex: number) => {
|
|
4460
5588
|
readonly kind: "pct";
|
|
4461
5589
|
readonly value: number;
|
|
4462
5590
|
} | {
|
|
@@ -4474,7 +5602,7 @@ declare const getParagraphLineSpacing: (shape: SlideShapeData, paragraphIndex: n
|
|
|
4474
5602
|
* Pass `null` to clear the override (the paragraph then inherits line
|
|
4475
5603
|
* spacing from the layout / master).
|
|
4476
5604
|
*/
|
|
4477
|
-
declare const setParagraphLineSpacing: (shape: SlideShapeData, paragraphIndex: number, spacing: {
|
|
5605
|
+
declare const setParagraphLineSpacing: (shape: SlideShapeData | TableCellData, paragraphIndex: number, spacing: {
|
|
4478
5606
|
readonly kind: "pct";
|
|
4479
5607
|
readonly value: number;
|
|
4480
5608
|
} | {
|
|
@@ -4486,7 +5614,7 @@ declare const setParagraphLineSpacing: (shape: SlideShapeData, paragraphIndex: n
|
|
|
4486
5614
|
* no `<a:buChar>` / `<a:buAutoNum>` / `<a:buNone>` is present (the
|
|
4487
5615
|
* paragraph inherits its bullet from the layout / master).
|
|
4488
5616
|
*/
|
|
4489
|
-
declare const getParagraphBullet: (shape: SlideShapeData, paragraphIndex: number) => BulletStyle | null;
|
|
5617
|
+
declare const getParagraphBullet: (shape: SlideShapeData | TableCellData, paragraphIndex: number) => BulletStyle | null;
|
|
4490
5618
|
/**
|
|
4491
5619
|
* Returns `true` when the paragraph uses an image as its bullet
|
|
4492
5620
|
* (`<a:pPr><a:buBlip r:embed="…"/>`). Renderers without image
|
|
@@ -4497,7 +5625,7 @@ declare const getParagraphBullet: (shape: SlideShapeData, paragraphIndex: number
|
|
|
4497
5625
|
* inherits from, which can be cumbersome. Knowing that the bullet
|
|
4498
5626
|
* *is* an image is usually enough for the UI to pick a fallback.
|
|
4499
5627
|
*/
|
|
4500
|
-
declare const isParagraphBulletPicture: (shape: SlideShapeData, paragraphIndex: number) => boolean;
|
|
5628
|
+
declare const isParagraphBulletPicture: (shape: SlideShapeData | TableCellData, paragraphIndex: number) => boolean;
|
|
4501
5629
|
/**
|
|
4502
5630
|
* Returns the embedded image bytes backing a paragraph's picture bullet
|
|
4503
5631
|
* (`<a:pPr><a:buBlip><a:blip r:embed="…"/>`), or `null` when the
|
|
@@ -4509,7 +5637,7 @@ declare const isParagraphBulletPicture: (shape: SlideShapeData, paragraphIndex:
|
|
|
4509
5637
|
* layout/master paragraph isn't followed. The returned `Uint8Array` is a
|
|
4510
5638
|
* live view into the package media part; treat it as read-only.
|
|
4511
5639
|
*/
|
|
4512
|
-
declare const getParagraphBulletImageBytes: (shape: SlideShapeData, paragraphIndex: number) => Uint8Array | null;
|
|
5640
|
+
declare const getParagraphBulletImageBytes: (shape: SlideShapeData | TableCellData, paragraphIndex: number) => Uint8Array | null;
|
|
4513
5641
|
/**
|
|
4514
5642
|
* Reads the bullet's per-paragraph color, size, and font overrides —
|
|
4515
5643
|
* `<a:buClr>` (theme-resolved hex), `<a:buSzPct>` / `<a:buSzPts>`
|
|
@@ -4519,7 +5647,7 @@ declare const getParagraphBulletImageBytes: (shape: SlideShapeData, paragraphInd
|
|
|
4519
5647
|
* when the paragraph doesn't override any of them (the bullet inherits
|
|
4520
5648
|
* from the run / layout).
|
|
4521
5649
|
*/
|
|
4522
|
-
declare const getParagraphBulletStyle: (pres: PresentationData, shape: SlideShapeData, paragraphIndex: number) => {
|
|
5650
|
+
declare const getParagraphBulletStyle: (pres: PresentationData, shape: SlideShapeData | TableCellData, paragraphIndex: number) => {
|
|
4523
5651
|
color: string | null;
|
|
4524
5652
|
sizePct: number | null;
|
|
4525
5653
|
sizePts: number | null;
|
|
@@ -4530,111 +5658,27 @@ declare const getParagraphBulletStyle: (pres: PresentationData, shape: SlideShap
|
|
|
4530
5658
|
* as `setShapeBulletStyle` — pass `'bullet'` / `'number'` / `'none'` or an
|
|
4531
5659
|
* object like `{ char: '◆' }` / `{ autoNum: 'romanLcPeriod' }`.
|
|
4532
5660
|
*/
|
|
4533
|
-
declare const setParagraphBullet: (shape: SlideShapeData, paragraphIndex: number, style: BulletStyle) => void;
|
|
5661
|
+
declare const setParagraphBullet: (shape: SlideShapeData | TableCellData, paragraphIndex: number, style: BulletStyle) => void;
|
|
4534
5662
|
/**
|
|
4535
5663
|
* Sets the text of a single run. Existing rPr (font, size, color, ...)
|
|
4536
5664
|
* is preserved — only the visible characters change.
|
|
4537
5665
|
*/
|
|
4538
|
-
declare const setShapeRunText: (shape: SlideShapeData, paragraphIndex: number, runIndex: number, text: string) => void;
|
|
4539
|
-
//#endregion
|
|
4540
|
-
//#region src/api/fn/theme.d.ts
|
|
4541
|
-
/**
|
|
4542
|
-
* The named color scheme on a presentation's theme. Each slot is a
|
|
4543
|
-
* `#RRGGBB` string — `sysClr` slots are flattened to their cached
|
|
4544
|
-
* `lastClr` value.
|
|
4545
|
-
*/
|
|
4546
|
-
interface PresentationTheme {
|
|
4547
|
-
readonly name: string;
|
|
4548
|
-
readonly dark1: string;
|
|
4549
|
-
readonly light1: string;
|
|
4550
|
-
readonly dark2: string;
|
|
4551
|
-
readonly light2: string;
|
|
4552
|
-
readonly accent1: string;
|
|
4553
|
-
readonly accent2: string;
|
|
4554
|
-
readonly accent3: string;
|
|
4555
|
-
readonly accent4: string;
|
|
4556
|
-
readonly accent5: string;
|
|
4557
|
-
readonly accent6: string;
|
|
4558
|
-
readonly hyperlink: string;
|
|
4559
|
-
readonly followedHyperlink: string;
|
|
4560
|
-
}
|
|
4561
|
-
/**
|
|
4562
|
-
* Returns the deck's color scheme as `#RRGGBB` strings, or `null` if
|
|
4563
|
-
* the package carries no theme. Each accent slot maps directly to the
|
|
4564
|
-
* `accent1`–`accent6` chart palette defaults.
|
|
4565
|
-
*
|
|
4566
|
-
* The deck's theme is the one its first slide master references. A
|
|
4567
|
-
* package usually holds more themes than that — notes and handout
|
|
4568
|
-
* masters carry their own, and Google Slides exports name the notes
|
|
4569
|
-
* theme `theme1.xml` ahead of the slide theme `theme2.xml` — so the
|
|
4570
|
-
* slide master relationship decides, not the part name. Multi-master
|
|
4571
|
-
* decks surface the first master's theme only; per-master theme lookup
|
|
4572
|
-
* will land if a concrete user need shows up.
|
|
4573
|
-
*/
|
|
4574
|
-
declare const getPresentationTheme: (pres: PresentationData) => PresentationTheme | null;
|
|
4575
|
-
/**
|
|
4576
|
-
* The theme's font scheme, flattened to the typefaces the runs in a
|
|
4577
|
-
* deck inherit by default. `major*` is the heading font (slide
|
|
4578
|
-
* titles, chart titles); `minor*` is the body font.
|
|
4579
|
-
*
|
|
4580
|
-
* Each field carries the Latin / East-Asian / Complex-Script
|
|
4581
|
-
* typeface name as written on the theme. Empty values are
|
|
4582
|
-
* normalized to `null`.
|
|
4583
|
-
*/
|
|
4584
|
-
interface PresentationFonts {
|
|
4585
|
-
readonly majorLatin: string | null;
|
|
4586
|
-
readonly majorEastAsian: string | null;
|
|
4587
|
-
readonly majorComplexScript: string | null;
|
|
4588
|
-
readonly minorLatin: string | null;
|
|
4589
|
-
readonly minorEastAsian: string | null;
|
|
4590
|
-
readonly minorComplexScript: string | null;
|
|
4591
|
-
}
|
|
4592
|
-
/**
|
|
4593
|
-
* Returns the deck theme's font scheme, or `null` when the package
|
|
4594
|
-
* carries no theme. As with `getPresentationTheme`, the deck theme is
|
|
4595
|
-
* the first slide master's; per-master font lookup will land if needed.
|
|
4596
|
-
*/
|
|
4597
|
-
declare const getPresentationFonts: (pres: PresentationData) => PresentationFonts | null;
|
|
4598
|
-
/**
|
|
4599
|
-
* Overwrites the named slots of the deck theme's color
|
|
4600
|
-
* scheme (`<a:clrScheme>`), leaving every other slot untouched. Slot
|
|
4601
|
-
* values are `#RRGGBB` (or 3-digit `#RGB`) strings; every branded
|
|
4602
|
-
* `srgbClr`/`sysClr` slot is normalized to a plain `<a:srgbClr>` on
|
|
4603
|
-
* write, since a theme slot is never a scheme-color reference.
|
|
4604
|
-
*
|
|
4605
|
-
* As with `getPresentationTheme`, multi-master decks are branded via
|
|
4606
|
-
* their first slide master's theme only.
|
|
4607
|
-
*
|
|
4608
|
-
* Throws if the presentation has no theme part, or if a provided color
|
|
4609
|
-
* isn't a valid `#RRGGBB` string.
|
|
4610
|
-
*/
|
|
4611
|
-
declare const setPresentationTheme: (pres: PresentationData, theme: Partial<Omit<PresentationTheme, "name">> & {
|
|
4612
|
-
name?: string;
|
|
4613
|
-
}) => void;
|
|
4614
|
-
/**
|
|
4615
|
-
* Typeface overrides for {@link setPresentationFonts}. Unlike
|
|
4616
|
-
* `PresentationFonts` (the read side, where an empty typeface value
|
|
4617
|
-
* flattens to `null`), every field here is a plain string — the
|
|
4618
|
-
* underlying `<a:latin>` / `<a:ea>` / `<a:cs>` elements are mandatory on
|
|
4619
|
-
* a valid theme, so there's no "clear this typeface" operation.
|
|
4620
|
-
*/
|
|
4621
|
-
interface PresentationFontsInput {
|
|
4622
|
-
readonly majorLatin?: string;
|
|
4623
|
-
readonly majorEastAsian?: string;
|
|
4624
|
-
readonly majorComplexScript?: string;
|
|
4625
|
-
readonly minorLatin?: string;
|
|
4626
|
-
readonly minorEastAsian?: string;
|
|
4627
|
-
readonly minorComplexScript?: string;
|
|
4628
|
-
}
|
|
5666
|
+
declare const setShapeRunText: (shape: SlideShapeData, paragraphIndex: number, runIndex: number, text: string) => void;
|
|
4629
5667
|
/**
|
|
4630
|
-
*
|
|
4631
|
-
*
|
|
4632
|
-
* with `setPresentationTheme`, only the first slide master's theme is
|
|
4633
|
-
* branded.
|
|
4634
|
-
*
|
|
4635
|
-
* 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.
|
|
4636
5670
|
*/
|
|
4637
|
-
declare const
|
|
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;
|
|
4638
5682
|
//#endregion
|
|
4639
5683
|
//#region src/api/fn/shape-color.d.ts
|
|
4640
5684
|
/**
|
|
@@ -4673,123 +5717,40 @@ declare const resolveDrawingColorOpacity: (colorEl: XmlElement) => number | null
|
|
|
4673
5717
|
*/
|
|
4674
5718
|
declare const getShapeRunFormat: (shape: SlideShapeData, paragraphIndex: number, runIndex: number) => ReadTextFormat | null;
|
|
4675
5719
|
//#endregion
|
|
4676
|
-
//#region src/api/fn/shape-paragraph.d.ts
|
|
4677
|
-
declare const getShapeRunFormatEffective: (pres: PresentationData, shape: SlideShapeData, paragraphIndex: number, runIndex: number) => ReadTextFormat;
|
|
4678
|
-
/** Effective paragraph properties returned by `getParagraphPropertiesEffective`. */
|
|
4679
|
-
interface ParagraphProperties {
|
|
4680
|
-
/** Horizontal alignment per `ParagraphAlignment`. */
|
|
4681
|
-
align: ParagraphAlignment | null;
|
|
4682
|
-
/** Outline level (0..8). 0 = top-level paragraph. */
|
|
4683
|
-
level: number;
|
|
4684
|
-
/** Left indent in EMU. */
|
|
4685
|
-
marL: number | null;
|
|
4686
|
-
/** Right indent in EMU. */
|
|
4687
|
-
marR: number | null;
|
|
4688
|
-
/** First-line indent in EMU; negative for hanging indents. */
|
|
4689
|
-
indent: number | null;
|
|
4690
|
-
/** Line spacing — either a percent multiplier or a fixed point value. */
|
|
4691
|
-
lineSpacing: {
|
|
4692
|
-
readonly kind: 'pct';
|
|
4693
|
-
readonly value: number;
|
|
4694
|
-
} | {
|
|
4695
|
-
readonly kind: 'pts';
|
|
4696
|
-
readonly value: number;
|
|
4697
|
-
} | null;
|
|
4698
|
-
/** Space before the paragraph in points. */
|
|
4699
|
-
spcBefPts: number | null;
|
|
4700
|
-
/** Space after the paragraph in points. */
|
|
4701
|
-
spcAftPts: number | null;
|
|
4702
|
-
/** Right-to-left paragraph (`<a:pPr rtl="1"/>`). */
|
|
4703
|
-
rtl: boolean | null;
|
|
4704
|
-
/**
|
|
4705
|
-
* Bullet resolved through the cascade (`<a:buChar>` / `<a:buAutoNum>` /
|
|
4706
|
-
* `<a:buNone>`). Master `bodyStyle` levels author the PowerPoint default
|
|
4707
|
-
* "•", so body placeholders get their bullet from here even when no
|
|
4708
|
-
* slide-level `<a:pPr>` carries one.
|
|
4709
|
-
*/
|
|
4710
|
-
bullet: BulletStyle | null;
|
|
4711
|
-
}
|
|
4712
|
-
/**
|
|
4713
|
-
* Resolves a paragraph's effective properties by walking the same
|
|
4714
|
-
* inheritance chain `getShapeRunFormatEffective` uses, but for the
|
|
4715
|
-
* paragraph-level surface:
|
|
4716
|
-
*
|
|
4717
|
-
* - alignment, indent (left / right / first-line), line spacing,
|
|
4718
|
-
* paragraph spacing (before / after), rtl.
|
|
4719
|
-
*
|
|
4720
|
-
* Each property is resolved independently; the innermost layer that
|
|
4721
|
-
* sets it wins. Fields the cascade can't resolve come through as `null`
|
|
4722
|
-
* so renderers know to fall back to their own defaults.
|
|
4723
|
-
*
|
|
4724
|
-
* Companion to `getParagraphAlignment` / `getParagraphLineSpacing` /
|
|
4725
|
-
* `getParagraphIndent` / `getParagraphSpacing`, which only surface the
|
|
4726
|
-
* literal `<a:pPr>` and skip the layout / master cascade.
|
|
4727
|
-
*/
|
|
4728
|
-
declare const getParagraphPropertiesEffective: (pres: PresentationData, shape: SlideShapeData, paragraphIndex: number) => ParagraphProperties;
|
|
4729
|
-
/**
|
|
4730
|
-
* Applies `format` to a single run. Run-property attributes not
|
|
4731
|
-
* addressed by `format` are preserved — partial updates compose.
|
|
4732
|
-
*
|
|
4733
|
-
* Example: bold the second word of the first paragraph:
|
|
4734
|
-
*
|
|
4735
|
-
* setShapeRunFormat(shape, 0, 1, { bold: true, color: '#FF0000' });
|
|
4736
|
-
*/
|
|
4737
|
-
declare const setShapeRunFormat: (shape: SlideShapeData, paragraphIndex: number, runIndex: number, format: TextFormat) => void;
|
|
4738
|
-
/**
|
|
4739
|
-
* Reads the external URL the first run in the shape's text-body links
|
|
4740
|
-
* to (set via `setShapeHyperlink`). Returns `null` when no run carries
|
|
4741
|
-
* an `<a:hlinkClick r:id=…/>` or the rId resolves to a non-hyperlink
|
|
4742
|
-
* target.
|
|
4743
|
-
*/
|
|
4744
|
-
declare const getShapeHyperlink: (shape: SlideShapeData) => string | null;
|
|
4745
|
-
/**
|
|
4746
|
-
* Sets an external hyperlink on every run in the shape's text. Allocates
|
|
4747
|
-
* (or reuses) a `hyperlink` relationship on the slide's `.rels`. Pass
|
|
4748
|
-
* `null` to clear.
|
|
4749
|
-
*/
|
|
4750
|
-
declare const setShapeHyperlink: (shape: SlideShapeData, url: string | null, tooltip?: string) => void;
|
|
4751
|
-
//#endregion
|
|
4752
5720
|
//#region src/api/fn/shape-removal-zorder.d.ts
|
|
4753
5721
|
/**
|
|
4754
|
-
* Copies a shape into `targetSlide
|
|
4755
|
-
*
|
|
4756
|
-
*
|
|
4757
|
-
*
|
|
4758
|
-
*
|
|
4759
|
-
*
|
|
4760
|
-
*
|
|
4761
|
-
* (`sourceShape`'s slide and `targetSlide` must share the same
|
|
4762
|
-
* `OpcPackage`). Cross-package copy is `importSlide` territory.
|
|
4763
|
-
*
|
|
4764
|
-
* Returns the new `SlideShapeData` on `targetSlide`.
|
|
4765
|
-
*/
|
|
4766
|
-
declare const copyShape: (targetSlide: SlideData, sourceShape: SlideShapeData) => SlideShapeData;
|
|
4767
|
-
/** Move `shape` to the end of its spTree (render in front of all others). */
|
|
4768
|
-
declare const bringShapeToFront: (shape: SlideShapeData) => void;
|
|
4769
|
-
/**
|
|
4770
|
-
* Move `shape` behind every other shape on the slide. The
|
|
4771
|
-
* `<p:nvGrpSpPr>` / `<p:grpSpPr>` preface — required by the schema —
|
|
4772
|
-
* 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.
|
|
4773
5729
|
*/
|
|
4774
|
-
declare const
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
/**
|
|
4778
|
-
|
|
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
|
|
4779
5741
|
* (`<p:sp>` / `<p:pic>` / `<p:cxnSp>` / `<p:graphicFrame>` / `<p:grpSp>`),
|
|
4780
5742
|
* skipping the required `<p:nvGrpSpPr>` / `<p:grpSpPr>` preface.
|
|
4781
5743
|
* Higher numbers render in front.
|
|
4782
5744
|
*/
|
|
4783
5745
|
declare const getShapeZIndex: (shape: SlideShapeData) => number;
|
|
4784
5746
|
/**
|
|
4785
|
-
* Moves
|
|
4786
|
-
*
|
|
4787
|
-
*
|
|
4788
|
-
* 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.
|
|
4789
5750
|
*/
|
|
4790
|
-
declare const setShapeZIndex: (shape: SlideShapeData, toIndex: number) => void;
|
|
4791
|
-
/**
|
|
4792
|
-
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;
|
|
4793
5754
|
/**
|
|
4794
5755
|
* Removes the shape from its slide's shape tree. Subsequent property
|
|
4795
5756
|
* reads on this handle reflect the stale snapshot — discard it after.
|
|
@@ -4903,6 +5864,38 @@ declare const addSlideImage: (slide: SlideData, bytes: Uint8Array, opts: {
|
|
|
4903
5864
|
fit?: ImageFit;
|
|
4904
5865
|
}) => SlideShapeData;
|
|
4905
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
|
|
4906
5899
|
//#region src/api/fn/layouts.d.ts
|
|
4907
5900
|
/** PowerPoint's user-visible layout name. */
|
|
4908
5901
|
declare const getSlideLayoutName: (layout: SlideLayoutData) => string;
|
|
@@ -5379,11 +6372,24 @@ declare const getAllShapes: (pres: PresentationData) => ReadonlyArray<AllShapesE
|
|
|
5379
6372
|
* but keeps them in the editing surface.
|
|
5380
6373
|
*/
|
|
5381
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;
|
|
5382
6385
|
/**
|
|
5383
|
-
* Returns `true` when the slide
|
|
5384
|
-
*
|
|
5385
|
-
*
|
|
5386
|
-
*
|
|
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.
|
|
5387
6393
|
*/
|
|
5388
6394
|
declare const slideHasAnimations: (slide: SlideData) => boolean;
|
|
5389
6395
|
/**
|
|
@@ -5400,7 +6406,10 @@ declare const replaceTokensInPresentation: (pres: PresentationData, tokens: Reco
|
|
|
5400
6406
|
/**
|
|
5401
6407
|
* Replaces every occurrence of `from` in every slide's text with `to`.
|
|
5402
6408
|
* `from` may be a string (treated as a literal) or a `RegExp`. Returns
|
|
5403
|
-
* 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).
|
|
5404
6413
|
*
|
|
5405
6414
|
* Use this for the broad "rename product X to Y" pattern; for
|
|
5406
6415
|
* `{{token}}` style substitutions, prefer
|
|
@@ -5409,20 +6418,29 @@ declare const replaceTokensInPresentation: (pres: PresentationData, tokens: Reco
|
|
|
5409
6418
|
declare const replaceTextInPresentation: (pres: PresentationData, from: string | RegExp, to: string) => number;
|
|
5410
6419
|
/**
|
|
5411
6420
|
* Replaces every occurrence of `from` in the slide's text with `to`.
|
|
5412
|
-
*
|
|
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.
|
|
5413
6425
|
*/
|
|
5414
6426
|
declare const replaceTextInSlide: (slide: SlideData, from: string | RegExp, to: string) => number;
|
|
5415
6427
|
//#endregion
|
|
5416
|
-
//#region src/api/fn/
|
|
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[];
|
|
5417
6437
|
/**
|
|
5418
|
-
*
|
|
5419
|
-
*
|
|
5420
|
-
* Allocates a fresh part name, sldId, and rId; clones layout
|
|
5421
|
-
* placeholders into the slide; writes `[Content_Types].xml`, the
|
|
5422
|
-
* slide's `.rels`, presentation's `.rels`, and `<p:sldIdLst>`. The
|
|
5423
|
-
* deck-cache on `pres` is invalidated so the next `getSlides` call
|
|
5424
|
-
* 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.
|
|
5425
6440
|
*/
|
|
6441
|
+
declare function setCustomShows(pres: PresentationData, shows: readonly CustomShow[]): void;
|
|
6442
|
+
//#endregion
|
|
6443
|
+
//#region src/api/fn/slide-deck.d.ts
|
|
5426
6444
|
/**
|
|
5427
6445
|
* Convenience over `addSlide` that picks a layout automatically:
|
|
5428
6446
|
*
|
|
@@ -5461,12 +6479,23 @@ declare const addSectionHeaderSlide: (pres: PresentationData, title: string) =>
|
|
|
5461
6479
|
* Throws when the package carries no layouts at all.
|
|
5462
6480
|
*/
|
|
5463
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
|
+
*/
|
|
5464
6491
|
declare const addSlide: (pres: PresentationData, options: {
|
|
5465
6492
|
layout: SlideLayoutData;
|
|
5466
6493
|
}) => SlideData;
|
|
5467
6494
|
/**
|
|
5468
6495
|
* Removes the given slide from the deck. Removes the `<p:sldId>`, the
|
|
5469
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.
|
|
5470
6499
|
*
|
|
5471
6500
|
* Media parts are intentionally NOT cleaned up — they may be shared
|
|
5472
6501
|
* with other slides. The freed `sldId` is NOT reused on subsequent
|
|
@@ -5510,39 +6539,35 @@ declare const moveSlide: (pres: PresentationData, slide: SlideData, toIndex: num
|
|
|
5510
6539
|
*/
|
|
5511
6540
|
declare const duplicateSlide: (pres: PresentationData, slide: SlideData) => SlideData;
|
|
5512
6541
|
/**
|
|
5513
|
-
*
|
|
5514
|
-
*
|
|
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.
|
|
5515
6546
|
*/
|
|
5516
|
-
declare
|
|
6547
|
+
declare function addSlideAt(pres: PresentationData, atIndex: number, options: ReadonlyArray<{
|
|
5517
6548
|
layout: SlideLayoutData;
|
|
5518
|
-
})
|
|
6549
|
+
}>): SlideData[];
|
|
6550
|
+
declare function addSlideAt(pres: PresentationData, atIndex: number, options: {
|
|
6551
|
+
layout: SlideLayoutData;
|
|
6552
|
+
}): SlideData;
|
|
5519
6553
|
/**
|
|
5520
6554
|
* Convenience over `duplicateSlide` + `moveSlide`. Duplicates `slide`
|
|
5521
6555
|
* and inserts the duplicate at `atIndex` instead of at the end.
|
|
5522
6556
|
*/
|
|
5523
6557
|
declare const duplicateSlideAt: (pres: PresentationData, atIndex: number, slide: SlideData) => SlideData;
|
|
5524
6558
|
/**
|
|
5525
|
-
* Imports a slide
|
|
5526
|
-
* slide
|
|
5527
|
-
* the
|
|
5528
|
-
*
|
|
5529
|
-
*
|
|
5530
|
-
*
|
|
5531
|
-
*
|
|
5532
|
-
*
|
|
5533
|
-
* - Only image / video / audio rels are copied across. Other rels (charts,
|
|
5534
|
-
* embedded workbooks, oleObjects, comments) are dropped from the imported
|
|
5535
|
-
* slide. A diagnostic message is appended for each dropped rel.
|
|
5536
|
-
* - Hyperlinks (external URLs) are preserved.
|
|
5537
|
-
* - Slide → notesSlide is dropped (notes don't follow imports).
|
|
5538
|
-
*
|
|
5539
|
-
* 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.
|
|
5540
6566
|
*/
|
|
5541
|
-
declare const importSlide: (targetPres: PresentationData, sourceSlide: SlideData, targetLayout
|
|
6567
|
+
declare const importSlide: (targetPres: PresentationData, sourceSlide: SlideData, targetLayout?: SlideLayoutData) => SlideData;
|
|
5542
6568
|
/**
|
|
5543
6569
|
* Appends every slide from `sourcePres` into `targetPres`, in source
|
|
5544
|
-
* order. Built on top of `importSlide`:
|
|
5545
|
-
* 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
|
|
5546
6571
|
* layout is rebound to `targetLayout` on the target side.
|
|
5547
6572
|
*
|
|
5548
6573
|
* `targetLayout` can be a single layout used for every imported
|
|
@@ -5553,38 +6578,177 @@ declare const importSlide: (targetPres: PresentationData, sourceSlide: SlideData
|
|
|
5553
6578
|
*/
|
|
5554
6579
|
declare const mergePresentations: (targetPres: PresentationData, sourcePres: PresentationData, targetLayout: SlideLayoutData | ((sourceSlide: SlideData, index: number) => SlideLayoutData)) => ReadonlyArray<SlideData>;
|
|
5555
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
|
|
5556
6718
|
//#region src/api/fn/shape-grouping.d.ts
|
|
5557
6719
|
/**
|
|
5558
|
-
* Groups two or more
|
|
6720
|
+
* Groups two or more sibling shapes into a single `<p:grpSp>`,
|
|
5559
6721
|
* returning the new group as a `SlideShapeData`. The group's
|
|
5560
|
-
*
|
|
6722
|
+
* parent-space bounds are the union of its members' bounds; the members
|
|
5561
6723
|
* keep their own relative position/size (nothing is rescaled). The
|
|
5562
6724
|
* target slide is taken from the first shape — every shape must belong
|
|
5563
6725
|
* to the same slide.
|
|
5564
6726
|
*
|
|
5565
6727
|
* Every shape must:
|
|
5566
6728
|
* - belong to the same slide as the others,
|
|
5567
|
-
* -
|
|
5568
|
-
* inside another group — ungroup first, then re-group),
|
|
6729
|
+
* - share the same immediate parent (the slide or a group),
|
|
5569
6730
|
* - have an explicit `<a:xfrm>` (placeholders that inherit position
|
|
5570
6731
|
* from the layout have none and can't be grouped),
|
|
5571
6732
|
* - appear at most once in `shapes` (grouping the same shape twice
|
|
5572
6733
|
* would duplicate its id).
|
|
5573
6734
|
*
|
|
5574
6735
|
* The group replaces its members at the position of the earliest one in
|
|
5575
|
-
* z-order,
|
|
5576
|
-
*
|
|
6736
|
+
* z-order, preserving member order regardless of selection order. Members
|
|
6737
|
+
* become one contiguous block, which can change interleaving with unselected shapes.
|
|
5577
6738
|
*/
|
|
5578
6739
|
declare const groupShapes: (shapes: ReadonlyArray<SlideShapeData>, opts?: {
|
|
5579
6740
|
name?: string;
|
|
5580
6741
|
}) => SlideShapeData;
|
|
5581
6742
|
/**
|
|
5582
6743
|
* Reverses `groupShapes`: removes the `<p:grpSp>` and re-inserts its
|
|
5583
|
-
* immediate children
|
|
6744
|
+
* immediate children into its parent at the group's former position,
|
|
5584
6745
|
* rescaling each child's own transform so it keeps its on-slide position
|
|
5585
6746
|
* and size (matters when the group was moved/resized after creation, so
|
|
5586
6747
|
* its `off`/`ext` diverged from its `chOff`/`chExt`). Returns the
|
|
5587
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.
|
|
5588
6752
|
*
|
|
5589
6753
|
* Throws if `group` isn't a group shape, or its `<p:grpSpPr>` carries no
|
|
5590
6754
|
* `<a:xfrm>` (malformed — every authored group has one).
|
|
@@ -5648,6 +6812,162 @@ declare const addSlideMedia: (slide: SlideData, opts: SlideMediaOptions) => Slid
|
|
|
5648
6812
|
declare const getShapeMedia: (shape: SlideShapeData) => ShapeMedia | null;
|
|
5649
6813
|
/** Every shape on the slide that `getShapeMedia` reports a clip for. */
|
|
5650
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
|
+
});
|
|
5651
6971
|
//#endregion
|
|
5652
6972
|
//#region src/api/fn/slide-background.d.ts
|
|
5653
6973
|
/**
|
|
@@ -5659,6 +6979,7 @@ declare const findShapesWithMedia: (slide: SlideData) => ReadonlyArray<SlideShap
|
|
|
5659
6979
|
type SlideBackground = {
|
|
5660
6980
|
readonly kind: 'solid';
|
|
5661
6981
|
readonly color: string;
|
|
6982
|
+
readonly opacity?: number;
|
|
5662
6983
|
} | {
|
|
5663
6984
|
readonly kind: 'gradient';
|
|
5664
6985
|
} | {
|
|
@@ -5745,7 +7066,9 @@ declare const getSlideMasterShapes: (pres: PresentationData, layout: SlideLayout
|
|
|
5745
7066
|
* `<p:bgPr><a:pattFill>`. Same shape as `getSlideBackgroundPatternFill`
|
|
5746
7067
|
* for slides.
|
|
5747
7068
|
*/
|
|
5748
|
-
declare const getSlideLayoutBackgroundPatternFill: (pres: PresentationData, layout: SlideLayoutData
|
|
7069
|
+
declare const getSlideLayoutBackgroundPatternFill: (pres: PresentationData, layout: SlideLayoutData, options?: {
|
|
7070
|
+
readonly preserveTheme?: boolean;
|
|
7071
|
+
}) => {
|
|
5749
7072
|
preset: string;
|
|
5750
7073
|
foreground: string;
|
|
5751
7074
|
background: string;
|
|
@@ -5754,15 +7077,18 @@ declare const getSlideLayoutBackgroundPatternFill: (pres: PresentationData, layo
|
|
|
5754
7077
|
* Reads the slide master's pattern background. Companion to
|
|
5755
7078
|
* `getSlideLayoutBackgroundPatternFill`.
|
|
5756
7079
|
*/
|
|
5757
|
-
declare const getSlideMasterBackgroundPatternFill: (pres: PresentationData, layout: SlideLayoutData
|
|
7080
|
+
declare const getSlideMasterBackgroundPatternFill: (pres: PresentationData, layout: SlideLayoutData, options?: {
|
|
7081
|
+
readonly preserveTheme?: boolean;
|
|
7082
|
+
}) => {
|
|
5758
7083
|
preset: string;
|
|
5759
7084
|
foreground: string;
|
|
5760
7085
|
background: string;
|
|
5761
7086
|
} | null;
|
|
5762
7087
|
/**
|
|
5763
|
-
* Reads the slide layout's gradient background
|
|
5764
|
-
* `<p:
|
|
5765
|
-
* 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.
|
|
5766
7092
|
*/
|
|
5767
7093
|
declare const getSlideLayoutBackgroundGradientFill: (layout: SlideLayoutData) => ReadGradientFill | null;
|
|
5768
7094
|
/**
|
|
@@ -5771,6 +7097,7 @@ declare const getSlideLayoutBackgroundGradientFill: (layout: SlideLayoutData) =>
|
|
|
5771
7097
|
* background kind. Useful for closing the bg cascade — slides that
|
|
5772
7098
|
* report `'gradient'` inherit can now get the master's gradient
|
|
5773
7099
|
* projected via `gradientDef`.
|
|
7100
|
+
* Stop `resolvedColor` values include the presentation theme and color transforms.
|
|
5774
7101
|
*/
|
|
5775
7102
|
declare const getSlideMasterBackgroundGradientFill: (pres: PresentationData, layout: SlideLayoutData) => ReadGradientFill | null;
|
|
5776
7103
|
/**
|
|
@@ -5787,9 +7114,12 @@ declare const getSlideMasterBackground: (pres: PresentationData, layout: SlideLa
|
|
|
5787
7114
|
declare const getSlideLayoutBackground: (layout: SlideLayoutData) => SlideBackground;
|
|
5788
7115
|
/**
|
|
5789
7116
|
* Returns the gradient stops + path when the slide carries a
|
|
5790
|
-
* `<p:bgPr><a:gradFill>`
|
|
7117
|
+
* literal `<p:bgPr><a:gradFill>` or theme-referenced `<p:bgRef>` gradient.
|
|
7118
|
+
* Returns `null` for any other
|
|
5791
7119
|
* background kind. Shape identical to `getShapeGradientFill` so renderers
|
|
5792
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.
|
|
5793
7123
|
*/
|
|
5794
7124
|
declare const getSlideBackgroundGradientFill: (slide: SlideData) => ReadGradientFill | null;
|
|
5795
7125
|
/**
|
|
@@ -5797,7 +7127,9 @@ declare const getSlideBackgroundGradientFill: (slide: SlideData) => ReadGradient
|
|
|
5797
7127
|
* carries a `<p:bgPr><a:pattFill>` background. Returns `null` for any
|
|
5798
7128
|
* other background kind. Shape mirrors `getShapePatternFill`.
|
|
5799
7129
|
*/
|
|
5800
|
-
declare const getSlideBackgroundPatternFill: (pres: PresentationData, slide: SlideData
|
|
7130
|
+
declare const getSlideBackgroundPatternFill: (pres: PresentationData, slide: SlideData, options?: {
|
|
7131
|
+
readonly preserveTheme?: boolean;
|
|
7132
|
+
}) => {
|
|
5801
7133
|
preset: string;
|
|
5802
7134
|
foreground: string;
|
|
5803
7135
|
background: string;
|
|
@@ -5824,8 +7156,58 @@ declare const getSlideLayoutBackgroundImageBytes: (pres: PresentationData, layou
|
|
|
5824
7156
|
* master rel). Companion to `getSlideLayoutBackgroundImageBytes`.
|
|
5825
7157
|
*/
|
|
5826
7158
|
declare const getSlideMasterBackgroundImageBytes: (pres: PresentationData, layout: SlideLayoutData) => Uint8Array | null;
|
|
5827
|
-
/** Sets a solid
|
|
5828
|
-
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;
|
|
5829
7211
|
/**
|
|
5830
7212
|
* Sets a picture as the slide's background. Embeds `bytes` as a new
|
|
5831
7213
|
* media part, wires a slide → image rel, and replaces any prior
|
|
@@ -5841,10 +7223,34 @@ declare const setSlideBackgroundImage: (slide: SlideData, bytes: Uint8Array, opt
|
|
|
5841
7223
|
/** Clears any explicit slide background, restoring layout inheritance. */
|
|
5842
7224
|
declare const clearSlideBackground: (slide: SlideData) => void;
|
|
5843
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
|
|
5844
7249
|
//#region src/api/fn/color-map.d.ts
|
|
5845
7250
|
/**
|
|
5846
7251
|
* The slide's effective color map: the master's `<p:clrMap>`, overlaid by a
|
|
5847
|
-
*
|
|
7252
|
+
* layout or slide `<p:clrMapOvr><a:overrideClrMapping>` when present. An explicit
|
|
7253
|
+
* slide `masterClrMapping` bypasses the layout override. Falls back to
|
|
5848
7254
|
* the standard map for decks that omit it.
|
|
5849
7255
|
*
|
|
5850
7256
|
* Pass the result to color resolution / renderers so `schemeClr` tokens map to
|
|
@@ -5872,17 +7278,84 @@ declare const resolveDeckBodyTextColor: (slide: SlideData) => string | null;
|
|
|
5872
7278
|
* `setSlideTransition` accepts.
|
|
5873
7279
|
*/
|
|
5874
7280
|
declare const getSlideTransition: (slide: SlideData) => SlideTransition | null;
|
|
5875
|
-
/**
|
|
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
|
+
*/
|
|
5876
7286
|
declare const setSlideTransition: (slide: SlideData, options: TransitionOptions) => void;
|
|
5877
|
-
/** Removes any existing transition on the slide. */
|
|
7287
|
+
/** Removes any existing transition on the slide, including its sound. */
|
|
5878
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;
|
|
5879
7318
|
//#endregion
|
|
5880
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;
|
|
5881
7329
|
/**
|
|
5882
7330
|
* Returns the slide's speaker notes (`null` if none). Pulls plain text
|
|
5883
7331
|
* from the `body` placeholder; multi-line notes use `\n`.
|
|
5884
7332
|
*/
|
|
5885
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;
|
|
5886
7359
|
/**
|
|
5887
7360
|
* Sets the slide's speaker notes. Creates the `notesSlide` part and
|
|
5888
7361
|
* wires up the rels (slide ↔ notesSlide ↔ notesMaster) on first call;
|
|
@@ -6144,7 +7617,50 @@ declare const getEmptySlides: (pres: PresentationData) => ReadonlyArray<SlideDat
|
|
|
6144
7617
|
* minus the leading newline when there were no notes yet.
|
|
6145
7618
|
*/
|
|
6146
7619
|
declare const appendSlideNotes: (slide: SlideData, text: string) => void;
|
|
6147
|
-
|
|
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;
|
|
6148
7664
|
/**
|
|
6149
7665
|
* Removes the slide's speaker-notes part entirely. Drops the
|
|
6150
7666
|
* `notesSlide` part + its `.rels`, and unwires the slide → notesSlide
|
|
@@ -6175,14 +7691,27 @@ interface SlideSize {
|
|
|
6175
7691
|
}
|
|
6176
7692
|
/** Returns the slide canvas size, or `null` if `presentation.xml` omits it. */
|
|
6177
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;
|
|
6178
7701
|
/**
|
|
6179
7702
|
* Sets the slide canvas size. Creates `<p:sldSz>` when absent, replaces
|
|
6180
|
-
* its attributes when present.
|
|
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.
|
|
6181
7708
|
*
|
|
6182
7709
|
* Schema ordering: `<p:sldSz>` follows `<p:sldIdLst>` per ECMA-376
|
|
6183
7710
|
* §19.2.1.26; we insert at the correct position when bootstrapping.
|
|
6184
7711
|
*/
|
|
6185
|
-
declare const setSlideSize: (pres: PresentationData, opts: SlideSize
|
|
7712
|
+
declare const setSlideSize: (pres: PresentationData, opts: SlideSize, options?: {
|
|
7713
|
+
content?: "keep" | "fit";
|
|
7714
|
+
}) => void;
|
|
6186
7715
|
/** 10in × 7.5in (`screen4x3`). */
|
|
6187
7716
|
declare const SLIDE_SIZE_4_3: SlideSize;
|
|
6188
7717
|
/** 13.333in × 7.5in (`screen16x9`) — Office 2013+ default. */
|
|
@@ -6190,8 +7719,93 @@ declare const SLIDE_SIZE_16_9: SlideSize;
|
|
|
6190
7719
|
/** 13.333in × 8.33in (`screen16x10`). */
|
|
6191
7720
|
declare const SLIDE_SIZE_16_10: SlideSize;
|
|
6192
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
|
|
6193
7807
|
//#region src/api/index.d.ts
|
|
6194
7808
|
declare const VERSION: string;
|
|
6195
7809
|
//#endregion
|
|
6196
|
-
export { SlideBackground as $, getShapeChartSeriesValues as $a, getShapesBounds as $c, TableCellBorders as $i, loadPresentation as $l, addSlideLine as $n, findCommentsBefore as $o, setShapeRunText as $r, getShapeStrokeArrow as $s, getPresentationShapeCountsBySlide as $t, pt as $u, getPresentationHyperlinkCountsBySlide as A, setTableCellAnchor as Aa, getShapeStrokeColorResolved as Ac, isShapeImageGrayscale as Ai, getShapeSize as Al, ExtendedProperties as An, ChartGrouping as Ao, getParagraphBullet as Ar, setShapeBulletStyle as As, addSectionHeaderSlide as At, ReadGradientFill as Au, getSlidesWithNotes as B, setTableStyleFlags as Ba, findShapeInPresentation as Bc, getMediaParts as Bi, pointInShape as Bl, findLayoutsWithPlaceholderType as Bn, ChartUpDownBars as Bo, getShapeParagraphElements as Br, setShapeTextWrap as Bs, reverseSlides as Bt, HexColor as Bu, getAllHyperlinks as C, insertTableRow as Ca, getShapeFillColor as Cc, getShapeImageFillBytes as Ci, getShapeKind as Cl, setSlideHidden as Cn, ChartAxisScaling as Co, PresentationTheme as Cr, getShapeTextAutoFitParams as Cs, addSlideMedia as Ct, LineEndType as Cu, getDistinctHyperlinkUrls as D, removeTableColumn as Da, getShapeStroke as Dc, getShapeImagePartName as Di, getShapePosition as Dl, removeThumbnail as Dn, ChartDateAxis as Do, setPresentationTheme as Dr, getShapeTextMargins as Ds, ungroupShapes as Dt, GradientStop as Du, getAllTables as E, mergeTableCells as Ea, getShapeFillOpacity as Ec, getShapeImageOpacity as Ei, getShapePlaceholderType as El, getThumbnail as En, ChartDataTable as Eo, setPresentationFonts as Er, getShapeTextDirection as Es, groupShapes as Et, GradientFillOptions as Eu, getSlideNotesLength as F, setTableCellText as Fa, getShapeStrokeWidth as Fc, MediaPart as Fi, getSlideMasterUsageCounts as Fl, incrementRevision as Fn, ChartSeries as Fo, getParagraphLevel as Fr, setShapeTextBodyRotationDeg as Fs, duplicateSlideAt as Ft, ParagraphSpec as Fu, removeSlideNotes as G, findChartsBySeriesName as Ga, findShapesByText as Gc, listPackageParts as Gi, setShapeHidden as Gl, getSlideLayoutPartName as Gn, setShapeClickAction as Go, getShapeRunText as Gr, getShapeEffect as Gs, SlideOutlineEntry as Gt, AudioFormat as Gu, getSlidesWithTables as H, SlideChartData as Ha, findShapesByKind as Hc, getPackageSize as Hi, setShapeAltTitle as Hl, findSlideLayoutByPartName as Hn, ReadChartSpec as Ho, getShapeRunCount as Hr, ShapeEffectAny as Hs, swapSlides as Ht, asColor as Hu, getSlidesWithCharts as I, setTableCellTextDirection as Ia, findEmptyPlaceholders as Ic, PackagePartInfo as Ii, getUnusedSlideMasters as Il, setCoreProperties as In, ChartSeriesAxis as Io, getParagraphLineSpacing as Ir, setShapeTextColumns as Is, importSlide as It, RunSpec as Iu, clearSlideTransition as J, getPresentationChartCountsBySlide as Ja, findSlidePlaceholderByIdx as Jc, slidesUsingMediaPart as Ji, getSlideSections as Jl, getSlideLayoutUsageCounts as Jn, addSlideComment as Jo, setParagraphBullet as Jr, setShapeGlow as Js, findSlideByTitle as Jt, Emu as Ju, replaceHyperlink as K, findChartsWithDataLabels as Ka, findShapesWithHyperlinks as Kc, readPackagePart as Ki, shapesOverlap as Kl, getSlideLayoutPlaceholders as Kn, ImageFit as Ko, isParagraphBulletPicture as Kr, getShapeEffects as Ks, findSlideByPartName as Kt, VideoFormat as Ku, getSlidesWithComments as L, setTableCellTextFormat as La, findShapeById as Lc, PresentationSummary as Li, isShapeHidden as Ll, setExtendedProperties as Ln, ChartTextStyle as Lo, getParagraphSpacing as Lr, setShapeTextDirection as Ls, mergePresentations as Lt, ReadTextFormat as Lu, getPresentationNotesLengthsBySlide as M, setTableCellFill as Ma, getShapeStrokeEffective as Mc, setShapeImageContrast as Mi, getSlideMasterCount as Ml, getExtendedProperties as Mn, ChartManualLayout as Mo, getParagraphBulletStyle as Mr, setShapeText as Ms, addSlideAt as Mt, BulletStyle as Mu, getPresentationNotesText as N, setTableCellMargins as Na, getShapeStrokeJoin as Nc, setShapeImageCrop as Ni, getSlideMasterPartName as Nl, getPresentationCreated as Nn, ChartOfPie as No, getParagraphEndFormat as Nr, setShapeTextAnchor as Ns, addTitleSlide as Nt, ParagraphAlignment as Nu, getEmptySlides as O, removeTableRow as Oa, getShapeStrokeCap as Oc, hasShapeImage as Oi, getShapePreset as Ol, setThumbnail as On, ChartErrorBarAmount as Oo, ShapeParagraphElement as Or, getShapeTextWrap as Os, addBlankSlide as Ot, PatternFillOptions as Ou, getSlideNotes as P, setTableCellParagraphs as Pa, getShapeStrokeOpacity as Pc, setShapeImageOpacity as Pi, getSlideMasterPartNames as Pl, getPresentationModified as Pn, ChartSecondaryValueAxis as Po, getParagraphIndent as Pr, setShapeTextAutoFit as Ps, duplicateSlide as Pt, ParagraphAlignmentToken as Pu, resolveDeckBodyTextColor as Q, getShapeChartSeriesNames as Qa, getShapeXmlString as Qc, TableCellBorder as Qi, createPresentation as Ql, addSlideImage as Qn, findCommentsAfter as Qo, setShapeRunHyperlink as Qr, getShapePatternFill as Qs, getOutlineText as Qt, mm as Qu, getSlidesWithHyperlinks as R, setTableColumnWidth as Ra, findShapeByName as Rc, _internalPackageOf as Ri, isShapePlaceholder as Rl, touchModified as Rn, ChartTimeUnit as Ro, getShapeHyperlinkTooltip as Rr, setShapeTextFormat as Rs, moveSlide as Rt, TextFormat as Ru, getAllComments as S, insertTableColumn as Sa, getShapeFill as Sc, getShapeImageDuotone as Si, getShapeId as Sl, searchSlides as Sn, isChartSpec as So, PresentationFontsInput as Sr, getShapeTextAutoFit as Ss, SlideMediaSource as St, LineEndSize as Su, getAllNotes as T, isTableShape as Ta, getShapeFillEffective as Tc, getShapeImageLinkUrl as Ti, getShapePlaceholderIdx as Tl, PresentationThumbnail as Tn, ChartDataLabels as To, getPresentationTheme as Tr, getShapeTextColumns as Ts, getShapeMedia as Tt, ShadowOptions as Tu, getVisibleSlides as U, addSlideChart as Ua, findShapesByName as Uc, getPresentationSummary as Ui, setShapeBounds as Ul, findSlideLayoutByType as Un, ShapeClickAction as Uo, getShapeRunHyperlink as Ur, clearShapeEffects as Us, AllShapesEntry as Ut, PresetShape as Uu, getSlidesWithOverlap as V, setTableStyleId as Va, findShapesByHyperlink as Vc, getOrphanMediaPartNames as Vi, renameShape as Vl, findSlideLayout as Vn, ChartView3D as Vo, getShapeRunClickAction as Vr, ShapeEffect as Vs, sortSlides as Vt, SchemeColorToken as Vu, hasSlideNotes as W, findChartByKind as Wa, findShapesByPreset as Wc, getSlideMediaPartNames as Wi, setShapeDescription as Wl, getSlideLayoutName as Wn, getShapeClickAction as Wo, getShapeRunHyperlinkTooltip as Wr, findShapesByEffect as Ws, SlideInfo as Wt, PlaceholderType as Wu, setSlideTransition as X, getShapeChartCategories as Xa, getShapeIndex as Xc, IssueSeverity as Xi, PresentationInput as Xl, getSlideLayouts as Xn, clearSlideComments as Xo, setParagraphLineSpacing as Xr, clearShapeFill as Xs, findSlidesByText as Xt, emu as Xu, getSlideTransition as Y, getPresentationChartKindCounts as Ya, findSlidePlaceholders as Yc, validatePresentation as Yi, setSlideSections as Yl, getSlideLayoutUsageCountsByType as Yn, clearAllSlideComments as Yo, setParagraphLevel as Yr, setShapeShadow as Ys, findSlidesByNotes as Yt, cm as Yu, getEffectiveColorMap as Z, getShapeChartKind as Za, getShapeSlide as Zc, ValidationIssue as Zi, PresentationSize as Zl, getUnusedSlideLayouts as Zn, findCommentAuthorByName as Zo, setParagraphSpacing as Zr, clearShapeStroke as Zs, getAllShapes as Zt, inches as Zu, clearSlideHyperlinks as _, getTableDimensions as _a, setShapeStrokeJoin as _c, getShapeImageBiLevelThreshold as _i, getShapeBoundsResolved as _l, replaceTextInNotes as _n, RadarChartSpec as _o, setShapeRunFormat as _r, TextAutoFit as _s, getSlideMasterShapes as _t, GeomPath as _u, SlideSize as a, getTableCellAlignment as aa, setShapeImageFill as ac, clearSlideAnimations as ai, translateShapes as al, getSlideCount as an, BubbleChartSpec as ao, clearSlideShapes as ar, getCommentDate as as, getSlideBackgroundPatternFill as at, SlideShapeData as au, findSlidesWithChartTrendlines as b, getTableStyleFlags as ba, ShapeFill as bc, getShapeImageContrast as bi, getShapeDescription as bl, replaceTextInSlideNotes as bn, StockChartSpec as bo, resolveDrawingColorOpacity as br, getShapeBodyPrEffective as bs, ShapeMedia as bt, ArrowOptions as bu, PresentationChartEntry as c, getTableCellFill as ca, setShapePatternFill as cc, setShapeAnimation as ci, findShapesAtPoint as cl, getSlideLayoutCount as cn, ChartVariant as co, removeShape as cr, getCommentText as cs, getSlideLayoutBackgroundGradientFill as ct, CommentPosition as cu, PresentationImageEntry as d, getTableCellPosition as da, setShapeSize as dc, findOverlappingShapePairs as di, getGroupTransform as dl, getSlideText as dn, DoughnutChartSpec as do, setShapeZIndex as dr, getPresentationCommentCountsBySlide as ds, getSlideLayoutBackgroundShapes as dt, AnimationOptions as du, TableCellParagraph as ea, getShapeStrokeDash as ec, getSlideBody as ei, getSlideLayout as el, getPresentationText as en, getShapeChartSpec as eo, addSlideShape as er, findCommentsByAuthor as es, SlideLayoutBackgroundShape as et, savePresentation as eu, PresentationNotesEntry as f, getTableCellSpan as fa, setShapeStroke as fc, findShapesOutsideCanvas as fi, getMaxShapeId as fl, getSlideTextLength as fn, LineArea3DChartSpec as fo, ParagraphProperties as fr, getPresentationCommenters as fs, getSlideLayoutShapes as ft, SlideTransition as fu, clearAllSlideNotes as g, getTableColumnWidths as ga, setShapeStrokeDash as gc, getPresentationImageCountsBySlide as gi, getShapeBounds as gl, isSlideHidden as gn, PlainChartSeries as go, setShapeHyperlink as gr, TextAnchor as gs, getSlideMasterBackgroundPatternFill as gt, GeomCommand as gu, clearAllHyperlinks as h, getTableCells as ha, setShapeStrokeCompound as hc, findSlidesByLayoutType as hi, getShapeAltTitle as hl, getSlidesByLayout as hn, PieChartSpec as ho, getShapeRunFormatEffective as hr, removeSlideComment as hs, getSlideMasterBackgroundImageBytes as ht, CustomGeometry as hu, SLIDE_SIZE_4_3 as i, getTableCell as ia, setShapeGradientFill as ic, setSlideTitle as ii, setSlideLayout as il, getSlideAt as in, BubbleChartSeries as io, bringShapeToFront as ir, getCommentAuthors as is, getSlideBackgroundImageBytes as it, SlideLayoutData as iu, getPresentationNotesLength as j, setTableCellBorders as ja, getShapeStrokeCompound as jc, setShapeImageBrightness as ji, getShapeText as jl, getCoreProperties as jn, ChartKind as jo, getParagraphBulletImageBytes as jr, setShapeParagraphs as js, addSlide as jt, ReadGradientStop as ju, getHiddenSlides as k, setTableCellAlignment as ka, getShapeStrokeColor as kc, hasShapeText as ki, getShapeRotation as kl, CoreProperties as kn, ChartErrorBars as ko, getParagraphAlignment as kr, setShapeAlignment as ks, addContentSlide as kt, PatternPreset as ku, PresentationCommentEntry as l, getTableCellMargins as la, setShapePosition as lc, ImageCrop as li, findShapesInRect as ll, getSlideOutline as ln, ComboChartSeries as lo, sendShapeBackward as lr, getCommentsSortedByDate as ls, getSlideLayoutBackgroundImageBytes as lt, SlideComment as lu, appendSlideNotes as m, getTableCellTextDirection as ma, setShapeStrokeCap as mc, findSlidesByLayoutPartName as mi, getShapeAdjustValues as ml, getSlides as mn, Pie3DChartSpec as mo, getShapeHyperlink as mr, getSlideComments as ms, getSlideMasterBackgroundGradientFill as mt, TransitionOptions as mu, SLIDE_SIZE_16_10 as n, getPresentationTableCountsBySlide as na, setShapeFill as nc, setSlideBody as ni, getSlidesWithEmptyPlaceholders as nl, getPresentationTextLengthsBySlide as nn, setChartSpec as no, addSlideTextBox as nr, findSlidesWithCommentsByAuthor as ns, getSlideBackground as nt, SlideCommentData as nu, getSlideSize as o, getTableCellAnchor as oa, setShapeNoFill as oc, findShapesWithAnimation as oi, ShapeBounds as ol, getSlideIndex as on, CandlestickChartSpec as oo, copyShape as or, getCommentPosition as os, getSlideColorMapOverride as ot, TableCellData as ou, PresentationTableEntry as p, getTableCellText as pa, setShapeStrokeArrow as pc, findSlidesByLayoutName as pi, getMaxShapeIdInPresentation as pl, getSlideXmlString as pn, OfPieChartSpec as po, getParagraphPropertiesEffective as pr, getSlideCommentAuthors as ps, getSlideMasterBackground as pt, TransitionEffect as pu, setSlideNotes as q, findChartsWithTrendlines as qa, findSlidePlaceholder as qc, setMediaPartBytes as qi, SlideSection as ql, getSlideLayoutType as qn, setShapeImage as qo, setParagraphAlignment as qr, getShapeEffectsEffective as qs, findSlideByText as qt, ImageFormat as qu, SLIDE_SIZE_16_9 as r, getSlideTables as ra, setShapeFlip as rc, setSlidePlaceholders as ri, replaceTokensInSlide as rl, getShapeAt as rn, Bar3DChartSpec as ro, bringShapeForward as rr, getCommentAuthor as rs, getSlideBackgroundGradientFill as rt, SlideData as ru, setSlideSize as s, getTableCellBorders as sa, setShapeNoStroke as sc, getShapeAnimation as si, centerShapeOnSlide as sl, getSlideInfo as sn, ChartSpec as so, getShapeZIndex as sr, getCommentSlide as ss, getSlideLayoutBackground as st, CommentAuthor as su, VERSION as t, clearTableCellFill as ta, setShapeAdjustValues as tc, getSlideTitle as ti, getSlideShapes as tl, getPresentationTextLength as tn, getSlideCharts as to, addSlideTable as tr, findCommentsByText as ts, clearSlideBackground as tt, PresentationData as tu, PresentationHyperlinkEntry as u, getTableCellParagraphs as ua, setShapeRotation as uc, findFlippedShapes as ui, getGroupChildren as ul, getSlidePartName as un, ComboChartSpec as uo, sendShapeToBack as ur, getPresentationCommentCountsByAuthor as us, getSlideLayoutBackgroundPatternFill as ut, AnimationEffect as uu, findSlidesByHyperlink as v, getTableRowHeights as va, getShapeGradientFill as vc, getShapeImageBrightness as vi, getShapeCenter as vl, replaceTextInPresentation as vn, ScatterChartSeries as vo, getShapeRunFormat as vr, TextWrap as vs, setSlideBackground as vt, GeomPoint as vu, getAllImages as w, isChartShape as wa, getShapeFillColorResolved as wc, getShapeImageFormat as wi, getShapeName as wl, slideHasAnimations as wn, ChartDataLabelPosition as wo, getPresentationFonts as wr, getShapeTextBodyRotationDeg as ws, findShapesWithMedia as wt, GlowOptions as wu, getAllCharts as x, getTableStyleId as xa, ShapeStroke as xc, getShapeImageCrop as xi, getShapeFlip as xl, replaceTokensInPresentation as xn, SurfaceChartSpec as xo, PresentationFonts as xr, getShapeTextAnchor as xs, SlideMediaOptions as xt, LineDash as xu, findSlidesWithChartKind as y, getTableSize as ya, getShapeGradientFillEffective as yc, getShapeImageBytes as yi, getShapeCustomGeometry as yl, replaceTextInSlide as yn, ScatterChartSpec as yo, resolveDrawingColor as yr, appendShapeText as ys, setSlideBackgroundImage as yt, PathFillMode as yu, getSlidesWithImages as z, setTableRowHeight as za, findShapeByText as zc, compactPackage as zi, isShapeTextBox as zl, SlideLayoutPlaceholder as zn, ChartTrendline as zo, getShapeParagraphCount as zr, setShapeTextMargins as zs, removeSlide as zt, Color as zu };
|
|
6197
|
-
//# sourceMappingURL=index-
|
|
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
|