/* global React */ const { useState, useRef } = React; // Minimal tweaks panel — collapsible side drawer function TweaksPanel({ title = "Tweaks", children }) { const [open, setOpen] = useState(false); return ( <> {open && (
{title}
{children}
)} ); } function TweakSection({ title, children }) { return (
{title}
{children}
); } function TweakRow({ label, children }) { return (
{label} {children}
); } function TweakToggle({ label, value, onChange }) { return (
onChange(!value)} /> ); } function TweakRadio({ label, value, options, onChange }) { return (
{label}
{options.map((o) => ( ))}
); } function TweakColor({ label, value, onChange }) { return ( onChange(e.target.value)} style={{ width: 28, height: 22, border: 0, background: "none", cursor: "pointer", padding: 0 }} /> ); } function TweakButton({ label, onClick }) { return ( ); } function useTweaks(defaults) { const [tweaks, setTweaks] = useState(defaults); const setTweak = (key, value) => setTweaks((t) => ({ ...t, [key]: value })); return [tweaks, setTweak]; } Object.assign(window, { TweaksPanel, TweakSection, TweakToggle, TweakRadio, TweakColor, TweakButton, useTweaks });