@softure-ai/marketing-kit 0.1.6 → 0.1.8
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 +100 -17
- package/dist/cli/main.js +93 -33
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/og.d.ts +4 -1
- package/dist/cli/og.d.ts.map +1 -1
- package/dist/cli/og.js +15 -7
- package/dist/cli/og.js.map +1 -1
- package/dist/cli/options.d.ts +29 -2
- package/dist/cli/options.d.ts.map +1 -1
- package/dist/cli/options.js +106 -14
- package/dist/cli/options.js.map +1 -1
- package/dist/cli/voice.d.ts +19 -0
- package/dist/cli/voice.d.ts.map +1 -1
- package/dist/cli/voice.js +37 -5
- package/dist/cli/voice.js.map +1 -1
- package/dist/config/actions-schema.d.ts +14 -14
- package/dist/config/config.d.ts +5 -0
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +2 -1
- package/dist/config/config.js.map +1 -1
- package/dist/config/og-image-names.d.ts +7 -0
- package/dist/config/og-image-names.d.ts.map +1 -0
- package/dist/config/og-image-names.js +9 -0
- package/dist/config/og-image-names.js.map +1 -0
- package/dist/config/schema.d.ts +106 -15
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +74 -7
- package/dist/config/schema.js.map +1 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/og/index.d.ts +3 -3
- package/dist/og/index.d.ts.map +1 -1
- package/dist/og/index.js +3 -2
- package/dist/og/index.js.map +1 -1
- package/dist/og/render.d.ts +13 -0
- package/dist/og/render.d.ts.map +1 -1
- package/dist/og/render.js +31 -6
- package/dist/og/render.js.map +1 -1
- package/dist/og/templates/big-number.d.ts +7 -0
- package/dist/og/templates/big-number.d.ts.map +1 -0
- package/dist/og/templates/big-number.js +41 -0
- package/dist/og/templates/big-number.js.map +1 -0
- package/dist/og/templates/carousel.d.ts +5 -0
- package/dist/og/templates/carousel.d.ts.map +1 -0
- package/dist/og/templates/carousel.js +26 -0
- package/dist/og/templates/carousel.js.map +1 -0
- package/dist/og/templates/context.d.ts +11 -3
- package/dist/og/templates/context.d.ts.map +1 -1
- package/dist/og/templates/context.js +6 -0
- package/dist/og/templates/context.js.map +1 -1
- package/dist/og/templates/frame.d.ts +2 -2
- package/dist/og/templates/frame.d.ts.map +1 -1
- package/dist/og/templates/frame.js +2 -2
- package/dist/og/templates/frame.js.map +1 -1
- package/dist/og/templates/index.d.ts +8 -3
- package/dist/og/templates/index.d.ts.map +1 -1
- package/dist/og/templates/index.js +18 -5
- package/dist/og/templates/index.js.map +1 -1
- package/dist/og/templates/portrait.d.ts +22 -0
- package/dist/og/templates/portrait.d.ts.map +1 -0
- package/dist/og/templates/portrait.js +75 -0
- package/dist/og/templates/portrait.js.map +1 -0
- package/dist/og/templates/schemas.d.ts +28 -0
- package/dist/og/templates/schemas.d.ts.map +1 -1
- package/dist/og/templates/schemas.js +26 -0
- package/dist/og/templates/schemas.js.map +1 -1
- package/dist/posts/posts.d.ts +2 -1
- package/dist/posts/posts.d.ts.map +1 -1
- package/dist/posts/posts.js +1 -1
- package/dist/posts/posts.js.map +1 -1
- package/dist/screenshot/gates.d.ts +6 -3
- package/dist/screenshot/gates.d.ts.map +1 -1
- package/dist/screenshot/gates.js +12 -3
- package/dist/screenshot/gates.js.map +1 -1
- package/dist/screenshot/screenshot.d.ts +17 -0
- package/dist/screenshot/screenshot.d.ts.map +1 -1
- package/dist/screenshot/screenshot.js +37 -6
- package/dist/screenshot/screenshot.js.map +1 -1
- package/dist/screenshot/storage-state.d.ts +9 -0
- package/dist/screenshot/storage-state.d.ts.map +1 -0
- package/dist/screenshot/storage-state.js +25 -0
- package/dist/screenshot/storage-state.js.map +1 -0
- package/dist/voice/batch.d.ts +28 -0
- package/dist/voice/batch.d.ts.map +1 -0
- package/dist/voice/batch.js +46 -0
- package/dist/voice/batch.js.map +1 -0
- package/dist/voice/elevenlabs.d.ts.map +1 -1
- package/dist/voice/elevenlabs.js +11 -1
- package/dist/voice/elevenlabs.js.map +1 -1
- package/dist/voice/pace.d.ts +22 -0
- package/dist/voice/pace.d.ts.map +1 -0
- package/dist/voice/pace.js +39 -0
- package/dist/voice/pace.js.map +1 -0
- package/dist/voice/placeholder.d.ts +35 -0
- package/dist/voice/placeholder.d.ts.map +1 -0
- package/dist/voice/placeholder.js +53 -0
- package/dist/voice/placeholder.js.map +1 -0
- package/dist/voice/produce.d.ts +6 -0
- package/dist/voice/produce.d.ts.map +1 -1
- package/dist/voice/produce.js +13 -2
- package/dist/voice/produce.js.map +1 -1
- package/dist/voice/provider.d.ts +2 -0
- package/dist/voice/provider.d.ts.map +1 -1
- package/dist/voice/provider.js.map +1 -1
- package/package.json +1 -1
- package/schema/marketing.schema.json +359 -37
- package/src/cli/main.ts +88 -31
- package/src/cli/og.ts +14 -6
- package/src/cli/options.ts +118 -13
- package/src/cli/voice.ts +44 -6
- package/src/config/config.ts +7 -2
- package/src/config/og-image-names.ts +7 -0
- package/src/config/schema.ts +82 -8
- package/src/index.ts +10 -2
- package/src/og/index.ts +16 -2
- package/src/og/render.ts +36 -6
- package/src/og/templates/big-number.ts +44 -0
- package/src/og/templates/carousel.ts +27 -0
- package/src/og/templates/context.ts +16 -3
- package/src/og/templates/frame.ts +2 -2
- package/src/og/templates/index.ts +31 -9
- package/src/og/templates/portrait.ts +126 -0
- package/src/og/templates/schemas.ts +35 -0
- package/src/posts/posts.ts +3 -2
- package/src/screenshot/gates.ts +13 -3
- package/src/screenshot/screenshot.ts +51 -11
- package/src/screenshot/storage-state.ts +24 -0
- package/src/voice/batch.ts +65 -0
- package/src/voice/elevenlabs.ts +11 -1
- package/src/voice/pace.ts +55 -0
- package/src/voice/placeholder.ts +83 -0
- package/src/voice/produce.ts +15 -3
- package/src/voice/provider.ts +2 -0
package/dist/config/config.js
CHANGED
|
@@ -66,6 +66,7 @@ function resolveVideos(data, at) {
|
|
|
66
66
|
? null
|
|
67
67
|
: {
|
|
68
68
|
caption: post.caption,
|
|
69
|
+
disclosure: post.disclosure && data.social?.disclosure !== undefined ? data.social.disclosure.replaceAll("{persona}", video.persona.name).trim() : null,
|
|
69
70
|
hashtags: post.hashtags,
|
|
70
71
|
channels: PLATFORMS.flatMap((platform) => {
|
|
71
72
|
const channel = platforms[platform];
|
|
@@ -126,7 +127,7 @@ export function loadMarketingConfig(path) {
|
|
|
126
127
|
hideSelectors: data.app.hideSelectors,
|
|
127
128
|
screenGuardSelector: data.app.screenGuardSelector,
|
|
128
129
|
},
|
|
129
|
-
voice: { provider: data.voice.provider, cacheDir: at(data.voice.cacheDir) },
|
|
130
|
+
voice: { provider: data.voice.provider, cacheDir: at(data.voice.cacheDir), minIntervalSeconds: data.voice.minIntervalSeconds, placeholder: data.voice.placeholder },
|
|
130
131
|
videos: resolveVideos(data, at),
|
|
131
132
|
social: data.social === undefined ? null : { linkTemplate: data.social.linkTemplate },
|
|
132
133
|
screenshots: data.screenshots,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGvD,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAiB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGvD,OAAO,EAAE,mBAAmB,EA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AAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** The files an `ogImages` entry writes under `<output.dir>/og/`, without `.png`: `<id>`, or `<id>-1`…`<id>-N` for a carousel. */
|
|
2
|
+
export declare function getOgImageNames(entry: {
|
|
3
|
+
id: string;
|
|
4
|
+
template: string;
|
|
5
|
+
data: unknown;
|
|
6
|
+
}): string[];
|
|
7
|
+
//# sourceMappingURL=og-image-names.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"og-image-names.d.ts","sourceRoot":"","sources":["../../src/config/og-image-names.ts"],"names":[],"mappings":"AAAA,kIAAkI;AAClI,wBAAgB,eAAe,CAAC,KAAK,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,EAAE,CAKhG"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** The files an `ogImages` entry writes under `<output.dir>/og/`, without `.png`: `<id>`, or `<id>-1`…`<id>-N` for a carousel. */
|
|
2
|
+
export function getOgImageNames(entry) {
|
|
3
|
+
if (entry.template !== "carousel")
|
|
4
|
+
return [entry.id];
|
|
5
|
+
const slides = entry.data?.slides;
|
|
6
|
+
const count = Array.isArray(slides) ? slides.length : 0;
|
|
7
|
+
return Array.from({ length: count }, (_, index) => `${entry.id}-${String(index + 1)}`);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=og-image-names.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"og-image-names.js","sourceRoot":"","sources":["../../src/config/og-image-names.ts"],"names":[],"mappings":"AAAA,kIAAkI;AAClI,MAAM,UAAU,eAAe,CAAC,KAAsD;IACpF,IAAI,KAAK,CAAC,QAAQ,KAAK,UAAU;QAAE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrD,MAAM,MAAM,GAAI,KAAK,CAAC,IAAoC,EAAE,MAAM,CAAC;IACnE,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACxD,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,EAAE,IAAI,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;AACzF,CAAC"}
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -11,6 +11,34 @@ export declare const QUALITIES: readonly ["draft", "standard", "high"];
|
|
|
11
11
|
export type Quality = (typeof QUALITIES)[number];
|
|
12
12
|
export declare const SFX_EVENTS: readonly ["tap", "key", "whoosh", "sparkle", "pop"];
|
|
13
13
|
export type SfxEvent = (typeof SFX_EVENTS)[number];
|
|
14
|
+
export declare const screenshotSchema: z.ZodObject<{
|
|
15
|
+
id: z.ZodString;
|
|
16
|
+
path: z.ZodString;
|
|
17
|
+
width: z.ZodNumber;
|
|
18
|
+
height: z.ZodNumber;
|
|
19
|
+
full: z.ZodDefault<z.ZodBoolean>;
|
|
20
|
+
expect: z.ZodString;
|
|
21
|
+
motion: z.ZodDefault<z.ZodEnum<{
|
|
22
|
+
reduce: "reduce";
|
|
23
|
+
"no-preference": "no-preference";
|
|
24
|
+
}>>;
|
|
25
|
+
minBytes: z.ZodDefault<z.ZodNumber>;
|
|
26
|
+
scale: z.ZodDefault<z.ZodNumber>;
|
|
27
|
+
colorSchemes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
28
|
+
light: "light";
|
|
29
|
+
dark: "dark";
|
|
30
|
+
}>>>;
|
|
31
|
+
scrollTo: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
waitMs: z.ZodDefault<z.ZodNumber>;
|
|
33
|
+
storageState: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, z.core.$strict>;
|
|
35
|
+
/** Named sizes of `ogImages[].size`: the share card and the three social formats. */
|
|
36
|
+
export declare const OG_SIZE_PRESETS: {
|
|
37
|
+
readonly landscape: readonly [1200, 630];
|
|
38
|
+
readonly portrait: readonly [1080, 1350];
|
|
39
|
+
readonly square: readonly [1080, 1080];
|
|
40
|
+
readonly story: readonly [1080, 1920];
|
|
41
|
+
};
|
|
14
42
|
export declare const marketingSchema: z.ZodObject<{
|
|
15
43
|
$schema: z.ZodOptional<z.ZodString>;
|
|
16
44
|
brand: z.ZodObject<{
|
|
@@ -117,7 +145,12 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
117
145
|
model: z.ZodDefault<z.ZodString>;
|
|
118
146
|
language: z.ZodString;
|
|
119
147
|
tempo: z.ZodDefault<z.ZodNumber>;
|
|
148
|
+
minIntervalSeconds: z.ZodDefault<z.ZodNumber>;
|
|
120
149
|
cacheDir: z.ZodDefault<z.ZodString>;
|
|
150
|
+
placeholder: z.ZodPrefault<z.ZodObject<{
|
|
151
|
+
wordsPerSecond: z.ZodDefault<z.ZodNumber>;
|
|
152
|
+
sentencePauseSeconds: z.ZodDefault<z.ZodNumber>;
|
|
153
|
+
}, z.core.$strict>>;
|
|
121
154
|
}, z.core.$strict>;
|
|
122
155
|
videos: z.ZodArray<z.ZodObject<{
|
|
123
156
|
id: z.ZodString;
|
|
@@ -159,6 +192,7 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
159
192
|
do: z.ZodLiteral<"tap">;
|
|
160
193
|
target: z.ZodPipe<z.ZodObject<{
|
|
161
194
|
role: z.ZodOptional<z.ZodEnum<{
|
|
195
|
+
caption: "caption";
|
|
162
196
|
alert: "alert";
|
|
163
197
|
alertdialog: "alertdialog";
|
|
164
198
|
application: "application";
|
|
@@ -166,7 +200,6 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
166
200
|
banner: "banner";
|
|
167
201
|
blockquote: "blockquote";
|
|
168
202
|
button: "button";
|
|
169
|
-
caption: "caption";
|
|
170
203
|
cell: "cell";
|
|
171
204
|
checkbox: "checkbox";
|
|
172
205
|
code: "code";
|
|
@@ -288,7 +321,7 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
288
321
|
hasText: import("./actions-schema.js").TextMatch | null;
|
|
289
322
|
nth: number | null;
|
|
290
323
|
}, {
|
|
291
|
-
role?: "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "
|
|
324
|
+
role?: "caption" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
|
|
292
325
|
name?: string | {
|
|
293
326
|
regex: string;
|
|
294
327
|
flags: string;
|
|
@@ -325,6 +358,7 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
325
358
|
do: z.ZodLiteral<"focus">;
|
|
326
359
|
target: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
|
|
327
360
|
role: z.ZodOptional<z.ZodEnum<{
|
|
361
|
+
caption: "caption";
|
|
328
362
|
alert: "alert";
|
|
329
363
|
alertdialog: "alertdialog";
|
|
330
364
|
application: "application";
|
|
@@ -332,7 +366,6 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
332
366
|
banner: "banner";
|
|
333
367
|
blockquote: "blockquote";
|
|
334
368
|
button: "button";
|
|
335
|
-
caption: "caption";
|
|
336
369
|
cell: "cell";
|
|
337
370
|
checkbox: "checkbox";
|
|
338
371
|
code: "code";
|
|
@@ -454,7 +487,7 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
454
487
|
hasText: import("./actions-schema.js").TextMatch | null;
|
|
455
488
|
nth: number | null;
|
|
456
489
|
}, {
|
|
457
|
-
role?: "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "
|
|
490
|
+
role?: "caption" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
|
|
458
491
|
name?: string | {
|
|
459
492
|
regex: string;
|
|
460
493
|
flags: string;
|
|
@@ -477,6 +510,7 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
477
510
|
nth?: number | undefined;
|
|
478
511
|
}>>, z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
479
512
|
role: z.ZodOptional<z.ZodEnum<{
|
|
513
|
+
caption: "caption";
|
|
480
514
|
alert: "alert";
|
|
481
515
|
alertdialog: "alertdialog";
|
|
482
516
|
application: "application";
|
|
@@ -484,7 +518,6 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
484
518
|
banner: "banner";
|
|
485
519
|
blockquote: "blockquote";
|
|
486
520
|
button: "button";
|
|
487
|
-
caption: "caption";
|
|
488
521
|
cell: "cell";
|
|
489
522
|
checkbox: "checkbox";
|
|
490
523
|
code: "code";
|
|
@@ -606,7 +639,7 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
606
639
|
hasText: import("./actions-schema.js").TextMatch | null;
|
|
607
640
|
nth: number | null;
|
|
608
641
|
}, {
|
|
609
|
-
role?: "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "
|
|
642
|
+
role?: "caption" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
|
|
610
643
|
name?: string | {
|
|
611
644
|
regex: string;
|
|
612
645
|
flags: string;
|
|
@@ -634,6 +667,7 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
634
667
|
do: z.ZodLiteral<"bring">;
|
|
635
668
|
target: z.ZodPipe<z.ZodObject<{
|
|
636
669
|
role: z.ZodOptional<z.ZodEnum<{
|
|
670
|
+
caption: "caption";
|
|
637
671
|
alert: "alert";
|
|
638
672
|
alertdialog: "alertdialog";
|
|
639
673
|
application: "application";
|
|
@@ -641,7 +675,6 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
641
675
|
banner: "banner";
|
|
642
676
|
blockquote: "blockquote";
|
|
643
677
|
button: "button";
|
|
644
|
-
caption: "caption";
|
|
645
678
|
cell: "cell";
|
|
646
679
|
checkbox: "checkbox";
|
|
647
680
|
code: "code";
|
|
@@ -763,7 +796,7 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
763
796
|
hasText: import("./actions-schema.js").TextMatch | null;
|
|
764
797
|
nth: number | null;
|
|
765
798
|
}, {
|
|
766
|
-
role?: "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "
|
|
799
|
+
role?: "caption" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
|
|
767
800
|
name?: string | {
|
|
768
801
|
regex: string;
|
|
769
802
|
flags: string;
|
|
@@ -792,6 +825,7 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
792
825
|
name: z.ZodString;
|
|
793
826
|
target: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
|
|
794
827
|
role: z.ZodOptional<z.ZodEnum<{
|
|
828
|
+
caption: "caption";
|
|
795
829
|
alert: "alert";
|
|
796
830
|
alertdialog: "alertdialog";
|
|
797
831
|
application: "application";
|
|
@@ -799,7 +833,6 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
799
833
|
banner: "banner";
|
|
800
834
|
blockquote: "blockquote";
|
|
801
835
|
button: "button";
|
|
802
|
-
caption: "caption";
|
|
803
836
|
cell: "cell";
|
|
804
837
|
checkbox: "checkbox";
|
|
805
838
|
code: "code";
|
|
@@ -921,7 +954,7 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
921
954
|
hasText: import("./actions-schema.js").TextMatch | null;
|
|
922
955
|
nth: number | null;
|
|
923
956
|
}, {
|
|
924
|
-
role?: "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "
|
|
957
|
+
role?: "caption" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
|
|
925
958
|
name?: string | {
|
|
926
959
|
regex: string;
|
|
927
960
|
flags: string;
|
|
@@ -944,6 +977,7 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
944
977
|
nth?: number | undefined;
|
|
945
978
|
}>>, z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
946
979
|
role: z.ZodOptional<z.ZodEnum<{
|
|
980
|
+
caption: "caption";
|
|
947
981
|
alert: "alert";
|
|
948
982
|
alertdialog: "alertdialog";
|
|
949
983
|
application: "application";
|
|
@@ -951,7 +985,6 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
951
985
|
banner: "banner";
|
|
952
986
|
blockquote: "blockquote";
|
|
953
987
|
button: "button";
|
|
954
|
-
caption: "caption";
|
|
955
988
|
cell: "cell";
|
|
956
989
|
checkbox: "checkbox";
|
|
957
990
|
code: "code";
|
|
@@ -1073,7 +1106,7 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
1073
1106
|
hasText: import("./actions-schema.js").TextMatch | null;
|
|
1074
1107
|
nth: number | null;
|
|
1075
1108
|
}, {
|
|
1076
|
-
role?: "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "
|
|
1109
|
+
role?: "caption" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
|
|
1077
1110
|
name?: string | {
|
|
1078
1111
|
regex: string;
|
|
1079
1112
|
flags: string;
|
|
@@ -1153,6 +1186,7 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
1153
1186
|
video: z.ZodString;
|
|
1154
1187
|
caption: z.ZodString;
|
|
1155
1188
|
hashtags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1189
|
+
disclosure: z.ZodDefault<z.ZodBoolean>;
|
|
1156
1190
|
codes: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
1157
1191
|
x: "x";
|
|
1158
1192
|
instagram: "instagram";
|
|
@@ -1162,6 +1196,7 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
1162
1196
|
linkedin: "linkedin";
|
|
1163
1197
|
}> & z.core.$partial, z.ZodString>>;
|
|
1164
1198
|
}, z.core.$strict>>>;
|
|
1199
|
+
disclosure: z.ZodOptional<z.ZodString>;
|
|
1165
1200
|
}, z.core.$strict>>;
|
|
1166
1201
|
screenshots: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1167
1202
|
id: z.ZodString;
|
|
@@ -1180,8 +1215,18 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
1180
1215
|
light: "light";
|
|
1181
1216
|
dark: "dark";
|
|
1182
1217
|
}>>>;
|
|
1218
|
+
scrollTo: z.ZodOptional<z.ZodNumber>;
|
|
1219
|
+
waitMs: z.ZodDefault<z.ZodNumber>;
|
|
1220
|
+
storageState: z.ZodOptional<z.ZodString>;
|
|
1183
1221
|
}, z.core.$strict>>>;
|
|
1184
1222
|
ogImages: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1223
|
+
id: z.ZodString;
|
|
1224
|
+
size: z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodEnum<{
|
|
1225
|
+
landscape: "landscape";
|
|
1226
|
+
portrait: "portrait";
|
|
1227
|
+
square: "square";
|
|
1228
|
+
story: "story";
|
|
1229
|
+
}>]>, z.ZodTransform<[number, number], [number, number] | "landscape" | "portrait" | "square" | "story">>>;
|
|
1185
1230
|
template: z.ZodLiteral<"headline-cta">;
|
|
1186
1231
|
data: z.ZodObject<{
|
|
1187
1232
|
eyebrow: z.ZodOptional<z.ZodString>;
|
|
@@ -1192,9 +1237,14 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
1192
1237
|
value: z.ZodString;
|
|
1193
1238
|
}, z.core.$strict>>>;
|
|
1194
1239
|
}, z.core.$strict>;
|
|
1195
|
-
id: z.ZodString;
|
|
1196
|
-
size: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
1197
1240
|
}, z.core.$strict>, z.ZodObject<{
|
|
1241
|
+
id: z.ZodString;
|
|
1242
|
+
size: z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodEnum<{
|
|
1243
|
+
landscape: "landscape";
|
|
1244
|
+
portrait: "portrait";
|
|
1245
|
+
square: "square";
|
|
1246
|
+
story: "story";
|
|
1247
|
+
}>]>, z.ZodTransform<[number, number], [number, number] | "landscape" | "portrait" | "square" | "story">>>;
|
|
1198
1248
|
template: z.ZodLiteral<"headline-chart">;
|
|
1199
1249
|
data: z.ZodObject<{
|
|
1200
1250
|
eyebrow: z.ZodOptional<z.ZodString>;
|
|
@@ -1218,8 +1268,49 @@ export declare const marketingSchema: z.ZodObject<{
|
|
|
1218
1268
|
value: z.ZodString;
|
|
1219
1269
|
}, z.core.$strict>>>;
|
|
1220
1270
|
}, z.core.$strict>;
|
|
1271
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1221
1272
|
id: z.ZodString;
|
|
1222
|
-
size: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null
|
|
1273
|
+
size: z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodEnum<{
|
|
1274
|
+
landscape: "landscape";
|
|
1275
|
+
portrait: "portrait";
|
|
1276
|
+
square: "square";
|
|
1277
|
+
story: "story";
|
|
1278
|
+
}>]>, z.ZodTransform<[number, number], [number, number] | "landscape" | "portrait" | "square" | "story">>>;
|
|
1279
|
+
template: z.ZodLiteral<"big-number">;
|
|
1280
|
+
data: z.ZodObject<{
|
|
1281
|
+
eyebrow: z.ZodOptional<z.ZodString>;
|
|
1282
|
+
number: z.ZodString;
|
|
1283
|
+
caption: z.ZodString;
|
|
1284
|
+
tiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1285
|
+
label: z.ZodString;
|
|
1286
|
+
value: z.ZodString;
|
|
1287
|
+
}, z.core.$strict>>>;
|
|
1288
|
+
cta: z.ZodOptional<z.ZodString>;
|
|
1289
|
+
source: z.ZodOptional<z.ZodString>;
|
|
1290
|
+
}, z.core.$strict>;
|
|
1291
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1292
|
+
id: z.ZodString;
|
|
1293
|
+
size: z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodEnum<{
|
|
1294
|
+
landscape: "landscape";
|
|
1295
|
+
portrait: "portrait";
|
|
1296
|
+
square: "square";
|
|
1297
|
+
story: "story";
|
|
1298
|
+
}>]>, z.ZodTransform<[number, number], [number, number] | "landscape" | "portrait" | "square" | "story">>>;
|
|
1299
|
+
template: z.ZodLiteral<"carousel">;
|
|
1300
|
+
data: z.ZodObject<{
|
|
1301
|
+
slides: z.ZodArray<z.ZodObject<{
|
|
1302
|
+
eyebrow: z.ZodOptional<z.ZodString>;
|
|
1303
|
+
headline: z.ZodString;
|
|
1304
|
+
body: z.ZodOptional<z.ZodString>;
|
|
1305
|
+
tiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1306
|
+
label: z.ZodString;
|
|
1307
|
+
value: z.ZodString;
|
|
1308
|
+
}, z.core.$strict>>>;
|
|
1309
|
+
cta: z.ZodOptional<z.ZodString>;
|
|
1310
|
+
source: z.ZodOptional<z.ZodString>;
|
|
1311
|
+
}, z.core.$strict>>;
|
|
1312
|
+
counter: z.ZodDefault<z.ZodBoolean>;
|
|
1313
|
+
}, z.core.$strict>;
|
|
1223
1314
|
}, z.core.$strict>], "template">>>;
|
|
1224
1315
|
layout: z.ZodOptional<z.ZodObject<{
|
|
1225
1316
|
"9:16": z.ZodOptional<z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwBxB;;;;;;GAMG;AAEH,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AAEpD,eAAO,MAAM,SAAS,wCAAyC,CAAC;AAEhE,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD,eAAO,MAAM,UAAU,qDAAsD,CAAC;AAE9E,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AA+ZnD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;kBA8B3B,CAAC;AAEH,qFAAqF;AACrF,eAAO,MAAM,eAAe;;;;;CAKkC,CAAC;AAqI/D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA4EmG,CAAC;AAEhI,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC;AAC7D,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAEjE,iEAAiE;AACjE,eAAO,MAAM,oBAAoB,6EAA6E,CAAC;AAE/G,mFAAmF;AACnF,wBAAgB,sBAAsB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAMhE"}
|
package/dist/config/schema.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { DEVICE_KINDS, LAYOUTS, LAYOUT_NAMES, MIN_DESKTOP_WIDTH, TRANSITIONS, VIDEO_FORMATS, fitsFrame, isDesktopViewport, resolveLayout, } from "../compose/timeline.js";
|
|
3
3
|
import { MARKETING_LOCALES } from "../messages/index.js";
|
|
4
|
-
import { headlineChartDataSchema, headlineCtaDataSchema } from "../og/templates/schemas.js";
|
|
4
|
+
import { bigNumberDataSchema, carouselDataSchema, headlineChartDataSchema, headlineCtaDataSchema } from "../og/templates/schemas.js";
|
|
5
5
|
import { CHANNEL_CODE_MAX_LENGTH, CHANNEL_CODE_PATTERN, DEFAULT_LINK_IN_BIO, PLATFORMS } from "../platforms.js";
|
|
6
6
|
import { ELEVENLABS_DEFAULT_MODEL } from "../voice/voiceover.js";
|
|
7
7
|
import { actionSchema } from "./actions-schema.js";
|
|
8
8
|
import { COLOR_ROLES, COLOR_THEMES, isHexColor } from "./colors.js";
|
|
9
9
|
import { DAY_PATTERN, isCalendarDay } from "./day.js";
|
|
10
|
+
import { getOgImageNames } from "./og-image-names.js";
|
|
10
11
|
import { getScreenshotNames } from "./screenshot-names.js";
|
|
11
12
|
/**
|
|
12
13
|
* `marketing.json`: everything product-specific about a project's marketing material. One zod schema
|
|
@@ -191,7 +192,20 @@ const voiceSchema = z.strictObject({
|
|
|
191
192
|
.regex(LANGUAGE_PATTERN, "must be an ISO 639 language code such as en")
|
|
192
193
|
.describe("ISO 639 code the voice speaks (en, pl); part of the voiceover cache key."),
|
|
193
194
|
tempo: tempo.default(1).describe("Speed-up (0.8-1.3) applied at build time, not in the API, so the paid cache stays valid."),
|
|
195
|
+
minIntervalSeconds: z
|
|
196
|
+
.number()
|
|
197
|
+
.min(0)
|
|
198
|
+
.max(3600)
|
|
199
|
+
.default(60)
|
|
200
|
+
.describe("Least seconds between two paid recordings (0-3600, default 60; 0 turns it off), counted from the newest file in cacheDir, so separate runs are spaced too."),
|
|
194
201
|
cacheDir: relativePath.default("marketing/voiceover").describe("The paid voiceover cache (<key>.mp3 and <key>.json), relative to the folder of marketing.json; commit it."),
|
|
202
|
+
placeholder: z
|
|
203
|
+
.strictObject({
|
|
204
|
+
wordsPerSecond: z.number().min(0.5).max(6).default(2.5).describe("Words per second of the placeholder voiceover (0.5-6, default 2.5); match the real voice to rehearse the film's length."),
|
|
205
|
+
sentencePauseSeconds: z.number().min(0).max(3).default(0.5).describe("Silence after every sentence of the placeholder voiceover but the last (0-3 s, default 0.5)."),
|
|
206
|
+
})
|
|
207
|
+
.prefault({})
|
|
208
|
+
.describe("The free placeholder voiceover of --placeholder (a quiet tone, words at a fixed pace), to record and render a film before paying for its voiceover."),
|
|
195
209
|
});
|
|
196
210
|
/**
|
|
197
211
|
* A video's scene is either a `sceneModule` or the beats' `actions`, never both. With actions, what
|
|
@@ -366,6 +380,7 @@ const socialSchema = z.strictObject({
|
|
|
366
380
|
video: id.describe("The id of the film in videos this post is for."),
|
|
367
381
|
caption: z.string().describe("The post's text."),
|
|
368
382
|
hashtags: z.array(z.string()).default([]).describe("Hashtags appended to the caption."),
|
|
383
|
+
disclosure: z.boolean().default(true).describe("Whether social.disclosure follows this post's caption (default true)."),
|
|
369
384
|
codes: z
|
|
370
385
|
.partialRecord(z.enum(PLATFORMS), channelCode.describe("The platform's channel code for this film."))
|
|
371
386
|
.optional()
|
|
@@ -373,8 +388,11 @@ const socialSchema = z.strictObject({
|
|
|
373
388
|
}))
|
|
374
389
|
.default([])
|
|
375
390
|
.describe("Post copy per film; a film without a post gets no posts.md."),
|
|
391
|
+
disclosure: nonBlank
|
|
392
|
+
.optional()
|
|
393
|
+
.describe("A paragraph after every post's caption, e.g. that the persona is an example and the voice is AI-generated; {persona} becomes the film's persona name. A post opts out with disclosure: false."),
|
|
376
394
|
});
|
|
377
|
-
const screenshotSchema = z.strictObject({
|
|
395
|
+
export const screenshotSchema = z.strictObject({
|
|
378
396
|
id: id.describe("The screenshot's id: the file <output.dir>/screenshots/<id>.png."),
|
|
379
397
|
path: pagePath.describe("The page of the app to capture, e.g. /pricing."),
|
|
380
398
|
width: pixels(8000).describe("The browser viewport's width in CSS pixels."),
|
|
@@ -390,23 +408,61 @@ const screenshotSchema = z.strictObject({
|
|
|
390
408
|
.refine((schemes) => new Set(schemes).size === schemes.length, "lists a scheme twice")
|
|
391
409
|
.optional()
|
|
392
410
|
.describe('Capture each listed scheme into its own <id>-<scheme>.png, e.g. ["light", "dark"]; without it, one <id>.png in app.colorScheme.'),
|
|
411
|
+
scrollTo: z
|
|
412
|
+
.number()
|
|
413
|
+
.int()
|
|
414
|
+
.min(0)
|
|
415
|
+
.optional()
|
|
416
|
+
.describe('Capture one viewport frame scrolled to this many CSS pixels from the top (e.g. to check scroll-driven motion, with motion: "no-preference"); refused when the page cannot scroll that far. Not with full.'),
|
|
417
|
+
waitMs: z.number().int().min(0).max(60_000).default(0).describe("Milliseconds to wait after the page loaded (and scrolled) before the phrase gate reads it, for animations to settle (0-60000, default 0)."),
|
|
418
|
+
storageState: relativePath
|
|
419
|
+
.optional()
|
|
420
|
+
.describe("A Playwright storage state (cookies and localStorage as JSON), relative to the folder of marketing.json, to capture a signed-in screen. It holds a session: keep it out of git."),
|
|
421
|
+
}).superRefine((entry, context) => {
|
|
422
|
+
if (entry.full && entry.scrollTo !== undefined) {
|
|
423
|
+
context.addIssue({ code: "custom", path: ["scrollTo"], message: "is one viewport frame at a scroll position; a full-page shot has none, so drop full or scrollTo" });
|
|
424
|
+
}
|
|
393
425
|
});
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
426
|
+
/** Named sizes of `ogImages[].size`: the share card and the three social formats. */
|
|
427
|
+
export const OG_SIZE_PRESETS = {
|
|
428
|
+
landscape: [1200, 630],
|
|
429
|
+
portrait: [1080, 1350],
|
|
430
|
+
square: [1080, 1080],
|
|
431
|
+
story: [1080, 1920],
|
|
397
432
|
};
|
|
433
|
+
/** A preset name or `[width, height]`; the loaded config always holds the pair. */
|
|
434
|
+
const ogSize = (preset) => z
|
|
435
|
+
.union([z.tuple([pixels(4000), pixels(4000)]), z.enum(Object.keys(OG_SIZE_PRESETS))])
|
|
436
|
+
.transform((size) => (typeof size === "string" ? [...OG_SIZE_PRESETS[size]] : size))
|
|
437
|
+
.default([...OG_SIZE_PRESETS[preset]])
|
|
438
|
+
.describe(`The image size: "landscape" (1200×630), "portrait" (1080×1350), "square" (1080×1080), "story" (1080×1920) or [width, height] in pixels; "${preset}" by default.`);
|
|
439
|
+
const ogImageId = id.describe("The image's id: the file <output.dir>/og/<id>.png (a carousel writes <id>-1.png, <id>-2.png and so on).");
|
|
398
440
|
/** One entry per template; `data` is the template's input, and values the app computes (charts) arrive precomputed. */
|
|
399
441
|
const ogImageSchema = z.discriminatedUnion("template", [
|
|
400
442
|
z.strictObject({
|
|
401
|
-
|
|
443
|
+
id: ogImageId,
|
|
444
|
+
size: ogSize("landscape"),
|
|
402
445
|
template: z.literal("headline-cta").describe("A headline with an optional eyebrow, call to action and tiles."),
|
|
403
446
|
data: headlineCtaDataSchema.describe("The headline-cta template's input."),
|
|
404
447
|
}),
|
|
405
448
|
z.strictObject({
|
|
406
|
-
|
|
449
|
+
id: ogImageId,
|
|
450
|
+
size: ogSize("landscape"),
|
|
407
451
|
template: z.literal("headline-chart").describe("A headline over a chart the app computed, with optional tiles."),
|
|
408
452
|
data: headlineChartDataSchema.describe("The headline-chart template's input."),
|
|
409
453
|
}),
|
|
454
|
+
z.strictObject({
|
|
455
|
+
id: ogImageId,
|
|
456
|
+
size: ogSize("portrait"),
|
|
457
|
+
template: z.literal("big-number").describe("A portrait post whose number fills the frame, with the sentence that explains it, tiles, a call to action and a source line."),
|
|
458
|
+
data: bigNumberDataSchema.describe("The big-number template's input."),
|
|
459
|
+
}),
|
|
460
|
+
z.strictObject({
|
|
461
|
+
id: ogImageId,
|
|
462
|
+
size: ogSize("portrait"),
|
|
463
|
+
template: z.literal("carousel").describe("A numbered run of portrait slides sharing one look; each slide is its own file <id>-<n>.png."),
|
|
464
|
+
data: carouselDataSchema.describe("The carousel template's input."),
|
|
465
|
+
}),
|
|
410
466
|
]);
|
|
411
467
|
/** When each sound effect plays; the descriptions of the `sfx` keys. */
|
|
412
468
|
const SFX_DESCRIPTIONS = {
|
|
@@ -527,6 +583,17 @@ export const marketingSchema = z
|
|
|
527
583
|
});
|
|
528
584
|
checkUnique("screenshots");
|
|
529
585
|
checkUnique("ogImages");
|
|
586
|
+
const ogFileOwners = new Map();
|
|
587
|
+
config.ogImages.forEach((entry, index) => {
|
|
588
|
+
for (const name of getOgImageNames(entry)) {
|
|
589
|
+
const owner = ogFileOwners.get(name);
|
|
590
|
+
// Two entries with one id are reported by checkUnique already.
|
|
591
|
+
if (owner !== undefined && owner !== index && config.ogImages[owner]?.id !== entry.id) {
|
|
592
|
+
context.addIssue({ code: "custom", path: ["ogImages", index, "id"], message: `writes og/${name}.png, as ogImages[${String(owner)}] does` });
|
|
593
|
+
}
|
|
594
|
+
ogFileOwners.set(name, owner ?? index);
|
|
595
|
+
}
|
|
596
|
+
});
|
|
530
597
|
const fileOwners = new Map();
|
|
531
598
|
config.screenshots.forEach((entry, index) => {
|
|
532
599
|
for (const name of getScreenshotNames(entry.id)) {
|