@softure-ai/marketing-kit 0.21.2 → 0.22.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.
Files changed (100) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/NOTICE +11 -0
  3. package/README.md +35 -4
  4. package/dist/config/actions-schema.d.ts +35 -35
  5. package/dist/config/brand.d.ts.map +1 -1
  6. package/dist/config/brand.js +22 -1
  7. package/dist/config/brand.js.map +1 -1
  8. package/dist/config/colors.d.ts +12 -2
  9. package/dist/config/colors.d.ts.map +1 -1
  10. package/dist/config/colors.js +32 -0
  11. package/dist/config/colors.js.map +1 -1
  12. package/dist/config/config.d.ts.map +1 -1
  13. package/dist/config/config.js +2 -0
  14. package/dist/config/config.js.map +1 -1
  15. package/dist/config/schema.d.ts +181 -172
  16. package/dist/config/schema.d.ts.map +1 -1
  17. package/dist/config/schema.js +16 -4
  18. package/dist/config/schema.js.map +1 -1
  19. package/dist/config/shot-steps.d.ts +40 -40
  20. package/dist/footage/caption-highlight.d.ts +44 -0
  21. package/dist/footage/caption-highlight.d.ts.map +1 -0
  22. package/dist/footage/caption-highlight.js +29 -0
  23. package/dist/footage/caption-highlight.js.map +1 -0
  24. package/dist/footage/compose.d.ts +3 -0
  25. package/dist/footage/compose.d.ts.map +1 -1
  26. package/dist/footage/compose.js +33 -6
  27. package/dist/footage/compose.js.map +1 -1
  28. package/dist/footage/draft-color.d.ts +6 -0
  29. package/dist/footage/draft-color.d.ts.map +1 -0
  30. package/dist/footage/draft-color.js +14 -0
  31. package/dist/footage/draft-color.js.map +1 -0
  32. package/dist/footage/draft-overlays.d.ts +12 -0
  33. package/dist/footage/draft-overlays.d.ts.map +1 -0
  34. package/dist/footage/draft-overlays.js +83 -0
  35. package/dist/footage/draft-overlays.js.map +1 -0
  36. package/dist/footage/draft.d.ts +27 -9
  37. package/dist/footage/draft.d.ts.map +1 -1
  38. package/dist/footage/draft.js +99 -37
  39. package/dist/footage/draft.js.map +1 -1
  40. package/dist/footage/edl.d.ts +41 -0
  41. package/dist/footage/edl.d.ts.map +1 -1
  42. package/dist/footage/edl.js +10 -0
  43. package/dist/footage/edl.js.map +1 -1
  44. package/dist/footage/film.d.ts +14 -0
  45. package/dist/footage/film.d.ts.map +1 -1
  46. package/dist/footage/film.js +2 -0
  47. package/dist/footage/film.js.map +1 -1
  48. package/dist/footage/overlay-html.d.ts +29 -0
  49. package/dist/footage/overlay-html.d.ts.map +1 -0
  50. package/dist/footage/overlay-html.js +112 -0
  51. package/dist/footage/overlay-html.js.map +1 -0
  52. package/dist/footage/overlay-schema.d.ts +97 -0
  53. package/dist/footage/overlay-schema.d.ts.map +1 -0
  54. package/dist/footage/overlay-schema.js +104 -0
  55. package/dist/footage/overlay-schema.js.map +1 -0
  56. package/dist/footage/overlays.d.ts +112 -0
  57. package/dist/footage/overlays.d.ts.map +1 -0
  58. package/dist/footage/overlays.js +222 -0
  59. package/dist/footage/overlays.js.map +1 -0
  60. package/dist/footage/pipeline.d.ts.map +1 -1
  61. package/dist/footage/pipeline.js +10 -1
  62. package/dist/footage/pipeline.js.map +1 -1
  63. package/dist/index.d.ts +6 -3
  64. package/dist/index.d.ts.map +1 -1
  65. package/dist/index.js +6 -3
  66. package/dist/index.js.map +1 -1
  67. package/dist/og/index.d.ts +1 -1
  68. package/dist/og/index.d.ts.map +1 -1
  69. package/dist/og/index.js +1 -1
  70. package/dist/og/index.js.map +1 -1
  71. package/dist/og/photo-cover.d.ts +18 -1
  72. package/dist/og/photo-cover.d.ts.map +1 -1
  73. package/dist/og/photo-cover.js +56 -28
  74. package/dist/og/photo-cover.js.map +1 -1
  75. package/dist/render/hyperframes.d.ts +1 -1
  76. package/dist/render/hyperframes.d.ts.map +1 -1
  77. package/dist/render/hyperframes.js +1 -1
  78. package/dist/render/hyperframes.js.map +1 -1
  79. package/package.json +3 -2
  80. package/schema/edl.schema.json +130 -0
  81. package/schema/marketing.schema.json +33 -0
  82. package/src/config/brand.ts +20 -1
  83. package/src/config/colors.ts +39 -2
  84. package/src/config/config.ts +2 -0
  85. package/src/config/schema.ts +19 -7
  86. package/src/footage/caption-highlight.ts +52 -0
  87. package/src/footage/compose.ts +40 -6
  88. package/src/footage/draft-color.ts +12 -0
  89. package/src/footage/draft-overlays.ts +91 -0
  90. package/src/footage/draft.ts +117 -39
  91. package/src/footage/edl.ts +17 -0
  92. package/src/footage/film.ts +16 -0
  93. package/src/footage/overlay-html.ts +127 -0
  94. package/src/footage/overlay-schema.ts +146 -0
  95. package/src/footage/overlays.ts +272 -0
  96. package/src/footage/pipeline.ts +8 -1
  97. package/src/index.ts +56 -1
  98. package/src/og/index.ts +2 -0
  99. package/src/og/photo-cover.ts +83 -33
  100. package/src/render/hyperframes.ts +1 -1
@@ -8,7 +8,11 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
8
8
  caption: "caption";
9
9
  log: "log";
10
10
  code: "code";
11
+ list: "list";
11
12
  none: "none";
13
+ search: "search";
14
+ link: "link";
15
+ time: "time";
12
16
  note: "note";
13
17
  strong: "strong";
14
18
  alert: "alert";
@@ -40,8 +44,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
40
44
  heading: "heading";
41
45
  img: "img";
42
46
  insertion: "insertion";
43
- link: "link";
44
- list: "list";
45
47
  listbox: "listbox";
46
48
  listitem: "listitem";
47
49
  main: "main";
@@ -65,7 +67,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
65
67
  rowgroup: "rowgroup";
66
68
  rowheader: "rowheader";
67
69
  scrollbar: "scrollbar";
68
- search: "search";
69
70
  searchbox: "searchbox";
70
71
  separator: "separator";
71
72
  slider: "slider";
@@ -80,7 +81,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
80
81
  tabpanel: "tabpanel";
81
82
  term: "term";
82
83
  textbox: "textbox";
83
- time: "time";
84
84
  timer: "timer";
85
85
  toolbar: "toolbar";
86
86
  tooltip: "tooltip";
@@ -134,7 +134,7 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
134
134
  hasText: import("./actions-schema.js").TextMatch | null;
135
135
  nth: number | null;
136
136
  }, {
137
- role?: "caption" | "log" | "code" | "none" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
137
+ role?: "caption" | "log" | "code" | "list" | "none" | "search" | "link" | "time" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "listbox" | "listitem" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
138
138
  name?: string | {
139
139
  regex: string;
140
140
  flags: string;
@@ -164,7 +164,11 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
164
164
  caption: "caption";
165
165
  log: "log";
166
166
  code: "code";
167
+ list: "list";
167
168
  none: "none";
169
+ search: "search";
170
+ link: "link";
171
+ time: "time";
168
172
  note: "note";
169
173
  strong: "strong";
170
174
  alert: "alert";
@@ -196,8 +200,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
196
200
  heading: "heading";
197
201
  img: "img";
198
202
  insertion: "insertion";
199
- link: "link";
200
- list: "list";
201
203
  listbox: "listbox";
202
204
  listitem: "listitem";
203
205
  main: "main";
@@ -221,7 +223,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
221
223
  rowgroup: "rowgroup";
222
224
  rowheader: "rowheader";
223
225
  scrollbar: "scrollbar";
224
- search: "search";
225
226
  searchbox: "searchbox";
226
227
  separator: "separator";
227
228
  slider: "slider";
@@ -236,7 +237,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
236
237
  tabpanel: "tabpanel";
237
238
  term: "term";
238
239
  textbox: "textbox";
239
- time: "time";
240
240
  timer: "timer";
241
241
  toolbar: "toolbar";
242
242
  tooltip: "tooltip";
@@ -290,7 +290,7 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
290
290
  hasText: import("./actions-schema.js").TextMatch | null;
291
291
  nth: number | null;
292
292
  }, {
293
- role?: "caption" | "log" | "code" | "none" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
293
+ role?: "caption" | "log" | "code" | "list" | "none" | "search" | "link" | "time" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "listbox" | "listitem" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
294
294
  name?: string | {
295
295
  regex: string;
296
296
  flags: string;
@@ -319,7 +319,11 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
319
319
  caption: "caption";
320
320
  log: "log";
321
321
  code: "code";
322
+ list: "list";
322
323
  none: "none";
324
+ search: "search";
325
+ link: "link";
326
+ time: "time";
323
327
  note: "note";
324
328
  strong: "strong";
325
329
  alert: "alert";
@@ -351,8 +355,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
351
355
  heading: "heading";
352
356
  img: "img";
353
357
  insertion: "insertion";
354
- link: "link";
355
- list: "list";
356
358
  listbox: "listbox";
357
359
  listitem: "listitem";
358
360
  main: "main";
@@ -376,7 +378,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
376
378
  rowgroup: "rowgroup";
377
379
  rowheader: "rowheader";
378
380
  scrollbar: "scrollbar";
379
- search: "search";
380
381
  searchbox: "searchbox";
381
382
  separator: "separator";
382
383
  slider: "slider";
@@ -391,7 +392,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
391
392
  tabpanel: "tabpanel";
392
393
  term: "term";
393
394
  textbox: "textbox";
394
- time: "time";
395
395
  timer: "timer";
396
396
  toolbar: "toolbar";
397
397
  tooltip: "tooltip";
@@ -445,7 +445,7 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
445
445
  hasText: import("./actions-schema.js").TextMatch | null;
446
446
  nth: number | null;
447
447
  }, {
448
- role?: "caption" | "log" | "code" | "none" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
448
+ role?: "caption" | "log" | "code" | "list" | "none" | "search" | "link" | "time" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "listbox" | "listitem" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
449
449
  name?: string | {
450
450
  regex: string;
451
451
  flags: string;
@@ -477,7 +477,11 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
477
477
  caption: "caption";
478
478
  log: "log";
479
479
  code: "code";
480
+ list: "list";
480
481
  none: "none";
482
+ search: "search";
483
+ link: "link";
484
+ time: "time";
481
485
  note: "note";
482
486
  strong: "strong";
483
487
  alert: "alert";
@@ -509,8 +513,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
509
513
  heading: "heading";
510
514
  img: "img";
511
515
  insertion: "insertion";
512
- link: "link";
513
- list: "list";
514
516
  listbox: "listbox";
515
517
  listitem: "listitem";
516
518
  main: "main";
@@ -534,7 +536,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
534
536
  rowgroup: "rowgroup";
535
537
  rowheader: "rowheader";
536
538
  scrollbar: "scrollbar";
537
- search: "search";
538
539
  searchbox: "searchbox";
539
540
  separator: "separator";
540
541
  slider: "slider";
@@ -549,7 +550,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
549
550
  tabpanel: "tabpanel";
550
551
  term: "term";
551
552
  textbox: "textbox";
552
- time: "time";
553
553
  timer: "timer";
554
554
  toolbar: "toolbar";
555
555
  tooltip: "tooltip";
@@ -603,7 +603,7 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
603
603
  hasText: import("./actions-schema.js").TextMatch | null;
604
604
  nth: number | null;
605
605
  }, {
606
- role?: "caption" | "log" | "code" | "none" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
606
+ role?: "caption" | "log" | "code" | "list" | "none" | "search" | "link" | "time" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "listbox" | "listitem" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
607
607
  name?: string | {
608
608
  regex: string;
609
609
  flags: string;
@@ -632,7 +632,11 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
632
632
  caption: "caption";
633
633
  log: "log";
634
634
  code: "code";
635
+ list: "list";
635
636
  none: "none";
637
+ search: "search";
638
+ link: "link";
639
+ time: "time";
636
640
  note: "note";
637
641
  strong: "strong";
638
642
  alert: "alert";
@@ -664,8 +668,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
664
668
  heading: "heading";
665
669
  img: "img";
666
670
  insertion: "insertion";
667
- link: "link";
668
- list: "list";
669
671
  listbox: "listbox";
670
672
  listitem: "listitem";
671
673
  main: "main";
@@ -689,7 +691,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
689
691
  rowgroup: "rowgroup";
690
692
  rowheader: "rowheader";
691
693
  scrollbar: "scrollbar";
692
- search: "search";
693
694
  searchbox: "searchbox";
694
695
  separator: "separator";
695
696
  slider: "slider";
@@ -704,7 +705,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
704
705
  tabpanel: "tabpanel";
705
706
  term: "term";
706
707
  textbox: "textbox";
707
- time: "time";
708
708
  timer: "timer";
709
709
  toolbar: "toolbar";
710
710
  tooltip: "tooltip";
@@ -758,7 +758,7 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
758
758
  hasText: import("./actions-schema.js").TextMatch | null;
759
759
  nth: number | null;
760
760
  }, {
761
- role?: "caption" | "log" | "code" | "none" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
761
+ role?: "caption" | "log" | "code" | "list" | "none" | "search" | "link" | "time" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "listbox" | "listitem" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
762
762
  name?: string | {
763
763
  regex: string;
764
764
  flags: string;
@@ -788,7 +788,11 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
788
788
  caption: "caption";
789
789
  log: "log";
790
790
  code: "code";
791
+ list: "list";
791
792
  none: "none";
793
+ search: "search";
794
+ link: "link";
795
+ time: "time";
792
796
  note: "note";
793
797
  strong: "strong";
794
798
  alert: "alert";
@@ -820,8 +824,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
820
824
  heading: "heading";
821
825
  img: "img";
822
826
  insertion: "insertion";
823
- link: "link";
824
- list: "list";
825
827
  listbox: "listbox";
826
828
  listitem: "listitem";
827
829
  main: "main";
@@ -845,7 +847,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
845
847
  rowgroup: "rowgroup";
846
848
  rowheader: "rowheader";
847
849
  scrollbar: "scrollbar";
848
- search: "search";
849
850
  searchbox: "searchbox";
850
851
  separator: "separator";
851
852
  slider: "slider";
@@ -860,7 +861,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
860
861
  tabpanel: "tabpanel";
861
862
  term: "term";
862
863
  textbox: "textbox";
863
- time: "time";
864
864
  timer: "timer";
865
865
  toolbar: "toolbar";
866
866
  tooltip: "tooltip";
@@ -914,7 +914,7 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
914
914
  hasText: import("./actions-schema.js").TextMatch | null;
915
915
  nth: number | null;
916
916
  }, {
917
- role?: "caption" | "log" | "code" | "none" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
917
+ role?: "caption" | "log" | "code" | "list" | "none" | "search" | "link" | "time" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "listbox" | "listitem" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
918
918
  name?: string | {
919
919
  regex: string;
920
920
  flags: string;
@@ -948,7 +948,11 @@ export declare const cropSchema: z.ZodObject<{
948
948
  caption: "caption";
949
949
  log: "log";
950
950
  code: "code";
951
+ list: "list";
951
952
  none: "none";
953
+ search: "search";
954
+ link: "link";
955
+ time: "time";
952
956
  note: "note";
953
957
  strong: "strong";
954
958
  alert: "alert";
@@ -980,8 +984,6 @@ export declare const cropSchema: z.ZodObject<{
980
984
  heading: "heading";
981
985
  img: "img";
982
986
  insertion: "insertion";
983
- link: "link";
984
- list: "list";
985
987
  listbox: "listbox";
986
988
  listitem: "listitem";
987
989
  main: "main";
@@ -1005,7 +1007,6 @@ export declare const cropSchema: z.ZodObject<{
1005
1007
  rowgroup: "rowgroup";
1006
1008
  rowheader: "rowheader";
1007
1009
  scrollbar: "scrollbar";
1008
- search: "search";
1009
1010
  searchbox: "searchbox";
1010
1011
  separator: "separator";
1011
1012
  slider: "slider";
@@ -1020,7 +1021,6 @@ export declare const cropSchema: z.ZodObject<{
1020
1021
  tabpanel: "tabpanel";
1021
1022
  term: "term";
1022
1023
  textbox: "textbox";
1023
- time: "time";
1024
1024
  timer: "timer";
1025
1025
  toolbar: "toolbar";
1026
1026
  tooltip: "tooltip";
@@ -1074,7 +1074,7 @@ export declare const cropSchema: z.ZodObject<{
1074
1074
  hasText: import("./actions-schema.js").TextMatch | null;
1075
1075
  nth: number | null;
1076
1076
  }, {
1077
- role?: "caption" | "log" | "code" | "none" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
1077
+ role?: "caption" | "log" | "code" | "list" | "none" | "search" | "link" | "time" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "listbox" | "listitem" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
1078
1078
  name?: string | {
1079
1079
  regex: string;
1080
1080
  flags: string;
@@ -1101,7 +1101,11 @@ export declare const cropSchema: z.ZodObject<{
1101
1101
  caption: "caption";
1102
1102
  log: "log";
1103
1103
  code: "code";
1104
+ list: "list";
1104
1105
  none: "none";
1106
+ search: "search";
1107
+ link: "link";
1108
+ time: "time";
1105
1109
  note: "note";
1106
1110
  strong: "strong";
1107
1111
  alert: "alert";
@@ -1133,8 +1137,6 @@ export declare const cropSchema: z.ZodObject<{
1133
1137
  heading: "heading";
1134
1138
  img: "img";
1135
1139
  insertion: "insertion";
1136
- link: "link";
1137
- list: "list";
1138
1140
  listbox: "listbox";
1139
1141
  listitem: "listitem";
1140
1142
  main: "main";
@@ -1158,7 +1160,6 @@ export declare const cropSchema: z.ZodObject<{
1158
1160
  rowgroup: "rowgroup";
1159
1161
  rowheader: "rowheader";
1160
1162
  scrollbar: "scrollbar";
1161
- search: "search";
1162
1163
  searchbox: "searchbox";
1163
1164
  separator: "separator";
1164
1165
  slider: "slider";
@@ -1173,7 +1174,6 @@ export declare const cropSchema: z.ZodObject<{
1173
1174
  tabpanel: "tabpanel";
1174
1175
  term: "term";
1175
1176
  textbox: "textbox";
1176
- time: "time";
1177
1177
  timer: "timer";
1178
1178
  toolbar: "toolbar";
1179
1179
  tooltip: "tooltip";
@@ -1227,7 +1227,7 @@ export declare const cropSchema: z.ZodObject<{
1227
1227
  hasText: import("./actions-schema.js").TextMatch | null;
1228
1228
  nth: number | null;
1229
1229
  }, {
1230
- role?: "caption" | "log" | "code" | "none" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
1230
+ role?: "caption" | "log" | "code" | "list" | "none" | "search" | "link" | "time" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "listbox" | "listitem" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
1231
1231
  name?: string | {
1232
1232
  regex: string;
1233
1233
  flags: string;
@@ -0,0 +1,44 @@
1
+ import { type BrandColors } from "../config/colors.js";
2
+ import type { FootageFilm } from "./film.js";
3
+ /**
4
+ * How a footage film's `highlight` captions light the word being said (issue #1199): its text in `captionHighlight`
5
+ * (`text`), or the word on a rounded box of `captionHighlightBox` with its text in `captionHighlightText` (`box`).
6
+ * The render and the draft both draw what this resolves.
7
+ */
8
+ export type CaptionHighlightLook = {
9
+ style: "text";
10
+ color: string;
11
+ } | {
12
+ style: "box";
13
+ box: string;
14
+ text: string;
15
+ };
16
+ export type CaptionHighlightResult = {
17
+ ok: true;
18
+ look: CaptionHighlightLook;
19
+ } | {
20
+ ok: false;
21
+ error: string;
22
+ };
23
+ /** The colours the look reads. */
24
+ export type CaptionHighlightColors = Pick<BrandColors, "captionHighlight" | "captionHighlightBox" | "captionHighlightText">;
25
+ /** How long a word stays lit from its start, in seconds (render and draft alike). */
26
+ export declare const CAPTION_HIGHLIGHT_SECONDS = 0.32;
27
+ /** The box's padding beside the lit word, in font sizes; above and below, the line's own height is the room. */
28
+ export declare const CAPTION_HIGHLIGHT_BOX_PADDING_EM = 0.15;
29
+ /** The box's corner radius, in px: a little over half the pill's 22 px, so the box nests in the pill's rounding. */
30
+ export declare const CAPTION_HIGHLIGHT_BOX_RADIUS = 12;
31
+ /** The film's highlight look, or an error naming the missing brand colours when it asks for a box without them. */
32
+ export declare function getCaptionHighlight(film: Pick<FootageFilm, "captionHighlightStyle">, colors: CaptionHighlightColors): CaptionHighlightResult;
33
+ export interface CaptionHighlightContrast {
34
+ /** The lit word's text (`captionHighlightText`) against its box (`captionHighlightBox`). */
35
+ textOnBox: number;
36
+ /** The box (`captionHighlightBox`) against the pill (`captionBackground`). */
37
+ boxOnPill: number;
38
+ }
39
+ /**
40
+ * The WCAG contrast ratios of a `box` highlight, for the app to warn on (the kit never changes the colours): the lit
41
+ * text on its box, and the box on the pill. Null when either box colour is missing.
42
+ */
43
+ export declare function getCaptionHighlightContrast(colors: Pick<BrandColors, "captionBackground" | "captionHighlightBox" | "captionHighlightText">): CaptionHighlightContrast | null;
44
+ //# sourceMappingURL=caption-highlight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"caption-highlight.d.ts","sourceRoot":"","sources":["../../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GAAG,IAAI,CAI5K"}
@@ -0,0 +1,29 @@
1
+ import { getContrastRatio } from "../config/colors.js";
2
+ /** How long a word stays lit from its start, in seconds (render and draft alike). */
3
+ export const CAPTION_HIGHLIGHT_SECONDS = 0.32;
4
+ /** The box's padding beside the lit word, in font sizes; above and below, the line's own height is the room. */
5
+ export const CAPTION_HIGHLIGHT_BOX_PADDING_EM = 0.15;
6
+ /** The box's corner radius, in px: a little over half the pill's 22 px, so the box nests in the pill's rounding. */
7
+ export const CAPTION_HIGHLIGHT_BOX_RADIUS = 12;
8
+ /** The film's highlight look, or an error naming the missing brand colours when it asks for a box without them. */
9
+ export function getCaptionHighlight(film, colors) {
10
+ if ((film.captionHighlightStyle ?? "text") === "text")
11
+ return { ok: true, look: { style: "text", color: colors.captionHighlight } };
12
+ const { captionHighlightBox: box, captionHighlightText: text } = colors;
13
+ if (box === undefined || text === undefined) {
14
+ const missing = [box === undefined ? "captionHighlightBox" : null, text === undefined ? "captionHighlightText" : null].filter((role) => role !== null);
15
+ return { ok: false, error: `captionHighlightStyle "box" needs the brand colours ${missing.join(" and ")} (brand.colors or brand.tokensFrom).` };
16
+ }
17
+ return { ok: true, look: { style: "box", box, text } };
18
+ }
19
+ /**
20
+ * The WCAG contrast ratios of a `box` highlight, for the app to warn on (the kit never changes the colours): the lit
21
+ * text on its box, and the box on the pill. Null when either box colour is missing.
22
+ */
23
+ export function getCaptionHighlightContrast(colors) {
24
+ const { captionHighlightBox: box, captionHighlightText: text } = colors;
25
+ if (box === undefined || text === undefined)
26
+ return null;
27
+ return { textOnBox: getContrastRatio(text, box), boxOnPill: getContrastRatio(box, colors.captionBackground) };
28
+ }
29
+ //# sourceMappingURL=caption-highlight.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"caption-highlight.js","sourceRoot":"","sources":["../../src/footage/caption-highlight.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAoB,MAAM,qBAAqB,CAAC;AAgBzE,qFAAqF;AACrF,M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AE,IAAI,EAAE,GAAG,MAAM,CAAC;IACxE,IAAI,GAAG,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACzD,OAAO,EAAE,SAAS,EAAE,gBAAgB,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,iBAAiB,CAAC,EAAE,CAAC;AAChH,CAAC"}
@@ -5,6 +5,7 @@ import { type CaptionLayout } from "../compose/timeline.js";
5
5
  import type { TimedWord } from "../voice/voiceover.js";
6
6
  import { type Edl } from "./edl.js";
7
7
  import { type FootageEdit, type FootageFilm } from "./film.js";
8
+ import type { ResolvedOverlay } from "./overlays.js";
8
9
  /** The default cross-fade's length (`DEFAULT_EDIT.fadeFrames` at 30 fps); the outgoing segment plays on under the incoming one for this long. */
9
10
  export declare const FADE_SECONDS: number;
10
11
  /** The full end card's length after the cut when it sets no `seconds` (`DEFAULT_END_CARD_SECONDS`). */
@@ -48,6 +49,8 @@ export interface FootageComposeInput {
48
49
  assets: FootageComposeAssets;
49
50
  brandName: string;
50
51
  locale: string;
52
+ /** The EDL's overlays, resolved (`resolveEdlOverlays`); absent or empty: none, and the composition is as without them. */
53
+ overlays?: ResolvedOverlay[];
51
54
  }
52
55
  /** The film's length: the cut plus the end card (`getEndCardSeconds`). */
53
56
  export declare function getFootageFilmSeconds(film: Pick<FootageFilm, "endCard">, edl: Edl): number;
@@ -1 +1 @@
1
- {"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/footage/compose.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAiE,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC3H,OAAO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B,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,GAAG,eAAe,CAAC,EAAE,KAAK,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAK1L"}
@@ -1,9 +1,11 @@
1
1
  import { assertLocalReferences, escapeHtml, fontFaces, fontStack } from "../compose/html.js";
2
2
  import { CAPTION_LINE_HEIGHT, getCaptionPillCss, getCaptionPositionCss } from "../compose/timeline.js";
3
+ import { CAPTION_HIGHLIGHT_BOX_PADDING_EM, CAPTION_HIGHLIGHT_BOX_RADIUS, CAPTION_HIGHLIGHT_SECONDS, getCaptionHighlight } from "./caption-highlight.js";
3
4
  import { CAPTION_SAFE_ZONES, getCaptionChunkLayouts, getCaptionSpans, getFootageCaptionChunks, isSameCaptionPlace } from "./captions.js";
4
5
  import { getEdlDuration, getSegmentStarts } from "./edl.js";
5
6
  import { CAPTION_MIN_FONT_SCALE, DEFAULT_EDIT, DEFAULT_END_CARD_SECONDS, DEFAULT_LOGO_END_CARD_FADE_SECONDS, getEndCardSeconds, getFootageEdit, } from "./film.js";
6
7
  import { FOOTAGE_FPS } from "./normalize.js";
8
+ import { getOverlayMarkup } from "./overlay-html.js";
7
9
  const r3 = (value) => Math.round(value * 1000) / 1000 || 0;
8
10
  /**
9
11
  * The HyperFrames composition of a footage film (the same 0.8.85 contract as `composeFilm`): one `<video>` clip per
@@ -120,8 +122,24 @@ export function composeFootage(input) {
120
122
  tweens.push(`tl.fromTo("${target}", { scale: ${scale} }, { scale: ${r3(scale * kenBurnsScale)}, duration: ${r3(segment.end - segment.start)}, ease: "none", immediateRender: false }, ${start});`);
121
123
  }
122
124
  });
125
+ // --- Overlays: the punch-in zooms the segment's picture (eased in, held, eased back), the others are clips of their own ---
126
+ const overlays = input.overlays ?? [];
127
+ for (const overlay of overlays) {
128
+ if (overlay.kind !== "punch_in")
129
+ continue;
130
+ const target = picture === undefined ? `#seg${overlay.segment}` : "#picture";
131
+ const base = scales[overlay.segment];
132
+ const peak = r3(base * overlay.scale);
133
+ tweens.push(`tl.fromTo("${target}", { scale: ${base} }, { scale: ${peak}, duration: ${overlay.ease}, ease: "sine.inOut", immediateRender: false }, ${overlay.start});`, `tl.fromTo("${target}", { scale: ${peak} }, { scale: ${base}, duration: ${overlay.ease}, ease: "sine.inOut", immediateRender: false }, ${r3(overlay.end - overlay.ease)});`);
134
+ }
123
135
  // --- Captions: plain phrases, or the pill that lights each word ---
124
136
  const isHighlight = film.captionStyle === "highlight";
137
+ const highlight = isHighlight ? getCaptionHighlight(film, c) : { ok: true, look: { style: "text", color: c.captionHighlight } };
138
+ // The pipeline refuses such a film before it composes; reaching here is a bug.
139
+ if (!highlight.ok)
140
+ throw new Error(`composeFootage: ${highlight.error}`);
141
+ const look = highlight.look;
142
+ const isBox = isHighlight && look.style === "box";
125
143
  const caption = getFootageCaptionChunks(film, words);
126
144
  const spans = getCaptionSpans(caption, cutEnd);
127
145
  const boxes = getCaptionChunkLayouts(caption, edl, captionBox);
@@ -132,7 +150,7 @@ export function composeFootage(input) {
132
150
  // A chunk in a segment's own box overrides the shared rule's anchor; one in the film's box is written as before.
133
151
  const style = isSameCaptionPlace(place, captionBox) ? "" : ` style="${place.bottom === undefined ? `bottom:auto;top:${place.top}px` : `top:auto;bottom:${place.bottom}px`}"`;
134
152
  const box = isHighlight
135
- ? `<p class="pill">${chunk.words.map((w, j) => `<span id="cw${i}_${j}">${escapeHtml(w.text)}</span>`).join(" ")}</p>`
153
+ ? `<p class="pill">${chunk.words.map((w, j) => `<span id="cw${i}_${j}">${isBox ? `<i class="hl" id="cb${i}_${j}"></i>` : ""}${escapeHtml(w.text)}</span>`).join(" ")}</p>`
136
154
  : `<p class="phrase">${escapeHtml(chunk.words.map((w) => w.text).join(" "))}</p>`;
137
155
  return `<div id="cap${i}" class="clip caption" data-start="${start}" data-duration="${r3(stop - start)}"${style}>${box}</div>`;
138
156
  })
@@ -179,6 +197,7 @@ export function composeFootage(input) {
179
197
  const bodyFont = fontStack(fonts.body, "sans-serif");
180
198
  const headingFont = fonts.heading === null ? bodyFont : fontStack(fonts.heading, "sans-serif");
181
199
  const faces = [...fontFaces(fonts.body), ...fontFaces(fonts.heading)];
200
+ const overlayMarkup = getOverlayMarkup(overlays, { colors: c, headingFont, frame });
182
201
  return assertLocalReferences(`<!doctype html>
183
202
  <html lang="${escapeHtml(input.locale)}">
184
203
  <head>
@@ -196,7 +215,10 @@ html,body{width:${frame.width}px;height:${frame.height}px;overflow:hidden;backgr
196
215
  .caption{position:absolute;left:${captionBox.left}px;right:${captionBox.right}px;${getCaptionPositionCss(captionBox)};display:flex;justify-content:center}
197
216
  .pill{${getCaptionPillCss(captionBox.fontSize)};border-radius:22px;background:${c.captionBackground};box-shadow:0 14px 44px rgba(0,0,0,.5);color:${c.captionText}}
198
217
  .pill span{display:inline-block}
199
- .phrase{font-weight:650;font-size:${captionBox.fontSize}px;line-height:${CAPTION_LINE_HEIGHT};letter-spacing:-.01em;text-align:center;color:#fff;text-shadow:0 2px 6px rgba(0,0,0,.55),0 0 18px rgba(0,0,0,.35)}
218
+ ${isBox ? `.pill{position:relative;z-index:0}
219
+ .pill span{position:relative}
220
+ .hl{position:absolute;top:0;bottom:0;left:-${CAPTION_HIGHLIGHT_BOX_PADDING_EM}em;right:-${CAPTION_HIGHLIGHT_BOX_PADDING_EM}em;z-index:-1;border-radius:${CAPTION_HIGHLIGHT_BOX_RADIUS}px;background:${look.box};opacity:0}
221
+ ` : ""}.phrase{font-weight:650;font-size:${captionBox.fontSize}px;line-height:${CAPTION_LINE_HEIGHT};letter-spacing:-.01em;text-align:center;color:#fff;text-shadow:0 2px 6px rgba(0,0,0,.55),0 0 18px rgba(0,0,0,.35)}
200
222
  .endcard{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:0 80px;text-align:center}
201
223
  .brand{display:flex;justify-content:center;align-items:center;gap:18px;font-family:${headingFont};font-size:46px}
202
224
  .logo{height:60px;width:auto}
@@ -209,13 +231,13 @@ html,body{width:${frame.width}px;height:${frame.height}px;overflow:hidden;backgr
209
231
  .mark.vector{width:min(100%,${LOGO_CARD_MARK.width}px);height:${LOGO_CARD_MARK.height}px;object-fit:contain}
210
232
  .markname{font-family:${headingFont};font-weight:600;font-size:96px;letter-spacing:-.02em}
211
233
  .logoline{font-family:${headingFont};font-weight:600;font-size:${LOGO_CARD_LINE_SIZE}px;line-height:1.15;letter-spacing:-.01em}
212
- </style>
234
+ ${overlayMarkup.css.map((rule) => `${rule}\n`).join("")}</style>
213
235
  </head>
214
236
  <body>
215
237
  <div id="root" data-composition-id="${COMPOSITION_ID}" data-start="0" data-duration="${end}" data-width="${frame.width}" data-height="${frame.height}">
216
238
  ${segments.join("\n ")}
217
239
  ${endCardHtml}
218
- ${captionHtml}
240
+ ${overlayMarkup.html.map((element) => `${element}\n `).join("")}${captionHtml}
219
241
  ${audio}
220
242
  </div>
221
243
  ${captionFit}<script>
@@ -224,9 +246,14 @@ ${tweens.join("\n")}
224
246
  const captions = ${JSON.stringify(isHighlight ? caption.map((chunk) => chunk.words.map((w) => w.start)) : [])};
225
247
  captions.forEach((words, i) => {
226
248
  tl.fromTo("#cap" + i + " .pill", { y: 14, opacity: 0 }, { y: 0, opacity: 1, duration: 0.16, ease: "power3.out" }, Math.max(0, words[0] - 0.05));
227
- words.forEach((t, j) => tl.fromTo("#cw" + i + "_" + j, { color: "${c.captionText}" }, { color: "${c.captionHighlight}", duration: 0.06, immediateRender: false }, t).to("#cw" + i + "_" + j, { color: "${c.captionText}", duration: 0.2 }, t + 0.32));
249
+ ${look.style === "box"
250
+ ? ` words.forEach((t, j) => {
251
+ tl.fromTo("#cb" + i + "_" + j, { opacity: 0 }, { opacity: 1, duration: 0.06, immediateRender: false }, t).to("#cb" + i + "_" + j, { opacity: 0, duration: 0.2 }, t + ${CAPTION_HIGHLIGHT_SECONDS});
252
+ tl.fromTo("#cw" + i + "_" + j, { color: "${c.captionText}" }, { color: "${look.text}", duration: 0.06, immediateRender: false }, t).to("#cw" + i + "_" + j, { color: "${c.captionText}", duration: 0.2 }, t + ${CAPTION_HIGHLIGHT_SECONDS});
253
+ });`
254
+ : ` words.forEach((t, j) => tl.fromTo("#cw" + i + "_" + j, { color: "${c.captionText}" }, { color: "${look.color}", duration: 0.06, immediateRender: false }, t).to("#cw" + i + "_" + j, { color: "${c.captionText}", duration: 0.2 }, t + 0.32));`}
228
255
  });
229
- ${endCardTweens.join("\n")}
256
+ ${overlayMarkup.tweens.map((tween) => `${tween}\n`).join("")}${endCardTweens.join("\n")}
230
257
  tl.set({}, {}, ${end});
231
258
  window.__timelines = window.__timelines || {};
232
259
  window.__timelines["${COMPOSITION_ID}"] = tl;