@cssints/tui 0.4.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,9 +1,40 @@
1
1
  # @cssints/tui
2
2
 
3
- [cssints](../../README.md) in a terminal: the runtime of `cssints/tui` styles (states, the mouse pointer, the caret,
4
- themes) and its adapters for [OpenTUI](https://opentui.com) and [@bomb.sh/tty](https://bomb.sh/docs/tty/api/). The styles are written with `cssints/tui`, which the cssints
5
- Vite plugin compiles to prop objects; this package puts them on renderables. The design is in
6
- [docs/research/tui.md](../../docs/research/tui.md).
3
+ > **Deprecated (2026-10-21).** The replacement is the `terminal/` target of
4
+ > [`native/`](../../native/README.md) in this repository ([native/terminal](../../native/terminal)): `cssints/clay` styles, laid out by
5
+ > [Clay](https://github.com/nicbarker/clay) and drawn into character cells on
6
+ > [termbox2](https://github.com/termbox/termbox2), with the keyboard focus layer in C. The package still works and is
7
+ > still published; importing it prints one warning ("`@cssints/tui` is deprecated: …"). The registry marks the version
8
+ > deprecated when the release runs `npm deprecate` (see [RELEASING.md](../../RELEASING.md)).
9
+
10
+ | Here | There (`native/terminal/`) |
11
+ | ----------------------------------------------- | --------------------------------------------------------------------------------------------- |
12
+ | `cssints/tui` styles, the Vite plugin | `cssints/clay` styles, `generator/clay-header.ts` → a C header (`styles.h`) |
13
+ | the layout of an adapter (`resolve`, a flexbox) | Clay lays out; `terminal/measure.c` measures text as a monospace grid |
14
+ | OpenTUI (`/opentui`) or @bomb.sh/tty (`/bomb`) | `terminal/render.c` fills cells, `terminal/tb2.c` is termbox2: truecolour or 256, keys, mouse |
15
+ | `:focus` from the renderable | `terminal/focus.c`: the Tab order, roving focus in a group, `focus(id)` |
16
+ | Solid or React trees | hand-written C pages: `terminal/page.c` (the Sensors page), `sky.c`, `thread.c`, `profile.c` |
17
+
18
+ What carries over: styles as data (a `styles.ts` module, no sheet and no cascade), tokens and named themes (the static
19
+ dark and light ones), and the state names (`:hover`, `:active`, `:focus`) as overlays. What does not: OpenTUI and
20
+ bomb.sh, the run-time `setTheme` and the system theme, hover (termbox2 reports no motion), images, a body that wraps,
21
+ wide glyphs and emoji, floating overlays, sub-cell borders and radii. [native/docs/map.md](../../native/docs/map.md) step 6 is the full account.
22
+
23
+ ```sh
24
+ cd ../../native
25
+ sh terminal/build.sh # styles.ts -> generator/clay-header.ts -> styles.h, then cc -> terminal/demo
26
+ ./terminal/demo # the Sensors page in cells: Tab, Up/Down, Space, t, q
27
+ ./terminal/demo --page sky # apps/csssky-tui's feed; enter opens the thread
28
+ ./terminal/demo --page profile # apps/csssky's profile, the screen the tui never had
29
+ ./terminal/demo --dump out.txt # one frame headless, '.' is a fill
30
+ ./terminal/demo --keys Tab,ArrowDown --dump out.txt # a frame after each key
31
+ ```
32
+
33
+ The rest of this file describes the deprecated package: [cssints](../../README.md) in a terminal, the runtime of
34
+ `cssints/tui` styles (states, the mouse pointer, the caret, themes) and its adapters for
35
+ [OpenTUI](https://opentui.com) and [@bomb.sh/tty](https://bomb.sh/docs/tty/api/). The styles are written with
36
+ `cssints/tui`, which the cssints Vite plugin compiles to prop objects; this package puts them on renderables. The design
37
+ is in [docs/research/tui.md](../../docs/research/tui.md).
7
38
 
8
39
  ```ts
9
40
  // styles.ts
package/dist/index.mjs CHANGED
@@ -1,4 +1,10 @@
1
1
  //#region src/index.ts
2
+ const WARNED = Symbol.for("cssints.tui.deprecated");
3
+ const flags = globalThis;
4
+ if (!flags[WARNED]) {
5
+ flags[WARNED] = true;
6
+ console.warn("@cssints/tui is deprecated: the terminal target in the cssints repository (native/terminal) replaces it (cssints/clay styles, Clay layout, cells on termbox2). See packages/tui/README.md");
7
+ }
2
8
  const STATES = [
3
9
  ":hover",
4
10
  ":focus",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cssints/tui",
3
- "version": "0.4.0",
4
- "description": "cssints in a terminal: the runtime of cssints/tui styles (states, cursors, themes) and its OpenTUI and @bomb.sh/tty adapters",
3
+ "version": "0.5.1",
4
+ "description": "Deprecated: the terminal target in the cssints repository's native/ replaces this. Kept for existing apps: the runtime of cssints/tui styles (states, cursors, themes) and its OpenTUI and @bomb.sh/tty adapters",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -38,7 +38,7 @@
38
38
  "peerDependencies": {
39
39
  "@bomb.sh/tty": ">=0.9.0",
40
40
  "@opentui/core": ">=0.5.17",
41
- "cssints": "^0.4.0"
41
+ "cssints": "^0.5.0"
42
42
  },
43
43
  "peerDependenciesMeta": {
44
44
  "@bomb.sh/tty": {