@ws-ui/code-editor 0.2.8 → 0.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -0
- package/dist/demo/LSPDemo.d.ts +0 -0
- package/dist/demo/common.d.ts +0 -0
- package/dist/demo/index.d.ts +0 -0
- package/dist/editor/Alerts.d.ts +0 -0
- package/dist/editor/extensions/4d-language-extension/index.d.ts +0 -0
- package/dist/editor/extensions/theme-defaults-extension/index.d.ts +0 -0
- package/dist/editor/extensions/theme-defaults-extension/types.d.ts +0 -0
- package/dist/editor/extensions/types.d.ts +0 -0
- package/dist/editor/index.d.ts +0 -0
- package/dist/editor/keybindings.d.ts +0 -0
- package/dist/editor/languages/index.d.ts +0 -0
- package/dist/editor/languages/utils.d.ts +0 -0
- package/dist/editor/loader/index.d.ts +0 -0
- package/dist/editor/loader/monaco-workers.d.ts +0 -0
- package/dist/editor/plugins/index.d.ts +0 -0
- package/dist/editor/plugins/readonly/dom.d.ts +0 -0
- package/dist/editor/plugins/readonly/index.d.ts +0 -0
- package/dist/editor/plugins/readonly/intervals.d.ts +0 -0
- package/dist/editor/plugins/readonly/types.d.ts +0 -0
- package/dist/editor/providers/CodeEditorProvider.d.ts +0 -0
- package/dist/editor/providers/LSPProvider/WebSocketMessageReader.d.ts +0 -0
- package/dist/editor/providers/LSPProvider/WebSocketMessageWriter.d.ts +0 -0
- package/dist/editor/providers/LSPProvider/ZoomInit.d.ts +0 -0
- package/dist/editor/providers/LSPProvider/index.d.ts +6 -2
- package/dist/editor/providers/index.d.ts +0 -0
- package/dist/editor/schemas/condition.schema.json.d.ts +0 -0
- package/dist/editor/services/configuration-service-override.d.ts +0 -0
- package/dist/editor/services/editor-service-override.d.ts +0 -0
- package/dist/editor/services/index.d.ts +0 -0
- package/dist/editor/services/model-service-override.d.ts +0 -0
- package/dist/editor/services/theme-service-override.d.ts +0 -0
- package/dist/editor/snippets/4d.d.ts +0 -0
- package/dist/editor/snippets/css.d.ts +0 -0
- package/dist/editor/snippets/qodly.d.ts +0 -0
- package/dist/editor/utils/encodedTokenAttributes.d.ts +109 -0
- package/dist/editor/{semanticTokens.d.ts → utils/semanticTokens.d.ts} +1 -16
- package/dist/editor/utils/textmateTokens.d.ts +9 -0
- package/dist/editor/utils.d.ts +0 -0
- package/dist/index.cjs.js +19 -19
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +0 -0
- package/dist/index.es.js +792 -696
- package/dist/index.es.js.map +1 -1
- package/dist/main.d.ts +0 -0
- package/dist/monaco_theme.json +0 -0
- package/dist/studio/assets/css.worker.bundle.js +0 -0
- package/dist/studio/assets/editor.worker.bundle.js +0 -0
- package/dist/studio/assets/html.worker.bundle.js +0 -0
- package/dist/studio/assets/json.worker.bundle.js +0 -0
- package/dist/studio/assets/textmate.worker.bundle.js +0 -0
- package/dist/studio/assets/ts.worker.bundle.js +0 -0
- package/dist/style.css +1 -1
- package/dist/vite.svg +0 -0
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { jsxs as J, jsx as R, Fragment 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
|
|
1
|
+
var ve = Object.defineProperty;
|
|
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 W = (n, e, t) => (Se(n, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
+
import { jsxs as J, jsx as R, Fragment as Ne } from "react/jsx-runtime";
|
|
5
|
+
import E, { useEffect as D, createContext as oe, useState as z, useRef as te, useContext as re, memo as ye } from "react";
|
|
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, FileFolderType as Le } from "@ws-ui/shared";
|
|
8
|
+
import { MonacoLanguageClient as We } from "monaco-languageclient";
|
|
9
|
+
import { mergeServices as Fe, initServices as Ze } from "monaco-languageclient/vscode/services";
|
|
10
|
+
import je, { initUserConfiguration as Xe } from "@codingame/monaco-vscode-configuration-service-override";
|
|
11
|
+
import Be from "@codingame/monaco-vscode-languages-service-override";
|
|
12
|
+
import Ke 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
|
|
22
|
-
import { StandaloneServices as
|
|
23
|
-
import { KeybindingsRegistry as
|
|
14
|
+
import Ee from "@codingame/monaco-vscode-editor-service-override";
|
|
15
|
+
import Te from "@codingame/monaco-vscode-theme-service-override";
|
|
16
|
+
import * as s from "monaco-editor";
|
|
17
|
+
import { Selection as Oe, KeyMod as O, KeyCode as G, editor as le, Range as Ge, Uri as Je, CancellationTokenSource as De } from "monaco-editor";
|
|
18
|
+
import { Logger as Me } from "monaco-languageclient/tools";
|
|
19
|
+
import { ErrorAction as Ve, CloseAction as Pe } from "vscode-languageclient";
|
|
20
|
+
import { WebSocketMessageReader as Ye, WebSocketMessageWriter as He, toSocket as ze } from "vscode-ws-jsonrpc";
|
|
21
|
+
import { DocumentDiagnosticRequest as $e, WillSaveTextDocumentNotification as _e, TextDocumentSaveReason as Ue, DidSaveTextDocumentNotification as qe, WillCreateFilesRequest as Qe, WillRenameFilesRequest as et, WillDeleteFilesRequest as tt, DidCreateFilesNotification as nt, DidRenameFilesNotification as it, DidDeleteFilesNotification as ot, SemanticTokensRegistrationType as rt } from "vscode-languageserver-protocol";
|
|
22
|
+
import { StandaloneServices as st, ICodeEditorService as lt } from "vscode/services";
|
|
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";
|
|
26
26
|
import "@codingame/monaco-vscode-standalone-css-language-features";
|
|
@@ -30,14 +30,14 @@ import "@codingame/monaco-vscode-css-default-extension";
|
|
|
30
30
|
import "@codingame/monaco-vscode-json-default-extension";
|
|
31
31
|
import "@codingame/monaco-vscode-html-default-extension";
|
|
32
32
|
import "@codingame/monaco-vscode-javascript-default-extension";
|
|
33
|
-
import { registerExtension as
|
|
34
|
-
const
|
|
33
|
+
import { registerExtension as at } from "vscode/extensions";
|
|
34
|
+
const gt = () => je(), ct = () => Ee(
|
|
35
35
|
() => Promise.resolve(void 0)
|
|
36
|
-
),
|
|
37
|
-
const
|
|
38
|
-
return
|
|
39
|
-
},
|
|
40
|
-
},
|
|
36
|
+
), ut = () => {
|
|
37
|
+
const n = Te(), e = n.themeService.ctor.prototype;
|
|
38
|
+
return e.defineTheme = () => {
|
|
39
|
+
}, n;
|
|
40
|
+
}, dt = `{
|
|
41
41
|
"workbench.colorTheme": "Default Dark+",
|
|
42
42
|
"workbench.iconTheme": "vs-seti",
|
|
43
43
|
"editor.autoClosingBrackets": "languageDefined",
|
|
@@ -122,47 +122,47 @@ const tn = () => Re(), on = () => Fe(
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
`,
|
|
125
|
+
`, It = () => Xe(dt), Ct = async (n) => {
|
|
126
126
|
var o;
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
const
|
|
130
|
-
if (
|
|
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 It(), e.userServices = e.userServices ?? {};
|
|
129
|
+
const t = e.userServices.configurationService ?? void 0, i = e.workspaceConfig ?? void 0;
|
|
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 l = {
|
|
136
136
|
// @see https://github.com/CodinGame/monaco-vscode-api#monaco-standalone-services
|
|
137
|
-
...
|
|
138
|
-
...
|
|
139
|
-
...
|
|
140
|
-
...
|
|
141
|
-
...
|
|
137
|
+
...gt(),
|
|
138
|
+
...ut(),
|
|
139
|
+
...Ke(),
|
|
140
|
+
...Be(),
|
|
141
|
+
...ct()
|
|
142
142
|
};
|
|
143
|
-
|
|
143
|
+
Fe(l, e.userServices);
|
|
144
144
|
}
|
|
145
|
-
return i || (
|
|
145
|
+
return i || (e.workspaceConfig = {
|
|
146
146
|
workspaceProvider: {
|
|
147
147
|
trusted: !0,
|
|
148
148
|
workspace: {
|
|
149
|
-
workspaceUri:
|
|
149
|
+
workspaceUri: s.Uri.file("/workspace")
|
|
150
150
|
},
|
|
151
151
|
async open() {
|
|
152
152
|
return !1;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
}),
|
|
155
|
+
}), e;
|
|
156
156
|
};
|
|
157
|
-
class
|
|
158
|
-
constructor(
|
|
159
|
-
super(
|
|
160
|
-
|
|
157
|
+
class mt extends Ye {
|
|
158
|
+
constructor(t, i) {
|
|
159
|
+
super(t);
|
|
160
|
+
W(this, "onMessage");
|
|
161
161
|
this.onMessage = i;
|
|
162
162
|
}
|
|
163
|
-
readMessage(
|
|
163
|
+
readMessage(t) {
|
|
164
164
|
this.onMessage && this.onMessage();
|
|
165
|
-
const [, i] =
|
|
165
|
+
const [, i] = t.split(`\r
|
|
166
166
|
\r
|
|
167
167
|
`);
|
|
168
168
|
if (this.state === "initial")
|
|
@@ -173,82 +173,82 @@ class gn extends Ge {
|
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
-
class
|
|
177
|
-
constructor(
|
|
178
|
-
super(
|
|
179
|
-
|
|
176
|
+
class ft extends He {
|
|
177
|
+
constructor(t, i) {
|
|
178
|
+
super(t);
|
|
179
|
+
W(this, "onSend");
|
|
180
180
|
this.onSend = i;
|
|
181
181
|
}
|
|
182
|
-
async write(
|
|
182
|
+
async write(t) {
|
|
183
183
|
try {
|
|
184
|
-
const i = JSON.stringify(
|
|
184
|
+
const i = JSON.stringify(t);
|
|
185
185
|
this.socket.send(i), this.onSend && this.onSend();
|
|
186
186
|
} catch (i) {
|
|
187
|
-
this.errorCount++, this.fireError(i,
|
|
187
|
+
this.errorCount++, this.fireError(i, t, this.errorCount);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
function j(
|
|
192
|
-
const
|
|
193
|
-
return
|
|
191
|
+
function j(n, e = !0) {
|
|
192
|
+
const t = `/PACKAGE/Project/Sources/${n}`;
|
|
193
|
+
return e ? `file://${t}` : t;
|
|
194
194
|
}
|
|
195
|
-
function
|
|
196
|
-
setTimeout(
|
|
195
|
+
function ae(n, e = 0) {
|
|
196
|
+
setTimeout(n, e);
|
|
197
197
|
}
|
|
198
|
-
function
|
|
199
|
-
const
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
198
|
+
function At(n, e) {
|
|
199
|
+
const t = new Oe(
|
|
200
|
+
e.startLineNumber,
|
|
201
|
+
e.startColumn,
|
|
202
|
+
e.endLineNumber || e.startLineNumber,
|
|
203
|
+
e.endColumn || e.startColumn
|
|
204
204
|
);
|
|
205
|
-
|
|
206
|
-
|
|
205
|
+
ae(() => {
|
|
206
|
+
n.setSelection(t), n.revealRangeInCenter(t), n.focus();
|
|
207
207
|
});
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
|
|
211
|
-
|
|
209
|
+
function pt(n, e, t = 0) {
|
|
210
|
+
t > 0 && (e = t + e), ae(() => {
|
|
211
|
+
n.setPosition({ lineNumber: e, column: 1 }), n.revealLineInCenter(e), n.focus();
|
|
212
212
|
});
|
|
213
213
|
}
|
|
214
|
-
function
|
|
215
|
-
const o =
|
|
216
|
-
if (o &&
|
|
217
|
-
const
|
|
218
|
-
for (let
|
|
219
|
-
const
|
|
220
|
-
if (new RegExp(`(?:Function|function) ${
|
|
221
|
-
return
|
|
214
|
+
function Sn(n, e, t) {
|
|
215
|
+
const o = n.getModel();
|
|
216
|
+
if (o && e) {
|
|
217
|
+
const l = o.getLineCount();
|
|
218
|
+
for (let r = 1; r <= l; r++) {
|
|
219
|
+
const I = o.getLineContent(r);
|
|
220
|
+
if (new RegExp(`(?:Function|function) ${t}`).test(I))
|
|
221
|
+
return r;
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
return 0;
|
|
225
225
|
}
|
|
226
|
-
const
|
|
227
|
-
provideCompletionItems: async (
|
|
228
|
-
const
|
|
226
|
+
const bt = {
|
|
227
|
+
provideCompletionItems: async (n, e) => {
|
|
228
|
+
const t = n.getWordUntilPosition(e);
|
|
229
229
|
return {
|
|
230
230
|
suggestions: [
|
|
231
231
|
{
|
|
232
232
|
label: "var",
|
|
233
|
-
kind:
|
|
234
|
-
range: new
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
233
|
+
kind: s.languages.CompletionItemKind.Snippet,
|
|
234
|
+
range: new s.Range(
|
|
235
|
+
e.lineNumber,
|
|
236
|
+
t.startColumn,
|
|
237
|
+
e.lineNumber,
|
|
238
|
+
t.endColumn
|
|
239
239
|
),
|
|
240
240
|
insertText: ["var ${1:var_name} : ${2:var_type}"].join(`
|
|
241
241
|
`),
|
|
242
|
-
insertTextRules:
|
|
242
|
+
insertTextRules: s.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
243
243
|
},
|
|
244
244
|
{
|
|
245
245
|
label: "While",
|
|
246
|
-
kind:
|
|
247
|
-
range: new
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
246
|
+
kind: s.languages.CompletionItemKind.Snippet,
|
|
247
|
+
range: new s.Range(
|
|
248
|
+
e.lineNumber,
|
|
249
|
+
t.startColumn,
|
|
250
|
+
e.lineNumber,
|
|
251
|
+
t.endColumn
|
|
252
252
|
),
|
|
253
253
|
insertText: [
|
|
254
254
|
"While(${1:expression})",
|
|
@@ -256,16 +256,16 @@ const In = {
|
|
|
256
256
|
"End while"
|
|
257
257
|
].join(`
|
|
258
258
|
`),
|
|
259
|
-
insertTextRules:
|
|
259
|
+
insertTextRules: s.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
260
260
|
},
|
|
261
261
|
{
|
|
262
262
|
label: "Case of",
|
|
263
|
-
kind:
|
|
264
|
-
range: new
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
263
|
+
kind: s.languages.CompletionItemKind.Snippet,
|
|
264
|
+
range: new s.Range(
|
|
265
|
+
e.lineNumber,
|
|
266
|
+
t.startColumn,
|
|
267
|
+
e.lineNumber,
|
|
268
|
+
t.endColumn
|
|
269
269
|
),
|
|
270
270
|
insertText: [
|
|
271
271
|
"Case of",
|
|
@@ -274,44 +274,44 @@ const In = {
|
|
|
274
274
|
"End case"
|
|
275
275
|
].join(`
|
|
276
276
|
`),
|
|
277
|
-
insertTextRules:
|
|
277
|
+
insertTextRules: s.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
278
278
|
},
|
|
279
279
|
{
|
|
280
280
|
label: "Else",
|
|
281
|
-
kind:
|
|
282
|
-
range: new
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
281
|
+
kind: s.languages.CompletionItemKind.Snippet,
|
|
282
|
+
range: new s.Range(
|
|
283
|
+
e.lineNumber,
|
|
284
|
+
t.startColumn,
|
|
285
|
+
e.lineNumber,
|
|
286
|
+
t.endColumn
|
|
287
287
|
),
|
|
288
288
|
insertText: ["Else", " "].join(`
|
|
289
289
|
`),
|
|
290
|
-
insertTextRules:
|
|
290
|
+
insertTextRules: s.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
291
291
|
},
|
|
292
292
|
{
|
|
293
293
|
label: "If",
|
|
294
|
-
kind:
|
|
295
|
-
range: new
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
294
|
+
kind: s.languages.CompletionItemKind.Snippet,
|
|
295
|
+
range: new s.Range(
|
|
296
|
+
e.lineNumber,
|
|
297
|
+
t.startColumn,
|
|
298
|
+
e.lineNumber,
|
|
299
|
+
t.endColumn
|
|
300
300
|
),
|
|
301
301
|
insertText: ["If (${1:expression})", " ${5:body}", "End if"].join(
|
|
302
302
|
`
|
|
303
303
|
`
|
|
304
304
|
),
|
|
305
|
-
insertTextRules:
|
|
305
|
+
insertTextRules: s.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
306
306
|
},
|
|
307
307
|
{
|
|
308
308
|
label: "For",
|
|
309
|
-
kind:
|
|
310
|
-
range: new
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
309
|
+
kind: s.languages.CompletionItemKind.Snippet,
|
|
310
|
+
range: new s.Range(
|
|
311
|
+
e.lineNumber,
|
|
312
|
+
t.startColumn,
|
|
313
|
+
e.lineNumber,
|
|
314
|
+
t.endColumn
|
|
315
315
|
),
|
|
316
316
|
insertText: [
|
|
317
317
|
"For(${1:counter};${2:start};${3:end}${4:;increment})",
|
|
@@ -319,68 +319,68 @@ const In = {
|
|
|
319
319
|
"End for"
|
|
320
320
|
].join(`
|
|
321
321
|
`),
|
|
322
|
-
insertTextRules:
|
|
322
|
+
insertTextRules: s.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
323
323
|
},
|
|
324
324
|
{
|
|
325
325
|
label: "Function",
|
|
326
|
-
kind:
|
|
327
|
-
range: new
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
326
|
+
kind: s.languages.CompletionItemKind.Snippet,
|
|
327
|
+
range: new s.Range(
|
|
328
|
+
e.lineNumber,
|
|
329
|
+
t.startColumn,
|
|
330
|
+
e.lineNumber,
|
|
331
|
+
t.endColumn
|
|
332
332
|
),
|
|
333
333
|
insertText: [
|
|
334
334
|
"Function ${1:function_name}(${2:params}) -> ${3:var_name} : ${4:var_type}",
|
|
335
335
|
" ${5:body}"
|
|
336
336
|
].join(`
|
|
337
337
|
`),
|
|
338
|
-
insertTextRules:
|
|
338
|
+
insertTextRules: s.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
339
339
|
}
|
|
340
340
|
]
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
|
-
},
|
|
344
|
-
provideCompletionItems: async (
|
|
345
|
-
const
|
|
343
|
+
}, ht = {
|
|
344
|
+
provideCompletionItems: async (n, e) => {
|
|
345
|
+
const t = n.getWordUntilPosition(e);
|
|
346
346
|
return {
|
|
347
347
|
suggestions: [
|
|
348
348
|
{
|
|
349
349
|
label: "var",
|
|
350
|
-
kind:
|
|
351
|
-
range: new
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
350
|
+
kind: s.languages.CompletionItemKind.Snippet,
|
|
351
|
+
range: new s.Range(
|
|
352
|
+
e.lineNumber,
|
|
353
|
+
t.startColumn,
|
|
354
|
+
e.lineNumber,
|
|
355
|
+
t.endColumn
|
|
356
356
|
),
|
|
357
357
|
insertText: ["var ${1:var_name} : ${2:var_type}"].join(`
|
|
358
358
|
`),
|
|
359
|
-
insertTextRules:
|
|
359
|
+
insertTextRules: s.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
360
360
|
},
|
|
361
361
|
{
|
|
362
362
|
label: "while",
|
|
363
|
-
kind:
|
|
364
|
-
range: new
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
363
|
+
kind: s.languages.CompletionItemKind.Snippet,
|
|
364
|
+
range: new s.Range(
|
|
365
|
+
e.lineNumber,
|
|
366
|
+
t.startColumn,
|
|
367
|
+
e.lineNumber,
|
|
368
|
+
t.endColumn
|
|
369
369
|
),
|
|
370
370
|
insertText: ["while(${1:expression})", " ${2:body}", "end"].join(
|
|
371
371
|
`
|
|
372
372
|
`
|
|
373
373
|
),
|
|
374
|
-
insertTextRules:
|
|
374
|
+
insertTextRules: s.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
375
375
|
},
|
|
376
376
|
{
|
|
377
377
|
label: "switch",
|
|
378
|
-
kind:
|
|
379
|
-
range: new
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
378
|
+
kind: s.languages.CompletionItemKind.Snippet,
|
|
379
|
+
range: new s.Range(
|
|
380
|
+
e.lineNumber,
|
|
381
|
+
t.startColumn,
|
|
382
|
+
e.lineNumber,
|
|
383
|
+
t.endColumn
|
|
384
384
|
),
|
|
385
385
|
insertText: [
|
|
386
386
|
"switch",
|
|
@@ -389,44 +389,44 @@ const In = {
|
|
|
389
389
|
"end"
|
|
390
390
|
].join(`
|
|
391
391
|
`),
|
|
392
|
-
insertTextRules:
|
|
392
|
+
insertTextRules: s.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
393
393
|
},
|
|
394
394
|
{
|
|
395
395
|
label: "else",
|
|
396
|
-
kind:
|
|
397
|
-
range: new
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
396
|
+
kind: s.languages.CompletionItemKind.Snippet,
|
|
397
|
+
range: new s.Range(
|
|
398
|
+
e.lineNumber,
|
|
399
|
+
t.startColumn,
|
|
400
|
+
e.lineNumber,
|
|
401
|
+
t.endColumn
|
|
402
402
|
),
|
|
403
403
|
insertText: ["else", " "].join(`
|
|
404
404
|
`),
|
|
405
|
-
insertTextRules:
|
|
405
|
+
insertTextRules: s.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
406
406
|
},
|
|
407
407
|
{
|
|
408
408
|
label: "if",
|
|
409
|
-
kind:
|
|
410
|
-
range: new
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
409
|
+
kind: s.languages.CompletionItemKind.Snippet,
|
|
410
|
+
range: new s.Range(
|
|
411
|
+
e.lineNumber,
|
|
412
|
+
t.startColumn,
|
|
413
|
+
e.lineNumber,
|
|
414
|
+
t.endColumn
|
|
415
415
|
),
|
|
416
416
|
insertText: ["if (${1:expression})", " ${5:body}", "end"].join(
|
|
417
417
|
`
|
|
418
418
|
`
|
|
419
419
|
),
|
|
420
|
-
insertTextRules:
|
|
420
|
+
insertTextRules: s.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
421
421
|
},
|
|
422
422
|
{
|
|
423
423
|
label: "for",
|
|
424
|
-
kind:
|
|
425
|
-
range: new
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
424
|
+
kind: s.languages.CompletionItemKind.Snippet,
|
|
425
|
+
range: new s.Range(
|
|
426
|
+
e.lineNumber,
|
|
427
|
+
t.startColumn,
|
|
428
|
+
e.lineNumber,
|
|
429
|
+
t.endColumn
|
|
430
430
|
),
|
|
431
431
|
insertText: [
|
|
432
432
|
"for(${1:counter},${2:start},${3:end}${4:,increment})",
|
|
@@ -434,469 +434,565 @@ const In = {
|
|
|
434
434
|
"end"
|
|
435
435
|
].join(`
|
|
436
436
|
`),
|
|
437
|
-
insertTextRules:
|
|
437
|
+
insertTextRules: s.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
438
438
|
},
|
|
439
439
|
{
|
|
440
440
|
label: "function",
|
|
441
|
-
kind:
|
|
442
|
-
range: new
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
441
|
+
kind: s.languages.CompletionItemKind.Snippet,
|
|
442
|
+
range: new s.Range(
|
|
443
|
+
e.lineNumber,
|
|
444
|
+
t.startColumn,
|
|
445
|
+
e.lineNumber,
|
|
446
|
+
t.endColumn
|
|
447
447
|
),
|
|
448
448
|
insertText: [
|
|
449
449
|
"function ${1:function_name}(${2:params}) -> ${3:var_name} : ${4:var_type}",
|
|
450
450
|
" ${5:body}"
|
|
451
451
|
].join(`
|
|
452
452
|
`),
|
|
453
|
-
insertTextRules:
|
|
453
|
+
insertTextRules: s.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
454
454
|
}
|
|
455
455
|
]
|
|
456
456
|
};
|
|
457
457
|
}
|
|
458
|
-
},
|
|
458
|
+
}, vt = [
|
|
459
459
|
// zoom in
|
|
460
460
|
{
|
|
461
|
-
keybinding:
|
|
461
|
+
keybinding: O.CtrlCmd | G.NumpadAdd,
|
|
462
462
|
command: "editor.action.fontZoomIn"
|
|
463
463
|
},
|
|
464
464
|
{
|
|
465
|
-
keybinding:
|
|
465
|
+
keybinding: O.CtrlCmd | G.Equal,
|
|
466
466
|
command: "editor.action.fontZoomIn"
|
|
467
467
|
},
|
|
468
468
|
// zoom out
|
|
469
469
|
{
|
|
470
|
-
keybinding:
|
|
470
|
+
keybinding: O.CtrlCmd | G.NumpadSubtract,
|
|
471
471
|
command: "editor.action.fontZoomOut"
|
|
472
472
|
},
|
|
473
473
|
{
|
|
474
|
-
keybinding:
|
|
474
|
+
keybinding: O.CtrlCmd | G.Minus,
|
|
475
475
|
command: "editor.action.fontZoomOut"
|
|
476
476
|
},
|
|
477
477
|
// zoom reset
|
|
478
478
|
{
|
|
479
|
-
keybinding:
|
|
479
|
+
keybinding: O.CtrlCmd | G.Numpad0,
|
|
480
480
|
command: "editor.action.fontZoomReset"
|
|
481
481
|
},
|
|
482
482
|
{
|
|
483
|
-
keybinding:
|
|
483
|
+
keybinding: O.CtrlCmd | G.Digit0,
|
|
484
484
|
command: "editor.action.fontZoomReset"
|
|
485
485
|
}
|
|
486
|
-
],
|
|
487
|
-
|
|
486
|
+
], St = ({ defaultZoom: n }) => (D(() => {
|
|
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: s
|
|
491
491
|
// paths: {
|
|
492
492
|
// vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.41.0/min/vs",
|
|
493
493
|
// },
|
|
494
494
|
});
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
495
|
+
var H = /* @__PURE__ */ ((n) => (n[n.NotSet = -1] = "NotSet", n[n.None = 0] = "None", n[n.Italic = 1] = "Italic", n[n.Bold = 2] = "Bold", n[n.Underline = 4] = "Underline", n[n.Strikethrough = 8] = "Strikethrough", n))(H || {}), ge = /* @__PURE__ */ ((n) => (n[n.None = 0] = "None", n[n.DefaultForeground = 1] = "DefaultForeground", n[n.DefaultBackground = 2] = "DefaultBackground", n))(ge || {}), ce = /* @__PURE__ */ ((n) => (n[n.Other = 0] = "Other", n[n.Comment = 1] = "Comment", n[n.String = 2] = "String", n[n.RegEx = 3] = "RegEx", n))(ce || {});
|
|
496
|
+
class P {
|
|
497
|
+
static getLanguageId(e) {
|
|
498
|
+
return (e & 255) >>> 0;
|
|
499
|
+
}
|
|
500
|
+
static getTokenType(e) {
|
|
501
|
+
return (e & 768) >>> 8;
|
|
502
|
+
}
|
|
503
|
+
static containsBalancedBrackets(e) {
|
|
504
|
+
return (e & 1024) !== 0;
|
|
505
|
+
}
|
|
506
|
+
static getFontStyle(e) {
|
|
507
|
+
return (e & 30720) >>> 11;
|
|
508
|
+
}
|
|
509
|
+
static getForeground(e) {
|
|
510
|
+
return (e & 16744448) >>> 15;
|
|
511
|
+
}
|
|
512
|
+
static getBackground(e) {
|
|
513
|
+
return (e & 4278190080) >>> 24;
|
|
514
|
+
}
|
|
515
|
+
static getClassNameFromMetadata(e) {
|
|
516
|
+
let i = "mtk" + this.getForeground(e);
|
|
517
|
+
const o = this.getFontStyle(e);
|
|
518
|
+
return o & 1 && (i += " mtki"), o & 2 && (i += " mtkb"), o & 4 && (i += " mtku"), o & 8 && (i += " mtks"), i;
|
|
519
|
+
}
|
|
520
|
+
static getInlineStyleFromMetadata(e, t) {
|
|
521
|
+
const i = this.getForeground(e), o = this.getFontStyle(e);
|
|
522
|
+
let l = `color: ${t[i]};`;
|
|
523
|
+
o & 1 && (l += "font-style: italic;"), o & 2 && (l += "font-weight: bold;");
|
|
524
|
+
let r = "";
|
|
525
|
+
return o & 4 && (r += " underline"), o & 8 && (r += " line-through"), r && (l += `text-decoration:${r};`), l;
|
|
526
|
+
}
|
|
527
|
+
static getPresentationFromMetadata(e) {
|
|
528
|
+
const t = this.getForeground(e), i = this.getFontStyle(e);
|
|
529
|
+
return {
|
|
530
|
+
foreground: t,
|
|
531
|
+
italic: !!(i & 1),
|
|
532
|
+
bold: !!(i & 2),
|
|
533
|
+
underline: !!(i & 4),
|
|
534
|
+
strikethrough: !!(i & 8)
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
function Nt(n, e, t, i) {
|
|
539
|
+
const o = t.tokens.data, l = n.getLanguageId();
|
|
540
|
+
let r = 0, I = 0;
|
|
541
|
+
const C = i.lineNumber - 1, h = i.column - 1;
|
|
542
|
+
for (let S = 0; S < o.length; S += 5) {
|
|
543
|
+
const p = o[S], f = o[S + 1], N = o[S + 2], x = o[S + 3], v = o[S + 4], y = r + p, A = p === 0 ? I + f : f;
|
|
544
|
+
if (C === y && A <= h && h < A + N) {
|
|
545
|
+
const m = t.legend.tokenTypes[x] || "not in legend (ignored)", F = [];
|
|
546
|
+
let a = v;
|
|
547
|
+
for (let M = 0; a > 0 && M < t.legend.tokenModifiers.length; M++)
|
|
548
|
+
a & 1 && F.push(t.legend.tokenModifiers[M]), a = a >> 1;
|
|
549
|
+
a > 0 && F.push("not in legend (ignored)");
|
|
550
|
+
const g = new Ge(
|
|
551
|
+
y + 1,
|
|
552
|
+
A + 1,
|
|
553
|
+
y + 1,
|
|
554
|
+
A + 1 + N
|
|
555
|
+
), w = {}, k = e.getColorTheme().tokenColorMap, b = e.getColorTheme().getTokenStyleMetadata(
|
|
556
|
+
m,
|
|
557
|
+
F,
|
|
558
|
+
l,
|
|
516
559
|
!0,
|
|
517
|
-
|
|
560
|
+
w
|
|
518
561
|
);
|
|
519
|
-
let
|
|
520
|
-
return
|
|
562
|
+
let $;
|
|
563
|
+
return b && ($ = {
|
|
521
564
|
languageId: void 0,
|
|
522
|
-
tokenType:
|
|
523
|
-
bold:
|
|
524
|
-
italic:
|
|
525
|
-
underline:
|
|
526
|
-
strikethrough:
|
|
527
|
-
foreground:
|
|
528
|
-
(f == null ? void 0 : f.foreground) || 0
|
|
529
|
-
/* None */
|
|
530
|
-
],
|
|
565
|
+
tokenType: ce.Other,
|
|
566
|
+
bold: b == null ? void 0 : b.bold,
|
|
567
|
+
italic: b == null ? void 0 : b.italic,
|
|
568
|
+
underline: b == null ? void 0 : b.underline,
|
|
569
|
+
strikethrough: b == null ? void 0 : b.strikethrough,
|
|
570
|
+
foreground: k[(b == null ? void 0 : b.foreground) || ge.None],
|
|
531
571
|
background: void 0
|
|
532
|
-
}), { type:
|
|
572
|
+
}), { type: m, modifiers: F, range: g, metadata: $, definitions: w };
|
|
533
573
|
}
|
|
534
|
-
|
|
574
|
+
r = y, I = A;
|
|
535
575
|
}
|
|
536
576
|
return null;
|
|
537
577
|
}
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
578
|
+
function yt(n, e, t) {
|
|
579
|
+
let i = null;
|
|
580
|
+
for (let o = 1; o < t; o++)
|
|
581
|
+
i = e.tokenizeLine(
|
|
582
|
+
n.getLineContent(o),
|
|
583
|
+
i
|
|
584
|
+
).ruleStack;
|
|
585
|
+
return i;
|
|
586
|
+
}
|
|
587
|
+
function xt(n, e, t) {
|
|
588
|
+
const i = n.getColorTheme().tokenColorMap, o = P.getLanguageId(t), l = P.getTokenType(t), r = P.getFontStyle(t), I = P.getForeground(t), C = P.getBackground(t);
|
|
589
|
+
return {
|
|
590
|
+
languageId: e.languageIdCodec.decodeLanguageId(o),
|
|
591
|
+
tokenType: l,
|
|
592
|
+
bold: r & H.Bold ? !0 : void 0,
|
|
593
|
+
italic: r & H.Italic ? !0 : void 0,
|
|
594
|
+
underline: r & H.Underline ? !0 : void 0,
|
|
595
|
+
strikethrough: r & H.Strikethrough ? !0 : void 0,
|
|
596
|
+
foreground: i[I],
|
|
597
|
+
background: i[C]
|
|
598
|
+
};
|
|
599
|
+
}
|
|
600
|
+
function Rt(n, e, t) {
|
|
601
|
+
const i = t.lineNumber, o = n, l = o._tokenizationTextModelPart.grammarTokens._tokenizer.tokenizationSupport._actual._grammar, r = yt(n, l, i), I = l.tokenizeLine(
|
|
602
|
+
n.getLineContent(i),
|
|
603
|
+
r
|
|
604
|
+
), C = l.tokenizeLine2(
|
|
605
|
+
n.getLineContent(i),
|
|
606
|
+
r
|
|
607
|
+
);
|
|
608
|
+
let h = 0;
|
|
609
|
+
for (let p = I.tokens.length - 1; p >= 0; p--) {
|
|
610
|
+
const f = I.tokens[p];
|
|
611
|
+
if (t.column - 1 >= f.startIndex) {
|
|
612
|
+
h = p;
|
|
613
|
+
break;
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
let S = 0;
|
|
617
|
+
for (let p = C.tokens.length >>> 1; p >= 0; p--)
|
|
618
|
+
if (t.column - 1 >= C.tokens[p << 1]) {
|
|
619
|
+
S = p;
|
|
620
|
+
break;
|
|
621
|
+
}
|
|
622
|
+
return {
|
|
623
|
+
token: I.tokens[h],
|
|
624
|
+
metadata: xt(
|
|
625
|
+
e,
|
|
626
|
+
o._languageService,
|
|
627
|
+
C.tokens[(S << 1) + 1]
|
|
628
|
+
)
|
|
629
|
+
};
|
|
630
|
+
}
|
|
631
|
+
const ue = oe(void 0), Nn = ({
|
|
632
|
+
children: n,
|
|
633
|
+
url: e,
|
|
634
|
+
qodly: t,
|
|
542
635
|
defaultZoom: i,
|
|
543
636
|
openHandler: o,
|
|
544
|
-
language:
|
|
545
|
-
defaultInited:
|
|
637
|
+
language: l = "4d",
|
|
638
|
+
defaultInited: r = !1
|
|
546
639
|
}) => {
|
|
547
|
-
const
|
|
640
|
+
const I = Re(), [C, h] = z(r), [S, p] = z(null), f = te(), N = te(0);
|
|
548
641
|
D(() => {
|
|
549
|
-
|
|
550
|
-
}, [
|
|
551
|
-
const
|
|
552
|
-
if (!
|
|
642
|
+
e && I && x();
|
|
643
|
+
}, [e, I]);
|
|
644
|
+
const x = async () => {
|
|
645
|
+
if (!I)
|
|
553
646
|
return;
|
|
554
|
-
const
|
|
647
|
+
const d = new Me({
|
|
555
648
|
enabled: process.env.NODE_ENV === "development",
|
|
556
649
|
debugEnabled: process.env.NODE_ENV === "development"
|
|
557
|
-
}),
|
|
558
|
-
logger:
|
|
650
|
+
}), c = await Ct({
|
|
651
|
+
logger: d
|
|
559
652
|
});
|
|
560
|
-
await
|
|
653
|
+
await Ze({
|
|
561
654
|
caller: "Qodly Code Editor",
|
|
562
|
-
logger:
|
|
563
|
-
serviceConfig:
|
|
564
|
-
}), o &&
|
|
565
|
-
|
|
566
|
-
|
|
655
|
+
logger: d,
|
|
656
|
+
serviceConfig: c
|
|
657
|
+
}), o && st.get(lt).registerCodeEditorOpenHandler(o), I.languages.registerCompletionItemProvider(
|
|
658
|
+
l,
|
|
659
|
+
t ? ht : bt
|
|
567
660
|
);
|
|
568
|
-
const
|
|
569
|
-
|
|
570
|
-
(
|
|
661
|
+
const u = q.getDefaultKeybindings.bind(q);
|
|
662
|
+
q.getDefaultKeybindings = () => u().filter(
|
|
663
|
+
(Z) => ![
|
|
571
664
|
"workbench.action.files.saveAs",
|
|
572
665
|
"workbench.action.files.save"
|
|
573
|
-
].includes(
|
|
574
|
-
),
|
|
575
|
-
},
|
|
576
|
-
|
|
577
|
-
let
|
|
666
|
+
].includes(Z.command)
|
|
667
|
+
), le.addKeybindingRules(vt), v();
|
|
668
|
+
}, v = () => {
|
|
669
|
+
p(null);
|
|
670
|
+
let d;
|
|
578
671
|
try {
|
|
579
|
-
|
|
672
|
+
d = new WebSocket(localStorage.LSP_SERVER || e);
|
|
580
673
|
} catch {
|
|
581
|
-
|
|
674
|
+
p(new Event("INVALID_URL"));
|
|
582
675
|
return;
|
|
583
676
|
}
|
|
584
|
-
|
|
585
|
-
},
|
|
586
|
-
const
|
|
677
|
+
d.onopen = y, d.onclose = A, d.onerror = m, N.current = 0;
|
|
678
|
+
}, y = async function() {
|
|
679
|
+
const d = ze(this), c = new mt(d), u = new ft(d), L = new We({
|
|
587
680
|
name: "4D Language Client",
|
|
588
681
|
clientOptions: {
|
|
589
682
|
workspaceFolder: {
|
|
590
|
-
uri:
|
|
683
|
+
uri: Je.parse("file:///PACKAGE")
|
|
591
684
|
},
|
|
592
685
|
// use a language id as a document selector
|
|
593
|
-
documentSelector: [{ scheme: "file", language:
|
|
686
|
+
documentSelector: [{ scheme: "file", language: l }],
|
|
594
687
|
// disable the default error handler
|
|
595
688
|
errorHandler: {
|
|
596
|
-
error: () => ({ action:
|
|
597
|
-
closed: () => ({ action:
|
|
689
|
+
error: () => ({ action: Ve.Continue }),
|
|
690
|
+
closed: () => ({ action: Pe.DoNotRestart })
|
|
598
691
|
}
|
|
599
692
|
},
|
|
600
693
|
// create a language client connection from the JSON RPC connection on demand
|
|
601
694
|
connectionProvider: {
|
|
602
695
|
get: () => Promise.resolve({
|
|
603
|
-
reader:
|
|
604
|
-
writer:
|
|
696
|
+
reader: c,
|
|
697
|
+
writer: u
|
|
605
698
|
})
|
|
606
699
|
}
|
|
607
700
|
});
|
|
608
|
-
|
|
609
|
-
const
|
|
610
|
-
|
|
611
|
-
return typeof
|
|
612
|
-
|
|
613
|
-
) ? Promise.resolve() :
|
|
614
|
-
},
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
}, 1e3) :
|
|
618
|
-
}),
|
|
619
|
-
},
|
|
620
|
-
},
|
|
621
|
-
|
|
701
|
+
f.current = L;
|
|
702
|
+
const Z = L.sendRequest.bind(L);
|
|
703
|
+
f.current.sendRequest = function(T, V, U) {
|
|
704
|
+
return typeof T == "object" && T.method === "textDocument/diagnostic" && /file:\/\/\/PACKAGE\/Project\/Sources\/Methods\/__Debugger_.*/.test(
|
|
705
|
+
V.textDocument.uri
|
|
706
|
+
) ? Promise.resolve() : Z(T, V, U);
|
|
707
|
+
}, c.onClose(() => {
|
|
708
|
+
L.stop(), N.current < 3 ? setTimeout(() => {
|
|
709
|
+
N.current++, v();
|
|
710
|
+
}, 1e3) : p(new Event("WEBSOCKET_CLOSED"));
|
|
711
|
+
}), L.needsStart() && await L.start(), h(!0);
|
|
712
|
+
}, A = () => {
|
|
713
|
+
}, m = (d) => {
|
|
714
|
+
p(d);
|
|
622
715
|
};
|
|
623
716
|
D(() => {
|
|
624
|
-
const
|
|
625
|
-
switch (
|
|
717
|
+
const d = ke.subscribe(({ action: c, payload: u }) => {
|
|
718
|
+
switch (c) {
|
|
626
719
|
case X.WILL_SAVE:
|
|
627
|
-
|
|
720
|
+
k(u.filePath);
|
|
628
721
|
break;
|
|
629
722
|
case X.DID_SAVE:
|
|
630
|
-
|
|
723
|
+
K(u.filePath, u.content);
|
|
631
724
|
break;
|
|
632
725
|
case X.WILL_CREATE:
|
|
633
|
-
|
|
726
|
+
b(u.filePath);
|
|
634
727
|
break;
|
|
635
728
|
case X.DID_CREATE:
|
|
636
|
-
|
|
729
|
+
fe(u.filePath);
|
|
637
730
|
break;
|
|
638
731
|
case X.WILL_RENAME:
|
|
639
|
-
|
|
732
|
+
$(u.oldPath, u.newPath);
|
|
640
733
|
break;
|
|
641
734
|
case X.DID_RENAME:
|
|
642
|
-
|
|
735
|
+
Ae(u.oldPath, u.newPath);
|
|
643
736
|
break;
|
|
644
737
|
case X.WILL_DELETE:
|
|
645
|
-
|
|
738
|
+
M(u.filePath);
|
|
646
739
|
break;
|
|
647
740
|
case X.DID_DELETE:
|
|
648
|
-
|
|
741
|
+
pe(u.filePath);
|
|
649
742
|
break;
|
|
650
743
|
case X.DIAGNOSTIC_REFRESH:
|
|
651
|
-
|
|
744
|
+
w(u.filePath);
|
|
652
745
|
break;
|
|
653
746
|
}
|
|
654
747
|
});
|
|
655
|
-
return () =>
|
|
748
|
+
return () => d.unsubscribe();
|
|
656
749
|
}, []);
|
|
657
|
-
const
|
|
658
|
-
var
|
|
659
|
-
return (
|
|
660
|
-
(
|
|
661
|
-
var
|
|
662
|
-
return ((
|
|
750
|
+
const F = (d) => {
|
|
751
|
+
var c, u;
|
|
752
|
+
return (u = (c = f.current) == null ? void 0 : c._features) == null ? void 0 : u.find(
|
|
753
|
+
(L) => {
|
|
754
|
+
var Z;
|
|
755
|
+
return ((Z = L._registrationType) == null ? void 0 : Z.method) === d;
|
|
663
756
|
}
|
|
664
757
|
);
|
|
665
|
-
},
|
|
666
|
-
const
|
|
667
|
-
if (
|
|
668
|
-
for (const [
|
|
669
|
-
|
|
670
|
-
return
|
|
671
|
-
},
|
|
672
|
-
var
|
|
673
|
-
const
|
|
674
|
-
|
|
758
|
+
}, a = (d) => {
|
|
759
|
+
const c = [], u = F(d);
|
|
760
|
+
if (u)
|
|
761
|
+
for (const [L, Z] of u._registrations)
|
|
762
|
+
Z.provider && c.push(Z.provider);
|
|
763
|
+
return c;
|
|
764
|
+
}, g = async (d, c, u) => {
|
|
765
|
+
var Z, T, V;
|
|
766
|
+
const L = a(
|
|
767
|
+
rt.method
|
|
675
768
|
);
|
|
676
|
-
if (
|
|
677
|
-
const
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
769
|
+
if (L[0]) {
|
|
770
|
+
const U = new De(), Q = await Promise.resolve(
|
|
771
|
+
L[0].full.provideDocumentSemanticTokens(
|
|
772
|
+
c,
|
|
773
|
+
U.token
|
|
681
774
|
)
|
|
682
|
-
)
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
u._themeService,
|
|
775
|
+
), ee = d, be = Q ? Nt(
|
|
776
|
+
c,
|
|
777
|
+
ee._themeService,
|
|
686
778
|
{
|
|
687
|
-
tokens:
|
|
688
|
-
legend: (
|
|
779
|
+
tokens: Q,
|
|
780
|
+
legend: (V = (T = (Z = f.current) == null ? void 0 : Z._capabilities) == null ? void 0 : T.semanticTokensProvider) == null ? void 0 : V.legend
|
|
689
781
|
},
|
|
690
|
-
|
|
691
|
-
);
|
|
782
|
+
u
|
|
783
|
+
) : null, he = Rt(c, ee._themeService, u);
|
|
784
|
+
return {
|
|
785
|
+
semanticTokenInfo: be,
|
|
786
|
+
textmateTokenInfo: he
|
|
787
|
+
};
|
|
692
788
|
}
|
|
693
789
|
return null;
|
|
694
|
-
},
|
|
695
|
-
if (
|
|
696
|
-
const
|
|
697
|
-
|
|
790
|
+
}, w = (d) => {
|
|
791
|
+
if (f.current) {
|
|
792
|
+
const c = a(
|
|
793
|
+
$e.method
|
|
698
794
|
);
|
|
699
|
-
for (const
|
|
700
|
-
|
|
795
|
+
for (const u of c)
|
|
796
|
+
u.onDidChangeDiagnosticsEmitter.fire();
|
|
701
797
|
}
|
|
702
|
-
},
|
|
703
|
-
var
|
|
704
|
-
(
|
|
798
|
+
}, k = (d, c = Ue.Manual) => {
|
|
799
|
+
var u;
|
|
800
|
+
(u = f.current) == null || u.sendNotification(_e.type, {
|
|
705
801
|
textDocument: {
|
|
706
|
-
uri: j(
|
|
802
|
+
uri: j(d)
|
|
707
803
|
},
|
|
708
|
-
reason:
|
|
804
|
+
reason: c
|
|
709
805
|
});
|
|
710
|
-
},
|
|
711
|
-
var
|
|
712
|
-
(
|
|
806
|
+
}, K = (d, c) => {
|
|
807
|
+
var u;
|
|
808
|
+
(u = f.current) == null || u.sendNotification(qe.type, {
|
|
713
809
|
textDocument: {
|
|
714
|
-
uri: j(
|
|
810
|
+
uri: j(d)
|
|
715
811
|
},
|
|
716
|
-
text:
|
|
812
|
+
text: c
|
|
717
813
|
});
|
|
718
|
-
},
|
|
719
|
-
var
|
|
720
|
-
(
|
|
814
|
+
}, b = (d) => {
|
|
815
|
+
var c;
|
|
816
|
+
(c = f.current) == null || c.sendRequest(Qe.type, {
|
|
721
817
|
files: [
|
|
722
818
|
{
|
|
723
|
-
uri: j(
|
|
819
|
+
uri: j(d)
|
|
724
820
|
}
|
|
725
821
|
]
|
|
726
822
|
});
|
|
727
|
-
},
|
|
728
|
-
var
|
|
729
|
-
(
|
|
823
|
+
}, $ = (d, c) => {
|
|
824
|
+
var u;
|
|
825
|
+
(u = f.current) == null || u.sendRequest(et.type, {
|
|
730
826
|
files: [
|
|
731
827
|
{
|
|
732
|
-
oldUri: j(
|
|
733
|
-
newUri: j(
|
|
828
|
+
oldUri: j(d),
|
|
829
|
+
newUri: j(c)
|
|
734
830
|
}
|
|
735
831
|
]
|
|
736
832
|
});
|
|
737
|
-
},
|
|
738
|
-
var
|
|
739
|
-
(
|
|
833
|
+
}, M = (d) => {
|
|
834
|
+
var c;
|
|
835
|
+
(c = f.current) == null || c.sendRequest(tt.type, {
|
|
740
836
|
files: [
|
|
741
837
|
{
|
|
742
|
-
uri: j(
|
|
838
|
+
uri: j(d)
|
|
743
839
|
}
|
|
744
840
|
]
|
|
745
841
|
});
|
|
746
|
-
},
|
|
747
|
-
var
|
|
748
|
-
(
|
|
842
|
+
}, fe = (d) => {
|
|
843
|
+
var c;
|
|
844
|
+
(c = f.current) == null || c.sendNotification(nt.type, {
|
|
749
845
|
files: [
|
|
750
846
|
{
|
|
751
|
-
uri: j(
|
|
847
|
+
uri: j(d)
|
|
752
848
|
}
|
|
753
849
|
]
|
|
754
850
|
});
|
|
755
|
-
},
|
|
756
|
-
var
|
|
757
|
-
(
|
|
851
|
+
}, Ae = (d, c) => {
|
|
852
|
+
var u;
|
|
853
|
+
(u = f.current) == null || u.sendNotification(it.type, {
|
|
758
854
|
files: [
|
|
759
855
|
{
|
|
760
|
-
oldUri: j(
|
|
761
|
-
newUri: j(
|
|
856
|
+
oldUri: j(d),
|
|
857
|
+
newUri: j(c)
|
|
762
858
|
}
|
|
763
859
|
]
|
|
764
860
|
});
|
|
765
|
-
},
|
|
766
|
-
var
|
|
767
|
-
(
|
|
861
|
+
}, pe = (d) => {
|
|
862
|
+
var c;
|
|
863
|
+
(c = f.current) == null || c.sendNotification(ot.type, {
|
|
768
864
|
files: [
|
|
769
865
|
{
|
|
770
|
-
uri: j(
|
|
866
|
+
uri: j(d)
|
|
771
867
|
}
|
|
772
868
|
]
|
|
773
869
|
});
|
|
774
870
|
};
|
|
775
871
|
return /* @__PURE__ */ J(
|
|
776
|
-
|
|
872
|
+
ue.Provider,
|
|
777
873
|
{
|
|
778
874
|
value: {
|
|
779
|
-
inited:
|
|
780
|
-
clientRef:
|
|
781
|
-
lastError:
|
|
782
|
-
reload:
|
|
783
|
-
getTokenAtPosition:
|
|
875
|
+
inited: C || !!S,
|
|
876
|
+
clientRef: f,
|
|
877
|
+
lastError: S,
|
|
878
|
+
reload: v,
|
|
879
|
+
getTokenAtPosition: g
|
|
784
880
|
},
|
|
785
881
|
children: [
|
|
786
|
-
|
|
787
|
-
/* @__PURE__ */ R(
|
|
882
|
+
n,
|
|
883
|
+
/* @__PURE__ */ R(St, { defaultZoom: i })
|
|
788
884
|
]
|
|
789
885
|
}
|
|
790
886
|
);
|
|
791
887
|
};
|
|
792
|
-
function
|
|
793
|
-
const
|
|
794
|
-
if (
|
|
888
|
+
function yn() {
|
|
889
|
+
const n = re(ue);
|
|
890
|
+
if (n === void 0)
|
|
795
891
|
throw new Error("useLSP must be used within an LSPContext");
|
|
796
|
-
return
|
|
892
|
+
return n;
|
|
797
893
|
}
|
|
798
|
-
const
|
|
894
|
+
const de = oe(
|
|
799
895
|
void 0
|
|
800
|
-
),
|
|
801
|
-
const [
|
|
896
|
+
), xn = ye(({ children: n }) => {
|
|
897
|
+
const [e, t] = z(null);
|
|
802
898
|
return /* @__PURE__ */ R(
|
|
803
|
-
|
|
899
|
+
de.Provider,
|
|
804
900
|
{
|
|
805
901
|
value: {
|
|
806
|
-
editor:
|
|
807
|
-
setEditor:
|
|
902
|
+
editor: e,
|
|
903
|
+
setEditor: t
|
|
808
904
|
},
|
|
809
|
-
children:
|
|
905
|
+
children: n
|
|
810
906
|
}
|
|
811
907
|
);
|
|
812
908
|
});
|
|
813
|
-
function
|
|
814
|
-
const
|
|
815
|
-
if (
|
|
816
|
-
const [
|
|
909
|
+
function wt() {
|
|
910
|
+
const n = re(de), e = z(null);
|
|
911
|
+
if (n === void 0) {
|
|
912
|
+
const [t, i] = e;
|
|
817
913
|
return {
|
|
818
|
-
editor:
|
|
914
|
+
editor: t,
|
|
819
915
|
setEditor: i
|
|
820
916
|
};
|
|
821
917
|
}
|
|
822
|
-
return
|
|
918
|
+
return n;
|
|
823
919
|
}
|
|
824
|
-
var
|
|
920
|
+
var Ie = {
|
|
825
921
|
color: void 0,
|
|
826
922
|
size: void 0,
|
|
827
923
|
className: void 0,
|
|
828
924
|
style: void 0,
|
|
829
925
|
attr: void 0
|
|
830
|
-
},
|
|
831
|
-
return
|
|
832
|
-
for (var
|
|
833
|
-
|
|
834
|
-
for (var o in
|
|
835
|
-
Object.prototype.hasOwnProperty.call(
|
|
926
|
+
}, ne = E.createContext && E.createContext(Ie), B = globalThis && globalThis.__assign || function() {
|
|
927
|
+
return B = Object.assign || function(n) {
|
|
928
|
+
for (var e, t = 1, i = arguments.length; t < i; t++) {
|
|
929
|
+
e = arguments[t];
|
|
930
|
+
for (var o in e)
|
|
931
|
+
Object.prototype.hasOwnProperty.call(e, o) && (n[o] = e[o]);
|
|
836
932
|
}
|
|
837
|
-
return
|
|
838
|
-
},
|
|
839
|
-
},
|
|
840
|
-
var
|
|
841
|
-
for (var i in
|
|
842
|
-
Object.prototype.hasOwnProperty.call(
|
|
843
|
-
if (
|
|
844
|
-
for (var o = 0, i = Object.getOwnPropertySymbols(
|
|
845
|
-
|
|
846
|
-
return
|
|
933
|
+
return n;
|
|
934
|
+
}, B.apply(this, arguments);
|
|
935
|
+
}, kt = globalThis && globalThis.__rest || function(n, e) {
|
|
936
|
+
var t = {};
|
|
937
|
+
for (var i in n)
|
|
938
|
+
Object.prototype.hasOwnProperty.call(n, i) && e.indexOf(i) < 0 && (t[i] = n[i]);
|
|
939
|
+
if (n != null && typeof Object.getOwnPropertySymbols == "function")
|
|
940
|
+
for (var o = 0, i = Object.getOwnPropertySymbols(n); o < i.length; o++)
|
|
941
|
+
e.indexOf(i[o]) < 0 && Object.prototype.propertyIsEnumerable.call(n, i[o]) && (t[i[o]] = n[i[o]]);
|
|
942
|
+
return t;
|
|
847
943
|
};
|
|
848
|
-
function
|
|
849
|
-
return
|
|
850
|
-
return
|
|
851
|
-
key:
|
|
852
|
-
},
|
|
944
|
+
function Ce(n) {
|
|
945
|
+
return n && n.map(function(e, t) {
|
|
946
|
+
return E.createElement(e.tag, B({
|
|
947
|
+
key: t
|
|
948
|
+
}, e.attr), Ce(e.child));
|
|
853
949
|
});
|
|
854
950
|
}
|
|
855
|
-
function
|
|
856
|
-
return function(
|
|
857
|
-
return
|
|
858
|
-
attr:
|
|
859
|
-
},
|
|
951
|
+
function me(n) {
|
|
952
|
+
return function(e) {
|
|
953
|
+
return E.createElement(Lt, B({
|
|
954
|
+
attr: B({}, n.attr)
|
|
955
|
+
}, e), Ce(n.child));
|
|
860
956
|
};
|
|
861
957
|
}
|
|
862
|
-
function
|
|
863
|
-
var
|
|
864
|
-
var i =
|
|
865
|
-
return
|
|
958
|
+
function Lt(n) {
|
|
959
|
+
var e = function(t) {
|
|
960
|
+
var i = n.attr, o = n.size, l = n.title, r = kt(n, ["attr", "size", "title"]), I = o || t.size || "1em", C;
|
|
961
|
+
return t.className && (C = t.className), n.className && (C = (C ? C + " " : "") + n.className), E.createElement("svg", B({
|
|
866
962
|
stroke: "currentColor",
|
|
867
963
|
fill: "currentColor",
|
|
868
964
|
strokeWidth: "0"
|
|
869
|
-
},
|
|
870
|
-
className:
|
|
871
|
-
style:
|
|
872
|
-
color:
|
|
873
|
-
},
|
|
874
|
-
height:
|
|
875
|
-
width:
|
|
965
|
+
}, t.attr, i, r, {
|
|
966
|
+
className: C,
|
|
967
|
+
style: B(B({
|
|
968
|
+
color: n.color || t.color
|
|
969
|
+
}, t.style), n.style),
|
|
970
|
+
height: I,
|
|
971
|
+
width: I,
|
|
876
972
|
xmlns: "http://www.w3.org/2000/svg"
|
|
877
|
-
}),
|
|
973
|
+
}), l && E.createElement("title", null, l), n.children);
|
|
878
974
|
};
|
|
879
|
-
return
|
|
880
|
-
return
|
|
881
|
-
}) :
|
|
975
|
+
return ne !== void 0 ? E.createElement(ne.Consumer, null, function(t) {
|
|
976
|
+
return e(t);
|
|
977
|
+
}) : e(Ie);
|
|
882
978
|
}
|
|
883
|
-
function
|
|
884
|
-
return
|
|
979
|
+
function Wt(n) {
|
|
980
|
+
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);
|
|
885
981
|
}
|
|
886
|
-
function
|
|
887
|
-
return
|
|
982
|
+
function Ft(n) {
|
|
983
|
+
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);
|
|
888
984
|
}
|
|
889
|
-
const
|
|
890
|
-
const [
|
|
891
|
-
|
|
892
|
-
},
|
|
985
|
+
const Zt = ({ lspProps: { lastError: n, reload: e } }) => {
|
|
986
|
+
const [t, i] = z(!1), o = () => {
|
|
987
|
+
e();
|
|
988
|
+
}, l = () => {
|
|
893
989
|
i(!1);
|
|
894
990
|
};
|
|
895
991
|
return D(() => {
|
|
896
|
-
i(!!
|
|
897
|
-
}, [
|
|
992
|
+
i(!!n);
|
|
993
|
+
}, [n]), t ? /* @__PURE__ */ J("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: [
|
|
898
994
|
/* @__PURE__ */ J("span", { className: "flex flex-1 justify-center gap-1", children: [
|
|
899
|
-
/* @__PURE__ */ R(
|
|
995
|
+
/* @__PURE__ */ R(Ft, { className: "h-4 w-4 text-yellow-600" }),
|
|
900
996
|
/* @__PURE__ */ J("span", { children: [
|
|
901
997
|
"LSP not loaded.",
|
|
902
998
|
" ",
|
|
@@ -911,27 +1007,27 @@ const yn = ({ lspProps: { lastError: t, reload: n } }) => {
|
|
|
911
1007
|
] })
|
|
912
1008
|
] }),
|
|
913
1009
|
/* @__PURE__ */ R("button", { className: "focus:outline-none", children: /* @__PURE__ */ R(
|
|
914
|
-
|
|
1010
|
+
Wt,
|
|
915
1011
|
{
|
|
916
1012
|
className: "h-4 w-4 text-white",
|
|
917
|
-
onClick:
|
|
1013
|
+
onClick: l
|
|
918
1014
|
}
|
|
919
1015
|
) })
|
|
920
1016
|
] }) : null;
|
|
921
|
-
},
|
|
922
|
-
provideCompletionItems: (
|
|
923
|
-
const
|
|
1017
|
+
}, jt = {
|
|
1018
|
+
provideCompletionItems: (n, e) => {
|
|
1019
|
+
const t = n.getWordUntilPosition(e);
|
|
924
1020
|
return {
|
|
925
1021
|
suggestions: [
|
|
926
1022
|
{
|
|
927
1023
|
label: "device:xs",
|
|
928
|
-
kind:
|
|
1024
|
+
kind: s.languages.CompletionItemKind.Snippet,
|
|
929
1025
|
documentation: "Media query for phone device",
|
|
930
|
-
range: new
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
1026
|
+
range: new s.Range(
|
|
1027
|
+
e.lineNumber,
|
|
1028
|
+
t.startColumn,
|
|
1029
|
+
e.lineNumber,
|
|
1030
|
+
t.endColumn
|
|
935
1031
|
),
|
|
936
1032
|
insertText: [
|
|
937
1033
|
"@media screen and (max-width: ${1:365px}) {",
|
|
@@ -941,12 +1037,12 @@ const yn = ({ lspProps: { lastError: t, reload: n } }) => {
|
|
|
941
1037
|
"}"
|
|
942
1038
|
].join(`
|
|
943
1039
|
`),
|
|
944
|
-
insertTextRules:
|
|
1040
|
+
insertTextRules: s.languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
945
1041
|
}
|
|
946
1042
|
]
|
|
947
1043
|
};
|
|
948
1044
|
}
|
|
949
|
-
},
|
|
1045
|
+
}, Xt = "#/definitions/Condition", Bt = {
|
|
950
1046
|
Base: {
|
|
951
1047
|
type: "object",
|
|
952
1048
|
properties: {
|
|
@@ -1214,114 +1310,114 @@ const yn = ({ lspProps: { lastError: t, reload: n } }) => {
|
|
|
1214
1310
|
"ref"
|
|
1215
1311
|
]
|
|
1216
1312
|
}
|
|
1217
|
-
},
|
|
1218
|
-
$ref:
|
|
1219
|
-
definitions:
|
|
1313
|
+
}, Kt = {
|
|
1314
|
+
$ref: Xt,
|
|
1315
|
+
definitions: Bt
|
|
1220
1316
|
};
|
|
1221
|
-
function
|
|
1222
|
-
const
|
|
1223
|
-
|
|
1317
|
+
function Et(n, e) {
|
|
1318
|
+
const t = document.createElement("style");
|
|
1319
|
+
t.dataset.id = e, t.textContent = n, document.head.append(t);
|
|
1224
1320
|
}
|
|
1225
|
-
function
|
|
1321
|
+
function Tt(n) {
|
|
1226
1322
|
return Array.from(document.styleSheets).find(
|
|
1227
|
-
(
|
|
1323
|
+
(e) => e.ownerNode.getAttribute("data-id") === n
|
|
1228
1324
|
);
|
|
1229
1325
|
}
|
|
1230
|
-
function
|
|
1231
|
-
const
|
|
1326
|
+
function Ot(n, e) {
|
|
1327
|
+
const t = [];
|
|
1232
1328
|
let i = [];
|
|
1233
|
-
const o = [],
|
|
1234
|
-
|
|
1235
|
-
startLineNumber:
|
|
1236
|
-
endLineNumber:
|
|
1237
|
-
startColumn:
|
|
1238
|
-
endColumn:
|
|
1239
|
-
}),
|
|
1240
|
-
},
|
|
1241
|
-
o.indexOf(
|
|
1242
|
-
},
|
|
1243
|
-
const
|
|
1244
|
-
|
|
1245
|
-
},
|
|
1246
|
-
for (const
|
|
1329
|
+
const o = [], l = (a, g, w, k) => {
|
|
1330
|
+
t.push({
|
|
1331
|
+
startLineNumber: a,
|
|
1332
|
+
endLineNumber: w,
|
|
1333
|
+
startColumn: g,
|
|
1334
|
+
endColumn: k
|
|
1335
|
+
}), h(), C();
|
|
1336
|
+
}, r = (a) => {
|
|
1337
|
+
o.indexOf(a) < 0 && o.push(a);
|
|
1338
|
+
}, I = (a) => {
|
|
1339
|
+
const g = o.indexOf(a);
|
|
1340
|
+
g < 0 || o.splice(g, 1);
|
|
1341
|
+
}, C = () => {
|
|
1342
|
+
for (const a of o)
|
|
1247
1343
|
try {
|
|
1248
|
-
|
|
1249
|
-
} catch (
|
|
1250
|
-
console.error(
|
|
1344
|
+
a(i);
|
|
1345
|
+
} catch (g) {
|
|
1346
|
+
console.error(g);
|
|
1251
1347
|
}
|
|
1252
|
-
},
|
|
1253
|
-
const
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
lineNumber:
|
|
1258
|
-
column:
|
|
1348
|
+
}, h = () => {
|
|
1349
|
+
const a = n.getModel();
|
|
1350
|
+
a && (i = Jt(
|
|
1351
|
+
t.map((g) => [
|
|
1352
|
+
a.getOffsetAt({
|
|
1353
|
+
lineNumber: g.startLineNumber,
|
|
1354
|
+
column: g.startColumn
|
|
1259
1355
|
}),
|
|
1260
|
-
|
|
1261
|
-
lineNumber:
|
|
1262
|
-
column:
|
|
1356
|
+
a.getOffsetAt({
|
|
1357
|
+
lineNumber: g.endLineNumber,
|
|
1358
|
+
column: g.endColumn
|
|
1263
1359
|
})
|
|
1264
1360
|
]),
|
|
1265
1361
|
/*mergeJoins*/
|
|
1266
1362
|
!0
|
|
1267
|
-
), i.length > 0 && (i[0][0] <= 0 && (i[0][0] = Number.NEGATIVE_INFINITY), i[i.length - 1][1] >=
|
|
1268
|
-
},
|
|
1269
|
-
const
|
|
1363
|
+
), i.length > 0 && (i[0][0] <= 0 && (i[0][0] = Number.NEGATIVE_INFINITY), i[i.length - 1][1] >= a.getValueLength() && (i[i.length - 1][1] = Number.POSITIVE_INFINITY)));
|
|
1364
|
+
}, S = (a) => {
|
|
1365
|
+
const g = {
|
|
1270
1366
|
isDeletion: !1,
|
|
1271
1367
|
isAddition: !1,
|
|
1272
1368
|
isReplacement: !1
|
|
1273
1369
|
};
|
|
1274
|
-
return
|
|
1275
|
-
},
|
|
1276
|
-
|
|
1277
|
-
}),
|
|
1278
|
-
if (!
|
|
1279
|
-
for (const
|
|
1280
|
-
const
|
|
1281
|
-
if (
|
|
1282
|
-
const
|
|
1283
|
-
(
|
|
1284
|
-
),
|
|
1285
|
-
if (
|
|
1286
|
-
const
|
|
1287
|
-
if (
|
|
1288
|
-
|
|
1370
|
+
return a.text === "" ? g.isDeletion = !0 : a.range.startLineNumber === a.range.endLineNumber && a.range.startColumn === a.range.endColumn ? g.isAddition = !0 : g.isReplacement = !0, g;
|
|
1371
|
+
}, p = n.onDidChangeModel((a) => {
|
|
1372
|
+
h(), m();
|
|
1373
|
+
}), f = n.onDidChangeModelContent((a) => {
|
|
1374
|
+
if (!a.isUndoing)
|
|
1375
|
+
for (const g of a.changes) {
|
|
1376
|
+
const w = S(g);
|
|
1377
|
+
if (w.isReplacement || w.isDeletion || w.isAddition) {
|
|
1378
|
+
const k = t.some(
|
|
1379
|
+
(b) => g.range.startLineNumber >= b.startLineNumber && g.range.endLineNumber <= b.endLineNumber && g.range.startColumn >= b.startColumn && g.range.endColumn <= b.endColumn
|
|
1380
|
+
), K = !k && e && g.range.startLineNumber === 1 && g.range.startColumn === 1 && !se(g.text);
|
|
1381
|
+
if (k || K) {
|
|
1382
|
+
const b = n.getModel();
|
|
1383
|
+
if (b) {
|
|
1384
|
+
b.undo();
|
|
1289
1385
|
return;
|
|
1290
1386
|
}
|
|
1291
1387
|
}
|
|
1292
1388
|
}
|
|
1293
1389
|
}
|
|
1294
|
-
}),
|
|
1295
|
-
|
|
1390
|
+
}), N = () => {
|
|
1391
|
+
p.dispose(), f.dispose();
|
|
1296
1392
|
};
|
|
1297
|
-
let
|
|
1393
|
+
let x = [], v = `
|
|
1298
1394
|
.idoc-readonly-mark {
|
|
1299
1395
|
cursor: not-allowed;
|
|
1300
1396
|
z-index: 1;
|
|
1301
1397
|
}
|
|
1302
1398
|
`;
|
|
1303
|
-
if (
|
|
1304
|
-
const
|
|
1305
|
-
|
|
1399
|
+
if (v) {
|
|
1400
|
+
const a = "monaco-read-only";
|
|
1401
|
+
Tt(a) || Et(v, a), v = null;
|
|
1306
1402
|
}
|
|
1307
|
-
const
|
|
1308
|
-
|
|
1309
|
-
},
|
|
1310
|
-
m
|
|
1311
|
-
},
|
|
1312
|
-
const
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
i.map(
|
|
1403
|
+
const y = () => {
|
|
1404
|
+
r(m), m();
|
|
1405
|
+
}, A = () => {
|
|
1406
|
+
I(m), x = n.deltaDecorations(x, []);
|
|
1407
|
+
}, m = () => {
|
|
1408
|
+
const a = n.getModel();
|
|
1409
|
+
a && (x = n.deltaDecorations(
|
|
1410
|
+
x,
|
|
1411
|
+
i.map(F(a))
|
|
1316
1412
|
));
|
|
1317
|
-
},
|
|
1318
|
-
const
|
|
1413
|
+
}, F = (a) => (g) => {
|
|
1414
|
+
const w = a.getPositionAt(g[0]), k = a.getPositionAt(g[1]);
|
|
1319
1415
|
return {
|
|
1320
|
-
range: new
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1416
|
+
range: new s.Range(
|
|
1417
|
+
w.lineNumber,
|
|
1418
|
+
w.column,
|
|
1419
|
+
k.lineNumber,
|
|
1420
|
+
k.column
|
|
1325
1421
|
),
|
|
1326
1422
|
options: {
|
|
1327
1423
|
className: "idoc-readonly-mark"
|
|
@@ -1332,117 +1428,117 @@ function Fn(t, n) {
|
|
|
1332
1428
|
get buffer() {
|
|
1333
1429
|
return i;
|
|
1334
1430
|
},
|
|
1335
|
-
exclude:
|
|
1336
|
-
attach:
|
|
1337
|
-
detach:
|
|
1338
|
-
dispose:
|
|
1339
|
-
show:
|
|
1340
|
-
hide:
|
|
1431
|
+
exclude: l,
|
|
1432
|
+
attach: r,
|
|
1433
|
+
detach: I,
|
|
1434
|
+
dispose: N,
|
|
1435
|
+
show: y,
|
|
1436
|
+
hide: A
|
|
1341
1437
|
};
|
|
1342
1438
|
}
|
|
1343
|
-
function
|
|
1439
|
+
function Gt(n, e, t) {
|
|
1344
1440
|
let i = !1;
|
|
1345
|
-
const o = (
|
|
1346
|
-
let
|
|
1347
|
-
const
|
|
1348
|
-
let
|
|
1349
|
-
|
|
1350
|
-
for (
|
|
1351
|
-
for (
|
|
1352
|
-
if (
|
|
1353
|
-
|
|
1354
|
-
[
|
|
1355
|
-
[
|
|
1441
|
+
const o = (A) => A[1] < A[0] ? (i = !0, [[A[1], A[0]]]) : [[...A]], l = (A) => i ? A.map((m) => m[1] > m[0] ? I(m) : m).reverse() : A;
|
|
1442
|
+
let r;
|
|
1443
|
+
const I = (A) => (r = A[1], A[1] = A[0], A[0] = r, A), C = o(n);
|
|
1444
|
+
let h, S, p, f, N, x, v, y;
|
|
1445
|
+
p = C[0];
|
|
1446
|
+
for (S of e)
|
|
1447
|
+
for (v = S[0], y = S[1], f = 0; f < C.length; f++) {
|
|
1448
|
+
if (p = C[f], N = p[0], x = p[1], N < v)
|
|
1449
|
+
x < v ? h = [p] : x <= y ? h = [[N, v - 1]] : h = [
|
|
1450
|
+
[N, v - 1],
|
|
1451
|
+
[y + 1, x]
|
|
1356
1452
|
];
|
|
1357
|
-
else if (
|
|
1358
|
-
if (
|
|
1359
|
-
const
|
|
1360
|
-
|
|
1453
|
+
else if (N <= y)
|
|
1454
|
+
if (v === Number.NEGATIVE_INFINITY) {
|
|
1455
|
+
const A = y + 1;
|
|
1456
|
+
h = t === 0 ? [] : [[A, x > A ? x : A]];
|
|
1361
1457
|
} else
|
|
1362
|
-
|
|
1458
|
+
y === Number.POSITIVE_INFINITY ? h = t === 0 ? [] : [[v - 1, v - 1]] : x <= y ? h = t < 0 ? [[v - 1, v - 1]] : t > 0 ? [[y + 1, y + 1]] : [] : h = [[y + 1, x]];
|
|
1363
1459
|
else
|
|
1364
|
-
|
|
1365
|
-
if (
|
|
1366
|
-
return
|
|
1460
|
+
h = [p];
|
|
1461
|
+
if (C.splice(f, 1, ...h), C.length === 1 && C[0][1] < v)
|
|
1462
|
+
return l(C);
|
|
1367
1463
|
}
|
|
1368
|
-
return
|
|
1464
|
+
return l(C);
|
|
1369
1465
|
}
|
|
1370
|
-
function
|
|
1371
|
-
if (
|
|
1372
|
-
return
|
|
1373
|
-
const
|
|
1374
|
-
let i = null, o,
|
|
1375
|
-
|
|
1376
|
-
(
|
|
1377
|
-
).sort((
|
|
1378
|
-
for (let
|
|
1379
|
-
i =
|
|
1380
|
-
return
|
|
1466
|
+
function Jt(n, e) {
|
|
1467
|
+
if (n.length < 2)
|
|
1468
|
+
return n;
|
|
1469
|
+
const t = [];
|
|
1470
|
+
let i = null, o, l;
|
|
1471
|
+
n = n.map(
|
|
1472
|
+
(r) => (r[1] < r[0] && (o = r[1], r[1] = r[0], r[1] = o), r)
|
|
1473
|
+
).sort((r, I) => r[0] - I[0]), t.push(n[0]);
|
|
1474
|
+
for (let r = 1; r < n.length; r++)
|
|
1475
|
+
i = t[t.length - 1], l = n[r], i[1] === l[0] && !e ? t.push(l) : i[1] === l[0] - 1 && e ? (i[1] = l[1], t.splice(t.length - 1, 1, i)) : i[1] < l[0] ? t.push(l) : i[1] < l[1] && (i[1] = l[1], t.splice(t.length - 1, 1, i));
|
|
1476
|
+
return t;
|
|
1381
1477
|
}
|
|
1382
|
-
function
|
|
1383
|
-
return
|
|
1478
|
+
function Y(n, e) {
|
|
1479
|
+
return e.bind(n);
|
|
1384
1480
|
}
|
|
1385
|
-
class
|
|
1386
|
-
constructor(
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1481
|
+
class Dt {
|
|
1482
|
+
constructor(e, t) {
|
|
1483
|
+
W(this, "editor");
|
|
1484
|
+
W(this, "intervals");
|
|
1485
|
+
W(this, "disposables", []);
|
|
1390
1486
|
/**
|
|
1391
1487
|
* Flag for `excludeIntervals`
|
|
1392
1488
|
*/
|
|
1393
|
-
|
|
1394
|
-
|
|
1489
|
+
W(this, "prefer", 1);
|
|
1490
|
+
W(this, "lastPrefer", 1);
|
|
1395
1491
|
/**
|
|
1396
1492
|
* Linked to ICodeEditor.onDidChangeCursorPosition event.
|
|
1397
1493
|
*/
|
|
1398
|
-
|
|
1494
|
+
W(this, "onCursor", Y(
|
|
1399
1495
|
this,
|
|
1400
|
-
function(
|
|
1401
|
-
if (
|
|
1496
|
+
function(e) {
|
|
1497
|
+
if (e.source === "api")
|
|
1402
1498
|
return;
|
|
1403
|
-
const
|
|
1404
|
-
|
|
1499
|
+
const t = this.getApprovedSelections();
|
|
1500
|
+
t.length !== 0 && this.editor.setSelections(t);
|
|
1405
1501
|
}
|
|
1406
1502
|
));
|
|
1407
|
-
|
|
1408
|
-
|
|
1503
|
+
W(this, "onRectangleSelectionStart", Y(this, function({ event: e }) {
|
|
1504
|
+
e.middleButton && (this.lastPrefer = this.prefer, this.prefer = 0, window.addEventListener("pointerup", this.onRectangleSelectionStop));
|
|
1409
1505
|
}));
|
|
1410
|
-
|
|
1506
|
+
W(this, "onRectangleSelectionStop", Y(this, function() {
|
|
1411
1507
|
this.prefer = this.lastPrefer, window.removeEventListener("pointerup", this.onRectangleSelectionStop);
|
|
1412
1508
|
}));
|
|
1413
1509
|
/**
|
|
1414
1510
|
* Linked to ICodeEditor.onKeyDown event.
|
|
1415
1511
|
*/
|
|
1416
|
-
|
|
1417
|
-
const
|
|
1418
|
-
if (
|
|
1512
|
+
W(this, "onKey", Y(this, function(e) {
|
|
1513
|
+
const t = e.keyCode, i = s.KeyCode;
|
|
1514
|
+
if (e.altKey || i.F1 <= t && t <= i.F19 || e.ctrlKey && t !== i.Backspace)
|
|
1419
1515
|
return;
|
|
1420
|
-
if (
|
|
1516
|
+
if (t === i.UpArrow || t === i.LeftArrow || t === i.Home || t === i.PageUp) {
|
|
1421
1517
|
this.prefer = -1;
|
|
1422
1518
|
return;
|
|
1423
1519
|
}
|
|
1424
|
-
if (
|
|
1520
|
+
if (t === i.DownArrow || t === i.RightArrow || t === i.End || t === i.PageDown) {
|
|
1425
1521
|
this.prefer = 1;
|
|
1426
1522
|
return;
|
|
1427
1523
|
}
|
|
1428
|
-
const o = this.getSelections(),
|
|
1429
|
-
let
|
|
1430
|
-
if (
|
|
1431
|
-
|
|
1432
|
-
else if (
|
|
1433
|
-
|
|
1524
|
+
const o = this.getSelections(), l = this.intervals.buffer;
|
|
1525
|
+
let r;
|
|
1526
|
+
if (t === i.Delete)
|
|
1527
|
+
r = (I) => I[0] === I[1] && l.find((C) => I[1] + 1 === C[0]) != null;
|
|
1528
|
+
else if (t === i.Backspace)
|
|
1529
|
+
r = (I) => I[0] === I[1] && l.find((C) => C[1] + 1 === I[0]) != null;
|
|
1434
1530
|
else
|
|
1435
1531
|
return;
|
|
1436
|
-
o.findIndex(
|
|
1532
|
+
o.findIndex(r) !== -1 && (e.stopPropagation(), e.preventDefault());
|
|
1437
1533
|
}));
|
|
1438
|
-
|
|
1439
|
-
let
|
|
1534
|
+
W(this, "getOffsetAt", Y(this, function(e) {
|
|
1535
|
+
let t;
|
|
1440
1536
|
for (let i = 0; i < this.intervals.buffer.length; i++)
|
|
1441
|
-
if (
|
|
1442
|
-
return
|
|
1537
|
+
if (t = this.intervals.buffer[i], e <= t[1])
|
|
1538
|
+
return t[0] - e < e - t[1] ? t[0] : t[1];
|
|
1443
1539
|
}));
|
|
1444
1540
|
var i;
|
|
1445
|
-
this.editor =
|
|
1541
|
+
this.editor = e, this.intervals = Ot(e, t), (i = this.editor.getModel()) == null || i.setEOL(s.editor.EndOfLineSequence.LF);
|
|
1446
1542
|
}
|
|
1447
1543
|
enable() {
|
|
1448
1544
|
this.disposables.push(
|
|
@@ -1452,140 +1548,140 @@ class jn {
|
|
|
1452
1548
|
), this.intervals.show();
|
|
1453
1549
|
}
|
|
1454
1550
|
dispose() {
|
|
1455
|
-
for (const
|
|
1456
|
-
|
|
1551
|
+
for (const e of this.disposables)
|
|
1552
|
+
e.dispose();
|
|
1457
1553
|
this.disposables.splice(0);
|
|
1458
1554
|
}
|
|
1459
|
-
exclude(
|
|
1460
|
-
arguments.length === 1 ? this.intervals.exclude(
|
|
1555
|
+
exclude(e, t, i, o) {
|
|
1556
|
+
arguments.length === 1 ? this.intervals.exclude(e, 0, e, Number.MAX_SAFE_INTEGER) : this.intervals.exclude(e, t, i, o);
|
|
1461
1557
|
}
|
|
1462
1558
|
getApprovedSelections() {
|
|
1463
|
-
const
|
|
1559
|
+
const e = this.editor.getModel();
|
|
1464
1560
|
return this.getSelections().map(
|
|
1465
|
-
(i) =>
|
|
1561
|
+
(i) => Gt(
|
|
1466
1562
|
i,
|
|
1467
1563
|
this.intervals.buffer,
|
|
1468
1564
|
this.prefer
|
|
1469
1565
|
)
|
|
1470
1566
|
).flat().map((i) => {
|
|
1471
|
-
const o =
|
|
1472
|
-
return new
|
|
1567
|
+
const o = e.getPositionAt(i[0]), l = e.getPositionAt(i[1]);
|
|
1568
|
+
return new s.Selection(
|
|
1473
1569
|
o.lineNumber,
|
|
1474
1570
|
o.column,
|
|
1475
|
-
|
|
1476
|
-
|
|
1571
|
+
l.lineNumber,
|
|
1572
|
+
l.column
|
|
1477
1573
|
);
|
|
1478
1574
|
});
|
|
1479
1575
|
}
|
|
1480
1576
|
getSelections() {
|
|
1481
|
-
const
|
|
1482
|
-
return (this.editor.getSelections() || []).map((
|
|
1483
|
-
|
|
1484
|
-
lineNumber:
|
|
1485
|
-
column:
|
|
1577
|
+
const e = this.editor.getModel();
|
|
1578
|
+
return (this.editor.getSelections() || []).map((t) => [
|
|
1579
|
+
e.getOffsetAt({
|
|
1580
|
+
lineNumber: t.selectionStartLineNumber,
|
|
1581
|
+
column: t.selectionStartColumn
|
|
1486
1582
|
}),
|
|
1487
|
-
|
|
1488
|
-
lineNumber:
|
|
1489
|
-
column:
|
|
1583
|
+
e.getOffsetAt({
|
|
1584
|
+
lineNumber: t.positionLineNumber,
|
|
1585
|
+
column: t.positionColumn
|
|
1490
1586
|
})
|
|
1491
1587
|
]);
|
|
1492
1588
|
}
|
|
1493
1589
|
}
|
|
1494
|
-
const
|
|
1590
|
+
const Mt = new RegExp("^[ s]+(exposed|Function)", "i"), ie = () => /* @__PURE__ */ R("div", { className: "absolute inset-0 animate-pulse", children: /* @__PURE__ */ R("div", { className: "w-full space-y-4 px-4 py-1", children: /* @__PURE__ */ J("div", { className: "space-y-2", children: [
|
|
1495
1591
|
/* @__PURE__ */ R("div", { className: "h-3 w-3/4 rounded bg-grey-200" }),
|
|
1496
1592
|
/* @__PURE__ */ R("div", { className: "h-3 rounded bg-grey-200" }),
|
|
1497
1593
|
/* @__PURE__ */ R("div", { className: "h-3 w-5/6 rounded bg-grey-200" }),
|
|
1498
1594
|
/* @__PURE__ */ R("div", { className: "h-3 rounded bg-grey-200" }),
|
|
1499
1595
|
/* @__PURE__ */ R("div", { className: "h-3 rounded bg-grey-200" })
|
|
1500
|
-
] }) }) }),
|
|
1501
|
-
path:
|
|
1502
|
-
initialValue:
|
|
1503
|
-
theme:
|
|
1596
|
+
] }) }) }), Rn = ({
|
|
1597
|
+
path: n,
|
|
1598
|
+
initialValue: e,
|
|
1599
|
+
theme: t = "fd-dark",
|
|
1504
1600
|
type: i,
|
|
1505
1601
|
language: o,
|
|
1506
|
-
onChange:
|
|
1507
|
-
options:
|
|
1508
|
-
extra:
|
|
1509
|
-
showAlerts:
|
|
1510
|
-
lspProps:
|
|
1511
|
-
...
|
|
1602
|
+
onChange: l,
|
|
1603
|
+
options: r = {},
|
|
1604
|
+
extra: I = {},
|
|
1605
|
+
showAlerts: C = !1,
|
|
1606
|
+
lspProps: h,
|
|
1607
|
+
...S
|
|
1512
1608
|
}) => {
|
|
1513
|
-
const { initialLineInfo:
|
|
1514
|
-
function
|
|
1515
|
-
o === "css" &&
|
|
1609
|
+
const { initialLineInfo: p, initialSelectionInfo: f } = I, { editor: N, setEditor: x } = wt(), { inited: v } = h;
|
|
1610
|
+
function y(m) {
|
|
1611
|
+
o === "css" && m.languages.registerCompletionItemProvider("css", jt), o === "json" && m.languages.json && m.languages.json.jsonDefaults.setDiagnosticsOptions({
|
|
1516
1612
|
validate: !0,
|
|
1517
1613
|
schemas: [
|
|
1518
1614
|
{
|
|
1519
1615
|
uri: "condition-schema.json",
|
|
1520
1616
|
fileMatch: ["*.condition.json"],
|
|
1521
|
-
schema:
|
|
1617
|
+
schema: Kt
|
|
1522
1618
|
}
|
|
1523
1619
|
]
|
|
1524
1620
|
});
|
|
1525
1621
|
}
|
|
1526
|
-
function
|
|
1527
|
-
|
|
1528
|
-
const
|
|
1529
|
-
if (
|
|
1530
|
-
var
|
|
1531
|
-
const
|
|
1532
|
-
if (
|
|
1533
|
-
const
|
|
1534
|
-
|
|
1622
|
+
function A(m, F) {
|
|
1623
|
+
x(m);
|
|
1624
|
+
const a = m.getModel();
|
|
1625
|
+
if (a && (a.updateOptions({ insertSpaces: !1 }), m.onKeyUp(() => {
|
|
1626
|
+
var w;
|
|
1627
|
+
const g = (w = m.getPosition()) == null ? void 0 : w.lineNumber;
|
|
1628
|
+
if (g) {
|
|
1629
|
+
const k = a.getLineFirstNonWhitespaceColumn(g), K = a.getLineLength(g), b = a.getLineContent(g);
|
|
1630
|
+
Mt.test(b) && m.executeEdits("edit-handler", [
|
|
1535
1631
|
{
|
|
1536
|
-
range: new
|
|
1537
|
-
|
|
1632
|
+
range: new F.Range(
|
|
1633
|
+
g,
|
|
1538
1634
|
0,
|
|
1539
|
-
|
|
1540
|
-
|
|
1635
|
+
g,
|
|
1636
|
+
K
|
|
1541
1637
|
),
|
|
1542
|
-
text:
|
|
1543
|
-
|
|
1544
|
-
|
|
1638
|
+
text: b.substr(
|
|
1639
|
+
k - 1,
|
|
1640
|
+
K - k
|
|
1545
1641
|
)
|
|
1546
1642
|
}
|
|
1547
1643
|
]);
|
|
1548
1644
|
}
|
|
1549
|
-
})), i ===
|
|
1550
|
-
const
|
|
1551
|
-
|
|
1645
|
+
})), i === Le.METHOD && se(e)) {
|
|
1646
|
+
const g = new Dt(m, !0);
|
|
1647
|
+
g.exclude(1, 1, 1, Number.POSITIVE_INFINITY), g.enable();
|
|
1552
1648
|
}
|
|
1553
1649
|
}
|
|
1554
1650
|
return D(() => {
|
|
1555
|
-
if (!
|
|
1651
|
+
if (!N)
|
|
1556
1652
|
return;
|
|
1557
|
-
const { line:
|
|
1558
|
-
|
|
1559
|
-
}, [
|
|
1560
|
-
if (!
|
|
1653
|
+
const { line: m, offset: F } = p || {};
|
|
1654
|
+
m && pt(N, m, F);
|
|
1655
|
+
}, [p, N]), D(() => {
|
|
1656
|
+
if (!N)
|
|
1561
1657
|
return;
|
|
1562
|
-
const { selection:
|
|
1563
|
-
|
|
1564
|
-
}, [
|
|
1565
|
-
|
|
1658
|
+
const { selection: m } = f || {};
|
|
1659
|
+
m && At(N, m);
|
|
1660
|
+
}, [f, N]), v ? /* @__PURE__ */ J(Ne, { children: [
|
|
1661
|
+
C ? /* @__PURE__ */ R(Zt, { lspProps: h }) : null,
|
|
1566
1662
|
/* @__PURE__ */ R(
|
|
1567
|
-
|
|
1663
|
+
we,
|
|
1568
1664
|
{
|
|
1569
1665
|
options: {
|
|
1570
1666
|
readOnly: !0,
|
|
1571
1667
|
fontSize: 12,
|
|
1572
1668
|
"semanticHighlighting.enabled": !0,
|
|
1573
1669
|
padding: { top: 10 },
|
|
1574
|
-
...
|
|
1670
|
+
...r
|
|
1575
1671
|
},
|
|
1576
|
-
path: j(
|
|
1577
|
-
value:
|
|
1672
|
+
path: j(n),
|
|
1673
|
+
value: e,
|
|
1578
1674
|
theme: "fd-dark",
|
|
1579
|
-
onChange: (
|
|
1675
|
+
onChange: (m) => l && l(m || ""),
|
|
1580
1676
|
language: o,
|
|
1581
|
-
beforeMount:
|
|
1582
|
-
onMount:
|
|
1583
|
-
loading: /* @__PURE__ */ R(
|
|
1584
|
-
...
|
|
1677
|
+
beforeMount: y,
|
|
1678
|
+
onMount: A,
|
|
1679
|
+
loading: /* @__PURE__ */ R(ie, {}),
|
|
1680
|
+
...S
|
|
1585
1681
|
}
|
|
1586
1682
|
)
|
|
1587
|
-
] }) : /* @__PURE__ */ R(
|
|
1588
|
-
},
|
|
1683
|
+
] }) : /* @__PURE__ */ R(ie, {});
|
|
1684
|
+
}, Vt = {
|
|
1589
1685
|
name: "4d",
|
|
1590
1686
|
displayName: "%displayName%",
|
|
1591
1687
|
description: "%description%",
|
|
@@ -1610,42 +1706,42 @@ const Xn = new RegExp("^[ s]+(exposed|Function)", "i"), ee = () => /* @__PURE__
|
|
|
1610
1706
|
}
|
|
1611
1707
|
]
|
|
1612
1708
|
}
|
|
1613
|
-
}, { registerFileUrl:
|
|
1709
|
+
}, { registerFileUrl: _, whenReady: wn } = at(Vt, void 0, {
|
|
1614
1710
|
system: !0
|
|
1615
1711
|
});
|
|
1616
|
-
|
|
1712
|
+
_(
|
|
1617
1713
|
"./syntaxes/4d.tmLanguage.json",
|
|
1618
1714
|
new URL("data:application/json;base64,ewogICJuYW1lIjogIjREIiwKICAic2NvcGVOYW1lIjogInNvdXJjZS40ZG0iLAogICJwYXR0ZXJucyI6IFsKICAgIHsKICAgICAgImluY2x1ZGUiOiAiI3N0YXRlbWVudHMiCiAgICB9CiAgXSwKICAicmVwb3NpdG9yeSI6IHsKICAgICJzdGF0ZW1lbnRzIjogewogICAgICAicGF0dGVybnMiOiBbCiAgICAgICAgewogICAgICAgICAgImluY2x1ZGUiOiAiI2NvbW1lbnQiCiAgICAgICAgfQogICAgICBdCiAgICB9LAogICAgImNvbW1lbnQiOiB7CiAgICAgICJwYXR0ZXJucyI6IFsKICAgICAgICB7CiAgICAgICAgICAibmFtZSI6ICJjb21tZW50LmJsb2NrLjRkIiwKICAgICAgICAgICJiZWdpbiI6ICIoL1xcKikoPzpcXHMqKChAKWludGVybmFsKSg/PVxcc3woXFwqLykpKT8iLAogICAgICAgICAgImJlZ2luQ2FwdHVyZXMiOiB7CiAgICAgICAgICAgICIxIjogewogICAgICAgICAgICAgICJuYW1lIjogInB1bmN0dWF0aW9uLmRlZmluaXRpb24uY29tbWVudC40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjIiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAic3RvcmFnZS50eXBlLmludGVybmFsZGVjbGFyYXRpb24uNGQiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgICIzIjogewogICAgICAgICAgICAgICJuYW1lIjogInB1bmN0dWF0aW9uLmRlY29yYXRvci5pbnRlcm5hbGRlY2xhcmF0aW9uLjRkIgogICAgICAgICAgICB9CiAgICAgICAgICB9LAogICAgICAgICAgImVuZCI6ICJcXCovIiwKICAgICAgICAgICJlbmRDYXB0dXJlcyI6IHsKICAgICAgICAgICAgIjAiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVmaW5pdGlvbi5jb21tZW50LjRkIgogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiYmVnaW4iOiAiKF5bIFxcdF0rKT8oKC8vKSg/OlxccyooKEApaW50ZXJuYWwpKD89XFxzfCQpKT8pIiwKICAgICAgICAgICJiZWdpbkNhcHR1cmVzIjogewogICAgICAgICAgICAiMSI6IHsKICAgICAgICAgICAgICAibmFtZSI6ICJwdW5jdHVhdGlvbi53aGl0ZXNwYWNlLmNvbW1lbnQubGVhZGluZy40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjIiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAiY29tbWVudC5saW5lLmRvdWJsZS1zbGFzaC40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjMiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVmaW5pdGlvbi5jb21tZW50LjRkIgogICAgICAgICAgICB9LAogICAgICAgICAgICAiNCI6IHsKICAgICAgICAgICAgICAibmFtZSI6ICJzdG9yYWdlLnR5cGUuaW50ZXJuYWxkZWNsYXJhdGlvbi40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjUiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVjb3JhdG9yLmludGVybmFsZGVjbGFyYXRpb24uNGQiCiAgICAgICAgICAgIH0KICAgICAgICAgIH0sCiAgICAgICAgICAiZW5kIjogIig/PSQpIiwKICAgICAgICAgICJjb250ZW50TmFtZSI6ICJjb21tZW50LmxpbmUuZG91YmxlLXNsYXNoLjRkIgogICAgICAgIH0KICAgICAgXQogICAgfQogIH0KfQo=", self.location).toString(),
|
|
1619
1715
|
{ mimeType: "application/json", size: 1592 }
|
|
1620
1716
|
);
|
|
1621
|
-
|
|
1717
|
+
_(
|
|
1622
1718
|
"./language-configuration.json",
|
|
1623
1719
|
new URL("data:application/json;base64,ewogICJjb21tZW50cyI6IHsKICAgICJsaW5lQ29tbWVudCI6ICIvLyIsCiAgICAiYmxvY2tDb21tZW50IjogWyIvKioiLCAiKiovIl0KICB9LAogIC8vIHN5bWJvbHMgdXNlZCBhcyBicmFja2V0cwogICJicmFja2V0cyI6IFsKICAgIFsieyIsICJ9Il0sCiAgICBbIigiLCAiKSJdLAogICAgWyJbIiwgIl0iXQogIF0sCiAgLy8gc3ltYm9scyB0aGF0IGFyZSBhdXRvIGNsb3NlZCB3aGVuIHR5cGluZwogIC8vIHN5bWJvbHMgdGhhdCB0aGF0IGNhbiBiZSB1c2VkIHRvIHN1cnJvdW5kIGEgc2VsZWN0aW9uCiAgInN1cnJvdW5kaW5nUGFpcnMiOiBbCiAgICBbInsiLCAifSJdLAogICAgWyJbIiwgIl0iXSwKICAgIFsiKCIsICIpIl0sCiAgICBbIlwiIiwgIlwiIl0sCiAgICBbIiciLCAiJyJdCiAgXSwKICAiYXV0b0Nsb3NpbmdQYWlycyI6IFsKICAgIHsKICAgICAgIm9wZW4iOiAiKCIsCiAgICAgICJjbG9zZSI6ICIpIgogICAgfSwKICAgIHsgIm9wZW4iOiAieyIsICJjbG9zZSI6ICJ9IiB9LAogICAgeyAib3BlbiI6ICJbIiwgImNsb3NlIjogIl0iIH0sCiAgICB7ICJvcGVuIjogIiciLCAiY2xvc2UiOiAiJyIsICJub3RJbiI6IFsic3RyaW5nIiwgImNvbW1lbnQiXSB9LAogICAgeyAib3BlbiI6ICJcIiIsICJjbG9zZSI6ICJcIiIsICJub3RJbiI6IFsic3RyaW5nIl0gfSwKICAgIHsgIm9wZW4iOiAiYCIsICJjbG9zZSI6ICJgIiwgIm5vdEluIjogWyJzdHJpbmciLCAiY29tbWVudCJdIH0sCiAgICB7ICJvcGVuIjogIi8qKiIsICJjbG9zZSI6ICIgKiovIiwgIm5vdEluIjogWyJzdHJpbmciXSB9CiAgXSwKICAiYXV0b0Nsb3NlQmVmb3JlIjogIjs6Liw9fV0pPmAgXG5cdCIsCiAgIndvcmRQYXR0ZXJuIjogIigtP1xcZCpcXC5cXGRcXHcqKXwoW15cXGBcXH5cXCFcXEBcXCNcXCVcXF5cXCZcXCpcXChcXClcXC1cXD1cXCtcXFtcXHtcXF1cXH1cXFxcXFx8XFw7XFw6XFwnXFxcIlxcLFxcLlxcPFxcPlxcL1xcP1xcclxcblxcdFxcZlxcdiBdKyl8KD88PVthLXpBLVpdKSA/KD89W2EtekEtWl0pIiwKICAiaW5kZW50YXRpb25SdWxlcyI6IHsKICAgICJpbmNyZWFzZUluZGVudFBhdHRlcm4iOiB7CiAgICAgICJwYXR0ZXJuIjogIiheKD8hW15cXHNdKSpcXHMqKGNsYXNzIGNvbnN0cnVjdG9yKSl8KF4oPyFbXlxcc10pKlxccyooZXhwb3NlZHxsb2NhbHxcXHMqKXsxfVxccypmdW5jdGlvbnsxfVxccypcXHcpfCheKD8hW15cXHNdKSpcXHMqKElmfEVsc2V8Rm9yfEZvciBlYWNofFdoaWxlfEJlZ2luIFNRTHxDYXNlIG9mfFVzZXxSZXBlYXR8OiAqXFwoLiopKS4qJCIsCiAgICAgICJmbGFncyI6ICJpIgogICAgfSwKICAgICJkZWNyZWFzZUluZGVudFBhdHRlcm4iOiB7CiAgICAgICJwYXR0ZXJuIjogIiheKD8hW15cXHNdKSpcXHMqKGV4cG9zZWR8bG9jYWx8XFxzKil7MX1cXHMqZnVuY3Rpb257MX1cXHMqXFx3KXwoRW5kIElmfEVuZCBGb3J8RWxzZXxFbmQgZm9yIGVhY2h8RW5kIFdoaWxlfEVuZCBTUUx8RW5kIGNhc2V8RW5kIHVzZXxVbnRpbHw6ICpcXCguKikuKiQiLAogICAgICAiZmxhZ3MiOiAiaSIKICAgIH0KICB9LAogICJvbkVudGVyUnVsZXMiOiBbCiAgICB7CiAgICAgICJiZWZvcmVUZXh0IjogewogICAgICAgICJwYXR0ZXJuIjogIl5leHBvc2VkIiwKICAgICAgICAiZmxhZ3MiOiAiaSIKICAgICAgfSwKICAgICAgImFjdGlvbiI6IHsgImluZGVudCI6ICJpbmRlbnQiLCAiaW5kZW50QWN0aW9uIjogMSB9CiAgICB9CiAgXQp9Cg==", self.location).toString(),
|
|
1624
1720
|
{ mimeType: "application/json", size: 1723 }
|
|
1625
1721
|
);
|
|
1626
|
-
|
|
1722
|
+
_(
|
|
1627
1723
|
"package.json",
|
|
1628
1724
|
new URL("data:application/json;base64,ewogICAgIm5hbWUiOiAiNGQiLAogICAgImRpc3BsYXlOYW1lIjogIiVkaXNwbGF5TmFtZSUiLAogICAgImRlc2NyaXB0aW9uIjogIiVkZXNjcmlwdGlvbiUiLAogICAgInZlcnNpb24iOiAiMS4wLjAiLAogICAgInB1Ymxpc2hlciI6ICJ2c2NvZGUiLAogICAgImxpY2Vuc2UiOiAiTUlUIiwKICAgICJlbmdpbmVzIjogewogICAgICAgICJ2c2NvZGUiOiAiMC4xMC54IgogICAgfSwKICAgICJzY3JpcHRzIjogewogICAgICAgICJ1cGRhdGUtZ3JhbW1hciI6ICJub2RlIC4uL25vZGVfbW9kdWxlcy92c2NvZGUtZ3JhbW1hci11cGRhdGVyL2JpbiBtaWNyb3NvZnQvdnNjb2RlLTRkIGdyYW1tYXJzLzRkLmNzb24gLi9zeW50YXhlcy80ZC50bUxhbmd1YWdlLmpzb24iCiAgICB9LAogICAgImNhdGVnb3JpZXMiOiBbCiAgICAgICAgIlByb2dyYW1taW5nIExhbmd1YWdlcyIKICAgIF0sCiAgICAiY29udHJpYnV0ZXMiOiB7CiAgICAgICAgImxhbmd1YWdlcyI6IFsKICAgICAgICAgICAgewogICAgICAgICAgICAgICJpZCI6ICI0ZCIsCiAgICAgICAgICAgICAgImFsaWFzZXMiOiBbIjREIiwgIjRkIl0sCiAgICAgICAgICAgICAgImV4dGVuc2lvbnMiOiBbIi40ZG0iLCAiLjRxcyJdLAogICAgICAgICAgICAgICJjb25maWd1cmF0aW9uIjogIi4vbGFuZ3VhZ2UtY29uZmlndXJhdGlvbi5qc29uIgogICAgICAgICAgICB9CiAgICAgICAgICBdLAogICAgICAgICAgImdyYW1tYXJzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgImxhbmd1YWdlIjogIjRkIiwKICAgICAgICAgICAgICAic2NvcGVOYW1lIjogInNvdXJjZS40ZG0iLAogICAgICAgICAgICAgICJwYXRoIjogIi4vc3ludGF4ZXMvNGQudG1MYW5ndWFnZS5qc29uIgogICAgICAgICAgICB9CiAgICAgICAgICBdCiAgICB9LAogICAgInJlcG9zaXRvcnkiOiB7CiAgICAgICAgInR5cGUiOiAiZ2l0IiwKICAgICAgICAidXJsIjogImh0dHBzOi8vZ2l0aHViLmNvbS9taWNyb3NvZnQvdnNjb2RlLmdpdCIKICAgIH0KfQ==", self.location).toString(),
|
|
1629
1725
|
{ mimeType: "application/json", size: 1006 }
|
|
1630
1726
|
);
|
|
1631
|
-
|
|
1727
|
+
_(
|
|
1632
1728
|
"package.nls.json",
|
|
1633
1729
|
new URL("data:application/json;base64,ewogICJkaXNwbGF5TmFtZSI6ICI0RCBMYW5ndWFnZSBCYXNpY3MiLAogICJkZXNjcmlwdGlvbiI6ICJQcm92aWRlcyBzeW50YXggaGlnaGxpZ2h0aW5nIGFuZCBicmFja2V0IG1hdGNoaW5nIGZvciA0RE0gYW5kIDRRUyBmaWxlcy4iCn0K", self.location).toString(),
|
|
1634
1730
|
{ mimeType: "application/json", size: 135 }
|
|
1635
1731
|
);
|
|
1636
1732
|
export {
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1733
|
+
Zt as Alerts,
|
|
1734
|
+
Rn as CodeEditor,
|
|
1735
|
+
xn as CodeEditorProvider,
|
|
1736
|
+
Nn as LSPProvider,
|
|
1737
|
+
ae as _await,
|
|
1738
|
+
Ct as configureServices,
|
|
1643
1739
|
j as getFileSystemPath,
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1740
|
+
Sn as getFunctionOffset,
|
|
1741
|
+
It as initMonacoUserConfiguration,
|
|
1742
|
+
pt as jumpToLine,
|
|
1743
|
+
At as jumpToSelection,
|
|
1744
|
+
wt as useCodeEditor,
|
|
1745
|
+
yn as useLSP
|
|
1650
1746
|
};
|
|
1651
1747
|
//# sourceMappingURL=index.es.js.map
|