@openpresentation/opf 0.11.0 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. package/dist/{catalogs-atkOF4Vy.d.ts → catalogs-DJ-B5ZyD.d.ts} +78 -8
  2. package/dist/catalogs.d.ts +2 -2
  3. package/dist/catalogs.js +1 -1
  4. package/dist/{chunk-FTWNWFIV.js → chunk-6UPHKXI5.js} +310 -34
  5. package/dist/{chunk-6FU2KICU.js → chunk-7LF37SG3.js} +7084 -5106
  6. package/dist/{chunk-EQHZ3ZO4.js → chunk-BP6WMSSS.js} +3 -3
  7. package/dist/{chunk-FWA5XB45.js → chunk-KWIOQ3QR.js} +45 -25
  8. package/dist/{chunk-GN52EE3P.js → chunk-LTSDDBNW.js} +425 -40
  9. package/dist/{chunk-CHKJ4QHQ.js → chunk-M4GTWRK7.js} +113 -32
  10. package/dist/chunk-NPYN4TZ5.js +3516 -0
  11. package/dist/{chunk-RS5GZ5RW.js → chunk-SDETQV7Y.js} +161 -0
  12. package/dist/{composition-Tv9Wm3Oh.d.ts → composition-DzLwY-Mi.d.ts} +200 -4
  13. package/dist/composition.d.ts +1 -1
  14. package/dist/composition.js +1 -1
  15. package/dist/docs.js +50 -20
  16. package/dist/examples.d.ts +1 -1
  17. package/dist/examples.js +11 -11
  18. package/dist/font-policy.d.ts +123 -0
  19. package/dist/font-policy.js +1 -0
  20. package/dist/index.d.ts +129 -10
  21. package/dist/index.js +280 -12
  22. package/dist/lint.d.ts +3 -3
  23. package/dist/lint.js +5 -5
  24. package/dist/pagination.d.ts +5 -1
  25. package/dist/pagination.js +5 -5
  26. package/dist/{presentation-Ct42Mitb.d.ts → presentation-bceTClm8.d.ts} +246 -22
  27. package/dist/repo-readme.js +1 -1
  28. package/dist/{schemas-CiVmUT2p.d.ts → schemas-X_NniU4A.d.ts} +2 -0
  29. package/dist/schemas.d.ts +1 -1
  30. package/dist/schemas.js +1 -1
  31. package/dist/spec/catalogs/audiences/academic.json +24 -0
  32. package/dist/spec/catalogs/audiences/all-hands.json +3 -1
  33. package/dist/spec/catalogs/audiences/board.json +3 -1
  34. package/dist/spec/catalogs/audiences/customer.json +25 -0
  35. package/dist/spec/catalogs/audiences/executive.json +24 -0
  36. package/dist/spec/catalogs/audiences/general-public.json +25 -0
  37. package/dist/spec/catalogs/audiences/index.json +73 -1
  38. package/dist/spec/catalogs/audiences/internal-team.json +25 -0
  39. package/dist/spec/catalogs/audiences/investor.json +25 -0
  40. package/dist/spec/catalogs/audiences/marketing.json +25 -0
  41. package/dist/spec/catalogs/audiences/media.json +24 -0
  42. package/dist/spec/catalogs/audiences/partner.json +25 -0
  43. package/dist/spec/catalogs/audiences/regulatory.json +25 -0
  44. package/dist/spec/catalogs/audiences/sales.json +25 -0
  45. package/dist/spec/catalogs/audiences/technical.json +25 -0
  46. package/dist/spec/catalogs/chart-types/100pct-bullet-bar-2x.json +5 -0
  47. package/dist/spec/catalogs/chart-types/100pct-bullet-bar-3x.json +5 -0
  48. package/dist/spec/catalogs/chart-types/100pct-bullet-bar.json +5 -0
  49. package/dist/spec/catalogs/chart-types/100pct-bullet-column-2x.json +5 -0
  50. package/dist/spec/catalogs/chart-types/100pct-bullet-column-3x.json +5 -0
  51. package/dist/spec/catalogs/chart-types/100pct-bullet-column.json +5 -0
  52. package/dist/spec/catalogs/chart-types/100pct-progress-bar.json +10 -0
  53. package/dist/spec/catalogs/chart-types/100pct-stacked-area-2x.json +10 -0
  54. package/dist/spec/catalogs/chart-types/100pct-stacked-area-3x.json +6 -1
  55. package/dist/spec/catalogs/chart-types/100pct-stacked-bar-2x.json +10 -0
  56. package/dist/spec/catalogs/chart-types/100pct-stacked-bar-3x.json +6 -1
  57. package/dist/spec/catalogs/chart-types/100pct-stacked-column-2x.json +10 -0
  58. package/dist/spec/catalogs/chart-types/100pct-stacked-column-3x.json +6 -1
  59. package/dist/spec/catalogs/chart-types/area.json +5 -0
  60. package/dist/spec/catalogs/chart-types/australia.json +10 -0
  61. package/dist/spec/catalogs/chart-types/bar.json +5 -0
  62. package/dist/spec/catalogs/chart-types/box-and-whisker-2x.json +10 -0
  63. package/dist/spec/catalogs/chart-types/box-and-whisker-3x.json +10 -0
  64. package/dist/spec/catalogs/chart-types/box-and-whisker.json +5 -0
  65. package/dist/spec/catalogs/chart-types/bullet-bar-2x.json +5 -0
  66. package/dist/spec/catalogs/chart-types/bullet-bar-3x.json +5 -0
  67. package/dist/spec/catalogs/chart-types/bullet-bar.json +5 -0
  68. package/dist/spec/catalogs/chart-types/bullet-column-2x.json +5 -0
  69. package/dist/spec/catalogs/chart-types/bullet-column-3x.json +5 -0
  70. package/dist/spec/catalogs/chart-types/bullet-column.json +5 -0
  71. package/dist/spec/catalogs/chart-types/canada.json +10 -0
  72. package/dist/spec/catalogs/chart-types/clustered-bar-2x.json +10 -0
  73. package/dist/spec/catalogs/chart-types/clustered-column.json +10 -0
  74. package/dist/spec/catalogs/chart-types/column.json +5 -0
  75. package/dist/spec/catalogs/chart-types/dot-plot-2x.json +5 -0
  76. package/dist/spec/catalogs/chart-types/dot-plot-3x.json +5 -0
  77. package/dist/spec/catalogs/chart-types/dot-plot-4x.json +5 -0
  78. package/dist/spec/catalogs/chart-types/dot-plot-5x.json +5 -0
  79. package/dist/spec/catalogs/chart-types/dot-plot-6x.json +5 -0
  80. package/dist/spec/catalogs/chart-types/dot-plot.json +5 -0
  81. package/dist/spec/catalogs/chart-types/doughnut.json +5 -0
  82. package/dist/spec/catalogs/chart-types/dumbbell.json +5 -0
  83. package/dist/spec/catalogs/chart-types/filled-radar.json +5 -0
  84. package/dist/spec/catalogs/chart-types/funnel.json +5 -0
  85. package/dist/spec/catalogs/chart-types/histogram.json +5 -0
  86. package/dist/spec/catalogs/chart-types/index.json +333 -233
  87. package/dist/spec/catalogs/chart-types/line-2x.json +10 -0
  88. package/dist/spec/catalogs/chart-types/line-3x.json +10 -0
  89. package/dist/spec/catalogs/chart-types/line-with-high-low-and-markers.json +5 -0
  90. package/dist/spec/catalogs/chart-types/line-with-high-low.json +5 -0
  91. package/dist/spec/catalogs/chart-types/line-with-markers-2x.json +10 -0
  92. package/dist/spec/catalogs/chart-types/line-with-markers-3x.json +10 -0
  93. package/dist/spec/catalogs/chart-types/line-with-markers.json +5 -0
  94. package/dist/spec/catalogs/chart-types/line.json +5 -0
  95. package/dist/spec/catalogs/chart-types/pareto.json +9 -14
  96. package/dist/spec/catalogs/chart-types/pie.json +5 -0
  97. package/dist/spec/catalogs/chart-types/radar-with-markers.json +5 -0
  98. package/dist/spec/catalogs/chart-types/radar.json +5 -0
  99. package/dist/spec/catalogs/chart-types/scatter.json +5 -0
  100. package/dist/spec/catalogs/chart-types/sparkline-2x.json +5 -0
  101. package/dist/spec/catalogs/chart-types/sparkline-3x.json +5 -0
  102. package/dist/spec/catalogs/chart-types/sparkline-4x.json +5 -0
  103. package/dist/spec/catalogs/chart-types/sparkline-5x.json +5 -0
  104. package/dist/spec/catalogs/chart-types/sparkline-6x.json +5 -0
  105. package/dist/spec/catalogs/chart-types/sparkline.json +5 -0
  106. package/dist/spec/catalogs/chart-types/stacked-area-2x.json +10 -0
  107. package/dist/spec/catalogs/chart-types/stacked-area-3x.json +6 -1
  108. package/dist/spec/catalogs/chart-types/stacked-bar-2x.json +10 -0
  109. package/dist/spec/catalogs/chart-types/stacked-bar-3x.json +6 -1
  110. package/dist/spec/catalogs/chart-types/stacked-column-2x.json +10 -0
  111. package/dist/spec/catalogs/chart-types/stacked-column-3x.json +6 -1
  112. package/dist/spec/catalogs/chart-types/stacked-line-2x.json +10 -0
  113. package/dist/spec/catalogs/chart-types/stacked-line-3x.json +6 -1
  114. package/dist/spec/catalogs/chart-types/stacked-line-with-markers-2x.json +10 -0
  115. package/dist/spec/catalogs/chart-types/stacked-line-with-markers-3x.json +6 -1
  116. package/dist/spec/catalogs/chart-types/treemap-2x.json +10 -0
  117. package/dist/spec/catalogs/chart-types/treemap-3x.json +10 -0
  118. package/dist/spec/catalogs/chart-types/treemap.json +5 -0
  119. package/dist/spec/catalogs/chart-types/united-kingdom.json +10 -0
  120. package/dist/spec/catalogs/chart-types/united-states.json +10 -0
  121. package/dist/spec/catalogs/chart-types/waterfall.json +5 -0
  122. package/dist/spec/catalogs/chart-types/world.json +6 -1
  123. package/dist/spec/catalogs/font-schemes/consolas.json +3 -0
  124. package/dist/spec/catalogs/font-schemes/courier-new.json +3 -0
  125. package/dist/spec/catalogs/languages/afrikaans.json +3 -0
  126. package/dist/spec/catalogs/languages/albanian.json +3 -0
  127. package/dist/spec/catalogs/languages/amharic.json +3 -0
  128. package/dist/spec/catalogs/languages/arabic.json +3 -0
  129. package/dist/spec/catalogs/languages/armenian.json +3 -0
  130. package/dist/spec/catalogs/languages/aymara.json +3 -0
  131. package/dist/spec/catalogs/languages/azerbaijani.json +3 -0
  132. package/dist/spec/catalogs/languages/bengali.json +3 -0
  133. package/dist/spec/catalogs/languages/berber-latin.json +3 -0
  134. package/dist/spec/catalogs/languages/bosnian-latin.json +3 -0
  135. package/dist/spec/catalogs/languages/bulgarian.json +3 -0
  136. package/dist/spec/catalogs/languages/catalan.json +3 -0
  137. package/dist/spec/catalogs/languages/cebuano.json +3 -0
  138. package/dist/spec/catalogs/languages/chinese-simplified.json +3 -0
  139. package/dist/spec/catalogs/languages/chinese-traditional.json +3 -0
  140. package/dist/spec/catalogs/languages/chittagonian.json +3 -0
  141. package/dist/spec/catalogs/languages/croatian.json +3 -0
  142. package/dist/spec/catalogs/languages/czech.json +3 -0
  143. package/dist/spec/catalogs/languages/danish.json +3 -0
  144. package/dist/spec/catalogs/languages/dutch.json +3 -0
  145. package/dist/spec/catalogs/languages/english-au.json +3 -0
  146. package/dist/spec/catalogs/languages/english-ca.json +3 -0
  147. package/dist/spec/catalogs/languages/english-gb.json +3 -0
  148. package/dist/spec/catalogs/languages/english-in.json +3 -0
  149. package/dist/spec/catalogs/languages/english-us.json +3 -0
  150. package/dist/spec/catalogs/languages/english.json +3 -0
  151. package/dist/spec/catalogs/languages/estonian.json +3 -0
  152. package/dist/spec/catalogs/languages/filipino.json +3 -0
  153. package/dist/spec/catalogs/languages/finnish.json +3 -0
  154. package/dist/spec/catalogs/languages/french.json +3 -0
  155. package/dist/spec/catalogs/languages/fulfulde.json +3 -0
  156. package/dist/spec/catalogs/languages/galician.json +3 -0
  157. package/dist/spec/catalogs/languages/georgian.json +3 -0
  158. package/dist/spec/catalogs/languages/german.json +3 -0
  159. package/dist/spec/catalogs/languages/greek.json +3 -0
  160. package/dist/spec/catalogs/languages/gujarati.json +3 -0
  161. package/dist/spec/catalogs/languages/hausa.json +3 -0
  162. package/dist/spec/catalogs/languages/hebrew.json +3 -0
  163. package/dist/spec/catalogs/languages/hindi.json +3 -0
  164. package/dist/spec/catalogs/languages/hungarian.json +3 -0
  165. package/dist/spec/catalogs/languages/igbo.json +3 -0
  166. package/dist/spec/catalogs/languages/indonesian.json +3 -0
  167. package/dist/spec/catalogs/languages/italian.json +3 -0
  168. package/dist/spec/catalogs/languages/japanese.json +3 -0
  169. package/dist/spec/catalogs/languages/kannada.json +3 -0
  170. package/dist/spec/catalogs/languages/kazakh.json +3 -0
  171. package/dist/spec/catalogs/languages/khmer.json +3 -0
  172. package/dist/spec/catalogs/languages/kinyarwanda.json +3 -0
  173. package/dist/spec/catalogs/languages/korean.json +3 -0
  174. package/dist/spec/catalogs/languages/kurmanji.json +3 -0
  175. package/dist/spec/catalogs/languages/latvian.json +3 -0
  176. package/dist/spec/catalogs/languages/lithuanian.json +3 -0
  177. package/dist/spec/catalogs/languages/macedonian.json +3 -0
  178. package/dist/spec/catalogs/languages/malagasy.json +3 -0
  179. package/dist/spec/catalogs/languages/malay.json +3 -0
  180. package/dist/spec/catalogs/languages/malayalam.json +3 -0
  181. package/dist/spec/catalogs/languages/maori.json +3 -0
  182. package/dist/spec/catalogs/languages/marathi.json +3 -0
  183. package/dist/spec/catalogs/languages/mongolian.json +3 -0
  184. package/dist/spec/catalogs/languages/nepali.json +3 -0
  185. package/dist/spec/catalogs/languages/norwegian.json +3 -0
  186. package/dist/spec/catalogs/languages/odia.json +3 -0
  187. package/dist/spec/catalogs/languages/oromo.json +3 -0
  188. package/dist/spec/catalogs/languages/pashto.json +3 -0
  189. package/dist/spec/catalogs/languages/persian.json +3 -0
  190. package/dist/spec/catalogs/languages/polish.json +3 -0
  191. package/dist/spec/catalogs/languages/portuguese.json +3 -0
  192. package/dist/spec/catalogs/languages/punjabi-gurmukhi.json +3 -0
  193. package/dist/spec/catalogs/languages/punjabi-shahmukhi.json +3 -0
  194. package/dist/spec/catalogs/languages/romanian.json +3 -0
  195. package/dist/spec/catalogs/languages/russian.json +3 -0
  196. package/dist/spec/catalogs/languages/serbian-cyrillic.json +3 -0
  197. package/dist/spec/catalogs/languages/serbian-latin.json +3 -0
  198. package/dist/spec/catalogs/languages/shona.json +3 -0
  199. package/dist/spec/catalogs/languages/slovak.json +3 -0
  200. package/dist/spec/catalogs/languages/slovenian.json +3 -0
  201. package/dist/spec/catalogs/languages/somali.json +3 -0
  202. package/dist/spec/catalogs/languages/spanish.json +3 -0
  203. package/dist/spec/catalogs/languages/swahili.json +3 -0
  204. package/dist/spec/catalogs/languages/swedish.json +3 -0
  205. package/dist/spec/catalogs/languages/tagalog.json +3 -0
  206. package/dist/spec/catalogs/languages/tajik.json +3 -0
  207. package/dist/spec/catalogs/languages/tamil.json +3 -0
  208. package/dist/spec/catalogs/languages/telugu.json +3 -0
  209. package/dist/spec/catalogs/languages/thai.json +3 -0
  210. package/dist/spec/catalogs/languages/turkish.json +3 -0
  211. package/dist/spec/catalogs/languages/ukrainian.json +3 -0
  212. package/dist/spec/catalogs/languages/urdu.json +3 -0
  213. package/dist/spec/catalogs/languages/uzbek-latin.json +3 -0
  214. package/dist/spec/catalogs/languages/vietnamese-quoc-ngu.json +3 -0
  215. package/dist/spec/catalogs/languages/xhosa.json +3 -0
  216. package/dist/spec/catalogs/languages/yoruba.json +3 -0
  217. package/dist/spec/catalogs/languages/zulu.json +3 -0
  218. package/dist/spec/catalogs/narratives/change-story.json +64 -0
  219. package/dist/spec/catalogs/narratives/data-story.json +66 -0
  220. package/dist/spec/catalogs/narratives/heros-journey.json +64 -0
  221. package/dist/spec/catalogs/narratives/index.json +81 -0
  222. package/dist/spec/catalogs/narratives/pyramid-principle.json +48 -0
  223. package/dist/spec/catalogs/narratives/situation-complication-resolution.json +56 -0
  224. package/dist/spec/catalogs/narratives/sparkline.json +56 -0
  225. package/dist/spec/catalogs/narratives/star-method.json +56 -0
  226. package/dist/spec/catalogs/narratives/vision-roadmap.json +65 -0
  227. package/dist/spec/catalogs/narratives/what-so-what-now-what.json +48 -0
  228. package/dist/spec/reference/engine-defaults.json +2 -2
  229. package/dist/spec/reference/font-policy.json +3435 -0
  230. package/dist/spec/reference/font-policy.schema.json +328 -0
  231. package/dist/spec/schemas/chart-type.schema.json +51 -11
  232. package/dist/spec/schemas/font-scheme.schema.json +91 -1
  233. package/dist/spec/schemas/language.schema.json +10 -5
  234. package/dist/spec/schemas/opf.schema.json +158 -20
  235. package/dist/spec-files.d.ts +1 -1
  236. package/dist/spec-files.js +1 -1
  237. package/dist/types.d.ts +3 -3
  238. package/dist/validator.d.ts +3 -3
  239. package/dist/validator.js +4 -4
  240. package/package.json +6 -2
@@ -1,4 +1,4 @@
1
- import { P as Presentation } from './presentation-Ct42Mitb.js';
1
+ import { P as Presentation } from './presentation-bceTClm8.js';
2
2
 
3
3
  interface ExampleRecord {
4
4
  /** Filename slug, without the `.opf.json` suffix. */
package/dist/examples.js CHANGED
@@ -1111,7 +1111,7 @@ var examplesData = Object.freeze([
1111
1111
  "background": {
1112
1112
  "type": "pattern",
1113
1113
  "pattern": {
1114
- "preset": "diagStripe",
1114
+ "preset": "wdUpDiag",
1115
1115
  "foregroundColor": "#CBD5E1",
1116
1116
  "backgroundColor": "#FFFFFF"
1117
1117
  },
@@ -6218,7 +6218,7 @@ var examplesData = Object.freeze([
6218
6218
  "background": {
6219
6219
  "type": "pattern",
6220
6220
  "pattern": {
6221
- "preset": "diagStripe",
6221
+ "preset": "wdUpDiag",
6222
6222
  "foregroundColor": "#CBD5E1",
6223
6223
  "backgroundColor": "#FFFFFF"
6224
6224
  },
@@ -14121,7 +14121,7 @@ var examplesData = Object.freeze([
14121
14121
  "background": {
14122
14122
  "type": "pattern",
14123
14123
  "pattern": {
14124
- "preset": "diagStripe",
14124
+ "preset": "wdUpDiag",
14125
14125
  "foregroundColor": "#CBD5E1",
14126
14126
  "backgroundColor": "#FFFFFF"
14127
14127
  },
@@ -18378,7 +18378,7 @@ var examplesData = Object.freeze([
18378
18378
  "background": {
18379
18379
  "type": "pattern",
18380
18380
  "pattern": {
18381
- "preset": "diagStripe",
18381
+ "preset": "wdUpDiag",
18382
18382
  "foregroundColor": "#CBD5E1",
18383
18383
  "backgroundColor": "#FFFFFF"
18384
18384
  },
@@ -19062,7 +19062,7 @@ var examplesData = Object.freeze([
19062
19062
  "background": {
19063
19063
  "type": "pattern",
19064
19064
  "pattern": {
19065
- "preset": "diagStripe",
19065
+ "preset": "wdUpDiag",
19066
19066
  "foregroundColor": "#CBD5E1",
19067
19067
  "backgroundColor": "#FFFFFF"
19068
19068
  },
@@ -20091,7 +20091,7 @@ var examplesData = Object.freeze([
20091
20091
  "background": {
20092
20092
  "type": "pattern",
20093
20093
  "pattern": {
20094
- "preset": "diagStripe",
20094
+ "preset": "wdUpDiag",
20095
20095
  "foregroundColor": "#CBD5E1",
20096
20096
  "backgroundColor": "#FFFFFF"
20097
20097
  },
@@ -30888,7 +30888,7 @@ var examplesData = Object.freeze([
30888
30888
  "background": {
30889
30889
  "type": "pattern",
30890
30890
  "pattern": {
30891
- "preset": "diagStripe",
30891
+ "preset": "wdUpDiag",
30892
30892
  "foregroundColor": "#CBD5E1",
30893
30893
  "backgroundColor": "#FFFFFF"
30894
30894
  },
@@ -31253,7 +31253,7 @@ var examplesData = Object.freeze([
31253
31253
  "background": {
31254
31254
  "type": "pattern",
31255
31255
  "pattern": {
31256
- "preset": "diagStripe",
31256
+ "preset": "wdUpDiag",
31257
31257
  "foregroundColor": "#CBD5E1",
31258
31258
  "backgroundColor": "#FFFFFF"
31259
31259
  },
@@ -36531,7 +36531,7 @@ var examplesData = Object.freeze([
36531
36531
  "background": {
36532
36532
  "type": "pattern",
36533
36533
  "pattern": {
36534
- "preset": "diagStripe",
36534
+ "preset": "wdUpDiag",
36535
36535
  "foregroundColor": "#CBD5E1",
36536
36536
  "backgroundColor": "#FFFFFF"
36537
36537
  },
@@ -40758,7 +40758,7 @@ var examplesData = Object.freeze([
40758
40758
  "background": {
40759
40759
  "type": "pattern",
40760
40760
  "pattern": {
40761
- "preset": "diagStripe",
40761
+ "preset": "wdUpDiag",
40762
40762
  "foregroundColor": "#CBD5E1",
40763
40763
  "backgroundColor": "#FFFFFF"
40764
40764
  },
@@ -43674,7 +43674,7 @@ var examplesData = Object.freeze([
43674
43674
  "background": {
43675
43675
  "type": "pattern",
43676
43676
  "pattern": {
43677
- "preset": "diagStripe",
43677
+ "preset": "wdUpDiag",
43678
43678
  "foregroundColor": "#CBD5E1",
43679
43679
  "backgroundColor": "#FFFFFF"
43680
43680
  },
@@ -0,0 +1,123 @@
1
+ /**
2
+ * Types for the OPF font policy table (font-fidelity-everywhere FF-31).
3
+ * The data lives in spec/reference/font-policy.json; see docs/font-fidelity.md.
4
+ */
5
+ /**
6
+ * - `open`: the family itself is openly licensed (OFL-1.1, Apache-2.0). OPF may bundle it for
7
+ * rendering; it reaches a PPTX file only through an explicit embed path, never by default.
8
+ * - `proprietary-standard`: proprietary, and shipped with Windows, macOS, Microsoft Office or as a
9
+ * Microsoft 365 cloud font. OPF never bundles or embeds it; the PPTX names it and viewers resolve it.
10
+ * - `proprietary-nonstandard`: proprietary and not shipped with those products. Viewers may lack it.
11
+ */
12
+ type FontLicenseClass = "open" | "proprietary-standard" | "proprietary-nonstandard";
13
+ /**
14
+ * Where a viewer can get the family without the author's help:
15
+ * - `windows`: default install of Windows 10/11.
16
+ * - `windows-optional`: a Windows 10/11 language "Supplemental Fonts" feature on demand.
17
+ * - `macos`: installed or downloadable on current macOS (not "document support" only).
18
+ * - `office`: installed by Microsoft Office desktop.
19
+ * - `office-cloud`: a Microsoft 365 cloud font, downloaded on demand by Office apps.
20
+ */
21
+ type FontAvailability = "windows" | "windows-optional" | "macos" | "office" | "office-cloud";
22
+ /** `metric`: the replacement is documented as metric-compatible within the stated styles.
23
+ * `visual`: approximate appearance; expect reflow against the real font. */
24
+ type FontReplacementCompatibility = "metric" | "visual";
25
+ /** Shaped advance-width comparison of the replacement against the real font. */
26
+ interface FontReplacementMeasurement {
27
+ /** The replacement family that was measured. */
28
+ replacement: string;
29
+ /** Mean over measured styles and corpus strings of |replacement / reference - 1|. */
30
+ meanAbsWidthDelta: number;
31
+ /** Signed mean: positive means the replacement is wider. */
32
+ meanWidthDelta: number;
33
+ /** Largest |replacement / reference - 1| on any single corpus string. */
34
+ maxAbsWidthDelta: number;
35
+ /** Styles compared (regular, bold, italic, bold italic that both fonts have). */
36
+ styles: number;
37
+ /** Reference font version string that was measured (the file itself is never redistributed). */
38
+ reference: string;
39
+ }
40
+ interface FontReplacement {
41
+ /** Openly licensed family used only for preview measurement and drawing. Never written to PPTX. */
42
+ family: string;
43
+ compatibility: FontReplacementCompatibility;
44
+ /** Set when the family and compatibility come from a provisional owner decision (provisionalDecisions). */
45
+ decision?: string;
46
+ /** Copied from the decision: metric-mode registries still preview with this visual replacement. */
47
+ metricModeFallback?: boolean;
48
+ /** Weight to select in the replacement when the requested family encodes weight in its name
49
+ * (for example Segoe UI Semibold -> 600, Arial Black -> 900). */
50
+ weight?: number;
51
+ /** Null when the reference font was not available to the measuring host. */
52
+ measured: FontReplacementMeasurement | null;
53
+ /** Upstream statement of compatibility, when one exists. */
54
+ source?: string;
55
+ }
56
+ interface FontPolicyEntry {
57
+ family: string;
58
+ licenseClass: FontLicenseClass;
59
+ /** SPDX id for open families, otherwise a short proprietary owner statement. */
60
+ license: string;
61
+ availability: FontAvailability[];
62
+ /** True only for open families. Even then OPF embeds only through an explicit embed path. */
63
+ embeddableByOpf: boolean;
64
+ /** Required for proprietary families; null for open families, which render as themselves. */
65
+ replacement: FontReplacement | null;
66
+ /** Further open families a renderer may use when the replacement is not loaded. */
67
+ alternates?: string[];
68
+ sources: string[];
69
+ note?: string;
70
+ }
71
+ /** A provisional owner decision. Rows naming it take family and compatibility from here. */
72
+ interface FontPolicyDecision {
73
+ replacement: string;
74
+ compatibility: FontReplacementCompatibility;
75
+ /** Metric-mode registries still preview with this visual replacement (reported as visual), so an
76
+ * earlier metric behaviour does not regress. It never makes the replacement metric. */
77
+ metricModeFallback?: boolean;
78
+ note?: string;
79
+ }
80
+ interface FontPolicyTable {
81
+ /** Relative path of the JSON Schema (spec/reference/font-policy.schema.json). */
82
+ $schema?: string;
83
+ /** The one place provisional owner decisions live (FF-31). */
84
+ provisionalDecisions: {
85
+ status: string;
86
+ note: string;
87
+ decisions: Record<string, FontPolicyDecision>;
88
+ };
89
+ description: string;
90
+ version: number;
91
+ measurement: {
92
+ tool: string;
93
+ corpus: string;
94
+ evidence: string;
95
+ definition: string;
96
+ };
97
+ families: FontPolicyEntry[];
98
+ }
99
+
100
+ /**
101
+ * Apply provisional owner decisions (the one place they live, `provisionalDecisions`): a row whose
102
+ * replacement names a decision takes its family and compatibility from it. A recorded measurement
103
+ * of a different family no longer describes the replacement, so it becomes null (unmeasured).
104
+ */
105
+ declare function applyFontPolicyDecisions(source: unknown): FontPolicyTable;
106
+ declare const FONT_POLICY: Readonly<FontPolicyTable>;
107
+ /** The policy row for a family name (case-insensitive), or undefined when OPF has no row. */
108
+ declare function fontPolicyFor(family: string): Readonly<FontPolicyEntry> | undefined;
109
+ type FontAvailabilityCode = "font-policy-unknown" | "font-viewer-nonstandard" | "font-viewer-cloud-only" | "font-viewer-optional-feature";
110
+ interface FontAvailabilityDiagnostic {
111
+ code: FontAvailabilityCode;
112
+ severity: "warning" | "info";
113
+ family: string;
114
+ message: string;
115
+ }
116
+ /**
117
+ * What a PPTX viewer needs for each named family. OPF never embeds a proprietary family, so
118
+ * these notes describe the viewer's side only. Open families and families that ship with
119
+ * Windows or macOS by default produce no diagnostic.
120
+ */
121
+ declare function fontAvailabilityDiagnostics(families: Iterable<string>): FontAvailabilityDiagnostic[];
122
+
123
+ export { FONT_POLICY, type FontAvailability, type FontAvailabilityCode, type FontAvailabilityDiagnostic, type FontLicenseClass, type FontPolicyDecision, type FontPolicyEntry, type FontPolicyTable, type FontReplacement, type FontReplacementCompatibility, type FontReplacementMeasurement, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor };
@@ -0,0 +1 @@
1
+ export { FONT_POLICY, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor } from './chunk-NPYN4TZ5.js';
package/dist/index.d.ts CHANGED
@@ -1,14 +1,15 @@
1
- export { S as SchemaEntry, a as SchemaName, b as audience, c as chartType, d as colorScheme, f as fontScheme, l as language, e as layout, n as narrative, p as presentation, g as purpose, s as schemaEntries, h as schemaNames, i as schemas, j as socialPlatform, t as theme, k as tone } from './schemas-CiVmUT2p.js';
2
- import { C as CatalogKind } from './catalogs-atkOF4Vy.js';
3
- export { A as Audience, a as CatalogEntry, b as CatalogIndex, c as CatalogIndexRecord, d as CatalogRecord, e as ChartType, f as ColorScheme, F as FontScheme, L as Language, g as Layout, N as Narrative, P as Purpose, S as SocialPlatform, T as Theme, h as Tone, i as audiences, j as catalogEntries, k as catalogIndexes, l as catalogKinds, m as catalogSchemaNames, n as catalogs, o as chartTypes, p as colorSchemes, q as fontSchemes, r as languages, s as layouts, t as narratives, u as purposes, v as socialPlatforms, w as themes, x as tones } from './catalogs-atkOF4Vy.js';
1
+ export { S as SchemaEntry, a as SchemaName, b as audience, c as chartType, d as colorScheme, f as fontScheme, l as language, e as layout, n as narrative, p as presentation, g as purpose, s as schemaEntries, h as schemaNames, i as schemas, j as socialPlatform, t as theme, k as tone } from './schemas-X_NniU4A.js';
2
+ import { C as CatalogKind } from './catalogs-DJ-B5ZyD.js';
3
+ export { A as Audience, a as CatalogEntry, b as CatalogIndex, c as CatalogIndexRecord, d as CatalogRecord, e as ChartType, f as ColorScheme, F as FontScheme, L as Language, g as Layout, N as Narrative, P as Purpose, S as SocialPlatform, T as Theme, h as Tone, i as audiences, j as catalogEntries, k as catalogIndexes, l as catalogKinds, m as catalogSchemaNames, n as catalogs, o as chartTypes, p as colorSchemes, q as fontSchemes, r as languages, s as layouts, t as narratives, u as purposes, v as socialPlatforms, w as themes, x as tones } from './catalogs-DJ-B5ZyD.js';
4
4
  export { OPFValidationError, ValidationIssue, ValidationResult, assertValid, assertValidCatalogRecord, assertValidPresentation, validate, validateCatalogRecord, validatePresentation } from './validator.js';
5
5
  export { SpecFileEntry, SpecFileKind, SpecFilePath, specFileEntries, specFileKinds, specFilePaths } from './spec-files.js';
6
6
  export { LayoutPreviewIndex, LayoutPreviewRecord, getLayoutPreview, hasLayoutPreview, layoutPreviewIndex, layoutPreviewSlugs, layoutPreviews } from './previews.js';
7
- export { P as Presentation } from './presentation-Ct42Mitb.js';
7
+ export { P as Presentation } from './presentation-bceTClm8.js';
8
8
  export { LintContract, LintDiagnostic, LintLocation, LintOptions, LintReport, LintSeverity, LintSuggestion, lintPresentation, lintSource } from './lint.js';
9
- export { C as CodeContent, a as CodeLayout, b as CodeLayoutDiagnostic, c as CodeLayoutOptions, d as CodeLineSegment, e as CodeLineSource, f as CodeTextFit, g as CodeTextPart, h as ComposeSlideOptions, i as ComposedFlow, j as ComposedGroup, k as ComposedItem, l as Composition, m as CompositionCandidate, n as CompositionDecision, o as CompositionExplanation, p as CompositionPenalties, q as CompositionTrack, F as FontFamilies, r as FurnitureImagePart, s as FurnitureLayout, t as FurniturePart, u as FurniturePartBase, v as FurnitureTextPart, L as LayoutBox, w as LayoutDiagnostic, x as ListEntryLayout, y as ListFit, z as ListText, A as ListValue, M as MAX_COMPOSITION_DEPTH, B as MeasureTextWidth, D as MetricContent, E as MetricLayout, G as MetricLayoutDiagnostic, H as MetricLayoutOptions, I as MetricTextPart, J as MetricTextSource, O as OPFCompositionError, Q as QuoteContent, K as QuoteLayout, N as QuoteLayoutDiagnostic, P as QuoteLayoutOptions, R as QuoteTextPart, S as QuoteTextSource, T as ResolveColorRefOptions, U as ResolveColorRefRoles, V as RichTextFit, W as RichTextFragment, X as RichTextLine, Y as RichTextOptions, Z as RichTextRun, _ as SlideComposition, $ as TextFit, a0 as TextLineInk, a1 as TextMeasurement, a2 as TextPlacement, a3 as TextPlacementLine, a4 as TextStyle, a5 as TimelineContent, a6 as TimelineEvent, a7 as TimelineLayout, a8 as TimelineLayoutDiagnostic, a9 as TimelineLayoutOptions, aa as TimelineTextPart, ab as chartColorForFill, ac as colorContrast, ad as composeSlide, ae as fitList, af as fitRichText, ag as fitText, ah as layoutCode, ai as layoutFurniture, aj as layoutMetric, ak as layoutQuote, al as layoutTimeline, am as measureText, an as measureTextOutline, ao as normalizeHexColor, ap as placeTextLines, aq as resolveCanvasDimensions, ar as resolveColorRef, as as resolveFontFamilies, at as resolveTextStyle, au as textColorForFill, av as textWidthMeasurer, aw as wrapText } from './composition-Tv9Wm3Oh.js';
9
+ export { a as CodeContent, b as CodeLayout, c as CodeLayoutDiagnostic, d as CodeLayoutOptions, e as CodeLineSegment, f as CodeLineSource, g as CodeTextFit, h as CodeTextPart, C as ComposeSlideOptions, i as ComposedFlow, j as ComposedGroup, k as ComposedItem, l as ComposedSlideImage, m as Composition, n as CompositionCandidate, o as CompositionDecision, p as CompositionExplanation, q as CompositionPenalties, r as CompositionTrack, D as DEFAULT_FONT_SCHEME, s as DEFAULT_FURNITURE_DATE_FORMAT, t as DEFAULT_SLIDE_NUMBER_FORMAT, u as FontFamilies, F as FontSchemeDiagnostic, v as FurnitureField, w as FurnitureImagePart, x as FurnitureLayout, y as FurniturePart, z as FurniturePartBase, A as FurnitureSocialLink, B as FurnitureTextExtras, E as FurnitureTextPart, G as LayoutBox, L as LayoutDiagnostic, H as ListEntryLayout, I as ListFit, J as ListText, K as ListValue, M as MAX_COMPOSITION_DEPTH, N as MeasureTextWidth, O as MetricContent, P as MetricLayout, Q as MetricLayoutDiagnostic, R as MetricLayoutOptions, S as MetricTextPart, U as MetricTextSource, V as OPFCompositionError, W as QuoteContent, X as QuoteLayout, Y as QuoteLayoutDiagnostic, Z as QuoteLayoutOptions, _ as QuoteTextPart, $ as QuoteTextSource, a0 as ResolveColorRefOptions, a1 as ResolveColorRefRoles, a2 as ResolvedFontScheme, a3 as RichTextFit, a4 as RichTextFragment, a5 as RichTextLine, a6 as RichTextOptions, a7 as RichTextRun, a8 as SlideComposition, a9 as SlideImageShape, aa as SocialPlatformRecord, ab as SocialProfile, ac as TextFit, ad as TextLineInk, T as TextMeasurement, ae as TextPlacement, af as TextPlacementLine, ag as TextStyle, ah as TimelineContent, ai as TimelineEvent, aj as TimelineLayout, ak as TimelineLayoutDiagnostic, al as TimelineLayoutOptions, am as TimelineTextPart, an as chartColorForFill, ao as colorContrast, ap as composeSlide, aq as fitList, ar as fitRichText, as as fitText, at as formatFurnitureDate, au as formatSlideNumber, av as layoutCode, aw as layoutFurniture, ax as layoutMetric, ay as layoutQuote, az as layoutTimeline, aA as measureText, aB as measureTextOutline, aC as normalizeHexColor, aD as placeTextLines, aE as resolveCanvasDimensions, aF as resolveColorRef, aG as resolveFontFamilies, aH as resolveFontSchemeReference, aI as resolveSocialProfile, aJ as resolveTextStyle, aK as textColorForFill, aL as textWidthMeasurer, aM as wrapText } from './composition-DzLwY-Mi.js';
10
10
  export { OPFPaginationError, PaginatedPage, PaginationMapping, PaginationOptions, PaginationResult, PresentationPaginationOptions, PresentationPaginationResult, paginatePresentation, paginateSlide } from './pagination.js';
11
11
  export { DataCell, DataContentOptions, DataImportOptions, OPFDataImportError, TabularData, createDataContent, parseTabularData } from './data.js';
12
+ export { FONT_POLICY, FontAvailability, FontAvailabilityCode, FontAvailabilityDiagnostic, FontLicenseClass, FontPolicyDecision, FontPolicyEntry, FontPolicyTable, FontReplacement, FontReplacementCompatibility, FontReplacementMeasurement, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor } from './font-policy.js';
12
13
 
13
14
  /**
14
15
  * Local catalog vendoring: resolve every catalog reference a presentation
@@ -33,11 +34,11 @@ interface BundleReport {
33
34
  * Referenced bare ids that resolve nowhere locally, per kind — listed for
34
35
  * exactly the positions the validator warns about, so `unresolved` means
35
36
  * "the validator would warn about this": the string shorthand of
36
- * `narrative`, the design references `themes`, `colorSchemes` and
37
- * `fontSchemes` (string or `{ id }` form, at deck and slide level), and
38
- * `chart.type`.
37
+ * `narrative`, bare-id `audience` entries (string or `{ id }` form), the
38
+ * design references `themes`, `colorSchemes` and `fontSchemes` (string or
39
+ * `{ id }` form, at deck and slide level), and `chart.type`.
39
40
  *
40
- * Every other reference — tones, purposes, audiences, languages, layouts,
41
+ * Every other reference — tones, purposes, languages, layouts,
41
42
  * social platforms, object-form narratives, and anything reached through a
42
43
  * record rather than written by the author — is still resolved and inlined
43
44
  * when it is found, and skipped in silence when it is not, because the
@@ -68,4 +69,122 @@ interface BundleResult {
68
69
  */
69
70
  declare function bundlePresentation(value: unknown): BundleResult;
70
71
 
71
- export { type BundleReport, type BundleResult, CatalogKind, bundlePresentation };
72
+ /**
73
+ * Language/script font model (font-fidelity-everywhere FF-18).
74
+ *
75
+ * Resolves, for a presentation's language and effective font scheme, the font
76
+ * family for each OOXML script slot (`a:latin`, `a:ea`, `a:cs`) of the major
77
+ * (heading) and minor (body) theme fonts, plus the language tags and base
78
+ * direction. Pure: no DOM, fonts, network or mutation. Catalog references
79
+ * resolve against inline `catalogs.<kind>.records[]` first and the bundled
80
+ * catalogs second; a custom `source` is not fetched.
81
+ *
82
+ * Catalog ids and catalog tags resolve deterministically from vendored tables.
83
+ * Only a tag that matches no catalog record may consult the runtime's ICU
84
+ * likely subtags (`Intl.Locale#maximize`) to find its script.
85
+ *
86
+ * Design: docs/programs/font-fidelity-everywhere/script-font-model.md.
87
+ */
88
+ /** OOXML script slot a writing system uses: `a:latin`, `a:ea` or `a:cs`. */
89
+ type ScriptRole = "latin" | "eastAsian" | "complexScript";
90
+ /** Target application whose language font-scheme defaults apply. */
91
+ type ScriptFontApp = "PowerPoint" | "Google Slides";
92
+ /** Font family per OOXML script slot for one theme font (major or minor). */
93
+ interface ScriptFontSlots {
94
+ latin: string;
95
+ eastAsian: string;
96
+ complexScript: string;
97
+ }
98
+ /**
99
+ * Where a resolved eastAsian/complexScript family came from:
100
+ * - `fontScheme`: an explicit `eastAsian`/`complexScript` slot on the effective design font scheme.
101
+ * - `schemeFamily`: the design font scheme's own major/minor, because its `languageFamily` names this
102
+ * slot and its `languages` list is empty or names the presentation language.
103
+ * - `language`: the presentation language's font scheme (`fontScheme`, or `googleFontScheme` for Google Slides).
104
+ * - `latin`: no script-specific choice exists, so the slot repeats the latin family.
105
+ */
106
+ type ScriptFontSource = "fontScheme" | "schemeFamily" | "language" | "latin";
107
+ /** A per-script supplemental theme font, as in OOXML `<a:font script="Jpan" typeface="..."/>`. */
108
+ interface ScriptFontSupplement {
109
+ /** OOXML theme script tag (ISO 15924, except Korean uses `Hang`). */
110
+ script: string;
111
+ heading: string;
112
+ body: string;
113
+ }
114
+ interface ResolveScriptFontsOptions {
115
+ /** Which language font-scheme default applies. Defaults to `PowerPoint` (`language.fontScheme`). */
116
+ app?: ScriptFontApp;
117
+ /** Merge `slides[slideIndex].design` over the deck design, per field, before resolving the font scheme. */
118
+ slideIndex?: number;
119
+ /** Language reference to resolve instead of the document's `language` (catalog id, BCP-47 tag or Language object). */
120
+ language?: unknown;
121
+ /** Language tag used when neither the document nor `options.language` names a resolvable language. Defaults to `en-US`. */
122
+ defaultLanguage?: string;
123
+ }
124
+ interface ResolvedScriptFonts extends ScriptFontSlots {
125
+ /**
126
+ * Tag for OOXML `a:rPr/@lang` (and `a:endParaRPr/@lang`): an authored tag that carries a region,
127
+ * else the language record's curated `ooxmlLang`, else the canonical BCP-47 tag.
128
+ */
129
+ lang: string;
130
+ /** Canonically cased BCP-47 tag for HTML/SVG `lang`: the authored tag, else the record's `bcp47`. */
131
+ bcp47: string;
132
+ /** Matched languages catalog record id, when one matched. */
133
+ languageId?: string;
134
+ /** `default` when the tag came from `defaultLanguage` because no language resolved. */
135
+ languageSource: "document" | "option" | "default";
136
+ /** ISO 15924 script (`Zzzz` when it cannot be determined). */
137
+ script: string;
138
+ /** Script slot the language's own text uses. */
139
+ scriptRole: ScriptRole;
140
+ direction: "ltr" | "rtl";
141
+ rtl: boolean;
142
+ /** Major (heading) theme font slots. */
143
+ heading: ScriptFontSlots;
144
+ /** Minor (body) theme font slots. The top-level latin/eastAsian/complexScript repeat these. */
145
+ body: ScriptFontSlots;
146
+ /**
147
+ * Supplemental theme font for the language's script. Present only when an explicit slot, the
148
+ * design scheme's own script family or the language's font scheme supplies one; absent for
149
+ * Latin, Cyrillic, Greek and for scripts with no script font.
150
+ */
151
+ supplement?: ScriptFontSupplement;
152
+ sources: {
153
+ eastAsian: ScriptFontSource;
154
+ complexScript: ScriptFontSource;
155
+ };
156
+ }
157
+ /** Paragraph base direction. */
158
+ type TextDirection = "ltr" | "rtl";
159
+ /**
160
+ * The base direction of one paragraph in a deck, shared by the renderer and
161
+ * the PPTX exporter so preview and export agree. In a right-to-left deck a
162
+ * paragraph is right-to-left when its first strong character is
163
+ * right-to-left, or when it has no strong character (digits, punctuation or
164
+ * empty text); a paragraph whose first strong character is left-to-right
165
+ * (for example an English quote or code) stays left-to-right. In a
166
+ * left-to-right deck every paragraph is left-to-right.
167
+ *
168
+ * Strong characters follow UAX #9 rule P2: text inside directional isolates
169
+ * (LRI, RLI or FSI up to the matching PDI) is skipped. Letters count as
170
+ * strong; RTL letters are those of right-to-left scripts. The result does not
171
+ * depend on locale data, only on the JavaScript engine's Unicode tables.
172
+ */
173
+ declare function paragraphDirection(text: string, deckDirection: TextDirection | string | undefined): TextDirection;
174
+ /** The OOXML script slot for an ISO 15924 script code. Unknown scripts use the latin slot. */
175
+ declare function scriptFontRole(script: string): ScriptRole;
176
+ /**
177
+ * Resolve the per-script theme fonts, language tags and direction for a
178
+ * presentation (or a `{ design, language, catalogs }` subset of one).
179
+ *
180
+ * The latin slot follows the effective design font scheme exactly as
181
+ * `resolveFontFamilies` does; when nothing names a font scheme it falls back to
182
+ * the shared `DEFAULT_FONT_SCHEME`. Each of the eastAsian and complexScript slots
183
+ * takes, in order: the design font scheme's explicit slot; the scheme's own
184
+ * families when its `languageFamily` names the slot and its `languages` list
185
+ * is empty or names the language; the language's font scheme when the
186
+ * language's script uses the slot; otherwise the latin family.
187
+ */
188
+ declare function resolveScriptFonts(input: unknown, options?: ResolveScriptFontsOptions): ResolvedScriptFonts;
189
+
190
+ export { type BundleReport, type BundleResult, CatalogKind, type ResolveScriptFontsOptions, type ResolvedScriptFonts, type ScriptFontApp, type ScriptFontSlots, type ScriptFontSource, type ScriptFontSupplement, type ScriptRole, type TextDirection, bundlePresentation, paragraphDirection, resolveScriptFonts, scriptFontRole };