ui

package
v0.0.23-wingettest2 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Header    = header.Copy().SetString("#").Render
	Skip      = header.Copy().Faint(true).SetString("# Skipped:").Render
	Hint      = hint.Copy().Render
	Underline = lipgloss.NewStyle().Underline(true).Render

	StepAlert      = lipgloss.NewStyle().SetString("    " + Announce("!")).Render
	StepDone       = lipgloss.NewStyle().SetString("    -").Render
	StepHint       = hint.Copy().SetString("    |").Render
	StepInProgress = lipgloss.NewStyle().SetString("    *").Render
	StepPrompt     = lipgloss.NewStyle().SetString("    " + Prompt.Render("?")).Render

	Accentuate         = lipgloss.NewStyle().Italic(true).Render
	Action             = lipgloss.NewStyle().Bold(true).Foreground(colorBrandPrimary).Render
	Announce           = lipgloss.NewStyle().Background(colorBrandSecondary).Render
	Emphasize          = lipgloss.NewStyle().Bold(true).Render
	EmphasizeUnderline = lipgloss.NewStyle().Bold(true).Underline(true).Render
	Titlize            = lipgloss.NewStyle().Bold(true).Render
	URL                = lipgloss.NewStyle().Faint(true).Underline(true).Render
	Whisper            = lipgloss.NewStyle().Faint(true).Render

	Prompt = lipgloss.NewStyle().Foreground(colorBrandPrimary)

	Waiting = spinner.MiniDot
)

Functions

func Domains

func Domains(domains []string) string

func Exit added in v0.0.11

func Exit() tea.Msg

func List

func List[T any](items []ListItem[T]) list.Model

func NewDriverTUI

func NewDriverTUI(ctx context.Context) (*Driver, Program)

func WaitingSpinner added in v0.0.10

func WaitingSpinner() spinner.Model

Types

type Driver

type Driver struct {
	Program // TUI mode

	TTY termenv.File

	Out io.Reader
	// contains filtered or unexported fields
}

func NewDriverTTY

func NewDriverTTY(ctx context.Context) *Driver

func NewDriverTest added in v0.0.14

func NewDriverTest(ctx context.Context) *Driver

func (*Driver) Activate

func (d *Driver) Activate(ctx context.Context, model tea.Model)

func (*Driver) FinalOut added in v0.0.20

func (d *Driver) FinalOut() []byte

func (*Driver) Init

func (d *Driver) Init() tea.Cmd

func (*Driver) Pause

func (d *Driver) Pause() chan<- struct{}

func (*Driver) Stop

func (d *Driver) Stop()

func (*Driver) Update

func (d *Driver) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Driver) View

func (d *Driver) View() string

type ListItem

type ListItem[T any] struct {
	Key   T
	Value string
}

func (ListItem[T]) FilterValue

func (li ListItem[T]) FilterValue() string

type Program

type Program interface {
	Quit()
	Run() (tea.Model, error)
	Send(tea.Msg)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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