@ws-ui/code-editor 1.10.2 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editor/formatters/css.formatter.d.ts +3 -0
- package/dist/editor/formatters/json.formatter.d.ts +3 -0
- package/dist/editor/utils.d.ts +1 -0
- package/dist/index.cjs.js +30 -19
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +739 -645
- package/dist/index.es.js.map +1 -1
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { jsxs as _, jsx as w } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { loader as
|
|
4
|
-
import { getNodeInfo as
|
|
5
|
-
import { MonacoLanguageClient as
|
|
6
|
-
import { mergeServices as Xe, initServices as
|
|
7
|
-
import
|
|
2
|
+
import G, { useEffect as J, createContext as ge, useState as z, useRef as re, useContext as ue, memo as Re } from "react";
|
|
3
|
+
import { loader as xe, useMonaco as we, Editor as Fe } from "@monaco-editor/react";
|
|
4
|
+
import { getNodeInfo as Le, DesignerRequestVerb as ke, lspSubject as We, LspActions as X, hasAttributesString as de, FileFolderType as oe, SourceCodeDescriptor as je, HTTP_HANDLERS_TAB_PATH as Ee } from "@ws-ui/shared";
|
|
5
|
+
import { MonacoLanguageClient as Ze } from "monaco-languageclient";
|
|
6
|
+
import { mergeServices as Xe, initServices as Ke } from "monaco-languageclient/vscode/services";
|
|
7
|
+
import Be, { initUserConfiguration as De } from "@codingame/monaco-vscode-configuration-service-override";
|
|
8
8
|
import Te from "@codingame/monaco-vscode-languages-service-override";
|
|
9
|
-
import
|
|
9
|
+
import Oe from "@codingame/monaco-vscode-textmate-service-override";
|
|
10
10
|
import "@codingame/monaco-vscode-theme-defaults-default-extension";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
11
|
+
import Ge from "@codingame/monaco-vscode-editor-service-override";
|
|
12
|
+
import Me from "@codingame/monaco-vscode-theme-service-override";
|
|
13
13
|
import { registerFileSystemOverlay as Je } from "@codingame/monaco-vscode-files-service-override";
|
|
14
|
-
import { FileSystemProviderCapabilities as
|
|
15
|
-
import { Emitter as
|
|
16
|
-
import { Logger as
|
|
17
|
-
import { CloseAction as
|
|
18
|
-
import * as
|
|
19
|
-
import { Selection as
|
|
20
|
-
import { WebSocketMessageReader as
|
|
21
|
-
import { TextDocumentSaveReason as
|
|
22
|
-
import { StandaloneServices as
|
|
23
|
-
import { KeybindingsRegistry as
|
|
14
|
+
import { FileSystemProviderCapabilities as se, FileType as Pe } from "vscode/vscode/vs/platform/files/common/files";
|
|
15
|
+
import { Emitter as ae } from "vscode/vscode/vs/base/common/event";
|
|
16
|
+
import { Logger as Ve } from "monaco-languageclient/tools";
|
|
17
|
+
import { CloseAction as Ye, ErrorAction as He } from "vscode-languageclient";
|
|
18
|
+
import * as a from "monaco-editor";
|
|
19
|
+
import { Selection as _e, KeyMod as T, KeyCode as O, editor as Ie, Range as ze, Uri as $e, CancellationTokenSource as Ue } from "monaco-editor";
|
|
20
|
+
import { WebSocketMessageReader as qe, WebSocketMessageWriter as Qe, toSocket as et } from "vscode-ws-jsonrpc";
|
|
21
|
+
import { TextDocumentSaveReason as tt, DocumentDiagnosticRequest as nt, WillSaveTextDocumentNotification as it, DidSaveTextDocumentNotification as ot, WillCreateFilesRequest as rt, WillRenameFilesRequest as st, WillDeleteFilesRequest as at, DidCreateFilesNotification as lt, DidRenameFilesNotification as ct, DidDeleteFilesNotification as gt, SemanticTokensRegistrationType as ut } from "vscode-languageserver-protocol";
|
|
22
|
+
import { StandaloneServices as dt, ICodeEditorService as It } from "vscode/services";
|
|
23
|
+
import { KeybindingsRegistry as ne } from "vscode/monaco";
|
|
24
24
|
import "@codingame/monaco-vscode-standalone-languages";
|
|
25
25
|
import "@codingame/monaco-vscode-standalone-html-language-features";
|
|
26
26
|
import "@codingame/monaco-vscode-standalone-css-language-features";
|
|
@@ -30,14 +30,14 @@ import "@codingame/monaco-vscode-css-default-extension";
|
|
|
30
30
|
import "@codingame/monaco-vscode-json-default-extension";
|
|
31
31
|
import "@codingame/monaco-vscode-html-default-extension";
|
|
32
32
|
import "@codingame/monaco-vscode-javascript-default-extension";
|
|
33
|
-
import { registerExtension as
|
|
34
|
-
const
|
|
33
|
+
import { registerExtension as Ct } from "vscode/extensions";
|
|
34
|
+
const mt = () => Be(), ft = () => Ge(
|
|
35
35
|
() => Promise.resolve(void 0)
|
|
36
|
-
),
|
|
37
|
-
const
|
|
36
|
+
), pt = () => {
|
|
37
|
+
const t = Me(), e = t.themeService.ctor.prototype;
|
|
38
38
|
return e.defineTheme = () => {
|
|
39
|
-
},
|
|
40
|
-
},
|
|
39
|
+
}, t;
|
|
40
|
+
}, At = `{
|
|
41
41
|
"workbench.colorTheme": "Default Dark+",
|
|
42
42
|
"workbench.iconTheme": "vs-seti",
|
|
43
43
|
"editor.autoClosingBrackets": "languageDefined",
|
|
@@ -123,18 +123,18 @@ const Ct = () => Ke(), mt = () => Oe(
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
`;
|
|
126
|
-
class
|
|
126
|
+
class bt {
|
|
127
127
|
constructor() {
|
|
128
|
-
this._onDidChangeCapabilities = new
|
|
128
|
+
this._onDidChangeCapabilities = new ae(), this.onDidChangeCapabilities = this._onDidChangeCapabilities.event, this._onDidChangeFile = new ae(), this.onDidChangeFile = this._onDidChangeFile.event, this.capabilities = se.FileReadWrite | se.FileOpenReadWriteClose, this.files = /* @__PURE__ */ new Map();
|
|
129
129
|
}
|
|
130
130
|
// --- stat()
|
|
131
131
|
async stat(e) {
|
|
132
|
-
const
|
|
132
|
+
const n = this.files.get(e.fsPath), i = Date.now();
|
|
133
133
|
return {
|
|
134
|
-
type:
|
|
134
|
+
type: Pe.File,
|
|
135
135
|
ctime: 0,
|
|
136
136
|
mtime: i,
|
|
137
|
-
size:
|
|
137
|
+
size: n ? n.byteLength : 0
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
140
|
// --- mkdir()
|
|
@@ -146,151 +146,154 @@ class At {
|
|
|
146
146
|
}
|
|
147
147
|
// --- readFile()
|
|
148
148
|
async readFile(e) {
|
|
149
|
-
const i = e.toString().split("/"), o = i.length, [r, s] = i.slice(o - 2),
|
|
150
|
-
verb:
|
|
149
|
+
const i = e.toString().split("/"), o = i.length, [r, s] = i.slice(o - 2), I = await Le({
|
|
150
|
+
verb: ke.GET_INFO,
|
|
151
151
|
path: `${r}/${s}`,
|
|
152
152
|
content: !0,
|
|
153
153
|
as: "text"
|
|
154
|
-
}),
|
|
155
|
-
return this.files.set(e.fsPath,
|
|
154
|
+
}), C = new TextEncoder().encode(I.content);
|
|
155
|
+
return this.files.set(e.fsPath, C), C;
|
|
156
156
|
}
|
|
157
157
|
// --- writeFile()
|
|
158
|
-
async writeFile(e,
|
|
158
|
+
async writeFile(e, n) {
|
|
159
159
|
const i = e.toString();
|
|
160
|
-
this.files.set(i,
|
|
160
|
+
this.files.set(i, n), this._onDidChangeFile.fire([
|
|
161
161
|
{ type: 1, resource: e }
|
|
162
162
|
// FileChangeType.Updated
|
|
163
163
|
]);
|
|
164
164
|
}
|
|
165
165
|
// --- delete()
|
|
166
166
|
async delete(e) {
|
|
167
|
-
const
|
|
168
|
-
this.files.delete(
|
|
167
|
+
const n = e.toString();
|
|
168
|
+
this.files.delete(n);
|
|
169
169
|
}
|
|
170
170
|
// --- rename()
|
|
171
|
-
async rename(e,
|
|
172
|
-
const i = e.toString(), o =
|
|
171
|
+
async rename(e, n) {
|
|
172
|
+
const i = e.toString(), o = n.toString(), r = this.files.get(i);
|
|
173
173
|
r && (this.files.set(o, r), this.files.delete(i));
|
|
174
174
|
}
|
|
175
175
|
// --- watch()
|
|
176
|
-
watch(e,
|
|
176
|
+
watch(e, n) {
|
|
177
177
|
return { dispose() {
|
|
178
178
|
} };
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
const
|
|
181
|
+
const ht = () => De(At), vt = async (t) => {
|
|
182
182
|
var o;
|
|
183
|
-
const e =
|
|
184
|
-
e.debugLogging = ((o =
|
|
185
|
-
const
|
|
186
|
-
if (
|
|
183
|
+
const e = t.serviceConfig ?? {};
|
|
184
|
+
e.debugLogging = ((o = t.logger) == null ? void 0 : o.isEnabled()) === !0 && (e.debugLogging === !0 || t.logger.isDebugEnabled() === !0), await ht(), e.userServices = e.userServices ?? {};
|
|
185
|
+
const n = e.userServices.configurationService ?? void 0, i = e.workspaceConfig ?? void 0;
|
|
186
|
+
if (n === void 0) {
|
|
187
187
|
if (i)
|
|
188
188
|
throw new Error(
|
|
189
189
|
"You provided a workspaceConfig without using the configurationServiceOverride"
|
|
190
190
|
);
|
|
191
191
|
const r = {
|
|
192
192
|
// @see https://github.com/CodinGame/monaco-vscode-api#monaco-standalone-services
|
|
193
|
-
...
|
|
194
|
-
...
|
|
195
|
-
...
|
|
193
|
+
...mt(),
|
|
194
|
+
...pt(),
|
|
195
|
+
...Oe(),
|
|
196
196
|
...Te(),
|
|
197
|
-
...
|
|
197
|
+
...ft()
|
|
198
198
|
};
|
|
199
199
|
Xe(r, e.userServices);
|
|
200
200
|
}
|
|
201
|
-
return Je(1, new
|
|
201
|
+
return Je(1, new bt()), e;
|
|
202
202
|
};
|
|
203
|
-
class
|
|
204
|
-
constructor(e,
|
|
205
|
-
super(e), this.onMessage =
|
|
203
|
+
class St extends qe {
|
|
204
|
+
constructor(e, n) {
|
|
205
|
+
super(e), this.onMessage = n;
|
|
206
206
|
}
|
|
207
207
|
readMessage(e) {
|
|
208
208
|
this.onMessage && this.onMessage();
|
|
209
|
-
const [,
|
|
209
|
+
const [, n] = e.split(`\r
|
|
210
210
|
\r
|
|
211
211
|
`);
|
|
212
212
|
if (this.state === "initial")
|
|
213
|
-
this.events.splice(0, 0, { message:
|
|
213
|
+
this.events.splice(0, 0, { message: n });
|
|
214
214
|
else if (this.state === "listening") {
|
|
215
|
-
const i = JSON.parse(
|
|
215
|
+
const i = JSON.parse(n);
|
|
216
216
|
this.callback(i);
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
|
-
class
|
|
221
|
-
constructor(e,
|
|
222
|
-
super(e), this.onSend =
|
|
220
|
+
class yt extends Qe {
|
|
221
|
+
constructor(e, n) {
|
|
222
|
+
super(e), this.onSend = n;
|
|
223
223
|
}
|
|
224
224
|
async write(e) {
|
|
225
225
|
try {
|
|
226
|
-
const
|
|
227
|
-
this.socket.send(
|
|
228
|
-
} catch (
|
|
229
|
-
this.errorCount++, this.fireError(
|
|
226
|
+
const n = JSON.stringify(e);
|
|
227
|
+
this.socket.send(n), this.onSend && this.onSend();
|
|
228
|
+
} catch (n) {
|
|
229
|
+
this.errorCount++, this.fireError(n, e, this.errorCount);
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
function
|
|
234
|
-
const
|
|
235
|
-
return e ? `file://${
|
|
233
|
+
function E(t, e = !0) {
|
|
234
|
+
const n = `/PACKAGE/Project/Sources/${t}`;
|
|
235
|
+
return e ? `file://${n}` : n;
|
|
236
236
|
}
|
|
237
|
-
function
|
|
238
|
-
setTimeout(
|
|
237
|
+
function Ce(t, e = 0) {
|
|
238
|
+
setTimeout(t, e);
|
|
239
239
|
}
|
|
240
|
-
function
|
|
241
|
-
const
|
|
240
|
+
function Nt(t, e) {
|
|
241
|
+
const n = new _e(
|
|
242
242
|
e.startLineNumber,
|
|
243
243
|
e.startColumn,
|
|
244
244
|
e.endLineNumber || e.startLineNumber,
|
|
245
245
|
e.endColumn || e.startColumn
|
|
246
246
|
);
|
|
247
|
-
|
|
248
|
-
|
|
247
|
+
Ce(() => {
|
|
248
|
+
t.setSelection(n), t.revealRangeInCenter(n), t.focus();
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
|
-
function
|
|
252
|
-
|
|
253
|
-
|
|
251
|
+
function Rt(t, e, n = 0) {
|
|
252
|
+
n > 0 && (e = n + e), Ce(() => {
|
|
253
|
+
t.setPosition({ lineNumber: e, column: 1 }), t.revealLineInCenter(e), t.focus();
|
|
254
254
|
});
|
|
255
255
|
}
|
|
256
|
-
function
|
|
257
|
-
const o =
|
|
256
|
+
function On(t, e, n) {
|
|
257
|
+
const o = t.getModel();
|
|
258
258
|
if (o && e) {
|
|
259
259
|
const r = o.getLineCount();
|
|
260
260
|
for (let s = 1; s <= r; s++) {
|
|
261
|
-
const
|
|
262
|
-
if (new RegExp(`(?:Function|function) ${
|
|
261
|
+
const I = o.getLineContent(s);
|
|
262
|
+
if (new RegExp(`(?:Function|function) ${n}`).test(I))
|
|
263
263
|
return s;
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
266
|
return 0;
|
|
267
267
|
}
|
|
268
|
-
const
|
|
269
|
-
|
|
270
|
-
|
|
268
|
+
const xt = (t) => {
|
|
269
|
+
const e = t == null ? void 0 : t.getLanguageId();
|
|
270
|
+
return e && ["css", "scss", "less"].includes(e);
|
|
271
|
+
}, wt = {
|
|
272
|
+
provideCompletionItems: async (t, e) => {
|
|
273
|
+
const n = t.getWordUntilPosition(e);
|
|
271
274
|
return {
|
|
272
275
|
suggestions: [
|
|
273
276
|
{
|
|
274
277
|
label: "var",
|
|
275
|
-
kind:
|
|
276
|
-
range: new
|
|
278
|
+
kind: a.languages.CompletionItemKind.Snippet,
|
|
279
|
+
range: new a.Range(
|
|
277
280
|
e.lineNumber,
|
|
278
|
-
|
|
281
|
+
n.startColumn,
|
|
279
282
|
e.lineNumber,
|
|
280
|
-
|
|
283
|
+
n.endColumn
|
|
281
284
|
),
|
|
282
285
|
insertText: ["var ${1:var_name} : ${2:var_type}"].join(`
|
|
283
286
|
`),
|
|
284
|
-
insertTextRules:
|
|
287
|
+
insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
285
288
|
},
|
|
286
289
|
{
|
|
287
290
|
label: "While",
|
|
288
|
-
kind:
|
|
289
|
-
range: new
|
|
291
|
+
kind: a.languages.CompletionItemKind.Snippet,
|
|
292
|
+
range: new a.Range(
|
|
290
293
|
e.lineNumber,
|
|
291
|
-
|
|
294
|
+
n.startColumn,
|
|
292
295
|
e.lineNumber,
|
|
293
|
-
|
|
296
|
+
n.endColumn
|
|
294
297
|
),
|
|
295
298
|
insertText: [
|
|
296
299
|
"While(${1:expression})",
|
|
@@ -298,16 +301,16 @@ const Rt = {
|
|
|
298
301
|
"End while"
|
|
299
302
|
].join(`
|
|
300
303
|
`),
|
|
301
|
-
insertTextRules:
|
|
304
|
+
insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
302
305
|
},
|
|
303
306
|
{
|
|
304
307
|
label: "Case of",
|
|
305
|
-
kind:
|
|
306
|
-
range: new
|
|
308
|
+
kind: a.languages.CompletionItemKind.Snippet,
|
|
309
|
+
range: new a.Range(
|
|
307
310
|
e.lineNumber,
|
|
308
|
-
|
|
311
|
+
n.startColumn,
|
|
309
312
|
e.lineNumber,
|
|
310
|
-
|
|
313
|
+
n.endColumn
|
|
311
314
|
),
|
|
312
315
|
insertText: [
|
|
313
316
|
"Case of",
|
|
@@ -316,44 +319,44 @@ const Rt = {
|
|
|
316
319
|
"End case"
|
|
317
320
|
].join(`
|
|
318
321
|
`),
|
|
319
|
-
insertTextRules:
|
|
322
|
+
insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
320
323
|
},
|
|
321
324
|
{
|
|
322
325
|
label: "Else",
|
|
323
|
-
kind:
|
|
324
|
-
range: new
|
|
326
|
+
kind: a.languages.CompletionItemKind.Snippet,
|
|
327
|
+
range: new a.Range(
|
|
325
328
|
e.lineNumber,
|
|
326
|
-
|
|
329
|
+
n.startColumn,
|
|
327
330
|
e.lineNumber,
|
|
328
|
-
|
|
331
|
+
n.endColumn
|
|
329
332
|
),
|
|
330
333
|
insertText: ["Else", " "].join(`
|
|
331
334
|
`),
|
|
332
|
-
insertTextRules:
|
|
335
|
+
insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
333
336
|
},
|
|
334
337
|
{
|
|
335
338
|
label: "If",
|
|
336
|
-
kind:
|
|
337
|
-
range: new
|
|
339
|
+
kind: a.languages.CompletionItemKind.Snippet,
|
|
340
|
+
range: new a.Range(
|
|
338
341
|
e.lineNumber,
|
|
339
|
-
|
|
342
|
+
n.startColumn,
|
|
340
343
|
e.lineNumber,
|
|
341
|
-
|
|
344
|
+
n.endColumn
|
|
342
345
|
),
|
|
343
346
|
insertText: ["If (${1:expression})", " ${5:body}", "End if"].join(
|
|
344
347
|
`
|
|
345
348
|
`
|
|
346
349
|
),
|
|
347
|
-
insertTextRules:
|
|
350
|
+
insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
348
351
|
},
|
|
349
352
|
{
|
|
350
353
|
label: "For",
|
|
351
|
-
kind:
|
|
352
|
-
range: new
|
|
354
|
+
kind: a.languages.CompletionItemKind.Snippet,
|
|
355
|
+
range: new a.Range(
|
|
353
356
|
e.lineNumber,
|
|
354
|
-
|
|
357
|
+
n.startColumn,
|
|
355
358
|
e.lineNumber,
|
|
356
|
-
|
|
359
|
+
n.endColumn
|
|
357
360
|
),
|
|
358
361
|
insertText: [
|
|
359
362
|
"For(${1:counter};${2:start};${3:end}${4:;increment})",
|
|
@@ -361,68 +364,68 @@ const Rt = {
|
|
|
361
364
|
"End for"
|
|
362
365
|
].join(`
|
|
363
366
|
`),
|
|
364
|
-
insertTextRules:
|
|
367
|
+
insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
365
368
|
},
|
|
366
369
|
{
|
|
367
370
|
label: "Function",
|
|
368
|
-
kind:
|
|
369
|
-
range: new
|
|
371
|
+
kind: a.languages.CompletionItemKind.Snippet,
|
|
372
|
+
range: new a.Range(
|
|
370
373
|
e.lineNumber,
|
|
371
|
-
|
|
374
|
+
n.startColumn,
|
|
372
375
|
e.lineNumber,
|
|
373
|
-
|
|
376
|
+
n.endColumn
|
|
374
377
|
),
|
|
375
378
|
insertText: [
|
|
376
379
|
"Function ${1:function_name}(${2:params}) -> ${3:var_name} : ${4:var_type}",
|
|
377
380
|
" ${5:body}"
|
|
378
381
|
].join(`
|
|
379
382
|
`),
|
|
380
|
-
insertTextRules:
|
|
383
|
+
insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
381
384
|
}
|
|
382
385
|
]
|
|
383
386
|
};
|
|
384
387
|
}
|
|
385
|
-
},
|
|
386
|
-
provideCompletionItems: async (
|
|
387
|
-
const
|
|
388
|
+
}, Ft = {
|
|
389
|
+
provideCompletionItems: async (t, e) => {
|
|
390
|
+
const n = t.getWordUntilPosition(e);
|
|
388
391
|
return {
|
|
389
392
|
suggestions: [
|
|
390
393
|
{
|
|
391
394
|
label: "var",
|
|
392
|
-
kind:
|
|
393
|
-
range: new
|
|
395
|
+
kind: a.languages.CompletionItemKind.Snippet,
|
|
396
|
+
range: new a.Range(
|
|
394
397
|
e.lineNumber,
|
|
395
|
-
|
|
398
|
+
n.startColumn,
|
|
396
399
|
e.lineNumber,
|
|
397
|
-
|
|
400
|
+
n.endColumn
|
|
398
401
|
),
|
|
399
402
|
insertText: ["var ${1:var_name} : ${2:var_type}"].join(`
|
|
400
403
|
`),
|
|
401
|
-
insertTextRules:
|
|
404
|
+
insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
402
405
|
},
|
|
403
406
|
{
|
|
404
407
|
label: "while",
|
|
405
|
-
kind:
|
|
406
|
-
range: new
|
|
408
|
+
kind: a.languages.CompletionItemKind.Snippet,
|
|
409
|
+
range: new a.Range(
|
|
407
410
|
e.lineNumber,
|
|
408
|
-
|
|
411
|
+
n.startColumn,
|
|
409
412
|
e.lineNumber,
|
|
410
|
-
|
|
413
|
+
n.endColumn
|
|
411
414
|
),
|
|
412
415
|
insertText: ["while(${1:expression})", " ${2:body}", "end"].join(
|
|
413
416
|
`
|
|
414
417
|
`
|
|
415
418
|
),
|
|
416
|
-
insertTextRules:
|
|
419
|
+
insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
417
420
|
},
|
|
418
421
|
{
|
|
419
422
|
label: "switch",
|
|
420
|
-
kind:
|
|
421
|
-
range: new
|
|
423
|
+
kind: a.languages.CompletionItemKind.Snippet,
|
|
424
|
+
range: new a.Range(
|
|
422
425
|
e.lineNumber,
|
|
423
|
-
|
|
426
|
+
n.startColumn,
|
|
424
427
|
e.lineNumber,
|
|
425
|
-
|
|
428
|
+
n.endColumn
|
|
426
429
|
),
|
|
427
430
|
insertText: [
|
|
428
431
|
"switch",
|
|
@@ -431,44 +434,44 @@ const Rt = {
|
|
|
431
434
|
"end"
|
|
432
435
|
].join(`
|
|
433
436
|
`),
|
|
434
|
-
insertTextRules:
|
|
437
|
+
insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
435
438
|
},
|
|
436
439
|
{
|
|
437
440
|
label: "else",
|
|
438
|
-
kind:
|
|
439
|
-
range: new
|
|
441
|
+
kind: a.languages.CompletionItemKind.Snippet,
|
|
442
|
+
range: new a.Range(
|
|
440
443
|
e.lineNumber,
|
|
441
|
-
|
|
444
|
+
n.startColumn,
|
|
442
445
|
e.lineNumber,
|
|
443
|
-
|
|
446
|
+
n.endColumn
|
|
444
447
|
),
|
|
445
448
|
insertText: ["else", " "].join(`
|
|
446
449
|
`),
|
|
447
|
-
insertTextRules:
|
|
450
|
+
insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
448
451
|
},
|
|
449
452
|
{
|
|
450
453
|
label: "if",
|
|
451
|
-
kind:
|
|
452
|
-
range: new
|
|
454
|
+
kind: a.languages.CompletionItemKind.Snippet,
|
|
455
|
+
range: new a.Range(
|
|
453
456
|
e.lineNumber,
|
|
454
|
-
|
|
457
|
+
n.startColumn,
|
|
455
458
|
e.lineNumber,
|
|
456
|
-
|
|
459
|
+
n.endColumn
|
|
457
460
|
),
|
|
458
461
|
insertText: ["if (${1:expression})", " ${5:body}", "end"].join(
|
|
459
462
|
`
|
|
460
463
|
`
|
|
461
464
|
),
|
|
462
|
-
insertTextRules:
|
|
465
|
+
insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
463
466
|
},
|
|
464
467
|
{
|
|
465
468
|
label: "for",
|
|
466
|
-
kind:
|
|
467
|
-
range: new
|
|
469
|
+
kind: a.languages.CompletionItemKind.Snippet,
|
|
470
|
+
range: new a.Range(
|
|
468
471
|
e.lineNumber,
|
|
469
|
-
|
|
472
|
+
n.startColumn,
|
|
470
473
|
e.lineNumber,
|
|
471
|
-
|
|
474
|
+
n.endColumn
|
|
472
475
|
),
|
|
473
476
|
insertText: [
|
|
474
477
|
"for(${1:counter},${2:start},${3:end}${4:,increment})",
|
|
@@ -476,65 +479,70 @@ const Rt = {
|
|
|
476
479
|
"end"
|
|
477
480
|
].join(`
|
|
478
481
|
`),
|
|
479
|
-
insertTextRules:
|
|
482
|
+
insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
480
483
|
},
|
|
481
484
|
{
|
|
482
485
|
label: "function",
|
|
483
|
-
kind:
|
|
484
|
-
range: new
|
|
486
|
+
kind: a.languages.CompletionItemKind.Snippet,
|
|
487
|
+
range: new a.Range(
|
|
485
488
|
e.lineNumber,
|
|
486
|
-
|
|
489
|
+
n.startColumn,
|
|
487
490
|
e.lineNumber,
|
|
488
|
-
|
|
491
|
+
n.endColumn
|
|
489
492
|
),
|
|
490
493
|
insertText: [
|
|
491
494
|
"function ${1:function_name}(${2:params}) -> ${3:var_name} : ${4:var_type}",
|
|
492
495
|
" ${5:body}"
|
|
493
496
|
].join(`
|
|
494
497
|
`),
|
|
495
|
-
insertTextRules:
|
|
498
|
+
insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
496
499
|
}
|
|
497
500
|
]
|
|
498
501
|
};
|
|
499
502
|
}
|
|
500
|
-
},
|
|
503
|
+
}, Lt = [
|
|
501
504
|
// zoom in
|
|
502
505
|
{
|
|
503
|
-
keybinding:
|
|
506
|
+
keybinding: T.CtrlCmd | O.NumpadAdd,
|
|
504
507
|
command: "editor.action.fontZoomIn"
|
|
505
508
|
},
|
|
506
509
|
{
|
|
507
|
-
keybinding:
|
|
510
|
+
keybinding: T.CtrlCmd | O.Equal,
|
|
508
511
|
command: "editor.action.fontZoomIn"
|
|
509
512
|
},
|
|
510
513
|
// zoom out
|
|
511
514
|
{
|
|
512
|
-
keybinding:
|
|
515
|
+
keybinding: T.CtrlCmd | O.NumpadSubtract,
|
|
513
516
|
command: "editor.action.fontZoomOut"
|
|
514
517
|
},
|
|
515
518
|
{
|
|
516
|
-
keybinding:
|
|
519
|
+
keybinding: T.CtrlCmd | O.Minus,
|
|
517
520
|
command: "editor.action.fontZoomOut"
|
|
518
521
|
},
|
|
519
522
|
// zoom reset
|
|
520
523
|
{
|
|
521
|
-
keybinding:
|
|
524
|
+
keybinding: T.CtrlCmd | O.Numpad0,
|
|
522
525
|
command: "editor.action.fontZoomReset"
|
|
523
526
|
},
|
|
524
527
|
{
|
|
525
|
-
keybinding:
|
|
528
|
+
keybinding: T.CtrlCmd | O.Digit0,
|
|
526
529
|
command: "editor.action.fontZoomReset"
|
|
530
|
+
},
|
|
531
|
+
// go to definition
|
|
532
|
+
{
|
|
533
|
+
keybinding: T.CtrlCmd | O.F12,
|
|
534
|
+
command: "editor.action.revealDefinition"
|
|
527
535
|
}
|
|
528
|
-
],
|
|
529
|
-
|
|
536
|
+
], kt = ({ defaultZoom: t }) => (J(() => {
|
|
537
|
+
t !== void 0 && Ie.EditorZoom.setZoomLevel(t);
|
|
530
538
|
}, []), null);
|
|
531
|
-
|
|
532
|
-
monaco:
|
|
539
|
+
xe.config({
|
|
540
|
+
monaco: a
|
|
533
541
|
// paths: {
|
|
534
542
|
// vs: import.meta.env.VITE_MONACO_EDITOR_CDN,
|
|
535
543
|
// },
|
|
536
544
|
});
|
|
537
|
-
var H = /* @__PURE__ */ ((
|
|
545
|
+
var H = /* @__PURE__ */ ((t) => (t[t.NotSet = -1] = "NotSet", t[t.None = 0] = "None", t[t.Italic = 1] = "Italic", t[t.Bold = 2] = "Bold", t[t.Underline = 4] = "Underline", t[t.Strikethrough = 8] = "Strikethrough", t))(H || {}), me = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.DefaultForeground = 1] = "DefaultForeground", t[t.DefaultBackground = 2] = "DefaultBackground", t))(me || {}), fe = /* @__PURE__ */ ((t) => (t[t.Other = 0] = "Other", t[t.Comment = 1] = "Comment", t[t.String = 2] = "String", t[t.RegEx = 3] = "RegEx", t))(fe || {});
|
|
538
546
|
class V {
|
|
539
547
|
static getLanguageId(e) {
|
|
540
548
|
return (e & 255) >>> 0;
|
|
@@ -559,17 +567,17 @@ class V {
|
|
|
559
567
|
const o = this.getFontStyle(e);
|
|
560
568
|
return o & 1 && (i += " mtki"), o & 2 && (i += " mtkb"), o & 4 && (i += " mtku"), o & 8 && (i += " mtks"), i;
|
|
561
569
|
}
|
|
562
|
-
static getInlineStyleFromMetadata(e,
|
|
570
|
+
static getInlineStyleFromMetadata(e, n) {
|
|
563
571
|
const i = this.getForeground(e), o = this.getFontStyle(e);
|
|
564
|
-
let r = `color: ${
|
|
572
|
+
let r = `color: ${n[i]};`;
|
|
565
573
|
o & 1 && (r += "font-style: italic;"), o & 2 && (r += "font-weight: bold;");
|
|
566
574
|
let s = "";
|
|
567
575
|
return o & 4 && (s += " underline"), o & 8 && (s += " line-through"), s && (r += `text-decoration:${s};`), r;
|
|
568
576
|
}
|
|
569
577
|
static getPresentationFromMetadata(e) {
|
|
570
|
-
const
|
|
578
|
+
const n = this.getForeground(e), i = this.getFontStyle(e);
|
|
571
579
|
return {
|
|
572
|
-
foreground:
|
|
580
|
+
foreground: n,
|
|
573
581
|
italic: !!(i & 1),
|
|
574
582
|
bold: !!(i & 2),
|
|
575
583
|
underline: !!(i & 4),
|
|
@@ -577,57 +585,57 @@ class V {
|
|
|
577
585
|
};
|
|
578
586
|
}
|
|
579
587
|
}
|
|
580
|
-
function
|
|
581
|
-
const o =
|
|
582
|
-
let s = 0,
|
|
583
|
-
const
|
|
588
|
+
function Wt(t, e, n, i) {
|
|
589
|
+
const o = n.tokens.data, r = t.getLanguageId();
|
|
590
|
+
let s = 0, I = 0;
|
|
591
|
+
const C = i.lineNumber - 1, v = i.column - 1;
|
|
584
592
|
for (let f = 0; f < o.length; f += 5) {
|
|
585
|
-
const A = o[f], p = o[f + 1],
|
|
586
|
-
if (
|
|
587
|
-
const
|
|
588
|
-
let
|
|
589
|
-
for (let P = 0;
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
const g = new
|
|
593
|
+
const A = o[f], p = o[f + 1], F = o[f + 2], x = o[f + 3], S = o[f + 4], y = s + A, h = A === 0 ? I + p : p;
|
|
594
|
+
if (C === y && h <= v && v < h + F) {
|
|
595
|
+
const c = n.legend.tokenTypes[x] || "not in legend (ignored)", L = [];
|
|
596
|
+
let l = S;
|
|
597
|
+
for (let P = 0; l > 0 && P < n.legend.tokenModifiers.length; P++)
|
|
598
|
+
l & 1 && L.push(n.legend.tokenModifiers[P]), l = l >> 1;
|
|
599
|
+
l > 0 && L.push("not in legend (ignored)");
|
|
600
|
+
const g = new ze(
|
|
593
601
|
y + 1,
|
|
594
|
-
|
|
602
|
+
h + 1,
|
|
595
603
|
y + 1,
|
|
596
|
-
|
|
597
|
-
),
|
|
598
|
-
|
|
599
|
-
|
|
604
|
+
h + 1 + F
|
|
605
|
+
), N = {}, k = e.getColorTheme().tokenColorMap, b = e.getColorTheme().getTokenStyleMetadata(
|
|
606
|
+
c,
|
|
607
|
+
L,
|
|
600
608
|
r,
|
|
601
609
|
!0,
|
|
602
|
-
|
|
610
|
+
N
|
|
603
611
|
);
|
|
604
612
|
let $;
|
|
605
|
-
return
|
|
613
|
+
return b && ($ = {
|
|
606
614
|
languageId: void 0,
|
|
607
|
-
tokenType:
|
|
608
|
-
bold:
|
|
609
|
-
italic:
|
|
610
|
-
underline:
|
|
611
|
-
strikethrough:
|
|
612
|
-
foreground:
|
|
615
|
+
tokenType: fe.Other,
|
|
616
|
+
bold: b == null ? void 0 : b.bold,
|
|
617
|
+
italic: b == null ? void 0 : b.italic,
|
|
618
|
+
underline: b == null ? void 0 : b.underline,
|
|
619
|
+
strikethrough: b == null ? void 0 : b.strikethrough,
|
|
620
|
+
foreground: k[(b == null ? void 0 : b.foreground) || me.None],
|
|
613
621
|
background: void 0
|
|
614
|
-
}), { type:
|
|
622
|
+
}), { type: c, modifiers: L, range: g, metadata: $, definitions: N };
|
|
615
623
|
}
|
|
616
|
-
s = y,
|
|
624
|
+
s = y, I = h;
|
|
617
625
|
}
|
|
618
626
|
return null;
|
|
619
627
|
}
|
|
620
|
-
function
|
|
628
|
+
function jt(t, e, n) {
|
|
621
629
|
let i = null;
|
|
622
|
-
for (let o = 1; o <
|
|
630
|
+
for (let o = 1; o < n; o++)
|
|
623
631
|
i = e.tokenizeLine(
|
|
624
|
-
|
|
632
|
+
t.getLineContent(o),
|
|
625
633
|
i
|
|
626
634
|
).ruleStack;
|
|
627
635
|
return i;
|
|
628
636
|
}
|
|
629
|
-
function
|
|
630
|
-
const i =
|
|
637
|
+
function Et(t, e, n) {
|
|
638
|
+
const i = t.getColorTheme().tokenColorMap, o = V.getLanguageId(n), r = V.getTokenType(n), s = V.getFontStyle(n), I = V.getForeground(n), C = V.getBackground(n);
|
|
631
639
|
return {
|
|
632
640
|
languageId: e.languageIdCodec.decodeLanguageId(o),
|
|
633
641
|
tokenType: r,
|
|
@@ -635,369 +643,369 @@ function Wt(n, e, t) {
|
|
|
635
643
|
italic: s & H.Italic ? !0 : void 0,
|
|
636
644
|
underline: s & H.Underline ? !0 : void 0,
|
|
637
645
|
strikethrough: s & H.Strikethrough ? !0 : void 0,
|
|
638
|
-
foreground: i[
|
|
639
|
-
background: i[
|
|
646
|
+
foreground: i[I],
|
|
647
|
+
background: i[C]
|
|
640
648
|
};
|
|
641
649
|
}
|
|
642
|
-
function Zt(
|
|
643
|
-
const i =
|
|
644
|
-
|
|
650
|
+
function Zt(t, e, n) {
|
|
651
|
+
const i = n.lineNumber, o = t, r = o._tokenizationTextModelPart.grammarTokens._tokenizer.tokenizationSupport._actual._grammar, s = jt(t, r, i), I = r.tokenizeLine(
|
|
652
|
+
t.getLineContent(i),
|
|
645
653
|
s
|
|
646
|
-
),
|
|
647
|
-
|
|
654
|
+
), C = r.tokenizeLine2(
|
|
655
|
+
t.getLineContent(i),
|
|
648
656
|
s
|
|
649
657
|
);
|
|
650
|
-
let
|
|
651
|
-
for (let A =
|
|
652
|
-
const p =
|
|
653
|
-
if (
|
|
654
|
-
|
|
658
|
+
let v = 0;
|
|
659
|
+
for (let A = I.tokens.length - 1; A >= 0; A--) {
|
|
660
|
+
const p = I.tokens[A];
|
|
661
|
+
if (n.column - 1 >= p.startIndex) {
|
|
662
|
+
v = A;
|
|
655
663
|
break;
|
|
656
664
|
}
|
|
657
665
|
}
|
|
658
666
|
let f = 0;
|
|
659
|
-
for (let A =
|
|
660
|
-
if (
|
|
667
|
+
for (let A = C.tokens.length >>> 1; A >= 0; A--)
|
|
668
|
+
if (n.column - 1 >= C.tokens[A << 1]) {
|
|
661
669
|
f = A;
|
|
662
670
|
break;
|
|
663
671
|
}
|
|
664
672
|
return {
|
|
665
|
-
token:
|
|
666
|
-
metadata:
|
|
673
|
+
token: I.tokens[v],
|
|
674
|
+
metadata: Et(
|
|
667
675
|
e,
|
|
668
676
|
o._languageService,
|
|
669
|
-
|
|
677
|
+
C.tokens[(f << 1) + 1]
|
|
670
678
|
)
|
|
671
679
|
};
|
|
672
680
|
}
|
|
673
|
-
const
|
|
674
|
-
children:
|
|
681
|
+
const pe = ge(void 0), Gn = ({
|
|
682
|
+
children: t,
|
|
675
683
|
url: e,
|
|
676
|
-
qodly:
|
|
684
|
+
qodly: n,
|
|
677
685
|
defaultZoom: i,
|
|
678
686
|
openHandler: o,
|
|
679
687
|
language: r = "4d",
|
|
680
688
|
defaultInited: s = !1
|
|
681
689
|
}) => {
|
|
682
|
-
const
|
|
683
|
-
|
|
684
|
-
e &&
|
|
685
|
-
}, [e,
|
|
686
|
-
const
|
|
687
|
-
if (!
|
|
688
|
-
const
|
|
690
|
+
const I = we(), [C, v] = z(s), [f, A] = z(null), p = re(), F = re(0);
|
|
691
|
+
J(() => {
|
|
692
|
+
e && I && x();
|
|
693
|
+
}, [e, I]);
|
|
694
|
+
const x = async () => {
|
|
695
|
+
if (!I) return;
|
|
696
|
+
const m = new Ve({
|
|
689
697
|
enabled: process.env.NODE_ENV === "development",
|
|
690
698
|
debugEnabled: process.env.NODE_ENV === "development"
|
|
691
|
-
}),
|
|
692
|
-
logger:
|
|
699
|
+
}), u = await vt({
|
|
700
|
+
logger: m
|
|
693
701
|
});
|
|
694
|
-
await
|
|
702
|
+
await Ke({
|
|
695
703
|
caller: "Qodly Code Editor",
|
|
696
|
-
logger:
|
|
697
|
-
serviceConfig:
|
|
698
|
-
}), o &&
|
|
704
|
+
logger: m,
|
|
705
|
+
serviceConfig: u
|
|
706
|
+
}), o && dt.get(It).registerCodeEditorOpenHandler(o), I.languages.registerCompletionItemProvider(
|
|
699
707
|
r,
|
|
700
|
-
|
|
708
|
+
n ? Ft : wt
|
|
701
709
|
);
|
|
702
|
-
const
|
|
703
|
-
|
|
704
|
-
(
|
|
710
|
+
const d = ne.getDefaultKeybindings.bind(ne);
|
|
711
|
+
ne.getDefaultKeybindings = () => d().filter(
|
|
712
|
+
(j) => ![
|
|
705
713
|
"workbench.action.files.saveAs",
|
|
706
714
|
"workbench.action.files.save"
|
|
707
|
-
].includes(
|
|
708
|
-
),
|
|
709
|
-
provideFoldingRanges: function(
|
|
710
|
-
const
|
|
711
|
-
for (let
|
|
712
|
-
const U =
|
|
713
|
-
if (
|
|
714
|
-
let
|
|
715
|
-
for (;
|
|
716
|
-
const
|
|
717
|
-
if (
|
|
715
|
+
].includes(j.command)
|
|
716
|
+
), Ie.addKeybindingRules(Lt), I.languages.registerFoldingRangeProvider(r, {
|
|
717
|
+
provideFoldingRanges: function(R) {
|
|
718
|
+
const j = [], Z = /\\\s*$/;
|
|
719
|
+
for (let W = 1, M = R.getLineCount(); W <= M; W++) {
|
|
720
|
+
const U = R.getLineContent(W);
|
|
721
|
+
if (Z.exec(U)) {
|
|
722
|
+
let B = W + 1;
|
|
723
|
+
for (; B <= M; ) {
|
|
724
|
+
const te = R.getLineContent(B);
|
|
725
|
+
if (Z.exec(te) == null)
|
|
718
726
|
break;
|
|
719
|
-
|
|
727
|
+
B++;
|
|
720
728
|
}
|
|
721
|
-
|
|
722
|
-
start:
|
|
723
|
-
end:
|
|
724
|
-
kind:
|
|
725
|
-
}),
|
|
729
|
+
B > W && (j.push({
|
|
730
|
+
start: W,
|
|
731
|
+
end: B,
|
|
732
|
+
kind: I.languages.FoldingRangeKind.Region
|
|
733
|
+
}), W = B);
|
|
726
734
|
}
|
|
727
735
|
}
|
|
728
|
-
return
|
|
736
|
+
return j;
|
|
729
737
|
}
|
|
730
738
|
}), S();
|
|
731
739
|
}, S = () => {
|
|
732
740
|
A(null);
|
|
733
|
-
let
|
|
741
|
+
let m;
|
|
734
742
|
try {
|
|
735
|
-
|
|
743
|
+
m = new WebSocket(localStorage.LSP_SERVER || e);
|
|
736
744
|
} catch {
|
|
737
745
|
A(new Event("INVALID_URL"));
|
|
738
746
|
return;
|
|
739
747
|
}
|
|
740
|
-
|
|
748
|
+
m.onopen = y, m.onclose = h, m.onerror = c, F.current = 0;
|
|
741
749
|
}, y = async function() {
|
|
742
|
-
const
|
|
750
|
+
const m = et(this), u = new St(m), d = new yt(m), R = new Ze({
|
|
743
751
|
name: "4D Language Client",
|
|
744
752
|
clientOptions: {
|
|
745
753
|
workspaceFolder: {
|
|
746
|
-
uri:
|
|
754
|
+
uri: $e.parse("file:///PACKAGE")
|
|
747
755
|
},
|
|
748
756
|
// use a language id as a document selector
|
|
749
757
|
documentSelector: [{ scheme: "file", language: r }],
|
|
750
758
|
// disable the default error handler
|
|
751
759
|
errorHandler: {
|
|
752
|
-
error: () => ({ action:
|
|
753
|
-
closed: () => ({ action:
|
|
760
|
+
error: () => ({ action: He.Continue }),
|
|
761
|
+
closed: () => ({ action: Ye.DoNotRestart })
|
|
754
762
|
}
|
|
755
763
|
},
|
|
756
764
|
// create a language client connection from the JSON RPC connection on demand
|
|
757
765
|
connectionProvider: {
|
|
758
766
|
get: () => Promise.resolve({
|
|
759
|
-
reader:
|
|
760
|
-
writer:
|
|
767
|
+
reader: u,
|
|
768
|
+
writer: d
|
|
761
769
|
})
|
|
762
770
|
}
|
|
763
771
|
});
|
|
764
|
-
p.current =
|
|
765
|
-
const
|
|
766
|
-
p.current.sendRequest = function(
|
|
767
|
-
return typeof
|
|
768
|
-
|
|
769
|
-
) ? Promise.resolve() : Z
|
|
770
|
-
},
|
|
771
|
-
|
|
772
|
-
|
|
772
|
+
p.current = R;
|
|
773
|
+
const j = R.sendRequest.bind(R);
|
|
774
|
+
p.current.sendRequest = function(Z, W, M) {
|
|
775
|
+
return typeof Z == "object" && Z.method === "textDocument/diagnostic" && /file:\/\/\/PACKAGE\/Project\/Sources\/Methods\/__Debugger_.*/.test(
|
|
776
|
+
W.textDocument.uri
|
|
777
|
+
) ? Promise.resolve() : j(Z, W, M);
|
|
778
|
+
}, u.onClose(() => {
|
|
779
|
+
R.stop(), F.current < 3 ? setTimeout(() => {
|
|
780
|
+
F.current++, S();
|
|
773
781
|
}, 1e3) : A(new Event("WEBSOCKET_CLOSED"));
|
|
774
|
-
}),
|
|
775
|
-
},
|
|
776
|
-
},
|
|
777
|
-
A(
|
|
782
|
+
}), R.needsStart() && await R.start(), v(!0);
|
|
783
|
+
}, h = () => {
|
|
784
|
+
}, c = (m) => {
|
|
785
|
+
A(m);
|
|
778
786
|
};
|
|
779
|
-
|
|
780
|
-
const
|
|
781
|
-
switch (
|
|
782
|
-
case
|
|
783
|
-
|
|
787
|
+
J(() => {
|
|
788
|
+
const m = We.subscribe(({ action: u, payload: d }) => {
|
|
789
|
+
switch (u) {
|
|
790
|
+
case X.WILL_SAVE:
|
|
791
|
+
k(d.filePath);
|
|
784
792
|
break;
|
|
785
|
-
case
|
|
786
|
-
|
|
793
|
+
case X.DID_SAVE:
|
|
794
|
+
K(d.filePath, d.content);
|
|
787
795
|
break;
|
|
788
|
-
case
|
|
789
|
-
|
|
796
|
+
case X.WILL_CREATE:
|
|
797
|
+
b(d.filePath);
|
|
790
798
|
break;
|
|
791
|
-
case
|
|
792
|
-
|
|
799
|
+
case X.DID_CREATE:
|
|
800
|
+
Se(d.filePath);
|
|
793
801
|
break;
|
|
794
|
-
case
|
|
795
|
-
$(
|
|
802
|
+
case X.WILL_RENAME:
|
|
803
|
+
$(d.oldPath, d.newPath);
|
|
796
804
|
break;
|
|
797
|
-
case
|
|
798
|
-
|
|
805
|
+
case X.DID_RENAME:
|
|
806
|
+
ye(d.oldPath, d.newPath);
|
|
799
807
|
break;
|
|
800
|
-
case
|
|
801
|
-
P(
|
|
808
|
+
case X.WILL_DELETE:
|
|
809
|
+
P(d.filePath);
|
|
802
810
|
break;
|
|
803
|
-
case
|
|
804
|
-
|
|
811
|
+
case X.DID_DELETE:
|
|
812
|
+
Ne(d.filePath);
|
|
805
813
|
break;
|
|
806
|
-
case
|
|
807
|
-
|
|
814
|
+
case X.DIAGNOSTIC_REFRESH:
|
|
815
|
+
N(d.filePath);
|
|
808
816
|
break;
|
|
809
817
|
}
|
|
810
818
|
});
|
|
811
|
-
return () =>
|
|
819
|
+
return () => m.unsubscribe();
|
|
812
820
|
}, []);
|
|
813
|
-
const
|
|
814
|
-
var
|
|
815
|
-
return (
|
|
816
|
-
(
|
|
817
|
-
var
|
|
818
|
-
return ((
|
|
821
|
+
const L = (m) => {
|
|
822
|
+
var u, d;
|
|
823
|
+
return (d = (u = p.current) == null ? void 0 : u._features) == null ? void 0 : d.find(
|
|
824
|
+
(R) => {
|
|
825
|
+
var j;
|
|
826
|
+
return ((j = R._registrationType) == null ? void 0 : j.method) === m;
|
|
819
827
|
}
|
|
820
828
|
);
|
|
821
|
-
},
|
|
822
|
-
const
|
|
823
|
-
if (
|
|
824
|
-
for (const [,
|
|
825
|
-
|
|
826
|
-
return
|
|
827
|
-
}, g = async (
|
|
828
|
-
var
|
|
829
|
-
const
|
|
830
|
-
|
|
829
|
+
}, l = (m) => {
|
|
830
|
+
const u = [], d = L(m);
|
|
831
|
+
if (d)
|
|
832
|
+
for (const [, R] of d._registrations)
|
|
833
|
+
R.provider && u.push(R.provider);
|
|
834
|
+
return u;
|
|
835
|
+
}, g = async (m, u, d) => {
|
|
836
|
+
var j, Z, W;
|
|
837
|
+
const R = l(
|
|
838
|
+
ut.method
|
|
831
839
|
);
|
|
832
|
-
if (
|
|
833
|
-
const
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
840
|
+
if (R[0]) {
|
|
841
|
+
const M = new Ue(), U = await Promise.resolve(
|
|
842
|
+
R[0].full.provideDocumentSemanticTokens(
|
|
843
|
+
u,
|
|
844
|
+
M.token
|
|
837
845
|
)
|
|
838
|
-
),
|
|
839
|
-
|
|
840
|
-
|
|
846
|
+
), ee = m, B = U ? Wt(
|
|
847
|
+
u,
|
|
848
|
+
ee._themeService,
|
|
841
849
|
{
|
|
842
850
|
tokens: U,
|
|
843
|
-
legend: (
|
|
851
|
+
legend: (W = (Z = (j = p.current) == null ? void 0 : j._capabilities) == null ? void 0 : Z.semanticTokensProvider) == null ? void 0 : W.legend
|
|
844
852
|
},
|
|
845
|
-
|
|
846
|
-
) : null,
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
853
|
+
d
|
|
854
|
+
) : null, te = Zt(
|
|
855
|
+
u,
|
|
856
|
+
ee._themeService,
|
|
857
|
+
d
|
|
850
858
|
);
|
|
851
859
|
return {
|
|
852
|
-
semanticTokenInfo:
|
|
853
|
-
textmateTokenInfo:
|
|
860
|
+
semanticTokenInfo: B,
|
|
861
|
+
textmateTokenInfo: te
|
|
854
862
|
};
|
|
855
863
|
}
|
|
856
864
|
return null;
|
|
857
|
-
},
|
|
865
|
+
}, N = (m) => {
|
|
858
866
|
if (p.current) {
|
|
859
|
-
const
|
|
860
|
-
|
|
867
|
+
const u = l(
|
|
868
|
+
nt.method
|
|
861
869
|
);
|
|
862
|
-
for (const
|
|
863
|
-
|
|
870
|
+
for (const d of u)
|
|
871
|
+
d.onDidChangeDiagnosticsEmitter.fire();
|
|
864
872
|
}
|
|
865
|
-
},
|
|
866
|
-
var
|
|
867
|
-
(
|
|
873
|
+
}, k = (m, u = tt.Manual) => {
|
|
874
|
+
var d;
|
|
875
|
+
(d = p.current) == null || d.sendNotification(it.type, {
|
|
868
876
|
textDocument: {
|
|
869
|
-
uri:
|
|
877
|
+
uri: E(m)
|
|
870
878
|
},
|
|
871
|
-
reason:
|
|
879
|
+
reason: u
|
|
872
880
|
});
|
|
873
|
-
},
|
|
874
|
-
var
|
|
875
|
-
(
|
|
881
|
+
}, K = (m, u) => {
|
|
882
|
+
var d;
|
|
883
|
+
(d = p.current) == null || d.sendNotification(ot.type, {
|
|
876
884
|
textDocument: {
|
|
877
|
-
uri:
|
|
885
|
+
uri: E(m)
|
|
878
886
|
},
|
|
879
|
-
text:
|
|
887
|
+
text: u
|
|
880
888
|
});
|
|
881
|
-
},
|
|
882
|
-
var
|
|
883
|
-
(
|
|
889
|
+
}, b = (m) => {
|
|
890
|
+
var u;
|
|
891
|
+
(u = p.current) == null || u.sendRequest(rt.type, {
|
|
884
892
|
files: [
|
|
885
893
|
{
|
|
886
|
-
uri:
|
|
894
|
+
uri: E(m)
|
|
887
895
|
}
|
|
888
896
|
]
|
|
889
897
|
});
|
|
890
|
-
}, $ = (
|
|
891
|
-
var
|
|
892
|
-
(
|
|
898
|
+
}, $ = (m, u) => {
|
|
899
|
+
var d;
|
|
900
|
+
(d = p.current) == null || d.sendRequest(st.type, {
|
|
893
901
|
files: [
|
|
894
902
|
{
|
|
895
|
-
oldUri:
|
|
896
|
-
newUri:
|
|
903
|
+
oldUri: E(m),
|
|
904
|
+
newUri: E(u)
|
|
897
905
|
}
|
|
898
906
|
]
|
|
899
907
|
});
|
|
900
|
-
}, P = (
|
|
901
|
-
var
|
|
902
|
-
(
|
|
908
|
+
}, P = (m) => {
|
|
909
|
+
var u;
|
|
910
|
+
(u = p.current) == null || u.sendRequest(at.type, {
|
|
903
911
|
files: [
|
|
904
912
|
{
|
|
905
|
-
uri:
|
|
913
|
+
uri: E(m)
|
|
906
914
|
}
|
|
907
915
|
]
|
|
908
916
|
});
|
|
909
|
-
},
|
|
910
|
-
var
|
|
911
|
-
(
|
|
917
|
+
}, Se = (m) => {
|
|
918
|
+
var u;
|
|
919
|
+
(u = p.current) == null || u.sendNotification(lt.type, {
|
|
912
920
|
files: [
|
|
913
921
|
{
|
|
914
|
-
uri:
|
|
922
|
+
uri: E(m)
|
|
915
923
|
}
|
|
916
924
|
]
|
|
917
925
|
});
|
|
918
|
-
},
|
|
919
|
-
var
|
|
920
|
-
(
|
|
926
|
+
}, ye = (m, u) => {
|
|
927
|
+
var d;
|
|
928
|
+
(d = p.current) == null || d.sendNotification(ct.type, {
|
|
921
929
|
files: [
|
|
922
930
|
{
|
|
923
|
-
oldUri:
|
|
924
|
-
newUri:
|
|
931
|
+
oldUri: E(m),
|
|
932
|
+
newUri: E(u)
|
|
925
933
|
}
|
|
926
934
|
]
|
|
927
935
|
});
|
|
928
|
-
},
|
|
929
|
-
var
|
|
930
|
-
(
|
|
936
|
+
}, Ne = (m) => {
|
|
937
|
+
var u;
|
|
938
|
+
(u = p.current) == null || u.sendNotification(gt.type, {
|
|
931
939
|
files: [
|
|
932
940
|
{
|
|
933
|
-
uri:
|
|
941
|
+
uri: E(m)
|
|
934
942
|
}
|
|
935
943
|
]
|
|
936
944
|
});
|
|
937
945
|
};
|
|
938
946
|
return /* @__PURE__ */ _(
|
|
939
|
-
|
|
947
|
+
pe.Provider,
|
|
940
948
|
{
|
|
941
949
|
value: {
|
|
942
|
-
inited:
|
|
950
|
+
inited: C || !!f,
|
|
943
951
|
clientRef: p,
|
|
944
952
|
lastError: f,
|
|
945
953
|
reload: S,
|
|
946
954
|
getTokenAtPosition: g
|
|
947
955
|
},
|
|
948
956
|
children: [
|
|
949
|
-
|
|
950
|
-
/* @__PURE__ */ w(
|
|
957
|
+
t,
|
|
958
|
+
/* @__PURE__ */ w(kt, { defaultZoom: i })
|
|
951
959
|
]
|
|
952
960
|
}
|
|
953
961
|
);
|
|
954
962
|
};
|
|
955
|
-
function
|
|
956
|
-
const
|
|
957
|
-
if (
|
|
963
|
+
function Mn() {
|
|
964
|
+
const t = ue(pe);
|
|
965
|
+
if (t === void 0)
|
|
958
966
|
throw new Error("useLSP must be used within an LSPContext");
|
|
959
|
-
return
|
|
967
|
+
return t;
|
|
960
968
|
}
|
|
961
|
-
const
|
|
969
|
+
const Ae = ge(
|
|
962
970
|
void 0
|
|
963
|
-
),
|
|
964
|
-
const [e,
|
|
971
|
+
), Jn = Re(({ children: t }) => {
|
|
972
|
+
const [e, n] = z(null);
|
|
965
973
|
return /* @__PURE__ */ w(
|
|
966
|
-
|
|
974
|
+
Ae.Provider,
|
|
967
975
|
{
|
|
968
976
|
value: {
|
|
969
977
|
editor: e,
|
|
970
|
-
setEditor:
|
|
978
|
+
setEditor: n
|
|
971
979
|
},
|
|
972
|
-
children:
|
|
980
|
+
children: t
|
|
973
981
|
}
|
|
974
982
|
);
|
|
975
983
|
});
|
|
976
|
-
function
|
|
977
|
-
const
|
|
978
|
-
if (
|
|
979
|
-
const [
|
|
984
|
+
function Xt() {
|
|
985
|
+
const t = ue(Ae), e = z(null);
|
|
986
|
+
if (t === void 0) {
|
|
987
|
+
const [n, i] = e;
|
|
980
988
|
return {
|
|
981
|
-
editor:
|
|
989
|
+
editor: n,
|
|
982
990
|
setEditor: i
|
|
983
991
|
};
|
|
984
992
|
}
|
|
985
|
-
return
|
|
993
|
+
return t;
|
|
986
994
|
}
|
|
987
|
-
const
|
|
988
|
-
provideCompletionItems: (
|
|
989
|
-
const
|
|
995
|
+
const Kt = {
|
|
996
|
+
provideCompletionItems: (t, e) => {
|
|
997
|
+
const n = t.getWordUntilPosition(e);
|
|
990
998
|
return {
|
|
991
999
|
suggestions: [
|
|
992
1000
|
{
|
|
993
1001
|
label: "device:xs",
|
|
994
|
-
kind:
|
|
1002
|
+
kind: a.languages.CompletionItemKind.Snippet,
|
|
995
1003
|
documentation: "Media query for phone device",
|
|
996
|
-
range: new
|
|
1004
|
+
range: new a.Range(
|
|
997
1005
|
e.lineNumber,
|
|
998
|
-
|
|
1006
|
+
n.startColumn,
|
|
999
1007
|
e.lineNumber,
|
|
1000
|
-
|
|
1008
|
+
n.endColumn
|
|
1001
1009
|
),
|
|
1002
1010
|
insertText: [
|
|
1003
1011
|
"@media screen and (max-width: ${1:365px}) {",
|
|
@@ -1007,122 +1015,122 @@ const Xt = {
|
|
|
1007
1015
|
"}"
|
|
1008
1016
|
].join(`
|
|
1009
1017
|
`),
|
|
1010
|
-
insertTextRules:
|
|
1018
|
+
insertTextRules: a.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
1011
1019
|
}
|
|
1012
1020
|
]
|
|
1013
1021
|
};
|
|
1014
1022
|
}
|
|
1015
|
-
},
|
|
1016
|
-
$ref:
|
|
1017
|
-
definitions:
|
|
1018
|
-
},
|
|
1019
|
-
type:
|
|
1020
|
-
items:
|
|
1023
|
+
}, Bt = "#/definitions/Condition", Dt = { Base: { type: "object", properties: { id: { type: "string" }, name: { type: "string" } }, required: ["id"] }, Condition: { oneOf: [{ $ref: "#/definitions/Datasource" }, { $ref: "#/definitions/Privilege" }, { $ref: "#/definitions/Combination" }, { $ref: "#/definitions/CurrentState" }, { $ref: "#/definitions/ParentState" }, { $ref: "#/definitions/Reference" }] }, Datasource: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "datasource" }, path: { type: "string" }, value: { type: ["number", "string", "boolean", "object", "array", "null"] }, valueType: { enum: ["datasource", "hardCoded"] }, dataType: { enum: ["string", "number", "date", "boolean", "array", "object"] }, op: { enum: ["eq", "neq", "regex", "in", "nin", "gt", "gte", "lt", "lte"] } }, required: ["name", "type", "path", "value", "op"] }, Privilege: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "privilege" }, value: { type: "string" }, valueType: { enum: ["datasource", "hardCoded"] }, op: { enum: ["eq", "neq", "regex"] } }, required: ["name", "type", "value", "op"] }, Combination: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "combination" }, op: { enum: ["and", "or"] }, conditions: { type: "array", items: { $ref: "#/definitions/Condition" } } }, required: ["type", "conditions", "op"] }, CurrentState: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "currentState" }, value: { type: "string" }, valueType: { enum: ["datasource", "hardCoded"] }, dataType: { enum: ["string", "number", "date", "boolean", "array", "object"] }, op: { enum: ["eq", "neq", "regex"] } }, required: ["name", "type", "value", "op"] }, ParentState: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "parentState" }, value: { type: "string" }, valueType: { enum: ["datasource", "hardCoded"] }, dataType: { enum: ["string", "number", "date", "boolean", "array", "object"] }, op: { enum: ["eq", "neq", "regex"] } }, required: ["name", "type", "value", "op"] }, Reference: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "reference" }, ref: { type: "string" } }, required: ["type", "ref"] } }, Tt = {
|
|
1024
|
+
$ref: Bt,
|
|
1025
|
+
definitions: Dt
|
|
1026
|
+
}, Ot = "array", Gt = { type: "object", properties: { class: { type: "string" }, method: { type: "string" }, regexPattern: { type: "string" }, verbs: { type: "string" } } }, Mt = {
|
|
1027
|
+
type: Ot,
|
|
1028
|
+
items: Gt
|
|
1021
1029
|
};
|
|
1022
|
-
function
|
|
1023
|
-
const
|
|
1024
|
-
|
|
1030
|
+
function Jt(t, e) {
|
|
1031
|
+
const n = document.createElement("style");
|
|
1032
|
+
n.dataset.id = e, n.textContent = t, document.head.append(n);
|
|
1025
1033
|
}
|
|
1026
|
-
function
|
|
1034
|
+
function Pt(t) {
|
|
1027
1035
|
return Array.from(document.styleSheets).find(
|
|
1028
|
-
(e) => e.ownerNode.getAttribute("data-id") ===
|
|
1036
|
+
(e) => e.ownerNode.getAttribute("data-id") === t
|
|
1029
1037
|
);
|
|
1030
1038
|
}
|
|
1031
|
-
function
|
|
1032
|
-
const
|
|
1039
|
+
function Vt(t, e) {
|
|
1040
|
+
const n = [];
|
|
1033
1041
|
let i = [];
|
|
1034
|
-
const o = [], r = (
|
|
1035
|
-
|
|
1036
|
-
startLineNumber:
|
|
1037
|
-
endLineNumber:
|
|
1042
|
+
const o = [], r = (l, g, N, k) => {
|
|
1043
|
+
n.push({
|
|
1044
|
+
startLineNumber: l,
|
|
1045
|
+
endLineNumber: N,
|
|
1038
1046
|
startColumn: g,
|
|
1039
|
-
endColumn:
|
|
1040
|
-
}),
|
|
1041
|
-
}, s = (
|
|
1042
|
-
o.indexOf(
|
|
1043
|
-
},
|
|
1044
|
-
const g = o.indexOf(
|
|
1047
|
+
endColumn: k
|
|
1048
|
+
}), v(), C();
|
|
1049
|
+
}, s = (l) => {
|
|
1050
|
+
o.indexOf(l) < 0 && o.push(l);
|
|
1051
|
+
}, I = (l) => {
|
|
1052
|
+
const g = o.indexOf(l);
|
|
1045
1053
|
g < 0 || o.splice(g, 1);
|
|
1046
|
-
},
|
|
1047
|
-
for (const
|
|
1054
|
+
}, C = () => {
|
|
1055
|
+
for (const l of o)
|
|
1048
1056
|
try {
|
|
1049
|
-
|
|
1057
|
+
l(i);
|
|
1050
1058
|
} catch (g) {
|
|
1051
1059
|
console.error(g);
|
|
1052
1060
|
}
|
|
1053
|
-
},
|
|
1054
|
-
const
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1061
|
+
}, v = () => {
|
|
1062
|
+
const l = t.getModel();
|
|
1063
|
+
l && (i = Ht(
|
|
1064
|
+
n.map((g) => [
|
|
1065
|
+
l.getOffsetAt({
|
|
1058
1066
|
lineNumber: g.startLineNumber,
|
|
1059
1067
|
column: g.startColumn
|
|
1060
1068
|
}),
|
|
1061
|
-
|
|
1069
|
+
l.getOffsetAt({
|
|
1062
1070
|
lineNumber: g.endLineNumber,
|
|
1063
1071
|
column: g.endColumn
|
|
1064
1072
|
})
|
|
1065
1073
|
]),
|
|
1066
1074
|
/*mergeJoins*/
|
|
1067
1075
|
!0
|
|
1068
|
-
), i.length > 0 && (i[0][0] <= 0 && (i[0][0] = Number.NEGATIVE_INFINITY), i[i.length - 1][1] >=
|
|
1069
|
-
}, f = (
|
|
1076
|
+
), i.length > 0 && (i[0][0] <= 0 && (i[0][0] = Number.NEGATIVE_INFINITY), i[i.length - 1][1] >= l.getValueLength() && (i[i.length - 1][1] = Number.POSITIVE_INFINITY)));
|
|
1077
|
+
}, f = (l) => {
|
|
1070
1078
|
const g = {
|
|
1071
1079
|
isDeletion: !1,
|
|
1072
1080
|
isAddition: !1,
|
|
1073
1081
|
isReplacement: !1
|
|
1074
1082
|
};
|
|
1075
|
-
return
|
|
1076
|
-
}, A =
|
|
1077
|
-
|
|
1078
|
-
}), p =
|
|
1079
|
-
if (!
|
|
1080
|
-
for (const g of
|
|
1081
|
-
const
|
|
1082
|
-
if (
|
|
1083
|
-
const
|
|
1084
|
-
(
|
|
1085
|
-
),
|
|
1086
|
-
if (
|
|
1087
|
-
const
|
|
1088
|
-
if (
|
|
1089
|
-
|
|
1083
|
+
return l.text === "" ? g.isDeletion = !0 : l.range.startLineNumber === l.range.endLineNumber && l.range.startColumn === l.range.endColumn ? g.isAddition = !0 : g.isReplacement = !0, g;
|
|
1084
|
+
}, A = t.onDidChangeModel((l) => {
|
|
1085
|
+
v(), c();
|
|
1086
|
+
}), p = t.onDidChangeModelContent((l) => {
|
|
1087
|
+
if (!l.isUndoing)
|
|
1088
|
+
for (const g of l.changes) {
|
|
1089
|
+
const N = f(g);
|
|
1090
|
+
if (N.isReplacement || N.isDeletion || N.isAddition) {
|
|
1091
|
+
const k = n.some(
|
|
1092
|
+
(b) => g.range.startLineNumber >= b.startLineNumber && g.range.endLineNumber <= b.endLineNumber && g.range.startColumn >= b.startColumn && g.range.endColumn <= b.endColumn
|
|
1093
|
+
), K = !k && e && g.range.startLineNumber === 1 && g.range.startColumn === 1 && !de(g.text);
|
|
1094
|
+
if (k || K) {
|
|
1095
|
+
const b = t.getModel();
|
|
1096
|
+
if (b) {
|
|
1097
|
+
b.undo();
|
|
1090
1098
|
return;
|
|
1091
1099
|
}
|
|
1092
1100
|
}
|
|
1093
1101
|
}
|
|
1094
1102
|
}
|
|
1095
|
-
}),
|
|
1103
|
+
}), F = () => {
|
|
1096
1104
|
A.dispose(), p.dispose();
|
|
1097
1105
|
};
|
|
1098
|
-
let
|
|
1106
|
+
let x = [], S = `
|
|
1099
1107
|
.idoc-readonly-mark {
|
|
1100
1108
|
cursor: not-allowed;
|
|
1101
1109
|
z-index: 1;
|
|
1102
1110
|
}
|
|
1103
1111
|
`;
|
|
1104
1112
|
if (S) {
|
|
1105
|
-
const
|
|
1106
|
-
|
|
1113
|
+
const l = "monaco-read-only";
|
|
1114
|
+
Pt(l) || Jt(S, l), S = null;
|
|
1107
1115
|
}
|
|
1108
1116
|
const y = () => {
|
|
1109
|
-
s(
|
|
1110
|
-
},
|
|
1111
|
-
|
|
1112
|
-
},
|
|
1113
|
-
const
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
i.map(
|
|
1117
|
+
s(c), c();
|
|
1118
|
+
}, h = () => {
|
|
1119
|
+
I(c), x = t.deltaDecorations(x, []);
|
|
1120
|
+
}, c = () => {
|
|
1121
|
+
const l = t.getModel();
|
|
1122
|
+
l && (x = t.deltaDecorations(
|
|
1123
|
+
x,
|
|
1124
|
+
i.map(L(l))
|
|
1117
1125
|
));
|
|
1118
|
-
},
|
|
1119
|
-
const
|
|
1126
|
+
}, L = (l) => (g) => {
|
|
1127
|
+
const N = l.getPositionAt(g[0]), k = l.getPositionAt(g[1]);
|
|
1120
1128
|
return {
|
|
1121
|
-
range: new
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1129
|
+
range: new a.Range(
|
|
1130
|
+
N.lineNumber,
|
|
1131
|
+
N.column,
|
|
1132
|
+
k.lineNumber,
|
|
1133
|
+
k.column
|
|
1126
1134
|
),
|
|
1127
1135
|
options: {
|
|
1128
1136
|
className: "idoc-readonly-mark"
|
|
@@ -1135,53 +1143,53 @@ function Mt(n, e) {
|
|
|
1135
1143
|
},
|
|
1136
1144
|
exclude: r,
|
|
1137
1145
|
attach: s,
|
|
1138
|
-
detach:
|
|
1139
|
-
dispose:
|
|
1146
|
+
detach: I,
|
|
1147
|
+
dispose: F,
|
|
1140
1148
|
show: y,
|
|
1141
|
-
hide:
|
|
1149
|
+
hide: h
|
|
1142
1150
|
};
|
|
1143
1151
|
}
|
|
1144
|
-
function
|
|
1152
|
+
function Yt(t, e, n) {
|
|
1145
1153
|
let i = !1;
|
|
1146
|
-
const o = (
|
|
1154
|
+
const o = (h) => h[1] < h[0] ? (i = !0, [[h[1], h[0]]]) : [[...h]], r = (h) => i ? h.map((c) => c[1] > c[0] ? I(c) : c).reverse() : h;
|
|
1147
1155
|
let s;
|
|
1148
|
-
const
|
|
1149
|
-
let
|
|
1150
|
-
A =
|
|
1156
|
+
const I = (h) => (s = h[1], h[1] = h[0], h[0] = s, h), C = o(t);
|
|
1157
|
+
let v, f, A, p, F, x, S, y;
|
|
1158
|
+
A = C[0];
|
|
1151
1159
|
for (f of e)
|
|
1152
|
-
for (S = f[0], y = f[1], p = 0; p <
|
|
1153
|
-
if (A =
|
|
1154
|
-
|
|
1155
|
-
[
|
|
1156
|
-
[y + 1,
|
|
1160
|
+
for (S = f[0], y = f[1], p = 0; p < C.length; p++) {
|
|
1161
|
+
if (A = C[p], F = A[0], x = A[1], F < S)
|
|
1162
|
+
x < S ? v = [A] : x <= y ? v = [[F, S - 1]] : v = [
|
|
1163
|
+
[F, S - 1],
|
|
1164
|
+
[y + 1, x]
|
|
1157
1165
|
];
|
|
1158
|
-
else if (
|
|
1166
|
+
else if (F <= y)
|
|
1159
1167
|
if (S === Number.NEGATIVE_INFINITY) {
|
|
1160
|
-
const
|
|
1161
|
-
|
|
1162
|
-
} else y === Number.POSITIVE_INFINITY ?
|
|
1168
|
+
const h = y + 1;
|
|
1169
|
+
v = n === 0 ? [] : [[h, x > h ? x : h]];
|
|
1170
|
+
} else y === Number.POSITIVE_INFINITY ? v = n === 0 ? [] : [[S - 1, S - 1]] : x <= y ? v = n < 0 ? [[S - 1, S - 1]] : n > 0 ? [[y + 1, y + 1]] : [] : v = [[y + 1, x]];
|
|
1163
1171
|
else
|
|
1164
|
-
|
|
1165
|
-
if (
|
|
1172
|
+
v = [A];
|
|
1173
|
+
if (C.splice(p, 1, ...v), C.length === 1 && C[0][1] < S) return r(C);
|
|
1166
1174
|
}
|
|
1167
|
-
return r(
|
|
1175
|
+
return r(C);
|
|
1168
1176
|
}
|
|
1169
|
-
function
|
|
1170
|
-
if (
|
|
1171
|
-
const
|
|
1177
|
+
function Ht(t, e) {
|
|
1178
|
+
if (t.length < 2) return t;
|
|
1179
|
+
const n = [];
|
|
1172
1180
|
let i = null, o, r;
|
|
1173
|
-
|
|
1181
|
+
t = t.map(
|
|
1174
1182
|
(s) => (s[1] < s[0] && (o = s[1], s[1] = s[0], s[1] = o), s)
|
|
1175
|
-
).sort((s,
|
|
1176
|
-
for (let s = 1; s <
|
|
1177
|
-
i =
|
|
1178
|
-
return
|
|
1183
|
+
).sort((s, I) => s[0] - I[0]), n.push(t[0]);
|
|
1184
|
+
for (let s = 1; s < t.length; s++)
|
|
1185
|
+
i = n[n.length - 1], r = t[s], i[1] === r[0] && !e || (i[1] === r[0] - 1 && e ? (i[1] = r[1], n.splice(n.length - 1, 1, i)) : i[1] < r[0] ? n.push(r) : i[1] < r[1] && (i[1] = r[1], n.splice(n.length - 1, 1, i)));
|
|
1186
|
+
return n;
|
|
1179
1187
|
}
|
|
1180
|
-
function Y(
|
|
1181
|
-
return e.bind(
|
|
1188
|
+
function Y(t, e) {
|
|
1189
|
+
return e.bind(t);
|
|
1182
1190
|
}
|
|
1183
|
-
class
|
|
1184
|
-
constructor(e,
|
|
1191
|
+
class _t {
|
|
1192
|
+
constructor(e, n) {
|
|
1185
1193
|
var i;
|
|
1186
1194
|
this.disposables = [], this.prefer = 1, this.lastPrefer = 1, this.onCursor = Y(
|
|
1187
1195
|
this,
|
|
@@ -1195,7 +1203,7 @@ class Yt {
|
|
|
1195
1203
|
}), this.onRectangleSelectionStop = Y(this, function() {
|
|
1196
1204
|
this.prefer = this.lastPrefer, window.removeEventListener("pointerup", this.onRectangleSelectionStop);
|
|
1197
1205
|
}), this.onKey = Y(this, function(o) {
|
|
1198
|
-
const r = o.keyCode, s =
|
|
1206
|
+
const r = o.keyCode, s = a.KeyCode;
|
|
1199
1207
|
if (o.altKey || s.F1 <= r && r <= s.F19 || o.ctrlKey && r !== s.Backspace) return;
|
|
1200
1208
|
if (r === s.UpArrow || r === s.LeftArrow || r === s.Home || r === s.PageUp) {
|
|
1201
1209
|
this.prefer = -1;
|
|
@@ -1205,21 +1213,21 @@ class Yt {
|
|
|
1205
1213
|
this.prefer = 1;
|
|
1206
1214
|
return;
|
|
1207
1215
|
}
|
|
1208
|
-
const
|
|
1209
|
-
let
|
|
1216
|
+
const I = this.getSelections(), C = this.intervals.buffer;
|
|
1217
|
+
let v;
|
|
1210
1218
|
if (r === s.Delete)
|
|
1211
|
-
|
|
1219
|
+
v = (f) => f[0] === f[1] && C.find((A) => f[1] + 1 === A[0]) != null;
|
|
1212
1220
|
else if (r === s.Backspace)
|
|
1213
|
-
|
|
1221
|
+
v = (f) => f[0] === f[1] && C.find((A) => A[1] + 1 === f[0]) != null;
|
|
1214
1222
|
else
|
|
1215
1223
|
return;
|
|
1216
|
-
|
|
1224
|
+
I.findIndex(v) !== -1 && (o.stopPropagation(), o.preventDefault());
|
|
1217
1225
|
}), this.getOffsetAt = Y(this, function(o) {
|
|
1218
1226
|
let r;
|
|
1219
1227
|
for (let s = 0; s < this.intervals.buffer.length; s++)
|
|
1220
1228
|
if (r = this.intervals.buffer[s], o <= r[1])
|
|
1221
1229
|
return r[0] - o < o - r[1] ? r[0] : r[1];
|
|
1222
|
-
}), this.editor = e, this.intervals =
|
|
1230
|
+
}), this.editor = e, this.intervals = Vt(e, n), (i = this.editor.getModel()) == null || i.setEOL(a.editor.EndOfLineSequence.LF);
|
|
1223
1231
|
}
|
|
1224
1232
|
enable() {
|
|
1225
1233
|
this.disposables.push(
|
|
@@ -1232,20 +1240,20 @@ class Yt {
|
|
|
1232
1240
|
for (const e of this.disposables) e.dispose();
|
|
1233
1241
|
this.disposables.splice(0);
|
|
1234
1242
|
}
|
|
1235
|
-
exclude(e,
|
|
1236
|
-
arguments.length === 1 ? this.intervals.exclude(e, 0, e, Number.MAX_SAFE_INTEGER) : this.intervals.exclude(e,
|
|
1243
|
+
exclude(e, n, i, o) {
|
|
1244
|
+
arguments.length === 1 ? this.intervals.exclude(e, 0, e, Number.MAX_SAFE_INTEGER) : this.intervals.exclude(e, n, i, o);
|
|
1237
1245
|
}
|
|
1238
1246
|
getApprovedSelections() {
|
|
1239
1247
|
const e = this.editor.getModel();
|
|
1240
1248
|
return this.getSelections().map(
|
|
1241
|
-
(i) =>
|
|
1249
|
+
(i) => Yt(
|
|
1242
1250
|
i,
|
|
1243
1251
|
this.intervals.buffer,
|
|
1244
1252
|
this.prefer
|
|
1245
1253
|
)
|
|
1246
1254
|
).flat().map((i) => {
|
|
1247
1255
|
const o = e.getPositionAt(i[0]), r = e.getPositionAt(i[1]);
|
|
1248
|
-
return new
|
|
1256
|
+
return new a.Selection(
|
|
1249
1257
|
o.lineNumber,
|
|
1250
1258
|
o.column,
|
|
1251
1259
|
r.lineNumber,
|
|
@@ -1255,211 +1263,296 @@ class Yt {
|
|
|
1255
1263
|
}
|
|
1256
1264
|
getSelections() {
|
|
1257
1265
|
const e = this.editor.getModel();
|
|
1258
|
-
return (this.editor.getSelections() || []).map((
|
|
1266
|
+
return (this.editor.getSelections() || []).map((n) => [
|
|
1259
1267
|
e.getOffsetAt({
|
|
1260
|
-
lineNumber:
|
|
1261
|
-
column:
|
|
1268
|
+
lineNumber: n.selectionStartLineNumber,
|
|
1269
|
+
column: n.selectionStartColumn
|
|
1262
1270
|
}),
|
|
1263
1271
|
e.getOffsetAt({
|
|
1264
|
-
lineNumber:
|
|
1265
|
-
column:
|
|
1272
|
+
lineNumber: n.positionLineNumber,
|
|
1273
|
+
column: n.positionColumn
|
|
1266
1274
|
})
|
|
1267
1275
|
]);
|
|
1268
1276
|
}
|
|
1269
1277
|
}
|
|
1270
|
-
const
|
|
1271
|
-
|
|
1278
|
+
const zt = {
|
|
1279
|
+
provideDocumentFormattingEdits(t, e) {
|
|
1280
|
+
const n = t.getValue();
|
|
1281
|
+
try {
|
|
1282
|
+
const i = $t(n, e.tabSize, e.insertSpaces);
|
|
1283
|
+
return [
|
|
1284
|
+
{
|
|
1285
|
+
range: t.getFullModelRange(),
|
|
1286
|
+
text: i
|
|
1287
|
+
}
|
|
1288
|
+
];
|
|
1289
|
+
} catch {
|
|
1290
|
+
return [];
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
};
|
|
1294
|
+
function $t(t, e = 2, n = !0) {
|
|
1295
|
+
const i = n ? " ".repeat(e) : " ";
|
|
1296
|
+
let o = t.replace(/\s+/g, " ").trim();
|
|
1297
|
+
return o = o.replace(/\{/g, ` {
|
|
1298
|
+
` + i).replace(/\}/g, `
|
|
1299
|
+
}
|
|
1300
|
+
`).replace(/;/g, `;
|
|
1301
|
+
` + i).replace(/,/g, `,
|
|
1302
|
+
` + i), o = o.replace(/\s*\{\s*/g, ` {
|
|
1303
|
+
` + i).replace(/\s*\}\s*/g, `
|
|
1304
|
+
}
|
|
1305
|
+
`).replace(/\s*;\s*/g, `;
|
|
1306
|
+
` + i).replace(/\s*:\s*/g, ": "), o = o.split(`
|
|
1307
|
+
`).map((r) => r.trim() === "}" ? "}" : r.trimEnd()).filter((r, s, I) => !(r === "" && I[s + 1] === "")).join(`
|
|
1308
|
+
`).trim(), o;
|
|
1309
|
+
}
|
|
1310
|
+
const Ut = {
|
|
1311
|
+
provideDocumentFormattingEdits(t, e) {
|
|
1312
|
+
const n = t.getValue();
|
|
1313
|
+
try {
|
|
1314
|
+
const i = qt(n, e.tabSize);
|
|
1315
|
+
return [
|
|
1316
|
+
{
|
|
1317
|
+
range: t.getFullModelRange(),
|
|
1318
|
+
text: i
|
|
1319
|
+
}
|
|
1320
|
+
];
|
|
1321
|
+
} catch {
|
|
1322
|
+
return [];
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
};
|
|
1326
|
+
function qt(t, e = 2) {
|
|
1327
|
+
const n = JSON.parse(t);
|
|
1328
|
+
return JSON.stringify(n, null, e);
|
|
1329
|
+
}
|
|
1330
|
+
const Qt = new RegExp("^[ s]+(exposed|Function)", "i"), en = ({
|
|
1331
|
+
lineNumber: t,
|
|
1272
1332
|
editor: e,
|
|
1273
|
-
type:
|
|
1333
|
+
type: n,
|
|
1274
1334
|
source: i
|
|
1275
1335
|
}) => {
|
|
1276
|
-
var
|
|
1277
|
-
const o =
|
|
1278
|
-
if (
|
|
1336
|
+
var v;
|
|
1337
|
+
const o = n === oe.METHOD || n === oe.DEBUGGER && ((v = i == null ? void 0 : i.codeDescriptorInfo) == null ? void 0 : v.type) === je.METHOD;
|
|
1338
|
+
if (t === 1)
|
|
1279
1339
|
return o ? "" : "1";
|
|
1280
|
-
const r = e == null ? void 0 : e.getModel(), s = (r == null ? void 0 : r.getLinesContent()) || [],
|
|
1281
|
-
let
|
|
1340
|
+
const r = e == null ? void 0 : e.getModel(), s = (r == null ? void 0 : r.getLinesContent()) || [], I = Array(s.length).fill("-");
|
|
1341
|
+
let C = o ? 0 : 1;
|
|
1282
1342
|
for (let f = 1; f < s.length; f++)
|
|
1283
|
-
(f === 1 ? "" : s[f - 1]).endsWith("\\") || (
|
|
1284
|
-
return
|
|
1343
|
+
(f === 1 ? "" : s[f - 1]).endsWith("\\") || (C += 1, I[f] = C.toString());
|
|
1344
|
+
return I[t - 1];
|
|
1285
1345
|
}, le = () => /* @__PURE__ */ w("div", { className: "absolute inset-0 animate-pulse", children: /* @__PURE__ */ w("div", { className: "w-full space-y-4 px-4 py-1", children: /* @__PURE__ */ _("div", { className: "space-y-2", children: [
|
|
1286
1346
|
/* @__PURE__ */ w("div", { className: "h-3 w-3/4 rounded bg-grey-200" }),
|
|
1287
1347
|
/* @__PURE__ */ w("div", { className: "h-3 rounded bg-grey-200" }),
|
|
1288
1348
|
/* @__PURE__ */ w("div", { className: "h-3 w-5/6 rounded bg-grey-200" }),
|
|
1289
1349
|
/* @__PURE__ */ w("div", { className: "h-3 rounded bg-grey-200" }),
|
|
1290
1350
|
/* @__PURE__ */ w("div", { className: "h-3 rounded bg-grey-200" })
|
|
1291
|
-
] }) }) }),
|
|
1292
|
-
|
|
1351
|
+
] }) }) }), ie = ["fd-dark"], q = {
|
|
1352
|
+
css: [],
|
|
1353
|
+
json: []
|
|
1354
|
+
}, Pn = ({
|
|
1355
|
+
path: t,
|
|
1293
1356
|
initialValue: e,
|
|
1294
|
-
type:
|
|
1357
|
+
type: n,
|
|
1295
1358
|
language: i,
|
|
1296
1359
|
onChange: o,
|
|
1297
1360
|
options: r = {},
|
|
1298
1361
|
extra: s = {},
|
|
1299
|
-
lspProps:
|
|
1300
|
-
theme:
|
|
1301
|
-
...
|
|
1362
|
+
lspProps: I,
|
|
1363
|
+
theme: C = ie[0],
|
|
1364
|
+
...v
|
|
1302
1365
|
}) => {
|
|
1303
|
-
const { initialLineInfo: f, initialSelectionInfo: A } = s, { editor: p, setEditor:
|
|
1304
|
-
function S(
|
|
1305
|
-
i === "css" &&
|
|
1366
|
+
const { initialLineInfo: f, initialSelectionInfo: A } = s, { editor: p, setEditor: F } = Xt(), { inited: x } = I;
|
|
1367
|
+
function S(c) {
|
|
1368
|
+
i === "css" && c.languages.css && (c.languages.registerCompletionItemProvider("css", Kt), c.languages.css.cssDefaults.setModeConfiguration({
|
|
1369
|
+
documentFormattingEdits: !1,
|
|
1370
|
+
documentRangeFormattingEdits: !1
|
|
1371
|
+
}), q.css.forEach((L) => L.dispose()), q.css.push(
|
|
1372
|
+
c.languages.registerDocumentFormattingEditProvider(
|
|
1373
|
+
"css",
|
|
1374
|
+
zt
|
|
1375
|
+
)
|
|
1376
|
+
)), i === "json" && c.languages.json && (c.languages.json.jsonDefaults.setDiagnosticsOptions({
|
|
1306
1377
|
validate: !0,
|
|
1307
1378
|
schemas: [
|
|
1308
1379
|
{
|
|
1309
1380
|
uri: "condition-schema.json",
|
|
1310
1381
|
fileMatch: ["*.condition.json"],
|
|
1311
|
-
schema:
|
|
1382
|
+
schema: Tt
|
|
1312
1383
|
},
|
|
1313
1384
|
{
|
|
1314
1385
|
uri: "handlers-schema.json",
|
|
1315
|
-
fileMatch: [
|
|
1316
|
-
schema:
|
|
1386
|
+
fileMatch: [Ee],
|
|
1387
|
+
schema: Mt
|
|
1317
1388
|
}
|
|
1318
1389
|
]
|
|
1319
|
-
})
|
|
1390
|
+
}), c.languages.json.jsonDefaults.setModeConfiguration({
|
|
1391
|
+
documentFormattingEdits: !1,
|
|
1392
|
+
documentRangeFormattingEdits: !1
|
|
1393
|
+
}), q.json.forEach((L) => L.dispose()), q.json.push(
|
|
1394
|
+
c.languages.registerDocumentFormattingEditProvider(
|
|
1395
|
+
"json",
|
|
1396
|
+
Ut
|
|
1397
|
+
)
|
|
1398
|
+
));
|
|
1320
1399
|
}
|
|
1321
|
-
function y(
|
|
1322
|
-
|
|
1323
|
-
const
|
|
1324
|
-
if (
|
|
1325
|
-
var
|
|
1326
|
-
const g = (
|
|
1400
|
+
function y(c, L) {
|
|
1401
|
+
F(c);
|
|
1402
|
+
const l = c.getModel();
|
|
1403
|
+
if (l && (l.updateOptions({ insertSpaces: !1 }), c.onKeyUp(() => {
|
|
1404
|
+
var N;
|
|
1405
|
+
const g = (N = c.getPosition()) == null ? void 0 : N.lineNumber;
|
|
1327
1406
|
if (g) {
|
|
1328
|
-
const
|
|
1329
|
-
|
|
1407
|
+
const k = l.getLineFirstNonWhitespaceColumn(g), K = l.getLineLength(g), b = l.getLineContent(g);
|
|
1408
|
+
Qt.test(b) && c.executeEdits("edit-handler", [
|
|
1330
1409
|
{
|
|
1331
|
-
range: new
|
|
1410
|
+
range: new L.Range(
|
|
1332
1411
|
g,
|
|
1333
1412
|
0,
|
|
1334
1413
|
g,
|
|
1335
|
-
|
|
1414
|
+
K
|
|
1336
1415
|
),
|
|
1337
|
-
text:
|
|
1338
|
-
|
|
1339
|
-
|
|
1416
|
+
text: b.substr(
|
|
1417
|
+
k - 1,
|
|
1418
|
+
K - k
|
|
1340
1419
|
)
|
|
1341
1420
|
}
|
|
1342
1421
|
]);
|
|
1343
1422
|
}
|
|
1344
|
-
})),
|
|
1345
|
-
const g =
|
|
1423
|
+
})), xt(l)) {
|
|
1424
|
+
const g = [
|
|
1425
|
+
"editor.action.revealDefinition",
|
|
1426
|
+
"editor.action.goToReferences",
|
|
1427
|
+
"submenuitem.EditorContextPeek"
|
|
1428
|
+
], N = c.getContribution(
|
|
1429
|
+
"editor.contrib.contextmenu"
|
|
1430
|
+
), k = N._getMenuActions;
|
|
1431
|
+
N._getMenuActions = function() {
|
|
1432
|
+
return k.apply(N, arguments).filter(function(b) {
|
|
1433
|
+
return !g.includes(b.id);
|
|
1434
|
+
});
|
|
1435
|
+
};
|
|
1436
|
+
}
|
|
1437
|
+
if (n === oe.METHOD && de(e)) {
|
|
1438
|
+
const g = new _t(c, !0);
|
|
1346
1439
|
g.exclude(1, 1, 1, Number.POSITIVE_INFINITY), g.enable();
|
|
1347
1440
|
}
|
|
1348
1441
|
}
|
|
1349
|
-
|
|
1442
|
+
J(() => {
|
|
1350
1443
|
if (!p) return;
|
|
1351
|
-
const { line:
|
|
1352
|
-
|
|
1353
|
-
}, [f, p]),
|
|
1444
|
+
const { line: c, offset: L } = f || {};
|
|
1445
|
+
c && Rt(p, c, L);
|
|
1446
|
+
}, [f, p]), J(() => {
|
|
1354
1447
|
if (!p) return;
|
|
1355
|
-
const { selection:
|
|
1356
|
-
|
|
1448
|
+
const { selection: c } = A || {};
|
|
1449
|
+
c && Nt(p, c);
|
|
1357
1450
|
}, [A, p]);
|
|
1358
|
-
const
|
|
1359
|
-
return
|
|
1360
|
-
|
|
1451
|
+
const h = (c) => ie.includes(c) ? c : ie[0];
|
|
1452
|
+
return x ? /* @__PURE__ */ w(
|
|
1453
|
+
Fe,
|
|
1361
1454
|
{
|
|
1362
1455
|
options: {
|
|
1363
1456
|
readOnly: !0,
|
|
1364
1457
|
fontSize: 12,
|
|
1365
1458
|
"semanticHighlighting.enabled": !0,
|
|
1366
1459
|
padding: { top: 10 },
|
|
1367
|
-
lineNumbers: i === "4d" ? (
|
|
1368
|
-
lineNumber:
|
|
1460
|
+
lineNumbers: i === "4d" ? (c) => en({
|
|
1461
|
+
lineNumber: c,
|
|
1369
1462
|
editor: p,
|
|
1370
|
-
type:
|
|
1463
|
+
type: n,
|
|
1371
1464
|
source: s == null ? void 0 : s.source
|
|
1372
1465
|
}) : void 0,
|
|
1373
1466
|
scrollBeyondLastLine: !1,
|
|
1374
1467
|
...r
|
|
1375
1468
|
},
|
|
1376
|
-
path:
|
|
1469
|
+
path: E(t),
|
|
1377
1470
|
value: e,
|
|
1378
|
-
theme:
|
|
1379
|
-
onChange: (
|
|
1471
|
+
theme: h(C),
|
|
1472
|
+
onChange: (c) => o && o(c || ""),
|
|
1380
1473
|
language: i,
|
|
1381
1474
|
beforeMount: S,
|
|
1382
1475
|
onMount: y,
|
|
1383
1476
|
loading: /* @__PURE__ */ w(le, {}),
|
|
1384
|
-
...
|
|
1477
|
+
...v
|
|
1385
1478
|
}
|
|
1386
1479
|
) : /* @__PURE__ */ w("div", { className: "relative flex-1 w-full", children: /* @__PURE__ */ w(le, {}) });
|
|
1387
1480
|
};
|
|
1388
|
-
var
|
|
1481
|
+
var be = {
|
|
1389
1482
|
color: void 0,
|
|
1390
1483
|
size: void 0,
|
|
1391
1484
|
className: void 0,
|
|
1392
1485
|
style: void 0,
|
|
1393
1486
|
attr: void 0
|
|
1394
|
-
},
|
|
1395
|
-
return
|
|
1396
|
-
for (var e,
|
|
1397
|
-
e = arguments[
|
|
1398
|
-
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (
|
|
1487
|
+
}, ce = G.createContext && G.createContext(be), D = function() {
|
|
1488
|
+
return D = Object.assign || function(t) {
|
|
1489
|
+
for (var e, n = 1, i = arguments.length; n < i; n++) {
|
|
1490
|
+
e = arguments[n];
|
|
1491
|
+
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
|
|
1399
1492
|
}
|
|
1400
|
-
return
|
|
1401
|
-
},
|
|
1402
|
-
},
|
|
1403
|
-
var
|
|
1404
|
-
for (var i in
|
|
1405
|
-
if (
|
|
1406
|
-
e.indexOf(i[o]) < 0 && Object.prototype.propertyIsEnumerable.call(
|
|
1407
|
-
return
|
|
1493
|
+
return t;
|
|
1494
|
+
}, D.apply(this, arguments);
|
|
1495
|
+
}, tn = function(t, e) {
|
|
1496
|
+
var n = {};
|
|
1497
|
+
for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && e.indexOf(i) < 0 && (n[i] = t[i]);
|
|
1498
|
+
if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, i = Object.getOwnPropertySymbols(t); o < i.length; o++)
|
|
1499
|
+
e.indexOf(i[o]) < 0 && Object.prototype.propertyIsEnumerable.call(t, i[o]) && (n[i[o]] = t[i[o]]);
|
|
1500
|
+
return n;
|
|
1408
1501
|
};
|
|
1409
|
-
function
|
|
1410
|
-
return
|
|
1411
|
-
return
|
|
1412
|
-
key:
|
|
1413
|
-
}, e.attr),
|
|
1502
|
+
function he(t) {
|
|
1503
|
+
return t && t.map(function(e, n) {
|
|
1504
|
+
return G.createElement(e.tag, D({
|
|
1505
|
+
key: n
|
|
1506
|
+
}, e.attr), he(e.child));
|
|
1414
1507
|
});
|
|
1415
1508
|
}
|
|
1416
|
-
function
|
|
1509
|
+
function ve(t) {
|
|
1417
1510
|
return function(e) {
|
|
1418
|
-
return
|
|
1419
|
-
attr:
|
|
1420
|
-
}, e),
|
|
1511
|
+
return G.createElement(nn, D({
|
|
1512
|
+
attr: D({}, t.attr)
|
|
1513
|
+
}, e), he(t.child));
|
|
1421
1514
|
};
|
|
1422
1515
|
}
|
|
1423
|
-
function
|
|
1424
|
-
var e = function(
|
|
1425
|
-
var i =
|
|
1426
|
-
return
|
|
1516
|
+
function nn(t) {
|
|
1517
|
+
var e = function(n) {
|
|
1518
|
+
var i = t.attr, o = t.size, r = t.title, s = tn(t, ["attr", "size", "title"]), I = o || n.size || "1em", C;
|
|
1519
|
+
return n.className && (C = n.className), t.className && (C = (C ? C + " " : "") + t.className), G.createElement("svg", D({
|
|
1427
1520
|
stroke: "currentColor",
|
|
1428
1521
|
fill: "currentColor",
|
|
1429
1522
|
strokeWidth: "0"
|
|
1430
|
-
},
|
|
1431
|
-
className:
|
|
1432
|
-
style:
|
|
1433
|
-
color:
|
|
1434
|
-
},
|
|
1435
|
-
height:
|
|
1436
|
-
width:
|
|
1523
|
+
}, n.attr, i, s, {
|
|
1524
|
+
className: C,
|
|
1525
|
+
style: D(D({
|
|
1526
|
+
color: t.color || n.color
|
|
1527
|
+
}, n.style), t.style),
|
|
1528
|
+
height: I,
|
|
1529
|
+
width: I,
|
|
1437
1530
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1438
|
-
}), r &&
|
|
1531
|
+
}), r && G.createElement("title", null, r), t.children);
|
|
1439
1532
|
};
|
|
1440
|
-
return
|
|
1441
|
-
return e(
|
|
1442
|
-
}) : e(
|
|
1533
|
+
return ce !== void 0 ? G.createElement(ce.Consumer, null, function(n) {
|
|
1534
|
+
return e(n);
|
|
1535
|
+
}) : e(be);
|
|
1443
1536
|
}
|
|
1444
|
-
function
|
|
1445
|
-
return
|
|
1537
|
+
function on(t) {
|
|
1538
|
+
return ve({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z" } }] })(t);
|
|
1446
1539
|
}
|
|
1447
|
-
function
|
|
1448
|
-
return
|
|
1540
|
+
function rn(t) {
|
|
1541
|
+
return ve({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M449.07 399.08L278.64 82.58c-12.08-22.44-44.26-22.44-56.35 0L51.87 399.08A32 32 0 0080 446.25h340.89a32 32 0 0028.18-47.17zm-198.6-1.83a20 20 0 1120-20 20 20 0 01-20 20zm21.72-201.15l-5.74 122a16 16 0 01-32 0l-5.74-121.95a21.73 21.73 0 0121.5-22.69h.21a21.74 21.74 0 0121.73 22.7z" } }] })(t);
|
|
1449
1542
|
}
|
|
1450
|
-
const
|
|
1451
|
-
lspProps: { lastError:
|
|
1543
|
+
const Vn = ({
|
|
1544
|
+
lspProps: { lastError: t, reload: e }
|
|
1452
1545
|
}) => {
|
|
1453
|
-
const [
|
|
1546
|
+
const [n, i] = z(!1), o = () => {
|
|
1454
1547
|
e();
|
|
1455
1548
|
}, r = () => {
|
|
1456
1549
|
i(!1);
|
|
1457
1550
|
};
|
|
1458
|
-
return
|
|
1459
|
-
i(!!
|
|
1460
|
-
}, [
|
|
1551
|
+
return J(() => {
|
|
1552
|
+
i(!!t);
|
|
1553
|
+
}, [t]), n ? /* @__PURE__ */ _("div", { className: "flex items-center border-b border-fd-gray-darker bg-grey-800 px-2 py-1.5 text-xs text-grey-50", children: [
|
|
1461
1554
|
/* @__PURE__ */ _("span", { className: "flex flex-1 justify-center gap-1", children: [
|
|
1462
|
-
/* @__PURE__ */ w(
|
|
1555
|
+
/* @__PURE__ */ w(rn, { className: "h-4 w-4 text-yellow-600" }),
|
|
1463
1556
|
/* @__PURE__ */ _("span", { children: [
|
|
1464
1557
|
"LSP not loaded.",
|
|
1465
1558
|
" ",
|
|
@@ -1474,14 +1567,14 @@ const Dn = ({
|
|
|
1474
1567
|
] })
|
|
1475
1568
|
] }),
|
|
1476
1569
|
/* @__PURE__ */ w("button", { className: "focus:outline-none", children: /* @__PURE__ */ w(
|
|
1477
|
-
|
|
1570
|
+
on,
|
|
1478
1571
|
{
|
|
1479
1572
|
className: "h-4 w-4 text-white",
|
|
1480
1573
|
onClick: r
|
|
1481
1574
|
}
|
|
1482
1575
|
) })
|
|
1483
1576
|
] }) : null;
|
|
1484
|
-
},
|
|
1577
|
+
}, sn = {
|
|
1485
1578
|
name: "4d",
|
|
1486
1579
|
displayName: "%displayName%",
|
|
1487
1580
|
description: "%description%",
|
|
@@ -1506,44 +1599,45 @@ const Dn = ({
|
|
|
1506
1599
|
}
|
|
1507
1600
|
]
|
|
1508
1601
|
}
|
|
1509
|
-
}, { registerFileUrl:
|
|
1602
|
+
}, { registerFileUrl: Q, whenReady: Yn } = Ct(sn, void 0, {
|
|
1510
1603
|
system: !0
|
|
1511
1604
|
});
|
|
1512
|
-
|
|
1605
|
+
Q(
|
|
1513
1606
|
"./syntaxes/4d.tmLanguage.json",
|
|
1514
1607
|
new URL("data:application/json;base64,ewogICJuYW1lIjogIjREIiwKICAic2NvcGVOYW1lIjogInNvdXJjZS40ZG0iLAogICJwYXR0ZXJucyI6IFsKICAgIHsKICAgICAgImluY2x1ZGUiOiAiI3N0YXRlbWVudHMiCiAgICB9CiAgXSwKICAicmVwb3NpdG9yeSI6IHsKICAgICJzdGF0ZW1lbnRzIjogewogICAgICAicGF0dGVybnMiOiBbCiAgICAgICAgewogICAgICAgICAgImluY2x1ZGUiOiAiI2NvbW1lbnQiCiAgICAgICAgfQogICAgICBdCiAgICB9LAogICAgImNvbW1lbnQiOiB7CiAgICAgICJwYXR0ZXJucyI6IFsKICAgICAgICB7CiAgICAgICAgICAibmFtZSI6ICJjb21tZW50LmJsb2NrLjRkIiwKICAgICAgICAgICJiZWdpbiI6ICIoL1xcKikoPzpcXHMqKChAKWludGVybmFsKSg/PVxcc3woXFwqLykpKT8iLAogICAgICAgICAgImJlZ2luQ2FwdHVyZXMiOiB7CiAgICAgICAgICAgICIxIjogewogICAgICAgICAgICAgICJuYW1lIjogInB1bmN0dWF0aW9uLmRlZmluaXRpb24uY29tbWVudC40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjIiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAic3RvcmFnZS50eXBlLmludGVybmFsZGVjbGFyYXRpb24uNGQiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgICIzIjogewogICAgICAgICAgICAgICJuYW1lIjogInB1bmN0dWF0aW9uLmRlY29yYXRvci5pbnRlcm5hbGRlY2xhcmF0aW9uLjRkIgogICAgICAgICAgICB9CiAgICAgICAgICB9LAogICAgICAgICAgImVuZCI6ICJcXCovIiwKICAgICAgICAgICJlbmRDYXB0dXJlcyI6IHsKICAgICAgICAgICAgIjAiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVmaW5pdGlvbi5jb21tZW50LjRkIgogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiYmVnaW4iOiAiKF5bIFxcdF0rKT8oKC8vKSg/OlxccyooKEApaW50ZXJuYWwpKD89XFxzfCQpKT8pIiwKICAgICAgICAgICJiZWdpbkNhcHR1cmVzIjogewogICAgICAgICAgICAiMSI6IHsKICAgICAgICAgICAgICAibmFtZSI6ICJwdW5jdHVhdGlvbi53aGl0ZXNwYWNlLmNvbW1lbnQubGVhZGluZy40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjIiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAiY29tbWVudC5saW5lLmRvdWJsZS1zbGFzaC40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjMiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVmaW5pdGlvbi5jb21tZW50LjRkIgogICAgICAgICAgICB9LAogICAgICAgICAgICAiNCI6IHsKICAgICAgICAgICAgICAibmFtZSI6ICJzdG9yYWdlLnR5cGUuaW50ZXJuYWxkZWNsYXJhdGlvbi40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjUiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVjb3JhdG9yLmludGVybmFsZGVjbGFyYXRpb24uNGQiCiAgICAgICAgICAgIH0KICAgICAgICAgIH0sCiAgICAgICAgICAiZW5kIjogIig/PSQpIiwKICAgICAgICAgICJjb250ZW50TmFtZSI6ICJjb21tZW50LmxpbmUuZG91YmxlLXNsYXNoLjRkIgogICAgICAgIH0KICAgICAgXQogICAgfQogIH0KfQo=", import.meta.url).toString(),
|
|
1515
1608
|
{ mimeType: "application/json", size: 1592 }
|
|
1516
1609
|
);
|
|
1517
|
-
|
|
1610
|
+
Q(
|
|
1518
1611
|
"./language-configuration.json",
|
|
1519
1612
|
new URL("data:application/json;base64,ewogICJjb21tZW50cyI6IHsKICAgICJsaW5lQ29tbWVudCI6ICIvLyIsCiAgICAiYmxvY2tDb21tZW50IjogWyIvKioiLCAiKiovIl0KICB9LAogIC8vIHN5bWJvbHMgdXNlZCBhcyBicmFja2V0cwogICJicmFja2V0cyI6IFsKICAgIFsieyIsICJ9Il0sCiAgICBbIigiLCAiKSJdLAogICAgWyJbIiwgIl0iXQogIF0sCiAgLy8gc3ltYm9scyB0aGF0IGFyZSBhdXRvIGNsb3NlZCB3aGVuIHR5cGluZwogIC8vIHN5bWJvbHMgdGhhdCB0aGF0IGNhbiBiZSB1c2VkIHRvIHN1cnJvdW5kIGEgc2VsZWN0aW9uCiAgInN1cnJvdW5kaW5nUGFpcnMiOiBbCiAgICBbInsiLCAifSJdLAogICAgWyJbIiwgIl0iXSwKICAgIFsiKCIsICIpIl0sCiAgICBbIlwiIiwgIlwiIl0sCiAgICBbIiciLCAiJyJdCiAgXSwKICAiYXV0b0Nsb3NpbmdQYWlycyI6IFsKICAgIHsKICAgICAgIm9wZW4iOiAiKCIsCiAgICAgICJjbG9zZSI6ICIpIgogICAgfSwKICAgIHsgIm9wZW4iOiAieyIsICJjbG9zZSI6ICJ9IiB9LAogICAgeyAib3BlbiI6ICJbIiwgImNsb3NlIjogIl0iIH0sCiAgICB7ICJvcGVuIjogIiciLCAiY2xvc2UiOiAiJyIsICJub3RJbiI6IFsic3RyaW5nIiwgImNvbW1lbnQiXSB9LAogICAgeyAib3BlbiI6ICJcIiIsICJjbG9zZSI6ICJcIiIsICJub3RJbiI6IFsic3RyaW5nIl0gfSwKICAgIHsgIm9wZW4iOiAiYCIsICJjbG9zZSI6ICJgIiwgIm5vdEluIjogWyJzdHJpbmciLCAiY29tbWVudCJdIH0sCiAgICB7ICJvcGVuIjogIi8qKiIsICJjbG9zZSI6ICIgKiovIiwgIm5vdEluIjogWyJzdHJpbmciXSB9CiAgXSwKICAiYXV0b0Nsb3NlQmVmb3JlIjogIjs6Liw9fV0pPmAgXG5cdCIsCiAgIndvcmRQYXR0ZXJuIjogIigtP1xcZCpcXC5cXGRcXHcqKXwoW15cXGBcXH5cXCFcXEBcXCNcXCVcXF5cXCZcXCpcXChcXClcXC1cXD1cXCtcXFtcXHtcXF1cXH1cXFxcXFx8XFw7XFw6XFwnXFxcIlxcLFxcLlxcPFxcPlxcL1xcP1xcclxcblxcdFxcZlxcdiBdKyl8KD88PVthLXpBLVpdKSA/KD89W2EtekEtWl0pIiwKICAiaW5kZW50YXRpb25SdWxlcyI6IHsKICAgICJpbmNyZWFzZUluZGVudFBhdHRlcm4iOiB7CiAgICAgICJwYXR0ZXJuIjogIiheKD8hW15cXHNdKSpcXHMqKGNsYXNzIGNvbnN0cnVjdG9yKSl8KF4oPyFbXlxcc10pKlxccyooZXhwb3NlZHxsb2NhbHxcXHMqKXsxfVxccypmdW5jdGlvbnsxfVxccypcXHcpfCheKD8hW15cXHNdKSpcXHMqKElmfEVsc2V8Rm9yfEZvciBlYWNofFdoaWxlfEJlZ2luIFNRTHxDYXNlIG9mfFVzZXxSZXBlYXR8OiAqXFwoLiopKS4qJCIsCiAgICAgICJmbGFncyI6ICJpIgogICAgfSwKICAgICJkZWNyZWFzZUluZGVudFBhdHRlcm4iOiB7CiAgICAgICJwYXR0ZXJuIjogIiheKD8hW15cXHNdKSpcXHMqKGV4cG9zZWR8bG9jYWx8XFxzKil7MX1cXHMqZnVuY3Rpb257MX1cXHMqXFx3KXwoRW5kIElmfEVuZCBGb3J8RWxzZXxFbmQgZm9yIGVhY2h8RW5kIFdoaWxlfEVuZCBTUUx8RW5kIGNhc2V8RW5kIHVzZXxVbnRpbHw6ICpcXCguKikuKiQiLAogICAgICAiZmxhZ3MiOiAiaSIKICAgIH0KICB9LAogICJvbkVudGVyUnVsZXMiOiBbCiAgICB7CiAgICAgICJiZWZvcmVUZXh0IjogewogICAgICAgICJwYXR0ZXJuIjogIl5leHBvc2VkIiwKICAgICAgICAiZmxhZ3MiOiAiaSIKICAgICAgfSwKICAgICAgImFjdGlvbiI6IHsgImluZGVudCI6ICJpbmRlbnQiLCAiaW5kZW50QWN0aW9uIjogMSB9CiAgICB9CiAgXQp9Cg==", import.meta.url).toString(),
|
|
1520
1613
|
{ mimeType: "application/json", size: 1723 }
|
|
1521
1614
|
);
|
|
1522
|
-
|
|
1615
|
+
Q(
|
|
1523
1616
|
"package.json",
|
|
1524
1617
|
new URL("data:application/json;base64,ewogICJuYW1lIjogIjRkIiwKICAiZGlzcGxheU5hbWUiOiAiJWRpc3BsYXlOYW1lJSIsCiAgImRlc2NyaXB0aW9uIjogIiVkZXNjcmlwdGlvbiUiLAogICJ2ZXJzaW9uIjogIjEuMC4wIiwKICAicHVibGlzaGVyIjogInZzY29kZSIsCiAgImxpY2Vuc2UiOiAiTUlUIiwKICAiZW5naW5lcyI6IHsKICAgICJ2c2NvZGUiOiAiMC4xMC54IgogIH0sCiAgInNjcmlwdHMiOiB7CiAgICAidXBkYXRlLWdyYW1tYXIiOiAibm9kZSAuLi9ub2RlX21vZHVsZXMvdnNjb2RlLWdyYW1tYXItdXBkYXRlci9iaW4gbWljcm9zb2Z0L3ZzY29kZS00ZCBncmFtbWFycy80ZC5jc29uIC4vc3ludGF4ZXMvNGQudG1MYW5ndWFnZS5qc29uIgogIH0sCiAgImNhdGVnb3JpZXMiOiBbCiAgICAiUHJvZ3JhbW1pbmcgTGFuZ3VhZ2VzIgogIF0sCiAgImNvbnRyaWJ1dGVzIjogewogICAgImxhbmd1YWdlcyI6IFsKICAgICAgewogICAgICAgICJpZCI6ICI0ZCIsCiAgICAgICAgImFsaWFzZXMiOiBbCiAgICAgICAgICAiNEQiLAogICAgICAgICAgIjRkIgogICAgICAgIF0sCiAgICAgICAgImV4dGVuc2lvbnMiOiBbCiAgICAgICAgICAiLjRkbSIsCiAgICAgICAgICAiLjRxcyIKICAgICAgICBdLAogICAgICAgICJjb25maWd1cmF0aW9uIjogIi4vbGFuZ3VhZ2UtY29uZmlndXJhdGlvbi5qc29uIgogICAgICB9CiAgICBdLAogICAgImdyYW1tYXJzIjogWwogICAgICB7CiAgICAgICAgImxhbmd1YWdlIjogIjRkIiwKICAgICAgICAic2NvcGVOYW1lIjogInNvdXJjZS40ZG0iLAogICAgICAgICJwYXRoIjogIi4vc3ludGF4ZXMvNGQudG1MYW5ndWFnZS5qc29uIgogICAgICB9CiAgICBdCiAgfSwKICAicmVwb3NpdG9yeSI6IHsKICAgICJ0eXBlIjogImdpdCIsCiAgICAidXJsIjogImh0dHBzOi8vZ2l0aHViLmNvbS9taWNyb3NvZnQvdnNjb2RlLmdpdCIKICB9Cn0K", import.meta.url).toString(),
|
|
1525
1618
|
{ mimeType: "application/json", size: 1006 }
|
|
1526
1619
|
);
|
|
1527
|
-
|
|
1620
|
+
Q(
|
|
1528
1621
|
"package.nls.json",
|
|
1529
1622
|
new URL("data:application/json;base64,ewogICJkaXNwbGF5TmFtZSI6ICI0RCBMYW5ndWFnZSBCYXNpY3MiLAogICJkZXNjcmlwdGlvbiI6ICJQcm92aWRlcyBzeW50YXggaGlnaGxpZ2h0aW5nIGFuZCBicmFja2V0IG1hdGNoaW5nIGZvciA0RE0gYW5kIDRRUyBmaWxlcy4iCn0K", import.meta.url).toString(),
|
|
1530
1623
|
{ mimeType: "application/json", size: 135 }
|
|
1531
1624
|
);
|
|
1532
1625
|
export {
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1626
|
+
Vn as Alerts,
|
|
1627
|
+
Pn as CodeEditor,
|
|
1628
|
+
Jn as CodeEditorProvider,
|
|
1629
|
+
en as FdLineNumbers,
|
|
1630
|
+
Gn as LSPProvider,
|
|
1631
|
+
ie as SUPPORTED_THEMES,
|
|
1632
|
+
Ce as _await,
|
|
1633
|
+
vt as configureServices,
|
|
1634
|
+
E as getFileSystemPath,
|
|
1635
|
+
On as getFunctionOffset,
|
|
1636
|
+
ht as initMonacoUserConfiguration,
|
|
1637
|
+
xt as isCssModel,
|
|
1638
|
+
Rt as jumpToLine,
|
|
1639
|
+
Nt as jumpToSelection,
|
|
1640
|
+
Xt as useCodeEditor,
|
|
1641
|
+
Mn as useLSP
|
|
1548
1642
|
};
|
|
1549
1643
|
//# sourceMappingURL=index.es.js.map
|