simplify. remove tick

This commit is contained in:
2026-01-22 22:22:19 -05:00
parent 8cb4c82daa
commit 8c7cb24171
9 changed files with 133 additions and 88 deletions
+2 -2
View File
@@ -38,7 +38,7 @@ View (hiccup) → Render (ANSI string) → Terminal (raw mode I/O)
### Core Modules
- **tui.core** - Main runtime with core.async. Manages the event loop, executes commands (quit, tick, batch, seq), handles input via goroutines.
- **tui.core** - Main runtime with core.async. Manages the event loop, executes commands (quit, after, batch, seq), handles input via goroutines.
- **tui.render** - Converts hiccup (`[:col [:text "hi"]]`) to ANSI strings. Handles `:text`, `:row`, `:col`, `:box`, `:space` elements.
- **tui.terminal** - Platform abstraction: raw mode via `stty`, reads from `/dev/tty`, renders by printing ANSI.
- **tui.input** - Parses raw bytes into key messages (`[:key {:char \a}]`, `[:key :up]`, `[:key {:ctrl true :char \c}]`).
@@ -56,7 +56,7 @@ View (hiccup) → Render (ANSI string) → Terminal (raw mode I/O)
### Command Types
- `tui/quit` - Exit
- `(tui/tick ms)` - Send `:tick` after delay
- `(tui/after ms msg)` - Send `msg` after delay (for timers, animations)
- `(tui/batch cmd1 cmd2)` - Parallel execution
- `(tui/sequentially cmd1 cmd2)` - Sequential execution
- `(fn [] msg)` - Custom async returning a message