@covalent/components 8.15.0-beta.5 → 8.15.0-beta.7
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/cell.js +2 -2
- package/cell.mjs +2 -2
- package/code-editor/code-editor.d.ts +23 -1
- package/code-editor/code-editor.d.ts.map +1 -1
- package/code-editor-3a09cbf1.js +732 -0
- package/{code-editor-50658551.mjs → code-editor-ce557bd5.mjs} +14343 -47224
- package/code-editor.js +1 -1
- package/code-editor.mjs +1 -1
- package/{html-e9028ad1.js → html-4fffc46e.js} +1 -1
- package/{html-201c3d5b.mjs → html-783f1e7c.mjs} +1 -1
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/{javascript-b57f3bab.mjs → javascript-4d09cd3c.mjs} +2 -2
- package/{javascript-3c211951.js → javascript-90bb18e6.js} +1 -1
- package/notebook/notebook.d.ts.map +1 -1
- package/notebook.js +4 -4
- package/notebook.mjs +40 -33
- package/package.json +1 -1
- package/{python-fc06c865.mjs → python-562f8e9b.mjs} +1 -1
- package/{python-bc49c081.js → python-af3aad7d.js} +1 -1
- package/style.css +1 -1
- package/{typescript-40210801.js → typescript-76d039b3.js} +1 -1
- package/{typescript-43c5c20d.mjs → typescript-a2a5d6b2.mjs} +1 -1
- package/{xml-fa896994.mjs → xml-89571455.mjs} +1 -1
- package/{xml-7bc2fc7c.js → xml-e66929d0.js} +1 -1
- package/{yaml-ed9aa786.js → yaml-11a91e71.js} +1 -1
- package/{yaml-78bd2cbe.mjs → yaml-4eccd122.mjs} +1 -1
- package/abap-1354785f.mjs +0 -1314
- package/abap-c7187853.js +0 -6
- package/apex-279d4f27.mjs +0 -315
- package/apex-fc5f2b3e.js +0 -6
- package/azcli-ba812c55.mjs +0 -74
- package/azcli-eb191d91.js +0 -6
- package/bat-34d38df4.js +0 -6
- package/bat-4d77495d.mjs +0 -95
- package/bicep-7b240724.mjs +0 -108
- package/bicep-a8264e77.js +0 -7
- package/cameligo-5d2daeb8.mjs +0 -168
- package/cameligo-6e71c8f3.js +0 -6
- package/clojure-355adae1.js +0 -6
- package/clojure-b7ea12a3.mjs +0 -754
- package/code-editor-1a85e0d5.js +0 -1200
- package/coffee-1a8cfbf4.mjs +0 -228
- package/coffee-fd8a7421.js +0 -6
- package/csp-54919de0.js +0 -6
- package/csp-96407af0.mjs +0 -57
- package/cssMode-2b74fdc2.mjs +0 -1450
- package/cssMode-9d3a459c.js +0 -9
- package/cypher-11e5a4b6.mjs +0 -262
- package/cypher-cc849b67.js +0 -6
- package/dockerfile-2f8684f7.js +0 -6
- package/dockerfile-8739cff7.mjs +0 -132
- package/ecl-68a6f20f.js +0 -6
- package/ecl-a20c5155.mjs +0 -454
- package/elixir-32cc668e.js +0 -6
- package/elixir-8b028584.mjs +0 -467
- package/flow9-0dea2e73.mjs +0 -141
- package/flow9-1d2ab5f6.js +0 -6
- package/freemarker2-bde9aca2.js +0 -8
- package/freemarker2-cfbd8857.mjs +0 -648
- package/fsharp-49a70fad.mjs +0 -210
- package/fsharp-a22f5013.js +0 -6
- package/graphql-1a14eb34.js +0 -6
- package/graphql-51a577e5.mjs +0 -141
- package/handlebars-c9cf3ba5.mjs +0 -396
- package/handlebars-f9941f98.js +0 -6
- package/hcl-0833427e.js +0 -6
- package/hcl-56b85754.mjs +0 -177
- package/htmlMode-81e069aa.mjs +0 -1460
- package/htmlMode-8825beb1.js +0 -9
- package/ini-1d58d82f.mjs +0 -68
- package/ini-34a929df.js +0 -6
- package/jsonMode-1e42d08e.mjs +0 -1871
- package/jsonMode-8cd3f8b9.js +0 -11
- package/julia-7db1fb9a.js +0 -6
- package/julia-a0caf483.mjs +0 -496
- package/less-5219eae1.js +0 -7
- package/less-718543b4.mjs +0 -168
- package/lexon-5e6e7a44.mjs +0 -151
- package/lexon-dfd683ab.js +0 -6
- package/liquid-987381d2.mjs +0 -243
- package/liquid-c3f3aaaf.js +0 -6
- package/m3-87473279.js +0 -6
- package/m3-aadaf771.mjs +0 -210
- package/mips-161e49ce.mjs +0 -194
- package/mips-82a1ce59.js +0 -6
- package/msdax-b3b5017e.js +0 -6
- package/msdax-f65cb1e6.mjs +0 -377
- package/mysql-24549dd1.mjs +0 -875
- package/mysql-69f1c589.js +0 -6
- package/objective-c-c8319b65.js +0 -6
- package/objective-c-e129a5ca.mjs +0 -188
- package/pascal-4ccdf5ce.mjs +0 -245
- package/pascal-e5207a08.js +0 -6
- package/pascaligo-8eb79945.js +0 -6
- package/pascaligo-a9603dcd.mjs +0 -158
- package/perl-ba1fb97a.mjs +0 -599
- package/perl-e8264c91.js +0 -6
- package/pgsql-89978310.mjs +0 -843
- package/pgsql-c8ba6faf.js +0 -6
- package/pla-96c2695d.mjs +0 -131
- package/pla-c85b0e59.js +0 -6
- package/postiats-3c2c478e.js +0 -6
- package/postiats-7b52ebac.mjs +0 -544
- package/powerquery-8954ec26.mjs +0 -890
- package/powerquery-b0d5f9e4.js +0 -6
- package/powershell-cdb88123.js +0 -6
- package/powershell-f00d0274.mjs +0 -233
- package/protobuf-3eb85f80.mjs +0 -422
- package/protobuf-a3b2ca94.js +0 -7
- package/pug-6fab415a.mjs +0 -393
- package/pug-c5df821d.js +0 -6
- package/qsharp-4792f872.mjs +0 -282
- package/qsharp-7eddb7b9.js +0 -6
- package/razor-52a04ea4.mjs +0 -517
- package/razor-90572182.js +0 -6
- package/redis-0d0a89dd.js +0 -6
- package/redis-276b8288.mjs +0 -298
- package/redshift-520a7359.mjs +0 -806
- package/redshift-b6bdaeca.js +0 -6
- package/restructuredtext-4676a3fc.mjs +0 -162
- package/restructuredtext-c83d56ed.js +0 -6
- package/ruby-764137cd.mjs +0 -444
- package/ruby-96103dcf.js +0 -6
- package/sb-8c22f14c.mjs +0 -110
- package/sb-e2701210.js +0 -6
- package/scheme-b9cbf7cb.js +0 -6
- package/scheme-e6a52cb0.mjs +0 -114
- package/scss-45104c77.mjs +0 -244
- package/scss-d0f4f80e.js +0 -8
- package/solidity-d4979008.mjs +0 -1351
- package/solidity-f1319e8a.js +0 -6
- package/sophia-21995caf.mjs +0 -190
- package/sophia-a1ce907f.js +0 -6
- package/sparql-5088743c.mjs +0 -193
- package/sparql-98d9e092.js +0 -6
- package/st-122893c4.js +0 -6
- package/st-fa9ab362.mjs +0 -414
- package/systemverilog-8139818b.js +0 -6
- package/systemverilog-a4f858ed.mjs +0 -556
- package/tcl-8adf937f.mjs +0 -232
- package/tcl-e49fed0b.js +0 -6
- package/tsMode-d31816b7.js +0 -16
- package/tsMode-f63ee283.mjs +0 -794
- package/twig-404eb73e.mjs +0 -323
- package/twig-4bfb5b04.js +0 -6
- package/vb-8dfd000c.js +0 -6
- package/vb-e21e8153.mjs +0 -364
package/tsMode-f63ee283.mjs
DELETED
@@ -1,794 +0,0 @@
|
|
1
|
-
var M = Object.defineProperty;
|
2
|
-
var K = (e, t, r) => t in e ? M(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
3
|
-
var _ = (e, t, r) => (K(e, typeof t != "symbol" ? t + "" : t, r), r);
|
4
|
-
import { t as R, m as E } from "./code-editor-50658551.mjs";
|
5
|
-
import "./query-assigned-elements-4a39219d.mjs";
|
6
|
-
import "./property-9b6ea53b.mjs";
|
7
|
-
import "./async-directive-99a01ec7.mjs";
|
8
|
-
import "./directive-helpers-e3ea6592.mjs";
|
9
|
-
import "./directive-daf4e9b6.mjs";
|
10
|
-
/*!-----------------------------------------------------------------------------
|
11
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
12
|
-
* Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f)
|
13
|
-
* Released under the MIT license
|
14
|
-
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
15
|
-
*-----------------------------------------------------------------------------*/
|
16
|
-
var P = Object.defineProperty, H = Object.getOwnPropertyDescriptor, V = Object.getOwnPropertyNames, W = Object.prototype.hasOwnProperty, j = (e, t, r) => t in e ? P(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, T = (e, t, r, s) => {
|
17
|
-
if (t && typeof t == "object" || typeof t == "function")
|
18
|
-
for (let a of V(t))
|
19
|
-
!W.call(e, a) && a !== r && P(e, a, { get: () => t[a], enumerable: !(s = H(t, a)) || s.enumerable });
|
20
|
-
return e;
|
21
|
-
}, B = (e, t, r) => (T(e, t, "default"), r && T(r, t, "default")), b = (e, t, r) => (j(e, typeof t != "symbol" ? t + "" : t, r), r), i = {};
|
22
|
-
B(i, E);
|
23
|
-
var U = class {
|
24
|
-
constructor(e, t) {
|
25
|
-
_(this, "_configChangeListener");
|
26
|
-
_(this, "_updateExtraLibsToken");
|
27
|
-
_(this, "_extraLibsChangeListener");
|
28
|
-
_(this, "_worker");
|
29
|
-
_(this, "_client");
|
30
|
-
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());
|
31
|
-
}
|
32
|
-
dispose() {
|
33
|
-
this._configChangeListener.dispose(), this._extraLibsChangeListener.dispose(), this._stopWorker();
|
34
|
-
}
|
35
|
-
_stopWorker() {
|
36
|
-
this._worker && (this._worker.dispose(), this._worker = null), this._client = null;
|
37
|
-
}
|
38
|
-
async _updateExtraLibs() {
|
39
|
-
if (!this._worker)
|
40
|
-
return;
|
41
|
-
const e = ++this._updateExtraLibsToken, t = await this._worker.getProxy();
|
42
|
-
this._updateExtraLibsToken === e && t.updateExtraLibs(this._defaults.getExtraLibs());
|
43
|
-
}
|
44
|
-
_getClient() {
|
45
|
-
return this._client || (this._client = (async () => (this._worker = i.editor.createWebWorker({
|
46
|
-
moduleId: "vs/language/typescript/tsWorker",
|
47
|
-
label: this._modeId,
|
48
|
-
keepIdleModels: !0,
|
49
|
-
createData: {
|
50
|
-
compilerOptions: this._defaults.getCompilerOptions(),
|
51
|
-
extraLibs: this._defaults.getExtraLibs(),
|
52
|
-
customWorkerPath: this._defaults.workerOptions.customWorkerPath,
|
53
|
-
inlayHintsOptions: this._defaults.inlayHintsOptions
|
54
|
-
}
|
55
|
-
}), this._defaults.getEagerModelSync() ? await this._worker.withSyncedResources(i.editor.getModels().filter((e) => e.getLanguageId() === this._modeId).map((e) => e.uri)) : await this._worker.getProxy()))()), this._client;
|
56
|
-
}
|
57
|
-
async getLanguageServiceWorker(...e) {
|
58
|
-
const t = await this._getClient();
|
59
|
-
return this._worker && await this._worker.withSyncedResources(e), t;
|
60
|
-
}
|
61
|
-
}, o = {};
|
62
|
-
o["lib.d.ts"] = !0;
|
63
|
-
o["lib.dom.d.ts"] = !0;
|
64
|
-
o["lib.dom.iterable.d.ts"] = !0;
|
65
|
-
o["lib.es2015.collection.d.ts"] = !0;
|
66
|
-
o["lib.es2015.core.d.ts"] = !0;
|
67
|
-
o["lib.es2015.d.ts"] = !0;
|
68
|
-
o["lib.es2015.generator.d.ts"] = !0;
|
69
|
-
o["lib.es2015.iterable.d.ts"] = !0;
|
70
|
-
o["lib.es2015.promise.d.ts"] = !0;
|
71
|
-
o["lib.es2015.proxy.d.ts"] = !0;
|
72
|
-
o["lib.es2015.reflect.d.ts"] = !0;
|
73
|
-
o["lib.es2015.symbol.d.ts"] = !0;
|
74
|
-
o["lib.es2015.symbol.wellknown.d.ts"] = !0;
|
75
|
-
o["lib.es2016.array.include.d.ts"] = !0;
|
76
|
-
o["lib.es2016.d.ts"] = !0;
|
77
|
-
o["lib.es2016.full.d.ts"] = !0;
|
78
|
-
o["lib.es2017.d.ts"] = !0;
|
79
|
-
o["lib.es2017.full.d.ts"] = !0;
|
80
|
-
o["lib.es2017.intl.d.ts"] = !0;
|
81
|
-
o["lib.es2017.object.d.ts"] = !0;
|
82
|
-
o["lib.es2017.sharedmemory.d.ts"] = !0;
|
83
|
-
o["lib.es2017.string.d.ts"] = !0;
|
84
|
-
o["lib.es2017.typedarrays.d.ts"] = !0;
|
85
|
-
o["lib.es2018.asyncgenerator.d.ts"] = !0;
|
86
|
-
o["lib.es2018.asynciterable.d.ts"] = !0;
|
87
|
-
o["lib.es2018.d.ts"] = !0;
|
88
|
-
o["lib.es2018.full.d.ts"] = !0;
|
89
|
-
o["lib.es2018.intl.d.ts"] = !0;
|
90
|
-
o["lib.es2018.promise.d.ts"] = !0;
|
91
|
-
o["lib.es2018.regexp.d.ts"] = !0;
|
92
|
-
o["lib.es2019.array.d.ts"] = !0;
|
93
|
-
o["lib.es2019.d.ts"] = !0;
|
94
|
-
o["lib.es2019.full.d.ts"] = !0;
|
95
|
-
o["lib.es2019.object.d.ts"] = !0;
|
96
|
-
o["lib.es2019.string.d.ts"] = !0;
|
97
|
-
o["lib.es2019.symbol.d.ts"] = !0;
|
98
|
-
o["lib.es2020.bigint.d.ts"] = !0;
|
99
|
-
o["lib.es2020.d.ts"] = !0;
|
100
|
-
o["lib.es2020.full.d.ts"] = !0;
|
101
|
-
o["lib.es2020.intl.d.ts"] = !0;
|
102
|
-
o["lib.es2020.promise.d.ts"] = !0;
|
103
|
-
o["lib.es2020.sharedmemory.d.ts"] = !0;
|
104
|
-
o["lib.es2020.string.d.ts"] = !0;
|
105
|
-
o["lib.es2020.symbol.wellknown.d.ts"] = !0;
|
106
|
-
o["lib.es2021.d.ts"] = !0;
|
107
|
-
o["lib.es2021.full.d.ts"] = !0;
|
108
|
-
o["lib.es2021.intl.d.ts"] = !0;
|
109
|
-
o["lib.es2021.promise.d.ts"] = !0;
|
110
|
-
o["lib.es2021.string.d.ts"] = !0;
|
111
|
-
o["lib.es2021.weakref.d.ts"] = !0;
|
112
|
-
o["lib.es5.d.ts"] = !0;
|
113
|
-
o["lib.es6.d.ts"] = !0;
|
114
|
-
o["lib.esnext.d.ts"] = !0;
|
115
|
-
o["lib.esnext.full.d.ts"] = !0;
|
116
|
-
o["lib.esnext.intl.d.ts"] = !0;
|
117
|
-
o["lib.esnext.promise.d.ts"] = !0;
|
118
|
-
o["lib.esnext.string.d.ts"] = !0;
|
119
|
-
o["lib.esnext.weakref.d.ts"] = !0;
|
120
|
-
o["lib.scripthost.d.ts"] = !0;
|
121
|
-
o["lib.webworker.d.ts"] = !0;
|
122
|
-
o["lib.webworker.importscripts.d.ts"] = !0;
|
123
|
-
o["lib.webworker.iterable.d.ts"] = !0;
|
124
|
-
function F(e, t, r = 0) {
|
125
|
-
if (typeof e == "string")
|
126
|
-
return e;
|
127
|
-
if (e === void 0)
|
128
|
-
return "";
|
129
|
-
let s = "";
|
130
|
-
if (r) {
|
131
|
-
s += t;
|
132
|
-
for (let a = 0; a < r; a++)
|
133
|
-
s += " ";
|
134
|
-
}
|
135
|
-
if (s += e.messageText, r++, e.next)
|
136
|
-
for (const a of e.next)
|
137
|
-
s += F(a, t, r);
|
138
|
-
return s;
|
139
|
-
}
|
140
|
-
function k(e) {
|
141
|
-
return e ? e.map((t) => t.text).join("") : "";
|
142
|
-
}
|
143
|
-
var w = class {
|
144
|
-
constructor(e) {
|
145
|
-
this._worker = e;
|
146
|
-
}
|
147
|
-
_textSpanToRange(e, t) {
|
148
|
-
let r = e.getPositionAt(t.start), s = e.getPositionAt(t.start + t.length), { lineNumber: a, column: u } = r, { lineNumber: c, column: g } = s;
|
149
|
-
return { startLineNumber: a, startColumn: u, endLineNumber: c, endColumn: g };
|
150
|
-
}
|
151
|
-
}, $ = class {
|
152
|
-
constructor(e) {
|
153
|
-
_(this, "_libFiles");
|
154
|
-
_(this, "_hasFetchedLibFiles");
|
155
|
-
_(this, "_fetchLibFilesPromise");
|
156
|
-
this._worker = e, this._libFiles = {}, this._hasFetchedLibFiles = !1, this._fetchLibFilesPromise = null;
|
157
|
-
}
|
158
|
-
isLibFile(e) {
|
159
|
-
return e && e.path.indexOf("/lib.") === 0 ? !!o[e.path.slice(1)] : !1;
|
160
|
-
}
|
161
|
-
getOrCreateModel(e) {
|
162
|
-
const t = i.Uri.parse(e), r = i.editor.getModel(t);
|
163
|
-
if (r)
|
164
|
-
return r;
|
165
|
-
if (this.isLibFile(t) && this._hasFetchedLibFiles)
|
166
|
-
return i.editor.createModel(this._libFiles[t.path.slice(1)], "typescript", t);
|
167
|
-
const s = R.getExtraLibs()[e];
|
168
|
-
return s ? i.editor.createModel(s.content, "typescript", t) : null;
|
169
|
-
}
|
170
|
-
_containsLibFile(e) {
|
171
|
-
for (let t of e)
|
172
|
-
if (this.isLibFile(t))
|
173
|
-
return !0;
|
174
|
-
return !1;
|
175
|
-
}
|
176
|
-
async fetchLibFilesIfNecessary(e) {
|
177
|
-
this._containsLibFile(e) && await this._fetchLibFiles();
|
178
|
-
}
|
179
|
-
_fetchLibFiles() {
|
180
|
-
return this._fetchLibFilesPromise || (this._fetchLibFilesPromise = this._worker().then((e) => e.getLibFiles()).then((e) => {
|
181
|
-
this._hasFetchedLibFiles = !0, this._libFiles = e;
|
182
|
-
})), this._fetchLibFilesPromise;
|
183
|
-
}
|
184
|
-
}, z = class extends w {
|
185
|
-
constructor(t, r, s, a) {
|
186
|
-
super(a);
|
187
|
-
_(this, "_disposables", []);
|
188
|
-
_(this, "_listener", /* @__PURE__ */ Object.create(null));
|
189
|
-
this._libFiles = t, this._defaults = r, this._selector = s;
|
190
|
-
const u = (n) => {
|
191
|
-
if (n.getLanguageId() !== s)
|
192
|
-
return;
|
193
|
-
const p = () => {
|
194
|
-
const { onlyVisible: y } = this._defaults.getDiagnosticsOptions();
|
195
|
-
y ? n.isAttachedToEditor() && this._doValidate(n) : this._doValidate(n);
|
196
|
-
};
|
197
|
-
let d;
|
198
|
-
const f = n.onDidChangeContent(() => {
|
199
|
-
clearTimeout(d), d = window.setTimeout(p, 500);
|
200
|
-
}), h = n.onDidChangeAttached(() => {
|
201
|
-
const { onlyVisible: y } = this._defaults.getDiagnosticsOptions();
|
202
|
-
y && (n.isAttachedToEditor() ? p() : i.editor.setModelMarkers(n, this._selector, []));
|
203
|
-
});
|
204
|
-
this._listener[n.uri.toString()] = {
|
205
|
-
dispose() {
|
206
|
-
f.dispose(), h.dispose(), clearTimeout(d);
|
207
|
-
}
|
208
|
-
}, p();
|
209
|
-
}, c = (n) => {
|
210
|
-
i.editor.setModelMarkers(n, this._selector, []);
|
211
|
-
const p = n.uri.toString();
|
212
|
-
this._listener[p] && (this._listener[p].dispose(), delete this._listener[p]);
|
213
|
-
};
|
214
|
-
this._disposables.push(i.editor.onDidCreateModel((n) => u(n))), this._disposables.push(i.editor.onWillDisposeModel(c)), this._disposables.push(i.editor.onDidChangeModelLanguage((n) => {
|
215
|
-
c(n.model), u(n.model);
|
216
|
-
})), this._disposables.push({
|
217
|
-
dispose() {
|
218
|
-
for (const n of i.editor.getModels())
|
219
|
-
c(n);
|
220
|
-
}
|
221
|
-
});
|
222
|
-
const g = () => {
|
223
|
-
for (const n of i.editor.getModels())
|
224
|
-
c(n), u(n);
|
225
|
-
};
|
226
|
-
this._disposables.push(this._defaults.onDidChange(g)), this._disposables.push(this._defaults.onDidExtraLibsChange(g)), i.editor.getModels().forEach((n) => u(n));
|
227
|
-
}
|
228
|
-
dispose() {
|
229
|
-
this._disposables.forEach((t) => t && t.dispose()), this._disposables = [];
|
230
|
-
}
|
231
|
-
async _doValidate(t) {
|
232
|
-
const r = await this._worker(t.uri);
|
233
|
-
if (t.isDisposed())
|
234
|
-
return;
|
235
|
-
const s = [], { noSyntaxValidation: a, noSemanticValidation: u, noSuggestionDiagnostics: c } = this._defaults.getDiagnosticsOptions();
|
236
|
-
a || s.push(r.getSyntacticDiagnostics(t.uri.toString())), u || s.push(r.getSemanticDiagnostics(t.uri.toString())), c || s.push(r.getSuggestionDiagnostics(t.uri.toString()));
|
237
|
-
const g = await Promise.all(s);
|
238
|
-
if (!g || t.isDisposed())
|
239
|
-
return;
|
240
|
-
const n = g.reduce((d, f) => f.concat(d), []).filter((d) => (this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore || []).indexOf(d.code) === -1), p = n.map((d) => d.relatedInformation || []).reduce((d, f) => f.concat(d), []).map((d) => d.file ? i.Uri.parse(d.file.fileName) : null);
|
241
|
-
await this._libFiles.fetchLibFilesIfNecessary(p), !t.isDisposed() && i.editor.setModelMarkers(t, this._selector, n.map((d) => this._convertDiagnostics(t, d)));
|
242
|
-
}
|
243
|
-
_convertDiagnostics(t, r) {
|
244
|
-
const s = r.start || 0, a = r.length || 1, { lineNumber: u, column: c } = t.getPositionAt(s), { lineNumber: g, column: n } = t.getPositionAt(s + a), p = [];
|
245
|
-
return r.reportsUnnecessary && p.push(i.MarkerTag.Unnecessary), r.reportsDeprecated && p.push(i.MarkerTag.Deprecated), {
|
246
|
-
severity: this._tsDiagnosticCategoryToMarkerSeverity(r.category),
|
247
|
-
startLineNumber: u,
|
248
|
-
startColumn: c,
|
249
|
-
endLineNumber: g,
|
250
|
-
endColumn: n,
|
251
|
-
message: F(r.messageText, `
|
252
|
-
`),
|
253
|
-
code: r.code.toString(),
|
254
|
-
tags: p,
|
255
|
-
relatedInformation: this._convertRelatedInformation(t, r.relatedInformation)
|
256
|
-
};
|
257
|
-
}
|
258
|
-
_convertRelatedInformation(t, r) {
|
259
|
-
if (!r)
|
260
|
-
return [];
|
261
|
-
const s = [];
|
262
|
-
return r.forEach((a) => {
|
263
|
-
let u = t;
|
264
|
-
if (a.file && (u = this._libFiles.getOrCreateModel(a.file.fileName)), !u)
|
265
|
-
return;
|
266
|
-
const c = a.start || 0, g = a.length || 1, { lineNumber: n, column: p } = u.getPositionAt(c), { lineNumber: d, column: f } = u.getPositionAt(c + g);
|
267
|
-
s.push({
|
268
|
-
resource: u.uri,
|
269
|
-
startLineNumber: n,
|
270
|
-
startColumn: p,
|
271
|
-
endLineNumber: d,
|
272
|
-
endColumn: f,
|
273
|
-
message: F(a.messageText, `
|
274
|
-
`)
|
275
|
-
});
|
276
|
-
}), s;
|
277
|
-
}
|
278
|
-
_tsDiagnosticCategoryToMarkerSeverity(t) {
|
279
|
-
switch (t) {
|
280
|
-
case 1:
|
281
|
-
return i.MarkerSeverity.Error;
|
282
|
-
case 3:
|
283
|
-
return i.MarkerSeverity.Info;
|
284
|
-
case 0:
|
285
|
-
return i.MarkerSeverity.Warning;
|
286
|
-
case 2:
|
287
|
-
return i.MarkerSeverity.Hint;
|
288
|
-
}
|
289
|
-
return i.MarkerSeverity.Info;
|
290
|
-
}
|
291
|
-
}, D = class extends w {
|
292
|
-
get triggerCharacters() {
|
293
|
-
return ["."];
|
294
|
-
}
|
295
|
-
async provideCompletionItems(e, t, r, s) {
|
296
|
-
const a = e.getWordUntilPosition(t), u = new i.Range(t.lineNumber, a.startColumn, t.lineNumber, a.endColumn), c = e.uri, g = e.getOffsetAt(t), n = await this._worker(c);
|
297
|
-
if (e.isDisposed())
|
298
|
-
return;
|
299
|
-
const p = await n.getCompletionsAtPosition(c.toString(), g);
|
300
|
-
return !p || e.isDisposed() ? void 0 : {
|
301
|
-
suggestions: p.entries.map((f) => {
|
302
|
-
var x;
|
303
|
-
let h = u;
|
304
|
-
if (f.replacementSpan) {
|
305
|
-
const v = e.getPositionAt(f.replacementSpan.start), C = e.getPositionAt(f.replacementSpan.start + f.replacementSpan.length);
|
306
|
-
h = new i.Range(v.lineNumber, v.column, C.lineNumber, C.column);
|
307
|
-
}
|
308
|
-
const y = [];
|
309
|
-
return ((x = f.kindModifiers) == null ? void 0 : x.indexOf("deprecated")) !== -1 && y.push(i.languages.CompletionItemTag.Deprecated), {
|
310
|
-
uri: c,
|
311
|
-
position: t,
|
312
|
-
offset: g,
|
313
|
-
range: h,
|
314
|
-
label: f.name,
|
315
|
-
insertText: f.name,
|
316
|
-
sortText: f.sortText,
|
317
|
-
kind: D.convertKind(f.kind),
|
318
|
-
tags: y
|
319
|
-
};
|
320
|
-
})
|
321
|
-
};
|
322
|
-
}
|
323
|
-
async resolveCompletionItem(e, t) {
|
324
|
-
const r = e, s = r.uri, a = r.position, u = r.offset, g = await (await this._worker(s)).getCompletionEntryDetails(s.toString(), u, r.label);
|
325
|
-
return g ? {
|
326
|
-
uri: s,
|
327
|
-
position: a,
|
328
|
-
label: g.name,
|
329
|
-
kind: D.convertKind(g.kind),
|
330
|
-
detail: k(g.displayParts),
|
331
|
-
documentation: {
|
332
|
-
value: D.createDocumentationString(g)
|
333
|
-
}
|
334
|
-
} : r;
|
335
|
-
}
|
336
|
-
static convertKind(e) {
|
337
|
-
switch (e) {
|
338
|
-
case l.primitiveType:
|
339
|
-
case l.keyword:
|
340
|
-
return i.languages.CompletionItemKind.Keyword;
|
341
|
-
case l.variable:
|
342
|
-
case l.localVariable:
|
343
|
-
return i.languages.CompletionItemKind.Variable;
|
344
|
-
case l.memberVariable:
|
345
|
-
case l.memberGetAccessor:
|
346
|
-
case l.memberSetAccessor:
|
347
|
-
return i.languages.CompletionItemKind.Field;
|
348
|
-
case l.function:
|
349
|
-
case l.memberFunction:
|
350
|
-
case l.constructSignature:
|
351
|
-
case l.callSignature:
|
352
|
-
case l.indexSignature:
|
353
|
-
return i.languages.CompletionItemKind.Function;
|
354
|
-
case l.enum:
|
355
|
-
return i.languages.CompletionItemKind.Enum;
|
356
|
-
case l.module:
|
357
|
-
return i.languages.CompletionItemKind.Module;
|
358
|
-
case l.class:
|
359
|
-
return i.languages.CompletionItemKind.Class;
|
360
|
-
case l.interface:
|
361
|
-
return i.languages.CompletionItemKind.Interface;
|
362
|
-
case l.warning:
|
363
|
-
return i.languages.CompletionItemKind.File;
|
364
|
-
}
|
365
|
-
return i.languages.CompletionItemKind.Property;
|
366
|
-
}
|
367
|
-
static createDocumentationString(e) {
|
368
|
-
let t = k(e.documentation);
|
369
|
-
if (e.tags)
|
370
|
-
for (const r of e.tags)
|
371
|
-
t += `
|
372
|
-
|
373
|
-
${O(r)}`;
|
374
|
-
return t;
|
375
|
-
}
|
376
|
-
};
|
377
|
-
function O(e) {
|
378
|
-
let t = `*@${e.name}*`;
|
379
|
-
if (e.name === "param" && e.text) {
|
380
|
-
const [r, ...s] = e.text;
|
381
|
-
t += `\`${r.text}\``, s.length > 0 && (t += ` — ${s.map((a) => a.text).join(" ")}`);
|
382
|
-
} else
|
383
|
-
Array.isArray(e.text) ? t += ` — ${e.text.map((r) => r.text).join(" ")}` : e.text && (t += ` — ${e.text}`);
|
384
|
-
return t;
|
385
|
-
}
|
386
|
-
var I = class extends w {
|
387
|
-
constructor() {
|
388
|
-
super(...arguments);
|
389
|
-
_(this, "signatureHelpTriggerCharacters", ["(", ","]);
|
390
|
-
}
|
391
|
-
static _toSignatureHelpTriggerReason(t) {
|
392
|
-
switch (t.triggerKind) {
|
393
|
-
case i.languages.SignatureHelpTriggerKind.TriggerCharacter:
|
394
|
-
return t.triggerCharacter ? t.isRetrigger ? { kind: "retrigger", triggerCharacter: t.triggerCharacter } : { kind: "characterTyped", triggerCharacter: t.triggerCharacter } : { kind: "invoked" };
|
395
|
-
case i.languages.SignatureHelpTriggerKind.ContentChange:
|
396
|
-
return t.isRetrigger ? { kind: "retrigger" } : { kind: "invoked" };
|
397
|
-
case i.languages.SignatureHelpTriggerKind.Invoke:
|
398
|
-
default:
|
399
|
-
return { kind: "invoked" };
|
400
|
-
}
|
401
|
-
}
|
402
|
-
async provideSignatureHelp(t, r, s, a) {
|
403
|
-
const u = t.uri, c = t.getOffsetAt(r), g = await this._worker(u);
|
404
|
-
if (t.isDisposed())
|
405
|
-
return;
|
406
|
-
const n = await g.getSignatureHelpItems(u.toString(), c, {
|
407
|
-
triggerReason: I._toSignatureHelpTriggerReason(a)
|
408
|
-
});
|
409
|
-
if (!n || t.isDisposed())
|
410
|
-
return;
|
411
|
-
const p = {
|
412
|
-
activeSignature: n.selectedItemIndex,
|
413
|
-
activeParameter: n.argumentIndex,
|
414
|
-
signatures: []
|
415
|
-
};
|
416
|
-
return n.items.forEach((d) => {
|
417
|
-
const f = {
|
418
|
-
label: "",
|
419
|
-
parameters: []
|
420
|
-
};
|
421
|
-
f.documentation = {
|
422
|
-
value: k(d.documentation)
|
423
|
-
}, f.label += k(d.prefixDisplayParts), d.parameters.forEach((h, y, x) => {
|
424
|
-
const v = k(h.displayParts), C = {
|
425
|
-
label: v,
|
426
|
-
documentation: {
|
427
|
-
value: k(h.documentation)
|
428
|
-
}
|
429
|
-
};
|
430
|
-
f.label += v, f.parameters.push(C), y < x.length - 1 && (f.label += k(d.separatorDisplayParts));
|
431
|
-
}), f.label += k(d.suffixDisplayParts), p.signatures.push(f);
|
432
|
-
}), {
|
433
|
-
value: p,
|
434
|
-
dispose() {
|
435
|
-
}
|
436
|
-
};
|
437
|
-
}
|
438
|
-
}, G = class extends w {
|
439
|
-
async provideHover(e, t, r) {
|
440
|
-
const s = e.uri, a = e.getOffsetAt(t), u = await this._worker(s);
|
441
|
-
if (e.isDisposed())
|
442
|
-
return;
|
443
|
-
const c = await u.getQuickInfoAtPosition(s.toString(), a);
|
444
|
-
if (!c || e.isDisposed())
|
445
|
-
return;
|
446
|
-
const g = k(c.documentation), n = c.tags ? c.tags.map((d) => O(d)).join(`
|
447
|
-
|
448
|
-
`) : "", p = k(c.displayParts);
|
449
|
-
return {
|
450
|
-
range: this._textSpanToRange(e, c.textSpan),
|
451
|
-
contents: [
|
452
|
-
{
|
453
|
-
value: "```typescript\n" + p + "\n```\n"
|
454
|
-
},
|
455
|
-
{
|
456
|
-
value: g + (n ? `
|
457
|
-
|
458
|
-
` + n : "")
|
459
|
-
}
|
460
|
-
]
|
461
|
-
};
|
462
|
-
}
|
463
|
-
}, J = class extends w {
|
464
|
-
async provideDocumentHighlights(e, t, r) {
|
465
|
-
const s = e.uri, a = e.getOffsetAt(t), u = await this._worker(s);
|
466
|
-
if (e.isDisposed())
|
467
|
-
return;
|
468
|
-
const c = await u.getOccurrencesAtPosition(s.toString(), a);
|
469
|
-
if (!(!c || e.isDisposed()))
|
470
|
-
return c.map((g) => ({
|
471
|
-
range: this._textSpanToRange(e, g.textSpan),
|
472
|
-
kind: g.isWriteAccess ? i.languages.DocumentHighlightKind.Write : i.languages.DocumentHighlightKind.Text
|
473
|
-
}));
|
474
|
-
}
|
475
|
-
}, Q = class extends w {
|
476
|
-
constructor(e, t) {
|
477
|
-
super(t), this._libFiles = e;
|
478
|
-
}
|
479
|
-
async provideDefinition(e, t, r) {
|
480
|
-
const s = e.uri, a = e.getOffsetAt(t), u = await this._worker(s);
|
481
|
-
if (e.isDisposed())
|
482
|
-
return;
|
483
|
-
const c = await u.getDefinitionAtPosition(s.toString(), a);
|
484
|
-
if (!c || e.isDisposed() || (await this._libFiles.fetchLibFilesIfNecessary(c.map((n) => i.Uri.parse(n.fileName))), e.isDisposed()))
|
485
|
-
return;
|
486
|
-
const g = [];
|
487
|
-
for (let n of c) {
|
488
|
-
const p = this._libFiles.getOrCreateModel(n.fileName);
|
489
|
-
p && g.push({
|
490
|
-
uri: p.uri,
|
491
|
-
range: this._textSpanToRange(p, n.textSpan)
|
492
|
-
});
|
493
|
-
}
|
494
|
-
return g;
|
495
|
-
}
|
496
|
-
}, q = class extends w {
|
497
|
-
constructor(e, t) {
|
498
|
-
super(t), this._libFiles = e;
|
499
|
-
}
|
500
|
-
async provideReferences(e, t, r, s) {
|
501
|
-
const a = e.uri, u = e.getOffsetAt(t), c = await this._worker(a);
|
502
|
-
if (e.isDisposed())
|
503
|
-
return;
|
504
|
-
const g = await c.getReferencesAtPosition(a.toString(), u);
|
505
|
-
if (!g || e.isDisposed() || (await this._libFiles.fetchLibFilesIfNecessary(g.map((p) => i.Uri.parse(p.fileName))), e.isDisposed()))
|
506
|
-
return;
|
507
|
-
const n = [];
|
508
|
-
for (let p of g) {
|
509
|
-
const d = this._libFiles.getOrCreateModel(p.fileName);
|
510
|
-
d && n.push({
|
511
|
-
uri: d.uri,
|
512
|
-
range: this._textSpanToRange(d, p.textSpan)
|
513
|
-
});
|
514
|
-
}
|
515
|
-
return n;
|
516
|
-
}
|
517
|
-
}, X = class extends w {
|
518
|
-
async provideDocumentSymbols(e, t) {
|
519
|
-
const r = e.uri, s = await this._worker(r);
|
520
|
-
if (e.isDisposed())
|
521
|
-
return;
|
522
|
-
const a = await s.getNavigationBarItems(r.toString());
|
523
|
-
if (!a || e.isDisposed())
|
524
|
-
return;
|
525
|
-
const u = (g, n, p) => {
|
526
|
-
let d = {
|
527
|
-
name: n.text,
|
528
|
-
detail: "",
|
529
|
-
kind: m[n.kind] || i.languages.SymbolKind.Variable,
|
530
|
-
range: this._textSpanToRange(e, n.spans[0]),
|
531
|
-
selectionRange: this._textSpanToRange(e, n.spans[0]),
|
532
|
-
tags: []
|
533
|
-
};
|
534
|
-
if (p && (d.containerName = p), n.childItems && n.childItems.length > 0)
|
535
|
-
for (let f of n.childItems)
|
536
|
-
u(g, f, d.name);
|
537
|
-
g.push(d);
|
538
|
-
};
|
539
|
-
let c = [];
|
540
|
-
return a.forEach((g) => u(c, g)), c;
|
541
|
-
}
|
542
|
-
}, l = class {
|
543
|
-
};
|
544
|
-
b(l, "unknown", "");
|
545
|
-
b(l, "keyword", "keyword");
|
546
|
-
b(l, "script", "script");
|
547
|
-
b(l, "module", "module");
|
548
|
-
b(l, "class", "class");
|
549
|
-
b(l, "interface", "interface");
|
550
|
-
b(l, "type", "type");
|
551
|
-
b(l, "enum", "enum");
|
552
|
-
b(l, "variable", "var");
|
553
|
-
b(l, "localVariable", "local var");
|
554
|
-
b(l, "function", "function");
|
555
|
-
b(l, "localFunction", "local function");
|
556
|
-
b(l, "memberFunction", "method");
|
557
|
-
b(l, "memberGetAccessor", "getter");
|
558
|
-
b(l, "memberSetAccessor", "setter");
|
559
|
-
b(l, "memberVariable", "property");
|
560
|
-
b(l, "constructorImplementation", "constructor");
|
561
|
-
b(l, "callSignature", "call");
|
562
|
-
b(l, "indexSignature", "index");
|
563
|
-
b(l, "constructSignature", "construct");
|
564
|
-
b(l, "parameter", "parameter");
|
565
|
-
b(l, "typeParameter", "type parameter");
|
566
|
-
b(l, "primitiveType", "primitive type");
|
567
|
-
b(l, "label", "label");
|
568
|
-
b(l, "alias", "alias");
|
569
|
-
b(l, "const", "const");
|
570
|
-
b(l, "let", "let");
|
571
|
-
b(l, "warning", "warning");
|
572
|
-
var m = /* @__PURE__ */ Object.create(null);
|
573
|
-
m[l.module] = i.languages.SymbolKind.Module;
|
574
|
-
m[l.class] = i.languages.SymbolKind.Class;
|
575
|
-
m[l.enum] = i.languages.SymbolKind.Enum;
|
576
|
-
m[l.interface] = i.languages.SymbolKind.Interface;
|
577
|
-
m[l.memberFunction] = i.languages.SymbolKind.Method;
|
578
|
-
m[l.memberVariable] = i.languages.SymbolKind.Property;
|
579
|
-
m[l.memberGetAccessor] = i.languages.SymbolKind.Property;
|
580
|
-
m[l.memberSetAccessor] = i.languages.SymbolKind.Property;
|
581
|
-
m[l.variable] = i.languages.SymbolKind.Variable;
|
582
|
-
m[l.const] = i.languages.SymbolKind.Variable;
|
583
|
-
m[l.localVariable] = i.languages.SymbolKind.Variable;
|
584
|
-
m[l.variable] = i.languages.SymbolKind.Variable;
|
585
|
-
m[l.function] = i.languages.SymbolKind.Function;
|
586
|
-
m[l.localFunction] = i.languages.SymbolKind.Function;
|
587
|
-
var S = class extends w {
|
588
|
-
static _convertOptions(e) {
|
589
|
-
return {
|
590
|
-
ConvertTabsToSpaces: e.insertSpaces,
|
591
|
-
TabSize: e.tabSize,
|
592
|
-
IndentSize: e.tabSize,
|
593
|
-
IndentStyle: 2,
|
594
|
-
NewLineCharacter: `
|
595
|
-
`,
|
596
|
-
InsertSpaceAfterCommaDelimiter: !0,
|
597
|
-
InsertSpaceAfterSemicolonInForStatements: !0,
|
598
|
-
InsertSpaceBeforeAndAfterBinaryOperators: !0,
|
599
|
-
InsertSpaceAfterKeywordsInControlFlowStatements: !0,
|
600
|
-
InsertSpaceAfterFunctionKeywordForAnonymousFunctions: !0,
|
601
|
-
InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: !1,
|
602
|
-
InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: !1,
|
603
|
-
InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: !1,
|
604
|
-
PlaceOpenBraceOnNewLineForControlBlocks: !1,
|
605
|
-
PlaceOpenBraceOnNewLineForFunctions: !1
|
606
|
-
};
|
607
|
-
}
|
608
|
-
_convertTextChanges(e, t) {
|
609
|
-
return {
|
610
|
-
text: t.newText,
|
611
|
-
range: this._textSpanToRange(e, t.span)
|
612
|
-
};
|
613
|
-
}
|
614
|
-
}, Y = class extends S {
|
615
|
-
async provideDocumentRangeFormattingEdits(e, t, r, s) {
|
616
|
-
const a = e.uri, u = e.getOffsetAt({
|
617
|
-
lineNumber: t.startLineNumber,
|
618
|
-
column: t.startColumn
|
619
|
-
}), c = e.getOffsetAt({
|
620
|
-
lineNumber: t.endLineNumber,
|
621
|
-
column: t.endColumn
|
622
|
-
}), g = await this._worker(a);
|
623
|
-
if (e.isDisposed())
|
624
|
-
return;
|
625
|
-
const n = await g.getFormattingEditsForRange(a.toString(), u, c, S._convertOptions(r));
|
626
|
-
if (!(!n || e.isDisposed()))
|
627
|
-
return n.map((p) => this._convertTextChanges(e, p));
|
628
|
-
}
|
629
|
-
}, Z = class extends S {
|
630
|
-
get autoFormatTriggerCharacters() {
|
631
|
-
return [";", "}", `
|
632
|
-
`];
|
633
|
-
}
|
634
|
-
async provideOnTypeFormattingEdits(e, t, r, s, a) {
|
635
|
-
const u = e.uri, c = e.getOffsetAt(t), g = await this._worker(u);
|
636
|
-
if (e.isDisposed())
|
637
|
-
return;
|
638
|
-
const n = await g.getFormattingEditsAfterKeystroke(u.toString(), c, r, S._convertOptions(s));
|
639
|
-
if (!(!n || e.isDisposed()))
|
640
|
-
return n.map((p) => this._convertTextChanges(e, p));
|
641
|
-
}
|
642
|
-
}, ee = class extends S {
|
643
|
-
async provideCodeActions(e, t, r, s) {
|
644
|
-
const a = e.uri, u = e.getOffsetAt({
|
645
|
-
lineNumber: t.startLineNumber,
|
646
|
-
column: t.startColumn
|
647
|
-
}), c = e.getOffsetAt({
|
648
|
-
lineNumber: t.endLineNumber,
|
649
|
-
column: t.endColumn
|
650
|
-
}), g = S._convertOptions(e.getOptions()), n = r.markers.filter((h) => h.code).map((h) => h.code).map(Number), p = await this._worker(a);
|
651
|
-
if (e.isDisposed())
|
652
|
-
return;
|
653
|
-
const d = await p.getCodeFixesAtPosition(a.toString(), u, c, n, g);
|
654
|
-
return !d || e.isDisposed() ? { actions: [], dispose: () => {
|
655
|
-
} } : {
|
656
|
-
actions: d.filter((h) => h.changes.filter((y) => y.isNewFile).length === 0).map((h) => this._tsCodeFixActionToMonacoCodeAction(e, r, h)),
|
657
|
-
dispose: () => {
|
658
|
-
}
|
659
|
-
};
|
660
|
-
}
|
661
|
-
_tsCodeFixActionToMonacoCodeAction(e, t, r) {
|
662
|
-
const s = [];
|
663
|
-
for (const u of r.changes)
|
664
|
-
for (const c of u.textChanges)
|
665
|
-
s.push({
|
666
|
-
resource: e.uri,
|
667
|
-
versionId: void 0,
|
668
|
-
textEdit: {
|
669
|
-
range: this._textSpanToRange(e, c.span),
|
670
|
-
text: c.newText
|
671
|
-
}
|
672
|
-
});
|
673
|
-
return {
|
674
|
-
title: r.description,
|
675
|
-
edit: { edits: s },
|
676
|
-
diagnostics: t.markers,
|
677
|
-
kind: "quickfix"
|
678
|
-
};
|
679
|
-
}
|
680
|
-
}, te = class extends w {
|
681
|
-
constructor(e, t) {
|
682
|
-
super(t), this._libFiles = e;
|
683
|
-
}
|
684
|
-
async provideRenameEdits(e, t, r, s) {
|
685
|
-
const a = e.uri, u = a.toString(), c = e.getOffsetAt(t), g = await this._worker(a);
|
686
|
-
if (e.isDisposed())
|
687
|
-
return;
|
688
|
-
const n = await g.getRenameInfo(u, c, {
|
689
|
-
allowRenameOfImportPath: !1
|
690
|
-
});
|
691
|
-
if (n.canRename === !1)
|
692
|
-
return {
|
693
|
-
edits: [],
|
694
|
-
rejectReason: n.localizedErrorMessage
|
695
|
-
};
|
696
|
-
if (n.fileToRename !== void 0)
|
697
|
-
throw new Error("Renaming files is not supported.");
|
698
|
-
const p = await g.findRenameLocations(u, c, !1, !1, !1);
|
699
|
-
if (!p || e.isDisposed())
|
700
|
-
return;
|
701
|
-
const d = [];
|
702
|
-
for (const f of p) {
|
703
|
-
const h = this._libFiles.getOrCreateModel(f.fileName);
|
704
|
-
if (h)
|
705
|
-
d.push({
|
706
|
-
resource: h.uri,
|
707
|
-
versionId: void 0,
|
708
|
-
textEdit: {
|
709
|
-
range: this._textSpanToRange(h, f.textSpan),
|
710
|
-
text: r
|
711
|
-
}
|
712
|
-
});
|
713
|
-
else
|
714
|
-
throw new Error(`Unknown file ${f.fileName}.`);
|
715
|
-
}
|
716
|
-
return { edits: d };
|
717
|
-
}
|
718
|
-
}, re = class extends w {
|
719
|
-
async provideInlayHints(e, t, r) {
|
720
|
-
const s = e.uri, a = s.toString(), u = e.getOffsetAt({
|
721
|
-
lineNumber: t.startLineNumber,
|
722
|
-
column: t.startColumn
|
723
|
-
}), c = e.getOffsetAt({
|
724
|
-
lineNumber: t.endLineNumber,
|
725
|
-
column: t.endColumn
|
726
|
-
}), g = await this._worker(s);
|
727
|
-
return e.isDisposed() ? null : { hints: (await g.provideInlayHints(a, u, c)).map((d) => ({
|
728
|
-
...d,
|
729
|
-
label: d.text,
|
730
|
-
position: e.getPositionAt(d.position),
|
731
|
-
kind: this._convertHintKind(d.kind)
|
732
|
-
})), dispose: () => {
|
733
|
-
} };
|
734
|
-
}
|
735
|
-
_convertHintKind(e) {
|
736
|
-
switch (e) {
|
737
|
-
case "Parameter":
|
738
|
-
return i.languages.InlayHintKind.Parameter;
|
739
|
-
case "Type":
|
740
|
-
return i.languages.InlayHintKind.Type;
|
741
|
-
default:
|
742
|
-
return i.languages.InlayHintKind.Type;
|
743
|
-
}
|
744
|
-
}
|
745
|
-
}, A, L;
|
746
|
-
function ue(e) {
|
747
|
-
L = N(e, "typescript");
|
748
|
-
}
|
749
|
-
function ge(e) {
|
750
|
-
A = N(e, "javascript");
|
751
|
-
}
|
752
|
-
function de() {
|
753
|
-
return new Promise((e, t) => {
|
754
|
-
if (!A)
|
755
|
-
return t("JavaScript not registered!");
|
756
|
-
e(A);
|
757
|
-
});
|
758
|
-
}
|
759
|
-
function pe() {
|
760
|
-
return new Promise((e, t) => {
|
761
|
-
if (!L)
|
762
|
-
return t("TypeScript not registered!");
|
763
|
-
e(L);
|
764
|
-
});
|
765
|
-
}
|
766
|
-
function N(e, t) {
|
767
|
-
const r = new U(t, e), s = (...u) => r.getLanguageServiceWorker(...u), a = new $(s);
|
768
|
-
return i.languages.registerCompletionItemProvider(t, new D(s)), i.languages.registerSignatureHelpProvider(t, new I(s)), i.languages.registerHoverProvider(t, new G(s)), i.languages.registerDocumentHighlightProvider(t, new J(s)), i.languages.registerDefinitionProvider(t, new Q(a, s)), i.languages.registerReferenceProvider(t, new q(a, s)), i.languages.registerDocumentSymbolProvider(t, new X(s)), i.languages.registerDocumentRangeFormattingEditProvider(t, new Y(s)), i.languages.registerOnTypeFormattingEditProvider(t, new Z(s)), i.languages.registerCodeActionProvider(t, new ee(s)), i.languages.registerRenameProvider(t, new te(a, s)), i.languages.registerInlayHintsProvider(t, new re(s)), new z(a, e, t, s), s;
|
769
|
-
}
|
770
|
-
export {
|
771
|
-
w as Adapter,
|
772
|
-
ee as CodeActionAdaptor,
|
773
|
-
Q as DefinitionAdapter,
|
774
|
-
z as DiagnosticsAdapter,
|
775
|
-
Y as FormatAdapter,
|
776
|
-
S as FormatHelper,
|
777
|
-
Z as FormatOnTypeAdapter,
|
778
|
-
re as InlayHintsAdapter,
|
779
|
-
l as Kind,
|
780
|
-
$ as LibFiles,
|
781
|
-
J as OccurrencesAdapter,
|
782
|
-
X as OutlineAdapter,
|
783
|
-
G as QuickInfoAdapter,
|
784
|
-
q as ReferenceAdapter,
|
785
|
-
te as RenameAdapter,
|
786
|
-
I as SignatureHelpAdapter,
|
787
|
-
D as SuggestAdapter,
|
788
|
-
U as WorkerManager,
|
789
|
-
F as flattenDiagnosticMessageText,
|
790
|
-
de as getJavaScriptWorker,
|
791
|
-
pe as getTypeScriptWorker,
|
792
|
-
ge as setupJavaScript,
|
793
|
-
ue as setupTypeScript
|
794
|
-
};
|