beamtea_cursor (beamtea v0.1.2)
View SourceA bubble: a blinking cursor, mirroring the cursor package in charmbracelet/bubbles.
Self-ticking like the spinner. Start it with blink/1, forward messages to update/2, and wrap the character under the cursor with view/2 — it alternates between reverse-video (shown) and plain (hidden) on each blink.
Summary
Functions
The command that starts blinking. Return it from init/1.
Options: mode (blink | static | hidden, default blink), blink_ms (default 530, matching most terminals).
Toggle visibility on the cursor's own tick; ignore other messages.
Render Char according to the cursor's current state.
Types
Functions
-spec blink(model()) -> beamtea:cmd().
The command that starts blinking. Return it from init/1.
-spec new() -> model().
Equivalent to new(#{}).
Options: mode (blink | static | hidden, default blink), blink_ms (default 530, matching most terminals).
-spec update(term(), model()) -> {model(), beamtea:cmd()}.
Toggle visibility on the cursor's own tick; ignore other messages.
Render Char according to the cursor's current state.