utils

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ListStyles        = list.DefaultStyles()
	LabelStyle        = lipgloss.NewStyle().PaddingLeft(2).Foreground(lipgloss.Color("202"))
	TitleStyle        = list.DefaultStyles().Title.Background(lipgloss.Color("#b34100"))
	NonListTitleStyle = TitleStyle.Copy().MarginLeft(2).Background(lipgloss.Color("#b34100"))
)
View Source
var (
	CompatWorksStyle    = lipgloss.NewStyle().Foreground(lipgloss.Color("#00b12d"))
	CompatDamagedStyle  = lipgloss.NewStyle().Foreground(lipgloss.Color("#e69000"))
	CompatBrokenStyle   = lipgloss.NewStyle().Foreground(lipgloss.Color("#e60000"))
	CompatUntestedStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#838383"))
)
View Source
var (
	LogoForegroundStyles = []lipgloss.Style{
		lipgloss.NewStyle().Foreground(lipgloss.Color("#ff5f00")).Background(lipgloss.Color("#ff5f00")),
		lipgloss.NewStyle().Foreground(lipgloss.Color("#e65400")).Background(lipgloss.Color("#e65400")),
		lipgloss.NewStyle().Foreground(lipgloss.Color("#cc4b00")).Background(lipgloss.Color("#cc4b00")),
		lipgloss.NewStyle().Foreground(lipgloss.Color("#b34100")).Background(lipgloss.Color("#b34100")),
		lipgloss.NewStyle().Foreground(lipgloss.Color("#993800")).Background(lipgloss.Color("#993800")),
		lipgloss.NewStyle(),
	}
	LogoBackgroundStyles = []lipgloss.Style{
		lipgloss.NewStyle().Foreground(lipgloss.Color("255")),
		lipgloss.NewStyle().Foreground(lipgloss.Color("252")),
		lipgloss.NewStyle().Foreground(lipgloss.Color("249")),
		lipgloss.NewStyle().Foreground(lipgloss.Color("246")),
		lipgloss.NewStyle().Foreground(lipgloss.Color("243")),
		lipgloss.NewStyle().Foreground(lipgloss.Color("240")),
	}
)

Functions

func NewItemDelegate

func NewItemDelegate() list.ItemDelegate

func Ticker

func Ticker() tea.Cmd

Types

type Mod

type Mod struct {
	Name      string
	Reference string
}

type SimpleItem

type SimpleItem[T tea.Model] struct {
	Activate  func(msg tea.Msg, currentModel T) (tea.Model, tea.Cmd)
	ItemTitle string
}

func (SimpleItem[any]) Description

func (n SimpleItem[any]) Description() string

func (SimpleItem[any]) FilterValue

func (n SimpleItem[any]) FilterValue() string

func (SimpleItem[any]) Title

func (n SimpleItem[any]) Title() string

type SimpleItemExtra added in v0.0.9

type SimpleItemExtra[T tea.Model, E any] struct {
	Extra E
	SimpleItem[T]
}

type TickMsg

type TickMsg struct{}

Jump to

Keyboard shortcuts

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