common

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SupportedThemeToDeltaSyntax = map[string]string{
	tint.TintCatppuccinFrappe.ID:      "Catppuccin Frappe",
	tint.TintCatppuccinMacchiato.ID:   "Catppuccin Macchiato",
	tint.TintCatppuccinMocha.ID:       "Catppuccin Mocha",
	tint.TintCatppuccinLatte.ID:       "Catppuccin Latte",
	tint.TintNeon.ID:                  "DarkNeon",
	tint.TintDracula.ID:               "Dracula",
	tint.TintMonokaiPro.ID:            "Monokai Extended",
	tint.TintNord.ID:                  "Nord",
	tint.TintOneHalfDark.ID:           "OneHalfDark",
	tint.TintGruvboxLight.ID:          "gruvbox-light",
	tint.TintGruvboxDark.ID:           "gruvbox-dark",
	tint.TintTokyoNight.ID:            "tokyonight_night",
	tint.TintZenburn.ID:               "zenburn",
	tint.TintGithub.ID:                "GitHub",
	tint.TintDimmedMonokai.ID:         "Monokai Extended Light",
	tint.TintOneHalfLight.ID:          "OneHalfLight",
	tint.TintBuiltinSolarizedLight.ID: "Solarized (light)",
	tint.TintBuiltinSolarizedDark.ID:  "Solarized (dark)",
}
View Source
var Themes *tint.Registry

Functions

func LipglossColorToHex added in v0.8.0

func LipglossColorToHex(c color.Color) string

lipglossColorToHex converts a color.Color to hex string

func RegisterSupportedTints added in v0.13.0

func RegisterSupportedTints()

Types

type Colors added in v0.8.0

type Colors struct {
	SelectionFg       color.Color
	SelectionBg       color.Color
	DarkerSelectionBg color.Color
	FaintBlue         func() color.Color
}

type Common

type Common struct {
	Width, Height int
	Styles        *Styles
}

Common is a struct that contains the width and height of a component.

type Component

type Component interface {
	SetSize(width, height int) tea.Cmd
}

type ErrMsg

type ErrMsg struct {
	Err     error
	Message string
}

type Scrollbar added in v0.12.0

type Scrollbar struct {
	Styles ScrollbarStyles
}

func (Scrollbar) View added in v0.12.0

func (m Scrollbar) View(trackHeight, totalItems, firstItemIdx int, lastItemIdx int) string

RenderScrollbar renders a vertical scrollbar track with a thumb indicator. It takes the viewport height, total number of items, and the current scroll item idx. Returns an empty string if all content fits.

type ScrollbarStyles added in v0.12.0

type ScrollbarStyles struct {
	Thumb lipgloss.Style
	Track lipgloss.Style
}

type Styles added in v0.13.0

type Styles struct {
	Tint   *tint.Tint
	Colors Colors
}

func MakeStyles added in v0.13.0

func MakeStyles() Styles

Jump to

Keyboard shortcuts

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