Documentation
¶
Index ¶
- Constants
- func GetName() string
- func IsTransparent() bool
- func List() []string
- func Set(name string) error
- func SetClient(client Client)
- func SetTransparent(transparent bool)
- func UseName() string
- type AgentColor
- type BorderColor
- type BrandMarkColor
- type Client
- type ClientOverride
- type Color
- type DiffColor
- type IconColor
- type MeterColor
- type ModeColor
- type Scheme
- type SubagentColors
- type SurfaceColor
- type SyntaxColor
- type TextColor
- type Theme
- type ThemeAgentColor
- type ThemeBorderColor
- type ThemeColors
- type ThemeDiffColor
- type ThemeIconColor
- type ThemeMeterColor
- type ThemeModeColor
- type ThemeSubagentColors
- type ThemeSurfaceColor
- type ThemeSyntaxColor
- type ThemeTextColor
- type ThemeTintColor
- type ThemeTranscriptColor
- type TintColor
- type TranscriptColor
Constants ¶
const Default = "dark"
Default is the name of the default theme.
Variables ¶
This section is empty.
Functions ¶
func IsTransparent ¶
func IsTransparent() bool
IsTransparent returns whether the active global theme is configured as transparent.
func List ¶
func List() []string
List returns a slice of all available theme names (built-in and custom).
func SetClient ¶
func SetClient(client Client)
SetClient updates the active client type and refreshes the scheme.
func SetTransparent ¶
func SetTransparent(transparent bool)
SetTransparent sets whether the active global theme should be transparent.
Types ¶
type AgentColor ¶
type BorderColor ¶
type BrandMarkColor ¶
func BrandMarkColors ¶
func BrandMarkColors() BrandMarkColor
type ClientOverride ¶
type ClientOverride struct {
Transparent *bool `json:"transparent,omitempty"`
Palette map[string]string `json:"palette,omitempty"`
Colors ThemeColors `json:"colors"`
}
ClientOverride represents client-specific overrides for a theme.
type Color ¶
type Color struct {
Text TextColor
Surface SurfaceColor
Tint TintColor
Border BorderColor
Icon IconColor
Agent AgentColor
Mode ModeColor
Diff DiffColor
Transcript TranscriptColor
Meter MeterColor
Syntax SyntaxColor
BrandMark BrandMarkColor
}
Color represents the resolved theme colors.
type MeterColor ¶
type Scheme ¶
type Scheme struct {
Name string
Type string
Transparent bool
Palette map[string]color.Color
Color Color
}
Scheme represents the resolved theme values.
func Resolve ¶
Resolve converts a Theme (JSON) to a Scheme (Resolved) using the currently configured client.
func ResolveFor ¶
ResolveFor converts a Theme (JSON) to a Scheme (Resolved) for a specific client.
func (*Scheme) WithTransparent ¶
WithTransparent returns a copy of Scheme with the transparent setting applied. When transparent is true, surface Canvas, Panel, Hover, Active, and Disabled are cleared to nil (Elevated, Code, Selected, and Tint.* remain intact).
type SubagentColors ¶
type SurfaceColor ¶
type SyntaxColor ¶
type Theme ¶
type Theme struct {
Name string `json:"name"`
Extends string `json:"extends,omitempty"`
Type string `json:"type"` // "dark" or "light"
Transparent *bool `json:"transparent,omitempty"`
Palette map[string]string `json:"palette,omitempty"`
Colors ThemeColors `json:"colors"`
Clients map[Client]ClientOverride `json:"clients,omitempty"`
}
Theme represents the JSON structure of a theme.
type ThemeAgentColor ¶
type ThemeBorderColor ¶
type ThemeColors ¶
type ThemeColors struct {
Text ThemeTextColor `json:"text"`
Surface ThemeSurfaceColor `json:"surface"`
Tint ThemeTintColor `json:"tint"`
Border ThemeBorderColor `json:"border"`
Icon ThemeIconColor `json:"icon"`
Agent ThemeAgentColor `json:"agent"`
Mode ThemeModeColor `json:"mode"`
Diff ThemeDiffColor `json:"diff"`
Transcript ThemeTranscriptColor `json:"transcript"`
Meter ThemeMeterColor `json:"meter"`
Syntax ThemeSyntaxColor `json:"syntax"`
}
ThemeColors represents all 11 token groups in theme configuration.
type ThemeDiffColor ¶
type ThemeDiffColor struct {
AddedBg string `json:"added_bg"`
AddedText string `json:"added_text"`
AddedWord string `json:"added_word"`
AddedDimmed string `json:"added_dimmed"`
RemovedBg string `json:"removed_bg"`
RemovedText string `json:"removed_text"`
RemovedWord string `json:"removed_word"`
RemovedDimmed string `json:"removed_dimmed"`
HunkBg string `json:"hunk_bg"`
HunkText string `json:"hunk_text"`
}
type ThemeIconColor ¶
type ThemeMeterColor ¶
type ThemeModeColor ¶
type ThemeSubagentColors ¶
type ThemeSurfaceColor ¶
type ThemeSyntaxColor ¶
type ThemeSyntaxColor struct {
Keyword string `json:"keyword"`
Function string `json:"function"`
String string `json:"string"`
Number string `json:"number"`
Type string `json:"type"`
Comment string `json:"comment"`
Operator string `json:"operator"`
Variable string `json:"variable"`
Punctuation string `json:"punctuation"`
}
type ThemeTextColor ¶
type ThemeTextColor struct {
Primary string `json:"primary"`
Secondary string `json:"secondary"`
Muted string `json:"muted"`
Disabled string `json:"disabled"`
Inverse string `json:"inverse"`
Accent string `json:"accent"`
Info string `json:"info"`
Success string `json:"success"`
Warning string `json:"warning"`
Error string `json:"error"`
}