ui

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeTypeBadge added in v0.4.0

func ChangeTypeBadge(changeType string) string

ChangeTypeBadge returns a colorized change type string: major=red, minor=yellow, patch=green.

func Dimmed added in v0.4.0

func Dimmed(text string) string

Dimmed returns gray text for secondary or skipped information.

func ErrorMessage

func ErrorMessage(message string) string

ErrorMessage returns a styled error message with X mark

func Header(icon, title string) string

Header returns a bold magenta header with an icon prefix. Unlike Section(), it has no underline or margins, making it suitable for command output headers.

func HelpFunc added in v0.4.0

func HelpFunc(cmd *cobra.Command, args []string)

HelpFunc is a custom help function for cobra commands. It renders styled, colorized help output using lipgloss.

func InfoMessage

func InfoMessage(message string) string

InfoMessage returns a styled info message with info symbol

func KeyValue

func KeyValue(key, value string) string

KeyValue returns a styled key-value pair

func List

func List(items []string) string

List returns a styled bulleted list

func NewSpinner

func NewSpinner(message string) *spinner.Spinner

NewSpinner creates a new progress spinner with the given message

func RenderPreview

func RenderPreview(changes []PackageChange) string

RenderPreview renders a preview of version changes

func RenderVersionDiff

func RenderVersionDiff(oldVer, newVer semver.Version) string

RenderVersionDiff renders a version diff with arrow

func Section

func Section(title string) string

Section returns a styled section header

func SuccessMessage

func SuccessMessage(message string) string

SuccessMessage returns a styled success message with check mark

func Table added in v0.4.0

func Table(headers []string, rows [][]string) string

Table renders a styled table with the given headers and rows. Returns a string that callers can print.

func VersionArrow added in v0.4.0

func VersionArrow(old, newVer string) string

VersionArrow returns a styled "old -> new" string with red old, green new, and cyan arrow.

func WarningMessage

func WarningMessage(message string) string

WarningMessage returns a styled warning message with warning symbol

Types

type PackageChange

type PackageChange struct {
	Name       string
	OldVersion semver.Version
	NewVersion semver.Version
	ChangeType string
	Changes    []string
}

PackageChange represents a version change for preview

Jump to

Keyboard shortcuts

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