@openpresentation/opf 0.33.0 → 0.34.1
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 +3 -3
- package/dist/browser.js +20 -19
- package/dist/catalog-refs-CoIrOdAw.d.ts +937 -0
- package/dist/{catalog-schemas-CQTM-G8p.d.ts → catalog-schemas-FjLRPtjB.d.ts} +1 -1
- package/dist/{chart-data-oIZQlFGi.d.ts → chart-data-B_k-WTex.d.ts} +7 -4
- package/dist/{chunk-XIOC6N5P.js → chunk-244OPLAV.js} +1 -1
- package/dist/{chunk-KVHNDHVS.js → chunk-2B6GLT2O.js} +1 -1
- package/dist/{chunk-VMBLNCX2.js → chunk-6PMXVP5G.js} +117 -30
- package/dist/{chunk-BI4ERFAA.js → chunk-AAWHOCXS.js} +48 -13
- package/dist/{chunk-QD6DPS7X.js → chunk-ABA2D6X5.js} +2 -2
- package/dist/{chunk-UK3J6FSU.js → chunk-AEHDXNZX.js} +862 -269
- package/dist/{chunk-DAS75LGR.js → chunk-AGYPRTEC.js} +4 -4
- package/dist/chunk-BLCDUM7B.js +7 -0
- package/dist/{chunk-OPVJLL7H.js → chunk-CJVKOJ6B.js} +11841 -8687
- package/dist/{chunk-Y557TYML.js → chunk-CQXBGZQP.js} +19 -16
- package/dist/{chunk-VKEYV3ZK.js → chunk-FCSYIBVR.js} +2 -2
- package/dist/{chunk-PJSPHHRK.js → chunk-FK5XG742.js} +3 -16
- package/dist/{chunk-R6C6BQOG.js → chunk-HHVQ2SDT.js} +1 -1
- package/dist/{chunk-ABWEUXLV.js → chunk-L3MCLD3X.js} +117 -21
- package/dist/{chunk-QF5RSRXU.js → chunk-LCT5ZV3Q.js} +750 -199
- package/dist/{chunk-E7WQHMCL.js → chunk-MAFJ5O2D.js} +16 -14
- package/dist/{chunk-XANW7MB7.js → chunk-MUILZGRY.js} +4 -4
- package/dist/chunk-NLJFNCZ4.js +1560 -0
- package/dist/{chunk-VSBZC2PR.js → chunk-SR6T4LKI.js} +3 -3
- package/dist/chunk-UJZN2ZH6.js +1 -0
- package/dist/{chunk-IJXKVM4W.js → chunk-VDZXNNZF.js} +1 -1
- package/dist/{chunk-YYT6N7AI.js → chunk-WCPDN7AY.js} +1 -1
- package/dist/{chunk-S5QRGMUQ.js → chunk-X72WPTST.js} +6 -6
- package/dist/{chunk-INIMUBSE.js → chunk-XJUMFH33.js} +1 -1
- package/dist/{chunk-YS333HLA.js → chunk-XLSWZSQS.js} +2 -2
- package/dist/{composition-zMiIgzip.d.ts → composition-CvtvgBDE.d.ts} +1360 -1531
- package/dist/composition.d.ts +3 -3
- package/dist/composition.js +2 -1
- package/dist/conversion-CSQ5EHD2.js +25 -0
- package/dist/{conversion-mNth9XKm.d.ts → conversion-CyNRlWGw.d.ts} +25 -7
- package/dist/convert.d.ts +4 -4
- package/dist/convert.js +15 -11
- package/dist/data.d.ts +2 -2
- package/dist/data.js +3 -2
- package/dist/{deck-report-BSlRiR0_.d.ts → deck-report-BVlQZ42f.d.ts} +3 -3
- package/dist/deck.d.ts +6 -6
- package/dist/deck.js +12 -11
- package/dist/diagram-engine-eager.js +5 -1
- package/dist/diagram-engine-lazy.js +13 -0
- package/dist/diagram-plantuml-XRZ6VAOL.js +3 -0
- package/dist/diff.js +5 -4
- package/dist/docs.js +65 -53
- package/dist/examples.js +4070 -1083
- package/dist/font-policy.js +1 -1
- package/dist/format.js +2 -2
- package/dist/ids.js +5 -4
- package/dist/index.d.ts +18 -16
- package/dist/index.js +35 -24
- package/dist/markdown.d.ts +2 -2
- package/dist/markdown.js +9 -8
- package/dist/node-engine.d.ts +43 -11
- package/dist/node-engine.js +45 -26
- package/dist/{pagination-CYzNMazO.d.ts → pagination-CZQQYk7L.d.ts} +4 -3
- package/dist/pagination.d.ts +4 -4
- package/dist/pagination.js +5 -4
- package/dist/patch.js +4 -3
- package/dist/precompiled.js +2 -2
- package/dist/{presentation-CXhfpB_z.d.ts → presentation-s9262acV.d.ts} +357 -230
- package/dist/repo-readme.js +1 -1
- package/dist/schema-engine-ajv.js +1 -1
- package/dist/schema-engine-precompiled.js +2 -2
- package/dist/schema.d.ts +3 -3
- package/dist/schema.js +4 -3
- package/dist/schemas.d.ts +16 -0
- package/dist/schemas.js +1 -1
- package/dist/shape-engine-eager.js +2 -2
- package/dist/shape-engine-lazy.js +1 -1
- package/dist/{shape-engine-module-BK7JNEUV.js → shape-engine-module-N74FCHGY.js} +2 -2
- package/dist/shape-geometry.js +1 -1
- package/dist/source.d.ts +10 -5
- package/dist/source.js +11 -10
- 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 +3 -3
- package/dist/spec/schemas/icon-set.schema.json +1 -1
- package/dist/spec/schemas/layout.schema.json +71 -25
- package/dist/spec/schemas/opf.schema.json +540 -168
- package/dist/spec/schemas/theme.schema.json +11 -5
- package/dist/types.d.ts +81 -73
- package/dist/{validation-types-COwTel3H.d.ts → validation-types-CYbsUuZ9.d.ts} +8 -5
- package/dist/validator.d.ts +34 -7
- package/dist/validator.js +4 -3
- package/dist/yaml.d.ts +2 -2
- package/dist/yaml.js +8 -7
- package/package.json +6 -6
- package/dist/catalog-refs-B_0_vZg0.d.ts +0 -134
- package/dist/chunk-ZXOIGUHX.js +0 -1
- package/dist/conversion-POHRAMSN.js +0 -24
package/dist/font-policy.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { FONT_POLICY, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor } from './chunk-
|
|
1
|
+
export { FONT_POLICY, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor } from './chunk-FK5XG742.js';
|
|
2
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-
|
|
1
|
+
export { OPFFormatError, format, isFormatted, sortPresentationKeys } from './chunk-HHVQ2SDT.js';
|
|
2
|
+
import './chunk-LCT5ZV3Q.js';
|
|
3
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-XLSWZSQS.js';
|
|
2
|
+
export { OPFPatchHashError, documentHash, idToken, isIdToken, resolveIdPatch, resolveIdPointer, toIdPatch, toIdPointer } from './chunk-AEHDXNZX.js';
|
|
3
3
|
import './chunk-JBARNYFR.js';
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
4
|
+
import './chunk-LCT5ZV3Q.js';
|
|
5
|
+
import './chunk-CJVKOJ6B.js';
|
|
6
|
+
import './chunk-BLCDUM7B.js';
|
|
6
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-CyNRlWGw.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-CyNRlWGw.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 catalogIconKinds, e 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,9 +25,9 @@ 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
32
|
import './shape-geometry.js';
|
|
33
33
|
|
|
@@ -671,6 +671,8 @@ declare function resolveDrawnFontFamilies<T extends Partial<FontFamilies>>(famil
|
|
|
671
671
|
|
|
672
672
|
/** `validate` with the gallery registered when `catalogs` is omitted, as `opf validate` does. */
|
|
673
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;
|
|
674
676
|
/** `stats` with the gallery registered when `catalogs` is omitted, as `opf stats` does. */
|
|
675
677
|
declare const stats: typeof stats$1;
|
|
676
678
|
/** `paginate` with the gallery registered when `catalogs` is omitted, as `opf paginate` does. Pass `fonts` (opf-render's `loadFonts()`) for measured page breaks. */
|
|
@@ -722,5 +724,5 @@ declare function open(input: string | Uint8Array | ArrayBuffer, options?: OpenOp
|
|
|
722
724
|
*/
|
|
723
725
|
declare function save(deck: Presentation, path: string, options?: SaveOptions): Promise<SaveResult>;
|
|
724
726
|
|
|
725
|
-
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 };
|
|
726
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,28 +1,29 @@
|
|
|
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-
|
|
1
|
+
import { defaultCatalogs } from './chunk-XJUMFH33.js';
|
|
2
|
+
import { stats, embed, edit, OPFApiError, asApiError } from './chunk-AGYPRTEC.js';
|
|
3
|
+
export { OPFApiError, OPFExportError, OPFImportError, OPFMoveToCustomError, copySlides, fill, fillRecords, localAssetSources, moveToCustom, parseSlideSelection, sameRecord, updateFromCatalog } from './chunk-AGYPRTEC.js';
|
|
4
4
|
export { specFileEntries, specFileKinds, specFilePaths } from './chunk-W4DYDRV2.js';
|
|
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-
|
|
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-L3MCLD3X.js';
|
|
8
|
+
export { OPFPaginationError, blockUnits, continuationPages, paginateSlide } from './chunk-L3MCLD3X.js';
|
|
9
|
+
export { DECK_FORMATS, deckFormatOf, parse, stringify } from './chunk-MUILZGRY.js';
|
|
10
|
+
export { fromMarkdown, toMarkdown } from './chunk-MAFJ5O2D.js';
|
|
11
|
+
import './chunk-X72WPTST.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, catalogIconKinds, catalogSchemaNames, documentHash, findValidationRule, idToken, isIdToken, resolveDrawnFontFamilies, resolveIdPatch, resolveIdPointer, resolveSlideContext, toIdPatch, toIdPointer, validateCatalogRecord, validationCategories, validationRules } from './chunk-
|
|
14
|
+
export { explain } from './chunk-AAWHOCXS.js';
|
|
15
|
+
import './chunk-CQXBGZQP.js';
|
|
16
|
+
import './chunk-2B6GLT2O.js';
|
|
17
|
+
export { OPFMarkdownError } from './chunk-ABA2D6X5.js';
|
|
18
|
+
import './chunk-FCSYIBVR.js';
|
|
19
|
+
export { OPFIdError, assignIds, touches } from './chunk-XLSWZSQS.js';
|
|
20
|
+
export { diff, merge } from './chunk-SR6T4LKI.js';
|
|
21
|
+
import { validate, createValidator, OPFValidationError } from './chunk-AEHDXNZX.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-AEHDXNZX.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, embedIcons, ensureDiagrams, ensureIcons, ensureShapes, formatDataNumber, formatVariableNumber, fromExcelNumberFormat, hasContentVariables, iconsPending, inlineChartData, inlineDatasets, inlineTableData, isDatasetRef, isPlaceLabel, isTemplate, isXYChartType, listBuiltinVariables, listVariables, markLabelColor, nearIconNames, normalizeLanguageFamily, numberFormatError, parseIconReference, parseReference, resolveChartData, resolveDesignRecords, resolveFontScheme, resolveIcon, resolveReference, resolveSlideVariables, resolveTableData, resolveVariables, shapesPending, suggestChartNumberFix, tableCellDisplayValue, toExcelNumberFormat, unresolvedReference, unusedDatasets, variableDeclarations } from './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';
|
|
26
27
|
import './chunk-PRXZD2II.js';
|
|
27
28
|
|
|
28
29
|
// src/index.ts
|
|
@@ -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-CSQ5EHD2.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,8 @@ 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
7
|
import './shape-geometry.js';
|
|
8
8
|
import './json-BFSdESOE.js';
|
|
9
9
|
|
package/dist/markdown.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export { fromMarkdown, toMarkdown } from './chunk-
|
|
1
|
+
export { fromMarkdown, toMarkdown } from './chunk-MAFJ5O2D.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-CQXBGZQP.js';
|
|
4
|
+
import './chunk-2B6GLT2O.js';
|
|
5
|
+
export { OPFMarkdownError } from './chunk-ABA2D6X5.js';
|
|
6
|
+
import './chunk-FCSYIBVR.js';
|
|
7
|
+
import './chunk-AEHDXNZX.js';
|
|
8
8
|
import './chunk-JBARNYFR.js';
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
9
|
+
import './chunk-LCT5ZV3Q.js';
|
|
10
|
+
import './chunk-CJVKOJ6B.js';
|
|
11
|
+
import './chunk-BLCDUM7B.js';
|
|
11
12
|
import './chunk-PRXZD2II.js';
|
package/dist/node-engine.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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-CyNRlWGw.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-CyNRlWGw.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
12
|
import './shape-geometry.js';
|
|
13
13
|
|
|
14
14
|
/** `deck.opf.json` and `deck.pptx` both give `deck`; stdin gives `deck`. */
|
|
@@ -65,7 +65,7 @@ declare function listFontDirectories(directories: string[], label?: string): Pro
|
|
|
65
65
|
* routes to, with lazy faces loaded on demand), visual substitution, and Noto script packages for the scripts the
|
|
66
66
|
* deck's text draws when they are installed. `faces` are the --fonts files, loaded first.
|
|
67
67
|
*/
|
|
68
|
-
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>;
|
|
69
69
|
/** A fonts handle lent to one export. `release` returns it; until then no other export uses the shared handle. */
|
|
70
70
|
interface FontsLease {
|
|
71
71
|
handle: FontsHandle;
|
|
@@ -78,7 +78,7 @@ interface FontsLease {
|
|
|
78
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
|
|
79
79
|
* renderer without `autoScriptSelection`, gets undefined and the caller prepares a handle of its own (`prepareFonts`).
|
|
80
80
|
*/
|
|
81
|
-
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>;
|
|
82
82
|
/**
|
|
83
83
|
* Faces an SVG should carry for `text`. `"fonts"` (the default) marks every face `embed: "used"`, so the renderer embeds a face only
|
|
84
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"`
|
|
@@ -107,6 +107,26 @@ declare function runImport(bytes: Uint8Array, options: {
|
|
|
107
107
|
signals?: boolean;
|
|
108
108
|
}, reporter: Reporter, loaded?: Peer<PptxModule>): Promise<ImportRun>;
|
|
109
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
|
+
};
|
|
110
130
|
/** A local image reference that `convert` could not read. */
|
|
111
131
|
interface AssetProblem {
|
|
112
132
|
/** The JSON Pointer of the first place the deck spells the source (the registry entry for an `asset:` reference). */
|
|
@@ -120,6 +140,12 @@ interface AssetProblem {
|
|
|
120
140
|
* nothing outside it, only image files). `root` must be an existing folder. Reads files, so it lives here and not in core `validate`.
|
|
121
141
|
*/
|
|
122
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>;
|
|
123
149
|
|
|
124
150
|
declare function createZip(entries: {
|
|
125
151
|
name: string;
|
|
@@ -146,18 +172,24 @@ interface PaginatedDeck {
|
|
|
146
172
|
*/
|
|
147
173
|
declare function paginateDeck(deck: unknown, options: PaginateDeckOptions): Promise<PaginatedDeck>;
|
|
148
174
|
interface MeasuringFontsOptions {
|
|
175
|
+
/** Catalogs used by the same composition the fonts prepare. */
|
|
176
|
+
catalogs?: readonly Catalog[];
|
|
149
177
|
/** Folders of `.ttf` and `.otf` files, loaded before the bundled pack (as `--fonts`). They need opf-render. */
|
|
150
178
|
fontFolders?: readonly string[];
|
|
151
179
|
/** Receives the font diagnostics. */
|
|
152
180
|
reporter: Reporter;
|
|
153
181
|
/** Name options as the command's flags in messages. */
|
|
154
182
|
flags?: boolean;
|
|
183
|
+
/** CLI/MCP validation only: defer a genuine renderer format refusal to the caller's source-aware validator. */
|
|
184
|
+
reportInvalidDocument?: boolean;
|
|
155
185
|
}
|
|
156
186
|
interface MeasuringFonts {
|
|
157
|
-
/** The fonts `opf convert` draws `deck` with; absent
|
|
187
|
+
/** The fonts `opf convert` draws `deck` with; absent for an estimate or a rejected format. */
|
|
158
188
|
fonts?: Fonts;
|
|
159
189
|
/** Why there are no fonts: the missing or too old peer (`peer-not-installed`, `peer-too-old`) that measuring needs. */
|
|
160
190
|
estimated?: OPFApiError;
|
|
191
|
+
/** A real renderer format refusal; the caller must still validate the original source and return its report. */
|
|
192
|
+
invalidDocument?: true;
|
|
161
193
|
/** Returns a shared handle; call it when the measurement is done. */
|
|
162
194
|
release(): void;
|
|
163
195
|
}
|
|
@@ -168,8 +200,8 @@ interface MeasuringFonts {
|
|
|
168
200
|
*/
|
|
169
201
|
declare function measuringFonts(deck: unknown, options: MeasuringFontsOptions): Promise<MeasuringFonts>;
|
|
170
202
|
|
|
171
|
-
/** The catalogs a call registers when it names none: `[gallery, galleryIconSets]`. */
|
|
203
|
+
/** The catalogs a call registers when it names none: `[gallery, galleryIconSets()]`. */
|
|
172
204
|
declare function defaultCatalogs(): readonly Catalog[];
|
|
173
205
|
|
|
174
|
-
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 };
|
|
175
207
|
export type { AssetProblem, ImportRun, MeasuringFonts, MeasuringFontsOptions, PaginateDeckOptions, PaginatedDeck, PlannedFile };
|
package/dist/node-engine.js
CHANGED
|
@@ -1,31 +1,47 @@
|
|
|
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-
|
|
1
|
+
import { loadRenderer, listFontDirectories, leaseSharedFonts, prepareFonts } from './chunk-6PMXVP5G.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-6PMXVP5G.js';
|
|
3
|
+
import { defaultCatalogs } from './chunk-XJUMFH33.js';
|
|
4
|
+
export { defaultCatalogs } from './chunk-XJUMFH33.js';
|
|
5
|
+
import { OPFApiError } from './chunk-AGYPRTEC.js';
|
|
6
|
+
export { OPFApiError, OPFExportError, OPFImportError, asApiError, parseSlideSelection } from './chunk-AGYPRTEC.js';
|
|
7
7
|
import './chunk-W4DYDRV2.js';
|
|
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-
|
|
8
|
+
import './chunk-FK5XG742.js';
|
|
9
|
+
import './chunk-244OPLAV.js';
|
|
10
|
+
import { paginate } from './chunk-L3MCLD3X.js';
|
|
11
|
+
export { readDeckReport } from './chunk-MUILZGRY.js';
|
|
12
|
+
import './chunk-MAFJ5O2D.js';
|
|
13
|
+
import './chunk-X72WPTST.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-AAWHOCXS.js';
|
|
17
|
+
import './chunk-CQXBGZQP.js';
|
|
18
|
+
import './chunk-2B6GLT2O.js';
|
|
19
|
+
import './chunk-ABA2D6X5.js';
|
|
20
|
+
import './chunk-FCSYIBVR.js';
|
|
21
|
+
import './chunk-XLSWZSQS.js';
|
|
22
|
+
import './chunk-SR6T4LKI.js';
|
|
23
|
+
import './chunk-AEHDXNZX.js';
|
|
24
24
|
import './chunk-JBARNYFR.js';
|
|
25
|
-
import './chunk-
|
|
26
|
-
import './chunk-
|
|
25
|
+
import './chunk-LCT5ZV3Q.js';
|
|
26
|
+
import './chunk-CJVKOJ6B.js';
|
|
27
|
+
import './chunk-BLCDUM7B.js';
|
|
27
28
|
import './chunk-PRXZD2II.js';
|
|
28
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
|
+
}
|
|
44
|
+
|
|
29
45
|
// src/node/paginate.ts
|
|
30
46
|
async function paginateDeck(deck, options) {
|
|
31
47
|
const catalogs = options.catalogs ?? defaultCatalogs();
|
|
@@ -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,
|
|
@@ -95,7 +95,8 @@ interface PaginationOptions extends Omit<ComposeSlideOptions, 'textMeasurement'>
|
|
|
95
95
|
minFontSize?: number;
|
|
96
96
|
/**
|
|
97
97
|
* LH-90: break only between the slide's block units (`blockUnits`: a lead block and the blocks that follow it; each root block
|
|
98
|
-
* 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
|
|
99
100
|
* those pages when every page still fits (eight timelines that fit five to a page are four and four, not five and three).
|
|
100
101
|
* The slide is composed first as the engines draw it: a strict (`overflow: "error"`) composition throws its
|
|
101
102
|
* `OPFCompositionError`, and a slide with no `text-overflow` or `small-cell` is returned unchanged. A unit that overflows on a
|
package/dist/pagination.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import './composition-
|
|
2
|
-
import './catalog-refs-
|
|
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-
|
|
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
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-L3MCLD3X.js';
|
|
2
|
+
import './chunk-AEHDXNZX.js';
|
|
3
3
|
import './chunk-JBARNYFR.js';
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
4
|
+
import './chunk-LCT5ZV3Q.js';
|
|
5
|
+
import './chunk-CJVKOJ6B.js';
|
|
6
|
+
import './chunk-BLCDUM7B.js';
|
|
6
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-AEHDXNZX.js';
|
|
2
2
|
import './chunk-JBARNYFR.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import './chunk-LCT5ZV3Q.js';
|
|
4
|
+
import './chunk-CJVKOJ6B.js';
|
|
5
|
+
import './chunk-BLCDUM7B.js';
|
|
5
6
|
import './chunk-PRXZD2II.js';
|
package/dist/precompiled.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { installSchemaEngine } from './chunk-43JWUIGF.js';
|
|
2
|
-
import { schemaEngine } from './chunk-
|
|
3
|
-
import './chunk-
|
|
2
|
+
import { schemaEngine } from './chunk-UJZN2ZH6.js';
|
|
3
|
+
import './chunk-LCT5ZV3Q.js';
|
|
4
4
|
import './chunk-PRXZD2II.js';
|
|
5
5
|
|
|
6
6
|
// src/precompiled.ts
|