Documentation
¶
Index ¶
- Variables
- func FormatTime(s int) string
- func Tick() tea.Cmd
- type Model
- func (m Model) GetDictionnaryModel(duration int) Model
- func (m Model) GetDictionnaryModelWithWords(words int) Model
- func (m Model) GetModelWithCustomTarget(target string) Model
- func (m Model) GetModelWithQuoteType(option string) Model
- func (m Model) GetQuoteModel() Model
- func (m Model) GetTimeModelWithCustomTarget(initialTime int, target string) Model
- func (m Model) Init() tea.Cmd
- func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m Model) View() string
- type TickMsg
- type TypingMode
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Base Palette CatMauve = lipgloss.Color("#cba6f7") // Primary/Logo CatLavender = lipgloss.Color("#b4befe") // Secondary CatSapphire = lipgloss.Color("#74c7ec") // Accent CatText = lipgloss.Color("#cdd6f4") // Standard Text CatSubtext = lipgloss.Color("#a6adc8") // Faint/Muted // Functional Colors CatGreen = lipgloss.Color("#a6e3a1") // Correct CatRed = lipgloss.Color("#f38ba8") // Wrong CatYellow = lipgloss.Color("#f9e2af") // Warning/Highlight CatOverlay = lipgloss.Color("#6c7086") // Pending/Placeholder CatSurface = lipgloss.Color("#313244") // Background highlights )
View Source
var ( // The characters you've typed correctly (Soothing Green) CorrectStyle = lipgloss.NewStyle().Foreground(CatGreen) // Incorrect characters (Soft Red) WrongStyle = lipgloss.NewStyle().Foreground(CatRed) // If the user misses a space, we highlight the background so it's visible SpaceStyle = lipgloss.NewStyle().Background(CatRed).Foreground(CatSurface) // Characters remaining in the quote (Muted/Faint) PendingStyle = lipgloss.NewStyle().Foreground(CatOverlay) // The current character under the cursor (Bold & Underlined) HighlightStyle = lipgloss.NewStyle(). Foreground(CatYellow). Underline(true). Bold(true) // Your WPM/ACC display (Vibrant Sapphire) StatsStyle = lipgloss.NewStyle(). Foreground(CatSapphire). Bold(true). Padding(0, 1). BorderStyle(lipgloss.NormalBorder()). BorderForeground(CatSurface) HeaderStyle = lipgloss.NewStyle().Foreground(CatLavender) // Mode selector styles ModeActiveStyle = lipgloss.NewStyle(). Foreground(CatSurface). Background(CatMauve). Bold(true). Padding(0, 2). MarginRight(1) ModeInactiveStyle = lipgloss.NewStyle(). Foreground(CatSubtext). Background(CatSurface). Padding(0, 2). MarginRight(1) ModeSelectorContainerStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(CatOverlay). Padding(0, 1). MarginTop(1) // for the views // CatMauve ViewHeaderStyle = lipgloss.NewStyle().Foreground(CatMauve).Bold(true) // Stats Section - Using a box to make it stand out StatsTitleStyle = lipgloss.NewStyle().Foreground(CatSapphire).Bold(true).MarginBottom(1) // Individual stat styling LabelStyle = lipgloss.NewStyle().Foreground(CatMauve).Width(15).Align(lipgloss.Left) ValueStyle = lipgloss.NewStyle().Foreground(CatSubtext).Bold(true).Width(30).Align(lipgloss.Right) // Footer Section HelpStyle = lipgloss.NewStyle().Foreground(CatOverlay).MarginTop(1) )
View Source
var CouikASCII = `` /* 429-byte string literal not displayed */
View Source
var CouikASCII2 = `` /* 417-byte string literal not displayed */
View Source
var CouikASCII3 = `` /* 558-byte string literal not displayed */
Functions ¶
func FormatTime ¶ added in v0.1.2
Types ¶
type Model ¶
type Model struct {
Session *engine.Session
Repo storage.HistoryRepository
Quitting bool
ProgressBar progress.Model
TerminalWidth int
TerminalHeight int
// mode selecting
CurrentSelector components.Selector
// for mode selecting
IsSelectingMode bool
// Cursor int
// Choices []string
Mode TypingMode
// state
State sessionState
Active bool
// quote mode selection
QuoteType quoteType
// QuoteTypeCursor int
// QuoteTypeChoices []string
IsSelectingQuoteType bool
// words
InitialWords int
// User defaults
// config cli.Config
CustomDashboard string
// contains filtered or unexported fields
}
func (Model) GetDictionnaryModel ¶
func (Model) GetDictionnaryModelWithWords ¶
GetDictionnaryModelWithWords creates a model with custom words length for word mode typing tests
func (Model) GetModelWithCustomTarget ¶
GetModelWithCustomTarget creates a model with custom target for word mode typing tests
func (Model) GetModelWithQuoteType ¶ added in v0.1.1
func (Model) GetQuoteModel ¶
func (Model) GetTimeModelWithCustomTarget ¶
GetTimeModelWithCustomTarget creates a model with custom target for time mode typing tests
Source Files
¶
Click to show internal directories.
Click to hide internal directories.