/* ===== IRIDIUM SHIELD — Tweaks panel app ===== */ const IS_DEFAULTS = /*EDITMODE-BEGIN*/{ "hero": "a", "accent": "#c82234", "grain": true }/*EDITMODE-END*/; function IridiumTweaks(){ const [t, setTweak] = useTweaks(IS_DEFAULTS); const root = document.documentElement; // apply + persist for the no-flash early loader in app.js React.useEffect(()=>{ const prev = root.getAttribute('data-hero'); root.setAttribute('data-hero', t.hero); root.style.setProperty('--accent', t.accent); root.style.setProperty('--grain', t.grain ? 1 : 0); try{ localStorage.setItem('is_tweaks_v2', JSON.stringify({hero:t.hero, accent:t.accent, grain:t.grain})); }catch(e){} if(prev !== t.hero){ window.dispatchEvent(new CustomEvent('is:herochange',{detail:t.hero})); window.scrollTo({top:0}); } },[t.hero, t.accent, t.grain]); return ( setTweak('hero', v)} /> setTweak('accent', v)} /> setTweak('grain', v)} /> ); } ReactDOM.createRoot(document.getElementById('tweaks-root')).render();