Documentation ¶
Index ¶
- func RenderAction(action types.Action, old, new string) types.Action
- func RenderCommand(command *types.Command, old, new string) *types.Command
- type ActionList
- func (al *ActionList) Blur()
- func (al *ActionList) Clear()
- func (al *ActionList) Focus() tea.Cmd
- func (al ActionList) Focused() bool
- func (al *ActionList) SetActions(actions ...types.Action)
- func (al *ActionList) SetSize(w, h int)
- func (al *ActionList) SetTitle(title string)
- func (al ActionList) Update(msg tea.Msg) (ActionList, tea.Cmd)
- func (al ActionList) View() string
- type Checkbox
- type CommandRunner
- func (c *CommandRunner) Init() tea.Cmd
- func (runner *CommandRunner) Refresh() tea.Msg
- func (c *CommandRunner) SetIsloading(isLoading bool) tea.Cmd
- func (c *CommandRunner) SetSize(width, height int)
- func (runner *CommandRunner) Update(msg tea.Msg) (Page, tea.Cmd)
- func (c *CommandRunner) View() string
- type ContentMsg
- type Detail
- type DetailMsg
- type DropDown
- func (d *DropDown) Blur()
- func (d *DropDown) Focus() tea.Cmd
- func (dd DropDown) HasMatch() bool
- func (dd *DropDown) Height() int
- func (dd *DropDown) SetWidth(width int)
- func (d DropDown) Title() string
- func (d *DropDown) Update(msg tea.Msg) (FormInput, tea.Cmd)
- func (d DropDown) Value() string
- func (dd DropDown) View() string
- type DropDownItem
- type ExitMsg
- type Filter
- func (m *Filter) CursorDown()
- func (m *Filter) CursorUp()
- func (f *Filter) FilterItems(query string)
- func (m Filter) Init() tea.Cmd
- func (f *Filter) Select(id string)
- func (f Filter) Selection() FilterItem
- func (f *Filter) SetItems(items []FilterItem)
- func (f *Filter) SetSize(width, height int)
- func (f Filter) Update(msg tea.Msg) (Filter, tea.Cmd)
- func (m Filter) View() string
- type FilterItem
- type Footer
- type Form
- type FormInput
- type FormItem
- type Header
- type IsLoadingMsg
- type List
- func (c *List) Init() tea.Cmd
- func (c List) Query() string
- func (c *List) RefreshDetail()
- func (c List) Selection() *ListItem
- func (c *List) SetIsLoading(isLoading bool) tea.Cmd
- func (c *List) SetItems(items []ListItem, selectedId string) tea.Cmd
- func (c *List) SetQuery(query string)
- func (c *List) SetSize(width, height int)
- func (c *List) Update(msg tea.Msg) (Page, tea.Cmd)
- func (c List) View() string
- type ListItem
- type Match
- type Page
- type PageGenerator
- type Paginator
- type PopPageMsg
- type PushPageMsg
- type QueryChangeMsg
- type SelectionChangeMsg
- type SubmitFormMsg
- type SunbeamOptions
- type TextArea
- type TextInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActionList ¶
type ActionList struct {
// contains filtered or unexported fields
}
func NewActionList ¶
func NewActionList() ActionList
func (*ActionList) Blur ¶
func (al *ActionList) Blur()
func (*ActionList) Clear ¶
func (al *ActionList) Clear()
func (*ActionList) Focus ¶
func (al *ActionList) Focus() tea.Cmd
func (ActionList) Focused ¶
func (al ActionList) Focused() bool
func (*ActionList) SetActions ¶
func (al *ActionList) SetActions(actions ...types.Action)
func (*ActionList) SetSize ¶
func (al *ActionList) SetSize(w, h int)
func (*ActionList) SetTitle ¶
func (al *ActionList) SetTitle(title string)
func (ActionList) Update ¶
func (al ActionList) Update(msg tea.Msg) (ActionList, tea.Cmd)
func (ActionList) View ¶
func (al ActionList) View() string
type Checkbox ¶
type Checkbox struct {
// contains filtered or unexported fields
}
func NewCheckbox ¶
type CommandRunner ¶
type CommandRunner struct { Generator PageGenerator // contains filtered or unexported fields }
func NewRunner ¶
func NewRunner(generator PageGenerator) *CommandRunner
func (*CommandRunner) Init ¶
func (c *CommandRunner) Init() tea.Cmd
func (*CommandRunner) Refresh ¶
func (runner *CommandRunner) Refresh() tea.Msg
func (*CommandRunner) SetIsloading ¶
func (c *CommandRunner) SetIsloading(isLoading bool) tea.Cmd
func (*CommandRunner) SetSize ¶
func (c *CommandRunner) SetSize(width, height int)
func (*CommandRunner) View ¶
func (c *CommandRunner) View() string
type ContentMsg ¶
type ContentMsg string
type Detail ¶
type Detail struct { Style lipgloss.Style Language string ContentCmd func() string // contains filtered or unexported fields }
func (*Detail) RefreshContent ¶
func (c *Detail) RefreshContent()
type DropDown ¶
type DropDown struct {
// contains filtered or unexported fields
}
func NewDropDown ¶
type DropDownItem ¶
type DropDownItem struct {
// contains filtered or unexported fields
}
func (DropDownItem) FilterValue ¶
func (d DropDownItem) FilterValue() string
func (DropDownItem) ID ¶
func (d DropDownItem) ID() string
type Filter ¶
type Filter struct {
Width, Height int
Query string
Less func(i, j FilterItem) bool
EmptyText string
DrawLines bool
// contains filtered or unexported fields
}
func (*Filter) CursorDown ¶
func (m *Filter) CursorDown()
func (*Filter) FilterItems ¶
func (Filter) Selection ¶
func (f Filter) Selection() FilterItem
func (*Filter) SetItems ¶
func (f *Filter) SetItems(items []FilterItem)
type FilterItem ¶
type Footer ¶
type Footer struct { // contains filtered or unexported fields }
func (*Footer) SetBindings ¶
type Form ¶
type Form struct {
// contains filtered or unexported fields
}
func (*Form) CurrentItem ¶
func (*Form) ScrollViewport ¶
func (c *Form) ScrollViewport()
type IsLoadingMsg ¶
type IsLoadingMsg struct{}
type List ¶
type List struct { DetailFunc func(types.ListItem) string ReloadOnQueryChange bool ShowPreview bool // contains filtered or unexported fields }
func (*List) RefreshDetail ¶
func (c *List) RefreshDetail()
type ListItem ¶
Probably not necessary, need to be refactored
func ParseScriptItem ¶
func (ListItem) FilterValue ¶
type PageGenerator ¶
func NewCommandGenerator ¶
func NewCommandGenerator(command *types.Command) PageGenerator
func NewFileGenerator ¶
func NewFileGenerator(name string) PageGenerator
func NewStaticGenerator ¶ added in v0.9.2
func NewStaticGenerator(reader io.Reader) PageGenerator
type Paginator ¶
func NewPaginator ¶
func NewPaginator(root Page, options SunbeamOptions) *Paginator
type PopPageMsg ¶
type PopPageMsg struct{}
type PushPageMsg ¶
type PushPageMsg struct {
Page Page
}
type QueryChangeMsg ¶ added in v0.9.18
type QueryChangeMsg struct {
Query string
}
type SelectionChangeMsg ¶
type SelectionChangeMsg struct {
SelectionId string
}
type SubmitFormMsg ¶
type SunbeamOptions ¶
type TextArea ¶
func NewTextArea ¶
type TextInput ¶
func NewTextInput ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.