// Uri Padel — Tweaks panel. // Lets the user adjust a handful of live knobs. Persists via the host bridge. const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{ "accent": "ink", "heroLine1": "In Korea,", "heroLine2": "we say Uri.", "manifestoHeading": "Built\nfor Korea.", "showManifestoDetail": true, "wordmarkTracking": 0 }/*EDITMODE-END*/; function applyTweaks(t) { // Accent: ink (default) or inverted hero document.body.dataset.accent = t.accent; // Hero lines const leadEl = document.querySelector('.hero-sub .lead'); if (leadEl) leadEl.innerHTML = `${t.heroLine1}
${t.heroLine2}`; // Manifesto heading const manEl = document.querySelector('#manifesto .section-head h2'); if (manEl) manEl.innerHTML = t.manifestoHeading.replace(/\n/g, '
'); // Operational detail paragraph const detailEl = document.querySelector('#manifesto p[data-detail]'); if (detailEl) detailEl.style.display = t.showManifestoDetail ? '' : 'none'; // Wordmark tracking const wordEl = document.querySelector('.hero-wordmark .word'); if (wordEl) wordEl.style.letterSpacing = `${t.wordmarkTracking}em`; } let current = { ...TWEAK_DEFAULTS }; function TweaksPanel({ visible, onChange }) { const [state, setState] = React.useState(current); const set = (k, v) => { const next = { ...state, [k]: v }; setState(next); current = next; applyTweaks(next); onChange(next); }; if (!visible) return null; return (
Tweaks
set('heroLine1', e.target.value)} style={inputStyle}/> set('heroLine2', e.target.value)} style={inputStyle}/>