@bluepic/embed 0.5.1 → 0.5.4

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 (106) hide show
  1. package/dist/bash-DI5WKoY1.cjs +1 -0
  2. package/dist/bash-SfqkqXwO.js +169 -0
  3. package/dist/bluepic-embed.iife.js +240 -271
  4. package/dist/bluepic-embed.umd.js +240 -271
  5. package/dist/c-Bwju34J8.js +176 -0
  6. package/dist/c-CxjdkDqU.cjs +1 -0
  7. package/dist/client-zip-Dl4jBUKQ.cjs +1 -0
  8. package/dist/client-zip-DscsL7SZ.js +254 -0
  9. package/dist/components/BxDatePickerPopover.vue.d.ts +1 -1
  10. package/dist/components/BxInput.vue.d.ts +1 -1
  11. package/dist/components/BxTag.vue.d.ts +1 -1
  12. package/dist/components/TemplateEditor/BatchEditor.vue.d.ts +14 -10
  13. package/dist/components/TemplateEditor/BxTemplateEditor.vue.d.ts +80 -64
  14. package/dist/components/TemplateEditor/TemplateView.vue.d.ts +20 -16
  15. package/dist/cpp-BNKWamrP.js +225 -0
  16. package/dist/cpp-BlYqzAb6.cjs +1 -0
  17. package/dist/css-C6p-exw3.cjs +1 -0
  18. package/dist/css-yWyfM7J9.js +140 -0
  19. package/dist/decompress-3ZSaG6Ii.cjs +15 -0
  20. package/dist/decompress-C88dmWOf.js +643 -0
  21. package/dist/embed/embed.d.ts +4416 -1454
  22. package/dist/go-DnIuztGs.js +140 -0
  23. package/dist/go-RBRkffhh.cjs +1 -0
  24. package/dist/java-CYbswnVa.js +169 -0
  25. package/dist/java-DiqBJCuC.cjs +1 -0
  26. package/dist/javascript-DaG6fU1i.js +436 -0
  27. package/dist/javascript-hWWC5YVO.cjs +1 -0
  28. package/dist/json-CW2SpMXu.cjs +1 -0
  29. package/dist/json-Cu6rbgWf.js +36 -0
  30. package/dist/main.cjs +118 -146
  31. package/dist/main.mjs +73680 -85828
  32. package/dist/markdown-BaDHGYjR.cjs +1 -0
  33. package/dist/markdown-D3Gs6FWn.js +181 -0
  34. package/dist/markdown-it-BOugFJd0.cjs +13 -0
  35. package/dist/markdown-it-bsR6HXzL.js +2875 -0
  36. package/dist/postal-mime-BnhFNwEJ.cjs +28 -0
  37. package/dist/postal-mime-Bsdi2kUR.js +3210 -0
  38. package/dist/python-D1ZXre9G.js +238 -0
  39. package/dist/python-DawLCmeM.cjs +1 -0
  40. package/dist/rolldown-runtime-CEFd7nDs.js +30 -0
  41. package/dist/rolldown-runtime-CPUxUITh.cjs +1 -0
  42. package/dist/rust-B47KpJg8.cjs +1 -0
  43. package/dist/rust-DV3X-6zd.js +169 -0
  44. package/dist/scss-BwEwJffF.cjs +1 -0
  45. package/dist/scss-DVPIh7kT.js +150 -0
  46. package/dist/sql-BsfEDS1M.cjs +1 -0
  47. package/dist/sql-CmVzGP4w.js +118 -0
  48. package/dist/style.css +2 -1
  49. package/dist/theme.cjs +1 -1
  50. package/dist/theme.mjs +1394 -1273
  51. package/dist/typescript-CjqyVRRm.cjs +1 -0
  52. package/dist/typescript-DbET6Hbh.js +521 -0
  53. package/dist/unzipit.module-CWI6YKpy.js +697 -0
  54. package/dist/unzipit.module-DLgVBmhU.cjs +1 -0
  55. package/dist/util/gallery.d.ts +21 -37
  56. package/dist/xlsx-Bm1OL5B8.js +16261 -0
  57. package/dist/xlsx-C9EeNB50.cjs +38 -0
  58. package/dist/xml-Bh8MwSUt.cjs +1 -0
  59. package/dist/xml-Bxh-tO8n.js +166 -0
  60. package/dist/yaml-CIP4hiwy.cjs +1 -0
  61. package/dist/yaml-DT7UV549.js +144 -0
  62. package/package.json +9 -5
  63. package/dist/bash-BHkfQ7MG.cjs +0 -1
  64. package/dist/bash-CPB87Egg.js +0 -377
  65. package/dist/c-B4BAHWS4.cjs +0 -1
  66. package/dist/c-C0DTNf68.js +0 -336
  67. package/dist/cpp-BfO2fOQK.cjs +0 -1
  68. package/dist/cpp-DxGBPWa5.js +0 -538
  69. package/dist/css-Cx1gP-zj.js +0 -934
  70. package/dist/css-DTF39MN3.cjs +0 -1
  71. package/dist/decompress-BGiydwyp.cjs +0 -15
  72. package/dist/decompress-D5RzmD-2.js +0 -566
  73. package/dist/go-By8nj0Vi.cjs +0 -1
  74. package/dist/go-C8VcBUsu.js +0 -156
  75. package/dist/index-C99_zLhc.js +0 -175
  76. package/dist/index-D8N6IfRw.cjs +0 -1
  77. package/dist/java-BoRJOXvw.js +0 -249
  78. package/dist/java-DFXAwvvK.cjs +0 -1
  79. package/dist/javascript-C2jY0XE6.cjs +0 -1
  80. package/dist/javascript-CgRUYx2b.js +0 -660
  81. package/dist/json-C4rahuoJ.cjs +0 -1
  82. package/dist/json-DYK-YbD3.js +0 -44
  83. package/dist/markdown-BmL9j9cU.cjs +0 -1
  84. package/dist/markdown-D19noYwn.js +0 -215
  85. package/dist/markdown-it-5-ieF6Bh.js +0 -3790
  86. package/dist/markdown-it-CLB5Jta6.cjs +0 -16
  87. package/dist/postal-mime-Df-WB8Vq.js +0 -3337
  88. package/dist/postal-mime-_7WF5UBe.cjs +0 -28
  89. package/dist/python-BBUuE3AY.js +0 -404
  90. package/dist/python-Clt6L10q.cjs +0 -1
  91. package/dist/rust-DY-oA2gr.js +0 -319
  92. package/dist/rust-_vvcEGSJ.cjs +0 -1
  93. package/dist/scss-BWo_aR1L.js +0 -919
  94. package/dist/scss-ex7iHSUb.cjs +0 -1
  95. package/dist/sql-BSlOauVK.cjs +0 -1
  96. package/dist/sql-IeKX8fQ8.js +0 -615
  97. package/dist/typescript-BHqLHF13.js +0 -755
  98. package/dist/typescript-DYRnLHqF.cjs +0 -1
  99. package/dist/unzipit.module-4zGfAuq6.cjs +0 -1
  100. package/dist/unzipit.module-qN5XWVVT.js +0 -649
  101. package/dist/xlsx-BopDBbWb.js +0 -24176
  102. package/dist/xlsx-qn1xoUuv.cjs +0 -105
  103. package/dist/xml-Bse49fPV.js +0 -212
  104. package/dist/xml-CVmug_x4.cjs +0 -1
  105. package/dist/yaml-BslECvWp.js +0 -183
  106. package/dist/yaml-C6zsmLZx.cjs +0 -1
@@ -1,755 +0,0 @@
1
- const y = "[A-Za-z$_][0-9A-Za-z$_]*", x = [
2
- "as",
3
- // for exports
4
- "in",
5
- "of",
6
- "if",
7
- "for",
8
- "while",
9
- "finally",
10
- "var",
11
- "new",
12
- "function",
13
- "do",
14
- "return",
15
- "void",
16
- "else",
17
- "break",
18
- "catch",
19
- "instanceof",
20
- "with",
21
- "throw",
22
- "case",
23
- "default",
24
- "try",
25
- "switch",
26
- "continue",
27
- "typeof",
28
- "delete",
29
- "let",
30
- "yield",
31
- "const",
32
- "class",
33
- // JS handles these with a special rule
34
- // "get",
35
- // "set",
36
- "debugger",
37
- "async",
38
- "await",
39
- "static",
40
- "import",
41
- "from",
42
- "export",
43
- "extends",
44
- // It's reached stage 3, which is "recommended for implementation":
45
- "using"
46
- ], k = [
47
- "true",
48
- "false",
49
- "null",
50
- "undefined",
51
- "NaN",
52
- "Infinity"
53
- ], D = [
54
- // Fundamental objects
55
- "Object",
56
- "Function",
57
- "Boolean",
58
- "Symbol",
59
- // numbers and dates
60
- "Math",
61
- "Date",
62
- "Number",
63
- "BigInt",
64
- // text
65
- "String",
66
- "RegExp",
67
- // Indexed collections
68
- "Array",
69
- "Float32Array",
70
- "Float64Array",
71
- "Int8Array",
72
- "Uint8Array",
73
- "Uint8ClampedArray",
74
- "Int16Array",
75
- "Int32Array",
76
- "Uint16Array",
77
- "Uint32Array",
78
- "BigInt64Array",
79
- "BigUint64Array",
80
- // Keyed collections
81
- "Set",
82
- "Map",
83
- "WeakSet",
84
- "WeakMap",
85
- // Structured data
86
- "ArrayBuffer",
87
- "SharedArrayBuffer",
88
- "Atomics",
89
- "DataView",
90
- "JSON",
91
- // Control abstraction objects
92
- "Promise",
93
- "Generator",
94
- "GeneratorFunction",
95
- "AsyncFunction",
96
- // Reflection
97
- "Reflect",
98
- "Proxy",
99
- // Internationalization
100
- "Intl",
101
- // WebAssembly
102
- "WebAssembly"
103
- ], h = [
104
- "Error",
105
- "EvalError",
106
- "InternalError",
107
- "RangeError",
108
- "ReferenceError",
109
- "SyntaxError",
110
- "TypeError",
111
- "URIError"
112
- ], B = [
113
- "setInterval",
114
- "setTimeout",
115
- "clearInterval",
116
- "clearTimeout",
117
- "require",
118
- "exports",
119
- "eval",
120
- "isFinite",
121
- "isNaN",
122
- "parseFloat",
123
- "parseInt",
124
- "decodeURI",
125
- "decodeURIComponent",
126
- "encodeURI",
127
- "encodeURIComponent",
128
- "escape",
129
- "unescape"
130
- ], U = [
131
- "arguments",
132
- "this",
133
- "super",
134
- "console",
135
- "window",
136
- "document",
137
- "localStorage",
138
- "sessionStorage",
139
- "module",
140
- "self",
141
- "global"
142
- // Node.js
143
- ], P = [].concat(
144
- B,
145
- D,
146
- h
147
- );
148
- function J(e) {
149
- const a = e.regex, t = (s, { after: d }) => {
150
- const S = "</" + s[0].slice(1);
151
- return s.input.indexOf(S, d) !== -1;
152
- }, n = y, b = {
153
- begin: "<>",
154
- end: "</>"
155
- }, p = /<[A-Za-z0-9\\._:-]+\s*\/>/, i = {
156
- begin: /<[A-Za-z0-9\\._:-]+/,
157
- end: /\/[A-Za-z0-9\\._:-]+>|\/>/,
158
- /**
159
- * @param {RegExpMatchArray} match
160
- * @param {CallbackResponse} response
161
- */
162
- isTrulyOpeningTag: (s, d) => {
163
- const S = s[0].length + s.index, f = s.input[S];
164
- if (
165
- // HTML should not include another raw `<` inside a tag
166
- // nested type?
167
- // `<Array<Array<number>>`, etc.
168
- f === "<" || // the , gives away that this is not HTML
169
- // `<T, A extends keyof T, V>`
170
- f === ","
171
- ) {
172
- d.ignoreMatch();
173
- return;
174
- }
175
- f === ">" && (t(s, { after: S }) || d.ignoreMatch());
176
- let O;
177
- const L = s.input.substring(S);
178
- if (O = L.match(/^\s*=/)) {
179
- d.ignoreMatch();
180
- return;
181
- }
182
- if ((O = L.match(/^\s+extends\s+/)) && O.index === 0) {
183
- d.ignoreMatch();
184
- return;
185
- }
186
- }
187
- }, o = {
188
- $pattern: y,
189
- keyword: x,
190
- literal: k,
191
- built_in: P,
192
- "variable.language": U
193
- }, N = "[0-9](_?[0-9])*", l = `\\.(${N})`, g = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", u = {
194
- className: "number",
195
- variants: [
196
- // DecimalLiteral
197
- { begin: `(\\b(${g})((${l})|\\.)?|(${l}))[eE][+-]?(${N})\\b` },
198
- { begin: `\\b(${g})\\b((${l})\\b|\\.)?|(${l})\\b` },
199
- // DecimalBigIntegerLiteral
200
- { begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
201
- // NonDecimalIntegerLiteral
202
- { begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b" },
203
- { begin: "\\b0[bB][0-1](_?[0-1])*n?\\b" },
204
- { begin: "\\b0[oO][0-7](_?[0-7])*n?\\b" },
205
- // LegacyOctalIntegerLiteral (does not include underscore separators)
206
- // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals
207
- { begin: "\\b0[0-7]+n?\\b" }
208
- ],
209
- relevance: 0
210
- }, c = {
211
- className: "subst",
212
- begin: "\\$\\{",
213
- end: "\\}",
214
- keywords: o,
215
- contains: []
216
- // defined later
217
- }, A = {
218
- begin: ".?html`",
219
- end: "",
220
- starts: {
221
- end: "`",
222
- returnEnd: !1,
223
- contains: [
224
- e.BACKSLASH_ESCAPE,
225
- c
226
- ],
227
- subLanguage: "xml"
228
- }
229
- }, T = {
230
- begin: ".?css`",
231
- end: "",
232
- starts: {
233
- end: "`",
234
- returnEnd: !1,
235
- contains: [
236
- e.BACKSLASH_ESCAPE,
237
- c
238
- ],
239
- subLanguage: "css"
240
- }
241
- }, r = {
242
- begin: ".?gql`",
243
- end: "",
244
- starts: {
245
- end: "`",
246
- returnEnd: !1,
247
- contains: [
248
- e.BACKSLASH_ESCAPE,
249
- c
250
- ],
251
- subLanguage: "graphql"
252
- }
253
- }, m = {
254
- className: "string",
255
- begin: "`",
256
- end: "`",
257
- contains: [
258
- e.BACKSLASH_ESCAPE,
259
- c
260
- ]
261
- }, E = {
262
- className: "comment",
263
- variants: [
264
- e.COMMENT(
265
- /\/\*\*(?!\/)/,
266
- "\\*/",
267
- {
268
- relevance: 0,
269
- contains: [
270
- {
271
- begin: "(?=@[A-Za-z]+)",
272
- relevance: 0,
273
- contains: [
274
- {
275
- className: "doctag",
276
- begin: "@[A-Za-z]+"
277
- },
278
- {
279
- className: "type",
280
- begin: "\\{",
281
- end: "\\}",
282
- excludeEnd: !0,
283
- excludeBegin: !0,
284
- relevance: 0
285
- },
286
- {
287
- className: "variable",
288
- begin: n + "(?=\\s*(-)|$)",
289
- endsParent: !0,
290
- relevance: 0
291
- },
292
- // eat spaces (not newlines) so we can find
293
- // types or variables
294
- {
295
- begin: /(?=[^\n])\s/,
296
- relevance: 0
297
- }
298
- ]
299
- }
300
- ]
301
- }
302
- ),
303
- e.C_BLOCK_COMMENT_MODE,
304
- e.C_LINE_COMMENT_MODE
305
- ]
306
- }, R = [
307
- e.APOS_STRING_MODE,
308
- e.QUOTE_STRING_MODE,
309
- A,
310
- T,
311
- r,
312
- m,
313
- // Skip numbers when they are part of a variable name
314
- { match: /\$\d+/ },
315
- u
316
- // This is intentional:
317
- // See https://github.com/highlightjs/highlight.js/issues/3288
318
- // hljs.REGEXP_MODE
319
- ];
320
- c.contains = R.concat({
321
- // we need to pair up {} inside our subst to prevent
322
- // it from ending too early by matching another }
323
- begin: /\{/,
324
- end: /\}/,
325
- keywords: o,
326
- contains: [
327
- "self"
328
- ].concat(R)
329
- });
330
- const M = [].concat(E, c.contains), I = M.concat([
331
- // eat recursive parens in sub expressions
332
- {
333
- begin: /(\s*)\(/,
334
- end: /\)/,
335
- keywords: o,
336
- contains: ["self"].concat(M)
337
- }
338
- ]), _ = {
339
- className: "params",
340
- // convert this to negative lookbehind in v12
341
- begin: /(\s*)\(/,
342
- // to match the parms with
343
- end: /\)/,
344
- excludeBegin: !0,
345
- excludeEnd: !0,
346
- keywords: o,
347
- contains: I
348
- }, $ = {
349
- variants: [
350
- // class Car extends vehicle
351
- {
352
- match: [
353
- /class/,
354
- /\s+/,
355
- n,
356
- /\s+/,
357
- /extends/,
358
- /\s+/,
359
- a.concat(n, "(", a.concat(/\./, n), ")*")
360
- ],
361
- scope: {
362
- 1: "keyword",
363
- 3: "title.class",
364
- 5: "keyword",
365
- 7: "title.class.inherited"
366
- }
367
- },
368
- // class Car
369
- {
370
- match: [
371
- /class/,
372
- /\s+/,
373
- n
374
- ],
375
- scope: {
376
- 1: "keyword",
377
- 3: "title.class"
378
- }
379
- }
380
- ]
381
- }, v = {
382
- relevance: 0,
383
- match: a.either(
384
- // Hard coded exceptions
385
- /\bJSON/,
386
- // Float32Array, OutT
387
- /\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,
388
- // CSSFactory, CSSFactoryT
389
- /\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,
390
- // FPs, FPsT
391
- /\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/
392
- // P
393
- // single letters are not highlighted
394
- // BLAH
395
- // this will be flagged as a UPPER_CASE_CONSTANT instead
396
- ),
397
- className: "title.class",
398
- keywords: {
399
- _: [
400
- // se we still get relevance credit for JS library classes
401
- ...D,
402
- ...h
403
- ]
404
- }
405
- }, F = {
406
- label: "use_strict",
407
- className: "meta",
408
- relevance: 10,
409
- begin: /^\s*['"]use (strict|asm)['"]/
410
- }, G = {
411
- variants: [
412
- {
413
- match: [
414
- /function/,
415
- /\s+/,
416
- n,
417
- /(?=\s*\()/
418
- ]
419
- },
420
- // anonymous function
421
- {
422
- match: [
423
- /function/,
424
- /\s*(?=\()/
425
- ]
426
- }
427
- ],
428
- className: {
429
- 1: "keyword",
430
- 3: "title.function"
431
- },
432
- label: "func.def",
433
- contains: [_],
434
- illegal: /%/
435
- }, Z = {
436
- relevance: 0,
437
- match: /\b[A-Z][A-Z_0-9]+\b/,
438
- className: "variable.constant"
439
- };
440
- function z(s) {
441
- return a.concat("(?!", s.join("|"), ")");
442
- }
443
- const K = {
444
- match: a.concat(
445
- /\b/,
446
- z([
447
- ...B,
448
- "super",
449
- "import",
450
- "await"
451
- ].map((s) => `${s}\\s*\\(`)),
452
- n,
453
- a.lookahead(/\s*\(/)
454
- ),
455
- className: "title.function",
456
- relevance: 0
457
- }, H = {
458
- begin: a.concat(/\./, a.lookahead(
459
- a.concat(n, /(?![0-9A-Za-z$_(])/)
460
- )),
461
- end: n,
462
- excludeBegin: !0,
463
- keywords: "prototype",
464
- className: "property",
465
- relevance: 0
466
- }, Y = {
467
- match: [
468
- /get|set/,
469
- /\s+/,
470
- n,
471
- /(?=\()/
472
- ],
473
- className: {
474
- 1: "keyword",
475
- 3: "title.function"
476
- },
477
- contains: [
478
- {
479
- // eat to avoid empty params
480
- begin: /\(\)/
481
- },
482
- _
483
- ]
484
- }, w = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", W = {
485
- match: [
486
- /const|var|let/,
487
- /\s+/,
488
- n,
489
- /\s*/,
490
- /=\s*/,
491
- /(async\s*)?/,
492
- // async is optional
493
- a.lookahead(w)
494
- ],
495
- keywords: "async",
496
- className: {
497
- 1: "keyword",
498
- 3: "title.function"
499
- },
500
- contains: [
501
- _
502
- ]
503
- };
504
- return {
505
- name: "JavaScript",
506
- aliases: ["js", "jsx", "mjs", "cjs"],
507
- keywords: o,
508
- // this will be extended by TypeScript
509
- exports: { PARAMS_CONTAINS: I, CLASS_REFERENCE: v },
510
- illegal: /#(?![$_A-Za-z])/,
511
- contains: [
512
- e.SHEBANG({
513
- label: "shebang",
514
- binary: "node",
515
- relevance: 5
516
- }),
517
- F,
518
- e.APOS_STRING_MODE,
519
- e.QUOTE_STRING_MODE,
520
- A,
521
- T,
522
- r,
523
- m,
524
- E,
525
- // Skip numbers when they are part of a variable name
526
- { match: /\$\d+/ },
527
- u,
528
- v,
529
- {
530
- scope: "attr",
531
- match: n + a.lookahead(":"),
532
- relevance: 0
533
- },
534
- W,
535
- {
536
- // "value" container
537
- begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
538
- keywords: "return throw case",
539
- relevance: 0,
540
- contains: [
541
- E,
542
- e.REGEXP_MODE,
543
- {
544
- className: "function",
545
- // we have to count the parens to make sure we actually have the
546
- // correct bounding ( ) before the =>. There could be any number of
547
- // sub-expressions inside also surrounded by parens.
548
- begin: w,
549
- returnBegin: !0,
550
- end: "\\s*=>",
551
- contains: [
552
- {
553
- className: "params",
554
- variants: [
555
- {
556
- begin: e.UNDERSCORE_IDENT_RE,
557
- relevance: 0
558
- },
559
- {
560
- className: null,
561
- begin: /\(\s*\)/,
562
- skip: !0
563
- },
564
- {
565
- begin: /(\s*)\(/,
566
- end: /\)/,
567
- excludeBegin: !0,
568
- excludeEnd: !0,
569
- keywords: o,
570
- contains: I
571
- }
572
- ]
573
- }
574
- ]
575
- },
576
- {
577
- // could be a comma delimited list of params to a function call
578
- begin: /,/,
579
- relevance: 0
580
- },
581
- {
582
- match: /\s+/,
583
- relevance: 0
584
- },
585
- {
586
- // JSX
587
- variants: [
588
- { begin: b.begin, end: b.end },
589
- { match: p },
590
- {
591
- begin: i.begin,
592
- // we carefully check the opening tag to see if it truly
593
- // is a tag and not a false positive
594
- "on:begin": i.isTrulyOpeningTag,
595
- end: i.end
596
- }
597
- ],
598
- subLanguage: "xml",
599
- contains: [
600
- {
601
- begin: i.begin,
602
- end: i.end,
603
- skip: !0,
604
- contains: ["self"]
605
- }
606
- ]
607
- }
608
- ]
609
- },
610
- G,
611
- {
612
- // prevent this from getting swallowed up by function
613
- // since they appear "function like"
614
- beginKeywords: "while if switch catch for"
615
- },
616
- {
617
- // we have to count the parens to make sure we actually have the correct
618
- // bounding ( ). There could be any number of sub-expressions inside
619
- // also surrounded by parens.
620
- begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
621
- // end parens
622
- returnBegin: !0,
623
- label: "func.def",
624
- contains: [
625
- _,
626
- e.inherit(e.TITLE_MODE, { begin: n, className: "title.function" })
627
- ]
628
- },
629
- // catch ... so it won't trigger the property rule below
630
- {
631
- match: /\.\.\./,
632
- relevance: 0
633
- },
634
- H,
635
- // hack: prevents detection of keywords in some circumstances
636
- // .keyword()
637
- // $keyword = x
638
- {
639
- match: "\\$" + n,
640
- relevance: 0
641
- },
642
- {
643
- match: [/\bconstructor(?=\s*\()/],
644
- className: { 1: "title.function" },
645
- contains: [_]
646
- },
647
- K,
648
- Z,
649
- $,
650
- Y,
651
- {
652
- match: /\$[(.]/
653
- // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
654
- }
655
- ]
656
- };
657
- }
658
- function X(e) {
659
- const a = e.regex, t = J(e), n = y, b = [
660
- "any",
661
- "void",
662
- "number",
663
- "boolean",
664
- "string",
665
- "object",
666
- "never",
667
- "symbol",
668
- "bigint",
669
- "unknown"
670
- ], p = {
671
- begin: [
672
- /namespace/,
673
- /\s+/,
674
- e.IDENT_RE
675
- ],
676
- beginScope: {
677
- 1: "keyword",
678
- 3: "title.class"
679
- }
680
- }, i = {
681
- beginKeywords: "interface",
682
- end: /\{/,
683
- excludeEnd: !0,
684
- keywords: {
685
- keyword: "interface extends",
686
- built_in: b
687
- },
688
- contains: [t.exports.CLASS_REFERENCE]
689
- }, o = {
690
- className: "meta",
691
- relevance: 10,
692
- begin: /^\s*['"]use strict['"]/
693
- }, N = [
694
- "type",
695
- // "namespace",
696
- "interface",
697
- "public",
698
- "private",
699
- "protected",
700
- "implements",
701
- "declare",
702
- "abstract",
703
- "readonly",
704
- "enum",
705
- "override",
706
- "satisfies"
707
- ], l = {
708
- $pattern: y,
709
- keyword: x.concat(N),
710
- literal: k,
711
- built_in: P.concat(b),
712
- "variable.language": U
713
- }, g = {
714
- className: "meta",
715
- begin: "@" + n
716
- }, u = (r, m, C) => {
717
- const E = r.contains.findIndex((R) => R.label === m);
718
- if (E === -1)
719
- throw new Error("can not find mode to replace");
720
- r.contains.splice(E, 1, C);
721
- };
722
- Object.assign(t.keywords, l), t.exports.PARAMS_CONTAINS.push(g);
723
- const c = t.contains.find((r) => r.scope === "attr"), A = Object.assign(
724
- {},
725
- c,
726
- { match: a.concat(n, a.lookahead(/\s*\?:/)) }
727
- );
728
- t.exports.PARAMS_CONTAINS.push([
729
- t.exports.CLASS_REFERENCE,
730
- // class reference for highlighting the params types
731
- c,
732
- // highlight the params key
733
- A
734
- // Added for optional property assignment highlighting
735
- ]), t.contains = t.contains.concat([
736
- g,
737
- p,
738
- i,
739
- A
740
- // Added for optional property assignment highlighting
741
- ]), u(t, "shebang", e.SHEBANG()), u(t, "use_strict", o);
742
- const T = t.contains.find((r) => r.label === "func.def");
743
- return T.relevance = 0, Object.assign(t, {
744
- name: "TypeScript",
745
- aliases: [
746
- "ts",
747
- "tsx",
748
- "mts",
749
- "cts"
750
- ]
751
- }), t;
752
- }
753
- export {
754
- X as default
755
- };