// Tweaks panel — hero variant + accent color + typography const TweaksPanel = ({ config, setConfig }) => { const [visible, setVisible] = React.useState(false); React.useEffect(() => { const handler = (e) => { if (e.data?.type === '__activate_edit_mode') setVisible(true); if (e.data?.type === '__deactivate_edit_mode') setVisible(false); }; window.addEventListener('message', handler); window.parent.postMessage({ type: '__edit_mode_available' }, '*'); return () => window.removeEventListener('message', handler); }, []); const patch = (k, v) => { setConfig(c => ({ ...c, [k]: v })); window.parent.postMessage({ type: '__edit_mode_set_keys', edits: { [k]: v } }, '*'); }; if (!visible) return null; return (