@openpresentation/opf 0.17.0 → 0.18.3
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 +4 -4
- package/dist/browser.js +38 -0
- package/dist/{catalog-refs-C4K4y-vh.d.ts → catalog-refs-BSfGELpt.d.ts} +1 -1
- package/dist/{catalog-schemas-g7RFQBdc.d.ts → catalog-schemas-CinPh5WA.d.ts} +1 -1
- package/dist/catalog.d.ts +2 -2
- package/dist/{chart-data-DTxdRRT1.d.ts → chart-data-BnNqgnC-.d.ts} +1 -1
- package/dist/{chunk-RA64UQKI.js → chunk-2PEWUUBR.js} +97 -73
- package/dist/{chunk-TCD2FB2K.js → chunk-ECP7QPGK.js} +5 -5
- package/dist/{chunk-O2CX5NEH.js → chunk-FO3WGS4R.js} +6 -5
- package/dist/{chunk-N4EVOFEA.js → chunk-GVOLSWAJ.js} +4 -4
- package/dist/{chunk-WWYWFVOI.js → chunk-IM337HP5.js} +151 -25
- package/dist/{chunk-YT7FMQER.js → chunk-JCOSZTOI.js} +1 -1
- package/dist/{chunk-IPW5BS3X.js → chunk-K5EG3UMS.js} +190 -172
- package/dist/{chunk-NLNYNBTS.js → chunk-KA3ZPFVT.js} +84 -26
- package/dist/{chunk-M4UR3NPN.js → chunk-L5YACLWK.js} +2 -2
- package/dist/{chunk-CW7GEAV3.js → chunk-MBU42S5Y.js} +291 -133
- package/dist/{chunk-BIC3SWPK.js → chunk-MSFE2HUK.js} +30 -5
- package/dist/{chunk-ESRYBYLY.js → chunk-PNINP5IF.js} +1 -1
- package/dist/{chunk-IS5H5JKH.js → chunk-R7KIASS4.js} +1 -1
- package/dist/{chunk-PPROJP2E.js → chunk-TRELE6I6.js} +1 -1
- package/dist/{chunk-O3CVNJTL.js → chunk-WHHLGDCQ.js} +1 -1
- package/dist/{chunk-O263APNI.js → chunk-ZCFSDSUX.js} +3 -3
- package/dist/{composition-BbZ_9C-c.d.ts → composition-C-OoqvAr.d.ts} +80 -40
- package/dist/composition.d.ts +3 -3
- package/dist/composition.js +1 -1
- package/dist/conversion-4CLOEG6O.js +21 -0
- package/dist/{conversion-SBpTOwdg.d.ts → conversion-BxZbBd_0.d.ts} +96 -38
- package/dist/convert.d.ts +4 -4
- package/dist/convert.js +7 -7
- package/dist/data.d.ts +7 -7
- package/dist/data.js +2 -2
- package/dist/{deck-report-Bx3naFlF.d.ts → deck-report-DiDf_Vew.d.ts} +5 -5
- package/dist/deck.d.ts +8 -8
- package/dist/deck.js +10 -10
- package/dist/diff.d.ts +1 -1
- package/dist/diff.js +5 -5
- package/dist/docs.js +35 -29
- package/dist/examples.d.ts +1 -1
- package/dist/examples.js +181 -214
- package/dist/{finding-CDQ_wH8j.d.ts → finding-CT_f_vbD.d.ts} +1 -1
- package/dist/format.js +2 -2
- package/dist/index.d.ts +153 -20
- package/dist/index.js +62 -15
- package/dist/markdown.d.ts +12 -8
- package/dist/markdown.js +7 -7
- package/dist/node-engine.d.ts +37 -17
- package/dist/node-engine.js +39 -16
- package/dist/{pagination-BhX4M48Y.d.ts → pagination-BaUjDrTz.d.ts} +7 -4
- package/dist/pagination.d.ts +4 -4
- package/dist/pagination.js +4 -4
- package/dist/patch.d.ts +1 -1
- package/dist/patch.js +4 -4
- package/dist/{presentation-fb8CZmRq.d.ts → presentation-81rNihF0.d.ts} +271 -384
- package/dist/repo-readme.js +1 -1
- package/dist/schemas.d.ts +4 -2
- package/dist/schemas.js +1 -1
- package/dist/spec/README.md +1 -1
- package/dist/spec/schemas/opf.schema.json +67 -72
- package/dist/types.d.ts +3 -3
- package/dist/{validation-types-iZbXfES6.d.ts → validation-types-PbGDrNUr.d.ts} +12 -7
- package/dist/validator.d.ts +8 -8
- package/dist/validator.js +3 -3
- package/dist/yaml.d.ts +6 -6
- package/dist/yaml.js +7 -7
- package/package.json +14 -12
- package/dist/node.d.ts +0 -60
- package/dist/node.js +0 -54
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { P as Presentation } from './presentation-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { D as DeckFormat } from './deck-report-DiDf_Vew.js';
|
|
2
|
+
import { a as Finding, c as FindingSeverity } from './finding-CT_f_vbD.js';
|
|
3
|
+
import { P as Presentation } from './presentation-81rNihF0.js';
|
|
4
|
+
import { V as ValidationReport, f as ValidationChecks, a as ValidateOptions } from './validation-types-PbGDrNUr.js';
|
|
5
|
+
import { a as Catalog } from './catalog-refs-BSfGELpt.js';
|
|
6
6
|
|
|
7
|
-
/** The base class: thrown for the request and the files (`invalid-option`, `input-not-found`, `input-unreadable`, `invalid-presentation`, `output-exists`, `output-not-file`, `output-unwritable`). */
|
|
7
|
+
/** The base class: thrown for the request and the files (`node-only` in the browser build, `invalid-option`, `input-not-found`, `input-unreadable`, `invalid-presentation`, `output-exists`, `output-not-file`, `output-unwritable`). */
|
|
8
8
|
declare class OPFApiError extends Error {
|
|
9
9
|
readonly code: string;
|
|
10
10
|
readonly details: Record<string, unknown>;
|
|
@@ -28,12 +28,23 @@ declare function asApiError<T extends OPFApiError>(Class: new (message: string,
|
|
|
28
28
|
cause?: unknown;
|
|
29
29
|
}) => T, error: unknown, fallbackCode: string): T;
|
|
30
30
|
|
|
31
|
+
/** A slide selection: one slide number, a list of them, or text such as `"1,3-5"`, `"2-"` (to the end) or `"-3"` (from the start). Slides count from 1. */
|
|
32
|
+
type SlideSelection = number | string | readonly number[];
|
|
33
|
+
/**
|
|
34
|
+
* The slide numbers a selection names in a presentation of `total` slides: one-based, ascending, without repeats. A number or a
|
|
35
|
+
* list of numbers names those slides; text names slides and ranges, separated by commas: `"1,3-5"`, `"2-"` (from 2 to the end)
|
|
36
|
+
* and `"-3"` (from the start to 3). Throws `OPFApiError` `no-slides` when `total` is 0, and `invalid-option` for a malformed
|
|
37
|
+
* selection, a number that is not a whole number from 1, a reversed range or a slide past the end. `label` names the option in
|
|
38
|
+
* the message (`"slides"`; the opf CLI passes `"--slides"`).
|
|
39
|
+
*/
|
|
40
|
+
declare function parseSlideSelection(selection: SlideSelection, total: number, label?: string): number[];
|
|
41
|
+
|
|
31
42
|
declare const RENDER_PACKAGE = "@openpresentation/opf-render";
|
|
32
43
|
declare const PPTX_PACKAGE = "@openpresentation/opf-pptx";
|
|
33
44
|
/** Peer ranges. The CLI checks the features it calls rather than the version, so a newer release in range keeps working. */
|
|
34
45
|
declare const PEER_RANGES: {
|
|
35
|
-
readonly "@openpresentation/opf-render": "^0.
|
|
36
|
-
readonly "@openpresentation/opf-pptx": "^0.
|
|
46
|
+
readonly "@openpresentation/opf-render": "^0.18.0";
|
|
47
|
+
readonly "@openpresentation/opf-pptx": "^0.18.0";
|
|
37
48
|
};
|
|
38
49
|
interface Diagnostic {
|
|
39
50
|
code: string;
|
|
@@ -80,10 +91,14 @@ interface FontsHandle extends RenderFonts {
|
|
|
80
91
|
substitute: boolean;
|
|
81
92
|
}[];
|
|
82
93
|
}
|
|
94
|
+
/** The engines of opf-render 0.18 (RR-73). Slides count from 1; a number gives one SVG, a selection a list. */
|
|
83
95
|
interface RenderModule {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
96
|
+
/** One slide of the deck as SVG; slides count from 1. */
|
|
97
|
+
toSvg(presentation: unknown, slide: number, options?: Record<string, unknown>): string;
|
|
98
|
+
/** One SVG slide as PNG. */
|
|
99
|
+
toPng(svg: string, options?: Record<string, unknown>): Promise<Uint8Array>;
|
|
100
|
+
/** SVG slides as one PDF, a page each. */
|
|
101
|
+
toPdf(svgs: string[], options?: Record<string, unknown>): Promise<Uint8Array>;
|
|
87
102
|
}
|
|
88
103
|
interface FontsNodeModule {
|
|
89
104
|
loadFonts(options?: Record<string, unknown>): Promise<FontsHandle>;
|
|
@@ -98,6 +113,28 @@ interface Peer<T> {
|
|
|
98
113
|
version: string;
|
|
99
114
|
name: string;
|
|
100
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* What the renderer needs besides itself (RR-63): its converters and every font package are optional peers of opf-render, so a host
|
|
118
|
+
* installs only the ones its outputs use. The versions are the ones the renderer is tested with (its `peerDependencies`).
|
|
119
|
+
*/
|
|
120
|
+
declare const RENDER_EXTRAS: {
|
|
121
|
+
/** The faces of the office pack, which the CLI and `convert` always load (every format). */
|
|
122
|
+
readonly fonts: readonly ["@expo-google-fonts/roboto@0.4.3", "@expo-google-fonts/roboto-mono@0.4.2", "@expo-google-fonts/caladea@0.4.2", "@expo-google-fonts/arimo@0.4.3", "@expo-google-fonts/tinos@0.4.2", "@expo-google-fonts/cousine@0.4.3", "@expo-google-fonts/gelasio@0.4.1", "@expo-google-fonts/noto-sans@0.4.2"];
|
|
123
|
+
/** PNG output (and raster fallbacks): the SVG rasterizer, and sharp for WebP and rotated JPEG pictures. */
|
|
124
|
+
readonly png: readonly ["@resvg/resvg-js@^2.6.2", "sharp@^0.35.5"];
|
|
125
|
+
/** PDF: vector mode (the default) needs nothing for text; raster mode needs pdf-lib; pictures in a vector PDF need sharp. */
|
|
126
|
+
readonly pdfRaster: readonly ["pdf-lib@^1.17.1"];
|
|
127
|
+
readonly pdfPictures: readonly ["sharp@^0.35.5"];
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* A package as the engine would find it (RR-75, `opf doctor`): its manifest resolved from core's location, then the working
|
|
131
|
+
* directory, then `from` (a file inside another package, for the optional peers opf-render loads itself). Undefined when it is
|
|
132
|
+
* not installed. Nothing is loaded.
|
|
133
|
+
*/
|
|
134
|
+
declare function locatePackage(name: string, from?: string): {
|
|
135
|
+
manifest: string;
|
|
136
|
+
version: string;
|
|
137
|
+
} | undefined;
|
|
101
138
|
/**
|
|
102
139
|
* The missing-peer error for a renderer failure that says a package it loads lazily is absent (RR-63): `converter-missing` (pdf-lib,
|
|
103
140
|
* @resvg/resvg-js, sharp) or `font-resource-unavailable` naming font packages. The renderer's message, with its install command, is kept;
|
|
@@ -150,44 +187,51 @@ declare function finishReport(base: Pick<ValidationReport, "valid" | "schemaVali
|
|
|
150
187
|
|
|
151
188
|
type ExportFormat = "svg" | "png" | "pdf" | "pptx";
|
|
152
189
|
declare const EXPORT_FORMATS: readonly ExportFormat[];
|
|
190
|
+
/** How an SVG carries its text (RR-74): the faces the slide uses embedded (`fonts`, the default), none (`system`) or glyph outlines (`paths`). */
|
|
191
|
+
type ExportText = "fonts" | "system" | "paths";
|
|
192
|
+
declare const EXPORT_TEXT: readonly ExportText[];
|
|
153
193
|
interface ExportOptions {
|
|
154
194
|
/** What to write. `svg` and `png` give one file per slide (or one zip), `pdf` and `pptx` one file. */
|
|
155
195
|
format: ExportFormat;
|
|
156
|
-
/**
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
196
|
+
/**
|
|
197
|
+
* The fonts: a prepared handle (`loadFonts()` of `@openpresentation/opf-render/fonts-node`), reused across calls, or a folder or
|
|
198
|
+
* folders of `.ttf` and `.otf` files to load before the bundled pack (not recursive). Omitted: the bundled open font pack.
|
|
199
|
+
*/
|
|
200
|
+
fonts?: FontsHandle | string | readonly string[];
|
|
160
201
|
/** The catalogs the presentation's references resolve in. Omitted: core's default catalog. */
|
|
161
202
|
catalogs?: readonly Catalog[];
|
|
162
|
-
/** The slides to write, one-based: numbers or a selection such as `"1,3-5"
|
|
163
|
-
slides?:
|
|
203
|
+
/** The slides to write, one-based: a number, numbers or a selection such as `"1,3-5"` (`parseSlideSelection`). Omitted: every slide that is not hidden. Not for `pptx`. */
|
|
204
|
+
slides?: SlideSelection;
|
|
164
205
|
/** Write hidden slides too (`svg`, `png`, `pdf`). */
|
|
165
206
|
includeHidden?: boolean;
|
|
166
207
|
/** Split overflowing slides with the same fonts before drawing, as `opf paginate` does. */
|
|
167
208
|
paginate?: boolean;
|
|
168
209
|
/** Pixel scale of `png` and of a raster `pdf` (0.1 to 8; 1 draws the 1280 x 720 reference slide at 1280 x 720 pixels). */
|
|
169
210
|
scale?: number;
|
|
170
|
-
/** `pdf`: `
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
211
|
+
/** `pdf`: draw each slide as a picture (`true`) instead of selectable vector text (the default). */
|
|
212
|
+
raster?: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* `svg`: how the text is carried. `fonts` (the default) embeds the faces the slide's text uses; `system` embeds none, for a page that
|
|
215
|
+
* already has the fonts; `paths` draws the text as glyph outlines, so the file needs no font.
|
|
216
|
+
*/
|
|
217
|
+
text?: ExportText;
|
|
218
|
+
/** `pptx`: native charts (`native`), pictures (`picture`) or opf-pptx's choice (`auto`, the default). */
|
|
219
|
+
charts?: "auto" | "native" | "picture";
|
|
176
220
|
/** `pptx`: what the file records about where media came from. */
|
|
177
221
|
provenance?: "full" | "references-only" | "none";
|
|
178
222
|
/** `pptx`: keep images as they are (`preserve`) or convert them for older PowerPoint (`compatible`). */
|
|
179
|
-
|
|
223
|
+
images?: "compatible" | "preserve";
|
|
180
224
|
/** `YYYY-MM-DD`, for date fields that show today's date. Nothing reads a clock: without it such a field reports `date-needs-value`. */
|
|
181
225
|
date?: string;
|
|
182
226
|
/** The directory a presentation's relative image paths resolve against. Omitted: no local file is read (data URIs and remote references work as the engines handle them). */
|
|
183
227
|
assetDir?: string;
|
|
184
228
|
/** `svg` and `png`: one zip of the slides instead of one file per slide. */
|
|
185
229
|
zip?: boolean;
|
|
186
|
-
/** The
|
|
187
|
-
|
|
230
|
+
/** The base name of the files (`name-001.png` for slide 1, `name.pdf`). Omitted: the presentation's `filename`, else its slugified `name`, else `deck`. */
|
|
231
|
+
name?: string;
|
|
188
232
|
}
|
|
189
233
|
interface ExportFile {
|
|
190
|
-
/** The file name: the presentation's `filename`, else its slugified `name`, else
|
|
234
|
+
/** The file name: `options.name`, else the presentation's `filename`, else its slugified `name`, else `deck`, then `-001.png` for slide 1 and so on. */
|
|
191
235
|
name: string;
|
|
192
236
|
/** The media type. */
|
|
193
237
|
type: string;
|
|
@@ -207,7 +251,7 @@ interface ExportFile {
|
|
|
207
251
|
interface ExportFontSummary {
|
|
208
252
|
pack: "office";
|
|
209
253
|
substitutionPolicy: "visual";
|
|
210
|
-
/** The `
|
|
254
|
+
/** The `fonts` folder files, in load order. */
|
|
211
255
|
userFonts: string[];
|
|
212
256
|
substitutions: {
|
|
213
257
|
requested: string;
|
|
@@ -237,24 +281,36 @@ interface ExportContext {
|
|
|
237
281
|
reporter: Reporter;
|
|
238
282
|
renderer?: Renderer;
|
|
239
283
|
pptx?: Peer<PptxModule>;
|
|
240
|
-
/** Absolute font file paths already listed from `
|
|
284
|
+
/** Absolute font file paths already listed from the `fonts` folders. */
|
|
241
285
|
userFonts?: string[];
|
|
242
|
-
/** Name options as the command line does (`--slides`, `--
|
|
286
|
+
/** Name options as the command line does (`--slides`, `--fonts`, `--asset-dir`) in the messages of errors the engine throws. */
|
|
243
287
|
flags?: boolean;
|
|
244
288
|
}
|
|
245
289
|
/** `YYYY-MM-DD` and a real calendar date, or undefined. `label` names the option in the message (`--date` for the command, `date` for the function). */
|
|
246
290
|
declare function checkDate(value: unknown, label?: string): string | undefined;
|
|
247
291
|
/** A scale from 0.1 to 8, 1 when absent. */
|
|
248
292
|
declare function checkScale(value: unknown, label?: string): number;
|
|
293
|
+
/** Throws `invalid-option` when `options` uses a name 0.18 renamed. */
|
|
294
|
+
declare function checkRenamedOptions(options: object): void;
|
|
295
|
+
/** The options of a call as the engine reads them: checked, with defaults, and `fonts` split into the handle or the folders. */
|
|
296
|
+
interface ResolvedExportOptions extends Omit<ExportOptions, "fonts" | "text" | "scale"> {
|
|
297
|
+
format: ExportFormat;
|
|
298
|
+
text: ExportText;
|
|
299
|
+
scale: number;
|
|
300
|
+
/** `fonts`, when it is a prepared handle. */
|
|
301
|
+
fonts?: FontsHandle;
|
|
302
|
+
/** `fonts`, when it names folders. */
|
|
303
|
+
fontFolders: string[];
|
|
304
|
+
}
|
|
249
305
|
/** The options of a call, checked against each other. Throws `invalid-option` (an OPFApiError) for a value out of range or an option that does not apply to the format. */
|
|
250
|
-
declare function resolveExportOptions(options: ExportOptions):
|
|
306
|
+
declare function resolveExportOptions(options: ExportOptions): ResolvedExportOptions;
|
|
251
307
|
/**
|
|
252
308
|
* Draw a presentation that has already passed the format and references check (`ctx.reporter` holds that check's findings).
|
|
253
309
|
* Diagnostics from fonts, layout, the SVG, PDF and PPTX writers are added to `ctx.reporter`. Throws an `OPFApiError` for an
|
|
254
310
|
* option, a missing or old peer, a font directory or a selection that names no slide; a failure while drawing is returned in
|
|
255
311
|
* `failure` after the reporter has the error finding.
|
|
256
312
|
*/
|
|
257
|
-
declare function runExport(presentation: unknown, options:
|
|
313
|
+
declare function runExport(presentation: unknown, options: ResolvedExportOptions, ctx: ExportContext): Promise<ExportRun>;
|
|
258
314
|
declare const VERSIONS: (renderer: Renderer, pptx?: Peer<PptxModule>) => {
|
|
259
315
|
pptx?: {
|
|
260
316
|
package: string;
|
|
@@ -318,11 +374,11 @@ interface ImportResult {
|
|
|
318
374
|
}
|
|
319
375
|
/** An export whose options are checked and whose engines and font files are loaded, before any document is read. */
|
|
320
376
|
interface PreparedExport {
|
|
321
|
-
options:
|
|
377
|
+
options: ResolvedExportOptions;
|
|
322
378
|
renderer: Renderer;
|
|
323
379
|
pptx?: Peer<PptxModule>;
|
|
324
380
|
userFonts: string[];
|
|
325
|
-
/** Name options as the command's flags (`--slides`, `--
|
|
381
|
+
/** Name options as the command's flags (`--slides`, `--fonts`, `--asset-dir`) in messages. */
|
|
326
382
|
flags: boolean;
|
|
327
383
|
}
|
|
328
384
|
/** Check the options, then load the engines and list the font directories, so a missing install is reported before the document is looked at. */
|
|
@@ -342,15 +398,17 @@ declare function importPresentation(bytes: Uint8Array, options: ImportOptions, l
|
|
|
342
398
|
type ConvertFormat = ExportFormat | DeckFormat;
|
|
343
399
|
/** What `convert` reads: a file path (`.pptx`, `.opf.md`, `.yaml`/`.yml`, `.json`), a deck, or the bytes of a `.pptx` file. */
|
|
344
400
|
type ConvertInput = string | Presentation | Uint8Array | ArrayBuffer;
|
|
345
|
-
interface ConvertOptions extends Omit<ExportOptions, "format"
|
|
401
|
+
interface ConvertOptions extends Omit<ExportOptions, "format"> {
|
|
346
402
|
/**
|
|
347
403
|
* What to make. With an output path the path's extension names it, and `format` is needed only for a `.zip` (the slides in
|
|
348
404
|
* it: `png`, the default, or `svg`); a `format` that disagrees with the extension is refused. Without an output path it is
|
|
349
405
|
* required: `pdf`, `pptx`, `png`, `svg`, `json`, `yaml` or `markdown`.
|
|
350
406
|
*/
|
|
351
407
|
format?: ConvertFormat;
|
|
352
|
-
/**
|
|
408
|
+
/** Without an output path: one archive of the slides (`png`, `svg`) instead of one file per slide. With an output path, a `.zip` path makes the archive and this option is refused. */
|
|
353
409
|
zip?: boolean;
|
|
410
|
+
/** Without an output path: the base name of the returned files (`name-001.png`, `name.pdf`). Omitted: the deck's `filename`, else its `name`, else the input file's stem. With an output path, the path names the file and this option is refused. */
|
|
411
|
+
name?: string;
|
|
354
412
|
/** A `.pptx` input: also return the raw per-shape layout and style signals of the file (`signals` in the result). */
|
|
355
413
|
signals?: boolean;
|
|
356
414
|
/**
|
|
@@ -424,7 +482,7 @@ interface ConversionPlan {
|
|
|
424
482
|
}
|
|
425
483
|
/** The deck form a file name stands for (core's `deckFormatOf`: `.opf.md`, `.yaml`, `.yml`), or JSON for `.json`; undefined for any other name. A plain `.md` file is not a deck. */
|
|
426
484
|
declare function deckFileFormat(file: string): DeckFormat | undefined;
|
|
427
|
-
/** The export format a file name stands for (`.pdf`, `.pptx`, `.png`, `.svg`, any case), else undefined. `opf
|
|
485
|
+
/** The export format a file name stands for (`.pdf`, `.pptx`, `.png`, `.svg`, any case), else undefined. `opf convert` reads its output name with this rule. */
|
|
428
486
|
declare function exportFormatOf(file: string): ExportFormat | undefined;
|
|
429
487
|
/** Read an input file: `input-not-found` when there is none, `input-unreadable` for any other failure. */
|
|
430
488
|
declare function readInput(file: string): Promise<Uint8Array>;
|
|
@@ -441,4 +499,4 @@ declare function planConversion(input: ConvertInput, output: string | undefined,
|
|
|
441
499
|
*/
|
|
442
500
|
declare function writePlanned(files: readonly ConvertedFile[], overwrite: boolean, flags?: boolean): Promise<void>;
|
|
443
501
|
|
|
444
|
-
export { runExport as $,
|
|
502
|
+
export { runExport as $, checkRenamedOptions as A, checkScale as B, type ConversionPlan as C, type Diagnostic as D, type EmbeddedFace as E, type FontsHandle as F, deckFileFormat as G, exportFormatOf as H, type ImportOptions as I, finishReport as J, importPresentation as K, loadPptx as L, loadRenderer as M, locatePackage as N, OPFApiError as O, type Peer as P, missingPeerFrom as Q, type Renderer as R, type SlideSelection as S, parseSlideSelection as T, planConversion as U, VERSIONS as V, prepareExport as W, reaches as X, readInput as Y, reportThrown as Z, resolveExportOptions as _, Reporter as a, runPreparedExport as a0, writePlanned as a1, type ConvertInput as a2, type ConvertOptions as a3, type ConvertResult as a4, type ConvertFormat as a5, type OpenOptions as a6, type SaveOptions as a7, type SaveResult as a8, type ConvertedFile as a9, type PptxModule as b, EXPORT_FORMATS as c, EXPORT_TEXT as d, type ExportContext as e, type ExportFile as f, type ExportFontSummary as g, type ExportFormat as h, type ExportOptions as i, type ExportResult as j, type ExportRun as k, type ExportText as l, type ImportResult as m, OPFExportError as n, OPFImportError as o, PEER_RANGES as p, PPTX_PACKAGE as q, type PreparedExport as r, RENDER_EXTRAS as s, RENDER_PACKAGE as t, type ReportFinding as u, type ResolvedExportOptions as v, type Source as w, asApiError as x, checkDate as y, checkOptions as z };
|
package/dist/convert.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './composition-
|
|
3
|
-
import './catalog-refs-
|
|
4
|
-
import './chart-data-
|
|
1
|
+
import { a as PaginatedPage, b as PresentationPaginationOptions } from './pagination-BaUjDrTz.js';
|
|
2
|
+
import './composition-C-OoqvAr.js';
|
|
3
|
+
import './catalog-refs-BSfGELpt.js';
|
|
4
|
+
import './chart-data-BnNqgnC-.js';
|
|
5
5
|
|
|
6
6
|
type Json = any;
|
|
7
7
|
type Obj = Record<string, any>;
|
package/dist/convert.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { paginate, OPFPaginationError } from './chunk-
|
|
2
|
-
import { parseQuoteLines, parseCodeFence, splitWhen, parseListLine, levelsFromIndents, fenceCode } from './chunk-
|
|
3
|
-
import { CONTENT_KEYS, isRecord, contentKeysOf, refuse, clone, Loss, isSlideLike, assertValidOwner, report, OPFConversionError, plainOf, assertValidOutput, same, splitRuns, runsOf, lineIsPlain, linePlain, concatText, lineValue, joinLines, hasFormatting } from './chunk-
|
|
4
|
-
export { OPFConversionError } from './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import { promotedRegionKeys, isDatasetRef, inlineTableData, visitContentPayloads, chartNumber } from './chunk-
|
|
1
|
+
import { paginate, OPFPaginationError } from './chunk-FO3WGS4R.js';
|
|
2
|
+
import { parseQuoteLines, parseCodeFence, splitWhen, parseListLine, levelsFromIndents, fenceCode } from './chunk-PNINP5IF.js';
|
|
3
|
+
import { CONTENT_KEYS, isRecord, contentKeysOf, refuse, clone, Loss, isSlideLike, assertValidOwner, report, OPFConversionError, plainOf, assertValidOutput, same, splitRuns, runsOf, lineIsPlain, linePlain, concatText, lineValue, joinLines, hasFormatting } from './chunk-TRELE6I6.js';
|
|
4
|
+
export { OPFConversionError } from './chunk-TRELE6I6.js';
|
|
5
|
+
import './chunk-KA3ZPFVT.js';
|
|
6
|
+
import { promotedRegionKeys, isDatasetRef, inlineTableData, visitContentPayloads, chartNumber } from './chunk-MBU42S5Y.js';
|
|
7
7
|
import './chunk-TRDXRRQK.js';
|
|
8
8
|
import './chunk-SPFV27O5.js';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-2PEWUUBR.js';
|
|
10
10
|
|
|
11
11
|
// src/convert/tables.ts
|
|
12
12
|
function cellOf(raw) {
|
package/dist/data.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as Chart } from './presentation-
|
|
2
|
-
export {
|
|
1
|
+
import { C as Chart } from './presentation-81rNihF0.js';
|
|
2
|
+
export { C as ChartMapping, a as ChartNumberFix, b as ChartNumberFixOperation, c as ChartNumberFixOptions, D as DataCellValue, d as DataColumn, e as DataDiagnostic, f as DataDiagnosticCode, g as DataResolveOptions, h as DataSourceRef, i as DataStyledCell, j as DataTableCell, k as DataTableHeader, l as DataTableValue, m as DataTextRun, n as Dataset, o as DatasetRef, R as ResolvedChartData, p as ResolvedTableData, q as chartNumber, r as datasetDiagnostics, s as formatDataNumber, t as fromExcelNumberFormat, u as inlineChartData, v as inlineDatasets, w as inlineTableData, x as isDatasetRef, y as isXYChartType, z as numberFormatError, A as resolveChartData, B as resolveTableData, E as suggestChartNumberFix, F as tableCellDisplayValue, G as toExcelNumberFormat, H as unusedDatasets } from './chart-data-BnNqgnC-.js';
|
|
3
3
|
|
|
4
4
|
type DataCell = string | number | boolean | null;
|
|
5
5
|
interface TabularData {
|
|
@@ -28,7 +28,7 @@ interface DataImportOptions {
|
|
|
28
28
|
header?: boolean;
|
|
29
29
|
columns?: string[];
|
|
30
30
|
}
|
|
31
|
-
interface
|
|
31
|
+
interface IngestOptions extends DataImportOptions {
|
|
32
32
|
as: 'table' | 'chart';
|
|
33
33
|
/** Default `column`. Values outside `CHART_TYPES` make an invalid chart; the CLI checks `--chart-type` first. */
|
|
34
34
|
chartType?: ImportedChartType;
|
|
@@ -39,12 +39,12 @@ declare class OPFDataImportError extends Error {
|
|
|
39
39
|
constructor(message: string);
|
|
40
40
|
}
|
|
41
41
|
declare function parseTabularData(input: unknown, options?: DataImportOptions): TabularData;
|
|
42
|
-
declare function
|
|
42
|
+
declare function ingest(input: unknown, options: IngestOptions & {
|
|
43
43
|
as: 'table';
|
|
44
44
|
}): ImportedTable;
|
|
45
|
-
declare function
|
|
45
|
+
declare function ingest(input: unknown, options: IngestOptions & {
|
|
46
46
|
as: 'chart';
|
|
47
47
|
}): ImportedChart;
|
|
48
|
-
declare function
|
|
48
|
+
declare function ingest(input: unknown, options: IngestOptions): ImportedTable | ImportedChart;
|
|
49
49
|
|
|
50
|
-
export { type DataCell, type DataImportOptions, type
|
|
50
|
+
export { type DataCell, type DataImportOptions, type ImportedChart, type ImportedChartData, type ImportedChartType, type ImportedTable, type IngestOptions, OPFDataImportError, type TabularData, ingest, parseTabularData };
|
package/dist/data.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { OPFDataImportError,
|
|
2
|
-
export { chartNumber, datasetDiagnostics, formatDataNumber, fromExcelNumberFormat, inlineChartData, inlineDatasets, inlineTableData, isDatasetRef, isXYChartType, numberFormatError, resolveChartData, resolveTableData, suggestChartNumberFix, tableCellDisplayValue, toExcelNumberFormat, unusedDatasets } from './chunk-
|
|
1
|
+
export { OPFDataImportError, ingest, parseTabularData } from './chunk-ZCFSDSUX.js';
|
|
2
|
+
export { chartNumber, datasetDiagnostics, formatDataNumber, fromExcelNumberFormat, inlineChartData, inlineDatasets, inlineTableData, isDatasetRef, isXYChartType, numberFormatError, resolveChartData, resolveTableData, suggestChartNumberFix, tableCellDisplayValue, toExcelNumberFormat, unusedDatasets } from './chunk-MBU42S5Y.js';
|
|
3
3
|
import './chunk-SPFV27O5.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { P as Presentation } from './presentation-
|
|
3
|
-
import {
|
|
1
|
+
import { a as Catalog } from './catalog-refs-BSfGELpt.js';
|
|
2
|
+
import { P as Presentation } from './presentation-81rNihF0.js';
|
|
3
|
+
import { V as ValidationReport, a as ValidateOptions } from './validation-types-PbGDrNUr.js';
|
|
4
4
|
|
|
5
5
|
/** The serializations of a deck: `json` (canonical), `yaml` (`.opf.yaml`) and `markdown` (`.opf.md`). */
|
|
6
6
|
type DeckFormat = "json" | "yaml" | "markdown";
|
|
@@ -33,8 +33,8 @@ interface DeckReport extends ValidationReport {
|
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* The reader behind `parse` that never throws for content: the deck and the `validate` report of it, every finding
|
|
36
|
-
* located in the text. Not exported from the package
|
|
36
|
+
* located in the text. Not exported from the package root; the Node file API and `parse` use it.
|
|
37
37
|
*/
|
|
38
38
|
declare function readDeckReport(text: string, options?: DeckReportOptions, caller?: string): DeckReport;
|
|
39
39
|
|
|
40
|
-
export {
|
|
40
|
+
export { type DeckFormat as D, type ParseOptions as P, DECK_FORMATS as a, type DeckReport as b, type DeckReportOptions as c, deckFormatOf as d, readDeckReport as r };
|
package/dist/deck.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { P as Presentation } from './presentation-
|
|
4
|
-
import './catalog-refs-
|
|
5
|
-
import './validation-types-
|
|
6
|
-
import './composition-
|
|
7
|
-
import './chart-data-
|
|
8
|
-
import './finding-
|
|
1
|
+
import { D as DeckFormat, P as ParseOptions } from './deck-report-DiDf_Vew.js';
|
|
2
|
+
export { a as DECK_FORMATS, d as deckFormatOf } from './deck-report-DiDf_Vew.js';
|
|
3
|
+
import { P as Presentation } from './presentation-81rNihF0.js';
|
|
4
|
+
import './catalog-refs-BSfGELpt.js';
|
|
5
|
+
import './validation-types-PbGDrNUr.js';
|
|
6
|
+
import './composition-C-OoqvAr.js';
|
|
7
|
+
import './chart-data-BnNqgnC-.js';
|
|
8
|
+
import './finding-CT_f_vbD.js';
|
|
9
9
|
import './json-BFSdESOE.js';
|
|
10
10
|
|
|
11
11
|
/**
|
package/dist/deck.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { DECK_FORMATS, deckFormatOf, parse, stringify } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
1
|
+
export { DECK_FORMATS, deckFormatOf, parse, stringify } from './chunk-GVOLSWAJ.js';
|
|
2
|
+
import './chunk-MSFE2HUK.js';
|
|
3
|
+
import './chunk-ECP7QPGK.js';
|
|
4
|
+
import './chunk-R7KIASS4.js';
|
|
5
|
+
import './chunk-JCOSZTOI.js';
|
|
6
|
+
import './chunk-PNINP5IF.js';
|
|
7
|
+
import './chunk-TRELE6I6.js';
|
|
8
|
+
import './chunk-KA3ZPFVT.js';
|
|
9
|
+
import './chunk-MBU42S5Y.js';
|
|
10
10
|
import './chunk-TRDXRRQK.js';
|
|
11
11
|
import './chunk-SPFV27O5.js';
|
|
12
|
-
import './chunk-
|
|
12
|
+
import './chunk-2PEWUUBR.js';
|
package/dist/diff.d.ts
CHANGED
package/dist/diff.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { categoryOf, describeValue, diff, formatDiffReport, matchArrays, merge, similarity } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
export { categoryOf, describeValue, diff, formatDiffReport, matchArrays, merge, similarity } from './chunk-L5YACLWK.js';
|
|
2
|
+
import './chunk-WHHLGDCQ.js';
|
|
3
|
+
import './chunk-KA3ZPFVT.js';
|
|
4
|
+
import './chunk-MBU42S5Y.js';
|
|
5
5
|
import './chunk-TRDXRRQK.js';
|
|
6
6
|
import './chunk-SPFV27O5.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-2PEWUUBR.js';
|