@bendyline/squisq 0.1.1 → 1.0.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/README.md +85 -0
- package/dist/{themeLibrary-DySHPcgj.d.ts → Doc-1hmT1LZl.d.ts} +1 -42
- 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__/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-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/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/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 +6 -91
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +3 -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 +19 -5
- 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/timing/index.ts +17 -0
- package/src/timing/narrationTiming.ts +220 -0
- package/src/timing/readingTime.ts +94 -0
|
@@ -0,0 +1,114 @@
|
|
|
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 { scaledFontSize } from '../../schemas/BlockTemplates.js';
|
|
11
|
+
import { resolveColorScheme } from '../utils/themeUtils.js';
|
|
12
|
+
import { createAccentLayers, getAccentLayout, adjustY, DEFAULT_LAYOUT } from './accentImage.js';
|
|
13
|
+
import { createBackgroundLayer } from './captionUtils.js';
|
|
14
|
+
export function definitionCard(input, context) {
|
|
15
|
+
const { term, definition, origin, colorScheme = 'blue', accentImage } = input;
|
|
16
|
+
const { theme } = context;
|
|
17
|
+
const colors = resolveColorScheme(context, colorScheme);
|
|
18
|
+
// Get layout adjustments if accent image is present
|
|
19
|
+
const accentLayout = accentImage ? getAccentLayout(accentImage.position) : DEFAULT_LAYOUT;
|
|
20
|
+
const termFontSize = scaledFontSize(72, context, true);
|
|
21
|
+
const defFontSize = scaledFontSize(32, context, false);
|
|
22
|
+
const originFontSize = scaledFontSize(22, context, false);
|
|
23
|
+
const layers = [
|
|
24
|
+
createBackgroundLayer('bg', `linear-gradient(145deg, #1e2030 0%, ${theme.colors.background} 100%)`),
|
|
25
|
+
];
|
|
26
|
+
// Add accent image layers
|
|
27
|
+
if (accentImage) {
|
|
28
|
+
layers.push(...createAccentLayers(accentImage, input.id));
|
|
29
|
+
}
|
|
30
|
+
// Term — large, accent-colored
|
|
31
|
+
layers.push({
|
|
32
|
+
type: 'text',
|
|
33
|
+
id: 'term',
|
|
34
|
+
content: {
|
|
35
|
+
text: term,
|
|
36
|
+
style: {
|
|
37
|
+
fontSize: termFontSize,
|
|
38
|
+
fontWeight: 'bold',
|
|
39
|
+
color: colors.text,
|
|
40
|
+
textAlign: 'center',
|
|
41
|
+
shadow: !!accentImage,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
position: {
|
|
45
|
+
x: accentLayout.textCenterX,
|
|
46
|
+
y: adjustY('30%', accentLayout),
|
|
47
|
+
anchor: 'center',
|
|
48
|
+
},
|
|
49
|
+
animation: { type: 'fadeIn', duration: 1.5 },
|
|
50
|
+
});
|
|
51
|
+
// Horizontal separator line
|
|
52
|
+
layers.push({
|
|
53
|
+
type: 'shape',
|
|
54
|
+
id: 'separator',
|
|
55
|
+
content: {
|
|
56
|
+
shape: 'rect',
|
|
57
|
+
fill: `${colors.text}33`, // accent color at 20% opacity
|
|
58
|
+
},
|
|
59
|
+
position: {
|
|
60
|
+
x: accentLayout.textCenterX,
|
|
61
|
+
y: adjustY('42%', accentLayout),
|
|
62
|
+
width: '30%',
|
|
63
|
+
height: '2px',
|
|
64
|
+
anchor: 'center',
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
// Definition text
|
|
68
|
+
layers.push({
|
|
69
|
+
type: 'text',
|
|
70
|
+
id: 'definition',
|
|
71
|
+
content: {
|
|
72
|
+
text: definition,
|
|
73
|
+
style: {
|
|
74
|
+
fontSize: defFontSize,
|
|
75
|
+
color: theme.colors.text,
|
|
76
|
+
textAlign: 'center',
|
|
77
|
+
lineHeight: 1.6,
|
|
78
|
+
maxLines: 4,
|
|
79
|
+
shadow: !!accentImage,
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
position: {
|
|
83
|
+
x: accentLayout.textCenterX,
|
|
84
|
+
y: adjustY('55%', accentLayout),
|
|
85
|
+
width: accentLayout.textWidth,
|
|
86
|
+
anchor: 'center',
|
|
87
|
+
},
|
|
88
|
+
animation: { type: 'fadeIn', duration: 1, delay: 0.8 },
|
|
89
|
+
});
|
|
90
|
+
// Origin if provided
|
|
91
|
+
if (origin) {
|
|
92
|
+
layers.push({
|
|
93
|
+
type: 'text',
|
|
94
|
+
id: 'origin',
|
|
95
|
+
content: {
|
|
96
|
+
text: origin,
|
|
97
|
+
style: {
|
|
98
|
+
fontSize: originFontSize,
|
|
99
|
+
color: theme.colors.textMuted,
|
|
100
|
+
textAlign: 'center',
|
|
101
|
+
shadow: !!accentImage,
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
position: {
|
|
105
|
+
x: accentLayout.textCenterX,
|
|
106
|
+
y: adjustY('78%', accentLayout),
|
|
107
|
+
anchor: 'center',
|
|
108
|
+
},
|
|
109
|
+
animation: { type: 'fadeIn', duration: 0.8, delay: 1.5 },
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
return layers;
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=definitionCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitionCard.js","sourceRoot":"","sources":["../../../src/doc/templates/definitionCard.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAChG,OAAO,EAAE,qBAAqB,EAAE,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,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE;KACvD,CAAC,CAAC;IAEH,qBAAqB;IACrB,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,CAAC,IAAI,CAAC;YACV,IAAI,EAAE,MAAM;YACZ,EAAE,EAAE,QAAQ;YACZ,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE;oBACL,QAAQ,EAAE,cAAc;oBACxB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS;oBAC7B,SAAS,EAAE,QAAQ;oBACnB,MAAM,EAAE,CAAC,CAAC,WAAW;iBACtB;aACF;YACD,QAAQ,EAAE;gBACR,CAAC,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,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE;SACzD,CAAC,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fact Card Template
|
|
3
|
+
*
|
|
4
|
+
* Key fact with explanation and optional source.
|
|
5
|
+
* Useful for presenting important information clearly.
|
|
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 { FactCardInput, TemplateContext } from '../../schemas/BlockTemplates.js';
|
|
14
|
+
export declare function factCard(input: FactCardInput, context: TemplateContext): Layer[];
|
|
15
|
+
//# sourceMappingURL=factCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factCard.d.ts","sourceRoot":"","sources":["../../../src/doc/templates/factCard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAKtF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,eAAe,GAAG,KAAK,EAAE,CA+FhF"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fact Card Template
|
|
3
|
+
*
|
|
4
|
+
* Key fact with explanation and optional source.
|
|
5
|
+
* Useful for presenting important information clearly.
|
|
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
|
+
import { createBackgroundLayer } from './captionUtils.js';
|
|
15
|
+
export function factCard(input, context) {
|
|
16
|
+
const { fact, explanation, source, accentImage } = input;
|
|
17
|
+
const { theme } = context;
|
|
18
|
+
// Get layout adjustments if accent image is present
|
|
19
|
+
const accentLayout = accentImage ? getAccentLayout(accentImage.position) : DEFAULT_LAYOUT;
|
|
20
|
+
// Scale font sizes for viewport
|
|
21
|
+
const factFontSize = scaledFontSize(56, context, true);
|
|
22
|
+
const explainFontSize = scaledFontSize(32, context, false);
|
|
23
|
+
const sourceFontSize = scaledFontSize(20, context, false);
|
|
24
|
+
const layers = [
|
|
25
|
+
createBackgroundLayer('bg', `linear-gradient(170deg, #1e2030 0%, ${theme.colors.background} 100%)`),
|
|
26
|
+
];
|
|
27
|
+
// Add accent image layers (behind text, after background)
|
|
28
|
+
if (accentImage) {
|
|
29
|
+
layers.push(...createAccentLayers(accentImage, input.id));
|
|
30
|
+
}
|
|
31
|
+
// Fact (main statement)
|
|
32
|
+
layers.push({
|
|
33
|
+
type: 'text',
|
|
34
|
+
id: 'fact',
|
|
35
|
+
content: {
|
|
36
|
+
text: fact,
|
|
37
|
+
style: {
|
|
38
|
+
fontSize: factFontSize,
|
|
39
|
+
fontWeight: 'bold',
|
|
40
|
+
color: theme.colors.text,
|
|
41
|
+
textAlign: 'center',
|
|
42
|
+
lineHeight: 1.4,
|
|
43
|
+
shadow: true,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
position: {
|
|
47
|
+
x: accentLayout.textCenterX,
|
|
48
|
+
y: adjustY('35%', accentLayout),
|
|
49
|
+
width: accentLayout.textWidth,
|
|
50
|
+
anchor: 'center',
|
|
51
|
+
},
|
|
52
|
+
animation: { type: 'fadeIn', duration: 1.5 },
|
|
53
|
+
});
|
|
54
|
+
// Explanation
|
|
55
|
+
layers.push({
|
|
56
|
+
type: 'text',
|
|
57
|
+
id: 'explanation',
|
|
58
|
+
content: {
|
|
59
|
+
text: explanation,
|
|
60
|
+
style: {
|
|
61
|
+
fontSize: explainFontSize,
|
|
62
|
+
color: theme.colors.textMuted,
|
|
63
|
+
textAlign: 'center',
|
|
64
|
+
lineHeight: 1.5,
|
|
65
|
+
shadow: !!accentImage,
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
position: {
|
|
69
|
+
x: accentLayout.textCenterX,
|
|
70
|
+
y: adjustY('60%', accentLayout),
|
|
71
|
+
width: accentLayout.textWidth,
|
|
72
|
+
anchor: 'center',
|
|
73
|
+
},
|
|
74
|
+
animation: { type: 'fadeIn', duration: 1, delay: 0.8 },
|
|
75
|
+
});
|
|
76
|
+
// Add source if provided
|
|
77
|
+
if (source) {
|
|
78
|
+
layers.push({
|
|
79
|
+
type: 'text',
|
|
80
|
+
id: 'source',
|
|
81
|
+
content: {
|
|
82
|
+
text: source,
|
|
83
|
+
style: {
|
|
84
|
+
fontSize: sourceFontSize,
|
|
85
|
+
color: theme.colors.textMuted,
|
|
86
|
+
textAlign: 'center',
|
|
87
|
+
shadow: !!accentImage,
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
position: {
|
|
91
|
+
x: accentLayout.textCenterX,
|
|
92
|
+
y: adjustY('85%', accentLayout),
|
|
93
|
+
anchor: 'center',
|
|
94
|
+
},
|
|
95
|
+
animation: { type: 'fadeIn', duration: 0.8, delay: 1.5 },
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
return layers;
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=factCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factCard.js","sourceRoot":"","sources":["../../../src/doc/templates/factCard.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;AAChG,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,MAAM,UAAU,QAAQ,CAAC,KAAoB,EAAE,OAAwB;IACrE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IACzD,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;IAE1B,oDAAoD;IACpD,MAAM,YAAY,GAAG,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC;IAE1F,gCAAgC;IAChC,MAAM,YAAY,GAAG,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACvD,MAAM,eAAe,GAAG,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,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B,UAAU,EAAE,GAAG;gBACf,MAAM,EAAE,CAAC,CAAC,WAAW;aACtB;SACF;QACD,QAAQ,EAAE;YACR,CAAC,EAAE,YAAY,CAAC,WAAW;YAC3B,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,YAAY,CAAC;YAC/B,KAAK,EAAE,YAAY,CAAC,SAAS;YAC7B,MAAM,EAAE,QAAQ;SACjB;QACD,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE;KACvD,CAAC,CAAC;IAEH,yBAAyB;IACzB,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,CAAC,IAAI,CAAC;YACV,IAAI,EAAE,MAAM;YACZ,EAAE,EAAE,QAAQ;YACZ,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE;oBACL,QAAQ,EAAE,cAAc;oBACxB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS;oBAC7B,SAAS,EAAE,QAAQ;oBACnB,MAAM,EAAE,CAAC,CAAC,WAAW;iBACtB;aACF;YACD,QAAQ,EAAE;gBACR,CAAC,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,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE;SACzD,CAAC,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Full Bleed Quote Template
|
|
3
|
+
*
|
|
4
|
+
* Short dramatic text filling the viewport like a movie title card.
|
|
5
|
+
* Designed for punchy text under 60 characters. Uses massive font
|
|
6
|
+
* centered on a dark vignette background.
|
|
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 { FullBleedQuoteInput, TemplateContext } from '../../schemas/BlockTemplates.js';
|
|
12
|
+
export declare function fullBleedQuote(input: FullBleedQuoteInput, context: TemplateContext): Layer[];
|
|
13
|
+
//# sourceMappingURL=fullBleedQuote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fullBleedQuote.d.ts","sourceRoot":"","sources":["../../../src/doc/templates/fullBleedQuote.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;AAI5F,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAE,eAAe,GAAG,KAAK,EAAE,CA2C5F"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Full Bleed Quote Template
|
|
3
|
+
*
|
|
4
|
+
* Short dramatic text filling the viewport like a movie title card.
|
|
5
|
+
* Designed for punchy text under 60 characters. Uses massive font
|
|
6
|
+
* centered on a dark vignette background.
|
|
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 fullBleedQuote(input, context) {
|
|
13
|
+
const { text, colorScheme = 'blue' } = input;
|
|
14
|
+
const { theme } = context;
|
|
15
|
+
const colors = resolveColorScheme(context, colorScheme);
|
|
16
|
+
// Massive font for dramatic impact
|
|
17
|
+
const textFontSize = scaledFontSize(120, context, true);
|
|
18
|
+
return [
|
|
19
|
+
// Background — dark radial vignette for cinematic feel
|
|
20
|
+
{
|
|
21
|
+
type: 'shape',
|
|
22
|
+
id: 'bg',
|
|
23
|
+
content: {
|
|
24
|
+
shape: 'rect',
|
|
25
|
+
fill: `radial-gradient(ellipse at 50% 50%, ${theme.colors.backgroundLight} 0%, #000000 100%)`,
|
|
26
|
+
},
|
|
27
|
+
position: { x: 0, y: 0, width: '100%', height: '100%' },
|
|
28
|
+
},
|
|
29
|
+
// The text — massive, centered
|
|
30
|
+
{
|
|
31
|
+
type: 'text',
|
|
32
|
+
id: 'impact-text',
|
|
33
|
+
content: {
|
|
34
|
+
text,
|
|
35
|
+
style: {
|
|
36
|
+
fontSize: textFontSize,
|
|
37
|
+
fontWeight: 'bold',
|
|
38
|
+
color: colors.text,
|
|
39
|
+
textAlign: 'center',
|
|
40
|
+
lineHeight: 1.2,
|
|
41
|
+
shadow: true,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
position: {
|
|
45
|
+
x: '50%',
|
|
46
|
+
y: '50%',
|
|
47
|
+
anchor: 'center',
|
|
48
|
+
width: '85%',
|
|
49
|
+
},
|
|
50
|
+
animation: { type: 'fadeIn', duration: 1.5 },
|
|
51
|
+
},
|
|
52
|
+
];
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=fullBleedQuote.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fullBleedQuote.js","sourceRoot":"","sources":["../../../src/doc/templates/fullBleedQuote.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,UAAU,cAAc,CAAC,KAA0B,EAAE,OAAwB;IACjF,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC;IAC7C,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;IAC1B,MAAM,MAAM,GAAG,kBAAkB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAExD,mCAAmC;IACnC,MAAM,YAAY,GAAG,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IAExD,OAAO;QACL,uDAAuD;QACvD;YACE,IAAI,EAAE,OAAO;YACb,EAAE,EAAE,IAAI;YACR,OAAO,EAAE;gBACP,KAAK,EAAE,MAAM;gBACb,IAAI,EAAE,uCAAuC,KAAK,CAAC,MAAM,CAAC,eAAe,oBAAoB;aAC9F;YACD,QAAQ,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;SACxD;QACD,+BAA+B;QAC/B;YACE,IAAI,EAAE,MAAM;YACZ,EAAE,EAAE,aAAa;YACjB,OAAO,EAAE;gBACP,IAAI;gBACJ,KAAK,EAAE;oBACL,QAAQ,EAAE,YAAY;oBACtB,UAAU,EAAE,MAAM;oBAClB,KAAK,EAAE,MAAM,CAAC,IAAI;oBAClB,SAAS,EAAE,QAAQ;oBACnB,UAAU,EAAE,GAAG;oBACf,MAAM,EAAE,IAAI;iBACb;aACF;YACD,QAAQ,EAAE;gBACR,CAAC,EAAE,KAAK;gBACR,CAAC,EAAE,KAAK;gBACR,MAAM,EAAE,QAAQ;gBAChB,KAAK,EAAE,KAAK;aACb;YACD,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE;SAC7C;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Image With Caption Template
|
|
3
|
+
*
|
|
4
|
+
* Full-screen background image with text overlay.
|
|
5
|
+
* Supports Ken Burns animation effects (zoom, pan).
|
|
6
|
+
* Adapts caption positioning and font sizes for different viewports.
|
|
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 { ImageWithCaptionInput, TemplateContext } from '../../schemas/BlockTemplates.js';
|
|
12
|
+
export declare function imageWithCaption(input: ImageWithCaptionInput, context: TemplateContext): Layer[];
|
|
13
|
+
//# sourceMappingURL=imageWithCaption.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imageWithCaption.d.ts","sourceRoot":"","sources":["../../../src/doc/templates/imageWithCaption.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAK9F,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,EAAE,OAAO,EAAE,eAAe,GAAG,KAAK,EAAE,CAsJhG"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Image With Caption Template
|
|
3
|
+
*
|
|
4
|
+
* Full-screen background image with text overlay.
|
|
5
|
+
* Supports Ken Burns animation effects (zoom, pan).
|
|
6
|
+
* Adapts caption positioning and font sizes for different viewports.
|
|
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 { cleanCaption } from './captionUtils.js';
|
|
12
|
+
import { mapAmbientMotion } from './accentImage.js';
|
|
13
|
+
export function imageWithCaption(input, context) {
|
|
14
|
+
const { imageSrc, imageAlt, caption: rawCaption, captionPosition: _captionPosition = 'bottom', ambientMotion, isTitle, subtitle, imageCredit, imageLicense, } = input;
|
|
15
|
+
const caption = rawCaption ? cleanCaption(rawCaption) : rawCaption;
|
|
16
|
+
const { theme, layout } = context;
|
|
17
|
+
// Scale font sizes for viewport
|
|
18
|
+
const captionFontSize = scaledFontSize(36, context, false);
|
|
19
|
+
const titleFontSize = scaledFontSize(96, context, true);
|
|
20
|
+
const subtitleFontSize = scaledFontSize(36, context, false);
|
|
21
|
+
// Determine animation based on ambientMotion setting
|
|
22
|
+
// Support both new 'ambientMotion' and legacy 'kenBurns' property
|
|
23
|
+
const legacyKenBurns = input.kenBurns;
|
|
24
|
+
const motion = ambientMotion || legacyKenBurns;
|
|
25
|
+
const imageAnimation = mapAmbientMotion(motion);
|
|
26
|
+
const layers = [
|
|
27
|
+
// Background image
|
|
28
|
+
{
|
|
29
|
+
type: 'image',
|
|
30
|
+
id: 'bg-image',
|
|
31
|
+
content: {
|
|
32
|
+
src: imageSrc,
|
|
33
|
+
alt: imageAlt,
|
|
34
|
+
fit: 'cover',
|
|
35
|
+
credit: imageCredit,
|
|
36
|
+
license: imageLicense,
|
|
37
|
+
},
|
|
38
|
+
position: { x: 0, y: 0, width: '100%', height: '100%' },
|
|
39
|
+
animation: imageAnimation,
|
|
40
|
+
},
|
|
41
|
+
];
|
|
42
|
+
// TITLE MODE: Large centered title over hero image (like cover slide)
|
|
43
|
+
if (isTitle && caption) {
|
|
44
|
+
// Full gradient overlay for title readability (similar to cover slide)
|
|
45
|
+
layers.push({
|
|
46
|
+
type: 'shape',
|
|
47
|
+
id: 'title-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 text - large and centered in lower portion
|
|
55
|
+
layers.push({
|
|
56
|
+
type: 'text',
|
|
57
|
+
id: 'title',
|
|
58
|
+
content: {
|
|
59
|
+
text: caption,
|
|
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
|
+
animation: { type: 'fadeIn', duration: 0.8 },
|
|
75
|
+
});
|
|
76
|
+
// Optional subtitle
|
|
77
|
+
if (subtitle) {
|
|
78
|
+
layers.push({
|
|
79
|
+
type: 'text',
|
|
80
|
+
id: 'subtitle',
|
|
81
|
+
content: {
|
|
82
|
+
text: subtitle,
|
|
83
|
+
style: {
|
|
84
|
+
fontSize: subtitleFontSize,
|
|
85
|
+
color: theme.colors.textMuted,
|
|
86
|
+
textAlign: 'center',
|
|
87
|
+
lineHeight: 1.5,
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
position: {
|
|
91
|
+
x: '50%',
|
|
92
|
+
y: '82%',
|
|
93
|
+
anchor: 'center',
|
|
94
|
+
width: layout.maxTextWidth,
|
|
95
|
+
},
|
|
96
|
+
animation: { type: 'fadeIn', duration: 0.8, delay: 0.2 },
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
return layers;
|
|
100
|
+
}
|
|
101
|
+
// STANDARD MODE: Caption at bottom
|
|
102
|
+
if (caption) {
|
|
103
|
+
// Subtle gradient at bottom for caption readability (raised above media controls)
|
|
104
|
+
layers.push({
|
|
105
|
+
type: 'shape',
|
|
106
|
+
id: 'caption-gradient',
|
|
107
|
+
content: {
|
|
108
|
+
shape: 'rect',
|
|
109
|
+
fill: 'linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 60%, transparent 100%)',
|
|
110
|
+
},
|
|
111
|
+
position: {
|
|
112
|
+
x: 0,
|
|
113
|
+
y: '65%',
|
|
114
|
+
width: '100%',
|
|
115
|
+
height: '35%',
|
|
116
|
+
},
|
|
117
|
+
});
|
|
118
|
+
// Caption text - raised above media controls
|
|
119
|
+
layers.push({
|
|
120
|
+
type: 'text',
|
|
121
|
+
id: 'caption',
|
|
122
|
+
content: {
|
|
123
|
+
text: caption,
|
|
124
|
+
style: {
|
|
125
|
+
fontSize: captionFontSize,
|
|
126
|
+
color: theme.colors.text,
|
|
127
|
+
textAlign: 'center',
|
|
128
|
+
shadow: true,
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
position: {
|
|
132
|
+
x: '50%',
|
|
133
|
+
y: '82%',
|
|
134
|
+
anchor: 'center',
|
|
135
|
+
width: layout.maxTextWidth,
|
|
136
|
+
},
|
|
137
|
+
animation: { type: 'fadeIn', duration: 1.5, delay: 0.5 },
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
return layers;
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=imageWithCaption.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imageWithCaption.js","sourceRoot":"","sources":["../../../src/doc/templates/imageWithCaption.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,UAAU,gBAAgB,CAAC,KAA4B,EAAE,OAAwB;IACrF,MAAM,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EAAE,UAAU,EACnB,eAAe,EAAE,gBAAgB,GAAG,QAAQ,EAC5C,aAAa,EACb,OAAO,EACP,QAAQ,EACR,WAAW,EACX,YAAY,GACb,GAAG,KAAK,CAAC;IACV,MAAM,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;IACnE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAElC,gCAAgC;IAChC,MA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F,MAAM,CAAC,IAAI,CAAC;YACV,IAAI,EAAE,OAAO;YACb,EAAE,EAAE,kBAAkB;YACtB,OAAO,EAAE;gBACP,KAAK,EAAE,MAAM;gBACb,IAAI,EAAE,kFAAkF;aACzF;YACD,QAAQ,EAAE;gBACR,CAAC,EAAE,CAAC;gBACJ,CAAC,EAAE,KAAK;gBACR,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,KAAK;aACd;SACF,CAAC,CAAC;QAEH,6CAA6C;QAC7C,MAAM,CAAC,IAAI,CAAC;YACV,IAAI,EAAE,MAAM;YACZ,EAAE,EAAE,SAAS;YACb,OAAO,EAAE;gBACP,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACL,QAAQ,EAAE,eAAe;oBACzB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;oBACxB,SAAS,EAAE,QAAQ;oBACnB,MAAM,EAAE,IAAI;iBACb;aACF;YACD,QAAQ,EAAE;gBACR,CAAC,EAAE,KAAK;gBACR,CAAC,EAAE,KAAK;gBACR,MAAM,EAAE,QAAQ;gBAChB,KAAK,EAAE,MAAM,CAAC,YAAY;aAC3B;YACD,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE;SACzD,CAAC,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Block Template Registry
|
|
3
|
+
*
|
|
4
|
+
* Central registry of all block templates. Provides functions to:
|
|
5
|
+
* - Look up templates by name
|
|
6
|
+
* - Expand template blocks into full Layer arrays
|
|
7
|
+
* - Convert a template-based doc script into a renderable format
|
|
8
|
+
*
|
|
9
|
+
* Supports multiple viewport configurations for different aspect ratios.
|
|
10
|
+
*
|
|
11
|
+
* This is shared code used by both site and efb-app doc renderers.
|
|
12
|
+
*/
|
|
13
|
+
import type { Block } from '../../schemas/Doc.js';
|
|
14
|
+
import type { TemplateBlock, TemplateContext, TemplateRegistry, DocBlock, PersistentLayerConfig } from '../../schemas/BlockTemplates.js';
|
|
15
|
+
import type { Theme } from '../../schemas/Theme.js';
|
|
16
|
+
import type { ViewportConfig } from '../../schemas/Viewport.js';
|
|
17
|
+
/**
|
|
18
|
+
* Registry mapping template names to their implementation functions.
|
|
19
|
+
* Note: coverBlock is not in the registry as it's used directly for start blocks,
|
|
20
|
+
* not as a regular template in the block sequence.
|
|
21
|
+
*/
|
|
22
|
+
export declare const templateRegistry: TemplateRegistry;
|
|
23
|
+
/**
|
|
24
|
+
* Expand a template block into a full Block with layers.
|
|
25
|
+
*/
|
|
26
|
+
export declare function expandTemplateBlock(templateBlock: TemplateBlock, context: TemplateContext): Block;
|
|
27
|
+
/**
|
|
28
|
+
* Audio segment timing info for aligning blocks with audio.
|
|
29
|
+
*/
|
|
30
|
+
export interface AudioSegmentTiming {
|
|
31
|
+
/** Start time of this segment in the overall timeline */
|
|
32
|
+
startTime: number;
|
|
33
|
+
/** Duration of this segment */
|
|
34
|
+
duration: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Options for expanding doc blocks.
|
|
38
|
+
*/
|
|
39
|
+
export interface ExpandDocBlocksOptions {
|
|
40
|
+
/** Theme for template rendering (defaults to DEFAULT_THEME) */
|
|
41
|
+
theme?: Theme;
|
|
42
|
+
/** Viewport configuration (defaults to 16:9 landscape) */
|
|
43
|
+
viewport?: ViewportConfig;
|
|
44
|
+
/** Persistent layers for visual consistency across blocks */
|
|
45
|
+
persistentLayers?: PersistentLayerConfig;
|
|
46
|
+
/**
|
|
47
|
+
* Audio segment timing information.
|
|
48
|
+
* When provided, blocks are timed relative to their audio segment's start time,
|
|
49
|
+
* ensuring proper synchronization with audio playback.
|
|
50
|
+
*/
|
|
51
|
+
audioSegments?: AudioSegmentTiming[];
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Expand all template blocks in a doc, calculating start times.
|
|
55
|
+
* Injects persistent layers (bottom/top) based on per-block flags.
|
|
56
|
+
*
|
|
57
|
+
* When audioSegments is provided, blocks are timed relative to their audio segment's
|
|
58
|
+
* start time, ensuring blocks appear when their audio is playing. Blocks within each
|
|
59
|
+
* segment are distributed proportionally across the segment duration.
|
|
60
|
+
*
|
|
61
|
+
* @param blocks - Array of template or raw blocks
|
|
62
|
+
* @param options - Expansion options including theme, viewport, and persistent layers
|
|
63
|
+
*/
|
|
64
|
+
export declare function expandDocBlocks(blocks: DocBlock[], options?: ExpandDocBlocksOptions): Block[];
|
|
65
|
+
/**
|
|
66
|
+
* Get list of available template names.
|
|
67
|
+
*/
|
|
68
|
+
export declare function getAvailableTemplates(): string[];
|
|
69
|
+
/**
|
|
70
|
+
* Check if a template exists.
|
|
71
|
+
*/
|
|
72
|
+
export declare function hasTemplate(name: string): boolean;
|
|
73
|
+
export { isTemplateBlock, createTemplateContext, scaledFontSize, } from '../../schemas/BlockTemplates.js';
|
|
74
|
+
export type { TemplateBlock, DocBlock, TemplateContext, PersistentLayerConfig, } from '../../schemas/BlockTemplates.js';
|
|
75
|
+
export { DEFAULT_THEME, resolveTheme, getAvailableThemes, getThemeSummaries, } from '../../schemas/themeLibrary.js';
|
|
76
|
+
export type { Theme, ThemeColorPalette, ThemeColorScheme, ThemeTypography, ThemeStyle, RenderStyle, } from '../../schemas/Theme.js';
|
|
77
|
+
export type { DocStylePreset } from './persistentLayers.js';
|
|
78
|
+
export { VIEWPORT_PRESETS, getViewport, getViewportOrientation } from '../../schemas/Viewport.js';
|
|
79
|
+
export type { ViewportConfig, ViewportPreset, ViewportOrientation, } from '../../schemas/Viewport.js';
|
|
80
|
+
export { getLayoutHints, getTwoColumnPositions } from '../../schemas/LayoutStrategy.js';
|
|
81
|
+
export type { LayoutHints } from '../../schemas/LayoutStrategy.js';
|
|
82
|
+
export { expandPersistentLayers, getDocStyleConfig } from './persistentLayers.js';
|
|
83
|
+
export { titleBlock } from './titleBlock.js';
|
|
84
|
+
export { sectionHeader } from './sectionHeader.js';
|
|
85
|
+
export { statHighlight } from './statHighlight.js';
|
|
86
|
+
export { quoteBlock } from './quoteBlock.js';
|
|
87
|
+
export { factCard } from './factCard.js';
|
|
88
|
+
export { twoColumn } from './twoColumn.js';
|
|
89
|
+
export { dateEvent } from './dateEvent.js';
|
|
90
|
+
export { imageWithCaption } from './imageWithCaption.js';
|
|
91
|
+
export { mapBlock } from './mapBlock.js';
|
|
92
|
+
export { coverBlock, expandCoverBlock } from './coverBlock.js';
|
|
93
|
+
export type { CoverBlockInput } from './coverBlock.js';
|
|
94
|
+
export { fullBleedQuote } from './fullBleedQuote.js';
|
|
95
|
+
export { listBlock } from './listBlock.js';
|
|
96
|
+
export { photoGrid } from './photoGrid.js';
|
|
97
|
+
export { definitionCard } from './definitionCard.js';
|
|
98
|
+
export { comparisonBar } from './comparisonBar.js';
|
|
99
|
+
export { pullQuote } from './pullQuote.js';
|
|
100
|
+
export { videoWithCaption } from './videoWithCaption.js';
|
|
101
|
+
export { videoPullQuote } from './videoPullQuote.js';
|
|
102
|
+
export { getAccentLayout, createAccentLayers, adjustY, DEFAULT_LAYOUT } from './accentImage.js';
|
|
103
|
+
export type { AccentLayout } from './accentImage.js';
|
|
104
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/doc/templates/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAS,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,qBAAqB,EACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAIpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAsBhE;;;;GAIG;AACH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