Skip to content

0.2.0: collapsed borders, the widget gallery and the cookbook

Choose a tag to compare

@ralyodio ralyodio released this 07 Sep 15:52
a8d31a3

Collapsed borders

createApp({ collapseBorders: true }) makes adjacent panels share an edge rather than each drawing its own, the way CSS collapses table borders. Off by default, panel level only.

--- default ---                          --- collapsed ---
╭─ CPU ────────╮╭─ Memory ─────╮         ╭─ CPU ────────┬─ Memory ─────╮
│ all █████ 62%││ used ██▏  31%│         │ all █████ 62%│ used ██▏  31%│
╰──────────────╯╰──────────────╯         ╰──────────────┴──────────────╯

The layout half is a gap of minus one at a seam between two bordered siblings, so their borders land in the same column. The render half is a union of edge bits: a top-right corner meeting a top-left is down+left+right, which is the T that makes the pair read as one frame.

Implemented six times over: TypeScript, Rust, Go, Python, Zig, and the C core that C++, Ruby, PHP and Perl draw through. The same scene renders byte for byte identically in all five native ports. With the flag off the merge path is never taken, so every existing screen renders exactly as it did.

The widget gallery

hqtui.com/widgets — every widget, its real rendered output, and the code that drew it in eleven languages. 28 widgets across the six native ports, 8 through the FFI bindings, 7 in C++, and 8 in COBOL through a bridge that does not link against anything: it writes 80-column records that a TypeScript or a Rust adapter reads, byte-identically.

The pictures are rendered headlessly at build time by the library itself, and every snippet is a region of a program CI compiles and runs.

The High Quality Terminal UI Cookbook

Eleven chapters at hqtui.com/book, free to read and free as an EPUB, with a typeset PDF for $1 in crypto on any of fifteen chains.

Also

  • solve and stack take a gap per seam in every port, which may be negative
  • Zig and the C core gained the junction glyphs they never carried
  • The markdown renderer learned pipe tables
  • demo.sh --system fixes from #51 are in this release