modetui

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectSelectors

func CollectSelectors(node *Node) []string

func Run

func Run(root string, project *manifest.Manifest, catalog modecatalog.CapabilityCatalog, selected string) error

Types

type Node

type Node struct {
	ID, Label, Subtitle string
	Selector            *mode.Selector
	Children            []Node
}

func BuildTree

func BuildTree(catalog modecatalog.CapabilityCatalog) []Node

type Row

type Row struct {
	Node  *Node
	Depth int
}

func Flatten

func Flatten(nodes []Node, expanded map[string]bool) []Row

type SelectorState

type SelectorState uint8
const (
	Neutral SelectorState = iota
	ExplicitEnable
	ExplicitDisable
)

type State

type State struct {
	Selected string
	Modes    map[string]mode.Definition
	Dirty    bool
}

func LoadState

func LoadState(project *manifest.Manifest, selected string) (State, error)

func (*State) Apply

func (state *State) Apply(raw string, enabled bool) error

func (*State) Clear

func (state *State) Clear(raw string) error

func (*State) Create

func (state *State) Create(name string) error

func (*State) Definition

func (state *State) Definition() mode.Definition

func (*State) Delete

func (state *State) Delete() error

func (*State) Names

func (state *State) Names() []string

func (*State) ReadOnly

func (state *State) ReadOnly() bool

func (*State) Rename

func (state *State) Rename(name string) error

func (State) SelectorState

func (state State) SelectorState(canonical string) SelectorState

func (*State) SetBase

func (state *State) SetBase(base mode.Base) error

Jump to

Keyboard shortcuts

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