ui

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IconCheck  = "✓"
	IconCross  = "✗"
	IconBullet = "●"
	IconDot    = "•"
	IconArrow  = "▸"
)

Variables

View Source
var (
	Blue       = lipgloss.Color("#58A6FF")
	Green      = lipgloss.Color("#3FB950")
	Amber      = lipgloss.Color("#D29922")
	Red        = lipgloss.Color("#F85149")
	White      = lipgloss.Color("#E6EDF3")
	MutedGray  = lipgloss.Color("#8B949E")
	SubtleGray = lipgloss.Color("#6E7681")
	BorderGray = lipgloss.Color("#30363D")
	FgDefault  = lipgloss.Color("#C9D1D9")
	DeepSlate  = lipgloss.Color("#21262D")
	Ink        = lipgloss.Color("#0D1117")
)
View Source
var (
	// HeadingStyle for section headers and emphasis.
	HeadingStyle = lipgloss.NewStyle().Bold(true).Foreground(White)

	// AccentStyle for links, SPDX IDs, URLs.
	AccentStyle = lipgloss.NewStyle().Foreground(Blue)

	// LinkStyle for clickable URLs — accent + underline.
	LinkStyle = lipgloss.NewStyle().Foreground(Blue).Underline(true)

	// SecondaryStyle for descriptions, hints, and secondary text.
	SecondaryStyle = lipgloss.NewStyle().Foreground(MutedGray)

	// PermissionStyle for permission tags (green).
	PermissionStyle = lipgloss.NewStyle().Foreground(Green)

	// ConditionStyle for condition tags (amber).
	ConditionStyle = lipgloss.NewStyle().Foreground(Amber)

	// LimitationStyle for limitation tags (red).
	LimitationStyle = lipgloss.NewStyle().Foreground(Red)

	// DividerStyle for section separators.
	DividerStyle = lipgloss.NewStyle().Foreground(SubtleGray)

	// BadgeStyle for count badges and highlighted inline text.
	BadgeStyle = lipgloss.NewStyle().Bold(true).Foreground(Blue)
)
View Source
var DefaultHuhTheme = createHuhTheme()

Functions

func Divider

func Divider(width int) string

Divider returns a styled horizontal rule of the given width.

func IsTTY

func IsTTY() bool

IsTTY returns true if stdout is a terminal.

func NoColor

func NoColor() bool

NoColor returns true if the NO_COLOR env var is set.

func PrintJSON

func PrintJSON(w io.Writer, v any) error

PrintJSON writes v as indented JSON to w.

func RenderComparisonTable

func RenderComparisonTable(licenses []license.License, rules license.Rules) string

RenderComparisonTable builds a side-by-side comparison table for the given licenses.

Types

This section is empty.

Jump to

Keyboard shortcuts

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