Help us shape the future of Go! Take the 2026 Go Developer Survey

components

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BorderedTable

func BorderedTable(title string, headers []string, rows [][]string) string

BorderedTable wraps a table in a nice border

func RenderActionBar added in v0.1.4

func RenderActionBar(width int, actions []ActionBarItem, helpText string) string

RenderActionBar creates a consistent action bar for all screens

func RenderBreadcrumb added in v0.1.4

func RenderBreadcrumb(items []string) string

RenderBreadcrumb creates a breadcrumb navigation

func RenderHeader added in v0.1.4

func RenderHeader(title string, breadcrumb []string, width int) string

RenderHeader creates a consistent header with title and breadcrumb

func SimpleDiff

func SimpleDiff(oldDoc, newDoc *models.ExcelDocument) string

SimpleDiff creates a quick diff view from two Excel documents

func SimpleTable

func SimpleTable(headers []string, rows [][]string) string

SimpleTable creates a quick table from data without interaction

Types

type ActionBarItem added in v0.1.4

type ActionBarItem struct {
	Key         string
	Label       string
	Active      bool
	Highlighted bool
}

ActionBarItem represents a single action in the action bar

type Checkbox

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

func NewCheckbox

func NewCheckbox(label string, checked bool) Checkbox

func (*Checkbox) Blur

func (c *Checkbox) Blur()

func (*Checkbox) Checked

func (c *Checkbox) Checked() bool

func (*Checkbox) Focus

func (c *Checkbox) Focus()

func (*Checkbox) SetChecked

func (c *Checkbox) SetChecked(checked bool)

func (*Checkbox) Toggle

func (c *Checkbox) Toggle()

func (*Checkbox) Update

func (c *Checkbox) Update(msg tea.Msg) (Checkbox, tea.Cmd)

func (Checkbox) View

func (c Checkbox) View() string

type DiffViewMode

type DiffViewMode int
const (
	DiffViewSummary DiffViewMode = iota
	DiffViewBySheet
	DiffViewByCell
	DiffViewSideBySide
)

type DiffViewer

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

func NewDiffViewer

func NewDiffViewer(diff *models.ExcelDiff) DiffViewer

func (*DiffViewer) NextMode

func (d *DiffViewer) NextMode()

func (*DiffViewer) ScrollDown

func (d *DiffViewer) ScrollDown()

func (*DiffViewer) ScrollUp

func (d *DiffViewer) ScrollUp()

func (*DiffViewer) SelectNext

func (d *DiffViewer) SelectNext()

func (*DiffViewer) SelectPrev

func (d *DiffViewer) SelectPrev()

func (*DiffViewer) SetDimensions

func (d *DiffViewer) SetDimensions(width, height int)

func (*DiffViewer) ToggleDetails

func (d *DiffViewer) ToggleDetails()

func (DiffViewer) View

func (d DiffViewer) View() string

type FileItem

type FileItem struct {
	Name  string
	Path  string
	IsDir bool
	Size  int64
}

type FilePicker

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

func NewFilePicker

func NewFilePicker(startPath string, directoriesOnly bool) FilePicker

func (FilePicker) Init

func (fp FilePicker) Init() tea.Cmd

func (*FilePicker) SelectedPath

func (fp *FilePicker) SelectedPath() string

func (*FilePicker) SetExtensions

func (fp *FilePicker) SetExtensions(extensions []string)

func (FilePicker) Update

func (fp FilePicker) Update(msg tea.Msg) (FilePicker, tea.Cmd)

func (FilePicker) View

func (fp FilePicker) View() string

type MultiProgress

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

MultiProgress manages multiple progress bars

func NewMultiProgress

func NewMultiProgress() MultiProgress

func (*MultiProgress) AddBar

func (m *MultiProgress) AddBar(id string, label string, total int)

func (*MultiProgress) RemoveBar

func (m *MultiProgress) RemoveBar(id string)

func (*MultiProgress) UpdateBar

func (m *MultiProgress) UpdateBar(id string, current int)

func (MultiProgress) View

func (m MultiProgress) View() string

type ProgressBar

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

func NewProgressBar

func NewProgressBar(total int) ProgressBar

func (ProgressBar) Percentage

func (p ProgressBar) Percentage() float64

func (*ProgressBar) SetLabel

func (p *ProgressBar) SetLabel(label string)

func (*ProgressBar) SetProgress

func (p *ProgressBar) SetProgress(current int)

func (*ProgressBar) SetWidth

func (p *ProgressBar) SetWidth(width int)

func (ProgressBar) View

func (p ProgressBar) View() string

type SpinnerProgress

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

SpinnerProgress shows an indeterminate progress spinner

func NewSpinnerProgress

func NewSpinnerProgress(label string) SpinnerProgress

func (*SpinnerProgress) Next

func (s *SpinnerProgress) Next()

func (SpinnerProgress) View

func (s SpinnerProgress) View() string

type Table

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

func NewTable

func NewTable(headers []string) Table

func (*Table) AddRow

func (t *Table) AddRow(row []string)

func (*Table) ClearRows

func (t *Table) ClearRows()

func (*Table) MoveDown

func (t *Table) MoveDown()

func (*Table) MoveUp

func (t *Table) MoveUp()

func (*Table) SelectedIndex

func (t *Table) SelectedIndex() int

func (*Table) SelectedRow

func (t *Table) SelectedRow() []string

func (*Table) SetHeight

func (t *Table) SetHeight(height int)

func (*Table) SetRows

func (t *Table) SetRows(rows [][]string)

func (*Table) SetShowCursor

func (t *Table) SetShowCursor(show bool)

func (Table) View

func (t Table) View() string

type TableWithCommands

type TableWithCommands struct {
	Table
}

TableWithCommands is a table that can handle keyboard input

func NewTableWithCommands

func NewTableWithCommands(headers []string) TableWithCommands

func (TableWithCommands) Update

func (t TableWithCommands) Update(msg interface{}) TableWithCommands

type TextInput

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

func NewTextInput

func NewTextInput(label, placeholder string) TextInput

func (*TextInput) Blur

func (t *TextInput) Blur()

func (*TextInput) Focus

func (t *TextInput) Focus() tea.Cmd

func (*TextInput) SetValue

func (t *TextInput) SetValue(value string)

func (*TextInput) Update

func (t *TextInput) Update(msg tea.Msg) (TextInput, tea.Cmd)

func (*TextInput) Value

func (t *TextInput) Value() string

func (TextInput) View

func (t TextInput) View() string

Jump to

Keyboard shortcuts

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