welcome

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package welcome implements the first-run welcome overlay panel for grut. It displays a curated introduction with the grut banner, essential keyboard shortcuts, and OK / Don't Show Again controls. The banner animates in line-by-line with a brief accent flash on each new line.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnimTickMsg

type AnimTickMsg time.Time

AnimTickMsg advances the welcome banner animation by one frame.

type DismissMsg

type DismissMsg struct{}

DismissMsg is sent when the user dismisses the welcome screen. The first-run marker is always persisted; users can re-show with W.

type Panel

type Panel struct {
	panels.BasePanel
	// contains filtered or unexported fields
}

Panel is the welcome overlay. It implements panels.Panel.

func New

func New() *Panel

New creates a new welcome overlay panel.

func (*Panel) Init

func (p *Panel) Init(_ context.Context) tea.Cmd

Init implements panels.Panel. It starts the banner reveal animation.

func (*Panel) KeyBindings

func (p *Panel) KeyBindings() []panels.KeyBinding

KeyBindings implements panels.Panel.

func (*Panel) SetSize

func (p *Panel) SetSize(width, height int)

SetSize overrides BasePanel to reclamp the scroll offset when the terminal shrinks or grows so content doesn't appear past the end.

func (*Panel) Update

func (p *Panel) Update(msg tea.Msg) (panels.Panel, tea.Cmd)

Update implements panels.Panel.

func (*Panel) View

func (p *Panel) View(width, height int) string

View implements panels.Panel.

Jump to

Keyboard shortcuts

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