styles

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2025 License: MIT Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Basic Palette
	DeepSlate       = lipgloss.Color("#1a1d1f")
	White           = lipgloss.Color("#FAFAFA")
	LightGray       = lipgloss.Color("#F4F4F4") // Renamed from lightGrey for convention
	TerminalRed     = lipgloss.Color("#ff0000") // Or lipgloss.Color("1") or "9" depending on which red
	TerminalGreen   = lipgloss.Color("#00751b") // Or lipgloss.Color("2") or "10"
	TerminalBlack   = lipgloss.Color("#000000")
	TerminalWhite   = lipgloss.Color("#ffffff")
	TerminalLime    = lipgloss.Color("#00ff00")
	TerminalOlive   = lipgloss.Color("#77741d")
	TerminalYellow  = lipgloss.Color("#ffff00")
	TerminalBlue    = lipgloss.Color("#0000ff")
	TerminalNavy    = lipgloss.Color("#000771")
	TerminalPurple  = lipgloss.Color("#750071")
	TerminalMagenta = lipgloss.Color("#ff00ff")
	TerminalCyan    = lipgloss.Color("#00ffff")
	TerminalGray    = lipgloss.Color("#757575")
	TerminalSilver  = lipgloss.Color("#b8b8b8")
	TerminalTeal    = lipgloss.Color("#007674")
	TerminalMaroon  = lipgloss.Color("#780003")

	// Semantic Palette (Example using AdaptiveColor like Tailwind's HSL vars)
	// Replace these placeholders with actual Light/Dark hex or ANSI codes
	Primary     = lipgloss.AdaptiveColor{Light: "#750071", Dark: "#ff00ff"} // Example purple tones
	PrimaryDim  = lipgloss.AdaptiveColor{Light: "#8F4EEF", Dark: "#D0AAF0"} // Example dimmed purple
	PrimaryFg   = lipgloss.AdaptiveColor{Light: "#FFFFFF", Dark: "#000000"}
	Secondary   = lipgloss.AdaptiveColor{Light: "#0000ff", Dark: "#0000ff"} // Example teal tones
	SecondaryFg = lipgloss.AdaptiveColor{Light: "#000000", Dark: "#000000"}
	Background  = lipgloss.AdaptiveColor{Light: "#FFFFFF", Dark: "#121212"}
	Foreground  = lipgloss.AdaptiveColor{Light: "#000000", Dark: "#FFFFFF"}
	Muted       = lipgloss.AdaptiveColor{Light: "#BDBDBD", Dark: "#757575"} // Example gray tones
	MutedFg     = lipgloss.AdaptiveColor{Light: "#616161", Dark: "#BDBDBD"}
	Error       = lipgloss.AdaptiveColor{Light: "#B00020", Dark: "#CF6679"} // Example red tones
	ErrorFg     = lipgloss.AdaptiveColor{Light: "#FFFFFF", Dark: "#000000"}
	BorderColor = lipgloss.AdaptiveColor{Light: "#E0E0E0", Dark: "#424242"}
)
View Source
var (
	// Base Styles
	AppStyle = lipgloss.NewStyle().Padding(1, 2) // Base padding for the whole app view

	BaseTextStyle = lipgloss.NewStyle().Foreground(Foreground)

	// Semantic Text Styles (inherit from BaseTextStyle)
	PrimaryTextStyle   = BaseTextStyle.Foreground(Primary)
	SecondaryTextStyle = BaseTextStyle.Foreground(Secondary)
	MutedTextStyle     = BaseTextStyle.Foreground(Muted)
	ErrorTextStyle     = BaseTextStyle.Bold(true).Foreground(Error)

	// Component Styles
	HeaderStyle = lipgloss.NewStyle().
				Bold(true).
				Foreground(PrimaryFg).
				Background(Primary).
				Padding(0, 1)

	StatusStyle = lipgloss.NewStyle().
				Inherit(AppStyle).
				BorderStyle(lipgloss.RoundedBorder()).
				BorderForeground(BorderColor).
				Padding(0, 1)

	SelectedListItemStyle = lipgloss.NewStyle().
							Foreground(PrimaryFg).
							Background(PrimaryDim).
							Padding(0, 1)

	NormalListItemStyle = lipgloss.NewStyle().
						Padding(0, 1) // Basic padding for alignment

	HelpStyle = MutedTextStyle.Padding(1, 0)

	// Version Control Styles
	HeadStatusStyle = BaseTextStyle.
					Foreground(Primary).
					Italic(true).
					Padding(1, 0)

	BranchNameStyle = BaseTextStyle.
					Bold(true).
					Foreground(Primary)

	VmIDStyle = BaseTextStyle.
				Background(TerminalSilver)
)

Functions

func StyleForState

func StyleForState(baseStyle lipgloss.Style, isSelected bool) lipgloss.Style

StyleForState returns a style based on some condition (e.g., focused, blurred)

Types

type BranchStyles

type BranchStyles struct {
	// Base container style
	Container lipgloss.Style

	// Headers and titles
	Header     lipgloss.Style
	SubHeader  lipgloss.Style
	ListHeader lipgloss.Style

	// Branch and VM identifiers
	BranchName   lipgloss.Style
	VMID         lipgloss.Style
	CurrentState lipgloss.Style

	// Status and progress
	Progress lipgloss.Style
	Success  lipgloss.Style
	Warning  lipgloss.Style
	Error    lipgloss.Style

	// Information and help
	Info       lipgloss.Style
	InfoLabel  lipgloss.Style
	InfoValue  lipgloss.Style
	ListItem   lipgloss.Style
	Tip        lipgloss.Style
	HeadStatus lipgloss.Style
}

BranchStyles contains all styles used in the branch command

func NewBranchStyles

func NewBranchStyles() BranchStyles

NewBranchStyles initializes and returns all styles used in the branch command

type KillStyles

type KillStyles struct {
	Container  lipgloss.Style
	HeadStatus lipgloss.Style
	Error      lipgloss.Style
	Warning    lipgloss.Style
	Progress   lipgloss.Style
	Success    lipgloss.Style
	NoData     lipgloss.Style
}

KillStyles contains all styles used in the kill command

func NewKillStyles

func NewKillStyles() KillStyles

NewKillStyles initializes and returns all styles used in the kill command

type StatusStyles

type StatusStyles struct {
	Container       lipgloss.Style
	HeadStatus      lipgloss.Style
	ClusterInfo     lipgloss.Style
	VMListHeader    lipgloss.Style
	ClusterName     lipgloss.Style
	ClusterListItem lipgloss.Style
	ClusterData     lipgloss.Style
	VMInfo          lipgloss.Style
	NoData          lipgloss.Style
	Tip             lipgloss.Style
	VMID            lipgloss.Style
}

StatusStyles contains all styles used in the status command

func NewStatusStyles

func NewStatusStyles() StatusStyles

NewStatusStyles initializes and returns all styles used in the status command

Jump to

Keyboard shortcuts

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