Initial extraction of the terminal (TUI) rendering target out of the Fulcro repository into this standalone companion library. Namespaces: com.fulcrologic.fulcro.tui.elements (element generators), …tui.engine (layout/paint/focus/input pipeline + node vocabulary), …tui.application (lifecycle + render driver), …tui.terminal (Terminal protocol + JLine/string backends), …tui.inspect (dev-only Fulcro Inspect shim), and …tui.perf (built-in babashka-safe profiler). The tui-example.form demo exercises the full stack.
Included capabilities:
Element generators (vbox, hbox, box, text, input, button, line, viewport) and the node model.
Layout (intrinsic sizing, placement, clamping/scrolling helpers).
Buffer rendering and diffing (cell/char buffers, SGR styling, ANSI emission, frame diff → ops → ANSI).
Component walker for standard Fulcro defsc components whose render returns terminal nodes (factory, computed-factory, render-instance/tree/root).
Focus management, text input editing, and key routing.
Terminal protocol with a JLine-backed terminal and a fake/string terminal for tests.
The driver (application creation, attach/mount/render, step, run loop, quit).
Arrow-key navigation and caret movement.
Line wrapping for read-only and editable text.
Multiline text-area editing (Enter inserts newline, visual-line caret movement, self-scrolling).
Viewport scrolling with follow-focus.
Built-in, babashka-safe profiler (…tui.perf): compile-time-gated p/profile points (zero overhead unless -Dfulcro.tui.perf is set), self-time report, and auto-profiling of a run-blocking! session. See the Guide’s Measuring performance section.
Extensible rendering: the per-tag render seams engine/content-size, engine/place, and engine/paint are multimethods on ::engine/tag, so a custom low-level rendered element can be added with defmethod (no engine fork) using the public painter/layout toolkit. Built-in tags keep their fast case path. See the Guide’s Extending: custom rendered elements section.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |