mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-12 04:37:44 +02:00
[eric] theme: the grain squiggle dial is gone from the pad, onboarding and settings both
This commit is contained in:
@@ -14,7 +14,7 @@ const BeatTheme: React.FC<{
|
||||
}> = ({ c, onNext, onBack }) => {
|
||||
const { accent, setAccent, gradient, setGradient } = useThemeAccent();
|
||||
const { mode, setMode } = useThemeMode();
|
||||
const { washOpacity, grain, setWashOpacity, setGrain } = useThemeWash();
|
||||
const { washOpacity, setWashOpacity } = useThemeWash();
|
||||
const stops = gradient ?? (accent ? [accent] : []);
|
||||
const onStops = (next: string[] | null) => {
|
||||
setAccent(next?.[0] ?? null);
|
||||
@@ -87,7 +87,7 @@ const BeatTheme: React.FC<{
|
||||
stops={stops}
|
||||
onChange={onStops}
|
||||
height={210}
|
||||
wash={{ opacity: washOpacity, grain, onOpacity: setWashOpacity, onGrain: setGrain }}
|
||||
wash={{ opacity: washOpacity, onOpacity: setWashOpacity }}
|
||||
/>
|
||||
</motion.div>
|
||||
</BeatShell>
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { useCallback, useRef, useState } from 'react';
|
||||
import { ChevronLeft, ChevronRight, Minus, Plus } from 'lucide-react';
|
||||
import { hexToHsl, hslToHex } from '@/shared/styles/claudeTokens';
|
||||
import type { ClaudeTokens } from '@/shared/styles/claudeTokens';
|
||||
import { Knob, SquiggleSlider } from './WashDials';
|
||||
import { Knob } from './WashDials';
|
||||
|
||||
export const ACCENT_PRESETS = [
|
||||
'#ae5630', '#b0453c', '#8e5cb8', '#3a6fc4', '#2e8f6f', '#b08b2e', '#c2588f', '#5c6470',
|
||||
@@ -19,9 +19,7 @@ function stopToXY(hex: string): { x: number; y: number } | null {
|
||||
|
||||
export interface WashControls {
|
||||
opacity: number;
|
||||
grain: number;
|
||||
onOpacity: (v: number) => void;
|
||||
onGrain: (v: number) => void;
|
||||
}
|
||||
|
||||
// Arc/Zen gradient engine, one control with two homes: 1-3 draggable stops on a hue/lightness field, + adds a color-theory-harmonized stop (analogous, then triadic), - removes the newest. The first stop is the accent the tokens derive from; 2+ stops become the canvas gradient wash, whose intensity + grain the optional sliders tune. The pad reports stops and never knows who is listening.
|
||||
@@ -201,10 +199,9 @@ const AccentColorPad: React.FC<{
|
||||
Reset
|
||||
</button>
|
||||
</div>
|
||||
{/* Arc's dials row: wavy line = grain, round knob = intensity. */}
|
||||
{/* Intensity knob only; the grain squiggle is gone on purpose (Eric's call, one dial fewer). */}
|
||||
{wash && (
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 14, color: c.text.tertiary }}>
|
||||
<SquiggleSlider value={wash.grain} onChange={wash.onGrain} width={190} />
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'flex-end', gap: 14, color: c.text.tertiary }}>
|
||||
<Knob value={wash.opacity} onChange={wash.onOpacity} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -23,7 +23,7 @@ const GeneralInterface: React.FC<{
|
||||
styles: SettingsStyles;
|
||||
}> = ({ form, setForm, styles }) => {
|
||||
const c = useClaudeTokens();
|
||||
const { washOpacity, grain, setWashOpacity, setGrain } = useThemeWash();
|
||||
const { washOpacity, setWashOpacity } = useThemeWash();
|
||||
const { fieldSx, sectionSx, rowSx, rowLastSx, inlineRowSx, inlineRowLastSx, labelSx, descSx, toggleGroupSx, switchSx } = styles;
|
||||
|
||||
return (
|
||||
@@ -131,7 +131,7 @@ const GeneralInterface: React.FC<{
|
||||
stops={form.accent_gradient ?? (form.accent_color ? [form.accent_color] : [])}
|
||||
onChange={(next) => setForm({ ...form, accent_color: next?.[0] ?? null, accent_gradient: next && next.length > 1 ? next : null })}
|
||||
height={120}
|
||||
wash={{ opacity: washOpacity, grain, onOpacity: setWashOpacity, onGrain: setGrain }}
|
||||
wash={{ opacity: washOpacity, onOpacity: setWashOpacity }}
|
||||
/>
|
||||
</Box>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user