@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.
Files changed (111) hide show
  1. package/dist/{ChatCompletionSSE.d.ts → ChatClient.d.ts} +22 -13
  2. package/dist/ChatClient.d.ts.map +1 -0
  3. package/dist/ChatMessageItem.d.ts +1 -1
  4. package/dist/ClientFunctionInvocation.d.ts +14 -0
  5. package/dist/ClientFunctionInvocation.d.ts.map +1 -0
  6. package/dist/ClientFunctionInvocationContext.d.ts +10 -0
  7. package/dist/ClientFunctionInvocationContext.d.ts.map +1 -0
  8. package/dist/Markdown/index.d.ts +2 -2
  9. package/dist/Markdown/index.d.ts.map +1 -1
  10. package/dist/Markdown/math.d.ts.map +1 -1
  11. package/dist/MaxInputLimitReachedError.d.ts +4 -0
  12. package/dist/MaxInputLimitReachedError.d.ts.map +1 -0
  13. package/dist/Pyodide.d.ts +1 -1
  14. package/dist/Pyodide.d.ts.map +1 -1
  15. package/dist/ToolCallBuilder.d.ts +13 -0
  16. package/dist/ToolCallBuilder.d.ts.map +1 -0
  17. package/dist/UnexpectedEndOfStreamError.d.ts +4 -0
  18. package/dist/UnexpectedEndOfStreamError.d.ts.map +1 -0
  19. package/dist/components/Button.d.ts +1 -0
  20. package/dist/components/Button.d.ts.map +1 -1
  21. package/dist/components/ButtonOptionsDialog.d.ts +27 -0
  22. package/dist/components/ButtonOptionsDialog.d.ts.map +1 -0
  23. package/dist/components/Chat/index.d.ts +39 -0
  24. package/dist/components/Chat/index.d.ts.map +1 -0
  25. package/dist/components/Conversation.d.ts +54 -0
  26. package/dist/components/Conversation.d.ts.map +1 -0
  27. package/dist/components/ConversationMessage.d.ts +53 -0
  28. package/dist/components/ConversationMessage.d.ts.map +1 -0
  29. package/dist/components/PythonCodeInterpreter.d.ts +38 -0
  30. package/dist/components/PythonCodeInterpreter.d.ts.map +1 -0
  31. package/dist/components/Search.d.ts +16 -0
  32. package/dist/components/Search.d.ts.map +1 -0
  33. package/dist/components/icons/AngleDown.d.ts +3 -0
  34. package/dist/components/icons/AngleDown.d.ts.map +1 -0
  35. package/dist/components/icons/ArrowDown.d.ts +1 -1
  36. package/dist/components/icons/Check.d.ts +1 -1
  37. package/dist/components/icons/CheckCircle.d.ts +3 -0
  38. package/dist/components/icons/CheckCircle.d.ts.map +1 -0
  39. package/dist/components/icons/ExclamationCircle.d.ts +1 -1
  40. package/dist/components/icons/ExclamationTriangle.d.ts +1 -1
  41. package/dist/components/icons/InfoCircle.d.ts +1 -1
  42. package/dist/components/icons/QuestionCircle.d.ts +1 -1
  43. package/dist/components/icons/SearchIcon.d.ts +3 -0
  44. package/dist/components/icons/SearchIcon.d.ts.map +1 -0
  45. package/dist/components/icons/Spinner.d.ts +1 -1
  46. package/dist/components/icons/Times.d.ts +3 -0
  47. package/dist/components/icons/Times.d.ts.map +1 -0
  48. package/dist/components/icons/TimesCircle.d.ts +1 -1
  49. package/dist/core-CdG-ENX3.js +1069 -0
  50. package/dist/{csharp-Cigc7XMa.js → csharp-EkcwwkCa.js} +18 -13
  51. package/dist/{css-B-yPI1XM.js → css-CJS6IEi0.js} +127 -18
  52. package/dist/dtos.d.ts +34 -4
  53. package/dist/dtos.d.ts.map +1 -1
  54. package/dist/enums.d.ts +13 -29
  55. package/dist/enums.d.ts.map +1 -1
  56. package/dist/index.d.ts +2 -2
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/{javascript-CDslspYb.js → javascript-B2FVNeJt.js} +26 -24
  59. package/dist/{katex-Cj8zHzei.js → katex-c21813vb.js} +454 -428
  60. package/dist/{python-CzH_tl5q.js → python-CymlFLB0.js} +21 -19
  61. package/dist/{typescript-Bx5cZccb.js → typescript-Cg8DWaxm.js} +163 -148
  62. package/dist/utils/CancellationToken.d.ts.map +1 -1
  63. package/dist/utils/Channel.d.ts +42 -1
  64. package/dist/utils/Channel.d.ts.map +1 -1
  65. package/dist/utils/animateAsync.d.ts +1 -1
  66. package/dist/utils/createDeferred.d.ts.map +1 -1
  67. package/dist/utils/parsePartialJSON.d.ts +1 -1
  68. package/dist/utils/parsePartialJSON.d.ts.map +1 -1
  69. package/dist/veracity-ai.es.js +5359 -5416
  70. package/dist/veracity-ai.umd.js +37 -40
  71. package/package.json +28 -20
  72. package/dist/ChatCompletionSSE.d.ts.map +0 -1
  73. package/dist/Markdown copy.d.ts +0 -2
  74. package/dist/Markdown copy.d.ts.map +0 -1
  75. package/dist/MessageLimitExceededError.d.ts +0 -6
  76. package/dist/MessageLimitExceededError.d.ts.map +0 -1
  77. package/dist/Pyodide_test.d.ts +0 -1
  78. package/dist/Pyodide_test.d.ts.map +0 -1
  79. package/dist/components/AIChat/index.d.ts +0 -42
  80. package/dist/components/AIChat/index.d.ts.map +0 -1
  81. package/dist/components/AIChatAgentMessage.d.ts +0 -28
  82. package/dist/components/AIChatAgentMessage.d.ts.map +0 -1
  83. package/dist/components/AIChatMessage.d.ts +0 -1
  84. package/dist/components/AIChatMessage.d.ts.map +0 -1
  85. package/dist/components/AIChatToolCallGroup.d.ts +0 -21
  86. package/dist/components/AIChatToolCallGroup.d.ts.map +0 -1
  87. package/dist/components/AIChatUserMessage.d.ts +0 -14
  88. package/dist/components/AIChatUserMessage.d.ts.map +0 -1
  89. package/dist/components/AIConversation.d.ts +0 -8
  90. package/dist/components/AIConversation.d.ts.map +0 -1
  91. package/dist/components/AIParent.d.ts +0 -8
  92. package/dist/components/AIParent.d.ts.map +0 -1
  93. package/dist/components/ErrorNotification.d.ts +0 -2
  94. package/dist/components/ErrorNotification.d.ts.map +0 -1
  95. package/dist/components/ToolCallComponent/TaskItemComponent.d.ts +0 -14
  96. package/dist/components/ToolCallComponent/TaskItemComponent.d.ts.map +0 -1
  97. package/dist/components/ToolCallComponent/index.d.ts +0 -86
  98. package/dist/components/ToolCallComponent/index.d.ts.map +0 -1
  99. package/dist/components/VeracityAvatar.d.ts +0 -3
  100. package/dist/components/VeracityAvatar.d.ts.map +0 -1
  101. package/dist/components/VeracityLogoSquare.d.ts +0 -3
  102. package/dist/components/VeracityLogoSquare.d.ts.map +0 -1
  103. package/dist/core-Diwflo5W.js +0 -1077
  104. package/dist/modals.d.ts +0 -9
  105. package/dist/modals.d.ts.map +0 -1
  106. package/dist/utils/decodePythonTripleQuotedString.d.ts +0 -2
  107. package/dist/utils/decodePythonTripleQuotedString.d.ts.map +0 -1
  108. package/dist/utils/generateAvatarLetter.d.ts +0 -2
  109. package/dist/utils/generateAvatarLetter.d.ts.map +0 -1
  110. package/dist/utils/getElementTextPreserveNewlines.d.ts +0 -2
  111. package/dist/utils/getElementTextPreserveNewlines.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- const T = "[A-Za-z$_][0-9A-Za-z$_]*", L = [
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
- ], x = [
44
+ ], D = [
45
45
  "true",
46
46
  "false",
47
47
  "null",
48
48
  "undefined",
49
49
  "NaN",
50
50
  "Infinity"
51
- ], D = [
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
- ], k = [
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
- ], B = [
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
- ], U = [].concat(
141
- B,
142
- D,
143
- k
140
+ ], P = [].concat(
141
+ U,
142
+ k,
143
+ B
144
144
  );
145
- function W(e) {
146
- const n = e.regex, f = (s, { after: i }) => {
147
- const b = "</" + s[0].slice(1);
148
- return s.input.indexOf(b, i) !== -1;
149
- }, t = T, u = {
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*\/>/, r = {
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: (s, i) => {
160
- const b = s[0].length + s.index, m = s.input[b];
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
- m === "<" || // the , gives away that this is not HTML
165
+ T === "<" || // the , gives away that this is not HTML
166
166
  // `<T, A extends keyof T, V>`
167
- m === ","
167
+ T === ","
168
168
  ) {
169
- i.ignoreMatch();
169
+ l.ignoreMatch();
170
170
  return;
171
171
  }
172
- m === ">" && (f(s, { after: b }) || i.ignoreMatch());
173
- let I;
174
- const w = s.input.substring(b);
175
- if (I = w.match(/^\s*=/)) {
176
- i.ignoreMatch();
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 ((I = w.match(/^\s+extends\s+/)) && I.index === 0) {
180
- i.ignoreMatch();
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: T,
186
- keyword: L,
187
- literal: x,
188
- built_in: U,
185
+ $pattern: m,
186
+ keyword: x,
187
+ literal: D,
188
+ built_in: P,
189
189
  "variable.language": h
190
- }, g = "[0-9](_?[0-9])*", o = `\\.(${g})`, l = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", A = {
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(${l})((${o})|\\.)?|(${o}))[eE][+-]?(${g})\\b` },
195
- { begin: `\\b(${l})\\b((${o})\\b|\\.)?|(${o})\\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
- }, a = {
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
- e.BACKSLASH_ESCAPE,
222
- a
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
- e.BACKSLASH_ESCAPE,
234
- a
233
+ n.BACKSLASH_ESCAPE,
234
+ r
235
235
  ],
236
236
  subLanguage: "css"
237
237
  }
238
- }, E = {
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
- e.BACKSLASH_ESCAPE,
246
- a
245
+ n.BACKSLASH_ESCAPE,
246
+ r
247
247
  ],
248
248
  subLanguage: "graphql"
249
249
  }
250
- }, N = {
250
+ }, d = {
251
251
  className: "string",
252
252
  begin: "`",
253
253
  end: "`",
254
254
  contains: [
255
- e.BACKSLASH_ESCAPE,
256
- a
255
+ n.BACKSLASH_ESCAPE,
256
+ r
257
257
  ]
258
258
  }, y = {
259
259
  className: "comment",
260
260
  variants: [
261
- e.COMMENT(
261
+ n.COMMENT(
262
262
  /\/\*\*(?!\/)/,
263
263
  "\\*/",
264
264
  {
@@ -297,24 +297,24 @@ function W(e) {
297
297
  ]
298
298
  }
299
299
  ),
300
- e.C_BLOCK_COMMENT_MODE,
301
- e.C_LINE_COMMENT_MODE
300
+ n.C_BLOCK_COMMENT_MODE,
301
+ n.C_LINE_COMMENT_MODE
302
302
  ]
303
- }, C = [
304
- e.APOS_STRING_MODE,
305
- e.QUOTE_STRING_MODE,
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
- A
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
- a.contains = C.concat({
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(C)
325
+ ].concat(O)
326
326
  });
327
- const O = [].concat(y, a.contains), p = O.concat([
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(O)
333
+ contains: ["self"].concat(M)
334
334
  }
335
- ]), d = {
335
+ ]), b = {
336
336
  className: "params",
337
- begin: /\(/,
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: p
343
- }, P = {
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
- n.concat(t, "(", n.concat(/\./, t), ")*")
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
- }, M = {
378
+ }, v = {
377
379
  relevance: 0,
378
- match: n.either(
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
- ...D,
397
- ...k
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
- }, F = {
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: [d],
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(s) {
436
- return n.concat("(?!", s.join("|"), ")");
437
+ function z(a) {
438
+ return e.concat("(?!", a.join("|"), ")");
437
439
  }
438
- const G = {
439
- match: n.concat(
440
+ const H = {
441
+ match: e.concat(
440
442
  /\b/,
441
443
  z([
442
- ...B,
444
+ ...U,
443
445
  "super",
444
446
  "import"
445
- ]),
447
+ ].map((a) => `${a}\\s*\\(`)),
446
448
  t,
447
- n.lookahead(/\(/)
449
+ e.lookahead(/\s*\(/)
448
450
  ),
449
451
  className: "title.function",
450
452
  relevance: 0
451
453
  }, K = {
452
- begin: n.concat(/\./, n.lookahead(
453
- n.concat(t, /(?![0-9A-Za-z$_(])/)
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
- }, H = {
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
- d
478
+ b
477
479
  ]
478
- }, v = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Y = {
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
- n.lookahead(v)
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
- d
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: p, CLASS_REFERENCE: M },
505
+ exports: { PARAMS_CONTAINS: I, CLASS_REFERENCE: v },
504
506
  illegal: /#(?![$_A-z])/,
505
507
  contains: [
506
- e.SHEBANG({
508
+ n.SHEBANG({
507
509
  label: "shebang",
508
510
  binary: "node",
509
511
  relevance: 5
510
512
  }),
511
- $,
512
- e.APOS_STRING_MODE,
513
- e.QUOTE_STRING_MODE,
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
- A,
522
- M,
523
+ _,
524
+ v,
523
525
  {
524
526
  className: "attr",
525
- begin: t + n.lookahead(":"),
527
+ begin: t + e.lookahead(":"),
526
528
  relevance: 0
527
529
  },
528
- Y,
530
+ W,
529
531
  {
530
532
  // "value" container
531
- begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
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
- e.REGEXP_MODE,
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: v,
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: e.UNDERSCORE_IDENT_RE,
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: p
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: u.begin, end: u.end },
584
+ { begin: g.begin, end: g.end },
583
585
  { match: R },
584
586
  {
585
- begin: r.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": r.isTrulyOpeningTag,
589
- end: r.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: r.begin,
596
- end: r.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
- F,
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)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
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
- d,
620
- e.inherit(e.TITLE_MODE, { begin: t, className: "title.function" })
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: [d]
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(e) {
653
- const n = W(e), f = T, t = [
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
- ], u = {
665
- beginKeywords: "namespace",
666
- end: /\{/,
667
- excludeEnd: !0,
668
- contains: [n.exports.CLASS_REFERENCE]
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: [n.exports.CLASS_REFERENCE]
678
- }, r = {
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
- ], g = {
696
- $pattern: T,
697
- keyword: L.concat(c),
698
- literal: x,
699
- built_in: U.concat(t),
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
- }, o = {
709
+ }, i = {
702
710
  className: "meta",
703
711
  begin: "@" + f
704
- }, l = (a, _, S) => {
705
- const E = a.contains.findIndex((N) => N.label === _);
706
- if (E === -1)
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
- a.contains.splice(E, 1, S);
716
+ s.contains.splice(d, 1, N);
709
717
  };
710
- Object.assign(n.keywords, g), n.exports.PARAMS_CONTAINS.push(o), n.contains = n.contains.concat([
711
- o,
712
- u,
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
- ]), l(n, "shebang", e.SHEBANG()), l(n, "use_strict", r);
715
- const A = n.contains.find((a) => a.label === "func.def");
716
- return A.relevance = 0, Object.assign(n, {
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
- }), n;
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;IAC1B,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;CAK/B;AAED,qBAAa,qBAAsB,SAAQ,iBAAiB;IACxD,WAAW;IAIX,cAAc;IAId,MAAM;IAIN,MAAM,KAAK,SAAS,0BAEnB;IAED,OAAO,CAAC,MAAM,CAAC,UAAU,CAAwB;CACpD"}
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"}