/** * 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 (