@opentui/react 0.1.41 → 0.1.42
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 +3 -7
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -58,6 +58,8 @@ OpenTUI React provides several built-in components that map to OpenTUI core rend
|
|
|
58
58
|
- **`<text>`** - Display text with styling
|
|
59
59
|
- **`<box>`** - Container with borders and layout
|
|
60
60
|
- **`<input>`** - Text input field
|
|
61
|
+
- **`<textarea>`** - Multi-line text input field
|
|
62
|
+
- **`<code>`** - Code block with syntax highlighting
|
|
61
63
|
- **`<select>`** - Selection dropdown
|
|
62
64
|
- **`<scrollbox>`** - A scrollable box
|
|
63
65
|
- **`<tab-select>`** - Tab-based selection
|
|
@@ -479,18 +481,12 @@ function App() {
|
|
|
479
481
|
Display ASCII art text with different font styles.
|
|
480
482
|
|
|
481
483
|
```tsx
|
|
482
|
-
import { measureText } from "@opentui/core"
|
|
483
484
|
import { useState } from "react"
|
|
484
485
|
|
|
485
486
|
function App() {
|
|
486
487
|
const text = "ASCII"
|
|
487
488
|
const [font, setFont] = useState<"block" | "shade" | "slick" | "tiny">("tiny")
|
|
488
489
|
|
|
489
|
-
const { width, height } = measureText({
|
|
490
|
-
text,
|
|
491
|
-
font,
|
|
492
|
-
})
|
|
493
|
-
|
|
494
490
|
return (
|
|
495
491
|
<box style={{ border: true, paddingLeft: 1, paddingRight: 1 }}>
|
|
496
492
|
<box
|
|
@@ -530,7 +526,7 @@ function App() {
|
|
|
530
526
|
/>
|
|
531
527
|
</box>
|
|
532
528
|
|
|
533
|
-
<ascii-font
|
|
529
|
+
<ascii-font text={text} font={font} />
|
|
534
530
|
</box>
|
|
535
531
|
)
|
|
536
532
|
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "src/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"version": "0.1.
|
|
7
|
+
"version": "0.1.42",
|
|
8
8
|
"description": "React renderer for building terminal user interfaces using OpenTUI core",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@opentui/core": "0.1.
|
|
38
|
+
"@opentui/core": "0.1.42",
|
|
39
39
|
"react-reconciler": "^0.32.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|