@kong-ui-public/monaco-editor 0.1.1 → 0.1.2-pr.2609.2ce4f4787.0
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/abap-D0Neqhq6.js +1404 -0
- package/dist/apex-B5LhxkeG.js +332 -0
- package/dist/azcli-BrBH0QTU.js +74 -0
- package/dist/bat-BfzAov64.js +106 -0
- package/dist/bicep-C3bCSWel.js +108 -0
- package/dist/cameligo-sFL5plcd.js +180 -0
- package/dist/clojure-CfeExRz0.js +767 -0
- package/dist/coffee-Xws5K0WL.js +238 -0
- package/dist/cpp-CqOUEpxN.js +395 -0
- package/dist/csharp-DVLiBOZb.js +332 -0
- package/dist/csp-DVFp9bw5.js +59 -0
- package/dist/css-DwARn2R6.js +193 -0
- package/dist/cssMode-BRHW0OjB.js +1577 -0
- package/dist/cypher-uY0Mffat.js +269 -0
- package/dist/dart-D27H-mX_.js +287 -0
- package/dist/dockerfile-CmV85WZK.js +136 -0
- package/dist/ecl--fKn7yzB.js +462 -0
- package/dist/editor.main-BVWEsGeM.js +112170 -0
- package/dist/elixir-DUhH17ON.js +575 -0
- package/dist/flow9-B3Dx2LLe.js +148 -0
- package/dist/freemarker2-DrnILGvf.js +995 -0
- package/dist/fsharp-SyqBfUAR.js +223 -0
- package/dist/go-BbMR2tdT.js +224 -0
- package/dist/graphql-DDJE6tIl.js +157 -0
- package/dist/handlebars-D2vGkdp7.js +425 -0
- package/dist/hcl-YBvpaUqf.js +189 -0
- package/dist/html-D3HI-WFO.js +314 -0
- package/dist/htmlMode-CNpiDTvN.js +1587 -0
- package/dist/ini-Ct73dBtM.js +77 -0
- package/dist/java-C_jlkwoG.js +238 -0
- package/dist/javascript-DLZMP-Wa.js +76 -0
- package/dist/jsonMode-CEQtUpLb.js +2002 -0
- package/dist/julia-D8WE5U1e.js +517 -0
- package/dist/kotlin-Zy9aq5yB.js +259 -0
- package/dist/less-sZ0iHtE8.js +168 -0
- package/dist/lexon-CsdNL29A.js +163 -0
- package/dist/liquid-CnqLoV0A.js +246 -0
- package/dist/lua-C2YJo0zw.js +168 -0
- package/dist/m3-CPLP40SG.js +216 -0
- package/dist/markdown-B1mf5e0R.js +235 -0
- package/dist/mdx-C6hXTTY6.js +171 -0
- package/dist/mips-DA33BZX1.js +204 -0
- package/dist/monaco-editor.es.js +224 -14
- package/dist/monaco-editor.umd.js +1913 -1
- package/dist/msdax-CCYFIQsP.js +381 -0
- package/dist/mysql-hjmIjL-D.js +884 -0
- package/dist/objective-c-RRCpEmqC.js +189 -0
- package/dist/pascal-CeV8XfxB.js +257 -0
- package/dist/pascaligo-IEEGVJAJ.js +170 -0
- package/dist/perl-B5-QbHq_.js +632 -0
- package/dist/pgsql-s6kqEJmi.js +857 -0
- package/dist/php-CWWqzOo8.js +506 -0
- package/dist/pla-FSvb_YP_.js +143 -0
- package/dist/postiats-DQdscQXO.js +913 -0
- package/dist/powerquery-CtA5JA1I.js +896 -0
- package/dist/powershell-DglEq96N.js +245 -0
- package/dist/protobuf-BSepub3e.js +426 -0
- package/dist/pug-B1847F4G.js +408 -0
- package/dist/python-CGI_fE8F.js +307 -0
- package/dist/qsharp-D4i0Nqg9.js +307 -0
- package/dist/r-cdRigKxa.js +249 -0
- package/dist/razor-DNVpjohl.js +556 -0
- package/dist/redis-D9MFxvE8.js +308 -0
- package/dist/redshift-CmCnsvL-.js +815 -0
- package/dist/restructuredtext-CWy8J51t.js +180 -0
- package/dist/ruby-WP-c36m5.js +517 -0
- package/dist/rust-Q9FLdYpu.js +349 -0
- package/dist/sb-C54-JBGT.js +121 -0
- package/dist/scala-CzbFImc5.js +376 -0
- package/dist/scheme-BhfDmYN3.js +114 -0
- package/dist/scss-CEmiBXpS.js +268 -0
- package/dist/shell-Bmc1VhG0.js +227 -0
- package/dist/solidity-C9Q2I8Hh.js +1373 -0
- package/dist/sophia-jWa1UyKz.js +205 -0
- package/dist/sparql-CM7jctbc.js +207 -0
- package/dist/sql-WzihTkbg.js +859 -0
- package/dist/st-6y7_3aup.js +422 -0
- package/dist/style.css +1 -0
- package/dist/swift-k-0zxG_D.js +318 -0
- package/dist/systemverilog-Pnr5_rIP.js +582 -0
- package/dist/tcl-fNPXval8.js +238 -0
- package/dist/tsMode-CRUDJ1Gx.js +895 -0
- package/dist/twig-L2MkztkV.js +398 -0
- package/dist/types/composables/useMonacoEditor.d.ts +25 -0
- package/dist/types/composables/useMonacoEditor.d.ts.map +1 -0
- package/dist/types/constants/index.d.ts +3 -0
- package/dist/types/constants/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/tests/mocks/monaco-editor-api.d.ts +78 -0
- package/dist/types/tests/mocks/monaco-editor-api.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +68 -1
- package/dist/types/types/index.d.ts.map +1 -1
- package/dist/typescript-C2FvJtQm.js +349 -0
- package/dist/typespec-Cqqo-3Pt.js +123 -0
- package/dist/vb-B5YC2xN9.js +378 -0
- package/dist/wgsl-B-_uRex7.js +445 -0
- package/dist/xml-e_XsfZP6.js +101 -0
- package/dist/yaml-DOzdDlyx.js +212 -0
- package/package.json +14 -8
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
/*!-----------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
4
|
+
* Released under the MIT license
|
|
5
|
+
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
6
|
+
*-----------------------------------------------------------------------------*/
|
|
7
|
+
var e = {
|
|
8
|
+
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
|
9
|
+
comments: {
|
|
10
|
+
lineComment: "//",
|
|
11
|
+
blockComment: ["/*", "*/"]
|
|
12
|
+
},
|
|
13
|
+
brackets: [
|
|
14
|
+
["{", "}"],
|
|
15
|
+
["[", "]"],
|
|
16
|
+
["(", ")"]
|
|
17
|
+
],
|
|
18
|
+
autoClosingPairs: [
|
|
19
|
+
{ open: "{", close: "}" },
|
|
20
|
+
{ open: "[", close: "]" },
|
|
21
|
+
{ open: "(", close: ")" },
|
|
22
|
+
{ open: "'", close: "'", notIn: ["string", "comment"] },
|
|
23
|
+
{ open: '"', close: '"', notIn: ["string", "comment"] }
|
|
24
|
+
],
|
|
25
|
+
surroundingPairs: [
|
|
26
|
+
{ open: "{", close: "}" },
|
|
27
|
+
{ open: "[", close: "]" },
|
|
28
|
+
{ open: "(", close: ")" },
|
|
29
|
+
{ open: "<", close: ">" },
|
|
30
|
+
{ open: "'", close: "'" },
|
|
31
|
+
{ open: '"', close: '"' }
|
|
32
|
+
],
|
|
33
|
+
folding: {
|
|
34
|
+
markers: {
|
|
35
|
+
start: new RegExp("^\\s*#region\\b"),
|
|
36
|
+
end: new RegExp("^\\s*#endregion\\b")
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}, t = {
|
|
40
|
+
defaultToken: "",
|
|
41
|
+
tokenPostfix: ".cs",
|
|
42
|
+
brackets: [
|
|
43
|
+
{ open: "{", close: "}", token: "delimiter.curly" },
|
|
44
|
+
{ open: "[", close: "]", token: "delimiter.square" },
|
|
45
|
+
{ open: "(", close: ")", token: "delimiter.parenthesis" },
|
|
46
|
+
{ open: "<", close: ">", token: "delimiter.angle" }
|
|
47
|
+
],
|
|
48
|
+
keywords: [
|
|
49
|
+
"extern",
|
|
50
|
+
"alias",
|
|
51
|
+
"using",
|
|
52
|
+
"bool",
|
|
53
|
+
"decimal",
|
|
54
|
+
"sbyte",
|
|
55
|
+
"byte",
|
|
56
|
+
"short",
|
|
57
|
+
"ushort",
|
|
58
|
+
"int",
|
|
59
|
+
"uint",
|
|
60
|
+
"long",
|
|
61
|
+
"ulong",
|
|
62
|
+
"char",
|
|
63
|
+
"float",
|
|
64
|
+
"double",
|
|
65
|
+
"object",
|
|
66
|
+
"dynamic",
|
|
67
|
+
"string",
|
|
68
|
+
"assembly",
|
|
69
|
+
"is",
|
|
70
|
+
"as",
|
|
71
|
+
"ref",
|
|
72
|
+
"out",
|
|
73
|
+
"this",
|
|
74
|
+
"base",
|
|
75
|
+
"new",
|
|
76
|
+
"typeof",
|
|
77
|
+
"void",
|
|
78
|
+
"checked",
|
|
79
|
+
"unchecked",
|
|
80
|
+
"default",
|
|
81
|
+
"delegate",
|
|
82
|
+
"var",
|
|
83
|
+
"const",
|
|
84
|
+
"if",
|
|
85
|
+
"else",
|
|
86
|
+
"switch",
|
|
87
|
+
"case",
|
|
88
|
+
"while",
|
|
89
|
+
"do",
|
|
90
|
+
"for",
|
|
91
|
+
"foreach",
|
|
92
|
+
"in",
|
|
93
|
+
"break",
|
|
94
|
+
"continue",
|
|
95
|
+
"goto",
|
|
96
|
+
"return",
|
|
97
|
+
"throw",
|
|
98
|
+
"try",
|
|
99
|
+
"catch",
|
|
100
|
+
"finally",
|
|
101
|
+
"lock",
|
|
102
|
+
"yield",
|
|
103
|
+
"from",
|
|
104
|
+
"let",
|
|
105
|
+
"where",
|
|
106
|
+
"join",
|
|
107
|
+
"on",
|
|
108
|
+
"equals",
|
|
109
|
+
"into",
|
|
110
|
+
"orderby",
|
|
111
|
+
"ascending",
|
|
112
|
+
"descending",
|
|
113
|
+
"select",
|
|
114
|
+
"group",
|
|
115
|
+
"by",
|
|
116
|
+
"namespace",
|
|
117
|
+
"partial",
|
|
118
|
+
"class",
|
|
119
|
+
"field",
|
|
120
|
+
"event",
|
|
121
|
+
"method",
|
|
122
|
+
"param",
|
|
123
|
+
"public",
|
|
124
|
+
"protected",
|
|
125
|
+
"internal",
|
|
126
|
+
"private",
|
|
127
|
+
"abstract",
|
|
128
|
+
"sealed",
|
|
129
|
+
"static",
|
|
130
|
+
"struct",
|
|
131
|
+
"readonly",
|
|
132
|
+
"volatile",
|
|
133
|
+
"virtual",
|
|
134
|
+
"override",
|
|
135
|
+
"params",
|
|
136
|
+
"get",
|
|
137
|
+
"set",
|
|
138
|
+
"add",
|
|
139
|
+
"remove",
|
|
140
|
+
"operator",
|
|
141
|
+
"true",
|
|
142
|
+
"false",
|
|
143
|
+
"implicit",
|
|
144
|
+
"explicit",
|
|
145
|
+
"interface",
|
|
146
|
+
"enum",
|
|
147
|
+
"null",
|
|
148
|
+
"async",
|
|
149
|
+
"await",
|
|
150
|
+
"fixed",
|
|
151
|
+
"sizeof",
|
|
152
|
+
"stackalloc",
|
|
153
|
+
"unsafe",
|
|
154
|
+
"nameof",
|
|
155
|
+
"when"
|
|
156
|
+
],
|
|
157
|
+
namespaceFollows: ["namespace", "using"],
|
|
158
|
+
parenFollows: ["if", "for", "while", "switch", "foreach", "using", "catch", "when"],
|
|
159
|
+
operators: [
|
|
160
|
+
"=",
|
|
161
|
+
"??",
|
|
162
|
+
"||",
|
|
163
|
+
"&&",
|
|
164
|
+
"|",
|
|
165
|
+
"^",
|
|
166
|
+
"&",
|
|
167
|
+
"==",
|
|
168
|
+
"!=",
|
|
169
|
+
"<=",
|
|
170
|
+
">=",
|
|
171
|
+
"<<",
|
|
172
|
+
"+",
|
|
173
|
+
"-",
|
|
174
|
+
"*",
|
|
175
|
+
"/",
|
|
176
|
+
"%",
|
|
177
|
+
"!",
|
|
178
|
+
"~",
|
|
179
|
+
"++",
|
|
180
|
+
"--",
|
|
181
|
+
"+=",
|
|
182
|
+
"-=",
|
|
183
|
+
"*=",
|
|
184
|
+
"/=",
|
|
185
|
+
"%=",
|
|
186
|
+
"&=",
|
|
187
|
+
"|=",
|
|
188
|
+
"^=",
|
|
189
|
+
"<<=",
|
|
190
|
+
">>=",
|
|
191
|
+
">>",
|
|
192
|
+
"=>"
|
|
193
|
+
],
|
|
194
|
+
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
|
195
|
+
// escape sequences
|
|
196
|
+
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
|
197
|
+
// The main tokenizer for our languages
|
|
198
|
+
tokenizer: {
|
|
199
|
+
root: [
|
|
200
|
+
// identifiers and keywords
|
|
201
|
+
[
|
|
202
|
+
/\@?[a-zA-Z_]\w*/,
|
|
203
|
+
{
|
|
204
|
+
cases: {
|
|
205
|
+
"@namespaceFollows": {
|
|
206
|
+
token: "keyword.$0",
|
|
207
|
+
next: "@namespace"
|
|
208
|
+
},
|
|
209
|
+
"@keywords": {
|
|
210
|
+
token: "keyword.$0",
|
|
211
|
+
next: "@qualified"
|
|
212
|
+
},
|
|
213
|
+
"@default": { token: "identifier", next: "@qualified" }
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
],
|
|
217
|
+
// whitespace
|
|
218
|
+
{ include: "@whitespace" },
|
|
219
|
+
// delimiters and operators
|
|
220
|
+
[
|
|
221
|
+
/}/,
|
|
222
|
+
{
|
|
223
|
+
cases: {
|
|
224
|
+
"$S2==interpolatedstring": {
|
|
225
|
+
token: "string.quote",
|
|
226
|
+
next: "@pop"
|
|
227
|
+
},
|
|
228
|
+
"$S2==litinterpstring": {
|
|
229
|
+
token: "string.quote",
|
|
230
|
+
next: "@pop"
|
|
231
|
+
},
|
|
232
|
+
"@default": "@brackets"
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
],
|
|
236
|
+
[/[{}()\[\]]/, "@brackets"],
|
|
237
|
+
[/[<>](?!@symbols)/, "@brackets"],
|
|
238
|
+
[
|
|
239
|
+
/@symbols/,
|
|
240
|
+
{
|
|
241
|
+
cases: {
|
|
242
|
+
"@operators": "delimiter",
|
|
243
|
+
"@default": ""
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
],
|
|
247
|
+
// numbers
|
|
248
|
+
[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?[fFdD]?/, "number.float"],
|
|
249
|
+
[/0[xX][0-9a-fA-F_]+/, "number.hex"],
|
|
250
|
+
[/0[bB][01_]+/, "number.hex"],
|
|
251
|
+
// binary: use same theme style as hex
|
|
252
|
+
[/[0-9_]+/, "number"],
|
|
253
|
+
// delimiter: after number because of .\d floats
|
|
254
|
+
[/[;,.]/, "delimiter"],
|
|
255
|
+
// strings
|
|
256
|
+
[/"([^"\\]|\\.)*$/, "string.invalid"],
|
|
257
|
+
// non-teminated string
|
|
258
|
+
[/"/, { token: "string.quote", next: "@string" }],
|
|
259
|
+
[/\$\@"/, { token: "string.quote", next: "@litinterpstring" }],
|
|
260
|
+
[/\@"/, { token: "string.quote", next: "@litstring" }],
|
|
261
|
+
[/\$"/, { token: "string.quote", next: "@interpolatedstring" }],
|
|
262
|
+
// characters
|
|
263
|
+
[/'[^\\']'/, "string"],
|
|
264
|
+
[/(')(@escapes)(')/, ["string", "string.escape", "string"]],
|
|
265
|
+
[/'/, "string.invalid"]
|
|
266
|
+
],
|
|
267
|
+
qualified: [
|
|
268
|
+
[
|
|
269
|
+
/[a-zA-Z_][\w]*/,
|
|
270
|
+
{
|
|
271
|
+
cases: {
|
|
272
|
+
"@keywords": { token: "keyword.$0" },
|
|
273
|
+
"@default": "identifier"
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
],
|
|
277
|
+
[/\./, "delimiter"],
|
|
278
|
+
["", "", "@pop"]
|
|
279
|
+
],
|
|
280
|
+
namespace: [
|
|
281
|
+
{ include: "@whitespace" },
|
|
282
|
+
[/[A-Z]\w*/, "namespace"],
|
|
283
|
+
[/[\.=]/, "delimiter"],
|
|
284
|
+
["", "", "@pop"]
|
|
285
|
+
],
|
|
286
|
+
comment: [
|
|
287
|
+
[/[^\/*]+/, "comment"],
|
|
288
|
+
// [/\/\*/, 'comment', '@push' ], // no nested comments :-(
|
|
289
|
+
["\\*/", "comment", "@pop"],
|
|
290
|
+
[/[\/*]/, "comment"]
|
|
291
|
+
],
|
|
292
|
+
string: [
|
|
293
|
+
[/[^\\"]+/, "string"],
|
|
294
|
+
[/@escapes/, "string.escape"],
|
|
295
|
+
[/\\./, "string.escape.invalid"],
|
|
296
|
+
[/"/, { token: "string.quote", next: "@pop" }]
|
|
297
|
+
],
|
|
298
|
+
litstring: [
|
|
299
|
+
[/[^"]+/, "string"],
|
|
300
|
+
[/""/, "string.escape"],
|
|
301
|
+
[/"/, { token: "string.quote", next: "@pop" }]
|
|
302
|
+
],
|
|
303
|
+
litinterpstring: [
|
|
304
|
+
[/[^"{]+/, "string"],
|
|
305
|
+
[/""/, "string.escape"],
|
|
306
|
+
[/{{/, "string.escape"],
|
|
307
|
+
[/}}/, "string.escape"],
|
|
308
|
+
[/{/, { token: "string.quote", next: "root.litinterpstring" }],
|
|
309
|
+
[/"/, { token: "string.quote", next: "@pop" }]
|
|
310
|
+
],
|
|
311
|
+
interpolatedstring: [
|
|
312
|
+
[/[^\\"{]+/, "string"],
|
|
313
|
+
[/@escapes/, "string.escape"],
|
|
314
|
+
[/\\./, "string.escape.invalid"],
|
|
315
|
+
[/{{/, "string.escape"],
|
|
316
|
+
[/}}/, "string.escape"],
|
|
317
|
+
[/{/, { token: "string.quote", next: "root.interpolatedstring" }],
|
|
318
|
+
[/"/, { token: "string.quote", next: "@pop" }]
|
|
319
|
+
],
|
|
320
|
+
whitespace: [
|
|
321
|
+
[/^[ \t\v\f]*#((r)|(load))(?=\s)/, "directive.csx"],
|
|
322
|
+
[/^[ \t\v\f]*#\w.*$/, "namespace.cpp"],
|
|
323
|
+
[/[ \t\v\f\r\n]+/, ""],
|
|
324
|
+
[/\/\*/, "comment", "@comment"],
|
|
325
|
+
[/\/\/.*$/, "comment"]
|
|
326
|
+
]
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
export {
|
|
330
|
+
e as conf,
|
|
331
|
+
t as language
|
|
332
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/*!-----------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
4
|
+
* Released under the MIT license
|
|
5
|
+
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
6
|
+
*-----------------------------------------------------------------------------*/
|
|
7
|
+
var t = {
|
|
8
|
+
brackets: [],
|
|
9
|
+
autoClosingPairs: [],
|
|
10
|
+
surroundingPairs: []
|
|
11
|
+
}, r = {
|
|
12
|
+
// Set defaultToken to invalid to see what you do not tokenize yet
|
|
13
|
+
// defaultToken: 'invalid',
|
|
14
|
+
keywords: [],
|
|
15
|
+
typeKeywords: [],
|
|
16
|
+
tokenPostfix: ".csp",
|
|
17
|
+
operators: [],
|
|
18
|
+
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
|
19
|
+
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
|
20
|
+
tokenizer: {
|
|
21
|
+
root: [
|
|
22
|
+
[/child-src/, "string.quote"],
|
|
23
|
+
[/connect-src/, "string.quote"],
|
|
24
|
+
[/default-src/, "string.quote"],
|
|
25
|
+
[/font-src/, "string.quote"],
|
|
26
|
+
[/frame-src/, "string.quote"],
|
|
27
|
+
[/img-src/, "string.quote"],
|
|
28
|
+
[/manifest-src/, "string.quote"],
|
|
29
|
+
[/media-src/, "string.quote"],
|
|
30
|
+
[/object-src/, "string.quote"],
|
|
31
|
+
[/script-src/, "string.quote"],
|
|
32
|
+
[/style-src/, "string.quote"],
|
|
33
|
+
[/worker-src/, "string.quote"],
|
|
34
|
+
[/base-uri/, "string.quote"],
|
|
35
|
+
[/plugin-types/, "string.quote"],
|
|
36
|
+
[/sandbox/, "string.quote"],
|
|
37
|
+
[/disown-opener/, "string.quote"],
|
|
38
|
+
[/form-action/, "string.quote"],
|
|
39
|
+
[/frame-ancestors/, "string.quote"],
|
|
40
|
+
[/report-uri/, "string.quote"],
|
|
41
|
+
[/report-to/, "string.quote"],
|
|
42
|
+
[/upgrade-insecure-requests/, "string.quote"],
|
|
43
|
+
[/block-all-mixed-content/, "string.quote"],
|
|
44
|
+
[/require-sri-for/, "string.quote"],
|
|
45
|
+
[/reflected-xss/, "string.quote"],
|
|
46
|
+
[/referrer/, "string.quote"],
|
|
47
|
+
[/policy-uri/, "string.quote"],
|
|
48
|
+
[/'self'/, "string.quote"],
|
|
49
|
+
[/'unsafe-inline'/, "string.quote"],
|
|
50
|
+
[/'unsafe-eval'/, "string.quote"],
|
|
51
|
+
[/'strict-dynamic'/, "string.quote"],
|
|
52
|
+
[/'unsafe-hashed-attributes'/, "string.quote"]
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
export {
|
|
57
|
+
t as conf,
|
|
58
|
+
r as language
|
|
59
|
+
};
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/*!-----------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
4
|
+
* Released under the MIT license
|
|
5
|
+
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
6
|
+
*-----------------------------------------------------------------------------*/
|
|
7
|
+
var e = {
|
|
8
|
+
wordPattern: /(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,
|
|
9
|
+
comments: {
|
|
10
|
+
blockComment: ["/*", "*/"]
|
|
11
|
+
},
|
|
12
|
+
brackets: [
|
|
13
|
+
["{", "}"],
|
|
14
|
+
["[", "]"],
|
|
15
|
+
["(", ")"]
|
|
16
|
+
],
|
|
17
|
+
autoClosingPairs: [
|
|
18
|
+
{ open: "{", close: "}", notIn: ["string", "comment"] },
|
|
19
|
+
{ open: "[", close: "]", notIn: ["string", "comment"] },
|
|
20
|
+
{ open: "(", close: ")", notIn: ["string", "comment"] },
|
|
21
|
+
{ open: '"', close: '"', notIn: ["string", "comment"] },
|
|
22
|
+
{ open: "'", close: "'", notIn: ["string", "comment"] }
|
|
23
|
+
],
|
|
24
|
+
surroundingPairs: [
|
|
25
|
+
{ open: "{", close: "}" },
|
|
26
|
+
{ open: "[", close: "]" },
|
|
27
|
+
{ open: "(", close: ")" },
|
|
28
|
+
{ open: '"', close: '"' },
|
|
29
|
+
{ open: "'", close: "'" }
|
|
30
|
+
],
|
|
31
|
+
folding: {
|
|
32
|
+
markers: {
|
|
33
|
+
start: new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),
|
|
34
|
+
end: new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}, t = {
|
|
38
|
+
defaultToken: "",
|
|
39
|
+
tokenPostfix: ".css",
|
|
40
|
+
ws: `[
|
|
41
|
+
\r\f]*`,
|
|
42
|
+
// whitespaces (referenced in several rules)
|
|
43
|
+
identifier: "-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",
|
|
44
|
+
brackets: [
|
|
45
|
+
{ open: "{", close: "}", token: "delimiter.bracket" },
|
|
46
|
+
{ open: "[", close: "]", token: "delimiter.bracket" },
|
|
47
|
+
{ open: "(", close: ")", token: "delimiter.parenthesis" },
|
|
48
|
+
{ open: "<", close: ">", token: "delimiter.angle" }
|
|
49
|
+
],
|
|
50
|
+
tokenizer: {
|
|
51
|
+
root: [{ include: "@selector" }],
|
|
52
|
+
selector: [
|
|
53
|
+
{ include: "@comments" },
|
|
54
|
+
{ include: "@import" },
|
|
55
|
+
{ include: "@strings" },
|
|
56
|
+
[
|
|
57
|
+
"[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",
|
|
58
|
+
{ token: "keyword", next: "@keyframedeclaration" }
|
|
59
|
+
],
|
|
60
|
+
["[@](page|content|font-face|-moz-document)", { token: "keyword" }],
|
|
61
|
+
["[@](charset|namespace)", { token: "keyword", next: "@declarationbody" }],
|
|
62
|
+
[
|
|
63
|
+
"(url-prefix)(\\()",
|
|
64
|
+
["attribute.value", { token: "delimiter.parenthesis", next: "@urldeclaration" }]
|
|
65
|
+
],
|
|
66
|
+
[
|
|
67
|
+
"(url)(\\()",
|
|
68
|
+
["attribute.value", { token: "delimiter.parenthesis", next: "@urldeclaration" }]
|
|
69
|
+
],
|
|
70
|
+
{ include: "@selectorname" },
|
|
71
|
+
["[\\*]", "tag"],
|
|
72
|
+
// selector symbols
|
|
73
|
+
["[>\\+,]", "delimiter"],
|
|
74
|
+
// selector operators
|
|
75
|
+
["\\[", { token: "delimiter.bracket", next: "@selectorattribute" }],
|
|
76
|
+
["{", { token: "delimiter.bracket", next: "@selectorbody" }]
|
|
77
|
+
],
|
|
78
|
+
selectorbody: [
|
|
79
|
+
{ include: "@comments" },
|
|
80
|
+
["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))", "attribute.name", "@rulevalue"],
|
|
81
|
+
// rule definition: to distinguish from a nested selector check for whitespace, number or a semicolon
|
|
82
|
+
["}", { token: "delimiter.bracket", next: "@pop" }]
|
|
83
|
+
],
|
|
84
|
+
selectorname: [
|
|
85
|
+
["(\\.|#(?=[^{])|%|(@identifier)|:)+", "tag"]
|
|
86
|
+
// selector (.foo, div, ...)
|
|
87
|
+
],
|
|
88
|
+
selectorattribute: [{ include: "@term" }, ["]", { token: "delimiter.bracket", next: "@pop" }]],
|
|
89
|
+
term: [
|
|
90
|
+
{ include: "@comments" },
|
|
91
|
+
[
|
|
92
|
+
"(url-prefix)(\\()",
|
|
93
|
+
["attribute.value", { token: "delimiter.parenthesis", next: "@urldeclaration" }]
|
|
94
|
+
],
|
|
95
|
+
[
|
|
96
|
+
"(url)(\\()",
|
|
97
|
+
["attribute.value", { token: "delimiter.parenthesis", next: "@urldeclaration" }]
|
|
98
|
+
],
|
|
99
|
+
{ include: "@functioninvocation" },
|
|
100
|
+
{ include: "@numbers" },
|
|
101
|
+
{ include: "@name" },
|
|
102
|
+
{ include: "@strings" },
|
|
103
|
+
["([<>=\\+\\-\\*\\/\\^\\|\\~,])", "delimiter"],
|
|
104
|
+
[",", "delimiter"]
|
|
105
|
+
],
|
|
106
|
+
rulevalue: [
|
|
107
|
+
{ include: "@comments" },
|
|
108
|
+
{ include: "@strings" },
|
|
109
|
+
{ include: "@term" },
|
|
110
|
+
["!important", "keyword"],
|
|
111
|
+
[";", "delimiter", "@pop"],
|
|
112
|
+
["(?=})", { token: "", next: "@pop" }]
|
|
113
|
+
// missing semicolon
|
|
114
|
+
],
|
|
115
|
+
warndebug: [["[@](warn|debug)", { token: "keyword", next: "@declarationbody" }]],
|
|
116
|
+
import: [["[@](import)", { token: "keyword", next: "@declarationbody" }]],
|
|
117
|
+
urldeclaration: [
|
|
118
|
+
{ include: "@strings" },
|
|
119
|
+
[`[^)\r
|
|
120
|
+
]+`, "string"],
|
|
121
|
+
["\\)", { token: "delimiter.parenthesis", next: "@pop" }]
|
|
122
|
+
],
|
|
123
|
+
parenthizedterm: [
|
|
124
|
+
{ include: "@term" },
|
|
125
|
+
["\\)", { token: "delimiter.parenthesis", next: "@pop" }]
|
|
126
|
+
],
|
|
127
|
+
declarationbody: [
|
|
128
|
+
{ include: "@term" },
|
|
129
|
+
[";", "delimiter", "@pop"],
|
|
130
|
+
["(?=})", { token: "", next: "@pop" }]
|
|
131
|
+
// missing semicolon
|
|
132
|
+
],
|
|
133
|
+
comments: [
|
|
134
|
+
["\\/\\*", "comment", "@comment"],
|
|
135
|
+
["\\/\\/+.*", "comment"]
|
|
136
|
+
],
|
|
137
|
+
comment: [
|
|
138
|
+
["\\*\\/", "comment", "@pop"],
|
|
139
|
+
[/[^*/]+/, "comment"],
|
|
140
|
+
[/./, "comment"]
|
|
141
|
+
],
|
|
142
|
+
name: [["@identifier", "attribute.value"]],
|
|
143
|
+
numbers: [
|
|
144
|
+
["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?", { token: "attribute.value.number", next: "@units" }],
|
|
145
|
+
["#[0-9a-fA-F_]+(?!\\w)", "attribute.value.hex"]
|
|
146
|
+
],
|
|
147
|
+
units: [
|
|
148
|
+
[
|
|
149
|
+
"(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?",
|
|
150
|
+
"attribute.value.unit",
|
|
151
|
+
"@pop"
|
|
152
|
+
]
|
|
153
|
+
],
|
|
154
|
+
keyframedeclaration: [
|
|
155
|
+
["@identifier", "attribute.value"],
|
|
156
|
+
["{", { token: "delimiter.bracket", switchTo: "@keyframebody" }]
|
|
157
|
+
],
|
|
158
|
+
keyframebody: [
|
|
159
|
+
{ include: "@term" },
|
|
160
|
+
["{", { token: "delimiter.bracket", next: "@selectorbody" }],
|
|
161
|
+
["}", { token: "delimiter.bracket", next: "@pop" }]
|
|
162
|
+
],
|
|
163
|
+
functioninvocation: [
|
|
164
|
+
["@identifier\\(", { token: "attribute.value", next: "@functionarguments" }]
|
|
165
|
+
],
|
|
166
|
+
functionarguments: [
|
|
167
|
+
["\\$@identifier@ws:", "attribute.name"],
|
|
168
|
+
["[,]", "delimiter"],
|
|
169
|
+
{ include: "@term" },
|
|
170
|
+
["\\)", { token: "attribute.value", next: "@pop" }]
|
|
171
|
+
],
|
|
172
|
+
strings: [
|
|
173
|
+
['~?"', { token: "string", next: "@stringenddoublequote" }],
|
|
174
|
+
["~?'", { token: "string", next: "@stringendquote" }]
|
|
175
|
+
],
|
|
176
|
+
stringenddoublequote: [
|
|
177
|
+
["\\\\.", "string"],
|
|
178
|
+
['"', { token: "string", next: "@pop" }],
|
|
179
|
+
[/[^\\"]+/, "string"],
|
|
180
|
+
[".", "string"]
|
|
181
|
+
],
|
|
182
|
+
stringendquote: [
|
|
183
|
+
["\\\\.", "string"],
|
|
184
|
+
["'", { token: "string", next: "@pop" }],
|
|
185
|
+
[/[^\\']+/, "string"],
|
|
186
|
+
[".", "string"]
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
export {
|
|
191
|
+
e as conf,
|
|
192
|
+
t as language
|
|
193
|
+
};
|