browser

package
v0.0.0-...-e7c4f5f Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BrowserStyle lipgloss.Style = lipgloss.NewStyle().
	Padding(1, 1, 1, 1)
View Source
var FilterCursorStyle lipgloss.Style = lipgloss.NewStyle().
	Foreground(lipgloss.AdaptiveColor{Light: "#c65ace", Dark: "#c65ace"})
View Source
var FilterPlaceholderStyle lipgloss.Style = lipgloss.NewStyle()
View Source
var FilterPromptStyle lipgloss.Style = lipgloss.NewStyle().
	Foreground(lipgloss.AdaptiveColor{Light: "#04B575", Dark: "#ECFD65"}).
	Padding(0, 0, 0, 0).
	Bold(true)
View Source
var FilterValueStyle lipgloss.Style = lipgloss.NewStyle()
View Source
var FooterStyle lipgloss.Style = lipgloss.NewStyle().
	Padding(1, 0, 1, 0)
View Source
var HeaderStyle lipgloss.Style = lipgloss.NewStyle().
	Padding(0, 0, 0, 0)
View Source
var KeyTextStyle lipgloss.Style = lipgloss.NewStyle().
	Foreground(lipgloss.AdaptiveColor{Light: "#332233", Dark: "#998899"})
View Source
var KeyValueStyle lipgloss.Style = lipgloss.NewStyle().
	Foreground(lipgloss.AdaptiveColor{Light: "#336633", Dark: "#FFCC99"}).
	Bold(true)
View Source
var ListCountStyle lipgloss.Style = lipgloss.NewStyle().
	Padding(1, 0, 0, 0).
	Foreground(lipgloss.AdaptiveColor{Light: "#332233", Dark: "#998899"})
View Source
var ListCurrentStyle lipgloss.Style = lipgloss.NewStyle().
	Foreground(lipgloss.AdaptiveColor{Light: "#115511", Dark: "#BBFFBB"})
View Source
var ListItemStyle lipgloss.Style = lipgloss.NewStyle().
	Foreground(lipgloss.AdaptiveColor{Light: "#444844", Dark: "#BBBFBB"})
View Source
var ListStyle lipgloss.Style = lipgloss.NewStyle().
	Padding(1, 0, 0, 0)
View Source
var LogoStyle lipgloss.Style = lipgloss.NewStyle().
	Foreground(lipgloss.AdaptiveColor{Light: "#9c3a14ff", Dark: "#a94118"}).
	Padding(0, 0, 1, 0).
	Bold(true)
View Source
var PathLabelStyle lipgloss.Style = lipgloss.NewStyle().
	Foreground(lipgloss.AdaptiveColor{Light: "#c65ace", Dark: "#c65ace"}).
	Bold(true)
View Source
var PathValueStyle lipgloss.Style = lipgloss.NewStyle()

Functions

This section is empty.

Types

type Browser

type Browser struct {
	Header Header
	Footer Footer
	List   List
	// contains filtered or unexported fields
}

func New

func New() Browser

func (Browser) Height

func (b Browser) Height() int

func (Browser) Init

func (b Browser) Init() tea.Cmd

func (Browser) IsLoading

func (b Browser) IsLoading() bool

func (*Browser) SetFooterEnabled

func (b *Browser) SetFooterEnabled(v bool) *Browser

func (*Browser) SetHeaderEnabled

func (b *Browser) SetHeaderEnabled(v bool) *Browser

func (*Browser) SetHeight

func (b *Browser) SetHeight(v int) *Browser

func (*Browser) SetListEnabled

func (b *Browser) SetListEnabled(v bool) *Browser

func (*Browser) SetLoading

func (b *Browser) SetLoading(v bool) *Browser

func (*Browser) SetWidth

func (b *Browser) SetWidth(v int) *Browser

func (Browser) Update

func (b Browser) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Browser) View

func (b Browser) View() (content string)

func (Browser) Width

func (b Browser) Width() int

type BrowserResizeMsg

type BrowserResizeMsg struct {
	BrowserHeight int
	BrowserWidth  int
	HeaderHeight  int
	HeaderWidth   int
	ListHeight    int
	ListWidth     int
	FooterHeight  int
	FooterWidth   int
}

type FilterStateMsg

type FilterStateMsg struct {
	Enabled bool
	Active  bool
	Applied bool
	Value   string
}
type Footer struct {
	// contains filtered or unexported fields
}

func NewFooter

func NewFooter() Footer

func (Footer) Init

func (f Footer) Init() tea.Cmd

func (Footer) IsEnabled

func (f Footer) IsEnabled() bool

func (*Footer) RebuildKeys

func (f *Footer) RebuildKeys() *Footer

func (*Footer) SetEnabled

func (f *Footer) SetEnabled(v bool) *Footer

func (Footer) Update

func (f Footer) Update(msg tea.Msg) (Footer, tea.Cmd)

func (Footer) View

func (f Footer) View() (content string)
type Header struct {
	Filter textinput.Model
	// contains filtered or unexported fields
}

func NewHeader

func NewHeader() Header

func (Header) Init

func (h Header) Init() tea.Cmd

func (*Header) SetEnabled

func (h *Header) SetEnabled(v bool) *Header

func (Header) Update

func (h Header) Update(msg tea.Msg) (Header, tea.Cmd)

func (Header) View

func (h Header) View() (content string)

type Key

type Key struct {
	Values []string
	Label  string
}
var FilterKey Key = Key{
	Values: []string{"f"},
	Label:  "filter",
}
var QuitKey Key = Key{
	Values: []string{"q"},
	Label:  "quit",
}

func (Key) Render

func (k Key) Render() string

type List

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

func NewList

func NewList() List

func (List) FilteredOptions

func (l List) FilteredOptions() Options

func (List) Init

func (l List) Init() tea.Cmd

func (List) IsEnabled

func (l List) IsEnabled() bool

func (*List) SetEnabled

func (l *List) SetEnabled(v bool) *List

func (List) Update

func (l List) Update(msg tea.Msg) (List, tea.Cmd)

func (List) View

func (l List) View() string

type Option

type Option string

func (Option) IsDir

func (o Option) IsDir() bool

func (Option) IsFile

func (o Option) IsFile() bool

func (Option) Len

func (o Option) Len() int

func (Option) String

func (o Option) String() string

type OptionSelectedMsg

type OptionSelectedMsg struct {
	Option Option
	Path   []Option
}

type Options

type Options []Option

func (Options) Len

func (o Options) Len() int

func (Options) String

func (o Options) String(i int) string

type OptionsChangedMsg

type OptionsChangedMsg struct {
	Options []Option
}

type OptionsLoadingMsg

type OptionsLoadingMsg struct{}

Jump to

Keyboard shortcuts

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