Documentation
¶
Index ¶
- Constants
- func ColIndexToLetter(index int) string
- func GetCellType(cell models.Cell) string
- func GetStatusColor(statusType string) lipgloss.Color
- func Max(a, b int) int
- func Min(a, b int) int
- func PadCenter(s string, width int) string
- func RenderModal(width, height int, modal string) string
- func Truncate(s string, maxLen int) string
- func TruncateToWidth(s string, width int) string
- func WrapText(text string, width int) string
- type Styles
Constants ¶
View Source
const ( MinCellWidth = 12 MaxCellWidth = 40 )
Variables ¶
This section is empty.
Functions ¶
func ColIndexToLetter ¶
ColIndexToLetter converts a 0-indexed column number to Excel-style letter
func GetCellType ¶
GetCellType determines the type of a cell
func GetStatusColor ¶
GetStatusColor returns the color for a status type
func RenderModal ¶
RenderModal centers a modal in the viewport
func TruncateToWidth ¶
TruncateToWidth ensures text fits exactly in the cell width
Types ¶
type Styles ¶
type Styles struct {
Title lipgloss.Style
Header lipgloss.Style
HeaderHighlight lipgloss.Style
Cell lipgloss.Style
SelectedCell lipgloss.Style
RowHighlight lipgloss.Style
ColHighlight lipgloss.Style
SearchMatch lipgloss.Style
RowNum lipgloss.Style
SelectedRowNum lipgloss.Style
StatusBar lipgloss.Style
SearchBar lipgloss.Style
SearchPrompt lipgloss.Style
Modal lipgloss.Style
ModalTitle lipgloss.Style
ModalContent lipgloss.Style
ModalKey lipgloss.Style
ModalValue lipgloss.Style
Help lipgloss.Style
FormulaBar lipgloss.Style
Separator lipgloss.Style
}
Styles holds all lipgloss styles for the UI
func InitStyles ¶
func InitStyles() *Styles
InitStyles creates and returns styles based on current theme
Click to show internal directories.
Click to hide internal directories.