Design System (P2)
This repo targets a “terminal-first” design system that can render identically in browser (DOM renderer) and terminal (stdout renderer).
Tokens
Spacing
space.0 = 0space.1 = 1 cellspace.2 = 2 cells
Borders
border.default = single-line boxborder.subtle = no border, padded container
Overlay / z-index
z.base = 0z.overlay = 10z.modal = 20z.debug = 90
Status colors (ANSI palette)
status.info = cyanBrightstatus.success = greenBrightstatus.warn = yellowBrightstatus.error = redBright
Primitives
Header / status bar
- Fixed height (1–2 rows), clear left/right sections, minimal color.
Sidebar
- Left column with selectable items, consistent selection/focus styling.
Toast
- Small box in a corner, auto-dismiss (but avoid timers in parity tests; allow manual dismiss in demos).
Command palette
- Modal list with fuzzy search input and keyboard navigation.
Modal / dialog
- Focus trap (future) + focus restore.
- Buttons navigable by
←/→;Enteractivates.
List / select
- Deterministic clipping/wrapping behavior for long items.
Progress
- Deterministic progress rendering (avoid time-based animation in parity gates).
Accessibility baseline
- Visible focus ring (or focus-highlight) in both renderers.
- Keyboard-only navigation for all interactive controls.
- Sufficient contrast using palette-restricted colors.