@opentui/react 0.1.105 → 0.1.106
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.
|
@@ -166,7 +166,7 @@ import { TextNodeRenderable as TextNodeRenderable2 } from "@opentui/core";
|
|
|
166
166
|
// package.json
|
|
167
167
|
var package_default = {
|
|
168
168
|
name: "@opentui/react",
|
|
169
|
-
version: "0.1.
|
|
169
|
+
version: "0.1.106",
|
|
170
170
|
description: "React renderer for building terminal user interfaces using OpenTUI core",
|
|
171
171
|
license: "MIT",
|
|
172
172
|
repository: {
|
|
@@ -208,6 +208,7 @@ var package_default = {
|
|
|
208
208
|
test: "bun test"
|
|
209
209
|
},
|
|
210
210
|
devDependencies: {
|
|
211
|
+
"@opentui/keymap": "workspace:*",
|
|
211
212
|
"@types/bun": "latest",
|
|
212
213
|
"@types/node": "^24.0.0",
|
|
213
214
|
"@types/react": "^19.0.0",
|
|
@@ -260,7 +261,8 @@ import {
|
|
|
260
261
|
SelectRenderable as SelectRenderable2,
|
|
261
262
|
SelectRenderableEvents,
|
|
262
263
|
TabSelectRenderable as TabSelectRenderable2,
|
|
263
|
-
TabSelectRenderableEvents
|
|
264
|
+
TabSelectRenderableEvents,
|
|
265
|
+
TextareaRenderable as TextareaRenderable2
|
|
264
266
|
} from "@opentui/core";
|
|
265
267
|
function initEventListeners(instance, eventName, listener, previousListener) {
|
|
266
268
|
if (previousListener) {
|
|
@@ -311,6 +313,8 @@ function setProperty(instance, type, propKey, propValue, oldPropValue) {
|
|
|
311
313
|
case "onSubmit":
|
|
312
314
|
if (instance instanceof InputRenderable2) {
|
|
313
315
|
initEventListeners(instance, InputRenderableEvents.ENTER, propValue, oldPropValue);
|
|
316
|
+
} else if (instance instanceof TextareaRenderable2) {
|
|
317
|
+
instance.onSubmit = propValue;
|
|
314
318
|
}
|
|
315
319
|
break;
|
|
316
320
|
case "onSelect":
|
package/index.js
CHANGED
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.106",
|
|
8
8
|
"description": "React renderer for building terminal user interfaces using OpenTUI core",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
@@ -44,10 +44,11 @@
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@opentui/core": "0.1.
|
|
47
|
+
"@opentui/core": "0.1.106",
|
|
48
48
|
"react-reconciler": "^0.32.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
+
"@opentui/keymap": "workspace:*",
|
|
51
52
|
"@types/bun": "latest",
|
|
52
53
|
"@types/node": "^24.0.0",
|
|
53
54
|
"@types/react": "^19.0.0",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ASCIIFontOptions, ASCIIFontRenderable, BaseRenderable, BoxOptions, BoxRenderable, CodeOptions, CodeRenderable, DiffRenderable, DiffRenderableOptions, InputRenderable, InputRenderableOptions, LineNumberOptions, LineNumberRenderable, MarkdownOptions, MarkdownRenderable, RenderableOptions, RenderContext, ScrollBoxOptions, ScrollBoxRenderable, SelectOption, SelectRenderable, SelectRenderableOptions, TabSelectOption, TabSelectRenderable, TabSelectRenderableOptions, TextareaOptions, TextareaRenderable, TextNodeOptions, TextNodeRenderable, TextOptions, TextRenderable } from "@opentui/core";
|
|
1
|
+
import type { ASCIIFontOptions, ASCIIFontRenderable, BaseRenderable, BoxOptions, BoxRenderable, CodeOptions, CodeRenderable, DiffRenderable, DiffRenderableOptions, InputRenderable, InputRenderableOptions, LineNumberOptions, LineNumberRenderable, MarkdownOptions, MarkdownRenderable, RenderableOptions, RenderContext, ScrollBoxOptions, ScrollBoxRenderable, SelectOption, SelectRenderable, SelectRenderableOptions, TabSelectOption, TabSelectRenderable, TabSelectRenderableOptions, TextareaOptions, TextareaRenderable, TextNodeOptions, TextNodeRenderable, TextOptions, TextRenderable, CursorChangeEvent, ContentChangeEvent, KeyEvent } from "@opentui/core";
|
|
2
2
|
import type React from "react";
|
|
3
3
|
/** Properties that should not be included in the style prop */
|
|
4
4
|
export type NonStyledProps = "id" | "buffered" | "live" | "enableLayout" | "selectable" | "renderAfter" | "renderBefore" | `on${string}`;
|
|
@@ -46,6 +46,10 @@ export type InputProps = ComponentProps<InputRenderableOptions, InputRenderable>
|
|
|
46
46
|
};
|
|
47
47
|
export type TextareaProps = ComponentProps<TextareaOptions, TextareaRenderable> & {
|
|
48
48
|
focused?: boolean;
|
|
49
|
+
onSubmit?: () => void;
|
|
50
|
+
onContentChange?: (event: ContentChangeEvent) => void;
|
|
51
|
+
onCursorChange?: (event: CursorChangeEvent) => void;
|
|
52
|
+
onKeyDown?: (event: KeyEvent) => void;
|
|
49
53
|
};
|
|
50
54
|
export type CodeProps = ComponentProps<CodeOptions, CodeRenderable>;
|
|
51
55
|
export type MarkdownProps = ComponentProps<MarkdownOptions, MarkdownRenderable>;
|