Documentation ¶
Index ¶
- Constants
- Variables
- func ContainsKey(v string, a []string) string
- func FocusedListKeyMap() blist.KeyMap
- func FocusedPanelKeyMap() viewport.KeyMap
- func HeaderView(titleText string, width int, focusColor lipgloss.AdaptiveColor) string
- func HelpStyle(width int) lipgloss.Style
- func NewFocusedDelegate() blist.DefaultDelegate
- func NewUnfocusedDelegate() blist.DefaultDelegate
- func NewUnfocusedHighlightDelegate() blist.DefaultDelegate
- func TruncateText(text string, width int) string
- func UnfocusedListKeyMap() blist.KeyMap
- func UnfocusedPanelKeyMap() viewport.KeyMap
- type Keys
- type TbdModal
- type WarnModal
Constants ¶
View Source
const TabOffset = 10
Variables ¶
View Source
var ( Subtle = lipgloss.AdaptiveColor{Light: "#D9DCCF", Dark: "#383838"} Highlight = lipgloss.AdaptiveColor{Light: "#6d26fc", Dark: "#7D56F4"} Focused = lipgloss.AdaptiveColor{Light: "#8378ab", Dark: "#bfb2eb"} Special = lipgloss.AdaptiveColor{Light: "#43BF6D", Dark: "#73F59F"} Background = lipgloss.AdaptiveColor{Light: "#c5c6c7", Dark: "#333436"} ActiveTabBorder = lipgloss.Border{ Top: "─", Bottom: " ", Left: "│", Right: "│", TopLeft: "╭", TopRight: "╮", BottomLeft: "┘", BottomRight: "└", } TabBorder = lipgloss.Border{ Top: "─", Bottom: "─", Left: "│", Right: "│", TopLeft: "╭", TopRight: "╮", BottomLeft: "┴", BottomRight: "┴", } Tab = lipgloss.NewStyle(). Border(TabBorder, true). BorderForeground(Highlight). Padding(0, 1) ActiveTab = Tab.Border(ActiveTabBorder, true) TabGap = Tab. BorderTop(false). BorderLeft(false). BorderRight(false) LabelStyle = lipgloss.NewStyle(). Margin(1). Foreground(Highlight) DialogBoxStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder(), true). BorderForeground(Highlight) PanelStyle = lipgloss.NewStyle(). Padding(0, 1). Margin(0, 1). Border(lipgloss.RoundedBorder(), false, true, true, true). BorderForeground(Highlight) PanelTitleStyle = func() lipgloss.Style { b := lipgloss.RoundedBorder() b.Right = "├" return lipgloss.NewStyle().BorderStyle(b).Padding(0, 1).BorderForeground(Highlight).Height(1) }() HighlightedBorderStyle = lipgloss.NewStyle().Foreground(Highlight) OverlayStyle = lipgloss.NewStyle(). Border(lipgloss.DoubleBorder(), true). BorderForeground(Focused). Padding(1, 1) BoxStyle = lipgloss.NewStyle(). Border(lipgloss.NormalBorder(), true). BorderForeground(Highlight). Padding(1, 2). Margin(1). Width(30) )
Style definitions.
View Source
var CommonHotkeys = Keys{ Quit: key.NewBinding( key.WithKeys("q", "ctrl+c"), key.WithHelp("q", "quit"), ), Help: key.NewBinding( key.WithKeys("?"), key.WithHelp("?", "toggle help"), ), ModelRight: key.NewBinding( key.WithKeys("tab"), key.WithHelp("tab", "model right"), ), ModelLeft: key.NewBinding( key.WithKeys("shift+tab"), key.WithHelp("shift+tab", "model left"), ), }
View Source
var ListHotkeys = listKeys{ Up: key.NewBinding( key.WithKeys("up", "k"), key.WithHelp("↑/k", "move up"), ), Down: key.NewBinding( key.WithKeys("down", "j"), key.WithHelp("↓/j", "move down"), ), Slash: key.NewBinding( key.WithKeys("/"), key.WithHelp("/", "filter"), ), Confirm: key.NewBinding( key.WithKeys("enter"), key.WithHelp("enter", "select"), ), Escape: key.NewBinding( key.WithKeys("esc"), key.WithHelp("esc", "cancel"), ), Help: key.NewBinding( key.WithKeys("?"), key.WithHelp("?", "toggle help"), ), }
View Source
var PickerHotkeys = pickerKeys{ Up: key.NewBinding( key.WithKeys("up", "k"), key.WithHelp("↑/k", "move up"), ), Down: key.NewBinding( key.WithKeys("down", "j"), key.WithHelp("↓/j", "move down"), ), Confirm: key.NewBinding( key.WithKeys("enter"), key.WithHelp("↳", "select"), ), Cancel: key.NewBinding( key.WithKeys("esc", "q"), key.WithHelp("esc/q", "cancel"), ), }
Functions ¶
func ContainsKey ¶
func FocusedListKeyMap ¶
func FocusedPanelKeyMap ¶
func HeaderView ¶
func HeaderView(titleText string, width int, focusColor lipgloss.AdaptiveColor) string
func NewFocusedDelegate ¶
func NewFocusedDelegate() blist.DefaultDelegate
func NewUnfocusedDelegate ¶
func NewUnfocusedDelegate() blist.DefaultDelegate
func NewUnfocusedHighlightDelegate ¶
func NewUnfocusedHighlightDelegate() blist.DefaultDelegate
func TruncateText ¶
func UnfocusedListKeyMap ¶
func UnfocusedPanelKeyMap ¶
Types ¶
type TbdModal ¶
type TbdModal struct {
// contains filtered or unexported fields
}
func NewTbdModal ¶
Click to show internal directories.
Click to hide internal directories.