printer

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2025 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultPaperTitleStyle = func() lipgloss.Style {
		b := lipgloss.RoundedBorder()
		b.Right = "├"
		return lipgloss.NewStyle().BorderStyle(b).Padding(0, 1)
	}()

	DefaultPaperInfoStyle = func() lipgloss.Style {
		b := lipgloss.RoundedBorder()
		b.Left = "┤"
		return DefaultPaperTitleStyle.BorderStyle(b)
	}()
)
View Source
var DefaultTableBaseStyle = lipgloss.NewStyle().
	BorderStyle(lipgloss.NormalBorder()).
	BorderForeground(lipgloss.Color("240"))

Functions

func WrapText

func WrapText(text string, width int) string

WrapText Split the input text into lines according to the specified width.

Types

type PaperX

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

func NewPaper

func NewPaper(ctx context.Context) *PaperX

func (*PaperX) Ctx

func (p *PaperX) Ctx() context.Context

func (*PaperX) EnableHighPerformanceRendering

func (p *PaperX) EnableHighPerformanceRendering(enable bool) *PaperX

func (*PaperX) EnableProgress

func (p *PaperX) EnableProgress(enable bool) *PaperX

func (*PaperX) Quit

func (p *PaperX) Quit()

func (*PaperX) Run

func (p *PaperX) Run()

func (*PaperX) SetBorder

func (p *PaperX) SetBorder(border string) *PaperX

func (*PaperX) SetContent

func (p *PaperX) SetContent(content string) *PaperX

func (*PaperX) SetInfoStyle

func (p *PaperX) SetInfoStyle(style lipgloss.Style) *PaperX

func (*PaperX) SetLoading

func (p *PaperX) SetLoading(loading string) *PaperX

func (*PaperX) SetTitle

func (p *PaperX) SetTitle(title string) *PaperX

func (*PaperX) SetTitleStyle

func (p *PaperX) SetTitleStyle(style lipgloss.Style) *PaperX

func (*PaperX) Wait

func (p *PaperX) Wait()

type SpinnerX

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

func NewSpinner

func NewSpinner() *SpinnerX

func (*SpinnerX) Msg

func (s *SpinnerX) Msg(msg string) *SpinnerX

func (*SpinnerX) Quit

func (s *SpinnerX) Quit()

func (*SpinnerX) Run

func (s *SpinnerX) Run()

func (*SpinnerX) SetSpinner

func (s *SpinnerX) SetSpinner(spinner spinner.Spinner) *SpinnerX

func (*SpinnerX) SetSpinnerStyle

func (s *SpinnerX) SetSpinnerStyle(style lipgloss.Style) *SpinnerX

func (*SpinnerX) SetTextStyle

func (s *SpinnerX) SetTextStyle(style lipgloss.Style) *SpinnerX

type TableModelX

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

func NewTable

func NewTable(ctx context.Context) *TableModelX

func (*TableModelX) Ctx

func (t *TableModelX) Ctx() context.Context

func (*TableModelX) Quit

func (t *TableModelX) Quit()

func (*TableModelX) Run

func (t *TableModelX) Run()

func (*TableModelX) SelectedRow

func (t *TableModelX) SelectedRow() (table.Row, bool)

func (*TableModelX) SelectedRowChan

func (t *TableModelX) SelectedRowChan() chan table.Row

func (*TableModelX) SetColumns

func (t *TableModelX) SetColumns(columns []table.Column) *TableModelX

func (*TableModelX) SetHeight

func (t *TableModelX) SetHeight(height int) *TableModelX

func (*TableModelX) SetRows

func (t *TableModelX) SetRows(rows []table.Row) *TableModelX

func (*TableModelX) SetTableStyle

func (t *TableModelX) SetTableStyle(style table.Styles) *TableModelX

func (*TableModelX) SetWidth

func (t *TableModelX) SetWidth(width int) *TableModelX

func (*TableModelX) Wait

func (t *TableModelX) Wait()

type TextX

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

func NewText

func NewText(content string, keywords ...string) *TextX

func (*TextX) SetStyle

func (t *TextX) SetStyle(style lipgloss.Style) *TextX

func (*TextX) String

func (t *TextX) String() string

Jump to

Keyboard shortcuts

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