monaco-editor11 1.0.9 → 1.1.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/dist/index.d.ts +1 -1
- package/dist/monaco-editor11.es.js +11 -16
- package/dist/monaco-editor11.umd.js +1 -1
- package/package.json +2 -2
- package/dist/monaco.d.ts +0 -8
- package/dist/workers/common/initialize.js +0 -16
- package/dist/workers/common/workers.js +0 -141
- package/dist/workers/editor/common/abstractSyntaxTokenBackend.js +0 -128
- package/dist/workers/editor/common/abstractText.js +0 -89
- package/dist/workers/editor/common/ast.js +0 -485
- package/dist/workers/editor/common/autoIndent.js +0 -390
- package/dist/workers/editor/common/beforeEditPositionMapper.js +0 -110
- package/dist/workers/editor/common/bracketPairsImpl.js +0 -717
- package/dist/workers/editor/common/bracketPairsTree.js +0 -343
- package/dist/workers/editor/common/brackets.js +0 -108
- package/dist/workers/editor/common/characterClassifier.js +0 -59
- package/dist/workers/editor/common/characterPair.js +0 -40
- package/dist/workers/editor/common/colorizedBracketPairsDecorationProvider.js +0 -97
- package/dist/workers/editor/common/columnRange.js +0 -35
- package/dist/workers/editor/common/combineTextEditInfos.js +0 -124
- package/dist/workers/editor/common/common.js +0 -20
- package/dist/workers/editor/common/computeMovedLines.js +0 -249
- package/dist/workers/editor/common/concat23Trees.js +0 -192
- package/dist/workers/editor/common/contiguousMultilineTokens.js +0 -32
- package/dist/workers/editor/common/contiguousMultilineTokensBuilder.js +0 -23
- package/dist/workers/editor/common/contiguousTokensEditing.js +0 -128
- package/dist/workers/editor/common/contiguousTokensStore.js +0 -207
- package/dist/workers/editor/common/coordinatesConverter.js +0 -51
- package/dist/workers/editor/common/cursor.js +0 -899
- package/dist/workers/editor/common/cursorAtomicMoveOperations.js +0 -145
- package/dist/workers/editor/common/cursorCollection.js +0 -194
- package/dist/workers/editor/common/cursorColumnSelection.js +0 -93
- package/dist/workers/editor/common/cursorColumns.js +0 -112
- package/dist/workers/editor/common/cursorCommon.js +0 -250
- package/dist/workers/editor/common/cursorContext.js +0 -15
- package/dist/workers/editor/common/cursorDeleteOperations.js +0 -231
- package/dist/workers/editor/common/cursorMoveCommands.js +0 -676
- package/dist/workers/editor/common/cursorMoveOperations.js +0 -290
- package/dist/workers/editor/common/cursorTypeEditOperations.js +0 -968
- package/dist/workers/editor/common/cursorTypeOperations.js +0 -173
- package/dist/workers/editor/common/cursorUtils.js +0 -75
- package/dist/workers/editor/common/cursorWordOperations.js +0 -720
- package/dist/workers/editor/common/defaultDocumentColorsComputer.js +0 -138
- package/dist/workers/editor/common/defaultLinesDiffComputer.js +0 -188
- package/dist/workers/editor/common/diffAlgorithm.js +0 -139
- package/dist/workers/editor/common/diffEditor.js +0 -38
- package/dist/workers/editor/common/dynamicProgrammingDiffing.js +0 -101
- package/dist/workers/editor/common/edit.js +0 -183
- package/dist/workers/editor/common/editOperation.js +0 -36
- package/dist/workers/editor/common/editStack.js +0 -363
- package/dist/workers/editor/common/editorAction.js +0 -26
- package/dist/workers/editor/common/editorBaseApi.js +0 -43
- package/dist/workers/editor/common/editorColorRegistry.js +0 -102
- package/dist/workers/editor/common/editorCommon.js +0 -13
- package/dist/workers/editor/common/editorConfigurationSchema.js +0 -338
- package/dist/workers/editor/common/editorContextKeys.js +0 -84
- package/dist/workers/editor/common/editorFeatures.js +0 -17
- package/dist/workers/editor/common/editorOptions.js +0 -3440
- package/dist/workers/editor/common/editorTheme.js +0 -23
- package/dist/workers/editor/common/editorWebWorker.js +0 -299
- package/dist/workers/editor/common/editorWorker.js +0 -9
- package/dist/workers/editor/common/editorWorkerHost.js +0 -15
- package/dist/workers/editor/common/editorZoom.js +0 -26
- package/dist/workers/editor/common/electricCharacter.js +0 -55
- package/dist/workers/editor/common/encodedTokenAttributes.js +0 -79
- package/dist/workers/editor/common/enterAction.js +0 -53
- package/dist/workers/editor/common/eolCounter.js +0 -44
- package/dist/workers/editor/common/findSectionHeaders.js +0 -128
- package/dist/workers/editor/common/fixBrackets.js +0 -67
- package/dist/workers/editor/common/fixedArray.js +0 -70
- package/dist/workers/editor/common/fontInfo.js +0 -172
- package/dist/workers/editor/common/fontInfoFromSettings.js +0 -29
- package/dist/workers/editor/common/getIconClasses.js +0 -106
- package/dist/workers/editor/common/getPositionOffsetTransformerFromTextModel.js +0 -24
- package/dist/workers/editor/common/glyphLanesModel.js +0 -61
- package/dist/workers/editor/common/guidesTextModelPart.js +0 -405
- package/dist/workers/editor/common/heuristicSequenceOptimizations.js +0 -374
- package/dist/workers/editor/common/indentRules.js +0 -63
- package/dist/workers/editor/common/indentation.js +0 -39
- package/dist/workers/editor/common/indentationGuesser.js +0 -178
- package/dist/workers/editor/common/indentationLineProcessor.js +0 -193
- package/dist/workers/editor/common/inlineDecorations.js +0 -26
- package/dist/workers/editor/common/inplaceReplaceSupport.js +0 -87
- package/dist/workers/editor/common/inputMode.js +0 -22
- package/dist/workers/editor/common/intervalTree.js +0 -1002
- package/dist/workers/editor/common/language.js +0 -9
- package/dist/workers/editor/common/languageBracketsConfiguration.js +0 -133
- package/dist/workers/editor/common/languageConfiguration.js +0 -138
- package/dist/workers/editor/common/languageConfigurationRegistry.js +0 -361
- package/dist/workers/editor/common/languageFeatureDebounce.js +0 -137
- package/dist/workers/editor/common/languageFeatureRegistry.js +0 -180
- package/dist/workers/editor/common/languageFeatures.js +0 -9
- package/dist/workers/editor/common/languageFeaturesService.js +0 -47
- package/dist/workers/editor/common/languageSelector.js +0 -112
- package/dist/workers/editor/common/languageService.js +0 -92
- package/dist/workers/editor/common/languages.js +0 -522
- package/dist/workers/editor/common/languagesAssociations.js +0 -193
- package/dist/workers/editor/common/languagesRegistry.js +0 -237
- package/dist/workers/editor/common/legacyLinesDiffComputer.js +0 -468
- package/dist/workers/editor/common/length.js +0 -129
- package/dist/workers/editor/common/lineDecorations.js +0 -208
- package/dist/workers/editor/common/lineEdit.js +0 -75
- package/dist/workers/editor/common/lineHeights.js +0 -370
- package/dist/workers/editor/common/linePart.js +0 -25
- package/dist/workers/editor/common/lineRange.js +0 -312
- package/dist/workers/editor/common/lineSequence.js +0 -36
- package/dist/workers/editor/common/lineTokens.js +0 -405
- package/dist/workers/editor/common/linesDiffComputer.js +0 -29
- package/dist/workers/editor/common/linesDiffComputers.js +0 -13
- package/dist/workers/editor/common/linesLayout.js +0 -765
- package/dist/workers/editor/common/linesSliceCharSequence.js +0 -205
- package/dist/workers/editor/common/linkComputer.js +0 -269
- package/dist/workers/editor/common/markerDecorations.js +0 -9
- package/dist/workers/editor/common/markerDecorationsService.js +0 -248
- package/dist/workers/editor/common/minimapTokensColorTracker.js +0 -58
- package/dist/workers/editor/common/mirrorTextModel.js +0 -117
- package/dist/workers/editor/common/model.js +0 -9
- package/dist/workers/editor/common/modelLineProjection.js +0 -350
- package/dist/workers/editor/common/modelLineProjectionData.js +0 -297
- package/dist/workers/editor/common/modelService.js +0 -413
- package/dist/workers/editor/common/modesRegistry.js +0 -75
- package/dist/workers/editor/common/monospaceLineBreaksComputer.js +0 -473
- package/dist/workers/editor/common/myersDiffAlgorithm.js +0 -159
- package/dist/workers/editor/common/nodeReader.js +0 -127
- package/dist/workers/editor/common/nullTokenize.js +0 -29
- package/dist/workers/editor/common/offsetRange.js +0 -225
- package/dist/workers/editor/common/onEnter.js +0 -109
- package/dist/workers/editor/common/oneCursor.js +0 -117
- package/dist/workers/editor/common/overviewZoneManager.js +0 -176
- package/dist/workers/editor/common/parser.js +0 -121
- package/dist/workers/editor/common/pieceTreeBase.js +0 -1473
- package/dist/workers/editor/common/pieceTreeTextBuffer.js +0 -461
- package/dist/workers/editor/common/pieceTreeTextBufferBuilder.js +0 -140
- package/dist/workers/editor/common/point.js +0 -50
- package/dist/workers/editor/common/position.js +0 -142
- package/dist/workers/editor/common/positionToOffset.js +0 -17
- package/dist/workers/editor/common/positionToOffsetImpl.js +0 -98
- package/dist/workers/editor/common/prefixSumComputer.js +0 -226
- package/dist/workers/editor/common/range.js +0 -421
- package/dist/workers/editor/common/rangeMapping.js +0 -229
- package/dist/workers/editor/common/rangeSingleLine.js +0 -17
- package/dist/workers/editor/common/rbTreeBase.js +0 -362
- package/dist/workers/editor/common/rect.js +0 -163
- package/dist/workers/editor/common/replaceCommand.js +0 -158
- package/dist/workers/editor/common/resolverService.js +0 -5
- package/dist/workers/editor/common/rgba.js +0 -35
- package/dist/workers/editor/common/richEditBrackets.js +0 -356
- package/dist/workers/editor/common/selection.js +0 -145
- package/dist/workers/editor/common/semanticTokensDto.js +0 -82
- package/dist/workers/editor/common/semanticTokensProviderStyling.js +0 -263
- package/dist/workers/editor/common/semanticTokensStyling.js +0 -9
- package/dist/workers/editor/common/semanticTokensStylingService.js +0 -47
- package/dist/workers/editor/common/shiftCommand.js +0 -241
- package/dist/workers/editor/common/smallImmutableSet.js +0 -108
- package/dist/workers/editor/common/sparseMultilineTokens.js +0 -548
- package/dist/workers/editor/common/sparseTokensStore.js +0 -210
- package/dist/workers/editor/common/standaloneEnums.js +0 -1017
- package/dist/workers/editor/common/standaloneStrings.js +0 -42
- package/dist/workers/editor/common/stringBuilder.js +0 -122
- package/dist/workers/editor/common/stringEdit.js +0 -165
- package/dist/workers/editor/common/supports.js +0 -58
- package/dist/workers/editor/common/surroundSelectionCommand.js +0 -44
- package/dist/workers/editor/common/textChange.js +0 -248
- package/dist/workers/editor/common/textEdit.js +0 -269
- package/dist/workers/editor/common/textLength.js +0 -87
- package/dist/workers/editor/common/textModel.js +0 -2031
- package/dist/workers/editor/common/textModelBracketPairs.js +0 -45
- package/dist/workers/editor/common/textModelDefaults.js +0 -18
- package/dist/workers/editor/common/textModelEditSource.js +0 -166
- package/dist/workers/editor/common/textModelEvents.js +0 -216
- package/dist/workers/editor/common/textModelGuides.js +0 -40
- package/dist/workers/editor/common/textModelPart.js +0 -23
- package/dist/workers/editor/common/textModelSearch.js +0 -455
- package/dist/workers/editor/common/textModelStringEdit.js +0 -11
- package/dist/workers/editor/common/textModelSync.impl.js +0 -307
- package/dist/workers/editor/common/textModelText.js +0 -26
- package/dist/workers/editor/common/textModelTokens.js +0 -436
- package/dist/workers/editor/common/textResourceConfiguration.js +0 -6
- package/dist/workers/editor/common/textToHtmlTokenizer.js +0 -139
- package/dist/workers/editor/common/tokenStore.js +0 -407
- package/dist/workers/editor/common/tokenWithTextArray.js +0 -73
- package/dist/workers/editor/common/tokenization.js +0 -287
- package/dist/workers/editor/common/tokenizationRegistry.js +0 -123
- package/dist/workers/editor/common/tokenizationTextModelPart.js +0 -275
- package/dist/workers/editor/common/tokenizer.js +0 -301
- package/dist/workers/editor/common/tokenizerSyntaxTokenBackend.js +0 -261
- package/dist/workers/editor/common/treeSitterLibraryService.js +0 -9
- package/dist/workers/editor/common/treeSitterSyntaxTokenBackend.js +0 -167
- package/dist/workers/editor/common/treeSitterThemeService.js +0 -9
- package/dist/workers/editor/common/treeSitterTokenizationImpl.js +0 -713
- package/dist/workers/editor/common/treeSitterTree.js +0 -395
- package/dist/workers/editor/common/treeViewsDnd.js +0 -24
- package/dist/workers/editor/common/treeViewsDndService.js +0 -12
- package/dist/workers/editor/common/trimTrailingWhitespaceCommand.js +0 -98
- package/dist/workers/editor/common/unicodeTextModelHighlighter.js +0 -188
- package/dist/workers/editor/common/utils.js +0 -62
- package/dist/workers/editor/common/viewContext.js +0 -22
- package/dist/workers/editor/common/viewEventHandler.js +0 -186
- package/dist/workers/editor/common/viewEvents.js +0 -180
- package/dist/workers/editor/common/viewLayout.js +0 -368
- package/dist/workers/editor/common/viewLineRenderer.js +0 -948
- package/dist/workers/editor/common/viewLinesViewportData.js +0 -30
- package/dist/workers/editor/common/viewModel.js +0 -98
- package/dist/workers/editor/common/viewModelDecoration.js +0 -55
- package/dist/workers/editor/common/viewModelDecorations.js +0 -132
- package/dist/workers/editor/common/viewModelEventDispatcher.js +0 -398
- package/dist/workers/editor/common/viewModelImpl.js +0 -1163
- package/dist/workers/editor/common/viewModelLines.js +0 -938
- package/dist/workers/editor/common/wordCharacterClassifier.js +0 -87
- package/dist/workers/editor/common/wordHelper.js +0 -127
- package/dist/workers/language/cssMode.js +0 -198
- package/dist/workers/language/cssWorker.js +0 -183
- package/dist/workers/language/htmlMode.js +0 -213
- package/dist/workers/language/htmlWorker.js +0 -126
- package/dist/workers/language/jsonMode.js +0 -224
- package/dist/workers/language/jsonWorker.js +0 -187
- package/dist/workers/language/languageFeatures.js +0 -1009
- package/dist/workers/language/lib.index.js +0 -103
- package/dist/workers/language/lib.js +0 -1107
- package/dist/workers/language/lspLanguageFeatures.js +0 -716
- package/dist/workers/language/monaco.contribution.js +0 -144
- package/dist/workers/language/tokenization.js +0 -189
- package/dist/workers/language/tsMode.js +0 -212
- package/dist/workers/language/tsWorker.js +0 -352
- package/dist/workers/language/typescriptServices.js +0 -210154
- package/dist/workers/language/typescriptServicesMetadata.js +0 -3
- package/dist/workers/language/workerManager.js +0 -65
- /package/dist/workers/{language/css.worker.js → css.worker.js} +0 -0
- /package/dist/workers/{editor/editor.worker.js → editor.worker.js} +0 -0
- /package/dist/workers/{language/html.worker.js → html.worker.js} +0 -0
- /package/dist/workers/{language/json.worker.js → json.worker.js} +0 -0
- /package/dist/workers/{language/ts.worker.js → ts.worker.js} +0 -0
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import { Range } from '../core/range.js';
|
|
2
|
-
import { Searcher } from '../model/textModelSearch.js';
|
|
3
|
-
import { isHighSurrogate, AmbiguousCharacters, InvisibleCharacters, escapeRegExpCharacters, isBasicASCII } from '../../../base/common/strings.js';
|
|
4
|
-
import { assertNever } from '../../../base/common/assert.js';
|
|
5
|
-
import { getWordAtText, DEFAULT_WORD_REGEXP } from '../core/wordHelper.js';
|
|
6
|
-
|
|
7
|
-
/*---------------------------------------------------------------------------------------------
|
|
8
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
10
|
-
*--------------------------------------------------------------------------------------------*/
|
|
11
|
-
class UnicodeTextModelHighlighter {
|
|
12
|
-
static computeUnicodeHighlights(model, options, range) {
|
|
13
|
-
const startLine = range ? range.startLineNumber : 1;
|
|
14
|
-
const endLine = range ? range.endLineNumber : model.getLineCount();
|
|
15
|
-
const codePointHighlighter = new CodePointHighlighter(options);
|
|
16
|
-
const candidates = codePointHighlighter.getCandidateCodePoints();
|
|
17
|
-
let regex;
|
|
18
|
-
if (candidates === 'allNonBasicAscii') {
|
|
19
|
-
regex = new RegExp('[^\\t\\n\\r\\x20-\\x7E]', 'g');
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
regex = new RegExp(`${buildRegExpCharClassExpr(Array.from(candidates))}`, 'g');
|
|
23
|
-
}
|
|
24
|
-
const searcher = new Searcher(null, regex);
|
|
25
|
-
const ranges = [];
|
|
26
|
-
let hasMore = false;
|
|
27
|
-
let m;
|
|
28
|
-
let ambiguousCharacterCount = 0;
|
|
29
|
-
let invisibleCharacterCount = 0;
|
|
30
|
-
let nonBasicAsciiCharacterCount = 0;
|
|
31
|
-
forLoop: for (let lineNumber = startLine, lineCount = endLine; lineNumber <= lineCount; lineNumber++) {
|
|
32
|
-
const lineContent = model.getLineContent(lineNumber);
|
|
33
|
-
const lineLength = lineContent.length;
|
|
34
|
-
// Reset regex to search from the beginning
|
|
35
|
-
searcher.reset(0);
|
|
36
|
-
do {
|
|
37
|
-
m = searcher.next(lineContent);
|
|
38
|
-
if (m) {
|
|
39
|
-
let startIndex = m.index;
|
|
40
|
-
let endIndex = m.index + m[0].length;
|
|
41
|
-
// Extend range to entire code point
|
|
42
|
-
if (startIndex > 0) {
|
|
43
|
-
const charCodeBefore = lineContent.charCodeAt(startIndex - 1);
|
|
44
|
-
if (isHighSurrogate(charCodeBefore)) {
|
|
45
|
-
startIndex--;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
if (endIndex + 1 < lineLength) {
|
|
49
|
-
const charCodeBefore = lineContent.charCodeAt(endIndex - 1);
|
|
50
|
-
if (isHighSurrogate(charCodeBefore)) {
|
|
51
|
-
endIndex++;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
const str = lineContent.substring(startIndex, endIndex);
|
|
55
|
-
let word = getWordAtText(startIndex + 1, DEFAULT_WORD_REGEXP, lineContent, 0);
|
|
56
|
-
if (word && word.endColumn <= startIndex + 1) {
|
|
57
|
-
// The word does not include the problematic character, ignore the word
|
|
58
|
-
word = null;
|
|
59
|
-
}
|
|
60
|
-
const highlightReason = codePointHighlighter.shouldHighlightNonBasicASCII(str, word ? word.word : null);
|
|
61
|
-
if (highlightReason !== 0 /* SimpleHighlightReason.None */) {
|
|
62
|
-
if (highlightReason === 3 /* SimpleHighlightReason.Ambiguous */) {
|
|
63
|
-
ambiguousCharacterCount++;
|
|
64
|
-
}
|
|
65
|
-
else if (highlightReason === 2 /* SimpleHighlightReason.Invisible */) {
|
|
66
|
-
invisibleCharacterCount++;
|
|
67
|
-
}
|
|
68
|
-
else if (highlightReason === 1 /* SimpleHighlightReason.NonBasicASCII */) {
|
|
69
|
-
nonBasicAsciiCharacterCount++;
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
assertNever();
|
|
73
|
-
}
|
|
74
|
-
const MAX_RESULT_LENGTH = 1000;
|
|
75
|
-
if (ranges.length >= MAX_RESULT_LENGTH) {
|
|
76
|
-
hasMore = true;
|
|
77
|
-
break forLoop;
|
|
78
|
-
}
|
|
79
|
-
ranges.push(new Range(lineNumber, startIndex + 1, lineNumber, endIndex + 1));
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
} while (m);
|
|
83
|
-
}
|
|
84
|
-
return {
|
|
85
|
-
ranges,
|
|
86
|
-
hasMore,
|
|
87
|
-
ambiguousCharacterCount,
|
|
88
|
-
invisibleCharacterCount,
|
|
89
|
-
nonBasicAsciiCharacterCount
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
static computeUnicodeHighlightReason(char, options) {
|
|
93
|
-
const codePointHighlighter = new CodePointHighlighter(options);
|
|
94
|
-
const reason = codePointHighlighter.shouldHighlightNonBasicASCII(char, null);
|
|
95
|
-
switch (reason) {
|
|
96
|
-
case 0 /* SimpleHighlightReason.None */:
|
|
97
|
-
return null;
|
|
98
|
-
case 2 /* SimpleHighlightReason.Invisible */:
|
|
99
|
-
return { kind: 1 /* UnicodeHighlighterReasonKind.Invisible */ };
|
|
100
|
-
case 3 /* SimpleHighlightReason.Ambiguous */: {
|
|
101
|
-
const codePoint = char.codePointAt(0);
|
|
102
|
-
const primaryConfusable = codePointHighlighter.ambiguousCharacters.getPrimaryConfusable(codePoint);
|
|
103
|
-
const notAmbiguousInLocales = AmbiguousCharacters.getLocales().filter((l) => !AmbiguousCharacters.getInstance(new Set([...options.allowedLocales, l])).isAmbiguous(codePoint));
|
|
104
|
-
return { kind: 0 /* UnicodeHighlighterReasonKind.Ambiguous */, confusableWith: String.fromCodePoint(primaryConfusable), notAmbiguousInLocales };
|
|
105
|
-
}
|
|
106
|
-
case 1 /* SimpleHighlightReason.NonBasicASCII */:
|
|
107
|
-
return { kind: 2 /* UnicodeHighlighterReasonKind.NonBasicAscii */ };
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
function buildRegExpCharClassExpr(codePoints, flags) {
|
|
112
|
-
const src = `[${escapeRegExpCharacters(codePoints.map((i) => String.fromCodePoint(i)).join(''))}]`;
|
|
113
|
-
return src;
|
|
114
|
-
}
|
|
115
|
-
class CodePointHighlighter {
|
|
116
|
-
constructor(options) {
|
|
117
|
-
this.options = options;
|
|
118
|
-
this.allowedCodePoints = new Set(options.allowedCodePoints);
|
|
119
|
-
this.ambiguousCharacters = AmbiguousCharacters.getInstance(new Set(options.allowedLocales));
|
|
120
|
-
}
|
|
121
|
-
getCandidateCodePoints() {
|
|
122
|
-
if (this.options.nonBasicASCII) {
|
|
123
|
-
return 'allNonBasicAscii';
|
|
124
|
-
}
|
|
125
|
-
const set = new Set();
|
|
126
|
-
if (this.options.invisibleCharacters) {
|
|
127
|
-
for (const cp of InvisibleCharacters.codePoints) {
|
|
128
|
-
if (!isAllowedInvisibleCharacter(String.fromCodePoint(cp))) {
|
|
129
|
-
set.add(cp);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
if (this.options.ambiguousCharacters) {
|
|
134
|
-
for (const cp of this.ambiguousCharacters.getConfusableCodePoints()) {
|
|
135
|
-
set.add(cp);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
for (const cp of this.allowedCodePoints) {
|
|
139
|
-
set.delete(cp);
|
|
140
|
-
}
|
|
141
|
-
return set;
|
|
142
|
-
}
|
|
143
|
-
shouldHighlightNonBasicASCII(character, wordContext) {
|
|
144
|
-
const codePoint = character.codePointAt(0);
|
|
145
|
-
if (this.allowedCodePoints.has(codePoint)) {
|
|
146
|
-
return 0 /* SimpleHighlightReason.None */;
|
|
147
|
-
}
|
|
148
|
-
if (this.options.nonBasicASCII) {
|
|
149
|
-
return 1 /* SimpleHighlightReason.NonBasicASCII */;
|
|
150
|
-
}
|
|
151
|
-
let hasBasicASCIICharacters = false;
|
|
152
|
-
let hasNonConfusableNonBasicAsciiCharacter = false;
|
|
153
|
-
if (wordContext) {
|
|
154
|
-
for (const char of wordContext) {
|
|
155
|
-
const codePoint = char.codePointAt(0);
|
|
156
|
-
const isBasicASCII$1 = isBasicASCII(char);
|
|
157
|
-
hasBasicASCIICharacters = hasBasicASCIICharacters || isBasicASCII$1;
|
|
158
|
-
if (!isBasicASCII$1 &&
|
|
159
|
-
!this.ambiguousCharacters.isAmbiguous(codePoint) &&
|
|
160
|
-
!InvisibleCharacters.isInvisibleCharacter(codePoint)) {
|
|
161
|
-
hasNonConfusableNonBasicAsciiCharacter = true;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
if (
|
|
166
|
-
/* Don't allow mixing weird looking characters with ASCII */ !hasBasicASCIICharacters &&
|
|
167
|
-
/* Is there an obviously weird looking character? */ hasNonConfusableNonBasicAsciiCharacter) {
|
|
168
|
-
return 0 /* SimpleHighlightReason.None */;
|
|
169
|
-
}
|
|
170
|
-
if (this.options.invisibleCharacters) {
|
|
171
|
-
// TODO check for emojis
|
|
172
|
-
if (!isAllowedInvisibleCharacter(character) && InvisibleCharacters.isInvisibleCharacter(codePoint)) {
|
|
173
|
-
return 2 /* SimpleHighlightReason.Invisible */;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
if (this.options.ambiguousCharacters) {
|
|
177
|
-
if (this.ambiguousCharacters.isAmbiguous(codePoint)) {
|
|
178
|
-
return 3 /* SimpleHighlightReason.Ambiguous */;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
return 0 /* SimpleHighlightReason.None */;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
function isAllowedInvisibleCharacter(character) {
|
|
185
|
-
return character === ' ' || character === '\n' || character === '\t';
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
export { UnicodeTextModelHighlighter };
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
class Array2D {
|
|
6
|
-
constructor(width, height) {
|
|
7
|
-
this.width = width;
|
|
8
|
-
this.height = height;
|
|
9
|
-
this.array = [];
|
|
10
|
-
this.array = new Array(width * height);
|
|
11
|
-
}
|
|
12
|
-
get(x, y) {
|
|
13
|
-
return this.array[x + y * this.width];
|
|
14
|
-
}
|
|
15
|
-
set(x, y, value) {
|
|
16
|
-
this.array[x + y * this.width] = value;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
function isSpace(charCode) {
|
|
20
|
-
return charCode === 32 /* CharCode.Space */ || charCode === 9 /* CharCode.Tab */;
|
|
21
|
-
}
|
|
22
|
-
class LineRangeFragment {
|
|
23
|
-
static { this.chrKeys = new Map(); }
|
|
24
|
-
static getKey(chr) {
|
|
25
|
-
let key = this.chrKeys.get(chr);
|
|
26
|
-
if (key === undefined) {
|
|
27
|
-
key = this.chrKeys.size;
|
|
28
|
-
this.chrKeys.set(chr, key);
|
|
29
|
-
}
|
|
30
|
-
return key;
|
|
31
|
-
}
|
|
32
|
-
constructor(range, lines, source) {
|
|
33
|
-
this.range = range;
|
|
34
|
-
this.lines = lines;
|
|
35
|
-
this.source = source;
|
|
36
|
-
this.histogram = [];
|
|
37
|
-
let counter = 0;
|
|
38
|
-
for (let i = range.startLineNumber - 1; i < range.endLineNumberExclusive - 1; i++) {
|
|
39
|
-
const line = lines[i];
|
|
40
|
-
for (let j = 0; j < line.length; j++) {
|
|
41
|
-
counter++;
|
|
42
|
-
const chr = line[j];
|
|
43
|
-
const key = LineRangeFragment.getKey(chr);
|
|
44
|
-
this.histogram[key] = (this.histogram[key] || 0) + 1;
|
|
45
|
-
}
|
|
46
|
-
counter++;
|
|
47
|
-
const key = LineRangeFragment.getKey('\n');
|
|
48
|
-
this.histogram[key] = (this.histogram[key] || 0) + 1;
|
|
49
|
-
}
|
|
50
|
-
this.totalCount = counter;
|
|
51
|
-
}
|
|
52
|
-
computeSimilarity(other) {
|
|
53
|
-
let sumDifferences = 0;
|
|
54
|
-
const maxLength = Math.max(this.histogram.length, other.histogram.length);
|
|
55
|
-
for (let i = 0; i < maxLength; i++) {
|
|
56
|
-
sumDifferences += Math.abs((this.histogram[i] ?? 0) - (other.histogram[i] ?? 0));
|
|
57
|
-
}
|
|
58
|
-
return 1 - (sumDifferences / (this.totalCount + other.totalCount));
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export { Array2D, LineRangeFragment, isSpace };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { EditorTheme } from '../editorTheme.js';
|
|
2
|
-
|
|
3
|
-
/*---------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
6
|
-
*--------------------------------------------------------------------------------------------*/
|
|
7
|
-
class ViewContext {
|
|
8
|
-
constructor(configuration, theme, model) {
|
|
9
|
-
this.configuration = configuration;
|
|
10
|
-
this.theme = new EditorTheme(theme);
|
|
11
|
-
this.viewModel = model;
|
|
12
|
-
this.viewLayout = model.viewLayout;
|
|
13
|
-
}
|
|
14
|
-
addEventHandler(eventHandler) {
|
|
15
|
-
this.viewModel.addViewEventHandler(eventHandler);
|
|
16
|
-
}
|
|
17
|
-
removeEventHandler(eventHandler) {
|
|
18
|
-
this.viewModel.removeViewEventHandler(eventHandler);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export { ViewContext };
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
import { Disposable } from '../../base/common/lifecycle.js';
|
|
2
|
-
|
|
3
|
-
/*---------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
6
|
-
*--------------------------------------------------------------------------------------------*/
|
|
7
|
-
class ViewEventHandler extends Disposable {
|
|
8
|
-
constructor() {
|
|
9
|
-
super();
|
|
10
|
-
this._shouldRender = true;
|
|
11
|
-
}
|
|
12
|
-
shouldRender() {
|
|
13
|
-
return this._shouldRender;
|
|
14
|
-
}
|
|
15
|
-
forceShouldRender() {
|
|
16
|
-
this._shouldRender = true;
|
|
17
|
-
}
|
|
18
|
-
setShouldRender() {
|
|
19
|
-
this._shouldRender = true;
|
|
20
|
-
}
|
|
21
|
-
onDidRender() {
|
|
22
|
-
this._shouldRender = false;
|
|
23
|
-
}
|
|
24
|
-
// --- begin event handlers
|
|
25
|
-
onCompositionStart(e) {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
onCompositionEnd(e) {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
onConfigurationChanged(e) {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
onCursorStateChanged(e) {
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
onDecorationsChanged(e) {
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
onFlushed(e) {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
onFocusChanged(e) {
|
|
44
|
-
return false;
|
|
45
|
-
}
|
|
46
|
-
onLanguageConfigurationChanged(e) {
|
|
47
|
-
return false;
|
|
48
|
-
}
|
|
49
|
-
onLineMappingChanged(e) {
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
onLinesChanged(e) {
|
|
53
|
-
return false;
|
|
54
|
-
}
|
|
55
|
-
onLinesDeleted(e) {
|
|
56
|
-
return false;
|
|
57
|
-
}
|
|
58
|
-
onLinesInserted(e) {
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
onRevealRangeRequest(e) {
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
onScrollChanged(e) {
|
|
65
|
-
return false;
|
|
66
|
-
}
|
|
67
|
-
onThemeChanged(e) {
|
|
68
|
-
return false;
|
|
69
|
-
}
|
|
70
|
-
onTokensChanged(e) {
|
|
71
|
-
return false;
|
|
72
|
-
}
|
|
73
|
-
onTokensColorsChanged(e) {
|
|
74
|
-
return false;
|
|
75
|
-
}
|
|
76
|
-
onZonesChanged(e) {
|
|
77
|
-
return false;
|
|
78
|
-
}
|
|
79
|
-
// --- end event handlers
|
|
80
|
-
handleEvents(events) {
|
|
81
|
-
let shouldRender = false;
|
|
82
|
-
for (let i = 0, len = events.length; i < len; i++) {
|
|
83
|
-
const e = events[i];
|
|
84
|
-
switch (e.type) {
|
|
85
|
-
case 0 /* viewEvents.ViewEventType.ViewCompositionStart */:
|
|
86
|
-
if (this.onCompositionStart(e)) {
|
|
87
|
-
shouldRender = true;
|
|
88
|
-
}
|
|
89
|
-
break;
|
|
90
|
-
case 1 /* viewEvents.ViewEventType.ViewCompositionEnd */:
|
|
91
|
-
if (this.onCompositionEnd(e)) {
|
|
92
|
-
shouldRender = true;
|
|
93
|
-
}
|
|
94
|
-
break;
|
|
95
|
-
case 2 /* viewEvents.ViewEventType.ViewConfigurationChanged */:
|
|
96
|
-
if (this.onConfigurationChanged(e)) {
|
|
97
|
-
shouldRender = true;
|
|
98
|
-
}
|
|
99
|
-
break;
|
|
100
|
-
case 3 /* viewEvents.ViewEventType.ViewCursorStateChanged */:
|
|
101
|
-
if (this.onCursorStateChanged(e)) {
|
|
102
|
-
shouldRender = true;
|
|
103
|
-
}
|
|
104
|
-
break;
|
|
105
|
-
case 4 /* viewEvents.ViewEventType.ViewDecorationsChanged */:
|
|
106
|
-
if (this.onDecorationsChanged(e)) {
|
|
107
|
-
shouldRender = true;
|
|
108
|
-
}
|
|
109
|
-
break;
|
|
110
|
-
case 5 /* viewEvents.ViewEventType.ViewFlushed */:
|
|
111
|
-
if (this.onFlushed(e)) {
|
|
112
|
-
shouldRender = true;
|
|
113
|
-
}
|
|
114
|
-
break;
|
|
115
|
-
case 6 /* viewEvents.ViewEventType.ViewFocusChanged */:
|
|
116
|
-
if (this.onFocusChanged(e)) {
|
|
117
|
-
shouldRender = true;
|
|
118
|
-
}
|
|
119
|
-
break;
|
|
120
|
-
case 7 /* viewEvents.ViewEventType.ViewLanguageConfigurationChanged */:
|
|
121
|
-
if (this.onLanguageConfigurationChanged(e)) {
|
|
122
|
-
shouldRender = true;
|
|
123
|
-
}
|
|
124
|
-
break;
|
|
125
|
-
case 8 /* viewEvents.ViewEventType.ViewLineMappingChanged */:
|
|
126
|
-
if (this.onLineMappingChanged(e)) {
|
|
127
|
-
shouldRender = true;
|
|
128
|
-
}
|
|
129
|
-
break;
|
|
130
|
-
case 9 /* viewEvents.ViewEventType.ViewLinesChanged */:
|
|
131
|
-
if (this.onLinesChanged(e)) {
|
|
132
|
-
shouldRender = true;
|
|
133
|
-
}
|
|
134
|
-
break;
|
|
135
|
-
case 10 /* viewEvents.ViewEventType.ViewLinesDeleted */:
|
|
136
|
-
if (this.onLinesDeleted(e)) {
|
|
137
|
-
shouldRender = true;
|
|
138
|
-
}
|
|
139
|
-
break;
|
|
140
|
-
case 11 /* viewEvents.ViewEventType.ViewLinesInserted */:
|
|
141
|
-
if (this.onLinesInserted(e)) {
|
|
142
|
-
shouldRender = true;
|
|
143
|
-
}
|
|
144
|
-
break;
|
|
145
|
-
case 12 /* viewEvents.ViewEventType.ViewRevealRangeRequest */:
|
|
146
|
-
if (this.onRevealRangeRequest(e)) {
|
|
147
|
-
shouldRender = true;
|
|
148
|
-
}
|
|
149
|
-
break;
|
|
150
|
-
case 13 /* viewEvents.ViewEventType.ViewScrollChanged */:
|
|
151
|
-
if (this.onScrollChanged(e)) {
|
|
152
|
-
shouldRender = true;
|
|
153
|
-
}
|
|
154
|
-
break;
|
|
155
|
-
case 15 /* viewEvents.ViewEventType.ViewTokensChanged */:
|
|
156
|
-
if (this.onTokensChanged(e)) {
|
|
157
|
-
shouldRender = true;
|
|
158
|
-
}
|
|
159
|
-
break;
|
|
160
|
-
case 14 /* viewEvents.ViewEventType.ViewThemeChanged */:
|
|
161
|
-
if (this.onThemeChanged(e)) {
|
|
162
|
-
shouldRender = true;
|
|
163
|
-
}
|
|
164
|
-
break;
|
|
165
|
-
case 16 /* viewEvents.ViewEventType.ViewTokensColorsChanged */:
|
|
166
|
-
if (this.onTokensColorsChanged(e)) {
|
|
167
|
-
shouldRender = true;
|
|
168
|
-
}
|
|
169
|
-
break;
|
|
170
|
-
case 17 /* viewEvents.ViewEventType.ViewZonesChanged */:
|
|
171
|
-
if (this.onZonesChanged(e)) {
|
|
172
|
-
shouldRender = true;
|
|
173
|
-
}
|
|
174
|
-
break;
|
|
175
|
-
default:
|
|
176
|
-
console.info('View received unknown event: ');
|
|
177
|
-
console.info(e);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
if (shouldRender) {
|
|
181
|
-
this._shouldRender = true;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
export { ViewEventHandler };
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
class ViewCompositionStartEvent {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.type = 0 /* ViewEventType.ViewCompositionStart */;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
class ViewCompositionEndEvent {
|
|
11
|
-
constructor() {
|
|
12
|
-
this.type = 1 /* ViewEventType.ViewCompositionEnd */;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
class ViewConfigurationChangedEvent {
|
|
16
|
-
constructor(source) {
|
|
17
|
-
this.type = 2 /* ViewEventType.ViewConfigurationChanged */;
|
|
18
|
-
this._source = source;
|
|
19
|
-
}
|
|
20
|
-
hasChanged(id) {
|
|
21
|
-
return this._source.hasChanged(id);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
class ViewCursorStateChangedEvent {
|
|
25
|
-
constructor(selections, modelSelections, reason) {
|
|
26
|
-
this.selections = selections;
|
|
27
|
-
this.modelSelections = modelSelections;
|
|
28
|
-
this.reason = reason;
|
|
29
|
-
this.type = 3 /* ViewEventType.ViewCursorStateChanged */;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
class ViewDecorationsChangedEvent {
|
|
33
|
-
constructor(source) {
|
|
34
|
-
this.type = 4 /* ViewEventType.ViewDecorationsChanged */;
|
|
35
|
-
if (source) {
|
|
36
|
-
this.affectsMinimap = source.affectsMinimap;
|
|
37
|
-
this.affectsOverviewRuler = source.affectsOverviewRuler;
|
|
38
|
-
this.affectsGlyphMargin = source.affectsGlyphMargin;
|
|
39
|
-
this.affectsLineNumber = source.affectsLineNumber;
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
this.affectsMinimap = true;
|
|
43
|
-
this.affectsOverviewRuler = true;
|
|
44
|
-
this.affectsGlyphMargin = true;
|
|
45
|
-
this.affectsLineNumber = true;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
class ViewFlushedEvent {
|
|
50
|
-
constructor() {
|
|
51
|
-
this.type = 5 /* ViewEventType.ViewFlushed */;
|
|
52
|
-
// Nothing to do
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
class ViewFocusChangedEvent {
|
|
56
|
-
constructor(isFocused) {
|
|
57
|
-
this.type = 6 /* ViewEventType.ViewFocusChanged */;
|
|
58
|
-
this.isFocused = isFocused;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
class ViewLanguageConfigurationEvent {
|
|
62
|
-
constructor() {
|
|
63
|
-
this.type = 7 /* ViewEventType.ViewLanguageConfigurationChanged */;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
class ViewLineMappingChangedEvent {
|
|
67
|
-
constructor() {
|
|
68
|
-
this.type = 8 /* ViewEventType.ViewLineMappingChanged */;
|
|
69
|
-
// Nothing to do
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
class ViewLinesChangedEvent {
|
|
73
|
-
constructor(
|
|
74
|
-
/**
|
|
75
|
-
* The first line that has changed.
|
|
76
|
-
*/
|
|
77
|
-
fromLineNumber,
|
|
78
|
-
/**
|
|
79
|
-
* The number of lines that have changed.
|
|
80
|
-
*/
|
|
81
|
-
count) {
|
|
82
|
-
this.fromLineNumber = fromLineNumber;
|
|
83
|
-
this.count = count;
|
|
84
|
-
this.type = 9 /* ViewEventType.ViewLinesChanged */;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
class ViewLinesDeletedEvent {
|
|
88
|
-
constructor(fromLineNumber, toLineNumber) {
|
|
89
|
-
this.type = 10 /* ViewEventType.ViewLinesDeleted */;
|
|
90
|
-
this.fromLineNumber = fromLineNumber;
|
|
91
|
-
this.toLineNumber = toLineNumber;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
class ViewLinesInsertedEvent {
|
|
95
|
-
constructor(fromLineNumber, toLineNumber) {
|
|
96
|
-
this.type = 11 /* ViewEventType.ViewLinesInserted */;
|
|
97
|
-
this.fromLineNumber = fromLineNumber;
|
|
98
|
-
this.toLineNumber = toLineNumber;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
class ViewRevealRangeRequestEvent {
|
|
102
|
-
constructor(
|
|
103
|
-
/**
|
|
104
|
-
* Source of the call that caused the event.
|
|
105
|
-
*/
|
|
106
|
-
source,
|
|
107
|
-
/**
|
|
108
|
-
* Reduce the revealing to a minimum (e.g. avoid scrolling if the bounding box is visible and near the viewport edge).
|
|
109
|
-
*/
|
|
110
|
-
minimalReveal,
|
|
111
|
-
/**
|
|
112
|
-
* Range to be reavealed.
|
|
113
|
-
*/
|
|
114
|
-
range,
|
|
115
|
-
/**
|
|
116
|
-
* Selections to be revealed.
|
|
117
|
-
*/
|
|
118
|
-
selections,
|
|
119
|
-
/**
|
|
120
|
-
* The vertical reveal strategy.
|
|
121
|
-
*/
|
|
122
|
-
verticalType,
|
|
123
|
-
/**
|
|
124
|
-
* If true: there should be a horizontal & vertical revealing.
|
|
125
|
-
* If false: there should be just a vertical revealing.
|
|
126
|
-
*/
|
|
127
|
-
revealHorizontal,
|
|
128
|
-
/**
|
|
129
|
-
* The scroll type.
|
|
130
|
-
*/
|
|
131
|
-
scrollType) {
|
|
132
|
-
this.source = source;
|
|
133
|
-
this.minimalReveal = minimalReveal;
|
|
134
|
-
this.range = range;
|
|
135
|
-
this.selections = selections;
|
|
136
|
-
this.verticalType = verticalType;
|
|
137
|
-
this.revealHorizontal = revealHorizontal;
|
|
138
|
-
this.scrollType = scrollType;
|
|
139
|
-
this.type = 12 /* ViewEventType.ViewRevealRangeRequest */;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
class ViewScrollChangedEvent {
|
|
143
|
-
constructor(source) {
|
|
144
|
-
this.type = 13 /* ViewEventType.ViewScrollChanged */;
|
|
145
|
-
this.scrollWidth = source.scrollWidth;
|
|
146
|
-
this.scrollLeft = source.scrollLeft;
|
|
147
|
-
this.scrollHeight = source.scrollHeight;
|
|
148
|
-
this.scrollTop = source.scrollTop;
|
|
149
|
-
this.scrollWidthChanged = source.scrollWidthChanged;
|
|
150
|
-
this.scrollLeftChanged = source.scrollLeftChanged;
|
|
151
|
-
this.scrollHeightChanged = source.scrollHeightChanged;
|
|
152
|
-
this.scrollTopChanged = source.scrollTopChanged;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
class ViewThemeChangedEvent {
|
|
156
|
-
constructor(theme) {
|
|
157
|
-
this.theme = theme;
|
|
158
|
-
this.type = 14 /* ViewEventType.ViewThemeChanged */;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
class ViewTokensChangedEvent {
|
|
162
|
-
constructor(ranges) {
|
|
163
|
-
this.type = 15 /* ViewEventType.ViewTokensChanged */;
|
|
164
|
-
this.ranges = ranges;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
class ViewTokensColorsChangedEvent {
|
|
168
|
-
constructor() {
|
|
169
|
-
this.type = 16 /* ViewEventType.ViewTokensColorsChanged */;
|
|
170
|
-
// Nothing to do
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
class ViewZonesChangedEvent {
|
|
174
|
-
constructor() {
|
|
175
|
-
this.type = 17 /* ViewEventType.ViewZonesChanged */;
|
|
176
|
-
// Nothing to do
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
export { ViewCompositionEndEvent, ViewCompositionStartEvent, ViewConfigurationChangedEvent, ViewCursorStateChangedEvent, ViewDecorationsChangedEvent, ViewFlushedEvent, ViewFocusChangedEvent, ViewLanguageConfigurationEvent, ViewLineMappingChangedEvent, ViewLinesChangedEvent, ViewLinesDeletedEvent, ViewLinesInsertedEvent, ViewRevealRangeRequestEvent, ViewScrollChangedEvent, ViewThemeChangedEvent, ViewTokensChangedEvent, ViewTokensColorsChangedEvent, ViewZonesChangedEvent };
|