appshot-cli 0.8.7 → 0.9.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/README.md +480 -15
- package/dist/cli.js +19 -5
- package/dist/cli.js.map +1 -1
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +16 -2
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/preset.d.ts +5 -0
- package/dist/commands/preset.d.ts.map +1 -0
- package/dist/commands/preset.js +191 -0
- package/dist/commands/preset.js.map +1 -0
- package/dist/commands/quickstart.d.ts +3 -0
- package/dist/commands/quickstart.d.ts.map +1 -0
- package/dist/commands/quickstart.js +326 -0
- package/dist/commands/quickstart.js.map +1 -0
- package/dist/commands/style.d.ts.map +1 -1
- package/dist/commands/style.js +98 -0
- package/dist/commands/style.js.map +1 -1
- package/dist/commands/template.d.ts +3 -0
- package/dist/commands/template.d.ts.map +1 -0
- package/dist/commands/template.js +399 -0
- package/dist/commands/template.js.map +1 -0
- package/dist/core/compose.d.ts +16 -0
- package/dist/core/compose.d.ts.map +1 -1
- package/dist/core/compose.js +342 -83
- package/dist/core/compose.js.map +1 -1
- package/dist/services/doctor.js +1 -1
- package/dist/templates/registry.d.ts +73 -0
- package/dist/templates/registry.d.ts.map +1 -0
- package/dist/templates/registry.js +724 -0
- package/dist/templates/registry.js.map +1 -0
- package/dist/types.d.ts +15 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/validation.d.ts +36 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +143 -0
- package/dist/utils/validation.js.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1,724 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Template Registry for App Store Screenshots
|
|
3
|
+
*
|
|
4
|
+
* Each template includes a complete visual style preset with:
|
|
5
|
+
* - Background (gradient or image configuration)
|
|
6
|
+
* - Device positioning and scale
|
|
7
|
+
* - Caption placement and styling
|
|
8
|
+
* - Device-specific optimizations
|
|
9
|
+
*/
|
|
10
|
+
// Template definitions
|
|
11
|
+
export const templates = [
|
|
12
|
+
{
|
|
13
|
+
id: 'modern',
|
|
14
|
+
name: 'Modern Vibrant',
|
|
15
|
+
description: 'Eye-catching gradient with floating device and clean captions',
|
|
16
|
+
category: 'modern',
|
|
17
|
+
background: {
|
|
18
|
+
mode: 'gradient',
|
|
19
|
+
gradient: {
|
|
20
|
+
colors: ['#667eea', '#764ba2', '#f093fb'],
|
|
21
|
+
direction: 'diagonal'
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
deviceStyle: {
|
|
25
|
+
frameScale: 0.85,
|
|
26
|
+
framePosition: 50 // Centered
|
|
27
|
+
},
|
|
28
|
+
captionStyle: {
|
|
29
|
+
font: 'SF Pro Display',
|
|
30
|
+
fontsize: 64,
|
|
31
|
+
color: '#FFFFFF',
|
|
32
|
+
position: 'above',
|
|
33
|
+
align: 'center',
|
|
34
|
+
background: {
|
|
35
|
+
color: '#000000',
|
|
36
|
+
opacity: 0.6,
|
|
37
|
+
padding: 20,
|
|
38
|
+
sideMargin: 30
|
|
39
|
+
},
|
|
40
|
+
border: {
|
|
41
|
+
radius: 12
|
|
42
|
+
},
|
|
43
|
+
box: {
|
|
44
|
+
autoSize: true,
|
|
45
|
+
maxLines: 3,
|
|
46
|
+
lineHeight: 1.4,
|
|
47
|
+
marginTop: 20,
|
|
48
|
+
marginBottom: 20
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
deviceOverrides: {
|
|
52
|
+
mac: {
|
|
53
|
+
frameScale: 0.9,
|
|
54
|
+
framePosition: 25
|
|
55
|
+
},
|
|
56
|
+
iphone: {
|
|
57
|
+
// Add sensible top clearance for 'above' captions on iPhone
|
|
58
|
+
captionBox: { marginTop: 56 }
|
|
59
|
+
},
|
|
60
|
+
watch: {
|
|
61
|
+
frameScale: 0.9,
|
|
62
|
+
framePosition: 100,
|
|
63
|
+
partialFrame: true,
|
|
64
|
+
frameOffset: 17,
|
|
65
|
+
captionSize: 24,
|
|
66
|
+
captionPosition: 'above',
|
|
67
|
+
captionBackground: {
|
|
68
|
+
color: '#2b1b6d',
|
|
69
|
+
opacity: 0.85,
|
|
70
|
+
padding: 12,
|
|
71
|
+
sideMargin: 18
|
|
72
|
+
},
|
|
73
|
+
captionBorder: {
|
|
74
|
+
color: '#f093fb',
|
|
75
|
+
width: 2,
|
|
76
|
+
radius: 14
|
|
77
|
+
},
|
|
78
|
+
captionBox: {
|
|
79
|
+
marginBottom: 8,
|
|
80
|
+
marginTop: 18,
|
|
81
|
+
autoSize: true,
|
|
82
|
+
lineHeight: 1.4,
|
|
83
|
+
maxLines: 2
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
ipad: {
|
|
87
|
+
frameScale: 0.90,
|
|
88
|
+
framePosition: 60
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: 'minimal',
|
|
94
|
+
name: 'Minimal Clean',
|
|
95
|
+
description: 'Soft pastel background with elegant typography',
|
|
96
|
+
category: 'minimal',
|
|
97
|
+
background: {
|
|
98
|
+
mode: 'gradient',
|
|
99
|
+
gradient: {
|
|
100
|
+
colors: ['#ffecd2', '#fcb69f'],
|
|
101
|
+
direction: 'top-bottom'
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
deviceStyle: {
|
|
105
|
+
frameScale: 0.95,
|
|
106
|
+
framePosition: 50 // Lower position
|
|
107
|
+
},
|
|
108
|
+
captionStyle: {
|
|
109
|
+
font: 'Helvetica Neue',
|
|
110
|
+
fontsize: 56,
|
|
111
|
+
color: '#f9fcfbff',
|
|
112
|
+
position: 'above',
|
|
113
|
+
align: 'center',
|
|
114
|
+
background: {
|
|
115
|
+
color: '#da3434ff',
|
|
116
|
+
opacity: 0.50,
|
|
117
|
+
padding: 18,
|
|
118
|
+
sideMargin: 25
|
|
119
|
+
},
|
|
120
|
+
border: {
|
|
121
|
+
color: '#FFFFFF',
|
|
122
|
+
width: 1,
|
|
123
|
+
radius: 10
|
|
124
|
+
},
|
|
125
|
+
box: {
|
|
126
|
+
autoSize: true,
|
|
127
|
+
maxLines: 2,
|
|
128
|
+
lineHeight: 1.3,
|
|
129
|
+
marginTop: 40,
|
|
130
|
+
marginBottom: 0
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
deviceOverrides: {
|
|
134
|
+
iphone: {
|
|
135
|
+
frameScale: 0.95,
|
|
136
|
+
framePosition: 50,
|
|
137
|
+
captionBox: { marginTop: 56 }
|
|
138
|
+
},
|
|
139
|
+
watch: {
|
|
140
|
+
frameScale: 0.85,
|
|
141
|
+
framePosition: 0,
|
|
142
|
+
captionSize: 22,
|
|
143
|
+
captionPosition: 'below',
|
|
144
|
+
captionBackground: {
|
|
145
|
+
color: '#ff6f9f',
|
|
146
|
+
opacity: 0.85,
|
|
147
|
+
padding: 12,
|
|
148
|
+
sideMargin: 18
|
|
149
|
+
},
|
|
150
|
+
captionBorder: {
|
|
151
|
+
color: '#ffffff',
|
|
152
|
+
width: 2,
|
|
153
|
+
radius: 12
|
|
154
|
+
},
|
|
155
|
+
captionBox: {
|
|
156
|
+
marginTop: 36,
|
|
157
|
+
marginBottom: 12,
|
|
158
|
+
autoSize: true,
|
|
159
|
+
lineHeight: 1.4,
|
|
160
|
+
maxLines: 2
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
ipad: {
|
|
164
|
+
frameScale: 0.90,
|
|
165
|
+
framePosition: 50
|
|
166
|
+
}, mac: {
|
|
167
|
+
frameScale: 0.90,
|
|
168
|
+
framePosition: 25
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
id: 'bold',
|
|
174
|
+
name: 'Bold Impact',
|
|
175
|
+
description: 'Dark dramatic gradient with large device and overlay captions',
|
|
176
|
+
category: 'bold',
|
|
177
|
+
background: {
|
|
178
|
+
mode: 'gradient',
|
|
179
|
+
gradient: {
|
|
180
|
+
colors: ['#0f0c29', '#302b63', '#24243e'],
|
|
181
|
+
direction: 'diagonal'
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
deviceStyle: {
|
|
185
|
+
frameScale: 0.9,
|
|
186
|
+
framePosition: 10 // Centered-high position
|
|
187
|
+
},
|
|
188
|
+
captionStyle: {
|
|
189
|
+
font: 'SF Pro Display',
|
|
190
|
+
fontsize: 64,
|
|
191
|
+
color: '#FFFFFF',
|
|
192
|
+
position: 'overlay',
|
|
193
|
+
align: 'center',
|
|
194
|
+
background: {
|
|
195
|
+
color: '#000000',
|
|
196
|
+
opacity: 0.8,
|
|
197
|
+
padding: 30,
|
|
198
|
+
sideMargin: 40
|
|
199
|
+
},
|
|
200
|
+
border: {
|
|
201
|
+
color: '#FFFFFF',
|
|
202
|
+
width: 2,
|
|
203
|
+
radius: 16
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
deviceOverrides: {
|
|
207
|
+
mac: {
|
|
208
|
+
frameScale: 0.90,
|
|
209
|
+
framePosition: 0,
|
|
210
|
+
captionBox: {
|
|
211
|
+
marginTop: 0,
|
|
212
|
+
marginBottom: 20
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
iphone: {
|
|
216
|
+
frameScale: 0.90,
|
|
217
|
+
framePosition: 20,
|
|
218
|
+
captionBox: {
|
|
219
|
+
marginTop: 0,
|
|
220
|
+
marginBottom: 20
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
ipad: {
|
|
224
|
+
frameScale: 0.90,
|
|
225
|
+
framePosition: 25,
|
|
226
|
+
captionBox: {
|
|
227
|
+
marginTop: 0,
|
|
228
|
+
marginBottom: 20
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
watch: {
|
|
232
|
+
frameScale: 0.9,
|
|
233
|
+
framePosition: 0,
|
|
234
|
+
partialFrame: true,
|
|
235
|
+
frameOffset: 17,
|
|
236
|
+
captionBackground: {
|
|
237
|
+
color: '#111322',
|
|
238
|
+
opacity: 0.9,
|
|
239
|
+
padding: 12,
|
|
240
|
+
sideMargin: 16
|
|
241
|
+
},
|
|
242
|
+
captionBorder: {
|
|
243
|
+
color: '#FFFFFF',
|
|
244
|
+
width: 2,
|
|
245
|
+
radius: 14
|
|
246
|
+
},
|
|
247
|
+
captionBox: {
|
|
248
|
+
marginBottom: 10,
|
|
249
|
+
lineHeight: 1.4,
|
|
250
|
+
maxLines: 2
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
id: 'nerdy',
|
|
257
|
+
name: 'Nerdy OSS',
|
|
258
|
+
description: 'Grid-lined midnight background with JetBrains Mono captions',
|
|
259
|
+
category: 'bold',
|
|
260
|
+
background: {
|
|
261
|
+
mode: 'auto'
|
|
262
|
+
},
|
|
263
|
+
deviceStyle: {
|
|
264
|
+
frameScale: 0.9,
|
|
265
|
+
framePosition: 12
|
|
266
|
+
},
|
|
267
|
+
captionStyle: {
|
|
268
|
+
font: 'JetBrains Mono Bold',
|
|
269
|
+
fontsize: 60,
|
|
270
|
+
color: '#7CFFCB',
|
|
271
|
+
position: 'overlay',
|
|
272
|
+
align: 'center',
|
|
273
|
+
background: {
|
|
274
|
+
color: '#111827',
|
|
275
|
+
opacity: 0.85,
|
|
276
|
+
padding: 32,
|
|
277
|
+
sideMargin: 44
|
|
278
|
+
},
|
|
279
|
+
border: {
|
|
280
|
+
color: '#7CFFCB',
|
|
281
|
+
width: 2,
|
|
282
|
+
radius: 18
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
deviceOverrides: {
|
|
286
|
+
mac: {
|
|
287
|
+
frameScale: 0.9,
|
|
288
|
+
framePosition: 8,
|
|
289
|
+
captionBox: {
|
|
290
|
+
marginTop: 0,
|
|
291
|
+
marginBottom: 24
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
iphone: {
|
|
295
|
+
frameScale: 0.9,
|
|
296
|
+
framePosition: 18,
|
|
297
|
+
captionBox: {
|
|
298
|
+
marginTop: 12,
|
|
299
|
+
marginBottom: 24
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
ipad: {
|
|
303
|
+
frameScale: 0.9,
|
|
304
|
+
framePosition: 20,
|
|
305
|
+
captionBox: {
|
|
306
|
+
marginTop: 16,
|
|
307
|
+
marginBottom: 24
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
watch: {
|
|
311
|
+
frameScale: 0.96,
|
|
312
|
+
framePosition: 0,
|
|
313
|
+
partialFrame: true,
|
|
314
|
+
frameOffset: 17,
|
|
315
|
+
captionSize: 26,
|
|
316
|
+
captionPosition: 'below',
|
|
317
|
+
captionBackground: {
|
|
318
|
+
color: '#0B1120',
|
|
319
|
+
opacity: 0.9,
|
|
320
|
+
padding: 14,
|
|
321
|
+
sideMargin: 18
|
|
322
|
+
},
|
|
323
|
+
captionBorder: {
|
|
324
|
+
color: '#7CFFCB',
|
|
325
|
+
width: 2,
|
|
326
|
+
radius: 14
|
|
327
|
+
},
|
|
328
|
+
captionBox: {
|
|
329
|
+
marginTop: 14,
|
|
330
|
+
marginBottom: 16,
|
|
331
|
+
autoSize: true,
|
|
332
|
+
lineHeight: 1.4,
|
|
333
|
+
maxLines: 2
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
id: 'elegant',
|
|
340
|
+
name: 'Elegant Professional',
|
|
341
|
+
description: 'Sophisticated monochrome with floating device',
|
|
342
|
+
category: 'elegant',
|
|
343
|
+
background: {
|
|
344
|
+
mode: 'gradient',
|
|
345
|
+
gradient: {
|
|
346
|
+
colors: ['#8e9eab', '#eef2f3'],
|
|
347
|
+
direction: 'top-bottom'
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
deviceStyle: {
|
|
351
|
+
frameScale: 0.95,
|
|
352
|
+
framePosition: 50
|
|
353
|
+
},
|
|
354
|
+
captionStyle: {
|
|
355
|
+
font: 'Georgia',
|
|
356
|
+
fontsize: 68,
|
|
357
|
+
color: '#FFFFFF',
|
|
358
|
+
position: 'below',
|
|
359
|
+
align: 'center',
|
|
360
|
+
background: {
|
|
361
|
+
color: '#043f5dff',
|
|
362
|
+
opacity: 0.5,
|
|
363
|
+
padding: 20,
|
|
364
|
+
sideMargin: 30
|
|
365
|
+
},
|
|
366
|
+
border: {
|
|
367
|
+
color: '#195297ff',
|
|
368
|
+
width: 1,
|
|
369
|
+
radius: 8
|
|
370
|
+
},
|
|
371
|
+
box: {
|
|
372
|
+
autoSize: true,
|
|
373
|
+
maxLines: 2,
|
|
374
|
+
lineHeight: 1.5,
|
|
375
|
+
marginTop: 0,
|
|
376
|
+
marginBottom: 60
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
deviceOverrides: {
|
|
380
|
+
iphone: {
|
|
381
|
+
frameScale: 0.9,
|
|
382
|
+
framePosition: 50,
|
|
383
|
+
captionBox: { marginBottom: 60 }
|
|
384
|
+
},
|
|
385
|
+
mac: {
|
|
386
|
+
frameScale: 0.9,
|
|
387
|
+
framePosition: 0
|
|
388
|
+
},
|
|
389
|
+
watch: {
|
|
390
|
+
frameScale: 0.80,
|
|
391
|
+
framePosition: 25,
|
|
392
|
+
captionSize: 20,
|
|
393
|
+
captionPosition: 'below',
|
|
394
|
+
captionBox: {
|
|
395
|
+
marginTop: 0,
|
|
396
|
+
marginBottom: 0
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
ipad: {
|
|
400
|
+
frameScale: 0.90,
|
|
401
|
+
framePosition: 25
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
id: 'showcase',
|
|
407
|
+
name: 'Showcase',
|
|
408
|
+
description: 'Feature your app with custom backgrounds',
|
|
409
|
+
category: 'professional',
|
|
410
|
+
background: {
|
|
411
|
+
mode: 'auto', // Will auto-detect background.png
|
|
412
|
+
fallback: 'gradient',
|
|
413
|
+
gradient: {
|
|
414
|
+
colors: ['#4facfe', '#00f2fe'],
|
|
415
|
+
direction: 'left-right'
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
deviceStyle: {
|
|
419
|
+
frameScale: 0.90,
|
|
420
|
+
framePosition: 50
|
|
421
|
+
},
|
|
422
|
+
captionStyle: {
|
|
423
|
+
font: 'SF Pro Display',
|
|
424
|
+
fontsize: 64,
|
|
425
|
+
color: '#FFFFFF',
|
|
426
|
+
position: 'above',
|
|
427
|
+
align: 'center',
|
|
428
|
+
background: {
|
|
429
|
+
color: '#000000',
|
|
430
|
+
opacity: 0.6,
|
|
431
|
+
padding: 25,
|
|
432
|
+
sideMargin: 35
|
|
433
|
+
},
|
|
434
|
+
border: {
|
|
435
|
+
color: '#f3f4f5ff',
|
|
436
|
+
width: 1,
|
|
437
|
+
radius: 10
|
|
438
|
+
},
|
|
439
|
+
box: {
|
|
440
|
+
autoSize: true,
|
|
441
|
+
maxLines: 3,
|
|
442
|
+
lineHeight: 1.4,
|
|
443
|
+
marginTop: 30,
|
|
444
|
+
marginBottom: 10
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
deviceOverrides: {
|
|
448
|
+
mac: {
|
|
449
|
+
frameScale: 0.90,
|
|
450
|
+
framePosition: 50,
|
|
451
|
+
captionBox: {
|
|
452
|
+
marginTop: 20,
|
|
453
|
+
marginBottom: 0
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
watch: {
|
|
457
|
+
frameScale: 0.75,
|
|
458
|
+
framePosition: 95,
|
|
459
|
+
captionSize: 28,
|
|
460
|
+
captionPosition: 'above',
|
|
461
|
+
captionBox: {
|
|
462
|
+
marginTop: 10,
|
|
463
|
+
marginBottom: 0
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
ipad: {
|
|
467
|
+
frameScale: 0.85,
|
|
468
|
+
framePosition: 50,
|
|
469
|
+
captionBox: {
|
|
470
|
+
marginTop: 10,
|
|
471
|
+
marginBottom: 0
|
|
472
|
+
}
|
|
473
|
+
}, iphone: {
|
|
474
|
+
frameScale: 0.9,
|
|
475
|
+
framePosition: 50,
|
|
476
|
+
captionBox: { marginTop: 20 }
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
id: 'playful',
|
|
482
|
+
name: 'Playful Energy',
|
|
483
|
+
description: 'Bright, fun gradients perfect for games and entertainment apps',
|
|
484
|
+
category: 'playful',
|
|
485
|
+
background: {
|
|
486
|
+
mode: 'gradient',
|
|
487
|
+
gradient: {
|
|
488
|
+
colors: ['#fa709a', '#fee140', '#fa709a'],
|
|
489
|
+
direction: 'diagonal'
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
deviceStyle: {
|
|
493
|
+
frameScale: 0.95,
|
|
494
|
+
framePosition: 60
|
|
495
|
+
},
|
|
496
|
+
captionStyle: {
|
|
497
|
+
font: 'SF Pro Display',
|
|
498
|
+
fontsize: 68,
|
|
499
|
+
color: '#FFFFFF',
|
|
500
|
+
position: 'above',
|
|
501
|
+
align: 'center',
|
|
502
|
+
background: {
|
|
503
|
+
color: '#FF006E',
|
|
504
|
+
opacity: 0.7,
|
|
505
|
+
padding: 22,
|
|
506
|
+
sideMargin: 25
|
|
507
|
+
},
|
|
508
|
+
border: {
|
|
509
|
+
radius: 24
|
|
510
|
+
},
|
|
511
|
+
box: {
|
|
512
|
+
autoSize: true,
|
|
513
|
+
maxLines: 2,
|
|
514
|
+
lineHeight: 1.3,
|
|
515
|
+
marginTop: 0,
|
|
516
|
+
marginBottom: 0
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
deviceOverrides: {
|
|
520
|
+
mac: {
|
|
521
|
+
frameScale: 0.90,
|
|
522
|
+
framePosition: 25,
|
|
523
|
+
captionBox: {
|
|
524
|
+
marginTop: 20,
|
|
525
|
+
marginBottom: 0
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
iphone: {
|
|
529
|
+
frameScale: 0.9,
|
|
530
|
+
framePosition: 50,
|
|
531
|
+
captionBox: { marginTop: 56 }
|
|
532
|
+
},
|
|
533
|
+
watch: {
|
|
534
|
+
frameScale: 0.75,
|
|
535
|
+
framePosition: 40,
|
|
536
|
+
captionSize: 24,
|
|
537
|
+
captionPosition: 'below',
|
|
538
|
+
captionBox: {
|
|
539
|
+
marginTop: 0
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
ipad: {
|
|
543
|
+
frameScale: 0.90,
|
|
544
|
+
framePosition: 50,
|
|
545
|
+
captionBox: {
|
|
546
|
+
marginTop: 20,
|
|
547
|
+
marginBottom: 0
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
id: 'corporate',
|
|
554
|
+
name: 'Corporate Professional',
|
|
555
|
+
description: 'Clean, professional look for business and productivity apps',
|
|
556
|
+
category: 'professional',
|
|
557
|
+
background: {
|
|
558
|
+
mode: 'gradient',
|
|
559
|
+
gradient: {
|
|
560
|
+
colors: ['#0077BE', '#33CCCC'],
|
|
561
|
+
direction: 'top-bottom'
|
|
562
|
+
}
|
|
563
|
+
},
|
|
564
|
+
deviceStyle: {
|
|
565
|
+
frameScale: 0.85,
|
|
566
|
+
framePosition: 50
|
|
567
|
+
},
|
|
568
|
+
captionStyle: {
|
|
569
|
+
font: 'Helvetica',
|
|
570
|
+
fontsize: 54,
|
|
571
|
+
color: '#2c3e50',
|
|
572
|
+
position: 'above',
|
|
573
|
+
align: 'left',
|
|
574
|
+
paddingLeft: 50,
|
|
575
|
+
background: {
|
|
576
|
+
color: '#FFFFFF',
|
|
577
|
+
opacity: 0.95,
|
|
578
|
+
padding: 30,
|
|
579
|
+
sideMargin: 40
|
|
580
|
+
},
|
|
581
|
+
border: {
|
|
582
|
+
color: '#1F5F8B',
|
|
583
|
+
width: 2,
|
|
584
|
+
radius: 14
|
|
585
|
+
},
|
|
586
|
+
box: {
|
|
587
|
+
autoSize: true,
|
|
588
|
+
maxLines: 3,
|
|
589
|
+
lineHeight: 1.4,
|
|
590
|
+
marginTop: 50,
|
|
591
|
+
marginBottom: 20
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
deviceOverrides: {
|
|
595
|
+
mac: {
|
|
596
|
+
frameScale: 0.90,
|
|
597
|
+
framePosition: 25
|
|
598
|
+
},
|
|
599
|
+
watch: {
|
|
600
|
+
frameScale: 0.80,
|
|
601
|
+
framePosition: 75,
|
|
602
|
+
captionSize: 18,
|
|
603
|
+
captionBackground: {
|
|
604
|
+
color: '#eef1f5',
|
|
605
|
+
opacity: 0.9,
|
|
606
|
+
padding: 12,
|
|
607
|
+
sideMargin: 18
|
|
608
|
+
},
|
|
609
|
+
captionBorder: {
|
|
610
|
+
color: '#f6d7d7ff',
|
|
611
|
+
width: 1,
|
|
612
|
+
radius: 5
|
|
613
|
+
},
|
|
614
|
+
captionBox: {
|
|
615
|
+
marginTop: 12,
|
|
616
|
+
marginBottom: 12,
|
|
617
|
+
lineHeight: 1.4,
|
|
618
|
+
maxLines: 2
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
];
|
|
624
|
+
/**
|
|
625
|
+
* Get template by ID
|
|
626
|
+
*/
|
|
627
|
+
export function getTemplate(id) {
|
|
628
|
+
return templates.find(t => t.id === id);
|
|
629
|
+
}
|
|
630
|
+
/**
|
|
631
|
+
* Get templates by category
|
|
632
|
+
*/
|
|
633
|
+
export function getTemplatesByCategory(category) {
|
|
634
|
+
return templates.filter(t => t.category === category);
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* Get all template categories
|
|
638
|
+
*/
|
|
639
|
+
export function getTemplateCategories() {
|
|
640
|
+
return [...new Set(templates.map(t => t.category))];
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* Apply template to configuration
|
|
644
|
+
*/
|
|
645
|
+
export function applyTemplateToConfig(templateId, existingConfig) {
|
|
646
|
+
const template = getTemplate(templateId);
|
|
647
|
+
if (!template) {
|
|
648
|
+
throw new Error(`Template "${templateId}" not found`);
|
|
649
|
+
}
|
|
650
|
+
// Start with existing config
|
|
651
|
+
const config = { ...existingConfig };
|
|
652
|
+
// Apply background
|
|
653
|
+
config.background = template.background;
|
|
654
|
+
// Apply caption style
|
|
655
|
+
// Use nullish coalescing so explicit zeros are respected (e.g., paddingBottom: 0)
|
|
656
|
+
config.caption = {
|
|
657
|
+
...config.caption,
|
|
658
|
+
...template.captionStyle,
|
|
659
|
+
paddingTop: template.captionStyle.paddingTop ?? 100,
|
|
660
|
+
paddingBottom: template.captionStyle.paddingBottom ?? 60
|
|
661
|
+
};
|
|
662
|
+
// Apply device styles
|
|
663
|
+
if (config.devices) {
|
|
664
|
+
for (const [deviceName, deviceConfig] of Object.entries(config.devices)) {
|
|
665
|
+
const override = template.deviceOverrides?.[deviceName];
|
|
666
|
+
// Apply base device style
|
|
667
|
+
const mergedDevice = {
|
|
668
|
+
...deviceConfig,
|
|
669
|
+
frameScale: template.deviceStyle.frameScale,
|
|
670
|
+
framePosition: template.deviceStyle.framePosition,
|
|
671
|
+
partialFrame: template.deviceStyle.partialFrame,
|
|
672
|
+
frameOffset: template.deviceStyle.frameOffset,
|
|
673
|
+
captionPosition: template.captionStyle.position,
|
|
674
|
+
...override // Apply device-specific overrides
|
|
675
|
+
};
|
|
676
|
+
// Ensure template font size changes take effect:
|
|
677
|
+
// If the template did NOT provide a per-device captionSize override,
|
|
678
|
+
// remove any existing device-level captionSize so compose.ts falls back
|
|
679
|
+
// to the template/global caption.fontsize.
|
|
680
|
+
if (!override || override.captionSize === undefined) {
|
|
681
|
+
delete mergedDevice.captionSize;
|
|
682
|
+
}
|
|
683
|
+
config.devices[deviceName] = mergedDevice;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
return config;
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* Generate caption suggestions for a template
|
|
690
|
+
*/
|
|
691
|
+
export function getTemplateCaptionSuggestions(templateId) {
|
|
692
|
+
const template = getTemplate(templateId);
|
|
693
|
+
// Default suggestions if template doesn't have specific ones
|
|
694
|
+
const defaults = {
|
|
695
|
+
hero: [
|
|
696
|
+
'Powerful Features, Beautiful Design',
|
|
697
|
+
'Everything You Need in One App',
|
|
698
|
+
'Designed for You',
|
|
699
|
+
'Simple. Fast. Powerful.'
|
|
700
|
+
],
|
|
701
|
+
features: [
|
|
702
|
+
'Track Everything',
|
|
703
|
+
'Stay Organized',
|
|
704
|
+
'Real-Time Updates',
|
|
705
|
+
'Secure & Private',
|
|
706
|
+
'Works Everywhere'
|
|
707
|
+
],
|
|
708
|
+
cta: [
|
|
709
|
+
'Download Now',
|
|
710
|
+
'Get Started Today',
|
|
711
|
+
'Try It Free',
|
|
712
|
+
'Join Millions of Users'
|
|
713
|
+
]
|
|
714
|
+
};
|
|
715
|
+
if (template?.captionSuggestions) {
|
|
716
|
+
return {
|
|
717
|
+
hero: template.captionSuggestions.hero || defaults.hero,
|
|
718
|
+
features: template.captionSuggestions.features || defaults.features,
|
|
719
|
+
cta: template.captionSuggestions.cta || defaults.cta
|
|
720
|
+
};
|
|
721
|
+
}
|
|
722
|
+
return defaults;
|
|
723
|
+
}
|
|
724
|
+
//# sourceMappingURL=registry.js.map
|