ui

package
v0.0.0-...-e5e31b7 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const CommandHelpTemplate = `` /* 485-byte string literal not displayed */

CommandHelpTemplate uses the default template structure with styling

View Source
const RootCommandHelpTemplate = `` /* 1048-byte string literal not displayed */

RootCommandHelpTemplate uses the default template structure with styling functions

View Source
const SubcommandHelpTemplate = `` /* 591-byte string literal not displayed */

SubcommandHelpTemplate uses the default template structure with styling

Variables

View Source
var (
	PrimaryStyle      = newStyle().Foreground(lipgloss.Color(utils.ColorPrimary))
	AccentStyle       = newStyle().Foreground(lipgloss.Color(utils.ColorAccent))
	ErrorStyle        = newStyle().Foreground(lipgloss.Color(utils.ColorError))
	TextStyle         = newStyle().Foreground(lipgloss.Color(utils.ColorText))
	TitleStyle        = newPBoldStyle(0, 1).Foreground(lipgloss.Color(utils.ColorAccent))
	SubtitleStyle     = newEmStyle().Foreground(lipgloss.Color(utils.ColorPrimary))
	SuccessStyle      = newBoldStyle().Foreground(lipgloss.Color(utils.ColorPrimary))
	WarningStyle      = newBoldStyle().Foreground(lipgloss.Color(utils.ColorAccent))
	InfoStyle         = newStyle().Foreground(lipgloss.Color(utils.ColorText))
	BoxStyle          = newPStyle(1, 2).Border(lipgloss.RoundedBorder()).BorderForeground(lipgloss.Color(utils.ColorPrimary))
	ErrorBoxStyle     = newPStyle(1, 2).Border(lipgloss.RoundedBorder()).BorderForeground(lipgloss.Color(utils.ColorError))
	ListItemStyle     = newStyle().Foreground(lipgloss.Color(utils.ColorText)).PaddingLeft(2)
	SelectedItemStyle = newBoldStyle().Foreground(lipgloss.Color(utils.ColorAccent)).PaddingLeft(2)
	HeaderStyle       = newPBoldStyle(0, 1).Foreground(lipgloss.Color(utils.ColorPrimary))
	CellStyle         = newPStyle(0, 1).Foreground(lipgloss.Color(utils.ColorText))

	TableBaseStyle    = newPStyle(0, 1)
	TableHeaderStyle  = newPStyle(0, 1).Foreground(lipgloss.Color(utils.ColorPrimary)).Bold(true)
	TableBorderStyle  = newStyle().Foreground(lipgloss.Color(utils.ColorAccent))
	TableRowEvenStyle = newPStyle(0, 1).Foreground(lipgloss.Color("252"))
	TableRowOddStyle  = newPStyle(0, 1).Foreground(lipgloss.Color("245"))
)

Functions

func Box

func Box(format string, a ...any)

Box prints content in a styled box

func Boxln

func Boxln(format string, a ...any)

Boxln prints content in a styled box with a newline

func DisplayFeed

func DisplayFeed(feed []store.FeedViewPost, cursor string)

DisplayFeed shows a formatted list of posts from a feed

func DisplayJSON

func DisplayJSON(data any) error

DisplayJSON marshals and prints data as JSON

func DisplayProfileHeader

func DisplayProfileHeader(profile *store.ActorProfile)

DisplayProfileHeader shows a formatted profile summary

func Error

func Error(format string, a ...any)

Error prints a formatted error message

func ErrorBox

func ErrorBox(format string, a ...any)

ErrorBox prints error content in a styled error box

func ErrorBoxln

func ErrorBoxln(format string, a ...any)

ErrorBoxln prints error content in a styled error box with a newline

func Errorln

func Errorln(format string, a ...any)

Errorln prints a formatted error message with a newline

func Info

func Info(format string, a ...any)

Info prints a formatted info message

func Infoln

func Infoln(format string, a ...any)

Infoln prints a formatted info message with a newline

func StyledHelpPrinter

func StyledHelpPrinter(w io.Writer, templ string, data any)

StyledHelpPrinter is a custom help printer that uses our color system It extends the default printer with custom styling functions

func Subtitle

func Subtitle(format string, a ...any)

Subtitle prints a formatted subtitle

func Subtitleln

func Subtitleln(format string, a ...any)

Subtitleln prints a formatted subtitle with a newline

func Success

func Success(format string, a ...any)

Success prints a formatted success message

func Successln

func Successln(format string, a ...any)

Successln prints a formatted success message with a newline

func Title

func Title(format string, a ...any)

Title prints a formatted title

func Titleln

func Titleln(format string, a ...any)

Titleln prints a formatted title with a newline

func Warning

func Warning(format string, a ...any)

Warning prints a formatted warning message

func Warningln

func Warningln(format string, a ...any)

Warningln prints a formatted warning message with a newline

Types

This section is empty.

Jump to

Keyboard shortcuts

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