# Changelog

## 0.3.0 (2026-09-07)

Three things every application built on Atui was writing for itself, which is
the sign that they belong here. All extracted from
[dockat](https://github.com/iboard/dockat), the way `Atui.TextInput` was.

  * `Atui.Text` — what a terminal UI does to a string that does not fit, and
    the one thing it does to a string it did not write: `wrap/2` and
    `hard_wrap/2`, `elide_left/2` and `elide_right/2` for the two ends worth
    keeping, `first_fitting/2` for a footer that says as much as there is room
    for, and `sanitize/1`, which takes the escape sequences out of somebody
    else's output before it is drawn. A grid of cells is a surface where an
    unsanitised `\e[2J` is not a character but an instruction, so a toolkit
    that hands out the grid should hand out this too.
  * `Atui.Fetch` — runs a function in a process of its own and sends the answer
    to a view module as an event. `Atui.Runtime` is a single process, so an ssh
    round trip or a slow query taken inside a callback is a UI that has stopped
    with the keyboard in it. The event is addressed to the module rather than to
    whichever view has focus, so an answer that lands while a popup is open
    still reaches the view that asked; and nothing it runs can crash the
    process, since a crash report printed over a drawn frame is a worse failure
    than the one that caused it.
  * `Atui.Screen.put_text_right/6` — the right-aligned sibling of
    `put_text_centered/5`, with a margin so that a label sits inside a border
    rather than on it. Four views in one application had the same private
    version of it.

## 0.2.0 (2026-09-03)

  * `Atui.TextInput` — a single-line text field a view holds in its own state,
    the way it holds an `Atui.Panes`: `handle_key/2` claims the printable
    characters and the readline editing keys, `into/3` folds the reply back
    into the host's state, and `draw/4` puts it in one row of a screen with the
    cursor drawn as a reversed cell. Long values scroll to keep the cursor in
    view.

## 0.1.0

First release as a library.

Extracted from the application it grew inside: `:atui` is now a package with no
application callback module of its own, and the demo it was written against
lives in `demo/` as a separate project depending on it by path.

  * `Atui.Runtime` — the IO loop: raw terminal, a stack of views, per-view
    timers, and a repaint that writes only when the frame changed
  * `Atui.View` — the view behaviour, with `mount/1`, `render/2`, `place/2` and
    callbacks for keys, ticks and events
  * `Atui.Panes` — a tiling window manager a view holds in its own state:
    open and close windows, move focus in two axes, swap positions, one ticker
    per pane. Extracted from the demo's root view, where it was not reusable.
  * `Atui.Screen` / `Atui.Rect` / `Atui.Layout` — clipped cell drawing, box
    borders, geometry and grid splitting
  * `Atui.Style` — styles as data, emitted as SGR runs at render time
  * `Atui.Key` / `Atui.Input` / `Atui.Terminal` — byte decoding including
    modified keys, and the raw-mode setup a BEAM TUI actually needs
  * `Atui.version/0` — for an application to put in a title bar
