Documentation
¶
Overview ¶
Package theme defines lipgloss styles shared across the Jira TUI. The structure mirrors pagerduty-client's theme: package-level style vars derived from a clib theme, applied once via Apply(). All chrome and content styles are derived from clib theme colors so that swapping the underlying theme reskins the entire TUI.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( StatusToDo = lipgloss.NewStyle().Foreground(Theme.Blue.GetForeground()) StatusInProgress = lipgloss.NewStyle().Foreground(Theme.Yellow.GetForeground()).Bold(true) StatusDone = lipgloss.NewStyle().Foreground(Theme.Green.GetForeground()) StatusBlocked = lipgloss.NewStyle().Foreground(Theme.Red.GetForeground()).Bold(true) )
Status styles — mapped to Jira issue status categories.
var ( StatusOK = lipgloss.NewStyle().Foreground(Theme.Green.GetForeground()).Bold(true) StatusErr = lipgloss.NewStyle().Foreground(Theme.Red.GetForeground()).Bold(true) )
Status flash styles for action feedback.
var ( Pill = lipgloss.NewStyle().Padding(0, 1) PillDanger = Pill.Foreground(Theme.Red.GetForeground()).Bold(true) PillWarning = Pill.Foreground(Theme.Yellow.GetForeground()) PillDim = Pill.Faint(true) PillOK = Pill.Foreground(Theme.Green.GetForeground()) )
Pill styles for header counts.
var ( ColorStatusBarFg = Theme.MarkdownText.GetForeground() ColorTitleFg = Theme.MarkdownText.GetForeground() ColorHeaderFg = Theme.Blue.GetForeground() )
UI chrome colors.
var ( HelpKey = lipgloss.NewStyle().Foreground(Theme.Yellow.GetForeground()).Bold(true) HelpDesc = *Theme.Dim )
HelpKey / HelpDesc style key labels and descriptions in help/hint bars.
var ( DetailHeader = lipgloss.NewStyle().Bold(true).Foreground(Theme.Magenta.GetForeground()) DetailLabel = lipgloss.NewStyle().Bold(true).Foreground(Theme.Green.GetForeground()) DetailValue = lipgloss.NewStyle().Foreground(Theme.MarkdownText.GetForeground()) DetailDim = lipgloss.NewStyle().Faint(true) )
Detail view styles for the issue detail viewport.
var ( Paused = lipgloss.NewStyle().Foreground(Theme.Red.GetForeground()).Bold(true) Active = lipgloss.NewStyle().Foreground(Theme.Green.GetForeground()).Bold(true) )
Refresh indicator styles.
var HelpOverlay = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(Theme.Dim.GetForeground()). Padding(1, 2)
HelpOverlay outer container style (rounded border, padded, no bg).
var PriorityStyles = map[string]lipgloss.Style{ "Highest": lipgloss.NewStyle().Foreground(Theme.Red.GetForeground()).Bold(true), "High": lipgloss.NewStyle().Foreground(Theme.Orange.GetForeground()).Bold(true), "Medium": lipgloss.NewStyle().Foreground(Theme.Yellow.GetForeground()), "Low": lipgloss.NewStyle().Foreground(Theme.Blue.GetForeground()), "Lowest": lipgloss.NewStyle().Faint(true), }
Priority styles — Jira priority labels.
var TableHeader = lipgloss.NewStyle(). Foreground(ColorHeaderFg). Bold(true). BorderStyle(lipgloss.NormalBorder()). BorderBottom(true)
TableHeader is the column header style for the issue list.
var Theme = config.DefaultTheme()
Theme is the shared clib theme instance.
var Title = lipgloss.NewStyle().Foreground(ColorTitleFg).Bold(true).Padding(0, 1)
Title for section/panel titles.
Functions ¶
func Apply ¶
Apply resets all derived styles to the given clib theme. Runs at most once per process; subsequent calls are no-ops (matching pdc's pattern, which avoids style flicker mid-render).
func EntityColor ¶
EntityColor returns a deterministic style for a named entity (assignee, project, etc) by hashing into the fixed mid-tone entity palette.
func PriorityStyle ¶
PriorityStyle returns the style for a Jira priority name plus an ok flag.
func RenderEntityNames ¶
RenderEntityNames colors each name individually and joins with ", ".
func Resolve ¶
Resolve returns a clib theme for the given preset name. The "auto" name detects the terminal background (the TUI always runs on a TTY) and picks clib's light or dark theme so hash-based entity colors contrast. An empty or unrecognized name falls back to the process default, which honors the JIRA_THEME override before the dark built-in.
func StatusStyle ¶
StatusStyle returns the style for a Jira status name. Falls back to the dim style for unknown statuses.
Types ¶
This section is empty.