@opentui/core 0.1.36 → 0.1.37
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/3d.js +1 -1
- package/Renderable.d.ts +1 -3
- package/assets/zig/highlights.scm +284 -0
- package/assets/zig/tree-sitter-zig.wasm +0 -0
- package/console.d.ts +2 -2
- package/{index-n8nbvvhk.js → index-7bav3fax.js} +386 -101
- package/{index-n8nbvvhk.js.map → index-7bav3fax.js.map} +8 -7
- package/index.js +48 -20
- package/index.js.map +4 -4
- package/lib/index.d.ts +1 -0
- package/lib/terminal-palette.d.ts +38 -0
- package/package.json +7 -7
- package/renderables/ScrollBox.d.ts +2 -1
- package/renderer.d.ts +13 -0
- package/testing.js +1 -1
package/3d.js
CHANGED
package/Renderable.d.ts
CHANGED
|
@@ -148,7 +148,6 @@ export declare abstract class Renderable extends BaseRenderable {
|
|
|
148
148
|
parent: Renderable | null;
|
|
149
149
|
private childrenPrimarySortDirty;
|
|
150
150
|
private childrenSortedByPrimaryAxis;
|
|
151
|
-
private _newChildren;
|
|
152
151
|
onLifecyclePass: (() => void) | null;
|
|
153
152
|
renderBefore?: (this: Renderable, buffer: OptimizedBuffer, deltaTime: number) => void;
|
|
154
153
|
renderAfter?: (this: Renderable, buffer: OptimizedBuffer, deltaTime: number) => void;
|
|
@@ -241,7 +240,6 @@ export declare abstract class Renderable extends BaseRenderable {
|
|
|
241
240
|
*/
|
|
242
241
|
protected onResize(width: number, height: number): void;
|
|
243
242
|
private replaceParent;
|
|
244
|
-
private _forceLayoutUpdateFor;
|
|
245
243
|
add(obj: Renderable | VNode<any, any[]> | unknown, index?: number): number;
|
|
246
244
|
insertBefore(obj: Renderable | VNode<any, any[]> | unknown, anchor?: Renderable | unknown): number;
|
|
247
245
|
getRenderable(id: string): Renderable | undefined;
|
|
@@ -251,7 +249,7 @@ export declare abstract class Renderable extends BaseRenderable {
|
|
|
251
249
|
getChildrenCount(): number;
|
|
252
250
|
updateLayout(deltaTime: number, renderList?: RenderCommand[]): void;
|
|
253
251
|
render(buffer: OptimizedBuffer, deltaTime: number): void;
|
|
254
|
-
protected
|
|
252
|
+
protected _getVisibleChildren(): number[];
|
|
255
253
|
protected onUpdate(deltaTime: number): void;
|
|
256
254
|
protected getScissorRect(): {
|
|
257
255
|
x: number;
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
; Query from: https://github.com/nvim-treesitter/nvim-treesitter/raw/refs/heads/master/queries/zig/highlights.scm
|
|
2
|
+
; Variables
|
|
3
|
+
(identifier) @variable
|
|
4
|
+
|
|
5
|
+
; Parameters
|
|
6
|
+
(parameter
|
|
7
|
+
name: (identifier) @variable.parameter)
|
|
8
|
+
|
|
9
|
+
(payload
|
|
10
|
+
(identifier) @variable.parameter)
|
|
11
|
+
|
|
12
|
+
; Types
|
|
13
|
+
(parameter
|
|
14
|
+
type: (identifier) @type)
|
|
15
|
+
|
|
16
|
+
((identifier) @type
|
|
17
|
+
(#lua-match? @type "^[A-Z_][a-zA-Z0-9_]*"))
|
|
18
|
+
|
|
19
|
+
(variable_declaration
|
|
20
|
+
(identifier) @type
|
|
21
|
+
"="
|
|
22
|
+
[
|
|
23
|
+
(struct_declaration)
|
|
24
|
+
(enum_declaration)
|
|
25
|
+
(union_declaration)
|
|
26
|
+
(opaque_declaration)
|
|
27
|
+
])
|
|
28
|
+
|
|
29
|
+
[
|
|
30
|
+
(builtin_type)
|
|
31
|
+
"anyframe"
|
|
32
|
+
] @type.builtin
|
|
33
|
+
|
|
34
|
+
; Constants
|
|
35
|
+
((identifier) @constant
|
|
36
|
+
(#lua-match? @constant "^[A-Z][A-Z_0-9]+$"))
|
|
37
|
+
|
|
38
|
+
[
|
|
39
|
+
"null"
|
|
40
|
+
"unreachable"
|
|
41
|
+
"undefined"
|
|
42
|
+
] @constant.builtin
|
|
43
|
+
|
|
44
|
+
(field_expression
|
|
45
|
+
.
|
|
46
|
+
member: (identifier) @constant)
|
|
47
|
+
|
|
48
|
+
(enum_declaration
|
|
49
|
+
(container_field
|
|
50
|
+
type: (identifier) @constant))
|
|
51
|
+
|
|
52
|
+
; Labels
|
|
53
|
+
(block_label
|
|
54
|
+
(identifier) @label)
|
|
55
|
+
|
|
56
|
+
(break_label
|
|
57
|
+
(identifier) @label)
|
|
58
|
+
|
|
59
|
+
; Fields
|
|
60
|
+
(field_initializer
|
|
61
|
+
.
|
|
62
|
+
(identifier) @variable.member)
|
|
63
|
+
|
|
64
|
+
(field_expression
|
|
65
|
+
(_)
|
|
66
|
+
member: (identifier) @variable.member)
|
|
67
|
+
|
|
68
|
+
(container_field
|
|
69
|
+
name: (identifier) @variable.member)
|
|
70
|
+
|
|
71
|
+
(initializer_list
|
|
72
|
+
(assignment_expression
|
|
73
|
+
left: (field_expression
|
|
74
|
+
.
|
|
75
|
+
member: (identifier) @variable.member)))
|
|
76
|
+
|
|
77
|
+
; Functions
|
|
78
|
+
(builtin_identifier) @function.builtin
|
|
79
|
+
|
|
80
|
+
(call_expression
|
|
81
|
+
function: (identifier) @function.call)
|
|
82
|
+
|
|
83
|
+
(call_expression
|
|
84
|
+
function: (field_expression
|
|
85
|
+
member: (identifier) @function.call))
|
|
86
|
+
|
|
87
|
+
(function_declaration
|
|
88
|
+
name: (identifier) @function)
|
|
89
|
+
|
|
90
|
+
; Modules
|
|
91
|
+
(variable_declaration
|
|
92
|
+
(identifier) @module
|
|
93
|
+
(builtin_function
|
|
94
|
+
(builtin_identifier) @keyword.import
|
|
95
|
+
(#any-of? @keyword.import "@import" "@cImport")))
|
|
96
|
+
|
|
97
|
+
; Builtins
|
|
98
|
+
[
|
|
99
|
+
"c"
|
|
100
|
+
"..."
|
|
101
|
+
] @variable.builtin
|
|
102
|
+
|
|
103
|
+
((identifier) @variable.builtin
|
|
104
|
+
(#eq? @variable.builtin "_"))
|
|
105
|
+
|
|
106
|
+
(calling_convention
|
|
107
|
+
(identifier) @variable.builtin)
|
|
108
|
+
|
|
109
|
+
; Keywords
|
|
110
|
+
[
|
|
111
|
+
"asm"
|
|
112
|
+
"defer"
|
|
113
|
+
"errdefer"
|
|
114
|
+
"test"
|
|
115
|
+
"error"
|
|
116
|
+
"const"
|
|
117
|
+
"var"
|
|
118
|
+
] @keyword
|
|
119
|
+
|
|
120
|
+
[
|
|
121
|
+
"struct"
|
|
122
|
+
"union"
|
|
123
|
+
"enum"
|
|
124
|
+
"opaque"
|
|
125
|
+
] @keyword.type
|
|
126
|
+
|
|
127
|
+
[
|
|
128
|
+
"async"
|
|
129
|
+
"await"
|
|
130
|
+
"suspend"
|
|
131
|
+
"nosuspend"
|
|
132
|
+
"resume"
|
|
133
|
+
] @keyword.coroutine
|
|
134
|
+
|
|
135
|
+
"fn" @keyword.function
|
|
136
|
+
|
|
137
|
+
[
|
|
138
|
+
"and"
|
|
139
|
+
"or"
|
|
140
|
+
"orelse"
|
|
141
|
+
] @keyword.operator
|
|
142
|
+
|
|
143
|
+
"return" @keyword.return
|
|
144
|
+
|
|
145
|
+
[
|
|
146
|
+
"if"
|
|
147
|
+
"else"
|
|
148
|
+
"switch"
|
|
149
|
+
] @keyword.conditional
|
|
150
|
+
|
|
151
|
+
[
|
|
152
|
+
"for"
|
|
153
|
+
"while"
|
|
154
|
+
"break"
|
|
155
|
+
"continue"
|
|
156
|
+
] @keyword.repeat
|
|
157
|
+
|
|
158
|
+
[
|
|
159
|
+
"usingnamespace"
|
|
160
|
+
"export"
|
|
161
|
+
] @keyword.import
|
|
162
|
+
|
|
163
|
+
[
|
|
164
|
+
"try"
|
|
165
|
+
"catch"
|
|
166
|
+
] @keyword.exception
|
|
167
|
+
|
|
168
|
+
[
|
|
169
|
+
"volatile"
|
|
170
|
+
"allowzero"
|
|
171
|
+
"noalias"
|
|
172
|
+
"addrspace"
|
|
173
|
+
"align"
|
|
174
|
+
"callconv"
|
|
175
|
+
"linksection"
|
|
176
|
+
"pub"
|
|
177
|
+
"inline"
|
|
178
|
+
"noinline"
|
|
179
|
+
"extern"
|
|
180
|
+
"comptime"
|
|
181
|
+
"packed"
|
|
182
|
+
"threadlocal"
|
|
183
|
+
] @keyword.modifier
|
|
184
|
+
|
|
185
|
+
; Operator
|
|
186
|
+
[
|
|
187
|
+
"="
|
|
188
|
+
"*="
|
|
189
|
+
"*%="
|
|
190
|
+
"*|="
|
|
191
|
+
"/="
|
|
192
|
+
"%="
|
|
193
|
+
"+="
|
|
194
|
+
"+%="
|
|
195
|
+
"+|="
|
|
196
|
+
"-="
|
|
197
|
+
"-%="
|
|
198
|
+
"-|="
|
|
199
|
+
"<<="
|
|
200
|
+
"<<|="
|
|
201
|
+
">>="
|
|
202
|
+
"&="
|
|
203
|
+
"^="
|
|
204
|
+
"|="
|
|
205
|
+
"!"
|
|
206
|
+
"~"
|
|
207
|
+
"-"
|
|
208
|
+
"-%"
|
|
209
|
+
"&"
|
|
210
|
+
"=="
|
|
211
|
+
"!="
|
|
212
|
+
">"
|
|
213
|
+
">="
|
|
214
|
+
"<="
|
|
215
|
+
"<"
|
|
216
|
+
"&"
|
|
217
|
+
"^"
|
|
218
|
+
"|"
|
|
219
|
+
"<<"
|
|
220
|
+
">>"
|
|
221
|
+
"<<|"
|
|
222
|
+
"+"
|
|
223
|
+
"++"
|
|
224
|
+
"+%"
|
|
225
|
+
"-%"
|
|
226
|
+
"+|"
|
|
227
|
+
"-|"
|
|
228
|
+
"*"
|
|
229
|
+
"/"
|
|
230
|
+
"%"
|
|
231
|
+
"**"
|
|
232
|
+
"*%"
|
|
233
|
+
"*|"
|
|
234
|
+
"||"
|
|
235
|
+
".*"
|
|
236
|
+
".?"
|
|
237
|
+
"?"
|
|
238
|
+
".."
|
|
239
|
+
] @operator
|
|
240
|
+
|
|
241
|
+
; Literals
|
|
242
|
+
(character) @character
|
|
243
|
+
|
|
244
|
+
([
|
|
245
|
+
(string)
|
|
246
|
+
(multiline_string)
|
|
247
|
+
] @string
|
|
248
|
+
(#set! "priority" 95))
|
|
249
|
+
|
|
250
|
+
(integer) @number
|
|
251
|
+
|
|
252
|
+
(float) @number.float
|
|
253
|
+
|
|
254
|
+
(boolean) @boolean
|
|
255
|
+
|
|
256
|
+
(escape_sequence) @string.escape
|
|
257
|
+
|
|
258
|
+
; Punctuation
|
|
259
|
+
[
|
|
260
|
+
"["
|
|
261
|
+
"]"
|
|
262
|
+
"("
|
|
263
|
+
")"
|
|
264
|
+
"{"
|
|
265
|
+
"}"
|
|
266
|
+
] @punctuation.bracket
|
|
267
|
+
|
|
268
|
+
[
|
|
269
|
+
";"
|
|
270
|
+
"."
|
|
271
|
+
","
|
|
272
|
+
":"
|
|
273
|
+
"=>"
|
|
274
|
+
"->"
|
|
275
|
+
] @punctuation.delimiter
|
|
276
|
+
|
|
277
|
+
(payload
|
|
278
|
+
"|" @punctuation.bracket)
|
|
279
|
+
|
|
280
|
+
; Comments
|
|
281
|
+
(comment) @comment @spell
|
|
282
|
+
|
|
283
|
+
((comment) @comment.documentation
|
|
284
|
+
(#lua-match? @comment.documentation "^//!"))
|
|
Binary file
|
package/console.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare class TerminalConsole extends EventEmitter {
|
|
|
31
31
|
private isVisible;
|
|
32
32
|
private isFocused;
|
|
33
33
|
private renderer;
|
|
34
|
-
private
|
|
34
|
+
private keyHandler;
|
|
35
35
|
private options;
|
|
36
36
|
private _debugModeEnabled;
|
|
37
37
|
private frameBuffer;
|
|
@@ -62,7 +62,7 @@ export declare class TerminalConsole extends EventEmitter {
|
|
|
62
62
|
deactivate(): void;
|
|
63
63
|
private _handleNewLog;
|
|
64
64
|
private _updateConsoleDimensions;
|
|
65
|
-
private
|
|
65
|
+
private handleKeyPress;
|
|
66
66
|
private attachStdin;
|
|
67
67
|
private detachStdin;
|
|
68
68
|
private formatTimestamp;
|