ui

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package ui renders the terminal UI using Lipgloss.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(usages *api.GetUsagesResponse, sub *api.GetSubscriptionResponse, tr *i18n.I18n, showProgress bool) string

Render builds the terminal UI from API responses.

func RenderWithMode added in v1.1.3

func RenderWithMode(
	usages *api.GetUsagesResponse,
	sub *api.GetSubscriptionResponse,
	tr *i18n.I18n,
	showProgress bool,
	mode RenderMode,
) string

RenderWithMode builds the terminal UI using the requested render mode.

Types

type RenderMode added in v1.1.3

type RenderMode string

RenderMode controls whether the terminal UI uses Unicode styling or an ASCII fallback.

const (
	// RenderModeAuto chooses ASCII or Unicode based on the current terminal environment.
	RenderModeAuto RenderMode = "auto"
	// RenderModeUnicode forces the full Unicode terminal UI.
	RenderModeUnicode RenderMode = "unicode"
	// RenderModeASCII forces ASCII-only rendering.
	RenderModeASCII RenderMode = "ascii"
)

func ParseRenderMode added in v1.1.3

func ParseRenderMode(value string) (RenderMode, bool)

ParseRenderMode parses a render mode name.

func ResolveRenderMode added in v1.1.3

func ResolveRenderMode() RenderMode

ResolveRenderMode resolves KIME_RENDER_MODE into a concrete render mode.

Jump to

Keyboard shortcuts

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