Documentation
¶
Index ¶
Constants ¶
View Source
const ( IconOK = "✓" IconWarn = "⚠" IconFail = "✗" )
Status icons. Keep these in one place so prompts, results, and JSON-text fallbacks all reach for the same glyph.
Variables ¶
View Source
var ( ColorAccent = lipgloss.Color("205") // pink — in-progress state, focused input ColorSuccess = lipgloss.Color("42") // green — completed actions ColorError = lipgloss.Color("196") // red — failures ColorWarning = lipgloss.Color("220") // yellow — warnings, "press Y to confirm" ColorMuted = lipgloss.Color("244") // gray — footer hints, less important text )
Semantic color tokens. Use these instead of raw lipgloss.Color values so every widget speaks the same visual language, and a future palette swap only has to touch this file.
256-color codes are used (not hex) so terminals with reduced color depth degrade gracefully instead of falling back to white.
View Source
var ( // TitleStyle is for prompt headings and emphasized labels. Bold, no color // so it works across light and dark terminals. TitleStyle = lipgloss.NewStyle().Bold(true) // AccentStyle is for active or in-progress UI: the spinner glyph, the // focused-input cursor accent, anything the user's eye should track. AccentStyle = lipgloss.NewStyle().Foreground(ColorAccent) // HelperStyle is for de-emphasized hint text — footers like // "(esc to quit)", inline shortcuts, secondary instructions. HelperStyle = lipgloss.NewStyle().Foreground(ColorMuted) // SuccessStyle / ErrorStyle / WarningStyle are for status glyphs and // short status words. Pair them with the icons below. SuccessStyle = lipgloss.NewStyle().Foreground(ColorSuccess) ErrorStyle = lipgloss.NewStyle().Foreground(ColorError) WarningStyle = lipgloss.NewStyle().Foreground(ColorWarning) NoColorStyle = lipgloss.NewStyle().Foreground(lipgloss.NoColor{}) // SearchMatchStyle highlights every pager search hit; SearchSelectedStyle // marks the one the viewport is currently scrolled to (like the focused // match in less). Dark text on a colored background keeps hits legible // regardless of the underlying syntax color. SearchMatchStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("232")).Background(ColorWarning) SearchSelectedStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("232")).Background(ColorAccent) )
Style presets that combine the colors above with shared layout choices (bold/margins/etc). Widgets should reach for these before declaring a local style; only fork into a one-off style when the preset genuinely doesn't fit.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.