xmlui 0.9.84 → 0.9.87

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 (73) hide show
  1. package/dist/lib/{index-BSCmaXIB.mjs → index-D0LUEbCn.mjs} +17107 -21602
  2. package/dist/lib/index.css +1 -1
  3. package/dist/lib/{initMock-CSQJ_OLe.mjs → initMock-BW2s2XBp.mjs} +1 -1
  4. package/dist/lib/syntax-monaco.d.ts +64 -0
  5. package/dist/lib/syntax-monaco.mjs +639 -0
  6. package/dist/lib/syntax-textmate.d.ts +2127 -0
  7. package/dist/lib/syntax-textmate.mjs +2491 -0
  8. package/dist/lib/xmlui-parser.d.ts +7 -1
  9. package/dist/lib/xmlui.d.ts +8 -2
  10. package/dist/lib/xmlui.mjs +1 -1
  11. package/dist/metadata/{collectedComponentMetadata-CTbfFAXY.mjs → collectedComponentMetadata-BoCXx9Ig.mjs} +19025 -23505
  12. package/dist/metadata/{initMock-MSZ7AoaC.mjs → initMock-CMaV1kVp.mjs} +1 -1
  13. package/dist/metadata/style.css +1 -1
  14. package/dist/metadata/xmlui-metadata.mjs +1 -1
  15. package/dist/metadata/xmlui-metadata.umd.js +138 -285
  16. package/dist/scripts/package.json +19 -2
  17. package/dist/scripts/src/components/APICall/APICall.js +4 -0
  18. package/dist/scripts/src/components/Accordion/Accordion.js +14 -4
  19. package/dist/scripts/src/components/AppState/AppState.js +7 -2
  20. package/dist/scripts/src/components/AutoComplete/AutoComplete.js +17 -3
  21. package/dist/scripts/src/components/Bookmark/Bookmark.js +1 -0
  22. package/dist/scripts/src/components/Carousel/Carousel.js +23 -5
  23. package/dist/scripts/src/components/Checkbox/Checkbox.js +15 -5
  24. package/dist/scripts/src/components/ColorPicker/ColorPicker.js +15 -3
  25. package/dist/scripts/src/components/ComponentProvider.js +0 -4
  26. package/dist/scripts/src/components/DatePicker/DatePicker.js +15 -3
  27. package/dist/scripts/src/components/DropdownMenu/DropdownMenu.js +8 -1
  28. package/dist/scripts/src/components/DropdownMenu/DropdownMenuNative.js +1 -0
  29. package/dist/scripts/src/components/ExpandableItem/ExpandableItem.js +16 -4
  30. package/dist/scripts/src/components/FileInput/FileInput.js +19 -6
  31. package/dist/scripts/src/components/Form/Form.js +12 -3
  32. package/dist/scripts/src/components/FormItem/FormItem.js +16 -5
  33. package/dist/scripts/src/components/FormItem/ItemWithLabel.js +5 -2
  34. package/dist/scripts/src/components/FormItem/Validations.js +4 -1
  35. package/dist/scripts/src/components/Heading/Heading.js +6 -0
  36. package/dist/scripts/src/components/Heading/HeadingNative.js +11 -1
  37. package/dist/scripts/src/components/HelloWorld/HelloWorld.js +8 -2
  38. package/dist/scripts/src/components/List/List.js +22 -4
  39. package/dist/scripts/src/components/Markdown/parse-binding-expr.js +27 -15
  40. package/dist/scripts/src/components/ModalDialog/ModalDialog.js +14 -5
  41. package/dist/scripts/src/components/NumberBox/NumberBox.js +12 -3
  42. package/dist/scripts/src/components/NumberBox/NumberBox2.js +12 -3
  43. package/dist/scripts/src/components/Queue/Queue.js +38 -15
  44. package/dist/scripts/src/components/Select/Select.js +19 -4
  45. package/dist/scripts/src/components/Slider/Slider.js +15 -3
  46. package/dist/scripts/src/components/Switch/Switch.js +13 -3
  47. package/dist/scripts/src/components/Table/Table.js +26 -8
  48. package/dist/scripts/src/components/Tabs/Tabs.js +4 -1
  49. package/dist/scripts/src/components/TextArea/TextArea.js +8 -2
  50. package/dist/scripts/src/components/TextBox/TextBox.js +16 -4
  51. package/dist/scripts/src/components/Toggle/Toggle.js +9 -2
  52. package/dist/scripts/src/components/metadata-helpers.js +3 -3
  53. package/dist/standalone/xmlui-standalone.es.d.ts +9 -3
  54. package/dist/standalone/xmlui-standalone.umd.js +246 -246
  55. package/package.json +19 -2
  56. package/src/syntax/monaco/grammar.monacoLanguage.ts +283 -0
  57. package/src/syntax/monaco/index.ts +4 -0
  58. package/src/syntax/monaco/xmlui-dark.ts +24 -0
  59. package/src/syntax/monaco/xmlui-light.ts +24 -0
  60. package/src/syntax/monaco/xmluiscript.monacoLanguage.ts +337 -0
  61. package/src/syntax/textMate/index.ts +6 -0
  62. package/src/syntax/textMate/xmlui-dark.json +631 -0
  63. package/src/syntax/textMate/xmlui-light.json +565 -0
  64. package/src/syntax/textMate/xmlui.json +564 -0
  65. package/src/syntax/textMate/xmlui.tmLanguage.json +341 -0
  66. package/dist/lib/core-CvFpTAHi.mjs +0 -5775
  67. package/dist/lib/wasm-DQxwEHae.mjs +0 -7
  68. package/dist/metadata/core-D3puiNN6.mjs +0 -5771
  69. package/dist/metadata/wasm-DQxwEHae.mjs +0 -7
  70. package/dist/scripts/src/components-core/XmluiCodeHighlighter.js +0 -109
  71. package/dist/scripts/src/syntax/grammar.tmLanguage.json +0 -341
  72. package/dist/scripts/src/syntax/textMate/xmlui-dark.json +0 -631
  73. package/dist/scripts/src/syntax/textMate/xmlui-light.json +0 -565
@@ -0,0 +1,639 @@
1
+ const e = {
2
+ id: "xmlui",
3
+ config: {
4
+ comments: {
5
+ blockComment: ["<!--", "-->"]
6
+ },
7
+ brackets: [["<", ">"]],
8
+ autoClosingPairs: [
9
+ { open: "<", close: ">" },
10
+ { open: "'", close: "'" },
11
+ { open: '"', close: '"' },
12
+ { open: "`", close: "`" }
13
+ ],
14
+ surroundingPairs: [
15
+ { open: "<", close: ">" },
16
+ { open: "'", close: "'" },
17
+ { open: '"', close: '"' },
18
+ { open: "`", close: "`" }
19
+ ]
20
+ },
21
+ language: {
22
+ defaultToken: "",
23
+ tokenPostfix: ".xmlui",
24
+ ignoreCase: !1,
25
+ identifier: /[a-zA-Z$_][-\w.$]*/,
26
+ tokenizer: {
27
+ root: [
28
+ { include: "@commentStart" },
29
+ { include: "@helperTag" },
30
+ { include: "@componentTagStart" },
31
+ { include: "@escapeCharacter" },
32
+ { include: "@textWithBindingExpr" },
33
+ { include: "@entity" },
34
+ { include: "@cdataStart" }
35
+ ],
36
+ helperTag: [
37
+ { include: "@scriptTagStart" },
38
+ { include: "@eventTagStart" },
39
+ { include: "@apiTagStart" },
40
+ { include: "@methodTagStart" },
41
+ { include: "@propOrVarTagStart" }
42
+ ],
43
+ eventTagStart: [
44
+ [
45
+ /(<)((?:[a-zA-Z_][\w\.\-]*?:)?)(event)/,
46
+ ["delimiter.angle", "namespace", { token: "tag-event", next: "@eventTag" }]
47
+ ]
48
+ ],
49
+ eventTag: [
50
+ { include: "@commentStart" },
51
+ { include: "@valueAttributeScriptInsideStart" },
52
+ { include: "@attributeStart" },
53
+ [/\/>/, "delimiter.angle", "@pop"],
54
+ [
55
+ /(<\/)(event)(\s*>)/,
56
+ ["delimiter.angle", "tag-event", { token: "delimiter.angle", next: "@pop" }]
57
+ ],
58
+ [/>/, { token: "delimiter.angle", next: "@eventTagContent" }]
59
+ ],
60
+ eventTagContent: [
61
+ { include: "commentStart" },
62
+ { include: "componentTagStart" },
63
+ [
64
+ /[^<]/,
65
+ { token: "@rematch", next: "@eventTagScriptContent", nextEmbedded: "xmluiscript" }
66
+ ],
67
+ [/<\/event\s*>/, { token: "@rematch", next: "@pop" }]
68
+ ],
69
+ eventTagScriptContent: [
70
+ [/<\/event\s*>/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
71
+ [/[^<]/, ""]
72
+ ],
73
+ methodTagStart: [
74
+ [
75
+ /(<)((?:[a-zA-Z_][\w\.\-]*?:)?)(method)/,
76
+ ["delimiter.angle", "namespace", { token: "tag-helper", next: "@methodTag" }]
77
+ ]
78
+ ],
79
+ methodTag: [
80
+ { include: "@commentStart" },
81
+ { include: "@valueAttributeScriptInsideStart" },
82
+ { include: "@attributeStart" },
83
+ [/\/>/, "delimiter.angle", "@pop"],
84
+ [
85
+ />/,
86
+ {
87
+ token: "delimiter.angle",
88
+ next: "@methodTagScriptContent",
89
+ nextEmbedded: "xmluiscript"
90
+ }
91
+ ],
92
+ [
93
+ /(<\/)(method)(\s*>)/,
94
+ ["delimiter.angle", "tag-helper", { token: "delimiter.angle", next: "@pop" }]
95
+ ]
96
+ ],
97
+ methodTagScriptContent: [
98
+ [/<\/method\s*>/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
99
+ [/[^</]/, ""]
100
+ ],
101
+ apiTagStart: [
102
+ [
103
+ /(<)((?:[a-zA-Z_][\w\.\-]*?:)?)(api)/,
104
+ ["delimiter.angle", "namespace", { token: "tag-helper", next: "@apiTag" }]
105
+ ]
106
+ ],
107
+ apiTag: [
108
+ { include: "@commentStart" },
109
+ { include: "@valueAttributeScriptInsideStart" },
110
+ { include: "@attributeStart" },
111
+ [/\/>/, "delimiter.angle", "@pop"],
112
+ [
113
+ />/,
114
+ { token: "delimiter.angle", next: "@apiTagScriptContent", nextEmbedded: "xmluiscript" }
115
+ ],
116
+ [
117
+ /(<\/)(api)(\s*>)/,
118
+ ["delimiter.angle", "tag-helper", { token: "delimiter.angle", next: "@pop" }]
119
+ ]
120
+ ],
121
+ apiTagScriptContent: [
122
+ [/<\/api\s*>/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
123
+ [/[^</]/, ""]
124
+ ],
125
+ valueAttributeScriptInsideStart: [
126
+ [
127
+ /(^|\s+)(value)(\s*=)(['\"`])/,
128
+ [
129
+ "",
130
+ "attribute",
131
+ "operators",
132
+ {
133
+ cases: {
134
+ "'": { token: "string", next: "@singleQuotedScript", nextEmbedded: "xmluiscript" },
135
+ '"': { token: "string", next: "@doubleQuotedScript", nextEmbedded: "xmluiscript" },
136
+ "`": {
137
+ token: "string",
138
+ next: "@backtickQuotedScript",
139
+ nextEmbedded: "xmluiscript"
140
+ }
141
+ }
142
+ }
143
+ ]
144
+ ]
145
+ ],
146
+ scriptTagStart: [
147
+ [
148
+ /(<)(script\s*)(>)/,
149
+ [
150
+ "delimiter.angle",
151
+ "tag-script",
152
+ { token: "delimiter.angle", nextEmbedded: "xmluiscript", next: "@scriptTag" }
153
+ ]
154
+ ],
155
+ [/(<\/)(script\s*)(>)/, ["delimiter.angle", "tag-script", "delimiter.angle"]]
156
+ ],
157
+ scriptTag: [
158
+ [/<\/script>/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
159
+ [/[^<]+/, ""]
160
+ ],
161
+ propOrVarTagStart: [
162
+ [
163
+ /(<\/?)((?:[a-zA-Z_][\w\.\-]*?:)?)((?:property)|(?:prop)|(?:var))/,
164
+ ["delimiter.angle", "namespace", { token: "tag-helper", next: "@propOrVarTag" }]
165
+ ]
166
+ ],
167
+ propOrVarTag: [
168
+ [/\/?>/, { token: "delimiter.angle", next: "@pop" }],
169
+ { include: "@commentStart" },
170
+ { include: "@attributeStart" }
171
+ ],
172
+ componentTagStart: [
173
+ [
174
+ /(\s*<\/?)((?:[a-zA-Z_][\w\.\-]*?:)?)([A-Z][\w\.\-]*)/,
175
+ ["delimiter.angle", "namespace", { token: "tag-component", next: "@componentTag" }]
176
+ ]
177
+ ],
178
+ componentTag: [
179
+ [/\/?>/, { token: "delimiter.angle", next: "@pop" }],
180
+ { include: "@commentStart" },
181
+ { include: "@eventHandler" },
182
+ { include: "@attributeStart" }
183
+ ],
184
+ eventHandler: [
185
+ [
186
+ /(^|\s+)(on[A-Z][-\w.]*)(\s*=)(['\"`])/,
187
+ [
188
+ "",
189
+ "attribute",
190
+ "operators",
191
+ {
192
+ cases: {
193
+ "'": { token: "string", next: "@singleQuotedScript", nextEmbedded: "xmluiscript" },
194
+ '"': { token: "string", next: "@doubleQuotedScript", nextEmbedded: "xmluiscript" },
195
+ "`": {
196
+ token: "string",
197
+ next: "@backtickQuotedScript",
198
+ nextEmbedded: "xmluiscript"
199
+ }
200
+ }
201
+ }
202
+ ]
203
+ ]
204
+ ],
205
+ doubleQuotedScript: [
206
+ [/"/, { token: "string", next: "@pop", nextEmbedded: "@pop" }],
207
+ [/[^"]/, ""]
208
+ ],
209
+ singleQuotedScript: [
210
+ [/'/, { token: "string", next: "@pop", nextEmbedded: "@pop" }],
211
+ [/[^']/, ""]
212
+ ],
213
+ backtickQuotedScript: [
214
+ [/`/, { token: "string", next: "@pop", nextEmbedded: "@pop" }],
215
+ [/[^`]/, ""]
216
+ ],
217
+ attributeStart: [
218
+ [
219
+ /(^|\s+)(@identifier(?::@identifier)?)(\s*=\s*)(['\"`])/,
220
+ [
221
+ "",
222
+ "attribute",
223
+ "operators",
224
+ {
225
+ cases: {
226
+ "'": { token: "string", next: "@singleQuotedString" },
227
+ '"': { token: "string", next: "@doubleQuotedString" },
228
+ "`": { token: "string", next: "@backtickQuotedString" }
229
+ }
230
+ }
231
+ ]
232
+ ],
233
+ [
234
+ /(^|\s+)(@identifier(?::@identifier)?)(\s*=\s*)(@identifier)/,
235
+ ["", "attribute", "operators", "string"]
236
+ ],
237
+ [/(^|\s+)(@identifier(?::@identifier)?)/, ["", "attribute"]]
238
+ ],
239
+ singleQuotedString: [
240
+ [/'/, "string", "@pop"],
241
+ { include: "@textWithBindingExpr" },
242
+ [/[^']/, "string"]
243
+ ],
244
+ doubleQuotedString: [
245
+ [/"/, "string", "@pop"],
246
+ { include: "@textWithBindingExpr" },
247
+ [/[^"]/, "string"]
248
+ ],
249
+ backtickQuotedString: [
250
+ [/`/, "string", "@pop"],
251
+ { include: "@textWithBindingExpr" },
252
+ [/[^`]/, "string"]
253
+ ],
254
+ textWithBindingExpr: [
255
+ { include: "@escapeCharacter" },
256
+ { include: "@entity" },
257
+ [/{/, { token: "delimiter.curly", next: "@bindingExpr", nextEmbedded: "xmluiscript" }]
258
+ ],
259
+ bindingExpr: [
260
+ [/}/, { token: "delimiter.curly", next: "@pop", nextEmbedded: "@pop" }],
261
+ [/[^}]+/, ""]
262
+ ],
263
+ cdataStart: [
264
+ [
265
+ /(<!\[)(CDATA)(\[)/,
266
+ ["delimiter.angle", "tag-cdata", { token: "delimiter.angle", next: "@cdata" }]
267
+ ]
268
+ ],
269
+ cdata: [
270
+ [/]]>/, "delimiter.angle", "@pop"],
271
+ [/./, "string"]
272
+ ],
273
+ commentStart: [[/<!--/, "comment", "@comment"]],
274
+ comment: [
275
+ [/[^<\-]+/, "comment.content"],
276
+ [/-->/, { token: "comment", next: "@pop" }],
277
+ [/[<\-]/, "comment.content"]
278
+ ],
279
+ escapeCharacter: [[/\\S/, "string.escape"]],
280
+ entity: [[/&(amp|lt|gt|quot|apos|nbsp);/, "string.escape"]]
281
+ }
282
+ }
283
+ }, t = {
284
+ id: "xmluiscript",
285
+ config: {
286
+ wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
287
+ comments: {
288
+ lineComment: "//",
289
+ blockComment: ["/*", "*/"]
290
+ },
291
+ brackets: [
292
+ ["{", "}"],
293
+ ["[", "]"],
294
+ ["(", ")"]
295
+ ],
296
+ onEnterRules: [
297
+ {
298
+ // e.g. /** | */
299
+ beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
300
+ afterText: /^\s*\*\/$/,
301
+ action: {
302
+ // numeric repr of indentAction: languages.IndentAction.IndentOutdent, but without the "monaco-core" package
303
+ indentAction: 2,
304
+ appendText: " * "
305
+ }
306
+ },
307
+ {
308
+ // e.g. /** ...|
309
+ beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
310
+ action: {
311
+ // numeric repr of indentAction: languages.IndentAction.None, but without the "monaco-core" package
312
+ indentAction: 0,
313
+ appendText: " * "
314
+ }
315
+ },
316
+ {
317
+ // e.g. * ...|
318
+ beforeText: /^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,
319
+ action: {
320
+ // numeric repr of indentAction: languages.IndentAction.None, but without the "monaco-core" package
321
+ indentAction: 0,
322
+ appendText: "* "
323
+ }
324
+ },
325
+ {
326
+ // e.g. */|
327
+ beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/,
328
+ action: {
329
+ // numeric repr of indentAction: languages.IndentAction.None, but without the "monaco-core" package
330
+ indentAction: 0,
331
+ removeText: 1
332
+ }
333
+ }
334
+ ],
335
+ autoClosingPairs: [
336
+ { open: "{", close: "}" },
337
+ { open: "[", close: "]" },
338
+ { open: "(", close: ")" },
339
+ { open: '"', close: '"', notIn: ["string"] },
340
+ { open: "'", close: "'", notIn: ["string", "comment"] },
341
+ { open: "`", close: "`", notIn: ["string", "comment"] },
342
+ { open: "/**", close: " */", notIn: ["string"] }
343
+ ],
344
+ folding: {
345
+ markers: {
346
+ start: new RegExp("^\\s*//\\s*#?region\\b"),
347
+ end: new RegExp("^\\s*//\\s*#?endregion\\b")
348
+ }
349
+ }
350
+ },
351
+ language: {
352
+ // Set defaultToken to invalid to see what you do not tokenize yet
353
+ defaultToken: "invalid",
354
+ tokenPostfix: ".xs",
355
+ typeKeywords: [],
356
+ keywords: [
357
+ "break",
358
+ "case",
359
+ "catch",
360
+ "class",
361
+ "continue",
362
+ "const",
363
+ "constructor",
364
+ "debugger",
365
+ "default",
366
+ "delete",
367
+ "do",
368
+ "else",
369
+ "export",
370
+ "extends",
371
+ "false",
372
+ "finally",
373
+ "for",
374
+ "from",
375
+ "function",
376
+ "get",
377
+ "if",
378
+ "import",
379
+ "in",
380
+ "instanceof",
381
+ "let",
382
+ "new",
383
+ "null",
384
+ "return",
385
+ "set",
386
+ "static",
387
+ "super",
388
+ "switch",
389
+ "symbol",
390
+ "this",
391
+ "throw",
392
+ "true",
393
+ "try",
394
+ "typeof",
395
+ "undefined",
396
+ "var",
397
+ "void",
398
+ "while",
399
+ "with",
400
+ "yield",
401
+ "async",
402
+ "await",
403
+ "of"
404
+ ],
405
+ operators: [
406
+ "<=",
407
+ ">=",
408
+ "==",
409
+ "!=",
410
+ "===",
411
+ "!==",
412
+ "=>",
413
+ "+",
414
+ "-",
415
+ "**",
416
+ "*",
417
+ "/",
418
+ "%",
419
+ "++",
420
+ "--",
421
+ "<<",
422
+ "</",
423
+ ">>",
424
+ ">>>",
425
+ "&",
426
+ "|",
427
+ "^",
428
+ "!",
429
+ "~",
430
+ "&&",
431
+ "||",
432
+ "??",
433
+ "?",
434
+ ":",
435
+ "=",
436
+ "+=",
437
+ "-=",
438
+ "*=",
439
+ "**=",
440
+ "/=",
441
+ "%=",
442
+ "<<=",
443
+ ">>=",
444
+ ">>>=",
445
+ "&=",
446
+ "|=",
447
+ "^=",
448
+ "@"
449
+ ],
450
+ // we include these common regular expressions
451
+ symbols: /[=><!~?:&|+\-*\/\^%]+/,
452
+ escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
453
+ digits: /\d+(_+\d+)*/,
454
+ octaldigits: /[0-7]+(_+[0-7]+)*/,
455
+ binarydigits: /[0-1]+(_+[0-1]+)*/,
456
+ hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
457
+ regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
458
+ regexpesc: /\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,
459
+ // The main tokenizer for our languages
460
+ tokenizer: {
461
+ root: [[/[{}]/, "delimiter.bracket"], { include: "common" }],
462
+ common: [
463
+ // identifiers and keywords
464
+ [
465
+ /#?[a-z_$][\w$]*/,
466
+ {
467
+ cases: {
468
+ "@keywords": "keyword",
469
+ "@default": "identifier"
470
+ }
471
+ }
472
+ ],
473
+ [/[A-Z][\w\$]*/, "type.identifier"],
474
+ // to show class names nicely
475
+ // [/[A-Z][\w\$]*/, 'identifier'],
476
+ // whitespace
477
+ { include: "@whitespace" },
478
+ // regular expression: ensure it is terminated before beginning (otherwise it is an opeator)
479
+ [
480
+ /\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,
481
+ { token: "regexp", bracket: "@open", next: "@regexp" }
482
+ ],
483
+ // delimiters and operators
484
+ [/[()\[\]]/, "@brackets"],
485
+ [/[<>](?!@symbols)/, "@brackets"],
486
+ [/!(?=([^=]|$))/, "delimiter"],
487
+ [
488
+ /@symbols/,
489
+ {
490
+ cases: {
491
+ "@operators": "delimiter",
492
+ "@default": ""
493
+ }
494
+ }
495
+ ],
496
+ // numbers
497
+ [/(@digits)[eE]([\-+]?(@digits))?/, "number.float"],
498
+ [/(@digits)\.(@digits)([eE][\-+]?(@digits))?/, "number.float"],
499
+ [/0[xX](@hexdigits)n?/, "number.hex"],
500
+ [/0[oO]?(@octaldigits)n?/, "number.octal"],
501
+ [/0[bB](@binarydigits)n?/, "number.binary"],
502
+ [/(@digits)n?/, "number"],
503
+ // delimiter: after number because of .\d floats
504
+ [/[;,.]/, "delimiter"],
505
+ // strings
506
+ [/"([^"\\]|\\.)*$/, "string.invalid"],
507
+ // non-teminated string
508
+ [/'([^'\\]|\\.)*$/, "string.invalid"],
509
+ // non-teminated string
510
+ [/"/, "string", "@string_double"],
511
+ [/'/, "string", "@string_single"],
512
+ [/`/, "string", "@string_backtick"]
513
+ ],
514
+ whitespace: [
515
+ [/[ \t\r\n]+/, ""],
516
+ [/\/\*\*(?!\/)/, "comment.doc", "@jsdoc"],
517
+ [/\/\*/, "comment", "@comment"],
518
+ [/\/\/.*$/, "comment"]
519
+ ],
520
+ comment: [
521
+ [/[^\/*]+/, "comment"],
522
+ [/\*\//, "comment", "@pop"],
523
+ [/[\/*]/, "comment"]
524
+ ],
525
+ jsdoc: [
526
+ [/[^\/*]+/, "comment.doc"],
527
+ [/\*\//, "comment.doc", "@pop"],
528
+ [/[\/*]/, "comment.doc"]
529
+ ],
530
+ // We match regular expression quite precisely
531
+ regexp: [
532
+ [
533
+ /(\{)(\d+(?:,\d*)?)(\})/,
534
+ ["regexp.escape.control", "regexp.escape.control", "regexp.escape.control"]
535
+ ],
536
+ [
537
+ /(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,
538
+ ["regexp.escape.control", { token: "regexp.escape.control", next: "@regexrange" }]
539
+ ],
540
+ [/(\()(\?:|\?=|\?!)/, ["regexp.escape.control", "regexp.escape.control"]],
541
+ [/[()]/, "regexp.escape.control"],
542
+ [/@regexpctl/, "regexp.escape.control"],
543
+ [/[^\\\/]/, "regexp"],
544
+ [/@regexpesc/, "regexp.escape"],
545
+ [/\\\./, "regexp.invalid"],
546
+ [
547
+ /(\/)([dgimsuy]*)/,
548
+ [{ token: "regexp", bracket: "@close", next: "@pop" }, "keyword.other"]
549
+ ]
550
+ ],
551
+ regexrange: [
552
+ [/-/, "regexp.escape.control"],
553
+ [/\^/, "regexp.invalid"],
554
+ [/@regexpesc/, "regexp.escape"],
555
+ [/[^\]]/, "regexp"],
556
+ [
557
+ /\]/,
558
+ {
559
+ token: "regexp.escape.control",
560
+ next: "@pop",
561
+ bracket: "@close"
562
+ }
563
+ ]
564
+ ],
565
+ string_double: [
566
+ [/[^\\"]+/, "string"],
567
+ [/@escapes/, "string.escape"],
568
+ [/\\./, "string.escape.invalid"],
569
+ [/"/, "string", "@pop"]
570
+ ],
571
+ string_single: [
572
+ [/[^\\']+/, "string"],
573
+ [/@escapes/, "string.escape"],
574
+ [/\\./, "string.escape.invalid"],
575
+ [/'/, "string", "@pop"]
576
+ ],
577
+ string_backtick: [
578
+ [/\$\{/, { token: "delimiter.bracket", next: "@bracketCounting" }],
579
+ [/[^\\`$]+/, "string"],
580
+ [/@escapes/, "string.escape"],
581
+ [/\\./, "string.escape.invalid"],
582
+ [/`/, "string", "@pop"]
583
+ ],
584
+ bracketCounting: [
585
+ [/\{/, "delimiter.bracket", "@bracketCounting"],
586
+ [/\}/, "delimiter.bracket", "@pop"],
587
+ { include: "common" }
588
+ ]
589
+ }
590
+ }
591
+ }, n = {
592
+ base: "vs-dark",
593
+ inherit: !0,
594
+ rules: [
595
+ { token: "comment", foreground: "#9296a9" },
596
+ { token: "comment.content", foreground: "#9296a9", fontStyle: "italic" },
597
+ { token: "tag-component", foreground: "#FE6BAD" },
598
+ { token: "tag-event", foreground: "#80A6F8" },
599
+ { token: "tag-helper", foreground: "#80A6F8" },
600
+ { token: "attribute", foreground: "#cbd5e1" },
601
+ { token: "operators", foreground: "#cbd5e1" },
602
+ { token: "delimiter.angle", foreground: "#97A7C5" },
603
+ { token: "delimiter.curly", foreground: "#FFD502" },
604
+ { token: "string", foreground: "#7dd3fc" },
605
+ { token: "tag-cdata", foreground: "#5CC1F9" },
606
+ { token: "tag-script", foreground: "#78DBDB" },
607
+ { token: "string.escape", foreground: "#BAF80A" }
608
+ ],
609
+ colors: {
610
+ "editor.background": "#17232b"
611
+ }
612
+ }, r = {
613
+ base: "vs",
614
+ inherit: !0,
615
+ rules: [
616
+ { token: "comment", foreground: "#606060" },
617
+ { token: "comment.content", foreground: "#606060", fontStyle: "italic" },
618
+ { token: "tag-component", foreground: "#B33175" },
619
+ { token: "tag-event", foreground: "#005AE1" },
620
+ { token: "tag-helper", foreground: "#005AE1" },
621
+ { token: "attribute", foreground: "#2D2D2D" },
622
+ { token: "operators", foreground: "#2D2D2D" },
623
+ { token: "delimiter.angle", foreground: "#66748E" },
624
+ { token: "delimiter.curly", foreground: "#F07100", fontStyle: "bold" },
625
+ { token: "string", foreground: "#0074a9" },
626
+ { token: "tag-cdata", foreground: "#079CF1" },
627
+ { token: "tag-script", foreground: "#02A1A1" },
628
+ { token: "string.escape", foreground: "#708C00" }
629
+ ],
630
+ colors: {
631
+ "editor.foreground": "#0D458C"
632
+ }
633
+ };
634
+ export {
635
+ e as xmluiGrammar,
636
+ t as xmluiScriptGrammar,
637
+ n as xmluiThemeDark,
638
+ r as xmluiThemeLight
639
+ };