ui

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 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 (
	Teal       = lipgloss.Color("#2DD4BF")
	Green      = lipgloss.Color("#22C55E")
	Amber      = lipgloss.Color("#F59E0B")
	Red        = lipgloss.Color("#EF4444")
	White      = lipgloss.Color("#F8FAFC")
	SlateGray  = lipgloss.Color("#94A3B8")
	DarkSlate  = lipgloss.Color("#475569")
	LightSlate = lipgloss.Color("#CBD5E1")
	DeepSlate  = lipgloss.Color("#1E293B")
	Ink        = lipgloss.Color("#0F172A")
)
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(Teal)

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

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

	// 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(DarkSlate)

	// BadgeStyle for count badges and highlighted inline text.
	BadgeStyle = lipgloss.NewStyle().Bold(true).Foreground(Teal)
)
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