@openpresentation/opf 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -2
- package/dist/{catalog-refs-_anZs-Qz.d.ts → catalog-refs-C4K4y-vh.d.ts} +1 -1
- package/dist/{catalog-schemas-BZCjgAxu.d.ts → catalog-schemas-g7RFQBdc.d.ts} +1 -1
- package/dist/catalog.d.ts +2 -2
- package/dist/catalog.js +3 -23712
- package/dist/{chart-data-BnNqgnC-.d.ts → chart-data-DTxdRRT1.d.ts} +1 -1
- package/dist/{chunk-FQSIIADJ.js → chunk-BIC3SWPK.js} +4 -4
- package/dist/{chunk-5PDN7BN6.js → chunk-CW7GEAV3.js} +151 -49
- package/dist/{chunk-NAWQR7MN.js → chunk-ESRYBYLY.js} +1 -1
- package/dist/chunk-IPW5BS3X.js +973 -0
- package/dist/{chunk-5UEUAW57.js → chunk-IS5H5JKH.js} +1 -1
- package/dist/{chunk-UM24JFUE.js → chunk-M4UR3NPN.js} +2 -2
- package/dist/{chunk-KINQFU6X.js → chunk-N4EVOFEA.js} +19 -12
- package/dist/{chunk-PX5AWL7Y.js → chunk-NLNYNBTS.js} +79 -10
- package/dist/{chunk-SMLMI6IZ.js → chunk-O263APNI.js} +1 -1
- package/dist/{chunk-BSYQDWT4.js → chunk-O2CX5NEH.js} +26 -14
- package/dist/{chunk-3XDRQYWZ.js → chunk-O3CVNJTL.js} +1 -1
- package/dist/{chunk-5TO6I3GB.js → chunk-PPROJP2E.js} +1 -1
- package/dist/{chunk-WEDGVC5W.js → chunk-RA64UQKI.js} +18 -42
- package/dist/{chunk-K4DQQIT4.js → chunk-TCD2FB2K.js} +5 -5
- package/dist/chunk-WCG3THTD.js +23712 -0
- package/dist/chunk-WWYWFVOI.js +793 -0
- package/dist/{chunk-6OR326EA.js → chunk-YT7FMQER.js} +1 -1
- package/dist/{composition-D4ADF5c-.d.ts → composition-BbZ_9C-c.d.ts} +152 -132
- package/dist/composition.d.ts +3 -3
- package/dist/composition.js +1 -1
- package/dist/conversion-SBpTOwdg.d.ts +444 -0
- package/dist/convert.d.ts +4 -4
- package/dist/convert.js +7 -7
- package/dist/data.d.ts +2 -2
- package/dist/data.js +2 -2
- package/dist/deck-report-Bx3naFlF.d.ts +40 -0
- package/dist/deck.d.ts +23 -53
- package/dist/deck.js +10 -10
- package/dist/diff.d.ts +1 -1
- package/dist/diff.js +5 -5
- package/dist/docs.js +29 -23
- package/dist/examples.d.ts +1 -1
- package/dist/examples.js +237 -237
- package/dist/{finding-CT_f_vbD.d.ts → finding-CDQ_wH8j.d.ts} +1 -1
- package/dist/format.js +2 -2
- package/dist/index.d.ts +42 -12
- package/dist/index.js +15 -807
- package/dist/markdown.d.ts +6 -6
- package/dist/markdown.js +7 -7
- package/dist/node-engine.d.ts +94 -0
- package/dist/node-engine.js +21 -0
- package/dist/node.d.ts +60 -0
- package/dist/node.js +54 -0
- package/dist/{pagination-DzZPFheM.d.ts → pagination-BhX4M48Y.d.ts} +21 -7
- 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-COrFuj2g.d.ts → presentation-fb8CZmRq.d.ts} +12 -75
- package/dist/repo-readme.js +1 -1
- package/dist/schemas.js +1 -1
- package/dist/spec/catalogs/manifest.json +1 -1
- package/dist/spec/schemas/opf.schema.json +16 -37
- package/dist/types.d.ts +3 -3
- package/dist/{validation-types-HxIgJfKx.d.ts → validation-types-iZbXfES6.d.ts} +19 -8
- 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 +34 -1
package/dist/markdown.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { P as Presentation } from './presentation-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import './composition-
|
|
6
|
-
import './chart-data-
|
|
1
|
+
import { b as Catalog } from './catalog-refs-C4K4y-vh.js';
|
|
2
|
+
import { P as Presentation } from './presentation-fb8CZmRq.js';
|
|
3
|
+
import { F as Finding, d as FindingLocation } from './finding-CDQ_wH8j.js';
|
|
4
|
+
import { c as ValidateOptions, f as ValidationReport } from './validation-types-iZbXfES6.js';
|
|
5
|
+
import './composition-BbZ_9C-c.js';
|
|
6
|
+
import './chart-data-DTxdRRT1.js';
|
|
7
7
|
import './json-BFSdESOE.js';
|
|
8
8
|
|
|
9
9
|
interface EmbeddedPart {
|
package/dist/markdown.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { fromMarkdown, toMarkdown } from './chunk-
|
|
2
|
-
export { OPFMarkdownError } from './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
1
|
+
export { fromMarkdown, toMarkdown } from './chunk-BIC3SWPK.js';
|
|
2
|
+
export { OPFMarkdownError } from './chunk-IS5H5JKH.js';
|
|
3
|
+
import './chunk-ESRYBYLY.js';
|
|
4
|
+
import './chunk-PPROJP2E.js';
|
|
5
|
+
import './chunk-NLNYNBTS.js';
|
|
6
|
+
import './chunk-CW7GEAV3.js';
|
|
7
7
|
import './chunk-TRDXRRQK.js';
|
|
8
8
|
import './chunk-SPFV27O5.js';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-RA64UQKI.js';
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
export { b as DeckReport, c as DeckReportOptions, r as readDeckReport } from './deck-report-Bx3naFlF.js';
|
|
2
|
+
import { F as FontsHandle, i as EmbeddedFace, R as Renderer, j as Reporter, P as Peer, k as PptxModule } from './conversion-SBpTOwdg.js';
|
|
3
|
+
export { l as ConversionPlan, D as Diagnostic, m as EXPORT_FORMATS, n as ExportContext, o as ExportFile, p as ExportFontSummary, E as ExportFormat, q as ExportOptions, r as ExportResult, s as ExportRun, I as ImportOptions, t as ImportResult, f as OPFApiError, g as OPFExportError, h as OPFImportError, u as PEER_RANGES, v as PPTX_PACKAGE, w as PreparedExport, x as RENDER_PACKAGE, y as ReportFinding, z as Source, V as VERSIONS, A as asApiError, B as checkDate, G as checkOptions, H as checkScale, J as deckFileFormat, K as exportFormatOf, L as finishReport, M as importPresentation, N as loadPptx, Q as loadRenderer, T as missingPeerFrom, U as planConversion, W as prepareExport, X as reaches, Y as readInput, Z as reportThrown, _ as resolveExportOptions, $ as runExport, a0 as runPreparedExport, a1 as writePlanned } from './conversion-SBpTOwdg.js';
|
|
4
|
+
import './catalog-refs-C4K4y-vh.js';
|
|
5
|
+
import './presentation-fb8CZmRq.js';
|
|
6
|
+
import './validation-types-iZbXfES6.js';
|
|
7
|
+
import './composition-BbZ_9C-c.js';
|
|
8
|
+
import './chart-data-DTxdRRT1.js';
|
|
9
|
+
import './finding-CDQ_wH8j.js';
|
|
10
|
+
import './json-BFSdESOE.js';
|
|
11
|
+
|
|
12
|
+
/** `1,3-5`, `2-` (to the end) and `-3` (from the start), one-based, in ascending order without repeats. */
|
|
13
|
+
declare function parseSlideSelection(spec: string, total: number, label?: string): number[];
|
|
14
|
+
/** `deck.opf.json` and `deck.pptx` both give `deck`; stdin gives `deck`. */
|
|
15
|
+
declare function stemOf(input: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* The base name of render and export output files: the deck's `filename` (a trailing .pptx, .pdf, .png or .svg is dropped, any
|
|
18
|
+
* case), else the slugified `name`, else the input file's stem. The same rule opf-editor names its downloads by. Characters a file
|
|
19
|
+
* system rejects are replaced, so the name is safe to write.
|
|
20
|
+
*/
|
|
21
|
+
declare function deckStem(deck: unknown, input: string): string;
|
|
22
|
+
interface PlannedFile {
|
|
23
|
+
file: string;
|
|
24
|
+
bytes: Uint8Array;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Fail before writing anything when a destination exists (the commands without --force; `convert` with `overwrite: false`), is a symlink or is
|
|
28
|
+
* not a regular file: `output-exists` and `output-not-file`, which the commands report at exit 1. `flags` false words the
|
|
29
|
+
* message for the library API.
|
|
30
|
+
*/
|
|
31
|
+
declare function checkDestinations(files: string[], overwrite: boolean, flags?: boolean): Promise<void>;
|
|
32
|
+
/** Write each file through a temporary sibling and a rename, so no partial output is ever published under its final name. */
|
|
33
|
+
declare function writeFiles(files: PlannedFile[], overwrite: boolean, flags?: boolean): Promise<void>;
|
|
34
|
+
declare function pointerOf(location: string): string;
|
|
35
|
+
|
|
36
|
+
interface PreparedFonts {
|
|
37
|
+
/** The fonts handle of opf-render `loadFonts()`: passed as `{ fonts }` to every deck-level call. */
|
|
38
|
+
handle: FontsHandle;
|
|
39
|
+
/** Absolute paths of the --font-dir files, in load order. */
|
|
40
|
+
userFonts: string[];
|
|
41
|
+
}
|
|
42
|
+
/** Font files directly inside each directory (no recursion), sorted by name so the load order is the same everywhere. */
|
|
43
|
+
declare function listFontDirectories(directories: string[], label?: string): Promise<string[]>;
|
|
44
|
+
/**
|
|
45
|
+
* The office pack (Carlito, Intos, the open families font schemes select and the open replacements the font policy
|
|
46
|
+
* routes to, with lazy faces loaded on demand), visual substitution, and Noto script packages for the scripts the
|
|
47
|
+
* deck's text draws when they are installed. `faces` are the --font-dir files, loaded first.
|
|
48
|
+
*/
|
|
49
|
+
declare function prepareFonts(renderer: Renderer, presentation: unknown, userFonts: string[], reporter: Reporter, embedScriptFonts?: boolean): Promise<PreparedFonts>;
|
|
50
|
+
/** A fonts handle lent to one export. `release` returns it; until then no other export uses the shared handle. */
|
|
51
|
+
interface FontsLease {
|
|
52
|
+
handle: FontsHandle;
|
|
53
|
+
release(): void;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The default fonts handle of this process, prepared once (the office pack plus `userFonts`, keyed by that file list and
|
|
57
|
+
* `embedScriptFonts`) and lent to one export at a time, so the substitutions it records are the export's own. It is lent
|
|
58
|
+
* only for a deck that draws no script beyond Latin, Greek and Cyrillic and needs no glyph-fallback face: for such a deck
|
|
59
|
+
* a handle prepared for it and the shared one hold the same faces, so the bytes are the same. Any other deck, or a
|
|
60
|
+
* renderer without `autoScriptSelection`, gets undefined and the caller prepares a handle of its own (`prepareFonts`).
|
|
61
|
+
*/
|
|
62
|
+
declare function leaseSharedFonts(renderer: Renderer, presentation: unknown, userFonts: string[], reporter: Reporter, embedScriptFonts?: boolean): Promise<FontsLease | undefined>;
|
|
63
|
+
/**
|
|
64
|
+
* Faces an SVG should carry. Marking every face `embed: "used"` makes the renderer embed a face only when the slide's
|
|
65
|
+
* text names its family, so a slide in one family ships kilobytes of font rather than the whole pack.
|
|
66
|
+
*/
|
|
67
|
+
declare function embeddedFor(handle: FontsHandle, mode: "used" | "none"): (EmbeddedFace & {
|
|
68
|
+
embed?: "used";
|
|
69
|
+
})[];
|
|
70
|
+
|
|
71
|
+
interface ImportRun {
|
|
72
|
+
/** The imported presentation, undefined when `fromPptx` threw (the reporter then holds the error finding). */
|
|
73
|
+
presentation?: Record<string, unknown>;
|
|
74
|
+
/** With `signals`: the raw per-shape layout and style signals of the file. */
|
|
75
|
+
signals?: {
|
|
76
|
+
version?: number;
|
|
77
|
+
};
|
|
78
|
+
failure?: {
|
|
79
|
+
code: string;
|
|
80
|
+
message: string;
|
|
81
|
+
};
|
|
82
|
+
pptx: Peer<PptxModule>;
|
|
83
|
+
}
|
|
84
|
+
/** Read a PowerPoint file. Diagnostics (and the error finding of a failure) are added to `reporter`. Throws an `OPFApiError` when opf-pptx is missing or too old. */
|
|
85
|
+
declare function runImport(bytes: Uint8Array, options: {
|
|
86
|
+
signals?: boolean;
|
|
87
|
+
}, reporter: Reporter, loaded?: Peer<PptxModule>): Promise<ImportRun>;
|
|
88
|
+
|
|
89
|
+
declare function createZip(entries: {
|
|
90
|
+
name: string;
|
|
91
|
+
bytes: Uint8Array;
|
|
92
|
+
}[]): Uint8Array;
|
|
93
|
+
|
|
94
|
+
export { FontsHandle, type ImportRun, Peer, type PlannedFile, PptxModule, Renderer, Reporter, checkDestinations, createZip, deckStem, embeddedFor, leaseSharedFonts, listFontDirectories, parseSlideSelection, pointerOf, prepareFonts, runImport, stemOf, writeFiles };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { EXPORT_FORMATS, OPFApiError, OPFExportError, OPFImportError, PEER_RANGES, PPTX_PACKAGE, RENDER_PACKAGE, Reporter, VERSIONS, asApiError, checkDate, checkDestinations, checkOptions, checkScale, createZip, deckFileFormat, deckStem, embeddedFor, exportFormatOf, finishReport, importPresentation, leaseSharedFonts, listFontDirectories, loadPptx, loadRenderer, missingPeerFrom, parseSlideSelection, planConversion, pointerOf, prepareExport, prepareFonts, reaches, readInput, reportThrown, resolveExportOptions, runExport, runImport, runPreparedExport, stemOf, writeFiles, writePlanned } from './chunk-IPW5BS3X.js';
|
|
2
|
+
import './chunk-WWYWFVOI.js';
|
|
3
|
+
import './chunk-HXHOZ7AH.js';
|
|
4
|
+
import './chunk-O263APNI.js';
|
|
5
|
+
import './chunk-WCG3THTD.js';
|
|
6
|
+
export { readDeckReport } from './chunk-N4EVOFEA.js';
|
|
7
|
+
import './chunk-BIC3SWPK.js';
|
|
8
|
+
import './chunk-TCD2FB2K.js';
|
|
9
|
+
import './chunk-IS5H5JKH.js';
|
|
10
|
+
import './chunk-M4UR3NPN.js';
|
|
11
|
+
import './chunk-O3CVNJTL.js';
|
|
12
|
+
import './chunk-YT7FMQER.js';
|
|
13
|
+
import './chunk-O2CX5NEH.js';
|
|
14
|
+
import './chunk-ESRYBYLY.js';
|
|
15
|
+
import './chunk-PPROJP2E.js';
|
|
16
|
+
import './chunk-NLNYNBTS.js';
|
|
17
|
+
import './chunk-CW7GEAV3.js';
|
|
18
|
+
import './chunk-TRDXRRQK.js';
|
|
19
|
+
import './chunk-SPFV27O5.js';
|
|
20
|
+
import './chunk-RA64UQKI.js';
|
|
21
|
+
import './chunk-WXSPETQ6.js';
|
package/dist/node.d.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export { SchemaEntry, SchemaName, audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './schemas.js';
|
|
2
|
+
export { DEFAULT_CHART_PALETTE, DEFAULT_VALIDATION_THRESHOLDS, OPFValidationError, assertValid, assertValidCatalogRecord, findValidationRule, validate, validateCatalogRecord, validationRules } from './validator.js';
|
|
3
|
+
export { B as BuiltinVariableInfo, C as Contract, D as DEFAULT_VARIABLE_DATE_FORMAT, O as OPFVariableError, R as ResolveVariablesOptions, a as ResolveVariablesResult, V as VARIABLE_KINDS, b as ValidateFonts, c as ValidateOptions, d as ValidationCategory, e as ValidationChecks, f as ValidationReport, g as ValidationRuleCost, h as ValidationRuleInfo, i as ValidationThresholds, j as VariableDeclaration, k as VariableDiagnostic, l as VariableDiagnosticCode, m as VariableDiagnosticSeverity, n as VariableInfo, o as VariableKind, p as VariableUse, q as VariableUseForm, r as VariableValues, s as coerceVariableValue, t as formatVariableNumber, u as hasContentVariables, v as isTemplate, w as listBuiltinVariables, x as listVariables, y as resolveVariables, z as validationCategories, A as variableDeclarations } from './validation-types-iZbXfES6.js';
|
|
4
|
+
export { CatalogPatchOperation, CatalogRecordChange, CatalogRef, CatalogUpdate, CopiedRecordRename, CopySlidesResult, DatasetFact, EmbedResult, EmbeddedRecord, HeaderFooterFact, MoveToCustomErrorCode, MoveToCustomPatchOperation, MoveToCustomResult, MovedRecord, OPFMoveToCustomError, PresentationStats, ReferenceFact, ResolvedDesignRecords, SLIDE_SCOPED_BUILTINS, SlideScopedBuiltin, SlideSizeFact, SlideStats, StatsOptions, StatsSlideRef, TableFact, copySlides, embed, moveToCustom, resolveDesignRecords, resolveFontScheme, resolveSlideVariables, sameRecord, stats, updateFromCatalog } from './index.js';
|
|
5
|
+
export { SpecFileEntry, SpecFileKind, SpecFilePath, specFileEntries, specFileKinds, specFilePaths } from './spec-files.js';
|
|
6
|
+
import { P as Presentation } from './presentation-fb8CZmRq.js';
|
|
7
|
+
export { Audience, ChartType, ColorScheme, FontScheme, Language, Layout, Narrative, Purpose, SocialPlatform, Theme, Tone } from './types.js';
|
|
8
|
+
export { C as CATALOG_GROUP_PATTERN, a as CATALOG_REFERENCE_PATTERN, b as Catalog, c as CatalogKind, d as CatalogOptions, e as CatalogRecordMap, f as CatalogRecords, g as CatalogReferenceSite, O as OPFCatalogsOptionError, h as OPFUnresolvedReferenceError, R as RecordProvenance, i as ResolvedReference, U as UnresolvedReferenceDiagnostic, j as catalogGroupSource, k as catalogKinds, l as catalogRecords, m as catalogReferenceSites, p as parseReference, r as resolveReference, u as unresolvedReference } from './catalog-refs-C4K4y-vh.js';
|
|
9
|
+
export { F as Finding, a as FindingCategory, b as FindingFix, c as FindingFocus, d as FindingLocation, e as FindingReport, f as FindingSeverity, g as FindingSuggestion, J as JsonPatchOperation, V as ValidationIssue } from './finding-CDQ_wH8j.js';
|
|
10
|
+
export { C as CHART_TYPES, a as ComposeSlideOptions, E as ENGINE_DEFAULT_CHART_TYPES, b as ENGINE_DEFAULT_COLOR_SCHEME, c as ENGINE_DEFAULT_FONT_SCHEME, d as ENGINE_DEFAULT_THEME, F as FontFamilies, e as Fonts, L as LANGUAGES, f as LanguageFamilyName, g as LanguageVocabulary, h as LayoutDiagnostic, M as MeasureTextWidth, S as SOCIAL_PLATFORMS, i as SocialPlatformVocabulary, T as TextMeasurement, j as TextStyle, n as normalizeLanguageFamily } from './composition-BbZ_9C-c.js';
|
|
11
|
+
export { C as CatalogDisplayKind, a as CatalogRecordKind, c as catalogDisplayKinds, b as catalogSchemaNames } from './catalog-schemas-g7RFQBdc.js';
|
|
12
|
+
export { O as OPFPaginationError, P as PaginatedPage, a as PaginationMapping, b as PaginationOptions, c as PaginationResult, d as PresentationPaginationOptions, e as PresentationPaginationResult, S as SlideContext, f as SlideContextDiagnostic, g as SlideContextOptions, p as paginate, h as paginateSlide, r as resolveSlideContext } from './pagination-BhX4M48Y.js';
|
|
13
|
+
export { ApplyPatchOptions, OPFPatchError, OPFPatchValidationError, PatchResult, applyPatch } from './patch.js';
|
|
14
|
+
export { DiffOptions, MergeConflict, MergeOptions, MergeResult, PresentationDiff, diff, merge } from './diff.js';
|
|
15
|
+
export { FormatOptions, OPFFormatError, format } from './format.js';
|
|
16
|
+
export { FromMarkdownOptions, FromMarkdownResult, OPFMarkdownError, ToMarkdownOptions, ToMarkdownResult, fromMarkdown, toMarkdown } from './markdown.js';
|
|
17
|
+
export { StringifyOptions, parse, stringify } from './deck.js';
|
|
18
|
+
export { DataCell, DataImportOptions, ImportDataOptions, ImportedChart, ImportedChartData, ImportedChartType, ImportedTable, OPFDataImportError, TabularData, importData, parseTabularData } from './data.js';
|
|
19
|
+
export { C as ChartComboSeries, 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';
|
|
20
|
+
export { FONT_POLICY, FontAvailability, FontAvailabilityCode, FontAvailabilityDiagnostic, FontLicenseClass, FontPolicyDecision, FontPolicyEntry, FontPolicyTable, FontReplacement, FontReplacementCompatibility, FontReplacementMeasurement, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor } from './font-policy.js';
|
|
21
|
+
import { C as ConvertInput, a as ConvertOptions, b as ConvertResult, c as ConvertFormat, O as OpenOptions, S as SaveOptions, d as SaveResult } from './conversion-SBpTOwdg.js';
|
|
22
|
+
export { e as ConvertedFile, E as ExportFormat, F as FontsHandle, f as OPFApiError, g as OPFExportError, h as OPFImportError } from './conversion-SBpTOwdg.js';
|
|
23
|
+
export { defaultCatalog } from './catalog.js';
|
|
24
|
+
export { D as DECK_FORMATS, a as DeckFormat, P as ParseOptions, d as deckFormatOf } from './deck-report-Bx3naFlF.js';
|
|
25
|
+
import './json-BFSdESOE.js';
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Convert a file, a deck or the bytes of a `.pptx` file. With an `output` path the format comes from its extension and the
|
|
29
|
+
* files are written: `.pdf`, `.pptx`, `.png` and `.svg` are exported (one PNG or SVG per slide, `slides/deck.png` giving
|
|
30
|
+
* `slides/deck-001.png`, ...; one selected slide is written to `output` itself), `.zip` is one archive of the slides (`format`
|
|
31
|
+
* `png`, the default, or `svg`), and `.opf.md`, `.yaml`/`.yml` or `.json` writes the deck in that form. Without an output path,
|
|
32
|
+
* pass `{ format }`: nothing is written and the files come back with their names and bytes.
|
|
33
|
+
*
|
|
34
|
+
* A `.pptx` input is imported first. Local images resolve next to the input file unless `assetDir` says otherwise; URLs are
|
|
35
|
+
* never fetched. Everything is produced before anything is written, and each file is written atomically, replacing an existing
|
|
36
|
+
* output (`overwrite: false` refuses one with `output-exists`, as the commands do without `--force`). Throws `OPFApiError` for the request and the files (`invalid-option`, `input-not-found`,
|
|
37
|
+
* `input-unreadable`, `invalid-presentation`, `output-exists`, `output-not-file`, `output-unwritable`), `OPFImportError` for the
|
|
38
|
+
* import step and `OPFExportError` for the export step (`peer-not-installed`, `peer-too-old`, `peer-load-failed`,
|
|
39
|
+
* `invalid-presentation`, `no-slides`, `all-slides-hidden`, `export-failed`, `import-failed`).
|
|
40
|
+
*/
|
|
41
|
+
declare function convert(input: ConvertInput, output: string, options?: ConvertOptions): Promise<ConvertResult>;
|
|
42
|
+
declare function convert(input: ConvertInput, options: ConvertOptions & {
|
|
43
|
+
format: ConvertFormat;
|
|
44
|
+
}): Promise<ConvertResult>;
|
|
45
|
+
/**
|
|
46
|
+
* Open a deck: a `.opf.md`, `.yaml`/`.yml` or `.json` file (the form named by the extension), or a PowerPoint file (a `.pptx`
|
|
47
|
+
* path or its bytes), imported. Returns the presentation. A deck file that fails the format and references check throws
|
|
48
|
+
* `OPFValidationError` (its findings located by line and column in the file); a PowerPoint file that cannot be imported throws
|
|
49
|
+
* `OPFImportError`; a missing file throws `OPFApiError` `input-not-found`. Warnings are not returned: `validate` reports them,
|
|
50
|
+
* and `convert("deck.pptx", "deck.opf.yaml")` returns what an import could not keep.
|
|
51
|
+
*/
|
|
52
|
+
declare function open(input: string | Uint8Array | ArrayBuffer, options?: OpenOptions): Promise<Presentation>;
|
|
53
|
+
/**
|
|
54
|
+
* Save a deck in the form its file name names (`.opf.md`, `.yaml`/`.yml` or `.json`), atomically, creating folders, replacing
|
|
55
|
+
* the file. It is checked for format and references first and an invalid deck is refused with `OPFValidationError`;
|
|
56
|
+
* `validate: false` writes work in progress, as an editor's autosave does. Returns `{ path, format }`.
|
|
57
|
+
*/
|
|
58
|
+
declare function save(deck: Presentation, path: string, options?: SaveOptions): Promise<SaveResult>;
|
|
59
|
+
|
|
60
|
+
export { ConvertFormat, ConvertInput, ConvertOptions, ConvertResult, OpenOptions, Presentation, SaveOptions, SaveResult, convert, open, save };
|
package/dist/node.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { convertFiles, OPFApiError, openDeck, saveDeck, asApiError } from './chunk-IPW5BS3X.js';
|
|
2
|
+
export { OPFApiError, OPFExportError, OPFImportError } from './chunk-IPW5BS3X.js';
|
|
3
|
+
export { OPFMoveToCustomError, copySlides, embed, moveToCustom, sameRecord, stats, updateFromCatalog } from './chunk-WWYWFVOI.js';
|
|
4
|
+
export { specFileEntries, specFileKinds, specFilePaths } from './chunk-HXHOZ7AH.js';
|
|
5
|
+
export { OPFDataImportError, importData, parseTabularData } from './chunk-O263APNI.js';
|
|
6
|
+
export { defaultCatalog } from './chunk-WCG3THTD.js';
|
|
7
|
+
export { DECK_FORMATS, deckFormatOf, parse, stringify } from './chunk-N4EVOFEA.js';
|
|
8
|
+
export { fromMarkdown, toMarkdown } from './chunk-BIC3SWPK.js';
|
|
9
|
+
import './chunk-TCD2FB2K.js';
|
|
10
|
+
export { OPFMarkdownError } from './chunk-IS5H5JKH.js';
|
|
11
|
+
export { diff, merge } from './chunk-M4UR3NPN.js';
|
|
12
|
+
export { OPFPatchError, OPFPatchValidationError, applyPatch } from './chunk-O3CVNJTL.js';
|
|
13
|
+
export { OPFFormatError, format } from './chunk-YT7FMQER.js';
|
|
14
|
+
export { OPFPaginationError, paginate, paginateSlide } from './chunk-O2CX5NEH.js';
|
|
15
|
+
import './chunk-ESRYBYLY.js';
|
|
16
|
+
import './chunk-PPROJP2E.js';
|
|
17
|
+
import { OPFValidationError } from './chunk-NLNYNBTS.js';
|
|
18
|
+
export { DEFAULT_CHART_PALETTE, DEFAULT_VALIDATION_THRESHOLDS, OPFValidationError, assertValid, assertValidCatalogRecord, findValidationRule, resolveSlideContext, validate, validateCatalogRecord, validationCategories, validationRules } from './chunk-NLNYNBTS.js';
|
|
19
|
+
export { CHART_TYPES, DEFAULT_VARIABLE_DATE_FORMAT, ENGINE_DEFAULT_CHART_TYPES, ENGINE_DEFAULT_COLOR_SCHEME, ENGINE_DEFAULT_FONT_SCHEME, ENGINE_DEFAULT_THEME, LANGUAGES, OPFVariableError, SLIDE_SCOPED_BUILTINS, SOCIAL_PLATFORMS, VARIABLE_KINDS, chartNumber, coerceVariableValue, datasetDiagnostics, formatDataNumber, formatVariableNumber, fromExcelNumberFormat, hasContentVariables, inlineChartData, inlineDatasets, inlineTableData, isDatasetRef, isTemplate, isXYChartType, listBuiltinVariables, listVariables, normalizeLanguageFamily, numberFormatError, resolveChartData, resolveDesignRecords, resolveFontScheme, resolveSlideVariables, resolveTableData, resolveVariables, suggestChartNumberFix, tableCellDisplayValue, toExcelNumberFormat, unusedDatasets, variableDeclarations } from './chunk-CW7GEAV3.js';
|
|
20
|
+
export { catalogDisplayKinds, catalogSchemaNames } from './chunk-TRDXRRQK.js';
|
|
21
|
+
export { CATALOG_GROUP_PATTERN, CATALOG_REFERENCE_PATTERN, OPFCatalogsOptionError, OPFUnresolvedReferenceError, catalogGroupSource, catalogKinds, catalogRecords, catalogReferenceSites, parseReference, resolveReference, unresolvedReference } from './chunk-SPFV27O5.js';
|
|
22
|
+
export { audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './chunk-RA64UQKI.js';
|
|
23
|
+
export { FONT_POLICY, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor } from './chunk-WXSPETQ6.js';
|
|
24
|
+
|
|
25
|
+
// src/node.ts
|
|
26
|
+
var rethrow = (error, fallback) => {
|
|
27
|
+
if (error instanceof OPFValidationError) throw error;
|
|
28
|
+
throw asApiError(OPFApiError, error, fallback);
|
|
29
|
+
};
|
|
30
|
+
async function convert(input, output, options = {}) {
|
|
31
|
+
try {
|
|
32
|
+
if (output !== null && typeof output === "object") return await convertFiles(input, void 0, output);
|
|
33
|
+
if (typeof output !== "string") throw new OPFApiError("convert takes an output file path, or options with a format.", "invalid-option");
|
|
34
|
+
return await convertFiles(input, output, options);
|
|
35
|
+
} catch (error) {
|
|
36
|
+
return rethrow(error, "convert-failed");
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
async function open(input, options = {}) {
|
|
40
|
+
try {
|
|
41
|
+
return await openDeck(input, options);
|
|
42
|
+
} catch (error) {
|
|
43
|
+
return rethrow(error, "input-unreadable");
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
async function save(deck, path, options = {}) {
|
|
47
|
+
try {
|
|
48
|
+
return await saveDeck(deck, path, options);
|
|
49
|
+
} catch (error) {
|
|
50
|
+
return rethrow(error, "output-unwritable");
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { convert, open, save };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { U as UnresolvedReferenceDiagnostic, R as RecordProvenance,
|
|
1
|
+
import { a as ComposeSlideOptions, e as Fonts, h as LayoutDiagnostic } from './composition-BbZ_9C-c.js';
|
|
2
|
+
import { U as UnresolvedReferenceDiagnostic, R as RecordProvenance, d as CatalogOptions, b as Catalog } from './catalog-refs-C4K4y-vh.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* One slide's composition context: the layout, canvas, theme and font families that `composeSlide` needs,
|
|
@@ -15,7 +15,7 @@ interface SlideContextOptions extends CatalogOptions {
|
|
|
15
15
|
fonts?: Fonts;
|
|
16
16
|
/** One-based displayed slide number. Default: index + 1. */
|
|
17
17
|
slideNumber?: number;
|
|
18
|
-
/** Displayed slide count for `{
|
|
18
|
+
/** Displayed slide count for `{{deck.slideCount}}`. Default: the deck's slide count. */
|
|
19
19
|
slideCount?: number;
|
|
20
20
|
/** Host-supplied current calendar date (ISO YYYY-MM-DD) for `date: true` header/footer fields. */
|
|
21
21
|
date?: string;
|
|
@@ -23,6 +23,13 @@ interface SlideContextOptions extends CatalogOptions {
|
|
|
23
23
|
strictReferences?: boolean;
|
|
24
24
|
}
|
|
25
25
|
interface SlideContext {
|
|
26
|
+
/**
|
|
27
|
+
* The slide to compose and draw: slide `index` with `{{slide.number}}`, `{{slide.section}}` and
|
|
28
|
+
* `{{deck.slideCount}}` substituted (`resolveSlideVariables`) for `options.slideNumber` and `options.slideCount`.
|
|
29
|
+
* Its own header and footer text keeps the tokens: `layoutFurniture` substitutes them and marks each slide number
|
|
30
|
+
* as a live field. The source slide object itself when it carries no slide-scoped token.
|
|
31
|
+
*/
|
|
32
|
+
slide: Rec;
|
|
26
33
|
/** Ready for `composeSlide(slide, options)`. */
|
|
27
34
|
options: ComposeSlideOptions;
|
|
28
35
|
diagnostics: SlideContextDiagnostic[];
|
|
@@ -49,16 +56,23 @@ interface SlideContext {
|
|
|
49
56
|
};
|
|
50
57
|
}
|
|
51
58
|
/**
|
|
52
|
-
* Resolve slide `index` of `presentation` into the options `composeSlide` takes
|
|
53
|
-
*
|
|
54
|
-
*
|
|
59
|
+
* Resolve slide `index` of `presentation` into the slide and the options `composeSlide` takes: engines compose and draw
|
|
60
|
+
* `composeSlide(context.slide, context.options)`, so the slide-scoped built-ins carry the same number and count as the
|
|
61
|
+
* header and footer. Never throws for an unresolved reference unless `strictReferences` is set: the engine default (or
|
|
62
|
+
* automatic composition, for a layout) applies and `diagnostics` holds one `unresolved-reference` per reference. Throws a RangeError for an index outside the deck or
|
|
55
63
|
* non-positive canvas dimensions, which a schema-valid deck cannot have.
|
|
56
64
|
*/
|
|
57
65
|
declare function resolveSlideContext(presentation: unknown, index: number, options?: SlideContextOptions): SlideContext;
|
|
58
66
|
|
|
59
67
|
interface PaginationOptions extends Omit<ComposeSlideOptions, 'textMeasurement'> {
|
|
60
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* The fonts handle: page breaks are chosen with its `textMeasurement`. Without it core uses its portable estimate. With
|
|
70
|
+
* `presentation`, a measurement that plans scripts (`forScripts`) measures each script run in the slide's script fonts,
|
|
71
|
+
* as the engines do.
|
|
72
|
+
*/
|
|
61
73
|
fonts?: Fonts;
|
|
74
|
+
/** Registered catalogs, for resolving the slide's script fonts when `presentation` is given. `paginate` passes its own. */
|
|
75
|
+
catalogs?: readonly Catalog[];
|
|
62
76
|
/** Readability floor used while choosing page breaks. Default 24 reference pixels. */
|
|
63
77
|
minFontSize?: number;
|
|
64
78
|
/** All-or-nothing resource limit. Defaults to 100 output slides. */
|
package/dist/pagination.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './composition-
|
|
2
|
-
import './catalog-refs-
|
|
3
|
-
export { O as OPFPaginationError, P as PaginatedPage, a as PaginationMapping, b as PaginationOptions, c as PaginationResult, d as PresentationPaginationOptions, e as PresentationPaginationResult, p as paginate, h as paginateSlide } from './pagination-
|
|
4
|
-
import './chart-data-
|
|
1
|
+
import './composition-BbZ_9C-c.js';
|
|
2
|
+
import './catalog-refs-C4K4y-vh.js';
|
|
3
|
+
export { O as OPFPaginationError, P as PaginatedPage, a as PaginationMapping, b as PaginationOptions, c as PaginationResult, d as PresentationPaginationOptions, e as PresentationPaginationResult, p as paginate, h as paginateSlide } from './pagination-BhX4M48Y.js';
|
|
4
|
+
import './chart-data-DTxdRRT1.js';
|
package/dist/pagination.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { OPFPaginationError, paginate, paginateSlide } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { OPFPaginationError, paginate, paginateSlide } from './chunk-O2CX5NEH.js';
|
|
2
|
+
import './chunk-NLNYNBTS.js';
|
|
3
|
+
import './chunk-CW7GEAV3.js';
|
|
4
4
|
import './chunk-TRDXRRQK.js';
|
|
5
5
|
import './chunk-SPFV27O5.js';
|
|
6
|
-
import './chunk-
|
|
6
|
+
import './chunk-RA64UQKI.js';
|
package/dist/patch.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { e as FindingReport, F as Finding, J as JsonPatchOperation } from './finding-CDQ_wH8j.js';
|
|
2
2
|
|
|
3
3
|
type JsonPointer = string;
|
|
4
4
|
type PatchErrorCode = "invalid-patch" | "invalid-patch-operation" | "unsupported-patch-operation" | "invalid-json-pointer" | "patch-path-missing" | "patch-parent-missing" | "invalid-array-index" | "patch-test-failed" | "patch-invalid-move" | "patch-root-remove" | "patch-invalid-document";
|
package/dist/patch.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { OPFPatchError, OPFPatchValidationError, applyPatch, applyPatchWithInverse, escapePointerToken, formatPointer, getAtPointer, hasPointer, invertPatch, jsonEqual, normalizePatch, parsePointer, pointerFromPath, readPointer, splitPointer, unescapePointerToken } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { OPFPatchError, OPFPatchValidationError, applyPatch, applyPatchWithInverse, escapePointerToken, formatPointer, getAtPointer, hasPointer, invertPatch, jsonEqual, normalizePatch, parsePointer, pointerFromPath, readPointer, splitPointer, unescapePointerToken } from './chunk-O3CVNJTL.js';
|
|
2
|
+
import './chunk-NLNYNBTS.js';
|
|
3
|
+
import './chunk-CW7GEAV3.js';
|
|
4
4
|
import './chunk-TRDXRRQK.js';
|
|
5
5
|
import './chunk-SPFV27O5.js';
|
|
6
|
-
import './chunk-
|
|
6
|
+
import './chunk-RA64UQKI.js';
|
|
@@ -631,11 +631,11 @@ interface Presentation {
|
|
|
631
631
|
*/
|
|
632
632
|
filename?: string;
|
|
633
633
|
/**
|
|
634
|
-
* Organization associated with the presentation, usually the presenting company. Array form supports hosts, partners, clients, and sponsors. The primary organization (Organization.role 'primary', else the first item) supplies the default deck logo, the '
|
|
634
|
+
* Organization associated with the presentation, usually the presenting company. Array form supports hosts, partners, clients, and sponsors. The primary organization (Organization.role 'primary', else the first item) supplies the default deck logo, the 'socials' header/footer field and the 'organization.<field>' built-in variables; the others are available by id as 'organization.<id>.<field>' and are not drawn automatically.
|
|
635
635
|
*/
|
|
636
636
|
organization?: (Organization | [Organization, ...(Organization)[]]);
|
|
637
637
|
/**
|
|
638
|
-
* Person presenting the deck. Array form supports panels and multi-speaker decks. The first speaker is the primary speaker: the built-in variables 'speaker.<field>'
|
|
638
|
+
* Person presenting the deck. Array form supports panels and multi-speaker decks. The first speaker is the primary speaker: the built-in variables 'speaker.<field>' read it, 'speakers' lists every name, and 'speaker.<id>.<field>' addresses one by id. A speaker is drawn nowhere else.
|
|
639
639
|
*/
|
|
640
640
|
speaker?: (Speaker | [Speaker, ...(Speaker)[]]);
|
|
641
641
|
/**
|
|
@@ -718,7 +718,7 @@ interface Presentation {
|
|
|
718
718
|
};
|
|
719
719
|
}
|
|
720
720
|
/**
|
|
721
|
-
* An organization associated with the presentation, typically the presenting company, but also hosts, partners, clients, or sponsors. The primary organization (role 'primary', else the first one) supplies the default deck logo (unless design.logo overrides it)
|
|
721
|
+
* An organization associated with the presentation, typically the presenting company, but also hosts, partners, clients, or sponsors. The primary organization (role 'primary', else the first one) supplies the default deck logo (unless design.logo overrides it) and the 'socials' header/footer field (its socials). Every field is also a built-in variable ('{{organization.name}}', 'var:organization.logo', 'organization.<id>.<field>'). Nothing else about an organization is drawn automatically. See docs/templates-and-variables.md.
|
|
722
722
|
*
|
|
723
723
|
* This interface was referenced by `Presentation`'s JSON-Schema
|
|
724
724
|
* via the `definition` "Organization".
|
|
@@ -729,7 +729,7 @@ interface Organization {
|
|
|
729
729
|
*/
|
|
730
730
|
id: string;
|
|
731
731
|
/**
|
|
732
|
-
* Display name.
|
|
732
|
+
* Display name. The built-in variable 'organization.name' (primary organization) or 'organization.<id>.name' carries it into any string, such as a header or footer text of '{{organization.name}}'.
|
|
733
733
|
*/
|
|
734
734
|
name: string;
|
|
735
735
|
/**
|
|
@@ -778,7 +778,7 @@ interface Organization {
|
|
|
778
778
|
*/
|
|
779
779
|
tagline?: string;
|
|
780
780
|
/**
|
|
781
|
-
* Role of the organization relative to the presentation. Only 'primary' has behavior: it selects the primary organization (deck logo,
|
|
781
|
+
* Role of the organization relative to the presentation. Only 'primary' has behavior: it selects the primary organization (deck logo, the 'socials' header/footer field, and the 'organization.<field>' built-ins). When no organization has role 'primary', the first one is primary. 'partner', 'client', 'sponsor' and 'host' are descriptive labels that change nothing.
|
|
782
782
|
*/
|
|
783
783
|
role?: ("primary" | "partner" | "client" | "sponsor" | "host");
|
|
784
784
|
socials?: Socials;
|
|
@@ -794,7 +794,7 @@ interface Socials {
|
|
|
794
794
|
[k: string]: string;
|
|
795
795
|
}
|
|
796
796
|
/**
|
|
797
|
-
* A person presenting the deck. A speaker is drawn only through built-in variables ('{{speaker.name}}' inside any string, 'var:speaker.photo' as a whole image field)
|
|
797
|
+
* A person presenting the deck. A speaker is drawn only through built-in variables ('{{speaker.name}}' inside any string, a header or footer text included, and 'var:speaker.photo' as a whole image field). No layout, cover or bio slide places a speaker on its own. See docs/templates-and-variables.md.
|
|
798
798
|
*
|
|
799
799
|
* This interface was referenced by `Presentation`'s JSON-Schema
|
|
800
800
|
* via the `definition` "Speaker".
|
|
@@ -805,11 +805,11 @@ interface Speaker {
|
|
|
805
805
|
*/
|
|
806
806
|
id: string;
|
|
807
807
|
/**
|
|
808
|
-
* Display name. Built-in variable 'speaker.name' (first speaker) or 'speaker.<id>.name';
|
|
808
|
+
* Display name. Built-in variable 'speaker.name' (first speaker) or 'speaker.<id>.name'; every name is listed by 'speakers'.
|
|
809
809
|
*/
|
|
810
810
|
name: string;
|
|
811
811
|
/**
|
|
812
|
-
* Role or title. Built-in variable 'speaker.title'
|
|
812
|
+
* Role or title. Built-in variable 'speaker.title' (or 'speaker.<id>.title'), for example in a footer text of '{{speaker.name}}, {{speaker.title}}'.
|
|
813
813
|
*/
|
|
814
814
|
title?: string;
|
|
815
815
|
/**
|
|
@@ -1735,7 +1735,7 @@ interface HeaderFooterItem {
|
|
|
1735
1735
|
*/
|
|
1736
1736
|
logo?: boolean;
|
|
1737
1737
|
/**
|
|
1738
|
-
*
|
|
1738
|
+
* Text rendered in this zone. Variables resolve inside it like any string: deck-wide ones ('{{organization.name}}', '{{speaker.name}}, {{speaker.title}}', '{{customer}}') before composition, and the slide-scoped built-ins '{{slide.number}}', '{{slide.section}}' and '{{deck.slideCount}}' for each slide as it is laid out. Each '{{slide.number}}' is a live slide-number field: PPTX export writes it as a native field when its value fits within one accepted text line, and as static text with a diagnostic otherwise. '{{deck.slideCount}}' is fixed text, because PowerPoint has no slide-count field. Write '\{{' for literal braces.
|
|
1739
1739
|
*/
|
|
1740
1740
|
text?: string;
|
|
1741
1741
|
/**
|
|
@@ -1763,14 +1763,6 @@ interface HeaderFooterItem {
|
|
|
1763
1763
|
*/
|
|
1764
1764
|
mediaType?: string;
|
|
1765
1765
|
});
|
|
1766
|
-
/**
|
|
1767
|
-
* Whether to render the current slide number in this zone. PPTX export writes a native slide-number field when its value fits within one accepted text line; a value split across lines exports as static text with a diagnostic.
|
|
1768
|
-
*/
|
|
1769
|
-
slideNumber?: boolean;
|
|
1770
|
-
/**
|
|
1771
|
-
* Template for the slide number when slideNumber is true. {current} is the displayed slide number (a native PPTX field when its value fits within one accepted text line); {total} is the number of slides in the rendered or exported deck, written as fixed text because PowerPoint has no slide-count field. Other characters are literal. Defaults to "{current}".
|
|
1772
|
-
*/
|
|
1773
|
-
slideNumberFormat?: string;
|
|
1774
1766
|
/**
|
|
1775
1767
|
* true renders the current date: the renderer or exporter must be given an explicit ISO date by its host (core never reads a clock). PPTX export writes a native date field only for a supported dateFormat whose complete value fits within one accepted text line; otherwise it writes static text with a diagnostic. Native PowerPoint refresh and save/reopen compatibility require separate verification. A string is fixed: with dateFormat it must be an ISO YYYY-MM-DD date and is formatted; without dateFormat it is literal text rendered as written.
|
|
1776
1768
|
*/
|
|
@@ -1779,23 +1771,10 @@ interface HeaderFooterItem {
|
|
|
1779
1771
|
* Date pattern for date. Tokens: yyyy (2026), yy (26), MMMM (April), MMM (Apr), MM (04), M (4), dd (09), d (9), EEEE (Thursday), EEE (Thu). Text in single quotes and other non-letter characters are literal. Month and weekday names are English, independent of host locale. Defaults to "M/d/yyyy" for a current date. PPTX export writes a native current-date field only when its complete value fits within one accepted text line and the pattern matches a PowerPoint en-US date field ('M/d/yyyy'; 'EEEE, MMMM d, yyyy'; 'd MMMM yyyy'; 'MMMM d, yyyy'; 'd-MMM-yy'; 'MMMM yy'; 'MMM-yy'). Other patterns and wrapped fields export as static text with a diagnostic. Full provenance can recover generated-date intent from unchanged supported wrapped dates on OPF reimport; the existing PPTX text remains static.
|
|
1780
1772
|
*/
|
|
1781
1773
|
dateFormat?: string;
|
|
1782
|
-
/**
|
|
1783
|
-
* Whether to render the primary organization's name from organization (role 'primary', else the first organization).
|
|
1784
|
-
*/
|
|
1785
|
-
organization?: boolean;
|
|
1786
|
-
/**
|
|
1787
|
-
* Whether to render the primary (first) speaker's name and title from speaker, joined as 'Ada Lovelace, CTO' (just the name when the speaker has no title). It is generated text: without a named speaker the engine reports unresolved-content at this field. PPTX export writes it as static text and import restores the flag from the file's furniture provenance.
|
|
1788
|
-
*/
|
|
1789
|
-
speaker?: boolean;
|
|
1790
|
-
/**
|
|
1791
|
-
* Whether to render the current slide section label.
|
|
1792
|
-
*/
|
|
1793
|
-
section?: boolean;
|
|
1794
1774
|
/**
|
|
1795
1775
|
* Whether to render the primary organization's social profiles from organization.socials, one line per platform in key order. A handle is formatted through the platform's socialPlatforms record (companyUrlPattern, else profileUrlPattern, else baseUrl, with handlePrefix stripped) and shown as that profile URL without its 'https://' scheme; a value that is already a URL is shown without an 'https://' scheme; an unknown platform key shows the raw value. Exporters link each line to its full URL when one exists. Speaker socials are not rendered by this field.
|
|
1796
1776
|
*/
|
|
1797
1777
|
socials?: boolean;
|
|
1798
|
-
[k: string]: unknown;
|
|
1799
1778
|
}
|
|
1800
1779
|
/**
|
|
1801
1780
|
* Centered header/footer content.
|
|
@@ -1806,7 +1785,7 @@ interface HeaderFooterItem1 {
|
|
|
1806
1785
|
*/
|
|
1807
1786
|
logo?: boolean;
|
|
1808
1787
|
/**
|
|
1809
|
-
*
|
|
1788
|
+
* Text rendered in this zone. Variables resolve inside it like any string: deck-wide ones ('{{organization.name}}', '{{speaker.name}}, {{speaker.title}}', '{{customer}}') before composition, and the slide-scoped built-ins '{{slide.number}}', '{{slide.section}}' and '{{deck.slideCount}}' for each slide as it is laid out. Each '{{slide.number}}' is a live slide-number field: PPTX export writes it as a native field when its value fits within one accepted text line, and as static text with a diagnostic otherwise. '{{deck.slideCount}}' is fixed text, because PowerPoint has no slide-count field. Write '\{{' for literal braces.
|
|
1810
1789
|
*/
|
|
1811
1790
|
text?: string;
|
|
1812
1791
|
/**
|
|
@@ -1834,14 +1813,6 @@ interface HeaderFooterItem1 {
|
|
|
1834
1813
|
*/
|
|
1835
1814
|
mediaType?: string;
|
|
1836
1815
|
});
|
|
1837
|
-
/**
|
|
1838
|
-
* Whether to render the current slide number in this zone. PPTX export writes a native slide-number field when its value fits within one accepted text line; a value split across lines exports as static text with a diagnostic.
|
|
1839
|
-
*/
|
|
1840
|
-
slideNumber?: boolean;
|
|
1841
|
-
/**
|
|
1842
|
-
* Template for the slide number when slideNumber is true. {current} is the displayed slide number (a native PPTX field when its value fits within one accepted text line); {total} is the number of slides in the rendered or exported deck, written as fixed text because PowerPoint has no slide-count field. Other characters are literal. Defaults to "{current}".
|
|
1843
|
-
*/
|
|
1844
|
-
slideNumberFormat?: string;
|
|
1845
1816
|
/**
|
|
1846
1817
|
* true renders the current date: the renderer or exporter must be given an explicit ISO date by its host (core never reads a clock). PPTX export writes a native date field only for a supported dateFormat whose complete value fits within one accepted text line; otherwise it writes static text with a diagnostic. Native PowerPoint refresh and save/reopen compatibility require separate verification. A string is fixed: with dateFormat it must be an ISO YYYY-MM-DD date and is formatted; without dateFormat it is literal text rendered as written.
|
|
1847
1818
|
*/
|
|
@@ -1850,23 +1821,10 @@ interface HeaderFooterItem1 {
|
|
|
1850
1821
|
* Date pattern for date. Tokens: yyyy (2026), yy (26), MMMM (April), MMM (Apr), MM (04), M (4), dd (09), d (9), EEEE (Thursday), EEE (Thu). Text in single quotes and other non-letter characters are literal. Month and weekday names are English, independent of host locale. Defaults to "M/d/yyyy" for a current date. PPTX export writes a native current-date field only when its complete value fits within one accepted text line and the pattern matches a PowerPoint en-US date field ('M/d/yyyy'; 'EEEE, MMMM d, yyyy'; 'd MMMM yyyy'; 'MMMM d, yyyy'; 'd-MMM-yy'; 'MMMM yy'; 'MMM-yy'). Other patterns and wrapped fields export as static text with a diagnostic. Full provenance can recover generated-date intent from unchanged supported wrapped dates on OPF reimport; the existing PPTX text remains static.
|
|
1851
1822
|
*/
|
|
1852
1823
|
dateFormat?: string;
|
|
1853
|
-
/**
|
|
1854
|
-
* Whether to render the primary organization's name from organization (role 'primary', else the first organization).
|
|
1855
|
-
*/
|
|
1856
|
-
organization?: boolean;
|
|
1857
|
-
/**
|
|
1858
|
-
* Whether to render the primary (first) speaker's name and title from speaker, joined as 'Ada Lovelace, CTO' (just the name when the speaker has no title). It is generated text: without a named speaker the engine reports unresolved-content at this field. PPTX export writes it as static text and import restores the flag from the file's furniture provenance.
|
|
1859
|
-
*/
|
|
1860
|
-
speaker?: boolean;
|
|
1861
|
-
/**
|
|
1862
|
-
* Whether to render the current slide section label.
|
|
1863
|
-
*/
|
|
1864
|
-
section?: boolean;
|
|
1865
1824
|
/**
|
|
1866
1825
|
* Whether to render the primary organization's social profiles from organization.socials, one line per platform in key order. A handle is formatted through the platform's socialPlatforms record (companyUrlPattern, else profileUrlPattern, else baseUrl, with handlePrefix stripped) and shown as that profile URL without its 'https://' scheme; a value that is already a URL is shown without an 'https://' scheme; an unknown platform key shows the raw value. Exporters link each line to its full URL when one exists. Speaker socials are not rendered by this field.
|
|
1867
1826
|
*/
|
|
1868
1827
|
socials?: boolean;
|
|
1869
|
-
[k: string]: unknown;
|
|
1870
1828
|
}
|
|
1871
1829
|
/**
|
|
1872
1830
|
* Right-aligned header/footer content.
|
|
@@ -1877,7 +1835,7 @@ interface HeaderFooterItem2 {
|
|
|
1877
1835
|
*/
|
|
1878
1836
|
logo?: boolean;
|
|
1879
1837
|
/**
|
|
1880
|
-
*
|
|
1838
|
+
* Text rendered in this zone. Variables resolve inside it like any string: deck-wide ones ('{{organization.name}}', '{{speaker.name}}, {{speaker.title}}', '{{customer}}') before composition, and the slide-scoped built-ins '{{slide.number}}', '{{slide.section}}' and '{{deck.slideCount}}' for each slide as it is laid out. Each '{{slide.number}}' is a live slide-number field: PPTX export writes it as a native field when its value fits within one accepted text line, and as static text with a diagnostic otherwise. '{{deck.slideCount}}' is fixed text, because PowerPoint has no slide-count field. Write '\{{' for literal braces.
|
|
1881
1839
|
*/
|
|
1882
1840
|
text?: string;
|
|
1883
1841
|
/**
|
|
@@ -1905,14 +1863,6 @@ interface HeaderFooterItem2 {
|
|
|
1905
1863
|
*/
|
|
1906
1864
|
mediaType?: string;
|
|
1907
1865
|
});
|
|
1908
|
-
/**
|
|
1909
|
-
* Whether to render the current slide number in this zone. PPTX export writes a native slide-number field when its value fits within one accepted text line; a value split across lines exports as static text with a diagnostic.
|
|
1910
|
-
*/
|
|
1911
|
-
slideNumber?: boolean;
|
|
1912
|
-
/**
|
|
1913
|
-
* Template for the slide number when slideNumber is true. {current} is the displayed slide number (a native PPTX field when its value fits within one accepted text line); {total} is the number of slides in the rendered or exported deck, written as fixed text because PowerPoint has no slide-count field. Other characters are literal. Defaults to "{current}".
|
|
1914
|
-
*/
|
|
1915
|
-
slideNumberFormat?: string;
|
|
1916
1866
|
/**
|
|
1917
1867
|
* true renders the current date: the renderer or exporter must be given an explicit ISO date by its host (core never reads a clock). PPTX export writes a native date field only for a supported dateFormat whose complete value fits within one accepted text line; otherwise it writes static text with a diagnostic. Native PowerPoint refresh and save/reopen compatibility require separate verification. A string is fixed: with dateFormat it must be an ISO YYYY-MM-DD date and is formatted; without dateFormat it is literal text rendered as written.
|
|
1918
1868
|
*/
|
|
@@ -1921,23 +1871,10 @@ interface HeaderFooterItem2 {
|
|
|
1921
1871
|
* Date pattern for date. Tokens: yyyy (2026), yy (26), MMMM (April), MMM (Apr), MM (04), M (4), dd (09), d (9), EEEE (Thursday), EEE (Thu). Text in single quotes and other non-letter characters are literal. Month and weekday names are English, independent of host locale. Defaults to "M/d/yyyy" for a current date. PPTX export writes a native current-date field only when its complete value fits within one accepted text line and the pattern matches a PowerPoint en-US date field ('M/d/yyyy'; 'EEEE, MMMM d, yyyy'; 'd MMMM yyyy'; 'MMMM d, yyyy'; 'd-MMM-yy'; 'MMMM yy'; 'MMM-yy'). Other patterns and wrapped fields export as static text with a diagnostic. Full provenance can recover generated-date intent from unchanged supported wrapped dates on OPF reimport; the existing PPTX text remains static.
|
|
1922
1872
|
*/
|
|
1923
1873
|
dateFormat?: string;
|
|
1924
|
-
/**
|
|
1925
|
-
* Whether to render the primary organization's name from organization (role 'primary', else the first organization).
|
|
1926
|
-
*/
|
|
1927
|
-
organization?: boolean;
|
|
1928
|
-
/**
|
|
1929
|
-
* Whether to render the primary (first) speaker's name and title from speaker, joined as 'Ada Lovelace, CTO' (just the name when the speaker has no title). It is generated text: without a named speaker the engine reports unresolved-content at this field. PPTX export writes it as static text and import restores the flag from the file's furniture provenance.
|
|
1930
|
-
*/
|
|
1931
|
-
speaker?: boolean;
|
|
1932
|
-
/**
|
|
1933
|
-
* Whether to render the current slide section label.
|
|
1934
|
-
*/
|
|
1935
|
-
section?: boolean;
|
|
1936
1874
|
/**
|
|
1937
1875
|
* Whether to render the primary organization's social profiles from organization.socials, one line per platform in key order. A handle is formatted through the platform's socialPlatforms record (companyUrlPattern, else profileUrlPattern, else baseUrl, with handlePrefix stripped) and shown as that profile URL without its 'https://' scheme; a value that is already a URL is shown without an 'https://' scheme; an unknown platform key shows the raw value. Exporters link each line to its full URL when one exists. Speaker socials are not rendered by this field.
|
|
1938
1876
|
*/
|
|
1939
1877
|
socials?: boolean;
|
|
1940
|
-
[k: string]: unknown;
|
|
1941
1878
|
}
|
|
1942
1879
|
/**
|
|
1943
1880
|
* Optional named variables: deck colors referenced as 'var:<id>' (the original use), and typed content variables (text, number, date, image, url, list) referenced inline as '{{<id>}}' or whole as 'var:<id>'. Variables are what makes a deck a fillable template when combined with 'template': true. Color variables complement the color scheme: scheme slots and roles stay the primary vocabulary; variables cover deck-specific named colors that have no scheme slot. Built-in variables ('{{speaker.name}}', 'var:organization.logo', 'deck.name', ...) need no declaration; see Variables.
|
|
@@ -2431,7 +2368,7 @@ interface Slide {
|
|
|
2431
2368
|
*/
|
|
2432
2369
|
notes?: string;
|
|
2433
2370
|
/**
|
|
2434
|
-
* PowerPoint-style slide section label. Consecutive slides with the same value belong to the same section in presenter view, outlines, and PowerPoint section-aware exports.
|
|
2371
|
+
* PowerPoint-style slide section label. Consecutive slides with the same value belong to the same section in presenter view, outlines, and PowerPoint section-aware exports. Also the slide-scoped built-in variable '{{slide.section}}', for example in a header text.
|
|
2435
2372
|
*/
|
|
2436
2373
|
section?: string;
|
|
2437
2374
|
/**
|