// mvp-sections.jsx — secciones premium de la landing "MVP" // Reusa F, Magnetic, Parallax, RevealText, RevealWords, GlitchWord, useScrollProgress, // useInView de shared.jsx / final-hooks.jsx / final-sections.jsx. // Pieza nueva de esta landing: MVPTerminal — un panel de "build log" que tipea en vivo, // reforzando velocidad/foco sin repetir la red de partículas 1:1 de otras landings. function MVPTerminal({ lines }) { const [shown, setShown] = React.useState([]); const [typed, setTyped] = React.useState(''); const idxRef = React.useRef(0); const ref = React.useRef(null); const inView = useInView(ref, { threshold: 0.3 }); const startedRef = React.useRef(false); React.useEffect(() => { if (!inView || startedRef.current) return; startedRef.current = true; let cancelled = false; const runLine = (i) => { if (cancelled || i >= lines.length) { if (!cancelled) { setTimeout(() => { if (cancelled) return; setShown([]); setTyped(''); idxRef.current = 0; startedRef.current = false; runLine(0); }, 2400); } return; } const line = lines[i]; let c = 0; const type = () => { if (cancelled) return; c++; setTyped(line.slice(0, c)); if (c < line.length) { setTimeout(type, 16 + Math.random() * 18); } else { setTimeout(() => { if (cancelled) return; setShown(s => [...s, line]); setTyped(''); runLine(i + 1); }, 260); } }; type(); }; runLine(0); return () => { cancelled = true; }; }, [inView, lines]); return (
{sub}
}{c.desc}
{p.desc}
{step.desc}
{st.desc}