/** * Console — shared chrome for the simpler altitudes. Ported from `shared-ui.jsx`. * * AltitudeNav no longer navigates to separate HTML files (the JSX's href model); * the focus switch is driven by React state via `onFocus`. The altitude pills * (Console / Perform / Zen) are inert here — Manifold ships a single altitude. */ import type { CSSProperties } from 'react'; import type { Focus } from './types'; import type { MFParam } from './model'; const FOCI: [Focus, string, string][] = [ ['in', 'IN', 'Input-first'], ['split', 'DUAL', 'Input + output equal'], ['out', 'OUT', 'Output-first'], ['composite', 'FLEX', 'Composite — drag to rebalance'], ]; export interface AltitudeNavProps { current?: string; focus?: Focus; onFocus?: (f: Focus) => void; style?: CSSProperties; } export function AltitudeNav({ current = 'console', focus = 'in', onFocus, style }: AltitudeNavProps) { const items = [ { id: 'console', dots: '◆◆◆', label: 'Console' }, { id: 'perform', dots: '◆◆', label: 'Perform' }, { id: 'zen', dots: '◆', label: 'Zen' }, ]; const pill = (on: boolean): CSSProperties => ({ textDecoration: 'none', fontSize: 11, padding: '2px 8px', borderRadius: 'var(--r-pill)', color: on ? 'var(--accent)' : 'var(--fg-dim)', background: on ? 'rgba(255,106,0,0.14)' : 'transparent', border: 'none', cursor: 'pointer', fontFamily: 'var(--font-mono)', }); return (
{items.map((it) => ( {it.dots} ))} {FOCI.map(([f, label, title]) => ( ))}
); } const MM_GROUP_COLOR: Record = { formant: '--accent', pitch: '--accent-2', amp: '--good', filter: '--warn', fx: '--info', mod: '--accent-3', }; /** MiniMeters — glanceable read-only output bars (no interaction). */ export function MiniMeters({ params, values }: { params: MFParam[]; values: number[] }) { return (
{values.map((v, i) => (
))}
); } /** CompactAxis — slim labelled feel slider (Perform bar; kept for parity). */ export function CompactAxis({ label, value, onChange, accent = 'var(--accent)', }: { label: string; value: number; onChange: (v: number) => void; accent?: string; }) { return ( ); }