···33A terminal rendering backend for [Clay](https://github.com/nicbarker/clay),
44compiled to WebAssembly.
5566-With every frame, the entire UI tree is packed into a flat byte array
77-and sent to WASM in a single call. On the C side, Clay runs layout,
88-render commands are walked into a cell buffer, and the buffer is
99-diffed against the previous frame. Only the cells that actually
1010-changed produce output. The result is an ANSI escape sequence that can
1111-be written directly to stdout. One trip to WASM per frame, double
1212-buffered, and only the bytes that need to change hit the output
66+With every frame, the entire UI tree is packed into a flat byte array and sent
77+to WASM in a single call. On the C side, Clay runs layout, render commands are
88+walked into a cell buffer, and the buffer is diffed against the previous frame.
99+Only the cells that actually changed produce output. The result is an ANSI
1010+escape sequence that can be written directly to stdout. One trip to WASM per
1111+frame, double buffered, and only the bytes that need to change hit the output
1312stream.
14131514Because the WASM module is pure computation with no I/O, it runs anywhere
···3433## Usage
35343635```typescript
3737-import { open, close, text, grow, rgba, createTerm } from "clayterm";
3636+import { close, createTerm, grow, open, rgba, text } from "clayterm";
38373938const term = await createTerm({ width: 80, height: 24 });
4039···4645 layout: { padding: { left: 2, top: 1 } },
4746 border: {
4847 color: rgba(0, 255, 0),
4949- left: 1, right: 1, top: 1, bottom: 1,
4848+ left: 1,
4949+ right: 1,
5050+ top: 1,
5151+ bottom: 1,
5052 },
5153 cornerRadius: { tl: 1, tr: 1, bl: 1, br: 1 },
5254 }),