tui

package
v0.0.33 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColorPrimary   = "#C9A227" // Antique Gold
	ColorSecondary = "#722F37" // Burgundy
	ColorError     = "#8B3A3A" // Deep Burgundy (errors)
	ColorWarning   = "#B8860B" // Dark Goldenrod
	ColorSuccess   = "#556B2F" // Dark Olive Green
	ColorInfo      = "#8B8178" // Warm Gray
	ColorText      = "#F5F1E8" // Cream
	ColorMuted     = "#6B6B6B" // Charcoal
	ColorBorder    = "#2C2C3A" // Deep Navy
	ColorAccent    = "#4A6741" // Sage
)

Old Money color palette — heritage, restraint, premium

Variables

View Source
var (
	TitleStyle       = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color(ColorPrimary))
	BoxStyle         = lipgloss.NewStyle().Border(lipgloss.RoundedBorder()).BorderForeground(lipgloss.Color(ColorBorder)).Padding(1, 2)
	BoxAccent        = lipgloss.NewStyle().Border(lipgloss.RoundedBorder()).BorderForeground(lipgloss.Color(ColorPrimary)).Padding(1, 2)
	BoxError         = lipgloss.NewStyle().Border(lipgloss.RoundedBorder()).BorderForeground(lipgloss.Color(ColorError)).Padding(1, 2)
	CheckStyle       = lipgloss.NewStyle().Foreground(lipgloss.Color(ColorSuccess))
	LabelStyle       = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color(ColorText))
	PathStyle        = lipgloss.NewStyle().Foreground(lipgloss.Color(ColorPrimary))
	ErrorStyle       = lipgloss.NewStyle().Foreground(lipgloss.Color(ColorError))
	WarningStyle     = lipgloss.NewStyle().Foreground(lipgloss.Color(ColorWarning))
	InfoStyle        = lipgloss.NewStyle().Foreground(lipgloss.Color(ColorInfo))
	SuccessStyle     = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color(ColorSuccess))
	MutedStyle       = lipgloss.NewStyle().Foreground(lipgloss.Color(ColorMuted))
	AccentStyle      = lipgloss.NewStyle().Foreground(lipgloss.Color(ColorAccent))
	BoldStyle        = lipgloss.NewStyle().Bold(true)
	HelpSectionStyle = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color(ColorSecondary))
	HelpUsageStyle   = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color(ColorPrimary))
)

Base styles

View Source
var (
	DotReady   = lipgloss.NewStyle().Foreground(lipgloss.Color(ColorSuccess)).Render("●")
	DotWarning = lipgloss.NewStyle().Foreground(lipgloss.Color(ColorWarning)).Render("●")
	DotError   = lipgloss.NewStyle().Foreground(lipgloss.Color(ColorError)).Render("●")
	DotInfo    = lipgloss.NewStyle().Foreground(lipgloss.Color(ColorInfo)).Render("●")
)

Status dot colors

Functions

func BrandBanner

func BrandBanner() string

BrandBanner returns the "HERA AGENT UNITY" wordmark rendered as three rows of box-drawing characters in TitleStyle (Antique Gold). Used at the top of the install / uninstall flows in place of a plain-text header.

func ColorEnabled

func ColorEnabled() bool

ColorEnabled reports whether stdout supports styled output. Returns false when stdout is redirected/piped, NO_COLOR is set, or the user explicitly opted out via HERA_PLAIN. Callers should emit plain text in that case so downstream tooling (scripts, AI agents) keeps parsing the existing format.

func DotStatus

func DotStatus(state string) string

DotStatus returns a colored dot + status text

func ErrorPanel

func ErrorPanel(title, message string) string

ErrorPanel renders an error in a styled box

func InfoPanel

func InfoPanel(title, message string) string

InfoPanel renders info in a styled box

func NewAssetConfigModel

func NewAssetConfigModel() tea.Model

NewAssetConfigModel creates a new TUI model for asset config.

func Progress

func Progress(current, total int) string

Progress renders a progress indicator like 3/10

func StatusBadge

func StatusBadge(status string) string

StatusBadge renders a colored status badge

func StatusPanel

func StatusPanel(title string, rows [][2]string) string

Status panel builder

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL