Documentation
¶
Overview ¶
Package common holds shared types and styles used across TUI components.
Index ¶
Constants ¶
View Source
const Ellipsis = "\u2026"
Variables ¶
View Source
var ( DimStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("241")) HelpStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("246")) TextStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("252")) TextSelectedStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("62")).Bold(true) TitleStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("62")).Bold(true).Padding(0, 1) ErrorStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("9")) )
Shared palette/UI styles
Functions ¶
func ApplyTheme ¶
ApplyTheme updates the shared styles to match the active theme. Call this from the tui package whenever the theme changes.
func TruncateDisplayWidth ¶ added in v0.9.2
TruncateDisplayWidth truncates s to at most maxCols display columns. Uses rune width so wide chars and zero-width runes are counted correctly.
func TruncateRunes ¶ added in v0.9.2
TruncateRunes truncates s to at most maxLen runes. Uses rune Good for title/label fields where display width is handled elsewhere.
Types ¶
Click to show internal directories.
Click to hide internal directories.