@openpresentation/opf-pptx 0.11.6 → 0.11.7
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 +17 -3
- package/dist/background.js +15 -13
- package/dist/chartex.js +9 -9
- package/dist/code-provenance.js +1 -1
- package/dist/content-topology.js +295 -0
- package/dist/document-provenance.js +260 -46
- package/dist/furniture-provenance.js +57 -4
- package/dist/index.d.ts +12 -6
- package/dist/index.js +362 -52
- package/dist/logo-provenance.js +173 -0
- package/dist/sections.js +111 -0
- package/dist/watermark-provenance.js +2 -1
- package/package.json +7 -6
package/dist/index.d.ts
CHANGED
|
@@ -39,6 +39,8 @@ export interface MediaProvenanceDiagnostic { code: "media-provenance-omitted"; p
|
|
|
39
39
|
export interface ChartDataUnplottableDiagnostic { code: "chart-data-unplottable"; path: string; message: string; reason: "data-not-inline" | "no-rows" | "no-columns" | "single-column-not-numeric" }
|
|
40
40
|
/** Content with no PowerPoint export (an empty table, an unsupported payload) is replaced by a plain-language placeholder frame. */
|
|
41
41
|
export interface ContentPlaceholderDiagnostic { code: "content-placeholder"; path: string; message: string; reason: "table-has-no-rows" | "unsupported-payload" }
|
|
42
|
+
/** An image that has no embeddable raster. `reason: "unsupported-format"`: the embedded bytes are no readable PNG, JPEG, GIF or WebP (an SVG, for example); the preview's placeholder was exported instead (or no watermark, or the background colour). `strictAssets` throws `unsupported-image-dimensions` instead. */
|
|
43
|
+
export interface UnresolvedAssetDiagnostic { code: "unresolved-asset"; path: string; message: string; reason?: "unsupported-format" }
|
|
42
44
|
export interface WatermarkNotExportedDiagnostic { code: "watermark-not-exported"; path: string; message: string }
|
|
43
45
|
/**
|
|
44
46
|
* The chart data was reshaped to export a native chart: a single value column was plotted against row numbers; a one-series construct
|
|
@@ -66,17 +68,21 @@ export interface ToPptxOptions {
|
|
|
66
68
|
chartex?: "auto" | "native" | "fallback";
|
|
67
69
|
/**
|
|
68
70
|
* OPF_DOCUMENT_V1 / OPF_SLIDE_V1 customer-data tags that let fromPptx restore
|
|
69
|
-
* catalog references, layout ids
|
|
71
|
+
* catalog references, layout ids, authoring metadata (`filename` and `extensions`
|
|
72
|
+
* included), `design.logo`, the asset registry, slide `section`/`extensions` and
|
|
73
|
+
* the slide content structure: nested groups, promoted regions, the root payload
|
|
74
|
+
* form, block ids and extensions, group composition (docs/document-roundtrip.md).
|
|
70
75
|
* Tags are not shown in PowerPoint's UI. Default "full"; "references-only"
|
|
71
|
-
* stores catalog references without organization, speaker, free text, slide ids
|
|
72
|
-
* or
|
|
76
|
+
* stores catalog references without organization, speaker, free text, slide ids,
|
|
77
|
+
* assets or content structure; false writes no tags. Slide `section` labels are
|
|
78
|
+
* also written as PowerPoint's native section list whatever this option says.
|
|
73
79
|
*/
|
|
74
80
|
provenance?: "full" | "references-only" | false;
|
|
75
81
|
textMeasurement?: TextMeasurement;
|
|
76
82
|
/** Match preview/pagination clearance around supplied vector text outlines; default 1. */
|
|
77
83
|
textRasterPadding?: number;
|
|
78
84
|
/** Layout diagnostics, `media-provenance-omitted` when video data cannot be stored, plus `unresolved-font-scheme` (once per reference path) when a font-scheme id matches no record and the default `aptos` scheme is used as the base. */
|
|
79
|
-
onDiagnostic?: (diagnostic: LayoutDiagnostic | FontSchemeDiagnostic | MediaProvenanceDiagnostic | ChartDataUnplottableDiagnostic | ChartDataAdaptedDiagnostic | ChartMapGeodataDiagnostic | ContentPlaceholderDiagnostic | WatermarkNotExportedDiagnostic) => void;
|
|
85
|
+
onDiagnostic?: (diagnostic: LayoutDiagnostic | FontSchemeDiagnostic | MediaProvenanceDiagnostic | ChartDataUnplottableDiagnostic | ChartDataAdaptedDiagnostic | ChartMapGeodataDiagnostic | ContentPlaceholderDiagnostic | UnresolvedAssetDiagnostic | WatermarkNotExportedDiagnostic) => void;
|
|
80
86
|
baseDir?: string;
|
|
81
87
|
compressionLevel?: number;
|
|
82
88
|
imageResolver?: (src: string, context: ImageResolverContext) => ImageResolverResult | Promise<ImageResolverResult | null | undefined> | null | undefined;
|
|
@@ -100,12 +106,12 @@ export interface ToPptxOptions {
|
|
|
100
106
|
date?: string;
|
|
101
107
|
/** Host-supplied catalog records, as in opf-render. Currently consulted for socialPlatforms (generated socials furniture). */
|
|
102
108
|
catalogs?: Record<string, { records?: unknown[] } | unknown[]>;
|
|
103
|
-
/** Records for document `catalogs.<kind>.source` URLs, as in opf-render. Currently consulted for socialPlatforms. */
|
|
109
|
+
/** Records for document `catalogs.<kind>.source` URLs (a single source or each entry of an ordered search path), as in opf-render. Currently consulted for socialPlatforms. */
|
|
104
110
|
catalogSources?: Record<string, { records?: unknown[] } | unknown[]>;
|
|
105
111
|
}
|
|
106
112
|
|
|
107
113
|
export interface FromPptxOptions {
|
|
108
|
-
/** Reports native details that import cannot preserve, including code provenance fallback/reflow and grouped text transforms. Table paths identify native frame and row/cell indexes (including headers). Stored catalog references that no longer match the package report `design-reference-changed` / `layout-reference-changed` at the reference path; a slide layout id that resolves to no inline or bundled record reports `unresolved-layout-reference` (docs/document-roundtrip.md). */
|
|
114
|
+
/** Reports native details that import cannot preserve, including code provenance fallback/reflow and grouped text transforms. Table paths identify native frame and row/cell indexes (including headers). Stored catalog references that no longer match the package report `design-reference-changed` / `layout-reference-changed` at the reference path; a slide layout id that resolves to no inline or bundled record reports `unresolved-layout-reference`; a slide whose imported blocks no longer fit the stored content structure reports `content-structure-changed` at `slides.N`, a block id repeated by a duplicated slide `duplicate-block-id`, and a footer section text that disagrees with PowerPoint's section list `section-reference-changed` (docs/document-roundtrip.md). */
|
|
109
115
|
onDiagnostic?: (diagnostic: {code: string; path: string; message: string}) => void;
|
|
110
116
|
fallbackName?: string;
|
|
111
117
|
schema?: string;
|