// Static registry of every TUI theme JSON shipped with aimux. Generated by // hand: re-run after `bun scripts/import-opencode-tui-themes.ts` if upstream // adds/removes themes. import type { TuiThemeJson } from './types' import aimux from './themes/aimux.json' import aura from './themes/aura.json' import ayu from './themes/ayu.json' import carbonfox from './themes/carbonfox.json' import catppuccinFrappe from './themes/catppuccin-frappe.json' import catppuccinMacchiato from './themes/catppuccin-macchiato.json' import catppuccin from './themes/catppuccin.json' import cobalt2 from './themes/cobalt2.json' import cursor from './themes/cursor.json' import dracula from './themes/dracula.json' import everforest from './themes/everforest.json' import flexoki from './themes/flexoki.json' import github from './themes/github.json' import gruvbox from './themes/gruvbox.json' import kanagawa from './themes/kanagawa.json' import lucentOrng from './themes/lucent-orng.json' import material from './themes/material.json' import matrix from './themes/matrix.json' import mercury from './themes/mercury.json' import monokai from './themes/monokai.json' import nightowl from './themes/nightowl.json' import nord from './themes/nord.json' import oneDark from './themes/one-dark.json' import opencode from './themes/opencode.json' import orng from './themes/orng.json' import osakaJade from './themes/osaka-jade.json' import palenight from './themes/palenight.json' import rosepine from './themes/rosepine.json' import solarized from './themes/solarized.json' import synthwave84 from './themes/synthwave84.json' import tokyonight from './themes/tokyonight.json' import vercel from './themes/vercel.json' import vesper from './themes/vesper.json' import zenburn from './themes/zenburn.json' export const TUI_THEMES: Record = { 'aimux': aimux as TuiThemeJson, 'aura': aura as TuiThemeJson, 'ayu': ayu as TuiThemeJson, 'carbonfox': carbonfox as TuiThemeJson, 'catppuccin': catppuccin as TuiThemeJson, 'catppuccin-frappe': catppuccinFrappe as TuiThemeJson, 'catppuccin-macchiato': catppuccinMacchiato as TuiThemeJson, 'cobalt2': cobalt2 as TuiThemeJson, 'cursor': cursor as TuiThemeJson, 'dracula': dracula as TuiThemeJson, 'everforest': everforest as TuiThemeJson, 'flexoki': flexoki as TuiThemeJson, 'github': github as TuiThemeJson, 'gruvbox': gruvbox as TuiThemeJson, 'kanagawa': kanagawa as TuiThemeJson, 'lucent-orng': lucentOrng as TuiThemeJson, 'material': material as TuiThemeJson, 'matrix': matrix as TuiThemeJson, 'mercury': mercury as TuiThemeJson, 'monokai': monokai as TuiThemeJson, 'nightowl': nightowl as TuiThemeJson, 'nord': nord as TuiThemeJson, 'one-dark': oneDark as TuiThemeJson, 'opencode': opencode as TuiThemeJson, 'orng': orng as TuiThemeJson, 'osaka-jade': osakaJade as TuiThemeJson, 'palenight': palenight as TuiThemeJson, 'rosepine': rosepine as TuiThemeJson, 'solarized': solarized as TuiThemeJson, 'synthwave84': synthwave84 as TuiThemeJson, 'tokyonight': tokyonight as TuiThemeJson, 'vercel': vercel as TuiThemeJson, 'vesper': vesper as TuiThemeJson, 'zenburn': zenburn as TuiThemeJson, } export type ThemeId = keyof typeof TUI_THEMES export const THEME_IDS: ThemeId[] = Object.keys(TUI_THEMES).sort() as ThemeId[] export function isKnownThemeId(id: string): id is ThemeId { return id in TUI_THEMES } const LEGACY_ID_MAP: Record = { 'aimux-dark': 'aimux', 'aimux-light': 'aimux', } export function migrateThemeId(id: string): ThemeId { if (isKnownThemeId(id)) return id return LEGACY_ID_MAP[id] ?? 'aimux' }