@codingame/monaco-vscode-api 1.67.10 → 1.67.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.js +63 -59
- package/dist/messages.js +6 -13
- package/dist/{missing-services-8a03a564.js → missing-services-71e80bea.js} +182 -7
- package/dist/modelEditor.js +6 -2
- package/dist/{services-ac6b4b50.js → services-fb7952fb.js} +21 -24
- package/dist/services.js +1 -1
- package/package.json +1 -1
package/dist/api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as isStringArray, E as Emitter, u as unsupported$1 } from './missing-services-
|
|
2
|
-
import { _ as __classPrivateFieldSet, a as __classPrivateFieldGet, b as __decorate, c as coalesceInPlace, m as markAsFileSystemProviderError, F as FileSystemProviderErrorCode, S as SIDE_GROUP, A as ACTIVE_GROUP, d as __param, C as CancellationTokenSource$1, I as IProgressService, r as readonly, e as ITextFileService, f as IFileService, g as IWorkbenchEnvironmentService, h as IUriIdentityService, i as IWorkingCopyFileService, j as IPathService, k as disposed, l as IEditorService, n as IEditorGroupsService, o as IPaneCompositePartService, p as IProductService, q as ILanguageStatusService, s as IHostService, t as Services, u as FileType$1, v as FilePermission$1 } from './services-
|
|
1
|
+
import { i as isStringArray, E as Emitter, u as unsupported$1 } from './missing-services-71e80bea.js';
|
|
2
|
+
import { _ as __classPrivateFieldSet, a as __classPrivateFieldGet, b as __decorate, c as coalesceInPlace, m as markAsFileSystemProviderError, F as FileSystemProviderErrorCode, S as SIDE_GROUP, A as ACTIVE_GROUP, d as __param, C as CancellationTokenSource$1, I as IProgressService, r as readonly, e as ITextFileService, f as IFileService, g as IWorkbenchEnvironmentService, h as IUriIdentityService, i as IWorkingCopyFileService, j as IPathService, k as disposed, l as IEditorService, n as IEditorGroupsService, o as IPaneCompositePartService, p as IProductService, q as ILanguageStatusService, s as IHostService, t as Services, u as FileType$1, v as FilePermission$1 } from './services-fb7952fb.js';
|
|
3
3
|
import { illegalArgument, onUnexpectedError, canceled, transformErrorForSerialization, isCancellationError, onUnexpectedExternalError, CancellationError as CancellationError$1 } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
4
4
|
import { uriToFsPath, URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
5
5
|
import { equals, coalesce, asArray, isNonEmptyArray, groupBy, isFalsyOrEmpty } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
@@ -73,6 +73,10 @@ import { IndentAction as IndentAction$1 } from 'monaco-editor/esm/vs/editor/comm
|
|
|
73
73
|
import 'monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.js';
|
|
74
74
|
import 'monaco-editor/esm/vs/base/common/color.js';
|
|
75
75
|
import 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
76
|
+
import 'monaco-editor/esm/vs/editor/common/services/languageService.js';
|
|
77
|
+
import 'monaco-editor/esm/vs/editor/common/services/languagesRegistry.js';
|
|
78
|
+
import 'monaco-editor/esm/vs/editor/common/languages/modesRegistry.js';
|
|
79
|
+
import 'monaco-editor/esm/vs/editor/common/languages.js';
|
|
76
80
|
import 'monaco-editor/esm/vs/base/parts/quickinput/browser/quickInput.js';
|
|
77
81
|
import 'monaco-editor/esm/vs/platform/instantiation/common/extensions.js';
|
|
78
82
|
import 'monaco-editor/esm/vs/platform/label/common/label.js';
|
|
@@ -268,6 +272,8 @@ function toLocalResource(resource, authority, localScheme) {
|
|
|
268
272
|
}
|
|
269
273
|
return resource.with({ scheme: localScheme });
|
|
270
274
|
}
|
|
275
|
+
const Range$3 = monaco.Range;
|
|
276
|
+
const FoldingRangeKind$3 = monaco.languages.FoldingRangeKind;
|
|
271
277
|
const _simplePattern = /^(.+)\/(.+?)(;.+)?$/;
|
|
272
278
|
function normalizeMimeType(mimeType, strict) {
|
|
273
279
|
const match = _simplePattern.exec(mimeType);
|
|
@@ -482,7 +488,7 @@ let Position$3 = Position_1 = class Position {
|
|
|
482
488
|
Position$3 = Position_1 = __decorate([
|
|
483
489
|
es5ClassCompat
|
|
484
490
|
], Position$3);
|
|
485
|
-
let Range$
|
|
491
|
+
let Range$2 = Range_1 = class Range {
|
|
486
492
|
constructor(startLineOrStart, startColumnOrEnd, endLine, endColumn) {
|
|
487
493
|
let start;
|
|
488
494
|
let end;
|
|
@@ -607,10 +613,10 @@ let Range$3 = Range_1 = class Range {
|
|
|
607
613
|
return [this.start, this.end];
|
|
608
614
|
}
|
|
609
615
|
};
|
|
610
|
-
Range$
|
|
616
|
+
Range$2 = Range_1 = __decorate([
|
|
611
617
|
es5ClassCompat
|
|
612
|
-
], Range$
|
|
613
|
-
let Selection$3 = Selection_1 = class Selection extends Range$
|
|
618
|
+
], Range$2);
|
|
619
|
+
let Selection$3 = Selection_1 = class Selection extends Range$2 {
|
|
614
620
|
constructor(anchorLineOrAnchor, anchorColumnOrActive, activeLine, activeColumn) {
|
|
615
621
|
let anchor;
|
|
616
622
|
let active;
|
|
@@ -636,7 +642,7 @@ let Selection$3 = Selection_1 = class Selection extends Range$3 {
|
|
|
636
642
|
if (!thing) {
|
|
637
643
|
return false;
|
|
638
644
|
}
|
|
639
|
-
return Range$
|
|
645
|
+
return Range$2.isRange(thing)
|
|
640
646
|
&& Position$3.isPosition(thing.anchor)
|
|
641
647
|
&& Position$3.isPosition(thing.active)
|
|
642
648
|
&& typeof thing.isReversed === 'boolean';
|
|
@@ -685,7 +691,7 @@ let TextEdit$2 = TextEdit_1 = class TextEdit {
|
|
|
685
691
|
if (!thing) {
|
|
686
692
|
return false;
|
|
687
693
|
}
|
|
688
|
-
return Range$
|
|
694
|
+
return Range$2.isRange(thing)
|
|
689
695
|
&& typeof thing.newText === 'string';
|
|
690
696
|
}
|
|
691
697
|
static replace(range, newText) {
|
|
@@ -694,13 +700,13 @@ let TextEdit$2 = TextEdit_1 = class TextEdit {
|
|
|
694
700
|
);
|
|
695
701
|
}
|
|
696
702
|
static insert(position, newText) {
|
|
697
|
-
return TextEdit_1.replace( new Range$
|
|
703
|
+
return TextEdit_1.replace( new Range$2(position, position), newText);
|
|
698
704
|
}
|
|
699
705
|
static delete(range) {
|
|
700
706
|
return TextEdit_1.replace(range, '');
|
|
701
707
|
}
|
|
702
708
|
static setEndOfLine(eol) {
|
|
703
|
-
const ret = new TextEdit_1( new Range$
|
|
709
|
+
const ret = new TextEdit_1( new Range$2( new Position$3(0, 0), new Position$3(0, 0)), '');
|
|
704
710
|
ret.newEol = eol;
|
|
705
711
|
return ret;
|
|
706
712
|
}
|
|
@@ -708,7 +714,7 @@ let TextEdit$2 = TextEdit_1 = class TextEdit {
|
|
|
708
714
|
return this._range;
|
|
709
715
|
}
|
|
710
716
|
set range(value) {
|
|
711
|
-
if (value && !Range$
|
|
717
|
+
if (value && !Range$2.isRange(value)) {
|
|
712
718
|
throw illegalArgument('range');
|
|
713
719
|
}
|
|
714
720
|
this._range = value;
|
|
@@ -792,7 +798,7 @@ let WorkspaceEdit$2 = class WorkspaceEdit {
|
|
|
792
798
|
this._edits.push({ _type: 2 , uri, edit: new TextEdit$2(range, newText), metadata });
|
|
793
799
|
}
|
|
794
800
|
insert(resource, position, newText, metadata) {
|
|
795
|
-
this.replace(resource, new Range$
|
|
801
|
+
this.replace(resource, new Range$2(position, position), newText, metadata);
|
|
796
802
|
}
|
|
797
803
|
delete(resource, range, metadata) {
|
|
798
804
|
this.replace(resource, range, '', metadata);
|
|
@@ -944,11 +950,11 @@ let Location$1 = Location_1 = class Location {
|
|
|
944
950
|
constructor(uri, rangeOrPosition) {
|
|
945
951
|
this.uri = uri;
|
|
946
952
|
if (!rangeOrPosition) ;
|
|
947
|
-
else if (Range$
|
|
948
|
-
this.range = Range$
|
|
953
|
+
else if (Range$2.isRange(rangeOrPosition)) {
|
|
954
|
+
this.range = Range$2.of(rangeOrPosition);
|
|
949
955
|
}
|
|
950
956
|
else if (Position$3.isPosition(rangeOrPosition)) {
|
|
951
|
-
this.range = new Range$
|
|
957
|
+
this.range = new Range$2(rangeOrPosition, rangeOrPosition);
|
|
952
958
|
}
|
|
953
959
|
else {
|
|
954
960
|
throw new Error('Illegal argument');
|
|
@@ -961,7 +967,7 @@ let Location$1 = Location_1 = class Location {
|
|
|
961
967
|
if (!thing) {
|
|
962
968
|
return false;
|
|
963
969
|
}
|
|
964
|
-
return Range$
|
|
970
|
+
return Range$2.isRange(thing.range)
|
|
965
971
|
&& URI.isUri(thing.uri);
|
|
966
972
|
}
|
|
967
973
|
toJSON() {
|
|
@@ -985,7 +991,7 @@ let DiagnosticRelatedInformation$2 = class DiagnosticRelatedInformation {
|
|
|
985
991
|
}
|
|
986
992
|
return typeof thing.message === 'string'
|
|
987
993
|
&& thing.location
|
|
988
|
-
&& Range$
|
|
994
|
+
&& Range$2.isRange(thing.location.range)
|
|
989
995
|
&& URI.isUri(thing.location.uri);
|
|
990
996
|
}
|
|
991
997
|
static isEqual(a, b) {
|
|
@@ -1005,7 +1011,7 @@ DiagnosticRelatedInformation$2 = __decorate([
|
|
|
1005
1011
|
], DiagnosticRelatedInformation$2);
|
|
1006
1012
|
let Diagnostic$2 = class Diagnostic {
|
|
1007
1013
|
constructor(range, message, severity = DiagnosticSeverity$2.Error) {
|
|
1008
|
-
if (!Range$
|
|
1014
|
+
if (!Range$2.isRange(range)) {
|
|
1009
1015
|
throw new TypeError('range must be set');
|
|
1010
1016
|
}
|
|
1011
1017
|
if (!message) {
|
|
@@ -1126,7 +1132,7 @@ let SymbolInformation$1 = SymbolInformation_1 = class SymbolInformation {
|
|
|
1126
1132
|
if (locationOrUri instanceof Location$1) {
|
|
1127
1133
|
this.location = locationOrUri;
|
|
1128
1134
|
}
|
|
1129
|
-
else if (rangeOrContainer instanceof Range$
|
|
1135
|
+
else if (rangeOrContainer instanceof Range$2) {
|
|
1130
1136
|
this.location = new Location$1(locationOrUri, rangeOrContainer);
|
|
1131
1137
|
}
|
|
1132
1138
|
SymbolInformation_1.validate(this);
|
|
@@ -1527,7 +1533,7 @@ let DocumentLink$2 = class DocumentLink {
|
|
|
1527
1533
|
if (target && !(URI.isUri(target))) {
|
|
1528
1534
|
throw illegalArgument('target');
|
|
1529
1535
|
}
|
|
1530
|
-
if (!Range$
|
|
1536
|
+
if (!Range$2.isRange(range) || range.isEmpty) {
|
|
1531
1537
|
throw illegalArgument('range');
|
|
1532
1538
|
}
|
|
1533
1539
|
this.range = range;
|
|
@@ -1553,7 +1559,7 @@ let ColorInformation$1 = class ColorInformation {
|
|
|
1553
1559
|
if (color && !(color instanceof Color$2)) {
|
|
1554
1560
|
throw illegalArgument('color');
|
|
1555
1561
|
}
|
|
1556
|
-
if (!Range$
|
|
1562
|
+
if (!Range$2.isRange(range) || range.isEmpty) {
|
|
1557
1563
|
throw illegalArgument('range');
|
|
1558
1564
|
}
|
|
1559
1565
|
this.range = range;
|
|
@@ -2333,12 +2339,12 @@ let FoldingRange$2 = class FoldingRange {
|
|
|
2333
2339
|
FoldingRange$2 = __decorate([
|
|
2334
2340
|
es5ClassCompat
|
|
2335
2341
|
], FoldingRange$2);
|
|
2336
|
-
var FoldingRangeKind$
|
|
2342
|
+
var FoldingRangeKind$2;
|
|
2337
2343
|
(function(FoldingRangeKind) {
|
|
2338
2344
|
FoldingRangeKind[FoldingRangeKind["Comment"] = 1] = "Comment";
|
|
2339
2345
|
FoldingRangeKind[FoldingRangeKind["Imports"] = 2] = "Imports";
|
|
2340
2346
|
FoldingRangeKind[FoldingRangeKind["Region"] = 3] = "Region";
|
|
2341
|
-
})(FoldingRangeKind$
|
|
2347
|
+
})(FoldingRangeKind$2 || (FoldingRangeKind$2 = {}));
|
|
2342
2348
|
var CommentThreadCollapsibleState$1;
|
|
2343
2349
|
(function(CommentThreadCollapsibleState) {
|
|
2344
2350
|
CommentThreadCollapsibleState[CommentThreadCollapsibleState["Collapsed"] = 0] = "Collapsed";
|
|
@@ -2385,7 +2391,7 @@ class SemanticTokensBuilder$1 {
|
|
|
2385
2391
|
}
|
|
2386
2392
|
return this._pushEncoded(arg0, arg1, arg2, arg3, arg4);
|
|
2387
2393
|
}
|
|
2388
|
-
if (Range$
|
|
2394
|
+
if (Range$2.isRange(arg0) && typeof arg1 === 'string' && isStrArrayOrUndefined(arg2)) {
|
|
2389
2395
|
return this._push(arg0, arg1, arg2);
|
|
2390
2396
|
}
|
|
2391
2397
|
throw illegalArgument();
|
|
@@ -2868,8 +2874,6 @@ function cursorStyleToString(cursorStyle) {
|
|
|
2868
2874
|
}
|
|
2869
2875
|
}
|
|
2870
2876
|
const marked = marked$1.marked;
|
|
2871
|
-
const Range$2 = monaco.Range;
|
|
2872
|
-
const FoldingRangeKind$2 = monaco.languages.FoldingRangeKind;
|
|
2873
2877
|
var EditorActivation;
|
|
2874
2878
|
(function(EditorActivation) {
|
|
2875
2879
|
EditorActivation[EditorActivation["ACTIVATE"] = 1] = "ACTIVATE";
|
|
@@ -2927,7 +2931,7 @@ var Range$1;
|
|
|
2927
2931
|
return undefined;
|
|
2928
2932
|
}
|
|
2929
2933
|
const { startLineNumber, startColumn, endLineNumber, endColumn } = range;
|
|
2930
|
-
return new Range$
|
|
2934
|
+
return new Range$2(startLineNumber - 1, startColumn - 1, endLineNumber - 1, endColumn - 1);
|
|
2931
2935
|
}
|
|
2932
2936
|
Range.to = to;
|
|
2933
2937
|
})(Range$1 || (Range$1 = {}));
|
|
@@ -4057,12 +4061,12 @@ var FoldingRangeKind$1;
|
|
|
4057
4061
|
function from(kind) {
|
|
4058
4062
|
if (kind) {
|
|
4059
4063
|
switch (kind) {
|
|
4060
|
-
case FoldingRangeKind$
|
|
4061
|
-
return FoldingRangeKind$
|
|
4062
|
-
case FoldingRangeKind$
|
|
4063
|
-
return FoldingRangeKind$
|
|
4064
|
-
case FoldingRangeKind$
|
|
4065
|
-
return FoldingRangeKind$
|
|
4064
|
+
case FoldingRangeKind$2.Comment:
|
|
4065
|
+
return FoldingRangeKind$3.Comment;
|
|
4066
|
+
case FoldingRangeKind$2.Imports:
|
|
4067
|
+
return FoldingRangeKind$3.Imports;
|
|
4068
|
+
case FoldingRangeKind$2.Region:
|
|
4069
|
+
return FoldingRangeKind$3.Region;
|
|
4066
4070
|
}
|
|
4067
4071
|
}
|
|
4068
4072
|
return undefined;
|
|
@@ -4559,13 +4563,13 @@ let ExtHostCommands = class ExtHostCommands {
|
|
|
4559
4563
|
{
|
|
4560
4564
|
processArgument(arg) {
|
|
4561
4565
|
return cloneAndChange(arg, function (obj) {
|
|
4562
|
-
if (Range$
|
|
4566
|
+
if (Range$3.isIRange(obj)) {
|
|
4563
4567
|
return Range$1.to(obj);
|
|
4564
4568
|
}
|
|
4565
4569
|
if (Position$1.isIPosition(obj)) {
|
|
4566
4570
|
return Position$2.to(obj);
|
|
4567
4571
|
}
|
|
4568
|
-
if (Range$
|
|
4572
|
+
if (Range$3.isIRange(obj.range) && URI.isUri(obj.uri)) {
|
|
4569
4573
|
return location.to(obj);
|
|
4570
4574
|
}
|
|
4571
4575
|
if (obj instanceof VSBuffer) {
|
|
@@ -4637,7 +4641,7 @@ let ExtHostCommands = class ExtHostCommands {
|
|
|
4637
4641
|
if (value instanceof Position$3) {
|
|
4638
4642
|
return Position$2.from(value);
|
|
4639
4643
|
}
|
|
4640
|
-
else if (value instanceof Range$
|
|
4644
|
+
else if (value instanceof Range$2) {
|
|
4641
4645
|
return Range$1.from(value);
|
|
4642
4646
|
}
|
|
4643
4647
|
else if (value instanceof Location$1) {
|
|
@@ -7163,7 +7167,7 @@ class ExtHostDocumentData extends MirrorTextModel {
|
|
|
7163
7167
|
);
|
|
7164
7168
|
}
|
|
7165
7169
|
_validateRange(range) {
|
|
7166
|
-
if (!(range instanceof Range$
|
|
7170
|
+
if (!(range instanceof Range$2)) {
|
|
7167
7171
|
throw new Error('Invalid argument');
|
|
7168
7172
|
}
|
|
7169
7173
|
const start = this._validatePosition(range.start);
|
|
@@ -7172,7 +7176,7 @@ class ExtHostDocumentData extends MirrorTextModel {
|
|
|
7172
7176
|
return range;
|
|
7173
7177
|
}
|
|
7174
7178
|
return (
|
|
7175
|
-
new Range$
|
|
7179
|
+
new Range$2(start.line, start.character, end.line, end.character)
|
|
7176
7180
|
);
|
|
7177
7181
|
}
|
|
7178
7182
|
_validatePosition(position) {
|
|
@@ -7223,7 +7227,7 @@ class ExtHostDocumentData extends MirrorTextModel {
|
|
|
7223
7227
|
const wordAtText = getWordAtText(position.character + 1, ensureValidWordDefinition(regexp), this._lines[position.line], 0);
|
|
7224
7228
|
if (wordAtText) {
|
|
7225
7229
|
return (
|
|
7226
|
-
new Range$
|
|
7230
|
+
new Range$2(
|
|
7227
7231
|
position.line,
|
|
7228
7232
|
wordAtText.startColumn - 1,
|
|
7229
7233
|
position.line,
|
|
@@ -7248,7 +7252,7 @@ class ExtHostDocumentLine {
|
|
|
7248
7252
|
}
|
|
7249
7253
|
get range() {
|
|
7250
7254
|
return (
|
|
7251
|
-
new Range$
|
|
7255
|
+
new Range$2(this._line, 0, this._line, this._text.length)
|
|
7252
7256
|
);
|
|
7253
7257
|
}
|
|
7254
7258
|
get rangeIncludingLineBreak() {
|
|
@@ -7256,7 +7260,7 @@ class ExtHostDocumentLine {
|
|
|
7256
7260
|
return this.range;
|
|
7257
7261
|
}
|
|
7258
7262
|
return (
|
|
7259
|
-
new Range$
|
|
7263
|
+
new Range$2(this._line, 0, this._line + 1, 0)
|
|
7260
7264
|
);
|
|
7261
7265
|
}
|
|
7262
7266
|
get firstNonWhitespaceCharacterIndex() {
|
|
@@ -8425,7 +8429,7 @@ let MainThreadDocumentContentProviders = class MainThreadDocumentContentProvider
|
|
|
8425
8429
|
return;
|
|
8426
8430
|
}
|
|
8427
8431
|
if (edits && edits.length > 0) {
|
|
8428
|
-
model.applyEdits(edits.map(edit => EditOperation.replace(Range$
|
|
8432
|
+
model.applyEdits(edits.map(edit => EditOperation.replace(Range$3.lift(edit.range), edit.text)));
|
|
8429
8433
|
}
|
|
8430
8434
|
}).catch(onUnexpectedError);
|
|
8431
8435
|
}
|
|
@@ -8538,9 +8542,9 @@ class TextEditorEdit {
|
|
|
8538
8542
|
this._throwIfFinalized();
|
|
8539
8543
|
let range = null;
|
|
8540
8544
|
if (location instanceof Position$3) {
|
|
8541
|
-
range = new Range$
|
|
8545
|
+
range = new Range$2(location, location);
|
|
8542
8546
|
}
|
|
8543
|
-
else if (location instanceof Range$
|
|
8547
|
+
else if (location instanceof Range$2) {
|
|
8544
8548
|
range = location;
|
|
8545
8549
|
}
|
|
8546
8550
|
else {
|
|
@@ -8550,12 +8554,12 @@ class TextEditorEdit {
|
|
|
8550
8554
|
}
|
|
8551
8555
|
insert(location, value) {
|
|
8552
8556
|
this._throwIfFinalized();
|
|
8553
|
-
this._pushEdit( new Range$
|
|
8557
|
+
this._pushEdit( new Range$2(location, location), value, true);
|
|
8554
8558
|
}
|
|
8555
8559
|
delete(location) {
|
|
8556
8560
|
this._throwIfFinalized();
|
|
8557
8561
|
let range = null;
|
|
8558
|
-
if (location instanceof Range$
|
|
8562
|
+
if (location instanceof Range$2) {
|
|
8559
8563
|
range = location;
|
|
8560
8564
|
}
|
|
8561
8565
|
else {
|
|
@@ -8818,13 +8822,13 @@ class ExtHostTextEditor {
|
|
|
8818
8822
|
const { lineNumber, column } = Position$2.from(where);
|
|
8819
8823
|
ranges = [{ startLineNumber: lineNumber, startColumn: column, endLineNumber: lineNumber, endColumn: column }];
|
|
8820
8824
|
}
|
|
8821
|
-
else if (where instanceof Range$
|
|
8825
|
+
else if (where instanceof Range$2) {
|
|
8822
8826
|
ranges = [Range$1.from(where)];
|
|
8823
8827
|
}
|
|
8824
8828
|
else {
|
|
8825
8829
|
ranges = [];
|
|
8826
8830
|
for (const posOrRange of where) {
|
|
8827
|
-
if (posOrRange instanceof Range$
|
|
8831
|
+
if (posOrRange instanceof Range$2) {
|
|
8828
8832
|
ranges.push(Range$1.from(posOrRange));
|
|
8829
8833
|
}
|
|
8830
8834
|
else {
|
|
@@ -9743,7 +9747,7 @@ class MainThreadTextEditor {
|
|
|
9743
9747
|
}
|
|
9744
9748
|
const ranges = [];
|
|
9745
9749
|
for (let i = 0, len = Math.floor(_ranges.length / 4); i < len; i++) {
|
|
9746
|
-
ranges[i] = new Range$
|
|
9750
|
+
ranges[i] = new Range$3(_ranges[4 * i], _ranges[4 * i + 1], _ranges[4 * i + 2], _ranges[4 * i + 3]);
|
|
9747
9751
|
}
|
|
9748
9752
|
this._codeEditor.setDecorationsFast(key, ranges);
|
|
9749
9753
|
}
|
|
@@ -9793,7 +9797,7 @@ class MainThreadTextEditor {
|
|
|
9793
9797
|
}
|
|
9794
9798
|
const transformedEdits = edits.map((edit) => {
|
|
9795
9799
|
return {
|
|
9796
|
-
range: Range$
|
|
9800
|
+
range: Range$3.lift(edit.range),
|
|
9797
9801
|
text: edit.text,
|
|
9798
9802
|
forceMoveMarkers: edit.forceMoveMarkers
|
|
9799
9803
|
};
|
|
@@ -10807,7 +10811,7 @@ class ExtHostLanguages {
|
|
|
10807
10811
|
const info = await this._proxy.$tokensAtPosition(document.uri, pos);
|
|
10808
10812
|
const defaultRange = {
|
|
10809
10813
|
type: StandardTokenType.Other,
|
|
10810
|
-
range: document.getWordRangeAtPosition(position) ?? new Range$
|
|
10814
|
+
range: document.getWordRangeAtPosition(position) ?? new Range$2(position.line, position.character, position.line, position.character)
|
|
10811
10815
|
};
|
|
10812
10816
|
if (!info) {
|
|
10813
10817
|
return defaultRange;
|
|
@@ -10979,7 +10983,7 @@ let MainThreadLanguages = class MainThreadLanguages {
|
|
|
10979
10983
|
const idx = tokens.findTokenIndexAtOffset(position.column - 1);
|
|
10980
10984
|
return {
|
|
10981
10985
|
type: tokens.getStandardTokenType(idx),
|
|
10982
|
-
range: new Range$
|
|
10986
|
+
range: new Range$3(
|
|
10983
10987
|
position.lineNumber,
|
|
10984
10988
|
1 + tokens.getStartOffset(idx),
|
|
10985
10989
|
position.lineNumber,
|
|
@@ -11308,7 +11312,7 @@ class DocumentSymbolAdapter {
|
|
|
11308
11312
|
break;
|
|
11309
11313
|
}
|
|
11310
11314
|
const parent = parentStack[parentStack.length - 1];
|
|
11311
|
-
if (Range$
|
|
11315
|
+
if (Range$3.containsRange(parent.range, element.range) && !Range$3.equalsRange(parent.range, element.range)) {
|
|
11312
11316
|
if (parent.children) {
|
|
11313
11317
|
parent.children.push(element);
|
|
11314
11318
|
}
|
|
@@ -11456,7 +11460,7 @@ class HoverAdapter {
|
|
|
11456
11460
|
value.range = doc.getWordRangeAtPosition(pos);
|
|
11457
11461
|
}
|
|
11458
11462
|
if (!value.range) {
|
|
11459
|
-
value.range = new Range$
|
|
11463
|
+
value.range = new Range$2(pos, pos);
|
|
11460
11464
|
}
|
|
11461
11465
|
return Hover$1.from(value);
|
|
11462
11466
|
}
|
|
@@ -11768,7 +11772,7 @@ class RenameAdapter {
|
|
|
11768
11772
|
const rangeOrLocation = await this._provider.prepareRename(doc, pos, token);
|
|
11769
11773
|
let range;
|
|
11770
11774
|
let text;
|
|
11771
|
-
if (Range$
|
|
11775
|
+
if (Range$2.isRange(rangeOrLocation)) {
|
|
11772
11776
|
range = rangeOrLocation;
|
|
11773
11777
|
text = doc.getText(rangeOrLocation);
|
|
11774
11778
|
}
|
|
@@ -11972,7 +11976,7 @@ class SuggestAdapter {
|
|
|
11972
11976
|
async provideCompletionItems(resource, position, context, token) {
|
|
11973
11977
|
const doc = this._documents.getDocument(resource);
|
|
11974
11978
|
const pos = Position$2.to(position);
|
|
11975
|
-
const replaceRange = doc.getWordRangeAtPosition(pos) || new Range$
|
|
11979
|
+
const replaceRange = doc.getWordRangeAtPosition(pos) || new Range$2(pos, pos);
|
|
11976
11980
|
const insertRange = replaceRange.with({ end: pos });
|
|
11977
11981
|
const sw = new StopWatch(true);
|
|
11978
11982
|
const itemsOrList = await this._provider.provideCompletionItems(doc, pos, token, CompletionContext.to(context));
|
|
@@ -12058,7 +12062,7 @@ class SuggestAdapter {
|
|
|
12058
12062
|
else if (item.range) {
|
|
12059
12063
|
range = item.range;
|
|
12060
12064
|
}
|
|
12061
|
-
if (Range$
|
|
12065
|
+
if (Range$2.isRange(range)) {
|
|
12062
12066
|
result["j" ] = Range$1.from(range);
|
|
12063
12067
|
}
|
|
12064
12068
|
else if (range && (!defaultInsertRange?.isEqual(range.inserting) || !defaultReplaceRange?.isEqual(range.replacing))) {
|
|
@@ -14683,7 +14687,7 @@ const api = {
|
|
|
14683
14687
|
FileType: FileType$1,
|
|
14684
14688
|
FilePermission: FilePermission$1,
|
|
14685
14689
|
FoldingRange: FoldingRange$2,
|
|
14686
|
-
FoldingRangeKind: FoldingRangeKind$
|
|
14690
|
+
FoldingRangeKind: FoldingRangeKind$2,
|
|
14687
14691
|
FunctionBreakpoint: FunctionBreakpoint$1,
|
|
14688
14692
|
Hover: Hover$2,
|
|
14689
14693
|
IndentAction: IndentAction$1,
|
|
@@ -14695,7 +14699,7 @@ const api = {
|
|
|
14695
14699
|
ProcessExecution: ProcessExecution$1,
|
|
14696
14700
|
ProgressLocation: ProgressLocation$2,
|
|
14697
14701
|
QuickInputButtons: QuickInputButtons$1,
|
|
14698
|
-
Range: Range$
|
|
14702
|
+
Range: Range$2,
|
|
14699
14703
|
RelativePattern: RelativePattern$1,
|
|
14700
14704
|
Selection: Selection$3,
|
|
14701
14705
|
SelectionRange: SelectionRange$2,
|
package/dist/messages.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as Emitter, a as assertAllDefined, I as ILifecycleService, u as unsupported } from './missing-services-
|
|
2
|
-
import { b as __decorate, d as __param, f as IFileService, w as refineServiceDecorator, n as IEditorGroupsService, s as IHostService, p as IProductService } from './services-
|
|
1
|
+
import { E as Emitter, N as NotificationsFilter, a as assertAllDefined, I as ILifecycleService, b as NeverShowAgainScope, u as unsupported } from './missing-services-71e80bea.js';
|
|
2
|
+
import { b as __decorate, d as __param, f as IFileService, w as refineServiceDecorator, n as IEditorGroupsService, s as IHostService, p as IProductService } from './services-fb7952fb.js';
|
|
3
3
|
import { editorWidgetBackground, editorWidgetForeground, widgetShadow, contrastBorder, buttonForeground, buttonBackground, buttonSecondaryBackground, buttonSecondaryForeground, buttonSecondaryHoverBackground, buttonHoverBackground, buttonBorder, simpleCheckboxBorder, simpleCheckboxBackground, simpleCheckboxForeground, problemsErrorIconForeground, problemsWarningIconForeground, problemsInfoIconForeground, inputBackground, inputForeground, inputBorder, textLinkForeground, progressBarBackground, resolveColorValue, registerColor, editorBackground, transparent, treeIndentGuidesStroke, focusBorder, listActiveSelectionBackground, darken, listActiveSelectionForeground, editorInfoForeground, errorForeground, editorWarningForeground, activeContrastBorder, lighten, editorErrorForeground } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
|
|
4
4
|
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
5
5
|
import { Color } from 'monaco-editor/esm/vs/base/common/color.js';
|
|
@@ -53,6 +53,10 @@ import { DeferredPromise } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
|
53
53
|
import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
|
|
54
54
|
import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
55
55
|
import 'monaco-editor/esm/vs/base/common/buffer.js';
|
|
56
|
+
import 'monaco-editor/esm/vs/editor/common/services/languageService.js';
|
|
57
|
+
import 'monaco-editor/esm/vs/editor/common/services/languagesRegistry.js';
|
|
58
|
+
import 'monaco-editor/esm/vs/editor/common/languages/modesRegistry.js';
|
|
59
|
+
import 'monaco-editor/esm/vs/editor/common/languages.js';
|
|
56
60
|
import 'monaco-editor/esm/vs/base/parts/quickinput/browser/quickInput.js';
|
|
57
61
|
import 'monaco-editor/esm/vs/platform/instantiation/common/extensions.js';
|
|
58
62
|
import 'monaco-editor/esm/vs/platform/label/common/label.js';
|
|
@@ -79,17 +83,6 @@ function isErrorWithActions(obj) {
|
|
|
79
83
|
const candidate = obj;
|
|
80
84
|
return candidate instanceof Error && Array.isArray(candidate.actions);
|
|
81
85
|
}
|
|
82
|
-
var NeverShowAgainScope;
|
|
83
|
-
(function(NeverShowAgainScope) {
|
|
84
|
-
NeverShowAgainScope[NeverShowAgainScope["WORKSPACE"] = 0] = "WORKSPACE";
|
|
85
|
-
NeverShowAgainScope[NeverShowAgainScope["GLOBAL"] = 1] = "GLOBAL";
|
|
86
|
-
})(NeverShowAgainScope || (NeverShowAgainScope = {}));
|
|
87
|
-
var NotificationsFilter;
|
|
88
|
-
(function(NotificationsFilter) {
|
|
89
|
-
NotificationsFilter[NotificationsFilter["OFF"] = 0] = "OFF";
|
|
90
|
-
NotificationsFilter[NotificationsFilter["SILENT"] = 1] = "SILENT";
|
|
91
|
-
NotificationsFilter[NotificationsFilter["ERROR"] = 2] = "ERROR";
|
|
92
|
-
})(NotificationsFilter || (NotificationsFilter = {}));
|
|
93
86
|
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
94
87
|
var css$3 = "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-workbench > .notifications-toasts {\n\tposition: absolute;\n\tz-index: 1000;\n\tright: 3px;\n\tbottom: 26px;\n\tdisplay: none;\n\toverflow: hidden;\n}\n\n.monaco-workbench.nostatusbar > .notifications-toasts {\n\tbottom: 3px;\n}\n\n.monaco-workbench > .notifications-toasts.visible {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.monaco-workbench > .notifications-toasts .notification-toast-container {\n\toverflow: hidden; /* this ensures that the notification toast does not shine through */\n}\n\n.monaco-workbench > .notifications-toasts .notification-toast-container > .notification-toast {\n\tmargin: 8px; /* enables separation and drop shadows around toasts */\n\ttransform: translate3d(0px, 100%, 0px); /* move the notification 50px to the bottom (to prevent bleed through) */\n\topacity: 0; /* fade the toast in */\n\ttransition:\ttransform 300ms ease-out, opacity 300ms ease-out;\n}\n\n.monaco-workbench > .notifications-toasts .notification-toast-container > .notification-toast.notification-fade-in {\n\topacity: 1;\n\ttransform: none;\n}\n\n.monaco-workbench > .notifications-toasts .notification-toast-container > .notification-toast.notification-fade-in-done {\n\topacity: 1;\n\ttransform: none;\n\ttransition:\tnone;\n}\n";
|
|
95
88
|
n(css$3,{});
|
|
@@ -7,12 +7,18 @@ import { mixin } from 'monaco-editor/esm/vs/base/common/objects.js';
|
|
|
7
7
|
import { RunOnceScheduler } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
8
8
|
import { show, hide, trackFocus } from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
9
9
|
import { isNumber } from 'monaco-editor/esm/vs/base/common/types.js';
|
|
10
|
+
import { LanguageService as LanguageService$1 } from 'monaco-editor/esm/vs/editor/common/services/languageService.js';
|
|
11
|
+
import { LanguagesRegistry } from 'monaco-editor/esm/vs/editor/common/services/languagesRegistry.js';
|
|
12
|
+
import { firstOrDefault } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
13
|
+
import { PLAINTEXT_LANGUAGE_ID } from 'monaco-editor/esm/vs/editor/common/languages/modesRegistry.js';
|
|
14
|
+
import { TokenizationRegistry } from 'monaco-editor/esm/vs/editor/common/languages.js';
|
|
15
|
+
import { NoOpNotification as NoOpNotification$1 } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
|
|
16
|
+
import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
10
17
|
import { QuickInputController } from 'monaco-editor/esm/vs/base/parts/quickinput/browser/quickInput.js';
|
|
11
18
|
import { getSingletonServiceDescriptors, registerSingleton } from 'monaco-editor/esm/vs/platform/instantiation/common/extensions.js';
|
|
12
19
|
import { ILabelService } from 'monaco-editor/esm/vs/platform/label/common/label.js';
|
|
13
|
-
import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
14
20
|
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
|
|
15
|
-
import { l as IEditorService, o as IPaneCompositePartService, h as IUriIdentityService, e as ITextFileService, f as IFileService, n as IEditorGroupsService, g as IWorkbenchEnvironmentService, i as IWorkingCopyFileService, j as IPathService, I as IProgressService, t as Services, p as IProductService, q as ILanguageStatusService, s as IHostService } from './services-
|
|
21
|
+
import { l as IEditorService, o as IPaneCompositePartService, h as IUriIdentityService, e as ITextFileService, f as IFileService, n as IEditorGroupsService, g as IWorkbenchEnvironmentService, i as IWorkingCopyFileService, j as IPathService, I as IProgressService, t as Services, p as IProductService, q as ILanguageStatusService, s as IHostService } from './services-fb7952fb.js';
|
|
16
22
|
import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
17
23
|
import { ExtUri } from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
18
24
|
import { Schemas } from 'monaco-editor/esm/vs/base/common/network.js';
|
|
@@ -363,9 +369,178 @@ class ProgressBar extends Disposable {
|
|
|
363
369
|
}
|
|
364
370
|
}
|
|
365
371
|
ProgressBar.LONG_RUNNING_INFINITE_THRESHOLD = 10000;
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
(
|
|
372
|
+
class LanguageService extends Disposable {
|
|
373
|
+
constructor(warnOnOverwrite = false) {
|
|
374
|
+
super();
|
|
375
|
+
this._onDidEncounterLanguage = this._register( new Emitter());
|
|
376
|
+
this.onDidEncounterLanguage = this._onDidEncounterLanguage.event;
|
|
377
|
+
this._onDidChange = this._register( new Emitter(
|
|
378
|
+
{ leakWarningThreshold: 200 }
|
|
379
|
+
));
|
|
380
|
+
this.onDidChange = this._onDidChange.event;
|
|
381
|
+
LanguageService.instanceCount++;
|
|
382
|
+
this._encounteredLanguages = new Set();
|
|
383
|
+
this._registry = this._register( new LanguagesRegistry(true, warnOnOverwrite));
|
|
384
|
+
this.languageIdCodec = this._registry.languageIdCodec;
|
|
385
|
+
this._register(this._registry.onDidChange(() => this._onDidChange.fire()));
|
|
386
|
+
}
|
|
387
|
+
dispose() {
|
|
388
|
+
LanguageService.instanceCount--;
|
|
389
|
+
super.dispose();
|
|
390
|
+
}
|
|
391
|
+
isRegisteredLanguageId(languageId) {
|
|
392
|
+
return this._registry.isRegisteredLanguageId(languageId);
|
|
393
|
+
}
|
|
394
|
+
getRegisteredLanguageIds() {
|
|
395
|
+
return this._registry.getRegisteredLanguageIds();
|
|
396
|
+
}
|
|
397
|
+
getSortedRegisteredLanguageNames() {
|
|
398
|
+
return this._registry.getSortedRegisteredLanguageNames();
|
|
399
|
+
}
|
|
400
|
+
getLanguageName(languageId) {
|
|
401
|
+
return this._registry.getLanguageName(languageId);
|
|
402
|
+
}
|
|
403
|
+
getMimeType(languageId) {
|
|
404
|
+
return this._registry.getMimeType(languageId);
|
|
405
|
+
}
|
|
406
|
+
getIcon(languageId) {
|
|
407
|
+
return this._registry.getIcon(languageId);
|
|
408
|
+
}
|
|
409
|
+
getExtensions(languageId) {
|
|
410
|
+
return this._registry.getExtensions(languageId);
|
|
411
|
+
}
|
|
412
|
+
getFilenames(languageId) {
|
|
413
|
+
return this._registry.getFilenames(languageId);
|
|
414
|
+
}
|
|
415
|
+
getConfigurationFiles(languageId) {
|
|
416
|
+
return this._registry.getConfigurationFiles(languageId);
|
|
417
|
+
}
|
|
418
|
+
getLanguageIdByLanguageName(languageName) {
|
|
419
|
+
return this._registry.getLanguageIdByLanguageName(languageName);
|
|
420
|
+
}
|
|
421
|
+
getLanguageIdByMimeType(mimeType) {
|
|
422
|
+
return this._registry.getLanguageIdByMimeType(mimeType);
|
|
423
|
+
}
|
|
424
|
+
guessLanguageIdByFilepathOrFirstLine(resource, firstLine) {
|
|
425
|
+
const languageIds = this._registry.guessLanguageIdByFilepathOrFirstLine(resource, firstLine);
|
|
426
|
+
return firstOrDefault(languageIds, null);
|
|
427
|
+
}
|
|
428
|
+
createById(languageId) {
|
|
429
|
+
return (
|
|
430
|
+
new LanguageSelection(this.onDidChange, () => {
|
|
431
|
+
return this._createAndGetLanguageIdentifier(languageId);
|
|
432
|
+
})
|
|
433
|
+
);
|
|
434
|
+
}
|
|
435
|
+
createByMimeType(mimeType) {
|
|
436
|
+
return (
|
|
437
|
+
new LanguageSelection(this.onDidChange, () => {
|
|
438
|
+
const languageId = this.getLanguageIdByMimeType(mimeType);
|
|
439
|
+
return this._createAndGetLanguageIdentifier(languageId);
|
|
440
|
+
})
|
|
441
|
+
);
|
|
442
|
+
}
|
|
443
|
+
createByFilepathOrFirstLine(resource, firstLine) {
|
|
444
|
+
return (
|
|
445
|
+
new LanguageSelection(this.onDidChange, () => {
|
|
446
|
+
const languageId = this.guessLanguageIdByFilepathOrFirstLine(resource, firstLine);
|
|
447
|
+
return this._createAndGetLanguageIdentifier(languageId);
|
|
448
|
+
})
|
|
449
|
+
);
|
|
450
|
+
}
|
|
451
|
+
_createAndGetLanguageIdentifier(languageId) {
|
|
452
|
+
if (!languageId || !this.isRegisteredLanguageId(languageId)) {
|
|
453
|
+
languageId = PLAINTEXT_LANGUAGE_ID;
|
|
454
|
+
}
|
|
455
|
+
if (!this._encounteredLanguages.has(languageId)) {
|
|
456
|
+
this._encounteredLanguages.add(languageId);
|
|
457
|
+
TokenizationRegistry.getOrCreate(languageId);
|
|
458
|
+
this._onDidEncounterLanguage.fire(languageId);
|
|
459
|
+
}
|
|
460
|
+
return languageId;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
LanguageService.instanceCount = 0;
|
|
464
|
+
class LanguageSelection {
|
|
465
|
+
constructor(_onDidChangeLanguages, _selector) {
|
|
466
|
+
this._onDidChangeLanguages = _onDidChangeLanguages;
|
|
467
|
+
this._selector = _selector;
|
|
468
|
+
this._listener = null;
|
|
469
|
+
this._emitter = null;
|
|
470
|
+
this.languageId = this._selector();
|
|
471
|
+
}
|
|
472
|
+
_dispose() {
|
|
473
|
+
if (this._listener) {
|
|
474
|
+
this._listener.dispose();
|
|
475
|
+
this._listener = null;
|
|
476
|
+
}
|
|
477
|
+
if (this._emitter) {
|
|
478
|
+
this._emitter.dispose();
|
|
479
|
+
this._emitter = null;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
get onDidChange() {
|
|
483
|
+
if (!this._listener) {
|
|
484
|
+
this._listener = this._onDidChangeLanguages(() => this._evaluate());
|
|
485
|
+
}
|
|
486
|
+
if (!this._emitter) {
|
|
487
|
+
this._emitter = new Emitter({
|
|
488
|
+
onLastListenerRemove: () => {
|
|
489
|
+
this._dispose();
|
|
490
|
+
}
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
return this._emitter.event;
|
|
494
|
+
}
|
|
495
|
+
_evaluate() {
|
|
496
|
+
const languageId = this._selector();
|
|
497
|
+
if (languageId === this.languageId) {
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
this.languageId = languageId;
|
|
501
|
+
if (this._emitter) {
|
|
502
|
+
this._emitter.fire(this.languageId);
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
var NeverShowAgainScope;
|
|
507
|
+
(function(NeverShowAgainScope) {
|
|
508
|
+
NeverShowAgainScope[NeverShowAgainScope["WORKSPACE"] = 0] = "WORKSPACE";
|
|
509
|
+
NeverShowAgainScope[NeverShowAgainScope["GLOBAL"] = 1] = "GLOBAL";
|
|
510
|
+
})(NeverShowAgainScope || (NeverShowAgainScope = {}));
|
|
511
|
+
var NotificationsFilter;
|
|
512
|
+
(function(NotificationsFilter) {
|
|
513
|
+
NotificationsFilter[NotificationsFilter["OFF"] = 0] = "OFF";
|
|
514
|
+
NotificationsFilter[NotificationsFilter["SILENT"] = 1] = "SILENT";
|
|
515
|
+
NotificationsFilter[NotificationsFilter["ERROR"] = 2] = "ERROR";
|
|
516
|
+
})(NotificationsFilter || (NotificationsFilter = {}));
|
|
517
|
+
class NoOpNotification {
|
|
518
|
+
constructor() {
|
|
519
|
+
this.progress = new NoOpProgress();
|
|
520
|
+
this.onDidClose = Event.None;
|
|
521
|
+
this.onDidChangeVisibility = Event.None;
|
|
522
|
+
}
|
|
523
|
+
updateSeverity(severity) { }
|
|
524
|
+
updateMessage(message) { }
|
|
525
|
+
updateActions(actions) { }
|
|
526
|
+
close() { }
|
|
527
|
+
}
|
|
528
|
+
class NoOpProgress {
|
|
529
|
+
infinite() { }
|
|
530
|
+
done() { }
|
|
531
|
+
total(value) { }
|
|
532
|
+
worked(value) { }
|
|
533
|
+
}
|
|
534
|
+
var _a, _b, _c, _d, _e;
|
|
535
|
+
(_a = NoOpNotification$1.prototype).onDidClose ?? (_a.onDidClose = Event.None);
|
|
536
|
+
for (const key of Object.getOwnPropertyNames(NoOpNotification.prototype)) {
|
|
537
|
+
if (!Object.hasOwnProperty.call(NoOpNotification$1.prototype, key)) {
|
|
538
|
+
NoOpNotification$1.prototype[key] = NoOpNotification.prototype[key];
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
(_b = LanguageService$1.prototype).getRegisteredLanguageIds ?? (_b.getRegisteredLanguageIds = LanguageService.prototype.getRegisteredLanguageIds);
|
|
542
|
+
(_c = ProgressBar$1.prototype).hide ?? (_c.hide = ProgressBar.prototype.hide);
|
|
543
|
+
(_d = Themable$1.prototype)['getColor'] ?? (_d['getColor'] = Themable.prototype['getColor']);
|
|
369
544
|
function polyfillQuickInput(fn) {
|
|
370
545
|
return function () {
|
|
371
546
|
const quickInput = fn.call(this);
|
|
@@ -376,7 +551,7 @@ function polyfillQuickInput(fn) {
|
|
|
376
551
|
QuickInputController.prototype.createQuickPick = polyfillQuickInput(QuickInputController.prototype.createQuickPick);
|
|
377
552
|
QuickInputController.prototype.createInputBox = polyfillQuickInput(QuickInputController.prototype.createInputBox);
|
|
378
553
|
const StandaloneUriLabelService = getSingletonServiceDescriptors().find(([id]) => id === ILabelService)[1].ctor;
|
|
379
|
-
(
|
|
554
|
+
(_e = StandaloneUriLabelService.prototype).onDidChangeFormatters ?? (_e.onDidChangeFormatters = Event.None);
|
|
380
555
|
function toVSCodeVSBuffer(value) {
|
|
381
556
|
if (value instanceof VSBuffer$1) {
|
|
382
557
|
return VSBuffer.wrap(value.buffer);
|
|
@@ -809,4 +984,4 @@ registerSingleton(ILanguageDetectionService, class LanguageDetectionService {
|
|
|
809
984
|
return undefined;
|
|
810
985
|
}
|
|
811
986
|
});
|
|
812
|
-
export { Emitter as E, ILifecycleService as I, assertAllDefined as a,
|
|
987
|
+
export { Emitter as E, ILifecycleService as I, NotificationsFilter as N, assertAllDefined as a, NeverShowAgainScope as b, ILanguageDetectionService as c, isStringArray as i, unsupported as u, withUndefinedAsNull as w };
|
package/dist/modelEditor.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as __decorate, d as __param, f as IFileService, h as IUriIdentityService, e as ITextFileService, S as SIDE_GROUP, A as ACTIVE_GROUP, l as IEditorService, x as isPreferredGroup } from './services-
|
|
2
|
-
import { E as Emitter, w as withUndefinedAsNull,
|
|
1
|
+
import { b as __decorate, d as __param, f as IFileService, h as IUriIdentityService, e as ITextFileService, S as SIDE_GROUP, A as ACTIVE_GROUP, l as IEditorService, x as isPreferredGroup } from './services-fb7952fb.js';
|
|
2
|
+
import { E as Emitter, w as withUndefinedAsNull, c as ILanguageDetectionService, u as unsupported } from './missing-services-71e80bea.js';
|
|
3
3
|
import { Disposable, MutableDisposable, dispose, toDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
4
4
|
import { ThrottledDelayer } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
5
5
|
import { PLAINTEXT_LANGUAGE_ID } from 'monaco-editor/esm/vs/editor/common/languages/modesRegistry.js';
|
|
@@ -52,6 +52,10 @@ import 'monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.js';
|
|
|
52
52
|
import 'monaco-editor/esm/vs/base/common/color.js';
|
|
53
53
|
import 'monaco-editor/esm/vs/base/common/objects.js';
|
|
54
54
|
import 'monaco-editor/esm/vs/base/common/types.js';
|
|
55
|
+
import 'monaco-editor/esm/vs/editor/common/services/languageService.js';
|
|
56
|
+
import 'monaco-editor/esm/vs/editor/common/services/languagesRegistry.js';
|
|
57
|
+
import 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
58
|
+
import 'monaco-editor/esm/vs/editor/common/languages.js';
|
|
55
59
|
import 'monaco-editor/esm/vs/base/parts/quickinput/browser/quickInput.js';
|
|
56
60
|
import 'monaco-editor/esm/vs/platform/instantiation/common/extensions.js';
|
|
57
61
|
import 'monaco-editor/esm/vs/platform/label/common/label.js';
|
|
@@ -268,26 +268,6 @@ function isValidBasename(name, isWindowsOS = isWindows) {
|
|
|
268
268
|
}
|
|
269
269
|
return true;
|
|
270
270
|
}
|
|
271
|
-
function __decorate(decorators, target, key, desc) {
|
|
272
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
273
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
274
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
275
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
276
|
-
}
|
|
277
|
-
function __param(paramIndex, decorator) {
|
|
278
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
279
|
-
}
|
|
280
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
281
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
282
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
283
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
284
|
-
}
|
|
285
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
286
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
287
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
288
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
289
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
290
|
-
}
|
|
291
271
|
function coalesceInPlace(array) {
|
|
292
272
|
let to = 0;
|
|
293
273
|
for (let i = 0; i < array.length; i++) {
|
|
@@ -310,6 +290,26 @@ function remove(array, element) {
|
|
|
310
290
|
}
|
|
311
291
|
return undefined;
|
|
312
292
|
}
|
|
293
|
+
function __decorate(decorators, target, key, desc) {
|
|
294
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
295
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
296
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
297
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
298
|
+
}
|
|
299
|
+
function __param(paramIndex, decorator) {
|
|
300
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
301
|
+
}
|
|
302
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
303
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
304
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
305
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
306
|
+
}
|
|
307
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
308
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
309
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
310
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
311
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
312
|
+
}
|
|
313
313
|
const IFileService = createDecorator('fileService');
|
|
314
314
|
var FileType;
|
|
315
315
|
(function(FileType) {
|
|
@@ -724,10 +724,7 @@ let services;
|
|
|
724
724
|
var Services;
|
|
725
725
|
(function (Services) {
|
|
726
726
|
Services.get = () => {
|
|
727
|
-
|
|
728
|
-
throw new Error('Services has not been installed');
|
|
729
|
-
}
|
|
730
|
-
return services;
|
|
727
|
+
return services ?? {};
|
|
731
728
|
};
|
|
732
729
|
function install(_services) {
|
|
733
730
|
if (services != null) {
|
package/dist/services.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { n as IEditorGroupsService, l as IEditorService, f as IFileService, s as IHostService, q as ILanguageStatusService, o as IPaneCompositePartService, j as IPathService, p as IProductService, e as ITextFileService, h as IUriIdentityService, g as IWorkbenchEnvironmentService, i as IWorkingCopyFileService, t as Services } from './services-
|
|
1
|
+
export { n as IEditorGroupsService, l as IEditorService, f as IFileService, s as IHostService, q as ILanguageStatusService, o as IPaneCompositePartService, j as IPathService, p as IProductService, e as ITextFileService, h as IUriIdentityService, g as IWorkbenchEnvironmentService, i as IWorkingCopyFileService, t as Services } from './services-fb7952fb.js';
|
|
2
2
|
export { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
3
3
|
export { ICommandService } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
|
|
4
4
|
export { INotificationService } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
|