ui

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package ui is the Bubble Tea front end: one root model, five screens.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

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

func New

func New(lessons []content.Lesson, prog *progress.Progress, savePath, version string, checkUpdate func() string) Model

New builds the root model. version is the current build (shown on the title screen); checkUpdate is run once off the render path to learn whether a newer release exists — it returns the newer version string or "" (pass nil to disable the check entirely, e.g. for dev builds or in tests).

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 Palette

type Palette struct {
	Primary lipgloss.Color
	Accent  lipgloss.Color
}

func (Palette) PrimaryStyle

func (p Palette) PrimaryStyle() lipgloss.Style

PrimaryStyle is a lipgloss style foregrounded with the palette's primary color.

Jump to

Keyboard shortcuts

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