8bc721d53b
7 funciones Go del dominio tui: apply_gradient (gradiente de color en texto), draw_box y draw_separator (renderizado de cajas y separadores con box_chars), load_ascii_art (carga de arte ASCII desde archivos), normalize_terminal_output y strip_ansi (limpieza de salida de terminal), read_dir_autocomplete (autocompletado de rutas de directorio). Incluye box_chars.go como helper de caracteres Unicode para bordes.
1.5 KiB
1.5 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path, source_repo, source_license, source_file
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | params | output | tested | tests | test_file_path | file_path | source_repo | source_license | source_file | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| draw_box | function | go | tui | 1.0.0 | pure | func DrawBox(content string, width int, style lipgloss.Style) string | Dibuja un box unicode (bordes dobles) alrededor de contenido con ancho y estilo lipgloss configurables. |
|
false |
|
|
string con el box renderizado (top + content + bottom) | false | functions/tui/draw_box.go | https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com/egutierrez/DevLauncher.git | MIT | launcher/ui/styles.go |
Ejemplo
style := lipgloss.NewStyle().Foreground(lipgloss.Color("#00d7ff"))
box := tui.DrawBox(" Hello World ", 40, style)
fmt.Println(box)
// ╔══════════════════════════════════════╗
// Hello World
// ╚══════════════════════════════════════╝
Notas
Usa caracteres de box drawing doble (BoxTL=╔, BoxH=═, etc.) definidos en box_chars.go. El contenido no se recorta ni centra automaticamente — el caller controla el formato interior.