@bendyline/squisq 1.3.0 → 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 (419) hide show
  1. package/dist/{Doc-Ch4tc3vv.d.ts → Doc-BeSeH2iX.d.ts} +118 -41
  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__/markdownIcons.test.d.ts +2 -0
  42. package/dist/__tests__/markdownIcons.test.d.ts.map +1 -0
  43. package/dist/__tests__/markdownIcons.test.js +93 -0
  44. package/dist/__tests__/markdownIcons.test.js.map +1 -0
  45. package/dist/__tests__/markdownToDoc.test.js +15 -4
  46. package/dist/__tests__/markdownToDoc.test.js.map +1 -1
  47. package/dist/__tests__/recommendTemplates.test.d.ts +2 -0
  48. package/dist/__tests__/recommendTemplates.test.d.ts.map +1 -0
  49. package/dist/__tests__/recommendTemplates.test.js +158 -0
  50. package/dist/__tests__/recommendTemplates.test.js.map +1 -0
  51. package/dist/__tests__/scopedContentContainer.test.d.ts +2 -0
  52. package/dist/__tests__/scopedContentContainer.test.d.ts.map +1 -0
  53. package/dist/__tests__/scopedContentContainer.test.js +74 -0
  54. package/dist/__tests__/scopedContentContainer.test.js.map +1 -0
  55. package/dist/__tests__/slideshowGenerator.test.js +1 -1
  56. package/dist/__tests__/slideshowGenerator.test.js.map +1 -1
  57. package/dist/__tests__/templateAnnotationParse.test.d.ts +2 -0
  58. package/dist/__tests__/templateAnnotationParse.test.d.ts.map +1 -0
  59. package/dist/__tests__/templateAnnotationParse.test.js +42 -0
  60. package/dist/__tests__/templateAnnotationParse.test.js.map +1 -0
  61. package/dist/__tests__/templates.test.js +90 -9
  62. package/dist/__tests__/templates.test.js.map +1 -1
  63. package/dist/__tests__/themeCompile.test.d.ts +2 -0
  64. package/dist/__tests__/themeCompile.test.d.ts.map +1 -0
  65. package/dist/__tests__/themeCompile.test.js +134 -0
  66. package/dist/__tests__/themeCompile.test.js.map +1 -0
  67. package/dist/__tests__/themeValidator.test.d.ts +2 -0
  68. package/dist/__tests__/themeValidator.test.d.ts.map +1 -0
  69. package/dist/__tests__/themeValidator.test.js +107 -0
  70. package/dist/__tests__/themeValidator.test.js.map +1 -0
  71. package/dist/__tests__/versions.test.d.ts +2 -0
  72. package/dist/__tests__/versions.test.d.ts.map +1 -0
  73. package/dist/__tests__/versions.test.js +339 -0
  74. package/dist/__tests__/versions.test.js.map +1 -0
  75. package/dist/{chunk-CYQHG27J.js → chunk-2TMAWB4Y.js} +74 -1
  76. package/dist/chunk-2TMAWB4Y.js.map +1 -0
  77. package/dist/{chunk-OASJKWO5.js → chunk-3K5OG6KI.js} +92 -7
  78. package/dist/chunk-3K5OG6KI.js.map +1 -0
  79. package/dist/chunk-57CVQCFX.js +193 -0
  80. package/dist/chunk-57CVQCFX.js.map +1 -0
  81. package/dist/{chunk-QM5PKNPW.js → chunk-5WFRKURX.js} +1 -1
  82. package/dist/chunk-5WFRKURX.js.map +1 -0
  83. package/dist/chunk-B4EEON3N.js +1317 -0
  84. package/dist/chunk-B4EEON3N.js.map +1 -0
  85. package/dist/chunk-DBS6RIFL.js +81 -0
  86. package/dist/chunk-DBS6RIFL.js.map +1 -0
  87. package/dist/{chunk-MIBRIRGJ.js → chunk-FR2RBTKO.js} +3 -3
  88. package/dist/{chunk-MIBRIRGJ.js.map → chunk-FR2RBTKO.js.map} +1 -1
  89. package/dist/chunk-H3AXU4MJ.js +179 -0
  90. package/dist/chunk-H3AXU4MJ.js.map +1 -0
  91. package/dist/chunk-JELIRVDP.js +24 -0
  92. package/dist/chunk-JELIRVDP.js.map +1 -0
  93. package/dist/chunk-K32VJONL.js +193 -0
  94. package/dist/chunk-K32VJONL.js.map +1 -0
  95. package/dist/{chunk-6BAVXFYC.js → chunk-KSWJR66U.js} +218 -42
  96. package/dist/chunk-KSWJR66U.js.map +1 -0
  97. package/dist/{chunk-TSG2OSE6.js → chunk-MYIH7FWD.js} +3 -3
  98. package/dist/chunk-MYIH7FWD.js.map +1 -0
  99. package/dist/chunk-VLJJHDAC.js +218 -0
  100. package/dist/chunk-VLJJHDAC.js.map +1 -0
  101. package/dist/chunk-WMOI7FN3.js +182 -0
  102. package/dist/chunk-WMOI7FN3.js.map +1 -0
  103. package/dist/chunk-ZTX4PFFT.js +520 -0
  104. package/dist/chunk-ZTX4PFFT.js.map +1 -0
  105. package/dist/doc/audioMapping.d.ts.map +1 -1
  106. package/dist/doc/audioMapping.js +42 -7
  107. package/dist/doc/audioMapping.js.map +1 -1
  108. package/dist/doc/getLayers.d.ts.map +1 -1
  109. package/dist/doc/getLayers.js +29 -18
  110. package/dist/doc/getLayers.js.map +1 -1
  111. package/dist/doc/markdownToDoc.d.ts.map +1 -1
  112. package/dist/doc/markdownToDoc.js +40 -6
  113. package/dist/doc/markdownToDoc.js.map +1 -1
  114. package/dist/doc/templates/featureBlock.d.ts +18 -0
  115. package/dist/doc/templates/featureBlock.d.ts.map +1 -0
  116. package/dist/doc/templates/featureBlock.js +180 -0
  117. package/dist/doc/templates/featureBlock.js.map +1 -0
  118. package/dist/doc/templates/fullBleedQuote.d.ts +12 -0
  119. package/dist/doc/templates/fullBleedQuote.d.ts.map +1 -1
  120. package/dist/doc/templates/fullBleedQuote.js +12 -0
  121. package/dist/doc/templates/fullBleedQuote.js.map +1 -1
  122. package/dist/doc/templates/index.d.ts +28 -4
  123. package/dist/doc/templates/index.d.ts.map +1 -1
  124. package/dist/doc/templates/index.js +45 -12
  125. package/dist/doc/templates/index.js.map +1 -1
  126. package/dist/doc/templates/listBlock.d.ts.map +1 -1
  127. package/dist/doc/templates/listBlock.js +22 -5
  128. package/dist/doc/templates/listBlock.js.map +1 -1
  129. package/dist/doc/templates/statHighlight.d.ts +12 -0
  130. package/dist/doc/templates/statHighlight.d.ts.map +1 -1
  131. package/dist/doc/templates/statHighlight.js +12 -0
  132. package/dist/doc/templates/statHighlight.js.map +1 -1
  133. package/dist/doc/templates/titleBlock.d.ts +11 -0
  134. package/dist/doc/templates/titleBlock.d.ts.map +1 -1
  135. package/dist/doc/templates/titleBlock.js +8 -0
  136. package/dist/doc/templates/titleBlock.js.map +1 -1
  137. package/dist/doc/utils/themeUtils.d.ts +4 -4
  138. package/dist/doc/utils/themeUtils.d.ts.map +1 -1
  139. package/dist/doc/utils/themeUtils.js +8 -7
  140. package/dist/doc/utils/themeUtils.js.map +1 -1
  141. package/dist/generate/slideshowGenerator.js +1 -1
  142. package/dist/generate/slideshowGenerator.js.map +1 -1
  143. package/dist/generate/templateMapper.js +2 -2
  144. package/dist/generate/templateMapper.js.map +1 -1
  145. package/dist/icons/iconData.d.ts +26 -0
  146. package/dist/icons/iconData.d.ts.map +1 -0
  147. package/dist/icons/iconData.js +12 -0
  148. package/dist/icons/iconData.js.map +1 -0
  149. package/dist/icons/index.d.ts +12 -0
  150. package/dist/icons/index.d.ts.map +1 -0
  151. package/dist/icons/index.js +10 -0
  152. package/dist/icons/index.js.map +1 -0
  153. package/dist/icons/resolve.d.ts +61 -0
  154. package/dist/icons/resolve.d.ts.map +1 -0
  155. package/dist/icons/resolve.js +130 -0
  156. package/dist/icons/resolve.js.map +1 -0
  157. package/dist/imageEdit/ImageEditVersionManager.d.ts +31 -0
  158. package/dist/imageEdit/ImageEditVersionManager.d.ts.map +1 -0
  159. package/dist/imageEdit/ImageEditVersionManager.js +39 -0
  160. package/dist/imageEdit/ImageEditVersionManager.js.map +1 -0
  161. package/dist/imageEdit/export.d.ts +33 -0
  162. package/dist/imageEdit/export.d.ts.map +1 -0
  163. package/dist/imageEdit/export.js +253 -0
  164. package/dist/imageEdit/export.js.map +1 -0
  165. package/dist/imageEdit/index.d.ts +14 -0
  166. package/dist/imageEdit/index.d.ts.map +1 -0
  167. package/dist/imageEdit/index.js +22 -0
  168. package/dist/imageEdit/index.js.map +1 -0
  169. package/dist/imageEdit/persistence.d.ts +15 -0
  170. package/dist/imageEdit/persistence.d.ts.map +1 -0
  171. package/dist/imageEdit/persistence.js +49 -0
  172. package/dist/imageEdit/persistence.js.map +1 -0
  173. package/dist/imageEdit/state.d.ts +42 -0
  174. package/dist/imageEdit/state.d.ts.map +1 -0
  175. package/dist/imageEdit/state.js +98 -0
  176. package/dist/imageEdit/state.js.map +1 -0
  177. package/dist/imageEdit/versionPaths.d.ts +27 -0
  178. package/dist/imageEdit/versionPaths.d.ts.map +1 -0
  179. package/dist/imageEdit/versionPaths.js +57 -0
  180. package/dist/imageEdit/versionPaths.js.map +1 -0
  181. package/dist/imageEdit/versions.d.ts +67 -0
  182. package/dist/imageEdit/versions.d.ts.map +1 -0
  183. package/dist/imageEdit/versions.js +161 -0
  184. package/dist/imageEdit/versions.js.map +1 -0
  185. package/dist/index.d.ts +4 -0
  186. package/dist/index.d.ts.map +1 -1
  187. package/dist/index.js +4 -0
  188. package/dist/index.js.map +1 -1
  189. package/dist/jsonForm/chooseControl.d.ts +20 -0
  190. package/dist/jsonForm/chooseControl.d.ts.map +1 -0
  191. package/dist/jsonForm/chooseControl.js +82 -0
  192. package/dist/jsonForm/chooseControl.js.map +1 -0
  193. package/dist/jsonForm/evaluateWhen.d.ts +12 -0
  194. package/dist/jsonForm/evaluateWhen.d.ts.map +1 -0
  195. package/dist/jsonForm/evaluateWhen.js +65 -0
  196. package/dist/jsonForm/evaluateWhen.js.map +1 -0
  197. package/dist/jsonForm/index.d.ts +14 -0
  198. package/dist/jsonForm/index.d.ts.map +1 -0
  199. package/dist/jsonForm/index.js +12 -0
  200. package/dist/jsonForm/index.js.map +1 -0
  201. package/dist/jsonForm/inferSchema.d.ts +12 -0
  202. package/dist/jsonForm/inferSchema.d.ts.map +1 -0
  203. package/dist/jsonForm/inferSchema.js +15 -0
  204. package/dist/jsonForm/inferSchema.js.map +1 -0
  205. package/dist/jsonForm/pointer.d.ts +26 -0
  206. package/dist/jsonForm/pointer.d.ts.map +1 -0
  207. package/dist/jsonForm/pointer.js +102 -0
  208. package/dist/jsonForm/pointer.js.map +1 -0
  209. package/dist/jsonForm/types.d.ts +120 -0
  210. package/dist/jsonForm/types.d.ts.map +1 -0
  211. package/dist/jsonForm/types.js +10 -0
  212. package/dist/jsonForm/types.js.map +1 -0
  213. package/dist/markdown/convert.d.ts +11 -1
  214. package/dist/markdown/convert.d.ts.map +1 -1
  215. package/dist/markdown/convert.js +135 -5
  216. package/dist/markdown/convert.js.map +1 -1
  217. package/dist/markdown/index.d.ts +1 -1
  218. package/dist/markdown/index.d.ts.map +1 -1
  219. package/dist/markdown/index.js +1 -1
  220. package/dist/markdown/index.js.map +1 -1
  221. package/dist/markdown/types.d.ts +17 -2
  222. package/dist/markdown/types.d.ts.map +1 -1
  223. package/dist/markdown/utils.d.ts +40 -0
  224. package/dist/markdown/utils.d.ts.map +1 -1
  225. package/dist/markdown/utils.js +155 -0
  226. package/dist/markdown/utils.js.map +1 -1
  227. package/dist/recommend/index.d.ts +16 -0
  228. package/dist/recommend/index.d.ts.map +1 -0
  229. package/dist/recommend/index.js +15 -0
  230. package/dist/recommend/index.js.map +1 -0
  231. package/dist/recommend/templates.d.ts +39 -0
  232. package/dist/recommend/templates.d.ts.map +1 -0
  233. package/dist/recommend/templates.js +235 -0
  234. package/dist/recommend/templates.js.map +1 -0
  235. package/dist/schemas/BlockTemplates.d.ts +46 -8
  236. package/dist/schemas/BlockTemplates.d.ts.map +1 -1
  237. package/dist/schemas/BlockTemplates.js +3 -3
  238. package/dist/schemas/BlockTemplates.js.map +1 -1
  239. package/dist/schemas/ImageEditDoc.d.ts +81 -0
  240. package/dist/schemas/ImageEditDoc.d.ts.map +1 -0
  241. package/dist/schemas/ImageEditDoc.js +20 -0
  242. package/dist/schemas/ImageEditDoc.js.map +1 -0
  243. package/dist/schemas/Theme.d.ts +70 -31
  244. package/dist/schemas/Theme.d.ts.map +1 -1
  245. package/dist/schemas/Theme.js +48 -16
  246. package/dist/schemas/Theme.js.map +1 -1
  247. package/dist/schemas/colorUtils.d.ts +51 -0
  248. package/dist/schemas/colorUtils.d.ts.map +1 -0
  249. package/dist/schemas/colorUtils.js +154 -0
  250. package/dist/schemas/colorUtils.js.map +1 -0
  251. package/dist/schemas/fontStacks.d.ts +57 -0
  252. package/dist/schemas/fontStacks.d.ts.map +1 -0
  253. package/dist/schemas/fontStacks.js +227 -0
  254. package/dist/schemas/fontStacks.js.map +1 -0
  255. package/dist/schemas/index.d.ts +5 -0
  256. package/dist/schemas/index.d.ts.map +1 -1
  257. package/dist/schemas/index.js +4 -0
  258. package/dist/schemas/index.js.map +1 -1
  259. package/dist/schemas/themeCompile.d.ts +45 -0
  260. package/dist/schemas/themeCompile.d.ts.map +1 -0
  261. package/dist/schemas/themeCompile.js +160 -0
  262. package/dist/schemas/themeCompile.js.map +1 -0
  263. package/dist/schemas/themeLibrary.d.ts +11 -15
  264. package/dist/schemas/themeLibrary.d.ts.map +1 -1
  265. package/dist/schemas/themeLibrary.js +18 -566
  266. package/dist/schemas/themeLibrary.js.map +1 -1
  267. package/dist/schemas/themeValidator.d.ts +26 -0
  268. package/dist/schemas/themeValidator.d.ts.map +1 -0
  269. package/dist/schemas/themeValidator.js +352 -0
  270. package/dist/schemas/themeValidator.js.map +1 -0
  271. package/dist/schemas/themes/bold.json +48 -0
  272. package/dist/schemas/themes/cinematic.json +54 -0
  273. package/dist/schemas/themes/documentary.json +49 -0
  274. package/dist/schemas/themes/gezellig.json +44 -0
  275. package/dist/schemas/themes/index.d.ts +26 -0
  276. package/dist/schemas/themes/index.d.ts.map +1 -0
  277. package/dist/schemas/themes/index.js +49 -0
  278. package/dist/schemas/themes/index.js.map +1 -0
  279. package/dist/schemas/themes/magazine.json +44 -0
  280. package/dist/schemas/themes/minimalist.json +45 -0
  281. package/dist/schemas/themes/morning-light.json +42 -0
  282. package/dist/schemas/themes/standard-dark.json +50 -0
  283. package/dist/schemas/themes/standard.json +42 -0
  284. package/dist/schemas/themes/tech-dark.json +48 -0
  285. package/dist/schemas/themes/warm-earth.json +50 -0
  286. package/dist/storage/ScopedContentContainer.d.ts +44 -0
  287. package/dist/storage/ScopedContentContainer.d.ts.map +1 -0
  288. package/dist/storage/ScopedContentContainer.js +94 -0
  289. package/dist/storage/ScopedContentContainer.js.map +1 -0
  290. package/dist/storage/index.d.ts +1 -0
  291. package/dist/storage/index.d.ts.map +1 -1
  292. package/dist/storage/index.js +1 -0
  293. package/dist/storage/index.js.map +1 -1
  294. package/dist/story/index.d.ts +53 -13
  295. package/dist/story/index.js +12 -4
  296. package/dist/themeLibrary-BHjJ0Qx6.d.ts +40 -0
  297. package/dist/{types-CkNttVSF.d.ts → types-BdZkdJ3z.d.ts} +17 -2
  298. package/dist/types-D98li1gV.d.ts +93 -0
  299. package/dist/versions/DocumentVersionManager.d.ts +31 -0
  300. package/dist/versions/DocumentVersionManager.d.ts.map +1 -0
  301. package/dist/versions/DocumentVersionManager.js +33 -0
  302. package/dist/versions/DocumentVersionManager.js.map +1 -0
  303. package/dist/versions/index.d.ts +29 -0
  304. package/dist/versions/index.d.ts.map +1 -0
  305. package/dist/versions/index.js +28 -0
  306. package/dist/versions/index.js.map +1 -0
  307. package/dist/versions/operations.d.ts +44 -0
  308. package/dist/versions/operations.d.ts.map +1 -0
  309. package/dist/versions/operations.js +190 -0
  310. package/dist/versions/operations.js.map +1 -0
  311. package/dist/versions/paths.d.ts +29 -0
  312. package/dist/versions/paths.d.ts.map +1 -0
  313. package/dist/versions/paths.js +66 -0
  314. package/dist/versions/paths.js.map +1 -0
  315. package/dist/versions/timestamp.d.ts +22 -0
  316. package/dist/versions/timestamp.d.ts.map +1 -0
  317. package/dist/versions/timestamp.js +44 -0
  318. package/dist/versions/timestamp.js.map +1 -0
  319. package/dist/versions/types.d.ts +92 -0
  320. package/dist/versions/types.d.ts.map +1 -0
  321. package/dist/versions/types.js +11 -0
  322. package/dist/versions/types.js.map +1 -0
  323. package/package.json +28 -1
  324. package/src/__tests__/colorUtils.test.ts +112 -0
  325. package/src/__tests__/getLayers.test.ts +32 -7
  326. package/src/__tests__/iconResolve.test.ts +122 -0
  327. package/src/__tests__/imageEditState.test.ts +74 -0
  328. package/src/__tests__/imageEditVersions.test.ts +169 -0
  329. package/src/__tests__/inferDocumentTitle.test.ts +50 -0
  330. package/src/__tests__/jsonForm.chooseControl.test.ts +86 -0
  331. package/src/__tests__/jsonForm.evaluateWhen.test.ts +59 -0
  332. package/src/__tests__/jsonForm.inferSchema.test.ts +25 -0
  333. package/src/__tests__/jsonForm.pointer.test.ts +103 -0
  334. package/src/__tests__/markdownIcons.test.ts +104 -0
  335. package/src/__tests__/markdownToDoc.test.ts +19 -4
  336. package/src/__tests__/recommendTemplates.test.ts +183 -0
  337. package/src/__tests__/scopedContentContainer.test.ts +89 -0
  338. package/src/__tests__/slideshowGenerator.test.ts +1 -1
  339. package/src/__tests__/templateAnnotationParse.test.ts +42 -0
  340. package/src/__tests__/templates.test.ts +93 -9
  341. package/src/__tests__/themeCompile.test.ts +156 -0
  342. package/src/__tests__/themeValidator.test.ts +125 -0
  343. package/src/__tests__/versions.test.ts +415 -0
  344. package/src/doc/audioMapping.ts +55 -11
  345. package/src/doc/getLayers.ts +32 -21
  346. package/src/doc/markdownToDoc.ts +45 -7
  347. package/src/doc/templates/featureBlock.ts +202 -0
  348. package/src/doc/templates/fullBleedQuote.ts +13 -0
  349. package/src/doc/templates/index.ts +50 -16
  350. package/src/doc/templates/listBlock.ts +24 -5
  351. package/src/doc/templates/statHighlight.ts +13 -0
  352. package/src/doc/templates/titleBlock.ts +9 -0
  353. package/src/doc/utils/themeUtils.ts +8 -7
  354. package/src/generate/slideshowGenerator.ts +1 -1
  355. package/src/generate/templateMapper.ts +2 -2
  356. package/src/icons/iconData.ts +31 -0
  357. package/src/icons/index.ts +18 -0
  358. package/src/icons/resolve.ts +139 -0
  359. package/src/imageEdit/ImageEditVersionManager.ts +73 -0
  360. package/src/imageEdit/export.ts +326 -0
  361. package/src/imageEdit/index.ts +71 -0
  362. package/src/imageEdit/persistence.ts +62 -0
  363. package/src/imageEdit/state.ts +112 -0
  364. package/src/imageEdit/versionPaths.ts +57 -0
  365. package/src/imageEdit/versions.ts +231 -0
  366. package/src/index.ts +4 -0
  367. package/src/jsonForm/chooseControl.ts +88 -0
  368. package/src/jsonForm/evaluateWhen.ts +59 -0
  369. package/src/jsonForm/index.ts +22 -0
  370. package/src/jsonForm/inferSchema.ts +25 -0
  371. package/src/jsonForm/pointer.ts +109 -0
  372. package/src/jsonForm/types.ts +167 -0
  373. package/src/markdown/convert.ts +145 -5
  374. package/src/markdown/index.ts +3 -0
  375. package/src/markdown/types.ts +19 -2
  376. package/src/markdown/utils.ts +159 -0
  377. package/src/recommend/index.ts +16 -0
  378. package/src/recommend/templates.ts +273 -0
  379. package/src/schemas/BlockTemplates.ts +50 -7
  380. package/src/schemas/ImageEditDoc.ts +95 -0
  381. package/src/schemas/Theme.ts +98 -31
  382. package/src/schemas/colorUtils.ts +186 -0
  383. package/src/schemas/fontStacks.ts +257 -0
  384. package/src/schemas/index.ts +12 -0
  385. package/src/schemas/themeCompile.ts +203 -0
  386. package/src/schemas/themeLibrary.ts +18 -597
  387. package/src/schemas/themeValidator.ts +388 -0
  388. package/src/schemas/themes/bold.json +48 -0
  389. package/src/schemas/themes/cinematic.json +54 -0
  390. package/src/schemas/themes/documentary.json +49 -0
  391. package/src/schemas/themes/gezellig.json +44 -0
  392. package/src/schemas/themes/index.ts +53 -0
  393. package/src/schemas/themes/magazine.json +44 -0
  394. package/src/schemas/themes/minimalist.json +45 -0
  395. package/src/schemas/themes/morning-light.json +42 -0
  396. package/src/schemas/themes/standard-dark.json +50 -0
  397. package/src/schemas/themes/standard.json +42 -0
  398. package/src/schemas/themes/tech-dark.json +48 -0
  399. package/src/schemas/themes/warm-earth.json +50 -0
  400. package/src/storage/ScopedContentContainer.ts +113 -0
  401. package/src/storage/index.ts +1 -0
  402. package/src/versions/DocumentVersionManager.ts +70 -0
  403. package/src/versions/index.ts +54 -0
  404. package/src/versions/operations.ts +230 -0
  405. package/src/versions/paths.ts +66 -0
  406. package/src/versions/timestamp.ts +48 -0
  407. package/src/versions/types.ts +91 -0
  408. package/dist/chunk-6BAVXFYC.js.map +0 -1
  409. package/dist/chunk-7GF6RDED.js +0 -82
  410. package/dist/chunk-7GF6RDED.js.map +0 -1
  411. package/dist/chunk-CYQHG27J.js.map +0 -1
  412. package/dist/chunk-F22AE6BY.js +0 -121
  413. package/dist/chunk-F22AE6BY.js.map +0 -1
  414. package/dist/chunk-FIQR4AJG.js +0 -517
  415. package/dist/chunk-FIQR4AJG.js.map +0 -1
  416. package/dist/chunk-OASJKWO5.js.map +0 -1
  417. package/dist/chunk-QM5PKNPW.js.map +0 -1
  418. package/dist/chunk-TSG2OSE6.js.map +0 -1
  419. package/dist/themeLibrary-CEo2D4b6.d.ts +0 -44
@@ -1,629 +1,50 @@
1
1
  /**
2
2
  * Built-in Theme Library
3
3
  *
4
- * Ships 8 curated themes covering documentary, editorial, minimal, and
5
- * cinematic styles. Each theme is fully JSON-serializable.
4
+ * Public entry point for theme lookup. Built-in themes live as JSON
5
+ * sidecars in [./themes/](./themes/) they share the exact same shape
6
+ * as customizer-authored themes (no two-tier distinction).
6
7
  *
7
8
  * Usage:
8
9
  * ```ts
9
10
  * import { THEMES, resolveTheme } from '@bendyline/squisq/schemas';
10
11
  *
11
- * const theme = resolveTheme('minimalist'); // look up by id
12
- * const theme = THEMES.documentary; // direct access
12
+ * const theme = resolveTheme('minimalist'); // by id, with registry override
13
+ * const theme = THEMES.documentary; // direct access to a built-in
13
14
  * ```
14
15
  */
15
16
 
16
- import type { Theme, ThemeColorScheme } from './Theme.js';
17
+ import type { Theme } from './Theme.js';
18
+ import { lookupRegisteredTheme } from './Theme.js';
19
+ import { BUILTIN_THEMES } from './themes/index.js';
17
20
 
18
- // ============================================
19
- // Shared constants
20
- // ============================================
21
-
22
- // ── Font stacks ──────────────────────────────────────────────────
23
- // Each stack lists the recommended Google Font first (works when the
24
- // wrapping site loads it), then degrades to safe system fonts.
25
- // Squisq itself does NOT load Google Fonts.
26
-
27
- /** System fonts only — no external dependencies. */
28
- const SYSTEM_SANS = 'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif';
29
- const SYSTEM_SERIF = 'Georgia, "Times New Roman", serif';
30
- const SYSTEM_MONO = 'Consolas, "Courier New", monospace';
31
-
32
- /** Theme-specific stacks with Google Font leads. */
33
- const PLAYFAIR = '"Playfair Display", Georgia, serif';
34
- const SOURCE_SERIF = '"Source Serif 4", "PT Serif", Georgia, serif';
35
- const INTER = '"Inter", "Segoe UI", Roboto, sans-serif';
36
- const OSWALD = '"Oswald", Impact, "Arial Black", sans-serif';
37
- const ROBOTO = '"Roboto", "Segoe UI", Arial, sans-serif';
38
- const MERRIWEATHER = '"Merriweather", Georgia, serif';
39
- const LORA = '"Lora", "Merriweather", Georgia, serif';
40
- const JETBRAINS_MONO = '"JetBrains Mono", "Fira Code", Consolas, monospace';
41
- const IBM_PLEX_SANS = '"IBM Plex Sans", "Segoe UI", Roboto, sans-serif';
42
- const DM_SERIF = '"DM Serif Display", Georgia, serif';
43
- const DM_SANS = '"DM Sans", "Segoe UI", Roboto, sans-serif';
44
- const CORMORANT = '"Cormorant Garamond", Garamond, Georgia, serif';
45
- const CRIMSON = '"Crimson Text", Georgia, serif';
46
- const PT_SERIF = '"PT Serif", Georgia, serif';
47
-
48
- /** Standard 6-scheme set used by the documentary theme (migrated from old COLOR_SCHEMES). */
49
- const CLASSIC_COLOR_SCHEMES: Record<string, ThemeColorScheme> = {
50
- blue: { bg: '#1a365d', text: '#63b3ed', accent: '#90cdf4' },
51
- green: { bg: '#22543d', text: '#9ae6b4', accent: '#68d391' },
52
- purple: { bg: '#44337a', text: '#d6bcfa', accent: '#b794f4' },
53
- red: { bg: '#742a2a', text: '#fc8181', accent: '#feb2b2' },
54
- orange: { bg: '#744210', text: '#fbd38d', accent: '#f6ad55' },
55
- teal: { bg: '#234e52', text: '#81e6d9', accent: '#4fd1c5' },
56
- };
57
-
58
- // ============================================
59
- // 1. Standard (default — safe system fonts, no external dependencies)
60
- // ============================================
61
-
62
- const standard: Theme = {
63
- id: 'standard',
64
- name: 'Standard',
65
- description: 'Clean and safe. System fonts only — no external font dependencies.',
66
- colors: {
67
- primary: '#3182ce',
68
- secondary: '#4a5568',
69
- background: '#1a202c',
70
- backgroundLight: '#2d3748',
71
- text: '#f7fafc',
72
- textMuted: '#a0aec0',
73
- highlight: '#4299e1',
74
- warning: '#fc8181',
75
- },
76
- typography: {
77
- bodyFontFamily: SYSTEM_SANS,
78
- titleFontFamily: SYSTEM_SERIF,
79
- monoFontFamily: SYSTEM_MONO,
80
- titleWeight: 'bold',
81
- },
82
- style: {
83
- textShadow: true,
84
- overlayOpacity: 0.45,
85
- animationSpeed: 1.0,
86
- },
87
- renderStyle: {
88
- name: 'standard',
89
- defaultTextAnimation: 'fadeIn',
90
- defaultImageAnimation: 'slowZoom',
91
- ambientMotion: true,
92
- defaultTransition: { type: 'fade', duration: 0.7 },
93
- },
94
- colorSchemes: CLASSIC_COLOR_SCHEMES,
95
- persistentLayers: {
96
- bottomLayers: [
97
- {
98
- template: 'gradientBackground',
99
- config: { type: 'gradientBackground', preset: 'dark-vignette' },
100
- },
101
- ],
102
- },
103
- };
104
-
105
- // ============================================
106
- // 2. Documentary
107
- // ============================================
108
-
109
- const documentary: Theme = {
110
- id: 'documentary',
111
- name: 'Documentary',
112
- description: 'Classic dark cinematic look with elegant serif typography.',
113
- colors: {
114
- primary: '#3d5a80',
115
- secondary: '#63b3ed',
116
- background: '#1a202c',
117
- backgroundLight: '#2d3748',
118
- text: '#ffffff',
119
- textMuted: '#a0aec0',
120
- highlight: '#63b3ed',
121
- warning: '#fc8181',
122
- },
123
- typography: {
124
- bodyFontFamily: SOURCE_SERIF,
125
- titleFontFamily: PLAYFAIR,
126
- titleWeight: 'bold',
127
- },
128
- style: {
129
- textShadow: true,
130
- overlayOpacity: 0.5,
131
- animationSpeed: 1.0,
132
- },
133
- renderStyle: {
134
- name: 'documentary',
135
- defaultTextAnimation: 'fadeIn',
136
- defaultImageAnimation: 'slowZoom',
137
- ambientMotion: true,
138
- defaultTransition: { type: 'fade', duration: 0.8 },
139
- },
140
- colorSchemes: CLASSIC_COLOR_SCHEMES,
141
- persistentLayers: {
142
- bottomLayers: [
143
- {
144
- template: 'gradientBackground',
145
- config: { type: 'gradientBackground', preset: 'dark-vignette' },
146
- },
147
- ],
148
- },
149
- };
150
-
151
- // ============================================
152
- // 2. Minimalist
153
- // ============================================
154
-
155
- const minimalist: Theme = {
156
- id: 'minimalist',
157
- name: 'Minimalist',
158
- description: 'Clean near-white background with sans-serif type and minimal animation.',
159
- colors: {
160
- primary: '#2d3748',
161
- secondary: '#4a5568',
162
- background: '#f7fafc',
163
- backgroundLight: '#edf2f7',
164
- text: '#1a202c',
165
- textMuted: '#718096',
166
- highlight: '#3182ce',
167
- warning: '#e53e3e',
168
- },
169
- typography: {
170
- bodyFontFamily: INTER,
171
- titleFontFamily: INTER,
172
- titleWeight: 'bold',
173
- lineHeight: 1.6,
174
- },
175
- style: {
176
- textShadow: false,
177
- overlayOpacity: 0.3,
178
- animationSpeed: 1.2,
179
- borderRadius: 8,
180
- },
181
- renderStyle: {
182
- name: 'minimalist',
183
- defaultTextAnimation: 'fadeIn',
184
- ambientMotion: false,
185
- defaultTransition: { type: 'fade', duration: 0.6 },
186
- templateHints: {
187
- titleBlock: { showAccentLine: false },
188
- },
189
- },
190
- colorSchemes: {
191
- blue: { bg: '#ebf8ff', text: '#2b6cb0', accent: '#3182ce' },
192
- green: { bg: '#f0fff4', text: '#276749', accent: '#38a169' },
193
- purple: { bg: '#faf5ff', text: '#553c9a', accent: '#805ad5' },
194
- red: { bg: '#fff5f5', text: '#c53030', accent: '#e53e3e' },
195
- orange: { bg: '#fffaf0', text: '#c05621', accent: '#dd6b20' },
196
- teal: { bg: '#e6fffa', text: '#285e61', accent: '#319795' },
197
- },
198
- };
199
-
200
- // ============================================
201
- // 3. Bold
202
- // ============================================
203
-
204
- const bold: Theme = {
205
- id: 'bold',
206
- name: 'Bold',
207
- description: 'High-contrast black with vivid accents and dramatic animations.',
208
- colors: {
209
- primary: '#e53e3e',
210
- secondary: '#ed8936',
211
- background: '#000000',
212
- backgroundLight: '#1a1a1a',
213
- text: '#ffffff',
214
- textMuted: '#cbd5e0',
215
- highlight: '#f6e05e',
216
- warning: '#fc8181',
217
- },
218
- typography: {
219
- bodyFontFamily: ROBOTO,
220
- titleFontFamily: OSWALD,
221
- titleWeight: 'bold',
222
- titleScale: 1.15,
223
- bodyScale: 1.0,
224
- titleLineHeight: 1.1,
225
- },
226
- style: {
227
- textShadow: true,
228
- overlayOpacity: 0.6,
229
- animationSpeed: 0.8,
230
- },
231
- renderStyle: {
232
- name: 'bold',
233
- defaultTextAnimation: 'zoomIn',
234
- defaultImageAnimation: 'slowZoom',
235
- ambientMotion: true,
236
- defaultTransition: { type: 'dissolve', duration: 0.5 },
237
- templateHints: {
238
- statHighlight: { entrance: 'dramatic' },
239
- fullBleedQuote: { entrance: 'dramatic' },
240
- },
241
- },
242
- colorSchemes: {
243
- blue: { bg: '#1a202c', text: '#63b3ed', accent: '#90cdf4' },
244
- green: { bg: '#1a202c', text: '#48bb78', accent: '#68d391' },
245
- purple: { bg: '#1a202c', text: '#b794f4', accent: '#d6bcfa' },
246
- red: { bg: '#1a202c', text: '#fc8181', accent: '#feb2b2' },
247
- orange: { bg: '#1a202c', text: '#f6ad55', accent: '#fbd38d' },
248
- teal: { bg: '#1a202c', text: '#4fd1c5', accent: '#81e6d9' },
249
- },
250
- };
251
-
252
- // ============================================
253
- // 4. Morning Light
254
- // ============================================
255
-
256
- const morningLight: Theme = {
257
- id: 'morning-light',
258
- name: 'Morning Light',
259
- description: 'Warm light background with dark text and gentle serif typography.',
260
- colors: {
261
- primary: '#744210',
262
- secondary: '#975a16',
263
- background: '#faf8f5',
264
- backgroundLight: '#f5f0eb',
265
- text: '#2d3748',
266
- textMuted: '#718096',
267
- highlight: '#dd6b20',
268
- warning: '#c53030',
269
- },
270
- typography: {
271
- bodyFontFamily: LORA,
272
- titleFontFamily: MERRIWEATHER,
273
- titleWeight: 'bold',
274
- lineHeight: 1.7,
275
- },
276
- style: {
277
- textShadow: false,
278
- overlayOpacity: 0.35,
279
- animationSpeed: 1.1,
280
- borderRadius: 4,
281
- },
282
- renderStyle: {
283
- name: 'morning-light',
284
- defaultTextAnimation: 'fadeIn',
285
- ambientMotion: false,
286
- defaultTransition: { type: 'fade', duration: 1.0 },
287
- },
288
- colorSchemes: {
289
- blue: { bg: '#ebf8ff', text: '#2c5282', accent: '#4299e1' },
290
- green: { bg: '#f0fff4', text: '#22543d', accent: '#48bb78' },
291
- purple: { bg: '#faf5ff', text: '#44337a', accent: '#9f7aea' },
292
- red: { bg: '#fff5f5', text: '#9b2c2c', accent: '#fc8181' },
293
- orange: { bg: '#fffaf0', text: '#744210', accent: '#ed8936' },
294
- teal: { bg: '#e6fffa', text: '#234e52', accent: '#38b2ac' },
295
- },
296
- };
297
-
298
- // ============================================
299
- // 5. Tech Dark
300
- // ============================================
301
-
302
- const techDark: Theme = {
303
- id: 'tech-dark',
304
- name: 'Tech Dark',
305
- description: 'True black with neon cyan/green accents and monospace titles.',
306
- colors: {
307
- primary: '#00e5ff',
308
- secondary: '#00e676',
309
- background: '#0a0a0a',
310
- backgroundLight: '#1a1a2e',
311
- text: '#e0e0e0',
312
- textMuted: '#9e9e9e',
313
- highlight: '#00e5ff',
314
- warning: '#ff5252',
315
- },
316
- typography: {
317
- bodyFontFamily: IBM_PLEX_SANS,
318
- titleFontFamily: JETBRAINS_MONO,
319
- monoFontFamily: JETBRAINS_MONO,
320
- titleWeight: 'bold',
321
- titleScale: 0.9,
322
- lineHeight: 1.5,
323
- },
324
- style: {
325
- textShadow: true,
326
- overlayOpacity: 0.55,
327
- animationSpeed: 0.9,
328
- borderRadius: 2,
329
- },
330
- renderStyle: {
331
- name: 'tech-dark',
332
- defaultTextAnimation: 'typewriter',
333
- defaultImageAnimation: 'slowZoom',
334
- ambientMotion: true,
335
- defaultTransition: { type: 'dissolve', duration: 0.4 },
336
- templateHints: {
337
- statHighlight: { entrance: 'dramatic' },
338
- },
339
- },
340
- colorSchemes: {
341
- blue: { bg: '#0d1b2a', text: '#00b0ff', accent: '#40c4ff' },
342
- green: { bg: '#0d1b0d', text: '#00e676', accent: '#69f0ae' },
343
- purple: { bg: '#1a0d2e', text: '#d500f9', accent: '#ea80fc' },
344
- red: { bg: '#2e0d0d', text: '#ff5252', accent: '#ff8a80' },
345
- orange: { bg: '#2e1a0d', text: '#ff9100', accent: '#ffab40' },
346
- teal: { bg: '#0d2e2e', text: '#1de9b6', accent: '#64ffda' },
347
- },
348
- };
349
-
350
- // ============================================
351
- // 6. Magazine
352
- // ============================================
353
-
354
- const magazine: Theme = {
355
- id: 'magazine',
356
- name: 'Magazine',
357
- description: 'Rich editorial palette with mixed serif/sans typography and slide transitions.',
358
- colors: {
359
- primary: '#c53030',
360
- secondary: '#2b6cb0',
361
- background: '#1a202c',
362
- backgroundLight: '#2d3748',
363
- text: '#f7fafc',
364
- textMuted: '#cbd5e0',
365
- highlight: '#ed8936',
366
- warning: '#fc8181',
367
- },
368
- typography: {
369
- bodyFontFamily: DM_SANS,
370
- titleFontFamily: DM_SERIF,
371
- titleWeight: 'bold',
372
- titleScale: 1.05,
373
- lineHeight: 1.5,
374
- },
375
- style: {
376
- textShadow: true,
377
- overlayOpacity: 0.45,
378
- animationSpeed: 1.0,
379
- borderRadius: 6,
380
- },
381
- renderStyle: {
382
- name: 'magazine',
383
- defaultTextAnimation: 'fadeIn',
384
- defaultImageAnimation: 'slowZoom',
385
- ambientMotion: true,
386
- defaultTransition: { type: 'slideLeft', duration: 0.7 },
387
- },
388
- colorSchemes: {
389
- blue: { bg: '#1a365d', text: '#90cdf4', accent: '#63b3ed' },
390
- green: { bg: '#1c4532', text: '#9ae6b4', accent: '#68d391' },
391
- purple: { bg: '#322659', text: '#d6bcfa', accent: '#b794f4' },
392
- red: { bg: '#63171b', text: '#feb2b2', accent: '#fc8181' },
393
- orange: { bg: '#652b19', text: '#fbd38d', accent: '#f6ad55' },
394
- teal: { bg: '#1d4044', text: '#81e6d9', accent: '#4fd1c5' },
395
- },
396
- };
397
-
398
- // ============================================
399
- // 7. Cinematic
400
- // ============================================
401
-
402
- const cinematic: Theme = {
403
- id: 'cinematic',
404
- name: 'Cinematic',
405
- description: 'Ultra-dark with moody gradients, gold accents, and slow dissolve transitions.',
406
- colors: {
407
- primary: '#d69e2e',
408
- secondary: '#b7791f',
409
- background: '#0a0f1a',
410
- backgroundLight: '#1a202c',
411
- text: '#f7fafc',
412
- textMuted: '#a0aec0',
413
- highlight: '#ecc94b',
414
- warning: '#fc8181',
415
- },
416
- typography: {
417
- bodyFontFamily: CRIMSON,
418
- titleFontFamily: CORMORANT,
419
- titleWeight: 'bold',
420
- lineHeight: 1.5,
421
- titleLineHeight: 1.2,
422
- },
423
- style: {
424
- textShadow: true,
425
- overlayOpacity: 0.55,
426
- animationSpeed: 1.2,
427
- },
428
- renderStyle: {
429
- name: 'cinematic',
430
- defaultTextAnimation: 'fadeIn',
431
- defaultImageAnimation: 'slowZoom',
432
- ambientMotion: true,
433
- defaultTransition: { type: 'dissolve', duration: 1.2 },
434
- templateHints: {
435
- titleBlock: { showAccentLine: true },
436
- },
437
- },
438
- colorSchemes: {
439
- blue: { bg: '#0d1b2a', text: '#90cdf4', accent: '#63b3ed' },
440
- green: { bg: '#0d1b14', text: '#9ae6b4', accent: '#68d391' },
441
- purple: { bg: '#1a0d2e', text: '#d6bcfa', accent: '#b794f4' },
442
- red: { bg: '#2a0d0d', text: '#fc8181', accent: '#feb2b2' },
443
- orange: { bg: '#2a1a0d', text: '#fbd38d', accent: '#f6ad55' },
444
- teal: { bg: '#0d2a2a', text: '#81e6d9', accent: '#4fd1c5' },
445
- },
446
- persistentLayers: {
447
- bottomLayers: [
448
- {
449
- template: 'gradientBackground',
450
- config: { type: 'gradientBackground', preset: 'radial-dark' },
451
- },
452
- ],
453
- },
454
- };
455
-
456
- // ============================================
457
- // 8. Warm Earth
458
- // ============================================
459
-
460
- const warmEarth: Theme = {
461
- id: 'warm-earth',
462
- name: 'Warm Earth',
463
- description: 'Natural warm tones with earthy browns and terracotta accents.',
464
- colors: {
465
- primary: '#9c4221',
466
- secondary: '#c05621',
467
- background: '#1c1410',
468
- backgroundLight: '#2d241e',
469
- text: '#faf5f0',
470
- textMuted: '#c4a882',
471
- highlight: '#dd6b20',
472
- warning: '#e53e3e',
473
- },
474
- typography: {
475
- bodyFontFamily: PT_SERIF,
476
- titleFontFamily: PT_SERIF,
477
- titleWeight: 'bold',
478
- lineHeight: 1.6,
479
- },
480
- style: {
481
- textShadow: true,
482
- overlayOpacity: 0.5,
483
- animationSpeed: 1.1,
484
- },
485
- renderStyle: {
486
- name: 'warm-earth',
487
- defaultTextAnimation: 'fadeIn',
488
- defaultImageAnimation: 'panLeft',
489
- ambientMotion: true,
490
- defaultTransition: { type: 'fade', duration: 0.9 },
491
- },
492
- colorSchemes: {
493
- blue: { bg: '#2a1f14', text: '#90cdf4', accent: '#63b3ed' },
494
- green: { bg: '#1e2a14', text: '#9ae6b4', accent: '#68d391' },
495
- purple: { bg: '#2a142a', text: '#d6bcfa', accent: '#b794f4' },
496
- red: { bg: '#2a1414', text: '#fc8181', accent: '#feb2b2' },
497
- orange: { bg: '#2a1e0a', text: '#fbd38d', accent: '#f6ad55' },
498
- teal: { bg: '#142a28', text: '#81e6d9', accent: '#4fd1c5' },
499
- },
500
- persistentLayers: {
501
- bottomLayers: [
502
- {
503
- template: 'gradientBackground',
504
- config: { type: 'gradientBackground', preset: 'earth-tones' },
505
- },
506
- ],
507
- },
508
- };
509
-
510
- // ============================================
511
- // 9. Gezellig
512
- // ============================================
513
-
514
- /**
515
- * Warm sage + terracotta palette that matches the Gezel desktop app.
516
- * Background is a subtly orange-tinted near-black — a much warmer surface
517
- * than the standard `#1a202c`-family dark themes. Primary is Gezel's
518
- * accent orange (`#b0724c`); secondary is the titlebar sage (`#667f62`).
519
- *
520
- * Typography uses system fonts with emoji fallbacks at the tail of each
521
- * stack — `OpenMoji Color` first (picked up when the host app has loaded
522
- * its WOFF with `unicode-range` scoped to emoji codepoints), then the
523
- * platform emoji fonts. Hosts that haven't registered OpenMoji fall
524
- * through to the platform emoji font transparently.
525
- *
526
- * "Gezellig" — Dutch, roughly "cozy / companionable", which is the brand
527
- * direction of the Gezel app (an ensemble of AI gezels that feel like a
528
- * crew, not a robot). Works as a general-purpose warm dark theme outside
529
- * the app too.
530
- */
531
- const GEZELLIG_SANS =
532
- 'system-ui, -apple-system, "Segoe UI", Roboto, "OpenMoji Color", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif';
533
- const GEZELLIG_SERIF =
534
- 'Georgia, "Times New Roman", "OpenMoji Color", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", serif';
535
-
536
- const gezellig: Theme = {
537
- id: 'gezellig',
538
- name: 'Gezellig',
539
- description:
540
- 'Warm sage + terracotta palette inspired by the Gezel desktop app. Subtle orange-tinted dark background, cream text, sage and terracotta accents.',
541
- colors: {
542
- primary: '#b0724c',
543
- secondary: '#667f62',
544
- background: '#1f1a17',
545
- backgroundLight: '#2b2420',
546
- text: '#f3ede0',
547
- textMuted: '#a89b85',
548
- highlight: '#c0875d',
549
- warning: '#e07a6b',
550
- },
551
- typography: {
552
- bodyFontFamily: GEZELLIG_SANS,
553
- titleFontFamily: GEZELLIG_SERIF,
554
- monoFontFamily: SYSTEM_MONO,
555
- titleWeight: 'bold',
556
- lineHeight: 1.55,
557
- },
558
- style: {
559
- textShadow: false,
560
- overlayOpacity: 0.4,
561
- animationSpeed: 1.0,
562
- borderRadius: 6,
563
- },
564
- renderStyle: {
565
- name: 'gezellig',
566
- defaultTextAnimation: 'fadeIn',
567
- defaultImageAnimation: 'slowZoom',
568
- ambientMotion: false,
569
- defaultTransition: { type: 'fade', duration: 0.6 },
570
- },
571
- colorSchemes: {
572
- // Warm, earthen palette with a sage-green outlier for contrast.
573
- terracotta: { bg: '#3d2620', text: '#f3ede0', accent: '#c0875d' },
574
- sage: { bg: '#28332a', text: '#e3ead9', accent: '#8aa589' },
575
- amber: { bg: '#3d2e17', text: '#fbe3a8', accent: '#d4a149' },
576
- plum: { bg: '#2e1f2a', text: '#e8d4e0', accent: '#b088a5' },
577
- ink: { bg: '#1a1f26', text: '#d5dde8', accent: '#7b8fa8' },
578
- cream: { bg: '#f3ede0', text: '#2b2420', accent: '#b0724c' },
579
- },
580
- };
581
-
582
- // ============================================
583
- // Theme Library
584
- // ============================================
585
-
586
- /**
587
- * All built-in themes, keyed by id.
588
- */
589
- export const THEMES: Record<string, Theme> = {
590
- standard,
591
- documentary,
592
- minimalist,
593
- bold,
594
- 'morning-light': morningLight,
595
- 'tech-dark': techDark,
596
- magazine,
597
- cinematic,
598
- 'warm-earth': warmEarth,
599
- gezellig,
600
- };
21
+ /** All built-in themes, keyed by id. */
22
+ export const THEMES: Record<string, Theme> = BUILTIN_THEMES;
601
23
 
602
24
  /** The default theme id. */
603
25
  export const DEFAULT_THEME_ID = 'standard';
604
26
 
605
27
  /** The default theme (standard — safe system fonts, no external dependencies). */
606
- export const DEFAULT_THEME: Theme = standard;
28
+ export const DEFAULT_THEME: Theme = THEMES[DEFAULT_THEME_ID];
607
29
 
608
30
  /**
609
- * Resolve a theme by id. Returns the default theme when `id` is
610
- * undefined or not found in the library.
31
+ * Resolve a theme by id. Custom themes registered via `registerTheme()`
32
+ * take precedence over built-ins; otherwise built-ins are searched and
33
+ * the default theme is returned for unknown ids.
611
34
  */
612
35
  export function resolveTheme(id: string | undefined): Theme {
36
+ const registered = lookupRegisteredTheme(id);
37
+ if (registered) return registered;
613
38
  if (id && id in THEMES) return THEMES[id];
614
39
  return DEFAULT_THEME;
615
40
  }
616
41
 
617
- /**
618
- * Get all available theme ids.
619
- */
42
+ /** Get all built-in theme ids. */
620
43
  export function getAvailableThemes(): string[] {
621
44
  return Object.keys(THEMES);
622
45
  }
623
46
 
624
- /**
625
- * Get a summary of all themes (id + name + description) for theme pickers.
626
- */
47
+ /** Get a summary of all built-in themes (id + name + description) for theme pickers. */
627
48
  export function getThemeSummaries(): Array<{ id: string; name: string; description?: string }> {
628
49
  return Object.values(THEMES).map((t) => ({
629
50
  id: t.id,