Documentation
¶
Overview ¶
Package components is shared TUI components.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImageDisplay ¶
type ImageDisplay struct {
// contains filtered or unexported fields
}
ImageDisplay implements tea.ExecCommand to render an image in the terminal. bubbletea's tea.Exec temporarily releases the terminal (exits alt screen), lets us write graphics escape sequences, then restores the TUI on return.
func NewImageDisplay ¶
func NewImageDisplay(path string) *ImageDisplay
NewImageDisplay creates a tea.ExecCommand that tries terminal graphics protocols (Kitty, iTerm2, Sixel) before falling back to the system opener.
func (*ImageDisplay) Run ¶
func (d *ImageDisplay) Run() error
func (*ImageDisplay) SetStderr ¶
func (d *ImageDisplay) SetStderr(io.Writer)
func (*ImageDisplay) SetStdin ¶
func (d *ImageDisplay) SetStdin(r io.Reader)
func (*ImageDisplay) SetStdout ¶
func (d *ImageDisplay) SetStdout(w io.Writer)
type MedianCutQuantizer ¶
type MedianCutQuantizer struct {
NumColor int
}
MedianCutQuantizer implements a simple median-cut color quantizer.
type Progress ¶
type Progress struct {
// contains filtered or unexported fields
}
Progress shows a spinner with operation name and elapsed time.
func NewProgress ¶
func NewProgress() Progress
NewProgress creates a new progress spinner component.
func StartedProgress ¶
StartedProgress creates a Progress that is already active with the given operation.
func (*Progress) InitialTick ¶
InitialTick returns the spinner tick command without mutating state. Use this from value-receiver Init() methods after constructing with StartedProgress.
type ResultList ¶
type ResultList struct {
// contains filtered or unexported fields
}
ResultList renders a scrollable list of task results.
func NewResultList ¶
func NewResultList(width, height int) ResultList
NewResultList creates a new result list component.
func (*ResultList) AddResult ¶
func (r *ResultList) AddResult(result tasks.Result)
AddResult appends a result and auto-scrolls to bottom.
func (*ResultList) SetSize ¶
func (r *ResultList) SetSize(width, height int)
SetSize updates the viewport dimensions.