Documentation
¶
Overview ¶
Package styles provides shared terminal styling for tk commands. Uses Catppuccin Mocha color palette with lipgloss.
Brand fonts (for web/marketing):
- Geist: Headings & body text (https://vercel.com/font)
- Geist Mono: Code, CLI, logo
See logos/brand.html for full brand guidelines.
Index ¶
- Constants
- Variables
- func RenderDim(text string) string
- func RenderHeader(text string) string
- func RenderID(id string) string
- func RenderLabel(label string) string
- func RenderOwner(owner string) string
- func RenderPriority(priority int) string
- func RenderStatus(status string) string
- func RenderStatusWithLabel(status string) string
- func RenderTickStatus(t tick.Tick) string
- func RenderTickStatusWithBlocked(t tick.Tick, isBlocked bool) string
- func RenderType(tickType string) string
- func RenderVerdict(verdict string) string
Constants ¶
const ( // Accent colors ColorRed = lipgloss.Color("#F38BA8") // Red ColorPeach = lipgloss.Color("#FAB387") // Peach ColorYellow = lipgloss.Color("#F9E2AF") // Yellow ColorGreen = lipgloss.Color("#A6E3A1") // Green (primary brand color) ColorTeal = lipgloss.Color("#94E2D5") // Teal ColorBlue = lipgloss.Color("#89DCEB") // Sky ColorPurple = lipgloss.Color("#CBA6F7") // Mauve ColorPink = lipgloss.Color("#F5C2E7") // Pink // Text colors ColorText = lipgloss.Color("#CDD6F4") // Text ColorSubtext = lipgloss.Color("#A6ADC8") // Subtext0 ColorDim = lipgloss.Color("#7F849C") // Overlay1 ColorGray = lipgloss.Color("#6C7086") // Overlay0 // Background colors ColorSurface = lipgloss.Color("#313244") // Surface0 ColorBase = lipgloss.Color("#1E1E2E") // Base ColorMantle = lipgloss.Color("#181825") // Mantle ColorCrust = lipgloss.Color("#11111B") // Crust )
Catppuccin Mocha color palette
const ( IconOpen = "○" IconInProgress = "●" IconClosed = "✓" IconAwaiting = "◐" IconBlocked = "⊘" IconManual = "👤" IconPending = "⏳" )
Status icons (aligned with web UI)
const ( IconVerified = "✓" IconFailed = "✗" IconPendingV = "⋯" )
Verification icons
Variables ¶
var ( HeaderStyle = lipgloss.NewStyle().Bold(true).Foreground(ColorPink) LabelStyle = lipgloss.NewStyle().Foreground(ColorDim).Width(12) DimStyle = lipgloss.NewStyle().Foreground(ColorSubtext) BoldStyle = lipgloss.NewStyle().Bold(true) Yellow = lipgloss.NewStyle().Foreground(ColorYellow) Dim = lipgloss.NewStyle().Foreground(ColorDim) )
Base styles
var ( PriorityP0Style = lipgloss.NewStyle().Foreground(ColorRed).Bold(true) PriorityP1Style = lipgloss.NewStyle().Foreground(ColorPeach) PriorityP2Style = lipgloss.NewStyle().Foreground(ColorYellow) PriorityP3Style = lipgloss.NewStyle().Foreground(ColorGreen) PriorityP4Style = lipgloss.NewStyle().Foreground(ColorSubtext) )
Priority styles (aligned with web UI) P0=Critical(red), P1=High(peach), P2=Medium(yellow), P3=Low(green), P4=Backlog(gray)
var ( StatusOpenStyle = lipgloss.NewStyle().Foreground(ColorGray) StatusInProgressStyle = lipgloss.NewStyle().Foreground(ColorBlue) StatusClosedStyle = lipgloss.NewStyle().Foreground(ColorGreen) StatusAwaitingStyle = lipgloss.NewStyle().Foreground(ColorYellow) StatusBlockedStyle = lipgloss.NewStyle().Foreground(ColorRed) )
Status styles
var ( TypeEpicStyle = lipgloss.NewStyle().Foreground(ColorPurple) TypeBugStyle = lipgloss.NewStyle().Foreground(ColorRed) TypeFeatureStyle = lipgloss.NewStyle().Foreground(ColorTeal) TypeTaskStyle = lipgloss.NewStyle().Foreground(ColorSubtext) TypeChoreStyle = lipgloss.NewStyle().Foreground(ColorGray) )
Type styles
var ( VerdictApprovedStyle = lipgloss.NewStyle().Foreground(ColorGreen) VerdictRejectedStyle = lipgloss.NewStyle().Foreground(ColorRed) )
Verdict styles
var ( BoxStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(ColorGray). Padding(0, 1) BoxFocusedStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(ColorBlue). Padding(0, 1) )
Box styles for show command
Functions ¶
func RenderLabel ¶
RenderLabel renders a label with fixed width.
func RenderOwner ¶
RenderOwner returns a styled owner string with @ prefix.
func RenderPriority ¶
RenderPriority returns a color-coded priority string.
func RenderStatus ¶
RenderStatus returns a color-coded status symbol.
func RenderStatusWithLabel ¶
RenderStatusWithLabel returns a color-coded status icon plus text.
func RenderTickStatus ¶
RenderTickStatus returns a color-coded status symbol for a tick, accounting for awaiting state. Awaiting ticks show yellow half-circle.
func RenderTickStatusWithBlocked ¶
RenderTickStatusWithBlocked returns a color-coded status icon for a tick, accounting for workflow state priority: 1. Awaiting human -> yellow half-circle 2. Blocked -> red no-entry 3. Status (open/in_progress/closed)
func RenderType ¶
RenderType returns a color-coded type string.
func RenderVerdict ¶
RenderVerdict returns a color-coded verdict string.
Types ¶
This section is empty.