Help us shape the future of Go! Take the 2026 Go Developer Survey

tui

package
v0.0.0-...-cf50716 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Catppuccin Mocha / Frappe palette
	ColorMauve   = lipgloss.Color("#cba6f7")
	ColorPink    = lipgloss.Color("#f5c2e7")
	ColorGreen   = lipgloss.Color("#a6e3a1")
	ColorPeach   = lipgloss.Color("#fab387")
	ColorBlue    = lipgloss.Color("#89b4fa")
	ColorSubtext = lipgloss.Color("#a6adc8")
	ColorOverlay = lipgloss.Color("#6c7086")
	ColorSurface = lipgloss.Color("#313244")
	ColorBase    = lipgloss.Color("#1e1e2e")
	ColorText    = lipgloss.Color("#cdd6f4")
	ColorWarning = lipgloss.Color("#f38ba8")

	// Component styles
	TitleStyle = lipgloss.NewStyle().
				Bold(true).
				Foreground(ColorMauve).
				Padding(0, 1)

	BadgeStyle = lipgloss.NewStyle().
				Bold(true).
				Foreground(ColorBase).
				Background(ColorMauve).
				Padding(0, 1)

	SubtleStyle = lipgloss.NewStyle().
				Foreground(ColorOverlay)

	SelectedCategoryStyle = lipgloss.NewStyle().
							Bold(true).
							Foreground(ColorMauve).
							Background(ColorSurface).
							Padding(0, 1)

	CategoryStyle = lipgloss.NewStyle().
					Foreground(ColorSubtext).
					Padding(0, 1)

	SelectedItemStyle = lipgloss.NewStyle().
						Bold(true).
						Foreground(ColorText).
						Background(ColorSurface)

	ItemStyle = lipgloss.NewStyle().
				Foreground(ColorText)

	CheckedStyle = lipgloss.NewStyle().
					Foreground(ColorGreen).
					Bold(true)

	UncheckedStyle = lipgloss.NewStyle().
					Foreground(ColorOverlay)

	DetailBoxStyle = lipgloss.NewStyle().
					Border(lipgloss.RoundedBorder()).
					BorderForeground(ColorMauve).
					Padding(1, 2)

	ListBoxStyle = lipgloss.NewStyle().
					Border(lipgloss.RoundedBorder()).
					BorderForeground(ColorOverlay).
					Padding(0, 1)

	FooterStyle = lipgloss.NewStyle().
				Foreground(ColorSubtext).
				Padding(0, 1)

	KeyStyle = lipgloss.NewStyle().
				Bold(true).
				Foreground(ColorPeach)

	WarningStyle = lipgloss.NewStyle().
					Foreground(ColorWarning)
)

Functions

This section is empty.

Types

type Model

type Model struct {
	DistroInfo distro.Info
	CfgMgr     *configs.Manager
	Items      []registry.Item
	Categories []registry.Category

	ActiveCatIdx int
	Cursor       int
	Selected     map[string]bool
	Modes        map[string]runner.InstallMode

	State  UIState
	Plan   *runner.Plan
	Logs   []string
	Err    error
	DryRun bool
	Width  int
	Height int
	// contains filtered or unexported fields
}

Model represents the Bubbletea application state.

func NewModel

func NewModel(d distro.Info, cfgMgr *configs.Manager, dryRun bool, preferredTheme string) Model

NewModel initializes the TUI model.

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

type UIState

type UIState int
const (
	StateSelecting UIState = iota
	StateReviewing
	StateRunning
	StateFinished
)

Jump to

Keyboard shortcuts

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