// While2 — Splash (minimal) // Logo + loading bar only, vertically centered. const INK = '#e8e6df'; function useTick(intervalMs) { const [t, setT] = React.useState(0); React.useEffect(() => { const id = setInterval(() => setT((x) => x + 1), intervalMs); return () => clearInterval(id); }, [intervalMs]); return t; } const TITLE_LINES = [ ' _/\\/\\______/\\/\\__/\\/\\________/\\/\\____/\\/\\________________/\\/\\/\\/\\/\\___', ' _/\\/\\__/\\__/\\/\\__/\\/\\________________/\\/\\______/\\/\\/\\____________/\\/\\_ ', ' _/\\/\\/\\/\\/\\/\\/\\__/\\/\\/\\/\\____/\\/\\____/\\/\\____/\\/\\/\\/\\/\\____/\\/\\/\\/\\___ ', ' _/\\/\\/\\__/\\/\\/\\__/\\/\\__/\\/\\__/\\/\\____/\\/\\____/\\/\\________/\\/\\_________ ', ' _/\\/\\______/\\/\\__/\\/\\__/\\/\\__/\\/\\/\\__/\\/\\/\\____/\\/\\/\\/\\__/\\/\\/\\/\\/\\/\\_ ', '______________________________________________________________________ ', ]; // Render each line, painting every `/\` pair in cyan and leaving the rest // (underscores + spaces) in INK. function ColorizedTitle({ fontSize }) { const lines = TITLE_LINES.map((line, li) => { const segs = []; let i = 0; while (i < line.length) { if (line[i] === '/' && line[i + 1] === '\\') { segs.push({ t: '/\\', c: true }); i += 2; } else { // accumulate run of non-slash chars let j = i; while (j < line.length && !(line[j] === '/' && line[j + 1] === '\\')) j++; segs.push({ t: line.slice(i, j), c: false }); i = j; } } return (
{segs.map((s, k) => s.c ? {s.t} : {s.t} )}
); }); return (
{lines}
); } function LoadBar({ width = 22, durationMs = 4500 }) { const tick = useTick(durationMs / width); const filled = Math.min(width, tick); return (
{'█'.repeat(filled)}{'░'.repeat(width - filled)}
); } function SplashSwim() { return (
); } window.SplashSwim = SplashSwim;