@shbernal/ts-pptx 3.2.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.md +19 -20
  2. package/dist/{autopage-QQyfRtoK.js → autopage-D1sqK6j7.js} +16 -15
  3. package/dist/{autopage-QQyfRtoK.js.map → autopage-D1sqK6j7.js.map} +1 -1
  4. package/dist/browser.d.ts +6 -6
  5. package/dist/browser.js +5 -6
  6. package/dist/browser.js.map +1 -1
  7. package/dist/{diagnostics-Chjz_4_Q.d.ts → diagnostics-B2yWpcjB.d.ts} +31 -14
  8. package/dist/{diagnostics-Chjz_4_Q.d.ts.map → diagnostics-B2yWpcjB.d.ts.map} +1 -1
  9. package/dist/{diagnostics-DYQC7xLV.js → diagnostics-H1QzgRSw.js} +0 -0
  10. package/dist/{diagnostics-DYQC7xLV.js.map → diagnostics-H1QzgRSw.js.map} +1 -1
  11. package/dist/{enums-CoXnxiCI.d.ts → enums-CvRYniUA.d.ts} +13 -3
  12. package/dist/{enums-CoXnxiCI.d.ts.map → enums-CvRYniUA.d.ts.map} +1 -1
  13. package/dist/{errors-BVLCFr-t.d.ts → errors-fB1KDJKQ.d.ts} +5 -5
  14. package/dist/{errors-BVLCFr-t.d.ts.map → errors-fB1KDJKQ.d.ts.map} +1 -1
  15. package/dist/{fit-DhMbQG5O.js → fit-CYJ1jkQI.js} +0 -0
  16. package/dist/fit-CYJ1jkQI.js.map +1 -0
  17. package/dist/{html-dom-DajBuobe.js → html-dom-CzewEdE1.js} +4 -5
  18. package/dist/{html-dom-DajBuobe.js.map → html-dom-CzewEdE1.js.map} +1 -1
  19. package/dist/html.d.ts +3 -3
  20. package/dist/html.js +1 -1
  21. package/dist/index.d.ts +6 -6
  22. package/dist/index.js +5 -6
  23. package/dist/index.js.map +1 -1
  24. package/dist/inspect.d.ts +1 -1
  25. package/dist/inspect.js +4 -4
  26. package/dist/math.d.ts +1 -1
  27. package/dist/measure.d.ts +96 -6
  28. package/dist/measure.d.ts.map +1 -1
  29. package/dist/measure.js +2 -2
  30. package/dist/node.d.ts +6 -6
  31. package/dist/node.js +4 -5
  32. package/dist/node.js.map +1 -1
  33. package/dist/notes-SCvpJz0l.js +1646 -0
  34. package/dist/notes-SCvpJz0l.js.map +1 -0
  35. package/dist/{pres-C-EU3SkN.d.ts → pres-Cb-1xDne.d.ts} +4 -4
  36. package/dist/{pres-C-EU3SkN.d.ts.map → pres-Cb-1xDne.d.ts.map} +1 -1
  37. package/dist/{presentation-CxnUVhK9.js → presentation-DeKTJGHf.js} +1002 -422
  38. package/dist/presentation-DeKTJGHf.js.map +1 -0
  39. package/dist/{presentation-Osx1cDdJ.d.ts → presentation-types-B50aOUFI.d.ts} +679 -11
  40. package/dist/presentation-types-B50aOUFI.d.ts.map +1 -0
  41. package/dist/read.d.ts +4 -5
  42. package/dist/read.d.ts.map +1 -1
  43. package/dist/read.js +2 -2
  44. package/dist/script.d.ts +2 -2
  45. package/dist/script.d.ts.map +1 -1
  46. package/dist/script.js +0 -0
  47. package/dist/script.js.map +1 -1
  48. package/dist/{shapes-DoJBPrwN.js → shapes-BXVgsk0F.js} +3 -3
  49. package/dist/{shapes-DoJBPrwN.js.map → shapes-BXVgsk0F.js.map} +1 -1
  50. package/dist/{slide-BTfn1Pyp.d.ts → slide-DWw9UoI6.d.ts} +39 -3
  51. package/dist/slide-DWw9UoI6.d.ts.map +1 -0
  52. package/dist/{st-enums-evQG2A7Z.js → st-enums-bVnezkMJ.js} +33 -12
  53. package/dist/{st-enums-evQG2A7Z.js.map → st-enums-bVnezkMJ.js.map} +1 -1
  54. package/dist/{text-C4P9MNdf.js → text-uM-zGton.js} +219 -1668
  55. package/dist/text-uM-zGton.js.map +1 -0
  56. package/dist/{units-internal-CR8s8YQa.js → units-internal-CGf4VrXy.js} +156 -4
  57. package/dist/units-internal-CGf4VrXy.js.map +1 -0
  58. package/dist/zip.d.ts +2 -2
  59. package/package.json +36 -27
  60. package/dist/embedded-fonts-MaynAHa9.js +0 -94
  61. package/dist/embedded-fonts-MaynAHa9.js.map +0 -1
  62. package/dist/fit-DhMbQG5O.js.map +0 -1
  63. package/dist/presentation-CxnUVhK9.js.map +0 -1
  64. package/dist/presentation-Osx1cDdJ.d.ts.map +0 -1
  65. package/dist/presentation-types-Dj4riuDs.d.ts +0 -538
  66. package/dist/presentation-types-Dj4riuDs.d.ts.map +0 -1
  67. package/dist/slide-BTfn1Pyp.d.ts.map +0 -1
  68. package/dist/text-C4P9MNdf.js.map +0 -1
  69. package/dist/units-C7QM1KgH.js +0 -144
  70. package/dist/units-C7QM1KgH.js.map +0 -1
  71. package/dist/units-internal-CR8s8YQa.js.map +0 -1
@@ -1,6 +1,28 @@
1
- import { t as CustomPropertyValue } from "./pres-C-EU3SkN.js";
2
- import { c as ImportSlideMastersOptions, d as LayoutHandle, f as SlideSize, l as ImportSlideOptions, o as FromTemplateOptions, p as SlideSource, r as EmbeddedFontInfo, s as ImportShapeOptions, t as AppendSlidesOptions, u as ImportedSlideMaster } from "./presentation-types-Dj4riuDs.js";
1
+ import { t as CustomPropertyValue } from "./pres-Cb-1xDne.js";
3
2
  import { a as Part, i as Relationships, n as OpcPackage, o as Element, t as OpcInput } from "./package-CaOLXSNi.js";
3
+ //#region src/embedded-fonts.d.ts
4
+ /**
5
+ * The four face slots of `CT_EmbeddedFontListEntry`, in schema child order
6
+ * (`font` first, then these). Iterate in this order everywhere so the read- and
7
+ * write-side emitters agree on element order.
8
+ */
9
+ declare const EMBEDDED_FONT_SLOTS: readonly ['regular', 'bold', 'italic', 'boldItalic'];
10
+ type EmbeddedFontSlot = (typeof EMBEDDED_FONT_SLOTS)[number];
11
+ /** One embeddable face: a slot plus the raw font bytes (absent in pure read-side merges). */
12
+ interface EmbeddedFontFace {
13
+ slot: EmbeddedFontSlot;
14
+ bytes?: Uint8Array;
15
+ }
16
+ /** A typeface family with 1..4 embedded faces — one `p:embeddedFont` entry. */
17
+ interface EmbeddedFont {
18
+ /** `p:font/@typeface` — MUST match the family name used in run/`fontFace` typefaces or PowerPoint won't bind it. */
19
+ typeface: string;
20
+ panose?: string;
21
+ pitchFamily?: number;
22
+ charset?: number;
23
+ faces: EmbeddedFontFace[];
24
+ }
25
+ //#endregion
4
26
  //#region src/read/oxml/theme.d.ts
5
27
  /**
6
28
  * The colour-resolution context: the two maps that turn a DrawingML colour
@@ -3435,6 +3457,29 @@ declare class Slide implements ShapeHost {
3435
3457
  * format is sniffed from the bytes unless `extension`/`contentType` are given.
3436
3458
  */
3437
3459
  addPicture(image: Uint8Array, options: AddPictureOptions): Picture;
3460
+ /**
3461
+ * Give this slide the speaker notes `text`, and return the resulting
3462
+ * {@link NotesSlide}. A `
3463
+ ` starts a new paragraph, matching the write-side
3464
+ * `addNotes`; the runs carry no formatting of their own, so style them
3465
+ * afterwards through {@link notesTextFrame}.
3466
+ *
3467
+ * The counterpart to the read side's `notesText`/`notesTextFrame`/`notesSlide`
3468
+ * getters, and the way to annotate a slide that has **no notes part at all** —
3469
+ * the state an `importSlide` without `{ importNotes: true }` leaves behind, and
3470
+ * the one a `notesTextFrame` edit cannot reach because there is no frame to
3471
+ * hand back. Calling it on a slide that already has notes replaces the body
3472
+ * text and leaves the rest of the part (its geometry, its other two
3473
+ * placeholders) alone.
3474
+ *
3475
+ * Creating the part pulls in what a notes slide must bind to: a `notesMaster`,
3476
+ * of which a presentation may hold at most one. This deck's own is reused when
3477
+ * it has one; otherwise one is installed, bound to a clone of this deck's theme
3478
+ * so it resolves against the destination palette. That is the same
3479
+ * single-master rule `importSlide({ importNotes: true })` and `appendSlides`
3480
+ * follow, so mixing the three cannot produce a second notes master.
3481
+ */
3482
+ addNotes(text: string): NotesSlide;
3438
3483
  /**
3439
3484
  * @internal The slide's shape tree (`p:cSld/p:spTree`), or `null` if absent.
3440
3485
  * Exposed for cross-slide composition (`Presentation.importShape`).
@@ -3609,12 +3654,17 @@ declare class Presentation {
3609
3654
  * Duplicate the slide at `index` and insert the copy at `options.at` (deck
3610
3655
  * order; `0` = first), defaulting to appending at the end when `at` is omitted
3611
3656
  * or out of range. Returns the new slide. The new slide part copies the source
3612
- * bytes verbatim and shares the source's relationship targets (layout, images,
3613
- * …) by copying its `.rels`; a new presentation→slide relationship and a
3614
- * `p:sldId` entry are wired up. Marks the presentation part dirty.
3657
+ * bytes verbatim and shares the source's deck-wide relationship targets
3658
+ * (layout, images, media) by copying its `.rels`; a new presentation→slide
3659
+ * relationship and a `p:sldId` entry are wired up. Marks the presentation part
3660
+ * dirty.
3615
3661
  *
3616
- * Note: relationships are copied as-is, so a source slide that owns a
3617
- * one-to-one part (e.g. a notes slide) would end up shared with the clone.
3662
+ * What the source page *owns* is copied rather than shared: its notes slide,
3663
+ * charts, SmartArt diagrams and OLE embeddings, each with the subtree under it
3664
+ * (a chart's embedded workbook comes along; the image inside its user-shapes
3665
+ * drawing stays shared). PowerPoint refuses to open a deck where two slides
3666
+ * resolve to one chart or diagram, so this is not tidiness — see
3667
+ * `page-owned.ts` for the rule and the evidence behind it.
3618
3668
  */
3619
3669
  cloneSlide(index: number, options?: {
3620
3670
  at?: number;
@@ -3646,7 +3696,10 @@ declare class Presentation {
3646
3696
  * Only the layout(s) actually used by imported slides are copied; the imported
3647
3697
  * master's `p:sldLayoutIdLst` is pruned to exactly those, mirroring how
3648
3698
  * PowerPoint's "Reuse Slides" brings a slide across. Parts shared by repeated
3649
- * imports from the same source deck are copied once and reused.
3699
+ * imports from the same source deck are copied once and reused — every part
3700
+ * except the page itself. Importing the same source slide twice yields two
3701
+ * independent copies over one shared layout/master/theme, which is what lets a
3702
+ * deck show one page twice (verbatim, then edited).
3650
3703
  *
3651
3704
  * With `{ theme: 'preserve' }` the slide's source theme is instead *flattened*
3652
3705
  * into the slide XML and the slide is bound to this deck's existing
@@ -3660,6 +3713,53 @@ declare class Presentation {
3660
3713
  * widths). Source notes are dropped unless you pass `{ importNotes: true }`.
3661
3714
  */
3662
3715
  importSlide(source: Presentation, index: number, options?: ImportSlideOptions): Slide;
3716
+ /**
3717
+ * Import selected pages from one or more loaded source presentations as one
3718
+ * batch. Each imported page lands at its `outputIndex` in the complete
3719
+ * destination slide list after the batch, and the returned array is parallel
3720
+ * to `requests` — `result[i]` is the page `requests[i]` asked for, whatever
3721
+ * order the output positions were given in.
3722
+ *
3723
+ * Everything is checked before a single byte of this deck moves: every request
3724
+ * names an existing source page, final output positions are unique, each source
3725
+ * has this deck's slide size, and a read-only dry run of the copy proves every
3726
+ * part it would reach is present. A batch therefore either applies in full or
3727
+ * leaves this deck byte-identical, where a per-page loop of
3728
+ * {@link importSlide} can leave a half-stitched deck behind.
3729
+ *
3730
+ * The batch also decides what a `slide → slide` link means: an internal link
3731
+ * on a selected page must target another **selected** page (or one this deck
3732
+ * already contains via an earlier import from that source), and is rewritten
3733
+ * to the fresh partname — importing page 3 of 10 does not drag pages 1–2
3734
+ * across as dependencies, and never strands the link. This mirrors
3735
+ * `appendSlides`' `import/unresolved-slide-link`, which the write side already
3736
+ * enforces for generator decks.
3737
+ *
3738
+ * One request is one output page, so naming the same source page in several
3739
+ * requests is how you ask for several independent copies of it — the page part
3740
+ * is the one thing an import never shares, exactly as in {@link importSlide}.
3741
+ * Everything under it (layout, master, theme, media) is still copied once and
3742
+ * shared. Where such a page is the target of a `slide → slide` link, the link
3743
+ * resolves to one of its copies: pages duplicated together are copied in
3744
+ * lockstep and link to their round-mates, and a link into a page requested only
3745
+ * once always lands on that single copy.
3746
+ *
3747
+ * Speaker notes travel per request: `{ importNotes: true }` carries that page's
3748
+ * `notesSlide` part across, wired to the new page and bound to a single
3749
+ * `notesMaster` under the same 0..1 rule {@link importSlide} and
3750
+ * {@link appendSlides} follow — the destination's own master wins when it has
3751
+ * one. Notes are part of the up-front dry run too, so a batch that would fail
3752
+ * carrying them is refused with the deck still byte-identical. A page named in
3753
+ * several requests gets its own copy of its notes each time, as of everything
3754
+ * else that page owns.
3755
+ *
3756
+ * Scope: pages come across under `'copy'` theme semantics (their own layout →
3757
+ * master → theme subgraph, shared parts deduped via the copy registry).
3758
+ * Embedded fonts are not carried, and sizes must match, since there is no batch
3759
+ * spelling for `embedFonts` or `rescale`. Use {@link importSlide} when you need
3760
+ * either of those.
3761
+ */
3762
+ importSlides(requests: readonly ImportSlidesRequest[]): Slide[];
3663
3763
  /**
3664
3764
  * Graft slide master(s) from another open package into this one and return what
3665
3765
  * was copied. Unlike {@link importSlide} — which brings a master across only as
@@ -3724,7 +3824,10 @@ declare class Presentation {
3724
3824
  *
3725
3825
  * Charts and internal slide-to-slide hyperlinks are carried across: chart parts
3726
3826
  * (chart XML + `.rels` + embedded workbook) are injected under fresh names, and a
3727
- * `slide:N` link is repointed at the Nth appended slide's new partname.
3827
+ * `slide:N` link is repointed at the Nth appended slide's new partname. A chartEx
3828
+ * (Office 2016 — waterfall, funnel, treemap, ...) chart carries too, as its own
3829
+ * `chartEx{N}.xml` part behind the MS chartEx rel, with the style and color-style
3830
+ * sidecars PowerPoint requires alongside it.
3728
3831
  *
3729
3832
  * The generator's presentation-level embedded fonts (`pptx.embedFont`) are also
3730
3833
  * carried into this deck and merged into its `p:embeddedFontLst`, de-duped by
@@ -3787,5 +3890,570 @@ declare class Presentation {
3787
3890
  save(): Promise<Uint8Array>;
3788
3891
  }
3789
3892
  //#endregion
3790
- export { Chart as $, GroupShape as A, OuterShadow as At, Table as B, FillRect as Bt, CommentAuthor as C, CustomGeometry as Ct, NotesPlaceholder as D, InnerShadow as Dt, ModernCommentAuthor as E, Glow as Et, isPicture as F, SoftEdge as Ft, TableConditionFlags as G, ResolvedColor as Gt, TableCellBorderEdit as H, PictureFillTile as Ht, GraphicFrame as I, PatternFill as It, ChartExAxis as J, TableCellEdge as K, resolveColorElement as Kt, CellBorder as L, BackgroundFill as Lt, isConnector as M, RecolorColor as Mt, isGraphicFrame as N, Reflection as Nt, NotesSlide as O, LineEnd as Ot, isGroupShape as P, ShapeType as Pt, AxisNumberFormat as Q, CellBorders as R, BackgroundSource as Rt, Comment as S, ConnectionSite as St, ModernComment as T, GeometryCommand as Tt, TableRow as U, GradientFill as Ut, TableCell as V, PictureFill as Vt, ResolvedTableStyle as W, GradientStop as Wt, ChartExLegend as X, ChartExDataLabels as Y, ChartExSeries as Z, ThemeColorSlot as _, Run as _t, readCustomProperties as a, ChartSeries as at, Tag as b, AbsoluteFrame as bt, Slide as c, AutoShape as ct, TransitionSpeed as d, AutofitMode as dt, ChartAxis as et, ColorMapToken as f, BodyProperties as ft, Theme as g, Paragraph as gt, SlideMaster as h, LineSpacing as ht, readCoreProperties as i, ChartLine as it, isAutoShape as j, Recolor as jt, AnyShape as k, LineEnds as kt, TransitionInfo as l, Shape as lt, SlideLayout as m, BulletStyle as mt, CoreProperties as n, ChartFill as nt, AddPictureOptions as o, Connector as ot, Placeholder as p, BulletDetail as pt, ChartEx as q, ColorContext as qt, CustomProperty as r, ChartLegend as rt, AddTextBoxOptions as s, Picture as st, Presentation as t, ChartDataLabels as tt, TransitionInput as u, ShapeHost as ut, ThemeFontFace as v, RunHyperlink as vt, CommentSchema as w, CustomGeometryPath as wt, readTagsForPart as x, ChildFrame as xt, ThemeFontScheme as y, TextFrame as yt, CellThreeD as z, SlideBackground as zt };
3791
- //# sourceMappingURL=presentation-Osx1cDdJ.d.ts.map
3893
+ //#region src/read/api/presentation-types.d.ts
3894
+ /** Slide dimensions, in both EMU (the OOXML unit) and inches. */
3895
+ interface SlideSize {
3896
+ widthEmu: number;
3897
+ heightEmu: number;
3898
+ widthIn: number;
3899
+ heightIn: number;
3900
+ }
3901
+ /**
3902
+ * One `p:embeddedFont` entry, read from `presentation.xml`'s `p:embeddedFontLst`
3903
+ * (see {@link Presentation.embeddedFonts}). A read-only view: it names the family
3904
+ * and resolves each embedded face's `r:id` to the absolute partname of its binary
3905
+ * `/ppt/fonts/*.fntdata` part, so a consumer can enumerate the embedded faces and
3906
+ * pull their bytes without hand-parsing the presentation part or its rels.
3907
+ */
3908
+ interface EmbeddedFontInfo {
3909
+ /** `p:font/@typeface` — the family name PowerPoint binds the embed to. */
3910
+ typeface: string;
3911
+ /** `p:font/@panose`, or `null` when the entry declares none. */
3912
+ panose: string | null;
3913
+ /** The embedded faces, in `regular, bold, italic, boldItalic` schema order. */
3914
+ faces: EmbeddedFontFaceInfo[];
3915
+ }
3916
+ /** One face of an {@link EmbeddedFontInfo}: which slot it fills and the part its `r:id` resolves to. */
3917
+ interface EmbeddedFontFaceInfo {
3918
+ /** Which weight/style slot this face fills. */
3919
+ slot: 'regular' | 'bold' | 'italic' | 'boldItalic';
3920
+ /** Absolute partname of the face's binary `.fntdata` part (e.g. `/ppt/fonts/font1.fntdata`). */
3921
+ partName: string;
3922
+ }
3923
+ /** Options for {@link Presentation.importSlide}. */
3924
+ interface ImportSlideOptions {
3925
+ /**
3926
+ * How the imported slide relates to themes.
3927
+ *
3928
+ * - `'copy'` (default): bring the slide's own `slideLayout → slideMaster →
3929
+ * theme` subgraph across, so the slide renders byte-for-byte as authored.
3930
+ * A deck stitched from N sources then carries N themes/masters.
3931
+ * - `'preserve'`: *flatten then attach* — bake the source theme's colours and
3932
+ * style-matrix fills into the slide XML (so its pixels do not change), then
3933
+ * bind it to this deck's existing master/layout instead of importing the
3934
+ * source theme. The result is a single-theme file whose imported slides are
3935
+ * theme-independent: it fixes renderers that mis-resolve per-slide scheme
3936
+ * colours against the wrong (first) theme, and tidies the deck for handoff.
3937
+ *
3938
+ * To stay faithful across the rebind, `preserve` also bakes the inheritance
3939
+ * the rebind would otherwise break explicitly onto the slide: the slide's
3940
+ * effective background; each placeholder's *inherited* geometry (`a:xfrm`
3941
+ * from the matching source layout/master placeholder) so it cannot shift or
3942
+ * clip; and each placeholder run's *inherited* colour and size/weight
3943
+ * (`sz`/`b`/`i`) from the source layout/master text styles. Typeface
3944
+ * (`a:latin`) is left to re-bind to the destination theme, like `fontRef`.
3945
+ * By default it does **not** carry decorative graphics that live on the source
3946
+ * master/layout shape tree (logos, accent shapes): those belong to the
3947
+ * master `preserve` deliberately drops. Set {@link carryMasterGraphics} to
3948
+ * bake them onto the slide instead.
3949
+ * - `'restyle'`: re-brand to *this* deck. Rebind the slide to this deck's
3950
+ * master/layout exactly like `preserve` but **skip the flatten** — leave every
3951
+ * `a:schemeClr`, style-matrix ref (`fillRef`/`lnRef`/`effectRef`/`fontRef`),
3952
+ * and `p:bg` `bgRef` symbolic so they re-resolve against the *destination*
3953
+ * theme. The slide keeps its geometry, text, and structure but adopts this
3954
+ * deck's colours/fonts: `preserve` makes it "look the same everywhere",
3955
+ * `restyle` makes it "look like mine". The slide's own `p:clrMapOvr` is dropped
3956
+ * so the destination master's `clrMap` governs the re-brand.
3957
+ *
3958
+ * **Load-bearing limitation:** `restyle` can only recolour what is *symbolic*.
3959
+ * Anything the source authored as a literal `a:srgbClr` has no theme reference
3960
+ * to re-resolve and stays exactly that colour, so a slide with a baked literal
3961
+ * palette re-brands little or nothing. Use `restyle` for slides built against
3962
+ * theme colours/style matrices, not hardcoded RGB — or set {@link remapLiterals}
3963
+ * to force-remap literals and copy table styles. Re-brand is inherently a
3964
+ * visual change (a source `accent1` light-on-dark can invert against a dark
3965
+ * destination `accent1`), so its output needs visual QA. A restyled table
3966
+ * resolves its `@tableStyleId` against the *destination* `tableStyles`; if the
3967
+ * destination lacks that id the table falls back (which {@link remapLiterals}
3968
+ * also addresses by copying the source style across).
3969
+ */
3970
+ theme?: 'copy' | 'preserve' | 'restyle';
3971
+ /**
3972
+ * `restyle` mode only. Push the re-brand past what symbolic references reach, for
3973
+ * slides whose palette is partly hardcoded. When `true` it does two things the
3974
+ * plain re-brand cannot:
3975
+ *
3976
+ * - **Literal colours** — every literal `a:srgbClr` equal to a *source*-theme
3977
+ * `clrScheme` slot is rewritten back to a symbolic `a:schemeClr` (routed through
3978
+ * the source `clrMap`), so it re-resolves against this deck's theme instead of
3979
+ * staying its authored RGB. A literal matching no source slot is left untouched.
3980
+ * - **Table styles** — any `@tableStyleId` the slide references is copied from the
3981
+ * source `tableStyles.xml` into this deck's (same id, idempotent, leaving an id
3982
+ * the destination already defines alone), so a restyled table keeps its style
3983
+ * instead of falling back. The copied definition is itself symbolic, so it
3984
+ * re-brands to this deck's theme.
3985
+ *
3986
+ * Off by default: it deliberately reinterprets authored literals as theme colours,
3987
+ * which is a visual change that needs QA. Ignored unless `theme` is `'restyle'`.
3988
+ */
3989
+ remapLiterals?: boolean;
3990
+ /**
3991
+ * `preserve`/`restyle` modes only. When `true`, bake the source
3992
+ * `slideLayout`/`slideMaster` shape-tree decorations (everything on those shape
3993
+ * trees *except* placeholders — logos, accent curves, footers drawn as shapes)
3994
+ * onto the imported slide, behind its own content, so master/layout branding
3995
+ * survives the rebind to this deck's master. Their media are copied across.
3996
+ *
3997
+ * Under `preserve` the carried decorations' theme references are flattened like
3998
+ * the slide's own content; under `restyle` they are left symbolic and so
3999
+ * re-brand to the destination palette along with the slide — note a carried
4000
+ * source logo could recolour unexpectedly under a different palette.
4001
+ *
4002
+ * Off by default: it raises fidelity for cover/closer/divider slides at the
4003
+ * cost of duplicating shapes that would otherwise live once on the shared
4004
+ * master, so opt in only when that branding actually needs to travel with the
4005
+ * slide. Ignored unless `theme` is `'preserve'` or `'restyle'`.
4006
+ */
4007
+ carryMasterGraphics?: boolean;
4008
+ /**
4009
+ * Zero-based insert position in `p:sldIdLst` (deck order). `0` makes the
4010
+ * imported slide first; an `at` past the current slide count — or omitting it —
4011
+ * appends. Use it to place brand bookends (cover at `0`, closer appended)
4012
+ * around generator-authored interior slides regardless of import order.
4013
+ */
4014
+ at?: number;
4015
+ /**
4016
+ * Carry the *source deck's* embedded fonts (`p:embeddedFontLst` in its
4017
+ * `presentation.xml`) into this deck, so an imported slide that renders with an
4018
+ * embedded face keeps it on machines that lack the font. Off by default —
4019
+ * fonts live on the presentation, not the slide, so they are only worth copying
4020
+ * when you want the embed to travel.
4021
+ *
4022
+ * The font binary parts are copied under fresh `/ppt/fonts/` names (deduped via
4023
+ * the per-source copy registry, so repeated imports copy each face once), the
4024
+ * `application/x-fontdata` Default is added, and entries are merged into this
4025
+ * deck's `p:embeddedFontLst` — de-duplicated by `typeface` + face slot, so a
4026
+ * face this deck already embeds is reused rather than duplicated. The carry is a
4027
+ * whole-deck operation (it copies *all* the source's embedded fonts, not just the
4028
+ * faces this one slide uses), since the source list does not record which slide
4029
+ * uses which face.
4030
+ * @default false
4031
+ */
4032
+ embedFonts?: boolean;
4033
+ /**
4034
+ * What to do when the source slide size differs from this deck's. By default
4035
+ * (`false`) `importSlide` throws on any mismatch. Set it to rescale the imported
4036
+ * geometry onto this deck's canvas instead:
4037
+ *
4038
+ * - `'fit'` (or `true`): uniform scale by `min(sx, sy)` then center, so aspect
4039
+ * ratio is preserved (circles stay circles, rotations hold) and the slack on
4040
+ * the longer axis becomes a centered margin. Matches PowerPoint's "Ensure Fit".
4041
+ * - `'stretch'`: independent per-axis scale so the content fills the canvas;
4042
+ * distorts shapes and cannot faithfully reposition rotated shapes. Matches
4043
+ * "Maximize".
4044
+ *
4045
+ * Only *geometry* is rescaled — every top-level shape/group/graphicFrame
4046
+ * transform (`a:off`/`a:ext`) and table grid (`a:gridCol@w`, `a:tr@h`). Font
4047
+ * sizes, line widths, and other absolute sizes are left as authored, so heavy
4048
+ * down-scaling can leave text overflowing its (now smaller) box. In `copy` mode
4049
+ * the imported layout and master shape trees are rescaled too, so inherited
4050
+ * placeholder and background geometry stays aligned; in `preserve`/`restyle` the
4051
+ * slide rebinds to this deck's master/layout (already the right size), so only
4052
+ * the slide is touched.
4053
+ * @default false
4054
+ */
4055
+ rescale?: boolean | 'fit' | 'stretch';
4056
+ /**
4057
+ * Carry the source slide's speaker notes across. By default (`false`) the
4058
+ * `notesSlide` relationship is dropped, so the imported slide has no notes.
4059
+ *
4060
+ * When set, the source `notesSlide` is copied and wired to the imported slide.
4061
+ * Its `slide` back-relationship is repointed at the new slide (the source slide
4062
+ * is *not* copied). A presentation has at most one `notesMaster`: if this deck
4063
+ * already has one, the imported notes reuse it (the source notesMaster and its
4064
+ * theme are not copied); if it has none, the source notesMaster (and its theme)
4065
+ * are copied and registered. The destination's notes styling therefore wins
4066
+ * when both decks define one.
4067
+ * @default false
4068
+ */
4069
+ importNotes?: boolean;
4070
+ }
4071
+ /** Options for {@link Presentation.importShape} / {@link Presentation.importShapes}. */
4072
+ interface ImportShapeOptions {
4073
+ /**
4074
+ * How the lifted shape relates to themes, mirroring {@link ImportSlideOptions}
4075
+ * but scoped to one shape subtree:
4076
+ *
4077
+ * - `'preserve'` (default): bake the shape's scheme/style-matrix colours (and,
4078
+ * for a lifted placeholder, its inherited geometry/colour/size/anchor/list
4079
+ * style) to literals using the *source* slide's theme, so it keeps its look on
4080
+ * a host slide whose theme differs. A lifted placeholder is also *demoted* to a
4081
+ * plain shape (its `p:ph` stripped) once everything it inherited is baked, so it
4082
+ * neither re-resolves against the host's placeholder of the same type/idx nor
4083
+ * collides with it. The safe default for composing across decks.
4084
+ * - `'restyle'`: leave the shape's theme references symbolic so it re-brands to
4085
+ * the host theme. Only *symbolic* colours re-brand — literal `a:srgbClr` the
4086
+ * source baked in stays put (same limitation as `importSlide` restyle).
4087
+ * - `'copy'`: bring the shape's XML across untouched; only sane when the host
4088
+ * already shares the source theme.
4089
+ *
4090
+ * Unlike a slide import this never runs the slide-scoped background passes — a
4091
+ * background belongs to a slide, not to a composed shape.
4092
+ */
4093
+ theme?: 'preserve' | 'restyle' | 'copy';
4094
+ /** Override left edge (EMU). Omitted axes keep the shape's source `a:off`/`a:ext`. */
4095
+ left?: number;
4096
+ /** Override top edge (EMU). */
4097
+ top?: number;
4098
+ /** Override width (EMU); must be positive. */
4099
+ width?: number;
4100
+ /** Override height (EMU); must be positive. */
4101
+ height?: number;
4102
+ /**
4103
+ * Insert position among the host shape tree's shape children (z-order, 0 =
4104
+ * backmost). Out-of-range or omitted appends on top. A batch inserts in the
4105
+ * given order starting at this position.
4106
+ */
4107
+ at?: number;
4108
+ /**
4109
+ * What to do when the source slide size differs from this deck's. Default
4110
+ * (`false`/omitted) throws on any mismatch. Set it to rescale the lifted
4111
+ * shape's geometry onto this deck's canvas instead (mirrors
4112
+ * {@link ImportSlideOptions.rescale}, scoped to one shape):
4113
+ *
4114
+ * - `'fit'` (or `true`): uniform scale by `min(sx, sy)`, slack centered — the
4115
+ * shape keeps its aspect ratio (circles stay circles, rotations hold) and
4116
+ * lands at the position it would occupy on a centered copy of the source
4117
+ * canvas. Matches PowerPoint's "Ensure Fit".
4118
+ * - `'stretch'`: independent per-axis scale; distorts. Matches "Maximize".
4119
+ *
4120
+ * Only *geometry* is rescaled — the shape/group/graphicFrame transform
4121
+ * (`a:off`/`a:ext`) and any table grid (`a:gridCol@w`, `a:tr@h`). Font sizes,
4122
+ * line widths, and other absolute sizes are left as authored, so heavy
4123
+ * down-scaling can leave text overflowing its (now smaller) box. Explicit
4124
+ * `left`/`top`/`width`/`height` overrides are applied *after* rescale and win.
4125
+ * @default false
4126
+ */
4127
+ rescale?: boolean | 'fit' | 'stretch';
4128
+ /**
4129
+ * Carry the lifted shape's build animation across (default `false`). A shape's
4130
+ * entrance/emphasis/exit build lives in the slide-scoped `p:timing`, not in the
4131
+ * shape subtree, so it is dropped unless opted in. When set, the shape's effect
4132
+ * click-group(s) and `<p:bldP>` are copied into the destination `p:timing`
4133
+ * (created if absent), their `spid` references remapped to the shape's new id and
4134
+ * their `<p:cTn>` ids renumbered to stay collision-free, and appended after any
4135
+ * existing build — mirroring how PowerPoint merges a pasted shape's animation
4136
+ * (see the `import-animation-merge` oracle). @default false
4137
+ */
4138
+ carryAnimation?: boolean;
4139
+ }
4140
+ /** A master brought across by {@link Presentation.importSlideMasters}. */
4141
+ interface ImportedSlideMaster {
4142
+ /** Partname of the copied master in this (destination) package. */
4143
+ partName: string;
4144
+ /** Partnames of the layouts copied under it, in source `p:sldLayoutIdLst` order. */
4145
+ layoutPartNames: string[];
4146
+ }
4147
+ /** Options for {@link Presentation.importSlideMasters}. */
4148
+ interface ImportSlideMastersOptions {
4149
+ /**
4150
+ * Pick which of the source's masters to graft. Receives the master's `p:cSld`
4151
+ * `name` (`''` when unnamed) and its zero-based index in the source's
4152
+ * `p:sldMasterIdLst`. Default: every master.
4153
+ */
4154
+ masters?: (name: string, index: number) => boolean;
4155
+ /**
4156
+ * Pick which layouts under each grafted master to bring. Receives the layout's
4157
+ * `p:cSld` `name` and its zero-based index within that master's
4158
+ * `p:sldLayoutIdLst`. Default: the whole family.
4159
+ */
4160
+ layouts?: (name: string, index: number) => boolean;
4161
+ /**
4162
+ * Require the source and destination slide sizes to match (default `true`).
4163
+ * A grafted master is shipped into the layout gallery, not applied to existing
4164
+ * slides — but a layout authored at a different canvas size shows up mis-scaled
4165
+ * in that gallery, so the guard is on by default. Pass `false` to graft anyway.
4166
+ */
4167
+ requireEqualSize?: boolean;
4168
+ /**
4169
+ * Carry the *source deck's* embedded fonts (`p:embeddedFontLst` in its
4170
+ * `presentation.xml`) into this deck, so a slide later bound to a grafted layout
4171
+ * keeps that layout's embedded faces on machines that lack the font locally.
4172
+ * Off by default — fonts live on the presentation, not the master, and copying
4173
+ * them can add megabytes — so they are only worth carrying when you want the
4174
+ * embed to travel with the gallery.
4175
+ *
4176
+ * Semantics are identical to {@link ImportSlideOptions.embedFonts}: binaries are
4177
+ * copied under fresh `/ppt/fonts/` names (deduped via the per-source copy
4178
+ * registry, so a re-call carries each face once), the `application/x-fontdata`
4179
+ * Default is added, and entries merge into this deck's `p:embeddedFontLst`
4180
+ * de-duplicated by `typeface` + face slot. The carry is a whole-deck operation —
4181
+ * it copies *all* the source's embedded fonts, not only the faces the grafted
4182
+ * masters use, since the source list does not record which face belongs to which
4183
+ * master.
4184
+ * @default false
4185
+ */
4186
+ embedFonts?: boolean;
4187
+ /**
4188
+ * Carry the *source deck's* table styles (`ppt/tableStyles.xml`) into this deck,
4189
+ * so a table inserted on a grafted layout picks up the source's table styling
4190
+ * instead of this deck's. Off by default: it rewrites an existing part rather than
4191
+ * only adding new ones, so it is opt-in like {@link embedFonts}.
4192
+ *
4193
+ * Without it a grafted master's layouts arrive but its table styling does not, and
4194
+ * a new table falls back to whatever default this deck carries — for a generated
4195
+ * deck, a stub whose default is the standard *Medium Style 2 - Accent 1*. The
4196
+ * mismatch is visible: the same table renders in a different accent than it would
4197
+ * in the source deck.
4198
+ *
4199
+ * Styles union by `styleId` (a style this deck already defines wins, so a re-call
4200
+ * is idempotent), while `a:tblStyleLst@def` — the default table style — is
4201
+ * **source-wins**. Carrying the styles without the `def` would not fix the
4202
+ * mismatch: the standard default GUID is one most templates *also* define, so the
4203
+ * default would still resolve to the wrong style. The carry is whole-deck — it
4204
+ * copies *all* the source's table styles, not only those the grafted masters use,
4205
+ * since `tableStyles.xml` does not record which style belongs to which master.
4206
+ * @default false
4207
+ */
4208
+ tableStyles?: boolean;
4209
+ /**
4210
+ * Move the grafted masters to the front of `p:sldMasterIdLst`, ahead of the ones
4211
+ * this deck already had, keeping their import order. Off by default: which master
4212
+ * leads is a statement about what the deck *is*, so it is the caller's call rather
4213
+ * than a side effect of grafting.
4214
+ *
4215
+ * `p:sldMasterIdLst` order is not part of theme resolution — a slide resolves
4216
+ * through its own layout's master, so this changes no existing slide's appearance.
4217
+ * What it changes is the deck's identity in PowerPoint's UI: the list's first entry
4218
+ * becomes `Designs(1)`, which is the theme the Design tab shows and the one
4219
+ * Design ▸ Variants applies. Graft a brand master into a generated deck without
4220
+ * this and the deck still presents as the generator's stock theme, because the
4221
+ * stub master was there first.
4222
+ *
4223
+ * Reordering rewrites nothing but the list: relationships, ids, and every part
4224
+ * outside `presentation.xml` are untouched, and a re-call is a no-op once the
4225
+ * grafted masters already lead.
4226
+ * @default false
4227
+ */
4228
+ primary?: boolean;
4229
+ }
4230
+ /** A layout in this deck's gallery, addressable as an {@link AppendSlidesOptions} target. */
4231
+ interface LayoutHandle {
4232
+ /** Partname of the layout in this package (e.g. `/ppt/slideLayouts/slideLayout2.xml`). */
4233
+ partName: string;
4234
+ /** The layout's `p:cSld@name` (`''` when unnamed). */
4235
+ name: string;
4236
+ /** Partname of the master this layout belongs to. */
4237
+ masterPartName: string;
4238
+ /** Zero-based index of the master in `p:sldMasterIdLst`. */
4239
+ masterIndex: number;
4240
+ /** Zero-based index of the layout within its master's `p:sldLayoutIdLst`. */
4241
+ layoutIndex: number;
4242
+ }
4243
+ /**
4244
+ * One authored slide, extracted from a generator for injection into an existing
4245
+ * package. The slide body XML references its media/hyperlinks by relationship id
4246
+ * only, so {@link Presentation.appendSlides} preserves each `rId` and only
4247
+ * repoints its target — see {@link SlideSource}.
4248
+ */
4249
+ interface ExtractedSlide {
4250
+ /** Standalone `<p:sld>` part body (XML declaration + namespaces included). */
4251
+ xml: string;
4252
+ /** Image media the body references, keyed by the `rId` used in {@link xml}. */
4253
+ media: Array<{
4254
+ rId: number;
4255
+ bytes: Uint8Array;
4256
+ extn: string;
4257
+ contentType: string;
4258
+ }>;
4259
+ /** External hyperlink rels, keyed by the `rId` used in {@link xml}. */
4260
+ hyperlinks: Array<{
4261
+ rId: number;
4262
+ target: string;
4263
+ }>;
4264
+ /**
4265
+ * Charts the body references, keyed by the `rId` used in {@link xml}. Each carries
4266
+ * the chart part XML and its embedded workbook bytes; the chart part's own `.rels`
4267
+ * (workbook reference) is rebuilt by {@link Presentation.appendSlides}.
4268
+ */
4269
+ charts: ExtractedChart[];
4270
+ /** Internal slide-to-slide links: the `rId` used in {@link xml} → 1-based source slide number. */
4271
+ slideLinks: Array<{
4272
+ rId: number;
4273
+ sourceSlideNumber: number;
4274
+ }>;
4275
+ /**
4276
+ * Embedded audio/video the body references. Each item is one media binary backed
4277
+ * by two rels sharing a Target — the ECMA `audio`/`video` rel (`mediaRid`) and the
4278
+ * MS-2007 `media` rel (`msMediaRid`) — plus a separate preview image rel
4279
+ * (`previewRid`). {@link Presentation.appendSlides} reproduces this rel graph.
4280
+ */
4281
+ avMedia: AvMediaItem[];
4282
+ /**
4283
+ * Online (external-link) video the body references. Each item is two *external*
4284
+ * rels sharing one link Target — the ECMA `video` rel (`mediaRid`) and the MS-2007
4285
+ * `media` rel (`msMediaRid`) — with **no** media binary part. The poster frame is a
4286
+ * normal image rel carried by {@link media}. {@link Presentation.appendSlides}
4287
+ * wires the two external rels without reserving a media part or content type.
4288
+ */
4289
+ onlineMedia: OnlineMediaItem[];
4290
+ /**
4291
+ * The slide's speaker notes, or `undefined` when it has none. Carried as a ready
4292
+ * `<p:notes>` part body plus its external hyperlink rels;
4293
+ * {@link Presentation.appendSlides} creates the notes part, wires it to the appended
4294
+ * slide, and binds it to a notes master (see {@link ExtractedSlides.notesMaster}).
4295
+ */
4296
+ notes?: ExtractedNotes;
4297
+ }
4298
+ /** One slide's speaker notes, extracted for {@link Presentation.appendSlides}. */
4299
+ interface ExtractedNotes {
4300
+ /** Standalone `<p:notes>` part body (XML declaration + namespaces included). */
4301
+ xml: string;
4302
+ /**
4303
+ * External hyperlink rels the notes body references, keyed by the `rId` used in
4304
+ * {@link xml}. Notes rels reserve `rId1` for the notes master and `rId2` for the
4305
+ * slide, so these start at `rId3`. Notes support external `url` links only.
4306
+ */
4307
+ hyperlinks: Array<{
4308
+ rId: number;
4309
+ target: string;
4310
+ }>;
4311
+ }
4312
+ /**
4313
+ * One chart extracted for {@link Presentation.appendSlides}, keyed by the `rId` the slide
4314
+ * body uses to reference it.
4315
+ *
4316
+ * A classic (2007, `c:chartSpace`) chart is one part plus its embedded workbook. A chartEx
4317
+ * (Office 2016 — waterfall, funnel, treemap, ...) chart is a different part in a different
4318
+ * namespace, reached through a different relationship type, and PowerPoint reports it as
4319
+ * corrupt without its two style sidecars — so {@link chartEx} carries them and its presence
4320
+ * is what tells the two shapes apart.
4321
+ */
4322
+ interface ExtractedChart {
4323
+ /** Body `rId` of the slide's rel pointing at the chart part. */
4324
+ rId: number;
4325
+ /** The chart part body: `<c:chartSpace>` for a classic chart, `<cx:chartSpace>` for a chartEx one. */
4326
+ chartXml: string;
4327
+ /** The chart's embedded `.xlsx` workbook, the data source PowerPoint opens on edit. */
4328
+ embeddingBytes: Uint8Array;
4329
+ /**
4330
+ * Present only for a chartEx chart, and then always with both sidecars. A chartEx part
4331
+ * *requires* a chart-style and a color-style part or PowerPoint reports the deck as
4332
+ * corrupt (`0x80070570`) — schema-valid but unopenable — so these are not optional and
4333
+ * {@link Presentation.appendSlides} injects them alongside the chart part.
4334
+ */
4335
+ chartEx?: {
4336
+ /** `cs:chartStyle` body for the chart's `style{N}.xml` part. */
4337
+ styleXml: string;
4338
+ /** `cs:colorStyle` body for the chart's `colors{N}.xml` part. */
4339
+ colorsXml: string;
4340
+ };
4341
+ }
4342
+ /** One embedded audio/video item extracted for {@link Presentation.appendSlides}. */
4343
+ interface AvMediaItem {
4344
+ /** Whether the item is `audio` (`<a:audioFile>`) or `video` (`<a:videoFile>`). */
4345
+ mtype: 'audio' | 'video';
4346
+ /** Body `rId` of the ECMA `audio`/`video` rel (`r:link`); points at the media part. */
4347
+ mediaRid: number;
4348
+ /** Body `rId` of the MS-2007 `media` rel (`p14:media r:embed`); shares the media part Target. */
4349
+ msMediaRid: number;
4350
+ /** Body `rId` of the preview image rel (`a:blip r:embed` in the blipFill). */
4351
+ previewRid: number;
4352
+ /** The audio/video binary the media part will hold. */
4353
+ mediaBytes: Uint8Array;
4354
+ /** Media file extension (no dot), e.g. `mp4`, `mp3`. */
4355
+ mediaExtn: string;
4356
+ /** OPC content type for the media part (PowerPoint-authored, e.g. `audio/mpeg`). */
4357
+ mediaContentType: string;
4358
+ /** The preview/poster image bytes. */
4359
+ previewBytes: Uint8Array;
4360
+ /** Preview image extension (no dot), e.g. `png`. */
4361
+ previewExtn: string;
4362
+ /** OPC content type for the preview image part. */
4363
+ previewContentType: string;
4364
+ }
4365
+ /** One online (external-link) video item extracted for {@link Presentation.appendSlides}. */
4366
+ interface OnlineMediaItem {
4367
+ /** Body `rId` of the ECMA `video` rel (`a:videoFile r:link`); External, no part. */
4368
+ mediaRid: number;
4369
+ /** Body `rId` of the MS-2007 `media` rel (`p14:media r:link`); External, shares the link Target. */
4370
+ msMediaRid: number;
4371
+ /** The external video link both rels point at (`TargetMode="External"`). */
4372
+ link: string;
4373
+ }
4374
+ /** A generator's authored slides + canvas size, the input to {@link Presentation.appendSlides}. */
4375
+ interface ExtractedSlides {
4376
+ widthEmu: number;
4377
+ heightEmu: number;
4378
+ slides: ExtractedSlide[];
4379
+ /**
4380
+ * The generator's presentation-level embedded font faces (`pptx.embedFont`),
4381
+ * carried into the destination deck by {@link Presentation.appendSlides}. Each
4382
+ * face carries its raw `bytes`. Empty when the generator embeds no fonts.
4383
+ */
4384
+ embeddedFonts: EmbeddedFont[];
4385
+ /**
4386
+ * A notes master to fall back on, present only when at least one slide carries notes.
4387
+ *
4388
+ * A notes slide must bind to a notes master, and a destination template often has
4389
+ * none — a deck authored without speaker notes carries no `notesMaster` part. So the
4390
+ * generator's own notes master rides along, and {@link Presentation.appendSlides}
4391
+ * installs it (with its theme) **only** when the destination has none. When the
4392
+ * destination already has one, it wins and this is discarded — matching the
4393
+ * `importNotes` policy, where the destination's notes styling also wins.
4394
+ */
4395
+ notesMaster?: {
4396
+ xml: string;
4397
+ themeXml: string;
4398
+ };
4399
+ }
4400
+ /**
4401
+ * Structural view of a slide producer (a `TsPptx` instance satisfies this).
4402
+ * Kept structural so the read subsystem never imports the generator at runtime.
4403
+ */
4404
+ interface SlideSource {
4405
+ extractSlides(opts?: {
4406
+ onMediaError?: 'throw' | 'placeholder';
4407
+ }): Promise<ExtractedSlides>;
4408
+ }
4409
+ /** Options for {@link Presentation.appendSlides}. */
4410
+ interface AppendSlidesOptions {
4411
+ /** Target layout to bind every appended slide to: by `p:cSld@name` or a {@link LayoutHandle}. */
4412
+ layout: string | LayoutHandle;
4413
+ /**
4414
+ * Zero-based `p:sldIdLst` position for the first appended slide; subsequent
4415
+ * slides follow it in order. Omitted/out-of-range appends at the end.
4416
+ */
4417
+ at?: number;
4418
+ /** How `addImage` media errors surface during extraction (default `'throw'`). */
4419
+ onMediaError?: 'throw' | 'placeholder';
4420
+ }
4421
+ /** One selected native source page and its final zero-based destination position. */
4422
+ interface ImportSlidesRequest {
4423
+ /** Already-loaded source presentation whose immutable package bytes own the page. */
4424
+ source: Presentation;
4425
+ /**
4426
+ * Zero-based source slide index. Naming one source page in several requests is
4427
+ * how a batch asks for several independent copies of it.
4428
+ */
4429
+ sourceIndex: number;
4430
+ /** Zero-based position in the complete destination slide list after this batch. */
4431
+ outputIndex: number;
4432
+ /**
4433
+ * Carry this page's speaker notes (`notesSlideN.xml`) across, as
4434
+ * `importSlide`'s {@link ImportSlideOptions.importNotes} does. Default false:
4435
+ * the slide copy drops the `notesSlide` relationship, so the imported page
4436
+ * arrives without notes.
4437
+ *
4438
+ * Per request rather than per batch because a stitch mixes sources — the
4439
+ * notes of a library's cover page are worth carrying where a scratch deck's
4440
+ * are not. The deck-wide half of the policy is not per request: a
4441
+ * presentation holds at most one `notesMaster`, so the destination's own is
4442
+ * reused when it has one and the first carried master is installed when it
4443
+ * has none, exactly as `importSlide` and `appendSlides` do.
4444
+ */
4445
+ importNotes?: boolean;
4446
+ }
4447
+ /** Options for {@link Presentation.fromTemplate}. */
4448
+ interface FromTemplateOptions {
4449
+ /**
4450
+ * Keep a `.potx` main part's `…template.main+xml` content type instead of
4451
+ * normalizing it to the editable `…presentation.main+xml` type. Off by default
4452
+ * (the saved package opens as an editable deck, not a template). No effect on a
4453
+ * `.pptx` input, whose main part is already editable.
4454
+ */
4455
+ keepTemplateContentType?: boolean;
4456
+ }
4457
+ //#endregion
4458
+ export { CellThreeD as $, SlideBackground as $t, Theme as A, Paragraph as At, ModernCommentAuthor as B, Glow as Bt, TransitionInfo as C, Shape as Ct, Placeholder as D, BulletDetail as Dt, ColorMapToken as E, BodyProperties as Et, readTagsForPart as F, ChildFrame as Ft, isAutoShape as G, Recolor as Gt, NotesSlide as H, LineEnd as Ht, Comment as I, ConnectionSite as It, isGroupShape as J, ShapeType as Jt, isConnector as K, RecolorColor as Kt, CommentAuthor as L, CustomGeometry as Lt, ThemeFontFace as M, RunHyperlink as Mt, ThemeFontScheme as N, TextFrame as Nt, SlideLayout as O, BulletStyle as Ot, Tag as P, AbsoluteFrame as Pt, CellBorders as Q, BackgroundSource as Qt, CommentSchema as R, CustomGeometryPath as Rt, Slide as S, AutoShape as St, TransitionSpeed as T, AutofitMode as Tt, AnyShape as U, LineEnds as Ut, NotesPlaceholder as V, InnerShadow as Vt, GroupShape as W, OuterShadow as Wt, GraphicFrame as X, PatternFill as Xt, isPicture as Y, SoftEdge as Yt, CellBorder as Z, BackgroundFill as Zt, CustomProperty as _, ChartLegend as _t, ExtractedSlides as a, ResolvedColor as an, TableConditionFlags as at, AddPictureOptions as b, Connector as bt, ImportSlideMastersOptions as c, EmbeddedFontSlot as cn, ChartExAxis as ct, ImportedSlideMaster as d, ChartExSeries as dt, FillRect as en, Table as et, LayoutHandle as f, AxisNumberFormat as ft, CoreProperties as g, ChartFill as gt, Presentation as h, ChartDataLabels as ht, ExtractedSlide as i, GradientStop as in, ResolvedTableStyle as it, ThemeColorSlot as j, Run as jt, SlideMaster as k, LineSpacing as kt, ImportSlideOptions as l, ChartExDataLabels as lt, SlideSource as m, ChartAxis as mt, EmbeddedFontFaceInfo as n, PictureFillTile as nn, TableCellBorderEdit as nt, FromTemplateOptions as o, resolveColorElement as on, TableCellEdge as ot, SlideSize as p, Chart as pt, isGraphicFrame as q, Reflection as qt, EmbeddedFontInfo as r, GradientFill as rn, TableRow as rt, ImportShapeOptions as s, ColorContext as sn, ChartEx as st, AppendSlidesOptions as t, PictureFill as tn, TableCell as tt, ImportSlidesRequest as u, ChartExLegend as ut, readCoreProperties as v, ChartLine as vt, TransitionInput as w, ShapeHost as wt, AddTextBoxOptions as x, Picture as xt, readCustomProperties as y, ChartSeries as yt, ModernComment as z, GeometryCommand as zt };
4459
+ //# sourceMappingURL=presentation-types-B50aOUFI.d.ts.map