@webgal/language-service 0.0.2-alpha.3 → 0.0.2-alpha.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/build/{monaco-init-ThX3sjkW.mjs → client-handlers-CrU8stw6.mjs} +1 -189
- package/build/{monaco-init-D-ukBToI.cjs → client-handlers-DVUjG46C.cjs} +0 -209
- package/build/index-75hRTxvB.d.mts +24 -0
- package/build/index.cjs +11 -22
- package/build/index.d.cts +24 -6
- package/build/index.d.mts +6 -8
- package/build/index.mjs +2 -9
- package/build/monaco/index.cjs +203 -4
- package/build/monaco/index.d.cts +605 -2
- package/build/monaco/index.d.mts +607 -2
- package/build/monaco/index.mjs +195 -2
- package/build/node.d.cts +1 -2
- package/build/node.d.mts +1 -2
- package/build/{monaco-init-DCRVIFZj.d.mts → types-BPQnQEAd.d.cts} +1 -49
- package/build/{monaco-init-c5VtDwAb.d.cts → types-FltMUZDB.d.mts} +1 -49
- package/package.json +7 -12
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
import { webgalConfigGrammar, webgalGrammar, webgalLanguageConfiguration } from "./syntaxes.mjs";
|
|
2
|
-
import { webgalDarkTheme, webgalWhiteTheme } from "./themes.mjs";
|
|
3
|
-
import { createMemoryFileSystem } from "./index.mjs";
|
|
4
1
|
import { FileType } from "@volar/language-service";
|
|
5
2
|
import { URI } from "vscode-uri";
|
|
6
|
-
import { WebSocketMessageReader, WebSocketMessageWriter, toSocket } from "vscode-ws-jsonrpc";
|
|
7
|
-
import { BrowserMessageReader, BrowserMessageWriter, CloseAction, ErrorAction } from "vscode-languageclient/browser.js";
|
|
8
|
-
import { MonacoLanguageClient } from "monaco-languageclient";
|
|
9
|
-
import { initialize } from "@codingame/monaco-vscode-api";
|
|
10
|
-
import { ExtensionHostKind, registerExtension } from "@codingame/monaco-vscode-api/extensions";
|
|
11
|
-
import "vscode/localExtensionHost";
|
|
12
|
-
import getLanguagesServiceOverride from "@codingame/monaco-vscode-languages-service-override";
|
|
13
|
-
import getThemeServiceOverride from "@codingame/monaco-vscode-theme-service-override";
|
|
14
|
-
import getTextMateServiceOverride from "@codingame/monaco-vscode-textmate-service-override";
|
|
15
3
|
|
|
16
4
|
//#region src/vfs/utils.ts
|
|
17
5
|
const normalizePath = (input) => {
|
|
@@ -358,180 +346,4 @@ function registerWebgalClientHandlers(client, handlers) {
|
|
|
358
346
|
}
|
|
359
347
|
|
|
360
348
|
//#endregion
|
|
361
|
-
|
|
362
|
-
const createWebgalMonacoLanguageClient = (options) => {
|
|
363
|
-
const { languageServerUrl, editor } = options;
|
|
364
|
-
const editorInstance = editor;
|
|
365
|
-
const vfs = options.virtualFileSystem || createMemoryFileSystem({ root: "file:///game" });
|
|
366
|
-
if (!options.virtualFileSystem) {
|
|
367
|
-
vfs.writeFile("file:///game/scene/start.txt", "WebGal:Start;");
|
|
368
|
-
vfs.writeFile("file:///game/config.txt", "");
|
|
369
|
-
}
|
|
370
|
-
const webSocket = new WebSocket(languageServerUrl);
|
|
371
|
-
webSocket.onopen = () => {
|
|
372
|
-
const socket = toSocket(webSocket);
|
|
373
|
-
const reader = new WebSocketMessageReader(socket);
|
|
374
|
-
const languageClient = createLanguageClient({
|
|
375
|
-
reader,
|
|
376
|
-
writer: new WebSocketMessageWriter(socket)
|
|
377
|
-
}, {
|
|
378
|
-
editor: editorInstance,
|
|
379
|
-
vfs
|
|
380
|
-
});
|
|
381
|
-
languageClient.start();
|
|
382
|
-
reader.onClose(() => languageClient.stop());
|
|
383
|
-
};
|
|
384
|
-
return {
|
|
385
|
-
webSocket,
|
|
386
|
-
vfs
|
|
387
|
-
};
|
|
388
|
-
};
|
|
389
|
-
const createWebgalMonacoLanguageClientWithWorker = (options) => {
|
|
390
|
-
const { worker, editor } = options;
|
|
391
|
-
const editorInstance = editor;
|
|
392
|
-
const vfs = options.virtualFileSystem || createMemoryFileSystem({ root: "file:///game" });
|
|
393
|
-
if (!options.virtualFileSystem) {
|
|
394
|
-
vfs.writeFile("file:///game/scene/start.txt", "WebGal:Start;");
|
|
395
|
-
vfs.writeFile("file:///game/config.txt", "");
|
|
396
|
-
}
|
|
397
|
-
const languageClient = createLanguageClient({
|
|
398
|
-
reader: new BrowserMessageReader(worker),
|
|
399
|
-
writer: new BrowserMessageWriter(worker)
|
|
400
|
-
}, {
|
|
401
|
-
editor: editorInstance,
|
|
402
|
-
vfs
|
|
403
|
-
});
|
|
404
|
-
languageClient.start();
|
|
405
|
-
worker.onerror = () => languageClient.stop();
|
|
406
|
-
worker.onmessageerror = () => languageClient.stop();
|
|
407
|
-
return {
|
|
408
|
-
worker,
|
|
409
|
-
vfs
|
|
410
|
-
};
|
|
411
|
-
};
|
|
412
|
-
const createLanguageClient = (messageTransports, options) => {
|
|
413
|
-
const handlers = createWebgalClientHandlers({
|
|
414
|
-
vfs: options.vfs,
|
|
415
|
-
overrides: {
|
|
416
|
-
"client/showTip": function(message) {
|
|
417
|
-
console.log(message);
|
|
418
|
-
},
|
|
419
|
-
"workspace/documentLink/refresh": () => {
|
|
420
|
-
const model = options.editor.getModel();
|
|
421
|
-
if (!model) return null;
|
|
422
|
-
options.editor.setModel(model);
|
|
423
|
-
return null;
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
});
|
|
427
|
-
const client = new MonacoLanguageClient({
|
|
428
|
-
name: "WebGAL Language Client",
|
|
429
|
-
clientOptions: {
|
|
430
|
-
documentSelector: [
|
|
431
|
-
{
|
|
432
|
-
scheme: "file",
|
|
433
|
-
language: "webgal"
|
|
434
|
-
},
|
|
435
|
-
{
|
|
436
|
-
scheme: "file",
|
|
437
|
-
language: "webgal-config"
|
|
438
|
-
},
|
|
439
|
-
{
|
|
440
|
-
scheme: "inmemory",
|
|
441
|
-
language: "webgal"
|
|
442
|
-
},
|
|
443
|
-
{
|
|
444
|
-
scheme: "inmemory",
|
|
445
|
-
language: "webgal-config"
|
|
446
|
-
}
|
|
447
|
-
],
|
|
448
|
-
errorHandler: {
|
|
449
|
-
error: () => ({ action: ErrorAction.Continue }),
|
|
450
|
-
closed: () => ({ action: CloseAction.DoNotRestart })
|
|
451
|
-
},
|
|
452
|
-
synchronize: { configurationSection: ["webgal", "http"] },
|
|
453
|
-
initializationOptions() {
|
|
454
|
-
const model = options.editor.getModel();
|
|
455
|
-
return {
|
|
456
|
-
processId: Math.random(),
|
|
457
|
-
rootPath: "file:///game",
|
|
458
|
-
rootUri: "file:///game",
|
|
459
|
-
capabilities: {},
|
|
460
|
-
workspaceFolders: [{
|
|
461
|
-
uri: "file:///game",
|
|
462
|
-
name: "example"
|
|
463
|
-
}],
|
|
464
|
-
...model ? { textDocument: { uri: model.uri.toString() } } : {}
|
|
465
|
-
};
|
|
466
|
-
}
|
|
467
|
-
},
|
|
468
|
-
messageTransports
|
|
469
|
-
});
|
|
470
|
-
registerWebgalClientHandlers(client, handlers);
|
|
471
|
-
options.vfs.onDidChange(() => {
|
|
472
|
-
client.sendNotification("webgal/vfsChanged");
|
|
473
|
-
});
|
|
474
|
-
return client;
|
|
475
|
-
};
|
|
476
|
-
|
|
477
|
-
//#endregion
|
|
478
|
-
//#region src/monaco/monaco-init.ts
|
|
479
|
-
let initPromise = null;
|
|
480
|
-
async function initWebgalMonaco() {
|
|
481
|
-
if (initPromise) return initPromise;
|
|
482
|
-
initPromise = (async () => {
|
|
483
|
-
const { registerFileUrl } = registerExtension({
|
|
484
|
-
name: "webgal",
|
|
485
|
-
publisher: "openwebgal",
|
|
486
|
-
version: "1.0.0",
|
|
487
|
-
engines: { vscode: "^1.0.0" },
|
|
488
|
-
activationEvents: ["onLanguage:webgal", "onLanguage:webgal-config"],
|
|
489
|
-
contributes: {
|
|
490
|
-
languages: [{
|
|
491
|
-
id: "webgal",
|
|
492
|
-
extensions: [".webgal"],
|
|
493
|
-
aliases: ["WebGAL"],
|
|
494
|
-
configuration: "./language-configuration.json"
|
|
495
|
-
}, {
|
|
496
|
-
id: "webgal-config",
|
|
497
|
-
extensions: [".webgal-config"],
|
|
498
|
-
aliases: ["WebGAL Config"]
|
|
499
|
-
}],
|
|
500
|
-
grammars: [{
|
|
501
|
-
language: "webgal",
|
|
502
|
-
scopeName: "source.webgal",
|
|
503
|
-
path: "./webgal.tmLanguage.json"
|
|
504
|
-
}, {
|
|
505
|
-
language: "webgal-config",
|
|
506
|
-
scopeName: "source.webgal-config",
|
|
507
|
-
path: "./webgal-config.tmLanguage.json"
|
|
508
|
-
}],
|
|
509
|
-
themes: [{
|
|
510
|
-
id: "webgal-dark",
|
|
511
|
-
label: "WebGAL Dark",
|
|
512
|
-
uiTheme: "vs-dark",
|
|
513
|
-
path: "./dark.json"
|
|
514
|
-
}, {
|
|
515
|
-
id: "webgal-white",
|
|
516
|
-
label: "WebGAL White",
|
|
517
|
-
uiTheme: "vs",
|
|
518
|
-
path: "./white.json"
|
|
519
|
-
}]
|
|
520
|
-
}
|
|
521
|
-
}, ExtensionHostKind.LocalProcess);
|
|
522
|
-
registerFileUrl("./webgal.tmLanguage.json", new URL("data:application/json;base64," + btoa(decodeURIComponent(encodeURIComponent(JSON.stringify(webgalGrammar)))), import.meta.url).href);
|
|
523
|
-
registerFileUrl("./webgal-config.tmLanguage.json", new URL("data:application/json;base64," + btoa(decodeURIComponent(encodeURIComponent(JSON.stringify(webgalConfigGrammar)))), import.meta.url).href);
|
|
524
|
-
registerFileUrl("./language-configuration.json", new URL("data:application/json;base64," + btoa(decodeURIComponent(encodeURIComponent(JSON.stringify(webgalLanguageConfiguration)))), import.meta.url).href);
|
|
525
|
-
registerFileUrl("./dark.json", new URL("data:application/json;base64," + btoa(decodeURIComponent(encodeURIComponent(JSON.stringify(webgalDarkTheme)))), import.meta.url).href);
|
|
526
|
-
registerFileUrl("./white.json", new URL("data:application/json;base64," + btoa(decodeURIComponent(encodeURIComponent(JSON.stringify(webgalWhiteTheme)))), import.meta.url).href);
|
|
527
|
-
await initialize({
|
|
528
|
-
...getTextMateServiceOverride(),
|
|
529
|
-
...getThemeServiceOverride(),
|
|
530
|
-
...getLanguagesServiceOverride()
|
|
531
|
-
});
|
|
532
|
-
})();
|
|
533
|
-
return initPromise;
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
//#endregion
|
|
537
|
-
export { registerWebgalClientHandlers as a, createVolarFileSystem as c, pathToUri as d, toVfsPath as f, createWebgalClientHandlers as i, joinPaths as l, createWebgalMonacoLanguageClient as n, createMemoryVolarFileSystem as o, uriToPath as p, createWebgalMonacoLanguageClientWithWorker as r, createVirtualFileSystem as s, initWebgalMonaco as t, normalizePath as u };
|
|
349
|
+
export { createVolarFileSystem as a, pathToUri as c, createVirtualFileSystem as i, toVfsPath as l, registerWebgalClientHandlers as n, joinPaths as o, createMemoryVolarFileSystem as r, normalizePath as s, createWebgalClientHandlers as t, uriToPath as u };
|
|
@@ -1,21 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-C0xms8kb.cjs');
|
|
2
|
-
const require_syntaxes = require('./syntaxes.cjs');
|
|
3
|
-
const require_themes = require('./themes.cjs');
|
|
4
|
-
const require_index = require('./index.cjs');
|
|
5
2
|
let _volar_language_service = require("@volar/language-service");
|
|
6
3
|
let vscode_uri = require("vscode-uri");
|
|
7
|
-
let vscode_ws_jsonrpc = require("vscode-ws-jsonrpc");
|
|
8
|
-
let vscode_languageclient_browser_js = require("vscode-languageclient/browser.js");
|
|
9
|
-
let monaco_languageclient = require("monaco-languageclient");
|
|
10
|
-
let _codingame_monaco_vscode_api = require("@codingame/monaco-vscode-api");
|
|
11
|
-
let _codingame_monaco_vscode_api_extensions = require("@codingame/monaco-vscode-api/extensions");
|
|
12
|
-
require("vscode/localExtensionHost");
|
|
13
|
-
let _codingame_monaco_vscode_languages_service_override = require("@codingame/monaco-vscode-languages-service-override");
|
|
14
|
-
_codingame_monaco_vscode_languages_service_override = require_chunk.__toESM(_codingame_monaco_vscode_languages_service_override);
|
|
15
|
-
let _codingame_monaco_vscode_theme_service_override = require("@codingame/monaco-vscode-theme-service-override");
|
|
16
|
-
_codingame_monaco_vscode_theme_service_override = require_chunk.__toESM(_codingame_monaco_vscode_theme_service_override);
|
|
17
|
-
let _codingame_monaco_vscode_textmate_service_override = require("@codingame/monaco-vscode-textmate-service-override");
|
|
18
|
-
_codingame_monaco_vscode_textmate_service_override = require_chunk.__toESM(_codingame_monaco_vscode_textmate_service_override);
|
|
19
4
|
|
|
20
5
|
//#region src/vfs/utils.ts
|
|
21
6
|
const normalizePath = (input) => {
|
|
@@ -361,182 +346,6 @@ function registerWebgalClientHandlers(client, handlers) {
|
|
|
361
346
|
for (const [method, handler] of Object.entries(handlers)) client.onRequest(method, handler);
|
|
362
347
|
}
|
|
363
348
|
|
|
364
|
-
//#endregion
|
|
365
|
-
//#region src/monaco/monaco.ts
|
|
366
|
-
const createWebgalMonacoLanguageClient = (options) => {
|
|
367
|
-
const { languageServerUrl, editor } = options;
|
|
368
|
-
const editorInstance = editor;
|
|
369
|
-
const vfs = options.virtualFileSystem || require_index.createMemoryFileSystem({ root: "file:///game" });
|
|
370
|
-
if (!options.virtualFileSystem) {
|
|
371
|
-
vfs.writeFile("file:///game/scene/start.txt", "WebGal:Start;");
|
|
372
|
-
vfs.writeFile("file:///game/config.txt", "");
|
|
373
|
-
}
|
|
374
|
-
const webSocket = new WebSocket(languageServerUrl);
|
|
375
|
-
webSocket.onopen = () => {
|
|
376
|
-
const socket = (0, vscode_ws_jsonrpc.toSocket)(webSocket);
|
|
377
|
-
const reader = new vscode_ws_jsonrpc.WebSocketMessageReader(socket);
|
|
378
|
-
const languageClient = createLanguageClient({
|
|
379
|
-
reader,
|
|
380
|
-
writer: new vscode_ws_jsonrpc.WebSocketMessageWriter(socket)
|
|
381
|
-
}, {
|
|
382
|
-
editor: editorInstance,
|
|
383
|
-
vfs
|
|
384
|
-
});
|
|
385
|
-
languageClient.start();
|
|
386
|
-
reader.onClose(() => languageClient.stop());
|
|
387
|
-
};
|
|
388
|
-
return {
|
|
389
|
-
webSocket,
|
|
390
|
-
vfs
|
|
391
|
-
};
|
|
392
|
-
};
|
|
393
|
-
const createWebgalMonacoLanguageClientWithWorker = (options) => {
|
|
394
|
-
const { worker, editor } = options;
|
|
395
|
-
const editorInstance = editor;
|
|
396
|
-
const vfs = options.virtualFileSystem || require_index.createMemoryFileSystem({ root: "file:///game" });
|
|
397
|
-
if (!options.virtualFileSystem) {
|
|
398
|
-
vfs.writeFile("file:///game/scene/start.txt", "WebGal:Start;");
|
|
399
|
-
vfs.writeFile("file:///game/config.txt", "");
|
|
400
|
-
}
|
|
401
|
-
const languageClient = createLanguageClient({
|
|
402
|
-
reader: new vscode_languageclient_browser_js.BrowserMessageReader(worker),
|
|
403
|
-
writer: new vscode_languageclient_browser_js.BrowserMessageWriter(worker)
|
|
404
|
-
}, {
|
|
405
|
-
editor: editorInstance,
|
|
406
|
-
vfs
|
|
407
|
-
});
|
|
408
|
-
languageClient.start();
|
|
409
|
-
worker.onerror = () => languageClient.stop();
|
|
410
|
-
worker.onmessageerror = () => languageClient.stop();
|
|
411
|
-
return {
|
|
412
|
-
worker,
|
|
413
|
-
vfs
|
|
414
|
-
};
|
|
415
|
-
};
|
|
416
|
-
const createLanguageClient = (messageTransports, options) => {
|
|
417
|
-
const handlers = createWebgalClientHandlers({
|
|
418
|
-
vfs: options.vfs,
|
|
419
|
-
overrides: {
|
|
420
|
-
"client/showTip": function(message) {
|
|
421
|
-
console.log(message);
|
|
422
|
-
},
|
|
423
|
-
"workspace/documentLink/refresh": () => {
|
|
424
|
-
const model = options.editor.getModel();
|
|
425
|
-
if (!model) return null;
|
|
426
|
-
options.editor.setModel(model);
|
|
427
|
-
return null;
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
});
|
|
431
|
-
const client = new monaco_languageclient.MonacoLanguageClient({
|
|
432
|
-
name: "WebGAL Language Client",
|
|
433
|
-
clientOptions: {
|
|
434
|
-
documentSelector: [
|
|
435
|
-
{
|
|
436
|
-
scheme: "file",
|
|
437
|
-
language: "webgal"
|
|
438
|
-
},
|
|
439
|
-
{
|
|
440
|
-
scheme: "file",
|
|
441
|
-
language: "webgal-config"
|
|
442
|
-
},
|
|
443
|
-
{
|
|
444
|
-
scheme: "inmemory",
|
|
445
|
-
language: "webgal"
|
|
446
|
-
},
|
|
447
|
-
{
|
|
448
|
-
scheme: "inmemory",
|
|
449
|
-
language: "webgal-config"
|
|
450
|
-
}
|
|
451
|
-
],
|
|
452
|
-
errorHandler: {
|
|
453
|
-
error: () => ({ action: vscode_languageclient_browser_js.ErrorAction.Continue }),
|
|
454
|
-
closed: () => ({ action: vscode_languageclient_browser_js.CloseAction.DoNotRestart })
|
|
455
|
-
},
|
|
456
|
-
synchronize: { configurationSection: ["webgal", "http"] },
|
|
457
|
-
initializationOptions() {
|
|
458
|
-
const model = options.editor.getModel();
|
|
459
|
-
return {
|
|
460
|
-
processId: Math.random(),
|
|
461
|
-
rootPath: "file:///game",
|
|
462
|
-
rootUri: "file:///game",
|
|
463
|
-
capabilities: {},
|
|
464
|
-
workspaceFolders: [{
|
|
465
|
-
uri: "file:///game",
|
|
466
|
-
name: "example"
|
|
467
|
-
}],
|
|
468
|
-
...model ? { textDocument: { uri: model.uri.toString() } } : {}
|
|
469
|
-
};
|
|
470
|
-
}
|
|
471
|
-
},
|
|
472
|
-
messageTransports
|
|
473
|
-
});
|
|
474
|
-
registerWebgalClientHandlers(client, handlers);
|
|
475
|
-
options.vfs.onDidChange(() => {
|
|
476
|
-
client.sendNotification("webgal/vfsChanged");
|
|
477
|
-
});
|
|
478
|
-
return client;
|
|
479
|
-
};
|
|
480
|
-
|
|
481
|
-
//#endregion
|
|
482
|
-
//#region src/monaco/monaco-init.ts
|
|
483
|
-
let initPromise = null;
|
|
484
|
-
async function initWebgalMonaco() {
|
|
485
|
-
if (initPromise) return initPromise;
|
|
486
|
-
initPromise = (async () => {
|
|
487
|
-
const { registerFileUrl } = (0, _codingame_monaco_vscode_api_extensions.registerExtension)({
|
|
488
|
-
name: "webgal",
|
|
489
|
-
publisher: "openwebgal",
|
|
490
|
-
version: "1.0.0",
|
|
491
|
-
engines: { vscode: "^1.0.0" },
|
|
492
|
-
activationEvents: ["onLanguage:webgal", "onLanguage:webgal-config"],
|
|
493
|
-
contributes: {
|
|
494
|
-
languages: [{
|
|
495
|
-
id: "webgal",
|
|
496
|
-
extensions: [".webgal"],
|
|
497
|
-
aliases: ["WebGAL"],
|
|
498
|
-
configuration: "./language-configuration.json"
|
|
499
|
-
}, {
|
|
500
|
-
id: "webgal-config",
|
|
501
|
-
extensions: [".webgal-config"],
|
|
502
|
-
aliases: ["WebGAL Config"]
|
|
503
|
-
}],
|
|
504
|
-
grammars: [{
|
|
505
|
-
language: "webgal",
|
|
506
|
-
scopeName: "source.webgal",
|
|
507
|
-
path: "./webgal.tmLanguage.json"
|
|
508
|
-
}, {
|
|
509
|
-
language: "webgal-config",
|
|
510
|
-
scopeName: "source.webgal-config",
|
|
511
|
-
path: "./webgal-config.tmLanguage.json"
|
|
512
|
-
}],
|
|
513
|
-
themes: [{
|
|
514
|
-
id: "webgal-dark",
|
|
515
|
-
label: "WebGAL Dark",
|
|
516
|
-
uiTheme: "vs-dark",
|
|
517
|
-
path: "./dark.json"
|
|
518
|
-
}, {
|
|
519
|
-
id: "webgal-white",
|
|
520
|
-
label: "WebGAL White",
|
|
521
|
-
uiTheme: "vs",
|
|
522
|
-
path: "./white.json"
|
|
523
|
-
}]
|
|
524
|
-
}
|
|
525
|
-
}, _codingame_monaco_vscode_api_extensions.ExtensionHostKind.LocalProcess);
|
|
526
|
-
registerFileUrl("./webgal.tmLanguage.json", new URL("data:application/json;base64," + btoa(decodeURIComponent(encodeURIComponent(JSON.stringify(require_syntaxes.webgalGrammar)))), require("url").pathToFileURL(__filename).href).href);
|
|
527
|
-
registerFileUrl("./webgal-config.tmLanguage.json", new URL("data:application/json;base64," + btoa(decodeURIComponent(encodeURIComponent(JSON.stringify(require_syntaxes.webgalConfigGrammar)))), require("url").pathToFileURL(__filename).href).href);
|
|
528
|
-
registerFileUrl("./language-configuration.json", new URL("data:application/json;base64," + btoa(decodeURIComponent(encodeURIComponent(JSON.stringify(require_syntaxes.webgalLanguageConfiguration)))), require("url").pathToFileURL(__filename).href).href);
|
|
529
|
-
registerFileUrl("./dark.json", new URL("data:application/json;base64," + btoa(decodeURIComponent(encodeURIComponent(JSON.stringify(require_themes.webgalDarkTheme)))), require("url").pathToFileURL(__filename).href).href);
|
|
530
|
-
registerFileUrl("./white.json", new URL("data:application/json;base64," + btoa(decodeURIComponent(encodeURIComponent(JSON.stringify(require_themes.webgalWhiteTheme)))), require("url").pathToFileURL(__filename).href).href);
|
|
531
|
-
await (0, _codingame_monaco_vscode_api.initialize)({
|
|
532
|
-
...(0, _codingame_monaco_vscode_textmate_service_override.default)(),
|
|
533
|
-
...(0, _codingame_monaco_vscode_theme_service_override.default)(),
|
|
534
|
-
...(0, _codingame_monaco_vscode_languages_service_override.default)()
|
|
535
|
-
});
|
|
536
|
-
})();
|
|
537
|
-
return initPromise;
|
|
538
|
-
}
|
|
539
|
-
|
|
540
349
|
//#endregion
|
|
541
350
|
Object.defineProperty(exports, 'createMemoryVolarFileSystem', {
|
|
542
351
|
enumerable: true,
|
|
@@ -562,24 +371,6 @@ Object.defineProperty(exports, 'createWebgalClientHandlers', {
|
|
|
562
371
|
return createWebgalClientHandlers;
|
|
563
372
|
}
|
|
564
373
|
});
|
|
565
|
-
Object.defineProperty(exports, 'createWebgalMonacoLanguageClient', {
|
|
566
|
-
enumerable: true,
|
|
567
|
-
get: function () {
|
|
568
|
-
return createWebgalMonacoLanguageClient;
|
|
569
|
-
}
|
|
570
|
-
});
|
|
571
|
-
Object.defineProperty(exports, 'createWebgalMonacoLanguageClientWithWorker', {
|
|
572
|
-
enumerable: true,
|
|
573
|
-
get: function () {
|
|
574
|
-
return createWebgalMonacoLanguageClientWithWorker;
|
|
575
|
-
}
|
|
576
|
-
});
|
|
577
|
-
Object.defineProperty(exports, 'initWebgalMonaco', {
|
|
578
|
-
enumerable: true,
|
|
579
|
-
get: function () {
|
|
580
|
-
return initWebgalMonaco;
|
|
581
|
-
}
|
|
582
|
-
});
|
|
583
374
|
Object.defineProperty(exports, 'joinPaths', {
|
|
584
375
|
enumerable: true,
|
|
585
376
|
get: function () {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { c as VirtualFileSystem, d as VolarWritableFileSystem, o as VirtualEntry } from "./types-FltMUZDB.mjs";
|
|
2
|
+
import { FileSystem } from "@volar/language-service";
|
|
3
|
+
import { URI } from "vscode-uri";
|
|
4
|
+
|
|
5
|
+
//#region src/vfs/adapter.d.ts
|
|
6
|
+
declare function createVirtualFileSystem(fs: VolarWritableFileSystem): VirtualFileSystem;
|
|
7
|
+
declare function createVolarFileSystem(vfs: VirtualFileSystem, options?: {
|
|
8
|
+
uriToPath?: (uri: URI) => string;
|
|
9
|
+
}): FileSystem;
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/vfs/memory.d.ts
|
|
12
|
+
declare function createMemoryVolarFileSystem(options?: {
|
|
13
|
+
root?: string;
|
|
14
|
+
tree?: VirtualEntry;
|
|
15
|
+
}): VolarWritableFileSystem;
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/vfs/utils.d.ts
|
|
18
|
+
declare const normalizePath: (input: string) => string;
|
|
19
|
+
declare const joinPaths: (...parts: string[]) => string;
|
|
20
|
+
declare const uriToPath: (value: string | URI) => string;
|
|
21
|
+
declare const pathToUri: (path: string) => URI;
|
|
22
|
+
declare const toVfsPath: (value: string) => string;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { uriToPath as a, createVolarFileSystem as c, toVfsPath as i, normalizePath as n, createMemoryVolarFileSystem as o, pathToUri as r, createVirtualFileSystem as s, joinPaths as t };
|
package/build/index.cjs
CHANGED
|
@@ -1,24 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const
|
|
3
|
-
require('./monaco/index.cjs');
|
|
2
|
+
const require_client_handlers = require('./client-handlers-DVUjG46C.cjs');
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
exports.
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
exports.createWebgalClientHandlers = require_monaco_init.createWebgalClientHandlers;
|
|
16
|
-
exports.createWebgalMonacoLanguageClient = require_monaco_init.createWebgalMonacoLanguageClient;
|
|
17
|
-
exports.createWebgalMonacoLanguageClientWithWorker = require_monaco_init.createWebgalMonacoLanguageClientWithWorker;
|
|
18
|
-
exports.initWebgalMonaco = require_monaco_init.initWebgalMonaco;
|
|
19
|
-
exports.joinPaths = require_monaco_init.joinPaths;
|
|
20
|
-
exports.normalizePath = require_monaco_init.normalizePath;
|
|
21
|
-
exports.pathToUri = require_monaco_init.pathToUri;
|
|
22
|
-
exports.registerWebgalClientHandlers = require_monaco_init.registerWebgalClientHandlers;
|
|
23
|
-
exports.toVfsPath = require_monaco_init.toVfsPath;
|
|
24
|
-
exports.uriToPath = require_monaco_init.uriToPath;
|
|
4
|
+
exports.createMemoryVolarFileSystem = require_client_handlers.createMemoryVolarFileSystem;
|
|
5
|
+
exports.createVirtualFileSystem = require_client_handlers.createVirtualFileSystem;
|
|
6
|
+
exports.createVolarFileSystem = require_client_handlers.createVolarFileSystem;
|
|
7
|
+
exports.createWebgalClientHandlers = require_client_handlers.createWebgalClientHandlers;
|
|
8
|
+
exports.joinPaths = require_client_handlers.joinPaths;
|
|
9
|
+
exports.normalizePath = require_client_handlers.normalizePath;
|
|
10
|
+
exports.pathToUri = require_client_handlers.pathToUri;
|
|
11
|
+
exports.registerWebgalClientHandlers = require_client_handlers.registerWebgalClientHandlers;
|
|
12
|
+
exports.toVfsPath = require_client_handlers.toVfsPath;
|
|
13
|
+
exports.uriToPath = require_client_handlers.uriToPath;
|
package/build/index.d.cts
CHANGED
|
@@ -1,10 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
1
|
+
import { a as VirtualDirectoryEntry, c as VirtualFileSystem, d as VolarWritableFileSystem, f as WebgalClientHandlers, i as MaybePromise, l as VirtualFileSystemChange, n as DirectoryEntry, o as VirtualEntry, r as LanguageClientLike, s as VirtualFileEntry, t as CreateWebgalClientHandlersOptions, u as VirtualFileSystemChangeListener } from "./types-BPQnQEAd.cjs";
|
|
2
|
+
import { FileSystem } from "@volar/language-service";
|
|
3
|
+
import { URI } from "vscode-uri";
|
|
3
4
|
|
|
4
|
-
//#region src/
|
|
5
|
-
declare function
|
|
5
|
+
//#region src/vfs/adapter.d.ts
|
|
6
|
+
declare function createVirtualFileSystem(fs: VolarWritableFileSystem): VirtualFileSystem;
|
|
7
|
+
declare function createVolarFileSystem(vfs: VirtualFileSystem, options?: {
|
|
8
|
+
uriToPath?: (uri: URI) => string;
|
|
9
|
+
}): FileSystem;
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/vfs/memory.d.ts
|
|
12
|
+
declare function createMemoryVolarFileSystem(options?: {
|
|
6
13
|
root?: string;
|
|
7
14
|
tree?: VirtualEntry;
|
|
8
|
-
}):
|
|
15
|
+
}): VolarWritableFileSystem;
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/vfs/utils.d.ts
|
|
18
|
+
declare const normalizePath: (input: string) => string;
|
|
19
|
+
declare const joinPaths: (...parts: string[]) => string;
|
|
20
|
+
declare const uriToPath: (value: string | URI) => string;
|
|
21
|
+
declare const pathToUri: (path: string) => URI;
|
|
22
|
+
declare const toVfsPath: (value: string) => string;
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/client-handlers.d.ts
|
|
25
|
+
declare function createWebgalClientHandlers(options: CreateWebgalClientHandlersOptions): WebgalClientHandlers;
|
|
26
|
+
declare function registerWebgalClientHandlers(client: LanguageClientLike, handlers: Partial<WebgalClientHandlers>): void;
|
|
9
27
|
//#endregion
|
|
10
|
-
export { CreateWebgalClientHandlersOptions,
|
|
28
|
+
export { CreateWebgalClientHandlersOptions, DirectoryEntry, LanguageClientLike, MaybePromise, VirtualDirectoryEntry, VirtualEntry, VirtualFileEntry, VirtualFileSystem, VirtualFileSystemChange, VirtualFileSystemChangeListener, VolarWritableFileSystem, WebgalClientHandlers, createMemoryVolarFileSystem, createVirtualFileSystem, createVolarFileSystem, createWebgalClientHandlers, joinPaths, normalizePath, pathToUri, registerWebgalClientHandlers, toVfsPath, uriToPath };
|
package/build/index.d.mts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
1
|
+
import { a as VirtualDirectoryEntry, c as VirtualFileSystem, d as VolarWritableFileSystem, f as WebgalClientHandlers, i as MaybePromise, l as VirtualFileSystemChange, n as DirectoryEntry, o as VirtualEntry, r as LanguageClientLike, s as VirtualFileEntry, t as CreateWebgalClientHandlersOptions, u as VirtualFileSystemChangeListener } from "./types-FltMUZDB.mjs";
|
|
2
|
+
import { a as uriToPath, c as createVolarFileSystem, i as toVfsPath, n as normalizePath, o as createMemoryVolarFileSystem, r as pathToUri, s as createVirtualFileSystem, t as joinPaths } from "./index-75hRTxvB.mjs";
|
|
3
3
|
|
|
4
|
-
//#region src/
|
|
5
|
-
declare function
|
|
6
|
-
|
|
7
|
-
tree?: VirtualEntry;
|
|
8
|
-
}): VirtualFileSystem;
|
|
4
|
+
//#region src/client-handlers.d.ts
|
|
5
|
+
declare function createWebgalClientHandlers(options: CreateWebgalClientHandlersOptions): WebgalClientHandlers;
|
|
6
|
+
declare function registerWebgalClientHandlers(client: LanguageClientLike, handlers: Partial<WebgalClientHandlers>): void;
|
|
9
7
|
//#endregion
|
|
10
|
-
export { CreateWebgalClientHandlersOptions,
|
|
8
|
+
export { CreateWebgalClientHandlersOptions, DirectoryEntry, LanguageClientLike, MaybePromise, VirtualDirectoryEntry, VirtualEntry, VirtualFileEntry, VirtualFileSystem, VirtualFileSystemChange, VirtualFileSystemChangeListener, VolarWritableFileSystem, WebgalClientHandlers, createMemoryVolarFileSystem, createVirtualFileSystem, createVolarFileSystem, createWebgalClientHandlers, joinPaths, normalizePath, pathToUri, registerWebgalClientHandlers, toVfsPath, uriToPath };
|
package/build/index.mjs
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import "./monaco/index.mjs";
|
|
1
|
+
import { a as createVolarFileSystem, c as pathToUri, i as createVirtualFileSystem, l as toVfsPath, n as registerWebgalClientHandlers, o as joinPaths, r as createMemoryVolarFileSystem, s as normalizePath, t as createWebgalClientHandlers, u as uriToPath } from "./client-handlers-CrU8stw6.mjs";
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
function createMemoryFileSystem(options) {
|
|
6
|
-
return createVirtualFileSystem(createMemoryVolarFileSystem(options));
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
|
-
export { createMemoryFileSystem, createMemoryVolarFileSystem, createVirtualFileSystem, createVolarFileSystem, createWebgalClientHandlers, createWebgalMonacoLanguageClient, createWebgalMonacoLanguageClientWithWorker, initWebgalMonaco, joinPaths, normalizePath, pathToUri, registerWebgalClientHandlers, toVfsPath, uriToPath };
|
|
3
|
+
export { createMemoryVolarFileSystem, createVirtualFileSystem, createVolarFileSystem, createWebgalClientHandlers, joinPaths, normalizePath, pathToUri, registerWebgalClientHandlers, toVfsPath, uriToPath };
|