@openpresentation/opf 0.20.4 → 0.21.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/dist/browser.js +16 -16
- package/dist/{chunk-Z75YB54S.js → chunk-2X4ZG2CN.js} +5 -5
- package/dist/{chunk-WD4W7KKK.js → chunk-6UBIR2U3.js} +54 -11
- package/dist/{chunk-DYGYMBBW.js → chunk-7YFMWEPQ.js} +2 -2
- package/dist/{chunk-7PQZDC2H.js → chunk-ARLOTG23.js} +1 -1
- package/dist/{chunk-VFMHM2IL.js → chunk-BWWGYOOG.js} +22 -0
- package/dist/{chunk-IDMQWS6O.js → chunk-D2XIDBUB.js} +6 -6
- package/dist/{chunk-5SQ6CIWR.js → chunk-D7WZVSNV.js} +5 -5
- package/dist/{chunk-OIGCC6VA.js → chunk-EFICNDGV.js} +2 -2
- package/dist/{chunk-YOLDSF7U.js → chunk-THEUCQZZ.js} +1 -1
- package/dist/{chunk-S4FR7ATF.js → chunk-U55BQQKU.js} +1 -1
- package/dist/{chunk-V66KJA3H.js → chunk-VLFDWV7L.js} +1 -1
- package/dist/{chunk-52GKVP3I.js → chunk-W62CX2WG.js} +22 -12
- package/dist/{chunk-URUNMZFO.js → chunk-WZPFIPOO.js} +2 -2
- package/dist/{chunk-XAYMPBNE.js → chunk-X6SB52RP.js} +333 -149
- package/dist/{chunk-2M7U4WL3.js → chunk-XQARTOZJ.js} +260 -104
- package/dist/{chunk-TZ5IZETE.js → chunk-YD44KIRA.js} +1 -1
- package/dist/{chunk-TCBEF5OY.js → chunk-YZ7RZ4MU.js} +1 -1
- package/dist/{composition-QtS1rnhv.d.ts → composition-DzAV0cfU.d.ts} +133 -3
- package/dist/composition.d.ts +1 -1
- package/dist/composition.js +1 -1
- package/dist/conversion-524P44NX.js +19 -0
- package/dist/{conversion-Cqwu0Ds9.d.ts → conversion-CtTg2ivR.d.ts} +6 -5
- package/dist/convert.d.ts +3 -3
- package/dist/convert.js +7 -7
- package/dist/data.d.ts +1 -1
- package/dist/data.js +2 -2
- package/dist/{deck-report-BdG5H3Qj.d.ts → deck-report-971nEzTY.d.ts} +2 -2
- package/dist/deck.d.ts +6 -6
- package/dist/deck.js +10 -10
- package/dist/diff.d.ts +1 -1
- package/dist/diff.js +5 -5
- package/dist/docs.js +16 -10
- package/dist/examples.d.ts +1 -1
- package/dist/{finding-DqgwzUmr.d.ts → finding-l9dlQ2NF.d.ts} +4 -0
- package/dist/format.js +2 -2
- package/dist/index.d.ts +21 -15
- package/dist/index.js +20 -20
- package/dist/markdown.d.ts +4 -4
- package/dist/markdown.js +7 -7
- package/dist/node-engine.d.ts +30 -9
- package/dist/node-engine.js +20 -20
- package/dist/{pagination-CAX6mHG6.d.ts → pagination-BTqRj7dM.d.ts} +2 -2
- package/dist/pagination.d.ts +2 -2
- package/dist/pagination.js +4 -4
- package/dist/patch.d.ts +1 -1
- package/dist/patch.js +4 -4
- package/dist/{presentation-BG4QCcdB.d.ts → presentation-ZNcXSpvm.d.ts} +50 -4
- package/dist/repo-readme.js +1 -1
- package/dist/schemas.js +1 -1
- package/dist/spec/schemas/finding.schema.json +6 -1
- package/dist/spec/schemas/opf.schema.json +8 -0
- package/dist/types.d.ts +2 -2
- package/dist/{validation-types-DRaNnieo.d.ts → validation-types-uLDSrJgM.d.ts} +3 -3
- package/dist/{validator-BJtXHJKh.d.ts → validator-DxAjRPmE.d.ts} +4 -10
- package/dist/validator.d.ts +5 -5
- package/dist/validator.js +3 -3
- package/dist/yaml.d.ts +4 -4
- package/dist/yaml.js +7 -7
- package/package.json +1 -1
- package/dist/conversion-DRCJIMWS.js +0 -19
package/dist/examples.d.ts
CHANGED
|
@@ -207,6 +207,10 @@ interface ValidationIssue {
|
|
|
207
207
|
params: {
|
|
208
208
|
[k: string]: unknown;
|
|
209
209
|
};
|
|
210
|
+
/**
|
|
211
|
+
* Present when the issue is the best match of a oneOf or anyOf: one line per other form the value was checked against and did not fit, such as `string: must be string`.
|
|
212
|
+
*/
|
|
213
|
+
alternatives?: string[];
|
|
210
214
|
}
|
|
211
215
|
|
|
212
216
|
export type { FindingReport as F, JsonPatchOperation as J, ValidationIssue as V, Finding as a, FindingLocation as b, FindingSeverity as c, FindingCategory as d, FindingFix as e, FindingFocus as f, FindingSuggestion as g };
|
package/dist/format.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { OPFFormatError, format, isFormatted, sortPresentationKeys } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { OPFFormatError, format, isFormatted, sortPresentationKeys } from './chunk-U55BQQKU.js';
|
|
2
|
+
import './chunk-BWWGYOOG.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
export { SchemaEntry, SchemaName, audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './schemas.js';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
4
|
-
import { v as validate$1 } from './validator-
|
|
5
|
-
export { C as CATALOG_SCHEMA, a as CatalogDisplayKind, b as CatalogRecordKind, D as
|
|
6
|
-
import { R as ResolveVariablesOptions, h as VariableDiagnostic } from './validation-types-
|
|
7
|
-
export { B as BuiltinVariableInfo, C as Contract, D as DEFAULT_VARIABLE_DATE_FORMAT, O as OPFVariableError, i as ResolveVariablesResult, j as VARIABLE_KINDS, d as ValidateFonts, a as ValidateOptions, e as ValidationCategory, f as ValidationChecks, V as ValidationReport, g as ValidationRuleCost, c as ValidationRuleInfo, b as ValidationThresholds, k as VariableDeclaration, 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, w as isTemplate, x as listBuiltinVariables, y as listVariables, z as resolveVariables, v as validationCategories, A as variableDeclarations } from './validation-types-
|
|
8
|
-
export { a as CHART_TYPES, C 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, e as FontFamilies, F as Fonts, f as LANGUAGES, g as LOGO_SHAPES, h as LanguageFamilyName, i as LanguageVocabulary, L as LayoutDiagnostic, j as LogoShape, k as LogoVariant, M as MeasureTextWidth, R as ResolveLogoOptions, l as ResolvedLogo, S as SOCIAL_PLATFORMS, m as SocialPlatformVocabulary, T as TextMeasurement, n as TextStyle, o as normalizeLanguageFamily } from './composition-
|
|
2
|
+
import { C as ConvertInput, a as ConvertOptions, b as ConvertResult, c as ConvertFormat, O as OpenOptions, S as SaveOptions, d as SaveResult } from './conversion-CtTg2ivR.js';
|
|
3
|
+
export { e as ConvertedFile, E as ExportFormat, F as FontsHandle, f as OPFApiError, g as OPFExportError, h as OPFImportError, i as SlideSelection, p as parseSlideSelection } from './conversion-CtTg2ivR.js';
|
|
4
|
+
import { v as validate$1 } from './validator-DxAjRPmE.js';
|
|
5
|
+
export { C as CATALOG_SCHEMA, a as CatalogDisplayKind, b as CatalogRecordKind, D as DEFAULT_VALIDATION_THRESHOLDS, O as OPFValidationError, c as assertValid, d as assertValidCatalogRecord, e as catalogDisplayKinds, f as catalogSchemaNames, g as findValidationRule, h as validateCatalogRecord, i as validationRules } from './validator-DxAjRPmE.js';
|
|
6
|
+
import { R as ResolveVariablesOptions, h as VariableDiagnostic } from './validation-types-uLDSrJgM.js';
|
|
7
|
+
export { B as BuiltinVariableInfo, C as Contract, D as DEFAULT_VARIABLE_DATE_FORMAT, O as OPFVariableError, i as ResolveVariablesResult, j as VARIABLE_KINDS, d as ValidateFonts, a as ValidateOptions, e as ValidationCategory, f as ValidationChecks, V as ValidationReport, g as ValidationRuleCost, c as ValidationRuleInfo, b as ValidationThresholds, k as VariableDeclaration, 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, w as isTemplate, x as listBuiltinVariables, y as listVariables, z as resolveVariables, v as validationCategories, A as variableDeclarations } from './validation-types-uLDSrJgM.js';
|
|
8
|
+
export { a as CHART_TYPES, C 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, e as FontFamilies, F as Fonts, f as LANGUAGES, g as LOGO_SHAPES, h as LanguageFamilyName, i as LanguageVocabulary, L as LayoutDiagnostic, j as LogoShape, k as LogoVariant, M as MeasureTextWidth, R as ResolveLogoOptions, l as ResolvedLogo, S as SOCIAL_PLATFORMS, m as SocialPlatformVocabulary, T as TextMeasurement, n as TextStyle, o as normalizeLanguageFamily } from './composition-DzAV0cfU.js';
|
|
9
9
|
export { SpecFileEntry, SpecFileKind, SpecFilePath, specFileEntries, specFileKinds, specFilePaths } from './spec-files.js';
|
|
10
|
-
import { P as Presentation } from './presentation-
|
|
10
|
+
import { P as Presentation } from './presentation-ZNcXSpvm.js';
|
|
11
11
|
export { Audience, ChartType, ColorScheme, FontScheme, Language, Layout, Narrative, Purpose, SocialPlatform, Theme, Tone } from './types.js';
|
|
12
12
|
import { b as CatalogKind, U as UnresolvedReferenceDiagnostic, a as CatalogOptions, C as Catalog, R as RecordProvenance } from './catalog-refs-CSHevLn1.js';
|
|
13
13
|
export { c as CATALOG_GROUP_PATTERN, d as CATALOG_REFERENCE_PATTERN, e as CatalogRecordMap, f as CatalogRecords, g as CatalogReferenceSite, O as OPFCatalogsOptionError, h as OPFUnresolvedReferenceError, i as ResolvedReference, j as catalogGroupSource, k as catalogKinds, l as catalogRecords, m as catalogReferenceSites, p as parseReference, r as resolveReference, u as unresolvedReference } from './catalog-refs-CSHevLn1.js';
|
|
14
|
-
import { a as Finding, J as JsonPatchOperation } from './finding-
|
|
15
|
-
export { d as FindingCategory, e as FindingFix, f as FindingFocus, b as FindingLocation, F as FindingReport, c as FindingSeverity, g as FindingSuggestion, V as ValidationIssue } from './finding-
|
|
16
|
-
import { p as paginate$1 } from './pagination-
|
|
17
|
-
export { O as OPFPaginationError, P as PaginatedPage,
|
|
14
|
+
import { a as Finding, J as JsonPatchOperation } from './finding-l9dlQ2NF.js';
|
|
15
|
+
export { d as FindingCategory, e as FindingFix, f as FindingFocus, b as FindingLocation, F as FindingReport, c as FindingSeverity, g as FindingSuggestion, V as ValidationIssue } from './finding-l9dlQ2NF.js';
|
|
16
|
+
import { p as paginate$1 } from './pagination-BTqRj7dM.js';
|
|
17
|
+
export { O as OPFPaginationError, P as PaginatedPage, b as PaginationMapping, c as PaginationOptions, d as PaginationResult, a as PresentationPaginationOptions, e as PresentationPaginationResult, S as SlideContext, f as SlideContextDiagnostic, g as SlideContextOptions, h as paginateSlide, r as resolveSlideContext } from './pagination-BTqRj7dM.js';
|
|
18
18
|
export { ApplyPatchOptions, OPFPatchError, OPFPatchValidationError, PatchResult, applyPatch } from './patch.js';
|
|
19
19
|
export { DiffOptions, MergeConflict, MergeOptions, MergeResult, PresentationDiff, diff, merge } from './diff.js';
|
|
20
20
|
export { FormatOptions, OPFFormatError, format } from './format.js';
|
|
@@ -23,7 +23,7 @@ export { StringifyOptions, parse, stringify } from './deck.js';
|
|
|
23
23
|
export { DataCell, DataImportOptions, ImportedChart, ImportedChartData, ImportedChartType, ImportedTable, IngestOptions, OPFDataImportError, TabularData, ingest, parseTabularData } from './data.js';
|
|
24
24
|
export { I as ChartComboSeries, 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';
|
|
25
25
|
export { FONT_POLICY, FontAvailability, FontAvailabilityCode, FontAvailabilityDiagnostic, FontLicenseClass, FontPolicyDecision, FontPolicyEntry, FontPolicyTable, FontReplacement, FontReplacementCompatibility, FontReplacementMeasurement, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor } from './font-policy.js';
|
|
26
|
-
export { a as DECK_FORMATS, D as DeckFormat, P as ParseOptions, d as deckFormatOf } from './deck-report-
|
|
26
|
+
export { a as DECK_FORMATS, D as DeckFormat, P as ParseOptions, d as deckFormatOf } from './deck-report-971nEzTY.js';
|
|
27
27
|
import './json-BFSdESOE.js';
|
|
28
28
|
|
|
29
29
|
/**
|
|
@@ -470,7 +470,7 @@ interface PresentationStats {
|
|
|
470
470
|
data: {
|
|
471
471
|
inline: number;
|
|
472
472
|
dataset: number;
|
|
473
|
-
|
|
473
|
+
withSource: number;
|
|
474
474
|
};
|
|
475
475
|
};
|
|
476
476
|
tables: {
|
|
@@ -569,6 +569,12 @@ interface StatsOptions extends CatalogOptions {
|
|
|
569
569
|
wordsPerMinute?: number;
|
|
570
570
|
}
|
|
571
571
|
declare function stats$1(presentation: unknown, options?: StatsOptions): PresentationStats;
|
|
572
|
+
/**
|
|
573
|
+
* The local file sources the deck draws as images (relative paths and file: URLs, an `asset:<id>` reference followed to the
|
|
574
|
+
* registry's source), each once, in the order the deck uses them. URLs, data URIs and videos are left out. Nothing is read:
|
|
575
|
+
* a host with a file system checks that they exist (`opf validate` does, against the folder `opf convert` reads).
|
|
576
|
+
*/
|
|
577
|
+
declare function localAssetSources(presentation: unknown): string[];
|
|
572
578
|
|
|
573
579
|
interface EditOptions {
|
|
574
580
|
/** The catalogs the result's references resolve in. In Node the default catalog when omitted, as `opf edit` registers it; in the browser build none. */
|
|
@@ -687,4 +693,4 @@ declare function open(input: string | Uint8Array | ArrayBuffer, options?: OpenOp
|
|
|
687
693
|
*/
|
|
688
694
|
declare function save(deck: Presentation, path: string, options?: SaveOptions): Promise<SaveResult>;
|
|
689
695
|
|
|
690
|
-
export { Catalog, CatalogKind, CatalogOptions, type CatalogPatchOperation, type CatalogRecordChange, type CatalogRef, type CatalogUpdate, ConvertFormat, ConvertInput, ConvertOptions, ConvertResult, type CopiedRecordRename, type CopySlidesResult, type DatasetFact, type EditOptions, type EditResult, type EmbedResult, type EmbeddedRecord, type FillOptions, type FillRecord, type FillResult, type FilledDeck, Finding, type HeaderFooterFact, JsonPatchOperation, type MoveToCustomErrorCode, type MoveToCustomPatchOperation, type MoveToCustomResult, type MovedRecord, OPFMoveToCustomError, OpenOptions, Presentation, type PresentationStats, RecordProvenance, type ReferenceFact, ResolveVariablesOptions, type ResolvedDesignRecords, SLIDE_SCOPED_BUILTINS, SaveOptions, SaveResult, type SlideScopedBuiltin, type SlideSizeFact, type SlideStats, type StatsOptions, type StatsSlideRef, type TableFact, UnresolvedReferenceDiagnostic, VariableDiagnostic, convert, copySlides, edit, embed, fill, fillRecords, moveToCustom, open, paginate, resolveDesignRecords, resolveFontScheme, resolveSlideVariables, sameRecord, save, stats, updateFromCatalog, validate };
|
|
696
|
+
export { Catalog, CatalogKind, CatalogOptions, type CatalogPatchOperation, type CatalogRecordChange, type CatalogRef, type CatalogUpdate, ConvertFormat, ConvertInput, ConvertOptions, ConvertResult, type CopiedRecordRename, type CopySlidesResult, type DatasetFact, type EditOptions, type EditResult, type EmbedResult, type EmbeddedRecord, type FillOptions, type FillRecord, type FillResult, type FilledDeck, Finding, type HeaderFooterFact, JsonPatchOperation, type MoveToCustomErrorCode, type MoveToCustomPatchOperation, type MoveToCustomResult, type MovedRecord, OPFMoveToCustomError, OpenOptions, Presentation, type PresentationStats, RecordProvenance, type ReferenceFact, ResolveVariablesOptions, type ResolvedDesignRecords, SLIDE_SCOPED_BUILTINS, SaveOptions, SaveResult, type SlideScopedBuiltin, type SlideSizeFact, type SlideStats, type StatsOptions, type StatsSlideRef, type TableFact, UnresolvedReferenceDiagnostic, VariableDiagnostic, convert, copySlides, edit, embed, fill, fillRecords, localAssetSources, moveToCustom, open, paginate, resolveDesignRecords, resolveFontScheme, resolveSlideVariables, sameRecord, save, stats, updateFromCatalog, validate };
|
package/dist/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defaultCatalogs } from './chunk-
|
|
2
|
-
import { stats, embed, edit, OPFApiError, asApiError } from './chunk-
|
|
3
|
-
export { OPFApiError, OPFExportError, OPFImportError, OPFMoveToCustomError, copySlides, fill, fillRecords, moveToCustom, parseSlideSelection, sameRecord, updateFromCatalog } from './chunk-
|
|
1
|
+
import { defaultCatalogs } from './chunk-EFICNDGV.js';
|
|
2
|
+
import { stats, embed, edit, OPFApiError, asApiError } from './chunk-W62CX2WG.js';
|
|
3
|
+
export { OPFApiError, OPFExportError, OPFImportError, OPFMoveToCustomError, copySlides, fill, fillRecords, localAssetSources, moveToCustom, parseSlideSelection, sameRecord, updateFromCatalog } from './chunk-W62CX2WG.js';
|
|
4
4
|
export { specFileEntries, specFileKinds, specFilePaths } from './chunk-UJSAR6GF.js';
|
|
5
|
-
export { OPFDataImportError, ingest, parseTabularData } from './chunk-
|
|
6
|
-
export { DECK_FORMATS, deckFormatOf, parse, stringify } from './chunk-
|
|
7
|
-
export { fromMarkdown, toMarkdown } from './chunk-
|
|
8
|
-
import './chunk-
|
|
9
|
-
export { OPFMarkdownError } from './chunk-
|
|
10
|
-
export { diff, merge } from './chunk-
|
|
11
|
-
export { OPFPatchError, OPFPatchValidationError, applyPatch } from './chunk-
|
|
12
|
-
export { OPFFormatError, format } from './chunk-
|
|
13
|
-
import { paginate } from './chunk-
|
|
14
|
-
export { OPFPaginationError, paginateSlide } from './chunk-
|
|
15
|
-
import './chunk-
|
|
16
|
-
import './chunk-
|
|
17
|
-
import { validate, OPFValidationError } from './chunk-
|
|
18
|
-
export { CATALOG_SCHEMA,
|
|
19
|
-
export { CATALOG_GROUP_PATTERN, CATALOG_REFERENCE_PATTERN, CHART_TYPES, DEFAULT_VARIABLE_DATE_FORMAT, ENGINE_DEFAULT_CHART_TYPES, ENGINE_DEFAULT_COLOR_SCHEME, ENGINE_DEFAULT_FONT_SCHEME, ENGINE_DEFAULT_THEME, LANGUAGES, LOGO_SHAPES, OPFCatalogsOptionError, OPFUnresolvedReferenceError, OPFVariableError, SLIDE_SCOPED_BUILTINS, SOCIAL_PLATFORMS, VARIABLE_KINDS, catalogGroupSource, catalogKinds, catalogRecords, catalogReferenceSites, chartNumber, coerceVariableValue, datasetDiagnostics, formatDataNumber, formatVariableNumber, fromExcelNumberFormat, hasContentVariables, inlineChartData, inlineDatasets, inlineTableData, isDatasetRef, isTemplate, isXYChartType, listBuiltinVariables, listVariables, normalizeLanguageFamily, numberFormatError, parseReference, resolveChartData, resolveDesignRecords, resolveFontScheme, resolveReference, resolveSlideVariables, resolveTableData, resolveVariables, suggestChartNumberFix, tableCellDisplayValue, toExcelNumberFormat, unresolvedReference, unusedDatasets, variableDeclarations } from './chunk-
|
|
20
|
-
export { audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './chunk-
|
|
5
|
+
export { OPFDataImportError, ingest, parseTabularData } from './chunk-YD44KIRA.js';
|
|
6
|
+
export { DECK_FORMATS, deckFormatOf, parse, stringify } from './chunk-D7WZVSNV.js';
|
|
7
|
+
export { fromMarkdown, toMarkdown } from './chunk-2X4ZG2CN.js';
|
|
8
|
+
import './chunk-D2XIDBUB.js';
|
|
9
|
+
export { OPFMarkdownError } from './chunk-ARLOTG23.js';
|
|
10
|
+
export { diff, merge } from './chunk-WZPFIPOO.js';
|
|
11
|
+
export { OPFPatchError, OPFPatchValidationError, applyPatch } from './chunk-THEUCQZZ.js';
|
|
12
|
+
export { OPFFormatError, format } from './chunk-U55BQQKU.js';
|
|
13
|
+
import { paginate } from './chunk-7YFMWEPQ.js';
|
|
14
|
+
export { OPFPaginationError, paginateSlide } from './chunk-7YFMWEPQ.js';
|
|
15
|
+
import './chunk-VLFDWV7L.js';
|
|
16
|
+
import './chunk-YZ7RZ4MU.js';
|
|
17
|
+
import { validate, OPFValidationError } from './chunk-XQARTOZJ.js';
|
|
18
|
+
export { CATALOG_SCHEMA, DEFAULT_VALIDATION_THRESHOLDS, OPFValidationError, assertValid, assertValidCatalogRecord, catalogDisplayKinds, catalogSchemaNames, findValidationRule, resolveSlideContext, validateCatalogRecord, validationCategories, validationRules } from './chunk-XQARTOZJ.js';
|
|
19
|
+
export { CATALOG_GROUP_PATTERN, CATALOG_REFERENCE_PATTERN, CHART_TYPES, DEFAULT_VARIABLE_DATE_FORMAT, ENGINE_DEFAULT_CHART_TYPES, ENGINE_DEFAULT_COLOR_SCHEME, ENGINE_DEFAULT_FONT_SCHEME, ENGINE_DEFAULT_THEME, LANGUAGES, LOGO_SHAPES, OPFCatalogsOptionError, OPFUnresolvedReferenceError, OPFVariableError, SLIDE_SCOPED_BUILTINS, SOCIAL_PLATFORMS, VARIABLE_KINDS, catalogGroupSource, catalogKinds, catalogRecords, catalogReferenceSites, chartNumber, coerceVariableValue, datasetDiagnostics, formatDataNumber, formatVariableNumber, fromExcelNumberFormat, hasContentVariables, inlineChartData, inlineDatasets, inlineTableData, isDatasetRef, isTemplate, isXYChartType, listBuiltinVariables, listVariables, normalizeLanguageFamily, numberFormatError, parseReference, resolveChartData, resolveDesignRecords, resolveFontScheme, resolveReference, resolveSlideVariables, resolveTableData, resolveVariables, suggestChartNumberFix, tableCellDisplayValue, toExcelNumberFormat, unresolvedReference, unusedDatasets, variableDeclarations } from './chunk-X6SB52RP.js';
|
|
20
|
+
export { audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './chunk-BWWGYOOG.js';
|
|
21
21
|
export { FONT_POLICY, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor } from './chunk-F7PLNWHQ.js';
|
|
22
22
|
|
|
23
23
|
// src/index.ts
|
|
@@ -31,7 +31,7 @@ var stats2 = (presentation2, options) => stats(presentation2, withDefaultCatalog
|
|
|
31
31
|
var paginate2 = (input, options) => paginate(input, withDefaultCatalog(options));
|
|
32
32
|
var embed2 = (document, options) => embed(document, withDefaultCatalog(options));
|
|
33
33
|
var edit2 = (deck, patch, options) => edit(deck, patch, withDefaultCatalog(options));
|
|
34
|
-
var engine = () => import('./conversion-
|
|
34
|
+
var engine = () => import('./conversion-524P44NX.js');
|
|
35
35
|
var rethrow = (error, fallback) => {
|
|
36
36
|
if (error instanceof OPFValidationError) throw error;
|
|
37
37
|
throw asApiError(OPFApiError, error, fallback);
|
package/dist/markdown.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { C as Catalog } from './catalog-refs-CSHevLn1.js';
|
|
2
|
-
import { P as Presentation } from './presentation-
|
|
3
|
-
import { a as Finding, b as FindingLocation } from './finding-
|
|
4
|
-
import { a as ValidateOptions, V as ValidationReport } from './validation-types-
|
|
5
|
-
import './composition-
|
|
2
|
+
import { P as Presentation } from './presentation-ZNcXSpvm.js';
|
|
3
|
+
import { a as Finding, b as FindingLocation } from './finding-l9dlQ2NF.js';
|
|
4
|
+
import { a as ValidateOptions, V as ValidationReport } from './validation-types-uLDSrJgM.js';
|
|
5
|
+
import './composition-DzAV0cfU.js';
|
|
6
6
|
import './chart-data-BnNqgnC-.js';
|
|
7
7
|
import './json-BFSdESOE.js';
|
|
8
8
|
|
package/dist/markdown.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { fromMarkdown, toMarkdown } from './chunk-
|
|
2
|
-
export { OPFMarkdownError } from './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
1
|
+
export { fromMarkdown, toMarkdown } from './chunk-2X4ZG2CN.js';
|
|
2
|
+
export { OPFMarkdownError } from './chunk-ARLOTG23.js';
|
|
3
|
+
import './chunk-VLFDWV7L.js';
|
|
4
|
+
import './chunk-YZ7RZ4MU.js';
|
|
5
|
+
import './chunk-XQARTOZJ.js';
|
|
6
|
+
import './chunk-X6SB52RP.js';
|
|
7
|
+
import './chunk-BWWGYOOG.js';
|
package/dist/node-engine.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { b as DeckReport, c as DeckReportOptions, r as readDeckReport } from './deck-report-
|
|
2
|
-
import { F as FontsHandle,
|
|
3
|
-
export {
|
|
1
|
+
export { b as DeckReport, c as DeckReportOptions, r as readDeckReport } from './deck-report-971nEzTY.js';
|
|
2
|
+
import { F as FontsHandle, j as EmbeddedFace, R as Renderer, k as Reporter, P as Peer, l as PptxModule, f as OPFApiError } from './conversion-CtTg2ivR.js';
|
|
3
|
+
export { m as ConversionPlan, D as Diagnostic, n as EXPORT_FORMATS, o as EXPORT_TEXT, q as ExportContext, r as ExportFile, s as ExportFontSummary, E as ExportFormat, t as ExportOptions, u as ExportResult, v as ExportRun, w as ExportText, I as ImportOptions, x as ImportResult, g as OPFExportError, h as OPFImportError, y as PEER_RANGES, z as PPTX_PACKAGE, A as PreparedExport, B as RENDER_EXTRAS, G as RENDER_PACKAGE, H as ReportFinding, J as ResolvedExportOptions, i as SlideSelection, K as Source, V as VERSIONS, L as asApiError, M as assetRoot, N as checkDate, Q as checkOptions, T as checkRenamedOptions, U as checkScale, W as deckFileFormat, X as exportFormatOf, Y as finishReport, Z as importPresentation, _ as loadPptx, $ as loadRenderer, a0 as locatePackage, a1 as missingPeerFrom, p as parseSlideSelection, a2 as planConversion, a3 as prepareExport, a4 as reaches, a5 as readInput, a6 as reportThrown, a7 as resolveExportOptions, a8 as runExport, a9 as runPreparedExport, aa as writePlanned } from './conversion-CtTg2ivR.js';
|
|
4
4
|
import { C as Catalog } from './catalog-refs-CSHevLn1.js';
|
|
5
|
-
import {
|
|
6
|
-
import './presentation-
|
|
7
|
-
import './validation-types-
|
|
8
|
-
import './composition-
|
|
5
|
+
import { e as PresentationPaginationResult } from './pagination-BTqRj7dM.js';
|
|
6
|
+
import './presentation-ZNcXSpvm.js';
|
|
7
|
+
import './validation-types-uLDSrJgM.js';
|
|
8
|
+
import './composition-DzAV0cfU.js';
|
|
9
9
|
import './chart-data-BnNqgnC-.js';
|
|
10
|
-
import './finding-
|
|
10
|
+
import './finding-l9dlQ2NF.js';
|
|
11
11
|
import './json-BFSdESOE.js';
|
|
12
12
|
|
|
13
13
|
/** `deck.opf.json` and `deck.pptx` both give `deck`; stdin gives `deck`. */
|
|
@@ -40,6 +40,13 @@ interface PlannedFile {
|
|
|
40
40
|
* message for the library API.
|
|
41
41
|
*/
|
|
42
42
|
declare function checkDestinations(files: string[], overwrite: boolean, flags?: boolean): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Publish a complete staged file at `output`, never replacing a file that is already there (the error is EEXIST, as `link`'s).
|
|
45
|
+
* A hard link is atomic: the final name appears with every byte in place. Where the file system refuses links (RR-93), the
|
|
46
|
+
* output is created exclusively (`wx`) and the staged bytes are copied in; a failed copy removes the partial output it created.
|
|
47
|
+
* `link` is a parameter so a test can inject the refusal.
|
|
48
|
+
*/
|
|
49
|
+
declare function publishNew(temporary: string, output: string, publish?: (from: string, to: string) => Promise<void>): Promise<void>;
|
|
43
50
|
/** Stage every file first, then publish each atomically. A later publication failure can leave earlier complete files. */
|
|
44
51
|
declare function writeFiles(files: PlannedFile[], overwrite: boolean, flags?: boolean): Promise<void>;
|
|
45
52
|
declare function pointerOf(location: string): string;
|
|
@@ -99,6 +106,20 @@ declare function runImport(bytes: Uint8Array, options: {
|
|
|
99
106
|
signals?: boolean;
|
|
100
107
|
}, reporter: Reporter, loaded?: Peer<PptxModule>): Promise<ImportRun>;
|
|
101
108
|
|
|
109
|
+
/** A local image reference that `convert` could not read. */
|
|
110
|
+
interface AssetProblem {
|
|
111
|
+
/** The JSON Pointer of the first place the deck spells the source (the registry entry for an `asset:` reference). */
|
|
112
|
+
path: string;
|
|
113
|
+
source: string;
|
|
114
|
+
problem: "blocked" | "missing";
|
|
115
|
+
reason: string;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* The deck's local image sources that do not resolve under `root`, by the rules `convert` reads them with (relative to the folder,
|
|
119
|
+
* nothing outside it, only image files). `root` must be an existing folder. Reads files, so it lives here and not in core `validate`.
|
|
120
|
+
*/
|
|
121
|
+
declare function localAssetProblems(deck: unknown, root: string): AssetProblem[];
|
|
122
|
+
|
|
102
123
|
declare function createZip(entries: {
|
|
103
124
|
name: string;
|
|
104
125
|
bytes: Uint8Array;
|
|
@@ -129,4 +150,4 @@ declare function galleryMismatch(declared: unknown, reads?: number): string | un
|
|
|
129
150
|
/** The catalogs a call registers when it names none: `[gallery]`. Throws `gallery-schema-mismatch` for a gallery of another schema. */
|
|
130
151
|
declare function defaultCatalogs(): readonly Catalog[];
|
|
131
152
|
|
|
132
|
-
export { FontsHandle, type ImportRun, OPFApiError, type PaginateDeckOptions, type PaginatedDeck, Peer, type PlannedFile, PptxModule, Renderer, Reporter, checkDestinations, checkOutputPattern, createZip, deckStem, defaultCatalogs, embeddedFor, galleryMismatch, leaseSharedFonts, listFontDirectories, padNumber, paginateDeck, pointerOf, prepareFonts, runImport, stemOf, writeFiles };
|
|
153
|
+
export { type AssetProblem, FontsHandle, type ImportRun, OPFApiError, type PaginateDeckOptions, type PaginatedDeck, Peer, type PlannedFile, PptxModule, Renderer, Reporter, checkDestinations, checkOutputPattern, createZip, deckStem, defaultCatalogs, embeddedFor, galleryMismatch, leaseSharedFonts, listFontDirectories, localAssetProblems, padNumber, paginateDeck, pointerOf, prepareFonts, publishNew, runImport, stemOf, writeFiles };
|
package/dist/node-engine.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { loadRenderer, listFontDirectories, leaseSharedFonts, prepareFonts } from './chunk-
|
|
2
|
-
export { EXPORT_FORMATS, EXPORT_TEXT, PEER_RANGES, PPTX_PACKAGE, RENDER_EXTRAS, RENDER_PACKAGE, Reporter, VERSIONS, checkDate, checkDestinations, checkOptions, checkOutputPattern, checkRenamedOptions, checkScale, createZip, deckFileFormat, deckStem, embeddedFor, exportFormatOf, finishReport, importPresentation, leaseSharedFonts, listFontDirectories, loadPptx, loadRenderer, locatePackage, missingPeerFrom, padNumber, planConversion, pointerOf, prepareExport, prepareFonts, reaches, readInput, reportThrown, resolveExportOptions, runExport, runImport, runPreparedExport, stemOf, writeFiles, writePlanned } from './chunk-
|
|
3
|
-
import { defaultCatalogs } from './chunk-
|
|
4
|
-
export { defaultCatalogs, galleryMismatch } from './chunk-
|
|
5
|
-
import { OPFApiError } from './chunk-
|
|
6
|
-
export { OPFApiError, OPFExportError, OPFImportError, asApiError, parseSlideSelection } from './chunk-
|
|
1
|
+
import { loadRenderer, listFontDirectories, leaseSharedFonts, prepareFonts } from './chunk-6UBIR2U3.js';
|
|
2
|
+
export { EXPORT_FORMATS, EXPORT_TEXT, PEER_RANGES, PPTX_PACKAGE, RENDER_EXTRAS, RENDER_PACKAGE, Reporter, VERSIONS, assetRoot, checkDate, checkDestinations, checkOptions, checkOutputPattern, checkRenamedOptions, checkScale, createZip, deckFileFormat, deckStem, embeddedFor, exportFormatOf, finishReport, importPresentation, leaseSharedFonts, listFontDirectories, loadPptx, loadRenderer, localAssetProblems, locatePackage, missingPeerFrom, padNumber, planConversion, pointerOf, prepareExport, prepareFonts, publishNew, reaches, readInput, reportThrown, resolveExportOptions, runExport, runImport, runPreparedExport, stemOf, writeFiles, writePlanned } from './chunk-6UBIR2U3.js';
|
|
3
|
+
import { defaultCatalogs } from './chunk-EFICNDGV.js';
|
|
4
|
+
export { defaultCatalogs, galleryMismatch } from './chunk-EFICNDGV.js';
|
|
5
|
+
import { OPFApiError } from './chunk-W62CX2WG.js';
|
|
6
|
+
export { OPFApiError, OPFExportError, OPFImportError, asApiError, parseSlideSelection } from './chunk-W62CX2WG.js';
|
|
7
7
|
import './chunk-UJSAR6GF.js';
|
|
8
|
-
import './chunk-
|
|
9
|
-
export { readDeckReport } from './chunk-
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-
|
|
12
|
-
import './chunk-
|
|
13
|
-
import './chunk-
|
|
14
|
-
import './chunk-
|
|
15
|
-
import './chunk-
|
|
16
|
-
import { paginate } from './chunk-
|
|
17
|
-
import './chunk-
|
|
18
|
-
import './chunk-
|
|
19
|
-
import './chunk-
|
|
20
|
-
import './chunk-
|
|
21
|
-
import './chunk-
|
|
8
|
+
import './chunk-YD44KIRA.js';
|
|
9
|
+
export { readDeckReport } from './chunk-D7WZVSNV.js';
|
|
10
|
+
import './chunk-2X4ZG2CN.js';
|
|
11
|
+
import './chunk-D2XIDBUB.js';
|
|
12
|
+
import './chunk-ARLOTG23.js';
|
|
13
|
+
import './chunk-WZPFIPOO.js';
|
|
14
|
+
import './chunk-THEUCQZZ.js';
|
|
15
|
+
import './chunk-U55BQQKU.js';
|
|
16
|
+
import { paginate } from './chunk-7YFMWEPQ.js';
|
|
17
|
+
import './chunk-VLFDWV7L.js';
|
|
18
|
+
import './chunk-YZ7RZ4MU.js';
|
|
19
|
+
import './chunk-XQARTOZJ.js';
|
|
20
|
+
import './chunk-X6SB52RP.js';
|
|
21
|
+
import './chunk-BWWGYOOG.js';
|
|
22
22
|
import './chunk-F7PLNWHQ.js';
|
|
23
23
|
|
|
24
24
|
// src/node/paginate.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ComposeSlideOptions, F as Fonts, L as LayoutDiagnostic } from './composition-
|
|
1
|
+
import { C as ComposeSlideOptions, F as Fonts, L as LayoutDiagnostic } from './composition-DzAV0cfU.js';
|
|
2
2
|
import { U as UnresolvedReferenceDiagnostic, R as RecordProvenance, a as CatalogOptions, C as Catalog } from './catalog-refs-CSHevLn1.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -133,4 +133,4 @@ interface PresentationPaginationResult {
|
|
|
133
133
|
/** Resolve the slides' references (the document's catalogs groups, then the registered catalogs) and paginate a complete presentation without mutating it. */
|
|
134
134
|
declare function paginate(input: unknown, options?: PresentationPaginationOptions): PresentationPaginationResult;
|
|
135
135
|
|
|
136
|
-
export { OPFPaginationError as O, type PaginatedPage as P, type SlideContext as S, type PresentationPaginationOptions as a, type
|
|
136
|
+
export { OPFPaginationError as O, type PaginatedPage as P, type SlideContext as S, type PresentationPaginationOptions as a, type PaginationMapping as b, type PaginationOptions as c, type PaginationResult as d, type PresentationPaginationResult as e, type SlideContextDiagnostic as f, type SlideContextOptions as g, paginateSlide as h, paginate as p, resolveSlideContext as r };
|
package/dist/pagination.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './composition-
|
|
1
|
+
import './composition-DzAV0cfU.js';
|
|
2
2
|
import './catalog-refs-CSHevLn1.js';
|
|
3
|
-
export { O as OPFPaginationError, P as PaginatedPage,
|
|
3
|
+
export { O as OPFPaginationError, P as PaginatedPage, b as PaginationMapping, c as PaginationOptions, d as PaginationResult, a as PresentationPaginationOptions, e as PresentationPaginationResult, p as paginate, h as paginateSlide } from './pagination-BTqRj7dM.js';
|
|
4
4
|
import './chart-data-BnNqgnC-.js';
|
package/dist/pagination.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { OPFPaginationError, paginate, paginateSlide } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
export { OPFPaginationError, paginate, paginateSlide } from './chunk-7YFMWEPQ.js';
|
|
2
|
+
import './chunk-XQARTOZJ.js';
|
|
3
|
+
import './chunk-X6SB52RP.js';
|
|
4
|
+
import './chunk-BWWGYOOG.js';
|
package/dist/patch.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FindingReport, a as Finding, J as JsonPatchOperation } from './finding-
|
|
1
|
+
import { F as FindingReport, a as Finding, J as JsonPatchOperation } from './finding-l9dlQ2NF.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,4 +1,4 @@
|
|
|
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-
|
|
4
|
-
import './chunk-
|
|
1
|
+
export { OPFPatchError, OPFPatchValidationError, applyPatch, applyPatchWithInverse, escapePointerToken, formatPointer, getAtPointer, hasPointer, invertPatch, jsonEqual, normalizePatch, parsePointer, pointerFromPath, readPointer, splitPointer, unescapePointerToken } from './chunk-THEUCQZZ.js';
|
|
2
|
+
import './chunk-XQARTOZJ.js';
|
|
3
|
+
import './chunk-X6SB52RP.js';
|
|
4
|
+
import './chunk-BWWGYOOG.js';
|
|
@@ -397,6 +397,18 @@ type ChartDataCell = (string | number | boolean | null);
|
|
|
397
397
|
* @minItems 1
|
|
398
398
|
*/
|
|
399
399
|
type DatasetFields = [string, ...(string)[]];
|
|
400
|
+
/**
|
|
401
|
+
* A color value or reference, enforced on styled table cell fill and text colors, cell border colors, solid background colors, gradient stop colors and pattern foreground and background colors. Three forms:
|
|
402
|
+
* - Literal hex: '#RGB', '#RRGGBB', or '#RRGGBBAA'.
|
|
403
|
+
* - Color-scheme name, resolved through the effective color scheme after design resolution: an OOXML slot ('accent1'-'accent6', 'dark1', 'dark2', 'light1', 'light2', 'hyperlink', 'followedHyperlink') or an abstract role ('primary', 'secondary', 'accent', 'background', 'surface', 'surfaceAlt', 'text', 'textSecondary'). Roles resolve through the same role-to-slot mapping engines already apply to color schemes. 'surfaceAlt' has no slot: it is the alternate surface of banded table rows, derived from 'surface' and 'text' (the surface mixed a tenth of the way towards the text color, further when needed, so it always differs visibly from 'surface' and keeps 4.5:1 text contrast; core surfaceAltColor).
|
|
404
|
+
* - Variable reference: 'var:<id>' into the top-level variables map.
|
|
405
|
+
*
|
|
406
|
+
* Names keep content theme-portable: re-theming the deck updates every named reference, where a literal hex stays frozen. Unknown 'var:' ids produce a validation warning, never an error, and engines fall back to their default text color. TextRun.color documents the same three forms but remains an open string so imported decks with unrecognized run colors stay valid; validators warn there instead of erroring.
|
|
407
|
+
*
|
|
408
|
+
* This interface was referenced by `Presentation`'s JSON-Schema
|
|
409
|
+
* via the `definition` "ColorRef".
|
|
410
|
+
*/
|
|
411
|
+
type ColorRef = (HexColor | ("accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6" | "dark1" | "dark2" | "light1" | "light2" | "hyperlink" | "followedHyperlink" | "primary" | "secondary" | "accent" | "background" | "surface" | "surfaceAlt" | "text" | "textSecondary") | string);
|
|
400
412
|
/**
|
|
401
413
|
* A scalar, rich-run array, or styled/spanning cell object. Existing scalar and rich forms remain valid.
|
|
402
414
|
*
|
|
@@ -2340,6 +2352,13 @@ interface Chart {
|
|
|
2340
2352
|
* Text alternative for the chart: what the data shows (the point and the key numbers), not 'a chart' or 'bar chart'. The preview exposes it as the chart's accessible name (role img with aria-label) and the PowerPoint export writes it as the chart frame's alternative text (descr); import reads it back. An empty string marks the chart decorative, with the same meaning as an empty Asset alt, but it is a reviewed choice that opf/chart-text-alternative still reports as info (a chart almost always carries a message). When absent, validate accepts text beside the chart instead.
|
|
2341
2353
|
*/
|
|
2342
2354
|
alt?: string;
|
|
2355
|
+
/**
|
|
2356
|
+
* Optional series colors, by position: entry i replaces palette color i, the color of series i (the i-th plotted value column), of slice or category i on a pie, doughnut, treemap or funnel chart, and of the i-th color a histogram, pareto, waterfall or box-and-whisker chart draws with. An entry is any ColorRef: a hex color, a color-scheme slot or role ('accent3', 'secondary') or a 'var:<id>' color variable; a scheme name keeps following the deck if its scheme changes, and is written to PowerPoint as a theme color. Positions past the last entry keep the deck palette (accent1 to accent6, then their tints). A color is kept at 3:1 contrast against the chart panel (a lighter or darker shade is used when it falls short) and 'chart.highlight' wins over it: highlighted marks take the primary color and the rest the muted neutral. A color that cannot be resolved falls back to the palette color for its position. Absent keeps the deck palette exactly.
|
|
2357
|
+
*
|
|
2358
|
+
* @minItems 1
|
|
2359
|
+
* @maxItems 24
|
|
2360
|
+
*/
|
|
2361
|
+
colors?: [ColorRef, ...(ColorRef)[]];
|
|
2343
2362
|
highlight?: ChartHighlight;
|
|
2344
2363
|
}
|
|
2345
2364
|
/**
|
|
@@ -2553,11 +2572,21 @@ interface StyledTableCell {
|
|
|
2553
2572
|
*/
|
|
2554
2573
|
interface TableCellStyle {
|
|
2555
2574
|
/**
|
|
2556
|
-
*
|
|
2575
|
+
* A color value or reference, enforced on styled table cell fill and text colors, cell border colors, solid background colors, gradient stop colors and pattern foreground and background colors. Three forms:
|
|
2576
|
+
* - Literal hex: '#RGB', '#RRGGBB', or '#RRGGBBAA'.
|
|
2577
|
+
* - Color-scheme name, resolved through the effective color scheme after design resolution: an OOXML slot ('accent1'-'accent6', 'dark1', 'dark2', 'light1', 'light2', 'hyperlink', 'followedHyperlink') or an abstract role ('primary', 'secondary', 'accent', 'background', 'surface', 'surfaceAlt', 'text', 'textSecondary'). Roles resolve through the same role-to-slot mapping engines already apply to color schemes. 'surfaceAlt' has no slot: it is the alternate surface of banded table rows, derived from 'surface' and 'text' (the surface mixed a tenth of the way towards the text color, further when needed, so it always differs visibly from 'surface' and keeps 4.5:1 text contrast; core surfaceAltColor).
|
|
2578
|
+
* - Variable reference: 'var:<id>' into the top-level variables map.
|
|
2579
|
+
*
|
|
2580
|
+
* Names keep content theme-portable: re-theming the deck updates every named reference, where a literal hex stays frozen. Unknown 'var:' ids produce a validation warning, never an error, and engines fall back to their default text color. TextRun.color documents the same three forms but remains an open string so imported decks with unrecognized run colors stay valid; validators warn there instead of erroring.
|
|
2557
2581
|
*/
|
|
2558
2582
|
fill?: (HexColor | ("accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6" | "dark1" | "dark2" | "light1" | "light2" | "hyperlink" | "followedHyperlink" | "primary" | "secondary" | "accent" | "background" | "surface" | "surfaceAlt" | "text" | "textSecondary") | string);
|
|
2559
2583
|
/**
|
|
2560
|
-
*
|
|
2584
|
+
* A color value or reference, enforced on styled table cell fill and text colors, cell border colors, solid background colors, gradient stop colors and pattern foreground and background colors. Three forms:
|
|
2585
|
+
* - Literal hex: '#RGB', '#RRGGBB', or '#RRGGBBAA'.
|
|
2586
|
+
* - Color-scheme name, resolved through the effective color scheme after design resolution: an OOXML slot ('accent1'-'accent6', 'dark1', 'dark2', 'light1', 'light2', 'hyperlink', 'followedHyperlink') or an abstract role ('primary', 'secondary', 'accent', 'background', 'surface', 'surfaceAlt', 'text', 'textSecondary'). Roles resolve through the same role-to-slot mapping engines already apply to color schemes. 'surfaceAlt' has no slot: it is the alternate surface of banded table rows, derived from 'surface' and 'text' (the surface mixed a tenth of the way towards the text color, further when needed, so it always differs visibly from 'surface' and keeps 4.5:1 text contrast; core surfaceAltColor).
|
|
2587
|
+
* - Variable reference: 'var:<id>' into the top-level variables map.
|
|
2588
|
+
*
|
|
2589
|
+
* Names keep content theme-portable: re-theming the deck updates every named reference, where a literal hex stays frozen. Unknown 'var:' ids produce a validation warning, never an error, and engines fall back to their default text color. TextRun.color documents the same three forms but remains an open string so imported decks with unrecognized run colors stay valid; validators warn there instead of erroring.
|
|
2561
2590
|
*/
|
|
2562
2591
|
color?: (HexColor | ("accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6" | "dark1" | "dark2" | "light1" | "light2" | "hyperlink" | "followedHyperlink" | "primary" | "secondary" | "accent" | "background" | "surface" | "surfaceAlt" | "text" | "textSecondary") | string);
|
|
2563
2592
|
/**
|
|
@@ -2599,7 +2628,12 @@ interface TableCellPadding {
|
|
|
2599
2628
|
*/
|
|
2600
2629
|
interface TableCellBorder {
|
|
2601
2630
|
/**
|
|
2602
|
-
*
|
|
2631
|
+
* A color value or reference, enforced on styled table cell fill and text colors, cell border colors, solid background colors, gradient stop colors and pattern foreground and background colors. Three forms:
|
|
2632
|
+
* - Literal hex: '#RGB', '#RRGGBB', or '#RRGGBBAA'.
|
|
2633
|
+
* - Color-scheme name, resolved through the effective color scheme after design resolution: an OOXML slot ('accent1'-'accent6', 'dark1', 'dark2', 'light1', 'light2', 'hyperlink', 'followedHyperlink') or an abstract role ('primary', 'secondary', 'accent', 'background', 'surface', 'surfaceAlt', 'text', 'textSecondary'). Roles resolve through the same role-to-slot mapping engines already apply to color schemes. 'surfaceAlt' has no slot: it is the alternate surface of banded table rows, derived from 'surface' and 'text' (the surface mixed a tenth of the way towards the text color, further when needed, so it always differs visibly from 'surface' and keeps 4.5:1 text contrast; core surfaceAltColor).
|
|
2634
|
+
* - Variable reference: 'var:<id>' into the top-level variables map.
|
|
2635
|
+
*
|
|
2636
|
+
* Names keep content theme-portable: re-theming the deck updates every named reference, where a literal hex stays frozen. Unknown 'var:' ids produce a validation warning, never an error, and engines fall back to their default text color. TextRun.color documents the same three forms but remains an open string so imported decks with unrecognized run colors stay valid; validators warn there instead of erroring.
|
|
2603
2637
|
*/
|
|
2604
2638
|
color: (HexColor | ("accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6" | "dark1" | "dark2" | "light1" | "light2" | "hyperlink" | "followedHyperlink" | "primary" | "secondary" | "accent" | "background" | "surface" | "surfaceAlt" | "text" | "textSecondary") | string);
|
|
2605
2639
|
/**
|
|
@@ -2764,7 +2798,12 @@ interface ImageFocus1 {
|
|
|
2764
2798
|
*/
|
|
2765
2799
|
interface ImageBorder {
|
|
2766
2800
|
/**
|
|
2767
|
-
*
|
|
2801
|
+
* A color value or reference, enforced on styled table cell fill and text colors, cell border colors, solid background colors, gradient stop colors and pattern foreground and background colors. Three forms:
|
|
2802
|
+
* - Literal hex: '#RGB', '#RRGGBB', or '#RRGGBBAA'.
|
|
2803
|
+
* - Color-scheme name, resolved through the effective color scheme after design resolution: an OOXML slot ('accent1'-'accent6', 'dark1', 'dark2', 'light1', 'light2', 'hyperlink', 'followedHyperlink') or an abstract role ('primary', 'secondary', 'accent', 'background', 'surface', 'surfaceAlt', 'text', 'textSecondary'). Roles resolve through the same role-to-slot mapping engines already apply to color schemes. 'surfaceAlt' has no slot: it is the alternate surface of banded table rows, derived from 'surface' and 'text' (the surface mixed a tenth of the way towards the text color, further when needed, so it always differs visibly from 'surface' and keeps 4.5:1 text contrast; core surfaceAltColor).
|
|
2804
|
+
* - Variable reference: 'var:<id>' into the top-level variables map.
|
|
2805
|
+
*
|
|
2806
|
+
* Names keep content theme-portable: re-theming the deck updates every named reference, where a literal hex stays frozen. Unknown 'var:' ids produce a validation warning, never an error, and engines fall back to their default text color. TextRun.color documents the same three forms but remains an open string so imported decks with unrecognized run colors stay valid; validators warn there instead of erroring.
|
|
2768
2807
|
*/
|
|
2769
2808
|
color: (HexColor | ("accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6" | "dark1" | "dark2" | "light1" | "light2" | "hyperlink" | "followedHyperlink" | "primary" | "secondary" | "accent" | "background" | "surface" | "surfaceAlt" | "text" | "textSecondary") | string);
|
|
2770
2809
|
/**
|
|
@@ -2848,6 +2887,13 @@ interface Chart1 {
|
|
|
2848
2887
|
* Text alternative for the chart: what the data shows (the point and the key numbers), not 'a chart' or 'bar chart'. The preview exposes it as the chart's accessible name (role img with aria-label) and the PowerPoint export writes it as the chart frame's alternative text (descr); import reads it back. An empty string marks the chart decorative, with the same meaning as an empty Asset alt, but it is a reviewed choice that opf/chart-text-alternative still reports as info (a chart almost always carries a message). When absent, validate accepts text beside the chart instead.
|
|
2849
2888
|
*/
|
|
2850
2889
|
alt?: string;
|
|
2890
|
+
/**
|
|
2891
|
+
* Optional series colors, by position: entry i replaces palette color i, the color of series i (the i-th plotted value column), of slice or category i on a pie, doughnut, treemap or funnel chart, and of the i-th color a histogram, pareto, waterfall or box-and-whisker chart draws with. An entry is any ColorRef: a hex color, a color-scheme slot or role ('accent3', 'secondary') or a 'var:<id>' color variable; a scheme name keeps following the deck if its scheme changes, and is written to PowerPoint as a theme color. Positions past the last entry keep the deck palette (accent1 to accent6, then their tints). A color is kept at 3:1 contrast against the chart panel (a lighter or darker shade is used when it falls short) and 'chart.highlight' wins over it: highlighted marks take the primary color and the rest the muted neutral. A color that cannot be resolved falls back to the palette color for its position. Absent keeps the deck palette exactly.
|
|
2892
|
+
*
|
|
2893
|
+
* @minItems 1
|
|
2894
|
+
* @maxItems 24
|
|
2895
|
+
*/
|
|
2896
|
+
colors?: [ColorRef, ...(ColorRef)[]];
|
|
2851
2897
|
highlight?: ChartHighlight;
|
|
2852
2898
|
}
|
|
2853
2899
|
/**
|
package/dist/repo-readme.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/generated/repo-readme.ts
|
|
2
|
-
var repoReadmeRaw = '# Open Presentation Format (OPF)\n\n[](https://www.npmjs.com/package/@openpresentation/opf)\n[](https://www.npmjs.com/package/@openpresentation/opf)\n[](./LICENSE)\n\nPublic npm package: [`@openpresentation/opf`](https://www.npmjs.com/package/@openpresentation/opf) (`npm install @openpresentation/opf`).\n\nOpen Presentation Format is the portable, human-readable JSON document format for slide decks.\n\nThis repository is the canonical home for the OPF **spec**, **JSON Schemas**, **catalog presets**, examples, generated developer types, local validation tooling, and integration docs for the render/edit/convert toolkit. OpenPresentation publishes open-source code and documentation only; it does not provide hosted APIs, hosted rendering functions, queues, storage, authentication, jobs, previews, SLAs, telemetry, or managed infrastructure.\n\nFor AI agents, use the [OPF skill set](docs/agent-skills.md) for authoring, layout, presets, editing, export, and schema inspection.\n\nPublished CLI 0.18.0 installs all six skills into your project with `npx @openpresentation/cli@0.18.0 skills install`. It uses local copies, preserves existing instructions and refuses to overwrite customized skills. See the [installation and update guide](docs/agent-skills.md) for personal or agent-specific targets and source development.\n\nFor a fresh Node 24 project that installs **published** packages (not this\ncheckout), follow the [developer quickstart](docs/quickstart.md) and the\n[compatibility matrix](docs/compatibility-matrix.md).\n\nFor LLM authoring, start with [the authoring guide](docs/llm-authoring.md), [dynamic composition](docs/dynamic-composition.md), and [local ecosystem verification](docs/ecosystem-development.md).\n\n## File naming\n\nOpen Presentation Format documents are JSON files. Use `*.opf.json` for complete OPF presentation documents, for example `board-review.opf.json` or `deck.opf.json`.\n\nAvoid using bare `*.opf` for OPF JSON. The `.opf` extension is already used by other document and project formats, while `.opf.json` keeps the OPF identity and still makes the underlying JSON format clear to editors, validators, agents, and version-control tooling.\n\n## Naming and reuse\n\nThe format name is **Open Presentation Format**. The schemas, catalogs, packages, and local tooling in this repository are free and open source under the MIT license, so third-party tools may read, write, validate, render, convert, and describe support for Open Presentation Format without adopting any product-specific branding.\n\n## Why OPF\n\n`.pptx` is a zipped bundle of XML. Humans can\'t diff it, LLMs can\'t read or write it reliably, and git can\'t track it meaningfully. Every change looks like a binary blob.\n\nOPF is plain JSON. A human can open it in an editor. A model can read and write it without guessing at schema-by-example. Decks live in git like the rest of your work.\n\nThat\'s the shift that lets LLMs actually *author* decks. When the format stops fighting them, models can do the work that matters \u2014 narrative structure, persuasive framing, data analysis, chart recommendations, ruthless revision passes \u2014 instead of wrestling with `<p:sp>` tags.\n\nAnd they don\'t start from a blank canvas. [pptx.gallery](https://pptx.gallery) is the human-browsable reference for OPF catalog presets: layouts, themes, color schemes, font schemes, chart types, narratives, audiences, purposes, tones, languages, and social platforms.\n\n## Start in three steps\n\n1. **Install the coordinated published packages** on Node 24. See [the developer quickstart](docs/quickstart.md) for the currently recorded registry pin set: core 0.20.3, renderer 0.20.2, PPTX/editor 0.20.3, CLI 0.20.0 and Gallery 3.0.0. The default catalog is supplied by `@openpresentation/gallery@3.0.0`; see the [compatibility matrix](docs/compatibility-matrix.md) for feature and native limits.\n2. **Author, validate, paginate, preview and export.** Copy [`docs/quickstart/developer-quickstart.opf.json`](./docs/quickstart/developer-quickstart.opf.json) and run the commands in that guide. From code, `convert("deck.opf.md", "deck.pdf")` of `@openpresentation/opf` is the simple path to a PDF, PNG, SVG or PPTX file. `validate` / `opf validate` is one local checker for format, references, accessibility, layout and content ([guide](docs/validate.md)), not visual verification.\n3. **Know the limits.** The [compatibility matrix](docs/compatibility-matrix.md) lists shipped APIs versus renderer issue 24, native PowerPoint issue 87, and other deferred work. Browse presets at [pptx.gallery](https://pptx.gallery).\n\nYour deck can live in git from the first commit. After installing dependencies and supplying referenced assets, these commands run locally without a model provider, account or hosted OPF API.\n\n## JavaScript and TypeScript\n\nThe canonical JavaScript/TypeScript package is published at [`packages/javascript`](./packages/javascript) as [`@openpresentation/opf`](https://www.npmjs.com/package/@openpresentation/opf). The schema is pre-stable (0.x \u2014 expect breaking changes between minor versions until 1.0). Its responsibility is local and format-level only:\n\n- export the canonical schemas from [`spec/`](./spec)\n- register the pptx.gallery catalog of [`@openpresentation/gallery`](https://github.com/OpenPresentation/gallery) (a dependency, released on its own version line) as the Node defaults, as the CLI does; a browser host registers it itself\n- export a typed raw spec file manifest for package-addressable `spec/` content\n- generate TypeScript types, with `Presentation` as the top-level type\n- validate OPF JSON and catalog records locally\n\nIn Node (and Bun and Deno) its root also reads and writes files (`convert`, `open`, `save`) and draws them through the optional engines below; in a browser or a worker the same import is a browser-safe build with the same names, where those three reject with `node-only`. Every other entry runs in a browser. It does not generate content with AI, fetch remote catalogs, call hosted APIs, or provide managed services. Render/edit/convert packages live in separate MIT repos that depend on `@openpresentation/opf`. The format package also exposes pure composition geometry so those packages share layout behavior.\n\n## Toolkit libraries\n\nOPF is six packages. **Core** (`@openpresentation/opf`) is the format and its API: it reads and writes the text formats (JSON, YAML, Markdown) and validates, and in Node reads and writes files, through the same import. **The gallery** (`@openpresentation/gallery`) is the pptx.gallery catalog of layouts, themes, colour and font schemes and the other records, released on its own version line; core depends on it and registers it in Node. **The CLI** (`@openpresentation/cli`) is the `opf` command. **Render** (`opf-render`), **PPTX** (`opf-pptx`) and **the editor** (`opf-editor`) are the engines: drawing, PowerPoint and editing, installed as needed. The engines and the editor live in sibling repositories. See [ecosystem development](docs/ecosystem-development.md) for coordinated builds and verification, and [dynamic composition](docs/dynamic-composition.md) for portable layout rules.\n\n| Repo | Role | Boundary |\n|---|---|---|\n| [`gallery`](https://github.com/OpenPresentation/gallery) (`@openpresentation/gallery`) | The pptx.gallery catalog | Catalog records only, no runtime dependency; minor releases add records, a changed or removed record is a major release |\n| `cli` (`@openpresentation/cli`, this repository) | `opf` command | Runs core\'s Node engine: reads and writes files and calls the engines below as optional peers |\n| `opf-render` | OPF to SVG/PNG/PDF | Local and embeddable rendering library |\n| `opf-editor` | WYSIWYG bindings/components | Headless editor primitives plus optional UI components |\n| `opf-pptx` | OPF to PPTX and PPTX to OPF | Pure local import/export library for browser and server use where supported |\n\nThese repos provide OSS primitives only. Downstream applications own hosting, auth, storage, collaboration, queues, previews, analytics, support, and workflow UX.\n\n## Usage\n\nInstall from npm:\n\n```sh\npnpm add @openpresentation/opf\n# or: npm install @openpresentation/opf\n```\n\nTo work on the package itself, clone this repo and build the workspace:\n\n```sh\npnpm install\npnpm build\n```\n\nUse the format package from JavaScript or TypeScript:\n\n```ts\nimport { presentation, validate } from "@openpresentation/opf";\nimport { gallery } from "@openpresentation/gallery";\n\nimport type { Presentation } from "@openpresentation/opf";\n\nconst deck: Presentation = {\n name: "Quarterly Review",\n slides: [{ title: "Quarterly Review", items: ["Revenue", "Product", "Hiring"] }],\n};\n\nconst report = validate(deck);\nconsole.log(report.valid); // no finding has severity "error"\nconsole.log(report.findings); // every finding: rule id, severity, category, JSON Pointer path, message, fixes\n// Core ships no catalog records; in Node, validate registers the gallery when a call names no catalogs, and a host may name its own.\nconsole.log(validate({ ...deck, design: { theme: "classic" } }, { catalogs: [gallery] }).valid);\nconsole.log(Object.keys(gallery.audiences).length);\n```\n\nConvert, open and save files in Node with `@openpresentation/opf`, the same import a browser uses (the engines `@openpresentation/opf-render` and `@openpresentation/opf-pptx` are optional peers, installed as needed; see [OPF files in Node](docs/node.md)):\n\n```ts\nimport * as opf from "@openpresentation/opf";\n\nawait opf.convert("deck.opf.md", "deck.pdf");\nconst deck = await opf.open("deck.opf.md");\ndeck.slides.push({ title: "Q4" });\nawait opf.save(deck, "deck.opf.md");\nconst { files } = await opf.convert(deck, { format: "pptx" }); // bytes, nothing written\n```\n\nUse focused imports when you only need one surface:\n\n```ts\nimport { presentation } from "@openpresentation/opf/schemas";\nimport { specFileEntries } from "@openpresentation/opf/spec-files";\nimport { validate } from "@openpresentation/opf/validator";\nimport type { Presentation } from "@openpresentation/opf/types";\n```\n\nUse raw JSON when an engine or resolver needs package-addressable files:\n\n```ts\nimport presentationSchema from "@openpresentation/opf/spec/schemas/opf.schema.json" with {\n type: "json",\n};\n```\n\nUse the [installable OPF CLI](./packages/cli/README.md) to create, validate, and edit files locally:\n\n```sh\npnpm --filter @openpresentation/cli build\nnode packages/cli/dist/index.js create deck.opf.json --title "Decision brief"\nnode packages/cli/dist/index.js validate deck.opf.json\nnode packages/cli/dist/index.js edit deck.opf.json --patch changes.json --in-place\n```\n\nSee [CSV and JSON data import](./docs/data-import.md) for editable tables and charts in the editor, CLI, and package API, and [content conversions](./docs/conversions.md) for the pure converters (`@openpresentation/opf/convert`) that change a block\'s kind, nest list items, restructure a slide and split or merge slides, and [Markdown and outlines](./docs/markdown.md) for the deterministic Markdown dialect (`@openpresentation/opf/markdown`, `opf convert deck.md deck.opf.json`) that reads and writes a whole deck as text.\n\n[OPF as YAML](./docs/yaml.md) describes the strict YAML form of a deck (`@openpresentation/opf/yaml`, `opf convert deck.opf.json deck.opf.yaml`, `.opf.yaml` files in every command, editor autocomplete); JSON stays the canonical form. A deck can equally be a Markdown file, `deck.opf.md`: every command reads and writes it (see [Markdown decks in every command](./docs/markdown.md#markdown-decks-in-every-command)), and `parse` / `stringify` read and write a deck in JSON, YAML or Markdown with one call.\n\nSee [Templates and variables](./docs/templates-and-variables.md) for fillable OPF templates: typed variables, `{{id}}` tokens, `opf fill` and `resolveVariables`.\n\n## Layout\n\n| Path | Contents |\n|---|---|\n| [`spec/schemas/opf.schema.json`](./spec/schemas/opf.schema.json) | Canonical JSON Schema for top-level OPF `Presentation` documents. |\n| [`docs/how-opf-works.md`](./docs/how-opf-works.md) | Conceptual introduction: the document model, content shapes, catalog resolution, and the validation philosophy. Start here. |\n| [`docs/design-resolution.md`](./docs/design-resolution.md) | The design precedence algorithm (slide design \u2192 deck design \u2192 resolved theme \u2192 engine defaults) with worked examples. |\n| [`docs/schema-reference.md`](./docs/schema-reference.md) | Author-facing reference for top-level OPF fields and every presentation schema `$defs` object/type. |\n| [`docs/slide-sizes.md`](./docs/slide-sizes.md) | OPF\'s slide-size presets in inches, points and EMU, how they compare with PowerPoint\'s presets, and what PPTX export and import do with them. |\n| [`docs/catalog-schema-reference.md`](./docs/catalog-schema-reference.md) | Author-facing reference for every companion catalog schema. |\n| [`docs/content-payloads.md`](./docs/content-payloads.md) | Author-facing notes for slide and region content payloads, including chart and table object shapes. |\n| [`docs/footnotes-citations-captions.md`](./docs/footnotes-citations-captions.md) | Citations (`cite`), inline footnotes, the deck `references` list, captions on images, charts, tables and videos, and how every engine draws them. |\n| [`docs/examples.md`](./docs/examples.md) | Guide to the expanded scenario-oriented examples under `examples/gallery/`. |\n| [`docs/live-editor.md`](./docs/live-editor.md) | Browser canvas, live OPF editing, font loading, published packages, and current fidelity limits. |\n| [`docs/release-process.md`](./docs/release-process.md) | Maintainer runbook for tagging, trusted npm publishing, verification, and GitHub release notes. |\n| [`spec/schemas/*.schema.json`](./spec/schemas) | Companion schemas for catalog records and sub-objects. |\n| [`@openpresentation/gallery`](https://github.com/OpenPresentation/gallery) | The independently published default catalog and layout previews. |\n| [`spec/openapi.yaml`](./spec/openapi.yaml) | Optional reference OpenAPI contract for downstream services that choose to expose OPF over HTTP. OpenPresentation does not host this API. |\n| [`examples/technical/`](./examples/technical) | Focused OPF fixtures for validator, renderer, catalog-resolution, design, content-payload, and region behavior. |\n| [`examples/gallery/`](./examples/gallery) | Broader OPF example decks organized by industry, function, education, government, presentation type, international, and design/media scenarios. |\n| [`packages/javascript/`](./packages/javascript) | Public pre-stable source for `@openpresentation/opf`. |\n| [`packages/cli/`](./packages/cli) | Installable local CLI for creating, validating, editing, and inspecting OPF. |\n| [`legacy/`](./legacy) | Tombstone for service-specific clients, CLIs, tool integrations, and workflows removed from the OpenPresentation OSS repo. |\n\n## OpenPresentation Boundary\n\nOpenPresentation defines the format, bundled presets, local validation, examples, docs, and planned local render/edit/convert libraries. It does not provide hosted functions or managed product surfaces.\n\nFuture non-JavaScript OPF packages should follow the same local-first boundary: Python and Go packages should expose schemas, types/models, catalogs, validation, and package-addressable assets. Future toolkit packages should expose embeddable library APIs with no required network calls, hosted callbacks, hidden telemetry, or managed infrastructure assumptions.\n\nThe published JavaScript package copies package-addressable OPF schemas, catalogs, reference assets, and the optional reference `spec/openapi.yaml` from `spec/`. It intentionally remains `@openpresentation/opf` instead of introducing a separate `@openpresentation/opf-spec` package so downstream imports can advance by semver-pinning one canonical package.\n\n## License\n\nMIT. See [LICENSE](./LICENSE).\n';
|
|
2
|
+
var repoReadmeRaw = '# Open Presentation Format (OPF)\n\n[](https://www.npmjs.com/package/@openpresentation/opf)\n[](https://www.npmjs.com/package/@openpresentation/opf)\n[](./LICENSE)\n\nPublic npm package: [`@openpresentation/opf`](https://www.npmjs.com/package/@openpresentation/opf) (`npm install @openpresentation/opf`).\n\nOpen Presentation Format is the portable, human-readable JSON document format for slide decks.\n\nThis repository is the canonical home for the OPF **spec**, **JSON Schemas**, **catalog presets**, examples, generated developer types, local validation tooling, and integration docs for the render/edit/convert toolkit. OpenPresentation publishes open-source code and documentation only; it does not provide hosted APIs, hosted rendering functions, queues, storage, authentication, jobs, previews, SLAs, telemetry, or managed infrastructure.\n\nFor AI agents, use the [OPF skill set](docs/agent-skills.md) for authoring, layout, presets, editing, export, and schema inspection.\n\nPublished CLI 0.18.0 installs all six skills into your project with `npx @openpresentation/cli@0.18.0 skills install`. It uses local copies, preserves existing instructions and refuses to overwrite customized skills. See the [installation and update guide](docs/agent-skills.md) for personal or agent-specific targets and source development.\n\nFor a fresh Node 24 project that installs **published** packages (not this\ncheckout), follow the [developer quickstart](docs/quickstart.md) and the\n[compatibility matrix](docs/compatibility-matrix.md).\n\nFor LLM authoring, start with [the authoring guide](docs/llm-authoring.md), [dynamic composition](docs/dynamic-composition.md), and [local ecosystem verification](docs/ecosystem-development.md).\n\n## File naming\n\nOpen Presentation Format documents are JSON files. Use `*.opf.json` for complete OPF presentation documents, for example `board-review.opf.json` or `deck.opf.json`.\n\nAvoid using bare `*.opf` for OPF JSON. The `.opf` extension is already used by other document and project formats, while `.opf.json` keeps the OPF identity and still makes the underlying JSON format clear to editors, validators, agents, and version-control tooling.\n\n## Naming and reuse\n\nThe format name is **Open Presentation Format**. The schemas, catalogs, packages, and local tooling in this repository are free and open source under the MIT license, so third-party tools may read, write, validate, render, convert, and describe support for Open Presentation Format without adopting any product-specific branding.\n\n## Why OPF\n\n`.pptx` is a zipped bundle of XML. Humans can\'t diff it, LLMs can\'t read or write it reliably, and git can\'t track it meaningfully. Every change looks like a binary blob.\n\nOPF is plain JSON. A human can open it in an editor. A model can read and write it without guessing at schema-by-example. Decks live in git like the rest of your work.\n\nThat\'s the shift that lets LLMs actually *author* decks. When the format stops fighting them, models can do the work that matters \u2014 narrative structure, persuasive framing, data analysis, chart recommendations, ruthless revision passes \u2014 instead of wrestling with `<p:sp>` tags.\n\nAnd they don\'t start from a blank canvas. [pptx.gallery](https://pptx.gallery) is the human-browsable reference for OPF catalog presets: layouts, themes, color schemes, font schemes, chart types, narratives, audiences, purposes, tones, languages, and social platforms.\n\n## Start in three steps\n\n1. **Install the coordinated published packages** on Node 24. See [the developer quickstart](docs/quickstart.md) for the currently recorded registry pin set: core 0.20.3, renderer 0.20.2, PPTX/editor 0.20.3, CLI 0.20.0 and Gallery 3.0.0. The default catalog is supplied by `@openpresentation/gallery@3.0.0`; see the [compatibility matrix](docs/compatibility-matrix.md) for feature and native limits.\n2. **Author, validate, paginate, preview and export.** New to OPF? Run the [first deck](docs/first-deck/README.md) end to end first. Copy [`docs/quickstart/developer-quickstart.opf.json`](./docs/quickstart/developer-quickstart.opf.json) and run the commands in that guide. From code, `convert("deck.opf.md", "deck.pdf")` of `@openpresentation/opf` is the simple path to a PDF, PNG, SVG or PPTX file. `validate` / `opf validate` is one local checker for format, references, accessibility, layout and content ([guide](docs/validate.md)), not visual verification.\n3. **Know the limits.** PPTX export writes one text box per wrapped line, so text edited in PowerPoint or Keynote does not reflow (see [rich text](docs/rich-text.md)), and fonts are named, not embedded. The [compatibility matrix](docs/compatibility-matrix.md) lists shipped APIs versus renderer issue 24, native PowerPoint issue 87, and other deferred work. Browse presets at [pptx.gallery](https://pptx.gallery).\n\nYour deck can live in git from the first commit. After installing dependencies and supplying referenced assets, these commands run locally without a model provider, account or hosted OPF API.\n\n## JavaScript and TypeScript\n\nThe canonical JavaScript/TypeScript package is published at [`packages/javascript`](./packages/javascript) as [`@openpresentation/opf`](https://www.npmjs.com/package/@openpresentation/opf). The schema is pre-stable (0.x \u2014 expect breaking changes between minor versions until 1.0). Its responsibility is local and format-level only:\n\n- export the canonical schemas from [`spec/`](./spec)\n- register the pptx.gallery catalog of [`@openpresentation/gallery`](https://github.com/OpenPresentation/gallery) (a dependency, released on its own version line) as the Node defaults, as the CLI does; a browser host registers it itself\n- export a typed raw spec file manifest for package-addressable `spec/` content\n- generate TypeScript types, with `Presentation` as the top-level type\n- validate OPF JSON and catalog records locally\n\nIn Node (and Bun and Deno) its root also reads and writes files (`convert`, `open`, `save`) and draws them through the optional engines below; in a browser or a worker the same import is a browser-safe build with the same names, where those three reject with `node-only`. Every other entry runs in a browser. It does not generate content with AI, fetch remote catalogs, call hosted APIs, or provide managed services. Render/edit/convert packages live in separate MIT repos that depend on `@openpresentation/opf`. The format package also exposes pure composition geometry so those packages share layout behavior.\n\n## Toolkit libraries\n\nOPF is six packages. **Core** (`@openpresentation/opf`) is the format and its API: it reads and writes the text formats (JSON, YAML, Markdown) and validates, and in Node reads and writes files, through the same import. **The gallery** (`@openpresentation/gallery`) is the pptx.gallery catalog of layouts, themes, colour and font schemes and the other records, released on its own version line; core depends on it and registers it in Node. **The CLI** (`@openpresentation/cli`) is the `opf` command. **Render** (`opf-render`), **PPTX** (`opf-pptx`) and **the editor** (`opf-editor`) are the engines: drawing, PowerPoint and editing, installed as needed. The engines and the editor live in sibling repositories. See [ecosystem development](docs/ecosystem-development.md) for coordinated builds and verification, and [dynamic composition](docs/dynamic-composition.md) for portable layout rules.\n\n| Repo | Role | Boundary |\n|---|---|---|\n| [`gallery`](https://github.com/OpenPresentation/gallery) (`@openpresentation/gallery`) | The pptx.gallery catalog | Catalog records only, no runtime dependency; minor releases add records, a changed or removed record is a major release |\n| `cli` (`@openpresentation/cli`, this repository) | `opf` command | Runs core\'s Node engine: reads and writes files and calls the engines below as optional peers |\n| `opf-render` | OPF to SVG/PNG/PDF | Local and embeddable rendering library |\n| `opf-editor` | WYSIWYG bindings/components | Headless editor primitives plus optional UI components |\n| `opf-pptx` | OPF to PPTX and PPTX to OPF | Pure local import/export library for browser and server use where supported |\n\nThese repos provide OSS primitives only. Downstream applications own hosting, auth, storage, collaboration, queues, previews, analytics, support, and workflow UX.\n\n## Usage\n\nInstall from npm:\n\n```sh\npnpm add @openpresentation/opf\n# or: npm install @openpresentation/opf\n```\n\nTo work on the package itself, clone this repo and build the workspace:\n\n```sh\npnpm install\npnpm build\n```\n\nUse the format package from JavaScript or TypeScript:\n\n```ts\nimport { presentation, validate } from "@openpresentation/opf";\nimport { gallery } from "@openpresentation/gallery";\n\nimport type { Presentation } from "@openpresentation/opf";\n\nconst deck: Presentation = {\n name: "Quarterly Review",\n slides: [{ title: "Quarterly Review", items: ["Revenue", "Product", "Hiring"] }],\n};\n\nconst report = validate(deck);\nconsole.log(report.valid); // no finding has severity "error"\nconsole.log(report.findings); // every finding: rule id, severity, category, JSON Pointer path, message, fixes\n// Core ships no catalog records; in Node, validate registers the gallery when a call names no catalogs, and a host may name its own.\nconsole.log(validate({ ...deck, design: { theme: "classic" } }, { catalogs: [gallery] }).valid);\nconsole.log(Object.keys(gallery.audiences).length);\n```\n\nConvert, open and save files in Node with `@openpresentation/opf`, the same import a browser uses (the engines `@openpresentation/opf-render` and `@openpresentation/opf-pptx` are optional peers, installed as needed; see [OPF files in Node](docs/node.md)):\n\n```ts\nimport * as opf from "@openpresentation/opf";\n\nawait opf.convert("deck.opf.md", "deck.pdf");\nconst deck = await opf.open("deck.opf.md");\ndeck.slides.push({ title: "Q4" });\nawait opf.save(deck, "deck.opf.md");\nconst { files } = await opf.convert(deck, { format: "pptx" }); // bytes, nothing written\n```\n\nUse focused imports when you only need one surface:\n\n```ts\nimport { presentation } from "@openpresentation/opf/schemas";\nimport { specFileEntries } from "@openpresentation/opf/spec-files";\nimport { validate } from "@openpresentation/opf/validator";\nimport type { Presentation } from "@openpresentation/opf/types";\n```\n\nUse raw JSON when an engine or resolver needs package-addressable files:\n\n```ts\nimport presentationSchema from "@openpresentation/opf/spec/schemas/opf.schema.json" with {\n type: "json",\n};\n```\n\nUse the [installable OPF CLI](./packages/cli/README.md) to create, validate, and edit files locally:\n\n```sh\npnpm --filter @openpresentation/cli build\nnode packages/cli/dist/index.js create deck.opf.json --title "Decision brief"\nnode packages/cli/dist/index.js validate deck.opf.json\nnode packages/cli/dist/index.js edit deck.opf.json --patch changes.json --in-place\n```\n\nSee [CSV and JSON data import](./docs/data-import.md) for editable tables and charts in the editor, CLI, and package API, and [content conversions](./docs/conversions.md) for the pure converters (`@openpresentation/opf/convert`) that change a block\'s kind, nest list items, restructure a slide and split or merge slides, and [Markdown and outlines](./docs/markdown.md) for the deterministic Markdown dialect (`@openpresentation/opf/markdown`, `opf convert deck.md deck.opf.json`) that reads and writes a whole deck as text.\n\n[OPF as YAML](./docs/yaml.md) describes the strict YAML form of a deck (`@openpresentation/opf/yaml`, `opf convert deck.opf.json deck.opf.yaml`, `.opf.yaml` files in every command, editor autocomplete); JSON stays the canonical form. A deck can equally be a Markdown file, `deck.opf.md`: every command reads and writes it (see [Markdown decks in every command](./docs/markdown.md#markdown-decks-in-every-command)), and `parse` / `stringify` read and write a deck in JSON, YAML or Markdown with one call.\n\nSee [Templates and variables](./docs/templates-and-variables.md) for fillable OPF templates: typed variables, `{{id}}` tokens, `opf fill` and `resolveVariables`.\n\n## Layout\n\n| Path | Contents |\n|---|---|\n| [`spec/schemas/opf.schema.json`](./spec/schemas/opf.schema.json) | Canonical JSON Schema for top-level OPF `Presentation` documents. |\n| [`docs/how-opf-works.md`](./docs/how-opf-works.md) | Conceptual introduction: the document model, content shapes, catalog resolution, and the validation philosophy. Start here. |\n| [`docs/design-resolution.md`](./docs/design-resolution.md) | The design precedence algorithm (slide design \u2192 deck design \u2192 resolved theme \u2192 engine defaults) with worked examples. |\n| [`docs/schema-reference.md`](./docs/schema-reference.md) | Author-facing reference for top-level OPF fields and every presentation schema `$defs` object/type. |\n| [`docs/slide-sizes.md`](./docs/slide-sizes.md) | OPF\'s slide-size presets in inches, points and EMU, how they compare with PowerPoint\'s presets, and what PPTX export and import do with them. |\n| [`docs/catalog-schema-reference.md`](./docs/catalog-schema-reference.md) | Author-facing reference for every companion catalog schema. |\n| [`docs/content-payloads.md`](./docs/content-payloads.md) | Author-facing notes for slide and region content payloads, including chart and table object shapes. |\n| [`docs/footnotes-citations-captions.md`](./docs/footnotes-citations-captions.md) | Citations (`cite`), inline footnotes, the deck `references` list, captions on images, charts, tables and videos, and how every engine draws them. |\n| [`docs/examples.md`](./docs/examples.md) | Guide to the expanded scenario-oriented examples under `examples/gallery/`. |\n| [`docs/live-editor.md`](./docs/live-editor.md) | Browser canvas, live OPF editing, font loading, published packages, and current fidelity limits. |\n| [`docs/release-process.md`](./docs/release-process.md) | Maintainer runbook for tagging, trusted npm publishing, verification, and GitHub release notes. |\n| [`spec/schemas/*.schema.json`](./spec/schemas) | Companion schemas for catalog records and sub-objects. |\n| [`@openpresentation/gallery`](https://github.com/OpenPresentation/gallery) | The independently published default catalog and layout previews. |\n| [`spec/openapi.yaml`](./spec/openapi.yaml) | Optional reference OpenAPI contract for downstream services that choose to expose OPF over HTTP. OpenPresentation does not host this API. |\n| [`examples/technical/`](./examples/technical) | Focused OPF fixtures for validator, renderer, catalog-resolution, design, content-payload, and region behavior. |\n| [`examples/gallery/`](./examples/gallery) | Broader OPF example decks organized by industry, function, education, government, presentation type, international, and design/media scenarios. |\n| [`packages/javascript/`](./packages/javascript) | Public pre-stable source for `@openpresentation/opf`. |\n| [`packages/cli/`](./packages/cli) | Installable local CLI for creating, validating, editing, and inspecting OPF. |\n| [`legacy/`](./legacy) | Tombstone for service-specific clients, CLIs, tool integrations, and workflows removed from the OpenPresentation OSS repo. |\n\n## OpenPresentation Boundary\n\nOpenPresentation defines the format, bundled presets, local validation, examples, docs, and planned local render/edit/convert libraries. It does not provide hosted functions or managed product surfaces.\n\nFuture non-JavaScript OPF packages should follow the same local-first boundary: Python and Go packages should expose schemas, types/models, catalogs, validation, and package-addressable assets. Future toolkit packages should expose embeddable library APIs with no required network calls, hosted callbacks, hidden telemetry, or managed infrastructure assumptions.\n\nThe published JavaScript package copies package-addressable OPF schemas, catalogs, reference assets, and the optional reference `spec/openapi.yaml` from `spec/`. It intentionally remains `@openpresentation/opf` instead of introducing a separate `@openpresentation/opf-spec` package so downstream imports can advance by semver-pinning one canonical package.\n\n## License\n\nMIT. See [LICENSE](./LICENSE).\n';
|
|
3
3
|
|
|
4
4
|
// src/repo-readme.ts
|
|
5
5
|
var repoReadme = repoReadmeRaw;
|
package/dist/schemas.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './chunk-
|
|
1
|
+
export { audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './chunk-BWWGYOOG.js';
|
|
@@ -137,7 +137,12 @@
|
|
|
137
137
|
"message": { "type": "string" },
|
|
138
138
|
"keyword": { "type": "string", "description": "The JSON Schema keyword that failed, or `opf` for a rule the schema cannot express." },
|
|
139
139
|
"schemaPath": { "type": "string" },
|
|
140
|
-
"params": { "type": "object", "additionalProperties": true }
|
|
140
|
+
"params": { "type": "object", "additionalProperties": true },
|
|
141
|
+
"alternatives": {
|
|
142
|
+
"type": "array",
|
|
143
|
+
"items": { "type": "string" },
|
|
144
|
+
"description": "Present when the issue is the best match of a oneOf or anyOf: one line per other form the value was checked against and did not fit, such as `string: must be string`."
|
|
145
|
+
}
|
|
141
146
|
}
|
|
142
147
|
},
|
|
143
148
|
"Finding": {
|