Documentation ¶
Index ¶
- Constants
- func AllThemes() map[string]ThemeFunc
- type OutputLevel
- type Theme
- func (t Theme) Box() lipgloss.Style
- func (t Theme) Collection() lipgloss.Style
- func (t Theme) EntityView() lipgloss.Style
- func (t Theme) HuhTheme() *huh.Theme
- func (t Theme) ListItemStyles() list.DefaultItemStyles
- func (t Theme) ListStyles() list.Styles
- func (t Theme) LoggerStyles() *log.Styles
- func (t Theme) MarkdownStyleJSON() (string, error)
- func (t Theme) RenderBold(text string) string
- func (t Theme) RenderEmphasis(text string) string
- func (t Theme) RenderError(text string) string
- func (t Theme) RenderFooter(text string, width int) string
- func (t Theme) RenderHeader(appName, stateKey, stateVal string, width int) string
- func (t Theme) RenderInContainer(text string) string
- func (t Theme) RenderInfo(text string) string
- func (t Theme) RenderInputForm(text string) string
- func (t Theme) RenderKeyAndValue(key, value string) string
- func (t Theme) RenderKeyAndValueWithBreak(key, value string) string
- func (t Theme) RenderLevel(str string, lvl OutputLevel) string
- func (t Theme) RenderNotice(text string) string
- func (t Theme) RenderSuccess(text string) string
- func (t Theme) RenderUnknown(text string) string
- func (t Theme) RenderWarning(text string) string
- func (t Theme) Spinner() lipgloss.Style
- type ThemeFunc
Constants ¶
const ( HeaderHeight = 3 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OutputLevel ¶ added in v0.0.24
type OutputLevel string
const ( OutputLevelSuccess OutputLevel = "success" OutputLevelNotice OutputLevel = "notice" OutputLevelInfo OutputLevel = "info" OutputLevelWarning OutputLevel = "warning" OutputLevelError OutputLevel = "error" // LogNoticeLevel is a custom log level for notices. LogNoticeLevel = log.InfoLevel + 1 )
type Theme ¶
type Theme struct { Name string `json:"-" yaml:"-"` SpinnerType spinner.Spinner `json:"-" yaml:"-"` // see https://github.com/alecthomas/chroma ChromaCodeStyle string `json:"chromaCodeStyle" yaml:"chromaCodeStyle"` BodyColor lipgloss.Color `json:"bodyColor" yaml:"bodyColor"` EmphasisColor lipgloss.Color `json:"emphasisColor" yaml:"emphasisColor"` BorderColor lipgloss.Color `json:"borderColor" yaml:"borderColor"` PrimaryColor lipgloss.Color `json:"primaryColor" yaml:"primaryColor"` SecondaryColor lipgloss.Color `json:"secondaryColor" yaml:"secondaryColor"` TertiaryColor lipgloss.Color `json:"tertiaryColor" yaml:"tertiaryColor"` SuccessColor lipgloss.Color `json:"successColor" yaml:"successColor"` WarningColor lipgloss.Color `json:"warningColor" yaml:"warningColor"` ErrorColor lipgloss.Color `json:"errorColor" yaml:"errorColor"` InfoColor lipgloss.Color `json:"infoColor" yaml:"infoColor"` White lipgloss.Color `json:"white" yaml:"white"` Gray lipgloss.Color `json:"gray" yaml:"gray"` Black lipgloss.Color `json:"black" yaml:"black"` }
func DarkTheme ¶ added in v0.0.26
func DarkTheme() Theme
DarkTheme Use colors from Glamour Dracula theme See https://raw.githubusercontent.com/charmbracelet/glamour/refs/heads/master/styles/dark.json
func DraculaTheme ¶ added in v0.0.26
func DraculaTheme() Theme
DraculaTheme Use colors from Glamour Dracula theme See https://raw.githubusercontent.com/charmbracelet/glamour/refs/heads/master/styles/dracula.json
func EverforestTheme ¶ added in v0.0.9
func EverforestTheme() Theme
EverforestTheme Uses the colors from the Everforest color scheme See https://gogh-co.github.io/Gogh/
func LightTheme ¶ added in v0.0.26
func LightTheme() Theme
LightTheme Use colors from Glamour Light theme See https://raw.githubusercontent.com/charmbracelet/glamour/refs/heads/master/styles/light.json
func TokyoNightTheme ¶ added in v0.0.26
func TokyoNightTheme() Theme
TokyoNightTheme Use colors from Glamour Tokyo Night theme See https://raw.githubusercontent.com/charmbracelet/glamour/refs/heads/master/styles/tokyo-night.json
func (Theme) Collection ¶
func (Theme) EntityView ¶
func (Theme) ListItemStyles ¶
func (t Theme) ListItemStyles() list.DefaultItemStyles
func (Theme) ListStyles ¶
func (Theme) LoggerStyles ¶
func (Theme) MarkdownStyleJSON ¶
func (Theme) RenderBold ¶
func (Theme) RenderEmphasis ¶ added in v0.0.9
func (Theme) RenderError ¶
func (Theme) RenderFooter ¶ added in v0.0.9
func (Theme) RenderHeader ¶ added in v0.0.9
func (Theme) RenderInContainer ¶
func (Theme) RenderInfo ¶
func (Theme) RenderInputForm ¶
func (Theme) RenderKeyAndValue ¶ added in v0.0.22
func (Theme) RenderKeyAndValueWithBreak ¶ added in v0.0.22
func (Theme) RenderLevel ¶ added in v0.0.24
func (t Theme) RenderLevel(str string, lvl OutputLevel) string