ui

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BodyHeight

func BodyHeight(totalHeight, footerHeight int) int

func FooterSwatch

func FooterSwatch(color256, footerFg string) string

Types

type App

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

func NewApp

func NewApp() App

func (App) Init

func (a App) Init() tea.Cmd

func (App) Update

func (a App) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (App) View

func (a App) View() string

type Layout

type Layout struct {
	Width  int
	Height int
	Styles Styles
}

func (Layout) BodyHeight

func (l Layout) BodyHeight(footerSegments []string) int

func (Layout) CenterBody

func (l Layout) CenterBody(bodyContent string, bodyHeight int) string

func (Layout) Render

func (l Layout) Render(title string, footerSegments []string, bodyContent string) string

func (Layout) SetSize

func (l Layout) SetSize(w, h int) Layout

type Styles

type Styles struct {
	Border   lipgloss.Style
	Footer   lipgloss.Style
	Title    lipgloss.Style
	Subtitle lipgloss.Style
	Cursor   lipgloss.Style
	Error    lipgloss.Style
	Success  lipgloss.Style
	Dim      lipgloss.Style
	Text     lipgloss.Style
	Marker   lipgloss.Style
}

func StylesFromConfig

func StylesFromConfig(cfg *config.Config) Styles

func (Styles) Layout

func (s Styles) Layout(width, height int, titleText string, footerSegments []string, bodyContent string, bodyHeight int) string

func (Styles) RenderFooter

func (s Styles) RenderFooter(segments []string, width int) string

func (Styles) RenderFooterHeight

func (s Styles) RenderFooterHeight(segments []string, width int) int

Jump to

Keyboard shortcuts

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