@openpresentation/opf 0.27.0 → 0.29.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.
Files changed (100) hide show
  1. package/dist/browser.js +18 -18
  2. package/dist/{catalog-refs-BSfGELpt.d.ts → catalog-refs-kAefsZWT.d.ts} +2 -1
  3. package/dist/{catalog-schemas-DoxA2BgY.d.ts → catalog-schemas-CC1d_h8s.d.ts} +3 -2
  4. package/dist/{chart-data-BnNqgnC-.d.ts → chart-data-Ci9s_NDN.d.ts} +2 -1
  5. package/dist/{chunk-EO3JWEO5.js → chunk-5OMZW44K.js} +1 -1
  6. package/dist/{chunk-4ZM5G3XX.js → chunk-5Q4IYLMW.js} +30 -14
  7. package/dist/{chunk-WJ4XTCOD.js → chunk-7UO6H32I.js} +3 -3
  8. package/dist/{chunk-4ACS57MG.js → chunk-ARFAQNOH.js} +2 -2
  9. package/dist/{chunk-GNKESMZT.js → chunk-F5QC7E2O.js} +6 -6
  10. package/dist/{chunk-SYW4BCGZ.js → chunk-HRKV43GC.js} +2 -2
  11. package/dist/{chunk-TMREBZBQ.js → chunk-I6G32TB5.js} +3 -3
  12. package/dist/{chunk-O3SA5SJ4.js → chunk-KELC4K62.js} +1 -1
  13. package/dist/{chunk-ABFDFZIW.js → chunk-KOCXV7H3.js} +1 -1
  14. package/dist/{chunk-PAGVSTVF.js → chunk-M7YZU3DX.js} +149 -26
  15. package/dist/{chunk-JSHMFTSY.js → chunk-P5E3FNYO.js} +1 -1
  16. package/dist/{chunk-ZGTOZA2S.js → chunk-R455YZNO.js} +6 -6
  17. package/dist/{chunk-OSM3LZ2Y.js → chunk-SYCHWS7C.js} +4 -4
  18. package/dist/{chunk-353VBJ6K.js → chunk-UKWNHK62.js} +5 -5
  19. package/dist/{chunk-LRTQXGJO.js → chunk-W3SEWSO5.js} +543 -94
  20. package/dist/{chunk-CXPBU5W4.js → chunk-W7KPMUJF.js} +1 -1
  21. package/dist/{chunk-APLNGCEZ.js → chunk-WHDOOLIO.js} +2 -2
  22. package/dist/{chunk-KZPZRHL6.js → chunk-XG4JKFZ6.js} +6 -6
  23. package/dist/{chunk-7XUEKIXH.js → chunk-Z7XNHIW7.js} +2 -2
  24. package/dist/chunk-ZROVYWGU.js +1 -0
  25. package/dist/{composition-BGmpe5e4.d.ts → composition-C-hd_Ci3.d.ts} +84 -10
  26. package/dist/composition.d.ts +3 -3
  27. package/dist/composition.js +1 -1
  28. package/dist/{conversion-8SQD4dqu.d.ts → conversion-CCAmVKp8.d.ts} +9 -8
  29. package/dist/conversion-KV2WWCMK.js +24 -0
  30. package/dist/convert.d.ts +6 -5
  31. package/dist/convert.js +7 -7
  32. package/dist/data.d.ts +4 -3
  33. package/dist/data.js +2 -2
  34. package/dist/{deck-report-BaKgPh_N.d.ts → deck-report-DQMsvyBI.d.ts} +5 -4
  35. package/dist/deck.d.ts +10 -9
  36. package/dist/deck.js +11 -11
  37. package/dist/diff.d.ts +3 -2
  38. package/dist/diff.js +4 -4
  39. package/dist/docs.d.ts +2 -1
  40. package/dist/docs.js +29 -17
  41. package/dist/examples.d.ts +3 -2
  42. package/dist/examples.js +90 -50
  43. package/dist/{explain-JSuESV-Y.d.ts → explain-iZeNOUc6.d.ts} +2 -1
  44. package/dist/{finding-Bh56sGtF.d.ts → finding-l9dlQ2NF.d.ts} +1 -1
  45. package/dist/font-policy.d.ts +2 -1
  46. package/dist/format.d.ts +2 -1
  47. package/dist/format.js +2 -2
  48. package/dist/ids.d.ts +3 -2
  49. package/dist/ids.js +4 -4
  50. package/dist/index.d.ts +38 -17
  51. package/dist/index.js +22 -22
  52. package/dist/markdown.d.ts +8 -7
  53. package/dist/markdown.js +8 -8
  54. package/dist/node-engine.d.ts +34 -11
  55. package/dist/node-engine.js +35 -29
  56. package/dist/{pagination-BsUTsQvk.d.ts → pagination-DyAKYpXu.d.ts} +4 -3
  57. package/dist/pagination.d.ts +4 -4
  58. package/dist/pagination.js +4 -4
  59. package/dist/patch.d.ts +4 -2
  60. package/dist/patch.js +3 -3
  61. package/dist/precompiled.d.ts +1 -1
  62. package/dist/precompiled.js +2 -2
  63. package/dist/{presentation-C-nHZyMw.d.ts → presentation-8jLSTFqL.d.ts} +10 -10
  64. package/dist/repo-readme.js +1 -1
  65. package/dist/schema-engine-ajv.js +1 -1
  66. package/dist/schema-engine-precompiled.js +2 -2
  67. package/dist/schema.d.ts +4 -3
  68. package/dist/schema.js +3 -3
  69. package/dist/schemas.d.ts +2 -1
  70. package/dist/schemas.js +1 -1
  71. package/dist/source.d.ts +5 -4
  72. package/dist/source.js +10 -10
  73. package/dist/spec/README.md +1 -1
  74. package/dist/spec/schemas/audience.schema.json +1 -0
  75. package/dist/spec/schemas/catalog-index.schema.json +1 -0
  76. package/dist/spec/schemas/catalog-manifest.schema.json +1 -0
  77. package/dist/spec/schemas/chart-type.schema.json +1 -0
  78. package/dist/spec/schemas/color-scheme.schema.json +1 -0
  79. package/dist/spec/schemas/finding.schema.json +1 -0
  80. package/dist/spec/schemas/font-scheme.schema.json +1 -0
  81. package/dist/spec/schemas/language.schema.json +1 -0
  82. package/dist/spec/schemas/layout-preview-index.schema.json +1 -0
  83. package/dist/spec/schemas/layout.schema.json +8 -6
  84. package/dist/spec/schemas/narrative.schema.json +1 -0
  85. package/dist/spec/schemas/opf.schema.json +8 -7
  86. package/dist/spec/schemas/purpose.schema.json +1 -0
  87. package/dist/spec/schemas/social-platform.schema.json +1 -0
  88. package/dist/spec/schemas/theme.schema.json +3 -1
  89. package/dist/spec/schemas/tone.schema.json +1 -0
  90. package/dist/spec-files.d.ts +2 -1
  91. package/dist/symbol-font-encodings.d.ts +2 -1
  92. package/dist/types.d.ts +10 -10
  93. package/dist/{validation-types-6_jEaHeE.d.ts → validation-types-mNmfcY9A.d.ts} +5 -4
  94. package/dist/validator.d.ts +8 -8
  95. package/dist/validator.js +3 -3
  96. package/dist/yaml.d.ts +8 -7
  97. package/dist/yaml.js +7 -7
  98. package/package.json +7 -7
  99. package/dist/chunk-GJO5NUVT.js +0 -1
  100. package/dist/conversion-LN6PFRZL.js +0 -24
package/dist/index.d.ts CHANGED
@@ -1,22 +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 { C as ConvertInput, a as ConvertOptions, b as ConvertResult, c as ConvertFormat, O as OpenOptions, S as SaveOptions, d as SaveResult } from './conversion-8SQD4dqu.js';
3
- export { e as ConvertedFile, E as ExportFormat, F as FontsHandle, f as OPFApiError, g as OPFExportError, h as OPFImportError, i as SlideSelection, p as parseSlideSelection } from './conversion-8SQD4dqu.js';
4
- export { R as RuleExplanation, e as explain } from './explain-JSuESV-Y.js';
2
+ import { a3 as ConvertInput, a4 as ConvertOptions, a5 as ConvertResult, a6 as ConvertFormat, a7 as OpenOptions, a8 as SaveOptions, a9 as SaveResult } from './conversion-CCAmVKp8.js';
3
+ export { aa as ConvertedFile, h as ExportFormat, F as FontsHandle, O as OPFApiError, n as OPFExportError, o as OPFImportError, S as SlideSelection, U as parseSlideSelection } from './conversion-CCAmVKp8.js';
4
+ export { R as RuleExplanation, e as explain } from './explain-iZeNOUc6.js';
5
5
  import { validate as validate$1 } from './validator.js';
6
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-6_jEaHeE.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-6_jEaHeE.js';
9
- export { a as CHART_TYPES, C as ComposeSlideOptions, E as ENGINE_DEFAULT_CHART_TYPES, b as ENGINE_DEFAULT_COLOR_SCHEME, c as ENGINE_DEFAULT_FONT_SCHEME, d as ENGINE_DEFAULT_THEME, e as FontFamilies, F as Fonts, f as LANGUAGES, g as LOGO_SHAPES, h as LanguageFamilyName, i as LanguageVocabulary, L as LayoutDiagnostic, j as LogoShape, k as LogoVariant, M as MeasureTextWidth, l as ResolveLogoOptions, m as ResolvedLogo, S as SOCIAL_PLATFORMS, n as SocialPlatformVocabulary, T as TextMeasurement, o as TextStyle, p as normalizeLanguageFamily } from './composition-BGmpe5e4.js';
7
+ import { R as ResolveVariablesOptions, h as VariableDiagnostic } from './validation-types-mNmfcY9A.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-mNmfcY9A.js';
9
+ import { a as FontFamilies, T as TextMeasurement } from './composition-C-hd_Ci3.js';
10
+ export { b as CHART_TYPES, C as ComposeSlideOptions, E as ENGINE_DEFAULT_CHART_TYPES, c as ENGINE_DEFAULT_COLOR_SCHEME, d as ENGINE_DEFAULT_FONT_SCHEME, e as ENGINE_DEFAULT_THEME, F as Fonts, f as LANGUAGES, g as LOGO_SHAPES, h as LanguageFamilyName, i as LanguageVocabulary, L as LayoutDiagnostic, j as LogoShape, k as LogoVariant, M as MeasureTextWidth, l as ResolveLogoOptions, m as ResolvedLogo, S as SOCIAL_PLATFORMS, n as SocialPlatformVocabulary, o as TextStyle, p as normalizeLanguageFamily } from './composition-C-hd_Ci3.js';
10
11
  export { SpecFileEntry, SpecFileKind, SpecFilePath, specFileEntries, specFileKinds, specFilePaths } from './spec-files.js';
11
- import { P as Presentation } from './presentation-C-nHZyMw.js';
12
+ import { P as Presentation } from './presentation-8jLSTFqL.js';
12
13
  export { Audience, ChartType, ColorScheme, FontScheme, Language, Layout, Narrative, Purpose, SocialPlatform, Theme, Tone } from './types.js';
13
- import { C as CatalogKind, U as UnresolvedReferenceDiagnostic, b as CatalogOptions, a as Catalog, R as RecordProvenance } from './catalog-refs-BSfGELpt.js';
14
- export { c as CATALOG_GROUP_PATTERN, d as CATALOG_REFERENCE_PATTERN, e as CatalogRecordMap, f as CatalogRecords, g as CatalogReferenceSite, O as OPFCatalogsOptionError, h as OPFUnresolvedReferenceError, i as ResolvedReference, j as catalogGroupSource, k as catalogKinds, l as catalogRecords, m as catalogReferenceSites, p as parseReference, r as resolveReference, u as unresolvedReference } from './catalog-refs-BSfGELpt.js';
15
- import { F as Finding, J as JsonPatchOperation } from './finding-Bh56sGtF.js';
16
- export { d as FindingCategory, e as FindingFix, f as FindingFocus, a as FindingLocation, b as FindingReport, c as FindingSeverity, g as FindingSuggestion, V as ValidationIssue } from './finding-Bh56sGtF.js';
17
- export { a as CATALOG_SCHEMA, b as CatalogDisplayKind, C as CatalogRecordKind, c as catalogDisplayKinds, d as catalogSchemaNames } from './catalog-schemas-DoxA2BgY.js';
18
- import { p as paginate$1 } from './pagination-BsUTsQvk.js';
19
- export { O as OPFPaginationError, P as PaginatedPage, b as PaginationMapping, c as PaginationOptions, d as PaginationResult, a as PresentationPaginationOptions, e as PresentationPaginationResult, S as SlideContext, f as SlideContextDiagnostic, g as SlideContextOptions, h as paginateSlide, r as resolveSlideContext } from './pagination-BsUTsQvk.js';
14
+ import { a as CatalogKind, U as UnresolvedReferenceDiagnostic, b as CatalogOptions, C as Catalog, R as RecordProvenance } from './catalog-refs-kAefsZWT.js';
15
+ export { c as CATALOG_GROUP_PATTERN, d as CATALOG_REFERENCE_PATTERN, e as CatalogRecordMap, f as CatalogRecords, g as CatalogReferenceSite, O as OPFCatalogsOptionError, h as OPFUnresolvedReferenceError, i as ResolvedReference, j as catalogGroupSource, k as catalogKinds, l as catalogRecords, m as catalogReferenceSites, p as parseReference, r as resolveReference, u as unresolvedReference } from './catalog-refs-kAefsZWT.js';
16
+ import { a as Finding, J as JsonPatchOperation } from './finding-l9dlQ2NF.js';
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-CC1d_h8s.js';
19
+ import { paginate as paginate$1 } from './pagination.js';
20
+ export { O as OPFPaginationError, P as PaginatedPage, c as PaginationMapping, d as PaginationOptions, e as PaginationResult, a as PresentationPaginationOptions, b as PresentationPaginationResult, S as SlideContext, f as SlideContextDiagnostic, g as SlideContextOptions, h as paginateSlide, r as resolveSlideContext } from './pagination-DyAKYpXu.js';
20
21
  export { ApplyPatchOptions, OPFPatchError, OPFPatchHashError, OPFPatchValidationError, PatchResult, applyPatch, documentHash, idToken, isIdToken, resolveIdPatch, resolveIdPointer, toIdPatch, toIdPointer } from './patch.js';
21
22
  export { AssignIdsContext, AssignIdsOptions, AssignIdsResult, AssignedId, IdErrorCode, OPFIdError, PatchScope, PatchScopeKind, PatchTouch, assignIds, touches } from './ids.js';
22
23
  export { DiffOptions, MergeConflict, MergeOptions, MergeResult, PresentationDiff, diff, merge } from './diff.js';
@@ -24,9 +25,9 @@ export { FormatOptions, OPFFormatError, format } from './format.js';
24
25
  export { FromMarkdownOptions, FromMarkdownResult, OPFMarkdownError, ToMarkdownOptions, ToMarkdownResult, fromMarkdown, toMarkdown } from './markdown.js';
25
26
  export { StringifyOptions, parse, stringify } from './deck.js';
26
27
  export { DataCell, DataImportOptions, ImportedChart, ImportedChartData, ImportedChartType, ImportedTable, IngestOptions, OPFDataImportError, TabularData, ingest, parseTabularData } from './data.js';
27
- export { I as ChartComboSeries, C as ChartMapping, a as ChartNumberFix, b as ChartNumberFixOperation, c as ChartNumberFixOptions, D as DataCellValue, d as DataColumn, e as DataDiagnostic, f as DataDiagnosticCode, g as DataResolveOptions, h as DataSourceRef, i as DataStyledCell, j as DataTableCell, k as DataTableHeader, l as DataTableValue, m as DataTextRun, n as Dataset, o as DatasetRef, R as ResolvedChartData, p as ResolvedTableData, q as chartNumber, r as datasetDiagnostics, s as formatDataNumber, t as fromExcelNumberFormat, u as inlineChartData, v as inlineDatasets, w as inlineTableData, x as isDatasetRef, y as isXYChartType, z as numberFormatError, A as resolveChartData, B as resolveTableData, E as suggestChartNumberFix, F as tableCellDisplayValue, G as toExcelNumberFormat, H as unusedDatasets } from './chart-data-BnNqgnC-.js';
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-Ci9s_NDN.js';
28
29
  export { FONT_POLICY, FontAvailability, FontAvailabilityCode, FontAvailabilityDiagnostic, FontLicenseClass, FontPolicyDecision, FontPolicyEntry, FontPolicyTable, FontReplacement, FontReplacementCompatibility, FontReplacementMeasurement, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor } from './font-policy.js';
29
- export { a as DECK_FORMATS, D as DeckFormat, P as ParseOptions, d as deckFormatOf } from './deck-report-BaKgPh_N.js';
30
+ export { a as DECK_FORMATS, D as DeckFormat, P as ParseOptions, d as deckFormatOf } from './deck-report-DQMsvyBI.js';
30
31
  import './json-BFSdESOE.js';
31
32
 
32
33
  /**
@@ -647,6 +648,25 @@ declare function fillRecords(raw: string, options?: Pick<FillOptions, "format" |
647
648
  */
648
649
  declare function fill(template: unknown, data?: string | FillRecord | readonly FillRecord[], options?: FillOptions): FillResult;
649
650
 
651
+ /**
652
+ * The role families a slide composes with when a host measures text (WI-1, P24): each role family resolves once through
653
+ * the host's measurement (heading at weight 700, the others at 400), and composition then asks for the family the host
654
+ * draws. With the renderer's fonts, Aptos Display becomes Intos Display, its open replacement, and a run at a weight that
655
+ * face does not have (a metric value at 800, a quote at 600) draws its nearest weight, which the registry records as a
656
+ * visual substitution. This is the resolution `toSvg` composes with, so `validate` and `paginate` measure the same slide
657
+ * the renderer draws instead of failing on a weight the replacement lacks.
658
+ *
659
+ * Two kinds of family keep their own name, as in the renderer since RR-17 and FF-45: a family that names its weight
660
+ * (Arial Black, Segoe UI Semibold: at weight 400 the host draws another weight) resolves again on every run to its
661
+ * replacement's encoded weight, and a symbol-encoded family (Symbol, Wingdings: the host's resolved style carries
662
+ * `symbolEncoding`) keeps its encoding for the script planner. By default both are read from the host's own resolution,
663
+ * so core needs neither the font policy table nor the symbol tables here; a host that holds those tables (the renderer)
664
+ * passes `keepsName` and decides from them, with no extra resolution. Without a measurement that resolves styles the
665
+ * families are returned unchanged, and a family the host cannot resolve keeps its name, so a run that uses it fails with
666
+ * the host's error and a slide that never draws it is not affected.
667
+ */
668
+ declare function resolveDrawnFontFamilies<T extends Partial<FontFamilies>>(families: T, measurement: TextMeasurement | undefined, keepsName?: (family: string, resolved: string) => boolean): T;
669
+
650
670
  /** `validate` with the gallery registered when `catalogs` is omitted, as `opf validate` does. */
651
671
  declare const validate: typeof validate$1;
652
672
  /** `stats` with the gallery registered when `catalogs` is omitted, as `opf stats` does. */
@@ -698,4 +718,5 @@ declare function open(input: string | Uint8Array | ArrayBuffer, options?: OpenOp
698
718
  */
699
719
  declare function save(deck: Presentation, path: string, options?: SaveOptions): Promise<SaveResult>;
700
720
 
701
- export { Catalog, CatalogKind, CatalogOptions, type CatalogPatchOperation, type CatalogRecordChange, type CatalogRef, type CatalogUpdate, ConvertFormat, ConvertInput, ConvertOptions, ConvertResult, type CopiedRecordRename, type CopySlidesResult, type DatasetFact, type EditOptions, type EditResult, type EmbedResult, type EmbeddedRecord, type FillOptions, type FillRecord, type FillResult, type FilledDeck, Finding, type HeaderFooterFact, JsonPatchOperation, type MoveToCustomErrorCode, type MoveToCustomPatchOperation, type MoveToCustomResult, type MovedRecord, OPFMoveToCustomError, OpenOptions, Presentation, type PresentationStats, RecordProvenance, type ReferenceFact, ResolveVariablesOptions, type ResolvedDesignRecords, SLIDE_SCOPED_BUILTINS, SaveOptions, SaveResult, type SlideScopedBuiltin, type SlideSizeFact, type SlideStats, type StatsOptions, type StatsSlideRef, type TableFact, UnresolvedReferenceDiagnostic, VariableDiagnostic, convert, copySlides, edit, embed, fill, fillRecords, localAssetSources, moveToCustom, open, paginate, resolveDesignRecords, resolveFontScheme, resolveSlideVariables, sameRecord, save, stats, updateFromCatalog, validate };
721
+ export { Catalog, CatalogKind, CatalogOptions, ConvertFormat, ConvertInput, ConvertOptions, ConvertResult, Finding, FontFamilies, JsonPatchOperation, OPFMoveToCustomError, OpenOptions, Presentation, RecordProvenance, ResolveVariablesOptions, SLIDE_SCOPED_BUILTINS, SaveOptions, SaveResult, TextMeasurement, UnresolvedReferenceDiagnostic, VariableDiagnostic, convert, copySlides, edit, embed, fill, fillRecords, localAssetSources, moveToCustom, open, paginate, resolveDesignRecords, resolveDrawnFontFamilies, resolveFontScheme, resolveSlideVariables, sameRecord, save, stats, updateFromCatalog, validate };
722
+ 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,28 @@
1
- import { defaultCatalogs } from './chunk-7XUEKIXH.js';
2
- import { stats, embed, edit, OPFApiError, asApiError } from './chunk-TMREBZBQ.js';
3
- export { OPFApiError, OPFExportError, OPFImportError, OPFMoveToCustomError, copySlides, fill, fillRecords, localAssetSources, moveToCustom, parseSlideSelection, sameRecord, updateFromCatalog } from './chunk-TMREBZBQ.js';
1
+ import { defaultCatalogs } from './chunk-Z7XNHIW7.js';
2
+ import { stats, embed, edit, OPFApiError, asApiError } from './chunk-I6G32TB5.js';
3
+ export { OPFApiError, OPFExportError, OPFImportError, OPFMoveToCustomError, copySlides, fill, fillRecords, localAssetSources, moveToCustom, parseSlideSelection, sameRecord, updateFromCatalog } from './chunk-I6G32TB5.js';
4
4
  export { specFileEntries, specFileKinds, specFilePaths } from './chunk-UJSAR6GF.js';
5
5
  export { FONT_POLICY, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor } from './chunk-PJSPHHRK.js';
6
- export { OPFDataImportError, ingest, parseTabularData } from './chunk-JSHMFTSY.js';
7
- import { paginate } from './chunk-WJ4XTCOD.js';
8
- export { OPFPaginationError, paginateSlide } from './chunk-WJ4XTCOD.js';
9
- export { DECK_FORMATS, deckFormatOf, parse, stringify } from './chunk-OSM3LZ2Y.js';
10
- export { fromMarkdown, toMarkdown } from './chunk-GNKESMZT.js';
11
- import './chunk-KZPZRHL6.js';
12
- export { OPFFormatError, format } from './chunk-O3SA5SJ4.js';
6
+ export { OPFDataImportError, ingest, parseTabularData } from './chunk-P5E3FNYO.js';
7
+ import { paginate } from './chunk-7UO6H32I.js';
8
+ export { OPFPaginationError, paginateSlide } from './chunk-7UO6H32I.js';
9
+ export { DECK_FORMATS, deckFormatOf, parse, stringify } from './chunk-SYCHWS7C.js';
10
+ export { fromMarkdown, toMarkdown } from './chunk-F5QC7E2O.js';
11
+ import './chunk-XG4JKFZ6.js';
12
+ export { OPFFormatError, format } from './chunk-KELC4K62.js';
13
13
  import './chunk-RYZPBJLB.js';
14
- export { explain } from './chunk-CXPBU5W4.js';
15
- import './chunk-353VBJ6K.js';
16
- import './chunk-EO3JWEO5.js';
17
- export { OPFMarkdownError } from './chunk-SYW4BCGZ.js';
18
- import './chunk-ABFDFZIW.js';
19
- export { OPFIdError, assignIds, touches } from './chunk-4ACS57MG.js';
20
- export { diff, merge } from './chunk-APLNGCEZ.js';
21
- import { validate, OPFValidationError } from './chunk-PAGVSTVF.js';
22
- export { CATALOG_SCHEMA, DEFAULT_VALIDATION_THRESHOLDS, OPFPatchError, OPFPatchHashError, OPFPatchValidationError, OPFValidationError, applyPatch, assertValid, assertValidCatalogRecord, catalogDisplayKinds, catalogSchemaNames, documentHash, findValidationRule, idToken, isIdToken, resolveIdPatch, resolveIdPointer, resolveSlideContext, toIdPatch, toIdPointer, validateCatalogRecord, validationCategories, validationRules } from './chunk-PAGVSTVF.js';
14
+ export { explain } from './chunk-W7KPMUJF.js';
15
+ import './chunk-UKWNHK62.js';
16
+ import './chunk-5OMZW44K.js';
17
+ export { OPFMarkdownError } from './chunk-HRKV43GC.js';
18
+ import './chunk-KOCXV7H3.js';
19
+ export { OPFIdError, assignIds, touches } from './chunk-ARFAQNOH.js';
20
+ export { diff, merge } from './chunk-WHDOOLIO.js';
21
+ import { validate, OPFValidationError } from './chunk-M7YZU3DX.js';
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-M7YZU3DX.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-4ZM5G3XX.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, catalogGroupSource, catalogKinds, catalogRecords, catalogReferenceSites, chartNumber, coerceVariableValue, datasetDiagnostics, formatDataNumber, formatVariableNumber, fromExcelNumberFormat, hasContentVariables, inlineChartData, inlineDatasets, inlineTableData, isDatasetRef, isTemplate, isXYChartType, listBuiltinVariables, listVariables, normalizeLanguageFamily, numberFormatError, parseReference, resolveChartData, resolveDesignRecords, resolveFontScheme, resolveReference, resolveSlideVariables, resolveTableData, resolveVariables, suggestChartNumberFix, tableCellDisplayValue, toExcelNumberFormat, unresolvedReference, unusedDatasets, variableDeclarations } from './chunk-LRTQXGJO.js';
24
+ export { audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './chunk-5Q4IYLMW.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, catalogGroupSource, catalogKinds, catalogRecords, catalogReferenceSites, chartNumber, coerceVariableValue, datasetDiagnostics, formatDataNumber, formatVariableNumber, fromExcelNumberFormat, hasContentVariables, inlineChartData, inlineDatasets, inlineTableData, isDatasetRef, isTemplate, isXYChartType, listBuiltinVariables, listVariables, normalizeLanguageFamily, numberFormatError, parseReference, resolveChartData, resolveDesignRecords, resolveFontScheme, resolveReference, resolveSlideVariables, resolveTableData, resolveVariables, suggestChartNumberFix, tableCellDisplayValue, toExcelNumberFormat, unresolvedReference, unusedDatasets, variableDeclarations } from './chunk-W3SEWSO5.js';
26
26
  import './chunk-GM7WFPGG.js';
27
27
 
28
28
  // src/index.ts
@@ -36,7 +36,7 @@ var stats2 = (presentation2, options) => stats(presentation2, withDefaultCatalog
36
36
  var paginate2 = (input, options) => paginate(input, withDefaultCatalog(options));
37
37
  var embed2 = (document, options) => embed(document, withDefaultCatalog(options));
38
38
  var edit2 = (deck, patch, options) => edit(deck, patch, withDefaultCatalog(options));
39
- var engine = () => import('./conversion-LN6PFRZL.js');
39
+ var engine = () => import('./conversion-KV2WWCMK.js');
40
40
  var rethrow = (error, fallback) => {
41
41
  if (error instanceof OPFValidationError) throw error;
42
42
  throw asApiError(OPFApiError, error, fallback);
@@ -1,9 +1,9 @@
1
- import { a as Catalog } from './catalog-refs-BSfGELpt.js';
2
- import { P as Presentation } from './presentation-C-nHZyMw.js';
3
- import { F as Finding, a as FindingLocation } from './finding-Bh56sGtF.js';
4
- import { a as ValidateOptions, V as ValidationReport } from './validation-types-6_jEaHeE.js';
5
- import './composition-BGmpe5e4.js';
6
- import './chart-data-BnNqgnC-.js';
1
+ import { Catalog } from './composition.js';
2
+ import { Presentation } from './index.js';
3
+ import { Finding, FindingLocation } from './index.js';
4
+ import { ValidateOptions, ValidationReport } from './index.js';
5
+ import './composition-C-hd_Ci3.js';
6
+ import './chart-data-Ci9s_NDN.js';
7
7
  import './json-BFSdESOE.js';
8
8
 
9
9
  interface EmbeddedPart {
@@ -89,4 +89,5 @@ interface ToMarkdownResult {
89
89
  */
90
90
  declare function toMarkdown(document: unknown, options?: ToMarkdownOptions): ToMarkdownResult;
91
91
 
92
- export { type EmbeddedPart, type FromMarkdownOptions, type FromMarkdownResult, OPFMarkdownError, type ToMarkdownOptions, type ToMarkdownResult, fromMarkdown, toMarkdown };
92
+ export { OPFMarkdownError, fromMarkdown, toMarkdown };
93
+ export type { EmbeddedPart, FromMarkdownOptions, FromMarkdownResult, ToMarkdownOptions, ToMarkdownResult };
package/dist/markdown.js CHANGED
@@ -1,11 +1,11 @@
1
- export { fromMarkdown, toMarkdown } from './chunk-GNKESMZT.js';
1
+ export { fromMarkdown, toMarkdown } from './chunk-F5QC7E2O.js';
2
2
  import './chunk-RYZPBJLB.js';
3
- import './chunk-353VBJ6K.js';
4
- import './chunk-EO3JWEO5.js';
5
- export { OPFMarkdownError } from './chunk-SYW4BCGZ.js';
6
- import './chunk-ABFDFZIW.js';
7
- import './chunk-PAGVSTVF.js';
3
+ import './chunk-UKWNHK62.js';
4
+ import './chunk-5OMZW44K.js';
5
+ export { OPFMarkdownError } from './chunk-HRKV43GC.js';
6
+ import './chunk-KOCXV7H3.js';
7
+ import './chunk-M7YZU3DX.js';
8
8
  import './chunk-JBARNYFR.js';
9
- import './chunk-4ZM5G3XX.js';
10
- import './chunk-LRTQXGJO.js';
9
+ import './chunk-5Q4IYLMW.js';
10
+ import './chunk-W3SEWSO5.js';
11
11
  import './chunk-GM7WFPGG.js';
@@ -1,14 +1,14 @@
1
- export { b as DeckReport, c as DeckReportOptions, r as readDeckReport } from './deck-report-BaKgPh_N.js';
2
- import { F as FontsHandle, j as EmbeddedFace, R as Renderer, k as Reporter, P as Peer, l as PptxModule, f as OPFApiError } from './conversion-8SQD4dqu.js';
3
- export { m as ConversionPlan, D as Diagnostic, n as EXPORT_FORMATS, o as EXPORT_TEXT, q as ExportContext, r as ExportFile, s as ExportFontSummary, E as ExportFormat, t as ExportOptions, u as ExportResult, v as ExportRun, w as ExportText, I as ImportOptions, x as ImportResult, g as OPFExportError, h as OPFImportError, y as PEER_RANGES, z as PPTX_PACKAGE, A as PreparedExport, B as RENDER_EXTRAS, G as RENDER_PACKAGE, H as ReportFinding, J as ResolvedExportOptions, i as SlideSelection, K as Source, V as VERSIONS, L as asApiError, M as assetRoot, N as checkDate, Q as checkOptions, T as checkRenamedOptions, U as checkScale, W as deckFileFormat, X as exportFormatOf, Y as finishReport, Z as importPresentation, _ as loadPptx, $ as loadRenderer, a0 as locatePackage, a1 as missingPeerFrom, p as parseSlideSelection, a2 as planConversion, a3 as prepareExport, a4 as reaches, a5 as readInput, a6 as reportThrown, a7 as resolveExportOptions, a8 as runExport, a9 as runPreparedExport, aa as writePlanned } from './conversion-8SQD4dqu.js';
4
- import { a as Catalog } from './catalog-refs-BSfGELpt.js';
5
- import { e as PresentationPaginationResult } from './pagination-BsUTsQvk.js';
6
- import './presentation-C-nHZyMw.js';
7
- import './validation-types-6_jEaHeE.js';
8
- import './composition-BGmpe5e4.js';
9
- import './chart-data-BnNqgnC-.js';
10
- import './finding-Bh56sGtF.js';
1
+ export { b as DeckReport, c as DeckReportOptions, r as readDeckReport } from './deck-report-DQMsvyBI.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-CCAmVKp8.js';
3
+ export { C as ConversionPlan, D as Diagnostic, c as EXPORT_FORMATS, d as EXPORT_TEXT, e as ExportContext, f as ExportFile, g as ExportFontSummary, h as ExportFormat, i as ExportOptions, j as ExportResult, k as ExportRun, l as ExportText, I as ImportOptions, m as ImportResult, n as OPFExportError, o as OPFImportError, p as PEER_RANGES, q as PPTX_PACKAGE, r as PreparedExport, s as RENDER_EXTRAS, t as RENDER_PACKAGE, u as ReportFinding, v as ResolvedExportOptions, S as SlideSelection, w as Source, V as VERSIONS, x as asApiError, y as assetRoot, z as checkDate, A as checkOptions, B as checkRenamedOptions, G as checkScale, H as deckFileFormat, J as exportFormatOf, K as finishReport, L as importPresentation, M as loadPptx, N as loadRenderer, Q as locatePackage, T as missingPeerFrom, U as parseSlideSelection, W as planConversion, X as prepareExport, Y as reaches, Z as readInput, _ as reportThrown, $ as resolveExportOptions, a0 as runExport, a1 as runPreparedExport, a2 as writePlanned } from './conversion-CCAmVKp8.js';
4
+ import { Catalog } from './composition.js';
5
+ import { Fonts } from './composition.js';
6
+ import { PresentationPaginationResult } from './index.js';
7
+ import './presentation-8jLSTFqL.js';
8
+ import './validation-types-mNmfcY9A.js';
9
+ import './finding-l9dlQ2NF.js';
11
10
  import './json-BFSdESOE.js';
11
+ import './chart-data-Ci9s_NDN.js';
12
12
 
13
13
  /** `deck.opf.json` and `deck.pptx` both give `deck`; stdin gives `deck`. */
14
14
  declare function stemOf(input: string): string;
@@ -144,10 +144,33 @@ interface PaginatedDeck {
144
144
  * `fontFolders` the fonts are required, so a missing renderer throws. Throws `OPFPaginationError` when content cannot fit.
145
145
  */
146
146
  declare function paginateDeck(deck: unknown, options: PaginateDeckOptions): Promise<PaginatedDeck>;
147
+ interface MeasuringFontsOptions {
148
+ /** Folders of `.ttf` and `.otf` files, loaded before the bundled pack (as `--fonts`). They need opf-render. */
149
+ fontFolders?: readonly string[];
150
+ /** Receives the font diagnostics. */
151
+ reporter: Reporter;
152
+ /** Name options as the command's flags in messages. */
153
+ flags?: boolean;
154
+ }
155
+ interface MeasuringFonts {
156
+ /** The fonts `opf convert` draws `deck` with; absent when the layout can only be estimated. */
157
+ fonts?: Fonts;
158
+ /** Why there are no fonts: the missing or too old peer (`peer-not-installed`, `peer-too-old`) that measuring needs. */
159
+ estimated?: OPFApiError;
160
+ /** Returns a shared handle; call it when the measurement is done. */
161
+ release(): void;
162
+ }
163
+ /**
164
+ * The fonts the CLI measures a deck with (`opf paginate`, `opf validate`; WI-1, P24): opf-render's office pack, prepared once per
165
+ * process and shared, plus any `fontFolders`, as `opf convert` draws. Without opf-render (or with one too old) the result has no
166
+ * fonts and says why in `estimated`. With `fontFolders` the fonts are required, so a missing renderer throws.
167
+ */
168
+ declare function measuringFonts(deck: unknown, options: MeasuringFontsOptions): Promise<MeasuringFonts>;
147
169
 
148
170
  /** Why a gallery that declares `declared` cannot be the default catalog of a core that reads `reads`, or undefined when it can. */
149
171
  declare function galleryMismatch(declared: unknown, reads?: number): string | undefined;
150
172
  /** The catalogs a call registers when it names none: `[gallery]`. Throws `gallery-schema-mismatch` for a gallery of another schema. */
151
173
  declare function defaultCatalogs(): readonly Catalog[];
152
174
 
153
- export { type AssetProblem, FontsHandle, type ImportRun, OPFApiError, type PaginateDeckOptions, type PaginatedDeck, Peer, type PlannedFile, PptxModule, Renderer, Reporter, checkDestinations, checkOutputPattern, createZip, deckStem, defaultCatalogs, embeddedFor, galleryMismatch, leaseSharedFonts, listFontDirectories, localAssetProblems, padNumber, paginateDeck, pointerOf, prepareFonts, publishNew, runImport, stemOf, writeFiles };
175
+ export { FontsHandle, OPFApiError, Peer, PptxModule, Renderer, Reporter, checkDestinations, checkOutputPattern, createZip, deckStem, defaultCatalogs, embeddedFor, galleryMismatch, leaseSharedFonts, listFontDirectories, localAssetProblems, measuringFonts, padNumber, paginateDeck, pointerOf, prepareFonts, publishNew, runImport, stemOf, writeFiles };
176
+ export type { AssetProblem, ImportRun, MeasuringFonts, MeasuringFontsOptions, PaginateDeckOptions, PaginatedDeck, PlannedFile };
@@ -1,48 +1,54 @@
1
- import { loadRenderer, listFontDirectories, leaseSharedFonts, prepareFonts } from './chunk-ZGTOZA2S.js';
2
- export { EXPORT_FORMATS, EXPORT_TEXT, PEER_RANGES, PPTX_PACKAGE, RENDER_EXTRAS, RENDER_PACKAGE, Reporter, VERSIONS, assetRoot, checkDate, checkDestinations, checkOptions, checkOutputPattern, checkRenamedOptions, checkScale, createZip, deckFileFormat, deckStem, embeddedFor, exportFormatOf, finishReport, importPresentation, leaseSharedFonts, listFontDirectories, loadPptx, loadRenderer, localAssetProblems, locatePackage, missingPeerFrom, padNumber, planConversion, pointerOf, prepareExport, prepareFonts, publishNew, reaches, readInput, reportThrown, resolveExportOptions, runExport, runImport, runPreparedExport, stemOf, writeFiles, writePlanned } from './chunk-ZGTOZA2S.js';
3
- import { defaultCatalogs } from './chunk-7XUEKIXH.js';
4
- export { defaultCatalogs, galleryMismatch } from './chunk-7XUEKIXH.js';
5
- import { OPFApiError } from './chunk-TMREBZBQ.js';
6
- export { OPFApiError, OPFExportError, OPFImportError, asApiError, parseSlideSelection } from './chunk-TMREBZBQ.js';
1
+ import { loadRenderer, listFontDirectories, leaseSharedFonts, prepareFonts } from './chunk-R455YZNO.js';
2
+ export { EXPORT_FORMATS, EXPORT_TEXT, PEER_RANGES, PPTX_PACKAGE, RENDER_EXTRAS, RENDER_PACKAGE, Reporter, VERSIONS, assetRoot, checkDate, checkDestinations, checkOptions, checkOutputPattern, checkRenamedOptions, checkScale, createZip, deckFileFormat, deckStem, embeddedFor, exportFormatOf, finishReport, importPresentation, leaseSharedFonts, listFontDirectories, loadPptx, loadRenderer, localAssetProblems, locatePackage, missingPeerFrom, padNumber, planConversion, pointerOf, prepareExport, prepareFonts, publishNew, reaches, readInput, reportThrown, resolveExportOptions, runExport, runImport, runPreparedExport, stemOf, writeFiles, writePlanned } from './chunk-R455YZNO.js';
3
+ import { defaultCatalogs } from './chunk-Z7XNHIW7.js';
4
+ export { defaultCatalogs, galleryMismatch } from './chunk-Z7XNHIW7.js';
5
+ import { OPFApiError } from './chunk-I6G32TB5.js';
6
+ export { OPFApiError, OPFExportError, OPFImportError, asApiError, parseSlideSelection } from './chunk-I6G32TB5.js';
7
7
  import './chunk-UJSAR6GF.js';
8
8
  import './chunk-PJSPHHRK.js';
9
- import './chunk-JSHMFTSY.js';
10
- import { paginate } from './chunk-WJ4XTCOD.js';
11
- export { readDeckReport } from './chunk-OSM3LZ2Y.js';
12
- import './chunk-GNKESMZT.js';
13
- import './chunk-KZPZRHL6.js';
14
- import './chunk-O3SA5SJ4.js';
9
+ import './chunk-P5E3FNYO.js';
10
+ import { paginate } from './chunk-7UO6H32I.js';
11
+ export { readDeckReport } from './chunk-SYCHWS7C.js';
12
+ import './chunk-F5QC7E2O.js';
13
+ import './chunk-XG4JKFZ6.js';
14
+ import './chunk-KELC4K62.js';
15
15
  import './chunk-RYZPBJLB.js';
16
- import './chunk-CXPBU5W4.js';
17
- import './chunk-353VBJ6K.js';
18
- import './chunk-EO3JWEO5.js';
19
- import './chunk-SYW4BCGZ.js';
20
- import './chunk-ABFDFZIW.js';
21
- import './chunk-4ACS57MG.js';
22
- import './chunk-APLNGCEZ.js';
23
- import './chunk-PAGVSTVF.js';
16
+ import './chunk-W7KPMUJF.js';
17
+ import './chunk-UKWNHK62.js';
18
+ import './chunk-5OMZW44K.js';
19
+ import './chunk-HRKV43GC.js';
20
+ import './chunk-KOCXV7H3.js';
21
+ import './chunk-ARFAQNOH.js';
22
+ import './chunk-WHDOOLIO.js';
23
+ import './chunk-M7YZU3DX.js';
24
24
  import './chunk-JBARNYFR.js';
25
- import './chunk-4ZM5G3XX.js';
26
- import './chunk-LRTQXGJO.js';
25
+ import './chunk-5Q4IYLMW.js';
26
+ import './chunk-W3SEWSO5.js';
27
27
  import './chunk-GM7WFPGG.js';
28
28
 
29
29
  // src/node/paginate.ts
30
30
  async function paginateDeck(deck, options) {
31
31
  const catalogs = options.catalogs ?? defaultCatalogs();
32
+ const measuring = await measuringFonts(deck, options);
33
+ try {
34
+ return { result: paginate(deck, { ...measuring.fonts ? { fonts: measuring.fonts } : {}, catalogs }), ...measuring.estimated ? { estimated: measuring.estimated } : {} };
35
+ } finally {
36
+ measuring.release();
37
+ }
38
+ }
39
+ async function measuringFonts(deck, options) {
32
40
  const folders = options.fontFolders ?? [];
33
- let lease;
34
41
  try {
35
42
  const renderer = await loadRenderer();
36
43
  const userFonts = await listFontDirectories([...folders], options.flags ? "--fonts" : "fonts");
37
- lease = await leaseSharedFonts(renderer, deck, userFonts, options.reporter);
44
+ const lease = await leaseSharedFonts(renderer, deck, userFonts, options.reporter);
38
45
  const handle = lease?.handle ?? (await prepareFonts(renderer, deck, userFonts, options.reporter)).handle;
39
- return { result: paginate(deck, { fonts: handle, catalogs }) };
46
+ return { fonts: handle, release: () => lease?.release() };
40
47
  } catch (error) {
41
- if (error instanceof OPFApiError && (error.code === "peer-not-installed" || error.code === "peer-too-old") && !folders.length) return { result: paginate(deck, { catalogs }), estimated: error };
48
+ if (error instanceof OPFApiError && (error.code === "peer-not-installed" || error.code === "peer-too-old") && !folders.length) return { estimated: error, release: () => {
49
+ } };
42
50
  throw error;
43
- } finally {
44
- lease?.release();
45
51
  }
46
52
  }
47
53
 
48
- export { paginateDeck };
54
+ export { measuringFonts, paginateDeck };
@@ -1,5 +1,5 @@
1
- import { C as ComposeSlideOptions, R as ResolvedColorRoles, F as Fonts, L as LayoutDiagnostic } from './composition-BGmpe5e4.js';
2
- import { U as UnresolvedReferenceDiagnostic, R as RecordProvenance, b as CatalogOptions, a as Catalog } from './catalog-refs-BSfGELpt.js';
1
+ import { C as ComposeSlideOptions, R as ResolvedColorRoles, F as Fonts, L as LayoutDiagnostic } from './composition-C-hd_Ci3.js';
2
+ import { U as UnresolvedReferenceDiagnostic, R as RecordProvenance, b as CatalogOptions, C as Catalog } from './catalog-refs-kAefsZWT.js';
3
3
 
4
4
  /**
5
5
  * One slide's composition context: the layout, canvas, theme and font families that `composeSlide` needs,
@@ -135,4 +135,5 @@ interface PresentationPaginationResult {
135
135
  /** Resolve the slides' references (the document's catalogs groups, then the registered catalogs) and paginate a complete presentation without mutating it. */
136
136
  declare function paginate(input: unknown, options?: PresentationPaginationOptions): PresentationPaginationResult;
137
137
 
138
- export { OPFPaginationError as O, type PaginatedPage as P, type SlideContext as S, type PresentationPaginationOptions as a, type PaginationMapping as b, type PaginationOptions as c, type PaginationResult as d, type PresentationPaginationResult as e, type SlideContextDiagnostic as f, type SlideContextOptions as g, paginateSlide as h, paginate as p, resolveSlideContext as r };
138
+ export { OPFPaginationError as O, paginateSlide as h, paginate as p, resolveSlideContext as r };
139
+ export type { PaginatedPage as P, SlideContext as S, PresentationPaginationOptions as a, PresentationPaginationResult as b, PaginationMapping as c, PaginationOptions as d, PaginationResult as e, SlideContextDiagnostic as f, SlideContextOptions as g };
@@ -1,4 +1,4 @@
1
- import './composition-BGmpe5e4.js';
2
- import './catalog-refs-BSfGELpt.js';
3
- export { O as OPFPaginationError, P as PaginatedPage, b as PaginationMapping, c as PaginationOptions, d as PaginationResult, a as PresentationPaginationOptions, e as PresentationPaginationResult, p as paginate, h as paginateSlide } from './pagination-BsUTsQvk.js';
4
- import './chart-data-BnNqgnC-.js';
1
+ import './composition-C-hd_Ci3.js';
2
+ import './catalog-refs-kAefsZWT.js';
3
+ export { O as OPFPaginationError, P as PaginatedPage, c as PaginationMapping, d as PaginationOptions, e as PaginationResult, a as PresentationPaginationOptions, b as PresentationPaginationResult, p as paginate, h as paginateSlide } from './pagination-DyAKYpXu.js';
4
+ import './chart-data-Ci9s_NDN.js';
@@ -1,6 +1,6 @@
1
- export { OPFPaginationError, paginate, paginateSlide } from './chunk-WJ4XTCOD.js';
2
- import './chunk-PAGVSTVF.js';
1
+ export { OPFPaginationError, paginate, paginateSlide } from './chunk-7UO6H32I.js';
2
+ import './chunk-M7YZU3DX.js';
3
3
  import './chunk-JBARNYFR.js';
4
- import './chunk-4ZM5G3XX.js';
5
- import './chunk-LRTQXGJO.js';
4
+ import './chunk-5Q4IYLMW.js';
5
+ import './chunk-W3SEWSO5.js';
6
6
  import './chunk-GM7WFPGG.js';
package/dist/patch.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { b as FindingReport, F as Finding, J as JsonPatchOperation } from './finding-Bh56sGtF.js';
1
+ import { J as JsonPatchOperation } from './finding-l9dlQ2NF.js';
2
+ import { FindingReport, Finding } from './index.js';
2
3
 
3
4
  /**
4
5
  * The content hash of a document: `sha256:` and the SHA-256 of its canonical JSON (members sorted at every depth), as 64 lowercase
@@ -168,4 +169,5 @@ declare function resolveIdPatch(document: unknown, patch: unknown): JsonPatchOpe
168
169
  */
169
170
  declare function toIdPatch(document: unknown, patch: unknown): JsonPatchOperation[];
170
171
 
171
- export { type ApplyPatchOptions, JsonPatchOperation, type JsonPointer, OPFPatchError, OPFPatchHashError, OPFPatchValidationError, type PatchErrorCode, type PatchResult, type PatchStep, type PatchValidationResult, applyPatch, applyPatchWithInverse, documentHash, escapePointerToken, formatPointer, getAtPointer, hasPointer, idToken, invertPatch, isIdToken, jsonEqual, normalizePatch, parsePointer, pointerFromPath, readPointer, resolveIdPatch, resolveIdPointer, splitPointer, toIdPatch, toIdPointer, unescapePointerToken, walkPatch };
172
+ export { JsonPatchOperation, 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 };
173
+ export type { ApplyPatchOptions, JsonPointer, PatchErrorCode, PatchResult, PatchStep, PatchValidationResult };
package/dist/patch.js CHANGED
@@ -1,5 +1,5 @@
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-PAGVSTVF.js';
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-M7YZU3DX.js';
2
2
  import './chunk-JBARNYFR.js';
3
- import './chunk-4ZM5G3XX.js';
4
- import './chunk-LRTQXGJO.js';
3
+ import './chunk-5Q4IYLMW.js';
4
+ import './chunk-W3SEWSO5.js';
5
5
  import './chunk-GM7WFPGG.js';
@@ -1,2 +1,2 @@
1
1
 
2
- export { }
2
+ export { };
@@ -1,6 +1,6 @@
1
1
  import { installSchemaEngine } from './chunk-43JWUIGF.js';
2
- import { schemaEngine } from './chunk-GJO5NUVT.js';
3
- import './chunk-4ZM5G3XX.js';
2
+ import { schemaEngine } from './chunk-ZROVYWGU.js';
3
+ import './chunk-5Q4IYLMW.js';
4
4
  import './chunk-GM7WFPGG.js';
5
5
 
6
6
  // src/precompiled.ts
@@ -500,7 +500,7 @@ type ContentPayload = {
500
500
  mediaType?: string;
501
501
  });
502
502
  /**
503
- * Image payloads only. How the picture fills its frame: 'cover' fills it and crops what overflows around focus; 'contain' shows the whole picture centered; 'stretch' scales it to the frame exactly. Default: the effective design.imageFit, else 'cover'.
503
+ * Image payloads only. How the picture fills its frame: 'cover' fills it and crops what overflows around focus; 'contain' shows the whole picture, in a frame of its own proportions placed at the region's anchor (top by default); 'stretch' scales it to the frame exactly. Default: the effective design.imageFit, else 'cover' in a layout and 'contain' on a slide with no layout.
504
504
  */
505
505
  fit?: ("cover" | "contain" | "stretch");
506
506
  focus?: ImageFocus1;
@@ -1202,7 +1202,7 @@ interface Design {
1202
1202
  */
1203
1203
  titleAlignment?: ("left" | "center" | "right");
1204
1204
  /**
1205
- * Default horizontal alignment for body/content regions in resolved layouts. Effective value: the slide's design, then the deck's design, then the theme's design.contentAlignment, then the layout record's design.contentAlignment, then the engine default. The tag follows titleAlignment (and a cover's subtitle with it) unless the slide's own design sets contentAlignment.
1205
+ * Default horizontal alignment for body/content regions in resolved layouts. Effective value: the slide's design, then the deck's design, then the theme's design.contentAlignment, then the layout record's design.contentAlignment, then the engine default. The tag follows titleAlignment (and so does a subtitle in the title area, as on a cover) unless the slide's own design sets contentAlignment.
1206
1206
  */
1207
1207
  contentAlignment?: ("left" | "center" | "right");
1208
1208
  /**
@@ -1218,13 +1218,13 @@ interface Design {
1218
1218
  */
1219
1219
  chartPrimary?: ("none" | "top" | "bottom" | "left" | "right");
1220
1220
  /**
1221
- * Default fit of image blocks (and Slide.image) that set no fit of their own: 'cover' fills the frame and crops what overflows around the block's focus, 'contain' shows the whole picture centered in the frame, 'stretch' scales it to the frame exactly. Effective value: the slide's design, then the deck's design, then the theme's design.imageFit, then the layout record's design.imageFit, then 'cover'. Backgrounds set their own fit.
1221
+ * Default fit of image blocks (and Slide.image) that set no fit of their own: 'cover' fills the frame and crops what overflows around the block's focus, 'contain' shows the whole picture in a frame of its own proportions, centered across and placed down the cell by the region's anchor (top by default), 'stretch' scales it to the frame exactly. Effective value: the slide's design, then the deck's design, then the theme's design.imageFit, then the layout record's design.imageFit, then 'cover'; a slide composed with no layout shows its pictures whole ('contain') instead. Backgrounds set their own fit.
1222
1222
  */
1223
1223
  imageFit?: ("cover" | "contain" | "stretch");
1224
1224
  /**
1225
- * Marker style for items and bullets lists. Effective value: the slide's design, then the deck's design, then the theme's design.listBullet, then the layout record's design.listBullet, then 'character'. 'character' (the default) draws the glyph marker. 'image' draws the primary organization's icon logo (or the organization and shape design.logo names; the onDark value on dark backgrounds) as a picture bullet: a square with side 0.65 times the marker's font size whose bottom sits on the marker baseline, so list geometry does not change. Without a logo the glyph is drawn and the engine reports unresolved-content at this field.
1225
+ * Marker style for items and bullets lists. Effective value: the slide's design, then the deck's design, then the theme's design.listBullet, then the layout record's design.listBullet, then 'character'. 'character' (the default) draws the glyph marker. 'image' draws the primary organization's icon logo (or the organization and shape design.logo names; the onDark value on dark backgrounds) as a picture bullet: a square with side 0.65 times the marker's font size whose bottom sits on the marker baseline, so list geometry does not change. Without a logo the glyph is drawn and the engine reports unresolved-content at this field. 'none' draws no marker and no hanging indent, so each entry's text (and its description) starts at the left edge of the list: use it for label-and-description lists such as pillars, team members and questions with answers. Nested levels keep their indent. A list that sets numbering still draws its numbers.
1226
1226
  */
1227
- listBullet?: ("character" | "image");
1227
+ listBullet?: ("character" | "image" | "none");
1228
1228
  /**
1229
1229
  * Draw the slide's template layout mirrored (OPF 0.19): each row's cells and the column sizes reversed, so a 'beside' layout puts its picture, chart or table at the end. Logical: a right-to-left deck mirrors on top. Binding and reading order do not change. Effective value: the slide's design, then the deck's design, then the layout record's design.mirror, then false. Slides without a template layout ignore it.
1230
1230
  */
@@ -2393,7 +2393,7 @@ interface Chart {
2393
2393
  highlight?: ChartHighlight;
2394
2394
  }
2395
2395
  /**
2396
- * Inline tabular data driving a chart. The first column usually supplies category/x-axis labels; subsequent columns are plotted measures unless 'chart.mapping' or a chart type maps them differently. Value cells are numbers; a string is read only in strict decimal syntax ('12', '-3.5', '1e6'), and anything else ('12%', '$5', '(5)', '1,234') is a gap and a 'chart-value-not-numeric' warning.
2396
+ * Inline tabular data driving a chart, written as `{ "columns": ["Quarter", "Decks"], "rows": [["Q1", 3], ["Q2", 8]] }`: one column of labels plus one column per series, not separate `categories` and `series` lists. The first column usually supplies category/x-axis labels; subsequent columns are plotted measures unless 'chart.mapping' or a chart type maps them differently. Value cells are numbers; a string is read only in strict decimal syntax ('12', '-3.5', '1e6'), and anything else ('12%', '$5', '(5)', '1,234') is a gap and a 'chart-value-not-numeric' warning.
2397
2397
  *
2398
2398
  * This interface was referenced by `Presentation`'s JSON-Schema
2399
2399
  * via the `definition` "ChartData".
@@ -3049,7 +3049,7 @@ interface Design1 {
3049
3049
  */
3050
3050
  titleAlignment?: ("left" | "center" | "right");
3051
3051
  /**
3052
- * Default horizontal alignment for body/content regions in resolved layouts. Effective value: the slide's design, then the deck's design, then the theme's design.contentAlignment, then the layout record's design.contentAlignment, then the engine default. The tag follows titleAlignment (and a cover's subtitle with it) unless the slide's own design sets contentAlignment.
3052
+ * Default horizontal alignment for body/content regions in resolved layouts. Effective value: the slide's design, then the deck's design, then the theme's design.contentAlignment, then the layout record's design.contentAlignment, then the engine default. The tag follows titleAlignment (and so does a subtitle in the title area, as on a cover) unless the slide's own design sets contentAlignment.
3053
3053
  */
3054
3054
  contentAlignment?: ("left" | "center" | "right");
3055
3055
  /**
@@ -3065,13 +3065,13 @@ interface Design1 {
3065
3065
  */
3066
3066
  chartPrimary?: ("none" | "top" | "bottom" | "left" | "right");
3067
3067
  /**
3068
- * Default fit of image blocks (and Slide.image) that set no fit of their own: 'cover' fills the frame and crops what overflows around the block's focus, 'contain' shows the whole picture centered in the frame, 'stretch' scales it to the frame exactly. Effective value: the slide's design, then the deck's design, then the theme's design.imageFit, then the layout record's design.imageFit, then 'cover'. Backgrounds set their own fit.
3068
+ * Default fit of image blocks (and Slide.image) that set no fit of their own: 'cover' fills the frame and crops what overflows around the block's focus, 'contain' shows the whole picture in a frame of its own proportions, centered across and placed down the cell by the region's anchor (top by default), 'stretch' scales it to the frame exactly. Effective value: the slide's design, then the deck's design, then the theme's design.imageFit, then the layout record's design.imageFit, then 'cover'; a slide composed with no layout shows its pictures whole ('contain') instead. Backgrounds set their own fit.
3069
3069
  */
3070
3070
  imageFit?: ("cover" | "contain" | "stretch");
3071
3071
  /**
3072
- * Marker style for items and bullets lists. Effective value: the slide's design, then the deck's design, then the theme's design.listBullet, then the layout record's design.listBullet, then 'character'. 'character' (the default) draws the glyph marker. 'image' draws the primary organization's icon logo (or the organization and shape design.logo names; the onDark value on dark backgrounds) as a picture bullet: a square with side 0.65 times the marker's font size whose bottom sits on the marker baseline, so list geometry does not change. Without a logo the glyph is drawn and the engine reports unresolved-content at this field.
3072
+ * Marker style for items and bullets lists. Effective value: the slide's design, then the deck's design, then the theme's design.listBullet, then the layout record's design.listBullet, then 'character'. 'character' (the default) draws the glyph marker. 'image' draws the primary organization's icon logo (or the organization and shape design.logo names; the onDark value on dark backgrounds) as a picture bullet: a square with side 0.65 times the marker's font size whose bottom sits on the marker baseline, so list geometry does not change. Without a logo the glyph is drawn and the engine reports unresolved-content at this field. 'none' draws no marker and no hanging indent, so each entry's text (and its description) starts at the left edge of the list: use it for label-and-description lists such as pillars, team members and questions with answers. Nested levels keep their indent. A list that sets numbering still draws its numbers.
3073
3073
  */
3074
- listBullet?: ("character" | "image");
3074
+ listBullet?: ("character" | "image" | "none");
3075
3075
  /**
3076
3076
  * Draw the slide's template layout mirrored (OPF 0.19): each row's cells and the column sizes reversed, so a 'beside' layout puts its picture, chart or table at the end. Logical: a right-to-left deck mirrors on top. Binding and reading order do not change. Effective value: the slide's design, then the deck's design, then the layout record's design.mirror, then false. Slides without a template layout ignore it.
3077
3077
  */