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,312 @@
|
|
|
1
|
+
/*!---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (C) David Owens II, owensd.io. All rights reserved.
|
|
3
|
+
*--------------------------------------------------------------------------------------------*/
|
|
4
|
+
const e = {
|
|
5
|
+
comments: {
|
|
6
|
+
lineComment: "//",
|
|
7
|
+
blockComment: ["/*", "*/"]
|
|
8
|
+
},
|
|
9
|
+
brackets: [
|
|
10
|
+
["{", "}"],
|
|
11
|
+
["[", "]"],
|
|
12
|
+
["(", ")"]
|
|
13
|
+
],
|
|
14
|
+
autoClosingPairs: [
|
|
15
|
+
{ open: "{", close: "}" },
|
|
16
|
+
{ open: "[", close: "]" },
|
|
17
|
+
{ open: "(", close: ")" },
|
|
18
|
+
{ open: '"', close: '"' },
|
|
19
|
+
{ open: "'", close: "'" },
|
|
20
|
+
{ open: "`", close: "`" }
|
|
21
|
+
],
|
|
22
|
+
surroundingPairs: [
|
|
23
|
+
{ open: "{", close: "}" },
|
|
24
|
+
{ open: "[", close: "]" },
|
|
25
|
+
{ open: "(", close: ")" },
|
|
26
|
+
{ open: '"', close: '"' },
|
|
27
|
+
{ open: "'", close: "'" },
|
|
28
|
+
{ open: "`", close: "`" }
|
|
29
|
+
]
|
|
30
|
+
}, o = {
|
|
31
|
+
defaultToken: "",
|
|
32
|
+
tokenPostfix: ".swift",
|
|
33
|
+
// TODO(owensd): Support the full range of unicode valid identifiers.
|
|
34
|
+
identifier: /[a-zA-Z_][\w$]*/,
|
|
35
|
+
attributes: [
|
|
36
|
+
"@GKInspectable",
|
|
37
|
+
"@IBAction",
|
|
38
|
+
"@IBDesignable",
|
|
39
|
+
"@IBInspectable",
|
|
40
|
+
"@IBOutlet",
|
|
41
|
+
"@IBSegueAction",
|
|
42
|
+
"@NSApplicationMain",
|
|
43
|
+
"@NSCopying",
|
|
44
|
+
"@NSManaged",
|
|
45
|
+
"@Sendable",
|
|
46
|
+
"@UIApplicationMain",
|
|
47
|
+
"@autoclosure",
|
|
48
|
+
"@actorIndependent",
|
|
49
|
+
"@asyncHandler",
|
|
50
|
+
"@available",
|
|
51
|
+
"@convention",
|
|
52
|
+
"@derivative",
|
|
53
|
+
"@differentiable",
|
|
54
|
+
"@discardableResult",
|
|
55
|
+
"@dynamicCallable",
|
|
56
|
+
"@dynamicMemberLookup",
|
|
57
|
+
"@escaping",
|
|
58
|
+
"@frozen",
|
|
59
|
+
"@globalActor",
|
|
60
|
+
"@inlinable",
|
|
61
|
+
"@inline",
|
|
62
|
+
"@main",
|
|
63
|
+
"@noDerivative",
|
|
64
|
+
"@nonobjc",
|
|
65
|
+
"@noreturn",
|
|
66
|
+
"@objc",
|
|
67
|
+
"@objcMembers",
|
|
68
|
+
"@preconcurrency",
|
|
69
|
+
"@propertyWrapper",
|
|
70
|
+
"@requires_stored_property_inits",
|
|
71
|
+
"@resultBuilder",
|
|
72
|
+
"@testable",
|
|
73
|
+
"@unchecked",
|
|
74
|
+
"@unknown",
|
|
75
|
+
"@usableFromInline",
|
|
76
|
+
"@warn_unqualified_access"
|
|
77
|
+
],
|
|
78
|
+
accessmodifiers: ["open", "public", "internal", "fileprivate", "private"],
|
|
79
|
+
keywords: [
|
|
80
|
+
"#available",
|
|
81
|
+
"#colorLiteral",
|
|
82
|
+
"#column",
|
|
83
|
+
"#dsohandle",
|
|
84
|
+
"#else",
|
|
85
|
+
"#elseif",
|
|
86
|
+
"#endif",
|
|
87
|
+
"#error",
|
|
88
|
+
"#file",
|
|
89
|
+
"#fileID",
|
|
90
|
+
"#fileLiteral",
|
|
91
|
+
"#filePath",
|
|
92
|
+
"#function",
|
|
93
|
+
"#if",
|
|
94
|
+
"#imageLiteral",
|
|
95
|
+
"#keyPath",
|
|
96
|
+
"#line",
|
|
97
|
+
"#selector",
|
|
98
|
+
"#sourceLocation",
|
|
99
|
+
"#warning",
|
|
100
|
+
"Any",
|
|
101
|
+
"Protocol",
|
|
102
|
+
"Self",
|
|
103
|
+
"Type",
|
|
104
|
+
"actor",
|
|
105
|
+
"as",
|
|
106
|
+
"assignment",
|
|
107
|
+
"associatedtype",
|
|
108
|
+
"associativity",
|
|
109
|
+
"async",
|
|
110
|
+
"await",
|
|
111
|
+
"break",
|
|
112
|
+
"case",
|
|
113
|
+
"catch",
|
|
114
|
+
"class",
|
|
115
|
+
"continue",
|
|
116
|
+
"convenience",
|
|
117
|
+
"default",
|
|
118
|
+
"defer",
|
|
119
|
+
"deinit",
|
|
120
|
+
"didSet",
|
|
121
|
+
"do",
|
|
122
|
+
"dynamic",
|
|
123
|
+
"dynamicType",
|
|
124
|
+
"else",
|
|
125
|
+
"enum",
|
|
126
|
+
"extension",
|
|
127
|
+
"fallthrough",
|
|
128
|
+
"false",
|
|
129
|
+
"fileprivate",
|
|
130
|
+
"final",
|
|
131
|
+
"for",
|
|
132
|
+
"func",
|
|
133
|
+
"get",
|
|
134
|
+
"guard",
|
|
135
|
+
"higherThan",
|
|
136
|
+
"if",
|
|
137
|
+
"import",
|
|
138
|
+
"in",
|
|
139
|
+
"indirect",
|
|
140
|
+
"infix",
|
|
141
|
+
"init",
|
|
142
|
+
"inout",
|
|
143
|
+
"internal",
|
|
144
|
+
"is",
|
|
145
|
+
"isolated",
|
|
146
|
+
"lazy",
|
|
147
|
+
"left",
|
|
148
|
+
"let",
|
|
149
|
+
"lowerThan",
|
|
150
|
+
"mutating",
|
|
151
|
+
"nil",
|
|
152
|
+
"none",
|
|
153
|
+
"nonisolated",
|
|
154
|
+
"nonmutating",
|
|
155
|
+
"open",
|
|
156
|
+
"operator",
|
|
157
|
+
"optional",
|
|
158
|
+
"override",
|
|
159
|
+
"postfix",
|
|
160
|
+
"precedence",
|
|
161
|
+
"precedencegroup",
|
|
162
|
+
"prefix",
|
|
163
|
+
"private",
|
|
164
|
+
"protocol",
|
|
165
|
+
"public",
|
|
166
|
+
"repeat",
|
|
167
|
+
"required",
|
|
168
|
+
"rethrows",
|
|
169
|
+
"return",
|
|
170
|
+
"right",
|
|
171
|
+
"safe",
|
|
172
|
+
"self",
|
|
173
|
+
"set",
|
|
174
|
+
"some",
|
|
175
|
+
"static",
|
|
176
|
+
"struct",
|
|
177
|
+
"subscript",
|
|
178
|
+
"super",
|
|
179
|
+
"switch",
|
|
180
|
+
"throw",
|
|
181
|
+
"throws",
|
|
182
|
+
"true",
|
|
183
|
+
"try",
|
|
184
|
+
"typealias",
|
|
185
|
+
"unowned",
|
|
186
|
+
"unsafe",
|
|
187
|
+
"var",
|
|
188
|
+
"weak",
|
|
189
|
+
"where",
|
|
190
|
+
"while",
|
|
191
|
+
"willSet",
|
|
192
|
+
"__consuming",
|
|
193
|
+
"__owned"
|
|
194
|
+
],
|
|
195
|
+
symbols: /[=(){}\[\].,:;@#\_&\-<>`?!+*\\\/]/,
|
|
196
|
+
// Moved . to operatorstart so it can be a delimiter
|
|
197
|
+
operatorstart: /[\/=\-+!*%<>&|^~?\u00A1-\u00A7\u00A9\u00AB\u00AC\u00AE\u00B0-\u00B1\u00B6\u00BB\u00BF\u00D7\u00F7\u2016-\u2017\u2020-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u23FF\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3030]/,
|
|
198
|
+
operatorend: /[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE00-\uFE0F\uFE20-\uFE2F\uE0100-\uE01EF]/,
|
|
199
|
+
operators: /(@operatorstart)((@operatorstart)|(@operatorend))*/,
|
|
200
|
+
// TODO(owensd): These are borrowed from C#; need to validate correctness for Swift.
|
|
201
|
+
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
|
202
|
+
tokenizer: {
|
|
203
|
+
root: [
|
|
204
|
+
{ include: "@whitespace" },
|
|
205
|
+
{ include: "@comment" },
|
|
206
|
+
{ include: "@attribute" },
|
|
207
|
+
{ include: "@literal" },
|
|
208
|
+
{ include: "@keyword" },
|
|
209
|
+
{ include: "@invokedmethod" },
|
|
210
|
+
{ include: "@symbol" }
|
|
211
|
+
],
|
|
212
|
+
whitespace: [
|
|
213
|
+
[/\s+/, "white"],
|
|
214
|
+
[/"""/, "string.quote", "@endDblDocString"]
|
|
215
|
+
],
|
|
216
|
+
endDblDocString: [
|
|
217
|
+
[/[^"]+/, "string"],
|
|
218
|
+
[/\\"/, "string"],
|
|
219
|
+
[/"""/, "string.quote", "@popall"],
|
|
220
|
+
[/"/, "string"]
|
|
221
|
+
],
|
|
222
|
+
symbol: [
|
|
223
|
+
[/[{}()\[\]]/, "@brackets"],
|
|
224
|
+
[/[<>](?!@symbols)/, "@brackets"],
|
|
225
|
+
[/[.]/, "delimiter"],
|
|
226
|
+
[/@operators/, "operator"],
|
|
227
|
+
[/@symbols/, "operator"]
|
|
228
|
+
],
|
|
229
|
+
comment: [
|
|
230
|
+
[/\/\/\/.*$/, "comment.doc"],
|
|
231
|
+
[/\/\*\*/, "comment.doc", "@commentdocbody"],
|
|
232
|
+
[/\/\/.*$/, "comment"],
|
|
233
|
+
[/\/\*/, "comment", "@commentbody"]
|
|
234
|
+
],
|
|
235
|
+
commentdocbody: [
|
|
236
|
+
[/\/\*/, "comment", "@commentbody"],
|
|
237
|
+
[/\*\//, "comment.doc", "@pop"],
|
|
238
|
+
[/\:[a-zA-Z]+\:/, "comment.doc.param"],
|
|
239
|
+
[/./, "comment.doc"]
|
|
240
|
+
],
|
|
241
|
+
commentbody: [
|
|
242
|
+
[/\/\*/, "comment", "@commentbody"],
|
|
243
|
+
[/\*\//, "comment", "@pop"],
|
|
244
|
+
[/./, "comment"]
|
|
245
|
+
],
|
|
246
|
+
attribute: [
|
|
247
|
+
[
|
|
248
|
+
/@@@identifier/,
|
|
249
|
+
{
|
|
250
|
+
cases: {
|
|
251
|
+
"@attributes": "keyword.control",
|
|
252
|
+
"@default": ""
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
]
|
|
256
|
+
],
|
|
257
|
+
literal: [
|
|
258
|
+
[/"/, { token: "string.quote", next: "@stringlit" }],
|
|
259
|
+
[/0[b]([01]_?)+/, "number.binary"],
|
|
260
|
+
[/0[o]([0-7]_?)+/, "number.octal"],
|
|
261
|
+
[/0[x]([0-9a-fA-F]_?)+([pP][\-+](\d_?)+)?/, "number.hex"],
|
|
262
|
+
[/(\d_?)*\.(\d_?)+([eE][\-+]?(\d_?)+)?/, "number.float"],
|
|
263
|
+
[/(\d_?)+/, "number"]
|
|
264
|
+
],
|
|
265
|
+
stringlit: [
|
|
266
|
+
[/\\\(/, { token: "operator", next: "@interpolatedexpression" }],
|
|
267
|
+
[/@escapes/, "string"],
|
|
268
|
+
[/\\./, "string.escape.invalid"],
|
|
269
|
+
[/"/, { token: "string.quote", next: "@pop" }],
|
|
270
|
+
[/./, "string"]
|
|
271
|
+
],
|
|
272
|
+
interpolatedexpression: [
|
|
273
|
+
[/\(/, { token: "operator", next: "@interpolatedexpression" }],
|
|
274
|
+
[/\)/, { token: "operator", next: "@pop" }],
|
|
275
|
+
{ include: "@literal" },
|
|
276
|
+
{ include: "@keyword" },
|
|
277
|
+
{ include: "@symbol" }
|
|
278
|
+
],
|
|
279
|
+
keyword: [
|
|
280
|
+
[/`/, { token: "operator", next: "@escapedkeyword" }],
|
|
281
|
+
[
|
|
282
|
+
/@identifier/,
|
|
283
|
+
{
|
|
284
|
+
cases: {
|
|
285
|
+
"@keywords": "keyword",
|
|
286
|
+
"[A-Z][a-zA-Z0-9$]*": "type.identifier",
|
|
287
|
+
"@default": "identifier"
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
]
|
|
291
|
+
],
|
|
292
|
+
escapedkeyword: [
|
|
293
|
+
[/`/, { token: "operator", next: "@pop" }],
|
|
294
|
+
[/./, "identifier"]
|
|
295
|
+
],
|
|
296
|
+
invokedmethod: [
|
|
297
|
+
[
|
|
298
|
+
/([.])(@identifier)/,
|
|
299
|
+
{
|
|
300
|
+
cases: {
|
|
301
|
+
$2: ["delimeter", "type.identifier"],
|
|
302
|
+
"@default": ""
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
]
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
export {
|
|
310
|
+
e as conf,
|
|
311
|
+
o as language
|
|
312
|
+
};
|