const myComponent: ComponentDefinition = {
name: 'countdown',
description: 'Display a countdown timer',
type: 'react',
files: [
{
name: 'Countdown.tsx',
content: `import React from 'react';
import { useVideoFrame } from './useVideoFrame';
import { Helios } from '@helios-project/core';
interface CountdownProps {
helios?: Helios;
targetFrame?: number;
}
export const Countdown: React.FC<CountdownProps> = ({
helios,
targetFrame = 300
}) => {
const frame = useVideoFrame(helios);
const remaining = Math.max(0, targetFrame - frame);
return <div>{remaining} frames remaining</div>;
};
`
}
],
dependencies: {
'react': '^18.0.0',
'@helios-project/core': 'latest'
},
registryDependencies: ['use-video-frame']
};