@veracity/ai 1.0.1 → 2.0.1
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/{ChatCompletionSSE.d.ts → ChatClient.d.ts} +22 -13
- package/dist/ChatClient.d.ts.map +1 -0
- package/dist/ChatMessageItem.d.ts +1 -1
- package/dist/ClientFunctionInvocation.d.ts +14 -0
- package/dist/ClientFunctionInvocation.d.ts.map +1 -0
- package/dist/ClientFunctionInvocationContext.d.ts +10 -0
- package/dist/ClientFunctionInvocationContext.d.ts.map +1 -0
- package/dist/Markdown/index.d.ts +2 -2
- package/dist/Markdown/index.d.ts.map +1 -1
- package/dist/Markdown/math.d.ts.map +1 -1
- package/dist/MaxInputLimitReachedError.d.ts +4 -0
- package/dist/MaxInputLimitReachedError.d.ts.map +1 -0
- package/dist/Pyodide.d.ts +1 -1
- package/dist/Pyodide.d.ts.map +1 -1
- package/dist/ToolCallBuilder.d.ts +13 -0
- package/dist/ToolCallBuilder.d.ts.map +1 -0
- package/dist/UnexpectedEndOfStreamError.d.ts +4 -0
- package/dist/UnexpectedEndOfStreamError.d.ts.map +1 -0
- package/dist/components/Button.d.ts +1 -0
- package/dist/components/Button.d.ts.map +1 -1
- package/dist/components/ButtonOptionsDialog.d.ts +27 -0
- package/dist/components/ButtonOptionsDialog.d.ts.map +1 -0
- package/dist/components/Chat/index.d.ts +39 -0
- package/dist/components/Chat/index.d.ts.map +1 -0
- package/dist/components/Conversation.d.ts +54 -0
- package/dist/components/Conversation.d.ts.map +1 -0
- package/dist/components/ConversationMessage.d.ts +53 -0
- package/dist/components/ConversationMessage.d.ts.map +1 -0
- package/dist/components/PythonCodeInterpreter.d.ts +38 -0
- package/dist/components/PythonCodeInterpreter.d.ts.map +1 -0
- package/dist/components/Search.d.ts +16 -0
- package/dist/components/Search.d.ts.map +1 -0
- package/dist/components/icons/AngleDown.d.ts +3 -0
- package/dist/components/icons/AngleDown.d.ts.map +1 -0
- package/dist/components/icons/ArrowDown.d.ts +1 -1
- package/dist/components/icons/Check.d.ts +1 -1
- package/dist/components/icons/CheckCircle.d.ts +3 -0
- package/dist/components/icons/CheckCircle.d.ts.map +1 -0
- package/dist/components/icons/ExclamationCircle.d.ts +1 -1
- package/dist/components/icons/ExclamationTriangle.d.ts +1 -1
- package/dist/components/icons/InfoCircle.d.ts +1 -1
- package/dist/components/icons/QuestionCircle.d.ts +1 -1
- package/dist/components/icons/SearchIcon.d.ts +3 -0
- package/dist/components/icons/SearchIcon.d.ts.map +1 -0
- package/dist/components/icons/Spinner.d.ts +1 -1
- package/dist/components/icons/Times.d.ts +3 -0
- package/dist/components/icons/Times.d.ts.map +1 -0
- package/dist/components/icons/TimesCircle.d.ts +1 -1
- package/dist/core-CdG-ENX3.js +1069 -0
- package/dist/{csharp-Cigc7XMa.js → csharp-EkcwwkCa.js} +18 -13
- package/dist/{css-B-yPI1XM.js → css-CJS6IEi0.js} +127 -18
- package/dist/dtos.d.ts +34 -4
- package/dist/dtos.d.ts.map +1 -1
- package/dist/enums.d.ts +13 -29
- package/dist/enums.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/{javascript-CDslspYb.js → javascript-B2FVNeJt.js} +26 -24
- package/dist/{katex-Cj8zHzei.js → katex-c21813vb.js} +454 -428
- package/dist/{python-CzH_tl5q.js → python-CymlFLB0.js} +21 -19
- package/dist/{typescript-Bx5cZccb.js → typescript-Cg8DWaxm.js} +163 -148
- package/dist/utils/CancellationToken.d.ts.map +1 -1
- package/dist/utils/Channel.d.ts +42 -1
- package/dist/utils/Channel.d.ts.map +1 -1
- package/dist/utils/animateAsync.d.ts +1 -1
- package/dist/utils/createDeferred.d.ts.map +1 -1
- package/dist/utils/parsePartialJSON.d.ts +1 -1
- package/dist/utils/parsePartialJSON.d.ts.map +1 -1
- package/dist/veracity-ai.es.js +5359 -5416
- package/dist/veracity-ai.umd.js +37 -40
- package/package.json +28 -20
- package/dist/ChatCompletionSSE.d.ts.map +0 -1
- package/dist/Markdown copy.d.ts +0 -2
- package/dist/Markdown copy.d.ts.map +0 -1
- package/dist/MessageLimitExceededError.d.ts +0 -6
- package/dist/MessageLimitExceededError.d.ts.map +0 -1
- package/dist/Pyodide_test.d.ts +0 -1
- package/dist/Pyodide_test.d.ts.map +0 -1
- package/dist/components/AIChat/index.d.ts +0 -42
- package/dist/components/AIChat/index.d.ts.map +0 -1
- package/dist/components/AIChatAgentMessage.d.ts +0 -28
- package/dist/components/AIChatAgentMessage.d.ts.map +0 -1
- package/dist/components/AIChatMessage.d.ts +0 -1
- package/dist/components/AIChatMessage.d.ts.map +0 -1
- package/dist/components/AIChatToolCallGroup.d.ts +0 -21
- package/dist/components/AIChatToolCallGroup.d.ts.map +0 -1
- package/dist/components/AIChatUserMessage.d.ts +0 -14
- package/dist/components/AIChatUserMessage.d.ts.map +0 -1
- package/dist/components/AIConversation.d.ts +0 -8
- package/dist/components/AIConversation.d.ts.map +0 -1
- package/dist/components/AIParent.d.ts +0 -8
- package/dist/components/AIParent.d.ts.map +0 -1
- package/dist/components/ErrorNotification.d.ts +0 -2
- package/dist/components/ErrorNotification.d.ts.map +0 -1
- package/dist/components/ToolCallComponent/TaskItemComponent.d.ts +0 -14
- package/dist/components/ToolCallComponent/TaskItemComponent.d.ts.map +0 -1
- package/dist/components/ToolCallComponent/index.d.ts +0 -86
- package/dist/components/ToolCallComponent/index.d.ts.map +0 -1
- package/dist/components/VeracityAvatar.d.ts +0 -3
- package/dist/components/VeracityAvatar.d.ts.map +0 -1
- package/dist/components/VeracityLogoSquare.d.ts +0 -3
- package/dist/components/VeracityLogoSquare.d.ts.map +0 -1
- package/dist/core-Diwflo5W.js +0 -1077
- package/dist/modals.d.ts +0 -9
- package/dist/modals.d.ts.map +0 -1
- package/dist/utils/decodePythonTripleQuotedString.d.ts +0 -2
- package/dist/utils/decodePythonTripleQuotedString.d.ts.map +0 -1
- package/dist/utils/generateAvatarLetter.d.ts +0 -2
- package/dist/utils/generateAvatarLetter.d.ts.map +0 -1
- package/dist/utils/getElementTextPreserveNewlines.d.ts +0 -2
- package/dist/utils/getElementTextPreserveNewlines.d.ts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const m = "[A-Za-z$_][0-9A-Za-z$_]*", x = [
|
|
2
2
|
"as",
|
|
3
3
|
// for exports
|
|
4
4
|
"in",
|
|
@@ -41,14 +41,14 @@ const T = "[A-Za-z$_][0-9A-Za-z$_]*", L = [
|
|
|
41
41
|
"from",
|
|
42
42
|
"export",
|
|
43
43
|
"extends"
|
|
44
|
-
],
|
|
44
|
+
], D = [
|
|
45
45
|
"true",
|
|
46
46
|
"false",
|
|
47
47
|
"null",
|
|
48
48
|
"undefined",
|
|
49
49
|
"NaN",
|
|
50
50
|
"Infinity"
|
|
51
|
-
],
|
|
51
|
+
], k = [
|
|
52
52
|
// Fundamental objects
|
|
53
53
|
"Object",
|
|
54
54
|
"Function",
|
|
@@ -98,7 +98,7 @@ const T = "[A-Za-z$_][0-9A-Za-z$_]*", L = [
|
|
|
98
98
|
"Intl",
|
|
99
99
|
// WebAssembly
|
|
100
100
|
"WebAssembly"
|
|
101
|
-
],
|
|
101
|
+
], B = [
|
|
102
102
|
"Error",
|
|
103
103
|
"EvalError",
|
|
104
104
|
"InternalError",
|
|
@@ -107,7 +107,7 @@ const T = "[A-Za-z$_][0-9A-Za-z$_]*", L = [
|
|
|
107
107
|
"SyntaxError",
|
|
108
108
|
"TypeError",
|
|
109
109
|
"URIError"
|
|
110
|
-
],
|
|
110
|
+
], U = [
|
|
111
111
|
"setInterval",
|
|
112
112
|
"setTimeout",
|
|
113
113
|
"clearInterval",
|
|
@@ -137,62 +137,62 @@ const T = "[A-Za-z$_][0-9A-Za-z$_]*", L = [
|
|
|
137
137
|
"module",
|
|
138
138
|
"global"
|
|
139
139
|
// Node.js
|
|
140
|
-
],
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
140
|
+
], P = [].concat(
|
|
141
|
+
U,
|
|
142
|
+
k,
|
|
143
|
+
B
|
|
144
144
|
);
|
|
145
|
-
function
|
|
146
|
-
const
|
|
147
|
-
const
|
|
148
|
-
return
|
|
149
|
-
}, t =
|
|
145
|
+
function J(n) {
|
|
146
|
+
const e = n.regex, f = (a, { after: l }) => {
|
|
147
|
+
const u = "</" + a[0].slice(1);
|
|
148
|
+
return a.input.indexOf(u, l) !== -1;
|
|
149
|
+
}, t = m, g = {
|
|
150
150
|
begin: "<>",
|
|
151
151
|
end: "</>"
|
|
152
|
-
}, R = /<[A-Za-z0-9\\._:-]+\s*\/>/,
|
|
152
|
+
}, R = /<[A-Za-z0-9\\._:-]+\s*\/>/, o = {
|
|
153
153
|
begin: /<[A-Za-z0-9\\._:-]+/,
|
|
154
154
|
end: /\/[A-Za-z0-9\\._:-]+>|\/>/,
|
|
155
155
|
/**
|
|
156
156
|
* @param {RegExpMatchArray} match
|
|
157
157
|
* @param {CallbackResponse} response
|
|
158
158
|
*/
|
|
159
|
-
isTrulyOpeningTag: (
|
|
160
|
-
const
|
|
159
|
+
isTrulyOpeningTag: (a, l) => {
|
|
160
|
+
const u = a[0].length + a.index, T = a.input[u];
|
|
161
161
|
if (
|
|
162
162
|
// HTML should not include another raw `<` inside a tag
|
|
163
163
|
// nested type?
|
|
164
164
|
// `<Array<Array<number>>`, etc.
|
|
165
|
-
|
|
165
|
+
T === "<" || // the , gives away that this is not HTML
|
|
166
166
|
// `<T, A extends keyof T, V>`
|
|
167
|
-
|
|
167
|
+
T === ","
|
|
168
168
|
) {
|
|
169
|
-
|
|
169
|
+
l.ignoreMatch();
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
172
|
-
|
|
173
|
-
let
|
|
174
|
-
const
|
|
175
|
-
if (
|
|
176
|
-
|
|
172
|
+
T === ">" && (f(a, { after: u }) || l.ignoreMatch());
|
|
173
|
+
let p;
|
|
174
|
+
const L = a.input.substring(u);
|
|
175
|
+
if (p = L.match(/^\s*=/)) {
|
|
176
|
+
l.ignoreMatch();
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
|
-
if ((
|
|
180
|
-
|
|
179
|
+
if ((p = L.match(/^\s+extends\s+/)) && p.index === 0) {
|
|
180
|
+
l.ignoreMatch();
|
|
181
181
|
return;
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
}, c = {
|
|
185
|
-
$pattern:
|
|
186
|
-
keyword:
|
|
187
|
-
literal:
|
|
188
|
-
built_in:
|
|
185
|
+
$pattern: m,
|
|
186
|
+
keyword: x,
|
|
187
|
+
literal: D,
|
|
188
|
+
built_in: P,
|
|
189
189
|
"variable.language": h
|
|
190
|
-
},
|
|
190
|
+
}, A = "[0-9](_?[0-9])*", i = `\\.(${A})`, E = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", _ = {
|
|
191
191
|
className: "number",
|
|
192
192
|
variants: [
|
|
193
193
|
// DecimalLiteral
|
|
194
|
-
{ begin: `(\\b(${
|
|
195
|
-
{ begin: `\\b(${
|
|
194
|
+
{ begin: `(\\b(${E})((${i})|\\.)?|(${i}))[eE][+-]?(${A})\\b` },
|
|
195
|
+
{ begin: `\\b(${E})\\b((${i})\\b|\\.)?|(${i})\\b` },
|
|
196
196
|
// DecimalBigIntegerLiteral
|
|
197
197
|
{ begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
|
|
198
198
|
// NonDecimalIntegerLiteral
|
|
@@ -204,61 +204,61 @@ function W(e) {
|
|
|
204
204
|
{ begin: "\\b0[0-7]+n?\\b" }
|
|
205
205
|
],
|
|
206
206
|
relevance: 0
|
|
207
|
-
},
|
|
207
|
+
}, r = {
|
|
208
208
|
className: "subst",
|
|
209
209
|
begin: "\\$\\{",
|
|
210
210
|
end: "\\}",
|
|
211
211
|
keywords: c,
|
|
212
212
|
contains: []
|
|
213
213
|
// defined later
|
|
214
|
-
},
|
|
215
|
-
begin: "html`",
|
|
214
|
+
}, s = {
|
|
215
|
+
begin: ".?html`",
|
|
216
216
|
end: "",
|
|
217
217
|
starts: {
|
|
218
218
|
end: "`",
|
|
219
219
|
returnEnd: !1,
|
|
220
220
|
contains: [
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
n.BACKSLASH_ESCAPE,
|
|
222
|
+
r
|
|
223
223
|
],
|
|
224
224
|
subLanguage: "xml"
|
|
225
225
|
}
|
|
226
226
|
}, S = {
|
|
227
|
-
begin: "css`",
|
|
227
|
+
begin: ".?css`",
|
|
228
228
|
end: "",
|
|
229
229
|
starts: {
|
|
230
230
|
end: "`",
|
|
231
231
|
returnEnd: !1,
|
|
232
232
|
contains: [
|
|
233
|
-
|
|
234
|
-
|
|
233
|
+
n.BACKSLASH_ESCAPE,
|
|
234
|
+
r
|
|
235
235
|
],
|
|
236
236
|
subLanguage: "css"
|
|
237
237
|
}
|
|
238
|
-
},
|
|
239
|
-
begin: "gql`",
|
|
238
|
+
}, N = {
|
|
239
|
+
begin: ".?gql`",
|
|
240
240
|
end: "",
|
|
241
241
|
starts: {
|
|
242
242
|
end: "`",
|
|
243
243
|
returnEnd: !1,
|
|
244
244
|
contains: [
|
|
245
|
-
|
|
246
|
-
|
|
245
|
+
n.BACKSLASH_ESCAPE,
|
|
246
|
+
r
|
|
247
247
|
],
|
|
248
248
|
subLanguage: "graphql"
|
|
249
249
|
}
|
|
250
|
-
},
|
|
250
|
+
}, d = {
|
|
251
251
|
className: "string",
|
|
252
252
|
begin: "`",
|
|
253
253
|
end: "`",
|
|
254
254
|
contains: [
|
|
255
|
-
|
|
256
|
-
|
|
255
|
+
n.BACKSLASH_ESCAPE,
|
|
256
|
+
r
|
|
257
257
|
]
|
|
258
258
|
}, y = {
|
|
259
259
|
className: "comment",
|
|
260
260
|
variants: [
|
|
261
|
-
|
|
261
|
+
n.COMMENT(
|
|
262
262
|
/\/\*\*(?!\/)/,
|
|
263
263
|
"\\*/",
|
|
264
264
|
{
|
|
@@ -297,24 +297,24 @@ function W(e) {
|
|
|
297
297
|
]
|
|
298
298
|
}
|
|
299
299
|
),
|
|
300
|
-
|
|
301
|
-
|
|
300
|
+
n.C_BLOCK_COMMENT_MODE,
|
|
301
|
+
n.C_LINE_COMMENT_MODE
|
|
302
302
|
]
|
|
303
|
-
},
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
303
|
+
}, O = [
|
|
304
|
+
n.APOS_STRING_MODE,
|
|
305
|
+
n.QUOTE_STRING_MODE,
|
|
306
|
+
s,
|
|
307
307
|
S,
|
|
308
|
-
E,
|
|
309
308
|
N,
|
|
309
|
+
d,
|
|
310
310
|
// Skip numbers when they are part of a variable name
|
|
311
311
|
{ match: /\$\d+/ },
|
|
312
|
-
|
|
312
|
+
_
|
|
313
313
|
// This is intentional:
|
|
314
314
|
// See https://github.com/highlightjs/highlight.js/issues/3288
|
|
315
315
|
// hljs.REGEXP_MODE
|
|
316
316
|
];
|
|
317
|
-
|
|
317
|
+
r.contains = O.concat({
|
|
318
318
|
// we need to pair up {} inside our subst to prevent
|
|
319
319
|
// it from ending too early by matching another }
|
|
320
320
|
begin: /\{/,
|
|
@@ -322,25 +322,27 @@ function W(e) {
|
|
|
322
322
|
keywords: c,
|
|
323
323
|
contains: [
|
|
324
324
|
"self"
|
|
325
|
-
].concat(
|
|
325
|
+
].concat(O)
|
|
326
326
|
});
|
|
327
|
-
const
|
|
327
|
+
const M = [].concat(y, r.contains), I = M.concat([
|
|
328
328
|
// eat recursive parens in sub expressions
|
|
329
329
|
{
|
|
330
|
-
begin:
|
|
330
|
+
begin: /(\s*)\(/,
|
|
331
331
|
end: /\)/,
|
|
332
332
|
keywords: c,
|
|
333
|
-
contains: ["self"].concat(
|
|
333
|
+
contains: ["self"].concat(M)
|
|
334
334
|
}
|
|
335
|
-
]),
|
|
335
|
+
]), b = {
|
|
336
336
|
className: "params",
|
|
337
|
-
|
|
337
|
+
// convert this to negative lookbehind in v12
|
|
338
|
+
begin: /(\s*)\(/,
|
|
339
|
+
// to match the parms with
|
|
338
340
|
end: /\)/,
|
|
339
341
|
excludeBegin: !0,
|
|
340
342
|
excludeEnd: !0,
|
|
341
343
|
keywords: c,
|
|
342
|
-
contains:
|
|
343
|
-
},
|
|
344
|
+
contains: I
|
|
345
|
+
}, $ = {
|
|
344
346
|
variants: [
|
|
345
347
|
// class Car extends vehicle
|
|
346
348
|
{
|
|
@@ -351,7 +353,7 @@ function W(e) {
|
|
|
351
353
|
/\s+/,
|
|
352
354
|
/extends/,
|
|
353
355
|
/\s+/,
|
|
354
|
-
|
|
356
|
+
e.concat(t, "(", e.concat(/\./, t), ")*")
|
|
355
357
|
],
|
|
356
358
|
scope: {
|
|
357
359
|
1: "keyword",
|
|
@@ -373,9 +375,9 @@ function W(e) {
|
|
|
373
375
|
}
|
|
374
376
|
}
|
|
375
377
|
]
|
|
376
|
-
},
|
|
378
|
+
}, v = {
|
|
377
379
|
relevance: 0,
|
|
378
|
-
match:
|
|
380
|
+
match: e.either(
|
|
379
381
|
// Hard coded exceptions
|
|
380
382
|
/\bJSON/,
|
|
381
383
|
// Float32Array, OutT
|
|
@@ -393,16 +395,16 @@ function W(e) {
|
|
|
393
395
|
keywords: {
|
|
394
396
|
_: [
|
|
395
397
|
// se we still get relevance credit for JS library classes
|
|
396
|
-
...
|
|
397
|
-
...
|
|
398
|
+
...k,
|
|
399
|
+
...B
|
|
398
400
|
]
|
|
399
401
|
}
|
|
400
|
-
},
|
|
402
|
+
}, F = {
|
|
401
403
|
label: "use_strict",
|
|
402
404
|
className: "meta",
|
|
403
405
|
relevance: 10,
|
|
404
406
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
405
|
-
},
|
|
407
|
+
}, G = {
|
|
406
408
|
variants: [
|
|
407
409
|
{
|
|
408
410
|
match: [
|
|
@@ -425,39 +427,39 @@ function W(e) {
|
|
|
425
427
|
3: "title.function"
|
|
426
428
|
},
|
|
427
429
|
label: "func.def",
|
|
428
|
-
contains: [
|
|
430
|
+
contains: [b],
|
|
429
431
|
illegal: /%/
|
|
430
432
|
}, Z = {
|
|
431
433
|
relevance: 0,
|
|
432
434
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
433
435
|
className: "variable.constant"
|
|
434
436
|
};
|
|
435
|
-
function z(
|
|
436
|
-
return
|
|
437
|
+
function z(a) {
|
|
438
|
+
return e.concat("(?!", a.join("|"), ")");
|
|
437
439
|
}
|
|
438
|
-
const
|
|
439
|
-
match:
|
|
440
|
+
const H = {
|
|
441
|
+
match: e.concat(
|
|
440
442
|
/\b/,
|
|
441
443
|
z([
|
|
442
|
-
...
|
|
444
|
+
...U,
|
|
443
445
|
"super",
|
|
444
446
|
"import"
|
|
445
|
-
]),
|
|
447
|
+
].map((a) => `${a}\\s*\\(`)),
|
|
446
448
|
t,
|
|
447
|
-
|
|
449
|
+
e.lookahead(/\s*\(/)
|
|
448
450
|
),
|
|
449
451
|
className: "title.function",
|
|
450
452
|
relevance: 0
|
|
451
453
|
}, K = {
|
|
452
|
-
begin:
|
|
453
|
-
|
|
454
|
+
begin: e.concat(/\./, e.lookahead(
|
|
455
|
+
e.concat(t, /(?![0-9A-Za-z$_(])/)
|
|
454
456
|
)),
|
|
455
457
|
end: t,
|
|
456
458
|
excludeBegin: !0,
|
|
457
459
|
keywords: "prototype",
|
|
458
460
|
className: "property",
|
|
459
461
|
relevance: 0
|
|
460
|
-
},
|
|
462
|
+
}, Y = {
|
|
461
463
|
match: [
|
|
462
464
|
/get|set/,
|
|
463
465
|
/\s+/,
|
|
@@ -473,9 +475,9 @@ function W(e) {
|
|
|
473
475
|
// eat to avoid empty params
|
|
474
476
|
begin: /\(\)/
|
|
475
477
|
},
|
|
476
|
-
|
|
478
|
+
b
|
|
477
479
|
]
|
|
478
|
-
},
|
|
480
|
+
}, w = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + n.UNDERSCORE_IDENT_RE + ")\\s*=>", W = {
|
|
479
481
|
match: [
|
|
480
482
|
/const|var|let/,
|
|
481
483
|
/\s+/,
|
|
@@ -484,7 +486,7 @@ function W(e) {
|
|
|
484
486
|
/=\s*/,
|
|
485
487
|
/(async\s*)?/,
|
|
486
488
|
// async is optional
|
|
487
|
-
|
|
489
|
+
e.lookahead(w)
|
|
488
490
|
],
|
|
489
491
|
keywords: "async",
|
|
490
492
|
className: {
|
|
@@ -492,7 +494,7 @@ function W(e) {
|
|
|
492
494
|
3: "title.function"
|
|
493
495
|
},
|
|
494
496
|
contains: [
|
|
495
|
-
|
|
497
|
+
b
|
|
496
498
|
]
|
|
497
499
|
};
|
|
498
500
|
return {
|
|
@@ -500,46 +502,46 @@ function W(e) {
|
|
|
500
502
|
aliases: ["js", "jsx", "mjs", "cjs"],
|
|
501
503
|
keywords: c,
|
|
502
504
|
// this will be extended by TypeScript
|
|
503
|
-
exports: { PARAMS_CONTAINS:
|
|
505
|
+
exports: { PARAMS_CONTAINS: I, CLASS_REFERENCE: v },
|
|
504
506
|
illegal: /#(?![$_A-z])/,
|
|
505
507
|
contains: [
|
|
506
|
-
|
|
508
|
+
n.SHEBANG({
|
|
507
509
|
label: "shebang",
|
|
508
510
|
binary: "node",
|
|
509
511
|
relevance: 5
|
|
510
512
|
}),
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
513
|
+
F,
|
|
514
|
+
n.APOS_STRING_MODE,
|
|
515
|
+
n.QUOTE_STRING_MODE,
|
|
516
|
+
s,
|
|
515
517
|
S,
|
|
516
|
-
E,
|
|
517
518
|
N,
|
|
519
|
+
d,
|
|
518
520
|
y,
|
|
519
521
|
// Skip numbers when they are part of a variable name
|
|
520
522
|
{ match: /\$\d+/ },
|
|
521
|
-
|
|
522
|
-
|
|
523
|
+
_,
|
|
524
|
+
v,
|
|
523
525
|
{
|
|
524
526
|
className: "attr",
|
|
525
|
-
begin: t +
|
|
527
|
+
begin: t + e.lookahead(":"),
|
|
526
528
|
relevance: 0
|
|
527
529
|
},
|
|
528
|
-
|
|
530
|
+
W,
|
|
529
531
|
{
|
|
530
532
|
// "value" container
|
|
531
|
-
begin: "(" +
|
|
533
|
+
begin: "(" + n.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
532
534
|
keywords: "return throw case",
|
|
533
535
|
relevance: 0,
|
|
534
536
|
contains: [
|
|
535
537
|
y,
|
|
536
|
-
|
|
538
|
+
n.REGEXP_MODE,
|
|
537
539
|
{
|
|
538
540
|
className: "function",
|
|
539
541
|
// we have to count the parens to make sure we actually have the
|
|
540
542
|
// correct bounding ( ) before the =>. There could be any number of
|
|
541
543
|
// sub-expressions inside also surrounded by parens.
|
|
542
|
-
begin:
|
|
544
|
+
begin: w,
|
|
543
545
|
returnBegin: !0,
|
|
544
546
|
end: "\\s*=>",
|
|
545
547
|
contains: [
|
|
@@ -547,7 +549,7 @@ function W(e) {
|
|
|
547
549
|
className: "params",
|
|
548
550
|
variants: [
|
|
549
551
|
{
|
|
550
|
-
begin:
|
|
552
|
+
begin: n.UNDERSCORE_IDENT_RE,
|
|
551
553
|
relevance: 0
|
|
552
554
|
},
|
|
553
555
|
{
|
|
@@ -556,12 +558,12 @@ function W(e) {
|
|
|
556
558
|
skip: !0
|
|
557
559
|
},
|
|
558
560
|
{
|
|
559
|
-
begin:
|
|
561
|
+
begin: /(\s*)\(/,
|
|
560
562
|
end: /\)/,
|
|
561
563
|
excludeBegin: !0,
|
|
562
564
|
excludeEnd: !0,
|
|
563
565
|
keywords: c,
|
|
564
|
-
contains:
|
|
566
|
+
contains: I
|
|
565
567
|
}
|
|
566
568
|
]
|
|
567
569
|
}
|
|
@@ -579,21 +581,21 @@ function W(e) {
|
|
|
579
581
|
{
|
|
580
582
|
// JSX
|
|
581
583
|
variants: [
|
|
582
|
-
{ begin:
|
|
584
|
+
{ begin: g.begin, end: g.end },
|
|
583
585
|
{ match: R },
|
|
584
586
|
{
|
|
585
|
-
begin:
|
|
587
|
+
begin: o.begin,
|
|
586
588
|
// we carefully check the opening tag to see if it truly
|
|
587
589
|
// is a tag and not a false positive
|
|
588
|
-
"on:begin":
|
|
589
|
-
end:
|
|
590
|
+
"on:begin": o.isTrulyOpeningTag,
|
|
591
|
+
end: o.end
|
|
590
592
|
}
|
|
591
593
|
],
|
|
592
594
|
subLanguage: "xml",
|
|
593
595
|
contains: [
|
|
594
596
|
{
|
|
595
|
-
begin:
|
|
596
|
-
end:
|
|
597
|
+
begin: o.begin,
|
|
598
|
+
end: o.end,
|
|
597
599
|
skip: !0,
|
|
598
600
|
contains: ["self"]
|
|
599
601
|
}
|
|
@@ -601,7 +603,7 @@ function W(e) {
|
|
|
601
603
|
}
|
|
602
604
|
]
|
|
603
605
|
},
|
|
604
|
-
|
|
606
|
+
G,
|
|
605
607
|
{
|
|
606
608
|
// prevent this from getting swallowed up by function
|
|
607
609
|
// since they appear "function like"
|
|
@@ -611,13 +613,13 @@ function W(e) {
|
|
|
611
613
|
// we have to count the parens to make sure we actually have the correct
|
|
612
614
|
// bounding ( ). There could be any number of sub-expressions inside
|
|
613
615
|
// also surrounded by parens.
|
|
614
|
-
begin: "\\b(?!function)" +
|
|
616
|
+
begin: "\\b(?!function)" + n.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
|
|
615
617
|
// end parens
|
|
616
618
|
returnBegin: !0,
|
|
617
619
|
label: "func.def",
|
|
618
620
|
contains: [
|
|
619
|
-
|
|
620
|
-
|
|
621
|
+
b,
|
|
622
|
+
n.inherit(n.TITLE_MODE, { begin: t, className: "title.function" })
|
|
621
623
|
]
|
|
622
624
|
},
|
|
623
625
|
// catch ... so it won't trigger the property rule below
|
|
@@ -636,12 +638,12 @@ function W(e) {
|
|
|
636
638
|
{
|
|
637
639
|
match: [/\bconstructor(?=\s*\()/],
|
|
638
640
|
className: { 1: "title.function" },
|
|
639
|
-
contains: [
|
|
641
|
+
contains: [b]
|
|
640
642
|
},
|
|
641
|
-
G,
|
|
642
|
-
Z,
|
|
643
|
-
P,
|
|
644
643
|
H,
|
|
644
|
+
Z,
|
|
645
|
+
$,
|
|
646
|
+
Y,
|
|
645
647
|
{
|
|
646
648
|
match: /\$[(.]/
|
|
647
649
|
// relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
|
|
@@ -649,8 +651,8 @@ function W(e) {
|
|
|
649
651
|
]
|
|
650
652
|
};
|
|
651
653
|
}
|
|
652
|
-
function X(
|
|
653
|
-
const
|
|
654
|
+
function X(n) {
|
|
655
|
+
const e = J(n), f = m, t = [
|
|
654
656
|
"any",
|
|
655
657
|
"void",
|
|
656
658
|
"number",
|
|
@@ -661,11 +663,16 @@ function X(e) {
|
|
|
661
663
|
"symbol",
|
|
662
664
|
"bigint",
|
|
663
665
|
"unknown"
|
|
664
|
-
],
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
666
|
+
], g = {
|
|
667
|
+
begin: [
|
|
668
|
+
/namespace/,
|
|
669
|
+
/\s+/,
|
|
670
|
+
n.IDENT_RE
|
|
671
|
+
],
|
|
672
|
+
beginScope: {
|
|
673
|
+
1: "keyword",
|
|
674
|
+
3: "title.class"
|
|
675
|
+
}
|
|
669
676
|
}, R = {
|
|
670
677
|
beginKeywords: "interface",
|
|
671
678
|
end: /\{/,
|
|
@@ -674,14 +681,14 @@ function X(e) {
|
|
|
674
681
|
keyword: "interface extends",
|
|
675
682
|
built_in: t
|
|
676
683
|
},
|
|
677
|
-
contains: [
|
|
678
|
-
},
|
|
684
|
+
contains: [e.exports.CLASS_REFERENCE]
|
|
685
|
+
}, o = {
|
|
679
686
|
className: "meta",
|
|
680
687
|
relevance: 10,
|
|
681
688
|
begin: /^\s*['"]use strict['"]/
|
|
682
689
|
}, c = [
|
|
683
690
|
"type",
|
|
684
|
-
"namespace",
|
|
691
|
+
// "namespace",
|
|
685
692
|
"interface",
|
|
686
693
|
"public",
|
|
687
694
|
"private",
|
|
@@ -691,29 +698,37 @@ function X(e) {
|
|
|
691
698
|
"abstract",
|
|
692
699
|
"readonly",
|
|
693
700
|
"enum",
|
|
694
|
-
"override"
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
701
|
+
"override",
|
|
702
|
+
"satisfies"
|
|
703
|
+
], A = {
|
|
704
|
+
$pattern: m,
|
|
705
|
+
keyword: x.concat(c),
|
|
706
|
+
literal: D,
|
|
707
|
+
built_in: P.concat(t),
|
|
700
708
|
"variable.language": h
|
|
701
|
-
},
|
|
709
|
+
}, i = {
|
|
702
710
|
className: "meta",
|
|
703
711
|
begin: "@" + f
|
|
704
|
-
},
|
|
705
|
-
const
|
|
706
|
-
if (
|
|
712
|
+
}, E = (s, S, N) => {
|
|
713
|
+
const d = s.contains.findIndex((C) => C.label === S);
|
|
714
|
+
if (d === -1)
|
|
707
715
|
throw new Error("can not find mode to replace");
|
|
708
|
-
|
|
716
|
+
s.contains.splice(d, 1, N);
|
|
709
717
|
};
|
|
710
|
-
Object.assign(
|
|
711
|
-
|
|
712
|
-
|
|
718
|
+
Object.assign(e.keywords, A), e.exports.PARAMS_CONTAINS.push(i);
|
|
719
|
+
const _ = e.contains.find((s) => s.className === "attr");
|
|
720
|
+
e.exports.PARAMS_CONTAINS.push([
|
|
721
|
+
e.exports.CLASS_REFERENCE,
|
|
722
|
+
// class reference for highlighting the params types
|
|
723
|
+
_
|
|
724
|
+
// highlight the params key
|
|
725
|
+
]), e.contains = e.contains.concat([
|
|
726
|
+
i,
|
|
727
|
+
g,
|
|
713
728
|
R
|
|
714
|
-
]),
|
|
715
|
-
const
|
|
716
|
-
return
|
|
729
|
+
]), E(e, "shebang", n.SHEBANG()), E(e, "use_strict", o);
|
|
730
|
+
const r = e.contains.find((s) => s.label === "func.def");
|
|
731
|
+
return r.relevance = 0, Object.assign(e, {
|
|
717
732
|
name: "TypeScript",
|
|
718
733
|
aliases: [
|
|
719
734
|
"ts",
|
|
@@ -721,7 +736,7 @@ function X(e) {
|
|
|
721
736
|
"mts",
|
|
722
737
|
"cts"
|
|
723
738
|
]
|
|
724
|
-
}),
|
|
739
|
+
}), e;
|
|
725
740
|
}
|
|
726
741
|
export {
|
|
727
742
|
X as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CancellationToken.d.ts","sourceRoot":"","sources":["../../src/utils/CancellationToken.ts"],"names":[],"mappings":"AAEA,qBAAa,iBAAiB;
|
|
1
|
+
{"version":3,"file":"CancellationToken.d.ts","sourceRoot":"","sources":["../../src/utils/CancellationToken.ts"],"names":[],"mappings":"AAEA,qBAAa,iBAAiB;IAC5B,uBAAuB,EAAE,OAAO,CAAS;IACzC,SAAS,YAAiB,IAAI,EAAI;IAElC,WAAW,CAAC,QAAQ,EAAE,MAAM,IAAI;IAQhC,MAAM;IAUN,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI;IAInC,4BAA4B;CAK7B;AAED,qBAAa,qBAAsB,SAAQ,iBAAiB;IAC1D,WAAW;IAIX,cAAc;IAId,MAAM;IAIN,MAAM,KAAK,SAAS,0BAEnB;IAED,OAAO,CAAC,MAAM,CAAC,UAAU,CAAwB;CAClD"}
|