Skip to content

Commit 9de7762

Browse files
authored
Merge pull request #99 from bombshell-dev/bombshell-tty
♻️ rename clayterm -> @bomb.sh/tty
2 parents 25fb6a0 + f986009 commit 9de7762

9 files changed

Lines changed: 35 additions & 144 deletions

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,6 @@ permissions:
99
contents: read
1010

1111
jobs:
12-
verify-jsr:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- name: checkout
16-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
17-
with:
18-
submodules: true
19-
persist-credentials: false
20-
21-
- name: setup deno
22-
uses: denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v2.0.4
23-
with:
24-
deno-version: v2.x
25-
26-
- name: build wasm
27-
run: make
28-
29-
- name: Get Version
30-
id: vars
31-
run: echo "version=$(echo "${GITHUB_REF_NAME}" | sed 's/^v//')" >> $GITHUB_OUTPUT
32-
33-
- name: Build JSR
34-
run: deno task build:jsr "${STEPS_VARS_OUTPUTS_VERSION}"
35-
env:
36-
STEPS_VARS_OUTPUTS_VERSION: ${{steps.vars.outputs.version}}
37-
38-
- name: dry run publish
39-
run: deno publish --dry-run --allow-dirty
40-
4112
verify-npm:
4213
runs-on: ubuntu-latest
4314
steps:
@@ -82,7 +53,7 @@ jobs:
8253
path: ./build/npm
8354

8455
publish-npm:
85-
needs: [verify-jsr, verify-npm]
56+
needs: [verify-npm]
8657
runs-on: ubuntu-latest
8758
permissions:
8859
contents: read
@@ -105,37 +76,3 @@ jobs:
10576
- name: Publish NPM
10677
run: npm publish --access=public --tag=latest
10778
working-directory: ./build/npm
108-
109-
publish-jsr:
110-
needs: [verify-jsr, verify-npm]
111-
runs-on: ubuntu-latest
112-
permissions:
113-
contents: read
114-
id-token: write
115-
116-
steps:
117-
- name: checkout
118-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
119-
with:
120-
submodules: true
121-
persist-credentials: false
122-
123-
- name: setup deno
124-
uses: denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v2.0.4
125-
with:
126-
deno-version: v2.x
127-
128-
- name: build wasm
129-
run: make
130-
131-
- name: Get Version
132-
id: vars
133-
run: echo "version=$(echo "${GITHUB_REF_NAME}" | sed 's/^v//')" >> $GITHUB_OUTPUT
134-
135-
- name: Build JSR
136-
run: deno task build:jsr "${STEPS_VARS_OUTPUTS_VERSION}"
137-
env:
138-
STEPS_VARS_OUTPUTS_VERSION: ${{steps.vars.outputs.version}}
139-
140-
- name: Publish JSR
141-
run: deno publish --allow-dirty

.github/workflows/verify.yaml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -82,30 +82,6 @@ jobs:
8282
- name: test
8383
run: deno task test
8484

85-
jsr:
86-
needs: test
87-
runs-on: ubuntu-latest
88-
steps:
89-
- name: checkout
90-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
91-
with:
92-
submodules: true
93-
persist-credentials: false
94-
95-
- name: setup deno
96-
uses: denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v2.0.4
97-
with:
98-
deno-version: v2.x
99-
100-
- name: build wasm
101-
run: make
102-
103-
- name: Build JSR
104-
run: deno task build:jsr 0.0.0-verify.0
105-
106-
- name: dry run publish
107-
run: deno publish --dry-run --allow-dirty
108-
10985
npm:
11086
needs: test
11187
runs-on: ubuntu-latest

BUILD.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Building clayterm from source
1+
# Building @bomb.sh/tty from source
22

3-
This guide is for maintainers and builders working on clayterm itself.
3+
This guide is for maintainers and builders working on `@bomb.sh/tty` itself.
44

55
It covers:
66

@@ -10,7 +10,7 @@ It covers:
1010
- building the local development artifacts, and
1111
- verifying that the repo is ready for development.
1212

13-
It does **not** cover npm/JSR packaging or publishing.
13+
It does **not** cover npm packaging or publishing.
1414

1515
## What the local build produces
1616

@@ -30,8 +30,8 @@ The build depends on the `clay` git submodule.
3030
Preferred fresh clone:
3131

3232
```sh
33-
git clone --recurse-submodules https://github.com/bombshell-dev/clayterm.git
34-
cd clayterm
33+
git clone --recurse-submodules https://github.com/bombshell-dev/tty.git
34+
cd tty
3535
```
3636

3737
If you already cloned without submodules:
@@ -77,7 +77,7 @@ Then install LLVM and Deno with Homebrew:
7777
brew install llvm deno
7878
```
7979

80-
Use Homebrew LLVM before Apple's system `clang` when building clayterm:
80+
Use Homebrew LLVM before Apple's system `clang` when building `@bomb.sh/tty`:
8181

8282
```sh
8383
echo 'export PATH="$(brew --prefix llvm)/bin:$PATH"' >> ~/.zshrc
@@ -290,7 +290,5 @@ This document is intentionally limited to local source builds for development.
290290
Out of scope:
291291

292292
- `deno task build:npm`
293-
- `deno task build:jsr`
294293
- `npm publish`
295-
- `deno publish`
296294
- release tagging and package publishing workflows

README.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
# clayterm
1+
# @bomb.sh/tty
22

33
A 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

2626
See 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

122122
let 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
153153
let { 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

191191
let input = await createInput({ escLatency: 25 });
192192

deno.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
{
2-
"name": "@clayterm/clayterm",
2+
"name": "@bomb.sh/tty",
33
"license": "MIT",
44
"tasks": {
55
"test": "deno test",
66
"fmt": "deno fmt && clang-format -i src/*.c src/*.h",
77
"fmt:check": "deno fmt --check && clang-format --dry-run --Werror src/*.c src/*.h",
88
"build:npm": "deno run -A tasks/build-npm.ts",
9-
"build:jsr": "deno run -A tasks/build-jsr.ts",
109
"bench": "deno run -A bench/mod.ts"
1110
},
1211
"imports": {
@@ -23,10 +22,6 @@
2322
".": "./mod.ts",
2423
"./validate": "./validate.ts"
2524
},
26-
"publish": {
27-
"include": ["*.ts"],
28-
"exclude": ["!wasm.ts"]
29-
},
3025
"nodeModulesDir": "auto",
3126
"fmt": {
3227
"exclude": ["clay", "build"]

lint/prefer-let.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
type VariableDeclaration = Deno.lint.VariableDeclaration;
22

33
const plugin: Deno.lint.Plugin = {
4-
name: "clayterm",
4+
name: "tty",
55
rules: {
66
"prefer-let": {
77
create(context) {

ops.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function packString(
6464
let next = o + 4 + paddedLength;
6565
if (next > end) {
6666
throw new RangeError(
67-
`clayterm transfer buffer capacity exceeded while packing ${context} ` +
67+
`transfer buffer capacity exceeded while packing ${context} ` +
6868
`(${next} byte offset, ${end} byte limit). ` +
6969
`Render a smaller visible slice or reduce frame content.`,
7070
);

tasks/build-jsr.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

tasks/build-npm.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ await build({
2323
},
2424
skipSourceOutput: true,
2525
package: {
26-
name: "clayterm",
26+
name: "@bomb.sh/tty",
2727
version,
2828
description:
2929
"A terminal rendering backend for Clay, compiled to WebAssembly",
3030
license: "MIT",
3131
repository: {
3232
type: "git",
33-
url: "git+https://github.com/bombshell-dev/clayterm.git",
33+
url: "git+https://github.com/bombshell-dev/tty.git",
3434
},
3535
bugs: {
36-
url: "https://github.com/bombshell-dev/clayterm/issues",
36+
url: "https://github.com/bombshell-dev/tty/issues",
3737
},
3838
engines: {
3939
node: ">= 22",

0 commit comments

Comments
 (0)