@bendyline/squisq 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Types-sh2VRxfo.d.ts +15 -0
- package/dist/chunk-7UDSRZKG.js +103 -0
- package/dist/chunk-7UDSRZKG.js.map +1 -0
- package/dist/chunk-O5HCIUAD.js +577 -0
- package/dist/chunk-O5HCIUAD.js.map +1 -0
- package/dist/chunk-PJ7AODIM.js +3040 -0
- package/dist/chunk-PJ7AODIM.js.map +1 -0
- package/dist/chunk-QWVRN6I4.js +81 -0
- package/dist/chunk-QWVRN6I4.js.map +1 -0
- package/dist/chunk-S4F2RY37.js +92 -0
- package/dist/chunk-S4F2RY37.js.map +1 -0
- package/dist/chunk-URU6QMLY.js +888 -0
- package/dist/chunk-URU6QMLY.js.map +1 -0
- package/dist/chunk-VJN7UB2Z.js +145 -0
- package/dist/chunk-VJN7UB2Z.js.map +1 -0
- package/dist/doc/index.d.ts +3 -0
- package/dist/doc/index.js +126 -0
- package/dist/doc/index.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +217 -0
- package/dist/index.js.map +1 -0
- package/dist/markdown/index.d.ts +237 -0
- package/dist/markdown/index.js +33 -0
- package/dist/markdown/index.js.map +1 -0
- package/dist/schemas/index.d.ts +70 -0
- package/dist/schemas/index.js +61 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/spatial/index.d.ts +111 -0
- package/dist/spatial/index.js +25 -0
- package/dist/spatial/index.js.map +1 -0
- package/dist/storage/index.d.ts +91 -0
- package/dist/storage/index.js +11 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/story/index.d.ts +691 -0
- package/dist/story/index.js +126 -0
- package/dist/story/index.js.map +1 -0
- package/dist/themeLibrary-DySHPcgj.d.ts +1352 -0
- package/dist/types-DHiv_Pnm.d.ts +496 -0
- package/package.json +91 -0
- package/src/__tests__/animationUtils.test.ts +77 -0
- package/src/__tests__/geohash.test.ts +109 -0
- package/src/__tests__/getLayers.test.ts +200 -0
- package/src/__tests__/haversine.test.ts +63 -0
- package/src/__tests__/localForageAdapter.test.ts +155 -0
- package/src/__tests__/markdown.test.ts +806 -0
- package/src/__tests__/markdownToDoc.test.ts +374 -0
- package/src/__tests__/storage.test.ts +60 -0
- package/src/__tests__/templates.test.ts +247 -0
- package/src/doc/docToMarkdown.ts +98 -0
- package/src/doc/getLayers.ts +152 -0
- package/src/doc/index.ts +8 -0
- package/src/doc/markdownToDoc.ts +277 -0
- package/src/doc/templates/accentImage.ts +338 -0
- package/src/doc/templates/captionUtils.ts +33 -0
- package/src/doc/templates/comparisonBar.ts +140 -0
- package/src/doc/templates/coverBlock.ts +156 -0
- package/src/doc/templates/dateEvent.ts +122 -0
- package/src/doc/templates/definitionCard.ts +129 -0
- package/src/doc/templates/factCard.ts +114 -0
- package/src/doc/templates/fullBleedQuote.ts +59 -0
- package/src/doc/templates/imageWithCaption.ts +167 -0
- package/src/doc/templates/index.ts +571 -0
- package/src/doc/templates/listBlock.ts +101 -0
- package/src/doc/templates/mapBlock.ts +132 -0
- package/src/doc/templates/persistentLayers.ts +522 -0
- package/src/doc/templates/photoGrid.ts +199 -0
- package/src/doc/templates/pullQuote.ts +119 -0
- package/src/doc/templates/quoteBlock.ts +112 -0
- package/src/doc/templates/sectionHeader.ts +105 -0
- package/src/doc/templates/statHighlight.ts +113 -0
- package/src/doc/templates/titleBlock.ts +100 -0
- package/src/doc/templates/twoColumn.ts +239 -0
- package/src/doc/templates/videoPullQuote.ts +128 -0
- package/src/doc/templates/videoWithCaption.ts +126 -0
- package/src/doc/utils/animationUtils.ts +135 -0
- package/src/doc/utils/themeUtils.ts +139 -0
- package/src/index.ts +5 -0
- package/src/markdown/convert.ts +897 -0
- package/src/markdown/htmlParse.ts +212 -0
- package/src/markdown/index.ts +110 -0
- package/src/markdown/parse.ts +103 -0
- package/src/markdown/stringify.ts +122 -0
- package/src/markdown/types.ts +605 -0
- package/src/markdown/utils.ts +165 -0
- package/src/ngeohash.d.ts +11 -0
- package/src/schemas/BlockTemplates.ts +706 -0
- package/src/schemas/Doc.ts +565 -0
- package/src/schemas/LayoutStrategy.ts +178 -0
- package/src/schemas/MediaProvider.ts +70 -0
- package/src/schemas/Theme.ts +235 -0
- package/src/schemas/Types.ts +15 -0
- package/src/schemas/Viewport.ts +91 -0
- package/src/schemas/index.ts +14 -0
- package/src/schemas/themeLibrary.ts +492 -0
- package/src/spatial/Geohash.ts +168 -0
- package/src/spatial/Haversine.ts +59 -0
- package/src/spatial/index.ts +2 -0
- package/src/storage/LocalForageAdapter.ts +103 -0
- package/src/storage/LocalStorageAdapter.ts +57 -0
- package/src/storage/MemoryStorageAdapter.ts +37 -0
- package/src/storage/Storage.ts +28 -0
- package/src/storage/index.ts +5 -0
|
@@ -0,0 +1,577 @@
|
|
|
1
|
+
// src/schemas/Viewport.ts
|
|
2
|
+
var VIEWPORT_PRESETS = {
|
|
3
|
+
/** 16:9 landscape (default, 1080p) */
|
|
4
|
+
landscape: { width: 1920, height: 1080, name: "16:9 Landscape" },
|
|
5
|
+
/** 9:16 portrait (vertical video, stories) */
|
|
6
|
+
portrait: { width: 1080, height: 1920, name: "9:16 Portrait" },
|
|
7
|
+
/** 1:1 square (social media) */
|
|
8
|
+
square: { width: 1080, height: 1080, name: "1:1 Square" },
|
|
9
|
+
/** 4:3 standard (legacy) */
|
|
10
|
+
standard: { width: 1440, height: 1080, name: "4:3 Standard" }
|
|
11
|
+
};
|
|
12
|
+
function getViewport(viewport) {
|
|
13
|
+
if (typeof viewport === "string") {
|
|
14
|
+
return VIEWPORT_PRESETS[viewport];
|
|
15
|
+
}
|
|
16
|
+
return viewport;
|
|
17
|
+
}
|
|
18
|
+
var REFERENCE_DIAGONAL = Math.sqrt(1920 * 1920 + 1080 * 1080);
|
|
19
|
+
function calculateFontScale(viewport) {
|
|
20
|
+
const currentDiagonal = Math.sqrt(
|
|
21
|
+
viewport.width * viewport.width + viewport.height * viewport.height
|
|
22
|
+
);
|
|
23
|
+
return currentDiagonal / REFERENCE_DIAGONAL;
|
|
24
|
+
}
|
|
25
|
+
function getViewportOrientation(viewport) {
|
|
26
|
+
const ratio = viewport.width / viewport.height;
|
|
27
|
+
if (Math.abs(ratio - 1) < 0.05) return "square";
|
|
28
|
+
return ratio > 1 ? "landscape" : "portrait";
|
|
29
|
+
}
|
|
30
|
+
function getAspectRatioString(viewport) {
|
|
31
|
+
const gcd = (a, b) => b === 0 ? a : gcd(b, a % b);
|
|
32
|
+
const divisor = gcd(viewport.width, viewport.height);
|
|
33
|
+
return `${viewport.width / divisor}:${viewport.height / divisor}`;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// src/schemas/LayoutStrategy.ts
|
|
37
|
+
var LAYOUT_CONFIGS = {
|
|
38
|
+
landscape: {
|
|
39
|
+
primaryY: "35%",
|
|
40
|
+
secondaryY: "55%",
|
|
41
|
+
tertiaryY: "75%",
|
|
42
|
+
titleScale: 1,
|
|
43
|
+
bodyScale: 1,
|
|
44
|
+
columnLeftX: "25%",
|
|
45
|
+
columnRightX: "75%",
|
|
46
|
+
columnTopY: "35%",
|
|
47
|
+
columnBottomY: "65%",
|
|
48
|
+
stackColumns: false,
|
|
49
|
+
maxTextWidth: "80%",
|
|
50
|
+
horizontalPadding: "10%",
|
|
51
|
+
captionY: "85%",
|
|
52
|
+
captionScale: 1
|
|
53
|
+
},
|
|
54
|
+
portrait: {
|
|
55
|
+
// Content positioned higher for thumb-reach zone on mobile
|
|
56
|
+
primaryY: "25%",
|
|
57
|
+
secondaryY: "42%",
|
|
58
|
+
tertiaryY: "58%",
|
|
59
|
+
// Titles scale down for narrower width; body text scales up to fill vertical space
|
|
60
|
+
titleScale: 0.7,
|
|
61
|
+
bodyScale: 1.5,
|
|
62
|
+
// Stacked columns instead of side-by-side
|
|
63
|
+
columnLeftX: "50%",
|
|
64
|
+
columnRightX: "50%",
|
|
65
|
+
columnTopY: "30%",
|
|
66
|
+
columnBottomY: "55%",
|
|
67
|
+
stackColumns: true,
|
|
68
|
+
// Wider relative to viewport to use available space
|
|
69
|
+
maxTextWidth: "90%",
|
|
70
|
+
horizontalPadding: "5%",
|
|
71
|
+
captionY: "75%",
|
|
72
|
+
captionScale: 0.85
|
|
73
|
+
},
|
|
74
|
+
square: {
|
|
75
|
+
primaryY: "30%",
|
|
76
|
+
secondaryY: "50%",
|
|
77
|
+
tertiaryY: "70%",
|
|
78
|
+
titleScale: 0.85,
|
|
79
|
+
bodyScale: 0.9,
|
|
80
|
+
columnLeftX: "25%",
|
|
81
|
+
columnRightX: "75%",
|
|
82
|
+
columnTopY: "35%",
|
|
83
|
+
columnBottomY: "65%",
|
|
84
|
+
stackColumns: false,
|
|
85
|
+
maxTextWidth: "85%",
|
|
86
|
+
horizontalPadding: "7.5%",
|
|
87
|
+
captionY: "82%",
|
|
88
|
+
captionScale: 0.9
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
function getLayoutHints(orientation) {
|
|
92
|
+
return LAYOUT_CONFIGS[orientation];
|
|
93
|
+
}
|
|
94
|
+
function scaledFontSize(basePx, viewport, orientation, isTitle = false) {
|
|
95
|
+
const fontScale = calculateFontScale(viewport);
|
|
96
|
+
const layout = getLayoutHints(orientation);
|
|
97
|
+
const typeScale = isTitle ? layout.titleScale : layout.bodyScale;
|
|
98
|
+
return Math.round(basePx * fontScale * typeScale);
|
|
99
|
+
}
|
|
100
|
+
function getTwoColumnPositions(orientation) {
|
|
101
|
+
const layout = getLayoutHints(orientation);
|
|
102
|
+
if (layout.stackColumns) {
|
|
103
|
+
return {
|
|
104
|
+
left: { x: "50%", y: layout.columnTopY },
|
|
105
|
+
right: { x: "50%", y: layout.columnBottomY }
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
left: { x: layout.columnLeftX, y: "50%" },
|
|
110
|
+
right: { x: layout.columnRightX, y: "50%" }
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
function getSafeTextBounds(orientation) {
|
|
114
|
+
const layout = getLayoutHints(orientation);
|
|
115
|
+
return {
|
|
116
|
+
left: layout.horizontalPadding,
|
|
117
|
+
right: layout.horizontalPadding,
|
|
118
|
+
top: "10%",
|
|
119
|
+
bottom: "10%"
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// src/schemas/BlockTemplates.ts
|
|
124
|
+
var DEFAULT_DOC_FONT = '"PT Serif", Georgia, "Times New Roman", serif';
|
|
125
|
+
var DEFAULT_TITLE_FONT = '"PT Serif", Georgia, "Times New Roman", serif';
|
|
126
|
+
function isTemplateBlock(block) {
|
|
127
|
+
return "template" in block && typeof block.template === "string";
|
|
128
|
+
}
|
|
129
|
+
function createTemplateContext(theme, blockIndex, totalBlocks, viewport = VIEWPORT_PRESETS.landscape) {
|
|
130
|
+
const orientation = getViewportOrientation(viewport);
|
|
131
|
+
return {
|
|
132
|
+
theme,
|
|
133
|
+
blockIndex,
|
|
134
|
+
totalBlocks,
|
|
135
|
+
viewport,
|
|
136
|
+
fontScale: calculateFontScale(viewport),
|
|
137
|
+
orientation,
|
|
138
|
+
layout: getLayoutHints(orientation)
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
function scaledFontSize2(basePx, context, isTitle = false) {
|
|
142
|
+
return scaledFontSize(basePx, context.viewport, context.orientation, isTitle);
|
|
143
|
+
}
|
|
144
|
+
function isPersistentLayerTemplate(layer) {
|
|
145
|
+
return "template" in layer && typeof layer.template === "string";
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// src/schemas/themeLibrary.ts
|
|
149
|
+
var SERIF = '"PT Serif", Georgia, "Times New Roman", serif';
|
|
150
|
+
var SANS = '"Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif';
|
|
151
|
+
var MONO = '"JetBrains Mono", "Fira Code", "Consolas", monospace';
|
|
152
|
+
var MERRIWEATHER = '"Merriweather", Georgia, "Times New Roman", serif';
|
|
153
|
+
var GEORGIA = 'Georgia, "Times New Roman", serif';
|
|
154
|
+
var CLASSIC_COLOR_SCHEMES = {
|
|
155
|
+
blue: { bg: "#1a365d", text: "#63b3ed", accent: "#90cdf4" },
|
|
156
|
+
green: { bg: "#22543d", text: "#9ae6b4", accent: "#68d391" },
|
|
157
|
+
purple: { bg: "#44337a", text: "#d6bcfa", accent: "#b794f4" },
|
|
158
|
+
red: { bg: "#742a2a", text: "#fc8181", accent: "#feb2b2" },
|
|
159
|
+
orange: { bg: "#744210", text: "#fbd38d", accent: "#f6ad55" },
|
|
160
|
+
teal: { bg: "#234e52", text: "#81e6d9", accent: "#4fd1c5" }
|
|
161
|
+
};
|
|
162
|
+
var documentary = {
|
|
163
|
+
id: "documentary",
|
|
164
|
+
name: "Documentary",
|
|
165
|
+
description: "Classic dark cinematic look with serif typography. The original Squisq style.",
|
|
166
|
+
colors: {
|
|
167
|
+
primary: "#3d5a80",
|
|
168
|
+
secondary: "#63b3ed",
|
|
169
|
+
background: "#1a202c",
|
|
170
|
+
backgroundLight: "#2d3748",
|
|
171
|
+
text: "#ffffff",
|
|
172
|
+
textMuted: "#a0aec0",
|
|
173
|
+
highlight: "#63b3ed",
|
|
174
|
+
warning: "#fc8181"
|
|
175
|
+
},
|
|
176
|
+
typography: {
|
|
177
|
+
bodyFontFamily: SERIF,
|
|
178
|
+
titleFontFamily: SERIF,
|
|
179
|
+
titleWeight: "bold"
|
|
180
|
+
},
|
|
181
|
+
style: {
|
|
182
|
+
textShadow: true,
|
|
183
|
+
overlayOpacity: 0.5,
|
|
184
|
+
animationSpeed: 1
|
|
185
|
+
},
|
|
186
|
+
renderStyle: {
|
|
187
|
+
name: "documentary",
|
|
188
|
+
defaultTextAnimation: "fadeIn",
|
|
189
|
+
defaultImageAnimation: "slowZoom",
|
|
190
|
+
ambientMotion: true,
|
|
191
|
+
defaultTransition: { type: "fade", duration: 0.8 }
|
|
192
|
+
},
|
|
193
|
+
colorSchemes: CLASSIC_COLOR_SCHEMES,
|
|
194
|
+
persistentLayers: {
|
|
195
|
+
bottomLayers: [
|
|
196
|
+
{
|
|
197
|
+
template: "gradientBackground",
|
|
198
|
+
config: { type: "gradientBackground", preset: "dark-vignette" }
|
|
199
|
+
}
|
|
200
|
+
]
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
var minimalist = {
|
|
204
|
+
id: "minimalist",
|
|
205
|
+
name: "Minimalist",
|
|
206
|
+
description: "Clean near-white background with sans-serif type and minimal animation.",
|
|
207
|
+
colors: {
|
|
208
|
+
primary: "#2d3748",
|
|
209
|
+
secondary: "#4a5568",
|
|
210
|
+
background: "#f7fafc",
|
|
211
|
+
backgroundLight: "#edf2f7",
|
|
212
|
+
text: "#1a202c",
|
|
213
|
+
textMuted: "#718096",
|
|
214
|
+
highlight: "#3182ce",
|
|
215
|
+
warning: "#e53e3e"
|
|
216
|
+
},
|
|
217
|
+
typography: {
|
|
218
|
+
bodyFontFamily: SANS,
|
|
219
|
+
titleFontFamily: SANS,
|
|
220
|
+
titleWeight: "bold",
|
|
221
|
+
lineHeight: 1.6
|
|
222
|
+
},
|
|
223
|
+
style: {
|
|
224
|
+
textShadow: false,
|
|
225
|
+
overlayOpacity: 0.3,
|
|
226
|
+
animationSpeed: 1.2,
|
|
227
|
+
borderRadius: 8
|
|
228
|
+
},
|
|
229
|
+
renderStyle: {
|
|
230
|
+
name: "minimalist",
|
|
231
|
+
defaultTextAnimation: "fadeIn",
|
|
232
|
+
ambientMotion: false,
|
|
233
|
+
defaultTransition: { type: "fade", duration: 0.6 },
|
|
234
|
+
templateHints: {
|
|
235
|
+
titleBlock: { showAccentLine: false }
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
colorSchemes: {
|
|
239
|
+
blue: { bg: "#ebf8ff", text: "#2b6cb0", accent: "#3182ce" },
|
|
240
|
+
green: { bg: "#f0fff4", text: "#276749", accent: "#38a169" },
|
|
241
|
+
purple: { bg: "#faf5ff", text: "#553c9a", accent: "#805ad5" },
|
|
242
|
+
red: { bg: "#fff5f5", text: "#c53030", accent: "#e53e3e" },
|
|
243
|
+
orange: { bg: "#fffaf0", text: "#c05621", accent: "#dd6b20" },
|
|
244
|
+
teal: { bg: "#e6fffa", text: "#285e61", accent: "#319795" }
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
var bold = {
|
|
248
|
+
id: "bold",
|
|
249
|
+
name: "Bold",
|
|
250
|
+
description: "High-contrast black with vivid accents and dramatic animations.",
|
|
251
|
+
colors: {
|
|
252
|
+
primary: "#e53e3e",
|
|
253
|
+
secondary: "#ed8936",
|
|
254
|
+
background: "#000000",
|
|
255
|
+
backgroundLight: "#1a1a1a",
|
|
256
|
+
text: "#ffffff",
|
|
257
|
+
textMuted: "#cbd5e0",
|
|
258
|
+
highlight: "#f6e05e",
|
|
259
|
+
warning: "#fc8181"
|
|
260
|
+
},
|
|
261
|
+
typography: {
|
|
262
|
+
bodyFontFamily: SANS,
|
|
263
|
+
titleFontFamily: SANS,
|
|
264
|
+
titleWeight: "bold",
|
|
265
|
+
titleScale: 1.15,
|
|
266
|
+
bodyScale: 1,
|
|
267
|
+
titleLineHeight: 1.1
|
|
268
|
+
},
|
|
269
|
+
style: {
|
|
270
|
+
textShadow: true,
|
|
271
|
+
overlayOpacity: 0.6,
|
|
272
|
+
animationSpeed: 0.8
|
|
273
|
+
},
|
|
274
|
+
renderStyle: {
|
|
275
|
+
name: "bold",
|
|
276
|
+
defaultTextAnimation: "zoomIn",
|
|
277
|
+
defaultImageAnimation: "slowZoom",
|
|
278
|
+
ambientMotion: true,
|
|
279
|
+
defaultTransition: { type: "dissolve", duration: 0.5 },
|
|
280
|
+
templateHints: {
|
|
281
|
+
statHighlight: { entrance: "dramatic" },
|
|
282
|
+
fullBleedQuote: { entrance: "dramatic" }
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
colorSchemes: {
|
|
286
|
+
blue: { bg: "#1a202c", text: "#63b3ed", accent: "#90cdf4" },
|
|
287
|
+
green: { bg: "#1a202c", text: "#48bb78", accent: "#68d391" },
|
|
288
|
+
purple: { bg: "#1a202c", text: "#b794f4", accent: "#d6bcfa" },
|
|
289
|
+
red: { bg: "#1a202c", text: "#fc8181", accent: "#feb2b2" },
|
|
290
|
+
orange: { bg: "#1a202c", text: "#f6ad55", accent: "#fbd38d" },
|
|
291
|
+
teal: { bg: "#1a202c", text: "#4fd1c5", accent: "#81e6d9" }
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
var morningLight = {
|
|
295
|
+
id: "morning-light",
|
|
296
|
+
name: "Morning Light",
|
|
297
|
+
description: "Warm light background with dark text and gentle serif typography.",
|
|
298
|
+
colors: {
|
|
299
|
+
primary: "#744210",
|
|
300
|
+
secondary: "#975a16",
|
|
301
|
+
background: "#faf8f5",
|
|
302
|
+
backgroundLight: "#f5f0eb",
|
|
303
|
+
text: "#2d3748",
|
|
304
|
+
textMuted: "#718096",
|
|
305
|
+
highlight: "#dd6b20",
|
|
306
|
+
warning: "#c53030"
|
|
307
|
+
},
|
|
308
|
+
typography: {
|
|
309
|
+
bodyFontFamily: MERRIWEATHER,
|
|
310
|
+
titleFontFamily: MERRIWEATHER,
|
|
311
|
+
titleWeight: "bold",
|
|
312
|
+
lineHeight: 1.7
|
|
313
|
+
},
|
|
314
|
+
style: {
|
|
315
|
+
textShadow: false,
|
|
316
|
+
overlayOpacity: 0.35,
|
|
317
|
+
animationSpeed: 1.1,
|
|
318
|
+
borderRadius: 4
|
|
319
|
+
},
|
|
320
|
+
renderStyle: {
|
|
321
|
+
name: "morning-light",
|
|
322
|
+
defaultTextAnimation: "fadeIn",
|
|
323
|
+
ambientMotion: false,
|
|
324
|
+
defaultTransition: { type: "fade", duration: 1 }
|
|
325
|
+
},
|
|
326
|
+
colorSchemes: {
|
|
327
|
+
blue: { bg: "#ebf8ff", text: "#2c5282", accent: "#4299e1" },
|
|
328
|
+
green: { bg: "#f0fff4", text: "#22543d", accent: "#48bb78" },
|
|
329
|
+
purple: { bg: "#faf5ff", text: "#44337a", accent: "#9f7aea" },
|
|
330
|
+
red: { bg: "#fff5f5", text: "#9b2c2c", accent: "#fc8181" },
|
|
331
|
+
orange: { bg: "#fffaf0", text: "#744210", accent: "#ed8936" },
|
|
332
|
+
teal: { bg: "#e6fffa", text: "#234e52", accent: "#38b2ac" }
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
var techDark = {
|
|
336
|
+
id: "tech-dark",
|
|
337
|
+
name: "Tech Dark",
|
|
338
|
+
description: "True black with neon cyan/green accents and monospace titles.",
|
|
339
|
+
colors: {
|
|
340
|
+
primary: "#00e5ff",
|
|
341
|
+
secondary: "#00e676",
|
|
342
|
+
background: "#0a0a0a",
|
|
343
|
+
backgroundLight: "#1a1a2e",
|
|
344
|
+
text: "#e0e0e0",
|
|
345
|
+
textMuted: "#9e9e9e",
|
|
346
|
+
highlight: "#00e5ff",
|
|
347
|
+
warning: "#ff5252"
|
|
348
|
+
},
|
|
349
|
+
typography: {
|
|
350
|
+
bodyFontFamily: SANS,
|
|
351
|
+
titleFontFamily: MONO,
|
|
352
|
+
monoFontFamily: MONO,
|
|
353
|
+
titleWeight: "bold",
|
|
354
|
+
titleScale: 0.9,
|
|
355
|
+
lineHeight: 1.5
|
|
356
|
+
},
|
|
357
|
+
style: {
|
|
358
|
+
textShadow: true,
|
|
359
|
+
overlayOpacity: 0.55,
|
|
360
|
+
animationSpeed: 0.9,
|
|
361
|
+
borderRadius: 2
|
|
362
|
+
},
|
|
363
|
+
renderStyle: {
|
|
364
|
+
name: "tech-dark",
|
|
365
|
+
defaultTextAnimation: "typewriter",
|
|
366
|
+
defaultImageAnimation: "slowZoom",
|
|
367
|
+
ambientMotion: true,
|
|
368
|
+
defaultTransition: { type: "dissolve", duration: 0.4 },
|
|
369
|
+
templateHints: {
|
|
370
|
+
statHighlight: { entrance: "dramatic" }
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
colorSchemes: {
|
|
374
|
+
blue: { bg: "#0d1b2a", text: "#00b0ff", accent: "#40c4ff" },
|
|
375
|
+
green: { bg: "#0d1b0d", text: "#00e676", accent: "#69f0ae" },
|
|
376
|
+
purple: { bg: "#1a0d2e", text: "#d500f9", accent: "#ea80fc" },
|
|
377
|
+
red: { bg: "#2e0d0d", text: "#ff5252", accent: "#ff8a80" },
|
|
378
|
+
orange: { bg: "#2e1a0d", text: "#ff9100", accent: "#ffab40" },
|
|
379
|
+
teal: { bg: "#0d2e2e", text: "#1de9b6", accent: "#64ffda" }
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
var magazine = {
|
|
383
|
+
id: "magazine",
|
|
384
|
+
name: "Magazine",
|
|
385
|
+
description: "Rich editorial palette with mixed serif/sans typography and slide transitions.",
|
|
386
|
+
colors: {
|
|
387
|
+
primary: "#c53030",
|
|
388
|
+
secondary: "#2b6cb0",
|
|
389
|
+
background: "#1a202c",
|
|
390
|
+
backgroundLight: "#2d3748",
|
|
391
|
+
text: "#f7fafc",
|
|
392
|
+
textMuted: "#cbd5e0",
|
|
393
|
+
highlight: "#ed8936",
|
|
394
|
+
warning: "#fc8181"
|
|
395
|
+
},
|
|
396
|
+
typography: {
|
|
397
|
+
bodyFontFamily: SANS,
|
|
398
|
+
titleFontFamily: GEORGIA,
|
|
399
|
+
titleWeight: "bold",
|
|
400
|
+
titleScale: 1.05,
|
|
401
|
+
lineHeight: 1.5
|
|
402
|
+
},
|
|
403
|
+
style: {
|
|
404
|
+
textShadow: true,
|
|
405
|
+
overlayOpacity: 0.45,
|
|
406
|
+
animationSpeed: 1,
|
|
407
|
+
borderRadius: 6
|
|
408
|
+
},
|
|
409
|
+
renderStyle: {
|
|
410
|
+
name: "magazine",
|
|
411
|
+
defaultTextAnimation: "fadeIn",
|
|
412
|
+
defaultImageAnimation: "slowZoom",
|
|
413
|
+
ambientMotion: true,
|
|
414
|
+
defaultTransition: { type: "slideLeft", duration: 0.7 }
|
|
415
|
+
},
|
|
416
|
+
colorSchemes: {
|
|
417
|
+
blue: { bg: "#1a365d", text: "#90cdf4", accent: "#63b3ed" },
|
|
418
|
+
green: { bg: "#1c4532", text: "#9ae6b4", accent: "#68d391" },
|
|
419
|
+
purple: { bg: "#322659", text: "#d6bcfa", accent: "#b794f4" },
|
|
420
|
+
red: { bg: "#63171b", text: "#feb2b2", accent: "#fc8181" },
|
|
421
|
+
orange: { bg: "#652b19", text: "#fbd38d", accent: "#f6ad55" },
|
|
422
|
+
teal: { bg: "#1d4044", text: "#81e6d9", accent: "#4fd1c5" }
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
var cinematic = {
|
|
426
|
+
id: "cinematic",
|
|
427
|
+
name: "Cinematic",
|
|
428
|
+
description: "Ultra-dark with moody gradients, gold accents, and slow dissolve transitions.",
|
|
429
|
+
colors: {
|
|
430
|
+
primary: "#d69e2e",
|
|
431
|
+
secondary: "#b7791f",
|
|
432
|
+
background: "#0a0f1a",
|
|
433
|
+
backgroundLight: "#1a202c",
|
|
434
|
+
text: "#f7fafc",
|
|
435
|
+
textMuted: "#a0aec0",
|
|
436
|
+
highlight: "#ecc94b",
|
|
437
|
+
warning: "#fc8181"
|
|
438
|
+
},
|
|
439
|
+
typography: {
|
|
440
|
+
bodyFontFamily: SERIF,
|
|
441
|
+
titleFontFamily: SERIF,
|
|
442
|
+
titleWeight: "bold",
|
|
443
|
+
lineHeight: 1.5,
|
|
444
|
+
titleLineHeight: 1.2
|
|
445
|
+
},
|
|
446
|
+
style: {
|
|
447
|
+
textShadow: true,
|
|
448
|
+
overlayOpacity: 0.55,
|
|
449
|
+
animationSpeed: 1.2
|
|
450
|
+
},
|
|
451
|
+
renderStyle: {
|
|
452
|
+
name: "cinematic",
|
|
453
|
+
defaultTextAnimation: "fadeIn",
|
|
454
|
+
defaultImageAnimation: "slowZoom",
|
|
455
|
+
ambientMotion: true,
|
|
456
|
+
defaultTransition: { type: "dissolve", duration: 1.2 },
|
|
457
|
+
templateHints: {
|
|
458
|
+
titleBlock: { showAccentLine: true }
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
colorSchemes: {
|
|
462
|
+
blue: { bg: "#0d1b2a", text: "#90cdf4", accent: "#63b3ed" },
|
|
463
|
+
green: { bg: "#0d1b14", text: "#9ae6b4", accent: "#68d391" },
|
|
464
|
+
purple: { bg: "#1a0d2e", text: "#d6bcfa", accent: "#b794f4" },
|
|
465
|
+
red: { bg: "#2a0d0d", text: "#fc8181", accent: "#feb2b2" },
|
|
466
|
+
orange: { bg: "#2a1a0d", text: "#fbd38d", accent: "#f6ad55" },
|
|
467
|
+
teal: { bg: "#0d2a2a", text: "#81e6d9", accent: "#4fd1c5" }
|
|
468
|
+
},
|
|
469
|
+
persistentLayers: {
|
|
470
|
+
bottomLayers: [
|
|
471
|
+
{
|
|
472
|
+
template: "gradientBackground",
|
|
473
|
+
config: { type: "gradientBackground", preset: "radial-dark" }
|
|
474
|
+
}
|
|
475
|
+
]
|
|
476
|
+
}
|
|
477
|
+
};
|
|
478
|
+
var warmEarth = {
|
|
479
|
+
id: "warm-earth",
|
|
480
|
+
name: "Warm Earth",
|
|
481
|
+
description: "Natural warm tones with earthy browns and terracotta accents.",
|
|
482
|
+
colors: {
|
|
483
|
+
primary: "#9c4221",
|
|
484
|
+
secondary: "#c05621",
|
|
485
|
+
background: "#1c1410",
|
|
486
|
+
backgroundLight: "#2d241e",
|
|
487
|
+
text: "#faf5f0",
|
|
488
|
+
textMuted: "#c4a882",
|
|
489
|
+
highlight: "#dd6b20",
|
|
490
|
+
warning: "#e53e3e"
|
|
491
|
+
},
|
|
492
|
+
typography: {
|
|
493
|
+
bodyFontFamily: GEORGIA,
|
|
494
|
+
titleFontFamily: GEORGIA,
|
|
495
|
+
titleWeight: "bold",
|
|
496
|
+
lineHeight: 1.6
|
|
497
|
+
},
|
|
498
|
+
style: {
|
|
499
|
+
textShadow: true,
|
|
500
|
+
overlayOpacity: 0.5,
|
|
501
|
+
animationSpeed: 1.1
|
|
502
|
+
},
|
|
503
|
+
renderStyle: {
|
|
504
|
+
name: "warm-earth",
|
|
505
|
+
defaultTextAnimation: "fadeIn",
|
|
506
|
+
defaultImageAnimation: "panLeft",
|
|
507
|
+
ambientMotion: true,
|
|
508
|
+
defaultTransition: { type: "fade", duration: 0.9 }
|
|
509
|
+
},
|
|
510
|
+
colorSchemes: {
|
|
511
|
+
blue: { bg: "#2a1f14", text: "#90cdf4", accent: "#63b3ed" },
|
|
512
|
+
green: { bg: "#1e2a14", text: "#9ae6b4", accent: "#68d391" },
|
|
513
|
+
purple: { bg: "#2a142a", text: "#d6bcfa", accent: "#b794f4" },
|
|
514
|
+
red: { bg: "#2a1414", text: "#fc8181", accent: "#feb2b2" },
|
|
515
|
+
orange: { bg: "#2a1e0a", text: "#fbd38d", accent: "#f6ad55" },
|
|
516
|
+
teal: { bg: "#142a28", text: "#81e6d9", accent: "#4fd1c5" }
|
|
517
|
+
},
|
|
518
|
+
persistentLayers: {
|
|
519
|
+
bottomLayers: [
|
|
520
|
+
{
|
|
521
|
+
template: "gradientBackground",
|
|
522
|
+
config: { type: "gradientBackground", preset: "earth-tones" }
|
|
523
|
+
}
|
|
524
|
+
]
|
|
525
|
+
}
|
|
526
|
+
};
|
|
527
|
+
var THEMES = {
|
|
528
|
+
documentary,
|
|
529
|
+
minimalist,
|
|
530
|
+
bold,
|
|
531
|
+
"morning-light": morningLight,
|
|
532
|
+
"tech-dark": techDark,
|
|
533
|
+
magazine,
|
|
534
|
+
cinematic,
|
|
535
|
+
"warm-earth": warmEarth
|
|
536
|
+
};
|
|
537
|
+
var DEFAULT_THEME_ID = "documentary";
|
|
538
|
+
var DEFAULT_THEME = documentary;
|
|
539
|
+
function resolveTheme(id) {
|
|
540
|
+
if (id && id in THEMES) return THEMES[id];
|
|
541
|
+
return DEFAULT_THEME;
|
|
542
|
+
}
|
|
543
|
+
function getAvailableThemes() {
|
|
544
|
+
return Object.keys(THEMES);
|
|
545
|
+
}
|
|
546
|
+
function getThemeSummaries() {
|
|
547
|
+
return Object.values(THEMES).map((t) => ({
|
|
548
|
+
id: t.id,
|
|
549
|
+
name: t.name,
|
|
550
|
+
description: t.description
|
|
551
|
+
}));
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
export {
|
|
555
|
+
VIEWPORT_PRESETS,
|
|
556
|
+
getViewport,
|
|
557
|
+
calculateFontScale,
|
|
558
|
+
getViewportOrientation,
|
|
559
|
+
getAspectRatioString,
|
|
560
|
+
getLayoutHints,
|
|
561
|
+
scaledFontSize,
|
|
562
|
+
getTwoColumnPositions,
|
|
563
|
+
getSafeTextBounds,
|
|
564
|
+
DEFAULT_DOC_FONT,
|
|
565
|
+
DEFAULT_TITLE_FONT,
|
|
566
|
+
isTemplateBlock,
|
|
567
|
+
createTemplateContext,
|
|
568
|
+
scaledFontSize2,
|
|
569
|
+
isPersistentLayerTemplate,
|
|
570
|
+
THEMES,
|
|
571
|
+
DEFAULT_THEME_ID,
|
|
572
|
+
DEFAULT_THEME,
|
|
573
|
+
resolveTheme,
|
|
574
|
+
getAvailableThemes,
|
|
575
|
+
getThemeSummaries
|
|
576
|
+
};
|
|
577
|
+
//# sourceMappingURL=chunk-O5HCIUAD.js.map
|