# theme-common — Architecture Shared TOML theme loading for GO, BB, and AF. ## What It Does Parses TOML theme files with `[meta]`, `[background]`, `[foreground]`, `[accent]`, `[border]` sections. Provides metadata extraction, color flattening, filesystem scanning, import/export, and ID validation. ## Consumers | App | Usage | |-----|-------| | GO, BB | `list_themes_from_dirs`, `load_theme`, `import_theme`, `export_theme` (runtime filesystem) | | AF | `ThemeMeta`, `parse_meta`, `extract_colors` (compile-time embedded themes) | ## Key Types - `ThemeMeta` — id, name, variant, is_custom - `ThemeColors` — metadata + flattened color map (`background.primary` etc.) ## Key Paths | What | Where | |------|-------| | All code | `src/lib.rs` (single file, ~585 lines including tests) | | Theme files | `../themes/*.toml` (16 bundled themes) |