// Maachu Labs Tweaks — three expressive controls (Signal, Voice, Pulse). // Each one reshapes the FEEL of the whole page, not a single property. const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{ "signal": "cobalt", "voice": "editorial", "pulse": "active" }/*EDITMODE-END*/; const SIGNAL_OPTIONS = [ { value: "cobalt", label: "Cobalt", colors: ["#5eb3ff", "#b288ff"], desc: "blue · violet — editorial" }, { value: "solar", label: "Solar", colors: ["#ffb060", "#ff6648"], desc: "amber · coral — kinetic" }, { value: "terminal", label: "Terminal", colors: ["#7cf0a0", "#ffe26b"], desc: "phosphor — scanlines" }, { value: "mono", label: "Mono", colors: ["#f4f4f4", "#9a9a9a"], desc: "no chroma — print" }, ]; // Custom 2×2 swatch grid — TweakColor compares values via JSON.stringify so // a string→array mapping wouldn't highlight the selected option. The chip is // just ); })}
{cur.desc}
); } function MiniDesc({ children }) { return (
{children}
); } function AxonTweaks() { const [t, setTweak] = useTweaks(TWEAK_DEFAULTS); // Sync the three axes to body classes so the variant CSS in tweaks.css applies. React.useEffect(() => { const body = document.body; const cleaned = [...body.classList].filter( (c) => !/^(signal|voice|pulse)-/.test(c) ); body.className = [ ...cleaned, `signal-${t.signal}`, `voice-${t.voice}`, `pulse-${t.pulse}`, ].join(" ").trim(); }, [t.signal, t.voice, t.pulse]); const voiceDesc = { editorial: "serif italic — magazine", bracketed: "mono tag — technical", caps: "bold uppercase — declarative", }[t.voice]; const pulseDesc = { calm: "still — print mode", active: "default — alive", hyper: "fast · glow · scan", }[t.pulse]; return ( setTweak("signal", v)} /> setTweak("voice", v)} /> {voiceDesc} setTweak("pulse", v)} /> {pulseDesc} ); } ReactDOM.createRoot(document.getElementById("tweaks-root")).render();