@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
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,70 +1,10 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* This decouples the rendering layer from the storage backend:
|
|
12
|
-
* - In the dev site, a SlotStorage-backed provider serves blob URLs from IndexedDB
|
|
13
|
-
* - In production, a simple basePath provider constructs CDN URLs
|
|
14
|
-
* - In tests, a memory-backed provider returns data URIs
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* Metadata about a stored media asset.
|
|
18
|
-
*/
|
|
19
|
-
interface MediaEntry {
|
|
20
|
-
/** Filename (e.g., 'hero.jpg') */
|
|
21
|
-
name: string;
|
|
22
|
-
/** MIME type (e.g., 'image/jpeg') */
|
|
23
|
-
mimeType: string;
|
|
24
|
-
/** File size in bytes */
|
|
25
|
-
size: number;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Interface for resolving and managing media assets.
|
|
29
|
-
*
|
|
30
|
-
* All methods are async to support IndexedDB and other async storage backends.
|
|
31
|
-
* The `resolveUrl` method is the primary integration point for rendering
|
|
32
|
-
* components — it converts a relative media path into a displayable URL.
|
|
33
|
-
*/
|
|
34
|
-
interface MediaProvider {
|
|
35
|
-
/**
|
|
36
|
-
* Resolve a relative media path to a displayable URL.
|
|
37
|
-
*
|
|
38
|
-
* Returns a URL that can be used in <img src>, <video src>, etc.
|
|
39
|
-
* This may be a blob: URL, data: URL, or absolute HTTP URL depending
|
|
40
|
-
* on the provider implementation.
|
|
41
|
-
*
|
|
42
|
-
* @param relativePath - Relative path as stored in the document (e.g., 'hero.jpg')
|
|
43
|
-
* @returns Displayable URL, or the original path if resolution fails
|
|
44
|
-
*/
|
|
45
|
-
resolveUrl(relativePath: string): Promise<string>;
|
|
46
|
-
/**
|
|
47
|
-
* List all media assets available in this provider's scope.
|
|
48
|
-
*/
|
|
49
|
-
listMedia(): Promise<MediaEntry[]>;
|
|
50
|
-
/**
|
|
51
|
-
* Add a media asset. Returns the relative path to reference in documents.
|
|
52
|
-
*
|
|
53
|
-
* @param name - Filename for the asset (e.g., 'photo.jpg')
|
|
54
|
-
* @param data - Binary content (ArrayBuffer, Blob, or Uint8Array)
|
|
55
|
-
* @param mimeType - MIME type of the data
|
|
56
|
-
* @returns The relative path to use in document references
|
|
57
|
-
*/
|
|
58
|
-
addMedia(name: string, data: ArrayBuffer | Blob | Uint8Array, mimeType: string): Promise<string>;
|
|
59
|
-
/**
|
|
60
|
-
* Remove a media asset by its relative path.
|
|
61
|
-
*/
|
|
62
|
-
removeMedia(relativePath: string): Promise<void>;
|
|
63
|
-
/**
|
|
64
|
-
* Dispose of any held resources (e.g., revoke blob URLs).
|
|
65
|
-
* Call this when the provider is no longer needed.
|
|
66
|
-
*/
|
|
67
|
-
dispose(): void;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export type { MediaEntry, MediaProvider };
|
|
1
|
+
export * from './Types.js';
|
|
2
|
+
export * from './Doc.js';
|
|
3
|
+
export * from './BlockTemplates.js';
|
|
4
|
+
export * from './Theme.js';
|
|
5
|
+
export * from './themeLibrary.js';
|
|
6
|
+
export * from './Viewport.js';
|
|
7
|
+
export { getLayoutHints, getTwoColumnPositions, getSafeTextBounds, scaledFontSize as layoutScaledFontSize, } from './LayoutStrategy.js';
|
|
8
|
+
export type { LayoutHints } from './LayoutStrategy.js';
|
|
9
|
+
export type { MediaProvider, MediaEntry } from './MediaProvider.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,IAAI,oBAAoB,GACvC,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/schemas/index.js
CHANGED
|
@@ -1,61 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from "../chunk-S4F2RY37.js";
|
|
9
|
-
import {
|
|
10
|
-
DEFAULT_DOC_FONT,
|
|
11
|
-
DEFAULT_THEME,
|
|
12
|
-
DEFAULT_THEME_ID,
|
|
13
|
-
DEFAULT_TITLE_FONT,
|
|
14
|
-
THEMES,
|
|
15
|
-
VIEWPORT_PRESETS,
|
|
16
|
-
calculateFontScale,
|
|
17
|
-
createTemplateContext,
|
|
18
|
-
getAspectRatioString,
|
|
19
|
-
getAvailableThemes,
|
|
20
|
-
getLayoutHints,
|
|
21
|
-
getSafeTextBounds,
|
|
22
|
-
getThemeSummaries,
|
|
23
|
-
getTwoColumnPositions,
|
|
24
|
-
getViewport,
|
|
25
|
-
getViewportOrientation,
|
|
26
|
-
isPersistentLayerTemplate,
|
|
27
|
-
isTemplateBlock,
|
|
28
|
-
resolveTheme,
|
|
29
|
-
scaledFontSize,
|
|
30
|
-
scaledFontSize2
|
|
31
|
-
} from "../chunk-O5HCIUAD.js";
|
|
32
|
-
export {
|
|
33
|
-
DEFAULT_DOC_FONT,
|
|
34
|
-
DEFAULT_THEME,
|
|
35
|
-
DEFAULT_THEME_ID,
|
|
36
|
-
DEFAULT_TITLE_FONT,
|
|
37
|
-
THEMES,
|
|
38
|
-
VIEWPORT_PRESETS,
|
|
39
|
-
calculateDuration,
|
|
40
|
-
calculateFontScale,
|
|
41
|
-
createTemplateContext,
|
|
42
|
-
createTheme,
|
|
43
|
-
getAspectRatioString,
|
|
44
|
-
getAvailableThemes,
|
|
45
|
-
getBlockAtTime,
|
|
46
|
-
getCaptionAtTime,
|
|
47
|
-
getLayoutHints,
|
|
48
|
-
getSafeTextBounds,
|
|
49
|
-
getSegmentAtTime,
|
|
50
|
-
getThemeSummaries,
|
|
51
|
-
getTwoColumnPositions,
|
|
52
|
-
getViewport,
|
|
53
|
-
getViewportOrientation,
|
|
54
|
-
isPersistentLayerTemplate,
|
|
55
|
-
isTemplateBlock,
|
|
56
|
-
scaledFontSize as layoutScaledFontSize,
|
|
57
|
-
resolveTheme,
|
|
58
|
-
scaledFontSize2 as scaledFontSize,
|
|
59
|
-
validateDoc
|
|
60
|
-
};
|
|
1
|
+
export * from './Types.js';
|
|
2
|
+
export * from './Doc.js';
|
|
3
|
+
export * from './BlockTemplates.js';
|
|
4
|
+
export * from './Theme.js';
|
|
5
|
+
export * from './themeLibrary.js';
|
|
6
|
+
export * from './Viewport.js';
|
|
7
|
+
export { getLayoutHints, getTwoColumnPositions, getSafeTextBounds, scaledFontSize as layoutScaledFontSize, } from './LayoutStrategy.js';
|
|
61
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,IAAI,oBAAoB,GACvC,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in Theme Library
|
|
3
|
+
*
|
|
4
|
+
* Ships 8 curated themes covering documentary, editorial, minimal, and
|
|
5
|
+
* cinematic styles. Each theme is fully JSON-serializable.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { THEMES, resolveTheme } from '@bendyline/squisq/schemas';
|
|
10
|
+
*
|
|
11
|
+
* const theme = resolveTheme('minimalist'); // look up by id
|
|
12
|
+
* const theme = THEMES.documentary; // direct access
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
import type { Theme } from './Theme.js';
|
|
16
|
+
/**
|
|
17
|
+
* All built-in themes, keyed by id.
|
|
18
|
+
*/
|
|
19
|
+
export declare const THEMES: Record<string, Theme>;
|
|
20
|
+
/** The default theme id. */
|
|
21
|
+
export declare const DEFAULT_THEME_ID = "documentary";
|
|
22
|
+
/** The default theme (documentary — migrated from old DEFAULT_THEME). */
|
|
23
|
+
export declare const DEFAULT_THEME: Theme;
|
|
24
|
+
/**
|
|
25
|
+
* Resolve a theme by id. Returns the default theme when `id` is
|
|
26
|
+
* undefined or not found in the library.
|
|
27
|
+
*/
|
|
28
|
+
export declare function resolveTheme(id: string | undefined): Theme;
|
|
29
|
+
/**
|
|
30
|
+
* Get all available theme ids.
|
|
31
|
+
*/
|
|
32
|
+
export declare function getAvailableThemes(): string[];
|
|
33
|
+
/**
|
|
34
|
+
* Get a summary of all themes (id + name + description) for theme pickers.
|
|
35
|
+
*/
|
|
36
|
+
export declare function getThemeSummaries(): Array<{
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
description?: string;
|
|
40
|
+
}>;
|
|
41
|
+
//# sourceMappingURL=themeLibrary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themeLibrary.d.ts","sourceRoot":"","sources":["../../src/schemas/themeLibrary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAoB,MAAM,YAAY,CAAC;AA+a1D;;GAEG;AACH,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CASxC,CAAC;AAEF,4BAA4B;AAC5B,eAAO,MAAM,gBAAgB,gBAAgB,CAAC;AAE9C,yEAAyE;AACzE,eAAO,MAAM,aAAa,EAAE,KAAmB,CAAC;AAEhD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,KAAK,CAG1D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAE7C;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAM7F"}
|
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in Theme Library
|
|
3
|
+
*
|
|
4
|
+
* Ships 8 curated themes covering documentary, editorial, minimal, and
|
|
5
|
+
* cinematic styles. Each theme is fully JSON-serializable.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { THEMES, resolveTheme } from '@bendyline/squisq/schemas';
|
|
10
|
+
*
|
|
11
|
+
* const theme = resolveTheme('minimalist'); // look up by id
|
|
12
|
+
* const theme = THEMES.documentary; // direct access
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
// ============================================
|
|
16
|
+
// Shared constants
|
|
17
|
+
// ============================================
|
|
18
|
+
const SERIF = '"PT Serif", Georgia, "Times New Roman", serif';
|
|
19
|
+
const SANS = '"Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif';
|
|
20
|
+
const MONO = '"JetBrains Mono", "Fira Code", "Consolas", monospace';
|
|
21
|
+
const MERRIWEATHER = '"Merriweather", Georgia, "Times New Roman", serif';
|
|
22
|
+
const GEORGIA = 'Georgia, "Times New Roman", serif';
|
|
23
|
+
/** Standard 6-scheme set used by the documentary theme (migrated from old COLOR_SCHEMES). */
|
|
24
|
+
const CLASSIC_COLOR_SCHEMES = {
|
|
25
|
+
blue: { bg: '#1a365d', text: '#63b3ed', accent: '#90cdf4' },
|
|
26
|
+
green: { bg: '#22543d', text: '#9ae6b4', accent: '#68d391' },
|
|
27
|
+
purple: { bg: '#44337a', text: '#d6bcfa', accent: '#b794f4' },
|
|
28
|
+
red: { bg: '#742a2a', text: '#fc8181', accent: '#feb2b2' },
|
|
29
|
+
orange: { bg: '#744210', text: '#fbd38d', accent: '#f6ad55' },
|
|
30
|
+
teal: { bg: '#234e52', text: '#81e6d9', accent: '#4fd1c5' },
|
|
31
|
+
};
|
|
32
|
+
// ============================================
|
|
33
|
+
// 1. Documentary (default — migrated from old DEFAULT_THEME)
|
|
34
|
+
// ============================================
|
|
35
|
+
const documentary = {
|
|
36
|
+
id: 'documentary',
|
|
37
|
+
name: 'Documentary',
|
|
38
|
+
description: 'Classic dark cinematic look with serif typography. The original Squisq style.',
|
|
39
|
+
colors: {
|
|
40
|
+
primary: '#3d5a80',
|
|
41
|
+
secondary: '#63b3ed',
|
|
42
|
+
background: '#1a202c',
|
|
43
|
+
backgroundLight: '#2d3748',
|
|
44
|
+
text: '#ffffff',
|
|
45
|
+
textMuted: '#a0aec0',
|
|
46
|
+
highlight: '#63b3ed',
|
|
47
|
+
warning: '#fc8181',
|
|
48
|
+
},
|
|
49
|
+
typography: {
|
|
50
|
+
bodyFontFamily: SERIF,
|
|
51
|
+
titleFontFamily: SERIF,
|
|
52
|
+
titleWeight: 'bold',
|
|
53
|
+
},
|
|
54
|
+
style: {
|
|
55
|
+
textShadow: true,
|
|
56
|
+
overlayOpacity: 0.5,
|
|
57
|
+
animationSpeed: 1.0,
|
|
58
|
+
},
|
|
59
|
+
renderStyle: {
|
|
60
|
+
name: 'documentary',
|
|
61
|
+
defaultTextAnimation: 'fadeIn',
|
|
62
|
+
defaultImageAnimation: 'slowZoom',
|
|
63
|
+
ambientMotion: true,
|
|
64
|
+
defaultTransition: { type: 'fade', duration: 0.8 },
|
|
65
|
+
},
|
|
66
|
+
colorSchemes: CLASSIC_COLOR_SCHEMES,
|
|
67
|
+
persistentLayers: {
|
|
68
|
+
bottomLayers: [
|
|
69
|
+
{
|
|
70
|
+
template: 'gradientBackground',
|
|
71
|
+
config: { type: 'gradientBackground', preset: 'dark-vignette' },
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
// ============================================
|
|
77
|
+
// 2. Minimalist
|
|
78
|
+
// ============================================
|
|
79
|
+
const minimalist = {
|
|
80
|
+
id: 'minimalist',
|
|
81
|
+
name: 'Minimalist',
|
|
82
|
+
description: 'Clean near-white background with sans-serif type and minimal animation.',
|
|
83
|
+
colors: {
|
|
84
|
+
primary: '#2d3748',
|
|
85
|
+
secondary: '#4a5568',
|
|
86
|
+
background: '#f7fafc',
|
|
87
|
+
backgroundLight: '#edf2f7',
|
|
88
|
+
text: '#1a202c',
|
|
89
|
+
textMuted: '#718096',
|
|
90
|
+
highlight: '#3182ce',
|
|
91
|
+
warning: '#e53e3e',
|
|
92
|
+
},
|
|
93
|
+
typography: {
|
|
94
|
+
bodyFontFamily: SANS,
|
|
95
|
+
titleFontFamily: SANS,
|
|
96
|
+
titleWeight: 'bold',
|
|
97
|
+
lineHeight: 1.6,
|
|
98
|
+
},
|
|
99
|
+
style: {
|
|
100
|
+
textShadow: false,
|
|
101
|
+
overlayOpacity: 0.3,
|
|
102
|
+
animationSpeed: 1.2,
|
|
103
|
+
borderRadius: 8,
|
|
104
|
+
},
|
|
105
|
+
renderStyle: {
|
|
106
|
+
name: 'minimalist',
|
|
107
|
+
defaultTextAnimation: 'fadeIn',
|
|
108
|
+
ambientMotion: false,
|
|
109
|
+
defaultTransition: { type: 'fade', duration: 0.6 },
|
|
110
|
+
templateHints: {
|
|
111
|
+
titleBlock: { showAccentLine: false },
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
colorSchemes: {
|
|
115
|
+
blue: { bg: '#ebf8ff', text: '#2b6cb0', accent: '#3182ce' },
|
|
116
|
+
green: { bg: '#f0fff4', text: '#276749', accent: '#38a169' },
|
|
117
|
+
purple: { bg: '#faf5ff', text: '#553c9a', accent: '#805ad5' },
|
|
118
|
+
red: { bg: '#fff5f5', text: '#c53030', accent: '#e53e3e' },
|
|
119
|
+
orange: { bg: '#fffaf0', text: '#c05621', accent: '#dd6b20' },
|
|
120
|
+
teal: { bg: '#e6fffa', text: '#285e61', accent: '#319795' },
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
// ============================================
|
|
124
|
+
// 3. Bold
|
|
125
|
+
// ============================================
|
|
126
|
+
const bold = {
|
|
127
|
+
id: 'bold',
|
|
128
|
+
name: 'Bold',
|
|
129
|
+
description: 'High-contrast black with vivid accents and dramatic animations.',
|
|
130
|
+
colors: {
|
|
131
|
+
primary: '#e53e3e',
|
|
132
|
+
secondary: '#ed8936',
|
|
133
|
+
background: '#000000',
|
|
134
|
+
backgroundLight: '#1a1a1a',
|
|
135
|
+
text: '#ffffff',
|
|
136
|
+
textMuted: '#cbd5e0',
|
|
137
|
+
highlight: '#f6e05e',
|
|
138
|
+
warning: '#fc8181',
|
|
139
|
+
},
|
|
140
|
+
typography: {
|
|
141
|
+
bodyFontFamily: SANS,
|
|
142
|
+
titleFontFamily: SANS,
|
|
143
|
+
titleWeight: 'bold',
|
|
144
|
+
titleScale: 1.15,
|
|
145
|
+
bodyScale: 1.0,
|
|
146
|
+
titleLineHeight: 1.1,
|
|
147
|
+
},
|
|
148
|
+
style: {
|
|
149
|
+
textShadow: true,
|
|
150
|
+
overlayOpacity: 0.6,
|
|
151
|
+
animationSpeed: 0.8,
|
|
152
|
+
},
|
|
153
|
+
renderStyle: {
|
|
154
|
+
name: 'bold',
|
|
155
|
+
defaultTextAnimation: 'zoomIn',
|
|
156
|
+
defaultImageAnimation: 'slowZoom',
|
|
157
|
+
ambientMotion: true,
|
|
158
|
+
defaultTransition: { type: 'dissolve', duration: 0.5 },
|
|
159
|
+
templateHints: {
|
|
160
|
+
statHighlight: { entrance: 'dramatic' },
|
|
161
|
+
fullBleedQuote: { entrance: 'dramatic' },
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
colorSchemes: {
|
|
165
|
+
blue: { bg: '#1a202c', text: '#63b3ed', accent: '#90cdf4' },
|
|
166
|
+
green: { bg: '#1a202c', text: '#48bb78', accent: '#68d391' },
|
|
167
|
+
purple: { bg: '#1a202c', text: '#b794f4', accent: '#d6bcfa' },
|
|
168
|
+
red: { bg: '#1a202c', text: '#fc8181', accent: '#feb2b2' },
|
|
169
|
+
orange: { bg: '#1a202c', text: '#f6ad55', accent: '#fbd38d' },
|
|
170
|
+
teal: { bg: '#1a202c', text: '#4fd1c5', accent: '#81e6d9' },
|
|
171
|
+
},
|
|
172
|
+
};
|
|
173
|
+
// ============================================
|
|
174
|
+
// 4. Morning Light
|
|
175
|
+
// ============================================
|
|
176
|
+
const morningLight = {
|
|
177
|
+
id: 'morning-light',
|
|
178
|
+
name: 'Morning Light',
|
|
179
|
+
description: 'Warm light background with dark text and gentle serif typography.',
|
|
180
|
+
colors: {
|
|
181
|
+
primary: '#744210',
|
|
182
|
+
secondary: '#975a16',
|
|
183
|
+
background: '#faf8f5',
|
|
184
|
+
backgroundLight: '#f5f0eb',
|
|
185
|
+
text: '#2d3748',
|
|
186
|
+
textMuted: '#718096',
|
|
187
|
+
highlight: '#dd6b20',
|
|
188
|
+
warning: '#c53030',
|
|
189
|
+
},
|
|
190
|
+
typography: {
|
|
191
|
+
bodyFontFamily: MERRIWEATHER,
|
|
192
|
+
titleFontFamily: MERRIWEATHER,
|
|
193
|
+
titleWeight: 'bold',
|
|
194
|
+
lineHeight: 1.7,
|
|
195
|
+
},
|
|
196
|
+
style: {
|
|
197
|
+
textShadow: false,
|
|
198
|
+
overlayOpacity: 0.35,
|
|
199
|
+
animationSpeed: 1.1,
|
|
200
|
+
borderRadius: 4,
|
|
201
|
+
},
|
|
202
|
+
renderStyle: {
|
|
203
|
+
name: 'morning-light',
|
|
204
|
+
defaultTextAnimation: 'fadeIn',
|
|
205
|
+
ambientMotion: false,
|
|
206
|
+
defaultTransition: { type: 'fade', duration: 1.0 },
|
|
207
|
+
},
|
|
208
|
+
colorSchemes: {
|
|
209
|
+
blue: { bg: '#ebf8ff', text: '#2c5282', accent: '#4299e1' },
|
|
210
|
+
green: { bg: '#f0fff4', text: '#22543d', accent: '#48bb78' },
|
|
211
|
+
purple: { bg: '#faf5ff', text: '#44337a', accent: '#9f7aea' },
|
|
212
|
+
red: { bg: '#fff5f5', text: '#9b2c2c', accent: '#fc8181' },
|
|
213
|
+
orange: { bg: '#fffaf0', text: '#744210', accent: '#ed8936' },
|
|
214
|
+
teal: { bg: '#e6fffa', text: '#234e52', accent: '#38b2ac' },
|
|
215
|
+
},
|
|
216
|
+
};
|
|
217
|
+
// ============================================
|
|
218
|
+
// 5. Tech Dark
|
|
219
|
+
// ============================================
|
|
220
|
+
const techDark = {
|
|
221
|
+
id: 'tech-dark',
|
|
222
|
+
name: 'Tech Dark',
|
|
223
|
+
description: 'True black with neon cyan/green accents and monospace titles.',
|
|
224
|
+
colors: {
|
|
225
|
+
primary: '#00e5ff',
|
|
226
|
+
secondary: '#00e676',
|
|
227
|
+
background: '#0a0a0a',
|
|
228
|
+
backgroundLight: '#1a1a2e',
|
|
229
|
+
text: '#e0e0e0',
|
|
230
|
+
textMuted: '#9e9e9e',
|
|
231
|
+
highlight: '#00e5ff',
|
|
232
|
+
warning: '#ff5252',
|
|
233
|
+
},
|
|
234
|
+
typography: {
|
|
235
|
+
bodyFontFamily: SANS,
|
|
236
|
+
titleFontFamily: MONO,
|
|
237
|
+
monoFontFamily: MONO,
|
|
238
|
+
titleWeight: 'bold',
|
|
239
|
+
titleScale: 0.9,
|
|
240
|
+
lineHeight: 1.5,
|
|
241
|
+
},
|
|
242
|
+
style: {
|
|
243
|
+
textShadow: true,
|
|
244
|
+
overlayOpacity: 0.55,
|
|
245
|
+
animationSpeed: 0.9,
|
|
246
|
+
borderRadius: 2,
|
|
247
|
+
},
|
|
248
|
+
renderStyle: {
|
|
249
|
+
name: 'tech-dark',
|
|
250
|
+
defaultTextAnimation: 'typewriter',
|
|
251
|
+
defaultImageAnimation: 'slowZoom',
|
|
252
|
+
ambientMotion: true,
|
|
253
|
+
defaultTransition: { type: 'dissolve', duration: 0.4 },
|
|
254
|
+
templateHints: {
|
|
255
|
+
statHighlight: { entrance: 'dramatic' },
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
colorSchemes: {
|
|
259
|
+
blue: { bg: '#0d1b2a', text: '#00b0ff', accent: '#40c4ff' },
|
|
260
|
+
green: { bg: '#0d1b0d', text: '#00e676', accent: '#69f0ae' },
|
|
261
|
+
purple: { bg: '#1a0d2e', text: '#d500f9', accent: '#ea80fc' },
|
|
262
|
+
red: { bg: '#2e0d0d', text: '#ff5252', accent: '#ff8a80' },
|
|
263
|
+
orange: { bg: '#2e1a0d', text: '#ff9100', accent: '#ffab40' },
|
|
264
|
+
teal: { bg: '#0d2e2e', text: '#1de9b6', accent: '#64ffda' },
|
|
265
|
+
},
|
|
266
|
+
};
|
|
267
|
+
// ============================================
|
|
268
|
+
// 6. Magazine
|
|
269
|
+
// ============================================
|
|
270
|
+
const magazine = {
|
|
271
|
+
id: 'magazine',
|
|
272
|
+
name: 'Magazine',
|
|
273
|
+
description: 'Rich editorial palette with mixed serif/sans typography and slide transitions.',
|
|
274
|
+
colors: {
|
|
275
|
+
primary: '#c53030',
|
|
276
|
+
secondary: '#2b6cb0',
|
|
277
|
+
background: '#1a202c',
|
|
278
|
+
backgroundLight: '#2d3748',
|
|
279
|
+
text: '#f7fafc',
|
|
280
|
+
textMuted: '#cbd5e0',
|
|
281
|
+
highlight: '#ed8936',
|
|
282
|
+
warning: '#fc8181',
|
|
283
|
+
},
|
|
284
|
+
typography: {
|
|
285
|
+
bodyFontFamily: SANS,
|
|
286
|
+
titleFontFamily: GEORGIA,
|
|
287
|
+
titleWeight: 'bold',
|
|
288
|
+
titleScale: 1.05,
|
|
289
|
+
lineHeight: 1.5,
|
|
290
|
+
},
|
|
291
|
+
style: {
|
|
292
|
+
textShadow: true,
|
|
293
|
+
overlayOpacity: 0.45,
|
|
294
|
+
animationSpeed: 1.0,
|
|
295
|
+
borderRadius: 6,
|
|
296
|
+
},
|
|
297
|
+
renderStyle: {
|
|
298
|
+
name: 'magazine',
|
|
299
|
+
defaultTextAnimation: 'fadeIn',
|
|
300
|
+
defaultImageAnimation: 'slowZoom',
|
|
301
|
+
ambientMotion: true,
|
|
302
|
+
defaultTransition: { type: 'slideLeft', duration: 0.7 },
|
|
303
|
+
},
|
|
304
|
+
colorSchemes: {
|
|
305
|
+
blue: { bg: '#1a365d', text: '#90cdf4', accent: '#63b3ed' },
|
|
306
|
+
green: { bg: '#1c4532', text: '#9ae6b4', accent: '#68d391' },
|
|
307
|
+
purple: { bg: '#322659', text: '#d6bcfa', accent: '#b794f4' },
|
|
308
|
+
red: { bg: '#63171b', text: '#feb2b2', accent: '#fc8181' },
|
|
309
|
+
orange: { bg: '#652b19', text: '#fbd38d', accent: '#f6ad55' },
|
|
310
|
+
teal: { bg: '#1d4044', text: '#81e6d9', accent: '#4fd1c5' },
|
|
311
|
+
},
|
|
312
|
+
};
|
|
313
|
+
// ============================================
|
|
314
|
+
// 7. Cinematic
|
|
315
|
+
// ============================================
|
|
316
|
+
const cinematic = {
|
|
317
|
+
id: 'cinematic',
|
|
318
|
+
name: 'Cinematic',
|
|
319
|
+
description: 'Ultra-dark with moody gradients, gold accents, and slow dissolve transitions.',
|
|
320
|
+
colors: {
|
|
321
|
+
primary: '#d69e2e',
|
|
322
|
+
secondary: '#b7791f',
|
|
323
|
+
background: '#0a0f1a',
|
|
324
|
+
backgroundLight: '#1a202c',
|
|
325
|
+
text: '#f7fafc',
|
|
326
|
+
textMuted: '#a0aec0',
|
|
327
|
+
highlight: '#ecc94b',
|
|
328
|
+
warning: '#fc8181',
|
|
329
|
+
},
|
|
330
|
+
typography: {
|
|
331
|
+
bodyFontFamily: SERIF,
|
|
332
|
+
titleFontFamily: SERIF,
|
|
333
|
+
titleWeight: 'bold',
|
|
334
|
+
lineHeight: 1.5,
|
|
335
|
+
titleLineHeight: 1.2,
|
|
336
|
+
},
|
|
337
|
+
style: {
|
|
338
|
+
textShadow: true,
|
|
339
|
+
overlayOpacity: 0.55,
|
|
340
|
+
animationSpeed: 1.2,
|
|
341
|
+
},
|
|
342
|
+
renderStyle: {
|
|
343
|
+
name: 'cinematic',
|
|
344
|
+
defaultTextAnimation: 'fadeIn',
|
|
345
|
+
defaultImageAnimation: 'slowZoom',
|
|
346
|
+
ambientMotion: true,
|
|
347
|
+
defaultTransition: { type: 'dissolve', duration: 1.2 },
|
|
348
|
+
templateHints: {
|
|
349
|
+
titleBlock: { showAccentLine: true },
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
colorSchemes: {
|
|
353
|
+
blue: { bg: '#0d1b2a', text: '#90cdf4', accent: '#63b3ed' },
|
|
354
|
+
green: { bg: '#0d1b14', text: '#9ae6b4', accent: '#68d391' },
|
|
355
|
+
purple: { bg: '#1a0d2e', text: '#d6bcfa', accent: '#b794f4' },
|
|
356
|
+
red: { bg: '#2a0d0d', text: '#fc8181', accent: '#feb2b2' },
|
|
357
|
+
orange: { bg: '#2a1a0d', text: '#fbd38d', accent: '#f6ad55' },
|
|
358
|
+
teal: { bg: '#0d2a2a', text: '#81e6d9', accent: '#4fd1c5' },
|
|
359
|
+
},
|
|
360
|
+
persistentLayers: {
|
|
361
|
+
bottomLayers: [
|
|
362
|
+
{
|
|
363
|
+
template: 'gradientBackground',
|
|
364
|
+
config: { type: 'gradientBackground', preset: 'radial-dark' },
|
|
365
|
+
},
|
|
366
|
+
],
|
|
367
|
+
},
|
|
368
|
+
};
|
|
369
|
+
// ============================================
|
|
370
|
+
// 8. Warm Earth
|
|
371
|
+
// ============================================
|
|
372
|
+
const warmEarth = {
|
|
373
|
+
id: 'warm-earth',
|
|
374
|
+
name: 'Warm Earth',
|
|
375
|
+
description: 'Natural warm tones with earthy browns and terracotta accents.',
|
|
376
|
+
colors: {
|
|
377
|
+
primary: '#9c4221',
|
|
378
|
+
secondary: '#c05621',
|
|
379
|
+
background: '#1c1410',
|
|
380
|
+
backgroundLight: '#2d241e',
|
|
381
|
+
text: '#faf5f0',
|
|
382
|
+
textMuted: '#c4a882',
|
|
383
|
+
highlight: '#dd6b20',
|
|
384
|
+
warning: '#e53e3e',
|
|
385
|
+
},
|
|
386
|
+
typography: {
|
|
387
|
+
bodyFontFamily: GEORGIA,
|
|
388
|
+
titleFontFamily: GEORGIA,
|
|
389
|
+
titleWeight: 'bold',
|
|
390
|
+
lineHeight: 1.6,
|
|
391
|
+
},
|
|
392
|
+
style: {
|
|
393
|
+
textShadow: true,
|
|
394
|
+
overlayOpacity: 0.5,
|
|
395
|
+
animationSpeed: 1.1,
|
|
396
|
+
},
|
|
397
|
+
renderStyle: {
|
|
398
|
+
name: 'warm-earth',
|
|
399
|
+
defaultTextAnimation: 'fadeIn',
|
|
400
|
+
defaultImageAnimation: 'panLeft',
|
|
401
|
+
ambientMotion: true,
|
|
402
|
+
defaultTransition: { type: 'fade', duration: 0.9 },
|
|
403
|
+
},
|
|
404
|
+
colorSchemes: {
|
|
405
|
+
blue: { bg: '#2a1f14', text: '#90cdf4', accent: '#63b3ed' },
|
|
406
|
+
green: { bg: '#1e2a14', text: '#9ae6b4', accent: '#68d391' },
|
|
407
|
+
purple: { bg: '#2a142a', text: '#d6bcfa', accent: '#b794f4' },
|
|
408
|
+
red: { bg: '#2a1414', text: '#fc8181', accent: '#feb2b2' },
|
|
409
|
+
orange: { bg: '#2a1e0a', text: '#fbd38d', accent: '#f6ad55' },
|
|
410
|
+
teal: { bg: '#142a28', text: '#81e6d9', accent: '#4fd1c5' },
|
|
411
|
+
},
|
|
412
|
+
persistentLayers: {
|
|
413
|
+
bottomLayers: [
|
|
414
|
+
{
|
|
415
|
+
template: 'gradientBackground',
|
|
416
|
+
config: { type: 'gradientBackground', preset: 'earth-tones' },
|
|
417
|
+
},
|
|
418
|
+
],
|
|
419
|
+
},
|
|
420
|
+
};
|
|
421
|
+
// ============================================
|
|
422
|
+
// Theme Library
|
|
423
|
+
// ============================================
|
|
424
|
+
/**
|
|
425
|
+
* All built-in themes, keyed by id.
|
|
426
|
+
*/
|
|
427
|
+
export const THEMES = {
|
|
428
|
+
documentary,
|
|
429
|
+
minimalist,
|
|
430
|
+
bold,
|
|
431
|
+
'morning-light': morningLight,
|
|
432
|
+
'tech-dark': techDark,
|
|
433
|
+
magazine,
|
|
434
|
+
cinematic,
|
|
435
|
+
'warm-earth': warmEarth,
|
|
436
|
+
};
|
|
437
|
+
/** The default theme id. */
|
|
438
|
+
export const DEFAULT_THEME_ID = 'documentary';
|
|
439
|
+
/** The default theme (documentary — migrated from old DEFAULT_THEME). */
|
|
440
|
+
export const DEFAULT_THEME = documentary;
|
|
441
|
+
/**
|
|
442
|
+
* Resolve a theme by id. Returns the default theme when `id` is
|
|
443
|
+
* undefined or not found in the library.
|
|
444
|
+
*/
|
|
445
|
+
export function resolveTheme(id) {
|
|
446
|
+
if (id && id in THEMES)
|
|
447
|
+
return THEMES[id];
|
|
448
|
+
return DEFAULT_THEME;
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* Get all available theme ids.
|
|
452
|
+
*/
|
|
453
|
+
export function getAvailableThemes() {
|
|
454
|
+
return Object.keys(THEMES);
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* Get a summary of all themes (id + name + description) for theme pickers.
|
|
458
|
+
*/
|
|
459
|
+
export function getThemeSummaries() {
|
|
460
|
+
return Object.values(THEMES).map((t) => ({
|
|
461
|
+
id: t.id,
|
|
462
|
+
name: t.name,
|
|
463
|
+
description: t.description,
|
|
464
|
+
}));
|
|
465
|
+
}
|
|
466
|
+
//# sourceMappingURL=themeLibrary.js.map
|