ui

package
v1.0.2 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,
	showKeys bool,
	termWidth int,
) string

RenderMenuView renders initial options.

func RenderResultsView

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

RenderResultsView renders post-game stats.

func RenderTestView

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

RenderTestView renders live test screen.

func RenderVisualKeyboardOverlay added in v1.0.2

func RenderVisualKeyboardOverlay(activeRune rune, theme config.Theme, termWidth int) string

RenderVisualKeyboardOverlay renders live keyboard highlighting pressed keys in real-time.

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
	ModeQuotes
	ModeStdin
	ModeFile
)

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