// screens-editor.jsx — Editor (timeline)
function Editor() {
const { ASSETS } = window.ZAMPP_DATA;
const [playing, setPlaying] = React.useState(false);
const [currentMs, setCurrentMs] = React.useState(0);
React.useEffect(() => {
if (!playing) return;
const i = setInterval(() => setCurrentMs(t => t + 100), 100);
return () => clearInterval(i);
}, [playing]);
return (
New sequence
{!playing && (
)}
{msToTimecode ? msToTimecode(currentMs) : '00:00:00:00'}
);
}
function InspGroup({ title, children }) {
return (
);
}
function InspRow({ label, value }) {
return (
{label}
{value}
);
}
function EditorTimeline({ currentMs, total = 60, clips = [] }) {
const playheadPct = total > 0 ? ((currentMs / 1000) / total) * 100 : 0;
return (
Timeline
{Array.from({ length: 13 }).map((_, i) => (
{i % 2 === 0 && {`00:${String(i * 5).padStart(2, '0')}`}}
))}
{clips.length === 0 && (
Drop assets from the bin to build a sequence.
)}
);
}
window.Editor = Editor;