@openpresentation/opf 0.14.0 → 0.16.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 (360) hide show
  1. package/README.md +28 -38
  2. package/dist/catalog-refs-_anZs-Qz.d.ts +128 -0
  3. package/dist/catalog-schemas-BZCjgAxu.d.ts +12 -0
  4. package/dist/catalog.d.ts +91 -0
  5. package/dist/{chunk-XOZ4KMSR.js → catalog.js} +17018 -8816
  6. package/dist/{chart-data-B_3z9VTb.d.ts → chart-data-BnNqgnC-.d.ts} +1 -1
  7. package/dist/{chunk-BFLVSVA7.js → chunk-3XDRQYWZ.js} +1 -1
  8. package/dist/{chunk-6OXY2CP3.js → chunk-5PDN7BN6.js} +503 -239
  9. package/dist/{chunk-CSQHPVGL.js → chunk-5TO6I3GB.js} +1 -1
  10. package/dist/{chunk-4LDGKLUC.js → chunk-5UEUAW57.js} +4 -2
  11. package/dist/{chunk-5ZU6JAPP.js → chunk-6OR326EA.js} +1 -1
  12. package/dist/{chunk-XIZUK2XM.js → chunk-BSYQDWT4.js} +15 -3
  13. package/dist/{chunk-UPQQD7MA.js → chunk-FQSIIADJ.js} +15 -6
  14. package/dist/{chunk-D3TY4TT6.js → chunk-HXHOZ7AH.js} +1407 -154
  15. package/dist/chunk-K4DQQIT4.js +319 -0
  16. package/dist/chunk-KINQFU6X.js +51 -0
  17. package/dist/{chunk-4VJDTF55.js → chunk-NAWQR7MN.js} +1 -1
  18. package/dist/{chunk-JDJBDYSR.js → chunk-PX5AWL7Y.js} +333 -857
  19. package/dist/{chunk-Q2TCMN56.js → chunk-SMLMI6IZ.js} +5 -2
  20. package/dist/chunk-SPFV27O5.js +210 -0
  21. package/dist/chunk-TRDXRRQK.js +17 -0
  22. package/dist/{chunk-Z65B2B77.js → chunk-UM24JFUE.js} +2 -2
  23. package/dist/{chunk-LS2FMPI5.js → chunk-WEDGVC5W.js} +969 -886
  24. package/dist/{composition-_WEwBe2a.d.ts → composition-D4ADF5c-.d.ts} +319 -115
  25. package/dist/composition.d.ts +3 -2
  26. package/dist/composition.js +2 -2
  27. package/dist/convert.d.ts +14 -17
  28. package/dist/convert.js +36 -39
  29. package/dist/data.d.ts +28 -11
  30. package/dist/data.js +3 -3
  31. package/dist/deck.d.ts +77 -0
  32. package/dist/deck.js +12 -0
  33. package/dist/diff.d.ts +1 -1
  34. package/dist/diff.js +7 -7
  35. package/dist/docs.js +33 -33
  36. package/dist/examples.d.ts +1 -1
  37. package/dist/examples.js +51761 -4783
  38. package/dist/{finding-C_por275.d.ts → finding-CT_f_vbD.d.ts} +2 -2
  39. package/dist/format.js +2 -2
  40. package/dist/index.d.ts +227 -77
  41. package/dist/index.js +343 -258
  42. package/dist/json-BFSdESOE.d.ts +19 -0
  43. package/dist/markdown.d.ts +20 -9
  44. package/dist/markdown.js +9 -9
  45. package/dist/{pagination-BZpXLvFL.d.ts → pagination-DzZPFheM.d.ts} +31 -31
  46. package/dist/pagination.d.ts +4 -5
  47. package/dist/pagination.js +6 -6
  48. package/dist/patch.d.ts +1 -1
  49. package/dist/patch.js +6 -6
  50. package/dist/{presentation-C5eHkevA.d.ts → presentation-COrFuj2g.d.ts} +398 -558
  51. package/dist/repo-readme.js +1 -1
  52. package/dist/schemas.d.ts +298 -1
  53. package/dist/schemas.js +1 -1
  54. package/dist/spec/README.md +1 -1
  55. package/dist/spec/catalogs/font-schemes/angsana-new.json +1 -1
  56. package/dist/spec/catalogs/font-schemes/aparajita.json +2 -2
  57. package/dist/spec/catalogs/font-schemes/arabic-typesetting.json +1 -1
  58. package/dist/spec/catalogs/font-schemes/batang.json +1 -1
  59. package/dist/spec/catalogs/font-schemes/daunpenh.json +1 -1
  60. package/dist/spec/catalogs/font-schemes/david.json +1 -1
  61. package/dist/spec/catalogs/font-schemes/dilleniaupc.json +1 -1
  62. package/dist/spec/catalogs/font-schemes/fangsong.json +1 -1
  63. package/dist/spec/catalogs/font-schemes/gautami.json +1 -1
  64. package/dist/spec/catalogs/font-schemes/gisha.json +2 -2
  65. package/dist/spec/catalogs/font-schemes/gungsuh.json +1 -1
  66. package/dist/spec/catalogs/font-schemes/index.json +1 -1
  67. package/dist/spec/catalogs/font-schemes/kalinga.json +1 -1
  68. package/dist/spec/catalogs/font-schemes/kartika.json +1 -1
  69. package/dist/spec/catalogs/font-schemes/khmer-ui.json +1 -1
  70. package/dist/spec/catalogs/font-schemes/latha.json +1 -1
  71. package/dist/spec/catalogs/font-schemes/malgun-gothic.json +1 -1
  72. package/dist/spec/catalogs/font-schemes/mangal.json +3 -3
  73. package/dist/spec/catalogs/font-schemes/meiryo.json +1 -1
  74. package/dist/spec/catalogs/font-schemes/microsoft-jhenghei.json +1 -1
  75. package/dist/spec/catalogs/font-schemes/microsoft-yahei.json +4 -4
  76. package/dist/spec/catalogs/font-schemes/mingliu.json +1 -1
  77. package/dist/spec/catalogs/font-schemes/miriam.json +1 -1
  78. package/dist/spec/catalogs/font-schemes/ms-mincho.json +1 -1
  79. package/dist/spec/catalogs/font-schemes/nirmala-ui.json +1 -1
  80. package/dist/spec/catalogs/font-schemes/noto-naksh-arabic.json +1 -1
  81. package/dist/spec/catalogs/font-schemes/noto-nastaliq-urdu.json +2 -2
  82. package/dist/spec/catalogs/font-schemes/noto-sans-arabic.json +3 -3
  83. package/dist/spec/catalogs/font-schemes/noto-sans-armenian.json +1 -1
  84. package/dist/spec/catalogs/font-schemes/noto-sans-bengali.json +2 -2
  85. package/dist/spec/catalogs/font-schemes/noto-sans-devangari.json +2 -2
  86. package/dist/spec/catalogs/font-schemes/noto-sans-ethiopic.json +1 -1
  87. package/dist/spec/catalogs/font-schemes/noto-sans-georgian.json +1 -1
  88. package/dist/spec/catalogs/font-schemes/noto-sans-gujarati.json +1 -1
  89. package/dist/spec/catalogs/font-schemes/noto-sans-gurmukhi.json +1 -1
  90. package/dist/spec/catalogs/font-schemes/noto-sans-hebrew.json +1 -1
  91. package/dist/spec/catalogs/font-schemes/noto-sans-jp.json +1 -1
  92. package/dist/spec/catalogs/font-schemes/noto-sans-kannada.json +1 -1
  93. package/dist/spec/catalogs/font-schemes/noto-sans-khmer.json +1 -1
  94. package/dist/spec/catalogs/font-schemes/noto-sans-kr.json +1 -1
  95. package/dist/spec/catalogs/font-schemes/noto-sans-malayalam.json +1 -1
  96. package/dist/spec/catalogs/font-schemes/noto-sans-mongolian.json +1 -1
  97. package/dist/spec/catalogs/font-schemes/noto-sans-oriya.json +1 -1
  98. package/dist/spec/catalogs/font-schemes/noto-sans-sc.json +4 -4
  99. package/dist/spec/catalogs/font-schemes/noto-sans-tamil.json +1 -1
  100. package/dist/spec/catalogs/font-schemes/noto-sans-tc.json +1 -1
  101. package/dist/spec/catalogs/font-schemes/noto-sans-telugu.json +1 -1
  102. package/dist/spec/catalogs/font-schemes/noto-sans-thai.json +1 -1
  103. package/dist/spec/catalogs/font-schemes/noto-sans.json +4 -4
  104. package/dist/spec/catalogs/font-schemes/nyala.json +1 -1
  105. package/dist/spec/catalogs/font-schemes/pmingliu.json +1 -1
  106. package/dist/spec/catalogs/font-schemes/raavi.json +1 -1
  107. package/dist/spec/catalogs/font-schemes/sakkal-majalla.json +3 -3
  108. package/dist/spec/catalogs/font-schemes/shonar-bangla.json +2 -2
  109. package/dist/spec/catalogs/font-schemes/shruti.json +1 -1
  110. package/dist/spec/catalogs/font-schemes/simsun.json +1 -1
  111. package/dist/spec/catalogs/font-schemes/sylfaen.json +2 -2
  112. package/dist/spec/catalogs/font-schemes/traditional-arabic.json +3 -3
  113. package/dist/spec/catalogs/font-schemes/tunga.json +1 -1
  114. package/dist/spec/catalogs/font-schemes/vrinda.json +1 -1
  115. package/dist/spec/catalogs/font-schemes/yu-gothic.json +1 -1
  116. package/dist/spec/catalogs/layouts/business-model-canvas.json +66 -1
  117. package/dist/spec/catalogs/layouts/capability-map.json +53 -6
  118. package/dist/spec/catalogs/layouts/chart-1x-title-center.json +30 -0
  119. package/dist/spec/catalogs/layouts/chart-2x-title-center.json +36 -0
  120. package/dist/spec/catalogs/layouts/chart-2x-vertical-title-left.json +37 -0
  121. package/dist/spec/catalogs/layouts/chart-2x.json +32 -8
  122. package/dist/spec/catalogs/layouts/chart-3x-bottom-vertical-title-left.json +52 -0
  123. package/dist/spec/catalogs/layouts/chart-3x-left-title-center.json +51 -0
  124. package/dist/spec/catalogs/layouts/chart-3x-left.json +46 -0
  125. package/dist/spec/catalogs/layouts/chart-3x-right-title-center.json +51 -0
  126. package/dist/spec/catalogs/layouts/chart-3x-right.json +46 -0
  127. package/dist/spec/catalogs/layouts/chart-3x-title-center.json +39 -0
  128. package/dist/spec/catalogs/layouts/chart-3x-top-vertical-title-left.json +52 -0
  129. package/dist/spec/catalogs/layouts/chart-3x.json +48 -12
  130. package/dist/spec/catalogs/layouts/competitive-landscape.json +1 -4
  131. package/dist/spec/catalogs/layouts/customer-journey.json +1 -4
  132. package/dist/spec/catalogs/layouts/dashboard.json +37 -5
  133. package/dist/spec/catalogs/layouts/decision-tree.json +1 -4
  134. package/dist/spec/catalogs/layouts/ecosystem-map.json +1 -4
  135. package/dist/spec/catalogs/layouts/extract/canonical.json +0 -9
  136. package/dist/spec/catalogs/layouts/geographic-map.json +1 -4
  137. package/dist/spec/catalogs/layouts/icon-grid.json +1 -4
  138. package/dist/spec/catalogs/layouts/image-1x-crop-title-center.json +32 -0
  139. package/dist/spec/catalogs/layouts/image-1x-crop-title-left.json +32 -0
  140. package/dist/spec/catalogs/layouts/image-1x-crop.json +27 -0
  141. package/dist/spec/catalogs/layouts/image-1x-fit-title-center.json +32 -0
  142. package/dist/spec/catalogs/layouts/image-1x.json +3 -0
  143. package/dist/spec/catalogs/layouts/image-2x-crop-title-center.json +38 -0
  144. package/dist/spec/catalogs/layouts/image-2x-crop-vertical-title-left.json +39 -0
  145. package/dist/spec/catalogs/layouts/image-2x-crop-vertical.json +34 -0
  146. package/dist/spec/catalogs/layouts/image-2x-crop.json +33 -0
  147. package/dist/spec/catalogs/layouts/image-2x-fit-title-center.json +38 -0
  148. package/dist/spec/catalogs/layouts/image-2x-fit-vertical-title-left.json +39 -0
  149. package/dist/spec/catalogs/layouts/image-2x-fit-vertical.json +34 -0
  150. package/dist/spec/catalogs/layouts/image-2x.json +35 -8
  151. package/dist/spec/catalogs/layouts/image-3x-crop-title-center.json +41 -0
  152. package/dist/spec/catalogs/layouts/image-3x-crop-vertical-title-left.json +42 -0
  153. package/dist/spec/catalogs/layouts/image-3x-crop-vertical.json +37 -0
  154. package/dist/spec/catalogs/layouts/image-3x-crop.json +36 -0
  155. package/dist/spec/catalogs/layouts/image-3x-fit-title-center.json +41 -0
  156. package/dist/spec/catalogs/layouts/image-3x-fit-vertical-title-left.json +42 -0
  157. package/dist/spec/catalogs/layouts/image-3x-fit-vertical.json +37 -0
  158. package/dist/spec/catalogs/layouts/image-3x-fit.json +36 -0
  159. package/dist/spec/catalogs/layouts/image-3x.json +51 -12
  160. package/dist/spec/catalogs/layouts/image-focus.json +3 -6
  161. package/dist/spec/catalogs/layouts/image-only-1x-crop-title-center.json +31 -0
  162. package/dist/spec/catalogs/layouts/image-only-1x-fit-title-center.json +31 -0
  163. package/dist/spec/catalogs/layouts/image-only-2x-crop-title-center.json +37 -0
  164. package/dist/spec/catalogs/layouts/image-only-2x-crop-vertical-title-left.json +38 -0
  165. package/dist/spec/catalogs/layouts/image-only-2x-crop-vertical.json +33 -0
  166. package/dist/spec/catalogs/layouts/image-only-2x-fit-title-center.json +37 -0
  167. package/dist/spec/catalogs/layouts/image-only-2x-fit-vertical-title-left.json +38 -0
  168. package/dist/spec/catalogs/layouts/image-only-2x-fit-vertical.json +33 -0
  169. package/dist/spec/catalogs/layouts/image-only-3x-crop-title-center.json +40 -0
  170. package/dist/spec/catalogs/layouts/image-only-3x-crop-vertical-title-left.json +41 -0
  171. package/dist/spec/catalogs/layouts/image-only-3x-crop-vertical.json +36 -0
  172. package/dist/spec/catalogs/layouts/image-only-3x-crop.json +35 -0
  173. package/dist/spec/catalogs/layouts/image-only-3x-fit-title-center.json +40 -0
  174. package/dist/spec/catalogs/layouts/image-only-3x-fit-vertical-title-left.json +41 -0
  175. package/dist/spec/catalogs/layouts/image-only-3x-fit-vertical.json +36 -0
  176. package/dist/spec/catalogs/layouts/image-only-3x-fit.json +35 -0
  177. package/dist/spec/catalogs/layouts/index.json +1041 -151
  178. package/dist/spec/catalogs/layouts/kpi-scorecard.json +48 -3
  179. package/dist/spec/catalogs/layouts/list-1x-box-title-center.json +32 -0
  180. package/dist/spec/catalogs/layouts/list-1x-box-vertical-title-center.json +33 -0
  181. package/dist/spec/catalogs/layouts/list-1x-box-vertical-title-left.json +33 -0
  182. package/dist/spec/catalogs/layouts/list-1x-box-vertical.json +28 -0
  183. package/dist/spec/catalogs/layouts/list-1x-box.json +27 -0
  184. package/dist/spec/catalogs/layouts/list-1x-itemimage-title-center.json +32 -0
  185. package/dist/spec/catalogs/layouts/list-1x-itemimage-vertical-title-center.json +33 -0
  186. package/dist/spec/catalogs/layouts/list-1x-title-center.json +31 -0
  187. package/dist/spec/catalogs/layouts/list-1x-vertical-title-center.json +32 -0
  188. package/dist/spec/catalogs/layouts/list-2x-box-title-center.json +38 -0
  189. package/dist/spec/catalogs/layouts/list-2x-box-vertical-title-center.json +39 -0
  190. package/dist/spec/catalogs/layouts/list-2x-box-vertical-title-left.json +39 -0
  191. package/dist/spec/catalogs/layouts/list-2x-box-vertical.json +34 -0
  192. package/dist/spec/catalogs/layouts/list-2x-box.json +33 -0
  193. package/dist/spec/catalogs/layouts/list-2x-itemimage-title-center.json +38 -0
  194. package/dist/spec/catalogs/layouts/list-2x-itemimage-vertical-title-center.json +39 -0
  195. package/dist/spec/catalogs/layouts/list-2x-itemimage-vertical-title-left.json +39 -0
  196. package/dist/spec/catalogs/layouts/list-2x-itemimage-vertical.json +34 -0
  197. package/dist/spec/catalogs/layouts/list-2x-title-center.json +37 -0
  198. package/dist/spec/catalogs/layouts/list-2x-vertical-title-center.json +38 -0
  199. package/dist/spec/catalogs/layouts/list-2x-vertical-title-left.json +38 -0
  200. package/dist/spec/catalogs/layouts/list-2x-vertical.json +33 -0
  201. package/dist/spec/catalogs/layouts/list-3x-box-title-center.json +41 -0
  202. package/dist/spec/catalogs/layouts/list-3x-box-vertical-title-center.json +42 -0
  203. package/dist/spec/catalogs/layouts/list-3x-box-vertical-title-left.json +42 -0
  204. package/dist/spec/catalogs/layouts/list-3x-box-vertical.json +37 -0
  205. package/dist/spec/catalogs/layouts/list-3x-box.json +36 -0
  206. package/dist/spec/catalogs/layouts/list-3x-itemimage-title-center.json +41 -0
  207. package/dist/spec/catalogs/layouts/list-3x-itemimage-vertical-title-center.json +42 -0
  208. package/dist/spec/catalogs/layouts/list-3x-itemimage-vertical-title-left.json +42 -0
  209. package/dist/spec/catalogs/layouts/list-3x-itemimage-vertical.json +37 -0
  210. package/dist/spec/catalogs/layouts/list-3x-itemimage.json +36 -0
  211. package/dist/spec/catalogs/layouts/list-3x-title-center.json +40 -0
  212. package/dist/spec/catalogs/layouts/list-3x-vertical-title-center.json +41 -0
  213. package/dist/spec/catalogs/layouts/list-3x-vertical-title-left.json +41 -0
  214. package/dist/spec/catalogs/layouts/list-3x-vertical.json +36 -0
  215. package/dist/spec/catalogs/layouts/list-4x-box-title-center.json +45 -0
  216. package/dist/spec/catalogs/layouts/list-4x-box-vertical-title-center.json +45 -0
  217. package/dist/spec/catalogs/layouts/list-4x-box-vertical-title-left.json +45 -0
  218. package/dist/spec/catalogs/layouts/list-4x-box-vertical.json +40 -0
  219. package/dist/spec/catalogs/layouts/list-4x-box.json +40 -0
  220. package/dist/spec/catalogs/layouts/list-4x-itemimage-title-center.json +45 -0
  221. package/dist/spec/catalogs/layouts/list-4x-itemimage-vertical-title-center.json +45 -0
  222. package/dist/spec/catalogs/layouts/list-4x-itemimage-vertical-title-left.json +45 -0
  223. package/dist/spec/catalogs/layouts/list-4x-itemimage-vertical.json +40 -0
  224. package/dist/spec/catalogs/layouts/list-4x-title-center.json +44 -0
  225. package/dist/spec/catalogs/layouts/list-4x-vertical-title-center.json +44 -0
  226. package/dist/spec/catalogs/layouts/list-4x-vertical-title-left.json +44 -0
  227. package/dist/spec/catalogs/layouts/list-4x-vertical.json +39 -0
  228. package/dist/spec/catalogs/layouts/list-5x-box-title-center.json +48 -0
  229. package/dist/spec/catalogs/layouts/list-5x-box-vertical-title-center.json +50 -0
  230. package/dist/spec/catalogs/layouts/list-5x-box-vertical-title-left.json +50 -0
  231. package/dist/spec/catalogs/layouts/list-5x-box-vertical.json +45 -0
  232. package/dist/spec/catalogs/layouts/list-5x-box.json +43 -0
  233. package/dist/spec/catalogs/layouts/list-5x-itemimage-title-center.json +48 -0
  234. package/dist/spec/catalogs/layouts/list-5x-itemimage-vertical-title-center.json +48 -0
  235. package/dist/spec/catalogs/layouts/list-5x-itemimage-vertical-title-left.json +48 -0
  236. package/dist/spec/catalogs/layouts/list-5x-itemimage-vertical.json +43 -0
  237. package/dist/spec/catalogs/layouts/list-5x-title-center.json +47 -0
  238. package/dist/spec/catalogs/layouts/list-5x-vertical-title-center.json +47 -0
  239. package/dist/spec/catalogs/layouts/list-5x-vertical-title-left.json +47 -0
  240. package/dist/spec/catalogs/layouts/list-5x-vertical.json +42 -0
  241. package/dist/spec/catalogs/layouts/list-6x-box-title-center.json +51 -0
  242. package/dist/spec/catalogs/layouts/list-6x-box-vertical-title-center.json +53 -0
  243. package/dist/spec/catalogs/layouts/list-6x-box-vertical-title-left.json +53 -0
  244. package/dist/spec/catalogs/layouts/list-6x-box-vertical.json +48 -0
  245. package/dist/spec/catalogs/layouts/list-6x-box.json +46 -0
  246. package/dist/spec/catalogs/layouts/list-6x-itemimage-title-center.json +51 -0
  247. package/dist/spec/catalogs/layouts/list-6x-itemimage-vertical-title-center.json +51 -0
  248. package/dist/spec/catalogs/layouts/list-6x-itemimage-vertical-title-left.json +51 -0
  249. package/dist/spec/catalogs/layouts/list-6x-itemimage-vertical.json +46 -0
  250. package/dist/spec/catalogs/layouts/list-6x-title-center.json +50 -0
  251. package/dist/spec/catalogs/layouts/list-6x-vertical-title-center.json +50 -0
  252. package/dist/spec/catalogs/layouts/list-6x-vertical-title-left.json +50 -0
  253. package/dist/spec/catalogs/layouts/list-6x-vertical.json +45 -0
  254. package/dist/spec/catalogs/layouts/logic-tree.json +69 -0
  255. package/dist/spec/catalogs/layouts/market-size.json +26 -2
  256. package/dist/spec/catalogs/layouts/network-dependency-map.json +1 -4
  257. package/dist/spec/catalogs/layouts/number-1x-box-title-center.json +30 -0
  258. package/dist/spec/catalogs/layouts/number-1x-box.json +25 -0
  259. package/dist/spec/catalogs/layouts/number-1x-title-center.json +29 -0
  260. package/dist/spec/catalogs/layouts/number-2x-box-title-center.json +36 -0
  261. package/dist/spec/catalogs/layouts/number-2x-box.json +31 -0
  262. package/dist/spec/catalogs/layouts/number-2x-title-center.json +35 -0
  263. package/dist/spec/catalogs/layouts/number-3x-box-title-center.json +39 -0
  264. package/dist/spec/catalogs/layouts/number-3x-box.json +34 -0
  265. package/dist/spec/catalogs/layouts/number-3x-title-center.json +38 -0
  266. package/dist/spec/catalogs/layouts/number-4x-box-title-center.json +43 -0
  267. package/dist/spec/catalogs/layouts/number-4x-box.json +38 -0
  268. package/dist/spec/catalogs/layouts/number-4x-title-center.json +42 -0
  269. package/dist/spec/catalogs/layouts/number-5x-box-title-center.json +46 -0
  270. package/dist/spec/catalogs/layouts/number-5x-box.json +41 -0
  271. package/dist/spec/catalogs/layouts/number-5x-title-center.json +45 -0
  272. package/dist/spec/catalogs/layouts/number-6x-box-title-center.json +49 -0
  273. package/dist/spec/catalogs/layouts/number-6x-box.json +44 -0
  274. package/dist/spec/catalogs/layouts/number-6x-title-center.json +48 -0
  275. package/dist/spec/catalogs/layouts/org-chart.json +53 -6
  276. package/dist/spec/catalogs/layouts/persona-grid.json +1 -4
  277. package/dist/spec/catalogs/layouts/photo-grid.json +1 -4
  278. package/dist/spec/catalogs/layouts/product-feature.json +1 -4
  279. package/dist/spec/catalogs/layouts/screenshot-walkthrough.json +1 -4
  280. package/dist/spec/catalogs/layouts/swimlane-process.json +1 -4
  281. package/dist/spec/catalogs/layouts/team-bio.json +1 -4
  282. package/dist/spec/catalogs/layouts/text-1x-box-title-center.json +31 -0
  283. package/dist/spec/catalogs/layouts/text-1x-box-title-left.json +31 -0
  284. package/dist/spec/catalogs/layouts/text-1x-center-box-title-center.json +31 -0
  285. package/dist/spec/catalogs/layouts/text-1x-center-box-title-left.json +31 -0
  286. package/dist/spec/catalogs/layouts/text-1x-center-box.json +26 -0
  287. package/dist/spec/catalogs/layouts/text-1x-center-title-center.json +30 -0
  288. package/dist/spec/catalogs/layouts/text-1x-center-title-left.json +30 -0
  289. package/dist/spec/catalogs/layouts/text-1x-center.json +25 -0
  290. package/dist/spec/catalogs/layouts/text-1x-left-box.json +26 -0
  291. package/dist/spec/catalogs/layouts/text-1x-title-center.json +30 -0
  292. package/dist/spec/catalogs/layouts/text-2x-box-title-center.json +37 -0
  293. package/dist/spec/catalogs/layouts/text-2x-box-vertical-title-left.json +37 -0
  294. package/dist/spec/catalogs/layouts/text-2x-center-box-title-center.json +37 -0
  295. package/dist/spec/catalogs/layouts/text-2x-center-box-vertical-title-left.json +37 -0
  296. package/dist/spec/catalogs/layouts/text-2x-center-box.json +32 -0
  297. package/dist/spec/catalogs/layouts/text-2x-center-title-center.json +36 -0
  298. package/dist/spec/catalogs/layouts/text-2x-center-vertical-title-left.json +36 -0
  299. package/dist/spec/catalogs/layouts/text-2x-center.json +31 -0
  300. package/dist/spec/catalogs/layouts/text-2x-left-box.json +32 -0
  301. package/dist/spec/catalogs/layouts/text-2x-title-center.json +36 -0
  302. package/dist/spec/catalogs/layouts/text-2x-vertical-title-left.json +36 -0
  303. package/dist/spec/catalogs/layouts/text-3x-box-title-center.json +40 -0
  304. package/dist/spec/catalogs/layouts/text-3x-box-vertical-title-left.json +41 -0
  305. package/dist/spec/catalogs/layouts/text-3x-center-box-title-center.json +40 -0
  306. package/dist/spec/catalogs/layouts/text-3x-center-box-vertical-title-left.json +41 -0
  307. package/dist/spec/catalogs/layouts/text-3x-center-box.json +35 -0
  308. package/dist/spec/catalogs/layouts/text-3x-center-title-center.json +39 -0
  309. package/dist/spec/catalogs/layouts/text-3x-center-vertical-title-left.json +40 -0
  310. package/dist/spec/catalogs/layouts/text-3x-center.json +34 -0
  311. package/dist/spec/catalogs/layouts/text-3x-left-box.json +35 -0
  312. package/dist/spec/catalogs/layouts/text-3x-left.json +34 -0
  313. package/dist/spec/catalogs/layouts/text-3x-title-center.json +39 -0
  314. package/dist/spec/catalogs/layouts/text-3x-vertical-title-left.json +40 -0
  315. package/dist/spec/catalogs/layouts/title-center-box.json +27 -0
  316. package/dist/spec/catalogs/layouts/title-center-image-bottom.json +34 -0
  317. package/dist/spec/catalogs/layouts/title-center-image-top.json +34 -0
  318. package/dist/spec/catalogs/layouts/title-center.json +26 -0
  319. package/dist/spec/catalogs/layouts/title-left-image-bottom.json +34 -0
  320. package/dist/spec/catalogs/layouts/title-left-image-left.json +34 -0
  321. package/dist/spec/catalogs/layouts/title-left-image-right.json +34 -0
  322. package/dist/spec/catalogs/layouts/title-left-image-top.json +34 -0
  323. package/dist/spec/catalogs/manifest.json +18 -18
  324. package/dist/spec/catalogs/narratives/heros-journey.json +1 -1
  325. package/dist/spec/catalogs/narratives/index.json +1 -1
  326. package/dist/spec/openapi.yaml +3 -3
  327. package/dist/spec/reference/engine-defaults.json +22 -30
  328. package/dist/spec/reference/engine-vocabularies.json +1577 -0
  329. package/dist/spec/schemas/audience.schema.json +5 -26
  330. package/dist/spec/schemas/catalog-manifest.schema.json +3 -3
  331. package/dist/spec/schemas/chart-type.schema.json +2 -35
  332. package/dist/spec/schemas/color-scheme.schema.json +3 -24
  333. package/dist/spec/schemas/finding.schema.json +1 -1
  334. package/dist/spec/schemas/font-scheme.schema.json +6 -37
  335. package/dist/spec/schemas/language.schema.json +7 -28
  336. package/dist/spec/schemas/layout.schema.json +227 -55
  337. package/dist/spec/schemas/narrative.schema.json +4 -24
  338. package/dist/spec/schemas/opf.schema.json +410 -374
  339. package/dist/spec/schemas/purpose.schema.json +5 -26
  340. package/dist/spec/schemas/social-platform.schema.json +2 -23
  341. package/dist/spec/schemas/theme.schema.json +9 -37
  342. package/dist/spec/schemas/tone.schema.json +4 -25
  343. package/dist/spec-files.d.ts +1 -1
  344. package/dist/spec-files.js +1 -1
  345. package/dist/types.d.ts +1103 -4
  346. package/dist/{validation-types-zh03LeZy.d.ts → validation-types-HxIgJfKx.d.ts} +7 -7
  347. package/dist/validator.d.ts +15 -12
  348. package/dist/validator.js +5 -5
  349. package/dist/yaml.d.ts +22 -7
  350. package/dist/yaml.js +9 -321
  351. package/package.json +9 -9
  352. package/dist/catalogs-D-yyQWCQ.d.ts +0 -1343
  353. package/dist/catalogs.d.ts +0 -2
  354. package/dist/catalogs.js +0 -2
  355. package/dist/chunk-PIQXLBBJ.js +0 -445
  356. package/dist/chunk-S5W34SIJ.js +0 -1
  357. package/dist/previews.d.ts +0 -40
  358. package/dist/previews.js +0 -1
  359. package/dist/schemas-DDpqAgyS.d.ts +0 -284
  360. package/dist/spec/catalogs/layouts/image-bleed.json +0 -20
package/README.md CHANGED
@@ -29,14 +29,8 @@ Requires Node 22 or later (`engines.node` `>=22`) from the release after 0.12.1.
29
29
  Use the common root API for most application code:
30
30
 
31
31
  ```ts
32
- import {
33
- presentation,
34
- audiences,
35
- tones,
36
- catalogs,
37
- validate,
38
- validateCatalogRecord,
39
- } from "@openpresentation/opf";
32
+ import { presentation, validate, embed } from "@openpresentation/opf";
33
+ import { defaultCatalog } from "@openpresentation/opf/catalog";
40
34
 
41
35
  import type { Presentation } from "@openpresentation/opf";
42
36
 
@@ -46,34 +40,32 @@ const deck: Presentation = {
46
40
  };
47
41
 
48
42
  console.log(presentation.$id);
49
- console.log(validate(deck).valid);
50
- console.log(validateCatalogRecord("tones", tones[0]).valid);
51
- console.log(audiences.map((audience) => audience.id));
52
- console.log(Object.keys(catalogs));
43
+ // Register the catalogs your host trusts; core itself ships no records in its main entry.
44
+ const catalogs = [defaultCatalog];
45
+ console.log(validate({ ...deck, design: { theme: "classic" } }, { catalogs }).valid);
46
+ // Save with every record the deck uses embedded, so it renders the same with no catalog registered.
47
+ const saved = embed({ ...deck, design: { theme: "classic" } }, { catalogs }).document;
48
+ console.log(Object.keys(saved.catalogs.default.themes)); // ["classic"]
49
+ console.log(Object.keys(defaultCatalog.tones));
53
50
  ```
54
51
 
55
52
  Use focused imports when you only need one surface:
56
53
 
57
54
  ```ts
58
55
  import { presentation, audience } from "@openpresentation/opf/schemas";
59
- import { audiences, tones } from "@openpresentation/opf/catalogs";
56
+ import { defaultCatalog, catalogDisplay, layoutPreviews, getLayoutPreview, hasLayoutPreview } from "@openpresentation/opf/catalog";
60
57
  import { specFileEntries } from "@openpresentation/opf/spec-files";
61
58
  import { validate, assertValid, validationRules } from "@openpresentation/opf/validator";
62
- import {
63
- layoutPreviews,
64
- getLayoutPreview,
65
- hasLayoutPreview,
66
- } from "@openpresentation/opf/previews";
67
59
  import type { Presentation, Audience, Tone } from "@openpresentation/opf/types";
68
60
  ```
69
61
 
70
- The root entry holds the application-level API: schemas, catalogs, validation, variables, pagination, data helpers, font policy, `stats` and `resolveSlideContext`. Prefer the focused subpaths above when a package consumer only needs one surface, so the root bundle's full catalog/schema payload is not loaded unnecessarily.
62
+ The root entry holds the application-level API: schemas, catalog references and their resolution (`resolveReference`, `embed`, `copySlides`, `updateFromCatalog`), validation, variables, pagination, data helpers, font policy, `stats` and `resolveSlideContext`. It carries no catalog records: the pinned pptx.gallery snapshot is the opt-in `@openpresentation/opf/catalog` (`defaultCatalog`, display metadata and layout previews), and every entry point that resolves references takes `{ catalogs }`, the catalogs the host registered; the first one is the default for documents that omit `catalogs.default`. See [catalogs and the default catalog](../../docs/default-catalog.md).
71
63
 
72
64
  The layout engine's names are not on the root. `composeSlide`, `fitText`, `layoutQuote` and the other `layoutX`/`fitX` functions, numbering, footnotes and citations, colour contrast, code syntax, pattern fills, metric trends, chart options, script fonts and text direction come from `@openpresentation/opf/composition`; the symbol-font tables come from `@openpresentation/opf/symbol-font-encodings`.
73
65
 
74
66
  ### Facts, slide context and the fonts handle
75
67
 
76
- `stats(presentation, options?)` reports neutral facts about a deck (structure, words, notes, images, charts, tables, datasets, citations, variables, assets, fonts) without composing, measuring or validating; see [the stats guide](../../docs/stats.md). `resolveSlideContext(presentation, index, { fonts })` resolves one slide's canvas, layout, theme and font families (slide design, then deck design, then theme, then the default font scheme) into the `ComposeSlideOptions` that `composeSlide` takes, with `unresolved-font-scheme`, `unresolved-layout` and `unresolved-theme` diagnostics. Deck-level verbs take `{ fonts }`, a handle whose `textMeasurement` is how wide the host's real fonts draw text (`paginate(deck, { fonts })`); the renderer's font loader returns a richer handle that extends it. `composeSlide` itself is engine-level and takes `textMeasurement` and `fontFamilies` (`{ heading, body, code, accent? }`) directly.
68
+ `stats(presentation, options?)` reports neutral facts about a deck (structure, words, notes, images, charts, tables, datasets, citations, variables, assets, fonts) without composing, measuring or validating; see [the stats guide](../../docs/stats.md). `resolveSlideContext(presentation, index, { fonts, catalogs })` resolves one slide's canvas, layout, theme and font families (slide design, then deck design, then theme, then the engine defaults) into the `ComposeSlideOptions` that `composeSlide` takes, with one `unresolved-reference` diagnostic per reference that resolves nowhere (`strictReferences: true` throws `OPFUnresolvedReferenceError` instead). Deck-level verbs take `{ fonts }`, a handle whose `textMeasurement` is how wide the host's real fonts draw text (`paginate(deck, { fonts })`); the renderer's font loader returns a richer handle that extends it. `composeSlide` itself is engine-level and takes `textMeasurement` and `fontFamilies` (`{ heading, body, code, accent? }`) directly.
77
69
 
78
70
  ### Content conversions
79
71
 
@@ -83,13 +75,17 @@ The layout engine's names are not on the root. `composeSlide`, `fitText`, `layou
83
75
 
84
76
  `@openpresentation/opf/markdown` reads and writes a deck as Markdown in a small documented dialect (YAML front matter, `---` between slides, `#` title, `##` subtitle, lists, quotes, tables, images, `chart`, `metric` and `timeline` fences, `Note:` speaker notes). `fromMarkdown(markdown, { split, defaults, validate })` returns `{ presentation, valid, findings, counts }` with findings (the shared `Finding` format) that carry the line and column of the Markdown; `toMarkdown(presentation, { unsupported })` writes any valid deck, embedding what the dialect has no syntax for as YAML (or dropping it into `report.loss`), and the Markdown it writes converts back to the same deck. Deterministic and offline. Reads front matter with the `yaml` package. See the [Markdown guide](../../docs/markdown.md). Not in releases before the one that lists it in the changelog.
85
77
 
78
+ ### Reading and writing a deck in any form
79
+
80
+ `readDeck(text, { format, filename, catalogs, validate })` and `writeDeck(presentation, { format | filename })` (the root and `@openpresentation/opf/deck`) read and write a deck as JSON (canonical), YAML or Markdown. The format is the `format` option, else the file name (`.opf.md` is Markdown, `.yaml` and `.yml` are YAML, anything else JSON; a plain `.md` is not a deck), and never the content. `readDeck` returns `{ presentation, format, valid, findings, counts, schemaValid, checks }`: the `validate` report of the deck, with every finding located in the text that was read (`opf/json-syntax`, `yaml/<rule>` or `markdown/<rule>` for syntax errors) and no exception for malformed content. It runs in a browser.
81
+
86
82
  ### OPF as YAML
87
83
 
88
84
  `@openpresentation/opf/yaml` reads and writes a deck as YAML, the authoring form of the same data (JSON stays canonical). `fromYaml(text, { aliases, validate })` reads strict JSON-compatible YAML 1.2 (one document, a mapping at the root, no custom tags, duplicate keys or non-finite numbers; anchors, aliases and merge keys only with `aliases: true`) and returns `{ presentation, valid, findings, counts, schemaValid, checks }`: the `validate` report of the deck, with every finding (the shared `Finding` format, YAML syntax errors as `yaml/<rule>` findings) located at the line and column of the YAML. `toYaml(presentation, { schemaComment })` writes canonical YAML (schema key order, block style, ambiguous strings quoted) that reads back to the same deck, and throws `OPFYamlError` for an invalid one. `parseYamlData` and `scanYamlComments` are the helpers. See [the YAML guide](../../docs/yaml.md).
89
85
 
90
86
  ### Validate (0.14.0)
91
87
 
92
- `validate(input, options?)` is the one checker, from the root and from `@openpresentation/opf/validator`. `input` is a parsed presentation or strict JSON text; the result is a `ValidationReport` whose `findings` (the shared `Finding` format, `spec/schemas/finding.schema.json`) each have a stable `opf/<rule>` id, a severity and one of six categories: `format` (JSON syntax, duplicate keys, schema), `references` (catalog ids, assets, citations, datasets), `policy` (host `contracts`), `accessibility` (contrast, alt text, reading order, links), `layout` (overflow, type size, image resolution, fonts) and `content` (placeholders, empty slides, non-numeric chart cells). `valid` means no finding has severity `error`, which by default only `format`, `references` and `policy` findings can have. Text input adds line and column; `only`, `ignore` and `severity` pick and promote rules or categories; composition is lazy, so `validate(deck, { only: ["format"] })` costs what a schema check costs. Read-only and deterministic: no remote resources are fetched. See [the validate guide](../../docs/validate.md). A clean report does not certify layout, fonts, or native export fidelity.
88
+ `validate(input, options?)` is the one checker, from the root and from `@openpresentation/opf/validator`. `input` is a parsed presentation or strict JSON text; the result is a `ValidationReport` whose `findings` (the shared `Finding` format, `spec/schemas/finding.schema.json`) each have a stable `opf/<rule>` id, a severity and one of six categories: `format` (JSON syntax, duplicate keys, schema), `references` (catalog references, assets, citations, datasets), `policy` (host `contracts`), `accessibility` (contrast, alt text, reading order, links), `layout` (overflow, type size, image resolution, fonts) and `content` (placeholders, empty slides, non-numeric chart cells). `valid` means no finding has severity `error`, which by default only `format`, `references` and `policy` findings can have. Text input adds line and column; `only`, `ignore` and `severity` pick and promote rules or categories; composition is lazy, so `validate(deck, { only: ["format"] })` costs what a schema check costs. Read-only and deterministic: no remote resources are fetched. See [the validate guide](../../docs/validate.md). A clean report does not certify layout, fonts, or native export fidelity.
93
89
 
94
90
  ### Patch, diff, merge and format (0.12.0)
95
91
 
@@ -97,14 +93,14 @@ Added in 0.12.0 (not in 0.11.4 or earlier): `@openpresentation/opf/patch` is the
97
93
 
98
94
  ### Layout previews
99
95
 
100
- `@openpresentation/opf/previews` ships pre-rendered HTML thumbnails for the
96
+ `@openpresentation/opf/catalog` ships pre-rendered HTML thumbnails for the
101
97
  slide layouts catalogued at pptx.gallery. Each preview is a Tailwind-styled
102
98
  fragment sized to fill a 16:9 container and only depends on the standard
103
99
  `--background`, `--foreground`, `--card`, `--muted`, `--muted-foreground`,
104
100
  `--accent`, and `--border` CSS variables.
105
101
 
106
102
  ```tsx
107
- import { getLayoutPreview } from "@openpresentation/opf/previews";
103
+ import { getLayoutPreview } from "@openpresentation/opf/catalog";
108
104
 
109
105
  export function LayoutThumbnail({ slug }: { slug: string }) {
110
106
  const html = getLayoutPreview(slug);
@@ -179,14 +175,13 @@ console.log(repoReadme.split("\n").slice(0, 3).join("\n"));
179
175
 
180
176
  Validation reports carry `findings`. A finding with severity `error` is a
181
177
  structural problem that makes `valid` false; `warning` and `info` findings are
182
- advisory, such as an unknown catalog id in `narrative`, `design`, or a chart
183
- `type` reference (`opf/catalog-reference`) or a missing alt text. An id that a
184
- matching inline `catalogs.<kind>.records[]` entry defines is known, and a custom
185
- `catalogs.<kind>.source` exempts that kind's ids from unknown-id warnings
186
- unless the host loads the source's records and passes them as `catalogs`.
178
+ advisory, such as a `narrative`, `design` or `layout` reference that resolves
179
+ nowhere (`opf/unresolved-reference`) or a missing alt text. A reference resolves
180
+ in the records the document embeds (`catalogs.custom`, `catalogs.default`, named
181
+ groups), then in the catalogs the host registered with `{ catalogs }`.
187
182
 
188
183
  ```ts
189
- const report = validate(deck);
184
+ const report = validate(deck, { catalogs: [defaultCatalog] });
190
185
  if (!report.valid) console.error(report.findings.filter((finding) => finding.severity === "error"));
191
186
  for (const finding of report.findings) console.warn(finding.ruleId, finding.path, finding.message);
192
187
  ```
@@ -221,16 +216,11 @@ const openApi = specFileEntries.find((entry) => entry.path === "openapi.yaml");
221
216
  console.log(openApi?.packagePath);
222
217
  ```
223
218
 
224
- Package-addressable catalog paths can be used by OPF catalog resolvers:
219
+ The snapshot's raw record files stay package-addressable (`@openpresentation/opf/spec/catalogs/<kind>/<id>.json`) for tools that read published records; documents never point at them. A host registers the catalog instead:
225
220
 
226
- ```json
227
- {
228
- "catalogs": {
229
- "narratives": {
230
- "source": "pkg:@openpresentation/opf/spec/catalogs/narratives"
231
- }
232
- }
233
- }
221
+ ```js
222
+ import { defaultCatalog } from "@openpresentation/opf/catalog";
223
+ validate(deck, { catalogs: [defaultCatalog] });
234
224
  ```
235
225
 
236
226
  ## Development
@@ -0,0 +1,128 @@
1
+ /**
2
+ * OPF 0.15 content references and their one resolution rule (FA-20). Catalog-free: this module reads the document's
3
+ * own `catalogs` groups and the catalogs a host registers, never any bundled data, and it never fetches.
4
+ *
5
+ * A reference is a bare `id` or `name:id`. A bare id resolves in `catalogs.custom`, then in the records embedded
6
+ * under `catalogs.default`, then in the registered catalog for `default.source` (the first registered catalog when
7
+ * the document omits `default`; nothing when `default` is false). `name:id` resolves in `catalogs.<name>`, then in
8
+ * the registered catalog for its source. A reference written inside an embedded record resolves in that record's
9
+ * own group first.
10
+ */
11
+ /** The content kinds a catalog group holds, keyed by id. */
12
+ declare const catalogKinds: readonly ["layouts", "themes", "colorSchemes", "fontSchemes", "narratives", "audiences", "purposes", "tones"];
13
+ type CatalogKind = (typeof catalogKinds)[number];
14
+ /** A content reference: a bare id or `name:id`. */
15
+ declare const CATALOG_REFERENCE_PATTERN: RegExp;
16
+ /** A catalog group name. `default` and `custom` are reserved. */
17
+ declare const CATALOG_GROUP_PATTERN: RegExp;
18
+ /** Records of one kind, keyed by id. */
19
+ type CatalogRecordMap = Readonly<Record<string, Readonly<Record<string, unknown>>>>;
20
+ /** A catalog's records by kind, then by id: the shape of a document's `catalogs.<group>` without `source`. */
21
+ type CatalogRecords = {
22
+ readonly [K in CatalogKind]?: CatalogRecordMap;
23
+ };
24
+ /** A catalog a host registers. `source` is matched against `catalogs.<group>.source`. */
25
+ interface Catalog extends CatalogRecords {
26
+ /** The catalog's identity: an HTTPS URL or a `pkg:` reference. Never fetched. */
27
+ readonly source: string;
28
+ }
29
+ /** The one option every entry point that resolves references accepts. */
30
+ interface CatalogOptions {
31
+ /**
32
+ * Catalogs the host registered, matched by `source`. The first is the host default: bare ids use it when the
33
+ * document omits `catalogs.default`. Omitted or empty: only the records the document embeds resolve.
34
+ */
35
+ catalogs?: readonly Catalog[];
36
+ }
37
+ /** A reference that resolved. */
38
+ interface ResolvedReference {
39
+ kind: CatalogKind;
40
+ /** The reference as written. */
41
+ reference: string;
42
+ /** The record's key. */
43
+ id: string;
44
+ /** The group it resolved in: `custom`, `default` or a named group. */
45
+ group: string;
46
+ /** That group's source (the host default's source for an omitted `default`). */
47
+ source?: string;
48
+ /** `document` when the record is embedded, `host` when it came from a registered catalog. */
49
+ origin: 'document' | 'host';
50
+ record: Record<string, unknown>;
51
+ }
52
+ /**
53
+ * Where a resolved record came from, without the record itself: what an engine records as provenance
54
+ * (`resolveSlideContext().resolved.provenance`, `resolveDesignRecords().provenance`).
55
+ */
56
+ type RecordProvenance = Omit<ResolvedReference, 'record'>;
57
+ /** Reported when a reference resolves nowhere. Never thrown, except under `strictReferences`. */
58
+ interface UnresolvedReferenceDiagnostic {
59
+ code: 'unresolved-reference';
60
+ kind: CatalogKind;
61
+ /** The reference as written, such as `acme:hero`. */
62
+ reference: string;
63
+ /** Where it is written, dotted: `slides.3.layout`, `design.theme`, `catalogs.acme.themes.brand.colorScheme`. */
64
+ path: string;
65
+ /** The group the reference names: its prefix, or `default` for a bare id. */
66
+ group: string;
67
+ /** That group's source, when one is known. */
68
+ source?: string;
69
+ /** What the engine uses instead: automatic composition (layouts) or the engine default record. */
70
+ fallback: 'automatic' | 'engine-default';
71
+ message: string;
72
+ }
73
+ /** Thrown by `resolveSlideContext` and `paginate` under `strictReferences` when a reference resolves nowhere. */
74
+ /**
75
+ * Thrown by every entry point that takes the `catalogs` option when it is not an array of registered catalogs
76
+ * (`{ source: string, <kind>: { <id>: record } }` with known kinds). `code` is always `invalid-catalogs`.
77
+ */
78
+ declare class OPFCatalogsOptionError extends TypeError {
79
+ readonly code = "invalid-catalogs";
80
+ constructor(entry: string, detail: string);
81
+ }
82
+ declare class OPFUnresolvedReferenceError extends Error {
83
+ readonly diagnostics: UnresolvedReferenceDiagnostic[];
84
+ constructor(diagnostics: UnresolvedReferenceDiagnostic[]);
85
+ }
86
+ /** Split a reference into its group prefix and id; undefined for anything that is not a reference. */
87
+ declare function parseReference(reference: unknown): {
88
+ group?: string;
89
+ id: string;
90
+ } | undefined;
91
+ /**
92
+ * The source of group `name` as resolution uses it: the group's own `source`, or for an omitted (or source-less)
93
+ * `default` the first registered catalog's source. Undefined for `custom`, for `default: false` and for an
94
+ * undeclared named group.
95
+ */
96
+ declare function catalogGroupSource(document: unknown, name: string, options?: CatalogOptions): string | undefined;
97
+ /**
98
+ * Resolve one reference. `group` is the group of the record the reference is written in, which is searched first.
99
+ * Undefined when the reference is malformed, names an undeclared group or resolves nowhere.
100
+ */
101
+ declare function resolveReference(document: unknown, kind: CatalogKind, reference: unknown, options?: CatalogOptions & {
102
+ group?: string;
103
+ }): ResolvedReference | undefined;
104
+ /** The diagnostic for a reference that resolves nowhere, naming the reference and the source it was looked for in. */
105
+ declare function unresolvedReference(document: unknown, kind: CatalogKind, reference: string, path: string, options?: CatalogOptions): UnresolvedReferenceDiagnostic;
106
+ /** One place a document writes a content reference. */
107
+ interface CatalogReferenceSite {
108
+ kind: CatalogKind;
109
+ /** The reference as written. */
110
+ reference: string;
111
+ /** JSON Pointer segments of the string. */
112
+ path: readonly (string | number)[];
113
+ /** For a reference written inside an embedded record: that record's group, searched first. */
114
+ group?: string;
115
+ }
116
+ /**
117
+ * Every content reference a document writes, in document order: the root narrative, audience, purpose and tone, the
118
+ * language's font schemes, the deck and slide designs, each slide's layout, and (with `records`) the references
119
+ * inside embedded records. Free-form audience and purpose text is not a reference and is not listed.
120
+ */
121
+ declare function catalogReferenceSites(document: unknown, options?: {
122
+ records?: boolean;
123
+ slides?: boolean;
124
+ }): CatalogReferenceSite[];
125
+ /** Records a picker can offer for `kind`: the document's embedded records, then those of the registered catalogs its groups name, with the reference to write for each. */
126
+ declare function catalogRecords(document: unknown, kind: CatalogKind, options?: CatalogOptions): ResolvedReference[];
127
+
128
+ export { type Catalog as C, OPFCatalogsOptionError as O, type RecordProvenance as R, type UnresolvedReferenceDiagnostic as U, type CatalogKind as a, type CatalogOptions as b, CATALOG_GROUP_PATTERN as c, CATALOG_REFERENCE_PATTERN as d, type CatalogRecordMap as e, type CatalogRecords as f, type CatalogReferenceSite as g, OPFUnresolvedReferenceError as h, type ResolvedReference as i, catalogGroupSource as j, catalogKinds as k, catalogRecords as l, catalogReferenceSites as m, parseReference as p, resolveReference as r, unresolvedReference as u };
@@ -0,0 +1,12 @@
1
+ import { a as CatalogKind } from './catalog-refs-_anZs-Qz.js';
2
+ import { SchemaName } from './schemas.js';
3
+
4
+ /** Kinds of catalog display metadata: published by catalogs for pickers, never referenced by documents. */
5
+ declare const catalogDisplayKinds: readonly ["chartTypes", "languages", "socialPlatforms"];
6
+ type CatalogDisplayKind = (typeof catalogDisplayKinds)[number];
7
+ /** Every kind of record a catalog publishes: the content kinds documents reference, and the display kinds. */
8
+ type CatalogRecordKind = CatalogKind | CatalogDisplayKind;
9
+ /** The companion schema each catalog record kind validates against. */
10
+ declare const catalogSchemaNames: Readonly<Record<CatalogRecordKind, SchemaName>>;
11
+
12
+ export { type CatalogDisplayKind as C, type CatalogRecordKind as a, catalogSchemaNames as b, catalogDisplayKinds as c };
@@ -0,0 +1,91 @@
1
+ import { C as Catalog } from './catalog-refs-_anZs-Qz.js';
2
+ import { C as CatalogDisplayKind } from './catalog-schemas-BZCjgAxu.js';
3
+ import './schemas.js';
4
+ import './json-BFSdESOE.js';
5
+
6
+ /** A lightweight summary entry inside a catalog's `index.json`. */
7
+ interface CatalogIndexRecord {
8
+ readonly id: string;
9
+ readonly name: string;
10
+ readonly file: string;
11
+ readonly [key: string]: unknown;
12
+ }
13
+ /** Parsed shape of a catalog's `index.json`. */
14
+ interface CatalogIndex {
15
+ readonly $schema: string;
16
+ /** Catalog kind as its default-catalog URL segment, e.g. `chart-types`. */
17
+ readonly kind?: string;
18
+ readonly version: string;
19
+ readonly description: string;
20
+ /** SHA-256 of the canonical JSON of the index-ordered records (see docs/default-catalog.md). */
21
+ readonly contentSha256?: string;
22
+ readonly records: readonly CatalogIndexRecord[];
23
+ readonly [key: string]: unknown;
24
+ }
25
+
26
+ interface LayoutPreviewRecord {
27
+ /** Layout slug — matches `spec/catalogs/layouts/<id>.json` when available, and otherwise the pptx.gallery extended catalog. */
28
+ id: string;
29
+ /** Filename relative to `spec/previews/layouts/`. */
30
+ file: string;
31
+ /** UTF-8 byte length of the HTML. */
32
+ bytes: number;
33
+ }
34
+ interface LayoutPreviewIndex {
35
+ $schema: string;
36
+ version: string;
37
+ description: string;
38
+ records: readonly LayoutPreviewRecord[];
39
+ }
40
+ /**
41
+ * Static HTML for a given layout preview. Each snippet is a self-contained
42
+ * Tailwind-styled fragment intended to fill a 16:9 thumbnail container.
43
+ *
44
+ * The CSS variables used by the snippets are:
45
+ * --background, --foreground, --card, --muted, --muted-foreground,
46
+ * --accent, --border
47
+ *
48
+ * Consumers should apply these on a parent element (or import the
49
+ * pptx.gallery design tokens).
50
+ */
51
+ declare const layoutPreviews: Readonly<Record<string, string>>;
52
+ /** Catalog index — the list of available preview slugs and metadata. */
53
+ declare const layoutPreviewIndex: LayoutPreviewIndex;
54
+ /** Slugs of every layout that ships an HTML preview, sorted alphabetically. */
55
+ declare const layoutPreviewSlugs: readonly string[];
56
+ /** Whether an HTML preview exists for the given slug. */
57
+ declare function hasLayoutPreview(slug: string): boolean;
58
+ /**
59
+ * Look up the HTML preview for a layout slug. Returns `undefined` for slugs
60
+ * with no shipped preview — callers should fall back to a generic renderer in
61
+ * that case. Exported from `@openpresentation/opf/catalog`.
62
+ */
63
+ declare function getLayoutPreview(slug: string): string | undefined;
64
+
65
+ /**
66
+ * `@openpresentation/opf/catalog`: the pinned snapshot of the default catalog pptx.gallery publishes (spec/catalogs,
67
+ * pinned by spec/catalogs/manifest.json), shaped for hosts to register. The only entry of the package that carries
68
+ * catalog data; the root and every other subpath resolve only what a document embeds and what a host registers.
69
+ *
70
+ * ```js
71
+ * import { defaultCatalog } from '@openpresentation/opf/catalog';
72
+ * validate(document, { catalogs: [defaultCatalog] });
73
+ * ```
74
+ */
75
+
76
+ /** The source the default catalog is registered under, and the `source` of a document's `catalogs.default`. */
77
+ declare const DEFAULT_CATALOG_SOURCE = "https://www.pptx.gallery";
78
+ /**
79
+ * The default catalog: every content record of the snapshot, by kind and then by id, with no `$schema` or `id` (the
80
+ * key is the id). Register it with every entry point that resolves references: `{ catalogs: [defaultCatalog] }`.
81
+ */
82
+ declare const defaultCatalog: Catalog;
83
+ /**
84
+ * Display metadata for pickers: chart types, languages and social platforms by id. Documents never reference these
85
+ * records; chart.type, the language tag and Socials keys are engine vocabularies.
86
+ */
87
+ declare const catalogDisplay: Readonly<Record<CatalogDisplayKind, Readonly<Record<string, Readonly<Record<string, unknown>>>>>>;
88
+ /** Each kind's `index.json` in the snapshot: the record summaries and their content hash. */
89
+ declare const catalogIndexes: Readonly<Record<string, CatalogIndex>>;
90
+
91
+ export { type CatalogIndex, type CatalogIndexRecord, DEFAULT_CATALOG_SOURCE, type LayoutPreviewIndex, type LayoutPreviewRecord, catalogDisplay, catalogIndexes, defaultCatalog, getLayoutPreview, hasLayoutPreview, layoutPreviewIndex, layoutPreviewSlugs, layoutPreviews };