@opentui/solid 0.0.0-20251008-63d6b70d → 0.0.0-20251026-8b7fde6b
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/dist/index.d.ts +3 -0
- package/index.js +5 -9
- package/package.json +3 -2
- package/src/elements/index.d.ts +2 -1
- package/src/types/elements.d.ts +12 -1
package/dist/index.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export function getComponentCatalogue(): {
|
|
|
31
31
|
text: typeof TextRenderable3;
|
|
32
32
|
input: typeof InputRenderable2;
|
|
33
33
|
select: typeof SelectRenderable2;
|
|
34
|
+
textarea: typeof TextareaRenderable;
|
|
34
35
|
ascii_font: typeof ASCIIFontRenderable;
|
|
35
36
|
tab_select: typeof TabSelectRenderable2;
|
|
36
37
|
scrollbox: typeof ScrollBoxRenderable;
|
|
@@ -55,6 +56,7 @@ export namespace componentCatalogue {
|
|
|
55
56
|
export { TextRenderable3 as text };
|
|
56
57
|
export { InputRenderable2 as input };
|
|
57
58
|
export { SelectRenderable2 as select };
|
|
59
|
+
export { TextareaRenderable as textarea };
|
|
58
60
|
export { ASCIIFontRenderable as ascii_font };
|
|
59
61
|
export { TabSelectRenderable2 as tab_select };
|
|
60
62
|
export { ScrollBoxRenderable as scrollbox };
|
|
@@ -111,6 +113,7 @@ import { BoxRenderable } from "@opentui/core";
|
|
|
111
113
|
import { TextRenderable as TextRenderable3 } from "@opentui/core";
|
|
112
114
|
import { InputRenderable as InputRenderable2 } from "@opentui/core";
|
|
113
115
|
import { SelectRenderable as SelectRenderable2 } from "@opentui/core";
|
|
116
|
+
import { TextareaRenderable } from "@opentui/core";
|
|
114
117
|
import { ASCIIFontRenderable } from "@opentui/core";
|
|
115
118
|
import { TabSelectRenderable as TabSelectRenderable2 } from "@opentui/core";
|
|
116
119
|
import { ScrollBoxRenderable } from "@opentui/core";
|
package/index.js
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
ScrollBoxRenderable,
|
|
13
13
|
SelectRenderable as SelectRenderable2,
|
|
14
14
|
TabSelectRenderable as TabSelectRenderable2,
|
|
15
|
+
TextareaRenderable,
|
|
15
16
|
TextAttributes,
|
|
16
17
|
TextNodeRenderable as TextNodeRenderable3,
|
|
17
18
|
TextRenderable as TextRenderable3
|
|
@@ -457,15 +458,7 @@ function _removeNode(parent, node) {
|
|
|
457
458
|
node.parent = null;
|
|
458
459
|
node = node.getSlotChild(parent);
|
|
459
460
|
}
|
|
460
|
-
|
|
461
|
-
if (typeof node !== "string" && !isTextNodeRenderable(node)) {
|
|
462
|
-
console.warn("Node not a valid child of TextNode");
|
|
463
|
-
} else {
|
|
464
|
-
parent.remove(node);
|
|
465
|
-
}
|
|
466
|
-
} else {
|
|
467
|
-
parent.remove(node.id);
|
|
468
|
-
}
|
|
461
|
+
parent.remove(node.id);
|
|
469
462
|
process.nextTick(() => {
|
|
470
463
|
if (node instanceof BaseRenderable && !node.parent) {
|
|
471
464
|
node.destroyRecursively();
|
|
@@ -601,6 +594,8 @@ var {
|
|
|
601
594
|
if (prev) {
|
|
602
595
|
node.off(InputRenderableEvents.ENTER, prev);
|
|
603
596
|
}
|
|
597
|
+
} else {
|
|
598
|
+
node[name] = value;
|
|
604
599
|
}
|
|
605
600
|
break;
|
|
606
601
|
case "onSelect":
|
|
@@ -883,6 +878,7 @@ var baseComponents = {
|
|
|
883
878
|
text: TextRenderable3,
|
|
884
879
|
input: InputRenderable2,
|
|
885
880
|
select: SelectRenderable2,
|
|
881
|
+
textarea: TextareaRenderable,
|
|
886
882
|
ascii_font: ASCIIFontRenderable,
|
|
887
883
|
tab_select: TabSelectRenderable2,
|
|
888
884
|
scrollbox: ScrollBoxRenderable,
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"version": "0.0.0-
|
|
7
|
+
"version": "0.0.0-20251026-8b7fde6b",
|
|
8
8
|
"description": "SolidJS renderer for OpenTUI",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@babel/core": "7.28.0",
|
|
29
29
|
"@babel/preset-typescript": "7.27.1",
|
|
30
|
-
"@opentui/core": "0.0.0-
|
|
30
|
+
"@opentui/core": "0.0.0-20251026-8b7fde6b",
|
|
31
31
|
"babel-plugin-module-resolver": "5.0.2",
|
|
32
32
|
"babel-preset-solid": "1.9.9",
|
|
33
33
|
"s-js": "^0.4.9"
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/babel__core": "7.20.5",
|
|
37
37
|
"@types/bun": "latest",
|
|
38
|
+
"@types/node": "latest",
|
|
38
39
|
"typescript": "^5"
|
|
39
40
|
},
|
|
40
41
|
"peerDependencies": {
|
package/src/elements/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ASCIIFontRenderable, BoxRenderable, CodeRenderable, InputRenderable, ScrollBoxRenderable, SelectRenderable, TabSelectRenderable, TextNodeRenderable, TextRenderable, type RenderContext, type TextNodeOptions } from "@opentui/core";
|
|
1
|
+
import { ASCIIFontRenderable, BoxRenderable, CodeRenderable, InputRenderable, ScrollBoxRenderable, SelectRenderable, TabSelectRenderable, TextareaRenderable, TextNodeRenderable, TextRenderable, type RenderContext, type TextNodeOptions } from "@opentui/core";
|
|
2
2
|
import type { RenderableConstructor } from "../types/elements";
|
|
3
3
|
export * from "./hooks";
|
|
4
4
|
export * from "./extras";
|
|
@@ -30,6 +30,7 @@ export declare const baseComponents: {
|
|
|
30
30
|
text: typeof TextRenderable;
|
|
31
31
|
input: typeof InputRenderable;
|
|
32
32
|
select: typeof SelectRenderable;
|
|
33
|
+
textarea: typeof TextareaRenderable;
|
|
33
34
|
ascii_font: typeof ASCIIFontRenderable;
|
|
34
35
|
tab_select: typeof TabSelectRenderable;
|
|
35
36
|
scrollbox: typeof ScrollBoxRenderable;
|
package/src/types/elements.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ASCIIFontOptions, ASCIIFontRenderable, BaseRenderable, BoxOptions, BoxRenderable, CodeOptions, CodeRenderable, InputRenderable, InputRenderableOptions, RenderableOptions, RenderContext, ScrollBoxOptions, ScrollBoxRenderable, SelectOption, SelectRenderable, SelectRenderableOptions, TabSelectOption, TabSelectRenderable, TabSelectRenderableOptions, TextNodeRenderable, TextOptions, TextRenderable } from "@opentui/core";
|
|
1
|
+
import type { ASCIIFontOptions, ASCIIFontRenderable, BaseRenderable, BoxOptions, BoxRenderable, CodeOptions, CodeRenderable, InputRenderable, InputRenderableOptions, RenderableOptions, RenderContext, ScrollBoxOptions, ScrollBoxRenderable, SelectOption, SelectRenderable, SelectRenderableOptions, TabSelectOption, TabSelectRenderable, TabSelectRenderableOptions, TextareaOptions, TextareaRenderable, TextNodeRenderable, TextOptions, TextRenderable } from "@opentui/core";
|
|
2
2
|
import type { Ref } from "solid-js";
|
|
3
3
|
import type { JSX } from "../../jsx-runtime";
|
|
4
4
|
/** Properties that should not be included in the style prop */
|
|
@@ -38,6 +38,17 @@ export type InputProps = ComponentProps<InputRenderableOptions, InputRenderable>
|
|
|
38
38
|
onChange?: (value: string) => void;
|
|
39
39
|
onSubmit?: (value: string) => void;
|
|
40
40
|
};
|
|
41
|
+
export type TextareaProps = ComponentProps<TextareaOptions, TextareaRenderable> & {
|
|
42
|
+
focused?: boolean;
|
|
43
|
+
onSubmit?: () => void;
|
|
44
|
+
onContentChange?: (value: string) => void;
|
|
45
|
+
onCursorChange?: (value: {
|
|
46
|
+
line: number;
|
|
47
|
+
visualColumn: number;
|
|
48
|
+
}) => void;
|
|
49
|
+
onKeyDown?: (event: KeyboardEvent) => void;
|
|
50
|
+
onKeyPress?: (event: KeyboardEvent) => void;
|
|
51
|
+
};
|
|
41
52
|
export type SelectProps = ComponentProps<SelectRenderableOptions, SelectRenderable> & {
|
|
42
53
|
focused?: boolean;
|
|
43
54
|
onChange?: (index: number, option: SelectOption | null) => void;
|