@ws-ui/code-editor 0.2.18 → 0.2.20
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/schemas/http-handlers.schema.json.d.ts +23 -0
- package/dist/index.cjs.js +19 -19
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +427 -404
- package/dist/index.es.js.map +1 -1
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
var ve = Object.defineProperty;
|
|
2
2
|
var Se = (n, e, t) => e in n ? ve(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
-
var
|
|
3
|
+
var F = (n, e, t) => (Se(n, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
4
|
import { jsxs as D, jsx as x, Fragment as ye } from "react/jsx-runtime";
|
|
5
5
|
import E, { useEffect as J, createContext as oe, useState as z, useRef as te, useContext as re, memo as Ne } from "react";
|
|
6
|
-
import { loader as
|
|
7
|
-
import { lspSubject as ke, LspActions as X, hasAttributesString as se, FileFolderType as We } from "@ws-ui/shared";
|
|
8
|
-
import { MonacoLanguageClient as
|
|
9
|
-
import { mergeServices as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
6
|
+
import { loader as xe, useMonaco as Re, Editor as we } from "@monaco-editor/react";
|
|
7
|
+
import { lspSubject as ke, LspActions as X, hasAttributesString as se, HTTP_HANDLERS_PATH as Le, FileFolderType as We } from "@ws-ui/shared";
|
|
8
|
+
import { MonacoLanguageClient as Fe } from "monaco-languageclient";
|
|
9
|
+
import { mergeServices as Ze, initServices as je } from "monaco-languageclient/vscode/services";
|
|
10
|
+
import Xe, { initUserConfiguration as Ke } from "@codingame/monaco-vscode-configuration-service-override";
|
|
11
|
+
import Be from "@codingame/monaco-vscode-languages-service-override";
|
|
12
|
+
import Ee from "@codingame/monaco-vscode-textmate-service-override";
|
|
13
13
|
import "@codingame/monaco-vscode-theme-defaults-default-extension";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import * as
|
|
17
|
-
import { Selection as
|
|
18
|
-
import { Logger as
|
|
19
|
-
import { ErrorAction as
|
|
20
|
-
import { WebSocketMessageReader as
|
|
21
|
-
import { DocumentDiagnosticRequest as $e, WillSaveTextDocumentNotification as
|
|
22
|
-
import { StandaloneServices as
|
|
14
|
+
import Te from "@codingame/monaco-vscode-editor-service-override";
|
|
15
|
+
import Oe from "@codingame/monaco-vscode-theme-service-override";
|
|
16
|
+
import * as l from "monaco-editor";
|
|
17
|
+
import { Selection as Ge, KeyMod as O, KeyCode as G, editor as le, Range as De, Uri as Je, CancellationTokenSource as Me } from "monaco-editor";
|
|
18
|
+
import { Logger as Ve } from "monaco-languageclient/tools";
|
|
19
|
+
import { ErrorAction as Pe, CloseAction as Ye } from "vscode-languageclient";
|
|
20
|
+
import { WebSocketMessageReader as He, WebSocketMessageWriter as ze, toSocket as _e } from "vscode-ws-jsonrpc";
|
|
21
|
+
import { DocumentDiagnosticRequest as $e, WillSaveTextDocumentNotification as Ue, TextDocumentSaveReason as qe, DidSaveTextDocumentNotification as Qe, WillCreateFilesRequest as et, WillRenameFilesRequest as tt, WillDeleteFilesRequest as nt, DidCreateFilesNotification as it, DidRenameFilesNotification as ot, DidDeleteFilesNotification as rt, SemanticTokensRegistrationType as st } from "vscode-languageserver-protocol";
|
|
22
|
+
import { StandaloneServices as lt, ICodeEditorService as at } from "vscode/services";
|
|
23
23
|
import { KeybindingsRegistry as q } from "vscode/monaco";
|
|
24
24
|
import "@codingame/monaco-vscode-standalone-languages";
|
|
25
25
|
import "@codingame/monaco-vscode-standalone-html-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 gt } from "vscode/extensions";
|
|
34
|
+
const ct = () => Xe(), ut = () => Te(
|
|
35
35
|
() => Promise.resolve(void 0)
|
|
36
|
-
),
|
|
37
|
-
const n =
|
|
36
|
+
), dt = () => {
|
|
37
|
+
const n = Oe(), e = n.themeService.ctor.prototype;
|
|
38
38
|
return e.defineTheme = () => {
|
|
39
39
|
}, n;
|
|
40
|
-
},
|
|
40
|
+
}, It = `{
|
|
41
41
|
"workbench.colorTheme": "Default Dark+",
|
|
42
42
|
"workbench.iconTheme": "vs-seti",
|
|
43
43
|
"editor.autoClosingBrackets": "languageDefined",
|
|
@@ -122,31 +122,31 @@ const gt = () => je(), ct = () => Ee(
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
`,
|
|
125
|
+
`, Ct = () => Ke(It), mt = async (n) => {
|
|
126
126
|
var o;
|
|
127
127
|
const e = n.serviceConfig ?? {};
|
|
128
|
-
e.debugLogging = ((o = n.logger) == null ? void 0 : o.isEnabled()) === !0 && (e.debugLogging === !0 || n.logger.isDebugEnabled() === !0), await
|
|
128
|
+
e.debugLogging = ((o = n.logger) == null ? void 0 : o.isEnabled()) === !0 && (e.debugLogging === !0 || n.logger.isDebugEnabled() === !0), await Ct(), e.userServices = e.userServices ?? {};
|
|
129
129
|
const t = e.userServices.configurationService ?? void 0, i = e.workspaceConfig ?? void 0;
|
|
130
130
|
if (t === void 0) {
|
|
131
131
|
if (i)
|
|
132
132
|
throw new Error(
|
|
133
133
|
"You provided a workspaceConfig without using the configurationServiceOverride"
|
|
134
134
|
);
|
|
135
|
-
const
|
|
135
|
+
const a = {
|
|
136
136
|
// @see https://github.com/CodinGame/monaco-vscode-api#monaco-standalone-services
|
|
137
|
-
...
|
|
138
|
-
...
|
|
137
|
+
...ct(),
|
|
138
|
+
...dt(),
|
|
139
|
+
...Ee(),
|
|
139
140
|
...Be(),
|
|
140
|
-
...
|
|
141
|
-
...ct()
|
|
141
|
+
...ut()
|
|
142
142
|
};
|
|
143
|
-
|
|
143
|
+
Ze(a, e.userServices);
|
|
144
144
|
}
|
|
145
145
|
return i || (e.workspaceConfig = {
|
|
146
146
|
workspaceProvider: {
|
|
147
147
|
trusted: !0,
|
|
148
148
|
workspace: {
|
|
149
|
-
workspaceUri:
|
|
149
|
+
workspaceUri: l.Uri.file("/workspace")
|
|
150
150
|
},
|
|
151
151
|
async open() {
|
|
152
152
|
return !1;
|
|
@@ -154,10 +154,10 @@ const gt = () => je(), ct = () => Ee(
|
|
|
154
154
|
}
|
|
155
155
|
}), e;
|
|
156
156
|
};
|
|
157
|
-
class
|
|
157
|
+
class ft extends He {
|
|
158
158
|
constructor(t, i) {
|
|
159
159
|
super(t);
|
|
160
|
-
|
|
160
|
+
F(this, "onMessage");
|
|
161
161
|
this.onMessage = i;
|
|
162
162
|
}
|
|
163
163
|
readMessage(t) {
|
|
@@ -173,10 +173,10 @@ class mt extends Ye {
|
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
-
class
|
|
176
|
+
class At extends ze {
|
|
177
177
|
constructor(t, i) {
|
|
178
178
|
super(t);
|
|
179
|
-
|
|
179
|
+
F(this, "onSend");
|
|
180
180
|
this.onSend = i;
|
|
181
181
|
}
|
|
182
182
|
async write(t) {
|
|
@@ -195,8 +195,8 @@ function j(n, e = !0) {
|
|
|
195
195
|
function ae(n, e = 0) {
|
|
196
196
|
setTimeout(n, e);
|
|
197
197
|
}
|
|
198
|
-
function
|
|
199
|
-
const t = new
|
|
198
|
+
function pt(n, e) {
|
|
199
|
+
const t = new Ge(
|
|
200
200
|
e.startLineNumber,
|
|
201
201
|
e.startColumn,
|
|
202
202
|
e.endLineNumber || e.startLineNumber,
|
|
@@ -206,16 +206,16 @@ function At(n, e) {
|
|
|
206
206
|
n.setSelection(t), n.revealRangeInCenter(t), n.focus();
|
|
207
207
|
});
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function bt(n, e, t = 0) {
|
|
210
210
|
t > 0 && (e = t + e), ae(() => {
|
|
211
211
|
n.setPosition({ lineNumber: e, column: 1 }), n.revealLineInCenter(e), n.focus();
|
|
212
212
|
});
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function Rn(n, e, t) {
|
|
215
215
|
const o = n.getModel();
|
|
216
216
|
if (o && e) {
|
|
217
|
-
const
|
|
218
|
-
for (let r = 1; r <=
|
|
217
|
+
const a = o.getLineCount();
|
|
218
|
+
for (let r = 1; r <= a; r++) {
|
|
219
219
|
const I = o.getLineContent(r);
|
|
220
220
|
if (new RegExp(`(?:Function|function) ${t}`).test(I))
|
|
221
221
|
return r;
|
|
@@ -223,15 +223,15 @@ function Sn(n, e, t) {
|
|
|
223
223
|
}
|
|
224
224
|
return 0;
|
|
225
225
|
}
|
|
226
|
-
const
|
|
226
|
+
const ht = {
|
|
227
227
|
provideCompletionItems: async (n, e) => {
|
|
228
228
|
const t = n.getWordUntilPosition(e);
|
|
229
229
|
return {
|
|
230
230
|
suggestions: [
|
|
231
231
|
{
|
|
232
232
|
label: "var",
|
|
233
|
-
kind:
|
|
234
|
-
range: new
|
|
233
|
+
kind: l.languages.CompletionItemKind.Snippet,
|
|
234
|
+
range: new l.Range(
|
|
235
235
|
e.lineNumber,
|
|
236
236
|
t.startColumn,
|
|
237
237
|
e.lineNumber,
|
|
@@ -239,12 +239,12 @@ const bt = {
|
|
|
239
239
|
),
|
|
240
240
|
insertText: ["var ${1:var_name} : ${2:var_type}"].join(`
|
|
241
241
|
`),
|
|
242
|
-
insertTextRules:
|
|
242
|
+
insertTextRules: l.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
243
243
|
},
|
|
244
244
|
{
|
|
245
245
|
label: "While",
|
|
246
|
-
kind:
|
|
247
|
-
range: new
|
|
246
|
+
kind: l.languages.CompletionItemKind.Snippet,
|
|
247
|
+
range: new l.Range(
|
|
248
248
|
e.lineNumber,
|
|
249
249
|
t.startColumn,
|
|
250
250
|
e.lineNumber,
|
|
@@ -256,12 +256,12 @@ const bt = {
|
|
|
256
256
|
"End while"
|
|
257
257
|
].join(`
|
|
258
258
|
`),
|
|
259
|
-
insertTextRules:
|
|
259
|
+
insertTextRules: l.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
260
260
|
},
|
|
261
261
|
{
|
|
262
262
|
label: "Case of",
|
|
263
|
-
kind:
|
|
264
|
-
range: new
|
|
263
|
+
kind: l.languages.CompletionItemKind.Snippet,
|
|
264
|
+
range: new l.Range(
|
|
265
265
|
e.lineNumber,
|
|
266
266
|
t.startColumn,
|
|
267
267
|
e.lineNumber,
|
|
@@ -274,12 +274,12 @@ const bt = {
|
|
|
274
274
|
"End case"
|
|
275
275
|
].join(`
|
|
276
276
|
`),
|
|
277
|
-
insertTextRules:
|
|
277
|
+
insertTextRules: l.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
278
278
|
},
|
|
279
279
|
{
|
|
280
280
|
label: "Else",
|
|
281
|
-
kind:
|
|
282
|
-
range: new
|
|
281
|
+
kind: l.languages.CompletionItemKind.Snippet,
|
|
282
|
+
range: new l.Range(
|
|
283
283
|
e.lineNumber,
|
|
284
284
|
t.startColumn,
|
|
285
285
|
e.lineNumber,
|
|
@@ -287,12 +287,12 @@ const bt = {
|
|
|
287
287
|
),
|
|
288
288
|
insertText: ["Else", " "].join(`
|
|
289
289
|
`),
|
|
290
|
-
insertTextRules:
|
|
290
|
+
insertTextRules: l.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
291
291
|
},
|
|
292
292
|
{
|
|
293
293
|
label: "If",
|
|
294
|
-
kind:
|
|
295
|
-
range: new
|
|
294
|
+
kind: l.languages.CompletionItemKind.Snippet,
|
|
295
|
+
range: new l.Range(
|
|
296
296
|
e.lineNumber,
|
|
297
297
|
t.startColumn,
|
|
298
298
|
e.lineNumber,
|
|
@@ -302,12 +302,12 @@ const bt = {
|
|
|
302
302
|
`
|
|
303
303
|
`
|
|
304
304
|
),
|
|
305
|
-
insertTextRules:
|
|
305
|
+
insertTextRules: l.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
306
306
|
},
|
|
307
307
|
{
|
|
308
308
|
label: "For",
|
|
309
|
-
kind:
|
|
310
|
-
range: new
|
|
309
|
+
kind: l.languages.CompletionItemKind.Snippet,
|
|
310
|
+
range: new l.Range(
|
|
311
311
|
e.lineNumber,
|
|
312
312
|
t.startColumn,
|
|
313
313
|
e.lineNumber,
|
|
@@ -319,12 +319,12 @@ const bt = {
|
|
|
319
319
|
"End for"
|
|
320
320
|
].join(`
|
|
321
321
|
`),
|
|
322
|
-
insertTextRules:
|
|
322
|
+
insertTextRules: l.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
323
323
|
},
|
|
324
324
|
{
|
|
325
325
|
label: "Function",
|
|
326
|
-
kind:
|
|
327
|
-
range: new
|
|
326
|
+
kind: l.languages.CompletionItemKind.Snippet,
|
|
327
|
+
range: new l.Range(
|
|
328
328
|
e.lineNumber,
|
|
329
329
|
t.startColumn,
|
|
330
330
|
e.lineNumber,
|
|
@@ -335,20 +335,20 @@ const bt = {
|
|
|
335
335
|
" ${5:body}"
|
|
336
336
|
].join(`
|
|
337
337
|
`),
|
|
338
|
-
insertTextRules:
|
|
338
|
+
insertTextRules: l.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
339
339
|
}
|
|
340
340
|
]
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
|
-
},
|
|
343
|
+
}, vt = {
|
|
344
344
|
provideCompletionItems: async (n, e) => {
|
|
345
345
|
const t = n.getWordUntilPosition(e);
|
|
346
346
|
return {
|
|
347
347
|
suggestions: [
|
|
348
348
|
{
|
|
349
349
|
label: "var",
|
|
350
|
-
kind:
|
|
351
|
-
range: new
|
|
350
|
+
kind: l.languages.CompletionItemKind.Snippet,
|
|
351
|
+
range: new l.Range(
|
|
352
352
|
e.lineNumber,
|
|
353
353
|
t.startColumn,
|
|
354
354
|
e.lineNumber,
|
|
@@ -356,12 +356,12 @@ const bt = {
|
|
|
356
356
|
),
|
|
357
357
|
insertText: ["var ${1:var_name} : ${2:var_type}"].join(`
|
|
358
358
|
`),
|
|
359
|
-
insertTextRules:
|
|
359
|
+
insertTextRules: l.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
360
360
|
},
|
|
361
361
|
{
|
|
362
362
|
label: "while",
|
|
363
|
-
kind:
|
|
364
|
-
range: new
|
|
363
|
+
kind: l.languages.CompletionItemKind.Snippet,
|
|
364
|
+
range: new l.Range(
|
|
365
365
|
e.lineNumber,
|
|
366
366
|
t.startColumn,
|
|
367
367
|
e.lineNumber,
|
|
@@ -371,12 +371,12 @@ const bt = {
|
|
|
371
371
|
`
|
|
372
372
|
`
|
|
373
373
|
),
|
|
374
|
-
insertTextRules:
|
|
374
|
+
insertTextRules: l.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
375
375
|
},
|
|
376
376
|
{
|
|
377
377
|
label: "switch",
|
|
378
|
-
kind:
|
|
379
|
-
range: new
|
|
378
|
+
kind: l.languages.CompletionItemKind.Snippet,
|
|
379
|
+
range: new l.Range(
|
|
380
380
|
e.lineNumber,
|
|
381
381
|
t.startColumn,
|
|
382
382
|
e.lineNumber,
|
|
@@ -389,12 +389,12 @@ const bt = {
|
|
|
389
389
|
"end"
|
|
390
390
|
].join(`
|
|
391
391
|
`),
|
|
392
|
-
insertTextRules:
|
|
392
|
+
insertTextRules: l.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
393
393
|
},
|
|
394
394
|
{
|
|
395
395
|
label: "else",
|
|
396
|
-
kind:
|
|
397
|
-
range: new
|
|
396
|
+
kind: l.languages.CompletionItemKind.Snippet,
|
|
397
|
+
range: new l.Range(
|
|
398
398
|
e.lineNumber,
|
|
399
399
|
t.startColumn,
|
|
400
400
|
e.lineNumber,
|
|
@@ -402,12 +402,12 @@ const bt = {
|
|
|
402
402
|
),
|
|
403
403
|
insertText: ["else", " "].join(`
|
|
404
404
|
`),
|
|
405
|
-
insertTextRules:
|
|
405
|
+
insertTextRules: l.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
406
406
|
},
|
|
407
407
|
{
|
|
408
408
|
label: "if",
|
|
409
|
-
kind:
|
|
410
|
-
range: new
|
|
409
|
+
kind: l.languages.CompletionItemKind.Snippet,
|
|
410
|
+
range: new l.Range(
|
|
411
411
|
e.lineNumber,
|
|
412
412
|
t.startColumn,
|
|
413
413
|
e.lineNumber,
|
|
@@ -417,12 +417,12 @@ const bt = {
|
|
|
417
417
|
`
|
|
418
418
|
`
|
|
419
419
|
),
|
|
420
|
-
insertTextRules:
|
|
420
|
+
insertTextRules: l.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
421
421
|
},
|
|
422
422
|
{
|
|
423
423
|
label: "for",
|
|
424
|
-
kind:
|
|
425
|
-
range: new
|
|
424
|
+
kind: l.languages.CompletionItemKind.Snippet,
|
|
425
|
+
range: new l.Range(
|
|
426
426
|
e.lineNumber,
|
|
427
427
|
t.startColumn,
|
|
428
428
|
e.lineNumber,
|
|
@@ -434,12 +434,12 @@ const bt = {
|
|
|
434
434
|
"end"
|
|
435
435
|
].join(`
|
|
436
436
|
`),
|
|
437
|
-
insertTextRules:
|
|
437
|
+
insertTextRules: l.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
438
438
|
},
|
|
439
439
|
{
|
|
440
440
|
label: "function",
|
|
441
|
-
kind:
|
|
442
|
-
range: new
|
|
441
|
+
kind: l.languages.CompletionItemKind.Snippet,
|
|
442
|
+
range: new l.Range(
|
|
443
443
|
e.lineNumber,
|
|
444
444
|
t.startColumn,
|
|
445
445
|
e.lineNumber,
|
|
@@ -450,12 +450,12 @@ const bt = {
|
|
|
450
450
|
" ${5:body}"
|
|
451
451
|
].join(`
|
|
452
452
|
`),
|
|
453
|
-
insertTextRules:
|
|
453
|
+
insertTextRules: l.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
454
454
|
}
|
|
455
455
|
]
|
|
456
456
|
};
|
|
457
457
|
}
|
|
458
|
-
},
|
|
458
|
+
}, St = [
|
|
459
459
|
// zoom in
|
|
460
460
|
{
|
|
461
461
|
keybinding: O.CtrlCmd | G.NumpadAdd,
|
|
@@ -483,11 +483,11 @@ const bt = {
|
|
|
483
483
|
keybinding: O.CtrlCmd | G.Digit0,
|
|
484
484
|
command: "editor.action.fontZoomReset"
|
|
485
485
|
}
|
|
486
|
-
],
|
|
486
|
+
], yt = ({ defaultZoom: n }) => (J(() => {
|
|
487
487
|
n !== void 0 && le.EditorZoom.setZoomLevel(n);
|
|
488
488
|
}, []), null);
|
|
489
|
-
({}).VITE_DISABLE_MONACO_LOADER ||
|
|
490
|
-
monaco:
|
|
489
|
+
({}).VITE_DISABLE_MONACO_LOADER || xe.config({
|
|
490
|
+
monaco: l
|
|
491
491
|
// paths: {
|
|
492
492
|
// vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.41.0/min/vs",
|
|
493
493
|
// },
|
|
@@ -519,10 +519,10 @@ class P {
|
|
|
519
519
|
}
|
|
520
520
|
static getInlineStyleFromMetadata(e, t) {
|
|
521
521
|
const i = this.getForeground(e), o = this.getFontStyle(e);
|
|
522
|
-
let
|
|
523
|
-
o & 1 && (
|
|
522
|
+
let a = `color: ${t[i]};`;
|
|
523
|
+
o & 1 && (a += "font-style: italic;"), o & 2 && (a += "font-weight: bold;");
|
|
524
524
|
let r = "";
|
|
525
|
-
return o & 4 && (r += " underline"), o & 8 && (r += " line-through"), r && (
|
|
525
|
+
return o & 4 && (r += " underline"), o & 8 && (r += " line-through"), r && (a += `text-decoration:${r};`), a;
|
|
526
526
|
}
|
|
527
527
|
static getPresentationFromMetadata(e) {
|
|
528
528
|
const t = this.getForeground(e), i = this.getFontStyle(e);
|
|
@@ -535,47 +535,47 @@ class P {
|
|
|
535
535
|
};
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
|
-
function
|
|
539
|
-
const o = t.tokens.data,
|
|
538
|
+
function Nt(n, e, t, i) {
|
|
539
|
+
const o = t.tokens.data, a = n.getLanguageId();
|
|
540
540
|
let r = 0, I = 0;
|
|
541
|
-
const
|
|
542
|
-
for (let
|
|
543
|
-
const
|
|
544
|
-
if (
|
|
545
|
-
const
|
|
546
|
-
let
|
|
547
|
-
for (let M = 0;
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
const
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
),
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
541
|
+
const m = i.lineNumber - 1, h = i.column - 1;
|
|
542
|
+
for (let v = 0; v < o.length; v += 5) {
|
|
543
|
+
const A = o[v], f = o[v + 1], R = o[v + 2], y = o[v + 3], b = o[v + 4], S = r + A, g = A === 0 ? I + f : f;
|
|
544
|
+
if (m === S && g <= h && h < g + R) {
|
|
545
|
+
const N = t.legend.tokenTypes[y] || "not in legend (ignored)", k = [];
|
|
546
|
+
let s = b;
|
|
547
|
+
for (let M = 0; s > 0 && M < t.legend.tokenModifiers.length; M++)
|
|
548
|
+
s & 1 && k.push(t.legend.tokenModifiers[M]), s = s >> 1;
|
|
549
|
+
s > 0 && k.push("not in legend (ignored)");
|
|
550
|
+
const C = new De(
|
|
551
|
+
S + 1,
|
|
552
|
+
g + 1,
|
|
553
|
+
S + 1,
|
|
554
|
+
g + 1 + R
|
|
555
|
+
), w = {}, L = e.getColorTheme().tokenColorMap, p = e.getColorTheme().getTokenStyleMetadata(
|
|
556
|
+
N,
|
|
557
|
+
k,
|
|
558
|
+
a,
|
|
559
559
|
!0,
|
|
560
|
-
|
|
560
|
+
w
|
|
561
561
|
);
|
|
562
|
-
let
|
|
563
|
-
return
|
|
562
|
+
let _;
|
|
563
|
+
return p && (_ = {
|
|
564
564
|
languageId: void 0,
|
|
565
565
|
tokenType: ce.Other,
|
|
566
|
-
bold:
|
|
567
|
-
italic:
|
|
568
|
-
underline:
|
|
569
|
-
strikethrough:
|
|
570
|
-
foreground:
|
|
566
|
+
bold: p == null ? void 0 : p.bold,
|
|
567
|
+
italic: p == null ? void 0 : p.italic,
|
|
568
|
+
underline: p == null ? void 0 : p.underline,
|
|
569
|
+
strikethrough: p == null ? void 0 : p.strikethrough,
|
|
570
|
+
foreground: L[(p == null ? void 0 : p.foreground) || ge.None],
|
|
571
571
|
background: void 0
|
|
572
|
-
}), { type:
|
|
572
|
+
}), { type: N, modifiers: k, range: C, metadata: _, definitions: w };
|
|
573
573
|
}
|
|
574
|
-
r =
|
|
574
|
+
r = S, I = g;
|
|
575
575
|
}
|
|
576
576
|
return null;
|
|
577
577
|
}
|
|
578
|
-
function
|
|
578
|
+
function xt(n, e, t) {
|
|
579
579
|
let i = null;
|
|
580
580
|
for (let o = 1; o < t; o++)
|
|
581
581
|
i = e.tokenizeLine(
|
|
@@ -584,79 +584,79 @@ function Nt(n, e, t) {
|
|
|
584
584
|
).ruleStack;
|
|
585
585
|
return i;
|
|
586
586
|
}
|
|
587
|
-
function
|
|
588
|
-
const i = n.getColorTheme().tokenColorMap, o = P.getLanguageId(t),
|
|
587
|
+
function Rt(n, e, t) {
|
|
588
|
+
const i = n.getColorTheme().tokenColorMap, o = P.getLanguageId(t), a = P.getTokenType(t), r = P.getFontStyle(t), I = P.getForeground(t), m = P.getBackground(t);
|
|
589
589
|
return {
|
|
590
590
|
languageId: e.languageIdCodec.decodeLanguageId(o),
|
|
591
|
-
tokenType:
|
|
591
|
+
tokenType: a,
|
|
592
592
|
bold: r & H.Bold ? !0 : void 0,
|
|
593
593
|
italic: r & H.Italic ? !0 : void 0,
|
|
594
594
|
underline: r & H.Underline ? !0 : void 0,
|
|
595
595
|
strikethrough: r & H.Strikethrough ? !0 : void 0,
|
|
596
596
|
foreground: i[I],
|
|
597
|
-
background: i[
|
|
597
|
+
background: i[m]
|
|
598
598
|
};
|
|
599
599
|
}
|
|
600
|
-
function
|
|
601
|
-
const i = t.lineNumber, o = n,
|
|
600
|
+
function wt(n, e, t) {
|
|
601
|
+
const i = t.lineNumber, o = n, a = o._tokenizationTextModelPart.grammarTokens._tokenizer.tokenizationSupport._actual._grammar, r = xt(n, a, i), I = a.tokenizeLine(
|
|
602
602
|
n.getLineContent(i),
|
|
603
603
|
r
|
|
604
|
-
),
|
|
604
|
+
), m = a.tokenizeLine2(
|
|
605
605
|
n.getLineContent(i),
|
|
606
606
|
r
|
|
607
607
|
);
|
|
608
608
|
let h = 0;
|
|
609
|
-
for (let
|
|
610
|
-
const f = I.tokens[
|
|
609
|
+
for (let A = I.tokens.length - 1; A >= 0; A--) {
|
|
610
|
+
const f = I.tokens[A];
|
|
611
611
|
if (t.column - 1 >= f.startIndex) {
|
|
612
|
-
h =
|
|
612
|
+
h = A;
|
|
613
613
|
break;
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
|
-
let
|
|
617
|
-
for (let
|
|
618
|
-
if (t.column - 1 >=
|
|
619
|
-
|
|
616
|
+
let v = 0;
|
|
617
|
+
for (let A = m.tokens.length >>> 1; A >= 0; A--)
|
|
618
|
+
if (t.column - 1 >= m.tokens[A << 1]) {
|
|
619
|
+
v = A;
|
|
620
620
|
break;
|
|
621
621
|
}
|
|
622
622
|
return {
|
|
623
623
|
token: I.tokens[h],
|
|
624
|
-
metadata:
|
|
624
|
+
metadata: Rt(
|
|
625
625
|
e,
|
|
626
626
|
o._languageService,
|
|
627
|
-
|
|
627
|
+
m.tokens[(v << 1) + 1]
|
|
628
628
|
)
|
|
629
629
|
};
|
|
630
630
|
}
|
|
631
|
-
const ue = oe(void 0),
|
|
631
|
+
const ue = oe(void 0), wn = ({
|
|
632
632
|
children: n,
|
|
633
633
|
url: e,
|
|
634
634
|
qodly: t,
|
|
635
635
|
defaultZoom: i,
|
|
636
636
|
openHandler: o,
|
|
637
|
-
language:
|
|
637
|
+
language: a = "4d",
|
|
638
638
|
defaultInited: r = !1
|
|
639
639
|
}) => {
|
|
640
|
-
const I =
|
|
640
|
+
const I = Re(), [m, h] = z(r), [v, A] = z(null), f = te(), R = te(0);
|
|
641
641
|
J(() => {
|
|
642
|
-
e && I &&
|
|
642
|
+
e && I && y();
|
|
643
643
|
}, [e, I]);
|
|
644
|
-
const
|
|
644
|
+
const y = async () => {
|
|
645
645
|
if (!I)
|
|
646
646
|
return;
|
|
647
|
-
const d = new
|
|
647
|
+
const d = new Ve({
|
|
648
648
|
enabled: process.env.NODE_ENV === "development",
|
|
649
649
|
debugEnabled: process.env.NODE_ENV === "development"
|
|
650
|
-
}), c = await
|
|
650
|
+
}), c = await mt({
|
|
651
651
|
logger: d
|
|
652
652
|
});
|
|
653
|
-
await
|
|
653
|
+
await je({
|
|
654
654
|
caller: "Qodly Code Editor",
|
|
655
655
|
logger: d,
|
|
656
656
|
serviceConfig: c
|
|
657
|
-
}), o &&
|
|
658
|
-
|
|
659
|
-
t ?
|
|
657
|
+
}), o && lt.get(at).registerCodeEditorOpenHandler(o), I.languages.registerCompletionItemProvider(
|
|
658
|
+
a,
|
|
659
|
+
t ? vt : ht
|
|
660
660
|
);
|
|
661
661
|
const u = q.getDefaultKeybindings.bind(q);
|
|
662
662
|
q.getDefaultKeybindings = () => u().filter(
|
|
@@ -664,30 +664,30 @@ const ue = oe(void 0), yn = ({
|
|
|
664
664
|
"workbench.action.files.saveAs",
|
|
665
665
|
"workbench.action.files.save"
|
|
666
666
|
].includes(Z.command)
|
|
667
|
-
), le.addKeybindingRules(
|
|
668
|
-
},
|
|
669
|
-
|
|
667
|
+
), le.addKeybindingRules(St), b();
|
|
668
|
+
}, b = () => {
|
|
669
|
+
A(null);
|
|
670
670
|
let d;
|
|
671
671
|
try {
|
|
672
672
|
d = new WebSocket(localStorage.LSP_SERVER || e);
|
|
673
673
|
} catch {
|
|
674
|
-
|
|
674
|
+
A(new Event("INVALID_URL"));
|
|
675
675
|
return;
|
|
676
676
|
}
|
|
677
|
-
d.onopen =
|
|
678
|
-
},
|
|
679
|
-
const d =
|
|
677
|
+
d.onopen = S, d.onclose = g, d.onerror = N, R.current = 0;
|
|
678
|
+
}, S = async function() {
|
|
679
|
+
const d = _e(this), c = new ft(d), u = new At(d), W = new Fe({
|
|
680
680
|
name: "4D Language Client",
|
|
681
681
|
clientOptions: {
|
|
682
682
|
workspaceFolder: {
|
|
683
|
-
uri:
|
|
683
|
+
uri: Je.parse("file:///PACKAGE")
|
|
684
684
|
},
|
|
685
685
|
// use a language id as a document selector
|
|
686
|
-
documentSelector: [{ scheme: "file", language:
|
|
686
|
+
documentSelector: [{ scheme: "file", language: a }],
|
|
687
687
|
// disable the default error handler
|
|
688
688
|
errorHandler: {
|
|
689
|
-
error: () => ({ action:
|
|
690
|
-
closed: () => ({ action:
|
|
689
|
+
error: () => ({ action: Pe.Continue }),
|
|
690
|
+
closed: () => ({ action: Ye.DoNotRestart })
|
|
691
691
|
}
|
|
692
692
|
},
|
|
693
693
|
// create a language client connection from the JSON RPC connection on demand
|
|
@@ -705,31 +705,31 @@ const ue = oe(void 0), yn = ({
|
|
|
705
705
|
V.textDocument.uri
|
|
706
706
|
) ? Promise.resolve() : Z(T, V, U);
|
|
707
707
|
}, c.onClose(() => {
|
|
708
|
-
W.stop(),
|
|
709
|
-
|
|
710
|
-
}, 1e3) :
|
|
708
|
+
W.stop(), R.current < 3 ? setTimeout(() => {
|
|
709
|
+
R.current++, b();
|
|
710
|
+
}, 1e3) : A(new Event("WEBSOCKET_CLOSED"));
|
|
711
711
|
}), W.needsStart() && await W.start(), h(!0);
|
|
712
|
-
},
|
|
713
|
-
},
|
|
714
|
-
|
|
712
|
+
}, g = () => {
|
|
713
|
+
}, N = (d) => {
|
|
714
|
+
A(d);
|
|
715
715
|
};
|
|
716
716
|
J(() => {
|
|
717
717
|
const d = ke.subscribe(({ action: c, payload: u }) => {
|
|
718
718
|
switch (c) {
|
|
719
719
|
case X.WILL_SAVE:
|
|
720
|
-
|
|
720
|
+
L(u.filePath);
|
|
721
721
|
break;
|
|
722
722
|
case X.DID_SAVE:
|
|
723
723
|
B(u.filePath, u.content);
|
|
724
724
|
break;
|
|
725
725
|
case X.WILL_CREATE:
|
|
726
|
-
|
|
726
|
+
p(u.filePath);
|
|
727
727
|
break;
|
|
728
728
|
case X.DID_CREATE:
|
|
729
729
|
fe(u.filePath);
|
|
730
730
|
break;
|
|
731
731
|
case X.WILL_RENAME:
|
|
732
|
-
|
|
732
|
+
_(u.oldPath, u.newPath);
|
|
733
733
|
break;
|
|
734
734
|
case X.DID_RENAME:
|
|
735
735
|
Ae(u.oldPath, u.newPath);
|
|
@@ -741,13 +741,13 @@ const ue = oe(void 0), yn = ({
|
|
|
741
741
|
pe(u.filePath);
|
|
742
742
|
break;
|
|
743
743
|
case X.DIAGNOSTIC_REFRESH:
|
|
744
|
-
|
|
744
|
+
w(u.filePath);
|
|
745
745
|
break;
|
|
746
746
|
}
|
|
747
747
|
});
|
|
748
748
|
return () => d.unsubscribe();
|
|
749
749
|
}, []);
|
|
750
|
-
const
|
|
750
|
+
const k = (d) => {
|
|
751
751
|
var c, u;
|
|
752
752
|
return (u = (c = f.current) == null ? void 0 : c._features) == null ? void 0 : u.find(
|
|
753
753
|
(W) => {
|
|
@@ -755,24 +755,24 @@ const ue = oe(void 0), yn = ({
|
|
|
755
755
|
return ((Z = W._registrationType) == null ? void 0 : Z.method) === d;
|
|
756
756
|
}
|
|
757
757
|
);
|
|
758
|
-
},
|
|
759
|
-
const c = [], u =
|
|
758
|
+
}, s = (d) => {
|
|
759
|
+
const c = [], u = k(d);
|
|
760
760
|
if (u)
|
|
761
761
|
for (const [W, Z] of u._registrations)
|
|
762
762
|
Z.provider && c.push(Z.provider);
|
|
763
763
|
return c;
|
|
764
|
-
},
|
|
764
|
+
}, C = async (d, c, u) => {
|
|
765
765
|
var Z, T, V;
|
|
766
|
-
const W =
|
|
767
|
-
|
|
766
|
+
const W = s(
|
|
767
|
+
st.method
|
|
768
768
|
);
|
|
769
769
|
if (W[0]) {
|
|
770
|
-
const U = new
|
|
770
|
+
const U = new Me(), Q = await Promise.resolve(
|
|
771
771
|
W[0].full.provideDocumentSemanticTokens(
|
|
772
772
|
c,
|
|
773
773
|
U.token
|
|
774
774
|
)
|
|
775
|
-
), ee = d, be = Q ?
|
|
775
|
+
), ee = d, be = Q ? Nt(
|
|
776
776
|
c,
|
|
777
777
|
ee._themeService,
|
|
778
778
|
{
|
|
@@ -780,7 +780,7 @@ const ue = oe(void 0), yn = ({
|
|
|
780
780
|
legend: (V = (T = (Z = f.current) == null ? void 0 : Z._capabilities) == null ? void 0 : T.semanticTokensProvider) == null ? void 0 : V.legend
|
|
781
781
|
},
|
|
782
782
|
u
|
|
783
|
-
) : null, he =
|
|
783
|
+
) : null, he = wt(
|
|
784
784
|
c,
|
|
785
785
|
ee._themeService,
|
|
786
786
|
u
|
|
@@ -791,17 +791,17 @@ const ue = oe(void 0), yn = ({
|
|
|
791
791
|
};
|
|
792
792
|
}
|
|
793
793
|
return null;
|
|
794
|
-
},
|
|
794
|
+
}, w = (d) => {
|
|
795
795
|
if (f.current) {
|
|
796
|
-
const c =
|
|
796
|
+
const c = s(
|
|
797
797
|
$e.method
|
|
798
798
|
);
|
|
799
799
|
for (const u of c)
|
|
800
800
|
u.onDidChangeDiagnosticsEmitter.fire();
|
|
801
801
|
}
|
|
802
|
-
},
|
|
802
|
+
}, L = (d, c = qe.Manual) => {
|
|
803
803
|
var u;
|
|
804
|
-
(u = f.current) == null || u.sendNotification(
|
|
804
|
+
(u = f.current) == null || u.sendNotification(Ue.type, {
|
|
805
805
|
textDocument: {
|
|
806
806
|
uri: j(d)
|
|
807
807
|
},
|
|
@@ -809,24 +809,24 @@ const ue = oe(void 0), yn = ({
|
|
|
809
809
|
});
|
|
810
810
|
}, B = (d, c) => {
|
|
811
811
|
var u;
|
|
812
|
-
(u = f.current) == null || u.sendNotification(
|
|
812
|
+
(u = f.current) == null || u.sendNotification(Qe.type, {
|
|
813
813
|
textDocument: {
|
|
814
814
|
uri: j(d)
|
|
815
815
|
},
|
|
816
816
|
text: c
|
|
817
817
|
});
|
|
818
|
-
},
|
|
818
|
+
}, p = (d) => {
|
|
819
819
|
var c;
|
|
820
|
-
(c = f.current) == null || c.sendRequest(
|
|
820
|
+
(c = f.current) == null || c.sendRequest(et.type, {
|
|
821
821
|
files: [
|
|
822
822
|
{
|
|
823
823
|
uri: j(d)
|
|
824
824
|
}
|
|
825
825
|
]
|
|
826
826
|
});
|
|
827
|
-
},
|
|
827
|
+
}, _ = (d, c) => {
|
|
828
828
|
var u;
|
|
829
|
-
(u = f.current) == null || u.sendRequest(
|
|
829
|
+
(u = f.current) == null || u.sendRequest(tt.type, {
|
|
830
830
|
files: [
|
|
831
831
|
{
|
|
832
832
|
oldUri: j(d),
|
|
@@ -836,7 +836,7 @@ const ue = oe(void 0), yn = ({
|
|
|
836
836
|
});
|
|
837
837
|
}, M = (d) => {
|
|
838
838
|
var c;
|
|
839
|
-
(c = f.current) == null || c.sendRequest(
|
|
839
|
+
(c = f.current) == null || c.sendRequest(nt.type, {
|
|
840
840
|
files: [
|
|
841
841
|
{
|
|
842
842
|
uri: j(d)
|
|
@@ -845,7 +845,7 @@ const ue = oe(void 0), yn = ({
|
|
|
845
845
|
});
|
|
846
846
|
}, fe = (d) => {
|
|
847
847
|
var c;
|
|
848
|
-
(c = f.current) == null || c.sendNotification(
|
|
848
|
+
(c = f.current) == null || c.sendNotification(it.type, {
|
|
849
849
|
files: [
|
|
850
850
|
{
|
|
851
851
|
uri: j(d)
|
|
@@ -854,7 +854,7 @@ const ue = oe(void 0), yn = ({
|
|
|
854
854
|
});
|
|
855
855
|
}, Ae = (d, c) => {
|
|
856
856
|
var u;
|
|
857
|
-
(u = f.current) == null || u.sendNotification(
|
|
857
|
+
(u = f.current) == null || u.sendNotification(ot.type, {
|
|
858
858
|
files: [
|
|
859
859
|
{
|
|
860
860
|
oldUri: j(d),
|
|
@@ -864,7 +864,7 @@ const ue = oe(void 0), yn = ({
|
|
|
864
864
|
});
|
|
865
865
|
}, pe = (d) => {
|
|
866
866
|
var c;
|
|
867
|
-
(c = f.current) == null || c.sendNotification(
|
|
867
|
+
(c = f.current) == null || c.sendNotification(rt.type, {
|
|
868
868
|
files: [
|
|
869
869
|
{
|
|
870
870
|
uri: j(d)
|
|
@@ -876,20 +876,20 @@ const ue = oe(void 0), yn = ({
|
|
|
876
876
|
ue.Provider,
|
|
877
877
|
{
|
|
878
878
|
value: {
|
|
879
|
-
inited:
|
|
879
|
+
inited: m || !!v,
|
|
880
880
|
clientRef: f,
|
|
881
|
-
lastError:
|
|
882
|
-
reload:
|
|
883
|
-
getTokenAtPosition:
|
|
881
|
+
lastError: v,
|
|
882
|
+
reload: b,
|
|
883
|
+
getTokenAtPosition: C
|
|
884
884
|
},
|
|
885
885
|
children: [
|
|
886
886
|
n,
|
|
887
|
-
/* @__PURE__ */ x(
|
|
887
|
+
/* @__PURE__ */ x(yt, { defaultZoom: i })
|
|
888
888
|
]
|
|
889
889
|
}
|
|
890
890
|
);
|
|
891
891
|
};
|
|
892
|
-
function
|
|
892
|
+
function kn() {
|
|
893
893
|
const n = re(ue);
|
|
894
894
|
if (n === void 0)
|
|
895
895
|
throw new Error("useLSP must be used within an LSPContext");
|
|
@@ -897,7 +897,7 @@ function Nn() {
|
|
|
897
897
|
}
|
|
898
898
|
const de = oe(
|
|
899
899
|
void 0
|
|
900
|
-
),
|
|
900
|
+
), Ln = Ne(({ children: n }) => {
|
|
901
901
|
const [e, t] = z(null);
|
|
902
902
|
return /* @__PURE__ */ x(
|
|
903
903
|
de.Provider,
|
|
@@ -910,7 +910,7 @@ const de = oe(
|
|
|
910
910
|
}
|
|
911
911
|
);
|
|
912
912
|
});
|
|
913
|
-
function
|
|
913
|
+
function kt() {
|
|
914
914
|
const n = re(de), e = z(null);
|
|
915
915
|
if (n === void 0) {
|
|
916
916
|
const [t, i] = e;
|
|
@@ -936,7 +936,7 @@ var Ie = {
|
|
|
936
936
|
}
|
|
937
937
|
return n;
|
|
938
938
|
}, K.apply(this, arguments);
|
|
939
|
-
},
|
|
939
|
+
}, Lt = globalThis && globalThis.__rest || function(n, e) {
|
|
940
940
|
var t = {};
|
|
941
941
|
for (var i in n)
|
|
942
942
|
Object.prototype.hasOwnProperty.call(n, i) && e.indexOf(i) < 0 && (t[i] = n[i]);
|
|
@@ -961,44 +961,44 @@ function me(n) {
|
|
|
961
961
|
}
|
|
962
962
|
function Wt(n) {
|
|
963
963
|
var e = function(t) {
|
|
964
|
-
var i = n.attr, o = n.size,
|
|
965
|
-
return t.className && (
|
|
964
|
+
var i = n.attr, o = n.size, a = n.title, r = Lt(n, ["attr", "size", "title"]), I = o || t.size || "1em", m;
|
|
965
|
+
return t.className && (m = t.className), n.className && (m = (m ? m + " " : "") + n.className), E.createElement("svg", K({
|
|
966
966
|
stroke: "currentColor",
|
|
967
967
|
fill: "currentColor",
|
|
968
968
|
strokeWidth: "0"
|
|
969
969
|
}, t.attr, i, r, {
|
|
970
|
-
className:
|
|
970
|
+
className: m,
|
|
971
971
|
style: K(K({
|
|
972
972
|
color: n.color || t.color
|
|
973
973
|
}, t.style), n.style),
|
|
974
974
|
height: I,
|
|
975
975
|
width: I,
|
|
976
976
|
xmlns: "http://www.w3.org/2000/svg"
|
|
977
|
-
}),
|
|
977
|
+
}), a && E.createElement("title", null, a), n.children);
|
|
978
978
|
};
|
|
979
979
|
return ne !== void 0 ? E.createElement(ne.Consumer, null, function(t) {
|
|
980
980
|
return e(t);
|
|
981
981
|
}) : e(Ie);
|
|
982
982
|
}
|
|
983
|
-
function
|
|
983
|
+
function Ft(n) {
|
|
984
984
|
return me({ tag: "svg", 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" } }] })(n);
|
|
985
985
|
}
|
|
986
|
-
function
|
|
986
|
+
function Zt(n) {
|
|
987
987
|
return me({ tag: "svg", 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" } }] })(n);
|
|
988
988
|
}
|
|
989
|
-
const
|
|
989
|
+
const jt = ({
|
|
990
990
|
lspProps: { lastError: n, reload: e }
|
|
991
991
|
}) => {
|
|
992
992
|
const [t, i] = z(!1), o = () => {
|
|
993
993
|
e();
|
|
994
|
-
},
|
|
994
|
+
}, a = () => {
|
|
995
995
|
i(!1);
|
|
996
996
|
};
|
|
997
997
|
return J(() => {
|
|
998
998
|
i(!!n);
|
|
999
999
|
}, [n]), t ? /* @__PURE__ */ D("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: [
|
|
1000
1000
|
/* @__PURE__ */ D("span", { className: "flex flex-1 justify-center gap-1", children: [
|
|
1001
|
-
/* @__PURE__ */ x(
|
|
1001
|
+
/* @__PURE__ */ x(Zt, { className: "h-4 w-4 text-yellow-600" }),
|
|
1002
1002
|
/* @__PURE__ */ D("span", { children: [
|
|
1003
1003
|
"LSP not loaded.",
|
|
1004
1004
|
" ",
|
|
@@ -1013,23 +1013,23 @@ const Zt = ({
|
|
|
1013
1013
|
] })
|
|
1014
1014
|
] }),
|
|
1015
1015
|
/* @__PURE__ */ x("button", { className: "focus:outline-none", children: /* @__PURE__ */ x(
|
|
1016
|
-
|
|
1016
|
+
Ft,
|
|
1017
1017
|
{
|
|
1018
1018
|
className: "h-4 w-4 text-white",
|
|
1019
|
-
onClick:
|
|
1019
|
+
onClick: a
|
|
1020
1020
|
}
|
|
1021
1021
|
) })
|
|
1022
1022
|
] }) : null;
|
|
1023
|
-
},
|
|
1023
|
+
}, Xt = {
|
|
1024
1024
|
provideCompletionItems: (n, e) => {
|
|
1025
1025
|
const t = n.getWordUntilPosition(e);
|
|
1026
1026
|
return {
|
|
1027
1027
|
suggestions: [
|
|
1028
1028
|
{
|
|
1029
1029
|
label: "device:xs",
|
|
1030
|
-
kind:
|
|
1030
|
+
kind: l.languages.CompletionItemKind.Snippet,
|
|
1031
1031
|
documentation: "Media query for phone device",
|
|
1032
|
-
range: new
|
|
1032
|
+
range: new l.Range(
|
|
1033
1033
|
e.lineNumber,
|
|
1034
1034
|
t.startColumn,
|
|
1035
1035
|
e.lineNumber,
|
|
@@ -1043,12 +1043,12 @@ const Zt = ({
|
|
|
1043
1043
|
"}"
|
|
1044
1044
|
].join(`
|
|
1045
1045
|
`),
|
|
1046
|
-
insertTextRules:
|
|
1046
|
+
insertTextRules: l.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
1047
1047
|
}
|
|
1048
1048
|
]
|
|
1049
1049
|
};
|
|
1050
1050
|
}
|
|
1051
|
-
},
|
|
1051
|
+
}, Kt = "#/definitions/Condition", Bt = {
|
|
1052
1052
|
Base: {
|
|
1053
1053
|
type: "object",
|
|
1054
1054
|
properties: {
|
|
@@ -1316,114 +1316,133 @@ const Zt = ({
|
|
|
1316
1316
|
"ref"
|
|
1317
1317
|
]
|
|
1318
1318
|
}
|
|
1319
|
-
},
|
|
1320
|
-
$ref:
|
|
1321
|
-
definitions:
|
|
1319
|
+
}, Et = {
|
|
1320
|
+
$ref: Kt,
|
|
1321
|
+
definitions: Bt
|
|
1322
|
+
}, Tt = "array", Ot = {
|
|
1323
|
+
type: "object",
|
|
1324
|
+
properties: {
|
|
1325
|
+
class: {
|
|
1326
|
+
type: "string"
|
|
1327
|
+
},
|
|
1328
|
+
method: {
|
|
1329
|
+
type: "string"
|
|
1330
|
+
},
|
|
1331
|
+
regexPattern: {
|
|
1332
|
+
type: "string"
|
|
1333
|
+
},
|
|
1334
|
+
verbs: {
|
|
1335
|
+
type: "string"
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
}, Gt = {
|
|
1339
|
+
type: Tt,
|
|
1340
|
+
items: Ot
|
|
1322
1341
|
};
|
|
1323
|
-
function
|
|
1342
|
+
function Dt(n, e) {
|
|
1324
1343
|
const t = document.createElement("style");
|
|
1325
1344
|
t.dataset.id = e, t.textContent = n, document.head.append(t);
|
|
1326
1345
|
}
|
|
1327
|
-
function
|
|
1346
|
+
function Jt(n) {
|
|
1328
1347
|
return Array.from(document.styleSheets).find(
|
|
1329
1348
|
(e) => e.ownerNode.getAttribute("data-id") === n
|
|
1330
1349
|
);
|
|
1331
1350
|
}
|
|
1332
|
-
function
|
|
1351
|
+
function Mt(n, e) {
|
|
1333
1352
|
const t = [];
|
|
1334
1353
|
let i = [];
|
|
1335
|
-
const o = [],
|
|
1354
|
+
const o = [], a = (s, C, w, L) => {
|
|
1336
1355
|
t.push({
|
|
1337
|
-
startLineNumber:
|
|
1338
|
-
endLineNumber:
|
|
1339
|
-
startColumn:
|
|
1340
|
-
endColumn:
|
|
1341
|
-
}), h(),
|
|
1342
|
-
}, r = (
|
|
1343
|
-
o.indexOf(
|
|
1344
|
-
}, I = (
|
|
1345
|
-
const
|
|
1346
|
-
|
|
1347
|
-
},
|
|
1348
|
-
for (const
|
|
1356
|
+
startLineNumber: s,
|
|
1357
|
+
endLineNumber: w,
|
|
1358
|
+
startColumn: C,
|
|
1359
|
+
endColumn: L
|
|
1360
|
+
}), h(), m();
|
|
1361
|
+
}, r = (s) => {
|
|
1362
|
+
o.indexOf(s) < 0 && o.push(s);
|
|
1363
|
+
}, I = (s) => {
|
|
1364
|
+
const C = o.indexOf(s);
|
|
1365
|
+
C < 0 || o.splice(C, 1);
|
|
1366
|
+
}, m = () => {
|
|
1367
|
+
for (const s of o)
|
|
1349
1368
|
try {
|
|
1350
|
-
|
|
1351
|
-
} catch (
|
|
1352
|
-
console.error(
|
|
1369
|
+
s(i);
|
|
1370
|
+
} catch (C) {
|
|
1371
|
+
console.error(C);
|
|
1353
1372
|
}
|
|
1354
1373
|
}, h = () => {
|
|
1355
|
-
const
|
|
1356
|
-
|
|
1357
|
-
t.map((
|
|
1358
|
-
|
|
1359
|
-
lineNumber:
|
|
1360
|
-
column:
|
|
1374
|
+
const s = n.getModel();
|
|
1375
|
+
s && (i = Pt(
|
|
1376
|
+
t.map((C) => [
|
|
1377
|
+
s.getOffsetAt({
|
|
1378
|
+
lineNumber: C.startLineNumber,
|
|
1379
|
+
column: C.startColumn
|
|
1361
1380
|
}),
|
|
1362
|
-
|
|
1363
|
-
lineNumber:
|
|
1364
|
-
column:
|
|
1381
|
+
s.getOffsetAt({
|
|
1382
|
+
lineNumber: C.endLineNumber,
|
|
1383
|
+
column: C.endColumn
|
|
1365
1384
|
})
|
|
1366
1385
|
]),
|
|
1367
1386
|
/*mergeJoins*/
|
|
1368
1387
|
!0
|
|
1369
|
-
), i.length > 0 && (i[0][0] <= 0 && (i[0][0] = Number.NEGATIVE_INFINITY), i[i.length - 1][1] >=
|
|
1370
|
-
},
|
|
1371
|
-
const
|
|
1388
|
+
), i.length > 0 && (i[0][0] <= 0 && (i[0][0] = Number.NEGATIVE_INFINITY), i[i.length - 1][1] >= s.getValueLength() && (i[i.length - 1][1] = Number.POSITIVE_INFINITY)));
|
|
1389
|
+
}, v = (s) => {
|
|
1390
|
+
const C = {
|
|
1372
1391
|
isDeletion: !1,
|
|
1373
1392
|
isAddition: !1,
|
|
1374
1393
|
isReplacement: !1
|
|
1375
1394
|
};
|
|
1376
|
-
return
|
|
1377
|
-
},
|
|
1378
|
-
h(),
|
|
1379
|
-
}), f = n.onDidChangeModelContent((
|
|
1380
|
-
if (!
|
|
1381
|
-
for (const
|
|
1382
|
-
const
|
|
1383
|
-
if (
|
|
1384
|
-
const
|
|
1385
|
-
(
|
|
1386
|
-
), B = !
|
|
1387
|
-
if (
|
|
1388
|
-
const
|
|
1389
|
-
if (
|
|
1390
|
-
|
|
1395
|
+
return s.text === "" ? C.isDeletion = !0 : s.range.startLineNumber === s.range.endLineNumber && s.range.startColumn === s.range.endColumn ? C.isAddition = !0 : C.isReplacement = !0, C;
|
|
1396
|
+
}, A = n.onDidChangeModel((s) => {
|
|
1397
|
+
h(), N();
|
|
1398
|
+
}), f = n.onDidChangeModelContent((s) => {
|
|
1399
|
+
if (!s.isUndoing)
|
|
1400
|
+
for (const C of s.changes) {
|
|
1401
|
+
const w = v(C);
|
|
1402
|
+
if (w.isReplacement || w.isDeletion || w.isAddition) {
|
|
1403
|
+
const L = t.some(
|
|
1404
|
+
(p) => C.range.startLineNumber >= p.startLineNumber && C.range.endLineNumber <= p.endLineNumber && C.range.startColumn >= p.startColumn && C.range.endColumn <= p.endColumn
|
|
1405
|
+
), B = !L && e && C.range.startLineNumber === 1 && C.range.startColumn === 1 && !se(C.text);
|
|
1406
|
+
if (L || B) {
|
|
1407
|
+
const p = n.getModel();
|
|
1408
|
+
if (p) {
|
|
1409
|
+
p.undo();
|
|
1391
1410
|
return;
|
|
1392
1411
|
}
|
|
1393
1412
|
}
|
|
1394
1413
|
}
|
|
1395
1414
|
}
|
|
1396
|
-
}),
|
|
1397
|
-
|
|
1415
|
+
}), R = () => {
|
|
1416
|
+
A.dispose(), f.dispose();
|
|
1398
1417
|
};
|
|
1399
|
-
let
|
|
1418
|
+
let y = [], b = `
|
|
1400
1419
|
.idoc-readonly-mark {
|
|
1401
1420
|
cursor: not-allowed;
|
|
1402
1421
|
z-index: 1;
|
|
1403
1422
|
}
|
|
1404
1423
|
`;
|
|
1405
|
-
if (
|
|
1406
|
-
const
|
|
1407
|
-
|
|
1424
|
+
if (b) {
|
|
1425
|
+
const s = "monaco-read-only";
|
|
1426
|
+
Jt(s) || Dt(b, s), b = null;
|
|
1408
1427
|
}
|
|
1409
|
-
const
|
|
1410
|
-
r(
|
|
1411
|
-
},
|
|
1412
|
-
I(
|
|
1413
|
-
},
|
|
1414
|
-
const
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
i.map(
|
|
1428
|
+
const S = () => {
|
|
1429
|
+
r(N), N();
|
|
1430
|
+
}, g = () => {
|
|
1431
|
+
I(N), y = n.deltaDecorations(y, []);
|
|
1432
|
+
}, N = () => {
|
|
1433
|
+
const s = n.getModel();
|
|
1434
|
+
s && (y = n.deltaDecorations(
|
|
1435
|
+
y,
|
|
1436
|
+
i.map(k(s))
|
|
1418
1437
|
));
|
|
1419
|
-
},
|
|
1420
|
-
const
|
|
1438
|
+
}, k = (s) => (C) => {
|
|
1439
|
+
const w = s.getPositionAt(C[0]), L = s.getPositionAt(C[1]);
|
|
1421
1440
|
return {
|
|
1422
|
-
range: new
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1441
|
+
range: new l.Range(
|
|
1442
|
+
w.lineNumber,
|
|
1443
|
+
w.column,
|
|
1444
|
+
L.lineNumber,
|
|
1445
|
+
L.column
|
|
1427
1446
|
),
|
|
1428
1447
|
options: {
|
|
1429
1448
|
className: "idoc-readonly-mark"
|
|
@@ -1434,70 +1453,70 @@ function Ot(n, e) {
|
|
|
1434
1453
|
get buffer() {
|
|
1435
1454
|
return i;
|
|
1436
1455
|
},
|
|
1437
|
-
exclude:
|
|
1456
|
+
exclude: a,
|
|
1438
1457
|
attach: r,
|
|
1439
1458
|
detach: I,
|
|
1440
|
-
dispose:
|
|
1441
|
-
show:
|
|
1442
|
-
hide:
|
|
1459
|
+
dispose: R,
|
|
1460
|
+
show: S,
|
|
1461
|
+
hide: g
|
|
1443
1462
|
};
|
|
1444
1463
|
}
|
|
1445
|
-
function
|
|
1464
|
+
function Vt(n, e, t) {
|
|
1446
1465
|
let i = !1;
|
|
1447
|
-
const o = (
|
|
1466
|
+
const o = (g) => g[1] < g[0] ? (i = !0, [[g[1], g[0]]]) : [[...g]], a = (g) => i ? g.map((N) => N[1] > N[0] ? I(N) : N).reverse() : g;
|
|
1448
1467
|
let r;
|
|
1449
|
-
const I = (
|
|
1450
|
-
let h,
|
|
1451
|
-
|
|
1452
|
-
for (
|
|
1453
|
-
for (
|
|
1454
|
-
if (
|
|
1455
|
-
|
|
1456
|
-
[
|
|
1457
|
-
[
|
|
1468
|
+
const I = (g) => (r = g[1], g[1] = g[0], g[0] = r, g), m = o(n);
|
|
1469
|
+
let h, v, A, f, R, y, b, S;
|
|
1470
|
+
A = m[0];
|
|
1471
|
+
for (v of e)
|
|
1472
|
+
for (b = v[0], S = v[1], f = 0; f < m.length; f++) {
|
|
1473
|
+
if (A = m[f], R = A[0], y = A[1], R < b)
|
|
1474
|
+
y < b ? h = [A] : y <= S ? h = [[R, b - 1]] : h = [
|
|
1475
|
+
[R, b - 1],
|
|
1476
|
+
[S + 1, y]
|
|
1458
1477
|
];
|
|
1459
|
-
else if (
|
|
1460
|
-
if (
|
|
1461
|
-
const
|
|
1462
|
-
h = t === 0 ? [] : [[
|
|
1478
|
+
else if (R <= S)
|
|
1479
|
+
if (b === Number.NEGATIVE_INFINITY) {
|
|
1480
|
+
const g = S + 1;
|
|
1481
|
+
h = t === 0 ? [] : [[g, y > g ? y : g]];
|
|
1463
1482
|
} else
|
|
1464
|
-
|
|
1483
|
+
S === Number.POSITIVE_INFINITY ? h = t === 0 ? [] : [[b - 1, b - 1]] : y <= S ? h = t < 0 ? [[b - 1, b - 1]] : t > 0 ? [[S + 1, S + 1]] : [] : h = [[S + 1, y]];
|
|
1465
1484
|
else
|
|
1466
|
-
h = [
|
|
1467
|
-
if (
|
|
1468
|
-
return
|
|
1485
|
+
h = [A];
|
|
1486
|
+
if (m.splice(f, 1, ...h), m.length === 1 && m[0][1] < b)
|
|
1487
|
+
return a(m);
|
|
1469
1488
|
}
|
|
1470
|
-
return
|
|
1489
|
+
return a(m);
|
|
1471
1490
|
}
|
|
1472
|
-
function
|
|
1491
|
+
function Pt(n, e) {
|
|
1473
1492
|
if (n.length < 2)
|
|
1474
1493
|
return n;
|
|
1475
1494
|
const t = [];
|
|
1476
|
-
let i = null, o,
|
|
1495
|
+
let i = null, o, a;
|
|
1477
1496
|
n = n.map(
|
|
1478
1497
|
(r) => (r[1] < r[0] && (o = r[1], r[1] = r[0], r[1] = o), r)
|
|
1479
1498
|
).sort((r, I) => r[0] - I[0]), t.push(n[0]);
|
|
1480
1499
|
for (let r = 1; r < n.length; r++)
|
|
1481
|
-
i = t[t.length - 1],
|
|
1500
|
+
i = t[t.length - 1], a = n[r], i[1] === a[0] && !e ? t.push(a) : i[1] === a[0] - 1 && e ? (i[1] = a[1], t.splice(t.length - 1, 1, i)) : i[1] < a[0] ? t.push(a) : i[1] < a[1] && (i[1] = a[1], t.splice(t.length - 1, 1, i));
|
|
1482
1501
|
return t;
|
|
1483
1502
|
}
|
|
1484
1503
|
function Y(n, e) {
|
|
1485
1504
|
return e.bind(n);
|
|
1486
1505
|
}
|
|
1487
|
-
class
|
|
1506
|
+
class Yt {
|
|
1488
1507
|
constructor(e, t) {
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1508
|
+
F(this, "editor");
|
|
1509
|
+
F(this, "intervals");
|
|
1510
|
+
F(this, "disposables", []);
|
|
1492
1511
|
/**
|
|
1493
1512
|
* Flag for `excludeIntervals`
|
|
1494
1513
|
*/
|
|
1495
|
-
|
|
1496
|
-
|
|
1514
|
+
F(this, "prefer", 1);
|
|
1515
|
+
F(this, "lastPrefer", 1);
|
|
1497
1516
|
/**
|
|
1498
1517
|
* Linked to ICodeEditor.onDidChangeCursorPosition event.
|
|
1499
1518
|
*/
|
|
1500
|
-
|
|
1519
|
+
F(this, "onCursor", Y(
|
|
1501
1520
|
this,
|
|
1502
1521
|
function(e) {
|
|
1503
1522
|
if (e.source === "api")
|
|
@@ -1506,17 +1525,17 @@ class Jt {
|
|
|
1506
1525
|
t.length !== 0 && this.editor.setSelections(t);
|
|
1507
1526
|
}
|
|
1508
1527
|
));
|
|
1509
|
-
|
|
1528
|
+
F(this, "onRectangleSelectionStart", Y(this, function({ event: e }) {
|
|
1510
1529
|
e.middleButton && (this.lastPrefer = this.prefer, this.prefer = 0, window.addEventListener("pointerup", this.onRectangleSelectionStop));
|
|
1511
1530
|
}));
|
|
1512
|
-
|
|
1531
|
+
F(this, "onRectangleSelectionStop", Y(this, function() {
|
|
1513
1532
|
this.prefer = this.lastPrefer, window.removeEventListener("pointerup", this.onRectangleSelectionStop);
|
|
1514
1533
|
}));
|
|
1515
1534
|
/**
|
|
1516
1535
|
* Linked to ICodeEditor.onKeyDown event.
|
|
1517
1536
|
*/
|
|
1518
|
-
|
|
1519
|
-
const t = e.keyCode, i =
|
|
1537
|
+
F(this, "onKey", Y(this, function(e) {
|
|
1538
|
+
const t = e.keyCode, i = l.KeyCode;
|
|
1520
1539
|
if (e.altKey || i.F1 <= t && t <= i.F19 || e.ctrlKey && t !== i.Backspace)
|
|
1521
1540
|
return;
|
|
1522
1541
|
if (t === i.UpArrow || t === i.LeftArrow || t === i.Home || t === i.PageUp) {
|
|
@@ -1527,24 +1546,24 @@ class Jt {
|
|
|
1527
1546
|
this.prefer = 1;
|
|
1528
1547
|
return;
|
|
1529
1548
|
}
|
|
1530
|
-
const o = this.getSelections(),
|
|
1549
|
+
const o = this.getSelections(), a = this.intervals.buffer;
|
|
1531
1550
|
let r;
|
|
1532
1551
|
if (t === i.Delete)
|
|
1533
|
-
r = (I) => I[0] === I[1] &&
|
|
1552
|
+
r = (I) => I[0] === I[1] && a.find((m) => I[1] + 1 === m[0]) != null;
|
|
1534
1553
|
else if (t === i.Backspace)
|
|
1535
|
-
r = (I) => I[0] === I[1] &&
|
|
1554
|
+
r = (I) => I[0] === I[1] && a.find((m) => m[1] + 1 === I[0]) != null;
|
|
1536
1555
|
else
|
|
1537
1556
|
return;
|
|
1538
1557
|
o.findIndex(r) !== -1 && (e.stopPropagation(), e.preventDefault());
|
|
1539
1558
|
}));
|
|
1540
|
-
|
|
1559
|
+
F(this, "getOffsetAt", Y(this, function(e) {
|
|
1541
1560
|
let t;
|
|
1542
1561
|
for (let i = 0; i < this.intervals.buffer.length; i++)
|
|
1543
1562
|
if (t = this.intervals.buffer[i], e <= t[1])
|
|
1544
1563
|
return t[0] - e < e - t[1] ? t[0] : t[1];
|
|
1545
1564
|
}));
|
|
1546
1565
|
var i;
|
|
1547
|
-
this.editor = e, this.intervals =
|
|
1566
|
+
this.editor = e, this.intervals = Mt(e, t), (i = this.editor.getModel()) == null || i.setEOL(l.editor.EndOfLineSequence.LF);
|
|
1548
1567
|
}
|
|
1549
1568
|
enable() {
|
|
1550
1569
|
this.disposables.push(
|
|
@@ -1564,18 +1583,18 @@ class Jt {
|
|
|
1564
1583
|
getApprovedSelections() {
|
|
1565
1584
|
const e = this.editor.getModel();
|
|
1566
1585
|
return this.getSelections().map(
|
|
1567
|
-
(i) =>
|
|
1586
|
+
(i) => Vt(
|
|
1568
1587
|
i,
|
|
1569
1588
|
this.intervals.buffer,
|
|
1570
1589
|
this.prefer
|
|
1571
1590
|
)
|
|
1572
1591
|
).flat().map((i) => {
|
|
1573
|
-
const o = e.getPositionAt(i[0]),
|
|
1574
|
-
return new
|
|
1592
|
+
const o = e.getPositionAt(i[0]), a = e.getPositionAt(i[1]);
|
|
1593
|
+
return new l.Selection(
|
|
1575
1594
|
o.lineNumber,
|
|
1576
1595
|
o.column,
|
|
1577
|
-
|
|
1578
|
-
|
|
1596
|
+
a.lineNumber,
|
|
1597
|
+
a.column
|
|
1579
1598
|
);
|
|
1580
1599
|
});
|
|
1581
1600
|
}
|
|
@@ -1593,101 +1612,105 @@ class Jt {
|
|
|
1593
1612
|
]);
|
|
1594
1613
|
}
|
|
1595
1614
|
}
|
|
1596
|
-
const
|
|
1615
|
+
const Ht = new RegExp("^[ s]+(exposed|Function)", "i"), ie = () => /* @__PURE__ */ x("div", { className: "absolute inset-0 animate-pulse", children: /* @__PURE__ */ x("div", { className: "w-full space-y-4 px-4 py-1", children: /* @__PURE__ */ D("div", { className: "space-y-2", children: [
|
|
1597
1616
|
/* @__PURE__ */ x("div", { className: "h-3 w-3/4 rounded bg-grey-200" }),
|
|
1598
1617
|
/* @__PURE__ */ x("div", { className: "h-3 rounded bg-grey-200" }),
|
|
1599
1618
|
/* @__PURE__ */ x("div", { className: "h-3 w-5/6 rounded bg-grey-200" }),
|
|
1600
1619
|
/* @__PURE__ */ x("div", { className: "h-3 rounded bg-grey-200" }),
|
|
1601
1620
|
/* @__PURE__ */ x("div", { className: "h-3 rounded bg-grey-200" })
|
|
1602
|
-
] }) }) }),
|
|
1621
|
+
] }) }) }), Wn = ({
|
|
1603
1622
|
path: n,
|
|
1604
1623
|
initialValue: e,
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
...S
|
|
1624
|
+
type: t,
|
|
1625
|
+
language: i,
|
|
1626
|
+
onChange: o,
|
|
1627
|
+
options: a = {},
|
|
1628
|
+
extra: r = {},
|
|
1629
|
+
showAlerts: I = !1,
|
|
1630
|
+
lspProps: m,
|
|
1631
|
+
...h
|
|
1614
1632
|
}) => {
|
|
1615
|
-
const { initialLineInfo:
|
|
1616
|
-
function
|
|
1617
|
-
|
|
1633
|
+
const { initialLineInfo: v, initialSelectionInfo: A } = r, { editor: f, setEditor: R } = kt(), { inited: y } = m;
|
|
1634
|
+
function b(g) {
|
|
1635
|
+
i === "css" && g.languages.registerCompletionItemProvider("css", Xt), i === "json" && g.languages.json && g.languages.json.jsonDefaults.setDiagnosticsOptions({
|
|
1618
1636
|
validate: !0,
|
|
1619
1637
|
schemas: [
|
|
1620
1638
|
{
|
|
1621
1639
|
uri: "condition-schema.json",
|
|
1622
1640
|
fileMatch: ["*.condition.json"],
|
|
1623
|
-
schema:
|
|
1641
|
+
schema: Et
|
|
1642
|
+
},
|
|
1643
|
+
{
|
|
1644
|
+
uri: "handlers-schema.json",
|
|
1645
|
+
fileMatch: [Le],
|
|
1646
|
+
schema: Gt
|
|
1624
1647
|
}
|
|
1625
1648
|
]
|
|
1626
1649
|
});
|
|
1627
1650
|
}
|
|
1628
|
-
function
|
|
1629
|
-
|
|
1630
|
-
const
|
|
1631
|
-
if (
|
|
1632
|
-
var
|
|
1633
|
-
const
|
|
1634
|
-
if (
|
|
1635
|
-
const
|
|
1636
|
-
|
|
1651
|
+
function S(g, N) {
|
|
1652
|
+
R(g);
|
|
1653
|
+
const k = g.getModel();
|
|
1654
|
+
if (k && (k.updateOptions({ insertSpaces: !1 }), g.onKeyUp(() => {
|
|
1655
|
+
var C;
|
|
1656
|
+
const s = (C = g.getPosition()) == null ? void 0 : C.lineNumber;
|
|
1657
|
+
if (s) {
|
|
1658
|
+
const w = k.getLineFirstNonWhitespaceColumn(s), L = k.getLineLength(s), B = k.getLineContent(s);
|
|
1659
|
+
Ht.test(B) && g.executeEdits("edit-handler", [
|
|
1637
1660
|
{
|
|
1638
|
-
range: new
|
|
1639
|
-
|
|
1661
|
+
range: new N.Range(
|
|
1662
|
+
s,
|
|
1640
1663
|
0,
|
|
1641
|
-
|
|
1642
|
-
|
|
1664
|
+
s,
|
|
1665
|
+
L
|
|
1643
1666
|
),
|
|
1644
|
-
text:
|
|
1645
|
-
|
|
1646
|
-
|
|
1667
|
+
text: B.substr(
|
|
1668
|
+
w - 1,
|
|
1669
|
+
L - w
|
|
1647
1670
|
)
|
|
1648
1671
|
}
|
|
1649
1672
|
]);
|
|
1650
1673
|
}
|
|
1651
|
-
})),
|
|
1652
|
-
const
|
|
1653
|
-
|
|
1674
|
+
})), t === We.METHOD && se(e)) {
|
|
1675
|
+
const s = new Yt(g, !0);
|
|
1676
|
+
s.exclude(1, 1, 1, Number.POSITIVE_INFINITY), s.enable();
|
|
1654
1677
|
}
|
|
1655
1678
|
}
|
|
1656
1679
|
return J(() => {
|
|
1657
|
-
if (!
|
|
1680
|
+
if (!f)
|
|
1658
1681
|
return;
|
|
1659
|
-
const { line:
|
|
1660
|
-
|
|
1661
|
-
}, [
|
|
1662
|
-
if (!
|
|
1682
|
+
const { line: g, offset: N } = v || {};
|
|
1683
|
+
g && bt(f, g, N);
|
|
1684
|
+
}, [v, f]), J(() => {
|
|
1685
|
+
if (!f)
|
|
1663
1686
|
return;
|
|
1664
|
-
const { selection:
|
|
1665
|
-
|
|
1666
|
-
}, [
|
|
1667
|
-
|
|
1687
|
+
const { selection: g } = A || {};
|
|
1688
|
+
g && pt(f, g);
|
|
1689
|
+
}, [A, f]), y ? /* @__PURE__ */ D(ye, { children: [
|
|
1690
|
+
I ? /* @__PURE__ */ x(jt, { lspProps: m }) : null,
|
|
1668
1691
|
/* @__PURE__ */ x(
|
|
1669
|
-
|
|
1692
|
+
we,
|
|
1670
1693
|
{
|
|
1671
1694
|
options: {
|
|
1672
1695
|
readOnly: !0,
|
|
1673
1696
|
fontSize: 12,
|
|
1674
1697
|
"semanticHighlighting.enabled": !0,
|
|
1675
1698
|
padding: { top: 10 },
|
|
1676
|
-
...
|
|
1699
|
+
...a
|
|
1677
1700
|
},
|
|
1678
1701
|
path: j(n),
|
|
1679
1702
|
value: e,
|
|
1680
1703
|
theme: "fd-dark",
|
|
1681
|
-
onChange: (
|
|
1682
|
-
language:
|
|
1683
|
-
beforeMount:
|
|
1684
|
-
onMount:
|
|
1704
|
+
onChange: (g) => o && o(g || ""),
|
|
1705
|
+
language: i,
|
|
1706
|
+
beforeMount: b,
|
|
1707
|
+
onMount: S,
|
|
1685
1708
|
loading: /* @__PURE__ */ x(ie, {}),
|
|
1686
|
-
...
|
|
1709
|
+
...h
|
|
1687
1710
|
}
|
|
1688
1711
|
)
|
|
1689
1712
|
] }) : /* @__PURE__ */ x(ie, {});
|
|
1690
|
-
},
|
|
1713
|
+
}, zt = {
|
|
1691
1714
|
name: "4d",
|
|
1692
1715
|
displayName: "%displayName%",
|
|
1693
1716
|
description: "%description%",
|
|
@@ -1712,42 +1735,42 @@ const Mt = new RegExp("^[ s]+(exposed|Function)", "i"), ie = () => /* @__PURE__
|
|
|
1712
1735
|
}
|
|
1713
1736
|
]
|
|
1714
1737
|
}
|
|
1715
|
-
}, { registerFileUrl:
|
|
1738
|
+
}, { registerFileUrl: $, whenReady: Fn } = gt(zt, void 0, {
|
|
1716
1739
|
system: !0
|
|
1717
1740
|
});
|
|
1718
|
-
|
|
1741
|
+
$(
|
|
1719
1742
|
"./syntaxes/4d.tmLanguage.json",
|
|
1720
1743
|
new URL("data:application/json;base64,ewogICJuYW1lIjogIjREIiwKICAic2NvcGVOYW1lIjogInNvdXJjZS40ZG0iLAogICJwYXR0ZXJucyI6IFsKICAgIHsKICAgICAgImluY2x1ZGUiOiAiI3N0YXRlbWVudHMiCiAgICB9CiAgXSwKICAicmVwb3NpdG9yeSI6IHsKICAgICJzdGF0ZW1lbnRzIjogewogICAgICAicGF0dGVybnMiOiBbCiAgICAgICAgewogICAgICAgICAgImluY2x1ZGUiOiAiI2NvbW1lbnQiCiAgICAgICAgfQogICAgICBdCiAgICB9LAogICAgImNvbW1lbnQiOiB7CiAgICAgICJwYXR0ZXJucyI6IFsKICAgICAgICB7CiAgICAgICAgICAibmFtZSI6ICJjb21tZW50LmJsb2NrLjRkIiwKICAgICAgICAgICJiZWdpbiI6ICIoL1xcKikoPzpcXHMqKChAKWludGVybmFsKSg/PVxcc3woXFwqLykpKT8iLAogICAgICAgICAgImJlZ2luQ2FwdHVyZXMiOiB7CiAgICAgICAgICAgICIxIjogewogICAgICAgICAgICAgICJuYW1lIjogInB1bmN0dWF0aW9uLmRlZmluaXRpb24uY29tbWVudC40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjIiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAic3RvcmFnZS50eXBlLmludGVybmFsZGVjbGFyYXRpb24uNGQiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgICIzIjogewogICAgICAgICAgICAgICJuYW1lIjogInB1bmN0dWF0aW9uLmRlY29yYXRvci5pbnRlcm5hbGRlY2xhcmF0aW9uLjRkIgogICAgICAgICAgICB9CiAgICAgICAgICB9LAogICAgICAgICAgImVuZCI6ICJcXCovIiwKICAgICAgICAgICJlbmRDYXB0dXJlcyI6IHsKICAgICAgICAgICAgIjAiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVmaW5pdGlvbi5jb21tZW50LjRkIgogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiYmVnaW4iOiAiKF5bIFxcdF0rKT8oKC8vKSg/OlxccyooKEApaW50ZXJuYWwpKD89XFxzfCQpKT8pIiwKICAgICAgICAgICJiZWdpbkNhcHR1cmVzIjogewogICAgICAgICAgICAiMSI6IHsKICAgICAgICAgICAgICAibmFtZSI6ICJwdW5jdHVhdGlvbi53aGl0ZXNwYWNlLmNvbW1lbnQubGVhZGluZy40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjIiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAiY29tbWVudC5saW5lLmRvdWJsZS1zbGFzaC40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjMiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVmaW5pdGlvbi5jb21tZW50LjRkIgogICAgICAgICAgICB9LAogICAgICAgICAgICAiNCI6IHsKICAgICAgICAgICAgICAibmFtZSI6ICJzdG9yYWdlLnR5cGUuaW50ZXJuYWxkZWNsYXJhdGlvbi40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjUiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVjb3JhdG9yLmludGVybmFsZGVjbGFyYXRpb24uNGQiCiAgICAgICAgICAgIH0KICAgICAgICAgIH0sCiAgICAgICAgICAiZW5kIjogIig/PSQpIiwKICAgICAgICAgICJjb250ZW50TmFtZSI6ICJjb21tZW50LmxpbmUuZG91YmxlLXNsYXNoLjRkIgogICAgICAgIH0KICAgICAgXQogICAgfQogIH0KfQo=", self.location).toString(),
|
|
1721
1744
|
{ mimeType: "application/json", size: 1592 }
|
|
1722
1745
|
);
|
|
1723
|
-
|
|
1746
|
+
$(
|
|
1724
1747
|
"./language-configuration.json",
|
|
1725
1748
|
new URL("data:application/json;base64,ewogICJjb21tZW50cyI6IHsKICAgICJsaW5lQ29tbWVudCI6ICIvLyIsCiAgICAiYmxvY2tDb21tZW50IjogWyIvKioiLCAiKiovIl0KICB9LAogIC8vIHN5bWJvbHMgdXNlZCBhcyBicmFja2V0cwogICJicmFja2V0cyI6IFsKICAgIFsieyIsICJ9Il0sCiAgICBbIigiLCAiKSJdLAogICAgWyJbIiwgIl0iXQogIF0sCiAgLy8gc3ltYm9scyB0aGF0IGFyZSBhdXRvIGNsb3NlZCB3aGVuIHR5cGluZwogIC8vIHN5bWJvbHMgdGhhdCB0aGF0IGNhbiBiZSB1c2VkIHRvIHN1cnJvdW5kIGEgc2VsZWN0aW9uCiAgInN1cnJvdW5kaW5nUGFpcnMiOiBbCiAgICBbInsiLCAifSJdLAogICAgWyJbIiwgIl0iXSwKICAgIFsiKCIsICIpIl0sCiAgICBbIlwiIiwgIlwiIl0sCiAgICBbIiciLCAiJyJdCiAgXSwKICAiYXV0b0Nsb3NpbmdQYWlycyI6IFsKICAgIHsKICAgICAgIm9wZW4iOiAiKCIsCiAgICAgICJjbG9zZSI6ICIpIgogICAgfSwKICAgIHsgIm9wZW4iOiAieyIsICJjbG9zZSI6ICJ9IiB9LAogICAgeyAib3BlbiI6ICJbIiwgImNsb3NlIjogIl0iIH0sCiAgICB7ICJvcGVuIjogIiciLCAiY2xvc2UiOiAiJyIsICJub3RJbiI6IFsic3RyaW5nIiwgImNvbW1lbnQiXSB9LAogICAgeyAib3BlbiI6ICJcIiIsICJjbG9zZSI6ICJcIiIsICJub3RJbiI6IFsic3RyaW5nIl0gfSwKICAgIHsgIm9wZW4iOiAiYCIsICJjbG9zZSI6ICJgIiwgIm5vdEluIjogWyJzdHJpbmciLCAiY29tbWVudCJdIH0sCiAgICB7ICJvcGVuIjogIi8qKiIsICJjbG9zZSI6ICIgKiovIiwgIm5vdEluIjogWyJzdHJpbmciXSB9CiAgXSwKICAiYXV0b0Nsb3NlQmVmb3JlIjogIjs6Liw9fV0pPmAgXG5cdCIsCiAgIndvcmRQYXR0ZXJuIjogIigtP1xcZCpcXC5cXGRcXHcqKXwoW15cXGBcXH5cXCFcXEBcXCNcXCVcXF5cXCZcXCpcXChcXClcXC1cXD1cXCtcXFtcXHtcXF1cXH1cXFxcXFx8XFw7XFw6XFwnXFxcIlxcLFxcLlxcPFxcPlxcL1xcP1xcclxcblxcdFxcZlxcdiBdKyl8KD88PVthLXpBLVpdKSA/KD89W2EtekEtWl0pIiwKICAiaW5kZW50YXRpb25SdWxlcyI6IHsKICAgICJpbmNyZWFzZUluZGVudFBhdHRlcm4iOiB7CiAgICAgICJwYXR0ZXJuIjogIiheKD8hW15cXHNdKSpcXHMqKGNsYXNzIGNvbnN0cnVjdG9yKSl8KF4oPyFbXlxcc10pKlxccyooZXhwb3NlZHxsb2NhbHxcXHMqKXsxfVxccypmdW5jdGlvbnsxfVxccypcXHcpfCheKD8hW15cXHNdKSpcXHMqKElmfEVsc2V8Rm9yfEZvciBlYWNofFdoaWxlfEJlZ2luIFNRTHxDYXNlIG9mfFVzZXxSZXBlYXR8OiAqXFwoLiopKS4qJCIsCiAgICAgICJmbGFncyI6ICJpIgogICAgfSwKICAgICJkZWNyZWFzZUluZGVudFBhdHRlcm4iOiB7CiAgICAgICJwYXR0ZXJuIjogIiheKD8hW15cXHNdKSpcXHMqKGV4cG9zZWR8bG9jYWx8XFxzKil7MX1cXHMqZnVuY3Rpb257MX1cXHMqXFx3KXwoRW5kIElmfEVuZCBGb3J8RWxzZXxFbmQgZm9yIGVhY2h8RW5kIFdoaWxlfEVuZCBTUUx8RW5kIGNhc2V8RW5kIHVzZXxVbnRpbHw6ICpcXCguKikuKiQiLAogICAgICAiZmxhZ3MiOiAiaSIKICAgIH0KICB9LAogICJvbkVudGVyUnVsZXMiOiBbCiAgICB7CiAgICAgICJiZWZvcmVUZXh0IjogewogICAgICAgICJwYXR0ZXJuIjogIl5leHBvc2VkIiwKICAgICAgICAiZmxhZ3MiOiAiaSIKICAgICAgfSwKICAgICAgImFjdGlvbiI6IHsgImluZGVudCI6ICJpbmRlbnQiLCAiaW5kZW50QWN0aW9uIjogMSB9CiAgICB9CiAgXQp9Cg==", self.location).toString(),
|
|
1726
1749
|
{ mimeType: "application/json", size: 1723 }
|
|
1727
1750
|
);
|
|
1728
|
-
|
|
1751
|
+
$(
|
|
1729
1752
|
"package.json",
|
|
1730
1753
|
new URL("data:application/json;base64,ewogICJuYW1lIjogIjRkIiwKICAiZGlzcGxheU5hbWUiOiAiJWRpc3BsYXlOYW1lJSIsCiAgImRlc2NyaXB0aW9uIjogIiVkZXNjcmlwdGlvbiUiLAogICJ2ZXJzaW9uIjogIjEuMC4wIiwKICAicHVibGlzaGVyIjogInZzY29kZSIsCiAgImxpY2Vuc2UiOiAiTUlUIiwKICAiZW5naW5lcyI6IHsKICAgICJ2c2NvZGUiOiAiMC4xMC54IgogIH0sCiAgInNjcmlwdHMiOiB7CiAgICAidXBkYXRlLWdyYW1tYXIiOiAibm9kZSAuLi9ub2RlX21vZHVsZXMvdnNjb2RlLWdyYW1tYXItdXBkYXRlci9iaW4gbWljcm9zb2Z0L3ZzY29kZS00ZCBncmFtbWFycy80ZC5jc29uIC4vc3ludGF4ZXMvNGQudG1MYW5ndWFnZS5qc29uIgogIH0sCiAgImNhdGVnb3JpZXMiOiBbCiAgICAiUHJvZ3JhbW1pbmcgTGFuZ3VhZ2VzIgogIF0sCiAgImNvbnRyaWJ1dGVzIjogewogICAgImxhbmd1YWdlcyI6IFsKICAgICAgewogICAgICAgICJpZCI6ICI0ZCIsCiAgICAgICAgImFsaWFzZXMiOiBbCiAgICAgICAgICAiNEQiLAogICAgICAgICAgIjRkIgogICAgICAgIF0sCiAgICAgICAgImV4dGVuc2lvbnMiOiBbCiAgICAgICAgICAiLjRkbSIsCiAgICAgICAgICAiLjRxcyIKICAgICAgICBdLAogICAgICAgICJjb25maWd1cmF0aW9uIjogIi4vbGFuZ3VhZ2UtY29uZmlndXJhdGlvbi5qc29uIgogICAgICB9CiAgICBdLAogICAgImdyYW1tYXJzIjogWwogICAgICB7CiAgICAgICAgImxhbmd1YWdlIjogIjRkIiwKICAgICAgICAic2NvcGVOYW1lIjogInNvdXJjZS40ZG0iLAogICAgICAgICJwYXRoIjogIi4vc3ludGF4ZXMvNGQudG1MYW5ndWFnZS5qc29uIgogICAgICB9CiAgICBdCiAgfSwKICAicmVwb3NpdG9yeSI6IHsKICAgICJ0eXBlIjogImdpdCIsCiAgICAidXJsIjogImh0dHBzOi8vZ2l0aHViLmNvbS9taWNyb3NvZnQvdnNjb2RlLmdpdCIKICB9Cn0K", self.location).toString(),
|
|
1731
1754
|
{ mimeType: "application/json", size: 1006 }
|
|
1732
1755
|
);
|
|
1733
|
-
|
|
1756
|
+
$(
|
|
1734
1757
|
"package.nls.json",
|
|
1735
1758
|
new URL("data:application/json;base64,ewogICJkaXNwbGF5TmFtZSI6ICI0RCBMYW5ndWFnZSBCYXNpY3MiLAogICJkZXNjcmlwdGlvbiI6ICJQcm92aWRlcyBzeW50YXggaGlnaGxpZ2h0aW5nIGFuZCBicmFja2V0IG1hdGNoaW5nIGZvciA0RE0gYW5kIDRRUyBmaWxlcy4iCn0K", self.location).toString(),
|
|
1736
1759
|
{ mimeType: "application/json", size: 135 }
|
|
1737
1760
|
);
|
|
1738
1761
|
export {
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1762
|
+
jt as Alerts,
|
|
1763
|
+
Wn as CodeEditor,
|
|
1764
|
+
Ln as CodeEditorProvider,
|
|
1765
|
+
wn as LSPProvider,
|
|
1743
1766
|
ae as _await,
|
|
1744
|
-
|
|
1767
|
+
mt as configureServices,
|
|
1745
1768
|
j as getFileSystemPath,
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1769
|
+
Rn as getFunctionOffset,
|
|
1770
|
+
Ct as initMonacoUserConfiguration,
|
|
1771
|
+
bt as jumpToLine,
|
|
1772
|
+
pt as jumpToSelection,
|
|
1773
|
+
kt as useCodeEditor,
|
|
1774
|
+
kn as useLSP
|
|
1752
1775
|
};
|
|
1753
1776
|
//# sourceMappingURL=index.es.js.map
|