@opentui/core 0.0.0-20250930-6541ec7f → 0.0.0-20250930-a8fe63ce
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/README.md +5 -1
- package/highlights-eq9cgrbb.scm +604 -0
- package/highlights-ghv9g403.scm +205 -0
- package/{index-kvwmgj67.js → index-h87jjatk.js} +1121 -77
- package/{index-kvwmgj67.js.map → index-h87jjatk.js.map} +20 -8
- package/index.js +393 -240
- package/index.js.map +6 -4
- package/lib/data-paths.d.ts +26 -0
- package/lib/debounce.d.ts +42 -0
- package/lib/env.d.ts +2 -1
- package/lib/hast-styled-text.d.ts +3 -23
- package/lib/index.d.ts +4 -0
- package/lib/queue.d.ts +15 -0
- package/lib/singleton.d.ts +2 -0
- package/lib/styled-text.d.ts +0 -15
- package/lib/syntax-style.d.ts +36 -0
- package/lib/tree-sitter/assets/update.d.ts +11 -0
- package/lib/tree-sitter/client.d.ts +40 -0
- package/lib/tree-sitter/default-parsers.d.ts +2 -0
- package/lib/tree-sitter/download-utils.d.ts +21 -0
- package/lib/tree-sitter/index.d.ts +10 -0
- package/lib/tree-sitter/parser.worker.d.ts +55 -0
- package/lib/tree-sitter/resolve-ft.d.ts +2 -0
- package/lib/tree-sitter/types.d.ts +64 -0
- package/lib/tree-sitter-styled-text.d.ts +7 -0
- package/lib/validate-dir-name.d.ts +1 -0
- package/package.json +7 -7
- package/renderables/Code.d.ts +31 -0
- package/renderables/Text.d.ts +10 -67
- package/renderables/TextBufferRenderable.d.ts +81 -0
- package/renderables/index.d.ts +2 -0
- package/testing.js +1 -1
- package/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
- package/tree-sitter-typescript-zxjzwt75.wasm +0 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
; Query from: https://raw.githubusercontent.com/tree-sitter/tree-sitter-javascript/refs/heads/master/queries/highlights.scm
|
|
2
|
+
; Variables
|
|
3
|
+
;----------
|
|
4
|
+
|
|
5
|
+
(identifier) @variable
|
|
6
|
+
|
|
7
|
+
; Properties
|
|
8
|
+
;-----------
|
|
9
|
+
|
|
10
|
+
(property_identifier) @property
|
|
11
|
+
|
|
12
|
+
; Function and method definitions
|
|
13
|
+
;--------------------------------
|
|
14
|
+
|
|
15
|
+
(function_expression
|
|
16
|
+
name: (identifier) @function)
|
|
17
|
+
(function_declaration
|
|
18
|
+
name: (identifier) @function)
|
|
19
|
+
(method_definition
|
|
20
|
+
name: (property_identifier) @function.method)
|
|
21
|
+
|
|
22
|
+
(pair
|
|
23
|
+
key: (property_identifier) @function.method
|
|
24
|
+
value: [(function_expression) (arrow_function)])
|
|
25
|
+
|
|
26
|
+
(assignment_expression
|
|
27
|
+
left: (member_expression
|
|
28
|
+
property: (property_identifier) @function.method)
|
|
29
|
+
right: [(function_expression) (arrow_function)])
|
|
30
|
+
|
|
31
|
+
(variable_declarator
|
|
32
|
+
name: (identifier) @function
|
|
33
|
+
value: [(function_expression) (arrow_function)])
|
|
34
|
+
|
|
35
|
+
(assignment_expression
|
|
36
|
+
left: (identifier) @function
|
|
37
|
+
right: [(function_expression) (arrow_function)])
|
|
38
|
+
|
|
39
|
+
; Function and method calls
|
|
40
|
+
;--------------------------
|
|
41
|
+
|
|
42
|
+
(call_expression
|
|
43
|
+
function: (identifier) @function)
|
|
44
|
+
|
|
45
|
+
(call_expression
|
|
46
|
+
function: (member_expression
|
|
47
|
+
property: (property_identifier) @function.method))
|
|
48
|
+
|
|
49
|
+
; Special identifiers
|
|
50
|
+
;--------------------
|
|
51
|
+
|
|
52
|
+
((identifier) @constructor
|
|
53
|
+
(#match? @constructor "^[A-Z]"))
|
|
54
|
+
|
|
55
|
+
([
|
|
56
|
+
(identifier)
|
|
57
|
+
(shorthand_property_identifier)
|
|
58
|
+
(shorthand_property_identifier_pattern)
|
|
59
|
+
] @constant
|
|
60
|
+
(#match? @constant "^[A-Z_][A-Z\\d_]+$"))
|
|
61
|
+
|
|
62
|
+
((identifier) @variable.builtin
|
|
63
|
+
(#match? @variable.builtin "^(arguments|module|console|window|document)$")
|
|
64
|
+
(#is-not? local))
|
|
65
|
+
|
|
66
|
+
((identifier) @function.builtin
|
|
67
|
+
(#eq? @function.builtin "require")
|
|
68
|
+
(#is-not? local))
|
|
69
|
+
|
|
70
|
+
; Literals
|
|
71
|
+
;---------
|
|
72
|
+
|
|
73
|
+
(this) @variable.builtin
|
|
74
|
+
(super) @variable.builtin
|
|
75
|
+
|
|
76
|
+
[
|
|
77
|
+
(true)
|
|
78
|
+
(false)
|
|
79
|
+
(null)
|
|
80
|
+
(undefined)
|
|
81
|
+
] @constant.builtin
|
|
82
|
+
|
|
83
|
+
(comment) @comment
|
|
84
|
+
|
|
85
|
+
[
|
|
86
|
+
(string)
|
|
87
|
+
(template_string)
|
|
88
|
+
] @string
|
|
89
|
+
|
|
90
|
+
(regex) @string.special
|
|
91
|
+
(number) @number
|
|
92
|
+
|
|
93
|
+
; Tokens
|
|
94
|
+
;-------
|
|
95
|
+
|
|
96
|
+
[
|
|
97
|
+
";"
|
|
98
|
+
(optional_chain)
|
|
99
|
+
"."
|
|
100
|
+
","
|
|
101
|
+
] @punctuation.delimiter
|
|
102
|
+
|
|
103
|
+
[
|
|
104
|
+
"-"
|
|
105
|
+
"--"
|
|
106
|
+
"-="
|
|
107
|
+
"+"
|
|
108
|
+
"++"
|
|
109
|
+
"+="
|
|
110
|
+
"*"
|
|
111
|
+
"*="
|
|
112
|
+
"**"
|
|
113
|
+
"**="
|
|
114
|
+
"/"
|
|
115
|
+
"/="
|
|
116
|
+
"%"
|
|
117
|
+
"%="
|
|
118
|
+
"<"
|
|
119
|
+
"<="
|
|
120
|
+
"<<"
|
|
121
|
+
"<<="
|
|
122
|
+
"="
|
|
123
|
+
"=="
|
|
124
|
+
"==="
|
|
125
|
+
"!"
|
|
126
|
+
"!="
|
|
127
|
+
"!=="
|
|
128
|
+
"=>"
|
|
129
|
+
">"
|
|
130
|
+
">="
|
|
131
|
+
">>"
|
|
132
|
+
">>="
|
|
133
|
+
">>>"
|
|
134
|
+
">>>="
|
|
135
|
+
"~"
|
|
136
|
+
"^"
|
|
137
|
+
"&"
|
|
138
|
+
"|"
|
|
139
|
+
"^="
|
|
140
|
+
"&="
|
|
141
|
+
"|="
|
|
142
|
+
"&&"
|
|
143
|
+
"||"
|
|
144
|
+
"??"
|
|
145
|
+
"&&="
|
|
146
|
+
"||="
|
|
147
|
+
"??="
|
|
148
|
+
] @operator
|
|
149
|
+
|
|
150
|
+
[
|
|
151
|
+
"("
|
|
152
|
+
")"
|
|
153
|
+
"["
|
|
154
|
+
"]"
|
|
155
|
+
"{"
|
|
156
|
+
"}"
|
|
157
|
+
] @punctuation.bracket
|
|
158
|
+
|
|
159
|
+
(template_substitution
|
|
160
|
+
"${" @punctuation.special
|
|
161
|
+
"}" @punctuation.special) @embedded
|
|
162
|
+
|
|
163
|
+
[
|
|
164
|
+
"as"
|
|
165
|
+
"async"
|
|
166
|
+
"await"
|
|
167
|
+
"break"
|
|
168
|
+
"case"
|
|
169
|
+
"catch"
|
|
170
|
+
"class"
|
|
171
|
+
"const"
|
|
172
|
+
"continue"
|
|
173
|
+
"debugger"
|
|
174
|
+
"default"
|
|
175
|
+
"delete"
|
|
176
|
+
"do"
|
|
177
|
+
"else"
|
|
178
|
+
"export"
|
|
179
|
+
"extends"
|
|
180
|
+
"finally"
|
|
181
|
+
"for"
|
|
182
|
+
"from"
|
|
183
|
+
"function"
|
|
184
|
+
"get"
|
|
185
|
+
"if"
|
|
186
|
+
"import"
|
|
187
|
+
"in"
|
|
188
|
+
"instanceof"
|
|
189
|
+
"let"
|
|
190
|
+
"new"
|
|
191
|
+
"of"
|
|
192
|
+
"return"
|
|
193
|
+
"set"
|
|
194
|
+
"static"
|
|
195
|
+
"switch"
|
|
196
|
+
"target"
|
|
197
|
+
"throw"
|
|
198
|
+
"try"
|
|
199
|
+
"typeof"
|
|
200
|
+
"var"
|
|
201
|
+
"void"
|
|
202
|
+
"while"
|
|
203
|
+
"with"
|
|
204
|
+
"yield"
|
|
205
|
+
] @keyword
|