ui

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package ui provides shared UI styling and components for the TUI application.

Index

Constants

This section is empty.

Variables

View Source
var (
	PrimaryColor   color.Color
	SecondaryColor color.Color
	AccentColor    color.Color
	MutedColor     color.Color
	SoftMutedColor color.Color
	TextColor      color.Color
	ModalBgColor   color.Color
	ErrorColor     color.Color
	LinkColor      color.Color
)

Colors used throughout the UI.

View Source
var (
	BorderStyle        lipgloss.Style
	CLIPreviewStyle    lipgloss.Style
	ErrorStyle         lipgloss.Style
	ErrorTitleStyle    lipgloss.Style
	FocusedBorderStyle lipgloss.Style
	HelpStyle          lipgloss.Style
	LinkStyle          lipgloss.Style
	NormalStyle        lipgloss.Style
	SelectedStyle      lipgloss.Style
	SubtitleStyle      lipgloss.Style
	TableDefaultStyle  lipgloss.Style
	TableDimmedStyle   lipgloss.Style
	TableHeaderStyle   lipgloss.Style
	TableItalicStyle   lipgloss.Style
	TableRowStyle      lipgloss.Style
	TableSelectedStyle lipgloss.Style
	TitleStyle         lipgloss.Style
)

Styles for the application (initialized in ApplyTheme).

Functions

func ApplyFuzzyFilter

func ApplyFuzzyFilter(query string, items []string) []string

ApplyFuzzyFilter returns items filtered by query using fuzzy matching. Returns original items if query is empty.

func ApplyTheme

func ApplyTheme()

ApplyTheme updates all colors and styles from current theme.

func FormatEmptyValue

func FormatEmptyValue(val string) string

FormatEmptyValue returns the display string for a value, showing ("") for empty strings.

func InitTheme

func InitTheme(t theme.Theme)

InitTheme sets the theme and applies colors.

func PadRight

func PadRight(s string, length int) string

PadRight pads a string to a specific length with spaces.

func PaneStyle

func PaneStyle(width, height int, focused bool) lipgloss.Style

PaneStyle returns a style for a pane with optional focus.

func RemoveListBackgrounds

func RemoveListBackgrounds(l list.Model) list.Model

RemoveListBackgrounds removes all backgrounds from a list.Model for modal overlay.

func RenderEmptyValue

func RenderEmptyValue(val string) string

RenderEmptyValue returns a styled string for a value, using italic style for empty strings.

func RenderScrollIndicator

func RenderScrollIndicator(hasMore, hasLess bool) string

RenderScrollIndicator renders scroll arrows (^ and v) for lists.

func TruncateWithEllipsis

func TruncateWithEllipsis(s string, maxLen int) string

TruncateWithEllipsis truncates a string to maxLen, adding "..." if truncated.

Types

This section is empty.

Directories

Path Synopsis
Package modal provides modal dialogs for user interactions in the TUI application.
Package modal provides modal dialogs for user interactions in the TUI application.
Package panes provides the main UI panes for workflow, history, and configuration views.
Package panes provides the main UI panes for workflow, history, and configuration views.
Package theme provides color theme detection and management for the TUI.
Package theme provides color theme detection and management for the TUI.

Jump to

Keyboard shortcuts

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