@office-kit/pptx 0.15.1 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +219 -49
- package/dist/{api-IjQrAsCE.js → api-DQEn2Bo4.js} +35 -6
- package/dist/api-DQEn2Bo4.js.map +1 -0
- package/dist/{index-B3Dj178Q.d.ts → index-BHQiXp61.d.ts} +14 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +1 -1
- package/package.json +1 -1
- package/dist/api-IjQrAsCE.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# pptx-kit
|
|
2
2
|
|
|
3
|
+
## 0.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 22f1f30: feat: author and read the complex-script typeface (`<a:cs>`), and align the blank deck's font scheme with Office's
|
|
8
|
+
|
|
9
|
+
- `TextFormat.fontComplexScript` sets and reads `<a:cs typeface="…"/>`, the third typeface slot next to `font` (`<a:latin>`) and `fontEastAsian` (`<a:ea>`). It works everywhere the other two already did: `setShapeRunFormat` / `setShapeTextFormat`, `setShapeParagraphs` and `setTableCellParagraphs` (runs and `endFormat`), and it comes back from `getShapeRunFormat`, `getShapeRunFormatEffective` (including `+mj-cs` / `+mn-cs` and the theme's complex-script fallback), `getShapeParagraphElements`, `getParagraphEndFormat` and `getTableCellParagraphs`.
|
|
10
|
+
- `ChartTextStyle.fontComplexScript` writes `<a:cs>` on a chart title / axis / data-label / legend style, and the chart reader returns it. `font` keeps filling the Latin and East Asian slots only, so a chart can name a complex-script face on the legend alone.
|
|
11
|
+
- The three slots stay independent: setting one never changes the other two. Rewriting a slot writes its `typeface` attribute alone, so a `pitchFamily` / `charset` the source file carried on that element is dropped — as was already the case for `<a:latin>` and `<a:ea>`.
|
|
12
|
+
- `createPresentation`'s blank deck now carries the standard per-script font list (`<a:font script="Thai" typeface="Cordia New"/>` and its 46 siblings) in both `majorFont` and `minorFont`, the same list Office's own default theme ships. It is what resolves a face for text in a script no run names one for. Every deck `createPresentation()` produces therefore has a larger `theme1.xml` than before — its bytes change — and text in a script with no explicit typeface now resolves through that list.
|
|
13
|
+
- Chart titles and axis titles no longer carry a `lang="en-US"` language tag on their run. The chart-level tag is still `ChartSpec.language` (`<c:lang>`).
|
|
14
|
+
|
|
3
15
|
## 0.15.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,72 +1,208 @@
|
|
|
1
1
|
# @office-kit/pptx
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@office-kit/pptx)
|
|
4
|
+
[](https://github.com/office-kit/pptx/actions/workflows/ci.yml)
|
|
5
|
+
[](./LICENSE)
|
|
6
|
+
|
|
7
|
+
Read, edit, and write `.pptx` (PowerPoint / Office Open XML Presentation) files
|
|
8
|
+
from TypeScript, in **Node.js and the browser**, from a single ESM bundle.
|
|
9
|
+
|
|
10
|
+
**[Documentation](https://office-kit.github.io/pptx/)** ·
|
|
11
|
+
**[Playground](https://office-kit.github.io/pptx/playground)** (inspect a deck in your browser) ·
|
|
12
|
+
**[REPL](https://office-kit.github.io/pptx/repl)** (write code, watch the deck redraw)
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { loadPresentation, replaceTokensInPresentation, savePresentation } from '@office-kit/pptx';
|
|
16
|
+
|
|
17
|
+
// A designer makes template.pptx in PowerPoint. Your code fills it in.
|
|
18
|
+
const pres = await loadPresentation(templateBytes);
|
|
19
|
+
replaceTokensInPresentation(pres, { name: 'Alice', event: 'Re:Invent', date: '2026-12-01' });
|
|
20
|
+
const out: Uint8Array = await savePresentation(pres);
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
> **Status: 0.x, pre-1.0.** The capabilities in the [scope table](#scope) are
|
|
24
|
+
> exercised against real PPTX fixtures and validated in CI (see
|
|
25
|
+
> [How output is checked](#how-output-is-checked)). Until 1.0 the public API is
|
|
26
|
+
> not frozen: a breaking change can land in a minor (`0.x`) release, so pin a
|
|
11
27
|
> version or an exact range.
|
|
12
28
|
|
|
13
|
-
## Why
|
|
29
|
+
## Why this library
|
|
30
|
+
|
|
31
|
+
- **It reads as well as it writes.** Open a deck made in PowerPoint, Keynote,
|
|
32
|
+
or Google Slides, change it, and save it. Every setter has a getter, and
|
|
33
|
+
there are deck-wide queries (find every hyperlink, every comment by an
|
|
34
|
+
author, every slide with an empty title).
|
|
35
|
+
- **Parts it does not model survive the round trip.** SmartArt, OLE objects,
|
|
36
|
+
video, modern threaded comments, and vendor extensions are carried through
|
|
37
|
+
untouched. The library never silently strips what it does not understand.
|
|
38
|
+
- **The output is valid, not "valid enough".** Microsoft's own
|
|
39
|
+
`OpenXmlValidator` gates every CI run. A file that opens in PowerPoint but
|
|
40
|
+
breaks Keynote is treated as a bug.
|
|
41
|
+
- **One ESM bundle for Node and the browser.** No `fs`, `Buffer`, or `zlib` on
|
|
42
|
+
the hot path, and one runtime dependency ([fflate](https://github.com/101arrowz/fflate), for ZIP).
|
|
43
|
+
- **You ship only what you import.** The API is 451 side-effect-free functions.
|
|
44
|
+
A `load → save` bundle is about 56 KB unminified; the entire API is about
|
|
45
|
+
142 KB. CI fails if either grows past its cap (`test/tree-shake.test.ts`).
|
|
46
|
+
- **Types follow the spec.** The model mirrors ECMA-376 Part 1 §19
|
|
47
|
+
(PresentationML). Positions are branded `Emu` numbers, so inches and points
|
|
48
|
+
cannot be mixed up by accident.
|
|
49
|
+
|
|
50
|
+
## How it differs from PptxGenJS
|
|
51
|
+
|
|
52
|
+
[PptxGenJS](https://github.com/gitbrent/PptxGenJS) is the established way to
|
|
53
|
+
generate a deck in JavaScript, and it is good at that job. The difference is
|
|
54
|
+
direction: **PptxGenJS writes new files; `@office-kit/pptx` reads, edits, and
|
|
55
|
+
writes.** If your deck starts from a template, or from a file a person made,
|
|
56
|
+
PptxGenJS cannot open it.
|
|
57
|
+
|
|
58
|
+
Compared against PptxGenJS 4.0.1:
|
|
59
|
+
|
|
60
|
+
| | `@office-kit/pptx` | PptxGenJS |
|
|
61
|
+
| --------------------------------- | -------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
|
|
62
|
+
| Open and edit an existing `.pptx` | ✅ Load, change, save; unknown parts are preserved | ❌ Creates new files only |
|
|
63
|
+
| Templates | Any `.pptx` a designer made in PowerPoint | Slide masters defined in code (`defineSlideMaster`) |
|
|
64
|
+
| Read back what is in a deck | ✅ Every setter has a getter, plus deck-wide queries | ❌ The API is write-only |
|
|
65
|
+
| API shape | Tree-shakeable functions (`addSlideChart(slide, …)`) | One class with methods (`slide.addChart(…)`) |
|
|
66
|
+
| Module formats | ESM only | ESM, CommonJS, and a script-tag bundle |
|
|
67
|
+
| Runtime dependencies | 1 (`fflate`) | 4 (`jszip`, `image-size`, `https`, `@types/node`) |
|
|
68
|
+
| Slide transitions | ✅ | ❌ |
|
|
69
|
+
| Animations | ✅ Four entrance / exit presets | ❌ |
|
|
70
|
+
| Comments | ✅ | ❌ (speaker notes only) |
|
|
71
|
+
| Chart types you can author | Bar, column, line, pie, doughnut, area; combos, secondary axis, trendlines, per-point labels | Those, plus scatter, bubble, radar, and 3D bar |
|
|
72
|
+
| Audio, video, YouTube embeds | ❌ Not yet (media already in a deck is preserved) | ✅ |
|
|
73
|
+
| HTML `<table>` to slides | ❌ | ✅ With automatic paging |
|
|
74
|
+
| Render a slide to an image | ✅ SVG and PNG, via [`@office-kit/pptx-preview`](packages/preview) | ❌ |
|
|
75
|
+
| How output is checked | Open XML SDK validator and ECMA-376 XSDs, in CI | Manual runs in PowerPoint and other apps before a release |
|
|
76
|
+
|
|
77
|
+
**Pick PptxGenJS** if you only ever generate new decks and need video,
|
|
78
|
+
scatter / bubble / radar charts, HTML-table import, CommonJS, or a
|
|
79
|
+
`<script>`-tag build.
|
|
80
|
+
|
|
81
|
+
**Pick `@office-kit/pptx`** if a template, an existing deck, or a validation
|
|
82
|
+
requirement is involved, or if you need to read a deck as well as write one.
|
|
83
|
+
|
|
84
|
+
The two also work together. Decks written by PptxGenJS are part of this
|
|
85
|
+
library's test fixtures (`test/pptxgenjs-compat.test.ts`), so you can generate
|
|
86
|
+
with PptxGenJS and post-process the result here.
|
|
87
|
+
|
|
88
|
+
### The same slide in both
|
|
14
89
|
|
|
15
|
-
|
|
16
|
-
|
|
90
|
+
```ts
|
|
91
|
+
// PptxGenJS
|
|
92
|
+
import pptxgen from 'pptxgenjs';
|
|
93
|
+
|
|
94
|
+
const pptx = new pptxgen();
|
|
95
|
+
const slide = pptx.addSlide();
|
|
96
|
+
slide.addText('Q3 Review', { x: 1, y: 0.5, w: 8, h: 1, fontSize: 28, bold: true });
|
|
97
|
+
slide.addChart(
|
|
98
|
+
pptx.ChartType.bar,
|
|
99
|
+
[{ name: 'Revenue', labels: ['Q1', 'Q2'], values: [120, 180] }],
|
|
100
|
+
{
|
|
101
|
+
x: 1,
|
|
102
|
+
y: 1.5,
|
|
103
|
+
w: 8,
|
|
104
|
+
h: 4,
|
|
105
|
+
barDir: 'col',
|
|
106
|
+
},
|
|
107
|
+
);
|
|
108
|
+
await pptx.writeFile({ fileName: 'out.pptx' });
|
|
109
|
+
```
|
|
17
110
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
111
|
+
```ts
|
|
112
|
+
// @office-kit/pptx
|
|
113
|
+
import {
|
|
114
|
+
addBlankSlide,
|
|
115
|
+
addSlideChart,
|
|
116
|
+
addSlideTextBox,
|
|
117
|
+
createPresentation,
|
|
118
|
+
inches,
|
|
119
|
+
setShapeTextFormat,
|
|
120
|
+
} from '@office-kit/pptx';
|
|
121
|
+
import { savePresentationToFile } from '@office-kit/pptx/node';
|
|
22
122
|
|
|
23
|
-
|
|
123
|
+
const pres = createPresentation();
|
|
124
|
+
const slide = addBlankSlide(pres);
|
|
125
|
+
const title = addSlideTextBox(slide, {
|
|
126
|
+
x: inches(1),
|
|
127
|
+
y: inches(0.5),
|
|
128
|
+
w: inches(8),
|
|
129
|
+
h: inches(1),
|
|
130
|
+
text: 'Q3 Review',
|
|
131
|
+
});
|
|
132
|
+
setShapeTextFormat(title, { size: 28, bold: true });
|
|
133
|
+
addSlideChart(slide, {
|
|
134
|
+
x: inches(1),
|
|
135
|
+
y: inches(1.5),
|
|
136
|
+
w: inches(8),
|
|
137
|
+
h: inches(4),
|
|
138
|
+
spec: {
|
|
139
|
+
kind: 'column',
|
|
140
|
+
categories: ['Q1', 'Q2'],
|
|
141
|
+
series: [{ name: 'Revenue', values: [120, 180] }],
|
|
142
|
+
},
|
|
143
|
+
});
|
|
144
|
+
await savePresentationToFile(pres, 'out.pptx');
|
|
145
|
+
```
|
|
24
146
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
-
|
|
147
|
+
Two differences show up straight away. Positions are explicit units
|
|
148
|
+
(`inches(1)`, `cm(2.5)`, `pt(12)`) rather than bare numbers, and everything is
|
|
149
|
+
a function that takes the thing it changes, which is what lets a bundler drop
|
|
150
|
+
the ones you do not call.
|
|
151
|
+
|
|
152
|
+
## How output is checked
|
|
153
|
+
|
|
154
|
+
- **Open XML SDK.** A CI job generates the sample decks and runs Microsoft's
|
|
155
|
+
`OpenXmlValidator` over them (`tools/ooxml-validate`). Any validation error
|
|
156
|
+
fails the build.
|
|
157
|
+
- **ECMA-376 XSDs.** Emitted XML is validated against the official schemas
|
|
158
|
+
with `xmllint` in the test suite (these tests skip on a machine without
|
|
159
|
+
`xmllint`).
|
|
160
|
+
- **Real files and a parity corpus.** Fixture tests round-trip decks written
|
|
161
|
+
by python-pptx and PptxGenJS, and `test/corpus` authors the same slide once
|
|
162
|
+
with PptxGenJS and once with this library, then diffs the two drawing trees.
|
|
163
|
+
The suite runs on Node 22, 24, and 26.
|
|
164
|
+
- **At runtime.** `validatePresentation(pres)` checks package invariants
|
|
165
|
+
(missing relationships, dangling slide ids, duplicate shape ids, layouts
|
|
166
|
+
without masters) in Node and the browser.
|
|
33
167
|
|
|
34
168
|
## Scope
|
|
35
169
|
|
|
36
|
-
The work is split into four levels
|
|
37
|
-
|
|
38
|
-
capability stands today. Items marked "post-1.0" are not implemented yet:
|
|
170
|
+
The work is split into four levels. The `0.x` line covers levels 1–3 and part
|
|
171
|
+
of level 4. Items marked "post-1.0" are not implemented yet:
|
|
39
172
|
|
|
40
173
|
| Level | Capability | 0.x |
|
|
41
174
|
| ----- | ------------------------------------------------------------------- | ------------------------------- |
|
|
42
175
|
| L1 | Read an existing PPTX, save it back without corruption | ✅ |
|
|
43
|
-
| L2 | Template edit
|
|
44
|
-
| L3 | Authoring
|
|
176
|
+
| L2 | Template edit: text replacement, image swap, add slide from layout | ✅ |
|
|
177
|
+
| L3 | Authoring: shapes, text, tables, fills, effects, transforms, groups | ✅ |
|
|
45
178
|
| L3 | Authoring on top of existing themes / masters / layouts | ✅ |
|
|
179
|
+
| L3 | Rebranding a deck: theme colors and theme fonts | ✅ |
|
|
46
180
|
| L3 | Constructing new themes / masters / layouts from scratch | ❌ post-1.0 |
|
|
47
|
-
| L3 | Charts
|
|
181
|
+
| L3 | Charts: bar, column, line, pie, doughnut, area, and combos | ✅ |
|
|
182
|
+
| L3 | Charts: scatter, radar, bubble | Read + preview only |
|
|
48
183
|
| L4 | Notes, comments, transitions | ✅ |
|
|
49
|
-
| L4 | Simple animations (entrance / exit
|
|
184
|
+
| L4 | Simple animations (entrance / exit presets) | ✅ |
|
|
185
|
+
| L4 | Audio / video authoring | ❌ post-1.0 (read pass-through) |
|
|
50
186
|
| L4 | SmartArt authoring | ❌ post-1.0 (read pass-through) |
|
|
51
187
|
| L4 | Complex animation timing trees | ❌ post-1.0 |
|
|
52
188
|
| L4 | OLE / ActiveX authoring | ❌ post-1.0 (read pass-through) |
|
|
53
189
|
| L4 | Document encryption (read + write) | ❌ post-1.0 |
|
|
54
190
|
|
|
55
|
-
Out-of-scope content is still **preserved on round-trip
|
|
56
|
-
|
|
191
|
+
Out-of-scope content is still **preserved on round-trip**. That is the L1
|
|
192
|
+
contract.
|
|
57
193
|
|
|
58
194
|
When NOT to use this:
|
|
59
195
|
|
|
60
196
|
- You need a **pixel-perfect** PPTX rendering (print, archival). The
|
|
61
197
|
companion [`@office-kit/pptx-preview`](packages/preview) package renders slides to
|
|
62
|
-
SVG in the browser and to PNG on the server
|
|
63
|
-
is measured per slide and gated in CI (`site/fidelity`)
|
|
198
|
+
SVG in the browser and to PNG on the server, and its closeness to LibreOffice
|
|
199
|
+
is measured per slide and gated in CI (`site/fidelity`). It is a
|
|
64
200
|
high-fidelity preview, not a spec-complete paint engine. For
|
|
65
201
|
pixel-authoritative output, use PowerPoint itself or LibreOffice headless.
|
|
66
|
-
- You
|
|
67
|
-
|
|
202
|
+
- You only generate new decks and need a feature in the PptxGenJS column
|
|
203
|
+
above. Use PptxGenJS.
|
|
68
204
|
- You want to convert PPTX to another format (Keynote, ODP). Out of scope
|
|
69
|
-
forever
|
|
205
|
+
forever; that is a renderer's job.
|
|
70
206
|
|
|
71
207
|
## Install
|
|
72
208
|
|
|
@@ -83,7 +219,8 @@ yarn add @office-kit/pptx
|
|
|
83
219
|
@office-kit/pptx exposes a single tree-shakeable free-function API. Every
|
|
84
220
|
capability is a named export — `loadPresentation`, `savePresentation`,
|
|
85
221
|
`addSlideTextBox`, `setShapeFill`, etc. Bundlers drop every entry you
|
|
86
|
-
don't import, so the minimal `load → save` bundle is
|
|
222
|
+
don't import, so the minimal `load → save` bundle is **about 56 KB**
|
|
223
|
+
unminified. CI enforces the bound in `test/tree-shake.test.ts`.
|
|
87
224
|
|
|
88
225
|
```ts
|
|
89
226
|
import {
|
|
@@ -110,8 +247,6 @@ declaring a deck done. Its [worked example](skill/examples/business-deck.md) is
|
|
|
110
247
|
exercised by the test suite, so the code there is known to produce a
|
|
111
248
|
schema-valid deck.
|
|
112
249
|
|
|
113
|
-
CI enforces the tree-shake bound in `test/tree-shake.test.ts`.
|
|
114
|
-
|
|
115
250
|
## Usage
|
|
116
251
|
|
|
117
252
|
### Edit a template
|
|
@@ -277,7 +412,7 @@ addSlideChart(slide!, {
|
|
|
277
412
|
w: inches(8),
|
|
278
413
|
h: inches(4.5),
|
|
279
414
|
spec: {
|
|
280
|
-
kind: 'column', // bar | column | line | pie | doughnut | area
|
|
415
|
+
kind: 'column', // bar | column | line | pie | doughnut | area (combine per series with `chartKind`)
|
|
281
416
|
categories: ['Q1', 'Q2', 'Q3', 'Q4'],
|
|
282
417
|
series: [
|
|
283
418
|
{ name: 'Revenue', values: [120, 180, 240, 300] },
|
|
@@ -378,28 +513,63 @@ shown together.
|
|
|
378
513
|
| Shape removal | `removeShape` |
|
|
379
514
|
| Tables | `getTableCell` / `getTableCells`, `setTableCellText` / `getTableCellText`, `setTableCellParagraphs` / `getTableCellParagraphs`, `setTableCellFill` / `clearTableCellFill`, `setTableCellAlignment`, `setTableCellTextFormat`, `insertTableRow` / `removeTableRow`, `insertTableColumn` / `removeTableColumn`, `mergeTableCells` / `getTableCellSpan` |
|
|
380
515
|
| Charts | `addSlideChart`, `getSlideCharts`, `setChartSpec` — kinds: `bar`, `column`, `line`, `pie`, `doughnut`, `area`; axis tick labels via `categoryAxisTickLabelPos` / `valueAxisTickLabelPos` / `secondaryValueAxis.tickLabelPos`; axis line / gridline widths via `valueAxisLineWidthEmu`, `valueAxisMajorGridlineWidthEmu` and their category / secondary-axis mirrors; series `lineColor` / `markerColor` / `markerLineColor`; `dataLabels.showLeaderLines` |
|
|
381
|
-
| Theme | `getPresentationTheme` — color scheme (`accent1`..`accent6`, `dark1`, `light1`, `hyperlink`, ...)
|
|
516
|
+
| Theme | `getPresentationTheme` / `setPresentationTheme` — color scheme (`accent1`..`accent6`, `dark1`, `light1`, `hyperlink`, ...); `getPresentationFonts` / `setPresentationFonts` — major / minor Latin, East Asian, and complex-script faces |
|
|
517
|
+
| Groups | `groupShapes`, `ungroupShapes`, `getGroupChildren`, `getGroupTransform` |
|
|
518
|
+
| Text autofit | `setShapeTextAutoFit` / `getShapeTextAutoFit`, `getShapeTextAutoFitParams` |
|
|
519
|
+
| Preset adjustments | `setShapeAdjustValues`; `getShapeCustomGeometry` (custom geometry is read-only) |
|
|
520
|
+
| Document properties | `getCoreProperties` / `setCoreProperties`, `touchModified`, `getThumbnail` / `setThumbnail` / `removeThumbnail` |
|
|
521
|
+
| Package inspection | `listPackageParts`, `readPackagePart`, `getMediaParts`, `getOrphanMediaPartNames`, `getPackageSize`, `compactPackage` |
|
|
382
522
|
| Validation | `validatePresentation(pres)` — invariant checks, returns `ValidationIssue[]` |
|
|
383
523
|
| Units | `inches(n)`, `cm(n)`, `mm(n)`, `pt(n)`, `emu(n)` — return branded `Emu` numbers |
|
|
384
524
|
|
|
385
|
-
Text formats (`TextFormat`, including a paragraph's `endFormat`) cover the Latin
|
|
525
|
+
Text formats (`TextFormat`, including a paragraph's `endFormat`) cover the Latin, East Asian and complex-script typefaces (`font`, `fontEastAsian`, `fontComplexScript` — `<a:latin>`, `<a:ea>`, `<a:cs>`). Each is authored and read on its own; setting one leaves the others as they were. Chart labels carry the Latin / East Asian pair and the complex-script slot on `ChartTextStyle`: `font` fills `<a:latin>` and `<a:ea>`, `fontComplexScript` fills `<a:cs>`, and neither implies the other. Rebuilding a typeface writes the `typeface` attribute only, so any `pitchFamily` / `charset` the source file carried on that element is dropped.
|
|
526
|
+
|
|
527
|
+
Runs that name no face fall back to the theme's font scheme, which is also where a per-script list (`<a:font script="Thai" typeface="Cordia New"/>` and 46 siblings) lives. `createPresentation`'s blank deck carries Office's own list in both `majorFont` and `minorFont`.
|
|
386
528
|
|
|
387
529
|
Authored XML text and attribute values must contain only XML 1.0 characters. Illegal C0 controls (except tab, LF, and CR), U+FFFE, U+FFFF, and unpaired UTF-16 surrogates throw an error identifying the code point. Remove these characters before authoring; valid supplementary characters such as emoji are preserved.
|
|
388
530
|
|
|
531
|
+
## Preview and text-overflow checks
|
|
532
|
+
|
|
533
|
+
[`@office-kit/pptx-preview`](packages/preview) is a companion package that
|
|
534
|
+
renders a slide to SVG (browser and Node) or to PNG (Node, via resvg, with no
|
|
535
|
+
headless Office). `auditTextLayout` reports text that overflows its box or
|
|
536
|
+
wraps unexpectedly, which is how an automated pipeline catches a broken slide
|
|
537
|
+
before a person sees it.
|
|
538
|
+
|
|
539
|
+
```ts
|
|
540
|
+
import { getSlides } from '@office-kit/pptx';
|
|
541
|
+
import { renderSlideToSvg } from '@office-kit/pptx-preview';
|
|
542
|
+
|
|
543
|
+
const svg = renderSlideToSvg(pres, getSlides(pres)[0]!);
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
## Office Kit
|
|
547
|
+
|
|
548
|
+
`@office-kit/pptx` is one of three libraries built on the same rules: the
|
|
549
|
+
ECMA-376 spec is the source of truth, output has to validate, and one ESM
|
|
550
|
+
build has to run everywhere.
|
|
551
|
+
|
|
552
|
+
| Package | Files |
|
|
553
|
+
| -------------------------------------------------------- | ------------------ |
|
|
554
|
+
| [`@office-kit/pptx`](https://github.com/office-kit/pptx) | PowerPoint `.pptx` |
|
|
555
|
+
| [`@office-kit/xlsx`](https://github.com/office-kit/xlsx) | Excel `.xlsx` |
|
|
556
|
+
| [`@office-kit/docx`](https://github.com/office-kit/docx) | Word `.docx` |
|
|
557
|
+
|
|
389
558
|
## Compatibility
|
|
390
559
|
|
|
391
|
-
- **Node**: >= 24.
|
|
560
|
+
- **Node**: >= 22.18 (CI runs 22, 24, and 26).
|
|
392
561
|
- **Browsers**: current and current-1 of Chrome, Firefox, Safari, Edge.
|
|
393
562
|
- **TypeScript**: >= 5.4 (for strict `satisfies` and `const` type parameters).
|
|
394
|
-
- **Output**:
|
|
395
|
-
|
|
396
|
-
Keynote (current), Google Slides, and LibreOffice
|
|
563
|
+
- **Output**: validated with the Open XML SDK and the ECMA-376 schemas (see
|
|
564
|
+
[How output is checked](#how-output-is-checked)), and smoke-tested against
|
|
565
|
+
PowerPoint (current), Keynote (current), Google Slides, and LibreOffice
|
|
566
|
+
Impress.
|
|
397
567
|
|
|
398
568
|
## Development
|
|
399
569
|
|
|
400
570
|
```sh
|
|
401
571
|
git clone --recurse-submodules git@github.com:office-kit/pptx.git
|
|
402
|
-
cd
|
|
572
|
+
cd pptx
|
|
403
573
|
pnpm install
|
|
404
574
|
pnpm test
|
|
405
575
|
```
|
|
@@ -1262,7 +1262,7 @@ const EXTENDED_PROPS_CONTENT_TYPE = "application/vnd.openxmlformats-officedocume
|
|
|
1262
1262
|
const XML_DECL = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\r\n";
|
|
1263
1263
|
const RT = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
|
|
1264
1264
|
const RT_PACKAGE = "http://schemas.openxmlformats.org/package/2006/relationships";
|
|
1265
|
-
const THEME_XML = `${XML_DECL}<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="1F497D"/></a:dk2><a:lt2><a:srgbClr val="EEECE1"/></a:lt2><a:accent1><a:srgbClr val="4F81BD"/></a:accent1><a:accent2><a:srgbClr val="C0504D"/></a:accent2><a:accent3><a:srgbClr val="9BBB59"/></a:accent3><a:accent4><a:srgbClr val="8064A2"/></a:accent4><a:accent5><a:srgbClr val="4BACC6"/></a:accent5><a:accent6><a:srgbClr val="F79646"/></a:accent6><a:hlink><a:srgbClr val="0000FF"/></a:hlink><a:folHlink><a:srgbClr val="800080"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont><a:latin typeface="Calibri"/><a:ea typeface=""/><a:cs typeface=""/></a:majorFont><a:minorFont><a:latin typeface="Calibri"/><a:ea typeface=""/><a:cs typeface=""/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs><a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="16200000" scaled="1"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="100000"/><a:shade val="100000"/><a:satMod val="130000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="50000"/><a:shade val="100000"/><a:satMod val="350000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="16200000" scaled="0"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"><a:shade val="95000"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln><a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln><a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst><a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw></a:effectLst><a:scene3d><a:camera prst="orthographicFront"><a:rot lat="0" lon="0" rev="0"/></a:camera><a:lightRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRig></a:scene3d><a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs><a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs></a:gsLst><a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs></a:gsLst><a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults/><a:extraClrSchemeLst/></a:theme>`;
|
|
1265
|
+
const THEME_XML = `${XML_DECL}<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="1F497D"/></a:dk2><a:lt2><a:srgbClr val="EEECE1"/></a:lt2><a:accent1><a:srgbClr val="4F81BD"/></a:accent1><a:accent2><a:srgbClr val="C0504D"/></a:accent2><a:accent3><a:srgbClr val="9BBB59"/></a:accent3><a:accent4><a:srgbClr val="8064A2"/></a:accent4><a:accent5><a:srgbClr val="4BACC6"/></a:accent5><a:accent6><a:srgbClr val="F79646"/></a:accent6><a:hlink><a:srgbClr val="0000FF"/></a:hlink><a:folHlink><a:srgbClr val="800080"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont><a:latin typeface="Calibri"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック Light"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线 Light"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Times New Roman"/><a:font script="Hebr" typeface="Times New Roman"/><a:font script="Thai" typeface="Angsana New"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="MoolBoran"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Times New Roman"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:majorFont><a:minorFont><a:latin typeface="Calibri"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Arial"/><a:font script="Hebr" typeface="Arial"/><a:font script="Thai" typeface="Cordia New"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="DaunPenh"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Arial"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs><a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="16200000" scaled="1"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="100000"/><a:shade val="100000"/><a:satMod val="130000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="50000"/><a:shade val="100000"/><a:satMod val="350000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="16200000" scaled="0"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"><a:shade val="95000"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln><a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln><a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst><a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw></a:effectLst><a:scene3d><a:camera prst="orthographicFront"><a:rot lat="0" lon="0" rev="0"/></a:camera><a:lightRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRig></a:scene3d><a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs><a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs></a:gsLst><a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs></a:gsLst><a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults/><a:extraClrSchemeLst/></a:theme>`;
|
|
1266
1266
|
const SLIDE_MASTER_XML = `${XML_DECL}<p:sldMaster xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main"><p:cSld><p:bg><p:bgRef idx="1001"><a:schemeClr val="bg1"/></p:bgRef></p:bg><p:spTree><p:nvGrpSpPr><p:cNvPr id="1" name=""/><p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="0" cy="0"/><a:chOff x="0" y="0"/><a:chExt cx="0" cy="0"/></a:xfrm></p:grpSpPr><p:sp><p:nvSpPr><p:cNvPr id="2" name="Title Placeholder 1"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr><p:nvPr><p:ph type="title"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x="457200" y="274638"/><a:ext cx="8229600" cy="1143000"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr><p:txBody><a:bodyPr vert="horz" lIns="91440" tIns="45720" rIns="91440" bIns="45720" rtlCol="0" anchor="ctr"><a:normAutofit/></a:bodyPr><a:lstStyle/><a:p><a:r><a:rPr lang="en-US" smtClean="0"/><a:t>Click to edit Master title style</a:t></a:r><a:endParaRPr lang="en-US"/></a:p></p:txBody></p:sp><p:sp><p:nvSpPr><p:cNvPr id="3" name="Text Placeholder 2"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr><p:nvPr><p:ph type="body" idx="1"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x="457200" y="1600200"/><a:ext cx="8229600" cy="4525963"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr><p:txBody><a:bodyPr vert="horz" lIns="91440" tIns="45720" rIns="91440" bIns="45720" rtlCol="0"><a:normAutofit/></a:bodyPr><a:lstStyle/><a:p><a:pPr lvl="0"/><a:r><a:rPr lang="en-US" smtClean="0"/><a:t>Click to edit Master text styles</a:t></a:r></a:p></p:txBody></p:sp></p:spTree></p:cSld><p:clrMap bg1="lt1" tx1="dk1" bg2="lt2" tx2="dk2" accent1="accent1" accent2="accent2" accent3="accent3" accent4="accent4" accent5="accent5" accent6="accent6" hlink="hlink" folHlink="folHlink"/><p:sldLayoutIdLst><p:sldLayoutId id="2147483649" r:id="rId1"/><p:sldLayoutId id="2147483650" r:id="rId2"/><p:sldLayoutId id="2147483651" r:id="rId3"/></p:sldLayoutIdLst><p:txStyles><p:titleStyle><a:lvl1pPr algn="ctr" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="0"/></a:spcBef><a:buNone/><a:defRPr sz="4400" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mj-lt"/><a:ea typeface="+mj-ea"/><a:cs typeface="+mj-cs"/></a:defRPr></a:lvl1pPr></p:titleStyle><p:bodyStyle><a:lvl1pPr marL="342900" indent="-342900" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial"/><a:buChar char="•"/><a:defRPr sz="3200" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl1pPr><a:lvl2pPr marL="742950" indent="-285750" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial"/><a:buChar char="–"/><a:defRPr sz="2800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl2pPr><a:lvl3pPr marL="1143000" indent="-228600" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial"/><a:buChar char="•"/><a:defRPr sz="2400" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl3pPr><a:lvl4pPr marL="1600200" indent="-228600" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial"/><a:buChar char="–"/><a:defRPr sz="2000" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl4pPr><a:lvl5pPr marL="2057400" indent="-228600" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial"/><a:buChar char="»"/><a:defRPr sz="2000" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl5pPr></p:bodyStyle><p:otherStyle><a:defPPr><a:defRPr lang="en-US"/></a:defPPr><a:lvl1pPr marL="0" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl1pPr></p:otherStyle></p:txStyles></p:sldMaster>`;
|
|
1267
1267
|
const LAYOUT_BLANK_XML = `${XML_DECL}<p:sldLayout xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main" type="blank" preserve="1"><p:cSld name="Blank"><p:spTree><p:nvGrpSpPr><p:cNvPr id="1" name=""/><p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="0" cy="0"/><a:chOff x="0" y="0"/><a:chExt cx="0" cy="0"/></a:xfrm></p:grpSpPr></p:spTree></p:cSld><p:clrMapOvr><a:masterClrMapping/></p:clrMapOvr></p:sldLayout>`;
|
|
1268
1268
|
const LAYOUT_TITLE_XML = `${XML_DECL}<p:sldLayout xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main" type="title" preserve="1"><p:cSld name="Title Slide"><p:spTree><p:nvGrpSpPr><p:cNvPr id="1" name=""/><p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="0" cy="0"/><a:chOff x="0" y="0"/><a:chExt cx="0" cy="0"/></a:xfrm></p:grpSpPr><p:sp><p:nvSpPr><p:cNvPr id="2" name="Title 1"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr><p:nvPr><p:ph type="ctrTitle"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x="685800" y="2130425"/><a:ext cx="7772400" cy="1470025"/></a:xfrm></p:spPr><p:txBody><a:bodyPr/><a:lstStyle/><a:p><a:r><a:rPr lang="en-US" smtClean="0"/><a:t>Click to edit Master title style</a:t></a:r><a:endParaRPr lang="en-US"/></a:p></p:txBody></p:sp><p:sp><p:nvSpPr><p:cNvPr id="3" name="Subtitle 2"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr><p:nvPr><p:ph type="subTitle" idx="1"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x="1371600" y="3886200"/><a:ext cx="6400800" cy="1752600"/></a:xfrm></p:spPr><p:txBody><a:bodyPr/><a:lstStyle/><a:p><a:r><a:rPr lang="en-US" smtClean="0"/><a:t>Click to edit Master subtitle style</a:t></a:r><a:endParaRPr lang="en-US"/></a:p></p:txBody></p:sp></p:spTree></p:cSld><p:clrMapOvr><a:masterClrMapping/></p:clrMapOvr></p:sldLayout>`;
|
|
@@ -1679,7 +1679,7 @@ NS.dml;
|
|
|
1679
1679
|
const NAME_RPR$6 = qname("a", "rPr", NS.dml);
|
|
1680
1680
|
const NAME_LATIN = qname("a", "latin", NS.dml);
|
|
1681
1681
|
const NAME_EA = qname("a", "ea", NS.dml);
|
|
1682
|
-
NS.dml;
|
|
1682
|
+
const NAME_CS = qname("a", "cs", NS.dml);
|
|
1683
1683
|
const NAME_SOLID_FILL$6 = qname("a", "solidFill", NS.dml);
|
|
1684
1684
|
const NAME_SRGB_CLR$3 = qname("a", "srgbClr", NS.dml);
|
|
1685
1685
|
const NAME_SCHEME_CLR$1 = qname("a", "schemeClr", NS.dml);
|
|
@@ -1742,6 +1742,11 @@ const setEastAsian = (rPr, font) => {
|
|
|
1742
1742
|
if (font === null) return;
|
|
1743
1743
|
insertChildByRank(rPr, elem(NAME_EA, { attrs: [attr(ATTR_TYPEFACE$3, font)] }), rprChildRank);
|
|
1744
1744
|
};
|
|
1745
|
+
const setComplexScript = (rPr, font) => {
|
|
1746
|
+
rPr.children = rPr.children.filter((c) => !(c.kind === "element" && c.name.namespaceURI === NS.dml && c.name.localName === "cs"));
|
|
1747
|
+
if (font === null) return;
|
|
1748
|
+
insertChildByRank(rPr, elem(NAME_CS, { attrs: [attr(ATTR_TYPEFACE$3, font)] }), rprChildRank);
|
|
1749
|
+
};
|
|
1745
1750
|
const setHighlight = (rPr, value) => {
|
|
1746
1751
|
rPr.children = rPr.children.filter((c) => !(c.kind === "element" && c.name.namespaceURI === NS.dml && c.name.localName === "highlight"));
|
|
1747
1752
|
if (value === null) return;
|
|
@@ -1779,6 +1784,7 @@ const applyRunFormat = (rPr, format) => {
|
|
|
1779
1784
|
rPr.attrs = attrs;
|
|
1780
1785
|
if (format.font !== void 0) setLatin(rPr, format.font);
|
|
1781
1786
|
if (format.fontEastAsian !== void 0) setEastAsian(rPr, format.fontEastAsian);
|
|
1787
|
+
if (format.fontComplexScript !== void 0) setComplexScript(rPr, format.fontComplexScript);
|
|
1782
1788
|
if (format.color !== void 0) setSolidFill$1(rPr, format.color);
|
|
1783
1789
|
if (format.highlight !== void 0) setHighlight(rPr, format.highlight);
|
|
1784
1790
|
};
|
|
@@ -5628,6 +5634,7 @@ const rPrAttrsFromStyle = (style) => {
|
|
|
5628
5634
|
children.push(elem(a("latin"), { attrs: [typeface] }));
|
|
5629
5635
|
children.push(elem(a("ea"), { attrs: [typeface] }));
|
|
5630
5636
|
}
|
|
5637
|
+
if (style?.fontComplexScript !== void 0) children.push(elem(a("cs"), { attrs: [attr(qname("", "typeface", ""), style.fontComplexScript)] }));
|
|
5631
5638
|
return {
|
|
5632
5639
|
attrs,
|
|
5633
5640
|
children
|
|
@@ -5637,7 +5644,7 @@ const titleElement = (title, style, rotationDeg) => {
|
|
|
5637
5644
|
const pPr = elem(a("pPr"), { children: [elem(a("defRPr"))] });
|
|
5638
5645
|
const { attrs: runAttrs, children: runChildren } = rPrAttrsFromStyle(style);
|
|
5639
5646
|
const runRPr = elem(a("rPr"), {
|
|
5640
|
-
attrs:
|
|
5647
|
+
attrs: runAttrs,
|
|
5641
5648
|
children: runChildren
|
|
5642
5649
|
});
|
|
5643
5650
|
const tRun = elem(a("r"), { children: [runRPr, elem(a("t"), { children: [text(title)] })] });
|
|
@@ -6159,9 +6166,11 @@ const NAME_A_DEF_RPR$1 = qname("a", "defRPr", NS_A);
|
|
|
6159
6166
|
const NAME_A_PPR$1 = qname("a", "pPr", NS_A);
|
|
6160
6167
|
const NAME_A_SRGB = qname("a", "srgbClr", NS_A);
|
|
6161
6168
|
const NAME_A_LATIN = qname("a", "latin", NS_A);
|
|
6169
|
+
const NAME_A_CS = qname("a", "cs", NS_A);
|
|
6162
6170
|
const ATTR_TYPEFACE = qname("", "typeface", "");
|
|
6163
6171
|
const readRunStyle = (rPr) => {
|
|
6164
6172
|
let font;
|
|
6173
|
+
let fontComplexScript;
|
|
6165
6174
|
let sizePt;
|
|
6166
6175
|
let bold;
|
|
6167
6176
|
let italic;
|
|
@@ -6188,9 +6197,15 @@ const readRunStyle = (rPr) => {
|
|
|
6188
6197
|
const tf = getAttrValue(latin, ATTR_TYPEFACE);
|
|
6189
6198
|
if (tf !== null && tf !== "") font = tf;
|
|
6190
6199
|
}
|
|
6191
|
-
|
|
6200
|
+
const cs = firstChildElement(rPr, NAME_A_CS);
|
|
6201
|
+
if (cs) {
|
|
6202
|
+
const tf = getAttrValue(cs, ATTR_TYPEFACE);
|
|
6203
|
+
if (tf !== null && tf !== "") fontComplexScript = tf;
|
|
6204
|
+
}
|
|
6205
|
+
if (font === void 0 && fontComplexScript === void 0 && sizePt === void 0 && bold === void 0 && italic === void 0 && color === void 0) return;
|
|
6192
6206
|
return {
|
|
6193
6207
|
...font !== void 0 ? { font } : {},
|
|
6208
|
+
...fontComplexScript !== void 0 ? { fontComplexScript } : {},
|
|
6194
6209
|
...sizePt !== void 0 ? { sizePt } : {},
|
|
6195
6210
|
...bold !== void 0 ? { bold } : {},
|
|
6196
6211
|
...italic !== void 0 ? { italic } : {},
|
|
@@ -8499,6 +8514,7 @@ const NAME_P_OTHER_STYLE = qname("p", "otherStyle", NS.pml);
|
|
|
8499
8514
|
const mergeRPrLayer = (base, layer) => {
|
|
8500
8515
|
if (base.font === void 0 && layer.font !== void 0) base.font = layer.font;
|
|
8501
8516
|
if (base.fontEastAsian === void 0 && layer.fontEastAsian !== void 0) base.fontEastAsian = layer.fontEastAsian;
|
|
8517
|
+
if (base.fontComplexScript === void 0 && layer.fontComplexScript !== void 0) base.fontComplexScript = layer.fontComplexScript;
|
|
8502
8518
|
if (base.size === void 0 && layer.size !== void 0) base.size = layer.size;
|
|
8503
8519
|
if (base.color === void 0 && layer.color !== void 0) base.color = layer.color;
|
|
8504
8520
|
if (base.bold === void 0 && layer.bold !== void 0) base.bold = layer.bold;
|
|
@@ -8662,6 +8678,14 @@ const getShapeRunFormatEffective = (pres, shape, paragraphIndex, runIndex) => {
|
|
|
8662
8678
|
const fallback = phType === "title" || phType === "ctrTitle" ? fonts.majorEastAsian : fonts.minorEastAsian;
|
|
8663
8679
|
if (fallback) result.fontEastAsian = fallback;
|
|
8664
8680
|
}
|
|
8681
|
+
if (typeof result.fontComplexScript === "string" && result.fontComplexScript.startsWith("+")) {
|
|
8682
|
+
const resolved = resolveThemeToken(result.fontComplexScript);
|
|
8683
|
+
if (resolved) result.fontComplexScript = resolved;
|
|
8684
|
+
}
|
|
8685
|
+
if (result.fontComplexScript === void 0) {
|
|
8686
|
+
const fallback = phType === "title" || phType === "ctrTitle" ? fonts.majorComplexScript : fonts.minorComplexScript;
|
|
8687
|
+
if (fallback) result.fontComplexScript = fallback;
|
|
8688
|
+
}
|
|
8665
8689
|
}
|
|
8666
8690
|
return result;
|
|
8667
8691
|
};
|
|
@@ -13267,6 +13291,11 @@ const parseRPrLikeElement = (rPr, ctx) => {
|
|
|
13267
13291
|
const t = getAttrValue(ea, qname("", "typeface", ""));
|
|
13268
13292
|
if (t !== null) out.fontEastAsian = t;
|
|
13269
13293
|
}
|
|
13294
|
+
const cs = firstChildElement(rPr, qname("a", "cs", NS.dml));
|
|
13295
|
+
if (cs !== null) {
|
|
13296
|
+
const t = getAttrValue(cs, qname("", "typeface", ""));
|
|
13297
|
+
if (t !== null) out.fontComplexScript = t;
|
|
13298
|
+
}
|
|
13270
13299
|
return out;
|
|
13271
13300
|
};
|
|
13272
13301
|
/**
|
|
@@ -17325,8 +17354,8 @@ const ungroupShapes = (group) => {
|
|
|
17325
17354
|
};
|
|
17326
17355
|
//#endregion
|
|
17327
17356
|
//#region src/api/index.ts
|
|
17328
|
-
const VERSION = "0.
|
|
17357
|
+
const VERSION = "0.16.0";
|
|
17329
17358
|
//#endregion
|
|
17330
17359
|
export { slideHasAnimations as $, getTableCellMargins as $a, clearSlideHyperlinks as $i, getShapeText as $n, getSlideLayouts as $o, getShapeRunCount as $r, getCommentAuthor as $s, getShapeStrokeColorResolved as $t, getPresentationTextLength as A, clearSlideTransition as Aa, getShapeImageContrast as Ai, findShapesAtPoint as An, setTableStyleFlags as Ao, setShapeSize as Ar, getSlideLayoutBackgroundImageBytes as As, setShapeTextBodyRotationDeg as At, getSlideText as B, listPackageParts as Ba, isShapeImageGrayscale as Bi, getShapeCenter as Bn, setCoreProperties as Bo, getParagraphAlignment as Br, setSlideBackgroundImage as Bs, getShapeEffectsEffective as Bt, findSlideByTitle as C, getSlidesWithOverlap as Ca, pt as Cc, findSlidesByLayoutName as Ci, getSlideLayout as Cn, setTableCellMargins as Co, setShapeGradientFill as Cr, getSlideBackground as Cs, getShapeTextWrap as Ct, getOutlineText as D, removeSlideNotes as Da, getShapeImageBiLevelThreshold as Di, setSlideLayout as Dn, setTableCellTextFormat as Do, setShapePatternFill as Dr, getSlideColorMapOverride as Ds, setShapeText as Dt, getAllShapes as E, hasSlideNotes as Ea, getPresentationImageCountsBySlide as Ei, replaceTokensInSlide as En, setTableCellTextDirection as Eo, setShapeNoStroke as Er, getSlideBackgroundPatternFill as Es, setShapeParagraphs as Et, getSlideIndex as F, getMediaParts as Fa, getShapeImageLinkUrl as Fi, getMaxShapeIdInPresentation as Fn, getCoreProperties as Fo, setShapeStrokeDash as Fr, getSlideMasterBackgroundGradientFill as Fs, setShapeTextWrap as Ft, isSlideHidden as G, clearTableCellFill as Ga, SLIDE_SIZE_16_10 as Gi, getShapeKind as Gn, findSlideLayoutByPartName as Go, getParagraphIndent as Gr, clearAllSlideComments as Gs, getShapeFill as Gt, getSlideXmlString as H, setMediaPartBytes as Ha, setShapeImageContrast as Hi, getShapeDescription as Hn, touchModified as Ho, getParagraphBulletImageBytes as Hr, setShapeClickAction as Hs, setShapeShadow as Ht, getSlideInfo as I, getOrphanMediaPartNames as Ia, getShapeImageOpacity as Ii, getShapeAdjustValues as In, getExtendedProperties as Io, setShapeStrokeJoin as Ir, getSlideMasterBackgroundImageBytes as Is, clearShapeEffects as It, replaceTextInSlide as J, getTableCell as Ja, getSlideSize as Ji, getShapePlaceholderType as Jn, getSlideLayoutPartName as Jo, getParagraphSpacing as Jr, findCommentsAfter as Js, getShapeFillEffective as Jt, replaceTextInNotes as K, getPresentationTableCountsBySlide as Ka, SLIDE_SIZE_16_9 as Ki, getShapeName as Kn, findSlideLayoutByType as Ko, getParagraphLevel as Kr, clearSlideComments as Ks, getShapeFillColor as Kt, getSlideLayoutCount as L, getPackageSize as La, getShapeImagePartName as Li, getShapeAltTitle as Ln, getPresentationCreated as Lo, getShapeRunFormat as Lr, getSlideMasterBackgroundPatternFill as Ls, findShapesByEffect as Lt, getShapeAt as M, setSlideTransition as Ma, getShapeImageDuotone as Mi, getGroupChildren as Mn, getThumbnail as Mo, setShapeStrokeArrow as Mr, getSlideLayoutBackgroundShapes as Ms, setShapeTextDirection as Mt, getSlideAt as N, _internalPackageOf as Na, getShapeImageFillBytes as Ni, getGroupTransform as Nn, removeThumbnail as No, setShapeStrokeCap as Nr, getSlideLayoutShapes as Ns, setShapeTextFormat as Nt, getPresentationShapeCountsBySlide as O, replaceHyperlink as Oa, getShapeImageBrightness as Oi, translateShapes as On, setTableColumnWidth as Oo, setShapePosition as Or, getSlideLayoutBackground as Os, setShapeTextAnchor as Ot, getSlideCount as P, compactPackage as Pa, getShapeImageFormat as Pi, getMaxShapeId as Pn, setThumbnail as Po, setShapeStrokeCompound as Pr, getSlideMasterBackground as Ps, setShapeTextMargins as Pt, setSlideHidden as Q, getTableCellFill as Qa, clearAllSlideNotes as Qi, getShapeSize as Qn, getSlideLayoutUsageCountsByType as Qo, getShapeRunClickAction as Qr, findSlidesWithCommentsByAuthor as Qs, getShapeStrokeColor as Qt, getSlideOutline as R, getPresentationSummary as Ra, hasShapeImage as Ri, getShapeBounds as Rn, getPresentationModified as Ro, resolveDrawingColor as Rr, getSlideMasterShapes as Rs, getShapeEffect as Rt, findSlideByText as S, getSlidesWithNotes as Sa, mm as Sc, findShapesOutsideCanvas as Si, getShapesBounds as Sn, setTableCellFill as So, setShapeFlip as Sr, clearSlideBackground as Ss, getShapeTextMargins as St, findSlidesByText as T, getVisibleSlides as Ta, findSlidesByLayoutType as Ti, getSlidesWithEmptyPlaceholders as Tn, setTableCellText as To, setShapeNoFill as Tr, getSlideBackgroundImageBytes as Ts, setShapeBullets as Tt, getSlides as U, slidesUsingMediaPart as Ua, setShapeImageCrop as Ui, getShapeFlip as Un, findLayoutsWithPlaceholderType as Uo, getParagraphBulletStyle as Ur, setShapeImage as Us, getShapeGradientFill as Ut, getSlideTextLength as V, readPackagePart as Va, setShapeImageBrightness as Vi, getShapeCustomGeometry as Vn, setExtendedProperties as Vo, getParagraphBullet as Vr, getShapeClickAction as Vs, setShapeGlow as Vt, getSlidesByLayout as W, validatePresentation as Wa, setShapeImageOpacity as Wi, getShapeId as Wn, findSlideLayout as Wo, getParagraphEndFormat as Wr, addSlideComment as Ws, getShapeGradientFillEffective as Wt, replaceTokensInPresentation as X, getTableCellAnchor as Xa, appendSlideNotes as Xi, getShapePreset as Xn, getSlideLayoutType as Xo, getShapeParagraphCount as Xr, findCommentsByAuthor as Xs, getShapeStroke as Xt, replaceTextInSlideNotes as Y, getTableCellAlignment as Ya, setSlideSize as Yi, getShapePosition as Yn, getSlideLayoutPlaceholders as Yo, getShapeHyperlinkTooltip as Yr, findCommentsBefore as Ys, getShapeFillOpacity as Yt, searchSlides as Z, getTableCellBorders as Za, clearAllHyperlinks as Zi, getShapeRotation as Zn, getSlideLayoutUsageCounts as Zo, getShapeParagraphElements as Zr, findCommentsByText as Zs, getShapeStrokeCap as Zt, sortSlides as _, getSlideNotesLength as _a, loadPresentation as _c, findShapesWithAnimation as _i, findSlidePlaceholderByIdx as _n, removeTableColumn as _o, getShapePatternFill as _r, getShapeChartSpec as _s, getShapeTextAutoFit as _t, addContentSlide as a, getAllHyperlinks as aa, getCommentsSortedByDate as ac, setParagraphBullet as ai, findEmptyPlaceholders as an, getTableCells as ao, isShapeHidden as ar, setShapeRunFormat as as, bringShapeForward as at, setSlideSections as b, getSlidesWithHyperlinks as ba, emu as bc, findFlippedShapes as bi, getShapeSlide as bn, setTableCellAnchor as bo, setShapeAdjustValues as br, getEffectiveColorMap as bs, getShapeTextColumns as bt, addSlideAt as c, getAllTables as ca, getPresentationCommenters as cc, setParagraphSpacing as ci, findShapeByText as cn, getTableRowHeights as co, pointInShape as cr, findChartsBySeriesName as cs, copyShape as ct, duplicateSlideAt as d, getHiddenSlides as da, removeSlideComment as dc, getSlideBody as di, findShapesByKind as dn, getTableStyleId as do, setShapeBounds as dr, getPresentationChartCountsBySlide as ds, sendShapeBackward as dt, findSlidesByHyperlink as ea, getCommentAuthors as ec, getShapeRunHyperlink as ei, getShapeStrokeCompound as en, getTableCellParagraphs as eo, getSlideMasterCount as er, getUnusedSlideLayouts as es, addSlideImage as et, importSlide as f, getPresentationHyperlinkCountsBySlide as fa, getPresentationFonts as fc, getSlideTitle as fi, findShapesByName as fn, insertTableColumn as fo, setShapeDescription as fr, getPresentationChartKindCounts as fs, sendShapeToBack as ft, reverseSlides as g, getSlideNotes as ga, createPresentation as gc, clearSlideAnimations as gi, findSlidePlaceholder as gn, mergeTableCells as go, clearShapeStroke as gr, getShapeChartSeriesValues as gs, getShapeTextAnchor as gt, removeSlide as h, getPresentationNotesText as ha, setPresentationTheme as hc, setSlideTitle as hi, findShapesWithHyperlinks as hn, isTableShape as ho, clearShapeFill as hr, getShapeChartSeriesNames as hs, getShapeBodyPrEffective as ht, addBlankSlide as i, getAllComments as ia, getCommentText as ic, setParagraphAlignment as ii, getShapeStrokeWidth as in, getTableCellTextDirection as io, getUnusedSlideMasters as ir, setShapeHyperlink as is, addSlideTextBox as it, getPresentationTextLengthsBySlide as j, getSlideTransition as ja, getShapeImageCrop as ji, findShapesInRect as jn, setTableStyleId as jo, setShapeStroke as jr, getSlideLayoutBackgroundPatternFill as js, setShapeTextColumns as jt, getPresentationText as k, setSlideNotes as ka, getShapeImageBytes as ki, centerShapeOnSlide as kn, setTableRowHeight as ko, setShapeRotation as kr, getSlideLayoutBackgroundGradientFill as ks, setShapeTextAutoFit as kt, addTitleSlide as l, getDistinctHyperlinkUrls as la, getSlideCommentAuthors as lc, setShapeRunHyperlink as li, findShapeInPresentation as ln, getTableSize as lo, renameShape as lr, findChartsWithDataLabels as ls, getShapeZIndex as lt, moveSlide as m, getPresentationNotesLengthsBySlide as ma, setPresentationFonts as mc, setSlidePlaceholders as mi, findShapesByText as mn, isChartShape as mo, shapesOverlap as mr, getShapeChartKind as ms, appendShapeText as mt, groupShapes as n, findSlidesWithChartTrendlines as na, getCommentPosition as nc, getShapeRunText as ni, getShapeStrokeJoin as nn, getTableCellSpan as no, getSlideMasterPartNames as nr, getShapeHyperlink as ns, addSlideShape as nt, addSectionHeaderSlide as o, getAllImages as oa, getPresentationCommentCountsByAuthor as oc, setParagraphLevel as oi, findShapeById as on, getTableColumnWidths as oo, isShapePlaceholder as or, addSlideChart as os, bringShapeToFront as ot, mergePresentations as p, getPresentationNotesLength as pa, getPresentationTheme as pc, setSlideBody as pi, findShapesByPreset as pn, insertTableRow as po, setShapeHidden as pr, getShapeChartCategories as ps, setShapeZIndex as pt, replaceTextInPresentation as q, getSlideTables as qa, SLIDE_SIZE_4_3 as qi, getShapePlaceholderIdx as qn, getSlideLayoutName as qo, getParagraphLineSpacing as qr, findCommentAuthorByName as qs, getShapeFillColorResolved as qt, ungroupShapes as r, getAllCharts as ra, getCommentSlide as rc, isParagraphBulletPicture as ri, getShapeStrokeOpacity as rn, getTableCellText as ro, getSlideMasterUsageCounts as rr, getShapeRunFormatEffective as rs, addSlideTable as rt, addSlide as s, getAllNotes as sa, getPresentationCommentCountsBySlide as sc, setParagraphLineSpacing as si, findShapeByName as sn, getTableDimensions as so, isShapeTextBox as sr, findChartByKind as ss, clearSlideShapes as st, VERSION as t, findSlidesWithChartKind as ta, getCommentDate as tc, getShapeRunHyperlinkTooltip as ti, getShapeStrokeEffective as tn, getTableCellPosition as to, getSlideMasterPartName as tr, getParagraphPropertiesEffective as ts, addSlideLine as tt, duplicateSlide as u, getEmptySlides as ua, getSlideComments as uc, setShapeRunText as ui, findShapesByHyperlink as un, getTableStyleFlags as uo, setShapeAltTitle as ur, findChartsWithTrendlines as us, removeShape as ut, swapSlides as v, getSlidesWithCharts as va, savePresentation as vc, getShapeAnimation as vi, findSlidePlaceholders as vn, removeTableRow as vo, getShapeStrokeArrow as vr, getSlideCharts as vs, getShapeTextAutoFitParams as vt, findSlidesByNotes as w, getSlidesWithTables as wa, findSlidesByLayoutPartName as wi, getSlideShapes as wn, setTableCellParagraphs as wo, setShapeImageFill as wr, getSlideBackgroundGradientFill as ws, setShapeAlignment as wt, findSlideByPartName as x, getSlidesWithImages as xa, inches as xc, findOverlappingShapePairs as xi, getShapeXmlString as xn, setTableCellBorders as xo, setShapeFill as xr, resolveDeckBodyTextColor as xs, getShapeTextDirection as xt, getSlideSections as y, getSlidesWithComments as ya, cm as yc, setShapeAnimation as yi, getShapeIndex as yn, setTableCellAlignment as yo, getShapeStrokeDash as yr, setChartSpec as ys, getShapeTextBodyRotationDeg as yt, getSlidePartName as z, getSlideMediaPartNames as za, hasShapeText as zi, getShapeBoundsResolved as zn, incrementRevision as zo, resolveDrawingColorOpacity as zr, setSlideBackground as zs, getShapeEffects as zt };
|
|
17331
17360
|
|
|
17332
|
-
//# sourceMappingURL=api-
|
|
17361
|
+
//# sourceMappingURL=api-DQEn2Bo4.js.map
|