// Main App + Tweaks integration const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{ "palette": "warm", "density": "spacious", "hero": "split", "lang": "en" }/*EDITMODE-END*/; const PALETTE_OPTIONS = [ ['#0B1F33', '#F3EEE5', '#C8923C'], // warm — default ['#0B1F33', '#FFFFFF', '#0E7C86'], // classic — navy/white/teal ['#0F1115', '#13283F', '#E0A93E'] // midnight — dark ]; const PALETTE_NAMES = ['warm', 'classic', 'midnight']; // Apply palette via html data attribute and inline overrides const applyPalette = (p) => { const root = document.documentElement; if (p === 'classic') { root.style.setProperty('--paper', '#FFFFFF'); root.style.setProperty('--paper-2', '#F4F6F9'); root.style.setProperty('--accent', '#0E7C86'); root.style.setProperty('--accent-2', '#0A6A72'); root.style.setProperty('--accent-tint', '#E6F4F5'); root.style.setProperty('--accent-soft', '#B5DDDF'); root.style.setProperty('--line', '#E5EAF0'); } else if (p === 'midnight') { root.setAttribute('data-palette', 'midnight'); root.style.setProperty('--paper', '#0F1115'); root.style.setProperty('--paper-2', '#191C22'); root.style.setProperty('--surface', '#191C22'); root.style.setProperty('--text', '#F3EEE5'); root.style.setProperty('--ink', '#F3EEE5'); root.style.setProperty('--ink-2', '#22262E'); root.style.setProperty('--ink-3', '#2D323C'); root.style.setProperty('--muted', '#9AA3B0'); root.style.setProperty('--muted-2', '#6B7280'); root.style.setProperty('--line', '#2A2F38'); root.style.setProperty('--line-dark', '#2A2F38'); root.style.setProperty('--accent', '#E0A93E'); root.style.setProperty('--accent-2', '#C8923C'); root.style.setProperty('--accent-tint', '#2A241A'); root.style.setProperty('--accent-soft', '#3D3520'); } else { // warm (default) — clear overrides root.removeAttribute('data-palette'); ['--paper','--paper-2','--surface','--text','--ink','--ink-2','--ink-3','--muted','--muted-2','--line','--line-dark','--accent','--accent-2','--accent-tint','--accent-soft'].forEach(k => root.style.removeProperty(k)); } }; const applyDensity = (d) => document.documentElement.setAttribute('data-density', d); const applyLang = (lang) => { document.documentElement.setAttribute('dir', lang === 'ar' ? 'rtl' : 'ltr'); document.documentElement.setAttribute('lang', lang); }; const App = () => { const [tweaks, setTweak] = useTweaks(TWEAK_DEFAULTS); useEffect(() => { applyPalette(tweaks.palette); }, [tweaks.palette]); useEffect(() => { applyDensity(tweaks.density); }, [tweaks.density]); useEffect(() => { applyLang(tweaks.lang); }, [tweaks.lang]); return ( <>