ui

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
    |_  |                   |_   _|                
      | | ___  ___ _ __ __ _  | |   _   _ _ __   ___ 
      | |/ _ \/ _ \ '__/ _` + "`" + ` || |  | | | | '_ \ / _ \
  /\__/ /  __/  __/ | | (_| || |  | |_| | |_) |  __/
  \____/ \___|\___|_|  \__,_||_|   \__, | .__/ \___|
                                   __/ | |          
                                  |___/|_|          
  [ The Offline Terminal Typing Tester ]`

Variables

This section is empty.

Functions

func RenderKeyboardHeatmap

func RenderKeyboardHeatmap(theme config.Theme, termWidth int) string

RenderKeyboardHeatmap renders a full color-coded ASCII QWERTY keyboard heatmap.

func RenderLogo(theme config.Theme) string

RenderLogo renders the branded JeeraType logo themed dynamically.

func RenderMenuView

func RenderMenuView(
	timeModes []int,
	selectedModeIdx int,
	currentMode TestMode,
	currentTheme config.Theme,
	ghostWPM float64,
	termWidth int,
) string

RenderMenuView renders initial options: mode, duration, theme, ghost pacer, hotkeys.

func RenderResultsView

func RenderResultsView(t *stats.Tracker, theme config.Theme, termWidth int) string

RenderResultsView renders post-game stats, asciigraph WPM timeline, and slowest key transitions breakdown.

func RenderTestView

func RenderTestView(t *stats.Tracker, theme config.Theme, termWidth int) string

RenderTestView renders live test with Ghost Pacer and target word wrap.

Types

type DynamicStyles

type DynamicStyles struct {
	Theme          config.Theme
	StyleUntyped   lipgloss.Style
	StyleCorrect   lipgloss.Style
	StyleIncorrect lipgloss.Style
	StyleCursor    lipgloss.Style
	StyleGhost     lipgloss.Style
	StyleHeader    lipgloss.Style
	StyleSubtext   lipgloss.Style
	StyleActive    lipgloss.Style
	StyleInactive  lipgloss.Style
	StyleCard      lipgloss.Style
	StyleCardVal   lipgloss.Style
	StyleHelp      lipgloss.Style
}

DynamicStyles constructs Lipgloss styles dynamically based on selected Theme.

func NewDynamicStyles

func NewDynamicStyles(theme config.Theme) DynamicStyles

NewDynamicStyles creates themed styles.

type TestMode

type TestMode int
const (
	ModeParagraphs TestMode = iota
	ModeCode
	ModeAdaptive
)

func (TestMode) String

func (m TestMode) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL