@ws-ui/code-editor 0.2.2 → 0.2.4
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/services/index.d.ts +1 -1
- package/dist/index.cjs.js +6 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +256 -245
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
var
|
|
2
|
-
var Ie = (t, e, n) => e in t ?
|
|
3
|
-
var
|
|
4
|
-
import { jsxs as
|
|
5
|
-
import
|
|
6
|
-
import { loader as
|
|
7
|
-
import { lspSubject as
|
|
8
|
-
import { MonacoLanguageClient as
|
|
9
|
-
import { mergeServices as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import Re from "@codingame/monaco-vscode-languages-service-override";
|
|
14
|
-
import xe from "@codingame/monaco-vscode-editor-service-override";
|
|
1
|
+
var de = Object.defineProperty;
|
|
2
|
+
var Ie = (t, e, n) => e in t ? de(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var x = (t, e, n) => (Ie(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
4
|
+
import { jsxs as T, jsx as S, Fragment as ue } from "react/jsx-runtime";
|
|
5
|
+
import k, { useEffect as J, createContext as U, useState as V, useRef as $, useContext as q, memo as Ce } from "react";
|
|
6
|
+
import { loader as me, useMonaco as fe, Editor as Ae } from "@monaco-editor/react";
|
|
7
|
+
import { lspSubject as pe, LspActions as j, hasAttributesString as Q, FileFolderType as be } from "@ws-ui/shared";
|
|
8
|
+
import { MonacoLanguageClient as he } from "monaco-languageclient";
|
|
9
|
+
import { mergeServices as ve, initServices as Se } from "monaco-languageclient/vscode/services";
|
|
10
|
+
import ye, { initUserConfiguration as Ne } from "@codingame/monaco-vscode-configuration-service-override";
|
|
11
|
+
import we from "@codingame/monaco-vscode-languages-service-override";
|
|
12
|
+
import Re from "@codingame/monaco-vscode-textmate-service-override";
|
|
15
13
|
import "@codingame/monaco-vscode-theme-defaults-default-extension";
|
|
14
|
+
import xe from "@codingame/monaco-vscode-editor-service-override";
|
|
15
|
+
import We from "@codingame/monaco-vscode-theme-service-override";
|
|
16
16
|
import * as o from "monaco-editor";
|
|
17
|
-
import { Selection as
|
|
18
|
-
import { Logger as
|
|
19
|
-
import { ErrorAction as
|
|
20
|
-
import { WebSocketMessageReader as
|
|
21
|
-
import { WillSaveTextDocumentNotification as
|
|
22
|
-
import { StandaloneServices as
|
|
17
|
+
import { Selection as Le, KeyMod as G, KeyCode as O, editor as ee, Uri as Fe } from "monaco-editor";
|
|
18
|
+
import { Logger as Ze } from "monaco-languageclient/tools";
|
|
19
|
+
import { ErrorAction as je, CloseAction as Xe } from "vscode-languageclient";
|
|
20
|
+
import { WebSocketMessageReader as Ke, WebSocketMessageWriter as ke, toSocket as Ee } from "vscode-ws-jsonrpc";
|
|
21
|
+
import { DocumentDiagnosticRequest as Be, WillSaveTextDocumentNotification as Ge, TextDocumentSaveReason as Oe, DidSaveTextDocumentNotification as Te, WillCreateFilesRequest as Je, WillRenameFilesRequest as De, WillDeleteFilesRequest as Ve, DidCreateFilesNotification as Ye, DidRenameFilesNotification as Me, DidDeleteFilesNotification as Pe } from "vscode-languageserver-protocol";
|
|
22
|
+
import { StandaloneServices as He, ICodeEditorService as $e } from "vscode/services";
|
|
23
|
+
import { KeybindingsRegistry as P } from "vscode/monaco";
|
|
23
24
|
import "@codingame/monaco-vscode-standalone-languages";
|
|
24
25
|
import "@codingame/monaco-vscode-standalone-html-language-features";
|
|
25
26
|
import "@codingame/monaco-vscode-standalone-css-language-features";
|
|
@@ -29,14 +30,14 @@ import "@codingame/monaco-vscode-css-default-extension";
|
|
|
29
30
|
import "@codingame/monaco-vscode-json-default-extension";
|
|
30
31
|
import "@codingame/monaco-vscode-html-default-extension";
|
|
31
32
|
import "@codingame/monaco-vscode-javascript-default-extension";
|
|
32
|
-
import { registerExtension as
|
|
33
|
-
const
|
|
34
|
-
|
|
33
|
+
import { registerExtension as ze } from "vscode/extensions";
|
|
34
|
+
const _e = () => ye(), Ue = () => xe(
|
|
35
|
+
() => Promise.resolve(void 0)
|
|
36
|
+
), qe = () => {
|
|
37
|
+
const t = We(), e = t.themeService.ctor.prototype;
|
|
35
38
|
return e.defineTheme = () => {
|
|
36
39
|
}, t;
|
|
37
|
-
},
|
|
38
|
-
() => Promise.resolve(void 0)
|
|
39
|
-
), Ue = `{
|
|
40
|
+
}, Qe = `{
|
|
40
41
|
"workbench.colorTheme": "Default Dark+",
|
|
41
42
|
"workbench.iconTheme": "vs-seti",
|
|
42
43
|
"editor.autoClosingBrackets": "languageDefined",
|
|
@@ -121,10 +122,10 @@ const $e = () => Se(), ze = () => {
|
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
124
|
}
|
|
124
|
-
`,
|
|
125
|
+
`, en = () => Ne(Qe), nn = async (t) => {
|
|
125
126
|
var r;
|
|
126
127
|
const e = t.serviceConfig ?? {};
|
|
127
|
-
e.debugLogging = ((r = t.logger) == null ? void 0 : r.isEnabled()) === !0 && (e.debugLogging === !0 || t.logger.isDebugEnabled() === !0), await
|
|
128
|
+
e.debugLogging = ((r = t.logger) == null ? void 0 : r.isEnabled()) === !0 && (e.debugLogging === !0 || t.logger.isDebugEnabled() === !0), await en(), e.userServices = e.userServices ?? {};
|
|
128
129
|
const n = e.userServices.configurationService ?? void 0, i = e.workspaceConfig ?? void 0;
|
|
129
130
|
if (n === void 0) {
|
|
130
131
|
if (i)
|
|
@@ -133,13 +134,13 @@ const $e = () => Se(), ze = () => {
|
|
|
133
134
|
);
|
|
134
135
|
const a = {
|
|
135
136
|
// @see https://github.com/CodinGame/monaco-vscode-api#monaco-standalone-services
|
|
136
|
-
|
|
137
|
-
...
|
|
138
|
-
...we(),
|
|
137
|
+
..._e(),
|
|
138
|
+
...qe(),
|
|
139
139
|
...Re(),
|
|
140
|
-
...
|
|
140
|
+
...we(),
|
|
141
|
+
...Ue()
|
|
141
142
|
};
|
|
142
|
-
|
|
143
|
+
ve(a, e.userServices);
|
|
143
144
|
}
|
|
144
145
|
return i || (e.workspaceConfig = {
|
|
145
146
|
workspaceProvider: {
|
|
@@ -153,10 +154,10 @@ const $e = () => Se(), ze = () => {
|
|
|
153
154
|
}
|
|
154
155
|
}), e;
|
|
155
156
|
};
|
|
156
|
-
class
|
|
157
|
+
class tn extends Ke {
|
|
157
158
|
constructor(n, i) {
|
|
158
159
|
super(n);
|
|
159
|
-
|
|
160
|
+
x(this, "onMessage");
|
|
160
161
|
this.onMessage = i;
|
|
161
162
|
}
|
|
162
163
|
readMessage(n) {
|
|
@@ -172,10 +173,10 @@ class en extends Xe {
|
|
|
172
173
|
}
|
|
173
174
|
}
|
|
174
175
|
}
|
|
175
|
-
class
|
|
176
|
+
class on extends ke {
|
|
176
177
|
constructor(n, i) {
|
|
177
178
|
super(n);
|
|
178
|
-
|
|
179
|
+
x(this, "onSend");
|
|
179
180
|
this.onSend = i;
|
|
180
181
|
}
|
|
181
182
|
async write(n) {
|
|
@@ -191,26 +192,26 @@ function F(t, e = !0) {
|
|
|
191
192
|
const n = `/PACKAGE/Project/Sources/${t}`;
|
|
192
193
|
return e ? `file://${n}` : n;
|
|
193
194
|
}
|
|
194
|
-
function
|
|
195
|
+
function ne(t, e = 0) {
|
|
195
196
|
setTimeout(t, e);
|
|
196
197
|
}
|
|
197
|
-
function
|
|
198
|
-
const n = new
|
|
198
|
+
function rn(t, e) {
|
|
199
|
+
const n = new Le(
|
|
199
200
|
e.startLineNumber,
|
|
200
201
|
e.startColumn,
|
|
201
202
|
e.endLineNumber || e.startLineNumber,
|
|
202
203
|
e.endColumn || e.startColumn
|
|
203
204
|
);
|
|
204
|
-
|
|
205
|
+
ne(() => {
|
|
205
206
|
t.setSelection(n), t.revealRangeInCenter(n), t.focus();
|
|
206
207
|
});
|
|
207
208
|
}
|
|
208
|
-
function
|
|
209
|
-
n > 0 && (e = n + e),
|
|
209
|
+
function sn(t, e, n = 0) {
|
|
210
|
+
n > 0 && (e = n + e), ne(() => {
|
|
210
211
|
t.setPosition({ lineNumber: e, column: 1 }), t.revealLineInCenter(e), t.focus();
|
|
211
212
|
});
|
|
212
213
|
}
|
|
213
|
-
function
|
|
214
|
+
function rt(t, e, n) {
|
|
214
215
|
const r = t.getModel();
|
|
215
216
|
if (r && e) {
|
|
216
217
|
const a = r.getLineCount();
|
|
@@ -222,7 +223,7 @@ function tt(t, e, n) {
|
|
|
222
223
|
}
|
|
223
224
|
return 0;
|
|
224
225
|
}
|
|
225
|
-
const
|
|
226
|
+
const ln = {
|
|
226
227
|
provideCompletionItems: async (t, e) => {
|
|
227
228
|
const n = t.getWordUntilPosition(e);
|
|
228
229
|
return {
|
|
@@ -339,7 +340,7 @@ const rn = {
|
|
|
339
340
|
]
|
|
340
341
|
};
|
|
341
342
|
}
|
|
342
|
-
},
|
|
343
|
+
}, an = {
|
|
343
344
|
provideCompletionItems: async (t, e) => {
|
|
344
345
|
const n = t.getWordUntilPosition(e);
|
|
345
346
|
return {
|
|
@@ -454,44 +455,44 @@ const rn = {
|
|
|
454
455
|
]
|
|
455
456
|
};
|
|
456
457
|
}
|
|
457
|
-
},
|
|
458
|
+
}, gn = [
|
|
458
459
|
// zoom in
|
|
459
460
|
{
|
|
460
|
-
keybinding:
|
|
461
|
+
keybinding: G.CtrlCmd | O.NumpadAdd,
|
|
461
462
|
command: "editor.action.fontZoomIn"
|
|
462
463
|
},
|
|
463
464
|
{
|
|
464
|
-
keybinding:
|
|
465
|
+
keybinding: G.CtrlCmd | O.Equal,
|
|
465
466
|
command: "editor.action.fontZoomIn"
|
|
466
467
|
},
|
|
467
468
|
// zoom out
|
|
468
469
|
{
|
|
469
|
-
keybinding:
|
|
470
|
+
keybinding: G.CtrlCmd | O.NumpadSubtract,
|
|
470
471
|
command: "editor.action.fontZoomOut"
|
|
471
472
|
},
|
|
472
473
|
{
|
|
473
|
-
keybinding:
|
|
474
|
+
keybinding: G.CtrlCmd | O.Minus,
|
|
474
475
|
command: "editor.action.fontZoomOut"
|
|
475
476
|
},
|
|
476
477
|
// zoom reset
|
|
477
478
|
{
|
|
478
|
-
keybinding:
|
|
479
|
+
keybinding: G.CtrlCmd | O.Numpad0,
|
|
479
480
|
command: "editor.action.fontZoomReset"
|
|
480
481
|
},
|
|
481
482
|
{
|
|
482
|
-
keybinding:
|
|
483
|
+
keybinding: G.CtrlCmd | O.Digit0,
|
|
483
484
|
command: "editor.action.fontZoomReset"
|
|
484
485
|
}
|
|
485
|
-
],
|
|
486
|
-
t !== void 0 &&
|
|
486
|
+
], cn = ({ defaultZoom: t }) => (J(() => {
|
|
487
|
+
t !== void 0 && ee.EditorZoom.setZoomLevel(t);
|
|
487
488
|
}, []), null);
|
|
488
|
-
({}).VITE_DISABLE_MONACO_LOADER ||
|
|
489
|
+
({}).VITE_DISABLE_MONACO_LOADER || me.config({
|
|
489
490
|
monaco: o
|
|
490
491
|
// paths: {
|
|
491
492
|
// vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.41.0/min/vs",
|
|
492
493
|
// },
|
|
493
494
|
});
|
|
494
|
-
const
|
|
495
|
+
const te = U(void 0), st = ({
|
|
495
496
|
children: t,
|
|
496
497
|
url: e,
|
|
497
498
|
qodly: n,
|
|
@@ -500,27 +501,34 @@ const ee = z(void 0), it = ({
|
|
|
500
501
|
language: a = "4d",
|
|
501
502
|
defaultInited: g = !1
|
|
502
503
|
}) => {
|
|
503
|
-
const C =
|
|
504
|
+
const C = fe(), [m, h] = V(g), [Z, y] = V(null), f = $(), b = $(0);
|
|
504
505
|
J(() => {
|
|
505
506
|
e && C && v();
|
|
506
507
|
}, [e, C]);
|
|
507
508
|
const v = async () => {
|
|
508
509
|
if (!C)
|
|
509
510
|
return;
|
|
510
|
-
const c = new
|
|
511
|
+
const c = new Ze({
|
|
511
512
|
enabled: process.env.NODE_ENV === "development",
|
|
512
513
|
debugEnabled: process.env.NODE_ENV === "development"
|
|
513
|
-
}),
|
|
514
|
+
}), d = await nn({
|
|
514
515
|
logger: c
|
|
515
516
|
});
|
|
516
|
-
await
|
|
517
|
+
await Se({
|
|
517
518
|
caller: "Qodly Code Editor",
|
|
518
519
|
logger: c,
|
|
519
|
-
serviceConfig:
|
|
520
|
-
}), r &&
|
|
520
|
+
serviceConfig: d
|
|
521
|
+
}), r && He.get($e).registerCodeEditorOpenHandler(r), C.languages.registerCompletionItemProvider(
|
|
521
522
|
a,
|
|
522
|
-
n ?
|
|
523
|
-
)
|
|
523
|
+
n ? an : ln
|
|
524
|
+
);
|
|
525
|
+
const I = P.getDefaultKeybindings.bind(P);
|
|
526
|
+
P.getDefaultKeybindings = () => I().filter(
|
|
527
|
+
(B) => ![
|
|
528
|
+
"workbench.action.files.saveAs",
|
|
529
|
+
"workbench.action.files.save"
|
|
530
|
+
].includes(B.command)
|
|
531
|
+
), ee.addKeybindingRules(gn), p();
|
|
524
532
|
}, p = () => {
|
|
525
533
|
y(null);
|
|
526
534
|
let c;
|
|
@@ -532,155 +540,158 @@ const ee = z(void 0), it = ({
|
|
|
532
540
|
}
|
|
533
541
|
c.onopen = N, c.onclose = A, c.onerror = u, b.current = 0;
|
|
534
542
|
}, N = async function() {
|
|
535
|
-
const c =
|
|
543
|
+
const c = Ee(this), d = new tn(c), I = new on(c), R = new he({
|
|
536
544
|
name: "4D Language Client",
|
|
537
545
|
clientOptions: {
|
|
538
546
|
workspaceFolder: {
|
|
539
|
-
uri:
|
|
547
|
+
uri: Fe.parse("file:///PACKAGE")
|
|
540
548
|
},
|
|
541
549
|
// use a language id as a document selector
|
|
542
550
|
documentSelector: [{ scheme: "file", language: a }],
|
|
543
551
|
// disable the default error handler
|
|
544
552
|
errorHandler: {
|
|
545
|
-
error: () => ({ action:
|
|
546
|
-
closed: () => ({ action:
|
|
553
|
+
error: () => ({ action: je.Continue }),
|
|
554
|
+
closed: () => ({ action: Xe.DoNotRestart })
|
|
547
555
|
}
|
|
548
556
|
},
|
|
549
557
|
// create a language client connection from the JSON RPC connection on demand
|
|
550
558
|
connectionProvider: {
|
|
551
559
|
get: () => Promise.resolve({
|
|
552
|
-
reader:
|
|
553
|
-
writer:
|
|
560
|
+
reader: d,
|
|
561
|
+
writer: I
|
|
554
562
|
})
|
|
555
563
|
}
|
|
556
564
|
});
|
|
557
|
-
f.current =
|
|
558
|
-
const
|
|
559
|
-
f.current.sendRequest = function(
|
|
560
|
-
return typeof
|
|
561
|
-
|
|
562
|
-
) ? Promise.resolve() :
|
|
563
|
-
},
|
|
564
|
-
|
|
565
|
+
f.current = R;
|
|
566
|
+
const B = R.sendRequest.bind(R);
|
|
567
|
+
f.current.sendRequest = function(M, H, ce) {
|
|
568
|
+
return typeof M == "object" && M.method === "textDocument/diagnostic" && /file:\/\/\/PACKAGE\/Project\/Sources\/Methods\/__Debugger_.*/.test(
|
|
569
|
+
H.textDocument.uri
|
|
570
|
+
) ? Promise.resolve() : B(M, H, ce);
|
|
571
|
+
}, d.onClose(() => {
|
|
572
|
+
R.stop(), b.current < 3 ? setTimeout(() => {
|
|
565
573
|
b.current++, p();
|
|
566
574
|
}, 1e3) : y(new Event("WEBSOCKET_CLOSED"));
|
|
567
|
-
}),
|
|
575
|
+
}), R.needsStart() && await R.start(), h(!0);
|
|
568
576
|
}, A = () => {
|
|
569
577
|
}, u = (c) => {
|
|
570
578
|
y(c);
|
|
571
579
|
};
|
|
572
580
|
J(() => {
|
|
573
|
-
const c =
|
|
574
|
-
switch (
|
|
581
|
+
const c = pe.subscribe(({ action: d, payload: I }) => {
|
|
582
|
+
switch (d) {
|
|
575
583
|
case j.WILL_SAVE:
|
|
576
|
-
l(
|
|
584
|
+
l(I.filePath);
|
|
577
585
|
break;
|
|
578
586
|
case j.DID_SAVE:
|
|
579
|
-
w(
|
|
587
|
+
w(I.filePath, I.content);
|
|
580
588
|
break;
|
|
581
589
|
case j.WILL_CREATE:
|
|
582
|
-
|
|
590
|
+
W(I.filePath);
|
|
583
591
|
break;
|
|
584
592
|
case j.DID_CREATE:
|
|
585
|
-
|
|
593
|
+
le(I.filePath);
|
|
586
594
|
break;
|
|
587
595
|
case j.WILL_RENAME:
|
|
588
|
-
|
|
596
|
+
E(I.oldPath, I.newPath);
|
|
589
597
|
break;
|
|
590
598
|
case j.DID_RENAME:
|
|
591
|
-
|
|
599
|
+
ae(I.oldPath, I.newPath);
|
|
592
600
|
break;
|
|
593
601
|
case j.WILL_DELETE:
|
|
594
|
-
|
|
602
|
+
L(I.filePath);
|
|
595
603
|
break;
|
|
596
604
|
case j.DID_DELETE:
|
|
597
|
-
|
|
605
|
+
ge(I.filePath);
|
|
598
606
|
break;
|
|
599
607
|
case j.DIAGNOSTIC_REFRESH:
|
|
600
|
-
s(
|
|
608
|
+
s(I.filePath);
|
|
601
609
|
break;
|
|
602
610
|
}
|
|
603
611
|
});
|
|
604
612
|
return () => c.unsubscribe();
|
|
605
613
|
}, []);
|
|
606
|
-
const
|
|
607
|
-
var
|
|
608
|
-
return (
|
|
609
|
-
(
|
|
614
|
+
const K = (c) => {
|
|
615
|
+
var d, I;
|
|
616
|
+
return (I = (d = f.current) == null ? void 0 : d._features) == null ? void 0 : I.find(
|
|
617
|
+
(R) => {
|
|
618
|
+
var B;
|
|
619
|
+
return ((B = R._registrationType) == null ? void 0 : B.method) === c;
|
|
620
|
+
}
|
|
610
621
|
);
|
|
611
622
|
}, s = (c) => {
|
|
612
623
|
if (f.current) {
|
|
613
|
-
const
|
|
614
|
-
if (
|
|
615
|
-
for (const [
|
|
616
|
-
|
|
624
|
+
const d = K(Be.method);
|
|
625
|
+
if (d)
|
|
626
|
+
for (const [I, R] of d._registrations)
|
|
627
|
+
R.provider && R.provider.onDidChangeDiagnosticsEmitter.fire();
|
|
617
628
|
}
|
|
618
|
-
}, l = (c,
|
|
619
|
-
var
|
|
620
|
-
(
|
|
629
|
+
}, l = (c, d = Oe.Manual) => {
|
|
630
|
+
var I;
|
|
631
|
+
(I = f.current) == null || I.sendNotification(Ge.type, {
|
|
621
632
|
textDocument: {
|
|
622
633
|
uri: F(c)
|
|
623
634
|
},
|
|
624
|
-
reason:
|
|
635
|
+
reason: d
|
|
625
636
|
});
|
|
626
|
-
}, w = (c,
|
|
627
|
-
var
|
|
628
|
-
(
|
|
637
|
+
}, w = (c, d) => {
|
|
638
|
+
var I;
|
|
639
|
+
(I = f.current) == null || I.sendNotification(Te.type, {
|
|
629
640
|
textDocument: {
|
|
630
641
|
uri: F(c)
|
|
631
642
|
},
|
|
632
|
-
text:
|
|
643
|
+
text: d
|
|
633
644
|
});
|
|
634
|
-
},
|
|
635
|
-
var
|
|
636
|
-
(
|
|
645
|
+
}, W = (c) => {
|
|
646
|
+
var d;
|
|
647
|
+
(d = f.current) == null || d.sendRequest(Je.type, {
|
|
637
648
|
files: [
|
|
638
649
|
{
|
|
639
650
|
uri: F(c)
|
|
640
651
|
}
|
|
641
652
|
]
|
|
642
653
|
});
|
|
643
|
-
},
|
|
644
|
-
var
|
|
645
|
-
(
|
|
654
|
+
}, E = (c, d) => {
|
|
655
|
+
var I;
|
|
656
|
+
(I = f.current) == null || I.sendRequest(De.type, {
|
|
646
657
|
files: [
|
|
647
658
|
{
|
|
648
659
|
oldUri: F(c),
|
|
649
|
-
newUri: F(
|
|
660
|
+
newUri: F(d)
|
|
650
661
|
}
|
|
651
662
|
]
|
|
652
663
|
});
|
|
653
|
-
},
|
|
654
|
-
var
|
|
655
|
-
(
|
|
664
|
+
}, L = (c) => {
|
|
665
|
+
var d;
|
|
666
|
+
(d = f.current) == null || d.sendRequest(Ve.type, {
|
|
656
667
|
files: [
|
|
657
668
|
{
|
|
658
669
|
uri: F(c)
|
|
659
670
|
}
|
|
660
671
|
]
|
|
661
672
|
});
|
|
662
|
-
},
|
|
663
|
-
var
|
|
664
|
-
(
|
|
673
|
+
}, le = (c) => {
|
|
674
|
+
var d;
|
|
675
|
+
(d = f.current) == null || d.sendNotification(Ye.type, {
|
|
665
676
|
files: [
|
|
666
677
|
{
|
|
667
678
|
uri: F(c)
|
|
668
679
|
}
|
|
669
680
|
]
|
|
670
681
|
});
|
|
671
|
-
},
|
|
672
|
-
var
|
|
673
|
-
(
|
|
682
|
+
}, ae = (c, d) => {
|
|
683
|
+
var I;
|
|
684
|
+
(I = f.current) == null || I.sendNotification(Me.type, {
|
|
674
685
|
files: [
|
|
675
686
|
{
|
|
676
687
|
oldUri: F(c),
|
|
677
|
-
newUri: F(
|
|
688
|
+
newUri: F(d)
|
|
678
689
|
}
|
|
679
690
|
]
|
|
680
691
|
});
|
|
681
|
-
},
|
|
682
|
-
var
|
|
683
|
-
(
|
|
692
|
+
}, ge = (c) => {
|
|
693
|
+
var d;
|
|
694
|
+
(d = f.current) == null || d.sendNotification(Pe.type, {
|
|
684
695
|
files: [
|
|
685
696
|
{
|
|
686
697
|
uri: F(c)
|
|
@@ -688,8 +699,8 @@ const ee = z(void 0), it = ({
|
|
|
688
699
|
]
|
|
689
700
|
});
|
|
690
701
|
};
|
|
691
|
-
return /* @__PURE__ */
|
|
692
|
-
|
|
702
|
+
return /* @__PURE__ */ T(
|
|
703
|
+
te.Provider,
|
|
693
704
|
{
|
|
694
705
|
value: {
|
|
695
706
|
inited: m || !!Z,
|
|
@@ -699,23 +710,23 @@ const ee = z(void 0), it = ({
|
|
|
699
710
|
},
|
|
700
711
|
children: [
|
|
701
712
|
t,
|
|
702
|
-
/* @__PURE__ */ S(
|
|
713
|
+
/* @__PURE__ */ S(cn, { defaultZoom: i })
|
|
703
714
|
]
|
|
704
715
|
}
|
|
705
716
|
);
|
|
706
717
|
};
|
|
707
|
-
function
|
|
708
|
-
const t =
|
|
718
|
+
function lt() {
|
|
719
|
+
const t = q(te);
|
|
709
720
|
if (t === void 0)
|
|
710
721
|
throw new Error("useLSP must be used within an LSPContext");
|
|
711
722
|
return t;
|
|
712
723
|
}
|
|
713
|
-
const
|
|
724
|
+
const ie = U(
|
|
714
725
|
void 0
|
|
715
|
-
),
|
|
716
|
-
const [e, n] =
|
|
726
|
+
), at = Ce(({ children: t }) => {
|
|
727
|
+
const [e, n] = V(null);
|
|
717
728
|
return /* @__PURE__ */ S(
|
|
718
|
-
|
|
729
|
+
ie.Provider,
|
|
719
730
|
{
|
|
720
731
|
value: {
|
|
721
732
|
editor: e,
|
|
@@ -725,8 +736,8 @@ const ne = z(
|
|
|
725
736
|
}
|
|
726
737
|
);
|
|
727
738
|
});
|
|
728
|
-
function
|
|
729
|
-
const t =
|
|
739
|
+
function dn() {
|
|
740
|
+
const t = q(ie), e = V(null);
|
|
730
741
|
if (t === void 0) {
|
|
731
742
|
const [n, i] = e;
|
|
732
743
|
return {
|
|
@@ -736,13 +747,13 @@ function gn() {
|
|
|
736
747
|
}
|
|
737
748
|
return t;
|
|
738
749
|
}
|
|
739
|
-
var
|
|
750
|
+
var oe = {
|
|
740
751
|
color: void 0,
|
|
741
752
|
size: void 0,
|
|
742
753
|
className: void 0,
|
|
743
754
|
style: void 0,
|
|
744
755
|
attr: void 0
|
|
745
|
-
},
|
|
756
|
+
}, z = k.createContext && k.createContext(oe), X = globalThis && globalThis.__assign || function() {
|
|
746
757
|
return X = Object.assign || function(t) {
|
|
747
758
|
for (var e, n = 1, i = arguments.length; n < i; n++) {
|
|
748
759
|
e = arguments[n];
|
|
@@ -751,7 +762,7 @@ var te = {
|
|
|
751
762
|
}
|
|
752
763
|
return t;
|
|
753
764
|
}, X.apply(this, arguments);
|
|
754
|
-
},
|
|
765
|
+
}, In = globalThis && globalThis.__rest || function(t, e) {
|
|
755
766
|
var n = {};
|
|
756
767
|
for (var i in t)
|
|
757
768
|
Object.prototype.hasOwnProperty.call(t, i) && e.indexOf(i) < 0 && (n[i] = t[i]);
|
|
@@ -760,24 +771,24 @@ var te = {
|
|
|
760
771
|
e.indexOf(i[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, i[r]) && (n[i[r]] = t[i[r]]);
|
|
761
772
|
return n;
|
|
762
773
|
};
|
|
763
|
-
function
|
|
774
|
+
function re(t) {
|
|
764
775
|
return t && t.map(function(e, n) {
|
|
765
|
-
return
|
|
776
|
+
return k.createElement(e.tag, X({
|
|
766
777
|
key: n
|
|
767
|
-
}, e.attr),
|
|
778
|
+
}, e.attr), re(e.child));
|
|
768
779
|
});
|
|
769
780
|
}
|
|
770
|
-
function
|
|
781
|
+
function se(t) {
|
|
771
782
|
return function(e) {
|
|
772
|
-
return
|
|
783
|
+
return k.createElement(un, X({
|
|
773
784
|
attr: X({}, t.attr)
|
|
774
|
-
}, e),
|
|
785
|
+
}, e), re(t.child));
|
|
775
786
|
};
|
|
776
787
|
}
|
|
777
|
-
function
|
|
788
|
+
function un(t) {
|
|
778
789
|
var e = function(n) {
|
|
779
|
-
var i = t.attr, r = t.size, a = t.title, g =
|
|
780
|
-
return n.className && (m = n.className), t.className && (m = (m ? m + " " : "") + t.className),
|
|
790
|
+
var i = t.attr, r = t.size, a = t.title, g = In(t, ["attr", "size", "title"]), C = r || n.size || "1em", m;
|
|
791
|
+
return n.className && (m = n.className), t.className && (m = (m ? m + " " : "") + t.className), k.createElement("svg", X({
|
|
781
792
|
stroke: "currentColor",
|
|
782
793
|
fill: "currentColor",
|
|
783
794
|
strokeWidth: "0"
|
|
@@ -789,30 +800,30 @@ function In(t) {
|
|
|
789
800
|
height: C,
|
|
790
801
|
width: C,
|
|
791
802
|
xmlns: "http://www.w3.org/2000/svg"
|
|
792
|
-
}), a &&
|
|
803
|
+
}), a && k.createElement("title", null, a), t.children);
|
|
793
804
|
};
|
|
794
|
-
return
|
|
805
|
+
return z !== void 0 ? k.createElement(z.Consumer, null, function(n) {
|
|
795
806
|
return e(n);
|
|
796
|
-
}) : e(
|
|
807
|
+
}) : e(oe);
|
|
797
808
|
}
|
|
798
|
-
function
|
|
799
|
-
return
|
|
809
|
+
function Cn(t) {
|
|
810
|
+
return se({ 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" } }] })(t);
|
|
800
811
|
}
|
|
801
|
-
function
|
|
802
|
-
return
|
|
812
|
+
function mn(t) {
|
|
813
|
+
return se({ 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" } }] })(t);
|
|
803
814
|
}
|
|
804
|
-
const
|
|
805
|
-
const [n, i] =
|
|
815
|
+
const fn = ({ lspProps: { lastError: t, reload: e } }) => {
|
|
816
|
+
const [n, i] = V(!1), r = () => {
|
|
806
817
|
e();
|
|
807
818
|
}, a = () => {
|
|
808
819
|
i(!1);
|
|
809
820
|
};
|
|
810
821
|
return J(() => {
|
|
811
822
|
i(!!t);
|
|
812
|
-
}, [t]), n ? /* @__PURE__ */
|
|
813
|
-
/* @__PURE__ */
|
|
814
|
-
/* @__PURE__ */ S(
|
|
815
|
-
/* @__PURE__ */
|
|
823
|
+
}, [t]), n ? /* @__PURE__ */ T("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: [
|
|
824
|
+
/* @__PURE__ */ T("span", { className: "flex flex-1 justify-center gap-1", children: [
|
|
825
|
+
/* @__PURE__ */ S(mn, { className: "h-4 w-4 text-yellow-600" }),
|
|
826
|
+
/* @__PURE__ */ T("span", { children: [
|
|
816
827
|
"LSP not loaded.",
|
|
817
828
|
" ",
|
|
818
829
|
/* @__PURE__ */ S(
|
|
@@ -826,14 +837,14 @@ const Cn = ({ lspProps: { lastError: t, reload: e } }) => {
|
|
|
826
837
|
] })
|
|
827
838
|
] }),
|
|
828
839
|
/* @__PURE__ */ S("button", { className: "focus:outline-none", children: /* @__PURE__ */ S(
|
|
829
|
-
|
|
840
|
+
Cn,
|
|
830
841
|
{
|
|
831
842
|
className: "h-4 w-4 text-white",
|
|
832
843
|
onClick: a
|
|
833
844
|
}
|
|
834
845
|
) })
|
|
835
846
|
] }) : null;
|
|
836
|
-
},
|
|
847
|
+
}, An = {
|
|
837
848
|
provideCompletionItems: (t, e) => {
|
|
838
849
|
const n = t.getWordUntilPosition(e);
|
|
839
850
|
return {
|
|
@@ -861,7 +872,7 @@ const Cn = ({ lspProps: { lastError: t, reload: e } }) => {
|
|
|
861
872
|
]
|
|
862
873
|
};
|
|
863
874
|
}
|
|
864
|
-
},
|
|
875
|
+
}, pn = "#/definitions/Condition", bn = {
|
|
865
876
|
Base: {
|
|
866
877
|
type: "object",
|
|
867
878
|
properties: {
|
|
@@ -1129,28 +1140,28 @@ const Cn = ({ lspProps: { lastError: t, reload: e } }) => {
|
|
|
1129
1140
|
"ref"
|
|
1130
1141
|
]
|
|
1131
1142
|
}
|
|
1132
|
-
},
|
|
1133
|
-
$ref:
|
|
1134
|
-
definitions:
|
|
1143
|
+
}, hn = {
|
|
1144
|
+
$ref: pn,
|
|
1145
|
+
definitions: bn
|
|
1135
1146
|
};
|
|
1136
|
-
function
|
|
1147
|
+
function vn(t, e) {
|
|
1137
1148
|
const n = document.createElement("style");
|
|
1138
1149
|
n.dataset.id = e, n.textContent = t, document.head.append(n);
|
|
1139
1150
|
}
|
|
1140
|
-
function
|
|
1151
|
+
function Sn(t) {
|
|
1141
1152
|
return Array.from(document.styleSheets).find(
|
|
1142
1153
|
(e) => e.ownerNode.getAttribute("data-id") === t
|
|
1143
1154
|
);
|
|
1144
1155
|
}
|
|
1145
|
-
function
|
|
1156
|
+
function yn(t, e) {
|
|
1146
1157
|
const n = [];
|
|
1147
1158
|
let i = [];
|
|
1148
|
-
const r = [], a = (s, l, w,
|
|
1159
|
+
const r = [], a = (s, l, w, W) => {
|
|
1149
1160
|
n.push({
|
|
1150
1161
|
startLineNumber: s,
|
|
1151
1162
|
endLineNumber: w,
|
|
1152
1163
|
startColumn: l,
|
|
1153
|
-
endColumn:
|
|
1164
|
+
endColumn: W
|
|
1154
1165
|
}), h(), m();
|
|
1155
1166
|
}, g = (s) => {
|
|
1156
1167
|
r.indexOf(s) < 0 && r.push(s);
|
|
@@ -1166,7 +1177,7 @@ function vn(t, e) {
|
|
|
1166
1177
|
}
|
|
1167
1178
|
}, h = () => {
|
|
1168
1179
|
const s = t.getModel();
|
|
1169
|
-
s && (i =
|
|
1180
|
+
s && (i = wn(
|
|
1170
1181
|
n.map((l) => [
|
|
1171
1182
|
s.getOffsetAt({
|
|
1172
1183
|
lineNumber: l.startLineNumber,
|
|
@@ -1194,13 +1205,13 @@ function vn(t, e) {
|
|
|
1194
1205
|
for (const l of s.changes) {
|
|
1195
1206
|
const w = Z(l);
|
|
1196
1207
|
if (w.isReplacement || w.isDeletion || w.isAddition) {
|
|
1197
|
-
const
|
|
1198
|
-
(
|
|
1199
|
-
),
|
|
1200
|
-
if (
|
|
1201
|
-
const
|
|
1202
|
-
if (
|
|
1203
|
-
|
|
1208
|
+
const W = n.some(
|
|
1209
|
+
(L) => l.range.startLineNumber >= L.startLineNumber && l.range.endLineNumber <= L.endLineNumber && l.range.startColumn >= L.startColumn && l.range.endColumn <= L.endColumn
|
|
1210
|
+
), E = !W && e && l.range.startLineNumber === 1 && l.range.startColumn === 1 && !Q(l.text);
|
|
1211
|
+
if (W || E) {
|
|
1212
|
+
const L = t.getModel();
|
|
1213
|
+
if (L) {
|
|
1214
|
+
L.undo();
|
|
1204
1215
|
return;
|
|
1205
1216
|
}
|
|
1206
1217
|
}
|
|
@@ -1217,7 +1228,7 @@ function vn(t, e) {
|
|
|
1217
1228
|
`;
|
|
1218
1229
|
if (p) {
|
|
1219
1230
|
const s = "monaco-read-only";
|
|
1220
|
-
|
|
1231
|
+
Sn(s) || vn(p, s), p = null;
|
|
1221
1232
|
}
|
|
1222
1233
|
const N = () => {
|
|
1223
1234
|
g(u), u();
|
|
@@ -1227,16 +1238,16 @@ function vn(t, e) {
|
|
|
1227
1238
|
const s = t.getModel();
|
|
1228
1239
|
s && (v = t.deltaDecorations(
|
|
1229
1240
|
v,
|
|
1230
|
-
i.map(
|
|
1241
|
+
i.map(K(s))
|
|
1231
1242
|
));
|
|
1232
|
-
},
|
|
1233
|
-
const w = s.getPositionAt(l[0]),
|
|
1243
|
+
}, K = (s) => (l) => {
|
|
1244
|
+
const w = s.getPositionAt(l[0]), W = s.getPositionAt(l[1]);
|
|
1234
1245
|
return {
|
|
1235
1246
|
range: new o.Range(
|
|
1236
1247
|
w.lineNumber,
|
|
1237
1248
|
w.column,
|
|
1238
|
-
|
|
1239
|
-
|
|
1249
|
+
W.lineNumber,
|
|
1250
|
+
W.column
|
|
1240
1251
|
),
|
|
1241
1252
|
options: {
|
|
1242
1253
|
className: "idoc-readonly-mark"
|
|
@@ -1255,7 +1266,7 @@ function vn(t, e) {
|
|
|
1255
1266
|
hide: A
|
|
1256
1267
|
};
|
|
1257
1268
|
}
|
|
1258
|
-
function
|
|
1269
|
+
function Nn(t, e, n) {
|
|
1259
1270
|
let i = !1;
|
|
1260
1271
|
const r = (A) => A[1] < A[0] ? (i = !0, [[A[1], A[0]]]) : [[...A]], a = (A) => i ? A.map((u) => u[1] > u[0] ? C(u) : u).reverse() : A;
|
|
1261
1272
|
let g;
|
|
@@ -1282,7 +1293,7 @@ function Sn(t, e, n) {
|
|
|
1282
1293
|
}
|
|
1283
1294
|
return a(m);
|
|
1284
1295
|
}
|
|
1285
|
-
function
|
|
1296
|
+
function wn(t, e) {
|
|
1286
1297
|
if (t.length < 2)
|
|
1287
1298
|
return t;
|
|
1288
1299
|
const n = [];
|
|
@@ -1294,23 +1305,23 @@ function yn(t, e) {
|
|
|
1294
1305
|
i = n[n.length - 1], a = t[g], i[1] === a[0] && !e ? n.push(a) : i[1] === a[0] - 1 && e ? (i[1] = a[1], n.splice(n.length - 1, 1, i)) : i[1] < a[0] ? n.push(a) : i[1] < a[1] && (i[1] = a[1], n.splice(n.length - 1, 1, i));
|
|
1295
1306
|
return n;
|
|
1296
1307
|
}
|
|
1297
|
-
function
|
|
1308
|
+
function D(t, e) {
|
|
1298
1309
|
return e.bind(t);
|
|
1299
1310
|
}
|
|
1300
|
-
class
|
|
1311
|
+
class Rn {
|
|
1301
1312
|
constructor(e, n) {
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1313
|
+
x(this, "editor");
|
|
1314
|
+
x(this, "intervals");
|
|
1315
|
+
x(this, "disposables", []);
|
|
1305
1316
|
/**
|
|
1306
1317
|
* Flag for `excludeIntervals`
|
|
1307
1318
|
*/
|
|
1308
|
-
|
|
1309
|
-
|
|
1319
|
+
x(this, "prefer", 1);
|
|
1320
|
+
x(this, "lastPrefer", 1);
|
|
1310
1321
|
/**
|
|
1311
1322
|
* Linked to ICodeEditor.onDidChangeCursorPosition event.
|
|
1312
1323
|
*/
|
|
1313
|
-
|
|
1324
|
+
x(this, "onCursor", D(
|
|
1314
1325
|
this,
|
|
1315
1326
|
function(e) {
|
|
1316
1327
|
if (e.source === "api")
|
|
@@ -1319,16 +1330,16 @@ class Nn {
|
|
|
1319
1330
|
n.length !== 0 && this.editor.setSelections(n);
|
|
1320
1331
|
}
|
|
1321
1332
|
));
|
|
1322
|
-
|
|
1333
|
+
x(this, "onRectangleSelectionStart", D(this, function({ event: e }) {
|
|
1323
1334
|
e.middleButton && (this.lastPrefer = this.prefer, this.prefer = 0, window.addEventListener("pointerup", this.onRectangleSelectionStop));
|
|
1324
1335
|
}));
|
|
1325
|
-
|
|
1336
|
+
x(this, "onRectangleSelectionStop", D(this, function() {
|
|
1326
1337
|
this.prefer = this.lastPrefer, window.removeEventListener("pointerup", this.onRectangleSelectionStop);
|
|
1327
1338
|
}));
|
|
1328
1339
|
/**
|
|
1329
1340
|
* Linked to ICodeEditor.onKeyDown event.
|
|
1330
1341
|
*/
|
|
1331
|
-
|
|
1342
|
+
x(this, "onKey", D(this, function(e) {
|
|
1332
1343
|
const n = e.keyCode, i = o.KeyCode;
|
|
1333
1344
|
if (e.altKey || i.F1 <= n && n <= i.F19 || e.ctrlKey && n !== i.Backspace)
|
|
1334
1345
|
return;
|
|
@@ -1350,14 +1361,14 @@ class Nn {
|
|
|
1350
1361
|
return;
|
|
1351
1362
|
r.findIndex(g) !== -1 && (e.stopPropagation(), e.preventDefault());
|
|
1352
1363
|
}));
|
|
1353
|
-
|
|
1364
|
+
x(this, "getOffsetAt", D(this, function(e) {
|
|
1354
1365
|
let n;
|
|
1355
1366
|
for (let i = 0; i < this.intervals.buffer.length; i++)
|
|
1356
1367
|
if (n = this.intervals.buffer[i], e <= n[1])
|
|
1357
1368
|
return n[0] - e < e - n[1] ? n[0] : n[1];
|
|
1358
1369
|
}));
|
|
1359
1370
|
var i;
|
|
1360
|
-
this.editor = e, this.intervals =
|
|
1371
|
+
this.editor = e, this.intervals = yn(e, n), (i = this.editor.getModel()) == null || i.setEOL(o.editor.EndOfLineSequence.LF);
|
|
1361
1372
|
}
|
|
1362
1373
|
enable() {
|
|
1363
1374
|
this.disposables.push(
|
|
@@ -1377,7 +1388,7 @@ class Nn {
|
|
|
1377
1388
|
getApprovedSelections() {
|
|
1378
1389
|
const e = this.editor.getModel();
|
|
1379
1390
|
return this.getSelections().map(
|
|
1380
|
-
(i) =>
|
|
1391
|
+
(i) => Nn(
|
|
1381
1392
|
i,
|
|
1382
1393
|
this.intervals.buffer,
|
|
1383
1394
|
this.prefer
|
|
@@ -1406,13 +1417,13 @@ class Nn {
|
|
|
1406
1417
|
]);
|
|
1407
1418
|
}
|
|
1408
1419
|
}
|
|
1409
|
-
const
|
|
1420
|
+
const xn = new RegExp("^[ s]+(exposed|Function)", "i"), _ = () => /* @__PURE__ */ S("div", { className: "absolute inset-0 animate-pulse", children: /* @__PURE__ */ S("div", { className: "w-full space-y-4 px-4 py-1", children: /* @__PURE__ */ T("div", { className: "space-y-2", children: [
|
|
1410
1421
|
/* @__PURE__ */ S("div", { className: "h-3 w-3/4 rounded bg-grey-200" }),
|
|
1411
1422
|
/* @__PURE__ */ S("div", { className: "h-3 rounded bg-grey-200" }),
|
|
1412
1423
|
/* @__PURE__ */ S("div", { className: "h-3 w-5/6 rounded bg-grey-200" }),
|
|
1413
1424
|
/* @__PURE__ */ S("div", { className: "h-3 rounded bg-grey-200" }),
|
|
1414
1425
|
/* @__PURE__ */ S("div", { className: "h-3 rounded bg-grey-200" })
|
|
1415
|
-
] }) }) }),
|
|
1426
|
+
] }) }) }), gt = ({
|
|
1416
1427
|
path: t,
|
|
1417
1428
|
initialValue: e,
|
|
1418
1429
|
theme: n = "fd-dark",
|
|
@@ -1425,61 +1436,61 @@ const wn = new RegExp("^[ s]+(exposed|Function)", "i"), $ = () => /* @__PURE__ *
|
|
|
1425
1436
|
lspProps: h,
|
|
1426
1437
|
...Z
|
|
1427
1438
|
}) => {
|
|
1428
|
-
const { initialLineInfo: y, initialSelectionInfo: f } = C, { editor: b, setEditor: v } =
|
|
1439
|
+
const { initialLineInfo: y, initialSelectionInfo: f } = C, { editor: b, setEditor: v } = dn(), { inited: p } = h;
|
|
1429
1440
|
function N(u) {
|
|
1430
|
-
r === "css" && u.languages.registerCompletionItemProvider("css",
|
|
1441
|
+
r === "css" && u.languages.registerCompletionItemProvider("css", An), r === "json" && u.languages.json && u.languages.json.jsonDefaults.setDiagnosticsOptions({
|
|
1431
1442
|
validate: !0,
|
|
1432
1443
|
schemas: [
|
|
1433
1444
|
{
|
|
1434
1445
|
uri: "condition-schema.json",
|
|
1435
1446
|
fileMatch: ["*.condition.json"],
|
|
1436
|
-
schema:
|
|
1447
|
+
schema: hn
|
|
1437
1448
|
}
|
|
1438
1449
|
]
|
|
1439
1450
|
});
|
|
1440
1451
|
}
|
|
1441
|
-
function A(u,
|
|
1452
|
+
function A(u, K) {
|
|
1442
1453
|
v(u);
|
|
1443
1454
|
const s = u.getModel();
|
|
1444
1455
|
if (s && (s.updateOptions({ insertSpaces: !1 }), u.onKeyUp(() => {
|
|
1445
1456
|
var w;
|
|
1446
1457
|
const l = (w = u.getPosition()) == null ? void 0 : w.lineNumber;
|
|
1447
1458
|
if (l) {
|
|
1448
|
-
const
|
|
1449
|
-
|
|
1459
|
+
const W = s.getLineFirstNonWhitespaceColumn(l), E = s.getLineLength(l), L = s.getLineContent(l);
|
|
1460
|
+
xn.test(L) && u.executeEdits("edit-handler", [
|
|
1450
1461
|
{
|
|
1451
|
-
range: new
|
|
1462
|
+
range: new K.Range(
|
|
1452
1463
|
l,
|
|
1453
1464
|
0,
|
|
1454
1465
|
l,
|
|
1455
|
-
|
|
1466
|
+
E
|
|
1456
1467
|
),
|
|
1457
|
-
text:
|
|
1458
|
-
|
|
1459
|
-
|
|
1468
|
+
text: L.substr(
|
|
1469
|
+
W - 1,
|
|
1470
|
+
E - W
|
|
1460
1471
|
)
|
|
1461
1472
|
}
|
|
1462
1473
|
]);
|
|
1463
1474
|
}
|
|
1464
|
-
})), i ===
|
|
1465
|
-
const l = new
|
|
1475
|
+
})), i === be.METHOD && Q(e)) {
|
|
1476
|
+
const l = new Rn(u, !0);
|
|
1466
1477
|
l.exclude(1, 1, 1, Number.POSITIVE_INFINITY), l.enable();
|
|
1467
1478
|
}
|
|
1468
1479
|
}
|
|
1469
1480
|
return J(() => {
|
|
1470
1481
|
if (!b)
|
|
1471
1482
|
return;
|
|
1472
|
-
const { line: u, offset:
|
|
1473
|
-
u &&
|
|
1483
|
+
const { line: u, offset: K } = y || {};
|
|
1484
|
+
u && sn(b, u, K);
|
|
1474
1485
|
}, [y, b]), J(() => {
|
|
1475
1486
|
if (!b)
|
|
1476
1487
|
return;
|
|
1477
1488
|
const { selection: u } = f || {};
|
|
1478
|
-
u &&
|
|
1479
|
-
}, [f, b]), p ? /* @__PURE__ */
|
|
1480
|
-
m ? /* @__PURE__ */ S(
|
|
1489
|
+
u && rn(b, u);
|
|
1490
|
+
}, [f, b]), p ? /* @__PURE__ */ T(ue, { children: [
|
|
1491
|
+
m ? /* @__PURE__ */ S(fn, { lspProps: h }) : null,
|
|
1481
1492
|
/* @__PURE__ */ S(
|
|
1482
|
-
|
|
1493
|
+
Ae,
|
|
1483
1494
|
{
|
|
1484
1495
|
options: {
|
|
1485
1496
|
readOnly: !0,
|
|
@@ -1495,12 +1506,12 @@ const wn = new RegExp("^[ s]+(exposed|Function)", "i"), $ = () => /* @__PURE__ *
|
|
|
1495
1506
|
language: r,
|
|
1496
1507
|
beforeMount: N,
|
|
1497
1508
|
onMount: A,
|
|
1498
|
-
loading: /* @__PURE__ */ S(
|
|
1509
|
+
loading: /* @__PURE__ */ S(_, {}),
|
|
1499
1510
|
...Z
|
|
1500
1511
|
}
|
|
1501
1512
|
)
|
|
1502
|
-
] }) : /* @__PURE__ */ S(
|
|
1503
|
-
},
|
|
1513
|
+
] }) : /* @__PURE__ */ S(_, {});
|
|
1514
|
+
}, Wn = {
|
|
1504
1515
|
name: "4d",
|
|
1505
1516
|
displayName: "%displayName%",
|
|
1506
1517
|
description: "%description%",
|
|
@@ -1525,42 +1536,42 @@ const wn = new RegExp("^[ s]+(exposed|Function)", "i"), $ = () => /* @__PURE__ *
|
|
|
1525
1536
|
}
|
|
1526
1537
|
]
|
|
1527
1538
|
}
|
|
1528
|
-
}, { registerFileUrl:
|
|
1539
|
+
}, { registerFileUrl: Y, whenReady: ct } = ze(Wn, void 0, {
|
|
1529
1540
|
system: !0
|
|
1530
1541
|
});
|
|
1531
|
-
|
|
1542
|
+
Y(
|
|
1532
1543
|
"./syntaxes/4d.tmLanguage.json",
|
|
1533
1544
|
new URL("data:application/json;base64,ewogICJuYW1lIjogIjREIiwKICAic2NvcGVOYW1lIjogInNvdXJjZS40ZG0iLAogICJwYXR0ZXJucyI6IFsKICAgIHsKICAgICAgImluY2x1ZGUiOiAiI3N0YXRlbWVudHMiCiAgICB9CiAgXSwKICAicmVwb3NpdG9yeSI6IHsKICAgICJzdGF0ZW1lbnRzIjogewogICAgICAicGF0dGVybnMiOiBbCiAgICAgICAgewogICAgICAgICAgImluY2x1ZGUiOiAiI2NvbW1lbnQiCiAgICAgICAgfQogICAgICBdCiAgICB9LAogICAgImNvbW1lbnQiOiB7CiAgICAgICJwYXR0ZXJucyI6IFsKICAgICAgICB7CiAgICAgICAgICAibmFtZSI6ICJjb21tZW50LmJsb2NrLjRkIiwKICAgICAgICAgICJiZWdpbiI6ICIoL1xcKikoPzpcXHMqKChAKWludGVybmFsKSg/PVxcc3woXFwqLykpKT8iLAogICAgICAgICAgImJlZ2luQ2FwdHVyZXMiOiB7CiAgICAgICAgICAgICIxIjogewogICAgICAgICAgICAgICJuYW1lIjogInB1bmN0dWF0aW9uLmRlZmluaXRpb24uY29tbWVudC40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjIiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAic3RvcmFnZS50eXBlLmludGVybmFsZGVjbGFyYXRpb24uNGQiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgICIzIjogewogICAgICAgICAgICAgICJuYW1lIjogInB1bmN0dWF0aW9uLmRlY29yYXRvci5pbnRlcm5hbGRlY2xhcmF0aW9uLjRkIgogICAgICAgICAgICB9CiAgICAgICAgICB9LAogICAgICAgICAgImVuZCI6ICJcXCovIiwKICAgICAgICAgICJlbmRDYXB0dXJlcyI6IHsKICAgICAgICAgICAgIjAiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVmaW5pdGlvbi5jb21tZW50LjRkIgogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiYmVnaW4iOiAiKF5bIFxcdF0rKT8oKC8vKSg/OlxccyooKEApaW50ZXJuYWwpKD89XFxzfCQpKT8pIiwKICAgICAgICAgICJiZWdpbkNhcHR1cmVzIjogewogICAgICAgICAgICAiMSI6IHsKICAgICAgICAgICAgICAibmFtZSI6ICJwdW5jdHVhdGlvbi53aGl0ZXNwYWNlLmNvbW1lbnQubGVhZGluZy40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjIiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAiY29tbWVudC5saW5lLmRvdWJsZS1zbGFzaC40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjMiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVmaW5pdGlvbi5jb21tZW50LjRkIgogICAgICAgICAgICB9LAogICAgICAgICAgICAiNCI6IHsKICAgICAgICAgICAgICAibmFtZSI6ICJzdG9yYWdlLnR5cGUuaW50ZXJuYWxkZWNsYXJhdGlvbi40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjUiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVjb3JhdG9yLmludGVybmFsZGVjbGFyYXRpb24uNGQiCiAgICAgICAgICAgIH0KICAgICAgICAgIH0sCiAgICAgICAgICAiZW5kIjogIig/PSQpIiwKICAgICAgICAgICJjb250ZW50TmFtZSI6ICJjb21tZW50LmxpbmUuZG91YmxlLXNsYXNoLjRkIgogICAgICAgIH0KICAgICAgXQogICAgfQogIH0KfQo=", self.location).toString(),
|
|
1534
1545
|
{ mimeType: "application/json", size: 1592 }
|
|
1535
1546
|
);
|
|
1536
|
-
|
|
1547
|
+
Y(
|
|
1537
1548
|
"./language-configuration.json",
|
|
1538
1549
|
new URL("data:application/json;base64,ewogICJjb21tZW50cyI6IHsKICAgICJsaW5lQ29tbWVudCI6ICIvLyIsCiAgICAiYmxvY2tDb21tZW50IjogWyIvKioiLCAiKiovIl0KICB9LAogIC8vIHN5bWJvbHMgdXNlZCBhcyBicmFja2V0cwogICJicmFja2V0cyI6IFsKICAgIFsieyIsICJ9Il0sCiAgICBbIigiLCAiKSJdLAogICAgWyJbIiwgIl0iXQogIF0sCiAgLy8gc3ltYm9scyB0aGF0IGFyZSBhdXRvIGNsb3NlZCB3aGVuIHR5cGluZwogIC8vIHN5bWJvbHMgdGhhdCB0aGF0IGNhbiBiZSB1c2VkIHRvIHN1cnJvdW5kIGEgc2VsZWN0aW9uCiAgInN1cnJvdW5kaW5nUGFpcnMiOiBbCiAgICBbInsiLCAifSJdLAogICAgWyJbIiwgIl0iXSwKICAgIFsiKCIsICIpIl0sCiAgICBbIlwiIiwgIlwiIl0sCiAgICBbIiciLCAiJyJdCiAgXSwKICAiYXV0b0Nsb3NpbmdQYWlycyI6IFsKICAgIHsKICAgICAgIm9wZW4iOiAiKCIsCiAgICAgICJjbG9zZSI6ICIpIgogICAgfSwKICAgIHsgIm9wZW4iOiAieyIsICJjbG9zZSI6ICJ9IiB9LAogICAgeyAib3BlbiI6ICJbIiwgImNsb3NlIjogIl0iIH0sCiAgICB7ICJvcGVuIjogIiciLCAiY2xvc2UiOiAiJyIsICJub3RJbiI6IFsic3RyaW5nIiwgImNvbW1lbnQiXSB9LAogICAgeyAib3BlbiI6ICJcIiIsICJjbG9zZSI6ICJcIiIsICJub3RJbiI6IFsic3RyaW5nIl0gfSwKICAgIHsgIm9wZW4iOiAiYCIsICJjbG9zZSI6ICJgIiwgIm5vdEluIjogWyJzdHJpbmciLCAiY29tbWVudCJdIH0sCiAgICB7ICJvcGVuIjogIi8qKiIsICJjbG9zZSI6ICIgKiovIiwgIm5vdEluIjogWyJzdHJpbmciXSB9CiAgXSwKICAiYXV0b0Nsb3NlQmVmb3JlIjogIjs6Liw9fV0pPmAgXG5cdCIsCiAgIndvcmRQYXR0ZXJuIjogIigtP1xcZCpcXC5cXGRcXHcqKXwoW15cXGBcXH5cXCFcXEBcXCNcXCVcXF5cXCZcXCpcXChcXClcXC1cXD1cXCtcXFtcXHtcXF1cXH1cXFxcXFx8XFw7XFw6XFwnXFxcIlxcLFxcLlxcPFxcPlxcL1xcP1xcclxcblxcdFxcZlxcdiBdKyl8KD88PVthLXpBLVpdKSA/KD89W2EtekEtWl0pIiwKICAiaW5kZW50YXRpb25SdWxlcyI6IHsKICAgICJpbmNyZWFzZUluZGVudFBhdHRlcm4iOiB7CiAgICAgICJwYXR0ZXJuIjogIiheKD8hW15cXHNdKSpcXHMqKGNsYXNzIGNvbnN0cnVjdG9yKSl8KF4oPyFbXlxcc10pKlxccyooZXhwb3NlZHxsb2NhbHxcXHMqKXsxfVxccypmdW5jdGlvbnsxfVxccypcXHcpfCheKD8hW15cXHNdKSpcXHMqKElmfEVsc2V8Rm9yfEZvciBlYWNofFdoaWxlfEJlZ2luIFNRTHxDYXNlIG9mfFVzZXxSZXBlYXR8OiAqXFwoLiopKS4qJCIsCiAgICAgICJmbGFncyI6ICJpIgogICAgfSwKICAgICJkZWNyZWFzZUluZGVudFBhdHRlcm4iOiB7CiAgICAgICJwYXR0ZXJuIjogIiheKD8hW15cXHNdKSpcXHMqKGV4cG9zZWR8bG9jYWx8XFxzKil7MX1cXHMqZnVuY3Rpb257MX1cXHMqXFx3KXwoRW5kIElmfEVuZCBGb3J8RWxzZXxFbmQgZm9yIGVhY2h8RW5kIFdoaWxlfEVuZCBTUUx8RW5kIGNhc2V8RW5kIHVzZXxVbnRpbHw6ICpcXCguKikuKiQiLAogICAgICAiZmxhZ3MiOiAiaSIKICAgIH0KICB9LAogICJvbkVudGVyUnVsZXMiOiBbCiAgICB7CiAgICAgICJiZWZvcmVUZXh0IjogewogICAgICAgICJwYXR0ZXJuIjogIl5leHBvc2VkIiwKICAgICAgICAiZmxhZ3MiOiAiaSIKICAgICAgfSwKICAgICAgImFjdGlvbiI6IHsgImluZGVudCI6ICJpbmRlbnQiLCAiaW5kZW50QWN0aW9uIjogMSB9CiAgICB9CiAgXQp9Cg==", self.location).toString(),
|
|
1539
1550
|
{ mimeType: "application/json", size: 1723 }
|
|
1540
1551
|
);
|
|
1541
|
-
|
|
1552
|
+
Y(
|
|
1542
1553
|
"package.json",
|
|
1543
1554
|
new URL("data:application/json;base64,ewogICAgIm5hbWUiOiAiNGQiLAogICAgImRpc3BsYXlOYW1lIjogIiVkaXNwbGF5TmFtZSUiLAogICAgImRlc2NyaXB0aW9uIjogIiVkZXNjcmlwdGlvbiUiLAogICAgInZlcnNpb24iOiAiMS4wLjAiLAogICAgInB1Ymxpc2hlciI6ICJ2c2NvZGUiLAogICAgImxpY2Vuc2UiOiAiTUlUIiwKICAgICJlbmdpbmVzIjogewogICAgICAgICJ2c2NvZGUiOiAiMC4xMC54IgogICAgfSwKICAgICJzY3JpcHRzIjogewogICAgICAgICJ1cGRhdGUtZ3JhbW1hciI6ICJub2RlIC4uL25vZGVfbW9kdWxlcy92c2NvZGUtZ3JhbW1hci11cGRhdGVyL2JpbiBtaWNyb3NvZnQvdnNjb2RlLTRkIGdyYW1tYXJzLzRkLmNzb24gLi9zeW50YXhlcy80ZC50bUxhbmd1YWdlLmpzb24iCiAgICB9LAogICAgImNhdGVnb3JpZXMiOiBbCiAgICAgICAgIlByb2dyYW1taW5nIExhbmd1YWdlcyIKICAgIF0sCiAgICAiY29udHJpYnV0ZXMiOiB7CiAgICAgICAgImxhbmd1YWdlcyI6IFsKICAgICAgICAgICAgewogICAgICAgICAgICAgICJpZCI6ICI0ZCIsCiAgICAgICAgICAgICAgImFsaWFzZXMiOiBbIjREIiwgIjRkIl0sCiAgICAgICAgICAgICAgImV4dGVuc2lvbnMiOiBbIi40ZG0iLCAiLjRxcyJdLAogICAgICAgICAgICAgICJjb25maWd1cmF0aW9uIjogIi4vbGFuZ3VhZ2UtY29uZmlndXJhdGlvbi5qc29uIgogICAgICAgICAgICB9CiAgICAgICAgICBdLAogICAgICAgICAgImdyYW1tYXJzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgImxhbmd1YWdlIjogIjRkIiwKICAgICAgICAgICAgICAic2NvcGVOYW1lIjogInNvdXJjZS40ZG0iLAogICAgICAgICAgICAgICJwYXRoIjogIi4vc3ludGF4ZXMvNGQudG1MYW5ndWFnZS5qc29uIgogICAgICAgICAgICB9CiAgICAgICAgICBdCiAgICB9LAogICAgInJlcG9zaXRvcnkiOiB7CiAgICAgICAgInR5cGUiOiAiZ2l0IiwKICAgICAgICAidXJsIjogImh0dHBzOi8vZ2l0aHViLmNvbS9taWNyb3NvZnQvdnNjb2RlLmdpdCIKICAgIH0KfQ==", self.location).toString(),
|
|
1544
1555
|
{ mimeType: "application/json", size: 1006 }
|
|
1545
1556
|
);
|
|
1546
|
-
|
|
1557
|
+
Y(
|
|
1547
1558
|
"package.nls.json",
|
|
1548
1559
|
new URL("data:application/json;base64,ewogICJkaXNwbGF5TmFtZSI6ICI0RCBMYW5ndWFnZSBCYXNpY3MiLAogICJkZXNjcmlwdGlvbiI6ICJQcm92aWRlcyBzeW50YXggaGlnaGxpZ2h0aW5nIGFuZCBicmFja2V0IG1hdGNoaW5nIGZvciA0RE0gYW5kIDRRUyBmaWxlcy4iCn0K", self.location).toString(),
|
|
1549
1560
|
{ mimeType: "application/json", size: 135 }
|
|
1550
1561
|
);
|
|
1551
1562
|
export {
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1563
|
+
fn as Alerts,
|
|
1564
|
+
gt as CodeEditor,
|
|
1565
|
+
at as CodeEditorProvider,
|
|
1566
|
+
st as LSPProvider,
|
|
1567
|
+
ne as _await,
|
|
1568
|
+
nn as configureServices,
|
|
1558
1569
|
F as getFileSystemPath,
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1570
|
+
rt as getFunctionOffset,
|
|
1571
|
+
en as initMonacoUserConfiguration,
|
|
1572
|
+
sn as jumpToLine,
|
|
1573
|
+
rn as jumpToSelection,
|
|
1574
|
+
dn as useCodeEditor,
|
|
1575
|
+
lt as useLSP
|
|
1565
1576
|
};
|
|
1566
1577
|
//# sourceMappingURL=index.es.js.map
|