/** * Slide-animation style registry — the single source of truth. * * The named styles drive the Veo F2V *motion prompt* used to animate each slide * (subtle ambient motion: luminance drift, halftone shimmer, neon glow, etc.). * This TS module and the Python generator * (`skills/video-replicator/scripts/bunty_animate_slides.py`) BOTH read the same * `animation-styles.json`, so adding a style is a one-file change. * * NOTE on architecture: the actual F2V motion is generated by the Python * `bunty_animate_slides.py` (Veo F2V loop per slide). The TS assemble pipeline's * `animate-slides.ts` is the FFmpeg *encoder* for a slide segment; it does not * generate AI motion. This module gives the CLI/validation/gate a TS-canonical * view of the available styles. */ import registry from './animation-styles.json' with { type: 'json' }; export interface AnimationStyle { /** Stable kebab-case id used by `--style` / `--animation-style`. */ id: string; /** Human-friendly display name. */ label: string; /** One-line summary (shown in the interactive gate + `animation-styles` list). */ description: string; /** The full Veo F2V motion prompt fed to the generator. Motion-only, filter-safe. */ motionPrompt: string; } interface AnimationStyleRegistry { schemaVersion: number; defaultStyle: string; styles: AnimationStyle[]; } const REGISTRY = registry as AnimationStyleRegistry; /** All animation styles, in registry order. */ export const ANIMATION_STYLES: readonly AnimationStyle[] = REGISTRY.styles; /** All valid style ids, in registry order. */ export const ANIMATION_STYLE_IDS: readonly string[] = REGISTRY.styles.map((s) => s.id); /** The default style id (used when the caller doesn't pick one). */ export const DEFAULT_ANIMATION_STYLE: string = REGISTRY.defaultStyle; /** Look up a style by id; returns undefined for an unknown id. */ export function getAnimationStyle(id: string): AnimationStyle | undefined { return REGISTRY.styles.find((s) => s.id === id); } /** Type-guard: is `id` a registered animation style? */ export function isAnimationStyle(id: string): boolean { return REGISTRY.styles.some((s) => s.id === id); }