Replace the between-screens ring spinner with a titled skeleton card: a heading, the one-cell working chip beside a "reading from <device>…" caption, and a two-row braille LED bar in place of the old ring. The bar is a Knight-Rider scanner — a red head sweeps left↔right and bounces off both ends over a dark-gray track, dragging a persistence-of- vision comet trail (per-tick decay) with a white-hot core. It rides the same tick that spins the chip and fades in from black with the card, so the wait reads as work rather than a frozen bar. Thread an optional title/caption through busy_overlay so each gap names the screen being fetched and the companion it's reading from. Give the CLI progress dialog the same liveness: a spinning chip on every row and a slim braille meter, with no dead track on indeterminate tasks. Drop the now-unused RingSpinner. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
49 lines
1.4 KiB
Python
49 lines
1.4 KiB
Python
"""A small, centralized, reusable full-screen text-UI library.
|
|
|
|
Built on prompt_toolkit (for the terminal, input, and resize handling) and Rich (for all
|
|
content rendering), this package gives the interactive app a consistent, bounded, layered
|
|
UI: screens never overflow the terminal, long content scrolls, going deeper stacks dialogs
|
|
over a dimmed parent, and Esc always dismisses the current layer.
|
|
|
|
Public API:
|
|
- :class:`~meshterm.ui.tui.session.TuiSession` — the running session and prompt helpers.
|
|
- :class:`~meshterm.ui.tui.select.Choice` / :class:`~meshterm.ui.tui.select.Separator`
|
|
— items for ``session.select``.
|
|
- Screen classes for advanced/custom layers.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from .overlay import BusyOverlay
|
|
from .progress import ProgressScreen
|
|
from .prompt import (
|
|
AutocompleteScreen,
|
|
ConfirmScreen,
|
|
ReconnectDialog,
|
|
TextScreen,
|
|
TypedConfirmDialog,
|
|
)
|
|
from .screen import CANCEL, BusyScreen, Screen, ScrollScreen
|
|
from .select import Choice, SelectScreen, Separator
|
|
from .session import TuiSession
|
|
from .spinner import Spinner
|
|
|
|
__all__ = [
|
|
"TuiSession",
|
|
"Screen",
|
|
"ScrollScreen",
|
|
"BusyScreen",
|
|
"SelectScreen",
|
|
"Choice",
|
|
"Separator",
|
|
"TextScreen",
|
|
"ConfirmScreen",
|
|
"AutocompleteScreen",
|
|
"ReconnectDialog",
|
|
"TypedConfirmDialog",
|
|
"ProgressScreen",
|
|
"Spinner",
|
|
"BusyOverlay",
|
|
"CANCEL",
|
|
]
|