@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.
- package/dist/{Doc-Ch4tc3vv.d.ts → Doc-BeSeH2iX.d.ts} +118 -41
- package/dist/ImageEditDoc-BTIvw0oq.d.ts +84 -0
- package/dist/{chunk-CYQHG27J.js → chunk-2TMAWB4Y.js} +74 -1
- package/dist/chunk-2TMAWB4Y.js.map +1 -0
- package/dist/{chunk-OASJKWO5.js → chunk-3K5OG6KI.js} +92 -7
- package/dist/chunk-3K5OG6KI.js.map +1 -0
- package/dist/chunk-57CVQCFX.js +193 -0
- package/dist/chunk-57CVQCFX.js.map +1 -0
- package/dist/{chunk-QM5PKNPW.js → chunk-5WFRKURX.js} +1 -1
- package/dist/chunk-5WFRKURX.js.map +1 -0
- package/dist/chunk-B4EEON3N.js +1317 -0
- package/dist/chunk-B4EEON3N.js.map +1 -0
- package/dist/chunk-DBS6RIFL.js +81 -0
- package/dist/chunk-DBS6RIFL.js.map +1 -0
- package/dist/{chunk-MIBRIRGJ.js → chunk-FR2RBTKO.js} +3 -3
- package/dist/{chunk-MIBRIRGJ.js.map → chunk-FR2RBTKO.js.map} +1 -1
- package/dist/chunk-H3AXU4MJ.js +179 -0
- package/dist/chunk-H3AXU4MJ.js.map +1 -0
- package/dist/chunk-JELIRVDP.js +24 -0
- package/dist/chunk-JELIRVDP.js.map +1 -0
- package/dist/chunk-K32VJONL.js +193 -0
- package/dist/chunk-K32VJONL.js.map +1 -0
- package/dist/{chunk-6BAVXFYC.js → chunk-KSWJR66U.js} +218 -42
- package/dist/chunk-KSWJR66U.js.map +1 -0
- package/dist/{chunk-TSG2OSE6.js → chunk-MYIH7FWD.js} +3 -3
- package/dist/chunk-MYIH7FWD.js.map +1 -0
- package/dist/chunk-VLJJHDAC.js +218 -0
- package/dist/chunk-VLJJHDAC.js.map +1 -0
- package/dist/chunk-WMOI7FN3.js +182 -0
- package/dist/chunk-WMOI7FN3.js.map +1 -0
- package/dist/chunk-ZTX4PFFT.js +520 -0
- package/dist/chunk-ZTX4PFFT.js.map +1 -0
- package/dist/doc/index.d.ts +5 -10
- package/dist/doc/index.js +145 -7
- package/dist/doc/index.js.map +1 -1
- package/dist/generate/index.d.ts +99 -7
- package/dist/generate/index.js +16 -3
- package/dist/generate/index.js.map +1 -1
- package/dist/icons/index.d.ts +87 -0
- package/dist/icons/index.js +17 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/imageEdit/index.d.ts +216 -0
- package/dist/imageEdit/index.js +54 -0
- package/dist/imageEdit/index.js.map +1 -0
- package/dist/index.d.ts +21 -9
- package/dist/index.js +461 -8
- package/dist/index.js.map +1 -1
- package/dist/jsonForm/index.d.ts +191 -0
- package/dist/jsonForm/index.js +27 -0
- package/dist/jsonForm/index.js.map +1 -0
- package/dist/markdown/index.d.ts +265 -19
- package/dist/markdown/index.js +39 -33
- package/dist/markdown/index.js.map +1 -1
- package/dist/random/index.d.ts +51 -2
- package/dist/random/index.js +9 -1
- package/dist/random/index.js.map +1 -1
- package/dist/recommend/index.d.ts +42 -0
- package/dist/recommend/index.js +10 -0
- package/dist/recommend/index.js.map +1 -0
- package/dist/schemas/index.d.ts +188 -10
- package/dist/schemas/index.js +120 -7
- package/dist/schemas/index.js.map +1 -1
- package/dist/spatial/index.d.ts +111 -3
- package/dist/spatial/index.js +24 -2
- package/dist/spatial/index.js.map +1 -1
- package/dist/storage/index.d.ts +159 -9
- package/dist/storage/index.js +20 -5
- package/dist/storage/index.js.map +1 -1
- package/dist/story/index.d.ts +53 -13
- package/dist/story/index.js +12 -4
- package/dist/themeLibrary-BHjJ0Qx6.d.ts +40 -0
- package/dist/timing/index.d.ts +109 -4
- package/dist/timing/index.js +23 -2
- package/dist/timing/index.js.map +1 -1
- package/dist/transform/index.d.ts +175 -6
- package/dist/transform/index.js +490 -3
- package/dist/transform/index.js.map +1 -1
- package/dist/{types-CkNttVSF.d.ts → types-BdZkdJ3z.d.ts} +17 -2
- package/dist/types-D98li1gV.d.ts +93 -0
- package/dist/versions/index.d.ts +128 -0
- package/dist/versions/index.js +35 -0
- package/dist/versions/index.js.map +1 -0
- package/package.json +28 -1
- package/src/__tests__/colorUtils.test.ts +112 -0
- package/src/__tests__/getLayers.test.ts +32 -7
- package/src/__tests__/iconResolve.test.ts +122 -0
- package/src/__tests__/imageEditState.test.ts +74 -0
- package/src/__tests__/imageEditVersions.test.ts +169 -0
- package/src/__tests__/inferDocumentTitle.test.ts +50 -0
- package/src/__tests__/jsonForm.chooseControl.test.ts +86 -0
- package/src/__tests__/jsonForm.evaluateWhen.test.ts +59 -0
- package/src/__tests__/jsonForm.inferSchema.test.ts +25 -0
- package/src/__tests__/jsonForm.pointer.test.ts +103 -0
- package/src/__tests__/markdownIcons.test.ts +104 -0
- package/src/__tests__/markdownToDoc.test.ts +19 -4
- package/src/__tests__/recommendTemplates.test.ts +183 -0
- package/src/__tests__/scopedContentContainer.test.ts +89 -0
- package/src/__tests__/slideshowGenerator.test.ts +1 -1
- package/src/__tests__/templateAnnotationParse.test.ts +42 -0
- package/src/__tests__/templates.test.ts +93 -9
- package/src/__tests__/themeCompile.test.ts +156 -0
- package/src/__tests__/themeValidator.test.ts +125 -0
- package/src/__tests__/versions.test.ts +415 -0
- package/src/doc/audioMapping.ts +55 -11
- package/src/doc/getLayers.ts +32 -21
- package/src/doc/markdownToDoc.ts +45 -7
- package/src/doc/templates/featureBlock.ts +202 -0
- package/src/doc/templates/fullBleedQuote.ts +13 -0
- package/src/doc/templates/index.ts +50 -16
- package/src/doc/templates/listBlock.ts +24 -5
- package/src/doc/templates/statHighlight.ts +13 -0
- package/src/doc/templates/titleBlock.ts +9 -0
- package/src/doc/utils/themeUtils.ts +8 -7
- package/src/generate/slideshowGenerator.ts +1 -1
- package/src/generate/templateMapper.ts +2 -2
- package/src/icons/iconData.ts +31 -0
- package/src/icons/index.ts +18 -0
- package/src/icons/resolve.ts +139 -0
- package/src/imageEdit/ImageEditVersionManager.ts +73 -0
- package/src/imageEdit/export.ts +326 -0
- package/src/imageEdit/index.ts +71 -0
- package/src/imageEdit/persistence.ts +62 -0
- package/src/imageEdit/state.ts +112 -0
- package/src/imageEdit/versionPaths.ts +57 -0
- package/src/imageEdit/versions.ts +231 -0
- package/src/index.ts +4 -0
- package/src/jsonForm/chooseControl.ts +88 -0
- package/src/jsonForm/evaluateWhen.ts +59 -0
- package/src/jsonForm/index.ts +22 -0
- package/src/jsonForm/inferSchema.ts +25 -0
- package/src/jsonForm/pointer.ts +109 -0
- package/src/jsonForm/types.ts +167 -0
- package/src/markdown/convert.ts +145 -5
- package/src/markdown/index.ts +3 -0
- package/src/markdown/types.ts +19 -2
- package/src/markdown/utils.ts +159 -0
- package/src/recommend/index.ts +16 -0
- package/src/recommend/templates.ts +273 -0
- package/src/schemas/BlockTemplates.ts +50 -7
- package/src/schemas/ImageEditDoc.ts +95 -0
- package/src/schemas/Theme.ts +98 -31
- package/src/schemas/colorUtils.ts +186 -0
- package/src/schemas/fontStacks.ts +257 -0
- package/src/schemas/index.ts +12 -0
- package/src/schemas/themeCompile.ts +203 -0
- package/src/schemas/themeLibrary.ts +18 -597
- package/src/schemas/themeValidator.ts +388 -0
- package/src/schemas/themes/bold.json +48 -0
- package/src/schemas/themes/cinematic.json +54 -0
- package/src/schemas/themes/documentary.json +49 -0
- package/src/schemas/themes/gezellig.json +44 -0
- package/src/schemas/themes/index.ts +53 -0
- package/src/schemas/themes/magazine.json +44 -0
- package/src/schemas/themes/minimalist.json +45 -0
- package/src/schemas/themes/morning-light.json +42 -0
- package/src/schemas/themes/standard-dark.json +50 -0
- package/src/schemas/themes/standard.json +42 -0
- package/src/schemas/themes/tech-dark.json +48 -0
- package/src/schemas/themes/warm-earth.json +50 -0
- package/src/storage/ScopedContentContainer.ts +113 -0
- package/src/storage/index.ts +1 -0
- package/src/versions/DocumentVersionManager.ts +70 -0
- package/src/versions/index.ts +54 -0
- package/src/versions/operations.ts +230 -0
- package/src/versions/paths.ts +66 -0
- package/src/versions/timestamp.ts +48 -0
- package/src/versions/types.ts +91 -0
- package/dist/__tests__/animationUtils.test.d.ts +0 -2
- package/dist/__tests__/animationUtils.test.d.ts.map +0 -1
- package/dist/__tests__/animationUtils.test.js +0 -60
- package/dist/__tests__/animationUtils.test.js.map +0 -1
- package/dist/__tests__/contentContainer.test.d.ts +0 -2
- package/dist/__tests__/contentContainer.test.d.ts.map +0 -1
- package/dist/__tests__/contentContainer.test.js +0 -234
- package/dist/__tests__/contentContainer.test.js.map +0 -1
- package/dist/__tests__/contentExtractor.test.d.ts +0 -2
- package/dist/__tests__/contentExtractor.test.d.ts.map +0 -1
- package/dist/__tests__/contentExtractor.test.js +0 -151
- package/dist/__tests__/contentExtractor.test.js.map +0 -1
- package/dist/__tests__/coverBlock.test.d.ts +0 -2
- package/dist/__tests__/coverBlock.test.d.ts.map +0 -1
- package/dist/__tests__/coverBlock.test.js +0 -197
- package/dist/__tests__/coverBlock.test.js.map +0 -1
- package/dist/__tests__/dataTable.test.d.ts +0 -2
- package/dist/__tests__/dataTable.test.d.ts.map +0 -1
- package/dist/__tests__/dataTable.test.js +0 -110
- package/dist/__tests__/dataTable.test.js.map +0 -1
- package/dist/__tests__/geohash.test.d.ts +0 -2
- package/dist/__tests__/geohash.test.d.ts.map +0 -1
- package/dist/__tests__/geohash.test.js +0 -87
- package/dist/__tests__/geohash.test.js.map +0 -1
- package/dist/__tests__/getLayers.test.d.ts +0 -2
- package/dist/__tests__/getLayers.test.d.ts.map +0 -1
- package/dist/__tests__/getLayers.test.js +0 -167
- package/dist/__tests__/getLayers.test.js.map +0 -1
- package/dist/__tests__/haversine.test.d.ts +0 -2
- package/dist/__tests__/haversine.test.d.ts.map +0 -1
- package/dist/__tests__/haversine.test.js +0 -56
- package/dist/__tests__/haversine.test.js.map +0 -1
- package/dist/__tests__/localForageAdapter.test.d.ts +0 -8
- package/dist/__tests__/localForageAdapter.test.d.ts.map +0 -1
- package/dist/__tests__/localForageAdapter.test.js +0 -130
- package/dist/__tests__/localForageAdapter.test.js.map +0 -1
- package/dist/__tests__/markdown.test.d.ts +0 -2
- package/dist/__tests__/markdown.test.d.ts.map +0 -1
- package/dist/__tests__/markdown.test.js +0 -715
- package/dist/__tests__/markdown.test.js.map +0 -1
- package/dist/__tests__/markdownToDoc.test.d.ts +0 -2
- package/dist/__tests__/markdownToDoc.test.d.ts.map +0 -1
- package/dist/__tests__/markdownToDoc.test.js +0 -447
- package/dist/__tests__/markdownToDoc.test.js.map +0 -1
- package/dist/__tests__/seededRandom.test.d.ts +0 -2
- package/dist/__tests__/seededRandom.test.d.ts.map +0 -1
- package/dist/__tests__/seededRandom.test.js +0 -125
- package/dist/__tests__/seededRandom.test.js.map +0 -1
- package/dist/__tests__/slideshowGenerator.test.d.ts +0 -2
- package/dist/__tests__/slideshowGenerator.test.d.ts.map +0 -1
- package/dist/__tests__/slideshowGenerator.test.js +0 -114
- package/dist/__tests__/slideshowGenerator.test.js.map +0 -1
- package/dist/__tests__/storage.test.d.ts +0 -2
- package/dist/__tests__/storage.test.d.ts.map +0 -1
- package/dist/__tests__/storage.test.js +0 -51
- package/dist/__tests__/storage.test.js.map +0 -1
- package/dist/__tests__/surface.test.d.ts +0 -2
- package/dist/__tests__/surface.test.d.ts.map +0 -1
- package/dist/__tests__/surface.test.js +0 -57
- package/dist/__tests__/surface.test.js.map +0 -1
- package/dist/__tests__/templates.test.d.ts +0 -2
- package/dist/__tests__/templates.test.d.ts.map +0 -1
- package/dist/__tests__/templates.test.js +0 -217
- package/dist/__tests__/templates.test.js.map +0 -1
- package/dist/__tests__/timing.test.d.ts +0 -2
- package/dist/__tests__/timing.test.d.ts.map +0 -1
- package/dist/__tests__/timing.test.js +0 -131
- package/dist/__tests__/timing.test.js.map +0 -1
- package/dist/chunk-6BAVXFYC.js.map +0 -1
- package/dist/chunk-7GF6RDED.js +0 -82
- package/dist/chunk-7GF6RDED.js.map +0 -1
- package/dist/chunk-CYQHG27J.js.map +0 -1
- package/dist/chunk-F22AE6BY.js +0 -121
- package/dist/chunk-F22AE6BY.js.map +0 -1
- package/dist/chunk-FIQR4AJG.js +0 -517
- package/dist/chunk-FIQR4AJG.js.map +0 -1
- package/dist/chunk-OASJKWO5.js.map +0 -1
- package/dist/chunk-QM5PKNPW.js.map +0 -1
- package/dist/chunk-TSG2OSE6.js.map +0 -1
- package/dist/doc/audioMapping.d.ts +0 -36
- package/dist/doc/audioMapping.d.ts.map +0 -1
- package/dist/doc/audioMapping.js +0 -315
- package/dist/doc/audioMapping.js.map +0 -1
- package/dist/doc/docToMarkdown.d.ts +0 -41
- package/dist/doc/docToMarkdown.d.ts.map +0 -1
- package/dist/doc/docToMarkdown.js +0 -88
- package/dist/doc/docToMarkdown.js.map +0 -1
- package/dist/doc/getLayers.d.ts +0 -65
- package/dist/doc/getLayers.d.ts.map +0 -1
- package/dist/doc/getLayers.js +0 -103
- package/dist/doc/getLayers.js.map +0 -1
- package/dist/doc/index.d.ts.map +0 -1
- package/dist/doc/markdownToDoc.d.ts +0 -75
- package/dist/doc/markdownToDoc.d.ts.map +0 -1
- package/dist/doc/markdownToDoc.js +0 -398
- package/dist/doc/markdownToDoc.js.map +0 -1
- package/dist/doc/templates/accentImage.d.ts +0 -59
- package/dist/doc/templates/accentImage.d.ts.map +0 -1
- package/dist/doc/templates/accentImage.js +0 -275
- package/dist/doc/templates/accentImage.js.map +0 -1
- package/dist/doc/templates/captionUtils.d.ts +0 -20
- package/dist/doc/templates/captionUtils.d.ts.map +0 -1
- package/dist/doc/templates/captionUtils.js +0 -29
- package/dist/doc/templates/captionUtils.js.map +0 -1
- package/dist/doc/templates/comparisonBar.d.ts +0 -13
- package/dist/doc/templates/comparisonBar.d.ts.map +0 -1
- package/dist/doc/templates/comparisonBar.js +0 -145
- package/dist/doc/templates/comparisonBar.js.map +0 -1
- package/dist/doc/templates/coverBlock.d.ts +0 -51
- package/dist/doc/templates/coverBlock.d.ts.map +0 -1
- package/dist/doc/templates/coverBlock.js +0 -153
- package/dist/doc/templates/coverBlock.js.map +0 -1
- package/dist/doc/templates/dataTable.d.ts +0 -14
- package/dist/doc/templates/dataTable.d.ts.map +0 -1
- package/dist/doc/templates/dataTable.js +0 -73
- package/dist/doc/templates/dataTable.js.map +0 -1
- package/dist/doc/templates/dateEvent.d.ts +0 -15
- package/dist/doc/templates/dateEvent.d.ts.map +0 -1
- package/dist/doc/templates/dateEvent.js +0 -114
- package/dist/doc/templates/dateEvent.js.map +0 -1
- package/dist/doc/templates/definitionCard.d.ts +0 -13
- package/dist/doc/templates/definitionCard.d.ts.map +0 -1
- package/dist/doc/templates/definitionCard.js +0 -117
- package/dist/doc/templates/definitionCard.js.map +0 -1
- package/dist/doc/templates/factCard.d.ts +0 -15
- package/dist/doc/templates/factCard.d.ts.map +0 -1
- package/dist/doc/templates/factCard.js +0 -104
- package/dist/doc/templates/factCard.js.map +0 -1
- package/dist/doc/templates/fullBleedQuote.d.ts +0 -13
- package/dist/doc/templates/fullBleedQuote.d.ts.map +0 -1
- package/dist/doc/templates/fullBleedQuote.js +0 -55
- package/dist/doc/templates/fullBleedQuote.js.map +0 -1
- package/dist/doc/templates/imageWithCaption.d.ts +0 -13
- package/dist/doc/templates/imageWithCaption.d.ts.map +0 -1
- package/dist/doc/templates/imageWithCaption.js +0 -146
- package/dist/doc/templates/imageWithCaption.js.map +0 -1
- package/dist/doc/templates/index.d.ts +0 -105
- package/dist/doc/templates/index.d.ts.map +0 -1
- package/dist/doc/templates/index.js +0 -445
- package/dist/doc/templates/index.js.map +0 -1
- package/dist/doc/templates/listBlock.d.ts +0 -13
- package/dist/doc/templates/listBlock.d.ts.map +0 -1
- package/dist/doc/templates/listBlock.js +0 -92
- package/dist/doc/templates/listBlock.js.map +0 -1
- package/dist/doc/templates/mapBlock.d.ts +0 -17
- package/dist/doc/templates/mapBlock.d.ts.map +0 -1
- package/dist/doc/templates/mapBlock.js +0 -115
- package/dist/doc/templates/mapBlock.js.map +0 -1
- package/dist/doc/templates/persistentLayers.d.ts +0 -39
- package/dist/doc/templates/persistentLayers.d.ts.map +0 -1
- package/dist/doc/templates/persistentLayers.js +0 -447
- package/dist/doc/templates/persistentLayers.js.map +0 -1
- package/dist/doc/templates/photoGrid.d.ts +0 -20
- package/dist/doc/templates/photoGrid.d.ts.map +0 -1
- package/dist/doc/templates/photoGrid.js +0 -175
- package/dist/doc/templates/photoGrid.js.map +0 -1
- package/dist/doc/templates/pullQuote.d.ts +0 -13
- package/dist/doc/templates/pullQuote.d.ts.map +0 -1
- package/dist/doc/templates/pullQuote.js +0 -113
- package/dist/doc/templates/pullQuote.js.map +0 -1
- package/dist/doc/templates/quoteBlock.d.ts +0 -15
- package/dist/doc/templates/quoteBlock.d.ts.map +0 -1
- package/dist/doc/templates/quoteBlock.js +0 -101
- package/dist/doc/templates/quoteBlock.js.map +0 -1
- package/dist/doc/templates/sectionHeader.d.ts +0 -14
- package/dist/doc/templates/sectionHeader.d.ts.map +0 -1
- package/dist/doc/templates/sectionHeader.js +0 -97
- package/dist/doc/templates/sectionHeader.js.map +0 -1
- package/dist/doc/templates/statHighlight.d.ts +0 -15
- package/dist/doc/templates/statHighlight.d.ts.map +0 -1
- package/dist/doc/templates/statHighlight.js +0 -102
- package/dist/doc/templates/statHighlight.js.map +0 -1
- package/dist/doc/templates/titleBlock.d.ts +0 -13
- package/dist/doc/templates/titleBlock.d.ts.map +0 -1
- package/dist/doc/templates/titleBlock.js +0 -95
- package/dist/doc/templates/titleBlock.js.map +0 -1
- package/dist/doc/templates/twoColumn.d.ts +0 -15
- package/dist/doc/templates/twoColumn.d.ts.map +0 -1
- package/dist/doc/templates/twoColumn.js +0 -225
- package/dist/doc/templates/twoColumn.js.map +0 -1
- package/dist/doc/templates/videoPullQuote.d.ts +0 -20
- package/dist/doc/templates/videoPullQuote.d.ts.map +0 -1
- package/dist/doc/templates/videoPullQuote.js +0 -122
- package/dist/doc/templates/videoPullQuote.js.map +0 -1
- package/dist/doc/templates/videoWithCaption.d.ts +0 -20
- package/dist/doc/templates/videoWithCaption.d.ts.map +0 -1
- package/dist/doc/templates/videoWithCaption.js +0 -107
- package/dist/doc/templates/videoWithCaption.js.map +0 -1
- package/dist/doc/utils/animationUtils.d.ts +0 -34
- package/dist/doc/utils/animationUtils.d.ts.map +0 -1
- package/dist/doc/utils/animationUtils.js +0 -110
- package/dist/doc/utils/animationUtils.js.map +0 -1
- package/dist/doc/utils/themeUtils.d.ts +0 -64
- package/dist/doc/utils/themeUtils.d.ts.map +0 -1
- package/dist/doc/utils/themeUtils.js +0 -135
- package/dist/doc/utils/themeUtils.js.map +0 -1
- package/dist/generate/contentExtractor.d.ts +0 -112
- package/dist/generate/contentExtractor.d.ts.map +0 -1
- package/dist/generate/contentExtractor.js +0 -638
- package/dist/generate/contentExtractor.js.map +0 -1
- package/dist/generate/index.d.ts.map +0 -1
- package/dist/generate/slideshowGenerator.d.ts +0 -72
- package/dist/generate/slideshowGenerator.d.ts.map +0 -1
- package/dist/generate/slideshowGenerator.js +0 -159
- package/dist/generate/slideshowGenerator.js.map +0 -1
- package/dist/generate/templateMapper.d.ts +0 -23
- package/dist/generate/templateMapper.d.ts.map +0 -1
- package/dist/generate/templateMapper.js +0 -114
- package/dist/generate/templateMapper.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/markdown/convert.d.ts +0 -71
- package/dist/markdown/convert.d.ts.map +0 -1
- package/dist/markdown/convert.js +0 -845
- package/dist/markdown/convert.js.map +0 -1
- package/dist/markdown/htmlParse.d.ts +0 -26
- package/dist/markdown/htmlParse.d.ts.map +0 -1
- package/dist/markdown/htmlParse.js +0 -195
- package/dist/markdown/htmlParse.js.map +0 -1
- package/dist/markdown/index.d.ts.map +0 -1
- package/dist/markdown/parse.d.ts +0 -27
- package/dist/markdown/parse.d.ts.map +0 -1
- package/dist/markdown/parse.js +0 -90
- package/dist/markdown/parse.js.map +0 -1
- package/dist/markdown/stringify.d.ts +0 -32
- package/dist/markdown/stringify.d.ts.map +0 -1
- package/dist/markdown/stringify.js +0 -108
- package/dist/markdown/stringify.js.map +0 -1
- package/dist/markdown/types.d.ts +0 -516
- package/dist/markdown/types.d.ts.map +0 -1
- package/dist/markdown/types.js +0 -17
- package/dist/markdown/types.js.map +0 -1
- package/dist/markdown/utils.d.ts +0 -78
- package/dist/markdown/utils.d.ts.map +0 -1
- package/dist/markdown/utils.js +0 -153
- package/dist/markdown/utils.js.map +0 -1
- package/dist/random/SeededRandom.d.ts +0 -50
- package/dist/random/SeededRandom.d.ts.map +0 -1
- package/dist/random/SeededRandom.js +0 -115
- package/dist/random/SeededRandom.js.map +0 -1
- package/dist/random/index.d.ts.map +0 -1
- package/dist/schemas/BlockTemplates.d.ts +0 -600
- package/dist/schemas/BlockTemplates.d.ts.map +0 -1
- package/dist/schemas/BlockTemplates.js +0 -72
- package/dist/schemas/BlockTemplates.js.map +0 -1
- package/dist/schemas/Doc.d.ts +0 -503
- package/dist/schemas/Doc.d.ts.map +0 -1
- package/dist/schemas/Doc.js +0 -90
- package/dist/schemas/Doc.js.map +0 -1
- package/dist/schemas/LayoutStrategy.d.ts +0 -84
- package/dist/schemas/LayoutStrategy.d.ts.map +0 -1
- package/dist/schemas/LayoutStrategy.js +0 -123
- package/dist/schemas/LayoutStrategy.js.map +0 -1
- package/dist/schemas/MediaProvider.d.ts +0 -65
- package/dist/schemas/MediaProvider.d.ts.map +0 -1
- package/dist/schemas/MediaProvider.js +0 -13
- package/dist/schemas/MediaProvider.js.map +0 -1
- package/dist/schemas/Theme.d.ts +0 -194
- package/dist/schemas/Theme.d.ts.map +0 -1
- package/dist/schemas/Theme.js +0 -97
- package/dist/schemas/Theme.js.map +0 -1
- package/dist/schemas/Types.d.ts +0 -14
- package/dist/schemas/Types.d.ts.map +0 -1
- package/dist/schemas/Types.js +0 -5
- package/dist/schemas/Types.js.map +0 -1
- package/dist/schemas/Viewport.d.ts +0 -74
- package/dist/schemas/Viewport.d.ts.map +0 -1
- package/dist/schemas/Viewport.js +0 -63
- package/dist/schemas/Viewport.js.map +0 -1
- package/dist/schemas/index.d.ts.map +0 -1
- package/dist/schemas/themeLibrary.d.ts +0 -41
- package/dist/schemas/themeLibrary.d.ts.map +0 -1
- package/dist/schemas/themeLibrary.js +0 -597
- package/dist/schemas/themeLibrary.js.map +0 -1
- package/dist/spatial/Geohash.d.ts +0 -85
- package/dist/spatial/Geohash.d.ts.map +0 -1
- package/dist/spatial/Geohash.js +0 -142
- package/dist/spatial/Geohash.js.map +0 -1
- package/dist/spatial/Haversine.d.ts +0 -24
- package/dist/spatial/Haversine.d.ts.map +0 -1
- package/dist/spatial/Haversine.js +0 -48
- package/dist/spatial/Haversine.js.map +0 -1
- package/dist/spatial/index.d.ts.map +0 -1
- package/dist/storage/ContentContainer.d.ts +0 -87
- package/dist/storage/ContentContainer.d.ts.map +0 -1
- package/dist/storage/ContentContainer.js +0 -131
- package/dist/storage/ContentContainer.js.map +0 -1
- package/dist/storage/LocalForageAdapter.d.ts +0 -36
- package/dist/storage/LocalForageAdapter.d.ts.map +0 -1
- package/dist/storage/LocalForageAdapter.js +0 -82
- package/dist/storage/LocalForageAdapter.js.map +0 -1
- package/dist/storage/LocalStorageAdapter.d.ts +0 -16
- package/dist/storage/LocalStorageAdapter.d.ts.map +0 -1
- package/dist/storage/LocalStorageAdapter.js +0 -50
- package/dist/storage/LocalStorageAdapter.js.map +0 -1
- package/dist/storage/MediaProviderFromContainer.d.ts +0 -21
- package/dist/storage/MediaProviderFromContainer.d.ts.map +0 -1
- package/dist/storage/MediaProviderFromContainer.js +0 -79
- package/dist/storage/MediaProviderFromContainer.js.map +0 -1
- package/dist/storage/MemoryStorageAdapter.d.ts +0 -15
- package/dist/storage/MemoryStorageAdapter.d.ts.map +0 -1
- package/dist/storage/MemoryStorageAdapter.js +0 -34
- package/dist/storage/MemoryStorageAdapter.js.map +0 -1
- package/dist/storage/Storage.d.ts +0 -23
- package/dist/storage/Storage.d.ts.map +0 -1
- package/dist/storage/Storage.js +0 -9
- package/dist/storage/Storage.js.map +0 -1
- package/dist/storage/index.d.ts.map +0 -1
- package/dist/themeLibrary-CEo2D4b6.d.ts +0 -44
- package/dist/timing/index.d.ts.map +0 -1
- package/dist/timing/narrationTiming.d.ts +0 -54
- package/dist/timing/narrationTiming.d.ts.map +0 -1
- package/dist/timing/narrationTiming.js +0 -190
- package/dist/timing/narrationTiming.js.map +0 -1
- package/dist/timing/readingTime.d.ts +0 -54
- package/dist/timing/readingTime.d.ts.map +0 -1
- package/dist/timing/readingTime.js +0 -49
- package/dist/timing/readingTime.js.map +0 -1
- package/dist/transform/applyTransform.d.ts +0 -22
- package/dist/transform/applyTransform.d.ts.map +0 -1
- package/dist/transform/applyTransform.js +0 -68
- package/dist/transform/applyTransform.js.map +0 -1
- package/dist/transform/blockAnalyzer.d.ts +0 -48
- package/dist/transform/blockAnalyzer.d.ts.map +0 -1
- package/dist/transform/blockAnalyzer.js +0 -135
- package/dist/transform/blockAnalyzer.js.map +0 -1
- package/dist/transform/index.d.ts.map +0 -1
- package/dist/transform/registry.d.ts +0 -19
- package/dist/transform/registry.d.ts.map +0 -1
- package/dist/transform/registry.js +0 -41
- package/dist/transform/registry.js.map +0 -1
- package/dist/transform/styles/dataDriven.d.ts +0 -4
- package/dist/transform/styles/dataDriven.d.ts.map +0 -1
- package/dist/transform/styles/dataDriven.js +0 -15
- package/dist/transform/styles/dataDriven.js.map +0 -1
- package/dist/transform/styles/documentary.d.ts +0 -4
- package/dist/transform/styles/documentary.d.ts.map +0 -1
- package/dist/transform/styles/documentary.js +0 -15
- package/dist/transform/styles/documentary.js.map +0 -1
- package/dist/transform/styles/index.d.ts +0 -6
- package/dist/transform/styles/index.d.ts.map +0 -1
- package/dist/transform/styles/index.js +0 -6
- package/dist/transform/styles/index.js.map +0 -1
- package/dist/transform/styles/magazine.d.ts +0 -4
- package/dist/transform/styles/magazine.d.ts.map +0 -1
- package/dist/transform/styles/magazine.js +0 -15
- package/dist/transform/styles/magazine.js.map +0 -1
- package/dist/transform/styles/minimal.d.ts +0 -4
- package/dist/transform/styles/minimal.d.ts.map +0 -1
- package/dist/transform/styles/minimal.js +0 -15
- package/dist/transform/styles/minimal.js.map +0 -1
- package/dist/transform/styles/narrative.d.ts +0 -4
- package/dist/transform/styles/narrative.d.ts.map +0 -1
- package/dist/transform/styles/narrative.js +0 -15
- package/dist/transform/styles/narrative.js.map +0 -1
- package/dist/transform/templateSelector.d.ts +0 -30
- package/dist/transform/templateSelector.d.ts.map +0 -1
- package/dist/transform/templateSelector.js +0 -218
- package/dist/transform/templateSelector.js.map +0 -1
- package/dist/transform/timingAllocator.d.ts +0 -21
- package/dist/transform/timingAllocator.d.ts.map +0 -1
- package/dist/transform/timingAllocator.js +0 -111
- package/dist/transform/timingAllocator.js.map +0 -1
- package/dist/transform/types.d.ts +0 -86
- package/dist/transform/types.d.ts.map +0 -1
- package/dist/transform/types.js +0 -9
- package/dist/transform/types.js.map +0 -1
|
@@ -1,190 +0,0 @@
|
|
|
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
|
-
/** Numbers are spoken more slowly than regular words (1.3× multiplier). */
|
|
12
|
-
const NUMBER_SPEAKING_MULTIPLIER = 1.3;
|
|
13
|
-
/** Comma pause in "word equivalents" — speakers pause ~0.3 words at commas. */
|
|
14
|
-
const COMMA_PAUSE_PENALTY = 0.3;
|
|
15
|
-
/** Default speaking rate in words per second (~150 WPM). */
|
|
16
|
-
export const DEFAULT_WORDS_PER_SECOND = 2.5;
|
|
17
|
-
/**
|
|
18
|
-
* Estimate how many "spoken word equivalents" a single token represents.
|
|
19
|
-
* Numbers get expanded (e.g., "175,000" → ~5 words × 1.3 multiplier).
|
|
20
|
-
*/
|
|
21
|
-
export function estimateSpokenWordCount(token) {
|
|
22
|
-
const cleaned = token.replace(/,/g, '');
|
|
23
|
-
const num = parseFloat(cleaned);
|
|
24
|
-
if (isNaN(num) || !isFinite(num)) {
|
|
25
|
-
return 1; // Not a number — count as 1 word
|
|
26
|
-
}
|
|
27
|
-
return estimateNumberWordCount(cleaned, num) * NUMBER_SPEAKING_MULTIPLIER;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Raw word count for a number (before the speaking multiplier).
|
|
31
|
-
*/
|
|
32
|
-
function estimateNumberWordCount(cleaned, num) {
|
|
33
|
-
// Handle decimals: "3.14" → words("3") + "point" + 2 digits
|
|
34
|
-
if (cleaned.includes('.')) {
|
|
35
|
-
const [whole, decimal] = cleaned.split('.');
|
|
36
|
-
const wholeNum = parseFloat(whole) || 0;
|
|
37
|
-
return estimateNumberWordCount(whole, wholeNum) + 1 + decimal.length;
|
|
38
|
-
}
|
|
39
|
-
const absNum = Math.abs(num);
|
|
40
|
-
let words = num < 0 ? 1 : 0; // "negative" / "minus"
|
|
41
|
-
if (absNum === 0)
|
|
42
|
-
return 1; // "zero"
|
|
43
|
-
// Years (1000–2099) are spoken as two two-digit groups:
|
|
44
|
-
// "1910" → "nineteen ten", "2024" → "twenty twenty-four"
|
|
45
|
-
if (absNum >= 1000 && absNum <= 2099 && Number.isInteger(absNum)) {
|
|
46
|
-
const yearStr = absNum.toString();
|
|
47
|
-
if (yearStr.length === 4) {
|
|
48
|
-
const firstTwo = parseInt(yearStr.slice(0, 2));
|
|
49
|
-
const lastTwo = parseInt(yearStr.slice(2));
|
|
50
|
-
// First part
|
|
51
|
-
if (firstTwo >= 10 && firstTwo <= 19) {
|
|
52
|
-
words += 1;
|
|
53
|
-
}
|
|
54
|
-
else if (firstTwo >= 20 && firstTwo <= 99) {
|
|
55
|
-
words += firstTwo % 10 === 0 ? 1 : 2;
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
words += 2; // "two thousand"
|
|
59
|
-
}
|
|
60
|
-
// Second part
|
|
61
|
-
if (lastTwo === 0) {
|
|
62
|
-
if (firstTwo >= 10 && firstTwo <= 99 && firstTwo !== 20) {
|
|
63
|
-
words += 1; // "hundred"
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
else if (lastTwo >= 1 && lastTwo <= 9) {
|
|
67
|
-
words += 2; // "oh five"
|
|
68
|
-
}
|
|
69
|
-
else if (lastTwo >= 10 && lastTwo <= 19) {
|
|
70
|
-
words += 1;
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
words += lastTwo % 10 === 0 ? 1 : 2;
|
|
74
|
-
}
|
|
75
|
-
return Math.max(words, 2);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
// General number handling — each magnitude group adds words
|
|
79
|
-
let remaining = absNum;
|
|
80
|
-
if (remaining >= 1000000000) {
|
|
81
|
-
const billions = Math.floor(remaining / 1000000000);
|
|
82
|
-
words += estimateNumberWordCount(String(billions), billions);
|
|
83
|
-
words += 1; // "billion"
|
|
84
|
-
remaining %= 1000000000;
|
|
85
|
-
}
|
|
86
|
-
if (remaining >= 1000000) {
|
|
87
|
-
const millions = Math.floor(remaining / 1000000);
|
|
88
|
-
words += estimateNumberWordCount(String(millions), millions);
|
|
89
|
-
words += 1; // "million"
|
|
90
|
-
remaining %= 1000000;
|
|
91
|
-
}
|
|
92
|
-
if (remaining >= 1000) {
|
|
93
|
-
const thousands = Math.floor(remaining / 1000);
|
|
94
|
-
words += estimateNumberWordCount(String(thousands), thousands);
|
|
95
|
-
words += 1; // "thousand"
|
|
96
|
-
remaining %= 1000;
|
|
97
|
-
}
|
|
98
|
-
if (remaining >= 100) {
|
|
99
|
-
words += 2; // digit + "hundred"
|
|
100
|
-
remaining %= 100;
|
|
101
|
-
}
|
|
102
|
-
if (remaining >= 1) {
|
|
103
|
-
if (remaining >= 20) {
|
|
104
|
-
words += remaining % 10 === 0 ? 1 : 2;
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
words += 1; // 1–19
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return Math.max(words, 1);
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Count "spoken word equivalents" in a block of text,
|
|
114
|
-
* expanding numbers and adding comma pauses.
|
|
115
|
-
*/
|
|
116
|
-
export function countSpokenWords(text) {
|
|
117
|
-
const tokens = text.split(/\s+/).filter((w) => w.length > 0);
|
|
118
|
-
let count = 0;
|
|
119
|
-
for (const token of tokens) {
|
|
120
|
-
// Strip punctuation only at token boundaries so internal punctuation
|
|
121
|
-
// (e.g., decimals like "3.14" or digit-grouping commas "1,000") is preserved.
|
|
122
|
-
const stripped = token.replace(/^[.,!?;:'"()[\]{}]+|[.,!?;:'"()[\]{}]+$/g, '');
|
|
123
|
-
count += estimateSpokenWordCount(stripped);
|
|
124
|
-
// Count only punctuation commas for pauses: exclude digit-grouping commas
|
|
125
|
-
// (i.e., commas with digits on both sides, like in "1,234").
|
|
126
|
-
let punctuationCommaCount = 0;
|
|
127
|
-
for (let i = 0; i < token.length; i++) {
|
|
128
|
-
if (token[i] === ',') {
|
|
129
|
-
const prev = i > 0 ? token[i - 1] : '';
|
|
130
|
-
const next = i < token.length - 1 ? token[i + 1] : '';
|
|
131
|
-
const prevIsDigit = prev >= '0' && prev <= '9';
|
|
132
|
-
const nextIsDigit = next >= '0' && next <= '9';
|
|
133
|
-
if (!(prevIsDigit && nextIsDigit)) {
|
|
134
|
-
punctuationCommaCount++;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
count += punctuationCommaCount * COMMA_PAUSE_PENALTY;
|
|
139
|
-
}
|
|
140
|
-
return count;
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Estimate audio time at a character offset using word-proportion mapping.
|
|
144
|
-
*
|
|
145
|
-
* Given the full source text and a character position, returns the
|
|
146
|
-
* estimated time (in seconds) at which that position would be spoken.
|
|
147
|
-
*
|
|
148
|
-
* @param text - Full source text
|
|
149
|
-
* @param charOffset - Character offset to estimate timing for
|
|
150
|
-
* @param totalDuration - Total audio duration in seconds
|
|
151
|
-
* @returns Estimated time in seconds
|
|
152
|
-
*/
|
|
153
|
-
export function estimateTimeFromText(text, charOffset, totalDuration) {
|
|
154
|
-
const textBefore = text.slice(0, charOffset);
|
|
155
|
-
const spokenWordsBefore = countSpokenWords(textBefore);
|
|
156
|
-
const totalSpokenWords = countSpokenWords(text);
|
|
157
|
-
if (totalSpokenWords === 0)
|
|
158
|
-
return 0;
|
|
159
|
-
return (spokenWordsBefore / totalSpokenWords) * totalDuration;
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* Estimate how long a spoken prefix adds to audio duration.
|
|
163
|
-
*
|
|
164
|
-
* When audio includes a spoken title or header before the main content,
|
|
165
|
-
* this calculates the extra duration to offset timing calculations.
|
|
166
|
-
*
|
|
167
|
-
* @param prefix - Prefix text (e.g., an article title spoken before the body)
|
|
168
|
-
* @param wordsPerSecond - Speaking rate (default: 2.5)
|
|
169
|
-
* @returns Estimated duration in seconds
|
|
170
|
-
*/
|
|
171
|
-
export function calculatePrefixDuration(prefix, wordsPerSecond = DEFAULT_WORDS_PER_SECOND) {
|
|
172
|
-
if (!prefix)
|
|
173
|
-
return 0;
|
|
174
|
-
const words = prefix.split(/\s+/).filter((w) => w.length > 0);
|
|
175
|
-
const newlineCount = (prefix.match(/\n\n/g) || []).length;
|
|
176
|
-
const pauseTime = newlineCount * 0.5;
|
|
177
|
-
return words.length / wordsPerSecond + pauseTime;
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Estimate narration duration for a block of text.
|
|
181
|
-
*
|
|
182
|
-
* @param text - The text to estimate
|
|
183
|
-
* @param wordsPerSecond - Speaking rate (default: 2.5, i.e. ~150 WPM)
|
|
184
|
-
* @returns Duration in seconds
|
|
185
|
-
*/
|
|
186
|
-
export function estimateNarrationDuration(text, wordsPerSecond = DEFAULT_WORDS_PER_SECOND) {
|
|
187
|
-
const spokenWords = countSpokenWords(text);
|
|
188
|
-
return spokenWords / wordsPerSecond;
|
|
189
|
-
}
|
|
190
|
-
//# sourceMappingURL=narrationTiming.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"narrationTiming.js","sourceRoot":"","sources":["../../src/timing/narrationTiming.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,2EAA2E;AAC3E,MAAM,0BAA0B,GAAG,GAAG,CAAC;AAEvC,+EAA+E;AAC/E,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC,4DAA4D;AAC5D,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAE5C;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAAa;IACnD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACxC,MAAM,GAAG,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IAEhC,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACjC,OAAO,CAAC,CAAC,CAAC,iCAAiC;IAC7C,CAAC;IAED,OAAO,uBAAuB,CAAC,OAAO,EAAE,GAAG,CAAC,GAAG,0BAA0B,CAAC;AAC5E,CAAC;AAED;;GAEG;AACH,SAAS,uBAAuB,CAAC,OAAe,EAAE,GAAW;IAC3D,4DAA4D;IAC5D,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC1B,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC5C,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACxC,OAAO,uBAAuB,CAAC,KAAK,EAAE,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AAChE,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,uBAAuB,CACrC,MAAc,EACd,iBAAyB,wBAAwB;IAEjD,IAAI,CAAC,MAAM;QAAE,OAAO,CAAC,CAAC;IAEtB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC9D,MAAM,YAAY,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;IAC1D,MAAM,SAAS,GAAG,YAAY,GAAG,GAAG,CAAC;IAErC,OAAO,KAAK,CAAC,MAAM,GAAG,cAAc,GAAG,SAAS,CAAC;AACnD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CACvC,IAAY,EACZ,iBAAyB,wBAAwB;IAEjD,MAAM,WAAW,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAC3C,OAAO,WAAW,GAAG,cAAc,CAAC;AACtC,CAAC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Reading time estimation.
|
|
3
|
-
*
|
|
4
|
-
* Estimates how long it takes to read text silently vs. narrate it aloud.
|
|
5
|
-
* Uses configurable words-per-minute rates.
|
|
6
|
-
*/
|
|
7
|
-
/** Result of a reading-time estimate. */
|
|
8
|
-
export interface ReadingTimeEstimate {
|
|
9
|
-
/** Number of words (plain word count, not spoken equivalents). */
|
|
10
|
-
words: number;
|
|
11
|
-
/** Estimated minutes (decimal). */
|
|
12
|
-
minutes: number;
|
|
13
|
-
/** Estimated seconds (rounded). */
|
|
14
|
-
seconds: number;
|
|
15
|
-
}
|
|
16
|
-
/** Options for reading-time estimation. */
|
|
17
|
-
export interface ReadingTimeOptions {
|
|
18
|
-
/** Words per minute for silent reading (default: 200). */
|
|
19
|
-
wordsPerMinute?: number;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Estimate silent reading time for a block of text.
|
|
23
|
-
*
|
|
24
|
-
* @param text - The text to estimate
|
|
25
|
-
* @param options - Optional configuration
|
|
26
|
-
* @returns Word count + time estimate
|
|
27
|
-
*/
|
|
28
|
-
export declare function estimateReadingTime(text: string, options?: ReadingTimeOptions): ReadingTimeEstimate;
|
|
29
|
-
/** Result of a narration-time estimate. */
|
|
30
|
-
export interface NarrationTimeEstimate {
|
|
31
|
-
/** Spoken word equivalents (numbers expanded, comma pauses added). */
|
|
32
|
-
spokenWords: number;
|
|
33
|
-
/** Estimated minutes (decimal). */
|
|
34
|
-
minutes: number;
|
|
35
|
-
/** Estimated seconds (rounded). */
|
|
36
|
-
seconds: number;
|
|
37
|
-
}
|
|
38
|
-
/** Options for narration-time estimation. */
|
|
39
|
-
export interface NarrationTimeOptions {
|
|
40
|
-
/** Words per second for narration (default: 2.5 ≈ 150 WPM). */
|
|
41
|
-
wordsPerSecond?: number;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Estimate narration (spoken) time for a block of text.
|
|
45
|
-
*
|
|
46
|
-
* Unlike silent reading, this accounts for numbers being spoken as
|
|
47
|
-
* multiple words and pauses at commas.
|
|
48
|
-
*
|
|
49
|
-
* @param text - The text to estimate
|
|
50
|
-
* @param options - Optional configuration
|
|
51
|
-
* @returns Spoken word equivalents + time estimate
|
|
52
|
-
*/
|
|
53
|
-
export declare function estimateNarrationTime(text: string, options?: NarrationTimeOptions): NarrationTimeEstimate;
|
|
54
|
-
//# sourceMappingURL=readingTime.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readingTime.d.ts","sourceRoot":"","sources":["../../src/timing/readingTime.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,yCAAyC;AACzC,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,2CAA2C;AAC3C,MAAM,WAAW,kBAAkB;IACjC,0DAA0D;IAC1D,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,kBAAkB,GAC3B,mBAAmB,CAYrB;AAED,2CAA2C;AAC3C,MAAM,WAAW,qBAAqB;IACpC,sEAAsE;IACtE,WAAW,EAAE,MAAM,CAAC;IACpB,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,6CAA6C;AAC7C,MAAM,WAAW,oBAAoB;IACnC,+DAA+D;IAC/D,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,oBAAoB,GAC7B,qBAAqB,CAYvB"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Reading time estimation.
|
|
3
|
-
*
|
|
4
|
-
* Estimates how long it takes to read text silently vs. narrate it aloud.
|
|
5
|
-
* Uses configurable words-per-minute rates.
|
|
6
|
-
*/
|
|
7
|
-
import { countSpokenWords, DEFAULT_WORDS_PER_SECOND } from './narrationTiming.js';
|
|
8
|
-
/** Default silent reading rate (adults average ~200–250 WPM). */
|
|
9
|
-
const DEFAULT_READING_WPM = 200;
|
|
10
|
-
/**
|
|
11
|
-
* Estimate silent reading time for a block of text.
|
|
12
|
-
*
|
|
13
|
-
* @param text - The text to estimate
|
|
14
|
-
* @param options - Optional configuration
|
|
15
|
-
* @returns Word count + time estimate
|
|
16
|
-
*/
|
|
17
|
-
export function estimateReadingTime(text, options) {
|
|
18
|
-
const configuredWpm = options?.wordsPerMinute;
|
|
19
|
-
const wpm = typeof configuredWpm === 'number' && configuredWpm > 0 ? configuredWpm : DEFAULT_READING_WPM;
|
|
20
|
-
const words = text.split(/\s+/).filter((w) => w.length > 0).length;
|
|
21
|
-
const minutes = words / wpm;
|
|
22
|
-
return {
|
|
23
|
-
words,
|
|
24
|
-
minutes,
|
|
25
|
-
seconds: Math.round(minutes * 60),
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Estimate narration (spoken) time for a block of text.
|
|
30
|
-
*
|
|
31
|
-
* Unlike silent reading, this accounts for numbers being spoken as
|
|
32
|
-
* multiple words and pauses at commas.
|
|
33
|
-
*
|
|
34
|
-
* @param text - The text to estimate
|
|
35
|
-
* @param options - Optional configuration
|
|
36
|
-
* @returns Spoken word equivalents + time estimate
|
|
37
|
-
*/
|
|
38
|
-
export function estimateNarrationTime(text, options) {
|
|
39
|
-
const providedWps = options?.wordsPerSecond;
|
|
40
|
-
const wps = typeof providedWps === 'number' && providedWps > 0 ? providedWps : DEFAULT_WORDS_PER_SECOND;
|
|
41
|
-
const spokenWords = countSpokenWords(text);
|
|
42
|
-
const totalSeconds = spokenWords / wps;
|
|
43
|
-
return {
|
|
44
|
-
spokenWords,
|
|
45
|
-
minutes: totalSeconds / 60,
|
|
46
|
-
seconds: Math.round(totalSeconds),
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=readingTime.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readingTime.js","sourceRoot":"","sources":["../../src/timing/readingTime.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAElF,iEAAiE;AACjE,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAkBhC;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CACjC,IAAY,EACZ,OAA4B;IAE5B,MAAM,aAAa,GAAG,OAAO,EAAE,cAAc,CAAC;IAC9C,MAAM,GAAG,GACP,OAAO,aAAa,KAAK,QAAQ,IAAI,aAAa,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,mBAAmB,CAAC;IAC/F,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;IACnE,MAAM,OAAO,GAAG,KAAK,GAAG,GAAG,CAAC;IAE5B,OAAO;QACL,KAAK;QACL,OAAO;QACP,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC;KAClC,CAAC;AACJ,CAAC;AAkBD;;;;;;;;;GASG;AACH,MAAM,UAAU,qBAAqB,CACnC,IAAY,EACZ,OAA8B;IAE9B,MAAM,WAAW,GAAG,OAAO,EAAE,cAAc,CAAC;IAC5C,MAAM,GAAG,GACP,OAAO,WAAW,KAAK,QAAQ,IAAI,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,wBAAwB,CAAC;IAC9F,MAAM,WAAW,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,YAAY,GAAG,WAAW,GAAG,GAAG,CAAC;IAEvC,OAAO;QACL,WAAW;QACX,OAAO,EAAE,YAAY,GAAG,EAAE;QAC1B,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC;KAClC,CAAC;AACJ,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Apply Transform
|
|
3
|
-
*
|
|
4
|
-
* Main entry point for the transform module. Takes a Doc and a style,
|
|
5
|
-
* analyzes block content, selects extractions to promote, and returns
|
|
6
|
-
* a new Doc with blocks optimized for visual presentation.
|
|
7
|
-
*
|
|
8
|
-
* The input Doc is never mutated — a fresh Doc is always returned.
|
|
9
|
-
*/
|
|
10
|
-
import type { Doc } from '../schemas/Doc.js';
|
|
11
|
-
import type { TransformStyleId, TransformOptions, TransformResult } from './types.js';
|
|
12
|
-
/**
|
|
13
|
-
* Apply a transform style to a Doc, producing a new Doc with blocks
|
|
14
|
-
* optimized for visual presentation.
|
|
15
|
-
*
|
|
16
|
-
* @param doc - The source Doc (not mutated).
|
|
17
|
-
* @param styleId - Registered transform style id (e.g. 'documentary', 'magazine').
|
|
18
|
-
* @param options - Optional seed, images, theme override.
|
|
19
|
-
* @returns TransformResult with the new Doc and stats.
|
|
20
|
-
*/
|
|
21
|
-
export declare function applyTransform(doc: Doc, styleId: TransformStyleId, options?: TransformOptions): TransformResult;
|
|
22
|
-
//# sourceMappingURL=applyTransform.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"applyTransform.d.ts","sourceRoot":"","sources":["../../src/transform/applyTransform.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAOtF;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,gBAAgB,EACzB,OAAO,CAAC,EAAE,gBAAgB,GACzB,eAAe,CAmDjB"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Apply Transform
|
|
3
|
-
*
|
|
4
|
-
* Main entry point for the transform module. Takes a Doc and a style,
|
|
5
|
-
* analyzes block content, selects extractions to promote, and returns
|
|
6
|
-
* a new Doc with blocks optimized for visual presentation.
|
|
7
|
-
*
|
|
8
|
-
* The input Doc is never mutated — a fresh Doc is always returned.
|
|
9
|
-
*/
|
|
10
|
-
import { resolveTransformStyle } from './registry.js';
|
|
11
|
-
import { analyzeBlocks, extractDocImages } from './blockAnalyzer.js';
|
|
12
|
-
import { selectAndBuild } from './templateSelector.js';
|
|
13
|
-
import { allocateTiming } from './timingAllocator.js';
|
|
14
|
-
import { hashString } from '../random/SeededRandom.js';
|
|
15
|
-
/**
|
|
16
|
-
* Apply a transform style to a Doc, producing a new Doc with blocks
|
|
17
|
-
* optimized for visual presentation.
|
|
18
|
-
*
|
|
19
|
-
* @param doc - The source Doc (not mutated).
|
|
20
|
-
* @param styleId - Registered transform style id (e.g. 'documentary', 'magazine').
|
|
21
|
-
* @param options - Optional seed, images, theme override.
|
|
22
|
-
* @returns TransformResult with the new Doc and stats.
|
|
23
|
-
*/
|
|
24
|
-
export function applyTransform(doc, styleId, options) {
|
|
25
|
-
const baseConfig = resolveTransformStyle(styleId);
|
|
26
|
-
const config = options?.overrides
|
|
27
|
-
? { ...baseConfig, ...options.overrides, id: baseConfig.id }
|
|
28
|
-
: baseConfig;
|
|
29
|
-
const seed = options?.seed ?? hashString(doc.articleId || 'transform');
|
|
30
|
-
// Use provided images or auto-extract from the doc's markdown content
|
|
31
|
-
const images = options?.images ?? extractDocImages(doc.blocks);
|
|
32
|
-
// 1. Analyze blocks
|
|
33
|
-
const analyzed = analyzeBlocks(doc.blocks, {
|
|
34
|
-
minConfidence: config.minConfidence,
|
|
35
|
-
types: config.preferredTypes,
|
|
36
|
-
});
|
|
37
|
-
// If no blocks have meaningful content, return the doc unchanged
|
|
38
|
-
const hasContent = analyzed.some((ab) => ab.bodyWordCount >= 5);
|
|
39
|
-
if (!hasContent) {
|
|
40
|
-
return {
|
|
41
|
-
doc: { ...doc },
|
|
42
|
-
stats: {
|
|
43
|
-
totalInputBlocks: doc.blocks.length,
|
|
44
|
-
transformedBlocks: 0,
|
|
45
|
-
insertedBlocks: 0,
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
// 2. Select extractions and build template blocks
|
|
50
|
-
const selection = selectAndBuild(analyzed, config, images, seed);
|
|
51
|
-
// 3. Allocate timing across the new block sequence
|
|
52
|
-
const timedBlocks = allocateTiming(selection.blocks, doc.duration);
|
|
53
|
-
// 4. Assemble the output Doc
|
|
54
|
-
const transformedDoc = {
|
|
55
|
-
...doc,
|
|
56
|
-
blocks: timedBlocks,
|
|
57
|
-
themeId: options?.themeId ?? doc.themeId,
|
|
58
|
-
};
|
|
59
|
-
return {
|
|
60
|
-
doc: transformedDoc,
|
|
61
|
-
stats: {
|
|
62
|
-
totalInputBlocks: doc.blocks.length,
|
|
63
|
-
transformedBlocks: selection.transformedCount,
|
|
64
|
-
insertedBlocks: selection.insertedCount,
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
//# sourceMappingURL=applyTransform.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"applyTransform.js","sourceRoot":"","sources":["../../src/transform/applyTransform.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAC5B,GAAQ,EACR,OAAyB,EACzB,OAA0B;IAE1B,MAAM,UAAU,GAAG,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAClD,MAAM,MAAM,GAAG,OAAO,EAAE,SAAS;QAC/B,CAAC,CAAC,EAAE,GAAG,UAAU,EAAE,GAAG,OAAO,CAAC,SAAS,EAAE,EAAE,EAAE,UAAU,CAAC,EAAE,EAAE;QAC5D,CAAC,CAAC,UAAU,CAAC;IAEf,MAAM,IAAI,GAAG,OAAO,EAAE,IAAI,IAAI,UAAU,C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S,CAAC,aAAa;SACxC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Block Analyzer
|
|
3
|
-
*
|
|
4
|
-
* Walks Doc blocks, extracts plain text from their markdown contents,
|
|
5
|
-
* and runs the content extractor on each block to identify stats, dates,
|
|
6
|
-
* quotes, etc. that can be promoted to visual template blocks.
|
|
7
|
-
*/
|
|
8
|
-
import type { Block } from '../schemas/Doc.js';
|
|
9
|
-
import type { ExtractedElement, ExtractionOptions } from '../generate/contentExtractor.js';
|
|
10
|
-
import type { TransformImage } from './types.js';
|
|
11
|
-
/** An image found in a block's markdown contents. */
|
|
12
|
-
export interface BlockImage {
|
|
13
|
-
/** Image URL (relative or absolute). */
|
|
14
|
-
src: string;
|
|
15
|
-
/** Alt text. */
|
|
16
|
-
alt: string;
|
|
17
|
-
/** Index of the source block in the analyzed array. */
|
|
18
|
-
sourceBlockIndex: number;
|
|
19
|
-
}
|
|
20
|
-
/** A block enriched with extraction analysis. */
|
|
21
|
-
export interface AnalyzedBlock {
|
|
22
|
-
/** The original block. */
|
|
23
|
-
block: Block;
|
|
24
|
-
/** Plain text extracted from the block's contents. */
|
|
25
|
-
plainText: string;
|
|
26
|
-
/** Content extractions found in the block's text. */
|
|
27
|
-
extractions: ExtractedElement[];
|
|
28
|
-
/** Whether this block has child blocks. */
|
|
29
|
-
hasChildren: boolean;
|
|
30
|
-
/** Word count of the block's body text. */
|
|
31
|
-
bodyWordCount: number;
|
|
32
|
-
/** Images found in this block's markdown contents. */
|
|
33
|
-
images: BlockImage[];
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Collect all unique images from all blocks in a Doc.
|
|
37
|
-
* Returns them as TransformImages for use in the transform pipeline.
|
|
38
|
-
*/
|
|
39
|
-
export declare function extractDocImages(blocks: Block[]): TransformImage[];
|
|
40
|
-
/**
|
|
41
|
-
* Analyze all blocks in a Doc, extracting text and running content extraction.
|
|
42
|
-
*
|
|
43
|
-
* @param blocks - The Doc's block array (may be nested via children).
|
|
44
|
-
* @param options - Extraction options (minConfidence, types filter).
|
|
45
|
-
* @returns Analyzed blocks with extractions, in flattened order.
|
|
46
|
-
*/
|
|
47
|
-
export declare function analyzeBlocks(blocks: Block[], options?: ExtractionOptions): AnalyzedBlock[];
|
|
48
|
-
//# sourceMappingURL=blockAnalyzer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"blockAnalyzer.d.ts","sourceRoot":"","sources":["../../src/transform/blockAnalyzer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAC3F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAIjD,qDAAqD;AACrD,MAAM,WAAW,UAAU;IACzB,wCAAwC;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,uDAAuD;IACvD,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,iDAAiD;AACjD,MAAM,WAAW,aAAa;IAC5B,0BAA0B;IAC1B,KAAK,EAAE,KAAK,CAAC;IACb,sDAAsD;IACtD,SAAS,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,WAAW,EAAE,gBAAgB,EAAE,CAAC;IAChC,2CAA2C;IAC3C,WAAW,EAAE,OAAO,CAAC;IACrB,2CAA2C;IAC3C,aAAa,EAAE,MAAM,CAAC;IACtB,sDAAsD;IACtD,MAAM,EAAE,UAAU,EAAE,CAAC;CACtB;AA4CD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,cAAc,EAAE,CAwBlE;AA4BD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,aAAa,EAAE,CAkC3F"}
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Block Analyzer
|
|
3
|
-
*
|
|
4
|
-
* Walks Doc blocks, extracts plain text from their markdown contents,
|
|
5
|
-
* and runs the content extractor on each block to identify stats, dates,
|
|
6
|
-
* quotes, etc. that can be promoted to visual template blocks.
|
|
7
|
-
*/
|
|
8
|
-
import { extractContent, stripMarkdown } from '../generate/contentExtractor.js';
|
|
9
|
-
import { extractPlainText, getChildren } from '../markdown/utils.js';
|
|
10
|
-
/**
|
|
11
|
-
* Extract plain text from an array of MarkdownBlockNodes.
|
|
12
|
-
*/
|
|
13
|
-
function contentsToPlainText(contents) {
|
|
14
|
-
return contents.map((node) => extractPlainText(node)).join('\n');
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Recursively walk a markdown node tree and collect all images.
|
|
18
|
-
*/
|
|
19
|
-
function collectImages(node) {
|
|
20
|
-
const results = [];
|
|
21
|
-
if ('type' in node && node.type === 'image' && 'url' in node) {
|
|
22
|
-
const img = node;
|
|
23
|
-
if (img.url) {
|
|
24
|
-
results.push({ src: img.url, alt: img.alt ?? '' });
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
for (const child of getChildren(node)) {
|
|
28
|
-
results.push(...collectImages(child));
|
|
29
|
-
}
|
|
30
|
-
return results;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Extract images from a block's markdown contents.
|
|
34
|
-
*/
|
|
35
|
-
function extractBlockImages(block, blockIndex) {
|
|
36
|
-
if (!block.contents || block.contents.length === 0)
|
|
37
|
-
return [];
|
|
38
|
-
const images = [];
|
|
39
|
-
for (const node of block.contents) {
|
|
40
|
-
for (const img of collectImages(node)) {
|
|
41
|
-
images.push({ ...img, sourceBlockIndex: blockIndex });
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return images;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Collect all unique images from all blocks in a Doc.
|
|
48
|
-
* Returns them as TransformImages for use in the transform pipeline.
|
|
49
|
-
*/
|
|
50
|
-
export function extractDocImages(blocks) {
|
|
51
|
-
const seen = new Set();
|
|
52
|
-
const images = [];
|
|
53
|
-
function walk(blockList) {
|
|
54
|
-
for (const block of blockList) {
|
|
55
|
-
if (block.contents) {
|
|
56
|
-
for (const node of block.contents) {
|
|
57
|
-
for (const img of collectImages(node)) {
|
|
58
|
-
if (!seen.has(img.src)) {
|
|
59
|
-
seen.add(img.src);
|
|
60
|
-
images.push({ src: img.src, alt: img.alt });
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
if (block.children) {
|
|
66
|
-
walk(block.children);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
walk(blocks);
|
|
71
|
-
return images;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Collect leaf blocks from a nested block tree.
|
|
75
|
-
* Only returns blocks that have their own `contents` but no children,
|
|
76
|
-
* preventing parent blocks from duplicating text that also appears
|
|
77
|
-
* in their children. Parent-only blocks (with a title but no body
|
|
78
|
-
* content) are included as structural placeholders.
|
|
79
|
-
*/
|
|
80
|
-
function collectLeafBlocks(blocks) {
|
|
81
|
-
const result = [];
|
|
82
|
-
for (const block of blocks) {
|
|
83
|
-
if (block.children && block.children.length > 0) {
|
|
84
|
-
// Parent block — only include it as a structural marker
|
|
85
|
-
// (title only, no body extraction) if it has no contents of its own.
|
|
86
|
-
// Then recurse into children for the actual content.
|
|
87
|
-
if (!block.contents || block.contents.length === 0) {
|
|
88
|
-
result.push(block);
|
|
89
|
-
}
|
|
90
|
-
result.push(...collectLeafBlocks(block.children));
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
// Leaf block — include for content analysis
|
|
94
|
-
result.push(block);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
return result;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Analyze all blocks in a Doc, extracting text and running content extraction.
|
|
101
|
-
*
|
|
102
|
-
* @param blocks - The Doc's block array (may be nested via children).
|
|
103
|
-
* @param options - Extraction options (minConfidence, types filter).
|
|
104
|
-
* @returns Analyzed blocks with extractions, in flattened order.
|
|
105
|
-
*/
|
|
106
|
-
export function analyzeBlocks(blocks, options) {
|
|
107
|
-
const flat = collectLeafBlocks(blocks);
|
|
108
|
-
const results = [];
|
|
109
|
-
for (const block of flat) {
|
|
110
|
-
let plainText = '';
|
|
111
|
-
if (block.contents && block.contents.length > 0) {
|
|
112
|
-
plainText = contentsToPlainText(block.contents);
|
|
113
|
-
}
|
|
114
|
-
else if (block.title) {
|
|
115
|
-
plainText = block.title;
|
|
116
|
-
}
|
|
117
|
-
// Strip any remaining markdown syntax
|
|
118
|
-
const stripped = stripMarkdown(plainText);
|
|
119
|
-
const bodyWordCount = stripped.split(/\s+/).filter((w) => w.length > 0).length;
|
|
120
|
-
// Run content extraction
|
|
121
|
-
const extraction = extractContent(stripped, options);
|
|
122
|
-
// Extract images from markdown contents
|
|
123
|
-
const images = extractBlockImages(block, results.length);
|
|
124
|
-
results.push({
|
|
125
|
-
block,
|
|
126
|
-
plainText: stripped,
|
|
127
|
-
extractions: extraction.elements,
|
|
128
|
-
hasChildren: !!(block.children && block.children.length > 0),
|
|
129
|
-
bodyWordCount,
|
|
130
|
-
images,
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
return results;
|
|
134
|
-
}
|
|
135
|
-
//# sourceMappingURL=blockAnalyzer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"blockAnalyzer.js","sourceRoot":"","sources":["../../src/transform/blockAnalyzer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,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,EAAE,OAAO,CAAC,CAAC;QAErD,wCAAwC;QACxC,MAAM,MAAM,GAAG,kBAAkB,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QAEzD,OAAO,CAAC,IAAI,CAAC;YACX,KAAK;YACL,SAAS,EAAE,QAAQ;YACnB,WAAW,EAAE,UAAU,CAAC,QAAQ;YAChC,WAAW,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;YAC5D,aAAa;YACb,MAAM;SACP,CAAC,CAAC;IACL,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transform/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,eAAe,CAAC;AAEvB,YAAY,EACV,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,gBAAgB,EAChB,eAAe,GAChB,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Transform Style Registry
|
|
3
|
-
*
|
|
4
|
-
* Central registry of built-in transform styles. Follows the same pattern
|
|
5
|
-
* as themeLibrary.ts — a record of configs with lookup/summary helpers.
|
|
6
|
-
*/
|
|
7
|
-
import type { TransformStyleConfig, TransformStyleSummary } from './types.js';
|
|
8
|
-
/** Default style used when no id is provided. */
|
|
9
|
-
export declare const DEFAULT_TRANSFORM_STYLE_ID = "documentary";
|
|
10
|
-
/**
|
|
11
|
-
* Resolve a transform style by id.
|
|
12
|
-
* Returns the default style if the id is not found.
|
|
13
|
-
*/
|
|
14
|
-
export declare function resolveTransformStyle(id: string): TransformStyleConfig;
|
|
15
|
-
/** Get all registered style ids. */
|
|
16
|
-
export declare function getTransformStyleIds(): string[];
|
|
17
|
-
/** Get summary info for all styles (for UI dropdowns). */
|
|
18
|
-
export declare function getTransformStyleSummaries(): TransformStyleSummary[];
|
|
19
|
-
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/transform/registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAgB9E,iDAAiD;AACjD,eAAO,MAAM,0BAA0B,gBAAgB,CAAC;AAExD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,MAAM,GAAG,oBAAoB,CAEtE;AAED,oCAAoC;AACpC,wBAAgB,oBAAoB,IAAI,MAAM,EAAE,CAE/C;AAED,0DAA0D;AAC1D,wBAAgB,0BAA0B,IAAI,qBAAqB,EAAE,CAMpE"}
|