ui

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

This section is empty.

Types

type Model

type Model struct {
	Target         string
	Results        []bool
	Index          int
	Started        bool
	Quitting       bool
	ProgressBar    progress.Model
	TerminalWidth  int
	TerminalHeight int

	// for better accuracy calculation
	BackSpaceCount int
	IsError        bool

	// for mode selecting
	IsSelectingMode bool
	Cursor          int
	Choices         []string
	Mode            TypingMode

	// state
	State sessionState

	// timer
	StartTime time.Time
	EndTime   time.Time

	Active bool

	// words
	InitialWords int
	// contains filtered or unexported fields
}

func NewModel

func NewModel(target string) Model

func (Model) CalculateAccuracy

func (m Model) CalculateAccuracy() float64

func (Model) CalculateRawTypingSpeed

func (m Model) CalculateRawTypingSpeed() float64

func (Model) CalculateTypingSpeed

func (m Model) CalculateTypingSpeed() float64

func (Model) GetDictionnaryModel

func (m Model) GetDictionnaryModel(duration int) Model

func (Model) GetDictionnaryModelWithWords

func (m Model) GetDictionnaryModelWithWords(words int) Model

func (Model) GetModelWithCustomTarget

func (m Model) GetModelWithCustomTarget(target string) Model

func (Model) GetQuoteModel

func (m Model) GetQuoteModel() Model

func (Model) GetTimeModelWithCustomTarget

func (m Model) GetTimeModelWithCustomTarget(initialTime int, target string) Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

type TypingMode

type TypingMode int

Jump to

Keyboard shortcuts

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