modern-monaco 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cache.mjs +3 -3
- package/dist/core.mjs +103 -84
- package/dist/editor-core.mjs +48101 -46108
- package/dist/editor-worker.mjs +308 -441
- package/dist/index.mjs +12 -34
- package/dist/lsp/{language-service.mjs → client.mjs} +16 -9
- package/dist/lsp/css/setup.mjs +9 -9
- package/dist/lsp/css/worker.mjs +81 -69
- package/dist/lsp/html/setup.mjs +11 -11
- package/dist/lsp/html/worker.mjs +94 -86
- package/dist/lsp/index.mjs +20 -0
- package/dist/lsp/json/setup.mjs +8 -8
- package/dist/lsp/json/worker.mjs +696 -89
- package/dist/lsp/typescript/libs.mjs +1 -1
- package/dist/lsp/typescript/setup.mjs +14 -14
- package/dist/lsp/typescript/worker.mjs +45 -30
- package/dist/shiki-wasm.mjs +1 -1
- package/dist/shiki.mjs +43 -25
- package/dist/util.mjs +24 -12
- package/dist/workspace.mjs +22 -29
- package/package.json +13 -10
- package/types/index.d.ts +5 -5
- package/types/monaco.d.ts +147 -122
- package/types/textmate.d.ts +1 -1
- package/types/workspace.d.ts +17 -8
package/dist/lsp/html/worker.mjs
CHANGED
|
@@ -1455,7 +1455,7 @@ function getWellformedEdit(textEdit) {
|
|
|
1455
1455
|
return textEdit;
|
|
1456
1456
|
}
|
|
1457
1457
|
|
|
1458
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
1458
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/htmlLanguageTypes.js
|
|
1459
1459
|
var TokenType;
|
|
1460
1460
|
(function(TokenType2) {
|
|
1461
1461
|
TokenType2[TokenType2["StartCommentTag"] = 0] = "StartCommentTag";
|
|
@@ -1518,7 +1518,7 @@ var FileType;
|
|
|
1518
1518
|
FileType2[FileType2["SymbolicLink"] = 64] = "SymbolicLink";
|
|
1519
1519
|
})(FileType || (FileType = {}));
|
|
1520
1520
|
|
|
1521
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
1521
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/parser/htmlScanner.js
|
|
1522
1522
|
var MultiLineStream = class {
|
|
1523
1523
|
constructor(source, position) {
|
|
1524
1524
|
this.source = source;
|
|
@@ -1909,7 +1909,7 @@ function createScanner(input, initialOffset = 0, initialState = ScannerState.Wit
|
|
|
1909
1909
|
};
|
|
1910
1910
|
}
|
|
1911
1911
|
|
|
1912
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
1912
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/utils/arrays.js
|
|
1913
1913
|
function findFirst(array, p) {
|
|
1914
1914
|
let low = 0, high = array.length;
|
|
1915
1915
|
if (high === 0) {
|
|
@@ -1941,7 +1941,7 @@ function binarySearch(array, key, comparator) {
|
|
|
1941
1941
|
return -(low + 1);
|
|
1942
1942
|
}
|
|
1943
1943
|
|
|
1944
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
1944
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/parser/htmlParser.js
|
|
1945
1945
|
var Node = class {
|
|
1946
1946
|
get attributeNames() {
|
|
1947
1947
|
return this.attributes ? Object.keys(this.attributes) : [];
|
|
@@ -2099,7 +2099,7 @@ var HTMLParser = class {
|
|
|
2099
2099
|
}
|
|
2100
2100
|
};
|
|
2101
2101
|
|
|
2102
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
2102
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/parser/htmlEntities.js
|
|
2103
2103
|
var entities = {
|
|
2104
2104
|
"Aacute;": "\xC1",
|
|
2105
2105
|
"Aacute": "\xC1",
|
|
@@ -4334,7 +4334,7 @@ var entities = {
|
|
|
4334
4334
|
"zwnj;": "\u200C"
|
|
4335
4335
|
};
|
|
4336
4336
|
|
|
4337
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
4337
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/utils/strings.js
|
|
4338
4338
|
function startsWith(haystack, needle) {
|
|
4339
4339
|
if (haystack.length < needle.length) {
|
|
4340
4340
|
return false;
|
|
@@ -4378,12 +4378,12 @@ function isLetterOrDigit(text, index) {
|
|
|
4378
4378
|
return _a <= c && c <= _z || _A <= c && c <= _Z || _0 <= c && c <= _9;
|
|
4379
4379
|
}
|
|
4380
4380
|
|
|
4381
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
4381
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/utils/object.js
|
|
4382
4382
|
function isDefined(obj) {
|
|
4383
4383
|
return typeof obj !== "undefined";
|
|
4384
4384
|
}
|
|
4385
4385
|
|
|
4386
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
4386
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/utils/markup.js
|
|
4387
4387
|
function normalizeMarkupContent(input) {
|
|
4388
4388
|
if (!input) {
|
|
4389
4389
|
return void 0;
|
|
@@ -4400,7 +4400,7 @@ function normalizeMarkupContent(input) {
|
|
|
4400
4400
|
};
|
|
4401
4401
|
}
|
|
4402
4402
|
|
|
4403
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
4403
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/languageFacts/dataProvider.js
|
|
4404
4404
|
var BaselineImages = {
|
|
4405
4405
|
BASELINE_LIMITED: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTAiIHZpZXdCb3g9Ij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AwIDIxMEwzMzAgMTgwWiIgY2xhc3M9ImJsdWUtc2hhcGUiLz4KICA8cGF0aCBkPSJNOTAgNjBMMTIwIDkwTDkwIDEyMEw2MCA5MEw5MCA2MFoiIGNsYXNzPSJibHVlLXNoYXBlIi8+CiAgPHBhdGggZD0iTTM5MCAwTDQyMCAzMEwxNTAgMzAwTDAgMTUwTDMwIDEyMEwxNTAgMjQwTDM5MCAwWiIgY2xhc3M9ImRhcmtlci1ibHVlLXNoYXBlIi8+Cjwvc3ZnPg==",
|
|
@@ -4613,7 +4613,7 @@ function generateDocumentation(item, settings = {}, doesSupportMarkdown) {
|
|
|
4613
4613
|
return result;
|
|
4614
4614
|
}
|
|
4615
4615
|
|
|
4616
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
4616
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/services/pathCompletion.js
|
|
4617
4617
|
var PathCompletionParticipant = class {
|
|
4618
4618
|
constructor(dataManager, readDirectory) {
|
|
4619
4619
|
this.dataManager = dataManager;
|
|
@@ -4724,7 +4724,7 @@ function shiftRange(range, startOffset, endOffset) {
|
|
|
4724
4724
|
return Range.create(start, end);
|
|
4725
4725
|
}
|
|
4726
4726
|
|
|
4727
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
4727
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/services/htmlCompletion.js
|
|
4728
4728
|
var HTMLCompletion = class {
|
|
4729
4729
|
constructor(lsOptions, dataManager) {
|
|
4730
4730
|
this.lsOptions = lsOptions;
|
|
@@ -4810,6 +4810,9 @@ var HTMLCompletion = class {
|
|
|
4810
4810
|
return text.substring(0, offset2);
|
|
4811
4811
|
}
|
|
4812
4812
|
function collectCloseTagSuggestions(afterOpenBracket, inOpenTag, tagNameEnd = offset) {
|
|
4813
|
+
if (settings && settings.hideEndTagSuggestions) {
|
|
4814
|
+
return result;
|
|
4815
|
+
}
|
|
4813
4816
|
const range = getReplaceRange(afterOpenBracket, tagNameEnd);
|
|
4814
4817
|
const closeTag = isFollowedBy(text, tagNameEnd, ScannerState.WithinEndTag, TokenType.EndTagClose) ? "" : ">";
|
|
4815
4818
|
let curr = node;
|
|
@@ -5280,7 +5283,7 @@ function getWordEnd(s, offset, limit) {
|
|
|
5280
5283
|
return offset;
|
|
5281
5284
|
}
|
|
5282
5285
|
|
|
5283
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
5286
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/services/htmlHover.js
|
|
5284
5287
|
var HTMLHover = class {
|
|
5285
5288
|
constructor(lsOptions, dataManager) {
|
|
5286
5289
|
this.lsOptions = lsOptions;
|
|
@@ -5526,12 +5529,12 @@ function trimQuotes(s) {
|
|
|
5526
5529
|
return s;
|
|
5527
5530
|
}
|
|
5528
5531
|
|
|
5529
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
5532
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/beautify/beautify.js
|
|
5530
5533
|
function js_beautify(js_source_text, options) {
|
|
5531
5534
|
return js_source_text;
|
|
5532
5535
|
}
|
|
5533
5536
|
|
|
5534
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
5537
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/beautify/beautify-css.js
|
|
5535
5538
|
var legacy_beautify_css;
|
|
5536
5539
|
(function() {
|
|
5537
5540
|
"use strict";
|
|
@@ -6615,7 +6618,7 @@ var legacy_beautify_css;
|
|
|
6615
6618
|
})();
|
|
6616
6619
|
var css_beautify = legacy_beautify_css;
|
|
6617
6620
|
|
|
6618
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
6621
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/beautify/beautify-html.js
|
|
6619
6622
|
var legacy_beautify_html;
|
|
6620
6623
|
(function() {
|
|
6621
6624
|
"use strict";
|
|
@@ -8754,7 +8757,7 @@ function html_beautify(html_source, options) {
|
|
|
8754
8757
|
return legacy_beautify_html(html_source, options, js_beautify, css_beautify);
|
|
8755
8758
|
}
|
|
8756
8759
|
|
|
8757
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
8760
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/services/htmlFormatter.js
|
|
8758
8761
|
function format2(document, range, options) {
|
|
8759
8762
|
let value = document.getText();
|
|
8760
8763
|
let includesEnd = true;
|
|
@@ -9223,7 +9226,7 @@ var LIB;
|
|
|
9223
9226
|
})();
|
|
9224
9227
|
var { URI: URI2, Utils } = LIB;
|
|
9225
9228
|
|
|
9226
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
9229
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/services/htmlLinks.js
|
|
9227
9230
|
function normalizeRef(url) {
|
|
9228
9231
|
const first = url[0];
|
|
9229
9232
|
const last = url[url.length - 1];
|
|
@@ -9373,7 +9376,7 @@ var HTMLDocumentLinks = class {
|
|
|
9373
9376
|
}
|
|
9374
9377
|
};
|
|
9375
9378
|
|
|
9376
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
9379
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/services/htmlHighlighting.js
|
|
9377
9380
|
function findDocumentHighlights(document, position, htmlDocument) {
|
|
9378
9381
|
const offset = document.offsetAt(position);
|
|
9379
9382
|
const node = htmlDocument.findNodeAt(offset);
|
|
@@ -9411,7 +9414,7 @@ function getTagNameRange(tokenType, document, startOffset) {
|
|
|
9411
9414
|
return null;
|
|
9412
9415
|
}
|
|
9413
9416
|
|
|
9414
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
9417
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/services/htmlSymbolsProvider.js
|
|
9415
9418
|
function findDocumentSymbols(document, htmlDocument) {
|
|
9416
9419
|
const symbols = [];
|
|
9417
9420
|
const symbols2 = findDocumentSymbols2(document, htmlDocument);
|
|
@@ -9462,7 +9465,7 @@ function nodeToName(node) {
|
|
|
9462
9465
|
return name || "?";
|
|
9463
9466
|
}
|
|
9464
9467
|
|
|
9465
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
9468
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/services/htmlRename.js
|
|
9466
9469
|
function doRename(document, position, newName, htmlDocument) {
|
|
9467
9470
|
const offset = document.offsetAt(position);
|
|
9468
9471
|
const node = htmlDocument.findNodeAt(offset);
|
|
@@ -9507,7 +9510,7 @@ function isWithinTagRange(node, offset, nodeTag) {
|
|
|
9507
9510
|
return node.start + "<".length <= offset && offset <= node.start + "<".length + nodeTag.length;
|
|
9508
9511
|
}
|
|
9509
9512
|
|
|
9510
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
9513
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/services/htmlMatchingTagPosition.js
|
|
9511
9514
|
function findMatchingTagPosition(document, position, htmlDocument) {
|
|
9512
9515
|
const offset = document.offsetAt(position);
|
|
9513
9516
|
const node = htmlDocument.findNodeAt(offset);
|
|
@@ -9528,7 +9531,7 @@ function findMatchingTagPosition(document, position, htmlDocument) {
|
|
|
9528
9531
|
return null;
|
|
9529
9532
|
}
|
|
9530
9533
|
|
|
9531
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
9534
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/services/htmlLinkedEditing.js
|
|
9532
9535
|
function findLinkedEditingRanges(document, position, htmlDocument) {
|
|
9533
9536
|
const offset = document.offsetAt(position);
|
|
9534
9537
|
const node = htmlDocument.findNodeAt(offset);
|
|
@@ -9549,7 +9552,7 @@ function findLinkedEditingRanges(document, position, htmlDocument) {
|
|
|
9549
9552
|
return null;
|
|
9550
9553
|
}
|
|
9551
9554
|
|
|
9552
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
9555
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/services/htmlFolding.js
|
|
9553
9556
|
var HTMLFolding = class {
|
|
9554
9557
|
constructor(dataManager) {
|
|
9555
9558
|
this.dataManager = dataManager;
|
|
@@ -9712,7 +9715,7 @@ var HTMLFolding = class {
|
|
|
9712
9715
|
}
|
|
9713
9716
|
};
|
|
9714
9717
|
|
|
9715
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
9718
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/services/htmlSelectionRange.js
|
|
9716
9719
|
var HTMLSelectionRange = class {
|
|
9717
9720
|
constructor(htmlParser) {
|
|
9718
9721
|
this.htmlParser = htmlParser;
|
|
@@ -9848,7 +9851,7 @@ var HTMLSelectionRange = class {
|
|
|
9848
9851
|
}
|
|
9849
9852
|
};
|
|
9850
9853
|
|
|
9851
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
9854
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/languageFacts/data/webCustomData.js
|
|
9852
9855
|
var htmlData = {
|
|
9853
9856
|
"version": 1.1,
|
|
9854
9857
|
"tags": [
|
|
@@ -10198,18 +10201,18 @@ var htmlData = {
|
|
|
10198
10201
|
"value": "This attribute defines the sizes of the icons for visual media contained in the resource. It must be present only if the [`rel`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-rel) contains a value of `icon` or a non-standard type such as Apple's `apple-touch-icon`. It may have the following values:\n\n* `any`, meaning that the icon can be scaled to any size as it is in a vector format, like `image/svg+xml`.\n* a white-space separated list of sizes, each in the format `_<width in pixels>_x_<height in pixels>_` or `_<width in pixels>_X_<height in pixels>_`. Each of these sizes must be contained in the resource.\n\n**Note:** Most icon formats are only able to store one single icon; therefore most of the time the [`sizes`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-sizes) contains only one entry. MS's ICO format does, as well as Apple's ICNS. ICO is more ubiquitous; you should definitely use it."
|
|
10199
10202
|
},
|
|
10200
10203
|
"browsers": [
|
|
10201
|
-
"
|
|
10202
|
-
"
|
|
10203
|
-
"
|
|
10204
|
-
"
|
|
10205
|
-
"
|
|
10204
|
+
"C15",
|
|
10205
|
+
"CA18",
|
|
10206
|
+
"E79",
|
|
10207
|
+
"FF31",
|
|
10208
|
+
"FFA31",
|
|
10206
10209
|
"S6",
|
|
10207
10210
|
"SM6"
|
|
10208
10211
|
],
|
|
10209
10212
|
"status": {
|
|
10210
10213
|
"baseline": "high",
|
|
10211
|
-
"baseline_low_date": "
|
|
10212
|
-
"baseline_high_date": "
|
|
10214
|
+
"baseline_low_date": "2020-01-15",
|
|
10215
|
+
"baseline_high_date": "2022-07-15"
|
|
10213
10216
|
}
|
|
10214
10217
|
},
|
|
10215
10218
|
{
|
|
@@ -11444,8 +11447,8 @@ var htmlData = {
|
|
|
11444
11447
|
],
|
|
11445
11448
|
"status": {
|
|
11446
11449
|
"baseline": "high",
|
|
11447
|
-
"baseline_low_date": "
|
|
11448
|
-
"baseline_high_date": "
|
|
11450
|
+
"baseline_low_date": "2020-01-15",
|
|
11451
|
+
"baseline_high_date": "2022-07-15"
|
|
11449
11452
|
}
|
|
11450
11453
|
},
|
|
11451
11454
|
{
|
|
@@ -13230,8 +13233,8 @@ var htmlData = {
|
|
|
13230
13233
|
],
|
|
13231
13234
|
"status": {
|
|
13232
13235
|
"baseline": "high",
|
|
13233
|
-
"baseline_low_date": "
|
|
13234
|
-
"baseline_high_date": "
|
|
13236
|
+
"baseline_low_date": "2020-01-15",
|
|
13237
|
+
"baseline_high_date": "2022-07-15"
|
|
13235
13238
|
}
|
|
13236
13239
|
},
|
|
13237
13240
|
{
|
|
@@ -13934,15 +13937,7 @@ var htmlData = {
|
|
|
13934
13937
|
{
|
|
13935
13938
|
"name": "codebase",
|
|
13936
13939
|
"description": "The base path used to resolve relative URIs specified by **classid**, **data**, or **archive**. If not specified, the default is the base URI of the current document.",
|
|
13937
|
-
"browsers": [
|
|
13938
|
-
"C1",
|
|
13939
|
-
"CA18",
|
|
13940
|
-
"E12",
|
|
13941
|
-
"FF1",
|
|
13942
|
-
"FFA4",
|
|
13943
|
-
"S3",
|
|
13944
|
-
"SM2"
|
|
13945
|
-
],
|
|
13940
|
+
"browsers": [],
|
|
13946
13941
|
"status": {
|
|
13947
13942
|
"baseline": false
|
|
13948
13943
|
}
|
|
@@ -16981,13 +16976,10 @@ var htmlData = {
|
|
|
16981
16976
|
"E12",
|
|
16982
16977
|
"FF1",
|
|
16983
16978
|
"FFA4",
|
|
16984
|
-
"
|
|
16985
|
-
"SM3.2"
|
|
16979
|
+
"S7"
|
|
16986
16980
|
],
|
|
16987
16981
|
"status": {
|
|
16988
|
-
"baseline":
|
|
16989
|
-
"baseline_low_date": "2015-07-29",
|
|
16990
|
-
"baseline_high_date": "2018-01-29"
|
|
16982
|
+
"baseline": false
|
|
16991
16983
|
}
|
|
16992
16984
|
},
|
|
16993
16985
|
{
|
|
@@ -18635,9 +18627,9 @@ var htmlData = {
|
|
|
18635
18627
|
}
|
|
18636
18628
|
],
|
|
18637
18629
|
"browsers": [
|
|
18638
|
-
"
|
|
18639
|
-
"
|
|
18640
|
-
"
|
|
18630
|
+
"C135",
|
|
18631
|
+
"CA135",
|
|
18632
|
+
"E135"
|
|
18641
18633
|
],
|
|
18642
18634
|
"status": {
|
|
18643
18635
|
"baseline": false
|
|
@@ -19154,8 +19146,8 @@ var htmlData = {
|
|
|
19154
19146
|
],
|
|
19155
19147
|
"status": {
|
|
19156
19148
|
"baseline": "high",
|
|
19157
|
-
"baseline_low_date": "
|
|
19158
|
-
"baseline_high_date": "
|
|
19149
|
+
"baseline_low_date": "2020-01-15",
|
|
19150
|
+
"baseline_high_date": "2022-07-15"
|
|
19159
19151
|
}
|
|
19160
19152
|
},
|
|
19161
19153
|
{
|
|
@@ -19290,8 +19282,9 @@ var htmlData = {
|
|
|
19290
19282
|
"SM6"
|
|
19291
19283
|
],
|
|
19292
19284
|
"status": {
|
|
19293
|
-
"baseline": "
|
|
19294
|
-
"baseline_low_date": "2023-03-14"
|
|
19285
|
+
"baseline": "high",
|
|
19286
|
+
"baseline_low_date": "2023-03-14",
|
|
19287
|
+
"baseline_high_date": "2025-09-14"
|
|
19295
19288
|
}
|
|
19296
19289
|
},
|
|
19297
19290
|
{
|
|
@@ -21741,7 +21734,7 @@ var htmlData = {
|
|
|
21741
21734
|
]
|
|
21742
21735
|
};
|
|
21743
21736
|
|
|
21744
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
21737
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/languageFacts/dataManager.js
|
|
21745
21738
|
var HTMLDataManager = class {
|
|
21746
21739
|
constructor(options) {
|
|
21747
21740
|
this.dataProviders = [];
|
|
@@ -21810,7 +21803,7 @@ var PATH_TAG_AND_ATTR = {
|
|
|
21810
21803
|
video: ["src", "poster"]
|
|
21811
21804
|
};
|
|
21812
21805
|
|
|
21813
|
-
// node_modules/.pnpm/vscode-html-languageservice@5.
|
|
21806
|
+
// node_modules/.pnpm/vscode-html-languageservice@5.6.0/node_modules/vscode-html-languageservice/lib/esm/htmlLanguageService.js
|
|
21814
21807
|
var defaultLanguageServiceOptions = {};
|
|
21815
21808
|
function getLanguageService(options = defaultLanguageServiceOptions) {
|
|
21816
21809
|
const dataManager = new HTMLDataManager(options);
|
|
@@ -22052,21 +22045,36 @@ function getAttributeLanguage(attributeName) {
|
|
|
22052
22045
|
|
|
22053
22046
|
// src/lsp/worker-base.ts
|
|
22054
22047
|
var WorkerBase = class {
|
|
22055
|
-
|
|
22056
|
-
this._ctx = _ctx;
|
|
22057
|
-
this._createData = _createData;
|
|
22058
|
-
this._createLanguageDocument = _createLanguageDocument;
|
|
22059
|
-
}
|
|
22060
|
-
#documentCache = /* @__PURE__ */ new Map();
|
|
22048
|
+
#ctx;
|
|
22061
22049
|
#fs;
|
|
22050
|
+
#documentCache = /* @__PURE__ */ new Map();
|
|
22051
|
+
#createLanguageDocument;
|
|
22052
|
+
constructor(ctx, createData, createLanguageDocument) {
|
|
22053
|
+
this.#ctx = ctx;
|
|
22054
|
+
if (createData.fs) {
|
|
22055
|
+
const dirs = /* @__PURE__ */ new Set(["/"]);
|
|
22056
|
+
this.#fs = new Map(createData.fs.map((path) => {
|
|
22057
|
+
const dir = path.slice(0, path.lastIndexOf("/"));
|
|
22058
|
+
if (dir) {
|
|
22059
|
+
dirs.add(dir);
|
|
22060
|
+
}
|
|
22061
|
+
return ["file://" + path, 1];
|
|
22062
|
+
}));
|
|
22063
|
+
for (const dir of dirs) {
|
|
22064
|
+
this.#fs.set("file://" + dir, 2);
|
|
22065
|
+
}
|
|
22066
|
+
createData.fs.length = 0;
|
|
22067
|
+
}
|
|
22068
|
+
this.#createLanguageDocument = createLanguageDocument;
|
|
22069
|
+
}
|
|
22062
22070
|
get hasFileSystemProvider() {
|
|
22063
|
-
return !!this
|
|
22071
|
+
return !!this.#fs;
|
|
22064
22072
|
}
|
|
22065
22073
|
get host() {
|
|
22066
|
-
return this.
|
|
22074
|
+
return this.#ctx.host;
|
|
22067
22075
|
}
|
|
22068
22076
|
getMirrorModels() {
|
|
22069
|
-
return this.
|
|
22077
|
+
return this.#ctx.getMirrorModels();
|
|
22070
22078
|
}
|
|
22071
22079
|
hasModel(fileName) {
|
|
22072
22080
|
const models = this.getMirrorModels();
|
|
@@ -22107,10 +22115,10 @@ var WorkerBase = class {
|
|
|
22107
22115
|
if (cached && cached[0] === version && cached[2]) {
|
|
22108
22116
|
return cached[2];
|
|
22109
22117
|
}
|
|
22110
|
-
if (!this
|
|
22118
|
+
if (!this.#createLanguageDocument) {
|
|
22111
22119
|
throw new Error("createLanguageDocument is not provided");
|
|
22112
22120
|
}
|
|
22113
|
-
const languageDocument = this
|
|
22121
|
+
const languageDocument = this.#createLanguageDocument(document);
|
|
22114
22122
|
this.#documentCache.set(uri, [version, document, languageDocument]);
|
|
22115
22123
|
return languageDocument;
|
|
22116
22124
|
}
|
|
@@ -22121,10 +22129,12 @@ var WorkerBase = class {
|
|
|
22121
22129
|
if (path.startsWith(uri)) {
|
|
22122
22130
|
const name = path.slice(uri.length);
|
|
22123
22131
|
if (!name.includes("/")) {
|
|
22124
|
-
if (type ===
|
|
22125
|
-
|
|
22126
|
-
|
|
22127
|
-
|
|
22132
|
+
if (type === 1) {
|
|
22133
|
+
if (!extensions || extensions.some((ext) => name.endsWith(ext))) {
|
|
22134
|
+
entries.push([name, 1]);
|
|
22135
|
+
}
|
|
22136
|
+
} else if (type === 2) {
|
|
22137
|
+
entries.push([name, 2]);
|
|
22128
22138
|
}
|
|
22129
22139
|
}
|
|
22130
22140
|
}
|
|
@@ -22133,8 +22143,8 @@ var WorkerBase = class {
|
|
|
22133
22143
|
return entries;
|
|
22134
22144
|
}
|
|
22135
22145
|
getFileSystemProvider() {
|
|
22136
|
-
if (this
|
|
22137
|
-
const host = this.
|
|
22146
|
+
if (this.#fs) {
|
|
22147
|
+
const host = this.#ctx.host;
|
|
22138
22148
|
return {
|
|
22139
22149
|
readDirectory: (uri) => {
|
|
22140
22150
|
return Promise.resolve(this.readDir(uri));
|
|
@@ -22151,29 +22161,27 @@ var WorkerBase = class {
|
|
|
22151
22161
|
}
|
|
22152
22162
|
// resolveReference implementes the `DocumentContext` interface
|
|
22153
22163
|
resolveReference(ref, baseUrl) {
|
|
22154
|
-
const
|
|
22155
|
-
|
|
22156
|
-
if (url.protocol === "file:" && url.pathname !== "/" && this.#fs && !this.#fs.has(href.endsWith("/") ? href.slice(0, -1) : href)) {
|
|
22164
|
+
const { protocol, pathname, href } = new URL(ref, baseUrl);
|
|
22165
|
+
if (protocol === "file:" && pathname !== "/" && this.#fs && !this.#fs.has(href.endsWith("/") ? href.slice(0, -1) : href)) {
|
|
22157
22166
|
return void 0;
|
|
22158
22167
|
}
|
|
22159
22168
|
return href;
|
|
22160
22169
|
}
|
|
22161
22170
|
// #region methods used by the host
|
|
22162
|
-
async
|
|
22171
|
+
async releaseDocument(uri) {
|
|
22163
22172
|
this.#documentCache.delete(uri);
|
|
22164
22173
|
}
|
|
22165
22174
|
async fsNotify(kind, path, type) {
|
|
22166
|
-
const
|
|
22167
|
-
const entries = this.#fs ?? (this.#fs = /* @__PURE__ */ new Map());
|
|
22175
|
+
const fs = this.#fs ?? (this.#fs = /* @__PURE__ */ new Map());
|
|
22168
22176
|
if (kind === "create") {
|
|
22169
22177
|
if (type) {
|
|
22170
|
-
|
|
22178
|
+
fs.set(path, type);
|
|
22171
22179
|
}
|
|
22172
22180
|
} else if (kind === "remove") {
|
|
22173
|
-
if (
|
|
22174
|
-
this.#documentCache.delete(
|
|
22181
|
+
if (fs.get(path) === 1) {
|
|
22182
|
+
this.#documentCache.delete(path);
|
|
22175
22183
|
}
|
|
22176
|
-
|
|
22184
|
+
fs.delete(path);
|
|
22177
22185
|
}
|
|
22178
22186
|
}
|
|
22179
22187
|
// #endregion
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// src/lsp/index.ts
|
|
2
|
+
var builtinLSPProviders = {
|
|
3
|
+
html: {
|
|
4
|
+
import: () => import("./html/setup.mjs")
|
|
5
|
+
},
|
|
6
|
+
css: {
|
|
7
|
+
aliases: ["less", "sass"],
|
|
8
|
+
import: () => import("./css/setup.mjs")
|
|
9
|
+
},
|
|
10
|
+
json: {
|
|
11
|
+
import: () => import("./json/setup.mjs")
|
|
12
|
+
},
|
|
13
|
+
typescript: {
|
|
14
|
+
aliases: ["javascript", "jsx", "tsx"],
|
|
15
|
+
import: () => import("./typescript/setup.mjs")
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
builtinLSPProviders
|
|
20
|
+
};
|
package/dist/lsp/json/setup.mjs
CHANGED
|
@@ -111,7 +111,7 @@ var schemas = [
|
|
|
111
111
|
];
|
|
112
112
|
|
|
113
113
|
// src/lsp/json/setup.ts
|
|
114
|
-
import * as
|
|
114
|
+
import * as client from "../client.mjs";
|
|
115
115
|
async function setup(monaco, languageId, languageSettings, formattingOptions, workspace) {
|
|
116
116
|
const { editor, languages } = monaco;
|
|
117
117
|
const createData = {
|
|
@@ -132,11 +132,11 @@ async function setup(monaco, languageId, languageSettings, formattingOptions, wo
|
|
|
132
132
|
trimFinalNewlines: true,
|
|
133
133
|
...formattingOptions
|
|
134
134
|
},
|
|
135
|
-
workspace:
|
|
135
|
+
fs: workspace ? await client.walkFS(workspace.fs, "/") : void 0
|
|
136
136
|
};
|
|
137
137
|
const worker = editor.createWebWorker({
|
|
138
138
|
worker: getWorker(createData),
|
|
139
|
-
host:
|
|
139
|
+
host: client.createHost(workspace)
|
|
140
140
|
});
|
|
141
141
|
const resetSchema = async (uri) => {
|
|
142
142
|
(await worker.getProxy()).resetSchema(uri.toString());
|
|
@@ -151,9 +151,9 @@ async function setup(monaco, languageId, languageSettings, formattingOptions, wo
|
|
|
151
151
|
resetSchema(event.model.uri);
|
|
152
152
|
}
|
|
153
153
|
});
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
client.registerBasicFeatures(languageId, worker, [" ", ":", '"'], workspace);
|
|
155
|
+
client.registerColorPresentation(languageId, worker);
|
|
156
|
+
client.registerDocumentLinks(languageId, worker);
|
|
157
157
|
languages.registerCodeLensProvider(languageId, {
|
|
158
158
|
provideCodeLenses: function(model, _token) {
|
|
159
159
|
const isImportMap = model.uri.scheme == "file" && ["importmap.json", "import_map.json", "import-map.json", "importMap.json"].some((name) => model.uri.path === "/" + name);
|
|
@@ -249,10 +249,10 @@ function createWebWorker() {
|
|
|
249
249
|
if (workerUrl.origin !== location.origin) {
|
|
250
250
|
return new Worker(
|
|
251
251
|
URL.createObjectURL(new Blob([`import "${workerUrl.href}"`], { type: "application/javascript" })),
|
|
252
|
-
{ type: "module" }
|
|
252
|
+
{ type: "module", name: "json-worker" }
|
|
253
253
|
);
|
|
254
254
|
}
|
|
255
|
-
return new Worker(
|
|
255
|
+
return new Worker(workerUrl, { type: "module", name: "json-worker" });
|
|
256
256
|
}
|
|
257
257
|
function getWorker(createData) {
|
|
258
258
|
const worker = createWebWorker();
|