Documentation
¶
Index ¶
Constants ¶
View Source
const ( DrPurple = lipgloss.Color("#7770F9") // purple-60 DrPurpleLight = lipgloss.Color("#B4B0FF") // purple-40 DrIndigo = lipgloss.Color("#5C41FF") // indigo-70 DrRed = lipgloss.Color("#9A3131") // red-80 DrGreen = lipgloss.Color("#81FBA5") // green-60 DrYellow = lipgloss.Color("#F6EB61") // yellow-60 DrBlack = lipgloss.Color("#0B0B0B") // black-90 )
DataRobot brand colors, utilizing the Design System palette
View Source
const Banner = `` /* 1398-byte string literal not displayed */
Banner contains the DataRobot ASCII art logo
Variables ¶
View Source
var ( BaseTextStyle = lipgloss.NewStyle().Foreground(DrPurple) ErrorStyle = lipgloss.NewStyle().Foreground(DrRed).Bold(true) // Specific UI styles LogoStyle = BaseTextStyle WelcomeStyle = BaseTextStyle.Bold(true) SubTitleStyle = BaseTextStyle.Bold(true). Foreground(DrPurpleLight). BorderBottom(true). BorderStyle(lipgloss.NormalBorder()). BorderForeground(DrGreen) BoxStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(DrPurple). Padding(1, 2) StatusBarStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(DrPurpleLight). Foreground(DrPurpleLight). Padding(0, 1) )
Common style definitions using DataRobot branding
Functions ¶
Types ¶
type InterruptibleModel ¶ added in v0.1.5
InterruptibleModel wraps any Bubble Tea model to ensure Ctrl-C always works. This wrapper intercepts ALL messages before they reach the underlying model, checking for Ctrl-C and immediately quitting if detected. This guarantees users can never get stuck in the program, regardless of what the model does.
func NewInterruptibleModel ¶ added in v0.1.5
func NewInterruptibleModel(model tea.Model) InterruptibleModel
NewInterruptibleModel wraps a model to ensure Ctrl-C always works everywhere. Use this when creating any Bubble Tea program to guarantee users can exit.
Example:
m := myModel{}
p := tea.NewProgram(tui.NewInterruptibleModel(m), tea.WithAltScreen())
func (InterruptibleModel) Init ¶ added in v0.1.5
func (m InterruptibleModel) Init() tea.Cmd
func (InterruptibleModel) View ¶ added in v0.1.5
func (m InterruptibleModel) View() string
Click to show internal directories.
Click to hide internal directories.