@quirekit/pptx-editor 0.3.0 → 0.3.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/README.md +21 -0
- package/README.zh-CN.md +21 -0
- package/dist/ai.d.mts +24 -1
- package/dist/ai.mjs +51 -51
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +36 -32
- package/dist/open-aKqKXJ6B.mjs +2 -0
- package/dist/styles.css +29 -0
- package/dist/svg-raster-BWlVOKxM.mjs +11 -0
- package/dist/templates.d.mts +575 -0
- package/dist/templates.mjs +1 -0
- package/dist/{types-B8CWBpnf.d.mts → types-Brh5JARz.d.mts} +437 -674
- package/dist/types-DeGx0c3N.d.mts +687 -0
- package/package.json +33 -29
- package/dist/svg-raster-DL19F7ez.mjs +0 -11
|
@@ -0,0 +1,575 @@
|
|
|
1
|
+
import { A as PptxDrawBackground, C as presentationTemplateFormat, D as PptxDesignPaletteInput, E as PptxDesignFontInput, M as PptxPageKind, O as PptxDesignRole, S as PptxTemplateSource, T as PptxCustomStyle, _ as PptxTemplateManifest, b as PptxTemplateSlot, d as PptxTemplateDesign, f as PptxTemplateEntry, g as PptxTemplateItems, h as PptxTemplateItem, j as PptxDrawElement, k as PptxDesignTypeScale, m as PptxTemplateFrame, p as PptxTemplateFile, v as PptxTemplatePage, w as PptxComponentSkin, x as PptxTemplateSlotRole, y as PptxTemplatePageKind } from "./types-Brh5JARz.mjs";
|
|
2
|
+
import { AnimationDirection, AnimationEffect, CustomGeometryPathInput, PresentationData, SlideData } from "@quirekit/office-kit-pptx";
|
|
3
|
+
//#region src/template/open.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Reads what a template file offers, for template libraries that store manifests beside their files and authors who
|
|
6
|
+
* correct them. It runs without a page.
|
|
7
|
+
* @param file - Template file.
|
|
8
|
+
* @returns Its manifest.
|
|
9
|
+
*/
|
|
10
|
+
declare function describeTemplate(file: PptxTemplateFile): Promise<PptxTemplateManifest>;
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/commands/draw/commands.d.ts
|
|
13
|
+
declare module "../../command/types" {
|
|
14
|
+
interface PptxCommandRegistry {
|
|
15
|
+
/** Draws a whole slide from free objects, as a new slide after the target or in its place. */
|
|
16
|
+
drawSlide: (options: {
|
|
17
|
+
slide: string;
|
|
18
|
+
replace: boolean;
|
|
19
|
+
page?: PptxPageKind;
|
|
20
|
+
background?: PptxDrawBackground;
|
|
21
|
+
elements: readonly PptxDrawElement[];
|
|
22
|
+
problem?: string;
|
|
23
|
+
}) => PptxCommand;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/** @param element - Element. @returns Every colour it names, so roles can be checked before anything is drawn. */
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/motion/presets.d.ts
|
|
29
|
+
/**
|
|
30
|
+
* Motion temperaments a design language picks from. Each is one way of moving: quiet fades for reports, a held breath
|
|
31
|
+
* for launch keynotes, strokes that wipe in for hand-drawn looks, bounces for playful ones.
|
|
32
|
+
*/
|
|
33
|
+
declare const pptxMotions: {
|
|
34
|
+
/** Quiet: slides cross-fade, blocks fade in. */readonly calm: {
|
|
35
|
+
readonly transition: {
|
|
36
|
+
readonly effect: "fade";
|
|
37
|
+
readonly durationMs: 500;
|
|
38
|
+
};
|
|
39
|
+
readonly sectionTransition: {
|
|
40
|
+
readonly effect: "fade";
|
|
41
|
+
readonly durationMs: 900;
|
|
42
|
+
};
|
|
43
|
+
readonly entrance: {
|
|
44
|
+
readonly effect: "fadeIn";
|
|
45
|
+
readonly durationMs: 500;
|
|
46
|
+
};
|
|
47
|
+
readonly hero: {
|
|
48
|
+
readonly effect: "zoomIn";
|
|
49
|
+
readonly durationMs: 600;
|
|
50
|
+
};
|
|
51
|
+
}; /** Launch keynote: slow fades through black between chapters, the focal number grows in. */
|
|
52
|
+
readonly keynote: {
|
|
53
|
+
readonly transition: {
|
|
54
|
+
readonly effect: "fade";
|
|
55
|
+
readonly durationMs: 800;
|
|
56
|
+
};
|
|
57
|
+
readonly sectionTransition: {
|
|
58
|
+
readonly effect: "fade";
|
|
59
|
+
readonly thruBlack: true;
|
|
60
|
+
readonly durationMs: 1200;
|
|
61
|
+
};
|
|
62
|
+
readonly entrance: {
|
|
63
|
+
readonly effect: "fadeIn";
|
|
64
|
+
readonly durationMs: 700;
|
|
65
|
+
};
|
|
66
|
+
readonly hero: {
|
|
67
|
+
readonly effect: "basicZoomIn";
|
|
68
|
+
readonly durationMs: 900;
|
|
69
|
+
};
|
|
70
|
+
}; /** Drawn: blocks wipe in from the left as if written. */
|
|
71
|
+
readonly drawn: {
|
|
72
|
+
readonly transition: {
|
|
73
|
+
readonly effect: "push";
|
|
74
|
+
readonly from: "right";
|
|
75
|
+
readonly durationMs: 600;
|
|
76
|
+
};
|
|
77
|
+
readonly sectionTransition: {
|
|
78
|
+
readonly effect: "wipe";
|
|
79
|
+
readonly from: "right";
|
|
80
|
+
readonly durationMs: 800;
|
|
81
|
+
};
|
|
82
|
+
readonly entrance: {
|
|
83
|
+
readonly effect: "wipeIn";
|
|
84
|
+
readonly direction: "left";
|
|
85
|
+
readonly durationMs: 600;
|
|
86
|
+
};
|
|
87
|
+
readonly hero: {
|
|
88
|
+
readonly effect: "zoomIn";
|
|
89
|
+
readonly durationMs: 600;
|
|
90
|
+
};
|
|
91
|
+
}; /** Playful: slides push across, blocks bounce in. */
|
|
92
|
+
readonly playful: {
|
|
93
|
+
readonly transition: {
|
|
94
|
+
readonly effect: "push";
|
|
95
|
+
readonly from: "right";
|
|
96
|
+
readonly durationMs: 500;
|
|
97
|
+
};
|
|
98
|
+
readonly sectionTransition: {
|
|
99
|
+
readonly effect: "zoom";
|
|
100
|
+
readonly inOut: "in";
|
|
101
|
+
readonly durationMs: 700;
|
|
102
|
+
};
|
|
103
|
+
readonly entrance: {
|
|
104
|
+
readonly effect: "bounceIn";
|
|
105
|
+
readonly durationMs: 700;
|
|
106
|
+
};
|
|
107
|
+
readonly hero: {
|
|
108
|
+
readonly effect: "basicZoomIn";
|
|
109
|
+
readonly durationMs: 600;
|
|
110
|
+
};
|
|
111
|
+
}; /** Technical: short wipes, like a terminal drawing lines. */
|
|
112
|
+
readonly technical: {
|
|
113
|
+
readonly transition: {
|
|
114
|
+
readonly effect: "wipe";
|
|
115
|
+
readonly from: "right";
|
|
116
|
+
readonly durationMs: 400;
|
|
117
|
+
};
|
|
118
|
+
readonly sectionTransition: {
|
|
119
|
+
readonly effect: "wipe";
|
|
120
|
+
readonly from: "right";
|
|
121
|
+
readonly durationMs: 700;
|
|
122
|
+
};
|
|
123
|
+
readonly entrance: {
|
|
124
|
+
readonly effect: "wipeIn";
|
|
125
|
+
readonly direction: "left";
|
|
126
|
+
readonly durationMs: 400;
|
|
127
|
+
};
|
|
128
|
+
readonly hero: {
|
|
129
|
+
readonly effect: "fadeIn";
|
|
130
|
+
readonly durationMs: 500;
|
|
131
|
+
};
|
|
132
|
+
}; /** Ink: long dissolves, nothing moves in space. */
|
|
133
|
+
readonly ink: {
|
|
134
|
+
readonly transition: {
|
|
135
|
+
readonly effect: "fade";
|
|
136
|
+
readonly durationMs: 1000;
|
|
137
|
+
};
|
|
138
|
+
readonly sectionTransition: {
|
|
139
|
+
readonly effect: "fade";
|
|
140
|
+
readonly durationMs: 1400;
|
|
141
|
+
};
|
|
142
|
+
readonly entrance: {
|
|
143
|
+
readonly effect: "fadeIn";
|
|
144
|
+
readonly durationMs: 900;
|
|
145
|
+
};
|
|
146
|
+
readonly hero: {
|
|
147
|
+
readonly effect: "fadeIn";
|
|
148
|
+
readonly durationMs: 1200;
|
|
149
|
+
};
|
|
150
|
+
}; /** Structural: slides push, blocks fly a short way in along the grid. */
|
|
151
|
+
readonly structural: {
|
|
152
|
+
readonly transition: {
|
|
153
|
+
readonly effect: "push";
|
|
154
|
+
readonly from: "right";
|
|
155
|
+
readonly durationMs: 500;
|
|
156
|
+
};
|
|
157
|
+
readonly sectionTransition: {
|
|
158
|
+
readonly effect: "split";
|
|
159
|
+
readonly orientation: "vert";
|
|
160
|
+
readonly inOut: "out";
|
|
161
|
+
readonly durationMs: 700;
|
|
162
|
+
};
|
|
163
|
+
readonly entrance: {
|
|
164
|
+
readonly effect: "flyIn";
|
|
165
|
+
readonly direction: "left";
|
|
166
|
+
readonly durationMs: 400;
|
|
167
|
+
};
|
|
168
|
+
readonly hero: {
|
|
169
|
+
readonly effect: "wipeIn";
|
|
170
|
+
readonly direction: "left";
|
|
171
|
+
readonly durationMs: 500;
|
|
172
|
+
};
|
|
173
|
+
}; /** Print: pages cover one another, blocks wipe down like set type. */
|
|
174
|
+
readonly print: {
|
|
175
|
+
readonly transition: {
|
|
176
|
+
readonly effect: "cover";
|
|
177
|
+
readonly from: "right";
|
|
178
|
+
readonly durationMs: 600;
|
|
179
|
+
};
|
|
180
|
+
readonly sectionTransition: {
|
|
181
|
+
readonly effect: "fade";
|
|
182
|
+
readonly durationMs: 900;
|
|
183
|
+
};
|
|
184
|
+
readonly entrance: {
|
|
185
|
+
readonly effect: "wipeIn";
|
|
186
|
+
readonly direction: "top";
|
|
187
|
+
readonly durationMs: 500;
|
|
188
|
+
};
|
|
189
|
+
readonly hero: {
|
|
190
|
+
readonly effect: "fadeIn";
|
|
191
|
+
readonly durationMs: 600;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
/** Name of a motion temperament. */
|
|
196
|
+
type PptxMotionName = keyof typeof pptxMotions;
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region src/commands/draw/palette/pages.d.ts
|
|
199
|
+
/** What the design command takes for one kind of page. */
|
|
200
|
+
interface PptxPageSurfaceInput {
|
|
201
|
+
/** Page background. */
|
|
202
|
+
readonly background: PptxDrawBackground;
|
|
203
|
+
/** Text role on it, or a colour that takes the nearest role; the one that reads best when left out. */
|
|
204
|
+
readonly text?: PptxDesignRole | `#${string}` | undefined;
|
|
205
|
+
}
|
|
206
|
+
//#endregion
|
|
207
|
+
//#region src/commands/draw/design.d.ts
|
|
208
|
+
/** What the design command takes: the decisions, with roles, fonts and sizes left out where the editor may derive them. */
|
|
209
|
+
interface PptxDeckDesignInput {
|
|
210
|
+
/** Direction name. */
|
|
211
|
+
readonly name: string;
|
|
212
|
+
/** Key of the style card the design follows; absent for a style of its own. */
|
|
213
|
+
readonly style?: string | undefined;
|
|
214
|
+
/** Key of a second style card blended in. */
|
|
215
|
+
readonly blend?: string | undefined;
|
|
216
|
+
/** Primary and page colours and any roles decided. */
|
|
217
|
+
readonly palette: PptxDesignPaletteInput;
|
|
218
|
+
/** What each kind of page sits on; the cover and content pages at least. */
|
|
219
|
+
readonly pages?: Partial<Record<PptxPageKind, PptxPageSurfaceInput>>;
|
|
220
|
+
/** Typefaces; a Latin family left out follows the Chinese one. */
|
|
221
|
+
readonly fonts: {
|
|
222
|
+
readonly heading: PptxDesignFontInput | string;
|
|
223
|
+
readonly body: PptxDesignFontInput | string;
|
|
224
|
+
};
|
|
225
|
+
/** Type sizes; any left out are derived from the slide width. */
|
|
226
|
+
readonly type?: Partial<PptxDesignTypeScale>;
|
|
227
|
+
/** Page margin in centimetres. */
|
|
228
|
+
readonly margin?: number;
|
|
229
|
+
/** Recurring visual element. */
|
|
230
|
+
readonly motif: string;
|
|
231
|
+
/** Use of pictures. */
|
|
232
|
+
readonly imagery?: string;
|
|
233
|
+
/** Rhythm across slide kinds. */
|
|
234
|
+
readonly rhythm?: string;
|
|
235
|
+
/** Way of moving; calm when left out. */
|
|
236
|
+
readonly motion?: PptxMotionName;
|
|
237
|
+
/** How components are drawn; the style card's skin for whatever is left out. */
|
|
238
|
+
readonly skin?: Partial<PptxComponentSkin>;
|
|
239
|
+
/** A style of the deck's own, when no style card fits; ignored when a style card is named. */
|
|
240
|
+
readonly custom?: PptxCustomStyle;
|
|
241
|
+
/** Page shape: landscape for screens, portrait for phones; the deck keeps its own when left out. */
|
|
242
|
+
readonly aspect?: "16:9" | "9:16";
|
|
243
|
+
}
|
|
244
|
+
declare module "../../command/types" {
|
|
245
|
+
interface PptxCommandRegistry {
|
|
246
|
+
/** Records the deck's design language and writes its colours and typefaces into the theme. */
|
|
247
|
+
setDeckDesign: (design: PptxDeckDesignInput) => PptxCommand;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* @param presentation - Deck.
|
|
252
|
+
* @returns Its design language, or null when none is recorded or the stored one does not parse.
|
|
253
|
+
*/
|
|
254
|
+
//#endregion
|
|
255
|
+
//#region src/commands/draw/directions.d.ts
|
|
256
|
+
/** One sample slide of a direction, drawn in its design language. */
|
|
257
|
+
interface PptxDirectionSample {
|
|
258
|
+
/** Kind of page, which brings its background and text colour. */
|
|
259
|
+
readonly page?: PptxPageKind | undefined;
|
|
260
|
+
/** Background overriding the page's. */
|
|
261
|
+
readonly background?: PptxDrawBackground | undefined;
|
|
262
|
+
/** Objects. */
|
|
263
|
+
readonly elements: readonly PptxDrawElement[];
|
|
264
|
+
}
|
|
265
|
+
/** A design direction offered for the deck: a design language and sample slides drawn in it with the deck's content. */
|
|
266
|
+
interface PptxDeckDirection {
|
|
267
|
+
/** Design language. */
|
|
268
|
+
readonly design: PptxDeckDesignInput;
|
|
269
|
+
/** Samples, usually the cover, a content slide and a data slide. */
|
|
270
|
+
readonly samples: readonly PptxDirectionSample[];
|
|
271
|
+
}
|
|
272
|
+
declare module "../../command/types" {
|
|
273
|
+
interface PptxCommandRegistry {
|
|
274
|
+
/** Offers design directions with sample slides for the user to choose from, or withdraws them with an empty list. */
|
|
275
|
+
setDeckDirections: (options: {
|
|
276
|
+
directions: readonly PptxDeckDirection[];
|
|
277
|
+
problem?: string;
|
|
278
|
+
}) => PptxCommand;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* @param presentation - Deck.
|
|
283
|
+
* @returns The directions offered and not yet chosen, or an empty list.
|
|
284
|
+
*/
|
|
285
|
+
//#endregion
|
|
286
|
+
//#region src/template/schema.d.ts
|
|
287
|
+
/** JSON Schema (draft 2020-12) of a presentation template manifest, for template libraries and authoring tools. */
|
|
288
|
+
declare const presentationTemplateSchema: {
|
|
289
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
290
|
+
readonly title: "QuireKit presentation template";
|
|
291
|
+
readonly type: "object";
|
|
292
|
+
readonly properties: {
|
|
293
|
+
readonly format: {
|
|
294
|
+
readonly const: "quirekit.presentation-template";
|
|
295
|
+
};
|
|
296
|
+
readonly formatVersion: {
|
|
297
|
+
readonly const: 1;
|
|
298
|
+
};
|
|
299
|
+
readonly id: {
|
|
300
|
+
readonly type: "string";
|
|
301
|
+
readonly minLength: 1;
|
|
302
|
+
};
|
|
303
|
+
readonly version: {
|
|
304
|
+
readonly type: "string";
|
|
305
|
+
readonly minLength: 1;
|
|
306
|
+
};
|
|
307
|
+
readonly name: {
|
|
308
|
+
readonly type: "string";
|
|
309
|
+
readonly minLength: 1;
|
|
310
|
+
};
|
|
311
|
+
readonly description: {
|
|
312
|
+
readonly type: "string";
|
|
313
|
+
};
|
|
314
|
+
readonly tags: {
|
|
315
|
+
readonly type: "array";
|
|
316
|
+
readonly items: {
|
|
317
|
+
readonly type: "string";
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
readonly notes: {
|
|
321
|
+
readonly type: "array";
|
|
322
|
+
readonly items: {
|
|
323
|
+
readonly type: "string";
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
readonly pages: {
|
|
327
|
+
readonly type: "array";
|
|
328
|
+
readonly minItems: 1;
|
|
329
|
+
readonly items: {
|
|
330
|
+
readonly type: "object";
|
|
331
|
+
readonly properties: {
|
|
332
|
+
readonly key: {
|
|
333
|
+
readonly type: "string";
|
|
334
|
+
readonly minLength: 1;
|
|
335
|
+
};
|
|
336
|
+
readonly kind: {
|
|
337
|
+
readonly enum: readonly ["cover", "agenda", "section", "content", "data", "quote", "closing"];
|
|
338
|
+
};
|
|
339
|
+
readonly name: {
|
|
340
|
+
readonly type: "string";
|
|
341
|
+
readonly minLength: 1;
|
|
342
|
+
};
|
|
343
|
+
readonly source: {
|
|
344
|
+
readonly oneOf: readonly [{
|
|
345
|
+
readonly type: "object";
|
|
346
|
+
readonly properties: {
|
|
347
|
+
readonly slide: {
|
|
348
|
+
readonly type: "integer";
|
|
349
|
+
readonly minimum: 1;
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
readonly required: readonly ["slide"];
|
|
353
|
+
}, {
|
|
354
|
+
readonly type: "object";
|
|
355
|
+
readonly properties: {
|
|
356
|
+
readonly layout: {
|
|
357
|
+
readonly type: "string";
|
|
358
|
+
readonly minLength: 1;
|
|
359
|
+
};
|
|
360
|
+
};
|
|
361
|
+
readonly required: readonly ["layout"];
|
|
362
|
+
}];
|
|
363
|
+
};
|
|
364
|
+
readonly slots: {
|
|
365
|
+
readonly type: "array";
|
|
366
|
+
readonly items: {
|
|
367
|
+
readonly type: "object";
|
|
368
|
+
readonly properties: {
|
|
369
|
+
readonly key: {
|
|
370
|
+
readonly type: "string";
|
|
371
|
+
readonly minLength: 1;
|
|
372
|
+
};
|
|
373
|
+
readonly role: {
|
|
374
|
+
readonly enum: readonly ["title", "subtitle", "text", "label", "picture"];
|
|
375
|
+
};
|
|
376
|
+
readonly shape: {
|
|
377
|
+
readonly type: "integer";
|
|
378
|
+
};
|
|
379
|
+
readonly placeholder: {
|
|
380
|
+
readonly type: "integer";
|
|
381
|
+
};
|
|
382
|
+
readonly sample: {
|
|
383
|
+
readonly type: "string";
|
|
384
|
+
};
|
|
385
|
+
readonly limit: {
|
|
386
|
+
readonly type: "integer";
|
|
387
|
+
readonly minimum: 1;
|
|
388
|
+
};
|
|
389
|
+
readonly fixed: {
|
|
390
|
+
readonly type: "boolean";
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
readonly required: readonly ["key", "role"];
|
|
394
|
+
};
|
|
395
|
+
};
|
|
396
|
+
readonly items: {
|
|
397
|
+
readonly type: "object";
|
|
398
|
+
readonly properties: {
|
|
399
|
+
readonly layout: {
|
|
400
|
+
readonly enum: readonly ["row", "column", "grid"];
|
|
401
|
+
};
|
|
402
|
+
readonly members: {
|
|
403
|
+
readonly type: "array";
|
|
404
|
+
readonly minItems: 1;
|
|
405
|
+
readonly items: {
|
|
406
|
+
readonly type: "object";
|
|
407
|
+
readonly properties: {
|
|
408
|
+
readonly shapes: {
|
|
409
|
+
readonly type: "array";
|
|
410
|
+
readonly items: {
|
|
411
|
+
readonly type: "integer";
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
readonly slots: {
|
|
415
|
+
readonly type: "array";
|
|
416
|
+
readonly items: {
|
|
417
|
+
readonly type: "object";
|
|
418
|
+
readonly properties: {
|
|
419
|
+
readonly key: {
|
|
420
|
+
readonly type: "string";
|
|
421
|
+
readonly minLength: 1;
|
|
422
|
+
};
|
|
423
|
+
readonly role: {
|
|
424
|
+
readonly enum: readonly ["title", "subtitle", "text", "label", "picture"];
|
|
425
|
+
};
|
|
426
|
+
readonly shape: {
|
|
427
|
+
readonly type: "integer";
|
|
428
|
+
};
|
|
429
|
+
readonly placeholder: {
|
|
430
|
+
readonly type: "integer";
|
|
431
|
+
};
|
|
432
|
+
readonly sample: {
|
|
433
|
+
readonly type: "string";
|
|
434
|
+
};
|
|
435
|
+
readonly limit: {
|
|
436
|
+
readonly type: "integer";
|
|
437
|
+
readonly minimum: 1;
|
|
438
|
+
};
|
|
439
|
+
readonly fixed: {
|
|
440
|
+
readonly type: "boolean";
|
|
441
|
+
};
|
|
442
|
+
};
|
|
443
|
+
readonly required: readonly ["key", "role"];
|
|
444
|
+
};
|
|
445
|
+
};
|
|
446
|
+
};
|
|
447
|
+
readonly required: readonly ["shapes", "slots"];
|
|
448
|
+
};
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
readonly required: readonly ["layout", "members"];
|
|
452
|
+
};
|
|
453
|
+
readonly area: {
|
|
454
|
+
readonly type: "object";
|
|
455
|
+
readonly properties: {
|
|
456
|
+
readonly x: {
|
|
457
|
+
readonly type: "number";
|
|
458
|
+
};
|
|
459
|
+
readonly y: {
|
|
460
|
+
readonly type: "number";
|
|
461
|
+
};
|
|
462
|
+
readonly w: {
|
|
463
|
+
readonly type: "number";
|
|
464
|
+
readonly exclusiveMinimum: 0;
|
|
465
|
+
};
|
|
466
|
+
readonly h: {
|
|
467
|
+
readonly type: "number";
|
|
468
|
+
readonly exclusiveMinimum: 0;
|
|
469
|
+
};
|
|
470
|
+
};
|
|
471
|
+
readonly required: readonly ["x", "y", "w", "h"];
|
|
472
|
+
};
|
|
473
|
+
readonly body: {
|
|
474
|
+
readonly type: "array";
|
|
475
|
+
readonly items: {
|
|
476
|
+
readonly type: "integer";
|
|
477
|
+
};
|
|
478
|
+
};
|
|
479
|
+
};
|
|
480
|
+
readonly required: readonly ["key", "kind", "name", "source", "slots"];
|
|
481
|
+
};
|
|
482
|
+
};
|
|
483
|
+
readonly design: {
|
|
484
|
+
readonly type: "object";
|
|
485
|
+
readonly properties: {
|
|
486
|
+
readonly palette: {
|
|
487
|
+
readonly type: "object";
|
|
488
|
+
readonly properties: {
|
|
489
|
+
[k: string]: {
|
|
490
|
+
readonly type: "string";
|
|
491
|
+
readonly pattern: "^#[0-9A-Fa-f]{6}$";
|
|
492
|
+
};
|
|
493
|
+
};
|
|
494
|
+
readonly required: readonly PptxDesignRole[];
|
|
495
|
+
};
|
|
496
|
+
readonly fonts: {
|
|
497
|
+
readonly type: "object";
|
|
498
|
+
readonly properties: {
|
|
499
|
+
readonly heading: {
|
|
500
|
+
readonly type: "object";
|
|
501
|
+
readonly properties: {
|
|
502
|
+
readonly chinese: {
|
|
503
|
+
readonly type: "string";
|
|
504
|
+
readonly minLength: 1;
|
|
505
|
+
};
|
|
506
|
+
readonly latin: {
|
|
507
|
+
readonly type: "string";
|
|
508
|
+
readonly minLength: 1;
|
|
509
|
+
};
|
|
510
|
+
};
|
|
511
|
+
readonly required: readonly ["chinese", "latin"];
|
|
512
|
+
};
|
|
513
|
+
readonly body: {
|
|
514
|
+
readonly type: "object";
|
|
515
|
+
readonly properties: {
|
|
516
|
+
readonly chinese: {
|
|
517
|
+
readonly type: "string";
|
|
518
|
+
readonly minLength: 1;
|
|
519
|
+
};
|
|
520
|
+
readonly latin: {
|
|
521
|
+
readonly type: "string";
|
|
522
|
+
readonly minLength: 1;
|
|
523
|
+
};
|
|
524
|
+
};
|
|
525
|
+
readonly required: readonly ["chinese", "latin"];
|
|
526
|
+
};
|
|
527
|
+
};
|
|
528
|
+
readonly required: readonly ["heading", "body"];
|
|
529
|
+
};
|
|
530
|
+
readonly type: {
|
|
531
|
+
readonly type: "object";
|
|
532
|
+
readonly properties: {
|
|
533
|
+
readonly display: {
|
|
534
|
+
readonly type: "number";
|
|
535
|
+
readonly exclusiveMinimum: 0;
|
|
536
|
+
};
|
|
537
|
+
readonly title: {
|
|
538
|
+
readonly type: "number";
|
|
539
|
+
readonly exclusiveMinimum: 0;
|
|
540
|
+
};
|
|
541
|
+
readonly subtitle: {
|
|
542
|
+
readonly type: "number";
|
|
543
|
+
readonly exclusiveMinimum: 0;
|
|
544
|
+
};
|
|
545
|
+
readonly body: {
|
|
546
|
+
readonly type: "number";
|
|
547
|
+
readonly exclusiveMinimum: 0;
|
|
548
|
+
};
|
|
549
|
+
readonly small: {
|
|
550
|
+
readonly type: "number";
|
|
551
|
+
readonly exclusiveMinimum: 0;
|
|
552
|
+
};
|
|
553
|
+
};
|
|
554
|
+
readonly required: readonly ["display", "title", "subtitle", "body", "small"];
|
|
555
|
+
};
|
|
556
|
+
readonly margin: {
|
|
557
|
+
readonly type: "number";
|
|
558
|
+
readonly minimum: 0;
|
|
559
|
+
};
|
|
560
|
+
};
|
|
561
|
+
readonly required: readonly ["palette", "fonts", "type", "margin"];
|
|
562
|
+
};
|
|
563
|
+
};
|
|
564
|
+
readonly required: readonly ["format", "formatVersion", "id", "version", "name", "pages"];
|
|
565
|
+
};
|
|
566
|
+
/**
|
|
567
|
+
* Checks a manifest against the standard.
|
|
568
|
+
* @param value - Parsed JSON.
|
|
569
|
+
* @returns The manifest, or what is wrong with it.
|
|
570
|
+
*/
|
|
571
|
+
declare function readPresentationTemplate(value: unknown): PptxTemplateManifest | {
|
|
572
|
+
readonly problem: string;
|
|
573
|
+
};
|
|
574
|
+
//#endregion
|
|
575
|
+
export { type PptxTemplateDesign, type PptxTemplateEntry, type PptxTemplateFile, type PptxTemplateFrame, type PptxTemplateItem, type PptxTemplateItems, type PptxTemplateManifest, type PptxTemplatePage, type PptxTemplatePageKind, type PptxTemplateSlot, type PptxTemplateSlotRole, type PptxTemplateSource, describeTemplate, presentationTemplateFormat, presentationTemplateSchema, readPresentationTemplate };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as e,i as a,r as t,t as r}from"./open-aKqKXJ6B.mjs";export{r as describeTemplate,e as presentationTemplateFormat,t as presentationTemplateSchema,a as readPresentationTemplate};
|