# kiln-ui Reusable, game-agnostic terminal UI widgets built on [ratatui](https://ratatui.rs). Extracted from the [kiln](https://github.com/) project so the same widgets can drive any ratatui front-end (a game editor, a text editor, …). The crate has **no game-engine dependency**. ## Widgets - **`code_editor::CodeEditor`** — a hand-written, modeless, keyboard-only full-screen code editor: selection, undo/redo, word/paragraph motion, system clipboard, and syntect syntax highlighting. (Highlighting is currently hardcoded to Rhai; a pluggable syntax/theme is a planned follow-up.) - **`text_field::TextField`** — a single-line editable field (the building block for dialog inputs). - **`dialog::Dialog`** — modal text-entry and filterable-list dialogs, generic over a host context they mutate only through callbacks. - **`CursorOverlay` / `render_overlay` / `dim_area`** — the modal-overlay scaffolding: a widget paints into a buffer and returns where the caret goes; the host places it. ## Notes - **Not WASM-compatible**: pulls in `syntect` (highlighting) and `arboard` (system clipboard). The ratatui core itself is WASM-friendly. - **ratatui version**: pinned to `0.30.x`. Consumers exchange ratatui types with these widgets, so their `ratatui` must unify with this crate's. ## Development ```bash cargo build cargo test # pure-logic unit tests, no TTY required ```