monaco-editor11 1.0.7 → 1.0.9

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.
Files changed (237) hide show
  1. package/dist/assets/css.worker-C7FogG4G.js +93 -0
  2. package/dist/assets/editor.worker-iXcRX1Tq.js +26 -0
  3. package/dist/assets/html.worker-C8VxctEJ.js +470 -0
  4. package/dist/assets/json.worker-CMC9kgPL.js +58 -0
  5. package/dist/assets/ts.worker-CtTJ3hNN.js +67731 -0
  6. package/dist/index.d.ts +0 -6
  7. package/dist/monaco-editor11.es.js +49 -78
  8. package/dist/monaco-editor11.umd.js +1 -50
  9. package/dist/monaco.d.ts +8 -0
  10. package/dist/workers/common/initialize.js +16 -0
  11. package/dist/workers/common/workers.js +141 -0
  12. package/dist/workers/editor/common/abstractSyntaxTokenBackend.js +128 -0
  13. package/dist/workers/editor/common/abstractText.js +89 -0
  14. package/dist/workers/editor/common/ast.js +485 -0
  15. package/dist/workers/editor/common/autoIndent.js +390 -0
  16. package/dist/workers/editor/common/beforeEditPositionMapper.js +110 -0
  17. package/dist/workers/editor/common/bracketPairsImpl.js +717 -0
  18. package/dist/workers/editor/common/bracketPairsTree.js +343 -0
  19. package/dist/workers/editor/common/brackets.js +108 -0
  20. package/dist/workers/editor/common/characterClassifier.js +59 -0
  21. package/dist/workers/editor/common/characterPair.js +40 -0
  22. package/dist/workers/editor/common/colorizedBracketPairsDecorationProvider.js +97 -0
  23. package/dist/workers/editor/common/columnRange.js +35 -0
  24. package/dist/workers/editor/common/combineTextEditInfos.js +124 -0
  25. package/dist/workers/editor/common/common.js +20 -0
  26. package/dist/workers/editor/common/computeMovedLines.js +249 -0
  27. package/dist/workers/editor/common/concat23Trees.js +192 -0
  28. package/dist/workers/editor/common/contiguousMultilineTokens.js +32 -0
  29. package/dist/workers/editor/common/contiguousMultilineTokensBuilder.js +23 -0
  30. package/dist/workers/editor/common/contiguousTokensEditing.js +128 -0
  31. package/dist/workers/editor/common/contiguousTokensStore.js +207 -0
  32. package/dist/workers/editor/common/coordinatesConverter.js +51 -0
  33. package/dist/workers/editor/common/cursor.js +899 -0
  34. package/dist/workers/editor/common/cursorAtomicMoveOperations.js +145 -0
  35. package/dist/workers/editor/common/cursorCollection.js +194 -0
  36. package/dist/workers/editor/common/cursorColumnSelection.js +93 -0
  37. package/dist/workers/editor/common/cursorColumns.js +112 -0
  38. package/dist/workers/editor/common/cursorCommon.js +250 -0
  39. package/dist/workers/editor/common/cursorContext.js +15 -0
  40. package/dist/workers/editor/common/cursorDeleteOperations.js +231 -0
  41. package/dist/workers/editor/common/cursorMoveCommands.js +676 -0
  42. package/dist/workers/editor/common/cursorMoveOperations.js +290 -0
  43. package/dist/workers/editor/common/cursorTypeEditOperations.js +968 -0
  44. package/dist/workers/editor/common/cursorTypeOperations.js +173 -0
  45. package/dist/workers/editor/common/cursorUtils.js +75 -0
  46. package/dist/workers/editor/common/cursorWordOperations.js +720 -0
  47. package/dist/workers/editor/common/defaultDocumentColorsComputer.js +138 -0
  48. package/dist/workers/editor/common/defaultLinesDiffComputer.js +188 -0
  49. package/dist/workers/editor/common/diffAlgorithm.js +139 -0
  50. package/dist/workers/editor/common/diffEditor.js +38 -0
  51. package/dist/workers/editor/common/dynamicProgrammingDiffing.js +101 -0
  52. package/dist/workers/editor/common/edit.js +183 -0
  53. package/dist/workers/editor/common/editOperation.js +36 -0
  54. package/dist/workers/editor/common/editStack.js +363 -0
  55. package/dist/workers/editor/common/editorAction.js +26 -0
  56. package/dist/workers/editor/common/editorBaseApi.js +43 -0
  57. package/dist/workers/editor/common/editorColorRegistry.js +102 -0
  58. package/dist/workers/editor/common/editorCommon.js +13 -0
  59. package/dist/workers/editor/common/editorConfigurationSchema.js +338 -0
  60. package/dist/workers/editor/common/editorContextKeys.js +84 -0
  61. package/dist/workers/editor/common/editorFeatures.js +17 -0
  62. package/dist/workers/editor/common/editorOptions.js +3440 -0
  63. package/dist/workers/editor/common/editorTheme.js +23 -0
  64. package/dist/workers/editor/common/editorWebWorker.js +299 -0
  65. package/dist/workers/editor/common/editorWorker.js +9 -0
  66. package/dist/workers/editor/common/editorWorkerHost.js +15 -0
  67. package/dist/workers/editor/common/editorZoom.js +26 -0
  68. package/dist/workers/editor/common/electricCharacter.js +55 -0
  69. package/dist/workers/editor/common/encodedTokenAttributes.js +79 -0
  70. package/dist/workers/editor/common/enterAction.js +53 -0
  71. package/dist/workers/editor/common/eolCounter.js +44 -0
  72. package/dist/workers/editor/common/findSectionHeaders.js +128 -0
  73. package/dist/workers/editor/common/fixBrackets.js +67 -0
  74. package/dist/workers/editor/common/fixedArray.js +70 -0
  75. package/dist/workers/editor/common/fontInfo.js +172 -0
  76. package/dist/workers/editor/common/fontInfoFromSettings.js +29 -0
  77. package/dist/workers/editor/common/getIconClasses.js +106 -0
  78. package/dist/workers/editor/common/getPositionOffsetTransformerFromTextModel.js +24 -0
  79. package/dist/workers/editor/common/glyphLanesModel.js +61 -0
  80. package/dist/workers/editor/common/guidesTextModelPart.js +405 -0
  81. package/dist/workers/editor/common/heuristicSequenceOptimizations.js +374 -0
  82. package/dist/workers/editor/common/indentRules.js +63 -0
  83. package/dist/workers/editor/common/indentation.js +39 -0
  84. package/dist/workers/editor/common/indentationGuesser.js +178 -0
  85. package/dist/workers/editor/common/indentationLineProcessor.js +193 -0
  86. package/dist/workers/editor/common/inlineDecorations.js +26 -0
  87. package/dist/workers/editor/common/inplaceReplaceSupport.js +87 -0
  88. package/dist/workers/editor/common/inputMode.js +22 -0
  89. package/dist/workers/editor/common/intervalTree.js +1002 -0
  90. package/dist/workers/editor/common/language.js +9 -0
  91. package/dist/workers/editor/common/languageBracketsConfiguration.js +133 -0
  92. package/dist/workers/editor/common/languageConfiguration.js +138 -0
  93. package/dist/workers/editor/common/languageConfigurationRegistry.js +361 -0
  94. package/dist/workers/editor/common/languageFeatureDebounce.js +137 -0
  95. package/dist/workers/editor/common/languageFeatureRegistry.js +180 -0
  96. package/dist/workers/editor/common/languageFeatures.js +9 -0
  97. package/dist/workers/editor/common/languageFeaturesService.js +47 -0
  98. package/dist/workers/editor/common/languageSelector.js +112 -0
  99. package/dist/workers/editor/common/languageService.js +92 -0
  100. package/dist/workers/editor/common/languages.js +522 -0
  101. package/dist/workers/editor/common/languagesAssociations.js +193 -0
  102. package/dist/workers/editor/common/languagesRegistry.js +237 -0
  103. package/dist/workers/editor/common/legacyLinesDiffComputer.js +468 -0
  104. package/dist/workers/editor/common/length.js +129 -0
  105. package/dist/workers/editor/common/lineDecorations.js +208 -0
  106. package/dist/workers/editor/common/lineEdit.js +75 -0
  107. package/dist/workers/editor/common/lineHeights.js +370 -0
  108. package/dist/workers/editor/common/linePart.js +25 -0
  109. package/dist/workers/editor/common/lineRange.js +312 -0
  110. package/dist/workers/editor/common/lineSequence.js +36 -0
  111. package/dist/workers/editor/common/lineTokens.js +405 -0
  112. package/dist/workers/editor/common/linesDiffComputer.js +29 -0
  113. package/dist/workers/editor/common/linesDiffComputers.js +13 -0
  114. package/dist/workers/editor/common/linesLayout.js +765 -0
  115. package/dist/workers/editor/common/linesSliceCharSequence.js +205 -0
  116. package/dist/workers/editor/common/linkComputer.js +269 -0
  117. package/dist/workers/editor/common/markerDecorations.js +9 -0
  118. package/dist/workers/editor/common/markerDecorationsService.js +248 -0
  119. package/dist/workers/editor/common/minimapTokensColorTracker.js +58 -0
  120. package/dist/workers/editor/common/mirrorTextModel.js +117 -0
  121. package/dist/workers/editor/common/model.js +9 -0
  122. package/dist/workers/editor/common/modelLineProjection.js +350 -0
  123. package/dist/workers/editor/common/modelLineProjectionData.js +297 -0
  124. package/dist/workers/editor/common/modelService.js +413 -0
  125. package/dist/workers/editor/common/modesRegistry.js +75 -0
  126. package/dist/workers/editor/common/monospaceLineBreaksComputer.js +473 -0
  127. package/dist/workers/editor/common/myersDiffAlgorithm.js +159 -0
  128. package/dist/workers/editor/common/nodeReader.js +127 -0
  129. package/dist/workers/editor/common/nullTokenize.js +29 -0
  130. package/dist/workers/editor/common/offsetRange.js +225 -0
  131. package/dist/workers/editor/common/onEnter.js +109 -0
  132. package/dist/workers/editor/common/oneCursor.js +117 -0
  133. package/dist/workers/editor/common/overviewZoneManager.js +176 -0
  134. package/dist/workers/editor/common/parser.js +121 -0
  135. package/dist/workers/editor/common/pieceTreeBase.js +1473 -0
  136. package/dist/workers/editor/common/pieceTreeTextBuffer.js +461 -0
  137. package/dist/workers/editor/common/pieceTreeTextBufferBuilder.js +140 -0
  138. package/dist/workers/editor/common/point.js +50 -0
  139. package/dist/workers/editor/common/position.js +142 -0
  140. package/dist/workers/editor/common/positionToOffset.js +17 -0
  141. package/dist/workers/editor/common/positionToOffsetImpl.js +98 -0
  142. package/dist/workers/editor/common/prefixSumComputer.js +226 -0
  143. package/dist/workers/editor/common/range.js +421 -0
  144. package/dist/workers/editor/common/rangeMapping.js +229 -0
  145. package/dist/workers/editor/common/rangeSingleLine.js +17 -0
  146. package/dist/workers/editor/common/rbTreeBase.js +362 -0
  147. package/dist/workers/editor/common/rect.js +163 -0
  148. package/dist/workers/editor/common/replaceCommand.js +158 -0
  149. package/dist/workers/editor/common/resolverService.js +5 -0
  150. package/dist/workers/editor/common/rgba.js +35 -0
  151. package/dist/workers/editor/common/richEditBrackets.js +356 -0
  152. package/dist/workers/editor/common/selection.js +145 -0
  153. package/dist/workers/editor/common/semanticTokensDto.js +82 -0
  154. package/dist/workers/editor/common/semanticTokensProviderStyling.js +263 -0
  155. package/dist/workers/editor/common/semanticTokensStyling.js +9 -0
  156. package/dist/workers/editor/common/semanticTokensStylingService.js +47 -0
  157. package/dist/workers/editor/common/shiftCommand.js +241 -0
  158. package/dist/workers/editor/common/smallImmutableSet.js +108 -0
  159. package/dist/workers/editor/common/sparseMultilineTokens.js +548 -0
  160. package/dist/workers/editor/common/sparseTokensStore.js +210 -0
  161. package/dist/workers/editor/common/standaloneEnums.js +1017 -0
  162. package/dist/workers/editor/common/standaloneStrings.js +42 -0
  163. package/dist/workers/editor/common/stringBuilder.js +122 -0
  164. package/dist/workers/editor/common/stringEdit.js +165 -0
  165. package/dist/workers/editor/common/supports.js +58 -0
  166. package/dist/workers/editor/common/surroundSelectionCommand.js +44 -0
  167. package/dist/workers/editor/common/textChange.js +248 -0
  168. package/dist/workers/editor/common/textEdit.js +269 -0
  169. package/dist/workers/editor/common/textLength.js +87 -0
  170. package/dist/workers/editor/common/textModel.js +2031 -0
  171. package/dist/workers/editor/common/textModelBracketPairs.js +45 -0
  172. package/dist/workers/editor/common/textModelDefaults.js +18 -0
  173. package/dist/workers/editor/common/textModelEditSource.js +166 -0
  174. package/dist/workers/editor/common/textModelEvents.js +216 -0
  175. package/dist/workers/editor/common/textModelGuides.js +40 -0
  176. package/dist/workers/editor/common/textModelPart.js +23 -0
  177. package/dist/workers/editor/common/textModelSearch.js +455 -0
  178. package/dist/workers/editor/common/textModelStringEdit.js +11 -0
  179. package/dist/workers/editor/common/textModelSync.impl.js +307 -0
  180. package/dist/workers/editor/common/textModelText.js +26 -0
  181. package/dist/workers/editor/common/textModelTokens.js +436 -0
  182. package/dist/workers/editor/common/textResourceConfiguration.js +6 -0
  183. package/dist/workers/editor/common/textToHtmlTokenizer.js +139 -0
  184. package/dist/workers/editor/common/tokenStore.js +407 -0
  185. package/dist/workers/editor/common/tokenWithTextArray.js +73 -0
  186. package/dist/workers/editor/common/tokenization.js +287 -0
  187. package/dist/workers/editor/common/tokenizationRegistry.js +123 -0
  188. package/dist/workers/editor/common/tokenizationTextModelPart.js +275 -0
  189. package/dist/workers/editor/common/tokenizer.js +301 -0
  190. package/dist/workers/editor/common/tokenizerSyntaxTokenBackend.js +261 -0
  191. package/dist/workers/editor/common/treeSitterLibraryService.js +9 -0
  192. package/dist/workers/editor/common/treeSitterSyntaxTokenBackend.js +167 -0
  193. package/dist/workers/editor/common/treeSitterThemeService.js +9 -0
  194. package/dist/workers/editor/common/treeSitterTokenizationImpl.js +713 -0
  195. package/dist/workers/editor/common/treeSitterTree.js +395 -0
  196. package/dist/workers/editor/common/treeViewsDnd.js +24 -0
  197. package/dist/workers/editor/common/treeViewsDndService.js +12 -0
  198. package/dist/workers/editor/common/trimTrailingWhitespaceCommand.js +98 -0
  199. package/dist/workers/editor/common/unicodeTextModelHighlighter.js +188 -0
  200. package/dist/workers/editor/common/utils.js +62 -0
  201. package/dist/workers/editor/common/viewContext.js +22 -0
  202. package/dist/workers/editor/common/viewEventHandler.js +186 -0
  203. package/dist/workers/editor/common/viewEvents.js +180 -0
  204. package/dist/workers/editor/common/viewLayout.js +368 -0
  205. package/dist/workers/editor/common/viewLineRenderer.js +948 -0
  206. package/dist/workers/editor/common/viewLinesViewportData.js +30 -0
  207. package/dist/workers/editor/common/viewModel.js +98 -0
  208. package/dist/workers/editor/common/viewModelDecoration.js +55 -0
  209. package/dist/workers/editor/common/viewModelDecorations.js +132 -0
  210. package/dist/workers/editor/common/viewModelEventDispatcher.js +398 -0
  211. package/dist/workers/editor/common/viewModelImpl.js +1163 -0
  212. package/dist/workers/editor/common/viewModelLines.js +938 -0
  213. package/dist/workers/editor/common/wordCharacterClassifier.js +87 -0
  214. package/dist/workers/editor/common/wordHelper.js +127 -0
  215. package/dist/workers/editor/editor.worker.js +11 -0
  216. package/dist/workers/language/css.worker.js +8 -0
  217. package/dist/workers/language/cssMode.js +198 -0
  218. package/dist/workers/language/cssWorker.js +183 -0
  219. package/dist/workers/language/html.worker.js +8 -0
  220. package/dist/workers/language/htmlMode.js +213 -0
  221. package/dist/workers/language/htmlWorker.js +126 -0
  222. package/dist/workers/language/json.worker.js +8 -0
  223. package/dist/workers/language/jsonMode.js +224 -0
  224. package/dist/workers/language/jsonWorker.js +187 -0
  225. package/dist/workers/language/languageFeatures.js +1009 -0
  226. package/dist/workers/language/lib.index.js +103 -0
  227. package/dist/workers/language/lib.js +1107 -0
  228. package/dist/workers/language/lspLanguageFeatures.js +716 -0
  229. package/dist/workers/language/monaco.contribution.js +144 -0
  230. package/dist/workers/language/tokenization.js +189 -0
  231. package/dist/workers/language/ts.worker.js +14 -0
  232. package/dist/workers/language/tsMode.js +212 -0
  233. package/dist/workers/language/tsWorker.js +352 -0
  234. package/dist/workers/language/typescriptServices.js +210154 -0
  235. package/dist/workers/language/typescriptServicesMetadata.js +3 -0
  236. package/dist/workers/language/workerManager.js +65 -0
  237. package/package.json +3 -2
@@ -0,0 +1,128 @@
1
+ import { isMultilineRegexSource } from '../model/textModelSearch.js';
2
+ import { regExpLeadsToEndlessLoop } from '../../../base/common/strings.js';
3
+
4
+ /*---------------------------------------------------------------------------------------------
5
+ * Copyright (c) Microsoft Corporation. All rights reserved.
6
+ * Licensed under the MIT License. See License.txt in the project root for license information.
7
+ *--------------------------------------------------------------------------------------------*/
8
+ const trimDashesRegex = /^-+|-+$/g;
9
+ const CHUNK_SIZE = 100;
10
+ const MAX_SECTION_LINES = 5;
11
+ /**
12
+ * Find section headers in the model.
13
+ *
14
+ * @param model the text model to search in
15
+ * @param options options to search with
16
+ * @returns an array of section headers
17
+ */
18
+ function findSectionHeaders(model, options) {
19
+ let headers = [];
20
+ if (options.findRegionSectionHeaders && options.foldingRules?.markers) {
21
+ const regionHeaders = collectRegionHeaders(model, options);
22
+ headers = headers.concat(regionHeaders);
23
+ }
24
+ if (options.findMarkSectionHeaders) {
25
+ const markHeaders = collectMarkHeaders(model, options);
26
+ headers = headers.concat(markHeaders);
27
+ }
28
+ return headers;
29
+ }
30
+ function collectRegionHeaders(model, options) {
31
+ const regionHeaders = [];
32
+ const endLineNumber = model.getLineCount();
33
+ for (let lineNumber = 1; lineNumber <= endLineNumber; lineNumber++) {
34
+ const lineContent = model.getLineContent(lineNumber);
35
+ const match = lineContent.match(options.foldingRules.markers.start);
36
+ if (match) {
37
+ const range = { startLineNumber: lineNumber, startColumn: match[0].length + 1, endLineNumber: lineNumber, endColumn: lineContent.length + 1 };
38
+ if (range.endColumn > range.startColumn) {
39
+ const sectionHeader = {
40
+ range,
41
+ ...getHeaderText(lineContent.substring(match[0].length)),
42
+ shouldBeInComments: false
43
+ };
44
+ if (sectionHeader.text || sectionHeader.hasSeparatorLine) {
45
+ regionHeaders.push(sectionHeader);
46
+ }
47
+ }
48
+ }
49
+ }
50
+ return regionHeaders;
51
+ }
52
+ function collectMarkHeaders(model, options) {
53
+ const markHeaders = [];
54
+ const endLineNumber = model.getLineCount();
55
+ // Validate regex to prevent infinite loops
56
+ if (!options.markSectionHeaderRegex || options.markSectionHeaderRegex.trim() === '') {
57
+ return markHeaders;
58
+ }
59
+ // Create regex with flags for:
60
+ // - 'd' for indices to get proper match positions
61
+ // - 'm' for multi-line mode so ^ and $ match line starts/ends
62
+ // - 's' for dot-all mode so . matches newlines
63
+ const multiline = isMultilineRegexSource(options.markSectionHeaderRegex);
64
+ const regex = new RegExp(options.markSectionHeaderRegex, `gdm${multiline ? 's' : ''}`);
65
+ // Check if the regex would lead to an endless loop
66
+ if (regExpLeadsToEndlessLoop(regex)) {
67
+ return markHeaders;
68
+ }
69
+ // Process text in overlapping chunks for better performance
70
+ for (let startLine = 1; startLine <= endLineNumber; startLine += CHUNK_SIZE - MAX_SECTION_LINES) {
71
+ const endLine = Math.min(startLine + CHUNK_SIZE - 1, endLineNumber);
72
+ const lines = [];
73
+ // Collect lines for the current chunk
74
+ for (let i = startLine; i <= endLine; i++) {
75
+ lines.push(model.getLineContent(i));
76
+ }
77
+ const text = lines.join('\n');
78
+ regex.lastIndex = 0;
79
+ let match;
80
+ while ((match = regex.exec(text)) !== null) {
81
+ // Calculate which line this match starts on by counting newlines before it
82
+ const precedingText = text.substring(0, match.index);
83
+ const lineOffset = (precedingText.match(/\n/g) || []).length;
84
+ const lineNumber = startLine + lineOffset;
85
+ // Calculate match height to check overlap properly
86
+ const matchLines = match[0].split('\n');
87
+ const matchHeight = matchLines.length;
88
+ const matchEndLine = lineNumber + matchHeight - 1;
89
+ // Calculate start column - need to find the start of the line containing the match
90
+ const lineStartIndex = precedingText.lastIndexOf('\n') + 1;
91
+ const startColumn = match.index - lineStartIndex + 1;
92
+ // Calculate end column - need to handle multi-line matches
93
+ const lastMatchLine = matchLines[matchLines.length - 1];
94
+ const endColumn = matchHeight === 1 ? startColumn + match[0].length : lastMatchLine.length + 1;
95
+ const range = {
96
+ startLineNumber: lineNumber,
97
+ startColumn,
98
+ endLineNumber: matchEndLine,
99
+ endColumn
100
+ };
101
+ const text2 = (match.groups ?? {})['label'] ?? '';
102
+ const hasSeparatorLine = ((match.groups ?? {})['separator'] ?? '') !== '';
103
+ const sectionHeader = {
104
+ range,
105
+ text: text2,
106
+ hasSeparatorLine,
107
+ shouldBeInComments: true
108
+ };
109
+ if (sectionHeader.text || sectionHeader.hasSeparatorLine) {
110
+ // only push if the previous one doesn't have this same linbe
111
+ if (markHeaders.length === 0 || markHeaders[markHeaders.length - 1].range.endLineNumber < sectionHeader.range.startLineNumber) {
112
+ markHeaders.push(sectionHeader);
113
+ }
114
+ }
115
+ // Move lastIndex past the current match to avoid infinite loop
116
+ regex.lastIndex = match.index + match[0].length;
117
+ }
118
+ }
119
+ return markHeaders;
120
+ }
121
+ function getHeaderText(text) {
122
+ text = text.trim();
123
+ const hasSeparatorLine = text.startsWith('-');
124
+ text = text.replace(trimDashesRegex, '');
125
+ return { text, hasSeparatorLine };
126
+ }
127
+
128
+ export { collectMarkHeaders, findSectionHeaders };
@@ -0,0 +1,67 @@
1
+ import { LanguageAgnosticBracketTokens } from './bracketPairsTree/brackets.js';
2
+ import { lengthAdd, lengthGetColumnCountIfZeroLineCount, lengthZero } from './bracketPairsTree/length.js';
3
+ import { parseDocument } from './bracketPairsTree/parser.js';
4
+ import { DenseKeyProvider } from './bracketPairsTree/smallImmutableSet.js';
5
+ import { TextBufferTokenizer } from './bracketPairsTree/tokenizer.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
+ function fixBracketsInLine(tokens, languageConfigurationService) {
12
+ const denseKeyProvider = new DenseKeyProvider();
13
+ const bracketTokens = new LanguageAgnosticBracketTokens(denseKeyProvider, (languageId) => languageConfigurationService.getLanguageConfiguration(languageId));
14
+ const tokenizer = new TextBufferTokenizer(new StaticTokenizerSource([tokens]), bracketTokens);
15
+ const node = parseDocument(tokenizer, [], undefined, true);
16
+ let str = '';
17
+ const line = tokens.getLineContent();
18
+ function processNode(node, offset) {
19
+ if (node.kind === 2 /* AstNodeKind.Pair */) {
20
+ processNode(node.openingBracket, offset);
21
+ offset = lengthAdd(offset, node.openingBracket.length);
22
+ if (node.child) {
23
+ processNode(node.child, offset);
24
+ offset = lengthAdd(offset, node.child.length);
25
+ }
26
+ if (node.closingBracket) {
27
+ processNode(node.closingBracket, offset);
28
+ offset = lengthAdd(offset, node.closingBracket.length);
29
+ }
30
+ else {
31
+ const singleLangBracketTokens = bracketTokens.getSingleLanguageBracketTokens(node.openingBracket.languageId);
32
+ const closingTokenText = singleLangBracketTokens.findClosingTokenText(node.openingBracket.bracketIds);
33
+ str += closingTokenText;
34
+ }
35
+ }
36
+ else if (node.kind === 3 /* AstNodeKind.UnexpectedClosingBracket */) ;
37
+ else if (node.kind === 0 /* AstNodeKind.Text */ || node.kind === 1 /* AstNodeKind.Bracket */) {
38
+ str += line.substring(lengthGetColumnCountIfZeroLineCount(offset), lengthGetColumnCountIfZeroLineCount(lengthAdd(offset, node.length)));
39
+ }
40
+ else if (node.kind === 4 /* AstNodeKind.List */) {
41
+ for (const child of node.children) {
42
+ processNode(child, offset);
43
+ offset = lengthAdd(offset, child.length);
44
+ }
45
+ }
46
+ }
47
+ processNode(node, lengthZero);
48
+ return str;
49
+ }
50
+ class StaticTokenizerSource {
51
+ constructor(lines) {
52
+ this.lines = lines;
53
+ this.tokenization = {
54
+ getLineTokens: (lineNumber) => {
55
+ return this.lines[lineNumber - 1];
56
+ }
57
+ };
58
+ }
59
+ getLineCount() {
60
+ return this.lines.length;
61
+ }
62
+ getLineLength(lineNumber) {
63
+ return this.lines[lineNumber - 1].getLineContent().length;
64
+ }
65
+ }
66
+
67
+ export { fixBracketsInLine };
@@ -0,0 +1,70 @@
1
+ import { arrayInsert } from '../../../base/common/arrays.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
+ /**
8
+ * An array that avoids being sparse by always
9
+ * filling up unused indices with a default value.
10
+ */
11
+ class FixedArray {
12
+ constructor(_default) {
13
+ this._default = _default;
14
+ this._store = [];
15
+ }
16
+ get(index) {
17
+ if (index < this._store.length) {
18
+ return this._store[index];
19
+ }
20
+ return this._default;
21
+ }
22
+ set(index, value) {
23
+ while (index >= this._store.length) {
24
+ this._store[this._store.length] = this._default;
25
+ }
26
+ this._store[index] = value;
27
+ }
28
+ replace(index, oldLength, newLength) {
29
+ if (index >= this._store.length) {
30
+ return;
31
+ }
32
+ if (oldLength === 0) {
33
+ this.insert(index, newLength);
34
+ return;
35
+ }
36
+ else if (newLength === 0) {
37
+ this.delete(index, oldLength);
38
+ return;
39
+ }
40
+ const before = this._store.slice(0, index);
41
+ const after = this._store.slice(index + oldLength);
42
+ const insertArr = arrayFill(newLength, this._default);
43
+ this._store = before.concat(insertArr, after);
44
+ }
45
+ delete(deleteIndex, deleteCount) {
46
+ if (deleteCount === 0 || deleteIndex >= this._store.length) {
47
+ return;
48
+ }
49
+ this._store.splice(deleteIndex, deleteCount);
50
+ }
51
+ insert(insertIndex, insertCount) {
52
+ if (insertCount === 0 || insertIndex >= this._store.length) {
53
+ return;
54
+ }
55
+ const arr = [];
56
+ for (let i = 0; i < insertCount; i++) {
57
+ arr[i] = this._default;
58
+ }
59
+ this._store = arrayInsert(this._store, insertIndex, arr);
60
+ }
61
+ }
62
+ function arrayFill(length, value) {
63
+ const arr = [];
64
+ for (let i = 0; i < length; i++) {
65
+ arr[i] = value;
66
+ }
67
+ return arr;
68
+ }
69
+
70
+ export { FixedArray };
@@ -0,0 +1,172 @@
1
+ import { isMacintosh, isWindows } from '../../../base/common/platform.js';
2
+ import { EditorZoom } from './editorZoom.js';
3
+
4
+ /*---------------------------------------------------------------------------------------------
5
+ * Copyright (c) Microsoft Corporation. All rights reserved.
6
+ * Licensed under the MIT License. See License.txt in the project root for license information.
7
+ *--------------------------------------------------------------------------------------------*/
8
+ /**
9
+ * Determined from empirical observations.
10
+ * @internal
11
+ */
12
+ const GOLDEN_LINE_HEIGHT_RATIO = isMacintosh ? 1.5 : 1.35;
13
+ /**
14
+ * @internal
15
+ */
16
+ const MINIMUM_LINE_HEIGHT = 8;
17
+ class BareFontInfo {
18
+ /**
19
+ * @internal
20
+ */
21
+ static _create(fontFamily, fontWeight, fontSize, fontFeatureSettings, fontVariationSettings, lineHeight, letterSpacing, pixelRatio, ignoreEditorZoom) {
22
+ if (lineHeight === 0) {
23
+ lineHeight = GOLDEN_LINE_HEIGHT_RATIO * fontSize;
24
+ }
25
+ else if (lineHeight < MINIMUM_LINE_HEIGHT) {
26
+ // Values too small to be line heights in pixels are in ems.
27
+ lineHeight = lineHeight * fontSize;
28
+ }
29
+ // Enforce integer, minimum constraints
30
+ lineHeight = Math.round(lineHeight);
31
+ if (lineHeight < MINIMUM_LINE_HEIGHT) {
32
+ lineHeight = MINIMUM_LINE_HEIGHT;
33
+ }
34
+ const editorZoomLevelMultiplier = 1 + (ignoreEditorZoom ? 0 : EditorZoom.getZoomLevel() * 0.1);
35
+ fontSize *= editorZoomLevelMultiplier;
36
+ lineHeight *= editorZoomLevelMultiplier;
37
+ if (fontVariationSettings === FONT_VARIATION_TRANSLATE) {
38
+ if (fontWeight === 'normal' || fontWeight === 'bold') {
39
+ fontVariationSettings = FONT_VARIATION_OFF;
40
+ }
41
+ else {
42
+ const fontWeightAsNumber = parseInt(fontWeight, 10);
43
+ fontVariationSettings = `'wght' ${fontWeightAsNumber}`;
44
+ fontWeight = 'normal';
45
+ }
46
+ }
47
+ return new BareFontInfo({
48
+ pixelRatio: pixelRatio,
49
+ fontFamily: fontFamily,
50
+ fontWeight: fontWeight,
51
+ fontSize: fontSize,
52
+ fontFeatureSettings: fontFeatureSettings,
53
+ fontVariationSettings,
54
+ lineHeight: lineHeight,
55
+ letterSpacing: letterSpacing
56
+ });
57
+ }
58
+ /**
59
+ * @internal
60
+ */
61
+ constructor(opts) {
62
+ this._bareFontInfoBrand = undefined;
63
+ this.pixelRatio = opts.pixelRatio;
64
+ this.fontFamily = String(opts.fontFamily);
65
+ this.fontWeight = String(opts.fontWeight);
66
+ this.fontSize = opts.fontSize;
67
+ this.fontFeatureSettings = opts.fontFeatureSettings;
68
+ this.fontVariationSettings = opts.fontVariationSettings;
69
+ this.lineHeight = opts.lineHeight | 0;
70
+ this.letterSpacing = opts.letterSpacing;
71
+ }
72
+ /**
73
+ * @internal
74
+ */
75
+ getId() {
76
+ return `${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.fontVariationSettings}-${this.lineHeight}-${this.letterSpacing}`;
77
+ }
78
+ /**
79
+ * @internal
80
+ */
81
+ getMassagedFontFamily() {
82
+ const fallbackFontFamily = EDITOR_FONT_DEFAULTS.fontFamily;
83
+ const fontFamily = BareFontInfo._wrapInQuotes(this.fontFamily);
84
+ if (this.fontFamily !== fallbackFontFamily) {
85
+ return `${fontFamily}, ${fallbackFontFamily}`;
86
+ }
87
+ return fontFamily;
88
+ }
89
+ static _wrapInQuotes(fontFamily) {
90
+ if (/[,"']/.test(fontFamily)) {
91
+ // Looks like the font family might be already escaped
92
+ return fontFamily;
93
+ }
94
+ if (/[+ ]/.test(fontFamily)) {
95
+ // Wrap a font family using + or <space> with quotes
96
+ return `"${fontFamily}"`;
97
+ }
98
+ return fontFamily;
99
+ }
100
+ }
101
+ // change this whenever `FontInfo` members are changed
102
+ const SERIALIZED_FONT_INFO_VERSION = 2;
103
+ class FontInfo extends BareFontInfo {
104
+ /**
105
+ * @internal
106
+ */
107
+ constructor(opts, isTrusted) {
108
+ super(opts);
109
+ this._editorStylingBrand = undefined;
110
+ this.version = SERIALIZED_FONT_INFO_VERSION;
111
+ this.isTrusted = isTrusted;
112
+ this.isMonospace = opts.isMonospace;
113
+ this.typicalHalfwidthCharacterWidth = opts.typicalHalfwidthCharacterWidth;
114
+ this.typicalFullwidthCharacterWidth = opts.typicalFullwidthCharacterWidth;
115
+ this.canUseHalfwidthRightwardsArrow = opts.canUseHalfwidthRightwardsArrow;
116
+ this.spaceWidth = opts.spaceWidth;
117
+ this.middotWidth = opts.middotWidth;
118
+ this.wsmiddotWidth = opts.wsmiddotWidth;
119
+ this.maxDigitWidth = opts.maxDigitWidth;
120
+ }
121
+ /**
122
+ * @internal
123
+ */
124
+ equals(other) {
125
+ return (this.fontFamily === other.fontFamily
126
+ && this.fontWeight === other.fontWeight
127
+ && this.fontSize === other.fontSize
128
+ && this.fontFeatureSettings === other.fontFeatureSettings
129
+ && this.fontVariationSettings === other.fontVariationSettings
130
+ && this.lineHeight === other.lineHeight
131
+ && this.letterSpacing === other.letterSpacing
132
+ && this.typicalHalfwidthCharacterWidth === other.typicalHalfwidthCharacterWidth
133
+ && this.typicalFullwidthCharacterWidth === other.typicalFullwidthCharacterWidth
134
+ && this.canUseHalfwidthRightwardsArrow === other.canUseHalfwidthRightwardsArrow
135
+ && this.spaceWidth === other.spaceWidth
136
+ && this.middotWidth === other.middotWidth
137
+ && this.wsmiddotWidth === other.wsmiddotWidth
138
+ && this.maxDigitWidth === other.maxDigitWidth);
139
+ }
140
+ }
141
+ /**
142
+ * @internal
143
+ */
144
+ const FONT_VARIATION_OFF = 'normal';
145
+ /**
146
+ * @internal
147
+ */
148
+ const FONT_VARIATION_TRANSLATE = 'translate';
149
+ /**
150
+ * @internal
151
+ */
152
+ const DEFAULT_WINDOWS_FONT_FAMILY = 'Consolas, \'Courier New\', monospace';
153
+ /**
154
+ * @internal
155
+ */
156
+ const DEFAULT_MAC_FONT_FAMILY = 'Menlo, Monaco, \'Courier New\', monospace';
157
+ /**
158
+ * @internal
159
+ */
160
+ const DEFAULT_LINUX_FONT_FAMILY = '\'Droid Sans Mono\', \'monospace\', monospace';
161
+ /**
162
+ * @internal
163
+ */
164
+ const EDITOR_FONT_DEFAULTS = {
165
+ fontFamily: (isMacintosh ? DEFAULT_MAC_FONT_FAMILY : (isWindows ? DEFAULT_WINDOWS_FONT_FAMILY : DEFAULT_LINUX_FONT_FAMILY)),
166
+ fontWeight: 'normal',
167
+ fontSize: (isMacintosh ? 12 : 14),
168
+ lineHeight: 0,
169
+ letterSpacing: 0,
170
+ };
171
+
172
+ export { BareFontInfo, DEFAULT_LINUX_FONT_FAMILY, DEFAULT_MAC_FONT_FAMILY, DEFAULT_WINDOWS_FONT_FAMILY, EDITOR_FONT_DEFAULTS, FONT_VARIATION_OFF, FONT_VARIATION_TRANSLATE, FontInfo, GOLDEN_LINE_HEIGHT_RATIO, MINIMUM_LINE_HEIGHT, SERIALIZED_FONT_INFO_VERSION };
@@ -0,0 +1,29 @@
1
+ import { EditorOptions } from './editorOptions.js';
2
+ import { BareFontInfo } from './fontInfo.js';
3
+
4
+ /*---------------------------------------------------------------------------------------------
5
+ * Copyright (c) Microsoft Corporation. All rights reserved.
6
+ * Licensed under the MIT License. See License.txt in the project root for license information.
7
+ *--------------------------------------------------------------------------------------------*/
8
+ function createBareFontInfoFromValidatedSettings(options, pixelRatio, ignoreEditorZoom) {
9
+ const fontFamily = options.get(58 /* EditorOption.fontFamily */);
10
+ const fontWeight = options.get(62 /* EditorOption.fontWeight */);
11
+ const fontSize = options.get(61 /* EditorOption.fontSize */);
12
+ const fontFeatureSettings = options.get(60 /* EditorOption.fontLigatures */);
13
+ const fontVariationSettings = options.get(63 /* EditorOption.fontVariations */);
14
+ const lineHeight = options.get(75 /* EditorOption.lineHeight */);
15
+ const letterSpacing = options.get(72 /* EditorOption.letterSpacing */);
16
+ return BareFontInfo._create(fontFamily, fontWeight, fontSize, fontFeatureSettings, fontVariationSettings, lineHeight, letterSpacing, pixelRatio, ignoreEditorZoom);
17
+ }
18
+ function createBareFontInfoFromRawSettings(opts, pixelRatio, ignoreEditorZoom = false) {
19
+ const fontFamily = EditorOptions.fontFamily.validate(opts.fontFamily);
20
+ const fontWeight = EditorOptions.fontWeight.validate(opts.fontWeight);
21
+ const fontSize = EditorOptions.fontSize.validate(opts.fontSize);
22
+ const fontFeatureSettings = EditorOptions.fontLigatures2.validate(opts.fontLigatures);
23
+ const fontVariationSettings = EditorOptions.fontVariations.validate(opts.fontVariations);
24
+ const lineHeight = EditorOptions.lineHeight.validate(opts.lineHeight);
25
+ const letterSpacing = EditorOptions.letterSpacing.validate(opts.letterSpacing);
26
+ return BareFontInfo._create(fontFamily, fontWeight, fontSize, fontFeatureSettings, fontVariationSettings, lineHeight, letterSpacing, pixelRatio, ignoreEditorZoom);
27
+ }
28
+
29
+ export { createBareFontInfoFromRawSettings, createBareFontInfoFromValidatedSettings };
@@ -0,0 +1,106 @@
1
+ import { Schemas } from '../../../base/common/network.js';
2
+ import { DataUri } from '../../../base/common/resources.js';
3
+ import { URI } from '../../../base/common/uri.js';
4
+ import { PLAINTEXT_LANGUAGE_ID } from '../languages/modesRegistry.js';
5
+ import { FileKind } from '../../../platform/files/common/files.js';
6
+ import { ThemeIcon } from '../../../base/common/themables.js';
7
+
8
+ /*---------------------------------------------------------------------------------------------
9
+ * Copyright (c) Microsoft Corporation. All rights reserved.
10
+ * Licensed under the MIT License. See License.txt in the project root for license information.
11
+ *--------------------------------------------------------------------------------------------*/
12
+ const fileIconDirectoryRegex = /(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;
13
+ function getIconClasses(modelService, languageService, resource, fileKind, icon) {
14
+ if (ThemeIcon.isThemeIcon(icon)) {
15
+ return [`codicon-${icon.id}`, 'predefined-file-icon'];
16
+ }
17
+ if (URI.isUri(icon)) {
18
+ return [];
19
+ }
20
+ // we always set these base classes even if we do not have a path
21
+ const classes = fileKind === FileKind.ROOT_FOLDER ? ['rootfolder-icon'] : fileKind === FileKind.FOLDER ? ['folder-icon'] : ['file-icon'];
22
+ if (resource) {
23
+ // Get the path and name of the resource. For data-URIs, we need to parse specially
24
+ let name;
25
+ if (resource.scheme === Schemas.data) {
26
+ const metadata = DataUri.parseMetaData(resource);
27
+ name = metadata.get(DataUri.META_DATA_LABEL);
28
+ }
29
+ else {
30
+ const match = resource.path.match(fileIconDirectoryRegex);
31
+ if (match) {
32
+ name = fileIconSelectorEscape(match[2].toLowerCase());
33
+ if (match[1]) {
34
+ classes.push(`${fileIconSelectorEscape(match[1].toLowerCase())}-name-dir-icon`); // parent directory
35
+ }
36
+ }
37
+ else {
38
+ name = fileIconSelectorEscape(resource.authority.toLowerCase());
39
+ }
40
+ }
41
+ // Root Folders
42
+ if (fileKind === FileKind.ROOT_FOLDER) {
43
+ classes.push(`${name}-root-name-folder-icon`);
44
+ }
45
+ // Folders
46
+ else if (fileKind === FileKind.FOLDER) {
47
+ classes.push(`${name}-name-folder-icon`);
48
+ }
49
+ // Files
50
+ else {
51
+ // Name & Extension(s)
52
+ if (name) {
53
+ classes.push(`${name}-name-file-icon`);
54
+ classes.push(`name-file-icon`); // extra segment to increase file-name score
55
+ // Avoid doing an explosive combination of extensions for very long filenames
56
+ // (most file systems do not allow files > 255 length) with lots of `.` characters
57
+ // https://github.com/microsoft/vscode/issues/116199
58
+ if (name.length <= 255) {
59
+ const dotSegments = name.split('.');
60
+ for (let i = 1; i < dotSegments.length; i++) {
61
+ classes.push(`${dotSegments.slice(i).join('.')}-ext-file-icon`); // add each combination of all found extensions if more than one
62
+ }
63
+ }
64
+ classes.push(`ext-file-icon`); // extra segment to increase file-ext score
65
+ }
66
+ // Detected Mode
67
+ const detectedLanguageId = detectLanguageId(modelService, languageService, resource);
68
+ if (detectedLanguageId) {
69
+ classes.push(`${fileIconSelectorEscape(detectedLanguageId)}-lang-file-icon`);
70
+ }
71
+ }
72
+ }
73
+ return classes;
74
+ }
75
+ function detectLanguageId(modelService, languageService, resource) {
76
+ if (!resource) {
77
+ return null; // we need a resource at least
78
+ }
79
+ let languageId = null;
80
+ // Data URI: check for encoded metadata
81
+ if (resource.scheme === Schemas.data) {
82
+ const metadata = DataUri.parseMetaData(resource);
83
+ const mime = metadata.get(DataUri.META_DATA_MIME);
84
+ if (mime) {
85
+ languageId = languageService.getLanguageIdByMimeType(mime);
86
+ }
87
+ }
88
+ // Any other URI: check for model if existing
89
+ else {
90
+ const model = modelService.getModel(resource);
91
+ if (model) {
92
+ languageId = model.getLanguageId();
93
+ }
94
+ }
95
+ // only take if the language id is specific (aka no just plain text)
96
+ if (languageId && languageId !== PLAINTEXT_LANGUAGE_ID) {
97
+ return languageId;
98
+ }
99
+ // otherwise fallback to path based detection
100
+ return languageService.guessLanguageIdByFilepathOrFirstLine(resource);
101
+ }
102
+ function fileIconSelectorEscape(str) {
103
+ return str.replace(/[\s]/g, '/'); // HTML class names can not contain certain whitespace characters (https://dom.spec.whatwg.org/#interface-domtokenlist), use / instead, which doesn't exist in file names.
104
+ }
105
+
106
+ export { fileIconSelectorEscape, getIconClasses };
@@ -0,0 +1,24 @@
1
+ import './positionToOffset.js';
2
+ import { PositionOffsetTransformerBase } from './positionToOffsetImpl.js';
3
+
4
+ /*---------------------------------------------------------------------------------------------
5
+ * Copyright (c) Microsoft Corporation. All rights reserved.
6
+ * Licensed under the MIT License. See License.txt in the project root for license information.
7
+ *--------------------------------------------------------------------------------------------*/
8
+ function getPositionOffsetTransformerFromTextModel(textModel) {
9
+ return new PositionOffsetTransformerWithTextModel(textModel);
10
+ }
11
+ class PositionOffsetTransformerWithTextModel extends PositionOffsetTransformerBase {
12
+ constructor(_textModel) {
13
+ super();
14
+ this._textModel = _textModel;
15
+ }
16
+ getOffset(position) {
17
+ return this._textModel.getOffsetAt(position);
18
+ }
19
+ getPosition(offset) {
20
+ return this._textModel.getPositionAt(offset);
21
+ }
22
+ }
23
+
24
+ export { getPositionOffsetTransformerFromTextModel };
@@ -0,0 +1,61 @@
1
+ import { GlyphMarginLane } from '../model.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
+ const MAX_LANE = GlyphMarginLane.Right;
8
+ class GlyphMarginLanesModel {
9
+ constructor(maxLine) {
10
+ this.persist = 0;
11
+ this._requiredLanes = 1; // always render at least one lane
12
+ this.lanes = new Uint8Array(Math.ceil(((maxLine + 1) * MAX_LANE) / 8));
13
+ }
14
+ reset(maxLine) {
15
+ const bytes = Math.ceil(((maxLine + 1) * MAX_LANE) / 8);
16
+ if (this.lanes.length < bytes) {
17
+ this.lanes = new Uint8Array(bytes);
18
+ }
19
+ else {
20
+ this.lanes.fill(0);
21
+ }
22
+ this._requiredLanes = 1;
23
+ }
24
+ get requiredLanes() {
25
+ return this._requiredLanes;
26
+ }
27
+ push(lane, range, persist) {
28
+ if (persist) {
29
+ this.persist |= (1 << (lane - 1));
30
+ }
31
+ for (let i = range.startLineNumber; i <= range.endLineNumber; i++) {
32
+ const bit = (MAX_LANE * i) + (lane - 1);
33
+ this.lanes[bit >>> 3] |= (1 << (bit % 8));
34
+ this._requiredLanes = Math.max(this._requiredLanes, this.countAtLine(i));
35
+ }
36
+ }
37
+ getLanesAtLine(lineNumber) {
38
+ const lanes = [];
39
+ let bit = MAX_LANE * lineNumber;
40
+ for (let i = 0; i < MAX_LANE; i++) {
41
+ if (this.persist & (1 << i) || this.lanes[bit >>> 3] & (1 << (bit % 8))) {
42
+ lanes.push(i + 1);
43
+ }
44
+ bit++;
45
+ }
46
+ return lanes.length ? lanes : [GlyphMarginLane.Center];
47
+ }
48
+ countAtLine(lineNumber) {
49
+ let bit = MAX_LANE * lineNumber;
50
+ let count = 0;
51
+ for (let i = 0; i < MAX_LANE; i++) {
52
+ if (this.persist & (1 << i) || this.lanes[bit >>> 3] & (1 << (bit % 8))) {
53
+ count++;
54
+ }
55
+ bit++;
56
+ }
57
+ return count;
58
+ }
59
+ }
60
+
61
+ export { GlyphMarginLanesModel };