online-compiler-widget 0.0.3 → 1.0.2
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-CrvW7_qN.js +1398 -0
- package/dist/apex-BAOI8p1v.js +327 -0
- package/dist/assets/css.worker-Cb0JI69t.js +93 -0
- package/dist/assets/html.worker-BNFZMwEc.js +470 -0
- package/dist/assets/json.worker-BCybXpia.js +58 -0
- package/dist/assets/ts.worker-DAVh1bw1.js +67731 -0
- package/dist/azcli-BlCk_UqW.js +68 -0
- package/dist/bat-DPoEelVx.js +100 -0
- package/dist/bicep-Cp1F394l.js +102 -0
- package/dist/cameligo-CWqtSlQs.js +174 -0
- package/dist/clojure-CKBp32Gf.js +761 -0
- package/dist/coffee-CDo6vc-J.js +232 -0
- package/dist/cpp-DokufPgf.js +389 -0
- package/dist/csharp-BQi3szM0.js +326 -0
- package/dist/csp-BSGtCCZ-.js +53 -0
- package/dist/css-DEPFDJfb.js +187 -0
- package/dist/cssMode-nHrB9Mnr.js +141 -0
- package/dist/cypher-DAb1vOxS.js +263 -0
- package/dist/dart-C8p4jewR.js +281 -0
- package/dist/dockerfile-DP0iLFPN.js +130 -0
- package/dist/ecl-BDQHA6fi.js +456 -0
- package/dist/elixir-D4II6kDM.js +569 -0
- package/dist/flow9-StcnL-VB.js +142 -0
- package/dist/freemarker2-BoiXdkJM.js +982 -0
- package/dist/fsharp-DdUVp3EN.js +217 -0
- package/dist/go-D1-I258M.js +218 -0
- package/dist/graphql-DWkL3f8U.js +151 -0
- package/dist/handlebars-C7PJzkmo.js +412 -0
- package/dist/hcl-D_0MNifv.js +183 -0
- package/dist/html-D_xe_tUa.js +301 -0
- package/dist/htmlMode-Dk_luXu_.js +152 -0
- package/dist/index-Ds0EJmOd.js +129200 -0
- package/dist/index.js +14 -0
- package/dist/ini-C4I2-MT7.js +71 -0
- package/dist/java-OBvaP_SS.js +232 -0
- package/dist/javascript-CUK67ITD.js +70 -0
- package/dist/jsonMode-BIAYTpVF.js +569 -0
- package/dist/julia-BmDH8Kkf.js +511 -0
- package/dist/kotlin-Dhu5AGOD.js +252 -0
- package/dist/less-CzmjXREq.js +162 -0
- package/dist/lexon-CV2c4pN9.js +157 -0
- package/dist/liquid-Cgsk8EmK.js +233 -0
- package/dist/lspLanguageFeatures-HqO1l9Me.js +1458 -0
- package/dist/lua-CFY5U8qF.js +162 -0
- package/dist/m3-BL_AnZVh.js +210 -0
- package/dist/markdown-CWKQPXCv.js +229 -0
- package/dist/mdx-QboWmT4M.js +158 -0
- package/dist/mips-ButYmJ5E.js +198 -0
- package/dist/msdax-C3cnXqDh.js +375 -0
- package/dist/mysql-YlSHaf6G.js +878 -0
- package/dist/objective-c-Dwnlproe.js +183 -0
- package/dist/pascal-UzGbSWEN.js +251 -0
- package/dist/pascaligo-CslTgu68.js +164 -0
- package/dist/perl-oj6r_mgw.js +626 -0
- package/dist/pgsql-DSBO0Mev.js +851 -0
- package/dist/php-YzCD--7j.js +500 -0
- package/dist/pla-CmylB8vQ.js +137 -0
- package/dist/postiats-CLFW5gNY.js +907 -0
- package/dist/powerquery-CmOWUvlh.js +890 -0
- package/dist/powershell-fHQcmBLK.js +239 -0
- package/dist/protobuf-p5BArb-9.js +420 -0
- package/dist/pug-gVdUDvqf.js +402 -0
- package/dist/python-kIZaMFF7.js +294 -0
- package/dist/qsharp-DnrWSUlt.js +301 -0
- package/dist/r-Cv309K2z.js +243 -0
- package/dist/razor-ms2cCMGp.js +543 -0
- package/dist/redis-DTcS4wMj.js +302 -0
- package/dist/redshift-hLxZVESM.js +809 -0
- package/dist/restructuredtext-C898lK4f.js +174 -0
- package/dist/ruby-CgKtnJIQ.js +511 -0
- package/dist/rust-bj8oxVnh.js +343 -0
- package/dist/sb-DWynz26l.js +115 -0
- package/dist/scala-BL5z1UEd.js +370 -0
- package/dist/scheme-DUJsH6VU.js +108 -0
- package/dist/scss-CxjmhvaL.js +262 -0
- package/dist/shell-D14Zs1dF.js +221 -0
- package/dist/solidity-WyRm-BGK.js +1367 -0
- package/dist/sophia-CKk-_Oa5.js +199 -0
- package/dist/sparql-DHtmINMZ.js +201 -0
- package/dist/sql-Dqaj5JHC.js +853 -0
- package/dist/st-Bj2IIaop.js +416 -0
- package/dist/style.css +1 -0
- package/dist/swift-DwxP72iM.js +312 -0
- package/dist/systemverilog-D7wJfuql.js +576 -0
- package/dist/tcl-0ApMt-eC.js +232 -0
- package/dist/tsMode-BiXWAJYS.js +946 -0
- package/dist/twig-DxwbdmvQ.js +392 -0
- package/dist/typescript-ByMmjZ38.js +336 -0
- package/dist/typespec-Fd-JwSuS.js +117 -0
- package/dist/vb-CxuyYE1I.js +372 -0
- package/dist/wgsl-DoEGc31J.js +439 -0
- package/dist/xml-iOXTZgNN.js +88 -0
- package/dist/yaml-RRlyy-QW.js +199 -0
- package/package.json +41 -36
- package/FileStorage/obj/FileStorage.csproj.EntityFrameworkCore.targets +0 -28
- package/README.md +0 -1
- package/eslint.config.js +0 -26
- package/index.html +0 -13
- package/index.tsx +0 -3
- package/openapitools.json +0 -7
- package/pnpm-workspace.yaml +0 -2
- package/public/vite.svg +0 -1
- package/src/App.css +0 -49
- package/src/App.tsx +0 -84
- package/src/api/.openapi-generator/FILES +0 -25
- package/src/api/.openapi-generator/VERSION +0 -1
- package/src/api/.openapi-generator-ignore +0 -23
- package/src/api/api.ts +0 -1312
- package/src/api/base.ts +0 -62
- package/src/api/common.ts +0 -113
- package/src/api/configuration.ts +0 -121
- package/src/api/docs/CompilationError.md +0 -26
- package/src/api/docs/CompileRequest.md +0 -22
- package/src/api/docs/CompileResult.md +0 -28
- package/src/api/docs/CompilerApi.md +0 -263
- package/src/api/docs/CreateFileDto.md +0 -22
- package/src/api/docs/CreateProjectRequest.md +0 -20
- package/src/api/docs/FileApi.md +0 -274
- package/src/api/docs/ProcessStatus.md +0 -28
- package/src/api/docs/ProjectApi.md +0 -362
- package/src/api/docs/ProjectInfo.md +0 -24
- package/src/api/docs/ProjectStats.md +0 -28
- package/src/api/docs/RenameFileDto.md +0 -20
- package/src/api/docs/RenameProjectRequest.md +0 -20
- package/src/api/docs/RunRequest.md +0 -24
- package/src/api/docs/RunResult.md +0 -30
- package/src/api/docs/RunningProjectInfo.md +0 -26
- package/src/api/docs/UpdateFileDto.md +0 -20
- package/src/api/git_push.sh +0 -57
- package/src/api/index.ts +0 -18
- package/src/assets/Badge.svg +0 -17
- package/src/assets/closeIcon.svg +0 -20
- package/src/assets/documentIcon.svg +0 -11
- package/src/assets/history.svg +0 -11
- package/src/assets/output.svg +0 -12
- package/src/assets/plus.svg +0 -20
- package/src/assets/react.svg +0 -1
- package/src/assets/save-icon.svg +0 -11
- package/src/assets/shield.svg +0 -10
- package/src/assets/start.svg +0 -11
- package/src/assets/stop.svg +0 -11
- package/src/components/CompilerWidget.module.scss +0 -169
- package/src/components/CompilerWidget.tsx +0 -279
- package/src/components/FileExplorer.module.scss +0 -372
- package/src/components/FileExplorer.tsx +0 -285
- package/src/components/MonacoEditorWrapper.module.scss +0 -29
- package/src/components/MonacoEditorWrapper.tsx +0 -74
- package/src/components/OutputPanel.module.scss +0 -123
- package/src/components/OutputPanel.tsx +0 -53
- package/src/components/RunContainer.module.scss +0 -150
- package/src/components/RunContainer.tsx +0 -34
- package/src/hooks/useCompiler.ts +0 -228
- package/src/hooks/useInitialNodes.ts +0 -0
- package/src/index.css +0 -78
- package/src/main.tsx +0 -8
- package/src/types/EditorDocument.ts +0 -8
- package/swagger.json +0 -1020
- package/tsconfig.app.json +0 -29
- package/tsconfig.json +0 -7
- package/tsconfig.node.json +0 -26
- package/vite.config.ts +0 -8
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
|
3
|
+
comments: {
|
|
4
|
+
lineComment: "//",
|
|
5
|
+
blockComment: ["/*", "*/"]
|
|
6
|
+
},
|
|
7
|
+
brackets: [
|
|
8
|
+
["{", "}"],
|
|
9
|
+
["[", "]"],
|
|
10
|
+
["(", ")"]
|
|
11
|
+
],
|
|
12
|
+
autoClosingPairs: [
|
|
13
|
+
{ open: "{", close: "}" },
|
|
14
|
+
{ open: "[", close: "]" },
|
|
15
|
+
{ open: "(", close: ")" },
|
|
16
|
+
{ open: "'", close: "'", notIn: ["string", "comment"] },
|
|
17
|
+
{ open: '"', close: '"', notIn: ["string", "comment"] }
|
|
18
|
+
],
|
|
19
|
+
surroundingPairs: [
|
|
20
|
+
{ open: "{", close: "}" },
|
|
21
|
+
{ open: "[", close: "]" },
|
|
22
|
+
{ open: "(", close: ")" },
|
|
23
|
+
{ open: "<", close: ">" },
|
|
24
|
+
{ open: "'", close: "'" },
|
|
25
|
+
{ open: '"', close: '"' }
|
|
26
|
+
],
|
|
27
|
+
folding: {
|
|
28
|
+
markers: {
|
|
29
|
+
start: new RegExp("^\\s*#region\\b"),
|
|
30
|
+
end: new RegExp("^\\s*#endregion\\b")
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}, t = {
|
|
34
|
+
defaultToken: "",
|
|
35
|
+
tokenPostfix: ".cs",
|
|
36
|
+
brackets: [
|
|
37
|
+
{ open: "{", close: "}", token: "delimiter.curly" },
|
|
38
|
+
{ open: "[", close: "]", token: "delimiter.square" },
|
|
39
|
+
{ open: "(", close: ")", token: "delimiter.parenthesis" },
|
|
40
|
+
{ open: "<", close: ">", token: "delimiter.angle" }
|
|
41
|
+
],
|
|
42
|
+
keywords: [
|
|
43
|
+
"extern",
|
|
44
|
+
"alias",
|
|
45
|
+
"using",
|
|
46
|
+
"bool",
|
|
47
|
+
"decimal",
|
|
48
|
+
"sbyte",
|
|
49
|
+
"byte",
|
|
50
|
+
"short",
|
|
51
|
+
"ushort",
|
|
52
|
+
"int",
|
|
53
|
+
"uint",
|
|
54
|
+
"long",
|
|
55
|
+
"ulong",
|
|
56
|
+
"char",
|
|
57
|
+
"float",
|
|
58
|
+
"double",
|
|
59
|
+
"object",
|
|
60
|
+
"dynamic",
|
|
61
|
+
"string",
|
|
62
|
+
"assembly",
|
|
63
|
+
"is",
|
|
64
|
+
"as",
|
|
65
|
+
"ref",
|
|
66
|
+
"out",
|
|
67
|
+
"this",
|
|
68
|
+
"base",
|
|
69
|
+
"new",
|
|
70
|
+
"typeof",
|
|
71
|
+
"void",
|
|
72
|
+
"checked",
|
|
73
|
+
"unchecked",
|
|
74
|
+
"default",
|
|
75
|
+
"delegate",
|
|
76
|
+
"var",
|
|
77
|
+
"const",
|
|
78
|
+
"if",
|
|
79
|
+
"else",
|
|
80
|
+
"switch",
|
|
81
|
+
"case",
|
|
82
|
+
"while",
|
|
83
|
+
"do",
|
|
84
|
+
"for",
|
|
85
|
+
"foreach",
|
|
86
|
+
"in",
|
|
87
|
+
"break",
|
|
88
|
+
"continue",
|
|
89
|
+
"goto",
|
|
90
|
+
"return",
|
|
91
|
+
"throw",
|
|
92
|
+
"try",
|
|
93
|
+
"catch",
|
|
94
|
+
"finally",
|
|
95
|
+
"lock",
|
|
96
|
+
"yield",
|
|
97
|
+
"from",
|
|
98
|
+
"let",
|
|
99
|
+
"where",
|
|
100
|
+
"join",
|
|
101
|
+
"on",
|
|
102
|
+
"equals",
|
|
103
|
+
"into",
|
|
104
|
+
"orderby",
|
|
105
|
+
"ascending",
|
|
106
|
+
"descending",
|
|
107
|
+
"select",
|
|
108
|
+
"group",
|
|
109
|
+
"by",
|
|
110
|
+
"namespace",
|
|
111
|
+
"partial",
|
|
112
|
+
"class",
|
|
113
|
+
"field",
|
|
114
|
+
"event",
|
|
115
|
+
"method",
|
|
116
|
+
"param",
|
|
117
|
+
"public",
|
|
118
|
+
"protected",
|
|
119
|
+
"internal",
|
|
120
|
+
"private",
|
|
121
|
+
"abstract",
|
|
122
|
+
"sealed",
|
|
123
|
+
"static",
|
|
124
|
+
"struct",
|
|
125
|
+
"readonly",
|
|
126
|
+
"volatile",
|
|
127
|
+
"virtual",
|
|
128
|
+
"override",
|
|
129
|
+
"params",
|
|
130
|
+
"get",
|
|
131
|
+
"set",
|
|
132
|
+
"add",
|
|
133
|
+
"remove",
|
|
134
|
+
"operator",
|
|
135
|
+
"true",
|
|
136
|
+
"false",
|
|
137
|
+
"implicit",
|
|
138
|
+
"explicit",
|
|
139
|
+
"interface",
|
|
140
|
+
"enum",
|
|
141
|
+
"null",
|
|
142
|
+
"async",
|
|
143
|
+
"await",
|
|
144
|
+
"fixed",
|
|
145
|
+
"sizeof",
|
|
146
|
+
"stackalloc",
|
|
147
|
+
"unsafe",
|
|
148
|
+
"nameof",
|
|
149
|
+
"when"
|
|
150
|
+
],
|
|
151
|
+
namespaceFollows: ["namespace", "using"],
|
|
152
|
+
parenFollows: ["if", "for", "while", "switch", "foreach", "using", "catch", "when"],
|
|
153
|
+
operators: [
|
|
154
|
+
"=",
|
|
155
|
+
"??",
|
|
156
|
+
"||",
|
|
157
|
+
"&&",
|
|
158
|
+
"|",
|
|
159
|
+
"^",
|
|
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
|
+
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
|
189
|
+
// escape sequences
|
|
190
|
+
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
|
191
|
+
// The main tokenizer for our languages
|
|
192
|
+
tokenizer: {
|
|
193
|
+
root: [
|
|
194
|
+
// identifiers and keywords
|
|
195
|
+
[
|
|
196
|
+
/\@?[a-zA-Z_]\w*/,
|
|
197
|
+
{
|
|
198
|
+
cases: {
|
|
199
|
+
"@namespaceFollows": {
|
|
200
|
+
token: "keyword.$0",
|
|
201
|
+
next: "@namespace"
|
|
202
|
+
},
|
|
203
|
+
"@keywords": {
|
|
204
|
+
token: "keyword.$0",
|
|
205
|
+
next: "@qualified"
|
|
206
|
+
},
|
|
207
|
+
"@default": { token: "identifier", next: "@qualified" }
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
// whitespace
|
|
212
|
+
{ include: "@whitespace" },
|
|
213
|
+
// delimiters and operators
|
|
214
|
+
[
|
|
215
|
+
/}/,
|
|
216
|
+
{
|
|
217
|
+
cases: {
|
|
218
|
+
"$S2==interpolatedstring": {
|
|
219
|
+
token: "string.quote",
|
|
220
|
+
next: "@pop"
|
|
221
|
+
},
|
|
222
|
+
"$S2==litinterpstring": {
|
|
223
|
+
token: "string.quote",
|
|
224
|
+
next: "@pop"
|
|
225
|
+
},
|
|
226
|
+
"@default": "@brackets"
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
[/[{}()\[\]]/, "@brackets"],
|
|
231
|
+
[/[<>](?!@symbols)/, "@brackets"],
|
|
232
|
+
[
|
|
233
|
+
/@symbols/,
|
|
234
|
+
{
|
|
235
|
+
cases: {
|
|
236
|
+
"@operators": "delimiter",
|
|
237
|
+
"@default": ""
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
],
|
|
241
|
+
// numbers
|
|
242
|
+
[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?[fFdD]?/, "number.float"],
|
|
243
|
+
[/0[xX][0-9a-fA-F_]+/, "number.hex"],
|
|
244
|
+
[/0[bB][01_]+/, "number.hex"],
|
|
245
|
+
// binary: use same theme style as hex
|
|
246
|
+
[/[0-9_]+/, "number"],
|
|
247
|
+
// delimiter: after number because of .\d floats
|
|
248
|
+
[/[;,.]/, "delimiter"],
|
|
249
|
+
// strings
|
|
250
|
+
[/"([^"\\]|\\.)*$/, "string.invalid"],
|
|
251
|
+
// non-teminated string
|
|
252
|
+
[/"/, { token: "string.quote", next: "@string" }],
|
|
253
|
+
[/\$\@"/, { token: "string.quote", next: "@litinterpstring" }],
|
|
254
|
+
[/\@"/, { token: "string.quote", next: "@litstring" }],
|
|
255
|
+
[/\$"/, { token: "string.quote", next: "@interpolatedstring" }],
|
|
256
|
+
// characters
|
|
257
|
+
[/'[^\\']'/, "string"],
|
|
258
|
+
[/(')(@escapes)(')/, ["string", "string.escape", "string"]],
|
|
259
|
+
[/'/, "string.invalid"]
|
|
260
|
+
],
|
|
261
|
+
qualified: [
|
|
262
|
+
[
|
|
263
|
+
/[a-zA-Z_][\w]*/,
|
|
264
|
+
{
|
|
265
|
+
cases: {
|
|
266
|
+
"@keywords": { token: "keyword.$0" },
|
|
267
|
+
"@default": "identifier"
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
],
|
|
271
|
+
[/\./, "delimiter"],
|
|
272
|
+
["", "", "@pop"]
|
|
273
|
+
],
|
|
274
|
+
namespace: [
|
|
275
|
+
{ include: "@whitespace" },
|
|
276
|
+
[/[A-Z]\w*/, "namespace"],
|
|
277
|
+
[/[\.=]/, "delimiter"],
|
|
278
|
+
["", "", "@pop"]
|
|
279
|
+
],
|
|
280
|
+
comment: [
|
|
281
|
+
[/[^\/*]+/, "comment"],
|
|
282
|
+
// [/\/\*/, 'comment', '@push' ], // no nested comments :-(
|
|
283
|
+
["\\*/", "comment", "@pop"],
|
|
284
|
+
[/[\/*]/, "comment"]
|
|
285
|
+
],
|
|
286
|
+
string: [
|
|
287
|
+
[/[^\\"]+/, "string"],
|
|
288
|
+
[/@escapes/, "string.escape"],
|
|
289
|
+
[/\\./, "string.escape.invalid"],
|
|
290
|
+
[/"/, { token: "string.quote", next: "@pop" }]
|
|
291
|
+
],
|
|
292
|
+
litstring: [
|
|
293
|
+
[/[^"]+/, "string"],
|
|
294
|
+
[/""/, "string.escape"],
|
|
295
|
+
[/"/, { token: "string.quote", next: "@pop" }]
|
|
296
|
+
],
|
|
297
|
+
litinterpstring: [
|
|
298
|
+
[/[^"{]+/, "string"],
|
|
299
|
+
[/""/, "string.escape"],
|
|
300
|
+
[/{{/, "string.escape"],
|
|
301
|
+
[/}}/, "string.escape"],
|
|
302
|
+
[/{/, { token: "string.quote", next: "root.litinterpstring" }],
|
|
303
|
+
[/"/, { token: "string.quote", next: "@pop" }]
|
|
304
|
+
],
|
|
305
|
+
interpolatedstring: [
|
|
306
|
+
[/[^\\"{]+/, "string"],
|
|
307
|
+
[/@escapes/, "string.escape"],
|
|
308
|
+
[/\\./, "string.escape.invalid"],
|
|
309
|
+
[/{{/, "string.escape"],
|
|
310
|
+
[/}}/, "string.escape"],
|
|
311
|
+
[/{/, { token: "string.quote", next: "root.interpolatedstring" }],
|
|
312
|
+
[/"/, { token: "string.quote", next: "@pop" }]
|
|
313
|
+
],
|
|
314
|
+
whitespace: [
|
|
315
|
+
[/^[ \t\v\f]*#((r)|(load))(?=\s)/, "directive.csx"],
|
|
316
|
+
[/^[ \t\v\f]*#\w.*$/, "namespace.cpp"],
|
|
317
|
+
[/[ \t\v\f\r\n]+/, ""],
|
|
318
|
+
[/\/\*/, "comment", "@comment"],
|
|
319
|
+
[/\/\/.*$/, "comment"]
|
|
320
|
+
]
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
export {
|
|
324
|
+
e as conf,
|
|
325
|
+
t as language
|
|
326
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
const t = {
|
|
2
|
+
brackets: [],
|
|
3
|
+
autoClosingPairs: [],
|
|
4
|
+
surroundingPairs: []
|
|
5
|
+
}, r = {
|
|
6
|
+
// Set defaultToken to invalid to see what you do not tokenize yet
|
|
7
|
+
// defaultToken: 'invalid',
|
|
8
|
+
keywords: [],
|
|
9
|
+
typeKeywords: [],
|
|
10
|
+
tokenPostfix: ".csp",
|
|
11
|
+
operators: [],
|
|
12
|
+
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
|
13
|
+
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
|
14
|
+
tokenizer: {
|
|
15
|
+
root: [
|
|
16
|
+
[/child-src/, "string.quote"],
|
|
17
|
+
[/connect-src/, "string.quote"],
|
|
18
|
+
[/default-src/, "string.quote"],
|
|
19
|
+
[/font-src/, "string.quote"],
|
|
20
|
+
[/frame-src/, "string.quote"],
|
|
21
|
+
[/img-src/, "string.quote"],
|
|
22
|
+
[/manifest-src/, "string.quote"],
|
|
23
|
+
[/media-src/, "string.quote"],
|
|
24
|
+
[/object-src/, "string.quote"],
|
|
25
|
+
[/script-src/, "string.quote"],
|
|
26
|
+
[/style-src/, "string.quote"],
|
|
27
|
+
[/worker-src/, "string.quote"],
|
|
28
|
+
[/base-uri/, "string.quote"],
|
|
29
|
+
[/plugin-types/, "string.quote"],
|
|
30
|
+
[/sandbox/, "string.quote"],
|
|
31
|
+
[/disown-opener/, "string.quote"],
|
|
32
|
+
[/form-action/, "string.quote"],
|
|
33
|
+
[/frame-ancestors/, "string.quote"],
|
|
34
|
+
[/report-uri/, "string.quote"],
|
|
35
|
+
[/report-to/, "string.quote"],
|
|
36
|
+
[/upgrade-insecure-requests/, "string.quote"],
|
|
37
|
+
[/block-all-mixed-content/, "string.quote"],
|
|
38
|
+
[/require-sri-for/, "string.quote"],
|
|
39
|
+
[/reflected-xss/, "string.quote"],
|
|
40
|
+
[/referrer/, "string.quote"],
|
|
41
|
+
[/policy-uri/, "string.quote"],
|
|
42
|
+
[/'self'/, "string.quote"],
|
|
43
|
+
[/'unsafe-inline'/, "string.quote"],
|
|
44
|
+
[/'unsafe-eval'/, "string.quote"],
|
|
45
|
+
[/'strict-dynamic'/, "string.quote"],
|
|
46
|
+
[/'unsafe-hashed-attributes'/, "string.quote"]
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
export {
|
|
51
|
+
t as conf,
|
|
52
|
+
r as language
|
|
53
|
+
};
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
wordPattern: /(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,
|
|
3
|
+
comments: {
|
|
4
|
+
blockComment: ["/*", "*/"]
|
|
5
|
+
},
|
|
6
|
+
brackets: [
|
|
7
|
+
["{", "}"],
|
|
8
|
+
["[", "]"],
|
|
9
|
+
["(", ")"]
|
|
10
|
+
],
|
|
11
|
+
autoClosingPairs: [
|
|
12
|
+
{ open: "{", close: "}", notIn: ["string", "comment"] },
|
|
13
|
+
{ open: "[", close: "]", notIn: ["string", "comment"] },
|
|
14
|
+
{ open: "(", close: ")", notIn: ["string", "comment"] },
|
|
15
|
+
{ open: '"', close: '"', notIn: ["string", "comment"] },
|
|
16
|
+
{ open: "'", close: "'", notIn: ["string", "comment"] }
|
|
17
|
+
],
|
|
18
|
+
surroundingPairs: [
|
|
19
|
+
{ open: "{", close: "}" },
|
|
20
|
+
{ open: "[", close: "]" },
|
|
21
|
+
{ open: "(", close: ")" },
|
|
22
|
+
{ open: '"', close: '"' },
|
|
23
|
+
{ open: "'", close: "'" }
|
|
24
|
+
],
|
|
25
|
+
folding: {
|
|
26
|
+
markers: {
|
|
27
|
+
start: new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),
|
|
28
|
+
end: new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}, t = {
|
|
32
|
+
defaultToken: "",
|
|
33
|
+
tokenPostfix: ".css",
|
|
34
|
+
ws: `[
|
|
35
|
+
\r\f]*`,
|
|
36
|
+
// whitespaces (referenced in several rules)
|
|
37
|
+
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])))*",
|
|
38
|
+
brackets: [
|
|
39
|
+
{ open: "{", close: "}", token: "delimiter.bracket" },
|
|
40
|
+
{ open: "[", close: "]", token: "delimiter.bracket" },
|
|
41
|
+
{ open: "(", close: ")", token: "delimiter.parenthesis" },
|
|
42
|
+
{ open: "<", close: ">", token: "delimiter.angle" }
|
|
43
|
+
],
|
|
44
|
+
tokenizer: {
|
|
45
|
+
root: [{ include: "@selector" }],
|
|
46
|
+
selector: [
|
|
47
|
+
{ include: "@comments" },
|
|
48
|
+
{ include: "@import" },
|
|
49
|
+
{ include: "@strings" },
|
|
50
|
+
[
|
|
51
|
+
"[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",
|
|
52
|
+
{ token: "keyword", next: "@keyframedeclaration" }
|
|
53
|
+
],
|
|
54
|
+
["[@](page|content|font-face|-moz-document)", { token: "keyword" }],
|
|
55
|
+
["[@](charset|namespace)", { token: "keyword", next: "@declarationbody" }],
|
|
56
|
+
[
|
|
57
|
+
"(url-prefix)(\\()",
|
|
58
|
+
["attribute.value", { token: "delimiter.parenthesis", next: "@urldeclaration" }]
|
|
59
|
+
],
|
|
60
|
+
[
|
|
61
|
+
"(url)(\\()",
|
|
62
|
+
["attribute.value", { token: "delimiter.parenthesis", next: "@urldeclaration" }]
|
|
63
|
+
],
|
|
64
|
+
{ include: "@selectorname" },
|
|
65
|
+
["[\\*]", "tag"],
|
|
66
|
+
// selector symbols
|
|
67
|
+
["[>\\+,]", "delimiter"],
|
|
68
|
+
// selector operators
|
|
69
|
+
["\\[", { token: "delimiter.bracket", next: "@selectorattribute" }],
|
|
70
|
+
["{", { token: "delimiter.bracket", next: "@selectorbody" }]
|
|
71
|
+
],
|
|
72
|
+
selectorbody: [
|
|
73
|
+
{ include: "@comments" },
|
|
74
|
+
["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))", "attribute.name", "@rulevalue"],
|
|
75
|
+
// rule definition: to distinguish from a nested selector check for whitespace, number or a semicolon
|
|
76
|
+
["}", { token: "delimiter.bracket", next: "@pop" }]
|
|
77
|
+
],
|
|
78
|
+
selectorname: [
|
|
79
|
+
["(\\.|#(?=[^{])|%|(@identifier)|:)+", "tag"]
|
|
80
|
+
// selector (.foo, div, ...)
|
|
81
|
+
],
|
|
82
|
+
selectorattribute: [{ include: "@term" }, ["]", { token: "delimiter.bracket", next: "@pop" }]],
|
|
83
|
+
term: [
|
|
84
|
+
{ include: "@comments" },
|
|
85
|
+
[
|
|
86
|
+
"(url-prefix)(\\()",
|
|
87
|
+
["attribute.value", { token: "delimiter.parenthesis", next: "@urldeclaration" }]
|
|
88
|
+
],
|
|
89
|
+
[
|
|
90
|
+
"(url)(\\()",
|
|
91
|
+
["attribute.value", { token: "delimiter.parenthesis", next: "@urldeclaration" }]
|
|
92
|
+
],
|
|
93
|
+
{ include: "@functioninvocation" },
|
|
94
|
+
{ include: "@numbers" },
|
|
95
|
+
{ include: "@name" },
|
|
96
|
+
{ include: "@strings" },
|
|
97
|
+
["([<>=\\+\\-\\*\\/\\^\\|\\~,])", "delimiter"],
|
|
98
|
+
[",", "delimiter"]
|
|
99
|
+
],
|
|
100
|
+
rulevalue: [
|
|
101
|
+
{ include: "@comments" },
|
|
102
|
+
{ include: "@strings" },
|
|
103
|
+
{ include: "@term" },
|
|
104
|
+
["!important", "keyword"],
|
|
105
|
+
[";", "delimiter", "@pop"],
|
|
106
|
+
["(?=})", { token: "", next: "@pop" }]
|
|
107
|
+
// missing semicolon
|
|
108
|
+
],
|
|
109
|
+
warndebug: [["[@](warn|debug)", { token: "keyword", next: "@declarationbody" }]],
|
|
110
|
+
import: [["[@](import)", { token: "keyword", next: "@declarationbody" }]],
|
|
111
|
+
urldeclaration: [
|
|
112
|
+
{ include: "@strings" },
|
|
113
|
+
[`[^)\r
|
|
114
|
+
]+`, "string"],
|
|
115
|
+
["\\)", { token: "delimiter.parenthesis", next: "@pop" }]
|
|
116
|
+
],
|
|
117
|
+
parenthizedterm: [
|
|
118
|
+
{ include: "@term" },
|
|
119
|
+
["\\)", { token: "delimiter.parenthesis", next: "@pop" }]
|
|
120
|
+
],
|
|
121
|
+
declarationbody: [
|
|
122
|
+
{ include: "@term" },
|
|
123
|
+
[";", "delimiter", "@pop"],
|
|
124
|
+
["(?=})", { token: "", next: "@pop" }]
|
|
125
|
+
// missing semicolon
|
|
126
|
+
],
|
|
127
|
+
comments: [
|
|
128
|
+
["\\/\\*", "comment", "@comment"],
|
|
129
|
+
["\\/\\/+.*", "comment"]
|
|
130
|
+
],
|
|
131
|
+
comment: [
|
|
132
|
+
["\\*\\/", "comment", "@pop"],
|
|
133
|
+
[/[^*/]+/, "comment"],
|
|
134
|
+
[/./, "comment"]
|
|
135
|
+
],
|
|
136
|
+
name: [["@identifier", "attribute.value"]],
|
|
137
|
+
numbers: [
|
|
138
|
+
["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?", { token: "attribute.value.number", next: "@units" }],
|
|
139
|
+
["#[0-9a-fA-F_]+(?!\\w)", "attribute.value.hex"]
|
|
140
|
+
],
|
|
141
|
+
units: [
|
|
142
|
+
[
|
|
143
|
+
"(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?",
|
|
144
|
+
"attribute.value.unit",
|
|
145
|
+
"@pop"
|
|
146
|
+
]
|
|
147
|
+
],
|
|
148
|
+
keyframedeclaration: [
|
|
149
|
+
["@identifier", "attribute.value"],
|
|
150
|
+
["{", { token: "delimiter.bracket", switchTo: "@keyframebody" }]
|
|
151
|
+
],
|
|
152
|
+
keyframebody: [
|
|
153
|
+
{ include: "@term" },
|
|
154
|
+
["{", { token: "delimiter.bracket", next: "@selectorbody" }],
|
|
155
|
+
["}", { token: "delimiter.bracket", next: "@pop" }]
|
|
156
|
+
],
|
|
157
|
+
functioninvocation: [
|
|
158
|
+
["@identifier\\(", { token: "attribute.value", next: "@functionarguments" }]
|
|
159
|
+
],
|
|
160
|
+
functionarguments: [
|
|
161
|
+
["\\$@identifier@ws:", "attribute.name"],
|
|
162
|
+
["[,]", "delimiter"],
|
|
163
|
+
{ include: "@term" },
|
|
164
|
+
["\\)", { token: "attribute.value", next: "@pop" }]
|
|
165
|
+
],
|
|
166
|
+
strings: [
|
|
167
|
+
['~?"', { token: "string", next: "@stringenddoublequote" }],
|
|
168
|
+
["~?'", { token: "string", next: "@stringendquote" }]
|
|
169
|
+
],
|
|
170
|
+
stringenddoublequote: [
|
|
171
|
+
["\\\\.", "string"],
|
|
172
|
+
['"', { token: "string", next: "@pop" }],
|
|
173
|
+
[/[^\\"]+/, "string"],
|
|
174
|
+
[".", "string"]
|
|
175
|
+
],
|
|
176
|
+
stringendquote: [
|
|
177
|
+
["\\\\.", "string"],
|
|
178
|
+
["'", { token: "string", next: "@pop" }],
|
|
179
|
+
[/[^\\']+/, "string"],
|
|
180
|
+
[".", "string"]
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
export {
|
|
185
|
+
e as conf,
|
|
186
|
+
t as language
|
|
187
|
+
};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { c as h, l as s } from "./index-Ds0EJmOd.js";
|
|
2
|
+
import { C as c, H as u, D as p, a as m, R as f, b as _, c as w, d as k, F as v, e as D, S as P, f as R, g as I } from "./lspLanguageFeatures-HqO1l9Me.js";
|
|
3
|
+
import { h as b, i as H, j as y, t as U, k as T } from "./lspLanguageFeatures-HqO1l9Me.js";
|
|
4
|
+
const C = 2 * 60 * 1e3;
|
|
5
|
+
class A {
|
|
6
|
+
constructor(o) {
|
|
7
|
+
this._defaults = o, this._worker = null, this._client = null, this._idleCheckInterval = window.setInterval(() => this._checkIfIdle(), 30 * 1e3), this._lastUsedTime = 0, this._configChangeListener = this._defaults.onDidChange(() => this._stopWorker());
|
|
8
|
+
}
|
|
9
|
+
_stopWorker() {
|
|
10
|
+
this._worker && (this._worker.dispose(), this._worker = null), this._client = null;
|
|
11
|
+
}
|
|
12
|
+
dispose() {
|
|
13
|
+
clearInterval(this._idleCheckInterval), this._configChangeListener.dispose(), this._stopWorker();
|
|
14
|
+
}
|
|
15
|
+
_checkIfIdle() {
|
|
16
|
+
if (!this._worker)
|
|
17
|
+
return;
|
|
18
|
+
Date.now() - this._lastUsedTime > C && this._stopWorker();
|
|
19
|
+
}
|
|
20
|
+
_getClient() {
|
|
21
|
+
return this._lastUsedTime = Date.now(), this._client || (this._worker = h({
|
|
22
|
+
// module that exports the create() method and returns a `CSSWorker` instance
|
|
23
|
+
moduleId: "vs/language/css/cssWorker",
|
|
24
|
+
createWorker: () => new Worker(new URL(
|
|
25
|
+
/* @vite-ignore */
|
|
26
|
+
"/assets/css.worker-Cb0JI69t.js",
|
|
27
|
+
import.meta.url
|
|
28
|
+
), { type: "module" }),
|
|
29
|
+
label: this._defaults.languageId,
|
|
30
|
+
// passed in to the create() method
|
|
31
|
+
createData: {
|
|
32
|
+
options: this._defaults.options,
|
|
33
|
+
languageId: this._defaults.languageId
|
|
34
|
+
}
|
|
35
|
+
}), this._client = this._worker.getProxy()), this._client;
|
|
36
|
+
}
|
|
37
|
+
getLanguageServiceWorker(...o) {
|
|
38
|
+
let e;
|
|
39
|
+
return this._getClient().then((a) => {
|
|
40
|
+
e = a;
|
|
41
|
+
}).then((a) => {
|
|
42
|
+
if (this._worker)
|
|
43
|
+
return this._worker.withSyncedResources(o);
|
|
44
|
+
}).then((a) => e);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function F(n) {
|
|
48
|
+
const o = [], e = [], a = new A(n);
|
|
49
|
+
o.push(a);
|
|
50
|
+
const r = (...t) => a.getLanguageServiceWorker(...t);
|
|
51
|
+
function l() {
|
|
52
|
+
const { languageId: t, modeConfiguration: i } = n;
|
|
53
|
+
g(e), i.completionItems && e.push(
|
|
54
|
+
s.registerCompletionItemProvider(
|
|
55
|
+
t,
|
|
56
|
+
new c(r, ["/", "-", ":"])
|
|
57
|
+
)
|
|
58
|
+
), i.hovers && e.push(
|
|
59
|
+
s.registerHoverProvider(t, new u(r))
|
|
60
|
+
), i.documentHighlights && e.push(
|
|
61
|
+
s.registerDocumentHighlightProvider(
|
|
62
|
+
t,
|
|
63
|
+
new p(r)
|
|
64
|
+
)
|
|
65
|
+
), i.definitions && e.push(
|
|
66
|
+
s.registerDefinitionProvider(
|
|
67
|
+
t,
|
|
68
|
+
new m(r)
|
|
69
|
+
)
|
|
70
|
+
), i.references && e.push(
|
|
71
|
+
s.registerReferenceProvider(
|
|
72
|
+
t,
|
|
73
|
+
new f(r)
|
|
74
|
+
)
|
|
75
|
+
), i.documentSymbols && e.push(
|
|
76
|
+
s.registerDocumentSymbolProvider(
|
|
77
|
+
t,
|
|
78
|
+
new _(r)
|
|
79
|
+
)
|
|
80
|
+
), i.rename && e.push(
|
|
81
|
+
s.registerRenameProvider(t, new w(r))
|
|
82
|
+
), i.colors && e.push(
|
|
83
|
+
s.registerColorProvider(
|
|
84
|
+
t,
|
|
85
|
+
new k(r)
|
|
86
|
+
)
|
|
87
|
+
), i.foldingRanges && e.push(
|
|
88
|
+
s.registerFoldingRangeProvider(
|
|
89
|
+
t,
|
|
90
|
+
new v(r)
|
|
91
|
+
)
|
|
92
|
+
), i.diagnostics && e.push(
|
|
93
|
+
new D(t, r, n.onDidChange)
|
|
94
|
+
), i.selectionRanges && e.push(
|
|
95
|
+
s.registerSelectionRangeProvider(
|
|
96
|
+
t,
|
|
97
|
+
new P(r)
|
|
98
|
+
)
|
|
99
|
+
), i.documentFormattingEdits && e.push(
|
|
100
|
+
s.registerDocumentFormattingEditProvider(
|
|
101
|
+
t,
|
|
102
|
+
new R(r)
|
|
103
|
+
)
|
|
104
|
+
), i.documentRangeFormattingEdits && e.push(
|
|
105
|
+
s.registerDocumentRangeFormattingEditProvider(
|
|
106
|
+
t,
|
|
107
|
+
new I(r)
|
|
108
|
+
)
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
return l(), o.push(d(e)), d(o);
|
|
112
|
+
}
|
|
113
|
+
function d(n) {
|
|
114
|
+
return { dispose: () => g(n) };
|
|
115
|
+
}
|
|
116
|
+
function g(n) {
|
|
117
|
+
for (; n.length; )
|
|
118
|
+
n.pop().dispose();
|
|
119
|
+
}
|
|
120
|
+
export {
|
|
121
|
+
c as CompletionAdapter,
|
|
122
|
+
m as DefinitionAdapter,
|
|
123
|
+
D as DiagnosticsAdapter,
|
|
124
|
+
k as DocumentColorAdapter,
|
|
125
|
+
R as DocumentFormattingEditProvider,
|
|
126
|
+
p as DocumentHighlightAdapter,
|
|
127
|
+
b as DocumentLinkAdapter,
|
|
128
|
+
I as DocumentRangeFormattingEditProvider,
|
|
129
|
+
_ as DocumentSymbolAdapter,
|
|
130
|
+
v as FoldingRangeAdapter,
|
|
131
|
+
u as HoverAdapter,
|
|
132
|
+
f as ReferenceAdapter,
|
|
133
|
+
w as RenameAdapter,
|
|
134
|
+
P as SelectionRangeAdapter,
|
|
135
|
+
A as WorkerManager,
|
|
136
|
+
H as fromPosition,
|
|
137
|
+
y as fromRange,
|
|
138
|
+
F as setupMode,
|
|
139
|
+
U as toRange,
|
|
140
|
+
T as toTextEdit
|
|
141
|
+
};
|