viewer

package
v0.36.2 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: MIT Imports: 8 Imported by: 0

README

viewer

import "github.com/lucasassuncao/yedit/viewer"

Package viewer is a read-only TUI that browses the presets exposed by a presets.Source. Use it to ship a "show-examples" sub-command alongside an editor built on yedit/editor.

Index

func Run

func Run(src presets.Source) error

Run starts the viewer TUI as a blocking call.

type Model

Model is the Bubble Tea root for the viewer TUI.

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

func NewModel
func NewModel(src presets.Source) Model

NewModel constructs the TUI from a presets.Source.

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

Generated by gomarkdoc

Documentation

Overview

Package viewer is a read-only TUI that browses the presets exposed by a presets.Source. Use it to ship a "show-examples" sub-command alongside an editor built on yedit/editor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(src presets.Source) error

Run starts the viewer TUI as a blocking call.

Types

type Model

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

Model is the Bubble Tea root for the viewer TUI.

func NewModel

func NewModel(src presets.Source) Model

NewModel constructs the TUI from a presets.Source.

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

Jump to

Keyboard shortcuts

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