@bendyline/squisq 0.1.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{themeLibrary-DySHPcgj.d.ts → Doc-1hmT1LZl.d.ts} +1 -42
- package/dist/MediaProvider-wpSe21B3.d.ts +66 -0
- package/dist/__tests__/animationUtils.test.d.ts +2 -0
- package/dist/__tests__/animationUtils.test.d.ts.map +1 -0
- package/dist/__tests__/animationUtils.test.js +60 -0
- package/dist/__tests__/animationUtils.test.js.map +1 -0
- package/dist/__tests__/contentContainer.test.d.ts +2 -0
- package/dist/__tests__/contentContainer.test.d.ts.map +1 -0
- package/dist/__tests__/contentContainer.test.js +234 -0
- package/dist/__tests__/contentContainer.test.js.map +1 -0
- package/dist/__tests__/contentExtractor.test.d.ts +2 -0
- package/dist/__tests__/contentExtractor.test.d.ts.map +1 -0
- package/dist/__tests__/contentExtractor.test.js +151 -0
- package/dist/__tests__/contentExtractor.test.js.map +1 -0
- package/dist/__tests__/geohash.test.d.ts +2 -0
- package/dist/__tests__/geohash.test.d.ts.map +1 -0
- package/dist/__tests__/geohash.test.js +87 -0
- package/dist/__tests__/geohash.test.js.map +1 -0
- package/dist/__tests__/getLayers.test.d.ts +2 -0
- package/dist/__tests__/getLayers.test.d.ts.map +1 -0
- package/dist/__tests__/getLayers.test.js +167 -0
- package/dist/__tests__/getLayers.test.js.map +1 -0
- package/dist/__tests__/haversine.test.d.ts +2 -0
- package/dist/__tests__/haversine.test.d.ts.map +1 -0
- package/dist/__tests__/haversine.test.js +56 -0
- package/dist/__tests__/haversine.test.js.map +1 -0
- package/dist/__tests__/localForageAdapter.test.d.ts +8 -0
- package/dist/__tests__/localForageAdapter.test.d.ts.map +1 -0
- package/dist/__tests__/localForageAdapter.test.js +130 -0
- package/dist/__tests__/localForageAdapter.test.js.map +1 -0
- package/dist/__tests__/markdown.test.d.ts +2 -0
- package/dist/__tests__/markdown.test.d.ts.map +1 -0
- package/dist/__tests__/markdown.test.js +654 -0
- package/dist/__tests__/markdown.test.js.map +1 -0
- package/dist/__tests__/markdownToDoc.test.d.ts +2 -0
- package/dist/__tests__/markdownToDoc.test.d.ts.map +1 -0
- package/dist/__tests__/markdownToDoc.test.js +313 -0
- package/dist/__tests__/markdownToDoc.test.js.map +1 -0
- package/dist/__tests__/seededRandom.test.d.ts +2 -0
- package/dist/__tests__/seededRandom.test.d.ts.map +1 -0
- package/dist/__tests__/seededRandom.test.js +125 -0
- package/dist/__tests__/seededRandom.test.js.map +1 -0
- package/dist/__tests__/slideshowGenerator.test.d.ts +2 -0
- package/dist/__tests__/slideshowGenerator.test.d.ts.map +1 -0
- package/dist/__tests__/slideshowGenerator.test.js +114 -0
- package/dist/__tests__/slideshowGenerator.test.js.map +1 -0
- package/dist/__tests__/storage.test.d.ts +2 -0
- package/dist/__tests__/storage.test.d.ts.map +1 -0
- package/dist/__tests__/storage.test.js +51 -0
- package/dist/__tests__/storage.test.js.map +1 -0
- package/dist/__tests__/templates.test.d.ts +2 -0
- package/dist/__tests__/templates.test.d.ts.map +1 -0
- package/dist/__tests__/templates.test.js +217 -0
- package/dist/__tests__/templates.test.js.map +1 -0
- package/dist/__tests__/timing.test.d.ts +2 -0
- package/dist/__tests__/timing.test.d.ts.map +1 -0
- package/dist/__tests__/timing.test.js +131 -0
- package/dist/__tests__/timing.test.js.map +1 -0
- package/dist/chunk-3E5F2XMR.js +129 -0
- package/dist/chunk-3E5F2XMR.js.map +1 -0
- package/dist/chunk-4CRBS35L.js +292 -0
- package/dist/chunk-4CRBS35L.js.map +1 -0
- package/dist/chunk-6YJPI6VI.js +35 -0
- package/dist/chunk-6YJPI6VI.js.map +1 -0
- package/dist/chunk-FVTQSNR7.js +100 -0
- package/dist/chunk-FVTQSNR7.js.map +1 -0
- package/dist/chunk-V543AI2F.js +1 -0
- package/dist/chunk-V543AI2F.js.map +1 -0
- package/dist/chunk-VP5SZTZ2.js +792 -0
- package/dist/chunk-VP5SZTZ2.js.map +1 -0
- package/dist/doc/docToMarkdown.d.ts +41 -0
- package/dist/doc/docToMarkdown.d.ts.map +1 -0
- package/dist/doc/docToMarkdown.js +88 -0
- package/dist/doc/docToMarkdown.js.map +1 -0
- package/dist/doc/getLayers.d.ts +65 -0
- package/dist/doc/getLayers.d.ts.map +1 -0
- package/dist/doc/getLayers.js +103 -0
- package/dist/doc/getLayers.js.map +1 -0
- package/dist/doc/index.d.ts +9 -3
- package/dist/doc/index.d.ts.map +1 -0
- package/dist/doc/index.js +6 -125
- package/dist/doc/index.js.map +1 -1
- package/dist/doc/markdownToDoc.d.ts +68 -0
- package/dist/doc/markdownToDoc.d.ts.map +1 -0
- package/dist/doc/markdownToDoc.js +225 -0
- package/dist/doc/markdownToDoc.js.map +1 -0
- package/dist/doc/templates/accentImage.d.ts +59 -0
- package/dist/doc/templates/accentImage.d.ts.map +1 -0
- package/dist/doc/templates/accentImage.js +275 -0
- package/dist/doc/templates/accentImage.js.map +1 -0
- package/dist/doc/templates/captionUtils.d.ts +20 -0
- package/dist/doc/templates/captionUtils.d.ts.map +1 -0
- package/dist/doc/templates/captionUtils.js +29 -0
- package/dist/doc/templates/captionUtils.js.map +1 -0
- package/dist/doc/templates/comparisonBar.d.ts +13 -0
- package/dist/doc/templates/comparisonBar.d.ts.map +1 -0
- package/dist/doc/templates/comparisonBar.js +127 -0
- package/dist/doc/templates/comparisonBar.js.map +1 -0
- package/dist/doc/templates/coverBlock.d.ts +51 -0
- package/dist/doc/templates/coverBlock.d.ts.map +1 -0
- package/dist/doc/templates/coverBlock.js +125 -0
- package/dist/doc/templates/coverBlock.js.map +1 -0
- package/dist/doc/templates/dateEvent.d.ts +15 -0
- package/dist/doc/templates/dateEvent.d.ts.map +1 -0
- package/dist/doc/templates/dateEvent.js +110 -0
- package/dist/doc/templates/dateEvent.js.map +1 -0
- package/dist/doc/templates/definitionCard.d.ts +13 -0
- package/dist/doc/templates/definitionCard.d.ts.map +1 -0
- package/dist/doc/templates/definitionCard.js +114 -0
- package/dist/doc/templates/definitionCard.js.map +1 -0
- package/dist/doc/templates/factCard.d.ts +15 -0
- package/dist/doc/templates/factCard.d.ts.map +1 -0
- package/dist/doc/templates/factCard.js +100 -0
- package/dist/doc/templates/factCard.js.map +1 -0
- package/dist/doc/templates/fullBleedQuote.d.ts +13 -0
- package/dist/doc/templates/fullBleedQuote.d.ts.map +1 -0
- package/dist/doc/templates/fullBleedQuote.js +54 -0
- package/dist/doc/templates/fullBleedQuote.js.map +1 -0
- package/dist/doc/templates/imageWithCaption.d.ts +13 -0
- package/dist/doc/templates/imageWithCaption.d.ts.map +1 -0
- package/dist/doc/templates/imageWithCaption.js +142 -0
- package/dist/doc/templates/imageWithCaption.js.map +1 -0
- package/dist/doc/templates/index.d.ts +104 -0
- package/dist/doc/templates/index.d.ts.map +1 -0
- package/dist/doc/templates/index.js +442 -0
- package/dist/doc/templates/index.js.map +1 -0
- package/dist/doc/templates/listBlock.d.ts +13 -0
- package/dist/doc/templates/listBlock.d.ts.map +1 -0
- package/dist/doc/templates/listBlock.js +89 -0
- package/dist/doc/templates/listBlock.js.map +1 -0
- package/dist/doc/templates/mapBlock.d.ts +17 -0
- package/dist/doc/templates/mapBlock.d.ts.map +1 -0
- package/dist/doc/templates/mapBlock.js +112 -0
- package/dist/doc/templates/mapBlock.js.map +1 -0
- package/dist/doc/templates/persistentLayers.d.ts +39 -0
- package/dist/doc/templates/persistentLayers.d.ts.map +1 -0
- package/dist/doc/templates/persistentLayers.js +447 -0
- package/dist/doc/templates/persistentLayers.js.map +1 -0
- package/dist/doc/templates/photoGrid.d.ts +20 -0
- package/dist/doc/templates/photoGrid.d.ts.map +1 -0
- package/dist/doc/templates/photoGrid.js +172 -0
- package/dist/doc/templates/photoGrid.js.map +1 -0
- package/dist/doc/templates/pullQuote.d.ts +13 -0
- package/dist/doc/templates/pullQuote.d.ts.map +1 -0
- package/dist/doc/templates/pullQuote.js +109 -0
- package/dist/doc/templates/pullQuote.js.map +1 -0
- package/dist/doc/templates/quoteBlock.d.ts +15 -0
- package/dist/doc/templates/quoteBlock.d.ts.map +1 -0
- package/dist/doc/templates/quoteBlock.js +97 -0
- package/dist/doc/templates/quoteBlock.js.map +1 -0
- package/dist/doc/templates/sectionHeader.d.ts +14 -0
- package/dist/doc/templates/sectionHeader.d.ts.map +1 -0
- package/dist/doc/templates/sectionHeader.js +96 -0
- package/dist/doc/templates/sectionHeader.js.map +1 -0
- package/dist/doc/templates/statHighlight.d.ts +15 -0
- package/dist/doc/templates/statHighlight.d.ts.map +1 -0
- package/dist/doc/templates/statHighlight.js +99 -0
- package/dist/doc/templates/statHighlight.js.map +1 -0
- package/dist/doc/templates/titleBlock.d.ts +13 -0
- package/dist/doc/templates/titleBlock.d.ts.map +1 -0
- package/dist/doc/templates/titleBlock.js +92 -0
- package/dist/doc/templates/titleBlock.js.map +1 -0
- package/dist/doc/templates/twoColumn.d.ts +15 -0
- package/dist/doc/templates/twoColumn.d.ts.map +1 -0
- package/dist/doc/templates/twoColumn.js +219 -0
- package/dist/doc/templates/twoColumn.js.map +1 -0
- package/dist/doc/templates/videoPullQuote.d.ts +20 -0
- package/dist/doc/templates/videoPullQuote.d.ts.map +1 -0
- package/dist/doc/templates/videoPullQuote.js +118 -0
- package/dist/doc/templates/videoPullQuote.js.map +1 -0
- package/dist/doc/templates/videoWithCaption.d.ts +20 -0
- package/dist/doc/templates/videoWithCaption.d.ts.map +1 -0
- package/dist/doc/templates/videoWithCaption.js +104 -0
- package/dist/doc/templates/videoWithCaption.js.map +1 -0
- package/dist/doc/utils/animationUtils.d.ts +34 -0
- package/dist/doc/utils/animationUtils.d.ts.map +1 -0
- package/dist/doc/utils/animationUtils.js +110 -0
- package/dist/doc/utils/animationUtils.js.map +1 -0
- package/dist/doc/utils/themeUtils.d.ts +55 -0
- package/dist/doc/utils/themeUtils.d.ts.map +1 -0
- package/dist/doc/utils/themeUtils.js +109 -0
- package/dist/doc/utils/themeUtils.js.map +1 -0
- package/dist/generate/contentExtractor.d.ts +112 -0
- package/dist/generate/contentExtractor.d.ts.map +1 -0
- package/dist/generate/contentExtractor.js +638 -0
- package/dist/generate/contentExtractor.js.map +1 -0
- package/dist/generate/index.d.ts +7 -0
- package/dist/generate/index.d.ts.map +1 -0
- package/dist/generate/index.js +4 -0
- package/dist/generate/index.js.map +1 -0
- package/dist/generate/slideshowGenerator.d.ts +72 -0
- package/dist/generate/slideshowGenerator.d.ts.map +1 -0
- package/dist/generate/slideshowGenerator.js +159 -0
- package/dist/generate/slideshowGenerator.js.map +1 -0
- package/dist/generate/templateMapper.d.ts +23 -0
- package/dist/generate/templateMapper.d.ts.map +1 -0
- package/dist/generate/templateMapper.js +114 -0
- package/dist/generate/templateMapper.js.map +1 -0
- package/dist/index.d.ts +9 -8
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -216
- package/dist/index.js.map +1 -1
- package/dist/markdown/convert.d.ts +71 -0
- package/dist/markdown/convert.d.ts.map +1 -0
- package/dist/markdown/convert.js +746 -0
- package/dist/markdown/convert.js.map +1 -0
- package/dist/markdown/htmlParse.d.ts +26 -0
- package/dist/markdown/htmlParse.d.ts.map +1 -0
- package/dist/markdown/htmlParse.js +195 -0
- package/dist/markdown/htmlParse.js.map +1 -0
- package/dist/markdown/index.d.ts +19 -225
- package/dist/markdown/index.d.ts.map +1 -0
- package/dist/markdown/index.js +33 -32
- package/dist/markdown/index.js.map +1 -1
- package/dist/markdown/parse.d.ts +27 -0
- package/dist/markdown/parse.d.ts.map +1 -0
- package/dist/markdown/parse.js +90 -0
- package/dist/markdown/parse.js.map +1 -0
- package/dist/markdown/stringify.d.ts +32 -0
- package/dist/markdown/stringify.d.ts.map +1 -0
- package/dist/markdown/stringify.js +108 -0
- package/dist/markdown/stringify.js.map +1 -0
- package/dist/markdown/types.d.ts +496 -0
- package/dist/markdown/types.d.ts.map +1 -0
- package/dist/markdown/types.js +17 -0
- package/dist/markdown/types.js.map +1 -0
- package/dist/markdown/utils.d.ts +78 -0
- package/dist/markdown/utils.d.ts.map +1 -0
- package/dist/markdown/utils.js +149 -0
- package/dist/markdown/utils.js.map +1 -0
- package/dist/random/SeededRandom.d.ts +50 -0
- package/dist/random/SeededRandom.d.ts.map +1 -0
- package/dist/random/SeededRandom.js +115 -0
- package/dist/random/SeededRandom.js.map +1 -0
- package/dist/random/index.d.ts +2 -0
- package/dist/random/index.d.ts.map +1 -0
- package/dist/random/index.js +2 -0
- package/dist/random/index.js.map +1 -0
- package/dist/schemas/BlockTemplates.d.ts +583 -0
- package/dist/schemas/BlockTemplates.d.ts.map +1 -0
- package/dist/schemas/BlockTemplates.js +72 -0
- package/dist/schemas/BlockTemplates.js.map +1 -0
- package/dist/schemas/Doc.d.ts +411 -0
- package/dist/schemas/Doc.d.ts.map +1 -0
- package/dist/schemas/Doc.js +90 -0
- package/dist/schemas/Doc.js.map +1 -0
- package/dist/schemas/LayoutStrategy.d.ts +84 -0
- package/dist/schemas/LayoutStrategy.d.ts.map +1 -0
- package/dist/schemas/LayoutStrategy.js +123 -0
- package/dist/schemas/LayoutStrategy.js.map +1 -0
- package/dist/schemas/MediaProvider.d.ts +65 -0
- package/dist/schemas/MediaProvider.d.ts.map +1 -0
- package/dist/schemas/MediaProvider.js +13 -0
- package/dist/schemas/MediaProvider.js.map +1 -0
- package/dist/schemas/Theme.d.ts +163 -0
- package/dist/schemas/Theme.d.ts.map +1 -0
- package/dist/schemas/Theme.js +62 -0
- package/dist/schemas/Theme.js.map +1 -0
- package/dist/schemas/Types.d.ts +14 -0
- package/dist/schemas/Types.d.ts.map +1 -0
- package/dist/schemas/Types.js +5 -0
- package/dist/schemas/Types.js.map +1 -0
- package/dist/schemas/Viewport.d.ts +74 -0
- package/dist/schemas/Viewport.d.ts.map +1 -0
- package/dist/schemas/Viewport.js +63 -0
- package/dist/schemas/Viewport.js.map +1 -0
- package/dist/schemas/index.d.ts +10 -70
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +7 -60
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/themeLibrary.d.ts +41 -0
- package/dist/schemas/themeLibrary.d.ts.map +1 -0
- package/dist/schemas/themeLibrary.js +466 -0
- package/dist/schemas/themeLibrary.js.map +1 -0
- package/dist/spatial/Geohash.d.ts +85 -0
- package/dist/spatial/Geohash.d.ts.map +1 -0
- package/dist/spatial/Geohash.js +142 -0
- package/dist/spatial/Geohash.js.map +1 -0
- package/dist/spatial/Haversine.d.ts +24 -0
- package/dist/spatial/Haversine.d.ts.map +1 -0
- package/dist/spatial/Haversine.js +48 -0
- package/dist/spatial/Haversine.js.map +1 -0
- package/dist/spatial/index.d.ts +3 -111
- package/dist/spatial/index.d.ts.map +1 -0
- package/dist/spatial/index.js +2 -24
- package/dist/spatial/index.js.map +1 -1
- package/dist/storage/ContentContainer.d.ts +87 -0
- package/dist/storage/ContentContainer.d.ts.map +1 -0
- package/dist/storage/ContentContainer.js +122 -0
- package/dist/storage/ContentContainer.js.map +1 -0
- package/dist/storage/LocalForageAdapter.d.ts +36 -0
- package/dist/storage/LocalForageAdapter.d.ts.map +1 -0
- package/dist/storage/LocalForageAdapter.js +82 -0
- package/dist/storage/LocalForageAdapter.js.map +1 -0
- package/dist/storage/LocalStorageAdapter.d.ts +16 -0
- package/dist/storage/LocalStorageAdapter.d.ts.map +1 -0
- package/dist/storage/LocalStorageAdapter.js +50 -0
- package/dist/storage/LocalStorageAdapter.js.map +1 -0
- package/dist/storage/MediaProviderFromContainer.d.ts +21 -0
- package/dist/storage/MediaProviderFromContainer.d.ts.map +1 -0
- package/dist/storage/MediaProviderFromContainer.js +79 -0
- package/dist/storage/MediaProviderFromContainer.js.map +1 -0
- package/dist/storage/MemoryStorageAdapter.d.ts +15 -0
- package/dist/storage/MemoryStorageAdapter.d.ts.map +1 -0
- package/dist/storage/MemoryStorageAdapter.js +34 -0
- package/dist/storage/MemoryStorageAdapter.js.map +1 -0
- package/dist/storage/Storage.d.ts +23 -0
- package/dist/storage/Storage.d.ts.map +1 -0
- package/dist/storage/Storage.js +9 -0
- package/dist/storage/Storage.js.map +1 -0
- package/dist/storage/index.d.ts +9 -91
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +5 -10
- package/dist/storage/index.js.map +1 -1
- package/dist/story/index.d.ts +3 -2
- package/dist/themeLibrary-DR1VRo-8.d.ts +44 -0
- package/dist/timing/index.d.ts +4 -0
- package/dist/timing/index.d.ts.map +1 -0
- package/dist/timing/index.js +3 -0
- package/dist/timing/index.js.map +1 -0
- package/dist/timing/narrationTiming.d.ts +54 -0
- package/dist/timing/narrationTiming.d.ts.map +1 -0
- package/dist/timing/narrationTiming.js +190 -0
- package/dist/timing/narrationTiming.js.map +1 -0
- package/dist/timing/readingTime.d.ts +54 -0
- package/dist/timing/readingTime.d.ts.map +1 -0
- package/dist/timing/readingTime.js +49 -0
- package/dist/timing/readingTime.js.map +1 -0
- package/package.json +17 -3
- package/src/__tests__/contentContainer.test.ts +282 -0
- package/src/__tests__/contentExtractor.test.ts +183 -0
- package/src/__tests__/seededRandom.test.ts +142 -0
- package/src/__tests__/slideshowGenerator.test.ts +128 -0
- package/src/__tests__/timing.test.ts +167 -0
- package/src/generate/contentExtractor.ts +808 -0
- package/src/generate/index.ts +21 -0
- package/src/generate/slideshowGenerator.ts +273 -0
- package/src/generate/templateMapper.ts +170 -0
- package/src/index.ts +3 -0
- package/src/random/SeededRandom.ts +127 -0
- package/src/random/index.ts +1 -0
- package/src/storage/ContentContainer.ts +200 -0
- package/src/storage/MediaProviderFromContainer.ts +92 -0
- package/src/storage/index.ts +3 -0
- package/src/timing/index.ts +17 -0
- package/src/timing/narrationTiming.ts +220 -0
- package/src/timing/readingTime.ts +94 -0
- package/dist/chunk-VJN7UB2Z.js +0 -145
- package/dist/chunk-VJN7UB2Z.js.map +0 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Template Utilities
|
|
3
|
+
*
|
|
4
|
+
* Shared helpers for doc block templates:
|
|
5
|
+
* - Caption text cleaning
|
|
6
|
+
* - Common layer construction patterns
|
|
7
|
+
*/
|
|
8
|
+
import type { Layer } from '../../schemas/Doc.js';
|
|
9
|
+
/**
|
|
10
|
+
* Strip trailing punctuation from a caption string.
|
|
11
|
+
* Image captions on blocks look cleaner without terminal periods,
|
|
12
|
+
* semicolons, or other sentence-ending punctuation.
|
|
13
|
+
*/
|
|
14
|
+
export declare function cleanCaption(text: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Create a full-screen background shape layer.
|
|
17
|
+
* Most text-based templates start with this as their first layer.
|
|
18
|
+
*/
|
|
19
|
+
export declare function createBackgroundLayer(id: string, fill: string): Layer;
|
|
20
|
+
//# sourceMappingURL=captionUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"captionUtils.d.ts","sourceRoot":"","sources":["../../../src/doc/templates/captionUtils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAIlD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,KAAK,CAOrE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Template Utilities
|
|
3
|
+
*
|
|
4
|
+
* Shared helpers for doc block templates:
|
|
5
|
+
* - Caption text cleaning
|
|
6
|
+
* - Common layer construction patterns
|
|
7
|
+
*/
|
|
8
|
+
const TRAILING_PUNCT_RE = /[.;:!?]+$/;
|
|
9
|
+
/**
|
|
10
|
+
* Strip trailing punctuation from a caption string.
|
|
11
|
+
* Image captions on blocks look cleaner without terminal periods,
|
|
12
|
+
* semicolons, or other sentence-ending punctuation.
|
|
13
|
+
*/
|
|
14
|
+
export function cleanCaption(text) {
|
|
15
|
+
return text.replace(TRAILING_PUNCT_RE, '').trim();
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Create a full-screen background shape layer.
|
|
19
|
+
* Most text-based templates start with this as their first layer.
|
|
20
|
+
*/
|
|
21
|
+
export function createBackgroundLayer(id, fill) {
|
|
22
|
+
return {
|
|
23
|
+
type: 'shape',
|
|
24
|
+
id,
|
|
25
|
+
content: { shape: 'rect', fill },
|
|
26
|
+
position: { x: 0, y: 0, width: '100%', height: '100%' },
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=captionUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"captionUtils.js","sourceRoot":"","sources":["../../../src/doc/templates/captionUtils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAEtC;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;AACpD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,EAAU,EAAE,IAAY;IAC5D,OAAO;QACL,IAAI,EAAE,OAAO;QACb,EAAE;QACF,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE;QAChC,QAAQ,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;KACxD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Comparison Bar Template
|
|
3
|
+
*
|
|
4
|
+
* Two horizontal bars showing relative numeric values side by side.
|
|
5
|
+
* Bar widths are proportional to the values for immediate visual comparison.
|
|
6
|
+
* Good for population, distance, or measurement comparisons.
|
|
7
|
+
*
|
|
8
|
+
* This is shared code used by both site and efb-app doc renderers.
|
|
9
|
+
*/
|
|
10
|
+
import type { Layer } from '../../schemas/Doc.js';
|
|
11
|
+
import type { ComparisonBarInput, TemplateContext } from '../../schemas/BlockTemplates.js';
|
|
12
|
+
export declare function comparisonBar(input: ComparisonBarInput, context: TemplateContext): Layer[];
|
|
13
|
+
//# sourceMappingURL=comparisonBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comparisonBar.d.ts","sourceRoot":"","sources":["../../../src/doc/templates/comparisonBar.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAI3F,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,eAAe,GAAG,KAAK,EAAE,CA4H1F"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Comparison Bar Template
|
|
3
|
+
*
|
|
4
|
+
* Two horizontal bars showing relative numeric values side by side.
|
|
5
|
+
* Bar widths are proportional to the values for immediate visual comparison.
|
|
6
|
+
* Good for population, distance, or measurement comparisons.
|
|
7
|
+
*
|
|
8
|
+
* This is shared code used by both site and efb-app doc renderers.
|
|
9
|
+
*/
|
|
10
|
+
import { scaledFontSize } from '../../schemas/BlockTemplates.js';
|
|
11
|
+
import { resolveColorScheme } from '../utils/themeUtils.js';
|
|
12
|
+
export function comparisonBar(input, context) {
|
|
13
|
+
const { leftLabel, leftValue, rightLabel, rightValue, unit, colorScheme = 'blue' } = input;
|
|
14
|
+
const { theme } = context;
|
|
15
|
+
const colors = resolveColorScheme(context, colorScheme);
|
|
16
|
+
const labelFontSize = scaledFontSize(28, context, false);
|
|
17
|
+
const valueFontSize = scaledFontSize(48, context, true);
|
|
18
|
+
// Calculate proportional bar widths (max bar = 65% of viewport width)
|
|
19
|
+
const maxValue = Math.max(leftValue, rightValue, 1);
|
|
20
|
+
const maxBarWidth = 65;
|
|
21
|
+
const leftBarWidth = (leftValue / maxValue) * maxBarWidth;
|
|
22
|
+
const rightBarWidth = (rightValue / maxValue) * maxBarWidth;
|
|
23
|
+
// Bar positioning
|
|
24
|
+
const barStartX = 15;
|
|
25
|
+
const barHeight = 6; // % of viewport height
|
|
26
|
+
const topBarY = 36;
|
|
27
|
+
const bottomBarY = 58;
|
|
28
|
+
// Format values for display
|
|
29
|
+
const formatValue = (v) => {
|
|
30
|
+
if (v >= 1000000)
|
|
31
|
+
return `${(v / 1000000).toFixed(1)}M`;
|
|
32
|
+
if (v >= 1000)
|
|
33
|
+
return `${(v / 1000).toFixed(v >= 10000 ? 0 : 1)}K`;
|
|
34
|
+
return v.toLocaleString();
|
|
35
|
+
};
|
|
36
|
+
const leftDisplay = unit ? `${formatValue(leftValue)} ${unit}` : formatValue(leftValue);
|
|
37
|
+
const rightDisplay = unit ? `${formatValue(rightValue)} ${unit}` : formatValue(rightValue);
|
|
38
|
+
return [
|
|
39
|
+
// Background
|
|
40
|
+
{
|
|
41
|
+
type: 'shape',
|
|
42
|
+
id: 'bg',
|
|
43
|
+
content: {
|
|
44
|
+
shape: 'rect',
|
|
45
|
+
fill: `linear-gradient(180deg, ${theme.colors.background} 0%, #0f1520 100%)`,
|
|
46
|
+
},
|
|
47
|
+
position: { x: 0, y: 0, width: '100%', height: '100%' },
|
|
48
|
+
},
|
|
49
|
+
// Top bar label
|
|
50
|
+
{
|
|
51
|
+
type: 'text',
|
|
52
|
+
id: 'left-label',
|
|
53
|
+
content: {
|
|
54
|
+
text: leftLabel,
|
|
55
|
+
style: { fontSize: labelFontSize, color: theme.colors.textMuted },
|
|
56
|
+
},
|
|
57
|
+
position: { x: `${barStartX}%`, y: `${topBarY - 8}%` },
|
|
58
|
+
},
|
|
59
|
+
// Top bar value
|
|
60
|
+
{
|
|
61
|
+
type: 'text',
|
|
62
|
+
id: 'left-value',
|
|
63
|
+
content: {
|
|
64
|
+
text: leftDisplay,
|
|
65
|
+
style: { fontSize: valueFontSize, fontWeight: 'bold', color: colors.text },
|
|
66
|
+
},
|
|
67
|
+
position: { x: `${barStartX + leftBarWidth + 2}%`, y: `${topBarY - 1}%` },
|
|
68
|
+
animation: { type: 'fadeIn', duration: 0.8, delay: 0.3 },
|
|
69
|
+
},
|
|
70
|
+
// Top bar
|
|
71
|
+
{
|
|
72
|
+
type: 'shape',
|
|
73
|
+
id: 'left-bar',
|
|
74
|
+
content: {
|
|
75
|
+
shape: 'rect',
|
|
76
|
+
fill: colors.text,
|
|
77
|
+
borderRadius: 4,
|
|
78
|
+
},
|
|
79
|
+
position: {
|
|
80
|
+
x: `${barStartX}%`,
|
|
81
|
+
y: `${topBarY}%`,
|
|
82
|
+
width: `${leftBarWidth}%`,
|
|
83
|
+
height: `${barHeight}%`,
|
|
84
|
+
},
|
|
85
|
+
animation: { type: 'fadeIn', duration: 1 },
|
|
86
|
+
},
|
|
87
|
+
// Bottom bar label
|
|
88
|
+
{
|
|
89
|
+
type: 'text',
|
|
90
|
+
id: 'right-label',
|
|
91
|
+
content: {
|
|
92
|
+
text: rightLabel,
|
|
93
|
+
style: { fontSize: labelFontSize, color: theme.colors.textMuted },
|
|
94
|
+
},
|
|
95
|
+
position: { x: `${barStartX}%`, y: `${bottomBarY - 8}%` },
|
|
96
|
+
},
|
|
97
|
+
// Bottom bar value
|
|
98
|
+
{
|
|
99
|
+
type: 'text',
|
|
100
|
+
id: 'right-value',
|
|
101
|
+
content: {
|
|
102
|
+
text: rightDisplay,
|
|
103
|
+
style: { fontSize: valueFontSize, fontWeight: 'bold', color: colors.accent },
|
|
104
|
+
},
|
|
105
|
+
position: { x: `${barStartX + rightBarWidth + 2}%`, y: `${bottomBarY - 1}%` },
|
|
106
|
+
animation: { type: 'fadeIn', duration: 0.8, delay: 0.6 },
|
|
107
|
+
},
|
|
108
|
+
// Bottom bar
|
|
109
|
+
{
|
|
110
|
+
type: 'shape',
|
|
111
|
+
id: 'right-bar',
|
|
112
|
+
content: {
|
|
113
|
+
shape: 'rect',
|
|
114
|
+
fill: colors.accent,
|
|
115
|
+
borderRadius: 4,
|
|
116
|
+
},
|
|
117
|
+
position: {
|
|
118
|
+
x: `${barStartX}%`,
|
|
119
|
+
y: `${bottomBarY}%`,
|
|
120
|
+
width: `${rightBarWidth}%`,
|
|
121
|
+
height: `${barHeight}%`,
|
|
122
|
+
},
|
|
123
|
+
animation: { type: 'fadeIn', duration: 1, delay: 0.3 },
|
|
124
|
+
},
|
|
125
|
+
];
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=comparisonBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comparisonBar.js","sourceRoot":"","sources":["../../../src/doc/templates/comparisonBar.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,UAAU,aAAa,CAAC,KAAyB,EAAE,OAAwB;IAC/E,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC;IAC3F,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;IAC1B,MAAM,MAAM,GAAG,kBAAkB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAExD,MAAM,aAAa,GAAG,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IACzD,MAAM,aAAa,GAAG,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IAExD,sEAAsE;IACtE,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;IACpD,MAAM,WAAW,GAAG,E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AAS,GAAG;aACxB;YACD,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE;SACvD;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cover Block Template
|
|
3
|
+
*
|
|
4
|
+
* Full-screen hero image with title overlay, shown before playback starts.
|
|
5
|
+
* This is the "poster for the doc, displaying the
|
|
6
|
+
* article's hero image with elegant title treatment.
|
|
7
|
+
*
|
|
8
|
+
* Features:
|
|
9
|
+
* - Full-screen hero image with Ken Burns ambient motion
|
|
10
|
+
* - Gradient overlay for text readability
|
|
11
|
+
* - Large centered title with optional subtitle
|
|
12
|
+
* - No animation delays (shown at rest, not during playback)
|
|
13
|
+
*
|
|
14
|
+
* This is shared code used by both site and efb-app doc renderers.
|
|
15
|
+
*/
|
|
16
|
+
import type { Layer } from '../../schemas/Doc.js';
|
|
17
|
+
import type { TemplateContext } from '../../schemas/BlockTemplates.js';
|
|
18
|
+
import type { StartBlockConfig } from '../../schemas/Doc.js';
|
|
19
|
+
/**
|
|
20
|
+
* Input for coverBlock template - matches StartBlockConfig
|
|
21
|
+
*/
|
|
22
|
+
export interface CoverBlockInput {
|
|
23
|
+
/** Path to hero image */
|
|
24
|
+
heroSrc: string;
|
|
25
|
+
/** Alt text for the hero image */
|
|
26
|
+
heroAlt?: string;
|
|
27
|
+
/** Title to display over the hero */
|
|
28
|
+
title: string;
|
|
29
|
+
/** Optional subtitle */
|
|
30
|
+
subtitle?: string;
|
|
31
|
+
/** Ambient motion for the hero image */
|
|
32
|
+
ambientMotion?: 'zoomIn' | 'zoomOut' | 'panLeft' | 'panRight';
|
|
33
|
+
/** Photo credit / artist name */
|
|
34
|
+
heroCredit?: string;
|
|
35
|
+
/** License identifier */
|
|
36
|
+
heroLicense?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Generate cover block layers from StartBlockConfig.
|
|
40
|
+
*/
|
|
41
|
+
export declare function coverBlock(input: CoverBlockInput, context: TemplateContext): Layer[];
|
|
42
|
+
/**
|
|
43
|
+
* Convert StartBlockConfig to CoverBlockInput.
|
|
44
|
+
*/
|
|
45
|
+
export declare function startBlockToCoverInput(config: StartBlockConfig): CoverBlockInput;
|
|
46
|
+
/**
|
|
47
|
+
* Expand a StartBlockConfig into a renderable Block.
|
|
48
|
+
* This is used by the player to render the cover block at rest.
|
|
49
|
+
*/
|
|
50
|
+
export declare function expandCoverBlock(config: StartBlockConfig, context: TemplateContext): Layer[];
|
|
51
|
+
//# sourceMappingURL=coverBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coverBlock.d.ts","sourceRoot":"","sources":["../../../src/doc/templates/coverBlock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAEvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG7D;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,wBAAwB;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,aAAa,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;IAC9D,iCAAiC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yBAAyB;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,eAAe,GAAG,KAAK,EAAE,CAsFpF;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,gBAAgB,GAAG,eAAe,CAUhF;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,eAAe,GAAG,KAAK,EAAE,CAG5F"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cover Block Template
|
|
3
|
+
*
|
|
4
|
+
* Full-screen hero image with title overlay, shown before playback starts.
|
|
5
|
+
* This is the "poster for the doc, displaying the
|
|
6
|
+
* article's hero image with elegant title treatment.
|
|
7
|
+
*
|
|
8
|
+
* Features:
|
|
9
|
+
* - Full-screen hero image with Ken Burns ambient motion
|
|
10
|
+
* - Gradient overlay for text readability
|
|
11
|
+
* - Large centered title with optional subtitle
|
|
12
|
+
* - No animation delays (shown at rest, not during playback)
|
|
13
|
+
*
|
|
14
|
+
* This is shared code used by both site and efb-app doc renderers.
|
|
15
|
+
*/
|
|
16
|
+
import { scaledFontSize } from '../../schemas/BlockTemplates.js';
|
|
17
|
+
import { mapAmbientMotion } from './accentImage.js';
|
|
18
|
+
/**
|
|
19
|
+
* Generate cover block layers from StartBlockConfig.
|
|
20
|
+
*/
|
|
21
|
+
export function coverBlock(input, context) {
|
|
22
|
+
const { heroSrc, heroAlt, title, subtitle, ambientMotion, heroCredit, heroLicense } = input;
|
|
23
|
+
const { theme, layout } = context;
|
|
24
|
+
// Scale font sizes for viewport - use larger sizes for the cover
|
|
25
|
+
const titleFontSize = scaledFontSize(96, context, true);
|
|
26
|
+
const subtitleFontSize = scaledFontSize(36, context, false);
|
|
27
|
+
// Determine Ken Burns animation
|
|
28
|
+
const imageAnimation = mapAmbientMotion(ambientMotion);
|
|
29
|
+
const layers = [
|
|
30
|
+
// Full-screen hero image
|
|
31
|
+
{
|
|
32
|
+
type: 'image',
|
|
33
|
+
id: 'cover-hero',
|
|
34
|
+
content: {
|
|
35
|
+
src: heroSrc,
|
|
36
|
+
alt: heroAlt || title,
|
|
37
|
+
fit: 'cover',
|
|
38
|
+
credit: heroCredit,
|
|
39
|
+
license: heroLicense,
|
|
40
|
+
},
|
|
41
|
+
position: { x: 0, y: 0, width: '100%', height: '100%' },
|
|
42
|
+
animation: imageAnimation,
|
|
43
|
+
},
|
|
44
|
+
// Gradient overlay for text readability - from bottom
|
|
45
|
+
{
|
|
46
|
+
type: 'shape',
|
|
47
|
+
id: 'cover-gradient',
|
|
48
|
+
content: {
|
|
49
|
+
shape: 'rect',
|
|
50
|
+
fill: 'linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 40%, rgba(0,0,0,0.1) 70%, transparent 100%)',
|
|
51
|
+
},
|
|
52
|
+
position: { x: 0, y: 0, width: '100%', height: '100%' },
|
|
53
|
+
},
|
|
54
|
+
// Title - positioned lower in the frame to work with hero composition
|
|
55
|
+
{
|
|
56
|
+
type: 'text',
|
|
57
|
+
id: 'cover-title',
|
|
58
|
+
content: {
|
|
59
|
+
text: title,
|
|
60
|
+
style: {
|
|
61
|
+
fontSize: titleFontSize,
|
|
62
|
+
fontWeight: 'bold',
|
|
63
|
+
color: theme.colors.text,
|
|
64
|
+
textAlign: 'center',
|
|
65
|
+
shadow: true,
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
position: {
|
|
69
|
+
x: '50%',
|
|
70
|
+
y: subtitle ? '70%' : '75%',
|
|
71
|
+
anchor: 'center',
|
|
72
|
+
width: layout.maxTextWidth,
|
|
73
|
+
},
|
|
74
|
+
// No animation delay - shown immediately at rest
|
|
75
|
+
animation: { type: 'fadeIn', duration: 0.8 },
|
|
76
|
+
},
|
|
77
|
+
];
|
|
78
|
+
// Add subtitle if provided
|
|
79
|
+
if (subtitle) {
|
|
80
|
+
layers.push({
|
|
81
|
+
type: 'text',
|
|
82
|
+
id: 'cover-subtitle',
|
|
83
|
+
content: {
|
|
84
|
+
text: subtitle,
|
|
85
|
+
style: {
|
|
86
|
+
fontSize: subtitleFontSize,
|
|
87
|
+
color: theme.colors.textMuted,
|
|
88
|
+
textAlign: 'center',
|
|
89
|
+
lineHeight: 1.5,
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
position: {
|
|
93
|
+
x: '50%',
|
|
94
|
+
y: '82%',
|
|
95
|
+
anchor: 'center',
|
|
96
|
+
width: layout.maxTextWidth,
|
|
97
|
+
},
|
|
98
|
+
animation: { type: 'fadeIn', duration: 0.8, delay: 0.2 },
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
return layers;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Convert StartBlockConfig to CoverBlockInput.
|
|
105
|
+
*/
|
|
106
|
+
export function startBlockToCoverInput(config) {
|
|
107
|
+
return {
|
|
108
|
+
heroSrc: config.heroSrc,
|
|
109
|
+
heroAlt: config.heroAlt,
|
|
110
|
+
title: config.title,
|
|
111
|
+
subtitle: config.subtitle,
|
|
112
|
+
ambientMotion: config.ambientMotion,
|
|
113
|
+
heroCredit: config.heroCredit,
|
|
114
|
+
heroLicense: config.heroLicense,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Expand a StartBlockConfig into a renderable Block.
|
|
119
|
+
* This is used by the player to render the cover block at rest.
|
|
120
|
+
*/
|
|
121
|
+
export function expandCoverBlock(config, context) {
|
|
122
|
+
const input = startBlockToCoverInput(config);
|
|
123
|
+
return coverBlock(input, context);
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=coverBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coverBlock.js","sourceRoot":"","sources":["../../../src/doc/templates/coverBlock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAsBpD;;GAEG;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,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,WAAW,EAAE,MAAM,CAAC,WAAW;KAChC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAwB,EAAE,OAAwB;IACjF,MAAM,KAAK,GAAG,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAC7C,OAAO,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Date Event Template
|
|
3
|
+
*
|
|
4
|
+
* Timeline-style slide with prominent date and description.
|
|
5
|
+
* Supports different moods: neutral, somber, celebratory.
|
|
6
|
+
* Adapts font sizes and positioning for different viewports.
|
|
7
|
+
*
|
|
8
|
+
* Supports optional accent images that appear as tasteful side/bottom strips.
|
|
9
|
+
*
|
|
10
|
+
* This is shared code used by both site and efb-app doc renderers.
|
|
11
|
+
*/
|
|
12
|
+
import type { Layer } from '../../schemas/Doc.js';
|
|
13
|
+
import type { DateEventInput, TemplateContext } from '../../schemas/BlockTemplates.js';
|
|
14
|
+
export declare function dateEvent(input: DateEventInput, context: TemplateContext): Layer[];
|
|
15
|
+
//# sourceMappingURL=dateEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dateEvent.d.ts","sourceRoot":"","sources":["../../../src/doc/templates/dateEvent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAUvF,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,eAAe,GAAG,KAAK,EAAE,CAkGlF"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Date Event Template
|
|
3
|
+
*
|
|
4
|
+
* Timeline-style slide with prominent date and description.
|
|
5
|
+
* Supports different moods: neutral, somber, celebratory.
|
|
6
|
+
* Adapts font sizes and positioning for different viewports.
|
|
7
|
+
*
|
|
8
|
+
* Supports optional accent images that appear as tasteful side/bottom strips.
|
|
9
|
+
*
|
|
10
|
+
* This is shared code used by both site and efb-app doc renderers.
|
|
11
|
+
*/
|
|
12
|
+
import { scaledFontSize } from '../../schemas/BlockTemplates.js';
|
|
13
|
+
import { createAccentLayers, getAccentLayout, adjustY, DEFAULT_LAYOUT } from './accentImage.js';
|
|
14
|
+
const MOOD_COLORS = {
|
|
15
|
+
neutral: { bg: '#1a202c', date: '#63b3ed', text: '#ffffff' },
|
|
16
|
+
somber: { bg: '#1a1a2e', date: '#e53e3e', text: '#a0aec0' },
|
|
17
|
+
celebratory: { bg: '#1a365d', date: '#68d391', text: '#ffffff' },
|
|
18
|
+
};
|
|
19
|
+
export function dateEvent(input, context) {
|
|
20
|
+
const { date, description, footer, mood = 'neutral', accentImage } = input;
|
|
21
|
+
const { theme } = context;
|
|
22
|
+
const colors = MOOD_COLORS[mood];
|
|
23
|
+
// Get layout adjustments if accent image is present
|
|
24
|
+
const accentLayout = accentImage ? getAccentLayout(accentImage.position) : DEFAULT_LAYOUT;
|
|
25
|
+
// Scale font sizes — date is the hero element
|
|
26
|
+
const dateFontSize = scaledFontSize(96, context, true);
|
|
27
|
+
const descFontSize = scaledFontSize(30, context, false);
|
|
28
|
+
const footerFontSize = scaledFontSize(26, context, false);
|
|
29
|
+
const layers = [
|
|
30
|
+
// Background — unique diagonal gradient to differentiate from other dark templates
|
|
31
|
+
{
|
|
32
|
+
type: 'shape',
|
|
33
|
+
id: 'bg',
|
|
34
|
+
content: {
|
|
35
|
+
shape: 'rect',
|
|
36
|
+
fill: `linear-gradient(135deg, ${colors.bg} 0%, #0d1117 100%)`,
|
|
37
|
+
},
|
|
38
|
+
position: { x: 0, y: 0, width: '100%', height: '100%' },
|
|
39
|
+
},
|
|
40
|
+
];
|
|
41
|
+
// Add accent image layers (behind text, after background)
|
|
42
|
+
if (accentImage) {
|
|
43
|
+
layers.push(...createAccentLayers(accentImage, input.id));
|
|
44
|
+
}
|
|
45
|
+
// Date — hero element, much larger
|
|
46
|
+
layers.push({
|
|
47
|
+
type: 'text',
|
|
48
|
+
id: 'date',
|
|
49
|
+
content: {
|
|
50
|
+
text: date,
|
|
51
|
+
style: {
|
|
52
|
+
fontSize: dateFontSize,
|
|
53
|
+
fontWeight: 'bold',
|
|
54
|
+
color: colors.date,
|
|
55
|
+
shadow: !!accentImage,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
position: {
|
|
59
|
+
x: accentLayout.textCenterX,
|
|
60
|
+
y: adjustY('35%', accentLayout),
|
|
61
|
+
anchor: 'center',
|
|
62
|
+
},
|
|
63
|
+
animation: { type: 'fadeIn', duration: 1.5 },
|
|
64
|
+
});
|
|
65
|
+
// Description - constrained width for proper text wrapping
|
|
66
|
+
layers.push({
|
|
67
|
+
type: 'text',
|
|
68
|
+
id: 'description',
|
|
69
|
+
content: {
|
|
70
|
+
text: description,
|
|
71
|
+
style: {
|
|
72
|
+
fontSize: descFontSize,
|
|
73
|
+
color: colors.text,
|
|
74
|
+
textAlign: 'center',
|
|
75
|
+
lineHeight: 1.8,
|
|
76
|
+
shadow: !!accentImage,
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
position: {
|
|
80
|
+
x: accentLayout.textCenterX,
|
|
81
|
+
y: adjustY('58%', accentLayout),
|
|
82
|
+
width: accentLayout.textWidth,
|
|
83
|
+
anchor: 'center',
|
|
84
|
+
},
|
|
85
|
+
animation: { type: 'fadeIn', duration: 2, delay: 1 },
|
|
86
|
+
});
|
|
87
|
+
// Add footer if provided
|
|
88
|
+
if (footer) {
|
|
89
|
+
layers.push({
|
|
90
|
+
type: 'text',
|
|
91
|
+
id: 'footer',
|
|
92
|
+
content: {
|
|
93
|
+
text: footer,
|
|
94
|
+
style: {
|
|
95
|
+
fontSize: footerFontSize,
|
|
96
|
+
color: theme.colors.textMuted,
|
|
97
|
+
shadow: !!accentImage,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
position: {
|
|
101
|
+
x: accentLayout.textCenterX,
|
|
102
|
+
y: adjustY('82%', accentLayout),
|
|
103
|
+
anchor: 'center',
|
|
104
|
+
},
|
|
105
|
+
animation: { type: 'fadeIn', duration: 1, delay: 3 },
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
return layers;
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=dateEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dateEvent.js","sourceRoot":"","sources":["../../../src/doc/templates/dateEvent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEhG,MAAM,WAAW,GAAG;IAClB,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IAC5D,MAAM,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IAC3D,WAAW,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;CACjE,CAAC;AAEF,MAAM,UAAU,SAAS,CAAC,KAAqB,EAAE,OAAwB;IACvE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,GAAG,SAAS,EAAE,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,EAAE,YAAY,CAAC,WAAW;gBAC3B,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,YAAY,CAAC;gBAC/B,MAAM,EAAE,QAAQ;aACjB;YACD,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE;SACrD,CAAC,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Definition Card Template
|
|
3
|
+
*
|
|
4
|
+
* Dictionary-style slide with a large term and its definition.
|
|
5
|
+
* Good for explaining local words, place names, or cultural concepts.
|
|
6
|
+
* Supports optional accent images.
|
|
7
|
+
*
|
|
8
|
+
* This is shared code used by both site and efb-app doc renderers.
|
|
9
|
+
*/
|
|
10
|
+
import type { Layer } from '../../schemas/Doc.js';
|
|
11
|
+
import type { DefinitionCardInput, TemplateContext } from '../../schemas/BlockTemplates.js';
|
|
12
|
+
export declare function definitionCard(input: DefinitionCardInput, context: TemplateContext): Layer[];
|
|
13
|
+
//# sourceMappingURL=definitionCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitionCard.d.ts","sourceRoot":"","sources":["../../../src/doc/templates/definitionCard.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAM5F,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAE,eAAe,GAAG,KAAK,EAAE,CA+G5F"}
|