// Pravaa Tweaks Panel // Drives cursor mode, motion intensity, palette tone, hero variant. // Persists via localStorage (handled by shared/site.js → window.PravaaPrefs). const PravaaTweaksDefaults = /*EDITMODE-BEGIN*/{ "cursor": "cell", "motion": "medium", "palette": "light", "hero": "cells" }/*EDITMODE-END*/; function PravaaTweaksApp() { // Read current prefs from localStorage so values persist across pages. const initial = (typeof window !== 'undefined' && window.PravaaPrefs) ? window.PravaaPrefs.get() : PravaaTweaksDefaults; const [t, setTweak] = useTweaks(initial); // Mirror every change to PravaaPrefs so cursor/motion/etc react globally. React.useEffect(() => { if (window.PravaaPrefs) { window.PravaaPrefs.set({ cursor: t.cursor, motion: t.motion, palette: t.palette, hero: t.hero, }); } }, [t.cursor, t.motion, t.palette, t.hero]); return ( setTweak('cursor', v)} /> setTweak('motion', v)} /> setTweak('hero', v)} /> setTweak('palette', v)} /> ); } (function mount() { const el = document.getElementById('tweaks-mount'); if (!el) return; const root = ReactDOM.createRoot(el); root.render(); })();