Documentation
¶
Overview ¶
Package ui provides the main UI for the kat application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// KeyBinds contains key binding configurations for different UI components.
KeyBinds *KeyBinds `json:"keybinds,omitempty" jsonschema:"title=Key Binds"`
// Themes defines custom color for the UI, defined as a map of theme name to theme config.
// Themes can be referenced by name in the global and/or profile UI configs.
Themes map[string]ThemeConfig `json:"themes,omitempty" jsonschema:"title=Themes"`
// UI contains general UI display settings.
UI *UIConfig `json:"ui,omitempty" jsonschema:"title=UI"`
}
Config contains TUI-specific configuration.
func (*Config) EnsureDefaults ¶
func (c *Config) EnsureDefaults()
type GotResultMsg ¶
type KeyBinds ¶
type KeyBinds struct {
// Common contains key bindings that apply across all UI components.
Common *common.KeyBinds `json:"common,omitempty" jsonschema:"title=Common Key Binds"`
// List contains key bindings specific to list views.
List *list.KeyBinds `json:"list,omitempty" jsonschema:"title=List Key Binds"`
// Menu contains key bindings specific to menu views.
Menu *menu.KeyBinds `json:"menu,omitempty" jsonschema:"title=Menu Key Binds"`
// Pager contains key bindings specific to the pager view.
Pager *pager.KeyBinds `json:"pager,omitempty" jsonschema:"title=Pager Key Binds"`
}
KeyBinds contains key binding configurations for different UI components.
func NewKeyBinds ¶
func NewKeyBinds() *KeyBinds
func (*KeyBinds) EnsureDefaults ¶
func (kb *KeyBinds) EnsureDefaults()
type OverlayState ¶
type OverlayState int
type ShowResultMsg ¶
type ShowResultMsg struct{}
type ThemeConfig ¶
type ThemeConfig struct {
// Styles contains the style entries for Chroma rendering, which uses the same syntax as Pygments.
// Define a map of Pygments Tokens (https://pygments.org/docs/tokens/)
// to Pygments Styles (http://pygments.org/docs/styles/).
Styles chroma.StyleEntries `json:"styles,omitempty" jsonschema:"title=Styles"`
}
ThemeConfig defines custom theme configuration.
type UIConfig ¶
type UIConfig struct {
// MinimumDelay specifies the minimum delay before updating the display.
MinimumDelay *time.Duration `json:"minimumDelay,omitempty" jsonschema:"title=Minimum Delay,type=string,default=200ms"`
// Compact enables compact display mode with reduced spacing.
Compact *bool `json:"compact,omitempty" jsonschema:"title=Enable Compact Display,default=false"`
// WordWrap enables automatic word wrapping for long text.
WordWrap *bool `json:"wordWrap,omitempty" jsonschema:"title=Enable Word Wrap,default=true"`
// ChromaRendering enables syntax highlighting using Chroma.
ChromaRendering *bool `json:"chromaRendering,omitempty" jsonschema:"title=Enable Chroma Rendering,default=true"`
// LineNumbers enables line numbers in the display.
LineNumbers *bool `json:"lineNumbers,omitempty" jsonschema:"title=Enable Line Numbers,default=true"`
// Theme specifies the theme name to use. This can be a custom theme added under `themes`,
// or a theme from the Chroma Style Gallery: https://xyproto.github.io/splash/docs/
Theme string `json:"theme,omitempty" jsonschema:"title=Theme Name"`
}
func (*UIConfig) EnsureDefaults ¶
func (c *UIConfig) EnsureDefaults()
func (UIConfig) JSONSchemaExtend ¶ added in v0.15.0
func (c UIConfig) JSONSchemaExtend(schema *jsonschema.Schema)
Directories
¶
| Path | Synopsis |
|---|---|
|
Package ansis provides utilities for ANSI text styling and manipulation.
|
Package ansis provides utilities for ANSI text styling and manipulation. |
|
Package filepicker provides a file picker component for Bubble Tea applications.
|
Package filepicker provides a file picker component for Bubble Tea applications. |
|
Package overlay provides terminal UI overlay functionality for placing foreground content on top of background content, similar to modal dialogs or popup windows in terminal applications.
|
Package overlay provides terminal UI overlay functionality for placing foreground content on top of background content, similar to modal dialogs or popup windows in terminal applications. |
Click to show internal directories.
Click to hide internal directories.