1- # clayterm
1+ # @ bomb .sh/tty
22
33A low-level, platform-independent terminal renderer and event parser for
4- JavaScript. You can use clayterm directly, or as the foundation for your own
5- framework.
4+ JavaScript. You can use ` @bomb.sh/tty ` directly, or as the foundation for your
5+ own framework.
66
77## Features
88
99** Declarative terminal UI** — Build terminal interfaces the same way you'd build
10- a web page. Clayterm uses [ Clay] ( https://github.com/nicbarker/clay ) under the
11- hood, giving you flexbox-like layout, pointer detection, and scroll containers —
12- all rendered to the terminal as box-drawing characters and ANSI escape
13- sequences.
10+ a web page. ` @bomb.sh/tty ` uses [ Clay] ( https://github.com/nicbarker/clay ) under
11+ the hood, giving you flexbox-like layout, pointer detection, and scroll
12+ containers — all rendered to the terminal as box-drawing characters and ANSI
13+ escape sequences.
1414
15- ** Zero I/O** — Clayterm never reads stdin or writes stdout. You feed it bytes
16- and get bytes back. This makes it trivially embeddable in any framework, any
17- runtime, any event loop. There are no opinions about how you do I/O, just pure
18- computation.
15+ ** Zero I/O** — ` @bomb.sh/tty ` never reads stdin or writes stdout. You feed it
16+ bytes and get bytes back. This makes it trivially embeddable in any framework,
17+ any runtime, any event loop. There are no opinions about how you do I/O, just
18+ pure computation.
1919
20- ** Runs everywhere** — The entire engine is compiled to WebAssembly, so clayterm
21- will run anywhere JavaScript runs with no native dependencies, and no build step
22- for consumers.
20+ ** Runs everywhere** — The entire engine is compiled to WebAssembly, so
21+ ` @bomb.sh/tty ` will run anywhere JavaScript runs with no native dependencies,
22+ and no build step for consumers.
2323
2424### Examples
2525
2626See this keyboard example and more in the [ examples folder] ( examples/README.md ) .
27- This demo uses Clayterm for all layout and input parsing.
27+ This demo uses ` @bomb.sh/tty ` for all layout and input parsing.
2828
2929#### Keyboard Events
3030
@@ -42,9 +42,9 @@ state. Clay drives the hit testing; no manual coordinate math required.
4242
4343## Architecture
4444
45- Clayterm does not do any I/O itself. On the ouput side, it converts UI elements
46- into a raw sequence of bytes and pointer events, and on the input side, it
47- converts a stream of raw bytes into structured events.
45+ ` @bomb.sh/tty ` does not do any I/O itself. On the ouput side, it converts UI
46+ elements into a raw sequence of bytes and pointer events, and on the input side,
47+ it converts a stream of raw bytes into structured events.
4848
4949### Output
5050
@@ -117,7 +117,7 @@ To render this:
117117```
118118
119119``` typescript
120- import { close , createTerm , grow , open , rgba , text } from " clayterm " ;
120+ import { close , createTerm , grow , open , rgba , text } from " @bomb.sh/tty " ;
121121
122122let term = await createTerm ({ width: 80 , height: 24 });
123123
@@ -146,8 +146,8 @@ process.stdout.write(output);
146146
147147### Pointer detection
148148
149- Pass pointer state to ` render() ` to have clayterm do hit detection and return
150- pointer events in addition to the byte sequence.
149+ Pass pointer state to ` render() ` to have ` @bomb.sh/tty ` do hit detection and
150+ return pointer events in addition to the byte sequence.
151151
152152``` typescript
153153let { output, events } = term .render (
@@ -186,7 +186,7 @@ process.stdout.write(output);
186186### Input parsing
187187
188188``` typescript
189- import { createInput } from " clayterm /input" ;
189+ import { createInput } from " @bomb.sh/tty /input" ;
190190
191191let input = await createInput ({ escLatency: 25 });
192192
0 commit comments