@sigx/terminal 0.2.1 → 0.2.3

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 ADDED
@@ -0,0 +1,61 @@
1
+ # @sigx/terminal
2
+
3
+ SignalX Terminal — a TUI framework with TSX support. Build interactive terminal applications using the same component model and reactive signals as SignalX.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @sigx/terminal
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```tsx
14
+ /** @jsxImportSource @sigx/terminal */
15
+ import { component, signal, defineApp, Input, Button } from '@sigx/terminal';
16
+
17
+ const App = component(() => {
18
+ const name = signal('');
19
+
20
+ return () => (
21
+ <box border="single" borderColor="cyan" label="Greeting">
22
+ <Input model={() => name} label="Name" autofocus />
23
+ <br />
24
+ <text color="green">Hello, {name.value || 'world'}!</text>
25
+ <br />
26
+ <Button label="Exit" onClick={() => process.exit(0)} />
27
+ </box>
28
+ );
29
+ });
30
+
31
+ defineApp(<App />).mount({ clearConsole: true });
32
+ ```
33
+
34
+ ## Built-in Elements
35
+
36
+ - `<box>` — Container with optional borders (`single`, `double`, `rounded`), colors, shadows, and labels
37
+ - `<text>` — Text with ANSI color support
38
+ - `<br>` — Line break
39
+
40
+ ## Components
41
+
42
+ | Component | Description |
43
+ |---|---|
44
+ | `Input` | Text input with model binding |
45
+ | `Button` | Clickable button |
46
+ | `Select` | Option list with keyboard navigation |
47
+ | `Checkbox` | Toggle checkbox |
48
+ | `ProgressBar` | Visual progress indicator |
49
+
50
+ ## Utilities
51
+
52
+ - `onKey(handler)` — Subscribe to keyboard events
53
+ - `focusNext()` / `focusPrev()` — Programmatic focus management
54
+
55
+ ## Documentation
56
+
57
+ Full documentation and guides are available at the [SignalX repository](https://github.com/signalxjs/core).
58
+
59
+ ## License
60
+
61
+ [MIT](https://github.com/signalxjs/core/blob/main/LICENSE)