explorer

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Styles = struct {
	SelectedModule                lipgloss.Style
	HighlightedModule             lipgloss.Style
	HighlightedUnselectableModule lipgloss.Style
	SelectableModule              lipgloss.Style
	UnselectableModule            lipgloss.Style
	Preview                       lipgloss.Style
}{
	SelectedModule:                lipgloss.NewStyle().Margin(0, 2).Foreground(lipgloss.Color("12")).Bold(true),
	HighlightedModule:             lipgloss.NewStyle().Margin(0, 2).Foreground(lipgloss.Color("10")),
	HighlightedUnselectableModule: lipgloss.NewStyle().Margin(0, 2).Foreground(lipgloss.Color("1")).Faint(true),
	SelectableModule:              lipgloss.NewStyle().Margin(0, 2).Foreground(lipgloss.Color("8")).Faint(false),
	UnselectableModule:            lipgloss.NewStyle().Margin(0, 2).Foreground(lipgloss.Color("1")).Faint(true),
	Preview:                       lipgloss.NewStyle().Margin(0, 2).Foreground(lipgloss.Color("70")).Bold(false).Faint(true),
}

Functions

This section is empty.

Types

type Navigator struct {
	SelectedModule    string
	HighlightedModule string
	HighlightedIndex  int

	InParentColumn bool
	InChildColumn  bool

	CurrentGrandParentPreviewColumn []string
	CurrentParentColumn             []string
	CurrentChildColumn              []string
	CurrentGrandChildPreviewColumn  []string

	CurrentPreviewColumn []string

	FrameHeight int
	// contains filtered or unexported fields
}

func New

func New(requestOutputModule string, opts ...Option) (*Navigator, error)
func (n *Navigator) AddModule(modName string)

TODO(colin): call this from somewhere. same place as where the modselect.AddModule is called

func (n *Navigator) Init() tea.Cmd
func (n *Navigator) Update(msg tea.Msg) (tea.Model, tea.Cmd)
func (n *Navigator) View() string
type NavigatorMemory struct {
	// contains filtered or unexported fields
}

func NewNavigatorMemory

func NewNavigatorMemory() *NavigatorMemory
func (n *NavigatorMemory) GetLastSelectedChildOf(modName string) (string, bool)
func (n *NavigatorMemory) GetLastSelectedParentOf(modName string) (string, bool)
func (n *NavigatorMemory) SetLastSelectedChildOf(modName, childName string)
func (n *NavigatorMemory) SetLastSelectedParentOf(modName, parentName string)

type Option

type Option func(*Navigator)

func WithManifestFilePath

func WithManifestFilePath(path string) Option

func WithModuleGraph

func WithModuleGraph(graph *manifest.ModuleGraph) Option

Jump to

Keyboard shortcuts

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