bubbleteautil

package
v0.0.0-...-2178f32 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ANSIBlack   = lipgloss.ANSIColor(0)
	ANSIRed     = lipgloss.ANSIColor(1)
	ANSIGreen   = lipgloss.ANSIColor(2)
	ANSIYellow  = lipgloss.ANSIColor(3)
	ANSIBlue    = lipgloss.ANSIColor(4)
	ANSIMagenta = lipgloss.ANSIColor(5)
	ANSICyan    = lipgloss.ANSIColor(6)
	ANSIWhite   = lipgloss.ANSIColor(7)
)
View Source
var (
	SemanticSuccess = ANSIGreen
	SemanticError   = ANSIRed
	SemanticWarning = ANSIYellow
	SemanticInfo    = ANSICyan
)
View Source
var (
	StyleForegroundSemanticInfo    = lipgloss.NewStyle().Foreground(SemanticInfo)
	StyleForegroundSemanticSuccess = lipgloss.NewStyle().Foreground(SemanticSuccess)
	StyleForegroundSemanticError   = lipgloss.NewStyle().Foreground(SemanticError)
)

Common styles. For complex ones, please define yourselves.

Functions

func HideError

func HideError() tea.Msg

Types

type HideErrorMsg

type HideErrorMsg struct{}

type Model

type Model interface {
	tea.Model
	Validate() (Model, bool)
	Focus() Model
	Blur() Model
	IsFocused() bool
	Value() string
	WithValue(val string) Model
	WithError(err error) Model
}

Model is an interface on top of tea.Model. A few methods are added to suit our use case.

type SimplePicker

type SimplePicker struct {
	Title  string
	Prompt string
	Items  []SimplePickerItem

	ValidateFunc func(string) error
	Err          error
	// contains filtered or unexported fields
}

func NewSimplePicker

func NewSimplePicker(picker SimplePicker) SimplePicker

func (SimplePicker) Blur

func (m SimplePicker) Blur() Model

func (SimplePicker) Focus

func (m SimplePicker) Focus() Model

func (SimplePicker) Init

func (m SimplePicker) Init() tea.Cmd

func (SimplePicker) IsFocused

func (m SimplePicker) IsFocused() bool

func (SimplePicker) Update

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

func (SimplePicker) Validate

func (m SimplePicker) Validate() (updated Model, valid bool)

func (SimplePicker) Value

func (m SimplePicker) Value() string

func (SimplePicker) View

func (m SimplePicker) View() string

func (SimplePicker) WithError

func (m SimplePicker) WithError(err error) Model

func (SimplePicker) WithValue

func (m SimplePicker) WithValue(val string) Model

type SimplePickerItem

type SimplePickerItem struct {
	Label string
	Value string
}

type SingleLineTextInput

type SingleLineTextInput struct {
	Title        string
	Prompt       string
	ValidateFunc func(string) error
	IsMasked     bool
	Err          error
	// contains filtered or unexported fields
}

func NewSingleLineTextInput

func NewSingleLineTextInput(textInput SingleLineTextInput) SingleLineTextInput

func (SingleLineTextInput) Blur

func (m SingleLineTextInput) Blur() Model

func (SingleLineTextInput) Focus

func (m SingleLineTextInput) Focus() Model

func (SingleLineTextInput) Init

func (m SingleLineTextInput) Init() tea.Cmd

func (SingleLineTextInput) IsFocused

func (m SingleLineTextInput) IsFocused() bool

func (SingleLineTextInput) Update

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

func (SingleLineTextInput) Validate

func (m SingleLineTextInput) Validate() (updated Model, valid bool)

func (SingleLineTextInput) Value

func (m SingleLineTextInput) Value() string

func (SingleLineTextInput) View

func (m SingleLineTextInput) View() string

func (SingleLineTextInput) WithError

func (m SingleLineTextInput) WithError(err error) Model

func (SingleLineTextInput) WithValue

func (m SingleLineTextInput) WithValue(val string) Model

Jump to

Keyboard shortcuts

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