@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,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Geohash Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides geohash encoding/decoding and spatial utilities using the standard
|
|
5
|
-
* ngeohash library for core operations, plus custom utilities for overlap checking
|
|
6
|
-
* and distance calculation.
|
|
7
|
-
*
|
|
8
|
-
* Geohashes are a hierarchical spatial indexing system that divides the world
|
|
9
|
-
* into a grid of cells. Each additional character narrows the area by ~1/32.
|
|
10
|
-
*
|
|
11
|
-
* Precision guide:
|
|
12
|
-
* - 4 chars: ~39km x 19km (used for tile indexing)
|
|
13
|
-
* - 5 chars: ~5km x 5km
|
|
14
|
-
* - 6 chars: ~1.2km x 0.6km
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* Encode latitude/longitude to a geohash string.
|
|
18
|
-
* Uses the standard ngeohash library.
|
|
19
|
-
*/
|
|
20
|
-
export declare function encodeGeohash(lat: number, lng: number, precision?: number): string;
|
|
21
|
-
/**
|
|
22
|
-
* Decode a geohash to latitude/longitude center with error bounds.
|
|
23
|
-
* Uses the standard ngeohash library.
|
|
24
|
-
*/
|
|
25
|
-
export declare function decodeGeohash(hash: string): {
|
|
26
|
-
lat: number;
|
|
27
|
-
lng: number;
|
|
28
|
-
latErr: number;
|
|
29
|
-
lngErr: number;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Get the 8 neighboring geohash cells.
|
|
33
|
-
* Returns up to 8 neighbors (fewer at poles or antimeridian).
|
|
34
|
-
* Uses the standard ngeohash library.
|
|
35
|
-
*/
|
|
36
|
-
export declare function getNeighbors(hash: string): string[];
|
|
37
|
-
/**
|
|
38
|
-
* Get a 3x3 grid of geohash4 cells (center + 8 neighbors).
|
|
39
|
-
* Used for landing bonus expansions in Fly mode.
|
|
40
|
-
*
|
|
41
|
-
* @param geohash4 - Center geohash4 cell
|
|
42
|
-
* @returns Array of 9 geohash4 cells (center first, then neighbors)
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* getGeohash4Neighbors('c23n')
|
|
46
|
-
* // => ['c23n', 'c23p', 'c23q', 'c23j', 'c23m', 'c23k', 'c23h', 'c23e', 'c23s']
|
|
47
|
-
*/
|
|
48
|
-
export declare function getGeohash4Neighbors(geohash4: string): string[];
|
|
49
|
-
/**
|
|
50
|
-
* Get the prefix of a geohash at a given precision.
|
|
51
|
-
* Simple helper for extracting geohash prefixes for directory organization.
|
|
52
|
-
*/
|
|
53
|
-
export declare function getGeohashPrefix(geohash: string, precision: number): string;
|
|
54
|
-
/**
|
|
55
|
-
* Convert a geohash prefix to a hierarchical path.
|
|
56
|
-
*
|
|
57
|
-
* Examples:
|
|
58
|
-
* "9mud" -> "9/m/u/d"
|
|
59
|
-
* "9q8y" -> "9/q/8/y"
|
|
60
|
-
* "c24k" -> "c/2/4/k"
|
|
61
|
-
*
|
|
62
|
-
* This is used for organizing files in hierarchical directories to avoid
|
|
63
|
-
* thousands of folders in a single directory, which causes filesystem
|
|
64
|
-
* performance issues.
|
|
65
|
-
*/
|
|
66
|
-
export declare function geohashToHierarchicalPath(geohash4: string): string;
|
|
67
|
-
/**
|
|
68
|
-
* Compute all geohash cells along the path between two geohash cells.
|
|
69
|
-
* Interpolates lat/lng points between the centers of `from` and `to`,
|
|
70
|
-
* encoding each to a geohash at the given precision, and returns the
|
|
71
|
-
* deduplicated list of intermediate cells (excluding `from` and `to`).
|
|
72
|
-
*/
|
|
73
|
-
export declare function getGeohashPath(from: string, to: string, precision?: number): string[];
|
|
74
|
-
/**
|
|
75
|
-
* Check if a geohash cell overlaps with a bounding box.
|
|
76
|
-
* Custom implementation (not available in ngeohash).
|
|
77
|
-
*/
|
|
78
|
-
export declare function geohashOverlapsBounds(hash: string, bounds: {
|
|
79
|
-
north: number;
|
|
80
|
-
south: number;
|
|
81
|
-
east: number;
|
|
82
|
-
west: number;
|
|
83
|
-
}): boolean;
|
|
84
|
-
export { haversineDistance } from './Haversine.js';
|
|
85
|
-
//# sourceMappingURL=Geohash.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Geohash.d.ts","sourceRoot":"","sources":["../../src/spatial/Geohash.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,SAAI,GAAG,MAAM,CAE7E;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG;IAC3C,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAQA;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAEnD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAM/D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE3E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMlE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,SAAI,GAAG,MAAM,EAAE,CAiChF;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACnE,OAAO,CAcT;AAID,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/spatial/Geohash.js
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Geohash Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides geohash encoding/decoding and spatial utilities using the standard
|
|
5
|
-
* ngeohash library for core operations, plus custom utilities for overlap checking
|
|
6
|
-
* and distance calculation.
|
|
7
|
-
*
|
|
8
|
-
* Geohashes are a hierarchical spatial indexing system that divides the world
|
|
9
|
-
* into a grid of cells. Each additional character narrows the area by ~1/32.
|
|
10
|
-
*
|
|
11
|
-
* Precision guide:
|
|
12
|
-
* - 4 chars: ~39km x 19km (used for tile indexing)
|
|
13
|
-
* - 5 chars: ~5km x 5km
|
|
14
|
-
* - 6 chars: ~1.2km x 0.6km
|
|
15
|
-
*/
|
|
16
|
-
import ngeohash from 'ngeohash';
|
|
17
|
-
/**
|
|
18
|
-
* Encode latitude/longitude to a geohash string.
|
|
19
|
-
* Uses the standard ngeohash library.
|
|
20
|
-
*/
|
|
21
|
-
export function encodeGeohash(lat, lng, precision = 9) {
|
|
22
|
-
return ngeohash.encode(lat, lng, precision);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Decode a geohash to latitude/longitude center with error bounds.
|
|
26
|
-
* Uses the standard ngeohash library.
|
|
27
|
-
*/
|
|
28
|
-
export function decodeGeohash(hash) {
|
|
29
|
-
const result = ngeohash.decode(hash);
|
|
30
|
-
return {
|
|
31
|
-
lat: result.latitude,
|
|
32
|
-
lng: result.longitude,
|
|
33
|
-
latErr: result.error.latitude,
|
|
34
|
-
lngErr: result.error.longitude,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Get the 8 neighboring geohash cells.
|
|
39
|
-
* Returns up to 8 neighbors (fewer at poles or antimeridian).
|
|
40
|
-
* Uses the standard ngeohash library.
|
|
41
|
-
*/
|
|
42
|
-
export function getNeighbors(hash) {
|
|
43
|
-
return ngeohash.neighbors(hash);
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Get a 3x3 grid of geohash4 cells (center + 8 neighbors).
|
|
47
|
-
* Used for landing bonus expansions in Fly mode.
|
|
48
|
-
*
|
|
49
|
-
* @param geohash4 - Center geohash4 cell
|
|
50
|
-
* @returns Array of 9 geohash4 cells (center first, then neighbors)
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* getGeohash4Neighbors('c23n')
|
|
54
|
-
* // => ['c23n', 'c23p', 'c23q', 'c23j', 'c23m', 'c23k', 'c23h', 'c23e', 'c23s']
|
|
55
|
-
*/
|
|
56
|
-
export function getGeohash4Neighbors(geohash4) {
|
|
57
|
-
if (geohash4.length !== 4) {
|
|
58
|
-
throw new Error(`getGeohash4Neighbors requires 4-char geohash, got: ${geohash4}`);
|
|
59
|
-
}
|
|
60
|
-
const neighbors = getNeighbors(geohash4);
|
|
61
|
-
return [geohash4, ...neighbors];
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Get the prefix of a geohash at a given precision.
|
|
65
|
-
* Simple helper for extracting geohash prefixes for directory organization.
|
|
66
|
-
*/
|
|
67
|
-
export function getGeohashPrefix(geohash, precision) {
|
|
68
|
-
return geohash.slice(0, precision);
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Convert a geohash prefix to a hierarchical path.
|
|
72
|
-
*
|
|
73
|
-
* Examples:
|
|
74
|
-
* "9mud" -> "9/m/u/d"
|
|
75
|
-
* "9q8y" -> "9/q/8/y"
|
|
76
|
-
* "c24k" -> "c/2/4/k"
|
|
77
|
-
*
|
|
78
|
-
* This is used for organizing files in hierarchical directories to avoid
|
|
79
|
-
* thousands of folders in a single directory, which causes filesystem
|
|
80
|
-
* performance issues.
|
|
81
|
-
*/
|
|
82
|
-
export function geohashToHierarchicalPath(geohash4) {
|
|
83
|
-
if (geohash4.length !== 4) {
|
|
84
|
-
throw new Error(`geohashToHierarchicalPath requires 4-char geohash, got: ${geohash4}`);
|
|
85
|
-
}
|
|
86
|
-
const [c1, c2, c3, c4] = geohash4.split('');
|
|
87
|
-
return `${c1}/${c2}/${c3}/${c4}`;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Compute all geohash cells along the path between two geohash cells.
|
|
91
|
-
* Interpolates lat/lng points between the centers of `from` and `to`,
|
|
92
|
-
* encoding each to a geohash at the given precision, and returns the
|
|
93
|
-
* deduplicated list of intermediate cells (excluding `from` and `to`).
|
|
94
|
-
*/
|
|
95
|
-
export function getGeohashPath(from, to, precision = 4) {
|
|
96
|
-
if (from === to)
|
|
97
|
-
return [];
|
|
98
|
-
const fromCenter = decodeGeohash(from);
|
|
99
|
-
const toCenter = decodeGeohash(to);
|
|
100
|
-
// Compute approximate distance to determine step count
|
|
101
|
-
const dLat = Math.abs(toCenter.lat - fromCenter.lat);
|
|
102
|
-
const dLng = Math.abs(toCenter.lng - fromCenter.lng);
|
|
103
|
-
// Rough km: 1 degree lat ≈ 111km, 1 degree lng ≈ 111km * cos(midLat)
|
|
104
|
-
const midLatRad = ((fromCenter.lat + toCenter.lat) / 2) * (Math.PI / 180);
|
|
105
|
-
const approxKm = Math.sqrt((dLat * 111) ** 2 + (dLng * 111 * Math.cos(midLatRad)) ** 2);
|
|
106
|
-
// Step every ~15km to avoid skipping any geohash4 cell (~39x19km)
|
|
107
|
-
const steps = Math.max(2, Math.ceil(approxKm / 15));
|
|
108
|
-
const seen = new Set();
|
|
109
|
-
seen.add(from);
|
|
110
|
-
seen.add(to);
|
|
111
|
-
const path = [];
|
|
112
|
-
for (let i = 1; i < steps; i++) {
|
|
113
|
-
const t = i / steps;
|
|
114
|
-
const lat = fromCenter.lat + t * (toCenter.lat - fromCenter.lat);
|
|
115
|
-
const lng = fromCenter.lng + t * (toCenter.lng - fromCenter.lng);
|
|
116
|
-
const hash = encodeGeohash(lat, lng, precision);
|
|
117
|
-
if (!seen.has(hash)) {
|
|
118
|
-
seen.add(hash);
|
|
119
|
-
path.push(hash);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
return path;
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Check if a geohash cell overlaps with a bounding box.
|
|
126
|
-
* Custom implementation (not available in ngeohash).
|
|
127
|
-
*/
|
|
128
|
-
export function geohashOverlapsBounds(hash, bounds) {
|
|
129
|
-
const { lat, lng, latErr, lngErr } = decodeGeohash(hash);
|
|
130
|
-
const hashNorth = lat + latErr;
|
|
131
|
-
const hashSouth = lat - latErr;
|
|
132
|
-
const hashEast = lng + lngErr;
|
|
133
|
-
const hashWest = lng - lngErr;
|
|
134
|
-
return !(hashNorth < bounds.south ||
|
|
135
|
-
hashSouth > bounds.north ||
|
|
136
|
-
hashEast < bounds.west ||
|
|
137
|
-
hashWest > bounds.east);
|
|
138
|
-
}
|
|
139
|
-
// haversineDistance is now in shared/spatial/Haversine.ts (canonical location).
|
|
140
|
-
// Re-export for backwards compatibility with existing imports.
|
|
141
|
-
export { haversineDistance } from './Haversine.js';
|
|
142
|
-
//# sourceMappingURL=Geohash.js.map
|
|
@@ -1 +0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AAS,GAAG,GAAG,GAAG,MAAM,CAAC;IAC/B,MAAM,QAAQ,GAAG,GAAG,GAAG,MAAM,CAAC;IAC9B,MAAM,QAAQ,GAAG,GAAG,GAAG,MAAM,CAAC;IAE9B,OAAO,CAAC,CACN,SAAS,GAAG,MAAM,CAAC,KAAK;QACxB,SAAS,GAAG,MAAM,CAAC,KAAK;QACxB,QAAQ,GAAG,MAAM,CAAC,IAAI;QACtB,QAAQ,GAAG,MAAM,CAAC,IAAI,CACvB,CAAC;AACJ,CAAC;AAED,gFAAgF;AAChF,+DAA+D;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Haversine Distance Calculation
|
|
3
|
-
*
|
|
4
|
-
* Provides accurate distance calculation between two geographic coordinates
|
|
5
|
-
* using the Haversine formula, which accounts for Earth's curvature.
|
|
6
|
-
*/
|
|
7
|
-
import type { Coordinates } from '../schemas/Types.js';
|
|
8
|
-
/**
|
|
9
|
-
* Calculate distance between two coordinates using Haversine formula.
|
|
10
|
-
*
|
|
11
|
-
* @param from Start coordinates
|
|
12
|
-
* @param to End coordinates
|
|
13
|
-
* @returns Distance in kilometers
|
|
14
|
-
*/
|
|
15
|
-
export declare function haversineDistance(from: Coordinates, to: Coordinates): number;
|
|
16
|
-
/**
|
|
17
|
-
* Calculate bearing from one coordinate to another.
|
|
18
|
-
*
|
|
19
|
-
* @param from Start coordinates
|
|
20
|
-
* @param to End coordinates
|
|
21
|
-
* @returns Bearing in degrees (0-360, where 0 = north, 90 = east)
|
|
22
|
-
*/
|
|
23
|
-
export declare function calculateBearing(from: Coordinates, to: Coordinates): number;
|
|
24
|
-
//# sourceMappingURL=Haversine.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Haversine.d.ts","sourceRoot":"","sources":["../../src/spatial/Haversine.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,GAAG,MAAM,CAgB5E;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,GAAG,MAAM,CAU3E"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Haversine Distance Calculation
|
|
3
|
-
*
|
|
4
|
-
* Provides accurate distance calculation between two geographic coordinates
|
|
5
|
-
* using the Haversine formula, which accounts for Earth's curvature.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Calculate distance between two coordinates using Haversine formula.
|
|
9
|
-
*
|
|
10
|
-
* @param from Start coordinates
|
|
11
|
-
* @param to End coordinates
|
|
12
|
-
* @returns Distance in kilometers
|
|
13
|
-
*/
|
|
14
|
-
export function haversineDistance(from, to) {
|
|
15
|
-
const R = 6371; // Earth's radius in kilometers
|
|
16
|
-
const dLat = toRadians(to.lat - from.lat);
|
|
17
|
-
const dLng = toRadians(to.lng - from.lng);
|
|
18
|
-
const a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
|
|
19
|
-
Math.cos(toRadians(from.lat)) *
|
|
20
|
-
Math.cos(toRadians(to.lat)) *
|
|
21
|
-
Math.sin(dLng / 2) *
|
|
22
|
-
Math.sin(dLng / 2);
|
|
23
|
-
const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
|
24
|
-
return R * c;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Calculate bearing from one coordinate to another.
|
|
28
|
-
*
|
|
29
|
-
* @param from Start coordinates
|
|
30
|
-
* @param to End coordinates
|
|
31
|
-
* @returns Bearing in degrees (0-360, where 0 = north, 90 = east)
|
|
32
|
-
*/
|
|
33
|
-
export function calculateBearing(from, to) {
|
|
34
|
-
const dLng = toRadians(to.lng - from.lng);
|
|
35
|
-
const lat1 = toRadians(from.lat);
|
|
36
|
-
const lat2 = toRadians(to.lat);
|
|
37
|
-
const x = Math.sin(dLng) * Math.cos(lat2);
|
|
38
|
-
const y = Math.cos(lat1) * Math.sin(lat2) - Math.sin(lat1) * Math.cos(lat2) * Math.cos(dLng);
|
|
39
|
-
const bearing = Math.atan2(x, y);
|
|
40
|
-
return ((bearing * 180) / Math.PI + 360) % 360;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Convert degrees to radians.
|
|
44
|
-
*/
|
|
45
|
-
function toRadians(degrees) {
|
|
46
|
-
return (degrees * Math.PI) / 180;
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=Haversine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Haversine.js","sourceRoot":"","sources":["../../src/spatial/Haversine.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAiB,EAAE,EAAe;IAClE,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,+BAA+B;IAE/C,MAAM,IAAI,GAAG,SAAS,CAAC,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IAC1C,MAAM,IAAI,GAAG,SAAS,CAAC,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IAE1C,MAAM,CAAC,GACL,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC;QACvC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC3B,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;YAC3B,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC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C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/spatial/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ContentContainer — virtual file system for document containers.
|
|
3
|
-
*
|
|
4
|
-
* A Squisq document is more than just markdown: it's a container of files
|
|
5
|
-
* including the primary markdown document, images, audio, timing data, and
|
|
6
|
-
* other media. ContentContainer provides an abstract async file system
|
|
7
|
-
* interface for reading, writing, and listing these files.
|
|
8
|
-
*
|
|
9
|
-
* Paths are forward-slash separated strings relative to the container root
|
|
10
|
-
* (e.g., 'images/hero.jpg', 'index.md'). No leading slash.
|
|
11
|
-
*
|
|
12
|
-
* Implementations:
|
|
13
|
-
* - MemoryContentContainer — in-memory Map (for zip import, tests, transient use)
|
|
14
|
-
* - SlotContentContainer — backed by IndexedDB slot storage (in the site package)
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* Metadata about a file in a ContentContainer.
|
|
18
|
-
*/
|
|
19
|
-
export interface ContentEntry {
|
|
20
|
-
/** Relative path within the container (e.g., 'images/hero.jpg') */
|
|
21
|
-
path: string;
|
|
22
|
-
/** MIME type (e.g., 'image/jpeg') */
|
|
23
|
-
mimeType: string;
|
|
24
|
-
/** File size in bytes */
|
|
25
|
-
size: number;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Abstract async file system for document containers.
|
|
29
|
-
*
|
|
30
|
-
* All paths are forward-slash separated, relative to the container root,
|
|
31
|
-
* with no leading slash. Example: 'images/hero.jpg', 'index.md'.
|
|
32
|
-
*/
|
|
33
|
-
export interface ContentContainer {
|
|
34
|
-
/** Read a file's binary content. Returns null if the file does not exist. */
|
|
35
|
-
readFile(path: string): Promise<ArrayBuffer | null>;
|
|
36
|
-
/** Write a file. Creates or overwrites. */
|
|
37
|
-
writeFile(path: string, data: ArrayBuffer | Uint8Array, mimeType?: string): Promise<void>;
|
|
38
|
-
/** Remove a file. No-op if the file does not exist. */
|
|
39
|
-
removeFile(path: string): Promise<void>;
|
|
40
|
-
/**
|
|
41
|
-
* List files in the container.
|
|
42
|
-
* @param prefix — Optional path prefix to filter by (e.g., 'images/')
|
|
43
|
-
*/
|
|
44
|
-
listFiles(prefix?: string): Promise<ContentEntry[]>;
|
|
45
|
-
/** Check whether a file exists. */
|
|
46
|
-
exists(path: string): Promise<boolean>;
|
|
47
|
-
/**
|
|
48
|
-
* Find the primary markdown document path.
|
|
49
|
-
*
|
|
50
|
-
* Discovery order: index.md → doc.md → document.md → first *.md at root.
|
|
51
|
-
* Returns null if no markdown file is found at the root level.
|
|
52
|
-
*/
|
|
53
|
-
getDocumentPath(): Promise<string | null>;
|
|
54
|
-
/**
|
|
55
|
-
* Convenience: read the primary markdown document as a UTF-8 string.
|
|
56
|
-
* Returns null if no markdown file is found.
|
|
57
|
-
*/
|
|
58
|
-
readDocument(): Promise<string | null>;
|
|
59
|
-
/**
|
|
60
|
-
* Convenience: write a markdown document.
|
|
61
|
-
* @param markdown — The markdown content
|
|
62
|
-
* @param filename — Filename to use (defaults to 'index.md')
|
|
63
|
-
*/
|
|
64
|
-
writeDocument(markdown: string, filename?: string): Promise<void>;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Find the primary markdown path from a list of file entries.
|
|
68
|
-
* Exported for reuse by other ContentContainer implementations.
|
|
69
|
-
*/
|
|
70
|
-
export declare function findDocumentPath(entries: ContentEntry[]): string | null;
|
|
71
|
-
/**
|
|
72
|
-
* In-memory ContentContainer backed by a Map.
|
|
73
|
-
*
|
|
74
|
-
* Used for zip import (deserialize into memory), tests, and transient operations.
|
|
75
|
-
*/
|
|
76
|
-
export declare class MemoryContentContainer implements ContentContainer {
|
|
77
|
-
private files;
|
|
78
|
-
readFile(path: string): Promise<ArrayBuffer | null>;
|
|
79
|
-
writeFile(path: string, data: ArrayBuffer | Uint8Array, mimeType?: string): Promise<void>;
|
|
80
|
-
removeFile(path: string): Promise<void>;
|
|
81
|
-
listFiles(prefix?: string): Promise<ContentEntry[]>;
|
|
82
|
-
exists(path: string): Promise<boolean>;
|
|
83
|
-
getDocumentPath(): Promise<string | null>;
|
|
84
|
-
readDocument(): Promise<string | null>;
|
|
85
|
-
writeDocument(markdown: string, filename?: string): Promise<void>;
|
|
86
|
-
}
|
|
87
|
-
//# sourceMappingURL=ContentContainer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentContainer.d.ts","sourceRoot":"","sources":["../../src/storage/ContentContainer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;IACb,qCAAqC;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAEpD,2CAA2C;IAC3C,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,UAAU,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1F,uDAAuD;IACvD,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExC;;;OAGG;IACH,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAEpD,mCAAmC;IACnC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEvC;;;;;OAKG;IACH,eAAe,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAE1C;;;OAGG;IACH,YAAY,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAEvC;;;;OAIG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnE;AAQD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,MAAM,GAAG,IAAI,CAavE;AAWD;;;;GAIG;AACH,qBAAa,sBAAuB,YAAW,gBAAgB;IAC7D,OAAO,CAAC,KAAK,CAAiC;IAExC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAInD,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,UAAU,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBzF,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAanD,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAItC,eAAe,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAIzC,YAAY,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAQtC,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAKxE"}
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ContentContainer — virtual file system for document containers.
|
|
3
|
-
*
|
|
4
|
-
* A Squisq document is more than just markdown: it's a container of files
|
|
5
|
-
* including the primary markdown document, images, audio, timing data, and
|
|
6
|
-
* other media. ContentContainer provides an abstract async file system
|
|
7
|
-
* interface for reading, writing, and listing these files.
|
|
8
|
-
*
|
|
9
|
-
* Paths are forward-slash separated strings relative to the container root
|
|
10
|
-
* (e.g., 'images/hero.jpg', 'index.md'). No leading slash.
|
|
11
|
-
*
|
|
12
|
-
* Implementations:
|
|
13
|
-
* - MemoryContentContainer — in-memory Map (for zip import, tests, transient use)
|
|
14
|
-
* - SlotContentContainer — backed by IndexedDB slot storage (in the site package)
|
|
15
|
-
*/
|
|
16
|
-
// ============================================
|
|
17
|
-
// Well-known markdown filenames in priority order
|
|
18
|
-
// ============================================
|
|
19
|
-
const MARKDOWN_PRIORITY = ['index.md', 'doc.md', 'document.md'];
|
|
20
|
-
/**
|
|
21
|
-
* Find the primary markdown path from a list of file entries.
|
|
22
|
-
* Exported for reuse by other ContentContainer implementations.
|
|
23
|
-
*/
|
|
24
|
-
export function findDocumentPath(entries) {
|
|
25
|
-
// Only consider root-level files (no '/' in path)
|
|
26
|
-
const rootFiles = entries.filter((e) => !e.path.includes('/'));
|
|
27
|
-
for (const name of MARKDOWN_PRIORITY) {
|
|
28
|
-
if (rootFiles.some((e) => e.path.toLowerCase() === name)) {
|
|
29
|
-
return name;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
// Fallback: first .md file at root
|
|
33
|
-
const firstMd = rootFiles.find((e) => e.path.toLowerCase().endsWith('.md'));
|
|
34
|
-
return firstMd?.path ?? null;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* In-memory ContentContainer backed by a Map.
|
|
38
|
-
*
|
|
39
|
-
* Used for zip import (deserialize into memory), tests, and transient operations.
|
|
40
|
-
*/
|
|
41
|
-
export class MemoryContentContainer {
|
|
42
|
-
constructor() {
|
|
43
|
-
this.files = new Map();
|
|
44
|
-
}
|
|
45
|
-
async readFile(path) {
|
|
46
|
-
return this.files.get(path)?.data ?? null;
|
|
47
|
-
}
|
|
48
|
-
async writeFile(path, data, mimeType) {
|
|
49
|
-
// Copy to a standalone ArrayBuffer. Uint8Array/Buffer may share a larger
|
|
50
|
-
// backing buffer (e.g., Node's buffer pool), so we must slice to the
|
|
51
|
-
// exact byte range to avoid storing stale pool data.
|
|
52
|
-
let buffer;
|
|
53
|
-
if (data instanceof ArrayBuffer) {
|
|
54
|
-
buffer = data;
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
buffer = data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength);
|
|
58
|
-
}
|
|
59
|
-
this.files.set(path, {
|
|
60
|
-
data: buffer,
|
|
61
|
-
mimeType: mimeType ?? guessMimeType(path),
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
async removeFile(path) {
|
|
65
|
-
this.files.delete(path);
|
|
66
|
-
}
|
|
67
|
-
async listFiles(prefix) {
|
|
68
|
-
const entries = [];
|
|
69
|
-
for (const [path, file] of this.files) {
|
|
70
|
-
if (prefix && !path.startsWith(prefix))
|
|
71
|
-
continue;
|
|
72
|
-
entries.push({
|
|
73
|
-
path,
|
|
74
|
-
mimeType: file.mimeType,
|
|
75
|
-
size: file.data.byteLength,
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
return entries;
|
|
79
|
-
}
|
|
80
|
-
async exists(path) {
|
|
81
|
-
return this.files.has(path);
|
|
82
|
-
}
|
|
83
|
-
async getDocumentPath() {
|
|
84
|
-
return findDocumentPath(await this.listFiles());
|
|
85
|
-
}
|
|
86
|
-
async readDocument() {
|
|
87
|
-
const docPath = await this.getDocumentPath();
|
|
88
|
-
if (!docPath)
|
|
89
|
-
return null;
|
|
90
|
-
const data = await this.readFile(docPath);
|
|
91
|
-
if (!data)
|
|
92
|
-
return null;
|
|
93
|
-
return new TextDecoder().decode(data);
|
|
94
|
-
}
|
|
95
|
-
async writeDocument(markdown, filename) {
|
|
96
|
-
const name = filename ?? 'index.md';
|
|
97
|
-
const data = new TextEncoder().encode(markdown);
|
|
98
|
-
await this.writeFile(name, data, 'text/markdown');
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
// ============================================
|
|
102
|
-
// MIME type guessing
|
|
103
|
-
// ============================================
|
|
104
|
-
const EXTENSION_MIME_MAP = {
|
|
105
|
-
'.md': 'text/markdown',
|
|
106
|
-
'.txt': 'text/plain',
|
|
107
|
-
'.json': 'application/json',
|
|
108
|
-
'.jpg': 'image/jpeg',
|
|
109
|
-
'.jpeg': 'image/jpeg',
|
|
110
|
-
'.png': 'image/png',
|
|
111
|
-
'.gif': 'image/gif',
|
|
112
|
-
'.svg': 'image/svg+xml',
|
|
113
|
-
'.webp': 'image/webp',
|
|
114
|
-
'.avif': 'image/avif',
|
|
115
|
-
'.mp4': 'video/mp4',
|
|
116
|
-
'.webm': 'video/webm',
|
|
117
|
-
'.mp3': 'audio/mpeg',
|
|
118
|
-
'.wav': 'audio/wav',
|
|
119
|
-
'.ogg': 'audio/ogg',
|
|
120
|
-
'.css': 'text/css',
|
|
121
|
-
'.html': 'text/html',
|
|
122
|
-
'.js': 'application/javascript',
|
|
123
|
-
};
|
|
124
|
-
function guessMimeType(path) {
|
|
125
|
-
const dot = path.lastIndexOf('.');
|
|
126
|
-
if (dot === -1)
|
|
127
|
-
return 'application/octet-stream';
|
|
128
|
-
const ext = path.slice(dot).toLowerCase();
|
|
129
|
-
return EXTENSION_MIME_MAP[ext] ?? 'application/octet-stream';
|
|
130
|
-
}
|
|
131
|
-
//# sourceMappingURL=ContentContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentContainer.js","sourceRoot":"","sources":["../../src/storage/ContentContainer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA6DH,+CAA+C;AAC/C,kDAAkD;AAClD,+CAA+C;AAE/C,MAAM,iBAAiB,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC;AAEhE;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAuB;IACtD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ks.
|
|
3
|
-
*
|
|
4
|
-
* Uses localforage which provides IndexedDB storage with automatic
|
|
5
|
-
* fallbacks to WebSQL and localStorage. This allows storing much more
|
|
6
|
-
* data than raw localStorage (which is limited to ~5MB).
|
|
7
|
-
*
|
|
8
|
-
* Unlike LocalStorageAdapter, this adapter can store binary data
|
|
9
|
-
* (ArrayBuffer, Blob, Uint8Array) natively without JSON serialization.
|
|
10
|
-
*
|
|
11
|
-
* Ported from qualla-internal/shared/services/StorageAdapters.ts with
|
|
12
|
-
* configurable store name and key prefix.
|
|
13
|
-
*/
|
|
14
|
-
import type { StorageAdapter } from './Storage.js';
|
|
15
|
-
export interface LocalForageAdapterOptions {
|
|
16
|
-
/** IndexedDB database name (default: 'squisq') */
|
|
17
|
-
name?: string;
|
|
18
|
-
/** IndexedDB object store name (default: 'data') */
|
|
19
|
-
storeName?: string;
|
|
20
|
-
/** Key prefix for namespacing (default: '') */
|
|
21
|
-
prefix?: string;
|
|
22
|
-
/** Human-readable description (default: 'Squisq storage') */
|
|
23
|
-
description?: string;
|
|
24
|
-
}
|
|
25
|
-
export declare class LocalForageAdapter implements StorageAdapter {
|
|
26
|
-
readonly supportsEnumeration = true;
|
|
27
|
-
private store;
|
|
28
|
-
private prefix;
|
|
29
|
-
constructor(options?: LocalForageAdapterOptions);
|
|
30
|
-
get<T>(key: string): Promise<T | null>;
|
|
31
|
-
set<T>(key: string, value: T): Promise<void>;
|
|
32
|
-
remove(key: string): Promise<void>;
|
|
33
|
-
clear(): Promise<void>;
|
|
34
|
-
keys(): Promise<string[]>;
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=LocalForageAdapter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LocalForageAdapter.d.ts","sourceRoot":"","sources":["../../src/storage/LocalForageAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,MAAM,WAAW,yBAAyB;IACxC,kDAAkD;IAClD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,kBAAmB,YAAW,cAAc;IACvD,QAAQ,CAAC,mBAAmB,QAAQ;IACpC,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,MAAM,CAAS;gBAEX,OAAO,GAAE,yBAA8B;IAY7C,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAUtC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAS5C,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQlC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAgBtB,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAchC"}
|