@softure-ai/marketing-kit 0.34.0 → 0.35.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 (88) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/NOTICE +6 -0
  3. package/README.md +26 -0
  4. package/dist/config/schema.d.ts +8 -0
  5. package/dist/config/schema.d.ts.map +1 -1
  6. package/dist/config/schema.js +1 -1
  7. package/dist/config/schema.js.map +1 -1
  8. package/dist/footage/compose.d.ts +2 -1
  9. package/dist/footage/compose.d.ts.map +1 -1
  10. package/dist/footage/compose.js +16 -3
  11. package/dist/footage/compose.js.map +1 -1
  12. package/dist/footage/draft-overlays.d.ts +6 -0
  13. package/dist/footage/draft-overlays.d.ts.map +1 -1
  14. package/dist/footage/draft-overlays.js +188 -4
  15. package/dist/footage/draft-overlays.js.map +1 -1
  16. package/dist/footage/draft.d.ts +11 -0
  17. package/dist/footage/draft.d.ts.map +1 -1
  18. package/dist/footage/draft.js +45 -3
  19. package/dist/footage/draft.js.map +1 -1
  20. package/dist/footage/drawn-transitions.d.ts +63 -0
  21. package/dist/footage/drawn-transitions.d.ts.map +1 -0
  22. package/dist/footage/drawn-transitions.js +177 -0
  23. package/dist/footage/drawn-transitions.js.map +1 -0
  24. package/dist/footage/edl.d.ts +16 -0
  25. package/dist/footage/edl.d.ts.map +1 -1
  26. package/dist/footage/edl.js +24 -1
  27. package/dist/footage/edl.js.map +1 -1
  28. package/dist/footage/film.d.ts +4 -3
  29. package/dist/footage/film.d.ts.map +1 -1
  30. package/dist/footage/film.js +3 -2
  31. package/dist/footage/film.js.map +1 -1
  32. package/dist/footage/hand-font.d.ts +16 -0
  33. package/dist/footage/hand-font.d.ts.map +1 -0
  34. package/dist/footage/hand-font.js +43 -0
  35. package/dist/footage/hand-font.js.map +1 -0
  36. package/dist/footage/overlay-html.d.ts +1 -0
  37. package/dist/footage/overlay-html.d.ts.map +1 -1
  38. package/dist/footage/overlay-html.js +134 -8
  39. package/dist/footage/overlay-html.js.map +1 -1
  40. package/dist/footage/overlay-motion.d.ts +35 -0
  41. package/dist/footage/overlay-motion.d.ts.map +1 -1
  42. package/dist/footage/overlay-motion.js +45 -0
  43. package/dist/footage/overlay-motion.js.map +1 -1
  44. package/dist/footage/overlay-schema.d.ts +48 -6
  45. package/dist/footage/overlay-schema.d.ts.map +1 -1
  46. package/dist/footage/overlay-schema.js +71 -18
  47. package/dist/footage/overlay-schema.js.map +1 -1
  48. package/dist/footage/overlays.d.ts +125 -1
  49. package/dist/footage/overlays.d.ts.map +1 -1
  50. package/dist/footage/overlays.js +260 -8
  51. package/dist/footage/overlays.js.map +1 -1
  52. package/dist/footage/picture.d.ts +5 -2
  53. package/dist/footage/picture.d.ts.map +1 -1
  54. package/dist/footage/picture.js +30 -8
  55. package/dist/footage/picture.js.map +1 -1
  56. package/dist/footage/pipeline.d.ts.map +1 -1
  57. package/dist/footage/pipeline.js +7 -1
  58. package/dist/footage/pipeline.js.map +1 -1
  59. package/dist/footage/tools.d.ts +1 -1
  60. package/dist/footage/tools.d.ts.map +1 -1
  61. package/dist/footage/tools.js +1 -1
  62. package/dist/footage/tools.js.map +1 -1
  63. package/dist/index.d.ts +5 -3
  64. package/dist/index.d.ts.map +1 -1
  65. package/dist/index.js +5 -3
  66. package/dist/index.js.map +1 -1
  67. package/fonts/Caveat-SemiBold-Latin.ttf +0 -0
  68. package/fonts/LICENSE-Caveat.txt +93 -0
  69. package/fonts/README.md +14 -0
  70. package/package.json +1 -1
  71. package/schema/edl.schema.json +38 -11
  72. package/schema/marketing.schema.json +10 -2
  73. package/src/config/schema.ts +1 -1
  74. package/src/footage/compose.ts +14 -3
  75. package/src/footage/draft-overlays.ts +217 -2
  76. package/src/footage/draft.ts +54 -3
  77. package/src/footage/drawn-transitions.ts +214 -0
  78. package/src/footage/edl.ts +21 -1
  79. package/src/footage/film.ts +3 -2
  80. package/src/footage/hand-font.ts +47 -0
  81. package/src/footage/overlay-html.ts +141 -7
  82. package/src/footage/overlay-motion.ts +49 -0
  83. package/src/footage/overlay-schema.ts +78 -19
  84. package/src/footage/overlays.ts +306 -10
  85. package/src/footage/picture.ts +35 -10
  86. package/src/footage/pipeline.ts +7 -1
  87. package/src/footage/tools.ts +1 -1
  88. package/src/index.ts +32 -0
@@ -15,6 +15,7 @@ import {
15
15
  type OverlayExit,
16
16
  type OverlayKind,
17
17
  type OverlayListLayout,
18
+ type OverlayNoteStyle,
18
19
  type OverlayPosition,
19
20
  type OverlaySide,
20
21
  type OverlaySize,
@@ -22,8 +23,9 @@ import {
22
23
  import { isCameraMoving, isSameCamera } from "./camera.js";
23
24
  import { getSegmentZoomEases } from "./compose.js";
24
25
  import { normalizeWord } from "./words.js";
25
- import { getListItemStarts } from "./overlay-motion.js";
26
+ import { NOTE_FIRST_WORD_LEAD, NOTE_TICK_DELAY, getListItemStarts } from "./overlay-motion.js";
26
27
  import { STYLE_PADDING_SCALES, type BrandStyle, type CornerRadius } from "./brand-style.js";
28
+ import { measureHandText } from "./hand-font.js";
27
29
 
28
30
  /**
29
31
  * An EDL's overlays resolved for the render and the draft (issue #1200): each one's film time (from its word through
@@ -50,7 +52,29 @@ export const OVERLAY_FONT_SIZES: Record<TextOverlayKind, Record<OverlaySize, num
50
52
  place_card: { s: 70, m: 92, l: 118 },
51
53
  counter: { s: 84, m: 108, l: 132 },
52
54
  date_stamp: { s: 30, m: 36, l: 44 },
55
+ note: { s: 46, m: 56, l: 68 },
56
+ end_word: { s: 120, m: 150, l: 180 },
53
57
  };
58
+ /** A note strip's type size (its capitals), in px of a 1080 px wide frame; a note card's is `OVERLAY_FONT_SIZES.note`. */
59
+ export const NOTE_STRIP_FONT_SIZES: Record<OverlaySize, number> = { s: 38, m: 46, l: 54 };
60
+ /** A note's line height, and its padding round the text, in font sizes. */
61
+ export const NOTE_LINE_HEIGHT = 1.2;
62
+ export const NOTE_PADDING_EM = { x: 0.55, y: 0.4 } as const;
63
+ /** How deep a note's torn edge cuts into the paper, in font sizes (the card's foot, the strip's top). */
64
+ export const NOTE_TEAR_EM = 0.22;
65
+ /** The points along a note's torn edge. */
66
+ export const NOTE_TEAR_POINTS = 14;
67
+ /** A note's tick: its size and its gap after the last line, in font sizes. */
68
+ export const NOTE_TICK_EM = { size: 0.9, gap: 0.3 } as const;
69
+ /** The most words a line of a note card takes, and the most lines a note takes. */
70
+ export const MAX_NOTE_LINE_WORDS = 6;
71
+ export const MAX_NOTE_LINES = 4;
72
+ /** The share of the safe zone's width a note may take: a small card beside the subject, not a banner. */
73
+ export const NOTE_WIDTH_SHARE = 0.62;
74
+ /** A note's tilt in degrees, counter-clockwise positive as ASS turns (a note on the left leans back, on the right forward). */
75
+ export const NOTE_TILT = { card: 3, strip: 2 } as const;
76
+ /** A note's paper and ink without its own colours: an off-white paper and near-black ink, a green tick. */
77
+ export const NOTE_COLORS = { paper: "#fbf8f1", ink: "#1d1f24", tick: "#2f9e4f" } as const;
54
78
  /** A second line's type size in main font sizes: the hook title's place label, the subtitle, the unit, the stamp's place. */
55
79
  export const OVERLAY_SECONDARY_SCALE = { hook_title: 0.55, place_card: 0.55, counter: 0.5, date_stamp: 0.78 } as const;
56
80
  /** A place card's subtitle size in title sizes, by its `subtitle_size` (RV-131 of an adopting app: 0.42 read tiny). */
@@ -98,6 +122,9 @@ export const OVERLAY_FONT_ROLES: Record<TextOverlayKind, OverlayFontRole> = {
98
122
  list: "interface",
99
123
  search_bar: "interface",
100
124
  date_stamp: "interface",
125
+ // A note strip types in the heading font; a note card and an end word are handwritten (the kit's own `HAND_FONT`).
126
+ note: "heading",
127
+ end_word: "heading",
101
128
  };
102
129
 
103
130
  /** A box in the film's frame, in px. */
@@ -157,6 +184,8 @@ export type ResolvedOverlay =
157
184
  underline?: boolean;
158
185
  /** Its card sits in the middle of `box`, its text centred (`style.align` center); absent: on its side. */
159
186
  isCentred?: boolean;
187
+ /** Its text on a tight box (`style.backdrop` highlight); absent: the card. */
188
+ backdrop?: "highlight";
160
189
  })
161
190
  | (Drawn & { kind: "lower_third"; text: string; fontSize: number; side: OverlaySide; box: OverlayBox })
162
191
  | (Drawn & {
@@ -173,7 +202,17 @@ export type ResolvedOverlay =
173
202
  })
174
203
  | (Drawn & { kind: "arrow"; from: OverlayPoint; to: OverlayPoint })
175
204
  | (Drawn & { kind: "highlight"; rect: OverlayBox })
176
- | (Drawn & { kind: "hook_title"; lines: string[]; place: string | null; fontSize: number; placeFontSize: number; align?: OverlayAlign; box: OverlayBox })
205
+ | (Drawn & {
206
+ kind: "hook_title";
207
+ lines: string[];
208
+ place: string | null;
209
+ fontSize: number;
210
+ placeFontSize: number;
211
+ align?: OverlayAlign;
212
+ box: OverlayBox;
213
+ /** Each line on its own tight box (`style.backdrop` highlight); absent: the card. */
214
+ backdrop?: "highlight";
215
+ })
177
216
  | (Drawn & { kind: "search_bar"; text: string; fontSize: number; box: OverlayBox })
178
217
  | (Drawn & {
179
218
  kind: "place_card";
@@ -189,7 +228,27 @@ export type ResolvedOverlay =
189
228
  subtitleDelay?: number;
190
229
  })
191
230
  | (Drawn & { kind: "counter"; value: number; from: number; decimals: number; unit: string | null; fontSize: number; unitFontSize: number; box: OverlayBox })
192
- | (Drawn & { kind: "date_stamp"; text: string; place: string | null; fontSize: number; placeFontSize: number; side: OverlaySide; box: OverlayBox });
231
+ | (Drawn & { kind: "date_stamp"; text: string; place: string | null; fontSize: number; placeFontSize: number; side: OverlaySide; box: OverlayBox })
232
+ | (Drawn & {
233
+ kind: "note";
234
+ noteStyle: OverlayNoteStyle;
235
+ /** Its lines as drawn (a strip's in capitals). */
236
+ lines: string[];
237
+ fontSize: number;
238
+ side: OverlaySide;
239
+ /** Its paper, unturned; it is drawn turned by `tilt` degrees about its middle. */
240
+ box: OverlayBox;
241
+ tilt: number;
242
+ /** The torn edge's depth at each of `NOTE_TEAR_POINTS` points, 0 to 1 of `NOTE_TEAR_EM`. */
243
+ tear: number[];
244
+ /** The film second each word comes in at, in reading order (a card's words as they are said); null: a strip, typed. */
245
+ wordTimes: number[] | null;
246
+ /** Whether a hand tick is drawn after its last word (`style.tick`). */
247
+ tick: boolean;
248
+ /** The film second its tick starts being drawn; null without one. */
249
+ tickAt: number | null;
250
+ })
251
+ | (Drawn & { kind: "end_word"; text: string; fontSize: number; box: OverlayBox });
193
252
 
194
253
  export type ResolvedOverlaysResult = { ok: true; overlays: ResolvedOverlay[] } | { ok: false; problems: string[] };
195
254
 
@@ -264,6 +323,22 @@ export function estimateTextWidth(text: string, fontSize: number): number {
264
323
  return Math.ceil([...text].length * OVERLAY_CHAR_EM * fontSize - 1e-6);
265
324
  }
266
325
 
326
+ /** A line's width at a font size, in px. */
327
+ export type TextMeasure = (text: string, fontSize: number) => number;
328
+
329
+ /** How a note's line is measured: a card's handwriting from the hand font itself, a strip's capitals by their own wider average. */
330
+ export function getNoteMeasure(noteStyle: OverlayNoteStyle): TextMeasure {
331
+ return noteStyle === "card" ? measureHandText : measureStripText;
332
+ }
333
+
334
+ /** A strip's capitals per character, in font sizes: bold capitals run about 0.72 em, plus the strip's letter spacing. */
335
+ export const NOTE_STRIP_CHAR_EM = 0.76;
336
+
337
+ /** How wide a strip's capitals are at `fontSize`: wider than `estimateTextWidth`'s mixed-case average. */
338
+ function measureStripText(text: string, fontSize: number): number {
339
+ return Math.ceil([...text].length * NOTE_STRIP_CHAR_EM * fontSize - 1e-6);
340
+ }
341
+
267
342
  /** Text broken into lines at spaces so each fits `width` at `fontSize` by the estimate; a word longer than a line stands alone. */
268
343
  export function wrapOverlayText(text: string, fontSize: number, width: number): string[] {
269
344
  const lines: string[] = [];
@@ -443,7 +518,7 @@ export function resolveEdlOverlays(input: ResolveOverlaysInput): ResolvedOverlay
443
518
  const segment = findSegmentAt(edl, start);
444
519
  const segmentStart = starts[segment] as number;
445
520
  const segmentId = edl.segments[segment]?.id ?? "";
446
- if (overlay.kind !== "hook_title") {
521
+ if (!isTitleBand(overlay.kind)) {
447
522
  const shot = findShotSpan(edl, starts, { segment, end, isPunchIn: overlay.kind === "punch_in" });
448
523
  if (end > shot.end + 0.01) {
449
524
  const inside = shot.last === segment ? `segment "${segmentId}"` : `segments "${segmentId}" to "${edl.segments[shot.last]?.id ?? ""}"`;
@@ -468,6 +543,11 @@ export function resolveEdlOverlays(input: ResolveOverlaysInput): ResolvedOverlay
468
543
  // The first point comes in with the card, so the card never stands empty (RV-144 of an adopting app).
469
544
  placed.overlay.itemStarts = getListItemStarts({ start, end, count: placed.overlay.items.length, ...(times === undefined ? {} : { words: times }) }).map((at, item) => (item === 0 ? start : at));
470
545
  }
546
+ if (placed.overlay.kind === "note") {
547
+ const timed = timeNote(placed.overlay, input.words);
548
+ placed.overlay.wordTimes = timed.wordTimes;
549
+ placed.overlay.tickAt = timed.tickAt;
550
+ }
471
551
  if (placed.overlay.kind === "punch_in") {
472
552
  if (edl.segments[segment]?.motion === "kenburns") {
473
553
  problems.push(`${at}: segment "${segmentId}" has a Ken Burns zoom, which owns the picture's scale; put the punch-in on a still segment`);
@@ -490,6 +570,11 @@ export function resolveEdlOverlays(input: ResolveOverlaysInput): ResolvedOverlay
490
570
  return problems.length > 0 ? { ok: false, problems } : { ok: true, overlays: ordered };
491
571
  }
492
572
 
573
+ /** The kinds that live in the top band (a hook title, an end word): not counted against one overlay at a time. */
574
+ export function isTitleBand(kind: OverlayKind): boolean {
575
+ return kind === "hook_title" || kind === "end_word";
576
+ }
577
+
493
578
  /** Whether two overlays are on screen at the same time. */
494
579
  function isConcurrent(a: ResolvedOverlay, b: ResolvedOverlay): boolean {
495
580
  return a.start < b.end - 0.001 && b.start < a.end - 0.001;
@@ -498,7 +583,7 @@ function isConcurrent(a: ResolvedOverlay, b: ResolvedOverlay): boolean {
498
583
  /** Two overlays on screen at once, two too close, two hook titles at once, or a drawing on a hook title while it shows. */
499
584
  function findTimingProblems(ordered: readonly ResolvedOverlay[], spacing: number): string[] {
500
585
  const problems: string[] = [];
501
- const counted = ordered.filter((overlay) => overlay.kind !== "hook_title");
586
+ const counted = ordered.filter((overlay) => !isTitleBand(overlay.kind));
502
587
  counted.forEach((overlay, place) => {
503
588
  const previous = counted[place - 1];
504
589
  if (previous === undefined) return;
@@ -508,17 +593,18 @@ function findTimingProblems(ordered: readonly ResolvedOverlay[], spacing: number
508
593
  problems.push(`overlays[${overlay.index}]: starts ${r1(overlay.start - previous.start)} s after overlays[${previous.index}]; the film keeps overlays ${spacing} s apart (overlayMinSpacing)`);
509
594
  }
510
595
  });
511
- const titles = ordered.filter((overlay) => overlay.kind === "hook_title");
596
+ const titles = ordered.filter((overlay): overlay is Extract<ResolvedOverlay, { kind: "hook_title" | "end_word" }> => isTitleBand(overlay.kind));
512
597
  titles.forEach((title, place) => {
598
+ const name = title.kind.replace("_", " ");
513
599
  const previous = titles[place - 1];
514
600
  if (previous !== undefined && isConcurrent(title, previous)) {
515
- problems.push(`overlays[${title.index}]: starts at ${title.start} s while the hook title overlays[${previous.index}] is on screen (until ${previous.end} s); one hook title at a time`);
601
+ problems.push(`overlays[${title.index}]: starts at ${title.start} s while the ${previous.kind.replace("_", " ")} overlays[${previous.index}] is on screen (until ${previous.end} s); one title at the top at a time`);
516
602
  }
517
603
  const titleBox = title.box;
518
604
  for (const other of counted) {
519
605
  const bounds = getOverlayBounds(other);
520
606
  if (bounds === null || !isConcurrent(title, other) || !isOverlapping(bounds, titleBox)) continue;
521
- problems.push(`overlays[${other.index}]: the ${other.kind.replace("_", " ")} would sit on the hook title overlays[${title.index}] (on screen until ${title.end} s); move it lower or start it after the title`);
607
+ problems.push(`overlays[${other.index}]: the ${other.kind.replace("_", " ")} would sit on the ${name} overlays[${title.index}] (on screen until ${title.end} s); move it lower or start it after the ${name}`);
522
608
  }
523
609
  });
524
610
  return problems;
@@ -580,9 +666,149 @@ function placeOverlay(overlay: EdlOverlay, base: OverlayBase, place: Placement):
580
666
  const drawn = { ...base, ...getLook(overlay), ...(place.padScale === 1 ? {} : { padScale: place.padScale }) };
581
667
  if (overlay.kind === "arrow" || overlay.kind === "highlight") return placeMark(overlay, drawn, place);
582
668
  if (overlay.kind === "keyword" || overlay.kind === "lower_third" || overlay.kind === "list") return placeSideText({ ...overlay, kind: overlay.kind }, drawn, place);
669
+ if (overlay.kind === "note") return placeNote(overlay, drawn, place);
670
+ if (overlay.kind === "end_word") return placeEndWord(overlay, drawn, place);
583
671
  return placeCard({ ...overlay, kind: overlay.kind }, drawn, place);
584
672
  }
585
673
 
674
+ /** A note's lines: broken at spaces to fit `width`, at most `MAX_NOTE_LINE_WORDS` words a line; null when a word alone is wider. */
675
+ export function wrapNoteText(text: string, fontSize: number, width: number, measure: TextMeasure = estimateTextWidth): string[] | null {
676
+ const lines: string[][] = [];
677
+ for (const word of text.split(/\s+/).filter((part) => part.length > 0)) {
678
+ if (measure(word, fontSize) > width) return null;
679
+ const last = lines[lines.length - 1];
680
+ if (last !== undefined && last.length < MAX_NOTE_LINE_WORDS && measure([...last, word].join(" "), fontSize) <= width) last.push(word);
681
+ else lines.push([word]);
682
+ }
683
+ return lines.map((line) => line.join(" "));
684
+ }
685
+
686
+ /** A number from 0 to 1 for each of `count` points, the same for the same text: a torn edge that is not a pattern. */
687
+ export function getTornEdge(text: string, count = NOTE_TEAR_POINTS): number[] {
688
+ let seed = 2166136261;
689
+ for (const char of text) seed = Math.imul(seed ^ (char.codePointAt(0) ?? 0), 16777619) >>> 0;
690
+ return Array.from({ length: count }, () => {
691
+ seed = (Math.imul(seed, 1664525) + 1013904223) >>> 0;
692
+ return r3(0.25 + 0.75 * (seed / 4294967296));
693
+ });
694
+ }
695
+
696
+ /** A note's tick size and the gap before it, in px. */
697
+ export function getNoteTickSize(fontSize: number): { size: number; gap: number } {
698
+ return { size: Math.round(fontSize * NOTE_TICK_EM.size), gap: Math.round(fontSize * NOTE_TICK_EM.gap) };
699
+ }
700
+
701
+ /** A note's padding round its text, in px. */
702
+ export function getNotePadding(fontSize: number): { x: number; y: number; tear: number } {
703
+ return { x: Math.round(fontSize * NOTE_PADDING_EM.x), y: Math.round(fontSize * NOTE_PADDING_EM.y), tear: Math.round(fontSize * NOTE_TEAR_EM) };
704
+ }
705
+
706
+ /** A note's text block inside its paper: its left edge and top, in px (the tear takes the card's foot, the strip's top). */
707
+ export function getNoteTextBox(note: Pick<Extract<ResolvedOverlay, { kind: "note" }>, "box" | "fontSize" | "noteStyle" | "lines">): OverlayBox {
708
+ const pad = getNotePadding(note.fontSize);
709
+ const top = note.box.top + pad.y + (note.noteStyle === "strip" ? pad.tear : 0);
710
+ return { left: note.box.left + pad.x, top, width: note.box.width - 2 * pad.x, height: note.lines.length * note.fontSize * NOTE_LINE_HEIGHT };
711
+ }
712
+
713
+ /**
714
+ * A note: a paper card (handwritten, its words coming in as they are said) or a strip (typed capitals), on its side
715
+ * in the top or the middle of the room above the captions, at most `NOTE_WIDTH_SHARE` of the safe width; a text that
716
+ * takes more than `MAX_NOTE_LINES` lines is refused.
717
+ */
718
+ function placeNote(overlay: EdlOverlay, drawn: Drawn, place: Placement): Placed {
719
+ const { zone, frame } = place;
720
+ const scale = frame.width / 1080;
721
+ const noteStyle = overlay.style?.note_style ?? "card";
722
+ const size = overlay.style?.size ?? "m";
723
+ const fontSize = Math.round((noteStyle === "strip" ? NOTE_STRIP_FONT_SIZES : OVERLAY_FONT_SIZES.note)[size] * scale);
724
+ const pad = getNotePadding(fontSize);
725
+ const margin = Math.round(OVERLAY_MARGIN * scale);
726
+ const room = Math.round((frame.width - zone.left - zone.right - 2 * margin) * NOTE_WIDTH_SHARE) - 2 * pad.x;
727
+ const text = noteStyle === "strip" ? (overlay.text ?? "").toUpperCase() : (overlay.text ?? "");
728
+ const measure = getNoteMeasure(noteStyle);
729
+ const lines = wrapNoteText(text, fontSize, room, measure);
730
+ if (lines === null) return { ok: false, error: "a word of the note is too wide for its card; shorten it or use a smaller size" };
731
+ if (lines.length > MAX_NOTE_LINES) return { ok: false, error: `the note takes ${lines.length} lines, more than ${MAX_NOTE_LINES}; shorten it or use a smaller size` };
732
+ const isTick = overlay.style?.tick === true;
733
+ const tick = getNoteTickSize(fontSize);
734
+ const lastWidth = measure(lines[lines.length - 1] ?? "", fontSize) + (isTick ? tick.gap + tick.size : 0);
735
+ const contentWidth = Math.max(lastWidth, ...lines.map((line) => measure(line, fontSize)));
736
+ if (contentWidth > room) return { ok: false, error: "the note's last line and its tick are too wide for its card; shorten it or leave the tick out" };
737
+ const width = Math.ceil(contentWidth + 2 * pad.x);
738
+ const height = Math.ceil(lines.length * fontSize * NOTE_LINE_HEIGHT + 2 * pad.y + pad.tear);
739
+ const region = getTextRegion(place);
740
+ const top = getPositionTop(region, overlay.style?.position ?? "top", height);
741
+ if (top < region.top || top + height > region.bottom) {
742
+ return { ok: false, error: `the note (${height} px tall) does not fit between the platform safe zone and the captions; use a smaller size or shorter text` };
743
+ }
744
+ const side = overlay.style?.side ?? "left";
745
+ const left = side === "right" ? frame.width - zone.right - margin - width : zone.left + margin;
746
+ const tilt = (side === "right" ? -1 : 1) * NOTE_TILT[noteStyle];
747
+ return {
748
+ ok: true,
749
+ overlay: { ...drawn, kind: "note", noteStyle, lines, fontSize, side, box: { left, top, width, height }, tilt, tear: getTornEdge(text), wordTimes: null, tick: isTick, tickAt: null },
750
+ };
751
+ }
752
+
753
+ /**
754
+ * A note card's word times and its tick's start: each word of the note comes in on the same word said inside its span
755
+ * (matched in order, compared like fillers are), a word not said with the one before it; when none is said, the words
756
+ * are spaced over the first part of the span. The card is there one frame before its first word, and no word comes
757
+ * later than 0.6 s before its end. A strip types its text (`getTypingTimes`), its tick after its last letter.
758
+ */
759
+ export function timeNote(note: Extract<ResolvedOverlay, { kind: "note" }>, words: readonly TimedWord[]): { wordTimes: number[] | null; tickAt: number | null } {
760
+ // The tick comes after the last word, but never in the note's last 0.4 s nor before it starts.
761
+ const tickAfter = (at: number): number | null => (note.tick ? r3(Math.max(note.start, Math.min(note.end - 0.4, at + NOTE_TICK_DELAY))) : null);
762
+ const noteWords = note.lines.join(" ").split(" ");
763
+ const first = r3(note.start + NOTE_FIRST_WORD_LEAD);
764
+ const latest = r3(Math.max(first, note.end - 0.6));
765
+ if (note.noteStyle === "strip") {
766
+ const typed = note.typing ?? DEFAULT_OVERLAY_TYPING_SPEED;
767
+ const lastLetter = note.start + 0.3 + ([...note.lines.join("")].length - 1) / typed;
768
+ return { wordTimes: null, tickAt: tickAfter(lastLetter) };
769
+ }
770
+ const said = words.filter((word) => word.start >= note.start - 0.05 && word.start < note.end);
771
+ let cursor = 0;
772
+ let previous: number | null = null;
773
+ const matched = noteWords.map((word) => {
774
+ const key = normalizeWord(word);
775
+ const found = said.findIndex((spoken, index) => index >= cursor && normalizeWord(spoken.text) === key);
776
+ if (found === -1) return previous;
777
+ cursor = found + 1;
778
+ previous = said[found]?.start ?? null;
779
+ return previous;
780
+ });
781
+ const isSaid = matched.some((time) => time !== null);
782
+ const gap = Math.min(0.35, Math.max(0.12, ((note.end - note.start) * 0.5) / noteWords.length));
783
+ const times = noteWords.map((_word, index) => {
784
+ const at = isSaid ? (matched[index] ?? first) : first + index * gap;
785
+ return r3(Math.min(latest, Math.max(first, at)));
786
+ });
787
+ // Never earlier than the word before: a later word matched before an earlier one keeps the reading order.
788
+ for (let index = 1; index < times.length; index++) times[index] = Math.max(times[index] as number, times[index - 1] as number);
789
+ return { wordTimes: times, tickAt: tickAfter(times[times.length - 1] ?? first) };
790
+ }
791
+
792
+ /** An end word: one big handwritten line at the top of the room, no card, shrunk to fit the width or refused. */
793
+ function placeEndWord(overlay: EdlOverlay, drawn: Drawn, place: Placement): Placed {
794
+ const { zone, frame } = place;
795
+ const scale = frame.width / 1080;
796
+ const margin = Math.round(OVERLAY_MARGIN * scale);
797
+ const room = frame.width - zone.left - zone.right - 2 * margin;
798
+ const text = (overlay.text ?? "").replace(/\s+/g, " ").trim();
799
+ let fontSize = Math.round(OVERLAY_FONT_SIZES.end_word[overlay.style?.size ?? "m"] * scale);
800
+ for (let shrink = 0; measureHandText(text, fontSize) > room; shrink++) {
801
+ if (shrink === MAX_TITLE_SHRINKS) return { ok: false, error: "the end word is too wide for one line even at a smaller size; shorten it or use a smaller size" };
802
+ fontSize = Math.round(fontSize * OVERLAY_TITLE_SHRINK);
803
+ }
804
+ const width = measureHandText(text, fontSize);
805
+ const height = Math.ceil(fontSize * OVERLAY_LINE_HEIGHT);
806
+ const region = getTextRegion(place);
807
+ if (region.top + height > region.bottom) return { ok: false, error: `the end word (${height} px tall) does not fit above the captions; use a smaller size` };
808
+ const left = Math.round(zone.left + margin + (room - width) / 2);
809
+ return { ok: true, overlay: { ...drawn, kind: "end_word", text, fontSize, box: { left, top: region.top, width, height } } };
810
+ }
811
+
586
812
  /** An arrow's tail and point, or a highlight's rectangle. */
587
813
  function placeMark(overlay: EdlOverlay, drawn: Drawn, place: Placement): Placed {
588
814
  const { zone, frame } = place;
@@ -643,7 +869,14 @@ function placeSideText(overlay: EdlOverlay & { kind: "keyword" | "lower_third" |
643
869
  if (overlay.kind === "lower_third") return { ok: true, overlay: { ...drawn, kind: "lower_third", ...fields } };
644
870
  return {
645
871
  ok: true,
646
- overlay: { ...drawn, kind: "keyword", ...fields, ...(overlay.style?.underline === true ? { underline: true } : {}), ...(align === "center" ? { isCentred: true } : {}) },
872
+ overlay: {
873
+ ...drawn,
874
+ kind: "keyword",
875
+ ...fields,
876
+ ...(overlay.style?.underline === true ? { underline: true } : {}),
877
+ ...(align === "center" ? { isCentred: true } : {}),
878
+ ...(overlay.style?.backdrop === "highlight" ? { backdrop: "highlight" as const } : {}),
879
+ },
647
880
  };
648
881
  }
649
882
 
@@ -821,7 +1054,7 @@ function measureTitle(overlay: EdlOverlay & { kind: "hook_title" | "place_card"
821
1054
  content: {
822
1055
  ...getTitleContentSize({ kind: overlay.kind, lines, fontSize, second, secondSize, pin: pin !== undefined }),
823
1056
  fields: isHook
824
- ? { kind: "hook_title", lines, place: second, fontSize, placeFontSize: secondSize, align }
1057
+ ? { kind: "hook_title", lines, place: second, fontSize, placeFontSize: secondSize, align, ...(overlay.style?.backdrop === "highlight" ? { backdrop: "highlight" } : {}) }
825
1058
  : { kind: "place_card", lines, subtitle: second, fontSize, subtitleFontSize: secondSize, align, ...(pin === undefined ? {} : { pin }), ...(delay === undefined ? {} : { subtitleDelay: delay }) },
826
1059
  },
827
1060
  };
@@ -918,6 +1151,9 @@ export function getOverlayTextsByRole(overlays: readonly ResolvedOverlay[], loca
918
1151
  texts.heading.push(formatOverlayNumber(overlay.value, overlay.decimals, locale), "0123456789", ...(overlay.unit === null ? [] : [overlay.unit]));
919
1152
  } else if (overlay.kind === "date_stamp") {
920
1153
  texts.interface.push(overlay.text, ...(overlay.place === null ? [] : [overlay.place]));
1154
+ } else if (overlay.kind === "note" && overlay.noteStyle === "strip") {
1155
+ // A note card and an end word are drawn in the kit's own handwriting, which covers every Latin letter.
1156
+ texts.heading.push(...overlay.lines);
921
1157
  }
922
1158
  }
923
1159
  return texts;
@@ -928,3 +1164,63 @@ export function getOverlayTexts(overlays: readonly ResolvedOverlay[], locale = "
928
1164
  const texts = getOverlayTextsByRole(overlays, locale);
929
1165
  return [...texts.heading, ...texts.interface];
930
1166
  }
1167
+
1168
+ type NoteOverlay = Extract<ResolvedOverlay, { kind: "note" }>;
1169
+
1170
+ /**
1171
+ * A note's paper as a polygon in px of the frame, before its tilt: straight sides and a torn edge (`tear`) along the
1172
+ * card's foot or the strip's top, cutting at most `NOTE_TEAR_EM` into the paper. Both paths draw this outline.
1173
+ */
1174
+ export function getNotePaperPoints(note: Pick<NoteOverlay, "box" | "fontSize" | "noteStyle" | "tear">): OverlayPoint[] {
1175
+ const { left, top, width, height } = note.box;
1176
+ const depth = getNotePadding(note.fontSize).tear;
1177
+ const last = Math.max(1, note.tear.length - 1);
1178
+ const torn = note.tear.map((share, index) => ({ x: r1(left + (width * index) / last), share }));
1179
+ if (note.noteStyle === "strip") {
1180
+ const edge = torn.map(({ x, share }) => ({ x, y: r1(top + depth * share) }));
1181
+ return [...edge, { x: left + width, y: top + height }, { x: left, y: top + height }];
1182
+ }
1183
+ const edge = torn.map(({ x, share }) => ({ x, y: r1(top + height - depth * share) })).reverse();
1184
+ return [{ x: left, y: top }, { x: left + width, y: top }, ...edge];
1185
+ }
1186
+
1187
+ /** The middle of a note's paper: the point its tilt turns it about. */
1188
+ export function getNoteCentre(note: Pick<NoteOverlay, "box">): OverlayPoint {
1189
+ return { x: r1(note.box.left + note.box.width / 2), y: r1(note.box.top + note.box.height / 2) };
1190
+ }
1191
+
1192
+ /** A note's tick as three points of a hand-drawn check (down to the left, then a long stroke up), in px before the tilt. */
1193
+ export function getNoteTickPoints(note: Pick<NoteOverlay, "box" | "fontSize" | "noteStyle" | "lines">): OverlayPoint[] {
1194
+ const text = getNoteTextBox(note);
1195
+ const tick = getNoteTickSize(note.fontSize);
1196
+ const lastTop = text.top + (note.lines.length - 1) * note.fontSize * NOTE_LINE_HEIGHT;
1197
+ const x = text.left + getNoteMeasure(note.noteStyle)(note.lines[note.lines.length - 1] ?? "", note.fontSize) + tick.gap;
1198
+ const y = lastTop + (note.fontSize * NOTE_LINE_HEIGHT - tick.size) / 2;
1199
+ return [
1200
+ { x: r1(x), y: r1(y + tick.size * 0.55) },
1201
+ { x: r1(x + tick.size * 0.35), y: r1(y + tick.size * 0.9) },
1202
+ { x: r1(x + tick.size), y: r1(y + tick.size * 0.08) },
1203
+ ];
1204
+ }
1205
+
1206
+ /** A note's words line by line, each with its film second (a card's `wordTimes`; a strip's are typed, so its start). */
1207
+ export function getNoteWordsByLine(note: Pick<NoteOverlay, "lines" | "wordTimes" | "start">): { text: string; at: number }[][] {
1208
+ let index = 0;
1209
+ return note.lines.map((line) =>
1210
+ line.split(" ").map((text) => {
1211
+ const at = note.wordTimes?.[index] ?? note.start;
1212
+ index += 1;
1213
+ return { text, at };
1214
+ }),
1215
+ );
1216
+ }
1217
+
1218
+ /** A note's paper, ink and tick colours: its own (`style.colors` card, text, accent), else paper, near-black and green. */
1219
+ export function getNoteColors(note: Pick<NoteOverlay, "colors">): { paper: string; ink: string; tick: string } {
1220
+ return { paper: note.colors.card ?? NOTE_COLORS.paper, ink: note.colors.text ?? NOTE_COLORS.ink, tick: note.colors.accent ?? NOTE_COLORS.tick };
1221
+ }
1222
+
1223
+ /** Whether the overlays draw in the kit's handwriting: a note card or an end word. */
1224
+ export function isHandFontNeeded(overlays: readonly ResolvedOverlay[]): boolean {
1225
+ return overlays.some((overlay) => overlay.kind === "end_word" || (overlay.kind === "note" && overlay.noteStyle === "card"));
1226
+ }
@@ -1,5 +1,6 @@
1
1
  import { CAMERA_ORIGIN, getCameraOrigin, type CameraAnchor } from "./camera.js";
2
- import { getSegmentFadeFrames, getSegmentScales } from "./compose.js";
2
+ import { getSegmentScales } from "./compose.js";
3
+ import { buildDrawnTransitionFilters, FRAME_TIMING, getTransitionOverlapFrames, isDrawnTransition, type DrawnTransition } from "./drawn-transitions.js";
3
4
  import { getEdlDuration, getSegmentStarts, type Edl } from "./edl.js";
4
5
  import { getFootageEdit, type FootageFilm } from "./film.js";
5
6
  import { FOOTAGE_FPS, getThreadArgs, type Frame, type NormalizeEncoder } from "./normalize.js";
@@ -12,8 +13,9 @@ import { FOOTAGE_FPS, getThreadArgs, type Frame, type NormalizeEncoder } from ".
12
13
  *
13
14
  * Every piece starts on a film frame and runs to the next segment's frame, so rounding never adds up along the cut.
14
15
  * A cross-fade is drawn into the incoming piece: the outgoing segment's tail, held at the zoom it ends on, dissolves
15
- * into the incoming clip (`xfade`), as the per-segment composition plays it. Zoom cuts and Ken Burns stay tweens on
16
- * the composition's video.
16
+ * into the incoming clip (`xfade`), as the per-segment composition plays it. A drawn transition (`whip`, `card`,
17
+ * `paper`) takes the same tail and blends it with the piece's head (`buildDrawnTransitionFilters`), as the draft does.
18
+ * Zoom cuts and Ken Burns stay tweens on the composition's video.
17
19
  */
18
20
 
19
21
  /** How far a segment marked `kenburns` zooms when the film's `kenBurnsPercent` is 0, as in the composition. */
@@ -24,8 +26,10 @@ const DEFAULT_PICTURE_PRESET = "veryfast";
24
26
  const r3 = (value: number): number => Math.round(value * 1000) / 1000 || 0;
25
27
  const r4 = (value: number): number => Math.round(value * 10000) / 10000 || 0;
26
28
 
27
- /** The outgoing segment's tail under a cross-fade. */
29
+ /** The outgoing segment's tail under a cross-fade or a drawn transition. */
28
30
  export interface PictureFadeTail {
31
+ /** How the tail meets the piece: a drawn transition of exactly `frames`; absent: a dissolve. */
32
+ kind?: DrawnTransition;
29
33
  clip: string;
30
34
  /** Seconds in the clip: where the outgoing segment ends. */
31
35
  start: number;
@@ -44,7 +48,7 @@ export interface PicturePiece {
44
48
  /** The piece's first film frame. */
45
49
  frame: number;
46
50
  frames: number;
47
- /** For a `fade` cut, the outgoing tail the piece dissolves from; null for any other cut. */
51
+ /** For a `fade` cut or a drawn transition, the outgoing tail the piece starts over; null for any other cut. */
48
52
  fade: PictureFadeTail | null;
49
53
  }
50
54
 
@@ -66,9 +70,13 @@ export function planFootagePicture(film: Pick<FootageFilm, "edit">, edl: Edl): P
66
70
  const nextStart = starts[index + 1];
67
71
  const frames = Math.max(1, (nextStart === undefined ? lastFrame : toFrame(nextStart)) - frame);
68
72
  const previous = edl.segments[index - 1];
69
- const fadeFrames = Math.min(frames, getSegmentFadeFrames(edl, index, edit));
73
+ const overlap = index === 0 ? 0 : getTransitionOverlapFrames(segment, edit.fadeFrames);
74
+ const kind = segment.transition === "fade" ? "fade" : isDrawnTransition(segment.transition) ? segment.transition : null;
75
+ // A dissolve fits the piece; a drawn transition has its own frames, and a piece too short for them (the EDL check
76
+ // refuses one) plays a plain cut.
77
+ const fadeFrames = kind === "fade" ? Math.min(frames, overlap) : kind !== null && overlap < frames ? overlap : 0;
70
78
  let fade: PictureFadeTail | null = null;
71
- if (previous !== undefined && fadeFrames > 0) {
79
+ if (previous !== undefined && kind !== null && fadeFrames > 0) {
72
80
  const previousScale = scales[index - 1] as number;
73
81
  // The outgoing segment's Ken Burns tween or camera move ends by its end; its tail holds the zoom it reached.
74
82
  const reached = previous.camera !== undefined ? previous.camera.to : previous.motion === "kenburns" ? r4(previousScale * kenBurnsScale) : previousScale;
@@ -76,7 +84,7 @@ export function planFootagePicture(film: Pick<FootageFilm, "edit">, edl: Edl): P
76
84
  // baked at what is left of its zoom (never below the full frame: a fade into a tighter camera is a hard cut's job).
77
85
  const isCamera = previous.camera !== undefined || segment.camera !== undefined;
78
86
  const scale = isCamera ? r4(Math.max(1, reached / (scales[index] as number))) : reached;
79
- fade = { clip: previous.clip, start: r3(previous.end), frames: fadeFrames, scale, origin: getCameraOrigin(previous.camera) };
87
+ fade = { ...(kind === "fade" ? {} : { kind }), clip: previous.clip, start: r3(previous.end), frames: fadeFrames, scale, origin: getCameraOrigin(previous.camera) };
80
88
  }
81
89
  return { clip: segment.clip, start: r3(segment.start), frame, frames, fade };
82
90
  });
@@ -143,12 +151,12 @@ export function buildPicturePieceArgs(input: PicturePieceArgsInput): string[] {
143
151
  const { fade } = piece;
144
152
  inputs.push(...threads.output, "-ss", String(fade.start), "-t", seconds(fade.frames), "-i", getClip(fade.clip));
145
153
  const tail = [...zoomFilters(fade.scale, input.frame, fade.origin ?? CAMERA_ORIGIN), ...fitStream(fade.frames)];
146
- graph = [
154
+ graph = fade.kind === undefined ? [
147
155
  `[0:v]${fitStream(piece.frames).join(",")}[incoming]`,
148
156
  `[1:v]${tail.join(",")}[outgoing]`,
149
157
  // xfade's output is the outgoing tail plus the incoming piece minus the fade: the piece's own length.
150
158
  `[outgoing][incoming]xfade=transition=fade:duration=${r3(fade.frames / FOOTAGE_FPS)}:offset=0,trim=end_frame=${piece.frames}[picture]`,
151
- ].join(";");
159
+ ].join(";") : buildDrawnPieceGraph({ kind: fade.kind, piece, tail, frame: input.frame });
152
160
  }
153
161
  return [
154
162
  "-v",
@@ -184,6 +192,23 @@ export function buildPicturePieceArgs(input: PicturePieceArgsInput): string[] {
184
192
  ];
185
193
  }
186
194
 
195
+ /**
196
+ * A piece that starts on a drawn transition: its first `frames` blended with the outgoing tail, then the rest of its
197
+ * own frames (the plan gives a drawn transition only to a piece longer than it).
198
+ */
199
+ function buildDrawnPieceGraph(input: { kind: DrawnTransition; piece: PicturePiece; tail: string[]; frame: Frame }): string {
200
+ const { piece } = input;
201
+ const frames = piece.fade?.frames ?? 0;
202
+ return [
203
+ `[0:v]${fitStream(piece.frames).join(",")},split[full1][full2]`,
204
+ `[full1]trim=end_frame=${frames},setpts=PTS-STARTPTS,${FRAME_TIMING}[incoming]`,
205
+ `[full2]trim=start_frame=${frames},setpts=PTS-STARTPTS,${FRAME_TIMING}[rest]`,
206
+ `[1:v]${input.tail.join(",")}[outgoing]`,
207
+ ...buildDrawnTransitionFilters({ kind: input.kind, outgoing: "outgoing", incoming: "incoming", output: "blend", frame: input.frame, prefix: "dt" }),
208
+ `[blend][rest]concat=n=2:v=1:a=0,settb=1/${FOOTAGE_FPS},fps=${FOOTAGE_FPS}[picture]`,
209
+ ].join(";");
210
+ }
211
+
187
212
  /** The concat demuxer's list: one `file` line per piece, quotes escaped as the demuxer reads them. */
188
213
  export function buildPictureList(files: readonly string[]): string {
189
214
  return `${files.map((file) => `file '${file.replace(/'/g, "'\\''")}'`).join("\n")}\n`;
@@ -16,7 +16,8 @@ import { prepareClipSounds, type SpeechPeaks, type SpeechPreGain } from "./clip-
16
16
  import { readCachedTranscript, writeCacheFile, writeTranscript } from "./cache.js";
17
17
  import { composeFootage, getFootageFilmSeconds, getFootageSfxCues } from "./compose.js";
18
18
  import { getCaptionHighlight } from "./caption-highlight.js";
19
- import { getOverlayTextsByRole, resolveEdlOverlays } from "./overlays.js";
19
+ import { getOverlayTextsByRole, isHandFontNeeded, resolveEdlOverlays } from "./overlays.js";
20
+ import { HAND_FONT } from "./hand-font.js";
20
21
  import { findMissingCaptionGlyphs, getCaptionBounds, getFootageCaptionLayout } from "./captions.js";
21
22
  import { err, getProviderFootageFailure, ok, type FootageResult } from "./failure.js";
22
23
  import { findLowDiskProblems, getFreeBytes, getRenderTempDir, type FreeBytesReader } from "./disk.js";
@@ -849,6 +850,11 @@ async function runRenderFootage(
849
850
  if (!prepared.ok) return prepared;
850
851
  const musicAsset = musicFile === null ? null : "assets/music.mp3";
851
852
  const fonts = copyFonts(options.brand.fonts, join(assetsDir, "fonts"));
853
+ // A note card and an end word are handwritten in the kit's own font, copied next to the brand's.
854
+ if (isHandFontNeeded(overlays.overlays)) {
855
+ mkdirSync(dirname(join(buildDir, HAND_FONT.asset)), { recursive: true });
856
+ cpSync(HAND_FONT.file, join(buildDir, HAND_FONT.asset));
857
+ }
852
858
  // The logo card's own logo wins over the brand's; it keeps its extension, so a PNG is drawn as a PNG.
853
859
  const logoSource = (film.endCard?.layout === "logo" ? film.endCard.logo : undefined) ?? options.brand.logo;
854
860
  const logoAsset = logoSource === null ? null : `assets/logo${extname(logoSource).toLowerCase() || ".svg"}`;
@@ -36,7 +36,7 @@ export interface FootageToolsOptions {
36
36
  export const REQUIRED_DECODERS = ["hevc", "h264"] as const;
37
37
  export const REQUIRED_FILTERS = ["zscale", "tonemap", "lut3d"] as const;
38
38
  /** What the fast draft needs on top: libass (with libfreetype) for the captions, `xfade` for fades, `zoompan` for Ken Burns. */
39
- export const DRAFT_FILTERS = ["ass", "xfade", "zoompan"] as const;
39
+ export const DRAFT_FILTERS = ["ass", "xfade", "zoompan", "gblur", "geq", "rotate", "blend", "noise", "interleave", "hstack"] as const;
40
40
 
41
41
  const DRAFT_INSTALL_HINT = "install an ffmpeg built with libass and libfreetype (macOS: brew install ffmpeg, Debian/Ubuntu: apt install ffmpeg)";
42
42
  const INSTALL_HINT = "install an ffmpeg built with libzimg (macOS: brew install ffmpeg, Debian/Ubuntu: apt install ffmpeg)";
package/src/index.ts CHANGED
@@ -102,6 +102,13 @@ export {
102
102
  OVERLAY_PINS,
103
103
  OVERLAY_LIST_LAYOUTS,
104
104
  MAX_OVERLAY_SUBTITLE_DELAY,
105
+ MAX_END_WORD_SECONDS,
106
+ MAX_OVERLAY_END_WORD_LENGTH,
107
+ MAX_OVERLAY_NOTE_LENGTH,
108
+ MIN_END_WORD_SECONDS,
109
+ OVERLAY_BACKDROP_KINDS,
110
+ OVERLAY_BACKDROPS,
111
+ OVERLAY_NOTE_STYLES,
105
112
  OVERLAY_KINDS,
106
113
  OVERLAY_POSITIONS,
107
114
  OVERLAY_POSITIONS_BY_KIND,
@@ -115,7 +122,9 @@ export {
115
122
  type EdlOverlayStyle,
116
123
  type EdlOverlayWord,
117
124
  type OverlayAlign,
125
+ type OverlayBackdrop,
118
126
  type OverlayKeywordAlign,
127
+ type OverlayNoteStyle,
119
128
  type OverlayEasing,
120
129
  type OverlayEntrance,
121
130
  type OverlayExit,
@@ -148,6 +157,7 @@ export {
148
157
  type StyleShadow,
149
158
  } from "./footage/brand-style.js";
150
159
  export { createDraftTextMeasure, wrapDraftLine, type DraftTextMeasure } from "./footage/draft-text-width.js";
160
+ export { HAND_FONT } from "./footage/hand-font.js";
151
161
  export {
152
162
  OVERLAY_FONT_ROLES,
153
163
  OVERLAY_FONT_SIZES,
@@ -172,6 +182,11 @@ export {
172
182
  getOverlaySafeZone,
173
183
  getOverlayTexts,
174
184
  getOverlayTextsByRole,
185
+ getNoteColors,
186
+ isHandFontNeeded,
187
+ isTitleBand,
188
+ timeNote,
189
+ wrapNoteText,
175
190
  resolveEdlOverlays,
176
191
  type OverlayBox,
177
192
  type OverlayFontRole,
@@ -188,6 +203,8 @@ export {
188
203
  getEntranceScaleAt,
189
204
  getExitMotion,
190
205
  getListItemStarts,
206
+ getDropLetterTimes,
207
+ getDropOffsetAt,
191
208
  type OverlayEase,
192
209
  type OverlayEntranceMotion,
193
210
  type OverlayExitMotion,
@@ -559,6 +576,21 @@ export {
559
576
  type CameraEase,
560
577
  type EdlCamera,
561
578
  } from "./footage/camera.js";
579
+ export {
580
+ DRAWN_TRANSITIONS,
581
+ DRAWN_TRANSITION_FRAMES,
582
+ FRAME_TIMING,
583
+ PAPER_FADE_FRAMES,
584
+ STUTTER_FRAMES,
585
+ STUTTER_SCALE,
586
+ WHIP_OUT_FRAMES,
587
+ buildDrawnTransitionFilters,
588
+ getCardFrame,
589
+ getTransitionOverlapFrames,
590
+ isDrawnTransition,
591
+ type DrawnTransition,
592
+ type DrawnTransitionFiltersInput,
593
+ } from "./footage/drawn-transitions.js";
562
594
  export { findRetakes, splitFilmSentences, splitSentences, type RetakeKind, type RetakeSuggestion, type Sentence } from "./footage/sentences.js";
563
595
  export {
564
596
  CAPTION_SAFE_ZONES,