const { useEffect, useRef } = React; const TranscriptionList = ({ transcriptions, currentTime, onSeek, activeIndex }) => { const scrollRef = useRef(null); const itemRefs = useRef([]); useEffect(() => { if (activeIndex !== -1 && itemRefs.current[activeIndex]) { itemRefs.current[activeIndex].scrollIntoView({ behavior: 'smooth', block: 'center' }); } }, [activeIndex]); const parseTime = (timeStr) => { if (!timeStr) return 0; const [h, m, s] = timeStr.split(':'); return parseInt(h) * 3600 + parseInt(m) * 60 + parseFloat(s); }; return (

Transcript

{transcriptions.map((t, i) => { const isActive = i === activeIndex; const speakerName = t.speaker_identification?.name || t.speaker_id || "Unknown"; const isVoiceover = t.contains_voiceover; return (
itemRefs.current[i] = el} onClick={() => onSeek(parseTime(t.start))} className={` p-4 rounded-xl cursor-pointer transition-all duration-200 ${isActive ? 'bg-sky-500/10 border-sky-500/20 shadow-lg shadow-sky-900/20 translate-x-1' : 'hover:bg-slate-800/50 border-transparent hover:border-slate-700/50' } border border-transparent `} >
{speakerName} {t.start.slice(0, 8)}

{t.transcription}

{/* Confidence indicators - subtle */} {isActive && (
{t.perceived_voice_gender && ( {t.perceived_voice_gender.gender} )}
)}
); })}
); }; window.TranscriptionList = TranscriptionList;