Documentation
¶
Overview ¶
Copyright © 2026 54L1M
Copyright © 2026 54L1M ¶
Copyright © 2026 54L1M ¶
Package ui holds the lipgloss styling, cobra help template, and the bubbletea components (snippet picker and variable form) used across snip.
Copyright © 2026 54L1M
Index ¶
- Variables
- func ApplyCustomHelpTemplate(cmd *cobra.Command)
- func Confirm(prompt string) bool
- func DisplayWelcomeScreen()
- func RenderCommandBox(command string) string
- func RunForm(vars []string, defaults map[string]string) (map[string]string, bool, error)
- func RunSelector(choices []string, title string) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Primary = lipgloss.Color("#3b82f6") Blue = lipgloss.Color("#00bfda") Gray = lipgloss.Color("#8a8a8a") LightGray = lipgloss.Color("#c6c6c6") Orange = lipgloss.Color("202") Yellow = lipgloss.Color("226") Green = lipgloss.Color("#22c55e") ErrorStyle = lipgloss.NewStyle().Foreground(Orange) SuccessStyle = lipgloss.NewStyle().Foreground(Primary) WarningStyle = lipgloss.NewStyle(). Border(lipgloss.DoubleBorder(), true). BorderForeground(Yellow).Padding(0, 1) // CommandBoxStyle frames the resolved command shown before execution. CommandBoxStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder(), true). BorderForeground(Primary). Foreground(Green). Padding(0, 1) // Table styles, mirrored from i2c. HeaderStyle = lipgloss.NewStyle().Foreground(Primary).Bold(true) CellStyle = lipgloss.NewStyle().Padding(0, 1) OddRowStyle = CellStyle.Foreground(Gray) EvenRowStyle = CellStyle.Foreground(LightGray) )
Functions ¶
func ApplyCustomHelpTemplate ¶
ApplyCustomHelpTemplate installs the styled help template on cmd.
func DisplayWelcomeScreen ¶
func DisplayWelcomeScreen()
DisplayWelcomeScreen prints the snip banner: the wordmark with scissors beside it, a short description, and a hint, framed in a rounded box.
func RenderCommandBox ¶
RenderCommandBox returns the resolved command framed in a styled box.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.