@shbernal/ts-pptx 0.0.1
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/LICENSE +22 -0
- package/README.md +238 -0
- package/dist/autopage-tmfjRzL4.js +420 -0
- package/dist/autopage-tmfjRzL4.js.map +1 -0
- package/dist/browser.d.ts +23 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +103 -0
- package/dist/browser.js.map +1 -0
- package/dist/diagnostics-DYQC7xLV.js +0 -0
- package/dist/diagnostics-DYQC7xLV.js.map +1 -0
- package/dist/diagnostics-DzY9Tyfm.d.ts +693 -0
- package/dist/diagnostics-DzY9Tyfm.d.ts.map +1 -0
- package/dist/embedded-fonts-MaynAHa9.js +94 -0
- package/dist/embedded-fonts-MaynAHa9.js.map +1 -0
- package/dist/enums-D3aF4QGb.d.ts +452 -0
- package/dist/enums-D3aF4QGb.d.ts.map +1 -0
- package/dist/errors-DGE9zh3U.js +93 -0
- package/dist/errors-DGE9zh3U.js.map +1 -0
- package/dist/errors-DRLpOpgQ.d.ts +160 -0
- package/dist/errors-DRLpOpgQ.d.ts.map +1 -0
- package/dist/fit-CbxyHN69.js +0 -0
- package/dist/fit-CbxyHN69.js.map +1 -0
- package/dist/html-dom-wVa3TiG7.js +666 -0
- package/dist/html-dom-wVa3TiG7.js.map +1 -0
- package/dist/html.d.ts +26 -0
- package/dist/html.d.ts.map +1 -0
- package/dist/html.js +60 -0
- package/dist/html.js.map +1 -0
- package/dist/image-size-C5Z1sKof.js +252 -0
- package/dist/image-size-C5Z1sKof.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +75 -0
- package/dist/index.js.map +1 -0
- package/dist/inspect.d.ts +173 -0
- package/dist/inspect.d.ts.map +1 -0
- package/dist/inspect.js +285 -0
- package/dist/inspect.js.map +1 -0
- package/dist/math.d.ts +37 -0
- package/dist/math.d.ts.map +1 -0
- package/dist/math.js +106 -0
- package/dist/math.js.map +1 -0
- package/dist/measure.d.ts +223 -0
- package/dist/measure.d.ts.map +1 -0
- package/dist/measure.js +3 -0
- package/dist/node.d.ts +12 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +60 -0
- package/dist/node.js.map +1 -0
- package/dist/package-CaOLXSNi.d.ts +193 -0
- package/dist/package-CaOLXSNi.d.ts.map +1 -0
- package/dist/pres-5x1bjCzk.d.ts +202 -0
- package/dist/pres-5x1bjCzk.d.ts.map +1 -0
- package/dist/presentation-B0JWdTN1.js +4286 -0
- package/dist/presentation-B0JWdTN1.js.map +1 -0
- package/dist/presentation-RGOiun5P.d.ts +3249 -0
- package/dist/presentation-RGOiun5P.d.ts.map +1 -0
- package/dist/presentation-types-BVw0EknS.d.ts +538 -0
- package/dist/presentation-types-BVw0EknS.d.ts.map +1 -0
- package/dist/read.d.ts +73 -0
- package/dist/read.d.ts.map +1 -0
- package/dist/read.js +4 -0
- package/dist/script.d.ts +553 -0
- package/dist/script.d.ts.map +1 -0
- package/dist/script.js +0 -0
- package/dist/script.js.map +1 -0
- package/dist/shapes-BZU8UTW2.js +5365 -0
- package/dist/shapes-BZU8UTW2.js.map +1 -0
- package/dist/slide-B6mDaM-P.d.ts +3396 -0
- package/dist/slide-B6mDaM-P.d.ts.map +1 -0
- package/dist/text-WRUbOy2r.js +11238 -0
- package/dist/text-WRUbOy2r.js.map +1 -0
- package/dist/units-B-JUKwCS.js +144 -0
- package/dist/units-B-JUKwCS.js.map +1 -0
- package/dist/units-internal-7JcMfYti.js +723 -0
- package/dist/units-internal-7JcMfYti.js.map +1 -0
- package/dist/zip.d.ts +68 -0
- package/dist/zip.d.ts.map +1 -0
- package/dist/zip.js +163 -0
- package/dist/zip.js.map +1 -0
- package/package.json +214 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-RGOiun5P.d.ts","names":[],"sources":["../src/read/oxml/theme.ts","../src/read/api/theme-context.ts","../src/read/api/gradient.ts","../src/read/api/picture-fill.ts","../src/read/api/slide-background.ts","../src/read/api/shapes/oxml.ts","../src/read/api/text.ts","../src/read/api/shapes/types.ts","../src/read/api/shapes/base.ts","../src/read/api/shapes/autoshape.ts","../src/read/api/shapes/picture.ts","../src/read/api/shapes/connector.ts","../src/read/api/chart.ts","../src/read/api/chartex.ts","../src/read/api/table-style-resolve.ts","../src/read/api/table.ts","../src/read/api/shapes/graphic-frame.ts","../src/read/api/shapes.ts","../src/read/api/notes.ts","../src/read/api/comments.ts","../src/read/api/tags.ts","../src/read/api/chrome.ts","../src/read/api/transition.ts","../src/read/api/slide.ts","../src/read/api/document-properties.ts","../src/read/api/presentation.ts"],"mappings":";;;;;;;;;;UAiGiB;EAChB,QAAQ;EACR,WAAW;;;;;;;UAQK,uBAAuB;EACvC,WAAW;;;;;;;;EAQX,sBAAsB;;;;;;EAMtB,aAAa;;;;;;EAMb,aAAa;;;;;;;EAOb,aAAa;;;;;;;;;;EAUb,aAAa;;;;;;;;;EASb,mBAAmB;;;;;UC+EH;EAChB;EACA;;;KAmJW;;UAGK;EAChB;EACA;EACA;EACA;EACA,QAAQ;;;;;;;;;;;;;;;UAyCQ;EAChB;EACA;IAAc;IAAc;;EAC5B;EACA;;;;;;;;;iBAUe,oBAAoB,SAAS,gBAAgB,KAAK,eAAe;;UAmDhE;;EAEhB,OAAO;;EAEP;;;;;UCzegB;;EAEhB;;EAEA;;EAEA;;;;;;;;EAQA;;EAEA;;;;;;;;;;;UAYgB;;EAEhB;;EAEA;;EAEA;;EAEA,OAAO;;;;;UChCS;EAChB;EACA;EACA;EACA;;;;;;;UAQgB;;EAEhB;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;UAcgB;;EAEhB;;EAEA;;EAEA;;EAEA,SAAS;;EAET,UAAU;;EAEV,MAAM;;EAEN;;EAEA;;EAEA;;;;;KC3CW;;;;;;;;;;;KAYA;EACP;EAAe,OAAO;;EACtB;EAAkB,UAAU;;EAC5B;EAAe,SA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SAAS,sBAAsB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;EAmL/E,YAAY,QAAQ,OAAO,QAAQ,OAAO,oBAAoB,UAAS,qBAA0B;;;;;;;;EAiBjG,aAAa,QAAQ,OAAO,QAAQ,OAAO,wBAAwB,UAAS,qBAA0B;;EAmdhG,QAAQ,QAAQ"}
|
|
@@ -0,0 +1,538 @@
|
|
|
1
|
+
//#region src/embedded-fonts.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* The four face slots of `CT_EmbeddedFontListEntry`, in schema child order
|
|
4
|
+
* (`font` first, then these). Iterate in this order everywhere so the read- and
|
|
5
|
+
* write-side emitters agree on element order.
|
|
6
|
+
*/
|
|
7
|
+
declare const EMBEDDED_FONT_SLOTS: readonly ["regular", "bold", "italic", "boldItalic"];
|
|
8
|
+
type EmbeddedFontSlot = (typeof EMBEDDED_FONT_SLOTS)[number];
|
|
9
|
+
/** One embeddable face: a slot plus the raw font bytes (absent in pure read-side merges). */
|
|
10
|
+
interface EmbeddedFontFace {
|
|
11
|
+
slot: EmbeddedFontSlot;
|
|
12
|
+
bytes?: Uint8Array;
|
|
13
|
+
}
|
|
14
|
+
/** A typeface family with 1..4 embedded faces — one `p:embeddedFont` entry. */
|
|
15
|
+
interface EmbeddedFont {
|
|
16
|
+
/** `p:font/@typeface` — MUST match the family name used in run/`fontFace` typefaces or PowerPoint won't bind it. */
|
|
17
|
+
typeface: string;
|
|
18
|
+
panose?: string;
|
|
19
|
+
pitchFamily?: number;
|
|
20
|
+
charset?: number;
|
|
21
|
+
faces: EmbeddedFontFace[];
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/read/api/presentation-types.d.ts
|
|
25
|
+
/** Slide dimensions, in both EMU (the OOXML unit) and inches. */
|
|
26
|
+
interface SlideSize {
|
|
27
|
+
widthEmu: number;
|
|
28
|
+
heightEmu: number;
|
|
29
|
+
widthIn: number;
|
|
30
|
+
heightIn: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* One `p:embeddedFont` entry, read from `presentation.xml`'s `p:embeddedFontLst`
|
|
34
|
+
* (see {@link Presentation.embeddedFonts}). A read-only view: it names the family
|
|
35
|
+
* and resolves each embedded face's `r:id` to the absolute partname of its binary
|
|
36
|
+
* `/ppt/fonts/*.fntdata` part, so a consumer can enumerate the embedded faces and
|
|
37
|
+
* pull their bytes without hand-parsing the presentation part or its rels.
|
|
38
|
+
*/
|
|
39
|
+
interface EmbeddedFontInfo {
|
|
40
|
+
/** `p:font/@typeface` — the family name PowerPoint binds the embed to. */
|
|
41
|
+
typeface: string;
|
|
42
|
+
/** `p:font/@panose`, or `null` when the entry declares none. */
|
|
43
|
+
panose: string | null;
|
|
44
|
+
/** The embedded faces, in `regular, bold, italic, boldItalic` schema order. */
|
|
45
|
+
faces: EmbeddedFontFaceInfo[];
|
|
46
|
+
}
|
|
47
|
+
/** One face of an {@link EmbeddedFontInfo}: which slot it fills and the part its `r:id` resolves to. */
|
|
48
|
+
interface EmbeddedFontFaceInfo {
|
|
49
|
+
/** Which weight/style slot this face fills. */
|
|
50
|
+
slot: 'regular' | 'bold' | 'italic' | 'boldItalic';
|
|
51
|
+
/** Absolute partname of the face's binary `.fntdata` part (e.g. `/ppt/fonts/font1.fntdata`). */
|
|
52
|
+
partName: string;
|
|
53
|
+
}
|
|
54
|
+
/** Options for {@link Presentation.importSlide}. */
|
|
55
|
+
interface ImportSlideOptions {
|
|
56
|
+
/**
|
|
57
|
+
* How the imported slide relates to themes.
|
|
58
|
+
*
|
|
59
|
+
* - `'copy'` (default): bring the slide's own `slideLayout → slideMaster →
|
|
60
|
+
* theme` subgraph across, so the slide renders byte-for-byte as authored.
|
|
61
|
+
* A deck stitched from N sources then carries N themes/masters.
|
|
62
|
+
* - `'preserve'`: *flatten then attach* — bake the source theme's colours and
|
|
63
|
+
* style-matrix fills into the slide XML (so its pixels do not change), then
|
|
64
|
+
* bind it to this deck's existing master/layout instead of importing the
|
|
65
|
+
* source theme. The result is a single-theme file whose imported slides are
|
|
66
|
+
* theme-independent: it fixes renderers that mis-resolve per-slide scheme
|
|
67
|
+
* colours against the wrong (first) theme, and tidies the deck for handoff.
|
|
68
|
+
*
|
|
69
|
+
* To stay faithful across the rebind, `preserve` also bakes the inheritance
|
|
70
|
+
* the rebind would otherwise break explicitly onto the slide: the slide's
|
|
71
|
+
* effective background; each placeholder's *inherited* geometry (`a:xfrm`
|
|
72
|
+
* from the matching source layout/master placeholder) so it cannot shift or
|
|
73
|
+
* clip; and each placeholder run's *inherited* colour and size/weight
|
|
74
|
+
* (`sz`/`b`/`i`) from the source layout/master text styles. Typeface
|
|
75
|
+
* (`a:latin`) is left to re-bind to the destination theme, like `fontRef`.
|
|
76
|
+
* By default it does **not** carry decorative graphics that live on the source
|
|
77
|
+
* master/layout shape tree (logos, accent shapes): those belong to the
|
|
78
|
+
* master `preserve` deliberately drops. Set {@link carryMasterGraphics} to
|
|
79
|
+
* bake them onto the slide instead.
|
|
80
|
+
* - `'restyle'`: re-brand to *this* deck. Rebind the slide to this deck's
|
|
81
|
+
* master/layout exactly like `preserve` but **skip the flatten** — leave every
|
|
82
|
+
* `a:schemeClr`, style-matrix ref (`fillRef`/`lnRef`/`effectRef`/`fontRef`),
|
|
83
|
+
* and `p:bg` `bgRef` symbolic so they re-resolve against the *destination*
|
|
84
|
+
* theme. The slide keeps its geometry, text, and structure but adopts this
|
|
85
|
+
* deck's colours/fonts: `preserve` makes it "look the same everywhere",
|
|
86
|
+
* `restyle` makes it "look like mine". The slide's own `p:clrMapOvr` is dropped
|
|
87
|
+
* so the destination master's `clrMap` governs the re-brand.
|
|
88
|
+
*
|
|
89
|
+
* **Load-bearing limitation:** `restyle` can only recolour what is *symbolic*.
|
|
90
|
+
* Anything the source authored as a literal `a:srgbClr` has no theme reference
|
|
91
|
+
* to re-resolve and stays exactly that colour, so a slide with a baked literal
|
|
92
|
+
* palette re-brands little or nothing. Use `restyle` for slides built against
|
|
93
|
+
* theme colours/style matrices, not hardcoded RGB — or set {@link remapLiterals}
|
|
94
|
+
* to force-remap literals and copy table styles. Re-brand is inherently a
|
|
95
|
+
* visual change (a source `accent1` light-on-dark can invert against a dark
|
|
96
|
+
* destination `accent1`), so its output needs visual QA. A restyled table
|
|
97
|
+
* resolves its `@tableStyleId` against the *destination* `tableStyles`; if the
|
|
98
|
+
* destination lacks that id the table falls back (which {@link remapLiterals}
|
|
99
|
+
* also addresses by copying the source style across).
|
|
100
|
+
*/
|
|
101
|
+
theme?: 'copy' | 'preserve' | 'restyle';
|
|
102
|
+
/**
|
|
103
|
+
* `restyle` mode only. Push the re-brand past what symbolic references reach, for
|
|
104
|
+
* slides whose palette is partly hardcoded. When `true` it does two things the
|
|
105
|
+
* plain re-brand cannot:
|
|
106
|
+
*
|
|
107
|
+
* - **Literal colours** — every literal `a:srgbClr` equal to a *source*-theme
|
|
108
|
+
* `clrScheme` slot is rewritten back to a symbolic `a:schemeClr` (routed through
|
|
109
|
+
* the source `clrMap`), so it re-resolves against this deck's theme instead of
|
|
110
|
+
* staying its authored RGB. A literal matching no source slot is left untouched.
|
|
111
|
+
* - **Table styles** — any `@tableStyleId` the slide references is copied from the
|
|
112
|
+
* source `tableStyles.xml` into this deck's (same id, idempotent, leaving an id
|
|
113
|
+
* the destination already defines alone), so a restyled table keeps its style
|
|
114
|
+
* instead of falling back. The copied definition is itself symbolic, so it
|
|
115
|
+
* re-brands to this deck's theme.
|
|
116
|
+
*
|
|
117
|
+
* Off by default: it deliberately reinterprets authored literals as theme colours,
|
|
118
|
+
* which is a visual change that needs QA. Ignored unless `theme` is `'restyle'`.
|
|
119
|
+
*/
|
|
120
|
+
remapLiterals?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* `preserve`/`restyle` modes only. When `true`, bake the source
|
|
123
|
+
* `slideLayout`/`slideMaster` shape-tree decorations (everything on those shape
|
|
124
|
+
* trees *except* placeholders — logos, accent curves, footers drawn as shapes)
|
|
125
|
+
* onto the imported slide, behind its own content, so master/layout branding
|
|
126
|
+
* survives the rebind to this deck's master. Their media are copied across.
|
|
127
|
+
*
|
|
128
|
+
* Under `preserve` the carried decorations' theme references are flattened like
|
|
129
|
+
* the slide's own content; under `restyle` they are left symbolic and so
|
|
130
|
+
* re-brand to the destination palette along with the slide — note a carried
|
|
131
|
+
* source logo could recolour unexpectedly under a different palette.
|
|
132
|
+
*
|
|
133
|
+
* Off by default: it raises fidelity for cover/closer/divider slides at the
|
|
134
|
+
* cost of duplicating shapes that would otherwise live once on the shared
|
|
135
|
+
* master, so opt in only when that branding actually needs to travel with the
|
|
136
|
+
* slide. Ignored unless `theme` is `'preserve'` or `'restyle'`.
|
|
137
|
+
*/
|
|
138
|
+
carryMasterGraphics?: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Zero-based insert position in `p:sldIdLst` (deck order). `0` makes the
|
|
141
|
+
* imported slide first; an `at` past the current slide count — or omitting it —
|
|
142
|
+
* appends. Use it to place brand bookends (cover at `0`, closer appended)
|
|
143
|
+
* around generator-authored interior slides regardless of import order.
|
|
144
|
+
*/
|
|
145
|
+
at?: number;
|
|
146
|
+
/**
|
|
147
|
+
* Carry the *source deck's* embedded fonts (`p:embeddedFontLst` in its
|
|
148
|
+
* `presentation.xml`) into this deck, so an imported slide that renders with an
|
|
149
|
+
* embedded face keeps it on machines that lack the font. Off by default —
|
|
150
|
+
* fonts live on the presentation, not the slide, so they are only worth copying
|
|
151
|
+
* when you want the embed to travel.
|
|
152
|
+
*
|
|
153
|
+
* The font binary parts are copied under fresh `/ppt/fonts/` names (deduped via
|
|
154
|
+
* the per-source copy registry, so repeated imports copy each face once), the
|
|
155
|
+
* `application/x-fontdata` Default is added, and entries are merged into this
|
|
156
|
+
* deck's `p:embeddedFontLst` — de-duplicated by `typeface` + face slot, so a
|
|
157
|
+
* face this deck already embeds is reused rather than duplicated. The carry is a
|
|
158
|
+
* whole-deck operation (it copies *all* the source's embedded fonts, not just the
|
|
159
|
+
* faces this one slide uses), since the source list does not record which slide
|
|
160
|
+
* uses which face.
|
|
161
|
+
* @default false
|
|
162
|
+
*/
|
|
163
|
+
embedFonts?: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* What to do when the source slide size differs from this deck's. By default
|
|
166
|
+
* (`false`) `importSlide` throws on any mismatch. Set it to rescale the imported
|
|
167
|
+
* geometry onto this deck's canvas instead:
|
|
168
|
+
*
|
|
169
|
+
* - `'fit'` (or `true`): uniform scale by `min(sx, sy)` then center, so aspect
|
|
170
|
+
* ratio is preserved (circles stay circles, rotations hold) and the slack on
|
|
171
|
+
* the longer axis becomes a centered margin. Matches PowerPoint's "Ensure Fit".
|
|
172
|
+
* - `'stretch'`: independent per-axis scale so the content fills the canvas;
|
|
173
|
+
* distorts shapes and cannot faithfully reposition rotated shapes. Matches
|
|
174
|
+
* "Maximize".
|
|
175
|
+
*
|
|
176
|
+
* Only *geometry* is rescaled — every top-level shape/group/graphicFrame
|
|
177
|
+
* transform (`a:off`/`a:ext`) and table grid (`a:gridCol@w`, `a:tr@h`). Font
|
|
178
|
+
* sizes, line widths, and other absolute sizes are left as authored, so heavy
|
|
179
|
+
* down-scaling can leave text overflowing its (now smaller) box. In `copy` mode
|
|
180
|
+
* the imported layout and master shape trees are rescaled too, so inherited
|
|
181
|
+
* placeholder and background geometry stays aligned; in `preserve`/`restyle` the
|
|
182
|
+
* slide rebinds to this deck's master/layout (already the right size), so only
|
|
183
|
+
* the slide is touched.
|
|
184
|
+
* @default false
|
|
185
|
+
*/
|
|
186
|
+
rescale?: boolean | 'fit' | 'stretch';
|
|
187
|
+
/**
|
|
188
|
+
* Carry the source slide's speaker notes across. By default (`false`) the
|
|
189
|
+
* `notesSlide` relationship is dropped, so the imported slide has no notes.
|
|
190
|
+
*
|
|
191
|
+
* When set, the source `notesSlide` is copied and wired to the imported slide.
|
|
192
|
+
* Its `slide` back-relationship is repointed at the new slide (the source slide
|
|
193
|
+
* is *not* copied). A presentation has at most one `notesMaster`: if this deck
|
|
194
|
+
* already has one, the imported notes reuse it (the source notesMaster and its
|
|
195
|
+
* theme are not copied); if it has none, the source notesMaster (and its theme)
|
|
196
|
+
* are copied and registered. The destination's notes styling therefore wins
|
|
197
|
+
* when both decks define one.
|
|
198
|
+
* @default false
|
|
199
|
+
*/
|
|
200
|
+
importNotes?: boolean;
|
|
201
|
+
}
|
|
202
|
+
/** Options for {@link Presentation.importShape} / {@link Presentation.importShapes}. */
|
|
203
|
+
interface ImportShapeOptions {
|
|
204
|
+
/**
|
|
205
|
+
* How the lifted shape relates to themes, mirroring {@link ImportSlideOptions}
|
|
206
|
+
* but scoped to one shape subtree:
|
|
207
|
+
*
|
|
208
|
+
* - `'preserve'` (default): bake the shape's scheme/style-matrix colours (and,
|
|
209
|
+
* for a lifted placeholder, its inherited geometry/colour/size/anchor/list
|
|
210
|
+
* style) to literals using the *source* slide's theme, so it keeps its look on
|
|
211
|
+
* a host slide whose theme differs. A lifted placeholder is also *demoted* to a
|
|
212
|
+
* plain shape (its `p:ph` stripped) once everything it inherited is baked, so it
|
|
213
|
+
* neither re-resolves against the host's placeholder of the same type/idx nor
|
|
214
|
+
* collides with it. The safe default for composing across decks.
|
|
215
|
+
* - `'restyle'`: leave the shape's theme references symbolic so it re-brands to
|
|
216
|
+
* the host theme. Only *symbolic* colours re-brand — literal `a:srgbClr` the
|
|
217
|
+
* source baked in stays put (same limitation as `importSlide` restyle).
|
|
218
|
+
* - `'copy'`: bring the shape's XML across untouched; only sane when the host
|
|
219
|
+
* already shares the source theme.
|
|
220
|
+
*
|
|
221
|
+
* Unlike a slide import this never runs the slide-scoped background passes — a
|
|
222
|
+
* background belongs to a slide, not to a composed shape.
|
|
223
|
+
*/
|
|
224
|
+
theme?: 'preserve' | 'restyle' | 'copy';
|
|
225
|
+
/** Override left edge (EMU). Omitted axes keep the shape's source `a:off`/`a:ext`. */
|
|
226
|
+
left?: number;
|
|
227
|
+
/** Override top edge (EMU). */
|
|
228
|
+
top?: number;
|
|
229
|
+
/** Override width (EMU); must be positive. */
|
|
230
|
+
width?: number;
|
|
231
|
+
/** Override height (EMU); must be positive. */
|
|
232
|
+
height?: number;
|
|
233
|
+
/**
|
|
234
|
+
* Insert position among the host shape tree's shape children (z-order, 0 =
|
|
235
|
+
* backmost). Out-of-range or omitted appends on top. A batch inserts in the
|
|
236
|
+
* given order starting at this position.
|
|
237
|
+
*/
|
|
238
|
+
at?: number;
|
|
239
|
+
/**
|
|
240
|
+
* What to do when the source slide size differs from this deck's. Default
|
|
241
|
+
* (`false`/omitted) throws on any mismatch. Set it to rescale the lifted
|
|
242
|
+
* shape's geometry onto this deck's canvas instead (mirrors
|
|
243
|
+
* {@link ImportSlideOptions.rescale}, scoped to one shape):
|
|
244
|
+
*
|
|
245
|
+
* - `'fit'` (or `true`): uniform scale by `min(sx, sy)`, slack centered — the
|
|
246
|
+
* shape keeps its aspect ratio (circles stay circles, rotations hold) and
|
|
247
|
+
* lands at the position it would occupy on a centered copy of the source
|
|
248
|
+
* canvas. Matches PowerPoint's "Ensure Fit".
|
|
249
|
+
* - `'stretch'`: independent per-axis scale; distorts. Matches "Maximize".
|
|
250
|
+
*
|
|
251
|
+
* Only *geometry* is rescaled — the shape/group/graphicFrame transform
|
|
252
|
+
* (`a:off`/`a:ext`) and any table grid (`a:gridCol@w`, `a:tr@h`). Font sizes,
|
|
253
|
+
* line widths, and other absolute sizes are left as authored, so heavy
|
|
254
|
+
* down-scaling can leave text overflowing its (now smaller) box. Explicit
|
|
255
|
+
* `left`/`top`/`width`/`height` overrides are applied *after* rescale and win.
|
|
256
|
+
* @default false
|
|
257
|
+
*/
|
|
258
|
+
rescale?: boolean | 'fit' | 'stretch';
|
|
259
|
+
/**
|
|
260
|
+
* Carry the lifted shape's build animation across (default `false`). A shape's
|
|
261
|
+
* entrance/emphasis/exit build lives in the slide-scoped `p:timing`, not in the
|
|
262
|
+
* shape subtree, so it is dropped unless opted in. When set, the shape's effect
|
|
263
|
+
* click-group(s) and `<p:bldP>` are copied into the destination `p:timing`
|
|
264
|
+
* (created if absent), their `spid` references remapped to the shape's new id and
|
|
265
|
+
* their `<p:cTn>` ids renumbered to stay collision-free, and appended after any
|
|
266
|
+
* existing build — mirroring how PowerPoint merges a pasted shape's animation
|
|
267
|
+
* (see the `import-animation-merge` oracle). @default false
|
|
268
|
+
*/
|
|
269
|
+
carryAnimation?: boolean;
|
|
270
|
+
}
|
|
271
|
+
/** A master brought across by {@link Presentation.importSlideMasters}. */
|
|
272
|
+
interface ImportedSlideMaster {
|
|
273
|
+
/** Partname of the copied master in this (destination) package. */
|
|
274
|
+
partName: string;
|
|
275
|
+
/** Partnames of the layouts copied under it, in source `p:sldLayoutIdLst` order. */
|
|
276
|
+
layoutPartNames: string[];
|
|
277
|
+
}
|
|
278
|
+
/** Options for {@link Presentation.importSlideMasters}. */
|
|
279
|
+
interface ImportSlideMastersOptions {
|
|
280
|
+
/**
|
|
281
|
+
* Pick which of the source's masters to graft. Receives the master's `p:cSld`
|
|
282
|
+
* `name` (`''` when unnamed) and its zero-based index in the source's
|
|
283
|
+
* `p:sldMasterIdLst`. Default: every master.
|
|
284
|
+
*/
|
|
285
|
+
masters?: (name: string, index: number) => boolean;
|
|
286
|
+
/**
|
|
287
|
+
* Pick which layouts under each grafted master to bring. Receives the layout's
|
|
288
|
+
* `p:cSld` `name` and its zero-based index within that master's
|
|
289
|
+
* `p:sldLayoutIdLst`. Default: the whole family.
|
|
290
|
+
*/
|
|
291
|
+
layouts?: (name: string, index: number) => boolean;
|
|
292
|
+
/**
|
|
293
|
+
* Require the source and destination slide sizes to match (default `true`).
|
|
294
|
+
* A grafted master is shipped into the layout gallery, not applied to existing
|
|
295
|
+
* slides — but a layout authored at a different canvas size shows up mis-scaled
|
|
296
|
+
* in that gallery, so the guard is on by default. Pass `false` to graft anyway.
|
|
297
|
+
*/
|
|
298
|
+
requireEqualSize?: boolean;
|
|
299
|
+
/**
|
|
300
|
+
* Carry the *source deck's* embedded fonts (`p:embeddedFontLst` in its
|
|
301
|
+
* `presentation.xml`) into this deck, so a slide later bound to a grafted layout
|
|
302
|
+
* keeps that layout's embedded faces on machines that lack the font locally.
|
|
303
|
+
* Off by default — fonts live on the presentation, not the master, and copying
|
|
304
|
+
* them can add megabytes — so they are only worth carrying when you want the
|
|
305
|
+
* embed to travel with the gallery.
|
|
306
|
+
*
|
|
307
|
+
* Semantics are identical to {@link ImportSlideOptions.embedFonts}: binaries are
|
|
308
|
+
* copied under fresh `/ppt/fonts/` names (deduped via the per-source copy
|
|
309
|
+
* registry, so a re-call carries each face once), the `application/x-fontdata`
|
|
310
|
+
* Default is added, and entries merge into this deck's `p:embeddedFontLst`
|
|
311
|
+
* de-duplicated by `typeface` + face slot. The carry is a whole-deck operation —
|
|
312
|
+
* it copies *all* the source's embedded fonts, not only the faces the grafted
|
|
313
|
+
* masters use, since the source list does not record which face belongs to which
|
|
314
|
+
* master.
|
|
315
|
+
* @default false
|
|
316
|
+
*/
|
|
317
|
+
embedFonts?: boolean;
|
|
318
|
+
/**
|
|
319
|
+
* Carry the *source deck's* table styles (`ppt/tableStyles.xml`) into this deck,
|
|
320
|
+
* so a table inserted on a grafted layout picks up the source's table styling
|
|
321
|
+
* instead of this deck's. Off by default: it rewrites an existing part rather than
|
|
322
|
+
* only adding new ones, so it is opt-in like {@link embedFonts}.
|
|
323
|
+
*
|
|
324
|
+
* Without it a grafted master's layouts arrive but its table styling does not, and
|
|
325
|
+
* a new table falls back to whatever default this deck carries — for a generated
|
|
326
|
+
* deck, a stub whose default is the standard *Medium Style 2 - Accent 1*. The
|
|
327
|
+
* mismatch is visible: the same table renders in a different accent than it would
|
|
328
|
+
* in the source deck.
|
|
329
|
+
*
|
|
330
|
+
* Styles union by `styleId` (a style this deck already defines wins, so a re-call
|
|
331
|
+
* is idempotent), while `a:tblStyleLst@def` — the default table style — is
|
|
332
|
+
* **source-wins**. Carrying the styles without the `def` would not fix the
|
|
333
|
+
* mismatch: the standard default GUID is one most templates *also* define, so the
|
|
334
|
+
* default would still resolve to the wrong style. The carry is whole-deck — it
|
|
335
|
+
* copies *all* the source's table styles, not only those the grafted masters use,
|
|
336
|
+
* since `tableStyles.xml` does not record which style belongs to which master.
|
|
337
|
+
* @default false
|
|
338
|
+
*/
|
|
339
|
+
tableStyles?: boolean;
|
|
340
|
+
/**
|
|
341
|
+
* Move the grafted masters to the front of `p:sldMasterIdLst`, ahead of the ones
|
|
342
|
+
* this deck already had, keeping their import order. Off by default: which master
|
|
343
|
+
* leads is a statement about what the deck *is*, so it is the caller's call rather
|
|
344
|
+
* than a side effect of grafting.
|
|
345
|
+
*
|
|
346
|
+
* `p:sldMasterIdLst` order is not part of theme resolution — a slide resolves
|
|
347
|
+
* through its own layout's master, so this changes no existing slide's appearance.
|
|
348
|
+
* What it changes is the deck's identity in PowerPoint's UI: the list's first entry
|
|
349
|
+
* becomes `Designs(1)`, which is the theme the Design tab shows and the one
|
|
350
|
+
* Design ▸ Variants applies. Graft a brand master into a generated deck without
|
|
351
|
+
* this and the deck still presents as the generator's stock theme, because the
|
|
352
|
+
* stub master was there first.
|
|
353
|
+
*
|
|
354
|
+
* Reordering rewrites nothing but the list: relationships, ids, and every part
|
|
355
|
+
* outside `presentation.xml` are untouched, and a re-call is a no-op once the
|
|
356
|
+
* grafted masters already lead.
|
|
357
|
+
* @default false
|
|
358
|
+
*/
|
|
359
|
+
primary?: boolean;
|
|
360
|
+
}
|
|
361
|
+
/** A layout in this deck's gallery, addressable as an {@link AppendSlidesOptions} target. */
|
|
362
|
+
interface LayoutHandle {
|
|
363
|
+
/** Partname of the layout in this package (e.g. `/ppt/slideLayouts/slideLayout2.xml`). */
|
|
364
|
+
partName: string;
|
|
365
|
+
/** The layout's `p:cSld@name` (`''` when unnamed). */
|
|
366
|
+
name: string;
|
|
367
|
+
/** Partname of the master this layout belongs to. */
|
|
368
|
+
masterPartName: string;
|
|
369
|
+
/** Zero-based index of the master in `p:sldMasterIdLst`. */
|
|
370
|
+
masterIndex: number;
|
|
371
|
+
/** Zero-based index of the layout within its master's `p:sldLayoutIdLst`. */
|
|
372
|
+
layoutIndex: number;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* One authored slide, extracted from a generator for injection into an existing
|
|
376
|
+
* package. The slide body XML references its media/hyperlinks by relationship id
|
|
377
|
+
* only, so {@link Presentation.appendSlides} preserves each `rId` and only
|
|
378
|
+
* repoints its target — see {@link SlideSource}.
|
|
379
|
+
*/
|
|
380
|
+
interface ExtractedSlide {
|
|
381
|
+
/** Standalone `<p:sld>` part body (XML declaration + namespaces included). */
|
|
382
|
+
xml: string;
|
|
383
|
+
/** Image media the body references, keyed by the `rId` used in {@link xml}. */
|
|
384
|
+
media: Array<{
|
|
385
|
+
rId: number;
|
|
386
|
+
bytes: Uint8Array;
|
|
387
|
+
extn: string;
|
|
388
|
+
contentType: string;
|
|
389
|
+
}>;
|
|
390
|
+
/** External hyperlink rels, keyed by the `rId` used in {@link xml}. */
|
|
391
|
+
hyperlinks: Array<{
|
|
392
|
+
rId: number;
|
|
393
|
+
target: string;
|
|
394
|
+
}>;
|
|
395
|
+
/**
|
|
396
|
+
* Charts the body references, keyed by the `rId` used in {@link xml}. Each carries
|
|
397
|
+
* the chart part XML and its embedded workbook bytes; the chart part's own `.rels`
|
|
398
|
+
* (workbook reference) is rebuilt by {@link Presentation.appendSlides}.
|
|
399
|
+
*/
|
|
400
|
+
charts: Array<{
|
|
401
|
+
rId: number;
|
|
402
|
+
chartXml: string;
|
|
403
|
+
embeddingBytes: Uint8Array;
|
|
404
|
+
}>;
|
|
405
|
+
/** Internal slide-to-slide links: the `rId` used in {@link xml} → 1-based source slide number. */
|
|
406
|
+
slideLinks: Array<{
|
|
407
|
+
rId: number;
|
|
408
|
+
sourceSlideNumber: number;
|
|
409
|
+
}>;
|
|
410
|
+
/**
|
|
411
|
+
* Embedded audio/video the body references. Each item is one media binary backed
|
|
412
|
+
* by two rels sharing a Target — the ECMA `audio`/`video` rel (`mediaRid`) and the
|
|
413
|
+
* MS-2007 `media` rel (`msMediaRid`) — plus a separate preview image rel
|
|
414
|
+
* (`previewRid`). {@link Presentation.appendSlides} reproduces this rel graph.
|
|
415
|
+
*/
|
|
416
|
+
avMedia: AvMediaItem[];
|
|
417
|
+
/**
|
|
418
|
+
* Online (external-link) video the body references. Each item is two *external*
|
|
419
|
+
* rels sharing one link Target — the ECMA `video` rel (`mediaRid`) and the MS-2007
|
|
420
|
+
* `media` rel (`msMediaRid`) — with **no** media binary part. The poster frame is a
|
|
421
|
+
* normal image rel carried by {@link media}. {@link Presentation.appendSlides}
|
|
422
|
+
* wires the two external rels without reserving a media part or content type.
|
|
423
|
+
*/
|
|
424
|
+
onlineMedia: OnlineMediaItem[];
|
|
425
|
+
/**
|
|
426
|
+
* The slide's speaker notes, or `undefined` when it has none. Carried as a ready
|
|
427
|
+
* `<p:notes>` part body plus its external hyperlink rels;
|
|
428
|
+
* {@link Presentation.appendSlides} creates the notes part, wires it to the appended
|
|
429
|
+
* slide, and binds it to a notes master (see {@link ExtractedSlides.notesMaster}).
|
|
430
|
+
*/
|
|
431
|
+
notes?: ExtractedNotes;
|
|
432
|
+
}
|
|
433
|
+
/** One slide's speaker notes, extracted for {@link Presentation.appendSlides}. */
|
|
434
|
+
interface ExtractedNotes {
|
|
435
|
+
/** Standalone `<p:notes>` part body (XML declaration + namespaces included). */
|
|
436
|
+
xml: string;
|
|
437
|
+
/**
|
|
438
|
+
* External hyperlink rels the notes body references, keyed by the `rId` used in
|
|
439
|
+
* {@link xml}. Notes rels reserve `rId1` for the notes master and `rId2` for the
|
|
440
|
+
* slide, so these start at `rId3`. Notes support external `url` links only.
|
|
441
|
+
*/
|
|
442
|
+
hyperlinks: Array<{
|
|
443
|
+
rId: number;
|
|
444
|
+
target: string;
|
|
445
|
+
}>;
|
|
446
|
+
}
|
|
447
|
+
/** One embedded audio/video item extracted for {@link Presentation.appendSlides}. */
|
|
448
|
+
interface AvMediaItem {
|
|
449
|
+
/** Whether the item is `audio` (`<a:audioFile>`) or `video` (`<a:videoFile>`). */
|
|
450
|
+
mtype: 'audio' | 'video';
|
|
451
|
+
/** Body `rId` of the ECMA `audio`/`video` rel (`r:link`); points at the media part. */
|
|
452
|
+
mediaRid: number;
|
|
453
|
+
/** Body `rId` of the MS-2007 `media` rel (`p14:media r:embed`); shares the media part Target. */
|
|
454
|
+
msMediaRid: number;
|
|
455
|
+
/** Body `rId` of the preview image rel (`a:blip r:embed` in the blipFill). */
|
|
456
|
+
previewRid: number;
|
|
457
|
+
/** The audio/video binary the media part will hold. */
|
|
458
|
+
mediaBytes: Uint8Array;
|
|
459
|
+
/** Media file extension (no dot), e.g. `mp4`, `mp3`. */
|
|
460
|
+
mediaExtn: string;
|
|
461
|
+
/** OPC content type for the media part (PowerPoint-authored, e.g. `audio/mpeg`). */
|
|
462
|
+
mediaContentType: string;
|
|
463
|
+
/** The preview/poster image bytes. */
|
|
464
|
+
previewBytes: Uint8Array;
|
|
465
|
+
/** Preview image extension (no dot), e.g. `png`. */
|
|
466
|
+
previewExtn: string;
|
|
467
|
+
/** OPC content type for the preview image part. */
|
|
468
|
+
previewContentType: string;
|
|
469
|
+
}
|
|
470
|
+
/** One online (external-link) video item extracted for {@link Presentation.appendSlides}. */
|
|
471
|
+
interface OnlineMediaItem {
|
|
472
|
+
/** Body `rId` of the ECMA `video` rel (`a:videoFile r:link`); External, no part. */
|
|
473
|
+
mediaRid: number;
|
|
474
|
+
/** Body `rId` of the MS-2007 `media` rel (`p14:media r:link`); External, shares the link Target. */
|
|
475
|
+
msMediaRid: number;
|
|
476
|
+
/** The external video link both rels point at (`TargetMode="External"`). */
|
|
477
|
+
link: string;
|
|
478
|
+
}
|
|
479
|
+
/** A generator's authored slides + canvas size, the input to {@link Presentation.appendSlides}. */
|
|
480
|
+
interface ExtractedSlides {
|
|
481
|
+
widthEmu: number;
|
|
482
|
+
heightEmu: number;
|
|
483
|
+
slides: ExtractedSlide[];
|
|
484
|
+
/**
|
|
485
|
+
* The generator's presentation-level embedded font faces (`pptx.embedFont`),
|
|
486
|
+
* carried into the destination deck by {@link Presentation.appendSlides}. Each
|
|
487
|
+
* face carries its raw `bytes`. Empty when the generator embeds no fonts.
|
|
488
|
+
*/
|
|
489
|
+
embeddedFonts: EmbeddedFont[];
|
|
490
|
+
/**
|
|
491
|
+
* A notes master to fall back on, present only when at least one slide carries notes.
|
|
492
|
+
*
|
|
493
|
+
* A notes slide must bind to a notes master, and a destination template often has
|
|
494
|
+
* none — a deck authored without speaker notes carries no `notesMaster` part. So the
|
|
495
|
+
* generator's own notes master rides along, and {@link Presentation.appendSlides}
|
|
496
|
+
* installs it (with its theme) **only** when the destination has none. When the
|
|
497
|
+
* destination already has one, it wins and this is discarded — matching the
|
|
498
|
+
* `importNotes` policy, where the destination's notes styling also wins.
|
|
499
|
+
*/
|
|
500
|
+
notesMaster?: {
|
|
501
|
+
xml: string;
|
|
502
|
+
themeXml: string;
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Structural view of a slide producer (a `TsPptx` instance satisfies this).
|
|
507
|
+
* Kept structural so the read subsystem never imports the generator at runtime.
|
|
508
|
+
*/
|
|
509
|
+
interface SlideSource {
|
|
510
|
+
extractSlides(opts?: {
|
|
511
|
+
onMediaError?: 'throw' | 'placeholder';
|
|
512
|
+
}): Promise<ExtractedSlides>;
|
|
513
|
+
}
|
|
514
|
+
/** Options for {@link Presentation.appendSlides}. */
|
|
515
|
+
interface AppendSlidesOptions {
|
|
516
|
+
/** Target layout to bind every appended slide to: by `p:cSld@name` or a {@link LayoutHandle}. */
|
|
517
|
+
layout: string | LayoutHandle;
|
|
518
|
+
/**
|
|
519
|
+
* Zero-based `p:sldIdLst` position for the first appended slide; subsequent
|
|
520
|
+
* slides follow it in order. Omitted/out-of-range appends at the end.
|
|
521
|
+
*/
|
|
522
|
+
at?: number;
|
|
523
|
+
/** How `addImage` media errors surface during extraction (default `'throw'`). */
|
|
524
|
+
onMediaError?: 'throw' | 'placeholder';
|
|
525
|
+
}
|
|
526
|
+
/** Options for {@link Presentation.fromTemplate}. */
|
|
527
|
+
interface FromTemplateOptions {
|
|
528
|
+
/**
|
|
529
|
+
* Keep a `.potx` main part's `…template.main+xml` content type instead of
|
|
530
|
+
* normalizing it to the editable `…presentation.main+xml` type. Off by default
|
|
531
|
+
* (the saved package opens as an editable deck, not a template). No effect on a
|
|
532
|
+
* `.pptx` input, whose main part is already editable.
|
|
533
|
+
*/
|
|
534
|
+
keepTemplateContentType?: boolean;
|
|
535
|
+
}
|
|
536
|
+
//#endregion
|
|
537
|
+
export { ExtractedSlides as a, ImportSlideMastersOptions as c, LayoutHandle as d, SlideSize as f, ExtractedSlide as i, ImportSlideOptions as l, EmbeddedFontSlot as m, EmbeddedFontFaceInfo as n, FromTemplateOptions as o, SlideSource as p, EmbeddedFontInfo as r, ImportShapeOptions as s, AppendSlidesOptions as t, ImportedSlideMaster as u };
|
|
538
|
+
//# sourceMappingURL=presentation-types-BVw0EknS.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-types-BVw0EknS.d.ts","names":[],"sources":["../src/embedded-fonts.ts","../src/read/api/presentation-types.ts"],"mappings":";;;;;;cA8Ba;KACD,2BAA2B;;UAGtB;EAChB,MAAM;EACN,QAAQ;;;UAIQ;;EAEhB;EACA;EACA;EACA;EACA,OAAO;;;;;UCnCS;EAChB;EACA;EACA;EACA;;;;;;;;;UAUgB;;EAEhB;;EAEA;;EAEA,OAAO;;;UAIS;;EAEhB;;EAEA;;;UAIgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8ChB;;;;;;;;;;;;;;;;;;;EAoBA;;;;;;;;;;;;;;;;;;EAmBA;;;;;;;EAQA;;;;;;;;;;;;;;;;;;EAmBA;;;;;;;;;;;;;;;;;;;;;;;EAwBA;;;;;;;;;;;;;;EAeA;;;UAIgB;;;;;;;;;;;;;;;;;;;;;EAqBhB;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;EAMA;;;;;;;;;;;;;;;;;;;;EAoBA;;;;;;;;;;;EAWA;;;UAIgB;;EAEhB;;EAEA;;;UAIgB;;;;;;EAMhB,WAAW,cAAc;;;;;;EAMzB,WAAW,cAAc;;;;;;;EAOzB;;;;;;;;;;;;;;;;;;;EAoBA;;;;;;;;;;;;;;;;;;;;;;EAuBA;;;;;;;;;;;;;;;;;;;;EAqBA;;;UAIgB;;EAEhB;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;UASgB;;EAEhB;;EAEA,OAAO;IAAQ;IAAa,OAAO;IAAY;IAAc;;;EAE7D,YAAY;IAAQ;IAAa;;;;;;;EAMjC,QAAQ;IAAQ;IAAa;IAAkB,gBAAgB;;;EAE/D,YAAY;IAAQ;IAAa;;;;;;;;EAOjC,SAAS;;;;;;;;EAQT,aAAa;;;;;;;EAOb,QAAQ;;;UAIQ;;EAEhB;;;;;;EAMA,YAAY;IAAQ;IAAa;;;;UAIjB;;EAEhB;;EAEA;;EAEA;;EAEA;;EAEA,YAAY;;EAEZ;;EAEA;;EAEA,cAAc;;EAEd;;EAEA;;;UAIgB;;EAEhB;;EAEA;;EAEA;;;UAIgB;EAChB;EACA;EACA,QAAQ;;;;;;EAMR,eAAe;;;;;;;;;;;EAWf;IAAgB;IAAa;;;;;;;UAOb;EAChB,cAAc;IAAS;MAA2C,QAAQ;;;UAI1D;;EAEhB,iBAAiB;;;;;EAKjB;;EAEA;;;UAIgB;;;;;;;EAOhB"}
|
package/dist/read.d.ts
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { t as CustomPropertyValue } from "./pres-5x1bjCzk.js";
|
|
2
|
+
import { a as ExtractedSlides, c as ImportSlideMastersOptions, d as LayoutHandle, f as SlideSize, i as ExtractedSlide, l as ImportSlideOptions, n as EmbeddedFontFaceInfo, o as FromTemplateOptions, p as SlideSource, r as EmbeddedFontInfo, s as ImportShapeOptions, t as AppendSlidesOptions, u as ImportedSlideMaster } from "./presentation-types-BVw0EknS.js";
|
|
3
|
+
import { a as TsPptxError, d as InvalidOptionErrorCode, f as MediaErrorCode, h as UnsupportedFeatureErrorCode, i as PackageReadError, l as ErrorCode, m as TsPptxCode, n as InvalidOptionError, o as TsPptxErrorOptions, p as PackageReadErrorCode, r as MediaError, s as UnsupportedFeatureError, t as InternalError, u as InternalErrorCode } from "./errors-DRLpOpgQ.js";
|
|
4
|
+
import { a as Part, i as Relationships, n as OpcPackage, r as Relationship, s as ContentTypes, t as OpcInput } from "./package-CaOLXSNi.js";
|
|
5
|
+
import { $ as ChartFill, A as GroupShape, At as BackgroundFill, B as TableCell, Bt as ColorContext, C as CommentAuthor, Ct as AutofitMode, D as NotesPlaceholder, Dt as Run, E as ModernCommentAuthor, Et as Paragraph, F as isPicture, Ft as PictureFillTile, G as ChartExAxis, H as ResolvedTableStyle, I as GraphicFrame, It as GradientFill, J as ChartExSeries, K as ChartExDataLabels, L as CellBorder, Lt as GradientStop, M as isConnector, Mt as SlideBackground, N as isGraphicFrame, Nt as FillRect, O as NotesSlide, Ot as RunHyperlink, P as isGroupShape, Pt as PictureFill, Q as ChartDataLabels, R as CellBorders, Rt as ResolvedColor, S as Comment, St as SoftEdge, T as ModernComment, Tt as LineSpacing, U as TableConditionFlags, V as TableRow, W as ChartEx, X as Chart, Y as AxisNumberFormat, Z as ChartAxis, _ as ThemeColorSlot, _t as PatternFill, a as readCustomProperties, at as AutoShape, b as Tag, bt as Reflection, c as Slide, ct as ConnectionSite, d as TransitionSpeed, dt as GeometryCommand, et as ChartLegend, f as ColorMapToken, ft as Glow, g as Theme, gt as OuterShadow, h as SlideMaster, ht as LineEnds, i as readCoreProperties, it as Picture, j as isAutoShape, jt as BackgroundSource, k as AnyShape, kt as TextFrame, l as TransitionInfo, lt as CustomGeometry, m as SlideLayout, mt as LineEnd, n as CoreProperties, nt as ChartSeries, o as AddPictureOptions, ot as Shape, p as Placeholder, pt as InnerShadow, q as ChartExLegend, r as CustomProperty, rt as Connector, s as AddTextBoxOptions, st as AbsoluteFrame, t as Presentation, tt as ChartLine, u as TransitionInput, ut as CustomGeometryPath, v as ThemeFontFace, vt as Recolor, w as CommentSchema, wt as BodyProperties, x as readTagsForPart, xt as ShapeType, y as ThemeFontScheme, yt as RecolorColor, z as Table, zt as resolveColorElement } from "./presentation-RGOiun5P.js";
|
|
6
|
+
//#region src/read/opc/partnames.d.ts
|
|
7
|
+
/** Partname of the `.rels` part holding `sourcePartName`'s relationships ('/' = package). */
|
|
8
|
+
declare function relsPartNameFor(sourcePartName: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Resolve a relationship target against its source part, per OPC pack-URI
|
|
11
|
+
* resolution: relative targets resolve against the source part's directory.
|
|
12
|
+
*
|
|
13
|
+
* @param sourcePartName partname of the part owning the relationship ('/' for package-level)
|
|
14
|
+
* @param target relationship Target attribute (relative like `../media/image1.png`, or absolute)
|
|
15
|
+
*/
|
|
16
|
+
declare function resolveRelativePartName(sourcePartName: string, target: string): string;
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/read/oxml/color-transform.d.ts
|
|
19
|
+
/**
|
|
20
|
+
* Apply DrawingML colour-transform modifiers (`lumMod`/`lumOff`/`shade`/`tint`/
|
|
21
|
+
* `satMod`/`alpha`/…) to a base sRGB colour, returning the *effective* colour a
|
|
22
|
+
* renderer would paint.
|
|
23
|
+
*
|
|
24
|
+
* The read model resolves a `schemeClr`/`srgbClr` reference to its **base** hex
|
|
25
|
+
* and carries the transform children verbatim (so the `theme: 'preserve'` flatten
|
|
26
|
+
* path can re-emit them byte-for-byte). This module is the missing step that
|
|
27
|
+
* turns that base hex + transform list into the final rendered hex, so a consumer
|
|
28
|
+
* never hand-computes a tint/shade again.
|
|
29
|
+
*
|
|
30
|
+
* Colour-space model (verified against PowerPoint output — see
|
|
31
|
+
* `test/read/color-transform.test.js`): the working colour is kept canonical as
|
|
32
|
+
* sRGB between transforms; each transform converts into the space its family
|
|
33
|
+
* operates in, applies, and converts back to sRGB. Transforms apply in **document
|
|
34
|
+
* order** (ECMA-376 §20.1.2.3).
|
|
35
|
+
*
|
|
36
|
+
* - `lumMod` / `lumOff` — luminance (L) in HSL: `L' = L·mod + off`. PowerPoint's
|
|
37
|
+
* "Lighter/Darker N%" family.
|
|
38
|
+
* - `satMod` / `satOff` — saturation (S) in HSL.
|
|
39
|
+
* - `hueMod` / `hueOff` — hue (H) in HSL (`hueMod` scales, `hueOff` offsets by
|
|
40
|
+
* degrees). Not exercised by any current source; implemented for completeness.
|
|
41
|
+
* - `shade` — toward black in **linear** RGB: `c' = c·k`.
|
|
42
|
+
* - `tint` — toward white in **linear** RGB: `c' = c·k + (1−k)`.
|
|
43
|
+
* - `alpha` / `alphaMod` / `alphaOff` — opacity, returned alongside the hex
|
|
44
|
+
* (never folded into RGB).
|
|
45
|
+
* - `comp` / `inv` / `gray` / `gamma` / `invGamma` — pass-through for now (no
|
|
46
|
+
* current source needs them; add when one does).
|
|
47
|
+
*
|
|
48
|
+
* All DrawingML percentage values are stored in thousandths of a percent
|
|
49
|
+
* (`100%` → `100000`), so a modifier's fraction is `val / 100000`.
|
|
50
|
+
*/
|
|
51
|
+
/** A colour-transform modifier in its read-model form: tag local-name + raw `@val`. */
|
|
52
|
+
interface ColorTransform {
|
|
53
|
+
name: string;
|
|
54
|
+
value: string | null;
|
|
55
|
+
}
|
|
56
|
+
/** The effective colour after applying transforms: final sRGB hex, plus opacity when an `alpha*` modifier was present. */
|
|
57
|
+
interface EffectiveColor {
|
|
58
|
+
hex: string;
|
|
59
|
+
alpha?: number;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Apply an ordered list of DrawingML colour transforms to a base sRGB hex,
|
|
63
|
+
* returning the effective sRGB hex (and opacity, when an `alpha*` modifier set
|
|
64
|
+
* it). Pure: no DOM, no theme lookup — the caller has already resolved the base
|
|
65
|
+
* colour and extracted each modifier's `{ name, value }`.
|
|
66
|
+
*
|
|
67
|
+
* An unparseable base hex is returned unchanged (with no transforms applied); an
|
|
68
|
+
* unparseable/`null` modifier value is skipped.
|
|
69
|
+
*/
|
|
70
|
+
declare function applyColorTransforms(baseHex: string, transforms: ColorTransform[]): EffectiveColor;
|
|
71
|
+
//#endregion
|
|
72
|
+
export { type AbsoluteFrame, type AddPictureOptions, type AddTextBoxOptions, type AnyShape, type AppendSlidesOptions, AutoShape, type AutofitMode, type AxisNumberFormat, type BackgroundFill, type BackgroundSource, type BodyProperties, type CellBorder, type CellBorders, Chart, ChartAxis, type ChartDataLabels, ChartEx, ChartExAxis, type ChartExDataLabels, type ChartExLegend, ChartExSeries, type ChartFill, type ChartLegend, type ChartLine, ChartSeries, type ColorContext, type ColorMapToken, type ColorTransform, type Comment, type CommentAuthor, type CommentSchema, type ConnectionSite, Connector, ContentTypes, type CoreProperties, type CustomGeometry, type CustomGeometryPath, type CustomProperty, type CustomPropertyValue, type EffectiveColor, type EmbeddedFontFaceInfo, type EmbeddedFontInfo, type ErrorCode, type ExtractedSlide, type ExtractedSlides, type FillRect, type FromTemplateOptions, type GeometryCommand, type Glow, type GradientFill, type GradientStop, GraphicFrame, GroupShape, type ImportShapeOptions, type ImportSlideMastersOptions, type ImportSlideOptions, type ImportedSlideMaster, type InnerShadow, InternalError, type InternalErrorCode, InvalidOptionError, type InvalidOptionErrorCode, type LayoutHandle, type LineEnd, type LineEnds, type LineSpacing, MediaError, type MediaErrorCode, type ModernComment, type ModernCommentAuthor, NotesPlaceholder, NotesSlide, type OpcInput, OpcPackage, type OuterShadow, PackageReadError, type PackageReadErrorCode, Paragraph, Part, type PatternFill, Picture, type PictureFill, type PictureFillTile, Placeholder, Presentation, type Recolor, type RecolorColor, type Reflection, type Relationship, Relationships, type ResolvedColor, type ResolvedTableStyle, Run, type RunHyperlink, Shape, type ShapeType, Slide, type SlideBackground, SlideLayout, SlideMaster, type SlideSize, type SlideSource, type SoftEdge, Table, TableCell, type TableConditionFlags, TableRow, type Tag, TextFrame, Theme, type ThemeColorSlot, type ThemeFontFace, type ThemeFontScheme, type TransitionInfo, type TransitionInput, type TransitionSpeed, type TsPptxCode, TsPptxError, type TsPptxErrorOptions, UnsupportedFeatureError, type UnsupportedFeatureErrorCode, applyColorTransforms, isAutoShape, isConnector, isGraphicFrame, isGroupShape, isPicture, readCoreProperties, readCustomProperties, readTagsForPart, relsPartNameFor, resolveColorElement, resolveRelativePartName };
|
|
73
|
+
//# sourceMappingURL=read.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read.d.ts","names":[],"sources":["../src/read/opc/partnames.ts","../src/read/oxml/color-transform.ts"],"mappings":";;;;;;;iBA4BgB,gBAAgB;;;;;;;;iBA8BhB,wBAAwB,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UCxB/C;EAChB;EACA;;;UAIgB;EAChB;EACA;;;;;;;;;;;iBAiFe,qBAAqB,iBAAiB,YAAY,mBAAmB"}
|