|
|
@@ -1,4 +1,5 @@
|
|
|
import { RGBA, SyntaxStyle } from "@opentui/core"
|
|
|
+import type { Theme, ThemeV1Json } from "@opencode-ai/theme/tui/v1"
|
|
|
import aura from "./assets/aura.json" with { type: "json" }
|
|
|
import ayu from "./assets/ayu.json" with { type: "json" }
|
|
|
import carbonfox from "./assets/carbonfox.json" with { type: "json" }
|
|
|
@@ -33,80 +34,7 @@ import vercel from "./assets/vercel.json" with { type: "json" }
|
|
|
import vesper from "./assets/vesper.json" with { type: "json" }
|
|
|
import zenburn from "./assets/zenburn.json" with { type: "json" }
|
|
|
|
|
|
-export type Theme = {
|
|
|
- readonly primary: RGBA
|
|
|
- readonly secondary: RGBA
|
|
|
- readonly accent: RGBA
|
|
|
- readonly error: RGBA
|
|
|
- readonly warning: RGBA
|
|
|
- readonly success: RGBA
|
|
|
- readonly info: RGBA
|
|
|
- readonly text: RGBA
|
|
|
- readonly textMuted: RGBA
|
|
|
- readonly selectedListItemText: RGBA
|
|
|
- readonly background: RGBA
|
|
|
- readonly backgroundPanel: RGBA
|
|
|
- readonly backgroundElement: RGBA
|
|
|
- readonly backgroundMenu: RGBA
|
|
|
- readonly border: RGBA
|
|
|
- readonly borderActive: RGBA
|
|
|
- readonly borderSubtle: RGBA
|
|
|
- readonly diffAdded: RGBA
|
|
|
- readonly diffRemoved: RGBA
|
|
|
- readonly diffContext: RGBA
|
|
|
- readonly diffHunkHeader: RGBA
|
|
|
- readonly diffHighlightAdded: RGBA
|
|
|
- readonly diffHighlightRemoved: RGBA
|
|
|
- readonly diffAddedBg: RGBA
|
|
|
- readonly diffRemovedBg: RGBA
|
|
|
- readonly diffContextBg: RGBA
|
|
|
- readonly diffLineNumber: RGBA
|
|
|
- readonly diffAddedLineNumberBg: RGBA
|
|
|
- readonly diffRemovedLineNumberBg: RGBA
|
|
|
- readonly markdownText: RGBA
|
|
|
- readonly markdownHeading: RGBA
|
|
|
- readonly markdownLink: RGBA
|
|
|
- readonly markdownLinkText: RGBA
|
|
|
- readonly markdownCode: RGBA
|
|
|
- readonly markdownBlockQuote: RGBA
|
|
|
- readonly markdownEmph: RGBA
|
|
|
- readonly markdownStrong: RGBA
|
|
|
- readonly markdownHorizontalRule: RGBA
|
|
|
- readonly markdownListItem: RGBA
|
|
|
- readonly markdownListEnumeration: RGBA
|
|
|
- readonly markdownImage: RGBA
|
|
|
- readonly markdownImageText: RGBA
|
|
|
- readonly markdownCodeBlock: RGBA
|
|
|
- readonly syntaxComment: RGBA
|
|
|
- readonly syntaxKeyword: RGBA
|
|
|
- readonly syntaxFunction: RGBA
|
|
|
- readonly syntaxVariable: RGBA
|
|
|
- readonly syntaxString: RGBA
|
|
|
- readonly syntaxNumber: RGBA
|
|
|
- readonly syntaxType: RGBA
|
|
|
- readonly syntaxOperator: RGBA
|
|
|
- readonly syntaxPunctuation: RGBA
|
|
|
- readonly thinkingOpacity: number
|
|
|
- _hasSelectedListItemText: boolean
|
|
|
-}
|
|
|
-
|
|
|
-export type ThemeColor = Exclude<keyof Theme, "thinkingOpacity" | "_hasSelectedListItemText">
|
|
|
-export type HexColor = `#${string}`
|
|
|
-export type RefName = string
|
|
|
-export type Variant = {
|
|
|
- dark: HexColor | RefName
|
|
|
- light: HexColor | RefName
|
|
|
-}
|
|
|
-export type ColorValue = HexColor | RefName | Variant | RGBA | number
|
|
|
-export type ThemeV1Json = {
|
|
|
- $schema?: string
|
|
|
- defs?: Record<string, HexColor | RefName>
|
|
|
- theme: Omit<Record<ThemeColor, ColorValue>, "selectedListItemText" | "backgroundMenu"> & {
|
|
|
- selectedListItemText?: ColorValue
|
|
|
- backgroundMenu?: ColorValue
|
|
|
- thinkingOpacity?: number
|
|
|
- }
|
|
|
-}
|
|
|
+export type { ColorValue, HexColor, RefName, Theme, ThemeColor, ThemeV1Json, Variant } from "@opencode-ai/theme/tui/v1"
|
|
|
|
|
|
export const DEFAULT_THEMES: Record<string, ThemeV1Json> = {
|
|
|
aura,
|