@openpresentation/opf 0.18.1 → 0.18.4

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 (49) hide show
  1. package/dist/browser.js +15 -15
  2. package/dist/{chunk-6WW2EDUW.js → chunk-2PEWUUBR.js} +2 -2
  3. package/dist/{chunk-NS3VYB57.js → chunk-ECP7QPGK.js} +5 -5
  4. package/dist/{chunk-WXSPETQ6.js → chunk-F7PLNWHQ.js} +25 -3
  5. package/dist/{chunk-64YSJZDH.js → chunk-FO3WGS4R.js} +1 -1
  6. package/dist/{chunk-ZOHFLP3O.js → chunk-GVOLSWAJ.js} +4 -4
  7. package/dist/{chunk-QLFWWHRF.js → chunk-IM337HP5.js} +2 -2
  8. package/dist/{chunk-JXVS7BJK.js → chunk-JCOSZTOI.js} +1 -1
  9. package/dist/{chunk-KXBZ6ZSB.js → chunk-K5EG3UMS.js} +4 -4
  10. package/dist/{chunk-JT3QXA22.js → chunk-KA3ZPFVT.js} +60 -3
  11. package/dist/{chunk-YWXB4XAT.js → chunk-L5YACLWK.js} +1 -1
  12. package/dist/{chunk-DBYZI75U.js → chunk-MSFE2HUK.js} +4 -4
  13. package/dist/{chunk-VCGRMNY2.js → chunk-PNINP5IF.js} +1 -1
  14. package/dist/{chunk-CJPDTLGD.js → chunk-R7KIASS4.js} +1 -1
  15. package/dist/{chunk-RAKEVM52.js → chunk-TRELE6I6.js} +1 -1
  16. package/dist/{chunk-YZXTXX2D.js → chunk-WHHLGDCQ.js} +1 -1
  17. package/dist/{conversion-C5foedh6.d.ts → conversion-BxZbBd_0.d.ts} +2 -2
  18. package/dist/conversion-SHYVL7FC.js +21 -0
  19. package/dist/convert.js +6 -6
  20. package/dist/data.d.ts +1 -1
  21. package/dist/{deck-report-wszX7uo8.d.ts → deck-report-DiDf_Vew.d.ts} +1 -1
  22. package/dist/deck.d.ts +3 -3
  23. package/dist/deck.js +9 -9
  24. package/dist/diff.js +4 -4
  25. package/dist/docs.js +18 -12
  26. package/dist/examples.d.ts +1 -1
  27. package/dist/font-policy.js +1 -1
  28. package/dist/format.js +2 -2
  29. package/dist/index.d.ts +4 -4
  30. package/dist/index.js +18 -18
  31. package/dist/markdown.d.ts +1 -1
  32. package/dist/markdown.js +6 -6
  33. package/dist/node-engine.d.ts +4 -4
  34. package/dist/node-engine.js +17 -17
  35. package/dist/pagination.js +3 -3
  36. package/dist/patch.js +3 -3
  37. package/dist/{presentation-HondgJ3l.d.ts → presentation-81rNihF0.d.ts} +2 -2
  38. package/dist/repo-readme.js +1 -1
  39. package/dist/schemas.js +1 -1
  40. package/dist/spec/README.md +1 -1
  41. package/dist/spec/reference/font-policy.json +25 -3
  42. package/dist/spec/schemas/opf.schema.json +2 -2
  43. package/dist/types.d.ts +1 -1
  44. package/dist/validator.d.ts +1 -1
  45. package/dist/validator.js +2 -2
  46. package/dist/yaml.d.ts +1 -1
  47. package/dist/yaml.js +6 -6
  48. package/package.json +3 -3
  49. package/dist/conversion-KGDVJM75.js +0 -21
package/dist/browser.js CHANGED
@@ -1,23 +1,23 @@
1
- import { OPFApiError } from './chunk-QLFWWHRF.js';
2
- export { OPFApiError, OPFExportError, OPFImportError, OPFMoveToCustomError, copySlides, edit, embed, fill, fillRecords, moveToCustom, parseSlideSelection, sameRecord, stats, updateFromCatalog } from './chunk-QLFWWHRF.js';
1
+ import { OPFApiError } from './chunk-IM337HP5.js';
2
+ export { OPFApiError, OPFExportError, OPFImportError, OPFMoveToCustomError, copySlides, edit, embed, fill, fillRecords, moveToCustom, parseSlideSelection, sameRecord, stats, updateFromCatalog } from './chunk-IM337HP5.js';
3
3
  export { specFileEntries, specFileKinds, specFilePaths } from './chunk-HXHOZ7AH.js';
4
4
  export { OPFDataImportError, ingest, parseTabularData } from './chunk-ZCFSDSUX.js';
5
- export { DECK_FORMATS, deckFormatOf, parse, stringify } from './chunk-ZOHFLP3O.js';
6
- export { fromMarkdown, toMarkdown } from './chunk-DBYZI75U.js';
7
- import './chunk-NS3VYB57.js';
8
- export { OPFMarkdownError } from './chunk-CJPDTLGD.js';
9
- export { diff, merge } from './chunk-YWXB4XAT.js';
10
- export { OPFPatchError, OPFPatchValidationError, applyPatch } from './chunk-YZXTXX2D.js';
11
- export { OPFFormatError, format } from './chunk-JXVS7BJK.js';
12
- export { OPFPaginationError, paginate, paginateSlide } from './chunk-64YSJZDH.js';
13
- import './chunk-VCGRMNY2.js';
14
- import './chunk-RAKEVM52.js';
15
- export { DEFAULT_CHART_PALETTE, DEFAULT_VALIDATION_THRESHOLDS, OPFValidationError, assertValid, assertValidCatalogRecord, findValidationRule, resolveSlideContext, validate, validateCatalogRecord, validationCategories, validationRules } from './chunk-JT3QXA22.js';
5
+ export { DECK_FORMATS, deckFormatOf, parse, stringify } from './chunk-GVOLSWAJ.js';
6
+ export { fromMarkdown, toMarkdown } from './chunk-MSFE2HUK.js';
7
+ import './chunk-ECP7QPGK.js';
8
+ export { OPFMarkdownError } from './chunk-R7KIASS4.js';
9
+ export { diff, merge } from './chunk-L5YACLWK.js';
10
+ export { OPFPatchError, OPFPatchValidationError, applyPatch } from './chunk-WHHLGDCQ.js';
11
+ export { OPFFormatError, format } from './chunk-JCOSZTOI.js';
12
+ export { OPFPaginationError, paginate, paginateSlide } from './chunk-FO3WGS4R.js';
13
+ import './chunk-PNINP5IF.js';
14
+ import './chunk-TRELE6I6.js';
15
+ export { DEFAULT_CHART_PALETTE, DEFAULT_VALIDATION_THRESHOLDS, OPFValidationError, assertValid, assertValidCatalogRecord, findValidationRule, resolveSlideContext, validate, validateCatalogRecord, validationCategories, validationRules } from './chunk-KA3ZPFVT.js';
16
16
  export { CHART_TYPES, DEFAULT_VARIABLE_DATE_FORMAT, ENGINE_DEFAULT_CHART_TYPES, ENGINE_DEFAULT_COLOR_SCHEME, ENGINE_DEFAULT_FONT_SCHEME, ENGINE_DEFAULT_THEME, LANGUAGES, LOGO_SHAPES, OPFVariableError, SLIDE_SCOPED_BUILTINS, SOCIAL_PLATFORMS, VARIABLE_KINDS, chartNumber, coerceVariableValue, datasetDiagnostics, formatDataNumber, formatVariableNumber, fromExcelNumberFormat, hasContentVariables, inlineChartData, inlineDatasets, inlineTableData, isDatasetRef, isTemplate, isXYChartType, listBuiltinVariables, listVariables, normalizeLanguageFamily, numberFormatError, resolveChartData, resolveDesignRecords, resolveFontScheme, resolveSlideVariables, resolveTableData, resolveVariables, suggestChartNumberFix, tableCellDisplayValue, toExcelNumberFormat, unusedDatasets, variableDeclarations } from './chunk-MBU42S5Y.js';
17
17
  export { catalogDisplayKinds, catalogSchemaNames } from './chunk-TRDXRRQK.js';
18
18
  export { CATALOG_GROUP_PATTERN, CATALOG_REFERENCE_PATTERN, OPFCatalogsOptionError, OPFUnresolvedReferenceError, catalogGroupSource, catalogKinds, catalogRecords, catalogReferenceSites, parseReference, resolveReference, unresolvedReference } from './chunk-SPFV27O5.js';
19
- export { audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './chunk-6WW2EDUW.js';
20
- export { FONT_POLICY, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor } from './chunk-WXSPETQ6.js';
19
+ export { audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './chunk-2PEWUUBR.js';
20
+ export { FONT_POLICY, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor } from './chunk-F7PLNWHQ.js';
21
21
 
22
22
  // src/browser.ts
23
23
  var nodeOnly = (name, message) => new OPFApiError(`\`${name}\` ${message}`, "node-only", { details: { function: name, build: "browser" } });
@@ -1590,11 +1590,11 @@ var presentation = {
1590
1590
  "widescreen",
1591
1591
  "standard"
1592
1592
  ],
1593
- "description": "Named dimension preset; chooses both aspect ratio and physical size. 'widescreen' is an alias for 16:9 in PowerPoint widescreen size; 'standard' is an alias for 4:3 in PowerPoint standard size. The social-feed ratios keep the widescreen short edge of 7.5 in: 1:1 is 7.5 x 7.5 in, 4:5 is 7.5 x 9.375 in and 9:16 is 7.5 x 13.333 in (portrait)."
1593
+ "description": "Named preset; sets aspect ratio and physical size. 16:9 ('widescreen'): 13.333 x 7.5 in, PowerPoint's Widescreen. 4:3 ('standard'): 10 x 7.5 in. 16:10: 10 x 6.25 in. letter (11 x 8.5 in) and a4 (11.69 x 8.27 in) are paper sizes, not PowerPoint's Letter Paper or A4 Paper. 1:1, 4:5 and 9:16 are 7.5 in on the short edge."
1594
1594
  },
1595
1595
  "Dimensions": {
1596
1596
  "type": "object",
1597
- "description": "Slide dimensions; either pick a preset or specify custom inches.",
1597
+ "description": "Slide dimensions: a preset, or custom inches that override it. PowerPoint's Letter Paper (10 x 7.5 in), A4 Paper (10.8333 x 7.5 in) and On-screen Show (16:9) (10 x 5.625 in) are not OPF presets; use widthInches and heightInches. docs/slide-sizes.md compares every preset.",
1598
1598
  "properties": {
1599
1599
  "preset": {
1600
1600
  "$ref": "#/$defs/DimensionPreset"
@@ -1,9 +1,9 @@
1
- import { NOT_CHECKED, Ctx } from './chunk-CJPDTLGD.js';
2
- import { sortPresentationKeys } from './chunk-JXVS7BJK.js';
3
- import { same } from './chunk-RAKEVM52.js';
4
- import { validate } from './chunk-JT3QXA22.js';
1
+ import { NOT_CHECKED, Ctx } from './chunk-R7KIASS4.js';
2
+ import { sortPresentationKeys } from './chunk-JCOSZTOI.js';
3
+ import { same } from './chunk-TRELE6I6.js';
4
+ import { validate } from './chunk-KA3ZPFVT.js';
5
5
  import { checkCatalogsOption } from './chunk-SPFV27O5.js';
6
- import { presentation } from './chunk-6WW2EDUW.js';
6
+ import { presentation } from './chunk-2PEWUUBR.js';
7
7
  import { Parser, parseDocument, isMap, Document, visit, isScalar, isAlias, isSeq } from 'yaml';
8
8
 
9
9
  var MAX_ALIAS_COUNT = 100;
@@ -44,6 +44,11 @@ var fontPolicySource = {
44
44
  "replacement": {
45
45
  "family": "Noto Sans Thai",
46
46
  "compatibility": "visual",
47
+ "sizeAdjust": 0.75,
48
+ "lineAscent": 0.83,
49
+ "lineAscentMixed": 0.86,
50
+ "lineAscentBasis": "opf#361 native probe, PowerPoint 365 16.0 build 20430 (RR-38 setup, 2880 px; bottom edge of the last row with 35 percent of the darkest row's ink): 0.833 / 0.833 / 0.833 em at 18 / 24 / 32 pt, with a Latin run 0.856 / 0.866 / 0.862 (replaces the 0.85 read from 1280 px PNGs). Evidence: docs/evidence/ff-46-sizeadjust-native-20261010.",
51
+ "sizeAdjustBasis": "opf#361 rule: the smallest factor (0.01 steps, up) at which no line of the FF-44 script corpus or of the scheme's Latin overhangs over 3 percent natively, regular and bold (Angsana New 5.06 advances over Noto Sans Thai's, fontkit, read in place). Exact 0.7401; worst line thai-digits +1.6 percent; Latin slack 42.9 percent (Latin is drawn by the replacement at the composed size). Evidence: docs/evidence/ff-46-sizeadjust-native-20261010.",
47
52
  "measured": {
48
53
  "replacement": "Noto Sans Thai",
49
54
  "meanAbsWidthDelta": 0.7476,
@@ -275,9 +280,9 @@ var fontPolicySource = {
275
280
  "family": "Noto Naskh Arabic",
276
281
  "compatibility": "visual",
277
282
  "sizeAdjust": 0.64,
278
- "lineAscent": 0.7,
279
- "lineAscentMixed": 0.78,
280
- "lineAscentBasis": "RR-38 native PowerPoint 365 probe (probe-arabic.pptx, 18, 24 and 32 pt, 100 percent line spacing, zero insets, top anchor, rtl paragraph): the baseline of an Arabic Typesetting-only line (the most common ink-bottom row of the line) sits 0.68, 0.71 and 0.72 em below the box top (regular) and 0.68, 0.72 and 0.73 em (bold), against Arabic Typesetting's hhea ascent of 0.701 em; a line that also holds an Aptos run (Arabic, 'PowerPoint 365', Arabic) sits 0.77, 0.78 and 0.78 em below it. Core places the baseline one em below the line top, so the preview drew Arabic lines 0.22 to 0.30 em lower.",
283
+ "lineAscent": 0.74,
284
+ "lineAscentMixed": 0.8,
285
+ "lineAscentBasis": "opf#361 native probe, PowerPoint 365 16.0 build 20430 (RR-38 setup, 2880 px; bottom edge of the last row with 35 percent of the darkest row's ink): 0.741 / 0.736 / 0.740 em at 18 / 24 / 32 pt, with a Latin run 0.801 / 0.810 / 0.800. Corrects RR-38's 0.70 / 0.78 (an earlier estimator; RR-38's own 2560 px PNGs re-read 0.743 / 0.745 / 0.746 and 0.79 to 0.80 with this rule). Evidence: docs/evidence/ff-46-sizeadjust-native-20261010.",
281
286
  "sizeAdjustBasis": "RR-38: sum of Arabic Typesetting 6.85 advances over sum of Noto Naskh Arabic 400 advances (fontkit, each sample's OpenType language). 0.643 on the 12 Arabic-script corpus samples of opf-render test/fixtures/script-corpora.json (per-sample range 0.57 to 0.86); 0.598 on 29 Arabic strings of the RR-05b native deck (running Arabic text); 0.614 pooled; Noto Naskh Arabic 700 gives 0.62, 0.58 and 0.59, so bold runs draw about 3 percent long. Ink height of alef, lam, meem and heh is 0.71 of Noto Naskh Arabic's. 0.64 balances the two: lines come out about 4 percent longer than PowerPoint's and glyphs about 10 percent smaller. Native check (RR-38 probe): PowerPoint's BoundWidth of the 45-character probe line is 216.9, 289.0 and 386.1 pt at 18, 24 and 32 pt, 1.8 to 2.0 percent above the fontkit advance of the installed font (213.0, 284.0, 378.7).",
282
287
  "measured": {
283
288
  "replacement": "Noto Naskh Arabic",
@@ -1100,6 +1105,11 @@ var fontPolicySource = {
1100
1105
  "replacement": {
1101
1106
  "family": "Noto Sans Thai",
1102
1107
  "compatibility": "visual",
1108
+ "sizeAdjust": 0.68,
1109
+ "lineAscent": 0.82,
1110
+ "lineAscentMixed": 0.85,
1111
+ "lineAscentBasis": "opf#361 native probe, PowerPoint 365 16.0 build 20430 (RR-38 setup, 2880 px; bottom edge of the last row with 35 percent of the darkest row's ink): 0.815 / 0.819 / 0.813 em at 18 / 24 / 32 pt, with a Latin run 0.856 / 0.852 / 0.841. Evidence: docs/evidence/ff-46-sizeadjust-native-20261010.",
1112
+ "sizeAdjustBasis": "opf#361 rule: the smallest factor (0.01 steps, up) at which no line of the FF-44 script corpus or of the scheme's Latin overhangs over 3 percent natively, regular and bold (DilleniaUPC 5.05 advances over Noto Sans Thai's, fontkit, read in place). Exact 0.6704; worst line thai-digits +1.6 percent; Latin slack 41.5 percent (Latin is drawn by the replacement at the composed size). Evidence: docs/evidence/ff-46-sizeadjust-native-20261010.",
1103
1113
  "measured": {
1104
1114
  "replacement": "Noto Sans Thai",
1105
1115
  "meanAbsWidthDelta": 0.7077,
@@ -1905,6 +1915,8 @@ var fontPolicySource = {
1905
1915
  "replacement": {
1906
1916
  "family": "Noto Sans KR",
1907
1917
  "compatibility": "visual",
1918
+ "sizeAdjust": 1.07,
1919
+ "sizeAdjustBasis": "opf#361 rule: the smallest factor (0.01 steps, up) at which no line of the FF-44 script corpus or of the scheme's Latin overhangs over 3 percent natively, regular and bold (Malgun Gothic 6.69 advances over Noto Sans KR's, fontkit, read in place). Exact 1.0557 on precomposed Hangul; worst line kore-sentence +1.6 percent at 1.07 (Hangul); latn-numerals +2.7 percent (Latin, at any factor); Latin slack 1.6 percent (Latin is drawn by the replacement at the composed size). Evidence: docs/evidence/ff-46-sizeadjust-native-20261010. Decomposed conjoining jamo (U+1100-11FF, U+A960-A97F, U+D7B0-D7FF; sample kore-jamo, 1.0669) is a documented limitation outside the row decision: PowerPoint draws it unshaped. No lineAscent: the native baseline is 1.06 em, below core's 1.0.",
1908
1920
  "measured": {
1909
1921
  "replacement": "Noto Sans KR",
1910
1922
  "meanAbsWidthDelta": 0.0176,
@@ -2195,6 +2207,11 @@ var fontPolicySource = {
2195
2207
  "replacement": {
2196
2208
  "family": "Noto Sans Devanagari",
2197
2209
  "compatibility": "visual",
2210
+ "sizeAdjust": 1.07,
2211
+ "lineAscent": 0.97,
2212
+ "lineAscentMixed": 0.94,
2213
+ "lineAscentBasis": "opf#361 native probe, PowerPoint 365 16.0 build 20430 (RR-38 setup, 2880 px; bottom edge of the last row with 35 percent of the darkest row's ink): Devanagari stem bottoms 0.981 / 0.972 / 0.969 em at 18 / 24 / 32 pt, with a Latin run 0.930 / 0.935 / 0.935. Evidence: docs/evidence/ff-46-sizeadjust-native-20261010.",
2214
+ "sizeAdjustBasis": "opf#361 rule: the smallest factor (0.01 steps, up) at which no line of the FF-44 script corpus or of the scheme's Latin overhangs over 3 percent natively, regular and bold (Nirmala UI 1.46 advances over Noto Sans Devanagari's, fontkit, read in place). Exact 1.0695; worst line deva-matras +2.9 percent; Latin slack 6.0 percent (Latin is drawn by the replacement at the composed size). Evidence: docs/evidence/ff-46-sizeadjust-native-20261010.",
2198
2215
  "measured": {
2199
2216
  "replacement": "Noto Sans Devanagari",
2200
2217
  "meanAbsWidthDelta": 0.0638,
@@ -2901,6 +2918,11 @@ var fontPolicySource = {
2901
2918
  "replacement": {
2902
2919
  "family": "Noto Naskh Arabic",
2903
2920
  "compatibility": "visual",
2921
+ "sizeAdjust": 0.89,
2922
+ "lineAscent": 0.76,
2923
+ "lineAscentMixed": 0.81,
2924
+ "lineAscentBasis": "opf#361 native probe, PowerPoint 365 16.0 build 20430 (RR-38 setup, 2880 px; bottom edge of the last row with 35 percent of the darkest row's ink): 0.759 / 0.764 / 0.760 em at 18 / 24 / 32 pt, with a Latin run 0.819 / 0.810 / 0.810 (replaces the 0.78 read from 1280 px PNGs). Evidence: docs/evidence/ff-46-sizeadjust-native-20261010.",
2925
+ "sizeAdjustBasis": "opf#361 rule: the smallest factor (0.01 steps, up) at which no line of the FF-44 script corpus or of the scheme's Latin overhangs over 3 percent natively, regular and bold (Sakkal Majalla 7.00 advances over Noto Naskh Arabic's, fontkit, read in place). Exact 0.8866; worst line arab-fa-digits +2.6 percent; Latin slack 35.1 percent (Latin is drawn by the replacement at the composed size). Evidence: docs/evidence/ff-46-sizeadjust-native-20261010.",
2904
2926
  "measured": {
2905
2927
  "replacement": "Noto Naskh Arabic",
2906
2928
  "meanAbsWidthDelta": 0.5423,
@@ -1,4 +1,4 @@
1
- import { assertValid, resolveSlideScriptMeasurement, resolveSlideContext } from './chunk-JT3QXA22.js';
1
+ import { assertValid, resolveSlideScriptMeasurement, resolveSlideContext } from './chunk-KA3ZPFVT.js';
2
2
  import { resolveSlideVariables, usesSlideBuiltin, composeSlide, codeHighlightSlice, tableRowBoundaries, visitContentPayloads, slideTokenSpans, sliceNumberedItems } from './chunk-MBU42S5Y.js';
3
3
  import { checkCatalogsOption } from './chunk-SPFV27O5.js';
4
4
 
@@ -1,7 +1,7 @@
1
- import { fromMarkdown, toMarkdown } from './chunk-DBYZI75U.js';
2
- import { fromYaml, toYaml } from './chunk-NS3VYB57.js';
3
- import { NOT_CHECKED } from './chunk-CJPDTLGD.js';
4
- import { parseSource, validate, OPFValidationError } from './chunk-JT3QXA22.js';
1
+ import { fromMarkdown, toMarkdown } from './chunk-MSFE2HUK.js';
2
+ import { fromYaml, toYaml } from './chunk-ECP7QPGK.js';
3
+ import { NOT_CHECKED } from './chunk-R7KIASS4.js';
4
+ import { parseSource, validate, OPFValidationError } from './chunk-KA3ZPFVT.js';
5
5
  import { checkCatalogsOption } from './chunk-SPFV27O5.js';
6
6
 
7
7
  // src/deck-report.ts
@@ -1,6 +1,6 @@
1
1
  import { OPFDataImportError, parseTabularData } from './chunk-ZCFSDSUX.js';
2
- import { applyPatchWithInverse } from './chunk-YZXTXX2D.js';
3
- import { validate, OPFValidationError } from './chunk-JT3QXA22.js';
2
+ import { applyPatchWithInverse } from './chunk-WHHLGDCQ.js';
3
+ import { validate, OPFValidationError } from './chunk-KA3ZPFVT.js';
4
4
  import { isRecord, visitContentPayloads, listVariables, resolveVariables, LOGO_SHAPES, resolveDesignRecords, resolveFontFamilies, resolveCanvasDimensions, imageBackground } from './chunk-MBU42S5Y.js';
5
5
  import { embeddedCopy, checkCatalogsOption, catalogReferenceSites, parseReference, catalogGroupDeclared, resolveReference, dottedPath, unresolvedReference, recordReferenceSites, catalogGroupSource, registeredCatalog, catalogKinds, CATALOG_GROUP_PATTERN } from './chunk-SPFV27O5.js';
6
6
 
@@ -1,4 +1,4 @@
1
- import { presentation } from './chunk-6WW2EDUW.js';
1
+ import { presentation } from './chunk-2PEWUUBR.js';
2
2
 
3
3
  // src/format.ts
4
4
  var OPFFormatError = class extends Error {
@@ -1,8 +1,8 @@
1
- import { OPFApiError, parseSlideSelection, OPFExportError, asApiError, OPFImportError } from './chunk-QLFWWHRF.js';
1
+ import { OPFApiError, parseSlideSelection, OPFExportError, asApiError, OPFImportError } from './chunk-IM337HP5.js';
2
2
  import { defaultCatalog } from './chunk-WCG3THTD.js';
3
- import { deckFormatOf, readDeckReport, stringify } from './chunk-ZOHFLP3O.js';
4
- import { paginate } from './chunk-64YSJZDH.js';
5
- import { validate, OPFValidationError } from './chunk-JT3QXA22.js';
3
+ import { deckFormatOf, readDeckReport, stringify } from './chunk-GVOLSWAJ.js';
4
+ import { paginate } from './chunk-FO3WGS4R.js';
5
+ import { validate, OPFValidationError } from './chunk-KA3ZPFVT.js';
6
6
  import { stat, readdir, lstat, mkdir, writeFile, rename, unlink, readFile } from 'fs/promises';
7
7
  import path6 from 'path';
8
8
  import { readFileSync, realpathSync, statSync } from 'fs';
@@ -1,7 +1,7 @@
1
1
  import { promotedRegionKeys, VARIABLE_KINDS, resolveChartData, chartPaletteForFill, imageBackground, tableGrid, timelineTextColor, LOGO_SHAPES, visitContentPayloads, readingRows, visualReadingOrder, intrinsicImageSize, textWidthMeasurer, normalizeHexColor, resolveColorRef, resolveDesignRecords, resolveFontFamilies, resolveColorRoles, resolveCanvasDimensions, resolveSlideVariables, defaultSlideBackground, isRecord, hasContentVariables, isTemplate, instantiateForValidation, resolveScriptFonts, unusedDatasets, MAX_COMPOSITION_DEPTH, datasetDiagnostics, pathFor, collectCitations, numberingFindings, walkCitationRuns, resolveTableData, resolveChartOptions, chartOptionTarget, codeHighlightLines, chartNumberFixesByCell, MAX_PLACEHOLDER_GROUP_DEPTH, OPFCompositionError, composeSlide } from './chunk-MBU42S5Y.js';
2
2
  import { catalogSchemaNames } from './chunk-TRDXRRQK.js';
3
3
  import { resolveReference, checkCatalogsOption, provenanceOf, unresolvedReference, OPFUnresolvedReferenceError, catalogReferenceSites, parseReference, catalogGroupDeclared, pointerPath, catalogRecords, catalogKinds, catalogGroupSource, registeredCatalog } from './chunk-SPFV27O5.js';
4
- import { schemaEntries, schemas } from './chunk-6WW2EDUW.js';
4
+ import { schemaEntries, schemas } from './chunk-2PEWUUBR.js';
5
5
  import Ajv2020 from 'ajv/dist/2020.js';
6
6
  import addFormats from 'ajv-formats';
7
7
  import { parseTree, printParseErrorCode, getNodePath } from 'jsonc-parser';
@@ -539,6 +539,50 @@ function slideThemeDimensionsWarnings(document, slide, index, catalogs) {
539
539
  { code: "slide-theme-dimensions", slideDimensions: slideSize, deckDimensions: deckSize }
540
540
  )];
541
541
  }
542
+ var SLIDE_SIDE_MIN_EMU = 914400;
543
+ var SLIDE_SIDE_MAX_EMU = 51206400;
544
+ var EMU_PER_INCH = 914400;
545
+ var EMU_PER_REFERENCE_PIXEL = EMU_PER_INCH / 96;
546
+ function slideSizeRangeWarnings(document, catalogs) {
547
+ const design = isRecord(document.design) ? document.design : {};
548
+ const explicit = design.dimensions !== void 0;
549
+ let dimensions = design.dimensions;
550
+ if (!explicit) {
551
+ const theme = resolveDesignRecords(document, void 0, { catalogs: catalogs ?? [] }).theme;
552
+ dimensions = theme.dimensions;
553
+ if (dimensions === void 0) return [];
554
+ }
555
+ let size;
556
+ try {
557
+ size = resolveCanvasDimensions(dimensions);
558
+ } catch {
559
+ return [];
560
+ }
561
+ const sides = [["width", size.width], ["height", size.height]].map(([side, pixels]) => ({
562
+ side,
563
+ inches: pixels / 96,
564
+ emu: Math.round(pixels * EMU_PER_REFERENCE_PIXEL)
565
+ }));
566
+ const outside = sides.filter(({ emu }) => emu < SLIDE_SIDE_MIN_EMU || emu > SLIDE_SIDE_MAX_EMU);
567
+ if (outside.length === 0) return [];
568
+ const inches = (value) => String(Math.round(value * 1e4) / 1e4);
569
+ const detail = outside.map(({ side, inches: value, emu }) => `${side} ${inches(value)} in (${emu} EMU) is ${emu < SLIDE_SIDE_MIN_EMU ? "below 1 in" : "above 56 in"}`).join(", ");
570
+ const path = explicit ? "/design/dimensions" : typeof design.theme === "string" ? "/design/theme" : "/design";
571
+ return [semanticIssue(
572
+ path,
573
+ `the slide size ${inches(sides[0].inches)} x ${inches(sides[1].inches)} in is outside PowerPoint's 1 to 56 inch range per side (${detail}); the PPTX p:sldSz allows 914400 to 51206400 EMU${explicit ? "" : ", and the size comes from the deck's theme"}`,
574
+ {
575
+ code: "slide-size-out-of-range",
576
+ widthInches: sides[0].inches,
577
+ heightInches: sides[1].inches,
578
+ widthEmu: sides[0].emu,
579
+ heightEmu: sides[1].emu,
580
+ minEmu: SLIDE_SIDE_MIN_EMU,
581
+ maxEmu: SLIDE_SIDE_MAX_EMU,
582
+ sides: outside.map(({ side }) => side)
583
+ }
584
+ )];
585
+ }
542
586
  function chartTypeWarnings(payload, path) {
543
587
  if (!isRecord(payload)) {
544
588
  return [];
@@ -726,6 +770,7 @@ function presentationReferenceWarnings(value, catalogs) {
726
770
  }
727
771
  const issues = [];
728
772
  issues.push(...variableReferenceWarnings(value));
773
+ issues.push(...slideSizeRangeWarnings(value, catalogs));
729
774
  value.slides.forEach((slide, index) => {
730
775
  if (!isRecord(slide)) {
731
776
  return;
@@ -2436,7 +2481,18 @@ var formatRules = [
2436
2481
  }
2437
2482
  ),
2438
2483
  rule("run-color-unrecognized", "format", "warning", "A text run colour is none of the documented forms.", "Run colours are open strings so imported decks stay valid, but a value that is not a hex colour, a colour-scheme name or a `var:` reference falls back to the theme colour.", { standard: SCHEMA }),
2439
- rule("numbering-start-ignored", "format", "warning", "A list entry sets `start` where nothing is numbered.", "A start value only restarts an auto-number; without `numbering` on the payload it has no effect.", { standard: SCHEMA })
2484
+ rule("numbering-start-ignored", "format", "warning", "A list entry sets `start` where nothing is numbered.", "A start value only restarts an auto-number; without `numbering` on the payload it has no effect.", { standard: SCHEMA }),
2485
+ rule(
2486
+ "slide-size-out-of-range",
2487
+ "format",
2488
+ "warning",
2489
+ "The slide size is outside PowerPoint's 1 to 56 inch range.",
2490
+ "The schema accepts any positive custom `widthInches` and `heightInches`, but a PPTX stores the size as `p:sldSz` with each side between 914400 and 51206400 EMU, which is 1 to 56 inches. A custom size outside that range exports a file that does not conform to the standard, which PowerPoint may reject or clamp. It is a warning because the document is still correct OPF and the preview draws it.",
2491
+ {
2492
+ standard: "ECMA-376 / ISO/IEC 29500-1 section 19.2.1.39 (p:sldSz) and section 19.7.17 (ST_SlideSizeCoordinate): 914400 to 51206400 EMU",
2493
+ approximations: "Checks the deck's resolved size: `design.dimensions`, else the resolved theme's `dimensions`. Inches are converted to EMU as the PPTX exporter does (`Math.round(inches * 914400)`), so a side of exactly 1 in or 56 in passes. A slide-level theme with another size is `opf/slide-theme-dimensions`. Presets are always in range. PowerPoint's own behaviour at the limits was not measured."
2494
+ }
2495
+ )
2440
2496
  ];
2441
2497
  var referenceRules = [
2442
2498
  rule(
@@ -2834,7 +2890,8 @@ var HELP = {
2834
2890
  "variable-unused": "Reference the variable as {{id}} or var:id where it belongs, or remove its declaration.",
2835
2891
  "variable-reference-unknown": "Declare the variable in the top-level variables map, or use another colour.",
2836
2892
  "run-color-unrecognized": "Use a #RRGGBB hex colour, a colour-scheme name or a var: reference to a declared colour variable.",
2837
- "numbering-start-ignored": "Add a 'numbering' field to the payload, or remove 'start'."
2893
+ "numbering-start-ignored": "Add a 'numbering' field to the payload, or remove 'start'.",
2894
+ "slide-size-out-of-range": "Use a custom widthInches and heightInches between 1 and 56, or a preset. PowerPoint stores the slide size in 914400 to 51206400 EMU per side."
2838
2895
  };
2839
2896
  function engineFindings(document, engine, enabled) {
2840
2897
  const findings = [];
@@ -1,4 +1,4 @@
1
- import { jsonEqual, formatPointer } from './chunk-YZXTXX2D.js';
1
+ import { jsonEqual, formatPointer } from './chunk-WHHLGDCQ.js';
2
2
  import { annotationText } from './chunk-MBU42S5Y.js';
3
3
 
4
4
  // src/diff-match.ts
@@ -1,7 +1,7 @@
1
- import { Ctx, splitLines, lineRange, readYamlMapping, NOT_CHECKED, OPFMarkdownError, writeYaml, readCsv, DECIMAL, csvField, scalarText } from './chunk-CJPDTLGD.js';
2
- import { parseQuoteLines, levelsFromIndents, parseCodeFence, splitWhen, fenceCode } from './chunk-VCGRMNY2.js';
3
- import { same, isRecord, runText, isPlainRun, FORMATTING } from './chunk-RAKEVM52.js';
4
- import { validate } from './chunk-JT3QXA22.js';
1
+ import { Ctx, splitLines, lineRange, readYamlMapping, NOT_CHECKED, OPFMarkdownError, writeYaml, readCsv, DECIMAL, csvField, scalarText } from './chunk-R7KIASS4.js';
2
+ import { parseQuoteLines, levelsFromIndents, parseCodeFence, splitWhen, fenceCode } from './chunk-PNINP5IF.js';
3
+ import { same, isRecord, runText, isPlainRun, FORMATTING } from './chunk-TRELE6I6.js';
4
+ import { validate } from './chunk-KA3ZPFVT.js';
5
5
  import { checkCatalogsOption } from './chunk-SPFV27O5.js';
6
6
 
7
7
  // src/markdown/canon.ts
@@ -1,4 +1,4 @@
1
- import { runText } from './chunk-RAKEVM52.js';
1
+ import { runText } from './chunk-TRELE6I6.js';
2
2
 
3
3
  // src/convert/text-lines.ts
4
4
  var LIST_PREFIX = /^([ \t]*)(?:([-*•+]|\d{1,3}[.)])[ \t]+)?/;
@@ -1,4 +1,4 @@
1
- import { isRecord, same } from './chunk-RAKEVM52.js';
1
+ import { isRecord, same } from './chunk-TRELE6I6.js';
2
2
  import { parseDocument, YAMLMap, Scalar, stringify } from 'yaml';
3
3
 
4
4
  // src/not-checked.ts
@@ -1,4 +1,4 @@
1
- import { validate } from './chunk-JT3QXA22.js';
1
+ import { validate } from './chunk-KA3ZPFVT.js';
2
2
 
3
3
  // src/convert/shared.ts
4
4
  var CONTENT_KEYS = ["text", "items", "bullets", "image", "video", "chart", "table", "code", "metric", "quote", "timeline"];
@@ -1,4 +1,4 @@
1
- import { validate } from './chunk-JT3QXA22.js';
1
+ import { validate } from './chunk-KA3ZPFVT.js';
2
2
 
3
3
  // src/patch.ts
4
4
  var OPFPatchError = class extends Error {
@@ -1,6 +1,6 @@
1
- import { D as DeckFormat } from './deck-report-wszX7uo8.js';
1
+ import { D as DeckFormat } from './deck-report-DiDf_Vew.js';
2
2
  import { a as Finding, c as FindingSeverity } from './finding-CT_f_vbD.js';
3
- import { P as Presentation } from './presentation-HondgJ3l.js';
3
+ import { P as Presentation } from './presentation-81rNihF0.js';
4
4
  import { V as ValidationReport, f as ValidationChecks, a as ValidateOptions } from './validation-types-PbGDrNUr.js';
5
5
  import { a as Catalog } from './catalog-refs-BSfGELpt.js';
6
6
 
@@ -0,0 +1,21 @@
1
+ export { convertFiles, deckFileFormat, exportFormatOf, openDeck, planConversion, readInput, saveDeck, writePlanned } from './chunk-K5EG3UMS.js';
2
+ import './chunk-IM337HP5.js';
3
+ import './chunk-HXHOZ7AH.js';
4
+ import './chunk-ZCFSDSUX.js';
5
+ import './chunk-WCG3THTD.js';
6
+ import './chunk-GVOLSWAJ.js';
7
+ import './chunk-MSFE2HUK.js';
8
+ import './chunk-ECP7QPGK.js';
9
+ import './chunk-R7KIASS4.js';
10
+ import './chunk-L5YACLWK.js';
11
+ import './chunk-WHHLGDCQ.js';
12
+ import './chunk-JCOSZTOI.js';
13
+ import './chunk-FO3WGS4R.js';
14
+ import './chunk-PNINP5IF.js';
15
+ import './chunk-TRELE6I6.js';
16
+ import './chunk-KA3ZPFVT.js';
17
+ import './chunk-MBU42S5Y.js';
18
+ import './chunk-TRDXRRQK.js';
19
+ import './chunk-SPFV27O5.js';
20
+ import './chunk-2PEWUUBR.js';
21
+ import './chunk-F7PLNWHQ.js';
package/dist/convert.js CHANGED
@@ -1,12 +1,12 @@
1
- import { paginate, OPFPaginationError } from './chunk-64YSJZDH.js';
2
- import { parseQuoteLines, parseCodeFence, splitWhen, parseListLine, levelsFromIndents, fenceCode } from './chunk-VCGRMNY2.js';
3
- import { CONTENT_KEYS, isRecord, contentKeysOf, refuse, clone, Loss, isSlideLike, assertValidOwner, report, OPFConversionError, plainOf, assertValidOutput, same, splitRuns, runsOf, lineIsPlain, linePlain, concatText, lineValue, joinLines, hasFormatting } from './chunk-RAKEVM52.js';
4
- export { OPFConversionError } from './chunk-RAKEVM52.js';
5
- import './chunk-JT3QXA22.js';
1
+ import { paginate, OPFPaginationError } from './chunk-FO3WGS4R.js';
2
+ import { parseQuoteLines, parseCodeFence, splitWhen, parseListLine, levelsFromIndents, fenceCode } from './chunk-PNINP5IF.js';
3
+ import { CONTENT_KEYS, isRecord, contentKeysOf, refuse, clone, Loss, isSlideLike, assertValidOwner, report, OPFConversionError, plainOf, assertValidOutput, same, splitRuns, runsOf, lineIsPlain, linePlain, concatText, lineValue, joinLines, hasFormatting } from './chunk-TRELE6I6.js';
4
+ export { OPFConversionError } from './chunk-TRELE6I6.js';
5
+ import './chunk-KA3ZPFVT.js';
6
6
  import { promotedRegionKeys, isDatasetRef, inlineTableData, visitContentPayloads, chartNumber } from './chunk-MBU42S5Y.js';
7
7
  import './chunk-TRDXRRQK.js';
8
8
  import './chunk-SPFV27O5.js';
9
- import './chunk-6WW2EDUW.js';
9
+ import './chunk-2PEWUUBR.js';
10
10
 
11
11
  // src/convert/tables.ts
12
12
  function cellOf(raw) {
package/dist/data.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as Chart } from './presentation-HondgJ3l.js';
1
+ import { C as Chart } from './presentation-81rNihF0.js';
2
2
  export { 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';
3
3
 
4
4
  type DataCell = string | number | boolean | null;
@@ -1,5 +1,5 @@
1
1
  import { a as Catalog } from './catalog-refs-BSfGELpt.js';
2
- import { P as Presentation } from './presentation-HondgJ3l.js';
2
+ import { P as Presentation } from './presentation-81rNihF0.js';
3
3
  import { V as ValidationReport, a as ValidateOptions } from './validation-types-PbGDrNUr.js';
4
4
 
5
5
  /** The serializations of a deck: `json` (canonical), `yaml` (`.opf.yaml`) and `markdown` (`.opf.md`). */
package/dist/deck.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { D as DeckFormat, P as ParseOptions } from './deck-report-wszX7uo8.js';
2
- export { a as DECK_FORMATS, d as deckFormatOf } from './deck-report-wszX7uo8.js';
3
- import { P as Presentation } from './presentation-HondgJ3l.js';
1
+ import { D as DeckFormat, P as ParseOptions } from './deck-report-DiDf_Vew.js';
2
+ export { a as DECK_FORMATS, d as deckFormatOf } from './deck-report-DiDf_Vew.js';
3
+ import { P as Presentation } from './presentation-81rNihF0.js';
4
4
  import './catalog-refs-BSfGELpt.js';
5
5
  import './validation-types-PbGDrNUr.js';
6
6
  import './composition-C-OoqvAr.js';
package/dist/deck.js CHANGED
@@ -1,12 +1,12 @@
1
- export { DECK_FORMATS, deckFormatOf, parse, stringify } from './chunk-ZOHFLP3O.js';
2
- import './chunk-DBYZI75U.js';
3
- import './chunk-NS3VYB57.js';
4
- import './chunk-CJPDTLGD.js';
5
- import './chunk-JXVS7BJK.js';
6
- import './chunk-VCGRMNY2.js';
7
- import './chunk-RAKEVM52.js';
8
- import './chunk-JT3QXA22.js';
1
+ export { DECK_FORMATS, deckFormatOf, parse, stringify } from './chunk-GVOLSWAJ.js';
2
+ import './chunk-MSFE2HUK.js';
3
+ import './chunk-ECP7QPGK.js';
4
+ import './chunk-R7KIASS4.js';
5
+ import './chunk-JCOSZTOI.js';
6
+ import './chunk-PNINP5IF.js';
7
+ import './chunk-TRELE6I6.js';
8
+ import './chunk-KA3ZPFVT.js';
9
9
  import './chunk-MBU42S5Y.js';
10
10
  import './chunk-TRDXRRQK.js';
11
11
  import './chunk-SPFV27O5.js';
12
- import './chunk-6WW2EDUW.js';
12
+ import './chunk-2PEWUUBR.js';
package/dist/diff.js CHANGED
@@ -1,7 +1,7 @@
1
- export { categoryOf, describeValue, diff, formatDiffReport, matchArrays, merge, similarity } from './chunk-YWXB4XAT.js';
2
- import './chunk-YZXTXX2D.js';
3
- import './chunk-JT3QXA22.js';
1
+ export { categoryOf, describeValue, diff, formatDiffReport, matchArrays, merge, similarity } from './chunk-L5YACLWK.js';
2
+ import './chunk-WHHLGDCQ.js';
3
+ import './chunk-KA3ZPFVT.js';
4
4
  import './chunk-MBU42S5Y.js';
5
5
  import './chunk-TRDXRRQK.js';
6
6
  import './chunk-SPFV27O5.js';
7
- import './chunk-6WW2EDUW.js';
7
+ import './chunk-2PEWUUBR.js';