Documentation
¶
Index ¶
- Variables
- func ApplyListTheme(d *list.DefaultDelegate)
- func Box(text string) string
- func Error(msg string)
- func FormatBox(text string) string
- func FormatHeader(title string) string
- func FormatStep(label, value string) string
- func FormatSuccess(label, value string) string
- func Info(msg string)
- func Panel(title, text string) string
- func PrintWelcome()
- func PromptConfirm(label string) (bool, error)
- func PromptSecret(label string) (string, error)
- func PromptSecretFromReaderForTest(label string, r io.Reader) (string, error)
- func RenderStep(name string, status StepStatus, message string) string
- func Success(msg string)
- func Table(rows [][]string) string
- func Warning(msg string)
- type DeployLogger
- func (l *DeployLogger) Box(msg string)
- func (l *DeployLogger) ErrorBox(err error, suggestion string)
- func (l *DeployLogger) Section(name string)
- func (l *DeployLogger) StartSpinner(msg string)
- func (l *DeployLogger) StepLog(status StepStatus, msg string, duration ...time.Duration)
- func (l *DeployLogger) StopSpinner(status StepStatus, finalMsg string, duration ...time.Duration)
- type Spinner
- type StepStatus
- type Theme
Constants ¶
This section is empty.
Variables ¶
var ( IconSuccess = StyleSuccess.Bold(true).Render("✓") IconError = StyleError.Bold(true).Render("✗") IconWarning = StyleWarning.Bold(true).Render("⚠") IconInfo = StyleInfo.Bold(true).Render("i") IconArrow = StyleInfo.Bold(true).Render("→") IconDot = StyleMuted.Render("•") IconStep = StylePrimary.Render("◆") )
var ( // Basic typography StyleTitle = lipgloss.NewStyle().Foreground(DefaultTheme.Primary).Bold(true) StyleSubtitle = lipgloss.NewStyle().Foreground(DefaultTheme.Secondary) StyleBody = lipgloss.NewStyle().Foreground(DefaultTheme.Text) StyleMuted = lipgloss.NewStyle().Foreground(DefaultTheme.Muted) StyleLabel = lipgloss.NewStyle().Foreground(DefaultTheme.Text).Bold(true) StyleValue = lipgloss.NewStyle().Foreground(DefaultTheme.Secondary) // Status semantics StyleSuccess = lipgloss.NewStyle().Foreground(DefaultTheme.Success) StyleError = lipgloss.NewStyle().Foreground(DefaultTheme.Error) StyleWarning = lipgloss.NewStyle().Foreground(DefaultTheme.Warning) StyleInfo = lipgloss.NewStyle().Foreground(DefaultTheme.Info) // Specialty StyleCode = lipgloss.NewStyle().Foreground(DefaultTheme.Secondary).Background(DefaultTheme.Border).Padding(0, 1) StyleCommand = lipgloss.NewStyle().Foreground(DefaultTheme.Primary).Bold(true) StyleURL = lipgloss.NewStyle().Foreground(DefaultTheme.Secondary).Underline(true) StyleHighlight = lipgloss.NewStyle().Foreground(DefaultTheme.Secondary).Bold(true) // Containers StyleBox = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(DefaultTheme.Border). Padding(1, 2) )
var ( ColorSuccess = DefaultTheme.Success ColorError = DefaultTheme.Error ColorWarning = DefaultTheme.Warning ColorInfo = DefaultTheme.Info ColorHighlight = DefaultTheme.Secondary ColorDim = DefaultTheme.Muted StyleHeader = StyleTitle.Padding(0, 1).MarginTop(1).MarginBottom(1).Background(lipgloss.Color("62")) // Kept temporarily StyleSubtext = StyleMuted StyleBold = lipgloss.NewStyle().Bold(true) StylePrompt = StyleInfo.Bold(true) )
Back-compatibility aliases
var DefaultTheme = Theme{ Primary: lipgloss.Color("#6366F1"), Secondary: lipgloss.Color("#22D3EE"), Success: lipgloss.Color("#22C55E"), Error: lipgloss.Color("#EF4444"), Warning: lipgloss.Color("#F59E0B"), Info: lipgloss.Color("#3B82F6"), Muted: lipgloss.Color("#71717A"), Text: lipgloss.Color("#FAFAFA"), Background: lipgloss.Color("#18181B"), Border: lipgloss.Color("#27272A"), }
AtlasTheme defines the standard color palette for the CLI. Indigo/Cyan branding.
var NonInteractive bool
Global flag to disable interactive UI in CI/JSON
var StylePrimary = StyleTitle
Functions ¶
func ApplyListTheme ¶ added in v0.2.0
func ApplyListTheme(d *list.DefaultDelegate)
ApplyListTheme applies the Atlas theme to a bubbles list delegate.
func FormatHeader ¶
FormatHeader renders a prominent header block. (Kept for compatibility)
func FormatStep ¶
FormatStep renders a step with a highlighted value. (Kept for compatibility)
func FormatSuccess ¶
FormatSuccess renders a success message with an aligned label. (Kept for compatibility)
func PrintWelcome ¶ added in v0.2.0
func PrintWelcome()
PrintWelcome prints a side-by-side logo and description.
func PromptConfirm ¶
PromptConfirm prompts the user for a y/N response and returns true if yes.
func PromptSecret ¶
PromptSecret prompts the user for a secret using a masked input (no echo).
func PromptSecretFromReaderForTest ¶
PromptSecretFromReaderForTest is an exported variant for testing environments.
func RenderStep ¶ added in v0.2.0
func RenderStep(name string, status StepStatus, message string) string
func Success ¶ added in v0.2.0
func Success(msg string)
Success prints a standardized success message
Types ¶
type DeployLogger ¶ added in v0.2.0
type DeployLogger struct {
// contains filtered or unexported fields
}
func NewDeployLogger ¶ added in v0.2.0
func NewDeployLogger(jsonMode bool) *DeployLogger
func (*DeployLogger) Box ¶ added in v0.2.0
func (l *DeployLogger) Box(msg string)
func (*DeployLogger) ErrorBox ¶ added in v0.2.0
func (l *DeployLogger) ErrorBox(err error, suggestion string)
func (*DeployLogger) Section ¶ added in v0.2.0
func (l *DeployLogger) Section(name string)
Section starts a new major phase (e.g. "◆ Detect")
func (*DeployLogger) StartSpinner ¶ added in v0.2.0
func (l *DeployLogger) StartSpinner(msg string)
func (*DeployLogger) StepLog ¶ added in v0.2.0
func (l *DeployLogger) StepLog(status StepStatus, msg string, duration ...time.Duration)
StepLog prints a sub-step (e.g. " ✓ Next.js")
func (*DeployLogger) StopSpinner ¶ added in v0.2.0
func (l *DeployLogger) StopSpinner(status StepStatus, finalMsg string, duration ...time.Duration)
type Spinner ¶
type Spinner struct {
// contains filtered or unexported fields
}
Spinner represents a CLI loader built on Bubble Tea.
func StartSpinner ¶
StartSpinner starts a loader with a message.
func (*Spinner) UpdateMessage ¶
UpdateMessage changes the spinner message.
type StepStatus ¶ added in v0.2.0
type StepStatus int
const ( StepPending StepStatus = iota StepRunning StepSuccess StepFailed StepSkipped )
const StepInfo StepStatus = 100
const StepWarning StepStatus = 99