Versions in this module Expand all Collapse all v0 v0.3.2 Sep 6, 2023 v0.3.1 Sep 6, 2023 Changes in this version + func MakeStringerList(list ...string) []fmt.Stringer + type ConfigError error + type DefaultPrefixer struct + CurrentMarker string + FirstSep string + Number bool + NumberRelative bool + PrefixWrap bool + Seperator string + SeperatorWrap string + func NewPrefixer() *DefaultPrefixer + func (d *DefaultPrefixer) InitPrefixer(value fmt.Stringer, ...) int + func (d *DefaultPrefixer) Prefix(lineIndex, allLines int) string + type DefaultSuffixer struct + func NewSuffixer() *DefaultSuffixer + func (e *DefaultSuffixer) InitSuffixer(_ fmt.Stringer, currentItemIndex, cursorIndex, lineOffset, width, height int) int + func (e *DefaultSuffixer) Suffix(line, allLines int) string + type Model struct + CurrentStyle termenv.Style + CursorOffset int + EqualsFunc func(fmt.Stringer, fmt.Stringer) bool + Height int + LessFunc func(fmt.Stringer, fmt.Stringer) bool + LineStyle termenv.Style + PrefixGen Prefixer + SuffixGen Suffixer + Width int + Wrap int + func NewModel() Model + func (m *Model) AddItems(itemList ...fmt.Stringer) error + func (m *Model) Bottom() error + func (m *Model) GetAllItems() []fmt.Stringer + func (m *Model) GetCursorIndex() (int, error) + func (m *Model) GetCursorItem() (fmt.Stringer, error) + func (m *Model) GetIndex(toSearch fmt.Stringer) (int, error) + func (m *Model) GetItem(index int) (fmt.Stringer, error) + func (m *Model) Len() int + func (m *Model) Less(i, j int) bool + func (m *Model) MoveCursor(amount int) (int, error) + func (m *Model) MoveCursorItemBy(amount int) error + func (m *Model) MoveCursorItemTo(to int) error + func (m *Model) MoveItemBy(index, amount int) error + func (m *Model) MoveItemTo(from, to int) error + func (m *Model) RemoveIndex(index int) (fmt.Stringer, error) + func (m *Model) ResetItems(newStringers ...fmt.Stringer) error + func (m *Model) SetCursor(target int) (int, error) + func (m *Model) Sort() + func (m *Model) Swap(i, j int) + func (m *Model) Top() error + func (m *Model) UpdateItem(index int, updater func(fmt.Stringer) (fmt.Stringer, error)) error + func (m *Model) ValidIndex(index int) (int, error) + func (m Model) Init() tea.Cmd + func (m Model) Lines() ([]string, error) + func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) + func (m Model) View() string + type MultipleMatches error + type NilValue error + type NoItems error + type NotFound error + type OutOfBounds error + type Prefixer interface + InitPrefixer func(value fmt.Stringer, ...) int + Prefix func(currentLine, allLines int) string + type StringItem string + func (s StringItem) String() string + type Suffixer interface + InitSuffixer func(value fmt.Stringer, ...) int + Suffix func(currentLine, allLines int) string + type UnhandledKey error