@bendyline/squisq 2.0.1 → 2.2.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 (438) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE.md +24 -0
  3. package/dist/{ContentContainer-BXUlIf18.d.ts → ContentContainer-B2w9sUoL.d.ts} +15 -0
  4. package/dist/{Doc-ylqWKDc_.d.ts → Doc-BubIpWsp.d.ts} +160 -3
  5. package/dist/{ImageEditDoc-D828IXJ1.d.ts → ImageEditDoc-CGxk5CHc.d.ts} +1 -1
  6. package/dist/{annotationCoercion-Dr_DY9Hx.d.ts → annotationCoercion-PtRQhk5V.d.ts} +1 -1
  7. package/dist/chunk-2L55443L.js +0 -0
  8. package/dist/chunk-2ZWIXGAC.js +214 -0
  9. package/dist/{chunk-2PWOO4ZE.js → chunk-32R2RZAO.js} +72 -3
  10. package/dist/chunk-3IGPAPQ7.js +645 -0
  11. package/dist/{chunk-QE7TWGVT.js → chunk-4VOD55SX.js} +0 -1
  12. package/dist/{chunk-3E5F2XMR.js → chunk-67L6WRJN.js} +0 -1
  13. package/dist/{chunk-5DKBFXPY.js → chunk-6ECMNUIP.js} +26 -18
  14. package/dist/{chunk-X6DUONGT.js → chunk-7ARJZYQY.js} +280 -128
  15. package/dist/{chunk-DBS6RIFL.js → chunk-7N4G32LG.js} +0 -1
  16. package/dist/{chunk-JOQYPRDZ.js → chunk-7YEZFHLS.js} +10 -8
  17. package/dist/{chunk-2UQOHYE2.js → chunk-7ZAAICW4.js} +0 -1
  18. package/dist/{chunk-66QO7XFB.js → chunk-ACZOVWX3.js} +117 -7
  19. package/dist/{chunk-5J4HKRJF.js → chunk-BAOV476U.js} +0 -1
  20. package/dist/chunk-BCCXTMN5.js +699 -0
  21. package/dist/{chunk-W4O2TX5I.js → chunk-C33GTPUZ.js} +579 -4
  22. package/dist/{chunk-MMPBOUK7.js → chunk-CB45YGAM.js} +7 -2
  23. package/dist/{chunk-CY2R2VPR.js → chunk-DYPMOPIW.js} +18 -2
  24. package/dist/{chunk-VR7UPJ7C.js → chunk-FCG3BIZN.js} +12 -1
  25. package/dist/{chunk-5UYI3RJB.js → chunk-FDYDYL77.js} +54 -40
  26. package/dist/{chunk-TFJVXUHH.js → chunk-I2O6W7DX.js} +1513 -79
  27. package/dist/{chunk-Q7LROV2H.js → chunk-NKNMGIIN.js} +0 -1
  28. package/dist/chunk-OPO5K4DZ.js +241 -0
  29. package/dist/{chunk-TUWMK62B.js → chunk-PUS54YU6.js} +45 -2
  30. package/dist/chunk-QKPXHDLR.js +0 -0
  31. package/dist/{chunk-GZY66SDN.js → chunk-R3KTTOMS.js} +0 -1
  32. package/dist/{chunk-PXLVXTLW.js → chunk-RS5AP3J4.js} +72 -15
  33. package/dist/chunk-WV5ARNDA.js +0 -0
  34. package/dist/{chunk-4X3JQXNM.js → chunk-XOFT65EX.js} +1 -2
  35. package/dist/{chunk-FVTQSNR7.js → chunk-XRW6P7IF.js} +13 -5
  36. package/dist/chunk-XWNNA3KE.js +0 -0
  37. package/dist/chunk-YZNGMV3G.js +0 -0
  38. package/dist/{chunk-R2YZTCLO.js → chunk-ZQKZSJAX.js} +1 -2
  39. package/dist/doc/index.d.ts +166 -12
  40. package/dist/doc/index.js +36 -17
  41. package/dist/generate/index.d.ts +2 -2
  42. package/dist/generate/index.js +2 -3
  43. package/dist/icons/index.js +3 -4
  44. package/dist/icons/inlineIconMarker.js +1 -2
  45. package/dist/imageEdit/index.d.ts +48 -17
  46. package/dist/imageEdit/index.js +3 -4
  47. package/dist/index.d.ts +13 -12
  48. package/dist/index.js +118 -33
  49. package/dist/jsonForm/index.d.ts +10 -3
  50. package/dist/jsonForm/index.js +8 -7
  51. package/dist/markdown/index.d.ts +75 -11
  52. package/dist/markdown/index.js +32 -7
  53. package/dist/materializePageSection-wSLA2A1g.d.ts +223 -0
  54. package/dist/narration/index.d.ts +16 -3
  55. package/dist/narration/index.js +13 -14
  56. package/dist/random/index.d.ts +11 -2
  57. package/dist/random/index.js +2 -3
  58. package/dist/recommend/index.d.ts +1 -1
  59. package/dist/recommend/index.js +3 -4
  60. package/dist/schemas/index.d.ts +31 -6
  61. package/dist/schemas/index.js +43 -6
  62. package/dist/spatial/index.d.ts +2 -1
  63. package/dist/spatial/index.js +1 -2
  64. package/dist/storage/index.d.ts +4 -2
  65. package/dist/storage/index.js +1 -2
  66. package/dist/{themeLibrary-RjVgLpUi.d.ts → themeLibrary-DU9mUmVl.d.ts} +1 -1
  67. package/dist/timing/index.js +3 -4
  68. package/dist/transform/index.d.ts +9 -10
  69. package/dist/transform/index.js +6 -7
  70. package/dist/{types-C4kiRn_k.d.ts → types-8QjefM9J.d.ts} +38 -2
  71. package/dist/{types-BwMPl2CB.d.ts → types-CUNc9biN.d.ts} +24 -1
  72. package/dist/versions/index.d.ts +14 -11
  73. package/dist/versions/index.js +2 -3
  74. package/package.json +4 -2
  75. package/dist/chunk-2PWOO4ZE.js.map +0 -1
  76. package/dist/chunk-2UQOHYE2.js.map +0 -1
  77. package/dist/chunk-3E5F2XMR.js.map +0 -1
  78. package/dist/chunk-4X3JQXNM.js.map +0 -1
  79. package/dist/chunk-5DKBFXPY.js.map +0 -1
  80. package/dist/chunk-5J4HKRJF.js.map +0 -1
  81. package/dist/chunk-5UYI3RJB.js.map +0 -1
  82. package/dist/chunk-66QO7XFB.js.map +0 -1
  83. package/dist/chunk-AMIR72JP.js +0 -380
  84. package/dist/chunk-AMIR72JP.js.map +0 -1
  85. package/dist/chunk-CY2R2VPR.js.map +0 -1
  86. package/dist/chunk-DBS6RIFL.js.map +0 -1
  87. package/dist/chunk-DNJKBAI7.js +0 -1
  88. package/dist/chunk-DNJKBAI7.js.map +0 -1
  89. package/dist/chunk-ET53IIEP.js +0 -1
  90. package/dist/chunk-ET53IIEP.js.map +0 -1
  91. package/dist/chunk-FVJUUTEM.js +0 -74
  92. package/dist/chunk-FVJUUTEM.js.map +0 -1
  93. package/dist/chunk-FVTQSNR7.js.map +0 -1
  94. package/dist/chunk-GZY66SDN.js.map +0 -1
  95. package/dist/chunk-JOQYPRDZ.js.map +0 -1
  96. package/dist/chunk-MMPBOUK7.js.map +0 -1
  97. package/dist/chunk-PGGGKYWG.js +0 -1
  98. package/dist/chunk-PGGGKYWG.js.map +0 -1
  99. package/dist/chunk-PXLVXTLW.js.map +0 -1
  100. package/dist/chunk-Q7LROV2H.js.map +0 -1
  101. package/dist/chunk-QE7TWGVT.js.map +0 -1
  102. package/dist/chunk-R2GC6RLD.js +0 -344
  103. package/dist/chunk-R2GC6RLD.js.map +0 -1
  104. package/dist/chunk-R2YZTCLO.js.map +0 -1
  105. package/dist/chunk-S7A5D7ZJ.js +0 -174
  106. package/dist/chunk-S7A5D7ZJ.js.map +0 -1
  107. package/dist/chunk-TFJVXUHH.js.map +0 -1
  108. package/dist/chunk-TUWMK62B.js.map +0 -1
  109. package/dist/chunk-V543AI2F.js +0 -1
  110. package/dist/chunk-V543AI2F.js.map +0 -1
  111. package/dist/chunk-VR7UPJ7C.js.map +0 -1
  112. package/dist/chunk-W4O2TX5I.js.map +0 -1
  113. package/dist/chunk-X6DUONGT.js.map +0 -1
  114. package/dist/chunk-ZLQKNOZQ.js +0 -1
  115. package/dist/chunk-ZLQKNOZQ.js.map +0 -1
  116. package/dist/doc/index.js.map +0 -1
  117. package/dist/generate/index.js.map +0 -1
  118. package/dist/icons/index.js.map +0 -1
  119. package/dist/icons/inlineIconMarker.js.map +0 -1
  120. package/dist/imageEdit/index.js.map +0 -1
  121. package/dist/index.js.map +0 -1
  122. package/dist/jsonForm/index.js.map +0 -1
  123. package/dist/markdown/index.js.map +0 -1
  124. package/dist/narration/index.js.map +0 -1
  125. package/dist/random/index.js.map +0 -1
  126. package/dist/recommend/index.js.map +0 -1
  127. package/dist/schemas/index.js.map +0 -1
  128. package/dist/spatial/index.js.map +0 -1
  129. package/dist/storage/index.js.map +0 -1
  130. package/dist/timing/index.js.map +0 -1
  131. package/dist/transform/index.js.map +0 -1
  132. package/dist/versions/index.js.map +0 -1
  133. package/src/__tests__/animationUtils.test.ts +0 -117
  134. package/src/__tests__/annotationCoercion.test.ts +0 -243
  135. package/src/__tests__/applyNarrationTiming.test.ts +0 -190
  136. package/src/__tests__/applyRenderStyle.test.ts +0 -146
  137. package/src/__tests__/asciiDiagramBattle.test.ts +0 -246
  138. package/src/__tests__/asciiDiagramDetect.test.ts +0 -162
  139. package/src/__tests__/asciiDiagramMapping.test.ts +0 -38
  140. package/src/__tests__/asciiDiagramParse.test.ts +0 -233
  141. package/src/__tests__/asciiDiagramPipeline.test.ts +0 -273
  142. package/src/__tests__/asciiDiagramRender.test.ts +0 -162
  143. package/src/__tests__/asciiDiagramRepair.test.ts +0 -84
  144. package/src/__tests__/asciiTimelineDetect.test.ts +0 -157
  145. package/src/__tests__/asciiTimelineParse.test.ts +0 -205
  146. package/src/__tests__/asciiTimelinePipeline.test.ts +0 -349
  147. package/src/__tests__/asciiTimelineRender.test.ts +0 -376
  148. package/src/__tests__/atmosphereLayers.test.ts +0 -108
  149. package/src/__tests__/attrTokens.test.ts +0 -167
  150. package/src/__tests__/colorUtils.test.ts +0 -112
  151. package/src/__tests__/contentContainer.test.ts +0 -325
  152. package/src/__tests__/contentExtractor.test.ts +0 -243
  153. package/src/__tests__/coverBlock.test.ts +0 -310
  154. package/src/__tests__/customTemplateSample.test.ts +0 -144
  155. package/src/__tests__/customTemplatesFrontmatter.test.ts +0 -221
  156. package/src/__tests__/customThemesFrontmatter.test.ts +0 -146
  157. package/src/__tests__/dataTable.test.ts +0 -145
  158. package/src/__tests__/diagramBlock.test.ts +0 -122
  159. package/src/__tests__/diagramLayout.test.ts +0 -134
  160. package/src/__tests__/diagramText.test.ts +0 -26
  161. package/src/__tests__/docToMarkdownMedia.test.ts +0 -83
  162. package/src/__tests__/drawing.test.ts +0 -109
  163. package/src/__tests__/drawingBlock.test.ts +0 -124
  164. package/src/__tests__/drawingLayout.test.ts +0 -171
  165. package/src/__tests__/fixtures/asciiDiagramBattle.ts +0 -512
  166. package/src/__tests__/fixtures/asciiDiagrams.ts +0 -287
  167. package/src/__tests__/fixtures/asciiTimelines.ts +0 -35
  168. package/src/__tests__/fixtures/treeviewFixtures.ts +0 -243
  169. package/src/__tests__/geohash.test.ts +0 -110
  170. package/src/__tests__/getLayers.test.ts +0 -243
  171. package/src/__tests__/getLayersFallback.test.ts +0 -103
  172. package/src/__tests__/haversine.test.ts +0 -63
  173. package/src/__tests__/iconResolve.test.ts +0 -122
  174. package/src/__tests__/imageEditExportSvg.test.ts +0 -70
  175. package/src/__tests__/imageEditState.test.ts +0 -74
  176. package/src/__tests__/imageEditVersions.test.ts +0 -243
  177. package/src/__tests__/inferDocumentTitle.test.ts +0 -50
  178. package/src/__tests__/inlineIconMarker.test.ts +0 -36
  179. package/src/__tests__/inputDescriptors.test.ts +0 -162
  180. package/src/__tests__/jsonForm.chooseControl.test.ts +0 -86
  181. package/src/__tests__/jsonForm.evaluateWhen.test.ts +0 -59
  182. package/src/__tests__/jsonForm.inferSchema.test.ts +0 -25
  183. package/src/__tests__/jsonForm.pointer.test.ts +0 -149
  184. package/src/__tests__/jsonForm.tokens.test.ts +0 -84
  185. package/src/__tests__/layoutBlock.test.ts +0 -83
  186. package/src/__tests__/layoutLayout.test.ts +0 -169
  187. package/src/__tests__/localForageAdapter.test.ts +0 -155
  188. package/src/__tests__/majorApiTypes.test.ts +0 -18
  189. package/src/__tests__/markdown.test.ts +0 -1009
  190. package/src/__tests__/markdownIcons.test.ts +0 -104
  191. package/src/__tests__/markdownSanitize.test.ts +0 -81
  192. package/src/__tests__/markdownToDoc.test.ts +0 -957
  193. package/src/__tests__/matchFontFamily.test.ts +0 -114
  194. package/src/__tests__/materializeBlockLayers.test.ts +0 -135
  195. package/src/__tests__/materializeTestUtils.ts +0 -17
  196. package/src/__tests__/mediaAnnotations.test.ts +0 -91
  197. package/src/__tests__/mediaSchedule.test.ts +0 -118
  198. package/src/__tests__/narrationAlign.test.ts +0 -150
  199. package/src/__tests__/narrationFeatures.test.ts +0 -71
  200. package/src/__tests__/narrationNuclei.test.ts +0 -45
  201. package/src/__tests__/narrationPacing.test.ts +0 -189
  202. package/src/__tests__/narrationScript.test.ts +0 -149
  203. package/src/__tests__/narrationSessionRepro.test.ts +0 -62
  204. package/src/__tests__/narrationSidecar.test.ts +0 -88
  205. package/src/__tests__/narrationSyllables.test.ts +0 -65
  206. package/src/__tests__/narrationTestSignals.ts +0 -167
  207. package/src/__tests__/narrationVad.test.ts +0 -66
  208. package/src/__tests__/pandocAttrParse.test.ts +0 -187
  209. package/src/__tests__/recommendTemplates.test.ts +0 -183
  210. package/src/__tests__/resolveDocTheme.test.ts +0 -69
  211. package/src/__tests__/rootExports.test.ts +0 -61
  212. package/src/__tests__/scopedContentContainer.test.ts +0 -109
  213. package/src/__tests__/seededRandom.test.ts +0 -142
  214. package/src/__tests__/shapeGeometry.test.ts +0 -138
  215. package/src/__tests__/shapeVocabulary.test.ts +0 -133
  216. package/src/__tests__/storage.test.ts +0 -60
  217. package/src/__tests__/structuredData.test.ts +0 -249
  218. package/src/__tests__/surface.test.ts +0 -68
  219. package/src/__tests__/templateAnnotationParse.test.ts +0 -160
  220. package/src/__tests__/templateInputs.test.ts +0 -69
  221. package/src/__tests__/templateMetadata.test.ts +0 -32
  222. package/src/__tests__/templates.test.ts +0 -710
  223. package/src/__tests__/themeCompile.test.ts +0 -225
  224. package/src/__tests__/themeValidator.test.ts +0 -131
  225. package/src/__tests__/timing.test.ts +0 -167
  226. package/src/__tests__/transformProvenance.test.ts +0 -160
  227. package/src/__tests__/transformV2.test.ts +0 -163
  228. package/src/__tests__/transitionNormalize.test.ts +0 -61
  229. package/src/__tests__/treeviewBattle.test.ts +0 -76
  230. package/src/__tests__/treeviewDetect.test.ts +0 -168
  231. package/src/__tests__/treeviewParse.test.ts +0 -118
  232. package/src/__tests__/treeviewPipeline.test.ts +0 -183
  233. package/src/__tests__/treeviewRender.test.ts +0 -91
  234. package/src/__tests__/validateDoc.test.ts +0 -260
  235. package/src/__tests__/versions.test.ts +0 -459
  236. package/src/doc/annotationBlocks.ts +0 -117
  237. package/src/doc/applyNarrationTiming.ts +0 -244
  238. package/src/doc/asciiDiagram/chars.ts +0 -210
  239. package/src/doc/asciiDiagram/detect.ts +0 -175
  240. package/src/doc/asciiDiagram/index.ts +0 -38
  241. package/src/doc/asciiDiagram/mapping.ts +0 -225
  242. package/src/doc/asciiDiagram/parse.ts +0 -1095
  243. package/src/doc/asciiDiagram/render.ts +0 -963
  244. package/src/doc/asciiDiagram/repair.ts +0 -400
  245. package/src/doc/asciiDiagram/types.ts +0 -65
  246. package/src/doc/asciiTimeline/detect.ts +0 -138
  247. package/src/doc/asciiTimeline/index.ts +0 -26
  248. package/src/doc/asciiTimeline/mapping.ts +0 -43
  249. package/src/doc/asciiTimeline/parse.ts +0 -870
  250. package/src/doc/asciiTimeline/render.ts +0 -427
  251. package/src/doc/asciiTimeline/types.ts +0 -73
  252. package/src/doc/asciiTimeline/wrappedFlow.ts +0 -427
  253. package/src/doc/audioMapping.ts +0 -442
  254. package/src/doc/customTemplatesFrontmatter.ts +0 -273
  255. package/src/doc/customThemesFrontmatter.ts +0 -95
  256. package/src/doc/docToMarkdown.ts +0 -284
  257. package/src/doc/index.ts +0 -127
  258. package/src/doc/markdownToDoc.ts +0 -1054
  259. package/src/doc/materializeBlockLayers.ts +0 -304
  260. package/src/doc/mediaAnnotations.ts +0 -120
  261. package/src/doc/resolveDocTheme.ts +0 -56
  262. package/src/doc/standaloneAnnotation.ts +0 -58
  263. package/src/doc/structuredData.ts +0 -301
  264. package/src/doc/templateInputs.ts +0 -423
  265. package/src/doc/templates/__tests__/customTemplate.test.ts +0 -170
  266. package/src/doc/templates/__tests__/customTemplateRegistry.test.ts +0 -124
  267. package/src/doc/templates/__tests__/listBlock.test.ts +0 -64
  268. package/src/doc/templates/accentImage.ts +0 -362
  269. package/src/doc/templates/captionUtils.ts +0 -56
  270. package/src/doc/templates/comparisonBar.ts +0 -173
  271. package/src/doc/templates/coverBlock.ts +0 -255
  272. package/src/doc/templates/customTemplate.ts +0 -51
  273. package/src/doc/templates/dataTable.ts +0 -102
  274. package/src/doc/templates/dateEvent.ts +0 -147
  275. package/src/doc/templates/definitionCard.ts +0 -140
  276. package/src/doc/templates/diagramBlock.ts +0 -403
  277. package/src/doc/templates/diagramLayout.ts +0 -159
  278. package/src/doc/templates/drawingBlock.ts +0 -325
  279. package/src/doc/templates/drawingLayout.ts +0 -539
  280. package/src/doc/templates/factCard.ts +0 -146
  281. package/src/doc/templates/fallbackBlock.ts +0 -123
  282. package/src/doc/templates/featureBlock.ts +0 -209
  283. package/src/doc/templates/fullBleedQuote.ts +0 -83
  284. package/src/doc/templates/imageWithCaption.ts +0 -186
  285. package/src/doc/templates/index.ts +0 -642
  286. package/src/doc/templates/inputDescriptors.ts +0 -451
  287. package/src/doc/templates/layoutBlock.ts +0 -43
  288. package/src/doc/templates/layoutLayout.ts +0 -243
  289. package/src/doc/templates/listBlock.ts +0 -207
  290. package/src/doc/templates/mapBlock.ts +0 -138
  291. package/src/doc/templates/metadata.ts +0 -130
  292. package/src/doc/templates/persistentLayers.ts +0 -526
  293. package/src/doc/templates/photoGrid.ts +0 -190
  294. package/src/doc/templates/pullQuote.ts +0 -141
  295. package/src/doc/templates/quoteBlock.ts +0 -141
  296. package/src/doc/templates/registry.ts +0 -88
  297. package/src/doc/templates/sectionHeader.ts +0 -120
  298. package/src/doc/templates/statHighlight.ts +0 -146
  299. package/src/doc/templates/templateNames.ts +0 -22
  300. package/src/doc/templates/timelineBlock.ts +0 -613
  301. package/src/doc/templates/titleBlock.ts +0 -150
  302. package/src/doc/templates/tokens/__tests__/resolveTokens.test.ts +0 -487
  303. package/src/doc/templates/tokens/resolveTokens.ts +0 -453
  304. package/src/doc/templates/treeBlock.ts +0 -131
  305. package/src/doc/templates/twoColumn.ts +0 -263
  306. package/src/doc/templates/videoPullQuote.ts +0 -142
  307. package/src/doc/templates/videoWithCaption.ts +0 -135
  308. package/src/doc/treeview/chars.ts +0 -72
  309. package/src/doc/treeview/detect.ts +0 -145
  310. package/src/doc/treeview/index.ts +0 -30
  311. package/src/doc/treeview/mapping.ts +0 -95
  312. package/src/doc/treeview/parse.ts +0 -201
  313. package/src/doc/treeview/render.ts +0 -41
  314. package/src/doc/treeview/types.ts +0 -43
  315. package/src/doc/utils/animationUtils.ts +0 -399
  316. package/src/doc/utils/applyRenderStyle.ts +0 -106
  317. package/src/doc/utils/diagramText.ts +0 -78
  318. package/src/doc/utils/imageTreatment.ts +0 -70
  319. package/src/doc/utils/nearest.ts +0 -59
  320. package/src/doc/utils/shapeGeometry.ts +0 -614
  321. package/src/doc/utils/themeUtils.ts +0 -243
  322. package/src/doc/validate.ts +0 -575
  323. package/src/generate/contentExtractor.ts +0 -921
  324. package/src/generate/index.ts +0 -18
  325. package/src/generate/templateMapper.ts +0 -177
  326. package/src/icons/iconData.ts +0 -31
  327. package/src/icons/index.ts +0 -26
  328. package/src/icons/inlineIconMarker.ts +0 -73
  329. package/src/icons/resolve.ts +0 -139
  330. package/src/imageEdit/ImageEditVersionManager.ts +0 -73
  331. package/src/imageEdit/export.ts +0 -410
  332. package/src/imageEdit/index.ts +0 -72
  333. package/src/imageEdit/persistence.ts +0 -113
  334. package/src/imageEdit/state.ts +0 -112
  335. package/src/imageEdit/versionPaths.ts +0 -44
  336. package/src/imageEdit/versions.ts +0 -152
  337. package/src/index.ts +0 -15
  338. package/src/internal/immutable.ts +0 -58
  339. package/src/jsonForm/chooseControl.ts +0 -88
  340. package/src/jsonForm/evaluateWhen.ts +0 -59
  341. package/src/jsonForm/index.ts +0 -32
  342. package/src/jsonForm/inferSchema.ts +0 -25
  343. package/src/jsonForm/pointer.ts +0 -154
  344. package/src/jsonForm/tokens.ts +0 -78
  345. package/src/jsonForm/types.ts +0 -167
  346. package/src/markdown/annotationCoercion.ts +0 -295
  347. package/src/markdown/attrTokens.ts +0 -243
  348. package/src/markdown/convert.ts +0 -1353
  349. package/src/markdown/htmlParse.ts +0 -212
  350. package/src/markdown/index.ts +0 -152
  351. package/src/markdown/parse.ts +0 -103
  352. package/src/markdown/sanitize.ts +0 -318
  353. package/src/markdown/stringify.ts +0 -207
  354. package/src/markdown/types.ts +0 -710
  355. package/src/markdown/utils.ts +0 -459
  356. package/src/narration/align.ts +0 -514
  357. package/src/narration/features.ts +0 -231
  358. package/src/narration/index.ts +0 -86
  359. package/src/narration/nuclei.ts +0 -118
  360. package/src/narration/pacing.ts +0 -211
  361. package/src/narration/script.ts +0 -239
  362. package/src/narration/session.ts +0 -100
  363. package/src/narration/sidecar.ts +0 -187
  364. package/src/narration/syllables.ts +0 -85
  365. package/src/narration/trace.ts +0 -50
  366. package/src/narration/types.ts +0 -299
  367. package/src/narration/vad.ts +0 -131
  368. package/src/ngeohash.d.ts +0 -11
  369. package/src/random/SeededRandom.ts +0 -127
  370. package/src/random/index.ts +0 -1
  371. package/src/recommend/index.ts +0 -16
  372. package/src/recommend/numberHighlight.ts +0 -25
  373. package/src/recommend/templates.ts +0 -393
  374. package/src/schemas/BlockTemplates.ts +0 -1046
  375. package/src/schemas/CustomTemplates.ts +0 -126
  376. package/src/schemas/Doc.ts +0 -1052
  377. package/src/schemas/ImageEditDoc.ts +0 -102
  378. package/src/schemas/LayoutStrategy.ts +0 -178
  379. package/src/schemas/Media.ts +0 -179
  380. package/src/schemas/MediaProvider.ts +0 -70
  381. package/src/schemas/Theme.ts +0 -406
  382. package/src/schemas/Transitions.ts +0 -224
  383. package/src/schemas/Types.ts +0 -15
  384. package/src/schemas/Viewport.ts +0 -91
  385. package/src/schemas/colorUtils.ts +0 -219
  386. package/src/schemas/fontStacks.ts +0 -339
  387. package/src/schemas/index.ts +0 -29
  388. package/src/schemas/themeCompile.ts +0 -237
  389. package/src/schemas/themeConstants.ts +0 -2
  390. package/src/schemas/themeLibrary.ts +0 -60
  391. package/src/schemas/themeValidator.ts +0 -426
  392. package/src/schemas/themes/bold.json +0 -48
  393. package/src/schemas/themes/cinematic.json +0 -111
  394. package/src/schemas/themes/documentary.json +0 -96
  395. package/src/schemas/themes/gezellig.json +0 -93
  396. package/src/schemas/themes/index.ts +0 -53
  397. package/src/schemas/themes/magazine.json +0 -89
  398. package/src/schemas/themes/minimalist.json +0 -45
  399. package/src/schemas/themes/morning-light.json +0 -85
  400. package/src/schemas/themes/standard-dark.json +0 -85
  401. package/src/schemas/themes/standard.json +0 -74
  402. package/src/schemas/themes/tech-dark.json +0 -101
  403. package/src/schemas/themes/warm-earth.json +0 -50
  404. package/src/spatial/Geohash.ts +0 -196
  405. package/src/spatial/Haversine.ts +0 -59
  406. package/src/spatial/index.ts +0 -2
  407. package/src/storage/ContentContainer.ts +0 -220
  408. package/src/storage/LocalForageAdapter.ts +0 -103
  409. package/src/storage/LocalStorageAdapter.ts +0 -57
  410. package/src/storage/MediaProviderFromContainer.ts +0 -92
  411. package/src/storage/MemoryStorageAdapter.ts +0 -37
  412. package/src/storage/ScopedContentContainer.ts +0 -143
  413. package/src/storage/Storage.ts +0 -28
  414. package/src/storage/index.ts +0 -9
  415. package/src/timing/index.ts +0 -17
  416. package/src/timing/narrationTiming.ts +0 -220
  417. package/src/timing/readingTime.ts +0 -94
  418. package/src/transform/applyTransform.ts +0 -122
  419. package/src/transform/blockAnalyzer.ts +0 -181
  420. package/src/transform/index.ts +0 -23
  421. package/src/transform/registry.ts +0 -198
  422. package/src/transform/styles/dataDriven.ts +0 -17
  423. package/src/transform/styles/documentary.ts +0 -17
  424. package/src/transform/styles/index.ts +0 -5
  425. package/src/transform/styles/magazine.ts +0 -18
  426. package/src/transform/styles/minimal.ts +0 -17
  427. package/src/transform/styles/narrative.ts +0 -18
  428. package/src/transform/templateSelector.ts +0 -389
  429. package/src/transform/timingAllocator.ts +0 -257
  430. package/src/transform/types.ts +0 -151
  431. package/src/versions/DocumentVersionManager.ts +0 -70
  432. package/src/versions/gitignore.ts +0 -34
  433. package/src/versions/index.ts +0 -56
  434. package/src/versions/operations.ts +0 -144
  435. package/src/versions/paths.ts +0 -51
  436. package/src/versions/snapshotStore.ts +0 -202
  437. package/src/versions/timestamp.ts +0 -48
  438. package/src/versions/types.ts +0 -93
@@ -1,10 +1,35 @@
1
1
  export { B as BoundingBox, C as Coordinates } from '../Types-sh2VRxfo.js';
2
- import { aC as Theme, aE as ThemeColorScheme, v as DeepPartial, aH as ThemeSeedColors, aD as ThemeColorPalette, N as FontFamilyKind, M as FontFamily } from '../Doc-ylqWKDc_.js';
3
- export { A as AccentImage, a as AccentPosition, b as AmbientGradientConfig, c as Animation, d as AnimationType, e as AudioBookmark, f as AudioSegment, g as AudioTimingData, h as AudioTrack, B as Block, i as BlockConnection, j as BorderStyle, C as CaptionPhrase, k as CaptionTrack, l as CaptionWord, m as ColorScheme, n as ComparisonBarInput, o as CornerBrandingConfig, p as CustomTemplateDefinition, q as CustomTemplateLayer, D as DARK_SURFACE, r as DEFAULT_DOC_FONT, s as DEFAULT_TITLE_FONT, t as DataTableInput, u as DateEventInput, w as DefinitionCardInput, x as DiagramBlockInput, y as DiagramEdgeAnchor, z as DiagramTemplateEdge, E as DiagramTemplateNode, F as Doc, G as DocBlock, H as DocDiagnostic, I as DrawingBlockInput, J as FRONTMATTER_CUSTOM_TEMPLATES_KEY, K as FRONTMATTER_CUSTOM_THEMES_KEY, L as FactCardInput, O as FullBleedQuoteInput, P as GradientBackgroundConfig, Q as ImageBackgroundConfig, R as ImageLayer, S as ImageTreatment, T as ImageWithCaptionInput, U as LIGHT_SURFACE, V as Layer, W as LayerRepeat, X as LayoutHints, Y as LeftFeatureInput, Z as LinearGradient, _ as ListBlockInput, $ as MapBlockInput, a0 as MapLayer, a1 as MapMarker, a2 as MapTileStyle, a3 as MarkerStyle, a4 as MediaClip, a5 as PathLayer, a6 as PatternBackgroundConfig, a7 as PersistentLayer, a8 as PersistentLayerConfig, a9 as PersistentLayerTemplate, aa as PersistentLayerTemplateConfig, ab as PersistentLayerTemplateType, ac as PhotoGridInput, ad as Position, ae as ProgressIndicatorConfig, af as PullQuoteInput, ag as QuoteBlockInput, ah as RawLayersInput, ai as RenderStyle, aj as RightFeatureInput, ak as ScheduledClip, al as SectionHeaderInput, am as ShapeFilter, an as ShapeLayer, ao as ShapePattern, ap as SolidBackgroundConfig, aq as StartBlockConfig, ar as StatHighlightInput, as as SurfaceScheme, at as THEME_SCHEMA_VERSION, au as TableLayer, av as TableLayerStyle, aw as TemplateBlock, ax as TemplateContext, ay as TemplateFunction, az as TemplateRegistry, aA as TextLayer, aB as TextStyle, aF as ThemeRegistry, aG as ThemeSchemaVersion, aI as ThemeStyle, aJ as ThemeTypography, aK as TimelineBlockInput, aL as TimelineTemplateEvent, aM as TimelineTemplateLink, aN as TimelineTemplateTrack, aO as TitleBlockInput, aP as TitleCaptionConfig, aQ as TreeBlockInput, aR as TreeLayer, aS as TreeLayerItem, aT as TreeLayerStyle, aU as TreeTemplateItem, aV as TwoColumnInput, aW as VIEWPORT_PRESETS, aX as VideoLayer, aY as VideoPullQuoteInput, aZ as VideoWithCaptionInput, a_ as ViewportConfig, a$ as ViewportOrientation, b0 as ViewportPreset, b1 as VignetteConfig, b2 as applySurface, b3 as calculateDuration, b4 as calculateFontScale, b5 as createTemplateContext, b6 as createTheme, b7 as createThemeRegistry, b8 as getAspectRatioString, b9 as getBlockAtTime, ba as getCaptionAtTime, bb as getDocPlaybackDuration, bc as getLayoutHints, bd as getSafeTextBounds, be as getSegmentAtTime, bf as getTwoColumnPositions, bg as getViewport, bh as getViewportOrientation, bi as isPersistentLayerTemplate, bj as isTemplateBlock, bk as layoutScaledFontSize, bl as resolveMediaSchedule, bm as scaledFontSize } from '../Doc-ylqWKDc_.js';
4
- export { D as DEFAULT_TRANSITION_DURATION_SECONDS, X as TRANSITION_DIRECTIONS, Y as TRANSITION_TYPES, Z as Transition, _ as TransitionDirection, $ as TransitionType, a0 as isTransitionType, a1 as normalizeTransitionDirection, a2 as normalizeTransitionType, a3 as resolveBlockTransition, a4 as resolveTransitionDuration } from '../types-BwMPl2CB.js';
5
- export { D as DEFAULT_THEME, a as DEFAULT_THEME_ID, T as THEMES, g as getAvailableThemes, b as getThemeSummaries, r as resolveTheme } from '../themeLibrary-RjVgLpUi.js';
2
+ import { b1 as Theme, b4 as ThemePageStyle, b3 as ThemeColorScheme, v as DeepPartial, b7 as ThemeSeedColors, b2 as ThemeColorPalette, N as FontFamilyKind, M as FontFamily } from '../Doc-BubIpWsp.js';
3
+ export { A as AccentImage, a as AccentPosition, b as AmbientGradientConfig, c as Animation, d as AnimationType, e as AudioBookmark, f as AudioSegment, g as AudioTimingData, h as AudioTrack, B as Block, i as BlockConnection, j as BorderStyle, C as CaptionPhrase, k as CaptionTrack, l as CaptionWord, m as ColorScheme, n as ComparisonBarInput, o as CornerBrandingConfig, p as CustomTemplateDefinition, q as CustomTemplateLayer, D as DARK_SURFACE, r as DEFAULT_DOC_FONT, s as DEFAULT_TITLE_FONT, t as DataTableInput, u as DateEventInput, w as DefinitionCardInput, x as DiagramBlockInput, y as DiagramEdgeAnchor, z as DiagramTemplateEdge, E as DiagramTemplateNode, F as Doc, G as DocBlock, H as DocDiagnostic, I as DrawingBlockInput, J as FRONTMATTER_CUSTOM_TEMPLATES_KEY, K as FRONTMATTER_CUSTOM_THEMES_KEY, L as FactCardInput, O as FullBleedQuoteInput, P as GradientBackgroundConfig, Q as ImageBackgroundConfig, R as ImageLayer, S as ImageTreatment, T as ImageWithCaptionInput, U as LIGHT_SURFACE, V as Layer, W as LayerRepeat, X as LayoutHints, Y as LeftFeatureInput, Z as LinearGradient, _ as ListBlockInput, $ as MapBlockInput, a0 as MapLayer, a1 as MapMarker, a2 as MapTileStyle, a3 as MarkerStyle, a4 as MediaClip, a5 as MermaidLayer, a6 as PAGE_ACCENT_STRATEGIES, a7 as PAGE_BACKGROUNDS, a8 as PAGE_BACKGROUND_RHYTHMS, a9 as PAGE_DESIGN_FAMILIES, aa as PAGE_DIVIDERS, ab as PAGE_EMPHASES, ac as PAGE_EYEBROWS, ad as PAGE_HEADING_CASES, ae as PAGE_HEADING_SCALES, af as PAGE_HEADING_UNDERLINES, ag as PAGE_HERO_STYLES, ah as PAGE_IMAGE_FRAMINGS, ai as PAGE_NUMERAL_STYLES, aj as PAGE_PATTERNS, ak as PAGE_QUOTE_MARKS, al as PAGE_SECTION_KINDS, am as PAGE_SECTION_SPACINGS, an as PAGE_SHADOWS, ao as PageAccentRotation, ap as PageBackground, aq as PageDesignFamily, ar as PageEmphasis, as as PageHeadingTreatment, at as PageSectionKind, au as PageSectionOverride, av as PageTokens, aw as PathLayer, ax as PatternBackgroundConfig, ay as PersistentLayer, az as PersistentLayerConfig, aA as PersistentLayerTemplate, aB as PersistentLayerTemplateConfig, aC as PersistentLayerTemplateType, aD as PhotoGridInput, aE as Position, aF as ProgressIndicatorConfig, aG as PullQuoteInput, aH as QuoteBlockInput, aI as RawLayersInput, aJ as RenderStyle, aK as RightFeatureInput, aL as ScheduledClip, aM as SectionHeaderInput, aN as ShapeFilter, aO as ShapeLayer, aP as ShapePattern, aQ as SolidBackgroundConfig, aR as StartBlockConfig, aS as StatHighlightInput, aT as SurfaceScheme, aU as THEME_SCHEMA_VERSION, aV as TableLayer, aW as TableLayerStyle, aX as TemplateBlock, aY as TemplateContext, aZ as TemplateFunction, a_ as TemplateRegistry, a$ as TextLayer, b0 as TextStyle, b5 as ThemeRegistry, b6 as ThemeSchemaVersion, b8 as ThemeStyle, b9 as ThemeTypography, ba as TimelineBlockInput, bb as TimelineTemplateEvent, bc as TimelineTemplateLink, bd as TimelineTemplateTrack, be as TitleBlockInput, bf as TitleCaptionConfig, bg as TreeBlockInput, bh as TreeLayer, bi as TreeLayerItem, bj as TreeLayerStyle, bk as TreeTemplateItem, bl as TwoColumnInput, bm as VIEWPORT_PRESETS, bn as VideoLayer, bo as VideoPullQuoteInput, bp as VideoWithCaptionInput, bq as ViewportConfig, br as ViewportOrientation, bs as ViewportPreset, bt as VignetteConfig, bu as applySurface, bv as calculateDuration, bw as calculateFontScale, bx as createTemplateContext, by as createTheme, bz as createThemeRegistry, bA as getAspectRatioString, bB as getBlockAtTime, bC as getCaptionAtTime, bD as getDocPlaybackDuration, bE as getLayoutHints, bF as getSafeTextBounds, bG as getSegmentAtTime, bH as getTwoColumnPositions, bI as getViewport, bJ as getViewportOrientation, bK as isPersistentLayerTemplate, bL as isTemplateBlock, bM as layoutScaledFontSize, bN as resolveMediaSchedule, bO as scaledFontSize } from '../Doc-BubIpWsp.js';
4
+ export { a as DEFAULT_TRANSITION_DURATION_SECONDS, _ as TRANSITION_DIRECTIONS, $ as TRANSITION_TYPES, a0 as Transition, a1 as TransitionDirection, a2 as TransitionType, a5 as isTransitionType, a6 as normalizeTransitionDirection, a7 as normalizeTransitionType, a8 as resolveBlockTransition, aa as resolveTransitionDuration } from '../types-CUNc9biN.js';
5
+ export { D as DEFAULT_THEME, a as DEFAULT_THEME_ID, T as THEMES, g as getAvailableThemes, b as getThemeSummaries, r as resolveTheme } from '../themeLibrary-DU9mUmVl.js';
6
6
  export { M as MediaEntry, a as MediaProvider } from '../MediaProvider-wpSe21B3.js';
7
- export { E as EditorLayerMeta, I as ImageEditCanvas, a as ImageEditDoc, b as ImageEditLayer, c as ImageEditLayerKind, d as ImageEditMeta } from '../ImageEditDoc-D828IXJ1.js';
7
+ export { E as EditorLayerMeta, I as ImageEditCanvas, a as ImageEditDoc, b as ImageEditLayer, c as ImageEditLayerKind, d as ImageEditMeta } from '../ImageEditDoc-CGxk5CHc.js';
8
+
9
+ /**
10
+ * Page Style Defaults
11
+ *
12
+ * Derives a complete `ThemePageStyle` from a theme's existing fields so
13
+ * legacy themes, customizer themes, and file-inferred themes get a
14
+ * coherent page art direction without declaring one. Built-in themes
15
+ * ship explicit `pageStyle` blocks in their JSON; this derivation is the
16
+ * fallback used by `compileTheme` and by `resolvePageStyle` at read time.
17
+ *
18
+ * Derivation signals:
19
+ * - `renderStyle.name` → design family (documentary → documentary,
20
+ * magazine → editorial, bold → brutalist, tech-dark → terminal, …)
21
+ * - `style.borderRadius` → cornerRadius + rounded vs flush image framing
22
+ * - `style.imageTreatment` (mono/duotone) → letterboxed framing
23
+ * - `style.textShadow` → shadow language
24
+ * - `persistentLayers` patternBackground → page pattern
25
+ */
26
+
27
+ /**
28
+ * Derive a complete `ThemePageStyle` from a theme's existing fields.
29
+ * Deterministic and read-only; explicit `theme.pageStyle` always wins
30
+ * (callers check before deriving — see `resolvePageStyle`).
31
+ */
32
+ declare function defaultPageStyle(theme: Theme): ThemePageStyle;
8
33
 
9
34
  /**
10
35
  * Theme Validator
@@ -227,4 +252,4 @@ declare function deriveScale(seedHex: string, spread?: number): {
227
252
  darker2: string;
228
253
  };
229
254
 
230
- export { AVAILABLE_FONT_STACKS, type CompileOptions, type ContrastPreset, DeepPartial, FONT_FALLBACKS, FontFamily, FontFamilyKind, type FontStack, STARTER_THEME, Theme, ThemeColorPalette, ThemeColorScheme, ThemeSeedColors, type ValidationError, type ValidationResult, accentToColorScheme, assertTheme, buildGoogleFontsUrl, compileTheme, contrastRatio, deriveColorPalette, deriveScale, fontStack, getFontStack, guessFontFallback, hexHueDegrees, isHex, matchFontFamily, oklchDarken, oklchLighten, oklchSetChroma, parseTheme, pickContrastingText, relativeLuminance, resolveFontFamily, serializeTheme, validateTheme, withAlpha };
255
+ export { AVAILABLE_FONT_STACKS, type CompileOptions, type ContrastPreset, DeepPartial, FONT_FALLBACKS, FontFamily, FontFamilyKind, type FontStack, STARTER_THEME, Theme, ThemeColorPalette, ThemeColorScheme, ThemePageStyle, ThemeSeedColors, type ValidationError, type ValidationResult, accentToColorScheme, assertTheme, buildGoogleFontsUrl, compileTheme, contrastRatio, defaultPageStyle, deriveColorPalette, deriveScale, fontStack, getFontStack, guessFontFallback, hexHueDegrees, isHex, matchFontFamily, oklchDarken, oklchLighten, oklchSetChroma, parseTheme, pickContrastingText, relativeLuminance, resolveFontFamily, serializeTheme, validateTheme, withAlpha };
@@ -9,11 +9,12 @@ import {
9
9
  getSegmentAtTime,
10
10
  parseTheme,
11
11
  serializeTheme
12
- } from "../chunk-MMPBOUK7.js";
12
+ } from "../chunk-CB45YGAM.js";
13
13
  import {
14
+ defaultPageStyle,
14
15
  getDocPlaybackDuration,
15
16
  resolveMediaSchedule
16
- } from "../chunk-FVJUUTEM.js";
17
+ } from "../chunk-2ZWIXGAC.js";
17
18
  import {
18
19
  AVAILABLE_FONT_STACKS,
19
20
  DARK_SURFACE,
@@ -23,6 +24,24 @@ import {
23
24
  FRONTMATTER_CUSTOM_TEMPLATES_KEY,
24
25
  FRONTMATTER_CUSTOM_THEMES_KEY,
25
26
  LIGHT_SURFACE,
27
+ PAGE_ACCENT_STRATEGIES,
28
+ PAGE_BACKGROUNDS,
29
+ PAGE_BACKGROUND_RHYTHMS,
30
+ PAGE_DESIGN_FAMILIES,
31
+ PAGE_DIVIDERS,
32
+ PAGE_EMPHASES,
33
+ PAGE_EYEBROWS,
34
+ PAGE_HEADING_CASES,
35
+ PAGE_HEADING_SCALES,
36
+ PAGE_HEADING_UNDERLINES,
37
+ PAGE_HERO_STYLES,
38
+ PAGE_IMAGE_FRAMINGS,
39
+ PAGE_NUMERAL_STYLES,
40
+ PAGE_PATTERNS,
41
+ PAGE_QUOTE_MARKS,
42
+ PAGE_SECTION_KINDS,
43
+ PAGE_SECTION_SPACINGS,
44
+ PAGE_SHADOWS,
26
45
  THEMES,
27
46
  THEME_SCHEMA_VERSION,
28
47
  applySurface,
@@ -49,7 +68,7 @@ import {
49
68
  resolveTheme,
50
69
  validateTheme,
51
70
  withAlpha
52
- } from "../chunk-W4O2TX5I.js";
71
+ } from "../chunk-C33GTPUZ.js";
53
72
  import {
54
73
  DEFAULT_DOC_FONT,
55
74
  DEFAULT_TITLE_FONT,
@@ -66,7 +85,7 @@ import {
66
85
  isTemplateBlock,
67
86
  scaledFontSize,
68
87
  scaledFontSize2
69
- } from "../chunk-5J4HKRJF.js";
88
+ } from "../chunk-BAOV476U.js";
70
89
  import {
71
90
  DEFAULT_TRANSITION_DURATION_SECONDS,
72
91
  TRANSITION_DIRECTIONS,
@@ -76,7 +95,7 @@ import {
76
95
  normalizeTransitionType,
77
96
  resolveBlockTransition,
78
97
  resolveTransitionDuration
79
- } from "../chunk-QE7TWGVT.js";
98
+ } from "../chunk-4VOD55SX.js";
80
99
  export {
81
100
  AVAILABLE_FONT_STACKS,
82
101
  DARK_SURFACE,
@@ -89,6 +108,24 @@ export {
89
108
  FRONTMATTER_CUSTOM_TEMPLATES_KEY,
90
109
  FRONTMATTER_CUSTOM_THEMES_KEY,
91
110
  LIGHT_SURFACE,
111
+ PAGE_ACCENT_STRATEGIES,
112
+ PAGE_BACKGROUNDS,
113
+ PAGE_BACKGROUND_RHYTHMS,
114
+ PAGE_DESIGN_FAMILIES,
115
+ PAGE_DIVIDERS,
116
+ PAGE_EMPHASES,
117
+ PAGE_EYEBROWS,
118
+ PAGE_HEADING_CASES,
119
+ PAGE_HEADING_SCALES,
120
+ PAGE_HEADING_UNDERLINES,
121
+ PAGE_HERO_STYLES,
122
+ PAGE_IMAGE_FRAMINGS,
123
+ PAGE_NUMERAL_STYLES,
124
+ PAGE_PATTERNS,
125
+ PAGE_QUOTE_MARKS,
126
+ PAGE_SECTION_KINDS,
127
+ PAGE_SECTION_SPACINGS,
128
+ PAGE_SHADOWS,
92
129
  STARTER_THEME,
93
130
  THEMES,
94
131
  THEME_SCHEMA_VERSION,
@@ -106,6 +143,7 @@ export {
106
143
  createTemplateContext,
107
144
  createTheme,
108
145
  createThemeRegistry,
146
+ defaultPageStyle,
109
147
  deriveColorPalette,
110
148
  deriveScale,
111
149
  fontStack,
@@ -148,4 +186,3 @@ export {
148
186
  validateTheme,
149
187
  withAlpha
150
188
  };
151
- //# sourceMappingURL=index.js.map
@@ -62,7 +62,8 @@ declare function decodeGeohash(hash: string): {
62
62
  declare function getNeighbors(hash: string): string[];
63
63
  /**
64
64
  * Get a 3x3 grid of geohash4 cells (center + 8 neighbors).
65
- * Used for landing bonus expansions in Fly mode.
65
+ * Useful for expanding a query to the cells adjacent to a center cell, so a
66
+ * point near a cell boundary still matches its neighbors' contents.
66
67
  *
67
68
  * @param geohash4 - Center geohash4 cell
68
69
  * @returns Array of 9 geohash4 cells (center first, then neighbors)
@@ -9,7 +9,7 @@ import {
9
9
  getGeohashPrefix,
10
10
  getNeighbors,
11
11
  haversineDistance
12
- } from "../chunk-GZY66SDN.js";
12
+ } from "../chunk-R3KTTOMS.js";
13
13
  export {
14
14
  calculateBearing,
15
15
  decodeGeohash,
@@ -22,4 +22,3 @@ export {
22
22
  getNeighbors,
23
23
  haversineDistance
24
24
  };
25
- //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
- import { C as ContentContainer, a as ContentEntry } from '../ContentContainer-BXUlIf18.js';
2
- export { M as MemoryContentContainer, f as findDocumentPath } from '../ContentContainer-BXUlIf18.js';
1
+ import { C as ContentContainer, a as ContentEntry } from '../ContentContainer-B2w9sUoL.js';
2
+ export { M as MemoryContentContainer, f as findDocumentPath } from '../ContentContainer-B2w9sUoL.js';
3
3
  import { a as MediaProvider } from '../MediaProvider-wpSe21B3.js';
4
4
 
5
5
  /**
@@ -119,6 +119,8 @@ declare class ScopedContentContainer implements ContentContainer {
119
119
  readonly prefix: string;
120
120
  /** Prefix with trailing slash. */
121
121
  private readonly prefixSlash;
122
+ readonly mutationLock: object;
123
+ readonly writeFileExclusive?: (path: string, data: ArrayBuffer | Uint8Array, mimeType?: string) => Promise<boolean>;
122
124
  constructor(parent: ContentContainer, prefix: string);
123
125
  private toParent;
124
126
  /** Strip the prefix from a parent-space path. Returns null if the path is outside the scope. */
@@ -7,7 +7,7 @@ import {
7
7
  createMediaProviderFromContainer,
8
8
  findDocumentPath,
9
9
  scopeContainer
10
- } from "../chunk-VR7UPJ7C.js";
10
+ } from "../chunk-FCG3BIZN.js";
11
11
  export {
12
12
  LocalForageAdapter,
13
13
  LocalStorageAdapter,
@@ -18,4 +18,3 @@ export {
18
18
  findDocumentPath,
19
19
  scopeContainer
20
20
  };
21
- //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { aC as Theme, aF as ThemeRegistry } from './Doc-ylqWKDc_.js';
1
+ import { b1 as Theme, b5 as ThemeRegistry } from './Doc-BubIpWsp.js';
2
2
 
3
3
  /**
4
4
  * Built-in Theme Library
@@ -1,8 +1,8 @@
1
- import "../chunk-DNJKBAI7.js";
1
+ import "../chunk-YZNGMV3G.js";
2
2
  import {
3
3
  estimateNarrationTime,
4
4
  estimateReadingTime
5
- } from "../chunk-4X3JQXNM.js";
5
+ } from "../chunk-XOFT65EX.js";
6
6
  import {
7
7
  DEFAULT_WORDS_PER_SECOND,
8
8
  calculatePrefixDuration,
@@ -10,7 +10,7 @@ import {
10
10
  estimateNarrationDuration,
11
11
  estimateSpokenWordCount,
12
12
  estimateTimeFromText
13
- } from "../chunk-3E5F2XMR.js";
13
+ } from "../chunk-67L6WRJN.js";
14
14
  export {
15
15
  DEFAULT_WORDS_PER_SECOND,
16
16
  calculatePrefixDuration,
@@ -21,4 +21,3 @@ export {
21
21
  estimateSpokenWordCount,
22
22
  estimateTimeFromText
23
23
  };
24
- //# sourceMappingURL=index.js.map
@@ -1,14 +1,7 @@
1
- import { m as ColorScheme, F as Doc, B as Block } from '../Doc-ylqWKDc_.js';
1
+ import { m as ColorScheme, F as Doc, B as Block } from '../Doc-BubIpWsp.js';
2
+ import { i as PageTransformHints } from '../materializePageSection-wSLA2A1g.js';
2
3
  import { d as ExtractionType, E as ExtractedElement, b as ExtractionOptions } from '../contentExtractor-BNfVJV2U.js';
3
- import '../types-BwMPl2CB.js';
4
-
5
- /**
6
- * Transform Types
7
- *
8
- * Defines the type system for doc block transforms — algorithms that take
9
- * an existing Doc and produce a new Doc with blocks optimized for visual
10
- * presentation. Transforms are read-only on the input and deterministic.
11
- */
4
+ import '../types-CUNc9biN.js';
12
5
 
13
6
  /** Identifier for a built-in or caller-registered transform style. */
14
7
  type TransformStyleId = string;
@@ -79,6 +72,12 @@ interface TransformStyleConfig {
79
72
  /** Target promoted blocks per minute of content (e.g. 5). */
80
73
  slidesPerMinute?: number;
81
74
  };
75
+ /**
76
+ * Page (linear) mode hints for docs produced by this style. Consumers
77
+ * pass this as `MaterializePageSectionsOptions.transformPage` so the
78
+ * summarization strategy shapes the page rendition (spacing, emphasis).
79
+ */
80
+ page?: PageTransformHints;
82
81
  }
83
82
  /** Built-in id or a call-scoped declarative style definition. */
84
83
  type TransformStyleInput = TransformStyleId | TransformStyleConfig;
@@ -7,12 +7,12 @@ import {
7
7
  getTransformStyleIds,
8
8
  getTransformStyleSummaries,
9
9
  resolveTransformStyle
10
- } from "../chunk-PXLVXTLW.js";
11
- import "../chunk-Q7LROV2H.js";
12
- import "../chunk-5J4HKRJF.js";
13
- import "../chunk-AMIR72JP.js";
14
- import "../chunk-3E5F2XMR.js";
15
- import "../chunk-FVTQSNR7.js";
10
+ } from "../chunk-RS5AP3J4.js";
11
+ import "../chunk-NKNMGIIN.js";
12
+ import "../chunk-BAOV476U.js";
13
+ import "../chunk-BCCXTMN5.js";
14
+ import "../chunk-67L6WRJN.js";
15
+ import "../chunk-XRW6P7IF.js";
16
16
  export {
17
17
  DEFAULT_TRANSFORM_STYLE_ID,
18
18
  analyzeBlocks,
@@ -23,4 +23,3 @@ export {
23
23
  getTransformStyleSummaries,
24
24
  resolveTransformStyle
25
25
  };
26
- //# sourceMappingURL=index.js.map
@@ -41,7 +41,7 @@ interface SaveVersionResult {
41
41
  * - `'saved'` — a new snapshot was written.
42
42
  * - `'unchanged'` — current content matches the latest snapshot byte-for-byte.
43
43
  * - `'no-document'` — the container has no primary markdown document.
44
- * - `'empty'` — the resolved content was empty.
44
+ * - `'empty'` — legacy value retained for source compatibility; no longer emitted.
45
45
  */
46
46
  reason: 'saved' | 'unchanged' | 'no-document' | 'empty';
47
47
  }
@@ -80,6 +80,42 @@ interface RevertOptions {
80
80
  * Defaults to `true` so a revert is always recoverable.
81
81
  */
82
82
  snapshotCurrent?: boolean;
83
+ /**
84
+ * Content to capture as the pre-revert snapshot. Hosts that keep the
85
+ * live document outside the container (an editor buffer, say) MUST pass
86
+ * it: without it the snapshot falls back to reading the container, which
87
+ * is stale whenever there are unsaved edits and yields `no-document`
88
+ * when the container holds no markdown at all. In both cases the
89
+ * pre-revert state would not actually be recoverable.
90
+ *
91
+ * Ignored when `snapshotCurrent` is `false`.
92
+ */
93
+ content?: string;
94
+ /**
95
+ * Override the document basename used to file the pre-revert snapshot.
96
+ * Defaults to the container's resolved primary document. Ignored when
97
+ * `snapshotCurrent` is `false`.
98
+ */
99
+ basename?: string;
100
+ }
101
+ /**
102
+ * Why a {@link revertToVersion} call declined to revert.
103
+ *
104
+ * - `'missing-snapshot'` — the requested version could not be read.
105
+ * - `'snapshot-failed'` — the pre-revert snapshot could not be written, so
106
+ * reverting would have destroyed the current state irrecoverably.
107
+ */
108
+ type RevertFailureReason = 'missing-snapshot' | 'snapshot-failed';
109
+ /**
110
+ * Result of a {@link revertToVersion} call.
111
+ */
112
+ interface RevertResult {
113
+ /** True when the document was replaced with the snapshot's content. */
114
+ reverted: boolean;
115
+ /** The pre-revert snapshot, when one was written. */
116
+ snapshotted: Version | null;
117
+ /** Present only when `reverted` is false. */
118
+ reason?: RevertFailureReason;
83
119
  }
84
120
  /**
85
121
  * Options for {@link coalesceVersions}.
@@ -92,4 +128,4 @@ interface CoalesceOptions {
92
128
  windowMs?: number;
93
129
  }
94
130
 
95
- export type { CoalesceOptions as C, PrunePolicy as P, RevertOptions as R, SaveVersionOptions as S, Version as V, SaveVersionResult as a };
131
+ export type { CoalesceOptions as C, PrunePolicy as P, RevertFailureReason as R, SaveVersionOptions as S, Version as V, RevertOptions as a, RevertResult as b, SaveVersionResult as c };
@@ -1,3 +1,18 @@
1
+ interface MarkdownSafetyLimits {
2
+ maxSourceBytes: number;
3
+ maxNodes: number;
4
+ maxDepth: number;
5
+ maxTableCells: number;
6
+ }
7
+ declare const DEFAULT_MARKDOWN_SAFETY_LIMITS: Readonly<MarkdownSafetyLimits>;
8
+ declare class MarkdownLimitError extends RangeError {
9
+ readonly code: 'SOURCE_BYTES' | 'NODES' | 'DEPTH' | 'TABLE_CELLS';
10
+ constructor(code: MarkdownLimitError['code'], message: string);
11
+ }
12
+ declare function assertMarkdownSourceWithinLimits(source: string, limits: Partial<MarkdownSafetyLimits> | false | undefined): void;
13
+ declare function assertMarkdownDocumentWithinLimits(document: MarkdownDocument, limits: Partial<MarkdownSafetyLimits> | false | undefined, signal?: AbortSignal): void;
14
+ declare function resolveMarkdownSafetyLimits(limits?: Partial<MarkdownSafetyLimits>): MarkdownSafetyLimits;
15
+
1
16
  /**
2
17
  * Shared transition vocabulary for block-to-block slide changes.
3
18
  *
@@ -605,6 +620,10 @@ type MarkdownNode = MarkdownDocument | MarkdownBlockNode | MarkdownInlineNode |
605
620
  * Options for parseMarkdown().
606
621
  */
607
622
  interface ParseOptions {
623
+ /** Safety limits for untrusted input. Pass false only for trusted documents. */
624
+ limits?: Partial<MarkdownSafetyLimits> | false;
625
+ /** Cancel before parse and during post-parse validation. */
626
+ signal?: AbortSignal;
608
627
  /** Enable GFM extensions (tables, strikethrough, task lists, autolinks, footnotes). Default: true */
609
628
  gfm?: boolean;
610
629
  /** Enable math extensions ($...$ and $$...$$). Default: true */
@@ -620,6 +639,10 @@ interface ParseOptions {
620
639
  * Options for stringifyMarkdown().
621
640
  */
622
641
  interface StringifyOptions {
642
+ /** Safety limits for untrusted trees. Pass false only for trusted documents. */
643
+ limits?: Partial<MarkdownSafetyLimits> | false;
644
+ /** Cancel before serialization and during validation. */
645
+ signal?: AbortSignal;
623
646
  /** Enable GFM extensions in output. Default: true */
624
647
  gfm?: boolean;
625
648
  /** Enable math extensions in output. Default: true */
@@ -642,4 +665,4 @@ interface StringifyOptions {
642
665
  setext?: boolean;
643
666
  }
644
667
 
645
- export { type TransitionType as $, type MarkdownLinkDefinition as A, type MarkdownLinkReference as B, type MarkdownList as C, DEFAULT_TRANSITION_DURATION_SECONDS as D, type MarkdownListItem as E, type MarkdownMathBlock as F, type MarkdownMention as G, type HeadingAttributes as H, type MarkdownNode as I, type MarkdownParagraph as J, type MarkdownPoint as K, type MarkdownSourcePosition as L, type MarkdownBlockNode as M, type MarkdownStrikethrough as N, type MarkdownStrong as O, type MarkdownTable as P, type MarkdownTableCell as Q, type MarkdownTableRow as R, type MarkdownText as S, type MarkdownTextDirective as T, type MarkdownThematicBreak as U, type ParseOptions as V, type StringifyOptions as W, TRANSITION_DIRECTIONS as X, TRANSITION_TYPES as Y, type Transition as Z, type TransitionDirection as _, type HeadingTemplateAnnotation as a, isTransitionType as a0, normalizeTransitionDirection as a1, normalizeTransitionType as a2, resolveBlockTransition as a3, resolveTransitionDuration as a4, type BlockConnection as a5, type HtmlComment as b, type HtmlElement as c, type HtmlNode as d, type HtmlText as e, type MarkdownBlockquote as f, type MarkdownBreak as g, type MarkdownCodeBlock as h, type MarkdownContainerDirective as i, type MarkdownDefinitionDescription as j, type MarkdownDefinitionList as k, type MarkdownDefinitionTerm as l, type MarkdownDocument as m, type MarkdownEmphasis as n, type MarkdownFootnoteDefinition as o, type MarkdownFootnoteReference as p, type MarkdownHeading as q, type MarkdownHtmlBlock as r, type MarkdownImage as s, type MarkdownImageReference as t, type MarkdownInlineCode as u, type MarkdownInlineHtml as v, type MarkdownInlineMath as w, type MarkdownInlineNode as x, type MarkdownLeafDirective as y, type MarkdownLink as z };
668
+ export { TRANSITION_TYPES as $, MarkdownLimitError as A, type MarkdownLink as B, type MarkdownLinkDefinition as C, DEFAULT_MARKDOWN_SAFETY_LIMITS as D, type MarkdownLinkReference as E, type MarkdownList as F, type MarkdownListItem as G, type HeadingAttributes as H, type MarkdownMathBlock as I, type MarkdownMention as J, type MarkdownNode as K, type MarkdownParagraph as L, type MarkdownBlockNode as M, type MarkdownPoint as N, type MarkdownSafetyLimits as O, type MarkdownSourcePosition as P, type MarkdownStrikethrough as Q, type MarkdownStrong as R, type MarkdownTable as S, type MarkdownTableCell as T, type MarkdownTableRow as U, type MarkdownText as V, type MarkdownTextDirective as W, type MarkdownThematicBreak as X, type ParseOptions as Y, type StringifyOptions as Z, TRANSITION_DIRECTIONS as _, DEFAULT_TRANSITION_DURATION_SECONDS as a, type Transition as a0, type TransitionDirection as a1, type TransitionType as a2, assertMarkdownDocumentWithinLimits as a3, assertMarkdownSourceWithinLimits as a4, isTransitionType as a5, normalizeTransitionDirection as a6, normalizeTransitionType as a7, resolveBlockTransition as a8, resolveMarkdownSafetyLimits as a9, resolveTransitionDuration as aa, type BlockConnection as ab, type HeadingTemplateAnnotation as b, type HtmlComment as c, type HtmlElement as d, type HtmlNode as e, type HtmlText as f, type MarkdownBlockquote as g, type MarkdownBreak as h, type MarkdownCodeBlock as i, type MarkdownContainerDirective as j, type MarkdownDefinitionDescription as k, type MarkdownDefinitionList as l, type MarkdownDefinitionTerm as m, type MarkdownDocument as n, type MarkdownEmphasis as o, type MarkdownFootnoteDefinition as p, type MarkdownFootnoteReference as q, type MarkdownHeading as r, type MarkdownHtmlBlock as s, type MarkdownImage as t, type MarkdownImageReference as u, type MarkdownInlineCode as v, type MarkdownInlineHtml as w, type MarkdownInlineMath as x, type MarkdownInlineNode as y, type MarkdownLeafDirective as z };
@@ -1,5 +1,6 @@
1
- import { C as CoalesceOptions, V as Version, P as PrunePolicy, R as RevertOptions, S as SaveVersionOptions, a as SaveVersionResult } from '../types-C4kiRn_k.js';
2
- import { C as ContentContainer } from '../ContentContainer-BXUlIf18.js';
1
+ import { C as CoalesceOptions, V as Version, P as PrunePolicy, a as RevertOptions, b as RevertResult, S as SaveVersionOptions, c as SaveVersionResult } from '../types-8QjefM9J.js';
2
+ export { R as RevertFailureReason } from '../types-8QjefM9J.js';
3
+ import { C as ContentContainer } from '../ContentContainer-B2w9sUoL.js';
3
4
 
4
5
  /**
5
6
  * Pure-ish version operations against a {@link ContentContainer}.
@@ -28,11 +29,16 @@ declare function saveVersion(container: ContentContainer, options?: SaveVersionO
28
29
  /**
29
30
  * Revert the document to a prior snapshot. By default, the *current*
30
31
  * document is snapshotted first so the revert is itself recoverable.
32
+ *
33
+ * When that snapshot cannot be written, the revert is ABANDONED rather
34
+ * than performed unrecoverably — losing the current state is a worse
35
+ * outcome than a revert that didn't happen. Callers that have already
36
+ * preserved the current state themselves should pass
37
+ * `snapshotCurrent: false`; callers whose live document lives outside the
38
+ * container should pass `content` so the right bytes get snapshotted (see
39
+ * {@link RevertOptions.content}).
31
40
  */
32
- declare function revertToVersion(container: ContentContainer, version: Version | string, options?: RevertOptions): Promise<{
33
- reverted: boolean;
34
- snapshotted: Version | null;
35
- }>;
41
+ declare function revertToVersion(container: ContentContainer, version: Version | string, options?: RevertOptions): Promise<RevertResult>;
36
42
  /**
37
43
  * Delete snapshots that don't satisfy the policy. Returns the deleted
38
44
  * versions in their original (newest-first) order.
@@ -66,10 +72,7 @@ declare class DocumentVersionManager {
66
72
  saveVersion(options?: SaveVersionOptions): Promise<SaveVersionResult>;
67
73
  listVersions(): Promise<Version[]>;
68
74
  readVersion(version: Version | string): Promise<string | null>;
69
- revertToVersion(version: Version | string, options?: RevertOptions): Promise<{
70
- reverted: boolean;
71
- snapshotted: Version | null;
72
- }>;
75
+ revertToVersion(version: Version | string, options?: RevertOptions): Promise<RevertResult>;
73
76
  pruneVersions(policy: PrunePolicy): Promise<Version[]>;
74
77
  coalesceVersions(options?: CoalesceOptions): Promise<Version[]>;
75
78
  }
@@ -126,4 +129,4 @@ declare function parseVersionPath(path: string): {
126
129
  collision: number;
127
130
  } | null;
128
131
 
129
- export { CoalesceOptions, DocumentVersionManager, type DocumentVersionManagerOptions, PrunePolicy, RevertOptions, SaveVersionOptions, SaveVersionResult, VERSIONS_PREFIX, VERSION_TIMESTAMP_PATTERN, Version, buildVersionPath, coalesceVersions, formatVersionTimestamp, getDocBasename, listVersions, parseVersionPath, parseVersionTimestamp, pruneVersions, readVersion, revertToVersion, saveVersion };
132
+ export { CoalesceOptions, DocumentVersionManager, type DocumentVersionManagerOptions, PrunePolicy, RevertOptions, RevertResult, SaveVersionOptions, SaveVersionResult, VERSIONS_PREFIX, VERSION_TIMESTAMP_PATTERN, Version, buildVersionPath, coalesceVersions, formatVersionTimestamp, getDocBasename, listVersions, parseVersionPath, parseVersionTimestamp, pruneVersions, readVersion, revertToVersion, saveVersion };
@@ -10,12 +10,12 @@ import {
10
10
  readVersion,
11
11
  revertToVersion,
12
12
  saveVersion
13
- } from "../chunk-JOQYPRDZ.js";
13
+ } from "../chunk-7YEZFHLS.js";
14
14
  import {
15
15
  VERSION_TIMESTAMP_PATTERN,
16
16
  formatVersionTimestamp,
17
17
  parseVersionTimestamp
18
- } from "../chunk-S7A5D7ZJ.js";
18
+ } from "../chunk-OPO5K4DZ.js";
19
19
  export {
20
20
  DocumentVersionManager,
21
21
  VERSIONS_PREFIX,
@@ -32,4 +32,3 @@ export {
32
32
  revertToVersion,
33
33
  saveVersion
34
34
  };
35
- //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bendyline/squisq",
3
- "version": "2.0.1",
3
+ "version": "2.2.0",
4
4
  "description": "Headless utilities for doc/block rendering, spatial math, Markdown, and storage",
5
5
  "license": "MIT",
6
6
  "author": "Bendyline",
@@ -28,7 +28,9 @@
28
28
  "types": "./dist/index.d.ts",
29
29
  "files": [
30
30
  "dist",
31
- "src"
31
+ "!dist/**/*.map",
32
+ "LICENSE",
33
+ "NOTICE.md"
32
34
  ],
33
35
  "exports": {
34
36
  ".": {
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/jsonForm/chooseControl.ts","../src/jsonForm/pointer.ts","../src/jsonForm/evaluateWhen.ts","../src/jsonForm/inferSchema.ts","../src/jsonForm/tokens.ts"],"sourcesContent":["/**\n * Pick a `ControlKind` for a schema node. The single dispatcher used by\n * both `<JsonView>` and `<JsonEditor>` so view and edit modes always\n * agree on what each field _is_, even when their UIs differ.\n *\n * Order of precedence:\n * 1. Explicit `squisq.control` hint\n * 2. `format` keyword (color/date/time/datetime/markdown/textarea)\n * 3. Enum cardinality (segmented vs. combobox)\n * 4. Numeric range (slider when both min and max present)\n * 5. String length (multiline when maxLength > 200)\n * 6. Type-default (object/array/boolean/string/number)\n */\n\nimport type { ControlKind, SquisqAnnotatedSchema } from './types.js';\n\nconst ENUM_SEGMENTED_LIMIT = 4;\nconst MULTILINE_LENGTH_THRESHOLD = 200;\n\nexport function chooseControl(schema: SquisqAnnotatedSchema): ControlKind {\n const hint = schema.squisq?.control;\n if (hint) return hint;\n\n const type = primaryType(schema);\n\n if (schema.format && type === 'string') {\n switch (schema.format) {\n case 'color':\n return 'color';\n case 'date':\n return 'date';\n case 'time':\n return 'time';\n case 'date-time':\n return 'datetime';\n case 'markdown':\n return 'richtext';\n case 'textarea':\n return 'multiline';\n }\n }\n\n if (schema.enum && schema.enum.length > 0) {\n return schema.enum.length <= ENUM_SEGMENTED_LIMIT ? 'segmented' : 'combobox';\n }\n\n if (schema.oneOf || schema.anyOf) return 'tabs';\n\n switch (type) {\n case 'array':\n return arrayItemKind(schema) === 'object' ? 'card-stack' : 'chip-bin';\n case 'object':\n return 'group';\n case 'boolean':\n return 'toggle';\n case 'integer':\n case 'number':\n return hasFiniteRange(schema) ? 'slider' : 'stepper';\n case 'string':\n if (typeof schema.maxLength === 'number' && schema.maxLength > MULTILINE_LENGTH_THRESHOLD) {\n return 'multiline';\n }\n return 'text';\n default:\n return 'text';\n }\n}\n\n/** Return the first concrete type of a schema, ignoring `null` for nullable shorthand. */\nexport function primaryType(schema: SquisqAnnotatedSchema): string | undefined {\n const t = schema.type;\n if (typeof t === 'string') return t;\n if (Array.isArray(t)) return t.find((x) => x !== 'null');\n return undefined;\n}\n\n/** Inspect `items` to decide whether an array holds objects or primitives. */\nexport function arrayItemKind(schema: SquisqAnnotatedSchema): 'object' | 'primitive' {\n const items = Array.isArray(schema.items) ? schema.items[0] : schema.items;\n if (!items) return 'primitive';\n return primaryType(items) === 'object' ? 'object' : 'primitive';\n}\n\nfunction hasFiniteRange(schema: SquisqAnnotatedSchema): boolean {\n const min = schema.minimum ?? schema.exclusiveMinimum;\n const max = schema.maximum ?? schema.exclusiveMaximum;\n return typeof min === 'number' && typeof max === 'number';\n}\n","/**\n * JSON Pointer helpers (RFC 6901) plus immutable get/set, plus a tiny\n * dotted-path normalizer so hosts can write `user.role` instead of\n * `/user/role`. `$ref` resolution is local-only (`#/$defs/Foo`).\n */\n\nimport type { SquisqAnnotatedSchema } from './types.js';\n\n/** Escape one object-member name for use as an RFC 6901 pointer segment. */\nexport function escapePointerSegment(segment: string): string {\n return segment.replace(/~/g, '~0').replace(/\\//g, '~1');\n}\n\n/** Normalize a path to a JSON Pointer string. Accepts both forms. */\nexport function toPointer(path: string): string {\n if (path === '') return '';\n if (path.startsWith('/')) return path;\n // Dotted form: split on `.` and escape per RFC 6901.\n return '/' + path.split('.').map(escapePointerSegment).join('/');\n}\n\n/** Append one member name to a dotted path or validated JSON Pointer. */\nexport function appendPointer(base: string, segment: string): string {\n const pointer = toPointer(base);\n pointerSegments(pointer); // validate explicit pointer syntax before composing\n return `${pointer}/${escapePointerSegment(segment)}`;\n}\n\n/** Split a JSON Pointer into decoded segments. Empty string → []. */\nexport function pointerSegments(pointer: string): string[] {\n if (pointer === '') return [];\n if (!pointer.startsWith('/')) {\n throw new TypeError(`Invalid JSON Pointer ${JSON.stringify(pointer)}: expected \"\" or \"/...\"`);\n }\n return pointer\n .slice(1)\n .split('/')\n .map((seg) => {\n if (/~(?:[^01]|$)/.test(seg)) {\n throw new TypeError(\n `Invalid JSON Pointer ${JSON.stringify(pointer)}: \"~\" must be escaped as \"~0\"`,\n );\n }\n return seg.replace(/~1/g, '/').replace(/~0/g, '~');\n });\n}\n\n/** Parse the canonical array-index spelling used by JSON Pointer consumers. */\nfunction arrayIndex(segment: string): number | undefined {\n if (!/^(?:0|[1-9]\\d*)$/.test(segment)) return undefined;\n const index = Number(segment);\n // 2^32 - 1 is the Array length sentinel, not an element index.\n return Number.isSafeInteger(index) && index <= 0xffff_fffe ? index : undefined;\n}\n\nfunction ownValue(object: object, key: string): unknown {\n return Object.prototype.hasOwnProperty.call(object, key)\n ? (object as Record<string, unknown>)[key]\n : undefined;\n}\n\n/** Define a data member without invoking Object.prototype.__proto__'s setter. */\nfunction setOwn(object: Record<string, unknown>, key: string, value: unknown): void {\n Object.defineProperty(object, key, {\n value,\n enumerable: true,\n configurable: true,\n writable: true,\n });\n}\n\n/** Read a value from data by path (dotted or pointer). Returns undefined if missing. */\nexport function getByPointer(data: unknown, path: string): unknown {\n const segments = pointerSegments(toPointer(path));\n let cur: unknown = data;\n for (const seg of segments) {\n if (cur === null || cur === undefined) return undefined;\n if (Array.isArray(cur)) {\n const idx = arrayIndex(seg);\n if (idx === undefined || idx >= cur.length) return undefined;\n cur = cur[idx];\n } else if (typeof cur === 'object') {\n cur = ownValue(cur, seg);\n } else {\n return undefined;\n }\n }\n return cur;\n}\n\n/**\n * Return a structurally-shared copy of `data` with the value at `path`\n * replaced. Intermediate objects/arrays are cloned along the path; the\n * rest is shared by reference. Creates intermediate objects if missing.\n */\nexport function setByPointer<T>(data: T, path: string, value: unknown): T {\n const segments = pointerSegments(toPointer(path));\n if (segments.length === 0) return value as T;\n return setRec(data, segments, 0, value) as T;\n}\n\nfunction setRec(node: unknown, segments: string[], i: number, value: unknown): unknown {\n const seg = segments[i];\n const isLast = i === segments.length - 1;\n\n // Decide whether the slot we're about to write into is an array index.\n const nextSeg = isLast ? undefined : segments[i + 1];\n const writingArrayChild = nextSeg !== undefined && arrayIndex(nextSeg) !== undefined;\n\n if (Array.isArray(node)) {\n const idx = arrayIndex(seg);\n if (idx === undefined) {\n throw new TypeError(`Invalid array index ${JSON.stringify(seg)} in JSON Pointer`);\n }\n const next = node.slice();\n next[idx] = isLast\n ? value\n : setRec(node[idx] ?? (writingArrayChild ? [] : {}), segments, i + 1, value);\n return next;\n }\n\n const obj = (node && typeof node === 'object' ? { ...(node as object) } : {}) as Record<\n string,\n unknown\n >;\n const previous = ownValue(obj, seg);\n setOwn(\n obj,\n seg,\n isLast ? value : setRec(previous ?? (writingArrayChild ? [] : {}), segments, i + 1, value),\n );\n return obj;\n}\n\n/**\n * Resolve a local `$ref` (e.g. `#/$defs/Foo`) against the root schema.\n * Returns the original schema if no `$ref` is present, or `undefined`\n * if the reference cannot be resolved. Cross-document refs are not\n * supported.\n */\nexport function resolveRef(\n schema: SquisqAnnotatedSchema,\n root: SquisqAnnotatedSchema,\n): SquisqAnnotatedSchema | undefined {\n if (!schema.$ref) return schema;\n const ref = schema.$ref;\n if (ref === '#') return root;\n if (!ref.startsWith('#/')) return undefined;\n try {\n return getByPointer(root, ref.slice(1)) as SquisqAnnotatedSchema | undefined;\n } catch {\n return undefined;\n }\n}\n","/**\n * Evaluate a `SquisqWhen` rule against the current root data. Pure;\n * renderers call this on every render with fresh data.\n */\n\nimport type { SquisqWhen } from './types.js';\nimport { getByPointer } from './pointer.js';\n\nexport function evaluateWhen(when: SquisqWhen, rootData: unknown): boolean {\n const actual = getByPointer(rootData, when.field);\n\n if (when.equals !== undefined) {\n return deepEqual(actual, when.equals);\n }\n if (when.oneOf !== undefined) {\n return when.oneOf.some((v) => deepEqual(actual, v));\n }\n if (when.matches !== undefined) {\n if (typeof actual !== 'string') return false;\n try {\n return new RegExp(when.matches).test(actual);\n } catch {\n return false;\n }\n }\n if (when.truthy !== undefined) {\n return Boolean(actual) === when.truthy;\n }\n // No operator specified — defaults to \"field has any defined value\".\n return actual !== undefined && actual !== null;\n}\n\n/**\n * Resolve a `boolean | SquisqWhen` flag (used by `hidden`/`disabled`)\n * to a final boolean. Literal booleans pass through.\n */\nexport function resolveFlag(flag: boolean | SquisqWhen | undefined, rootData: unknown): boolean {\n if (flag === undefined) return false;\n if (typeof flag === 'boolean') return flag;\n return evaluateWhen(flag, rootData);\n}\n\nfunction deepEqual(a: unknown, b: unknown): boolean {\n if (a === b) return true;\n if (a === null || b === null) return false;\n if (typeof a !== typeof b) return false;\n if (typeof a !== 'object') return false;\n if (Array.isArray(a)) {\n if (!Array.isArray(b) || a.length !== b.length) return false;\n return a.every((v, i) => deepEqual(v, b[i]));\n }\n if (Array.isArray(b)) return false;\n const ao = a as Record<string, unknown>;\n const bo = b as Record<string, unknown>;\n const ak = Object.keys(ao);\n const bk = Object.keys(bo);\n if (ak.length !== bk.length) return false;\n return ak.every((k) => deepEqual(ao[k], bo[k]));\n}\n","/**\n * Infer a JSON Schema from an example JSON value. Thin facade over\n * `genson-js` so consumers don't depend on it directly and we can swap\n * the implementation later.\n */\n\nimport { createSchema, mergeSchemas } from 'genson-js';\nimport type { SquisqAnnotatedSchema } from './types.js';\n\nexport interface InferSchemaOptions {\n /** Additional samples merged into the inferred schema for broader coverage. */\n additionalSamples?: readonly unknown[];\n}\n\nexport function inferSchema(\n sample: unknown,\n options: InferSchemaOptions = {},\n): SquisqAnnotatedSchema {\n const base = createSchema(sample) as SquisqAnnotatedSchema;\n if (!options.additionalSamples || options.additionalSamples.length === 0) {\n return base;\n }\n const extras = options.additionalSamples.map((s) => createSchema(s) as SquisqAnnotatedSchema);\n return mergeSchemas([base, ...extras] as never[]) as SquisqAnnotatedSchema;\n}\n","/**\n * Pure CSS-custom-property builder shared by `<JsonView>` (read-only, in\n * `@bendyline/squisq-react`) and `<JsonEditor>` (editable, in\n * `@bendyline/squisq-editor-react`).\n *\n * Both components derive an identical token bag from a Theme + resolved\n * Surface; they differ only in the CSS-var prefix (`--squisq-json` vs\n * `--squisq-jsonform`) so the viewer and editor can coexist on one page.\n * This function is the single source of that derivation. It is pure and\n * framework-free: it performs no `window` / `matchMedia` access — the\n * surface must already be resolved to a concrete `SurfaceScheme` (or left\n * `undefined` to skip surface application) by the calling React hook.\n */\n\nimport { applySurface, DEFAULT_THEME, resolveFontFamily } from '../schemas/index.js';\nimport type { SurfaceScheme, Theme } from '../schemas/index.js';\n\nexport interface BuildJsonFormTokensOptions {\n /**\n * CSS-var prefix WITHOUT the trailing dash, e.g. `--squisq-json` or\n * `--squisq-jsonform`. Each token key is `${prefix}-${name}`.\n */\n prefix: string;\n}\n\n/**\n * Build the CSS custom-property map for a JSON form/view surface.\n *\n * @param theme The theme to render with (falls back to `DEFAULT_THEME`).\n * @param surface Already-resolved concrete surface, or `undefined` to leave\n * the theme un-surfaced. (The `'auto'` → concrete resolution\n * is the React hook's job, so this stays pure.)\n * @param options `{ prefix }` — the CSS-var namespace.\n */\nexport function buildJsonFormTokens(\n theme: Theme | undefined,\n surface: SurfaceScheme | undefined,\n options: BuildJsonFormTokensOptions,\n): Record<string, string> {\n const { prefix } = options;\n const baseTheme = theme ?? DEFAULT_THEME;\n const finalTheme = surface ? applySurface(baseTheme, surface) : baseTheme;\n\n const titleFont = resolveFontFamily(finalTheme.typography.titleFont, 'system-ui, sans-serif');\n const bodyFont = resolveFontFamily(finalTheme.typography.bodyFont, 'system-ui, sans-serif');\n const monoFont = resolveFontFamily(\n finalTheme.typography.monoFont,\n 'ui-monospace, Consolas, monospace',\n );\n\n return {\n [`${prefix}-bg`]: finalTheme.colors.background,\n [`${prefix}-text`]: finalTheme.colors.text,\n [`${prefix}-muted`]: finalTheme.colors.textMuted,\n [`${prefix}-primary`]: finalTheme.colors.primary,\n [`${prefix}-accent`]: finalTheme.colors.secondary,\n [`${prefix}-warning`]: finalTheme.colors.warning,\n [`${prefix}-border`]: `color-mix(in srgb, ${finalTheme.colors.textMuted} 35%, transparent)`,\n [`${prefix}-input-bg`]: finalTheme.colors.backgroundLight,\n [`${prefix}-title-font`]: titleFont,\n [`${prefix}-body-font`]: bodyFont,\n [`${prefix}-mono-font`]: monoFont,\n [`${prefix}-radius`]: `${finalTheme.style.borderRadius ?? 8}px`,\n };\n}\n\n/**\n * Resolve the effective theme after surface application — the companion to\n * `buildJsonFormTokens` for callers that also need the `Theme` object (both\n * hooks return it alongside the style bag).\n */\nexport function resolveJsonFormTheme(\n theme: Theme | undefined,\n surface: SurfaceScheme | undefined,\n): Theme {\n const baseTheme = theme ?? DEFAULT_THEME;\n return surface ? applySurface(baseTheme, surface) : base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ACUO,SAAS,oBACd,OACA,SACA,SACwB;AACxB,QAAM,EAAE,OAAO,IAAI;AACnB,QAAM,YAAY,SAAS;AAC3B,QAAM,aAAa,UAAU,aAAa,WAAW,OAAO,IAAI;AAEhE,QAAM,YAAY,kBAAkB,WAAW,WAAW,WAAW,uBAAuB;AAC5F,QAAM,WAAW,kBAAkB,WAAW,WAAW,UAAU,uBAAuB;AAC1F,QAAM,WAAW;AAAA,IACf,WAAW,WAAW;AAAA,IACtB;AAAA,EACF;AAEA,SAAO;AAAA,IACL,CAAC,GAAG,MAAM,KAAK,GAAG,WAAW,OAAO;AAAA,IACpC,CAAC,GAAG,MAAM,OAAO,GAAG,WAAW,OAAO;AAAA,IACtC,CAAC,GAAG,MAAM,QAAQ,GAAG,WAAW,OAAO;AAAA,IACvC,CAAC,GAAG,MAAM,UAAU,GAAG,WAAW,OAAO;AAAA,IACzC,CAAC,GAAG,MAAM,SAAS,GAAG,WAAW,OAAO;AAAA,IACxC,CAAC,GAAG,MAAM,UAAU,GAAG,WAAW,OAAO;AAAA,IACzC,CAAC,GAAG,MAAM,SAAS,GAAG,sBAAsB,WAAW,OAAO,SAAS;AAAA,IACvE,CAAC,GAAG,MAAM,WAAW,GAAG,WAAW,OAAO;AAAA,IAC1C,CAAC,GAAG,MAAM,aAAa,GAAG;AAAA,IAC1B,CAAC,GAAG,MAAM,YAAY,GAAG;AAAA,IACzB,CAAC,GAAG,MAAM,YAAY,GAAG;AAAA,IACzB,CAAC,GAAG,MAAM,SAAS,GAAG,GAAG,WAAW,MAAM,gBAAgB,CAAC;AAAA,EAC7D;AACF;AAOO,SAAS,qBACd,OACA,SACO;AACP,QAAM,YAAY,SAAS;AAC3B,SAAO,UAAU,aAAa,WAAW,OAAO,IAAI;AACtD;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/icons/inlineIconMarker.ts"],"sourcesContent":["/**\n * Inline-icon markers for template text.\n *\n * Slide templates flatten rich markdown body content into strings before\n * rendering. Inline icons need to survive that flattening step, so we encode\n * them as sentinel-delimited text markers and let `TextLayer` turn them back\n * into FontAwesome glyphs when rendering.\n */\n\nimport type { IconFamily } from './iconData.js';\n\n/**\n * Private-Use-Area sentinel that brackets an encoded icon.\n * Kept as an escape sequence so the source remains valid TypeScript text.\n */\nconst SENTINEL = '\\uE000';\n\n/** Matches one encoded marker: `<sentinel><family>:<name><sentinel>`. */\nconst MARKER_RE = new RegExp(`${SENTINEL}([a-z]+):([a-zA-Z0-9-]+)${SENTINEL}`, 'g');\n\n/** Encode a resolved icon (family + name) as an embeddable text marker. */\nexport function iconMarker(family: IconFamily, name: string): string {\n return `${SENTINEL}${family}:${name}${SENTINEL}`;\n}\n\n/** True when a string contains at least one encoded icon marker. */\nexport function hasIconMarker(value: string): boolean {\n return value.includes(SENTINEL);\n}\n\n/** Remove every icon marker, leaving a clean plain-text projection. */\nexport function stripIconMarkers(value: string): string {\n return value.replace(MARKER_RE, '');\n}\n\n/** A run of a marker-bearing string: literal text or a resolved icon. */\nexport type IconTextRun =\n | { type: 'text'; text: string }\n | { type: 'icon'; family: IconFamily; name: string };\n\n/**\n * Split a string into ordered text/icon runs. Text between markers is\n * preserved verbatim, including whitespace; each marker becomes an icon run.\n */\nexport function splitIconMarkers(value: string): IconTextRun[] {\n const runs: IconTextRun[] = [];\n let lastIndex = 0;\n MARKER_RE.lastIndex = 0;\n\n let match: RegExpExecArray | null;\n while ((match = MARKER_RE.exec(value)) !== null) {\n if (match.index > lastIndex) {\n runs.push({ type: 'text', text: value.slice(lastIndex, match.index) });\n }\n runs.push({\n type: 'icon',\n family: match[1] as IconFamily,\n name: match[2],\n });\n lastIndex = match.index + match[0].length;\n }\n\n if (lastIndex < value.length) {\n runs.push({ type: 'text', text: value.slice(lastIndex) });\n }\n\n return runs;\n}\n\n/** FontAwesome CSS class for a resolved icon, e.g. `fa-solid fa-rocket`. */\nexport function iconClass(family: IconFamily, name: string): string {\n return `fa-${family} fa-${name}`;\n}\n"],"mappings":";AAeA,IAAM,WAAW;AAGjB,IAAM,YAAY,IAAI,OAAO,GAAG,QAAQ,2BAA2B,QAAQ,IAAI,GAAG;AAG3E,SAAS,WAAW,QAAoB,MAAsB;AACnE,SAAO,GAAG,QAAQ,GAAG,MAAM,IAAI,IAAI,GAAG,QAAQ;AAChD;AAGO,SAAS,cAAc,OAAwB;AACpD,SAAO,MAAM,SAAS,QAAQ;AAChC;AAGO,SAAS,iBAAiB,OAAuB;AACtD,SAAO,MAAM,QAAQ,WAAW,EAAE;AACpC;AAWO,SAAS,iBAAiB,OAA8B;AAC7D,QAAM,OAAsB,CAAC;AAC7B,MAAI,YAAY;AAChB,YAAU,YAAY;AAEtB,MAAI;AACJ,UAAQ,QAAQ,UAAU,KAAK,KAAK,OAAO,MAAM;AAC/C,QAAI,MAAM,QAAQ,WAAW;AAC3B,WAAK,KAAK,EAAE,MAAM,QAAQ,MAAM,MAAM,MAAM,WAAW,MAAM,KAAK,EAAE,CAAC;AAAA,IACvE;AACA,SAAK,KAAK;AAAA,MACR,MAAM;AAAA,MACN,QAAQ,MAAM,CAAC;AAAA,MACf,MAAM,MAAM,CAAC;AAAA,IACf,CAAC;AACD,gBAAY,MAAM,QAAQ,MAAM,CAAC,EAAE;AAAA,EACrC;AAEA,MAAI,YAAY,MAAM,QAAQ;AAC5B,SAAK,KAAK,EAAE,MAAM,QAAQ,MAAM,MAAM,MAAM,SAAS,EAAE,CAAC;AAAA,EAC1D;AAEA,SAAO;AACT;AAGO,SAAS,UAAU,QAAoB,MAAsB;AAClE,SAAO,MAAM,MAAM,OAAO,IAAI;AAChC;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/timing/narrationTiming.ts"],"sourcesContent":["/**\n * Narration timing estimation.\n *\n * Estimates how long text takes to speak aloud, accounting for:\n * - Numbers spoken as multiple words (e.g., \"1910\" → \"nineteen ten\")\n * - Pauses at commas\n * - Year pronunciation conventions (1000–2099)\n *\n * Ported from qualla-internal's AudioTiming.ts (pure functions, no Node.js deps).\n */\n\n/** Numbers are spoken more slowly than regular words (1.3× multiplier). */\nconst NUMBER_SPEAKING_MULTIPLIER = 1.3;\n\n/** Comma pause in \"word equivalents\" — speakers pause ~0.3 words at commas. */\nconst COMMA_PAUSE_PENALTY = 0.3;\n\n/** Default speaking rate in words per second (~150 WPM). */\nexport const DEFAULT_WORDS_PER_SECOND = 2.5;\n\n/**\n * Estimate how many \"spoken word equivalents\" a single token represents.\n * Numbers get expanded (e.g., \"175,000\" → ~5 words × 1.3 multiplier).\n */\nexport function estimateSpokenWordCount(token: string): number {\n const cleaned = token.replace(/,/g, '');\n const num = parseFloat(cleaned);\n\n if (isNaN(num) || !isFinite(num)) {\n return 1; // Not a number — count as 1 word\n }\n\n return estimateNumberWordCount(cleaned, num) * NUMBER_SPEAKING_MULTIPLIER;\n}\n\n/**\n * Raw word count for a number (before the speaking multiplier).\n */\nfunction estimateNumberWordCount(cleaned: string, num: number): number {\n // Handle decimals: \"3.14\" → words(\"3\") + \"point\" + 2 digits\n if (cleaned.includes('.')) {\n const [whole, decimal] = cleaned.split('.');\n const wholeNum = parseFloat(whole) || 0;\n return estimateNumberWordCount(whole, wholeNum) + 1 + decimal.length;\n }\n\n const absNum = Math.abs(num);\n let words = num < 0 ? 1 : 0; // \"negative\" / \"minus\"\n\n if (absNum === 0) return 1; // \"zero\"\n\n // Years (1000–2099) are spoken as two two-digit groups:\n // \"1910\" → \"nineteen ten\", \"2024\" → \"twenty twenty-four\"\n if (absNum >= 1000 && absNum <= 2099 && Number.isInteger(absNum)) {\n const yearStr = absNum.toString();\n if (yearStr.length === 4) {\n const firstTwo = parseInt(yearStr.slice(0, 2));\n const lastTwo = parseInt(yearStr.slice(2));\n\n // First part\n if (firstTwo >= 10 && firstTwo <= 19) {\n words += 1;\n } else if (firstTwo >= 20 && firstTwo <= 99) {\n words += firstTwo % 10 === 0 ? 1 : 2;\n } else {\n words += 2; // \"two thousand\"\n }\n\n // Second part\n if (lastTwo === 0) {\n if (firstTwo >= 10 && firstTwo <= 99 && firstTwo !== 20) {\n words += 1; // \"hundred\"\n }\n } else if (lastTwo >= 1 && lastTwo <= 9) {\n words += 2; // \"oh five\"\n } else if (lastTwo >= 10 && lastTwo <= 19) {\n words += 1;\n } else {\n words += lastTwo % 10 === 0 ? 1 : 2;\n }\n\n return Math.max(words, 2);\n }\n }\n\n // General number handling — each magnitude group adds words\n let remaining = absNum;\n\n if (remaining >= 1_000_000_000) {\n const billions = Math.floor(remaining / 1_000_000_000);\n words += estimateNumberWordCount(String(billions), billions);\n words += 1; // \"billion\"\n remaining %= 1_000_000_000;\n }\n\n if (remaining >= 1_000_000) {\n const millions = Math.floor(remaining / 1_000_000);\n words += estimateNumberWordCount(String(millions), millions);\n words += 1; // \"million\"\n remaining %= 1_000_000;\n }\n\n if (remaining >= 1_000) {\n const thousands = Math.floor(remaining / 1_000);\n words += estimateNumberWordCount(String(thousands), thousands);\n words += 1; // \"thousand\"\n remaining %= 1_000;\n }\n\n if (remaining >= 100) {\n words += 2; // digit + \"hundred\"\n remaining %= 100;\n }\n\n if (remaining >= 1) {\n if (remaining >= 20) {\n words += remaining % 10 === 0 ? 1 : 2;\n } else {\n words += 1; // 1–19\n }\n }\n\n return Math.max(words, 1);\n}\n\n/**\n * Count \"spoken word equivalents\" in a block of text,\n * expanding numbers and adding comma pauses.\n */\nexport function countSpokenWords(text: string): number {\n const tokens = text.split(/\\s+/).filter((w) => w.length > 0);\n let count = 0;\n\n for (const token of tokens) {\n // Strip punctuation only at token boundaries so internal punctuation\n // (e.g., decimals like \"3.14\" or digit-grouping commas \"1,000\") is preserved.\n const stripped = token.replace(/^[.,!?;:'\"()[\\]{}]+|[.,!?;:'\"()[\\]{}]+$/g, '');\n count += estimateSpokenWordCount(stripped);\n\n // Count only punctuation commas for pauses: exclude digit-grouping commas\n // (i.e., commas with digits on both sides, like in \"1,234\").\n let punctuationCommaCount = 0;\n for (let i = 0; i < token.length; i++) {\n if (token[i] === ',') {\n const prev = i > 0 ? token[i - 1] : '';\n const next = i < token.length - 1 ? token[i + 1] : '';\n const prevIsDigit = prev >= '0' && prev <= '9';\n const nextIsDigit = next >= '0' && next <= '9';\n if (!(prevIsDigit && nextIsDigit)) {\n punctuationCommaCount++;\n }\n }\n }\n count += punctuationCommaCount * COMMA_PAUSE_PENALTY;\n }\n\n return count;\n}\n\n/**\n * Estimate audio time at a character offset using word-proportion mapping.\n *\n * Given the full source text and a character position, returns the\n * estimated time (in seconds) at which that position would be spoken.\n *\n * @param text - Full source text\n * @param charOffset - Character offset to estimate timing for\n * @param totalDuration - Total audio duration in seconds\n * @returns Estimated time in seconds\n */\nexport function estimateTimeFromText(\n text: string,\n charOffset: number,\n totalDuration: number,\n): number {\n const textBefore = text.slice(0, charOffset);\n const spokenWordsBefore = countSpokenWords(textBefore);\n const totalSpokenWords = countSpokenWords(text);\n\n if (totalSpokenWords === 0) return 0;\n return (spokenWordsBefore / totalSpokenWords) * totalDuration;\n}\n\n/**\n * Estimate how long a spoken prefix adds to audio duration.\n *\n * When audio includes a spoken title or header before the main content,\n * this calculates the extra duration to offset timing calculations.\n *\n * @param prefix - Prefix text (e.g., an article title spoken before the body)\n * @param wordsPerSecond - Speaking rate (default: 2.5)\n * @returns Estimated duration in seconds\n */\nexport function calculatePrefixDuration(\n prefix: string,\n wordsPerSecond: number = DEFAULT_WORDS_PER_SECOND,\n): number {\n if (!prefix) return 0;\n\n const words = prefix.split(/\\s+/).filter((w) => w.length > 0);\n const newlineCount = (prefix.match(/\\n\\n/g) || []).length;\n const pauseTime = newlineCount * 0.5;\n\n return words.length / wordsPerSecond + pauseTime;\n}\n\n/**\n * Estimate narration duration for a block of text.\n *\n * @param text - The text to estimate\n * @param wordsPerSecond - Speaking rate (default: 2.5, i.e. ~150 WPM)\n * @returns Duration in seconds\n */\nexport function estimateNarrationDuration(\n text: string,\n wordsPerSecond: number = DEFAULT_WORDS_PER_SECOND,\n): number {\n const spokenWords = countSpokenWords(text);\n return spokenWords / wordsPerSecond;\n}\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AACpC,cAAM,OAAO,IAAI,MAAM,SAAS,IAAI,MAAM,IAAI,CAAC,IAAI;AACnD,cAAM,cAAc,QAAQ,OAAO,QAAQ;AAC3C,cAAM,cAAc,QAAQ,OAAO,QAAQ;AAC3C,YAAI,EAAE,eAAe,cAAc;AACjC;AAAA,QACF;AAAA,MACF;AAAA,IACF;AACA,aAAS,wBAAwB;AAAA,EACnC;AAEA,SAAO;AACT;AAaO,SAAS,qBACd,MACA,YACA,eACQ;AACR,QAAM,aAAa,KAAK,MAAM,GAAG,UAAU;AAC3C,QAAM,oBAAoB,iBAAiB,UAAU;AACrD,QAAM,mBAAmB,iBAAiB,IAAI;AAE9C,MAAI,qBAAqB,EAAG,QAAO;AACnC,SAAQ,oBAAoB,mBAAoB;AAClD;AAYO,SAAS,wBACd,QACA,iBAAyB,0BACjB;AACR,MAAI,CAAC,OAAQ,QAAO;AAEpB,QAAM,QAAQ,OAAO,MAAM,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC;AAC5D,QAAM,gBAAgB,OAAO,MAAM,OAAO,KAAK,CAAC,GAAG;AACnD,QAAM,YAAY,eAAe;AAEjC,SAAO,MAAM,SAAS,iBAAiB;AACzC;AASO,SAAS,0BACd,MACA,iBAAyB,0BACjB;AACR,QAAM,cAAc,iBAAiB,IAAI;AACzC,SAAO,cAAc;AACvB;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/timing/readingTime.ts"],"sourcesContent":["/**\n * Reading time estimation.\n *\n * Estimates how long it takes to read text silently vs. narrate it aloud.\n * Uses configurable words-per-minute rates.\n */\n\nimport { countSpokenWords, DEFAULT_WORDS_PER_SECOND } from './narrationTiming.js';\n\n/** Default silent reading rate (adults average ~200–250 WPM). */\nconst DEFAULT_READING_WPM = 200;\n\n/** Result of a reading-time estimate. */\nexport interface ReadingTimeEstimate {\n /** Number of words (plain word count, not spoken equivalents). */\n words: number;\n /** Estimated minutes (decimal). */\n minutes: number;\n /** Estimated seconds (rounded). */\n seconds: number;\n}\n\n/** Options for reading-time estimation. */\nexport interface ReadingTimeOptions {\n /** Words per minute for silent reading (default: 200). */\n wordsPerMinute?: number;\n}\n\n/**\n * Estimate silent reading time for a block of text.\n *\n * @param text - The text to estimate\n * @param options - Optional configuration\n * @returns Word count + time estimate\n */\nexport function estimateReadingTime(\n text: string,\n options?: ReadingTimeOptions,\n): ReadingTimeEstimate {\n const configuredWpm = options?.wordsPerMinute;\n const wpm =\n typeof configuredWpm === 'number' && configuredWpm > 0 ? configuredWpm : DEFAULT_READING_WPM;\n const words = text.split(/\\s+/).filter((w) => w.length > 0).length;\n const minutes = words / wpm;\n\n return {\n words,\n minutes,\n seconds: Math.round(minutes * 60),\n };\n}\n\n/** Result of a narration-time estimate. */\nexport interface NarrationTimeEstimate {\n /** Spoken word equivalents (numbers expanded, comma pauses added). */\n spokenWords: number;\n /** Estimated minutes (decimal). */\n minutes: number;\n /** Estimated seconds (rounded). */\n seconds: number;\n}\n\n/** Options for narration-time estimation. */\nexport interface NarrationTimeOptions {\n /** Words per second for narration (default: 2.5 ≈ 150 WPM). */\n wordsPerSecond?: number;\n}\n\n/**\n * Estimate narration (spoken) time for a block of text.\n *\n * Unlike silent reading, this accounts for numbers being spoken as\n * multiple words and pauses at commas.\n *\n * @param text - The text to estimate\n * @param options - Optional configuration\n * @returns Spoken word equivalents + time estimate\n */\nexport function estimateNarrationTime(\n text: string,\n options?: NarrationTimeOptions,\n): NarrationTimeEstimate {\n const providedWps = options?.wordsPerSecond;\n const wps =\n typeof providedWps === 'number' && providedWps > 0 ? providedWps : DEFAULT_WORDS_PER_SECOND;\n const spokenWords = countSpokenWords(text);\n const totalSeconds = spokenWords / wps;\n\n return {\n spokenWords,\n minutes: totalSeconds / 60,\n seconds: Math.round(totalSeconds),\n };\n}\n"],"mappings":";;;;;;AAUA,IAAM,sBAAsB;AAyBrB,SAAS,oBACd,MACA,SACqB;AACrB,QAAM,gBAAgB,SAAS;AAC/B,QAAM,MACJ,OAAO,kBAAkB,YAAY,gBAAgB,IAAI,gBAAgB;AAC3E,QAAM,QAAQ,KAAK,MAAM,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE;AAC5D,QAAM,UAAU,QAAQ;AAExB,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,SAAS,KAAK,MAAM,UAAU,EAAE;AAAA,EAClC;AACF;AA4BO,SAAS,sBACd,MACA,SACuB;AACvB,QAAM,cAAc,SAAS;AAC7B,QAAM,MACJ,OAAO,gBAAgB,YAAY,cAAc,IAAI,cAAc;AACrE,QAAM,cAAc,iBAAiB,IAAI;AACzC,QAAM,eAAe,cAAc;AAEnC,SAAO;AAAA,IACL;AAAA,IACA,SAAS,eAAe;AAAA,IACxB,SAAS,KAAK,MAAM,YAAY;AAAA,EAClC;AACF;","names":[]}