Documentation
¶
Index ¶
Constants ¶
View Source
const MaxManifestBytes = 512 * 1024
View Source
const PaletteVersion = 1
View Source
const Version = 1
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Catalog ¶
type Catalog struct {
Version int `json:"version"`
PaletteVersion int `json:"paletteVersion"`
DefaultTheme string `json:"defaultTheme"`
DefaultMode string `json:"defaultMode"`
Themes []ResolvedTheme `json:"themes"`
}
type Manifest ¶
type Manifest struct {
Overrides []string `json:"overrides,omitempty" yaml:"overrides,omitempty"`
Version int `json:"version" yaml:"version"`
Files []string `json:"files,omitempty" yaml:"files,omitempty"`
DefaultTheme string `json:"defaultTheme,omitempty" yaml:"defaultTheme,omitempty"`
DefaultMode string `json:"defaultMode,omitempty" yaml:"defaultMode,omitempty"`
Themes []Theme `json:"themes,omitempty" yaml:"themes,omitempty"`
}
type ResolvedTheme ¶
type ResolvedTheme struct {
ID string `json:"id"`
Label string `json:"label"`
FallbackMode string `json:"fallbackMode"`
Modes map[string]Tokens `json:"modes"`
}
func (ResolvedTheme) EffectiveMode ¶
func (t ResolvedTheme) EffectiveMode(preference, systemMode string) string
EffectiveMode implements the same fallback rule expected of all clients.
type Theme ¶
type Theme struct {
ID string `json:"id" yaml:"id"`
Label string `json:"label" yaml:"label"`
FallbackMode string `json:"fallbackMode" yaml:"fallbackMode"`
Tokens Tokens `json:"tokens,omitempty" yaml:"tokens,omitempty"`
Files []string `json:"files,omitempty" yaml:"files,omitempty"`
Modes map[string]Variant `json:"modes" yaml:"modes"`
}
Click to show internal directories.
Click to hide internal directories.