tui

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Red = lipgloss.Color("9")
	//Purple = lipgloss.Color("13")
	Purple = lipgloss.Color("93")

	Cyan   = lipgloss.Color("14")
	Yellow = lipgloss.Color("11")
	White  = lipgloss.Color("252")
	Grey   = lipgloss.Color("245")

	ErrorStyle   = lipgloss.NewStyle().Foreground(Red)
	WarningStyle = lipgloss.NewStyle().Foreground(Yellow)
	BracketStyle = lipgloss.NewStyle().Foreground(Cyan)
	RocksetStyle = lipgloss.NewStyle().Foreground(Purple)
)
View Source
var (
	R       = Bracketed("R")
	Rockset = Bracketed("Rockset")

	Prompt             = R + "> "
	ContinuationPrompt = BracketStyle.Render(">") + RocksetStyle.Render(">") + "> "
)

Functions

func Bracketed

func Bracketed(msg string) string

func NewTable added in v0.0.13

func NewTable(out io.Writer) *table.Table

func ShowError added in v0.0.24

func ShowError(out io.Writer, debug bool, err error)

Types

type DoneMsg

type DoneMsg struct{}

type ErrMsg

type ErrMsg struct{ Err error }

type Input

type Input struct {
	Fields []string
	Err    error
	// contains filtered or unexported fields
}

func NewInput

func NewInput(title string, cfg []InputConfig) *Input

func (*Input) Init

func (i *Input) Init() tea.Cmd

func (*Input) Update

func (i *Input) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Input) View

func (i *Input) View() string

type InputConfig added in v0.0.10

type InputConfig struct {
	Prompt      string
	Placeholder string
	Validate    textinput.ValidateFunc
}

type ProgressModel

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

func NewTimeProgress

func NewTimeProgress(d time.Duration) *ProgressModel

func (*ProgressModel) Error

func (m *ProgressModel) Error() error

func (ProgressModel) Init

func (m ProgressModel) Init() tea.Cmd

func (*ProgressModel) Update

func (m *ProgressModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (ProgressModel) View

func (m ProgressModel) View() string

type Selector

type Selector struct {
	Selected int
	// contains filtered or unexported fields
}

func NewSelector

func NewSelector(values []string, selected int) *Selector

func (*Selector) Init

func (s *Selector) Init() tea.Cmd

func (*Selector) Update

func (s *Selector) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Selector) View

func (s *Selector) View() string

Jump to

Keyboard shortcuts

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