@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.
Files changed (67) hide show
  1. package/README.md +4 -4
  2. package/dist/browser.js +38 -0
  3. package/dist/{catalog-refs-C4K4y-vh.d.ts → catalog-refs-BSfGELpt.d.ts} +1 -1
  4. package/dist/{catalog-schemas-g7RFQBdc.d.ts → catalog-schemas-CinPh5WA.d.ts} +1 -1
  5. package/dist/catalog.d.ts +2 -2
  6. package/dist/{chart-data-DTxdRRT1.d.ts → chart-data-BnNqgnC-.d.ts} +1 -1
  7. package/dist/{chunk-RA64UQKI.js → chunk-2PEWUUBR.js} +97 -73
  8. package/dist/{chunk-TCD2FB2K.js → chunk-ECP7QPGK.js} +5 -5
  9. package/dist/{chunk-O2CX5NEH.js → chunk-FO3WGS4R.js} +6 -5
  10. package/dist/{chunk-N4EVOFEA.js → chunk-GVOLSWAJ.js} +4 -4
  11. package/dist/{chunk-WWYWFVOI.js → chunk-IM337HP5.js} +151 -25
  12. package/dist/{chunk-YT7FMQER.js → chunk-JCOSZTOI.js} +1 -1
  13. package/dist/{chunk-IPW5BS3X.js → chunk-K5EG3UMS.js} +190 -172
  14. package/dist/{chunk-NLNYNBTS.js → chunk-KA3ZPFVT.js} +84 -26
  15. package/dist/{chunk-M4UR3NPN.js → chunk-L5YACLWK.js} +2 -2
  16. package/dist/{chunk-CW7GEAV3.js → chunk-MBU42S5Y.js} +291 -133
  17. package/dist/{chunk-BIC3SWPK.js → chunk-MSFE2HUK.js} +30 -5
  18. package/dist/{chunk-ESRYBYLY.js → chunk-PNINP5IF.js} +1 -1
  19. package/dist/{chunk-IS5H5JKH.js → chunk-R7KIASS4.js} +1 -1
  20. package/dist/{chunk-PPROJP2E.js → chunk-TRELE6I6.js} +1 -1
  21. package/dist/{chunk-O3CVNJTL.js → chunk-WHHLGDCQ.js} +1 -1
  22. package/dist/{chunk-O263APNI.js → chunk-ZCFSDSUX.js} +3 -3
  23. package/dist/{composition-BbZ_9C-c.d.ts → composition-C-OoqvAr.d.ts} +80 -40
  24. package/dist/composition.d.ts +3 -3
  25. package/dist/composition.js +1 -1
  26. package/dist/conversion-4CLOEG6O.js +21 -0
  27. package/dist/{conversion-SBpTOwdg.d.ts → conversion-BxZbBd_0.d.ts} +96 -38
  28. package/dist/convert.d.ts +4 -4
  29. package/dist/convert.js +7 -7
  30. package/dist/data.d.ts +7 -7
  31. package/dist/data.js +2 -2
  32. package/dist/{deck-report-Bx3naFlF.d.ts → deck-report-DiDf_Vew.d.ts} +5 -5
  33. package/dist/deck.d.ts +8 -8
  34. package/dist/deck.js +10 -10
  35. package/dist/diff.d.ts +1 -1
  36. package/dist/diff.js +5 -5
  37. package/dist/docs.js +35 -29
  38. package/dist/examples.d.ts +1 -1
  39. package/dist/examples.js +181 -214
  40. package/dist/{finding-CDQ_wH8j.d.ts → finding-CT_f_vbD.d.ts} +1 -1
  41. package/dist/format.js +2 -2
  42. package/dist/index.d.ts +153 -20
  43. package/dist/index.js +62 -15
  44. package/dist/markdown.d.ts +12 -8
  45. package/dist/markdown.js +7 -7
  46. package/dist/node-engine.d.ts +37 -17
  47. package/dist/node-engine.js +39 -16
  48. package/dist/{pagination-BhX4M48Y.d.ts → pagination-BaUjDrTz.d.ts} +7 -4
  49. package/dist/pagination.d.ts +4 -4
  50. package/dist/pagination.js +4 -4
  51. package/dist/patch.d.ts +1 -1
  52. package/dist/patch.js +4 -4
  53. package/dist/{presentation-fb8CZmRq.d.ts → presentation-81rNihF0.d.ts} +271 -384
  54. package/dist/repo-readme.js +1 -1
  55. package/dist/schemas.d.ts +4 -2
  56. package/dist/schemas.js +1 -1
  57. package/dist/spec/README.md +1 -1
  58. package/dist/spec/schemas/opf.schema.json +67 -72
  59. package/dist/types.d.ts +3 -3
  60. package/dist/{validation-types-iZbXfES6.d.ts → validation-types-PbGDrNUr.d.ts} +12 -7
  61. package/dist/validator.d.ts +8 -8
  62. package/dist/validator.js +3 -3
  63. package/dist/yaml.d.ts +6 -6
  64. package/dist/yaml.js +7 -7
  65. package/package.json +14 -12
  66. package/dist/node.d.ts +0 -60
  67. package/dist/node.js +0 -54
@@ -1,10 +1,10 @@
1
- import { a as DeckFormat } from './deck-report-Bx3naFlF.js';
2
- import { F as Finding, f as FindingSeverity } from './finding-CDQ_wH8j.js';
3
- import { P as Presentation } from './presentation-fb8CZmRq.js';
4
- import { f as ValidationReport, e as ValidationChecks, c as ValidateOptions } from './validation-types-iZbXfES6.js';
5
- import { b as Catalog } from './catalog-refs-C4K4y-vh.js';
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.17.0";
36
- readonly "@openpresentation/opf-pptx": "^0.17.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
- renderSlideSvg(presentation: unknown, index: number, options?: Record<string, unknown>): string;
85
- svgToPng(svg: string, options?: Record<string, unknown>): Promise<Uint8Array>;
86
- svgToPdf(svgs: string | string[], options?: Record<string, unknown>): Promise<Uint8Array>;
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
- /** A prepared fonts handle (`loadFonts()` of `@openpresentation/opf-render/fonts-node`), reused across calls. Omitted: the bundled open font pack plus `fontDirs`. */
157
- fonts?: FontsHandle;
158
- /** Directories of `.ttf` and `.otf` files to load before the bundled pack (not recursive). Ignored when `fonts` is given. */
159
- fontDirs?: readonly string[];
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"`. Omitted: every slide that is not hidden. Not for `pptx`. */
163
- slides?: readonly number[] | string;
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`: `vector` (selectable text, the default) or `raster`. */
171
- pdfMode?: "vector" | "raster";
172
- /** `svg`: embed the faces the slide's text uses (`used`, the default) or none (`none`). */
173
- svgFonts?: "used" | "none";
174
- /** `pptx`: native charts (`native`), picture fallbacks (`fallback`) or opf-pptx's choice (`auto`). */
175
- chartex?: "auto" | "native" | "fallback";
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
- imageFormat?: "compatible" | "preserve";
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 source file name, for naming the output when the presentation has no `filename` or `name`. */
187
- filename?: string;
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 the source name, then `-001.png` for slide 1 and so on. */
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 `fontDirs` files, in load order. */
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 `fontDirs`. */
284
+ /** Absolute font file paths already listed from the `fonts` folders. */
241
285
  userFonts?: string[];
242
- /** Name options as the command line does (`--slides`, `--font-dir`, `--asset-dir`) in the messages of errors the engine throws. */
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): Required<Pick<ExportOptions, "format" | "svgFonts" | "scale">> & 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: ReturnType<typeof resolveExportOptions>, ctx: ExportContext): Promise<ExportRun>;
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: ReturnType<typeof resolveExportOptions>;
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`, `--font-dir`, `--asset-dir`) in messages. */
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" | "filename"> {
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
- /** One archive of the slides instead of one file per slide (`png`, `svg`). With an output path, the path must end `.zip`, and a `.zip` path implies it. */
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 render` and `opf export` read `--out` with the same rule. */
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 $, asApiError as A, checkDate as B, type ConvertInput as C, type Diagnostic as D, type ExportFormat as E, type FontsHandle as F, checkOptions as G, checkScale as H, type ImportOptions as I, deckFileFormat as J, exportFormatOf as K, finishReport as L, importPresentation as M, loadPptx as N, type OpenOptions as O, type Peer as P, loadRenderer as Q, type Renderer as R, type SaveOptions as S, missingPeerFrom as T, planConversion as U, VERSIONS as V, prepareExport as W, reaches as X, readInput as Y, reportThrown as Z, resolveExportOptions as _, type ConvertOptions as a, runPreparedExport as a0, writePlanned as a1, type ConvertResult as b, type ConvertFormat as c, type SaveResult as d, type ConvertedFile as e, OPFApiError as f, OPFExportError as g, OPFImportError as h, type EmbeddedFace as i, Reporter as j, type PptxModule as k, type ConversionPlan as l, EXPORT_FORMATS as m, type ExportContext as n, type ExportFile as o, type ExportFontSummary as p, type ExportOptions as q, type ExportResult as r, type ExportRun as s, type ImportResult as t, PEER_RANGES as u, PPTX_PACKAGE as v, type PreparedExport as w, RENDER_PACKAGE as x, type ReportFinding as y, type Source as z };
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 { P as PaginatedPage, d as PresentationPaginationOptions } from './pagination-BhX4M48Y.js';
2
- import './composition-BbZ_9C-c.js';
3
- import './catalog-refs-C4K4y-vh.js';
4
- import './chart-data-DTxdRRT1.js';
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-O2CX5NEH.js';
2
- import { parseQuoteLines, parseCodeFence, splitWhen, parseListLine, levelsFromIndents, fenceCode } from './chunk-ESRYBYLY.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-PPROJP2E.js';
4
- export { OPFConversionError } from './chunk-PPROJP2E.js';
5
- import './chunk-NLNYNBTS.js';
6
- import { promotedRegionKeys, isDatasetRef, inlineTableData, visitContentPayloads, chartNumber } from './chunk-CW7GEAV3.js';
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-RA64UQKI.js';
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-fb8CZmRq.js';
2
- export { a as ChartMapping, b as ChartNumberFix, c as ChartNumberFixOperation, d as ChartNumberFixOptions, D as DataCellValue, e as DataColumn, f as DataDiagnostic, g as DataDiagnosticCode, h as DataResolveOptions, i as DataSourceRef, j as DataStyledCell, k as DataTableCell, l as DataTableHeader, m as DataTableValue, n as DataTextRun, o as Dataset, p as DatasetRef, R as ResolvedChartData, q as ResolvedTableData, r as chartNumber, s as datasetDiagnostics, t as formatDataNumber, u as fromExcelNumberFormat, v as inlineChartData, w as inlineDatasets, x as inlineTableData, y as isDatasetRef, z as isXYChartType, A as numberFormatError, B as resolveChartData, E as resolveTableData, F as suggestChartNumberFix, G as tableCellDisplayValue, H as toExcelNumberFormat, I as unusedDatasets } from './chart-data-DTxdRRT1.js';
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 ImportDataOptions extends DataImportOptions {
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 importData(input: unknown, options: ImportDataOptions & {
42
+ declare function ingest(input: unknown, options: IngestOptions & {
43
43
  as: 'table';
44
44
  }): ImportedTable;
45
- declare function importData(input: unknown, options: ImportDataOptions & {
45
+ declare function ingest(input: unknown, options: IngestOptions & {
46
46
  as: 'chart';
47
47
  }): ImportedChart;
48
- declare function importData(input: unknown, options: ImportDataOptions): ImportedTable | ImportedChart;
48
+ declare function ingest(input: unknown, options: IngestOptions): ImportedTable | ImportedChart;
49
49
 
50
- export { type DataCell, type DataImportOptions, type ImportDataOptions, type ImportedChart, type ImportedChartData, type ImportedChartType, type ImportedTable, OPFDataImportError, type TabularData, importData, parseTabularData };
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, importData, parseTabularData } from './chunk-O263APNI.js';
2
- export { chartNumber, datasetDiagnostics, formatDataNumber, fromExcelNumberFormat, inlineChartData, inlineDatasets, inlineTableData, isDatasetRef, isXYChartType, numberFormatError, resolveChartData, resolveTableData, suggestChartNumberFix, tableCellDisplayValue, toExcelNumberFormat, unusedDatasets } from './chunk-CW7GEAV3.js';
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 { b as Catalog } from './catalog-refs-C4K4y-vh.js';
2
- import { P as Presentation } from './presentation-fb8CZmRq.js';
3
- import { f as ValidationReport, c as ValidateOptions } from './validation-types-iZbXfES6.js';
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 entries; `@openpresentation/opf/node` and `parse` use it.
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 { DECK_FORMATS as D, type ParseOptions as P, type DeckFormat as a, type DeckReport as b, type DeckReportOptions as c, deckFormatOf as d, readDeckReport as r };
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 { a as DeckFormat, P as ParseOptions } from './deck-report-Bx3naFlF.js';
2
- export { D as DECK_FORMATS, d as deckFormatOf } from './deck-report-Bx3naFlF.js';
3
- import { P as Presentation } from './presentation-fb8CZmRq.js';
4
- import './catalog-refs-C4K4y-vh.js';
5
- import './validation-types-iZbXfES6.js';
6
- import './composition-BbZ_9C-c.js';
7
- import './chart-data-DTxdRRT1.js';
8
- import './finding-CDQ_wH8j.js';
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-N4EVOFEA.js';
2
- import './chunk-BIC3SWPK.js';
3
- import './chunk-TCD2FB2K.js';
4
- import './chunk-IS5H5JKH.js';
5
- import './chunk-YT7FMQER.js';
6
- import './chunk-ESRYBYLY.js';
7
- import './chunk-PPROJP2E.js';
8
- import './chunk-NLNYNBTS.js';
9
- import './chunk-CW7GEAV3.js';
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-RA64UQKI.js';
12
+ import './chunk-2PEWUUBR.js';
package/dist/diff.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { J as JsonPatchOperation } from './finding-CDQ_wH8j.js';
1
+ import { J as JsonPatchOperation } from './finding-CT_f_vbD.js';
2
2
 
3
3
  type MatchedBy = "id" | "equal" | "similar" | "position";
4
4
  interface MatchPair {
package/dist/diff.js CHANGED
@@ -1,7 +1,7 @@
1
- export { categoryOf, describeValue, diff, formatDiffReport, matchArrays, merge, similarity } from './chunk-M4UR3NPN.js';
2
- import './chunk-O3CVNJTL.js';
3
- import './chunk-NLNYNBTS.js';
4
- import './chunk-CW7GEAV3.js';
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-RA64UQKI.js';
7
+ import './chunk-2PEWUUBR.js';