/* Tweaks panel: expose FV variant, accent color, header copy */ const { useEffect, useState: useStateT } = React; const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{ "accentColor": "#a87544", "inkColor": "#1a1613", "paperColor": "#f7f2e9", "showFloatingCta": true, "fvVariant": 0 }/*EDITMODE-END*/; function useTweaks() { const [tw, setTw] = useStateT(TWEAK_DEFAULTS); useEffect(() => { const root = document.documentElement; root.style.setProperty('--wood', tw.accentColor); root.style.setProperty('--ink', tw.inkColor); root.style.setProperty('--paper', tw.paperColor); }, [tw]); return [tw, setTw]; } function TweaksPanel({ tw, setTw, visible }) { if (!visible) return null; const commit = (edits) => { setTw(prev => ({ ...prev, ...edits })); try { window.parent.postMessage({ type: '__edit_mode_set_keys', edits }, '*'); } catch(e){} }; const panel = { position:'fixed', bottom: 24, right: 24, zIndex: 100, width: 320, background: '#fbf7ef', color:'#1a1613', border: '1px solid #d9cfbe', borderRadius: 4, boxShadow: '0 30px 60px -20px rgba(0,0,0,.35)', padding: '20px 22px', fontFamily:'system-ui, sans-serif', fontSize: 13, }; const row = { display:'flex', justifyContent:'space-between', alignItems:'center', padding: '10px 0', borderBottom:'1px solid #ebe3d5' }; const swatches = ['#a87544', '#7a5530', '#3c5a3a', '#6b8e7a', '#c6892a', '#8b5a3c']; return (
Tweaks
FV コピー案
{['A','B','C'].map((L, i) => ( ))}
アクセント色
{swatches.map(c => (
紙色(背景)
{['#f7f2e9','#efe7d7','#fbf7ef','#ede7dc'].map(c => (
追従CTAボタン
ツールバーの「Tweaks」で表示/非表示を切り替えられます。
); } Object.assign(window, { useTweaks, TweaksPanel });