layout

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColorBgBackdrop  = "bg_backdrop"
	ColorBgInput     = "bg_input"
	ColorBgBase      = "bg_base"
	ColorBgSurface   = "bg_surface"
	ColorBgPanel     = "bg_panel"
	ColorBgRaised    = "bg_raised"
	ColorBgHighlight = "bg_highlight"
	ColorBgSelected  = "bg_selected"

	ColorTextBright = "text_bright"
	ColorText       = "text"
	ColorTextSoft   = "text_soft"
	ColorTextMuted  = "text_muted"
	ColorTextFaint  = "text_faint"
	ColorTextDim    = "text_dim"

	ColorAccent       = "accent"
	ColorAccentBold   = "accent_bold"
	ColorAccentSoft   = "accent_soft"
	ColorBorderAccent = "border_accent"
	ColorBorder       = "border"
)

Variables

This section is empty.

Functions

func FromJSON

func FromJSON(name string, data []byte) (capabilities.Layout, error)

func Hidden

func Hidden(layout capabilities.Layout) capabilities.Layout

func Named

func Named(name string, root capabilities.Node) capabilities.Layout

func Split

func Split(left, right capabilities.Node) capabilities.Layout

Types

type Layout

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

func (Layout) Name

func (l Layout) Name() string

func (Layout) Tree

func (l Layout) Tree() capabilities.Node

type Node

type Node struct {
	Kind              string
	ComponentName     string
	DirectionName     string
	AlignItemsName    string
	MinWidthValue     string
	FallbackName      string
	WidthValue        any
	HeightValue       any
	PaddingValue      Padding
	StyleValue        Style
	ChildrenNodes     []capabilities.Node
	WhenPopupOpenNode capabilities.Node
	VariantsMap       map[string]string
}

func Chat

func Chat() *Node

func Column

func Column(children ...capabilities.Node) *Node

func Component

func Component(name string) *Node

func Editor

func Editor() *Node

func EditorOrPalette

func EditorOrPalette() *Node

func InfoView

func InfoView() *Node

func InputBox

func InputBox() *Node

func Row

func Row(children ...capabilities.Node) *Node

func Separator

func Separator() *Node

func Sessions

func Sessions() *Node

func SplitStatusBar

func SplitStatusBar() *Node

func StatusBar

func StatusBar() *Node

func Tabs

func Tabs() *Node

func VerticalSeparator

func VerticalSeparator() *Node

func (*Node) AlignItems

func (n *Node) AlignItems(value string) *Node

func (*Node) Fallback

func (n *Node) Fallback(value string) *Node

func (*Node) Height

func (n *Node) Height(value any) *Node

func (*Node) MinWidth

func (n *Node) MinWidth(value string) *Node

func (*Node) Padding

func (n *Node) Padding(value Padding) *Node

func (*Node) Style

func (n *Node) Style(value Style) *Node

func (*Node) Variants

func (n *Node) Variants(value map[string]string) *Node

func (*Node) WhenPopupOpen

func (n *Node) WhenPopupOpen(value capabilities.Node) *Node

func (*Node) Width

func (n *Node) Width(value any) *Node

type Padding

type Padding struct {
	Top    *float64
	Right  *float64
	Bottom *float64
	Left   *float64
}

type Style

type Style struct {
	Background      []uint8
	Foreground      []uint8
	Muted           []uint8
	Accent          []uint8
	BackgroundToken string
	ForegroundToken string
	MutedToken      string
	AccentToken     string
}

func ThemeBg

func ThemeBg(background string) Style

func ThemeStyle

func ThemeStyle(background, foreground string) Style

Jump to

Keyboard shortcuts

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