@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
|
@@ -209,4 +209,4 @@ interface ValidationIssue {
|
|
|
209
209
|
};
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
export type {
|
|
212
|
+
export type { Finding as F, JsonPatchOperation as J, ValidationIssue as V, FindingCategory as a, FindingFix as b, FindingFocus as c, FindingLocation as d, FindingReport as e, FindingSeverity 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-YT7FMQER.js';
|
|
2
|
+
import './chunk-RA64UQKI.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,25 +1,55 @@
|
|
|
1
1
|
export { SchemaEntry, SchemaName, audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './schemas.js';
|
|
2
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,
|
|
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
4
|
export { SpecFileEntry, SpecFileKind, SpecFilePath, specFileEntries, specFileKinds, specFilePaths } from './spec-files.js';
|
|
5
|
-
import { P as Presentation } from './presentation-
|
|
5
|
+
import { P as Presentation } from './presentation-fb8CZmRq.js';
|
|
6
6
|
export { Audience, ChartType, ColorScheme, FontScheme, Language, Layout, Narrative, Purpose, SocialPlatform, Theme, Tone } from './types.js';
|
|
7
|
-
import {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export { C as CatalogDisplayKind, a as CatalogRecordKind, c as catalogDisplayKinds, b as catalogSchemaNames } from './catalog-schemas-
|
|
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-
|
|
7
|
+
import { c as CatalogKind, U as UnresolvedReferenceDiagnostic, d as CatalogOptions, b as Catalog, R as RecordProvenance } from './catalog-refs-C4K4y-vh.js';
|
|
8
|
+
export { C as CATALOG_GROUP_PATTERN, a 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-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
13
|
export { ApplyPatchOptions, OPFPatchError, OPFPatchValidationError, PatchResult, applyPatch } from './patch.js';
|
|
14
14
|
export { DiffOptions, MergeConflict, MergeOptions, MergeResult, PresentationDiff, diff, merge } from './diff.js';
|
|
15
15
|
export { FormatOptions, OPFFormatError, format } from './format.js';
|
|
16
16
|
export { FromMarkdownOptions, FromMarkdownResult, OPFMarkdownError, ToMarkdownOptions, ToMarkdownResult, fromMarkdown, toMarkdown } from './markdown.js';
|
|
17
|
-
export {
|
|
17
|
+
export { StringifyOptions, parse, stringify } from './deck.js';
|
|
18
18
|
export { DataCell, DataImportOptions, ImportDataOptions, ImportedChart, ImportedChartData, ImportedChartType, ImportedTable, OPFDataImportError, TabularData, importData, parseTabularData } from './data.js';
|
|
19
|
-
export {
|
|
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
20
|
export { FONT_POLICY, FontAvailability, FontAvailabilityCode, FontAvailabilityDiagnostic, FontLicenseClass, FontPolicyDecision, FontPolicyEntry, FontPolicyTable, FontReplacement, FontReplacementCompatibility, FontReplacementMeasurement, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor } from './font-policy.js';
|
|
21
|
+
export { D as DECK_FORMATS, a as DeckFormat, P as ParseOptions, d as deckFormatOf } from './deck-report-Bx3naFlF.js';
|
|
21
22
|
import './json-BFSdESOE.js';
|
|
22
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Slide-scoped built-in variables (FA-31): `{{slide.number}}`, `{{slide.section}}` and `{{deck.slideCount}}`.
|
|
26
|
+
*
|
|
27
|
+
* Their values depend on the slide being composed and on the deck after pagination, so the deck-wide
|
|
28
|
+
* `resolveVariables` leaves them as written (with an escaped `\{{slide.number}}` kept escaped) and they resolve
|
|
29
|
+
* here, per output slide: `resolveSlideVariables` for a slide's own strings and `substituteSlideTokens` for
|
|
30
|
+
* header and footer text, which `layoutFurniture` substitutes so it can mark each slide number as a live field.
|
|
31
|
+
* Pure: no clock, locale or I/O. See docs/templates-and-variables.md.
|
|
32
|
+
*/
|
|
33
|
+
/** The slide-scoped built-in names, in picker order. */
|
|
34
|
+
declare const SLIDE_SCOPED_BUILTINS: readonly ["slide.number", "slide.section", "deck.slideCount"];
|
|
35
|
+
type SlideScopedBuiltin = (typeof SLIDE_SCOPED_BUILTINS)[number];
|
|
36
|
+
/**
|
|
37
|
+
* A copy of `slide` with `{{slide.number}}`, `{{slide.section}}` and `{{deck.slideCount}}` substituted in every
|
|
38
|
+
* string (titles, body text, runs, table cells, chart data, notes, code), with the walk and exclusions of
|
|
39
|
+
* `resolveVariables`: `extensions` is never searched, an escaped `\{{slide.number}}` becomes the literal text
|
|
40
|
+
* `{{slide.number}}`, and unknown tokens stay as written. `slide.section` reads the slide's own `section` (empty
|
|
41
|
+
* text when it has none). The slide's own `design.header` and `design.footer` are left as written:
|
|
42
|
+
* `layoutFurniture` substitutes header and footer text itself and marks each slide number as a live field.
|
|
43
|
+
*
|
|
44
|
+
* Engines call it on each output slide after pagination, with the same `slideNumber` and `slideCount` they pass to
|
|
45
|
+
* `composeSlide`, and compose and draw the result; `resolveSlideContext` returns it as `slide`. Returns the input
|
|
46
|
+
* object itself when nothing changes; never mutates it.
|
|
47
|
+
*/
|
|
48
|
+
declare function resolveSlideVariables<T>(slide: T, values: {
|
|
49
|
+
slideNumber: number;
|
|
50
|
+
slideCount?: number;
|
|
51
|
+
}): T;
|
|
52
|
+
|
|
23
53
|
/** Whether two records have the same content once embedded (`$schema`, `id` and `x-*` ignored). */
|
|
24
54
|
declare function sameRecord(a: unknown, b: unknown): boolean;
|
|
25
55
|
/** One record `embed` or `copySlides` added to a document. */
|
|
@@ -250,7 +280,7 @@ interface HeaderFooterFact {
|
|
|
250
280
|
/** The deck sets it to `false`. */
|
|
251
281
|
suppressed: boolean;
|
|
252
282
|
zones: string[];
|
|
253
|
-
/** Fields set in any zone: logo, image, text,
|
|
283
|
+
/** Fields set in any zone: logo, image, text, socials, date. */
|
|
254
284
|
fields: string[];
|
|
255
285
|
}
|
|
256
286
|
interface TableFact {
|
|
@@ -523,4 +553,4 @@ interface StatsOptions extends CatalogOptions {
|
|
|
523
553
|
}
|
|
524
554
|
declare function stats(presentation: unknown, options?: StatsOptions): PresentationStats;
|
|
525
555
|
|
|
526
|
-
export { Catalog, CatalogKind, CatalogOptions, type CatalogPatchOperation, type CatalogRecordChange, type CatalogRef, type CatalogUpdate, type CopiedRecordRename, type CopySlidesResult, type DatasetFact, type EmbedResult, type EmbeddedRecord, type HeaderFooterFact, type MoveToCustomErrorCode, type MoveToCustomPatchOperation, type MoveToCustomResult, type MovedRecord, OPFMoveToCustomError, Presentation, type PresentationStats, RecordProvenance, type ReferenceFact, type ResolvedDesignRecords, type SlideSizeFact, type SlideStats, type StatsOptions, type StatsSlideRef, type TableFact, UnresolvedReferenceDiagnostic, copySlides, embed, moveToCustom, resolveDesignRecords, resolveFontScheme, sameRecord, stats, updateFromCatalog };
|
|
556
|
+
export { Catalog, CatalogKind, CatalogOptions, type CatalogPatchOperation, type CatalogRecordChange, type CatalogRef, type CatalogUpdate, type CopiedRecordRename, type CopySlidesResult, type DatasetFact, type EmbedResult, type EmbeddedRecord, type HeaderFooterFact, type MoveToCustomErrorCode, type MoveToCustomPatchOperation, type MoveToCustomResult, type MovedRecord, OPFMoveToCustomError, Presentation, type PresentationStats, RecordProvenance, type ReferenceFact, type ResolvedDesignRecords, SLIDE_SCOPED_BUILTINS, type SlideScopedBuiltin, type SlideSizeFact, type SlideStats, type StatsOptions, type StatsSlideRef, type TableFact, UnresolvedReferenceDiagnostic, copySlides, embed, moveToCustom, resolveDesignRecords, resolveFontScheme, resolveSlideVariables, sameRecord, stats, updateFromCatalog };
|