tui

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColorScheme

type ColorScheme struct {
	// Title and branding
	Title      lipgloss.AdaptiveColor
	GitLabWave string // Pre-rendered gradient wave
	Version    lipgloss.AdaptiveColor
	ServerInfo lipgloss.AdaptiveColor

	// Input prompt
	Prompt lipgloss.AdaptiveColor

	// Project list
	Normal     lipgloss.AdaptiveColor
	Selected   lipgloss.AdaptiveColor
	SelectedBg lipgloss.AdaptiveColor
	Highlight  lipgloss.AdaptiveColor // For fuzzy match highlighting
	Snippet    lipgloss.AdaptiveColor

	// Status and counts
	Count       lipgloss.AdaptiveColor
	CountActive lipgloss.AdaptiveColor // Active/filtered count

	// Indicators
	Cursor          lipgloss.AdaptiveColor
	Excluded        lipgloss.AdaptiveColor
	ExcludedStarred lipgloss.AdaptiveColor // Pale gold for excluded starred projects

	// Status indicators
	StatusActive lipgloss.AdaptiveColor // Green for loading/syncing
	StatusError  lipgloss.AdaptiveColor // Red for errors
	StatusIdle   lipgloss.AdaptiveColor // Gray for idle

	// Help text
	Help lipgloss.AdaptiveColor
}

ColorScheme holds all adaptive color definitions for the TUI

func NewColorScheme

func NewColorScheme() *ColorScheme

NewColorScheme creates a new color scheme with adaptive colors for terminal theme

func (*ColorScheme) GetStyles

func (cs *ColorScheme) GetStyles() Styles

GetStyles returns pre-configured lipgloss styles using the color scheme

type HistoryLoadedMsg

type HistoryLoadedMsg struct {
	Err error
}

HistoryLoadedMsg is sent when history finishes loading

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model represents the TUI state

func New

func New(projects []model.Project, initialQuery string, onSync func() tea.Cmd, cacheDir string, cfg *config.Config, showScores bool, showHidden bool, username string, version string) Model

New creates a new TUI model with the given projects and optional initial query

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the model (required by tea.Model interface)

func (Model) Selected

func (m Model) Selected() string

Selected returns the selected project (or empty string if none)

func (Model) Update

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

Update handles messages and updates the model

func (Model) View

func (m Model) View() string

View renders the TUI

type Styles

type Styles struct {
	Title           lipgloss.Style
	Version         lipgloss.Style
	ServerInfo      lipgloss.Style
	Prompt          lipgloss.Style
	Normal          lipgloss.Style
	Selected        lipgloss.Style
	Highlight       lipgloss.Style
	Snippet         lipgloss.Style
	Count           lipgloss.Style
	CountActive     lipgloss.Style
	Cursor          lipgloss.Style
	Excluded        lipgloss.Style
	ExcludedStarred lipgloss.Style
	StatusActive    lipgloss.Style
	StatusError     lipgloss.Style
	StatusIdle      lipgloss.Style
	Help            lipgloss.Style
}

Styles holds pre-configured lipgloss styles

type SyncCompleteMsg

type SyncCompleteMsg struct {
	Err      error
	Projects []model.Project
}

SyncCompleteMsg is sent when sync completes

type SyncStartMsg

type SyncStartMsg struct{}

SyncStartMsg is sent when sync starts

Jump to

Keyboard shortcuts

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