@bendyline/squisq 1.2.2 → 1.4.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 (427) hide show
  1. package/dist/{Doc-BfBhiCNr.d.ts → Doc-BeSeH2iX.d.ts} +141 -33
  2. package/dist/ImageEditDoc-BTIvw0oq.d.ts +84 -0
  3. package/dist/__tests__/colorUtils.test.d.ts +2 -0
  4. package/dist/__tests__/colorUtils.test.d.ts.map +1 -0
  5. package/dist/__tests__/colorUtils.test.js +94 -0
  6. package/dist/__tests__/colorUtils.test.js.map +1 -0
  7. package/dist/__tests__/getLayers.test.js +31 -7
  8. package/dist/__tests__/getLayers.test.js.map +1 -1
  9. package/dist/__tests__/iconResolve.test.d.ts +2 -0
  10. package/dist/__tests__/iconResolve.test.d.ts.map +1 -0
  11. package/dist/__tests__/iconResolve.test.js +99 -0
  12. package/dist/__tests__/iconResolve.test.js.map +1 -0
  13. package/dist/__tests__/imageEditState.test.d.ts +2 -0
  14. package/dist/__tests__/imageEditState.test.d.ts.map +1 -0
  15. package/dist/__tests__/imageEditState.test.js +61 -0
  16. package/dist/__tests__/imageEditState.test.js.map +1 -0
  17. package/dist/__tests__/imageEditVersions.test.d.ts +2 -0
  18. package/dist/__tests__/imageEditVersions.test.d.ts.map +1 -0
  19. package/dist/__tests__/imageEditVersions.test.js +141 -0
  20. package/dist/__tests__/imageEditVersions.test.js.map +1 -0
  21. package/dist/__tests__/inferDocumentTitle.test.d.ts +2 -0
  22. package/dist/__tests__/inferDocumentTitle.test.d.ts.map +1 -0
  23. package/dist/__tests__/inferDocumentTitle.test.js +42 -0
  24. package/dist/__tests__/inferDocumentTitle.test.js.map +1 -0
  25. package/dist/__tests__/jsonForm.chooseControl.test.d.ts +2 -0
  26. package/dist/__tests__/jsonForm.chooseControl.test.d.ts.map +1 -0
  27. package/dist/__tests__/jsonForm.chooseControl.test.js +74 -0
  28. package/dist/__tests__/jsonForm.chooseControl.test.js.map +1 -0
  29. package/dist/__tests__/jsonForm.evaluateWhen.test.d.ts +2 -0
  30. package/dist/__tests__/jsonForm.evaluateWhen.test.d.ts.map +1 -0
  31. package/dist/__tests__/jsonForm.evaluateWhen.test.js +51 -0
  32. package/dist/__tests__/jsonForm.evaluateWhen.test.js.map +1 -0
  33. package/dist/__tests__/jsonForm.inferSchema.test.d.ts +2 -0
  34. package/dist/__tests__/jsonForm.inferSchema.test.d.ts.map +1 -0
  35. package/dist/__tests__/jsonForm.inferSchema.test.js +23 -0
  36. package/dist/__tests__/jsonForm.inferSchema.test.js.map +1 -0
  37. package/dist/__tests__/jsonForm.pointer.test.d.ts +2 -0
  38. package/dist/__tests__/jsonForm.pointer.test.d.ts.map +1 -0
  39. package/dist/__tests__/jsonForm.pointer.test.js +94 -0
  40. package/dist/__tests__/jsonForm.pointer.test.js.map +1 -0
  41. package/dist/__tests__/markdown.test.js +40 -0
  42. package/dist/__tests__/markdown.test.js.map +1 -1
  43. package/dist/__tests__/markdownIcons.test.d.ts +2 -0
  44. package/dist/__tests__/markdownIcons.test.d.ts.map +1 -0
  45. package/dist/__tests__/markdownIcons.test.js +93 -0
  46. package/dist/__tests__/markdownIcons.test.js.map +1 -0
  47. package/dist/__tests__/markdownToDoc.test.js +15 -4
  48. package/dist/__tests__/markdownToDoc.test.js.map +1 -1
  49. package/dist/__tests__/recommendTemplates.test.d.ts +2 -0
  50. package/dist/__tests__/recommendTemplates.test.d.ts.map +1 -0
  51. package/dist/__tests__/recommendTemplates.test.js +158 -0
  52. package/dist/__tests__/recommendTemplates.test.js.map +1 -0
  53. package/dist/__tests__/scopedContentContainer.test.d.ts +2 -0
  54. package/dist/__tests__/scopedContentContainer.test.d.ts.map +1 -0
  55. package/dist/__tests__/scopedContentContainer.test.js +74 -0
  56. package/dist/__tests__/scopedContentContainer.test.js.map +1 -0
  57. package/dist/__tests__/slideshowGenerator.test.js +1 -1
  58. package/dist/__tests__/slideshowGenerator.test.js.map +1 -1
  59. package/dist/__tests__/surface.test.d.ts +2 -0
  60. package/dist/__tests__/surface.test.d.ts.map +1 -0
  61. package/dist/__tests__/surface.test.js +57 -0
  62. package/dist/__tests__/surface.test.js.map +1 -0
  63. package/dist/__tests__/templateAnnotationParse.test.d.ts +2 -0
  64. package/dist/__tests__/templateAnnotationParse.test.d.ts.map +1 -0
  65. package/dist/__tests__/templateAnnotationParse.test.js +42 -0
  66. package/dist/__tests__/templateAnnotationParse.test.js.map +1 -0
  67. package/dist/__tests__/templates.test.js +90 -9
  68. package/dist/__tests__/templates.test.js.map +1 -1
  69. package/dist/__tests__/themeCompile.test.d.ts +2 -0
  70. package/dist/__tests__/themeCompile.test.d.ts.map +1 -0
  71. package/dist/__tests__/themeCompile.test.js +134 -0
  72. package/dist/__tests__/themeCompile.test.js.map +1 -0
  73. package/dist/__tests__/themeValidator.test.d.ts +2 -0
  74. package/dist/__tests__/themeValidator.test.d.ts.map +1 -0
  75. package/dist/__tests__/themeValidator.test.js +107 -0
  76. package/dist/__tests__/themeValidator.test.js.map +1 -0
  77. package/dist/__tests__/versions.test.d.ts +2 -0
  78. package/dist/__tests__/versions.test.d.ts.map +1 -0
  79. package/dist/__tests__/versions.test.js +339 -0
  80. package/dist/__tests__/versions.test.js.map +1 -0
  81. package/dist/{chunk-CYQHG27J.js → chunk-2TMAWB4Y.js} +74 -1
  82. package/dist/chunk-2TMAWB4Y.js.map +1 -0
  83. package/dist/{chunk-LAZELBON.js → chunk-3K5OG6KI.js} +165 -17
  84. package/dist/chunk-3K5OG6KI.js.map +1 -0
  85. package/dist/chunk-57CVQCFX.js +193 -0
  86. package/dist/chunk-57CVQCFX.js.map +1 -0
  87. package/dist/{chunk-QM5PKNPW.js → chunk-5WFRKURX.js} +1 -1
  88. package/dist/chunk-5WFRKURX.js.map +1 -0
  89. package/dist/chunk-B4EEON3N.js +1317 -0
  90. package/dist/chunk-B4EEON3N.js.map +1 -0
  91. package/dist/chunk-DBS6RIFL.js +81 -0
  92. package/dist/chunk-DBS6RIFL.js.map +1 -0
  93. package/dist/{chunk-MIBRIRGJ.js → chunk-FR2RBTKO.js} +3 -3
  94. package/dist/{chunk-MIBRIRGJ.js.map → chunk-FR2RBTKO.js.map} +1 -1
  95. package/dist/chunk-H3AXU4MJ.js +179 -0
  96. package/dist/chunk-H3AXU4MJ.js.map +1 -0
  97. package/dist/chunk-JELIRVDP.js +24 -0
  98. package/dist/chunk-JELIRVDP.js.map +1 -0
  99. package/dist/chunk-K32VJONL.js +193 -0
  100. package/dist/chunk-K32VJONL.js.map +1 -0
  101. package/dist/{chunk-GAQLMORN.js → chunk-KSWJR66U.js} +248 -44
  102. package/dist/chunk-KSWJR66U.js.map +1 -0
  103. package/dist/{chunk-TSG2OSE6.js → chunk-MYIH7FWD.js} +3 -3
  104. package/dist/chunk-MYIH7FWD.js.map +1 -0
  105. package/dist/chunk-VLJJHDAC.js +218 -0
  106. package/dist/chunk-VLJJHDAC.js.map +1 -0
  107. package/dist/chunk-WMOI7FN3.js +182 -0
  108. package/dist/chunk-WMOI7FN3.js.map +1 -0
  109. package/dist/chunk-ZTX4PFFT.js +520 -0
  110. package/dist/chunk-ZTX4PFFT.js.map +1 -0
  111. package/dist/doc/audioMapping.d.ts.map +1 -1
  112. package/dist/doc/audioMapping.js +80 -9
  113. package/dist/doc/audioMapping.js.map +1 -1
  114. package/dist/doc/getLayers.d.ts.map +1 -1
  115. package/dist/doc/getLayers.js +29 -18
  116. package/dist/doc/getLayers.js.map +1 -1
  117. package/dist/doc/markdownToDoc.d.ts.map +1 -1
  118. package/dist/doc/markdownToDoc.js +40 -6
  119. package/dist/doc/markdownToDoc.js.map +1 -1
  120. package/dist/doc/templates/featureBlock.d.ts +18 -0
  121. package/dist/doc/templates/featureBlock.d.ts.map +1 -0
  122. package/dist/doc/templates/featureBlock.js +180 -0
  123. package/dist/doc/templates/featureBlock.js.map +1 -0
  124. package/dist/doc/templates/fullBleedQuote.d.ts +12 -0
  125. package/dist/doc/templates/fullBleedQuote.d.ts.map +1 -1
  126. package/dist/doc/templates/fullBleedQuote.js +12 -0
  127. package/dist/doc/templates/fullBleedQuote.js.map +1 -1
  128. package/dist/doc/templates/index.d.ts +28 -4
  129. package/dist/doc/templates/index.d.ts.map +1 -1
  130. package/dist/doc/templates/index.js +45 -12
  131. package/dist/doc/templates/index.js.map +1 -1
  132. package/dist/doc/templates/listBlock.d.ts.map +1 -1
  133. package/dist/doc/templates/listBlock.js +22 -5
  134. package/dist/doc/templates/listBlock.js.map +1 -1
  135. package/dist/doc/templates/statHighlight.d.ts +12 -0
  136. package/dist/doc/templates/statHighlight.d.ts.map +1 -1
  137. package/dist/doc/templates/statHighlight.js +12 -0
  138. package/dist/doc/templates/statHighlight.js.map +1 -1
  139. package/dist/doc/templates/titleBlock.d.ts +11 -0
  140. package/dist/doc/templates/titleBlock.d.ts.map +1 -1
  141. package/dist/doc/templates/titleBlock.js +8 -0
  142. package/dist/doc/templates/titleBlock.js.map +1 -1
  143. package/dist/doc/utils/themeUtils.d.ts +4 -4
  144. package/dist/doc/utils/themeUtils.d.ts.map +1 -1
  145. package/dist/doc/utils/themeUtils.js +8 -7
  146. package/dist/doc/utils/themeUtils.js.map +1 -1
  147. package/dist/generate/slideshowGenerator.js +1 -1
  148. package/dist/generate/slideshowGenerator.js.map +1 -1
  149. package/dist/generate/templateMapper.js +2 -2
  150. package/dist/generate/templateMapper.js.map +1 -1
  151. package/dist/icons/iconData.d.ts +26 -0
  152. package/dist/icons/iconData.d.ts.map +1 -0
  153. package/dist/icons/iconData.js +12 -0
  154. package/dist/icons/iconData.js.map +1 -0
  155. package/dist/icons/index.d.ts +12 -0
  156. package/dist/icons/index.d.ts.map +1 -0
  157. package/dist/icons/index.js +10 -0
  158. package/dist/icons/index.js.map +1 -0
  159. package/dist/icons/resolve.d.ts +61 -0
  160. package/dist/icons/resolve.d.ts.map +1 -0
  161. package/dist/icons/resolve.js +130 -0
  162. package/dist/icons/resolve.js.map +1 -0
  163. package/dist/imageEdit/ImageEditVersionManager.d.ts +31 -0
  164. package/dist/imageEdit/ImageEditVersionManager.d.ts.map +1 -0
  165. package/dist/imageEdit/ImageEditVersionManager.js +39 -0
  166. package/dist/imageEdit/ImageEditVersionManager.js.map +1 -0
  167. package/dist/imageEdit/export.d.ts +33 -0
  168. package/dist/imageEdit/export.d.ts.map +1 -0
  169. package/dist/imageEdit/export.js +253 -0
  170. package/dist/imageEdit/export.js.map +1 -0
  171. package/dist/imageEdit/index.d.ts +14 -0
  172. package/dist/imageEdit/index.d.ts.map +1 -0
  173. package/dist/imageEdit/index.js +22 -0
  174. package/dist/imageEdit/index.js.map +1 -0
  175. package/dist/imageEdit/persistence.d.ts +15 -0
  176. package/dist/imageEdit/persistence.d.ts.map +1 -0
  177. package/dist/imageEdit/persistence.js +49 -0
  178. package/dist/imageEdit/persistence.js.map +1 -0
  179. package/dist/imageEdit/state.d.ts +42 -0
  180. package/dist/imageEdit/state.d.ts.map +1 -0
  181. package/dist/imageEdit/state.js +98 -0
  182. package/dist/imageEdit/state.js.map +1 -0
  183. package/dist/imageEdit/versionPaths.d.ts +27 -0
  184. package/dist/imageEdit/versionPaths.d.ts.map +1 -0
  185. package/dist/imageEdit/versionPaths.js +57 -0
  186. package/dist/imageEdit/versionPaths.js.map +1 -0
  187. package/dist/imageEdit/versions.d.ts +67 -0
  188. package/dist/imageEdit/versions.d.ts.map +1 -0
  189. package/dist/imageEdit/versions.js +161 -0
  190. package/dist/imageEdit/versions.js.map +1 -0
  191. package/dist/index.d.ts +4 -0
  192. package/dist/index.d.ts.map +1 -1
  193. package/dist/index.js +4 -0
  194. package/dist/index.js.map +1 -1
  195. package/dist/jsonForm/chooseControl.d.ts +20 -0
  196. package/dist/jsonForm/chooseControl.d.ts.map +1 -0
  197. package/dist/jsonForm/chooseControl.js +82 -0
  198. package/dist/jsonForm/chooseControl.js.map +1 -0
  199. package/dist/jsonForm/evaluateWhen.d.ts +12 -0
  200. package/dist/jsonForm/evaluateWhen.d.ts.map +1 -0
  201. package/dist/jsonForm/evaluateWhen.js +65 -0
  202. package/dist/jsonForm/evaluateWhen.js.map +1 -0
  203. package/dist/jsonForm/index.d.ts +14 -0
  204. package/dist/jsonForm/index.d.ts.map +1 -0
  205. package/dist/jsonForm/index.js +12 -0
  206. package/dist/jsonForm/index.js.map +1 -0
  207. package/dist/jsonForm/inferSchema.d.ts +12 -0
  208. package/dist/jsonForm/inferSchema.d.ts.map +1 -0
  209. package/dist/jsonForm/inferSchema.js +15 -0
  210. package/dist/jsonForm/inferSchema.js.map +1 -0
  211. package/dist/jsonForm/pointer.d.ts +26 -0
  212. package/dist/jsonForm/pointer.d.ts.map +1 -0
  213. package/dist/jsonForm/pointer.js +102 -0
  214. package/dist/jsonForm/pointer.js.map +1 -0
  215. package/dist/jsonForm/types.d.ts +120 -0
  216. package/dist/jsonForm/types.d.ts.map +1 -0
  217. package/dist/jsonForm/types.js +10 -0
  218. package/dist/jsonForm/types.js.map +1 -0
  219. package/dist/markdown/convert.d.ts +11 -1
  220. package/dist/markdown/convert.d.ts.map +1 -1
  221. package/dist/markdown/convert.js +235 -15
  222. package/dist/markdown/convert.js.map +1 -1
  223. package/dist/markdown/index.d.ts +2 -2
  224. package/dist/markdown/index.d.ts.map +1 -1
  225. package/dist/markdown/index.js +1 -1
  226. package/dist/markdown/index.js.map +1 -1
  227. package/dist/markdown/types.d.ts +34 -1
  228. package/dist/markdown/types.d.ts.map +1 -1
  229. package/dist/markdown/utils.d.ts +40 -0
  230. package/dist/markdown/utils.d.ts.map +1 -1
  231. package/dist/markdown/utils.js +155 -0
  232. package/dist/markdown/utils.js.map +1 -1
  233. package/dist/recommend/index.d.ts +16 -0
  234. package/dist/recommend/index.d.ts.map +1 -0
  235. package/dist/recommend/index.js +15 -0
  236. package/dist/recommend/index.js.map +1 -0
  237. package/dist/recommend/templates.d.ts +39 -0
  238. package/dist/recommend/templates.d.ts.map +1 -0
  239. package/dist/recommend/templates.js +235 -0
  240. package/dist/recommend/templates.js.map +1 -0
  241. package/dist/schemas/BlockTemplates.d.ts +46 -8
  242. package/dist/schemas/BlockTemplates.d.ts.map +1 -1
  243. package/dist/schemas/BlockTemplates.js +3 -3
  244. package/dist/schemas/BlockTemplates.js.map +1 -1
  245. package/dist/schemas/ImageEditDoc.d.ts +81 -0
  246. package/dist/schemas/ImageEditDoc.d.ts.map +1 -0
  247. package/dist/schemas/ImageEditDoc.js +20 -0
  248. package/dist/schemas/ImageEditDoc.js.map +1 -0
  249. package/dist/schemas/Theme.d.ts +93 -23
  250. package/dist/schemas/Theme.d.ts.map +1 -1
  251. package/dist/schemas/Theme.js +80 -13
  252. package/dist/schemas/Theme.js.map +1 -1
  253. package/dist/schemas/colorUtils.d.ts +51 -0
  254. package/dist/schemas/colorUtils.d.ts.map +1 -0
  255. package/dist/schemas/colorUtils.js +154 -0
  256. package/dist/schemas/colorUtils.js.map +1 -0
  257. package/dist/schemas/fontStacks.d.ts +57 -0
  258. package/dist/schemas/fontStacks.d.ts.map +1 -0
  259. package/dist/schemas/fontStacks.js +227 -0
  260. package/dist/schemas/fontStacks.js.map +1 -0
  261. package/dist/schemas/index.d.ts +5 -0
  262. package/dist/schemas/index.d.ts.map +1 -1
  263. package/dist/schemas/index.js +4 -0
  264. package/dist/schemas/index.js.map +1 -1
  265. package/dist/schemas/themeCompile.d.ts +45 -0
  266. package/dist/schemas/themeCompile.d.ts.map +1 -0
  267. package/dist/schemas/themeCompile.js +160 -0
  268. package/dist/schemas/themeCompile.js.map +1 -0
  269. package/dist/schemas/themeLibrary.d.ts +11 -15
  270. package/dist/schemas/themeLibrary.d.ts.map +1 -1
  271. package/dist/schemas/themeLibrary.js +18 -499
  272. package/dist/schemas/themeLibrary.js.map +1 -1
  273. package/dist/schemas/themeValidator.d.ts +26 -0
  274. package/dist/schemas/themeValidator.d.ts.map +1 -0
  275. package/dist/schemas/themeValidator.js +352 -0
  276. package/dist/schemas/themeValidator.js.map +1 -0
  277. package/dist/schemas/themes/bold.json +48 -0
  278. package/dist/schemas/themes/cinematic.json +54 -0
  279. package/dist/schemas/themes/documentary.json +49 -0
  280. package/dist/schemas/themes/gezellig.json +44 -0
  281. package/dist/schemas/themes/index.d.ts +26 -0
  282. package/dist/schemas/themes/index.d.ts.map +1 -0
  283. package/dist/schemas/themes/index.js +49 -0
  284. package/dist/schemas/themes/index.js.map +1 -0
  285. package/dist/schemas/themes/magazine.json +44 -0
  286. package/dist/schemas/themes/minimalist.json +45 -0
  287. package/dist/schemas/themes/morning-light.json +42 -0
  288. package/dist/schemas/themes/standard-dark.json +50 -0
  289. package/dist/schemas/themes/standard.json +42 -0
  290. package/dist/schemas/themes/tech-dark.json +48 -0
  291. package/dist/schemas/themes/warm-earth.json +50 -0
  292. package/dist/storage/ScopedContentContainer.d.ts +44 -0
  293. package/dist/storage/ScopedContentContainer.d.ts.map +1 -0
  294. package/dist/storage/ScopedContentContainer.js +94 -0
  295. package/dist/storage/ScopedContentContainer.js.map +1 -0
  296. package/dist/storage/index.d.ts +1 -0
  297. package/dist/storage/index.d.ts.map +1 -1
  298. package/dist/storage/index.js +1 -0
  299. package/dist/storage/index.js.map +1 -1
  300. package/dist/story/index.d.ts +53 -13
  301. package/dist/story/index.js +12 -4
  302. package/dist/themeLibrary-BHjJ0Qx6.d.ts +40 -0
  303. package/dist/{types-DYAzisMG.d.ts → types-BdZkdJ3z.d.ts} +35 -2
  304. package/dist/types-D98li1gV.d.ts +93 -0
  305. package/dist/versions/DocumentVersionManager.d.ts +31 -0
  306. package/dist/versions/DocumentVersionManager.d.ts.map +1 -0
  307. package/dist/versions/DocumentVersionManager.js +33 -0
  308. package/dist/versions/DocumentVersionManager.js.map +1 -0
  309. package/dist/versions/index.d.ts +29 -0
  310. package/dist/versions/index.d.ts.map +1 -0
  311. package/dist/versions/index.js +28 -0
  312. package/dist/versions/index.js.map +1 -0
  313. package/dist/versions/operations.d.ts +44 -0
  314. package/dist/versions/operations.d.ts.map +1 -0
  315. package/dist/versions/operations.js +190 -0
  316. package/dist/versions/operations.js.map +1 -0
  317. package/dist/versions/paths.d.ts +29 -0
  318. package/dist/versions/paths.d.ts.map +1 -0
  319. package/dist/versions/paths.js +66 -0
  320. package/dist/versions/paths.js.map +1 -0
  321. package/dist/versions/timestamp.d.ts +22 -0
  322. package/dist/versions/timestamp.d.ts.map +1 -0
  323. package/dist/versions/timestamp.js +44 -0
  324. package/dist/versions/timestamp.js.map +1 -0
  325. package/dist/versions/types.d.ts +92 -0
  326. package/dist/versions/types.d.ts.map +1 -0
  327. package/dist/versions/types.js +11 -0
  328. package/dist/versions/types.js.map +1 -0
  329. package/package.json +28 -1
  330. package/src/__tests__/colorUtils.test.ts +112 -0
  331. package/src/__tests__/getLayers.test.ts +32 -7
  332. package/src/__tests__/iconResolve.test.ts +122 -0
  333. package/src/__tests__/imageEditState.test.ts +74 -0
  334. package/src/__tests__/imageEditVersions.test.ts +169 -0
  335. package/src/__tests__/inferDocumentTitle.test.ts +50 -0
  336. package/src/__tests__/jsonForm.chooseControl.test.ts +86 -0
  337. package/src/__tests__/jsonForm.evaluateWhen.test.ts +59 -0
  338. package/src/__tests__/jsonForm.inferSchema.test.ts +25 -0
  339. package/src/__tests__/jsonForm.pointer.test.ts +103 -0
  340. package/src/__tests__/markdown.test.ts +44 -0
  341. package/src/__tests__/markdownIcons.test.ts +104 -0
  342. package/src/__tests__/markdownToDoc.test.ts +19 -4
  343. package/src/__tests__/recommendTemplates.test.ts +183 -0
  344. package/src/__tests__/scopedContentContainer.test.ts +89 -0
  345. package/src/__tests__/slideshowGenerator.test.ts +1 -1
  346. package/src/__tests__/surface.test.ts +68 -0
  347. package/src/__tests__/templateAnnotationParse.test.ts +42 -0
  348. package/src/__tests__/templates.test.ts +93 -9
  349. package/src/__tests__/themeCompile.test.ts +156 -0
  350. package/src/__tests__/themeValidator.test.ts +125 -0
  351. package/src/__tests__/versions.test.ts +415 -0
  352. package/src/doc/audioMapping.ts +95 -13
  353. package/src/doc/getLayers.ts +32 -21
  354. package/src/doc/markdownToDoc.ts +45 -7
  355. package/src/doc/templates/featureBlock.ts +202 -0
  356. package/src/doc/templates/fullBleedQuote.ts +13 -0
  357. package/src/doc/templates/index.ts +50 -16
  358. package/src/doc/templates/listBlock.ts +24 -5
  359. package/src/doc/templates/statHighlight.ts +13 -0
  360. package/src/doc/templates/titleBlock.ts +9 -0
  361. package/src/doc/utils/themeUtils.ts +8 -7
  362. package/src/generate/slideshowGenerator.ts +1 -1
  363. package/src/generate/templateMapper.ts +2 -2
  364. package/src/icons/iconData.ts +31 -0
  365. package/src/icons/index.ts +18 -0
  366. package/src/icons/resolve.ts +139 -0
  367. package/src/imageEdit/ImageEditVersionManager.ts +73 -0
  368. package/src/imageEdit/export.ts +326 -0
  369. package/src/imageEdit/index.ts +71 -0
  370. package/src/imageEdit/persistence.ts +62 -0
  371. package/src/imageEdit/state.ts +112 -0
  372. package/src/imageEdit/versionPaths.ts +57 -0
  373. package/src/imageEdit/versions.ts +231 -0
  374. package/src/index.ts +4 -0
  375. package/src/jsonForm/chooseControl.ts +88 -0
  376. package/src/jsonForm/evaluateWhen.ts +59 -0
  377. package/src/jsonForm/index.ts +22 -0
  378. package/src/jsonForm/inferSchema.ts +25 -0
  379. package/src/jsonForm/pointer.ts +109 -0
  380. package/src/jsonForm/types.ts +167 -0
  381. package/src/markdown/convert.ts +248 -15
  382. package/src/markdown/index.ts +4 -0
  383. package/src/markdown/types.ts +38 -1
  384. package/src/markdown/utils.ts +159 -0
  385. package/src/recommend/index.ts +16 -0
  386. package/src/recommend/templates.ts +273 -0
  387. package/src/schemas/BlockTemplates.ts +50 -7
  388. package/src/schemas/ImageEditDoc.ts +95 -0
  389. package/src/schemas/Theme.ts +152 -23
  390. package/src/schemas/colorUtils.ts +186 -0
  391. package/src/schemas/fontStacks.ts +257 -0
  392. package/src/schemas/index.ts +12 -0
  393. package/src/schemas/themeCompile.ts +203 -0
  394. package/src/schemas/themeLibrary.ts +18 -524
  395. package/src/schemas/themeValidator.ts +388 -0
  396. package/src/schemas/themes/bold.json +48 -0
  397. package/src/schemas/themes/cinematic.json +54 -0
  398. package/src/schemas/themes/documentary.json +49 -0
  399. package/src/schemas/themes/gezellig.json +44 -0
  400. package/src/schemas/themes/index.ts +53 -0
  401. package/src/schemas/themes/magazine.json +44 -0
  402. package/src/schemas/themes/minimalist.json +45 -0
  403. package/src/schemas/themes/morning-light.json +42 -0
  404. package/src/schemas/themes/standard-dark.json +50 -0
  405. package/src/schemas/themes/standard.json +42 -0
  406. package/src/schemas/themes/tech-dark.json +48 -0
  407. package/src/schemas/themes/warm-earth.json +50 -0
  408. package/src/storage/ScopedContentContainer.ts +113 -0
  409. package/src/storage/index.ts +1 -0
  410. package/src/versions/DocumentVersionManager.ts +70 -0
  411. package/src/versions/index.ts +54 -0
  412. package/src/versions/operations.ts +230 -0
  413. package/src/versions/paths.ts +66 -0
  414. package/src/versions/timestamp.ts +48 -0
  415. package/src/versions/types.ts +91 -0
  416. package/dist/chunk-53TZ2UTL.js +0 -470
  417. package/dist/chunk-53TZ2UTL.js.map +0 -1
  418. package/dist/chunk-7GF6RDED.js +0 -82
  419. package/dist/chunk-7GF6RDED.js.map +0 -1
  420. package/dist/chunk-CYQHG27J.js.map +0 -1
  421. package/dist/chunk-GAQLMORN.js.map +0 -1
  422. package/dist/chunk-LAZELBON.js.map +0 -1
  423. package/dist/chunk-QM5PKNPW.js.map +0 -1
  424. package/dist/chunk-TSG2OSE6.js.map +0 -1
  425. package/dist/chunk-XM4WSOHB.js +0 -92
  426. package/dist/chunk-XM4WSOHB.js.map +0 -1
  427. package/dist/themeLibrary-IP7EdyRq.d.ts +0 -44
@@ -0,0 +1,1317 @@
1
+ // src/schemas/Theme.ts
2
+ var THEME_SCHEMA_VERSION = "1";
3
+ function deepMerge(target, source) {
4
+ const result = { ...target };
5
+ for (const key of Object.keys(source)) {
6
+ const srcVal = source[key];
7
+ const tgtVal = target[key];
8
+ if (srcVal !== null && srcVal !== void 0 && typeof srcVal === "object" && !Array.isArray(srcVal) && tgtVal !== null && tgtVal !== void 0 && typeof tgtVal === "object" && !Array.isArray(tgtVal)) {
9
+ result[key] = deepMerge(
10
+ tgtVal,
11
+ srcVal
12
+ );
13
+ } else if (srcVal !== void 0) {
14
+ result[key] = srcVal;
15
+ }
16
+ }
17
+ return result;
18
+ }
19
+ function createTheme(base, overrides) {
20
+ const merged = deepMerge(
21
+ base,
22
+ overrides
23
+ );
24
+ if (!overrides.id && merged.id === base.id) {
25
+ merged.id = `${base.id}-custom`;
26
+ }
27
+ if (!merged.schemaVersion) merged.schemaVersion = THEME_SCHEMA_VERSION;
28
+ return merged;
29
+ }
30
+ var LIGHT_SURFACE = {
31
+ id: "light",
32
+ background: "#ffffff",
33
+ backgroundLight: "#f5f5f5",
34
+ text: "#1a1a1a",
35
+ textMuted: "#666666"
36
+ };
37
+ var DARK_SURFACE = {
38
+ id: "dark",
39
+ background: "#1a202c",
40
+ backgroundLight: "#2d3748",
41
+ text: "#f0f0f0",
42
+ textMuted: "#a0aec0"
43
+ };
44
+ function applySurface(theme, surface) {
45
+ return {
46
+ ...theme,
47
+ colors: {
48
+ ...theme.colors,
49
+ background: surface.background,
50
+ backgroundLight: surface.backgroundLight,
51
+ text: surface.text,
52
+ textMuted: surface.textMuted
53
+ }
54
+ };
55
+ }
56
+ var CUSTOM_THEME_REGISTRY = /* @__PURE__ */ new Map();
57
+ function registerTheme(theme) {
58
+ CUSTOM_THEME_REGISTRY.set(theme.id, theme);
59
+ }
60
+ function unregisterTheme(id) {
61
+ CUSTOM_THEME_REGISTRY.delete(id);
62
+ }
63
+ function getRegisteredThemes() {
64
+ return Array.from(CUSTOM_THEME_REGISTRY.values());
65
+ }
66
+ function lookupRegisteredTheme(id) {
67
+ if (!id) return void 0;
68
+ return CUSTOM_THEME_REGISTRY.get(id);
69
+ }
70
+
71
+ // src/schemas/colorUtils.ts
72
+ var HEX_RE = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i;
73
+ function isHex(value) {
74
+ return HEX_RE.test(value);
75
+ }
76
+ function parseHex(hex) {
77
+ if (!HEX_RE.test(hex)) return null;
78
+ let body = hex.slice(1);
79
+ if (body.length === 3)
80
+ body = body.split("").map((c) => c + c).join("");
81
+ return [
82
+ parseInt(body.slice(0, 2), 16) / 255,
83
+ parseInt(body.slice(2, 4), 16) / 255,
84
+ parseInt(body.slice(4, 6), 16) / 255
85
+ ];
86
+ }
87
+ function toHex(rgb) {
88
+ const ch = (v) => {
89
+ const c = Math.max(0, Math.min(255, Math.round(v * 255)));
90
+ return c.toString(16).padStart(2, "0");
91
+ };
92
+ return "#" + ch(rgb[0]) + ch(rgb[1]) + ch(rgb[2]);
93
+ }
94
+ function srgbToLinear(c) {
95
+ return c <= 0.04045 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
96
+ }
97
+ function linearToSrgb(c) {
98
+ return c <= 31308e-7 ? c * 12.92 : 1.055 * Math.pow(c, 1 / 2.4) - 0.055;
99
+ }
100
+ function rgbToOklch(rgb) {
101
+ const [sr, sg, sb] = rgb;
102
+ const r = srgbToLinear(sr);
103
+ const g = srgbToLinear(sg);
104
+ const b = srgbToLinear(sb);
105
+ const l = 0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b;
106
+ const m = 0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b;
107
+ const s = 0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b;
108
+ const l_ = Math.cbrt(l);
109
+ const m_ = Math.cbrt(m);
110
+ const s_ = Math.cbrt(s);
111
+ const L = 0.2104542553 * l_ + 0.793617785 * m_ - 0.0040720468 * s_;
112
+ const a = 1.9779984951 * l_ - 2.428592205 * m_ + 0.4505937099 * s_;
113
+ const bb = 0.0259040371 * l_ + 0.7827717662 * m_ - 0.808675766 * s_;
114
+ const C = Math.sqrt(a * a + bb * bb);
115
+ let h = Math.atan2(bb, a) * 180 / Math.PI;
116
+ if (h < 0) h += 360;
117
+ return { L, C, h };
118
+ }
119
+ function oklchToRgb({ L, C, h }) {
120
+ const hr = h * Math.PI / 180;
121
+ const a = C * Math.cos(hr);
122
+ const bb = C * Math.sin(hr);
123
+ const l_ = L + 0.3963377774 * a + 0.2158037573 * bb;
124
+ const m_ = L - 0.1055613458 * a - 0.0638541728 * bb;
125
+ const s_ = L - 0.0894841775 * a - 1.291485548 * bb;
126
+ const l = l_ * l_ * l_;
127
+ const m = m_ * m_ * m_;
128
+ const s = s_ * s_ * s_;
129
+ const r = 4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s;
130
+ const g = -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s;
131
+ const b = -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s;
132
+ return [
133
+ Math.max(0, Math.min(1, linearToSrgb(r))),
134
+ Math.max(0, Math.min(1, linearToSrgb(g))),
135
+ Math.max(0, Math.min(1, linearToSrgb(b)))
136
+ ];
137
+ }
138
+ function oklchLighten(hex, amount) {
139
+ const rgb = parseHex(hex);
140
+ if (!rgb) return hex;
141
+ const lch = rgbToOklch(rgb);
142
+ lch.L = Math.max(0, Math.min(1, lch.L + amount));
143
+ return toHex(oklchToRgb(lch));
144
+ }
145
+ function oklchDarken(hex, amount) {
146
+ return oklchLighten(hex, -amount);
147
+ }
148
+ function oklchSetChroma(hex, multiplier) {
149
+ const rgb = parseHex(hex);
150
+ if (!rgb) return hex;
151
+ const lch = rgbToOklch(rgb);
152
+ lch.C = Math.max(0, lch.C * multiplier);
153
+ return toHex(oklchToRgb(lch));
154
+ }
155
+ function relativeLuminance(hex) {
156
+ const rgb = parseHex(hex);
157
+ if (!rgb) return 0;
158
+ const [r, g, b] = rgb.map(srgbToLinear);
159
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b;
160
+ }
161
+ function contrastRatio(a, b) {
162
+ const la = relativeLuminance(a);
163
+ const lb = relativeLuminance(b);
164
+ const lighter = Math.max(la, lb);
165
+ const darker = Math.min(la, lb);
166
+ return (lighter + 0.05) / (darker + 0.05);
167
+ }
168
+ function pickContrastingText(bg, light = "#f7fafc", dark = "#1a202c") {
169
+ return contrastRatio(bg, dark) >= contrastRatio(bg, light) ? dark : light;
170
+ }
171
+ function deriveScale(seedHex, spread = 0.15) {
172
+ return {
173
+ lighter2: oklchLighten(seedHex, spread),
174
+ lighter1: oklchLighten(seedHex, spread / 2),
175
+ base: seedHex,
176
+ darker1: oklchDarken(seedHex, spread / 2),
177
+ darker2: oklchDarken(seedHex, spread)
178
+ };
179
+ }
180
+
181
+ // src/schemas/themeValidator.ts
182
+ var VALID_FALLBACK = /* @__PURE__ */ new Set(["serif", "sans-serif", "monospace", "system-ui"]);
183
+ var VALID_TITLE_WEIGHT = /* @__PURE__ */ new Set(["normal", "bold"]);
184
+ var VALID_TRANSITION_TYPES = /* @__PURE__ */ new Set([
185
+ "cut",
186
+ "fade",
187
+ "dissolve",
188
+ "slideLeft",
189
+ "slideRight",
190
+ "slideUp",
191
+ "slideDown",
192
+ "zoom"
193
+ ]);
194
+ var VALID_GRADIENT_PRESETS = /* @__PURE__ */ new Set([
195
+ "dark-vignette",
196
+ "radial-dark",
197
+ "warm-sunset",
198
+ "cool-blue",
199
+ "earth-tones"
200
+ ]);
201
+ var V = class {
202
+ constructor() {
203
+ this.errors = [];
204
+ }
205
+ err(path, message) {
206
+ this.errors.push({ path, message });
207
+ }
208
+ isObject(v) {
209
+ return typeof v === "object" && v !== null && !Array.isArray(v);
210
+ }
211
+ isString(v) {
212
+ return typeof v === "string";
213
+ }
214
+ isNumber(v) {
215
+ return typeof v === "number" && Number.isFinite(v);
216
+ }
217
+ isBoolean(v) {
218
+ return typeof v === "boolean";
219
+ }
220
+ hex(path, v) {
221
+ if (!this.isString(v)) {
222
+ this.err(path, `expected hex color string, got ${typeof v}`);
223
+ } else if (!isHex(v)) {
224
+ this.err(path, `expected #rgb or #rrggbb hex color, got "${v}"`);
225
+ }
226
+ }
227
+ palette(path, v) {
228
+ if (!this.isObject(v)) {
229
+ this.err(path, "expected object");
230
+ return;
231
+ }
232
+ const required = [
233
+ "primary",
234
+ "secondary",
235
+ "background",
236
+ "backgroundLight",
237
+ "text",
238
+ "textMuted",
239
+ "highlight",
240
+ "warning"
241
+ ];
242
+ for (const k of required) this.hex(`${path}.${k}`, v[k]);
243
+ }
244
+ colorScheme(path, v) {
245
+ if (!this.isObject(v)) {
246
+ this.err(path, "expected object");
247
+ return;
248
+ }
249
+ this.hex(`${path}.bg`, v.bg);
250
+ this.hex(`${path}.text`, v.text);
251
+ this.hex(`${path}.accent`, v.accent);
252
+ }
253
+ colorSchemes(path, v) {
254
+ if (!this.isObject(v)) {
255
+ this.err(path, "expected object map");
256
+ return;
257
+ }
258
+ for (const key of Object.keys(v)) {
259
+ this.colorScheme(`${path}.${key}`, v[key]);
260
+ }
261
+ }
262
+ fontFamily(path, v) {
263
+ if (!this.isObject(v)) {
264
+ this.err(path, "expected FontFamily object ({ stackId } or { custom })");
265
+ return;
266
+ }
267
+ if ("stackId" in v) {
268
+ if (!this.isString(v.stackId) || v.stackId.length === 0) {
269
+ this.err(`${path}.stackId`, "expected non-empty string");
270
+ }
271
+ return;
272
+ }
273
+ if ("custom" in v) {
274
+ const c = v.custom;
275
+ if (!this.isObject(c)) {
276
+ this.err(`${path}.custom`, "expected { name, fallback } object");
277
+ return;
278
+ }
279
+ if (!this.isString(c.name) || c.name.length === 0) {
280
+ this.err(`${path}.custom.name`, "expected non-empty string");
281
+ }
282
+ if (!this.isString(c.fallback) || !VALID_FALLBACK.has(c.fallback)) {
283
+ this.err(
284
+ `${path}.custom.fallback`,
285
+ `expected one of: serif, sans-serif, monospace, system-ui`
286
+ );
287
+ }
288
+ return;
289
+ }
290
+ this.err(path, "expected { stackId } or { custom: { name, fallback } }");
291
+ }
292
+ typography(path, v) {
293
+ if (!this.isObject(v)) {
294
+ this.err(path, "expected object");
295
+ return;
296
+ }
297
+ this.fontFamily(`${path}.bodyFont`, v.bodyFont);
298
+ this.fontFamily(`${path}.titleFont`, v.titleFont);
299
+ if (v.monoFont !== void 0) this.fontFamily(`${path}.monoFont`, v.monoFont);
300
+ for (const k of ["titleScale", "bodyScale", "lineHeight", "titleLineHeight"]) {
301
+ if (v[k] !== void 0 && !this.isNumber(v[k])) {
302
+ this.err(`${path}.${k}`, `expected number, got ${typeof v[k]}`);
303
+ }
304
+ }
305
+ if (v.titleWeight !== void 0) {
306
+ if (!this.isString(v.titleWeight) || !VALID_TITLE_WEIGHT.has(v.titleWeight)) {
307
+ this.err(`${path}.titleWeight`, 'expected "normal" or "bold"');
308
+ }
309
+ }
310
+ }
311
+ style(path, v) {
312
+ if (!this.isObject(v)) {
313
+ this.err(path, "expected object");
314
+ return;
315
+ }
316
+ if (v.borderRadius !== void 0 && !this.isNumber(v.borderRadius)) {
317
+ this.err(`${path}.borderRadius`, "expected number");
318
+ }
319
+ if (v.textShadow !== void 0 && !this.isBoolean(v.textShadow)) {
320
+ this.err(`${path}.textShadow`, "expected boolean");
321
+ }
322
+ for (const k of ["overlayOpacity", "animationSpeed"]) {
323
+ if (v[k] !== void 0 && !this.isNumber(v[k])) {
324
+ this.err(`${path}.${k}`, "expected number");
325
+ }
326
+ }
327
+ if (v.blockPadding !== void 0 && !this.isString(v.blockPadding)) {
328
+ this.err(`${path}.blockPadding`, 'expected string (percentage e.g. "5%")');
329
+ }
330
+ }
331
+ renderStyle(path, v) {
332
+ if (!this.isObject(v)) {
333
+ this.err(path, "expected object");
334
+ return;
335
+ }
336
+ if (!this.isString(v.name) || v.name.length === 0) {
337
+ this.err(`${path}.name`, "expected non-empty string");
338
+ }
339
+ if (v.ambientMotion !== void 0 && !this.isBoolean(v.ambientMotion)) {
340
+ this.err(`${path}.ambientMotion`, "expected boolean");
341
+ }
342
+ for (const k of ["defaultTextAnimation", "defaultImageAnimation"]) {
343
+ if (v[k] !== void 0 && !this.isString(v[k])) {
344
+ this.err(`${path}.${k}`, "expected animation type string");
345
+ }
346
+ }
347
+ if (v.defaultTransition !== void 0) {
348
+ const t = v.defaultTransition;
349
+ if (!this.isObject(t)) {
350
+ this.err(`${path}.defaultTransition`, "expected object");
351
+ } else {
352
+ if (!this.isString(t.type) || !VALID_TRANSITION_TYPES.has(t.type)) {
353
+ this.err(`${path}.defaultTransition.type`, "expected valid transition type");
354
+ }
355
+ if (t.duration !== void 0 && !this.isNumber(t.duration)) {
356
+ this.err(`${path}.defaultTransition.duration`, "expected number");
357
+ }
358
+ }
359
+ }
360
+ if (v.layoutOverrides !== void 0 && !this.isObject(v.layoutOverrides)) {
361
+ this.err(`${path}.layoutOverrides`, "expected object");
362
+ }
363
+ if (v.templateHints !== void 0) {
364
+ if (!this.isObject(v.templateHints)) {
365
+ this.err(`${path}.templateHints`, "expected object map");
366
+ } else {
367
+ for (const tplName of Object.keys(v.templateHints)) {
368
+ const hints = v.templateHints[tplName];
369
+ if (!this.isObject(hints)) {
370
+ this.err(`${path}.templateHints.${tplName}`, "expected object");
371
+ continue;
372
+ }
373
+ for (const key of Object.keys(hints)) {
374
+ const val = hints[key];
375
+ const t = typeof val;
376
+ if (t !== "string" && t !== "number" && t !== "boolean") {
377
+ this.err(
378
+ `${path}.templateHints.${tplName}.${key}`,
379
+ `expected string|number|boolean, got ${t}`
380
+ );
381
+ }
382
+ }
383
+ }
384
+ }
385
+ }
386
+ }
387
+ seedColors(path, v) {
388
+ if (!this.isObject(v)) {
389
+ this.err(path, "expected object");
390
+ return;
391
+ }
392
+ if (v.primary === void 0) {
393
+ this.err(`${path}.primary`, "required when seedColors is present");
394
+ } else {
395
+ this.hex(`${path}.primary`, v.primary);
396
+ }
397
+ for (const k of ["secondary", "accent", "background", "text"]) {
398
+ if (v[k] !== void 0) this.hex(`${path}.${k}`, v[k]);
399
+ }
400
+ }
401
+ persistentLayer(path, v) {
402
+ if (!this.isObject(v)) {
403
+ this.err(path, "expected object");
404
+ return;
405
+ }
406
+ if ("template" in v) {
407
+ if (!this.isString(v.template)) {
408
+ this.err(`${path}.template`, "expected string");
409
+ return;
410
+ }
411
+ const cfg = v.config;
412
+ if (!this.isObject(cfg)) {
413
+ this.err(`${path}.config`, "expected object");
414
+ return;
415
+ }
416
+ if (cfg.type !== v.template) {
417
+ this.err(`${path}.config.type`, `expected "${v.template}", got "${String(cfg.type)}"`);
418
+ }
419
+ if (v.template === "gradientBackground" && cfg.preset !== void 0) {
420
+ if (!this.isString(cfg.preset) || !VALID_GRADIENT_PRESETS.has(cfg.preset)) {
421
+ this.err(
422
+ `${path}.config.preset`,
423
+ `expected one of: ${Array.from(VALID_GRADIENT_PRESETS).join(", ")}`
424
+ );
425
+ }
426
+ }
427
+ if (v.template === "gradientBackground" && "gradient" in cfg) {
428
+ this.err(
429
+ `${path}.config.gradient`,
430
+ "raw CSS gradient strings are not allowed in Theme JSON; use a `preset`"
431
+ );
432
+ }
433
+ }
434
+ }
435
+ persistentLayers(path, v) {
436
+ if (!this.isObject(v)) {
437
+ this.err(path, "expected object");
438
+ return;
439
+ }
440
+ for (const side of ["bottomLayers", "topLayers"]) {
441
+ const arr = v[side];
442
+ if (arr === void 0) continue;
443
+ if (!Array.isArray(arr)) {
444
+ this.err(`${path}.${side}`, "expected array");
445
+ continue;
446
+ }
447
+ arr.forEach((entry, i) => this.persistentLayer(`${path}.${side}[${i}]`, entry));
448
+ }
449
+ }
450
+ };
451
+ function validateTheme(input) {
452
+ const v = new V();
453
+ if (!v.isObject(input)) {
454
+ return { valid: false, errors: [{ path: "", message: "expected object" }] };
455
+ }
456
+ if (input.schemaVersion !== THEME_SCHEMA_VERSION) {
457
+ v.err(
458
+ "schemaVersion",
459
+ `expected "${THEME_SCHEMA_VERSION}", got "${String(input.schemaVersion)}"`
460
+ );
461
+ }
462
+ if (!v.isString(input.id) || input.id.length === 0) {
463
+ v.err("id", "expected non-empty string");
464
+ }
465
+ if (!v.isString(input.name) || input.name.length === 0) {
466
+ v.err("name", "expected non-empty string");
467
+ }
468
+ if (input.description !== void 0 && !v.isString(input.description)) {
469
+ v.err("description", "expected string");
470
+ }
471
+ if (input.seedColors !== void 0) v.seedColors("seedColors", input.seedColors);
472
+ if (input.colors === void 0) {
473
+ v.err("colors", "required");
474
+ } else {
475
+ v.palette("colors", input.colors);
476
+ }
477
+ if (input.typography === void 0) {
478
+ v.err("typography", "required");
479
+ } else {
480
+ v.typography("typography", input.typography);
481
+ }
482
+ if (input.style === void 0) {
483
+ v.err("style", "required");
484
+ } else {
485
+ v.style("style", input.style);
486
+ }
487
+ if (input.renderStyle === void 0) {
488
+ v.err("renderStyle", "required");
489
+ } else {
490
+ v.renderStyle("renderStyle", input.renderStyle);
491
+ }
492
+ if (input.colorSchemes === void 0) {
493
+ v.err("colorSchemes", "required");
494
+ } else {
495
+ v.colorSchemes("colorSchemes", input.colorSchemes);
496
+ }
497
+ if (input.persistentLayers !== void 0) {
498
+ v.persistentLayers("persistentLayers", input.persistentLayers);
499
+ }
500
+ if (v.errors.length === 0) {
501
+ return { valid: true, errors: [], theme: input };
502
+ }
503
+ return { valid: false, errors: v.errors };
504
+ }
505
+ function assertTheme(input, source = "theme") {
506
+ const result = validateTheme(input);
507
+ if (!result.valid || !result.theme) {
508
+ const summary = result.errors.slice(0, 5).map((e) => ` ${e.path || "<root>"}: ${e.message}`).join("\n");
509
+ const more = result.errors.length > 5 ? `
510
+ ... and ${result.errors.length - 5} more` : "";
511
+ throw new Error(`Invalid ${source}:
512
+ ${summary}${more}`);
513
+ }
514
+ return result.theme;
515
+ }
516
+
517
+ // src/schemas/themes/standard.json
518
+ var standard_default = {
519
+ schemaVersion: "1",
520
+ id: "standard",
521
+ name: "Standard Light",
522
+ description: "Clean and safe \u2014 black-on-white, system fonts only, no external font dependencies. Default theme.",
523
+ colors: {
524
+ primary: "#2563eb",
525
+ secondary: "#475569",
526
+ background: "#ffffff",
527
+ backgroundLight: "#f1f5f9",
528
+ text: "#0f172a",
529
+ textMuted: "#475569",
530
+ highlight: "#1d4ed8",
531
+ warning: "#dc2626"
532
+ },
533
+ typography: {
534
+ bodyFont: { stackId: "system-sans" },
535
+ titleFont: { stackId: "system-serif" },
536
+ monoFont: { stackId: "system-mono" },
537
+ titleWeight: "bold"
538
+ },
539
+ style: {
540
+ textShadow: false,
541
+ overlayOpacity: 0.35,
542
+ animationSpeed: 1
543
+ },
544
+ renderStyle: {
545
+ name: "standard",
546
+ defaultTextAnimation: "fadeIn",
547
+ defaultImageAnimation: "slowZoom",
548
+ ambientMotion: true,
549
+ defaultTransition: { type: "fade", duration: 0.7 }
550
+ },
551
+ colorSchemes: {
552
+ blue: { bg: "#dbeafe", text: "#1d4ed8", accent: "#2563eb" },
553
+ green: { bg: "#dcfce7", text: "#166534", accent: "#16a34a" },
554
+ purple: { bg: "#ede9fe", text: "#5b21b6", accent: "#7c3aed" },
555
+ red: { bg: "#fee2e2", text: "#991b1b", accent: "#dc2626" },
556
+ orange: { bg: "#ffedd5", text: "#9a3412", accent: "#ea580c" },
557
+ teal: { bg: "#ccfbf1", text: "#115e59", accent: "#0d9488" }
558
+ }
559
+ };
560
+
561
+ // src/schemas/themes/standard-dark.json
562
+ var standard_dark_default = {
563
+ schemaVersion: "1",
564
+ id: "standard-dark",
565
+ name: "Standard Dark",
566
+ description: "Standard, dark variant. System fonts, dark navy background, light text.",
567
+ colors: {
568
+ primary: "#3182ce",
569
+ secondary: "#4a5568",
570
+ background: "#1a202c",
571
+ backgroundLight: "#2d3748",
572
+ text: "#f7fafc",
573
+ textMuted: "#a0aec0",
574
+ highlight: "#4299e1",
575
+ warning: "#fc8181"
576
+ },
577
+ typography: {
578
+ bodyFont: { stackId: "system-sans" },
579
+ titleFont: { stackId: "system-serif" },
580
+ monoFont: { stackId: "system-mono" },
581
+ titleWeight: "bold"
582
+ },
583
+ style: {
584
+ textShadow: true,
585
+ overlayOpacity: 0.45,
586
+ animationSpeed: 1
587
+ },
588
+ renderStyle: {
589
+ name: "standard",
590
+ defaultTextAnimation: "fadeIn",
591
+ defaultImageAnimation: "slowZoom",
592
+ ambientMotion: true,
593
+ defaultTransition: { type: "fade", duration: 0.7 }
594
+ },
595
+ colorSchemes: {
596
+ blue: { bg: "#1a365d", text: "#63b3ed", accent: "#90cdf4" },
597
+ green: { bg: "#22543d", text: "#9ae6b4", accent: "#68d391" },
598
+ purple: { bg: "#44337a", text: "#d6bcfa", accent: "#b794f4" },
599
+ red: { bg: "#742a2a", text: "#fc8181", accent: "#feb2b2" },
600
+ orange: { bg: "#744210", text: "#fbd38d", accent: "#f6ad55" },
601
+ teal: { bg: "#234e52", text: "#81e6d9", accent: "#4fd1c5" }
602
+ },
603
+ persistentLayers: {
604
+ bottomLayers: [
605
+ {
606
+ template: "gradientBackground",
607
+ config: { type: "gradientBackground", preset: "dark-vignette" }
608
+ }
609
+ ]
610
+ }
611
+ };
612
+
613
+ // src/schemas/themes/documentary.json
614
+ var documentary_default = {
615
+ schemaVersion: "1",
616
+ id: "documentary",
617
+ name: "Documentary",
618
+ description: "Classic dark cinematic look with elegant serif typography.",
619
+ colors: {
620
+ primary: "#3d5a80",
621
+ secondary: "#63b3ed",
622
+ background: "#1a202c",
623
+ backgroundLight: "#2d3748",
624
+ text: "#ffffff",
625
+ textMuted: "#a0aec0",
626
+ highlight: "#63b3ed",
627
+ warning: "#fc8181"
628
+ },
629
+ typography: {
630
+ bodyFont: { stackId: "source-serif" },
631
+ titleFont: { stackId: "playfair" },
632
+ titleWeight: "bold"
633
+ },
634
+ style: {
635
+ textShadow: true,
636
+ overlayOpacity: 0.5,
637
+ animationSpeed: 1
638
+ },
639
+ renderStyle: {
640
+ name: "documentary",
641
+ defaultTextAnimation: "fadeIn",
642
+ defaultImageAnimation: "slowZoom",
643
+ ambientMotion: true,
644
+ defaultTransition: { type: "fade", duration: 0.8 }
645
+ },
646
+ colorSchemes: {
647
+ blue: { bg: "#1a365d", text: "#63b3ed", accent: "#90cdf4" },
648
+ green: { bg: "#22543d", text: "#9ae6b4", accent: "#68d391" },
649
+ purple: { bg: "#44337a", text: "#d6bcfa", accent: "#b794f4" },
650
+ red: { bg: "#742a2a", text: "#fc8181", accent: "#feb2b2" },
651
+ orange: { bg: "#744210", text: "#fbd38d", accent: "#f6ad55" },
652
+ teal: { bg: "#234e52", text: "#81e6d9", accent: "#4fd1c5" }
653
+ },
654
+ persistentLayers: {
655
+ bottomLayers: [
656
+ {
657
+ template: "gradientBackground",
658
+ config: { type: "gradientBackground", preset: "dark-vignette" }
659
+ }
660
+ ]
661
+ }
662
+ };
663
+
664
+ // src/schemas/themes/minimalist.json
665
+ var minimalist_default = {
666
+ schemaVersion: "1",
667
+ id: "minimalist",
668
+ name: "Minimalist",
669
+ description: "Clean near-white background with sans-serif type and minimal animation.",
670
+ colors: {
671
+ primary: "#2d3748",
672
+ secondary: "#4a5568",
673
+ background: "#f7fafc",
674
+ backgroundLight: "#edf2f7",
675
+ text: "#1a202c",
676
+ textMuted: "#718096",
677
+ highlight: "#3182ce",
678
+ warning: "#e53e3e"
679
+ },
680
+ typography: {
681
+ bodyFont: { stackId: "inter" },
682
+ titleFont: { stackId: "inter" },
683
+ titleWeight: "bold",
684
+ lineHeight: 1.6
685
+ },
686
+ style: {
687
+ textShadow: false,
688
+ overlayOpacity: 0.3,
689
+ animationSpeed: 1.2,
690
+ borderRadius: 8
691
+ },
692
+ renderStyle: {
693
+ name: "minimalist",
694
+ defaultTextAnimation: "fadeIn",
695
+ ambientMotion: false,
696
+ defaultTransition: { type: "fade", duration: 0.6 },
697
+ templateHints: {
698
+ title: { showAccentLine: false }
699
+ }
700
+ },
701
+ colorSchemes: {
702
+ blue: { bg: "#ebf8ff", text: "#2b6cb0", accent: "#3182ce" },
703
+ green: { bg: "#f0fff4", text: "#276749", accent: "#38a169" },
704
+ purple: { bg: "#faf5ff", text: "#553c9a", accent: "#805ad5" },
705
+ red: { bg: "#fff5f5", text: "#c53030", accent: "#e53e3e" },
706
+ orange: { bg: "#fffaf0", text: "#c05621", accent: "#dd6b20" },
707
+ teal: { bg: "#e6fffa", text: "#285e61", accent: "#319795" }
708
+ }
709
+ };
710
+
711
+ // src/schemas/themes/bold.json
712
+ var bold_default = {
713
+ schemaVersion: "1",
714
+ id: "bold",
715
+ name: "Bold",
716
+ description: "High-contrast black with vivid accents and dramatic animations.",
717
+ colors: {
718
+ primary: "#e53e3e",
719
+ secondary: "#ed8936",
720
+ background: "#000000",
721
+ backgroundLight: "#1a1a1a",
722
+ text: "#ffffff",
723
+ textMuted: "#cbd5e0",
724
+ highlight: "#f6e05e",
725
+ warning: "#fc8181"
726
+ },
727
+ typography: {
728
+ bodyFont: { stackId: "roboto" },
729
+ titleFont: { stackId: "oswald" },
730
+ titleWeight: "bold",
731
+ titleScale: 1.15,
732
+ bodyScale: 1,
733
+ titleLineHeight: 1.1
734
+ },
735
+ style: {
736
+ textShadow: true,
737
+ overlayOpacity: 0.6,
738
+ animationSpeed: 0.8
739
+ },
740
+ renderStyle: {
741
+ name: "bold",
742
+ defaultTextAnimation: "zoomIn",
743
+ defaultImageAnimation: "slowZoom",
744
+ ambientMotion: true,
745
+ defaultTransition: { type: "dissolve", duration: 0.5 },
746
+ templateHints: {
747
+ statHighlight: { entrance: "dramatic" },
748
+ fullBleedQuote: { entrance: "dramatic" }
749
+ }
750
+ },
751
+ colorSchemes: {
752
+ blue: { bg: "#1a202c", text: "#63b3ed", accent: "#90cdf4" },
753
+ green: { bg: "#1a202c", text: "#48bb78", accent: "#68d391" },
754
+ purple: { bg: "#1a202c", text: "#b794f4", accent: "#d6bcfa" },
755
+ red: { bg: "#1a202c", text: "#fc8181", accent: "#feb2b2" },
756
+ orange: { bg: "#1a202c", text: "#f6ad55", accent: "#fbd38d" },
757
+ teal: { bg: "#1a202c", text: "#4fd1c5", accent: "#81e6d9" }
758
+ }
759
+ };
760
+
761
+ // src/schemas/themes/morning-light.json
762
+ var morning_light_default = {
763
+ schemaVersion: "1",
764
+ id: "morning-light",
765
+ name: "Morning Light",
766
+ description: "Warm light background with dark text and gentle serif typography.",
767
+ colors: {
768
+ primary: "#744210",
769
+ secondary: "#975a16",
770
+ background: "#faf8f5",
771
+ backgroundLight: "#f5f0eb",
772
+ text: "#2d3748",
773
+ textMuted: "#718096",
774
+ highlight: "#dd6b20",
775
+ warning: "#c53030"
776
+ },
777
+ typography: {
778
+ bodyFont: { stackId: "lora" },
779
+ titleFont: { stackId: "merriweather" },
780
+ titleWeight: "bold",
781
+ lineHeight: 1.7
782
+ },
783
+ style: {
784
+ textShadow: false,
785
+ overlayOpacity: 0.35,
786
+ animationSpeed: 1.1,
787
+ borderRadius: 4
788
+ },
789
+ renderStyle: {
790
+ name: "morning-light",
791
+ defaultTextAnimation: "fadeIn",
792
+ ambientMotion: false,
793
+ defaultTransition: { type: "fade", duration: 1 }
794
+ },
795
+ colorSchemes: {
796
+ blue: { bg: "#ebf8ff", text: "#2c5282", accent: "#4299e1" },
797
+ green: { bg: "#f0fff4", text: "#22543d", accent: "#48bb78" },
798
+ purple: { bg: "#faf5ff", text: "#44337a", accent: "#9f7aea" },
799
+ red: { bg: "#fff5f5", text: "#9b2c2c", accent: "#fc8181" },
800
+ orange: { bg: "#fffaf0", text: "#744210", accent: "#ed8936" },
801
+ teal: { bg: "#e6fffa", text: "#234e52", accent: "#38b2ac" }
802
+ }
803
+ };
804
+
805
+ // src/schemas/themes/tech-dark.json
806
+ var tech_dark_default = {
807
+ schemaVersion: "1",
808
+ id: "tech-dark",
809
+ name: "Tech Dark",
810
+ description: "True black with neon cyan/green accents and monospace titles.",
811
+ colors: {
812
+ primary: "#00e5ff",
813
+ secondary: "#00e676",
814
+ background: "#0a0a0a",
815
+ backgroundLight: "#1a1a2e",
816
+ text: "#e0e0e0",
817
+ textMuted: "#9e9e9e",
818
+ highlight: "#00e5ff",
819
+ warning: "#ff5252"
820
+ },
821
+ typography: {
822
+ bodyFont: { stackId: "ibm-plex-sans" },
823
+ titleFont: { stackId: "jetbrains-mono" },
824
+ monoFont: { stackId: "jetbrains-mono" },
825
+ titleWeight: "bold",
826
+ titleScale: 0.9,
827
+ lineHeight: 1.5
828
+ },
829
+ style: {
830
+ textShadow: true,
831
+ overlayOpacity: 0.55,
832
+ animationSpeed: 0.9,
833
+ borderRadius: 2
834
+ },
835
+ renderStyle: {
836
+ name: "tech-dark",
837
+ defaultTextAnimation: "typewriter",
838
+ defaultImageAnimation: "slowZoom",
839
+ ambientMotion: true,
840
+ defaultTransition: { type: "dissolve", duration: 0.4 },
841
+ templateHints: {
842
+ statHighlight: { entrance: "dramatic" }
843
+ }
844
+ },
845
+ colorSchemes: {
846
+ blue: { bg: "#0d1b2a", text: "#00b0ff", accent: "#40c4ff" },
847
+ green: { bg: "#0d1b0d", text: "#00e676", accent: "#69f0ae" },
848
+ purple: { bg: "#1a0d2e", text: "#d500f9", accent: "#ea80fc" },
849
+ red: { bg: "#2e0d0d", text: "#ff5252", accent: "#ff8a80" },
850
+ orange: { bg: "#2e1a0d", text: "#ff9100", accent: "#ffab40" },
851
+ teal: { bg: "#0d2e2e", text: "#1de9b6", accent: "#64ffda" }
852
+ }
853
+ };
854
+
855
+ // src/schemas/themes/magazine.json
856
+ var magazine_default = {
857
+ schemaVersion: "1",
858
+ id: "magazine",
859
+ name: "Magazine",
860
+ description: "Rich editorial palette with mixed serif/sans typography and slide transitions.",
861
+ colors: {
862
+ primary: "#c53030",
863
+ secondary: "#2b6cb0",
864
+ background: "#1a202c",
865
+ backgroundLight: "#2d3748",
866
+ text: "#f7fafc",
867
+ textMuted: "#cbd5e0",
868
+ highlight: "#ed8936",
869
+ warning: "#fc8181"
870
+ },
871
+ typography: {
872
+ bodyFont: { stackId: "dm-sans" },
873
+ titleFont: { stackId: "dm-serif" },
874
+ titleWeight: "bold",
875
+ titleScale: 1.05,
876
+ lineHeight: 1.5
877
+ },
878
+ style: {
879
+ textShadow: true,
880
+ overlayOpacity: 0.45,
881
+ animationSpeed: 1,
882
+ borderRadius: 6
883
+ },
884
+ renderStyle: {
885
+ name: "magazine",
886
+ defaultTextAnimation: "fadeIn",
887
+ defaultImageAnimation: "slowZoom",
888
+ ambientMotion: true,
889
+ defaultTransition: { type: "slideLeft", duration: 0.7 }
890
+ },
891
+ colorSchemes: {
892
+ blue: { bg: "#1a365d", text: "#90cdf4", accent: "#63b3ed" },
893
+ green: { bg: "#1c4532", text: "#9ae6b4", accent: "#68d391" },
894
+ purple: { bg: "#322659", text: "#d6bcfa", accent: "#b794f4" },
895
+ red: { bg: "#63171b", text: "#feb2b2", accent: "#fc8181" },
896
+ orange: { bg: "#652b19", text: "#fbd38d", accent: "#f6ad55" },
897
+ teal: { bg: "#1d4044", text: "#81e6d9", accent: "#4fd1c5" }
898
+ }
899
+ };
900
+
901
+ // src/schemas/themes/cinematic.json
902
+ var cinematic_default = {
903
+ schemaVersion: "1",
904
+ id: "cinematic",
905
+ name: "Cinematic",
906
+ description: "Ultra-dark with moody gradients, gold accents, and slow dissolve transitions.",
907
+ colors: {
908
+ primary: "#d69e2e",
909
+ secondary: "#b7791f",
910
+ background: "#0a0f1a",
911
+ backgroundLight: "#1a202c",
912
+ text: "#f7fafc",
913
+ textMuted: "#a0aec0",
914
+ highlight: "#ecc94b",
915
+ warning: "#fc8181"
916
+ },
917
+ typography: {
918
+ bodyFont: { stackId: "crimson" },
919
+ titleFont: { stackId: "cormorant" },
920
+ titleWeight: "bold",
921
+ lineHeight: 1.5,
922
+ titleLineHeight: 1.2
923
+ },
924
+ style: {
925
+ textShadow: true,
926
+ overlayOpacity: 0.55,
927
+ animationSpeed: 1.2
928
+ },
929
+ renderStyle: {
930
+ name: "cinematic",
931
+ defaultTextAnimation: "fadeIn",
932
+ defaultImageAnimation: "slowZoom",
933
+ ambientMotion: true,
934
+ defaultTransition: { type: "dissolve", duration: 1.2 },
935
+ templateHints: {
936
+ title: { showAccentLine: true }
937
+ }
938
+ },
939
+ colorSchemes: {
940
+ blue: { bg: "#0d1b2a", text: "#90cdf4", accent: "#63b3ed" },
941
+ green: { bg: "#0d1b14", text: "#9ae6b4", accent: "#68d391" },
942
+ purple: { bg: "#1a0d2e", text: "#d6bcfa", accent: "#b794f4" },
943
+ red: { bg: "#2a0d0d", text: "#fc8181", accent: "#feb2b2" },
944
+ orange: { bg: "#2a1a0d", text: "#fbd38d", accent: "#f6ad55" },
945
+ teal: { bg: "#0d2a2a", text: "#81e6d9", accent: "#4fd1c5" }
946
+ },
947
+ persistentLayers: {
948
+ bottomLayers: [
949
+ {
950
+ template: "gradientBackground",
951
+ config: { type: "gradientBackground", preset: "radial-dark" }
952
+ }
953
+ ]
954
+ }
955
+ };
956
+
957
+ // src/schemas/themes/warm-earth.json
958
+ var warm_earth_default = {
959
+ schemaVersion: "1",
960
+ id: "warm-earth",
961
+ name: "Warm Earth",
962
+ description: "Natural warm tones with earthy browns and terracotta accents.",
963
+ colors: {
964
+ primary: "#9c4221",
965
+ secondary: "#c05621",
966
+ background: "#1c1410",
967
+ backgroundLight: "#2d241e",
968
+ text: "#faf5f0",
969
+ textMuted: "#c4a882",
970
+ highlight: "#dd6b20",
971
+ warning: "#e53e3e"
972
+ },
973
+ typography: {
974
+ bodyFont: { stackId: "pt-serif" },
975
+ titleFont: { stackId: "pt-serif" },
976
+ titleWeight: "bold",
977
+ lineHeight: 1.6
978
+ },
979
+ style: {
980
+ textShadow: true,
981
+ overlayOpacity: 0.5,
982
+ animationSpeed: 1.1
983
+ },
984
+ renderStyle: {
985
+ name: "warm-earth",
986
+ defaultTextAnimation: "fadeIn",
987
+ defaultImageAnimation: "panLeft",
988
+ ambientMotion: true,
989
+ defaultTransition: { type: "fade", duration: 0.9 }
990
+ },
991
+ colorSchemes: {
992
+ blue: { bg: "#2a1f14", text: "#90cdf4", accent: "#63b3ed" },
993
+ green: { bg: "#1e2a14", text: "#9ae6b4", accent: "#68d391" },
994
+ purple: { bg: "#2a142a", text: "#d6bcfa", accent: "#b794f4" },
995
+ red: { bg: "#2a1414", text: "#fc8181", accent: "#feb2b2" },
996
+ orange: { bg: "#2a1e0a", text: "#fbd38d", accent: "#f6ad55" },
997
+ teal: { bg: "#142a28", text: "#81e6d9", accent: "#4fd1c5" }
998
+ },
999
+ persistentLayers: {
1000
+ bottomLayers: [
1001
+ {
1002
+ template: "gradientBackground",
1003
+ config: { type: "gradientBackground", preset: "earth-tones" }
1004
+ }
1005
+ ]
1006
+ }
1007
+ };
1008
+
1009
+ // src/schemas/themes/gezellig.json
1010
+ var gezellig_default = {
1011
+ schemaVersion: "1",
1012
+ id: "gezellig",
1013
+ name: "Gezellig",
1014
+ description: "Warm sage + terracotta palette inspired by the Gezel desktop app. Subtle orange-tinted dark background, cream text, sage and terracotta accents.",
1015
+ colors: {
1016
+ primary: "#b0724c",
1017
+ secondary: "#667f62",
1018
+ background: "#1f1a17",
1019
+ backgroundLight: "#2b2420",
1020
+ text: "#f3ede0",
1021
+ textMuted: "#a89b85",
1022
+ highlight: "#c0875d",
1023
+ warning: "#e07a6b"
1024
+ },
1025
+ typography: {
1026
+ bodyFont: { stackId: "system-sans-emoji" },
1027
+ titleFont: { stackId: "system-serif-emoji" },
1028
+ monoFont: { stackId: "system-mono" },
1029
+ titleWeight: "bold",
1030
+ lineHeight: 1.55
1031
+ },
1032
+ style: {
1033
+ textShadow: false,
1034
+ overlayOpacity: 0.4,
1035
+ animationSpeed: 1,
1036
+ borderRadius: 6
1037
+ },
1038
+ renderStyle: {
1039
+ name: "gezellig",
1040
+ defaultTextAnimation: "fadeIn",
1041
+ defaultImageAnimation: "slowZoom",
1042
+ ambientMotion: false,
1043
+ defaultTransition: { type: "fade", duration: 0.6 }
1044
+ },
1045
+ colorSchemes: {
1046
+ terracotta: { bg: "#3d2620", text: "#f3ede0", accent: "#c0875d" },
1047
+ sage: { bg: "#28332a", text: "#e3ead9", accent: "#8aa589" },
1048
+ amber: { bg: "#3d2e17", text: "#fbe3a8", accent: "#d4a149" },
1049
+ plum: { bg: "#2e1f2a", text: "#e8d4e0", accent: "#b088a5" },
1050
+ ink: { bg: "#1a1f26", text: "#d5dde8", accent: "#7b8fa8" },
1051
+ cream: { bg: "#f3ede0", text: "#2b2420", accent: "#b0724c" }
1052
+ }
1053
+ };
1054
+
1055
+ // src/schemas/themes/index.ts
1056
+ var standard = assertTheme(standard_default, "standard.json");
1057
+ var standardDark = assertTheme(standard_dark_default, "standard-dark.json");
1058
+ var documentary = assertTheme(documentary_default, "documentary.json");
1059
+ var minimalist = assertTheme(minimalist_default, "minimalist.json");
1060
+ var bold = assertTheme(bold_default, "bold.json");
1061
+ var morningLight = assertTheme(morning_light_default, "morning-light.json");
1062
+ var techDark = assertTheme(tech_dark_default, "tech-dark.json");
1063
+ var magazine = assertTheme(magazine_default, "magazine.json");
1064
+ var cinematic = assertTheme(cinematic_default, "cinematic.json");
1065
+ var warmEarth = assertTheme(warm_earth_default, "warm-earth.json");
1066
+ var gezellig = assertTheme(gezellig_default, "gezellig.json");
1067
+ var BUILTIN_THEMES = {
1068
+ standard,
1069
+ "standard-dark": standardDark,
1070
+ documentary,
1071
+ minimalist,
1072
+ bold,
1073
+ "morning-light": morningLight,
1074
+ "tech-dark": techDark,
1075
+ magazine,
1076
+ cinematic,
1077
+ "warm-earth": warmEarth,
1078
+ gezellig
1079
+ };
1080
+
1081
+ // src/schemas/themeLibrary.ts
1082
+ var THEMES = BUILTIN_THEMES;
1083
+ var DEFAULT_THEME_ID = "standard";
1084
+ var DEFAULT_THEME = THEMES[DEFAULT_THEME_ID];
1085
+ function resolveTheme(id) {
1086
+ const registered = lookupRegisteredTheme(id);
1087
+ if (registered) return registered;
1088
+ if (id && id in THEMES) return THEMES[id];
1089
+ return DEFAULT_THEME;
1090
+ }
1091
+ function getAvailableThemes() {
1092
+ return Object.keys(THEMES);
1093
+ }
1094
+ function getThemeSummaries() {
1095
+ return Object.values(THEMES).map((t) => ({
1096
+ id: t.id,
1097
+ name: t.name,
1098
+ description: t.description
1099
+ }));
1100
+ }
1101
+
1102
+ // src/schemas/fontStacks.ts
1103
+ var AVAILABLE_FONT_STACKS = [
1104
+ // System defaults
1105
+ {
1106
+ id: "system-sans",
1107
+ label: "System Sans",
1108
+ family: 'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',
1109
+ kind: "sans"
1110
+ },
1111
+ {
1112
+ id: "system-serif",
1113
+ label: "System Serif",
1114
+ family: 'Georgia, "Times New Roman", serif',
1115
+ kind: "serif"
1116
+ },
1117
+ {
1118
+ id: "system-mono",
1119
+ label: "System Mono",
1120
+ family: 'Consolas, "Courier New", monospace',
1121
+ kind: "mono"
1122
+ },
1123
+ // Curated Google Fonts. `googleFontFamily` is the canonical family
1124
+ // name Google serves the face under (used by exports that emit a
1125
+ // `<link rel="stylesheet" href="https://fonts.googleapis.com/...">`
1126
+ // so the face renders even when the host doesn't preload it).
1127
+ {
1128
+ id: "inter",
1129
+ label: "Inter",
1130
+ family: '"Inter", "Segoe UI", Roboto, sans-serif',
1131
+ kind: "sans",
1132
+ googleFontFamily: "Inter"
1133
+ },
1134
+ {
1135
+ id: "ibm-plex-sans",
1136
+ label: "IBM Plex Sans",
1137
+ family: '"IBM Plex Sans", "Segoe UI", Roboto, sans-serif',
1138
+ kind: "sans",
1139
+ googleFontFamily: "IBM Plex Sans"
1140
+ },
1141
+ {
1142
+ id: "roboto",
1143
+ label: "Roboto",
1144
+ family: '"Roboto", "Segoe UI", Arial, sans-serif',
1145
+ kind: "sans",
1146
+ googleFontFamily: "Roboto"
1147
+ },
1148
+ {
1149
+ id: "dm-sans",
1150
+ label: "DM Sans",
1151
+ family: '"DM Sans", "Segoe UI", Roboto, sans-serif',
1152
+ kind: "sans",
1153
+ googleFontFamily: "DM Sans"
1154
+ },
1155
+ {
1156
+ id: "oswald",
1157
+ label: "Oswald",
1158
+ family: '"Oswald", Impact, "Arial Black", sans-serif',
1159
+ kind: "display",
1160
+ googleFontFamily: "Oswald"
1161
+ },
1162
+ {
1163
+ id: "playfair",
1164
+ label: "Playfair Display",
1165
+ family: '"Playfair Display", Georgia, serif',
1166
+ kind: "serif",
1167
+ googleFontFamily: "Playfair Display"
1168
+ },
1169
+ {
1170
+ id: "source-serif",
1171
+ label: "Source Serif",
1172
+ family: '"Source Serif 4", "PT Serif", Georgia, serif',
1173
+ kind: "serif",
1174
+ googleFontFamily: "Source Serif 4"
1175
+ },
1176
+ {
1177
+ id: "merriweather",
1178
+ label: "Merriweather",
1179
+ family: '"Merriweather", Georgia, serif',
1180
+ kind: "serif",
1181
+ googleFontFamily: "Merriweather"
1182
+ },
1183
+ {
1184
+ id: "lora",
1185
+ label: "Lora",
1186
+ family: '"Lora", "Merriweather", Georgia, serif',
1187
+ kind: "serif",
1188
+ googleFontFamily: "Lora"
1189
+ },
1190
+ {
1191
+ id: "pt-serif",
1192
+ label: "PT Serif",
1193
+ family: '"PT Serif", Georgia, serif',
1194
+ kind: "serif",
1195
+ googleFontFamily: "PT Serif"
1196
+ },
1197
+ {
1198
+ id: "crimson",
1199
+ label: "Crimson Text",
1200
+ family: '"Crimson Text", Georgia, serif',
1201
+ kind: "serif",
1202
+ googleFontFamily: "Crimson Text"
1203
+ },
1204
+ {
1205
+ id: "cormorant",
1206
+ label: "Cormorant Garamond",
1207
+ family: '"Cormorant Garamond", Garamond, Georgia, serif',
1208
+ kind: "serif",
1209
+ googleFontFamily: "Cormorant Garamond"
1210
+ },
1211
+ {
1212
+ id: "dm-serif",
1213
+ label: "DM Serif Display",
1214
+ family: '"DM Serif Display", Georgia, serif',
1215
+ kind: "display",
1216
+ googleFontFamily: "DM Serif Display"
1217
+ },
1218
+ {
1219
+ id: "jetbrains-mono",
1220
+ label: "JetBrains Mono",
1221
+ family: '"JetBrains Mono", "Fira Code", Consolas, monospace',
1222
+ kind: "mono",
1223
+ googleFontFamily: "JetBrains Mono"
1224
+ },
1225
+ // Themed system stacks with emoji fallbacks (used by gezellig)
1226
+ {
1227
+ id: "system-sans-emoji",
1228
+ label: "System Sans + Emoji",
1229
+ family: 'system-ui, -apple-system, "Segoe UI", Roboto, "OpenMoji Color", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif',
1230
+ kind: "sans"
1231
+ },
1232
+ {
1233
+ id: "system-serif-emoji",
1234
+ label: "System Serif + Emoji",
1235
+ family: 'Georgia, "Times New Roman", "OpenMoji Color", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", serif',
1236
+ kind: "serif"
1237
+ }
1238
+ ];
1239
+ var STACKS_BY_ID = Object.fromEntries(
1240
+ AVAILABLE_FONT_STACKS.map((s) => [s.id, s])
1241
+ );
1242
+ function getFontStack(id) {
1243
+ return STACKS_BY_ID[id];
1244
+ }
1245
+ var FALLBACK_BY_KIND = {
1246
+ sans: "system-ui, sans-serif",
1247
+ serif: "Georgia, serif",
1248
+ mono: "Consolas, monospace",
1249
+ display: "Impact, Arial, sans-serif"
1250
+ };
1251
+ function resolveFontFamily(family, roleFallback) {
1252
+ if (!family) return roleFallback;
1253
+ if (typeof family === "string") return family;
1254
+ if ("stackId" in family) {
1255
+ const stack = STACKS_BY_ID[family.stackId];
1256
+ return stack ? stack.family : roleFallback;
1257
+ }
1258
+ if ("custom" in family) {
1259
+ const { name, fallback } = family.custom;
1260
+ const fb = fallback === "system-ui" ? "system-ui, sans-serif" : fallback === "serif" ? "Georgia, serif" : fallback === "monospace" ? "Consolas, monospace" : "system-ui, sans-serif";
1261
+ const safeName = name.includes(" ") || name.includes(",") ? `"${name}"` : name;
1262
+ return `${safeName}, ${fb}`;
1263
+ }
1264
+ return roleFallback;
1265
+ }
1266
+ function fontStack(id) {
1267
+ return { stackId: id };
1268
+ }
1269
+ function buildGoogleFontsUrl(families) {
1270
+ const names = /* @__PURE__ */ new Set();
1271
+ for (const f of families) {
1272
+ if (!f || typeof f === "string") continue;
1273
+ if ("stackId" in f) {
1274
+ const stack = STACKS_BY_ID[f.stackId];
1275
+ if (stack?.googleFontFamily) names.add(stack.googleFontFamily);
1276
+ }
1277
+ }
1278
+ if (names.size === 0) return null;
1279
+ const params = Array.from(names).sort().map((name) => `family=${encodeURIComponent(name).replace(/%20/g, "+")}:wght@400;700`).join("&");
1280
+ return `https://fonts.googleapis.com/css2?${params}&display=swap`;
1281
+ }
1282
+ var FONT_FALLBACKS = FALLBACK_BY_KIND;
1283
+
1284
+ export {
1285
+ THEME_SCHEMA_VERSION,
1286
+ createTheme,
1287
+ LIGHT_SURFACE,
1288
+ DARK_SURFACE,
1289
+ applySurface,
1290
+ registerTheme,
1291
+ unregisterTheme,
1292
+ getRegisteredThemes,
1293
+ lookupRegisteredTheme,
1294
+ isHex,
1295
+ oklchLighten,
1296
+ oklchDarken,
1297
+ oklchSetChroma,
1298
+ relativeLuminance,
1299
+ contrastRatio,
1300
+ pickContrastingText,
1301
+ deriveScale,
1302
+ validateTheme,
1303
+ assertTheme,
1304
+ THEMES,
1305
+ DEFAULT_THEME_ID,
1306
+ DEFAULT_THEME,
1307
+ resolveTheme,
1308
+ getAvailableThemes,
1309
+ getThemeSummaries,
1310
+ AVAILABLE_FONT_STACKS,
1311
+ getFontStack,
1312
+ resolveFontFamily,
1313
+ fontStack,
1314
+ buildGoogleFontsUrl,
1315
+ FONT_FALLBACKS
1316
+ };
1317
+ //# sourceMappingURL=chunk-B4EEON3N.js.map