@easbot/tui 0.2.5 → 0.2.7

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.
Files changed (3) hide show
  1. package/LICENSE +21 -21
  2. package/README.en.md +63 -63
  3. package/package.json +1 -1
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 houjallen
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 houjallen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.en.md CHANGED
@@ -1,63 +1,63 @@
1
- [中文](./README.md) | English
2
-
3
- # @easbot/tui
4
-
5
- Minimal terminal UI framework with differential rendering and synchronized output for flicker-free interactive CLI applications.
6
-
7
- > Ported and extended from pi-tui, with full control over the underlying implementation to support EASBot applications.
8
-
9
- ## Features
10
-
11
- - **Differential Rendering**: Three-strategy rendering system that only updates what changed
12
- - **Synchronized Output**: Uses CSI 2026 for atomic screen updates (no flicker)
13
- - **Bracketed Paste Mode**: Handles large pastes correctly with markers for >10 line pastes
14
- - **Component-based**: Simple Component interface with render() method
15
- - **Theme Support**: Components accept theme interfaces for customizable styling
16
- - **Built-in Components**: Text, TruncatedText, Input, Editor, Markdown, Loader, SelectList, SettingsList, Spacer, Image, Box, Container
17
- - **Inline Images**: Renders images in terminals that support Kitty or iTerm2 graphics protocols
18
- - **Autocomplete Support**: File paths and slash commands
19
-
20
- ## Quick Start
21
-
22
- ```typescript
23
- import { TUI, Text, Editor, ProcessTerminal } from "@easbot/tui";
24
-
25
- // Create terminal
26
- const terminal = new ProcessTerminal();
27
-
28
- // Create TUI
29
- const tui = new TUI(terminal);
30
-
31
- // Add components
32
- tui.addChild(new Text("Welcome to my app!"));
33
-
34
- const editor = new Editor(tui, editorTheme);
35
- editor.onSubmit = (text) => {
36
- console.log("Submitted:", text);
37
- tui.addChild(new Text(`You said: ${text}`));
38
- };
39
- tui.addChild(editor);
40
-
41
- // Start
42
- tui.start();
43
- ```
44
-
45
- ## Development
46
-
47
- ```bash
48
- # Install dependencies
49
- pnpm install
50
-
51
- # Build
52
- pnpm build
53
-
54
- # Test
55
- pnpm test
56
-
57
- # Type check
58
- pnpm type-check
59
- ```
60
-
61
- ## License
62
-
63
- MIT
1
+ [中文](./README.md) | English
2
+
3
+ # @easbot/tui
4
+
5
+ Minimal terminal UI framework with differential rendering and synchronized output for flicker-free interactive CLI applications.
6
+
7
+ > Ported and extended from pi-tui, with full control over the underlying implementation to support EASBot applications.
8
+
9
+ ## Features
10
+
11
+ - **Differential Rendering**: Three-strategy rendering system that only updates what changed
12
+ - **Synchronized Output**: Uses CSI 2026 for atomic screen updates (no flicker)
13
+ - **Bracketed Paste Mode**: Handles large pastes correctly with markers for >10 line pastes
14
+ - **Component-based**: Simple Component interface with render() method
15
+ - **Theme Support**: Components accept theme interfaces for customizable styling
16
+ - **Built-in Components**: Text, TruncatedText, Input, Editor, Markdown, Loader, SelectList, SettingsList, Spacer, Image, Box, Container
17
+ - **Inline Images**: Renders images in terminals that support Kitty or iTerm2 graphics protocols
18
+ - **Autocomplete Support**: File paths and slash commands
19
+
20
+ ## Quick Start
21
+
22
+ ```typescript
23
+ import { TUI, Text, Editor, ProcessTerminal } from "@easbot/tui";
24
+
25
+ // Create terminal
26
+ const terminal = new ProcessTerminal();
27
+
28
+ // Create TUI
29
+ const tui = new TUI(terminal);
30
+
31
+ // Add components
32
+ tui.addChild(new Text("Welcome to my app!"));
33
+
34
+ const editor = new Editor(tui, editorTheme);
35
+ editor.onSubmit = (text) => {
36
+ console.log("Submitted:", text);
37
+ tui.addChild(new Text(`You said: ${text}`));
38
+ };
39
+ tui.addChild(editor);
40
+
41
+ // Start
42
+ tui.start();
43
+ ```
44
+
45
+ ## Development
46
+
47
+ ```bash
48
+ # Install dependencies
49
+ pnpm install
50
+
51
+ # Build
52
+ pnpm build
53
+
54
+ # Test
55
+ pnpm test
56
+
57
+ # Type check
58
+ pnpm type-check
59
+ ```
60
+
61
+ ## License
62
+
63
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easbot/tui",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "EASBot Terminal User Interface library - A fully autonomous TUI rendering engine ported and extended from pi-tui",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",