@bendyline/squisq 1.3.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (533) 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/{chunk-CYQHG27J.js → chunk-2TMAWB4Y.js} +74 -1
  4. package/dist/chunk-2TMAWB4Y.js.map +1 -0
  5. package/dist/{chunk-OASJKWO5.js → chunk-3K5OG6KI.js} +92 -7
  6. package/dist/chunk-3K5OG6KI.js.map +1 -0
  7. package/dist/chunk-57CVQCFX.js +193 -0
  8. package/dist/chunk-57CVQCFX.js.map +1 -0
  9. package/dist/{chunk-QM5PKNPW.js → chunk-5WFRKURX.js} +1 -1
  10. package/dist/chunk-5WFRKURX.js.map +1 -0
  11. package/dist/chunk-B4EEON3N.js +1317 -0
  12. package/dist/chunk-B4EEON3N.js.map +1 -0
  13. package/dist/chunk-DBS6RIFL.js +81 -0
  14. package/dist/chunk-DBS6RIFL.js.map +1 -0
  15. package/dist/{chunk-MIBRIRGJ.js → chunk-FR2RBTKO.js} +3 -3
  16. package/dist/{chunk-MIBRIRGJ.js.map → chunk-FR2RBTKO.js.map} +1 -1
  17. package/dist/chunk-H3AXU4MJ.js +179 -0
  18. package/dist/chunk-H3AXU4MJ.js.map +1 -0
  19. package/dist/chunk-JELIRVDP.js +24 -0
  20. package/dist/chunk-JELIRVDP.js.map +1 -0
  21. package/dist/chunk-K32VJONL.js +193 -0
  22. package/dist/chunk-K32VJONL.js.map +1 -0
  23. package/dist/{chunk-6BAVXFYC.js → chunk-KSWJR66U.js} +218 -42
  24. package/dist/chunk-KSWJR66U.js.map +1 -0
  25. package/dist/{chunk-TSG2OSE6.js → chunk-MYIH7FWD.js} +3 -3
  26. package/dist/chunk-MYIH7FWD.js.map +1 -0
  27. package/dist/chunk-VLJJHDAC.js +218 -0
  28. package/dist/chunk-VLJJHDAC.js.map +1 -0
  29. package/dist/chunk-WMOI7FN3.js +182 -0
  30. package/dist/chunk-WMOI7FN3.js.map +1 -0
  31. package/dist/chunk-ZTX4PFFT.js +520 -0
  32. package/dist/chunk-ZTX4PFFT.js.map +1 -0
  33. package/dist/doc/index.d.ts +5 -10
  34. package/dist/doc/index.js +145 -7
  35. package/dist/doc/index.js.map +1 -1
  36. package/dist/generate/index.d.ts +99 -7
  37. package/dist/generate/index.js +16 -3
  38. package/dist/generate/index.js.map +1 -1
  39. package/dist/icons/index.d.ts +87 -0
  40. package/dist/icons/index.js +17 -0
  41. package/dist/icons/index.js.map +1 -0
  42. package/dist/imageEdit/index.d.ts +216 -0
  43. package/dist/imageEdit/index.js +54 -0
  44. package/dist/imageEdit/index.js.map +1 -0
  45. package/dist/index.d.ts +21 -9
  46. package/dist/index.js +461 -8
  47. package/dist/index.js.map +1 -1
  48. package/dist/jsonForm/index.d.ts +191 -0
  49. package/dist/jsonForm/index.js +27 -0
  50. package/dist/jsonForm/index.js.map +1 -0
  51. package/dist/markdown/index.d.ts +265 -19
  52. package/dist/markdown/index.js +39 -33
  53. package/dist/markdown/index.js.map +1 -1
  54. package/dist/random/index.d.ts +51 -2
  55. package/dist/random/index.js +9 -1
  56. package/dist/random/index.js.map +1 -1
  57. package/dist/recommend/index.d.ts +42 -0
  58. package/dist/recommend/index.js +10 -0
  59. package/dist/recommend/index.js.map +1 -0
  60. package/dist/schemas/index.d.ts +188 -10
  61. package/dist/schemas/index.js +120 -7
  62. package/dist/schemas/index.js.map +1 -1
  63. package/dist/spatial/index.d.ts +111 -3
  64. package/dist/spatial/index.js +24 -2
  65. package/dist/spatial/index.js.map +1 -1
  66. package/dist/storage/index.d.ts +159 -9
  67. package/dist/storage/index.js +20 -5
  68. package/dist/storage/index.js.map +1 -1
  69. package/dist/story/index.d.ts +53 -13
  70. package/dist/story/index.js +12 -4
  71. package/dist/themeLibrary-BHjJ0Qx6.d.ts +40 -0
  72. package/dist/timing/index.d.ts +109 -4
  73. package/dist/timing/index.js +23 -2
  74. package/dist/timing/index.js.map +1 -1
  75. package/dist/transform/index.d.ts +175 -6
  76. package/dist/transform/index.js +490 -3
  77. package/dist/transform/index.js.map +1 -1
  78. package/dist/{types-CkNttVSF.d.ts → types-BdZkdJ3z.d.ts} +17 -2
  79. package/dist/types-D98li1gV.d.ts +93 -0
  80. package/dist/versions/index.d.ts +128 -0
  81. package/dist/versions/index.js +35 -0
  82. package/dist/versions/index.js.map +1 -0
  83. package/package.json +28 -1
  84. package/src/__tests__/colorUtils.test.ts +112 -0
  85. package/src/__tests__/getLayers.test.ts +32 -7
  86. package/src/__tests__/iconResolve.test.ts +122 -0
  87. package/src/__tests__/imageEditState.test.ts +74 -0
  88. package/src/__tests__/imageEditVersions.test.ts +169 -0
  89. package/src/__tests__/inferDocumentTitle.test.ts +50 -0
  90. package/src/__tests__/jsonForm.chooseControl.test.ts +86 -0
  91. package/src/__tests__/jsonForm.evaluateWhen.test.ts +59 -0
  92. package/src/__tests__/jsonForm.inferSchema.test.ts +25 -0
  93. package/src/__tests__/jsonForm.pointer.test.ts +103 -0
  94. package/src/__tests__/markdownIcons.test.ts +104 -0
  95. package/src/__tests__/markdownToDoc.test.ts +19 -4
  96. package/src/__tests__/recommendTemplates.test.ts +183 -0
  97. package/src/__tests__/scopedContentContainer.test.ts +89 -0
  98. package/src/__tests__/slideshowGenerator.test.ts +1 -1
  99. package/src/__tests__/templateAnnotationParse.test.ts +42 -0
  100. package/src/__tests__/templates.test.ts +93 -9
  101. package/src/__tests__/themeCompile.test.ts +156 -0
  102. package/src/__tests__/themeValidator.test.ts +125 -0
  103. package/src/__tests__/versions.test.ts +415 -0
  104. package/src/doc/audioMapping.ts +55 -11
  105. package/src/doc/getLayers.ts +32 -21
  106. package/src/doc/markdownToDoc.ts +45 -7
  107. package/src/doc/templates/featureBlock.ts +202 -0
  108. package/src/doc/templates/fullBleedQuote.ts +13 -0
  109. package/src/doc/templates/index.ts +50 -16
  110. package/src/doc/templates/listBlock.ts +24 -5
  111. package/src/doc/templates/statHighlight.ts +13 -0
  112. package/src/doc/templates/titleBlock.ts +9 -0
  113. package/src/doc/utils/themeUtils.ts +8 -7
  114. package/src/generate/slideshowGenerator.ts +1 -1
  115. package/src/generate/templateMapper.ts +2 -2
  116. package/src/icons/iconData.ts +31 -0
  117. package/src/icons/index.ts +18 -0
  118. package/src/icons/resolve.ts +139 -0
  119. package/src/imageEdit/ImageEditVersionManager.ts +73 -0
  120. package/src/imageEdit/export.ts +326 -0
  121. package/src/imageEdit/index.ts +71 -0
  122. package/src/imageEdit/persistence.ts +62 -0
  123. package/src/imageEdit/state.ts +112 -0
  124. package/src/imageEdit/versionPaths.ts +57 -0
  125. package/src/imageEdit/versions.ts +231 -0
  126. package/src/index.ts +4 -0
  127. package/src/jsonForm/chooseControl.ts +88 -0
  128. package/src/jsonForm/evaluateWhen.ts +59 -0
  129. package/src/jsonForm/index.ts +22 -0
  130. package/src/jsonForm/inferSchema.ts +25 -0
  131. package/src/jsonForm/pointer.ts +109 -0
  132. package/src/jsonForm/types.ts +167 -0
  133. package/src/markdown/convert.ts +145 -5
  134. package/src/markdown/index.ts +3 -0
  135. package/src/markdown/types.ts +19 -2
  136. package/src/markdown/utils.ts +159 -0
  137. package/src/recommend/index.ts +16 -0
  138. package/src/recommend/templates.ts +273 -0
  139. package/src/schemas/BlockTemplates.ts +50 -7
  140. package/src/schemas/ImageEditDoc.ts +95 -0
  141. package/src/schemas/Theme.ts +98 -31
  142. package/src/schemas/colorUtils.ts +186 -0
  143. package/src/schemas/fontStacks.ts +257 -0
  144. package/src/schemas/index.ts +12 -0
  145. package/src/schemas/themeCompile.ts +203 -0
  146. package/src/schemas/themeLibrary.ts +18 -597
  147. package/src/schemas/themeValidator.ts +388 -0
  148. package/src/schemas/themes/bold.json +48 -0
  149. package/src/schemas/themes/cinematic.json +54 -0
  150. package/src/schemas/themes/documentary.json +49 -0
  151. package/src/schemas/themes/gezellig.json +44 -0
  152. package/src/schemas/themes/index.ts +53 -0
  153. package/src/schemas/themes/magazine.json +44 -0
  154. package/src/schemas/themes/minimalist.json +45 -0
  155. package/src/schemas/themes/morning-light.json +42 -0
  156. package/src/schemas/themes/standard-dark.json +50 -0
  157. package/src/schemas/themes/standard.json +42 -0
  158. package/src/schemas/themes/tech-dark.json +48 -0
  159. package/src/schemas/themes/warm-earth.json +50 -0
  160. package/src/storage/ScopedContentContainer.ts +113 -0
  161. package/src/storage/index.ts +1 -0
  162. package/src/versions/DocumentVersionManager.ts +70 -0
  163. package/src/versions/index.ts +54 -0
  164. package/src/versions/operations.ts +230 -0
  165. package/src/versions/paths.ts +66 -0
  166. package/src/versions/timestamp.ts +48 -0
  167. package/src/versions/types.ts +91 -0
  168. package/dist/__tests__/animationUtils.test.d.ts +0 -2
  169. package/dist/__tests__/animationUtils.test.d.ts.map +0 -1
  170. package/dist/__tests__/animationUtils.test.js +0 -60
  171. package/dist/__tests__/animationUtils.test.js.map +0 -1
  172. package/dist/__tests__/contentContainer.test.d.ts +0 -2
  173. package/dist/__tests__/contentContainer.test.d.ts.map +0 -1
  174. package/dist/__tests__/contentContainer.test.js +0 -234
  175. package/dist/__tests__/contentContainer.test.js.map +0 -1
  176. package/dist/__tests__/contentExtractor.test.d.ts +0 -2
  177. package/dist/__tests__/contentExtractor.test.d.ts.map +0 -1
  178. package/dist/__tests__/contentExtractor.test.js +0 -151
  179. package/dist/__tests__/contentExtractor.test.js.map +0 -1
  180. package/dist/__tests__/coverBlock.test.d.ts +0 -2
  181. package/dist/__tests__/coverBlock.test.d.ts.map +0 -1
  182. package/dist/__tests__/coverBlock.test.js +0 -197
  183. package/dist/__tests__/coverBlock.test.js.map +0 -1
  184. package/dist/__tests__/dataTable.test.d.ts +0 -2
  185. package/dist/__tests__/dataTable.test.d.ts.map +0 -1
  186. package/dist/__tests__/dataTable.test.js +0 -110
  187. package/dist/__tests__/dataTable.test.js.map +0 -1
  188. package/dist/__tests__/geohash.test.d.ts +0 -2
  189. package/dist/__tests__/geohash.test.d.ts.map +0 -1
  190. package/dist/__tests__/geohash.test.js +0 -87
  191. package/dist/__tests__/geohash.test.js.map +0 -1
  192. package/dist/__tests__/getLayers.test.d.ts +0 -2
  193. package/dist/__tests__/getLayers.test.d.ts.map +0 -1
  194. package/dist/__tests__/getLayers.test.js +0 -167
  195. package/dist/__tests__/getLayers.test.js.map +0 -1
  196. package/dist/__tests__/haversine.test.d.ts +0 -2
  197. package/dist/__tests__/haversine.test.d.ts.map +0 -1
  198. package/dist/__tests__/haversine.test.js +0 -56
  199. package/dist/__tests__/haversine.test.js.map +0 -1
  200. package/dist/__tests__/localForageAdapter.test.d.ts +0 -8
  201. package/dist/__tests__/localForageAdapter.test.d.ts.map +0 -1
  202. package/dist/__tests__/localForageAdapter.test.js +0 -130
  203. package/dist/__tests__/localForageAdapter.test.js.map +0 -1
  204. package/dist/__tests__/markdown.test.d.ts +0 -2
  205. package/dist/__tests__/markdown.test.d.ts.map +0 -1
  206. package/dist/__tests__/markdown.test.js +0 -715
  207. package/dist/__tests__/markdown.test.js.map +0 -1
  208. package/dist/__tests__/markdownToDoc.test.d.ts +0 -2
  209. package/dist/__tests__/markdownToDoc.test.d.ts.map +0 -1
  210. package/dist/__tests__/markdownToDoc.test.js +0 -447
  211. package/dist/__tests__/markdownToDoc.test.js.map +0 -1
  212. package/dist/__tests__/seededRandom.test.d.ts +0 -2
  213. package/dist/__tests__/seededRandom.test.d.ts.map +0 -1
  214. package/dist/__tests__/seededRandom.test.js +0 -125
  215. package/dist/__tests__/seededRandom.test.js.map +0 -1
  216. package/dist/__tests__/slideshowGenerator.test.d.ts +0 -2
  217. package/dist/__tests__/slideshowGenerator.test.d.ts.map +0 -1
  218. package/dist/__tests__/slideshowGenerator.test.js +0 -114
  219. package/dist/__tests__/slideshowGenerator.test.js.map +0 -1
  220. package/dist/__tests__/storage.test.d.ts +0 -2
  221. package/dist/__tests__/storage.test.d.ts.map +0 -1
  222. package/dist/__tests__/storage.test.js +0 -51
  223. package/dist/__tests__/storage.test.js.map +0 -1
  224. package/dist/__tests__/surface.test.d.ts +0 -2
  225. package/dist/__tests__/surface.test.d.ts.map +0 -1
  226. package/dist/__tests__/surface.test.js +0 -57
  227. package/dist/__tests__/surface.test.js.map +0 -1
  228. package/dist/__tests__/templates.test.d.ts +0 -2
  229. package/dist/__tests__/templates.test.d.ts.map +0 -1
  230. package/dist/__tests__/templates.test.js +0 -217
  231. package/dist/__tests__/templates.test.js.map +0 -1
  232. package/dist/__tests__/timing.test.d.ts +0 -2
  233. package/dist/__tests__/timing.test.d.ts.map +0 -1
  234. package/dist/__tests__/timing.test.js +0 -131
  235. package/dist/__tests__/timing.test.js.map +0 -1
  236. package/dist/chunk-6BAVXFYC.js.map +0 -1
  237. package/dist/chunk-7GF6RDED.js +0 -82
  238. package/dist/chunk-7GF6RDED.js.map +0 -1
  239. package/dist/chunk-CYQHG27J.js.map +0 -1
  240. package/dist/chunk-F22AE6BY.js +0 -121
  241. package/dist/chunk-F22AE6BY.js.map +0 -1
  242. package/dist/chunk-FIQR4AJG.js +0 -517
  243. package/dist/chunk-FIQR4AJG.js.map +0 -1
  244. package/dist/chunk-OASJKWO5.js.map +0 -1
  245. package/dist/chunk-QM5PKNPW.js.map +0 -1
  246. package/dist/chunk-TSG2OSE6.js.map +0 -1
  247. package/dist/doc/audioMapping.d.ts +0 -36
  248. package/dist/doc/audioMapping.d.ts.map +0 -1
  249. package/dist/doc/audioMapping.js +0 -315
  250. package/dist/doc/audioMapping.js.map +0 -1
  251. package/dist/doc/docToMarkdown.d.ts +0 -41
  252. package/dist/doc/docToMarkdown.d.ts.map +0 -1
  253. package/dist/doc/docToMarkdown.js +0 -88
  254. package/dist/doc/docToMarkdown.js.map +0 -1
  255. package/dist/doc/getLayers.d.ts +0 -65
  256. package/dist/doc/getLayers.d.ts.map +0 -1
  257. package/dist/doc/getLayers.js +0 -103
  258. package/dist/doc/getLayers.js.map +0 -1
  259. package/dist/doc/index.d.ts.map +0 -1
  260. package/dist/doc/markdownToDoc.d.ts +0 -75
  261. package/dist/doc/markdownToDoc.d.ts.map +0 -1
  262. package/dist/doc/markdownToDoc.js +0 -398
  263. package/dist/doc/markdownToDoc.js.map +0 -1
  264. package/dist/doc/templates/accentImage.d.ts +0 -59
  265. package/dist/doc/templates/accentImage.d.ts.map +0 -1
  266. package/dist/doc/templates/accentImage.js +0 -275
  267. package/dist/doc/templates/accentImage.js.map +0 -1
  268. package/dist/doc/templates/captionUtils.d.ts +0 -20
  269. package/dist/doc/templates/captionUtils.d.ts.map +0 -1
  270. package/dist/doc/templates/captionUtils.js +0 -29
  271. package/dist/doc/templates/captionUtils.js.map +0 -1
  272. package/dist/doc/templates/comparisonBar.d.ts +0 -13
  273. package/dist/doc/templates/comparisonBar.d.ts.map +0 -1
  274. package/dist/doc/templates/comparisonBar.js +0 -145
  275. package/dist/doc/templates/comparisonBar.js.map +0 -1
  276. package/dist/doc/templates/coverBlock.d.ts +0 -51
  277. package/dist/doc/templates/coverBlock.d.ts.map +0 -1
  278. package/dist/doc/templates/coverBlock.js +0 -153
  279. package/dist/doc/templates/coverBlock.js.map +0 -1
  280. package/dist/doc/templates/dataTable.d.ts +0 -14
  281. package/dist/doc/templates/dataTable.d.ts.map +0 -1
  282. package/dist/doc/templates/dataTable.js +0 -73
  283. package/dist/doc/templates/dataTable.js.map +0 -1
  284. package/dist/doc/templates/dateEvent.d.ts +0 -15
  285. package/dist/doc/templates/dateEvent.d.ts.map +0 -1
  286. package/dist/doc/templates/dateEvent.js +0 -114
  287. package/dist/doc/templates/dateEvent.js.map +0 -1
  288. package/dist/doc/templates/definitionCard.d.ts +0 -13
  289. package/dist/doc/templates/definitionCard.d.ts.map +0 -1
  290. package/dist/doc/templates/definitionCard.js +0 -117
  291. package/dist/doc/templates/definitionCard.js.map +0 -1
  292. package/dist/doc/templates/factCard.d.ts +0 -15
  293. package/dist/doc/templates/factCard.d.ts.map +0 -1
  294. package/dist/doc/templates/factCard.js +0 -104
  295. package/dist/doc/templates/factCard.js.map +0 -1
  296. package/dist/doc/templates/fullBleedQuote.d.ts +0 -13
  297. package/dist/doc/templates/fullBleedQuote.d.ts.map +0 -1
  298. package/dist/doc/templates/fullBleedQuote.js +0 -55
  299. package/dist/doc/templates/fullBleedQuote.js.map +0 -1
  300. package/dist/doc/templates/imageWithCaption.d.ts +0 -13
  301. package/dist/doc/templates/imageWithCaption.d.ts.map +0 -1
  302. package/dist/doc/templates/imageWithCaption.js +0 -146
  303. package/dist/doc/templates/imageWithCaption.js.map +0 -1
  304. package/dist/doc/templates/index.d.ts +0 -105
  305. package/dist/doc/templates/index.d.ts.map +0 -1
  306. package/dist/doc/templates/index.js +0 -445
  307. package/dist/doc/templates/index.js.map +0 -1
  308. package/dist/doc/templates/listBlock.d.ts +0 -13
  309. package/dist/doc/templates/listBlock.d.ts.map +0 -1
  310. package/dist/doc/templates/listBlock.js +0 -92
  311. package/dist/doc/templates/listBlock.js.map +0 -1
  312. package/dist/doc/templates/mapBlock.d.ts +0 -17
  313. package/dist/doc/templates/mapBlock.d.ts.map +0 -1
  314. package/dist/doc/templates/mapBlock.js +0 -115
  315. package/dist/doc/templates/mapBlock.js.map +0 -1
  316. package/dist/doc/templates/persistentLayers.d.ts +0 -39
  317. package/dist/doc/templates/persistentLayers.d.ts.map +0 -1
  318. package/dist/doc/templates/persistentLayers.js +0 -447
  319. package/dist/doc/templates/persistentLayers.js.map +0 -1
  320. package/dist/doc/templates/photoGrid.d.ts +0 -20
  321. package/dist/doc/templates/photoGrid.d.ts.map +0 -1
  322. package/dist/doc/templates/photoGrid.js +0 -175
  323. package/dist/doc/templates/photoGrid.js.map +0 -1
  324. package/dist/doc/templates/pullQuote.d.ts +0 -13
  325. package/dist/doc/templates/pullQuote.d.ts.map +0 -1
  326. package/dist/doc/templates/pullQuote.js +0 -113
  327. package/dist/doc/templates/pullQuote.js.map +0 -1
  328. package/dist/doc/templates/quoteBlock.d.ts +0 -15
  329. package/dist/doc/templates/quoteBlock.d.ts.map +0 -1
  330. package/dist/doc/templates/quoteBlock.js +0 -101
  331. package/dist/doc/templates/quoteBlock.js.map +0 -1
  332. package/dist/doc/templates/sectionHeader.d.ts +0 -14
  333. package/dist/doc/templates/sectionHeader.d.ts.map +0 -1
  334. package/dist/doc/templates/sectionHeader.js +0 -97
  335. package/dist/doc/templates/sectionHeader.js.map +0 -1
  336. package/dist/doc/templates/statHighlight.d.ts +0 -15
  337. package/dist/doc/templates/statHighlight.d.ts.map +0 -1
  338. package/dist/doc/templates/statHighlight.js +0 -102
  339. package/dist/doc/templates/statHighlight.js.map +0 -1
  340. package/dist/doc/templates/titleBlock.d.ts +0 -13
  341. package/dist/doc/templates/titleBlock.d.ts.map +0 -1
  342. package/dist/doc/templates/titleBlock.js +0 -95
  343. package/dist/doc/templates/titleBlock.js.map +0 -1
  344. package/dist/doc/templates/twoColumn.d.ts +0 -15
  345. package/dist/doc/templates/twoColumn.d.ts.map +0 -1
  346. package/dist/doc/templates/twoColumn.js +0 -225
  347. package/dist/doc/templates/twoColumn.js.map +0 -1
  348. package/dist/doc/templates/videoPullQuote.d.ts +0 -20
  349. package/dist/doc/templates/videoPullQuote.d.ts.map +0 -1
  350. package/dist/doc/templates/videoPullQuote.js +0 -122
  351. package/dist/doc/templates/videoPullQuote.js.map +0 -1
  352. package/dist/doc/templates/videoWithCaption.d.ts +0 -20
  353. package/dist/doc/templates/videoWithCaption.d.ts.map +0 -1
  354. package/dist/doc/templates/videoWithCaption.js +0 -107
  355. package/dist/doc/templates/videoWithCaption.js.map +0 -1
  356. package/dist/doc/utils/animationUtils.d.ts +0 -34
  357. package/dist/doc/utils/animationUtils.d.ts.map +0 -1
  358. package/dist/doc/utils/animationUtils.js +0 -110
  359. package/dist/doc/utils/animationUtils.js.map +0 -1
  360. package/dist/doc/utils/themeUtils.d.ts +0 -64
  361. package/dist/doc/utils/themeUtils.d.ts.map +0 -1
  362. package/dist/doc/utils/themeUtils.js +0 -135
  363. package/dist/doc/utils/themeUtils.js.map +0 -1
  364. package/dist/generate/contentExtractor.d.ts +0 -112
  365. package/dist/generate/contentExtractor.d.ts.map +0 -1
  366. package/dist/generate/contentExtractor.js +0 -638
  367. package/dist/generate/contentExtractor.js.map +0 -1
  368. package/dist/generate/index.d.ts.map +0 -1
  369. package/dist/generate/slideshowGenerator.d.ts +0 -72
  370. package/dist/generate/slideshowGenerator.d.ts.map +0 -1
  371. package/dist/generate/slideshowGenerator.js +0 -159
  372. package/dist/generate/slideshowGenerator.js.map +0 -1
  373. package/dist/generate/templateMapper.d.ts +0 -23
  374. package/dist/generate/templateMapper.d.ts.map +0 -1
  375. package/dist/generate/templateMapper.js +0 -114
  376. package/dist/generate/templateMapper.js.map +0 -1
  377. package/dist/index.d.ts.map +0 -1
  378. package/dist/markdown/convert.d.ts +0 -71
  379. package/dist/markdown/convert.d.ts.map +0 -1
  380. package/dist/markdown/convert.js +0 -845
  381. package/dist/markdown/convert.js.map +0 -1
  382. package/dist/markdown/htmlParse.d.ts +0 -26
  383. package/dist/markdown/htmlParse.d.ts.map +0 -1
  384. package/dist/markdown/htmlParse.js +0 -195
  385. package/dist/markdown/htmlParse.js.map +0 -1
  386. package/dist/markdown/index.d.ts.map +0 -1
  387. package/dist/markdown/parse.d.ts +0 -27
  388. package/dist/markdown/parse.d.ts.map +0 -1
  389. package/dist/markdown/parse.js +0 -90
  390. package/dist/markdown/parse.js.map +0 -1
  391. package/dist/markdown/stringify.d.ts +0 -32
  392. package/dist/markdown/stringify.d.ts.map +0 -1
  393. package/dist/markdown/stringify.js +0 -108
  394. package/dist/markdown/stringify.js.map +0 -1
  395. package/dist/markdown/types.d.ts +0 -516
  396. package/dist/markdown/types.d.ts.map +0 -1
  397. package/dist/markdown/types.js +0 -17
  398. package/dist/markdown/types.js.map +0 -1
  399. package/dist/markdown/utils.d.ts +0 -78
  400. package/dist/markdown/utils.d.ts.map +0 -1
  401. package/dist/markdown/utils.js +0 -153
  402. package/dist/markdown/utils.js.map +0 -1
  403. package/dist/random/SeededRandom.d.ts +0 -50
  404. package/dist/random/SeededRandom.d.ts.map +0 -1
  405. package/dist/random/SeededRandom.js +0 -115
  406. package/dist/random/SeededRandom.js.map +0 -1
  407. package/dist/random/index.d.ts.map +0 -1
  408. package/dist/schemas/BlockTemplates.d.ts +0 -600
  409. package/dist/schemas/BlockTemplates.d.ts.map +0 -1
  410. package/dist/schemas/BlockTemplates.js +0 -72
  411. package/dist/schemas/BlockTemplates.js.map +0 -1
  412. package/dist/schemas/Doc.d.ts +0 -503
  413. package/dist/schemas/Doc.d.ts.map +0 -1
  414. package/dist/schemas/Doc.js +0 -90
  415. package/dist/schemas/Doc.js.map +0 -1
  416. package/dist/schemas/LayoutStrategy.d.ts +0 -84
  417. package/dist/schemas/LayoutStrategy.d.ts.map +0 -1
  418. package/dist/schemas/LayoutStrategy.js +0 -123
  419. package/dist/schemas/LayoutStrategy.js.map +0 -1
  420. package/dist/schemas/MediaProvider.d.ts +0 -65
  421. package/dist/schemas/MediaProvider.d.ts.map +0 -1
  422. package/dist/schemas/MediaProvider.js +0 -13
  423. package/dist/schemas/MediaProvider.js.map +0 -1
  424. package/dist/schemas/Theme.d.ts +0 -194
  425. package/dist/schemas/Theme.d.ts.map +0 -1
  426. package/dist/schemas/Theme.js +0 -97
  427. package/dist/schemas/Theme.js.map +0 -1
  428. package/dist/schemas/Types.d.ts +0 -14
  429. package/dist/schemas/Types.d.ts.map +0 -1
  430. package/dist/schemas/Types.js +0 -5
  431. package/dist/schemas/Types.js.map +0 -1
  432. package/dist/schemas/Viewport.d.ts +0 -74
  433. package/dist/schemas/Viewport.d.ts.map +0 -1
  434. package/dist/schemas/Viewport.js +0 -63
  435. package/dist/schemas/Viewport.js.map +0 -1
  436. package/dist/schemas/index.d.ts.map +0 -1
  437. package/dist/schemas/themeLibrary.d.ts +0 -41
  438. package/dist/schemas/themeLibrary.d.ts.map +0 -1
  439. package/dist/schemas/themeLibrary.js +0 -597
  440. package/dist/schemas/themeLibrary.js.map +0 -1
  441. package/dist/spatial/Geohash.d.ts +0 -85
  442. package/dist/spatial/Geohash.d.ts.map +0 -1
  443. package/dist/spatial/Geohash.js +0 -142
  444. package/dist/spatial/Geohash.js.map +0 -1
  445. package/dist/spatial/Haversine.d.ts +0 -24
  446. package/dist/spatial/Haversine.d.ts.map +0 -1
  447. package/dist/spatial/Haversine.js +0 -48
  448. package/dist/spatial/Haversine.js.map +0 -1
  449. package/dist/spatial/index.d.ts.map +0 -1
  450. package/dist/storage/ContentContainer.d.ts +0 -87
  451. package/dist/storage/ContentContainer.d.ts.map +0 -1
  452. package/dist/storage/ContentContainer.js +0 -131
  453. package/dist/storage/ContentContainer.js.map +0 -1
  454. package/dist/storage/LocalForageAdapter.d.ts +0 -36
  455. package/dist/storage/LocalForageAdapter.d.ts.map +0 -1
  456. package/dist/storage/LocalForageAdapter.js +0 -82
  457. package/dist/storage/LocalForageAdapter.js.map +0 -1
  458. package/dist/storage/LocalStorageAdapter.d.ts +0 -16
  459. package/dist/storage/LocalStorageAdapter.d.ts.map +0 -1
  460. package/dist/storage/LocalStorageAdapter.js +0 -50
  461. package/dist/storage/LocalStorageAdapter.js.map +0 -1
  462. package/dist/storage/MediaProviderFromContainer.d.ts +0 -21
  463. package/dist/storage/MediaProviderFromContainer.d.ts.map +0 -1
  464. package/dist/storage/MediaProviderFromContainer.js +0 -79
  465. package/dist/storage/MediaProviderFromContainer.js.map +0 -1
  466. package/dist/storage/MemoryStorageAdapter.d.ts +0 -15
  467. package/dist/storage/MemoryStorageAdapter.d.ts.map +0 -1
  468. package/dist/storage/MemoryStorageAdapter.js +0 -34
  469. package/dist/storage/MemoryStorageAdapter.js.map +0 -1
  470. package/dist/storage/Storage.d.ts +0 -23
  471. package/dist/storage/Storage.d.ts.map +0 -1
  472. package/dist/storage/Storage.js +0 -9
  473. package/dist/storage/Storage.js.map +0 -1
  474. package/dist/storage/index.d.ts.map +0 -1
  475. package/dist/themeLibrary-CEo2D4b6.d.ts +0 -44
  476. package/dist/timing/index.d.ts.map +0 -1
  477. package/dist/timing/narrationTiming.d.ts +0 -54
  478. package/dist/timing/narrationTiming.d.ts.map +0 -1
  479. package/dist/timing/narrationTiming.js +0 -190
  480. package/dist/timing/narrationTiming.js.map +0 -1
  481. package/dist/timing/readingTime.d.ts +0 -54
  482. package/dist/timing/readingTime.d.ts.map +0 -1
  483. package/dist/timing/readingTime.js +0 -49
  484. package/dist/timing/readingTime.js.map +0 -1
  485. package/dist/transform/applyTransform.d.ts +0 -22
  486. package/dist/transform/applyTransform.d.ts.map +0 -1
  487. package/dist/transform/applyTransform.js +0 -68
  488. package/dist/transform/applyTransform.js.map +0 -1
  489. package/dist/transform/blockAnalyzer.d.ts +0 -48
  490. package/dist/transform/blockAnalyzer.d.ts.map +0 -1
  491. package/dist/transform/blockAnalyzer.js +0 -135
  492. package/dist/transform/blockAnalyzer.js.map +0 -1
  493. package/dist/transform/index.d.ts.map +0 -1
  494. package/dist/transform/registry.d.ts +0 -19
  495. package/dist/transform/registry.d.ts.map +0 -1
  496. package/dist/transform/registry.js +0 -41
  497. package/dist/transform/registry.js.map +0 -1
  498. package/dist/transform/styles/dataDriven.d.ts +0 -4
  499. package/dist/transform/styles/dataDriven.d.ts.map +0 -1
  500. package/dist/transform/styles/dataDriven.js +0 -15
  501. package/dist/transform/styles/dataDriven.js.map +0 -1
  502. package/dist/transform/styles/documentary.d.ts +0 -4
  503. package/dist/transform/styles/documentary.d.ts.map +0 -1
  504. package/dist/transform/styles/documentary.js +0 -15
  505. package/dist/transform/styles/documentary.js.map +0 -1
  506. package/dist/transform/styles/index.d.ts +0 -6
  507. package/dist/transform/styles/index.d.ts.map +0 -1
  508. package/dist/transform/styles/index.js +0 -6
  509. package/dist/transform/styles/index.js.map +0 -1
  510. package/dist/transform/styles/magazine.d.ts +0 -4
  511. package/dist/transform/styles/magazine.d.ts.map +0 -1
  512. package/dist/transform/styles/magazine.js +0 -15
  513. package/dist/transform/styles/magazine.js.map +0 -1
  514. package/dist/transform/styles/minimal.d.ts +0 -4
  515. package/dist/transform/styles/minimal.d.ts.map +0 -1
  516. package/dist/transform/styles/minimal.js +0 -15
  517. package/dist/transform/styles/minimal.js.map +0 -1
  518. package/dist/transform/styles/narrative.d.ts +0 -4
  519. package/dist/transform/styles/narrative.d.ts.map +0 -1
  520. package/dist/transform/styles/narrative.js +0 -15
  521. package/dist/transform/styles/narrative.js.map +0 -1
  522. package/dist/transform/templateSelector.d.ts +0 -30
  523. package/dist/transform/templateSelector.d.ts.map +0 -1
  524. package/dist/transform/templateSelector.js +0 -218
  525. package/dist/transform/templateSelector.js.map +0 -1
  526. package/dist/transform/timingAllocator.d.ts +0 -21
  527. package/dist/transform/timingAllocator.d.ts.map +0 -1
  528. package/dist/transform/timingAllocator.js +0 -111
  529. package/dist/transform/timingAllocator.js.map +0 -1
  530. package/dist/transform/types.d.ts +0 -86
  531. package/dist/transform/types.d.ts.map +0 -1
  532. package/dist/transform/types.js +0 -9
  533. package/dist/transform/types.js.map +0 -1
@@ -1,9 +1,159 @@
1
- export type { StorageAdapter } from './Storage.js';
2
- export { MemoryStorageAdapter } from './MemoryStorageAdapter.js';
3
- export { LocalStorageAdapter } from './LocalStorageAdapter.js';
4
- export { LocalForageAdapter } from './LocalForageAdapter.js';
5
- export type { LocalForageAdapterOptions } from './LocalForageAdapter.js';
6
- export type { ContentContainer, ContentEntry } from './ContentContainer.js';
7
- export { MemoryContentContainer, findDocumentPath } from './ContentContainer.js';
8
- export { createMediaProviderFromContainer } from './MediaProviderFromContainer.js';
9
- //# sourceMappingURL=index.d.ts.map
1
+ import { C as ContentContainer, a as ContentEntry } from '../ContentContainer-DNx460y8.js';
2
+ export { M as MemoryContentContainer, f as findDocumentPath } from '../ContentContainer-DNx460y8.js';
3
+ import { a as MediaProvider } from '../MediaProvider-wpSe21B3.js';
4
+
5
+ /**
6
+ * Storage - Abstract persistence interface
7
+ *
8
+ * Defines the contract for persistent storage across different environments.
9
+ * All values are JSON-serialized, so any serializable value can be stored.
10
+ * Keys can be automatically namespaced with a configurable prefix.
11
+ */
12
+ /** Storage adapter interface - implemented by environment-specific adapters */
13
+ interface StorageAdapter {
14
+ /** Get a value by key, returns null if not found */
15
+ get<T>(key: string): Promise<T | null>;
16
+ /** Set a value for a key */
17
+ set<T>(key: string, value: T): Promise<void>;
18
+ /** Remove a value by key */
19
+ remove(key: string): Promise<void>;
20
+ /** Clear all stored values (within our namespace) */
21
+ clear(): Promise<void>;
22
+ /** Get all keys (within our namespace) */
23
+ keys(): Promise<string[]>;
24
+ /** Check if this adapter supports enumeration */
25
+ readonly supportsEnumeration: boolean;
26
+ }
27
+
28
+ /**
29
+ * In-memory storage adapter for testing and SSR environments.
30
+ * Data does not persist across page reloads.
31
+ */
32
+
33
+ declare class MemoryStorageAdapter implements StorageAdapter {
34
+ readonly supportsEnumeration = true;
35
+ private store;
36
+ get<T>(key: string): Promise<T | null>;
37
+ set<T>(key: string, value: T): Promise<void>;
38
+ remove(key: string): Promise<void>;
39
+ clear(): Promise<void>;
40
+ keys(): Promise<string[]>;
41
+ }
42
+
43
+ /**
44
+ * localStorage adapter for web browsers.
45
+ * Supports a configurable key prefix to namespace stored data.
46
+ */
47
+
48
+ declare class LocalStorageAdapter implements StorageAdapter {
49
+ readonly supportsEnumeration = true;
50
+ private prefix;
51
+ constructor(prefix?: string);
52
+ get<T>(key: string): Promise<T | null>;
53
+ set<T>(key: string, value: T): Promise<void>;
54
+ remove(key: string): Promise<void>;
55
+ clear(): Promise<void>;
56
+ keys(): Promise<string[]>;
57
+ }
58
+
59
+ /**
60
+ * LocalForage adapter - IndexedDB storage with automatic fallbacks.
61
+ *
62
+ * Uses localforage which provides IndexedDB storage with automatic
63
+ * fallbacks to WebSQL and localStorage. This allows storing much more
64
+ * data than raw localStorage (which is limited to ~5MB).
65
+ *
66
+ * Unlike LocalStorageAdapter, this adapter can store binary data
67
+ * (ArrayBuffer, Blob, Uint8Array) natively without JSON serialization.
68
+ *
69
+ * Ported from qualla-internal/shared/services/StorageAdapters.ts with
70
+ * configurable store name and key prefix.
71
+ */
72
+
73
+ interface LocalForageAdapterOptions {
74
+ /** IndexedDB database name (default: 'squisq') */
75
+ name?: string;
76
+ /** IndexedDB object store name (default: 'data') */
77
+ storeName?: string;
78
+ /** Key prefix for namespacing (default: '') */
79
+ prefix?: string;
80
+ /** Human-readable description (default: 'Squisq storage') */
81
+ description?: string;
82
+ }
83
+ declare class LocalForageAdapter implements StorageAdapter {
84
+ readonly supportsEnumeration = true;
85
+ private store;
86
+ private prefix;
87
+ constructor(options?: LocalForageAdapterOptions);
88
+ get<T>(key: string): Promise<T | null>;
89
+ set<T>(key: string, value: T): Promise<void>;
90
+ remove(key: string): Promise<void>;
91
+ clear(): Promise<void>;
92
+ keys(): Promise<string[]>;
93
+ }
94
+
95
+ /**
96
+ * ScopedContentContainer
97
+ *
98
+ * Wraps a parent {@link ContentContainer} and prefixes every path with a
99
+ * fixed subfolder, presenting that subfolder as the root. Useful for
100
+ * sidecar folders (e.g. `<imagebasename>_files/`) where a component
101
+ * should be able to read/write/list files relative to its own root
102
+ * without knowing where it lives in the parent tree.
103
+ *
104
+ * Scopes nest: `scopeContainer(scopeContainer(parent, 'a'), 'b')` is
105
+ * equivalent to `scopeContainer(parent, 'a/b')`.
106
+ *
107
+ * `getDocumentPath()` always returns `null` for scoped sidecars — they
108
+ * are not document roots.
109
+ */
110
+
111
+ /**
112
+ * A ContentContainer view rooted at a subfolder of a parent container.
113
+ * All paths passed to / returned from this container are relative to
114
+ * the subfolder; the parent never sees an unprefixed path.
115
+ */
116
+ declare class ScopedContentContainer implements ContentContainer {
117
+ private readonly parent;
118
+ /** Prefix without trailing slash. */
119
+ readonly prefix: string;
120
+ /** Prefix with trailing slash. */
121
+ private readonly prefixSlash;
122
+ constructor(parent: ContentContainer, prefix: string);
123
+ private toParent;
124
+ /** Strip the prefix from a parent-space path. Returns null if the path is outside the scope. */
125
+ private fromParent;
126
+ readFile(path: string): Promise<ArrayBuffer | null>;
127
+ writeFile(path: string, data: ArrayBuffer | Uint8Array, mimeType?: string): Promise<void>;
128
+ removeFile(path: string): Promise<void>;
129
+ listFiles(prefix?: string): Promise<ContentEntry[]>;
130
+ exists(path: string): Promise<boolean>;
131
+ /** Sidecars are not document roots. */
132
+ getDocumentPath(): Promise<string | null>;
133
+ readDocument(): Promise<string | null>;
134
+ writeDocument(): Promise<void>;
135
+ }
136
+ /** Factory: convenience wrapper for `new ScopedContentContainer(parent, prefix)`. */
137
+ declare function scopeContainer(parent: ContentContainer, prefix: string): ScopedContentContainer;
138
+
139
+ /**
140
+ * MediaProviderFromContainer — bridges ContentContainer to MediaProvider.
141
+ *
142
+ * Creates a MediaProvider that resolves relative paths by reading binary data
143
+ * from a ContentContainer and generating blob URLs. Blob URLs are cached and
144
+ * revoked on dispose().
145
+ *
146
+ * This allows any ContentContainer (memory, slot-backed, zip-loaded) to be
147
+ * used with existing rendering components (DocPlayer, ImageLayer, VideoLayer)
148
+ * that consume MediaProvider.
149
+ */
150
+
151
+ /**
152
+ * Create a MediaProvider backed by a ContentContainer.
153
+ *
154
+ * @param container — The ContentContainer to read/write media from
155
+ * @returns A MediaProvider that resolves paths to blob URLs
156
+ */
157
+ declare function createMediaProviderFromContainer(container: ContentContainer): MediaProvider;
158
+
159
+ export { ContentContainer, ContentEntry, LocalForageAdapter, type LocalForageAdapterOptions, LocalStorageAdapter, MemoryStorageAdapter, ScopedContentContainer, type StorageAdapter, createMediaProviderFromContainer, scopeContainer };
@@ -1,6 +1,21 @@
1
- export { MemoryStorageAdapter } from './MemoryStorageAdapter.js';
2
- export { LocalStorageAdapter } from './LocalStorageAdapter.js';
3
- export { LocalForageAdapter } from './LocalForageAdapter.js';
4
- export { MemoryContentContainer, findDocumentPath } from './ContentContainer.js';
5
- export { createMediaProviderFromContainer } from './MediaProviderFromContainer.js';
1
+ import {
2
+ LocalForageAdapter,
3
+ LocalStorageAdapter,
4
+ MemoryContentContainer,
5
+ MemoryStorageAdapter,
6
+ ScopedContentContainer,
7
+ createMediaProviderFromContainer,
8
+ findDocumentPath,
9
+ scopeContainer
10
+ } from "../chunk-2TMAWB4Y.js";
11
+ export {
12
+ LocalForageAdapter,
13
+ LocalStorageAdapter,
14
+ MemoryContentContainer,
15
+ MemoryStorageAdapter,
16
+ ScopedContentContainer,
17
+ createMediaProviderFromContainer,
18
+ findDocumentPath,
19
+ scopeContainer
20
+ };
6
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC"}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,8 +1,8 @@
1
- import { K as PersistentLayer, x as Layer, N as PersistentLayerConfig, af as TitleBlockInput, a5 as TemplateContext, Y as SectionHeaderInput, a0 as StatHighlightInput, W as QuoteBlockInput, F as FactCardInput, aj as TwoColumnInput, p as DateEventInput, w as ImageWithCaptionInput, M as MapBlockInput, $ as StartBlockConfig, u as FullBleedQuoteInput, z as ListBlockInput, S as PhotoGridInput, r as DefinitionCardInput, k as ComparisonBarInput, V as PullQuoteInput, an as VideoWithCaptionInput, am as VideoPullQuoteInput, o as DataTableInput, A as AccentImage, a as AccentPosition, aa as Theme, ao as ViewportConfig, t as DocBlock, B as Block, a4 as TemplateBlock, a7 as TemplateRegistry, b as Animation, c as AnimationType, ai as TransitionType, ac as ThemeColorScheme, s as Doc } from '../Doc-Ch4tc3vv.js';
2
- export { y as LayoutHints, X as RenderStyle, ab as ThemeColorPalette, ad as ThemeStyle, ae as ThemeTypography, ak as VIEWPORT_PRESETS, ap as ViewportOrientation, aq as ViewportPreset, au as createTemplateContext, az as getLayoutHints, aC as getTwoColumnPositions, aD as getViewport, aE as getViewportOrientation, aG as isTemplateBlock, aI as scaledFontSize } from '../Doc-Ch4tc3vv.js';
3
- import { p as MarkdownHeading, l as MarkdownDocument } from '../types-CkNttVSF.js';
1
+ import { Q as PersistentLayer, z as Layer, R as PersistentLayerConfig, am as TitleBlockInput, aa as TemplateContext, a0 as SectionHeaderInput, a4 as StatHighlightInput, Z as QuoteBlockInput, F as FactCardInput, aq as TwoColumnInput, p as DateEventInput, y as ImageWithCaptionInput, H as LeftFeatureInput, $ as RightFeatureInput, M as MapBlockInput, a3 as StartBlockConfig, w as FullBleedQuoteInput, J as ListBlockInput, V as PhotoGridInput, r as DefinitionCardInput, k as ComparisonBarInput, Y as PullQuoteInput, au as VideoWithCaptionInput, at as VideoPullQuoteInput, o as DataTableInput, A as AccentImage, a as AccentPosition, af as Theme, av as ViewportConfig, t as DocBlock, B as Block, a9 as TemplateBlock, ac as TemplateRegistry, b as Animation, c as AnimationType, ap as TransitionType, ah as ThemeColorScheme, s as Doc } from '../Doc-BeSeH2iX.js';
2
+ export { E as LayoutHints, _ as RenderStyle, ag as ThemeColorPalette, ak as ThemeStyle, al as ThemeTypography, ar as VIEWPORT_PRESETS, aw as ViewportOrientation, ax as ViewportPreset, aB as createTemplateContext, aG as getLayoutHints, aK as getTwoColumnPositions, aL as getViewport, aM as getViewportOrientation, aO as isTemplateBlock, aS as scaledFontSize } from '../Doc-BeSeH2iX.js';
3
+ import { p as MarkdownHeading, l as MarkdownDocument } from '../types-BdZkdJ3z.js';
4
4
  import { C as ContentContainer } from '../ContentContainer-DNx460y8.js';
5
- export { D as DEFAULT_THEME, g as getAvailableThemes, b as getThemeSummaries, r as resolveTheme } from '../themeLibrary-CEo2D4b6.js';
5
+ export { D as DEFAULT_THEME, g as getAvailableThemes, b as getThemeSummaries, r as resolveTheme } from '../themeLibrary-BHjJ0Qx6.js';
6
6
 
7
7
  /**
8
8
  * Persistent Layers Expansion
@@ -139,6 +139,23 @@ declare function dateEvent(input: DateEventInput, context: TemplateContext): Lay
139
139
 
140
140
  declare function imageWithCaption(input: ImageWithCaptionInput, context: TemplateContext): Layer[];
141
141
 
142
+ /**
143
+ * Feature Block Templates — `leftFeature` and `rightFeature`
144
+ *
145
+ * Pairs a "feature" image on one side of the block with a title + body
146
+ * paragraph on the other. The two templates are mirror images, so the
147
+ * actual layer-builder lives here once and the per-side template files
148
+ * just call it with a `side` parameter.
149
+ *
150
+ * Used for editorial layouts like product highlights, profile cards,
151
+ * and section intros where a single image deserves to sit next to a
152
+ * short text block rather than behind it (which is what
153
+ * `imageWithCaption` does).
154
+ */
155
+
156
+ declare function leftFeature(input: LeftFeatureInput, context: TemplateContext): Layer[];
157
+ declare function rightFeature(input: RightFeatureInput, context: TemplateContext): Layer[];
158
+
142
159
  /**
143
160
  * Map Block Template
144
161
  *
@@ -392,11 +409,32 @@ declare function adjustY(originalY: string | number, layout: AccentLayout): stri
392
409
  */
393
410
 
394
411
  /**
395
- * Registry mapping template names to their implementation functions.
396
- * Note: coverBlock is not in the registry as it's used directly for start blocks,
397
- * not as a regular template in the block sequence.
412
+ * Registry mapping template ids (the strings that appear in
413
+ * `{[name]}` markdown annotations) to their implementation functions.
414
+ *
415
+ * Some implementation functions keep historical "Block" suffixes
416
+ * (`titleBlock`, `quoteBlock`, `mapBlock`, `listBlock`) for source
417
+ * readability — the registry surfaces them under the cleaner short
418
+ * ids (`title`, `quote`, `map`, `list`). {@link TEMPLATE_ALIASES} keeps
419
+ * the legacy long ids resolvable for documents written before the
420
+ * rename.
421
+ *
422
+ * Note: coverBlock is not in the registry as it's used directly for
423
+ * start blocks, not as a regular template in the block sequence.
398
424
  */
399
425
  declare const templateRegistry: TemplateRegistry;
426
+ /**
427
+ * Back-compat: maps legacy template ids (kept around for documents
428
+ * authored before the "Block" suffix was dropped) to the canonical
429
+ * short ids. Resolved by {@link resolveTemplateName} so both the
430
+ * registry lookup and `hasTemplate()` accept either form.
431
+ */
432
+ declare const TEMPLATE_ALIASES: Readonly<Record<string, string>>;
433
+ /**
434
+ * Resolve a template id through {@link TEMPLATE_ALIASES}. Returns the
435
+ * input unchanged when no alias is registered.
436
+ */
437
+ declare function resolveTemplateName(name: string): string;
400
438
  /**
401
439
  * Expand a template block into a full Block with layers.
402
440
  */
@@ -444,7 +482,9 @@ declare function expandDocBlocks(blocks: DocBlock[], options?: ExpandDocBlocksOp
444
482
  */
445
483
  declare function getAvailableTemplates(): string[];
446
484
  /**
447
- * Check if a template exists.
485
+ * Check if a template exists. Accepts both the canonical short id
486
+ * (`title`, `quote`, `map`, `list`) and legacy aliases
487
+ * (`titleBlock`, `quoteBlock`, `mapBlock`, `listBlock`).
448
488
  */
449
489
  declare function hasTemplate(name: string): boolean;
450
490
 
@@ -495,12 +535,12 @@ declare function getAnimationProgress(animation: Animation, currentTime: number,
495
535
  */
496
536
  declare function resolveColorScheme(context: TemplateContext, name: string | undefined): ThemeColorScheme;
497
537
  /**
498
- * Get the theme font family for a given role.
538
+ * Get the theme font family for a given role, resolved to a CSS string.
499
539
  * Templates call this to set `fontFamily` on text layers.
500
540
  *
501
- * @param context Template context (includes theme with typography settings)
502
- * @param role 'title' for headings, 'body' for descriptions, 'mono' for code
503
- * @returns A CSS font-family string with the theme's font and safe fallbacks
541
+ * Theme fields are structured `FontFamily` references (`{ stackId }` or
542
+ * `{ custom: { name, fallback } }`); this helper resolves them to a
543
+ * CSS font-family string with safe fallbacks.
504
544
  */
505
545
  declare function getThemeFont(context: TemplateContext, role: 'title' | 'body' | 'mono'): string;
506
546
  /**
@@ -754,4 +794,4 @@ declare function scoreTextSimilarity(a: string, b: string): number;
754
794
  */
755
795
  declare function resolveAudioMapping(doc: Doc, container: ContentContainer): Promise<Doc>;
756
796
 
757
- export { type AccentLayout, type AudioSegmentTiming, type CoverBlockInput, DEFAULT_LAYOUT, DocBlock, type DocStylePreset, type ExpandDocBlocksOptions, type MarkdownToDocOptions, PersistentLayerConfig, type RenderContext, TemplateBlock, TemplateContext, Theme, ThemeColorScheme, ViewportConfig, adjustY, comparisonBar, countBlocks, coverBlock, createAccentLayers, dataTable, dateEvent, definitionCard, docToMarkdown, expandCoverBlock, expandDocBlocks, expandPersistentLayers, expandTemplateBlock, factCard, flattenBlocks, fullBleedQuote, getAccentLayout, getAnimationProgress, getAnimationStyle, getAvailableTemplates, getBlockDepth, getDefaultAnimation, getDefaultAnimationDuration, getDocStyleConfig, getLayers, getOverlayOpacity, getTemplateHint, getThemeFont, getTransitionClass, hasTemplate, imageWithCaption, listBlock, mapBlock, markdownToDoc, photoGrid, pullQuote, quoteBlock, resolveAudioMapping, resolveColorScheme, scaleAnimationDuration, scoreTextSimilarity, sectionHeader, shouldUseShadow, statHighlight, templateRegistry, themedFontSize, titleBlock, twoColumn, videoPullQuote, videoWithCaption };
797
+ export { type AccentLayout, type AudioSegmentTiming, type CoverBlockInput, DEFAULT_LAYOUT, DocBlock, type DocStylePreset, type ExpandDocBlocksOptions, type MarkdownToDocOptions, PersistentLayerConfig, type RenderContext, TEMPLATE_ALIASES, TemplateBlock, TemplateContext, Theme, ThemeColorScheme, ViewportConfig, adjustY, comparisonBar, countBlocks, coverBlock, createAccentLayers, dataTable, dateEvent, definitionCard, docToMarkdown, expandCoverBlock, expandDocBlocks, expandPersistentLayers, expandTemplateBlock, factCard, flattenBlocks, fullBleedQuote, getAccentLayout, getAnimationProgress, getAnimationStyle, getAvailableTemplates, getBlockDepth, getDefaultAnimation, getDefaultAnimationDuration, getDocStyleConfig, getLayers, getOverlayOpacity, getTemplateHint, getThemeFont, getTransitionClass, hasTemplate, imageWithCaption, leftFeature, listBlock, mapBlock, markdownToDoc, photoGrid, pullQuote, quoteBlock, resolveAudioMapping, resolveColorScheme, resolveTemplateName, rightFeature, scaleAnimationDuration, scoreTextSimilarity, sectionHeader, shouldUseShadow, statHighlight, templateRegistry, themedFontSize, titleBlock, twoColumn, videoPullQuote, videoWithCaption };
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  DEFAULT_LAYOUT,
3
+ TEMPLATE_ALIASES,
3
4
  adjustY,
4
5
  comparisonBar,
5
6
  countBlocks,
@@ -31,6 +32,7 @@ import {
31
32
  getTransitionClass,
32
33
  hasTemplate,
33
34
  imageWithCaption,
35
+ leftFeature,
34
36
  listBlock,
35
37
  mapBlock,
36
38
  markdownToDoc,
@@ -39,6 +41,8 @@ import {
39
41
  quoteBlock,
40
42
  resolveAudioMapping,
41
43
  resolveColorScheme,
44
+ resolveTemplateName,
45
+ rightFeature,
42
46
  scaleAnimationDuration,
43
47
  scoreTextSimilarity,
44
48
  sectionHeader,
@@ -50,13 +54,13 @@ import {
50
54
  twoColumn,
51
55
  videoPullQuote,
52
56
  videoWithCaption
53
- } from "../chunk-6BAVXFYC.js";
57
+ } from "../chunk-KSWJR66U.js";
54
58
  import {
55
59
  DEFAULT_THEME,
56
60
  getAvailableThemes,
57
61
  getThemeSummaries,
58
62
  resolveTheme
59
- } from "../chunk-FIQR4AJG.js";
63
+ } from "../chunk-B4EEON3N.js";
60
64
  import {
61
65
  VIEWPORT_PRESETS,
62
66
  createTemplateContext,
@@ -66,13 +70,14 @@ import {
66
70
  getViewportOrientation,
67
71
  isTemplateBlock,
68
72
  scaledFontSize2 as scaledFontSize
69
- } from "../chunk-QM5PKNPW.js";
70
- import "../chunk-7GF6RDED.js";
73
+ } from "../chunk-5WFRKURX.js";
74
+ import "../chunk-H3AXU4MJ.js";
71
75
  import "../chunk-4X3JQXNM.js";
72
76
  import "../chunk-3E5F2XMR.js";
73
77
  export {
74
78
  DEFAULT_LAYOUT,
75
79
  DEFAULT_THEME,
80
+ TEMPLATE_ALIASES,
76
81
  VIEWPORT_PRESETS,
77
82
  adjustY,
78
83
  comparisonBar,
@@ -113,6 +118,7 @@ export {
113
118
  hasTemplate,
114
119
  imageWithCaption,
115
120
  isTemplateBlock,
121
+ leftFeature,
116
122
  listBlock,
117
123
  mapBlock,
118
124
  markdownToDoc,
@@ -121,7 +127,9 @@ export {
121
127
  quoteBlock,
122
128
  resolveAudioMapping,
123
129
  resolveColorScheme,
130
+ resolveTemplateName,
124
131
  resolveTheme,
132
+ rightFeature,
125
133
  scaleAnimationDuration,
126
134
  scaledFontSize,
127
135
  scoreTextSimilarity,
@@ -0,0 +1,40 @@
1
+ import { af as Theme } from './Doc-BeSeH2iX.js';
2
+
3
+ /**
4
+ * Built-in Theme Library
5
+ *
6
+ * Public entry point for theme lookup. Built-in themes live as JSON
7
+ * sidecars in [./themes/](./themes/) — they share the exact same shape
8
+ * as customizer-authored themes (no two-tier distinction).
9
+ *
10
+ * Usage:
11
+ * ```ts
12
+ * import { THEMES, resolveTheme } from '@bendyline/squisq/schemas';
13
+ *
14
+ * const theme = resolveTheme('minimalist'); // by id, with registry override
15
+ * const theme = THEMES.documentary; // direct access to a built-in
16
+ * ```
17
+ */
18
+
19
+ /** All built-in themes, keyed by id. */
20
+ declare const THEMES: Record<string, Theme>;
21
+ /** The default theme id. */
22
+ declare const DEFAULT_THEME_ID = "standard";
23
+ /** The default theme (standard — safe system fonts, no external dependencies). */
24
+ declare const DEFAULT_THEME: Theme;
25
+ /**
26
+ * Resolve a theme by id. Custom themes registered via `registerTheme()`
27
+ * take precedence over built-ins; otherwise built-ins are searched and
28
+ * the default theme is returned for unknown ids.
29
+ */
30
+ declare function resolveTheme(id: string | undefined): Theme;
31
+ /** Get all built-in theme ids. */
32
+ declare function getAvailableThemes(): string[];
33
+ /** Get a summary of all built-in themes (id + name + description) for theme pickers. */
34
+ declare function getThemeSummaries(): Array<{
35
+ id: string;
36
+ name: string;
37
+ description?: string;
38
+ }>;
39
+
40
+ export { DEFAULT_THEME as D, THEMES as T, DEFAULT_THEME_ID as a, getThemeSummaries as b, getAvailableThemes as g, resolveTheme as r };
@@ -1,4 +1,109 @@
1
- export { DEFAULT_WORDS_PER_SECOND, estimateSpokenWordCount, countSpokenWords, estimateTimeFromText, calculatePrefixDuration, estimateNarrationDuration, } from './narrationTiming.js';
2
- export { estimateReadingTime, estimateNarrationTime } from './readingTime.js';
3
- export type { ReadingTimeEstimate, ReadingTimeOptions, NarrationTimeEstimate, NarrationTimeOptions, } from './readingTime.js';
4
- //# sourceMappingURL=index.d.ts.map
1
+ /**
2
+ * Narration timing estimation.
3
+ *
4
+ * Estimates how long text takes to speak aloud, accounting for:
5
+ * - Numbers spoken as multiple words (e.g., "1910" → "nineteen ten")
6
+ * - Pauses at commas
7
+ * - Year pronunciation conventions (1000–2099)
8
+ *
9
+ * Ported from qualla-internal's AudioTiming.ts (pure functions, no Node.js deps).
10
+ */
11
+ /** Default speaking rate in words per second (~150 WPM). */
12
+ declare const DEFAULT_WORDS_PER_SECOND = 2.5;
13
+ /**
14
+ * Estimate how many "spoken word equivalents" a single token represents.
15
+ * Numbers get expanded (e.g., "175,000" → ~5 words × 1.3 multiplier).
16
+ */
17
+ declare function estimateSpokenWordCount(token: string): number;
18
+ /**
19
+ * Count "spoken word equivalents" in a block of text,
20
+ * expanding numbers and adding comma pauses.
21
+ */
22
+ declare function countSpokenWords(text: string): number;
23
+ /**
24
+ * Estimate audio time at a character offset using word-proportion mapping.
25
+ *
26
+ * Given the full source text and a character position, returns the
27
+ * estimated time (in seconds) at which that position would be spoken.
28
+ *
29
+ * @param text - Full source text
30
+ * @param charOffset - Character offset to estimate timing for
31
+ * @param totalDuration - Total audio duration in seconds
32
+ * @returns Estimated time in seconds
33
+ */
34
+ declare function estimateTimeFromText(text: string, charOffset: number, totalDuration: number): number;
35
+ /**
36
+ * Estimate how long a spoken prefix adds to audio duration.
37
+ *
38
+ * When audio includes a spoken title or header before the main content,
39
+ * this calculates the extra duration to offset timing calculations.
40
+ *
41
+ * @param prefix - Prefix text (e.g., an article title spoken before the body)
42
+ * @param wordsPerSecond - Speaking rate (default: 2.5)
43
+ * @returns Estimated duration in seconds
44
+ */
45
+ declare function calculatePrefixDuration(prefix: string, wordsPerSecond?: number): number;
46
+ /**
47
+ * Estimate narration duration for a block of text.
48
+ *
49
+ * @param text - The text to estimate
50
+ * @param wordsPerSecond - Speaking rate (default: 2.5, i.e. ~150 WPM)
51
+ * @returns Duration in seconds
52
+ */
53
+ declare function estimateNarrationDuration(text: string, wordsPerSecond?: number): number;
54
+
55
+ /**
56
+ * Reading time estimation.
57
+ *
58
+ * Estimates how long it takes to read text silently vs. narrate it aloud.
59
+ * Uses configurable words-per-minute rates.
60
+ */
61
+ /** Result of a reading-time estimate. */
62
+ interface ReadingTimeEstimate {
63
+ /** Number of words (plain word count, not spoken equivalents). */
64
+ words: number;
65
+ /** Estimated minutes (decimal). */
66
+ minutes: number;
67
+ /** Estimated seconds (rounded). */
68
+ seconds: number;
69
+ }
70
+ /** Options for reading-time estimation. */
71
+ interface ReadingTimeOptions {
72
+ /** Words per minute for silent reading (default: 200). */
73
+ wordsPerMinute?: number;
74
+ }
75
+ /**
76
+ * Estimate silent reading time for a block of text.
77
+ *
78
+ * @param text - The text to estimate
79
+ * @param options - Optional configuration
80
+ * @returns Word count + time estimate
81
+ */
82
+ declare function estimateReadingTime(text: string, options?: ReadingTimeOptions): ReadingTimeEstimate;
83
+ /** Result of a narration-time estimate. */
84
+ interface NarrationTimeEstimate {
85
+ /** Spoken word equivalents (numbers expanded, comma pauses added). */
86
+ spokenWords: number;
87
+ /** Estimated minutes (decimal). */
88
+ minutes: number;
89
+ /** Estimated seconds (rounded). */
90
+ seconds: number;
91
+ }
92
+ /** Options for narration-time estimation. */
93
+ interface NarrationTimeOptions {
94
+ /** Words per second for narration (default: 2.5 ≈ 150 WPM). */
95
+ wordsPerSecond?: number;
96
+ }
97
+ /**
98
+ * Estimate narration (spoken) time for a block of text.
99
+ *
100
+ * Unlike silent reading, this accounts for numbers being spoken as
101
+ * multiple words and pauses at commas.
102
+ *
103
+ * @param text - The text to estimate
104
+ * @param options - Optional configuration
105
+ * @returns Spoken word equivalents + time estimate
106
+ */
107
+ declare function estimateNarrationTime(text: string, options?: NarrationTimeOptions): NarrationTimeEstimate;
108
+
109
+ export { DEFAULT_WORDS_PER_SECOND, type NarrationTimeEstimate, type NarrationTimeOptions, type ReadingTimeEstimate, type ReadingTimeOptions, calculatePrefixDuration, countSpokenWords, estimateNarrationDuration, estimateNarrationTime, estimateReadingTime, estimateSpokenWordCount, estimateTimeFromText };
@@ -1,3 +1,24 @@
1
- export { DEFAULT_WORDS_PER_SECOND, estimateSpokenWordCount, countSpokenWords, estimateTimeFromText, calculatePrefixDuration, estimateNarrationDuration, } from './narrationTiming.js';
2
- export { estimateReadingTime, estimateNarrationTime } from './readingTime.js';
1
+ import "../chunk-DNJKBAI7.js";
2
+ import {
3
+ estimateNarrationTime,
4
+ estimateReadingTime
5
+ } from "../chunk-4X3JQXNM.js";
6
+ import {
7
+ DEFAULT_WORDS_PER_SECOND,
8
+ calculatePrefixDuration,
9
+ countSpokenWords,
10
+ estimateNarrationDuration,
11
+ estimateSpokenWordCount,
12
+ estimateTimeFromText
13
+ } from "../chunk-3E5F2XMR.js";
14
+ export {
15
+ DEFAULT_WORDS_PER_SECOND,
16
+ calculatePrefixDuration,
17
+ countSpokenWords,
18
+ estimateNarrationDuration,
19
+ estimateNarrationTime,
20
+ estimateReadingTime,
21
+ estimateSpokenWordCount,
22
+ estimateTimeFromText
23
+ };
3
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/timing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}