ui

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const HelpMarkdown = `` /* 775-byte string literal not displayed */

HelpMarkdown is the command reference shown in the help overlay.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action func(text string) tea.Cmd

Action runs after the user confirms prompt input.

type BaseHost

type BaseHost interface {
	TeaModel() tea.Model
	Styles() theme.Styles
	State() session.State
	TransitionTo(session.State) bool
	SetFooterContext(string)
	Width() int
	Height() int
}

BaseHost defines common methods UI components need from the Model.

type Confirm

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

Confirm owns the remove confirmation dialog.

func NewConfirm

func NewConfirm(host ConfirmHost) *Confirm

NewConfirm returns a confirm component wired to host.

func (*Confirm) Active

func (c *Confirm) Active() bool

func (*Confirm) BeginRemoveConfirm

func (c *Confirm) BeginRemoveConfirm()

func (*Confirm) Clear

func (c *Confirm) Clear()

func (*Confirm) HasPending

func (c *Confirm) HasPending() bool

HasPending reports whether a confirm action is queued.

func (*Confirm) RenderDialog

func (c *Confirm) RenderDialog() string

RenderDialog renders the confirm box (for tests and overlay).

func (*Confirm) RenderMainOverlay

func (c *Confirm) RenderMainOverlay() string

func (*Confirm) RequestRemove

func (c *Confirm) RequestRemove(eff panel.RemoveEffect) (tea.Model, tea.Cmd)

func (*Confirm) Update

func (c *Confirm) Update(msg tea.Msg) (tea.Cmd, bool)

type ConfirmHost

type ConfirmHost interface {
	BaseHost
	IsConfirming() bool
	SetStatus(string)
	PaneSizes() (int, int, int, int)
	Mutator() coordinator.Mutator
}

ConfirmHost exposes confirm-dialog needs from the app Model.

type Help

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

Help owns the F1 command reference overlay.

func NewHelp

func NewHelp(host HelpHost) *Help

NewHelp returns a help component wired to host.

func (*Help) Active

func (h *Help) Active() bool

func (*Help) Clear

func (h *Help) Clear()

func (*Help) Open

func (h *Help) Open(content string) (tea.Model, tea.Cmd)

func (*Help) RenderOverlay

func (h *Help) RenderOverlay() string

func (*Help) Update

func (h *Help) Update(msg tea.Msg) (tea.Cmd, bool)

type HelpHost

type HelpHost interface {
	BaseHost
	IsHelpOverlay() bool
	LastState() session.State
	ContentWidth() int
	ChromeHeights() (int, int)
}

HelpHost exposes help overlay needs from the app Model.

type Prompt

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

Prompt owns the temporary footer text input.

func NewPrompt

func NewPrompt(host BaseHost, cancelFunc func(string)) *Prompt

NewPrompt returns a prompt UI component wired to host.

func (*Prompt) Active

func (p *Prompt) Active() bool

func (*Prompt) Hide

func (p *Prompt) Hide()

func (*Prompt) PromptLabel

func (p *Prompt) PromptLabel() string

PromptLabel returns the active prompt label (for tests).

func (*Prompt) RenderFooter

func (p *Prompt) RenderFooter() string

func (*Prompt) Show

func (p *Prompt) Show(label, placeholder string, action Action) tea.Cmd

func (*Prompt) Update

func (p *Prompt) Update(msg tea.Msg) (tea.Cmd, bool)

Jump to

Keyboard shortcuts

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