/* Tweaks panel for Liquid Glass portfolio. Lets the user flip theme, glass intensity, grain, and motion live. Persists via __edit_mode_set_keys to the EDITMODE-BEGIN/END JSON in the host file. */ const { useEffect } = React; function PortfolioTweaks() { const defaults = window.__PORTFOLIO_DEFAULTS; const [t, setTweak] = useTweaks(defaults); // Apply tweaks to live useEffect(() => { document.body.dataset.theme = t.theme; document.body.dataset.glass = t.glass; document.body.dataset.grain = t.grain; document.body.dataset.motion = t.motion; }, [t.theme, t.glass, t.grain, t.motion]); return ( setTweak('theme', v)} options={[ { value: 'ios', label: 'iOS · минимализм, белый' }, { value: 'aurora', label: 'Aurora · тёмный + неон' }, { value: 'sunset', label: 'Sunset · оранж + розовый' }, { value: 'ocean', label: 'Ocean · cyan + индиго' }, ]} /> setTweak('glass', v)} options={[ { value: 'subtle', label: 'Тонкое' }, { value: 'standard', label: 'Норм' }, { value: 'vivid', label: 'Яркое' }, ]} /> setTweak('grain', v ? 'on' : 'off')} /> setTweak('motion', v ? 'on' : 'off')} /> ); } const root = ReactDOM.createRoot(document.getElementById('tweaks-root')); root.render();