Documentation
¶
Index ¶
- Constants
- Variables
- func Banner() string
- func FormatError(msg string) string
- func FormatFileCreated(path string) string
- func FormatFileSkipped(name, reason string) string
- func FormatFileUpdated(path string) string
- func FormatResults(info *analyzer.ProjectInfo) string
- func IsTTY() bool
- func TermHeight() int
- func TermWidth() int
- type FormatSelectModel
- type MenuItem
- type MenuModel
- type ScanDoneMsg
- type SpinnerModel
Constants ¶
const Version = "v0.4.0"
Variables ¶
var ( // Colors ColorPrimary = lipgloss.Color("39") // blue ColorSuccess = lipgloss.Color("82") // green ColorWarning = lipgloss.Color("214") // yellow ColorError = lipgloss.Color("196") // red ColorSubtle = lipgloss.Color("241") // gray ColorHighlight = lipgloss.Color("212") // pink // Text styles Bold = lipgloss.NewStyle().Bold(true) Success = lipgloss.NewStyle().Foreground(ColorSuccess) Warning = lipgloss.NewStyle().Foreground(ColorWarning) Error = lipgloss.NewStyle().Foreground(ColorError) Subtle = lipgloss.NewStyle().Foreground(ColorSubtle) // Banner style BannerStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(ColorPrimary). Padding(0, 2) // Results box style ResultsStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(ColorSubtle). Padding(0, 1) // Menu item styles MenuSelected = lipgloss.NewStyle().Foreground(ColorPrimary).Bold(true) MenuUnselected = lipgloss.NewStyle().Foreground(lipgloss.Color("252")) MenuCursor = lipgloss.NewStyle().Foreground(ColorPrimary).SetString("> ") MenuNoCursor = lipgloss.NewStyle().SetString(" ") )
Functions ¶
func FormatFileCreated ¶
FormatFileCreated formats a file creation message.
func FormatFileSkipped ¶
FormatFileSkipped formats a file skip message.
func FormatFileUpdated ¶
FormatFileUpdated formats a file update message.
func FormatResults ¶
func FormatResults(info *analyzer.ProjectInfo) string
FormatResults formats detection results as a styled box.
func TermHeight ¶
func TermHeight() int
TermHeight returns the terminal height, defaulting to 24 if detection fails.
Types ¶
type FormatSelectModel ¶
type FormatSelectModel struct {
// contains filtered or unexported fields
}
FormatSelectModel is a bubbletea model for selecting output format.
func NewFormatSelectModel ¶
func NewFormatSelectModel() FormatSelectModel
NewFormatSelectModel creates a format selection prompt.
func (FormatSelectModel) Chosen ¶
func (m FormatSelectModel) Chosen() bool
Chosen returns true if user made a selection.
func (FormatSelectModel) Init ¶
func (m FormatSelectModel) Init() tea.Cmd
func (FormatSelectModel) SelectedFormat ¶
func (m FormatSelectModel) SelectedFormat() string
SelectedFormat returns the chosen format string.
func (FormatSelectModel) View ¶
func (m FormatSelectModel) View() string
type MenuModel ¶
MenuModel is a bubbletea model for arrow-key menu navigation.
func NewMenuModel ¶
NewMenuModel creates a new menu model.
type SpinnerModel ¶
type SpinnerModel struct {
// contains filtered or unexported fields
}
SpinnerModel wraps bubbles spinner for scanning animation.
func NewSpinnerModel ¶
func NewSpinnerModel(message string) SpinnerModel
NewSpinnerModel creates a spinner with a scanning message.
func (SpinnerModel) Init ¶
func (m SpinnerModel) Init() tea.Cmd
func (SpinnerModel) View ¶
func (m SpinnerModel) View() string