@softure-ai/marketing-kit 0.1.12 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +109 -4
  3. package/dist/cli/footage.d.ts +6 -0
  4. package/dist/cli/footage.d.ts.map +1 -0
  5. package/dist/cli/footage.js +95 -0
  6. package/dist/cli/footage.js.map +1 -0
  7. package/dist/cli/main.js +21 -5
  8. package/dist/cli/main.js.map +1 -1
  9. package/dist/cli/options.d.ts +18 -3
  10. package/dist/cli/options.d.ts.map +1 -1
  11. package/dist/cli/options.js +41 -2
  12. package/dist/cli/options.js.map +1 -1
  13. package/dist/compose/compose.d.ts.map +1 -1
  14. package/dist/compose/compose.js +1 -22
  15. package/dist/compose/compose.js.map +1 -1
  16. package/dist/compose/html.d.ts +6 -0
  17. package/dist/compose/html.d.ts.map +1 -0
  18. package/dist/compose/html.js +24 -0
  19. package/dist/compose/html.js.map +1 -0
  20. package/dist/config/actions-schema.d.ts +14 -14
  21. package/dist/config/config.d.ts +19 -3
  22. package/dist/config/config.d.ts.map +1 -1
  23. package/dist/config/config.js +90 -2
  24. package/dist/config/config.js.map +1 -1
  25. package/dist/config/schema.d.ts +152 -70
  26. package/dist/config/schema.d.ts.map +1 -1
  27. package/dist/config/schema.js +140 -10
  28. package/dist/config/schema.js.map +1 -1
  29. package/dist/config/shot-steps.d.ts +16 -16
  30. package/dist/footage/cache.d.ts +23 -0
  31. package/dist/footage/cache.d.ts.map +1 -0
  32. package/dist/footage/cache.js +51 -0
  33. package/dist/footage/cache.js.map +1 -0
  34. package/dist/footage/compose.d.ts +50 -0
  35. package/dist/footage/compose.d.ts.map +1 -0
  36. package/dist/footage/compose.js +166 -0
  37. package/dist/footage/compose.js.map +1 -0
  38. package/dist/footage/edl.d.ts +83 -0
  39. package/dist/footage/edl.d.ts.map +1 -0
  40. package/dist/footage/edl.js +166 -0
  41. package/dist/footage/edl.js.map +1 -0
  42. package/dist/footage/elevenlabs.d.ts +31 -0
  43. package/dist/footage/elevenlabs.d.ts.map +1 -0
  44. package/dist/footage/elevenlabs.js +140 -0
  45. package/dist/footage/elevenlabs.js.map +1 -0
  46. package/dist/footage/fake.d.ts +38 -0
  47. package/dist/footage/fake.d.ts.map +1 -0
  48. package/dist/footage/fake.js +66 -0
  49. package/dist/footage/fake.js.map +1 -0
  50. package/dist/footage/film.d.ts +103 -0
  51. package/dist/footage/film.d.ts.map +1 -0
  52. package/dist/footage/film.js +29 -0
  53. package/dist/footage/film.js.map +1 -0
  54. package/dist/footage/music.d.ts +37 -0
  55. package/dist/footage/music.d.ts.map +1 -0
  56. package/dist/footage/music.js +63 -0
  57. package/dist/footage/music.js.map +1 -0
  58. package/dist/footage/normalize.d.ts +41 -0
  59. package/dist/footage/normalize.d.ts.map +1 -0
  60. package/dist/footage/normalize.js +114 -0
  61. package/dist/footage/normalize.js.map +1 -0
  62. package/dist/footage/pipeline.d.ts +105 -0
  63. package/dist/footage/pipeline.d.ts.map +1 -0
  64. package/dist/footage/pipeline.js +385 -0
  65. package/dist/footage/pipeline.js.map +1 -0
  66. package/dist/footage/probe.d.ts +64 -0
  67. package/dist/footage/probe.d.ts.map +1 -0
  68. package/dist/footage/probe.js +138 -0
  69. package/dist/footage/probe.js.map +1 -0
  70. package/dist/footage/providers.d.ts +61 -0
  71. package/dist/footage/providers.d.ts.map +1 -0
  72. package/dist/footage/providers.js +13 -0
  73. package/dist/footage/providers.js.map +1 -0
  74. package/dist/footage/render.d.ts +20 -0
  75. package/dist/footage/render.d.ts.map +1 -0
  76. package/dist/footage/render.js +76 -0
  77. package/dist/footage/render.js.map +1 -0
  78. package/dist/index.d.ts +14 -2
  79. package/dist/index.d.ts.map +1 -1
  80. package/dist/index.js +16 -3
  81. package/dist/index.js.map +1 -1
  82. package/dist/messages/index.d.ts +10 -22
  83. package/dist/messages/index.d.ts.map +1 -1
  84. package/dist/messages/index.js +8 -6
  85. package/dist/messages/index.js.map +1 -1
  86. package/dist/render/render.d.ts +6 -0
  87. package/dist/render/render.d.ts.map +1 -1
  88. package/dist/render/render.js +1 -1
  89. package/dist/render/render.js.map +1 -1
  90. package/package.json +1 -1
  91. package/schema/marketing.schema.json +339 -3
  92. package/src/cli/footage.ts +87 -0
  93. package/src/cli/main.ts +20 -5
  94. package/src/cli/options.ts +51 -4
  95. package/src/compose/compose.ts +1 -25
  96. package/src/compose/html.ts +28 -0
  97. package/src/config/config.ts +101 -5
  98. package/src/config/schema.ts +146 -12
  99. package/src/footage/cache.ts +66 -0
  100. package/src/footage/compose.ts +213 -0
  101. package/src/footage/edl.ts +204 -0
  102. package/src/footage/elevenlabs.ts +154 -0
  103. package/src/footage/fake.ts +92 -0
  104. package/src/footage/film.ts +111 -0
  105. package/src/footage/music.ts +86 -0
  106. package/src/footage/normalize.ts +133 -0
  107. package/src/footage/pipeline.ts +447 -0
  108. package/src/footage/probe.ts +172 -0
  109. package/src/footage/providers.ts +71 -0
  110. package/src/footage/render.ts +82 -0
  111. package/src/index.ts +110 -3
  112. package/src/messages/index.ts +16 -8
  113. package/src/render/render.ts +1 -1
  114. package/dist/messages/pl.d.ts +0 -3
  115. package/dist/messages/pl.d.ts.map +0 -1
  116. package/dist/messages/pl.js +0 -21
  117. package/dist/messages/pl.js.map +0 -1
  118. package/src/messages/pl.ts +0 -22
@@ -6,6 +6,7 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6
6
  target: z.ZodPipe<z.ZodObject<{
7
7
  role: z.ZodOptional<z.ZodEnum<{
8
8
  caption: "caption";
9
+ none: "none";
9
10
  alert: "alert";
10
11
  alertdialog: "alertdialog";
11
12
  application: "application";
@@ -51,7 +52,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
51
52
  menuitemcheckbox: "menuitemcheckbox";
52
53
  menuitemradio: "menuitemradio";
53
54
  navigation: "navigation";
54
- none: "none";
55
55
  note: "note";
56
56
  option: "option";
57
57
  paragraph: "paragraph";
@@ -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" | "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;
137
+ role?: "caption" | "none" | "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" | "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;
138
138
  name?: string | {
139
139
  regex: string;
140
140
  flags: string;
@@ -162,6 +162,7 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
162
162
  target: z.ZodPipe<z.ZodObject<{
163
163
  role: z.ZodOptional<z.ZodEnum<{
164
164
  caption: "caption";
165
+ none: "none";
165
166
  alert: "alert";
166
167
  alertdialog: "alertdialog";
167
168
  application: "application";
@@ -207,7 +208,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
207
208
  menuitemcheckbox: "menuitemcheckbox";
208
209
  menuitemradio: "menuitemradio";
209
210
  navigation: "navigation";
210
- none: "none";
211
211
  note: "note";
212
212
  option: "option";
213
213
  paragraph: "paragraph";
@@ -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" | "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;
293
+ role?: "caption" | "none" | "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" | "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;
294
294
  name?: string | {
295
295
  regex: string;
296
296
  flags: string;
@@ -317,6 +317,7 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
317
317
  target: z.ZodPipe<z.ZodObject<{
318
318
  role: z.ZodOptional<z.ZodEnum<{
319
319
  caption: "caption";
320
+ none: "none";
320
321
  alert: "alert";
321
322
  alertdialog: "alertdialog";
322
323
  application: "application";
@@ -362,7 +363,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
362
363
  menuitemcheckbox: "menuitemcheckbox";
363
364
  menuitemradio: "menuitemradio";
364
365
  navigation: "navigation";
365
- none: "none";
366
366
  note: "note";
367
367
  option: "option";
368
368
  paragraph: "paragraph";
@@ -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" | "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;
448
+ role?: "caption" | "none" | "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" | "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;
449
449
  name?: string | {
450
450
  regex: string;
451
451
  flags: string;
@@ -475,6 +475,7 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
475
475
  target: z.ZodPipe<z.ZodObject<{
476
476
  role: z.ZodOptional<z.ZodEnum<{
477
477
  caption: "caption";
478
+ none: "none";
478
479
  alert: "alert";
479
480
  alertdialog: "alertdialog";
480
481
  application: "application";
@@ -520,7 +521,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
520
521
  menuitemcheckbox: "menuitemcheckbox";
521
522
  menuitemradio: "menuitemradio";
522
523
  navigation: "navigation";
523
- none: "none";
524
524
  note: "note";
525
525
  option: "option";
526
526
  paragraph: "paragraph";
@@ -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" | "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;
606
+ role?: "caption" | "none" | "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" | "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;
607
607
  name?: string | {
608
608
  regex: string;
609
609
  flags: string;
@@ -630,6 +630,7 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
630
630
  target: z.ZodPipe<z.ZodObject<{
631
631
  role: z.ZodOptional<z.ZodEnum<{
632
632
  caption: "caption";
633
+ none: "none";
633
634
  alert: "alert";
634
635
  alertdialog: "alertdialog";
635
636
  application: "application";
@@ -675,7 +676,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
675
676
  menuitemcheckbox: "menuitemcheckbox";
676
677
  menuitemradio: "menuitemradio";
677
678
  navigation: "navigation";
678
- none: "none";
679
679
  note: "note";
680
680
  option: "option";
681
681
  paragraph: "paragraph";
@@ -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" | "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;
761
+ role?: "caption" | "none" | "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" | "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;
762
762
  name?: string | {
763
763
  regex: string;
764
764
  flags: string;
@@ -786,6 +786,7 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
786
786
  target: z.ZodPipe<z.ZodObject<{
787
787
  role: z.ZodOptional<z.ZodEnum<{
788
788
  caption: "caption";
789
+ none: "none";
789
790
  alert: "alert";
790
791
  alertdialog: "alertdialog";
791
792
  application: "application";
@@ -831,7 +832,6 @@ export declare const shotStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
831
832
  menuitemcheckbox: "menuitemcheckbox";
832
833
  menuitemradio: "menuitemradio";
833
834
  navigation: "navigation";
834
- none: "none";
835
835
  note: "note";
836
836
  option: "option";
837
837
  paragraph: "paragraph";
@@ -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" | "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;
917
+ role?: "caption" | "none" | "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" | "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;
918
918
  name?: string | {
919
919
  regex: string;
920
920
  flags: string;
@@ -946,6 +946,7 @@ export declare const cropSchema: z.ZodObject<{
946
946
  target: z.ZodPipe<z.ZodObject<{
947
947
  role: z.ZodOptional<z.ZodEnum<{
948
948
  caption: "caption";
949
+ none: "none";
949
950
  alert: "alert";
950
951
  alertdialog: "alertdialog";
951
952
  application: "application";
@@ -991,7 +992,6 @@ export declare const cropSchema: z.ZodObject<{
991
992
  menuitemcheckbox: "menuitemcheckbox";
992
993
  menuitemradio: "menuitemradio";
993
994
  navigation: "navigation";
994
- none: "none";
995
995
  note: "note";
996
996
  option: "option";
997
997
  paragraph: "paragraph";
@@ -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" | "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
+ role?: "caption" | "none" | "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" | "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;
1078
1078
  name?: string | {
1079
1079
  regex: string;
1080
1080
  flags: string;
@@ -1099,6 +1099,7 @@ export declare const cropSchema: z.ZodObject<{
1099
1099
  top: z.ZodOptional<z.ZodPipe<z.ZodObject<{
1100
1100
  role: z.ZodOptional<z.ZodEnum<{
1101
1101
  caption: "caption";
1102
+ none: "none";
1102
1103
  alert: "alert";
1103
1104
  alertdialog: "alertdialog";
1104
1105
  application: "application";
@@ -1144,7 +1145,6 @@ export declare const cropSchema: z.ZodObject<{
1144
1145
  menuitemcheckbox: "menuitemcheckbox";
1145
1146
  menuitemradio: "menuitemradio";
1146
1147
  navigation: "navigation";
1147
- none: "none";
1148
1148
  note: "note";
1149
1149
  option: "option";
1150
1150
  paragraph: "paragraph";
@@ -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" | "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;
1230
+ role?: "caption" | "none" | "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" | "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;
1231
1231
  name?: string | {
1232
1232
  regex: string;
1233
1233
  flags: string;
@@ -0,0 +1,23 @@
1
+ import type { TimedWord } from "../voice/voiceover.js";
2
+ /**
3
+ * The paid footage cache: what a provider returned, stored under a key made of the input's bytes and every setting
4
+ * that changes the answer, so a re-render never pays twice and a changed clip is never served a stale result. Files
5
+ * live in `<cacheDir>/<film id>/` (the project commits them, as it commits the voiceover).
6
+ */
7
+ export type FootageCacheKind = "transcript" | "isolated" | "music";
8
+ /** SHA-256 of a file's bytes, streamed (phone clips are large). */
9
+ export declare function hashFile(path: string): Promise<string>;
10
+ /** A cache key: the first 16 hex digits of the SHA-256 of the parts as JSON. */
11
+ export declare function footageCacheKey(kind: FootageCacheKind, parts: Record<string, unknown>): string;
12
+ export declare function getFootageCachePath(cacheDir: string, filmId: string, kind: FootageCacheKind, key: string): string;
13
+ export declare function writeCacheFile(path: string, data: Buffer | string): void;
14
+ /** A cached transcript; null when there is none, an error naming a broken file. */
15
+ export declare function readCachedTranscript(path: string): {
16
+ ok: true;
17
+ words: TimedWord[] | null;
18
+ } | {
19
+ ok: false;
20
+ error: string;
21
+ };
22
+ export declare function writeTranscript(path: string, words: TimedWord[]): void;
23
+ //# sourceMappingURL=cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/footage/cache.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;GAIG;AAEH,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,UAAU,GAAG,OAAO,CAAC;AAInE,mEAAmE;AACnE,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAI5D;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAK9F;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjH;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGxE;AAaD,mFAAmF;AACnF,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CASzH;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,CAEtE"}
@@ -0,0 +1,51 @@
1
+ import { createHash } from "node:crypto";
2
+ import { createReadStream, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
3
+ import { dirname, join } from "node:path";
4
+ const SUFFIXES = { transcript: "transcript.json", isolated: "isolated.mp3", music: "music.mp3" };
5
+ /** SHA-256 of a file's bytes, streamed (phone clips are large). */
6
+ export async function hashFile(path) {
7
+ const hash = createHash("sha256");
8
+ for await (const chunk of createReadStream(path))
9
+ hash.update(chunk);
10
+ return hash.digest("hex");
11
+ }
12
+ /** A cache key: the first 16 hex digits of the SHA-256 of the parts as JSON. */
13
+ export function footageCacheKey(kind, parts) {
14
+ return createHash("sha256")
15
+ .update(JSON.stringify({ kind, ...parts }))
16
+ .digest("hex")
17
+ .slice(0, 16);
18
+ }
19
+ export function getFootageCachePath(cacheDir, filmId, kind, key) {
20
+ return join(cacheDir, filmId, `${key}.${SUFFIXES[kind]}`);
21
+ }
22
+ export function writeCacheFile(path, data) {
23
+ mkdirSync(dirname(path), { recursive: true });
24
+ writeFileSync(path, data);
25
+ }
26
+ function isTimedWords(value) {
27
+ return (Array.isArray(value) &&
28
+ value.every((item) => {
29
+ if (typeof item !== "object" || item === null)
30
+ return false;
31
+ const word = item;
32
+ return typeof word.text === "string" && typeof word.start === "number" && typeof word.end === "number";
33
+ }));
34
+ }
35
+ /** A cached transcript; null when there is none, an error naming a broken file. */
36
+ export function readCachedTranscript(path) {
37
+ if (!existsSync(path))
38
+ return { ok: true, words: null };
39
+ let words;
40
+ try {
41
+ words = JSON.parse(readFileSync(path, "utf8"));
42
+ }
43
+ catch (error) {
44
+ return { ok: false, error: `cannot read ${path}: ${String(error)}` };
45
+ }
46
+ return isTimedWords(words) ? { ok: true, words } : { ok: false, error: `${path} is not a list of timed words` };
47
+ }
48
+ export function writeTranscript(path, words) {
49
+ writeCacheFile(path, `${JSON.stringify(words, null, 1)}\n`);
50
+ }
51
+ //# sourceMappingURL=cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.js","sourceRoot":"","sources":["../../src/footage/cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/F,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAY1C,MAAM,QAAQ,GAAqC,EAAE,UAAU,EAAE,iBAAiB,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;AAEnI,mEAAmE;AACnE,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,IAAY;IACzC,MAAM,IAAI,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;IAClC,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,gBAAgB,CAAC,IAAI,CAAC;QAAE,IAAI,CAAC,MAAM,CAAC,KAAe,CAAC,CAAC;IAC/E,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC;AAED,gFAAgF;AAChF,MAAM,UAAU,eAAe,CAAC,IAAsB,EAAE,KAA8B;IACpF,OAAO,UAAU,CAAC,QAAQ,CAAC;SACxB,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;SAC1C,MAAM,CAAC,KAAK,CAAC;SACb,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAClB,CAAC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AAK,EAAE,eAAe,IAAI,KAAK,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC;IACvE,CAAC;IACD,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,+BAA+B,EAAE,CAAC;AAClH,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,KAAkB;IAC9D,cAAc,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,50 @@
1
+ import type { BrandColors } from "../config/colors.js";
2
+ import type { SfxEvent } from "../config/schema.js";
3
+ import type { ComposeFont } from "../compose/compose.js";
4
+ import { type CaptionLayout } from "../compose/timeline.js";
5
+ import type { TimedWord } from "../voice/voiceover.js";
6
+ import { type Edl } from "./edl.js";
7
+ import type { FootageFilm } from "./film.js";
8
+ /** A cross-fade's length; the outgoing segment plays on under the incoming one for this long. */
9
+ export declare const FADE_SECONDS = 0.35;
10
+ /** The end card's length after the cut. */
11
+ export declare const END_CARD_SECONDS = 3;
12
+ export interface FootageComposeAssets {
13
+ /** The normalized clips by id. */
14
+ clips: Record<string, string>;
15
+ /** The cut speech track (as long as the cut). */
16
+ speech: string;
17
+ /** The ducked music track, or null for none. */
18
+ music: string | null;
19
+ /** The cut's last frame, under the end card. */
20
+ lastFrame: string;
21
+ logo: string | null;
22
+ sfx: Partial<Record<SfxEvent, string>>;
23
+ }
24
+ export interface FootageComposeInput {
25
+ film: FootageFilm;
26
+ edl: Edl;
27
+ /** The film's words in film time (`remapWords`), for the captions. */
28
+ words: TimedWord[];
29
+ frame: {
30
+ width: number;
31
+ height: number;
32
+ };
33
+ caption: CaptionLayout;
34
+ /** The end card's headline size. */
35
+ headlineSize: number;
36
+ colors: BrandColors;
37
+ fonts: {
38
+ heading: ComposeFont | null;
39
+ body: ComposeFont | null;
40
+ };
41
+ assets: FootageComposeAssets;
42
+ brandName: string;
43
+ locale: string;
44
+ }
45
+ /** The film's length: the cut plus the end card. */
46
+ export declare function getFootageFilmSeconds(film: Pick<FootageFilm, "endCard">, edl: Edl): number;
47
+ /** The picture scale each segment starts at: `zoom` cuts alternate between punched in and back out. */
48
+ export declare function getSegmentScales(edl: Edl): number[];
49
+ export declare function composeFootage(input: FootageComposeInput): string;
50
+ //# sourceMappingURL=compose.d.ts.map
@@ -0,0 +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,EAAiB,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAoC,KAAK,GAAG,EAAE,MAAM,UAAU,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAU7C,iGAAiG;AACjG,eAAO,MAAM,YAAY,OAAO,CAAC;AAKjC,2CAA2C;AAC3C,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC,MAAM,WAAW,oBAAoB;IACnC,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,gDAAgD;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,WAAW,CAAC;IAClB,GAAG,EAAE,GAAG,CAAC;IACT,sEAAsE;IACtE,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,OAAO,EAAE,aAAa,CAAC;IACvB,oCAAoC;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;QAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAAA;KAAE,CAAC;IACjE,MAAM,EAAE,oBAAoB,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAID,oDAAoD;AACpD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,GAAG,EAAE,GAAG,GAAG,MAAM,CAE1F;AAED,uGAAuG;AACvG,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,EAAE,CAOnD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,MAAM,CA4IjE"}
@@ -0,0 +1,166 @@
1
+ import { escapeHtml, fontFaces, fontStack } from "../compose/html.js";
2
+ import { captionChunks } from "../compose/timeline.js";
3
+ import { getEdlDuration, getSegmentStarts } from "./edl.js";
4
+ /**
5
+ * The HyperFrames composition of a footage film (the same 0.8.85 contract as `composeFilm`): one `<video>` clip per
6
+ * EDL segment over the normalized clip with its media start, the transitions (`fade` cross-fades from the segment
7
+ * before, `zoom` punches in on alternate jump cuts, `whoosh` plays the whoosh sound), a slow zoom on b-roll, the
8
+ * word-by-word captions, the end card over the cut's last frame, the cut speech track and the ducked music.
9
+ */
10
+ const COMPOSITION_ID = "film";
11
+ /** A cross-fade's length; the outgoing segment plays on under the incoming one for this long. */
12
+ export const FADE_SECONDS = 0.35;
13
+ /** The punch-in of a `zoom` cut. */
14
+ const ZOOM_SCALE = 1.12;
15
+ /** How far a b-roll segment zooms over its length. */
16
+ const KEN_BURNS_SCALE = 1.08;
17
+ /** The end card's length after the cut. */
18
+ export const END_CARD_SECONDS = 3;
19
+ const r3 = (value) => Math.round(value * 1000) / 1000 || 0;
20
+ /** The film's length: the cut plus the end card. */
21
+ export function getFootageFilmSeconds(film, edl) {
22
+ return r3(getEdlDuration(edl) + (film.endCard === null ? 0 : END_CARD_SECONDS));
23
+ }
24
+ /** The picture scale each segment starts at: `zoom` cuts alternate between punched in and back out. */
25
+ export function getSegmentScales(edl) {
26
+ const scales = [];
27
+ edl.segments.forEach((segment, index) => {
28
+ const previous = scales[index - 1] ?? 1;
29
+ scales.push(segment.transition === "zoom" && index > 0 ? (previous === 1 ? ZOOM_SCALE : 1) : 1);
30
+ });
31
+ return scales;
32
+ }
33
+ export function composeFootage(input) {
34
+ const { film, edl, words, frame, colors: c, fonts, assets, caption: captionBox } = input;
35
+ const starts = getSegmentStarts(edl);
36
+ const cutEnd = getEdlDuration(edl);
37
+ const end = getFootageFilmSeconds(film, edl);
38
+ const scales = getSegmentScales(edl);
39
+ const segments = edl.segments.map((segment, index) => {
40
+ const src = assets.clips[segment.clip];
41
+ if (src === undefined)
42
+ throw new Error(`The EDL names clip "${segment.clip}", which the film has no file for.`);
43
+ const next = edl.segments[index + 1];
44
+ const tail = next?.transition === "fade" ? FADE_SECONDS : 0;
45
+ const start = starts[index];
46
+ const duration = r3(segment.end - segment.start + tail);
47
+ const scale = scales[index];
48
+ const style = scale === 1 ? "" : ` style="transform:scale(${scale})"`;
49
+ return `<video id="seg${index}" class="clip shot" src="${escapeHtml(src)}" data-start="${start}" data-media-start="${segment.start}" data-duration="${duration}"${style} muted playsinline></video>`;
50
+ });
51
+ const tweens = [];
52
+ edl.segments.forEach((segment, index) => {
53
+ const start = starts[index];
54
+ if (segment.transition === "fade" && index > 0) {
55
+ tweens.push(`tl.fromTo("#seg${index}", { opacity: 0 }, { opacity: 1, duration: ${FADE_SECONDS}, ease: "none", immediateRender: false }, ${start});`);
56
+ }
57
+ if (segment.motion === "kenburns") {
58
+ const from = scales[index];
59
+ tweens.push(`tl.fromTo("#seg${index}", { scale: ${from} }, { scale: ${r3(from * KEN_BURNS_SCALE)}, duration: ${r3(segment.end - segment.start)}, ease: "none", immediateRender: false }, ${start});`);
60
+ }
61
+ });
62
+ // --- Captions ---
63
+ const caption = input.film.captions ? captionChunks(words) : [];
64
+ const captionHtml = caption
65
+ .map((chunk, i) => {
66
+ const next = caption[i + 1];
67
+ const start = r3(chunk.start - 0.05);
68
+ const stop = Math.min(chunk.end + 0.35, next === undefined ? cutEnd : next.start - 0.06);
69
+ const spans = chunk.words.map((w, j) => `<span id="cw${i}_${j}">${escapeHtml(w.text)}</span>`).join(" ");
70
+ return `<div id="cap${i}" class="clip caption" data-start="${start}" data-duration="${r3(Math.max(0.1, stop - start))}"><p class="pill">${spans}</p></div>`;
71
+ })
72
+ .join("\n ");
73
+ // --- Sound ---
74
+ const sfx = [];
75
+ const play = (event, t, volume, dur) => {
76
+ const src = assets.sfx[event];
77
+ if (src !== undefined)
78
+ sfx.push({ src, t: r3(Math.max(0, t)), volume, dur });
79
+ };
80
+ edl.segments.forEach((segment, index) => {
81
+ if (segment.transition === "whoosh" && index > 0)
82
+ play("whoosh", starts[index] - 0.1, 0.45, 0.57);
83
+ });
84
+ if (film.endCard !== null) {
85
+ play("whoosh", cutEnd, 0.3, 0.57);
86
+ play("pop", r3(cutEnd + 0.9), 0.35, 0.72);
87
+ }
88
+ const audio = [
89
+ `<audio id="speech" src="${escapeHtml(assets.speech)}" data-start="0" data-duration="${cutEnd}" data-volume="1"></audio>`,
90
+ ...(assets.music === null ? [] : [`<audio id="music" src="${escapeHtml(assets.music)}" data-start="0" data-duration="${end}" data-volume="1"></audio>`]),
91
+ ...sfx.map((s, i) => `<audio id="sfx${i}" src="${escapeHtml(s.src)}" data-start="${s.t}" data-duration="${s.dur}" data-volume="${s.volume}"></audio>`),
92
+ ].join("\n ");
93
+ const tail = r3(end - cutEnd);
94
+ const endCard = film.endCard;
95
+ const endCardHtml = endCard === null
96
+ ? ""
97
+ : `<img id="last" class="clip shot" src="${escapeHtml(assets.lastFrame)}" data-start="${cutEnd}" data-duration="${tail}" />
98
+ <div class="shade" id="shade"></div>
99
+ <div class="endcard">
100
+ <div class="brand" id="ec-brand">${assets.logo === null ? "" : `<img class="logo" src="${escapeHtml(assets.logo)}" alt="" />`}<span>${escapeHtml(input.brandName)}</span></div>
101
+ <p class="headline" id="ec-headline">${escapeHtml(endCard.headline)}</p>
102
+ <p class="url" id="ec-url">${escapeHtml(endCard.url)}</p>
103
+ ${endCard.note.length > 0 ? `<p class="note" id="ec-note">${escapeHtml(endCard.note)}</p>` : ""}
104
+ </div>`;
105
+ const endCardTweens = endCard === null
106
+ ? []
107
+ : [
108
+ `tl.fromTo("#shade", { opacity: 0 }, { opacity: 0.82, duration: 0.45, ease: "power2.out" }, ${cutEnd});`,
109
+ `tl.fromTo("#ec-brand", { y: 30, opacity: 0 }, { y: 0, opacity: 1, duration: 0.5, ease: "power3.out" }, ${r3(cutEnd + 0.3)});`,
110
+ `tl.fromTo("#ec-headline", { y: 40, opacity: 0 }, { y: 0, opacity: 1, duration: 0.6, ease: "power3.out" }, ${r3(cutEnd + 0.45)});`,
111
+ `tl.fromTo("#ec-url", { y: 30, opacity: 0, scale: 0.94 }, { y: 0, opacity: 1, scale: 1, duration: 0.55, ease: "power3.out" }, ${r3(cutEnd + 0.9)});`,
112
+ ...(endCard.note.length > 0 ? [`tl.fromTo("#ec-note", { opacity: 0 }, { opacity: 1, duration: 0.5, ease: "power2.out" }, ${r3(cutEnd + 1.3)});`] : []),
113
+ ];
114
+ const bodyFont = fontStack(fonts.body, "sans-serif");
115
+ const headingFont = fonts.heading === null ? bodyFont : fontStack(fonts.heading, "sans-serif");
116
+ const faces = [...fontFaces(fonts.body), ...fontFaces(fonts.heading)];
117
+ return `<!doctype html>
118
+ <html lang="${escapeHtml(input.locale)}">
119
+ <head>
120
+ <meta charset="UTF-8" />
121
+ <meta name="viewport" content="width=${frame.width}, height=${frame.height}" />
122
+ <title>${escapeHtml(film.title)}</title>
123
+ <script src="assets/gsap.min.js"></script>
124
+ <style>
125
+ ${faces.join("\n")}
126
+ *{margin:0;padding:0;box-sizing:border-box}
127
+ html,body{width:${frame.width}px;height:${frame.height}px;overflow:hidden;background:#000}
128
+ #root{position:relative;width:${frame.width}px;height:${frame.height}px;overflow:hidden;background:#000;font-family:${bodyFont};color:${c.foreground}}
129
+ .shot{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transform-origin:50% 42%}
130
+ .shade{position:absolute;inset:0;background:${c.background};opacity:0}
131
+ .caption{position:absolute;left:${captionBox.left}px;right:${captionBox.right}px;top:${captionBox.top}px;display:flex;justify-content:center}
132
+ .pill{font-weight:650;font-size:${captionBox.fontSize}px;line-height:1.18;letter-spacing:-.01em;text-align:center;padding:16px 28px;border-radius:22px;background:${c.captionBackground};box-shadow:0 14px 44px rgba(0,0,0,.5);color:${c.captionText}}
133
+ .pill span{display:inline-block}
134
+ .endcard{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:0 80px;text-align:center}
135
+ .brand{display:flex;justify-content:center;align-items:center;gap:18px;font-family:${headingFont};font-size:46px}
136
+ .logo{height:60px;width:auto}
137
+ .headline{font-family:${headingFont};font-weight:500;font-size:${input.headlineSize}px;letter-spacing:-.025em;line-height:1.02;margin-top:44px}
138
+ .url{display:inline-block;margin-top:40px;padding:20px 38px;border-radius:999px;font-size:44px;font-weight:600;color:${c.onCta};background:${c.cta}}
139
+ .note{margin-top:26px;font-size:30px;color:${c.muted}}
140
+ </style>
141
+ </head>
142
+ <body>
143
+ <div id="root" data-composition-id="${COMPOSITION_ID}" data-start="0" data-duration="${end}" data-width="${frame.width}" data-height="${frame.height}">
144
+ ${segments.join("\n ")}
145
+ ${endCardHtml}
146
+ ${captionHtml}
147
+ ${audio}
148
+ </div>
149
+ <script>
150
+ const tl = gsap.timeline({ paused: true });
151
+ ${tweens.join("\n")}
152
+ const captions = ${JSON.stringify(caption.map((chunk) => chunk.words.map((w) => w.start)))};
153
+ captions.forEach((words, i) => {
154
+ 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));
155
+ 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));
156
+ });
157
+ ${endCardTweens.join("\n")}
158
+ tl.set({}, {}, ${end});
159
+ window.__timelines = window.__timelines || {};
160
+ window.__timelines["${COMPOSITION_ID}"] = tl;
161
+ </script>
162
+ </body>
163
+ </html>
164
+ `;
165
+ }
166
+ //# sourceMappingURL=compose.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compose.js","sourceRoot":"","sources":["../../src/footage/compose.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAsB,MAAM,wBAAwB,CAAC;AAE3E,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAY,MAAM,UAAU,CAAC;AAGtE;;;;;GAKG;AAEH,MAAM,cAAc,GAAG,MAAM,CAAC;AAC9B,iGAAiG;AACjG,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC;AACjC,oCAAoC;AACpC,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,sDAAsD;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