@tuoyuan/code-editor 1.0.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/README.md +505 -0
- package/dist/CodeEditor.vue.d.ts +335 -0
- package/dist/abap-Ck4GwL0j.js +1404 -0
- package/dist/abap-Dm-grL-k.cjs +6 -0
- package/dist/apex-BcgYgERc.cjs +6 -0
- package/dist/apex-ODA7HKAJ.js +332 -0
- package/dist/azcli-CTIyen0u.cjs +6 -0
- package/dist/azcli-Cb6cb8s9.js +74 -0
- package/dist/bat-DNcko697.cjs +6 -0
- package/dist/bat-DTzY2NZq.js +106 -0
- package/dist/bicep-BMFU7f1t.js +108 -0
- package/dist/bicep-CaTas9h4.cjs +7 -0
- package/dist/cameligo-CI3fenw2.cjs +6 -0
- package/dist/cameligo-NLSSnjLV.js +180 -0
- package/dist/clojure-BGGaGC_c.cjs +6 -0
- package/dist/clojure-Du0upEOV.js +767 -0
- package/dist/coffee-ClJtyy1o.cjs +6 -0
- package/dist/coffee-v4uQlkM7.js +238 -0
- package/dist/cpp-C8lRvf76.cjs +6 -0
- package/dist/cpp-D8cWT5D_.js +395 -0
- package/dist/csharp-Czug7i7m.js +332 -0
- package/dist/csharp-DWhydAB-.cjs +6 -0
- package/dist/csp-BWvo8sOh.cjs +6 -0
- package/dist/csp-C8fx6eO8.js +59 -0
- package/dist/css-BpNIi06k.js +193 -0
- package/dist/css-CFi1nolN.cjs +8 -0
- package/dist/cssMode-BfZeZ0sl.js +1577 -0
- package/dist/cssMode-CroponXs.cjs +9 -0
- package/dist/cypher-C17znEzs.js +269 -0
- package/dist/cypher-CeoUqDHe.cjs +6 -0
- package/dist/dart-BmDOWGHn.cjs +6 -0
- package/dist/dart-CYyrqmCr.js +287 -0
- package/dist/dockerfile-BQUsBUh7.js +136 -0
- package/dist/dockerfile-CughGaD6.cjs +6 -0
- package/dist/ecl-BDDxLC55.cjs +6 -0
- package/dist/ecl-CJB68izO.js +462 -0
- package/dist/elixir-BPaYnkX2.cjs +6 -0
- package/dist/elixir-DljgmHqx.js +575 -0
- package/dist/flow9-0BfLJTIY.js +148 -0
- package/dist/flow9-BYsSavfX.cjs +6 -0
- package/dist/formatter.d.ts +16 -0
- package/dist/freemarker2-CpMdvAfd.cjs +8 -0
- package/dist/freemarker2-DVRVJu0B.js +995 -0
- package/dist/fsharp-SmZEcjiu.cjs +6 -0
- package/dist/fsharp-lmsaS1LJ.js +223 -0
- package/dist/go-Tv83ayL9.js +224 -0
- package/dist/go-xVW5xrOi.cjs +6 -0
- package/dist/graphql-BH1G4Uv8.js +157 -0
- package/dist/graphql-BaJ0LkdR.cjs +6 -0
- package/dist/handlebars-8AMUT0_r.cjs +6 -0
- package/dist/handlebars-cspegSxe.js +425 -0
- package/dist/hcl-9tXVo0Oo.js +189 -0
- package/dist/hcl-BTIq68i_.cjs +6 -0
- package/dist/html-Bvlf1Z20.cjs +6 -0
- package/dist/html-zabMn0fr.js +314 -0
- package/dist/htmlMode-B3y58LIC.cjs +9 -0
- package/dist/htmlMode-jXZ-OnTX.js +1587 -0
- package/dist/index-BvnET_j2.js +132407 -0
- package/dist/index-CjGIE44E.cjs +1197 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1 -0
- package/dist/index.mjs +5 -0
- package/dist/ini-CJdCU2Im.cjs +6 -0
- package/dist/ini-DZX3aW6M.js +77 -0
- package/dist/java-Day25zBa.cjs +6 -0
- package/dist/java-Q9NjwWso.js +238 -0
- package/dist/javascript-BF91TgD3.js +76 -0
- package/dist/javascript-QgWqIxzo.cjs +6 -0
- package/dist/jsonMode-Chpjh-RM.cjs +15 -0
- package/dist/jsonMode-DD3uMliY.js +2002 -0
- package/dist/julia-BqwBsF5P.cjs +6 -0
- package/dist/julia-QQBeypPo.js +517 -0
- package/dist/kotlin-2AnhId0p.js +259 -0
- package/dist/kotlin-B4u9iQDL.cjs +6 -0
- package/dist/less-CWxTTuX7.cjs +7 -0
- package/dist/less-Daawp9Qu.js +168 -0
- package/dist/lexon-B1xVKv1m.cjs +6 -0
- package/dist/lexon-CqxA-4g1.js +163 -0
- package/dist/liquid-CsQKIvsE.cjs +6 -0
- package/dist/liquid-DxypC1q6.js +246 -0
- package/dist/lua-C9DR8JqQ.js +168 -0
- package/dist/lua-GQ1AlIpR.cjs +6 -0
- package/dist/m3-ChnU6a_2.cjs +6 -0
- package/dist/m3-ChoO2Aeo.js +216 -0
- package/dist/markdown-vGe7N__p.js +235 -0
- package/dist/markdown-yRKnCzup.cjs +6 -0
- package/dist/mdx-BvsKvd6j.cjs +6 -0
- package/dist/mdx-DZRrNJcb.js +171 -0
- package/dist/mips-B35Tctk9.js +204 -0
- package/dist/mips-DE1-KCxg.cjs +6 -0
- package/dist/monaco-worker.d.ts +2 -0
- package/dist/msdax-CKduWRE-.js +381 -0
- package/dist/msdax-D0cml5wZ.cjs +6 -0
- package/dist/mysql-D4V3ltpC.js +884 -0
- package/dist/mysql-DLWkbGoZ.cjs +6 -0
- package/dist/objective-c-CaS419yz.js +189 -0
- package/dist/objective-c-aq90HTjV.cjs +6 -0
- package/dist/pascal-CzzqMa-q.js +257 -0
- package/dist/pascal-Tx_vZ5dG.cjs +6 -0
- package/dist/pascaligo-DPbJfhBm.js +170 -0
- package/dist/pascaligo-D_Ri2CTv.cjs +6 -0
- package/dist/perl-CswrnJgZ.cjs +6 -0
- package/dist/perl-DiakDHGa.js +632 -0
- package/dist/pgsql-CCS271_e.cjs +6 -0
- package/dist/pgsql-FgzHGfbe.js +857 -0
- package/dist/php-BtenrrrR.cjs +6 -0
- package/dist/php-DeEgUIDo.js +506 -0
- package/dist/pla-BtA__bSx.js +143 -0
- package/dist/pla-DqtRVxAK.cjs +6 -0
- package/dist/postiats-CDpKZOjz.js +913 -0
- package/dist/postiats-CMjeSPtv.cjs +6 -0
- package/dist/powerquery-C4wMFtve.js +896 -0
- package/dist/powerquery-DMrlf6nl.cjs +6 -0
- package/dist/powershell-BIXcUAIq.js +245 -0
- package/dist/powershell-BzvWvXBW.cjs +6 -0
- package/dist/protobuf-BHrBiKx5.js +426 -0
- package/dist/protobuf-BkfVMs3q.cjs +7 -0
- package/dist/pug-BgHHt25K.cjs +6 -0
- package/dist/pug-D_c6Bxex.js +408 -0
- package/dist/python-CDI0D2Kf.cjs +6 -0
- package/dist/python-CXOcTmBp.js +307 -0
- package/dist/qsharp-BS_wm4zq.cjs +6 -0
- package/dist/qsharp-Bmp6Uoth.js +291 -0
- package/dist/r-Cw-pZRR6.js +249 -0
- package/dist/r-XsO4bdi0.cjs +6 -0
- package/dist/razor-CAIWGDkN.cjs +6 -0
- package/dist/razor-Do5Lpn1p.js +556 -0
- package/dist/redis-D5elYsZS.cjs +6 -0
- package/dist/redis-DSkWtKTU.js +308 -0
- package/dist/redshift-BrAReR9w.cjs +6 -0
- package/dist/redshift-G3V-UH7H.js +815 -0
- package/dist/restructuredtext-C3HS0Vuf.js +180 -0
- package/dist/restructuredtext-CzNfc37y.cjs +6 -0
- package/dist/ruby-CFRrX6F7.cjs +6 -0
- package/dist/ruby-DdxOY_t-.js +517 -0
- package/dist/rust-BgYTY-pT.cjs +6 -0
- package/dist/rust-CHLNe-uh.js +349 -0
- package/dist/sb-DjdwHjNi.cjs +6 -0
- package/dist/sb-VgZvRVjv.js +121 -0
- package/dist/scala-BEo281v6.js +376 -0
- package/dist/scala-C9e5dt2E.cjs +6 -0
- package/dist/scheme-BPzKEKRg.cjs +6 -0
- package/dist/scheme-BwtlTEx9.js +114 -0
- package/dist/scss-B_KRI23k.cjs +8 -0
- package/dist/scss-DNHJcE5b.js +268 -0
- package/dist/shell-961u9U9E.cjs +6 -0
- package/dist/shell-CYXbUHt6.js +227 -0
- package/dist/solidity-B94td9D0.js +1373 -0
- package/dist/solidity-DyAQZQb-.cjs +6 -0
- package/dist/sophia-C67C1dNJ.cjs +6 -0
- package/dist/sophia-CgOMMImk.js +205 -0
- package/dist/sparql-CmRbqkGW.js +207 -0
- package/dist/sparql-DTHixtMm.cjs +6 -0
- package/dist/sql-CX8rIh5F.cjs +6 -0
- package/dist/sql-DVsVTphc.js +859 -0
- package/dist/st-ATFa4Vu3.js +422 -0
- package/dist/st-CBQkFfzG.cjs +6 -0
- package/dist/style.css +1 -0
- package/dist/swift-K4rp2L0u.js +318 -0
- package/dist/swift-XvmCMD7s.cjs +8 -0
- package/dist/systemverilog-D0lDJRC5.cjs +6 -0
- package/dist/systemverilog-YgLuECrg.js +582 -0
- package/dist/tcl-BHcJGOmo.js +238 -0
- package/dist/tcl-Ju0vlxf3.cjs +6 -0
- package/dist/tsMode-D7bHvHeH.cjs +16 -0
- package/dist/tsMode-DiYbk3vf.js +895 -0
- package/dist/twig-B1JhL8Uy.cjs +6 -0
- package/dist/twig-sVb_x968.js +398 -0
- package/dist/types.d.ts +16 -0
- package/dist/typescript-CI6w3N2S.cjs +6 -0
- package/dist/typescript-DFdjl8Xj.js +349 -0
- package/dist/typespec-BSdcQAUL.js +123 -0
- package/dist/typespec-u6UGyzVa.cjs +6 -0
- package/dist/vb-BZywMj6s.js +378 -0
- package/dist/vb-CB1voSvV.cjs +6 -0
- package/dist/wgsl-eG2bS915.js +445 -0
- package/dist/wgsl-eXQZam6Q.cjs +303 -0
- package/dist/xml-CJndgX4z.js +101 -0
- package/dist/xml-CO5xAOVk.cjs +6 -0
- package/dist/yaml--krIkoJ8.js +212 -0
- package/dist/yaml-BYk2IWKs.cjs +6 -0
- package/package.json +73 -0
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
/*!-----------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
4
|
+
* Released under the MIT license
|
|
5
|
+
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
6
|
+
*-----------------------------------------------------------------------------*/
|
|
7
|
+
var e = {
|
|
8
|
+
brackets: [
|
|
9
|
+
["{", "}"],
|
|
10
|
+
["[", "]"],
|
|
11
|
+
["(", ")"]
|
|
12
|
+
],
|
|
13
|
+
autoClosingPairs: [
|
|
14
|
+
{ open: "{", close: "}" },
|
|
15
|
+
{ open: "[", close: "]" },
|
|
16
|
+
{ open: "(", close: ")" },
|
|
17
|
+
{ open: '"', close: '"' },
|
|
18
|
+
{ open: "'", close: "'" }
|
|
19
|
+
],
|
|
20
|
+
surroundingPairs: [
|
|
21
|
+
{ open: "{", close: "}" },
|
|
22
|
+
{ open: "[", close: "]" },
|
|
23
|
+
{ open: "(", close: ")" },
|
|
24
|
+
{ open: '"', close: '"' },
|
|
25
|
+
{ open: "'", close: "'" }
|
|
26
|
+
]
|
|
27
|
+
}, t = {
|
|
28
|
+
tokenPostfix: ".tcl",
|
|
29
|
+
specialFunctions: [
|
|
30
|
+
"set",
|
|
31
|
+
"unset",
|
|
32
|
+
"rename",
|
|
33
|
+
"variable",
|
|
34
|
+
"proc",
|
|
35
|
+
"coroutine",
|
|
36
|
+
"foreach",
|
|
37
|
+
"incr",
|
|
38
|
+
"append",
|
|
39
|
+
"lappend",
|
|
40
|
+
"linsert",
|
|
41
|
+
"lreplace"
|
|
42
|
+
],
|
|
43
|
+
mainFunctions: [
|
|
44
|
+
"if",
|
|
45
|
+
"then",
|
|
46
|
+
"elseif",
|
|
47
|
+
"else",
|
|
48
|
+
"case",
|
|
49
|
+
"switch",
|
|
50
|
+
"while",
|
|
51
|
+
"for",
|
|
52
|
+
"break",
|
|
53
|
+
"continue",
|
|
54
|
+
"return",
|
|
55
|
+
"package",
|
|
56
|
+
"namespace",
|
|
57
|
+
"catch",
|
|
58
|
+
"exit",
|
|
59
|
+
"eval",
|
|
60
|
+
"expr",
|
|
61
|
+
"uplevel",
|
|
62
|
+
"upvar"
|
|
63
|
+
],
|
|
64
|
+
builtinFunctions: [
|
|
65
|
+
"file",
|
|
66
|
+
"info",
|
|
67
|
+
"concat",
|
|
68
|
+
"join",
|
|
69
|
+
"lindex",
|
|
70
|
+
"list",
|
|
71
|
+
"llength",
|
|
72
|
+
"lrange",
|
|
73
|
+
"lsearch",
|
|
74
|
+
"lsort",
|
|
75
|
+
"split",
|
|
76
|
+
"array",
|
|
77
|
+
"parray",
|
|
78
|
+
"binary",
|
|
79
|
+
"format",
|
|
80
|
+
"regexp",
|
|
81
|
+
"regsub",
|
|
82
|
+
"scan",
|
|
83
|
+
"string",
|
|
84
|
+
"subst",
|
|
85
|
+
"dict",
|
|
86
|
+
"cd",
|
|
87
|
+
"clock",
|
|
88
|
+
"exec",
|
|
89
|
+
"glob",
|
|
90
|
+
"pid",
|
|
91
|
+
"pwd",
|
|
92
|
+
"close",
|
|
93
|
+
"eof",
|
|
94
|
+
"fblocked",
|
|
95
|
+
"fconfigure",
|
|
96
|
+
"fcopy",
|
|
97
|
+
"fileevent",
|
|
98
|
+
"flush",
|
|
99
|
+
"gets",
|
|
100
|
+
"open",
|
|
101
|
+
"puts",
|
|
102
|
+
"read",
|
|
103
|
+
"seek",
|
|
104
|
+
"socket",
|
|
105
|
+
"tell",
|
|
106
|
+
"interp",
|
|
107
|
+
"after",
|
|
108
|
+
"auto_execok",
|
|
109
|
+
"auto_load",
|
|
110
|
+
"auto_mkindex",
|
|
111
|
+
"auto_reset",
|
|
112
|
+
"bgerror",
|
|
113
|
+
"error",
|
|
114
|
+
"global",
|
|
115
|
+
"history",
|
|
116
|
+
"load",
|
|
117
|
+
"source",
|
|
118
|
+
"time",
|
|
119
|
+
"trace",
|
|
120
|
+
"unknown",
|
|
121
|
+
"unset",
|
|
122
|
+
"update",
|
|
123
|
+
"vwait",
|
|
124
|
+
"winfo",
|
|
125
|
+
"wm",
|
|
126
|
+
"bind",
|
|
127
|
+
"event",
|
|
128
|
+
"pack",
|
|
129
|
+
"place",
|
|
130
|
+
"grid",
|
|
131
|
+
"font",
|
|
132
|
+
"bell",
|
|
133
|
+
"clipboard",
|
|
134
|
+
"destroy",
|
|
135
|
+
"focus",
|
|
136
|
+
"grab",
|
|
137
|
+
"lower",
|
|
138
|
+
"option",
|
|
139
|
+
"raise",
|
|
140
|
+
"selection",
|
|
141
|
+
"send",
|
|
142
|
+
"tk",
|
|
143
|
+
"tkwait",
|
|
144
|
+
"tk_bisque",
|
|
145
|
+
"tk_focusNext",
|
|
146
|
+
"tk_focusPrev",
|
|
147
|
+
"tk_focusFollowsMouse",
|
|
148
|
+
"tk_popup",
|
|
149
|
+
"tk_setPalette"
|
|
150
|
+
],
|
|
151
|
+
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
|
152
|
+
brackets: [
|
|
153
|
+
{ open: "(", close: ")", token: "delimiter.parenthesis" },
|
|
154
|
+
{ open: "{", close: "}", token: "delimiter.curly" },
|
|
155
|
+
{ open: "[", close: "]", token: "delimiter.square" }
|
|
156
|
+
],
|
|
157
|
+
escapes: /\\(?:[abfnrtv\\"'\[\]\{\};\$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
|
158
|
+
variables: /(?:\$+(?:(?:\:\:?)?[a-zA-Z_]\w*)+)/,
|
|
159
|
+
tokenizer: {
|
|
160
|
+
root: [
|
|
161
|
+
// identifiers and keywords
|
|
162
|
+
[
|
|
163
|
+
/[a-zA-Z_]\w*/,
|
|
164
|
+
{
|
|
165
|
+
cases: {
|
|
166
|
+
"@specialFunctions": {
|
|
167
|
+
token: "keyword.flow",
|
|
168
|
+
next: "@specialFunc"
|
|
169
|
+
},
|
|
170
|
+
"@mainFunctions": "keyword",
|
|
171
|
+
"@builtinFunctions": "variable",
|
|
172
|
+
"@default": "operator.scss"
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
[/\s+\-+(?!\d|\.)\w*|{\*}/, "metatag"],
|
|
177
|
+
// whitespace
|
|
178
|
+
{ include: "@whitespace" },
|
|
179
|
+
// delimiters and operators
|
|
180
|
+
[/[{}()\[\]]/, "@brackets"],
|
|
181
|
+
[/@symbols/, "operator"],
|
|
182
|
+
[/\$+(?:\:\:)?\{/, { token: "identifier", next: "@nestedVariable" }],
|
|
183
|
+
[/@variables/, "type.identifier"],
|
|
184
|
+
[/\.(?!\d|\.)[\w\-]*/, "operator.sql"],
|
|
185
|
+
// numbers
|
|
186
|
+
[/\d+(\.\d+)?/, "number"],
|
|
187
|
+
[/\d+/, "number"],
|
|
188
|
+
// delimiter
|
|
189
|
+
[/;/, "delimiter"],
|
|
190
|
+
// strings
|
|
191
|
+
[/"/, { token: "string.quote", bracket: "@open", next: "@dstring" }],
|
|
192
|
+
[/'/, { token: "string.quote", bracket: "@open", next: "@sstring" }]
|
|
193
|
+
],
|
|
194
|
+
dstring: [
|
|
195
|
+
[/\[/, { token: "@brackets", next: "@nestedCall" }],
|
|
196
|
+
[/\$+(?:\:\:)?\{/, { token: "identifier", next: "@nestedVariable" }],
|
|
197
|
+
[/@variables/, "type.identifier"],
|
|
198
|
+
[/[^\\$\[\]"]+/, "string"],
|
|
199
|
+
[/@escapes/, "string.escape"],
|
|
200
|
+
[/"/, { token: "string.quote", bracket: "@close", next: "@pop" }]
|
|
201
|
+
],
|
|
202
|
+
sstring: [
|
|
203
|
+
[/\[/, { token: "@brackets", next: "@nestedCall" }],
|
|
204
|
+
[/\$+(?:\:\:)?\{/, { token: "identifier", next: "@nestedVariable" }],
|
|
205
|
+
[/@variables/, "type.identifier"],
|
|
206
|
+
[/[^\\$\[\]']+/, "string"],
|
|
207
|
+
[/@escapes/, "string.escape"],
|
|
208
|
+
[/'/, { token: "string.quote", bracket: "@close", next: "@pop" }]
|
|
209
|
+
],
|
|
210
|
+
whitespace: [
|
|
211
|
+
[/[ \t\r\n]+/, "white"],
|
|
212
|
+
[/#.*\\$/, { token: "comment", next: "@newlineComment" }],
|
|
213
|
+
[/#.*(?!\\)$/, "comment"]
|
|
214
|
+
],
|
|
215
|
+
newlineComment: [
|
|
216
|
+
[/.*\\$/, "comment"],
|
|
217
|
+
[/.*(?!\\)$/, { token: "comment", next: "@pop" }]
|
|
218
|
+
],
|
|
219
|
+
nestedVariable: [
|
|
220
|
+
[/[^\{\}\$]+/, "type.identifier"],
|
|
221
|
+
[/\}/, { token: "identifier", next: "@pop" }]
|
|
222
|
+
],
|
|
223
|
+
nestedCall: [
|
|
224
|
+
[/\[/, { token: "@brackets", next: "@nestedCall" }],
|
|
225
|
+
[/\]/, { token: "@brackets", next: "@pop" }],
|
|
226
|
+
{ include: "root" }
|
|
227
|
+
],
|
|
228
|
+
specialFunc: [
|
|
229
|
+
[/"/, { token: "string", next: "@dstring" }],
|
|
230
|
+
[/'/, { token: "string", next: "@sstring" }],
|
|
231
|
+
[/\S+/, { token: "type", next: "@pop" }]
|
|
232
|
+
]
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
export {
|
|
236
|
+
e as conf,
|
|
237
|
+
t as language
|
|
238
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/*!-----------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
4
|
+
* Released under the MIT license
|
|
5
|
+
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
6
|
+
*-----------------------------------------------------------------------------*/var e={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},t={tokenPostfix:".tcl",specialFunctions:["set","unset","rename","variable","proc","coroutine","foreach","incr","append","lappend","linsert","lreplace"],mainFunctions:["if","then","elseif","else","case","switch","while","for","break","continue","return","package","namespace","catch","exit","eval","expr","uplevel","upvar"],builtinFunctions:["file","info","concat","join","lindex","list","llength","lrange","lsearch","lsort","split","array","parray","binary","format","regexp","regsub","scan","string","subst","dict","cd","clock","exec","glob","pid","pwd","close","eof","fblocked","fconfigure","fcopy","fileevent","flush","gets","open","puts","read","seek","socket","tell","interp","after","auto_execok","auto_load","auto_mkindex","auto_reset","bgerror","error","global","history","load","source","time","trace","unknown","unset","update","vwait","winfo","wm","bind","event","pack","place","grid","font","bell","clipboard","destroy","focus","grab","lower","option","raise","selection","send","tk","tkwait","tk_bisque","tk_focusNext","tk_focusPrev","tk_focusFollowsMouse","tk_popup","tk_setPalette"],symbols:/[=><!~?:&|+\-*\/\^%]+/,brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],escapes:/\\(?:[abfnrtv\\"'\[\]\{\};\$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,variables:/(?:\$+(?:(?:\:\:?)?[a-zA-Z_]\w*)+)/,tokenizer:{root:[[/[a-zA-Z_]\w*/,{cases:{"@specialFunctions":{token:"keyword.flow",next:"@specialFunc"},"@mainFunctions":"keyword","@builtinFunctions":"variable","@default":"operator.scss"}}],[/\s+\-+(?!\d|\.)\w*|{\*}/,"metatag"],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/@symbols/,"operator"],[/\$+(?:\:\:)?\{/,{token:"identifier",next:"@nestedVariable"}],[/@variables/,"type.identifier"],[/\.(?!\d|\.)[\w\-]*/,"operator.sql"],[/\d+(\.\d+)?/,"number"],[/\d+/,"number"],[/;/,"delimiter"],[/"/,{token:"string.quote",bracket:"@open",next:"@dstring"}],[/'/,{token:"string.quote",bracket:"@open",next:"@sstring"}]],dstring:[[/\[/,{token:"@brackets",next:"@nestedCall"}],[/\$+(?:\:\:)?\{/,{token:"identifier",next:"@nestedVariable"}],[/@variables/,"type.identifier"],[/[^\\$\[\]"]+/,"string"],[/@escapes/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],sstring:[[/\[/,{token:"@brackets",next:"@nestedCall"}],[/\$+(?:\:\:)?\{/,{token:"identifier",next:"@nestedVariable"}],[/@variables/,"type.identifier"],[/[^\\$\[\]']+/,"string"],[/@escapes/,"string.escape"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/#.*\\$/,{token:"comment",next:"@newlineComment"}],[/#.*(?!\\)$/,"comment"]],newlineComment:[[/.*\\$/,"comment"],[/.*(?!\\)$/,{token:"comment",next:"@pop"}]],nestedVariable:[[/[^\{\}\$]+/,"type.identifier"],[/\}/,{token:"identifier",next:"@pop"}]],nestedCall:[[/\[/,{token:"@brackets",next:"@nestedCall"}],[/\]/,{token:"@brackets",next:"@pop"}],{include:"root"}],specialFunc:[[/"/,{token:"string",next:"@dstring"}],[/'/,{token:"string",next:"@sstring"}],[/\S+/,{token:"type",next:"@pop"}]]}};exports.conf=e;exports.language=t;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("./index-CjGIE44E.cjs");/*!-----------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
4
|
+
* Released under the MIT license
|
|
5
|
+
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
6
|
+
*-----------------------------------------------------------------------------*/var G=Object.defineProperty,Q=Object.getOwnPropertyDescriptor,q=Object.getOwnPropertyNames,X=Object.prototype.hasOwnProperty,Y=(e,t,i,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of q(t))!X.call(e,n)&&n!==i&&G(e,n,{get:()=>t[n],enumerable:!(o=Q(t,n))||o.enumerable});return e},Z=(e,t,i)=>(Y(e,t,"default"),i),a={};Z(a,T.monaco_editor_core_star);var O=class{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=a.editor.createWebWorker({moduleId:"vs/language/typescript/tsWorker",label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(a.editor.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}},r={};r["lib.d.ts"]=!0;r["lib.decorators.d.ts"]=!0;r["lib.decorators.legacy.d.ts"]=!0;r["lib.dom.asynciterable.d.ts"]=!0;r["lib.dom.d.ts"]=!0;r["lib.dom.iterable.d.ts"]=!0;r["lib.es2015.collection.d.ts"]=!0;r["lib.es2015.core.d.ts"]=!0;r["lib.es2015.d.ts"]=!0;r["lib.es2015.generator.d.ts"]=!0;r["lib.es2015.iterable.d.ts"]=!0;r["lib.es2015.promise.d.ts"]=!0;r["lib.es2015.proxy.d.ts"]=!0;r["lib.es2015.reflect.d.ts"]=!0;r["lib.es2015.symbol.d.ts"]=!0;r["lib.es2015.symbol.wellknown.d.ts"]=!0;r["lib.es2016.array.include.d.ts"]=!0;r["lib.es2016.d.ts"]=!0;r["lib.es2016.full.d.ts"]=!0;r["lib.es2016.intl.d.ts"]=!0;r["lib.es2017.d.ts"]=!0;r["lib.es2017.date.d.ts"]=!0;r["lib.es2017.full.d.ts"]=!0;r["lib.es2017.intl.d.ts"]=!0;r["lib.es2017.object.d.ts"]=!0;r["lib.es2017.sharedmemory.d.ts"]=!0;r["lib.es2017.string.d.ts"]=!0;r["lib.es2017.typedarrays.d.ts"]=!0;r["lib.es2018.asyncgenerator.d.ts"]=!0;r["lib.es2018.asynciterable.d.ts"]=!0;r["lib.es2018.d.ts"]=!0;r["lib.es2018.full.d.ts"]=!0;r["lib.es2018.intl.d.ts"]=!0;r["lib.es2018.promise.d.ts"]=!0;r["lib.es2018.regexp.d.ts"]=!0;r["lib.es2019.array.d.ts"]=!0;r["lib.es2019.d.ts"]=!0;r["lib.es2019.full.d.ts"]=!0;r["lib.es2019.intl.d.ts"]=!0;r["lib.es2019.object.d.ts"]=!0;r["lib.es2019.string.d.ts"]=!0;r["lib.es2019.symbol.d.ts"]=!0;r["lib.es2020.bigint.d.ts"]=!0;r["lib.es2020.d.ts"]=!0;r["lib.es2020.date.d.ts"]=!0;r["lib.es2020.full.d.ts"]=!0;r["lib.es2020.intl.d.ts"]=!0;r["lib.es2020.number.d.ts"]=!0;r["lib.es2020.promise.d.ts"]=!0;r["lib.es2020.sharedmemory.d.ts"]=!0;r["lib.es2020.string.d.ts"]=!0;r["lib.es2020.symbol.wellknown.d.ts"]=!0;r["lib.es2021.d.ts"]=!0;r["lib.es2021.full.d.ts"]=!0;r["lib.es2021.intl.d.ts"]=!0;r["lib.es2021.promise.d.ts"]=!0;r["lib.es2021.string.d.ts"]=!0;r["lib.es2021.weakref.d.ts"]=!0;r["lib.es2022.array.d.ts"]=!0;r["lib.es2022.d.ts"]=!0;r["lib.es2022.error.d.ts"]=!0;r["lib.es2022.full.d.ts"]=!0;r["lib.es2022.intl.d.ts"]=!0;r["lib.es2022.object.d.ts"]=!0;r["lib.es2022.regexp.d.ts"]=!0;r["lib.es2022.sharedmemory.d.ts"]=!0;r["lib.es2022.string.d.ts"]=!0;r["lib.es2023.array.d.ts"]=!0;r["lib.es2023.collection.d.ts"]=!0;r["lib.es2023.d.ts"]=!0;r["lib.es2023.full.d.ts"]=!0;r["lib.es5.d.ts"]=!0;r["lib.es6.d.ts"]=!0;r["lib.esnext.collection.d.ts"]=!0;r["lib.esnext.d.ts"]=!0;r["lib.esnext.decorators.d.ts"]=!0;r["lib.esnext.disposable.d.ts"]=!0;r["lib.esnext.full.d.ts"]=!0;r["lib.esnext.intl.d.ts"]=!0;r["lib.esnext.object.d.ts"]=!0;r["lib.esnext.promise.d.ts"]=!0;r["lib.scripthost.d.ts"]=!0;r["lib.webworker.asynciterable.d.ts"]=!0;r["lib.webworker.d.ts"]=!0;r["lib.webworker.importscripts.d.ts"]=!0;r["lib.webworker.iterable.d.ts"]=!0;function C(e,t,i=0){if(typeof e=="string")return e;if(e===void 0)return"";let o="";if(i){o+=t;for(let n=0;n<i;n++)o+=" "}if(o+=e.messageText,i++,e.next)for(const n of e.next)o+=C(n,t,i);return o}function _(e){return e?e.map(t=>t.text).join(""):""}var y=class{constructor(e){this._worker=e}_textSpanToRange(e,t){let i=e.getPositionAt(t.start),o=e.getPositionAt(t.start+t.length),{lineNumber:n,column:l}=i,{lineNumber:u,column:s}=o;return{startLineNumber:n,startColumn:l,endLineNumber:u,endColumn:s}}},P=class{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf("/lib.")===0?!!r[e.path.slice(1)]:!1}getOrCreateModel(e){const t=a.Uri.parse(e),i=a.editor.getModel(t);if(i)return i;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return a.editor.createModel(this._libFiles[t.path.slice(1)],"typescript",t);const o=T.typescriptDefaults.getExtraLibs()[e];return o?a.editor.createModel(o.content,"typescript",t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e})),this._fetchLibFilesPromise}},L=class extends y{constructor(e,t,i,o){super(o),this._libFiles=e,this._defaults=t,this._selector=i,this._disposables=[],this._listener=Object.create(null);const n=s=>{if(s.getLanguageId()!==i)return;const c=()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h?s.isAttachedToEditor()&&this._doValidate(s):this._doValidate(s)};let g;const d=s.onDidChangeContent(()=>{clearTimeout(g),g=window.setTimeout(c,500)}),b=s.onDidChangeAttached(()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h&&(s.isAttachedToEditor()?c():a.editor.setModelMarkers(s,this._selector,[]))});this._listener[s.uri.toString()]={dispose(){d.dispose(),b.dispose(),clearTimeout(g)}},c()},l=s=>{a.editor.setModelMarkers(s,this._selector,[]);const c=s.uri.toString();this._listener[c]&&(this._listener[c].dispose(),delete this._listener[c])};this._disposables.push(a.editor.onDidCreateModel(s=>n(s))),this._disposables.push(a.editor.onWillDisposeModel(l)),this._disposables.push(a.editor.onDidChangeModelLanguage(s=>{l(s.model),n(s.model)})),this._disposables.push({dispose(){for(const s of a.editor.getModels())l(s)}});const u=()=>{for(const s of a.editor.getModels())l(s),n(s)};this._disposables.push(this._defaults.onDidChange(u)),this._disposables.push(this._defaults.onDidExtraLibsChange(u)),a.editor.getModels().forEach(s=>n(s))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){const t=await this._worker(e.uri);if(e.isDisposed())return;const i=[],{noSyntaxValidation:o,noSemanticValidation:n,noSuggestionDiagnostics:l}=this._defaults.getDiagnosticsOptions();o||i.push(t.getSyntacticDiagnostics(e.uri.toString())),n||i.push(t.getSemanticDiagnostics(e.uri.toString())),l||i.push(t.getSuggestionDiagnostics(e.uri.toString()));const u=await Promise.all(i);if(!u||e.isDisposed())return;const s=u.reduce((g,d)=>d.concat(g),[]).filter(g=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(g.code)===-1),c=s.map(g=>g.relatedInformation||[]).reduce((g,d)=>d.concat(g),[]).map(g=>g.file?a.Uri.parse(g.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(c),!e.isDisposed()&&a.editor.setModelMarkers(e,this._selector,s.map(g=>this._convertDiagnostics(e,g)))}_convertDiagnostics(e,t){const i=t.start||0,o=t.length||1,{lineNumber:n,column:l}=e.getPositionAt(i),{lineNumber:u,column:s}=e.getPositionAt(i+o),c=[];return t.reportsUnnecessary&&c.push(a.MarkerTag.Unnecessary),t.reportsDeprecated&&c.push(a.MarkerTag.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:n,startColumn:l,endLineNumber:u,endColumn:s,message:C(t.messageText,`
|
|
7
|
+
`),code:t.code.toString(),tags:c,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];const i=[];return t.forEach(o=>{let n=e;if(o.file&&(n=this._libFiles.getOrCreateModel(o.file.fileName)),!n)return;const l=o.start||0,u=o.length||1,{lineNumber:s,column:c}=n.getPositionAt(l),{lineNumber:g,column:d}=n.getPositionAt(l+u);i.push({resource:n.uri,startLineNumber:s,startColumn:c,endLineNumber:g,endColumn:d,message:C(o.messageText,`
|
|
8
|
+
`)})}),i}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return a.MarkerSeverity.Error;case 3:return a.MarkerSeverity.Info;case 0:return a.MarkerSeverity.Warning;case 2:return a.MarkerSeverity.Hint}return a.MarkerSeverity.Info}},I=class A extends y{get triggerCharacters(){return["."]}async provideCompletionItems(t,i,o,n){const l=t.getWordUntilPosition(i),u=new a.Range(i.lineNumber,l.startColumn,i.lineNumber,l.endColumn),s=t.uri,c=t.getOffsetAt(i),g=await this._worker(s);if(t.isDisposed())return;const d=await g.getCompletionsAtPosition(s.toString(),c);return!d||t.isDisposed()?void 0:{suggestions:d.entries.map(h=>{let S=u;if(h.replacementSpan){const k=t.getPositionAt(h.replacementSpan.start),x=t.getPositionAt(h.replacementSpan.start+h.replacementSpan.length);S=new a.Range(k.lineNumber,k.column,x.lineNumber,x.column)}const v=[];return h.kindModifiers!==void 0&&h.kindModifiers.indexOf("deprecated")!==-1&&v.push(a.languages.CompletionItemTag.Deprecated),{uri:s,position:i,offset:c,range:S,label:h.name,insertText:h.name,sortText:h.sortText,kind:A.convertKind(h.kind),tags:v}})}}async resolveCompletionItem(t,i){const o=t,n=o.uri,l=o.position,u=o.offset,c=await(await this._worker(n)).getCompletionEntryDetails(n.toString(),u,o.label);return c?{uri:n,position:l,label:c.name,kind:A.convertKind(c.kind),detail:_(c.displayParts),documentation:{value:A.createDocumentationString(c)}}:o}static convertKind(t){switch(t){case f.primitiveType:case f.keyword:return a.languages.CompletionItemKind.Keyword;case f.variable:case f.localVariable:return a.languages.CompletionItemKind.Variable;case f.memberVariable:case f.memberGetAccessor:case f.memberSetAccessor:return a.languages.CompletionItemKind.Field;case f.function:case f.memberFunction:case f.constructSignature:case f.callSignature:case f.indexSignature:return a.languages.CompletionItemKind.Function;case f.enum:return a.languages.CompletionItemKind.Enum;case f.module:return a.languages.CompletionItemKind.Module;case f.class:return a.languages.CompletionItemKind.Class;case f.interface:return a.languages.CompletionItemKind.Interface;case f.warning:return a.languages.CompletionItemKind.File}return a.languages.CompletionItemKind.Property}static createDocumentationString(t){let i=_(t.documentation);if(t.tags)for(const o of t.tags)i+=`
|
|
9
|
+
|
|
10
|
+
${N(o)}`;return i}};function N(e){let t=`*@${e.name}*`;if(e.name==="param"&&e.text){const[i,...o]=e.text;t+=`\`${i.text}\``,o.length>0&&(t+=` — ${o.map(n=>n.text).join(" ")}`)}else Array.isArray(e.text)?t+=` — ${e.text.map(i=>i.text).join(" ")}`:e.text&&(t+=` — ${e.text}`);return t}var M=class R extends y{constructor(){super(...arguments),this.signatureHelpTriggerCharacters=["(",","]}static _toSignatureHelpTriggerReason(t){switch(t.triggerKind){case a.languages.SignatureHelpTriggerKind.TriggerCharacter:return t.triggerCharacter?t.isRetrigger?{kind:"retrigger",triggerCharacter:t.triggerCharacter}:{kind:"characterTyped",triggerCharacter:t.triggerCharacter}:{kind:"invoked"};case a.languages.SignatureHelpTriggerKind.ContentChange:return t.isRetrigger?{kind:"retrigger"}:{kind:"invoked"};case a.languages.SignatureHelpTriggerKind.Invoke:default:return{kind:"invoked"}}}async provideSignatureHelp(t,i,o,n){const l=t.uri,u=t.getOffsetAt(i),s=await this._worker(l);if(t.isDisposed())return;const c=await s.getSignatureHelpItems(l.toString(),u,{triggerReason:R._toSignatureHelpTriggerReason(n)});if(!c||t.isDisposed())return;const g={activeSignature:c.selectedItemIndex,activeParameter:c.argumentIndex,signatures:[]};return c.items.forEach(d=>{const b={label:"",parameters:[]};b.documentation={value:_(d.documentation)},b.label+=_(d.prefixDisplayParts),d.parameters.forEach((h,S,v)=>{const k=_(h.displayParts),x={label:k,documentation:{value:_(h.documentation)}};b.label+=k,b.parameters.push(x),S<v.length-1&&(b.label+=_(d.separatorDisplayParts))}),b.label+=_(d.suffixDisplayParts),g.signatures.push(b)}),{value:g,dispose(){}}}},K=class extends y{async provideHover(e,t,i){const o=e.uri,n=e.getOffsetAt(t),l=await this._worker(o);if(e.isDisposed())return;const u=await l.getQuickInfoAtPosition(o.toString(),n);if(!u||e.isDisposed())return;const s=_(u.documentation),c=u.tags?u.tags.map(d=>N(d)).join(`
|
|
11
|
+
|
|
12
|
+
`):"",g=_(u.displayParts);return{range:this._textSpanToRange(e,u.textSpan),contents:[{value:"```typescript\n"+g+"\n```\n"},{value:s+(c?`
|
|
13
|
+
|
|
14
|
+
`+c:"")}]}}},H=class extends y{async provideDocumentHighlights(e,t,i){const o=e.uri,n=e.getOffsetAt(t),l=await this._worker(o);if(e.isDisposed())return;const u=await l.getDocumentHighlights(o.toString(),n,[o.toString()]);if(!(!u||e.isDisposed()))return u.flatMap(s=>s.highlightSpans.map(c=>({range:this._textSpanToRange(e,c.textSpan),kind:c.kind==="writtenReference"?a.languages.DocumentHighlightKind.Write:a.languages.DocumentHighlightKind.Text})))}},E=class extends y{constructor(e,t){super(t),this._libFiles=e}async provideDefinition(e,t,i){const o=e.uri,n=e.getOffsetAt(t),l=await this._worker(o);if(e.isDisposed())return;const u=await l.getDefinitionAtPosition(o.toString(),n);if(!u||e.isDisposed()||(await this._libFiles.fetchLibFilesIfNecessary(u.map(c=>a.Uri.parse(c.fileName))),e.isDisposed()))return;const s=[];for(let c of u){const g=this._libFiles.getOrCreateModel(c.fileName);g&&s.push({uri:g.uri,range:this._textSpanToRange(g,c.textSpan)})}return s}},W=class extends y{constructor(e,t){super(t),this._libFiles=e}async provideReferences(e,t,i,o){const n=e.uri,l=e.getOffsetAt(t),u=await this._worker(n);if(e.isDisposed())return;const s=await u.getReferencesAtPosition(n.toString(),l);if(!s||e.isDisposed()||(await this._libFiles.fetchLibFilesIfNecessary(s.map(g=>a.Uri.parse(g.fileName))),e.isDisposed()))return;const c=[];for(let g of s){const d=this._libFiles.getOrCreateModel(g.fileName);d&&c.push({uri:d.uri,range:this._textSpanToRange(d,g.textSpan)})}return c}},V=class extends y{async provideDocumentSymbols(e,t){const i=e.uri,o=await this._worker(i);if(e.isDisposed())return;const n=await o.getNavigationTree(i.toString());if(!n||e.isDisposed())return;const l=(s,c)=>{var d;return{name:s.text,detail:"",kind:m[s.kind]||a.languages.SymbolKind.Variable,range:this._textSpanToRange(e,s.spans[0]),selectionRange:this._textSpanToRange(e,s.spans[0]),tags:[],children:(d=s.childItems)==null?void 0:d.map(b=>l(b,s.text)),containerName:c}};return n.childItems?n.childItems.map(s=>l(s)):[]}},p,f=(p=class{},p.unknown="",p.keyword="keyword",p.script="script",p.module="module",p.class="class",p.interface="interface",p.type="type",p.enum="enum",p.variable="var",p.localVariable="local var",p.function="function",p.localFunction="local function",p.memberFunction="method",p.memberGetAccessor="getter",p.memberSetAccessor="setter",p.memberVariable="property",p.constructorImplementation="constructor",p.callSignature="call",p.indexSignature="index",p.constructSignature="construct",p.parameter="parameter",p.typeParameter="type parameter",p.primitiveType="primitive type",p.label="label",p.alias="alias",p.const="const",p.let="let",p.warning="warning",p),m=Object.create(null);m[f.module]=a.languages.SymbolKind.Module;m[f.class]=a.languages.SymbolKind.Class;m[f.enum]=a.languages.SymbolKind.Enum;m[f.interface]=a.languages.SymbolKind.Interface;m[f.memberFunction]=a.languages.SymbolKind.Method;m[f.memberVariable]=a.languages.SymbolKind.Property;m[f.memberGetAccessor]=a.languages.SymbolKind.Property;m[f.memberSetAccessor]=a.languages.SymbolKind.Property;m[f.variable]=a.languages.SymbolKind.Variable;m[f.const]=a.languages.SymbolKind.Variable;m[f.localVariable]=a.languages.SymbolKind.Variable;m[f.variable]=a.languages.SymbolKind.Variable;m[f.function]=a.languages.SymbolKind.Function;m[f.localFunction]=a.languages.SymbolKind.Function;var w=class extends y{static _convertOptions(e){return{ConvertTabsToSpaces:e.insertSpaces,TabSize:e.tabSize,IndentSize:e.tabSize,IndentStyle:2,NewLineCharacter:`
|
|
15
|
+
`,InsertSpaceAfterCommaDelimiter:!0,InsertSpaceAfterSemicolonInForStatements:!0,InsertSpaceBeforeAndAfterBinaryOperators:!0,InsertSpaceAfterKeywordsInControlFlowStatements:!0,InsertSpaceAfterFunctionKeywordForAnonymousFunctions:!0,InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,PlaceOpenBraceOnNewLineForControlBlocks:!1,PlaceOpenBraceOnNewLineForFunctions:!1}}_convertTextChanges(e,t){return{text:t.newText,range:this._textSpanToRange(e,t.span)}}},j=class extends w{constructor(){super(...arguments),this.canFormatMultipleRanges=!1}async provideDocumentRangeFormattingEdits(e,t,i,o){const n=e.uri,l=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),u=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),s=await this._worker(n);if(e.isDisposed())return;const c=await s.getFormattingEditsForRange(n.toString(),l,u,w._convertOptions(i));if(!(!c||e.isDisposed()))return c.map(g=>this._convertTextChanges(e,g))}},B=class extends w{get autoFormatTriggerCharacters(){return[";","}",`
|
|
16
|
+
`]}async provideOnTypeFormattingEdits(e,t,i,o,n){const l=e.uri,u=e.getOffsetAt(t),s=await this._worker(l);if(e.isDisposed())return;const c=await s.getFormattingEditsAfterKeystroke(l.toString(),u,i,w._convertOptions(o));if(!(!c||e.isDisposed()))return c.map(g=>this._convertTextChanges(e,g))}},U=class extends w{async provideCodeActions(e,t,i,o){const n=e.uri,l=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),u=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),s=w._convertOptions(e.getOptions()),c=i.markers.filter(h=>h.code).map(h=>h.code).map(Number),g=await this._worker(n);if(e.isDisposed())return;const d=await g.getCodeFixesAtPosition(n.toString(),l,u,c,s);return!d||e.isDisposed()?{actions:[],dispose:()=>{}}:{actions:d.filter(h=>h.changes.filter(S=>S.isNewFile).length===0).map(h=>this._tsCodeFixActionToMonacoCodeAction(e,i,h)),dispose:()=>{}}}_tsCodeFixActionToMonacoCodeAction(e,t,i){const o=[];for(const l of i.changes)for(const u of l.textChanges)o.push({resource:e.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(e,u.span),text:u.newText}});return{title:i.description,edit:{edits:o},diagnostics:t.markers,kind:"quickfix"}}},$=class extends y{constructor(e,t){super(t),this._libFiles=e}async provideRenameEdits(e,t,i,o){const n=e.uri,l=n.toString(),u=e.getOffsetAt(t),s=await this._worker(n);if(e.isDisposed())return;const c=await s.getRenameInfo(l,u,{allowRenameOfImportPath:!1});if(c.canRename===!1)return{edits:[],rejectReason:c.localizedErrorMessage};if(c.fileToRename!==void 0)throw new Error("Renaming files is not supported.");const g=await s.findRenameLocations(l,u,!1,!1,!1);if(!g||e.isDisposed())return;const d=[];for(const b of g){const h=this._libFiles.getOrCreateModel(b.fileName);if(h)d.push({resource:h.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(h,b.textSpan),text:i}});else throw new Error(`Unknown file ${b.fileName}.`)}return{edits:d}}},z=class extends y{async provideInlayHints(e,t,i){const o=e.uri,n=o.toString(),l=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),u=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),s=await this._worker(o);return e.isDisposed()?null:{hints:(await s.provideInlayHints(n,l,u)).map(d=>({...d,label:d.text,position:e.getPositionAt(d.position),kind:this._convertHintKind(d.kind)})),dispose:()=>{}}}_convertHintKind(e){switch(e){case"Parameter":return a.languages.InlayHintKind.Parameter;case"Type":return a.languages.InlayHintKind.Type;default:return a.languages.InlayHintKind.Type}}},D,F;function ee(e){F=J(e,"typescript")}function te(e){D=J(e,"javascript")}function se(){return new Promise((e,t)=>{if(!D)return t("JavaScript not registered!");e(D)})}function re(){return new Promise((e,t)=>{if(!F)return t("TypeScript not registered!");e(F)})}function J(e,t){const i=[],o=new O(t,e),n=(...s)=>o.getLanguageServiceWorker(...s),l=new P(n);function u(){const{modeConfiguration:s}=e;ie(i),s.completionItems&&i.push(a.languages.registerCompletionItemProvider(t,new I(n))),s.signatureHelp&&i.push(a.languages.registerSignatureHelpProvider(t,new M(n))),s.hovers&&i.push(a.languages.registerHoverProvider(t,new K(n))),s.documentHighlights&&i.push(a.languages.registerDocumentHighlightProvider(t,new H(n))),s.definitions&&i.push(a.languages.registerDefinitionProvider(t,new E(l,n))),s.references&&i.push(a.languages.registerReferenceProvider(t,new W(l,n))),s.documentSymbols&&i.push(a.languages.registerDocumentSymbolProvider(t,new V(n))),s.rename&&i.push(a.languages.registerRenameProvider(t,new $(l,n))),s.documentRangeFormattingEdits&&i.push(a.languages.registerDocumentRangeFormattingEditProvider(t,new j(n))),s.onTypeFormattingEdits&&i.push(a.languages.registerOnTypeFormattingEditProvider(t,new B(n))),s.codeActions&&i.push(a.languages.registerCodeActionProvider(t,new U(n))),s.inlayHints&&i.push(a.languages.registerInlayHintsProvider(t,new z(n))),s.diagnostics&&i.push(new L(l,e,t,n))}return u(),n}function ie(e){for(;e.length;)e.pop().dispose()}exports.Adapter=y;exports.CodeActionAdaptor=U;exports.DefinitionAdapter=E;exports.DiagnosticsAdapter=L;exports.DocumentHighlightAdapter=H;exports.FormatAdapter=j;exports.FormatHelper=w;exports.FormatOnTypeAdapter=B;exports.InlayHintsAdapter=z;exports.Kind=f;exports.LibFiles=P;exports.OutlineAdapter=V;exports.QuickInfoAdapter=K;exports.ReferenceAdapter=W;exports.RenameAdapter=$;exports.SignatureHelpAdapter=M;exports.SuggestAdapter=I;exports.WorkerManager=O;exports.flattenDiagnosticMessageText=C;exports.getJavaScriptWorker=se;exports.getTypeScriptWorker=re;exports.setupJavaScript=te;exports.setupTypeScript=ee;
|