panels

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package panels contains Bubble Tea sub-models for the diff TUI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyDiffPalette

func ApplyDiffPalette(p jsonpanels.Palette)

ApplyDiffPalette updates diff panel style vars.

func ApplyPalette

func ApplyPalette(p jsonpanels.Palette)

ApplyPalette updates status bar styles from a palette.

func StatusBar

func StatusBar(d *node.Diff, view string, width int, searchMode bool, searchQuery string) string

StatusBar renders the bottom status bar for the diff TUI.

Types

type InfoPanel

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

InfoPanel shows diff summary and hunk navigation.

func NewInfoPanel

func NewInfoPanel(d *node.Diff, w, h int) InfoPanel

NewInfoPanel creates an info panel.

func (*InfoPanel) Resize

func (p *InfoPanel) Resize(w, h int)

func (*InfoPanel) SetFocused

func (p *InfoPanel) SetFocused(f bool)

func (*InfoPanel) SetHunkIdx

func (p *InfoPanel) SetHunkIdx(i int)

SetHunkIdx updates which hunk is highlighted in the info panel.

func (*InfoPanel) View

func (p *InfoPanel) View() string

type SplitPanel

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

SplitPanel renders old and new file side-by-side with synchronised scrolling.

func NewSplitPanel

func NewSplitPanel(d *node.Diff, w, h int) SplitPanel

NewSplitPanel creates a side-by-side diff panel.

func (*SplitPanel) CycleFocus

func (p *SplitPanel) CycleFocus()

func (*SplitPanel) HalfPageDown

func (p *SplitPanel) HalfPageDown()

func (*SplitPanel) HalfPageUp

func (p *SplitPanel) HalfPageUp()

func (*SplitPanel) MatchCount

func (p *SplitPanel) MatchCount() int

func (*SplitPanel) NextMatch

func (p *SplitPanel) NextMatch()

func (*SplitPanel) PrevMatch

func (p *SplitPanel) PrevMatch()

func (*SplitPanel) Resize

func (p *SplitPanel) Resize(w, h int)

func (*SplitPanel) ScrollDown

func (p *SplitPanel) ScrollDown(n int)

func (*SplitPanel) ScrollUp

func (p *SplitPanel) ScrollUp(n int)

func (*SplitPanel) SetSearch

func (p *SplitPanel) SetSearch(q string)

func (*SplitPanel) View

func (p *SplitPanel) View() string

type UnifiedPanel

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

UnifiedPanel renders the diff in classic unified format.

func NewUnifiedPanel

func NewUnifiedPanel(d *node.Diff, w, h int) UnifiedPanel

NewUnifiedPanel creates a unified diff panel.

func (*UnifiedPanel) CurrentHunkIdx

func (p *UnifiedPanel) CurrentHunkIdx() int

CurrentHunkIdx returns the hunk index based on viewport position.

func (*UnifiedPanel) HalfPageDown

func (p *UnifiedPanel) HalfPageDown()

func (*UnifiedPanel) HalfPageUp

func (p *UnifiedPanel) HalfPageUp()

func (*UnifiedPanel) MatchCount

func (p *UnifiedPanel) MatchCount() int

func (*UnifiedPanel) NextMatch

func (p *UnifiedPanel) NextMatch()

func (*UnifiedPanel) PrevMatch

func (p *UnifiedPanel) PrevMatch()

func (*UnifiedPanel) Resize

func (p *UnifiedPanel) Resize(w, h int)

func (*UnifiedPanel) ScrollDown

func (p *UnifiedPanel) ScrollDown(n int)

func (*UnifiedPanel) ScrollUp

func (p *UnifiedPanel) ScrollUp(n int)

func (*UnifiedPanel) SetFocused

func (p *UnifiedPanel) SetFocused(f bool)

func (*UnifiedPanel) SetSearch

func (p *UnifiedPanel) SetSearch(q string)

func (*UnifiedPanel) View

func (p *UnifiedPanel) View() string

Jump to

Keyboard shortcuts

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