import '@fontsource-variable/dm-sans/wght.css';
import '@fontsource-variable/space-grotesk/wght.css';
import React from 'react';
import {AbsoluteFill, Audio, Composition, Img, interpolate, registerRoot, spring, staticFile, useCurrentFrame, useVideoConfig} from 'remotion';
type Theme = 'light' | 'dark';
const palette = {
light: {ground:'#f8f7f4',paper:'#ffffff',ink:'#231f1b',muted:'#625b54',line:'#d8d1c8',accent:'#ac6238',shadow:'rgba(54,35,20,.16)'},
dark: {ground:'#11100e',paper:'#211d19',ink:'#f8f4ee',muted:'#c7beb3',line:'#524940',accent:'#e0a176',shadow:'rgba(0,0,0,.42)'},
};
const body = '"DM Sans Variable", sans-serif';
const display = '"Space Grotesk Variable", sans-serif';
const fps = 30;
const duration = 630;
function Canvas({theme,children}:{theme:Theme;children:React.ReactNode}) {
const c=palette[theme];
return
{children}
;
}
function Wordmark({theme}:{theme:Theme}) {return
compokit•
}
function FormCrop({theme,zoom=1.1,move=0}:{theme:Theme;zoom?:number;move?:number}) {
const c=palette[theme];
return
;
}
function ResultCrop({theme,width=900,height=390,scale=1.08}:{theme:Theme;width?:number;height?:number;scale?:number}) {
const c=palette[theme];
return
;
}
const beats = [
{start:0,end:100,state:'form',eyebrow:'SOURCE / 01',title:'Start with your\ncomponent library.',note:'The scan begins with a real source directory.',anchor:'Choose the framework'},
{start:100,end:265,state:'form',eyebrow:'SCAN / 02',title:'Svelte or Vue.\nYour choice.',note:'Choose the framework the directory actually uses.',anchor:'Framework selector'},
{start:265,end:475,state:'result',eyebrow:'INDEX / 03',title:'See what\nwas found.',note:'Component and token counts come from the completed scan.',anchor:'Indexed library cards'},
{start:475,end:630,state:'result',eyebrow:'READY / 04',title:'Your library,\nin context.',note:'These components are indexed for the next step.',anchor:'Svelte and Vue'},
] as const;
// Editorial timing for layout QA only; re-time to the licensed Cartesia waveform.
const draftCaptions = [
{start:0,end:144,text:'Point Compokit at a Svelte or Vue component directory.'},
{start:144,end:300,text:'It indexes the components and design tokens it finds,'},
{start:300,end:474,text:'so your own library is ready for the next step.'},
{start:474,end:630,text:'Start with the source you already have.'},
] as const;
function Film({theme}:{theme:Theme}) {
const frame=useCurrentFrame(),{fps:rate}=useVideoConfig(),c=palette[theme];
const beat=beats.find(b=>frame>=b.start&&frameframe>=cue.start&&frame