ui

package
v0.0.0-...-f745e67 Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrowseScreen

type BrowseScreen struct {
	// contains filtered or unexported fields
}

BrowseScreen represents the browse decks screen

func NewBrowseScreen

func NewBrowseScreen(store *data.Store) *BrowseScreen

NewBrowseScreen creates a new browse screen

func (BrowseScreen) Init

func (b BrowseScreen) Init() tea.Cmd

Init initializes the browse screen

func (BrowseScreen) Update

func (b BrowseScreen) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles user input and updates the model

func (BrowseScreen) View

func (b BrowseScreen) View() string

View renders the browse screen

type ForecastDay

type ForecastDay struct {
	Date      time.Time
	ReviewDue int
	NewDue    int
}

ForecastDay represents forecast data for a single day

type MainMenu struct {
	// contains filtered or unexported fields
}

MainMenu represents the main menu model

func NewMainMenu

func NewMainMenu(store *data.Store) *MainMenu

NewMainMenu creates a new main menu

func (m MainMenu) Init() tea.Cmd

Init initializes the main menu

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

Update handles user input and updates the model

func (m MainMenu) View() string

View renders the main menu

type MarkdownRenderer

type MarkdownRenderer struct {
	// contains filtered or unexported fields
}

MarkdownRenderer handles rendering Markdown text to styled terminal output

func NewMarkdownRenderer

func NewMarkdownRenderer(width int, themeName string) *MarkdownRenderer

NewMarkdownRenderer creates a new markdown renderer with specified width and theme

func (*MarkdownRenderer) ClearCache

func (r *MarkdownRenderer) ClearCache()

ClearCache clears the rendering cache

func (*MarkdownRenderer) Render

func (r *MarkdownRenderer) Render(markdown string) string

Render renders markdown text to terminal output

func (*MarkdownRenderer) SetSyntaxTheme

func (r *MarkdownRenderer) SetSyntaxTheme(themeName string)

SetSyntaxTheme allows changing the syntax highlighting theme

func (*MarkdownRenderer) UpdateWidth

func (r *MarkdownRenderer) UpdateWidth(width int)

UpdateWidth updates the renderer's width and clears the cache

type StatisticsScreen

type StatisticsScreen struct {
	// contains filtered or unexported fields
}

StatisticsScreen represents the statistics view

func NewStatisticsScreen

func NewStatisticsScreen(store *data.Store) *StatisticsScreen

NewStatisticsScreen creates a new statistics screen

func NewStatisticsScreenWithDeck

func NewStatisticsScreenWithDeck(store *data.Store, deckID string) *StatisticsScreen

NewStatisticsScreenWithDeck creates a new statistics screen with a focus on a specific deck

func (*StatisticsScreen) Init

func (s *StatisticsScreen) Init() tea.Cmd

Init initializes the statistics screen

func (*StatisticsScreen) Update

func (s *StatisticsScreen) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles user input for the statistics screen

func (*StatisticsScreen) View

func (s *StatisticsScreen) View() string

View renders the statistics screen

type StudyScreen

type StudyScreen struct {
	// contains filtered or unexported fields
}

StudyScreen represents the screen for studying flashcards

func NewStudyScreen

func NewStudyScreen(store *data.Store, deckID string) *StudyScreen

NewStudyScreen creates a new study screen for the specified deck

func (*StudyScreen) Init

func (s *StudyScreen) Init() tea.Cmd

Init initializes the study screen

func (*StudyScreen) Update

func (s *StudyScreen) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles user input and updates the model

func (*StudyScreen) View

func (s *StudyScreen) View() string

View renders the study screen

type StudyState

type StudyState int

StudyState represents the current state of the study screen

const (
	ShowingQuestion StudyState = iota
	ShowingAnswer
	FinishedStudying
)

Jump to

Keyboard shortcuts

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