Documentation
¶
Index ¶
- Variables
- func AnsiCol(content string, width int) string
- func AnsiTrim(content string, width int) string
- func AsCommand(msg tea.Msg) tea.Cmd
- func DefaultDefocus(s lipgloss.Style) lipgloss.Style
- func DefaultFocus(s lipgloss.Style) lipgloss.Style
- func NewFooter(model tea.Model, footer string) tea.Model
- func NewKillable(delegate tea.Model) tea.Model
- func Resolve(req []SizeDefinition, max int) []int
- func WithBorder(m tea.Model) tea.Model
- type ActivateTabMsg
- type Bordered
- type Detail
- type FilterableList
- type FilterableListOpts
- type FocusGroup
- type FocusMsg
- type FocusedItemMsg
- type GrabInput
- type Horizontal
- type Killable
- type List
- func (t *List[T]) ChangeStyle(f func(orig lipgloss.Style) lipgloss.Style)
- func (t *List[T]) Empty() bool
- func (t *List[T]) Init() tea.Cmd
- func (t *List[T]) Reset()
- func (t *List[T]) Select(ix int)
- func (t *List[T]) Selected() T
- func (t *List[T]) SetContent(n []T)
- func (t *List[T]) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (t *List[T]) View() string
- type OverridableInput
- type Panel
- type Panels
- type RefreshMsg
- type ReleaseInput
- type Scrolled
- type Size
- type SizeDefinition
- type Tab
- type Tabs
- type Text
- type TreeList
- type Vertical
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Selected = lipgloss.NewStyle().Background(lipgloss.Color("#404040"))
)
View Source
var (
White = lipgloss.Color("#FFFFFF")
)
Functions ¶
func Resolve ¶
func Resolve(req []SizeDefinition, max int) []int
Types ¶
type ActivateTabMsg ¶
type Detail ¶
func (*Detail[T]) ChangeStyle ¶
type FilterableList ¶
func NewFilterableList ¶
func NewFilterableList[T any](content []T, render func(T) string, filter func(string, T) bool, opts ...FilterableListOpts[T]) *FilterableList[T]
func (*FilterableList[T]) Init ¶
func (t *FilterableList[T]) Init() tea.Cmd
func (*FilterableList[T]) View ¶
func (f *FilterableList[T]) View() string
type FilterableListOpts ¶
type FilterableListOpts[T any] func(*FilterableList[T])
func FilterableListInitialFilter ¶
func FilterableListInitialFilter[T any](s string) FilterableListOpts[T]
type FocusGroup ¶
func NewFocusGroup ¶
func NewFocusGroup(child tea.Model) *FocusGroup
func (*FocusGroup) Add ¶
func (f *FocusGroup) Add(m tea.Model)
func (*FocusGroup) Init ¶
func (f *FocusGroup) Init() tea.Cmd
func (*FocusGroup) View ¶
func (f *FocusGroup) View() string
type FocusedItemMsg ¶
type FocusedItemMsg[T any] struct { Item T }
type Horizontal ¶
type Horizontal struct { Size tea.WindowSizeMsg Children Panels }
func (*Horizontal) Add ¶
func (v *Horizontal) Add(model tea.Model, size SizeDefinition)
func (*Horizontal) Init ¶
func (v *Horizontal) Init() tea.Cmd
func (*Horizontal) View ¶
func (v *Horizontal) View() string
type List ¶
type List[T any] struct { Render func(T) string SelectedStyle lipgloss.Style Focused bool // contains filtered or unexported fields }
func (*List[T]) ChangeStyle ¶
func (*List[T]) SetContent ¶
func (t *List[T]) SetContent(n []T)
type OverridableInput ¶
type OverridableInput struct {
// contains filtered or unexported fields
}
type Panel ¶
type Panel struct { tea.Model Size SizeDefinition }
type RefreshMsg ¶
type RefreshMsg struct { }
type ReleaseInput ¶
type ReleaseInput struct { }
type Scrolled ¶
type Scrolled struct { Content func() string Width int Height int Lines []string Start int Style lipgloss.Style Focused bool }
func NewScrolled ¶
func (*Scrolled) ResetPosition ¶
func (t *Scrolled) ResetPosition()
func (*Scrolled) ScrollToEnd ¶
func (t *Scrolled) ScrollToEnd()
type Size ¶
func NewSizeFromSizeMsg ¶
func NewSizeFromSizeMsg(msg tea.WindowSizeMsg) Size
type SizeDefinition ¶
type SizeDefinition interface { }
func FixedSize ¶
func FixedSize(v int) SizeDefinition
func RatioSize ¶
func RatioSize(d int) SizeDefinition
func RemainingSize ¶
func RemainingSize() SizeDefinition
type Text ¶
type TreeList ¶
func NewTreeList ¶
func (*TreeList[L, T]) CurrentLevel ¶
func (t *TreeList[L, T]) CurrentLevel() L
func (*TreeList[L, T]) NavigateTo ¶
type Vertical ¶
type Vertical struct { Size tea.WindowSizeMsg Children Panels }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.