@openpresentation/opf 0.32.1 → 0.34.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 +9 -0
- package/dist/browser.js +22 -21
- package/dist/catalog-refs-CoIrOdAw.d.ts +937 -0
- package/dist/{catalog-schemas-LdqOPebq.d.ts → catalog-schemas-FjLRPtjB.d.ts} +10 -4
- package/dist/{chart-data-oIZQlFGi.d.ts → chart-data-B_k-WTex.d.ts} +7 -4
- package/dist/{chunk-PB7ME64J.js → chunk-244OPLAV.js} +1 -1
- package/dist/{chunk-IT7FQKED.js → chunk-2HX4BGAS.js} +6 -6
- package/dist/{chunk-2E6CDYL2.js → chunk-36DLVJGW.js} +19 -16
- package/dist/{chunk-XQO2CT6Q.js → chunk-3THGTDL2.js} +2 -2
- package/dist/{chunk-CLRYHWQN.js → chunk-42JBXJKW.js} +187 -25
- package/dist/chunk-BLCDUM7B.js +7 -0
- package/dist/{chunk-NVAJASOD.js → chunk-CJVKOJ6B.js} +10195 -2036
- package/dist/{chunk-XFHXQCXL.js → chunk-DQ7QYOUV.js} +99 -13
- package/dist/{chunk-NEJ32O7X.js → chunk-F6BXO4AI.js} +1 -1
- package/dist/{chunk-OXLA4HXQ.js → chunk-FAXO3SUE.js} +1196 -313
- package/dist/{chunk-J63CIRIV.js → chunk-FIQMAIZV.js} +4 -4
- package/dist/{chunk-PJSPHHRK.js → chunk-FK5XG742.js} +3 -16
- package/dist/{chunk-HKUV7NEN.js → chunk-HHVQ2SDT.js} +1 -1
- package/dist/{chunk-SZFO3MAJ.js → chunk-HUGVYHZ2.js} +4 -4
- package/dist/{chunk-LEF4X4KI.js → chunk-LCT5ZV3Q.js} +2400 -222
- package/dist/chunk-NLJFNCZ4.js +1560 -0
- package/dist/{chunk-GM7WFPGG.js → chunk-PRXZD2II.js} +6 -1
- package/dist/{chunk-YFJIIIOL.js → chunk-QGJVOPLG.js} +3 -3
- package/dist/{chunk-F7DN33UL.js → chunk-QGTJF7HV.js} +16 -14
- package/dist/{chunk-ONVFUVQ5.js → chunk-RUV7CCE6.js} +136 -31
- package/dist/{chunk-SW676APJ.js → chunk-U7TYSPYM.js} +2 -2
- package/dist/chunk-UJZN2ZH6.js +1 -0
- package/dist/chunk-VDZXNNZF.js +221 -0
- package/dist/{chunk-UJSAR6GF.js → chunk-W4DYDRV2.js} +21 -0
- package/dist/chunk-WCPDN7AY.js +642 -0
- package/dist/{chunk-BBVW5ZC2.js → chunk-WMFT5R7I.js} +2 -2
- package/dist/{chunk-AQEAZDL2.js → chunk-XJUMFH33.js} +2 -1
- package/dist/{composition-Ds6WHyO7.d.ts → composition-CvtvgBDE.d.ts} +2783 -873
- package/dist/composition.d.ts +4 -3
- package/dist/composition.js +3 -2
- package/dist/{conversion-CdzrTxib.d.ts → conversion-B_5AKTYQ.d.ts} +39 -10
- package/dist/conversion-CMBGOTAC.js +25 -0
- package/dist/convert.d.ts +5 -4
- package/dist/convert.js +17 -13
- package/dist/data.d.ts +2 -2
- package/dist/data.js +4 -3
- package/dist/{deck-report-CKDNQ2t4.d.ts → deck-report-BVlQZ42f.d.ts} +3 -3
- package/dist/deck.d.ts +7 -6
- package/dist/deck.js +13 -12
- package/dist/diagram-engine-eager.js +6 -2
- package/dist/diagram-engine-lazy.js +14 -1
- package/dist/diagram-plantuml-XRZ6VAOL.js +3 -0
- package/dist/diff.js +6 -5
- package/dist/docs.js +88 -52
- package/dist/examples.js +28745 -18393
- package/dist/font-policy.js +2 -2
- package/dist/format.js +3 -3
- package/dist/ids.js +6 -5
- package/dist/index.d.ts +19 -16
- package/dist/index.js +37 -26
- package/dist/markdown.d.ts +3 -2
- package/dist/markdown.js +10 -9
- package/dist/node-engine.d.ts +44 -11
- package/dist/node-engine.js +47 -28
- package/dist/{pagination-DRZ_JNFY.d.ts → pagination-CZQQYk7L.d.ts} +22 -4
- package/dist/pagination.d.ts +5 -4
- package/dist/pagination.js +6 -5
- package/dist/patch.js +5 -4
- package/dist/precompiled.js +3 -3
- package/dist/{presentation-DnD7mfmf.d.ts → presentation-s9262acV.d.ts} +1172 -208
- package/dist/repo-readme.js +2 -2
- package/dist/schema-engine-ajv.js +2 -2
- package/dist/schema-engine-precompiled.js +3 -3
- package/dist/schema.d.ts +3 -3
- package/dist/schema.js +5 -4
- package/dist/schemas.d.ts +56 -4
- package/dist/schemas.js +2 -2
- package/dist/shape-catalog.d.ts +98 -0
- package/dist/shape-catalog.js +302 -0
- package/dist/shape-engine-eager.js +9 -0
- package/dist/shape-engine-lazy.js +12 -0
- package/dist/shape-engine-module-N74FCHGY.js +3 -0
- package/dist/shape-geometry.d.ts +126 -0
- package/dist/shape-geometry.js +2 -0
- package/dist/source.d.ts +10 -5
- package/dist/source.js +12 -11
- package/dist/spec/README.md +1 -1
- package/dist/spec/reference/engine-vocabularies.json +135 -0
- package/dist/spec/reference/font-policy.json +3 -16
- package/dist/spec/reference/preset-geometry.json +10699 -0
- package/dist/spec/reference/preset-geometry.schema.json +126 -0
- package/dist/spec/schemas/catalog-index.schema.json +1 -0
- package/dist/spec/schemas/chart-type.schema.json +4 -4
- package/dist/spec/schemas/icon-set.schema.json +75 -0
- package/dist/spec/schemas/layout.schema.json +82 -23
- package/dist/spec/schemas/opf.schema.json +1616 -296
- package/dist/spec/schemas/theme.schema.json +11 -5
- package/dist/spec-files.d.ts +1 -1
- package/dist/spec-files.js +2 -2
- package/dist/symbol-font-encodings.js +1 -1
- package/dist/types.d.ts +83 -71
- package/dist/{validation-types-DxyYPebs.d.ts → validation-types-CYbsUuZ9.d.ts} +8 -5
- package/dist/validator.d.ts +35 -7
- package/dist/validator.js +5 -4
- package/dist/yaml.d.ts +3 -2
- package/dist/yaml.js +9 -8
- package/package.json +22 -6
- package/dist/catalog-refs-kAefsZWT.d.ts +0 -129
- package/dist/chunk-DGS47ONG.js +0 -1
- package/dist/conversion-5FUDQPED.js +0 -24
package/dist/font-policy.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { FONT_POLICY, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { FONT_POLICY, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor } from './chunk-FK5XG742.js';
|
|
2
|
+
import './chunk-PRXZD2II.js';
|
package/dist/format.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { OPFFormatError, format, isFormatted, sortPresentationKeys } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { OPFFormatError, format, isFormatted, sortPresentationKeys } from './chunk-HHVQ2SDT.js';
|
|
2
|
+
import './chunk-LCT5ZV3Q.js';
|
|
3
|
+
import './chunk-PRXZD2II.js';
|
package/dist/ids.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { OPFIdError, assignIds, touches } from './chunk-
|
|
2
|
-
export { OPFPatchHashError, documentHash, idToken, isIdToken, resolveIdPatch, resolveIdPointer, toIdPatch, toIdPointer } from './chunk-
|
|
1
|
+
export { OPFIdError, assignIds, touches } from './chunk-U7TYSPYM.js';
|
|
2
|
+
export { OPFPatchHashError, documentHash, idToken, isIdToken, resolveIdPatch, resolveIdPointer, toIdPatch, toIdPointer } from './chunk-FAXO3SUE.js';
|
|
3
3
|
import './chunk-JBARNYFR.js';
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
4
|
+
import './chunk-LCT5ZV3Q.js';
|
|
5
|
+
import './chunk-CJVKOJ6B.js';
|
|
6
|
+
import './chunk-BLCDUM7B.js';
|
|
7
|
+
import './chunk-PRXZD2II.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
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 { a4 as ConvertInput, a5 as ConvertOptions, a6 as ConvertResult, a7 as ConvertFormat, a8 as OpenOptions, a9 as SaveOptions, aa as SaveResult } from './conversion-
|
|
3
|
-
export { ab as ConvertedFile, i as ExportFormat, F as FontsHandle, O as OPFApiError, o as OPFExportError, p as OPFImportError, S as SlideSelection, W as parseSlideSelection } from './conversion-
|
|
2
|
+
import { a4 as ConvertInput, a5 as ConvertOptions, a6 as ConvertResult, a7 as ConvertFormat, a8 as OpenOptions, a9 as SaveOptions, aa as SaveResult } from './conversion-B_5AKTYQ.js';
|
|
3
|
+
export { ab as ConvertedFile, i as ExportFormat, F as FontsHandle, O as OPFApiError, o as OPFExportError, p as OPFImportError, S as SlideSelection, W as parseSlideSelection } from './conversion-B_5AKTYQ.js';
|
|
4
4
|
export { R as RuleExplanation, e as explain } from './explain-iZeNOUc6.js';
|
|
5
|
-
import { validate as validate$1 } from './validator.js';
|
|
6
|
-
export { DEFAULT_VALIDATION_THRESHOLDS, OPFValidationError, assertValid, assertValidCatalogRecord, findValidationRule, validateCatalogRecord, validationRules } from './validator.js';
|
|
7
|
-
import { R as ResolveVariablesOptions, h as VariableDiagnostic } from './validation-types-
|
|
8
|
-
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-
|
|
9
|
-
import {
|
|
10
|
-
export {
|
|
5
|
+
import { createValidator as createValidator$1, validate as validate$1 } from './validator.js';
|
|
6
|
+
export { DEFAULT_VALIDATION_THRESHOLDS, OPFValidationError, ValidationCacheInfo, Validator, assertValid, assertValidCatalogRecord, findValidationRule, validateCatalogRecord, validationRules } from './validator.js';
|
|
7
|
+
import { R as ResolveVariablesOptions, h as VariableDiagnostic } from './validation-types-CYbsUuZ9.js';
|
|
8
|
+
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-CYbsUuZ9.js';
|
|
9
|
+
import { a as FontFamilies, T as TextMeasurement } from './composition-CvtvgBDE.js';
|
|
10
|
+
export { b as CHART_TYPES, c as ChartDrawPlan, d as ChartFallback, C as ComposeSlideOptions, E as ENGINE_DEFAULT_CHART_TYPES, e as ENGINE_DEFAULT_COLOR_SCHEME, f as ENGINE_DEFAULT_FONT_SCHEME, g as ENGINE_DEFAULT_THEME, F as Fonts, h as LANGUAGES, i as LOGO_SHAPES, j as LanguageFamilyName, k as LanguageVocabulary, L as LayoutDiagnostic, l as LogoShape, m as LogoVariant, n as MeasureTextWidth, N as NumberLocale, R as ResolveLogoOptions, o as ResolvedLogo, S as SOCIAL_PLATFORMS, p as SocialPlatformVocabulary, q as TextStyle, r as asciiDigits, s as chartDrawDiagnostics, t as chartDrawPlan, u as diagramsPending, v as ensureDiagrams, w as ensureShapes, x as formatNumber, y as formatPercentNumber, z as isPlaceLabel, A as isSupportedNumberingSystem, B as languageInEffect, D as localizeDigits, G as markLabelColor, H as normalizeLanguageFamily, I as numberLocale, J as numberingSystemExtension, K as numberingSystemOf, O as numeralScripts, P as plainLanguageTag, Q as shapesPending, U as supportedNumberingSystems } from './composition-CvtvgBDE.js';
|
|
11
11
|
export { SpecFileEntry, SpecFileKind, SpecFilePath, specFileEntries, specFileKinds, specFilePaths } from './spec-files.js';
|
|
12
|
-
import { P as Presentation } from './presentation-
|
|
12
|
+
import { P as Presentation } from './presentation-s9262acV.js';
|
|
13
13
|
export { Audience, ChartType, ColorScheme, FontScheme, Language, Layout, Narrative, Purpose, SocialPlatform, Theme, Tone } from './types.js';
|
|
14
|
-
import { a as CatalogKind, U as UnresolvedReferenceDiagnostic,
|
|
15
|
-
export {
|
|
14
|
+
import { a as CatalogKind, U as UnresolvedReferenceDiagnostic, d as CatalogOptions, C as Catalog, c as RecordProvenance } from './catalog-refs-CoIrOdAw.js';
|
|
15
|
+
export { e as CATALOG_GROUP_PATTERN, f as CATALOG_REFERENCE_PATTERN, g as CatalogRecordMap, h as CatalogRecords, i as CatalogReferenceSite, I as IconOptions, j as IconReference, k as IconResolution, l as IconSetRecord, O as OPFCatalogsOptionError, m as OPFUnresolvedReferenceError, n as ResolvedIcon, o as ResolvedReference, p as catalogGroupSource, q as catalogKinds, r as catalogRecords, s as catalogReferenceSites, t as embedIcons, u as ensureIcons, v as iconsPending, w as nearIconNames, x as parseIconReference, y as parseReference, z as resolveIcon, A as resolveReference, B as unresolvedReference } from './catalog-refs-CoIrOdAw.js';
|
|
16
16
|
import { a as Finding, J as JsonPatchOperation } from './finding-l9dlQ2NF.js';
|
|
17
17
|
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';
|
|
18
|
-
export { a as CATALOG_SCHEMA, b as CatalogDisplayKind, C as CatalogRecordKind, c as catalogDisplayKinds, d as catalogSchemaNames } from './catalog-schemas-
|
|
18
|
+
export { a as CATALOG_SCHEMA, b as CatalogDisplayKind, C as CatalogRecordKind, c as catalogDisplayKinds, d as catalogIconKinds, e as catalogSchemaNames } from './catalog-schemas-FjLRPtjB.js';
|
|
19
19
|
import { continueOverfull as continueOverfull$1, paginate as paginate$1 } from './pagination.js';
|
|
20
|
-
export { C as ContinuationResult, d as ContinuedSlide, O as OPFPaginationError, P as PaginatedPage, e as PaginationMapping, f as PaginationOptions, g as PaginationResult, a as PresentationPaginationOptions, b as PresentationPaginationResult, S as SlideContext, h as SlideContextDiagnostic, i as SlideContextOptions, j as blockUnits, k as continuationPages, l as paginateSlide, r as resolveSlideContext } from './pagination-
|
|
20
|
+
export { C as ContinuationResult, d as ContinuedSlide, O as OPFPaginationError, P as PaginatedPage, e as PaginationMapping, f as PaginationOptions, g as PaginationResult, a as PresentationPaginationOptions, b as PresentationPaginationResult, S as SlideContext, h as SlideContextDiagnostic, i as SlideContextOptions, j as blockUnits, k as continuationPages, l as paginateSlide, r as resolveSlideContext } from './pagination-CZQQYk7L.js';
|
|
21
21
|
export { ApplyPatchOptions, OPFPatchError, OPFPatchHashError, OPFPatchValidationError, PatchResult, applyPatch, documentHash, idToken, isIdToken, resolveIdPatch, resolveIdPointer, toIdPatch, toIdPointer } from './patch.js';
|
|
22
22
|
export { AssignIdsContext, AssignIdsOptions, AssignIdsResult, AssignedId, IdErrorCode, OPFIdError, PatchScope, PatchScopeKind, PatchTouch, assignIds, touches } from './ids.js';
|
|
23
23
|
export { DiffOptions, MergeConflict, MergeOptions, MergeResult, PresentationDiff, diff, merge } from './diff.js';
|
|
@@ -25,10 +25,11 @@ export { FormatOptions, OPFFormatError, format } from './format.js';
|
|
|
25
25
|
export { FromMarkdownOptions, FromMarkdownResult, OPFMarkdownError, ToMarkdownOptions, ToMarkdownResult, fromMarkdown, toMarkdown } from './markdown.js';
|
|
26
26
|
export { StringifyOptions, parse, stringify } from './deck.js';
|
|
27
27
|
export { DataCell, DataImportOptions, ImportedChart, ImportedChartData, ImportedChartType, ImportedTable, IngestOptions, OPFDataImportError, TabularData, ingest, parseTabularData } from './data.js';
|
|
28
|
-
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-
|
|
28
|
+
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-B_k-WTex.js';
|
|
29
29
|
export { FONT_POLICY, FontAvailability, FontAvailabilityCode, FontAvailabilityDiagnostic, FontLicenseClass, FontPolicyDecision, FontPolicyEntry, FontPolicyTable, FontReplacement, FontReplacementCompatibility, FontReplacementMeasurement, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor } from './font-policy.js';
|
|
30
|
-
export { a as DECK_FORMATS, D as DeckFormat, P as ParseOptions, d as deckFormatOf } from './deck-report-
|
|
30
|
+
export { a as DECK_FORMATS, D as DeckFormat, P as ParseOptions, d as deckFormatOf } from './deck-report-BVlQZ42f.js';
|
|
31
31
|
import './json-BFSdESOE.js';
|
|
32
|
+
import './shape-geometry.js';
|
|
32
33
|
|
|
33
34
|
/**
|
|
34
35
|
* Slide-scoped built-in variables (FA-31): `{{slide.number}}`, `{{slide.section}}` and `{{deck.slideCount}}`.
|
|
@@ -670,6 +671,8 @@ declare function resolveDrawnFontFamilies<T extends Partial<FontFamilies>>(famil
|
|
|
670
671
|
|
|
671
672
|
/** `validate` with the gallery registered when `catalogs` is omitted, as `opf validate` does. */
|
|
672
673
|
declare const validate: typeof validate$1;
|
|
674
|
+
/** A session validator with the same default gallery as Node validate(). Its clear() invalidates retained geometry. */
|
|
675
|
+
declare const createValidator: typeof createValidator$1;
|
|
673
676
|
/** `stats` with the gallery registered when `catalogs` is omitted, as `opf stats` does. */
|
|
674
677
|
declare const stats: typeof stats$1;
|
|
675
678
|
/** `paginate` with the gallery registered when `catalogs` is omitted, as `opf paginate` does. Pass `fonts` (opf-render's `loadFonts()`) for measured page breaks. */
|
|
@@ -721,5 +724,5 @@ declare function open(input: string | Uint8Array | ArrayBuffer, options?: OpenOp
|
|
|
721
724
|
*/
|
|
722
725
|
declare function save(deck: Presentation, path: string, options?: SaveOptions): Promise<SaveResult>;
|
|
723
726
|
|
|
724
|
-
export { Catalog, CatalogKind, CatalogOptions, ConvertFormat, ConvertInput, ConvertOptions, ConvertResult, Finding, FontFamilies, JsonPatchOperation, OPFMoveToCustomError, OpenOptions, Presentation, RecordProvenance, ResolveVariablesOptions, SLIDE_SCOPED_BUILTINS, SaveOptions, SaveResult, TextMeasurement, UnresolvedReferenceDiagnostic, VariableDiagnostic, continueOverfull, convert, copySlides, edit, embed, fill, fillRecords, localAssetSources, moveToCustom, open, paginate, resolveDesignRecords, resolveDrawnFontFamilies, resolveFontScheme, resolveSlideVariables, sameRecord, save, stats, updateFromCatalog, validate };
|
|
727
|
+
export { Catalog, CatalogKind, CatalogOptions, ConvertFormat, ConvertInput, ConvertOptions, ConvertResult, Finding, FontFamilies, JsonPatchOperation, OPFMoveToCustomError, OpenOptions, Presentation, RecordProvenance, ResolveVariablesOptions, SLIDE_SCOPED_BUILTINS, SaveOptions, SaveResult, TextMeasurement, UnresolvedReferenceDiagnostic, VariableDiagnostic, continueOverfull, convert, copySlides, createValidator, edit, embed, fill, fillRecords, localAssetSources, moveToCustom, open, paginate, resolveDesignRecords, resolveDrawnFontFamilies, resolveFontScheme, resolveSlideVariables, sameRecord, save, stats, updateFromCatalog, validate };
|
|
725
728
|
export type { CatalogPatchOperation, CatalogRecordChange, CatalogRef, CatalogUpdate, CopiedRecordRename, CopySlidesResult, DatasetFact, EditOptions, EditResult, EmbedResult, EmbeddedRecord, FillOptions, FillRecord, FillResult, FilledDeck, HeaderFooterFact, MoveToCustomErrorCode, MoveToCustomPatchOperation, MoveToCustomResult, MovedRecord, PresentationStats, ReferenceFact, ResolvedDesignRecords, SlideScopedBuiltin, SlideSizeFact, SlideStats, StatsOptions, StatsSlideRef, TableFact };
|
package/dist/index.js
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { defaultCatalogs } from './chunk-
|
|
2
|
-
import { stats, embed, edit, OPFApiError, asApiError } from './chunk-
|
|
3
|
-
export { OPFApiError, OPFExportError, OPFImportError, OPFMoveToCustomError, copySlides, fill, fillRecords, localAssetSources, moveToCustom, parseSlideSelection, sameRecord, updateFromCatalog } from './chunk-
|
|
4
|
-
export { specFileEntries, specFileKinds, specFilePaths } from './chunk-
|
|
5
|
-
export { FONT_POLICY, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor } from './chunk-
|
|
6
|
-
export { OPFDataImportError, ingest, parseTabularData } from './chunk-
|
|
7
|
-
import { paginate, continueOverfull } from './chunk-
|
|
8
|
-
export { OPFPaginationError, blockUnits, continuationPages, paginateSlide } from './chunk-
|
|
9
|
-
export { DECK_FORMATS, deckFormatOf, parse, stringify } from './chunk-
|
|
10
|
-
export { fromMarkdown, toMarkdown } from './chunk-
|
|
11
|
-
import './chunk-
|
|
12
|
-
export { OPFFormatError, format } from './chunk-
|
|
1
|
+
import { defaultCatalogs } from './chunk-XJUMFH33.js';
|
|
2
|
+
import { stats, embed, edit, OPFApiError, asApiError } from './chunk-HUGVYHZ2.js';
|
|
3
|
+
export { OPFApiError, OPFExportError, OPFImportError, OPFMoveToCustomError, copySlides, fill, fillRecords, localAssetSources, moveToCustom, parseSlideSelection, sameRecord, updateFromCatalog } from './chunk-HUGVYHZ2.js';
|
|
4
|
+
export { specFileEntries, specFileKinds, specFilePaths } from './chunk-W4DYDRV2.js';
|
|
5
|
+
export { FONT_POLICY, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor } from './chunk-FK5XG742.js';
|
|
6
|
+
export { OPFDataImportError, ingest, parseTabularData } from './chunk-244OPLAV.js';
|
|
7
|
+
import { paginate, continueOverfull } from './chunk-42JBXJKW.js';
|
|
8
|
+
export { OPFPaginationError, blockUnits, continuationPages, paginateSlide } from './chunk-42JBXJKW.js';
|
|
9
|
+
export { DECK_FORMATS, deckFormatOf, parse, stringify } from './chunk-FIQMAIZV.js';
|
|
10
|
+
export { fromMarkdown, toMarkdown } from './chunk-QGTJF7HV.js';
|
|
11
|
+
import './chunk-2HX4BGAS.js';
|
|
12
|
+
export { OPFFormatError, format } from './chunk-HHVQ2SDT.js';
|
|
13
13
|
import './chunk-RYZPBJLB.js';
|
|
14
|
-
export { explain } from './chunk-
|
|
15
|
-
import './chunk-
|
|
16
|
-
import './chunk-
|
|
17
|
-
export { OPFMarkdownError } from './chunk-
|
|
18
|
-
import './chunk-
|
|
19
|
-
export { OPFIdError, assignIds, touches } from './chunk-
|
|
20
|
-
export { diff, merge } from './chunk-
|
|
21
|
-
import { validate, OPFValidationError } from './chunk-
|
|
22
|
-
export { CATALOG_SCHEMA, DEFAULT_VALIDATION_THRESHOLDS, OPFPatchError, OPFPatchHashError, OPFPatchValidationError, OPFValidationError, applyPatch, assertValid, assertValidCatalogRecord, catalogDisplayKinds, catalogSchemaNames, documentHash, findValidationRule, idToken, isIdToken, resolveDrawnFontFamilies, resolveIdPatch, resolveIdPointer, resolveSlideContext, toIdPatch, toIdPointer, validateCatalogRecord, validationCategories, validationRules } from './chunk-
|
|
14
|
+
export { explain } from './chunk-DQ7QYOUV.js';
|
|
15
|
+
import './chunk-36DLVJGW.js';
|
|
16
|
+
import './chunk-F6BXO4AI.js';
|
|
17
|
+
export { OPFMarkdownError } from './chunk-WMFT5R7I.js';
|
|
18
|
+
import './chunk-3THGTDL2.js';
|
|
19
|
+
export { OPFIdError, assignIds, touches } from './chunk-U7TYSPYM.js';
|
|
20
|
+
export { diff, merge } from './chunk-QGJVOPLG.js';
|
|
21
|
+
import { validate, createValidator, OPFValidationError } from './chunk-FAXO3SUE.js';
|
|
22
|
+
export { CATALOG_SCHEMA, DEFAULT_VALIDATION_THRESHOLDS, OPFPatchError, OPFPatchHashError, OPFPatchValidationError, OPFValidationError, applyPatch, assertValid, assertValidCatalogRecord, catalogDisplayKinds, catalogIconKinds, catalogSchemaNames, documentHash, findValidationRule, idToken, isIdToken, resolveDrawnFontFamilies, resolveIdPatch, resolveIdPointer, resolveSlideContext, toIdPatch, toIdPointer, validateCatalogRecord, validationCategories, validationRules } from './chunk-FAXO3SUE.js';
|
|
23
23
|
import './chunk-JBARNYFR.js';
|
|
24
|
-
export { audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './chunk-
|
|
25
|
-
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, chartDrawDiagnostics, chartDrawPlan, chartNumber, coerceVariableValue, datasetDiagnostics, diagramsPending, ensureDiagrams, formatDataNumber, formatVariableNumber, fromExcelNumberFormat, hasContentVariables, inlineChartData, inlineDatasets, inlineTableData, isDatasetRef, isPlaceLabel, isTemplate, isXYChartType, listBuiltinVariables, listVariables, markLabelColor, normalizeLanguageFamily, numberFormatError, parseReference, resolveChartData, resolveDesignRecords, resolveFontScheme, resolveReference, resolveSlideVariables, resolveTableData, resolveVariables, suggestChartNumberFix, tableCellDisplayValue, toExcelNumberFormat, unresolvedReference, unusedDatasets, variableDeclarations } from './chunk-
|
|
26
|
-
import './chunk-
|
|
24
|
+
export { audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './chunk-LCT5ZV3Q.js';
|
|
25
|
+
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, asciiDigits, catalogGroupSource, catalogKinds, catalogRecords, catalogReferenceSites, chartDrawDiagnostics, chartDrawPlan, chartNumber, coerceVariableValue, datasetDiagnostics, diagramsPending, embedIcons, ensureDiagrams, ensureIcons, ensureShapes, formatDataNumber, formatNumber, formatPercentNumber, formatVariableNumber, fromExcelNumberFormat, hasContentVariables, iconsPending, inlineChartData, inlineDatasets, inlineTableData, isDatasetRef, isPlaceLabel, isSupportedNumberingSystem, isTemplate, isXYChartType, languageInEffect, listBuiltinVariables, listVariables, localizeDigits, markLabelColor, nearIconNames, normalizeLanguageFamily, numberFormatError, numberLocale, numberingSystemExtension, numberingSystemOf, numeralScripts, parseIconReference, parseReference, plainLanguageTag, resolveChartData, resolveDesignRecords, resolveFontScheme, resolveIcon, resolveReference, resolveSlideVariables, resolveTableData, resolveVariables, shapesPending, suggestChartNumberFix, supportedNumberingSystems, tableCellDisplayValue, toExcelNumberFormat, unresolvedReference, unusedDatasets, variableDeclarations } from './chunk-CJVKOJ6B.js';
|
|
26
|
+
import './chunk-BLCDUM7B.js';
|
|
27
|
+
import './chunk-PRXZD2II.js';
|
|
27
28
|
|
|
28
29
|
// src/index.ts
|
|
29
30
|
var withDefaultCatalog = (options) => {
|
|
@@ -32,12 +33,22 @@ var withDefaultCatalog = (options) => {
|
|
|
32
33
|
return { ...options, catalogs: defaultCatalogs() };
|
|
33
34
|
};
|
|
34
35
|
var validate2 = (input, options) => validate(input, withDefaultCatalog(options));
|
|
36
|
+
var createValidator2 = () => {
|
|
37
|
+
const checker = createValidator();
|
|
38
|
+
return {
|
|
39
|
+
validate: (input, options) => checker.validate(input, withDefaultCatalog(options)),
|
|
40
|
+
clear: () => checker.clear(),
|
|
41
|
+
get cache() {
|
|
42
|
+
return checker.cache;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
};
|
|
35
46
|
var stats2 = (presentation2, options) => stats(presentation2, withDefaultCatalog(options));
|
|
36
47
|
var paginate2 = (input, options) => paginate(input, withDefaultCatalog(options));
|
|
37
48
|
var continueOverfull2 = (input, options) => continueOverfull(input, withDefaultCatalog(options));
|
|
38
49
|
var embed2 = (document, options) => embed(document, withDefaultCatalog(options));
|
|
39
50
|
var edit2 = (deck, patch, options) => edit(deck, patch, withDefaultCatalog(options));
|
|
40
|
-
var engine = () => import('./conversion-
|
|
51
|
+
var engine = () => import('./conversion-CMBGOTAC.js');
|
|
41
52
|
var rethrow = (error, fallback) => {
|
|
42
53
|
if (error instanceof OPFValidationError) throw error;
|
|
43
54
|
throw asApiError(OPFApiError, error, fallback);
|
|
@@ -66,4 +77,4 @@ async function save(deck, path, options = {}) {
|
|
|
66
77
|
}
|
|
67
78
|
}
|
|
68
79
|
|
|
69
|
-
export { continueOverfull2 as continueOverfull, convert, edit2 as edit, embed2 as embed, open, paginate2 as paginate, save, stats2 as stats, validate2 as validate };
|
|
80
|
+
export { continueOverfull2 as continueOverfull, convert, createValidator2 as createValidator, edit2 as edit, embed2 as embed, open, paginate2 as paginate, save, stats2 as stats, validate2 as validate };
|
package/dist/markdown.d.ts
CHANGED
|
@@ -2,8 +2,9 @@ import { Catalog } from './composition.js';
|
|
|
2
2
|
import { Presentation } from './index.js';
|
|
3
3
|
import { Finding, FindingLocation } from './index.js';
|
|
4
4
|
import { ValidateOptions, ValidationReport } from './index.js';
|
|
5
|
-
import './composition-
|
|
6
|
-
import './chart-data-
|
|
5
|
+
import './composition-CvtvgBDE.js';
|
|
6
|
+
import './chart-data-B_k-WTex.js';
|
|
7
|
+
import './shape-geometry.js';
|
|
7
8
|
import './json-BFSdESOE.js';
|
|
8
9
|
|
|
9
10
|
interface EmbeddedPart {
|
package/dist/markdown.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export { fromMarkdown, toMarkdown } from './chunk-
|
|
1
|
+
export { fromMarkdown, toMarkdown } from './chunk-QGTJF7HV.js';
|
|
2
2
|
import './chunk-RYZPBJLB.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
export { OPFMarkdownError } from './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
3
|
+
import './chunk-36DLVJGW.js';
|
|
4
|
+
import './chunk-F6BXO4AI.js';
|
|
5
|
+
export { OPFMarkdownError } from './chunk-WMFT5R7I.js';
|
|
6
|
+
import './chunk-3THGTDL2.js';
|
|
7
|
+
import './chunk-FAXO3SUE.js';
|
|
8
8
|
import './chunk-JBARNYFR.js';
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-
|
|
9
|
+
import './chunk-LCT5ZV3Q.js';
|
|
10
|
+
import './chunk-CJVKOJ6B.js';
|
|
11
|
+
import './chunk-BLCDUM7B.js';
|
|
12
|
+
import './chunk-PRXZD2II.js';
|
package/dist/node-engine.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
export { b as DeckReport, c as DeckReportOptions, r as readDeckReport } from './deck-report-
|
|
2
|
-
import { F as FontsHandle, E as EmbeddedFace, R as Renderer, a as Reporter, P as Peer, b as PptxModule, O as OPFApiError } from './conversion-
|
|
3
|
-
export { C as ConversionPlan, D as Diagnostic, c as EXPORT_FORMATS, d as EXPORT_TEXT, e as ExportContext, f as ExportContinuedSlide, g as ExportFile, h as ExportFontSummary, i as ExportFormat, j as ExportOptions, k as ExportResult, l as ExportRun, m as ExportText, I as ImportOptions, n as ImportResult, o as OPFExportError, p as OPFImportError, q as PEER_RANGES, r as PPTX_PACKAGE, s as PreparedExport, t as RENDER_EXTRAS, u as RENDER_PACKAGE, v as ReportFinding, w as ResolvedExportOptions, S as SlideSelection, x as Source, V as VERSIONS, y as asApiError, z as assetRoot, A as checkDate, B as checkOptions, G as checkRenamedOptions, H as checkScale, J as deckFileFormat, K as exportFormatOf, L as finishReport, M as importPresentation, N as loadPptx, Q as loadRenderer, T as locatePackage, U as missingPeerFrom, W as parseSlideSelection, X as planConversion, Y as prepareExport, Z as reaches, _ as readInput, $ as reportThrown, a0 as resolveExportOptions, a1 as runExport, a2 as runPreparedExport, a3 as writePlanned } from './conversion-
|
|
1
|
+
export { b as DeckReport, c as DeckReportOptions, r as readDeckReport } from './deck-report-BVlQZ42f.js';
|
|
2
|
+
import { F as FontsHandle, E as EmbeddedFace, R as Renderer, a as Reporter, P as Peer, b as PptxModule, O as OPFApiError } from './conversion-B_5AKTYQ.js';
|
|
3
|
+
export { C as ConversionPlan, D as Diagnostic, c as EXPORT_FORMATS, d as EXPORT_TEXT, e as ExportContext, f as ExportContinuedSlide, g as ExportFile, h as ExportFontSummary, i as ExportFormat, j as ExportOptions, k as ExportResult, l as ExportRun, m as ExportText, I as ImportOptions, n as ImportResult, o as OPFExportError, p as OPFImportError, q as PEER_RANGES, r as PPTX_PACKAGE, s as PreparedExport, t as RENDER_EXTRAS, u as RENDER_PACKAGE, v as ReportFinding, w as ResolvedExportOptions, S as SlideSelection, x as Source, V as VERSIONS, y as asApiError, z as assetRoot, A as checkDate, B as checkOptions, G as checkRenamedOptions, H as checkScale, J as deckFileFormat, K as exportFormatOf, L as finishReport, M as importPresentation, N as loadPptx, Q as loadRenderer, T as locatePackage, U as missingPeerFrom, W as parseSlideSelection, X as planConversion, Y as prepareExport, Z as reaches, _ as readInput, $ as reportThrown, a0 as resolveExportOptions, a1 as runExport, a2 as runPreparedExport, a3 as writePlanned } from './conversion-B_5AKTYQ.js';
|
|
4
4
|
import { Catalog } from './composition.js';
|
|
5
5
|
import { Fonts } from './composition.js';
|
|
6
6
|
import { PresentationPaginationResult } from './index.js';
|
|
7
|
-
import './presentation-
|
|
8
|
-
import './validation-types-
|
|
7
|
+
import './presentation-s9262acV.js';
|
|
8
|
+
import './validation-types-CYbsUuZ9.js';
|
|
9
9
|
import './finding-l9dlQ2NF.js';
|
|
10
10
|
import './json-BFSdESOE.js';
|
|
11
|
-
import './chart-data-
|
|
11
|
+
import './chart-data-B_k-WTex.js';
|
|
12
|
+
import './shape-geometry.js';
|
|
12
13
|
|
|
13
14
|
/** `deck.opf.json` and `deck.pptx` both give `deck`; stdin gives `deck`. */
|
|
14
15
|
declare function stemOf(input: string): string;
|
|
@@ -64,7 +65,7 @@ declare function listFontDirectories(directories: string[], label?: string): Pro
|
|
|
64
65
|
* routes to, with lazy faces loaded on demand), visual substitution, and Noto script packages for the scripts the
|
|
65
66
|
* deck's text draws when they are installed. `faces` are the --fonts files, loaded first.
|
|
66
67
|
*/
|
|
67
|
-
declare function prepareFonts(renderer: Renderer, presentation: unknown, userFonts: string[], reporter: Reporter, embedScriptFonts?: boolean): Promise<PreparedFonts>;
|
|
68
|
+
declare function prepareFonts(renderer: Renderer, presentation: unknown, userFonts: string[], reporter: Reporter, embedScriptFonts?: boolean, renderOptions?: Record<string, unknown>): Promise<PreparedFonts>;
|
|
68
69
|
/** A fonts handle lent to one export. `release` returns it; until then no other export uses the shared handle. */
|
|
69
70
|
interface FontsLease {
|
|
70
71
|
handle: FontsHandle;
|
|
@@ -77,7 +78,7 @@ interface FontsLease {
|
|
|
77
78
|
* a handle prepared for it and the shared one hold the same faces, so the bytes are the same. Any other deck, or a
|
|
78
79
|
* renderer without `autoScriptSelection`, gets undefined and the caller prepares a handle of its own (`prepareFonts`).
|
|
79
80
|
*/
|
|
80
|
-
declare function leaseSharedFonts(renderer: Renderer, presentation: unknown, userFonts: string[], reporter: Reporter, embedScriptFonts?: boolean): Promise<FontsLease | undefined>;
|
|
81
|
+
declare function leaseSharedFonts(renderer: Renderer, presentation: unknown, userFonts: string[], reporter: Reporter, embedScriptFonts?: boolean, renderOptions?: Record<string, unknown>): Promise<FontsLease | undefined>;
|
|
81
82
|
/**
|
|
82
83
|
* Faces an SVG should carry for `text`. `"fonts"` (the default) marks every face `embed: "used"`, so the renderer embeds a face only
|
|
83
84
|
* when the slide's text names its family and a slide in one family ships kilobytes of font rather than the whole pack. `"system"`
|
|
@@ -106,6 +107,26 @@ declare function runImport(bytes: Uint8Array, options: {
|
|
|
106
107
|
signals?: boolean;
|
|
107
108
|
}, reporter: Reporter, loaded?: Peer<PptxModule>): Promise<ImportRun>;
|
|
108
109
|
|
|
110
|
+
declare function createImageResolver(root: string | undefined, reporter: Reporter, passDirectory?: string): {
|
|
111
|
+
/** The reason a local source cannot be read (`missing`: no such file; `blocked`: outside the folder, not an image, too large), or undefined when it can, or is not a local file. */
|
|
112
|
+
check: (source: string) => {
|
|
113
|
+
problem: "blocked" | "missing";
|
|
114
|
+
reason: string;
|
|
115
|
+
} | undefined;
|
|
116
|
+
/** opf-render: a data URI string, or null for the placeholder (a missing file is reported by the renderer as unresolved-asset). */
|
|
117
|
+
forSvg: (source: string | undefined, context: {
|
|
118
|
+
path: string;
|
|
119
|
+
}) => string | null;
|
|
120
|
+
/** LH-145: the same data URI as `forSvg` for `measurePictures`, without reporting a file that cannot be read (the draw does). */
|
|
121
|
+
forMeasure: (source: string | undefined) => string | null;
|
|
122
|
+
/** opf-pptx: bytes and media type; null for URLs and references it handles itself. An unreadable local file throws asset-unresolved: opf-pptx before 0.24.1 stops the export, 0.24.1 and later leave the image out with a warning. */
|
|
123
|
+
forPptx: (source: string, context: {
|
|
124
|
+
path: string;
|
|
125
|
+
}) => {
|
|
126
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
127
|
+
mediaType: string;
|
|
128
|
+
} | null;
|
|
129
|
+
};
|
|
109
130
|
/** A local image reference that `convert` could not read. */
|
|
110
131
|
interface AssetProblem {
|
|
111
132
|
/** The JSON Pointer of the first place the deck spells the source (the registry entry for an `asset:` reference). */
|
|
@@ -119,6 +140,12 @@ interface AssetProblem {
|
|
|
119
140
|
* nothing outside it, only image files). `root` must be an existing folder. Reads files, so it lives here and not in core `validate`.
|
|
120
141
|
*/
|
|
121
142
|
declare function localAssetProblems(deck: unknown, root: string): AssetProblem[];
|
|
143
|
+
/**
|
|
144
|
+
* RR-105: `ensureIcons`'s `readSource` for the icons a deck names as SVG files: read as `convert` reads its images (relative to `root`,
|
|
145
|
+
* nothing outside it, only image files; nothing is fetched), so `validate` and `convert` see the same icons. A source that cannot be read
|
|
146
|
+
* stays unloaded. `resolver` reuses an image resolver a caller already has.
|
|
147
|
+
*/
|
|
148
|
+
declare function iconSourceReader(root: string | undefined, resolver?: Pick<ReturnType<typeof createImageResolver>, "forMeasure">): (source: string) => Promise<string | undefined>;
|
|
122
149
|
|
|
123
150
|
declare function createZip(entries: {
|
|
124
151
|
name: string;
|
|
@@ -145,18 +172,24 @@ interface PaginatedDeck {
|
|
|
145
172
|
*/
|
|
146
173
|
declare function paginateDeck(deck: unknown, options: PaginateDeckOptions): Promise<PaginatedDeck>;
|
|
147
174
|
interface MeasuringFontsOptions {
|
|
175
|
+
/** Catalogs used by the same composition the fonts prepare. */
|
|
176
|
+
catalogs?: readonly Catalog[];
|
|
148
177
|
/** Folders of `.ttf` and `.otf` files, loaded before the bundled pack (as `--fonts`). They need opf-render. */
|
|
149
178
|
fontFolders?: readonly string[];
|
|
150
179
|
/** Receives the font diagnostics. */
|
|
151
180
|
reporter: Reporter;
|
|
152
181
|
/** Name options as the command's flags in messages. */
|
|
153
182
|
flags?: boolean;
|
|
183
|
+
/** CLI/MCP validation only: defer a genuine renderer format refusal to the caller's source-aware validator. */
|
|
184
|
+
reportInvalidDocument?: boolean;
|
|
154
185
|
}
|
|
155
186
|
interface MeasuringFonts {
|
|
156
|
-
/** The fonts `opf convert` draws `deck` with; absent
|
|
187
|
+
/** The fonts `opf convert` draws `deck` with; absent for an estimate or a rejected format. */
|
|
157
188
|
fonts?: Fonts;
|
|
158
189
|
/** Why there are no fonts: the missing or too old peer (`peer-not-installed`, `peer-too-old`) that measuring needs. */
|
|
159
190
|
estimated?: OPFApiError;
|
|
191
|
+
/** A real renderer format refusal; the caller must still validate the original source and return its report. */
|
|
192
|
+
invalidDocument?: true;
|
|
160
193
|
/** Returns a shared handle; call it when the measurement is done. */
|
|
161
194
|
release(): void;
|
|
162
195
|
}
|
|
@@ -167,8 +200,8 @@ interface MeasuringFonts {
|
|
|
167
200
|
*/
|
|
168
201
|
declare function measuringFonts(deck: unknown, options: MeasuringFontsOptions): Promise<MeasuringFonts>;
|
|
169
202
|
|
|
170
|
-
/** The catalogs a call registers when it names none: `[gallery]`. */
|
|
203
|
+
/** The catalogs a call registers when it names none: `[gallery, galleryIconSets()]`. */
|
|
171
204
|
declare function defaultCatalogs(): readonly Catalog[];
|
|
172
205
|
|
|
173
|
-
export { FontsHandle, OPFApiError, Peer, PptxModule, Renderer, Reporter, checkDestinations, checkOutputPattern, createZip, deckStem, defaultCatalogs, embeddedFor, leaseSharedFonts, listFontDirectories, localAssetProblems, measuringFonts, padNumber, paginateDeck, pointerOf, prepareFonts, publishNew, runImport, stemOf, writeFiles };
|
|
206
|
+
export { FontsHandle, OPFApiError, Peer, PptxModule, Renderer, Reporter, checkDestinations, checkOutputPattern, createZip, deckStem, defaultCatalogs, embeddedFor, iconSourceReader, leaseSharedFonts, listFontDirectories, localAssetProblems, measuringFonts, padNumber, paginateDeck, pointerOf, prepareFonts, publishNew, runImport, stemOf, writeFiles };
|
|
174
207
|
export type { AssetProblem, ImportRun, MeasuringFonts, MeasuringFontsOptions, PaginateDeckOptions, PaginatedDeck, PlannedFile };
|
package/dist/node-engine.js
CHANGED
|
@@ -1,30 +1,46 @@
|
|
|
1
|
-
import { loadRenderer, listFontDirectories, leaseSharedFonts, prepareFonts } from './chunk-
|
|
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-
|
|
3
|
-
import { defaultCatalogs } from './chunk-
|
|
4
|
-
export { defaultCatalogs } from './chunk-
|
|
5
|
-
import { OPFApiError } from './chunk-
|
|
6
|
-
export { OPFApiError, OPFExportError, OPFImportError, asApiError, parseSlideSelection } from './chunk-
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
10
|
-
import { paginate } from './chunk-
|
|
11
|
-
export { readDeckReport } from './chunk-
|
|
12
|
-
import './chunk-
|
|
13
|
-
import './chunk-
|
|
14
|
-
import './chunk-
|
|
1
|
+
import { loadRenderer, listFontDirectories, leaseSharedFonts, prepareFonts } from './chunk-RUV7CCE6.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, iconSourceReader, 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-RUV7CCE6.js';
|
|
3
|
+
import { defaultCatalogs } from './chunk-XJUMFH33.js';
|
|
4
|
+
export { defaultCatalogs } from './chunk-XJUMFH33.js';
|
|
5
|
+
import { OPFApiError } from './chunk-HUGVYHZ2.js';
|
|
6
|
+
export { OPFApiError, OPFExportError, OPFImportError, asApiError, parseSlideSelection } from './chunk-HUGVYHZ2.js';
|
|
7
|
+
import './chunk-W4DYDRV2.js';
|
|
8
|
+
import './chunk-FK5XG742.js';
|
|
9
|
+
import './chunk-244OPLAV.js';
|
|
10
|
+
import { paginate } from './chunk-42JBXJKW.js';
|
|
11
|
+
export { readDeckReport } from './chunk-FIQMAIZV.js';
|
|
12
|
+
import './chunk-QGTJF7HV.js';
|
|
13
|
+
import './chunk-2HX4BGAS.js';
|
|
14
|
+
import './chunk-HHVQ2SDT.js';
|
|
15
15
|
import './chunk-RYZPBJLB.js';
|
|
16
|
-
import './chunk-
|
|
17
|
-
import './chunk-
|
|
18
|
-
import './chunk-
|
|
19
|
-
import './chunk-
|
|
20
|
-
import './chunk-
|
|
21
|
-
import './chunk-
|
|
22
|
-
import './chunk-
|
|
23
|
-
import './chunk-
|
|
16
|
+
import './chunk-DQ7QYOUV.js';
|
|
17
|
+
import './chunk-36DLVJGW.js';
|
|
18
|
+
import './chunk-F6BXO4AI.js';
|
|
19
|
+
import './chunk-WMFT5R7I.js';
|
|
20
|
+
import './chunk-3THGTDL2.js';
|
|
21
|
+
import './chunk-U7TYSPYM.js';
|
|
22
|
+
import './chunk-QGJVOPLG.js';
|
|
23
|
+
import './chunk-FAXO3SUE.js';
|
|
24
24
|
import './chunk-JBARNYFR.js';
|
|
25
|
-
import './chunk-
|
|
26
|
-
import './chunk-
|
|
27
|
-
import './chunk-
|
|
25
|
+
import './chunk-LCT5ZV3Q.js';
|
|
26
|
+
import './chunk-CJVKOJ6B.js';
|
|
27
|
+
import './chunk-BLCDUM7B.js';
|
|
28
|
+
import './chunk-PRXZD2II.js';
|
|
29
|
+
|
|
30
|
+
// src/node/validation-fonts.ts
|
|
31
|
+
function isRendererValidationFailure(error, RenderError) {
|
|
32
|
+
if (typeof RenderError !== "function") return false;
|
|
33
|
+
const boundary = error instanceof OPFApiError && error.code === "invalid-opf" ? error.cause : error;
|
|
34
|
+
if (!(boundary instanceof RenderError) || boundary.code !== "invalid-opf") return false;
|
|
35
|
+
const details = boundary.details;
|
|
36
|
+
if (typeof details !== "object" || details === null) return false;
|
|
37
|
+
const report = details.report;
|
|
38
|
+
if (typeof report !== "object" || report === null) return false;
|
|
39
|
+
const value = report;
|
|
40
|
+
return value.valid === false && Array.isArray(value.findings) && value.findings.some(
|
|
41
|
+
(finding) => typeof finding === "object" && finding !== null && "category" in finding && finding.category === "format" && "severity" in finding && finding.severity === "error"
|
|
42
|
+
);
|
|
43
|
+
}
|
|
28
44
|
|
|
29
45
|
// src/node/paginate.ts
|
|
30
46
|
async function paginateDeck(deck, options) {
|
|
@@ -38,13 +54,16 @@ async function paginateDeck(deck, options) {
|
|
|
38
54
|
}
|
|
39
55
|
async function measuringFonts(deck, options) {
|
|
40
56
|
const folders = options.fontFolders ?? [];
|
|
57
|
+
let renderer;
|
|
41
58
|
try {
|
|
42
|
-
|
|
59
|
+
renderer = await loadRenderer();
|
|
43
60
|
const userFonts = await listFontDirectories([...folders], options.flags ? "--fonts" : "fonts");
|
|
44
|
-
const lease = await leaseSharedFonts(renderer, deck, userFonts, options.reporter);
|
|
45
|
-
const handle = lease?.handle ?? (await prepareFonts(renderer, deck, userFonts, options.reporter)).handle;
|
|
61
|
+
const lease = await leaseSharedFonts(renderer, deck, userFonts, options.reporter, false, { catalogs: options.catalogs ?? defaultCatalogs() });
|
|
62
|
+
const handle = lease?.handle ?? (await prepareFonts(renderer, deck, userFonts, options.reporter, false, { catalogs: options.catalogs ?? defaultCatalogs() })).handle;
|
|
46
63
|
return { fonts: handle, release: () => lease?.release() };
|
|
47
64
|
} catch (error) {
|
|
65
|
+
if (options.reportInvalidDocument && isRendererValidationFailure(error, renderer?.render.module.OPFRenderError)) return { invalidDocument: true, release: () => {
|
|
66
|
+
} };
|
|
48
67
|
if (error instanceof OPFApiError && (error.code === "peer-not-installed" || error.code === "peer-too-old") && !folders.length) return { estimated: error, release: () => {
|
|
49
68
|
} };
|
|
50
69
|
throw error;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ComposeSlideOptions,
|
|
2
|
-
import { U as UnresolvedReferenceDiagnostic, R as
|
|
1
|
+
import { C as ComposeSlideOptions, M as MessageSurface, F as Fonts, L as LayoutDiagnostic } from './composition-CvtvgBDE.js';
|
|
2
|
+
import { U as UnresolvedReferenceDiagnostic, R as ResolvedColorRoles, b as ColorVariant, c as RecordProvenance, d as CatalogOptions, C as Catalog } from './catalog-refs-CoIrOdAw.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* One slide's composition context: the layout, canvas, theme and font families that `composeSlide` needs,
|
|
@@ -51,6 +51,12 @@ interface SlideContext {
|
|
|
51
51
|
* background (the slide is the variant's bg1); `roles` already follows it.
|
|
52
52
|
*/
|
|
53
53
|
layoutVariant?: ColorVariant;
|
|
54
|
+
/**
|
|
55
|
+
* LH-164: set when the slide's whole body is one display message and it takes the accent surface (resolveMessageSurface): `kind` is the LH-09
|
|
56
|
+
* rule that made the body one message and `variant` the accent variant the slide is drawn on, which `roles` and `layoutVariant` already
|
|
57
|
+
* follow (as for a layout's variant, the slide's own design and a fixed deck background win, and no two accent surfaces follow each other).
|
|
58
|
+
*/
|
|
59
|
+
messageSurface?: MessageSurface;
|
|
54
60
|
/**
|
|
55
61
|
* Where each resolved record came from: `{ kind, reference, id, group, source?, origin }` (origin `document` for an
|
|
56
62
|
* embedded record, `host` for a registered catalog's). A kind is absent when nothing resolved for it (the engine
|
|
@@ -89,7 +95,8 @@ interface PaginationOptions extends Omit<ComposeSlideOptions, 'textMeasurement'>
|
|
|
89
95
|
minFontSize?: number;
|
|
90
96
|
/**
|
|
91
97
|
* LH-90: break only between the slide's block units (`blockUnits`: a lead block and the blocks that follow it; each root block
|
|
92
|
-
* alone when the slide has none), never inside one
|
|
98
|
+
* alone when the slide has none), never inside one. Retain settled source sizes for comparable automatic body roles, then
|
|
99
|
+
* use the fewest pages that hold them, with the units spread evenly over
|
|
93
100
|
* those pages when every page still fits (eight timelines that fit five to a page are four and four, not five and three).
|
|
94
101
|
* The slide is composed first as the engines draw it: a strict (`overflow: "error"`) composition throws its
|
|
95
102
|
* `OPFCompositionError`, and a slide with no `text-overflow` or `small-cell` is returned unchanged. A unit that overflows on a
|
|
@@ -111,9 +118,20 @@ interface PaginationMapping {
|
|
|
111
118
|
end: number;
|
|
112
119
|
};
|
|
113
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* SH-04: what a split did to the slide's overlay that a host should report: `connector-split`, a connector whose two ends landed on
|
|
123
|
+
* different pages, so no page draws it (`path` is the connector's source path, `slides.N.shapes.I`).
|
|
124
|
+
*/
|
|
125
|
+
interface PaginationDiagnostic {
|
|
126
|
+
code: 'connector-split';
|
|
127
|
+
path: string;
|
|
128
|
+
message: string;
|
|
129
|
+
}
|
|
114
130
|
interface PaginatedPage {
|
|
115
131
|
slideIndex: number;
|
|
116
132
|
mappings: PaginationMapping[];
|
|
133
|
+
/** SH-04: what this page left out of the slide's overlay (a connector whose ends are on different pages). */
|
|
134
|
+
diagnostics?: PaginationDiagnostic[];
|
|
117
135
|
/** Repeated headings/furniture and their metadata sources; separate from body slices. */
|
|
118
136
|
repeatedMappings?: PaginationMapping[];
|
|
119
137
|
}
|
|
@@ -206,4 +224,4 @@ declare function continueOverfull(input: unknown, options?: PresentationPaginati
|
|
|
206
224
|
declare function continuationPages(result: Pick<ContinuationResult, 'continued'>, slideCount: number): number[][];
|
|
207
225
|
|
|
208
226
|
export { OPFPaginationError as O, continueOverfull as c, blockUnits as j, continuationPages as k, paginateSlide as l, paginate as p, resolveSlideContext as r };
|
|
209
|
-
export type { ContinuationResult as C, PaginatedPage as P, SlideContext as S, PresentationPaginationOptions as a, PresentationPaginationResult as b, ContinuedSlide as d, PaginationMapping as e, PaginationOptions as f, PaginationResult as g, SlideContextDiagnostic as h, SlideContextOptions as i };
|
|
227
|
+
export type { ContinuationResult as C, PaginatedPage as P, SlideContext as S, PresentationPaginationOptions as a, PresentationPaginationResult as b, ContinuedSlide as d, PaginationMapping as e, PaginationOptions as f, PaginationResult as g, SlideContextDiagnostic as h, SlideContextOptions as i, PaginationDiagnostic as m };
|
package/dist/pagination.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import './composition-
|
|
2
|
-
import './catalog-refs-
|
|
3
|
-
export { C as ContinuationResult, d as ContinuedSlide, O as OPFPaginationError, P as PaginatedPage, e as PaginationMapping, f as PaginationOptions, g as PaginationResult, a as PresentationPaginationOptions, b as PresentationPaginationResult, j as blockUnits, k as continuationPages, c as continueOverfull, p as paginate, l as paginateSlide } from './pagination-
|
|
4
|
-
import './chart-data-
|
|
1
|
+
import './composition-CvtvgBDE.js';
|
|
2
|
+
import './catalog-refs-CoIrOdAw.js';
|
|
3
|
+
export { C as ContinuationResult, d as ContinuedSlide, O as OPFPaginationError, P as PaginatedPage, m as PaginationDiagnostic, e as PaginationMapping, f as PaginationOptions, g as PaginationResult, a as PresentationPaginationOptions, b as PresentationPaginationResult, j as blockUnits, k as continuationPages, c as continueOverfull, p as paginate, l as paginateSlide } from './pagination-CZQQYk7L.js';
|
|
4
|
+
import './chart-data-B_k-WTex.js';
|
|
5
|
+
import './shape-geometry.js';
|
package/dist/pagination.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { OPFPaginationError, blockUnits, continuationPages, continueOverfull, paginate, paginateSlide } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { OPFPaginationError, blockUnits, continuationPages, continueOverfull, paginate, paginateSlide } from './chunk-42JBXJKW.js';
|
|
2
|
+
import './chunk-FAXO3SUE.js';
|
|
3
3
|
import './chunk-JBARNYFR.js';
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
4
|
+
import './chunk-LCT5ZV3Q.js';
|
|
5
|
+
import './chunk-CJVKOJ6B.js';
|
|
6
|
+
import './chunk-BLCDUM7B.js';
|
|
7
|
+
import './chunk-PRXZD2II.js';
|
package/dist/patch.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { OPFPatchError, OPFPatchHashError, OPFPatchValidationError, applyPatch, applyPatchWithInverse, documentHash, escapePointerToken, formatPointer, getAtPointer, hasPointer, idToken, invertPatch, isIdToken, jsonEqual, normalizePatch, parsePointer, pointerFromPath, readPointer, resolveIdPatch, resolveIdPointer, splitPointer, toIdPatch, toIdPointer, unescapePointerToken, walkPatch } from './chunk-
|
|
1
|
+
export { OPFPatchError, OPFPatchHashError, OPFPatchValidationError, applyPatch, applyPatchWithInverse, documentHash, escapePointerToken, formatPointer, getAtPointer, hasPointer, idToken, invertPatch, isIdToken, jsonEqual, normalizePatch, parsePointer, pointerFromPath, readPointer, resolveIdPatch, resolveIdPointer, splitPointer, toIdPatch, toIdPointer, unescapePointerToken, walkPatch } from './chunk-FAXO3SUE.js';
|
|
2
2
|
import './chunk-JBARNYFR.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
3
|
+
import './chunk-LCT5ZV3Q.js';
|
|
4
|
+
import './chunk-CJVKOJ6B.js';
|
|
5
|
+
import './chunk-BLCDUM7B.js';
|
|
6
|
+
import './chunk-PRXZD2II.js';
|
package/dist/precompiled.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { installSchemaEngine } from './chunk-43JWUIGF.js';
|
|
2
|
-
import { schemaEngine } from './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
2
|
+
import { schemaEngine } from './chunk-UJZN2ZH6.js';
|
|
3
|
+
import './chunk-LCT5ZV3Q.js';
|
|
4
|
+
import './chunk-PRXZD2II.js';
|
|
5
5
|
|
|
6
6
|
// src/precompiled.ts
|
|
7
7
|
installSchemaEngine(schemaEngine());
|