@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,84 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Layout Strategy
|
|
3
|
-
*
|
|
4
|
-
* Provides orientation-specific layout hints for slide templates.
|
|
5
|
-
* Templates use these hints to position content appropriately for
|
|
6
|
-
* different aspect ratios (landscape, portrait, square).
|
|
7
|
-
*
|
|
8
|
-
* Key adaptations by orientation:
|
|
9
|
-
* - Portrait: Larger relative text, stacked layouts instead of side-by-side
|
|
10
|
-
* - Square: Balanced layout with moderate adjustments
|
|
11
|
-
* - Landscape: Default/reference layout
|
|
12
|
-
*/
|
|
13
|
-
import type { ViewportOrientation, ViewportConfig } from './Viewport.js';
|
|
14
|
-
/**
|
|
15
|
-
* Layout hints for template positioning based on orientation.
|
|
16
|
-
*/
|
|
17
|
-
export interface LayoutHints {
|
|
18
|
-
/** Primary content Y position (percentage string, e.g., "35%") */
|
|
19
|
-
primaryY: string;
|
|
20
|
-
/** Secondary content Y position (percentage string) */
|
|
21
|
-
secondaryY: string;
|
|
22
|
-
/** Tertiary/detail Y position (percentage string) */
|
|
23
|
-
tertiaryY: string;
|
|
24
|
-
/** Title font size multiplier (relative to base) */
|
|
25
|
-
titleScale: number;
|
|
26
|
-
/** Body text font size multiplier (relative to base) */
|
|
27
|
-
bodyScale: number;
|
|
28
|
-
/** Two-column: left X position (percentage string) */
|
|
29
|
-
columnLeftX: string;
|
|
30
|
-
/** Two-column: right X position (percentage string) */
|
|
31
|
-
columnRightX: string;
|
|
32
|
-
/** Two-column in portrait: top Y position for stacked layout */
|
|
33
|
-
columnTopY: string;
|
|
34
|
-
/** Two-column in portrait: bottom Y position for stacked layout */
|
|
35
|
-
columnBottomY: string;
|
|
36
|
-
/** Whether two-column should stack vertically */
|
|
37
|
-
stackColumns: boolean;
|
|
38
|
-
/** Max text width (percentage string) for wrapping */
|
|
39
|
-
maxTextWidth: string;
|
|
40
|
-
/** Horizontal padding from edges (percentage string) */
|
|
41
|
-
horizontalPadding: string;
|
|
42
|
-
/** Caption position Y for imageWithCaption (percentage string) */
|
|
43
|
-
captionY: string;
|
|
44
|
-
/** Caption font size multiplier */
|
|
45
|
-
captionScale: number;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Get layout hints for a given orientation.
|
|
49
|
-
*/
|
|
50
|
-
export declare function getLayoutHints(orientation: ViewportOrientation): LayoutHints;
|
|
51
|
-
/**
|
|
52
|
-
* Calculate a scaled font size based on viewport and layout hints.
|
|
53
|
-
*
|
|
54
|
-
* @param basePx - Base font size in pixels (designed for 1920x1080)
|
|
55
|
-
* @param viewport - Target viewport configuration
|
|
56
|
-
* @param orientation - Viewport orientation
|
|
57
|
-
* @param isTitle - Whether this is title text (uses titleScale) or body (uses bodyScale)
|
|
58
|
-
*/
|
|
59
|
-
export declare function scaledFontSize(basePx: number, viewport: ViewportConfig, orientation: ViewportOrientation, isTitle?: boolean): number;
|
|
60
|
-
/**
|
|
61
|
-
* Get position for two-column layout based on orientation.
|
|
62
|
-
* Returns { left: {x, y}, right: {x, y} } positions.
|
|
63
|
-
*/
|
|
64
|
-
export declare function getTwoColumnPositions(orientation: ViewportOrientation): {
|
|
65
|
-
left: {
|
|
66
|
-
x: string;
|
|
67
|
-
y: string;
|
|
68
|
-
};
|
|
69
|
-
right: {
|
|
70
|
-
x: string;
|
|
71
|
-
y: string;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
/**
|
|
75
|
-
* Get safe text bounds for a given orientation.
|
|
76
|
-
* Returns margins to keep text away from edges.
|
|
77
|
-
*/
|
|
78
|
-
export declare function getSafeTextBounds(orientation: ViewportOrientation): {
|
|
79
|
-
left: string;
|
|
80
|
-
right: string;
|
|
81
|
-
top: string;
|
|
82
|
-
bottom: string;
|
|
83
|
-
};
|
|
84
|
-
//# sourceMappingURL=LayoutStrategy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutStrategy.d.ts","sourceRoot":"","sources":["../../src/schemas/LayoutStrategy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGzE;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,UAAU,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,SAAS,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,WAAW,EAAE,MAAM,CAAC;IACpB,uDAAuD;IACvD,YAAY,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,UAAU,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,aAAa,EAAE,MAAM,CAAC;IACtB,iDAAiD;IACjD,YAAY,EAAE,OAAO,CAAC;IACtB,sDAAsD;IACtD,YAAY,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,YAAY,EAAE,MAAM,CAAC;CACtB;AA4DD;;GAEG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,mBAAmB,GAAG,WAAW,CAE5E;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,cAAc,EACxB,WAAW,EAAE,mBAAmB,EAChC,OAAO,GAAE,OAAe,GACvB,MAAM,CAKR;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,mBAAmB,GAAG;IACvE,IAAI,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/B,KAAK,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACjC,CAgBA;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,mBAAmB,GAAG;IACnE,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB,CAQA"}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Layout Strategy
|
|
3
|
-
*
|
|
4
|
-
* Provides orientation-specific layout hints for slide templates.
|
|
5
|
-
* Templates use these hints to position content appropriately for
|
|
6
|
-
* different aspect ratios (landscape, portrait, square).
|
|
7
|
-
*
|
|
8
|
-
* Key adaptations by orientation:
|
|
9
|
-
* - Portrait: Larger relative text, stacked layouts instead of side-by-side
|
|
10
|
-
* - Square: Balanced layout with moderate adjustments
|
|
11
|
-
* - Landscape: Default/reference layout
|
|
12
|
-
*/
|
|
13
|
-
import { calculateFontScale } from './Viewport.js';
|
|
14
|
-
/**
|
|
15
|
-
* Layout configurations by orientation.
|
|
16
|
-
*/
|
|
17
|
-
const LAYOUT_CONFIGS = {
|
|
18
|
-
landscape: {
|
|
19
|
-
primaryY: '35%',
|
|
20
|
-
secondaryY: '55%',
|
|
21
|
-
tertiaryY: '75%',
|
|
22
|
-
titleScale: 1.0,
|
|
23
|
-
bodyScale: 1.0,
|
|
24
|
-
columnLeftX: '25%',
|
|
25
|
-
columnRightX: '75%',
|
|
26
|
-
columnTopY: '35%',
|
|
27
|
-
columnBottomY: '65%',
|
|
28
|
-
stackColumns: false,
|
|
29
|
-
maxTextWidth: '80%',
|
|
30
|
-
horizontalPadding: '10%',
|
|
31
|
-
captionY: '85%',
|
|
32
|
-
captionScale: 1.0,
|
|
33
|
-
},
|
|
34
|
-
portrait: {
|
|
35
|
-
// Content positioned higher for thumb-reach zone on mobile
|
|
36
|
-
primaryY: '25%',
|
|
37
|
-
secondaryY: '42%',
|
|
38
|
-
tertiaryY: '58%',
|
|
39
|
-
// Titles scale down for narrower width; body text scales up to fill vertical space
|
|
40
|
-
titleScale: 0.7,
|
|
41
|
-
bodyScale: 1.5,
|
|
42
|
-
// Stacked columns instead of side-by-side
|
|
43
|
-
columnLeftX: '50%',
|
|
44
|
-
columnRightX: '50%',
|
|
45
|
-
columnTopY: '30%',
|
|
46
|
-
columnBottomY: '55%',
|
|
47
|
-
stackColumns: true,
|
|
48
|
-
// Wider relative to viewport to use available space
|
|
49
|
-
maxTextWidth: '90%',
|
|
50
|
-
horizontalPadding: '5%',
|
|
51
|
-
captionY: '75%',
|
|
52
|
-
captionScale: 0.85,
|
|
53
|
-
},
|
|
54
|
-
square: {
|
|
55
|
-
primaryY: '30%',
|
|
56
|
-
secondaryY: '50%',
|
|
57
|
-
tertiaryY: '70%',
|
|
58
|
-
titleScale: 0.85,
|
|
59
|
-
bodyScale: 0.9,
|
|
60
|
-
columnLeftX: '25%',
|
|
61
|
-
columnRightX: '75%',
|
|
62
|
-
columnTopY: '35%',
|
|
63
|
-
columnBottomY: '65%',
|
|
64
|
-
stackColumns: false,
|
|
65
|
-
maxTextWidth: '85%',
|
|
66
|
-
horizontalPadding: '7.5%',
|
|
67
|
-
captionY: '82%',
|
|
68
|
-
captionScale: 0.9,
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* Get layout hints for a given orientation.
|
|
73
|
-
*/
|
|
74
|
-
export function getLayoutHints(orientation) {
|
|
75
|
-
return LAYOUT_CONFIGS[orientation];
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Calculate a scaled font size based on viewport and layout hints.
|
|
79
|
-
*
|
|
80
|
-
* @param basePx - Base font size in pixels (designed for 1920x1080)
|
|
81
|
-
* @param viewport - Target viewport configuration
|
|
82
|
-
* @param orientation - Viewport orientation
|
|
83
|
-
* @param isTitle - Whether this is title text (uses titleScale) or body (uses bodyScale)
|
|
84
|
-
*/
|
|
85
|
-
export function scaledFontSize(basePx, viewport, orientation, isTitle = false) {
|
|
86
|
-
const fontScale = calculateFontScale(viewport);
|
|
87
|
-
const layout = getLayoutHints(orientation);
|
|
88
|
-
const typeScale = isTitle ? layout.titleScale : layout.bodyScale;
|
|
89
|
-
return Math.round(basePx * fontScale * typeScale);
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Get position for two-column layout based on orientation.
|
|
93
|
-
* Returns { left: {x, y}, right: {x, y} } positions.
|
|
94
|
-
*/
|
|
95
|
-
export function getTwoColumnPositions(orientation) {
|
|
96
|
-
const layout = getLayoutHints(orientation);
|
|
97
|
-
if (layout.stackColumns) {
|
|
98
|
-
// Portrait: stack vertically
|
|
99
|
-
return {
|
|
100
|
-
left: { x: '50%', y: layout.columnTopY },
|
|
101
|
-
right: { x: '50%', y: layout.columnBottomY },
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
// Landscape/square: side by side
|
|
105
|
-
return {
|
|
106
|
-
left: { x: layout.columnLeftX, y: '50%' },
|
|
107
|
-
right: { x: layout.columnRightX, y: '50%' },
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Get safe text bounds for a given orientation.
|
|
112
|
-
* Returns margins to keep text away from edges.
|
|
113
|
-
*/
|
|
114
|
-
export function getSafeTextBounds(orientation) {
|
|
115
|
-
const layout = getLayoutHints(orientation);
|
|
116
|
-
return {
|
|
117
|
-
left: layout.horizontalPadding,
|
|
118
|
-
right: layout.horizontalPadding,
|
|
119
|
-
top: '10%',
|
|
120
|
-
bottom: '10%',
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
//# sourceMappingURL=LayoutStrategy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutStrategy.js","sourceRoot":"","sources":["../../src/schemas/LayoutStrategy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAoCnD;;GAEG;AACH,MAAM,cAAc,GAA6C;IAC/D,SAAS,EAAE;QACT,QAAQ,EAAE,KAAK;QACf,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,KAAK;QAChB,UAAU,EAAE,GAAG;QACf,SAAS,EAAE,GAAG;QACd,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,KAAK;QACnB,UAAU,EAAE,KAAK;QACjB,aAAa,EAAE,KAAK;QACpB,YAAY,EAAE,KAAK;QACnB,YAAY,EAAE,KAAK;QACnB,iBAAiB,EAAE,KAAK;QACxB,QAAQ,EAAE,KAAK;QACf,YAAY,EAAE,GAAG;KAClB;IACD,QAAQ,EAAE;QACR,2DAA2D;QAC3D,QAAQ,EAAE,KAAK;QACf,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,KAAK;QAChB,mFAAmF;QACnF,UAAU,EAAE,GAAG;QACf,SAAS,EAAE,GAAG;QACd,0CAA0C;QAC1C,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,KAAK;QACnB,UAAU,EAAE,KAAK;QACjB,aAAa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EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,CAAC,UAAU,EAAE;YACxC,KAAK,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,CAAC,aAAa,EAAE;SAC7C,CAAC;IACJ,CAAC;IAED,iCAAiC;IACjC,OAAO;QACL,IAAI,EAAE,EAAE,CAAC,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC,EAAE,KAAK,EAAE;QACzC,KAAK,EAAE,EAAE,CAAC,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,EAAE,KAAK,EAAE;KAC5C,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,WAAgC;IAMhE,MAAM,MAAM,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;IAC3C,OAAO;QACL,IAAI,EAAE,MAAM,CAAC,iBAAiB;QAC9B,KAAK,EAAE,MAAM,CAAC,iBAAiB;QAC/B,GAAG,EAAE,KAAK;QACV,MAAM,EAAE,KAAK;KACd,CAAC;AACJ,CAAC"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MediaProvider — abstract interface for resolving and managing media assets.
|
|
3
|
-
*
|
|
4
|
-
* Components (ImageLayer, VideoLayer, editor preview) use a MediaProvider to
|
|
5
|
-
* resolve relative media paths to displayable URLs and to manage media storage.
|
|
6
|
-
*
|
|
7
|
-
* This decouples the rendering layer from the storage backend:
|
|
8
|
-
* - In the dev site, a SlotStorage-backed provider serves blob URLs from IndexedDB
|
|
9
|
-
* - In production, a simple basePath provider constructs CDN URLs
|
|
10
|
-
* - In tests, a memory-backed provider returns data URIs
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Metadata about a stored media asset.
|
|
14
|
-
*/
|
|
15
|
-
export interface MediaEntry {
|
|
16
|
-
/** Filename (e.g., 'hero.jpg') */
|
|
17
|
-
name: string;
|
|
18
|
-
/** MIME type (e.g., 'image/jpeg') */
|
|
19
|
-
mimeType: string;
|
|
20
|
-
/** File size in bytes */
|
|
21
|
-
size: number;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Interface for resolving and managing media assets.
|
|
25
|
-
*
|
|
26
|
-
* All methods are async to support IndexedDB and other async storage backends.
|
|
27
|
-
* The `resolveUrl` method is the primary integration point for rendering
|
|
28
|
-
* components — it converts a relative media path into a displayable URL.
|
|
29
|
-
*/
|
|
30
|
-
export interface MediaProvider {
|
|
31
|
-
/**
|
|
32
|
-
* Resolve a relative media path to a displayable URL.
|
|
33
|
-
*
|
|
34
|
-
* Returns a URL that can be used in <img src>, <video src>, etc.
|
|
35
|
-
* This may be a blob: URL, data: URL, or absolute HTTP URL depending
|
|
36
|
-
* on the provider implementation.
|
|
37
|
-
*
|
|
38
|
-
* @param relativePath - Relative path as stored in the document (e.g., 'hero.jpg')
|
|
39
|
-
* @returns Displayable URL, or the original path if resolution fails
|
|
40
|
-
*/
|
|
41
|
-
resolveUrl(relativePath: string): Promise<string>;
|
|
42
|
-
/**
|
|
43
|
-
* List all media assets available in this provider's scope.
|
|
44
|
-
*/
|
|
45
|
-
listMedia(): Promise<MediaEntry[]>;
|
|
46
|
-
/**
|
|
47
|
-
* Add a media asset. Returns the relative path to reference in documents.
|
|
48
|
-
*
|
|
49
|
-
* @param name - Filename for the asset (e.g., 'photo.jpg')
|
|
50
|
-
* @param data - Binary content (ArrayBuffer, Blob, or Uint8Array)
|
|
51
|
-
* @param mimeType - MIME type of the data
|
|
52
|
-
* @returns The relative path to use in document references
|
|
53
|
-
*/
|
|
54
|
-
addMedia(name: string, data: ArrayBuffer | Blob | Uint8Array, mimeType: string): Promise<string>;
|
|
55
|
-
/**
|
|
56
|
-
* Remove a media asset by its relative path.
|
|
57
|
-
*/
|
|
58
|
-
removeMedia(relativePath: string): Promise<void>;
|
|
59
|
-
/**
|
|
60
|
-
* Dispose of any held resources (e.g., revoke blob URLs).
|
|
61
|
-
* Call this when the provider is no longer needed.
|
|
62
|
-
*/
|
|
63
|
-
dispose(): void;
|
|
64
|
-
}
|
|
65
|
-
//# sourceMappingURL=MediaProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MediaProvider.d.ts","sourceRoot":"","sources":["../../src/schemas/MediaProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,qCAAqC;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;;;;;;OASG;IACH,UAAU,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAElD;;OAEG;IACH,SAAS,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IAEnC;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEjG;;OAEG;IACH,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjD;;;OAGG;IACH,OAAO,IAAI,IAAI,CAAC;CACjB"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MediaProvider — abstract interface for resolving and managing media assets.
|
|
3
|
-
*
|
|
4
|
-
* Components (ImageLayer, VideoLayer, editor preview) use a MediaProvider to
|
|
5
|
-
* resolve relative media paths to displayable URLs and to manage media storage.
|
|
6
|
-
*
|
|
7
|
-
* This decouples the rendering layer from the storage backend:
|
|
8
|
-
* - In the dev site, a SlotStorage-backed provider serves blob URLs from IndexedDB
|
|
9
|
-
* - In production, a simple basePath provider constructs CDN URLs
|
|
10
|
-
* - In tests, a memory-backed provider returns data URIs
|
|
11
|
-
*/
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=MediaProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MediaProvider.js","sourceRoot":"","sources":["../../src/schemas/MediaProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
|
package/dist/schemas/Theme.d.ts
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Theme System
|
|
3
|
-
*
|
|
4
|
-
* A Theme bundles color palette, typography, visual style, render-style
|
|
5
|
-
* algorithm, and per-block color schemes into one JSON-serializable object.
|
|
6
|
-
* Builders choose a theme from the built-in library or create a custom one
|
|
7
|
-
* via `createTheme(base, overrides)`.
|
|
8
|
-
*
|
|
9
|
-
* Design principles:
|
|
10
|
-
* - Fully JSON-serializable (no functions) — storable in config / APIs.
|
|
11
|
-
* - Doc carries an optional `themeId` pointer; resolution happens at render time.
|
|
12
|
-
* - `createTheme` deep-merges a base theme with partial overrides.
|
|
13
|
-
*/
|
|
14
|
-
import type { LayoutHints } from './LayoutStrategy.js';
|
|
15
|
-
import type { AnimationType, TransitionType } from './Doc.js';
|
|
16
|
-
import type { PersistentLayerConfig } from './BlockTemplates.js';
|
|
17
|
-
/**
|
|
18
|
-
* Core color palette for a theme. Every color is a CSS color string.
|
|
19
|
-
*/
|
|
20
|
-
export interface ThemeColorPalette {
|
|
21
|
-
/** Primary accent color */
|
|
22
|
-
primary: string;
|
|
23
|
-
/** Secondary accent color */
|
|
24
|
-
secondary: string;
|
|
25
|
-
/** Background color (typically dark) */
|
|
26
|
-
background: string;
|
|
27
|
-
/** Lighter background for contrast panels */
|
|
28
|
-
backgroundLight: string;
|
|
29
|
-
/** Main text color */
|
|
30
|
-
text: string;
|
|
31
|
-
/** Muted/secondary text color */
|
|
32
|
-
textMuted: string;
|
|
33
|
-
/** Highlight/emphasis color */
|
|
34
|
-
highlight: string;
|
|
35
|
-
/** Warning/alert color */
|
|
36
|
-
warning: string;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* A named color scheme used by templates for per-block color variation
|
|
40
|
-
* (e.g., statHighlight or sectionHeader).
|
|
41
|
-
*/
|
|
42
|
-
export interface ThemeColorScheme {
|
|
43
|
-
/** Background fill */
|
|
44
|
-
bg: string;
|
|
45
|
-
/** Primary text tint */
|
|
46
|
-
text: string;
|
|
47
|
-
/** Accent / secondary tint */
|
|
48
|
-
accent: string;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Typography settings for a theme.
|
|
52
|
-
*/
|
|
53
|
-
export interface ThemeTypography {
|
|
54
|
-
/** Font family for body / description text */
|
|
55
|
-
bodyFontFamily: string;
|
|
56
|
-
/** Font family for titles and headings */
|
|
57
|
-
titleFontFamily: string;
|
|
58
|
-
/** Font family for code / monospaced text (optional) */
|
|
59
|
-
monoFontFamily?: string;
|
|
60
|
-
/** Multiplier applied to LayoutHints.titleScale (default 1.0) */
|
|
61
|
-
titleScale?: number;
|
|
62
|
-
/** Multiplier applied to LayoutHints.bodyScale (default 1.0) */
|
|
63
|
-
bodyScale?: number;
|
|
64
|
-
/** Default body line height (default 1.4) */
|
|
65
|
-
lineHeight?: number;
|
|
66
|
-
/** Default title line height */
|
|
67
|
-
titleLineHeight?: number;
|
|
68
|
-
/** Default title font weight */
|
|
69
|
-
titleWeight?: 'normal' | 'bold';
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Global visual-style knobs that templates consult.
|
|
73
|
-
*/
|
|
74
|
-
export interface ThemeStyle {
|
|
75
|
-
/** Default border radius for cards / shapes (px) */
|
|
76
|
-
borderRadius?: number;
|
|
77
|
-
/** Whether templates should default to text shadows */
|
|
78
|
-
textShadow?: boolean;
|
|
79
|
-
/** Darkness of overlay on image-backed blocks (0–1) */
|
|
80
|
-
overlayOpacity?: number;
|
|
81
|
-
/** Multiplier on all animation durations (1.0 = normal, <1 faster, >1 slower) */
|
|
82
|
-
animationSpeed?: number;
|
|
83
|
-
/** Default horizontal padding for text (percentage string, e.g. "5%") */
|
|
84
|
-
blockPadding?: string;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Render-style algorithm preset. Controls layout tweaks, default animations,
|
|
88
|
-
* transitions, and per-template behavioral hints.
|
|
89
|
-
*/
|
|
90
|
-
export interface RenderStyle {
|
|
91
|
-
/** Identifier for this algorithmic approach (e.g. "documentary", "magazine") */
|
|
92
|
-
name: string;
|
|
93
|
-
/** Partial overrides merged onto the orientation-based LayoutHints */
|
|
94
|
-
layoutOverrides?: Partial<LayoutHints>;
|
|
95
|
-
/** Default entrance animation for text layers */
|
|
96
|
-
defaultTextAnimation?: AnimationType;
|
|
97
|
-
/** Default animation for background / image layers */
|
|
98
|
-
defaultImageAnimation?: AnimationType;
|
|
99
|
-
/** Whether to apply Ken Burns ambient motion to images by default */
|
|
100
|
-
ambientMotion?: boolean;
|
|
101
|
-
/** Default block-to-block transition */
|
|
102
|
-
defaultTransition?: {
|
|
103
|
-
type: TransitionType;
|
|
104
|
-
duration?: number;
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* Per-template behavioral hints. Keys are template names, values are
|
|
108
|
-
* string/number/boolean maps that templates can read to vary their output.
|
|
109
|
-
*
|
|
110
|
-
* @example
|
|
111
|
-
* ```
|
|
112
|
-
* { statHighlight: { entrance: 'dramatic' }, titleBlock: { showAccentLine: false } }
|
|
113
|
-
* ```
|
|
114
|
-
*/
|
|
115
|
-
templateHints?: Record<string, Record<string, string | number | boolean>>;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* A complete, JSON-serializable theme definition.
|
|
119
|
-
*/
|
|
120
|
-
export interface Theme {
|
|
121
|
-
/** Unique identifier (e.g. "documentary") */
|
|
122
|
-
id: string;
|
|
123
|
-
/** Human-readable display name */
|
|
124
|
-
name: string;
|
|
125
|
-
/** Short description for theme pickers */
|
|
126
|
-
description?: string;
|
|
127
|
-
/** Color palette */
|
|
128
|
-
colors: ThemeColorPalette;
|
|
129
|
-
/** Typography settings */
|
|
130
|
-
typography: ThemeTypography;
|
|
131
|
-
/** Global visual-style knobs */
|
|
132
|
-
style: ThemeStyle;
|
|
133
|
-
/** Algorithmic render-style preset */
|
|
134
|
-
renderStyle: RenderStyle;
|
|
135
|
-
/**
|
|
136
|
-
* Named color schemes for per-block color variation.
|
|
137
|
-
* Templates reference these by name (e.g. "blue", "warm").
|
|
138
|
-
*/
|
|
139
|
-
colorSchemes: Record<string, ThemeColorScheme>;
|
|
140
|
-
/** Optional persistent layers baked into the theme */
|
|
141
|
-
persistentLayers?: PersistentLayerConfig;
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Recursively makes every property optional.
|
|
145
|
-
*/
|
|
146
|
-
export type DeepPartial<T> = {
|
|
147
|
-
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
148
|
-
};
|
|
149
|
-
/**
|
|
150
|
-
* Create a new theme by deep-merging overrides onto a base theme.
|
|
151
|
-
* The returned theme gets its own `id` if one is provided in overrides,
|
|
152
|
-
* otherwise keeps the base theme's `id` suffixed with "-custom".
|
|
153
|
-
*
|
|
154
|
-
* @example
|
|
155
|
-
* ```ts
|
|
156
|
-
* const myTheme = createTheme(THEMES.documentary, {
|
|
157
|
-
* colors: { primary: '#ff0000' },
|
|
158
|
-
* typography: { bodyFontFamily: '"Inter", sans-serif' },
|
|
159
|
-
* });
|
|
160
|
-
* ```
|
|
161
|
-
*/
|
|
162
|
-
export declare function createTheme(base: Theme, overrides: DeepPartial<Theme>): Theme;
|
|
163
|
-
/**
|
|
164
|
-
* A Surface Scheme is the light/dark axis, orthogonal to the editorial
|
|
165
|
-
* identity of a Theme. A Theme chooses voice (serif vs sans, muted vs
|
|
166
|
-
* bold, documentary vs magazine); a SurfaceScheme chooses what the paper
|
|
167
|
-
* looks like. Any theme can render on either surface.
|
|
168
|
-
*
|
|
169
|
-
* When a SurfaceScheme is applied to a Theme (via `applySurface`), these
|
|
170
|
-
* fields override the corresponding entries in `ThemeColorPalette` —
|
|
171
|
-
* everything else (primary, highlight, warning, etc.) stays as the theme
|
|
172
|
-
* defined it.
|
|
173
|
-
*/
|
|
174
|
-
export interface SurfaceScheme {
|
|
175
|
-
/** Identifier — 'light', 'dark', or a custom id. */
|
|
176
|
-
id: string;
|
|
177
|
-
background: string;
|
|
178
|
-
backgroundLight: string;
|
|
179
|
-
text: string;
|
|
180
|
-
textMuted: string;
|
|
181
|
-
}
|
|
182
|
-
/** Near-white paper with dark text — standard light mode. */
|
|
183
|
-
export declare const LIGHT_SURFACE: SurfaceScheme;
|
|
184
|
-
/** Dark charcoal paper with light text — standard dark mode. */
|
|
185
|
-
export declare const DARK_SURFACE: SurfaceScheme;
|
|
186
|
-
/**
|
|
187
|
-
* Overlay a SurfaceScheme's surface colors onto a Theme's palette,
|
|
188
|
-
* leaving everything else (primary, highlight, warning, typography,
|
|
189
|
-
* style, renderStyle, colorSchemes) untouched. Returns a new Theme;
|
|
190
|
-
* callers that want to preserve the original's id should set it
|
|
191
|
-
* explicitly in the overrides.
|
|
192
|
-
*/
|
|
193
|
-
export declare function applySurface(theme: Theme, surface: SurfaceScheme): Theme;
|
|
194
|
-
//# sourceMappingURL=Theme.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Theme.d.ts","sourceRoot":"","sources":["../../src/schemas/Theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAMjE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,2BAA2B;IAC3B,OAAO,EAAE,MAAM,C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GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChE,CAAC;AAoCF;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,CAAC,KAAK,CAAC,GAAG,KAAK,CAS7E;AAMD;;;;;;;;;;GAUG;AACH,MAAM,WAAW,aAAa;IAC5B,oDAAoD;IACpD,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,6DAA6D;AAC7D,eAAO,MAAM,aAAa,EAAE,aAM3B,CAAC;AAEF,gEAAgE;AAChE,eAAO,MAAM,YAAY,EAAE,aAM1B,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,GAAG,KAAK,CAWxE"}
|
package/dist/schemas/Theme.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Theme System
|
|
3
|
-
*
|
|
4
|
-
* A Theme bundles color palette, typography, visual style, render-style
|
|
5
|
-
* algorithm, and per-block color schemes into one JSON-serializable object.
|
|
6
|
-
* Builders choose a theme from the built-in library or create a custom one
|
|
7
|
-
* via `createTheme(base, overrides)`.
|
|
8
|
-
*
|
|
9
|
-
* Design principles:
|
|
10
|
-
* - Fully JSON-serializable (no functions) — storable in config / APIs.
|
|
11
|
-
* - Doc carries an optional `themeId` pointer; resolution happens at render time.
|
|
12
|
-
* - `createTheme` deep-merges a base theme with partial overrides.
|
|
13
|
-
*/
|
|
14
|
-
// ============================================
|
|
15
|
-
// Helpers
|
|
16
|
-
// ============================================
|
|
17
|
-
/**
|
|
18
|
-
* Deep-merge `source` into `target`, returning a new object.
|
|
19
|
-
* Arrays are replaced wholesale (not concatenated).
|
|
20
|
-
*/
|
|
21
|
-
function deepMerge(target, source) {
|
|
22
|
-
const result = { ...target };
|
|
23
|
-
for (const key of Object.keys(source)) {
|
|
24
|
-
const srcVal = source[key];
|
|
25
|
-
const tgtVal = target[key];
|
|
26
|
-
if (srcVal !== null &&
|
|
27
|
-
srcVal !== undefined &&
|
|
28
|
-
typeof srcVal === 'object' &&
|
|
29
|
-
!Array.isArray(srcVal) &&
|
|
30
|
-
tgtVal !== null &&
|
|
31
|
-
tgtVal !== undefined &&
|
|
32
|
-
typeof tgtVal === 'object' &&
|
|
33
|
-
!Array.isArray(tgtVal)) {
|
|
34
|
-
result[key] = deepMerge(tgtVal, srcVal);
|
|
35
|
-
}
|
|
36
|
-
else if (srcVal !== undefined) {
|
|
37
|
-
result[key] = srcVal;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return result;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Create a new theme by deep-merging overrides onto a base theme.
|
|
44
|
-
* The returned theme gets its own `id` if one is provided in overrides,
|
|
45
|
-
* otherwise keeps the base theme's `id` suffixed with "-custom".
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* ```ts
|
|
49
|
-
* const myTheme = createTheme(THEMES.documentary, {
|
|
50
|
-
* colors: { primary: '#ff0000' },
|
|
51
|
-
* typography: { bodyFontFamily: '"Inter", sans-serif' },
|
|
52
|
-
* });
|
|
53
|
-
* ```
|
|
54
|
-
*/
|
|
55
|
-
export function createTheme(base, overrides) {
|
|
56
|
-
const merged = deepMerge(base, overrides);
|
|
57
|
-
if (!overrides.id && merged.id === base.id) {
|
|
58
|
-
merged.id = `${base.id}-custom`;
|
|
59
|
-
}
|
|
60
|
-
return merged;
|
|
61
|
-
}
|
|
62
|
-
/** Near-white paper with dark text — standard light mode. */
|
|
63
|
-
export const LIGHT_SURFACE = {
|
|
64
|
-
id: 'light',
|
|
65
|
-
background: '#ffffff',
|
|
66
|
-
backgroundLight: '#f5f5f5',
|
|
67
|
-
text: '#1a1a1a',
|
|
68
|
-
textMuted: '#666666',
|
|
69
|
-
};
|
|
70
|
-
/** Dark charcoal paper with light text — standard dark mode. */
|
|
71
|
-
export const DARK_SURFACE = {
|
|
72
|
-
id: 'dark',
|
|
73
|
-
background: '#1a202c',
|
|
74
|
-
backgroundLight: '#2d3748',
|
|
75
|
-
text: '#f0f0f0',
|
|
76
|
-
textMuted: '#a0aec0',
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* Overlay a SurfaceScheme's surface colors onto a Theme's palette,
|
|
80
|
-
* leaving everything else (primary, highlight, warning, typography,
|
|
81
|
-
* style, renderStyle, colorSchemes) untouched. Returns a new Theme;
|
|
82
|
-
* callers that want to preserve the original's id should set it
|
|
83
|
-
* explicitly in the overrides.
|
|
84
|
-
*/
|
|
85
|
-
export function applySurface(theme, surface) {
|
|
86
|
-
return {
|
|
87
|
-
...theme,
|
|
88
|
-
colors: {
|
|
89
|
-
...theme.colors,
|
|
90
|
-
background: surface.background,
|
|
91
|
-
backgroundLight: surface.backgroundLight,
|
|
92
|
-
text: surface.text,
|
|
93
|
-
textMuted: surface.textMuted,
|
|
94
|
-
},
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
//# sourceMappingURL=Theme.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Theme.js","sourceRoot":"","sources":["../../src/schemas/Theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAsKH,+CAA+C;AAC/C,UAAU;AACV,+CAA+C;AAE/C;;;GAGG;AACH,SAAS,SAAS,CAAoC,MAAS,EAAE,MAAsB;IACrF,MAAM,MAAM,GAAG,EAAE,GAAG,MAAM,EAA6B,CAAC;IACxD,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACtC,MAAM,MAAM,GAAI,MAAkC,CAAC,GAAG,CAAC,CAAC;QACx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B,IAAI,EAAE,SAAS;IACf,SAAS,EAAE,SAAS;CACrB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,KAAY,EAAE,OAAsB;IAC/D,OAAO;QACL,GAAG,KAAK;QACR,MAAM,EAAE;YACN,GAAG,KAAK,CAAC,MAAM;YACf,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,eAAe,EAAE,OAAO,CAAC,eAAe;YACxC,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,SAAS,EAAE,OAAO,CAAC,SAAS;SAC7B;KACF,CAAC;AACJ,CAAC"}
|
package/dist/schemas/Types.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Core geographic types shared across squisq.
|
|
3
|
-
*/
|
|
4
|
-
export interface Coordinates {
|
|
5
|
-
lat: number;
|
|
6
|
-
lng: number;
|
|
7
|
-
}
|
|
8
|
-
export interface BoundingBox {
|
|
9
|
-
north: number;
|
|
10
|
-
south: number;
|
|
11
|
-
east: number;
|
|
12
|
-
west: number;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=Types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Types.d.ts","sourceRoot":"","sources":["../../src/schemas/Types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd"}
|
package/dist/schemas/Types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Types.js","sourceRoot":"","sources":["../../src/schemas/Types.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|