// Minimal tweaks panel stub — exposes useTweaks and TweaksPanel globally function useTweaks(defaults) { const [values, setValues] = React.useState(defaults); const setTweak = React.useCallback((keyOrEdits, val) => { const edits = typeof keyOrEdits === 'object' && keyOrEdits !== null ? keyOrEdits : { [keyOrEdits]: val }; setValues(prev => ({ ...prev, ...edits })); }, []); return [values, setTweak]; } function TweaksPanel({ title='Tweaks', children }) { const [open, setOpen] = React.useState(false); return ( <> {open && (
{title}
{children}
)} ); } function TweakSection({ title }) { return
{title}
; } function TweakRadio({ label, value, onChange, options }) { return (
{label}
{options.map(o => { const v = typeof o==='object' ? o.value : o; const l = typeof o==='object' ? o.label : o; return ; })}
); } function TweakColor({ label, value, onChange }) { return (
{label} onChange(e.target.value)} style={{ width:56, height:22, borderRadius:6, border:'0.5px solid rgba(0,0,0,0.1)', padding:0, cursor:'pointer' }}/>
); } function TweakSelect({ label, value, onChange, options }) { return (
{label}
); } Object.assign(window, { useTweaks, TweaksPanel, TweakSection, TweakRadio, TweakColor, TweakSelect });