Documentation
¶
Overview ¶
Package tui provides a Bubble Tea component that shows a streakboard as a pixel image embedded in the layout, using the Kitty graphics protocol's Unicode placeholders (supported by Ghostty and kitty).
The board is ordinary text to Bubble Tea — placeholder cells the terminal overlays with the image — so it scrolls, moves, and composes like any other view content. GitHub-style month and weekday labels are composed around the image as plain dimmed text in the terminal's own font. The image bytes are sent out-of-band via tea.Raw commands; run the program on a TrueColor profile so the id-encoding placeholder colors are not downsampled.
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
}
Model is a Bubble Tea component displaying one streakboard. Create it with New, route Update messages to it, and place View's text anywhere in the layout.
func New ¶
func New(entries []streakboard.Entry, o streakboard.Options) Model
New returns a board showing entries rendered with o's palette, scale, and max. o.From and o.To are ignored: the window always ends today and sizes itself to the terminal width, up to one year.
func (Model) Close ¶
Close returns the command that removes the board's image from the terminal; sequence it before tea.Quit.
func (Model) Set ¶
func (m Model) Set(entries []streakboard.Entry, o streakboard.Options) (Model, tea.Cmd)
Set replaces the board's data and options and re-uploads the image.